squad-kit 1.3.16 → 1.3.17
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/dist/cli.js +24 -18
- package/dist/console-ui/assets/index-CEkj542W.js +700 -0
- package/dist/console-ui/assets/index-CzkdWSYI.css +1 -0
- package/dist/console-ui/index.html +2 -2
- package/docs/console.md +19 -7
- package/package.json +1 -1
- package/dist/console-ui/assets/index-CLweSGAt.css +0 -1
- package/dist/console-ui/assets/index-CoElmpfO.js +0 -699
|
@@ -1,699 +0,0 @@
|
|
|
1
|
-
(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function s(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=s(i);fetch(i.href,o)}})();function em(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Kh={exports:{}},oo={},Yh={exports:{}},_e={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Fx;function m6(){if(Fx)return _e;Fx=1;var e=Symbol.for("react.element"),n=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),l=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.iterator;function x(B){return B===null||typeof B!="object"?null:(B=p&&B[p]||B["@@iterator"],typeof B=="function"?B:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,k={};function b(B,J,q){this.props=B,this.context=J,this.refs=k,this.updater=q||y}b.prototype.isReactComponent={},b.prototype.setState=function(B,J){if(typeof B!="object"&&typeof B!="function"&&B!=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,B,J,"setState")},b.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function w(){}w.prototype=b.prototype;function S(B,J,q){this.props=B,this.context=J,this.refs=k,this.updater=q||y}var T=S.prototype=new w;T.constructor=S,j(T,b.prototype),T.isPureReactComponent=!0;var A=Array.isArray,D=Object.prototype.hasOwnProperty,$={current:null},P={key:!0,ref:!0,__self:!0,__source:!0};function F(B,J,q){var me,ye={},Ne=null,Fe=null;if(J!=null)for(me in J.ref!==void 0&&(Fe=J.ref),J.key!==void 0&&(Ne=""+J.key),J)D.call(J,me)&&!P.hasOwnProperty(me)&&(ye[me]=J[me]);var Te=arguments.length-2;if(Te===1)ye.children=q;else if(1<Te){for(var ze=Array(Te),Ze=0;Ze<Te;Ze++)ze[Ze]=arguments[Ze+2];ye.children=ze}if(B&&B.defaultProps)for(me in Te=B.defaultProps,Te)ye[me]===void 0&&(ye[me]=Te[me]);return{$$typeof:e,type:B,key:Ne,ref:Fe,props:ye,_owner:$.current}}function _(B,J){return{$$typeof:e,type:B.type,key:J,ref:B.ref,props:B.props,_owner:B._owner}}function z(B){return typeof B=="object"&&B!==null&&B.$$typeof===e}function U(B){var J={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(q){return J[q]})}var I=/\/+/g;function W(B,J){return typeof B=="object"&&B!==null&&B.key!=null?U(""+B.key):J.toString(36)}function M(B,J,q,me,ye){var Ne=typeof B;(Ne==="undefined"||Ne==="boolean")&&(B=null);var Fe=!1;if(B===null)Fe=!0;else switch(Ne){case"string":case"number":Fe=!0;break;case"object":switch(B.$$typeof){case e:case n:Fe=!0}}if(Fe)return Fe=B,ye=ye(Fe),B=me===""?"."+W(Fe,0):me,A(ye)?(q="",B!=null&&(q=B.replace(I,"$&/")+"/"),M(ye,J,q,"",function(Ze){return Ze})):ye!=null&&(z(ye)&&(ye=_(ye,q+(!ye.key||Fe&&Fe.key===ye.key?"":(""+ye.key).replace(I,"$&/")+"/")+B)),J.push(ye)),1;if(Fe=0,me=me===""?".":me+":",A(B))for(var Te=0;Te<B.length;Te++){Ne=B[Te];var ze=me+W(Ne,Te);Fe+=M(Ne,J,q,ze,ye)}else if(ze=x(B),typeof ze=="function")for(B=ze.call(B),Te=0;!(Ne=B.next()).done;)Ne=Ne.value,ze=me+W(Ne,Te++),Fe+=M(Ne,J,q,ze,ye);else if(Ne==="object")throw J=String(B),Error("Objects are not valid as a React child (found: "+(J==="[object Object]"?"object with keys {"+Object.keys(B).join(", ")+"}":J)+"). If you meant to render a collection of children, use an array instead.");return Fe}function G(B,J,q){if(B==null)return B;var me=[],ye=0;return M(B,me,"","",function(Ne){return J.call(q,Ne,ye++)}),me}function ce(B){if(B._status===-1){var J=B._result;J=J(),J.then(function(q){(B._status===0||B._status===-1)&&(B._status=1,B._result=q)},function(q){(B._status===0||B._status===-1)&&(B._status=2,B._result=q)}),B._status===-1&&(B._status=0,B._result=J)}if(B._status===1)return B._result.default;throw B._result}var V={current:null},Y={transition:null},se={ReactCurrentDispatcher:V,ReactCurrentBatchConfig:Y,ReactCurrentOwner:$};function R(){throw Error("act(...) is not supported in production builds of React.")}return _e.Children={map:G,forEach:function(B,J,q){G(B,function(){J.apply(this,arguments)},q)},count:function(B){var J=0;return G(B,function(){J++}),J},toArray:function(B){return G(B,function(J){return J})||[]},only:function(B){if(!z(B))throw Error("React.Children.only expected to receive a single React element child.");return B}},_e.Component=b,_e.Fragment=s,_e.Profiler=i,_e.PureComponent=S,_e.StrictMode=r,_e.Suspense=u,_e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=se,_e.act=R,_e.cloneElement=function(B,J,q){if(B==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+B+".");var me=j({},B.props),ye=B.key,Ne=B.ref,Fe=B._owner;if(J!=null){if(J.ref!==void 0&&(Ne=J.ref,Fe=$.current),J.key!==void 0&&(ye=""+J.key),B.type&&B.type.defaultProps)var Te=B.type.defaultProps;for(ze in J)D.call(J,ze)&&!P.hasOwnProperty(ze)&&(me[ze]=J[ze]===void 0&&Te!==void 0?Te[ze]:J[ze])}var ze=arguments.length-2;if(ze===1)me.children=q;else if(1<ze){Te=Array(ze);for(var Ze=0;Ze<ze;Ze++)Te[Ze]=arguments[Ze+2];me.children=Te}return{$$typeof:e,type:B.type,key:ye,ref:Ne,props:me,_owner:Fe}},_e.createContext=function(B){return B={$$typeof:l,_currentValue:B,_currentValue2:B,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},B.Provider={$$typeof:o,_context:B},B.Consumer=B},_e.createElement=F,_e.createFactory=function(B){var J=F.bind(null,B);return J.type=B,J},_e.createRef=function(){return{current:null}},_e.forwardRef=function(B){return{$$typeof:d,render:B}},_e.isValidElement=z,_e.lazy=function(B){return{$$typeof:m,_payload:{_status:-1,_result:B},_init:ce}},_e.memo=function(B,J){return{$$typeof:h,type:B,compare:J===void 0?null:J}},_e.startTransition=function(B){var J=Y.transition;Y.transition={};try{B()}finally{Y.transition=J}},_e.unstable_act=R,_e.useCallback=function(B,J){return V.current.useCallback(B,J)},_e.useContext=function(B){return V.current.useContext(B)},_e.useDebugValue=function(){},_e.useDeferredValue=function(B){return V.current.useDeferredValue(B)},_e.useEffect=function(B,J){return V.current.useEffect(B,J)},_e.useId=function(){return V.current.useId()},_e.useImperativeHandle=function(B,J,q){return V.current.useImperativeHandle(B,J,q)},_e.useInsertionEffect=function(B,J){return V.current.useInsertionEffect(B,J)},_e.useLayoutEffect=function(B,J){return V.current.useLayoutEffect(B,J)},_e.useMemo=function(B,J){return V.current.useMemo(B,J)},_e.useReducer=function(B,J,q){return V.current.useReducer(B,J,q)},_e.useRef=function(B){return V.current.useRef(B)},_e.useState=function(B){return V.current.useState(B)},_e.useSyncExternalStore=function(B,J,q){return V.current.useSyncExternalStore(B,J,q)},_e.useTransition=function(){return V.current.useTransition()},_e.version="18.3.1",_e}var zx;function el(){return zx||(zx=1,Yh.exports=m6()),Yh.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 qx;function g6(){if(qx)return oo;qx=1;var e=el(),n=Symbol.for("react.element"),s=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function l(d,u,h){var m,p={},x=null,y=null;h!==void 0&&(x=""+h),u.key!==void 0&&(x=""+u.key),u.ref!==void 0&&(y=u.ref);for(m in u)r.call(u,m)&&!o.hasOwnProperty(m)&&(p[m]=u[m]);if(d&&d.defaultProps)for(m in u=d.defaultProps,u)p[m]===void 0&&(p[m]=u[m]);return{$$typeof:n,type:d,key:x,ref:y,props:p,_owner:i.current}}return oo.Fragment=s,oo.jsx=l,oo.jsxs=l,oo}var Lx;function x6(){return Lx||(Lx=1,Kh.exports=g6()),Kh.exports}var t=x6(),C=el();const Co=em(C);var Ac={},Gh={exports:{}},hn={},Qh={exports:{}},Zh={};/**
|
|
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 Mx;function y6(){return Mx||(Mx=1,(function(e){function n(Y,se){var R=Y.length;Y.push(se);e:for(;0<R;){var B=R-1>>>1,J=Y[B];if(0<i(J,se))Y[B]=se,Y[R]=J,R=B;else break e}}function s(Y){return Y.length===0?null:Y[0]}function r(Y){if(Y.length===0)return null;var se=Y[0],R=Y.pop();if(R!==se){Y[0]=R;e:for(var B=0,J=Y.length,q=J>>>1;B<q;){var me=2*(B+1)-1,ye=Y[me],Ne=me+1,Fe=Y[Ne];if(0>i(ye,R))Ne<J&&0>i(Fe,ye)?(Y[B]=Fe,Y[Ne]=R,B=Ne):(Y[B]=ye,Y[me]=R,B=me);else if(Ne<J&&0>i(Fe,R))Y[B]=Fe,Y[Ne]=R,B=Ne;else break e}}return se}function i(Y,se){var R=Y.sortIndex-se.sortIndex;return R!==0?R:Y.id-se.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,d=l.now();e.unstable_now=function(){return l.now()-d}}var u=[],h=[],m=1,p=null,x=3,y=!1,j=!1,k=!1,b=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 T(Y){for(var se=s(h);se!==null;){if(se.callback===null)r(h);else if(se.startTime<=Y)r(h),se.sortIndex=se.expirationTime,n(u,se);else break;se=s(h)}}function A(Y){if(k=!1,T(Y),!j)if(s(u)!==null)j=!0,ce(D);else{var se=s(h);se!==null&&V(A,se.startTime-Y)}}function D(Y,se){j=!1,k&&(k=!1,w(F),F=-1),y=!0;var R=x;try{for(T(se),p=s(u);p!==null&&(!(p.expirationTime>se)||Y&&!U());){var B=p.callback;if(typeof B=="function"){p.callback=null,x=p.priorityLevel;var J=B(p.expirationTime<=se);se=e.unstable_now(),typeof J=="function"?p.callback=J:p===s(u)&&r(u),T(se)}else r(u);p=s(u)}if(p!==null)var q=!0;else{var me=s(h);me!==null&&V(A,me.startTime-se),q=!1}return q}finally{p=null,x=R,y=!1}}var $=!1,P=null,F=-1,_=5,z=-1;function U(){return!(e.unstable_now()-z<_)}function I(){if(P!==null){var Y=e.unstable_now();z=Y;var se=!0;try{se=P(!0,Y)}finally{se?W():($=!1,P=null)}}else $=!1}var W;if(typeof S=="function")W=function(){S(I)};else if(typeof MessageChannel<"u"){var M=new MessageChannel,G=M.port2;M.port1.onmessage=I,W=function(){G.postMessage(null)}}else W=function(){b(I,0)};function ce(Y){P=Y,$||($=!0,W())}function V(Y,se){F=b(function(){Y(e.unstable_now())},se)}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(Y){Y.callback=null},e.unstable_continueExecution=function(){j||y||(j=!0,ce(D))},e.unstable_forceFrameRate=function(Y){0>Y||125<Y?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):_=0<Y?Math.floor(1e3/Y):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return s(u)},e.unstable_next=function(Y){switch(x){case 1:case 2:case 3:var se=3;break;default:se=x}var R=x;x=se;try{return Y()}finally{x=R}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Y,se){switch(Y){case 1:case 2:case 3:case 4:case 5:break;default:Y=3}var R=x;x=Y;try{return se()}finally{x=R}},e.unstable_scheduleCallback=function(Y,se,R){var B=e.unstable_now();switch(typeof R=="object"&&R!==null?(R=R.delay,R=typeof R=="number"&&0<R?B+R:B):R=B,Y){case 1:var J=-1;break;case 2:J=250;break;case 5:J=1073741823;break;case 4:J=1e4;break;default:J=5e3}return J=R+J,Y={id:m++,callback:se,priorityLevel:Y,startTime:R,expirationTime:J,sortIndex:-1},R>B?(Y.sortIndex=R,n(h,Y),s(u)===null&&Y===s(h)&&(k?(w(F),F=-1):k=!0,V(A,R-B))):(Y.sortIndex=J,n(u,Y),j||y||(j=!0,ce(D))),Y},e.unstable_shouldYield=U,e.unstable_wrapCallback=function(Y){var se=x;return function(){var R=x;x=se;try{return Y.apply(this,arguments)}finally{x=R}}}})(Zh)),Zh}var Ox;function j6(){return Ox||(Ox=1,Qh.exports=y6()),Qh.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 _x;function k6(){if(_x)return hn;_x=1;var e=el(),n=j6();function s(a){for(var c="https://reactjs.org/docs/error-decoder.html?invariant="+a,f=1;f<arguments.length;f++)c+="&args[]="+encodeURIComponent(arguments[f]);return"Minified React error #"+a+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,i={};function o(a,c){l(a,c),l(a+"Capture",c)}function l(a,c){for(i[a]=c,a=0;a<c.length;a++)r.add(c[a])}var d=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),u=Object.prototype.hasOwnProperty,h=/^[: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]*$/,m={},p={};function x(a){return u.call(p,a)?!0:u.call(m,a)?!1:h.test(a)?p[a]=!0:(m[a]=!0,!1)}function y(a,c,f,g){if(f!==null&&f.type===0)return!1;switch(typeof c){case"function":case"symbol":return!0;case"boolean":return g?!1:f!==null?!f.acceptsBooleans:(a=a.toLowerCase().slice(0,5),a!=="data-"&&a!=="aria-");default:return!1}}function j(a,c,f,g){if(c===null||typeof c>"u"||y(a,c,f,g))return!0;if(g)return!1;if(f!==null)switch(f.type){case 3:return!c;case 4:return c===!1;case 5:return isNaN(c);case 6:return isNaN(c)||1>c}return!1}function k(a,c,f,g,v,N,E){this.acceptsBooleans=c===2||c===3||c===4,this.attributeName=g,this.attributeNamespace=v,this.mustUseProperty=f,this.propertyName=a,this.type=c,this.sanitizeURL=N,this.removeEmptyString=E}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){b[a]=new k(a,0,!1,a,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var c=a[0];b[c]=new k(c,1,!1,a[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(a){b[a]=new k(a,2,!1,a.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){b[a]=new k(a,2,!1,a,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(a){b[a]=new k(a,3,!1,a.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(a){b[a]=new k(a,3,!0,a,null,!1,!1)}),["capture","download"].forEach(function(a){b[a]=new k(a,4,!1,a,null,!1,!1)}),["cols","rows","size","span"].forEach(function(a){b[a]=new k(a,6,!1,a,null,!1,!1)}),["rowSpan","start"].forEach(function(a){b[a]=new k(a,5,!1,a.toLowerCase(),null,!1,!1)});var w=/[\-:]([a-z])/g;function S(a){return a[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(a){var c=a.replace(w,S);b[c]=new k(c,1,!1,a,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var c=a.replace(w,S);b[c]=new k(c,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(a){var c=a.replace(w,S);b[c]=new k(c,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(a){b[a]=new k(a,1,!1,a.toLowerCase(),null,!1,!1)}),b.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(a){b[a]=new k(a,1,!1,a.toLowerCase(),null,!0,!0)});function T(a,c,f,g){var v=b.hasOwnProperty(c)?b[c]:null;(v!==null?v.type!==0:g||!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(j(c,f,v,g)&&(f=null),g||v===null?x(c)&&(f===null?a.removeAttribute(c):a.setAttribute(c,""+f)):v.mustUseProperty?a[v.propertyName]=f===null?v.type===3?!1:"":f:(c=v.attributeName,g=v.attributeNamespace,f===null?a.removeAttribute(c):(v=v.type,f=v===3||v===4&&f===!0?"":""+f,g?a.setAttributeNS(g,c,f):a.setAttribute(c,f))))}var A=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,D=Symbol.for("react.element"),$=Symbol.for("react.portal"),P=Symbol.for("react.fragment"),F=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),z=Symbol.for("react.provider"),U=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),ce=Symbol.for("react.lazy"),V=Symbol.for("react.offscreen"),Y=Symbol.iterator;function se(a){return a===null||typeof a!="object"?null:(a=Y&&a[Y]||a["@@iterator"],typeof a=="function"?a:null)}var R=Object.assign,B;function J(a){if(B===void 0)try{throw Error()}catch(f){var c=f.stack.trim().match(/\n( *(at )?)/);B=c&&c[1]||""}return`
|
|
34
|
-
`+B+a}var q=!1;function me(a,c){if(!a||q)return"";q=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(c)if(c=function(){throw Error()},Object.defineProperty(c.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(c,[])}catch(X){var g=X}Reflect.construct(a,[],c)}else{try{c.call()}catch(X){g=X}a.call(c.prototype)}else{try{throw Error()}catch(X){g=X}a()}}catch(X){if(X&&g&&typeof X.stack=="string"){for(var v=X.stack.split(`
|
|
35
|
-
`),N=g.stack.split(`
|
|
36
|
-
`),E=v.length-1,O=N.length-1;1<=E&&0<=O&&v[E]!==N[O];)O--;for(;1<=E&&0<=O;E--,O--)if(v[E]!==N[O]){if(E!==1||O!==1)do if(E--,O--,0>O||v[E]!==N[O]){var H=`
|
|
37
|
-
`+v[E].replace(" at new "," at ");return a.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",a.displayName)),H}while(1<=E&&0<=O);break}}}finally{q=!1,Error.prepareStackTrace=f}return(a=a?a.displayName||a.name:"")?J(a):""}function ye(a){switch(a.tag){case 5:return J(a.type);case 16:return J("Lazy");case 13:return J("Suspense");case 19:return J("SuspenseList");case 0:case 2:case 15:return a=me(a.type,!1),a;case 11:return a=me(a.type.render,!1),a;case 1:return a=me(a.type,!0),a;default:return""}}function Ne(a){if(a==null)return null;if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case P:return"Fragment";case $:return"Portal";case _:return"Profiler";case F:return"StrictMode";case W:return"Suspense";case M:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case U:return(a.displayName||"Context")+".Consumer";case z:return(a._context.displayName||"Context")+".Provider";case I:var c=a.render;return a=a.displayName,a||(a=c.displayName||c.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case G:return c=a.displayName||null,c!==null?c:Ne(a.type)||"Memo";case ce:c=a._payload,a=a._init;try{return Ne(a(c))}catch{}}return null}function Fe(a){var c=a.type;switch(a.tag){case 24:return"Cache";case 9:return(c.displayName||"Context")+".Consumer";case 10:return(c._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return a=c.render,a=a.displayName||a.name||"",c.displayName||(a!==""?"ForwardRef("+a+")":"ForwardRef");case 7:return"Fragment";case 5:return c;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ne(c);case 8:return c===F?"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 c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c}return null}function Te(a){switch(typeof a){case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function ze(a){var c=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(c==="checkbox"||c==="radio")}function Ze(a){var c=ze(a)?"checked":"value",f=Object.getOwnPropertyDescriptor(a.constructor.prototype,c),g=""+a[c];if(!a.hasOwnProperty(c)&&typeof f<"u"&&typeof f.get=="function"&&typeof f.set=="function"){var v=f.get,N=f.set;return Object.defineProperty(a,c,{configurable:!0,get:function(){return v.call(this)},set:function(E){g=""+E,N.call(this,E)}}),Object.defineProperty(a,c,{enumerable:f.enumerable}),{getValue:function(){return g},setValue:function(E){g=""+E},stopTracking:function(){a._valueTracker=null,delete a[c]}}}}function Lt(a){a._valueTracker||(a._valueTracker=Ze(a))}function Xt(a){if(!a)return!1;var c=a._valueTracker;if(!c)return!0;var f=c.getValue(),g="";return a&&(g=ze(a)?a.checked?"true":"false":a.value),a=g,a!==f?(c.setValue(a),!0):!1}function Fn(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}function Rt(a,c){var f=c.checked;return R({},c,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:f??a._wrapperState.initialChecked})}function ps(a,c){var f=c.defaultValue==null?"":c.defaultValue,g=c.checked!=null?c.checked:c.defaultChecked;f=Te(c.value!=null?c.value:f),a._wrapperState={initialChecked:g,initialValue:f,controlled:c.type==="checkbox"||c.type==="radio"?c.checked!=null:c.value!=null}}function fs(a,c){c=c.checked,c!=null&&T(a,"checked",c,!1)}function zn(a,c){fs(a,c);var f=Te(c.value),g=c.type;if(f!=null)g==="number"?(f===0&&a.value===""||a.value!=f)&&(a.value=""+f):a.value!==""+f&&(a.value=""+f);else if(g==="submit"||g==="reset"){a.removeAttribute("value");return}c.hasOwnProperty("value")?Mt(a,c.type,f):c.hasOwnProperty("defaultValue")&&Mt(a,c.type,Te(c.defaultValue)),c.checked==null&&c.defaultChecked!=null&&(a.defaultChecked=!!c.defaultChecked)}function dt(a,c,f){if(c.hasOwnProperty("value")||c.hasOwnProperty("defaultValue")){var g=c.type;if(!(g!=="submit"&&g!=="reset"||c.value!==void 0&&c.value!==null))return;c=""+a._wrapperState.initialValue,f||c===a.value||(a.value=c),a.defaultValue=c}f=a.name,f!==""&&(a.name=""),a.defaultChecked=!!a._wrapperState.initialChecked,f!==""&&(a.name=f)}function Mt(a,c,f){(c!=="number"||Fn(a.ownerDocument)!==a)&&(f==null?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+f&&(a.defaultValue=""+f))}var yt=Array.isArray;function sn(a,c,f,g){if(a=a.options,c){c={};for(var v=0;v<f.length;v++)c["$"+f[v]]=!0;for(f=0;f<a.length;f++)v=c.hasOwnProperty("$"+a[f].value),a[f].selected!==v&&(a[f].selected=v),v&&g&&(a[f].defaultSelected=!0)}else{for(f=""+Te(f),c=null,v=0;v<a.length;v++){if(a[v].value===f){a[v].selected=!0,g&&(a[v].defaultSelected=!0);return}c!==null||a[v].disabled||(c=a[v])}c!==null&&(c.selected=!0)}}function ms(a,c){if(c.dangerouslySetInnerHTML!=null)throw Error(s(91));return R({},c,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function jn(a,c){var f=c.value;if(f==null){if(f=c.children,c=c.defaultValue,f!=null){if(c!=null)throw Error(s(92));if(yt(f)){if(1<f.length)throw Error(s(93));f=f[0]}c=f}c==null&&(c=""),f=c}a._wrapperState={initialValue:Te(f)}}function gs(a,c){var f=Te(c.value),g=Te(c.defaultValue);f!=null&&(f=""+f,f!==a.value&&(a.value=f),c.defaultValue==null&&a.defaultValue!==f&&(a.defaultValue=f)),g!=null&&(a.defaultValue=""+g)}function Ge(a){var c=a.textContent;c===a._wrapperState.initialValue&&c!==""&&c!==null&&(a.value=c)}function ee(a){switch(a){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 ue(a,c){return a==null||a==="http://www.w3.org/1999/xhtml"?ee(c):a==="http://www.w3.org/2000/svg"&&c==="foreignObject"?"http://www.w3.org/1999/xhtml":a}var Ee,Me=(function(a){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(c,f,g,v){MSApp.execUnsafeLocalFunction(function(){return a(c,f,g,v)})}:a})(function(a,c){if(a.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in a)a.innerHTML=c;else{for(Ee=Ee||document.createElement("div"),Ee.innerHTML="<svg>"+c.valueOf().toString()+"</svg>",c=Ee.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;c.firstChild;)a.appendChild(c.firstChild)}});function He(a,c){if(c){var f=a.firstChild;if(f&&f===a.lastChild&&f.nodeType===3){f.nodeValue=c;return}}a.textContent=c}var vt={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},qn=["Webkit","ms","Moz","O"];Object.keys(vt).forEach(function(a){qn.forEach(function(c){c=c+a.charAt(0).toUpperCase()+a.substring(1),vt[c]=vt[a]})});function rn(a,c,f){return c==null||typeof c=="boolean"||c===""?"":f||typeof c!="number"||c===0||vt.hasOwnProperty(a)&&vt[a]?(""+c).trim():c+"px"}function xs(a,c){a=a.style;for(var f in c)if(c.hasOwnProperty(f)){var g=f.indexOf("--")===0,v=rn(f,c[f],g);f==="float"&&(f="cssFloat"),g?a.setProperty(f,v):a[f]=v}}var zs=R({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 bt(a,c){if(c){if(zs[a]&&(c.children!=null||c.dangerouslySetInnerHTML!=null))throw Error(s(137,a));if(c.dangerouslySetInnerHTML!=null){if(c.children!=null)throw Error(s(60));if(typeof c.dangerouslySetInnerHTML!="object"||!("__html"in c.dangerouslySetInnerHTML))throw Error(s(61))}if(c.style!=null&&typeof c.style!="object")throw Error(s(62))}}function kn(a,c){if(a.indexOf("-")===-1)return typeof c.is=="string";switch(a){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 Jt=null;function re(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var rt=null,an=null,Ot=null;function Ln(a){if(a=Va(a)){if(typeof rt!="function")throw Error(s(280));var c=a.stateNode;c&&(c=Hl(c),rt(a.stateNode,a.type,c))}}function X1(a){an?Ot?Ot.push(a):Ot=[a]:an=a}function J1(){if(an){var a=an,c=Ot;if(Ot=an=null,Ln(a),c)for(a=0;a<c.length;a++)Ln(c[a])}}function e0(a,c){return a(c)}function t0(){}var du=!1;function n0(a,c,f){if(du)return a(c,f);du=!0;try{return e0(a,c,f)}finally{du=!1,(an!==null||Ot!==null)&&(t0(),J1())}}function Sa(a,c){var f=a.stateNode;if(f===null)return null;var g=Hl(f);if(g===null)return null;f=g[c];e:switch(c){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)||(a=a.type,g=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!g;break e;default:a=!1}if(a)return null;if(f&&typeof f!="function")throw Error(s(231,c,typeof f));return f}var uu=!1;if(d)try{var Ca={};Object.defineProperty(Ca,"passive",{get:function(){uu=!0}}),window.addEventListener("test",Ca,Ca),window.removeEventListener("test",Ca,Ca)}catch{uu=!1}function v3(a,c,f,g,v,N,E,O,H){var X=Array.prototype.slice.call(arguments,3);try{c.apply(f,X)}catch(le){this.onError(le)}}var $a=!1,wl=null,Nl=!1,hu=null,b3={onError:function(a){$a=!0,wl=a}};function w3(a,c,f,g,v,N,E,O,H){$a=!1,wl=null,v3.apply(b3,arguments)}function N3(a,c,f,g,v,N,E,O,H){if(w3.apply(this,arguments),$a){if($a){var X=wl;$a=!1,wl=null}else throw Error(s(198));Nl||(Nl=!0,hu=X)}}function Fr(a){var c=a,f=a;if(a.alternate)for(;c.return;)c=c.return;else{a=c;do c=a,(c.flags&4098)!==0&&(f=c.return),a=c.return;while(a)}return c.tag===3?f:null}function s0(a){if(a.tag===13){var c=a.memoizedState;if(c===null&&(a=a.alternate,a!==null&&(c=a.memoizedState)),c!==null)return c.dehydrated}return null}function r0(a){if(Fr(a)!==a)throw Error(s(188))}function S3(a){var c=a.alternate;if(!c){if(c=Fr(a),c===null)throw Error(s(188));return c!==a?null:a}for(var f=a,g=c;;){var v=f.return;if(v===null)break;var N=v.alternate;if(N===null){if(g=v.return,g!==null){f=g;continue}break}if(v.child===N.child){for(N=v.child;N;){if(N===f)return r0(v),a;if(N===g)return r0(v),c;N=N.sibling}throw Error(s(188))}if(f.return!==g.return)f=v,g=N;else{for(var E=!1,O=v.child;O;){if(O===f){E=!0,f=v,g=N;break}if(O===g){E=!0,g=v,f=N;break}O=O.sibling}if(!E){for(O=N.child;O;){if(O===f){E=!0,f=N,g=v;break}if(O===g){E=!0,g=N,f=v;break}O=O.sibling}if(!E)throw Error(s(189))}}if(f.alternate!==g)throw Error(s(190))}if(f.tag!==3)throw Error(s(188));return f.stateNode.current===f?a:c}function i0(a){return a=S3(a),a!==null?a0(a):null}function a0(a){if(a.tag===5||a.tag===6)return a;for(a=a.child;a!==null;){var c=a0(a);if(c!==null)return c;a=a.sibling}return null}var o0=n.unstable_scheduleCallback,l0=n.unstable_cancelCallback,C3=n.unstable_shouldYield,$3=n.unstable_requestPaint,jt=n.unstable_now,T3=n.unstable_getCurrentPriorityLevel,pu=n.unstable_ImmediatePriority,c0=n.unstable_UserBlockingPriority,Sl=n.unstable_NormalPriority,E3=n.unstable_LowPriority,d0=n.unstable_IdlePriority,Cl=null,ys=null;function A3(a){if(ys&&typeof ys.onCommitFiberRoot=="function")try{ys.onCommitFiberRoot(Cl,a,void 0,(a.current.flags&128)===128)}catch{}}var Jn=Math.clz32?Math.clz32:I3,P3=Math.log,R3=Math.LN2;function I3(a){return a>>>=0,a===0?32:31-(P3(a)/R3|0)|0}var $l=64,Tl=4194304;function Ta(a){switch(a&-a){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 a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return a}}function El(a,c){var f=a.pendingLanes;if(f===0)return 0;var g=0,v=a.suspendedLanes,N=a.pingedLanes,E=f&268435455;if(E!==0){var O=E&~v;O!==0?g=Ta(O):(N&=E,N!==0&&(g=Ta(N)))}else E=f&~v,E!==0?g=Ta(E):N!==0&&(g=Ta(N));if(g===0)return 0;if(c!==0&&c!==g&&(c&v)===0&&(v=g&-g,N=c&-c,v>=N||v===16&&(N&4194240)!==0))return c;if((g&4)!==0&&(g|=f&16),c=a.entangledLanes,c!==0)for(a=a.entanglements,c&=g;0<c;)f=31-Jn(c),v=1<<f,g|=a[f],c&=~v;return g}function F3(a,c){switch(a){case 1:case 2:case 4:return c+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 c+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 z3(a,c){for(var f=a.suspendedLanes,g=a.pingedLanes,v=a.expirationTimes,N=a.pendingLanes;0<N;){var E=31-Jn(N),O=1<<E,H=v[E];H===-1?((O&f)===0||(O&g)!==0)&&(v[E]=F3(O,c)):H<=c&&(a.expiredLanes|=O),N&=~O}}function fu(a){return a=a.pendingLanes&-1073741825,a!==0?a:a&1073741824?1073741824:0}function u0(){var a=$l;return $l<<=1,($l&4194240)===0&&($l=64),a}function mu(a){for(var c=[],f=0;31>f;f++)c.push(a);return c}function Ea(a,c,f){a.pendingLanes|=c,c!==536870912&&(a.suspendedLanes=0,a.pingedLanes=0),a=a.eventTimes,c=31-Jn(c),a[c]=f}function q3(a,c){var f=a.pendingLanes&~c;a.pendingLanes=c,a.suspendedLanes=0,a.pingedLanes=0,a.expiredLanes&=c,a.mutableReadLanes&=c,a.entangledLanes&=c,c=a.entanglements;var g=a.eventTimes;for(a=a.expirationTimes;0<f;){var v=31-Jn(f),N=1<<v;c[v]=0,g[v]=-1,a[v]=-1,f&=~N}}function gu(a,c){var f=a.entangledLanes|=c;for(a=a.entanglements;f;){var g=31-Jn(f),v=1<<g;v&c|a[g]&c&&(a[g]|=c),f&=~v}}var Xe=0;function h0(a){return a&=-a,1<a?4<a?(a&268435455)!==0?16:536870912:4:1}var p0,xu,f0,m0,g0,yu=!1,Al=[],tr=null,nr=null,sr=null,Aa=new Map,Pa=new Map,rr=[],L3="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 x0(a,c){switch(a){case"focusin":case"focusout":tr=null;break;case"dragenter":case"dragleave":nr=null;break;case"mouseover":case"mouseout":sr=null;break;case"pointerover":case"pointerout":Aa.delete(c.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pa.delete(c.pointerId)}}function Ra(a,c,f,g,v,N){return a===null||a.nativeEvent!==N?(a={blockedOn:c,domEventName:f,eventSystemFlags:g,nativeEvent:N,targetContainers:[v]},c!==null&&(c=Va(c),c!==null&&xu(c)),a):(a.eventSystemFlags|=g,c=a.targetContainers,v!==null&&c.indexOf(v)===-1&&c.push(v),a)}function M3(a,c,f,g,v){switch(c){case"focusin":return tr=Ra(tr,a,c,f,g,v),!0;case"dragenter":return nr=Ra(nr,a,c,f,g,v),!0;case"mouseover":return sr=Ra(sr,a,c,f,g,v),!0;case"pointerover":var N=v.pointerId;return Aa.set(N,Ra(Aa.get(N)||null,a,c,f,g,v)),!0;case"gotpointercapture":return N=v.pointerId,Pa.set(N,Ra(Pa.get(N)||null,a,c,f,g,v)),!0}return!1}function y0(a){var c=zr(a.target);if(c!==null){var f=Fr(c);if(f!==null){if(c=f.tag,c===13){if(c=s0(f),c!==null){a.blockedOn=c,g0(a.priority,function(){f0(f)});return}}else if(c===3&&f.stateNode.current.memoizedState.isDehydrated){a.blockedOn=f.tag===3?f.stateNode.containerInfo:null;return}}}a.blockedOn=null}function Pl(a){if(a.blockedOn!==null)return!1;for(var c=a.targetContainers;0<c.length;){var f=ku(a.domEventName,a.eventSystemFlags,c[0],a.nativeEvent);if(f===null){f=a.nativeEvent;var g=new f.constructor(f.type,f);Jt=g,f.target.dispatchEvent(g),Jt=null}else return c=Va(f),c!==null&&xu(c),a.blockedOn=f,!1;c.shift()}return!0}function j0(a,c,f){Pl(a)&&f.delete(c)}function O3(){yu=!1,tr!==null&&Pl(tr)&&(tr=null),nr!==null&&Pl(nr)&&(nr=null),sr!==null&&Pl(sr)&&(sr=null),Aa.forEach(j0),Pa.forEach(j0)}function Ia(a,c){a.blockedOn===c&&(a.blockedOn=null,yu||(yu=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,O3)))}function Fa(a){function c(v){return Ia(v,a)}if(0<Al.length){Ia(Al[0],a);for(var f=1;f<Al.length;f++){var g=Al[f];g.blockedOn===a&&(g.blockedOn=null)}}for(tr!==null&&Ia(tr,a),nr!==null&&Ia(nr,a),sr!==null&&Ia(sr,a),Aa.forEach(c),Pa.forEach(c),f=0;f<rr.length;f++)g=rr[f],g.blockedOn===a&&(g.blockedOn=null);for(;0<rr.length&&(f=rr[0],f.blockedOn===null);)y0(f),f.blockedOn===null&&rr.shift()}var vi=A.ReactCurrentBatchConfig,Rl=!0;function _3(a,c,f,g){var v=Xe,N=vi.transition;vi.transition=null;try{Xe=1,ju(a,c,f,g)}finally{Xe=v,vi.transition=N}}function D3(a,c,f,g){var v=Xe,N=vi.transition;vi.transition=null;try{Xe=4,ju(a,c,f,g)}finally{Xe=v,vi.transition=N}}function ju(a,c,f,g){if(Rl){var v=ku(a,c,f,g);if(v===null)Lu(a,c,g,Il,f),x0(a,g);else if(M3(v,a,c,f,g))g.stopPropagation();else if(x0(a,g),c&4&&-1<L3.indexOf(a)){for(;v!==null;){var N=Va(v);if(N!==null&&p0(N),N=ku(a,c,f,g),N===null&&Lu(a,c,g,Il,f),N===v)break;v=N}v!==null&&g.stopPropagation()}else Lu(a,c,g,null,f)}}var Il=null;function ku(a,c,f,g){if(Il=null,a=re(g),a=zr(a),a!==null)if(c=Fr(a),c===null)a=null;else if(f=c.tag,f===13){if(a=s0(c),a!==null)return a;a=null}else if(f===3){if(c.stateNode.current.memoizedState.isDehydrated)return c.tag===3?c.stateNode.containerInfo:null;a=null}else c!==a&&(a=null);return Il=a,null}function k0(a){switch(a){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(T3()){case pu:return 1;case c0:return 4;case Sl:case E3:return 16;case d0:return 536870912;default:return 16}default:return 16}}var ir=null,vu=null,Fl=null;function v0(){if(Fl)return Fl;var a,c=vu,f=c.length,g,v="value"in ir?ir.value:ir.textContent,N=v.length;for(a=0;a<f&&c[a]===v[a];a++);var E=f-a;for(g=1;g<=E&&c[f-g]===v[N-g];g++);return Fl=v.slice(a,1<g?1-g:void 0)}function zl(a){var c=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&c===13&&(a=13)):a=c,a===10&&(a=13),32<=a||a===13?a:0}function ql(){return!0}function b0(){return!1}function vn(a){function c(f,g,v,N,E){this._reactName=f,this._targetInst=v,this.type=g,this.nativeEvent=N,this.target=E,this.currentTarget=null;for(var O in a)a.hasOwnProperty(O)&&(f=a[O],this[O]=f?f(N):N[O]);return this.isDefaultPrevented=(N.defaultPrevented!=null?N.defaultPrevented:N.returnValue===!1)?ql:b0,this.isPropagationStopped=b0,this}return R(c.prototype,{preventDefault:function(){this.defaultPrevented=!0;var f=this.nativeEvent;f&&(f.preventDefault?f.preventDefault():typeof f.returnValue!="unknown"&&(f.returnValue=!1),this.isDefaultPrevented=ql)},stopPropagation:function(){var f=this.nativeEvent;f&&(f.stopPropagation?f.stopPropagation():typeof f.cancelBubble!="unknown"&&(f.cancelBubble=!0),this.isPropagationStopped=ql)},persist:function(){},isPersistent:ql}),c}var bi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bu=vn(bi),za=R({},bi,{view:0,detail:0}),B3=vn(za),wu,Nu,qa,Ll=R({},za,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cu,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==qa&&(qa&&a.type==="mousemove"?(wu=a.screenX-qa.screenX,Nu=a.screenY-qa.screenY):Nu=wu=0,qa=a),wu)},movementY:function(a){return"movementY"in a?a.movementY:Nu}}),w0=vn(Ll),W3=R({},Ll,{dataTransfer:0}),U3=vn(W3),H3=R({},za,{relatedTarget:0}),Su=vn(H3),V3=R({},bi,{animationName:0,elapsedTime:0,pseudoElement:0}),K3=vn(V3),Y3=R({},bi,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),G3=vn(Y3),Q3=R({},bi,{data:0}),N0=vn(Q3),Z3={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},X3={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"},J3={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function e5(a){var c=this.nativeEvent;return c.getModifierState?c.getModifierState(a):(a=J3[a])?!!c[a]:!1}function Cu(){return e5}var t5=R({},za,{key:function(a){if(a.key){var c=Z3[a.key]||a.key;if(c!=="Unidentified")return c}return a.type==="keypress"?(a=zl(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?X3[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cu,charCode:function(a){return a.type==="keypress"?zl(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?zl(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),n5=vn(t5),s5=R({},Ll,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),S0=vn(s5),r5=R({},za,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cu}),i5=vn(r5),a5=R({},bi,{propertyName:0,elapsedTime:0,pseudoElement:0}),o5=vn(a5),l5=R({},Ll,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),c5=vn(l5),d5=[9,13,27,32],$u=d&&"CompositionEvent"in window,La=null;d&&"documentMode"in document&&(La=document.documentMode);var u5=d&&"TextEvent"in window&&!La,C0=d&&(!$u||La&&8<La&&11>=La),$0=" ",T0=!1;function E0(a,c){switch(a){case"keyup":return d5.indexOf(c.keyCode)!==-1;case"keydown":return c.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function A0(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var wi=!1;function h5(a,c){switch(a){case"compositionend":return A0(c);case"keypress":return c.which!==32?null:(T0=!0,$0);case"textInput":return a=c.data,a===$0&&T0?null:a;default:return null}}function p5(a,c){if(wi)return a==="compositionend"||!$u&&E0(a,c)?(a=v0(),Fl=vu=ir=null,wi=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(c.ctrlKey||c.altKey||c.metaKey)||c.ctrlKey&&c.altKey){if(c.char&&1<c.char.length)return c.char;if(c.which)return String.fromCharCode(c.which)}return null;case"compositionend":return C0&&c.locale!=="ko"?null:c.data;default:return null}}var f5={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 P0(a){var c=a&&a.nodeName&&a.nodeName.toLowerCase();return c==="input"?!!f5[a.type]:c==="textarea"}function R0(a,c,f,g){X1(g),c=Bl(c,"onChange"),0<c.length&&(f=new bu("onChange","change",null,f,g),a.push({event:f,listeners:c}))}var Ma=null,Oa=null;function m5(a){Q0(a,0)}function Ml(a){var c=Ti(a);if(Xt(c))return a}function g5(a,c){if(a==="change")return c}var I0=!1;if(d){var Tu;if(d){var Eu="oninput"in document;if(!Eu){var F0=document.createElement("div");F0.setAttribute("oninput","return;"),Eu=typeof F0.oninput=="function"}Tu=Eu}else Tu=!1;I0=Tu&&(!document.documentMode||9<document.documentMode)}function z0(){Ma&&(Ma.detachEvent("onpropertychange",q0),Oa=Ma=null)}function q0(a){if(a.propertyName==="value"&&Ml(Oa)){var c=[];R0(c,Oa,a,re(a)),n0(m5,c)}}function x5(a,c,f){a==="focusin"?(z0(),Ma=c,Oa=f,Ma.attachEvent("onpropertychange",q0)):a==="focusout"&&z0()}function y5(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return Ml(Oa)}function j5(a,c){if(a==="click")return Ml(c)}function k5(a,c){if(a==="input"||a==="change")return Ml(c)}function v5(a,c){return a===c&&(a!==0||1/a===1/c)||a!==a&&c!==c}var es=typeof Object.is=="function"?Object.is:v5;function _a(a,c){if(es(a,c))return!0;if(typeof a!="object"||a===null||typeof c!="object"||c===null)return!1;var f=Object.keys(a),g=Object.keys(c);if(f.length!==g.length)return!1;for(g=0;g<f.length;g++){var v=f[g];if(!u.call(c,v)||!es(a[v],c[v]))return!1}return!0}function L0(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function M0(a,c){var f=L0(a);a=0;for(var g;f;){if(f.nodeType===3){if(g=a+f.textContent.length,a<=c&&g>=c)return{node:f,offset:c-a};a=g}e:{for(;f;){if(f.nextSibling){f=f.nextSibling;break e}f=f.parentNode}f=void 0}f=L0(f)}}function O0(a,c){return a&&c?a===c?!0:a&&a.nodeType===3?!1:c&&c.nodeType===3?O0(a,c.parentNode):"contains"in a?a.contains(c):a.compareDocumentPosition?!!(a.compareDocumentPosition(c)&16):!1:!1}function _0(){for(var a=window,c=Fn();c instanceof a.HTMLIFrameElement;){try{var f=typeof c.contentWindow.location.href=="string"}catch{f=!1}if(f)a=c.contentWindow;else break;c=Fn(a.document)}return c}function Au(a){var c=a&&a.nodeName&&a.nodeName.toLowerCase();return c&&(c==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||c==="textarea"||a.contentEditable==="true")}function b5(a){var c=_0(),f=a.focusedElem,g=a.selectionRange;if(c!==f&&f&&f.ownerDocument&&O0(f.ownerDocument.documentElement,f)){if(g!==null&&Au(f)){if(c=g.start,a=g.end,a===void 0&&(a=c),"selectionStart"in f)f.selectionStart=c,f.selectionEnd=Math.min(a,f.value.length);else if(a=(c=f.ownerDocument||document)&&c.defaultView||window,a.getSelection){a=a.getSelection();var v=f.textContent.length,N=Math.min(g.start,v);g=g.end===void 0?N:Math.min(g.end,v),!a.extend&&N>g&&(v=g,g=N,N=v),v=M0(f,N);var E=M0(f,g);v&&E&&(a.rangeCount!==1||a.anchorNode!==v.node||a.anchorOffset!==v.offset||a.focusNode!==E.node||a.focusOffset!==E.offset)&&(c=c.createRange(),c.setStart(v.node,v.offset),a.removeAllRanges(),N>g?(a.addRange(c),a.extend(E.node,E.offset)):(c.setEnd(E.node,E.offset),a.addRange(c)))}}for(c=[],a=f;a=a.parentNode;)a.nodeType===1&&c.push({element:a,left:a.scrollLeft,top:a.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;f<c.length;f++)a=c[f],a.element.scrollLeft=a.left,a.element.scrollTop=a.top}}var w5=d&&"documentMode"in document&&11>=document.documentMode,Ni=null,Pu=null,Da=null,Ru=!1;function D0(a,c,f){var g=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;Ru||Ni==null||Ni!==Fn(g)||(g=Ni,"selectionStart"in g&&Au(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}),Da&&_a(Da,g)||(Da=g,g=Bl(Pu,"onSelect"),0<g.length&&(c=new bu("onSelect","select",null,c,f),a.push({event:c,listeners:g}),c.target=Ni)))}function Ol(a,c){var f={};return f[a.toLowerCase()]=c.toLowerCase(),f["Webkit"+a]="webkit"+c,f["Moz"+a]="moz"+c,f}var Si={animationend:Ol("Animation","AnimationEnd"),animationiteration:Ol("Animation","AnimationIteration"),animationstart:Ol("Animation","AnimationStart"),transitionend:Ol("Transition","TransitionEnd")},Iu={},B0={};d&&(B0=document.createElement("div").style,"AnimationEvent"in window||(delete Si.animationend.animation,delete Si.animationiteration.animation,delete Si.animationstart.animation),"TransitionEvent"in window||delete Si.transitionend.transition);function _l(a){if(Iu[a])return Iu[a];if(!Si[a])return a;var c=Si[a],f;for(f in c)if(c.hasOwnProperty(f)&&f in B0)return Iu[a]=c[f];return a}var W0=_l("animationend"),U0=_l("animationiteration"),H0=_l("animationstart"),V0=_l("transitionend"),K0=new Map,Y0="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 ar(a,c){K0.set(a,c),o(c,[a])}for(var Fu=0;Fu<Y0.length;Fu++){var zu=Y0[Fu],N5=zu.toLowerCase(),S5=zu[0].toUpperCase()+zu.slice(1);ar(N5,"on"+S5)}ar(W0,"onAnimationEnd"),ar(U0,"onAnimationIteration"),ar(H0,"onAnimationStart"),ar("dblclick","onDoubleClick"),ar("focusin","onFocus"),ar("focusout","onBlur"),ar(V0,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("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 Ba="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(" "),C5=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ba));function G0(a,c,f){var g=a.type||"unknown-event";a.currentTarget=f,N3(g,c,void 0,a),a.currentTarget=null}function Q0(a,c){c=(c&4)!==0;for(var f=0;f<a.length;f++){var g=a[f],v=g.event;g=g.listeners;e:{var N=void 0;if(c)for(var E=g.length-1;0<=E;E--){var O=g[E],H=O.instance,X=O.currentTarget;if(O=O.listener,H!==N&&v.isPropagationStopped())break e;G0(v,O,X),N=H}else for(E=0;E<g.length;E++){if(O=g[E],H=O.instance,X=O.currentTarget,O=O.listener,H!==N&&v.isPropagationStopped())break e;G0(v,O,X),N=H}}}if(Nl)throw a=hu,Nl=!1,hu=null,a}function it(a,c){var f=c[Wu];f===void 0&&(f=c[Wu]=new Set);var g=a+"__bubble";f.has(g)||(Z0(c,a,2,!1),f.add(g))}function qu(a,c,f){var g=0;c&&(g|=4),Z0(f,a,g,c)}var Dl="_reactListening"+Math.random().toString(36).slice(2);function Wa(a){if(!a[Dl]){a[Dl]=!0,r.forEach(function(f){f!=="selectionchange"&&(C5.has(f)||qu(f,!1,a),qu(f,!0,a))});var c=a.nodeType===9?a:a.ownerDocument;c===null||c[Dl]||(c[Dl]=!0,qu("selectionchange",!1,c))}}function Z0(a,c,f,g){switch(k0(c)){case 1:var v=_3;break;case 4:v=D3;break;default:v=ju}f=v.bind(null,c,f,a),v=void 0,!uu||c!=="touchstart"&&c!=="touchmove"&&c!=="wheel"||(v=!0),g?v!==void 0?a.addEventListener(c,f,{capture:!0,passive:v}):a.addEventListener(c,f,!0):v!==void 0?a.addEventListener(c,f,{passive:v}):a.addEventListener(c,f,!1)}function Lu(a,c,f,g,v){var N=g;if((c&1)===0&&(c&2)===0&&g!==null)e:for(;;){if(g===null)return;var E=g.tag;if(E===3||E===4){var O=g.stateNode.containerInfo;if(O===v||O.nodeType===8&&O.parentNode===v)break;if(E===4)for(E=g.return;E!==null;){var H=E.tag;if((H===3||H===4)&&(H=E.stateNode.containerInfo,H===v||H.nodeType===8&&H.parentNode===v))return;E=E.return}for(;O!==null;){if(E=zr(O),E===null)return;if(H=E.tag,H===5||H===6){g=N=E;continue e}O=O.parentNode}}g=g.return}n0(function(){var X=N,le=re(f),de=[];e:{var ae=K0.get(a);if(ae!==void 0){var je=bu,be=a;switch(a){case"keypress":if(zl(f)===0)break e;case"keydown":case"keyup":je=n5;break;case"focusin":be="focus",je=Su;break;case"focusout":be="blur",je=Su;break;case"beforeblur":case"afterblur":je=Su;break;case"click":if(f.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":je=w0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":je=U3;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":je=i5;break;case W0:case U0:case H0:je=K3;break;case V0:je=o5;break;case"scroll":je=B3;break;case"wheel":je=c5;break;case"copy":case"cut":case"paste":je=G3;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":je=S0}var Se=(c&4)!==0,kt=!Se&&a==="scroll",Q=Se?ae!==null?ae+"Capture":null:ae;Se=[];for(var K=X,Z;K!==null;){Z=K;var pe=Z.stateNode;if(Z.tag===5&&pe!==null&&(Z=pe,Q!==null&&(pe=Sa(K,Q),pe!=null&&Se.push(Ua(K,pe,Z)))),kt)break;K=K.return}0<Se.length&&(ae=new je(ae,be,null,f,le),de.push({event:ae,listeners:Se}))}}if((c&7)===0){e:{if(ae=a==="mouseover"||a==="pointerover",je=a==="mouseout"||a==="pointerout",ae&&f!==Jt&&(be=f.relatedTarget||f.fromElement)&&(zr(be)||be[qs]))break e;if((je||ae)&&(ae=le.window===le?le:(ae=le.ownerDocument)?ae.defaultView||ae.parentWindow:window,je?(be=f.relatedTarget||f.toElement,je=X,be=be?zr(be):null,be!==null&&(kt=Fr(be),be!==kt||be.tag!==5&&be.tag!==6)&&(be=null)):(je=null,be=X),je!==be)){if(Se=w0,pe="onMouseLeave",Q="onMouseEnter",K="mouse",(a==="pointerout"||a==="pointerover")&&(Se=S0,pe="onPointerLeave",Q="onPointerEnter",K="pointer"),kt=je==null?ae:Ti(je),Z=be==null?ae:Ti(be),ae=new Se(pe,K+"leave",je,f,le),ae.target=kt,ae.relatedTarget=Z,pe=null,zr(le)===X&&(Se=new Se(Q,K+"enter",be,f,le),Se.target=Z,Se.relatedTarget=kt,pe=Se),kt=pe,je&&be)t:{for(Se=je,Q=be,K=0,Z=Se;Z;Z=Ci(Z))K++;for(Z=0,pe=Q;pe;pe=Ci(pe))Z++;for(;0<K-Z;)Se=Ci(Se),K--;for(;0<Z-K;)Q=Ci(Q),Z--;for(;K--;){if(Se===Q||Q!==null&&Se===Q.alternate)break t;Se=Ci(Se),Q=Ci(Q)}Se=null}else Se=null;je!==null&&X0(de,ae,je,Se,!1),be!==null&&kt!==null&&X0(de,kt,be,Se,!0)}}e:{if(ae=X?Ti(X):window,je=ae.nodeName&&ae.nodeName.toLowerCase(),je==="select"||je==="input"&&ae.type==="file")var Ce=g5;else if(P0(ae))if(I0)Ce=k5;else{Ce=y5;var Ae=x5}else(je=ae.nodeName)&&je.toLowerCase()==="input"&&(ae.type==="checkbox"||ae.type==="radio")&&(Ce=j5);if(Ce&&(Ce=Ce(a,X))){R0(de,Ce,f,le);break e}Ae&&Ae(a,ae,X),a==="focusout"&&(Ae=ae._wrapperState)&&Ae.controlled&&ae.type==="number"&&Mt(ae,"number",ae.value)}switch(Ae=X?Ti(X):window,a){case"focusin":(P0(Ae)||Ae.contentEditable==="true")&&(Ni=Ae,Pu=X,Da=null);break;case"focusout":Da=Pu=Ni=null;break;case"mousedown":Ru=!0;break;case"contextmenu":case"mouseup":case"dragend":Ru=!1,D0(de,f,le);break;case"selectionchange":if(w5)break;case"keydown":case"keyup":D0(de,f,le)}var Pe;if($u)e:{switch(a){case"compositionstart":var Ie="onCompositionStart";break e;case"compositionend":Ie="onCompositionEnd";break e;case"compositionupdate":Ie="onCompositionUpdate";break e}Ie=void 0}else wi?E0(a,f)&&(Ie="onCompositionEnd"):a==="keydown"&&f.keyCode===229&&(Ie="onCompositionStart");Ie&&(C0&&f.locale!=="ko"&&(wi||Ie!=="onCompositionStart"?Ie==="onCompositionEnd"&&wi&&(Pe=v0()):(ir=le,vu="value"in ir?ir.value:ir.textContent,wi=!0)),Ae=Bl(X,Ie),0<Ae.length&&(Ie=new N0(Ie,a,null,f,le),de.push({event:Ie,listeners:Ae}),Pe?Ie.data=Pe:(Pe=A0(f),Pe!==null&&(Ie.data=Pe)))),(Pe=u5?h5(a,f):p5(a,f))&&(X=Bl(X,"onBeforeInput"),0<X.length&&(le=new N0("onBeforeInput","beforeinput",null,f,le),de.push({event:le,listeners:X}),le.data=Pe))}Q0(de,c)})}function Ua(a,c,f){return{instance:a,listener:c,currentTarget:f}}function Bl(a,c){for(var f=c+"Capture",g=[];a!==null;){var v=a,N=v.stateNode;v.tag===5&&N!==null&&(v=N,N=Sa(a,f),N!=null&&g.unshift(Ua(a,N,v)),N=Sa(a,c),N!=null&&g.push(Ua(a,N,v))),a=a.return}return g}function Ci(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5);return a||null}function X0(a,c,f,g,v){for(var N=c._reactName,E=[];f!==null&&f!==g;){var O=f,H=O.alternate,X=O.stateNode;if(H!==null&&H===g)break;O.tag===5&&X!==null&&(O=X,v?(H=Sa(f,N),H!=null&&E.unshift(Ua(f,H,O))):v||(H=Sa(f,N),H!=null&&E.push(Ua(f,H,O)))),f=f.return}E.length!==0&&a.push({event:c,listeners:E})}var $5=/\r\n?/g,T5=/\u0000|\uFFFD/g;function J0(a){return(typeof a=="string"?a:""+a).replace($5,`
|
|
38
|
-
`).replace(T5,"")}function Wl(a,c,f){if(c=J0(c),J0(a)!==c&&f)throw Error(s(425))}function Ul(){}var Mu=null,Ou=null;function _u(a,c){return a==="textarea"||a==="noscript"||typeof c.children=="string"||typeof c.children=="number"||typeof c.dangerouslySetInnerHTML=="object"&&c.dangerouslySetInnerHTML!==null&&c.dangerouslySetInnerHTML.__html!=null}var Du=typeof setTimeout=="function"?setTimeout:void 0,E5=typeof clearTimeout=="function"?clearTimeout:void 0,eg=typeof Promise=="function"?Promise:void 0,A5=typeof queueMicrotask=="function"?queueMicrotask:typeof eg<"u"?function(a){return eg.resolve(null).then(a).catch(P5)}:Du;function P5(a){setTimeout(function(){throw a})}function Bu(a,c){var f=c,g=0;do{var v=f.nextSibling;if(a.removeChild(f),v&&v.nodeType===8)if(f=v.data,f==="/$"){if(g===0){a.removeChild(v),Fa(c);return}g--}else f!=="$"&&f!=="$?"&&f!=="$!"||g++;f=v}while(f);Fa(c)}function or(a){for(;a!=null;a=a.nextSibling){var c=a.nodeType;if(c===1||c===3)break;if(c===8){if(c=a.data,c==="$"||c==="$!"||c==="$?")break;if(c==="/$")return null}}return a}function tg(a){a=a.previousSibling;for(var c=0;a;){if(a.nodeType===8){var f=a.data;if(f==="$"||f==="$!"||f==="$?"){if(c===0)return a;c--}else f==="/$"&&c++}a=a.previousSibling}return null}var $i=Math.random().toString(36).slice(2),js="__reactFiber$"+$i,Ha="__reactProps$"+$i,qs="__reactContainer$"+$i,Wu="__reactEvents$"+$i,R5="__reactListeners$"+$i,I5="__reactHandles$"+$i;function zr(a){var c=a[js];if(c)return c;for(var f=a.parentNode;f;){if(c=f[qs]||f[js]){if(f=c.alternate,c.child!==null||f!==null&&f.child!==null)for(a=tg(a);a!==null;){if(f=a[js])return f;a=tg(a)}return c}a=f,f=a.parentNode}return null}function Va(a){return a=a[js]||a[qs],!a||a.tag!==5&&a.tag!==6&&a.tag!==13&&a.tag!==3?null:a}function Ti(a){if(a.tag===5||a.tag===6)return a.stateNode;throw Error(s(33))}function Hl(a){return a[Ha]||null}var Uu=[],Ei=-1;function lr(a){return{current:a}}function at(a){0>Ei||(a.current=Uu[Ei],Uu[Ei]=null,Ei--)}function tt(a,c){Ei++,Uu[Ei]=a.current,a.current=c}var cr={},Bt=lr(cr),on=lr(!1),qr=cr;function Ai(a,c){var f=a.type.contextTypes;if(!f)return cr;var g=a.stateNode;if(g&&g.__reactInternalMemoizedUnmaskedChildContext===c)return g.__reactInternalMemoizedMaskedChildContext;var v={},N;for(N in f)v[N]=c[N];return g&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=c,a.__reactInternalMemoizedMaskedChildContext=v),v}function ln(a){return a=a.childContextTypes,a!=null}function Vl(){at(on),at(Bt)}function ng(a,c,f){if(Bt.current!==cr)throw Error(s(168));tt(Bt,c),tt(on,f)}function sg(a,c,f){var g=a.stateNode;if(c=c.childContextTypes,typeof g.getChildContext!="function")return f;g=g.getChildContext();for(var v in g)if(!(v in c))throw Error(s(108,Fe(a)||"Unknown",v));return R({},f,g)}function Kl(a){return a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||cr,qr=Bt.current,tt(Bt,a),tt(on,on.current),!0}function rg(a,c,f){var g=a.stateNode;if(!g)throw Error(s(169));f?(a=sg(a,c,qr),g.__reactInternalMemoizedMergedChildContext=a,at(on),at(Bt),tt(Bt,a)):at(on),tt(on,f)}var Ls=null,Yl=!1,Hu=!1;function ig(a){Ls===null?Ls=[a]:Ls.push(a)}function F5(a){Yl=!0,ig(a)}function dr(){if(!Hu&&Ls!==null){Hu=!0;var a=0,c=Xe;try{var f=Ls;for(Xe=1;a<f.length;a++){var g=f[a];do g=g(!0);while(g!==null)}Ls=null,Yl=!1}catch(v){throw Ls!==null&&(Ls=Ls.slice(a+1)),o0(pu,dr),v}finally{Xe=c,Hu=!1}}return null}var Pi=[],Ri=0,Gl=null,Ql=0,Mn=[],On=0,Lr=null,Ms=1,Os="";function Mr(a,c){Pi[Ri++]=Ql,Pi[Ri++]=Gl,Gl=a,Ql=c}function ag(a,c,f){Mn[On++]=Ms,Mn[On++]=Os,Mn[On++]=Lr,Lr=a;var g=Ms;a=Os;var v=32-Jn(g)-1;g&=~(1<<v),f+=1;var N=32-Jn(c)+v;if(30<N){var E=v-v%5;N=(g&(1<<E)-1).toString(32),g>>=E,v-=E,Ms=1<<32-Jn(c)+v|f<<v|g,Os=N+a}else Ms=1<<N|f<<v|g,Os=a}function Vu(a){a.return!==null&&(Mr(a,1),ag(a,1,0))}function Ku(a){for(;a===Gl;)Gl=Pi[--Ri],Pi[Ri]=null,Ql=Pi[--Ri],Pi[Ri]=null;for(;a===Lr;)Lr=Mn[--On],Mn[On]=null,Os=Mn[--On],Mn[On]=null,Ms=Mn[--On],Mn[On]=null}var bn=null,wn=null,lt=!1,ts=null;function og(a,c){var f=Wn(5,null,null,0);f.elementType="DELETED",f.stateNode=c,f.return=a,c=a.deletions,c===null?(a.deletions=[f],a.flags|=16):c.push(f)}function lg(a,c){switch(a.tag){case 5:var f=a.type;return c=c.nodeType!==1||f.toLowerCase()!==c.nodeName.toLowerCase()?null:c,c!==null?(a.stateNode=c,bn=a,wn=or(c.firstChild),!0):!1;case 6:return c=a.pendingProps===""||c.nodeType!==3?null:c,c!==null?(a.stateNode=c,bn=a,wn=null,!0):!1;case 13:return c=c.nodeType!==8?null:c,c!==null?(f=Lr!==null?{id:Ms,overflow:Os}:null,a.memoizedState={dehydrated:c,treeContext:f,retryLane:1073741824},f=Wn(18,null,null,0),f.stateNode=c,f.return=a,a.child=f,bn=a,wn=null,!0):!1;default:return!1}}function Yu(a){return(a.mode&1)!==0&&(a.flags&128)===0}function Gu(a){if(lt){var c=wn;if(c){var f=c;if(!lg(a,c)){if(Yu(a))throw Error(s(418));c=or(f.nextSibling);var g=bn;c&&lg(a,c)?og(g,f):(a.flags=a.flags&-4097|2,lt=!1,bn=a)}}else{if(Yu(a))throw Error(s(418));a.flags=a.flags&-4097|2,lt=!1,bn=a}}}function cg(a){for(a=a.return;a!==null&&a.tag!==5&&a.tag!==3&&a.tag!==13;)a=a.return;bn=a}function Zl(a){if(a!==bn)return!1;if(!lt)return cg(a),lt=!0,!1;var c;if((c=a.tag!==3)&&!(c=a.tag!==5)&&(c=a.type,c=c!=="head"&&c!=="body"&&!_u(a.type,a.memoizedProps)),c&&(c=wn)){if(Yu(a))throw dg(),Error(s(418));for(;c;)og(a,c),c=or(c.nextSibling)}if(cg(a),a.tag===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(s(317));e:{for(a=a.nextSibling,c=0;a;){if(a.nodeType===8){var f=a.data;if(f==="/$"){if(c===0){wn=or(a.nextSibling);break e}c--}else f!=="$"&&f!=="$!"&&f!=="$?"||c++}a=a.nextSibling}wn=null}}else wn=bn?or(a.stateNode.nextSibling):null;return!0}function dg(){for(var a=wn;a;)a=or(a.nextSibling)}function Ii(){wn=bn=null,lt=!1}function Qu(a){ts===null?ts=[a]:ts.push(a)}var z5=A.ReactCurrentBatchConfig;function Ka(a,c,f){if(a=f.ref,a!==null&&typeof a!="function"&&typeof a!="object"){if(f._owner){if(f=f._owner,f){if(f.tag!==1)throw Error(s(309));var g=f.stateNode}if(!g)throw Error(s(147,a));var v=g,N=""+a;return c!==null&&c.ref!==null&&typeof c.ref=="function"&&c.ref._stringRef===N?c.ref:(c=function(E){var O=v.refs;E===null?delete O[N]:O[N]=E},c._stringRef=N,c)}if(typeof a!="string")throw Error(s(284));if(!f._owner)throw Error(s(290,a))}return a}function Xl(a,c){throw a=Object.prototype.toString.call(c),Error(s(31,a==="[object Object]"?"object with keys {"+Object.keys(c).join(", ")+"}":a))}function ug(a){var c=a._init;return c(a._payload)}function hg(a){function c(Q,K){if(a){var Z=Q.deletions;Z===null?(Q.deletions=[K],Q.flags|=16):Z.push(K)}}function f(Q,K){if(!a)return null;for(;K!==null;)c(Q,K),K=K.sibling;return null}function g(Q,K){for(Q=new Map;K!==null;)K.key!==null?Q.set(K.key,K):Q.set(K.index,K),K=K.sibling;return Q}function v(Q,K){return Q=yr(Q,K),Q.index=0,Q.sibling=null,Q}function N(Q,K,Z){return Q.index=Z,a?(Z=Q.alternate,Z!==null?(Z=Z.index,Z<K?(Q.flags|=2,K):Z):(Q.flags|=2,K)):(Q.flags|=1048576,K)}function E(Q){return a&&Q.alternate===null&&(Q.flags|=2),Q}function O(Q,K,Z,pe){return K===null||K.tag!==6?(K=Dh(Z,Q.mode,pe),K.return=Q,K):(K=v(K,Z),K.return=Q,K)}function H(Q,K,Z,pe){var Ce=Z.type;return Ce===P?le(Q,K,Z.props.children,pe,Z.key):K!==null&&(K.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===ce&&ug(Ce)===K.type)?(pe=v(K,Z.props),pe.ref=Ka(Q,K,Z),pe.return=Q,pe):(pe=bc(Z.type,Z.key,Z.props,null,Q.mode,pe),pe.ref=Ka(Q,K,Z),pe.return=Q,pe)}function X(Q,K,Z,pe){return K===null||K.tag!==4||K.stateNode.containerInfo!==Z.containerInfo||K.stateNode.implementation!==Z.implementation?(K=Bh(Z,Q.mode,pe),K.return=Q,K):(K=v(K,Z.children||[]),K.return=Q,K)}function le(Q,K,Z,pe,Ce){return K===null||K.tag!==7?(K=Vr(Z,Q.mode,pe,Ce),K.return=Q,K):(K=v(K,Z),K.return=Q,K)}function de(Q,K,Z){if(typeof K=="string"&&K!==""||typeof K=="number")return K=Dh(""+K,Q.mode,Z),K.return=Q,K;if(typeof K=="object"&&K!==null){switch(K.$$typeof){case D:return Z=bc(K.type,K.key,K.props,null,Q.mode,Z),Z.ref=Ka(Q,null,K),Z.return=Q,Z;case $:return K=Bh(K,Q.mode,Z),K.return=Q,K;case ce:var pe=K._init;return de(Q,pe(K._payload),Z)}if(yt(K)||se(K))return K=Vr(K,Q.mode,Z,null),K.return=Q,K;Xl(Q,K)}return null}function ae(Q,K,Z,pe){var Ce=K!==null?K.key:null;if(typeof Z=="string"&&Z!==""||typeof Z=="number")return Ce!==null?null:O(Q,K,""+Z,pe);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case D:return Z.key===Ce?H(Q,K,Z,pe):null;case $:return Z.key===Ce?X(Q,K,Z,pe):null;case ce:return Ce=Z._init,ae(Q,K,Ce(Z._payload),pe)}if(yt(Z)||se(Z))return Ce!==null?null:le(Q,K,Z,pe,null);Xl(Q,Z)}return null}function je(Q,K,Z,pe,Ce){if(typeof pe=="string"&&pe!==""||typeof pe=="number")return Q=Q.get(Z)||null,O(K,Q,""+pe,Ce);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case D:return Q=Q.get(pe.key===null?Z:pe.key)||null,H(K,Q,pe,Ce);case $:return Q=Q.get(pe.key===null?Z:pe.key)||null,X(K,Q,pe,Ce);case ce:var Ae=pe._init;return je(Q,K,Z,Ae(pe._payload),Ce)}if(yt(pe)||se(pe))return Q=Q.get(Z)||null,le(K,Q,pe,Ce,null);Xl(K,pe)}return null}function be(Q,K,Z,pe){for(var Ce=null,Ae=null,Pe=K,Ie=K=0,zt=null;Pe!==null&&Ie<Z.length;Ie++){Pe.index>Ie?(zt=Pe,Pe=null):zt=Pe.sibling;var Qe=ae(Q,Pe,Z[Ie],pe);if(Qe===null){Pe===null&&(Pe=zt);break}a&&Pe&&Qe.alternate===null&&c(Q,Pe),K=N(Qe,K,Ie),Ae===null?Ce=Qe:Ae.sibling=Qe,Ae=Qe,Pe=zt}if(Ie===Z.length)return f(Q,Pe),lt&&Mr(Q,Ie),Ce;if(Pe===null){for(;Ie<Z.length;Ie++)Pe=de(Q,Z[Ie],pe),Pe!==null&&(K=N(Pe,K,Ie),Ae===null?Ce=Pe:Ae.sibling=Pe,Ae=Pe);return lt&&Mr(Q,Ie),Ce}for(Pe=g(Q,Pe);Ie<Z.length;Ie++)zt=je(Pe,Q,Ie,Z[Ie],pe),zt!==null&&(a&&zt.alternate!==null&&Pe.delete(zt.key===null?Ie:zt.key),K=N(zt,K,Ie),Ae===null?Ce=zt:Ae.sibling=zt,Ae=zt);return a&&Pe.forEach(function(jr){return c(Q,jr)}),lt&&Mr(Q,Ie),Ce}function Se(Q,K,Z,pe){var Ce=se(Z);if(typeof Ce!="function")throw Error(s(150));if(Z=Ce.call(Z),Z==null)throw Error(s(151));for(var Ae=Ce=null,Pe=K,Ie=K=0,zt=null,Qe=Z.next();Pe!==null&&!Qe.done;Ie++,Qe=Z.next()){Pe.index>Ie?(zt=Pe,Pe=null):zt=Pe.sibling;var jr=ae(Q,Pe,Qe.value,pe);if(jr===null){Pe===null&&(Pe=zt);break}a&&Pe&&jr.alternate===null&&c(Q,Pe),K=N(jr,K,Ie),Ae===null?Ce=jr:Ae.sibling=jr,Ae=jr,Pe=zt}if(Qe.done)return f(Q,Pe),lt&&Mr(Q,Ie),Ce;if(Pe===null){for(;!Qe.done;Ie++,Qe=Z.next())Qe=de(Q,Qe.value,pe),Qe!==null&&(K=N(Qe,K,Ie),Ae===null?Ce=Qe:Ae.sibling=Qe,Ae=Qe);return lt&&Mr(Q,Ie),Ce}for(Pe=g(Q,Pe);!Qe.done;Ie++,Qe=Z.next())Qe=je(Pe,Q,Ie,Qe.value,pe),Qe!==null&&(a&&Qe.alternate!==null&&Pe.delete(Qe.key===null?Ie:Qe.key),K=N(Qe,K,Ie),Ae===null?Ce=Qe:Ae.sibling=Qe,Ae=Qe);return a&&Pe.forEach(function(f6){return c(Q,f6)}),lt&&Mr(Q,Ie),Ce}function kt(Q,K,Z,pe){if(typeof Z=="object"&&Z!==null&&Z.type===P&&Z.key===null&&(Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case D:e:{for(var Ce=Z.key,Ae=K;Ae!==null;){if(Ae.key===Ce){if(Ce=Z.type,Ce===P){if(Ae.tag===7){f(Q,Ae.sibling),K=v(Ae,Z.props.children),K.return=Q,Q=K;break e}}else if(Ae.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===ce&&ug(Ce)===Ae.type){f(Q,Ae.sibling),K=v(Ae,Z.props),K.ref=Ka(Q,Ae,Z),K.return=Q,Q=K;break e}f(Q,Ae);break}else c(Q,Ae);Ae=Ae.sibling}Z.type===P?(K=Vr(Z.props.children,Q.mode,pe,Z.key),K.return=Q,Q=K):(pe=bc(Z.type,Z.key,Z.props,null,Q.mode,pe),pe.ref=Ka(Q,K,Z),pe.return=Q,Q=pe)}return E(Q);case $:e:{for(Ae=Z.key;K!==null;){if(K.key===Ae)if(K.tag===4&&K.stateNode.containerInfo===Z.containerInfo&&K.stateNode.implementation===Z.implementation){f(Q,K.sibling),K=v(K,Z.children||[]),K.return=Q,Q=K;break e}else{f(Q,K);break}else c(Q,K);K=K.sibling}K=Bh(Z,Q.mode,pe),K.return=Q,Q=K}return E(Q);case ce:return Ae=Z._init,kt(Q,K,Ae(Z._payload),pe)}if(yt(Z))return be(Q,K,Z,pe);if(se(Z))return Se(Q,K,Z,pe);Xl(Q,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"?(Z=""+Z,K!==null&&K.tag===6?(f(Q,K.sibling),K=v(K,Z),K.return=Q,Q=K):(f(Q,K),K=Dh(Z,Q.mode,pe),K.return=Q,Q=K),E(Q)):f(Q,K)}return kt}var Fi=hg(!0),pg=hg(!1),Jl=lr(null),ec=null,zi=null,Zu=null;function Xu(){Zu=zi=ec=null}function Ju(a){var c=Jl.current;at(Jl),a._currentValue=c}function eh(a,c,f){for(;a!==null;){var g=a.alternate;if((a.childLanes&c)!==c?(a.childLanes|=c,g!==null&&(g.childLanes|=c)):g!==null&&(g.childLanes&c)!==c&&(g.childLanes|=c),a===f)break;a=a.return}}function qi(a,c){ec=a,Zu=zi=null,a=a.dependencies,a!==null&&a.firstContext!==null&&((a.lanes&c)!==0&&(cn=!0),a.firstContext=null)}function _n(a){var c=a._currentValue;if(Zu!==a)if(a={context:a,memoizedValue:c,next:null},zi===null){if(ec===null)throw Error(s(308));zi=a,ec.dependencies={lanes:0,firstContext:a}}else zi=zi.next=a;return c}var Or=null;function th(a){Or===null?Or=[a]:Or.push(a)}function fg(a,c,f,g){var v=c.interleaved;return v===null?(f.next=f,th(c)):(f.next=v.next,v.next=f),c.interleaved=f,_s(a,g)}function _s(a,c){a.lanes|=c;var f=a.alternate;for(f!==null&&(f.lanes|=c),f=a,a=a.return;a!==null;)a.childLanes|=c,f=a.alternate,f!==null&&(f.childLanes|=c),f=a,a=a.return;return f.tag===3?f.stateNode:null}var ur=!1;function nh(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function mg(a,c){a=a.updateQueue,c.updateQueue===a&&(c.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function Ds(a,c){return{eventTime:a,lane:c,tag:0,payload:null,callback:null,next:null}}function hr(a,c,f){var g=a.updateQueue;if(g===null)return null;if(g=g.shared,(Ye&2)!==0){var v=g.pending;return v===null?c.next=c:(c.next=v.next,v.next=c),g.pending=c,_s(a,f)}return v=g.interleaved,v===null?(c.next=c,th(g)):(c.next=v.next,v.next=c),g.interleaved=c,_s(a,f)}function tc(a,c,f){if(c=c.updateQueue,c!==null&&(c=c.shared,(f&4194240)!==0)){var g=c.lanes;g&=a.pendingLanes,f|=g,c.lanes=f,gu(a,f)}}function gg(a,c){var f=a.updateQueue,g=a.alternate;if(g!==null&&(g=g.updateQueue,f===g)){var v=null,N=null;if(f=f.firstBaseUpdate,f!==null){do{var E={eventTime:f.eventTime,lane:f.lane,tag:f.tag,payload:f.payload,callback:f.callback,next:null};N===null?v=N=E:N=N.next=E,f=f.next}while(f!==null);N===null?v=N=c:N=N.next=c}else v=N=c;f={baseState:g.baseState,firstBaseUpdate:v,lastBaseUpdate:N,shared:g.shared,effects:g.effects},a.updateQueue=f;return}a=f.lastBaseUpdate,a===null?f.firstBaseUpdate=c:a.next=c,f.lastBaseUpdate=c}function nc(a,c,f,g){var v=a.updateQueue;ur=!1;var N=v.firstBaseUpdate,E=v.lastBaseUpdate,O=v.shared.pending;if(O!==null){v.shared.pending=null;var H=O,X=H.next;H.next=null,E===null?N=X:E.next=X,E=H;var le=a.alternate;le!==null&&(le=le.updateQueue,O=le.lastBaseUpdate,O!==E&&(O===null?le.firstBaseUpdate=X:O.next=X,le.lastBaseUpdate=H))}if(N!==null){var de=v.baseState;E=0,le=X=H=null,O=N;do{var ae=O.lane,je=O.eventTime;if((g&ae)===ae){le!==null&&(le=le.next={eventTime:je,lane:0,tag:O.tag,payload:O.payload,callback:O.callback,next:null});e:{var be=a,Se=O;switch(ae=c,je=f,Se.tag){case 1:if(be=Se.payload,typeof be=="function"){de=be.call(je,de,ae);break e}de=be;break e;case 3:be.flags=be.flags&-65537|128;case 0:if(be=Se.payload,ae=typeof be=="function"?be.call(je,de,ae):be,ae==null)break e;de=R({},de,ae);break e;case 2:ur=!0}}O.callback!==null&&O.lane!==0&&(a.flags|=64,ae=v.effects,ae===null?v.effects=[O]:ae.push(O))}else je={eventTime:je,lane:ae,tag:O.tag,payload:O.payload,callback:O.callback,next:null},le===null?(X=le=je,H=de):le=le.next=je,E|=ae;if(O=O.next,O===null){if(O=v.shared.pending,O===null)break;ae=O,O=ae.next,ae.next=null,v.lastBaseUpdate=ae,v.shared.pending=null}}while(!0);if(le===null&&(H=de),v.baseState=H,v.firstBaseUpdate=X,v.lastBaseUpdate=le,c=v.shared.interleaved,c!==null){v=c;do E|=v.lane,v=v.next;while(v!==c)}else N===null&&(v.shared.lanes=0);Br|=E,a.lanes=E,a.memoizedState=de}}function xg(a,c,f){if(a=c.effects,c.effects=null,a!==null)for(c=0;c<a.length;c++){var g=a[c],v=g.callback;if(v!==null){if(g.callback=null,g=f,typeof v!="function")throw Error(s(191,v));v.call(g)}}}var Ya={},ks=lr(Ya),Ga=lr(Ya),Qa=lr(Ya);function _r(a){if(a===Ya)throw Error(s(174));return a}function sh(a,c){switch(tt(Qa,c),tt(Ga,a),tt(ks,Ya),a=c.nodeType,a){case 9:case 11:c=(c=c.documentElement)?c.namespaceURI:ue(null,"");break;default:a=a===8?c.parentNode:c,c=a.namespaceURI||null,a=a.tagName,c=ue(c,a)}at(ks),tt(ks,c)}function Li(){at(ks),at(Ga),at(Qa)}function yg(a){_r(Qa.current);var c=_r(ks.current),f=ue(c,a.type);c!==f&&(tt(Ga,a),tt(ks,f))}function rh(a){Ga.current===a&&(at(ks),at(Ga))}var ut=lr(0);function sc(a){for(var c=a;c!==null;){if(c.tag===13){var f=c.memoizedState;if(f!==null&&(f=f.dehydrated,f===null||f.data==="$?"||f.data==="$!"))return c}else if(c.tag===19&&c.memoizedProps.revealOrder!==void 0){if((c.flags&128)!==0)return c}else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===a)break;for(;c.sibling===null;){if(c.return===null||c.return===a)return null;c=c.return}c.sibling.return=c.return,c=c.sibling}return null}var ih=[];function ah(){for(var a=0;a<ih.length;a++)ih[a]._workInProgressVersionPrimary=null;ih.length=0}var rc=A.ReactCurrentDispatcher,oh=A.ReactCurrentBatchConfig,Dr=0,ht=null,Tt=null,It=null,ic=!1,Za=!1,Xa=0,q5=0;function Wt(){throw Error(s(321))}function lh(a,c){if(c===null)return!1;for(var f=0;f<c.length&&f<a.length;f++)if(!es(a[f],c[f]))return!1;return!0}function ch(a,c,f,g,v,N){if(Dr=N,ht=c,c.memoizedState=null,c.updateQueue=null,c.lanes=0,rc.current=a===null||a.memoizedState===null?_5:D5,a=f(g,v),Za){N=0;do{if(Za=!1,Xa=0,25<=N)throw Error(s(301));N+=1,It=Tt=null,c.updateQueue=null,rc.current=B5,a=f(g,v)}while(Za)}if(rc.current=lc,c=Tt!==null&&Tt.next!==null,Dr=0,It=Tt=ht=null,ic=!1,c)throw Error(s(300));return a}function dh(){var a=Xa!==0;return Xa=0,a}function vs(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return It===null?ht.memoizedState=It=a:It=It.next=a,It}function Dn(){if(Tt===null){var a=ht.alternate;a=a!==null?a.memoizedState:null}else a=Tt.next;var c=It===null?ht.memoizedState:It.next;if(c!==null)It=c,Tt=a;else{if(a===null)throw Error(s(310));Tt=a,a={memoizedState:Tt.memoizedState,baseState:Tt.baseState,baseQueue:Tt.baseQueue,queue:Tt.queue,next:null},It===null?ht.memoizedState=It=a:It=It.next=a}return It}function Ja(a,c){return typeof c=="function"?c(a):c}function uh(a){var c=Dn(),f=c.queue;if(f===null)throw Error(s(311));f.lastRenderedReducer=a;var g=Tt,v=g.baseQueue,N=f.pending;if(N!==null){if(v!==null){var E=v.next;v.next=N.next,N.next=E}g.baseQueue=v=N,f.pending=null}if(v!==null){N=v.next,g=g.baseState;var O=E=null,H=null,X=N;do{var le=X.lane;if((Dr&le)===le)H!==null&&(H=H.next={lane:0,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null}),g=X.hasEagerState?X.eagerState:a(g,X.action);else{var de={lane:le,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null};H===null?(O=H=de,E=g):H=H.next=de,ht.lanes|=le,Br|=le}X=X.next}while(X!==null&&X!==N);H===null?E=g:H.next=O,es(g,c.memoizedState)||(cn=!0),c.memoizedState=g,c.baseState=E,c.baseQueue=H,f.lastRenderedState=g}if(a=f.interleaved,a!==null){v=a;do N=v.lane,ht.lanes|=N,Br|=N,v=v.next;while(v!==a)}else v===null&&(f.lanes=0);return[c.memoizedState,f.dispatch]}function hh(a){var c=Dn(),f=c.queue;if(f===null)throw Error(s(311));f.lastRenderedReducer=a;var g=f.dispatch,v=f.pending,N=c.memoizedState;if(v!==null){f.pending=null;var E=v=v.next;do N=a(N,E.action),E=E.next;while(E!==v);es(N,c.memoizedState)||(cn=!0),c.memoizedState=N,c.baseQueue===null&&(c.baseState=N),f.lastRenderedState=N}return[N,g]}function jg(){}function kg(a,c){var f=ht,g=Dn(),v=c(),N=!es(g.memoizedState,v);if(N&&(g.memoizedState=v,cn=!0),g=g.queue,ph(wg.bind(null,f,g,a),[a]),g.getSnapshot!==c||N||It!==null&&It.memoizedState.tag&1){if(f.flags|=2048,eo(9,bg.bind(null,f,g,v,c),void 0,null),Ft===null)throw Error(s(349));(Dr&30)!==0||vg(f,c,v)}return v}function vg(a,c,f){a.flags|=16384,a={getSnapshot:c,value:f},c=ht.updateQueue,c===null?(c={lastEffect:null,stores:null},ht.updateQueue=c,c.stores=[a]):(f=c.stores,f===null?c.stores=[a]:f.push(a))}function bg(a,c,f,g){c.value=f,c.getSnapshot=g,Ng(c)&&Sg(a)}function wg(a,c,f){return f(function(){Ng(c)&&Sg(a)})}function Ng(a){var c=a.getSnapshot;a=a.value;try{var f=c();return!es(a,f)}catch{return!0}}function Sg(a){var c=_s(a,1);c!==null&&is(c,a,1,-1)}function Cg(a){var c=vs();return typeof a=="function"&&(a=a()),c.memoizedState=c.baseState=a,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ja,lastRenderedState:a},c.queue=a,a=a.dispatch=O5.bind(null,ht,a),[c.memoizedState,a]}function eo(a,c,f,g){return a={tag:a,create:c,destroy:f,deps:g,next:null},c=ht.updateQueue,c===null?(c={lastEffect:null,stores:null},ht.updateQueue=c,c.lastEffect=a.next=a):(f=c.lastEffect,f===null?c.lastEffect=a.next=a:(g=f.next,f.next=a,a.next=g,c.lastEffect=a)),a}function $g(){return Dn().memoizedState}function ac(a,c,f,g){var v=vs();ht.flags|=a,v.memoizedState=eo(1|c,f,void 0,g===void 0?null:g)}function oc(a,c,f,g){var v=Dn();g=g===void 0?null:g;var N=void 0;if(Tt!==null){var E=Tt.memoizedState;if(N=E.destroy,g!==null&&lh(g,E.deps)){v.memoizedState=eo(c,f,N,g);return}}ht.flags|=a,v.memoizedState=eo(1|c,f,N,g)}function Tg(a,c){return ac(8390656,8,a,c)}function ph(a,c){return oc(2048,8,a,c)}function Eg(a,c){return oc(4,2,a,c)}function Ag(a,c){return oc(4,4,a,c)}function Pg(a,c){if(typeof c=="function")return a=a(),c(a),function(){c(null)};if(c!=null)return a=a(),c.current=a,function(){c.current=null}}function Rg(a,c,f){return f=f!=null?f.concat([a]):null,oc(4,4,Pg.bind(null,c,a),f)}function fh(){}function Ig(a,c){var f=Dn();c=c===void 0?null:c;var g=f.memoizedState;return g!==null&&c!==null&&lh(c,g[1])?g[0]:(f.memoizedState=[a,c],a)}function Fg(a,c){var f=Dn();c=c===void 0?null:c;var g=f.memoizedState;return g!==null&&c!==null&&lh(c,g[1])?g[0]:(a=a(),f.memoizedState=[a,c],a)}function zg(a,c,f){return(Dr&21)===0?(a.baseState&&(a.baseState=!1,cn=!0),a.memoizedState=f):(es(f,c)||(f=u0(),ht.lanes|=f,Br|=f,a.baseState=!0),c)}function L5(a,c){var f=Xe;Xe=f!==0&&4>f?f:4,a(!0);var g=oh.transition;oh.transition={};try{a(!1),c()}finally{Xe=f,oh.transition=g}}function qg(){return Dn().memoizedState}function M5(a,c,f){var g=gr(a);if(f={lane:g,action:f,hasEagerState:!1,eagerState:null,next:null},Lg(a))Mg(c,f);else if(f=fg(a,c,f,g),f!==null){var v=tn();is(f,a,g,v),Og(f,c,g)}}function O5(a,c,f){var g=gr(a),v={lane:g,action:f,hasEagerState:!1,eagerState:null,next:null};if(Lg(a))Mg(c,v);else{var N=a.alternate;if(a.lanes===0&&(N===null||N.lanes===0)&&(N=c.lastRenderedReducer,N!==null))try{var E=c.lastRenderedState,O=N(E,f);if(v.hasEagerState=!0,v.eagerState=O,es(O,E)){var H=c.interleaved;H===null?(v.next=v,th(c)):(v.next=H.next,H.next=v),c.interleaved=v;return}}catch{}finally{}f=fg(a,c,v,g),f!==null&&(v=tn(),is(f,a,g,v),Og(f,c,g))}}function Lg(a){var c=a.alternate;return a===ht||c!==null&&c===ht}function Mg(a,c){Za=ic=!0;var f=a.pending;f===null?c.next=c:(c.next=f.next,f.next=c),a.pending=c}function Og(a,c,f){if((f&4194240)!==0){var g=c.lanes;g&=a.pendingLanes,f|=g,c.lanes=f,gu(a,f)}}var lc={readContext:_n,useCallback:Wt,useContext:Wt,useEffect:Wt,useImperativeHandle:Wt,useInsertionEffect:Wt,useLayoutEffect:Wt,useMemo:Wt,useReducer:Wt,useRef:Wt,useState:Wt,useDebugValue:Wt,useDeferredValue:Wt,useTransition:Wt,useMutableSource:Wt,useSyncExternalStore:Wt,useId:Wt,unstable_isNewReconciler:!1},_5={readContext:_n,useCallback:function(a,c){return vs().memoizedState=[a,c===void 0?null:c],a},useContext:_n,useEffect:Tg,useImperativeHandle:function(a,c,f){return f=f!=null?f.concat([a]):null,ac(4194308,4,Pg.bind(null,c,a),f)},useLayoutEffect:function(a,c){return ac(4194308,4,a,c)},useInsertionEffect:function(a,c){return ac(4,2,a,c)},useMemo:function(a,c){var f=vs();return c=c===void 0?null:c,a=a(),f.memoizedState=[a,c],a},useReducer:function(a,c,f){var g=vs();return c=f!==void 0?f(c):c,g.memoizedState=g.baseState=c,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:c},g.queue=a,a=a.dispatch=M5.bind(null,ht,a),[g.memoizedState,a]},useRef:function(a){var c=vs();return a={current:a},c.memoizedState=a},useState:Cg,useDebugValue:fh,useDeferredValue:function(a){return vs().memoizedState=a},useTransition:function(){var a=Cg(!1),c=a[0];return a=L5.bind(null,a[1]),vs().memoizedState=a,[c,a]},useMutableSource:function(){},useSyncExternalStore:function(a,c,f){var g=ht,v=vs();if(lt){if(f===void 0)throw Error(s(407));f=f()}else{if(f=c(),Ft===null)throw Error(s(349));(Dr&30)!==0||vg(g,c,f)}v.memoizedState=f;var N={value:f,getSnapshot:c};return v.queue=N,Tg(wg.bind(null,g,N,a),[a]),g.flags|=2048,eo(9,bg.bind(null,g,N,f,c),void 0,null),f},useId:function(){var a=vs(),c=Ft.identifierPrefix;if(lt){var f=Os,g=Ms;f=(g&~(1<<32-Jn(g)-1)).toString(32)+f,c=":"+c+"R"+f,f=Xa++,0<f&&(c+="H"+f.toString(32)),c+=":"}else f=q5++,c=":"+c+"r"+f.toString(32)+":";return a.memoizedState=c},unstable_isNewReconciler:!1},D5={readContext:_n,useCallback:Ig,useContext:_n,useEffect:ph,useImperativeHandle:Rg,useInsertionEffect:Eg,useLayoutEffect:Ag,useMemo:Fg,useReducer:uh,useRef:$g,useState:function(){return uh(Ja)},useDebugValue:fh,useDeferredValue:function(a){var c=Dn();return zg(c,Tt.memoizedState,a)},useTransition:function(){var a=uh(Ja)[0],c=Dn().memoizedState;return[a,c]},useMutableSource:jg,useSyncExternalStore:kg,useId:qg,unstable_isNewReconciler:!1},B5={readContext:_n,useCallback:Ig,useContext:_n,useEffect:ph,useImperativeHandle:Rg,useInsertionEffect:Eg,useLayoutEffect:Ag,useMemo:Fg,useReducer:hh,useRef:$g,useState:function(){return hh(Ja)},useDebugValue:fh,useDeferredValue:function(a){var c=Dn();return Tt===null?c.memoizedState=a:zg(c,Tt.memoizedState,a)},useTransition:function(){var a=hh(Ja)[0],c=Dn().memoizedState;return[a,c]},useMutableSource:jg,useSyncExternalStore:kg,useId:qg,unstable_isNewReconciler:!1};function ns(a,c){if(a&&a.defaultProps){c=R({},c),a=a.defaultProps;for(var f in a)c[f]===void 0&&(c[f]=a[f]);return c}return c}function mh(a,c,f,g){c=a.memoizedState,f=f(g,c),f=f==null?c:R({},c,f),a.memoizedState=f,a.lanes===0&&(a.updateQueue.baseState=f)}var cc={isMounted:function(a){return(a=a._reactInternals)?Fr(a)===a:!1},enqueueSetState:function(a,c,f){a=a._reactInternals;var g=tn(),v=gr(a),N=Ds(g,v);N.payload=c,f!=null&&(N.callback=f),c=hr(a,N,v),c!==null&&(is(c,a,v,g),tc(c,a,v))},enqueueReplaceState:function(a,c,f){a=a._reactInternals;var g=tn(),v=gr(a),N=Ds(g,v);N.tag=1,N.payload=c,f!=null&&(N.callback=f),c=hr(a,N,v),c!==null&&(is(c,a,v,g),tc(c,a,v))},enqueueForceUpdate:function(a,c){a=a._reactInternals;var f=tn(),g=gr(a),v=Ds(f,g);v.tag=2,c!=null&&(v.callback=c),c=hr(a,v,g),c!==null&&(is(c,a,g,f),tc(c,a,g))}};function _g(a,c,f,g,v,N,E){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(g,N,E):c.prototype&&c.prototype.isPureReactComponent?!_a(f,g)||!_a(v,N):!0}function Dg(a,c,f){var g=!1,v=cr,N=c.contextType;return typeof N=="object"&&N!==null?N=_n(N):(v=ln(c)?qr:Bt.current,g=c.contextTypes,N=(g=g!=null)?Ai(a,v):cr),c=new c(f,N),a.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=cc,a.stateNode=c,c._reactInternals=a,g&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=v,a.__reactInternalMemoizedMaskedChildContext=N),c}function Bg(a,c,f,g){a=c.state,typeof c.componentWillReceiveProps=="function"&&c.componentWillReceiveProps(f,g),typeof c.UNSAFE_componentWillReceiveProps=="function"&&c.UNSAFE_componentWillReceiveProps(f,g),c.state!==a&&cc.enqueueReplaceState(c,c.state,null)}function gh(a,c,f,g){var v=a.stateNode;v.props=f,v.state=a.memoizedState,v.refs={},nh(a);var N=c.contextType;typeof N=="object"&&N!==null?v.context=_n(N):(N=ln(c)?qr:Bt.current,v.context=Ai(a,N)),v.state=a.memoizedState,N=c.getDerivedStateFromProps,typeof N=="function"&&(mh(a,c,N,f),v.state=a.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(c=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),c!==v.state&&cc.enqueueReplaceState(v,v.state,null),nc(a,f,v,g),v.state=a.memoizedState),typeof v.componentDidMount=="function"&&(a.flags|=4194308)}function Mi(a,c){try{var f="",g=c;do f+=ye(g),g=g.return;while(g);var v=f}catch(N){v=`
|
|
39
|
-
Error generating stack: `+N.message+`
|
|
40
|
-
`+N.stack}return{value:a,source:c,stack:v,digest:null}}function xh(a,c,f){return{value:a,source:null,stack:f??null,digest:c??null}}function yh(a,c){try{console.error(c.value)}catch(f){setTimeout(function(){throw f})}}var W5=typeof WeakMap=="function"?WeakMap:Map;function Wg(a,c,f){f=Ds(-1,f),f.tag=3,f.payload={element:null};var g=c.value;return f.callback=function(){gc||(gc=!0,Ih=g),yh(a,c)},f}function Ug(a,c,f){f=Ds(-1,f),f.tag=3;var g=a.type.getDerivedStateFromError;if(typeof g=="function"){var v=c.value;f.payload=function(){return g(v)},f.callback=function(){yh(a,c)}}var N=a.stateNode;return N!==null&&typeof N.componentDidCatch=="function"&&(f.callback=function(){yh(a,c),typeof g!="function"&&(fr===null?fr=new Set([this]):fr.add(this));var E=c.stack;this.componentDidCatch(c.value,{componentStack:E!==null?E:""})}),f}function Hg(a,c,f){var g=a.pingCache;if(g===null){g=a.pingCache=new W5;var v=new Set;g.set(c,v)}else v=g.get(c),v===void 0&&(v=new Set,g.set(c,v));v.has(f)||(v.add(f),a=s6.bind(null,a,c,f),c.then(a,a))}function Vg(a){do{var c;if((c=a.tag===13)&&(c=a.memoizedState,c=c!==null?c.dehydrated!==null:!0),c)return a;a=a.return}while(a!==null);return null}function Kg(a,c,f,g,v){return(a.mode&1)===0?(a===c?a.flags|=65536:(a.flags|=128,f.flags|=131072,f.flags&=-52805,f.tag===1&&(f.alternate===null?f.tag=17:(c=Ds(-1,1),c.tag=2,hr(f,c,1))),f.lanes|=1),a):(a.flags|=65536,a.lanes=v,a)}var U5=A.ReactCurrentOwner,cn=!1;function en(a,c,f,g){c.child=a===null?pg(c,null,f,g):Fi(c,a.child,f,g)}function Yg(a,c,f,g,v){f=f.render;var N=c.ref;return qi(c,v),g=ch(a,c,f,g,N,v),f=dh(),a!==null&&!cn?(c.updateQueue=a.updateQueue,c.flags&=-2053,a.lanes&=~v,Bs(a,c,v)):(lt&&f&&Vu(c),c.flags|=1,en(a,c,g,v),c.child)}function Gg(a,c,f,g,v){if(a===null){var N=f.type;return typeof N=="function"&&!_h(N)&&N.defaultProps===void 0&&f.compare===null&&f.defaultProps===void 0?(c.tag=15,c.type=N,Qg(a,c,N,g,v)):(a=bc(f.type,null,g,c,c.mode,v),a.ref=c.ref,a.return=c,c.child=a)}if(N=a.child,(a.lanes&v)===0){var E=N.memoizedProps;if(f=f.compare,f=f!==null?f:_a,f(E,g)&&a.ref===c.ref)return Bs(a,c,v)}return c.flags|=1,a=yr(N,g),a.ref=c.ref,a.return=c,c.child=a}function Qg(a,c,f,g,v){if(a!==null){var N=a.memoizedProps;if(_a(N,g)&&a.ref===c.ref)if(cn=!1,c.pendingProps=g=N,(a.lanes&v)!==0)(a.flags&131072)!==0&&(cn=!0);else return c.lanes=a.lanes,Bs(a,c,v)}return jh(a,c,f,g,v)}function Zg(a,c,f){var g=c.pendingProps,v=g.children,N=a!==null?a.memoizedState:null;if(g.mode==="hidden")if((c.mode&1)===0)c.memoizedState={baseLanes:0,cachePool:null,transitions:null},tt(_i,Nn),Nn|=f;else{if((f&1073741824)===0)return a=N!==null?N.baseLanes|f:f,c.lanes=c.childLanes=1073741824,c.memoizedState={baseLanes:a,cachePool:null,transitions:null},c.updateQueue=null,tt(_i,Nn),Nn|=a,null;c.memoizedState={baseLanes:0,cachePool:null,transitions:null},g=N!==null?N.baseLanes:f,tt(_i,Nn),Nn|=g}else N!==null?(g=N.baseLanes|f,c.memoizedState=null):g=f,tt(_i,Nn),Nn|=g;return en(a,c,v,f),c.child}function Xg(a,c){var f=c.ref;(a===null&&f!==null||a!==null&&a.ref!==f)&&(c.flags|=512,c.flags|=2097152)}function jh(a,c,f,g,v){var N=ln(f)?qr:Bt.current;return N=Ai(c,N),qi(c,v),f=ch(a,c,f,g,N,v),g=dh(),a!==null&&!cn?(c.updateQueue=a.updateQueue,c.flags&=-2053,a.lanes&=~v,Bs(a,c,v)):(lt&&g&&Vu(c),c.flags|=1,en(a,c,f,v),c.child)}function Jg(a,c,f,g,v){if(ln(f)){var N=!0;Kl(c)}else N=!1;if(qi(c,v),c.stateNode===null)uc(a,c),Dg(c,f,g),gh(c,f,g,v),g=!0;else if(a===null){var E=c.stateNode,O=c.memoizedProps;E.props=O;var H=E.context,X=f.contextType;typeof X=="object"&&X!==null?X=_n(X):(X=ln(f)?qr:Bt.current,X=Ai(c,X));var le=f.getDerivedStateFromProps,de=typeof le=="function"||typeof E.getSnapshotBeforeUpdate=="function";de||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(O!==g||H!==X)&&Bg(c,E,g,X),ur=!1;var ae=c.memoizedState;E.state=ae,nc(c,g,E,v),H=c.memoizedState,O!==g||ae!==H||on.current||ur?(typeof le=="function"&&(mh(c,f,le,g),H=c.memoizedState),(O=ur||_g(c,f,O,g,ae,H,X))?(de||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount()),typeof E.componentDidMount=="function"&&(c.flags|=4194308)):(typeof E.componentDidMount=="function"&&(c.flags|=4194308),c.memoizedProps=g,c.memoizedState=H),E.props=g,E.state=H,E.context=X,g=O):(typeof E.componentDidMount=="function"&&(c.flags|=4194308),g=!1)}else{E=c.stateNode,mg(a,c),O=c.memoizedProps,X=c.type===c.elementType?O:ns(c.type,O),E.props=X,de=c.pendingProps,ae=E.context,H=f.contextType,typeof H=="object"&&H!==null?H=_n(H):(H=ln(f)?qr:Bt.current,H=Ai(c,H));var je=f.getDerivedStateFromProps;(le=typeof je=="function"||typeof E.getSnapshotBeforeUpdate=="function")||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(O!==de||ae!==H)&&Bg(c,E,g,H),ur=!1,ae=c.memoizedState,E.state=ae,nc(c,g,E,v);var be=c.memoizedState;O!==de||ae!==be||on.current||ur?(typeof je=="function"&&(mh(c,f,je,g),be=c.memoizedState),(X=ur||_g(c,f,X,g,ae,be,H)||!1)?(le||typeof E.UNSAFE_componentWillUpdate!="function"&&typeof E.componentWillUpdate!="function"||(typeof E.componentWillUpdate=="function"&&E.componentWillUpdate(g,be,H),typeof E.UNSAFE_componentWillUpdate=="function"&&E.UNSAFE_componentWillUpdate(g,be,H)),typeof E.componentDidUpdate=="function"&&(c.flags|=4),typeof E.getSnapshotBeforeUpdate=="function"&&(c.flags|=1024)):(typeof E.componentDidUpdate!="function"||O===a.memoizedProps&&ae===a.memoizedState||(c.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||O===a.memoizedProps&&ae===a.memoizedState||(c.flags|=1024),c.memoizedProps=g,c.memoizedState=be),E.props=g,E.state=be,E.context=H,g=X):(typeof E.componentDidUpdate!="function"||O===a.memoizedProps&&ae===a.memoizedState||(c.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||O===a.memoizedProps&&ae===a.memoizedState||(c.flags|=1024),g=!1)}return kh(a,c,f,g,N,v)}function kh(a,c,f,g,v,N){Xg(a,c);var E=(c.flags&128)!==0;if(!g&&!E)return v&&rg(c,f,!1),Bs(a,c,N);g=c.stateNode,U5.current=c;var O=E&&typeof f.getDerivedStateFromError!="function"?null:g.render();return c.flags|=1,a!==null&&E?(c.child=Fi(c,a.child,null,N),c.child=Fi(c,null,O,N)):en(a,c,O,N),c.memoizedState=g.state,v&&rg(c,f,!0),c.child}function ex(a){var c=a.stateNode;c.pendingContext?ng(a,c.pendingContext,c.pendingContext!==c.context):c.context&&ng(a,c.context,!1),sh(a,c.containerInfo)}function tx(a,c,f,g,v){return Ii(),Qu(v),c.flags|=256,en(a,c,f,g),c.child}var vh={dehydrated:null,treeContext:null,retryLane:0};function bh(a){return{baseLanes:a,cachePool:null,transitions:null}}function nx(a,c,f){var g=c.pendingProps,v=ut.current,N=!1,E=(c.flags&128)!==0,O;if((O=E)||(O=a!==null&&a.memoizedState===null?!1:(v&2)!==0),O?(N=!0,c.flags&=-129):(a===null||a.memoizedState!==null)&&(v|=1),tt(ut,v&1),a===null)return Gu(c),a=c.memoizedState,a!==null&&(a=a.dehydrated,a!==null)?((c.mode&1)===0?c.lanes=1:a.data==="$!"?c.lanes=8:c.lanes=1073741824,null):(E=g.children,a=g.fallback,N?(g=c.mode,N=c.child,E={mode:"hidden",children:E},(g&1)===0&&N!==null?(N.childLanes=0,N.pendingProps=E):N=wc(E,g,0,null),a=Vr(a,g,f,null),N.return=c,a.return=c,N.sibling=a,c.child=N,c.child.memoizedState=bh(f),c.memoizedState=vh,a):wh(c,E));if(v=a.memoizedState,v!==null&&(O=v.dehydrated,O!==null))return H5(a,c,E,g,O,v,f);if(N){N=g.fallback,E=c.mode,v=a.child,O=v.sibling;var H={mode:"hidden",children:g.children};return(E&1)===0&&c.child!==v?(g=c.child,g.childLanes=0,g.pendingProps=H,c.deletions=null):(g=yr(v,H),g.subtreeFlags=v.subtreeFlags&14680064),O!==null?N=yr(O,N):(N=Vr(N,E,f,null),N.flags|=2),N.return=c,g.return=c,g.sibling=N,c.child=g,g=N,N=c.child,E=a.child.memoizedState,E=E===null?bh(f):{baseLanes:E.baseLanes|f,cachePool:null,transitions:E.transitions},N.memoizedState=E,N.childLanes=a.childLanes&~f,c.memoizedState=vh,g}return N=a.child,a=N.sibling,g=yr(N,{mode:"visible",children:g.children}),(c.mode&1)===0&&(g.lanes=f),g.return=c,g.sibling=null,a!==null&&(f=c.deletions,f===null?(c.deletions=[a],c.flags|=16):f.push(a)),c.child=g,c.memoizedState=null,g}function wh(a,c){return c=wc({mode:"visible",children:c},a.mode,0,null),c.return=a,a.child=c}function dc(a,c,f,g){return g!==null&&Qu(g),Fi(c,a.child,null,f),a=wh(c,c.pendingProps.children),a.flags|=2,c.memoizedState=null,a}function H5(a,c,f,g,v,N,E){if(f)return c.flags&256?(c.flags&=-257,g=xh(Error(s(422))),dc(a,c,E,g)):c.memoizedState!==null?(c.child=a.child,c.flags|=128,null):(N=g.fallback,v=c.mode,g=wc({mode:"visible",children:g.children},v,0,null),N=Vr(N,v,E,null),N.flags|=2,g.return=c,N.return=c,g.sibling=N,c.child=g,(c.mode&1)!==0&&Fi(c,a.child,null,E),c.child.memoizedState=bh(E),c.memoizedState=vh,N);if((c.mode&1)===0)return dc(a,c,E,null);if(v.data==="$!"){if(g=v.nextSibling&&v.nextSibling.dataset,g)var O=g.dgst;return g=O,N=Error(s(419)),g=xh(N,g,void 0),dc(a,c,E,g)}if(O=(E&a.childLanes)!==0,cn||O){if(g=Ft,g!==null){switch(E&-E){case 4:v=2;break;case 16:v=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:v=32;break;case 536870912:v=268435456;break;default:v=0}v=(v&(g.suspendedLanes|E))!==0?0:v,v!==0&&v!==N.retryLane&&(N.retryLane=v,_s(a,v),is(g,a,v,-1))}return Oh(),g=xh(Error(s(421))),dc(a,c,E,g)}return v.data==="$?"?(c.flags|=128,c.child=a.child,c=r6.bind(null,a),v._reactRetry=c,null):(a=N.treeContext,wn=or(v.nextSibling),bn=c,lt=!0,ts=null,a!==null&&(Mn[On++]=Ms,Mn[On++]=Os,Mn[On++]=Lr,Ms=a.id,Os=a.overflow,Lr=c),c=wh(c,g.children),c.flags|=4096,c)}function sx(a,c,f){a.lanes|=c;var g=a.alternate;g!==null&&(g.lanes|=c),eh(a.return,c,f)}function Nh(a,c,f,g,v){var N=a.memoizedState;N===null?a.memoizedState={isBackwards:c,rendering:null,renderingStartTime:0,last:g,tail:f,tailMode:v}:(N.isBackwards=c,N.rendering=null,N.renderingStartTime=0,N.last=g,N.tail=f,N.tailMode=v)}function rx(a,c,f){var g=c.pendingProps,v=g.revealOrder,N=g.tail;if(en(a,c,g.children,f),g=ut.current,(g&2)!==0)g=g&1|2,c.flags|=128;else{if(a!==null&&(a.flags&128)!==0)e:for(a=c.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&sx(a,f,c);else if(a.tag===19)sx(a,f,c);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===c)break e;for(;a.sibling===null;){if(a.return===null||a.return===c)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}g&=1}if(tt(ut,g),(c.mode&1)===0)c.memoizedState=null;else switch(v){case"forwards":for(f=c.child,v=null;f!==null;)a=f.alternate,a!==null&&sc(a)===null&&(v=f),f=f.sibling;f=v,f===null?(v=c.child,c.child=null):(v=f.sibling,f.sibling=null),Nh(c,!1,v,f,N);break;case"backwards":for(f=null,v=c.child,c.child=null;v!==null;){if(a=v.alternate,a!==null&&sc(a)===null){c.child=v;break}a=v.sibling,v.sibling=f,f=v,v=a}Nh(c,!0,f,null,N);break;case"together":Nh(c,!1,null,null,void 0);break;default:c.memoizedState=null}return c.child}function uc(a,c){(c.mode&1)===0&&a!==null&&(a.alternate=null,c.alternate=null,c.flags|=2)}function Bs(a,c,f){if(a!==null&&(c.dependencies=a.dependencies),Br|=c.lanes,(f&c.childLanes)===0)return null;if(a!==null&&c.child!==a.child)throw Error(s(153));if(c.child!==null){for(a=c.child,f=yr(a,a.pendingProps),c.child=f,f.return=c;a.sibling!==null;)a=a.sibling,f=f.sibling=yr(a,a.pendingProps),f.return=c;f.sibling=null}return c.child}function V5(a,c,f){switch(c.tag){case 3:ex(c),Ii();break;case 5:yg(c);break;case 1:ln(c.type)&&Kl(c);break;case 4:sh(c,c.stateNode.containerInfo);break;case 10:var g=c.type._context,v=c.memoizedProps.value;tt(Jl,g._currentValue),g._currentValue=v;break;case 13:if(g=c.memoizedState,g!==null)return g.dehydrated!==null?(tt(ut,ut.current&1),c.flags|=128,null):(f&c.child.childLanes)!==0?nx(a,c,f):(tt(ut,ut.current&1),a=Bs(a,c,f),a!==null?a.sibling:null);tt(ut,ut.current&1);break;case 19:if(g=(f&c.childLanes)!==0,(a.flags&128)!==0){if(g)return rx(a,c,f);c.flags|=128}if(v=c.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),tt(ut,ut.current),g)break;return null;case 22:case 23:return c.lanes=0,Zg(a,c,f)}return Bs(a,c,f)}var ix,Sh,ax,ox;ix=function(a,c){for(var f=c.child;f!==null;){if(f.tag===5||f.tag===6)a.appendChild(f.stateNode);else if(f.tag!==4&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===c)break;for(;f.sibling===null;){if(f.return===null||f.return===c)return;f=f.return}f.sibling.return=f.return,f=f.sibling}},Sh=function(){},ax=function(a,c,f,g){var v=a.memoizedProps;if(v!==g){a=c.stateNode,_r(ks.current);var N=null;switch(f){case"input":v=Rt(a,v),g=Rt(a,g),N=[];break;case"select":v=R({},v,{value:void 0}),g=R({},g,{value:void 0}),N=[];break;case"textarea":v=ms(a,v),g=ms(a,g),N=[];break;default:typeof v.onClick!="function"&&typeof g.onClick=="function"&&(a.onclick=Ul)}bt(f,g);var E;f=null;for(X in v)if(!g.hasOwnProperty(X)&&v.hasOwnProperty(X)&&v[X]!=null)if(X==="style"){var O=v[X];for(E in O)O.hasOwnProperty(E)&&(f||(f={}),f[E]="")}else X!=="dangerouslySetInnerHTML"&&X!=="children"&&X!=="suppressContentEditableWarning"&&X!=="suppressHydrationWarning"&&X!=="autoFocus"&&(i.hasOwnProperty(X)?N||(N=[]):(N=N||[]).push(X,null));for(X in g){var H=g[X];if(O=v?.[X],g.hasOwnProperty(X)&&H!==O&&(H!=null||O!=null))if(X==="style")if(O){for(E in O)!O.hasOwnProperty(E)||H&&H.hasOwnProperty(E)||(f||(f={}),f[E]="");for(E in H)H.hasOwnProperty(E)&&O[E]!==H[E]&&(f||(f={}),f[E]=H[E])}else f||(N||(N=[]),N.push(X,f)),f=H;else X==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,O=O?O.__html:void 0,H!=null&&O!==H&&(N=N||[]).push(X,H)):X==="children"?typeof H!="string"&&typeof H!="number"||(N=N||[]).push(X,""+H):X!=="suppressContentEditableWarning"&&X!=="suppressHydrationWarning"&&(i.hasOwnProperty(X)?(H!=null&&X==="onScroll"&&it("scroll",a),N||O===H||(N=[])):(N=N||[]).push(X,H))}f&&(N=N||[]).push("style",f);var X=N;(c.updateQueue=X)&&(c.flags|=4)}},ox=function(a,c,f,g){f!==g&&(c.flags|=4)};function to(a,c){if(!lt)switch(a.tailMode){case"hidden":c=a.tail;for(var f=null;c!==null;)c.alternate!==null&&(f=c),c=c.sibling;f===null?a.tail=null:f.sibling=null;break;case"collapsed":f=a.tail;for(var g=null;f!==null;)f.alternate!==null&&(g=f),f=f.sibling;g===null?c||a.tail===null?a.tail=null:a.tail.sibling=null:g.sibling=null}}function Ut(a){var c=a.alternate!==null&&a.alternate.child===a.child,f=0,g=0;if(c)for(var v=a.child;v!==null;)f|=v.lanes|v.childLanes,g|=v.subtreeFlags&14680064,g|=v.flags&14680064,v.return=a,v=v.sibling;else for(v=a.child;v!==null;)f|=v.lanes|v.childLanes,g|=v.subtreeFlags,g|=v.flags,v.return=a,v=v.sibling;return a.subtreeFlags|=g,a.childLanes=f,c}function K5(a,c,f){var g=c.pendingProps;switch(Ku(c),c.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ut(c),null;case 1:return ln(c.type)&&Vl(),Ut(c),null;case 3:return g=c.stateNode,Li(),at(on),at(Bt),ah(),g.pendingContext&&(g.context=g.pendingContext,g.pendingContext=null),(a===null||a.child===null)&&(Zl(c)?c.flags|=4:a===null||a.memoizedState.isDehydrated&&(c.flags&256)===0||(c.flags|=1024,ts!==null&&(qh(ts),ts=null))),Sh(a,c),Ut(c),null;case 5:rh(c);var v=_r(Qa.current);if(f=c.type,a!==null&&c.stateNode!=null)ax(a,c,f,g,v),a.ref!==c.ref&&(c.flags|=512,c.flags|=2097152);else{if(!g){if(c.stateNode===null)throw Error(s(166));return Ut(c),null}if(a=_r(ks.current),Zl(c)){g=c.stateNode,f=c.type;var N=c.memoizedProps;switch(g[js]=c,g[Ha]=N,a=(c.mode&1)!==0,f){case"dialog":it("cancel",g),it("close",g);break;case"iframe":case"object":case"embed":it("load",g);break;case"video":case"audio":for(v=0;v<Ba.length;v++)it(Ba[v],g);break;case"source":it("error",g);break;case"img":case"image":case"link":it("error",g),it("load",g);break;case"details":it("toggle",g);break;case"input":ps(g,N),it("invalid",g);break;case"select":g._wrapperState={wasMultiple:!!N.multiple},it("invalid",g);break;case"textarea":jn(g,N),it("invalid",g)}bt(f,N),v=null;for(var E in N)if(N.hasOwnProperty(E)){var O=N[E];E==="children"?typeof O=="string"?g.textContent!==O&&(N.suppressHydrationWarning!==!0&&Wl(g.textContent,O,a),v=["children",O]):typeof O=="number"&&g.textContent!==""+O&&(N.suppressHydrationWarning!==!0&&Wl(g.textContent,O,a),v=["children",""+O]):i.hasOwnProperty(E)&&O!=null&&E==="onScroll"&&it("scroll",g)}switch(f){case"input":Lt(g),dt(g,N,!0);break;case"textarea":Lt(g),Ge(g);break;case"select":case"option":break;default:typeof N.onClick=="function"&&(g.onclick=Ul)}g=v,c.updateQueue=g,g!==null&&(c.flags|=4)}else{E=v.nodeType===9?v:v.ownerDocument,a==="http://www.w3.org/1999/xhtml"&&(a=ee(f)),a==="http://www.w3.org/1999/xhtml"?f==="script"?(a=E.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild)):typeof g.is=="string"?a=E.createElement(f,{is:g.is}):(a=E.createElement(f),f==="select"&&(E=a,g.multiple?E.multiple=!0:g.size&&(E.size=g.size))):a=E.createElementNS(a,f),a[js]=c,a[Ha]=g,ix(a,c,!1,!1),c.stateNode=a;e:{switch(E=kn(f,g),f){case"dialog":it("cancel",a),it("close",a),v=g;break;case"iframe":case"object":case"embed":it("load",a),v=g;break;case"video":case"audio":for(v=0;v<Ba.length;v++)it(Ba[v],a);v=g;break;case"source":it("error",a),v=g;break;case"img":case"image":case"link":it("error",a),it("load",a),v=g;break;case"details":it("toggle",a),v=g;break;case"input":ps(a,g),v=Rt(a,g),it("invalid",a);break;case"option":v=g;break;case"select":a._wrapperState={wasMultiple:!!g.multiple},v=R({},g,{value:void 0}),it("invalid",a);break;case"textarea":jn(a,g),v=ms(a,g),it("invalid",a);break;default:v=g}bt(f,v),O=v;for(N in O)if(O.hasOwnProperty(N)){var H=O[N];N==="style"?xs(a,H):N==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,H!=null&&Me(a,H)):N==="children"?typeof H=="string"?(f!=="textarea"||H!=="")&&He(a,H):typeof H=="number"&&He(a,""+H):N!=="suppressContentEditableWarning"&&N!=="suppressHydrationWarning"&&N!=="autoFocus"&&(i.hasOwnProperty(N)?H!=null&&N==="onScroll"&&it("scroll",a):H!=null&&T(a,N,H,E))}switch(f){case"input":Lt(a),dt(a,g,!1);break;case"textarea":Lt(a),Ge(a);break;case"option":g.value!=null&&a.setAttribute("value",""+Te(g.value));break;case"select":a.multiple=!!g.multiple,N=g.value,N!=null?sn(a,!!g.multiple,N,!1):g.defaultValue!=null&&sn(a,!!g.multiple,g.defaultValue,!0);break;default:typeof v.onClick=="function"&&(a.onclick=Ul)}switch(f){case"button":case"input":case"select":case"textarea":g=!!g.autoFocus;break e;case"img":g=!0;break e;default:g=!1}}g&&(c.flags|=4)}c.ref!==null&&(c.flags|=512,c.flags|=2097152)}return Ut(c),null;case 6:if(a&&c.stateNode!=null)ox(a,c,a.memoizedProps,g);else{if(typeof g!="string"&&c.stateNode===null)throw Error(s(166));if(f=_r(Qa.current),_r(ks.current),Zl(c)){if(g=c.stateNode,f=c.memoizedProps,g[js]=c,(N=g.nodeValue!==f)&&(a=bn,a!==null))switch(a.tag){case 3:Wl(g.nodeValue,f,(a.mode&1)!==0);break;case 5:a.memoizedProps.suppressHydrationWarning!==!0&&Wl(g.nodeValue,f,(a.mode&1)!==0)}N&&(c.flags|=4)}else g=(f.nodeType===9?f:f.ownerDocument).createTextNode(g),g[js]=c,c.stateNode=g}return Ut(c),null;case 13:if(at(ut),g=c.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(lt&&wn!==null&&(c.mode&1)!==0&&(c.flags&128)===0)dg(),Ii(),c.flags|=98560,N=!1;else if(N=Zl(c),g!==null&&g.dehydrated!==null){if(a===null){if(!N)throw Error(s(318));if(N=c.memoizedState,N=N!==null?N.dehydrated:null,!N)throw Error(s(317));N[js]=c}else Ii(),(c.flags&128)===0&&(c.memoizedState=null),c.flags|=4;Ut(c),N=!1}else ts!==null&&(qh(ts),ts=null),N=!0;if(!N)return c.flags&65536?c:null}return(c.flags&128)!==0?(c.lanes=f,c):(g=g!==null,g!==(a!==null&&a.memoizedState!==null)&&g&&(c.child.flags|=8192,(c.mode&1)!==0&&(a===null||(ut.current&1)!==0?Et===0&&(Et=3):Oh())),c.updateQueue!==null&&(c.flags|=4),Ut(c),null);case 4:return Li(),Sh(a,c),a===null&&Wa(c.stateNode.containerInfo),Ut(c),null;case 10:return Ju(c.type._context),Ut(c),null;case 17:return ln(c.type)&&Vl(),Ut(c),null;case 19:if(at(ut),N=c.memoizedState,N===null)return Ut(c),null;if(g=(c.flags&128)!==0,E=N.rendering,E===null)if(g)to(N,!1);else{if(Et!==0||a!==null&&(a.flags&128)!==0)for(a=c.child;a!==null;){if(E=sc(a),E!==null){for(c.flags|=128,to(N,!1),g=E.updateQueue,g!==null&&(c.updateQueue=g,c.flags|=4),c.subtreeFlags=0,g=f,f=c.child;f!==null;)N=f,a=g,N.flags&=14680066,E=N.alternate,E===null?(N.childLanes=0,N.lanes=a,N.child=null,N.subtreeFlags=0,N.memoizedProps=null,N.memoizedState=null,N.updateQueue=null,N.dependencies=null,N.stateNode=null):(N.childLanes=E.childLanes,N.lanes=E.lanes,N.child=E.child,N.subtreeFlags=0,N.deletions=null,N.memoizedProps=E.memoizedProps,N.memoizedState=E.memoizedState,N.updateQueue=E.updateQueue,N.type=E.type,a=E.dependencies,N.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),f=f.sibling;return tt(ut,ut.current&1|2),c.child}a=a.sibling}N.tail!==null&&jt()>Di&&(c.flags|=128,g=!0,to(N,!1),c.lanes=4194304)}else{if(!g)if(a=sc(E),a!==null){if(c.flags|=128,g=!0,f=a.updateQueue,f!==null&&(c.updateQueue=f,c.flags|=4),to(N,!0),N.tail===null&&N.tailMode==="hidden"&&!E.alternate&&!lt)return Ut(c),null}else 2*jt()-N.renderingStartTime>Di&&f!==1073741824&&(c.flags|=128,g=!0,to(N,!1),c.lanes=4194304);N.isBackwards?(E.sibling=c.child,c.child=E):(f=N.last,f!==null?f.sibling=E:c.child=E,N.last=E)}return N.tail!==null?(c=N.tail,N.rendering=c,N.tail=c.sibling,N.renderingStartTime=jt(),c.sibling=null,f=ut.current,tt(ut,g?f&1|2:f&1),c):(Ut(c),null);case 22:case 23:return Mh(),g=c.memoizedState!==null,a!==null&&a.memoizedState!==null!==g&&(c.flags|=8192),g&&(c.mode&1)!==0?(Nn&1073741824)!==0&&(Ut(c),c.subtreeFlags&6&&(c.flags|=8192)):Ut(c),null;case 24:return null;case 25:return null}throw Error(s(156,c.tag))}function Y5(a,c){switch(Ku(c),c.tag){case 1:return ln(c.type)&&Vl(),a=c.flags,a&65536?(c.flags=a&-65537|128,c):null;case 3:return Li(),at(on),at(Bt),ah(),a=c.flags,(a&65536)!==0&&(a&128)===0?(c.flags=a&-65537|128,c):null;case 5:return rh(c),null;case 13:if(at(ut),a=c.memoizedState,a!==null&&a.dehydrated!==null){if(c.alternate===null)throw Error(s(340));Ii()}return a=c.flags,a&65536?(c.flags=a&-65537|128,c):null;case 19:return at(ut),null;case 4:return Li(),null;case 10:return Ju(c.type._context),null;case 22:case 23:return Mh(),null;case 24:return null;default:return null}}var hc=!1,Ht=!1,G5=typeof WeakSet=="function"?WeakSet:Set,ve=null;function Oi(a,c){var f=a.ref;if(f!==null)if(typeof f=="function")try{f(null)}catch(g){mt(a,c,g)}else f.current=null}function Ch(a,c,f){try{f()}catch(g){mt(a,c,g)}}var lx=!1;function Q5(a,c){if(Mu=Rl,a=_0(),Au(a)){if("selectionStart"in a)var f={start:a.selectionStart,end:a.selectionEnd};else e:{f=(f=a.ownerDocument)&&f.defaultView||window;var g=f.getSelection&&f.getSelection();if(g&&g.rangeCount!==0){f=g.anchorNode;var v=g.anchorOffset,N=g.focusNode;g=g.focusOffset;try{f.nodeType,N.nodeType}catch{f=null;break e}var E=0,O=-1,H=-1,X=0,le=0,de=a,ae=null;t:for(;;){for(var je;de!==f||v!==0&&de.nodeType!==3||(O=E+v),de!==N||g!==0&&de.nodeType!==3||(H=E+g),de.nodeType===3&&(E+=de.nodeValue.length),(je=de.firstChild)!==null;)ae=de,de=je;for(;;){if(de===a)break t;if(ae===f&&++X===v&&(O=E),ae===N&&++le===g&&(H=E),(je=de.nextSibling)!==null)break;de=ae,ae=de.parentNode}de=je}f=O===-1||H===-1?null:{start:O,end:H}}else f=null}f=f||{start:0,end:0}}else f=null;for(Ou={focusedElem:a,selectionRange:f},Rl=!1,ve=c;ve!==null;)if(c=ve,a=c.child,(c.subtreeFlags&1028)!==0&&a!==null)a.return=c,ve=a;else for(;ve!==null;){c=ve;try{var be=c.alternate;if((c.flags&1024)!==0)switch(c.tag){case 0:case 11:case 15:break;case 1:if(be!==null){var Se=be.memoizedProps,kt=be.memoizedState,Q=c.stateNode,K=Q.getSnapshotBeforeUpdate(c.elementType===c.type?Se:ns(c.type,Se),kt);Q.__reactInternalSnapshotBeforeUpdate=K}break;case 3:var Z=c.stateNode.containerInfo;Z.nodeType===1?Z.textContent="":Z.nodeType===9&&Z.documentElement&&Z.removeChild(Z.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(pe){mt(c,c.return,pe)}if(a=c.sibling,a!==null){a.return=c.return,ve=a;break}ve=c.return}return be=lx,lx=!1,be}function no(a,c,f){var g=c.updateQueue;if(g=g!==null?g.lastEffect:null,g!==null){var v=g=g.next;do{if((v.tag&a)===a){var N=v.destroy;v.destroy=void 0,N!==void 0&&Ch(c,f,N)}v=v.next}while(v!==g)}}function pc(a,c){if(c=c.updateQueue,c=c!==null?c.lastEffect:null,c!==null){var f=c=c.next;do{if((f.tag&a)===a){var g=f.create;f.destroy=g()}f=f.next}while(f!==c)}}function $h(a){var c=a.ref;if(c!==null){var f=a.stateNode;switch(a.tag){case 5:a=f;break;default:a=f}typeof c=="function"?c(a):c.current=a}}function cx(a){var c=a.alternate;c!==null&&(a.alternate=null,cx(c)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(c=a.stateNode,c!==null&&(delete c[js],delete c[Ha],delete c[Wu],delete c[R5],delete c[I5])),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}function dx(a){return a.tag===5||a.tag===3||a.tag===4}function ux(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||dx(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function Th(a,c,f){var g=a.tag;if(g===5||g===6)a=a.stateNode,c?f.nodeType===8?f.parentNode.insertBefore(a,c):f.insertBefore(a,c):(f.nodeType===8?(c=f.parentNode,c.insertBefore(a,f)):(c=f,c.appendChild(a)),f=f._reactRootContainer,f!=null||c.onclick!==null||(c.onclick=Ul));else if(g!==4&&(a=a.child,a!==null))for(Th(a,c,f),a=a.sibling;a!==null;)Th(a,c,f),a=a.sibling}function Eh(a,c,f){var g=a.tag;if(g===5||g===6)a=a.stateNode,c?f.insertBefore(a,c):f.appendChild(a);else if(g!==4&&(a=a.child,a!==null))for(Eh(a,c,f),a=a.sibling;a!==null;)Eh(a,c,f),a=a.sibling}var _t=null,ss=!1;function pr(a,c,f){for(f=f.child;f!==null;)hx(a,c,f),f=f.sibling}function hx(a,c,f){if(ys&&typeof ys.onCommitFiberUnmount=="function")try{ys.onCommitFiberUnmount(Cl,f)}catch{}switch(f.tag){case 5:Ht||Oi(f,c);case 6:var g=_t,v=ss;_t=null,pr(a,c,f),_t=g,ss=v,_t!==null&&(ss?(a=_t,f=f.stateNode,a.nodeType===8?a.parentNode.removeChild(f):a.removeChild(f)):_t.removeChild(f.stateNode));break;case 18:_t!==null&&(ss?(a=_t,f=f.stateNode,a.nodeType===8?Bu(a.parentNode,f):a.nodeType===1&&Bu(a,f),Fa(a)):Bu(_t,f.stateNode));break;case 4:g=_t,v=ss,_t=f.stateNode.containerInfo,ss=!0,pr(a,c,f),_t=g,ss=v;break;case 0:case 11:case 14:case 15:if(!Ht&&(g=f.updateQueue,g!==null&&(g=g.lastEffect,g!==null))){v=g=g.next;do{var N=v,E=N.destroy;N=N.tag,E!==void 0&&((N&2)!==0||(N&4)!==0)&&Ch(f,c,E),v=v.next}while(v!==g)}pr(a,c,f);break;case 1:if(!Ht&&(Oi(f,c),g=f.stateNode,typeof g.componentWillUnmount=="function"))try{g.props=f.memoizedProps,g.state=f.memoizedState,g.componentWillUnmount()}catch(O){mt(f,c,O)}pr(a,c,f);break;case 21:pr(a,c,f);break;case 22:f.mode&1?(Ht=(g=Ht)||f.memoizedState!==null,pr(a,c,f),Ht=g):pr(a,c,f);break;default:pr(a,c,f)}}function px(a){var c=a.updateQueue;if(c!==null){a.updateQueue=null;var f=a.stateNode;f===null&&(f=a.stateNode=new G5),c.forEach(function(g){var v=i6.bind(null,a,g);f.has(g)||(f.add(g),g.then(v,v))})}}function rs(a,c){var f=c.deletions;if(f!==null)for(var g=0;g<f.length;g++){var v=f[g];try{var N=a,E=c,O=E;e:for(;O!==null;){switch(O.tag){case 5:_t=O.stateNode,ss=!1;break e;case 3:_t=O.stateNode.containerInfo,ss=!0;break e;case 4:_t=O.stateNode.containerInfo,ss=!0;break e}O=O.return}if(_t===null)throw Error(s(160));hx(N,E,v),_t=null,ss=!1;var H=v.alternate;H!==null&&(H.return=null),v.return=null}catch(X){mt(v,c,X)}}if(c.subtreeFlags&12854)for(c=c.child;c!==null;)fx(c,a),c=c.sibling}function fx(a,c){var f=a.alternate,g=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:if(rs(c,a),bs(a),g&4){try{no(3,a,a.return),pc(3,a)}catch(Se){mt(a,a.return,Se)}try{no(5,a,a.return)}catch(Se){mt(a,a.return,Se)}}break;case 1:rs(c,a),bs(a),g&512&&f!==null&&Oi(f,f.return);break;case 5:if(rs(c,a),bs(a),g&512&&f!==null&&Oi(f,f.return),a.flags&32){var v=a.stateNode;try{He(v,"")}catch(Se){mt(a,a.return,Se)}}if(g&4&&(v=a.stateNode,v!=null)){var N=a.memoizedProps,E=f!==null?f.memoizedProps:N,O=a.type,H=a.updateQueue;if(a.updateQueue=null,H!==null)try{O==="input"&&N.type==="radio"&&N.name!=null&&fs(v,N),kn(O,E);var X=kn(O,N);for(E=0;E<H.length;E+=2){var le=H[E],de=H[E+1];le==="style"?xs(v,de):le==="dangerouslySetInnerHTML"?Me(v,de):le==="children"?He(v,de):T(v,le,de,X)}switch(O){case"input":zn(v,N);break;case"textarea":gs(v,N);break;case"select":var ae=v._wrapperState.wasMultiple;v._wrapperState.wasMultiple=!!N.multiple;var je=N.value;je!=null?sn(v,!!N.multiple,je,!1):ae!==!!N.multiple&&(N.defaultValue!=null?sn(v,!!N.multiple,N.defaultValue,!0):sn(v,!!N.multiple,N.multiple?[]:"",!1))}v[Ha]=N}catch(Se){mt(a,a.return,Se)}}break;case 6:if(rs(c,a),bs(a),g&4){if(a.stateNode===null)throw Error(s(162));v=a.stateNode,N=a.memoizedProps;try{v.nodeValue=N}catch(Se){mt(a,a.return,Se)}}break;case 3:if(rs(c,a),bs(a),g&4&&f!==null&&f.memoizedState.isDehydrated)try{Fa(c.containerInfo)}catch(Se){mt(a,a.return,Se)}break;case 4:rs(c,a),bs(a);break;case 13:rs(c,a),bs(a),v=a.child,v.flags&8192&&(N=v.memoizedState!==null,v.stateNode.isHidden=N,!N||v.alternate!==null&&v.alternate.memoizedState!==null||(Rh=jt())),g&4&&px(a);break;case 22:if(le=f!==null&&f.memoizedState!==null,a.mode&1?(Ht=(X=Ht)||le,rs(c,a),Ht=X):rs(c,a),bs(a),g&8192){if(X=a.memoizedState!==null,(a.stateNode.isHidden=X)&&!le&&(a.mode&1)!==0)for(ve=a,le=a.child;le!==null;){for(de=ve=le;ve!==null;){switch(ae=ve,je=ae.child,ae.tag){case 0:case 11:case 14:case 15:no(4,ae,ae.return);break;case 1:Oi(ae,ae.return);var be=ae.stateNode;if(typeof be.componentWillUnmount=="function"){g=ae,f=ae.return;try{c=g,be.props=c.memoizedProps,be.state=c.memoizedState,be.componentWillUnmount()}catch(Se){mt(g,f,Se)}}break;case 5:Oi(ae,ae.return);break;case 22:if(ae.memoizedState!==null){xx(de);continue}}je!==null?(je.return=ae,ve=je):xx(de)}le=le.sibling}e:for(le=null,de=a;;){if(de.tag===5){if(le===null){le=de;try{v=de.stateNode,X?(N=v.style,typeof N.setProperty=="function"?N.setProperty("display","none","important"):N.display="none"):(O=de.stateNode,H=de.memoizedProps.style,E=H!=null&&H.hasOwnProperty("display")?H.display:null,O.style.display=rn("display",E))}catch(Se){mt(a,a.return,Se)}}}else if(de.tag===6){if(le===null)try{de.stateNode.nodeValue=X?"":de.memoizedProps}catch(Se){mt(a,a.return,Se)}}else if((de.tag!==22&&de.tag!==23||de.memoizedState===null||de===a)&&de.child!==null){de.child.return=de,de=de.child;continue}if(de===a)break e;for(;de.sibling===null;){if(de.return===null||de.return===a)break e;le===de&&(le=null),de=de.return}le===de&&(le=null),de.sibling.return=de.return,de=de.sibling}}break;case 19:rs(c,a),bs(a),g&4&&px(a);break;case 21:break;default:rs(c,a),bs(a)}}function bs(a){var c=a.flags;if(c&2){try{e:{for(var f=a.return;f!==null;){if(dx(f)){var g=f;break e}f=f.return}throw Error(s(160))}switch(g.tag){case 5:var v=g.stateNode;g.flags&32&&(He(v,""),g.flags&=-33);var N=ux(a);Eh(a,N,v);break;case 3:case 4:var E=g.stateNode.containerInfo,O=ux(a);Th(a,O,E);break;default:throw Error(s(161))}}catch(H){mt(a,a.return,H)}a.flags&=-3}c&4096&&(a.flags&=-4097)}function Z5(a,c,f){ve=a,mx(a)}function mx(a,c,f){for(var g=(a.mode&1)!==0;ve!==null;){var v=ve,N=v.child;if(v.tag===22&&g){var E=v.memoizedState!==null||hc;if(!E){var O=v.alternate,H=O!==null&&O.memoizedState!==null||Ht;O=hc;var X=Ht;if(hc=E,(Ht=H)&&!X)for(ve=v;ve!==null;)E=ve,H=E.child,E.tag===22&&E.memoizedState!==null?yx(v):H!==null?(H.return=E,ve=H):yx(v);for(;N!==null;)ve=N,mx(N),N=N.sibling;ve=v,hc=O,Ht=X}gx(a)}else(v.subtreeFlags&8772)!==0&&N!==null?(N.return=v,ve=N):gx(a)}}function gx(a){for(;ve!==null;){var c=ve;if((c.flags&8772)!==0){var f=c.alternate;try{if((c.flags&8772)!==0)switch(c.tag){case 0:case 11:case 15:Ht||pc(5,c);break;case 1:var g=c.stateNode;if(c.flags&4&&!Ht)if(f===null)g.componentDidMount();else{var v=c.elementType===c.type?f.memoizedProps:ns(c.type,f.memoizedProps);g.componentDidUpdate(v,f.memoizedState,g.__reactInternalSnapshotBeforeUpdate)}var N=c.updateQueue;N!==null&&xg(c,N,g);break;case 3:var E=c.updateQueue;if(E!==null){if(f=null,c.child!==null)switch(c.child.tag){case 5:f=c.child.stateNode;break;case 1:f=c.child.stateNode}xg(c,E,f)}break;case 5:var O=c.stateNode;if(f===null&&c.flags&4){f=O;var H=c.memoizedProps;switch(c.type){case"button":case"input":case"select":case"textarea":H.autoFocus&&f.focus();break;case"img":H.src&&(f.src=H.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(c.memoizedState===null){var X=c.alternate;if(X!==null){var le=X.memoizedState;if(le!==null){var de=le.dehydrated;de!==null&&Fa(de)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(s(163))}Ht||c.flags&512&&$h(c)}catch(ae){mt(c,c.return,ae)}}if(c===a){ve=null;break}if(f=c.sibling,f!==null){f.return=c.return,ve=f;break}ve=c.return}}function xx(a){for(;ve!==null;){var c=ve;if(c===a){ve=null;break}var f=c.sibling;if(f!==null){f.return=c.return,ve=f;break}ve=c.return}}function yx(a){for(;ve!==null;){var c=ve;try{switch(c.tag){case 0:case 11:case 15:var f=c.return;try{pc(4,c)}catch(H){mt(c,f,H)}break;case 1:var g=c.stateNode;if(typeof g.componentDidMount=="function"){var v=c.return;try{g.componentDidMount()}catch(H){mt(c,v,H)}}var N=c.return;try{$h(c)}catch(H){mt(c,N,H)}break;case 5:var E=c.return;try{$h(c)}catch(H){mt(c,E,H)}}}catch(H){mt(c,c.return,H)}if(c===a){ve=null;break}var O=c.sibling;if(O!==null){O.return=c.return,ve=O;break}ve=c.return}}var X5=Math.ceil,fc=A.ReactCurrentDispatcher,Ah=A.ReactCurrentOwner,Bn=A.ReactCurrentBatchConfig,Ye=0,Ft=null,wt=null,Dt=0,Nn=0,_i=lr(0),Et=0,so=null,Br=0,mc=0,Ph=0,ro=null,dn=null,Rh=0,Di=1/0,Ws=null,gc=!1,Ih=null,fr=null,xc=!1,mr=null,yc=0,io=0,Fh=null,jc=-1,kc=0;function tn(){return(Ye&6)!==0?jt():jc!==-1?jc:jc=jt()}function gr(a){return(a.mode&1)===0?1:(Ye&2)!==0&&Dt!==0?Dt&-Dt:z5.transition!==null?(kc===0&&(kc=u0()),kc):(a=Xe,a!==0||(a=window.event,a=a===void 0?16:k0(a.type)),a)}function is(a,c,f,g){if(50<io)throw io=0,Fh=null,Error(s(185));Ea(a,f,g),((Ye&2)===0||a!==Ft)&&(a===Ft&&((Ye&2)===0&&(mc|=f),Et===4&&xr(a,Dt)),un(a,g),f===1&&Ye===0&&(c.mode&1)===0&&(Di=jt()+500,Yl&&dr()))}function un(a,c){var f=a.callbackNode;z3(a,c);var g=El(a,a===Ft?Dt:0);if(g===0)f!==null&&l0(f),a.callbackNode=null,a.callbackPriority=0;else if(c=g&-g,a.callbackPriority!==c){if(f!=null&&l0(f),c===1)a.tag===0?F5(kx.bind(null,a)):ig(kx.bind(null,a)),A5(function(){(Ye&6)===0&&dr()}),f=null;else{switch(h0(g)){case 1:f=pu;break;case 4:f=c0;break;case 16:f=Sl;break;case 536870912:f=d0;break;default:f=Sl}f=Tx(f,jx.bind(null,a))}a.callbackPriority=c,a.callbackNode=f}}function jx(a,c){if(jc=-1,kc=0,(Ye&6)!==0)throw Error(s(327));var f=a.callbackNode;if(Bi()&&a.callbackNode!==f)return null;var g=El(a,a===Ft?Dt:0);if(g===0)return null;if((g&30)!==0||(g&a.expiredLanes)!==0||c)c=vc(a,g);else{c=g;var v=Ye;Ye|=2;var N=bx();(Ft!==a||Dt!==c)&&(Ws=null,Di=jt()+500,Ur(a,c));do try{t6();break}catch(O){vx(a,O)}while(!0);Xu(),fc.current=N,Ye=v,wt!==null?c=0:(Ft=null,Dt=0,c=Et)}if(c!==0){if(c===2&&(v=fu(a),v!==0&&(g=v,c=zh(a,v))),c===1)throw f=so,Ur(a,0),xr(a,g),un(a,jt()),f;if(c===6)xr(a,g);else{if(v=a.current.alternate,(g&30)===0&&!J5(v)&&(c=vc(a,g),c===2&&(N=fu(a),N!==0&&(g=N,c=zh(a,N))),c===1))throw f=so,Ur(a,0),xr(a,g),un(a,jt()),f;switch(a.finishedWork=v,a.finishedLanes=g,c){case 0:case 1:throw Error(s(345));case 2:Hr(a,dn,Ws);break;case 3:if(xr(a,g),(g&130023424)===g&&(c=Rh+500-jt(),10<c)){if(El(a,0)!==0)break;if(v=a.suspendedLanes,(v&g)!==g){tn(),a.pingedLanes|=a.suspendedLanes&v;break}a.timeoutHandle=Du(Hr.bind(null,a,dn,Ws),c);break}Hr(a,dn,Ws);break;case 4:if(xr(a,g),(g&4194240)===g)break;for(c=a.eventTimes,v=-1;0<g;){var E=31-Jn(g);N=1<<E,E=c[E],E>v&&(v=E),g&=~N}if(g=v,g=jt()-g,g=(120>g?120:480>g?480:1080>g?1080:1920>g?1920:3e3>g?3e3:4320>g?4320:1960*X5(g/1960))-g,10<g){a.timeoutHandle=Du(Hr.bind(null,a,dn,Ws),g);break}Hr(a,dn,Ws);break;case 5:Hr(a,dn,Ws);break;default:throw Error(s(329))}}}return un(a,jt()),a.callbackNode===f?jx.bind(null,a):null}function zh(a,c){var f=ro;return a.current.memoizedState.isDehydrated&&(Ur(a,c).flags|=256),a=vc(a,c),a!==2&&(c=dn,dn=f,c!==null&&qh(c)),a}function qh(a){dn===null?dn=a:dn.push.apply(dn,a)}function J5(a){for(var c=a;;){if(c.flags&16384){var f=c.updateQueue;if(f!==null&&(f=f.stores,f!==null))for(var g=0;g<f.length;g++){var v=f[g],N=v.getSnapshot;v=v.value;try{if(!es(N(),v))return!1}catch{return!1}}}if(f=c.child,c.subtreeFlags&16384&&f!==null)f.return=c,c=f;else{if(c===a)break;for(;c.sibling===null;){if(c.return===null||c.return===a)return!0;c=c.return}c.sibling.return=c.return,c=c.sibling}}return!0}function xr(a,c){for(c&=~Ph,c&=~mc,a.suspendedLanes|=c,a.pingedLanes&=~c,a=a.expirationTimes;0<c;){var f=31-Jn(c),g=1<<f;a[f]=-1,c&=~g}}function kx(a){if((Ye&6)!==0)throw Error(s(327));Bi();var c=El(a,0);if((c&1)===0)return un(a,jt()),null;var f=vc(a,c);if(a.tag!==0&&f===2){var g=fu(a);g!==0&&(c=g,f=zh(a,g))}if(f===1)throw f=so,Ur(a,0),xr(a,c),un(a,jt()),f;if(f===6)throw Error(s(345));return a.finishedWork=a.current.alternate,a.finishedLanes=c,Hr(a,dn,Ws),un(a,jt()),null}function Lh(a,c){var f=Ye;Ye|=1;try{return a(c)}finally{Ye=f,Ye===0&&(Di=jt()+500,Yl&&dr())}}function Wr(a){mr!==null&&mr.tag===0&&(Ye&6)===0&&Bi();var c=Ye;Ye|=1;var f=Bn.transition,g=Xe;try{if(Bn.transition=null,Xe=1,a)return a()}finally{Xe=g,Bn.transition=f,Ye=c,(Ye&6)===0&&dr()}}function Mh(){Nn=_i.current,at(_i)}function Ur(a,c){a.finishedWork=null,a.finishedLanes=0;var f=a.timeoutHandle;if(f!==-1&&(a.timeoutHandle=-1,E5(f)),wt!==null)for(f=wt.return;f!==null;){var g=f;switch(Ku(g),g.tag){case 1:g=g.type.childContextTypes,g!=null&&Vl();break;case 3:Li(),at(on),at(Bt),ah();break;case 5:rh(g);break;case 4:Li();break;case 13:at(ut);break;case 19:at(ut);break;case 10:Ju(g.type._context);break;case 22:case 23:Mh()}f=f.return}if(Ft=a,wt=a=yr(a.current,null),Dt=Nn=c,Et=0,so=null,Ph=mc=Br=0,dn=ro=null,Or!==null){for(c=0;c<Or.length;c++)if(f=Or[c],g=f.interleaved,g!==null){f.interleaved=null;var v=g.next,N=f.pending;if(N!==null){var E=N.next;N.next=v,g.next=E}f.pending=g}Or=null}return a}function vx(a,c){do{var f=wt;try{if(Xu(),rc.current=lc,ic){for(var g=ht.memoizedState;g!==null;){var v=g.queue;v!==null&&(v.pending=null),g=g.next}ic=!1}if(Dr=0,It=Tt=ht=null,Za=!1,Xa=0,Ah.current=null,f===null||f.return===null){Et=1,so=c,wt=null;break}e:{var N=a,E=f.return,O=f,H=c;if(c=Dt,O.flags|=32768,H!==null&&typeof H=="object"&&typeof H.then=="function"){var X=H,le=O,de=le.tag;if((le.mode&1)===0&&(de===0||de===11||de===15)){var ae=le.alternate;ae?(le.updateQueue=ae.updateQueue,le.memoizedState=ae.memoizedState,le.lanes=ae.lanes):(le.updateQueue=null,le.memoizedState=null)}var je=Vg(E);if(je!==null){je.flags&=-257,Kg(je,E,O,N,c),je.mode&1&&Hg(N,X,c),c=je,H=X;var be=c.updateQueue;if(be===null){var Se=new Set;Se.add(H),c.updateQueue=Se}else be.add(H);break e}else{if((c&1)===0){Hg(N,X,c),Oh();break e}H=Error(s(426))}}else if(lt&&O.mode&1){var kt=Vg(E);if(kt!==null){(kt.flags&65536)===0&&(kt.flags|=256),Kg(kt,E,O,N,c),Qu(Mi(H,O));break e}}N=H=Mi(H,O),Et!==4&&(Et=2),ro===null?ro=[N]:ro.push(N),N=E;do{switch(N.tag){case 3:N.flags|=65536,c&=-c,N.lanes|=c;var Q=Wg(N,H,c);gg(N,Q);break e;case 1:O=H;var K=N.type,Z=N.stateNode;if((N.flags&128)===0&&(typeof K.getDerivedStateFromError=="function"||Z!==null&&typeof Z.componentDidCatch=="function"&&(fr===null||!fr.has(Z)))){N.flags|=65536,c&=-c,N.lanes|=c;var pe=Ug(N,O,c);gg(N,pe);break e}}N=N.return}while(N!==null)}Nx(f)}catch(Ce){c=Ce,wt===f&&f!==null&&(wt=f=f.return);continue}break}while(!0)}function bx(){var a=fc.current;return fc.current=lc,a===null?lc:a}function Oh(){(Et===0||Et===3||Et===2)&&(Et=4),Ft===null||(Br&268435455)===0&&(mc&268435455)===0||xr(Ft,Dt)}function vc(a,c){var f=Ye;Ye|=2;var g=bx();(Ft!==a||Dt!==c)&&(Ws=null,Ur(a,c));do try{e6();break}catch(v){vx(a,v)}while(!0);if(Xu(),Ye=f,fc.current=g,wt!==null)throw Error(s(261));return Ft=null,Dt=0,Et}function e6(){for(;wt!==null;)wx(wt)}function t6(){for(;wt!==null&&!C3();)wx(wt)}function wx(a){var c=$x(a.alternate,a,Nn);a.memoizedProps=a.pendingProps,c===null?Nx(a):wt=c,Ah.current=null}function Nx(a){var c=a;do{var f=c.alternate;if(a=c.return,(c.flags&32768)===0){if(f=K5(f,c,Nn),f!==null){wt=f;return}}else{if(f=Y5(f,c),f!==null){f.flags&=32767,wt=f;return}if(a!==null)a.flags|=32768,a.subtreeFlags=0,a.deletions=null;else{Et=6,wt=null;return}}if(c=c.sibling,c!==null){wt=c;return}wt=c=a}while(c!==null);Et===0&&(Et=5)}function Hr(a,c,f){var g=Xe,v=Bn.transition;try{Bn.transition=null,Xe=1,n6(a,c,f,g)}finally{Bn.transition=v,Xe=g}return null}function n6(a,c,f,g){do Bi();while(mr!==null);if((Ye&6)!==0)throw Error(s(327));f=a.finishedWork;var v=a.finishedLanes;if(f===null)return null;if(a.finishedWork=null,a.finishedLanes=0,f===a.current)throw Error(s(177));a.callbackNode=null,a.callbackPriority=0;var N=f.lanes|f.childLanes;if(q3(a,N),a===Ft&&(wt=Ft=null,Dt=0),(f.subtreeFlags&2064)===0&&(f.flags&2064)===0||xc||(xc=!0,Tx(Sl,function(){return Bi(),null})),N=(f.flags&15990)!==0,(f.subtreeFlags&15990)!==0||N){N=Bn.transition,Bn.transition=null;var E=Xe;Xe=1;var O=Ye;Ye|=4,Ah.current=null,Q5(a,f),fx(f,a),b5(Ou),Rl=!!Mu,Ou=Mu=null,a.current=f,Z5(f),$3(),Ye=O,Xe=E,Bn.transition=N}else a.current=f;if(xc&&(xc=!1,mr=a,yc=v),N=a.pendingLanes,N===0&&(fr=null),A3(f.stateNode),un(a,jt()),c!==null)for(g=a.onRecoverableError,f=0;f<c.length;f++)v=c[f],g(v.value,{componentStack:v.stack,digest:v.digest});if(gc)throw gc=!1,a=Ih,Ih=null,a;return(yc&1)!==0&&a.tag!==0&&Bi(),N=a.pendingLanes,(N&1)!==0?a===Fh?io++:(io=0,Fh=a):io=0,dr(),null}function Bi(){if(mr!==null){var a=h0(yc),c=Bn.transition,f=Xe;try{if(Bn.transition=null,Xe=16>a?16:a,mr===null)var g=!1;else{if(a=mr,mr=null,yc=0,(Ye&6)!==0)throw Error(s(331));var v=Ye;for(Ye|=4,ve=a.current;ve!==null;){var N=ve,E=N.child;if((ve.flags&16)!==0){var O=N.deletions;if(O!==null){for(var H=0;H<O.length;H++){var X=O[H];for(ve=X;ve!==null;){var le=ve;switch(le.tag){case 0:case 11:case 15:no(8,le,N)}var de=le.child;if(de!==null)de.return=le,ve=de;else for(;ve!==null;){le=ve;var ae=le.sibling,je=le.return;if(cx(le),le===X){ve=null;break}if(ae!==null){ae.return=je,ve=ae;break}ve=je}}}var be=N.alternate;if(be!==null){var Se=be.child;if(Se!==null){be.child=null;do{var kt=Se.sibling;Se.sibling=null,Se=kt}while(Se!==null)}}ve=N}}if((N.subtreeFlags&2064)!==0&&E!==null)E.return=N,ve=E;else e:for(;ve!==null;){if(N=ve,(N.flags&2048)!==0)switch(N.tag){case 0:case 11:case 15:no(9,N,N.return)}var Q=N.sibling;if(Q!==null){Q.return=N.return,ve=Q;break e}ve=N.return}}var K=a.current;for(ve=K;ve!==null;){E=ve;var Z=E.child;if((E.subtreeFlags&2064)!==0&&Z!==null)Z.return=E,ve=Z;else e:for(E=K;ve!==null;){if(O=ve,(O.flags&2048)!==0)try{switch(O.tag){case 0:case 11:case 15:pc(9,O)}}catch(Ce){mt(O,O.return,Ce)}if(O===E){ve=null;break e}var pe=O.sibling;if(pe!==null){pe.return=O.return,ve=pe;break e}ve=O.return}}if(Ye=v,dr(),ys&&typeof ys.onPostCommitFiberRoot=="function")try{ys.onPostCommitFiberRoot(Cl,a)}catch{}g=!0}return g}finally{Xe=f,Bn.transition=c}}return!1}function Sx(a,c,f){c=Mi(f,c),c=Wg(a,c,1),a=hr(a,c,1),c=tn(),a!==null&&(Ea(a,1,c),un(a,c))}function mt(a,c,f){if(a.tag===3)Sx(a,a,f);else for(;c!==null;){if(c.tag===3){Sx(c,a,f);break}else if(c.tag===1){var g=c.stateNode;if(typeof c.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(fr===null||!fr.has(g))){a=Mi(f,a),a=Ug(c,a,1),c=hr(c,a,1),a=tn(),c!==null&&(Ea(c,1,a),un(c,a));break}}c=c.return}}function s6(a,c,f){var g=a.pingCache;g!==null&&g.delete(c),c=tn(),a.pingedLanes|=a.suspendedLanes&f,Ft===a&&(Dt&f)===f&&(Et===4||Et===3&&(Dt&130023424)===Dt&&500>jt()-Rh?Ur(a,0):Ph|=f),un(a,c)}function Cx(a,c){c===0&&((a.mode&1)===0?c=1:(c=Tl,Tl<<=1,(Tl&130023424)===0&&(Tl=4194304)));var f=tn();a=_s(a,c),a!==null&&(Ea(a,c,f),un(a,f))}function r6(a){var c=a.memoizedState,f=0;c!==null&&(f=c.retryLane),Cx(a,f)}function i6(a,c){var f=0;switch(a.tag){case 13:var g=a.stateNode,v=a.memoizedState;v!==null&&(f=v.retryLane);break;case 19:g=a.stateNode;break;default:throw Error(s(314))}g!==null&&g.delete(c),Cx(a,f)}var $x;$x=function(a,c,f){if(a!==null)if(a.memoizedProps!==c.pendingProps||on.current)cn=!0;else{if((a.lanes&f)===0&&(c.flags&128)===0)return cn=!1,V5(a,c,f);cn=(a.flags&131072)!==0}else cn=!1,lt&&(c.flags&1048576)!==0&&ag(c,Ql,c.index);switch(c.lanes=0,c.tag){case 2:var g=c.type;uc(a,c),a=c.pendingProps;var v=Ai(c,Bt.current);qi(c,f),v=ch(null,c,g,a,v,f);var N=dh();return c.flags|=1,typeof v=="object"&&v!==null&&typeof v.render=="function"&&v.$$typeof===void 0?(c.tag=1,c.memoizedState=null,c.updateQueue=null,ln(g)?(N=!0,Kl(c)):N=!1,c.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,nh(c),v.updater=cc,c.stateNode=v,v._reactInternals=c,gh(c,g,a,f),c=kh(null,c,g,!0,N,f)):(c.tag=0,lt&&N&&Vu(c),en(null,c,v,f),c=c.child),c;case 16:g=c.elementType;e:{switch(uc(a,c),a=c.pendingProps,v=g._init,g=v(g._payload),c.type=g,v=c.tag=o6(g),a=ns(g,a),v){case 0:c=jh(null,c,g,a,f);break e;case 1:c=Jg(null,c,g,a,f);break e;case 11:c=Yg(null,c,g,a,f);break e;case 14:c=Gg(null,c,g,ns(g.type,a),f);break e}throw Error(s(306,g,""))}return c;case 0:return g=c.type,v=c.pendingProps,v=c.elementType===g?v:ns(g,v),jh(a,c,g,v,f);case 1:return g=c.type,v=c.pendingProps,v=c.elementType===g?v:ns(g,v),Jg(a,c,g,v,f);case 3:e:{if(ex(c),a===null)throw Error(s(387));g=c.pendingProps,N=c.memoizedState,v=N.element,mg(a,c),nc(c,g,null,f);var E=c.memoizedState;if(g=E.element,N.isDehydrated)if(N={element:g,isDehydrated:!1,cache:E.cache,pendingSuspenseBoundaries:E.pendingSuspenseBoundaries,transitions:E.transitions},c.updateQueue.baseState=N,c.memoizedState=N,c.flags&256){v=Mi(Error(s(423)),c),c=tx(a,c,g,f,v);break e}else if(g!==v){v=Mi(Error(s(424)),c),c=tx(a,c,g,f,v);break e}else for(wn=or(c.stateNode.containerInfo.firstChild),bn=c,lt=!0,ts=null,f=pg(c,null,g,f),c.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling;else{if(Ii(),g===v){c=Bs(a,c,f);break e}en(a,c,g,f)}c=c.child}return c;case 5:return yg(c),a===null&&Gu(c),g=c.type,v=c.pendingProps,N=a!==null?a.memoizedProps:null,E=v.children,_u(g,v)?E=null:N!==null&&_u(g,N)&&(c.flags|=32),Xg(a,c),en(a,c,E,f),c.child;case 6:return a===null&&Gu(c),null;case 13:return nx(a,c,f);case 4:return sh(c,c.stateNode.containerInfo),g=c.pendingProps,a===null?c.child=Fi(c,null,g,f):en(a,c,g,f),c.child;case 11:return g=c.type,v=c.pendingProps,v=c.elementType===g?v:ns(g,v),Yg(a,c,g,v,f);case 7:return en(a,c,c.pendingProps,f),c.child;case 8:return en(a,c,c.pendingProps.children,f),c.child;case 12:return en(a,c,c.pendingProps.children,f),c.child;case 10:e:{if(g=c.type._context,v=c.pendingProps,N=c.memoizedProps,E=v.value,tt(Jl,g._currentValue),g._currentValue=E,N!==null)if(es(N.value,E)){if(N.children===v.children&&!on.current){c=Bs(a,c,f);break e}}else for(N=c.child,N!==null&&(N.return=c);N!==null;){var O=N.dependencies;if(O!==null){E=N.child;for(var H=O.firstContext;H!==null;){if(H.context===g){if(N.tag===1){H=Ds(-1,f&-f),H.tag=2;var X=N.updateQueue;if(X!==null){X=X.shared;var le=X.pending;le===null?H.next=H:(H.next=le.next,le.next=H),X.pending=H}}N.lanes|=f,H=N.alternate,H!==null&&(H.lanes|=f),eh(N.return,f,c),O.lanes|=f;break}H=H.next}}else if(N.tag===10)E=N.type===c.type?null:N.child;else if(N.tag===18){if(E=N.return,E===null)throw Error(s(341));E.lanes|=f,O=E.alternate,O!==null&&(O.lanes|=f),eh(E,f,c),E=N.sibling}else E=N.child;if(E!==null)E.return=N;else for(E=N;E!==null;){if(E===c){E=null;break}if(N=E.sibling,N!==null){N.return=E.return,E=N;break}E=E.return}N=E}en(a,c,v.children,f),c=c.child}return c;case 9:return v=c.type,g=c.pendingProps.children,qi(c,f),v=_n(v),g=g(v),c.flags|=1,en(a,c,g,f),c.child;case 14:return g=c.type,v=ns(g,c.pendingProps),v=ns(g.type,v),Gg(a,c,g,v,f);case 15:return Qg(a,c,c.type,c.pendingProps,f);case 17:return g=c.type,v=c.pendingProps,v=c.elementType===g?v:ns(g,v),uc(a,c),c.tag=1,ln(g)?(a=!0,Kl(c)):a=!1,qi(c,f),Dg(c,g,v),gh(c,g,v,f),kh(null,c,g,!0,a,f);case 19:return rx(a,c,f);case 22:return Zg(a,c,f)}throw Error(s(156,c.tag))};function Tx(a,c){return o0(a,c)}function a6(a,c,f,g){this.tag=a,this.key=f,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=c,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 Wn(a,c,f,g){return new a6(a,c,f,g)}function _h(a){return a=a.prototype,!(!a||!a.isReactComponent)}function o6(a){if(typeof a=="function")return _h(a)?1:0;if(a!=null){if(a=a.$$typeof,a===I)return 11;if(a===G)return 14}return 2}function yr(a,c){var f=a.alternate;return f===null?(f=Wn(a.tag,c,a.key,a.mode),f.elementType=a.elementType,f.type=a.type,f.stateNode=a.stateNode,f.alternate=a,a.alternate=f):(f.pendingProps=c,f.type=a.type,f.flags=0,f.subtreeFlags=0,f.deletions=null),f.flags=a.flags&14680064,f.childLanes=a.childLanes,f.lanes=a.lanes,f.child=a.child,f.memoizedProps=a.memoizedProps,f.memoizedState=a.memoizedState,f.updateQueue=a.updateQueue,c=a.dependencies,f.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext},f.sibling=a.sibling,f.index=a.index,f.ref=a.ref,f}function bc(a,c,f,g,v,N){var E=2;if(g=a,typeof a=="function")_h(a)&&(E=1);else if(typeof a=="string")E=5;else e:switch(a){case P:return Vr(f.children,v,N,c);case F:E=8,v|=8;break;case _:return a=Wn(12,f,c,v|2),a.elementType=_,a.lanes=N,a;case W:return a=Wn(13,f,c,v),a.elementType=W,a.lanes=N,a;case M:return a=Wn(19,f,c,v),a.elementType=M,a.lanes=N,a;case V:return wc(f,v,N,c);default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case z:E=10;break e;case U:E=9;break e;case I:E=11;break e;case G:E=14;break e;case ce:E=16,g=null;break e}throw Error(s(130,a==null?a:typeof a,""))}return c=Wn(E,f,c,v),c.elementType=a,c.type=g,c.lanes=N,c}function Vr(a,c,f,g){return a=Wn(7,a,g,c),a.lanes=f,a}function wc(a,c,f,g){return a=Wn(22,a,g,c),a.elementType=V,a.lanes=f,a.stateNode={isHidden:!1},a}function Dh(a,c,f){return a=Wn(6,a,null,c),a.lanes=f,a}function Bh(a,c,f){return c=Wn(4,a.children!==null?a.children:[],a.key,c),c.lanes=f,c.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},c}function l6(a,c,f,g,v){this.tag=c,this.containerInfo=a,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=mu(0),this.expirationTimes=mu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mu(0),this.identifierPrefix=g,this.onRecoverableError=v,this.mutableSourceEagerHydrationData=null}function Wh(a,c,f,g,v,N,E,O,H){return a=new l6(a,c,f,O,H),c===1?(c=1,N===!0&&(c|=8)):c=0,N=Wn(3,null,null,c),a.current=N,N.stateNode=a,N.memoizedState={element:g,isDehydrated:f,cache:null,transitions:null,pendingSuspenseBoundaries:null},nh(N),a}function c6(a,c,f){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:$,key:g==null?null:""+g,children:a,containerInfo:c,implementation:f}}function Ex(a){if(!a)return cr;a=a._reactInternals;e:{if(Fr(a)!==a||a.tag!==1)throw Error(s(170));var c=a;do{switch(c.tag){case 3:c=c.stateNode.context;break e;case 1:if(ln(c.type)){c=c.stateNode.__reactInternalMemoizedMergedChildContext;break e}}c=c.return}while(c!==null);throw Error(s(171))}if(a.tag===1){var f=a.type;if(ln(f))return sg(a,f,c)}return c}function Ax(a,c,f,g,v,N,E,O,H){return a=Wh(f,g,!0,a,v,N,E,O,H),a.context=Ex(null),f=a.current,g=tn(),v=gr(f),N=Ds(g,v),N.callback=c??null,hr(f,N,v),a.current.lanes=v,Ea(a,v,g),un(a,g),a}function Nc(a,c,f,g){var v=c.current,N=tn(),E=gr(v);return f=Ex(f),c.context===null?c.context=f:c.pendingContext=f,c=Ds(N,E),c.payload={element:a},g=g===void 0?null:g,g!==null&&(c.callback=g),a=hr(v,c,E),a!==null&&(is(a,v,E,N),tc(a,v,E)),E}function Sc(a){if(a=a.current,!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function Px(a,c){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var f=a.retryLane;a.retryLane=f!==0&&f<c?f:c}}function Uh(a,c){Px(a,c),(a=a.alternate)&&Px(a,c)}function d6(){return null}var Rx=typeof reportError=="function"?reportError:function(a){console.error(a)};function Hh(a){this._internalRoot=a}Cc.prototype.render=Hh.prototype.render=function(a){var c=this._internalRoot;if(c===null)throw Error(s(409));Nc(a,c,null,null)},Cc.prototype.unmount=Hh.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var c=a.containerInfo;Wr(function(){Nc(null,a,null,null)}),c[qs]=null}};function Cc(a){this._internalRoot=a}Cc.prototype.unstable_scheduleHydration=function(a){if(a){var c=m0();a={blockedOn:null,target:a,priority:c};for(var f=0;f<rr.length&&c!==0&&c<rr[f].priority;f++);rr.splice(f,0,a),f===0&&y0(a)}};function Vh(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function $c(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11&&(a.nodeType!==8||a.nodeValue!==" react-mount-point-unstable "))}function Ix(){}function u6(a,c,f,g,v){if(v){if(typeof g=="function"){var N=g;g=function(){var X=Sc(E);N.call(X)}}var E=Ax(c,g,a,0,null,!1,!1,"",Ix);return a._reactRootContainer=E,a[qs]=E.current,Wa(a.nodeType===8?a.parentNode:a),Wr(),E}for(;v=a.lastChild;)a.removeChild(v);if(typeof g=="function"){var O=g;g=function(){var X=Sc(H);O.call(X)}}var H=Wh(a,0,!1,null,null,!1,!1,"",Ix);return a._reactRootContainer=H,a[qs]=H.current,Wa(a.nodeType===8?a.parentNode:a),Wr(function(){Nc(c,H,f,g)}),H}function Tc(a,c,f,g,v){var N=f._reactRootContainer;if(N){var E=N;if(typeof v=="function"){var O=v;v=function(){var H=Sc(E);O.call(H)}}Nc(c,E,a,v)}else E=u6(f,c,a,v,g);return Sc(E)}p0=function(a){switch(a.tag){case 3:var c=a.stateNode;if(c.current.memoizedState.isDehydrated){var f=Ta(c.pendingLanes);f!==0&&(gu(c,f|1),un(c,jt()),(Ye&6)===0&&(Di=jt()+500,dr()))}break;case 13:Wr(function(){var g=_s(a,1);if(g!==null){var v=tn();is(g,a,1,v)}}),Uh(a,1)}},xu=function(a){if(a.tag===13){var c=_s(a,134217728);if(c!==null){var f=tn();is(c,a,134217728,f)}Uh(a,134217728)}},f0=function(a){if(a.tag===13){var c=gr(a),f=_s(a,c);if(f!==null){var g=tn();is(f,a,c,g)}Uh(a,c)}},m0=function(){return Xe},g0=function(a,c){var f=Xe;try{return Xe=a,c()}finally{Xe=f}},rt=function(a,c,f){switch(c){case"input":if(zn(a,f),c=f.name,f.type==="radio"&&c!=null){for(f=a;f.parentNode;)f=f.parentNode;for(f=f.querySelectorAll("input[name="+JSON.stringify(""+c)+'][type="radio"]'),c=0;c<f.length;c++){var g=f[c];if(g!==a&&g.form===a.form){var v=Hl(g);if(!v)throw Error(s(90));Xt(g),zn(g,v)}}}break;case"textarea":gs(a,f);break;case"select":c=f.value,c!=null&&sn(a,!!f.multiple,c,!1)}},e0=Lh,t0=Wr;var h6={usingClientEntryPoint:!1,Events:[Va,Ti,Hl,X1,J1,Lh]},ao={findFiberByHostInstance:zr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},p6={bundleType:ao.bundleType,version:ao.version,rendererPackageName:ao.rendererPackageName,rendererConfig:ao.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:A.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){return a=i0(a),a===null?null:a.stateNode},findFiberByHostInstance:ao.findFiberByHostInstance||d6,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 Ec=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ec.isDisabled&&Ec.supportsFiber)try{Cl=Ec.inject(p6),ys=Ec}catch{}}return hn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=h6,hn.createPortal=function(a,c){var f=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Vh(c))throw Error(s(200));return c6(a,c,null,f)},hn.createRoot=function(a,c){if(!Vh(a))throw Error(s(299));var f=!1,g="",v=Rx;return c!=null&&(c.unstable_strictMode===!0&&(f=!0),c.identifierPrefix!==void 0&&(g=c.identifierPrefix),c.onRecoverableError!==void 0&&(v=c.onRecoverableError)),c=Wh(a,1,!1,null,null,f,!1,g,v),a[qs]=c.current,Wa(a.nodeType===8?a.parentNode:a),new Hh(c)},hn.findDOMNode=function(a){if(a==null)return null;if(a.nodeType===1)return a;var c=a._reactInternals;if(c===void 0)throw typeof a.render=="function"?Error(s(188)):(a=Object.keys(a).join(","),Error(s(268,a)));return a=i0(c),a=a===null?null:a.stateNode,a},hn.flushSync=function(a){return Wr(a)},hn.hydrate=function(a,c,f){if(!$c(c))throw Error(s(200));return Tc(null,a,c,!0,f)},hn.hydrateRoot=function(a,c,f){if(!Vh(a))throw Error(s(405));var g=f!=null&&f.hydratedSources||null,v=!1,N="",E=Rx;if(f!=null&&(f.unstable_strictMode===!0&&(v=!0),f.identifierPrefix!==void 0&&(N=f.identifierPrefix),f.onRecoverableError!==void 0&&(E=f.onRecoverableError)),c=Ax(c,null,a,1,f??null,v,!1,N,E),a[qs]=c.current,Wa(a),g)for(a=0;a<g.length;a++)f=g[a],v=f._getVersion,v=v(f._source),c.mutableSourceEagerHydrationData==null?c.mutableSourceEagerHydrationData=[f,v]:c.mutableSourceEagerHydrationData.push(f,v);return new Cc(c)},hn.render=function(a,c,f){if(!$c(c))throw Error(s(200));return Tc(null,a,c,!1,f)},hn.unmountComponentAtNode=function(a){if(!$c(a))throw Error(s(40));return a._reactRootContainer?(Wr(function(){Tc(null,null,a,!1,function(){a._reactRootContainer=null,a[qs]=null})}),!0):!1},hn.unstable_batchedUpdates=Lh,hn.unstable_renderSubtreeIntoContainer=function(a,c,f,g){if(!$c(f))throw Error(s(200));if(a==null||a._reactInternals===void 0)throw Error(s(38));return Tc(a,c,f,!1,g)},hn.version="18.3.1-next-f1338f8080-20240426",hn}var Dx;function _j(){if(Dx)return Gh.exports;Dx=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(),Gh.exports=k6(),Gh.exports}var Bx;function v6(){if(Bx)return Ac;Bx=1;var e=_j();return Ac.createRoot=e.createRoot,Ac.hydrateRoot=e.hydrateRoot,Ac}var b6=v6(),ui=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(){}},w6=class extends ui{#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"}},tm=new w6,N6={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)},S6=class{#t=N6;#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)}},Zr=new S6;function C6(e){setTimeout(e,0)}var $6=typeof window>"u"||"Deno"in globalThis;function Vt(){}function T6(e,n){return typeof e=="function"?e(n):e}function Qp(e){return typeof e=="number"&&e>=0&&e!==1/0}function Dj(e,n){return Math.max(e+(n||0)-Date.now(),0)}function Cr(e,n){return typeof e=="function"?e(n):e}function $n(e,n){return typeof e=="function"?e(n):e}function Wx(e,n){const{type:s="all",exact:r,fetchStatus:i,predicate:o,queryKey:l,stale:d}=e;if(l){if(r){if(n.queryHash!==nm(l,n.options))return!1}else if(!$o(n.queryKey,l))return!1}if(s!=="all"){const u=n.isActive();if(s==="active"&&!u||s==="inactive"&&u)return!1}return!(typeof d=="boolean"&&n.isStale()!==d||i&&i!==n.state.fetchStatus||o&&!o(n))}function Ux(e,n){const{exact:s,status:r,predicate:i,mutationKey:o}=e;if(o){if(!n.options.mutationKey)return!1;if(s){if(ii(n.options.mutationKey)!==ii(o))return!1}else if(!$o(n.options.mutationKey,o))return!1}return!(r&&n.state.status!==r||i&&!i(n))}function nm(e,n){return(n?.queryKeyHashFn||ii)(e)}function ii(e){return JSON.stringify(e,(n,s)=>Zp(s)?Object.keys(s).sort().reduce((r,i)=>(r[i]=s[i],r),{}):s)}function $o(e,n){return e===n?!0:typeof e!=typeof n?!1:e&&n&&typeof e=="object"&&typeof n=="object"?Object.keys(n).every(s=>$o(e[s],n[s])):!1}var E6=Object.prototype.hasOwnProperty;function sm(e,n,s=0){if(e===n)return e;if(s>500)return n;const r=Hx(e)&&Hx(n);if(!r&&!(Zp(e)&&Zp(n)))return n;const o=(r?e:Object.keys(e)).length,l=r?n:Object.keys(n),d=l.length,u=r?new Array(d):{};let h=0;for(let m=0;m<d;m++){const p=r?m:l[m],x=e[p],y=n[p];if(x===y){u[p]=x,(r?m<o:E6.call(e,p))&&h++;continue}if(x===null||y===null||typeof x!="object"||typeof y!="object"){u[p]=y;continue}const j=sm(x,y,s+1);u[p]=j,j===x&&h++}return o===d&&h===o?e:u}function To(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 Hx(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Zp(e){if(!Vx(e))return!1;const n=e.constructor;if(n===void 0)return!0;const s=n.prototype;return!(!Vx(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Vx(e){return Object.prototype.toString.call(e)==="[object Object]"}function A6(e){return new Promise(n=>{Zr.setTimeout(n,e)})}function Xp(e,n,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,n):s.structuralSharing!==!1?sm(e,n):n}function P6(e){return e}function R6(e,n,s=0){const r=[...e,n];return s&&r.length>s?r.slice(1):r}function I6(e,n,s=0){const r=[n,...e];return s&&r.length>s?r.slice(0,-1):r}var rm=Symbol();function Bj(e,n){return!e.queryFn&&n?.initialPromise?()=>n.initialPromise:!e.queryFn||e.queryFn===rm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function im(e,n){return typeof e=="function"?e(...n):!!e}function F6(e,n,s){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=n(),r||(r=!0,i.aborted?s():i.addEventListener("abort",s,{once:!0})),i)}),e}var Eo=(()=>{let e=()=>$6;return{isServer(){return e()},setIsServer(n){e=n}}})();function Jp(){let e,n;const s=new Promise((i,o)=>{e=i,n=o});s.status="pending",s.catch(()=>{});function r(i){Object.assign(s,i),delete s.resolve,delete s.reject}return s.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},s.reject=i=>{r({status:"rejected",reason:i}),n(i)},s}var z6=C6;function q6(){let e=[],n=0,s=d=>{d()},r=d=>{d()},i=z6;const o=d=>{n?e.push(d):i(()=>{s(d)})},l=()=>{const d=e;e=[],d.length&&i(()=>{r(()=>{d.forEach(u=>{s(u)})})})};return{batch:d=>{let u;n++;try{u=d()}finally{n--,n||l()}return u},batchCalls:d=>(...u)=>{o(()=>{d(...u)})},schedule:o,setNotifyFunction:d=>{s=d},setBatchNotifyFunction:d=>{r=d},setScheduler:d=>{i=d}}}var gt=q6(),L6=class extends ui{#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}},id=new L6;function M6(e){return Math.min(1e3*2**e,3e4)}function Wj(e){return(e??"online")==="online"?id.isOnline():!0}var ef=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Uj(e){let n=!1,s=0,r;const i=Jp(),o=()=>i.status!=="pending",l=k=>{if(!o()){const b=new ef(k);x(b),e.onCancel?.(b)}},d=()=>{n=!0},u=()=>{n=!1},h=()=>tm.isFocused()&&(e.networkMode==="always"||id.isOnline())&&e.canRun(),m=()=>Wj(e.networkMode)&&e.canRun(),p=k=>{o()||(r?.(),i.resolve(k))},x=k=>{o()||(r?.(),i.reject(k))},y=()=>new Promise(k=>{r=b=>{(o()||h())&&k(b)},e.onPause?.()}).then(()=>{r=void 0,o()||e.onContinue?.()}),j=()=>{if(o())return;let k;const b=s===0?e.initialPromise:void 0;try{k=b??e.fn()}catch(w){k=Promise.reject(w)}Promise.resolve(k).then(p).catch(w=>{if(o())return;const S=e.retry??(Eo.isServer()?0:3),T=e.retryDelay??M6,A=typeof T=="function"?T(s,w):T,D=S===!0||typeof S=="number"&&s<S||typeof S=="function"&&S(s,w);if(n||!D){x(w);return}s++,e.onFail?.(s,w),A6(A).then(()=>h()?void 0:y()).then(()=>{n?x(w):j()})})};return{promise:i,status:()=>i.status,cancel:l,continue:()=>(r?.(),i),cancelRetry:d,continueRetry:u,canStart:m,start:()=>(m()?j():y().then(j),i)}}var Hj=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Qp(this.gcTime)&&(this.#t=Zr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Eo.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#t!==void 0&&(Zr.clearTimeout(this.#t),this.#t=void 0)}};function O6(e){return{onFetch:(n,s)=>{const r=n.options,i=n.fetchOptions?.meta?.fetchMore?.direction,o=n.state.data?.pages||[],l=n.state.data?.pageParams||[];let d={pages:[],pageParams:[]},u=0;const h=async()=>{let m=!1;const p=j=>{F6(j,()=>n.signal,()=>m=!0)},x=Bj(n.options,n.fetchOptions),y=async(j,k,b)=>{if(m)return Promise.reject(n.signal.reason);if(k==null&&j.pages.length)return Promise.resolve(j);const S=(()=>{const $={client:n.client,queryKey:n.queryKey,pageParam:k,direction:b?"backward":"forward",meta:n.options.meta};return p($),$})(),T=await x(S),{maxPages:A}=n.options,D=b?I6:R6;return{pages:D(j.pages,T,A),pageParams:D(j.pageParams,k,A)}};if(i&&o.length){const j=i==="backward",k=j?_6:Kx,b={pages:o,pageParams:l},w=k(r,b);d=await y(b,w,j)}else{const j=e??o.length;do{const k=u===0?l[0]??r.initialPageParam:Kx(r,d);if(u>0&&k==null)break;d=await y(d,k),u++}while(u<j)}return d};n.options.persister?n.fetchFn=()=>n.options.persister?.(h,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},s):n.fetchFn=h}}}function Kx(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 _6(e,{pages:n,pageParams:s}){return n.length>0?e.getPreviousPageParam?.(n[0],n,s[0],s):void 0}var D6=class extends Hj{#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=Gx(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=Gx(this.options);n.data!==void 0&&(this.setState(Yx(n.data,n.dataUpdatedAt)),this.#e=n)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#s.remove(this)}setData(e,n){const s=Xp(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(Vt).catch(Vt):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=>$n(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===rm||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Cr(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:!Dj(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.#d()?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#s.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#d(){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 u=this.observers.find(h=>h.options.queryFn);u&&this.setOptions(u.options)}const s=new AbortController,r=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(this.#a=!0,s.signal)})},i=()=>{const u=Bj(this.options,n),m=(()=>{const p={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(p),p})();return this.#a=!1,this.options.persister?this.options.persister(u,m,this):u(m)},l=(()=>{const u={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return r(u),u})();(this.#t==="infinite"?O6(this.options.pages):this.options.behavior)?.onFetch(l,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==l.fetchOptions?.meta)&&this.#l({type:"fetch",meta:l.fetchOptions?.meta}),this.#i=Uj({initialPromise:n?.initialPromise,fn:l.fetchFn,onCancel:u=>{u instanceof ef&&u.revert&&this.setState({...this.#n,fetchStatus:"idle"}),s.abort()},onFail:(u,h)=>{this.#l({type:"failed",failureCount:u,error:h})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0});try{const u=await this.#i.start();if(u===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(u),this.#s.config.onSuccess?.(u,this),this.#s.config.onSettled?.(u,this.state.error,this),u}catch(u){if(u instanceof ef){if(u.silent)return this.#i.promise;if(u.revert){if(this.state.data===void 0)throw u;return this.state.data}}throw this.#l({type:"error",error:u}),this.#s.config.onError?.(u,this),this.#s.config.onSettled?.(this.state.data,u,this),u}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,...Vj(s.data,this.options),fetchMeta:e.meta??null};case"success":const r={...s,...Yx(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 i=e.error;return{...s,error:i,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...e.state}}};this.state=n(this.state),gt.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#s.notify({query:this,type:"updated",action:e})})}};function Vj(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Wj(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Yx(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Gx(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 am=class extends ui{constructor(e,n){super(),this.options=n,this.#t=e,this.#a=null,this.#o=Jp(),this.bindMethods(),this.setOptions(n)}#t;#e=void 0;#n=void 0;#s=void 0;#r;#i;#o;#a;#d;#l;#p;#u;#f;#c;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),Qx(this.#e,this.options)?this.#h():this.updateResult(),this.#j())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return tf(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return tf(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#k(),this.#v(),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 $n(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&&!To(this.options,n)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const r=this.hasListeners();r&&Zx(this.#e,s,this.options,n)&&this.#h(),this.updateResult(),r&&(this.#e!==s||$n(this.options.enabled,this.#e)!==$n(n.enabled,this.#e)||Cr(this.options.staleTime,this.#e)!==Cr(n.staleTime,this.#e))&&this.#g();const i=this.#x();r&&(this.#e!==s||$n(this.options.enabled,this.#e)!==$n(n.enabled,this.#e)||i!==this.#c)&&this.#y(i)}getOptimisticResult(e){const n=this.#t.getQueryCache().build(this.#t,e),s=this.createResult(n,e);return W6(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(Vt)),n}#g(){this.#k();const e=Cr(this.options.staleTime,this.#e);if(Eo.isServer()||this.#s.isStale||!Qp(e))return;const s=Dj(this.#s.dataUpdatedAt,e)+1;this.#u=Zr.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.#v(),this.#c=e,!(Eo.isServer()||$n(this.options.enabled,this.#e)===!1||!Qp(this.#c)||this.#c===0)&&(this.#f=Zr.setInterval(()=>{(this.options.refetchIntervalInBackground||tm.isFocused())&&this.#h()},this.#c))}#j(){this.#g(),this.#y(this.#x())}#k(){this.#u!==void 0&&(Zr.clearTimeout(this.#u),this.#u=void 0)}#v(){this.#f!==void 0&&(Zr.clearInterval(this.#f),this.#f=void 0)}createResult(e,n){const s=this.#e,r=this.options,i=this.#s,o=this.#r,l=this.#i,u=e!==s?e.state:this.#n,{state:h}=e;let m={...h},p=!1,x;if(n._optimisticResults){const F=this.hasListeners(),_=!F&&Qx(e,n),z=F&&Zx(e,s,n,r);(_||z)&&(m={...m,...Vj(h.data,e.options)}),n._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:y,errorUpdatedAt:j,status:k}=m;x=m.data;let b=!1;if(n.placeholderData!==void 0&&x===void 0&&k==="pending"){let F;i?.isPlaceholderData&&n.placeholderData===l?.placeholderData?(F=i.data,b=!0):F=typeof n.placeholderData=="function"?n.placeholderData(this.#p?.state.data,this.#p):n.placeholderData,F!==void 0&&(k="success",x=Xp(i?.data,F,n),p=!0)}if(n.select&&x!==void 0&&!b)if(i&&x===o?.data&&n.select===this.#d)x=this.#l;else try{this.#d=n.select,x=n.select(x),x=Xp(i?.data,x,n),this.#l=x,this.#a=null}catch(F){this.#a=F}this.#a&&(y=this.#a,x=this.#l,j=Date.now(),k="error");const w=m.fetchStatus==="fetching",S=k==="pending",T=k==="error",A=S&&w,D=x!==void 0,P={status:k,fetchStatus:m.fetchStatus,isPending:S,isSuccess:k==="success",isError:T,isInitialLoading:A,isLoading:A,data:x,dataUpdatedAt:m.dataUpdatedAt,error:y,errorUpdatedAt:j,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:m.dataUpdateCount>u.dataUpdateCount||m.errorUpdateCount>u.errorUpdateCount,isFetching:w,isRefetching:w&&!S,isLoadingError:T&&!D,isPaused:m.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:T&&D,isStale:om(e,n),refetch:this.refetch,promise:this.#o,isEnabled:$n(n.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const F=P.data!==void 0,_=P.status==="error"&&!F,z=W=>{_?W.reject(P.error):F&&W.resolve(P.data)},U=()=>{const W=this.#o=P.promise=Jp();z(W)},I=this.#o;switch(I.status){case"pending":e.queryHash===s.queryHash&&z(I);break;case"fulfilled":(_||P.data!==I.value)&&U();break;case"rejected":(!_||P.error!==I.reason)&&U();break}}return P}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),To(n,e))return;this.#s=n;const s=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,i=typeof r=="function"?r():r;if(i==="all"||!i&&!this.#m.size)return!0;const o=new Set(i??this.#m);return this.options.throwOnError&&o.add("error"),Object.keys(this.#s).some(l=>{const d=l;return this.#s[d]!==e[d]&&o.has(d)})};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.#j()}#w(e){gt.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(this.#s)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function B6(e,n){return $n(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&$n(n.retryOnMount,e)===!1)}function Qx(e,n){return B6(e,n)||e.state.data!==void 0&&tf(e,n,n.refetchOnMount)}function tf(e,n,s){if($n(n.enabled,e)!==!1&&Cr(n.staleTime,e)!=="static"){const r=typeof s=="function"?s(e):s;return r==="always"||r!==!1&&om(e,n)}return!1}function Zx(e,n,s,r){return(e!==n||$n(r.enabled,e)===!1)&&(!s.suspense||e.state.status!=="error")&&om(e,s)}function om(e,n){return $n(n.enabled,e)!==!1&&e.isStaleByTime(Cr(n.staleTime,e))}function W6(e,n){return!To(e.getCurrentResult(),n)}var U6=class extends Hj{#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||Kj(),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=Uj({fn:()=>this.options.mutationFn?this.options.mutationFn(e,s):Promise.reject(new Error("No mutationFn found")),onFail:(o,l)=>{this.#r({type:"failed",failureCount:o,error:l})},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",i=!this.#s.canStart();try{if(r)n();else{this.#r({type:"pending",variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,s);const l=await this.options.onMutate?.(e,s);l!==this.state.context&&this.#r({type:"pending",context:l,variables:e,isPaused:i})}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(l){Promise.reject(l)}try{await this.options.onError?.(o,e,this.state.context,s)}catch(l){Promise.reject(l)}try{await this.#n.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this,s)}catch(l){Promise.reject(l)}try{await this.options.onSettled?.(void 0,o,e,this.state.context,s)}catch(l){Promise.reject(l)}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),gt.batch(()=>{this.#e.forEach(s=>{s.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function Kj(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var H6=class extends ui{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 U6({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=Pc(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=Pc(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=Pc(e);if(typeof n=="string"){const r=this.#e.get(n)?.find(i=>i.state.status==="pending");return!r||r===e}else return!0}runNext(e){const n=Pc(e);return typeof n=="string"?this.#e.get(n)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){gt.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=>Ux(n,s))}findAll(e={}){return this.getAll().filter(n=>Ux(e,n))}notify(e){gt.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return gt.batch(()=>Promise.all(e.map(n=>n.continue().catch(Vt))))}};function Pc(e){return e.options.scope?.id}var V6=class extends ui{#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),To(this.options,s)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),s?.mutationKey&&this.options.mutationKey&&ii(s.mutationKey)!==ii(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??Kj();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){gt.batch(()=>{if(this.#s&&this.hasListeners()){const s=this.#e.variables,r=this.#e.context,i={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(n?.type==="success"){try{this.#s.onSuccess?.(n.data,s,r,i)}catch(o){Promise.reject(o)}try{this.#s.onSettled?.(n.data,null,s,r,i)}catch(o){Promise.reject(o)}}else if(n?.type==="error"){try{this.#s.onError?.(n.error,s,r,i)}catch(o){Promise.reject(o)}try{this.#s.onSettled?.(void 0,n.error,s,r,i)}catch(o){Promise.reject(o)}}}this.listeners.forEach(s=>{s(this.#e)})})}};function Xx(e,n){const s=new Set(n);return e.filter(r=>!s.has(r))}function K6(e,n,s){const r=e.slice(0);return r[n]=s,r}var Y6=class extends ui{#t;#e;#n;#s;#r;#i;#o;#a;#d;#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,gt.batch(()=>{const s=this.#r,r=this.#c(this.#n);r.forEach(m=>m.observer.setOptions(m.defaultedQueryOptions));const i=r.map(m=>m.observer),o=i.map(m=>m.getCurrentResult()),l=s.length!==i.length,d=i.some((m,p)=>m!==s[p]),u=l||d,h=u?!0:o.some((m,p)=>{const x=this.#e[p];return!x||!To(m,x)});!u&&!h||(u&&(this.#l=r,this.#r=i),this.#e=o,this.hasListeners()&&(u&&(Xx(s,i).forEach(m=>{m.destroy()}),Xx(i,s).forEach(m=>{m.subscribe(p=>{this.#m(m,p)})})),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)),i=s.map(o=>o.defaultedQueryOptions.queryHash);return[r,o=>this.#u(o??r,n,i),()=>this.#p(r,s)]}#p(e,n){return n.map((s,r)=>{const i=e[r];return s.defaultedQueryOptions.notifyOnChangeProps?i:s.observer.trackResult(i,o=>{n.forEach(l=>{l.observer.trackProp(o)})})})}#u(e,n,s){if(n){const r=this.#d,i=s!==void 0&&r!==void 0&&(r.length!==s.length||s.some((o,l)=>o!==r[l]));return(!this.#i||this.#e!==this.#a||i||n!==this.#o)&&(this.#o=n,this.#a=this.#e,s!==void 0&&(this.#d=s),this.#i=sm(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 i=r.options.queryHash;if(!i)return;const o=n.get(i);o?o.push(r):n.set(i,[r])});const s=[];return e.forEach(r=>{const i=this.#t.defaultQueryOptions(r),l=n.get(i.queryHash)?.shift()??new am(this.#t,i);s.push({defaultedQueryOptions:i,observer:l})}),s}#m(e,n){const s=this.#r.indexOf(e);s!==-1&&(this.#e=K6(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.#u(e,this.#s?.combine);(n||s!==r)&>.batch(()=>{this.listeners.forEach(i=>{i(this.#e)})})}}},G6=class extends ui{constructor(e={}){super(),this.config=e,this.#t=new Map}#t;build(e,n,s){const r=n.queryKey,i=n.queryHash??nm(r,n);let o=this.get(i);return o||(o=new D6({client:e,queryKey:r,queryHash:i,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(){gt.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=>Wx(n,s))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(s=>Wx(e,s)):n}notify(e){gt.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){gt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){gt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Q6=class{#t;#e;#n;#s;#r;#i;#o;#a;constructor(e={}){this.#t=e.queryCache||new G6,this.#e=e.mutationCache||new H6,this.#n=e.defaultOptions||{},this.#s=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#o=tm.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#a=id.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(Cr(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,l=T6(n,o);if(l!==void 0)return this.#t.build(this,r).setData(l,{...s,manual:!0})}setQueriesData(e,n,s){return gt.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;gt.batch(()=>{n.findAll(e).forEach(s=>{n.remove(s)})})}resetQueries(e,n){const s=this.#t;return gt.batch(()=>(s.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},n)))}cancelQueries(e,n={}){const s={revert:!0,...n},r=gt.batch(()=>this.#t.findAll(e).map(i=>i.cancel(s)));return Promise.all(r).then(Vt).catch(Vt)}invalidateQueries(e,n={}){return gt.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=gt.batch(()=>this.#t.findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,s);return s.throwOnError||(o=o.catch(Vt)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Vt)}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const s=this.#t.build(this,n);return s.isStaleByTime(Cr(n.staleTime,s))?s.fetch(n):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Vt).catch(Vt)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Vt).catch(Vt)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return id.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(ii(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...this.#s.values()],s={};return n.forEach(r=>{$o(e,r.queryKey)&&Object.assign(s,r.defaultOptions)}),s}setMutationDefaults(e,n){this.#r.set(ii(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...this.#r.values()],s={};return n.forEach(r=>{$o(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=nm(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===rm&&(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()}},Yj=C.createContext(void 0),In=e=>{const n=C.useContext(Yj);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},Z6=({client:e,children:n})=>(C.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),t.jsx(Yj.Provider,{value:e,children:n})),Gj=C.createContext(!1),Qj=()=>C.useContext(Gj);Gj.Provider;function X6(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var J6=C.createContext(X6()),Zj=()=>C.useContext(J6),Xj=(e,n,s)=>{const r=s?.state.error&&typeof e.throwOnError=="function"?im(e.throwOnError,[s.state.error,s]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(n.isReset()||(e.retryOnMount=!1))},Jj=e=>{C.useEffect(()=>{e.clearReset()},[e])},ek=({result:e,errorResetBoundary:n,throwOnError:s,query:r,suspense:i})=>e.isError&&!n.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||im(s,[e.error,r])),tk=e=>{if(e.suspense){const s=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>s(r(...i)):s(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},e8=(e,n)=>e.isLoading&&e.isFetching&&!n,nf=(e,n)=>e?.suspense&&n.isPending,sf=(e,n,s)=>n.fetchOptimistic(e).catch(()=>{s.clearReset()});function t8({queries:e,...n},s){const r=In(),i=Qj(),o=Zj(),l=C.useMemo(()=>e.map(k=>{const b=r.defaultQueryOptions(k);return b._optimisticResults=i?"isRestoring":"optimistic",b}),[e,r,i]);l.forEach(k=>{tk(k);const b=r.getQueryCache().get(k.queryHash);Xj(k,o,b)}),Jj(o);const[d]=C.useState(()=>new Y6(r,l,n)),[u,h,m]=d.getOptimisticResult(l,n.combine),p=!i&&n.subscribed!==!1;C.useSyncExternalStore(C.useCallback(k=>p?d.subscribe(gt.batchCalls(k)):Vt,[d,p]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),C.useEffect(()=>{d.setQueries(l,n)},[l,n,d]);const y=u.some((k,b)=>nf(l[b],k))?u.flatMap((k,b)=>{const w=l[b];if(w&&nf(w,k)){const S=new am(r,w);return sf(w,S,o)}return[]}):[];if(y.length>0)throw Promise.all(y);const j=u.find((k,b)=>{const w=l[b];return w&&ek({result:k,errorResetBoundary:o,throwOnError:w.throwOnError,query:r.getQueryCache().get(w.queryHash),suspense:w.suspense})});if(j?.error)throw j.error;return h(m())}function n8(e,n,s){const r=Qj(),i=Zj(),o=In(),l=o.defaultQueryOptions(e);o.getDefaultOptions().queries?._experimental_beforeQuery?.(l);const d=o.getQueryCache().get(l.queryHash);l._optimisticResults=r?"isRestoring":"optimistic",tk(l),Xj(l,i,d),Jj(i);const u=!o.getQueryCache().get(l.queryHash),[h]=C.useState(()=>new n(o,l)),m=h.getOptimisticResult(l),p=!r&&e.subscribed!==!1;if(C.useSyncExternalStore(C.useCallback(x=>{const y=p?h.subscribe(gt.batchCalls(x)):Vt;return h.updateResult(),y},[h,p]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),C.useEffect(()=>{h.setOptions(l)},[l,h]),nf(l,m))throw sf(l,h,i);if(ek({result:m,errorResetBoundary:i,throwOnError:l.throwOnError,query:d,suspense:l.suspense}))throw m.error;return o.getDefaultOptions().queries?._experimental_afterQuery?.(l,m),l.experimental_prefetchInRender&&!Eo.isServer()&&e8(m,r)&&(u?sf(l,h,i):d?.promise)?.catch(Vt).finally(()=>{h.updateResult()}),l.notifyOnChangeProps?m:h.trackResult(m)}function we(e,n){return n8(e,am)}function nk(e,n){const s=In(),[r]=C.useState(()=>new V6(s,e));C.useEffect(()=>{r.setOptions(e)},[r,e]);const i=C.useSyncExternalStore(C.useCallback(l=>r.subscribe(gt.batchCalls(l)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=C.useCallback((l,d)=>{r.mutate(l,d).catch(Vt)},[r]);if(i.error&&im(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}var yo=typeof window<"u"?C.useLayoutEffect:C.useEffect;function Xh(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 s8(e,n,s={},r={}){C.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const i=new IntersectionObserver(([o])=>{n(o)},s);return i.observe(e.current),()=>{i.disconnect()}},[n,s,r.disabled,e])}function r8(e){const n=C.useRef(null);return C.useImperativeHandle(e,()=>n.current,[]),n}const sk=!1;function Ao(e){return e[e.length-1]}function i8(e){return typeof e=="function"}function br(e,n){return i8(e)?e(n):e}const rk=Object.prototype.hasOwnProperty,Jx=Object.prototype.propertyIsEnumerable;function ik(e){for(const n in e)if(rk.call(e,n))return!0;return!1}const a8=()=>Object.create(null),Kr=(e,n)=>wr(e,n,a8);function wr(e,n,s=()=>({}),r=0){if(e===n)return e;if(r>500)return n;const i=n,o=ny(e)&&ny(i);if(!o&&!(Ji(e)&&Ji(i)))return i;const l=o?e:ey(e);if(!l)return i;const d=o?i:ey(i);if(!d)return i;const u=l.length,h=d.length,m=o?new Array(h):s();let p=0;for(let x=0;x<h;x++){const y=o?x:d[x],j=e[y],k=i[y];if(j===k){m[y]=j,(o?x<u:rk.call(e,y))&&p++;continue}if(j===null||k===null||typeof j!="object"||typeof k!="object"){m[y]=k;continue}const b=wr(j,k,s,r+1);m[y]=b,b===j&&p++}return u===h&&p===u?e:m}function ey(e){const n=Object.getOwnPropertyNames(e);for(const i of n)if(!Jx.call(e,i))return!1;const s=Object.getOwnPropertySymbols(e);if(s.length===0)return n;const r=n;for(const i of s){if(!Jx.call(e,i))return!1;r.push(i)}return r}function Ji(e){if(!ty(e))return!1;const n=e.constructor;if(typeof n>"u")return!0;const s=n.prototype;return!(!ty(s)||!s.hasOwnProperty("isPrototypeOf"))}function ty(e){return Object.prototype.toString.call(e)==="[object Object]"}function ny(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Jr(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,i=e.length;r<i;r++)if(!Jr(e[r],n[r],s))return!1;return!0}if(Ji(e)&&Ji(n)){const r=s?.ignoreUndefined??!0;if(s?.partial){for(const l in n)if((!r||n[l]!==void 0)&&!Jr(e[l],n[l],s))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(const l in e)e[l]!==void 0&&i++;let o=0;for(const l in n)if((!r||n[l]!==void 0)&&(o++,o>i||!Jr(e[l],n[l],s)))return!1;return i===o}return!1}function ea(e){let n,s;const r=new Promise((i,o)=>{n=i,s=o});return r.status="pending",r.resolve=i=>{r.status="resolved",r.value=i,n(i),e?.(i)},r.reject=i=>{r.status="rejected",s(i)},r}function Po(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function o8(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function sy(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 o8(n)}const l8=["http:","https:","mailto:","tel:"];function ad(e,n){if(!e)return!1;try{const s=new URL(e);return!n.has(s.protocol)}catch{return!1}}function lo(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="",i;for(;(i=n.exec(e))!==null;)r+=sy(e.slice(s,i.index))+i[0],s=n.lastIndex;r=r+sy(s?e.slice(s):e);let o=!1;return r.startsWith("//")&&(o=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:o}}function c8(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function d8(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 Ks(){throw new Error("Invariant failed")}function Ro(e){const n=new Map;let s,r;const i=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 l=n.get(o);if(l)return i(l),l.value},set(o,l){if(n.size>=e&&s){const u=s;n.delete(u.key),u.next&&(s=u.next,u.next.prev=void 0),u===r&&(r=void 0)}const d=n.get(o);if(d)d.value=l,i(d);else{const u={key:o,value:l,prev:r};r&&(r.next=u),r=u,s||(s=u),n.set(o,u)}},clear(){n.clear(),s=void 0,r=void 0}}}const Nr=4,ak=5;function u8(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 ok(e,n,s=new Uint16Array(6)){const r=e.indexOf("/",n),i=r===-1?e.length:r,o=e.substring(n,i);if(!o||!o.includes("$"))return s[0]=0,s[1]=n,s[2]=n,s[3]=i,s[4]=i,s[5]=i,s;if(o==="$"){const d=e.length;return s[0]=2,s[1]=n,s[2]=n,s[3]=d,s[4]=d,s[5]=d,s}if(o.charCodeAt(0)===36)return s[0]=1,s[1]=n,s[2]=n+1,s[3]=i,s[4]=i,s[5]=i,s;const l=u8(o);if(l){const[d,u]=l,h=o.charCodeAt(d+1);if(h===45){if(d+2<o.length&&o.charCodeAt(d+2)===36){const m=d+3,p=u;if(m<p)return s[0]=3,s[1]=n+d,s[2]=n+m,s[3]=n+p,s[4]=n+u+1,s[5]=i,s}}else if(h===36){const m=d+1,p=d+2;return p===u?(s[0]=2,s[1]=n+d,s[2]=n+m,s[3]=n+p,s[4]=n+u+1,s[5]=e.length,s):(s[0]=1,s[1]=n+d,s[2]=n+p,s[3]=n+u,s[4]=n+u+1,s[5]=i,s)}}return s[0]=0,s[1]=n,s[2]=n,s[3]=i,s[4]=i,s[5]=i,s}function zd(e,n,s,r,i,o,l){l?.(s);let d=r;{const u=s.fullPath??s.from,h=u.length,m=s.options?.caseSensitive??e,p=s.options?.params?.parse??s.options?.parseParams;for(;d<h;){const y=ok(u,d,n);let j;const k=d,b=y[5];switch(d=b+1,o++,y[0]){case 0:{const w=u.substring(y[2],y[3]);if(m){const S=i.static?.get(w);if(S)j=S;else{i.static??=new Map;const T=Xr(s.fullPath??s.from);T.parent=i,T.depth=o,j=T,i.static.set(w,T)}}else{const S=w.toLowerCase(),T=i.staticInsensitive?.get(S);if(T)j=T;else{i.staticInsensitive??=new Map;const A=Xr(s.fullPath??s.from);A.parent=i,A.depth=o,j=A,i.staticInsensitive.set(S,A)}}break}case 1:{const w=u.substring(k,y[1]),S=u.substring(y[4],b),T=m&&!!(w||S),A=w?T?w:w.toLowerCase():void 0,D=S?T?S:S.toLowerCase():void 0,$=!p&&i.dynamic?.find(P=>!P.parse&&P.caseSensitive===T&&P.prefix===A&&P.suffix===D);if($)j=$;else{const P=ep(1,s.fullPath??s.from,T,A,D);j=P,P.depth=o,P.parent=i,i.dynamic??=[],i.dynamic.push(P)}break}case 3:{const w=u.substring(k,y[1]),S=u.substring(y[4],b),T=m&&!!(w||S),A=w?T?w:w.toLowerCase():void 0,D=S?T?S:S.toLowerCase():void 0,$=!p&&i.optional?.find(P=>!P.parse&&P.caseSensitive===T&&P.prefix===A&&P.suffix===D);if($)j=$;else{const P=ep(3,s.fullPath??s.from,T,A,D);j=P,P.parent=i,P.depth=o,i.optional??=[],i.optional.push(P)}break}case 2:{const w=u.substring(k,y[1]),S=u.substring(y[4],b),T=m&&!!(w||S),A=w?T?w:w.toLowerCase():void 0,D=S?T?S:S.toLowerCase():void 0,$=ep(2,s.fullPath??s.from,T,A,D);j=$,$.parent=i,$.depth=o,i.wildcard??=[],i.wildcard.push($)}}i=j}if(p&&s.children&&!s.isRoot&&s.id&&s.id.charCodeAt(s.id.lastIndexOf("/")+1)===95){const y=Xr(s.fullPath??s.from);y.kind=ak,y.parent=i,o++,y.depth=o,i.pathless??=[],i.pathless.push(y),i=y}const x=(s.path||!s.children)&&!s.isRoot;if(x&&u.endsWith("/")){const y=Xr(s.fullPath??s.from);y.kind=Nr,y.parent=i,o++,y.depth=o,i.index=y,i=y}i.parse=p??null,x&&!i.route&&(i.route=s,i.fullPath=s.fullPath??s.from)}if(s.children)for(const u of s.children)zd(e,n,u,d,i,o,l)}function Jh(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 vr(e){if(e.pathless)for(const n of e.pathless)vr(n);if(e.static)for(const n of e.static.values())vr(n);if(e.staticInsensitive)for(const n of e.staticInsensitive.values())vr(n);if(e.dynamic?.length){e.dynamic.sort(Jh);for(const n of e.dynamic)vr(n)}if(e.optional?.length){e.optional.sort(Jh);for(const n of e.optional)vr(n)}if(e.wildcard?.length){e.wildcard.sort(Jh);for(const n of e.wildcard)vr(n)}}function Xr(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 ep(e,n,s,r,i){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:i}}function h8(e,n){const s=Xr("/"),r=new Uint16Array(6);for(const i of e)zd(!1,r,i,1,s,0);vr(s),n.masksTree=s,n.flatCache=Ro(1e3)}function p8(e,n){e||="/";const s=n.flatCache.get(e);if(s)return s;const r=lm(e,n.masksTree);return n.flatCache.set(e,r),r}function f8(e,n,s,r,i){e||="/",r||="/";const o=n?`case\0${e}`:e;let l=i.singleCache.get(o);return l||(l=Xr("/"),zd(n,new Uint16Array(6),{from:e},1,l,0),i.singleCache.set(o,l)),lm(r,l,s)}function m8(e,n,s=!1){const r=s?e:`nofuzz\0${e}`,i=n.matchCache.get(r);if(i!==void 0)return i;e||="/";let o;try{o=lm(e,n.segmentTree,s)}catch(l){if(l instanceof URIError)o=null;else throw l}return o&&(o.branch=ck(o.route)),n.matchCache.set(r,o),o}function g8(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function x8(e,n=!1,s){const r=Xr(e.fullPath),i=new Uint16Array(6),o={},l={};let d=0;return zd(n,i,e,1,r,0,u=>{if(s?.(u,d),u.id in o&&Ks(),o[u.id]=u,d!==0&&u.path){const h=g8(u.fullPath);(!l[h]||u.fullPath.endsWith("/"))&&(l[h]=u)}d++}),vr(r),{processedTree:{segmentTree:r,singleCache:Ro(1e3),matchCache:Ro(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:l}}function lm(e,n,s=!1){const r=e.split("/"),i=j8(e,r,n,s);if(!i)return null;const[o]=lk(e,r,i);return{route:i.node.route,rawParams:o}}function lk(e,n,s){const r=y8(s.node);let i=null;const o=Object.create(null);let l=s.extract?.part??0,d=s.extract?.node??0,u=s.extract?.path??0,h=s.extract?.segment??0;for(;d<r.length;l++,d++,u++,h++){const m=r[d];if(m.kind===Nr)break;if(m.kind===ak){h--,l--,u--;continue}const p=n[l],x=u;if(p&&(u+=p.length),m.kind===1){i??=s.node.fullPath.split("/");const y=i[h],j=m.prefix?.length??0;if(y.charCodeAt(j)===123){const k=m.suffix?.length??0,b=y.substring(j+2,y.length-k-1),w=p.substring(j,p.length-k);o[b]=decodeURIComponent(w)}else{const k=y.substring(1);o[k]=decodeURIComponent(p)}}else if(m.kind===3){if(s.skipped&1<<d){l--,u=x-1;continue}i??=s.node.fullPath.split("/");const y=i[h],j=m.prefix?.length??0,k=m.suffix?.length??0,b=y.substring(j+3,y.length-k-1),w=m.suffix||m.prefix?p.substring(j,p.length-k):p;w&&(o[b]=decodeURIComponent(w))}else if(m.kind===2){const y=m,j=e.substring(x+(y.prefix?.length??0),e.length-(y.suffix?.length??0)),k=decodeURIComponent(j);o["*"]=k,o._splat=k;break}}return s.rawParams&&Object.assign(o,s.rawParams),[o,{part:l,node:d,path:u,segment:h}]}function ck(e){const n=[e];for(;e.parentRoute;)e=e.parentRoute,n.push(e);return n.reverse(),n}function y8(e){const n=Array(e.depth+1);do n[e.depth]=e,e=e.parent;while(e);return n}function j8(e,n,s,r){if(e==="/"&&s.index)return{node:s.index,skipped:0};const i=!Ao(n),o=i&&e!=="/",l=n.length-(i?1:0),d=[{node:s,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let u=null,h=null;for(;d.length;){const m=d.pop(),{node:p,index:x,skipped:y,depth:j,statics:k,dynamics:b,optionals:w}=m;let{extract:S,rawParams:T}=m;if(p.kind===2&&p.route&&!Ic(h,m))continue;if(p.parse){if(!ry(e,n,m))continue;T=m.rawParams,S=m.extract}r&&p.route&&p.kind!==Nr&&Ic(u,m)&&(u=m);const A=x===l;if(A&&(p.route&&(!o||p.kind===Nr||p.kind===2)&&Ic(h,m)&&(h=m),!p.optional&&!p.wildcard&&!p.index&&!p.pathless))continue;const D=A?void 0:n[x];let $;if(A&&p.index){const P={node:p.index,index:x,skipped:y,depth:j+1,statics:k,dynamics:b,optionals:w,extract:S,rawParams:T};let F=!0;if(p.index.parse&&(ry(e,n,P)||(F=!1)),F){if(!b&&!w&&!y&&k8(k,l))return P;Ic(h,P)&&(h=P)}}if(p.wildcard)for(let P=p.wildcard.length-1;P>=0;P--){const F=p.wildcard[P],{prefix:_,suffix:z}=F;if(!(_&&(A||!(F.caseSensitive?D:$??=D.toLowerCase()).startsWith(_)))){if(z){if(A)continue;const U=n.slice(x).join("/").slice(-z.length);if((F.caseSensitive?U:U.toLowerCase())!==z)continue}d.push({node:F,index:l,skipped:y,depth:j+1,statics:k,dynamics:b,optionals:w,extract:S,rawParams:T})}}if(p.optional){const P=y|1<<j,F=j+1;for(let _=p.optional.length-1;_>=0;_--){const z=p.optional[_];d.push({node:z,index:x,skipped:P,depth:F,statics:k,dynamics:b,optionals:w,extract:S,rawParams:T})}if(!A)for(let _=p.optional.length-1;_>=0;_--){const z=p.optional[_],{prefix:U,suffix:I}=z;if(U||I){const W=z.caseSensitive?D:$??=D.toLowerCase();if(U&&!W.startsWith(U)||I&&!W.endsWith(I))continue}d.push({node:z,index:x+1,skipped:y,depth:F,statics:k,dynamics:b,optionals:w+Rc(l,x),extract:S,rawParams:T})}}if(!A&&p.dynamic&&D)for(let P=p.dynamic.length-1;P>=0;P--){const F=p.dynamic[P],{prefix:_,suffix:z}=F;if(_||z){const U=F.caseSensitive?D:$??=D.toLowerCase();if(_&&!U.startsWith(_)||z&&!U.endsWith(z))continue}d.push({node:F,index:x+1,skipped:y,depth:j+1,statics:k,dynamics:b+Rc(l,x),optionals:w,extract:S,rawParams:T})}if(!A&&p.staticInsensitive){const P=p.staticInsensitive.get($??=D.toLowerCase());P&&d.push({node:P,index:x+1,skipped:y,depth:j+1,statics:k+Rc(l,x),dynamics:b,optionals:w,extract:S,rawParams:T})}if(!A&&p.static){const P=p.static.get(D);P&&d.push({node:P,index:x+1,skipped:y,depth:j+1,statics:k+Rc(l,x),dynamics:b,optionals:w,extract:S,rawParams:T})}if(p.pathless){const P=j+1;for(let F=p.pathless.length-1;F>=0;F--){const _=p.pathless[F];d.push({node:_,index:x,skipped:y,depth:P,statics:k,dynamics:b,optionals:w,extract:S,rawParams:T})}}}if(h)return h;if(r&&u){let m=u.index;for(let x=0;x<u.index;x++)m+=n[x].length;const p=m===e.length?"/":e.slice(m);return u.rawParams??=Object.create(null),u.rawParams["**"]=decodeURIComponent(p),u}return null}function Rc(e,n){return 2**(e-n-1)}function k8(e,n){return e===2**(n-1)-1}function ry(e,n,s){let r,i;try{[r,i]=lk(e,n,s)}catch{return null}if(s.rawParams=r,s.extract=i,!s.node.parse)return!0;try{if(s.node.parse(r)===!1)return null}catch{}return!0}function Ic(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===Nr)>(e.node.kind===Nr)||n.node.kind===Nr==(e.node.kind===Nr)&&n.depth>e.depth))):!0}function Qc(e){return cm(e.filter(n=>n!==void 0).join("/"))}function cm(e){return e.replace(/\/{2,}/g,"/")}function dk(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Vs(e){const n=e.length;return n>1&&e[n-1]==="/"?e.replace(/\/{1,}$/,""):e}function uk(e){return Vs(dk(e))}function od(e,n){return e?.endsWith("/")&&e!=="/"&&e!==`${n}/`?e.slice(0,-1):e}function v8(e,n,s){return od(e,s)===od(n,s)}function b8({base:e,to:n,trailingSlash:s="never",cache:r}){const i=n.startsWith("/"),o=!i&&n===".";let l;if(r){l=i?n:o?e:e+"\0"+n;const h=r.get(l);if(h)return h}let d;if(o)d=e.split("/");else if(i)d=n.split("/");else{for(d=e.split("/");d.length>1&&Ao(d)==="";)d.pop();const h=n.split("/");for(let m=0,p=h.length;m<p;m++){const x=h[m];x===""?m?m===p-1&&d.push(x):d=[x]:x===".."?d.pop():x==="."||d.push(x)}}d.length>1&&(Ao(d)===""?s==="never"&&d.pop():s==="always"&&d.push(""));const u=cm(d.join("/"))||"/";return l&&r&&r.set(l,u),u}function w8(e){const n=new Map(e.map(i=>[encodeURIComponent(i),i])),s=Array.from(n.keys()).map(i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(s,"g");return i=>i.replace(r,o=>n.get(o)??o)}function tp(e,n,s){const r=n[e];return typeof r!="string"?r:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(i=>ay(i,s)).join("/"):ay(r,s)}function iy({path:e,params:n,decoder:s,...r}){let i=!1;const o=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:o,isMissingParams:i};if(!e.includes("$"))return{interpolatedPath:e,usedParams:o,isMissingParams:i};const l=e.length;let d=0,u,h="";for(;d<l;){const m=d;u=ok(e,m,u);const p=u[5];if(d=p+1,m===p)continue;const x=u[0];if(x===0){h+="/"+e.substring(m,p);continue}if(x===2){const y=n._splat;o._splat=y,o["*"]=y;const j=e.substring(m,u[1]),k=e.substring(u[4],p);if(!y){i=!0,(j||k)&&(h+="/"+j+k);continue}const b=tp("_splat",n,s);h+="/"+j+b+k;continue}if(x===1){const y=e.substring(u[2],u[3]);!i&&!(y in n)&&(i=!0),o[y]=n[y];const j=e.substring(m,u[1]),k=e.substring(u[4],p),b=tp(y,n,s)??"undefined";h+="/"+j+b+k;continue}if(x===3){const y=e.substring(u[2],u[3]),j=n[y];if(j==null)continue;o[y]=j;const k=e.substring(m,u[1]),b=e.substring(u[4],p),w=tp(y,n,s)??"";h+="/"+k+w+b;continue}}return e.endsWith("/")&&(h+="/"),{usedParams:o,interpolatedPath:h||"/",isMissingParams:i}}function ay(e,n){const s=encodeURIComponent(e);return n?.(s)??s}function Yt(e){return e?.isNotFound===!0}function N8(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}const S8="tsr-scroll-restoration-v1_3";function C8(){const e=N8();if(!e)return null;let n={};try{const r=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");Ji(r)&&(n=r)}catch{}return{get state(){return n},set:r=>{n=br(r,n)||n},persist:()=>{try{e.setItem(S8,JSON.stringify(n))}catch{}}}}const oy=C8(),$8=e=>e.state.__TSR_key||e.href;function T8(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 Fc=!1;const co="window",ly="data-scroll-restoration-id";function E8(e,n){if(!oy)return;const s=oy;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!s)return;e.isScrollRestorationSetup=!0,Fc=!1;const r=e.options.getScrollRestorationKey||$8,i=new Map;window.history.scrollRestoration="manual";const o=d=>{if(!(Fc||!e.isScrollRestoring))if(d.target===document||d.target===window)i.set(co,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const u=d.target;i.set(u,{scrollX:u.scrollLeft||0,scrollY:u.scrollTop||0})}},l=d=>{if(!e.isScrollRestoring||!d||i.size===0||!s)return;const u=s.state[d]||={};for(const[h,m]of i){let p;if(h===co)p=co;else if(h.isConnected){const x=h.getAttribute(ly);p=x?`[${ly}="${x}"]`:T8(h)}p&&(u[p]=m)}};document.addEventListener("scroll",o,!0),e.subscribe("onBeforeLoad",d=>{l(d.fromLocation?r(d.fromLocation):void 0),i.clear()}),window.addEventListener("pagehide",()=>{l(r(e.stores.resolvedLocation.get()??e.stores.location.get())),s.persist()}),e.subscribe("onRendered",d=>{const u=r(d.toLocation),h=e.options.scrollRestorationBehavior,m=e.options.scrollToTopSelectors;if(i.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){Fc=!0;try{const p=e.isScrollRestoring?s.state[u]:void 0;let x=!1;if(p)for(const y in p){const j=p[y];if(!Ji(j))continue;const{scrollX:k,scrollY:b}=j;if(!(!Number.isFinite(k)||!Number.isFinite(b))){if(y===co)window.scrollTo({top:b,left:k,behavior:h}),x=!0;else if(y){let w;try{w=document.querySelector(y)}catch{continue}w&&(w.scrollLeft=k,w.scrollTop=b,x=!0)}}}if(!x){const y=e.history.location.hash.slice(1);if(y){const j=window.history.state?.__hashScrollIntoViewOptions??!0;if(j){const k=document.getElementById(y);k&&k.scrollIntoView(j)}}else{const j={top:0,left:0,behavior:h};if(window.scrollTo(j),m)for(const k of m){if(k===co)continue;const b=typeof k=="function"?k():document.querySelector(k);b&&b.scrollTo(j)}}}}finally{Fc=!1}e.isScrollRestoring&&s.set(p=>(p[u]||={},p))}})}function A8(e,n=String){const s=new URLSearchParams;for(const r in e){const i=e[r];i!==void 0&&s.set(r,n(i))}return s.toString()}function np(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function P8(e){const n=new URLSearchParams(e),s=Object.create(null);for(const[r,i]of n.entries()){const o=s[r];o==null?s[r]=np(i):Array.isArray(o)?o.push(np(i)):s[r]=[o,np(i)]}return s}const R8=F8(JSON.parse),I8=z8(JSON.stringify,JSON.parse);function F8(e){return n=>{n[0]==="?"&&(n=n.substring(1));const s=P8(n);for(const r in s){const i=s[r];if(typeof i=="string")try{s[r]=e(i)}catch{}}return s}}function z8(e,n){const s=typeof n=="function";function r(i){if(typeof i=="object"&&i!==null)try{return e(i)}catch{}else if(s&&typeof i=="string")try{return n(i),e(i)}catch{}return i}return i=>{const o=A8(i,r);return o?`?${o}`:""}}const ei="__root__";function tl(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 fn(e){return e instanceof Response&&!!e.options}function q8(e){return{input:({url:n})=>{for(const s of e)n=rf(s,n);return n},output:({url:n})=>{for(let s=e.length-1;s>=0;s--)n=hk(e[s],n);return n}}}function L8(e){const n=uk(e.basepath),s=`/${n}`,r=`${s}/`,i=e.caseSensitive?s:s.toLowerCase(),o=e.caseSensitive?r:r.toLowerCase();return{input:({url:l})=>{const d=e.caseSensitive?l.pathname:l.pathname.toLowerCase();return d===i?l.pathname="/":d.startsWith(o)&&(l.pathname=l.pathname.slice(s.length)),l},output:({url:l})=>(l.pathname=Qc(["/",n,l.pathname]),l)}}function rf(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 hk(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 M8(e,n){const{createMutableStore:s,createReadonlyStore:r,batch:i,init:o}=n,l=new Map,d=new Map,u=new Map,h=s(e.status),m=s(e.loadedAt),p=s(e.isLoading),x=s(e.isTransitioning),y=s(e.location),j=s(e.resolvedLocation),k=s(e.statusCode),b=s(e.redirect),w=s([]),S=s([]),T=s([]),A=r(()=>sp(l,w.get())),D=r(()=>sp(d,S.get())),$=r(()=>sp(u,T.get())),P=r(()=>w.get()[0]),F=r(()=>w.get().some(V=>l.get(V)?.get().status==="pending")),_=r(()=>({locationHref:y.get().href,resolvedLocationHref:j.get()?.href,status:h.get()})),z=r(()=>({status:h.get(),loadedAt:m.get(),isLoading:p.get(),isTransitioning:x.get(),matches:A.get(),location:y.get(),resolvedLocation:j.get(),statusCode:k.get(),redirect:b.get()})),U=Ro(64);function I(V){let Y=U.get(V);return Y||(Y=r(()=>{const se=w.get();for(const R of se){const B=l.get(R);if(B&&B.routeId===V)return B.get()}}),U.set(V,Y)),Y}const W={status:h,loadedAt:m,isLoading:p,isTransitioning:x,location:y,resolvedLocation:j,statusCode:k,redirect:b,matchesId:w,pendingIds:S,cachedIds:T,matches:A,pendingMatches:D,cachedMatches:$,firstId:P,hasPending:F,matchRouteDeps:_,matchStores:l,pendingMatchStores:d,cachedMatchStores:u,__store:z,getRouteMatchStore:I,setMatches:M,setPending:G,setCached:ce};M(e.matches),o?.(W);function M(V){rp(V,l,w,s,i)}function G(V){rp(V,d,S,s,i)}function ce(V){rp(V,u,T,s,i)}return W}function sp(e,n){const s=[];for(const r of n){const i=e.get(r);i&&s.push(i.get())}return s}function rp(e,n,s,r,i){const o=e.map(d=>d.id),l=new Set(o);i(()=>{for(const d of n.keys())l.has(d)||n.delete(d);for(const d of e){const u=n.get(d.id);if(!u){const h=r(d);h.routeId=d.routeId,n.set(d.id,h);continue}u.routeId=d.routeId,u.get()!==d&&u.set(d)}d8(s.get(),o)||s.set(o)})}const af=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},O8=e=>e.stores.matchesId.get().some(n=>e.stores.matchStores.get(n)?.get()._forcePending),qd=(e,n)=>!!(e.preload&&!e.router.stores.matchStores.has(n)),ti=(e,n,s=!0)=>{const r={...e.router.options.context??{}},i=s?n:n-1;for(let o=0;o<=i;o++){const l=e.matches[o];if(!l)continue;const d=e.router.getMatch(l.id);d&&Object.assign(r,d.__routeContext,d.__beforeLoadContext)}return r},cy=(e,n)=>{if(!e.matches.length)return;const s=n.routeId,r=e.matches.findIndex(l=>l.routeId===e.router.routeTree.id),i=r>=0?r:0;let o=s?e.matches.findIndex(l=>l.routeId===s):e.firstBadMatchIndex??e.matches.length-1;o<0&&(o=i);for(let l=o;l>=0;l--){const d=e.matches[l];if(e.router.looseRoutesById[d.routeId].options.notFoundComponent)return l}return s?o:i},Sr=(e,n,s)=>{if(!(!fn(s)&&!Yt(s)))throw fn(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:fn(s)?"redirected":Yt(s)?"notFound":r.status==="pending"?"success":r.status,context:ti(e,n.index),isFetching:!1,error:s})),Yt(s)&&!s.routeId&&(s.routeId=n.routeId),n._nonReactive.loadPromise?.resolve()),fn(s)&&(e.rendered=!0,s.options._fromLocation=e.location,s.redirectHandled=!0,s=e.router.resolveRedirect(s))),s},pk=(e,n)=>{const s=e.router.getMatch(n);return!!(!s||s._nonReactive.dehydrated)},dy=(e,n,s)=>{const r=ti(e,s);e.updateMatch(n,i=>({...i,context:r}))},uo=(e,n,s,r)=>{const{id:i,routeId:o}=e.matches[n],l=e.router.looseRoutesById[o];if(s instanceof Promise)throw s;s.routerCode=r,e.firstBadMatchIndex??=n,Sr(e,e.router.getMatch(i),s);try{l.options.onError?.(s)}catch(d){s=d,Sr(e,e.router.getMatch(i),s)}e.updateMatch(i,d=>(d._nonReactive.beforeLoadPromise?.resolve(),d._nonReactive.beforeLoadPromise=void 0,d._nonReactive.loadPromise?.resolve(),{...d,error:s,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!fn(s)&&!Yt(s)&&(e.serialError??=s)},fk=(e,n,s,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const i=s.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!qd(e,n)&&(s.options.loader||s.options.beforeLoad||gk(s))&&typeof i=="number"&&i!==1/0&&(s.options.pendingComponent??e.router.options?.defaultPendingComponent)){const o=setTimeout(()=>{af(e)},i);r._nonReactive.pendingTimeout=o}},_8=(e,n,s)=>{const r=e.router.getMatch(n);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;fk(e,n,s,r);const i=()=>{const o=e.router.getMatch(n);o.preload&&(o.status==="redirected"||o.status==="notFound")&&Sr(e,o,o.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},D8=(e,n,s,r)=>{const i=e.router.getMatch(n);let o=i._nonReactive.loadPromise;i._nonReactive.loadPromise=ea(()=>{o?.resolve(),o=void 0});const{paramsError:l,searchError:d}=i;l&&uo(e,s,l,"PARSE_PARAMS"),d&&uo(e,s,d,"VALIDATE_SEARCH"),fk(e,n,r,i);const u=new AbortController;let h=!1;const m=()=>{h||(h=!0,e.updateMatch(n,A=>({...A,isFetching:"beforeLoad",fetchCount:A.fetchCount+1,abortController:u})))},p=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(n,A=>({...A,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{m(),p()});return}i._nonReactive.beforeLoadPromise=ea();const x={...ti(e,s,!1),...i.__routeContext},{search:y,params:j,cause:k}=i,b=qd(e,n),w={search:y,abortController:u,params:j,preload:b,context:x,location:e.location,navigate:A=>e.router.navigate({...A,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:b?"preload":k,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},S=A=>{if(A===void 0){e.router.batch(()=>{m(),p()});return}(fn(A)||Yt(A))&&(m(),uo(e,s,A,"BEFORE_LOAD")),e.router.batch(()=>{m(),e.updateMatch(n,D=>({...D,__beforeLoadContext:A})),p()})};let T;try{if(T=r.options.beforeLoad(w),Po(T))return m(),T.catch(A=>{uo(e,s,A,"BEFORE_LOAD")}).then(S)}catch(A){m(),uo(e,s,A,"BEFORE_LOAD")}S(T)},B8=(e,n)=>{const{id:s,routeId:r}=e.matches[n],i=e.router.looseRoutesById[r],o=()=>d(),l=()=>D8(e,s,n,i),d=()=>{if(pk(e,s))return;const u=_8(e,s,i);return Po(u)?u.then(l):l()};return o()},W8=(e,n,s)=>{const r=e.router.getMatch(n);if(!r||!s.options.head&&!s.options.scripts&&!s.options.headers)return;const i={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([s.options.head?.(i),s.options.scripts?.(i),s.options.headers?.(i)]).then(([o,l,d])=>({meta:o?.meta,links:o?.links,headScripts:o?.scripts,headers:d,scripts:l,styles:o?.styles}))},mk=(e,n,s,r,i)=>{const o=n[r-1],{params:l,loaderDeps:d,abortController:u,cause:h}=e.router.getMatch(s),m=ti(e,r),p=qd(e,s);return{params:l,deps:d,preload:!!p,parentMatchPromise:o,abortController:u,context:m,location:e.location,navigate:x=>e.router.navigate({...x,_fromLocation:e.location}),cause:p?"preload":h,route:i,...e.router.options.additionalContext}},uy=async(e,n,s,r,i)=>{try{const o=e.router.getMatch(s);try{(!(sk??e.router.isServer)||o.ssr===!0)&&Io(i);const l=i.options.loader,d=typeof l=="function"?l:l?.handler,u=d?.(mk(e,n,s,r,i)),h=!!d&&Po(u);if((h||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||o._nonReactive.minPendingPromise)&&e.updateMatch(s,p=>({...p,isFetching:"loader"})),d){const p=h?await u:u;Sr(e,e.router.getMatch(s),p),p!==void 0&&e.updateMatch(s,x=>({...x,loaderData:p}))}i._lazyPromise&&await i._lazyPromise;const m=o._nonReactive.minPendingPromise;m&&await m,i._componentsPromise&&await i._componentsPromise,e.updateMatch(s,p=>({...p,error:void 0,context:ti(e,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(l){let d=l;if(d?.name==="AbortError"){if(o.abortController.signal.aborted){o._nonReactive.loaderPromise?.resolve(),o._nonReactive.loaderPromise=void 0;return}e.updateMatch(s,h=>({...h,status:h.status==="pending"?"success":h.status,isFetching:!1,context:ti(e,r)}));return}const u=o._nonReactive.minPendingPromise;u&&await u,Yt(l)&&await i.options.notFoundComponent?.preload?.(),Sr(e,e.router.getMatch(s),l);try{i.options.onError?.(l)}catch(h){d=h,Sr(e,e.router.getMatch(s),h)}!fn(d)&&!Yt(d)&&await Io(i,["errorComponent"]),e.updateMatch(s,h=>({...h,error:d,context:ti(e,r),status:"error",isFetching:!1}))}}catch(o){const l=e.router.getMatch(s);l&&(l._nonReactive.loaderPromise=void 0),Sr(e,l,o)}},U8=async(e,n,s)=>{async function r(y,j,k,b,w){const S=Date.now()-j.updatedAt,T=y?w.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:w.options.staleTime??e.router.options.defaultStaleTime??0,A=w.options.shouldReload,D=typeof A=="function"?A(mk(e,n,i,s,w)):A,{status:$,invalid:P}=b,F=S>=T&&(!!e.forceStaleReload||b.cause==="enter"||k!==void 0&&k!==b.id);l=$==="success"&&(P||(D??F)),y&&w.options.preload===!1||(l&&!e.sync&&m?(d=!0,(async()=>{try{await uy(e,n,i,s,w);const _=e.router.getMatch(i);_._nonReactive.loaderPromise?.resolve(),_._nonReactive.loadPromise?.resolve(),_._nonReactive.loaderPromise=void 0,_._nonReactive.loadPromise=void 0}catch(_){fn(_)&&await e.router.navigate(_.options)}})()):$!=="success"||l?await uy(e,n,i,s,w):dy(e,i,s))}const{id:i,routeId:o}=e.matches[s];let l=!1,d=!1;const u=e.router.looseRoutesById[o],h=u.options.loader,m=((typeof h=="function"?void 0:h?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(pk(e,i)){if(!e.router.getMatch(i))return e.matches[s];dy(e,i,s)}else{const y=e.router.getMatch(i),j=e.router.stores.matchesId.get()[s],k=(j&&e.router.stores.matchStores.get(j)||null)?.routeId===o?j:e.router.stores.matches.get().find(w=>w.routeId===o)?.id,b=qd(e,i);if(y._nonReactive.loaderPromise){if(y.status==="success"&&!e.sync&&!y.preload&&m)return y;await y._nonReactive.loaderPromise;const w=e.router.getMatch(i),S=w._nonReactive.error||w.error;S&&Sr(e,w,S),w.status==="pending"&&await r(b,y,k,w,u)}else{const w=b&&!e.router.stores.matchStores.has(i),S=e.router.getMatch(i);S._nonReactive.loaderPromise=ea(),w!==S.preload&&e.updateMatch(i,T=>({...T,preload:w})),await r(b,y,k,S,u)}}const p=e.router.getMatch(i);d||(p._nonReactive.loaderPromise?.resolve(),p._nonReactive.loadPromise?.resolve(),p._nonReactive.loadPromise=void 0),clearTimeout(p._nonReactive.pendingTimeout),p._nonReactive.pendingTimeout=void 0,d||(p._nonReactive.loaderPromise=void 0),p._nonReactive.dehydrated=void 0;const x=d?p.isFetching:!1;return x!==p.isFetching||p.invalid!==!1?(e.updateMatch(i,y=>({...y,isFetching:x,invalid:!1})),e.router.getMatch(i)):p};async function hy(e){const n=e,s=[];O8(n.router)&&af(n);let r;for(let x=0;x<n.matches.length;x++){try{const y=B8(n,x);Po(y)&&await y}catch(y){if(fn(y))throw y;if(Yt(y))r=y;else if(!n.preload)throw y;break}if(n.serialError||n.firstBadMatchIndex!=null)break}const i=n.firstBadMatchIndex??n.matches.length,o=r&&!n.preload?cy(n,r):void 0,l=r&&n.preload?0:o!==void 0?Math.min(o+1,i):i;let d,u;for(let x=0;x<l;x++)s.push(U8(n,s,x));try{await Promise.all(s)}catch{const x=await Promise.allSettled(s);for(const y of x){if(y.status!=="rejected")continue;const j=y.reason;if(fn(j))throw j;Yt(j)?d??=j:u??=j}if(u!==void 0)throw u}const h=d??(r&&!n.preload?r:void 0);let m=n.firstBadMatchIndex!==void 0?n.firstBadMatchIndex:n.matches.length-1;if(!h&&r&&n.preload)return n.matches;if(h){const x=cy(n,h);x===void 0&&Ks();const y=n.matches[x],j=n.router.looseRoutesById[y.routeId],k=n.router.options?.defaultNotFoundComponent;!j.options.notFoundComponent&&k&&(j.options.notFoundComponent=k),h.routeId=y.routeId;const b=y.routeId===n.router.routeTree.id;n.updateMatch(y.id,w=>({...w,...b?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:h},isFetching:!1})),m=x,await Io(j,["notFoundComponent"])}else if(!n.preload){const x=n.matches[0];x.globalNotFound||n.router.getMatch(x.id)?.globalNotFound&&n.updateMatch(x.id,y=>({...y,globalNotFound:!1,error:void 0}))}if(n.serialError&&n.firstBadMatchIndex!==void 0){const x=n.router.looseRoutesById[n.matches[n.firstBadMatchIndex].routeId];await Io(x,["errorComponent"])}for(let x=0;x<=m;x++){const{id:y,routeId:j}=n.matches[x],k=n.router.looseRoutesById[j];try{const b=W8(n,y,k);if(b){const w=await b;n.updateMatch(y,S=>({...S,...w}))}}catch(b){console.error(`Error executing head for route ${j}:`,b)}}const p=af(n);if(Po(p)&&await p,h)throw h;if(n.serialError&&!n.preload&&!n.onReady)throw n.serialError;return n.matches}function py(e,n){const s=n.map(r=>e.options[r]?.preload?.()).filter(Boolean);if(s.length!==0)return Promise.all(s)}function Io(e,n=Zc){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(r=>{const{id:i,...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===Zc?(()=>{if(e._componentsPromise===void 0){const r=py(e,Zc);r?e._componentsPromise=r.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():py(e,n);return e._lazyPromise?e._lazyPromise.then(s):s()}function gk(e){for(const n of Zc)if(e.options[n]?.preload)return!0;return!1}const Zc=["component","errorComponent","pendingComponent","notFoundComponent"];var $r="__TSR_index",fy="popstate",my="beforeunload";function H8(e){let n=e.getLocation();const s=new Set,r=l=>{n=e.getLocation(),s.forEach(d=>d({location:n,action:l}))},i=l=>{e.notifyOnIndexChange??!0?r(l):n=e.getLocation()},o=async({task:l,navigateOpts:d,...u})=>{if(d?.ignoreBlocker??!1){l();return}const h=e.getBlockers?.()??[],m=u.type==="PUSH"||u.type==="REPLACE";if(typeof document<"u"&&h.length&&m)for(const p of h){const x=ld(u.path,u.state);if(await p.blockerFn({currentLocation:n,nextLocation:x,action:u.type})){e.onBlocked?.();return}}l()};return{get location(){return n},get length(){return e.getLength()},subscribers:s,subscribe:l=>(s.add(l),()=>{s.delete(l)}),push:(l,d,u)=>{const h=n.state[$r];d=gy(h+1,d),o({task:()=>{e.pushState(l,d),r({type:"PUSH"})},navigateOpts:u,type:"PUSH",path:l,state:d})},replace:(l,d,u)=>{const h=n.state[$r];d=gy(h,d),o({task:()=>{e.replaceState(l,d),r({type:"REPLACE"})},navigateOpts:u,type:"REPLACE",path:l,state:d})},go:(l,d)=>{o({task:()=>{e.go(l),i({type:"GO",index:l})},navigateOpts:d,type:"GO"})},back:l=>{o({task:()=>{e.back(l?.ignoreBlocker??!1),i({type:"BACK"})},navigateOpts:l,type:"BACK"})},forward:l=>{o({task:()=>{e.forward(l?.ignoreBlocker??!1),i({type:"FORWARD"})},navigateOpts:l,type:"FORWARD"})},canGoBack:()=>n.state[$r]!==0,createHref:l=>e.createHref(l),block:l=>{if(!e.setBlockers)return()=>{};const d=e.getBlockers?.()??[];return e.setBlockers([...d,l]),()=>{const u=e.getBlockers?.()??[];e.setBlockers?.(u.filter(h=>h!==l))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function gy(e,n){n||(n={});const s=dm();return{...n,key:s,__TSR_key:s,[$r]:e}}function V8(e){const n=typeof document<"u"?window:void 0,s=n.history.pushState,r=n.history.replaceState;let i=[];const o=()=>i,l=F=>i=F,d=(F=>F),u=(()=>ld(`${n.location.pathname}${n.location.search}${n.location.hash}`,n.history.state));if(!n.history.state?.__TSR_key&&!n.history.state?.key){const F=dm();n.history.replaceState({[$r]:0,key:F,__TSR_key:F},"")}let h=u(),m,p=!1,x=!1,y=!1,j=!1;const k=()=>h;let b,w;const S=()=>{b&&(P._ignoreSubscribers=!0,(b.isPush?n.history.pushState:n.history.replaceState)(b.state,"",b.href),P._ignoreSubscribers=!1,b=void 0,w=void 0,m=void 0)},T=(F,_,z)=>{const U=d(_);w||(m=h),h=ld(_,z),b={href:U,state:z,isPush:b?.isPush||F==="push"},w||(w=Promise.resolve().then(()=>S()))},A=F=>{h=u(),P.notify({type:F})},D=async()=>{if(x){x=!1;return}const F=u(),_=F.state[$r]-h.state[$r],z=_===1,U=_===-1,I=!z&&!U||p;p=!1;const W=I?"GO":U?"BACK":"FORWARD",M=I?{type:"GO",index:_}:{type:U?"BACK":"FORWARD"};if(y)y=!1;else{const G=o();if(typeof document<"u"&&G.length){for(const ce of G)if(await ce.blockerFn({currentLocation:h,nextLocation:F,action:W})){x=!0,n.history.go(1),P.notify(M);return}}}h=u(),P.notify(M)},$=F=>{if(j){j=!1;return}let _=!1;const z=o();if(typeof document<"u"&&z.length)for(const U of z){const I=U.enableBeforeUnload??!0;if(I===!0){_=!0;break}if(typeof I=="function"&&I()===!0){_=!0;break}}if(_)return F.preventDefault(),F.returnValue=""},P=H8({getLocation:k,getLength:()=>n.history.length,pushState:(F,_)=>T("push",F,_),replaceState:(F,_)=>T("replace",F,_),back:F=>(F&&(y=!0),j=!0,n.history.back()),forward:F=>{F&&(y=!0),j=!0,n.history.forward()},go:F=>{p=!0,n.history.go(F)},createHref:F=>d(F),flush:S,destroy:()=>{n.history.pushState=s,n.history.replaceState=r,n.removeEventListener(my,$,{capture:!0}),n.removeEventListener(fy,D)},onBlocked:()=>{m&&h!==m&&(h=m)},getBlockers:o,setBlockers:l,notifyOnIndexChange:!1});return n.addEventListener(my,$,{capture:!0}),n.addEventListener(fy,D),n.history.pushState=function(...F){const _=s.apply(n.history,F);return P._ignoreSubscribers||A("PUSH"),_},n.history.replaceState=function(...F){const _=r.apply(n.history,F);return P._ignoreSubscribers||A("REPLACE"),_},P}function K8(e){let n=e.replace(/[\x00-\x1f\x7f]/g,"");return n.startsWith("//")&&(n="/"+n.replace(/^\/+/,"")),n}function ld(e,n){const s=K8(e),r=s.indexOf("#"),i=s.indexOf("?"),o=dm();return{href:s,pathname:s.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:s.length),hash:r>-1?s.substring(r):"",search:i>-1?s.slice(i,r===-1?void 0:r):"",state:n||{[$r]:0,key:o,__TSR_key:o}}}function dm(){return(Math.random()+1).toString(36).substring(7)}function Qi(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 Y8=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,i=this.basepath??r?.basepath??"/",o=this.basepath===void 0,l=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=w8(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=V8()),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 m;this.resolvePathCache=Ro(1e3),m=this.buildRouteTree(),this.setRoutes(m)}if(!this.stores&&this.latestLocation){const m=this.getStoreConfig(this);this.batch=m.batch,this.stores=M8(Q8(this.latestLocation),m),E8(this)}let d=!1;const u=this.options.basepath??"/",h=this.options.rewrite;if(o||i!==u||l!==h){this.basepath=u;const m=[],p=uk(u);p&&p!=="/"&&m.push(L8({basepath:u})),h&&m.push(h),this.rewrite=m.length===0?void 0:m.length===1?m[0]:q8(m),this.history&&this.updateLatestLocation(),d=!0}d&&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=x8(this.routeTree,this.options.caseSensitive,(r,i)=>{r.init({originalIndex:i})});return this.options.routeMasks&&h8(this.options.routeMasks,s.processedTree),s},this.subscribe=(s,r)=>{const i={eventType:s,fn:r};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=s=>{this.subscribers.forEach(r=>{r.eventType===s.type&&r.fn(s)})},this.parseLocation=(s,r)=>{const i=({pathname:u,search:h,hash:m,href:p,state:x})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(u)){const w=this.options.parseSearch(h),S=this.options.stringifySearch(w);return{href:u+S+m,publicHref:u+S+m,pathname:lo(u).path,external:!1,searchStr:S,search:Kr(r?.search,w),hash:lo(m.slice(1)).path,state:wr(r?.state,x)}}const y=new URL(p,this.origin),j=rf(this.rewrite,y),k=this.options.parseSearch(j.search),b=this.options.stringifySearch(k);return j.search=b,{href:j.href.replace(j.origin,""),publicHref:p,pathname:lo(j.pathname).path,external:!!this.rewrite&&j.origin!==this.origin,searchStr:b,search:Kr(r?.search,k),hash:lo(j.hash.slice(1)).path,state:wr(r?.state,x)}},o=i(s),{__tempLocation:l,__tempKey:d}=o.state;if(l&&(!d||d===this.tempLocationKey)){const u=i(l);return u.state.key=o.state.key,u.state.__TSR_key=o.state.__TSR_key,delete u.state.__tempLocation,{...u,maskedLocation:o}}return o},this.resolvePathWithBase=(s,r)=>b8({base:s,to:r.includes("//")?cm(r):r,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(s,r,i)=>typeof s=="string"?this.matchRoutesInternal({pathname:s,search:r},i):this.matchRoutesInternal(s,r),this.getMatchedRoutes=s=>Z8({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 l=o._fromLocation||this.pendingBuiltLocation||this.latestLocation,d=this.matchRoutesLightweight(l);o.from;const u=o.unsafeRelative==="path"?l.pathname:o.from??d.fullPath,h=o.to?`${o.to}`:void 0,m=d.search,p=Object.assign(Object.create(null),d.params),x=h?.charCodeAt(0)===47?"/":this.resolvePathWithBase(u,"."),y=h?this.resolvePathWithBase(x,h):x,j=o.params===!1||o.params===null?Object.create(null):(o.params??!0)===!0?p:Object.assign(p,br(o.params,p)),k=this.routesByPath[Vs(y)];let b;if(k)b=this.getRouteBranch(k);else if(y.includes("$"))b=[];else{const U=this.getMatchedRoutes(y);b=U.matchedRoutes,this.options.notFoundRoute&&(!U.foundRoute||U.foundRoute.path!=="/"&&U.routeParams["**"])&&(b=[...b,this.options.notFoundRoute])}if(b.length&&ik(j))for(const U of b){const I=U.options.params?.stringify??U.options.stringifyParams;if(I)try{Object.assign(j,I(j))}catch{}}const w=s.leaveParams?y:lo(iy({path:y,params:j,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let S=m;if(s._includeValidateSearch&&this.options.search?.strict){const U={};b.forEach(I=>{if(I.options.validateSearch)try{Object.assign(U,Xc(I.options.validateSearch,{...U,...S}))}catch{}}),S=U}S=X8({search:S,dest:o,destRoutes:b,_includeValidateSearch:s._includeValidateSearch}),S=Kr(m,S);const T=this.options.stringifySearch(S),A=o.hash===!0?l.hash:o.hash?br(o.hash,l.hash):void 0,D=A?`#${A}`:"";let $=o.state===!0?l.state:o.state?br(o.state,l.state):{};$=wr(l.state,$);const P=`${w}${T}${D}`;let F,_,z=!1;if(this.rewrite){const U=new URL(P,this.origin),I=hk(this.rewrite,U);F=U.href.replace(U.origin,""),I.origin!==this.origin?(_=I.href,z=!0):_=I.pathname+I.search+I.hash}else F=c8(P),_=F;return{publicHref:_,href:F,pathname:w,search:S,searchStr:T,state:$,hash:A??"",external:z,unmaskOnReload:o.unmaskOnReload}},i=(o={},l)=>{const d=r(o);let u=l?r(l):void 0;if(!u){const h=Object.create(null);if(this.options.routeMasks){const m=p8(d.pathname,this.processedTree);if(m){Object.assign(h,m.rawParams);const{from:p,params:x,...y}=m.route,j=x===!1||x===null?Object.create(null):(x??!0)===!0?h:Object.assign(h,br(x,h));l={from:s.from,...y,params:j},u=r(l)}}}return u&&(d.maskedLocation=u),d};return s.mask?i(s,{from:s.from,...s.mask}):i(s)},this.commitLocation=async({viewTransition:s,ignoreBlocker:r,...i})=>{const o=()=>{const u=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];u.forEach(m=>{i.state[m]=this.latestLocation.state[m]});const h=Jr(i.state,this.latestLocation.state);return u.forEach(m=>{delete i.state[m]}),h},l=Vs(this.latestLocation.href)===Vs(i.href);let d=this.commitLocationPromise;if(this.commitLocationPromise=ea(()=>{d?.resolve(),d=void 0}),l&&o())this.load();else{let{maskedLocation:u,hashScrollIntoView:h,...m}=i;u&&(m={...u,state:{...u.state,__tempKey:void 0,__tempLocation:{...m,search:m.searchStr,state:{...m.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(m.unmaskOnReload??this.options.unmaskOnReload??!1)&&(m.state.__tempKey=this.tempLocationKey)),m.state.__hashScrollIntoViewOptions=h??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=s,this.history[i.replace?"replace":"push"](m.publicHref,m.state,{ignoreBlocker:r})}return this.resetNextScroll=i.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:s,resetScroll:r,hashScrollIntoView:i,viewTransition:o,ignoreBlocker:l,href:d,...u}={})=>{if(d){const p=this.history.location.state.__TSR_index,x=ld(d,{__TSR_index:s?p:p+1}),y=new URL(x.pathname,this.origin);u.to=rf(this.rewrite,y).pathname,u.search=this.options.parseSearch(x.search),u.hash=x.hash.slice(1)}const h=this.buildLocation({...u,_includeValidateSearch:!0});this.pendingBuiltLocation=h;const m=this.commitLocation({...h,viewTransition:o,replace:s,resetScroll:r,hashScrollIntoView:i,ignoreBlocker:l});return Promise.resolve().then(()=>{this.pendingBuiltLocation===h&&(this.pendingBuiltLocation=void 0)}),m},this.navigate=async({to:s,reloadDocument:r,href:i,publicHref:o,...l})=>{let d=!1;if(i)try{new URL(`${i}`),d=!0}catch{}if(d&&!r&&(r=!0),r){if(s!==void 0||!i){const h=this.buildLocation({to:s,...l});i=i??h.publicHref,o=o??h.publicHref}const u=!d&&o?o:i;if(ad(u,this.protocolAllowlist))return Promise.resolve();if(!l.ignoreBlocker){const h=this.history.getBlockers?.()??[];for(const m of h)if(m?.blockerFn&&await m.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return l.replace?window.location.replace(u):window.location.href=u,Promise.resolve()}return this.buildAndCommitLocation({...l,href:i,to:s,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const s=this.matchRoutes(this.latestLocation),r=this.stores.cachedMatches.get().filter(i=>!s.some(o=>o.id===i.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,i,o;const l=this.stores.resolvedLocation.get()??this.stores.location.get();for(o=new Promise(u=>{this.startTransition(async()=>{try{this.beforeLoad();const h=this.latestLocation,m=Qi(h,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...m}),this.emit({type:"onBeforeLoad",...m}),await hy({router:this,sync:s?.sync,forceStaleReload:l.href===h.href,matches:this.stores.pendingMatches.get(),location:h,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let p=null,x=null,y=null,j=null;this.batch(()=>{const k=this.stores.pendingMatches.get(),b=k.length,w=this.stores.matches.get();p=b?w.filter(A=>!this.stores.pendingMatchStores.has(A.id)):null;const S=new Set;for(const A of this.stores.pendingMatchStores.values())A.routeId&&S.add(A.routeId);const T=new Set;for(const A of this.stores.matchStores.values())A.routeId&&T.add(A.routeId);x=b?w.filter(A=>!S.has(A.routeId)):null,y=b?k.filter(A=>!T.has(A.routeId)):null,j=b?k.filter(A=>T.has(A.routeId)):w,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),b&&(this.stores.setMatches(k),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...p.filter(A=>A.status!=="error"&&A.status!=="notFound"&&A.status!=="redirected")]),this.clearExpiredCache())});for(const[k,b]of[[x,"onLeave"],[y,"onEnter"],[j,"onStay"]])if(k)for(const w of k)this.looseRoutesById[w.routeId].options[b]?.(w)})})}})}catch(h){fn(h)?(r=h,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):Yt(h)&&(i=h);const m=r?r.status:i?404:this.stores.matches.get().some(p=>p.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(m),this.stores.redirect.set(r)})}this.latestLoadPromise===o&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),u()})}),this.latestLoadPromise=o,await o;this.latestLoadPromise&&o!==this.latestLoadPromise;)await this.latestLoadPromise;let d;this.hasNotFoundMatch()?d=404:this.stores.matches.get().some(u=>u.status==="error")&&(d=500),d!==void 0&&this.stores.statusCode.set(d)},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 i;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const o=this.latestLocation,l=this.stores.resolvedLocation.get(),d=typeof r.types=="function"?r.types(Qi(o,l)):r.types;if(d===!1){s();return}i={update:s,types:d}}else i=s;document.startViewTransition(i)}else s()},this.updateMatch=(s,r)=>{this.startTransition(()=>{const i=this.stores.pendingMatchStores.get(s);if(i){i.set(r);return}const o=this.stores.matchStores.get(s);if(o){o.set(r);return}const l=this.stores.cachedMatchStores.get(s);if(l){const d=r(l.get());d.status==="redirected"?this.stores.cachedMatchStores.delete(s)&&this.stores.cachedIds.set(u=>u.filter(h=>h!==s)):l.set(d)}})},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=i=>s?.filter?.(i)??!0?{...i,invalid:!0,...s?.forcePending||i.status==="error"||i.status==="notFound"?{status:"pending",error:void 0}:void 0}:i;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 i=s.options._builtLocation??this.buildLocation(s.options),o=this.getParsedLocationHref(i);s.options.href=o,s.headers.set("Location",o)}else if(r)try{const i=new URL(r);if(this.origin&&i.origin===this.origin){const o=i.pathname+i.search+i.hash;s.options.href=o,s.headers.set("Location",o)}}catch{}if(s.options.href&&!s.options._builtLocation&&ad(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(i=>!r(i))):this.stores.setCached([])},this.clearExpiredCache=()=>{const s=Date.now(),r=i=>{const o=this.looseRoutesById[i.routeId];if(!o.options.loader)return!0;const l=(i.preload?o.options.preloadGcTime??this.options.defaultPreloadGcTime:o.options.gcTime??this.options.defaultGcTime)??300*1e3;return i.status==="error"?!0:s-i.updatedAt>=l};this.clearCache({filter:r})},this.loadRouteChunk=Io,this.preloadRoute=async s=>{const r=s._builtLocation??this.buildLocation(s);let i=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:s});const o=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),l=new Set([...o,...this.stores.cachedIds.get()]),d=i.filter(u=>!l.has(u.id));if(d.length){const u=this.stores.cachedMatches.get();this.stores.setCached([...u,...d])}try{return i=await hy({router:this,matches:i,location:r,preload:!0,updateMatch:(u,h)=>{o.has(u)?i=i.map(m=>m.id===u?h(m):m):this.updateMatch(u,h)}}),i}catch(u){if(fn(u))return u.options.reloadDocument?void 0:await this.preloadRoute({...u.options,_fromLocation:r});Yt(u)||console.error(u);return}},this.matchRoute=(s,r)=>{const i={...s,to:s.to?this.resolvePathWithBase(s.from||"",s.to):void 0,params:s.params||{},leaveParams:!0},o=this.buildLocation(i);if(r?.pending&&this.stores.status.get()!=="pending")return!1;const l=(r?.pending===void 0?!this.stores.isLoading.get():r.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),d=f8(o.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,l.pathname,this.processedTree);return!d||s.params&&!Jr(d.rawParams,s.params,{partial:!0})?!1:r?.includeSearch??!0?Jr(l.search,o.search,{partial:!0})?d.rawParams:!1:d.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??I8,parseSearch:e.parseSearch??R8,protocolAllowlist:e.protocolAllowlist??l8}),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=ck(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:i}=s;let{matchedRoutes:o}=s,l=!1;(r?r.path!=="/"&&i["**"]:Vs(e.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:l=!0);const d=l?eN(this.options.notFoundMode,o):void 0,u=new Array(o.length),h=new Map;for(const m of this.stores.matchStores.values())m.routeId&&h.set(m.routeId,m.get());for(let m=0;m<o.length;m++){const p=o[m],x=u[m-1];let y,j,k;{const I=x?.search??e.search,W=x?._strictSearch??void 0;try{const M=Xc(p.options.validateSearch,{...I})??void 0;y={...I,...M},j={...W,...M},k=void 0}catch(M){let G=M;if(M instanceof cd||(G=new cd(M.message,{cause:M})),n?.throwOnError)throw G;y=I,j={},k=G}}const b=p.options.loaderDeps?.({search:y})??"",w=b?JSON.stringify(b):"",{interpolatedPath:S,usedParams:T}=iy({path:p.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),A=p.id+S+w,D=this.getMatch(A),$=h.get(p.id),P=D?._strictParams??T;let F;if(!D)try{xy(p,P)}catch(I){if(Yt(I)||fn(I)?F=I:F=new G8(I.message,{cause:I}),n?.throwOnError)throw F}Object.assign(i,P);const _=$?"stay":"enter";let z;if(D)z={...D,cause:_,params:$?.params??i,_strictParams:P,search:Kr($?$.search:D.search,y),_strictSearch:j};else{const I=p.options.loader||p.options.beforeLoad||p.lazyFn||gk(p)?"pending":"success";z={id:A,ssr:p.options.ssr,index:m,routeId:p.id,params:$?.params??i,_strictParams:P,pathname:S,updatedAt:Date.now(),search:$?Kr($.search,y):y,_strictSearch:j,searchError:void 0,status:I,isFetching:!1,error:void 0,paramsError:F,__routeContext:void 0,_nonReactive:{loadPromise:ea()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:_,loaderDeps:$?wr($.loaderDeps,b):b,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:p.options.staticData||{},fullPath:p.fullPath}}n?.preload||(z.globalNotFound=d===p.id),z.searchError=k;const U=this.getParentContext(x);z.context={...U,...z.__routeContext,...z.__beforeLoadContext},u[m]=z}for(let m=0;m<u.length;m++){const p=u[m],x=this.looseRoutesById[p.routeId],y=this.getMatch(p.id),j=h.get(p.routeId);if(p.params=j?Kr(j.params,i):i,!y){const k=u[m-1],b=this.getParentContext(k);if(x.options.context){const w={deps:p.loaderDeps,params:p.params,context:b??{},location:e,navigate:S=>this.navigate({...S,_fromLocation:e}),buildLocation:this.buildLocation,cause:p.cause,abortController:p.abortController,preload:!!p.preload,matches:u,routeId:x.id};p.__routeContext=x.options.context(w)??void 0}p.context={...b,...p.__routeContext,...p.__beforeLoadContext}}}return u}matchRoutesLightweight(e){const{matchedRoutes:n,routeParams:s}=this.getMatchedRoutes(e.pathname),r=Ao(n),i={...e.search};for(const h of n)try{Object.assign(i,Xc(h.options.validateSearch,i))}catch{}const o=Ao(this.stores.matchesId.get()),l=o&&this.stores.matchStores.get(o)?.get(),d=l&&l.routeId===r.id&&l.pathname===e.pathname;let u;if(d)u=l.params;else{const h=Object.assign(Object.create(null),s);for(const m of n)try{xy(m,h)}catch{}u=h}return{matchedRoutes:n,fullPath:r.fullPath,search:i,params:u}}},cd=class extends Error{},G8=class extends Error{};function Q8(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Xc(e,n){if(e==null)return{};if("~standard"in e){const s=e["~standard"].validate(n);if(s instanceof Promise)throw new cd("Async validation not supported");if(s.issues)throw new cd(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 Z8({pathname:e,routesById:n,processedTree:s}){const r=Object.create(null),i=Vs(e);let o;const l=m8(i,s,!0);return l&&(o=l.route,Object.assign(r,l.rawParams)),{matchedRoutes:l?.branch||[n.__root__],routeParams:r,foundRoute:o}}function X8({search:e,dest:n,destRoutes:s,_includeValidateSearch:r}){return J8(s)(e,n,r??!1)}function J8(e){const n={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const i of e){if("search"in i.options)i.options.search?.middlewares&&n.middlewares.push(...i.options.search.middlewares);else if(i.options.preSearchFilters||i.options.postSearchFilters){const o=({search:l,next:d})=>{let u=l;"preSearchFilters"in i.options&&i.options.preSearchFilters&&(u=i.options.preSearchFilters.reduce((m,p)=>p(m),l));const h=d(u);return"postSearchFilters"in i.options&&i.options.postSearchFilters?i.options.postSearchFilters.reduce((m,p)=>p(m),h):h};n.middlewares.push(o)}if(i.options.validateSearch){const o=({search:l,next:d})=>{const u=d(l);if(!n._includeValidateSearch)return u;try{return{...u,...Xc(i.options.validateSearch,u)??void 0}}catch{return u}};n.middlewares.push(o)}}const s=({search:i})=>{const o=n.dest;return o.search?o.search===!0?i:br(o.search,i):{}};n.middlewares.push(s);const r=(i,o,l)=>{if(i>=l.length)return o;const d=l[i];return d({search:o,next:h=>r(i+1,h,l)})};return function(o,l,d){return n.dest=l,n._includeValidateSearch=d,r(0,o,n.middlewares)}}function eN(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 ei}function xy(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 tN="Error preloading route! ☝️";var xk=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=ei:this.parentRoute||Ks();let i=r?ei:s?.path;i&&i!=="/"&&(i=dk(i));const o=s?.id||i;let l=r?ei:Qc([this.parentRoute.id==="__root__"?"":this.parentRoute.id,o]);i==="__root__"&&(i="/"),l!=="__root__"&&(l=Qc(["/",l]));const d=l==="__root__"?"/":Qc([this.parentRoute.fullPath,i]);this._path=i,this._id=l,this._fullPath=d,this._to=Vs(d)},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=>tl({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.")}},nN=class extends xk{constructor(e){super(e)}};function sN(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 um(e){const n=e.errorComponent??hm;return t.jsx(rN,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:s,reset:r})=>s?C.createElement(n,{error:s,reset:r}):e.children})}var rN=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 hm({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 iN({children:e,fallback:n=null}){return yk()?t.jsx(Co.Fragment,{children:e}):t.jsx(Co.Fragment,{children:n})}function yk(){return Co.useSyncExternalStore(aN,()=>!0,()=>!1)}function aN(){return()=>{}}var jk=C.createContext(null);function xn(e){return C.useContext(jk)}var Ld=C.createContext(void 0),oN=C.createContext(void 0),ct=(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))(ct||{});function lN({update:e,notify:n,unwatched:s}){return{link:r,unlink:i,propagate:o,checkDirty:l,shallowPropagate:d};function r(h,m,p){const x=m.depsTail;if(x!==void 0&&x.dep===h)return;const y=x!==void 0?x.nextDep:m.deps;if(y!==void 0&&y.dep===h){y.version=p,m.depsTail=y;return}const j=h.subsTail;if(j!==void 0&&j.version===p&&j.sub===m)return;const k=m.depsTail=h.subsTail={version:p,dep:h,sub:m,prevDep:x,nextDep:y,prevSub:j,nextSub:void 0};y!==void 0&&(y.prevDep=k),x!==void 0?x.nextDep=k:m.deps=k,j!==void 0?j.nextSub=k:h.subs=k}function i(h,m=h.sub){const p=h.dep,x=h.prevDep,y=h.nextDep,j=h.nextSub,k=h.prevSub;return y!==void 0?y.prevDep=x:m.depsTail=x,x!==void 0?x.nextDep=y:m.deps=y,j!==void 0?j.prevSub=k:p.subsTail=k,k!==void 0?k.nextSub=j:(p.subs=j)===void 0&&s(p),y}function o(h){let m=h.nextSub,p;e:do{const x=h.sub;let y=x.flags;if(y&60?y&12?y&4?!(y&48)&&u(h,x)?(x.flags=y|40,y&=1):y=0:x.flags=y&-9|32:y=0:x.flags=y|32,y&2&&n(x),y&1){const j=x.subs;if(j!==void 0){const k=(h=j).nextSub;k!==void 0&&(p={value:m,prev:p},m=k);continue}}if((h=m)!==void 0){m=h.nextSub;continue}for(;p!==void 0;)if(h=p.value,p=p.prev,h!==void 0){m=h.nextSub;continue e}break}while(!0)}function l(h,m){let p,x=0,y=!1;e:do{const j=h.dep,k=j.flags;if(m.flags&16)y=!0;else if((k&17)===17){if(e(j)){const b=j.subs;b.nextSub!==void 0&&d(b),y=!0}}else if((k&33)===33){(h.nextSub!==void 0||h.prevSub!==void 0)&&(p={value:h,prev:p}),h=j.deps,m=j,++x;continue}if(!y){const b=h.nextDep;if(b!==void 0){h=b;continue}}for(;x--;){const b=m.subs,w=b.nextSub!==void 0;if(w?(h=p.value,p=p.prev):h=b,y){if(e(m)){w&&d(b),m=h.sub;continue}y=!1}else m.flags&=-33;m=h.sub;const S=h.nextDep;if(S!==void 0){h=S;continue e}}return y}while(!0)}function d(h){do{const m=h.sub,p=m.flags;(p&48)===32&&(m.flags=p|16,(p&6)===2&&n(m))}while((h=h.nextSub)!==void 0)}function u(h,m){let p=m.depsTail;for(;p!==void 0;){if(p===h)return!0;p=p.prevDep}return!1}}function cN(e,n,s){const r=typeof e=="object",i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:n)?.bind(i),complete:(r?e.complete:s)?.bind(i)}}const of=[];let Jc=0;const{link:yy,unlink:dN,propagate:uN,checkDirty:kk,shallowPropagate:jy}=lN({update(e){return e._update()},notify(e){of[lf++]=e,e.flags&=~ct.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=ct.Mutable|ct.Dirty,dd(e))}});let zc=0,lf=0,Ns,cf=0;function vk(e){try{++cf,e()}finally{--cf||bk()}}function dd(e){const n=e.depsTail;let s=n!==void 0?n.nextDep:e.deps;for(;s!==void 0;)s=dN(s,e)}function bk(){if(!(cf>0)){for(;zc<lf;){const e=of[zc];of[zc++]=void 0,e.notify()}zc=0,lf=0}}function ky(e,n){const s=typeof e=="function",r=e,i={_snapshot:s?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:s?ct.None:ct.Mutable,get(){return Ns!==void 0&&yy(i,Ns,Jc),i._snapshot},subscribe(o){const l=cN(o),d={current:!1},u=hN(()=>{i.get(),d.current?l.next?.(i._snapshot):d.current=!0});return{unsubscribe:()=>{u.stop()}}},_update(o){const l=Ns,d=n?.compare??Object.is;if(s)Ns=i,++Jc,i.depsTail=void 0;else if(o===void 0)return!1;s&&(i.flags=ct.Mutable|ct.RecursedCheck);try{const u=i._snapshot,h=typeof o=="function"?o(u):o===void 0&&s?r(u):o;return u===void 0||!d(u,h)?(i._snapshot=h,!0):!1}finally{Ns=l,s&&(i.flags&=~ct.RecursedCheck),dd(i)}}};return s?(i.flags=ct.Mutable|ct.Dirty,i.get=function(){const o=i.flags;if(o&ct.Dirty||o&ct.Pending&&kk(i.deps,i)){if(i._update()){const l=i.subs;l!==void 0&&jy(l)}}else o&ct.Pending&&(i.flags=o&~ct.Pending);return Ns!==void 0&&yy(i,Ns,Jc),i._snapshot}):i.set=function(o){if(i._update(o)){const l=i.subs;l!==void 0&&(uN(l),jy(l),bk())}},i}function hN(e){const n=()=>{const r=Ns;Ns=s,++Jc,s.depsTail=void 0,s.flags=ct.Watching|ct.RecursedCheck;try{return e()}finally{Ns=r,s.flags&=~ct.RecursedCheck,dd(s)}},s={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:ct.Watching|ct.RecursedCheck,notify(){const r=this.flags;r&ct.Dirty||r&ct.Pending&&kk(this.deps,this)?n():this.flags=ct.Watching},stop(){this.flags=ct.None,this.depsTail=void 0,dd(this)}};return n(),s}var ip={exports:{}},ap={},op={exports:{}},lp={};/**
|
|
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 vy;function pN(){if(vy)return lp;vy=1;var e=el();function n(p,x){return p===x&&(p!==0||1/p===1/x)||p!==p&&x!==x}var s=typeof Object.is=="function"?Object.is:n,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,l=e.useDebugValue;function d(p,x){var y=x(),j=r({inst:{value:y,getSnapshot:x}}),k=j[0].inst,b=j[1];return o(function(){k.value=y,k.getSnapshot=x,u(k)&&b({inst:k})},[p,y,x]),i(function(){return u(k)&&b({inst:k}),p(function(){u(k)&&b({inst:k})})},[p]),l(y),y}function u(p){var x=p.getSnapshot;p=p.value;try{var y=x();return!s(p,y)}catch{return!0}}function h(p,x){return x()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:d;return lp.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,lp}var by;function fN(){return by||(by=1,op.exports=pN()),op.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 wy;function mN(){if(wy)return ap;wy=1;var e=el(),n=fN();function s(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var r=typeof Object.is=="function"?Object.is:s,i=n.useSyncExternalStore,o=e.useRef,l=e.useEffect,d=e.useMemo,u=e.useDebugValue;return ap.useSyncExternalStoreWithSelector=function(h,m,p,x,y){var j=o(null);if(j.current===null){var k={hasValue:!1,value:null};j.current=k}else k=j.current;j=d(function(){function w($){if(!S){if(S=!0,T=$,$=x($),y!==void 0&&k.hasValue){var P=k.value;if(y(P,$))return A=P}return A=$}if(P=A,r(T,$))return P;var F=x($);return y!==void 0&&y(P,F)?(T=$,P):(T=$,A=F)}var S=!1,T,A,D=p===void 0?null:p;return[function(){return w(m())},D===null?void 0:function(){return w(D())}]},[m,p,x,y]);var b=i(h,j[0],j[1]);return l(function(){k.hasValue=!0,k.value=b},[b]),u(b),b},ap}var Ny;function gN(){return Ny||(Ny=1,ip.exports=mN()),ip.exports}var xN=gN();function yN(e,n){return e===n}function mn(e,n,s=yN){const r=C.useCallback(l=>{if(!e)return()=>{};const{unsubscribe:d}=e.subscribe(l);return d},[e]),i=C.useCallback(()=>e?.get(),[e]);return xN.useSyncExternalStoreWithSelector(r,i,i,n,s)}var jN={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function hi(e){const n=xn(),s=C.useContext(e.from?oN:Ld),r=e.from??s,i=r?e.from?n.stores.getRouteMatchStore(r):n.stores.matchStores.get(r):void 0,o=C.useRef(void 0);return mn(i??jN,l=>{if((e.shouldThrow??!0)&&!l&&Ks(),l===void 0)return;const d=e.select?e.select(l):l;if(e.structuralSharing??n.options.defaultStructuralSharing){const u=wr(o.current,d);return o.current=u,u}return d})}function wk(e){return hi({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.loaderData):n.loaderData})}function Nk(e){const{select:n,...s}=e;return hi({...s,select:r=>n?n(r.loaderDeps):r.loaderDeps})}function Md(e){return hi({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 Pr(e){return hi({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.search):n.search})}function qt(e){const n=xn();return C.useCallback(s=>n.navigate({...s,from:s.from??e?.from}),[e?.from,n])}function Sk(e){return hi({...e,select:n=>e.select?e.select(n.context):n.context})}var Od=_j();function kN(e,n){const s=xn(),r=r8(n),{activeProps:i,inactiveProps:o,activeOptions:l,to:d,preload:u,preloadDelay:h,preloadIntentProximity:m,hashScrollIntoView:p,replace:x,startTransition:y,resetScroll:j,viewTransition:k,children:b,target:w,disabled:S,style:T,className:A,onClick:D,onBlur:$,onFocus:P,onMouseEnter:F,onMouseLeave:_,onTouchStart:z,ignoreBlocker:U,params:I,search:W,hash:M,state:G,mask:ce,reloadDocument:V,unsafeRelative:Y,from:se,_fromLocation:R,...B}=e,J=yk(),q=C.useMemo(()=>e,[s,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),me=mn(s.stores.location,Ge=>Ge,(Ge,ee)=>Ge.href===ee.href),ye=C.useMemo(()=>{const Ge={_fromLocation:me,...q};return s.buildLocation(Ge)},[s,me,q]),Ne=ye.maskedLocation?ye.maskedLocation.publicHref:ye.publicHref,Fe=ye.maskedLocation?ye.maskedLocation.external:ye.external,Te=C.useMemo(()=>CN(Ne,Fe,s.history,S),[S,Fe,Ne,s.history]),ze=C.useMemo(()=>{if(Te?.external)return ad(Te.href,s.protocolAllowlist)?void 0:Te.href;if(!$N(d)&&!(typeof d!="string"||d.indexOf(":")===-1))try{return new URL(d),ad(d,s.protocolAllowlist)?void 0:d}catch{}},[d,Te,s.protocolAllowlist]),Ze=C.useMemo(()=>{if(ze)return!1;if(l?.exact){if(!v8(me.pathname,ye.pathname,s.basepath))return!1}else{const Ge=od(me.pathname,s.basepath),ee=od(ye.pathname,s.basepath);if(!(Ge.startsWith(ee)&&(Ge.length===ee.length||Ge[ee.length]==="/")))return!1}return(l?.includeSearch??!0)&&!Jr(me.search,ye.search,{partial:!l?.exact,ignoreUndefined:!l?.explicitUndefined})?!1:l?.includeHash?J&&me.hash===ye.hash:!0},[l?.exact,l?.explicitUndefined,l?.includeHash,l?.includeSearch,me,ze,J,ye.hash,ye.pathname,ye.search,s.basepath]),Lt=Ze?br(i,{})??vN:cp,Xt=Ze?cp:br(o,{})??cp,Fn=[A,Lt.className,Xt.className].filter(Boolean).join(" "),Rt=(T||Lt.style||Xt.style)&&{...T,...Lt.style,...Xt.style},[ps,fs]=C.useState(!1),zn=C.useRef(!1),dt=e.reloadDocument||ze?!1:u??s.options.defaultPreload,Mt=h??s.options.defaultPreloadDelay??0,yt=C.useCallback(()=>{s.preloadRoute({...q,_builtLocation:ye}).catch(Ge=>{console.warn(Ge),console.warn(tN)})},[s,q,ye]);s8(r,C.useCallback(Ge=>{Ge?.isIntersecting&&yt()},[yt]),SN,{disabled:!!S||dt!=="viewport"}),C.useEffect(()=>{zn.current||!S&&dt==="render"&&(yt(),zn.current=!0)},[S,yt,dt]);const sn=Ge=>{const ee=Ge.currentTarget.getAttribute("target"),ue=w!==void 0?w:ee;if(!S&&!TN(Ge)&&!Ge.defaultPrevented&&(!ue||ue==="_self")&&Ge.button===0){Ge.preventDefault(),Od.flushSync(()=>{fs(!0)});const Ee=s.subscribe("onResolved",()=>{Ee(),fs(!1)});s.navigate({...q,replace:x,resetScroll:j,hashScrollIntoView:p,startTransition:y,viewTransition:k,ignoreBlocker:U})}};if(ze)return{...B,ref:r,href:ze,...b&&{children:b},...w&&{target:w},...S&&{disabled:S},...T&&{style:T},...A&&{className:A},...D&&{onClick:D},...$&&{onBlur:$},...P&&{onFocus:P},...F&&{onMouseEnter:F},..._&&{onMouseLeave:_},...z&&{onTouchStart:z}};const ms=Ge=>{if(S||dt!=="intent")return;if(!Mt){yt();return}const ee=Ge.currentTarget;if(ho.has(ee))return;const ue=setTimeout(()=>{ho.delete(ee),yt()},Mt);ho.set(ee,ue)},jn=Ge=>{S||dt!=="intent"||yt()},gs=Ge=>{if(S||!dt||!Mt)return;const ee=Ge.currentTarget,ue=ho.get(ee);ue&&(clearTimeout(ue),ho.delete(ee))};return{...B,...Lt,...Xt,href:Te?.href,ref:r,onClick:Wi([D,sn]),onBlur:Wi([$,gs]),onFocus:Wi([P,ms]),onMouseEnter:Wi([F,ms]),onMouseLeave:Wi([_,gs]),onTouchStart:Wi([z,jn]),disabled:!!S,target:w,...Rt&&{style:Rt},...Fn&&{className:Fn},...S&&bN,...Ze&&wN,...J&&ps&&NN}}var cp={},vN={className:"active"},bN={role:"link","aria-disabled":!0},wN={"data-status":"active","aria-current":"page"},NN={"data-transitioning":"transitioning"},ho=new WeakMap,SN={rootMargin:"100px"},Wi=e=>n=>{for(const s of e)if(s){if(n.defaultPrevented)return;s(n)}};function CN(e,n,s,r){if(!r)return n?{href:e,external:!0}:{href:s.createHref(e)||"/",external:!1}}function $N(e){if(typeof e!="string")return!1;const n=e.charCodeAt(0);return n===47?e.charCodeAt(1)!==47:n===46}var xe=C.forwardRef((e,n)=>{const{_asChild:s,...r}=e,{type:i,...o}=kN(r,n),l=typeof r.children=="function"?r.children({isActive:o["data-status"]==="active"}):r.children;if(!s){const{disabled:d,...u}=o;return C.createElement("a",u,l)}return C.createElement(s,o,l)});function TN(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var EN=class extends xk{constructor(e){super(e),this.useMatch=n=>hi({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Sk({...n,from:this.id}),this.useSearch=n=>Pr({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>Md({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Nk({...n,from:this.id}),this.useLoaderData=n=>wk({...n,from:this.id}),this.useNavigate=()=>qt({from:this.fullPath}),this.Link=Co.forwardRef((n,s)=>t.jsx(xe,{ref:s,from:this.fullPath,...n}))}};function At(e){return new EN(e)}var AN=class extends nN{constructor(e){super(e),this.useMatch=n=>hi({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Sk({...n,from:this.id}),this.useSearch=n=>Pr({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>Md({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Nk({...n,from:this.id}),this.useLoaderData=n=>wk({...n,from:this.id}),this.useNavigate=()=>qt({from:this.fullPath}),this.Link=Co.forwardRef((n,s)=>t.jsx(xe,{ref:s,from:this.fullPath,...n}))}};function PN(e){return new AN(e)}function RN(e){const n=xn(),s=`not-found-${mn(n.stores.location,r=>r.pathname)}-${mn(n.stores.status,r=>r)}`;return t.jsx(um,{getResetKey:()=>s,onCatch:(r,i)=>{if(Yt(r))e.onCatch?.(r,i);else throw r},errorComponent:({error:r})=>{if(Yt(r))return e.fallback?.(r);throw r},children:e.children})}function IN(){return t.jsx("p",{children:"Not Found"})}function Yi(e){return t.jsx(t.Fragment,{children:e.children})}function Ck(e,n,s){return n.options.notFoundComponent?t.jsx(n.options.notFoundComponent,{...s}):e.options.defaultNotFoundComponent?t.jsx(e.options.defaultNotFoundComponent,{...s}):t.jsx(IN,{})}function FN(e){return null}function zN(){return FN(xn()),null}var $k=C.memo(function({matchId:n}){const s=xn(),r=s.stores.matchStores.get(n);r||Ks();const i=mn(s.stores.loadedAt,l=>l),o=mn(r,l=>l);return t.jsx(qN,{router:s,matchId:n,resetKey:i,matchState:C.useMemo(()=>{const l=o.routeId,d=s.routesById[l].parentRoute?.id;return{routeId:l,ssr:o.ssr,_displayPending:o._displayPending,parentRouteId:d}},[o._displayPending,o.routeId,o.ssr,s.routesById])})});function qN({router:e,matchId:n,resetKey:s,matchState:r}){const i=e.routesById[r.routeId],o=i.options.pendingComponent??e.options.defaultPendingComponent,l=o?t.jsx(o,{}):null,d=i.options.errorComponent??e.options.defaultErrorComponent,u=i.options.onCatch??e.options.defaultOnCatch,h=i.isRoot?i.options.notFoundComponent??e.options.notFoundRoute?.options.component:i.options.notFoundComponent,m=r.ssr===!1||r.ssr==="data-only",p=(!i.isRoot||i.options.wrapInSuspense||m)&&(i.options.wrapInSuspense??o??(i.options.errorComponent?.preload||m))?C.Suspense:Yi,x=d?um:Yi,y=h?RN:Yi;return t.jsxs(i.isRoot?i.options.shellComponent??Yi:Yi,{children:[t.jsx(Ld.Provider,{value:n,children:t.jsx(p,{fallback:l,children:t.jsx(x,{getResetKey:()=>s,errorComponent:d||hm,onCatch:(j,k)=>{if(Yt(j))throw j.routeId??=r.routeId,j;u?.(j,k)},children:t.jsx(y,{fallback:j=>{if(j.routeId??=r.routeId,!h||j.routeId&&j.routeId!==r.routeId||!j.routeId&&!i.isRoot)throw j;return C.createElement(h,j)},children:m||r._displayPending?t.jsx(iN,{fallback:l,children:t.jsx(Sy,{matchId:n})}):t.jsx(Sy,{matchId:n})})})})}),r.parentRouteId===ei?t.jsxs(t.Fragment,{children:[t.jsx(LN,{resetKey:s}),e.options.scrollRestoration&&sk?t.jsx(zN,{}):null]}):null]})}function LN({resetKey:e}){const n=xn(),s=C.useRef(void 0);return yo(()=>{const r=n.latestLocation.href;(s.current===void 0||s.current!==r)&&(n.emit({type:"onRendered",...Qi(n.stores.location.get(),n.stores.resolvedLocation.get())}),s.current=r)},[n.latestLocation.state.__TSR_key,e,n]),null}var Sy=C.memo(function({matchId:n}){const s=xn(),r=(m,p)=>s.getMatch(m.id)?._nonReactive[p]??m._nonReactive[p],i=s.stores.matchStores.get(n);i||Ks();const o=mn(i,m=>m),l=o.routeId,d=s.routesById[l],u=C.useMemo(()=>{const m=(s.routesById[l].options.remountDeps??s.options.defaultRemountDeps)?.({routeId:l,loaderDeps:o.loaderDeps,params:o._strictParams,search:o._strictSearch});return m?JSON.stringify(m):void 0},[l,o.loaderDeps,o._strictParams,o._strictSearch,s.options.defaultRemountDeps,s.routesById]),h=C.useMemo(()=>{const m=d.options.component??s.options.defaultComponent;return m?t.jsx(m,{},u):t.jsx(df,{})},[u,d.options.component,s.options.defaultComponent]);if(o._displayPending)throw r(o,"displayPendingPromise");if(o._forcePending)throw r(o,"minPendingPromise");if(o.status==="pending"){const m=d.options.pendingMinMs??s.options.defaultPendingMinMs;if(m){const p=s.getMatch(o.id);if(p&&!p._nonReactive.minPendingPromise){const x=ea();p._nonReactive.minPendingPromise=x,setTimeout(()=>{x.resolve(),p._nonReactive.minPendingPromise=void 0},m)}}throw r(o,"loadPromise")}if(o.status==="notFound")return Yt(o.error)||Ks(),Ck(s,d,o.error);if(o.status==="redirected")throw fn(o.error)||Ks(),r(o,"loadPromise");if(o.status==="error")throw o.error;return h}),df=C.memo(function(){const n=xn(),s=C.useContext(Ld);let r,i=!1,o;{const h=s?n.stores.matchStores.get(s):void 0;[r,i]=mn(h,m=>[m?.routeId,m?.globalNotFound??!1]),o=mn(n.stores.matchesId,m=>m[m.findIndex(p=>p===s)+1])}const l=r?n.routesById[r]:void 0,d=n.options.defaultPendingComponent?t.jsx(n.options.defaultPendingComponent,{}):null;if(i)return l||Ks(),Ck(n,l,void 0);if(!o)return null;const u=t.jsx($k,{matchId:o});return r===ei?t.jsx(C.Suspense,{fallback:d,children:u}):u});function MN(){const e=xn(),n=C.useRef({router:e,mounted:!1}),[s,r]=C.useState(!1),i=mn(e.stores.isLoading,p=>p),o=mn(e.stores.hasPending,p=>p),l=Xh(i),d=i||s||o,u=Xh(d),h=i||o,m=Xh(h);return e.startTransition=p=>{r(!0),C.startTransition(()=>{p(),r(!1)})},C.useEffect(()=>{const p=e.history.subscribe(e.load),x=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Vs(e.latestLocation.publicHref)!==Vs(x.publicHref)&&e.commitLocation({...x,replace:!0}),()=>{p()}},[e,e.history]),yo(()=>{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(x){console.error(x)}})()},[e]),yo(()=>{l&&!i&&e.emit({type:"onLoad",...Qi(e.stores.location.get(),e.stores.resolvedLocation.get())})},[l,e,i]),yo(()=>{m&&!h&&e.emit({type:"onBeforeRouteMount",...Qi(e.stores.location.get(),e.stores.resolvedLocation.get())})},[h,m,e]),yo(()=>{if(u&&!d){const p=Qi(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...p}),vk(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),p.hrefChanged&&sN(e)}},[d,u,e]),null}function ON(){const e=xn(),n=e.routesById[ei].options.pendingComponent??e.options.defaultPendingComponent,s=n?t.jsx(n,{}):null,r=t.jsxs(typeof document<"u"&&e.ssr?Yi:C.Suspense,{fallback:s,children:[t.jsx(MN,{}),t.jsx(_N,{})]});return e.options.InnerWrap?t.jsx(e.options.InnerWrap,{children:r}):r}function _N(){const e=xn(),n=mn(e.stores.firstId,i=>i),s=mn(e.stores.loadedAt,i=>i),r=n?t.jsx($k,{matchId:n}):null;return t.jsx(Ld.Provider,{value:n,children:e.options.disableGlobalCatchBoundary?r:t.jsx(um,{getResetKey:()=>s,errorComponent:hm,onCatch:void 0,children:r})})}var DN=e=>({createMutableStore:ky,createReadonlyStore:ky,batch:vk}),BN=e=>new WN(e),WN=class extends Y8{constructor(e){super(e,DN)}};function UN({router:e,children:n,...s}){ik(s)&&e.update({...e.options,...s,context:{...e.options.context,...s.context}});const r=t.jsx(jk.Provider,{value:e,children:n});return e.options.Wrap?t.jsx(e.options.Wrap,{children:r}):r}function HN({router:e,...n}){return t.jsx(UN,{router:e,...n,children:t.jsx(ON,{})})}function ta(e){const n=xn({warn:e?.router===void 0}),s=e?.router||n,r=C.useRef(void 0);return mn(s.stores.__store,i=>{if(e?.select){if(e.structuralSharing??s.options.defaultStructuralSharing){const o=wr(r.current,e.select(i));return r.current=o,o}return e.select(i)}return i})}let Fo="up",ud=0,Tk=!1;const hd=new Set;function pm(e){if(e!==Fo){Fo=e;for(const n of hd)n()}}function VN(e){ud=0,pm(e===401?"link-old":"up")}function Ek(){ud+=1,ud>=2&&pm("down")}function KN(){ud=0,Fo==="down"&&pm("up")}function Zi(e){Tk=e;for(const n of hd)n()}function YN(){return Tk&&Fo==="down"?"up":Fo}function GN(e){return hd.add(e),()=>hd.delete(e)}const pd="squad.console.token";let fd=null;function Cy(e){try{return e().getItem(pd)}catch{return null}}function fa(){return fd??Cy(()=>localStorage)??Cy(()=>sessionStorage)}function QN(e){fd=e;try{localStorage.setItem(pd,e)}catch{}}function Ak(e){fd===e&&(fd=null);for(const n of[()=>localStorage,()=>sessionStorage])try{n().getItem(pd)===e&&n().removeItem(pd)}catch{}}const Ct=(()=>{const e=/^\/p\/([^/]+)/.exec(window.location.pathname);return e?decodeURIComponent(e[1]):null})(),na=Ct?`/p/${encodeURIComponent(Ct)}`:"";function nl(e){return!na||!e.startsWith("/api/")||e.startsWith("/api/v1/app/")?e:na+e}function ZN(){const e=new URL(window.location.href),n=e.searchParams.get("t");return n?(QN(n),e.searchParams.delete("t"),window.history.replaceState({},"",e.toString()),n):fa()}class zo extends Error{constructor(){super("This page's link is out of date. Run squad in a terminal: it opens the board with a fresh link."),this.name="UnauthorizedError"}}class _d extends Error{constructor(n,s){super(n),this.status=s,this.name="ApiError"}}function Pk(e){return e instanceof Error&&(e.message===fm||e instanceof _d&&e.status>=500)}const fm="squad-kit did not answer, so this may not have gone through. Check that it still runs in its terminal, then try again.";async function Rk(e,n){let s;try{s=await fetch(e,n)}catch{throw Ek(),new Error(fm)}return VN(s.status),s}async function ke(e,n){const s=fa();if(!s)throw new zo;const r=await Rk(nl(e),{...n,headers:{"content-type":"application/json",authorization:`Bearer ${s}`}});if(r.status===401)throw Ak(s),new zo;if(!r.ok){const i=await XN(r);throw new Error(`${r.status} ${r.statusText}: ${i}`)}return await r.json()}async function XN(e){try{return(await e.text()).slice(0,400)}catch{return""}}async function ot(e,n,s={}){const r=fa();if(!r)throw new zo;const i=await Rk(nl(e),{method:n,headers:{"content-type":"application/json",authorization:`Bearer ${r}`},body:JSON.stringify(s)});if(i.status===401)throw Ak(r),new zo;const o=await i.json().catch(()=>({}));if(!i.ok)throw new _d(o.error??`${i.status} ${i.statusText}`,i.status);return o}function En(e,n){const s=fa()??"";return`${nl(`/api/v1/tickets/${encodeURIComponent(e)}/file`)}?path=${encodeURIComponent(n.replace(/^file:\/\//,""))}&t=${encodeURIComponent(s)}`}function Vn(e){const n=fa()??"";return`${nl(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 JN=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ik=(...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 e7={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 t7=C.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:s=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:l,...d},u)=>C.createElement("svg",{ref:u,...e7,width:n,height:n,stroke:e,strokeWidth:r?Number(s)*24/Number(n):s,className:Ik("lucide",i),...d},[...l.map(([h,m])=>C.createElement(h,m)),...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 ie=(e,n)=>{const s=C.forwardRef(({className:r,...i},o)=>C.createElement(t7,{ref:o,iconNode:n,className:Ik(`lucide-${JN(e)}`,r),...i}));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 Fk=ie("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 md=ie("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 n7=ie("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 zk=ie("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 gd=ie("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 ai=ie("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 s7=ie("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
|
|
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 ds=ie("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
|
|
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 uf=ie("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"}]]);/**
|
|
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 r7=ie("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
|
|
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 qk=ie("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"}]]);/**
|
|
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 Qs=ie("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"}]]);/**
|
|
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 fe=ie("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
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 Dd=ie("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
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 Lk=ie("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
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 Bd=ie("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
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 Mk=ie("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
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 i7=ie("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);/**
|
|
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 Cs=ie("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"}]]);/**
|
|
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 $y=ie("CircleArrowUp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]]);/**
|
|
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 a7=ie("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
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 mm=ie("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
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 o7=ie("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
|
|
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 sl=ie("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
|
|
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 gm=ie("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"}]]);/**
|
|
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 Xn=ie("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"}]]);/**
|
|
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 l7=ie("CornerLeftUp",[["polyline",{points:"14 9 9 4 4 9",key:"m9oyvo"}],["path",{d:"M20 20h-7a4 4 0 0 1-4-4V4",key:"1blwi3"}]]);/**
|
|
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 us=ie("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"}]]);/**
|
|
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 Ok=ie("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"}]]);/**
|
|
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 Kn=ie("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"}]]);/**
|
|
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 _k=ie("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"}]]);/**
|
|
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 rl=ie("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"}]]);/**
|
|
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 ma=ie("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"}]]);/**
|
|
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 c7=ie("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"}]]);/**
|
|
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 d7=ie("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"}]]);/**
|
|
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 u7=ie("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"}]]);/**
|
|
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 xm=ie("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 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.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
|
|
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 hf=ie("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"}]]);/**
|
|
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 h7=ie("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"}]]);/**
|
|
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 pf=ie("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"}]]);/**
|
|
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 Dk=ie("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"}]]);/**
|
|
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 Bk=ie("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"}]]);/**
|
|
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 p7=ie("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"}]]);/**
|
|
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 f7=ie("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["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"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);/**
|
|
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 m7=ie("History",[["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"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
|
|
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 ff=ie("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"}]]);/**
|
|
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 g7=ie("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"}]]);/**
|
|
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 x7=ie("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"}]]);/**
|
|
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 y7=ie("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
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 Wk=ie("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"}]]);/**
|
|
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 ym=ie("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"}]]);/**
|
|
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 j7=ie("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"}]]);/**
|
|
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 Uk=ie("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"}]]);/**
|
|
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 k7=ie("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"}]]);/**
|
|
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 Hk=ie("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"}]]);/**
|
|
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 st=ie("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
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 Vk=ie("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
|
|
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 v7=ie("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"}]]);/**
|
|
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 Wd=ie("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"}]]);/**
|
|
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 b7=ie("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"}]]);/**
|
|
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 Gn=ie("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
|
|
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 Ty=ie("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"}]]);/**
|
|
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 sa=ie("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"}]]);/**
|
|
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 Ey=ie("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"}]]);/**
|
|
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 Kk=ie("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"}]]);/**
|
|
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 ga=ie("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
|
|
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 w7=ie("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"}]]);/**
|
|
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 il=ie("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
|
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 N7=ie("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"}]]);/**
|
|
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 xd=ie("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"}]]);/**
|
|
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 al=ie("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"}]]);/**
|
|
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 qo=ie("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"}]]);/**
|
|
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 Ts=ie("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"}]]);/**
|
|
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 yd=ie("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"}]]);/**
|
|
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 gn=ie("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
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 S7=ie("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"}]]);/**
|
|
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 xt=ie("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
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 C7=ie("Pointer",[["path",{d:"M22 14a8 8 0 0 1-8 8",key:"56vcr3"}],["path",{d:"M18 11v-1a2 2 0 0 0-2-2a2 2 0 0 0-2 2",key:"1agjmk"}],["path",{d:"M14 10V9a2 2 0 0 0-2-2a2 2 0 0 0-2 2v1",key:"wdbh2u"}],["path",{d:"M10 9.5V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v10",key:"1ibuk9"}],["path",{d:"M18 11a2 2 0 1 1 4 0v3a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15",key:"g6ys72"}]]);/**
|
|
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 Es=ie("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"}]]);/**
|
|
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 $7=ie("Reply",[["polyline",{points:"9 17 4 12 9 7",key:"hvgpf2"}],["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}]]);/**
|
|
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 jo=ie("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"}]]);/**
|
|
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 oi=ie("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"}]]);/**
|
|
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 pi=ie("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
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 Ps=ie("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"}]]);/**
|
|
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 T7=ie("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"}]]);/**
|
|
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 E7=ie("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"}]]);/**
|
|
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 jm=ie("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"}]]);/**
|
|
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 ra=ie("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"}]]);/**
|
|
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 Ay=ie("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"}]]);/**
|
|
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 A7=ie("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/**
|
|
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 ed=ie("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"}]]);/**
|
|
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 km=ie("SquareCheck",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
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 Py=ie("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"}]]);/**
|
|
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 Qn=ie("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
|
|
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 ol=ie("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"}]]);/**
|
|
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 Lo=ie("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
557
|
-
* @license lucide-react v0.460.0 - ISC
|
|
558
|
-
*
|
|
559
|
-
* This source code is licensed under the ISC license.
|
|
560
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
561
|
-
*/const Pn=ie("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"}]]);/**
|
|
562
|
-
* @license lucide-react v0.460.0 - ISC
|
|
563
|
-
*
|
|
564
|
-
* This source code is licensed under the ISC license.
|
|
565
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
566
|
-
*/const Rs=ie("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"}]]);/**
|
|
567
|
-
* @license lucide-react v0.460.0 - ISC
|
|
568
|
-
*
|
|
569
|
-
* This source code is licensed under the ISC license.
|
|
570
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
571
|
-
*/const P7=ie("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"}]]);/**
|
|
572
|
-
* @license lucide-react v0.460.0 - ISC
|
|
573
|
-
*
|
|
574
|
-
* This source code is licensed under the ISC license.
|
|
575
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
576
|
-
*/const Yk=ie("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"}]]);/**
|
|
577
|
-
* @license lucide-react v0.460.0 - ISC
|
|
578
|
-
*
|
|
579
|
-
* This source code is licensed under the ISC license.
|
|
580
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
581
|
-
*/const R7=ie("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"}]]);/**
|
|
582
|
-
* @license lucide-react v0.460.0 - ISC
|
|
583
|
-
*
|
|
584
|
-
* This source code is licensed under the ISC license.
|
|
585
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
586
|
-
*/const vm=ie("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);/**
|
|
587
|
-
* @license lucide-react v0.460.0 - ISC
|
|
588
|
-
*
|
|
589
|
-
* This source code is licensed under the ISC license.
|
|
590
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
591
|
-
*/const I7=ie("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"}]]);/**
|
|
592
|
-
* @license lucide-react v0.460.0 - ISC
|
|
593
|
-
*
|
|
594
|
-
* This source code is licensed under the ISC license.
|
|
595
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
596
|
-
*/const F7=ie("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"}]]);/**
|
|
597
|
-
* @license lucide-react v0.460.0 - ISC
|
|
598
|
-
*
|
|
599
|
-
* This source code is licensed under the ISC license.
|
|
600
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
601
|
-
*/const Gk=ie("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"}]]);/**
|
|
602
|
-
* @license lucide-react v0.460.0 - ISC
|
|
603
|
-
*
|
|
604
|
-
* This source code is licensed under the ISC license.
|
|
605
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
606
|
-
*/const Mo=ie("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"}]]);/**
|
|
607
|
-
* @license lucide-react v0.460.0 - ISC
|
|
608
|
-
*
|
|
609
|
-
* This source code is licensed under the ISC license.
|
|
610
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
611
|
-
*/const Ve=ie("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function z7(e){return e==="err"?null:3200}function q7(e,n){return n.kind==="err"&&e.some(s=>s.kind==="err"&&s.text===n.text)?e:[...e,n]}let Qk=null;const mf=new Set;function Ry(e){Qk=e;for(const n of mf)n()}const ll={open:(e={})=>Ry(e),close:()=>Ry(null)};function L7(){return C.useSyncExternalStore(e=>(mf.add(e),()=>mf.delete(e)),()=>Qk)}const Zk=C.createContext(null);function td(e){try{return localStorage.getItem(e)}catch{return null}}function qc(e,n){try{localStorage.setItem(e,n)}catch{}}function Xk(){const e=td("sk.theme");return e==="light"||e==="dark"?e:window.matchMedia?.("(prefers-color-scheme: dark)").matches?"dark":"light"}function Iy({children:e}){const[n,s]=C.useState(Xk),[r,i]=C.useState(td("sk.commands")!=="off"),[o,l]=C.useState(td("sk.ticketFull")==="on"),[d,u]=C.useState(td("sk.engineers")==="on"),[h,m]=C.useState([]);C.useEffect(()=>{document.documentElement.dataset.theme=n,qc("sk.theme",n)},[n]);const p=C.useCallback(j=>m(k=>k.filter(b=>b.id!==j)),[]),x=C.useCallback((j,k="ok",b)=>{const w=Date.now()+Math.random();m(T=>q7(T,{id:w,text:j,kind:k,...b?{retry:b}:{}}));const S=z7(k);S!==null&&setTimeout(()=>p(w),S)},[p]),y=C.useMemo(()=>({theme:n,toggleTheme:()=>s(j=>j==="light"?"dark":"light"),showCommands:r,toggleCommands:()=>i(j=>(qc("sk.commands",j?"off":"on"),!j)),ticketFull:o,toggleTicketFull:()=>l(j=>(qc("sk.ticketFull",j?"off":"on"),!j)),engineers:d,toggleEngineers:()=>u(j=>(qc("sk.engineers",j?"off":"on"),!j)),toast:x}),[n,r,o,d,x]);return t.jsxs(Zk.Provider,{value:y,children:[e,t.jsx("div",{className:"toasts",role:"status","aria-live":"polite",children:h.map(j=>j.kind==="err"?t.jsxs("div",{className:"toast err",role:"alert",children:[t.jsx(Cs,{size:16}),t.jsx("span",{className:"grow",children:j.text}),j.retry&&t.jsx("button",{className:"toast-act",onClick:()=>{p(j.id),j.retry()},children:"Try again"}),t.jsx("button",{className:"toast-act",onClick:()=>{p(j.id),ll.open()},children:"Report a problem"}),t.jsx("button",{className:"toast-x",onClick:()=>p(j.id),"aria-label":"Close this message",children:t.jsx(Ve,{size:15})})]},j.id):t.jsxs("div",{className:"toast",children:[t.jsx(fe,{size:16}),j.text]},j.id))})]})}function qe(){const e=C.useContext(Zk);if(!e)throw new Error("usePrefs outside PrefsProvider");return e}function M7(e,n){return e instanceof zo?{text:e.message,home:!1}:e instanceof Error&&e.message===fm?{text:`squad-kit did not answer, so ${n} could not load. Check that it still runs in its terminal, then press Try again.`,home:!1}:e instanceof Error&&/^404\b/.test(e.message)?{text:`${n[0].toUpperCase()}${n.slice(1)} could not load: this project is not open in squad-kit now. Add it again from Home.`,home:!0}:{text:`${n[0].toUpperCase()}${n.slice(1)} could not load. Nothing is lost. Press Try again.`,home:!1}}const gf="-ۿݐ-ݿࢠ-ࣿﭐ-﷿ﹰ-\uFEFF",O7=new RegExp(`[${gf}]`,"g"),_7=/[A-Za-z]/g;function pt(e){const n=String(e??"").replace(/```[\s\S]*?(```|$)/g," ").replace(/`[^`]*`/g," ").replace(/(https?:\/\/|file:\/\/)\S+/g," "),s=n.match(O7)?.length??0,r=n.match(_7)?.length??0,i=s+r;if(!i)return{lang:"none",dir:"ltr",share:0};const o=s/i;return{lang:o>=.85?"ar":o<=.15?"en":"mixed",dir:o>=.5?"rtl":"ltr",share:o}}function Js(e){return e.dir==="rtl"?"t-ar":e.lang==="mixed"?"t-mx":"t-en"}function D7(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 Jk="[0-9\\u0660-\\u0669][0-9\\u0660-\\u0669.,:%/+\\-]*",Fy="(?:[A-Za-z0-9._\\-/+#@:]*[A-Za-z0-9#+])?",B7=`(?:${Jk}[ ]+)*[A-Za-z]${Fy}(?:[ ]+[A-Za-z0-9]${Fy})*`,W7=`[${gf}]+(?:[ ]+(?:${Jk}[ ]+)*[${gf}]+)*`,U7=new RegExp(`(${B7})|(${W7})`,"g");function ev(e,n){const s=[];let r=0;const i=(o,l)=>{if(!o)return;const d=s.at(-1);d&&!d.dir&&!l?d.text+=o:s.push(l?{text:o,dir:l}:{text:o})};for(const o of e.matchAll(U7)){const l=o.index??0;i(e.slice(r,l));const d=!!o[1];i(o[0],d&&n==="rtl"?"ltr":!d&&n==="ltr"?"rtl":void 0),r=l+o[0].length}return i(e.slice(r)),s}function tv(e){const n=e.filter(s=>s==="rtl").length;return e.length&&n*2>=e.length?"rtl":"ltr"}function De(e){const{dir:n}=pt(e);return{dir:n,lang:n==="rtl"?"ar":"en"}}function ge(e){return e.trim()?pt(e).dir:"auto"}function H7(e){return tv(e.flat().map(pt).filter(n=>n.lang!=="none").map(n=>n.dir))}function hs(e){return`${e}`}function V7(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 K7(e){return e.match(/\S+/g)?.length??0}const nv=new Set(["p","li","h1","h2","h3","h4","h5","h6","td","th","dt","dd","figcaption"]),bm=new Set(["code","pre","svg","math"]);function sv(e,n=!1){return e.type==="text"?e.value??"":e.tagName&&bm.has(e.tagName)||n&&e.tagName&&(e.tagName==="ul"||e.tagName==="ol")?" ":(e.children??[]).map(s=>sv(s,!0)).join("")}function Y7(e,n){const s=e.properties??={},r=Array.isArray(s.className)?s.className:typeof s.className=="string"?[s.className]:[];s.className=[...r,n]}function wm(e,n,s){return{type:"element",tagName:e,properties:n,children:s}}function rv(e,n,s){if(!e.children||e.tagName&&bm.has(e.tagName))return;const r=[];for(const i of e.children){if(i.type!=="text"){i.type==="element"&&!(i.tagName&&nv.has(i.tagName))&&rv(i,n,s),r.push(i);continue}for(const o of ev(i.value??"",n)){const l=s?G7(o.text):[{type:"text",value:o.text}];o.dir?r.push(wm("bdi",{dir:o.dir},l)):r.push(...l)}}e.children=r}function G7(e){return e.split(/(\s+)/).filter(Boolean).map(n=>/^\s+$/.test(n)?{type:"text",value:n}:wm("span",{className:["fx"]},[{type:"text",value:n}]))}function Q7(e,n={}){let s=null;const r=i=>{if(i.type==="element"&&i.tagName&&bm.has(i.tagName)){i.tagName==="code"&&((i.properties??={}).dir="ltr"),i.tagName==="pre"&&(s=i);return}if(i.type==="element"&&i.tagName&&nv.has(i.tagName)){const o=pt(sv(i));if(o.lang!=="none"){const l=i.properties??={};l.dir=o.dir,l.lang=o.dir==="rtl"?"ar":"en",Y7(i,Js(o))}rv(i,o.dir,!!n.stream),s=i}for(const o of i.children??[])r(o);if(i.type==="element"&&(i.tagName==="ul"||i.tagName==="ol"||i.tagName==="table")){const o=[],l=d=>{for(const u of d.children??[]){if(u.type!=="element")continue;const h=u.tagName==="li"||u.tagName==="td"||u.tagName==="th";h&&u.properties?.dir&&o.push(u.properties.dir),(!h||i.tagName==="table")&&l(u)}};l(i),o.length&&((i.properties??={}).dir=tv(o))}};return r(e),n.caret&&s&&s.tagName!=="pre"&&(s.children??=[]).push(wm("span",{className:["caret"],ariaHidden:"true"},[])),e}function Nm(e={}){return n=>{Q7(n,e)}}const Ys={analyst:"Analyst",architect:"Architect",spec:"Spec writer",builder:"Builder",tester:"Tester",reviewer:"Reviewer",release:"Release",triage:"Triage",you:"You",squad:"Squad"},Z7={analyst:pi,architect:P7,spec:qo,builder:sl,tester:km,reviewer:rl,release:ds,triage:Qs,you:I7,squad:F7};function fi({role:e,small:n,size:s}){const r=Z7[e];return t.jsx("span",{className:`glyph ${n?"sm":""} ${e==="you"?"you":""}`,title:Ys[e],children:t.jsx(r,{size:s??(n?12:14),strokeWidth:2})})}function Gt({text:e,dir:n}){return t.jsx(t.Fragment,{children:ev(String(e??""),n).map((s,r)=>s.dir?t.jsx("bdi",{dir:s.dir,children:s.text},r):s.text)})}function L({text:e,lead:n,as:s="span",children:r,...i}){const{dir:o}=pt(e);return t.jsxs(s,{...i,dir:o,lang:o==="rtl"?"ar":"en",children:[n&&t.jsxs(t.Fragment,{children:[o==="rtl"?t.jsx("bdi",{dir:"ltr",children:n}):n," "]}),t.jsx(Gt,{text:e,dir:o}),r]})}function Sm({text:e,as:n="div",...s}){return t.jsx(n,{...s,children:e.trimEnd().split(`
|
|
612
|
-
`).map((r,i)=>r.trim()?t.jsx(L,{className:"wline",text:r},i):t.jsx("br",{},i))})}function iv({path:e}){return pt(e).share?t.jsx(t.Fragment,{children:e.split(" › ").map((n,s)=>t.jsxs(C.Fragment,{children:[s>0&&" › ",t.jsx(L,{text:n})]},s))}):t.jsx(t.Fragment,{children:e})}function te({text:e,keep:n,always:s}){const{showCommands:r,toast:i}=qe();if(!r&&!s)return null;const o=()=>{navigator.clipboard?.writeText(e).then(()=>i("Command copied"),()=>i("Could not copy. Select the text instead.","err"))},l=n&&e.endsWith(n)&&e.length>n.length?e.length-n.length:0;return t.jsxs("span",{className:"term",dir:"ltr",title:"The same action in the terminal",children:[t.jsx("b",{children:">_"}),l?t.jsxs(t.Fragment,{children:[t.jsx("span",{children:e.slice(0,l).trimEnd()}),t.jsx("span",{className:"term-keep",children:n})]}):t.jsx("span",{children:e}),t.jsx("button",{onClick:o,"aria-label":`Copy ${e}`,children:t.jsx(Xn,{size:13})})]})}const dp=[{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 X7({ticket:e}){const n=e.stage==="bugs"?"tickets":e.stage,s=n==="done"?dp.length:dp.findIndex(l=>l.stage===n),r=e.waiting&&!e.now?.merging?"you":"work",i=new Map((e.now?.stages??[]).map(l=>[l.stage,l.note])),o=new Map((e.now?.stages??[]).filter(l=>l.wait).map(l=>[l.stage,l.wait]));return t.jsx("div",{className:"track","aria-label":"Where this ticket is",children:dp.map((l,d)=>{const u=d<s?"done":d===s?`cur ${r}`:"",h=i.get(l.stage);return t.jsxs("div",{className:`ts ${u}`,children:[t.jsx("span",{className:"nd",children:d<s?t.jsx(fe,{size:12,strokeWidth:3}):null}),l.name,d===s&&t.jsx("span",{className:"tag",children:r==="you"?"Your turn":e.now?.merging?"Working":e.stage==="release"?"Ready":e.dependency?.way==="wait"&&!e.dependency.started&&!e.squad?"Waiting":"Working"}),i.size>0&&t.jsx("span",{className:"tnote",children:d===s&&h==="your turn"?"":l.stage==="release"&&e.sendAs?"as a pull request":h??""}),o.has(l.stage)&&t.jsx("span",{className:"tnote twait",children:o.get(l.stage)})]},l.stage)})})}function We({title:e,onClose:n,children:s,footer:r,icon:i,wide:o,losing:l}){const[d,u]=C.useState(!1),h=C.useCallback(()=>l?u(!0):n(),[l,n]);return C.useEffect(()=>{const m=p=>p.key==="Escape"&&h();return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[h]),t.jsx("div",{className:"modal-veil",onMouseDown:m=>m.target===m.currentTarget&&h(),children:t.jsxs("div",{className:`modal ${o?"wide":""}`,role:"dialog","aria-modal":"true","aria-label":e,children:[t.jsxs("header",{children:[i,t.jsx(L,{as:"h3",text:e}),t.jsx("span",{className:"grow"}),t.jsx("button",{className:"iconbtn",onClick:h,"aria-label":"Close",children:t.jsx(Ve,{size:16})})]}),t.jsx("div",{className:"mb",children:s}),d?t.jsxs("footer",{role:"alertdialog","aria-label":"Close this window?",children:[t.jsxs("span",{className:"grow",children:["Close and lose ",l,"? What you typed stays as a draft."]}),t.jsx("button",{className:"btn pri",autoFocus:!0,onClick:()=>u(!1),children:"Keep working"}),t.jsx("button",{className:"btn",onClick:n,children:"Close"})]}):r&&t.jsx("footer",{children:r})]})})}function Er({what:e,error:n,onRetry:s}){const r=M7(n,e);return t.jsx("div",{className:"center",children:t.jsxs("div",{role:"alert",children:[t.jsx("h2",{children:"This did not load"}),t.jsx("p",{children:r.text}),t.jsxs("p",{style:{marginTop:12,display:"flex",gap:8,justifyContent:"center"},children:[t.jsx("button",{className:"btn pri",onClick:s,children:"Try again"}),r.home&&t.jsx("a",{className:"btn",href:"/",children:"Go to Home"})]})]})})}function av({onClear:e}){return t.jsxs("span",{className:"note draftnote",children:["Kept as a draft on this computer."," ",t.jsx("button",{type:"button",className:"linkbtn",onClick:e,children:"Clear"})]})}function Rn(e){return new Date(e).toLocaleTimeString("en-GB",{hour:"2-digit",minute:"2-digit",hour12:!1})}function Is(e){return e?new Date(e).toLocaleDateString("en-GB",{day:"numeric",month:"short"}):""}function Je(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`:Is(e)}function zy({text:e,dir:n}){const s=e.split(/(\*\*[^*]+\*\*)/g);return t.jsx(t.Fragment,{children:s.map((r,i)=>r.startsWith("**")?t.jsx("strong",{children:t.jsx(Gt,{text:r.slice(2,-2),dir:n})},i):t.jsx("span",{children:t.jsx(Gt,{text:r,dir:n})},i))})}function J7({notes:e}){return t.jsx("div",{className:"notes",children:e.split(`
|
|
613
|
-
`).map((n,s)=>{const{dir:r}=pt(n);return n.startsWith("### ")?t.jsx(L,{as:"h4",text:n.slice(4)},s):n.startsWith("- ")?t.jsxs("p",{dir:r,lang:r==="rtl"?"ar":"en",children:["• ",t.jsx(zy,{text:n.slice(2),dir:r})]},s):n.trim()?t.jsx("p",{dir:r,lang:r==="rtl"?"ar":"en",children:t.jsx(zy,{text:n,dir:r})},s):null})})}function Cm(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 e.takenOver?.free?`squad outside back ${e.id}`:`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 $m(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 jd(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 e.takenOver?.free?"Bring it back":"Give back";case"chat":return"Open chat";case"change":return"Review design update";case"depends":return"Choose";default:return"Open"}}const Zs={tickets:"Tickets",specs:"Specs",implement:"Implement",test:"Test",review:"Review",release:"Release",bugs:"Bugs",done:"Released"},ov=900;function Ue(){return we({queryKey:["board"],queryFn:()=>ke("/api/v1/board"),refetchInterval:ov})}function cl(e){return we({queryKey:["ticket",e],queryFn:()=>ke(`/api/v1/tickets/${e}`),enabled:!!e,refetchInterval:ov})}function e9(){return we({queryKey:["releases"],queryFn:()=>ke("/api/v1/releases"),refetchInterval:2e3})}function Tm(){return we({queryKey:["apps"],queryFn:()=>ke("/api/v1/apps"),refetchInterval:e=>e.state.data?.apps.some(n=>n.state==="starting")||e.state.data?.reading?1e3:5e3})}function lv(){return we({queryKey:["app","settings"],queryFn:()=>ke("/api/v1/app/settings"),refetchInterval:5e3})}function t9(){return we({queryKey:["architecture"],queryFn:()=>ke("/api/v1/architecture"),refetchInterval:2e3})}function oe(){const e=In(),{toast:n}=qe(),s=nk({mutationFn:({path:r,body:i,method:o="POST"})=>ot(r,o,i),onSuccess:(r,i)=>{e.invalidateQueries(),i.after?.(r);const o=typeof i.done=="function"?i.done(r):i.done;o&&n(o)},onError:(r,i)=>n(r instanceof Error?r.message:String(r),"err",Pk(r)?()=>s.mutate(i):void 0)});return s}function cv(){const{toast:e}=qe(),[n,s]=C.useState(!1);return{restarting:n,restart:async()=>{s(!0),Zi(!0);const i=await fetch("/healthz").then(l=>l.json()).catch(()=>({startedAt:void 0}));try{await ot("/api/v1/restart","POST")}catch(l){s(!1),Zi(!1),e(l instanceof Error?l.message:String(l),"err");return}const o=Date.now()+9e4;for(;Date.now()<o;){await new Promise(d=>setTimeout(d,1e3));const l=await fetch("/healthz").then(d=>d.json()).catch(()=>null);if(l?.startedAt&&l.startedAt!==i.startedAt){window.location.reload();return}}s(!1),Zi(!1),e("The board did not come back. Run squad console in your terminal.","err")}}}function n9(){const{restarting:e,restart:n}=cv();return t.jsxs("div",{className:"updatebar",role:"status",children:[t.jsx(Es,{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"})]})}function s9(e,n){const s=e instanceof Error?e.message:String(e);return/^404\b/.test(s)?`There is no ticket ${n} on this board. It may have been deleted.`:/^409\b[^{]*\{"error":"(.*)"\}$/.exec(s)?.[1]??s}function r9(e,n=/win/i.test(typeof navigator>"u"?"":navigator.platform)&&!/darwin/i.test(navigator.platform)){return n||/^sudo\b/.test(e)?e:`sudo ${e}`}const dv=["app","update"],Ud=["waiting","installing","restarting"],i9=2*6e4;function Hd(){const e=we({queryKey:dv,queryFn:()=>ke("/api/v1/app/update"),refetchInterval:r=>Ud.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 dl(){const e=In(),{toast:n}=qe(),[s,r]=C.useState(!1);return{pending:s,call:async(o,l,d={})=>{r(!0);try{const u=await ot(o,l,d);return e.setQueryData(dv,u),u}catch(u){return n(u instanceof Error?u.message:String(u),"err"),null}finally{r(!1)}}}}function xf(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 a9(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("en-GB",{day:"numeric",month:"short"})} at ${Rn(e)}`}function Em({text:e}){const{toast:n}=qe(),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(Xn,{size:13})," Copy"]})]})}const o9=3;function uv({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(i=>t.jsx("li",{children:i},i))});const s=n.slice(0,o9),r=n.length-s.length;return t.jsxs("div",{className:"upd-rels","aria-label":"What is new",children:[s.map(i=>t.jsxs("div",{className:"upd-rel",children:[t.jsx("a",{className:"upd-ver",href:i.url,target:"_blank",rel:"noreferrer",title:`What is new in ${i.version}`,children:i.version}),t.jsx("ul",{className:"upd-notes",children:i.lines.slice(0,3).map(o=>t.jsx("li",{children:o},o))})]},i.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 l9(e){const n=e.progress.state;return Ud.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 hv(){const{data:e}=Hd();if(!e)return null;const n=e.progress.state;return Ud.includes(n)?t.jsx(d9,{s:e}):n==="done"?t.jsx(u9,{s:e}):n==="failed"?t.jsx(h9,{s:e}):!e.newer||!e.latest||e.later===e.latest?null:t.jsx(c9,{s:e})}function c9({s:e}){const{pending:n,call:s}=dl(),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(ds,{size:16})}),t.jsxs("div",{className:"upd-main",children:[t.jsxs("b",{className:"upd-title",children:["squad-kit ",e.latest," is ready"]}),t.jsx(uv,{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(Em,{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(ds,{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(te,{text:"squad upgrade"})]})]})}function d9({s:e}){const n=e.progress;C.useEffect(()=>{if(n.state!=="restarting")return;Zi(!0);const h=window.setTimeout(()=>Zi(!1),i9);return()=>{window.clearTimeout(h),Zi(!1)}},[n.state]);const{pending:s,call:r}=dl(),i=Ud.indexOf(n.state),o=h=>h<i?"done":h===i?"now":"todo",l=n.now?"Stopped the running steps":n.waitedFor?.length?`Waited for ${xf(n.waitedFor)} to finish ${n.waitedFor.length===1?"its step":"their steps"}`:"No work was in the middle of a step",d=n.busy?.length?`${xf(n.busy)} ${n.busy.length===1?"is":"are"} in the middle of a step`:"Almost there",u=[{label:i>0?l:"Waiting for running work to reach a safe point",note:i===0?d:n.now?"They pick up again after the restart":"Nothing was cut off"},{label:i>1?`Installed squad-kit ${n.to}`:`Installing squad-kit ${n.to}`,note:i===1?"Takes about a minute":i>1?"Done":"Next"},{label:"Restarting the app",note:i===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:u.map((h,m)=>t.jsxs("li",{className:o(m),children:[t.jsx("span",{className:"mark",children:o(m)==="done"?t.jsx(fe,{size:12,strokeWidth:3}):o(m)==="now"?t.jsx("span",{className:"live"}):null}),t.jsxs("span",{className:"txt",children:[t.jsx("b",{children:h.label}),t.jsx("small",{title:h.note,children:h.note})]})]},h.label))}),t.jsx("div",{className:"setup-bar","aria-hidden":!0,children:t.jsx("i",{})})]})}function u9({s:e}){const{pending:n,call:s}=dl(),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(fe,{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?`${xf(r)} carried on where ${r.length===1?"it was":"they were"}. Nothing was lost.`:"Your tickets and work are kept."}),t.jsx(uv,{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 h9({s:e}){const n=e.progress,{pending:s,call:r}=dl();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(y7,{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(Em,{text:n.permission?r9(e.command):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(Es,{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 pv(){const{data:e}=Hd(),{pending:n,call:s}=dl(),{toast:r}=qe();if(!e)return null;const i=async()=>{const l=await s("/api/v1/app/update/check","POST");l&&(l.checkError?r(l.checkError,"err"):r(l.newer?`squad-kit ${l.latest} is ready`:`You are on the latest version (${l.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?a9(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:l=>void s("/api/v1/app/update","PUT",{daily:l.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 i(),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(ds,{size:14})," Update to ",e.latest]}),t.jsx("span",{className:"grow"}),t.jsx(te,{text:"squad upgrade"})]}),e.newer&&(e.devInstall||e.major)&&t.jsx(Em,{text:e.command})]})}function p9(){const{data:e}=Hd(),[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(pv,{})})]})}const fv="squad-kit-first-start-lang";function Am(){try{const e=localStorage.getItem(fv);if(e==="ar"||e==="en")return e}catch{}return typeof navigator<"u"&&navigator.language?.toLowerCase().startsWith("ar")?"ar":"en"}function f9(e){try{localStorage.setItem(fv,e)}catch{}}function mv(e){try{return localStorage.getItem(e)==="1"}catch{return!1}}function gv(e){try{localStorage.setItem(e,"1")}catch{}}const xv=e=>!!e.mergedAt||e.stage==="release"||e.stage==="done";function m9(e,n){return[...e,...n].some(xv)?null:e.find(s=>s.track!=="auto"&&!s.takenOver?.free)??null}function g9(e){const n=e.waiting?.kind;return n==="proof"?3:n==="spec"||n==="plan"?1:e.stage==="tickets"||n==="questions"?0:e.stage==="specs"?1:2}function x9(e){const n=e.waiting?.kind;return n?n==="questions"?"questions":n==="spec"||n==="plan"||n==="proof"?n:"other":"working"}const y9=1440*60*1e3;function j9(e,n,s=Date.now()){const r=[...e,...n].filter(xv);if(r.length!==1)return null;const i=r[0],o=Date.parse(i.mergedAt??"");return o&&s-o<y9?i:null}function up(e,n,s,r){return e===1?n:e===2?s:`${e} ${e<=10?r:n}`}function k9(e){const n=Date.parse(e.createdAt),s=Date.parse(e.mergedAt??""),r=n&&s?Math.max(1,Math.round((s-n)/6e4)):1,i=e.gates?.proof==="pass"?e.criteria?.length:void 0,o=(e.gates?.ran??[]).reduce((d,u)=>d+(u.ok?u.tests??0:0),0),l=(e.usage??[]).reduce((d,u)=>d+(u.costUsd??0),0);return{minutes:r,...i?{doneWhen:i}:{},...o?{tests:o}:{},...l?{costUsd:l}:{}}}const v9={en:{title:"Your first story",hide:"Hide this",open:"Open it",items:["Answer the Analyst","Approve what gets built","Your squad builds it","Check the proof and say Looks right"],hints:{questions:{head:"Your turn: answer the questions",body:"The Analyst asks only what your story leaves open. Your answers shape the story."},spec:{head:"Your turn: approve the spec",body:"This is what the squad will build, in plain words. Nothing is built until you approve it."},plan:{head:"Your turn: approve the plan",body:"This is how the squad will build it. Nothing is built until you approve it."},proof:{head:"Your turn: check the proof",body:'Each "done when" shows pictures of the real app. Look at them, or press Try it yourself to use it. Nothing is merged until you say so.'},other:{head:"Your turn",body:"The squad needs a word from you. Open the story to see what."},working:{head:"Your squad is working",body:"You can close this and come back. You get a card when the squad needs you, and you can ask a question at any time."}}},ar:{title:"قصتك الأولى",hide:"إخفاء",open:"افتحها",items:["أجب عن أسئلة المحلل","وافق على ما سيُبنى","فريقك يبنيها","راجع الدليل وقل: يبدو صحيحًا"],hints:{questions:{head:"دورك: أجب عن الأسئلة",body:"لا يسأل المحلل إلا عمّا تركته قصتك مفتوحًا، وإجاباتك تحدد شكلها."},spec:{head:"دورك: وافق على المواصفات",body:"هذا ما سيبنيه الفريق بكلمات واضحة، ولن يُبنى شيء حتى توافق."},plan:{head:"دورك: وافق على الخطة",body:"هكذا سيبنيه الفريق، ولن يُبنى شيء حتى توافق."},proof:{head:"دورك: راجع الدليل",body:"كل شرط إنجاز يعرض صورًا من التطبيق الحقيقي. انظر إليها، أو جرّب التطبيق بنفسك. لا يُدمج شيء حتى تقول ذلك."},other:{head:"دورك",body:"يحتاج الفريق إلى كلمة منك. افتح القصة لتعرف ما هي."},working:{head:"فريقك يعمل",body:"يمكنك إغلاق هذا والعودة لاحقًا. ستصلك بطاقة عندما يحتاجك الفريق، ويمكنك طرح سؤال في أي وقت."}}}};function b9({tickets:e,archived:n,live:s,project:r,onOpen:i}){const o=`squad-kit-first-story-hidden:${r}`,[l,d]=C.useState(()=>mv(o)),u=Am(),h=s&&!l?m9(e,n):null;if(!h)return null;const m=v9[u],p=g9(h),x=x9(h),y=m.hints[x];return t.jsxs("section",{className:"fs",dir:u==="ar"?"rtl":"ltr",lang:u,"aria-label":m.title,children:[t.jsxs("div",{className:`fs-hint ${x==="working"?"":"fs-hint-you"}`,children:[t.jsx("b",{children:y.head}),t.jsx("span",{children:y.body}),t.jsxs("div",{className:"fs-acts",children:[t.jsx("button",{className:"btn sm pri",onClick:()=>i(h.id),children:m.open}),t.jsx(L,{className:"note",text:h.title})]})]}),t.jsxs("div",{className:"fs-list",children:[t.jsx("b",{children:m.title}),m.items.map((j,k)=>t.jsxs("div",{className:`fs-item ${k===p?"fs-item-now":""}`,children:[t.jsx("span",{className:`fs-dot ${k<p?"fs-dot-done":""}`,children:k<p&&t.jsx(fe,{size:11,strokeWidth:3,role:"img","aria-label":"Done"})}),t.jsx("span",{children:j})]},j))]}),t.jsx("button",{className:"iconbtn","aria-label":m.hide,title:m.hide,onClick:()=>{gv(o),d(!0)},children:t.jsx(Ve,{size:15})})]})}const w9={en:{head:"Your first story is in.",sub:()=>['"','" now works in your app. Here is what your squad did.'],took:"from your idea to working",doneWhen:'"done when" checked',tests:"automatic tests pass",cost:"of AI use",next:"Write your next story",app:"Open your app",pr:"Send it as a pull request",close:"Close",of:"of",time:e=>e<60?`${e} min`:e<2880?`${Math.round(e/60)} h`:`${Math.round(e/1440)} days`},ar:{head:"قصتك الأولى اكتملت.",sub:()=>["«","» تعمل الآن في تطبيقك. هذا ما فعله فريقك."],took:"من فكرتك إلى برنامج يعمل",doneWhen:"شروط الإنجاز التي تم التحقق منها",tests:"اختبارات آلية ناجحة",cost:"من استخدام الذكاء الاصطناعي",next:"اكتب قصتك التالية",app:"افتح تطبيقك",pr:"أرسلها كطلب دمج",close:"إغلاق",of:"من",time:e=>e<60?up(e,"دقيقة","دقيقتان","دقائق"):e<2880?up(Math.round(e/60),"ساعة","ساعتان","ساعات"):up(Math.round(e/1440),"يوم","يومان","أيام")}};function N9(){const e=Ue(),n=e.data?.ready?e.data:null,s=n?`squad-kit-first-win:${n.meta.project}`:"",[r,i]=C.useState(!1),o=n&&n.meta.engine==="live"&&!r&&!mv(s)?j9(n.tickets,n.archived??[]):null;return o?t.jsx(S9,{t:o,self:!!n?.self,onClose:()=>{gv(s),i(!0)}}):null}function S9({t:e,self:n,onClose:s}){const r=qt(),i=Tm(),o=oe(),l=Am(),d=w9[l],u=k9(e),h=i.data?.apps?.find(j=>j.start),m=C.useRef(null);C.useEffect(()=>m.current?.focus(),[]),C.useEffect(()=>{const j=k=>{k.key==="Escape"&&s()};return window.addEventListener("keydown",j),()=>window.removeEventListener("keydown",j)},[s]);const[p,x]=d.sub(e.title),y=[{value:d.time(u.minutes),label:d.took},...u.doneWhen?[{value:`${u.doneWhen} ${d.of} ${u.doneWhen}`,label:d.doneWhen}]:[],...u.tests?[{value:String(u.tests),label:d.tests}]:[],...u.costUsd?[{value:`$${u.costUsd.toFixed(2)}`,label:d.cost}]:[]];return t.jsx("div",{className:"wl fw",dir:l==="ar"?"rtl":"ltr",lang:l,role:"dialog","aria-modal":"true","aria-label":d.head,children:t.jsxs("div",{className:"wl-in",children:[t.jsxs("div",{className:"wl-top",children:[t.jsxs("div",{className:"wl-logo",dir:"ltr",children:[t.jsx("img",{src:"/logo.svg",alt:""}),t.jsx("span",{children:"squad-kit"})]}),t.jsx("button",{className:"iconbtn","aria-label":d.close,onClick:s,children:t.jsx(Ve,{size:18})})]}),t.jsxs("div",{className:"wl-main",style:{maxWidth:900},children:[t.jsx(a7,{className:"fw-mark",size:64,strokeWidth:1.75,"aria-hidden":"true"}),t.jsx("h1",{className:"fw-h",children:d.head}),t.jsxs("p",{className:"fw-sub",children:[p,t.jsx(L,{text:e.title}),x]}),t.jsx("div",{className:"fw-stats",children:y.map((j,k)=>t.jsxs("div",{className:"fw-stat",style:{"--d":`${.2+k*.12}s`},children:[t.jsx("b",{children:j.value}),t.jsx("span",{children:j.label})]},j.label))}),t.jsxs("div",{className:"fw-acts",children:[n&&t.jsx("button",{ref:m,className:"wl-cta",onClick:()=>{s(),r({to:"/board",search:{ticket:e.id}})},children:d.pr}),t.jsx("button",{ref:n?void 0:m,className:n?"fw-ghost":"wl-cta",onClick:()=>{s(),r({to:"/board",search:{write:1}})},children:d.next}),h&&t.jsx("button",{className:"fw-ghost",disabled:o.isPending,onClick:()=>{o.mutate({path:`/api/v1/apps/${encodeURIComponent(h.name)}/start`,done:`Starting ${h.name}`}),s()},children:d.app})]})]})]})})}function mi(e){const n=e.changes?.at(-1);return n&&n.status!=="done"&&n.status!=="declined"?n:void 0}function Gs(e){const n=mi(e)?.status;return n==="proposed"||n==="failed"||n==="design-ready"}function ul(e){return e.now?.merging?!1:!!(e.waiting||e.quiet?.kind==="stuck"||e.outdated?.length||Gs(e)||As(e))}function As(e){return!!e.testChange?.ask}function Pm(e){return As(e)?"squad-kit cannot tell which way of testing to keep":""}function C9(e,n){return n>0?`(${n}) ${e}`:e}function $9(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 yv(e){return!e.waiting&&e.quiet?.kind==="stuck"?e.quiet.since:e.activity[0]?.at??e.createdAt}class T9{rank=new Map;next=0;sort(n){const s=n.filter(i=>!this.rank.has(i.key)).sort((i,o)=>i.since.localeCompare(o.since)||i.key.localeCompare(o.key));for(const i of s)this.rank.set(i.key,this.next++);const r=new Set(n.map(i=>i.key));for(const i of this.rank.keys())r.has(i)||this.rank.delete(i);return[...n].sort((i,o)=>this.rank.get(i.key)-this.rank.get(o.key))}}function E9(e){const n=new Set;return e.waiting&&n.add(e.waiting.kind),Gs(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 A9=["yours","chat","release"];function P9(e){return!A9.includes(e)}function R9(e,n,s){const r=mi(n),i=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}${i?`/${i}`:""}`}function I9(e){return e.flatMap(({project:n,ticket:s})=>E9(s).filter(P9).map(r=>({key:R9(n.id,s,r),project:n,ticket:s,reason:r})))}const kd=2*6e4;class F9{known=null;gone=new Map;next(n,s){const r=new Set(n.map(l=>l.key));if(!this.known)return this.known=r,[];const i=this.known,o=n.filter(l=>!i.has(l.key)&&!(s-(this.gone.get(l.key)??-1/0)<kd));for(const l of i)r.has(l)||this.gone.set(l,s);for(const[l,d]of this.gone)(r.has(l)||s-d>=kd)&&this.gone.delete(l);return this.known=r,o}}const qy="sk.notices.shown";function jv(e,n,s){if(!s)return!0;let r={};try{r=JSON.parse(s.getItem(qy)??"{}")}catch{r={}}if(n-(r[e]??-1/0)<kd)return!1;const i=Object.fromEntries(Object.entries(r).filter(([,o])=>n-o<kd));i[e]=n;try{s.setItem(qy,JSON.stringify(i))}catch{}return!0}const z9={analyst:"Analyst",architect:"Architect",builder:"Builder",reviewer:"Reviewer",tester:"Tester"};function q9(e){const n=e.ticket,s={questions:"the squad has questions for you",ask:`the ${z9[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 kv(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 L9=8e3;function M9(e,n){return e?n.secure?e.permission==="granted"||e.permission==="denied"?Promise.resolve(e.permission):new Promise(s=>{let r=!1;const i=d=>{r||(r=!0,clearTimeout(l),s(d))},o=d=>i(d==="granted"||d==="denied"||d==="default"?d:e.permission==="default"?"default":e.permission),l=setTimeout(()=>i(e.permission==="default"?"timeout":e.permission),n.timeoutMs??L9);try{const d=e.requestPermission(o);d&&typeof d.then=="function"&&d.then(o,()=>i(e.permission==="default"?"error":e.permission))}catch{i(e.permission==="default"?"error":e.permission)}}):Promise.resolve("insecure"):Promise.resolve("unsupported")}const ko="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 O9(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. ${ko}`};case"timeout":return{choice:"on",test:!1,bad:!0,say:`Your browser has not answered. ${ko} Notices start once it allows them.`};case"error":return{choice:"on",test:!1,bad:!0,say:`Your browser did not let this page ask. ${ko}`};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 vv="Your browser is asking: look near the address bar.";function _9(e,n){const s=e.filter(u=>u.kind==="tests"),r=e.filter(u=>u.kind!=="tests"),i=new Set(r.map(u=>u.id)),o=n.filter(u=>i.has(u.from)&&i.has(u.to)&&u.from!==u.to),l=new Map(r.map(u=>[u.id,0]));for(let u=0;u<r.length;u+=1){let h=!1;for(const m of o){const p=l.get(m.from)+1;p>l.get(m.to)&&p<r.length&&(l.set(m.to,p),h=!0)}if(!h)break}const d=[];for(const u of r)(d[l.get(u.id)]??=[]).push(u);return{columns:d.filter(Boolean),below:s}}function D9(e,n,s){return s.filter(r=>r.from===e.id).map(r=>`${r.label??"uses"} ${n.find(i=>i.id===r.to)?.name??r.to}`).join(" · ")}function yf(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 bv="sk.notices.setup";function Oo(e){try{const n=JSON.parse(e?.getItem(bv)??"[]");return Array.isArray(n)?n.filter(s=>typeof s=="string"):[]}catch{return[]}}function wv(e,n){try{e?.setItem(bv,JSON.stringify([...new Set(n)]))}catch{}}function B9(e,n){wv(e,[...Oo(e),n])}function W9(e,n){wv(e,Oo(e).filter(s=>s!==n))}function U9(e,n){return e.filter(s=>n.includes(s.id)&&s.setup?.ready&&!s.setup.approved)}function H9(e){return{title:`${e} is ready`,body:"squad-kit has read your project. Check what it understood, then start."}}function Nv(e,n){return(e??[]).filter(s=>s.repo===n&&!s.shared).map(s=>s.name)}function Le(e){return/["$`\\!]/.test(e)?`'${e.replace(/'/g,"'\\''")}'`:`"${e}"`}function gi(e){return/^[\w@%+=:,./#-]+$/.test(e)&&!e.startsWith("#")?e:Le(e)}function Sv(e){let n;do n=e,e=e.replace(/<!--[\s\S]*?-->/g,"");while(e!==n);return e}const Ly="Skip: let the Analyst decide",V9={reading:"Analyst reading",questions:"Questions for you",drafting:"Analyst writing the breakdown",ready:"Ready for you to approve",approved:"Approved",failed:"Stopped"},K9={reading:"ok",questions:"you",drafting:"ok",ready:"you",approved:"ok",failed:"bug"};function Cv(e){if(e.status!=="approved")return{text:V9[e.status],tone:K9[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 Y9(e){return Cv({status:e.status,counts:e.counts,building:e.building})}function Qt(e,n,s=`${n}s`){return`${e} ${e===1?n:s}`}function G9(e){return`${Qt(e.epics,"epic")}, ${Qt(e.features,"feature")}, ${Qt(e.stories,"story","stories")}`}function Q9(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 Z9(e){return e>0&&e<1?"under $1":`$${Math.round(e)}`}function $v(e){return e.rough?"a rough guess: no finished tickets yet":`based on ${Qt(e.basedOn,"finished ticket")}`}function Rm(e){return{...e.costUsd!==void 0?{cost:Z9(e.costUsd)}:{},time:Q9(e.minutes)}}function X9(e){if(!e.stories)return"Every story is merged.";const{cost:n,time:s}=Rm(e);return`${Qt(e.stories,"story","stories")}, about ${n?`${n} and `:""}${s}, ${e.parallel} at a time, ${$v(e)}`}function J9(e){if(!e.stories)return"Every story is merged";const{cost:n,time:s}=Rm(e);return`About ${s}${n?` and ${n}`:""} left`}function xi(e){return!!(e&&(e.status==="pending"||e.status==="running"||e.status==="stopping"))}const Tv=e=>e.charAt(0).toUpperCase()+e.slice(1);function eS(e){return e?`${Tv(e.unit)} ${Math.max(1,Math.min(e.done,e.of||e.done))} of ${e.of}`:""}function hp(e){if(!e||!e.epics&&!e.features&&!e.stories)return"";const n=[Qt(e.epics,"epic"),Qt(e.features,"feature"),...e.stories?[Qt(e.stories,"story","stories")]:[]];return`Found ${n.length===3?`${n[0]}, ${n[1]} and ${n[2]}`:n.join(" and ")} so far.`}function My(e){return e<60?"less than a minute":`${Math.round(e/60)} min`}function tS(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 ${My(e.usualSeconds)}${e.at?.of?` for ${Qt(e.at.of,e.at.unit)}`:""}`:"";return[s!==null?`${My(s)} so far`:"",r].filter(Boolean).join(", ")}function nS(e){const n=e.source,s=n.pictures?`, tables and ${Qt(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 ${Qt(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 sS(e){const n=e.state.job,s=n?.step,r=e.status==="failed",i=["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",l=i.indexOf(o),d=e.status==="ready"||e.status==="approved",u=x=>{const y=i.indexOf(x);return d||y<l?"done":y>l?"todo":r?"failed":"now"},h=o==="read"&&n?[eS(n.at),hp(n.found)].filter(Boolean):[],m=n?.status==="pending"&&n.now?n.now:"",p=e.questions.length;return[{key:"text",...nS(e),state:u("text")},{key:"read",title:"Reading the document",sub:u("read")==="now"?m&&!n?.at?.done?`${m}.`:h.length?`${h[0]}${h[1]?`. ${h[1]}`:"."}`:"Starting to read.":u("read")==="failed"?"It stopped here. Nothing it found is lost.":u("read")==="done"?"Read the whole document.":"Page by page, writing down the epics and features it finds.",state:u("read"),...o==="read"&&n?.at?.of?{bar:{done:n.at.done,of:n.at.of}}:{}},{key:"questions",title:"Questions for you",sub:u("questions")==="done"&&l>2?p?`${Qt(p,"question")}, answered.`:"None: the BRD was clear.":"Only when something is missing or two parts clash. Small things it decides and writes down.",state:u("questions")},{key:"draft",title:"Writing the epics, features and stories",sub:u("draft")==="now"&&n?.now?`${n.now}.${hp(n.found)?` ${hp(n.found)}`:""}`:'Each story gets "done when" checks, its size, what it needs first, and where it comes from in the BRD.',state:u("draft")}]}function hl(e){return e?[[e.section,e.title].filter(Boolean).join(" "),e.page?`page ${e.page}`:""].filter(Boolean).join(", "):""}function rS(e){return/^\d/.test(e.trim())?`From section ${e.trim()}`:`From ${e.trim()}`}function iS(e){return[e.section??e.title,e.page?`page ${e.page}`:""].filter(Boolean).join(", ")}function pl(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 Zn(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 i of s.features){if(i.key===n)return{level:"feature",item:i,epic:s,feature:i};const o=i.stories.find(l=>l.key===n);if(o)return{level:"story",item:o,epic:s,feature:i,story:o}}const r=s.stories.find(i=>i.key===n);if(r)return{level:"story",item:r,epic:s,story:r}}return null}function yi(e){return"features"in e?[...e.features.flatMap(n=>n.stories),...e.stories]:e.stories}function aS(e){return e.level==="epic"?"":[e.epic.title,e.level==="story"?e.feature?.title:void 0].filter(Boolean).join(" › ")}function Ev(e){const n=Qt(yi(e).length,"story","stories");return"features"in e&&e.features.length?`${Qt(e.features.length,"feature")}, ${n}`:n}function oS(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 lS(e){if(e.level!=="epic")return e.level==="feature"?e.epic.key:e.feature?.key??e.epic.key}const cS=["merged","released"];function Vd(e){return!!(e&&cS.includes(e))}function vd(e,n){return{done:e.filter(s=>Vd(n.get(s.key)?.state)).length,of:e.length}}function dS(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 Oy(e,n){const s=new Map(e.progress.map(r=>[r.key,r]));return pl(e).filter(({story:r})=>r.dependsOn.includes(n)&&!Vd(s.get(r.key)?.state)).map(({story:r})=>r.key)}function uS(e,n){const s=new Map(e.progress.map(r=>[r.key,r]));return n.dependsOn.filter(r=>!Vd(s.get(r)?.state))}function Av(e){return e==="clash"?"Two parts clash":e==="gap"?"Missing in the BRD":e==="check"?"A check failed":"Needs you"}function Pv(e){const n=/^(.+?[.?!])(\s|$)/.exec(e.trim());return(n?n[1]:e).trim()}function _y(e,n){const s=new Set,r=new Map(e.progress.map(d=>[d.key,d.state])),i=["building","needs-you","next","waits"],o=e.progress.some(d=>i.includes(d.state)),l=Zn(e,n);return e.epics.forEach((d,u)=>{const h=l?.epic.key===d.key,m=yi(d).some(p=>i.includes(r.get(p.key)));(h||(o?m:u===0))&&s.add(d.key);for(const p of d.features){const x=p.stories.some(y=>i.includes(r.get(y.key)));(l?.feature?.key===p.key||l?.item.key===p.key||(o?x:u===0))&&s.add(p.key)}}),s}const hS={analyst:"Analyst",architect:"Architect",builder:"Builder",tester:"Tester",reviewer:"Reviewer",answer:"from your answer"};function Dy(e){return[e.item,e.ticket,hS[e.by]??e.by].filter(Boolean).join(" · ")}function pp(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,l)=>l===0?Tv(o.toLowerCase()):o.toLowerCase()).join(" ")}function fp(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 pS(e){const n=pl(e).find(({story:s})=>s.dependsOn.length);return n?`${n.story.key} needs ${n.story.dependsOn[0]}`:null}function jf(e,n){if(!e)return{phase:"unknown",of:0,pct:0};const s=(h,m)=>m>0?Math.min(100,Math.round(h/m*100)):5,r=n&&(!n.at||!e.at||n.at===e.at)?n:null,i=e.links,o=e.items?.of??r?.items??(i?e.of:void 0);if(o===void 0)return{phase:"unknown",of:e.of,pct:s(e.done,e.of)};const l=e.items?.done??Math.min(e.done,o),d=i?.of??r?.links??0,u=e.items||i?s(l+(i?.done??0),o+(i?.of??0)):s(e.done,e.of);return l>=o&&d>0?{phase:"links",...i?{done:i.done}:{},of:d,pct:u}:{phase:"items",done:l,of:o,pct:u}}function Rv(e){return e.phase==="links"?e.done===void 0?`adding the ${Qt(e.of,"link")}`:`adding the links, ${e.done} of ${e.of}`:e.phase==="items"?`${e.done} of ${Qt(e.of,"item")}`:""}function fS(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(i=>i.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 Iv(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 mS(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 kf=e=>!e.trim();function mp(e){const n=[e.given,e.when,e.then];return n.some(kf)&&!n.every(kf)}function By(e){return e.filter(n=>![n.given,n.when,n.then].every(kf))}function Wy(e){return`Add the part that was left out: ${e.text}${e.ref?` (${hl(e.ref)})`:""}.`}function gS(e,n){const s=r=>!n||r.owner.trim().toLowerCase()===n.trim().toLowerCase();return e.filter(s).reduce((r,i)=>r+(i.status==="questions"?1:0)+i.counts.needsYou,0)}const Us={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 xS(e,n=Us.rowWidth){const{col:s,gap:r,epicGap:i,pad:o,epicH:l,featY:d,featH:u,storyY:h,storyH:m,storyStep:p}=Us,x=new Map(e.progress.map($=>[$.key,$])),y=[],j=[],k=l+(d-l)/2;let b=o,w=0,S=o,T=o+d+u,A=o*2+s;const D=($,P,F)=>{$.forEach((_,z)=>{y.push({key:_.key,level:"story",row:w,x:P,y:F+z*p,w:s,h:m,title:_.title,state:x.get(_.key)?.state??"not-started"})}),$.length&&(T=Math.max(T,F+($.length-1)*p+m))};for(const $ of e.epics){const P=[...$.features.map(I=>({kind:"feature",f:I})),...$.stories.length?[{kind:"stories"}]:[]],F=Math.max(1,P.length),_=F*s+(F-1)*r;b>o&&b+_+o>n&&(w+=1,b=o,S=T+i,T=S+d+u);const z=b+_/2;y.push({key:$.key,level:"epic",row:w,x:b,y:S,w:_,h:l,title:$.title,done:vd(yi($),x)});const U=P.map((I,W)=>b+W*(s+r)+s/2);U.length&&(j.push({x1:z,y1:S+l,x2:z,y2:S+k}),j.push({x1:Math.min(z,U[0]),y1:S+k,x2:Math.max(z,U.at(-1)),y2:S+k})),P.forEach((I,W)=>{const M=b+W*(s+r),G=U[W];I.kind==="feature"?(j.push({x1:G,y1:S+k,x2:G,y2:S+d}),y.push({key:I.f.key,level:"feature",row:w,x:M,y:S+d,w:s,h:u,title:I.f.title,done:vd(I.f.stories,x)}),I.f.stories.length&&j.push({x1:G,y1:S+d+u,x2:G,y2:S+h}),D(I.f.stories,M,S+h)):(j.push({x1:G,y1:S+k,x2:G,y2:S+h}),D($.stories,M,S+h))}),A=Math.max(A,b+_+o),b+=_+i}return{boxes:y,lines:j,width:A,height:T+o}}function Im(e){return Vd(e)?"m":e==="building"?"b":e==="needs-you"?"y":"w"}function yS(e,n){const s=Math.max(Us.pad/2,Math.min(n.x,e.width-Us.popW-Us.pad/2)),r=s+Us.popW,i=e.boxes.filter(l=>l.level!=="epic"&&l.row===n.row&&l.x<r&&l.x+l.w>s).map(l=>l.y+l.h),o=Math.max(n.y+n.h,...i)+14;return{left:s,top:o,height:Math.max(e.height,o+Us.popH+Us.pad)}}function jS(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 kS(e,n){return n.width?Math.max(.6,Math.min(1,Math.round(n.width/e.width*100)/100)):1}const Fv="sk.chatdock",vf=new Set;function vS(){try{const e=JSON.parse(localStorage.getItem(Fv)??"{}");return{tab:e.tab??null,min:!!e.min,width:zv(e.width??600),seen:e.seen??{}}}catch{return{tab:null,min:!1,width:600,seen:{}}}}let ni=typeof window>"u"?{tab:null,min:!1,width:600,seen:{}}:vS();function zv(e){return Math.max(440,Math.min(900,Math.round(e)))}function Ui(e){ni={...ni,...e};try{localStorage.setItem(Fv,JSON.stringify(ni))}catch{}for(const n of vf)n()}const Ss={get:()=>ni,show:e=>Ui({tab:e,min:!1}),pick:e=>Ui({tab:e}),minimize:()=>Ui({min:!0}),restore:()=>Ui({min:!1}),resize:e=>Ui({width:zv(e)}),seen:(e,n)=>{ni.seen[e]!==n&&Ui({seen:{...ni.seen,[e]:n}})}};function xa(e){return C.useSyncExternalStore(n=>{const s=window.matchMedia?.(e);return s?.addEventListener("change",n),()=>s?.removeEventListener("change",n)},()=>!!window.matchMedia?.(e).matches)}const ya="(max-width: 760px)";function Kd(){return C.useSyncExternalStore(e=>(vf.add(e),()=>vf.delete(e)),()=>ni)}function bS(e,n){const s={};return(e[e.length-1]===""?[...e,""]:e).join((s.padRight?" ":"")+","+(s.padLeft===!1?"":" ")).trim()}const wS=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,NS=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,SS={};function Uy(e,n){return(SS.jsx?NS:wS).test(e)}const CS=/[ \t\n\f\r]/g;function $S(e){return typeof e=="object"?e.type==="text"?Hy(e.value):!1:Hy(e)}function Hy(e){return e.replace(CS,"")===""}class fl{constructor(n,s,r){this.normal=s,this.property=n,r&&(this.space=r)}}fl.prototype.normal={};fl.prototype.property={};fl.prototype.space=void 0;function qv(e,n){const s={},r={};for(const i of e)Object.assign(s,i.property),Object.assign(r,i.normal);return new fl(s,r,n)}function bf(e){return e.toLowerCase()}class yn{constructor(n,s){this.attribute=s,this.property=n}}yn.prototype.attribute="";yn.prototype.booleanish=!1;yn.prototype.boolean=!1;yn.prototype.commaOrSpaceSeparated=!1;yn.prototype.commaSeparated=!1;yn.prototype.defined=!1;yn.prototype.mustUseProperty=!1;yn.prototype.number=!1;yn.prototype.overloadedBoolean=!1;yn.prototype.property="";yn.prototype.spaceSeparated=!1;yn.prototype.space=void 0;let TS=0;const Oe=ji(),St=ji(),wf=ji(),he=ji(),nt=ji(),Xi=ji(),Cn=ji();function ji(){return 2**++TS}const Nf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Oe,booleanish:St,commaOrSpaceSeparated:Cn,commaSeparated:Xi,number:he,overloadedBoolean:wf,spaceSeparated:nt},Symbol.toStringTag,{value:"Module"})),gp=Object.keys(Nf);class Fm extends yn{constructor(n,s,r,i){let o=-1;if(super(n,s),Vy(this,"space",i),typeof r=="number")for(;++o<gp.length;){const l=gp[o];Vy(this,gp[o],(r&Nf[l])===Nf[l])}}}Fm.prototype.defined=!0;function Vy(e,n,s){s&&(e[n]=s)}function ja(e){const n={},s={};for(const[r,i]of Object.entries(e.properties)){const o=new Fm(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),n[r]=o,s[bf(r)]=r,s[bf(o.attribute)]=r}return new fl(n,s,e.space)}const Lv=ja({properties:{ariaActiveDescendant:null,ariaAtomic:St,ariaAutoComplete:null,ariaBusy:St,ariaChecked:St,ariaColCount:he,ariaColIndex:he,ariaColSpan:he,ariaControls:nt,ariaCurrent:null,ariaDescribedBy:nt,ariaDetails:null,ariaDisabled:St,ariaDropEffect:nt,ariaErrorMessage:null,ariaExpanded:St,ariaFlowTo:nt,ariaGrabbed:St,ariaHasPopup:null,ariaHidden:St,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:nt,ariaLevel:he,ariaLive:null,ariaModal:St,ariaMultiLine:St,ariaMultiSelectable:St,ariaOrientation:null,ariaOwns:nt,ariaPlaceholder:null,ariaPosInSet:he,ariaPressed:St,ariaReadOnly:St,ariaRelevant:null,ariaRequired:St,ariaRoleDescription:nt,ariaRowCount:he,ariaRowIndex:he,ariaRowSpan:he,ariaSelected:St,ariaSetSize:he,ariaSort:null,ariaValueMax:he,ariaValueMin:he,ariaValueNow:he,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function Mv(e,n){return n in e?e[n]:n}function Ov(e,n){return Mv(e,n.toLowerCase())}const ES=ja({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Xi,acceptCharset:nt,accessKey:nt,action:null,allow:null,allowFullScreen:Oe,allowPaymentRequest:Oe,allowUserMedia:Oe,alt:null,as:null,async:Oe,autoCapitalize:null,autoComplete:nt,autoFocus:Oe,autoPlay:Oe,blocking:nt,capture:null,charSet:null,checked:Oe,cite:null,className:nt,cols:he,colSpan:null,content:null,contentEditable:St,controls:Oe,controlsList:nt,coords:he|Xi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Oe,defer:Oe,dir:null,dirName:null,disabled:Oe,download:wf,draggable:St,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Oe,formTarget:null,headers:nt,height:he,hidden:wf,high:he,href:null,hrefLang:null,htmlFor:nt,httpEquiv:nt,id:null,imageSizes:null,imageSrcSet:null,inert:Oe,inputMode:null,integrity:null,is:null,isMap:Oe,itemId:null,itemProp:nt,itemRef:nt,itemScope:Oe,itemType:nt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Oe,low:he,manifest:null,max:null,maxLength:he,media:null,method:null,min:null,minLength:he,multiple:Oe,muted:Oe,name:null,nonce:null,noModule:Oe,noValidate:Oe,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:Oe,optimum:he,pattern:null,ping:nt,placeholder:null,playsInline:Oe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Oe,referrerPolicy:null,rel:nt,required:Oe,reversed:Oe,rows:he,rowSpan:he,sandbox:nt,scope:null,scoped:Oe,seamless:Oe,selected:Oe,shadowRootClonable:Oe,shadowRootDelegatesFocus:Oe,shadowRootMode:null,shape:null,size:he,sizes:null,slot:null,span:he,spellCheck:St,src:null,srcDoc:null,srcLang:null,srcSet:null,start:he,step:null,style:null,tabIndex:he,target:null,title:null,translate:null,type:null,typeMustMatch:Oe,useMap:null,value:St,width:he,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:nt,axis:null,background:null,bgColor:null,border:he,borderColor:null,bottomMargin:he,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Oe,declare:Oe,event:null,face:null,frame:null,frameBorder:null,hSpace:he,leftMargin:he,link:null,longDesc:null,lowSrc:null,marginHeight:he,marginWidth:he,noResize:Oe,noHref:Oe,noShade:Oe,noWrap:Oe,object:null,profile:null,prompt:null,rev:null,rightMargin:he,rules:null,scheme:null,scrolling:St,standby:null,summary:null,text:null,topMargin:he,valueType:null,version:null,vAlign:null,vLink:null,vSpace:he,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Oe,disableRemotePlayback:Oe,prefix:null,property:null,results:he,security:null,unselectable:null},space:"html",transform:Ov}),AS=ja({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:Cn,accentHeight:he,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:he,amplitude:he,arabicForm:null,ascent:he,attributeName:null,attributeType:null,azimuth:he,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:he,by:null,calcMode:null,capHeight:he,className:nt,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:he,diffuseConstant:he,direction:null,display:null,dur:null,divisor:he,dominantBaseline:null,download:Oe,dx:null,dy:null,edgeMode:null,editable:null,elevation:he,enableBackground:null,end:null,event:null,exponent:he,externalResourcesRequired:null,fill:null,fillOpacity:he,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:Xi,g2:Xi,glyphName:Xi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:he,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:he,horizOriginX:he,horizOriginY:he,id:null,ideographic:he,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:he,k:he,k1:he,k2:he,k3:he,k4:he,kernelMatrix:Cn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:he,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:he,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:he,overlineThickness:he,paintOrder:null,panose1:null,path:null,pathLength:he,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:nt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:he,pointsAtY:he,pointsAtZ:he,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Cn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Cn,rev:Cn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Cn,requiredFeatures:Cn,requiredFonts:Cn,requiredFormats:Cn,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:he,specularExponent:he,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:he,strikethroughThickness:he,string:null,stroke:null,strokeDashArray:Cn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:he,strokeOpacity:he,strokeWidth:null,style:null,surfaceScale:he,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Cn,tabIndex:he,tableValues:null,target:null,targetX:he,targetY:he,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Cn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:he,underlineThickness:he,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:he,values:null,vAlphabetic:he,vMathematical:he,vectorEffect:null,vHanging:he,vIdeographic:he,version:null,vertAdvY:he,vertOriginX:he,vertOriginY:he,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:he,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Mv}),_v=ja({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()}}),Dv=ja({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ov}),Bv=ja({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),PS={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"},RS=/[A-Z]/g,Ky=/-[a-z]/g,IS=/^data[-\w.:]+$/i;function FS(e,n){const s=bf(n);let r=n,i=yn;if(s in e.normal)return e.property[e.normal[s]];if(s.length>4&&s.slice(0,4)==="data"&&IS.test(n)){if(n.charAt(4)==="-"){const o=n.slice(5).replace(Ky,qS);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=n.slice(4);if(!Ky.test(o)){let l=o.replace(RS,zS);l.charAt(0)!=="-"&&(l="-"+l),n="data"+l}}i=Fm}return new i(r,n)}function zS(e){return"-"+e.toLowerCase()}function qS(e){return e.charAt(1).toUpperCase()}const LS=qv([Lv,ES,_v,Dv,Bv],"html"),zm=qv([Lv,AS,_v,Dv,Bv],"svg");function MS(e){return e.join(" ").trim()}var Hi={},xp,Yy;function OS(){if(Yy)return xp;Yy=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,s=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,d=/^\s+|\s+$/g,u=`
|
|
614
|
-
`,h="/",m="*",p="",x="comment",y="declaration";function j(b,w){if(typeof b!="string")throw new TypeError("First argument must be a string");if(!b)return[];w=w||{};var S=1,T=1;function A(M){var G=M.match(n);G&&(S+=G.length);var ce=M.lastIndexOf(u);T=~ce?M.length-ce:T+M.length}function D(){var M={line:S,column:T};return function(G){return G.position=new $(M),_(),G}}function $(M){this.start=M,this.end={line:S,column:T},this.source=w.source}$.prototype.content=b;function P(M){var G=new Error(w.source+":"+S+":"+T+": "+M);if(G.reason=M,G.filename=w.source,G.line=S,G.column=T,G.source=b,!w.silent)throw G}function F(M){var G=M.exec(b);if(G){var ce=G[0];return A(ce),b=b.slice(ce.length),G}}function _(){F(s)}function z(M){var G;for(M=M||[];G=U();)G!==!1&&M.push(G);return M}function U(){var M=D();if(!(h!=b.charAt(0)||m!=b.charAt(1))){for(var G=2;p!=b.charAt(G)&&(m!=b.charAt(G)||h!=b.charAt(G+1));)++G;if(G+=2,p===b.charAt(G-1))return P("End of comment missing");var ce=b.slice(2,G-2);return T+=2,A(ce),b=b.slice(G),T+=2,M({type:x,comment:ce})}}function I(){var M=D(),G=F(r);if(G){if(U(),!F(i))return P("property missing ':'");var ce=F(o),V=M({type:y,property:k(G[0].replace(e,p)),value:ce?k(ce[0].replace(e,p)):p});return F(l),V}}function W(){var M=[];z(M);for(var G;G=I();)G!==!1&&(M.push(G),z(M));return M}return _(),W()}function k(b){return b?b.replace(d,p):p}return xp=j,xp}var Gy;function _S(){if(Gy)return Hi;Gy=1;var e=Hi&&Hi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Hi,"__esModule",{value:!0}),Hi.default=s;const n=e(OS());function s(r,i){let o=null;if(!r||typeof r!="string")return o;const l=(0,n.default)(r),d=typeof i=="function";return l.forEach(u=>{if(u.type!=="declaration")return;const{property:h,value:m}=u;d?i(h,m,u):m&&(o=o||{},o[h]=m)}),o}return Hi}var po={},Qy;function DS(){if(Qy)return po;Qy=1,Object.defineProperty(po,"__esModule",{value:!0}),po.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,s=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(h){return!h||s.test(h)||e.test(h)},l=function(h,m){return m.toUpperCase()},d=function(h,m){return"".concat(m,"-")},u=function(h,m){return m===void 0&&(m={}),o(h)?h:(h=h.toLowerCase(),m.reactCompat?h=h.replace(i,d):h=h.replace(r,d),h.replace(n,l))};return po.camelCase=u,po}var fo,Zy;function BS(){if(Zy)return fo;Zy=1;var e=fo&&fo.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},n=e(_S()),s=DS();function r(i,o){var l={};return!i||typeof i!="string"||(0,n.default)(i,function(d,u){d&&u&&(l[(0,s.camelCase)(d,o)]=u)}),l}return r.default=r,fo=r,fo}var WS=BS();const US=em(WS),Wv=Uv("end"),qm=Uv("start");function Uv(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 HS(e){const n=qm(e),s=Wv(e);if(n&&s)return{start:n,end:s}}function vo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Xy(e.position):"start"in e||"end"in e?Xy(e):"line"in e||"column"in e?Sf(e):""}function Sf(e){return Jy(e&&e.line)+":"+Jy(e&&e.column)}function Xy(e){return Sf(e&&e.start)+"-"+Sf(e&&e.end)}function Jy(e){return e&&typeof e=="number"?e:1}class Zt extends Error{constructor(n,s,r){super(),typeof s=="string"&&(r=s,s=void 0);let i="",o={},l=!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"?i=n:!o.cause&&n&&(l=!0,i=n.message,o.cause=n),!o.ruleId&&!o.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?o.ruleId=r:(o.source=r.slice(0,u),o.ruleId=r.slice(u+1))}if(!o.place&&o.ancestors&&o.ancestors){const u=o.ancestors[o.ancestors.length-1];u&&(o.place=u.position)}const d=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=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=d?d.line:void 0,this.name=vo(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=l&&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}}Zt.prototype.file="";Zt.prototype.name="";Zt.prototype.reason="";Zt.prototype.message="";Zt.prototype.stack="";Zt.prototype.column=void 0;Zt.prototype.line=void 0;Zt.prototype.ancestors=void 0;Zt.prototype.cause=void 0;Zt.prototype.fatal=void 0;Zt.prototype.place=void 0;Zt.prototype.ruleId=void 0;Zt.prototype.source=void 0;const Lm={}.hasOwnProperty,VS=new Map,KS=/[A-Z]/g,YS=new Set(["table","tbody","thead","tfoot","tr"]),GS=new Set(["td","th"]),Hv="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function QS(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=rC(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=sC(s,n.jsx,n.jsxs)}const i={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"?zm:LS,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},o=Vv(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Vv(e,n,s){if(n.type==="element")return ZS(e,n,s);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return XS(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return eC(e,n,s);if(n.type==="mdxjsEsm")return JS(e,n);if(n.type==="root")return tC(e,n,s);if(n.type==="text")return nC(e,n)}function ZS(e,n,s){const r=e.schema;let i=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=zm,e.schema=i),e.ancestors.push(n);const o=Yv(e,n.tagName,!1),l=iC(e,n);let d=Om(e,n);return YS.has(n.tagName)&&(d=d.filter(function(u){return typeof u=="string"?!$S(u):!0})),Kv(e,l,o,n),Mm(l,d),e.ancestors.pop(),e.schema=r,e.create(n,o,l,s)}function XS(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)}_o(e,n.position)}function JS(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);_o(e,n.position)}function eC(e,n,s){const r=e.schema;let i=r;n.name==="svg"&&r.space==="html"&&(i=zm,e.schema=i),e.ancestors.push(n);const o=n.name===null?e.Fragment:Yv(e,n.name,!0),l=aC(e,n),d=Om(e,n);return Kv(e,l,o,n),Mm(l,d),e.ancestors.pop(),e.schema=r,e.create(n,o,l,s)}function tC(e,n,s){const r={};return Mm(r,Om(e,n)),e.create(n,e.Fragment,r,s)}function nC(e,n){return n.value}function Kv(e,n,s,r){typeof s!="string"&&s!==e.Fragment&&e.passNode&&(n.node=r)}function Mm(e,n){if(n.length>0){const s=n.length>1?n:n[0];s&&(e.children=s)}}function sC(e,n,s){return r;function r(i,o,l,d){const h=Array.isArray(l.children)?s:n;return d?h(o,l,d):h(o,l)}}function rC(e,n){return s;function s(r,i,o,l){const d=Array.isArray(o.children),u=qm(r);return n(i,o,l,d,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function iC(e,n){const s={};let r,i;for(i in n.properties)if(i!=="children"&&Lm.call(n.properties,i)){const o=oC(e,i,n.properties[i]);if(o){const[l,d]=o;e.tableCellAlignToStyle&&l==="align"&&typeof d=="string"&&GS.has(n.tagName)?r=d:s[l]=d}}if(r){const o=s.style||(s.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return s}function aC(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 l=o.expression;l.type;const d=l.properties[0];d.type,Object.assign(s,e.evaluater.evaluateExpression(d.argument))}else _o(e,n.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const d=r.value.data.estree.body[0];d.type,o=e.evaluater.evaluateExpression(d.expression)}else _o(e,n.position);else o=r.value===null?!0:r.value;s[i]=o}return s}function Om(e,n){const s=[];let r=-1;const i=e.passKeys?new Map:VS;for(;++r<n.children.length;){const o=n.children[r];let l;if(e.passKeys){const u=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(u){const h=i.get(u)||0;l=u+"-"+h,i.set(u,h+1)}}const d=Vv(e,o,l);d!==void 0&&s.push(d)}return s}function oC(e,n,s){const r=FS(e.schema,n);if(!(s==null||typeof s=="number"&&Number.isNaN(s))){if(Array.isArray(s)&&(s=r.commaSeparated?bS(s):MS(s)),r.property==="style"){let i=typeof s=="object"?s:lC(e,String(s));return e.stylePropertyNameCase==="css"&&(i=cC(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?PS[r.property]||r.property:r.attribute,s]}}function lC(e,n){try{return US(n,{reactCompat:!0})}catch(s){if(e.ignoreInvalidStyle)return{};const r=s,i=new Zt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Hv+"#cannot-parse-style-attribute",i}}function Yv(e,n,s){let r;if(!s)r={type:"Literal",value:n};else if(n.includes(".")){const i=n.split(".");let o=-1,l;for(;++o<i.length;){const d=Uy(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};l=l?{type:"MemberExpression",object:l,property:d,computed:!!(o&&d.type==="Literal"),optional:!1}:d}r=l}else r=Uy(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(r.type==="Literal"){const i=r.value;return Lm.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);_o(e)}function _o(e,n){const s=new Zt("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=Hv+"#cannot-handle-mdx-estrees-without-createevaluater",s}function cC(e){const n={};let s;for(s in e)Lm.call(e,s)&&(n[dC(s)]=e[s]);return n}function dC(e){let n=e.replace(KS,uC);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function uC(e){return"-"+e.toLowerCase()}const yp={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"]},hC={};function _m(e,n){const s=hC,r=typeof s.includeImageAlt=="boolean"?s.includeImageAlt:!0,i=typeof s.includeHtml=="boolean"?s.includeHtml:!0;return Gv(e,r,i)}function Gv(e,n,s){if(pC(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 e2(e.children,n,s)}return Array.isArray(e)?e2(e,n,s):""}function e2(e,n,s){const r=[];let i=-1;for(;++i<e.length;)r[i]=Gv(e[i],n,s);return r.join("")}function pC(e){return!!(e&&typeof e=="object")}const t2=document.createElement("i");function Dm(e){const n="&"+e+";";t2.innerHTML=n;const s=t2.textContent;return s.charCodeAt(s.length-1)===59&&e!=="semi"||s===n?!1:s}function An(e,n,s,r){const i=e.length;let o=0,l;if(n<0?n=-n>i?0:i+n:n=n>i?i:n,s=s>0?s:0,r.length<1e4)l=Array.from(r),l.unshift(n,s),e.splice(...l);else for(s&&e.splice(n,s);o<r.length;)l=r.slice(o,o+1e4),l.unshift(n,0),e.splice(...l),o+=1e4,n+=1e4}function Un(e,n){return e.length>0?(An(e,e.length,0,n),e):n}const n2={}.hasOwnProperty;function Qv(e){const n={};let s=-1;for(;++s<e.length;)fC(n,e[s]);return n}function fC(e,n){let s;for(s in n){const i=(n2.call(e,s)?e[s]:void 0)||(e[s]={}),o=n[s];let l;if(o)for(l in o){n2.call(i,l)||(i[l]=[]);const d=o[l];mC(i[l],Array.isArray(d)?d:d?[d]:[])}}}function mC(e,n){let s=-1;const r=[];for(;++s<n.length;)(n[s].add==="after"?e:r).push(n[s]);An(e,0,0,r)}function Zv(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 cs(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const nn=Rr(/[A-Za-z]/),Kt=Rr(/[\dA-Za-z]/),gC=Rr(/[#-'*+\--9=?A-Z^-~]/);function bd(e){return e!==null&&(e<32||e===127)}const Cf=Rr(/\d/),xC=Rr(/[\dA-Fa-f]/),yC=Rr(/[!-/:-@[-`{-~]/);function Re(e){return e!==null&&e<-2}function et(e){return e!==null&&(e<0||e===32)}function Be(e){return e===-2||e===-1||e===32}const Yd=Rr(/\p{P}|\p{S}/u),li=Rr(/\s/);function Rr(e){return n;function n(s){return s!==null&&s>-1&&e.test(String.fromCharCode(s))}}function ka(e){const n=[];let s=-1,r=0,i=0;for(;++s<e.length;){const o=e.charCodeAt(s);let l="";if(o===37&&Kt(e.charCodeAt(s+1))&&Kt(e.charCodeAt(s+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const d=e.charCodeAt(s+1);o<56320&&d>56319&&d<57344?(l=String.fromCharCode(o,d),i=1):l="�"}else l=String.fromCharCode(o);l&&(n.push(e.slice(r,s),encodeURIComponent(l)),r=s+i+1,l=""),i&&(s+=i,i=0)}return n.join("")+e.slice(r)}function Ke(e,n,s,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(u){return Be(u)?(e.enter(s),d(u)):n(u)}function d(u){return Be(u)&&o++<i?(e.consume(u),d):(e.exit(s),n(u))}}const jC={tokenize:kC};function kC(e){const n=e.attempt(this.parser.constructs.contentInitial,r,i);let s;return n;function r(d){if(d===null){e.consume(d);return}return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Ke(e,n,"linePrefix")}function i(d){return e.enter("paragraph"),o(d)}function o(d){const u=e.enter("chunkText",{contentType:"text",previous:s});return s&&(s.next=u),s=u,l(d)}function l(d){if(d===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(d);return}return Re(d)?(e.consume(d),e.exit("chunkText"),o):(e.consume(d),l)}}const vC={tokenize:bC},s2={tokenize:wC};function bC(e){const n=this,s=[];let r=0,i,o,l;return d;function d(T){if(r<s.length){const A=s[r];return n.containerState=A[1],e.attempt(A[0].continuation,u,h)(T)}return h(T)}function u(T){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&S();const A=n.events.length;let D=A,$;for(;D--;)if(n.events[D][0]==="exit"&&n.events[D][1].type==="chunkFlow"){$=n.events[D][1].end;break}w(r);let P=A;for(;P<n.events.length;)n.events[P][1].end={...$},P++;return An(n.events,D+1,0,n.events.slice(A)),n.events.length=P,h(T)}return d(T)}function h(T){if(r===s.length){if(!i)return x(T);if(i.currentConstruct&&i.currentConstruct.concrete)return j(T);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(s2,m,p)(T)}function m(T){return i&&S(),w(r),x(T)}function p(T){return n.parser.lazy[n.now().line]=r!==s.length,l=n.now().offset,j(T)}function x(T){return n.containerState={},e.attempt(s2,y,j)(T)}function y(T){return r++,s.push([n.currentConstruct,n.containerState]),x(T)}function j(T){if(T===null){i&&S(),w(0),e.consume(T);return}return i=i||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),k(T)}function k(T){if(T===null){b(e.exit("chunkFlow"),!0),w(0),e.consume(T);return}return Re(T)?(e.consume(T),b(e.exit("chunkFlow")),r=0,n.interrupt=void 0,d):(e.consume(T),k)}function b(T,A){const D=n.sliceStream(T);if(A&&D.push(null),T.previous=o,o&&(o.next=T),o=T,i.defineSkip(T.start),i.write(D),n.parser.lazy[T.start.line]){let $=i.events.length;for(;$--;)if(i.events[$][1].start.offset<l&&(!i.events[$][1].end||i.events[$][1].end.offset>l))return;const P=n.events.length;let F=P,_,z;for(;F--;)if(n.events[F][0]==="exit"&&n.events[F][1].type==="chunkFlow"){if(_){z=n.events[F][1].end;break}_=!0}for(w(r),$=P;$<n.events.length;)n.events[$][1].end={...z},$++;An(n.events,F+1,0,n.events.slice(P)),n.events.length=$}}function w(T){let A=s.length;for(;A-- >T;){const D=s[A];n.containerState=D[1],D[0].exit.call(n,e)}s.length=T}function S(){i.write([null]),o=void 0,i=void 0,n.containerState._closeFlow=void 0}}function wC(e,n,s){return Ke(e,e.attempt(this.parser.constructs.document,n,s),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ia(e){if(e===null||et(e)||li(e))return 1;if(Yd(e))return 2}function Gd(e,n,s){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(n=o(n,s),r.push(o))}return n}const $f={name:"attention",resolveAll:NC,tokenize:SC};function NC(e,n){let s=-1,r,i,o,l,d,u,h,m;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;u=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 p={...e[r][1].end},x={...e[s][1].start};r2(p,-u),r2(x,u),l={type:u>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},d={type:u>1?"strongSequence":"emphasisSequence",start:{...e[s][1].start},end:x},o={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[s][1].start}},i={type:u>1?"strong":"emphasis",start:{...l.start},end:{...d.end}},e[r][1].end={...l.start},e[s][1].start={...d.end},h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=Un(h,[["enter",e[r][1],n],["exit",e[r][1],n]])),h=Un(h,[["enter",i,n],["enter",l,n],["exit",l,n],["enter",o,n]]),h=Un(h,Gd(n.parser.constructs.insideSpan.null,e.slice(r+1,s),n)),h=Un(h,[["exit",o,n],["enter",d,n],["exit",d,n],["exit",i,n]]),e[s][1].end.offset-e[s][1].start.offset?(m=2,h=Un(h,[["enter",e[s][1],n],["exit",e[s][1],n]])):m=0,An(e,r-1,s-r+3,h),s=r+h.length-m-2;break}}for(s=-1;++s<e.length;)e[s][1].type==="attentionSequence"&&(e[s][1].type="data");return e}function SC(e,n){const s=this.parser.constructs.attentionMarkers.null,r=this.previous,i=ia(r);let o;return l;function l(u){return o=u,e.enter("attentionSequence"),d(u)}function d(u){if(u===o)return e.consume(u),d;const h=e.exit("attentionSequence"),m=ia(u),p=!m||m===2&&i||s.includes(u),x=!i||i===2&&m||s.includes(r);return h._open=!!(o===42?p:p&&(i||!x)),h._close=!!(o===42?x:x&&(m||!p)),n(u)}}function r2(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const CC={name:"autolink",tokenize:$C};function $C(e,n,s){let r=0;return i;function i(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(y){return nn(y)?(e.consume(y),l):y===64?s(y):h(y)}function l(y){return y===43||y===45||y===46||Kt(y)?(r=1,d(y)):h(y)}function d(y){return y===58?(e.consume(y),r=0,u):(y===43||y===45||y===46||Kt(y))&&r++<32?(e.consume(y),d):(r=0,h(y))}function u(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),n):y===null||y===32||y===60||bd(y)?s(y):(e.consume(y),u)}function h(y){return y===64?(e.consume(y),m):gC(y)?(e.consume(y),h):s(y)}function m(y){return Kt(y)?p(y):s(y)}function p(y){return y===46?(e.consume(y),r=0,m):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),n):x(y)}function x(y){if((y===45||Kt(y))&&r++<63){const j=y===45?x:p;return e.consume(y),j}return s(y)}}const ml={partial:!0,tokenize:TC};function TC(e,n,s){return r;function r(o){return Be(o)?Ke(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||Re(o)?n(o):s(o)}}const Xv={continuation:{tokenize:AC},exit:PC,name:"blockQuote",tokenize:EC};function EC(e,n,s){const r=this;return i;function i(l){if(l===62){const d=r.containerState;return d.open||(e.enter("blockQuote",{_container:!0}),d.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return s(l)}function o(l){return Be(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(l))}}function AC(e,n,s){const r=this;return i;function i(l){return Be(l)?Ke(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(Xv,n,s)(l)}}function PC(e){e.exit("blockQuote")}const Jv={name:"characterEscape",tokenize:RC};function RC(e,n,s){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return yC(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):s(o)}}const eb={name:"characterReference",tokenize:IC};function IC(e,n,s){const r=this;let i=0,o,l;return d;function d(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),u}function u(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),o=31,l=Kt,m(p))}function h(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=xC,m):(e.enter("characterReferenceValue"),o=7,l=Cf,m(p))}function m(p){if(p===59&&i){const x=e.exit("characterReferenceValue");return l===Kt&&!Dm(r.sliceSerialize(x))?s(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return l(p)&&i++<o?(e.consume(p),m):s(p)}}const i2={partial:!0,tokenize:zC},a2={concrete:!0,name:"codeFenced",tokenize:FC};function FC(e,n,s){const r=this,i={partial:!0,tokenize:D};let o=0,l=0,d;return u;function u($){return h($)}function h($){const P=r.events[r.events.length-1];return o=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,d=$,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m($)}function m($){return $===d?(l++,e.consume($),m):l<3?s($):(e.exit("codeFencedFenceSequence"),Be($)?Ke(e,p,"whitespace")($):p($))}function p($){return $===null||Re($)?(e.exit("codeFencedFence"),r.interrupt?n($):e.check(i2,k,A)($)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x($))}function x($){return $===null||Re($)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p($)):Be($)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ke(e,y,"whitespace")($)):$===96&&$===d?s($):(e.consume($),x)}function y($){return $===null||Re($)?p($):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),j($))}function j($){return $===null||Re($)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p($)):$===96&&$===d?s($):(e.consume($),j)}function k($){return e.attempt(i,A,b)($)}function b($){return e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),w}function w($){return o>0&&Be($)?Ke(e,S,"linePrefix",o+1)($):S($)}function S($){return $===null||Re($)?e.check(i2,k,A)($):(e.enter("codeFlowValue"),T($))}function T($){return $===null||Re($)?(e.exit("codeFlowValue"),S($)):(e.consume($),T)}function A($){return e.exit("codeFenced"),n($)}function D($,P,F){let _=0;return z;function z(G){return $.enter("lineEnding"),$.consume(G),$.exit("lineEnding"),U}function U(G){return $.enter("codeFencedFence"),Be(G)?Ke($,I,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(G):I(G)}function I(G){return G===d?($.enter("codeFencedFenceSequence"),W(G)):F(G)}function W(G){return G===d?(_++,$.consume(G),W):_>=l?($.exit("codeFencedFenceSequence"),Be(G)?Ke($,M,"whitespace")(G):M(G)):F(G)}function M(G){return G===null||Re(G)?($.exit("codeFencedFence"),P(G)):F(G)}}}function zC(e,n,s){const r=this;return i;function i(l){return l===null?s(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?s(l):n(l)}}const jp={name:"codeIndented",tokenize:LC},qC={partial:!0,tokenize:MC};function LC(e,n,s){const r=this;return i;function i(h){return e.enter("codeIndented"),Ke(e,o,"linePrefix",5)(h)}function o(h){const m=r.events[r.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?l(h):s(h)}function l(h){return h===null?u(h):Re(h)?e.attempt(qC,l,u)(h):(e.enter("codeFlowValue"),d(h))}function d(h){return h===null||Re(h)?(e.exit("codeFlowValue"),l(h)):(e.consume(h),d)}function u(h){return e.exit("codeIndented"),n(h)}}function MC(e,n,s){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?s(l):Re(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):Ke(e,o,"linePrefix",5)(l)}function o(l){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?n(l):Re(l)?i(l):s(l)}}const OC={name:"codeText",previous:DC,resolve:_C,tokenize:BC};function _C(e){let n=e.length-4,s=3,r,i;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;)i===void 0?r!==n&&e[r][1].type!=="lineEnding"&&(i=r):(r===n||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),n-=r-i-2,r=i+2),i=void 0);return e}function DC(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function BC(e,n,s){let r=0,i,o;return l;function l(p){return e.enter("codeText"),e.enter("codeTextSequence"),d(p)}function d(p){return p===96?(e.consume(p),r++,d):(e.exit("codeTextSequence"),u(p))}function u(p){return p===null?s(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),u):p===96?(o=e.enter("codeTextSequence"),i=0,m(p)):Re(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),u):(e.enter("codeTextData"),h(p))}function h(p){return p===null||p===32||p===96||Re(p)?(e.exit("codeTextData"),u(p)):(e.consume(p),h)}function m(p){return p===96?(e.consume(p),i++,m):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),n(p)):(o.type="codeTextData",h(p))}}class WC{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 i=s||0;this.setCursor(Math.trunc(n));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&mo(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),mo(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),mo(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);mo(this.right,s.reverse())}else{const s=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);mo(this.left,s.reverse())}}}function mo(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 tb(e){const n={};let s=-1,r,i,o,l,d,u,h;const m=new WC(e);for(;++s<m.length;){for(;s in n;)s=n[s];if(r=m.get(s),s&&r[1].type==="chunkFlow"&&m.get(s-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,o=0,o<u.length&&u[o][1].type==="lineEndingBlank"&&(o+=2),o<u.length&&u[o][1].type==="content"))for(;++o<u.length&&u[o][1].type!=="content";)u[o][1].type==="chunkText"&&(u[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,UC(m,s)),s=n[s],h=!0);else if(r[1]._container){for(o=s,i=void 0;o--;)if(l=m.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(m.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...m.get(i)[1].start},d=m.slice(i,s),d.unshift(r),m.splice(i,s-i+1,d))}}return An(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!h}function UC(e,n){const s=e.get(n)[1],r=e.get(n)[2];let i=n-1;const o=[];let l=s._tokenizer;l||(l=r.parser[s.contentType](s.start),s._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const d=l.events,u=[],h={};let m,p,x=-1,y=s,j=0,k=0;const b=[k];for(;y;){for(;e.get(++i)[1]!==y;);o.push(i),y._tokenizer||(m=r.sliceStream(y),y.next||m.push(null),p&&l.defineSkip(y.start),y._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(m),y._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),p=y,y=y.next}for(y=s;++x<d.length;)d[x][0]==="exit"&&d[x-1][0]==="enter"&&d[x][1].type===d[x-1][1].type&&d[x][1].start.line!==d[x][1].end.line&&(k=x+1,b.push(k),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(l.events=[],y?(y._tokenizer=void 0,y.previous=void 0):b.pop(),x=b.length;x--;){const w=d.slice(b[x],b[x+1]),S=o.pop();u.push([S,S+w.length-1]),e.splice(S,2,w)}for(u.reverse(),x=-1;++x<u.length;)h[j+u[x][0]]=j+u[x][1],j+=u[x][1]-u[x][0]-1;return h}const HC={resolve:KC,tokenize:YC},VC={partial:!0,tokenize:GC};function KC(e){return tb(e),e}function YC(e,n){let s;return r;function r(d){return e.enter("content"),s=e.enter("chunkContent",{contentType:"content"}),i(d)}function i(d){return d===null?o(d):Re(d)?e.check(VC,l,o)(d):(e.consume(d),i)}function o(d){return e.exit("chunkContent"),e.exit("content"),n(d)}function l(d){return e.consume(d),e.exit("chunkContent"),s.next=e.enter("chunkContent",{contentType:"content",previous:s}),s=s.next,i}}function GC(e,n,s){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Ke(e,o,"linePrefix")}function o(l){if(l===null||Re(l))return s(l);const d=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?n(l):e.interrupt(r.parser.constructs.flow,s,n)(l)}}function nb(e,n,s,r,i,o,l,d,u){const h=u||Number.POSITIVE_INFINITY;let m=0;return p;function p(w){return w===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(w),e.exit(o),x):w===null||w===32||w===41||bd(w)?s(w):(e.enter(r),e.enter(l),e.enter(d),e.enter("chunkString",{contentType:"string"}),k(w))}function x(w){return w===62?(e.enter(o),e.consume(w),e.exit(o),e.exit(i),e.exit(r),n):(e.enter(d),e.enter("chunkString",{contentType:"string"}),y(w))}function y(w){return w===62?(e.exit("chunkString"),e.exit(d),x(w)):w===null||w===60||Re(w)?s(w):(e.consume(w),w===92?j:y)}function j(w){return w===60||w===62||w===92?(e.consume(w),y):y(w)}function k(w){return!m&&(w===null||w===41||et(w))?(e.exit("chunkString"),e.exit(d),e.exit(l),e.exit(r),n(w)):m<h&&w===40?(e.consume(w),m++,k):w===41?(e.consume(w),m--,k):w===null||w===32||w===40||bd(w)?s(w):(e.consume(w),w===92?b:k)}function b(w){return w===40||w===41||w===92?(e.consume(w),k):k(w)}}function sb(e,n,s,r,i,o){const l=this;let d=0,u;return h;function h(y){return e.enter(r),e.enter(i),e.consume(y),e.exit(i),e.enter(o),m}function m(y){return d>999||y===null||y===91||y===93&&!u||y===94&&!d&&"_hiddenFootnoteSupport"in l.parser.constructs?s(y):y===93?(e.exit(o),e.enter(i),e.consume(y),e.exit(i),e.exit(r),n):Re(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===null||y===91||y===93||Re(y)||d++>999?(e.exit("chunkString"),m(y)):(e.consume(y),u||(u=!Be(y)),y===92?x:p)}function x(y){return y===91||y===92||y===93?(e.consume(y),d++,p):p(y)}}function rb(e,n,s,r,i,o){let l;return d;function d(x){return x===34||x===39||x===40?(e.enter(r),e.enter(i),e.consume(x),e.exit(i),l=x===40?41:x,u):s(x)}function u(x){return x===l?(e.enter(i),e.consume(x),e.exit(i),e.exit(r),n):(e.enter(o),h(x))}function h(x){return x===l?(e.exit(o),u(l)):x===null?s(x):Re(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),Ke(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(x))}function m(x){return x===l||x===null||Re(x)?(e.exit("chunkString"),h(x)):(e.consume(x),x===92?p:m)}function p(x){return x===l||x===92?(e.consume(x),m):m(x)}}function bo(e,n){let s;return r;function r(i){return Re(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),s=!0,r):Be(i)?Ke(e,r,s?"linePrefix":"lineSuffix")(i):n(i)}}const QC={name:"definition",tokenize:XC},ZC={partial:!0,tokenize:JC};function XC(e,n,s){const r=this;let i;return o;function o(y){return e.enter("definition"),l(y)}function l(y){return sb.call(r,e,d,s,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function d(y){return i=cs(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),u):s(y)}function u(y){return et(y)?bo(e,h)(y):h(y)}function h(y){return nb(e,m,s,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function m(y){return e.attempt(ZC,p,p)(y)}function p(y){return Be(y)?Ke(e,x,"whitespace")(y):x(y)}function x(y){return y===null||Re(y)?(e.exit("definition"),r.parser.defined.push(i),n(y)):s(y)}}function JC(e,n,s){return r;function r(d){return et(d)?bo(e,i)(d):s(d)}function i(d){return rb(e,o,s,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function o(d){return Be(d)?Ke(e,l,"whitespace")(d):l(d)}function l(d){return d===null||Re(d)?n(d):s(d)}}const e$={name:"hardBreakEscape",tokenize:t$};function t$(e,n,s){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return Re(o)?(e.exit("hardBreakEscape"),n(o)):s(o)}}const n$={name:"headingAtx",resolve:s$,tokenize:r$};function s$(e,n){let s=e.length-2,r=3,i,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&&(i={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"},An(e,r,s-r+1,[["enter",i,n],["enter",o,n],["exit",o,n],["exit",i,n]])),e}function r$(e,n,s){let r=0;return i;function i(m){return e.enter("atxHeading"),o(m)}function o(m){return e.enter("atxHeadingSequence"),l(m)}function l(m){return m===35&&r++<6?(e.consume(m),l):m===null||et(m)?(e.exit("atxHeadingSequence"),d(m)):s(m)}function d(m){return m===35?(e.enter("atxHeadingSequence"),u(m)):m===null||Re(m)?(e.exit("atxHeading"),n(m)):Be(m)?Ke(e,d,"whitespace")(m):(e.enter("atxHeadingText"),h(m))}function u(m){return m===35?(e.consume(m),u):(e.exit("atxHeadingSequence"),d(m))}function h(m){return m===null||m===35||et(m)?(e.exit("atxHeadingText"),d(m)):(e.consume(m),h)}}const i$=["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"],o2=["pre","script","style","textarea"],a$={concrete:!0,name:"htmlFlow",resolveTo:c$,tokenize:d$},o$={partial:!0,tokenize:h$},l$={partial:!0,tokenize:u$};function c$(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 d$(e,n,s){const r=this;let i,o,l,d,u;return h;function h(q){return m(q)}function m(q){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(q),p}function p(q){return q===33?(e.consume(q),x):q===47?(e.consume(q),o=!0,k):q===63?(e.consume(q),i=3,r.interrupt?n:R):nn(q)?(e.consume(q),l=String.fromCharCode(q),b):s(q)}function x(q){return q===45?(e.consume(q),i=2,y):q===91?(e.consume(q),i=5,d=0,j):nn(q)?(e.consume(q),i=4,r.interrupt?n:R):s(q)}function y(q){return q===45?(e.consume(q),r.interrupt?n:R):s(q)}function j(q){const me="CDATA[";return q===me.charCodeAt(d++)?(e.consume(q),d===me.length?r.interrupt?n:I:j):s(q)}function k(q){return nn(q)?(e.consume(q),l=String.fromCharCode(q),b):s(q)}function b(q){if(q===null||q===47||q===62||et(q)){const me=q===47,ye=l.toLowerCase();return!me&&!o&&o2.includes(ye)?(i=1,r.interrupt?n(q):I(q)):i$.includes(l.toLowerCase())?(i=6,me?(e.consume(q),w):r.interrupt?n(q):I(q)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?s(q):o?S(q):T(q))}return q===45||Kt(q)?(e.consume(q),l+=String.fromCharCode(q),b):s(q)}function w(q){return q===62?(e.consume(q),r.interrupt?n:I):s(q)}function S(q){return Be(q)?(e.consume(q),S):z(q)}function T(q){return q===47?(e.consume(q),z):q===58||q===95||nn(q)?(e.consume(q),A):Be(q)?(e.consume(q),T):z(q)}function A(q){return q===45||q===46||q===58||q===95||Kt(q)?(e.consume(q),A):D(q)}function D(q){return q===61?(e.consume(q),$):Be(q)?(e.consume(q),D):T(q)}function $(q){return q===null||q===60||q===61||q===62||q===96?s(q):q===34||q===39?(e.consume(q),u=q,P):Be(q)?(e.consume(q),$):F(q)}function P(q){return q===u?(e.consume(q),u=null,_):q===null||Re(q)?s(q):(e.consume(q),P)}function F(q){return q===null||q===34||q===39||q===47||q===60||q===61||q===62||q===96||et(q)?D(q):(e.consume(q),F)}function _(q){return q===47||q===62||Be(q)?T(q):s(q)}function z(q){return q===62?(e.consume(q),U):s(q)}function U(q){return q===null||Re(q)?I(q):Be(q)?(e.consume(q),U):s(q)}function I(q){return q===45&&i===2?(e.consume(q),ce):q===60&&i===1?(e.consume(q),V):q===62&&i===4?(e.consume(q),B):q===63&&i===3?(e.consume(q),R):q===93&&i===5?(e.consume(q),se):Re(q)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(o$,J,W)(q)):q===null||Re(q)?(e.exit("htmlFlowData"),W(q)):(e.consume(q),I)}function W(q){return e.check(l$,M,J)(q)}function M(q){return e.enter("lineEnding"),e.consume(q),e.exit("lineEnding"),G}function G(q){return q===null||Re(q)?W(q):(e.enter("htmlFlowData"),I(q))}function ce(q){return q===45?(e.consume(q),R):I(q)}function V(q){return q===47?(e.consume(q),l="",Y):I(q)}function Y(q){if(q===62){const me=l.toLowerCase();return o2.includes(me)?(e.consume(q),B):I(q)}return nn(q)&&l.length<8?(e.consume(q),l+=String.fromCharCode(q),Y):I(q)}function se(q){return q===93?(e.consume(q),R):I(q)}function R(q){return q===62?(e.consume(q),B):q===45&&i===2?(e.consume(q),R):I(q)}function B(q){return q===null||Re(q)?(e.exit("htmlFlowData"),J(q)):(e.consume(q),B)}function J(q){return e.exit("htmlFlow"),n(q)}}function u$(e,n,s){const r=this;return i;function i(l){return Re(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):s(l)}function o(l){return r.parser.lazy[r.now().line]?s(l):n(l)}}function h$(e,n,s){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ml,n,s)}}const p$={name:"htmlText",tokenize:f$};function f$(e,n,s){const r=this;let i,o,l;return d;function d(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),u}function u(R){return R===33?(e.consume(R),h):R===47?(e.consume(R),D):R===63?(e.consume(R),T):nn(R)?(e.consume(R),F):s(R)}function h(R){return R===45?(e.consume(R),m):R===91?(e.consume(R),o=0,j):nn(R)?(e.consume(R),S):s(R)}function m(R){return R===45?(e.consume(R),y):s(R)}function p(R){return R===null?s(R):R===45?(e.consume(R),x):Re(R)?(l=p,V(R)):(e.consume(R),p)}function x(R){return R===45?(e.consume(R),y):p(R)}function y(R){return R===62?ce(R):R===45?x(R):p(R)}function j(R){const B="CDATA[";return R===B.charCodeAt(o++)?(e.consume(R),o===B.length?k:j):s(R)}function k(R){return R===null?s(R):R===93?(e.consume(R),b):Re(R)?(l=k,V(R)):(e.consume(R),k)}function b(R){return R===93?(e.consume(R),w):k(R)}function w(R){return R===62?ce(R):R===93?(e.consume(R),w):k(R)}function S(R){return R===null||R===62?ce(R):Re(R)?(l=S,V(R)):(e.consume(R),S)}function T(R){return R===null?s(R):R===63?(e.consume(R),A):Re(R)?(l=T,V(R)):(e.consume(R),T)}function A(R){return R===62?ce(R):T(R)}function D(R){return nn(R)?(e.consume(R),$):s(R)}function $(R){return R===45||Kt(R)?(e.consume(R),$):P(R)}function P(R){return Re(R)?(l=P,V(R)):Be(R)?(e.consume(R),P):ce(R)}function F(R){return R===45||Kt(R)?(e.consume(R),F):R===47||R===62||et(R)?_(R):s(R)}function _(R){return R===47?(e.consume(R),ce):R===58||R===95||nn(R)?(e.consume(R),z):Re(R)?(l=_,V(R)):Be(R)?(e.consume(R),_):ce(R)}function z(R){return R===45||R===46||R===58||R===95||Kt(R)?(e.consume(R),z):U(R)}function U(R){return R===61?(e.consume(R),I):Re(R)?(l=U,V(R)):Be(R)?(e.consume(R),U):_(R)}function I(R){return R===null||R===60||R===61||R===62||R===96?s(R):R===34||R===39?(e.consume(R),i=R,W):Re(R)?(l=I,V(R)):Be(R)?(e.consume(R),I):(e.consume(R),M)}function W(R){return R===i?(e.consume(R),i=void 0,G):R===null?s(R):Re(R)?(l=W,V(R)):(e.consume(R),W)}function M(R){return R===null||R===34||R===39||R===60||R===61||R===96?s(R):R===47||R===62||et(R)?_(R):(e.consume(R),M)}function G(R){return R===47||R===62||et(R)?_(R):s(R)}function ce(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),n):s(R)}function V(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),Y}function Y(R){return Be(R)?Ke(e,se,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):se(R)}function se(R){return e.enter("htmlTextData"),l(R)}}const Bm={name:"labelEnd",resolveAll:y$,resolveTo:j$,tokenize:k$},m$={tokenize:v$},g$={tokenize:b$},x$={tokenize:w$};function y$(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 i=r.type==="labelImage"?4:2;r.type="data",n+=i}}return e.length!==s.length&&An(e,0,e.length,s),e}function j$(e,n){let s=e.length,r=0,i,o,l,d;for(;s--;)if(i=e[s][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[s][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[s][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=s,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=s);const u={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},m={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return d=[["enter",u,n],["enter",h,n]],d=Un(d,e.slice(o+1,o+r+3)),d=Un(d,[["enter",m,n]]),d=Un(d,Gd(n.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),n)),d=Un(d,[["exit",m,n],e[l-2],e[l-1],["exit",h,n]]),d=Un(d,e.slice(l+1)),d=Un(d,[["exit",u,n]]),An(e,o,e.length,d),e}function k$(e,n,s){const r=this;let i=r.events.length,o,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return d;function d(x){return o?o._inactive?p(x):(l=r.parser.defined.includes(cs(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),u):s(x)}function u(x){return x===40?e.attempt(m$,m,l?m:p)(x):x===91?e.attempt(g$,m,l?h:p)(x):l?m(x):p(x)}function h(x){return e.attempt(x$,m,p)(x)}function m(x){return n(x)}function p(x){return o._balanced=!0,s(x)}}function v$(e,n,s){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),i}function i(p){return et(p)?bo(e,o)(p):o(p)}function o(p){return p===41?m(p):nb(e,l,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function l(p){return et(p)?bo(e,u)(p):m(p)}function d(p){return s(p)}function u(p){return p===34||p===39||p===40?rb(e,h,s,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):m(p)}function h(p){return et(p)?bo(e,m)(p):m(p)}function m(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),n):s(p)}}function b$(e,n,s){const r=this;return i;function i(d){return sb.call(r,e,o,l,"reference","referenceMarker","referenceString")(d)}function o(d){return r.parser.defined.includes(cs(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(d):s(d)}function l(d){return s(d)}}function w$(e,n,s){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),n):s(o)}}const N$={name:"labelStartImage",resolveAll:Bm.resolveAll,tokenize:S$};function S$(e,n,s){const r=this;return i;function i(d){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(d),e.exit("labelImageMarker"),o}function o(d){return d===91?(e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelImage"),l):s(d)}function l(d){return d===94&&"_hiddenFootnoteSupport"in r.parser.constructs?s(d):n(d)}}const C$={name:"labelStartLink",resolveAll:Bm.resolveAll,tokenize:$$};function $$(e,n,s){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?s(l):n(l)}}const kp={name:"lineEnding",tokenize:T$};function T$(e,n){return s;function s(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ke(e,n,"linePrefix")}}const nd={name:"thematicBreak",tokenize:E$};function E$(e,n,s){let r=0,i;return o;function o(h){return e.enter("thematicBreak"),l(h)}function l(h){return i=h,d(h)}function d(h){return h===i?(e.enter("thematicBreakSequence"),u(h)):r>=3&&(h===null||Re(h))?(e.exit("thematicBreak"),n(h)):s(h)}function u(h){return h===i?(e.consume(h),r++,u):(e.exit("thematicBreakSequence"),Be(h)?Ke(e,d,"whitespace")(h):d(h))}}const pn={continuation:{tokenize:I$},exit:z$,name:"list",tokenize:R$},A$={partial:!0,tokenize:q$},P$={partial:!0,tokenize:F$};function R$(e,n,s){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return d;function d(y){const j=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(j==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:Cf(y)){if(r.containerState.type||(r.containerState.type=j,e.enter(j,{_container:!0})),j==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(nd,s,h)(y):h(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(y)}return s(y)}function u(y){return Cf(y)&&++l<10?(e.consume(y),u):(!r.interrupt||l<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),h(y)):s(y)}function h(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(ml,r.interrupt?s:m,e.attempt(A$,x,p))}function m(y){return r.containerState.initialBlankLine=!0,o++,x(y)}function p(y){return Be(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),x):s(y)}function x(y){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(y)}}function I$(e,n,s){const r=this;return r.containerState._closeFlow=void 0,e.check(ml,i,o);function i(d){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ke(e,n,"listItemIndent",r.containerState.size+1)(d)}function o(d){return r.containerState.furtherBlankLines||!Be(d)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(d)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(P$,n,l)(d))}function l(d){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ke(e,e.attempt(pn,n,s),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function F$(e,n,s){const r=this;return Ke(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?n(o):s(o)}}function z$(e){e.exit(this.containerState.type)}function q$(e,n,s){const r=this;return Ke(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!Be(o)&&l&&l[1].type==="listItemPrefixWhitespace"?n(o):s(o)}}const l2={name:"setextUnderline",resolveTo:L$,tokenize:M$};function L$(e,n){let s=e.length,r,i,o;for(;s--;)if(e[s][0]==="enter"){if(e[s][1].type==="content"){r=s;break}e[s][1].type==="paragraph"&&(i=s)}else e[s][1].type==="content"&&e.splice(s,1),!o&&e[s][1].type==="definition"&&(o=s);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,n]),e.splice(o+1,0,["exit",e[r][1],n]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,n]),e}function M$(e,n,s){const r=this;let i;return o;function o(h){let m=r.events.length,p;for(;m--;)if(r.events[m][1].type!=="lineEnding"&&r.events[m][1].type!=="linePrefix"&&r.events[m][1].type!=="content"){p=r.events[m][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),i=h,l(h)):s(h)}function l(h){return e.enter("setextHeadingLineSequence"),d(h)}function d(h){return h===i?(e.consume(h),d):(e.exit("setextHeadingLineSequence"),Be(h)?Ke(e,u,"lineSuffix")(h):u(h))}function u(h){return h===null||Re(h)?(e.exit("setextHeadingLine"),n(h)):s(h)}}const O$={tokenize:_$};function _$(e){const n=this,s=e.attempt(ml,r,e.attempt(this.parser.constructs.flowInitial,i,Ke(e,e.attempt(this.parser.constructs.flow,i,e.attempt(HC,i)),"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 i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n.currentConstruct=void 0,s}}const D$={resolveAll:ab()},B$=ib("string"),W$=ib("text");function ib(e){return{resolveAll:ab(e==="text"?U$:void 0),tokenize:n};function n(s){const r=this,i=this.parser.constructs[e],o=s.attempt(i,l,d);return l;function l(m){return h(m)?o(m):d(m)}function d(m){if(m===null){s.consume(m);return}return s.enter("data"),s.consume(m),u}function u(m){return h(m)?(s.exit("data"),o(m)):(s.consume(m),u)}function h(m){if(m===null)return!0;const p=i[m];let x=-1;if(p)for(;++x<p.length;){const y=p[x];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function ab(e){return n;function n(s,r){let i=-1,o;for(;++i<=s.length;)o===void 0?s[i]&&s[i][1].type==="data"&&(o=i,i++):(!s[i]||s[i][1].type!=="data")&&(i!==o+2&&(s[o][1].end=s[i-1][1].end,s.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(s,r):s}}function U$(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],i=n.sliceStream(r);let o=i.length,l=-1,d=0,u;for(;o--;){const h=i[o];if(typeof h=="string"){for(l=h.length;h.charCodeAt(l-1)===32;)d++,l--;if(l)break;l=-1}else if(h===-2)u=!0,d++;else if(h!==-1){o++;break}}if(n._contentTypeTextTrailing&&s===e.length&&(d=0),d){const h={type:s===e.length||u||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-d,offset:r.end.offset-d},end:{...r.end}};r.end={...h.start},r.start.offset===r.end.offset?Object.assign(r,h):(e.splice(s,0,["enter",h,n],["exit",h,n]),s+=2)}s++}return e}const H$={42:pn,43:pn,45:pn,48:pn,49:pn,50:pn,51:pn,52:pn,53:pn,54:pn,55:pn,56:pn,57:pn,62:Xv},V$={91:QC},K$={[-2]:jp,[-1]:jp,32:jp},Y$={35:n$,42:nd,45:[l2,nd],60:a$,61:l2,95:nd,96:a2,126:a2},G$={38:eb,92:Jv},Q$={[-5]:kp,[-4]:kp,[-3]:kp,33:N$,38:eb,42:$f,60:[CC,p$],91:C$,92:[e$,Jv],93:Bm,95:$f,96:OC},Z$={null:[$f,D$]},X$={null:[42,95]},J$={null:[]},eT=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:X$,contentInitial:V$,disable:J$,document:H$,flow:Y$,flowInitial:K$,insideSpan:Z$,string:G$,text:Q$},Symbol.toStringTag,{value:"Module"}));function tT(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 i={},o=[];let l=[],d=[];const u={attempt:P(D),check:P($),consume:S,enter:T,exit:A,interrupt:P($,{interrupt:!0})},h={code:null,containerState:{},defineSkip:k,events:[],now:j,parser:e,previous:null,sliceSerialize:x,sliceStream:y,write:p};let m=n.tokenize.call(h,u);return n.resolveAll&&o.push(n),h;function p(U){return l=Un(l,U),b(),l[l.length-1]!==null?[]:(F(n,0),h.events=Gd(o,h.events,h),h.events)}function x(U,I){return sT(y(U),I)}function y(U){return nT(l,U)}function j(){const{_bufferIndex:U,_index:I,line:W,column:M,offset:G}=r;return{_bufferIndex:U,_index:I,line:W,column:M,offset:G}}function k(U){i[U.line]=U.column,z()}function b(){let U;for(;r._index<l.length;){const I=l[r._index];if(typeof I=="string")for(U=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===U&&r._bufferIndex<I.length;)w(I.charCodeAt(r._bufferIndex));else w(I)}}function w(U){m=m(U)}function S(U){Re(U)?(r.line++,r.column=1,r.offset+=U===-3?2:1,z()):U!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=U}function T(U,I){const W=I||{};return W.type=U,W.start=j(),h.events.push(["enter",W,h]),d.push(W),W}function A(U){const I=d.pop();return I.end=j(),h.events.push(["exit",I,h]),I}function D(U,I){F(U,I.from)}function $(U,I){I.restore()}function P(U,I){return W;function W(M,G,ce){let V,Y,se,R;return Array.isArray(M)?J(M):"tokenize"in M?J([M]):B(M);function B(Ne){return Fe;function Fe(Te){const ze=Te!==null&&Ne[Te],Ze=Te!==null&&Ne.null,Lt=[...Array.isArray(ze)?ze:ze?[ze]:[],...Array.isArray(Ze)?Ze:Ze?[Ze]:[]];return J(Lt)(Te)}}function J(Ne){return V=Ne,Y=0,Ne.length===0?ce:q(Ne[Y])}function q(Ne){return Fe;function Fe(Te){return R=_(),se=Ne,Ne.partial||(h.currentConstruct=Ne),Ne.name&&h.parser.constructs.disable.null.includes(Ne.name)?ye():Ne.tokenize.call(I?Object.assign(Object.create(h),I):h,u,me,ye)(Te)}}function me(Ne){return U(se,R),G}function ye(Ne){return R.restore(),++Y<V.length?q(V[Y]):ce}}}function F(U,I){U.resolveAll&&!o.includes(U)&&o.push(U),U.resolve&&An(h.events,I,h.events.length-I,U.resolve(h.events.slice(I),h)),U.resolveTo&&(h.events=U.resolveTo(h.events,h))}function _(){const U=j(),I=h.previous,W=h.currentConstruct,M=h.events.length,G=Array.from(d);return{from:M,restore:ce};function ce(){r=U,h.previous=I,h.currentConstruct=W,h.events.length=M,d=G,z()}}function z(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function nT(e,n){const s=n.start._index,r=n.start._bufferIndex,i=n.end._index,o=n.end._bufferIndex;let l;if(s===i)l=[e[s].slice(r,o)];else{if(l=e.slice(s,i),r>-1){const d=l[0];typeof d=="string"?l[0]=d.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function sT(e,n){let s=-1;const r=[];let i;for(;++s<e.length;){const o=e[s];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
|
|
615
|
-
`;break}case-3:{l=`\r
|
|
616
|
-
`;break}case-2:{l=n?" ":" ";break}case-1:{if(!n&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}function rT(e){const r={constructs:Qv([eT,...(e||{}).extensions||[]]),content:i(jC),defined:[],document:i(vC),flow:i(O$),lazy:{},string:i(B$),text:i(W$)};return r;function i(o){return l;function l(d){return tT(r,o,d)}}}function iT(e){for(;!tb(e););return e}const c2=/[\0\t\n\r]/g;function aT(){let e=1,n="",s=!0,r;return i;function i(o,l,d){const u=[];let h,m,p,x,y;for(o=n+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),p=0,n="",s&&(o.charCodeAt(0)===65279&&p++,s=void 0);p<o.length;){if(c2.lastIndex=p,h=c2.exec(o),x=h&&h.index!==void 0?h.index:o.length,y=o.charCodeAt(x),!h){n=o.slice(p);break}if(y===10&&p===x&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),p<x&&(u.push(o.slice(p,x)),e+=x-p),y){case 0:{u.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,u.push(-2);e++<m;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}p=x+1}return d&&(r&&u.push(-5),n&&u.push(n),u.push(null)),u}}const oT=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function lT(e){return e.replace(oT,cT)}function cT(e,n,s){if(n)return n;if(s.charCodeAt(0)===35){const i=s.charCodeAt(1),o=i===120||i===88;return Zv(s.slice(o?2:1),o?16:10)}return Dm(s)||e}const ob={}.hasOwnProperty;function dT(e,n,s){return n&&typeof n=="object"&&(s=n,n=void 0),uT(s)(iT(rT(s).document().write(aT()(e,n,!0))))}function uT(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Mt),autolinkProtocol:_,autolinkEmail:_,atxHeading:o(ps),blockQuote:o(Ze),characterEscape:_,characterReference:_,codeFenced:o(Lt),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(Lt,l),codeText:o(Xt,l),codeTextData:_,data:_,codeFlowValue:_,definition:o(Fn),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(Rt),hardBreakEscape:o(fs),hardBreakTrailing:o(fs),htmlFlow:o(zn,l),htmlFlowData:_,htmlText:o(zn,l),htmlTextData:_,image:o(dt),label:l,link:o(Mt),listItem:o(sn),listItemValue:x,listOrdered:o(yt,p),listUnordered:o(yt),paragraph:o(ms),reference:q,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(ps),strong:o(jn),thematicBreak:o(Ge)},exit:{atxHeading:u(),atxHeadingSequence:D,autolink:u(),autolinkEmail:ze,autolinkProtocol:Te,blockQuote:u(),characterEscapeValue:z,characterReferenceMarkerHexadecimal:ye,characterReferenceMarkerNumeric:ye,characterReferenceValue:Ne,characterReference:Fe,codeFenced:u(b),codeFencedFence:k,codeFencedFenceInfo:y,codeFencedFenceMeta:j,codeFlowValue:z,codeIndented:u(w),codeText:u(G),codeTextData:z,data:z,definition:u(),definitionDestinationString:A,definitionLabelString:S,definitionTitleString:T,emphasis:u(),hardBreakEscape:u(I),hardBreakTrailing:u(I),htmlFlow:u(W),htmlFlowData:z,htmlText:u(M),htmlTextData:z,image:u(V),label:se,labelText:Y,lineEnding:U,link:u(ce),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:me,resourceDestinationString:R,resourceTitleString:B,resource:J,setextHeading:u(F),setextHeadingLineSequence:P,setextHeadingText:$,strong:u(),thematicBreak:u()}};lb(n,(e||{}).mdastExtensions||[]);const s={};return r;function r(ee){let ue={type:"root",children:[]};const Ee={stack:[ue],tokenStack:[],config:n,enter:d,exit:h,buffer:l,resume:m,data:s},Me=[];let He=-1;for(;++He<ee.length;)if(ee[He][1].type==="listOrdered"||ee[He][1].type==="listUnordered")if(ee[He][0]==="enter")Me.push(He);else{const vt=Me.pop();He=i(ee,vt,He)}for(He=-1;++He<ee.length;){const vt=n[ee[He][0]];ob.call(vt,ee[He][1].type)&&vt[ee[He][1].type].call(Object.assign({sliceSerialize:ee[He][2].sliceSerialize},Ee),ee[He][1])}if(Ee.tokenStack.length>0){const vt=Ee.tokenStack[Ee.tokenStack.length-1];(vt[1]||d2).call(Ee,void 0,vt[0])}for(ue.position={start:kr(ee.length>0?ee[0][1].start:{line:1,column:1,offset:0}),end:kr(ee.length>0?ee[ee.length-2][1].end:{line:1,column:1,offset:0})},He=-1;++He<n.transforms.length;)ue=n.transforms[He](ue)||ue;return ue}function i(ee,ue,Ee){let Me=ue-1,He=-1,vt=!1,qn,rn,xs,zs;for(;++Me<=Ee;){const bt=ee[Me];switch(bt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{bt[0]==="enter"?He++:He--,zs=void 0;break}case"lineEndingBlank":{bt[0]==="enter"&&(qn&&!zs&&!He&&!xs&&(xs=Me),zs=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:zs=void 0}if(!He&&bt[0]==="enter"&&bt[1].type==="listItemPrefix"||He===-1&&bt[0]==="exit"&&(bt[1].type==="listUnordered"||bt[1].type==="listOrdered")){if(qn){let kn=Me;for(rn=void 0;kn--;){const Jt=ee[kn];if(Jt[1].type==="lineEnding"||Jt[1].type==="lineEndingBlank"){if(Jt[0]==="exit")continue;rn&&(ee[rn][1].type="lineEndingBlank",vt=!0),Jt[1].type="lineEnding",rn=kn}else if(!(Jt[1].type==="linePrefix"||Jt[1].type==="blockQuotePrefix"||Jt[1].type==="blockQuotePrefixWhitespace"||Jt[1].type==="blockQuoteMarker"||Jt[1].type==="listItemIndent"))break}xs&&(!rn||xs<rn)&&(qn._spread=!0),qn.end=Object.assign({},rn?ee[rn][1].start:bt[1].end),ee.splice(rn||Me,0,["exit",qn,bt[2]]),Me++,Ee++}if(bt[1].type==="listItemPrefix"){const kn={type:"listItem",_spread:!1,start:Object.assign({},bt[1].start),end:void 0};qn=kn,ee.splice(Me,0,["enter",kn,bt[2]]),Me++,Ee++,xs=void 0,zs=!0}}}return ee[ue][1]._spread=vt,Ee}function o(ee,ue){return Ee;function Ee(Me){d.call(this,ee(Me),Me),ue&&ue.call(this,Me)}}function l(){this.stack.push({type:"fragment",children:[]})}function d(ee,ue,Ee){this.stack[this.stack.length-1].children.push(ee),this.stack.push(ee),this.tokenStack.push([ue,Ee||void 0]),ee.position={start:kr(ue.start),end:void 0}}function u(ee){return ue;function ue(Ee){ee&&ee.call(this,Ee),h.call(this,Ee)}}function h(ee,ue){const Ee=this.stack.pop(),Me=this.tokenStack.pop();if(Me)Me[0].type!==ee.type&&(ue?ue.call(this,ee,Me[0]):(Me[1]||d2).call(this,ee,Me[0]));else throw new Error("Cannot close `"+ee.type+"` ("+vo({start:ee.start,end:ee.end})+"): it’s not open");Ee.position.end=kr(ee.end)}function m(){return _m(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function x(ee){if(this.data.expectingFirstListItemValue){const ue=this.stack[this.stack.length-2];ue.start=Number.parseInt(this.sliceSerialize(ee),10),this.data.expectingFirstListItemValue=void 0}}function y(){const ee=this.resume(),ue=this.stack[this.stack.length-1];ue.lang=ee}function j(){const ee=this.resume(),ue=this.stack[this.stack.length-1];ue.meta=ee}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const ee=this.resume(),ue=this.stack[this.stack.length-1];ue.value=ee.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function w(){const ee=this.resume(),ue=this.stack[this.stack.length-1];ue.value=ee.replace(/(\r?\n|\r)$/g,"")}function S(ee){const ue=this.resume(),Ee=this.stack[this.stack.length-1];Ee.label=ue,Ee.identifier=cs(this.sliceSerialize(ee)).toLowerCase()}function T(){const ee=this.resume(),ue=this.stack[this.stack.length-1];ue.title=ee}function A(){const ee=this.resume(),ue=this.stack[this.stack.length-1];ue.url=ee}function D(ee){const ue=this.stack[this.stack.length-1];if(!ue.depth){const Ee=this.sliceSerialize(ee).length;ue.depth=Ee}}function $(){this.data.setextHeadingSlurpLineEnding=!0}function P(ee){const ue=this.stack[this.stack.length-1];ue.depth=this.sliceSerialize(ee).codePointAt(0)===61?1:2}function F(){this.data.setextHeadingSlurpLineEnding=void 0}function _(ee){const Ee=this.stack[this.stack.length-1].children;let Me=Ee[Ee.length-1];(!Me||Me.type!=="text")&&(Me=gs(),Me.position={start:kr(ee.start),end:void 0},Ee.push(Me)),this.stack.push(Me)}function z(ee){const ue=this.stack.pop();ue.value+=this.sliceSerialize(ee),ue.position.end=kr(ee.end)}function U(ee){const ue=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ee=ue.children[ue.children.length-1];Ee.position.end=kr(ee.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(ue.type)&&(_.call(this,ee),z.call(this,ee))}function I(){this.data.atHardBreak=!0}function W(){const ee=this.resume(),ue=this.stack[this.stack.length-1];ue.value=ee}function M(){const ee=this.resume(),ue=this.stack[this.stack.length-1];ue.value=ee}function G(){const ee=this.resume(),ue=this.stack[this.stack.length-1];ue.value=ee}function ce(){const ee=this.stack[this.stack.length-1];if(this.data.inReference){const ue=this.data.referenceType||"shortcut";ee.type+="Reference",ee.referenceType=ue,delete ee.url,delete ee.title}else delete ee.identifier,delete ee.label;this.data.referenceType=void 0}function V(){const ee=this.stack[this.stack.length-1];if(this.data.inReference){const ue=this.data.referenceType||"shortcut";ee.type+="Reference",ee.referenceType=ue,delete ee.url,delete ee.title}else delete ee.identifier,delete ee.label;this.data.referenceType=void 0}function Y(ee){const ue=this.sliceSerialize(ee),Ee=this.stack[this.stack.length-2];Ee.label=lT(ue),Ee.identifier=cs(ue).toLowerCase()}function se(){const ee=this.stack[this.stack.length-1],ue=this.resume(),Ee=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ee.type==="link"){const Me=ee.children;Ee.children=Me}else Ee.alt=ue}function R(){const ee=this.resume(),ue=this.stack[this.stack.length-1];ue.url=ee}function B(){const ee=this.resume(),ue=this.stack[this.stack.length-1];ue.title=ee}function J(){this.data.inReference=void 0}function q(){this.data.referenceType="collapsed"}function me(ee){const ue=this.resume(),Ee=this.stack[this.stack.length-1];Ee.label=ue,Ee.identifier=cs(this.sliceSerialize(ee)).toLowerCase(),this.data.referenceType="full"}function ye(ee){this.data.characterReferenceType=ee.type}function Ne(ee){const ue=this.sliceSerialize(ee),Ee=this.data.characterReferenceType;let Me;Ee?(Me=Zv(ue,Ee==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Me=Dm(ue);const He=this.stack[this.stack.length-1];He.value+=Me}function Fe(ee){const ue=this.stack.pop();ue.position.end=kr(ee.end)}function Te(ee){z.call(this,ee);const ue=this.stack[this.stack.length-1];ue.url=this.sliceSerialize(ee)}function ze(ee){z.call(this,ee);const ue=this.stack[this.stack.length-1];ue.url="mailto:"+this.sliceSerialize(ee)}function Ze(){return{type:"blockquote",children:[]}}function Lt(){return{type:"code",lang:null,meta:null,value:""}}function Xt(){return{type:"inlineCode",value:""}}function Fn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Rt(){return{type:"emphasis",children:[]}}function ps(){return{type:"heading",depth:0,children:[]}}function fs(){return{type:"break"}}function zn(){return{type:"html",value:""}}function dt(){return{type:"image",title:null,url:"",alt:null}}function Mt(){return{type:"link",title:null,url:"",children:[]}}function yt(ee){return{type:"list",ordered:ee.type==="listOrdered",start:null,spread:ee._spread,children:[]}}function sn(ee){return{type:"listItem",spread:ee._spread,checked:null,children:[]}}function ms(){return{type:"paragraph",children:[]}}function jn(){return{type:"strong",children:[]}}function gs(){return{type:"text",value:""}}function Ge(){return{type:"thematicBreak"}}}function kr(e){return{line:e.line,column:e.column,offset:e.offset}}function lb(e,n){let s=-1;for(;++s<n.length;){const r=n[s];Array.isArray(r)?lb(e,r):hT(e,r)}}function hT(e,n){let s;for(s in n)if(ob.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 d2(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+vo({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+vo({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+vo({start:n.start,end:n.end})+") is still open")}function pT(e){const n=this;n.parser=s;function s(r){return dT(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function fT(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 mT(e,n){const s={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,s),[e.applyData(n,s),{type:"text",value:`
|
|
617
|
-
`}]}function gT(e,n){const s=n.value?n.value+`
|
|
618
|
-
`:"",r={},i=n.lang?n.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[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 xT(e,n){const s={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,s),e.applyData(n,s)}function yT(e,n){const s={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,s),e.applyData(n,s)}function jT(e,n){const s=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),i=ka(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let l,d=e.footnoteCounts.get(r);d===void 0?(d=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=o+1,d+=1,e.footnoteCounts.set(r,d);const u={type:"element",tagName:"a",properties:{href:"#"+s+"fn-"+i,id:s+"fnref-"+i+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(n,u);const h={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(n,h),e.applyData(n,h)}function kT(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 vT(e,n){if(e.options.allowDangerousHtml){const s={type:"raw",value:n.value};return e.patch(n,s),e.applyData(n,s)}}function cb(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 i=e.all(n),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function bT(e,n){const s=String(n.identifier).toUpperCase(),r=e.definitionById.get(s);if(!r)return cb(e,n);const i={src:ka(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(n,o),e.applyData(n,o)}function wT(e,n){const s={src:ka(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 NT(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 ST(e,n){const s=String(n.identifier).toUpperCase(),r=e.definitionById.get(s);if(!r)return cb(e,n);const i={href:ka(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(n)};return e.patch(n,o),e.applyData(n,o)}function CT(e,n){const s={href:ka(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 $T(e,n,s){const r=e.all(n),i=s?TT(s):db(n),o={},l=[];if(typeof n.checked=="boolean"){const m=r[0];let p;m&&m.type==="element"&&m.tagName==="p"?p=m:(p={type:"element",tagName:"p",properties:{},children:[]},r.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let d=-1;for(;++d<r.length;){const m=r[d];(i||d!==0||m.type!=="element"||m.tagName!=="p")&&l.push({type:"text",value:`
|
|
619
|
-
`}),m.type==="element"&&m.tagName==="p"&&!i?l.push(...m.children):l.push(m)}const u=r[r.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&l.push({type:"text",value:`
|
|
620
|
-
`});const h={type:"element",tagName:"li",properties:o,children:l};return e.patch(n,h),e.applyData(n,h)}function TT(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=db(s[r])}return n}function db(e){const n=e.spread;return n??e.children.length>1}function ET(e,n){const s={},r=e.all(n);let i=-1;for(typeof n.start=="number"&&n.start!==1&&(s.start=n.start);++i<r.length;){const l=r[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.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 AT(e,n){const s={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,s),e.applyData(n,s)}function PT(e,n){const s={type:"root",children:e.wrap(e.all(n))};return e.patch(n,s),e.applyData(n,s)}function RT(e,n){const s={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,s),e.applyData(n,s)}function IT(e,n){const s=e.all(n),r=s.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],l),i.push(l)}if(s.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(s,!0)},d=qm(n.children[1]),u=Wv(n.children[n.children.length-1]);d&&u&&(l.position={start:d,end:u}),i.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(n,o),e.applyData(n,o)}function FT(e,n,s){const r=s?s.children:void 0,o=(r?r.indexOf(n):1)===0?"th":"td",l=s&&s.type==="table"?s.align:void 0,d=l?l.length:n.children.length;let u=-1;const h=[];for(;++u<d;){const p=n.children[u],x={},y=l?l[u]:void 0;y&&(x.align=y);let j={type:"element",tagName:o,properties:x,children:[]};p&&(j.children=e.all(p),e.patch(p,j),j=e.applyData(p,j)),h.push(j)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(n,m),e.applyData(n,m)}function zT(e,n){const s={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,s),e.applyData(n,s)}const u2=9,h2=32;function qT(e){const n=String(e),s=/\r?\n|\r/g;let r=s.exec(n),i=0;const o=[];for(;r;)o.push(p2(n.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=s.exec(n);return o.push(p2(n.slice(i),i>0,!1)),o.join("")}function p2(e,n,s){let r=0,i=e.length;if(n){let o=e.codePointAt(r);for(;o===u2||o===h2;)r++,o=e.codePointAt(r)}if(s){let o=e.codePointAt(i-1);for(;o===u2||o===h2;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function LT(e,n){const s={type:"text",value:qT(String(n.value))};return e.patch(n,s),e.applyData(n,s)}function MT(e,n){const s={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,s),e.applyData(n,s)}const OT={blockquote:fT,break:mT,code:gT,delete:xT,emphasis:yT,footnoteReference:jT,heading:kT,html:vT,imageReference:bT,image:wT,inlineCode:NT,linkReference:ST,link:CT,listItem:$T,list:ET,paragraph:AT,root:PT,strong:RT,table:IT,tableCell:zT,tableRow:FT,text:LT,thematicBreak:MT,toml:Lc,yaml:Lc,definition:Lc,footnoteDefinition:Lc};function Lc(){}const ub=-1,Qd=0,wo=1,wd=2,Wm=3,Um=4,Hm=5,Vm=6,hb=7,pb=8,f2=typeof self=="object"?self:globalThis,_T=(e,n)=>{const s=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,l]=n[i];switch(o){case Qd:case ub:return s(l,i);case wo:{const d=s([],i);for(const u of l)d.push(r(u));return d}case wd:{const d=s({},i);for(const[u,h]of l)d[r(u)]=r(h);return d}case Wm:return s(new Date(l),i);case Um:{const{source:d,flags:u}=l;return s(new RegExp(d,u),i)}case Hm:{const d=s(new Map,i);for(const[u,h]of l)d.set(r(u),r(h));return d}case Vm:{const d=s(new Set,i);for(const u of l)d.add(r(u));return d}case hb:{const{name:d,message:u}=l;return s(new f2[d](u),i)}case pb:return s(BigInt(l),i);case"BigInt":return s(Object(BigInt(l)),i);case"ArrayBuffer":return s(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:d}=new Uint8Array(l);return s(new DataView(d),l)}}return s(new f2[o](l),i)};return r},m2=e=>_T(new Map,e)(0),Vi="",{toString:DT}={},{keys:BT}=Object,go=e=>{const n=typeof e;if(n!=="object"||!e)return[Qd,n];const s=DT.call(e).slice(8,-1);switch(s){case"Array":return[wo,Vi];case"Object":return[wd,Vi];case"Date":return[Wm,Vi];case"RegExp":return[Um,Vi];case"Map":return[Hm,Vi];case"Set":return[Vm,Vi];case"DataView":return[wo,s]}return s.includes("Array")?[wo,s]:s.includes("Error")?[hb,s]:[wd,s]},Mc=([e,n])=>e===Qd&&(n==="function"||n==="symbol"),WT=(e,n,s,r)=>{const i=(l,d)=>{const u=r.push(l)-1;return s.set(d,u),u},o=l=>{if(s.has(l))return s.get(l);let[d,u]=go(l);switch(d){case Qd:{let m=l;switch(u){case"bigint":d=pb,m=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);m=null;break;case"undefined":return i([ub],l)}return i([d,m],l)}case wo:{if(u){let x=l;return u==="DataView"?x=new Uint8Array(l.buffer):u==="ArrayBuffer"&&(x=new Uint8Array(l)),i([u,[...x]],l)}const m=[],p=i([d,m],l);for(const x of l)m.push(o(x));return p}case wd:{if(u)switch(u){case"BigInt":return i([u,l.toString()],l);case"Boolean":case"Number":case"String":return i([u,l.valueOf()],l)}if(n&&"toJSON"in l)return o(l.toJSON());const m=[],p=i([d,m],l);for(const x of BT(l))(e||!Mc(go(l[x])))&&m.push([o(x),o(l[x])]);return p}case Wm:return i([d,l.toISOString()],l);case Um:{const{source:m,flags:p}=l;return i([d,{source:m,flags:p}],l)}case Hm:{const m=[],p=i([d,m],l);for(const[x,y]of l)(e||!(Mc(go(x))||Mc(go(y))))&&m.push([o(x),o(y)]);return p}case Vm:{const m=[],p=i([d,m],l);for(const x of l)(e||!Mc(go(x)))&&m.push(o(x));return p}}const{message:h}=l;return i([d,{name:u,message:h}],l)};return o},g2=(e,{json:n,lossy:s}={})=>{const r=[];return WT(!(n||s),!!n,new Map,r)(e),r},Nd=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?m2(g2(e,n)):structuredClone(e):(e,n)=>m2(g2(e,n));function UT(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 HT(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function VT(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",s=e.options.footnoteBackContent||UT,r=e.options.footnoteBackLabel||HT,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let u=-1;for(;++u<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[u]);if(!h)continue;const m=e.all(h),p=String(h.identifier).toUpperCase(),x=ka(p.toLowerCase());let y=0;const j=[],k=e.footnoteCounts.get(p);for(;k!==void 0&&++y<=k;){j.length>0&&j.push({type:"text",value:" "});let S=typeof s=="string"?s:s(u,y);typeof S=="string"&&(S={type:"text",value:S}),j.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+x+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,y),className:["data-footnote-backref"]},children:Array.isArray(S)?S:[S]})}const b=m[m.length-1];if(b&&b.type==="element"&&b.tagName==="p"){const S=b.children[b.children.length-1];S&&S.type==="text"?S.value+=" ":b.children.push({type:"text",value:" "}),b.children.push(...j)}else m.push(...j);const w={type:"element",tagName:"li",properties:{id:n+"fn-"+x},children:e.wrap(m,!0)};e.patch(h,w),d.push(w)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Nd(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
621
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
|
|
622
|
-
`}]}}const gl=(function(e){if(e==null)return QT;if(typeof e=="function")return Zd(e);if(typeof e=="object")return Array.isArray(e)?KT(e):YT(e);if(typeof e=="string")return GT(e);throw new Error("Expected function, string, or object as test")});function KT(e){const n=[];let s=-1;for(;++s<e.length;)n[s]=gl(e[s]);return Zd(r);function r(...i){let o=-1;for(;++o<n.length;)if(n[o].apply(this,i))return!0;return!1}}function YT(e){const n=e;return Zd(s);function s(r){const i=r;let o;for(o in e)if(i[o]!==n[o])return!1;return!0}}function GT(e){return Zd(n);function n(s){return s&&s.type===e}}function Zd(e){return n;function n(s,r,i){return!!(ZT(s)&&e.call(this,s,typeof r=="number"?r:void 0,i||void 0))}}function QT(){return!0}function ZT(e){return e!==null&&typeof e=="object"&&"type"in e}const fb=[],XT=!0,Tf=!1,JT="skip";function eE(e,n,s,r){let i;typeof n=="function"&&typeof s!="function"?(r=s,s=n):i=n;const o=gl(i),l=r?-1:1;d(e,void 0,[])();function d(u,h,m){const p=u&&typeof u=="object"?u:{};if(typeof p.type=="string"){const y=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(u.type+(y?"<"+y+">":""))+")"})}return x;function x(){let y=fb,j,k,b;if((!n||o(u,h,m[m.length-1]||void 0))&&(y=tE(s(u,m)),y[0]===Tf))return y;if("children"in u&&u.children){const w=u;if(w.children&&y[0]!==JT)for(k=(r?w.children.length:-1)+l,b=m.concat(w);k>-1&&k<w.children.length;){const S=w.children[k];if(j=d(S,k,b)(),j[0]===Tf)return j;k=typeof j[1]=="number"?j[1]:k+l}}return y}}}function tE(e){return Array.isArray(e)?e:typeof e=="number"?[XT,e]:e==null?fb:[e]}function Km(e,n,s,r){let i,o,l;typeof n=="function"&&typeof s!="function"?(o=void 0,l=n,i=s):(o=n,l=s,i=r),eE(e,o,d,i);function d(u,h){const m=h[h.length-1],p=m?m.children.indexOf(u):void 0;return l(u,p,m)}}const Ef={}.hasOwnProperty,nE={};function sE(e,n){const s=n||nE,r=new Map,i=new Map,o=new Map,l={...OT,...s.handlers},d={all:h,applyData:iE,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:l,one:u,options:s,patch:rE,wrap:oE};return Km(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const p=m.type==="definition"?r:i,x=String(m.identifier).toUpperCase();p.has(x)||p.set(x,m)}}),d;function u(m,p){const x=m.type,y=d.handlers[x];if(Ef.call(d.handlers,x)&&y)return y(d,m,p);if(d.options.passThrough&&d.options.passThrough.includes(x)){if("children"in m){const{children:k,...b}=m,w=Nd(b);return w.children=d.all(m),w}return Nd(m)}return(d.options.unknownHandler||aE)(d,m,p)}function h(m){const p=[];if("children"in m){const x=m.children;let y=-1;for(;++y<x.length;){const j=d.one(x[y],m);if(j){if(y&&x[y-1].type==="break"&&(!Array.isArray(j)&&j.type==="text"&&(j.value=x2(j.value)),!Array.isArray(j)&&j.type==="element")){const k=j.children[0];k&&k.type==="text"&&(k.value=x2(k.value))}Array.isArray(j)?p.push(...j):p.push(j)}}}return p}}function rE(e,n){e.position&&(n.position=HS(e))}function iE(e,n){let s=n;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(s.type==="element")s.tagName=r;else{const l="children"in s?s.children:[s];s={type:"element",tagName:r,properties:{},children:l}}s.type==="element"&&o&&Object.assign(s.properties,Nd(o)),"children"in s&&s.children&&i!==null&&i!==void 0&&(s.children=i)}return s}function aE(e,n){const s=n.data||{},r="value"in n&&!(Ef.call(s,"hProperties")||Ef.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 oE(e,n){const s=[];let r=-1;for(n&&s.push({type:"text",value:`
|
|
623
|
-
`});++r<e.length;)r&&s.push({type:"text",value:`
|
|
624
|
-
`}),s.push(e[r]);return n&&e.length>0&&s.push({type:"text",value:`
|
|
625
|
-
`}),s}function x2(e){let n=0,s=e.charCodeAt(n);for(;s===9||s===32;)n++,s=e.charCodeAt(n);return e.slice(n)}function y2(e,n){const s=sE(e,n),r=s.one(e,void 0),i=VT(s),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
|
|
626
|
-
`},i),o}function lE(e,n){return e&&"run"in e?async function(s,r){const i=y2(s,{file:r,...n});await e.run(i,r)}:function(s,r){return y2(s,{file:r,...e||n})}}function j2(e){if(e)throw e}var vp,k2;function cE(){if(k2)return vp;k2=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,s=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(h){return typeof Array.isArray=="function"?Array.isArray(h):n.call(h)==="[object Array]"},o=function(h){if(!h||n.call(h)!=="[object Object]")return!1;var m=e.call(h,"constructor"),p=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!m&&!p)return!1;var x;for(x in h);return typeof x>"u"||e.call(h,x)},l=function(h,m){s&&m.name==="__proto__"?s(h,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):h[m.name]=m.newValue},d=function(h,m){if(m==="__proto__")if(e.call(h,m)){if(r)return r(h,m).value}else return;return h[m]};return vp=function u(){var h,m,p,x,y,j,k=arguments[0],b=1,w=arguments.length,S=!1;for(typeof k=="boolean"&&(S=k,k=arguments[1]||{},b=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});b<w;++b)if(h=arguments[b],h!=null)for(m in h)p=d(k,m),x=d(h,m),k!==x&&(S&&x&&(o(x)||(y=i(x)))?(y?(y=!1,j=p&&i(p)?p:[]):j=p&&o(p)?p:{},l(k,{name:m,newValue:u(S,j,x)})):typeof x<"u"&&l(k,{name:m,newValue:x}));return k},vp}var dE=cE();const bp=em(dE);function Af(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 uE(){const e=[],n={run:s,use:r};return n;function s(...i){let o=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);d(null,...i);function d(u,...h){const m=e[++o];let p=-1;if(u){l(u);return}for(;++p<i.length;)(h[p]===null||h[p]===void 0)&&(h[p]=i[p]);i=h,m?hE(m,d)(...h):l(null,...h)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),n}}function hE(e,n){let s;return r;function r(...l){const d=e.length>l.length;let u;d&&l.push(i);try{u=e.apply(this,l)}catch(h){const m=h;if(d&&s)throw m;return i(m)}d||(u&&u.then&&typeof u.then=="function"?u.then(o,i):u instanceof Error?i(u):o(u))}function i(l,...d){s||(s=!0,n(l,...d))}function o(l){i(null,l)}}const ws={basename:pE,dirname:fE,extname:mE,join:gE,sep:"/"};function pE(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');xl(e);let s=0,r=-1,i=e.length,o;if(n===void 0||n.length===0||n.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){s=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(s,r)}if(n===e)return"";let l=-1,d=n.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){s=i+1;break}}else l<0&&(o=!0,l=i+1),d>-1&&(e.codePointAt(i)===n.codePointAt(d--)?d<0&&(r=i):(d=-1,r=l));return s===r?r=l:r<0&&(r=e.length),e.slice(s,r)}function fE(e){if(xl(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 mE(e){xl(e);let n=e.length,s=-1,r=0,i=-1,o=0,l;for(;n--;){const d=e.codePointAt(n);if(d===47){if(l){r=n+1;break}continue}s<0&&(l=!0,s=n+1),d===46?i<0?i=n:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||s<0||o===0||o===1&&i===s-1&&i===r+1?"":e.slice(i,s)}function gE(...e){let n=-1,s;for(;++n<e.length;)xl(e[n]),e[n]&&(s=s===void 0?e[n]:s+"/"+e[n]);return s===void 0?".":xE(s)}function xE(e){xl(e);const n=e.codePointAt(0)===47;let s=yE(e,!n);return s.length===0&&!n&&(s="."),s.length>0&&e.codePointAt(e.length-1)===47&&(s+="/"),n?"/"+s:s}function yE(e,n){let s="",r=0,i=-1,o=0,l=-1,d,u;for(;++l<=e.length;){if(l<e.length)d=e.codePointAt(l);else{if(d===47)break;d=47}if(d===47){if(!(i===l-1||o===1))if(i!==l-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(u=s.lastIndexOf("/"),u!==s.length-1){u<0?(s="",r=0):(s=s.slice(0,u),r=s.length-1-s.lastIndexOf("/")),i=l,o=0;continue}}else if(s.length>0){s="",r=0,i=l,o=0;continue}}n&&(s=s.length>0?s+"/..":"..",r=2)}else s.length>0?s+="/"+e.slice(i+1,l):s=e.slice(i+1,l),r=l-i-1;i=l,o=0}else d===46&&o>-1?o++:o=-1}return s}function xl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const jE={cwd:kE};function kE(){return"/"}function Pf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function vE(e){if(typeof e=="string")e=new URL(e);else if(!Pf(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 bE(e)}function bE(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 i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(n)}const wp=["history","path","basename","stem","extname","dirname"];class mb{constructor(n){let s;n?Pf(n)?s={path:n}:typeof n=="string"||wE(n)?s={value:n}:s=n:s={},this.cwd="cwd"in s?"":jE.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<wp.length;){const o=wp[r];o in s&&s[o]!==void 0&&s[o]!==null&&(this[o]=o==="history"?[...s[o]]:s[o])}let i;for(i in s)wp.includes(i)||(this[i]=s[i])}get basename(){return typeof this.path=="string"?ws.basename(this.path):void 0}set basename(n){Sp(n,"basename"),Np(n,"basename"),this.path=ws.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?ws.dirname(this.path):void 0}set dirname(n){v2(this.basename,"dirname"),this.path=ws.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?ws.extname(this.path):void 0}set extname(n){if(Np(n,"extname"),v2(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=ws.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){Pf(n)&&(n=vE(n)),Sp(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?ws.basename(this.path,this.extname):void 0}set stem(n){Sp(n,"stem"),Np(n,"stem"),this.path=ws.join(this.dirname||"",n+(this.extname||""))}fail(n,s,r){const i=this.message(n,s,r);throw i.fatal=!0,i}info(n,s,r){const i=this.message(n,s,r);return i.fatal=void 0,i}message(n,s,r){const i=new Zt(n,s,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function Np(e,n){if(e&&e.includes(ws.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+ws.sep+"`")}function Sp(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function v2(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function wE(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const NE=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),SE={}.hasOwnProperty;class Ym extends NE{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=uE()}copy(){const n=new Ym;let s=-1;for(;++s<this.attachers.length;){const r=this.attachers[s];n.use(...r)}return n.data(bp(!0,{},this.namespace)),n}data(n,s){return typeof n=="string"?arguments.length===2?(Tp("data",this.frozen),this.namespace[n]=s,this):SE.call(this.namespace,n)&&this.namespace[n]||void 0:n?(Tp("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 i=s.call(n,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const s=Oc(n),r=this.parser||this.Parser;return Cp("parse",r),r(String(s),s)}process(n,s){const r=this;return this.freeze(),Cp("process",this.parser||this.Parser),$p("process",this.compiler||this.Compiler),s?i(void 0,s):new Promise(i);function i(o,l){const d=Oc(n),u=r.parse(d);r.run(u,d,function(m,p,x){if(m||!p||!x)return h(m);const y=p,j=r.stringify(y,x);TE(j)?x.value=j:x.result=j,h(m,x)});function h(m,p){m||!p?l(m):o?o(p):s(void 0,p)}}}processSync(n){let s=!1,r;return this.freeze(),Cp("processSync",this.parser||this.Parser),$p("processSync",this.compiler||this.Compiler),this.process(n,i),w2("processSync","process",s),r;function i(o,l){s=!0,j2(o),r=l}}run(n,s,r){b2(n),this.freeze();const i=this.transformers;return!r&&typeof s=="function"&&(r=s,s=void 0),r?o(void 0,r):new Promise(o);function o(l,d){const u=Oc(s);i.run(n,u,h);function h(m,p,x){const y=p||n;m?d(m):l?l(y):r(void 0,y,x)}}}runSync(n,s){let r=!1,i;return this.run(n,s,o),w2("runSync","run",r),i;function o(l,d){j2(l),i=d,r=!0}}stringify(n,s){this.freeze();const r=Oc(s),i=this.compiler||this.Compiler;return $p("stringify",i),b2(n),i(n,r)}use(n,...s){const r=this.attachers,i=this.namespace;if(Tp("use",this.frozen),n!=null)if(typeof n=="function")u(n,s);else if(typeof n=="object")Array.isArray(n)?d(n):l(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function o(h){if(typeof h=="function")u(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[m,...p]=h;u(m,p)}else l(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function l(h){if(!("plugins"in h)&&!("settings"in h))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");d(h.plugins),h.settings&&(i.settings=bp(!0,i.settings,h.settings))}function d(h){let m=-1;if(h!=null)if(Array.isArray(h))for(;++m<h.length;){const p=h[m];o(p)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function u(h,m){let p=-1,x=-1;for(;++p<r.length;)if(r[p][0]===h){x=p;break}if(x===-1)r.push([h,...m]);else if(m.length>0){let[y,...j]=m;const k=r[x][1];Af(k)&&Af(y)&&(y=bp(!0,k,y)),r[x]=[h,y,...j]}}}}const CE=new Ym().freeze();function Cp(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function $p(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Tp(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 b2(e){if(!Af(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function w2(e,n,s){if(!s)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Oc(e){return $E(e)?e:new mb(e)}function $E(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function TE(e){return typeof e=="string"||EE(e)}function EE(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const AE="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",N2=[],S2={allowDangerousHtml:!0},PE=/^(https?|ircs?|mailto|xmpp)$/i,RE=[{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 Gm(e){const n=IE(e),s=FE(e);return zE(n.runSync(n.parse(s),s),e)}function IE(e){const n=e.rehypePlugins||N2,s=e.remarkPlugins||N2,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...S2}:S2;return CE().use(pT).use(s).use(lE,r).use(n)}function FE(e){const n=e.children||"",s=new mb;return typeof n=="string"&&(s.value=n),s}function zE(e,n){const s=n.allowedElements,r=n.allowElement,i=n.components,o=n.disallowedElements,l=n.skipHtml,d=n.unwrapDisallowed,u=n.urlTransform||qE;for(const m of RE)Object.hasOwn(n,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+AE+m.id,void 0);return n.className&&(e={type:"element",tagName:"div",properties:{className:n.className},children:e.type==="root"?e.children:[e]}),Km(e,h),QS(e,{Fragment:t.Fragment,components:i,ignoreInvalidStyle:!0,jsx:t.jsx,jsxs:t.jsxs,passKeys:!0,passNode:!0});function h(m,p,x){if(m.type==="raw"&&x&&typeof p=="number")return l?x.children.splice(p,1):x.children[p]={type:"text",value:m.value},p;if(m.type==="element"){let y;for(y in yp)if(Object.hasOwn(yp,y)&&Object.hasOwn(m.properties,y)){const j=m.properties[y],k=yp[y];(k===null||k.includes(m.tagName))&&(m.properties[y]=u(String(j||""),y,m))}}if(m.type==="element"){let y=s?!s.includes(m.tagName):o?o.includes(m.tagName):!1;if(!y&&r&&typeof p=="number"&&(y=!r(m,p,x)),y&&x&&typeof p=="number")return d&&m.children?x.children.splice(p,1,...m.children):x.children.splice(p,1),p}}}function qE(e){const n=e.indexOf(":"),s=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return n===-1||i!==-1&&n>i||s!==-1&&n>s||r!==-1&&n>r||PE.test(e.slice(0,n))?e:""}function C2(e,n){const s=String(e);if(typeof n!="string")throw new TypeError("Expected character");let r=0,i=s.indexOf(n);for(;i!==-1;)r++,i=s.indexOf(n,i+n.length);return r}function LE(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const gb=[],ME=!0,Ep=!1,Rf="skip";function OE(e,n,s,r){if(!e||typeof e!="object")throw new Error("Unexpected value `"+e+"` for `tree`, expected node");let i,o,l,d;if(o=n,typeof o=="function")l=o;else if(o&&typeof o=="object"){if(!(o.enter===null||o.enter===void 0))if(typeof o.enter=="function")l=o.enter;else throw new Error("Unexpected value `"+o.enter+"` for `visitors.enter`, expected optional visitor");if(typeof o.exit=="function")d=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");gl(i);const u=1;h(e,void 0,[])();function h(m,p,x){const y=m&&typeof m=="object"?m:{};if(typeof y.type=="string"){const k=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(j,"name",{value:"node ("+(m.type+(k?"<"+k+">":""))+")"})}return j;function j(){const k=!i;let b=gb;if(l&&k&&(b=$2(l(m,x,p)),b[0]===Ep))return b;if("children"in m&&m.children){const w=m;if(w.children&&b[0]!==Rf){let S=-1+u;const T=[...x,w];for(;S>-1&&S<w.children.length;){const A=w.children[S],D=h(A,S,T)();if(D[0]===Ep)return D;S=typeof D[1]=="number"?D[1]:S+u}}}if(d&&k){const w=$2(d(m,x,p));if(w[0]===Rf)throw new Error("Unexpected value `"+w[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(w[0]===Ep||typeof w[1]=="number")return w}return b}}}function $2(e){return Array.isArray(e)?e:typeof e=="number"?[ME,e]:e==null?gb:[e]}function _E(e,n,s){const i=gl((s||{}).ignore||[]),o=DE(n);let l=-1;for(;++l<o.length;)OE(e,d);function d(h,m,p){if(h.type==="text"&&typeof p=="number")return u(h,m,p);if(i(h,p,m[m.length-1]))return Rf}function u(h,m,p){const x=m[m.length-1],y=o[l][0],j=o[l][1];let k=0,b=!1,w=[];y.lastIndex=0;let S=y.exec(h.value);for(;S;){const A=S.index,D={index:S.index,input:S.input,stack:[...m,h]};let $=j(...S,D);if(typeof $=="string"&&($=$.length>0?{type:"text",value:$}:void 0),$===!1)y.lastIndex=A+1;else{if(k!==A&&T({type:"text",value:h.value.slice(k,A)}),Array.isArray($))for(const P of $)T(P);else $&&T($);k=A+S[0].length,b=!0}if(!y.global)break;S=y.exec(h.value)}return b?(k<h.value.length&&T({type:"text",value:h.value.slice(k)}),x.children.splice(p,1,...w)):w=[h],p+w.length;function T(A){const D=w[w.length-1];D&&D.type==="text"&&A.type==="text"?D.value+=A.value:w.push(A)}}}function DE(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 i=s[r];n.push([BE(i[0]),WE(i[1])])}return n}function BE(e){return typeof e=="string"?new RegExp(LE(e),"g"):e}function WE(e){return typeof e=="function"?e:function(){return e}}const Ap="phrasing",Pp=["autolink","link","image","label"];function UE(){return{transforms:[ZE],enter:{literalAutolink:VE,literalAutolinkEmail:Rp,literalAutolinkHttp:Rp,literalAutolinkWww:Rp},exit:{literalAutolink:QE,literalAutolinkEmail:GE,literalAutolinkHttp:KE,literalAutolinkWww:YE}}}function HE(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ap,notInConstruct:Pp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ap,notInConstruct:Pp},{character:":",before:"[ps]",after:"\\/",inConstruct:Ap,notInConstruct:Pp}]}}function VE(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Rp(e){this.config.enter.autolinkProtocol.call(this,e)}function KE(e){this.config.exit.autolinkProtocol.call(this,e)}function YE(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 GE(e){this.config.exit.autolinkEmail.call(this,e)}function QE(e){this.exit(e)}function ZE(e){_E(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,XE],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,JE]],{ignore:["link","linkReference"]})}function XE(e,n,s,r,i){let o="";if(!xb(i)||(/^w/i.test(n)&&(s=n+s,n="",o="http://"),!eA(s)))return!1;const l=tA(s+r);if(!l[0])return!1;const d={type:"link",title:null,url:o+n+l[0],children:[{type:"text",value:n+l[0]}]};return l[1]?[d,{type:"text",value:l[1]}]:d}function JE(e,n,s,r){return!xb(r,!0)||/[-\d_]$/.test(s)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+s,children:[{type:"text",value:n+"@"+s}]}}function eA(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 tA(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 i=C2(e,"(");let o=C2(e,")");for(;r!==-1&&i>o;)e+=s.slice(0,r+1),s=s.slice(r+1),r=s.indexOf(")"),o++;return[e,s]}function xb(e,n){const s=e.input.charCodeAt(e.index-1);return(e.index===0||li(s)||Yd(s))&&(!n||s!==47)}yb.peek=dA;function nA(){this.buffer()}function sA(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function rA(){this.buffer()}function iA(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function aA(e){const n=this.resume(),s=this.stack[this.stack.length-1];s.type,s.identifier=cs(this.sliceSerialize(e)).toLowerCase(),s.label=n}function oA(e){this.exit(e)}function lA(e){const n=this.resume(),s=this.stack[this.stack.length-1];s.type,s.identifier=cs(this.sliceSerialize(e)).toLowerCase(),s.label=n}function cA(e){this.exit(e)}function dA(){return"["}function yb(e,n,s,r){const i=s.createTracker(r);let o=i.move("[^");const l=s.enter("footnoteReference"),d=s.enter("reference");return o+=i.move(s.safe(s.associationId(e),{after:"]",before:o})),d(),l(),o+=i.move("]"),o}function uA(){return{enter:{gfmFootnoteCallString:nA,gfmFootnoteCall:sA,gfmFootnoteDefinitionLabelString:rA,gfmFootnoteDefinition:iA},exit:{gfmFootnoteCallString:aA,gfmFootnoteCall:oA,gfmFootnoteDefinitionLabelString:lA,gfmFootnoteDefinition:cA}}}function hA(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:s,footnoteReference:yb},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function s(r,i,o,l){const d=o.createTracker(l);let u=d.move("[^");const h=o.enter("footnoteDefinition"),m=o.enter("label");return u+=d.move(o.safe(o.associationId(r),{before:u,after:"]"})),m(),u+=d.move("]:"),r.children&&r.children.length>0&&(d.shift(4),u+=d.move((n?`
|
|
627
|
-
`:" ")+o.indentLines(o.containerFlow(r,d.current()),n?jb:pA))),h(),u}}function pA(e,n,s){return n===0?e:jb(e,n,s)}function jb(e,n,s){return(s?"":" ")+e}const fA=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Qm.attention=jA;Qm.peek=kA;function mA(){return{canContainEols:["delete"],enter:{strikethrough:xA},exit:{strikethrough:yA}}}function gA(){return{handlers:{delete:Qm},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:fA}]}}function xA(e){this.enter({type:"delete",children:[],position:void 0},e)}function yA(e){this.exit(e)}function Qm(e,n,s,r){const i=s.createTracker(r),o=s.stack.includes("strikethrough")?"~":"~~",l=s.enter("strikethrough");let d=i.move(o);return d+=s.containerPhrasing(e,{...i.current(),before:d,after:"~"}),d+=i.move(o),l(),d}function jA(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function kA(){return"~"}function vA(e){return e.length}function bA(e,n){const s=n||{},r=(s.align||[]).concat(),i=s.stringLength||vA,o=[],l=[],d=[],u=[];let h=0,m=-1;for(;++m<e.length;){const k=[],b=[];let w=-1;for(e[m].length>h&&(h=e[m].length);++w<e[m].length;){const S=wA(e[m][w]);if(s.alignDelimiters!==!1){const T=i(S);b[w]=T,(u[w]===void 0||T>u[w])&&(u[w]=T)}k.push(S)}l[m]=k,d[m]=b}let p=-1;if(typeof r=="object"&&"length"in r)for(;++p<h;)o[p]=T2(r[p]);else{const k=T2(r);for(;++p<h;)o[p]=k}p=-1;const x=[],y=[];for(;++p<h;){const k=o[p];let b="",w="";k===99?(b=":",w=":"):k===108?b=":":k===114&&(w=":");let S=s.alignDelimiters===!1?1:Math.max(1,u[p]-b.length-w.length);const T=b+"-".repeat(S)+w;s.alignDelimiters!==!1&&(S=b.length+S+w.length,S>u[p]&&(u[p]=S),y[p]=S),x[p]=T}l.splice(1,0,x),d.splice(1,0,y),m=-1;const j=[];for(;++m<l.length;){const k=l[m],b=d[m];p=-1;const w=[];for(;++p<h;){const S=k[p]||"";let T="",A="";if(s.alignDelimiters!==!1){const D=u[p]-(b[p]||0),$=o[p];$===114?T=" ".repeat(D):$===99?D%2?(T=" ".repeat(D/2+.5),A=" ".repeat(D/2-.5)):(T=" ".repeat(D/2),A=T):A=" ".repeat(D)}s.delimiterStart!==!1&&!p&&w.push("|"),s.padding!==!1&&!(s.alignDelimiters===!1&&S==="")&&(s.delimiterStart!==!1||p)&&w.push(" "),s.alignDelimiters!==!1&&w.push(T),w.push(S),s.alignDelimiters!==!1&&w.push(A),s.padding!==!1&&w.push(" "),(s.delimiterEnd!==!1||p!==h-1)&&w.push("|")}j.push(s.delimiterEnd===!1?w.join("").replace(/ +$/,""):w.join(""))}return j.join(`
|
|
628
|
-
`)}function wA(e){return e==null?"":String(e)}function T2(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 NA(e,n,s,r){const i=s.enter("blockquote"),o=s.createTracker(r);o.move("> "),o.shift(2);const l=s.indentLines(s.containerFlow(e,o.current()),SA);return i(),l}function SA(e,n,s){return">"+(s?"":" ")+e}function CA(e,n){return E2(e,n.inConstruct,!0)&&!E2(e,n.notInConstruct,!1)}function E2(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 A2(e,n,s,r){let i=-1;for(;++i<s.unsafe.length;)if(s.unsafe[i].character===`
|
|
629
|
-
`&&CA(s.stack,s.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
630
|
-
`}function $A(e,n){const s=String(e);let r=s.indexOf(n),i=r,o=0,l=0;if(typeof n!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>l&&(l=o):o=1,i=r+n.length,r=s.indexOf(n,i);return l}function TA(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 EA(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 AA(e,n,s,r){const i=EA(s),o=e.value||"",l=i==="`"?"GraveAccent":"Tilde";if(TA(e,s)){const p=s.enter("codeIndented"),x=s.indentLines(o,PA);return p(),x}const d=s.createTracker(r),u=i.repeat(Math.max($A(o,i)+1,3)),h=s.enter("codeFenced");let m=d.move(u);if(e.lang){const p=s.enter(`codeFencedLang${l}`);m+=d.move(s.safe(e.lang,{before:m,after:" ",encode:["`"],...d.current()})),p()}if(e.lang&&e.meta){const p=s.enter(`codeFencedMeta${l}`);m+=d.move(" "),m+=d.move(s.safe(e.meta,{before:m,after:`
|
|
631
|
-
`,encode:["`"],...d.current()})),p()}return m+=d.move(`
|
|
632
|
-
`),o&&(m+=d.move(o+`
|
|
633
|
-
`)),m+=d.move(u),h(),m}function PA(e,n,s){return(s?"":" ")+e}function Zm(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 RA(e,n,s,r){const i=Zm(s),o=i==='"'?"Quote":"Apostrophe",l=s.enter("definition");let d=s.enter("label");const u=s.createTracker(r);let h=u.move("[");return h+=u.move(s.safe(s.associationId(e),{before:h,after:"]",...u.current()})),h+=u.move("]: "),d(),!e.url||/[\0- \u007F]/.test(e.url)?(d=s.enter("destinationLiteral"),h+=u.move("<"),h+=u.move(s.safe(e.url,{before:h,after:">",...u.current()})),h+=u.move(">")):(d=s.enter("destinationRaw"),h+=u.move(s.safe(e.url,{before:h,after:e.title?" ":`
|
|
634
|
-
`,...u.current()}))),d(),e.title&&(d=s.enter(`title${o}`),h+=u.move(" "+i),h+=u.move(s.safe(e.title,{before:h,after:i,...u.current()})),h+=u.move(i),d()),l(),h}function IA(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 Do(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Sd(e,n,s){const r=ia(e),i=ia(n);return r===void 0?i===void 0?s==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}kb.peek=FA;function kb(e,n,s,r){const i=IA(s),o=s.enter("emphasis"),l=s.createTracker(r),d=l.move(i);let u=l.move(s.containerPhrasing(e,{after:i,before:d,...l.current()}));const h=u.charCodeAt(0),m=Sd(r.before.charCodeAt(r.before.length-1),h,i);m.inside&&(u=Do(h)+u.slice(1));const p=u.charCodeAt(u.length-1),x=Sd(r.after.charCodeAt(0),p,i);x.inside&&(u=u.slice(0,-1)+Do(p));const y=l.move(i);return o(),s.attentionEncodeSurroundingInfo={after:x.outside,before:m.outside},d+u+y}function FA(e,n,s){return s.options.emphasis||"*"}function zA(e,n){let s=!1;return Km(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return s=!0,Tf}),!!((!e.depth||e.depth<3)&&_m(e)&&(n.options.setext||s))}function qA(e,n,s,r){const i=Math.max(Math.min(6,e.depth||1),1),o=s.createTracker(r);if(zA(e,s)){const m=s.enter("headingSetext"),p=s.enter("phrasing"),x=s.containerPhrasing(e,{...o.current(),before:`
|
|
635
|
-
`,after:`
|
|
636
|
-
`});return p(),m(),x+`
|
|
637
|
-
`+(i===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
|
|
638
|
-
`))+1))}const l="#".repeat(i),d=s.enter("headingAtx"),u=s.enter("phrasing");o.move(l+" ");let h=s.containerPhrasing(e,{before:"# ",after:`
|
|
639
|
-
`,...o.current()});return/^[\t ]/.test(h)&&(h=Do(h.charCodeAt(0))+h.slice(1)),h=h?l+" "+h:l,s.options.closeAtx&&(h+=" "+l),u(),d(),h}vb.peek=LA;function vb(e){return e.value||""}function LA(){return"<"}bb.peek=MA;function bb(e,n,s,r){const i=Zm(s),o=i==='"'?"Quote":"Apostrophe",l=s.enter("image");let d=s.enter("label");const u=s.createTracker(r);let h=u.move("![");return h+=u.move(s.safe(e.alt,{before:h,after:"]",...u.current()})),h+=u.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=s.enter("destinationLiteral"),h+=u.move("<"),h+=u.move(s.safe(e.url,{before:h,after:">",...u.current()})),h+=u.move(">")):(d=s.enter("destinationRaw"),h+=u.move(s.safe(e.url,{before:h,after:e.title?" ":")",...u.current()}))),d(),e.title&&(d=s.enter(`title${o}`),h+=u.move(" "+i),h+=u.move(s.safe(e.title,{before:h,after:i,...u.current()})),h+=u.move(i),d()),h+=u.move(")"),l(),h}function MA(){return"!"}wb.peek=OA;function wb(e,n,s,r){const i=e.referenceType,o=s.enter("imageReference");let l=s.enter("label");const d=s.createTracker(r);let u=d.move("![");const h=s.safe(e.alt,{before:u,after:"]",...d.current()});u+=d.move(h+"]["),l();const m=s.stack;s.stack=[],l=s.enter("reference");const p=s.safe(s.associationId(e),{before:u,after:"]",...d.current()});return l(),s.stack=m,o(),i==="full"||!h||h!==p?u+=d.move(p+"]"):i==="shortcut"?u=u.slice(0,-1):u+=d.move("]"),u}function OA(){return"!"}Nb.peek=_A;function Nb(e,n,s){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<s.unsafe.length;){const l=s.unsafe[o],d=s.compilePattern(l);let u;if(l.atBreak)for(;u=d.exec(r);){let h=u.index;r.charCodeAt(h)===10&&r.charCodeAt(h-1)===13&&h--,r=r.slice(0,h)+" "+r.slice(u.index+1)}}return i+r+i}function _A(){return"`"}function Sb(e,n){const s=_m(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))}Cb.peek=DA;function Cb(e,n,s,r){const i=Zm(s),o=i==='"'?"Quote":"Apostrophe",l=s.createTracker(r);let d,u;if(Sb(e,s)){const m=s.stack;s.stack=[],d=s.enter("autolink");let p=l.move("<");return p+=l.move(s.containerPhrasing(e,{before:p,after:">",...l.current()})),p+=l.move(">"),d(),s.stack=m,p}d=s.enter("link"),u=s.enter("label");let h=l.move("[");return h+=l.move(s.containerPhrasing(e,{before:h,after:"](",...l.current()})),h+=l.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=s.enter("destinationLiteral"),h+=l.move("<"),h+=l.move(s.safe(e.url,{before:h,after:">",...l.current()})),h+=l.move(">")):(u=s.enter("destinationRaw"),h+=l.move(s.safe(e.url,{before:h,after:e.title?" ":")",...l.current()}))),u(),e.title&&(u=s.enter(`title${o}`),h+=l.move(" "+i),h+=l.move(s.safe(e.title,{before:h,after:i,...l.current()})),h+=l.move(i),u()),h+=l.move(")"),d(),h}function DA(e,n,s){return Sb(e,s)?"<":"["}$b.peek=BA;function $b(e,n,s,r){const i=e.referenceType,o=s.enter("linkReference");let l=s.enter("label");const d=s.createTracker(r);let u=d.move("[");const h=s.containerPhrasing(e,{before:u,after:"]",...d.current()});u+=d.move(h+"]["),l();const m=s.stack;s.stack=[],l=s.enter("reference");const p=s.safe(s.associationId(e),{before:u,after:"]",...d.current()});return l(),s.stack=m,o(),i==="full"||!h||h!==p?u+=d.move(p+"]"):i==="shortcut"?u=u.slice(0,-1):u+=d.move("]"),u}function BA(){return"["}function Xm(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 WA(e){const n=Xm(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 UA(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 Tb(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 HA(e,n,s,r){const i=s.enter("list"),o=s.bulletCurrent;let l=e.ordered?UA(s):Xm(s);const d=e.ordered?l==="."?")":".":WA(s);let u=n&&s.bulletLastUsed?l===s.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&m&&(!m.children||!m.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&&(u=!0),Tb(s)===l&&m){let p=-1;for(;++p<e.children.length;){const x=e.children[p];if(x&&x.type==="listItem"&&x.children&&x.children[0]&&x.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(l=d),s.bulletCurrent=l;const h=s.containerFlow(e,r);return s.bulletLastUsed=l,s.bulletCurrent=o,i(),h}function VA(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 KA(e,n,s,r){const i=VA(s);let o=s.bulletCurrent||Xm(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 l=o.length+1;(i==="tab"||i==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(l=Math.ceil(l/4)*4);const d=s.createTracker(r);d.move(o+" ".repeat(l-o.length)),d.shift(l);const u=s.enter("listItem"),h=s.indentLines(s.containerFlow(e,d.current()),m);return u(),h;function m(p,x,y){return x?(y?"":" ".repeat(l))+p:(y?o:o+" ".repeat(l-o.length))+p}}function YA(e,n,s,r){const i=s.enter("paragraph"),o=s.enter("phrasing"),l=s.containerPhrasing(e,r);return o(),i(),l}const GA=gl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function QA(e,n,s,r){return(e.children.some(function(l){return GA(l)})?s.containerPhrasing:s.containerFlow).call(s,e,r)}function ZA(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}Eb.peek=XA;function Eb(e,n,s,r){const i=ZA(s),o=s.enter("strong"),l=s.createTracker(r),d=l.move(i+i);let u=l.move(s.containerPhrasing(e,{after:i,before:d,...l.current()}));const h=u.charCodeAt(0),m=Sd(r.before.charCodeAt(r.before.length-1),h,i);m.inside&&(u=Do(h)+u.slice(1));const p=u.charCodeAt(u.length-1),x=Sd(r.after.charCodeAt(0),p,i);x.inside&&(u=u.slice(0,-1)+Do(p));const y=l.move(i+i);return o(),s.attentionEncodeSurroundingInfo={after:x.outside,before:m.outside},d+u+y}function XA(e,n,s){return s.options.strong||"*"}function JA(e,n,s,r){return s.safe(e.value,r)}function eP(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 tP(e,n,s){const r=(Tb(s)+(s.options.ruleSpaces?" ":"")).repeat(eP(s));return s.options.ruleSpaces?r.slice(0,-1):r}const Ab={blockquote:NA,break:A2,code:AA,definition:RA,emphasis:kb,hardBreak:A2,heading:qA,html:vb,image:bb,imageReference:wb,inlineCode:Nb,link:Cb,linkReference:$b,list:HA,listItem:KA,paragraph:YA,root:QA,strong:Eb,text:JA,thematicBreak:tP};function nP(){return{enter:{table:sP,tableData:P2,tableHeader:P2,tableRow:iP},exit:{codeText:aP,table:rP,tableData:Ip,tableHeader:Ip,tableRow:Ip}}}function sP(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 rP(e){this.exit(e),this.data.inTable=void 0}function iP(e){this.enter({type:"tableRow",children:[]},e)}function Ip(e){this.exit(e)}function P2(e){this.enter({type:"tableCell",children:[]},e)}function aP(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,oP));const s=this.stack[this.stack.length-1];s.type,s.value=n,this.exit(e)}function oP(e,n){return n==="|"?n:e}function lP(e){const n=e||{},s=n.tableCellPadding,r=n.tablePipeAlign,i=n.stringLength,o=s?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
640
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:x,table:l,tableCell:u,tableRow:d}};function l(y,j,k,b){return h(m(y,k,b),y.align)}function d(y,j,k,b){const w=p(y,k,b),S=h([w]);return S.slice(0,S.indexOf(`
|
|
641
|
-
`))}function u(y,j,k,b){const w=k.enter("tableCell"),S=k.enter("phrasing"),T=k.containerPhrasing(y,{...b,before:o,after:o});return S(),w(),T}function h(y,j){return bA(y,{align:j,alignDelimiters:r,padding:s,stringLength:i})}function m(y,j,k){const b=y.children;let w=-1;const S=[],T=j.enter("table");for(;++w<b.length;)S[w]=p(b[w],j,k);return T(),S}function p(y,j,k){const b=y.children;let w=-1;const S=[],T=j.enter("tableRow");for(;++w<b.length;)S[w]=u(b[w],y,j,k);return T(),S}function x(y,j,k){let b=Ab.inlineCode(y,j,k);return k.stack.includes("tableCell")&&(b=b.replace(/\|/g,"\\$&")),b}}function cP(){return{exit:{taskListCheckValueChecked:R2,taskListCheckValueUnchecked:R2,paragraph:uP}}}function dP(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:hP}}}function R2(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function uP(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 i=n.children;let o=-1,l;for(;++o<i.length;){const d=i[o];if(d.type==="paragraph"){l=d;break}}l===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 hP(e,n,s,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",d=s.createTracker(r);o&&d.move(l);let u=Ab.listItem(e,n,s,{...r,...d.current()});return o&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),u;function h(m){return m+l}}function pP(){return[UE(),uA(),mA(),nP(),cP()]}function fP(e){return{extensions:[HE(),hA(e),gA(),lP(e),dP()]}}const mP={tokenize:vP,partial:!0},Pb={tokenize:bP,partial:!0},Rb={tokenize:wP,partial:!0},Ib={tokenize:NP,partial:!0},gP={tokenize:SP,partial:!0},Fb={name:"wwwAutolink",tokenize:jP,previous:qb},zb={name:"protocolAutolink",tokenize:kP,previous:Lb},er={name:"emailAutolink",tokenize:yP,previous:Mb},Fs={};function xP(){return{text:Fs}}let Yr=48;for(;Yr<123;)Fs[Yr]=er,Yr++,Yr===58?Yr=65:Yr===91&&(Yr=97);Fs[43]=er;Fs[45]=er;Fs[46]=er;Fs[95]=er;Fs[72]=[er,zb];Fs[104]=[er,zb];Fs[87]=[er,Fb];Fs[119]=[er,Fb];function yP(e,n,s){const r=this;let i,o;return l;function l(p){return!If(p)||!Mb.call(r,r.previous)||Jm(r.events)?s(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),d(p))}function d(p){return If(p)?(e.consume(p),d):p===64?(e.consume(p),u):s(p)}function u(p){return p===46?e.check(gP,m,h)(p):p===45||p===95||Kt(p)?(o=!0,e.consume(p),u):m(p)}function h(p){return e.consume(p),i=!0,u}function m(p){return o&&i&&nn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(p)):s(p)}}function jP(e,n,s){const r=this;return i;function i(l){return l!==87&&l!==119||!qb.call(r,r.previous)||Jm(r.events)?s(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(mP,e.attempt(Pb,e.attempt(Rb,o),s),s)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(l)}}function kP(e,n,s){const r=this;let i="",o=!1;return l;function l(p){return(p===72||p===104)&&Lb.call(r,r.previous)&&!Jm(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(p),e.consume(p),d):s(p)}function d(p){if(nn(p)&&i.length<5)return i+=String.fromCodePoint(p),e.consume(p),d;if(p===58){const x=i.toLowerCase();if(x==="http"||x==="https")return e.consume(p),u}return s(p)}function u(p){return p===47?(e.consume(p),o?h:(o=!0,u)):s(p)}function h(p){return p===null||bd(p)||et(p)||li(p)||Yd(p)?s(p):e.attempt(Pb,e.attempt(Rb,m),s)(p)}function m(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(p)}}function vP(e,n,s){let r=0;return i;function i(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),i):l===46&&r===3?(e.consume(l),o):s(l)}function o(l){return l===null?s(l):n(l)}}function bP(e,n,s){let r,i,o;return l;function l(h){return h===46||h===95?e.check(Ib,u,d)(h):h===null||et(h)||li(h)||h!==45&&Yd(h)?u(h):(o=!0,e.consume(h),l)}function d(h){return h===95?r=!0:(i=r,r=void 0),e.consume(h),l}function u(h){return i||r||!o?s(h):n(h)}}function wP(e,n){let s=0,r=0;return i;function i(l){return l===40?(s++,e.consume(l),i):l===41&&r<s?o(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(Ib,n,o)(l):l===null||et(l)||li(l)?n(l):(e.consume(l),i)}function o(l){return l===41&&r++,e.consume(l),i}}function NP(e,n,s){return r;function r(d){return d===33||d===34||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===63||d===95||d===126?(e.consume(d),r):d===38?(e.consume(d),o):d===93?(e.consume(d),i):d===60||d===null||et(d)||li(d)?n(d):s(d)}function i(d){return d===null||d===40||d===91||et(d)||li(d)?n(d):r(d)}function o(d){return nn(d)?l(d):s(d)}function l(d){return d===59?(e.consume(d),r):nn(d)?(e.consume(d),l):s(d)}}function SP(e,n,s){return r;function r(o){return e.consume(o),i}function i(o){return Kt(o)?s(o):n(o)}}function qb(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||et(e)}function Lb(e){return!nn(e)}function Mb(e){return!(e===47||If(e))}function If(e){return e===43||e===45||e===46||e===95||Kt(e)}function Jm(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 CP={tokenize:FP,partial:!0};function $P(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:PP,continuation:{tokenize:RP},exit:IP}},text:{91:{name:"gfmFootnoteCall",tokenize:AP},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:TP,resolveTo:EP}}}}function TP(e,n,s){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){l=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return d;function d(u){if(!l||!l._balanced)return s(u);const h=cs(r.sliceSerialize({start:l.end,end:r.now()}));return h.codePointAt(0)!==94||!o.includes(h.slice(1))?s(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),n(u))}}function EP(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)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[s+3][1].end),end:Object.assign({},e[s+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},d=[e[s+1],e[s+2],["enter",r,n],e[s+3],e[s+4],["enter",i,n],["exit",i,n],["enter",o,n],["enter",l,n],["exit",l,n],["exit",o,n],e[e.length-2],e[e.length-1],["exit",r,n]];return e.splice(s,e.length-s+1,...d),e}function AP(e,n,s){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return d;function d(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),u}function u(p){return p!==94?s(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(p){if(o>999||p===93&&!l||p===null||p===91||et(p))return s(p);if(p===93){e.exit("chunkString");const x=e.exit("gfmFootnoteCallString");return i.includes(cs(r.sliceSerialize(x)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):s(p)}return et(p)||(l=!0),o++,e.consume(p),p===92?m:h}function m(p){return p===91||p===92||p===93?(e.consume(p),o++,h):h(p)}}function PP(e,n,s){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,d;return u;function u(j){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(j),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(j){return j===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(j),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):s(j)}function m(j){if(l>999||j===93&&!d||j===null||j===91||et(j))return s(j);if(j===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return o=cs(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(j),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),x}return et(j)||(d=!0),l++,e.consume(j),j===92?p:m}function p(j){return j===91||j===92||j===93?(e.consume(j),l++,m):m(j)}function x(j){return j===58?(e.enter("definitionMarker"),e.consume(j),e.exit("definitionMarker"),i.includes(o)||i.push(o),Ke(e,y,"gfmFootnoteDefinitionWhitespace")):s(j)}function y(j){return n(j)}}function RP(e,n,s){return e.check(ml,n,e.attempt(CP,n,s))}function IP(e){e.exit("gfmFootnoteDefinition")}function FP(e,n,s){const r=this;return Ke(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?n(o):s(o)}}function zP(e){let s=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return s==null&&(s=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,d){let u=-1;for(;++u<l.length;)if(l[u][0]==="enter"&&l[u][1].type==="strikethroughSequenceTemporary"&&l[u][1]._close){let h=u;for(;h--;)if(l[h][0]==="exit"&&l[h][1].type==="strikethroughSequenceTemporary"&&l[h][1]._open&&l[u][1].end.offset-l[u][1].start.offset===l[h][1].end.offset-l[h][1].start.offset){l[u][1].type="strikethroughSequence",l[h][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},l[h][1].start),end:Object.assign({},l[u][1].end)},p={type:"strikethroughText",start:Object.assign({},l[h][1].end),end:Object.assign({},l[u][1].start)},x=[["enter",m,d],["enter",l[h][1],d],["exit",l[h][1],d],["enter",p,d]],y=d.parser.constructs.insideSpan.null;y&&An(x,x.length,0,Gd(y,l.slice(h+1,u),d)),An(x,x.length,0,[["exit",p,d],["enter",l[u][1],d],["exit",l[u][1],d],["exit",m,d]]),An(l,h-1,u-h+3,x),u=h+x.length-2;break}}for(u=-1;++u<l.length;)l[u][1].type==="strikethroughSequenceTemporary"&&(l[u][1].type="data");return l}function o(l,d,u){const h=this.previous,m=this.events;let p=0;return x;function x(j){return h===126&&m[m.length-1][1].type!=="characterEscape"?u(j):(l.enter("strikethroughSequenceTemporary"),y(j))}function y(j){const k=ia(h);if(j===126)return p>1?u(j):(l.consume(j),p++,y);if(p<2&&!s)return u(j);const b=l.exit("strikethroughSequenceTemporary"),w=ia(j);return b._open=!w||w===2&&!!k,b._close=!k||k===2&&!!w,d(j)}}}class qP{constructor(){this.map=[],this.index=new Map}add(n,s,r){LP(this,n,s,r)}consume(n){if(this.map.sort(function(o,l){return o[0]-l[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 i=r.pop();for(;i;){for(const o of i)n.push(o);i=r.pop()}this.map.length=0,this.index.clear()}}function LP(e,n,s,r){if(s===0&&r.length===0)return;const i=e.index.get(n);if(i){i[1]+=s,i[2].push(...r);return}const o=[n,s,r];e.map.push(o),e.index.set(n,o)}function MP(e,n){let s=!1;const r=[];for(;n<e.length;){const i=e[n];if(s){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(s=!0);n+=1}return r}function OP(){return{flow:{null:{name:"table",tokenize:_P,resolveAll:DP}}}}function _P(e,n,s){const r=this;let i=0,o=0,l;return d;function d(z){let U=r.events.length-1;for(;U>-1;){const{type:M}=r.events[U][1];if(M==="lineEnding"||M==="linePrefix")U--;else break}const I=U>-1?r.events[U][1].type:null,W=I==="tableHead"||I==="tableRow"?$:u;return W===$&&r.parser.lazy[r.now().line]?s(z):W(z)}function u(z){return e.enter("tableHead"),e.enter("tableRow"),h(z)}function h(z){return z===124||(l=!0,o+=1),m(z)}function m(z){return z===null?s(z):Re(z)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),y):s(z):Be(z)?Ke(e,m,"whitespace")(z):(o+=1,l&&(l=!1,i+=1),z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),l=!0,m):(e.enter("data"),p(z)))}function p(z){return z===null||z===124||et(z)?(e.exit("data"),m(z)):(e.consume(z),z===92?x:p)}function x(z){return z===92||z===124?(e.consume(z),p):p(z)}function y(z){return r.interrupt=!1,r.parser.lazy[r.now().line]?s(z):(e.enter("tableDelimiterRow"),l=!1,Be(z)?Ke(e,j,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):j(z))}function j(z){return z===45||z===58?b(z):z===124?(l=!0,e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),k):D(z)}function k(z){return Be(z)?Ke(e,b,"whitespace")(z):b(z)}function b(z){return z===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),w):z===45?(o+=1,w(z)):z===null||Re(z)?A(z):D(z)}function w(z){return z===45?(e.enter("tableDelimiterFiller"),S(z)):D(z)}function S(z){return z===45?(e.consume(z),S):z===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),T):(e.exit("tableDelimiterFiller"),T(z))}function T(z){return Be(z)?Ke(e,A,"whitespace")(z):A(z)}function A(z){return z===124?j(z):z===null||Re(z)?!l||i!==o?D(z):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(z)):D(z)}function D(z){return s(z)}function $(z){return e.enter("tableRow"),P(z)}function P(z){return z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),P):z===null||Re(z)?(e.exit("tableRow"),n(z)):Be(z)?Ke(e,P,"whitespace")(z):(e.enter("data"),F(z))}function F(z){return z===null||z===124||et(z)?(e.exit("data"),P(z)):(e.consume(z),z===92?_:F)}function _(z){return z===92||z===124?(e.consume(z),F):F(z)}}function DP(e,n){let s=-1,r=!0,i=0,o=[0,0,0,0],l=[0,0,0,0],d=!1,u=0,h,m,p;const x=new qP;for(;++s<e.length;){const y=e[s],j=y[1];y[0]==="enter"?j.type==="tableHead"?(d=!1,u!==0&&(I2(x,n,u,h,m),m=void 0,u=0),h={type:"table",start:Object.assign({},j.start),end:Object.assign({},j.end)},x.add(s,0,[["enter",h,n]])):j.type==="tableRow"||j.type==="tableDelimiterRow"?(r=!0,p=void 0,o=[0,0,0,0],l=[0,s+1,0,0],d&&(d=!1,m={type:"tableBody",start:Object.assign({},j.start),end:Object.assign({},j.end)},x.add(s,0,[["enter",m,n]])),i=j.type==="tableDelimiterRow"?2:m?3:1):i&&(j.type==="data"||j.type==="tableDelimiterMarker"||j.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],p=_c(x,n,o,i,void 0,p),o=[0,0,0,0]),l[2]=s)):j.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],p=_c(x,n,o,i,void 0,p)),o=l,l=[o[1],s,0,0])):j.type==="tableHead"?(d=!0,u=s):j.type==="tableRow"||j.type==="tableDelimiterRow"?(u=s,o[1]!==0?(l[0]=l[1],p=_c(x,n,o,i,s,p)):l[1]!==0&&(p=_c(x,n,l,i,s,p)),i=0):i&&(j.type==="data"||j.type==="tableDelimiterMarker"||j.type==="tableDelimiterFiller")&&(l[3]=s)}for(u!==0&&I2(x,n,u,h,m),x.consume(n.events),s=-1;++s<n.events.length;){const y=n.events[s];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=MP(n.events,s))}return e}function _c(e,n,s,r,i,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",d="tableContent";s[0]!==0&&(o.end=Object.assign({},Gi(n.events,s[0])),e.add(s[0],0,[["exit",o,n]]));const u=Gi(n.events,s[1]);if(o={type:l,start:Object.assign({},u),end:Object.assign({},u)},e.add(s[1],0,[["enter",o,n]]),s[2]!==0){const h=Gi(n.events,s[2]),m=Gi(n.events,s[3]),p={type:d,start:Object.assign({},h),end:Object.assign({},m)};if(e.add(s[2],0,[["enter",p,n]]),r!==2){const x=n.events[s[2]],y=n.events[s[3]];if(x[1].end=Object.assign({},y[1].end),x[1].type="chunkText",x[1].contentType="text",s[3]>s[2]+1){const j=s[2]+1,k=s[3]-s[2]-1;e.add(j,k,[])}}e.add(s[3]+1,0,[["exit",p,n]])}return i!==void 0&&(o.end=Object.assign({},Gi(n.events,i)),e.add(i,0,[["exit",o,n]]),o=void 0),o}function I2(e,n,s,r,i){const o=[],l=Gi(n.events,s);i&&(i.end=Object.assign({},l),o.push(["exit",i,n])),r.end=Object.assign({},l),o.push(["exit",r,n]),e.add(s+1,0,o)}function Gi(e,n){const s=e[n],r=s[0]==="enter"?"start":"end";return s[1][r]}const BP={name:"tasklistCheck",tokenize:UP};function WP(){return{text:{91:BP}}}function UP(e,n,s){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?s(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),o)}function o(u){return et(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),l):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),l):s(u)}function l(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),d):s(u)}function d(u){return Re(u)?n(u):Be(u)?e.check({tokenize:HP},n,s)(u):s(u)}}function HP(e,n,s){return Ke(e,r,"whitespace");function r(i){return i===null?s(i):n(i)}}function VP(e){return Qv([xP(),$P(),zP(e),OP(),WP()])}const KP={};function e1(e){const n=this,s=e||KP,r=n.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(VP(s)),o.push(pP()),l.push(fP(s))}function Ob(e){var n,s,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(n=0;n<i;n++)e[n]&&(s=Ob(e[n]))&&(r&&(r+=" "),r+=s)}else for(s in e)e[s]&&(r&&(r+=" "),r+=s);return r}function _b(){for(var e,n,s=0,r="",i=arguments.length;s<i;s++)(e=arguments[s])&&(n=Ob(e))&&(r&&(r+=" "),r+=n);return r}var YP=Object.create,Xd=Object.defineProperty,GP=Object.defineProperties,QP=Object.getOwnPropertyDescriptor,ZP=Object.getOwnPropertyDescriptors,Db=Object.getOwnPropertyNames,Cd=Object.getOwnPropertySymbols,XP=Object.getPrototypeOf,t1=Object.prototype.hasOwnProperty,Bb=Object.prototype.propertyIsEnumerable,F2=(e,n,s)=>n in e?Xd(e,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[n]=s,$s=(e,n)=>{for(var s in n||(n={}))t1.call(n,s)&&F2(e,s,n[s]);if(Cd)for(var s of Cd(n))Bb.call(n,s)&&F2(e,s,n[s]);return e},Jd=(e,n)=>GP(e,ZP(n)),Wb=(e,n)=>{var s={};for(var r in e)t1.call(e,r)&&n.indexOf(r)<0&&(s[r]=e[r]);if(e!=null&&Cd)for(var r of Cd(e))n.indexOf(r)<0&&Bb.call(e,r)&&(s[r]=e[r]);return s},JP=(e,n)=>function(){return n||(0,e[Db(e)[0]])((n={exports:{}}).exports,n),n.exports},eR=(e,n)=>{for(var s in n)Xd(e,s,{get:n[s],enumerable:!0})},tR=(e,n,s,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of Db(n))!t1.call(e,i)&&i!==s&&Xd(e,i,{get:()=>n[i],enumerable:!(r=QP(n,i))||r.enumerable});return e},nR=(e,n,s)=>(s=e!=null?YP(XP(e)):{},tR(!e||!e.__esModule?Xd(s,"default",{value:e,enumerable:!0}):s,e)),sR=JP({"../../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,i=0,o={},l={util:{encode:function j(k){return k instanceof d?new d(k.type,j(k.content),k.alias):Array.isArray(k)?k.map(j):k.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(j){return Object.prototype.toString.call(j).slice(8,-1)},objId:function(j){return j.__id||Object.defineProperty(j,"__id",{value:++i}),j.__id},clone:function j(k,b){b=b||{};var w,S;switch(l.util.type(k)){case"Object":if(S=l.util.objId(k),b[S])return b[S];w={},b[S]=w;for(var T in k)k.hasOwnProperty(T)&&(w[T]=j(k[T],b));return w;case"Array":return S=l.util.objId(k),b[S]?b[S]:(w=[],b[S]=w,k.forEach(function(A,D){w[D]=j(A,b)}),w);default:return k}},getLanguage:function(j){for(;j;){var k=r.exec(j.className);if(k)return k[1].toLowerCase();j=j.parentElement}return"none"},setLanguage:function(j,k){j.className=j.className.replace(RegExp(r,"gi"),""),j.classList.add("language-"+k)},isActive:function(j,k,b){for(var w="no-"+k;j;){var S=j.classList;if(S.contains(k))return!0;if(S.contains(w))return!1;j=j.parentElement}return!!b}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(j,k){var b=l.util.clone(l.languages[j]);for(var w in k)b[w]=k[w];return b},insertBefore:function(j,k,b,w){w=w||l.languages;var S=w[j],T={};for(var A in S)if(S.hasOwnProperty(A)){if(A==k)for(var D in b)b.hasOwnProperty(D)&&(T[D]=b[D]);b.hasOwnProperty(A)||(T[A]=S[A])}var $=w[j];return w[j]=T,l.languages.DFS(l.languages,function(P,F){F===$&&P!=j&&(this[P]=T)}),T},DFS:function j(k,b,w,S){S=S||{};var T=l.util.objId;for(var A in k)if(k.hasOwnProperty(A)){b.call(k,A,k[A],w||A);var D=k[A],$=l.util.type(D);$==="Object"&&!S[T(D)]?(S[T(D)]=!0,j(D,b,null,S)):$==="Array"&&!S[T(D)]&&(S[T(D)]=!0,j(D,b,A,S))}}},plugins:{},highlight:function(j,k,b){var w={code:j,grammar:k,language:b};if(l.hooks.run("before-tokenize",w),!w.grammar)throw new Error('The language "'+w.language+'" has no grammar.');return w.tokens=l.tokenize(w.code,w.grammar),l.hooks.run("after-tokenize",w),d.stringify(l.util.encode(w.tokens),w.language)},tokenize:function(j,k){var b=k.rest;if(b){for(var w in b)k[w]=b[w];delete k.rest}var S=new m;return p(S,S.head,j),h(j,S,k,S.head,0),y(S)},hooks:{all:{},add:function(j,k){var b=l.hooks.all;b[j]=b[j]||[],b[j].push(k)},run:function(j,k){var b=l.hooks.all[j];if(!(!b||!b.length))for(var w=0,S;S=b[w++];)S(k)}},Token:d};function d(j,k,b,w){this.type=j,this.content=k,this.alias=b,this.length=(w||"").length|0}d.stringify=function j(k,b){if(typeof k=="string")return k;if(Array.isArray(k)){var w="";return k.forEach(function($){w+=j($,b)}),w}var S={type:k.type,content:j(k.content,b),tag:"span",classes:["token",k.type],attributes:{},language:b},T=k.alias;T&&(Array.isArray(T)?Array.prototype.push.apply(S.classes,T):S.classes.push(T)),l.hooks.run("wrap",S);var A="";for(var D in S.attributes)A+=" "+D+'="'+(S.attributes[D]||"").replace(/"/g,""")+'"';return"<"+S.tag+' class="'+S.classes.join(" ")+'"'+A+">"+S.content+"</"+S.tag+">"};function u(j,k,b,w){j.lastIndex=k;var S=j.exec(b);if(S&&w&&S[1]){var T=S[1].length;S.index+=T,S[0]=S[0].slice(T)}return S}function h(j,k,b,w,S,T){for(var A in b)if(!(!b.hasOwnProperty(A)||!b[A])){var D=b[A];D=Array.isArray(D)?D:[D];for(var $=0;$<D.length;++$){if(T&&T.cause==A+","+$)return;var P=D[$],F=P.inside,_=!!P.lookbehind,z=!!P.greedy,U=P.alias;if(z&&!P.pattern.global){var I=P.pattern.toString().match(/[imsuy]*$/)[0];P.pattern=RegExp(P.pattern.source,I+"g")}for(var W=P.pattern||P,M=w.next,G=S;M!==k.tail&&!(T&&G>=T.reach);G+=M.value.length,M=M.next){var ce=M.value;if(k.length>j.length)return;if(!(ce instanceof d)){var V=1,Y;if(z){if(Y=u(W,G,j,_),!Y||Y.index>=j.length)break;var J=Y.index,se=Y.index+Y[0].length,R=G;for(R+=M.value.length;J>=R;)M=M.next,R+=M.value.length;if(R-=M.value.length,G=R,M.value instanceof d)continue;for(var B=M;B!==k.tail&&(R<se||typeof B.value=="string");B=B.next)V++,R+=B.value.length;V--,ce=j.slice(G,R),Y.index-=G}else if(Y=u(W,0,ce,_),!Y)continue;var J=Y.index,q=Y[0],me=ce.slice(0,J),ye=ce.slice(J+q.length),Ne=G+ce.length;T&&Ne>T.reach&&(T.reach=Ne);var Fe=M.prev;me&&(Fe=p(k,Fe,me),G+=me.length),x(k,Fe,V);var Te=new d(A,F?l.tokenize(q,F):q,U,q);if(M=p(k,Fe,Te),ye&&p(k,M,ye),V>1){var ze={cause:A+","+$,reach:Ne};h(j,k,b,M.prev,G,ze),T&&ze.reach>T.reach&&(T.reach=ze.reach)}}}}}}function m(){var j={value:null,prev:null,next:null},k={value:null,prev:j,next:null};j.next=k,this.head=j,this.tail=k,this.length=0}function p(j,k,b){var w=k.next,S={value:b,prev:k,next:w};return k.next=S,w.prev=S,j.length++,S}function x(j,k,b){for(var w=k.next,S=0;S<b&&w!==j.tail;S++)w=w.next;k.next=w,w.prev=k,j.length-=S}function y(j){for(var k=[],b=j.head.next;b!==j.tail;)k.push(b.value),b=b.next;return k}return l})();n.exports=s,s.default=s}}),ne=nR(sR());ne.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]},ne.languages.markup.tag.inside["attr-value"].inside.entity=ne.languages.markup.entity,ne.languages.markup.doctype.inside["internal-subset"].inside=ne.languages.markup,ne.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(ne.languages.markup.tag,"addInlined",{value:function(e,r){var s={},s=(s["language-"+r]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:ne.languages[r]},s.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:s}}),r=(s["language-"+r]={pattern:/[\s\S]+/,inside:ne.languages[r]},{});r[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:s},ne.languages.insertBefore("markup","cdata",r)}}),Object.defineProperty(ne.languages.markup.tag,"addAttribute",{value:function(e,n){ne.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:ne.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),ne.languages.html=ne.languages.markup,ne.languages.mathml=ne.languages.markup,ne.languages.svg=ne.languages.markup,ne.languages.xml=ne.languages.extend("markup",{}),ne.languages.ssml=ne.languages.xml,ne.languages.atom=ne.languages.xml,ne.languages.rss=ne.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),i={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};e.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:r,inside:{escape: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":i}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:s,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":i}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}})(ne),ne.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:/[{}[\];(),.:]/},ne.languages.javascript=ne.languages.extend("clike",{"class-name":[ne.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}|\?\?=?|\?\.?|[~:]/}),ne.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,ne.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:ne.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:ne.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:ne.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:ne.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:ne.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),ne.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:ne.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"}}),ne.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),ne.languages.markup&&(ne.languages.markup.tag.addInlined("script","javascript"),ne.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")),ne.languages.js=ne.languages.javascript,ne.languages.actionscript=ne.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:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),ne.languages.actionscript["class-name"].alias="function",delete ne.languages.actionscript.parameter,delete ne.languages.actionscript["literal-property"],ne.languages.markup&&ne.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:ne.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})(ne),(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(i){var o=function(p){p.inside||(p.inside={}),p.inside.rest=r},l="doc-comment";if(d=e.languages[i]){var d,u=d[l];if((u=u||(d=e.languages.insertBefore(i,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[l])instanceof RegExp&&(u=d[l]={pattern:u}),Array.isArray(u))for(var h=0,m=u.length;h<m;h++)u[h]instanceof RegExp&&(u[h]={pattern:u[h]}),o(u[h]);else o(u)}})}}),n.addSupport(["java","javascript","php"],n)})(ne),(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"))})(ne),(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})})(ne),(function(e){var n=/[*&][^\s[\]{},]+/,s=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+s.source+"(?:[ ]+"+n.source+")?|"+n.source+"(?:[ ]+"+s.source+")?)",i=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function l(d,u){u=(u||"").replace(/m/g,"")+"m";var h=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<value>>/g,function(){return d});return RegExp(h,u)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return r})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<key>>/g,function(){return"(?:"+i+"|"+o+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:l(/\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:l(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:l(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:l(o),lookbehind:!0,greedy:!0},number:{pattern:l(/[+-]?(?: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})(ne),(function(e){var n=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function s(h){return h=h.replace(/<inner>/g,function(){return n}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+h+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,l=(e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+o+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+o+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern: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(h){["url","bold","italic","strike","code-snippet"].forEach(function(m){h!==m&&(e.languages.markdown[h].inside.content.inside[m]=e.languages.markdown[m])})}),e.hooks.add("after-tokenize",function(h){h.language!=="markdown"&&h.language!=="md"||(function m(p){if(p&&typeof p!="string")for(var x=0,y=p.length;x<y;x++){var j,k=p[x];k.type!=="code"?m(k.content):(j=k.content[1],k=k.content[3],j&&k&&j.type==="code-language"&&k.type==="code-block"&&typeof j.content=="string"&&(j=j.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),j="language-"+(j=(/[a-z][\w-]*/i.exec(j)||[""])[0].toLowerCase()),k.alias?typeof k.alias=="string"?k.alias=[k.alias,j]:k.alias.push(j):k.alias=[j]))}})(h.tokens)}),e.hooks.add("wrap",function(h){if(h.type==="code-block"){for(var m="",p=0,x=h.classes.length;p<x;p++){var y=h.classes[p],y=/language-(.+)/.exec(y);if(y){m=y[1];break}}var j,k=e.languages[m];k?h.content=e.highlight((function(b){return b=b.replace(l,""),b=b.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(w,S){var T;return(S=S.toLowerCase())[0]==="#"?(T=S[1]==="x"?parseInt(S.slice(2),16):Number(S.slice(1)),u(T)):d[S]||w})})(h.content),k,m):m&&m!=="none"&&e.plugins.autoloader&&(j="md-"+new Date().valueOf()+"-"+Math.floor(1e16*Math.random()),h.attributes.id=j,e.plugins.autoloader.loadLanguages(m,function(){var b=document.getElementById(j);b&&(b.innerHTML=e.highlight(b.textContent,e.languages[m],m))}))}}),RegExp(e.languages.markup.tag.pattern.source,"gi")),d={amp:"&",lt:"<",gt:">",quot:'"'},u=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown})(ne),ne.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:ne.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+/},ne.hooks.add("after-tokenize",function(e){if(e.language==="graphql")for(var n=e.tokens.filter(function(j){return typeof j!="string"&&j.type!=="comment"&&j.type!=="scalar"}),s=0;s<n.length;){var r=n[s++];if(r.type==="keyword"&&r.content==="mutation"){var i=[];if(p(["definition-mutation","punctuation"])&&m(1).content==="("){s+=2;var o=x(/^\($/,/^\)$/);if(o===-1)continue;for(;s<o;s++){var l=m(0);l.type==="variable"&&(y(l,"variable-input"),i.push(l.content))}s=o+1}if(p(["punctuation","property-query"])&&m(0).content==="{"&&(s++,y(m(0),"property-mutation"),0<i.length)){var d=x(/^\{$/,/^\}$/);if(d!==-1)for(var u=s;u<d;u++){var h=n[u];h.type==="variable"&&0<=i.indexOf(h.content)&&y(h,"variable-input")}}}}function m(j){return n[s+j]}function p(j,k){k=k||0;for(var b=0;b<j.length;b++){var w=m(b+k);if(!w||w.type!==j[b])return}return 1}function x(j,k){for(var b=1,w=s;w<n.length;w++){var S=n[w],T=S.content;if(S.type==="punctuation"&&typeof T=="string"){if(j.test(T))b++;else if(k.test(T)&&--b===0)return w}}return-1}function y(j,k){var b=j.alias;b?Array.isArray(b)||(j.alias=b=[b]):j.alias=b=[],b.push(k)}}),ne.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,i=r.inside["interpolation-punctuation"],o=r.pattern.source;function l(p,x){if(e.languages[p])return{pattern:RegExp("((?:"+x+")\\s*)"+s),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:p}}}}function d(p,x,y){return p={code:p,grammar:x,language:y},e.hooks.run("before-tokenize",p),p.tokens=e.tokenize(p.code,p.grammar),e.hooks.run("after-tokenize",p),p.tokens}function u(p,x,y){var b=e.tokenize(p,{interpolation:{pattern:RegExp(o),lookbehind:!0}}),j=0,k={},b=d(b.map(function(S){if(typeof S=="string")return S;for(var T,A,S=S.content;p.indexOf((A=j++,T="___"+y.toUpperCase()+"_"+A+"___"))!==-1;);return k[T]=S,T}).join(""),x,y),w=Object.keys(k);return j=0,(function S(T){for(var A=0;A<T.length;A++){if(j>=w.length)return;var D,$,P,F,_,z,U,I=T[A];typeof I=="string"||typeof I.content=="string"?(D=w[j],(U=(z=typeof I=="string"?I:I.content).indexOf(D))!==-1&&(++j,$=z.substring(0,U),_=k[D],P=void 0,(F={})["interpolation-punctuation"]=i,(F=e.tokenize(_,F)).length===3&&((P=[1,1]).push.apply(P,d(F[1],e.languages.javascript,"javascript")),F.splice.apply(F,P)),P=new e.Token("interpolation",F,r.alias,_),F=z.substring(U+D.length),_=[],$&&_.push($),_.push(P),F&&(S(z=[F]),_.push.apply(_,z)),typeof I=="string"?(T.splice.apply(T,[A,1].concat(_)),A+=_.length-1):I.content=_)):(U=I.content,Array.isArray(U)?S(U):S([U]))}})(b),new e.Token(y,b,"language-"+y,p)}e.languages.javascript["template-string"]=[l("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),l("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),l("svg",/\bsvg/.source),l("markdown",/\b(?:markdown|md)/.source),l("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),l("sql",/\bsql/.source),n].filter(Boolean);var h={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function m(p){return typeof p=="string"?p:Array.isArray(p)?p.map(m).join(""):m(p.content)}e.hooks.add("after-tokenize",function(p){p.language in h&&(function x(y){for(var j=0,k=y.length;j<k;j++){var b,w,S,T=y[j];typeof T!="string"&&(b=T.content,Array.isArray(b)?T.type==="template-string"?(T=b[1],b.length===3&&typeof T!="string"&&T.type==="embedded-code"&&(w=m(T),T=T.alias,T=Array.isArray(T)?T[0]:T,S=e.languages[T])&&(b[1]=u(w,S,T))):x(b):typeof b!="string"&&x([b]))}})(p.tokens)})})(ne),(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})(ne),(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)})(ne),(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})})(ne),ne.languages.n4js=ne.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/}),ne.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),ne.languages.n4jsd=ne.languages.n4js,(function(e){function n(l,d){return RegExp(l.replace(/<ID>/g,function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source}),d)}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],i=e.languages.javascript[o],o=(i=e.util.type(i)==="RegExp"?e.languages.javascript[o]={pattern:i}:i).inside||{};(i.inside=o)["maybe-class-name"]=/^[A-Z][\s\S]*/}})(ne),(function(e){var n=e.util.clone(e.languages.javascript),s=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,i=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function o(u,h){return u=u.replace(/<S>/g,function(){return s}).replace(/<BRACES>/g,function(){return r}).replace(/<SPREAD>/g,function(){return i}),RegExp(u,h)}i=o(i).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 l(u){for(var h=[],m=0;m<u.length;m++){var p=u[m],x=!1;typeof p!="string"&&(p.type==="tag"&&p.content[0]&&p.content[0].type==="tag"?p.content[0].content[0].content==="</"?0<h.length&&h[h.length-1].tagName===d(p.content[0].content[1])&&h.pop():p.content[p.content.length-1].content!=="/>"&&h.push({tagName:d(p.content[0].content[1]),openedBraces:0}):0<h.length&&p.type==="punctuation"&&p.content==="{"?h[h.length-1].openedBraces++:0<h.length&&0<h[h.length-1].openedBraces&&p.type==="punctuation"&&p.content==="}"?h[h.length-1].openedBraces--:x=!0),(x||typeof p=="string")&&0<h.length&&h[h.length-1].openedBraces===0&&(x=d(p),m<u.length-1&&(typeof u[m+1]=="string"||u[m+1].type==="plain-text")&&(x+=d(u[m+1]),u.splice(m+1,1)),0<m&&(typeof u[m-1]=="string"||u[m-1].type==="plain-text")&&(x=d(u[m-1])+x,u.splice(m-1,1),m--),u[m]=new e.Token("plain-text",x,null,x)),p.content&&typeof p.content!="string"&&l(p.content)}}var d=function(u){return u?typeof u=="string"?u:typeof u.content=="string"?u.content:u.content.map(d).join(""):""};e.hooks.add("after-tokenize",function(u){u.language!=="jsx"&&u.language!=="tsx"||l(u.tokens)})})(ne),(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})(ne),ne.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:/[{}[\]();,.:\\]/},ne.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=ne.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})(ne),ne.languages.c=ne.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|[?:~]|[-+*/%&|^!=<>]=?/}),ne.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),ne.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},ne.languages.c.string],char:ne.languages.c.char,comment:ne.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:ne.languages.c}}}}),ne.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 ne.languages.c.boolean,ne.languages.objectivec=ne.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 ne.languages.objectivec["class-name"],ne.languages.objc=ne.languages.objectivec,ne.languages.reason=ne.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/}),ne.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 ne.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})(ne),ne.languages.go=ne.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/}),ne.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete ne.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"])})(ne),ne.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:/[{}[\];(),.:]/},ne.languages.python["string-interpolation"].inside.interpolation.inside.rest=ne.languages.python,ne.languages.py=ne.languages.python,ne.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"}},ne.languages.webmanifest=ne.languages.json;var Bo={};eR(Bo,{dracula:()=>iR,duotoneDark:()=>oR,duotoneLight:()=>cR,github:()=>uR,gruvboxMaterialDark:()=>_R,gruvboxMaterialLight:()=>BR,jettwaveDark:()=>RR,jettwaveLight:()=>FR,nightOwl:()=>pR,nightOwlLight:()=>mR,oceanicNext:()=>xR,okaidia:()=>jR,oneDark:()=>qR,oneLight:()=>MR,palenight:()=>vR,shadesOfPurple:()=>wR,synthwave84:()=>SR,ultramin:()=>$R,vsDark:()=>Ub,vsLight:()=>AR});var rR={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)"}}]},iR=rR,aR={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"}}]},oR=aR,lR={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"}}]},cR=lR,dR={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"}}]},uR=dR,hR={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)"}}]},pR=hR,fR={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)"}}]},mR=fR,Sn={char:"#D8DEE9",comment:"#999999",keyword:"#c5a5c5",primitive:"#5a9bcf",string:"#8dc891",variable:"#d7deea",boolean:"#ff8b50",tag:"#fc929e",function:"#79b6f2",className:"#FAC863"},gR={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:Sn.keyword}},{types:["attr-value"],style:{color:Sn.string}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:Sn.comment}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:Sn.primitive}},{types:["boolean"],style:{color:Sn.boolean}},{types:["tag"],style:{color:Sn.tag}},{types:["string"],style:{color:Sn.string}},{types:["punctuation"],style:{color:Sn.string}},{types:["selector","char","builtin","inserted"],style:{color:Sn.char}},{types:["function"],style:{color:Sn.function}},{types:["operator","entity","url","variable"],style:{color:Sn.variable}},{types:["keyword"],style:{color:Sn.keyword}},{types:["atrule","class-name"],style:{color:Sn.className}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},xR=gR,yR={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"}}]},jR=yR,kR={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)"}}]},vR=kR,bR={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)"}}]},wR=bR,NR={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"}}]},SR=NR,CR={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)"}}]},$R=CR,TR={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)"}}]},Ub=TR,ER={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)"}}]},AR=ER,PR={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"}}]},RR=PR,IR={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"}}]},FR=IR,zR={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%)"}}]},qR=zR,LR={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%)"}}]},MR=LR,OR={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"}}]},_R=OR,DR={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"}}]},BR=DR,WR=e=>C.useCallback(n=>{var s=n,{className:r,style:i,line:o}=s,l=Wb(s,["className","style","line"]);const d=Jd($s({},l),{className:_b("token-line",r)});return typeof e=="object"&&"plain"in e&&(d.style=e.plain),typeof i=="object"&&(d.style=$s($s({},d.style||{}),i)),d},[e]),UR=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(i=>e[i]))}},[e]);return C.useCallback(s=>{var r=s,{token:i,className:o,style:l}=r,d=Wb(r,["token","className","style"]);const u=Jd($s({},d),{className:_b("token",...i.types,o),children:i.content,style:n(i)});return l!=null&&(u.style=$s($s({},u.style||{}),l)),u},[n])},HR=/\r\n|\r|\n/,z2=e=>{e.length===0?e.push({types:["plain"],content:`
|
|
642
|
-
`,empty:!0}):e.length===1&&e[0].content===""&&(e[0].content=`
|
|
643
|
-
`,e[0].empty=!0)},q2=(e,n)=>{const s=e.length;return s>0&&e[s-1]===n?e:e.concat(n)},VR=e=>{const n=[[]],s=[e],r=[0],i=[e.length];let o=0,l=0,d=[];const u=[d];for(;l>-1;){for(;(o=r[l]++)<i[l];){let h,m=n[l];const x=s[l][o];if(typeof x=="string"?(m=l>0?m:["plain"],h=x):(m=q2(m,x.type),x.alias&&(m=q2(m,x.alias)),h=x.content),typeof h!="string"){l++,n.push(m),s.push(h),r.push(0),i.push(h.length);continue}const y=h.split(HR),j=y.length;d.push({types:m,content:y[0]});for(let k=1;k<j;k++)z2(d),u.push(d=[]),d.push({types:m,content:y[k]})}l--,n.pop(),s.pop(),r.pop(),i.pop()}return z2(d),u},L2=VR,KR=({prism:e,code:n,grammar:s,language:r})=>C.useMemo(()=>{if(s==null)return L2([n]);const i={code:n,grammar:s,language:r,tokens:[]};return e.hooks.run("before-tokenize",i),i.tokens=e.tokenize(n,s),e.hooks.run("after-tokenize",i),L2(i.tokens)},[n,s,r,e]),YR=(e,n)=>{const{plain:s}=e,r=e.styles.reduce((i,o)=>{const{languages:l,style:d}=o;return l&&!l.includes(n)||o.types.forEach(u=>{const h=$s($s({},i[u]),d);i[u]=h}),i},{});return r.root=s,r.plain=Jd($s({},s),{backgroundColor:void 0}),r},GR=YR,QR=({children:e,language:n,code:s,theme:r,prism:i})=>{const o=n.toLowerCase(),l=GR(r,o),d=WR(l),u=UR(l),h=i.languages[o],m=KR({prism:i,language:o,code:s,grammar:h});return e({tokens:m,className:`prism-code language-${o}`,style:l!=null?l.root:{},getLineProps:d,getTokenProps:u})},Hb=e=>C.createElement(QR,Jd($s({},e),{prism:e.prism||ne,theme:e.theme||Ub,code:e.code,language:e.language}));/*! Bundled license information:
|
|
644
|
-
|
|
645
|
-
prismjs/prism.js:
|
|
646
|
-
(**
|
|
647
|
-
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
648
|
-
*
|
|
649
|
-
* @license MIT <https://opensource.org/licenses/MIT>
|
|
650
|
-
* @author Lea Verou <https://lea.verou.me>
|
|
651
|
-
* @namespace
|
|
652
|
-
* @public
|
|
653
|
-
*)
|
|
654
|
-
*/const ZR=/^\s*(?:flowchart|graph)\s*(LR|RL|TD|TB|BT)?\s*;?\s*$/i,XR=/^([A-Za-z0-9_-ۿ-]+)\s*(\[\[(.+?)\]\]|\(\[(.+?)\]\)|\(\((.+?)\)\)|\[(.+?)\]|\((.+?)\)|\{(.+?)\}|>(.+?)\])?/,JR=/^\s*(-->|---|-\.->|-\.-|==>|===|--\s*(.+?)\s*-->|-\.\s*(.+?)\s*\.->|==\s*(.+?)\s*==>)\s*(?:\|(.+?)\|)?\s*/;function M2(e){return e.replace(/^["']|["']$/g,"").replace(/<br\s*\/?>/gi," ").trim()}function eI(e){const n=e.split(`
|
|
655
|
-
`).map(x=>x.replace(/%%.*$/,"").trim()).filter(Boolean),s=n.shift()?.match(ZR);if(!s)return null;const r=(s[1]??"TD").toUpperCase(),i=new Map,o=[],l=x=>{const y=x.match(XR);if(!y)return null;const j=y[1],k=y[3]??y[4]??y[5]??y[6]??y[7]??y[8]??y[9],b=y[8]?"decision":y[6]||y[3]?"box":k?"round":"box",w=i.get(j);return(!w||k)&&i.set(j,{id:j,text:M2(k??w?.text??j),shape:k?b:w?.shape??b}),{id:j,rest:x.slice(y[0].length)}};for(const x of n)if(!/^(classDef|class|style|linkStyle|click|subgraph|end|direction)\b/.test(x))for(const y of x.split(";").map(j=>j.trim()).filter(Boolean)){let j=l(y);if(!j)continue;let k=j.rest;for(;;){const b=k.match(JR);if(!b)break;const w=l(k.slice(b[0].length));if(!w)break;const S=M2(b[5]??b[2]??b[3]??b[4]??"");o.push({from:j.id,to:w.id,...S?{label:S}:{},...b[1].includes(".")?{dashed:!0}:{}}),j=w,k=w.rest}}if(!i.size)return null;const d=new Map([...i.keys()].map(x=>[x,0]));for(let x=0;x<i.size;x+=1){let y=!1;for(const j of o){if(j.from===j.to)continue;const k=(d.get(j.from)??0)+1;k>(d.get(j.to)??0)&&k<i.size&&(d.set(j.to,k),y=!0)}if(!y)break}const u=new Map,h=[...i.values()].map(x=>{const y=d.get(x.id)??0,j=u.get(y)??0;return u.set(y,j+1),{...x,rank:y,slot:j}}),m=r==="RL"||r==="BT",p=Math.max(...h.map(x=>x.rank));return{across:r==="LR"||r==="RL",nodes:m?h.map(x=>({...x,rank:p-x.rank})):h,edges:o}}function Ir({pictures:e,start:n,onClose:s}){const[r,i]=C.useState(n),o=e.length,l=C.useCallback(u=>i(h=>(h+u+o)%o),[o]);C.useEffect(()=>{const u=h=>{h.key==="Escape"?s():h.key==="ArrowRight"?l(1):h.key==="ArrowLeft"&&l(-1)};return window.addEventListener("keydown",u),()=>window.removeEventListener("keydown",u)},[s,l]);const d=e[r];return d?t.jsxs("div",{className:"lightbox",role:"dialog","aria-modal":"true","aria-label":d.caption,onMouseDown:u=>u.target===u.currentTarget&&s(),children:[t.jsxs("div",{className:"lb-top",children:[t.jsx(L,{className:"lb-cap",text:d.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:d.src,target:"_blank",rel:"noreferrer","aria-label":"Open in a new tab",title:"Open in a new tab",children:t.jsx(Kn,{size:15})}),t.jsx("button",{className:"iconbtn",onClick:s,"aria-label":"Close",children:t.jsx(Ve,{size:16})})]}),t.jsx("img",{className:"lb-img",src:d.src,alt:d.caption,onMouseDown:u=>u.stopPropagation()}),o>1&&t.jsxs(t.Fragment,{children:[t.jsx("button",{className:"lb-nav prev",onClick:()=>l(-1),"aria-label":"Previous picture",children:t.jsx(Lk,{size:22})}),t.jsx("button",{className:"lb-nav next",onClick:()=>l(1),"aria-label":"Next picture",children:t.jsx(Bd,{size:22})})]})]}):null}function n1({src:e,alt:n,className:s}){const[r,i]=C.useState(!1);return t.jsxs(t.Fragment,{children:[t.jsx("button",{className:"zoom",onClick:()=>i(!0),"aria-label":`Open ${n} full size`,children:t.jsx("img",{className:s,src:e,alt:n,loading:"lazy"})}),r&&t.jsx(Ir,{pictures:[{src:e,caption:n}],start:0,onClose:()=>i(!1)})]})}function aa({text:e,ticket:n,stream:s,caret:r}){const[i,o]=C.useState(null),l=C.useMemo(()=>[[Nm,{stream:s,caret:r}]],[s,r]);return t.jsxs("div",{className:"cmd",children:[t.jsx(Gm,{remarkPlugins:[e1],rehypePlugins:l,components:{a:({href:d,children:u})=>t.jsx("a",{href:d,target:"_blank",rel:"noreferrer",children:u}),img:({src:d,alt:u})=>{const h=d?/^(https?:|data:)/.test(d)?d:En(n,d):"";return t.jsx("button",{className:"cimg",onClick:()=>o(h),"aria-label":`Open ${u||"the picture"} big`,children:t.jsx("img",{src:h,alt:u??"",loading:"lazy"})})},table:({node:d,children:u})=>t.jsx("div",{className:"ctable",children:t.jsx("table",{dir:d?.properties?.dir??void 0,children:u})}),pre:({node:d})=>t.jsx(tI,{node:d})},children:e}),i&&t.jsx(Ir,{pictures:[{src:i,caption:"Picture"}],start:0,onClose:()=>o(null)})]})}function Vb(e){return e.type==="text"?e.value??"":(e.children??[]).map(Vb).join("")}function tI({node:e}){const n=e.children?.find(o=>o.tagName==="code"),r=(n?.properties?.className??[]).find(o=>o.startsWith("language-"))?.slice(9)??"",i=Vb(n??e).replace(/\n$/,"");if(r==="mermaid"){const o=eI(i);if(o)return t.jsx(sI,{chart:o})}return t.jsx(nI,{lang:r==="mermaid"?"Diagram (Mermaid)":r,code:i})}function nI({lang:e,code:n}){const{theme:s,toast:r}=qe(),i=()=>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:i,"aria-label":"Copy the code",children:[t.jsx(Xn,{size:13})," Copy"]})]}),t.jsx(Hb,{code:n,language:e||"text",theme:s==="dark"?Bo.vsDark:Bo.github,children:({tokens:o,getLineProps:l,getTokenProps:d})=>t.jsx("pre",{children:o.map((u,h)=>t.jsx("div",{...l({line:u}),children:u.map((m,p)=>t.jsx("span",{...d({token:m})},p))},h))})})]})}function sI({chart:e}){const n=C.useRef(null),[s,r]=C.useState([]),i=C.useMemo(()=>{const l=[];for(const d of e.nodes)(l[d.rank]??=[]).push(d);return l.map(d=>(d??[]).sort((u,h)=>u.slot-h.slot))},[e]),o=C.useMemo(()=>new Set(e.nodes.filter(l=>!e.edges.some(d=>d.from===l.id)).map(l=>l.id)),[e]);return C.useLayoutEffect(()=>{const l=n.current;if(!l)return;const d=()=>{const h=l.getBoundingClientRect(),m=p=>l.querySelector(`[data-node="${CSS.escape(p)}"]`)?.getBoundingClientRect();r(e.edges.flatMap(p=>{const x=m(p.from),y=m(p.to);if(!x||!y)return[];const j=e.across?y.left>=x.right-1:y.top>=x.bottom-1;let k,b,w,S,T;if(e.across){k=(j?x.right:x.left)-h.left,b=x.top+x.height/2-h.top,w=(j?y.left:y.right)-h.left,S=y.top+y.height/2-h.top;const A=Math.max(24,Math.abs(w-k)/2)*(j?1:-1);T=`M${k},${b} C${k+A},${b} ${w-A},${S} ${w},${S}`}else{k=x.left+x.width/2-h.left,b=(j?x.bottom:x.top)-h.top,w=y.left+y.width/2-h.left,S=(j?y.top:y.bottom)-h.top;const A=Math.max(18,Math.abs(S-b)/2)*(j?1:-1);T=`M${k},${b} C${k},${b+A} ${w},${S-A} ${w},${S}`}return[{d:T,x:(k+w)/2,y:(b+S)/2,...p.label?{label:p.label}:{},...p.dashed?{dashed:!0}:{}}]}))};d();const u=new ResizeObserver(d);return u.observe(l),()=>u.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((l,d)=>t.jsx("path",{d:l.d,className:l.dashed?"dash":"",markerEnd:"url(#cflow-arrow)"},d))]}),i.map((l,d)=>t.jsx("div",{className:"cflow-rank",children:l.map(u=>t.jsx("span",{"data-node":u.id,className:`cnode ${u.shape} ${o.has(u.id)&&u.shape!=="decision"?"end":""}`,children:t.jsx("bdi",{children:u.text})},u.id))},d)),s.map((l,d)=>l.label?t.jsx("span",{className:"cflow-label",style:{left:l.x,top:l.y},children:l.label},d):null)]})})}function rI({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 iI(e){return e.split(`
|
|
656
|
-
`).reduce((n,s)=>n+(s.trim()?Math.ceil(s.length/80):0),0)}const O2=/\.(png|jpe?g|gif|webp)$/i,_2=/\.html?$/i;function Kb({ticket:e,files:n}){const s=n.filter(o=>O2.test(o)),r=n.filter(o=>_2.test(o)),i=n.filter(o=>!O2.test(o)&&!_2.test(o));return t.jsxs("div",{className:"attached",children:[r.map(o=>t.jsx(s1,{ticket:e,file:o},o)),s.length>0&&t.jsx("div",{className:"attpics",children:s.map(o=>t.jsx(n1,{src:En(e,o),alt:D2(o)},o))}),i.map(o=>t.jsxs("a",{className:"btn sm",href:En(e,o),download:!0,children:[t.jsx(us,{size:13})," ",D2(o)]},o))]})}function s1({ticket:e,file:n,title:s="Mockup"}){const[r,i]=C.useState(!1),o=we({queryKey:["mockup-link",e,n],queryFn:()=>ke(`/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 l=d=>t.jsx("iframe",{className:d,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:()=>i(!0),children:[t.jsx(Wd,{size:12})," Full size"]})]}),l("mockframe"),r&&t.jsx(We,{title:s,wide:!0,onClose:()=>i(!1),children:l("mockframe big")})]})}function D2(e){return e.split(/[\\/]/).pop()??e}const Ff=/\.(png|jpe?g|gif|webp|bmp)$/i,B2=/\.(mp4|webm|mov|m4v)$/i,zf=/\.(ogg|opus|oga|m4a|mp3|wav|aac|amr|flac|weba)$/i,Yb=/\.(md|markdown)$/i,Gb=/\.pdf$/i,Qb=/\.html?$/i;function Hs(e){return e.split(/[\\/]/).pop()??e}function Zb(e){return Yb.test(e)?{cls:"md",label:"MD"}:Gb.test(e)?{cls:"pdf",label:"PDF"}:Qb.test(e)?{cls:"html",label:"HTML"}:Ff.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 r1({ticket:e,files:n,from:s,onOpen:r,sent:i}){const[o,l]=C.useState(null),[d,u]=C.useState(null),h=n.filter(y=>Ff.test(y)),m=n.filter(y=>B2.test(y)),p=n.filter(y=>zf.test(y)),x=n.filter(y=>!Ff.test(y)&&!B2.test(y)&&!zf.test(y)&&!/\.transcript\.txt$/.test(y));return t.jsxs("div",{className:"cfiles",children:[h.length>0&&t.jsx("div",{className:"cshots",children:h.map((y,j)=>t.jsxs("button",{className:"cshot",onClick:()=>l(j),"aria-label":`Open ${Hs(y)} big`,children:[t.jsx("img",{src:En(e,y),alt:Hs(y),loading:"lazy"}),i&&t.jsx("span",{className:"cshot-ok",title:"Sent",children:t.jsx(fe,{size:11,strokeWidth:3})})]},y))}),m.map(y=>t.jsxs("div",{className:"cvideo",children:[t.jsx("video",{src:En(e,y),controls:!0,preload:"metadata"}),t.jsx(Xb,{ticket:e,file:y})]},y)),p.map(y=>t.jsx(oI,{ticket:e,file:y},y)),x.map(y=>{const j=Zb(y),k=Yb.test(y),b=Gb.test(y),w=Qb.test(y),S=k?"Markdown · opens beside the chat":b?"PDF · opens beside the chat":w?"Mockup · runs here, sealed off":"File · downloads",T=t.jsxs(t.Fragment,{children:[t.jsx("span",{className:`cfic ${j.cls}`,children:j.label}),t.jsxs("span",{className:"cfile-t",children:[t.jsx("span",{className:"cfname",children:Hs(y)}),t.jsx("span",{className:"cfmeta",children:S})]}),t.jsx("span",{className:"cfopen",children:k||b||w?"Open":t.jsx(us,{size:14})})]});return k||b?t.jsx("button",{className:"cfile",onClick:()=>r?.({ticket:e,file:y,kind:k?"md":"pdf",...s?{from:s}:{}}),children:T},y):w?t.jsx("button",{className:"cfile",onClick:()=>u(y),children:T},y):t.jsx("a",{className:"cfile",href:En(e,y),download:!0,children:T},y)}),o!==null&&t.jsx(Ir,{pictures:h.map(y=>({src:En(e,y),caption:Hs(y)})),start:o,onClose:()=>l(null)}),d&&t.jsx(We,{title:Hs(d),wide:!0,onClose:()=>u(null),children:t.jsx(s1,{ticket:e,file:d,title:Hs(d)})})]})}function aI(e,n){return we({queryKey:["transcript",e,n],queryFn:async()=>{const s=await fetch(En(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 Xb({ticket:e,file:n,open:s=!0}){const r=aI(e,n).data,[i,o]=C.useState(s);return r?t.jsxs(t.Fragment,{children:[t.jsx("button",{className:"ctlink",onClick:()=>o(!i),children:i?"Hide the written text":"Show the written text"}),i&&t.jsx("div",{className:"ctrans",children:r.split(/\n+/).map((l,d)=>{const u=pt(l);return t.jsx("p",{dir:u.dir,lang:u.dir==="rtl"?"ar":"en",className:Js(u),children:l},d)})})]}):null}function oI({ticket:e,file:n}){const s=C.useRef(null),[r,i]=C.useState(!1),[o,l]=C.useState({at:0,length:0}),d=C.useMemo(()=>{let p=7;for(const x of n)p=(p*31+x.charCodeAt(0))%9973;return Array.from({length:34},(x,y)=>6+p*(y+3)*7%19)},[n]);C.useEffect(()=>{const p=s.current;if(!p)return;const x=()=>l({at:p.currentTime,length:Number.isFinite(p.duration)?p.duration:0}),y=()=>i(!1);return p.addEventListener("timeupdate",x),p.addEventListener("loadedmetadata",x),p.addEventListener("ended",y),()=>{p.removeEventListener("timeupdate",x),p.removeEventListener("loadedmetadata",x),p.removeEventListener("ended",y)}},[]);const u=()=>{const p=s.current;p&&(r?p.pause():p.play().catch(()=>i(!1)),i(!r))},h=r||o.at>0?o.at:o.length,m=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:u,"aria-label":r?"Pause the voice note":"Play the voice note",children:r?t.jsx(al,{size:15,fill:"currentColor"}):t.jsx(gn,{size:15,fill:"currentColor"})}),t.jsx("div",{className:"cwave","aria-hidden":"true",children:d.map((p,x)=>t.jsx("i",{style:{height:p},className:x/d.length<m?"on":""},x))}),t.jsx("span",{className:"cvt",children:lI(h)}),t.jsx("audio",{ref:s,src:En(e,n),preload:"metadata"})]}),t.jsx(Xb,{ticket:e,file:n})]})}function lI(e){const n=Math.max(0,Math.round(e));return`${Math.floor(n/60)}:${String(n%60).padStart(2,"0")}`}function i1({doc:e,onClose:n}){const{toast:s}=qe(),r=En(e.ticket,e.file),i=we({queryKey:["doc",e.ticket,e.file],queryFn:async()=>{const d=await fetch(r);if(!d.ok)throw new Error("The file could not be read.");return d.text()},enabled:e.kind==="md"}),o=Zb(e.file),l=()=>void navigator.clipboard?.writeText(i.data??"").then(()=>s("Document copied"));return t.jsxs("section",{className:"cdoc","aria-label":Hs(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:Hs(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:l,disabled:!i.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(Ve,{size:16})})]}),e.kind==="md"?t.jsx("div",{className:"cdoc-b",children:i.isError?t.jsx("p",{className:"note",children:"The file could not be read."}):i.data?t.jsx(aa,{text:i.data,ticket:e.ticket}):t.jsx("p",{className:"note",children:"Loading…"})}):t.jsx("iframe",{className:"cdoc-pdf",src:r,title:Hs(e.file)})]})}function Jb(e){const n=[],s=new Map;for(const{at:r,update:i}of e)switch(i.sessionUpdate){case"user_message_chunk":{const o=i.content.type==="text"&&i.content._meta?.squadKit?.from==="claude-code"?"claude-code":"squad-kit";n.push({kind:"message",from:o,content:i.content,at:r});break}case"agent_message_chunk":n.push({kind:"message",from:"agent",content:i.content,at:r});break;case"agent_thought_chunk":n.push({kind:"message",from:"thought",content:i.content,at:r});break;case"plan":n.push({kind:"plan",entries:i.entries,at:r});break;case"tool_call":{const o={kind:"tool",id:i.toolCallId,title:i.title,toolKind:i.kind??"other",status:i.status??"in_progress",content:[...i.content??[]],command:i.rawInput?.command,at:r};s.set(i.toolCallId,o),n.push(o);break}case"tool_call_update":{const o=s.get(i.toolCallId);if(!o)break;i.status&&(o.status=i.status),i.title&&(o.title=i.title),i.kind&&(o.toolKind=i.kind),i.rawInput?.command&&(o.command=i.rawInput.command),i.content&&(o.content=[...i.content]),i._meta?.squadKit?.blocked?.length&&(o.blocked=i._meta.squadKit.blocked);break}}for(const r of s.values())fI(r);return n}const cI=/^(StructuredOutput|Gave squad-kit its answer|Handed in its answer)$/,dI=/^structured output provided successfully\.?$/i,W2=/User refused permission to run tool|^Permission denied: |haven't granted it yet/i;function Fp(e){return e.type==="content"&&e.content.type==="text"?e.content.text.trim():""}function uI(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 hI={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 pI(e){const n=e.trim(),s=hI[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 fI(e){if(e.toolKind==="execute"&&e.command&&e.title.trim()===e.command.trim()&&(e.title=`Ran ${e.command.split(`
|
|
657
|
-
`)[0].slice(0,80)}`),cI.test(e.title)){e.answer=!0,e.title="Handed in its answer",e.content=e.content.filter(s=>!dI.test(Fp(s)));return}if(e.status==="failed"&&e.content.some(s=>W2.test(Fp(s)))){e.skipped=!0,e.detail=e.title,e.title=uI(e.toolKind),e.content=e.content.filter(s=>!W2.test(Fp(s)));return}const n=pI(e.title);n&&(e.title=n)}function va(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 ci(e){const n=e.page?.trim()??"";if(!n)return"";const s=n.replace(/^[a-z]+:\/\/[^/]+/i,"");return s.startsWith("/")?s:`/${s}`}function $d(e){return[...new Set([e,...e.more??[]].map(ci).filter(Boolean))]}function mI(e){return[...new Set((e.proof??[]).flatMap($d))]}const gI={analyst:"intake",builder:"build",tester:"tester"},xI=new Set(["implement","test","review","release","done"]),yI="Next in line";function jI(e,n=!0){const s=e.proof?.length?"tester":e.sessions?.build||xI.has(e.stage)?"builder":"analyst";return s==="analyst"||!n||e.sessions?.[gI[s]]?s:"analyst"}function ew(e){return!e.waiting&&(e.status??"").startsWith(yI)}function kI(e){return!!(e.live||e.squad)&&!e.waiting&&!e.takenOver&&!ew(e)}const vI={architect:"Architect",builder:"Builder",reviewer:"Reviewer"},bI={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 wI(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?.free)return`${n} is in a conversation outside squad-kit, and the squad waits until it comes back`;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 va(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?vI[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`:ew(e)?`${n} waits in the queue`:e.live||e.squad?`${n} ${bI[e.stage]}`:e.stage==="tickets"||e.stage==="bugs"?`${n} has not started yet`:`${n} is not running right now`}const tw="squad.draft.",NI=720*60*60*1e3,oa=new Map;function yl(){try{return window.localStorage}catch{return null}}function la(e,n,s){return`${tw}${e??"app"}.${n}.${s}`}function SI(e,n){const s=oa.get(e);if(s!==void 0)return s;try{return n?.getItem(e)??null}catch{return null}}function Wo(e,n=yl(),s=Date.now()){const r=SI(e,n);if(r)try{const{v:i,at:o}=JSON.parse(r);return s-o>NI?void 0:i}catch{return}}function a1(e,n,s=yl(),r=Date.now()){const i=JSON.stringify({v:n,at:r});try{if(!s)throw new Error("no storage");s.setItem(e,i),oa.delete(e)}catch{oa.set(e,i)}}function Uo(e,n=yl()){oa.delete(e);try{n?.removeItem(e)}catch{}}function U2(e,n,s=yl()){const r=la(e,n,"");for(const i of[...oa.keys()])i.startsWith(r)&&oa.delete(i);if(s)try{const i=[];for(let o=0;o<s.length;o+=1){const l=s.key(o);l?.startsWith(r)&&i.push(l)}for(const o of i)s.removeItem(o)}catch{}}function CI(e=yl(),n=Date.now()){if(e)try{const s=[];for(let r=0;r<e.length;r+=1){const i=e.key(r);i?.startsWith(tw)&&Wo(i,e,n)===void 0&&s.push(i)}for(const r of s)e.removeItem(r)}catch{}}function H2(e,n,s){const r=la(Ct,e,n),i=Wo(r);if(i)return i;const o=s();return a1(r,o),o}function $e(e,n,s){const r=la(Ct,e,n),i=C.useRef(JSON.stringify(s)),[o,l]=C.useState(()=>Wo(r)??s),d=C.useRef(r);d.current!==r&&(d.current=r,i.current=JSON.stringify(s),l(Wo(r)??s)),C.useEffect(()=>{JSON.stringify(o)===i.current?Uo(r):a1(r,o)},[r,o]);const u=C.useCallback(()=>{Uo(r),l(s)},[r]);return[o,l,u]}function jl(e){return e.owner?.trim()||e.createdBy}function Td(e,n){return!!e?.trim()&&e.trim().toLowerCase()===n?.trim().toLowerCase()}function ba(){const e=Ue();return e.data?.ready?e.data.meta.user?.name:void 0}function Tn(e,n){return Td(jl(e),n)}function $I(e,n){return Tn(e,n)&&!e.takenOver&&e.stage!=="release"&&e.stage!=="done"}function TI({t:e,onClose:n}){const s=oe(),r=oe(),i=Ue(),o=ba(),[l,d,u]=$e(e.id,"hand-over-to",""),[h,m,p]=$e(e.id,"hand-over-note",""),x=i.data?.ready?i.data.meta.engine==="live":!0;e.branch??`${e.id.toLowerCase()}`;const y=!!(e.live||e.squad||e.stopRequested),j=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,k=C.useMemo(()=>{const S=new Map;for(const T of i.data?.ready?i.data.tickets:[])for(const A of[jl(T),T.createdBy,T.specApproved?.by,T.handedOver?.from,T.handedOver?.to,...(T.notes??[]).map(D=>D.by)])A?.trim()&&!Td(A,o)&&S.set(A.trim().toLowerCase(),A.trim());return[...S.values()].slice(0,8)},[i.data,o]),b=l.trim()||"them",w=()=>l.trim()&&s.mutate({path:`/api/v1/tickets/${e.id}/hand-over`,body:{to:l,note:h},done:`Handed ${e.id} over to ${l.trim()}. Their squad carries on from the saved work.`},{onSuccess:()=>{u(),p(),n()}});return t.jsxs(We,{title:`Hand over ${e.id}`,onClose:n,icon:t.jsx("span",{className:"glyph",children:t.jsx(gd,{size:15})}),footer:t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"btn pri",disabled:!l.trim()||!!j||s.isPending,onClick:w,children:[t.jsx(gd,{size:15})," ",s.isPending?"Pushing…":"Hand over"]}),t.jsx("button",{className:"btn",onClick:n,children:"Cancel"}),t.jsx("span",{className:"grow"}),t.jsx(te,{text:`squad hand-over ${e.id} ${l.trim()?gi(l.trim()):"Name"}${h.trim()?` --note ${Le(h.trim())}`:""}`})]}),children:[t.jsx("p",{children:"Give this ticket to a teammate. Their squad carries on where it is now."}),j&&t.jsxs("div",{className:"stuckbox",style:{marginBottom:14,display:"flex",gap:10,alignItems:"center"},children:[t.jsx("span",{style:{flex:1},children:j}),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(Qn,{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,dir:ge(l),value:l,placeholder:"Their name, as their board shows it",onChange:S=>d(S.target.value),onKeyDown:S=>S.key==="Enter"&&!j&&!s.isPending&&w()}),k.length>0&&t.jsx("div",{className:"pills",style:{marginTop:8},children:k.map(S=>t.jsxs("button",{className:`pill click ${Td(S,l)?"on":""}`,onClick:()=>d(S),children:[t.jsx(vm,{size:12})," ",S]},S))})]}),t.jsxs("div",{className:"field",children:[t.jsxs("label",{htmlFor:"handover-note",children:["A note for ",b," (optional)"]}),t.jsx("textarea",{id:"handover-note",className:"input",rows:2,dir:ge(h),value:h,placeholder:"Where you got to, and anything to watch out for. Every agent reads it too.",onChange:S=>m(S.target.value)})]}),t.jsx("div",{className:"lbl",children:"What happens"}),t.jsxs("ul",{className:"brief",children:[x?t.jsxs(t.Fragment,{children:[t.jsx("li",{children:"squad-kit saves the work so far and the ticket's documents, and sends them to your team's shared copy of the code."}),t.jsxs("li",{children:[b==="them"?"They become":`${b} becomes`," the owner. Their squad makes its copy of the code from that, and the Builder starts a fresh chat from the spec, the design and the code."]})]}):t.jsxs("li",{children:[b==="them"?"They become":`${b} 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 EI({t:e}){const n=ba(),s=e.handedOver;return!s||!Td(s.to,n)||!Tn(e,n)?null:t.jsxs("div",{className:"calm",style:{flex:"none",margin:"16px 28px 0"},children:[t.jsx("span",{className:"ring",children:t.jsx(gd,{size:16})}),t.jsxs("div",{children:[t.jsxs("b",{children:[s.from," handed this ticket to you ",Je(s.at)]}),t.jsxs("span",{children:["The spec, the design, the notes and the code came with it. 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 AI({t:e}){const n=jl(e),s=e.handedOver,r=oe(),[i,o]=C.useState(!1),[l,d,u]=$e(e.id,"take-back","");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(vm,{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} ${Je(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."]})]}),i?t.jsxs("div",{className:"df",children:[t.jsx("input",{className:"input",style:{flex:1},autoFocus:!0,dir:ge(l),value:l,onChange:h=>d(h.target.value),placeholder:`Why you take it from ${n}, for example: the name was misspelled`}),t.jsx("button",{className:"btn pri",disabled:!l.trim()||r.isPending,onClick:()=>r.mutate({path:`/api/v1/tickets/${e.id}/take-back`,body:{reason:l},done:`${e.id} is yours now. The reason stays on the ticket.`},{onSuccess:u}),children:"Take it"}),t.jsx("button",{className:"btn",onClick:()=>o(!1),children:"Cancel"}),t.jsx(te,{text:`squad take-back ${e.id} --reason ${Le(l.trim()||"…")}`})]}):t.jsxs("div",{className:"df",children:[e.stage!=="done"&&t.jsxs("button",{className:"btn quiet",title:`When ${n} cannot work on it: the name was misspelled, or they left. If ${n} is working on it, talk to them first.`,onClick:()=>o(!0),children:[n," cannot work on it? Take it"]}),t.jsx("span",{className:"grow"}),t.jsx(te,{text:`squad show ${e.id}`})]})]})}function PI(e,n,s){return s&&(!n||Tn(e,n))&&!e.takenOver&&!e.deleting&&!e.archived&&e.stage!=="release"&&e.stage!=="done"&&!(e.chat?.open&&!e.chat.beside)}async function o1(e){try{return await navigator.clipboard.writeText(e),!0}catch{return!1}}function l1({prompt:e,inClipboard:n}){return t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"note",role:"status",children:n?"Copied. Paste it in a conversation in any AI tool.":"Select these words, copy them, and paste them in a conversation in any AI tool."}),t.jsx("textarea",{className:"waynote prompt-box",rows:9,readOnly:!0,value:e,"aria-label":"The prompt",onFocus:s=>s.target.select()})]})}const nw=["What you spend there is yours: squad-kit does not count it.","squad-kit's guard and limits do not apply there.","When it comes back it keeps a label on its record. You can ask squad-kit to check the work."];function RI({t:e,onClose:n}){const s=oe(),r=oe(),[i,o]=C.useState(null),l=!i&&!!(e.live||e.squad||e.stopRequested),d=()=>s.mutate({path:`/api/v1/tickets/${e.id}/outside`},{onSuccess:async u=>o({prompt:u.prompt,inClipboard:await o1(u.prompt)})});return t.jsx(We,{title:`Work on ${e.id} in another AI tool`,onClose:n,icon:t.jsx("span",{className:"glyph",children:t.jsx(sa,{size:15})}),footer:i?t.jsx("button",{className:"btn pri",onClick:n,children:"Done"}):t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"btn pri",disabled:s.isPending||l,onClick:d,children:[t.jsx(Xn,{size:15})," ",s.isPending?"Getting it ready…":"Copy prompt"]}),l&&t.jsxs("button",{className:"btn",disabled:r.isPending||e.stopRequested,onClick:()=>r.mutate({path:`/api/v1/tickets/${e.id}/stop`,done:"Stopping the squad"}),children:[t.jsx(Qn,{size:13})," ",e.stopRequested?"Stopping…":"Stop"]}),t.jsx("button",{className:"btn",onClick:n,children:"Cancel"}),t.jsx("span",{className:"grow"}),t.jsx(te,{text:`squad outside start ${e.id}`})]}),children:i?t.jsx(l1,{prompt:i.prompt,inClipboard:i.inClipboard}):t.jsxs(t.Fragment,{children:[t.jsx("p",{children:"Paste the prompt in a conversation in any AI tool. It goes on from where this story is now, by this project's own structure, and this page shows it at its real step."}),t.jsx("p",{className:"note",children:l?"The squad is working on it right now. Press Stop first, or wait until it needs you.":"The squad keeps off this story until you bring it back."}),t.jsx("ul",{className:"note",children:nw.map(u=>t.jsx("li",{children:u},u))})]})})}function II(){const e=Ue(),[n,s]=C.useState(null),[r,i]=C.useState("");if(!(e.data?.ready&&e.data.meta.engine==="live"))return null;const o=async()=>{i("");try{const{prompt:l}=await ke("/api/v1/outside-prompt");s({prompt:l,inClipboard:await o1(l)})}catch(l){i(l instanceof Error?l.message:String(l))}};return t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"btn",onClick:()=>void o(),title:"Copy a prompt, and start this story in a conversation in any AI tool",children:[t.jsx(sa,{size:15})," Start in another AI tool"]}),r&&t.jsx("span",{className:"note",role:"alert",children:r}),n&&t.jsxs(We,{title:"Start a story in another AI tool",onClose:()=>s(null),icon:t.jsx("span",{className:"glyph",children:t.jsx(sa,{size:15})}),footer:t.jsx("button",{className:"btn pri",onClick:()=>s(null),children:"Done"}),children:[t.jsx(l1,{prompt:n.prompt,inClipboard:n.inClipboard}),t.jsx("ul",{className:"note",children:nw.map(l=>t.jsx("li",{children:l},l))})]})]})}function FI({t:e,extra:n}){const s=oe(),[r,i]=C.useState(null),[o,l]=C.useState(""),d=async()=>{l("");try{const{prompt:u}=await ke(`/api/v1/tickets/${e.id}/outside-prompt`);i({prompt:u,inClipboard:await o1(u)})}catch(u){l(u instanceof Error?u.message:String(u))}};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(sa,{size:15})}),t.jsxs("div",{children:[t.jsx("b",{children:"In a conversation outside squad-kit"}),t.jsx("span",{children:"The squad waits. This page reads the story's files, so it shows the real step."})]})]}),t.jsx("p",{className:"note",style:{fontSize:12.5,marginTop:8},children:"When you are done, bring it back. It comes back at its real step: with code, you can check it and accept it here. With only a spec or a design, you approve that and the squad carries on. If nothing changed, it is as it was."}),o&&t.jsx("p",{className:"note",role:"alert",children:o}),r&&t.jsx(l1,{prompt:r.prompt,inClipboard:r.inClipboard}),n]}),t.jsxs("div",{className:"df",children:[t.jsxs("button",{className:"btn pri",disabled:s.isPending,onClick:()=>s.mutate({path:`/api/v1/tickets/${e.id}/bring-back`,done:`${e.id} is back on the board.`}),children:[t.jsx(Yk,{size:15})," ",s.isPending?"Looking at the work…":"Bring it back"]}),t.jsxs("button",{className:"btn",onClick:()=>void d(),children:[t.jsx(Xn,{size:15})," Copy prompt"]}),t.jsx("span",{className:"grow"}),t.jsx(te,{text:`squad outside back ${e.id}`})]})]})}function sw(e){return e.from?`Continued outside from ${e.from}`:"Worked outside squad-kit"}const zI="squad-kit trusts only what it ran itself. This story was worked on in a conversation outside it.";function qI({t:e}){const n=oe(),s=e.outside;if(!s)return null;const r=!s.checked&&!e.takenOver&&e.stage!=="release"&&e.stage!=="done"&&va(e);return t.jsxs("span",{className:"outlabel",children:[t.jsx("span",{className:"prio outside",title:zI,children:sw(s)}),s.checked&&!e.takenOver?t.jsxs("span",{className:"prio outside checked",title:s.checked.noTests?"squad-kit's checks ran, but the project has no tests. The review and the proof passed.":"squad-kit's own checks, review and proof passed.",children:[t.jsx(fe,{size:11,strokeWidth:3})," ",s.checked.noTests?"Checked, no tests ran":"Checked"]}):r?t.jsx("button",{className:"btn sm tiny",disabled:n.isPending,title:"squad-kit runs its own checks, review and proof on this work. They use AI, like on any story.",onClick:()=>n.mutate({path:`/api/v1/tickets/${e.id}/check-outside`,done:"squad-kit is checking the work."}),children:"Check"}):null]})}function LI({t:e}){if(!e.outside&&!e.takenOver?.free)return null;const n=!!e.outside?.checked&&!e.takenOver,s=e.takenOver?.free?"In a conversation outside squad-kit":sw(e.outside);return t.jsx("span",{className:`prio outside${n?" checked":""}`,title:s,children:n?"Outside, checked":"Outside"})}function MI(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"||r==="skip-hooks"?"reason":r==="yourself"?"fix":null,primary:s===0}})}function OI(e){return e?.title??"The squad stopped and needs you"}const V2={cursor:"Cursor",code:"VS Code"};function eu({t:e}){const n=oe(),r=we({queryKey:["editors"],queryFn:()=>ke("/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?V2[r]:"your editor"}`}),children:[t.jsx(Kn,{size:13})," Open in ",r?V2[r]:"editor"]})}function _I({t:e}){const n=we({queryKey:["changes",e.id,e.activity.length],queryFn:()=>ke(`/api/v1/tickets/${e.id}/changes`),refetchInterval:e.live?1e4:!1}),s=n.data,r=s?.files.reduce((o,l)=>o+l.added,0)??0,i=s?.files.reduce((o,l)=>o+l.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:["−",i]})]}):t.jsx("b",{children:"Changes"}),t.jsx("p",{className:"note",children:s?.from==="branch"?"Read from its saved work. 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(eu,{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(DI,{f:o},o.path)),t.jsxs("div",{className:"pills",style:{marginTop:12},children:[t.jsx(te,{text:`squad changes ${e.id} --full`}),t.jsx(te,{text:`squad open ${e.id}`})]})]})}function DI({f:e}){const n=e.patch?e.patch.split(`
|
|
658
|
-
`):[],[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((i,o)=>i.startsWith("@@")?t.jsx("div",{className:"gap",children:i.replace(/^(@@[^@]*@@).*/,"$1")},o):t.jsxs("div",{className:i.startsWith("+")?"add":i.startsWith("-")?"del":"same",children:[t.jsx("span",{className:"sign",children:i.startsWith("+")?"+":i.startsWith("-")?"−":" "}),i.slice(1)||" "]},o))})]})}function tu({ticket:e,app:n,small:s,label:r="Report a problem"}){return t.jsxs("button",{className:`btn ${s?"sm":""}`,onClick:()=>ll.open({...e?{ticket:e}:{},...n?{app:n}:{}}),children:[t.jsx(ym,{size:s?13:14})," ",r]})}function BI(){const e=L7();return e?t.jsx(UI,{ask:e,onClose:ll.close},`${e.ticket??""}${e.app?"app":""}`):null}function WI(e){return/[\\/]Downloads$/.test(e)?" in your Downloads folder":""}function UI({ask:e,onClose:n}){const{toast:s}=qe(),[r,i]=C.useState(null),[o,l]=C.useState(null),[d,u]=C.useState(""),[h,m]=C.useState(!1),[p,x]=C.useState(null),y=e.app?null:Ct,j=new URLSearchParams({...y?{project:y}:{},...y&&e.ticket?{ticket:e.ticket}:{}}).toString();C.useEffect(()=>{let w=!0;return ke(`/api/v1/app/report${j?`?${j}`:""}`).then(S=>w&&i(S)).catch(S=>w&&l(S.message)),()=>{w=!1}},[j]);const k=async()=>{m(!0),l(null);try{x(await ot("/api/v1/app/report","POST",{...y?{project:y}:{},...y&&e.ticket?{ticket:e.ticket}:{},...d.trim()?{note:d}:{}}))}catch(w){l(w instanceof Error?w.message:String(w))}finally{m(!1)}},b=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 p?.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(fe,{size:15,strokeWidth:2.5})," Done"]}),t.jsxs("button",{className:"btn",onClick:()=>b(p.file),children:[t.jsx(Xn,{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(fe,{size:16,strokeWidth:2.6})}),t.jsxs("div",{children:[t.jsxs("b",{children:["Saved ",p.name,WI(p.folder)]}),t.jsx("span",{className:"mono",children:p.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||h,onClick:()=>void k(),children:[h?t.jsx(st,{size:15,className:"spin"}):t.jsx(ym,{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(te,{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(fe,{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,dir:ge(d),value:d,onChange:w=>u(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 HI(){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(tu,{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(te,{text:"squad report"}),t.jsx(te,{text:"squad logs"})]})]})}const qf=/^[A-Z][A-Z0-9]*-\d+$/;function VI(e){return e.length<=1?e[0]??"":`${e.slice(0,-1).join(", ")} and ${e[e.length-1]}`}const Dc=(e,n,s=`${n}s`)=>`${e} ${e===1?n:s}`,KI=e=>e===1?"once":e===2?"twice":`${e} times`;function YI(e){const n=new Set;let s=0,r=0,i=0,o=0,l=!1,d=!1,u=!1,h=!1,m=!1,p=!1,x=!1,y=!1;for(const S of e){const T=S.text;if(S.kind==="code")/^Searched the code|^Looked for files/.test(T)?i++:/^Looked at the code's history/.test(T)?p=!0:/^Read (?!a file outside)/.test(T)?n.add(T.slice(5)):/^Ran a read command/.test(T)?n.add(T):/^Looked in /.test(T)&&i++;else if(S.kind==="story")/^Read decision|^Read the decisions/.test(T)?r++:s++;else if(S.kind==="board")l=!0;else if(S.kind==="log")d=!0;else if(S.kind==="guide")u=!0;else if(S.kind==="notes"&&/^Found it in/.test(T))m=!0;else if(S.kind==="notes"&&!/^Saved what it learned/.test(T))h=!0;else if(S.kind==="app"){x=!0;const A=/^Took (a|\d+) pictures?/.exec(T);A&&(o+=A[1]==="a"?1:Number(A[1]))}else S.kind==="refused"&&(y=!0)}const j=[...s?[Dc(s,"story","stories")]:[],...r?[Dc(r,"decision")]:[],...n.size?[Dc(n.size,"file")]:[],...l?["the board"]:[],...d?["squad-kit's log"]:[],...u?["squad-kit's guide"]:[],...h?["its notes"]:[]],k=[...m?["found it in squad-kit's notes"]:[],...j.length?[`read ${VI(j)}`]:[],...i?[`searched the code ${KI(i)}`]:[],...p?["looked at the code's history"]:[]],b=o?`took ${Dc(o,"picture")} in its own copy of the app`:x?"looked at the app in its own copy":"";let w=k.length>1?`${k.slice(0,-1).join(", ")}, ${k[k.length-1]}`:k[0]??"";return b&&(w=w?`${w}, then ${b}`:b),y&&(w=w?`${w}. squad-kit refused part of the ask`:"squad-kit refused the ask itself"),w&&!w.startsWith("squad-kit")?w[0].toUpperCase()+w.slice(1):w}function c1(e){const n=Math.max(0,Math.round(e));if(n<60)return`${n} s`;const s=Math.floor(n/60);return n%60?`${s} min ${n%60} s`:`${s} min`}function Tr(e){return e<.005?"under $0.01":`$${e.toFixed(2)}`}function GI(e,n){const s=e.trim(),r=n.trim();return!r||r===s?"":r.startsWith(s)?r.slice(s.length).trim():r}function QI(e){switch(e.answer?.by){case"note":return"From squad-kit's notes, at once. No cost.";case"record":return"From the story's live record, at once. No cost.";case"refusal":case"limit":return"squad-kit answered this itself. No cost."}return[...e.seconds!==void 0?[c1(e.seconds)]:[],e.costUsd!==void 0?Tr(e.costUsd):"cost not reported"].join(" · ")}const ZI={slow:"taking longer than usual",stuck:"looks stuck",waiting:"waits for you",error:"stopped"};function rw(e){switch(e.from){case"app":return`From ${e.app??"your app"}, on ${e.path==="/"?"its first page":e.path}`;case"story":return`About ${e.story}`;case"problem":return e.story?`About ${e.story}: it ${ZI[e.problem]}`:"About an error on the board";default:return e.page?`From the board, on ${e.page}`:"From the board"}}function XI(e){const n=rw(e);return`Asked ${n[0].toLowerCase()}${n.slice(1)}`}function d1(e,n){switch(e){case"slow":return`Why is ${n} taking longer than usual?`;case"stuck":return`Why does ${n} look stuck, and what should I do?`;case"waiting":return`What does ${n} need from me, and what do you recommend?`;case"error":return`Why did ${n} stop, and what should I do?`}}const JI={overview:"Overview",requirements:"Requirements",board:"Board",backlog:"Backlog",inbox:"Waiting for you",conversations:"Conversations",releases:"Releases",architecture:"Architecture",bugs:"Bugs",harness:"Harness",tools:"Tools",settings:"Settings",lead:"Squad lead"};function eF(e,n={}){const s=typeof n.ticket=="string"&&qf.test(n.ticket)?n.ticket:void 0,r=/^\/tickets\/([^/]+)\/proof/.exec(e)?.[1],i=s??(r&&qf.test(decodeURIComponent(r))?decodeURIComponent(r):void 0);if(i)return{from:"story",story:i};const o=JI[e.split("/")[1]??""];return o?{from:"board",page:o}:{from:"board"}}function tF(e){if(!e)return"/";try{return new URL(e).pathname||"/"}catch{return"/"}}function iw(e){const n=/^\/tickets\/([^/?#]+)\/proof/.exec(e)?.[1];if(n)return{to:"/tickets/$id/proof",id:decodeURIComponent(n)};const s=/^\/board\?(?:.*&)?ticket=([^&#]+)/.exec(e)?.[1],r=/^\/board\?(?:.*&)?tab=(story|plan|proof)(?:[&#]|$)/.exec(e)?.[1];return s?{to:"/board",ticket:decodeURIComponent(s),...r?{tab:r}:{}}:null}function nF(e){return e.kind==="story"&&qf.test(e.ref)?{to:"/board",ticket:e.ref}:e.kind==="decision"?{to:"/architecture",adr:e.ref}:e.kind==="release"?{to:"/releases"}:null}function sF(e){return e.split("/").pop()??e}const zp={screen:"Screen",api:"API",data:"Data",test:"Test"};function rF(e){return e.level===1?"On its own":"Needs your OK"}function aw(e){return e.kind==="board_action"&&!!e.allowAlways&&["more_time","pictures_again","start_app","morning_brief"].includes(e.action)}function K2(e){switch(e.kind){case"proof":return"Open the proof";case"spec":return"Review the spec";case"plan":return"Review the plan";case"questions":case"ask":return"Answer";default:return"Open it"}}function Y2(e){return e.kind==="slow"?"slow":e.kind==="looks-stuck"?"stuck":e.kind==="stuck"?"error":"waiting"}function iF(e){const n=e.apps?.[0],s=e.squadNow?.find(l=>l.slow)?.story??e.needsYou?.find(l=>l.kind==="slow"||l.kind==="looks-stuck")?.story,r=e.needsYou?.find(l=>l.kind==="stuck")?.story,i=e.squadNow?.[0]?.story,o=s?`Why is ${s} slow?`:r?`Why did ${r} stop?`:i?`What is ${i} doing now?`:"Which story added the sign-in page?";return[n?`How do I sign in to ${n}?`:"How do I sign in to the app?",o,"What's left before the release?"]}const Lf=new Set;let Ho={open:!1,text:"",context:null,conversation:null,n:0};function qp(e){Ho={...Ho,...e};for(const n of Lf)n()}const Hn={get:()=>Ho,open:e=>qp({open:!0,text:e.text??"",context:e.context,conversation:null,n:Ho.n+1}),close:()=>qp({open:!1}),sent:e=>qp({conversation:e})};function aF(){return C.useSyncExternalStore(e=>(Lf.add(e),()=>Lf.delete(e)),()=>Ho)}function nu({size:e=16,className:n}){return t.jsxs("svg",{className:`lucide ${n??""}`,width:e,height:e,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[t.jsx("circle",{cx:"3.5",cy:"12",r:"1.7",fill:"currentColor",fillOpacity:"0.35"}),t.jsx("circle",{cx:"8",cy:"12",r:"1.7",fill:"currentColor",fillOpacity:"0.65"}),t.jsx("circle",{cx:"12.5",cy:"12",r:"1.7",fill:"currentColor"}),t.jsx("path",{d:"M16 6.5 21.5 12 16 17.5",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})]})}function u1({title:e,what:n,safe:s=[],ways:r,report:i,hint:o,calm:l,children:d}){return t.jsxs("div",{className:`drafterr errcard${l?" 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(u=>t.jsxs("li",{children:[t.jsx(fe,{size:15,strokeWidth:2.6,"aria-hidden":"true"}),u]},u))}),t.jsx("div",{className:"errcard-lbl",children:"What you can do"}),t.jsxs("div",{className:"drafterr-ways",children:[r.map(u=>t.jsxs("button",{className:`btn ${u.primary?"pri":""}`,disabled:u.disabled,title:u.title,onClick:u.onClick,children:[u.icon,u.label]},u.label)),i!==!1&&t.jsx(tu,{...i??{}})]}),o&&t.jsx("div",{className:"errcard-hint",children:o}),d]})}function oF({t:e,extra:n}){const s=oe(),[r,i,o]=$e(e.id,"stuck-open",null),[l,d,u]=$e(e.id,"stuck-text",""),h=MI(e.stuck),m=(w,S,T)=>s.mutate({path:`/api/v1/tickets/${e.id}/decide`,body:{choice:w,...S},done:T},{onSuccess:()=>{o(),u()}}),p=h.find(w=>w.way==="retry"),x=r==="reason"||r==="fix"?h.find(w=>w.needs===r):void 0,y=r==="note"&&l.trim()?l.trim():"",j=h.map(w=>({label:w.label,title:w.note,primary:w.primary,disabled:s.isPending,icon:w.way==="retry"?t.jsx(oi,{size:14}):w.way==="yourself"?t.jsx(qo,{size:14}):void 0,onClick:()=>{if(w.needs){i(r===w.needs?null:w.needs),d("");return}m(w.index,w.way==="retry"&&y?{note:y}:{},w.way==="retry"?"Trying again. The squad carries on.":"Decided. The squad carries on.")}})),k=e.stuck?.title??e.stuck?.question;j.push({label:"Ask the lead",title:"It reads what happened and tells you, in plain words. It changes nothing.",icon:t.jsx(nu,{size:14}),onClick:()=>Hn.open({text:d1("error",e.id),context:{from:"problem",problem:"error",story:e.id,...k?{error:k.slice(0,400)}:{}}})});const b=x?`squad decide ${e.id} ${x.index+1}${x.needs==="reason"?` --reason ${Le(l.trim()||"…")}`:""}`:`squad decide ${e.id}${p&&y?` ${p.index+1} --note ${Le(y)}`:""}`;return t.jsxs("div",{className:"db",children:[t.jsx(u1,{title:OI(e.stuck),calm:e.stuck?.kind==="no-tests"||e.stuck?.gate==="cap",what:e.stuck?.points?.length?t.jsxs(t.Fragment,{children:[t.jsx(L,{as:"div",text:e.stuck.question}),t.jsx("ul",{className:"errcard-points",children:e.stuck.points.map(w=>t.jsx(L,{as:"li",text:w},w))})]}):t.jsx(L,{as:"div",text:e.stuck?.question??""}),safe:e.stuck?.safe??["Nothing was lost: the work so far is kept."],ways:j,report:{ticket:e.id},hint:t.jsxs(t.Fragment,{children:[p&&r!=="note"&&t.jsx("button",{className:"linkbtn",onClick:()=>i("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,dir:ge(l),value:l,onChange:w=>d(w.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"&&x&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"lbl",children:x.way==="skip-hooks"?"Why save it without the check?":"Why continue anyway?"}),t.jsx("textarea",{className:"waynote",rows:2,dir:ge(l),value:l,onChange:w=>d(w.target.value),placeholder:x.way==="skip-hooks"?"For example: the check needs a licence this laptop does not have":"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:!l.trim()||s.isPending,onClick:()=>m(x.index,{reason:l},"Decided. The squad carries on."),children:[t.jsx(fe,{size:15,strokeWidth:2.5})," ",x.label]})})]}),r==="fix"&&x&&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(eu,{t:e}),t.jsxs("button",{className:"btn pri",disabled:s.isPending,onClick:()=>m(x.index,{},"OK. The checks run again on your fix."),children:[t.jsx(fe,{size:15,strokeWidth:2.5})," I fixed it, check again"]})]})]}),t.jsx("div",{className:"errcard-cmd",children:t.jsx(te,{text:b})}),n]})}function lF({t:e}){const{toast:n}=qe();if(!e.stuck||e.waiting?.kind!=="stuck")return null;const s=e.stuck.detail??e.stuck.question,r=()=>{const i=navigator.clipboard?.writeText(s);if(!i)return n("Could not copy. Select the text instead.","err");i.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(Xn,{size:13})," Copy"]}),t.jsx(tu,{ticket:e.id,small:!0}),t.jsx(te,{text:"squad logs --tail"})]})]})}const G2=10*1024*1024;function kl(e){return new Promise((n,s)=>{const r=new FileReader;r.onload=()=>{const i=String(r.result);n({name:e.name,size:e.size,data:i.slice(i.indexOf(",")+1),...e.type.startsWith("image/")?{preview:i}:{}})},r.onerror=()=>s(new Error(`Could not read ${e.name}`)),r.readAsDataURL(e)})}function cF(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}`}:{}}const Nt="new-ticket";function Q2(){return`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}function ow({onClose:e,onCreated:n}){const s=oe(),{toast:r}=qe(),[i,o]=$e(Nt,"mode","write"),[l,d]=$e(Nt,"pasted",""),[u,h]=C.useState(null),[m,p]=C.useState(null),x=u?.status==="working",[y,j]=C.useState(null),[k,b]=$e(Nt,"title",""),[w,S]=$e(Nt,"ask",""),[T,A]=$e(Nt,"kind","feature"),[D,$]=$e(Nt,"priority","normal"),[P,F]=$e(Nt,"track","full"),[_,z]=C.useState(!1),[U,I]=$e(Nt,"new-tests",!0),W=Ue(),M=!!(W.data?.ready&&W.data.meta.alwaysNewTests),G=!U&&!M,[ce,V]=C.useState(null),[Y,se]=$e(Nt,"criteria",[]),[R,B]=$e(Nt,"rules",[]),[J,q]=$e(Nt,"edge-cases",[]),[me,ye]=$e(Nt,"what",""),[Ne,Fe]=$e(Nt,"steps",[]),[Te,ze]=$e(Nt,"expected",""),[Ze,Lt]=$e(Nt,"where",""),[Xt,Fn]=$e(Nt,"severity","annoying"),Rt=T==="bug",[ps,fs]=C.useState(()=>H2(Nt,"create-key",Q2)),zn=C.useRef(!1),[dt,Mt]=C.useState([]),yt=async re=>{const rt=[...re],an=rt.find(Ln=>Ln.size>G2);an&&r(`${an.name} is larger than 10 MB.`,"err");const Ot=await Promise.all(rt.filter(Ln=>Ln.size<=G2).map(kl)).catch(Ln=>(r(Ln.message,"err"),[]));Mt(Ln=>[...Ln,...Ot].slice(0,10))},sn=dt.map(({name:re,data:rt})=>({name:re,data:rt})),ms=re=>{b(re.title),S(re.ask),re.kind==="bug"&&ye(re.ask),A(re.kind),$(re.priority),re.track&&(F(re.track),V(re.track)),se(re.criteria),B(re.rules),q(re.edgeCases),j(re.gaps),o("write")};C.useEffect(()=>{let re=!0;return ke("/api/v1/tickets/draft/current").then(async({draft:rt})=>{if(!(!re||!rt)&&(d(rt.text),o("paste"),h(rt),rt.files.length)){const an=await ke(`/api/v1/tickets/draft/${rt.id}/files`).catch(()=>({files:[]}));re&&Mt(an.files.map((Ot,Ln)=>({...Ot,size:rt.files[Ln]?.size??0,...cF(Ot)})))}}).catch(()=>{}),()=>{re=!1}},[]);const jn=we({queryKey:["ticket-draft",u?.id],queryFn:()=>ke(`/api/v1/tickets/draft/${u.id}`),enabled:x,refetchInterval:1e3,retry:!1});C.useEffect(()=>{jn.data&&u?.status==="working"&&jn.data.id===u.id&&h(jn.data)},[jn.data]),C.useEffect(()=>{jn.isError&&x&&h(re=>re&&{...re,status:"failed",error:"squad-kit lost this draft, maybe because it restarted."})},[jn.isError]);const gs=C.useRef(null);C.useEffect(()=>{u?.status==="done"&&u.draft&&gs.current!==u.id&&(gs.current=u.id,ms(u.draft))},[u]);const Ge=async()=>{p(null);try{h(await ot("/api/v1/tickets/draft","POST",{text:l,files:sn}))}catch(re){p(re instanceof Error?re.message:String(re))}},ee=async()=>{if(u)try{h(await ot(`/api/v1/tickets/draft/${u.id}/cancel`,"POST"))}catch{h({...u,status:"cancelled"})}},ue=()=>{u&&ot(`/api/v1/tickets/draft/${u.id}/dismiss`,"POST").catch(()=>{}),h(null)},Ee=()=>{ue(),p(null),w.trim()||S(l.trim()),me.trim()||ye(l.trim()),o("write")},Me=()=>{ue(),j(null),V(null);for(const re of[b,S,ye,ze,Lt])re("");for(const re of[se,B,q,Fe])re([]);o("paste")},He=()=>{Me(),d(""),Mt([]),o("write"),A("feature"),$("normal"),F("full"),I(!0),Fn("annoying"),U2(Ct,Nt),fs(H2(Nt,"create-key",Q2))},vt=!!(l||k||w||me||Te||Ze||Y.length||R.length||J.length||Ne.length),qn=Ne.filter(re=>re.trim()),rn=[me.trim()&&`What happens:
|
|
659
|
-
${me.trim()}`,qn.length&&`Steps to see it:
|
|
660
|
-
${qn.map((re,rt)=>`${rt+1}. ${re.trim()}`).join(`
|
|
661
|
-
`)}`,Te.trim()&&`What should happen:
|
|
662
|
-
${Te.trim()}`,Ze.trim()&&`Where: ${Ze.trim()}`].filter(Boolean).join(`
|
|
663
|
-
|
|
664
|
-
`),xs=Rt?{title:k,ask:rn,kind:T,severity:Xt,priority:Xt==="stops-work"?"high":Xt==="small"?"low":"normal",track:P,files:sn,talkFirst:_&&P==="full",noNewTests:G,key:ps}:{title:k,ask:w,kind:T,track:P,priority:D,criteria:Y,rules:R,edgeCases:J,files:sn,talkFirst:_&&P==="full",noNewTests:G,key:ps},zs=()=>s.mutate({path:"/api/v1/tickets",body:xs,after:()=>{ue(),U2(Ct,Nt)},done:re=>zn.current?`${re.id} is on the board.`:null},{onSuccess:re=>{n(re),e()}}),bt=()=>{s.isPending&&(zn.current=!0,r("Your ticket is still being made. Closing this does not stop it: it comes onto the board in a moment.")),e()},kn=!!m||u?.status==="failed"||u?.status==="cancelled",Jt=i==="paste"?`squad new --from ${Le(l.trim().split(`
|
|
665
|
-
`)[0]?.slice(0,40)||"your message")}`:[`squad new ${Le(k.trim()||"Your title")}`,Rt?`--bug --severity ${Xt}`:"",Rt&&me.trim()?`--ask ${Le(me.trim())}`:"",P==="express"?"--express":"",_&&P==="full"?"--talk":"",G?"--no-new-tests":"",...Rt?[]:Y.filter(re=>re.trim()).map(re=>`--criteria ${Le(re)}`),...Rt?[]:R.filter(re=>re.trim()).map(re=>`--rule ${Le(re)}`),...Rt?[]:J.filter(re=>re.trim()).map(re=>`--edge ${Le(re)}`),...dt.map(re=>`--attach ${Le(re.name)}`)].filter(Boolean).join(" ");return t.jsxs(We,{title:"New ticket",wide:!0,onClose:bt,losing:dt.length&&!s.isPending?dt.length===1?"the attached file":`the ${dt.length} attached files`:null,icon:t.jsx("span",{className:"glyph",children:t.jsx(xt,{size:15})}),footer:t.jsxs(t.Fragment,{children:[i==="paste"?kn?null:t.jsxs("button",{className:"btn pri",disabled:!l.trim()&&!dt.length||x,onClick:()=>void Ge(),children:[x?t.jsx(st,{size:15,className:"spin"}):t.jsx(ed,{size:15})," ",x?"Filling in…":"Fill in the ticket"]}):t.jsxs("button",{className:"btn pri",disabled:!k.trim()||s.isPending,onClick:zs,children:[t.jsx(xt,{size:15})," Create ticket"]}),t.jsx("button",{className:"btn",onClick:x?()=>void ee():bt,children:s.isPending?"Close":"Cancel"}),vt&&!x&&t.jsx(av,{onClear:He}),!vt&&!x&&t.jsx(II,{}),t.jsx("span",{className:"grow"}),t.jsx(te,{text:Jt})]}),children:[t.jsxs("div",{className:"seg",style:{marginBottom:14,width:"fit-content"},children:[t.jsx("button",{className:i==="write"?"on":"",disabled:x,title:x?"Press Cancel first to write it yourself":void 0,onClick:()=>o("write"),children:"Write it"}),t.jsxs("button",{className:i==="paste"?"on":"",onClick:()=>o("paste"),children:[t.jsx(ed,{size:13,style:{verticalAlign:"-2px",marginRight:5}}),"From an idea or message"]})]}),i==="paste"?t.jsxs(t.Fragment,{children:[!x&&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:x?70:150},autoFocus:!0,readOnly:x,dir:ge(l),value:l,onChange:re=>d(re.target.value),onPaste:re=>{re.clipboardData.files.length&&(re.preventDefault(),yt(re.clipboardData.files))},placeholder:"For example: the manager says clerks should not book more than 3 appointments a day for the same person"})]}),x&&u?t.jsxs(t.Fragment,{children:[dt.length>0&&t.jsxs("p",{className:"note",style:{margin:"-6px 0 12px"},children:["With ",dt.map(re=>re.name).join(", ")]}),t.jsx(hF,{job:u})]}):t.jsx(Mp,{files:dt,onAdd:yt,onRemove:re=>Mt(rt=>rt.filter((an,Ot)=>Ot!==re))}),kn&&t.jsx(pF,{error:m??(u?.status==="failed"?u.error??"Something went wrong.":null),onRetry:()=>void Ge(),onWrite:Ee})]}):t.jsxs(t.Fragment,{children:[y?t.jsxs("div",{className:"drafted",children:[t.jsxs("b",{children:[t.jsx(ed,{size:13})," The Analyst filled this in from your message."]})," Check it and change anything."," ",t.jsx("button",{className:"linkbtn",onClick:Me,children:"Discard this draft"}),y.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:y.map((re,rt)=>t.jsx(L,{as:"li",text:re},rt))})]})]}):t.jsx("p",{children:Rt?"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(re=>t.jsxs("button",{className:`choice ${T===re?"on":""}`,onClick:()=>A(re),children:[t.jsx("span",{className:"rd"}),re==="feature"?"New feature":"Bug"]},re))})]}),t.jsxs("div",{className:"field",children:[t.jsx("label",{htmlFor:"nt-title",children:"Title"}),t.jsx("input",{id:"nt-title",className:"input",autoFocus:!0,dir:ge(k),value:k,onChange:re=>b(re.target.value),placeholder:Rt?"For example: A price written as 1,500 is refused":"For example: Show hearing time in local time"})]}),Rt?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",dir:ge(me),value:me,onChange:re=>ye(re.target.value),placeholder:"For example: the form says the price is not valid."})]}),t.jsx(Bc,{label:"Steps to see it",hint:"One step per line, for example: Open Services and add a service.",items:Ne,onChange:Fe,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",dir:ge(Te),value:Te,onChange:re=>ze(re.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",dir:ge(Ze),value:Ze,onChange:re=>Lt(re.target.value),placeholder:"The page or link, for example: Setup, Services"})]}),t.jsx(Mp,{files:dt,onAdd:yt,onRemove:re=>Mt(rt=>rt.filter((an,Ot)=>Ot!==re))}),t.jsxs("div",{className:"field",children:[t.jsx("label",{children:"How bad is it?"}),t.jsx("div",{className:"sevs",children:lw.map(re=>t.jsxs("button",{className:`choice ${Xt===re.value?"on":""}`,onClick:()=>Fn(re.value),children:[t.jsx("span",{className:"rd"}),re.label]},re.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",dir:ge(w),value:w,onChange:re=>S(re.target.value),placeholder:"Who needs it, and why. One or two sentences is enough."})]}),t.jsx(Bc,{label:"Acceptance criteria",hint:"Each one is something you can check, for example: The clerk sees the time in their own city.",items:Y,onChange:se,add:"Add a criterion"}),t.jsx(Bc,{label:"Business rules",hint:"Limits and who may do what, for example: Only a team lead can reassign a case.",items:R,onChange:B,add:"Add a rule"}),t.jsx(Bc,{label:"Edge cases",hint:"Unusual cases to handle, for example: The person has no cases yet.",items:J,onChange:q,add:"Add an edge case"}),t.jsx(Mp,{files:dt,onAdd:yt,onRemove:re=>Mt(rt=>rt.filter((an,Ot)=>Ot!==re))}),t.jsxs("div",{className:"field",children:[t.jsx("label",{children:"Priority"}),t.jsx("div",{className:"sevs",children:["high","normal","low"].map(re=>t.jsxs("button",{className:`choice ${D===re?"on":""}`,onClick:()=>$(re),children:[t.jsx("span",{className:"rd"}),re==="high"?"High":re==="normal"?"Normal":"Low"]},re))})]})]}),t.jsxs("div",{className:"field",children:[t.jsxs("label",{children:["Track",ce&&t.jsxs("span",{className:"note",style:{marginLeft:8,fontWeight:400},children:["The Analyst suggests ",ce==="express"?"Express":"Full"]})]}),t.jsx("div",{className:"tracks",children:fF.map(re=>t.jsxs("button",{className:`opt2 ${P===re.id?"pick":""}`,onClick:()=>F(re.id),children:[t.jsxs("b",{children:[re.name,P===re.id&&t.jsxs("span",{children:[t.jsx(fe,{size:13,strokeWidth:2.5})," Chosen"]})]}),re.note]},re.id))})]}),P==="full"&&t.jsxs("label",{className:"talkfirst",children:[t.jsx("input",{type:"checkbox",checked:_,onChange:re=>z(re.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."]})]}),!M&&t.jsxs("label",{className:"talkfirst",children:[t.jsx("input",{type:"checkbox",checked:U,onChange:re=>I(re.target.checked)}),t.jsxs("span",{children:[t.jsx("b",{children:"Write new tests."}),` The Builder writes tests for every "done when". Turn it off for a demo, a small text or colour change, or a project with no tests yet: squad-kit still runs your project's own checks, the review and the proof, and the story says "Built without new tests".`]})]})]})]})}const dF=60;function uF(e){const[n,s]=C.useState(Date.now());return C.useEffect(()=>{const r=setInterval(()=>s(Date.now()),1e3);return()=>clearInterval(r)},[e]),n}function hF({job:e}){const n=uF(!0),s=Math.max(0,Math.floor((n-Date.parse(e.startedAt))/1e3)),i=["read","look","write"].indexOf(e.step),o=u=>u<i?"done":u===i?"now":"todo",l=e.looked.slice(-3),d=e.looked.length-l.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(Lp,{state:o(0),children:"Read your message"}),t.jsxs(Lp,{state:o(1),children:["Looking at the project",l.length>0&&t.jsxs("span",{className:"note",children:[": ",l.join(", "),d>0?` and ${d} more`:""]})]}),t.jsx(Lp,{state:o(2),children:"Writing the ticket for you to check"}),t.jsxs("p",{className:"note",children:[s>2*dF?"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 Lp({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(fe,{size:12,strokeWidth:3}):e==="now"?t.jsx(st,{size:12,className:"spin"}):null}),t.jsxs("span",{children:[n,t.jsx("span",{className:"sr-only",children:e==="done"?" (done)":e==="now"?" (now)":""})]})]})}function pF({error:e,onRetry:n,onWrite:s}){return e?t.jsx(u1,{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(oi,{size:14}),onClick:n},{label:"Write it myself with what I typed",icon:t.jsx(qo,{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(oi,{size:14})," Try again"]}),t.jsxs("button",{className:"btn",onClick:s,children:[t.jsx(qo,{size:14})," Write it myself with what I typed"]})]})]})}const fF=[{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 Bc({label:e,hint:n,items:s,onChange:r,add:i}){const o=(l,d)=>r(s.map((u,h)=>h===l?d:u));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((l,d)=>t.jsxs("div",{className:"listrow",children:[t.jsx("span",{className:"mono note",children:d+1}),t.jsx("input",{className:"input",dir:ge(l),value:l,autoFocus:l===""&&d===s.length-1,onChange:u=>o(d,u.target.value),onKeyDown:u=>{u.key==="Enter"&&d===s.length-1&&l.trim()&&r([...s,""])},"aria-label":`${e} ${d+1}`}),t.jsx("button",{className:"iconbtn",onClick:()=>r(s.filter((u,h)=>h!==d)),"aria-label":`Remove ${e.toLowerCase()} ${d+1}`,children:t.jsx(Ve,{size:14})})]},d)),t.jsxs("button",{className:"btn sm",onClick:()=>r([...s,""]),children:[t.jsx(xt,{size:13})," ",i]})]})}const mF=/\.(ogg|opus|oga|m4a|mp3|wav|aac|amr|flac|weba|mp4|mov|m4v|webm)$/i;function Mp({files:e,onAdd:n,onRemove:s}){const[r,i]=C.useState(!1),o=e.some(d=>mF.test(d.name)),l=we({queryKey:["speech"],queryFn:()=>ke("/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:d=>{d.preventDefault(),i(!0)},onDragLeave:()=>i(!1),onDrop:d=>{d.preventDefault(),i(!1),d.dataTransfer.files.length&&n(d.dataTransfer.files)},onPaste:d=>d.clipboardData.files.length&&n(d.clipboardData.files),children:[t.jsx(xd,{size:15})," Drop screenshots, documents, voice or video notes here, or click to pick",t.jsx("input",{type:"file",multiple:!0,hidden:!0,onChange:d=>{d.target.files?.length&&n(d.target.files),d.target.value=""}})]}),e.length>0&&t.jsx("div",{className:"picked",children:e.map((d,u)=>t.jsxs("span",{className:"pickedfile",children:[d.preview?t.jsx("img",{src:d.preview,alt:""}):t.jsx(xd,{size:13}),t.jsx("span",{className:"mono",children:d.name}),t.jsx("span",{className:"note",children:d.size<1024*1024?`${Math.max(1,Math.round(d.size/1024))} KB`:`${(d.size/1024/1024).toFixed(1)} MB`}),t.jsx("button",{className:"iconbtn",onClick:()=>s(u),"aria-label":`Remove ${d.name}`,children:t.jsx(Ve,{size:13})})]},`${d.name}-${u}`))}),o&&l.data&&t.jsx("p",{className:"note",style:{marginTop:6},children:l.data.hasKey?l.data.video===!1?"squad-kit writes out voice notes with Munsit, so every agent knows what was said. Video notes need a Mac: on this computer they stay attached, unheard.":"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 gF({onClose:e,onCreated:n}){const s=oe(),[r,i]=C.useState("AB#"),o=r.replace(/\D/g,"").length===0||s.isPending,l=()=>{o||s.mutate({path:"/api/v1/pull",body:{ref:r}},{onSuccess:d=>{n(d),e()}})};return t.jsxs(We,{title:"Pull from Azure DevOps",onClose:e,icon:t.jsx("span",{className:"glyph",children:t.jsx(us,{size:15})}),footer:t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"btn pri",disabled:o,onClick:l,children:[t.jsx(us,{size:15})," Pull ticket"]}),t.jsx("button",{className:"btn",onClick:e,children:"Cancel"}),t.jsx("span",{className:"grow"}),t.jsx(te,{text:`squad pull ${r.trim()?gi(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:d=>i(d.target.value),onKeyDown:d=>d.key==="Enter"&&l()})]})]})}const lw=[{value:"stops-work",label:"Stops work"},{value:"annoying",label:"Annoying"},{value:"small",label:"Small"}];function h1({onClose:e,foundIn:n}){const s=oe(),[r,i,o]=$e("report-bug","what",""),[l,d,u]=$e("report-bug","how",""),[h,m,p]=$e("report-bug","expected",""),[x,y]=C.useState("annoying"),j=()=>{o(),u(),p()},k=()=>s.mutate({path:"/api/v1/bugs",body:{what:r,how:l,expected:h,severity:x,foundIn:n},done:"Bug reported. Triage is sorting it."},{onSuccess:()=>{j(),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(Qs,{size:15})}),footer:t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"btn pri",disabled:!r.trim()||s.isPending,onClick:k,children:[t.jsx(Qs,{size:15})," Report bug"]}),t.jsx("button",{className:"btn",onClick:e,children:"Cancel"}),(r||l||h)&&t.jsx(av,{onClear:j}),t.jsx("span",{className:"grow"}),t.jsx(te,{text:`squad bug ${Le(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,dir:ge(r),value:r,onChange:b=>i(b.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",dir:ge(l),value:l,onChange:b=>d(b.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",dir:ge(h),value:h,onChange:b=>m(b.target.value)})]}),t.jsxs("div",{className:"field",children:[t.jsx("label",{children:"How bad is it?"}),t.jsx("div",{className:"sevs",children:lw.map(b=>t.jsxs("button",{className:`choice ${x===b.value?"on":""}`,onClick:()=>y(b.value),children:[t.jsx("span",{className:"rd"}),b.label]},b.value))})]})]})}function xF({release:e,demo:n,onClose:s}){const{toast:r}=qe(),i=()=>void navigator.clipboard?.writeText(e.whatsappDraft??"").then(()=>r("Message copied. Send it from WhatsApp.")),o=[e.addons.changelog&&"Changelog updated",e.addons.tag&&`Marked the code as ${e.version}`,e.addons.pipeline&&"After-release step started"].filter(Boolean);return t.jsxs(We,{title:e.unpushed?.length?`${e.version} is made, but not sent yet`:`${e.version} is released`,onClose:s,icon:t.jsx("span",{className:"glyph",children:t.jsx(jo,{size:15})}),footer:t.jsxs(t.Fragment,{children:[e.addons.whatsapp&&t.jsxs("button",{className:"btn pri",onClick:i,children:[t.jsx(Xn,{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:"!"})," It did not reach your team's shared copy of the code, so its tickets stay open. Press Send again on the release once it can."]}):t.jsxs("div",{children:[t.jsx(fe,{size:16})," ",e.tickets.length," tickets released"]}),e.log?e.log.map(l=>t.jsxs("div",{style:l.ok?void 0:{color:"var(--you-ink)"},...De(l.text),children:[l.ok?t.jsx(fe,{size:16}):t.jsx("span",{style:{width:16,textAlign:"center",fontWeight:800},children:"!"})," ",t.jsx(L,{text:l.text})]},l.text)):o.map(l=>t.jsxs("div",{children:[t.jsx(fe,{size:16})," ",l]},l))]}),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(Sm,{className:"wa",text:e.whatsappDraft})]})]})}function Xs(e){return e.stage==="release"||e.stage==="done"}function su(e){return Xs(e)||!!e.specApproved||["implement","test","review"].includes(e.stage)}function yF(e){return e.part==="story"?"The story":e.index===void 0?"New done when":`Done when ${e.index+1}`}function Mf(e){return e.length>1?`${e.slice(0,-1).join(", ")} and ${e.at(-1)}`:String(e[0]??"")}function Z2({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:yF(n)}),n.before?t.jsx(L,{as:"div",className:"chold",text:n.before}):t.jsx("div",{className:"chold empty",children:t.jsx("i",{children:"new"})}),n.after?t.jsx(L,{as:"div",className:"chnew",text:n.after}):t.jsx("div",{className:"chnew",children:t.jsx("i",{children:"removed"})})]},s))})}const X2={same:"Stays",changed:"Redone",new:"New"};function jF({c:e}){const n=e.design,s=n.before.filter(i=>!n.steps.some(o=>o.title===i)),r=n.steps.flatMap((i,o)=>i.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"," ",Mf(r)]}),t.jsx("div",{children:t.jsx("span",{className:"pill wait",children:X2.same})}),t.jsx("div",{className:"chnew note",children:"Built already, as they are."})]}),n.steps.map((i,o)=>i.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:X2[i.change]})}),t.jsx(L,{as:"div",className:"chnew",text:i.title})]},o)),s.map(i=>t.jsxs("div",{className:"chrow",children:[t.jsx("div",{className:"chlabel",children:"Dropped"}),t.jsx("div",{}),t.jsx(L,{as:"div",className:"chold",text:i})]},i))]})}function kF(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 vF({t:e}){const n=oe(),[s,r]=C.useState(!1),[i,o]=C.useState(!1),[l,d,u]=$e(e.id,"change-reason",""),h=mi(e);if(!h)return null;const m=h.status==="approved"||h.status==="designing",p=h.status==="writing"||h.status==="designing"||h.status==="building",x=(e.steps??[]).flatMap((k,b)=>k.status==="done"?[]:[b+1]),y={writing:`Change ${h.id}: the Analyst is writing it into the spec`,failed:`Change ${h.id}: the Analyst could not write it`,proposed:`Change ${h.id} to the spec`,approved:`Change ${h.id} is approved`,designing:`Change ${h.id}: the Architect is updating the design`,"design-ready":`The design update for change ${h.id}`,building:h.size==="big"?`Change ${h.id}: the Builder is redoing ${x.length===1?"step":"steps"} ${Mf(x)}`:`Change ${h.id}: the Builder is making it`,done:"",declined:""}[h.status],j=(k,b,w)=>n.mutate({path:`/api/v1/tickets/${e.id}/spec-change/${k}`,body:w,done:b},{onSuccess:()=>{r(!1),o(!1),u()}});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:p?t.jsx(st,{size:15,className:"spin"}):h.status==="failed"?t.jsx(Rs,{size:15}):t.jsx(Ts,{size:15})}),t.jsx("b",{children:y}),h.size&&t.jsx("span",{className:`pill ${h.size==="big"?"you":"wait"}`,children:h.size==="big"?"Big change":"Small change"})]}),t.jsxs("div",{className:"changebody",children:[t.jsx(L,{as:"p",text:h.summary??`“${h.ask}”`}),h.status==="writing"&&t.jsx("p",{className:"note",children:"The work goes on meanwhile. Nothing changes until you approve it."}),h.status==="failed"&&t.jsx(L,{as:"p",className:"note",text:h.error??""}),h.why&&(h.status==="proposed"||h.status==="approved")&&t.jsx(L,{as:"p",className:"note",text:h.why}),h.status==="proposed"&&h.parts&&t.jsx(Z2,{parts:h.parts}),h.status==="proposed"&&t.jsx("p",{className:"note",children:kF(e,h)}),h.status==="approved"&&t.jsx("p",{className:"note",children:h.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."}),h.status==="designing"&&t.jsx("p",{className:"note",children:"The Builder paused after its step. The design update comes to you next."}),h.status==="design-ready"&&h.design&&t.jsxs(t.Fragment,{children:[h.design.summary&&t.jsx(L,{as:"p",text:h.design.summary}),t.jsx(jF,{c:h}),h.parts&&t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"note",children:"And the spec, as you approved it:"}),t.jsx(Z2,{parts:h.parts})]}),t.jsxs("p",{className:"note",children:["Approve, and the Builder redoes only ",(()=>{const k=h.design.steps.flatMap((b,w)=>b.change==="same"?[]:[w+1]);return k.length?`${k.length===1?"step":"steps"} ${Mf(k)}`:"what changed"})(),". Decline, and the spec stays as it was; the Builder carries on."]})]})]}),i?t.jsxs("div",{className:"row",children:[t.jsx("input",{className:"input",autoFocus:!0,dir:ge(l),value:l,onChange:k=>d(k.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:()=>j("withdraw","Withdrawn. The spec is back to how it was.",{reason:l}),children:"Withdraw"}),t.jsx("button",{className:"btn sm quiet",onClick:()=>o(!1),children:"Cancel"})]}):m?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(te,{text:`squad propose ${e.id} --withdraw`})]}):s?t.jsxs("div",{className:"row",children:[t.jsx("input",{className:"input",autoFocus:!0,dir:ge(l),value:l,onChange:k=>d(k.target.value),placeholder:"Why not? (optional, it stays in the spec's record)"}),t.jsx("button",{className:"btn sm",disabled:n.isPending,onClick:()=>j("decline","Declined. Nothing changes.",{reason:l}),children:"Decline"}),t.jsx("button",{className:"btn sm quiet",onClick:()=>r(!1),children:"Cancel"})]}):h.status==="proposed"||h.status==="design-ready"?t.jsxs("div",{className:"row",children:[t.jsxs("button",{className:"btn sm pri",disabled:n.isPending,onClick:()=>j("approve",h.status==="design-ready"?"Approved. The Builder redoes what changed.":h.size==="big"?"Approved. The Architect updates the design next.":"Approved. The spec says it now."),children:[t.jsx(fe,{size:14,strokeWidth:2.5})," ",h.status==="design-ready"?"Approve the new design":"Approve"]}),t.jsx("button",{className:"btn sm",onClick:()=>r(!0),children:h.status==="design-ready"?"Decline the change":"Decline"}),t.jsx("span",{className:"grow"}),t.jsx(te,{text:h.status==="design-ready"?`squad approve ${e.id}`:`squad propose ${e.id} --approve`})]}):h.status==="failed"?t.jsxs("div",{className:"row",children:[t.jsx("button",{className:"btn sm pri",disabled:n.isPending,onClick:()=>j("retry","The Analyst writes it again."),children:"Try again"}),t.jsx("button",{className:"btn sm",disabled:n.isPending,onClick:()=>j("decline","Dropped the change."),children:"Drop it"}),t.jsx("span",{className:"grow"}),t.jsx(te,{text:`squad propose ${e.id} --retry`})]}):null]})})}function vl({t:e,initial:n="",from:s,onClose:r}){const i=oe(),[o,l,d]=$e(e.id,"propose",n),u=Xs(e),h=mi(e),m=()=>{d(),r()},p=!!o.trim()&&!i.isPending,x=Le(o.trim()||"…"),y=j=>i.mutate({path:`/api/v1/tickets/${e.id}/spec-change/new-ticket`,body:{text:o,as:j},done:j==="bug"?`Reported a bug, linked to ${e.id}.`:`Made a new ticket, linked to ${e.id}.`},{onSuccess:m});return t.jsxs(We,{title:u?"Ask for a change":"Propose a change",icon:t.jsx(Ts,{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:()=>y("ticket"),children:[t.jsx(xt,{size:15})," Make a new linked ticket"]}),t.jsxs("button",{className:"btn",disabled:!p,onClick:()=>y("bug"),children:[t.jsx(Qs,{size:15})," Report a bug"]})]}):t.jsxs("button",{className:"btn pri",disabled:!p||!!h,onClick:()=>i.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:m}),children:[t.jsx(Ts,{size:15})," Propose"]}),t.jsx("span",{className:"grow"}),t.jsx(te,{text:u?`squad propose ${e.id} --as ticket ${x}`:`squad propose ${e.id} ${x}`})]}),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.`:h?`Change ${h.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,dir:ge(o),value:o,onChange:j=>l(j.target.value),placeholder:"For example: allow 5 bookings a day, not 3"})]})}function bF({t:e}){const[n,s]=C.useState(!1);return su(e)?t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"btn sm",onClick:()=>s(!0),title:Xs(e)?"Becomes a new linked ticket or a bug report":"The Analyst writes it into the spec; you approve it",children:[t.jsx(Ts,{size:13})," ",Xs(e)?"Ask for a change":"Propose a change"]}),n&&t.jsx(vl,{t:e,onClose:()=>s(!1)})]}):null}const wF={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 NF({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",{...De(s.summary??s.ask),children:[t.jsx("span",{className:`pill ${s.status==="done"?"ok":s.status==="declined"?"wait":"you"}`,children:s.decided?.withdrawn?"Withdrawn":wF[s.status]}),t.jsx(L,{className:"grow",text:`${s.id}: ${s.summary??s.ask}${s.size?` (${s.size})`:""}${s.decided?.reason?`. Why not: ${s.decided.reason}`:""}`}),t.jsx(L,{className:"note",text:s.by})]},s.id))})]}):null}function p1(e){return!e.takenOver&&!(e.outside&&!e.sessions?.build)&&["implement","test","review"].includes(e.stage)}function f1({t:e}){const n=oe();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(sl,{size:12})," Take over"]})}const ft={analyst:"Analyst",architect:"Architect",builder:"Builder",reviewer:"Reviewer",tester:"Tester"},J2={analyst:"intake",architect:"intake",builder:"build",reviewer:"review",tester:"tester"},SF={analyst:pi,architect:gm,builder:sl,reviewer:rl,tester:km},CF={"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 Yn({role:e,small:n,live:s}){const r=SF[e]??pi;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 ki({t:e,agent:n,label:s,primary:r,small:i}){const o=oe();return t.jsxs("button",{className:`btn ${r?"pri":""} ${i?"sm":""}`,disabled:o.isPending,onClick:()=>o.mutate({path:`/api/v1/tickets/${e.id}/chat/start`,body:{with:n}},{onSuccess:()=>Ss.show(e.id)}),children:[t.jsx(Gn,{size:14})," ",s??`Talk to the ${ft[n]}`]})}function $F(e){return e.live&&e.squad?.phase?CF[e.squad.phase]??null:null}function cw(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=Zs[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 dw(e){const n=e.chat,s=ft[n.with];return n.beside?Xs(e)?{kind:"released",note:"Questions only"}:va(e)?{kind:"review",note:"Questions only"}:{kind:kI(e)?"working":"still",note:"Questions only"}:{kind:"talk",note:`The ${s} waits while you talk`}}function uw(e){const n=e.chat,s=ft[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 TF({t:e,size:n,onFull:s,onPanel:r}){const i=oe(),[o,l]=C.useState(!1),d=e.chat,u=ft[d.with],h=dw(e),m=cw(e),p=d.open?uw(e):null,x=i.isPending||!!d.thinking,y=d.with==="builder"||d.with==="reviewer"||d.with==="tester",j=(T,A)=>i.mutate({path:`/api/v1/tickets/${e.id}/chat/${T}`,done:A}),k=t.jsxs(t.Fragment,{children:[d.open&&p&&t.jsxs("button",{className:"btn pri",disabled:x,onClick:()=>j(p.path,p.done),children:[t.jsx(fe,{size:15,strokeWidth:2.5})," ",p.label]}),d.open&&h.kind==="talk"&&!y&&t.jsx("button",{className:"btn",disabled:x,onClick:()=>j("done","Done talking."),children:p?"Done, no changes":"Done"}),d.open&&h.kind==="talk"&&y&&p1(e)&&t.jsx(f1,{t:e}),d.open&&h.kind==="released"&&t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"btn",onClick:()=>l(!0),children:[t.jsx(Py,{size:14})," New linked ticket"]}),t.jsxs("button",{className:"btn",onClick:()=>l(!0),children:[t.jsx(Qs,{size:14})," Report a bug"]})]}),d.open&&h.kind==="working"&&su(e)&&t.jsxs("button",{className:"btn",onClick:()=>l(!0),children:[t.jsx(Ts,{size:14})," Propose a change"]}),d.open&&h.kind!=="talk"&&t.jsx("button",{className:"btn",disabled:i.isPending,onClick:()=>j("done",`Done asking the ${u}.`),children:"Done"}),!d.open&&(d.beside||!e.takenOver)&&t.jsxs("button",{className:"btn",disabled:i.isPending,onClick:()=>i.mutate({path:`/api/v1/tickets/${e.id}/chat/start`,body:{with:d.with,...d.beside?{ask:!0}:{}}},{onSuccess:()=>Ss.show(e.id)}),children:[t.jsx(Gn,{size:14})," ",d.beside?`Ask the ${u} again`:`Talk to the ${u} again`]})]}),b=d.beside?wI(e):"",w=d.open&&h.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:b}),e.status?t.jsxs(t.Fragment,{children:[" · ",e.status]}):null,". Asking never stops the work; a change goes through the spec."]})]}):d.open&&h.kind==="review"?t.jsx("div",{className:"cbanner done",children:t.jsxs("span",{children:[t.jsxs("b",{children:[b,"."]})," 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."]})}):d.open&&h.kind==="released"?t.jsx("div",{className:"cbanner done",children:t.jsxs("span",{children:[t.jsxs("b",{children:[b,"."]})," Ask anything about it. A change becomes a new linked ticket or a bug report."]})}):d.open&&h.kind==="still"?t.jsx("div",{className:"cbanner done",children:t.jsxs("span",{children:[t.jsxs("b",{children:[b,"."]})," Your questions change nothing on it."]})}):null,S=o?t.jsx(vl,{t:e,from:d.with,onClose:()=>l(!1)}):null;return n==="phone"?t.jsxs("div",{className:"chead-m",children:[t.jsxs("div",{className:"chead-m-row",children:[t.jsx(L,{className:"ctitle",text:e.title}),d.open&&p&&t.jsx("button",{className:"btn pri sm",disabled:x,onClick:()=>j(p.path,p.done),children:p.label}),d.open&&!p&&t.jsx("button",{className:"btn sm",disabled:i.isPending,onClick:()=>j("done","Done talking."),children:"Done"})]}),w,d.open&&h.kind==="released"&&t.jsxs("div",{className:"chead-m-row",children:[t.jsxs("button",{className:"btn sm",onClick:()=>l(!0),children:[t.jsx(Py,{size:13})," New linked ticket"]}),t.jsxs("button",{className:"btn sm",onClick:()=>l(!0),children:[t.jsx(Qs,{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(Yn,{role:d.with,live:d.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 ${m.tone}`,children:m.text}),d.open&&t.jsx("span",{className:"cnote",children:h.note})]}),t.jsx(L,{as:"div",className:"ctitle",text: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(Kk,{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 ${m.tone}`,children:m.text}),t.jsx("span",{className:"grow"}),d.open&&t.jsx("span",{className:"cnote",children:h.note}),s&&t.jsx("button",{className:"iconbtn sm",onClick:s,"aria-label":"Open full screen",title:"Full screen",children:t.jsx(Wd,{size:14})})]}),t.jsx(L,{as:"div",className:"ctitle",text:e.title}),w,t.jsx("div",{className:"cbtns",children:k}),S]})}const Wc=e=>`${e.at}|${e.who}`,ej=e=>e.who!=="you"&&e.who!=="squad";function m1({id:e,size:n,onOpenDoc:s,onFull:r,onPanel:i}){const o=cl(e),l=o.data,d=l?.chat,u=C.useRef(null),[h,m]=$e(e,"chat",""),p=C.useRef(null),x=C.useRef(null),[y,j]=C.useState(null),k=l?.chat?.messages.length??0;C.useEffect(()=>{y&&k>y.count&&j(null)},[k,y]);const b=d?d.beside?"chat":J2[d.with]:"",w=we({queryKey:["conversation",e,b],queryFn:()=>ke(`/api/v1/tickets/${e}/conversations/${b}`),enabled:!!(d&&(d.beside?d.side:l?.sessions?.[J2[d.with]])),refetchInterval:d?.thinking?1500:8e3,retry:!1}),S=C.useMemo(()=>Jb(w.data?.updates??[]).filter(Y=>Y.kind==="tool"),[w.data]),T=(Y,se)=>S.filter(R=>(!Y||(R.at??"")>=Y)&&(!se||(R.at??"")<=se)),A=C.useRef(null),[D,$]=C.useState(null),P=C.useMemo(()=>d?.messages??[],[d?.messages]);C.useEffect(()=>{if(!d)return;const Y=P.map(Wc);if(!A.current){A.current=new Set(Y);return}const se=P.filter(B=>!A.current.has(Wc(B)));for(const B of Y)A.current.add(B);const R=se.filter(ej).at(-1);R&&$({key:Wc(R),shown:0,total:K7(R.text)})},[d,P]),C.useEffect(()=>{if(!D)return;if(D.shown>=D.total){$(null);return}const Y=Math.max(1,Math.ceil(D.total/120)),se=setTimeout(()=>$(R=>R&&{...R,shown:R.shown+Y}),55);return()=>clearTimeout(se)},[D]);const F=C.useRef(!0),_=C.useRef(null);if(C.useLayoutEffect(()=>{const Y=u.current;Y&&F.current&&(Y.scrollTop=Y.scrollHeight)}),C.useEffect(()=>{const Y=u.current,se=_.current;if(!Y||!se)return;const R=new ResizeObserver(()=>{F.current&&(Y.scrollTop=Y.scrollHeight)});return R.observe(se),()=>R.disconnect()},[l?.id,!!d]),C.useEffect(()=>{d&&Ss.seen(e,P.length)},[d,e,P.length]),!l)return t.jsx("div",{className:"cempty",children:o.isError?`No ticket ${e}.`:"Loading…"});if(!d)return t.jsxs("div",{className:"cempty",children:[t.jsxs("p",{children:["No talk on ",l.id," yet."]}),t.jsx(ki,{t:l,agent:"analyst",primary:!0})]});const z=ft[d.with],U=dw(l),I=[...P].reverse().find(Y=>Y.who==="you"),W=uw(l),M=$F(l),G=U.kind==="working"?`You are asking the ${z}. ${M?`The ${ft[M]}`:"The squad"} keeps working on ${l.id}, and this talk changes nothing.`:U.kind==="review"||U.kind==="still"?`You are asking the ${z} about ${l.id}. It stays where it is, and this talk changes nothing.`:U.kind==="released"?`${l.id} is ${l.stage==="done"?"released":"accepted"}. Ask the ${z} anything about it.`:`You started talking with the ${z}. Its work on ${l.id} waits until you press ${W?W.label:"Done"}${W&&W.label!=="Back to work"?" or Done":""}.`,ce=[...P].reverse().find(ej),V=Y=>{Y!==void 0&&m(Y),setTimeout(()=>p.current?.focus(),0)};return t.jsxs("div",{className:`chat-v csize-${n}`,children:[t.jsx(TF,{t:l,size:n,onFull:r,onPanel:i}),t.jsx("div",{className:"cthread",ref:u,"aria-live":"polite",onScroll:Y=>{const se=Y.currentTarget;F.current=se.scrollHeight-se.scrollTop-se.clientHeight<80},children:t.jsxs("div",{className:"ccol",ref:_,children:[d.open&&t.jsx("div",{className:"cnote-pill",children:G}),P.map((Y,se)=>{if(Y.who==="squad")return t.jsx(LF,{t:l,m:Y,last:se===P.length-1,onAsk:()=>V()},se);if(Y.who==="you")return t.jsx(PF,{t:l,m:Y,onOpenDoc:s,onReply:q=>V(q)},se);const R=P[se-1],B=D?.key===Wc(Y),J=P[se+1];return t.jsx(RF,{t:l,m:Y,size:n,used:T(R?.at,Y.at),writing:B?D.shown:null,answer:J?.who==="you"?J.text:void 0,canChoose:d.open&&!d.thinking&&Y===ce&&se===P.length-1,newest:Y===ce,onChoose:q=>x.current?.(q),onOther:()=>V(),onOpenDoc:s,onReply:q=>V(q)},se)}),y&&t.jsx(EF,{p:y}),d.thinking&&P.at(-1)?.note!=="waits"&&t.jsx(qF,{role:d.with,steps:T(I?.at??P.at(-1)?.at),hasMessage:!!I})]})}),d.open?t.jsx(MF,{t:l,size:n,text:h,setText:m,input:p,onSent:()=>F.current=!0,sendRef:x,setPending:j}):t.jsx("div",{className:"cclosed",children:"This talk is over. It stays here to read."})]})}function EF({p:e}){const n=pt(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:Js(n),dir:n.dir,lang:n.dir==="rtl"?"ar":"en",children:e.text})]}),t.jsx("span",{className:"cmeta",children:"You · now · sending"})]})}function hw({t:e,m:n,holder:s,onReply:r}){const i=oe(),{toast:o}=qe(),[l,d]=C.useState(!1),[u,h]=C.useState(!1),m=()=>{const j=window.getSelection();return((j&&!j.isCollapsed&&s.current?.contains(j.anchorNode)?j.toString().trim():"")||n.text).trim().slice(0,2e3)},p=(j,k)=>{d(!1),i.mutate({path:`/api/v1/tickets/${e.id}/notes`,body:{text:m(),kind:j},done:`Added to the spec as ${k}.`})},x=()=>void navigator.clipboard?.writeText(n.text).then(()=>o("Copied"),()=>o("Could not copy. Select the text instead.","err")),y=()=>r(`> ${n.text.replace(/\s+/g," ").slice(0,160)}${n.text.length>160?"…":""}
|
|
666
|
-
|
|
667
|
-
`);return t.jsxs("div",{className:"cacts",children:[t.jsxs("button",{className:"cact",onClick:x,children:[t.jsx(Xn,{size:13})," Copy"]}),n.who==="you"&&n.text.trim()&&su(e)&&t.jsxs("button",{className:"cact",onClick:()=>h(!0),children:[t.jsx(Ts,{size:13})," Propose as a change"]}),!Xs(e)&&n.text.trim()&&t.jsxs("span",{className:"cmenu-w",children:[t.jsxs("button",{className:"cact",onClick:()=>d(!l),"aria-haspopup":"menu","aria-expanded":l,onMouseDown:j=>j.preventDefault(),children:[t.jsx(xt,{size:13})," Add to spec"]}),l&&t.jsxs("div",{className:"cmenu",role:"menu",onMouseLeave:()=>d(!1),children:[t.jsxs("button",{role:"menuitem",onClick:()=>p("rule","a business rule"),onMouseDown:j=>j.preventDefault(),children:[t.jsx("b",{children:"A business rule"}),t.jsx("small",{children:"Every agent must follow it"})]}),t.jsxs("button",{role:"menuitem",onClick:()=>p("criterion",'a "done when" item'),onMouseDown:j=>j.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:()=>p("note","a note"),onMouseDown:j=>j.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:y,children:[t.jsx($7,{size:13})," Reply"]}),u&&t.jsx(vl,{t:e,initial:n.text,from:e.chat?.with,onClose:()=>h(!1)})]})}function AF(e){let n=!1;return e.split(`
|
|
668
|
-
`).map((s,r,i)=>{/^\s*```/.test(s)&&(n=!n);const o=i[r+1]??"";return!n&&s.trim()&&o.trim()&&!/^\s*([-*+]|\d+\.|>|```)\s/.test(o)?`${s}
|
|
669
|
-
`:s}).join(`
|
|
670
|
-
`)}function PF({t:e,m:n,onOpenDoc:s,onReply:r}){const i=C.useRef(null),[o,l]=C.useState(!1),d=!n.text.trim()&&(n.files??[]).some(u=>zf.test(u));return t.jsxs("div",{className:`cyou cmsg ${o?"picked":""}`,children:[t.jsxs("div",{className:"cybub",ref:i,onClick:()=>l(!o),children:[n.text.trim()&&t.jsx(aa,{text:AF(n.text),ticket:e.id}),n.files&&n.files.length>0&&t.jsx(r1,{ticket:e.id,files:n.files,onOpen:s,sent:!0,from:"From you"})]}),t.jsxs("span",{className:"cmeta",children:["You · ",sd(n.at),d?" · written out from your voice":""]}),t.jsx(hw,{t:e,m:n,holder:i,onReply:r})]})}function sd(e){return new Date(e).toDateString()===new Date().toDateString()?Rn(e):`${Is(e)} ${Rn(e)}`}function RF({t:e,m:n,size:s,used:r,writing:i,answer:o,canChoose:l,newest:d,onChoose:u,onOther:h,onOpenDoc:m,onReply:p}){const x=C.useRef(null),[y,j]=C.useState(!1),k=n.who,b=ft[k]??"Agent",w=i!==null,S=w?V7(n.text,i):n.text,T=t.jsx(aa,{text:S,ticket:e.id,stream:w,caret:w});return t.jsxs("div",{className:`cag cmsg ag-${k} ${y?"picked":""}`,children:[t.jsx(Yn,{role:k,live:w}),t.jsxs("div",{className:"cwho",children:[t.jsx("b",{children:b}),w?t.jsx("span",{className:"shim",children:"Writing"}):t.jsx("span",{className:"ctime",children:sd(n.at)})]}),t.jsxs("div",{className:"cagb",ref:x,onClick:A=>s==="phone"&&!A.target.closest("button, a")&&j(!y),children:[r.length>0&&t.jsx(zF,{steps:r}),w||d?T:t.jsx(rI,{lines:iI(n.text),children:T}),!w&&n.files&&n.files.length>0&&t.jsx(r1,{ticket:e.id,files:n.files,onOpen:m,from:`From the ${b} · ${sd(n.at)}`}),!w&&n.options&&n.options.length>0&&t.jsx(IF,{options:n.options,answer:o,can:l,onChoose:u,onOther:h})]}),!w&&s==="phone"&&t.jsxs("span",{className:"cmeta",children:[b," · ",sd(n.at)]}),!w&&t.jsx(hw,{t:e,m:n,holder:x,onReply:p})]})}function IF({options:e,answer:n,can:s,onChoose:r,onOther:i}){const o=pt(e.join(" ")),l=n?.trim();return t.jsxs("div",{className:"cchoices",dir:o.dir,children:[e.map(d=>{const u=pt(d),h=l?l===d.trim()?"on":"off":s?"":"off";return t.jsx("button",{className:`cch ${h} ${Js(u)}`,lang:u.dir==="rtl"?"ar":"en",dir:u.dir,disabled:!s,onClick:()=>r(d),children:d},d)}),s&&t.jsx("button",{className:"cch other",onClick:i,dir:o.dir,children:o.dir==="rtl"?"إجابة أخرى…":"Something else…"})]})}function FF(e){let n=0,s=0;for(const r of e.content){if(r.type!=="diff")continue;const i=(r.oldText??"").split(`
|
|
671
|
-
`).filter(Boolean).length,o=r.newText.split(`
|
|
672
|
-
`).filter(Boolean).length;n+=Math.max(0,o-(r.oldText==null?0:Math.min(i,o))),s+=r.oldText==null?0:Math.max(0,i-o)}return{title:e.title,...n||s?{plus:n,minus:s}:{}}}function pw({s:e}){const n=FF(e);return t.jsxs("div",{className:`cstep ${e.skipped?"skipped":e.status}`,children:[e.skipped?t.jsx(ga,{size:13}):e.status==="completed"?t.jsx(fe,{size:13,strokeWidth:2.5}):e.status==="failed"?t.jsx(Ve,{size:13}):t.jsx(st,{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 zF({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(Bd,{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(pw,{s:r},r.id))})]})}function qF({role:e,steps:n,hasMessage:s}){const r=n.filter(l=>l.status==="in_progress").at(-1)??n.at(-1),i=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(Yn,{role:e,live:!0}),t.jsxs("div",{className:"cwho",children:[t.jsx("b",{children:ft[e]}),t.jsx("span",{className:"shim",children:i})]}),t.jsxs("div",{className:"cagb",children:[t.jsxs("span",{className:"cdots","aria-label":`The ${ft[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(l=>t.jsx(pw,{s:l},l.id))]})]})]})}function LF({t:e,m:n,last:s,onAsk:r}){const i=oe(),o=n.note==="failed"||!n.note&&n.text.startsWith("Could not answer"),l=e.chat?ft[e.chat.with]:"agent",d=s&&e.chat?.open&&!e.chat.thinking&&(o||n.note==="stopped"),u=()=>i.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(Cs,{size:15})," The ",l," could not answer. Nothing was lost.",t.jsx("span",{className:"cfail-why",children:n.text.replace(/^Could not answer:\s*/,"")})]}),d&&t.jsxs("div",{className:"cbtns",children:[t.jsx("button",{className:"btn pri sm",disabled:i.isPending,onClick:u,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(L,{as:"div",className:"cnote-pill",text:n.text}),d&&t.jsx("div",{className:"cbtns",children:t.jsx("button",{className:"btn sm",disabled:i.isPending,onClick:u,children:"Ask again"})})]})}const tj=10*1024*1024;function MF({t:e,size:n,text:s,setText:r,input:i,onSent:o,sendRef:l,setPending:d}){const u=oe(),{toast:h}=qe(),m=e.chat,p=ft[m.with],[x,y]=C.useState([]),[j,k]=C.useState(!1),b=C.useRef(null),w=pt(s),S=D7(w),T=Math.min(6,Math.max(1,s.split(`
|
|
673
|
-
`).length)),A=async F=>{const _=[...F],z=_.find(I=>I.size>tj);z&&h(`${z.name} is larger than 10 MB.`,"err");const U=await Promise.all(_.filter(I=>I.size<=tj).slice(0,10).map(kl)).catch(I=>(h(I.message,"err"),[]));y(I=>[...I,...U].slice(0,10))},D=(F=s,_=[])=>{const z=[...x,..._];if(!F.trim()&&!z.length||m.thinking||u.isPending)return;d({text:F,files:z,count:m.messages.length});const U=s;r(""),y([]),o(),u.mutate({path:`/api/v1/tickets/${e.id}/chat/send`,body:{text:F,files:z.map(({name:I,data:W})=>({name:I,data:W}))}},{onError:()=>{d(null),r(U),y(z.filter(I=>!_.includes(I)))}})};l.current=F=>D(F);const $=()=>u.mutate({path:`/api/v1/tickets/${e.id}/chat/stop`}),P=n==="phone"?`Message the ${p}`:`Message the ${p} in Arabic or English`;return t.jsxs("div",{className:"ccomp",onDragOver:F=>(F.preventDefault(),k(!0)),onDragLeave:()=>k(!1),onDrop:F=>(F.preventDefault(),k(!1),void A(F.dataTransfer.files)),children:[j&&t.jsx("div",{className:"cdrop",children:"Drop files to add them to your message"}),t.jsx(OF,{who:p,size:n,onDone:F=>D(s,[F]),render:F=>F.on?F.box:t.jsxs("div",{className:`cbox ${n==="phone"?"m":""}`,children:[x.length>0&&t.jsx("div",{className:"cpicked",children:x.map((_,z)=>t.jsxs("span",{className:"chip",children:[_.preview?t.jsx("img",{src:_.preview,alt:""}):t.jsx(xd,{size:12})," ",_.name,t.jsx("button",{className:"iconbtn","aria-label":`Remove ${_.name}`,onClick:()=>y(x.filter((U,I)=>I!==z)),children:t.jsx(Ve,{size:11})})]},z))}),n==="phone"&&t.jsx("button",{className:"ib","aria-label":"Add screenshots or files",onClick:()=>b.current?.click(),children:t.jsx(xt,{size:20})}),t.jsx("textarea",{ref:i,className:`cta ${s?Js(w):"t-en"}`,dir:s?w.dir:"auto",lang:w.dir==="rtl"?"ar":"en",rows:T,value:s,placeholder:P,"aria-label":"Your message",onChange:_=>r(_.target.value),onPaste:_=>{const z=[..._.clipboardData.files];z.length&&A(z)},onKeyDown:_=>{_.key==="Enter"&&!_.shiftKey&&!_.nativeEvent.isComposing&&(_.preventDefault(),D())}}),n==="phone"?m.thinking?t.jsx("button",{className:"csend m stop",onClick:$,"aria-label":"Stop the answer",children:t.jsx(Qn,{size:14,fill:"currentColor"})}):s.trim()||x.length?t.jsx("button",{className:"csend m",onClick:()=>D(),"aria-label":"Send",disabled:u.isPending,children:t.jsx(ds,{size:18})}):t.jsx("button",{className:"csend m mic",onClick:F.start,"aria-label":"Record a voice note",children:t.jsx(Ey,{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:()=>b.current?.click(),children:t.jsx(xd,{size:16})}),t.jsx("button",{className:"ib","aria-label":"Record a voice note",title:"Record a voice note",onClick:F.start,children:t.jsx(Ey,{size:16})}),S&&t.jsx("span",{className:"clchip",children:S}),t.jsx("span",{className:"grow"}),m.thinking?t.jsxs("button",{className:"cstop",onClick:$,disabled:m.stopping||u.isPending,children:[t.jsx(Qn,{size:11,fill:"currentColor"})," ",m.stopping?"Stopping…":"Stop"]}):t.jsx("button",{className:"csend",onClick:()=>D(),disabled:u.isPending||!s.trim()&&!x.length,"aria-label":"Send",children:t.jsx(ds,{size:17})})]}),t.jsx("input",{ref:b,type:"file",multiple:!0,hidden:!0,onChange:_=>_.target.files&&void A(_.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 OF({who:e,size:n,onDone:s,render:r}){const{toast:i}=qe(),[o,l]=C.useState(!1),[d,u]=C.useState(0),h=C.useRef(null),m=C.useRef(!1);C.useEffect(()=>{if(!o)return;const j=setInterval(()=>u(k=>k+1),1e3);return()=>clearInterval(j)},[o]),C.useEffect(()=>()=>h.current?.stream.getTracks().forEach(j=>j.stop()),[]);const p=async()=>{try{const j=await navigator.mediaDevices.getUserMedia({audio:!0}),k=["audio/webm","audio/ogg","audio/mp4"].find(S=>MediaRecorder.isTypeSupported?.(S))??"",b=new MediaRecorder(j,k?{mimeType:k}:void 0),w=[];b.ondataavailable=S=>S.data.size&&w.push(S.data),b.onstop=()=>{if(j.getTracks().forEach($=>$.stop()),!m.current||!w.length)return;const S=b.mimeType||k||"audio/webm",T=S.includes("ogg")?"ogg":S.includes("mp4")?"m4a":"weba",A=new Date().toTimeString().slice(0,8).replace(/:/g,""),D=new File(w,`voice-note-${A}.${T}`,{type:S});kl(D).then(s)},h.current=b,m.current=!1,u(0),b.start(),l(!0)}catch{i("The microphone is not available. Allow it for this page, or attach a voice note file.","err")}},x=j=>{m.current=j,h.current?.stop(),l(!1)},y=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(d).padStart(2,"0")," · Recording for the ",e]}),t.jsx("span",{className:"clw","aria-hidden":"true",children:Array.from({length:22},(j,k)=>t.jsx("i",{style:{animationDelay:`${k%7*.11}s`}},k))}),t.jsx("button",{className:"btn sm",onClick:()=>x(!1),children:"Cancel"}),t.jsx("button",{className:"btn sm pri",onClick:()=>x(!0),children:"Send"})]});return t.jsx(t.Fragment,{children:r({on:o,start:()=>void p(),box:y})})}function fw(e=3e3){return we({queryKey:["requirements"],queryFn:()=>ke("/api/v1/requirements"),refetchInterval:e})}function _F(e){return e?xi(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 DF(e){return we({queryKey:["requirement",e],queryFn:()=>ke(`/api/v1/requirements/${encodeURIComponent(e)}`),refetchInterval:n=>n.state.status==="error"?1e4:_F(n.state.data)?1e3:4e3,retry:!1})}function BF(e,n){return we({queryKey:["requirement-send",e],queryFn:()=>ke(`/api/v1/requirements/${encodeURIComponent(e)}/send`),enabled:n,retry:!1,staleTime:0})}function mw(e){if(!e||typeof e!="object")return null;const n=e;return Array.isArray(n.epics)&&typeof n.id=="string"?n:n.breakdown?mw(n.breakdown):null}function Pt(){const e=In(),{toast:n}=qe(),s=nk({mutationFn:({path:r,body:i,method:o="POST"})=>ot(r,o,i??{}),onSuccess:(r,i)=>{const o=mw(r);o&&e.setQueryData(["requirement",o.id],o),e.invalidateQueries({queryKey:["requirements"]}),e.invalidateQueries({queryKey:["board"]}),i.done&&n(i.done)},onError:(r,i)=>{i.quiet||n(gw(r),"err",Pk(r)?()=>s.mutate(i):void 0)}});return s}function gw(e){return e instanceof _d&&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 Ed(e,n){const s=fa()??"";return`${nl(`/api/v1/requirements/${encodeURIComponent(e)}/file`)}?path=${encodeURIComponent(n)}&t=${encodeURIComponent(s)}`}const xw=e=>`squad.send-plan.${Ct??""}.${e}`;function nj(e,n){try{sessionStorage.setItem(xw(e),JSON.stringify(n))}catch{}}function yw(e){try{const n=sessionStorage.getItem(xw(e)),s=n?JSON.parse(n):null;return s&&typeof s.items=="number"&&typeof s.links=="number"?s:null}catch{return null}}const ru=e=>`/api/v1/requirements/${encodeURIComponent(e)}`,Of=10*1024*1024,WF=10;function ca(e){const n=e instanceof Error?e.message:String(e),s=/^(\d{3}) [^:]*: ?([\s\S]*)$/.exec(n);if(!s)return gw(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 jw(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 UF={pdf:"PDF",docx:"DOCX",markdown:"MD",text:"TXT"},HF={pdf:"PDF",docx:"Word document",markdown:"Markdown",text:"Text"};function VF(e){return e<1024?`${e} bytes`:e<1024*1024?`${Math.round(e/1024)} KB`:`${(e/1024/1024).toFixed(1)} MB`}const _f=e=>e.replace(/\.[^.]+$/,"");async function kw(e){if(!jw(e.name))throw new Error(`${e.name}: squad-kit reads PDF, Word (.docx), Markdown and text files. Save the BRD as one of those, or paste the text.`);if(e.size>Of)throw new Error(`${e.name} is larger than 10 MB.`);return kl(e)}function vw({file:e,onPick:n,onClear:s,hint:r}){const[i,o]=C.useState(!1),l=e?jw(e.name):null;return t.jsxs(t.Fragment,{children:[t.jsxs("label",{className:`rq-drop ${i?"over":""}`,onDragOver:d=>{d.preventDefault(),o(!0)},onDragLeave:()=>o(!1),onDrop:d=>{d.preventDefault(),o(!1),n(d.dataTransfer.files)},children:[t.jsx("input",{type:"file",className:"sr-only",accept:".pdf,.docx,.md,.markdown,.txt",onChange:d=>n(d.target.files)}),t.jsx(R7,{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:r??"PDF, Word, Markdown or text, up to 10 MB"})]}),e&&l&&t.jsxs("div",{className:"rq-file",children:[t.jsx("span",{className:`rq-ftag ${l}`,children:UF[l]}),t.jsxs("div",{className:"grow",children:[t.jsx("b",{children:e.name}),t.jsxs("span",{children:[VF(e.size),", ",HF[l]]})]}),t.jsx("button",{className:"iconbtn","aria-label":"Remove the file",onClick:s,children:t.jsx(Ve,{size:14})})]})]})}function KF({onClose:e}){const n=Pt(),s=qt(),[r,i]=C.useState(null),[o,l,d]=$e("add-brd","paste",!1),[u,h,m]=$e("add-brd","text",""),[p,x,y]=$e("add-brd","name",""),[j,k]=C.useState(!1),[b,w]=C.useState([]),[S,T]=C.useState(null),A=C.useRef(null),D=async z=>{const U=z?[...z][0]:void 0;if(U){T(null);try{const I=await kw(U);i(I),l(!1),j||x(_f(U.name))}catch(I){T(I.message)}}},$=async z=>{const U=[...z??[]],I=U.find(M=>M.size>Of);I&&T(`${I.name} is larger than 10 MB.`);const W=await Promise.all(U.filter(M=>M.size<=Of).map(kl)).catch(M=>(T(M.message),[]));w(M=>[...M,...W].slice(0,WF-1))},P=o?!!u.trim():!!r,F=o?`squad requirements add --paste${p.trim()?` --name ${Le(p.trim())}`:""}`:`squad requirements add ${r?Le(r.name):"<file>"}${r&&p.trim()&&p.trim()!==_f(r.name)?` --name ${Le(p.trim())}`:""}${b.map(z=>` --with ${Le(z.name)}`).join("")}`,_=()=>{if(!P)return;T(null);const z=o?{text:u,...p.trim()?{name:p.trim()}:{},with:b.map(({name:U,data:I})=>({name:U,data:I}))}:{file:{name:r.name,data:r.data},...p.trim()?{name:p.trim()}:{},with:b.map(({name:U,data:I})=>({name:U,data:I}))};n.mutate({path:"/api/v1/requirements",body:z},{onSuccess:U=>{d(),m(),y(),e(),s({to:"/requirements/$id",params:{id:U.id}})},onError:U=>T(ca(U))})};return t.jsxs(We,{title:"Add a BRD",onClose:e,losing:r||b.length?r?`the file ${r.name}`:"the attached files":null,footer:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"rq-fcmd",children:t.jsx(te,{text:F})}),t.jsx("button",{className:"btn",onClick:e,children:"Cancel"}),t.jsxs("button",{className:"btn pri",disabled:!P||n.isPending,onClick:_,children:[n.isPending&&t.jsx(st,{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,dir:ge(u),value:u,onChange:z=>h(z.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:()=>l(!1),children:"Choose a file instead"})]})]}):t.jsxs(t.Fragment,{children:[t.jsx(vw,{file:r,onPick:z=>void D(z),onClear:()=>i(null)}),t.jsxs("div",{className:"rq-hint",children:["No file?"," ",t.jsx("button",{className:"rq-link",onClick:()=>l(!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",dir:ge(p),value:p,placeholder:o?"Named after its first heading":"Named after the file",onChange:z=>{x(z.target.value),k(!0)}})]}),t.jsxs("div",{className:"rq-hint",children:["Screen mockups or other files that go with it?"," ",t.jsx("button",{className:"rq-link",onClick:()=>A.current?.click(),children:"Add them"}),t.jsx("input",{ref:A,type:"file",multiple:!0,className:"sr-only",tabIndex:-1,"aria-hidden":"true",onChange:z=>void $(z.target.files)})]}),b.length>0&&t.jsx("div",{className:"rq-extras",children:b.map((z,U)=>t.jsxs("span",{className:"rq-extra",children:[t.jsx(g7,{size:13,"aria-hidden":"true"}),z.name,t.jsx("button",{"aria-label":`Remove ${z.name}`,onClick:()=>w(I=>I.filter((W,M)=>M!==U)),children:t.jsx(Ve,{size:12})})]},`${z.name}-${U}`))}),S&&t.jsx("p",{className:"rq-err",role:"alert",children:S}),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 YF({v:e,onClose:n}){const s=Pt(),r=BF(e.id,!0),[i,o]=C.useState(!1),[l,d]=C.useState(null),[u,h]=C.useState(null),m=e.tracker?.label??"the tracker",p=e.state.sync,x=i&&!l&&(s.isPending||!p||p.status==="running"||p.status==="pending"),y=i&&p?.status==="done"&&!s.isPending,j=i&&p?.status==="failed"||!!l,k=r.data,b=pS(e),w=s.isPending?jf(void 0):jf(p,u??yw(e.id)),S=Rv(w),T=async()=>{d(null),o(!0);const $=j?(await r.refetch()).data??k:k,P=$?{items:$.items,links:$.first?$.counts.links:$.links}:null;h(P),P&&nj(e.id,P),s.mutate({path:`${ru(e.id)}/send`,quiet:!0},{onSuccess:F=>P&&F?.state?.sync?.at&&nj(e.id,{...P,at:F.state.sync.at}),onError:F=>d(ca(F))})},A=k?.tracker.project??e.tracker?.project,D=k&&k.items===0&&k.links===0;return t.jsxs(We,{title:`Send to ${m}`,onClose:n,footer:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"rq-fcmd",children:t.jsx(te,{text:`squad requirements send ${e.id}`})}),x||y?t.jsx("button",{className:"btn",onClick:n,children:"Close"}):t.jsxs(t.Fragment,{children:[t.jsx("button",{className:"btn",onClick:n,children:"Cancel"}),j?t.jsxs("button",{className:"btn pri",onClick:()=>void T(),disabled:s.isPending,children:[t.jsx(oi,{size:14})," Send again"]}):t.jsx("button",{className:"btn pri",onClick:()=>void T(),disabled:!k||!!D||s.isPending,children:k?k.first?`Send ${k.items} items`:"Send changes":"Send"})]})]}),children:[t.jsxs("p",{children:["Into ",A?t.jsxs(t.Fragment,{children:["project ",t.jsx("b",{className:"rq-ink",children:A})]}):`your ${m} 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. ",ca(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}),pp(k.levels.epic),t.jsx("span",{children:fp(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}),pp(k.levels.feature),", each under its epic",t.jsx("span",{children:fp(k.counts.features,k.first)})]}),t.jsxs("div",{className:"rq-li",children:[t.jsx("b",{children:k.counts.stories.all}),pp(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':fp(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",b&&t.jsx(L,{text:`"${b}"`})]})]}),D&&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 ",m,"."]})]}),i&&(x||y||j)&&t.jsx("div",{className:`rq-sendprog ${j?"fail":""}`,role:"status",children:j?t.jsxs("span",{children:[t.jsx("b",{children:"The send stopped."})," ",l??p?.error??"Something went wrong on the way."," What was sent stays sent; Send again carries on without doubles."]}):y?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 GF({v:e,item:n,text:s,onClose:r}){const i=Pt(),[o,l]=C.useState(s??""),d=n===e.id,u=d?null:Zn(e,n),h=e.status==="approved"&&pl(e).some(({story:p})=>p.ticket),m=()=>i.mutate({path:`${ru(e.id)}/items/${encodeURIComponent(n)}/redo`,body:{ask:o.trim()},done:`The Analyst is redoing ${d?"the breakdown":n}.`},{onSuccess:r});return t.jsxs(We,{title:d?"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(te,{text:`squad requirements redo ${e.id} ${n} ${Le(o.trim()||"what to change")}`})}),t.jsx("button",{className:"btn",onClick:r,children:"Cancel"}),t.jsx("button",{className:"btn pri",disabled:!o.trim()||i.isPending,onClick:m,children:"Ask the Analyst"})]}),children:[t.jsx(L,{as:"p",text:`${d?"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} ${u?.item.title??""}. The Analyst rewrites it and keeps its key.`}${h?" 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,dir:ge(o),value:o,onChange:p=>l(p.target.value),placeholder:d?"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 QF({v:e,level:n,under:s,onClose:r,onAdded:i}){const o=Pt(),l=C.useMemo(()=>n==="feature"?e.epics.map(S=>({key:S.key,label:`${S.key} ${S.title}`})):n==="story"?e.epics.flatMap(S=>[...S.features.map(T=>({key:T.key,label:`${S.title} › ${T.title}`})),{key:S.key,label:`${S.title}, straight under the epic`}]):[],[e.epics,n]),[d,u]=C.useState(s&&l.some(S=>S.key===s)?s:l.at(n==="story"?0:-1)?.key??""),[h,m,p]=$e(e.id,`add-${n}-title`,""),[x,y,j]=$e(e.id,`add-${n}-about`,""),k=n==="epic"?"an epic":`a ${n}`,b=!h.trim()||n!=="epic"&&!d||o.isPending,w=()=>{b||o.mutate({path:`${ru(e.id)}/items`,body:{title:h.trim(),...n!=="epic"?{under:d,level:n}:{},...x.trim()?n==="epic"?{goal:x.trim()}:n==="feature"?{summary:x.trim()}:{story:x.trim()}:{}}},{onSuccess:S=>{p(),j(),i(S.key),r()}})};return t.jsxs(We,{title:`Add ${k}`,onClose:r,footer:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"rq-fcmd",children:t.jsx(te,{text:`squad requirements add-item ${e.id}${n!=="epic"?` --under ${d}`:""}${n==="feature"?" --feature":""} --title ${Le(h.trim()||"…")}`})}),t.jsx("button",{className:"btn",onClick:r,children:"Cancel"}),t.jsxs("button",{className:"btn pri",disabled:b,onClick:w,children:["Add ",k]})]}),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:d,onChange:S=>u(S.target.value),children:l.map(S=>t.jsx("option",{value:S.key,children:hs(S.label)},S.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,dir:ge(h),value:h,onChange:S=>m(S.target.value),onKeyDown:S=>S.key==="Enter"&&w()})]}),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",dir:ge(x),value:x,onChange:S=>y(S.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 ZF({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((i,o)=>t.jsxs("div",{className:"rq-lo",children:[t.jsx(L,{as:"b",text:i.text}),t.jsx(L,{text:i.why}),t.jsxs("div",{className:"rq-lo-acts",children:[i.ref&&t.jsx("button",{className:"rq-link",onClick:()=>s(i.ref),children:t.jsx(L,{text:hl(i.ref)})}),r&&t.jsxs("button",{className:"btn sm",onClick:()=>r(Wy(i)),title:`squad requirements redo ${e.id} ${e.id} ${Le(Wy(i))}`,children:[t.jsx(Gn,{size:13})," Ask the Analyst to add it"]})]})]},o))})]})}function sj({items:e,ok:n}){return t.jsx("ul",{className:"rmlist",children:e.map(s=>t.jsxs("li",{children:[n?t.jsx(fe,{size:16,className:"ok","aria-hidden":!0}):t.jsx(Ve,{size:16,className:"x","aria-hidden":!0}),t.jsx("span",{children:s})]},s))})}function bw({id:e,title:n,sentTo:s,onClose:r,onDeleted:i}){const o=Pt(),[l,d]=C.useState(null),u=()=>o.mutate({path:ru(e),method:"DELETE",quiet:!0,done:`Deleted ${e}.`},{onSuccess:()=>{r(),i?.()},onError:h=>d(ca(h))});return Od.createPortal(t.jsxs(We,{title:`Delete ${e}?`,icon:t.jsx("span",{className:"glyph",children:t.jsx(Pn,{size:15})}),onClose:r,footer:t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"btn danger",disabled:o.isPending,onClick:u,children:[t.jsx(Pn,{size:15})," ",o.isPending?"Deleting…":`Delete ${e}`]}),t.jsx("button",{className:"btn",onClick:r,children:l?"Keep it":"Cancel"}),t.jsx("span",{className:"grow"}),t.jsx(te,{text:`squad requirements delete ${e}`})]}),children:[t.jsx(L,{as:"p",text:n}),l&&t.jsx("div",{className:"stuckbox rm-gap",role:"alert",children:l}),t.jsx("div",{className:"lbl",children:"This removes"}),t.jsx(sj,{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(sj,{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 ww({choices:e,label:n="More actions"}){const[s,r]=C.useState(!1),i=C.useRef(null);return C.useEffect(()=>{if(!s)return;const o=d=>i.current&&!i.current.contains(d.target)&&r(!1),l=d=>{d.key==="Escape"&&(d.preventDefault(),r(!1))};return document.addEventListener("mousedown",o),document.addEventListener("keydown",l),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("keydown",l)}},[s]),e.length?t.jsxs("span",{className:"more rq-more",ref:i,children:[t.jsx("button",{className:"iconbtn","aria-label":n,"aria-haspopup":"menu","aria-expanded":s,title:n,onClick:()=>r(!s),children:t.jsx(Ok,{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 XF(e,n){return`${Ed(e.id,e.source.file)}${n?.page?`#page=${n.page}`:""}`}async function JF(e,n){const s=await fetch(Ed(e,n));if(!s.ok)throw new Error(s.status===404?"not found":`${s.status}`);return s.text()}function Nw({v:e,at:n,onClose:s}){const[r,i]=C.useState(null),[o,l]=C.useState(null),d=C.useRef(null),u=Math.max(1,e.source.kind==="pdf"?0:e.source.pages??1);C.useEffect(()=>{let m=!0;const p=Array.from({length:u},(x,y)=>`text/part-${String(y+1).padStart(2,"0")}.md`);return Promise.all(p.map(x=>JF(e.id,x).catch(()=>""))).then(x=>{m&&(x.some(Boolean)||l("squad-kit could not open the text of this document. Download the original instead."),i(x))}).catch(()=>m&&l("squad-kit could not open the text of this document.")),()=>{m=!1}},[e.id,u]),C.useEffect(()=>{if(!r||!n||!d.current)return;const m=[...d.current.querySelectorAll("h1, h2, h3, h4, h5, h6")],p=y=>{const j=(y.textContent??"").trim().toLowerCase();return n.section&&(j===n.section.toLowerCase()||j.startsWith(`${n.section.toLowerCase()} `))||n.title&&j.includes(n.title.toLowerCase())},x=m.find(p);x&&(x.classList.add("rq-hit"),x.scrollIntoView({block:"start"}))},[r,n]);const h=m=>/^(https?:|data:)/.test(m)?m:Ed(e.id,m.replace(/^(\.\.\/)+/,""));return t.jsx(We,{wide:!0,title:e.source.name,onClose:s,footer:t.jsxs(t.Fragment,{children:[n&&t.jsx(L,{className:"note",text:hl(n)}),t.jsx("span",{className:"grow"}),t.jsxs("a",{className:"btn",href:Ed(e.id,e.source.file),target:"_blank",rel:"noreferrer",download:e.source.name,children:[t.jsx(us,{size:14})," The original"]}),t.jsx("button",{className:"btn pri",onClick:s,children:"Close"})]}),children:t.jsx("div",{className:"rq-doc",ref:d,children:o?t.jsx("p",{className:"rq-err",children:o}):r?r.map((m,p)=>t.jsx(Gm,{remarkPlugins:[e1],rehypePlugins:[Nm],components:{img:({src:x,alt:y})=>t.jsx("img",{src:x?h(x):"",alt:y??"",loading:"lazy"}),a:({href:x,children:y})=>t.jsxs("a",{href:x,target:"_blank",rel:"noreferrer",children:[y," ",t.jsx(Kn,{size:11})]})},children:m},p)):t.jsx("p",{className:"note",children:"Opening the document…"})})})}function Sw(e){const[n,s]=C.useState(void 0);return{open:r=>{e&&(e.source.kind==="pdf"?window.open(XF(e,r),"_blank","noopener"):s(r??null))},viewer:n,close:()=>s(void 0)}}function ez(e,n,s){return pl(e).filter(({story:r})=>r.key!==n&&!s.includes(r.key)).map(({story:r})=>({key:r.key,label:`${r.key} ${r.title}`}))}const tz={gap:"Missing in the BRD",clash:"Two parts clash",check:"A check failed"};function g1(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 Cw(e,n){return`/requirements/${encodeURIComponent(e)}${n?`?item=${encodeURIComponent(n)}`:""}`}function nz(e,n){for(const s of e?.epics??[]){for(const r of s.features)if(r.stories.some(i=>i.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 rj=/\s*\(suggested\)\s*$/i;function sz(e){return e.map(n=>({text:n.replace(rj,""),suggested:rj.test(n)}))}function rz(e){return e.stage==="specs"?"planning":e.stage==="implement"?"building":e.stage==="test"?"testing":e.stage==="review"?"reviewing":"working"}function iz(e){return e.length<=1?e[0]??"":`${e.slice(0,-1).join(", ")} and ${e.at(-1)}`}function az(e,n){const s=e.epics.flatMap(l=>[...l.features.flatMap(d=>d.stories),...l.stories]),r=new Set(e.progress.filter(l=>l.state==="merged"||l.state==="released").map(l=>l.key)),i=new Set,o=l=>{for(const d of s)d.dependsOn.includes(l)&&!i.has(d.key)&&(i.add(d.key),o(d.key))};return o(n),s.filter(l=>i.has(l.key)&&!r.has(l.key)).map(l=>`${l.key} ${l.title}`)}function oz(e,n){if(!e||!n.breakdown)return"";const s=az(e,n.breakdown.item),r=!!e.state.build?.on;return s.length?`${iz(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 lz(e){return e.ticket||!e.page&&!e.section?null:{...e.section?{section:e.section}:{},...e.page?{page:e.page}:{}}}function $w(e){return we({queryKey:["requirements",e,"view"],queryFn:()=>ke(`/api/v1/requirements/${e}`),enabled:!!e,refetchInterval:4e3})}function x1({id:e,item:n,children:s,className:r}){const i=xn(),o=Cw(e,n),l=d=>{d.metaKey||d.ctrlKey||d.shiftKey||d.button!==0||(d.preventDefault(),i.navigate({href:`${na}${o}`}))};return t.jsx("a",{className:r,href:`${na}${o}`,onClick:l,children:s})}function cz({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 dz({t:e}){const n=$w(e.breakdown?.id).data;return e.breakdown?t.jsxs("div",{className:"brdplace",children:["From"," ",t.jsx(x1,{id:e.breakdown.id,item:e.breakdown.item,children:e.breakdown.id})," ","› ",t.jsx(iv,{path:nz(n,e.breakdown.item)})]}):null}function uz({t:e}){return e.track!=="auto"?null:t.jsx("span",{className:"prio auto",children:"Builds by itself"})}function hz({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 Tw({kind:e}){return t.jsx("span",{className:`stoptag ${e}`,children:tz[e]})}function pz({t:e,extra:n}){const s=oe(),r=e.agentQuestion,i=r.kind,o=$w(e.breakdown?.id).data,l=sz(r.options),[d,u]=C.useState(()=>l.find(k=>k.suggested)?.text??null),[h,m]=$e(e.id,"stop-own",""),p=ft[r.from],x=d===""?h.trim():d,y=oz(o,e),j=Sw(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(Tw,{kind:i}),t.jsxs("span",{children:["The ",p," found it while ",rz(e),", ",Je(r.at)]})]}),t.jsx(L,{as:"p",className:"stuckq",text:r.text}),t.jsx(fz,{list:r.sources,onOpenRef:o?j.open:void 0}),r.files&&r.files.length>0&&t.jsx(Kb,{ticket:e.id,files:r.files}),t.jsxs("div",{className:"opts2",children:[l.map(k=>t.jsxs("button",{className:`opt2 ${d===k.text?"pick":""}`,...De(k.text),onClick:()=>u(k.text),"aria-pressed":d===k.text,children:[t.jsx("b",{children:t.jsx(L,{text:k.text})}),(k.suggested||d===k.text)&&t.jsxs("span",{className:"optfoot",children:[k.suggested&&t.jsxs("span",{className:"rec",children:[p," suggests"]}),d===k.text&&t.jsxs("span",{className:"yourpick",children:[t.jsx(fe,{size:13,strokeWidth:2.5})," Your pick"]})]})]},k.text)),t.jsx("button",{className:`opt2 ${d===""?"pick":""}`,onClick:()=>u(""),"aria-pressed":d==="",children:t.jsx("b",{children:"Something else…"})})]}),d===""&&t.jsx("textarea",{className:"input",rows:3,style:{width:"100%"},autoFocus:!0,dir:ge(h),value:h,placeholder:"Your answer",onChange:k=>m(k.target.value)}),(r.why||y)&&t.jsx(L,{as:"p",className:"stopwhy",text:[r.why,y].filter(Boolean).join(" ")})]}),t.jsx(y1,{t:e}),n]}),o&&j.viewer!==void 0&&Od.createPortal(t.jsx(Nw,{v:o,at:j.viewer??void 0,onClose:j.close}),document.body),t.jsxs("div",{className:"df",children:[t.jsxs("button",{className:"btn you",disabled:!x||s.isPending,onClick:()=>s.mutate({path:`/api/v1/tickets/${e.id}/reply`,body:{text:x},done:`Sent. The ${p} carries on.`}),children:[t.jsx(Ps,{size:15})," Answer"]}),!e.chat?.open&&t.jsx(ki,{t:e,agent:r.from,label:"Ask about this"}),t.jsx("span",{className:"grow"}),t.jsx(te,{text:`squad reply ${e.id}${x?` ${Le(x.length>40?`${x.slice(0,40)}…`:x)}`:""}`})]})]})}function fz({list:e,onOpenRef:n}){return e?.length?t.jsxs("p",{className:"stopsrc",children:["Sources:"," ",e.map((s,r)=>{const i=lz(s);return t.jsxs("span",{children:[r>0&&" · ",s.ticket?t.jsx(xe,{to:"/board",search:{ticket:s.ticket},children:t.jsx(L,{text:s.text})}):i&&n?t.jsx("button",{className:"linkbtn",onClick:()=>n(i),title:"Open this place in the document",children:t.jsx(L,{text:s.text})}):t.jsx(L,{text:s.text})]},`${s.text}-${r}`)})]}):null}function Ew(e){return e.by==="answer"?"from your answer":`${e.by.charAt(0).toUpperCase()}${e.by.slice(1)}`}function mz({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(xe,{to:"/board",search:{ticket:n},children:n}),", linked to this one."]}):null}function y1({t:e}){const n=ba(),[s,r]=C.useState(null),i=e.decided??[];if(!i.length)return null;const o=Tn(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:i.map(l=>t.jsxs("li",{children:[t.jsxs("span",{className:"dwho",children:[Ew(l)," · ",Je(l.at)]}),l.changed?t.jsxs(t.Fragment,{children:[t.jsx(L,{className:"was",text:l.text}),t.jsx(L,{lead:t.jsx("b",{children:"Now:"}),text:l.changed.text}),t.jsx(mz,{d:l})]}):t.jsxs(t.Fragment,{children:[t.jsx(L,{text:l.text}),o&&t.jsx("button",{className:"linkbtn",onClick:()=>r(l),children:"Change"})]})]},l.id))}),s&&t.jsx(gz,{t:e,d:s,onClose:()=>r(null)})]})}function gz({t:e,d:n,onClose:s}){const r=oe(),{toast:i}=qe(),[o,l,d]=$e(e.id,`decided-${n.id}`,""),u=Xs(e),h=o.trim();return t.jsxs(We,{title:"Change what was decided",icon:t.jsx(Ts,{size:16}),onClose:s,footer:t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"btn pri",disabled:!h||r.isPending,onClick:()=>r.mutate({path:`/api/v1/tickets/${e.id}/decided/${n.id}`,body:{text:h}},{onSuccess:m=>{i(Iv(e.id,m?.decided?.find(p=>p.id===n.id)?.changed?.ticket)),d(),s()}}),children:[t.jsx(Ts,{size:15})," Change it"]}),t.jsx("button",{className:"btn",onClick:s,children:"Cancel"}),t.jsx("span",{className:"grow"}),t.jsx(te,{text:`squad decided ${e.id} ${n.id} ${Le(h||"what you want instead")}`})]}),children:[t.jsx("p",{className:"note",style:{marginBottom:8},children:n.by==="answer"?"From your answer, the squad decided:":`The ${Ew(n)} decided:`}),t.jsx(L,{as:"div",className:"decidedq",text: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,dir:ge(o),value:o,onChange:m=>l(m.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 iu(){return we({queryKey:["requirements","waiting"],queryFn:()=>ke("/api/v1/requirements/waiting"),enabled:!!Ct,refetchInterval:3e3}).data?.breakdowns??[]}function Aw(){const n=(we({queryKey:["app","projects"],queryFn:()=>ke("/api/v1/app/projects"),refetchInterval:2e3}).data?.projects??[]).filter(r=>r.open);return t8({queries:n.map(r=>({queryKey:["app","requirements-waiting",r.id],queryFn:()=>ke(`/p/${encodeURIComponent(r.id)}/api/v1/requirements/waiting`),refetchInterval:3e3,retry:!1}))}).flatMap((r,i)=>(r.data?.breakdowns??[]).map(o=>({...o,project:{id:n[i].id,name:n[i].name}})))}function Pw(e){return`/p/${encodeURIComponent(e.project.id)}${Cw(e.id)}`}function xz(e){return`squad requirements answer ${e.id}${e.project?` --project ${gi(e.project.name)}`:""}`}function Df(e){return`The Analyst has ${e.questions} ${e.questions===1?"question":"questions"}`}function yz({w:e}){return t.jsxs("div",{className:"yitem",title:`${e.project?`${e.project.name} · `:""}${e.id} · ${e.title}
|
|
674
|
-
${Df(e)}`,children:[t.jsx("span",{className:"yid",children:e.project?`${e.project.name} · ${e.id}`:e.id}),t.jsx("span",{className:"yline",children:Df(e)}),e.project?t.jsx("a",{className:"btn sm you",href:Pw(e),children:"Answer"}):t.jsx(x1,{id:e.id,className:"btn sm you",children:"Answer"})]})}function Rw({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:Je(e.since)})]}),t.jsx(L,{as:"h3",text:e.title}),t.jsxs("p",{children:[Df(e),". It writes the breakdown once you answer."]})]}),t.jsx(te,{text:xz(e)}),e.project?t.jsx("a",{className:"btn pri sm",href:Pw(e),children:"Answer"}):t.jsx(x1,{id:e.id,className:"btn pri sm",children:"Answer"})]})}function Iw({t:e}){const n=g1(e);return n?t.jsx(Tw,{kind:n}):null}function Fw(){return we({queryKey:["app","waiting"],queryFn:()=>ke("/api/v1/app/waiting"),refetchInterval:2e3})}function ij(){const e=Ue(),n=ta({select:o=>o.location.pathname}),s=e.data?.ready?e.data:null,r=C.useMemo(()=>(s?.tickets??[]).filter(ul).map(o=>({key:o.id,since:yv(o),ticket:o})),[s]),i=iu();return zw(s?.meta.project,r.length+i.length),Ow(),n.startsWith("/inbox")?null:t.jsx(qw,{items:r,breakdowns:i})}function jz(){const e=Fw(),n=C.useMemo(()=>(e.data?.items??[]).map(({project:r,ticket:i})=>({key:`${r.id}/${i.id}`,since:yv(i),ticket:i,project:r})),[e.data]),s=Aw();return zw("squad-kit",n.length+s.length),Ow(),t.jsx(qw,{items:n,breakdowns:s,home:!0})}function zw(e,n){C.useEffect(()=>{e&&(document.title=C9(e,n))},[e,n])}function kz(e){const[n,s]=C.useState(Date.now);return C.useEffect(()=>{const r=setInterval(()=>s(Date.now()),e);return()=>clearInterval(r)},[e]),n}function qw({items:e,home:n,breakdowns:s=[]}){const[r]=C.useState(()=>new T9),i=kz(3e4),o=C.useMemo(()=>r.sort(e),[r,e]),l=o.length+s.length;if(!l)return null;const d=o.slice(0,2),u=s.slice(0,2-d.length),h=l-d.length-u.length,m=l===1?"1 thing needs you":`${l} things need you`,p=x=>h>0&&(n?t.jsxs("button",{className:`ymore ${x}`,onClick:()=>document.getElementById("waiting")?.scrollIntoView({behavior:"smooth",block:"start"}),children:["and ",h," more"]}):t.jsxs(xe,{to:"/inbox",className:`ymore ${x}`,children:["and ",h," more"]}));return t.jsxs("section",{className:"ybar","aria-label":"Waiting for you",children:[t.jsx("span",{className:"ybar-n","aria-hidden":!0,children:l}),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:m}),t.jsxs("div",{className:"ybar-items",children:[d.map(x=>t.jsx(vz,{it:x,now:i},x.key)),u.map(x=>t.jsx(yz,{w:x},`${x.project?.id??""}/${x.id}`))]}),p("ymore-row"),t.jsx(Sz,{})]})}function vz({it:e,now:n}){const s=e.ticket,r=Gs(s)?mi(s):void 0,i=s.waiting?.summary??(r?`Change ${r.id} to the spec waits for you`:As(s)?Pm(s):s.outdated?.length?$m(s):`Looks stuck: ${s.quiet?.detail??"no progress"}`),o=s.waiting?jd(s):r?"Check the change":"Check it",l=s.waiting?.kind==="ask"&&s.agentQuestion?`“${s.agentQuestion.text}”`:s.title,d=[e.project?.name,s.id,Zs[s.stage],$9(e.since,n)].filter(Boolean).join(" · ");return t.jsxs("div",{className:"yitem",title:`${d}
|
|
675
|
-
${i}
|
|
676
|
-
${l}`,children:[t.jsx("span",{className:"yid",children:e.project?`${e.project.name} · ${s.id}`:s.id}),g1(s)?t.jsxs("span",{className:"yline",...De(s.title),children:[t.jsx(Iw,{t:s}),t.jsx(L,{text:s.title})]}):t.jsx(L,{className:"yline",text:i}),e.project?t.jsx("a",{className:"btn sm you",href:kv(e.project.id,s),children:o}):s.waiting?.kind==="proof"?t.jsx(xe,{to:"/tickets/$id/proof",params:{id:s.id},className:"btn sm you",children:o}):t.jsx(xe,{to:"/board",search:{ticket:s.id},className:"btn sm you",children:o})]})}const Lw="sk.notices";function Vo(){try{return window.localStorage}catch{return null}}function j1(){const e=Vo()?.getItem(Lw);return e==="on"||e==="off"?e:null}function k1(){return typeof Notification>"u"?window.isSecureContext===!1?"insecure":"none":window.isSecureContext===!1?"insecure":Notification.permission}let v1=!1;function aj(e){v1=e,Mw()}const Bf=new Set,Mw=()=>Bf.forEach(e=>e());function bz(e){return Bf.add(e),window.addEventListener("storage",e),window.addEventListener("focus",e),document.addEventListener("visibilitychange",e),()=>{Bf.delete(e),window.removeEventListener("storage",e),window.removeEventListener("focus",e),document.removeEventListener("visibilitychange",e)}}const wz=()=>`${j1()??""}|${k1()}|${v1?"asking":""}`;function Op(e){try{Vo()?.setItem(Lw,e)}catch{}Mw()}function Nz(){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 b1(){const{toast:e}=qe(),[n,s,r]=C.useSyncExternalStore(bz,wz).split("|"),i=n||null;return{choice:i,permission:s,asking:r==="asking",on:i==="on"&&s==="granted",canAsk:i===null&&(s==="default"||s==="granted"),turnOn:async()=>{if(v1)return;aj(!0);let l="error";try{l=await M9(typeof Notification>"u"?void 0:Notification,{secure:window.isSecureContext!==!1})}finally{aj(!1)}const d=O9(l);d.choice&&Op(d.choice),d.test&&Nz(),e(d.say,d.bad?"err":void 0)},turnOff:()=>{Op("off"),e("Desktop notices are off")},notNow:()=>{Op("off"),e("No desktop notices. Turn them on in Settings any time.")}}}function Sz(){const e=b1();return!e.canAsk&&!e.asking?null:t.jsxs("div",{className:"ybar-ask","aria-live":"polite",title:e.asking?vv:"Get a desktop notice when the squad needs you",children:[t.jsx(uf,{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 Cz(){const e=b1();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:ko})]}):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?vv:e.choice==="on"&&e.permission==="default"?`You turned them on, but your browser has not allowed them yet. ${ko}`:"A notice for each new question, approval, proof and failure, in this browser. No sounds."})]})})]})}const $z=new F9;function Ow(){Ez();const e=Fw(),n=qt(),s=e.data;C.useEffect(()=>{if(!s)return;const r=$z.next(I9(s.items),Date.now());if(!r.length||j1()!=="on"||k1()!=="granted")return;const i=o=>{if(o.project.id!==Ct)return window.location.assign(kv(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)jv(o.key,Date.now(),Vo())&&Tz(o,i)},[s,n])}function Tz(e,n){const{title:s,body:r}=q9(e);_w(s,r,e.key,()=>n(e))}function _w(e,n,s,r){try{const i=new Notification(e,{body:n,tag:s,silent:!0});i.onclick=()=>{window.focus(),i.close(),r()}}catch{}}function Ez(){const e=Oo(Vo()).length>0,s=we({queryKey:["app","projects"],queryFn:()=>ke("/api/v1/app/projects"),refetchInterval:2e3,enabled:e}).data;C.useEffect(()=>{if(!s)return;const r=Vo();for(const i of U9(s.projects,Oo(r))){if(W9(r,i.id),j1()!=="on"||k1()!=="granted"||!jv(`setup/${i.id}`,Date.now(),r))continue;const{title:o,body:l}=H9(i.name);_w(o,l,`setup/${i.id}`,()=>window.location.assign(`/p/${encodeURIComponent(i.id)}/overview`))}},[s])}function Ko(e=""){return we({queryKey:["conversations",e],queryFn:()=>ke(`/api/v1/conversations${e?`?q=${encodeURIComponent(e)}`:""}`),refetchInterval:1500})}function w1(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 Az(){const e=Kd(),n=xa(ya),s=Ko();return!n&&!e.min&&(s.data??[]).some(r=>r.open)}function Pz(e){const n=ft[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 Rz(){const e=Kd(),n=xa(ya),s=qt(),r=Ko(),[i,o]=C.useState(null),l=C.useRef(null),d=(r.data??[]).filter(p=>p.open),u=d.find(p=>p.id===e.tab)??d[0];if(C.useEffect(()=>{l.current?.querySelector(".ctab.on")?.scrollIntoView({block:"nearest",inline:"nearest"})},[u?.id,e.min]),!u)return null;const h=p=>void s({to:"/conversations",search:{ticket:p}});if(e.min||n){const p=d.find(x=>x.thinking)??d.find(x=>x.yourTurn)??u;return t.jsxs("div",{className:"cmini",role:"status",children:[t.jsx(Yn,{role:p.with,small:!0,live:p.thinking}),t.jsxs("div",{children:[t.jsxs("b",{children:[d.length," ",d.length===1?"conversation":"conversations"]}),t.jsx("small",{children:Pz(p)})]}),t.jsx("button",{className:"btn pri sm",onClick:()=>n?h(p.id):Ss.restore(),children:"Open"})]})}const m=p=>{p.preventDefault();const x=p.clientX,y=e.width,j=b=>Ss.resize(y+(x-b.clientX)),k=()=>{window.removeEventListener("mousemove",j),window.removeEventListener("mouseup",k),document.body.classList.remove("cresizing")};document.body.classList.add("cresizing"),window.addEventListener("mousemove",j),window.addEventListener("mouseup",k)};return t.jsxs(t.Fragment,{children:[i&&t.jsx(i1,{doc:i,onClose:()=>o(null)}),t.jsxs("section",{className:"cdock",style:{width:e.width},"aria-label":"Conversations",children:[t.jsx("span",{className:"cgrip",onMouseDown:m,"aria-hidden":"true"}),t.jsxs("div",{className:"ctabs",children:[t.jsx("div",{className:"ctabscroll",role:"tablist","aria-label":"Open conversations",ref:l,children:d.map(p=>{const x=p.id===u.id,y=w1(p,e.seen);return t.jsxs("button",{className:`ctab ${x?"on":""}`,role:"tab","aria-selected":x,onClick:()=>Ss.pick(p.id),title:`${p.id} · ${p.title}`,children:[t.jsx(Yn,{role:p.with,small:!0}),t.jsx("span",{className:"tid",children:p.id}),t.jsx("span",{className:"tn",children:ft[p.with]}),p.thinking&&!x&&t.jsxs("span",{className:`cdots sm c-${p.with}`,"aria-label":"Typing",children:[t.jsx("i",{}),t.jsx("i",{}),t.jsx("i",{})]}),y>0&&!x&&t.jsx("span",{className:"cbadge","aria-label":`${y} unread`,children:y})]},p.id)})}),t.jsx(Dw,{}),t.jsx("span",{className:"grow"}),t.jsx("button",{className:"iconbtn",onClick:()=>h(u.id),"aria-label":"Open full screen",title:"Full screen",children:t.jsx(Wd,{size:15})}),t.jsx("button",{className:"iconbtn",onClick:Ss.minimize,"aria-label":"Minimize",title:"Minimize",children:t.jsx(ga,{size:16})})]}),t.jsx(m1,{id:u.id,size:"panel",onOpenDoc:o},u.id)]})]})}function Dw(){const e=Ue(),n=oe(),[s,r]=C.useState(!1),[i,o]=C.useState(""),[l,d]=C.useState("analyst"),u=(e.data?.ready?e.data.tickets:[]).filter(m=>!m.chat?.open&&!m.takenOver),h=()=>n.mutate({path:`/api/v1/tickets/${i}/chat/start`,body:{with:l}},{onSuccess:()=>{r(!1),Ss.show(i)}});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(xt,{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:i,onChange:m=>o(m.target.value),children:[t.jsx("option",{value:"",children:"Pick a ticket"}),u.map(m=>t.jsxs("option",{value:m.id,children:[m.id," · ",hs(m.title)]},m.id))]})]}),t.jsxs("label",{children:[t.jsx("span",{children:"Talk to"}),t.jsx("select",{className:"input",value:l,onChange:m=>d(m.target.value),children:Object.keys(ft).map(m=>t.jsxs("option",{value:m,children:["The ",ft[m]]},m))})]}),t.jsxs("div",{className:"cbtns",children:[t.jsx("button",{className:"btn pri sm",disabled:!i||n.isPending,onClick:h,children:"Start talking"}),t.jsx("button",{className:"btn sm",onClick:()=>r(!1),children:"Cancel"})]})]})]})}const Bw=["app","usage-limit"];function Ww(){return we({queryKey:Bw,queryFn:()=>ke("/api/v1/app/usage-limit"),refetchInterval:5e3})}function Wf(){const{data:e}=Ww(),n=In(),{toast:s}=qe();if(!e?.pause||!e.text)return null;const r=async()=>{try{n.setQueryData(Bw,await ot("/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(i){s(i instanceof Error?i.message:String(i),"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(ff,{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(te,{text:"squad try-now"})]})]})}function Uf(){const{data:e}=we({queryKey:["app","save-trouble"],queryFn:()=>ke("/api/v1/app/save-trouble"),refetchInterval:5e3});return e?.text?t.jsxs("section",{className:"upd failed",role:"alert","aria-label":"squad-kit cannot save its work",children:[t.jsx("span",{className:"upd-ic",children:t.jsx(f7,{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:["The squad waits meanwhile. ",e.projects.length>1?`${e.projects.length} projects wait.`:""]}),e.detail&&t.jsxs("details",{children:[t.jsx("summary",{className:"note",children:"For engineers"}),t.jsx("span",{className:"mono",style:{fontSize:12.5,whiteSpace:"pre-wrap"},children:e.detail})]})]})]}):null}function Uw(e){return we({queryKey:["happened",e.id],queryFn:()=>ke(`/api/v1/tickets/${e.id}/happened`),refetchInterval:e.live?5e3:15e3})}function au(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 Iz({t:e,onTab:n,onLog:s}){const r=Uw(e);return r.data?r.data.steps.length?t.jsxs("div",{className:"happened",children:[r.data.steps.map((i,o)=>t.jsx(Fz,{s:i,t:e,onTab:n,onLog:s},`${i.step}-${i.from??i.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 Fz({s:e,t:n,onTab:s,onLog:r}){const i=e.seconds!==void 0?au(e.seconds):"",o=[e.running?`now${i?` · ${i}`:""}`:i,...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(fe,{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:Rn(e.to)})]}),t.jsx(L,{as:"p",className:"hsum",text:e.summary}),e.handedIn&&t.jsx(qz,{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(ga,{size:12})," Skipped ",e.skipped===1?"one action":`${e.skipped} actions`," this step may not take (by design, nothing went wrong)"]}):null]})}const zz={plan:"Open it in Plan",changes:"See the changes",proof:"Open it in Proof"};function N1(e,n=3){const[s,r]=C.useState(!1),i=e.length-n;return{shown:s?e:e.slice(0,n),more:i>0?t.jsx("button",{className:"linkbtn",onClick:()=>r(!s),children:s?"Show less":`+${i} more`}):null}}function qz({h:e,tab:n,onTab:s,ticket:r}){if(e.kind==="verdict")return t.jsx("div",{className:"hverdict",children:t.jsx(oj,{h:e,ticket:r})});const i=n&&s?t.jsx("button",{className:"linkbtn",onClick:()=>s(n),children:e.kind==="checks"?"See them in Proof":zz[n]}):null;return t.jsxs("div",{className:"hgot",children:[t.jsx("b",{children:"Handed in"}),t.jsx(oj,{h:e,ticket:r}),i&&t.jsx("div",{className:"hlink",children:i})]})}function oj({h:e,ticket:n}){switch(e.kind){case"questions":return t.jsx(Lz,{items:e.items});case"spec":return t.jsx(Mz,{story:e.story,criteria:e.criteria});case"design":return t.jsx(Oz,{h:e});case"files":return t.jsx(_z,{h:e});case"checks":return t.jsxs("span",{children:[t.jsx("span",{className:`pill ${e.ok?"ok":"bug"}`,children:e.ok?"Pass":"Failed"})," ",t.jsx(L,{text: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(L,{as:"li",text:s},r))})]});case"shots":return t.jsx(Dz,{shots:e.shots,ticket:n})}}function Lz({items:e}){const{shown:n,more:s}=N1(e);return t.jsxs(t.Fragment,{children:[t.jsx("ol",{className:"hlist",children:n.map((r,i)=>t.jsxs("li",{...De(r.text),children:[t.jsx(L,{text:r.text}),r.answer&&t.jsx(L,{className:"hans",lead:"You:",text:r.answer})]},i))}),s]})}function Mz({story:e,criteria:n}){const{shown:s,more:r}=N1(n);return t.jsxs(t.Fragment,{children:[e&&t.jsx(L,{as:"p",className:"hstory",text: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((i,o)=>t.jsx(L,{as:"li",text:i},o))}),r]})]})}function Oz({h:e}){const{shown:n,more:s}=N1(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",...De(e.title),children:[t.jsx(L,{as:"b",text:e.title}),e.chosen?t.jsx(L,{text:`: ${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((i,o)=>t.jsx(L,{as:"li",text:i},o))}),s]}),r.length>0&&t.jsx("span",{className:"hsub",children:r.join(" · ")})]})}function _z({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(L,{as:"li",text:s},r))})}function Dz({shots:e,ticket:n}){const[s,r]=C.useState(null),i=e.map(o=>({src:Vn(`/api/v1/proof/${o.file}`),caption:o.criterion}));return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"hshots",children:i.map((o,l)=>t.jsxs("button",{className:"zoom",onClick:()=>r(l),"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(L,{as:"small",text:o.caption})]},o.src))}),s!==null&&t.jsx(Ir,{pictures:i,start:s,onClose:()=>r(null)})]})}const Bz={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"},Wz=["analyst","architect","builder","reviewer","tester"];function S1(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 Hw(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 C1(e){const n={runs:0};for(const s of e)Hw(n,s);return n}function Vw(e){return Wz.flatMap(n=>{const s=e.filter(i=>i.role===n);if(!s.length)return[];const r=[];for(const i of s){let o=r.find(l=>l.level===i.level&&l.model===i.model);o||r.push(o={level:i.level,model:i.model,steps:[],total:{runs:0}}),o.steps.includes(i.step)||o.steps.push(i.step),Hw(o.total,i)}return[{role:n,total:C1(s),levels:r}]})}function da(e){return e.costUsd===void 0?null:e.costUsd<.005?"under $0.01":`$${e.costUsd.toFixed(2)}`}function Uc(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 Hf=e=>`${e} ${e===1?"run":"runs"}`;function lj({t:e}){const n=da(e);return n?t.jsxs("span",{title:e.costUnknown?`${Hf(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 cj({t:e}){if(e.inputTokens===void 0&&e.outputTokens===void 0)return t.jsx("span",{className:"note",children:"Not reported"});const n=e.cachedTokens?`, ${Uc(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 ${Uc(e.inputTokens??0)}${n}.`,children:[e.inputTokens!==void 0&&t.jsxs(t.Fragment,{children:[Uc(e.inputTokens)," read"]}),e.inputTokens!==void 0&&e.outputTokens!==void 0&&" · ",e.outputTokens!==void 0&&t.jsxs(t.Fragment,{children:[Uc(e.outputTokens)," written"]})]})}function Uz({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 $1({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((i,o)=>t.jsxs("tr",{children:[t.jsx("td",{children:o===0&&t.jsxs("span",{className:"who",children:[t.jsx(fi,{role:r.role,small:!0})," ",Ys[r.role]]})}),t.jsx("td",{children:t.jsx(Uz,{level:i.level,model:i.model})}),t.jsx("td",{children:s?t.jsxs(t.Fragment,{children:[i.steps.map(l=>Bz[l]??l).join(", "),t.jsxs("span",{className:"note",children:[" · ",Hf(i.total.runs)]})]}):i.total.runs}),t.jsx("td",{children:t.jsx(cj,{t:i.total})}),t.jsx("td",{className:"num",children:t.jsx(lj,{t:i.total})})]},`${r.role}-${i.level}-${i.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:Hf(n.runs)}):n.runs}),t.jsx("td",{children:t.jsx(cj,{t:n})}),t.jsx("td",{className:"num",children:t.jsx(lj,{t:n})})]})})]})}function wa(){return we({queryKey:["cost"],queryFn:()=>ke("/api/v1/cost"),refetchInterval:1e4})}function Hz({t:e}){const n=wa().data?.payment,s=e.usage??[],r=C1(s),i=da(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:i?n?.payment==="api-key"?`${i} on your API key`:`Included in your plan · ${i} value`:"Cost not reported"})]}),s.length?t.jsxs(t.Fragment,{children:[t.jsx($1,{roles:Vw(s),total:r,steps:!0}),t.jsxs("p",{className:"note",style:{marginTop:8},children:[S1(n)," Each role's model level can be changed on the Harness page, under Agents."]})]}):t.jsx("p",{className:"note",children:"Nothing yet. Each run of a role is counted here as the squad works."})]})}function Kw(){return we({queryKey:["usage"],queryFn:()=>ke("/api/v1/usage"),refetchInterval:5e3})}function Vz(){const e=Kw().data?.total,n=wa().data?.payment;return e?.runs?t.jsx("span",{title:S1(n),children:n?.payment==="api-key"?t.jsxs(t.Fragment,{children:["Used ",t.jsx("b",{children:da(e)??"an unknown amount"})," on your API key"]}):t.jsxs(t.Fragment,{children:[t.jsx("b",{children:da(e)??"An unknown amount"})," of AI work, included in your plan"]})}):null}function Kz(){const e=Kw().data,n=wa().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?` (${da(e.project)??"cost not reported"})`:"",e.deleted?.tickets?`, and ${e.deleted.tickets} deleted ${e.deleted.tickets===1?"ticket":"tickets"} (${da(e.deleted.total)??"cost not reported"})`:"",". ",S1(n)," Change a role's model level with its Edit button above."]}),t.jsx("div",{style:{marginTop:10},children:t.jsx($1,{roles:e.roles,total:e.total})})]}):null}const os=e=>e<.005?"under $0.01":`$${e.toFixed(2)}`,Yo=e=>e>0&&e<.01?"under 1%":`${Math.round(e*100)}%`;function Yz({t:e}){const n=we({queryKey:["cost",e.id],queryFn:()=>ke(`/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(dj,{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 ",au(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:[Yo(r.share),s.payment.payment==="api-key"&&r.costUsd!==void 0?` · ${os(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:os(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:os(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($1,{roles:Vw(e.usage??[]),total:C1(e.usage??[]),steps:!0}),t.jsx("div",{style:{marginTop:8},children:t.jsx(te,{text:`squad cost ${e.id}`})})]})]}):t.jsxs("div",{className:"costs",children:[t.jsx(dj,{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 dj({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(fe,{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(xe,{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(Gk,{size:15})}),t.jsxs("b",{children:[e.total.runs?e.total.costUsd!==void 0?os(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(xe,{to:"/settings",children:"Pay with a subscription instead?"})]}),n&&t.jsx(Gz,{b:n,project:e.project})]})}function uj({share:e}){return t.jsx("span",{className:`meter ${e>=1?"over":e>=.8?"warn":""}`,role:"img","aria-label":Yo(e),children:t.jsx("i",{style:{width:`${Math.min(100,Math.round(e*100))}%`}})})}function Gz({b:e,project:n}){return!e.ticketUsd&&!e.monthUsd?t.jsxs("p",{className:"note",children:["This month: ",os(e.monthSpent)," for ",n,". No budget yet: ",t.jsx(xe,{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:[Yo(e.ticketShare)," of this ticket's ",os(e.ticketUsd)," budget"]}),t.jsx(uj,{share:e.ticketShare})]}),e.monthUsd&&e.monthShare!==void 0&&t.jsxs("div",{className:"budgetrow",children:[t.jsxs("span",{children:["This month: ",os(e.monthSpent)," of your ",os(e.monthUsd)," for ",n]}),t.jsx(uj,{share:e.monthShare})]}),[...e.over,...e.warn].map(s=>t.jsxs("p",{className:"budgetsay",children:[t.jsx(Rs,{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 Qz(){const e=wa().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=d=>`${d.kind}:${d.id??e.month.month}:${d.over?"over":"warn"}`,i=e.warnings.filter(d=>!n.includes(r(d)));if(!i.length)return null;const o=i[0],l=d=>d.kind==="month"?`This month the squad used ${Yo(d.share)} of your ${os(d.limit)} budget for ${e.project}${d.over?". Tickets wait for you before their next step":""}`:`${d.id} ${d.title} used ${Yo(d.share)} of its ${os(d.limit)} budget${d.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(Gk,{size:16})}),t.jsxs("div",{className:"upd-main",children:[t.jsx(L,{as:"b",className:"upd-title",text:l(o)}),t.jsxs("span",{className:"upd-sub",children:[i.length>1?`And ${i.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(xe,{to:"/board",search:{ticket:o.id},className:"btn sm",children:["Open ",o.id]}),t.jsx(xe,{to:"/settings",className:"btn sm",children:"Budgets"}),t.jsx("button",{className:"iconbtn","aria-label":"Hide this notice",onClick:()=>s([...n,...i.map(r)]),children:t.jsx(Ve,{size:14})})]})]})}function Zz(){const e=wa().data,n=oe(),[s,r]=C.useState(""),[i,o]=C.useState(""),l=e?.budget;if(C.useEffect(()=>{r(l?.ticketUsd?String(l.ticketUsd):""),o(l?.monthUsd?String(l.monthUsd):"")},[l?.ticketUsd,l?.monthUsd]),!e)return null;const d=e.payment,u=(m,p)=>n.mutate({path:"/api/v1/cost/payment",method:"PUT",body:{payment:m},done:p}),h=d.found?`${d.tool} is signed in with ${d.found.label}${d.found.kind==="subscription"?", a subscription":", paid per use"}.`:`squad-kit could not tell how ${d.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:[h," ",d.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 ${d.payment==="subscription"&&d.from==="you"?"pri":""}`,"aria-pressed":d.payment==="subscription"&&d.from==="you",onClick:()=>u("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 ${d.payment==="api-key"&&d.from==="you"?"pri":""}`,"aria-pressed":d.payment==="api-key"&&d.from==="you",onClick:()=>u("api-key","An API key: the Cost tab shows real dollars and budgets"),children:"An API key"}),t.jsx("button",{className:`btn sm ${d.from!=="you"?"pri":""}`,"aria-pressed":d.from!=="you",onClick:()=>u("auto","squad-kit finds out how you pay"),children:"Find out for me"}),t.jsx("span",{className:"grow"}),t.jsx(te,{text:`squad config set payment ${d.from==="you"?d.payment:"auto"}`})]})]}),d.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:m=>r(m.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:i,placeholder:"No budget",onChange:m=>o(m.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:i.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(te,{text:`squad config set budget --ticket ${s.trim()||"off"} --month ${i.trim()||"off"}`})]})]})]})}const Xz={best:"Best",balanced:"Balanced",thrifty:"Thrifty"};function Jz(){const e=wa().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:Xz[s.quality]}),s.tickets>=e.qualityAfter?t.jsxs("span",{children:[s.costUsd!==void 0?`${os(s.costUsd)} ${e.payment.payment==="api-key"?"":"of AI work "}`:"",s.seconds!==void 0?`${s.costUsd!==void 0?"and ":""}${au(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 Yw(e){try{return new Intl.DisplayNames(["en"],{type:"language"}).of(e)??e}catch{return e}}function Gw({languages:e,value:n,onChange:s}){return e.length<2?null:t.jsx("select",{className:"input sm phone-lang","aria-label":"The language to open the app in",value:n,onChange:r=>s(r.target.value),children:e.map(r=>t.jsx("option",{value:r,children:Yw(r)},r))})}function Vf({phone:e,starting:n}){const s=e.run;return n?t.jsxs("p",{className:"app-more phone-line",role:"status",children:[t.jsx(st,{size:13,className:"spin","aria-hidden":"true"})," ",s?.line??`Getting the app onto squad-kit's ${e.word}`]}):s?.state==="running"?t.jsxs("p",{className:"app-more phone-line",children:[t.jsx(A7,{size:13,"aria-hidden":"true"})," Open on ",s.device??`the ${e.word}`,s.language&&s.language!=="en"?`, in ${Yw(s.language)}`:"",". Close its window when you are done."]}):s?.ended?t.jsx("p",{className:"app-more",children:s.ended}):null}function Qw({phone:e}){return e.ready||!e.why?null:t.jsxs("p",{className:"app-more phone-wait",children:[e.why," ",e.web?"Start opens the web version meanwhile. ":"",t.jsx(xe,{to:"/tools",hash:(e.link??"/tools").split("#")[1]??"",children:"See what's needed"})]})}function Zw(e=4e3){return we({queryKey:["lead"],queryFn:()=>ke("/api/v1/lead"),refetchInterval:e})}function Xw(e){return we({queryKey:["lead","conversation",e],queryFn:()=>ke(`/api/v1/lead/conversations/${encodeURIComponent(e)}`),enabled:!!e,refetchInterval:n=>n.state.data?.thinking?1e3:!1})}function eq(){return we({queryKey:["lead","rules"],queryFn:()=>ke("/api/v1/lead/rules")})}function Jw(){return we({queryKey:["lead","can"],queryFn:()=>ke("/api/v1/lead/can"),staleTime:1/0})}function T1(e){const n=oe();return{press:(r={},i)=>n.mutate({path:`/api/v1/lead/cards/${encodeURIComponent(e.id)}/run`,body:r,...i?{done:i}:{}}),busy:n.isPending}}const tq={quality:"Quality","commands.start":"the start command","commands.url":"the app's address","commands.setup":"the setup command","commands.test":"the test command","commands.lint":"the code check command","commands.build":"the build command"};function nq({card:e}){switch(e.kind){case"draft_story":return t.jsx(sq,{card:e});case"engineer_report":return t.jsx(iq,{card:e});case"open_story":return t.jsx(t4,{card:e});default:return t.jsx(rq,{card:e})}}function E1({card:e}){return t.jsx("span",{className:`lvl ${e.level===2?"ok":""}`,children:rF(e)})}function e4({card:e,story:n}){return e.status==="dismissed"?t.jsx("div",{className:"lc-f lc-quiet",children:"Put aside. Nothing was done."}):t.jsxs("div",{className:"lc-f lc-done",role:"status",children:[t.jsx(fe,{size:15,strokeWidth:2.6,"aria-hidden":"true"}),t.jsx(L,{text:e.byItself??e.result??"Done."}),n&&t.jsxs(xe,{to:"/board",search:{ticket:n},className:"lc-link",children:["Open ",n]})]})}function sq({card:e}){const{press:n,busy:s}=T1(e),[r,i]=C.useState(!1),[o,l]=C.useState(e.title),[d,u]=C.useState(e.ask),[h,m]=C.useState(e.doneWhen),p=e.status==="open",x=o!==e.title||d!==e.ask||JSON.stringify(h)!==JSON.stringify(e.doneWhen),y=()=>n(x?{edits:{title:o,ask:d,doneWhen:h.filter(k=>k.text.trim())}}:{}),j=(k,b)=>m(w=>w.map((S,T)=>T===k?{...S,...b}:S));return t.jsxs("section",{className:"lc lc-draft","aria-label":`${e.storyKind==="bug"?"Bug":"Story"} draft: ${e.title}`,children:[t.jsxs("header",{className:"lc-h",children:[t.jsx("b",{children:e.storyKind==="bug"?"Bug draft":"Story draft"}),t.jsxs("span",{className:"lc-sub",children:["· ",e.storyKind==="bug"?"Bug":"Feature"," · from this conversation"]}),t.jsx(E1,{card:e})]}),t.jsxs("div",{className:"lc-b",children:[r&&p?t.jsxs("div",{className:"lc-edit",children:[t.jsxs("label",{children:[t.jsx("span",{children:"Title"}),t.jsx("input",{className:"input",value:o,dir:ge(o),onChange:k=>l(k.target.value)})]}),t.jsxs("label",{children:[t.jsx("span",{children:"What it is about"}),t.jsx("textarea",{className:"input",rows:3,value:d,dir:ge(d),onChange:k=>u(k.target.value)})]}),t.jsx("div",{className:"dw",children:"Done when · and how it will be proved"}),t.jsx("ol",{className:"lc-rows",children:h.map((k,b)=>t.jsxs("li",{children:[t.jsx("input",{className:"input",value:k.text,dir:ge(k.text),"aria-label":`Done when ${b+1}`,onChange:w=>j(b,{text:w.target.value})}),t.jsx("select",{className:"input",value:k.proof,"aria-label":`How done when ${b+1} will be proved`,onChange:w=>j(b,{proof:w.target.value}),children:Object.keys(zp).map(w=>t.jsx("option",{value:w,children:zp[w]},w))}),t.jsx("button",{className:"iconbtn",onClick:()=>m(w=>w.filter((S,T)=>T!==b)),"aria-label":`Remove done when ${b+1}`,disabled:h.length<2,children:t.jsx(Ve,{size:14})})]},b))}),h.length<8&&t.jsxs("button",{className:"linkbtn",onClick:()=>m(k=>[...k,{text:"",proof:"screen"}]),children:[t.jsx(xt,{size:13}),' Add a "done when"']})]}):t.jsxs(t.Fragment,{children:[t.jsx(L,{as:"div",className:"lc-t",text:o}),d&&d!==o&&t.jsx(L,{as:"div",className:"lc-a",text:d}),t.jsx("div",{className:"dw",children:"Done when · and how it will be proved"}),t.jsx("ol",{className:"dwl",children:h.map((k,b)=>t.jsxs("li",{children:[t.jsx("span",{className:"n",children:b+1}),t.jsx(L,{className:"txt",text:k.text}),t.jsx("span",{className:`kind ${k.proof}`,children:zp[k.proof]})]},b))})]}),e.warnings.map(k=>t.jsxs("div",{className:"lc-warn",children:[t.jsx(Rs,{size:15,"aria-hidden":"true"}),t.jsx(L,{text:k})]},k)),p&&e.result&&t.jsx(L,{as:"p",className:"lc-why",text:e.result})]}),p?t.jsxs("div",{className:"lc-f",children:[t.jsx("button",{className:"btn go",disabled:s||!o.trim()||!h.some(k=>k.text.trim()),onClick:y,children:"Create story"}),t.jsx("button",{className:"btn",disabled:s,onClick:()=>i(!r),"aria-pressed":r,children:r?"Done editing":"Edit"}),t.jsx("button",{className:"btn ghost",disabled:s,onClick:()=>n({dismiss:!0}),children:"Discard"}),t.jsx("span",{className:"lc-after",children:"Becomes a new story in Tickets. Nothing starts until you press Start."}),t.jsx(te,{text:e.command})]}):t.jsx(e4,{card:e,...e.story?{story:e.story}:{}})]})}function t4({card:e}){const n=iw(e.open),s={className:"btn lt-open",title:e.why??"Opens it on the board. Nothing changes.",onClick:()=>Hn.close()},r=t.jsxs(t.Fragment,{children:[t.jsx(s7,{size:14,"aria-hidden":"true"})," ",e.label]});return n?.to==="/tickets/$id/proof"?t.jsx(xe,{to:"/tickets/$id/proof",params:{id:n.id},...s,children:r}):t.jsx(xe,{to:"/board",search:{ticket:e.story,...n?.to==="/board"&&n.tab?{tab:n.tab}:{}},...s,children:r})}function rq({card:e}){const{press:n,busy:s}=T1(e),[r,i]=C.useState(e.kind==="send_answer"?e.text:""),o=aw(e),l=e.kind==="board_action"||e.kind==="send_answer"?e.story:void 0,d=e.kind==="send_answer"?`An answer for ${e.story}`:e.kind==="settings_change"?`Change ${tq[e.setting]??e.setting} to ${e.value}`:`${e.label}${e.story?` · ${e.story}`:""}`,u=e.kind==="board_action"&&o?"Allow once":e.label,h=e.status==="open"&&!e.byItself;return t.jsxs("section",{className:"lc","aria-label":d,children:[t.jsxs("header",{className:"lc-h",children:[t.jsx("b",{children:d}),t.jsx(E1,{card:e})]}),(e.why||e.kind==="send_answer"||e.asksFirst||e.kind==="settings_change"&&e.technical||h&&e.result)&&t.jsxs("div",{className:"lc-b",children:[e.why&&t.jsx(L,{as:"p",className:"lc-a",text:e.why}),e.kind==="send_answer"&&(h?t.jsx("textarea",{className:"input",rows:3,value:r,dir:ge(r),"aria-label":"The answer to send",onChange:m=>i(m.target.value)}):t.jsx(L,{as:"p",className:"lc-quote",text:e.text})),e.kind==="settings_change"&&e.technical&&t.jsx("p",{className:"note",children:"A technical setting: only an engineer changes it."}),e.asksFirst&&h&&t.jsx("p",{className:"note",children:"It came from what the lead read, not from your words, so it asks you first even with Always allow on."}),h&&e.result&&t.jsx(L,{as:"p",className:"lc-why",text:e.result})]}),h?t.jsxs("div",{className:"lc-f",children:[t.jsx("button",{className:"btn pri",disabled:s||e.kind==="send_answer"&&!r.trim(),onClick:()=>n(e.kind==="send_answer"&&r.trim()!==e.text?{edits:{text:r}}:{}),children:u}),o&&t.jsx("button",{className:"btn",disabled:s,onClick:()=>n({always:!0}),title:"Runs by itself from now on, without asking. Only for low-risk actions.",children:"Always allow"}),t.jsx("button",{className:"btn ghost",disabled:s,onClick:()=>n({dismiss:!0}),children:"Not now"}),t.jsx(te,{text:e.command})]}):t.jsx(e4,{card:e,...l?{story:l}:{}})]})}function iq({card:e}){const{press:n,busy:s}=T1(e),{toast:r}=qe(),i=()=>void navigator.clipboard?.writeText(e.report??"").then(()=>r("Copied the report"),()=>r("Could not copy. Select the text instead.","err"));return t.jsxs("section",{className:"lc","aria-label":"A report for an engineer",children:[t.jsxs("header",{className:"lc-h",children:[t.jsx("b",{children:"A report for an engineer"}),t.jsx(E1,{card:e})]}),t.jsxs("div",{className:"lc-b",children:[t.jsx("p",{className:"lc-a",children:e.why??"What happened, the steps and the logs, with no secrets in it. Nothing is sent: you copy it and send it yourself."}),e.report&&t.jsx("pre",{className:"lc-report",children:e.report}),e.status==="open"&&e.result&&t.jsx(L,{as:"p",className:"lc-why",text:e.result})]}),t.jsxs("div",{className:"lc-f",children:[e.report?t.jsxs("button",{className:"btn pri",onClick:i,children:[t.jsx(Xn,{size:14})," Copy the report"]}):t.jsx("button",{className:"btn pri",disabled:s,onClick:()=>n(),children:"Prepare a report"}),e.report&&t.jsx("span",{className:"lc-after",children:"Nothing was sent."}),t.jsx(te,{text:e.command})]})]})}function aq({cards:e}){const n=oe(),s=e.filter(d=>d.status==="open"&&!d.byItself),r=(d,u=!1)=>n.mutate({path:`/api/v1/lead/cards/${encodeURIComponent(d.id)}/run`,body:u?{always:!0}:{},done:h=>h.card.result??null}),[i,...o]=s;if(!i)return null;const l=aw(i);return t.jsxs(t.Fragment,{children:[t.jsx("button",{className:"btn pri sm",disabled:n.isPending,onClick:()=>r(i),title:i.why,children:l?"Allow once":i.label}),l&&t.jsx("button",{className:"btn sm",disabled:n.isPending,onClick:()=>r(i,!0),title:"Runs by itself from now on, without asking. Only for low-risk actions.",children:"Always allow"}),o.map(d=>t.jsx("button",{className:"btn sm",disabled:n.isPending,onClick:()=>r(d),title:d.why,children:d.label},d.id))]})}function n4({c:e,turn:n,last:s,onAgain:r}){const i=!!(e.thinking&&s&&!n.answer&&!n.error),o=n.ask.context,l=o.from!=="board"||o.page!==void 0&&o.page!=="Squad lead";return t.jsxs("div",{className:"lt",children:[t.jsxs("div",{className:"lt-you",children:[t.jsxs("div",{className:"lt-meta",children:[t.jsx("b",{children:"You"}),Rn(n.ask.at)]}),t.jsx(L,{as:"p",text:n.ask.text}),l&&t.jsxs("span",{className:"lt-ctx",children:[t.jsx(rl,{size:12,"aria-hidden":"true"}),XI(o)]})]}),i?t.jsx(cq,{c:e,turn:n}):t.jsxs(t.Fragment,{children:[n.trace.length>0&&n.answer?.by!=="refusal"&&t.jsx(oq,{trace:n.trace,seconds:n.seconds}),n.answer&&t.jsx(dq,{answer:n.answer}),n.error&&t.jsxs("div",{className:"lt-err",role:"status",children:[t.jsx(L,{as:"p",text:n.error}),s&&t.jsx("button",{className:"btn sm",onClick:()=>r(n.ask.text),children:"Ask again"})]}),(n.answer||n.error)&&t.jsxs("div",{className:"lt-cost",title:n.model?`Ran on ${n.model}`:void 0,children:[QI(n),n.answer?.by==="note"&&s&&t.jsx("button",{className:"linkbtn",onClick:()=>r(n.ask.text,!0),title:"Looks again in the code and the app, past the saved note. It costs like any question.",children:"Look again"})]})]})]})}function s4(e){const n=e?.querySelectorAll(".lt"),s=n?.[n.length-1];!e||!s||e.scrollTo({top:Math.max(0,s.getBoundingClientRect().top-e.getBoundingClientRect().top+e.scrollTop-12)})}function oq({trace:e,seconds:n}){const[s,r]=C.useState(!1),i=YI(e)||`${e.length} ${e.length===1?"step":"steps"}`;return t.jsxs("div",{className:`lt-work ${s?"open":""}`,children:[t.jsxs("button",{className:"lt-wh",onClick:()=>r(!s),"aria-expanded":s,children:[t.jsx(mm,{size:14,"aria-hidden":"true"}),t.jsxs("span",{children:[n?t.jsxs("b",{children:["Worked for ",c1(n),": "]}):null,n&&!i.startsWith("squad-kit")?i[0].toLowerCase()+i.slice(1):i]}),t.jsx(Dd,{size:15,className:"chev","aria-hidden":"true"})]}),s&&t.jsx(r4,{trace:e})]})}function r4({trace:e,live:n}){return t.jsx("ul",{className:"lt-steps",children:e.map((s,r)=>t.jsxs("li",{className:s.kind==="refused"?"refused":"",children:[n&&r===e.length-1?t.jsx(st,{size:14,className:"spin","aria-hidden":"true"}):t.jsx(fe,{size:14,strokeWidth:2.4,"aria-hidden":"true"}),t.jsx(L,{text:s.text})]},`${s.at}-${r}`))})}function lq(e){const[n,s]=C.useState(Date.now);return C.useEffect(()=>{const r=setInterval(()=>s(Date.now()),1e3);return()=>clearInterval(r)},[]),Math.max(0,(n-Date.parse(e))/1e3)}function cq({c:e,turn:n}){const s=oe(),r=lq(n.ask.at),i=n.trace[n.trace.length-1]?.text??"Reading what squad-kit already knows about the project";return t.jsxs("div",{className:"lt-think",role:"status","aria-live":"polite",children:[t.jsxs("div",{className:"lt-th",children:[t.jsx("span",{className:"live","aria-hidden":"true"}),t.jsx(L,{as:"b",text:i}),t.jsx("span",{className:"lt-since",children:c1(r)}),t.jsxs("button",{className:"btn sm",disabled:s.isPending,onClick:()=>s.mutate({path:`/api/v1/lead/conversations/${encodeURIComponent(e.id)}/stop`,done:"Stopped. What it found so far stays."}),children:[t.jsx(Qn,{size:11})," Stop"]})]}),n.trace.length>1&&t.jsx(r4,{trace:n.trace.slice(0,-1)})]})}function dq({answer:e}){const[n,s]=C.useState(null),r=e.evidence.map(d=>({src:Vn(d.url),caption:d.story?`${d.caption} (${d.story}'s proof)`:d.caption,story:d.story})),i=GI(e.headline,e.body),o=e.cards.filter(d=>d.kind==="open_story"),l=e.cards.filter(d=>d.kind!=="open_story");return t.jsxs("div",{className:"lt-answer",children:[t.jsx(L,{as:"h3",text:e.headline}),i&&t.jsx(aa,{text:i,ticket:""}),(r.length>0||e.sources.length>0)&&t.jsxs("div",{className:"lt-evidence",children:[r.map((d,u)=>t.jsxs("button",{className:"lt-shot zoom",onClick:()=>s(u),"aria-label":`Open the picture full size: ${d.caption}`,children:[t.jsx("img",{src:d.src,alt:d.caption,loading:"lazy"}),d.story&&t.jsxs("span",{className:"from",children:["From ",d.story,"'s proof"]}),t.jsx(L,{className:"cap",text:e.evidence[u].caption})]},d.src)),e.sources.length>0&&t.jsxs("div",{className:"lt-src",children:[t.jsx("span",{className:"lbl2",children:"Sources"}),e.sources.map((d,u)=>t.jsx(uq,{s:d},`${d.kind}-${d.ref}-${u}`))]})]}),e.learned&&t.jsxs("p",{className:"lt-learned",children:[t.jsx("b",{children:"Saved in squad-kit's notes"})," for the next person: ",t.jsx(L,{text:e.learned})]}),o.length>0&&t.jsx("div",{className:"lt-opens",children:o.map(d=>t.jsx(t4,{card:d},d.id))}),l.length>0&&t.jsx("div",{className:"lt-cards",children:l.map(d=>t.jsx(nq,{card:d},d.id))}),n!==null&&t.jsx(Ir,{pictures:r,start:n,onClose:()=>s(null)})]})}function uq({s:e}){const n=nF(e),s=t.jsxs(t.Fragment,{children:[e.kind==="file"?t.jsx(ma,{size:13,"aria-hidden":"true"}):null,t.jsx("span",{className:"k",children:e.kind==="file"?sF(e.ref):e.kind==="note"?"Notes":e.kind==="guide"?"Guide":e.kind==="log"?"Log":e.ref}),e.label&&t.jsx(L,{text:e.label})]}),r=e.kind==="file"?e.ref:e.kind==="note"?`Saved on ${e.ref}`:void 0;return n?n.to==="/board"?t.jsx(xe,{to:"/board",search:{ticket:n.ticket},className:"lt-ref",children:s}):n.to==="/architecture"?t.jsx(xe,{to:"/architecture",search:{adr:n.adr},className:"lt-ref",children:s}):t.jsx(xe,{to:"/releases",className:"lt-ref",children:s}):t.jsx("span",{className:"lt-ref",title:r,children:s})}function i4(){const e=oe(),n=In();return{send:(r,i)=>e.mutate({path:r.conversation?`/api/v1/lead/conversations/${encodeURIComponent(r.conversation)}/messages`:"/api/v1/lead/conversations",body:{text:r.text,...r.context?{context:r.context}:{},...r.fresh?{fresh:!0}:{}},after:o=>{n.setQueryData(["lead","conversation",o.id],o),i(o)}}),busy:e.isPending}}function a4({id:e,value:n,onChange:s,onSend:r,busy:i,placeholder:o,chip:l,autoFocus:d}){const u=C.useRef(null);C.useEffect(()=>{if(!d)return;const m=u.current;m?.focus(),m?.setSelectionRange(m.value.length,m.value.length)},[d]);const h=n.trim().length>0&&!i;return t.jsxs("div",{className:"lead-box",children:[t.jsx("textarea",{id:e,ref:u,rows:1,value:n,dir:ge(n),placeholder:o,"aria-label":"Your question",onChange:m=>s(m.target.value),onKeyDown:m=>{m.key==="Enter"&&!m.shiftKey&&!m.nativeEvent.isComposing&&(m.preventDefault(),h&&r())}}),t.jsxs("div",{className:"lead-bar",children:[l,t.jsx("span",{className:"grow"}),t.jsx("button",{className:"lead-send",disabled:!h,onClick:r,"aria-label":"Send",title:"Send (Enter)",children:t.jsx(ds,{size:17,strokeWidth:2.4})})]})]})}function o4({ctx:e}){return t.jsxs("span",{className:"lt-ctx",title:"The lead reads this first, so you do not have to describe it",children:[t.jsx(rl,{size:12,"aria-hidden":"true"}),rw(e)]})}function l4(){return t.jsxs("p",{className:"lead-hint",children:[t.jsx(ra,{size:13,"aria-hidden":"true"}),"It reads and looks on its own. It changes nothing without your OK: changes come as stories you create."]})}function hj(){const e=aF(),n=ta({select:i=>i.location}),s=n.pathname,r=n.search;return C.useEffect(()=>{const i=o=>{if(!(o.metaKey||o.ctrlKey)||o.altKey||o.shiftKey||o.key.toLowerCase()!=="k")return;if(o.preventDefault(),Hn.get().open)return Hn.close();const l=s.startsWith("/lead")?document.getElementById("lead-page-ask"):null;if(l)return l.focus();Hn.open({context:eF(s,r)})};return window.addEventListener("keydown",i),()=>window.removeEventListener("keydown",i)},[s,r]),!e.open||!e.context?null:t.jsx(hq,{text:e.text,context:e.context,conversation:e.conversation},e.n)}function hq({text:e,context:n,conversation:s}){const[r,i]=C.useState(e),o=Xw(s),{send:l,busy:d}=i4(),u=qt(),h=C.useRef(null),m=o.data,p=m?.turns.length??0,x=(j=r,k=!1)=>l({text:j.trim(),context:m?null:n,conversation:m?.id??null,fresh:k},b=>{Hn.sent(b.id),i("")});C.useEffect(()=>{const j=k=>k.key==="Escape"&&!document.querySelector(".lightbox")&&Hn.close();return window.addEventListener("keydown",j),()=>window.removeEventListener("keydown",j)},[]),C.useEffect(()=>{s4(h.current)},[p,m?.thinking]);const y=()=>{Hn.close(),u({to:"/lead",search:m?{c:m.id}:{}})};return t.jsx("div",{className:"modal-veil lask-veil",onMouseDown:j=>j.target===j.currentTarget&&Hn.close(),children:t.jsxs("div",{className:"lask",role:"dialog","aria-modal":"true","aria-label":"Ask the Squad lead",children:[t.jsxs("header",{className:"lask-h",children:[t.jsx("img",{src:"/logo.svg",alt:""}),t.jsx("b",{children:"Ask the Squad lead"}),t.jsx("span",{className:"grow"}),t.jsx("kbd",{children:"Esc"}),t.jsx("button",{className:"iconbtn",onClick:Hn.close,"aria-label":"Close",children:t.jsx(Ve,{size:16})})]}),m&&t.jsx("div",{className:"lask-feed",ref:h,children:m.turns.map((j,k)=>t.jsx(n4,{c:m,turn:j,last:k===m.turns.length-1,onAgain:(b,w)=>x(b,w)},j.n))}),t.jsx("div",{className:"lask-ask",children:t.jsx(a4,{value:r,onChange:i,onSend:()=>x(),busy:d||!!m?.thinking,placeholder:m?"Ask a follow-up…":n.from==="app"?`Ask about ${n.app??"the app"}, or ask for something…`:"Ask about the project, or ask for something…",chip:t.jsx(o4,{ctx:m?.context??n}),autoFocus:!0})}),t.jsxs("footer",{className:"lask-f",children:[t.jsx(l4,{}),t.jsx("span",{className:"grow"}),m?t.jsx("button",{className:"btn sm",onClick:y,children:"Open in the Squad lead page"}):t.jsx("span",{className:"note",children:"Enter sends"})]})]})})}function c4({text:e,context:n,label:s="Ask the lead",className:r="btn"}){return t.jsxs("button",{className:r,onClick:()=>Hn.open({...e?{text:e}:{},context:n}),children:[t.jsx(nu,{size:14,className:"lead-ic"}),s]})}function A1({t:e,problem:n,className:s}){const r=n==="error"?e.stuck?.title??e.stuck?.question:void 0;return t.jsx(c4,{text:d1(n,e.id),context:{from:"problem",problem:n,story:e.id,...r?{error:r.slice(0,400)}:{}},...s?{className:s}:{}})}function pq({t:e}){return t.jsxs("div",{className:"lead-strip",children:[t.jsx(nu,{size:15,className:"lead-ic"}),t.jsx("span",{children:"Not sure what to do here? The Squad lead reads this story and tells you, in plain words."}),t.jsx(A1,{t:e,problem:"waiting",className:"btn sm"})]})}function fq(){const e=Tm(),n=e.data?.apps??[];if(!n.length)return null;const s=n.some(r=>(r.start||r.phone?.ready)&&(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(jq,{a:r,together:n.filter(i=>i.start&&i.fresh&&i.fresh.id===r.fresh?.id),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 newest code, with every ticket you approved. No terminal needed."})]})}const mq=e=>(e??"").replace(/^https?:\/\//,"");function gq(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 pj(e){switch(e.state){case"running":return e.phone?.run?.state==="running"?`On ${e.phone.run.device??`the ${e.phone.word}`}`:yq(e.since);case"starting":return"Starting…";case"stopped":return"Stopped";case"failed":return"Failed";default:return"Not running"}}function xq(e){return e.step==="phone"?e.phone?.run?.line??`Getting the app onto squad-kit's ${e.phone?.word??"phone"}`:e.step==="copy"?"Making a copy of the code. On a big project this takes a while.":e.step==="setup"?"Setting it up first":e.step==="start"?"Starting it":`Getting the newest ${e.base}`}function yq(e){const n=e?Math.round((Date.now()-Date.parse(e))/6e4):0;return n<1?"Running":`Running for ${n} min`}function jq({a:e,together:n,named:s,live:r,reading:i,readError:o}){const l=oe(),d=Ue(),u=d.data?.ready?!!d.data.self:!1,[h,m]=C.useState(!1),[p,x]=C.useState(!1),y=s?` ${gi(e.name)}`:"",j=(z,U,I)=>l.mutate({path:`/api/v1/apps/${encodeURIComponent(e.name)}/${z}`,body:I,done:U}),k=z=>j("start",`Starting ${e.name}`,z),b=e.phone,[w,S]=C.useState(b?.languages[0]??"en"),T=!!(e.start||b?.ready),A=b?.ready&&b.languages.length>1&&w!=="en"?` --lang ${w}`:"",D=()=>k(b?.ready?{phone:!0,...b.languages.length>1?{language:w}:{}}:b?{web:!0}:void 0),$=()=>j("start",`Starting the web version of ${e.name}`,{web:!0}),P=!!(b?.on||b?.run?.state==="running"),F=e.state==="failed"?e.busy:void 0,_=async(z,U,I)=>{try{for(const[W,M]of n.entries())await l.mutateAsync({path:`/api/v1/apps/${encodeURIComponent(M.name)}/${z}`,body:I,...W===n.length-1?{done:U}:{}})}catch{}};return t.jsxs("div",{className:`app-item ${e.state}`,children:[e.fresh&&e.start&&n[0]===e&&t.jsxs("div",{className:"app-new",role:"status",children:[t.jsxs("div",{className:"hd",children:[t.jsx("span",{className:"ok",children:t.jsx(fe,{size:13,strokeWidth:3})}),t.jsxs("b",{title:e.fresh.title,children:[e.fresh.id," is in the newest version"]})]}),t.jsx("p",{children:"Try the new version yourself."}),t.jsxs("div",{className:"app-acts",children:[t.jsx("button",{className:"btn sm go",disabled:l.isPending,onClick:()=>void _("restart",n.length>1?"Starting the new version":`Starting the new version of ${e.name}`),children:"Run the new version"}),t.jsx("button",{className:"btn sm",disabled:l.isPending,onClick:()=>void _("not-now","Fine. It stays as it is.",{ticket:e.fresh.id}),children:"Not now"})]}),u?t.jsx("small",{children:"It goes on as a pull request: its story says how to send it."}):e.fresh.release&&t.jsxs("small",{children:["It also goes out in release ",e.fresh.release,"."]}),t.jsx(te,{text:`squad app restart${y}`})]}),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}`:pj(e),children:pj(e)})]}),e.state==="running"&&!P?t.jsx("a",{className:"btn sm pri",href:e.address,target:"_blank",rel:"noreferrer",title:`Open ${e.address}`,children:"Open"}):e.state==="running"?null:e.state==="starting"?t.jsx("button",{className:"btn sm",disabled:l.isPending,onClick:()=>j("stop",`Stopped ${e.name}`),children:"Stop"}):T?t.jsx("button",{className:"btn sm go",disabled:l.isPending,onClick:D,children:e.state==="failed"?"Try again":"Start"}):null]}),t.jsx(kq,{a:e}),e.state==="starting"&&(b&&P?t.jsx(Vf,{phone:b,starting:!0}):t.jsx("p",{className:"app-more",children:xq(e)})),b&&e.state!=="starting"&&t.jsx(Vf,{phone:b,starting:!1}),b&&e.state!=="running"&&e.state!=="starting"&&t.jsx(Qw,{phone:b}),b?.ready&&e.state!=="running"&&e.state!=="starting"&&t.jsxs("p",{className:"app-more phone-pick",children:["Opens on squad-kit's ",b.word,b.languages.length>1?", in":".",t.jsx(Gw,{languages:b.languages,value:w,onChange:S})]}),b?.web&&P&&(e.state==="starting"||e.state==="running")&&t.jsxs("div",{className:"app-acts",children:[t.jsx("button",{className:"btn sm",disabled:l.isPending,onClick:$,children:"Use the web version now"}),t.jsx(te,{text:`squad app start${y} --web`})]}),e.state==="running"&&t.jsxs("div",{className:"app-more",children:[!P&&t.jsx("span",{className:"addr",children:mq(e.address)}),e.includes.length>0&&t.jsx(L,{lead:"Includes",text:gq(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:l.isPending,onClick:()=>j("restart",`Restarting ${e.name}`),children:"Restart"}),t.jsx("button",{className:"btn sm",disabled:l.isPending,onClick:()=>j("stop",`Stopped ${e.name}`),children:"Stop"})]}),t.jsx(te,{text:`squad app stop${y}`})]}),e.state==="failed"&&!F&&t.jsx("p",{className:"app-more why",children:e.error}),e.state!=="running"&&e.state!=="starting"&&T&&!F&&t.jsx(te,{text:`squad app start${y}${A}`}),e.state!=="running"&&e.state!=="starting"&&e.start&&e.up&&!F&&t.jsxs("p",{className:"app-more",children:["It looks like this app is already open on this computer."," ",t.jsx("a",{href:e.url,target:"_blank",rel:"noreferrer",children:"Open it"})]}),F&&t.jsxs("div",{className:"app-warn",children:[t.jsx("b",{children:e.error}),t.jsx("span",{children:F.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."}),F.ours&&t.jsx("div",{className:"app-acts",children:t.jsx("button",{className:"btn sm",disabled:l.isPending,onClick:()=>k({stopOther:!0}),children:"Stop it and start"})}),t.jsx(te,{text:F.ours?`squad app start${y} --stop-other`:`squad app start${y}`})]}),!e.start&&!b&&!h&&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."}),o&&!i&&t.jsxs("span",{className:"bad",children:["The Architect could not read the project: ",o]}),t.jsxs("div",{className:"app-acts",children:[r&&t.jsx("button",{className:"btn sm",disabled:i||l.isPending,onClick:()=>l.mutate({path:"/api/v1/scan",done:"The Architect is reading the project to find how to start it"}),children:i?"The Architect is looking…":"Ask the Architect to find it"}),t.jsx("button",{className:"btn sm",onClick:()=>m(!0),children:"Type it"})]}),!r&&t.jsx("span",{children:"You can also set it in Settings, under How the squad checks and runs this project."}),t.jsx(te,{text:r?"squad app find":`squad app set${y} --start "npm run dev"`})]}),h&&t.jsx(vq,{a:e,cmdRef:y,onDone:()=>m(!1)}),e.start&&t.jsx("button",{className:"app-link",onClick:()=>x(!0),children:e.state==="failed"?"See what failed":"Show output"}),p&&t.jsx(bq,{a:e,cmdRef:y,onClose:()=>x(!1),onChange:()=>{x(!1),m(!0)}})]})}function kq({a:e}){const[n,s]=C.useState(!1);return t.jsxs("div",{className:"app-lead",children:[e.signIn&&t.jsxs("button",{className:`app-signin ${n?"all":""}`,onClick:()=>s(!n),"aria-expanded":n,title:n?void 0:e.signIn,children:[t.jsx("b",{children:"How to sign in"}),t.jsx(L,{className:"txt",text:e.signIn})]}),t.jsx(c4,{className:"btn sm app-ask",label:"Ask about it",context:{from:"app",app:e.name,path:tF(e.address??e.url)}})]})}function vq({a:e,cmdRef:n,onDone:s}){const r=oe(),[i,o]=C.useState(e.start??""),[l,d]=C.useState(e.url??""),u=()=>r.mutate({path:`/api/v1/apps/${encodeURIComponent(e.name)}/commands`,method:"PUT",body:{start:i,url:l},done:`Saved how ${e.name} starts`},{onSuccess:s});return t.jsxs("form",{className:"app-type",onSubmit:h=>{h.preventDefault(),u()},children:[t.jsxs("label",{children:["Start command",t.jsx("input",{className:"input",value:i,onChange:h=>o(h.target.value),placeholder:"npm run dev",autoFocus:!0,spellCheck:!1})]}),t.jsxs("label",{children:["Address",t.jsx("input",{className:"input",value:l,onChange:h=>d(h.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:!i.trim()||r.isPending,children:"Save"}),t.jsx("button",{className:"btn sm",type:"button",onClick:s,children:"Cancel"})]}),t.jsx(te,{text:`squad app set${n} --start ${Le(i.trim()||"npm run dev")}${l.trim()?` --url ${gi(l.trim())}`:""}`})]})}function bq({a:e,cmdRef:n,onClose:s,onChange:r}){const o=(we({queryKey:["apps",e.name,"output"],queryFn:()=>ke(`/api/v1/apps/${encodeURIComponent(e.name)}/output`),refetchInterval:2e3}).data?.lines??[]).join(`
|
|
677
|
-
`).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(te,{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 wq({children:e}){const n=ta({select:m=>m.location.pathname}),s=ta({select:m=>m.location.search.ticket}),r=xa(ya),i=Sq(),o=Nq(n),l=n.startsWith("/board")&&!!s,[d,u]=C.useState(!1);C.useEffect(()=>u(!1),[s]);const h=l&&(r||i.is)&&o.length>0;return t.jsxs("div",{ref:i.ref,className:`banners ${h&&d?"unfolded":""}`,children:[h&&d&&t.jsxs("button",{className:"bless",onClick:()=>u(!1),"aria-expanded":!0,children:[t.jsx(Mk,{size:14,"aria-hidden":!0})," Show less"]}),h&&!d&&t.jsxs("button",{className:"bslim",onClick:()=>u(!0),"aria-expanded":!1,"aria-label":`${o.map(m=>m.text).join(", ")}. Show the messages`,children:[t.jsx("span",{className:"bchips",children:o.map(m=>t.jsx("span",{className:`bchip ${m.tone}`,children:m.text},m.key))}),t.jsx(Dd,{size:16,"aria-hidden":!0})]}),t.jsx("div",{className:"banners-all",hidden:h&&!d,children:e})]})}function Nq(e){const n=Hd().data,s=Ww().data,r=Ue().data,i=[],o=n?l9(n):null;o&&i.push({key:"update",text:o,tone:n?.progress.state==="failed"?"you":"acc"}),s?.pause&&s.text&&i.push({key:"limit",text:"Usage limit",tone:"you"}),r?.ready&&r.console?.outdated&&i.push({key:"restart",text:"Restart to update",tone:"you"});const l=iu().length,d=r?.ready&&!e.startsWith("/inbox")?r.tickets.filter(ul).length+l:0;return d&&i.push({key:"waiting",text:`${d} need${d===1?"s":""} you`,tone:"you"}),i}function Sq(){const[e,n]=C.useState(!1),s=C.useRef(null),r=C.useCallback(i=>{s.current?.disconnect(),!(!i||typeof ResizeObserver>"u")&&(s.current=new ResizeObserver(([o])=>n((o?.contentRect.width??1/0)<820)),s.current.observe(i))},[]);return C.useEffect(()=>()=>s.current?.disconnect(),[]),{ref:r,is:e}}function ou(){return we({queryKey:["setup"],queryFn:()=>ke("/api/v1/setup"),refetchInterval:e=>e.state.data?.setup&&!e.state.data.setup.ready&&!e.state.data.setup.approved?1e3:5e3})}function d4(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 Cq({state:e}){return t.jsx("i",{className:`ob-mark ${e}`,"aria-hidden":!0,children:e==="done"?t.jsx(fe,{size:13,strokeWidth:3}):e==="failed"?"!":e==="skipped"?"–":e==="stopped"?t.jsx(Qn,{size:8,fill:"currentColor"}):e==="now"?t.jsx("span",{className:"live"}):null})}function $q({st:e,now:n}){const s=oe(),[r,i]=C.useState(!1),o=yf(e,n);return t.jsxs("li",{className:`ob-step ${e.state}`,children:[t.jsx(Cq,{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(l=>l.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:l.step},done:l.step==="read"?"The Architect reads the project again":"squad-kit tries it again"}),children:l.label}),t.jsx(te,{text:l.command})]},l.label):l.do==="output"?t.jsx("button",{className:"btn sm quiet",onClick:()=>i(!r),"aria-expanded":r,children:r?"Hide what failed":l.label},l.label):t.jsx(xe,{to:"/settings",className:"btn sm quiet",children:l.label},l.label)),e.state==="failed"&&(e.id==="read"||e.id==="tool")&&t.jsx(tu,{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 Tq=[{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 Eq({s:e}){const n=oe(),[s,r]=C.useState(null);if(e.approved)return null;const i=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:Tq.map(o=>t.jsxs("button",{role:"radio","aria-checked":o.id===i,className:`ob-q ${o.id===i?"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(te,{text:`squad config set quality ${i}`})]})}function Aq({s:e}){const n=b1(),s=(()=>{try{return window.localStorage}catch{return null}})(),[r,i]=C.useState(()=>Ct?Oo(s).includes(Ct):!1);return e.ready||e.approved||!Ct?null:r&&n.on?t.jsxs("span",{className:"pill ok",children:[t.jsx(uf,{size:13})," We will tell you when it is ready"]}):t.jsxs("button",{className:"btn",onClick:async()=>{n.on||await n.turnOn(),B9(s,Ct),i(!0)},children:[t.jsx(uf,{size:15})," Notify me when it is ready"]})}function Pq({s:e}){const n=d4();return t.jsx("ol",{className:"ob-steps",children:e.steps.map(s=>t.jsx($q,{st:s,now:n},s.id))})}function Rq({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(Mk,{size:14}):t.jsx(Dd,{size:14})," ",n?"Hide what the Architect read":"See what the Architect is reading"]}),n&&t.jsx("ul",{children:e.reads.map((r,i)=>t.jsx("li",{className:"mono",children:r},`${i}-${r}`))})]}):null}function u4(){const n=ou().data?.setup,s=d4();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(fe,{size:16,strokeWidth:2.5})}),t.jsxs("span",{className:"grow",children:[t.jsx("b",{children:n.empty?n.idea?"Your first stories are ready":"One question for you":"Your project overview is ready"}),t.jsx("span",{children:n.empty?n.idea?"What the Architect understood from what you said, for you to check.":"What do you want to build?":"squad-kit has read your project. Check what it understood, then start working."})]}),t.jsxs(xe,{to:"/overview",className:"btn you sm",children:["Check it ",t.jsx(ai,{size:14})]})]});const r=n.steps.find(o=>o.id===n.current),i=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 ",i," of ",n.total,": ",r?.label??"starting",r&&yf(r,s)?` · ${yf(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(xe,{to:"/setup",className:"btn sm",children:["Open the setup ",t.jsx(ai,{size:14})]})]})}function Iq(){const e=ou().data?.setup;return!!(e&&!e.approved)}function Fq(){const e=ou().data?.setup;return!!(e?.ready&&!e.approved)}const h4={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"},git:{hex:"F03C2E",path:"M13.09 23.549a1.54 1.54 0 0 1-2.18 0L.451 13.089a1.54 1.54 0 0 1 0-2.179l7.191-7.19 2.733 2.733a1.85 1.85 0 0 0 .964 2.326v6.66a1.849 1.849 0 1 0 1.54 0V8.957l2.508 2.508a1.85 1.85 0 1 0 1.09-1.09l-2.634-2.634a1.85 1.85 0 0 0-2.378-2.377L8.73 2.63 10.91.451a1.54 1.54 0 0 1 2.179 0l10.459 10.46a1.54 1.54 0 0 1 0 2.179z"},flutter:{hex:"02569B",path:"M14.314 0L2.3 12 6 15.7 21.684.013h-7.357zm.014 11.072L7.857 17.53l6.47 6.47H21.7l-6.46-6.468 6.46-6.46h-7.37z"},xcode:{hex:"147EFB",path:"M19.06 5.3327c.4517-.1936.7744-.2581 1.097-.1936.5163.1291.7744.5163.968.7098.1936.3872.9034.7744 1.2261.8389.2581.0645.7098-.6453 1.0325-1.2906.3227-.5808.5163-1.3552.4517-1.5488-.0645-.1936-.968-.5808-1.1616-.5808-.1291 0-.3872.1291-.8389.0645-.4517-.0645-.9034-.5808-1.1616-.968-.4517-.6453-1.097-1.0325-1.6778-1.3552-.6453-.3227-1.3552-.5163-2.065-.6453-1.0325-.2581-2.065-.4517-3.0975-.3227-.5808.0645-1.2906.1291-1.8069.3227-.0645 0-.1936.1936-.0645.1936s.5808.0645.5808.0645-.5807.1292-.5807.2583c0 .1291.0645.1291.1291.1291.0645 0 1.4842-.0645 2.065 0 .6453.1291 1.3552.4517 1.8069 1.2261.7744 1.4197.4517 2.7749.2581 3.2266-.968 2.1295-8.6472 15.2294-9.0344 16.1328-.3873.9034-.5163 1.4842.5807 2.065s1.6778.3227 2.0005-.0645c.3872-.5163 7.0339-17.1654 9.2925-18.2624zm-3.6138 8.7117h1.5488c1.0325 0 1.2261.5163 1.2261.7098.0645.5163-.1936 1.1616-1.2261 1.1616h-.968l.7744 1.2906c.4517.7744.2581 1.1616 0 1.4197-.3872.3872-1.2261.3872-1.6778-.4517l-.9034-1.5488c-.6453 1.4197-1.2906 2.9684-2.065 4.7753h4.0009c1.9359 0 3.5492-1.6133 3.5492-3.5492V6.5588c-.0645-.1291-.1936-.0645-.2581 0-.3872.4517-1.4842 2.0004-4.001 7.4856zm-9.8087 8.0019h-.3227c-2.3231 0-4.1945-1.8714-4.1945-4.1945V7.0105c0-2.3231 1.8714-4.1945 4.1945-4.1945h9.3571c-.1936-.1936-.968-.5163-1.7423-.4517-.3227 0-.968.1291-1.3552-.1291-.3872-.3227-.3227-.5163-.9034-.5163H4.9277c-2.6458 0-4.7753 2.1295-4.7753 4.7753v11.7447c0 2.6458 2.1295 4.7753 4.4527 4.7108.6452 0 .8388-.5162 1.0324-.9034zM20.4152 6.9459v10.9058c0 2.3231-1.8714 4.1945-4.1945 4.1945H11.897s-.3872 1.0325.8389 1.0325h3.8719c2.6458 0 4.7753-2.1295 4.7753-4.7753V8.8173c.0646-.9034-.7098-1.4842-.9679-1.8714zm-18.5851.0646v10.8413c0 1.9359 1.6133 3.5492 3.5492 3.5492h.5808c0-.0645.7744-1.4197 2.4522-4.2591.1936-.3872.4517-.7744.7098-1.2261H4.4114c-.5808 0-.9034-.3872-.968-.7098-.1291-.5163.1936-1.1616.9034-1.1616h2.3877l3.033-5.2916s-.7098-1.2906-.9034-1.6133c-.2582-.4517-.1291-.9034.129-1.1615.3872-.3872 1.0325-.5808 1.6778.4517l.2581.3872.2581-.3872c.5808-.8389.968-.7744 1.2906-.7098.5163.1291.8389.7098.3872 1.6133L8.864 14.0444h1.3552c.4517-.7744.9034-1.5488 1.3552-2.3877-.0645-.3227-.1291-.7098-.0645-1.0325.0645-.5163.3227-.968.6453-1.3552l.3872.6453c1.2261-2.1295 2.1295-3.9364 2.3877-4.6463.1291-.3872.3227-1.1616.1291-1.8069H5.3794c-2.0005.0001-3.5493 1.6134-3.5493 3.5494zM4.605 17.7872c0-.0645.7744-1.4197.7744-1.4197 1.2261-.3227 1.8069.4517 1.8714.5163 0 0-.8389 1.4842-1.097 1.7423s-.5808.3227-.9034.2581c-.5164-.129-.839-.6453-.6454-1.097z"},apple:{hex:"000000",path:"M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701"},cocoapods:{hex:"EE3322",path:"M8.812 17.176c-2.968 0-4.956-2.308-4.956-5.176 0-2.705 1.776-5.176 4.91-5.176 2.407 0 3.856 1.445 4.207 3.357h3.95C16.479 6.427 13.51 3.42 8.718 3.42 3.131 3.42 0 7.523 0 12c0 4.57 3.295 8.58 8.766 8.58 4.58 0 7.549-2.822 8.18-6.272h-4.02c-.467 1.609-1.916 2.868-4.114 2.868zM24 12.068l-3.466 8.055-2.38-1.022 2.992-7.055-3.01-7.096 2.433-1.042Z"},openjdk:{hex:"000000",path:"M11.915 0 11.7.215C9.515 2.4 7.47 6.39 6.046 10.483c-1.064 1.024-3.633 2.81-3.711 3.551-.093.87 1.746 2.611 1.55 3.235-.198.625-1.304 1.408-1.014 1.939.1.188.823.011 1.277-.491a13.389 13.389 0 0 0-.017 2.14c.076.906.27 1.668.643 2.232.372.563.956.911 1.667.911.397 0 .727-.114 1.024-.264.298-.149.571-.33.91-.5.68-.34 1.634-.666 3.53-.604 1.903.062 2.872.39 3.559.704.687.314 1.15.664 1.925.664.767 0 1.395-.336 1.807-.9.412-.563.631-1.33.72-2.24.06-.623.055-1.32 0-2.066.454.45 1.117.604 1.213.424.29-.53-.816-1.314-1.013-1.937-.198-.624 1.642-2.366 1.549-3.236-.08-.748-2.707-2.568-3.748-3.586C16.428 6.374 14.308 2.394 12.13.215zm.175 6.038a2.95 2.95 0 0 1 2.943 2.942 2.95 2.95 0 0 1-2.943 2.943A2.95 2.95 0 0 1 9.148 8.98a2.95 2.95 0 0 1 2.942-2.942zM8.685 7.983a3.515 3.515 0 0 0-.145.997c0 1.951 1.6 3.55 3.55 3.55 1.95 0 3.55-1.598 3.55-3.55 0-.329-.046-.648-.132-.951.334.095.64.208.915.336a42.699 42.699 0 0 1 2.042 5.829c.678 2.545 1.01 4.92.846 6.607-.082.844-.29 1.51-.606 1.94-.315.431-.713.651-1.315.651-.593 0-.932-.27-1.673-.61-.741-.338-1.825-.694-3.792-.758-1.974-.064-3.073.293-3.821.669-.375.188-.659.373-.911.5s-.466.2-.752.2c-.53 0-.876-.209-1.16-.64-.285-.43-.474-1.101-.545-1.948-.141-1.693.176-4.069.823-6.614a43.155 43.155 0 0 1 1.934-5.783c.348-.167.749-.31 1.192-.425zm-3.382 4.362a.216.216 0 0 1 .13.031c-.166.56-.323 1.116-.463 1.665a33.849 33.849 0 0 0-.547 2.555 3.9 3.9 0 0 0-.2-.39c-.58-1.012-.914-1.642-1.16-2.08.315-.24 1.679-1.755 2.24-1.781zm13.394.01c.562.027 1.926 1.543 2.24 1.783-.246.438-.58 1.068-1.16 2.08a4.428 4.428 0 0 0-.163.309 32.354 32.354 0 0 0-.562-2.49 40.579 40.579 0 0 0-.482-1.652.216.216 0 0 1 .127-.03z"},android:{hex:"34A853",path:"M18.4395 5.5586c-.675 1.1664-1.352 2.3318-2.0274 3.498-.0366-.0155-.0742-.0286-.1113-.043-1.8249-.6957-3.484-.8-4.42-.787-1.8551.0185-3.3544.4643-4.2597.8203-.084.0338-.1673.0707-.25.1075L5.5996 5.5586a.4.4 0 0 0-.5524-.1494.4.4 0 0 0-.1494.5524l1.9727 3.4092C3.5165 11.2618 1.3125 14.5543 1 18.6094h22c-.3125-4.0551-2.5165-7.3476-5.8711-9.2385l1.9727-3.4092a.4.4 0 0 0-.1494-.5524.4.4 0 0 0-.5127.1494zM6.9785 14.5273a1.0016 1.0016 0 0 1 1 1.002 1.0016 1.0016 0 0 1-1 1 1.0016 1.0016 0 0 1-1.002-1 1.0016 1.0016 0 0 1 1.002-1.002zm10.0352 0a1.0016 1.0016 0 0 1 1.0019 1.002 1.0016 1.0016 0 0 1-1.0019 1 1.0016 1.0016 0 0 1-1-1 1.0016 1.0016 0 0 1 1-1.002z"},androidstudio:{hex:"3DDC84",path:"M19.2693 10.3368c-.3321 0-.6026.2705-.6026.6031v9.8324h-1.7379l-3.3355-6.9396c.476-.5387.6797-1.286.5243-2.0009a2.2862 2.2862 0 0 0-1.2893-1.6248v-.8124c.0121-.2871-.1426-.5787-.4043-.7407-.1391-.0825-.2884-.1234-.4402-.1234a.8478.8478 0 0 0-.4318.1182c-.2701.1671-.4248.4587-.4123.7662l-.0003.721c-1.0149.3668-1.6619 1.4153-1.4867 2.5197a2.282 2.282 0 0 0 .5916 1.2103l-3.2096 6.9064H4.0928c-1.0949-.007-1.9797-.8948-1.9832-1.9896V5.016c-.0055 1.1024.8836 2.0006 1.9859 2.0062a2.024 2.024 0 0 0 .1326-.0037h14.7453s2.5343-.2189 2.8619 1.5392c-.2491.0287-.4449.2321-.4449.4889 0 .7115-.5791 1.2901-1.3028 1.2901h-.8183zM17.222 22.5366c.2347.4837.0329 1.066-.4507 1.3007-.1296.0629-.2666.0895-.4018.0927a.9738.9738 0 0 1-.3194-.0455c-.024-.0078-.046-.0209-.0694-.0305a.9701.9701 0 0 1-.2277-.1321c-.0247-.0192-.0495-.038-.0724-.0598-.0825-.0783-.1574-.1672-.21-.2757l-1.2554-2.6143-1.5585-3.2452a.7725.7725 0 0 0-.6995-.4443h-.0024a.792.792 0 0 0-.7083.4443l-1.5109 3.2452-1.2321 2.6464a.9722.9722 0 0 1-.7985.5795c-.0626.0053-.1238-.0024-.185-.0087-.0344-.0036-.069-.0053-.1025-.0124-.0489-.0103-.0954-.0278-.142-.0452-.0301-.0113-.0613-.0197-.0901-.0339-.0496-.0244-.0948-.0565-.1397-.0889-.0217-.0156-.0457-.0275-.0662-.045a.9862.9862 0 0 1-.1695-.1844.9788.9788 0 0 1-.0708-.9852l.8469-1.8223 3.2676-7.0314a1.7964 1.7964 0 0 1-.7072-1.1637c-.1555-.9799.5129-1.9003 1.4928-2.0559V9.3946a.3542.3542 0 0 1 .1674-.3155.3468.3468 0 0 1 .3541 0 .354.354 0 0 1 .1674.3155v1.159l.0129.0064a1.8028 1.8028 0 0 1 1.2878 1.378 1.7835 1.7835 0 0 1-.6439 1.7836l3.3889 7.0507.8481 1.7643zM12.9841 12.306c.0042-.6081-.4854-1.1044-1.0935-1.1085a1.1204 1.1204 0 0 0-.7856.3219 1.101 1.101 0 0 0-.323.7716c-.0042.6081.4854 1.1044 1.0935 1.1085h.0077c.6046 0 1.0967-.488 1.1009-1.0935zm-1.027 5.2768c-.1119.0005-.2121.0632-.2571.1553l-1.4127 3.0342h3.3733l-1.4564-3.0328a.274.274 0 0 0-.2471-.1567zm8.1432-6.7459l-.0129-.0001h-.8177a.103.103 0 0 0-.103.103v12.9103a.103.103 0 0 0 .0966.103h.8435c.9861-.0035 1.7836-.804 1.7836-1.79V9.0468c0 .9887-.8014 1.7901-1.7901 1.7901zM2.6098 5.0161v.019c.0039.816.6719 1.483 1.4874 1.4869a12.061 12.061 0 0 1 .1309-.0034h1.1286c.1972-1.315.7607-2.525 1.638-3.4859H4.0993c-.9266.0031-1.6971.6401-1.9191 1.4975.2417.0355.4296.235.4296.4859zm6.3381-2.8977L7.9112.3284a.219.219 0 0 1 0-.2189A.2384.2384 0 0 1 8.098 0a.219.219 0 0 1 .1867.1094l1.0496 1.8158a6.4907 6.4907 0 0 1 5.3186 0L15.696.1094a.2189.2189 0 0 1 .3734.2189l-1.0302 1.79c1.6671.9125 2.7974 2.5439 3.0975 4.4018l-12.286-.0014c.3004-1.8572 1.4305-3.488 3.0972-4.4003zm5.3774 2.6202a.515.515 0 0 0 .5271.5028.515.515 0 0 0 .5151-.5151.5213.5213 0 0 0-.8885-.367.5151.5151 0 0 0-.1537.3793zm-5.7178-.0067a.5151.5151 0 0 0 .5207.5095.5086.5086 0 0 0 .367-.1481.5215.5215 0 1 0-.734-.7341.515.515 0 0 0-.1537.3727z"},claude:{hex:"D97757",path:"m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z"},googlegemini:{hex:"8E75B2",path:"M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81"},cursor:{hex:"000000",path:"M11.503.131 1.891 5.678a.84.84 0 0 0-.42.726v11.188c0 .3.162.575.42.724l9.609 5.55a1 1 0 0 0 .998 0l9.61-5.55a.84.84 0 0 0 .42-.724V6.404a.84.84 0 0 0-.42-.726L12.497.131a1.01 1.01 0 0 0-.996 0M2.657 6.338h18.55c.263 0 .43.287.297.515L12.23 22.918c-.062.107-.229.064-.229-.06V12.335a.59.59 0 0 0-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23"},githubcopilot:{hex:"000000",path:"M23.922 16.997C23.061 18.492 18.063 22.02 12 22.02 5.937 22.02.939 18.492.078 16.997A.641.641 0 0 1 0 16.741v-2.869a.883.883 0 0 1 .053-.22c.372-.935 1.347-2.292 2.605-2.656.167-.429.414-1.055.644-1.517a10.098 10.098 0 0 1-.052-1.086c0-1.331.282-2.499 1.132-3.368.397-.406.89-.717 1.474-.952C7.255 2.937 9.248 1.98 11.978 1.98c2.731 0 4.767.957 6.166 2.093.584.235 1.077.546 1.474.952.85.869 1.132 2.037 1.132 3.368 0 .368-.014.733-.052 1.086.23.462.477 1.088.644 1.517 1.258.364 2.233 1.721 2.605 2.656a.841.841 0 0 1 .053.22v2.869a.641.641 0 0 1-.078.256Zm-11.75-5.992h-.344a4.359 4.359 0 0 1-.355.508c-.77.947-1.918 1.492-3.508 1.492-1.725 0-2.989-.359-3.782-1.259a2.137 2.137 0 0 1-.085-.104L4 11.746v6.585c1.435.779 4.514 2.179 8 2.179 3.486 0 6.565-1.4 8-2.179v-6.585l-.098-.104s-.033.045-.085.104c-.793.9-2.057 1.259-3.782 1.259-1.59 0-2.738-.545-3.508-1.492a4.359 4.359 0 0 1-.355-.508Zm2.328 3.25c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm-5 0c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm3.313-6.185c.136 1.057.403 1.913.878 2.497.442.544 1.134.938 2.344.938 1.573 0 2.292-.337 2.657-.751.384-.435.558-1.15.558-2.361 0-1.14-.243-1.847-.705-2.319-.477-.488-1.319-.862-2.824-1.025-1.487-.161-2.192.138-2.533.529-.269.307-.437.808-.438 1.578v.021c0 .265.021.562.063.893Zm-1.626 0c.042-.331.063-.628.063-.894v-.02c-.001-.77-.169-1.271-.438-1.578-.341-.391-1.046-.69-2.533-.529-1.505.163-2.347.537-2.824 1.025-.462.472-.705 1.179-.705 2.319 0 1.211.175 1.926.558 2.361.365.414 1.084.751 2.657.751 1.21 0 1.902-.394 2.344-.938.475-.584.742-1.44.878-2.497Z"}};function zq(e){const n=parseInt(e,16);return(n>>16&255)*.299+(n>>8&255)*.587+(n&255)*.114<60}const qq={git:"git",flutter:"flutter",xcode:"xcode",simulator:"apple",cocoapods:"cocoapods",java:"openjdk",android:"android","android-studio":"androidstudio",docker:"docker"},Lq=[[/claude/i,"claude"],[/gemini/i,"googlegemini"],[/cursor/i,"cursor"],[/copilot/i,"githubcopilot"]],p4={maestro:{hex:"7B61FF",Icon:C7},"ai-tool":{hex:"0D8A42",Icon:r7}};function f4(e,n){const s=e==="ai-tool"?Lq.find(([r])=>r.test(n))?.[1]:qq[e];return s?h4[s]:void 0}function m4(e,n){return`#${g4(e,n)}`}const g4=(e,n)=>f4(e,n)?.hex??p4[e]?.hex??"536159";function Mq(e){const n=parseInt(e,16);return(n>>16&255)*.299+(n>>8&255)*.587+(n&255)*.114>150}function P1({id:e,name:n,size:s=42}){const r=f4(e,n),i=p4[e],o={"--brand":m4(e,n),"--size":`${s}px`};return t.jsx("span",{className:`tl-logo ${Mq(g4(e,n))?"light":""}`,style:o,"aria-hidden":"true",children:r?t.jsx("svg",{viewBox:"0 0 24 24",className:"tl-glyph",children:t.jsx("path",{d:r.path})}):i?t.jsx(i.Icon,{strokeWidth:2.2}):t.jsx("b",{children:n.slice(0,2)})})}const x4={build:"Building",checks:"Checks",pictures:"Phone pictures","start-app":"Start","try-it":"Try it yourself"},Oq={build:"build stories",checks:"run the checks",pictures:"take phone pictures","start-app":"start the app on the phone","try-it":"let you try the app on the phone"},_q=[{priority:"required",title:"Required",sub:"Without these, some steps cannot run. squad-kit stops only those steps."},{priority:"recommended",title:"Recommended",sub:"Things work without these, in a simpler way. With them, the experience is better."},{priority:"optional",title:"Optional",sub:"Nice to have."}];function y4(e=3e4){return we({queryKey:["tools"],queryFn:()=>ke("/api/v1/tools"),refetchInterval:n=>n.state.data?.getting||n.state.data?.checking?1e3:e})}function Dq(e){switch(e.state){case"ready":return e.version?`Ready · ${e.version}`:"Ready";case"too-old":return`Too old: found ${e.version??"an old one"}, needs ${e.needs} or newer`;case"getting":return"Getting it now";case"updating":return"Updating now";case"not-here":return"Not on this computer";default:return"Missing"}}const Kf=e=>e.state==="ready"?"ok":e.state==="getting"||e.state==="updating"?"get":e.state==="not-here"?"off":"needs";function j4({l:e,size:n=13}){return e.state==="ready"?t.jsx(fe,{size:n,strokeWidth:3,"aria-hidden":"true"}):e.state==="getting"||e.state==="updating"?t.jsx(st,{size:n,className:"spin","aria-hidden":"true"}):e.state==="not-here"?t.jsx(ga,{size:n,strokeWidth:3,"aria-hidden":"true"}):t.jsx(Cs,{size:n,strokeWidth:2.5,"aria-hidden":"true"})}const Bq={ready:"Ready","too-old":"Too old",missing:"Missing",getting:"Getting it",updating:"Updating","not-here":"Not here"},Wq=e=>e.length<=1?e[0]??"":`${e.slice(0,-1).join(", ")} or ${e[e.length-1]}`;function Uq(e){const n=Wq(e.blocks.map(r=>Oq[r]??x4[r]??r)),s=e.state==="too-old"||e.state==="updating";return!s&&e.installer==="squad-kit"?`Until squad-kit gets ${e.name}, it can't ${n}. Everything else works.`:`Until ${e.name} is ${s?"updated":"installed"}, squad-kit can't ${n}. Everything else works.`}function Hq({lines:e}){return t.jsx("nav",{className:"tl-shelf","aria-label":"This project's tools",children:e.map(n=>t.jsxs(xe,{to:"/tools",hash:n.id,className:`tl-chip ${Kf(n)}`,children:[t.jsxs("span",{className:"tl-chip-art",children:[t.jsx(P1,{id:n.id,name:n.name,size:46}),t.jsx("span",{className:"tl-badge",children:t.jsx(j4,{l:n,size:11})})]}),t.jsx("b",{children:n.name}),t.jsx("span",{children:Bq[n.state]})]},n.id))})}const fj=e=>e>=90?`about ${Math.round(e/60)} min left`:`about ${e} s left`;function Vq({g:e}){const n=e.total?Math.min(99,Math.floor(e.done/e.total*100)):null,s=r=>Math.round(r/1024/1024);return t.jsxs("div",{className:"tl-get","aria-live":"polite",children:[t.jsx("div",{className:"tl-bar",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n??void 0,children:t.jsx("i",{style:{width:`${e.step==="unpack"?100:n??5}%`}})}),e.step==="update"?t.jsxs("span",{children:[e.words??"Updating",", ",fj(e.secondsLeft),". Steps that need ",e.name," wait until it is done; everything else keeps working."]}):t.jsxs("span",{children:[e.step==="unpack"?"Unpacking":`${e.step==="install"?e.words??"Installing":"Downloading"}${e.total?`: ${s(e.done)} of ${s(e.total)} MB`:""}`,", ",fj(e.secondsLeft),". You can keep working meanwhile."]})]})}function Kq({l:e,busy:n}){const s=oe(),[r,i]=C.useState(!1),o=e.update;return r?t.jsx("div",{className:"tl-act",children:t.jsxs("div",{className:"tl-ask",role:"group","aria-label":`Update ${e.name} for all projects?`,children:[t.jsxs("p",{children:[t.jsx(Rs,{size:15,strokeWidth:2.4,"aria-hidden":"true"}),t.jsx("span",{children:o.warning})]}),t.jsxs("span",{className:"tl-row",children:[t.jsxs("button",{className:"btn pri sm",disabled:n||s.isPending,onClick:()=>s.mutate({path:`/api/v1/tools/${encodeURIComponent(e.id)}/update`,body:{ok:!0},done:`Updating ${e.name}`,after:()=>i(!1)}),children:[s.isPending?t.jsx(st,{size:14,className:"spin"}):t.jsx($y,{size:14})," Update ",e.name," for all projects"]}),t.jsx("button",{className:"btn sm",autoFocus:!0,disabled:s.isPending,onClick:()=>i(!1),children:"Not now"})]})]})}):t.jsxs("div",{className:"tl-act",children:[t.jsx("span",{children:"squad-kit can update it for you."}),t.jsxs("span",{className:"tl-row",children:[t.jsxs("button",{className:"btn pri sm",disabled:n||s.isPending,onClick:()=>i(!0),children:[t.jsx($y,{size:14})," Update ",e.name]}),t.jsx(te,{text:o.command})]})]})}const Yq=e=>e>=90?`about ${Math.round(e/60)} minutes`:`about ${Math.max(10,Math.round(e/10)*10)} seconds`;function Gq({l:e,onClose:n}){const s=we({queryKey:["tool-license",e.id],queryFn:()=>ke(`/api/v1/tools/${encodeURIComponent(e.id)}/license`),staleTime:36e5}),r=oe(),i=s.data;return t.jsx(We,{title:`Google's license for the ${e.name}`,wide:!0,onClose:n,footer:t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"btn pri",disabled:!i||r.isPending,onClick:()=>r.mutate({path:`/api/v1/tools/${encodeURIComponent(e.id)}/accept`,body:{licenses:i.licenses.map(o=>o.id)},done:"You accepted Google's license. Now press Get it.",after:n}),children:[r.isPending?t.jsx(st,{size:15,className:"spin"}):t.jsx(fe,{size:15})," Accept"]}),t.jsx("button",{className:"btn",autoFocus:!0,onClick:n,children:"Not now"}),t.jsx("span",{className:"grow"}),t.jsx(te,{text:e.license.command})]}),children:i?t.jsxs(t.Fragment,{children:[t.jsxs("p",{children:["Google asks everyone who gets these tools to accept ",i.licenses.length===1?"this license":`these ${i.licenses.length} licenses`,". squad-kit never accepts ",i.licenses.length===1?"it":"them"," for you: read ",i.licenses.length===1?"it":"them",", then press Accept or Not now."]}),i.licenses.map(o=>t.jsxs("section",{className:"tl-license",children:[t.jsx("h4",{className:"mono",children:o.id}),t.jsx("pre",{children:o.text})]},o.id))]}):s.isError?t.jsx(Er,{what:"the license",error:s.error,onRetry:()=>void s.refetch()}):t.jsxs("p",{className:"tl-wait",children:[t.jsx(st,{size:15,className:"spin"})," Reading the license from Google's site…"]})})}function Qq({l:e,hit:n,busy:s,onCheck:r}){const i=oe(),[o,l]=C.useState(!1),d=e.state!=="ready"&&e.state!=="not-here"&&e.state!=="getting"&&e.state!=="updating",u=!!(e.license&&!e.license.accepted);return t.jsxs("section",{id:e.id,className:`tl-line ${Kf(e)} ${e.blocks.length?"stops":""} ${n?"tl-hit":""}`,style:{"--brand":m4(e.id,e.name)},children:[t.jsxs("div",{className:"tl-head",children:[t.jsx(P1,{id:e.id,name:e.name}),t.jsxs("div",{className:"tl-name",children:[t.jsx("b",{children:e.name}),t.jsx("span",{children:e.gives})]}),t.jsxs("span",{className:`tl-state ${Kf(e)}`,children:[t.jsx(j4,{l:e})," ",Dq(e)]})]}),t.jsxs("div",{className:"tl-body",children:[e.why&&e.state==="too-old"&&t.jsxs("p",{children:[e.why,"."]}),e.blocks.length>0&&t.jsxs("p",{className:"tl-stops",children:[t.jsx(al,{size:14,strokeWidth:2.6,"aria-hidden":"true"}),t.jsx("span",{children:Uq(e)})]}),e.state==="not-here"&&e.notHere&&t.jsxs("p",{children:["It ",e.notHere,"."]}),t.jsxs("p",{className:"tl-uses",children:[t.jsx("span",{children:"Used for"}),e.actions.map(h=>t.jsx("i",{className:e.blocks.includes(h)?"stopped":"",title:e.blocks.includes(h)?"Waits for this tool":void 0,children:x4[h]},h))]}),e.note&&t.jsx("p",{children:e.note}),e.trouble&&t.jsx("p",{className:"tl-trouble",role:"alert",children:e.trouble}),e.getting&&t.jsx(Vq,{g:e.getting}),d&&e.installer==="squad-kit"&&t.jsxs("div",{className:"tl-act",children:[t.jsxs("span",{children:["squad-kit gets it itself, into its own folder, with no password asked.",e.size?` It takes ${e.size} on this computer${e.seconds?`, and ${Yq(e.seconds)} the first time`:""}.`:"",u?" Google's license comes first: read it and accept it.":""]}),u?t.jsxs("span",{className:"tl-row",children:[t.jsxs("button",{className:"btn pri sm",disabled:s,onClick:()=>l(!0),children:[t.jsx(ma,{size:14})," Read and accept Google's license"]}),t.jsx(te,{text:e.license.command})]}):t.jsxs("span",{className:"tl-row",children:[t.jsxs("button",{className:"btn pri sm",disabled:s||i.isPending,onClick:()=>i.mutate({path:`/api/v1/tools/${encodeURIComponent(e.id)}/get`,done:`Getting ${e.name}`}),children:[t.jsx(us,{size:14})," Get it"]}),t.jsx(te,{text:e.command})]}),o&&t.jsx(Gq,{l:e,onClose:()=>l(!1)})]}),d&&e.update&&t.jsx(Kq,{l:e,busy:s}),(d||e.recommended)&&e.installer==="you"&&t.jsxs("div",{className:"tl-act",children:[e.update?t.jsx("span",{className:"tl-or",children:"Or do it yourself:"}):e.cantUpdate?t.jsx("span",{children:e.cantUpdate}):e.reason&&t.jsxs("span",{children:["You ",e.recommended?"update":"install"," it: squad-kit can't, as ",e.reason,"."]}),e.steps.length>0&&t.jsx("ol",{children:e.steps.map(h=>t.jsx("li",{children:h},h))}),t.jsxs("span",{className:"tl-row",children:[t.jsxs("a",{className:"btn sm",href:e.link,target:"_blank",rel:"noreferrer",children:["Official page ",t.jsx(Kn,{size:13})]}),t.jsxs("button",{className:"btn sm",disabled:s,onClick:r,children:[t.jsx(Es,{size:13})," Check again"]}),t.jsx(te,{text:"squad tools check"})]})]})]})]})}function Zq(){const e=y4(),n=oe(),s=ta({select:l=>l.location.hash.replace(/^#/,"")}),r=e.data;C.useEffect(()=>{r&&s&&document.getElementById(s)?.scrollIntoView({block:"center",behavior:"smooth"})},[!!r,s]);const i=n.isPending||!!r?.checking,o=()=>n.mutate({path:"/api/v1/tools/check",done:"Checked this computer again"});return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"top",children:[t.jsx("h1",{children:"Tools"}),t.jsx("span",{className:"grow"}),t.jsxs("button",{className:"btn",disabled:i,onClick:o,children:[i?t.jsx(st,{size:14,className:"spin"}):t.jsx(Es,{size:14})," Check again"]}),t.jsx(te,{text:"squad tools check"})]}),t.jsx("div",{className:"scroll",children:r?t.jsxs("div",{className:"page tl-page",children:[t.jsx("h2",{children:"What this project needs"}),t.jsxs("p",{className:"tl-sub",children:[r.summary," squad-kit checks this ",r.system==="mac"?"Mac":"computer"," by itself",r.checkedAt?`, last ${Je(r.checkedAt)}`:"",". After you install something, press Check again."]}),t.jsx(Hq,{lines:r.lines}),_q.map(l=>{const d=r.lines.filter(u=>u.priority===l.priority);return d.length?t.jsxs("div",{className:"tl-group",children:[t.jsx("h3",{children:l.title}),t.jsx("p",{className:"tl-gsub",children:l.sub}),d.map(u=>t.jsx(Qq,{l:u,hit:s===u.id,busy:i,onCheck:o},u.id))]},l.priority):null})]}):e.isError?t.jsx(Er,{what:"the tools",error:e.error,onRetry:()=>void e.refetch()}):t.jsx("div",{className:"center",children:t.jsxs("span",{className:"tl-wait",children:[t.jsx(st,{size:16,className:"spin"})," Checking this computer's tools…"]})})})]})}const Xq=[{to:"/overview",label:"Overview",icon:gm,badge:"setup"},{to:"/requirements",label:"Requirements",icon:Hk,badge:"reqs"},{to:"/board",label:"Board",icon:Wk},{to:"/backlog",label:"Backlog",icon:k7},{to:"/inbox",label:"Waiting for you",icon:x7,badge:"you"},{to:"/lead",label:"Squad lead",icon:nu,badge:"lead"},{to:"/conversations",label:"Conversations",icon:sa,badge:"chats"},{to:"/releases",label:"Releases",icon:ds},{to:"/architecture",label:"Architecture",icon:N7},{to:"/bugs",label:"Bugs",icon:Qs,badge:"bugs"},{to:"/harness",label:"Harness",icon:ra},{to:"/tools",label:"Tools",icon:Mo,badge:"tools"},{to:"/settings",label:"Settings",icon:T7}];function Jq(){const e=Ue(),{theme:n,toggleTheme:s,showCommands:r,toggleCommands:i}=qe(),o=ta({select:P=>P.location.pathname}),l=e.data?.ready?e.data.meta:void 0,d=e.data?.ready?e.data.tickets:[],u=d.filter(P=>!P.mergedAt&&P.stage!=="done"&&!P.archived).length,h=iu().length,m=d.filter(ul).length+h,p=d.filter(P=>P.kind==="bug").length,x=(l?.user.name??"You").slice(0,2).toUpperCase(),y=Ko().data?.filter(P=>P.open).length??0,j=Az(),k=Fq(),w=y4(6e4).data?.lines.filter(P=>P.priority==="required"&&P.state!=="ready"&&P.state!=="not-here").length??0,S=fw(5e3),T=gS(S.data?.breakdowns??[],l?.user.name),A=Zw(5e3).data?.conversations.some(P=>P.thinking)??!1,[D,$]=C.useState(!1);return C.useEffect(()=>$(!1),[o]),o.startsWith("/conversations")||o.startsWith("/setup")?t.jsxs("div",{className:"fullpage",children:[t.jsx(Uf,{}),t.jsx(Wf,{}),t.jsx(ij,{}),t.jsx("div",{className:"canvas-b",children:t.jsx(df,{})}),t.jsx(hj,{})]}):t.jsxs("div",{className:`app ${j?"docked":""}`,children:[t.jsxs("header",{className:"mtop",children:[t.jsx("button",{className:"iconbtn",onClick:()=>$(!0),"aria-label":"Open the menu","aria-expanded":D,children:t.jsx(b7,{size:17})}),t.jsx(L,{as:"b",text:l?.project??"Your project"}),m>0&&t.jsx(xe,{to:"/inbox",className:"badge you","aria-label":`${m} waiting for you`,children:m})]}),D&&t.jsx("div",{className:"side-veil",onClick:()=>$(!1)}),t.jsxs("aside",{className:`side ${D?"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"}),l?.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:(l?.project??"P").charAt(0)}),t.jsxs("div",{children:[t.jsx(L,{as:"b",text:l?.project??"Your project"}),t.jsx("span",{children:u===1?"1 open ticket":`${u} open tickets`})]}),t.jsx(i7,{size:14,className:"sw"})]}),Xq.map(P=>{const F=P.badge==="you"?m:P.badge==="bugs"?p:P.badge==="chats"?y:P.badge==="tools"?w:0;if(P.badge==="setup")return t.jsxs(xe,{to:P.to,className:`nav ${o.startsWith(P.to)?"on":""}`,onClick:()=>$(!1),children:[t.jsx(P.icon,{size:16}),P.label,k&&t.jsx("span",{className:"badge you","aria-label":"Waits for you",children:"1"})]},P.to);if(P.badge==="reqs")return t.jsxs(xe,{to:P.to,className:`nav ${o.startsWith(P.to)?"on":""}`,onClick:()=>$(!1),children:[t.jsx(P.icon,{size:16}),P.label,T>0?t.jsx("span",{className:"badge you","aria-label":`${T} ${T===1?"needs":"need"} you`,children:T}):t.jsx("span",{className:"badge new",children:"New"})]},P.to);const _=o.startsWith(P.to)||P.to==="/inbox"&&o.endsWith("/proof");return P.badge==="lead"?t.jsxs(xe,{to:P.to,className:`nav navlead ${_?"on":""}`,onClick:()=>$(!1),title:"Ask from any page with ⌘K or Ctrl+K",children:[t.jsx(P.icon,{size:16}),P.label,A&&t.jsx("span",{className:"leaddot","aria-label":"The lead is answering"})]},P.to):t.jsxs(xe,{to:P.to,className:`nav ${_?"on":""}`,onClick:()=>$(!1),children:[t.jsx(P.icon,{size:16}),P.label,F>0&&t.jsx("span",{className:`badge ${P.badge==="you"?"you":P.badge==="chats"?"talk":""}`,children:F})]},P.to)}),t.jsx("div",{className:"grow"}),t.jsx(fq,{}),t.jsx("div",{className:"engines",children:(l?.tools??[]).map(P=>t.jsxs("div",{className:"row",children:[t.jsx("span",{children:P.name}),t.jsx("span",{className:`dot ${P.ready?"":"off"}`,children:P.ready?"Ready":"Not installed"})]},P.name))}),t.jsxs("button",{className:"switch",onClick:i,"aria-pressed":r,children:[t.jsxs("span",{children:[t.jsx(Lo,{size:15}),"Show commands"]}),t.jsx("span",{className:`tog ${r?"on":""}`})]}),t.jsxs("div",{className:"me",children:[t.jsx("span",{className:"av",children:x}),t.jsxs("div",{children:[l?.user.name??"You",t.jsx("small",{children:l?.user.role??""})]}),t.jsx("button",{className:"theme",onClick:s,"aria-label":n==="light"?"Switch to dark":"Switch to light",children:n==="light"?t.jsx(il,{size:15}):t.jsx(ol,{size:15})})]})]}),t.jsxs("main",{className:"canvas",children:[t.jsxs(wq,{children:[t.jsx(Uf,{}),t.jsx(hv,{}),t.jsx(Wf,{}),e.data?.ready&&t.jsx(Qz,{}),e.data?.ready&&e.data.console?.outdated&&t.jsx(n9,{}),t.jsx(ij,{})]}),t.jsx("div",{className:"canvas-b",children:t.jsx(df,{})})]}),t.jsx(Rz,{}),t.jsx(N9,{}),t.jsx(hj,{})]})}function k4({error:e,reset:n}){const s=e instanceof Error?e.stack??e.message:String(e);return t.jsx("div",{className:"center",role:"alert",style:{padding:24},children:t.jsxs("div",{style:{maxWidth:520},children:[t.jsxs("h2",{children:[t.jsx(Rs,{size:18,style:{verticalAlign:"-3px",marginRight:8}}),"This page ran into a problem"]}),t.jsx("p",{children:"Your work is safe, and so is what you typed. Try again, or go on from the board."}),t.jsxs("div",{style:{display:"flex",gap:10,flexWrap:"wrap",marginTop:12},children:[t.jsx("button",{className:"btn pri",onClick:()=>n?n():window.location.reload(),children:"Try again"}),t.jsx("a",{className:"btn",href:`${na}/board`,children:"Go to the board"}),t.jsx("button",{className:"btn",onClick:()=>ll.open({}),children:"Report a problem"})]}),t.jsxs("details",{style:{marginTop:14},children:[t.jsx("summary",{className:"note",children:"For engineers"}),t.jsx("pre",{className:"mono",style:{fontSize:12,whiteSpace:"pre-wrap",overflowWrap:"anywhere"},children:s})]})]})})}class mj extends C.Component{state={error:null};static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n,s){console.error(n,s.componentStack)}render(){return this.state.error===null?this.props.children:this.props.fallback??t.jsx(k4,{error:this.state.error,reset:()=>this.setState({error:null})})}}const _p=12;function R1({file:e,note:n}){const r=we({queryKey:["api-proof",e],queryFn:async()=>(await fetch(Vn(`/api/v1/proof/${e}`))).json()}).data;return r?t.jsxs("div",{className:"apiproof",children:[n&&t.jsx(L,{as:"p",text:n}),t.jsxs("div",{className:"maprow",children:[t.jsx("b",{children:"Asked"}),t.jsxs("span",{className:"mono",children:[r.part,": ",r.method," ",r.path]})]}),t.jsxs("div",{className:"maprow",children:[t.jsx("b",{children:"It answered"}),t.jsxs("span",{className:"mono",children:[r.status,r.file?" with a file":""]})]}),r.sheets?.map((i,o)=>t.jsxs("div",{className:"apiproof-sheet",children:[t.jsx(L,{as:"b",text:i.name}),t.jsx("div",{className:"apiproof-table",children:t.jsx("table",{dir:H7(i.rows),children:t.jsx("tbody",{children:i.rows.slice(0,_p).map((l,d)=>t.jsx("tr",{children:l.map((u,h)=>d===0?t.jsx("th",{...De(u),children:u},h):t.jsx("td",{...De(u),children:u},h))},d))})})}),i.total>_p&&t.jsxs("p",{className:"note",children:["The first ",_p," of ",i.total," rows. The file has them all."]})]},o)),r.file&&t.jsx("p",{children:t.jsx("a",{className:"btn sm",href:Vn(`/api/v1/proof/${r.file}`),download:r.file,children:"Open the file it answered with"})}),t.jsxs("details",{children:[t.jsx("summary",{className:"note",children:"For engineers"}),t.jsxs("pre",{className:"mono apiproof-raw",children:[r.body?`Sent: ${r.body}
|
|
678
|
-
|
|
679
|
-
`:"",r.contentType?`Type: ${r.contentType}
|
|
680
|
-
|
|
681
|
-
`:"",r.answer??(r.file?`A file of ${r.bytes??0} bytes`:"No answer"),r.cut?`
|
|
682
|
-
|
|
683
|
-
(cut here: the rest is not kept)`:""]})]})]}):n?t.jsx("p",{className:"note",children:n}):null}function eL(e,n,s=3){const r=e?e.split(`
|
|
684
|
-
`):[],i=n.split(`
|
|
685
|
-
`);if(r.length*i.length>25e4)return[...r.map(y=>({kind:"del",text:y})),...i.map(y=>({kind:"add",text:y}))];const o=r.length,l=i.length,d=Array.from({length:o+1},()=>new Array(l+1).fill(0));for(let y=o-1;y>=0;y--)for(let j=l-1;j>=0;j--)d[y][j]=r[y]===i[j]?d[y+1][j+1]+1:Math.max(d[y+1][j],d[y][j+1]);const u=[];let h=0,m=0;for(;h<o&&m<l;)r[h]===i[m]?(u.push({kind:"same",text:r[h]}),h++,m++):d[h+1][m]>=d[h][m+1]?u.push({kind:"del",text:r[h++]}):u.push({kind:"add",text:i[m++]});for(;h<o;)u.push({kind:"del",text:r[h++]});for(;m<l;)u.push({kind:"add",text:i[m++]});const p=u.map((y,j)=>y.kind!=="same"||u.slice(Math.max(0,j-s),j+s+1).some(k=>k.kind!=="same")),x=[];return u.forEach((y,j)=>{p[j]?x.push(y):x.at(-1)?.kind!=="gap"&&x.push({kind:"gap",text:""})}),x}function tL({t:e,onTab:n}){const[s,r]=C.useState("happened"),[i,o]=C.useState(null),l=Uw(e),d=l.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"&&d.length>0&&t.jsxs("span",{className:"note convcount",children:[d.length," ",d.length===1?"step":"steps",l.data.seconds>=1?` · ${au(l.data.seconds)} in all`:""]})]}),s==="happened"?t.jsx(Iz,{t:e,onTab:n,onLog:u=>{o(u),r("log")}}):t.jsx(nL,{t:e,chosenKey:i,setKey:o})]})}function nL({t:e,chosenKey:n,setKey:s}){const i=we({queryKey:["conversations",e.id],queryFn:()=>ke(`/api/v1/tickets/${e.id}/conversations`),refetchInterval:3e3}).data??[],o=n??i.filter(p=>p.started).at(-1)?.key??null,l=we({queryKey:["conversation",e.id,o],queryFn:()=>ke(`/api/v1/tickets/${e.id}/conversations/${o}`),enabled:!!o,refetchInterval:e.live?2e3:1e4}),d=C.useMemo(()=>Jb(l.data?.updates??[]),[l.data]),[u,h]=C.useState(!0),m=C.useRef(null);return C.useEffect(()=>{u&&m.current?.scrollIntoView({block:"end"})},[d.length,u,o]),i.length?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"pills",style:{marginBottom:6},children:[i.map(p=>t.jsx("button",{className:`btn sm ${p.key===o?"pri":""}`,disabled:!p.started,onClick:()=>s(p.key),children:p.label},p.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:u,onChange:p=>h(p.target.checked)})," Follow live"]})]}),t.jsxs("p",{className:"note",style:{fontSize:12.5,margin:"0 0 14px"},children:["Everything the ",i.find(p=>p.key===o)?.label??"agent"," did, step by step. Read only."," ",l.data&&l.data.total>(l.data.updates.length??0)?`Showing the latest ${l.data.updates.length} of ${l.data.total} entries.`:""]}),t.jsxs("div",{className:"conv",children:[d.map((p,x)=>t.jsx(rL,{it:p,ticket:e.id,cwd:l.data?.cwd},p.kind==="tool"?p.id:x)),t.jsx("div",{ref:m})]}),o&&t.jsxs("div",{className:"convactions",children:[t.jsx(sL,{t:e,to:gj[o]??"builder"}),!e.chat?.open&&!e.takenOver&&t.jsx(ki,{t:e,agent:gj[o]??"builder"})]}),l.data?.command&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"lbl",children:["Open it in ",l.data.tool??"a terminal"]}),t.jsx(te,{text:l.data.command}),t.jsx("p",{className:"note",style:{fontSize:12.5,marginTop:6},children:o==="build"&&p1(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(f1,{t:e})]}):e.takenOver?.free?"It is in a conversation outside squad-kit. Bring it back on the Now tab.":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 gj={intake:"analyst",build:"builder",review:"reviewer",tester:"tester"},xj={analyst:"Analyst",architect:"Architect",builder:"Builder",reviewer:"Reviewer",tester:"Tester"};function sL({t:e,to:n}){const s=oe(),[r,i]=$e(e.id,`message-${n}`,"");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 ${xj[n]} reads it at its next step.`}`},{onSuccess:()=>i("")});return t.jsxs("div",{className:"msgagent",children:[t.jsx("input",{className:"input",dir:ge(r),value:r,onChange:l=>i(l.target.value),placeholder:`Message the ${xj[n]}…`,onKeyDown:l=>l.key==="Enter"&&r.trim()&&!s.isPending&&o()}),t.jsxs("button",{className:"btn sm pri",disabled:!r.trim()||s.isPending,onClick:o,children:[t.jsx(Ps,{size:13})," Send"]})]})}function rL({it:e,ticket:n,cwd:s}){if(e.kind==="plan")return t.jsx(hL,{entries:e.entries});if(e.kind==="tool")return t.jsx(oL,{it:e,ticket:n,cwd:s});const{from:r,content:i}=e;return r==="agent"?t.jsx("div",{className:"conv-text",children:t.jsx(I1,{content:i,ticket:n})}):t.jsx(iL,{from:r,content:i,ticket:n})}function iL({from:e,content:n,ticket:s}){const r=n.type==="text"?n.text:"",i=r.length>420||r.split(`
|
|
686
|
-
`).length>8,[o,l]=C.useState(!i&&e!=="thought"),d=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:()=>l(!o),children:[e==="thought"&&t.jsx(qk,{size:12})," ",d," ",!o&&t.jsx("span",{className:"note",children:"· show"})]}),o&&(e==="thought"?t.jsx(Sm,{style:{whiteSpace:"pre-wrap"},text:r}):t.jsx(I1,{content:n,ticket:s}))]})}const aL={read:ma,edit:yd,delete:Ve,move:yd,search:pi,execute:Lo,think:qk,fetch:p7,switch_mode:Mo,other:Mo};function oL({it:e,ticket:n,cwd:s}){const r=e.content.some(m=>m.type==="content"&&(m.content.type==="image"||m.content.type==="resource_link")),i=e.content.some(m=>m.type==="diff"),o=e.status==="failed"&&!e.skipped,[l,d]=C.useState(!e.skipped&&(i||r||o));C.useEffect(()=>{(o||r)&&d(!0)},[o,r]);const u=e.answer?Ps:e.skipped?ga:aL[e.toolKind]??Mo,h=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:()=>h&&d(!l),"aria-expanded":l,children:[t.jsx(u,{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?Rn(e.at):""}),t.jsx(cL,{status:e.status,skipped:e.skipped})]}),e.blocked?.map(m=>t.jsx(lL,{line:m},m)),l&&h&&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((m,p)=>t.jsx(dL,{c:m,ticket:n,cwd:s},p))]})]})}function lL({line:e}){const n=e.endsWith("Allow it in Settings.");return t.jsxs("p",{className:"conv-blocked",children:[t.jsx(jm,{size:13,"aria-hidden":"true"}),t.jsxs("span",{children:[n?e.slice(0,-9):e,n&&t.jsxs(t.Fragment,{children:[t.jsx(xe,{to:"/settings",children:"Settings"}),"."]})]})]})}function cL({status:e,skipped:n}){return n?t.jsxs("span",{className:"conv-status skip",children:[t.jsx(ga,{size:12})," Skipped"]}):e==="completed"?t.jsxs("span",{className:"conv-status ok",children:[t.jsx(fe,{size:12})," Done"]}):e==="failed"?t.jsxs("span",{className:"conv-status bad",children:[t.jsx(Ve,{size:12})," Failed"]}):t.jsxs("span",{className:"conv-status run",children:[t.jsx(st,{size:12,className:"spin"})," Running"]})}function dL({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(uL,{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(b4,{text:e.content.text}):t.jsx(v4,{text:e.content.text}):t.jsx(I1,{content:e.content,ticket:n})}function v4({text:e}){const n=e.length>600||e.split(`
|
|
687
|
-
`).length>12,[s,r]=C.useState(!n);return t.jsxs("div",{className:"conv-out",children:[t.jsx("pre",{children:s?e:`${e.split(`
|
|
688
|
-
`).slice(0,10).join(`
|
|
689
|
-
`).slice(0,600)}…`}),n&&t.jsx("button",{className:"linkbtn",onClick:()=>r(!s),children:s?"Show less":"Show all output"})]})}function uL({path:e,oldText:n,newText:s,isNew:r}){const i=C.useMemo(()=>eL(n,s),[n,s]),o=i.filter(m=>m.kind==="add").length,l=i.filter(m=>m.kind==="del").length,[d,u]=C.useState(i.length<=40),h=d?i:i.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:["−",l]})]})]}),t.jsx("pre",{children:h.map((m,p)=>m.kind==="gap"?t.jsx("div",{className:"gap",children:"⋯"},p):t.jsxs("div",{className:m.kind,children:[t.jsx("span",{className:"sign",children:m.kind==="add"?"+":m.kind==="del"?"−":" "}),m.text||" "]},p))}),i.length>40&&t.jsx("button",{className:"linkbtn",style:{margin:"0 10px 8px"},onClick:()=>u(!d),children:d?"Show less":`Show all ${i.length} lines`})]})}function hL({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(Uk,{size:13})," Plan · ",n," of ",e.length," done"]}),e.map((s,r)=>t.jsxs("div",{className:`conv-plan-row ${s.status}`,...De(s.content),children:[t.jsx("span",{className:"box",children:s.status==="completed"?t.jsx(fe,{size:11}):s.status==="in_progress"?t.jsx(st,{size:11,className:"spin"}):null}),t.jsx(L,{text:s.content})]},r))]})}function I1({content:e,ticket:n}){switch(e.type){case"text":return t.jsx(b4,{text:e.text});case"image":return t.jsx(n1,{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(yj,{uri:e.uri,name:e.name,mime:e.mimeType??"",size:e.size??void 0,ticket:n});case"resource":return e.resource.text?t.jsx(v4,{text:e.resource.text}):t.jsx(yj,{uri:e.resource.uri,name:e.resource.uri.split("/").pop()??"file",mime:e.resource.mimeType??"",ticket:n})}}function yj({uri:e,name:n,mime:s,size:r,ticket:i}){const o=En(i,e);return s.startsWith("image/")&&s!=="image/svg+xml"?t.jsxs("div",{className:"conv-media",children:[t.jsx(n1,{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(us,{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(" · ")})]})}const pL=[Nm];function b4({text:e}){const{theme:n}=qe();return t.jsx("div",{className:"md",children:t.jsx(Gm,{remarkPlugins:[e1],rehypePlugins:pL,components:{a:({href:s,children:r})=>t.jsx("a",{href:s,target:"_blank",rel:"noreferrer",children:r}),code:({className:s,children:r})=>{const i=/language-(\w+)/.exec(s??"")?.[1],o=String(r).replace(/\n$/,"");return!i&&!o.includes(`
|
|
690
|
-
`)?t.jsx("code",{className:"mono",dir:"ltr",children:r}):t.jsxs("div",{className:"md-code",dir:"ltr",children:[i&&t.jsx("span",{className:"md-lang",children:i==="mermaid"?"Diagram (Mermaid)":i}),t.jsx(Hb,{code:o,language:i??"text",theme:n==="dark"?Bo.vsDark:Bo.github,children:({tokens:l,getLineProps:d,getTokenProps:u})=>t.jsx("pre",{children:l.map((h,m)=>t.jsx("div",{...d({line:h}),children:h.map((p,x)=>t.jsx("span",{...u({token:p})},x))},m))})})]})}},children:e})})}const fL=(e,n)=>e.part===n.part&&(e.index??0)===(n.index??0);function Hc({review:e,at:n,dir:s,children:r}){const[i,o]=$e(e?.t.id??"none",`comment-${n.part}-${n.index??0}`,""),[l,d]=C.useState(i?"comment":null);if(!e)return t.jsx(t.Fragment,{children:r});const u=e.comments.map((m,p)=>({c:m,i:p})).filter(({c:m})=>fL(m,n)),h=()=>{i.trim()&&e.add({...n,text:i.trim()}),o(""),d(null)};return t.jsxs("div",{className:`part ${l?"open":""}`,dir:s,children:[t.jsxs("div",{className:"partbody",children:[t.jsx("div",{className:"partmain",children:l==="edit"?t.jsx(mL,{review:e,at:n,onDone:()=>d(null)}):r}),l!=="edit"&&t.jsxs("span",{className:"parttools",children:[t.jsx("button",{className:"iconbtn",title:"Comment on this","aria-label":"Comment on this",onClick:()=>d("comment"),children:t.jsx(Ty,{size:13})}),e.canEdit(n)&&t.jsx("button",{className:"iconbtn",title:"Edit it yourself","aria-label":"Edit it yourself",onClick:()=>d("edit"),children:t.jsx(yd,{size:13})})]})]}),u.map(({c:m,i:p})=>t.jsxs("div",{className:"pcomment",children:[t.jsx(Ty,{size:12})," ",t.jsx(L,{text:m.text}),t.jsx("button",{className:"iconbtn","aria-label":"Remove comment",onClick:()=>e.remove(p),children:t.jsx(Ve,{size:12})})]},p)),l==="comment"&&t.jsxs("div",{className:"pcomment new",children:[t.jsx("input",{className:"input",autoFocus:!0,dir:ge(i),value:i,placeholder:"Your comment on this part. Enter to add",onChange:m=>o(m.target.value),onKeyDown:m=>{m.key==="Enter"&&h(),m.key==="Escape"&&d(null)}}),t.jsx("button",{className:"btn sm",onClick:h,children:"Add"})]})]})}function mL({review:e,at:n,onDone:s}){const r=oe(),i=e.t,o=n.index??0,[l,d]=$e(i.id,`edit-${n.part}-${o}`,n.part==="story"?i.story??"":n.part==="step"?i.steps?.[o]?.title??"":""),[u,h]=$e(i.id,`edit-criterion-${o}`,i.criteria?.[o]??{given:"",when:"",then:""}),m=()=>r.mutate({path:`/api/v1/tickets/${i.id}/plan/edit`,body:n.part==="criterion"?{...n,criterion:u}:{...n,text:l},done:"Edited. Your wording stays."},{onSuccess:()=>{Uo(la(Ct,i.id,`edit-${n.part}-${o}`)),Uo(la(Ct,i.id,`edit-criterion-${o}`)),s()}});return t.jsxs("div",{className:"editpart",children:[n.part==="criterion"?["given","when","then"].map(p=>t.jsxs("label",{children:[t.jsx("em",{children:p[0].toUpperCase()+p.slice(1)}),t.jsx("input",{className:"input",dir:ge(u[p]),value:u[p],onChange:x=>h({...u,[p]:x.target.value})})]},p)):t.jsx("textarea",{className:"waynote",rows:n.part==="story"?3:2,autoFocus:!0,dir:ge(l),value:l,onChange:p=>d(p.target.value)}),t.jsxs("div",{className:"editbtns",children:[t.jsx("button",{className:"btn sm pri",disabled:r.isPending,onClick:m,children:"Save"}),t.jsx("button",{className:"btn sm",onClick:s,children:"Cancel"})]})]})}const jj=e=>e?`Given ${e.given}, when ${e.when}, then ${e.then}.`:"";function gL({t:e}){const[n,s]=C.useState(!0),r=e.planReview?.before;if(!r)return null;const i=[],o=(u,h="",m="")=>h!==m&&i.push({label:u,old:h,now:m});o("The story",r.story,e.story);const l=Math.max(r.criteria?.length??0,e.criteria?.length??0);for(let u=0;u<l;u++)o(`Done when ${u+1}`,jj(r.criteria?.[u]),jj(e.criteria?.[u]));(r.decision!==void 0||e.decision)&&o("The decision",r.decision,e.decision?`${e.decision.title}: ${e.decision.options.find(u=>u.chosen)?.name??""}`:"");const d=Math.max(r.steps?.length??0,e.steps?.length??0);for(let u=0;u<d;u++)o(`Step ${u+1}`,r.steps?.[u],e.steps?.[u]?.title);return t.jsxs("div",{className:"changed",children:[t.jsxs("button",{className:"changedhead",onClick:()=>s(!n),children:[t.jsx("b",{children:"What changed"})," ",i.length?`${i.length} ${i.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((u,h)=>t.jsx(L,{text:`“${u.text}”`},h))]}),i.map(u=>t.jsxs("div",{className:"chrow",children:[t.jsx("div",{className:"chlabel",children:u.label}),u.old?t.jsx(L,{as:"div",className:"chold",text:u.old}):t.jsx("div",{className:"chold empty",children:t.jsx("i",{children:"new"})}),u.now?t.jsx(L,{as:"div",className:"chnew",text:u.now}):t.jsx("div",{className:"chnew",children:t.jsx("i",{children:"removed"})})]},u.label))]})]})}function w4(e){return!!(e.now&&(e.now.state==="working"||e.now.state==="queued"||e.now.state==="stopping"))}function xL(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 N4({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 yL({t:e}){const n=e.now;if(n.state==="queued")return t.jsx(L,{as:"div",className:"nl1 quiet",text:n.line});const[s,...r]=n.line.split(" · "),i=n.slow;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"nl1",children:[t.jsx("span",{className:"live"}),t.jsx(L,{lead:t.jsx("b",{children:s}),text:r.length?`· ${r.join(" · ")}`:""})]}),i?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:`nl2 slow ${i.kind} ${i.calm?"still":""}`,children:[i.kind==="stuck"?t.jsx(Rs,{size:12}):t.jsx(mm,{size:12}),t.jsx("span",{children:i.kind==="stuck"?"Looks stuck":i.line??"Longer than usual"})]}),i.note&&t.jsx(L,{as:"div",className:"nl3",text:i.note})]}):n.time&&t.jsx("div",{className:"nl2",children:n.time}),t.jsx(N4,{bar:n.bar})]})}function S4({t:e}){const n=e.now,s=n.state==="queued"?"Next in line":n.state==="stopping"?"Stopping":"Working",[r,...i]=(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 ${xL(n.lastAt)}`:""]})]}),t.jsx(L,{as:"p",className:"nowsay",text:n.sentence}),n.detail&&(n.part?t.jsx(L,{as:"div",className:"nowmeta",lead:t.jsx("b",{children:r}),text:i.length?`· ${i.join(" · ")}`:""}):t.jsx(L,{as:"div",className:"nowmeta",text:n.detail})),t.jsx(N4,{bar:n.bar,big:!0}),n.next&&t.jsx(L,{as:"div",className:"nownext",lead:t.jsx("b",{children:"What comes next:"}),text:n.next})]})}function C4({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 i=s.length>=2&&n?Ys[n]:"squad";return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"lbl",children:["What the ",i," did, in plain words"]}),t.jsx("div",{className:"feed",children:r.map((o,l)=>t.jsxs("div",{className:"fe",children:[t.jsx("span",{className:"tm",children:Rn(o.at)}),t.jsx(fi,{role:o.who,small:!0}),t.jsx(L,{text:o.text})]},o.at+l))})]})}function jL({t:e}){const n=oe(),[s,r]=C.useState(!1),i=e.now?.slow,o=n.isPending||e.stopRequested;if(!i)return null;const l=i.kind==="stuck",d=!l&&!!i.calm,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."}),h=()=>n.mutate({path:`/api/v1/tickets/${e.id}/restart`,done:"Stopping the step. It starts again at once, with the work so far."}),m=()=>n.mutate({path:`/api/v1/tickets/${e.id}/stop`,done:"Stopping. The work so far is kept."}),p=()=>n.mutate({path:`/api/v1/tickets/${e.id}/unstick`,done:"Ended the stuck command. The squad carries on."}),x=()=>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 ${l?"stuck":d?"still":""}`,"aria-label":i.title,children:[t.jsxs("div",{className:"slowhead",children:[l?t.jsx(Rs,{size:17}):t.jsx(mm,{size:17}),t.jsx("b",{children:i.title}),t.jsx("span",{className:"grow"}),t.jsx("span",{className:"where",children:i.where})]}),t.jsxs("div",{className:"slowbody",children:[t.jsx(L,{as:"p",className:"slowsay",text:i.text}),t.jsx("div",{className:"facts",children:i.facts.map(y=>t.jsxs("div",{className:"fact",children:[t.jsx("span",{children:y.label}),t.jsx(L,{text:y.value})]},y.label))}),t.jsxs("div",{className:"ways",children:[i.freePort&&t.jsx("button",{className:"btn pri",disabled:o,onClick:()=>r(!0),children:"Stop it and try again"}),l&&i.canEnd&&!i.freePort&&t.jsx("button",{className:"btn pri",disabled:o,onClick:p,children:"End the stuck command"}),!l&&t.jsx("button",{className:`btn ${d?"":"you"}`,disabled:o,onClick:u,children:"Give it 10 more minutes"}),t.jsx("button",{className:"btn",disabled:o,onClick:h,children:"Stop and try again"}),l&&t.jsx("button",{className:"btn",disabled:o,onClick:u,children:"Keep waiting"}),t.jsxs("button",{className:"btn",disabled:o,onClick:m,children:[t.jsx(Qn,{size:12})," Stop"]}),t.jsx(A1,{t:e,problem:l?"stuck":"slow"})]}),l&&i.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."}),i.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:i.detail})]}),t.jsxs("div",{className:"slowfoot",children:[t.jsx("span",{children:l&&i.limit||"Nothing is lost whatever you choose."}),t.jsx("span",{className:"grow"}),t.jsx(te,{text:i.freePort?`squad unstick ${e.id} --free-port`:l&&i.canEnd?`squad unstick ${e.id}`:`squad wait ${e.id} --more 10m`})]})]}),s&&i.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:x,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(te,{text:`squad unstick ${e.id} --free-port`})]}),children:[t.jsxs("p",{children:["squad-kit stops ",i.freePort.what,", then starts this step again."," ",i.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 $4({t:e}){const[n,s]=$e(e.id,"status-ask",""),[r,i]=C.useState([]),[o,l]=C.useState(!1),d=async()=>{const h=n.trim();if(!(!h||o)){l(!0);try{const m=await ot(`/api/v1/tickets/${e.id}/status/ask`,"POST",{text:h});i(p=>[...p,{q:h,a:m,at:new Date().toISOString()}]),s("")}catch(m){i(p=>[...p,{q:h,error:m instanceof Error?m.message:String(m),at:new Date().toISOString()}])}finally{l(!1)}}},u=pt(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((h,m)=>t.jsx(kL,{t:e,said:h},h.at+m))}),t.jsxs("div",{className:"askrow",children:[t.jsx("input",{id:`ask-${e.id}`,className:"input",dir:u,value:n,onChange:h=>s(h.target.value),onKeyDown:h=>h.key==="Enter"&&void d(),placeholder:"For example: is there a problem? when will it be ready?"}),t.jsxs("button",{className:"btn pri",disabled:!n.trim()||o,onClick:()=>void d(),children:[t.jsx(Ps,{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(te,{text:`squad status ${e.id}`})]})]})}function kL({t:e,said:n}){const s=n.a,r=s?.lang==="ar";return t.jsxs("div",{className:"askturn",children:[t.jsx(L,{as:"div",className:"askme",text: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:Rn(n.at)})]}),n.error?t.jsx("p",{className:"err",children:n.error}):s?.lines.map((i,o)=>t.jsx("p",{children:t.jsx(Gt,{text:i,dir:r?"rtl":"ltr"})},o)),s&&s.offers.length>0&&t.jsx("div",{className:"askoffers",children:s.offers.map(i=>t.jsx(vL,{t:e,o:i,question:n.q},i.do+i.label))})]})]})}function vL({t:e,o:n,question:s}){const r=oe(),{toast:i}=qe(),[o,l]=C.useState(!1),[d,u]=C.useState(!1);switch(n.do){case"propose":return t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"btn sm offer",onClick:()=>l(!0),children:[t.jsxs("span",{className:"ol",children:[t.jsx(Ts,{size:13})," ",n.label]}),t.jsx("span",{className:"on",children:n.note})]}),o&&t.jsx(vl,{t:e,initial:s,onClose:()=>l(!1)})]});case"note":return t.jsxs("button",{className:"btn sm offer",disabled:d||r.isPending,onClick:()=>r.mutate({path:`/api/v1/tickets/${e.id}/notes`,body:{text:s,...n.to?{to:n.to}:{}}},{onSuccess:()=>{u(!0),i(`Sent. ${n.note}`)}}),children:[t.jsxs("span",{className:"ol",children:[t.jsx(Ps,{size:13})," ",d?"Sent":n.label]}),t.jsx("span",{className:"on",children:n.note})]});case"chat":return t.jsx(ki,{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(Qn,{size:12})," ",n.label]})}}function bL({t:e}){const n=oe(),[s,r]=C.useState(!1),i=e.agentQuestion,o=i.port,l=i.options.find(h=>h==="Stop it"),d=i.options.find(h=>h!=="Stop it"),u=(h,m)=>n.mutate({path:`/api/v1/tickets/${e.id}/reply`,body:{text:h},done:m},{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(L,{as:"p",className:"stuckq",text:i.text}),i.why&&t.jsx(L,{as:"p",className:"note",text:i.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:[l&&t.jsx("button",{className:"btn pri",disabled:n.isPending,onClick:()=>r(!0),children:l}),d&&t.jsx("button",{className:`btn ${l?"":"pri"}`,disabled:n.isPending,onClick:()=>u(d,"Sent. The Builder carries on without it."),children:d}),t.jsx("span",{className:"grow"}),t.jsx(te,{text:`squad reply ${e.id} ${Le(l??d??"")}`})]}),s&&l&&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:()=>u(l,"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(te,{text:`squad reply ${e.id} ${Le(l)}`})]}),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 T4({t:e,banner:n}){const s=oe(),r=e.testChange;if(!r?.ask)return null;const i=l=>s.mutate({path:`/api/v1/tickets/${e.id}/test-command`,body:{use:l},done:l?"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(c7,{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:()=>i(!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:()=>i(!0),children:"Use the new way"}),t.jsx("span",{className:"grow"}),t.jsx(te,{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 F1="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 E4(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 wL(e){if(e?.checks!=="unchecked")return null;const n=e.checksText?.split(" · ").slice(1).join(" · ");return F1.replace("Check the proof",`${n?`Passed: ${n}. `:""}Check the proof`)}function lu(e){return e?.checks==="pending"&&e.review==="pending"&&e.proof==="pending"}function NL(e){if(lu(e))return"Built outside squad-kit, so squad-kit has not checked it. Try it yourself, or press Check at the top.";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}`:e?.oldFailures?.length?`Every gate is green for this story's change. ${z1(e.oldFailures.length)}, without it. ${n}`:`Every gate is green. ${n}`}function z1(e){return e===1?"1 old test also fails on main":`${e} old tests also fail on main`}function A4(e){const n=e?.oldFailures??[];if(!n.length)return null;const s=n.length===1,r=[...new Set(n.map(i=>i.story).filter(Boolean))];return`${s?"This test fails":"These tests fail"} on main too, without this story's change, so ${s?"it is":"they are"} not this story's: ${n.map(i=>i.title).join("; ")}.${r.length?` ${r.join(" and ")} ${r.length===1?"fixes":"fix"} ${s?"it":"them"}.`:""}`}function P4(e){const n=(e.proof??[]).some(i=>i.shows==="broken"),s=(e.proof??[]).some(i=>i.shows==="not-shown"),r=(e.proof??[]).some(i=>i.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 R4(e){return lu(e.gates)?"None yet. squad-kit makes them when you press Check.":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 SL(e){return e.added?`team's check "${e.added}"`:e.weakened?.length?"weakened tests":e.gate==="hooks"?"project's own check":e.gate==="checks"?"failed checks":e.gate==="proof"?"unfinished proof":"open review"}function as({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"?F1:void 0,children:[e==="pass"&&t.jsx(fe,{size:13,strokeWidth:2.5}),e==="unchecked"&&t.jsx(Cs,{size:13,strokeWidth:2.5}),n]})}function I4({g:e,className:n=""}){const s=A4(e);return s?t.jsxs("p",{className:`note unchecked-why old-fails ${n}`,children:[t.jsx(Cs,{size:14,strokeWidth:2.4,"aria-hidden":"true"}),t.jsxs("span",{children:[t.jsxs("b",{children:[z1(e.oldFailures.length),"."]})," ",t.jsx(L,{text:s})]})]}):null}function F4({g:e,className:n=""}){const s=wL(e);return s?t.jsxs("p",{className:`note unchecked-why ${n}`,children:[t.jsx(Cs,{size:14,strokeWidth:2.4,"aria-hidden":"true"}),t.jsxs("span",{children:[t.jsx("b",{children:"Not checked."})," ",s]})]}):null}const z4="Built without new tests",q4="Write new tests was off when this story was made, so the Builder wrote no new tests. squad-kit still ran your project's own checks, the review and the proof.";function q1({t:e}){return e.noNewTests?t.jsx("span",{className:"prio notests",title:q4,children:z4}):null}function CL({t:e}){return e.noNewTests?t.jsx("span",{className:"prio notests",title:`${z4}. ${q4}`,children:"No new tests"}):null}function $L(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 L1(e){return e==="met"?"met":e==="broken"?"broken":e==="not-shown"?"notshown":e==="off-screen"?"notonscreen":""}function Go(e){return e.shows==="broken"||e.shows==="not-shown"||e.shows==="off-screen"?e.why??e.note??"":e.note??""}function TL(e){const n=(e.proof??[]).filter(s=>s.shows==="off-screen").map(s=>({criterion:s.criterion,why:Go(s)}));return[...n,...(e.offScreen??[]).filter(s=>!n.some(r=>r.criterion===s.criterion))]}const Qo=e=>e.endsWith(".api.json"),EL=`data:image/svg+xml,${encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="640" height="200"><text x="24" y="100" font-family="sans-serif" font-size="20">An answer from the API, not a picture</text></svg>')}`;function L4(e,n){const s=o=>Qo(o)?EL:n(o),r=[],i=[];for(const o of e)i.push(r.length),r.push({src:s(o.before),caption:`${o.criterion} · ${o.beforeLabel}`},{src:s(o.after),caption:`${o.criterion} · ${o.afterLabel}`}),(o.more??[]).forEach((l,d)=>r.push({src:s(l.after),caption:`${o.criterion} · ${l.note||`Picture ${d+2}`}`}));return{pictures:r,starts:i}}function M4({shows:e,size:n=15}){return e==="broken"?t.jsx(Ve,{size:n,strokeWidth:2.5,className:"vx","aria-hidden":"true"}):e==="not-shown"?t.jsx(_k,{size:n,strokeWidth:2.25,className:"vq","aria-hidden":"true"}):e==="off-screen"?t.jsx(w7,{size:n,strokeWidth:2.25,className:"vo","aria-hidden":"true"}):t.jsx(fe,{size:n,strokeWidth:2.5,"aria-hidden":"true"})}function Yf({shows:e}){const n=$L(e);return n?t.jsx("span",{className:`verdict ${L1(e)}`,children:n}):null}function O4({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,i)=>t.jsxs("figure",{children:[Qo(r.after)?t.jsx(R1,{file:r.after}):t.jsx("button",{className:"zoom",onClick:()=>s(n+i),"aria-label":`Open picture ${i+2} of this "done when" full size`,children:t.jsx("img",{src:Vn(`/api/v1/proof/${r.after}`),alt:`${e.criterion}, ${r.note||`picture ${i+2}`}`,loading:"lazy"})}),t.jsxs("figcaption",{children:[r.note&&t.jsx(L,{text:r.note}),ci(r)&&t.jsx("code",{children:ci(r)}),r.device&&t.jsx("small",{className:"shotdevice",children:r.device})]})]},r.after))})]}):null}function AL({t:e}){return e.picturesNote?t.jsxs("p",{className:"critpage picturesnote",children:[e.picturesNote.text," ",t.jsx(xe,{to:"/tools",hash:e.picturesNote.link.split("#")[1],children:"See what's needed"})]}):null}function Na({t:e,className:n}){return t.jsxs(t.Fragment,{children:[!!e.alsoChanged?.length&&t.jsx(L,{as:"p",className:`note alsochanged${n?` ${n}`:""}`,lead:t.jsx("b",{children:"Also changed, not in the plan:"}),text:`${e.alsoChanged.join("; ")}.`}),t.jsx(PL,{t:e})]})}const kj={passed:["Passed","ok"],failed:["Did not pass","bug"],warned:["Did not pass, warn only","you"],"would-stop":["Would have stopped","you"],"cant-run":["Could not run","you"]};function PL({t:e}){return e.added?.length?t.jsxs("div",{className:"teamres",children:[t.jsx("div",{className:"lbl",children:"Added by your team"}),e.added.map(n=>t.jsxs("div",{children:[t.jsxs("div",{className:"teamtop",children:[t.jsx(L,{as:"b",text:n.name}),n.result&&t.jsx("span",{className:`pill ${kj[n.result][1]}`,children:kj[n.result][0]}),n.state==="try"&&t.jsx("small",{children:"On Try first, it stops nothing"})]}),n.why&&t.jsx(L,{as:"p",className:"note",text:n.why}),n.answers&&t.jsx("ol",{dir:pt(n.answers.map(s=>s.question).join(" ")).dir,children:n.answers.map(s=>t.jsxs("li",{...De(s.question),children:[t.jsx(L,{text:s.question})," ",t.jsx("b",{className:s.answer==="no"?"no":"",children:s.answer==="yes"?"Yes":s.answer==="no"?"No":"Not answered"}),s.why&&t.jsx(L,{as:"small",text:` ${s.why}`})]},s.question))})]},n.id))]}):null}function Gf({t:e}){return!e.offScreen?.length||va(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(L,{as:"b",text:n.criterion}),t.jsx(L,{text:n.why})]},n.criterion))})]})}function RL({t:e}){const n=TL(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(L,{as:"b",text:s.criterion}),t.jsx(L,{text:s.why})]},s.criterion))})]}):null}function IL(e,n){return!!e.mergedAt||e.stage==="done"||n&&e.stage==="release"}function Ad(e){return Od.createPortal(e,document.body)}function FL(){const e=Ue();return e.data?.ready?e.data.meta.engine==="demo":!1}function zL({t:e,onDeleted:n,items:s=[]}){const[r,i]=C.useState(!1),[o,l]=C.useState(null),d=IL(e,FL()),u=_4(e),h=C.useRef(null);C.useEffect(()=>{if(!r)return;const p=y=>h.current&&!h.current.contains(y.target)&&i(!1),x=y=>y.key==="Escape"&&i(!1);return document.addEventListener("mousedown",p),document.addEventListener("keydown",x),()=>{document.removeEventListener("mousedown",p),document.removeEventListener("keydown",x)}},[r]);const m=p=>()=>{i(!1),p()};return t.jsxs("span",{className:"more",ref:h,children:[t.jsx("button",{className:"iconbtn","aria-label":"More actions","aria-haspopup":"menu","aria-expanded":r,title:"More actions",onClick:()=>i(!r),children:t.jsx(Ok,{size:16})}),r&&t.jsxs("div",{className:"more-menu",role:"menu",children:[s.map(p=>t.jsx("button",{role:"menuitem",onClick:m(p.onPick),children:p.label},p.key)),e.archived?t.jsxs("button",{role:"menuitem",onClick:m(u),children:[t.jsx(Fk,{size:15})," Unarchive"]}):d?t.jsxs("button",{role:"menuitem",onClick:m(()=>l("archive")),children:[t.jsx(md,{size:15})," Archive…"]}):e.ownerDeleted?t.jsxs("button",{role:"menuitem",className:"danger",onClick:m(()=>l("delete")),children:[t.jsx(Pn,{size:15})," Remove from my board…"]}):t.jsxs("button",{role:"menuitem",className:"danger",onClick:m(()=>l("delete")),children:[t.jsx(Pn,{size:15})," Delete ticket…"]})]}),o==="delete"&&Ad(t.jsx(Qf,{t:e,onClose:()=>l(null),onDeleted:n})),o==="archive"&&Ad(t.jsx(qL,{t:e,onClose:()=>l(null)}))]})}function _4(e){const n=oe();return()=>n.mutate({path:`/api/v1/tickets/${e.id}/archive`,body:{undo:!0},done:`${e.id} is back on the board.`})}function Pd({items:e,mark:n}){return t.jsx("ul",{className:"rmlist",children:e.map(s=>t.jsxs("li",{children:[n==="x"?t.jsx(Ve,{size:16,className:"x","aria-hidden":!0}):n==="hide"?t.jsx(_k,{size:16,className:"hide","aria-hidden":!0}):t.jsx(fe,{size:16,className:"ok","aria-hidden":!0}),t.jsx(L,{text:s})]},s))})}function Qf({t:e,onClose:n,onDeleted:s}){const r=oe(),{toast:i}=qe(),[o,l]=C.useState(!!e.deleting?.remote),d=we({queryKey:["delete-plan",e.id,o],queryFn:()=>ke(`/api/v1/tickets/${e.id}/delete?remote=${o?1:0}`),placeholderData:P6}),u=d.data,h=!!(u?.local??e.ownerDeleted),m=()=>r.mutate({path:`/api/v1/tickets/${e.id}/delete`,body:{remote:o},done:h?`Removed ${e.id} from your board.`:`Deleted ${e.id}. Its cost stays in Usage.`},{onSuccess:p=>{p.notes.length&&i(`${p.notes.join(". ")}.`),n(),s()},onError:()=>void d.refetch()});return t.jsxs(We,{title:h?`Remove ${e.id} from your board?`:`Delete ${e.id}?`,onClose:n,icon:t.jsx("span",{className:"glyph",children:t.jsx(Pn,{size:15})}),footer:t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"btn danger",disabled:!u||!!u.refused||r.isPending,onClick:m,children:[t.jsx(Pn,{size:15})," ",h?r.isPending?"Removing…":"Remove from my board":r.isPending?"Stopping the squad and deleting…":u?.unfinished?"Delete again":`Delete ${e.id}`]}),t.jsx("button",{className:"btn",onClick:n,children:"Cancel"}),t.jsx("span",{className:"grow"}),t.jsx(te,{text:u?.command??`squad delete ${e.id}`})]}),children:[t.jsx(L,{as:"p",text:u?.summary??e.title}),d.isError&&t.jsx("div",{className:"stuckbox",children:d.error.message}),u?.refused&&t.jsx("div",{className:"stuckbox",children:u.refused}),u&&!u.refused&&t.jsxs(t.Fragment,{children:[u.unfinished&&t.jsxs("div",{className:"stuckbox rm-gap",children:["The last delete did not finish: ",u.unfinished,". Delete again to finish it. It goes on where it stopped."]}),u.warnings.length>0&&t.jsx("div",{className:"stuckbox rm-gap",children:u.warnings.map(p=>t.jsx(L,{as:"div",text:p},p))}),t.jsx("div",{className:"lbl",children:"This removes"}),t.jsx(Pd,{items:u.removes,mark:"x"}),t.jsx("div",{className:"lbl",children:"This stays"}),t.jsx(Pd,{items:u.stays,mark:"ok"}),u.pushed&&t.jsxs("label",{className:"talkfirst",children:[t.jsx("input",{type:"checkbox",checked:o,onChange:p=>l(p.target.checked)}),t.jsxs("span",{children:[t.jsx("b",{children:"Also delete its work in your team's shared copy of the code."})," ",u.pushed.why]})]}),h?t.jsxs("p",{className:"rm-note",children:["Only ",u.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 work is in the code already. Use ",t.jsx("b",{children:"Archive"})," to hide it from the board. Its history stays."]})]})]})}function qL({t:e,onClose:n}){const s=oe(),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(md,{size:15})}),footer:t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"btn pri",disabled:s.isPending,onClick:r,children:[t.jsx(md,{size:15})," Archive ",e.id]}),t.jsx("button",{className:"btn",onClick:n,children:"Cancel"}),t.jsx("span",{className:"grow"}),t.jsx(te,{text:`squad archive ${e.id}`})]}),children:[t.jsx(L,{as:"p",text:`${e.title} · ${e.status}`}),t.jsx("div",{className:"lbl",children:"This hides"}),t.jsx(Pd,{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(Pd,{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 LL({t:e,onDeleted:n}){const[s,r]=C.useState(!1),i=_4(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 ${Je(o.at)}.`:`Its work is gone from your team's shared copy of the code, and it never reached the code itself, 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(Pn,{size:13})," Remove from my board"]}),t.jsx(te,{text:`squad delete ${e.id}`}),s&&Ad(t.jsx(Qf,{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(Pn,{size:13})," Delete again"]}),t.jsx(te,{text:`squad delete ${e.id}`}),s&&Ad(t.jsx(Qf,{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(md,{size:16})}),t.jsxs("div",{className:"grow",children:[t.jsxs("b",{children:["Archived ",Je(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(te,{text:`squad archive ${e.id} --undo`})})]}),t.jsxs("button",{className:"btn sm",onClick:i,children:[t.jsx(Fk,{size:13})," Unarchive"]})]}):null}function ua(e){return!!e.mergedAt||e.stage==="done"}function M1(e){const n=Ue(),s=n.data?.ready?[...n.data.tickets,...n.data.archived??[]]:[];return(e.dependsOn??[]).map(r=>s.find(i=>i.id===r)).filter(r=>!!r)}function ML(e){return e.waiting?.kind==="depends"||e.dependency?.way==="wait"&&!e.dependency.started&&!e.squad&&!e.waiting}const OL={branch:"--on-branch",anyway:"--anyway",wait:"--wait"};function _L({t:e}){const n=oe(),s=Ue(),r=s.data?.ready?s.data.meta.engine==="live":!0,i=M1(e).filter(j=>!ua(j)),o=e.dependency?.way==="wait"&&!e.waiting,[l,d]=C.useState(o?null:"branch"),u=i.map(j=>j.id).join(" and ")||"it",h=i.length===1?i[0]:void 0,m=!!(r&&h&&!h.worktree&&!h.branch),p=[{way:"branch",label:h?`Build on ${h.id}'s work`:"Build on its work",note:`The copy starts from ${u}'s work so far. Once ${u} is merged, the newest work comes in and any clash is settled.`,off:h?m?`${h.id} has no code yet.`:void 0:"A copy can start from one ticket only."},{way:"anyway",label:"Build anyway",note:`From your team's code, without ${u}. This stays on the ticket's record.`},{way:"wait",label:"Wait",note:`Starts by itself when ${u} ${i.length>1?"are":"is"} merged.`,off:o?"This is what it does now.":void 0}],x=p.find(j=>j.way===l&&!j.off),y={branch:`Building on ${u}'s work`,anyway:`Building without ${u}`,wait:`It starts by itself once ${u} 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:o?t.jsx(ff,{size:15}):t.jsx(pf,{size:15})}),t.jsxs("div",{children:[t.jsx(L,{as:"b",text:o?`Waits for ${u} to merge`:e.waiting?.summary??`${e.id} needs ${u}, which is not merged yet`}),t.jsx("span",{children:o?`It starts by itself once ${u} ${i.length>1?"are":"is"} merged. You can still build it another way.`:`Its design uses work from ${u}, which is not in the code yet. Choose how to build.`})]})]}),t.jsx("div",{className:"lbl",children:"What it needs"}),i.map(j=>t.jsxs("div",{className:"trow",children:[t.jsx("span",{className:"mono",children:j.id}),t.jsx(L,{as:"b",text:j.title}),t.jsxs("span",{className:"pill wait",children:[Zs[j.stage]," · not merged yet"]})]},j.id)),r&&i.some(DL)&&t.jsx(O1,{t:e,text:`Merged ${u} on the code host already? squad-kit looks by itself every few minutes, or now:`}),t.jsxs("div",{className:"lbl",children:["How to build ",e.id]}),t.jsx("div",{className:"opts2",style:{gridTemplateColumns:"1fr"},children:p.map(j=>t.jsxs("button",{className:`opt2 ${l===j.way&&!j.off?"pick":""}`,disabled:!!j.off,onClick:()=>d(j.way),children:[t.jsxs("b",{children:[j.label,l===j.way&&!j.off&&t.jsxs("span",{children:[t.jsx(fe,{size:13,strokeWidth:2.5})," Your pick"]})]}),j.off?`${j.note} ${j.off}`:j.note]},j.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:y[x.way]}),children:[x?.way==="wait"?t.jsx(ff,{size:15}):t.jsx(pf,{size:15})," ",x?x.label:"Pick a way"]}),t.jsx("span",{className:"grow"}),t.jsx(te,{text:`squad build ${e.id} ${OL[x?.way??"branch"]}`})]})]})}function DL(e){return!ua(e)&&(e.stage==="release"||!!e.clashedPr||e.waiting?.kind==="stuck"&&e.stuck?.gate==="merge")}function O1({t:e,text:n}){const s=oe();return t.jsxs("div",{className:"pills",style:{alignItems:"center",marginTop:10},children:[t.jsx("span",{className:"note",style:{fontSize:13},children:n}),t.jsxs("button",{className:"btn sm",disabled:s.isPending,title:`squad check-merge ${e.id}`,onClick:()=>s.mutate({path:`/api/v1/tickets/${e.id}/check-merge`,done:r=>r.line}),children:[t.jsx(Es,{size:13,className:s.isPending?"spin":void 0})," ",s.isPending?"Asking the code host…":"Check again"]}),t.jsx(te,{text:`squad check-merge ${e.id}`})]})}const BL={branch:e=>`Built on ${e}'s work. The newest work comes in once ${e} is merged.`,anyway:e=>`Built from your team's code without ${e}, as you chose.`,wait:e=>`Waits for ${e} to merge, then starts by itself.`};function WL({t:e}){const n=M1(e);if(!e.dependsOn?.length)return null;const s=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(r=>{const i=n.find(l=>l.id===r),o=!i||ua(i);return t.jsxs("span",{className:`pill ${o?"ok":"wait"}`,title:i?.title,children:[o&&t.jsx(Dk,{size:13}),t.jsxs("span",{children:[r,i&&t.jsxs(t.Fragment,{children:[" ",t.jsx(L,{text:i.title})]})," · ",i?o?"merged":"not merged yet":"left the board"]})]},r)})}),s&&(s.way!=="wait"||!s.started)&&t.jsxs("p",{className:"note",style:{marginTop:6},children:[BL[s.way](s.on.join(" and "))," ",s.by," chose this."]})]})}function UL({t:e}){const n=M1(e).filter(o=>!ua(o));if(!n.length||e.waiting?.kind==="depends"||ua(e))return null;const s=n.map(o=>o.id).join(", "),r=e.dependency,i=r?.way==="branch"?`On ${s}'s work`: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:i})}function HL({t:e}){const n=oe(),s=Ue(),r=s.data?.ready?s.data.meta.engine!=="live":!1;if(!["implement","test","review"].includes(e.stage)||ua(e)||e.takenOver||e.waiting&&!["proof","stuck"].includes(e.waiting.kind))return null;const i=!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:r?"The sample board has no code, so nothing changed":i?"The newest work comes in when this step ends, before the checks":"Bringing in the newest work"}),children:[t.jsx(Dk,{size:13})," ",e.baseWanted?"The newest work comes in after this step":"Bring in the newest work"]})}function _1(e){const n=Ue(),s=n.data?.ready?n.data.meta.engine==="live":!0;return jI(e,s)}function D4({t:e}){const n=oe(),s=ft[_1(e)],r=qt(),i=xa(ya),o=()=>i?void r({to:"/conversations",search:{ticket:e.id}}):Ss.show(e.id);return e.chat?.open?t.jsxs("button",{className:"btn sm askbtn",onClick:o,title:`The chat with the ${ft[e.chat.with]} is open`,children:[t.jsx(Gn,{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(Gn,{size:14})," Ask a question"]})}const VL=e=>(e??"").replace(/^https?:\/\//,"").replace(/\/$/,"");function KL(e){return we({queryKey:["try",e],queryFn:()=>ke(`/api/v1/tickets/${encodeURIComponent(e)}/try`),refetchInterval:n=>n.state.data?.state==="starting"?1e3:4e3})}function D1({t:e}){const n=KL(e.id).data;return t.jsxs("div",{className:"yourcheck",children:[t.jsx(YL,{t:e,s:n}),t.jsx(RL,{t:e}),t.jsx(GL,{t:e,s:n})]})}function YL({t:e,s:n}){const s=mI(e),r=ft[_1(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(i=>{const o=n?.state==="running"?n.pages?.find(d=>d.page===i)?.url:void 0,l=(e.proof??[]).filter(d=>$d(d).includes(i)).map(d=>d.criterion);return t.jsxs("li",{children:[t.jsx("code",{children:i}),t.jsx(L,{className:"what",text:l.join(" · ")}),o&&t.jsxs("a",{className:"btn sm",href:o,target:"_blank",rel:"noreferrer",title:`Open ${o}`,children:[t.jsx(Kn,{size:13})," Open"]})]},i)})}):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 GL({t:e,s:n}){const s=oe(),r=n?.state??"off",i=n?.phone,[o,l]=C.useState(i?.languages[0]??"en"),d=i?.ready&&i.languages.length>1&&o!=="en"?` --lang ${o}`:"",u=i?.ready?{phone:!0,...i.languages.length>1?{language:o}:{}}:void 0,h=()=>s.mutate({path:`/api/v1/tickets/${e.id}/try`,body:u,done:"Starting this story's own copy of the app"}),m=()=>s.mutate({path:`/api/v1/tickets/${e.id}/try`,body:{web:!0},done:"Starting the web version of this story"}),p=()=>s.mutate({path:`/api/v1/tickets/${e.id}/try/stop`,done:"Stopped it."}),x=r==="running"||r==="starting",y=!!(i?.on&&x);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(st,{size:15,className:"spin"}):t.jsx(gn,{size:14})}),t.jsxs("div",{className:"trybox-t",children:[t.jsx("b",{children:r==="running"?y?`Open on ${i?.run?.device??`the ${i?.word??"phone"}`}`:"Running":r==="starting"?"Starting…":"Try it yourself"}),t.jsxs("span",{children:[i?.ready?`Opens this story's own copy of the app on squad-kit's ${i.word}, with the change in it. Nothing is merged.`:"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:VL(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(Kn,{size:13})," Open"]}),x&&t.jsxs("button",{className:"btn sm",disabled:s.isPending,onClick:p,children:[t.jsx(Qn,{size:11})," Stop"]}),!x&&n?.can&&i?.ready&&t.jsx(Gw,{languages:i.languages,value:o,onChange:l}),!x&&n?.can&&t.jsx("button",{className:"btn sm",disabled:s.isPending,onClick:h,children:r==="failed"?"Try again":"Try it yourself"})]})]}),i&&y&&t.jsx(Vf,{phone:i,starting:r==="starting"}),i?.web&&y&&t.jsxs("div",{className:"trybox-acts",children:[t.jsx("button",{className:"btn sm",disabled:s.isPending,onClick:m,children:"Use the web version now"}),t.jsx(te,{text:`squad try ${e.id} --web`})]}),!x&&n?.ended&&t.jsx("p",{className:"trybox-why quiet",children:n.ended}),!x&&i&&!i.ready&&t.jsx(Qw,{phone:i}),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})]}),!x&&n&&!n.can&&n.why&&t.jsx("p",{className:"trybox-why quiet",children:n.why}),!x&&n?.other&&n.can&&t.jsxs("p",{className:"trybox-why quiet",children:[n.other,"'s copy runs now. Trying this one stops it."]}),(x||n?.can)&&t.jsx(te,{text:x?`squad try ${e.id} --stop`:`squad try ${e.id}${d}`})]})}function B4(){return C.useSyncExternalStore(GN,YN)}function QL({block:e}){const n=e.link.split("#")[1],s=e.tools.length>1;return t.jsxs("div",{className:"tl-block",role:"status",children:[e.checking||!e.tools[0]?t.jsx("span",{className:"ring",children:e.checking?t.jsx(st,{size:16,className:"spin"}):t.jsx(Mo,{size:16})}):t.jsx(P1,{id:e.tools[0].id,name:e.tools[0].name,size:34}),t.jsxs("div",{children:[t.jsx("b",{children:e.checking?"Checking this computer's tools":`Waits for ${s?"tools":"a tool"} on this computer`}),t.jsxs("span",{children:[e.text," ",e.checking?"It goes on in a moment.":`Nothing failed: it goes on by itself once ${s?"they're":"it's"} there.`]})]}),t.jsx("span",{className:"grow"}),t.jsx(xe,{to:"/tools",hash:n,className:"btn sm",children:"See what's needed"})]})}function ZL({s:e}){const n=e.into?`${e.into} on ${e.host}`:e.host?`your repo on ${e.host}`:"your code host";return t.jsxs("div",{className:"ob-card sendas",children:[t.jsx("span",{className:"ob-ring",children:t.jsx(Bk,{size:16})}),t.jsxs("span",{className:"grow",children:[t.jsx("b",{children:"Send it as a pull request"}),t.jsxs("span",{children:["It is merged on this computer, on branch ",t.jsx("code",{children:e.branch}),". Push the branch to your copy (",e.remote,"), then open the pull request to ",n,"."]}),t.jsx(te,{text:`cd ${gi(e.dir)} && ${e.push}`,keep:e.push,always:!0})]}),e.page&&t.jsxs("a",{className:"btn pri",href:e.page,target:"_blank",rel:"noreferrer",children:["Open the pull request page ",t.jsx(Kn,{size:14})]})]})}function W4({id:e,tab:n,onClose:s}){const r=cl(e),i=ba(),{ticketFull:o,toggleTicketFull:l}=qe(),[d,u]=C.useState(null),[h,m]=C.useState(n??"now");C.useEffect(()=>m(n??"now"),[e,n]),C.useEffect(()=>{const b=w=>w.key==="Escape"&&!document.querySelector(".modal")&&s();return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[s]);const p=r.data,x=Ue(),y=x.data?.ready?x.data.meta.parts:void 0,j=x.data?.ready?x.data.meta.engine==="live":!1,k=p?.parts?.length?p.parts.map(b=>y?.find(w=>w.id===b)?.name??b):Nv(y,p?.repo);return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"veil",onClick:s}),t.jsx("aside",{className:`drawer ${o?"full":""}`,"aria-label":p?`${p.id} ${p.title}`:"Ticket",children:p?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"dh",children:[t.jsxs("div",{className:"dtop",children:[t.jsx("span",{className:"idtag",children:p.id}),p.source.type!=="manual"&&(p.source.url?t.jsxs("a",{className:"src",href:p.source.url,target:"_blank",rel:"noreferrer",children:[t.jsx(us,{size:14})," ",p.source.itemType??"Item"," ",p.source.ref," ",t.jsx(Kn,{size:12})]}):t.jsxs("span",{className:"src",children:[t.jsx(us,{size:14})," From ",p.source.ref]})),p.pr&&t.jsxs("a",{className:"src",href:p.pr.url,target:"_blank",rel:"noreferrer",children:[t.jsx(Bk,{size:14})," Pull request ",p.pr.id," ",t.jsx(Kn,{size:12})]}),p.kind==="bug"&&t.jsxs("span",{className:"prio",children:["Bug",p.foundIn?` found in ${p.foundIn}`:""]}),p.priority==="high"&&p.kind!=="bug"&&t.jsx("span",{className:"prio",children:"High priority"}),t.jsx(qI,{t:p}),t.jsx(q1,{t:p}),t.jsx("span",{className:"grow"}),t.jsxs("span",{className:"dacts",children:[t.jsx(D4,{t:p}),p.waiting?.kind==="proof"&&t.jsx(xe,{to:"/tickets/$id/proof",params:{id:p.id},className:"iconbtn","aria-label":"Open the proof page",children:t.jsx(Kn,{size:15})}),t.jsx("button",{className:"iconbtn",onClick:()=>ll.open({ticket:p.id}),"aria-label":"Report a problem",title:"Report a problem",children:t.jsx(ym,{size:15})}),t.jsx(zL,{t:p,onDeleted:s,items:[...(Tn(p,i)||!i)&&su(p)&&!p.takenOver?.free?[{key:"propose",label:t.jsxs(t.Fragment,{children:[t.jsx(Ts,{size:15})," ",Xs(p)?"Ask for a change…":"Propose a change…"]}),onPick:()=>u("propose")}]:[],...PI(p,i,j)?[{key:"outside",label:t.jsxs(t.Fragment,{children:[t.jsx(sa,{size:15})," Work in another AI tool…"]}),onPick:()=>u("outside")}]:[],...$I(p,i)?[{key:"hand-over",label:t.jsxs(t.Fragment,{children:[t.jsx(gd,{size:15})," Hand over…"]}),onPick:()=>u("hand-over")}]:[]]}),t.jsx("button",{className:"iconbtn fullbtn",onClick:l,"aria-pressed":o,"aria-label":o?"Back to the side panel":"Full width",title:o?"Back to the side panel":"Full width",children:o?t.jsx(Kk,{size:15}):t.jsx(Wd,{size:15})}),t.jsx("button",{className:"iconbtn",onClick:s,"aria-label":"Close",children:t.jsx(Ve,{size:16})})]})]}),d==="hand-over"&&t.jsx(TI,{t:p,onClose:()=>u(null)}),d==="outside"&&t.jsx(RI,{t:p,onClose:()=>u(null)}),d==="propose"&&t.jsx(vl,{t:p,onClose:()=>u(null)}),t.jsx(L,{as:"h2",text:p.title}),t.jsx(dz,{t:p}),t.jsxs("div",{className:"sub",children:[t.jsxs("span",{children:["Created by ",t.jsx(L,{as:"b",text:p.createdBy})," ",Je(p.createdAt)," · ",t.jsx(cz,{t:p})]}),t.jsxs("span",{children:["Owner ",t.jsx(L,{as:"b",text:jl(p)}),Tn(p,i)?" (you)":""]}),k.length>0&&t.jsxs("span",{children:[k.length>1?"Parts":"Part"," ",t.jsx(L,{as:"b",text:k.join(", ")})]}),p.builder&&t.jsxs("span",{children:["Builder ",t.jsx("b",{children:p.builder})]}),p.reviewer&&t.jsxs("span",{children:["Reviewer ",t.jsx("b",{children:p.reviewer})]})]}),t.jsx(X7,{ticket:p})]}),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(([b,w])=>t.jsxs("button",{className:h===b?"on":"",onClick:()=>m(b),children:[w,b==="now"&&(p.waiting||p.outdated?.length||Gs(p)||As(p))&&t.jsx("span",{className:"dot"})]},b)),t.jsxs("button",{className:`dev ${h==="developer"?"on":""}`,onClick:()=>m("developer"),children:[t.jsx(sl,{size:15})," Developer"]})]}),h==="now"&&p.outdated?.length?t.jsx(cM,{t:p}):null,h==="now"&&As(p)&&p.waiting?.kind!=="plan"&&(Tn(p,i)||!i)?t.jsx(T4,{t:p,banner:!0}):null,h==="now"&&t.jsx(EI,{t:p}),h==="now"&&t.jsx(LL,{t:p,onDeleted:s}),h==="now"&&(Tn(p,i)||!i)&&t.jsx(vF,{t:p}),h==="now"&&(Tn(p,i)||!i)&&p.waiting&&p.waiting.kind!=="stuck"&&p.waiting.kind!=="chat"&&!p.now?.merging&&t.jsx(pq,{t:p}),h==="now"&&(Tn(p,i)||!i?t.jsx(XL,{t:p},p.id):t.jsx(AI,{t:p})),h==="story"&&t.jsx(fM,{t:p}),h==="plan"&&t.jsx(xM,{t:p}),h==="activity"&&t.jsx(yM,{t:p}),h==="conversation"&&t.jsx(tL,{t:p,onTab:m}),h==="proof"&&t.jsx(jM,{t:p}),h==="changes"&&t.jsx(_I,{t:p}),h==="cost"&&t.jsx("div",{className:"db",children:t.jsx(Yz,{t:p})}),h==="developer"&&t.jsx(kM,{t:p})]}):t.jsx("div",{className:"center",children:r.isError?t.jsxs("div",{children:[t.jsx("p",{children:s9(r.error,e)}),t.jsx("button",{className:"btn",onClick:s,children:"Close"})]}):"Loading…"})})]})}function XL({t:e}){if(!e.waiting&&e.quiet)return t.jsx(lM,{t:e});if(ML(e))return t.jsx(_L,{t:e});switch(e.waiting?.kind){case"questions":return t.jsx(eM,{t:e});case"spec":case"plan":return t.jsx(nM,{t:e});case"proof":return e.now?.merging?t.jsx(oM,{t:e}):t.jsx(iM,{t:e});case"stuck":return t.jsx(oF,{t:e,extra:t.jsxs(t.Fragment,{children:[t.jsx(Na,{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(W1,{t:e})]}),va(e)&&t.jsx(D1,{t:e}),e.stuck?.gate==="merge"&&e.clashedPr&&t.jsx(O1,{t:e,text:`Settled the clash and merged pull request ${e.clashedPr.id} on the code host yourself? squad-kit looks by itself every few minutes, or now:`}),t.jsx(Ar,{t:e})]})});case"ask":return t.jsx(aM,{t:e});case"yours":return e.takenOver?.free?t.jsx(FI,{t:e,extra:t.jsx(Ar,{t:e})}):t.jsx(uM,{t:e});case"chat":return e.chat?t.jsx(JL,{t:e}):t.jsx(Zf,{t:e});default:return t.jsx(Zf,{t:e})}}function JL({t:e}){const n=ft[e.chat.with];return t.jsx("div",{className:"db",children:t.jsxs("div",{className:"youbox",children:[t.jsx("span",{className:"ring",children:t.jsx(Gn,{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(xe,{to:"/conversations",search:{ticket:e.id},className:"btn sm",children:"Full screen"})]})})}function eM({t:e}){const n=oe(),s=Object.fromEntries((e.questions??[]).filter(x=>x.answer).map(x=>[x.id,x.answer])),[r,i,o]=$e(e.id,"answers",s),[l,d]=C.useState(!1),u=Object.keys(r).length,h=e.questions??[],m=[{from:"analyst",label:"From the Analyst, about what to build"},{from:"architect",label:"From the Architect, about how to build it"}],p=h.every(x=>{const y=r[x.id];return y?y.choice===x.inputOption||y.choice==="Other"?!!y.value?.trim():!0:!1});return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"db",children:m.map(x=>{const y=h.filter(j=>j.from===x.from);return y.length?t.jsxs("div",{className:"qblock",children:[t.jsxs("div",{className:"qgroup",children:[t.jsx(fi,{role:x.from,small:!0}),x.label]}),y.map(j=>t.jsx(tM,{t:e,q:j,n:h.indexOf(j)+1,answer:r[j.id],onAnswer:k=>i(b=>({...b,[j.id]:k}))},j.id))]},x.from):null})}),t.jsxs("div",{className:"df",children:[t.jsxs("button",{className:"btn pri",disabled:!p||n.isPending,onClick:()=>n.mutate({path:`/api/v1/tickets/${e.id}/answers`,body:{answers:r},done:"Answers sent. The Architect is choosing the design."},{onSuccess:o}),children:[t.jsx(Ps,{size:15})," Send answers"]}),t.jsx("button",{className:"btn",disabled:n.isPending,onClick:()=>{if(u>0&&!l)return d(!0);n.mutate({path:`/api/v1/tickets/${e.id}/skip`,done:"The squad made its own guesses. You will see them in the plan."},{onSuccess:o})},children:l?`Skip and lose your ${u===1?"answer":`${u} answers`}?`:"Skip, let the squad guess"}),l&&t.jsx("button",{className:"btn quiet",onClick:()=>d(!1),children:"Keep them"}),t.jsx(ki,{t:e,agent:"analyst",label:"Talk it through instead"}),t.jsx("span",{className:"grow"}),t.jsx(te,{text:`squad answer ${e.id}`})]})]})}function tM({t:e,q:n,n:s,answer:r,onAnswer:i}){const o=oe(),[l,d]=$e(e.id,`ask-${n.id}`,""),[u,h]=C.useState(!!l),m=()=>{l.trim()&&(o.mutate({path:`/api/v1/tickets/${e.id}/ask`,body:{questionId:n.id,text:l}}),d(""),h(!1))},p=[...n.options,"Other"];return t.jsxs("div",{className:"q",children:[t.jsxs("h4",{...De(n.text),children:[s,". ",t.jsx(Gt,{text:n.text,dir:pt(n.text).dir})]}),(n.thread?.length||n.thinking)&&t.jsxs("div",{className:"thread",dir:pt(n.text).dir,children:[n.thread?.map((x,y)=>t.jsxs("div",{className:`msg ${x.who==="you"?"":"squad"}`,children:[t.jsx("small",{children:x.who==="you"?"You":Ys[x.who]}),t.jsx(L,{as:"div",text:x.text})]},y)),n.thinking&&t.jsxs("div",{className:"msg squad",children:[t.jsx("small",{children:Ys[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",dir:pt(n.options.join(" ")).dir,children:p.map(x=>{const y=r?.choice===x,j=x===n.inputOption||x==="Other";return t.jsxs("div",{className:`choice ${y?"on":""}`,...De(x),role:"radio","aria-checked":y,tabIndex:0,onClick:()=>!y&&i({choice:x}),onKeyDown:k=>k.target===k.currentTarget&&k.key==="Enter"&&!y&&i({choice:x}),children:[t.jsx("span",{className:"rd"}),t.jsx(L,{text:x.replace(/:$/,"")}),j&&y&&t.jsx("input",{autoFocus:!0,dir:ge(r?.value??""),value:r?.value??"",placeholder:x==="Other"?"Your answer":"Which one?",onChange:k=>i({choice:x,value:k.target.value}),onClick:k=>k.stopPropagation()})]},x)})}),u?t.jsxs("div",{className:"askrow",children:[t.jsx("input",{className:"input",autoFocus:!0,dir:ge(l),value:l,onChange:x=>d(x.target.value),placeholder:`Ask the ${Ys[n.from]} about this question`,onKeyDown:x=>x.key==="Enter"&&m()}),t.jsx("button",{className:"btn",onClick:m,disabled:!l.trim(),children:"Ask"})]}):t.jsxs("button",{className:"asklink",onClick:()=>h(!0),disabled:n.thinking,children:[t.jsx(Gn,{size:14})," Ask about this"]})]})}function Rd({t:e,review:n}){return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"lbl",children:"The story"}),t.jsx(Hc,{review:n,at:{part:"story"},dir:pt(e.story??"").dir,children:t.jsx(L,{as:"p",className:"story",text: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)=>{const i=De(`${s.given} ${s.when} ${s.then}`);return t.jsx("li",{...i,children:t.jsx(Hc,{review:n,at:{part:"criterion",index:r},children:t.jsxs("span",{children:[t.jsx("em",{children:"Given"})," ",t.jsx(Gt,{text:s.given,dir:i.dir}),", ",t.jsx("em",{children:"when"})," ",t.jsx(Gt,{text:s.when,dir:i.dir}),", ",t.jsx("em",{children:"then"})," ",t.jsx(Gt,{text:s.then,dir:i.dir}),"."]})})},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(Hc,{review:n,at:{part:"decision"},dir:pt(e.decision.title).dir,children:t.jsxs("div",{className:"decision",children:[t.jsxs("h3",{...De(e.decision.title),children:[t.jsx(fi,{role:"architect",small:!0}),t.jsx(L,{text:e.decision.title})]}),t.jsx("div",{className:"opts2",children:e.decision.options.map(s=>t.jsxs("div",{className:`opt2 ${s.chosen?"pick":""}`,...De(`${s.name} ${s.note}`),children:[t.jsxs("b",{children:[t.jsx(L,{text:s.name}),s.chosen&&t.jsxs("span",{children:[t.jsx(fe,{size:13,strokeWidth:2.5})," Chosen"]})]}),t.jsx(L,{text:s.note})]},s.name))}),t.jsxs("div",{className:"why",children:[t.jsx(L,{lead:t.jsx("b",{children:"Why"}),text:e.decision.why}),e.decision.clientCheck&&t.jsx(L,{lead:t.jsx("b",{children:"Client's choice"}),text: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(xe,{to:"/architecture",search:{adr:s},className:"pill",children:s},s))})]}),e.work&&t.jsx(WL,{t:e}),e.mockup&&e.work&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"lbl",children:"How it will look"}),t.jsx(s1,{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(T4,{t:e}),n&&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",{...De(s.title),children:t.jsx(Hc,{review:n,at:{part:"step",index:r},children:t.jsx(L,{text:s.title})})},r))})]})]})}function nM({t:e}){const n=oe(),s=`plan-${e.waiting?.kind??"plan"}`,[r,i,o]=$e(e.id,`${s}-mode`,null),[l,d,u]=$e(e.id,`${s}-note`,""),[h,m]=C.useState(!1),[p,x,y]=$e(e.id,`${s}-comments`,[]),j=()=>{o(),u(),y()},k=e.waiting?.kind==="spec",b=!k&&!!e.specApproved,w=k?"the Analyst":b?"the Architect":"the Spec writer",S={t:e,comments:p,add:D=>x($=>[...$,D]),remove:D=>x($=>$.filter((P,F)=>F!==D)),canEdit:D=>k?D.part==="story"||D.part==="criterion":D.part==="step"||!b&&(D.part==="story"||D.part==="criterion")},T=()=>r==="over"?n.mutate({path:`/api/v1/tickets/${e.id}/plan/start-over`,body:{direction:l},done:`Starting over. ${w[0].toUpperCase()}${w.slice(1)} writes it again.`},{onSuccess:j}):n.mutate({path:`/api/v1/tickets/${e.id}/change`,body:{text:l},done:`Sent to ${w}.`},{onSuccess:j}),A=p.length;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"db",children:[(k||b)&&t.jsxs("div",{className:"twostep",children:[t.jsxs("span",{className:k?"on":"done",children:[k?"1":t.jsx(fe,{size:12,strokeWidth:3})," The what"]}),t.jsx("span",{className:"bar"}),t.jsx("span",{className:b?"on":"",children:"2 The how"}),t.jsx("p",{children:k?'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(gL,{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."}),k?t.jsx(Rd,{t:{...e,decision:void 0,work:void 0},review:S}):t.jsx(Rd,{t:e,review:S}),!k&&e.decision&&t.jsx("p",{className:"note",style:{marginTop:14},children:"Approved decisions are saved in Decisions. Later tickets must follow them."})]}),r?t.jsxs("div",{className:"df",children:[t.jsx("input",{className:"input",style:{flex:1},autoFocus:!0,dir:ge(l),value:l,onChange:D=>d(D.target.value),placeholder:r==="over"?"What is the new direction? It is written again from zero.":"What should change? One line is enough.",onKeyDown:D=>D.key==="Enter"&&l.trim()&&!n.isPending&&T()}),t.jsx("button",{className:"btn pri",disabled:!l.trim()||n.isPending,onClick:T,children:r==="over"?"Start over":"Send"}),t.jsx("button",{className:"btn",onClick:()=>i(null),children:"Cancel"})]}):t.jsxs("div",{className:"df",children:[A>0?t.jsxs("button",{className:"btn pri",disabled:n.isPending,onClick:()=>n.mutate({path:`/api/v1/tickets/${e.id}/plan/send-back`,body:{comments:p},done:`Sent back to ${w} with ${A} ${A===1?"comment":"comments"}.`},{onSuccess:j}),children:[t.jsx(Ps,{size:15})," Send back (",A,")"]}):t.jsxs("button",{className:"btn pri",disabled:n.isPending,onClick:()=>n.mutate({path:`/api/v1/tickets/${e.id}/approve`,done:k?"Spec approved. The Architect is designing how to build it.":"Plan approved. The Builder started."},{onSuccess:j}),children:[t.jsx(fe,{size:15,strokeWidth:2.5})," ",k?"Approve spec":b?"Approve design":"Approve plan"]}),A===0&&t.jsx("button",{className:"btn",onClick:()=>i("change"),children:"Change something"}),(k||b)&&t.jsx(ki,{t:e,agent:k?"analyst":"architect",label:"Talk it through"}),t.jsx("button",{className:"btn quiet",onClick:()=>i("over"),children:"Start over"}),t.jsx("button",{className:"btn quiet",onClick:()=>m(!0),children:"Ask a developer"}),t.jsx("span",{className:"grow"}),t.jsx(te,{text:A>0?`squad send-back ${e.id} ${p.map(D=>Le(`${sM(D)}: ${D.text}`)).join(" ")}`:`squad approve ${e.id}`})]}),h&&t.jsx(rM,{t:e,onClose:()=>m(!1)})]})}function sM(e){return e.part==="criterion"?`done when ${(e.index??0)+1}`:e.part==="step"?`step ${(e.index??0)+1}`:e.part}function rM({t:e,onClose:n}){const{toast:s}=qe(),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(Xn,{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(L,{as:"div",className:"wa",text:r})]})}function B1({t:e}){const n=e.gates;return e.outside&&e.waiting?.kind==="proof"&&lu(n)?t.jsxs("div",{className:"pills",children:[t.jsx(as,{state:"pending",text:"Checks not run"}),t.jsx(as,{state:"pending",text:"No review"}),t.jsx(as,{state:"pending",text:"No proof"})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"pills",children:[t.jsx(as,{state:n?.checks,text:E4(n)}),t.jsx(as,{state:n?.review,text:n?.review==="pass"?`Review approved by ${n.reviewBy}`:n?.review==="skipped"?"Review notes open, you continued":"Review approved"}),t.jsx(as,{state:n?.proof,text:P4(e)})]}),t.jsx(F4,{g:n}),t.jsx(I4,{g:n}),e.overrides?.map(s=>t.jsxs("p",{className:"note override",children:[t.jsx("b",{children:"Continued anyway"})," past the ",SL(s),", by ",t.jsx(L,{text:s.by}),": ",t.jsx(L,{text:s.reason})]},s.at))]})}function W1({t:e}){const[n,s]=C.useState(null);if(!e.proof?.length)return t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"note",children:R4(e)}),t.jsx(Gf,{t:e})]});const{pictures:r,starts:i}=L4(e.proof,o=>Vn(`/api/v1/proof/${o}`));return t.jsxs(t.Fragment,{children:[n!==null&&t.jsx(Ir,{pictures:r,start:n,onClose:()=>s(null)}),e.proof.map((o,l)=>t.jsxs("div",{className:`critrow ${L1(o.shows)}`,children:[t.jsxs("h5",{...De(o.criterion),children:[t.jsx(M4,{shows:o.shows}),t.jsx(L,{text:o.criterion}),t.jsx(Yf,{shows:o.shows})]}),Go(o)&&t.jsx(L,{as:"p",className:"verdictnote",text:Go(o)}),ci(o)&&t.jsxs("p",{className:"critpage",children:["Page ",t.jsx("code",{children:ci(o)})]}),Qo(o.after)?t.jsx(R1,{file:o.after,...o.note?{note:o.note}:{}}):t.jsxs("div",{className:"proofmini",children:[t.jsxs("div",{className:o.beforeDevice?"ondevice":void 0,children:[t.jsx(L,{as:"small",text:o.beforeLabel}),t.jsx("button",{className:"zoom",onClick:()=>s(i[l]),"aria-label":`Open ${o.beforeLabel} full size`,children:t.jsx("img",{src:Vn(`/api/v1/proof/${o.before}`),alt:`${o.criterion}, ${o.beforeLabel}`})}),o.beforeDevice&&t.jsx("small",{className:"shotdevice",children:o.beforeDevice})]}),t.jsxs("div",{className:o.device?"ondevice":void 0,children:[t.jsx(L,{as:"small",text:o.afterLabel}),t.jsx("button",{className:"zoom",onClick:()=>s(i[l]+1),"aria-label":`Open ${o.afterLabel} full size`,children:t.jsx("img",{src:Vn(`/api/v1/proof/${o.after}`),alt:`${o.criterion}, ${o.afterLabel}`})}),o.device&&t.jsx("small",{className:"shotdevice",children:o.device})]})]}),o.more?.length&&o.why&&o.note?t.jsx(L,{as:"p",className:"note proofmore-main",text:o.note}):null,t.jsx(O4,{shot:o,first:i[l]+2,onOpen:s})]},o.criterion)),t.jsx(Gf,{t:e})]})}function U4({t:e,sticky:n}){const s=oe(),[r,i,o]=$e(e.id,"proof-wrong",""),[l,d]=C.useState(!!r),u=()=>{s.isPending||s.mutate({path:`/api/v1/tickets/${e.id}/change`,body:{text:r},done:"Sent back to the Builder with your note."},{onSuccess:o})};return l?t.jsxs("div",{className:n?"stickybar":"df",children:[t.jsx("input",{className:"input",style:{flex:1},autoFocus:!0,dir:ge(r),value:r,onChange:h=>i(h.target.value),placeholder:"What's wrong? Tell the squad in one line.",onKeyDown:h=>h.key==="Enter"&&r.trim()&&u()}),t.jsx("button",{className:"btn pri",disabled:!r.trim()||s.isPending,onClick:u,children:"Send back"}),t.jsx("button",{className:"btn",onClick:()=>d(!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:h=>h.stage==="release"?`${e.id} is ready to release.`:h.live?"Newer work changed the same code meanwhile, so the Builder brings it in first. Then the proof comes back to you.":null}),children:[s.isPending?t.jsx(st,{size:15,className:"spin"}):t.jsx(fe,{size:15,strokeWidth:2.5})," ",s.isPending?"Saving…":"Looks right"]}),t.jsx("button",{className:"btn",onClick:()=>d(!0),children:"Something's wrong"}),t.jsx("span",{className:"grow"}),t.jsx(te,{text:`squad approve ${e.id}`})]})}function iM({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(fe,{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:NL(e.gates)})]}),t.jsx("span",{className:"grow"}),t.jsxs(xe,{to:"/tickets/$id/proof",params:{id:e.id},className:"btn sm",children:[t.jsx(Kn,{size:14})," Full page"]})]}),t.jsx("div",{className:"lbl",children:"Gates, checked by squad-kit"}),t.jsx(B1,{t:e}),t.jsx(Na,{t:e}),t.jsx("div",{className:"lbl",children:"Before and after"}),t.jsx(W1,{t:e}),t.jsx(D1,{t:e})]}),t.jsx(U4,{t:e})]})}const Dp="Decide yourself: take the simplest choice that fits the plan, and say what you chose";function aM({t:e}){const n=oe(),s=e.agentQuestion,[r,i,o]=$e(e.id,"agent-pick",null),[l,d,u]=$e(e.id,"agent-own","");if(!s)return t.jsx(Zf,{t:e});if(s.port)return t.jsx(bL,{t:e});if(s.kind)return t.jsx(pz,{t:e,extra:t.jsxs(t.Fragment,{children:[t.jsx(Na,{t:e}),t.jsx(Ar,{t:e})]})});const h={architect:"Architect",builder:"Builder",reviewer:"Reviewer"}[s.from],m=r===""?l.trim():r,p=[...s.options,Dp];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 ",h," 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:[h," asks"]}),t.jsx(L,{as:"p",className:"stuckq",text:s.text}),s.why&&t.jsx(L,{as:"p",className:"note",style:{marginTop:-4},lead:"Why it matters:",text:s.why}),s.files&&s.files.length>0&&t.jsx(Kb,{ticket:e.id,files:s.files}),t.jsxs("div",{className:"opts2",children:[p.map(x=>t.jsxs("button",{className:`opt2 ${r===x?"pick":""}`,...De(x),onClick:()=>i(x),children:[t.jsxs("b",{children:[t.jsx(L,{text:x===Dp?"Let it decide":x}),r===x&&t.jsxs("span",{children:[t.jsx(fe,{size:13,strokeWidth:2.5})," Your pick"]})]}),x===Dp?"It takes the simplest choice that fits the plan and tells you which.":""]},x)),t.jsx("button",{className:`opt2 ${r===""?"pick":""}`,onClick:()=>i(""),children:t.jsx("b",{children:"Write my own answer"})})]}),r===""&&t.jsx("textarea",{className:"input",rows:3,style:{width:"100%",marginTop:8},autoFocus:!0,dir:ge(l),value:l,placeholder:"Your answer",onChange:x=>d(x.target.value)}),t.jsx(Ar,{t:e})]}),t.jsxs("div",{className:"df",children:[t.jsxs("button",{className:"btn pri",disabled:!m||n.isPending,onClick:()=>n.mutate({path:`/api/v1/tickets/${e.id}/reply`,body:{text:m},done:`Sent. The ${h} carries on.`},{onSuccess:()=>{o(),u()}}),children:[t.jsx(Ps,{size:15})," Send answer"]}),t.jsx("span",{className:"grow"}),t.jsx(te,{text:`squad reply ${e.id}${m?` ${Le(m.length>40?`${m.slice(0,40)}…`:m)}`:""}`})]})]})}function H4({t:e}){return t.jsxs("div",{className:"calm",role:"status",children:[t.jsx("span",{className:"ring",children:t.jsx(st,{size:18,className:"spin"})}),t.jsxs("div",{children:[t.jsx(L,{as:"b",text:e.now.line}),t.jsx(L,{text:e.now.sentence})]})]})}function oM({t:e}){return t.jsxs("div",{className:"db",children:[t.jsx(H4,{t:e}),t.jsx(Ar,{t:e})]})}function lM({t:e}){return t.jsxs("div",{className:"db",children:[t.jsx(jL,{t:e}),e.now&&t.jsx(S4,{t:e}),t.jsx(C4,{t:e}),t.jsx($4,{t:e})]})}function cM({t:e}){const n=oe(),[s,r]=C.useState(null),[i,o,l]=$e(e.id,"keep-reason",""),d=!!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(Rs,{size:15})}),t.jsxs("b",{children:[t.jsx(xe,{to:"/architecture",search:{adr:u.adr},children:u.adr})," came after this plan and changes it"]})]}),t.jsx(L,{as:"p",text:u.why}),t.jsx(L,{as:"p",lead:t.jsx("span",{className:"note",children:d?"What a follow-up would change:":"What would change:"}),text:u.change}),s===u.adr?t.jsxs("div",{className:"row",children:[t.jsx("input",{className:"input",autoFocus:!0,dir:ge(i),value:i,onChange:h=>o(h.target.value),placeholder:"Why the plan stays as it is"}),t.jsx("button",{className:"btn sm",disabled:!i.trim()||n.isPending,onClick:()=>n.mutate({path:`/api/v1/tickets/${e.id}/decision-update`,body:{adr:u.adr,do:"keep",reason:i},done:"Kept the plan. The reason is on the ticket."},{onSuccess:()=>{r(null),l()}}),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:d?"Made a follow-up ticket.":"The Architect is updating the plan."}),children:d?"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 dM({t:e}){const n=oe(),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(st,{size:15,className:"spin"}):s.status==="done"?t.jsx(fe,{size:15,strokeWidth:2.5}):t.jsx(Rs,{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?`, ${Je(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 Zf({t:e}){const n=B4(),s=ba(),r=oe(),i=oe(),o=_1(e),l=e.stage==="release"?/^Waits to merge\b/.test(e.status)?{title:"Waits to merge",text:"Your own copy of the code has changes in the same files. Save or undo them there, and it goes in by itself. squad-kit tries again every few minutes."}:e.sendAs?{title:"Merged on this computer",text:"It goes on as a pull request: send it below."}:{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."}:e.waitsToStart?{title:"Waits for you to start it",text:"squad-kit made this story. Nothing runs and nothing is spent until you press Start. Then the Analyst reads it, as with any new story."}:{title:"Nothing needed from you",text:`${hM(e)} You'll get a card when the squad needs you.`},d=w4(e);return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"db",children:[e.toolWait?t.jsx(QL,{block:e.toolWait}):d?t.jsx(S4,{t:e}):e.now?.merging?t.jsx(H4,{t:e}):t.jsxs("div",{className:"calm",children:[t.jsx("span",{className:"ring",children:e.stage==="release"?t.jsx(ds,{size:18}):t.jsx(fe,{size:18,strokeWidth:2.5})}),t.jsxs("div",{children:[t.jsx(L,{as:"b",text:l.title}),t.jsx(L,{text:l.text})]}),e.stage==="release"&&!e.sendAs&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"grow",style:{flex:1}}),t.jsx(xe,{to:"/releases",className:"btn sm",children:"Open release"})]})]}),e.localSetup&&t.jsx(dM,{t:e}),e.sendAs&&t.jsx(ZL,{s:e.sendAs}),e.stage==="release"&&!e.mergedAt&&!d&&!e.live&&!e.squad&&(e.pr||/^Waits to merge\b/.test(e.status))&&t.jsx(O1,{t:e,text:e.pr?`Pull request ${e.pr.id} is not merged yet. squad-kit asks the code host by itself every few minutes, or now:`:"squad-kit tries again by itself every few minutes, or now:"}),e.steps&&e.steps.length>0&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"lbl",children:"Steps"}),t.jsx(V4,{t:e})]}),e.gates&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"lbl",children:"Gates, checked by squad-kit"}),t.jsx(B1,{t:e})]}),t.jsx(Na,{t:e}),(e.stage==="release"||e.stage==="done")&&e.usage?.length?t.jsx(Hz,{t:e}):null,t.jsx(y1,{t:e}),d?t.jsx(C4,{t:e}):t.jsx(Ar,{t:e}),t.jsx($4,{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||r.isPending,onClick:()=>r.mutate({path:`/api/v1/tickets/${e.id}/stop`,done:"Stopping the squad"}),children:[t.jsx(Qn,{size:12})," ",e.stopRequested?"Stopping…":"Stop"]}),e.waitsToStart&&t.jsxs("button",{className:"btn pri sm",disabled:i.isPending,onClick:()=>i.mutate({path:`/api/v1/tickets/${e.id}/start`,done:`${e.id} started`}),children:[t.jsx(gn,{size:12})," Start"]}),p1(e)&&t.jsx(f1,{t:e}),t.jsx(HL,{t:e}),!e.chat?.open&&!e.takenOver&&!Xs(e)&&o!=="analyst"&&t.jsx(ki,{t:e,agent:"analyst",label:"Ask the Analyst"}),(Tn(e,s)||!s)&&t.jsx(bF,{t:e}),t.jsx("span",{className:"note",children:e.live?n==="down"?"Not updating: squad-kit has stopped.":"Updates live as the squad works.":""}),t.jsx("span",{className:"grow"}),t.jsx(te,{text:e.waitsToStart?`squad start ${e.id}`:e.live&&e.stage!=="release"?`squad stop ${e.id}`:Cm(e)})]})]})}function uM({t:e}){const n=oe(),[s,r,i]=$e(e.id,"give-back",""),o=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(sl,{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(te,{text:`cd ${Le(o.cwd)} && claude --resume ${o.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(eu,{t:e}),t.jsx("div",{className:"lbl",children:"2. Give it back"}),t.jsx("textarea",{className:"waynote",rows:2,dir:ge(s),value:s,onChange:l=>r(l.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(Ar,{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."},{onSuccess:i}),children:[t.jsx(fe,{size:15,strokeWidth:2.5})," Give back"]}),t.jsx("span",{className:"grow"}),t.jsx(te,{text:`squad give-back ${e.id}${s.trim()?` ${Le(s.trim())}`:""}`})]})]})}function hM(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 V4({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":"",...De(n.title),children:[t.jsx("span",{className:`sd ${n.status==="done"?"ok":n.status==="doing"?"now":""}`,children:n.status==="done"&&t.jsx(fe,{size:11,strokeWidth:3})}),t.jsxs("span",{children:[t.jsx(L,{as:n.status==="doing"?"b":"span",style:n.status==="doing"?{fontWeight:600}:void 0,text:n.title}),n.live&&t.jsxs("span",{className:"livetxt",children:[t.jsx("span",{className:"live"}),t.jsx(L,{text:n.live})]})]}),t.jsx("span",{className:"time",dir:"ltr",children:n.status==="done"?`${n.minutes??1} min`:n.status==="doing"?"now":""})]},s))})}const pM=/^(Reading|Running|Editing|Writing|Looking|Searching|Listing|Runs on|Started step|Finished step|Stopped a program|Setting up squad-kit's screenshot browser)\b|^squad-kit (asked|ran|started|stopped|is running)\b/;function Ar({t:e,all:n}){const[s,r]=C.useState(!1),i=e.activity.filter(l=>!pM.test(l.text)),o=n?s?e.activity:i:i.slice(0,4);return!o.length&&!(n&&e.activity.length)?null:t.jsxs(t.Fragment,{children:[!n&&t.jsx("div",{className:"lbl",children:"Latest activity"}),t.jsx("div",{className:"feed",children:o.map((l,d)=>t.jsxs("div",{className:"fe",children:[t.jsx("span",{className:"tm",children:Rn(l.at)}),t.jsx(fi,{role:l.who,small:!0}),t.jsx(L,{lead:t.jsx("b",{children:Ys[l.who]}),text:l.text.charAt(0).toLowerCase()+l.text.slice(1)})]},l.at+d))}),n&&i.length<e.activity.length&&t.jsx("button",{className:"btn sm ghost",onClick:()=>r(l=>!l),children:s?"Show only what matters":"Show every step"})]})}function fM({t:e}){return t.jsxs("div",{className:"db",children:[t.jsx("div",{className:"lbl",children:"What was asked"}),t.jsx(Sm,{as:"p",className:"story",style:{whiteSpace:"pre-wrap"},text:e.ask}),t.jsx(Wp,{head:"Your acceptance criteria",items:e.brief?.criteria}),t.jsx(Wp,{head:"Business rules",items:e.brief?.rules}),t.jsx(Wp,{head:"Edge cases",items:e.brief?.edgeCases}),t.jsx(gM,{t:e}),t.jsx(mM,{t:e}),t.jsx(NF,{t:e}),t.jsx(y1,{t:e}),e.story?t.jsx(Rd,{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 Bp=[{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 mM({t:e}){const n=oe(),[s,r]=C.useState("note"),[i,o]=$e(e.id,"note",""),l=e.notes??[],d=e.stage!=="done",u=Bp.find(m=>m.kind===s),h=()=>{!i.trim()||n.isPending||n.mutate({path:`/api/v1/tickets/${e.id}/notes`,body:{text:i,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!d&&!l.length?null:t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"lbl",children:["Notes",l.length?` · ${l.length}`:""]}),l.length>0&&t.jsx("ul",{className:"ticketnotes",children:l.map((m,p)=>t.jsxs("li",{...De(m.text),children:[t.jsx("span",{className:`pill ${m.kind==="criterion"?"ok":m.kind==="rule"?"wait":""}`,children:Bp.find(x=>x.kind===m.kind)?.head}),t.jsx(L,{className:"grow",text:m.text}),t.jsxs("span",{className:"note",dir:"ltr",children:[t.jsx(L,{text:m.by})," · ",Je(m.at)]})]},p))}),d&&t.jsxs("div",{className:"addnote",children:[t.jsx("div",{className:"seg",style:{width:"fit-content"},children:Bp.map(m=>t.jsx("button",{className:s===m.kind?"on":"",onClick:()=>r(m.kind),children:m.label},m.kind))}),t.jsx("textarea",{className:"input",rows:2,dir:ge(i),value:i,placeholder:u.hint,onChange:m=>o(m.target.value),onKeyDown:m=>{m.key==="Enter"&&(m.metaKey||m.ctrlKey)&&i.trim()&&h()}}),t.jsxs("div",{style:{display:"flex",gap:10,alignItems:"center"},children:[t.jsxs("button",{className:"btn pri sm",disabled:!i.trim()||n.isPending,onClick:h,children:["Add ",u.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(te,{text:`squad note ${e.id}${s==="note"?"":` --${s}`} ${Le(i.trim()||"…")}`})]})]})]})}function Wp({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(L,{as:"li",text:s},r))})]}):null}const vj=/\.(png|jpe?g|gif|webp|bmp)$/i;function gM({t:e}){const[n,s]=C.useState(null),r=e.attachments??[];if(!r.length)return null;const i=d=>d.split(/[\\/]/).pop()??d,o=r.filter(d=>vj.test(d)).map(d=>({src:En(e.id,d),caption:i(d)})),l=r.filter(d=>!vj.test(d));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((d,u)=>t.jsx("button",{className:"zoom thumb",onClick:()=>s(u),"aria-label":`Open ${d.caption} full size`,children:t.jsx("img",{src:d.src,alt:d.caption,loading:"lazy"})},d.src))}),l.map(d=>t.jsx("a",{className:"filechip mono",href:En(e.id,d),target:"_blank",rel:"noreferrer",children:i(d)},d)),n!==null&&t.jsx(Ir,{pictures:o,start:n,onClose:()=>s(null)})]})}function xM({t:e}){return e.story?t.jsxs("div",{className:"db",children:[t.jsx(Rd,{t:e}),e.steps&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"lbl",children:"Steps"}),t.jsx(V4,{t:e})]})]}):t.jsx("div",{className:"db",children:t.jsx("p",{className:"note",children:"The plan is written after the questions are answered."})})}function yM({t:e}){return t.jsx("div",{className:"db",children:t.jsx(Ar,{t:e,all:!0})})}function jM({t:e}){return e.gates?t.jsxs("div",{className:"db",children:[t.jsx("div",{className:"lbl",children:"Gates, checked by squad-kit"}),t.jsx(B1,{t:e}),t.jsx(Na,{t:e}),t.jsx("div",{className:"lbl",children:"Before and after"}),e.gates.proof==="pass"||e.proof?.some(n=>n.shows)?t.jsx(W1,{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 kM({t:e}){const n=C.useMemo(()=>{const s=new Set,r=[...e.activity.map(i=>i.text),...(e.steps??[]).map(i=>i.live??"")];for(const i of r)for(const o of i.matchAll(/[\w./-]+\/[\w.-]+\.\w+/g))s.add(o[0]);return[...s]},[e]);return t.jsxs("div",{className:"db",children:[t.jsx(lF,{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.storyDir??e.worktree}),t.jsx(eu,{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(te,{text:`squad show ${e.id}`}),t.jsx(te,{text:`squad watch ${e.id}`})]})]})}const vM=[{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 bM(){const e=Ue(),n=Iq(),s=Pr({from:"/board"}),r=qt({from:"/board"}),[i,o]=C.useState(null),[l,d]=C.useState(""),[u,h]=C.useState(!1),m=we({queryKey:["ticket-draft-current"],queryFn:()=>ke("/api/v1/tickets/draft/current"),enabled:i!=="new",refetchInterval:S=>S.state.data?.draft?.status==="working"?2e3:3e4}),p={working:"drafting…",done:"draft ready",failed:"draft stopped",cancelled:""}[m.data?.draft?.status??"cancelled"];C.useEffect(()=>{s.write&&(o("new"),r({search:S=>({...S,write:void 0}),replace:!0}))},[s.write,r]);const x=s.view??"all",y=S=>void r({search:T=>({...T,ticket:S,tab:void 0})}),j=()=>void r({search:S=>({...S,ticket:void 0,tab:void 0})}),k=e.data?.ready?e.data:null,b=C.useMemo(()=>{const S=[...k?.tickets??[],...u?k?.archived??[]:[]],T=l.trim().toLowerCase();return S.filter(A=>x==="bugs"&&A.kind!=="bug"||x==="mine"&&!Tn(A,k?.meta.user?.name)?!1:!T||A.title.toLowerCase().includes(T)||A.id.toLowerCase().includes(T))},[k,l,x,u]);if(e.isLoading)return t.jsx("div",{className:"center",children:"Loading the board…"});if(e.isError&&!e.data)return t.jsx(Er,{what:"the board",error:e.error,onRetry:()=>void e.refetch()});if(!k)return t.jsx(SM,{settings:e.data?.settings});const w=k.tickets.filter(ul);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:x===S?"on":"",onClick:()=>void r({search:T=>({...T,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(pi,{size:15}),t.jsx("input",{dir:ge(l),value:l,onChange:S=>d(S.target.value),placeholder:"Search tickets","aria-label":"Search tickets"})]}),t.jsx(NM,{onPull:()=>o("pull")}),t.jsxs("button",{className:"btn pri",onClick:()=>o("new"),children:[t.jsx(xt,{size:15})," New ticket",p&&t.jsx("span",{className:"btn-tag",children:p})]})]}),(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(te,{text:"squad inbox"})]}),n?t.jsx(u4,{}):k.meta.engine==="live"&&k.tickets.length===0?t.jsxs("div",{className:"calmlane",children:[t.jsx("span",{className:"glyph",children:t.jsx(xt,{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(xt,{size:14})," New ticket"]})]}):t.jsxs("div",{className:"calmlane",children:[t.jsx("span",{className:"glyph",children:t.jsx(fe,{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."]})]})]}),(k.broken?.length??0)>0&&t.jsx(Zo,{list:k.broken}),(k.brokenRecords?.length??0)>0&&t.jsx(Zo,{list:k.brokenRecords,label:"Files that could not be read"}),t.jsx(b9,{tickets:k.tickets,archived:k.archived??[],live:k.meta.engine==="live",project:k.meta.project,onOpen:y}),t.jsx("div",{className:"board",children:vM.map(S=>{const T=b.filter(A=>A.stage===S.stage);return t.jsxs("section",{className:"lane","aria-label":Zs[S.stage],children:[t.jsxs("div",{className:"lh",children:[t.jsx(fi,{role:S.role}),t.jsxs("span",{className:"t",children:[t.jsx("b",{children:Zs[S.stage]}),t.jsx("small",{children:S.who})]}),t.jsx("span",{className:"n",children:T.length})]}),T.map(A=>t.jsx(wM,{t:A,selected:s.ticket===A.id,onOpen:()=>y(A.id)},A.id)),T.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(Vz,{}),t.jsx("span",{className:"grow"}),(k.archived?.length??0)>0&&t.jsx("button",{className:"btn sm quiet",title:"squad board --archived",onClick:()=>h(!u),children:u?"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(W4,{id:s.ticket,...s.tab?{tab:s.tab}:{},onClose:j}),i==="new"&&t.jsx(ow,{onClose:()=>o(null),onCreated:S=>y(S.id)}),i==="pull"&&t.jsx(gF,{onClose:()=>o(null),onCreated:S=>y(S.id)}),i==="bug"&&t.jsx(h1,{onClose:()=>o(null)})]})}function wM({t:e,selected:n,onOpen:s}){const r=!!e.now?.merging,i=!r&&(!!e.waiting||e.quiet?.kind==="stuck"||Gs(e)||As(e)),o=ba();return t.jsxs("button",{className:`card ${i?"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(uz,{t:e}),i?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,o&&!Tn(e,o)&&t.jsx(L,{className:"prio owner",title:"Their squad works on it",text:jl(e)}),e.archived&&t.jsx("span",{className:"prio owner",children:"Archived"}),e.gates?.checks==="unchecked"&&t.jsx("span",{className:"prio unchecked",title:F1,children:"Not checked"}),t.jsx(LI,{t:e}),t.jsx(CL,{t:e}),t.jsx(UL,{t:e})]}),t.jsx(L,{as:"h4",text:e.title}),t.jsx(hz,{t:e}),w4(e)&&!i?t.jsx(yL,{t:e}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"st",children:[(e.live||r)&&!i?t.jsx("span",{className:"live"}):e.stage==="release"?t.jsx(fe,{size:13,strokeWidth:2.5}):null,t.jsx(L,{text:r?e.now.line: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"&&!i&&t.jsx("div",{className:"bar",children:t.jsx("i",{style:{width:`${e.progress}%`}})})]})]})}function NM({onPull:e}){const s=we({queryKey:["tracker"],queryFn:()=>ke("/api/v1/tracker"),refetchInterval:6e4}).data;return s?s.type==="none"?t.jsxs(xe,{to:"/settings",className:"btn",children:[t.jsx(us,{size:15})," Connect a tracker"]}):t.jsxs("button",{className:"btn",onClick:e,children:[t.jsx(us,{size:15})," Pull from ",s.label??"the tracker"]}):null}function Zo({list:e,label:n="Tickets that could not be read"}){return t.jsx("section",{className:"stuckbox",role:"alert","aria-label":n,style:{marginBottom:14},children:e.map(s=>t.jsxs("div",{children:[t.jsx("p",{children:s.problem}),t.jsxs("details",{children:[t.jsx("summary",{className:"note",children:"For an engineer"}),t.jsx("pre",{className:"mono note",style:{whiteSpace:"pre-wrap"},children:`${s.file}
|
|
691
|
-
${s.detail}`})]})]},s.id))})}function SM({settings:e}){return e?t.jsx("div",{className:"center",children:t.jsxs("div",{role:"alert",children:[t.jsx("h2",{children:"This board cannot open"}),t.jsx("p",{children:e})]})}):t.jsx("div",{className:"center",children:t.jsxs("div",{children:[t.jsx("h2",{children:"No board yet"}),t.jsx("p",{children:"This project has not been set up yet. Go to Home to set it up, or to try a sample board."}),t.jsxs("p",{style:{marginTop:12},children:[t.jsx("a",{className:"btn",href:"/",children:"Go to Home"})," ",t.jsx(te,{text:"squad demo"})]})]})})}function CM(){const{id:e}=Md({from:"/tickets/$id/proof"}),n=cl(e),[s,r]=C.useState(0),[i,o]=C.useState(null),l=n.data;if(!l)return t.jsx("div",{className:"center",children:n.isError?`No ticket ${e}.`:"Loading…"});const d=l.proof??[],u=d[Math.min(s,d.length-1)],h=l.waiting?.kind==="proof"&&!l.now?.merging,m=l.gates,{pictures:p,starts:x}=L4(d,j=>Vn(`/api/v1/proof/${j}`)),y=x[Math.min(s,d.length-1)]??0;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"top",children:[t.jsxs("span",{className:"crumbs",children:[t.jsx(xe,{to:"/inbox",children:"Waiting for you"})," /",t.jsx(xe,{to:"/board",search:{ticket:l.id},children:t.jsx(L,{lead:l.id,text:l.title})})," ","/ ",t.jsx("b",{children:"Proof"})]}),t.jsx("span",{className:"grow"}),t.jsx(D4,{t:l})]}),t.jsxs("div",{className:`gatebar ${m?.checks==="unchecked"?"unchecked":""}`,children:[t.jsx(as,{state:m?.checks,text:E4(m)}),t.jsx(as,{state:m?.review,text:m?.review==="skipped"?"Review notes open, you continued":`Review approved${m?.reviewBy?` by ${m.reviewBy}`:""}`}),t.jsx(as,{state:m?.proof,text:P4(l)}),t.jsx(q1,{t:l}),t.jsx("span",{style:{marginLeft:6},children:"Nothing ships without these three."})]}),t.jsx(F4,{g:m,className:"gatebar-why"}),t.jsx(I4,{g:m,className:"gatebar-why"}),t.jsx(Na,{t:l,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 · ",d.length]}),d.map((j,k)=>t.jsxs("button",{className:`crit ${k===s?"on":""}`,...De(j.criterion),onClick:()=>r(k),children:[t.jsx(M4,{shows:j.shows}),t.jsxs("span",{children:[t.jsx(L,{text:j.criterion}),t.jsx(Yf,{shows:j.shows}),$d(j).length>0&&t.jsx("small",{className:"critpage-s",dir:"ltr",children:$d(j).join(" · ")})]})]},j.criterion)),d.length===0&&t.jsx("p",{className:"note",children:R4(l)}),t.jsx(Gf,{t:l}),va(l)&&t.jsx(D1,{t:l})]}),t.jsx("div",{className:"stage",children:u?t.jsxs(t.Fragment,{children:[t.jsx(L,{as:"h3",text:u.criterion}),u.shows&&t.jsxs("p",{className:`verdictline ${L1(u.shows)}`,children:[t.jsx(Yf,{shows:u.shows}),u.shows!=="met"&&Go(u)&&t.jsx(L,{text:Go(u)})]}),ci(u)&&t.jsxs("p",{className:"critpage",children:["Page ",t.jsx("code",{children:ci(u)})]}),t.jsx(AL,{t:l}),Qo(u.after)?t.jsx(R1,{file:u.after,...u.note?{note:u.note}:{}}):t.jsxs("div",{className:"ba",children:[t.jsxs("div",{className:u.beforeDevice?"ondevice":void 0,children:[t.jsx("div",{className:"cap",children:t.jsx(L,{text:u.beforeLabel})}),t.jsx("button",{className:"zoom",onClick:()=>o(y),"aria-label":`Open ${u.beforeLabel} full size`,children:t.jsx("img",{src:Vn(`/api/v1/proof/${u.before}`),alt:`${u.criterion}, ${u.beforeLabel}`})}),u.beforeDevice&&t.jsx("small",{className:"shotdevice",children:u.beforeDevice})]}),t.jsxs("div",{className:u.device?"ondevice":void 0,children:[t.jsx("div",{className:"cap",children:t.jsx(L,{text:u.afterLabel})}),t.jsx("button",{className:"zoom",onClick:()=>o(y+1),"aria-label":`Open ${u.afterLabel} full size`,children:t.jsx("img",{src:Vn(`/api/v1/proof/${u.after}`),alt:`${u.criterion}, ${u.afterLabel}`})}),u.device&&t.jsx("small",{className:"shotdevice",children:u.device})]})]}),u.note&&!Qo(u.after)&&t.jsx(L,{as:"p",className:"note",text:u.note}),t.jsx(O4,{shot:u,first:y+2,onOpen:o})]}):t.jsx("p",{className:"note",children:"Nothing to compare."})})]}),i!==null&&t.jsx(Ir,{pictures:p,start:i,onClose:()=>o(null)}),h?t.jsx(U4,{t:l,sticky:!0}):t.jsxs("div",{className:"stickybar",role:l.now?.merging?"status":void 0,children:[l.now?.merging&&t.jsx(st,{size:15,className:"spin"}),t.jsx(L,{className:"note",text:l.now?.merging?l.now.line:l.status})]})]})}function U1({title:e,text:n}){return t.jsxs("div",{className:"ob-card selfnote",role:"note",children:[t.jsx("img",{src:"/logo.svg",alt:"",width:30,height:30}),t.jsxs("span",{className:"grow",children:[t.jsx("b",{children:e}),t.jsx("span",{children:n})]})]})}function $M(){const e=e9(),n=Ue(),[s,r]=C.useState(null),[i,o]=C.useState(null),l=e.data??[],d=l.find(p=>p.version===s)??l.find(p=>p.status==="draft")??l[0],u=n.data?.ready?n.data.meta.engine==="demo":!1,h=n.data?.brokenRecords?.filter(p=>p.kind==="release")??[],m=n.data?.ready?n.data.self:void 0;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"top",children:[t.jsx("h1",{children:"Releases"}),t.jsx("span",{className:"grow"}),!m&&t.jsx(te,{text:"squad release"})]}),h.length>0&&t.jsx(Zo,{list:h,label:"Releases that could not be read"}),m&&t.jsx("div",{style:{padding:"0 28px 12px"},children:t.jsx(U1,{title:"Releases are for squad-kit's maintainers",text:m.releases})}),t.jsxs("div",{className:"split rel",children:[t.jsx("div",{className:"listcol",children:l.map(p=>t.jsxs("button",{className:`litem ${d?.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 sent yet":Is(p.date)," · ",p.items.length," ",p.items.length===1?"ticket":"tickets"]},p.version))}),d?t.jsx(TM,{r:d,onReleased:o,live:!u}):e.isError&&!e.data?t.jsx(Er,{what:"the releases",error:e.error,onRetry:()=>void e.refetch()}):t.jsx("div",{className:"center",children:"No releases yet."})]}),i&&t.jsx(xF,{release:i,demo:u,onClose:()=>o(null)})]})}function TM({r:e,onReleased:n,live:s}){const r=oe(),i=Ue(),o=$=>(i.data?.ready?i.data.tickets.find(P=>P.id===$)?.title:void 0)??e.titles?.[$]??$,[l,d]=C.useState(!1),[u,h]=C.useState(e.notes),[m,p]=C.useState(!1),x=i.data?.ready?i.data.meta:void 0,y=x?.repos?.length?[...new Set(e.targets.flatMap($=>Nv(x.parts,$.repo)))]:[],[j,k]=C.useState(!1),[b,w]=C.useState(!1);C.useEffect(()=>{l||h(e.notes)},[e.notes,l]);const S=e.status==="draft",T=i.data?.ready?i.data.self:void 0,A=e.unpushed??[],D=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:S?`Release ${e.version}`:e.version}),t.jsx("p",{className:"note",style:{marginTop:2},children:S&&T?"The stories merged on this computer. The notes help your pull request; the release itself is for the maintainers.":S?"The squad prepared this release. Read it, edit the notes if you like, then release.":`Released ${Is(e.date)}`}),A.length>0&&t.jsxs("div",{className:"box",style:{marginTop:10,color:"var(--you-ink)"},children:[t.jsx("b",{children:"Not sent yet."})," The release is made on this computer, but it did not reach your team's shared copy of the code, so its tickets stay open.",A.map($=>t.jsxs("div",{style:{marginTop:6},children:[$.plain??"An engineer can see why below.",t.jsxs("details",{style:{marginTop:4},children:[t.jsx("summary",{className:"note",children:"For engineers"}),t.jsxs("div",{className:"mono",style:{fontSize:12.5,marginTop:4},children:[$.repo==="."?"project":$.repo,": ",$.base," → ",$.remote,": ",$.error]})]})]},$.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:$=>$.unpushed?.length?void 0:n($)}),children:[t.jsx(jo,{size:15})," Send again"]}),t.jsx("button",{className:"btn quiet",disabled:r.isPending,title:"An engineer brought it in by hand, so Send again cannot see it. You say how; its tickets close.",onClick:()=>w(!0),children:"It reached it another way"}),t.jsx("span",{className:"grow"}),t.jsx(te,{text:`squad release ${e.version} --push-again`})]})]}),S&&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($=>t.jsxs("div",{className:"checkrow",style:$.ok?void 0:{color:"var(--you-ink)"},...De($.text),children:[t.jsx("span",{className:`cbx ${$.ok?"on":""}`,children:$.ok?t.jsx(fe,{size:11,strokeWidth:3}):"!"}),t.jsx(L,{text:$.text})]},$.text))]}),t.jsx("div",{className:"lbl",children:"What's inside"}),e.items.map($=>t.jsxs("div",{className:"trow",children:[t.jsx("span",{className:"mono",children:$.id}),t.jsx(L,{as:"b",text:$.title}),t.jsxs("span",{style:{display:"flex",gap:8,alignItems:"center",justifyContent:"flex-end",flexWrap:"wrap"},children:[$.outside&&t.jsxs("span",{className:`prio outside${$.outside.checked?" checked":""}`,children:[$.outside.from?`Continued outside from ${$.outside.from}`:"Worked outside squad-kit",$.outside.checked?", checked":""]}),t.jsx(q1,{t:$}),lu($.gates)?t.jsx(as,{state:"pending",text:"Not checked by squad-kit"}):$.gates?.checks==="unchecked"?t.jsx(as,{state:"unchecked",text:"Not checked · review, proof"}):$.gates&&t.jsxs("span",{className:"pill ok",children:[t.jsx(fe,{size:13,strokeWidth:2.5})," Checks, review, proof"]}),($.gates?.oldFailures?.length??0)>0&&t.jsx("span",{className:"pill unchecked",title:A4($.gates)??void 0,children:z1($.gates.oldFailures.length)}),S&&e.items.length>1&&t.jsx("button",{className:"btn sm quiet",title:`squad release --without ${$.id}`,disabled:r.isPending,onClick:()=>r.mutate({path:`/api/v1/releases/${e.version}/take-out`,body:{ticket:$.id},done:`${$.id} goes out with the next release`}),children:"Take out"})]})]},$.id)),e.items.length===0&&t.jsx("p",{className:"note",children:"No tickets yet. Tickets join after you check their proof."}),S&&e.items.length>1&&t.jsx("div",{style:{marginTop:2},children:t.jsx(te,{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:S?"Taken out of this release":"Left out of this release"}),e.out.map($=>t.jsxs("div",{className:"trow",children:[t.jsx("span",{className:"mono",children:$}),t.jsx(L,{as:"b",text:o($)}),S?t.jsxs("button",{className:"btn sm",disabled:r.isPending,onClick:()=>r.mutate({path:`/api/v1/releases/${e.version}/put-back`,body:{ticket:$},done:`${$} is back in ${e.version}`}),children:[t.jsx(Yk,{size:13})," Put back"]}):t.jsx("span",{className:"note",children:"Goes out with the next release"})]},$)),S&&t.jsx("p",{className:"note",children:"Its code stays in the project. This release leaves it out, and it goes out with the next one."}),S&&t.jsx("div",{style:{marginTop:6},children:t.jsx(te,{text:`squad release --put-back ${e.out[0]}`})})]}),!S&&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($=>t.jsxs("div",{className:"trow",children:[t.jsx("span",{className:"mono",children:$}),t.jsx(xe,{to:"/board",search:{ticket:$},children:t.jsx("b",{children:"Open the bug"})}),t.jsx("span",{})]},$))]}),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(ai,{size:20}),t.jsx("span",{children:e.version.replace(/^v/,"")})]}),t.jsx("p",{className:"note",style:{marginTop:4},children:D}),t.jsx("div",{className:"lbl",children:S||!e.log?"Also":"What the release did"}),!S&&e.log?e.log.map($=>t.jsxs("div",{className:"checkrow",style:$.ok?void 0:{color:"var(--you-ink)"},...De($.text),children:[t.jsx("span",{className:`cbx ${$.ok?"on":""}`,children:$.ok?t.jsx(fe,{size:11,strokeWidth:3}):"!"}),t.jsx(L,{text:$.text})]},$.text)):[["changelog","Update the changelog"],["tag",`Mark the code as ${e.version}`],["pipeline","Run your after-release step"],["whatsapp","Draft a WhatsApp note for my manager"]].map(([$,P])=>t.jsxs("div",{className:"checkrow",children:[t.jsx("span",{className:`cbx ${e.addons[$]?"on":""}`,children:e.addons[$]&&t.jsx(fe,{size:11,strokeWidth:3})}),P]},$))]}),t.jsxs("div",{children:[t.jsxs("div",{className:"lbl",children:["Release notes",S&&", written by the squad",t.jsx("span",{className:"grow",style:{flex:1}}),S&&!l&&t.jsxs("button",{className:"btn sm",onClick:()=>d(!0),children:[t.jsx(qo,{size:13})," Edit"]})]}),l?t.jsxs(t.Fragment,{children:[t.jsx("textarea",{className:"textarea mono",style:{minHeight:180,fontSize:13},dir:ge(u),value:u,onChange:$=>h($.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:u},done:"Notes saved"},{onSuccess:()=>d(!1)}),children:"Save notes"}),t.jsx("button",{className:"btn sm",onClick:()=>d(!1),children:"Cancel"})]})]}):t.jsx(J7,{notes:e.notes})]})]}),t.jsx("div",{style:{display:"flex",gap:10,alignItems:"center",marginTop:26},children:S&&T?t.jsx("span",{className:"note",children:"Merged stories wait on main here. Each one says how to send it as a pull request."}):S?t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"btn pri",disabled:e.items.length===0,onClick:()=>p(!0),children:[t.jsx(jo,{size:15})," Release ",e.version]}),t.jsx("span",{className:"note",children:"You'll be asked once to confirm."})]}):t.jsxs("button",{className:"btn",onClick:()=>k(!0),children:["Report a bug in ",e.version]})}),!!e.gateStop?.length&&t.jsx(PM,{r:e,onReleased:n}),m&&t.jsxs(We,{title:`Release ${e.version}?`,onClose:()=>p(!1),icon:t.jsx("span",{className:"glyph",children:t.jsx(jo,{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:$=>{p(!1),n($)}}),children:[t.jsx(jo,{size:15})," Yes, release it"]}),t.jsx("button",{className:"btn",onClick:()=>p(!1),children:"Not yet"}),t.jsx("span",{className:"grow"}),t.jsx(te,{text:`squad release ${e.version}`})]}),children:[t.jsxs("p",{children:[e.items.length," tickets go live:"," ",e.items.map(($,P)=>t.jsxs("span",{children:[P>0&&", ",t.jsx(L,{text:$.title})]},$.id)),"."]}),e.targets.length>0&&t.jsx("div",{className:"box",style:{marginBottom:6},children:y.length>0?t.jsxs("details",{children:[t.jsx("summary",{children:t.jsxs("b",{children:["This release changes ",y.join(", ")]})}),t.jsx("div",{className:"note",style:{marginTop:6},children:"For engineers:"}),t.jsx(bj,{r:e})]}):t.jsxs("details",{children:[t.jsx("summary",{children:t.jsx("b",{children:e.targets.some($=>$.remote)?"This release goes to your team's shared copy of the code":"This release stays on this computer: the project has no shared copy"})}),t.jsx("div",{className:"note",style:{marginTop:6},children:"For engineers:"}),t.jsx(bj,{r:e})]})})]}),!S&&s&&t.jsx(EM,{}),j&&t.jsx(h1,{foundIn:e.version,onClose:()=>k(!1)}),b&&t.jsx(AM,{version:e.version,onClose:()=>w(!1),onDone:n})]})}function bj({r:e}){return t.jsxs(t.Fragment,{children:[e.targets.map(n=>t.jsxs("div",{className:"mono",style:{fontSize:12.5,marginTop:6},children:[n.repo==="."?"project":n.repo,": ",n.branch," ",n.remote?`→ pushed to ${n.remote}`:"(no remote, stays on this computer)"]},n.repo)),t.jsx("p",{className:"note",style:{marginTop:6},children:"Change the branch or remote in Settings first if this is not right."})]})}function EM(){const e=oe(),s=we({queryKey:["branches"],queryFn:()=>ke("/api/v1/branches"),refetchInterval:3e4}).data;return!s||!s.here.length&&!s.remote.length?null:t.jsxs("div",{className:"box",style:{marginTop:18},children:[t.jsxs("b",{children:[t.jsx(pf,{size:14})," Left over from released tickets"]}),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} in your team's shared copy of the code`:""].filter(Boolean).join(" and "),". Their work is in the code already, 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 what was left over 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 what was left over here and in the shared copy of the code"}),children:["Delete them ",s.here.length?"here and ":"","in the shared copy"]}),t.jsx("span",{className:"grow",style:{flex:1}}),t.jsx(te,{text:s.remote.length?"squad branches --clean --remote":"squad branches --clean"})]})]})}function AM({version:e,onClose:n,onDone:s}){const r=In(),{toast:i}=qe(),[o,l]=C.useState(""),[d,u]=C.useState(null),[h,m]=C.useState(!1),p=async x=>{m(!0);try{const y=await ot(`/api/v1/releases/${e}/mark-sent`,"POST",{reason:o,...x?{anyway:x}:{}});r.invalidateQueries(),s(y),n()}catch(y){y instanceof _d&&y.status===409?u(y.message):i(y instanceof Error?y.message:String(y),"err")}finally{m(!1)}};return t.jsxs(We,{title:"It reached it another way",onClose:n,footer:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"grow"}),t.jsx("button",{className:"btn",onClick:n,children:"Cancel"}),d?t.jsx("button",{className:"btn pri",disabled:h||!o.trim(),onClick:()=>void p(!0),children:"Mark it anyway"}):t.jsx("button",{className:"btn pri",disabled:h||!o.trim(),onClick:()=>void p(!1),children:h?"Looking for it…":"Mark it as sent"})]}),children:[t.jsxs("p",{className:"note",children:[e,"'s tickets close, and nothing checks after this. squad-kit looks in your team's shared copy of the code first."]}),t.jsx("div",{className:"lbl",children:"How did it get there?"}),t.jsx("textarea",{className:"waynote",rows:2,dir:ge(o),value:o,onChange:x=>l(x.target.value),placeholder:"For example: Sara merged it by hand"}),d&&t.jsx("div",{className:"box",style:{marginTop:10},children:d}),t.jsx("div",{style:{marginTop:10},children:t.jsx(te,{text:`squad release ${e} --mark-sent --reason ${Le(o.trim()||"how it got there")}${d?" --anyway":""}`})})]})}function PM({r:e,onReleased:n}){const s=oe(),[r,i]=C.useState(""),o=d=>s.mutate({path:`/api/v1/releases/${e.version}/release`,...d?{body:{goOn:d}}:{}},{onSuccess:n}),l=e.gateStop.filter(d=>d.output);return t.jsxs("div",{className:"box",role:"alert",style:{marginTop:12},children:[t.jsxs("b",{children:[e.version," did not go out. Nothing changed."]}),e.gateStop.map(d=>t.jsxs("p",{dir:"auto",children:["Your team's check ",t.jsx("b",{children:d.name})," ",d.result==="failed"?"did not pass.":`could not run. ${d.why??""}`]},d.id)),l.length>0&&t.jsxs("details",{children:[t.jsx("summary",{children:"Let an engineer look"}),t.jsx("pre",{className:"mono",dir:"ltr",style:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",fontSize:12},children:l.map(d=>`${d.name}:
|
|
692
|
-
${d.output}`).join(`
|
|
693
|
-
|
|
694
|
-
`)})]}),t.jsxs("div",{className:"field",style:{marginTop:10},children:[t.jsx("label",{htmlFor:"gate-why",children:"To go on without this check, write why. It stays on the stories and the release notes."}),t.jsx("textarea",{id:"gate-why",className:"textarea",dir:ge(r),value:r,onChange:d=>i(d.target.value)})]}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:8},children:[t.jsx("button",{className:"btn pri sm",disabled:s.isPending,onClick:()=>o(),children:"Try again"}),t.jsx("button",{className:"btn sm",disabled:s.isPending||!r.trim(),onClick:()=>o(r.trim()),children:"Go on without this check"})]})]})}function RM(){const[e,n]=C.useState(void 0),s=we({queryKey:["backlog",e??""],queryFn:()=>ke(`/api/v1/backlog${e?`?sprint=${encodeURIComponent(e)}`:""}`),refetchInterval:15e3}),r=s.data,i=e??r?.sprint,o=r?.sprints.find(l=>l.path===i)?.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:i??"all",onChange:l=>n(l.target.value),"aria-label":"Sprint",children:[r.sprints.map(l=>t.jsxs("option",{value:l.path,children:[hs(l.name),l.current?" (now)":""]},l.path)),t.jsx("option",{value:"all",children:"Everything open"})]}),t.jsx("span",{className:"grow"}),t.jsx(te,{text:o?`squad backlog --sprint ${Le(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(l=>t.jsx(IM,{w:l},l.id))})]})]}):t.jsxs("div",{className:"calm",children:[t.jsx("span",{className:"ring",children:t.jsx(S7,{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(xe,{to:"/settings",style:{fontWeight:600},children:"Open Settings"})]})]})]})})})]})}function IM({w:e}){const n=oe();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(Kn,{size:11})]})}),t.jsx("td",{...De(e.title),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(Qs,{size:12})," Bug"]}),t.jsx(L,{style:{fontWeight:600},text:e.title})]})}),t.jsx("td",{children:e.points??""}),t.jsx("td",{children:e.state}),t.jsx("td",{children:e.ticket?t.jsxs(xe,{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":Zs[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(gn,{size:13})," Start"]})})]})}const cu=["Structure","Data","Security","Interface","Rules"],Xf={shipped:"Released",merged:"Merged, not released yet",building:"Being built",designed:"Designed, not built yet",coming:"Coming"};function FM(){const e=t9(),n=Pr({from:"/architecture"}),s=qt(),r=n.view??"map",[i,o]=C.useState(new Set),[l,d]=C.useState(null),[u,h]=C.useState(!1),[m,p]=C.useState(null),x=e.data?.decisions??[],y=I=>I.startsWith("ADR-")||x.some(W=>W.id===I)?{kind:"adr",id:I}:{kind:"ticket",id:I},j=n.adr?y(n.adr):null,k=I=>void s({to:"/architecture",search:{...(I.view??r)!=="map"?{view:I.view??r}:{},..."pick"in I?I.pick?{adr:I.pick.id}:{}:n.adr?{adr:n.adr}:{}},replace:!0}),b=I=>k({pick:j?.id===I?.id?null:I}),w=e.data?.tickets??[],S=C.useMemo(()=>KM(x,w),[x,w]),T=S.cols.length,A=l??T;if(C.useEffect(()=>{if(!u)return;const I=setInterval(()=>{d(W=>{const M=(W??0)+1;return M>=T?(h(!1),null):M})},700);return()=>clearInterval(I)},[u,T]),!e.data)return t.jsx("div",{className:"top",children:t.jsx("h1",{children:"Architecture"})});const D=x.filter(I=>S.colOf(I.from)<A),$=D.filter(I=>!I.replacedBy||S.colOf(G4(x,I.replacedBy))>=A),P=S.cols.slice(0,A).reduce((I,W)=>I+(W.t?.follows.length??0),0),F=m?y(m):j,_=YM(F,x,w),z=r==="map"||r==="timeline",U=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",x.length],["project","Project map"],["lessons","Lessons",U.length]].map(([I,W,M])=>t.jsxs("button",{role:"tab","aria-selected":r===I,className:r===I?"on":"",onClick:()=>k({view:I}),children:[W," ",M!==void 0&&t.jsx("span",{className:"n",children:M})]},I))}),t.jsxs("div",{className:"split",children:[t.jsx("div",{className:"scroll",children:t.jsxs("div",{className:"arch",children:[(e.data?.broken?.length??0)>0&&t.jsx(Zo,{list:e.data.broken,label:"Decisions that could not be read"}),z&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"arch-stats",children:[t.jsx(Vc,{n:$.length,label:"Rules in force",hint:"Every new design must follow these"}),t.jsx(Vc,{n:D.length-$.length,label:"Replaced",hint:"Changed by a newer decision"}),t.jsx(Vc,{n:$.filter(I=>I.checkedBy?.passing).length,label:"Checked by a test",hint:"Break one and nothing ships"}),t.jsx(Vc,{n:P,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:()=>u?h(!1):(d(l===null||l>=T?1:l),h(!0)),children:[u?t.jsx(al,{size:14}):t.jsx(gn,{size:14})," ",u?"Pause":"Play the history"]}),t.jsx("input",{type:"range",min:1,max:T,value:A,"aria-label":"Show the project up to this ticket",onChange:I=>{h(!1);const W=Number(I.target.value);d(W>=T?null:W)}}),t.jsx("span",{className:"note mono",style:{minWidth:110},children:A>=T?"Today":`Up to ${S.cols[A-1]?.label??""}`}),t.jsx("span",{className:"grow"}),[...cu,"Other"].filter(I=>x.some(W=>(W.area??"Other")===I)).map(I=>t.jsxs("button",{className:`chip area-${I.toLowerCase()} ${i.has(I)?"on":""}`,onClick:()=>o(W=>{const M=new Set(W);return M.has(I)?M.delete(I):M.add(I),M}),children:[t.jsx("i",{})," ",I]},I))]})]}),r==="map"&&t.jsx(OM,{decisions:x.filter(I=>i.size===0||i.has(I.area??"Other")),tickets:w,visible:I=>S.colOf(I.from)<A,related:_,picked:j?.id??null,onPick:b,onHover:p}),r==="timeline"&&t.jsx(BM,{decisions:x,tickets:w,areas:i,shown:A,related:_,picked:j?.id??null,onPick:b,g:S}),z&&t.jsx(MM,{view:r}),r==="map"&&t.jsx(WM,{decisions:x,tickets:w,onPick:b}),r==="stack"&&t.jsx(zM,{data:e.data,picked:j?.id??null,onPick:b}),r==="list"&&t.jsx(UM,{decisions:x,picked:j?.id??null,onPick:b}),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(v7,{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(Y4,{reading:e.data.reading}),e.data.map.map(I=>t.jsxs("div",{className:"maprow",children:[t.jsx(L,{as:"b",text:I.area}),t.jsx(L,{text:I.detail})]},I.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."}),U.length===0&&t.jsx("p",{className:"note",children:"No lessons yet."}),U.map(I=>t.jsxs("div",{className:"lesson",children:[t.jsx("span",{className:"glyph sm",children:t.jsx(j7,{size:12})}),t.jsxs(L,{text:I.text,children:[" ",t.jsxs("span",{className:"note",dir:"ltr",children:["From ",I.from]})]}),t.jsx("span",{className:"mono",children:Is(I.date)})]},I.id))]})]})}),r!=="project"&&r!=="lessons"&&t.jsx(HM,{pick:j,decisions:x,tickets:w,impact:e.data.impact??[],onPick:b})]})]})}const K4=[{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 zM({data:e,picked:n,onPick:s}){const r=e.stack.filter(o=>!o.decisions.length&&!o.via).length,i=e.stack.filter(o=>!o.decisions.length&&o.via).length;return t.jsxs("div",{className:"stackv",children:[t.jsx(Y4,{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-i})," chosen by a saved decision"]}),i>0&&t.jsxs("span",{children:[t.jsx("b",{children:i})," 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:K4.flatMap(o=>e.stack.filter(l=>l.role===o.role)).map(o=>t.jsx(qM,{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(E7,{size:13})}),t.jsxs("div",{children:[t.jsx(L,{as:"b",text:o.name}),t.jsx(L,{as:"p",text:o.what}),t.jsxs("div",{className:"where",children:[o.where.map(l=>t.jsx("code",{children:l},l)),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 qM({t:e,picked:n,onPick:s}){const r=e.icon?h4[e.icon]:void 0;return t.jsxs("div",{className:`tech ${e.decisions.some(i=>i===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:zq(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:K4.find(i=>i.role===e.role)?.label})]}),t.jsx(L,{as:"p",className:e.why?"":"note",text: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(i=>t.jsxs("button",{className:`pill click ${n===i?"on":""}`,onClick:()=>s({kind:"adr",id:i}),children:["Chosen in ",i]},i)):e.via?e.via.decisions.map(i=>t.jsxs("button",{className:`pill click ${n===i?"on":""}`,onClick:()=>s({kind:"adr",id:i}),title:`Choosing ${e.via.name} chose ${e.name} too`,children:["Comes with ",e.via.name," · ",i]},i)):t.jsx(LM,{t:e})})]})}function LM({t:e}){const n=oe(),s=(i,o)=>n.mutate({path:"/api/v1/architecture/decide",body:{tech:e.name,do:i},done:o}),r=e.draft;if(r?.status==="writing"||n.isPending&&!r)return t.jsxs("span",{className:"pill nodecision",children:[t.jsx(st,{size:12,className:"spin"})," The Architect is writing it"]});if(r?.status==="ready"&&r.decision){const i=r.decision;return t.jsxs("div",{className:"techdraft",children:[t.jsx("span",{className:"lbl",children:"Decision for you to approve"}),t.jsx(L,{as:"b",text:i.title}),t.jsx(L,{as:"p",lead:t.jsx("span",{className:"note",children:"Chosen:"}),text:i.chosen}),t.jsx(L,{as:"p",text:i.why}),i.options.filter(o=>o!==i.chosen).length>0&&t.jsx(L,{as:"p",className:"note",lead:"Also looked at:",text:i.options.filter(o=>o!==i.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(fe,{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 Y4({reading:e}){const n=oe(),s=e?.status==="pending"||e?.status==="running"||n.isPending;return t.jsxs("div",{className:`reading ${e?.status==="failed"?"bad":""}`,children:[s?t.jsx(st,{size:15,className:"spin"}):t.jsx(Es,{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 ${Je(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(Es,{size:13})," Read the code again"]})]})}function Vc({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 MM({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(fe,{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 Ki=112,Up=18,xo=16,wj=34;function OM({decisions:e,tickets:n,visible:s,related:r,picked:i,onPick:o,onHover:l}){const[d,u]=C.useState(1100),h=C.useRef(null);C.useEffect(()=>{const F=h.current;if(!F)return;const _=new ResizeObserver(()=>u(F.clientWidth));return _.observe(F),()=>_.disconnect()},[]);const m=new Set(e.map(F=>F.id)),p=F=>[...F.buildsOn??[],...F.replaces?[F.replaces]:[]].filter(_=>m.has(_)),x=new Map,y=(F,_=new Set)=>{if(x.has(F.id))return x.get(F.id);if(_.has(F.id))return 0;_.add(F.id);const z=p(F).map(I=>e.find(W=>W.id===I)),U=z.length?1+Math.max(...z.map(I=>y(I,_))):0;return x.set(F.id,U),U},j=[...cu,"Other"],k=[];for(const F of e)(k[y(F)]??=[]).push(F);const b=k.length>4?30:46,w=Math.max(150,Math.min(270,(d-xo*2-Math.max(0,k.length-1)*b)/Math.max(1,k.length)));for(const F of k)F?.sort((_,z)=>j.indexOf(_.area??"Other")-j.indexOf(z.area??"Other")||Nj(_.id)-Nj(z.id));const S=Math.max(1,...k.map(F=>F?.length??0)),T=wj+S*(Ki+Up)+xo,A=new Map;k.forEach((F,_)=>{const z=(S-(F?.length??0))*(Ki+Up)/2;F?.forEach((U,I)=>A.set(U.id,{x:xo+_*(w+b),y:wj+z+I*(Ki+Up)}))});const D=xo*2+k.length*w+Math.max(0,k.length-1)*b,$=F=>r!==null&&!r.has(F),P=["Starting points","Built on them","One more level","And on those","And further"];return t.jsx("div",{className:"dmap",ref:h,onMouseLeave:()=>l(null),children:t.jsxs("div",{className:"dmap-canvas",style:{width:D,height:T},children:[k.map((F,_)=>t.jsx("span",{className:"dmap-layer",style:{left:xo+_*(w+b),width:w},children:P[_]??`Level ${_+1}`},_)),t.jsxs("svg",{width:D,height:T,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(F=>{const _=A.get(F.id);return!_||!s(F)?[]:[...(F.buildsOn??[]).map(U=>({p:U,kind:"built"})),...F.replaces?[{p:F.replaces,kind:"replaces"}]:[]].map(({p:U,kind:I})=>{const W=A.get(U),M=e.find(B=>B.id===U);if(!W||!M||!s(M))return null;const G=W.x+w,ce=W.y+Ki/2,V=_.x-2,Y=_.y+Ki/2,se=Math.max(40,(V-G)/2),R=r!==null&&r.has(F.id)&&r.has(U);return t.jsx("path",{className:`edge ${I} ${$(F.id)||$(U)?"off":""} ${R?"lit":""}`,d:`M${G} ${ce} C${G+se} ${ce}, ${V-se} ${Y}, ${V} ${Y}`,markerEnd:`url(#${I==="replaces"?"arr-r":"arr"})`},`${U}-${F.id}-${I}`)})})]}),e.map(F=>{const _=A.get(F.id),z=F.tickets.filter(M=>M!==F.from),U=n.filter(M=>(M.state==="designed"||M.state==="coming")&&M.follows.includes(F.id)&&!z.includes(M.id)),I=[F.from==="Project scan"?"Scan":F.from,...z],W=I.length+U.length-6;return t.jsxs("button",{className:`dcard area-${(F.area??"Other").toLowerCase()} ${s(F)?"":"later"} ${$(F.id)?"off":""} ${i===F.id?"picked":""} ${F.replacedBy?"old":""}`,style:{left:_.x,top:_.y,width:w,height:Ki},onClick:()=>o({kind:"adr",id:F.id}),onMouseEnter:()=>l(F.id),children:[t.jsxs("span",{className:"dhead",children:[t.jsx("i",{}),t.jsx("span",{className:"mono",children:F.id}),t.jsx("span",{className:"darea",children:F.area??"Other"}),F.checkedBy?.passing&&t.jsx(fe,{size:13,strokeWidth:3,className:"dtest","aria-label":"Checked by a test"})]}),t.jsx(L,{as:"b",className:"dtitle",text:F.title}),t.jsx("span",{className:"dchips",children:F.replacedBy?t.jsxs("span",{className:"dchip ahead",children:["Replaced by ",F.replacedBy]}):t.jsxs(t.Fragment,{children:[I.slice(0,6).map((M,G)=>t.jsx("span",{className:`dchip ${G===0?"made":""}`,title:G===0?"Made this decision":"Its design followed it",children:M},M)),U.slice(0,Math.max(0,6-I.length)).map(M=>t.jsx("span",{className:"dchip ahead",title:"Designed, not built yet: will follow it",children:M.id},M.id)),W>0&&t.jsxs("span",{className:"dchip",children:["+",W]})]})})]},F.id)})]})})}const Hp=30,_M=26,Kc=250,DM=62;function BM({decisions:e,areas:n,shown:s,related:r,picked:i,onPick:o,g:l}){const[d,u]=C.useState(1e3),h=C.useRef(null);C.useEffect(()=>{const $=h.current;if(!$)return;const P=new ResizeObserver(()=>u($.clientWidth));return P.observe($),()=>P.disconnect()},[]);const m=l.cols.length,p=Math.max(40,Math.min(64,(d-Kc-24)/Math.max(1,m))),x=l.rows.filter($=>n.size===0||n.has($.area)),y=new Map;let j=DM+8,k="";const b=[];for(const $ of x)$.area!==k&&(k=$.area,j+=_M,b.push({area:$.area,y:j-18})),y.set($.d.id,j),j+=Hp;const w=j+12,S=Kc+m*p+16,T=$=>Kc+$*p+p/2,A=$=>$<s,D=$=>r!==null&&!r.has($);return t.jsx("div",{className:"arch-graph",ref:h,children:t.jsxs("svg",{width:S,height:w,role:"img","aria-label":"Decisions over time, and the tickets that followed them",children:[l.cols.map(($,P)=>t.jsxs("g",{className:`col state-${$.t?.state??"scan"} ${A(P)?"":"later"} ${D($.key)?"dim":""}`,onClick:()=>$.t&&o({kind:"ticket",id:$.key}),children:[t.jsx("rect",{className:"colbg",x:Kc+P*p+2,y:6,width:p-4,height:w-12,rx:10}),t.jsx("text",{className:"colid",x:T(P),y:26,textAnchor:"middle",children:$.label}),t.jsx("circle",{className:"colstate",cx:T(P),cy:42,r:4}),t.jsx("title",{children:$.t?`${$.t.id} · ${$.t.title}
|
|
695
|
-
${Xf[$.t.state]}`:"What the Architect found when it first read the project"})]},$.key)),b.map($=>t.jsx("text",{className:`lane area-${$.area.toLowerCase()}`,x:14,y:$.y,children:$.area.toUpperCase()},$.area)),x.map($=>{const P=y.get($.d.id),F=l.colOf($.d.from);if(!A(F))return null;const _=$.d.replacedBy?l.colOf(G4(e,$.d.replacedBy)):m-1,z=Math.min(_,s-1),U=`track area-${$.area.toLowerCase()} ${D($.d.id)?"dim":""} ${i===$.d.id?"picked":""}`;return t.jsxs("g",{className:U,onClick:()=>o({kind:"adr",id:$.d.id}),children:[t.jsx("rect",{className:"hit",x:0,y:P-Hp/2,width:S,height:Hp}),t.jsxs("text",{className:"name",x:14,y:P+4,children:[t.jsx("tspan",{className:"rid",children:$.d.id})," ",hs(GM($.d.title,28))]}),t.jsx("line",{className:`rail ${$.d.replacedBy&&_<s?"gone":""}`,x1:T(F),x2:T(z)+($.d.replacedBy?0:p/2),y1:P,y2:P}),l.cols.map((I,W)=>W>F&&A(W)&&I.t?.follows.includes($.d.id)?t.jsx("circle",{className:`dot ${I.t.state==="designed"||I.t.state==="coming"?"open":""}`,cx:T(W),cy:P,r:5,children:t.jsx("title",{children:`${I.t.id} followed ${$.d.id}`})},I.key):null),t.jsx("circle",{className:`node ${$.d.replacedBy?"old":""}`,cx:T(F),cy:P,r:8}),$.d.checkedBy?.passing&&t.jsx("path",{className:"tick",d:`M${T(F)-3.5} ${P} l2.5 2.6 l4.8 -5`}),t.jsx("title",{children:`${$.d.id} · ${$.d.title}
|
|
696
|
-
Chosen: ${$.d.chosen}`})]},$.d.id)}),x.flatMap($=>{const P=y.get($.d.id),F=l.colOf($.d.from);return A(F)?[...($.d.buildsOn??[]).map(z=>({b:z,kind:"built"})),...$.d.replaces?[{b:$.d.replaces,kind:"replaces"}]:[]].map(({b:z,kind:U})=>{const I=y.get(z);if(I===void 0)return null;const W=P>I?1:-1;return t.jsxs("g",{className:`link ${U} ${D($.d.id)||D(z)?"dim":""}`,children:[t.jsx("path",{d:`M${T(F)} ${I+6*W} L${T(F)} ${P-9*W}`}),t.jsx("circle",{cx:T(F),cy:I,r:3.2})]},`${$.d.id}-${z}-${U}`)}):[]})]})})}function WM({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."}),[...cu,"Other"].map(r=>{const i=e.filter(o=>!o.replacedBy&&(o.area??"Other")===r);return i.length?t.jsxs("div",{className:`inherit area-${r.toLowerCase()}`,children:[t.jsxs("b",{children:[t.jsx("i",{})," ",r]}),i.map(o=>t.jsx("button",{...De(o.title),onClick:()=>s({kind:"adr",id:o.id}),children:t.jsx(L,{lead:t.jsx("span",{className:"mono",children:o.id}),text: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.jsx("button",{...De(r.title),onClick:()=>s({kind:"ticket",id:r.id}),children:t.jsx(L,{lead:t.jsx("span",{className:"mono",children:r.id}),text:r.title})}),t.jsx("span",{className:"pills",children:r.follows.length?r.follows.map(i=>t.jsx("button",{className:"pill click",onClick:()=>s({kind:"adr",id:i}),children:i},i)):t.jsxs("span",{className:"note",children:["Not designed yet. Will read the ",e.filter(i=>!i.replacedBy).length," rules in force."]})})]},r.id))]})]})}function UM({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},...De(r.title),children:[r.replacedBy?t.jsx("s",{children:t.jsx(Gt,{text:r.title,dir:De(r.title).dir})}):t.jsx(Gt,{text:r.title,dir:De(r.title).dir})," ",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(fe,{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 HM({pick:e,decisions:n,tickets:s,impact:r,onPick:i}){const o=p=>t.jsx("button",{className:"pill click",onClick:()=>i({kind:"adr",id:p}),children:p},p),l=p=>{const x=s.find(y=>y.id===p);return t.jsx("button",{className:`pill click st-${x?.state??"shipped"}`,title:x?`${x.title} · ${Xf[x.state]}`:p,onClick:()=>i({kind:"ticket",id:p}),children:p},p)};if(e?.kind==="ticket"){const p=s.find(x=>x.id===e.id);return p?t.jsxs("aside",{className:"sidepanel arch-side",children:[t.jsxs("span",{className:"note mono",children:[p.id," · ",Xf[p.state],p.release?` · ${p.release}`:""]}),t.jsx(L,{as:"h3",text:p.title}),t.jsx("div",{className:"lbl",children:"Decision it made"}),p.made?t.jsx(L,{as:"p",style:{fontSize:13.5},lead:o(p.made),text:n.find(x=>x.id===p.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"}),p.follows.length?t.jsx("div",{className:"pills",children:p.follows.map(o)}):t.jsx("p",{className:"note",children:p.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(xe,{to:"/board",search:{ticket:p.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 d=e?.kind==="adr"?n.find(p=>p.id===e.id):void 0;if(!d)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 u=n.filter(p=>p.buildsOn?.includes(d.id)),h=d.tickets.filter(p=>p!==d.from),m=s.filter(p=>(p.state==="designed"||p.state==="coming")&&p.follows.includes(d.id)&&!h.includes(p.id));return t.jsxs("aside",{className:"sidepanel arch-side",children:[t.jsxs("span",{className:"note mono",children:[d.id," · ",d.area??"Other"," · ",d.proposed?"found in the code, not approved yet":t.jsxs(t.Fragment,{children:["approved by ",t.jsx(L,{text:d.approvedBy})]})," · ",Is(d.date)]}),t.jsx(L,{as:"h3",text:d.title}),d.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(xe,{to:"/overview",children:"Overview"}),"."]}),d.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(d.replacedBy),"."]}),t.jsx("div",{className:"lbl",children:"Chosen"}),t.jsx(L,{as:"p",style:{fontSize:13.5,fontWeight:600},text:d.chosen}),t.jsx("div",{className:"lbl",children:"Why"}),t.jsx(L,{as:"p",style:{fontSize:13.5},text:d.why}),d.options.length>1&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"lbl",children:"Also looked at"}),d.options.filter(p=>p!==d.chosen).map(p=>t.jsx(L,{as:"p",className:"note",style:{fontSize:13},text:p},p))]}),t.jsx("div",{className:"lbl",children:"Where it came from"}),t.jsxs("div",{className:"pills",style:{alignItems:"center"},children:[d.from==="Project scan"?t.jsx("span",{className:"pill",children:"Project scan"}):l(d.from),(d.buildsOn??[]).length>0&&t.jsx("span",{className:"note",children:"built on"}),(d.buildsOn??[]).map(o),d.replaces&&t.jsx("span",{className:"note",children:"replaces"}),d.replaces&&o(d.replaces)]}),t.jsx("div",{className:"lbl",children:"What it shaped"}),h.length||u.length?t.jsxs(t.Fragment,{children:[h.length>0&&t.jsx("p",{className:"note",style:{marginBottom:6},children:"Tickets whose design followed it"}),t.jsx("div",{className:"pills",children:h.map(l)}),u.length>0&&t.jsx("p",{className:"note",style:{margin:"10px 0 6px"},children:"Decisions built on it"}),t.jsx("div",{className:"pills",children:u.map(p=>o(p.id))})]}):t.jsx("p",{className:"note",children:"Nothing yet. Every new ticket reads it."}),m.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:m.map(p=>l(p.id))})]}),t.jsx(VM,{d,check:r.find(p=>p.adr===d.id),tk:l}),t.jsx("div",{className:"lbl",children:"Checked by"}),d.checkedBy?t.jsxs("div",{className:"box",children:[t.jsx("b",{style:{color:d.checkedBy.passing?"var(--accent)":"var(--you-ink)"},children:d.checkedBy.passing?"Passing":"Being written"})," ",t.jsx("span",{className:"mono",style:{fontSize:12},children:d.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 VM({d:e,check:n,tk:s}){const r=oe();if(e.replacedBy)return null;const i=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"}),i?t.jsxs("p",{className:"note",style:{display:"flex",gap:8,alignItems:"center"},children:[t.jsx(st,{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?Je(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 KM(e,n){const s=[];e.some(l=>!n.some(d=>d.id===l.from))&&s.push({key:"scan",label:"Scan"});for(const l of n)s.push({key:l.id,label:l.id,t:l});const r=l=>{const d=s.findIndex(u=>u.key===l);return d<0?0:d},i=[...cu,"Other"],o=e.map(l=>({d:l,area:l.area??"Other"})).sort((l,d)=>i.indexOf(l.area)-i.indexOf(d.area)||r(l.d.from)-r(d.d.from));return{cols:s,rows:o,colOf:r}}function G4(e,n){return e.find(s=>s.id===n)?.from??""}function YM(e,n,s){if(!e)return null;const r=new Set([e.id]),i=d=>[...d.buildsOn??[],...d.replaces?[d.replaces]:[]];if(e.kind==="ticket"){const d=s.find(u=>u.id===e.id);for(const u of d?.follows??[])r.add(u);return d?.made&&r.add(d.made),r}const o=[e.id];for(;o.length;){const d=o.pop(),u=n.find(h=>h.id===d);for(const h of u?i(u):[])r.has(h)||(r.add(h),o.push(h))}const l=[e.id];for(;l.length;){const d=l.pop();for(const u of n)i(u).includes(d)&&!r.has(u.id)&&(r.add(u.id),l.push(u.id))}for(const d of[...r]){const u=n.find(h=>h.id===d);if(u&&d===e.id)for(const h of u.tickets)r.add(h);u&&r.add(u.from)}for(const d of s)d.follows.includes(e.id)&&r.add(d.id);return r}function GM(e,n){return e.length>n?`${e.slice(0,n-1).trimEnd()}…`:e}function Nj(e){return Number(e.replace(/\D/g,""))||0}function bl(){return we({queryKey:["sandbox"],queryFn:()=>ke("/api/v1/sandbox")})}function Q4(){const e=bl(),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(jm,{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(ra,{size:18}):t.jsx(Ay,{size:18})}),t.jsxs("span",{style:{minWidth:0},children:[t.jsx("b",{children:"The guard 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 the websites the network level under Safety allows, and never read your keys, sign-ins or .env files."]}):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(ra,{size:18}):t.jsx(Ay,{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. Only the setup after a merge reads the .env files of your own folder, as when you run it yourself. 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(te,{text:"squad doctor"})})]})}function QM({net:e,live:n}){const s=oe(),r=e.levels.find(i=>i.id===e.level)??e.levels[0];return t.jsxs("div",{className:"maprow",children:[t.jsx("b",{style:{paddingTop:4},children:"Network level"}),t.jsxs("span",{style:{display:"flex",flexDirection:"column",gap:6,minWidth:0},children:[t.jsxs("span",{className:"note",children:[t.jsxs("b",{children:[r.name,":"]})," ",r.words]}),e.level==="off"&&e.commands==="internet"&&t.jsx("span",{className:"note",children:"On this computer, Off closes the internet for the agents only: your project's own setup, tests and app still reach it."}),n&&t.jsxs("details",{children:[t.jsx("summary",{className:"note",children:"For engineers"}),t.jsxs("span",{style:{display:"flex",flexDirection:"column",gap:6,marginTop:6},children:[t.jsxs("span",{style:{display:"flex",gap:6,alignItems:"center",flexWrap:"wrap"},children:[e.levels.map(i=>t.jsx("button",{className:`btn sm ${i.id===e.level?"pri":""}`,"aria-pressed":i.id===e.level,disabled:s.isPending,onClick:()=>i.id!==e.level&&s.mutate({path:"/api/v1/settings",method:"PUT",body:{network:i.id},done:`The network level is ${i.name} now, from the next step`}),children:i.name},i.id)),t.jsx("span",{className:"grow"}),t.jsx(te,{text:`squad config set network ${e.level}`})]}),e.levels.map(i=>t.jsxs("span",{className:"note",style:{fontSize:12.5,...i.id===e.level?{color:"var(--text)"}:{}},children:[t.jsxs("b",{children:[i.name,":"]})," ",i.words]},i.id)),t.jsx(ZM,{})]})]})]})]})}function ZM(){const n=bl().data?.network?.blocked??[],s={standard:"Standard",strict:"Strict",off:"Off"};return n.length?t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:"note",children:[t.jsx("b",{children:"Refused lately."})," The work went on without each one. Allow a site below when the project truly needs it, or pick another level."]}),t.jsxs("table",{className:"table",children:[t.jsx("thead",{children:t.jsxs("tr",{children:[t.jsx("th",{children:"Site"}),t.jsx("th",{children:"Story"}),t.jsx("th",{children:"Level"}),t.jsx("th",{children:"When"})]})}),t.jsx("tbody",{children:n.map(r=>t.jsxs("tr",{children:[t.jsx("td",{className:"mono",children:r.host}),t.jsx("td",{children:t.jsx(xe,{to:"/board",search:{ticket:r.story},children:r.story})}),t.jsx("td",{children:s[r.level]??r.level}),t.jsx("td",{children:Je(r.at)})]},`${r.host}-${r.story}`))})]})]}):t.jsx("span",{className:"note",children:"No site was refused on this computer yet."})}function XM({hosts:e}){const n=oe(),s=bl(),[r,i]=C.useState(""),o=(u,h)=>n.mutate({path:"/api/v1/settings",method:"PUT",body:{allowedHosts:u},done:h},{onSuccess:()=>i("")}),l=()=>{const u=r.trim();u&&!n.isPending&&o([...e,u],`The squad may reach ${u} from its next step`)},d=s.data?.tools.length?s.data.tools.every(u=>!u.available):!1;return 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:["Allow a website here when the project needs one, for example your company's package server. The whole team shares this list.",s.data?.network?.level==="standard"?" On Standard the squad reaches it already: the list counts on Strict.":"",d?" This computer has no guard for them, so here they can reach any website.":""]}),e.length>0&&t.jsx("span",{className:"pills",children:e.map(u=>t.jsxs("span",{className:"pill mono",children:[u,t.jsx("button",{className:"linkbtn","aria-label":`Stop allowing ${u}`,title:`Stop allowing ${u}`,disabled:n.isPending,onClick:()=>o(e.filter(h=>h!==u),`The squad no longer reaches ${u}`),children:t.jsx(Ve,{size:12})})]},u))}),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:u=>i(u.target.value),onKeyDown:u=>u.key==="Enter"&&l()}),t.jsx("button",{className:"btn sm",disabled:!r.trim()||n.isPending,onClick:l,children:"Allow"})]}),t.jsx(te,{text:`squad config set hosts ${[...e,r.trim()].filter(Boolean).join(" ")||"nexus.example.com"}`})]})]})}function JM(){const e=oe(),s=bl().data?.guard,[r,i]=C.useState(""),[o,l]=C.useState("");if(!s?.on)return null;const d=(h,m,p)=>e.mutate({path:"/api/v1/settings",method:"PUT",body:{guard:{allowRead:s.allowRead,allowWrite:s.allowWrite,...h}},done:m},{onSuccess:p}),u=(h,m,p,x)=>{const y=h==="read"?"allowRead":"allowWrite",j=()=>p.trim()&&!e.isPending&&d({[y]:[...m,p.trim()]},`The project's commands may ${h} ${p.trim()}`,()=>x("")),k=b=>d({[y]:m.filter(w=>w!==b)},`No longer allowed to ${h} ${b}`,()=>{});return t.jsxs("div",{className:"maprow",children:[t.jsx("b",{style:{paddingTop:4},children:h==="read"?"Also read":"Also write"}),t.jsxs("span",{style:{display:"flex",flexDirection:"column",gap:8,minWidth:0},children:[t.jsxs("span",{className:"note",children:[h==="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."]}),m.length>0&&t.jsx("span",{className:"pills",children:m.map(b=>t.jsxs("span",{className:"pill mono",children:[b,t.jsx("button",{className:"linkbtn","aria-label":`Stop allowing ${b}`,title:`Stop allowing ${b}`,disabled:e.isPending,onClick:()=>k(b),children:t.jsx(Ve,{size:12})})]},b))}),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:p,placeholder:"~/shared","aria-label":`A path to ${h}`,onChange:b=>x(b.target.value),onKeyDown:b=>b.key==="Enter"&&j()}),t.jsx("button",{className:"btn sm",disabled:!p.trim()||e.isPending,onClick:j,children:"Allow"})]}),t.jsx(te,{text:`squad config set allow-${h} ${[...m,p.trim()].filter(Boolean).join(" ")||"~/shared"}`})]})]})};return t.jsxs(t.Fragment,{children:[u("read",s.allowRead,r,i),u("write",s.allowWrite,o,l)]})}const Z4=e=>e==="."?"The project folder":e??"";function eO(e){return{name:e.name,shared:!!e.shared,repo:e.repo??"",folder:e.folder??"",url:e.url??"",needs:e.needs,off:!!e.off}}function X4({form:e,set:n,others:s,repos:r,isNew:i}){return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"maprow part-f",children:[t.jsx("b",{children:"Name"}),t.jsx("input",{className:"input","aria-label":"Name",dir:ge(e.name),value:e.name,placeholder:"Web app",onChange:o=>n({...e,name:o.target.value})})]}),i&&t.jsxs("div",{className:"maprow part-f",children:[t.jsx("b",{children:"Kind"}),t.jsxs("div",{className:"seg",style:{justifySelf:"start"},children:[t.jsx("button",{className:e.shared?"":"on",onClick:()=>n({...e,shared:!1}),children:"A part that runs by itself"}),t.jsx("button",{className:e.shared?"on":"",onClick:()=>n({...e,shared:!0}),children:"A service the parts share"})]})]}),!e.shared&&t.jsxs("div",{className:"maprow part-f",children:[t.jsx("b",{children:"Where"}),t.jsxs("div",{className:"part-where",children:[t.jsxs("select",{className:"input mono","aria-label":"Repo",value:e.repo,onChange:o=>n({...e,repo:o.target.value}),children:[!e.repo&&t.jsx("option",{value:"",children:"Pick a repo"}),r.map(o=>t.jsx("option",{value:o,children:Z4(o)},o))]}),t.jsx("input",{className:"input mono","aria-label":"Folder inside the repo",value:e.folder,placeholder:"Folder inside it, if any",onChange:o=>n({...e,folder:o.target.value})})]})]}),t.jsxs("div",{className:"maprow part-f",children:[t.jsx("b",{children:"Address"}),t.jsx("input",{className:"input mono","aria-label":"Address",value:e.url,placeholder:"http://localhost:5180",onChange:o=>n({...e,url:o.target.value})})]}),t.jsxs("div",{className:"maprow part-f",children:[t.jsx("b",{children:"Cannot run without"}),t.jsxs("div",{className:"part-needs",children:[s.length===0&&t.jsx("span",{className:"note",children:"Nothing else yet."}),s.map(o=>t.jsxs("label",{children:[t.jsx("input",{type:"checkbox",checked:e.needs.includes(o.id),onChange:l=>n({...e,needs:l.target.checked?[...e.needs,o.id]:e.needs.filter(d=>d!==o.id)})}),o.name]},o.id))]})]}),!i&&t.jsxs("div",{className:"maprow part-f",children:[t.jsx("b",{children:"Not used"}),t.jsxs("label",{className:"part-off",children:[t.jsx("input",{type:"checkbox",checked:e.off,onChange:o=>n({...e,off:o.target.checked})}),"No story starts it, like an old app or another product in this folder"]})]})]})}function tO({part:e,view:n}){const s=oe(),[r,i]=C.useState(null),o=n.parts.filter(h=>h.id!==e.id&&(!h.off||e.needs.includes(h.id))),l=e.needs.map(h=>n.parts.find(m=>m.id===h)?.name??h),d=e.shared?"Shared by the parts":[Z4(e.repo),e.folder].filter(Boolean).join(" / "),u=()=>s.mutate({path:`/api/v1/parts/${encodeURIComponent(e.id)}`,method:"PUT",body:r,done:`Saved ${r.name}`},{onSuccess:()=>i(null)});return t.jsxs("div",{className:`part-row ${e.off?"off":""}`,children:[t.jsxs("div",{className:"part-head",children:[t.jsxs("div",{className:"grow",children:[t.jsx(L,{as:"b",text:e.name}),e.off&&t.jsx("span",{className:"pill sm",style:{marginLeft:8},children:"Not used"}),e.noRun&&!e.off&&t.jsx("span",{className:"pill sm",style:{marginLeft:8},children:"Nothing starts here"}),t.jsx("div",{className:"note",children:[d,e.url,l.length>0?`Needs ${l.join(", ")}`:""].filter(Boolean).join(" · ")})]}),!r&&t.jsx("button",{className:"btn sm",onClick:()=>i(eO(e)),children:"Correct"})]}),r&&t.jsxs("div",{className:"part-form",children:[t.jsx(X4,{form:r,set:i,others:o,repos:n.repos,isNew:!1}),t.jsxs("div",{className:"part-acts",children:[t.jsx("button",{className:"btn pri sm",disabled:s.isPending,onClick:u,children:"Save"}),t.jsx("button",{className:"btn sm",onClick:()=>i(null),children:"Cancel"}),t.jsx("span",{className:"grow"}),e.byHand&&t.jsx("button",{className:"btn sm",disabled:s.isPending,onClick:()=>s.mutate({path:`/api/v1/parts/${encodeURIComponent(e.id)}/remove`,done:`Took out ${e.name}`},{onSuccess:()=>i(null)}),children:"Take it out"})]})]})]})}function nO({view:e}){const n=oe(),s={name:"",shared:!1,repo:e.repos.length===1?e.repos[0]:"",folder:"",url:"",needs:[],off:!1},[r,i]=C.useState(null);return r?t.jsx("div",{className:"part-row",children:t.jsxs("div",{className:"part-form",children:[t.jsx(X4,{form:r,set:i,others:e.parts.filter(o=>!o.off),repos:e.repos,isNew:!0}),t.jsxs("div",{className:"part-acts",children:[t.jsx("button",{className:"btn pri sm",disabled:n.isPending,onClick:()=>n.mutate({path:"/api/v1/parts",body:r,done:`Added ${r.name}`},{onSuccess:()=>i(null)}),children:"Add it"}),t.jsx("button",{className:"btn sm",onClick:()=>i(null),children:"Cancel"})]})]})}):t.jsx("button",{className:"btn sm",onClick:()=>i(s),children:"Add a part"})}function sO(){const e=Ue(),n=oe(),s=e.data?.ready?e.data.meta.atOnce:void 0,r=i=>n.mutate({path:"/api/v1/settings",method:"PUT",body:{atOnce:i},done:i?`${i===1?"One story":`${i} stories`} of this project run at once`:"This project follows the limit every project shares"});return t.jsxs("div",{className:"maprow part-f",style:{marginTop:10},children:[t.jsx("b",{children:"Stories at once"}),t.jsxs("div",{className:"seg",style:{justifySelf:"start"},children:[t.jsx("button",{className:s===void 0?"on":"",onClick:()=>r(null),children:"As for all projects"}),[1,2,3].map(i=>t.jsx("button",{className:s===i?"on":"",onClick:()=>r(i),children:i},i))]})]})}function rO(){const e=Ue(),n=oe(),s=e.data?.ready?e.data.meta.delivery:void 0,r=(i,o)=>n.mutate({path:"/api/v1/settings",method:"PUT",body:{delivery:i},done:o});return t.jsxs("div",{className:"maprow part-f",children:[t.jsx("b",{children:"How work goes out"}),t.jsxs("div",{className:"seg",style:{justifySelf:"start"},children:[t.jsx("button",{className:s===void 0?"on":"",onClick:()=>r(null,"Finished work goes out by pull request when a code host is signed in"),children:"Pull request if signed in"}),t.jsx("button",{className:s==="push"?"on":"",onClick:()=>r("push","Finished work goes out pushed to the branch, as one plain commit per story"),children:"Push, one plain commit"})]})]})}function iO(){const n=we({queryKey:["parts"],queryFn:()=>ke("/api/v1/parts")}).data;return n?.several?t.jsxs("div",{style:{marginBottom:26},children:[t.jsx("h2",{style:{marginTop:6},children:"What the product is made of"}),t.jsx("p",{className:"note",style:{margin:"2px 0 10px"},children:"For engineers. The Architect found these when it read the project, and a new read keeps what you correct here. A story only starts the parts it needs."}),n.parts.map(s=>t.jsx(tO,{part:s,view:n},s.id)),t.jsxs("div",{className:"part-add",children:[t.jsx(nO,{view:n}),t.jsx(te,{text:"squad parts"})]}),t.jsx(sO,{}),t.jsx(rO,{})]}):null}const No="/api/v1/project-files";function J4({f:e,many:n,children:s}){const r=oe();return t.jsx("div",{className:"part-row",children:t.jsxs("div",{className:"part-head",children:[t.jsxs("div",{className:"grow",children:[t.jsx("b",{className:"mono",style:{fontSize:13},children:n?`${e.repo}/${e.path}`:e.path}),s]}),t.jsx("button",{className:"btn sm",disabled:r.isPending,onClick:()=>r.mutate({path:`${No}/remove`,body:e,done:`${e.path} is off the list`}),children:"Take it off"})]})})}function aO({f:e,many:n}){const s=oe();return t.jsxs(J4,{f:e,many:n,children:[e.ready?t.jsx("span",{className:"pill ok sm",style:{marginLeft:8},children:"Ready"}):t.jsx("span",{className:"pill you sm",style:{marginLeft:8},children:"No values for stories yet"}),t.jsxs("div",{className:"note",children:[e.ready?"Stories use the file at ":"Stories need their own values, in a file at ",t.jsx("span",{className:"mono",children:e.storyFile})]}),!e.ready&&e.inFolder&&t.jsx("button",{className:"linkbtn",style:{marginTop:4},disabled:s.isPending,onClick:()=>s.mutate({path:`${No}/use-mine`,body:e,done:"Copied. Change any real values in it to test values"}),children:"Start from the one in my folder"})]})}function oO(){const e=we({queryKey:["project-files"],queryFn:()=>ke(No)}),n=oe(),[s,r]=C.useState(""),[i,o]=C.useState(""),l=e.data;if(!l)return null;const d=l.repos.length>1,u={repo:i||(d?"":l.repos[0]),path:s},h=m=>n.mutate({path:`${No}/${m}`,body:u,done:`Added ${s}`},{onSuccess:()=>r("")});return t.jsxs("div",{style:{marginBottom:26},children:[t.jsx("h2",{style:{marginTop:6},children:"Files agents may not touch"}),t.jsxs("p",{className:"note",style:{margin:"2px 0 10px"},children:["For engineers. ",t.jsx("b",{children:"Local files"})," are files git does not carry, like .env.dev. squad-kit puts them in each story's copy for the project's own tests and app, and no agent can read them. A test could still read and send what is in them, so give stories local test values, never real ones. ",t.jsx("b",{children:"Locked files"})," are in git: agents can read them and never change them."]}),l.local.map(m=>t.jsx(aO,{f:m,many:d},`${m.repo}/${m.path}`)),l.locked.map(m=>t.jsx(J4,{f:m,many:d,children:t.jsx("span",{className:"pill sm",style:{marginLeft:8},children:"Locked"})},`${m.repo}/${m.path}`)),t.jsxs("div",{className:"part-file-add",children:[d&&t.jsxs("select",{className:"input mono","aria-label":"Repo",value:i,onChange:m=>o(m.target.value),children:[t.jsx("option",{value:"",children:"Pick a repo"}),l.repos.map(m=>t.jsx("option",{value:m,children:m},m))]}),t.jsx("input",{className:"input mono","aria-label":"File",value:s,placeholder:".env.dev",onChange:m=>r(m.target.value)}),t.jsx("button",{className:"btn sm",disabled:!s.trim()||n.isPending,onClick:()=>h("local"),children:"Add as local"}),t.jsx("button",{className:"btn sm",disabled:!s.trim()||n.isPending,onClick:()=>h("locked"),children:"Lock it"})]}),t.jsxs("div",{className:"part-add",children:[l.docker.length>0?t.jsxs("button",{className:"btn sm",disabled:n.isPending,onClick:()=>n.mutate({path:`${No}/lock-docker`,done:"Locked the Docker files"}),children:["Lock ",l.docker.length===1?"the Docker file":`the ${l.docker.length} Docker files`]}):t.jsx("span",{}),t.jsx(te,{text:"squad files"})]})]})}const Qr="/api/v1/database";function e3(){return we({queryKey:["database"],queryFn:()=>ke(Qr),refetchInterval:e=>e.state.data?.making?3e3:3e4})}function lO(e){return e<1024*1024?`${Math.max(1,Math.round(e/1024))} KB`:`${(e/1024/1024).toFixed(1)} MB`}function cO(e){return e.key&&e.file?`${e.key} in ${e.file}${e.env?` (or ${e.env})`:""}`:e.env?`${e.env}${e.file?` in ${e.file}`:""}`:"Not known yet"}function dO({v:e,done:n}){const s=oe(),[r,i]=C.useState({kind:e.kind,name:"",env:"",file:"",key:"",address:""}),o=d=>u=>i({...r,[d]:u.target.value}),l=Object.fromEntries(Object.entries(r).filter(([d,u])=>u.trim()&&(d!=="kind"||u!==e.kind)));return t.jsxs("div",{className:"part-file-add",style:{flexWrap:"wrap"},children:[t.jsx("select",{className:"input mono","aria-label":"Kind",value:r.kind,onChange:o("kind"),children:["postgres","mysql","mongo","sqlite"].map(d=>t.jsx("option",{value:d,children:d},d))}),t.jsx("input",{className:"input mono","aria-label":"Name",value:r.name,placeholder:e.name??"name",onChange:o("name")}),t.jsx("input",{className:"input mono","aria-label":"Setting name",value:r.env,placeholder:e.setting.env??"DATABASE_URL",onChange:o("env")}),t.jsx("input",{className:"input mono","aria-label":"Settings file",value:r.file,placeholder:e.setting.file??".env",onChange:o("file")}),t.jsx("input",{className:"input mono","aria-label":"Key in the file",value:r.key,placeholder:e.setting.key??"key in the file",onChange:o("key")}),t.jsx("input",{className:"input mono",type:"password",autoComplete:"off","aria-label":"Address",value:r.address,placeholder:"Address your copy uses",onChange:o("address")}),t.jsx("button",{className:"btn sm pri",disabled:s.isPending,onClick:()=>s.mutate({path:`${Qr}/confirm`,body:l,done:"Confirmed"},{onSuccess:n}),children:"Confirm these"})]})}function Sj({redis:e}){return t.jsxs("div",{className:"maprow",children:[t.jsx("b",{children:"Redis"}),t.jsxs("span",{children:[t.jsx("span",{className:"mono",style:{fontSize:13},children:e.server}),t.jsx("span",{className:"note",style:{display:"block"},children:e.words}),e.stories.length>0&&t.jsx("span",{className:"note",style:{display:"block"},children:e.stories.map(n=>`${n.story}: ${n.number}`).join(" · ")})]})]})}function t3(){const e=e3(),n=oe(),[s,r]=C.useState(!1),[i,o]=C.useState(""),l=e.data;if(!l?.words)return null;const d=l.database,u=t.jsx("button",{className:"btn sm",disabled:n.isPending,onClick:()=>n.mutate({path:`${Qr}/find`,done:"Looked again"}),children:"Find it again"});if(!d)return t.jsxs("div",{children:[t.jsxs("span",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[t.jsx("span",{className:"note",children:l.words}),u,t.jsx(te,{text:"squad db"})]}),l.redis&&t.jsx(Sj,{redis:l.redis})]});const h=l.template?.tables.filter(m=>m.kept==="sampled").length??0;return t.jsxs("div",{children:[t.jsxs("div",{className:"maprow",children:[t.jsx("b",{children:"Database"}),t.jsxs("span",{children:[d.kindName,d.name?t.jsxs("span",{className:"mono",children:[" ",d.name]}):null,d.confirmed?t.jsxs("span",{className:"pill ok sm",style:{marginLeft:8},children:["Confirmed by ",d.confirmed.by]}):t.jsx("span",{className:"pill you sm",style:{marginLeft:8},children:"Not confirmed yet"}),d.where&&t.jsx("span",{className:"note",style:{display:"block"},children:d.where}),d.from?.length?t.jsxs("span",{className:"note",style:{display:"block"},children:["Learned from ",t.jsx("span",{className:"mono",children:d.from.join(", ")})]}):null]})]}),l.redis&&t.jsx(Sj,{redis:l.redis}),t.jsxs("div",{className:"maprow",children:[t.jsx("b",{children:"Setting"}),t.jsx("span",{className:"mono",style:{fontSize:13},children:cO(d.setting)})]}),t.jsxs("div",{className:"maprow",children:[t.jsx("b",{children:"Address"}),t.jsxs("span",{children:[t.jsx("span",{className:"mono",style:{fontSize:13},children:d.address??"Not known yet"}),d.secret&&t.jsx("span",{className:"note",children:" · kept on this computer only"})]})]}),t.jsxs("div",{style:{display:"flex",gap:8,margin:"10px 0",flexWrap:"wrap",alignItems:"center"},children:[!d.confirmed&&t.jsx("button",{className:"btn sm pri",disabled:n.isPending,onClick:()=>n.mutate({path:`${Qr}/confirm`,done:"Confirmed"}),children:"Confirm it"}),t.jsx("button",{className:"btn sm",onClick:()=>r(!s),children:s?"Close":"Correct it"}),u,t.jsx("span",{className:"grow"}),t.jsx(te,{text:"squad db confirm"})]}),s&&t.jsx(dO,{v:d,done:()=>r(!1)}),t.jsxs("div",{className:"maprow",children:[t.jsx("b",{children:"Template"}),t.jsxs("span",{style:{display:"flex",flexDirection:"column",gap:6},children:[l.making?t.jsxs("span",{className:"note",children:["Being made, since ",Je(l.making.since),". It only reads your database."]}):l.template?t.jsxs("span",{children:[lO(l.template.bytes),", made ",Je(l.template.madeAt)," · ",l.template.tables.length," tables",h?`, ${h} sampled`:"",l.template.hidePersonal?", personal data hidden":""]}):t.jsx("span",{className:"note",children:"None yet. Stories use the database as before until there is one."}),l.failed&&!l.making&&t.jsxs("span",{className:"note",children:["The last one was not made: ",l.failed.text]}),l.missing.length>0&&t.jsxs("span",{className:"note",children:["This computer has no ",l.missing.join(", "),"."]}),l.blocked&&t.jsx("span",{className:"note",children:l.blocked}),t.jsxs("span",{style:{display:"flex",gap:8,alignItems:"center"},children:[t.jsx("button",{className:"btn sm",disabled:n.isPending||!!l.making||!d.confirmed,onClick:()=>n.mutate({path:`${Qr}/template`,done:"Making the template"}),children:l.template?"Make it again":"Make the template"}),t.jsx(te,{text:"squad db template"})]})]})]}),t.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[t.jsx("b",{children:"Hide personal data"}),t.jsxs("span",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[t.jsx("button",{className:`btn sm ${d.hidePersonal?"pri":""}`,"aria-pressed":!!d.hidePersonal,disabled:n.isPending,onClick:()=>n.mutate({path:Qr,method:"PUT",body:{hidePersonal:!d.hidePersonal},done:d.hidePersonal?"Off, from the next template":"On, from the next template"}),children:d.hidePersonal?"On":"Off"}),t.jsx("span",{className:"note",children:"Names, ID numbers, phones, emails and addresses become fake in the template."}),t.jsx(te,{text:`squad config set db-hide ${d.hidePersonal?"off":"on"}`})]})]}),t.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[t.jsx("b",{children:"Sample size"}),t.jsxs("span",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[t.jsx("input",{className:"input mono",style:{width:110},"aria-label":"Rows",inputMode:"numeric",value:i,placeholder:String(d.sampleRows??1e3),onChange:m=>o(m.target.value)}),t.jsx("button",{className:"btn sm",disabled:!i.trim()||n.isPending,onClick:()=>n.mutate({path:Qr,method:"PUT",body:{sampleRows:Number(i)},done:"Saved, from the next template"},{onSuccess:()=>o("")}),children:"Save"}),t.jsx("span",{className:"note",children:"rows of each big table, the newest. Small tables are kept whole."})]})]}),t.jsxs("div",{className:"maprow",children:[t.jsx("b",{children:"Story databases now"}),t.jsx("span",{children:l.stories.length?l.stories.map(m=>t.jsxs("span",{style:{display:"block"},children:[t.jsx("b",{children:m.story})," ",t.jsx("span",{className:"mono",style:{fontSize:13},children:m.name})," ",t.jsx("span",{className:"note",children:Je(m.at)})]},m.story)):t.jsx("span",{className:"note",children:"None"})})]}),l.notes.length>0&&t.jsxs("div",{className:"maprow",children:[t.jsx("b",{children:"Notes"}),t.jsx("span",{children:l.notes.slice(0,5).map(m=>t.jsxs("span",{className:"note",style:{display:"block"},children:[Je(m.at),": ",m.text]},`${m.at}${m.text}`))})]})]})}function uO(){const e=e3().data;return e?.words?t.jsxs("span",{style:{display:"flex",flexDirection:"column",gap:6},children:[t.jsx("span",{className:"note",children:e.words}),t.jsxs("details",{children:[t.jsx("summary",{className:"note",children:"For engineers"}),t.jsx("div",{style:{marginTop:6},children:t.jsx(t3,{})})]})]}):null}function hO(){return t.jsxs("div",{style:{marginBottom:26},children:[t.jsx("h2",{style:{marginTop:6},children:"Each story's own database"}),t.jsx("p",{className:"note",style:{margin:"2px 0 10px"},children:"For engineers. squad-kit learns the project's database from its files. Once you confirm it and make a template, each story gets its own copy of the database on the same server, and its copy of the code points at it. It goes when the story is merged, released or deleted. Your own database is only read, to make the template."}),t.jsx(t3,{})]})}function pO(){const e=Ue(),n=e.data?.ready?e.data.tickets.filter(ul):[],s=iu();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(te,{text:"squad inbox"})]}),t.jsx("div",{className:"scroll",children:t.jsx("div",{className:"page",children:e.isError&&!e.data?t.jsx(Er,{what:"what waits for you",error:e.error,onRetry:()=>void e.refetch()}):n.length+s.length===0?t.jsxs("div",{className:"calm",children:[t.jsx("span",{className:"ring",children:t.jsx(fe,{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(Rw,{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(Iw,{t:r}),t.jsx("span",{children:Zs[r.stage]}),t.jsx("span",{children:Je(r.activity[0]?.at??r.createdAt)})]}),t.jsx(L,{as:"h3",text:r.title}),t.jsx(L,{as:"p",text:g1(r)&&r.agentQuestion?`“${r.agentQuestion.text}”`:r.waiting?.summary??(Gs(r)?`Change ${mi(r).id} to the spec waits for you`:As(r)?Pm(r):r.outdated?.length?$m(r):`Looks stuck: ${r.quiet?.detail??"no progress"}`)})]}),t.jsx(te,{text:!r.waiting&&Gs(r)?`squad propose ${r.id} --approve`:!r.waiting&&As(r)?`squad test-command ${r.id} --use`:Cm(r)}),t.jsx(A1,{t:r,problem:r.waiting?.kind==="stuck"?"error":!r.waiting&&r.quiet?r.quiet.kind==="long"?"slow":"stuck":"waiting",className:"btn sm"}),r.waiting?.kind==="proof"?t.jsx(xe,{to:"/tickets/$id/proof",params:{id:r.id},className:"btn pri sm",children:jd(r)}):t.jsx(xe,{to:"/board",search:{ticket:r.id},className:"btn pri sm",children:r.waiting?jd(r):Gs(r)?"Check the change":"Check it"})]},r.id))]})})})]})}function fO(){const e=Ue(),[n,s]=C.useState(!1),r=e.data?.ready?e.data.tickets.filter(i=>i.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(te,{text:'squad bug "What happened"'}),t.jsxs("button",{className:"btn pri",onClick:()=>s(!0),children:[t.jsx(Qs,{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(i=>t.jsxs("tr",{children:[t.jsx("td",{className:"mono",children:i.id}),t.jsx("td",{...De(i.title),children:t.jsx(xe,{to:"/board",search:{ticket:i.id},style:{fontWeight:600},children:t.jsx(Gt,{text:i.title,dir:De(i.title).dir})})}),t.jsx("td",{children:i.foundIn??""}),t.jsx("td",{children:Zs[i.stage]}),t.jsx("td",{style:{color:i.waiting?"var(--you-ink)":"var(--muted)"},...De(i.waiting?.summary??i.status),children:t.jsx(Gt,{text:i.waiting?.summary??i.status,dir:De(i.waiting?.summary??i.status).dir})})]},i.id))})]})]})}),n&&t.jsx(h1,{onClose:()=>s(!1)})]})}const mO=[{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:"envFile",label:"Env file",hint:"Settings the app reads on this computer, e.g. .env.dev"},{key:"deploy",label:"After a release",hint:"Runs after a release, e.g. az pipelines run …"}];function gO(){const e=Ue(),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(iO,{}),t.jsx(oO,{}),n.engine==="live"&&t.jsx(hO,{}),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 project has several code folders; each ticket works in one of them."]}),t.jsx(CO,{always:!!n.alwaysNewTests}),t.jsx($O,{phone:n.phone}),s.map(i=>t.jsx(xO,{repo:i,multi:r},i.path)),t.jsx(TO,{})]})}function xO({repo:e,multi:n}){const s=oe(),[r,i]=C.useState(null),[o,l]=C.useState(null),d=r??e.commands,u=o??{base:e.base,remote:e.remote},h=()=>{const m=n?{repos:[{path:e.path,...u,commands:d}]}:{commands:d,git:u};s.mutate({path:"/api/v1/settings",method:"PUT",body:m,done:"Settings saved"},{onSuccess:()=>{i(null),l(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(L,{className:"note",style:{fontFamily:"inherit",marginLeft:8},text:e.summary})]}),mO.map(m=>{const p=t.jsx("input",{className:"input mono",style:{fontSize:13},value:d[m.key]??"",placeholder:m.hint,onChange:x=>i({...d,[m.key]:x.target.value})});return t.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[t.jsx("b",{children:m.label}),m.key==="start"?t.jsxs("div",{children:[p,t.jsx(jO,{repo:e.path,command:d.start})]}):m.key==="envFile"?t.jsxs("div",{children:[p,t.jsx(yO,{repo:n?e.path:void 0,file:d.envFile})]}):p]},m.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:u.base,onChange:m=>l({...u,base:m.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:u.remote,placeholder:"origin (empty: no push)",onChange:m=>l({...u,remote:m.target.value})})]}),t.jsx("div",{style:{marginTop:12},children:t.jsxs("button",{className:"btn pri sm",disabled:!r&&!o,onClick:h,children:["Save",n?` ${e.path}`:""]})})]})}function yO({repo:e,file:n}){return t.jsxs("p",{className:"note",style:{margin:"6px 0 0",display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[t.jsx("span",{children:"squad-kit gives its values to every command it runs for this part on this computer, then its own database, Redis and port on top. A file git does not carry needs values for stories: add it under Local files."}),t.jsx(te,{text:`squad config set env-file ${n?.trim()||".env.dev"}${e?` --repo ${e}`:""}`})]})}function jO({repo:e,command:n}){const s=n?.trim()??"",[r,i]=C.useState(s);C.useEffect(()=>{const d=setTimeout(()=>i(s),300);return()=>clearTimeout(d)},[s]);const o=we({queryKey:["start-note",e,r],queryFn:()=>ke(`/api/v1/settings/start?repo=${encodeURIComponent(e)}&command=${encodeURIComponent(r)}`),enabled:!!r,placeholderData:d=>d}),l=s&&r?o.data?.note:null;return l?t.jsx("p",{className:"note",style:{margin:"6px 0 0"},children:l}):null}function kO(){const e=oe(),n=we({queryKey:["tracker"],queryFn:()=>ke("/api/v1/tracker"),refetchInterval:6e4}),[s,r]=C.useState(null),i=n.data,o=s??{organization:i?.organization??"",project:i?.project??"",token:""},l=i?.type==="azure"&&i.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."}),i&&t.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[t.jsx("b",{children:"Status"}),t.jsx("span",{children:l?t.jsxs("span",{className:"pill ok",children:["Connected as ",i.user]}):i.type==="azure"?t.jsx("span",{className:"pill bug",children:i.error??(i.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:d=>r({...o,organization:d.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:d=>r({...o,project:d.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:i?.hasToken?"Saved. Paste a new one to replace it":"Personal access token from Azure DevOps",onChange:d=>r({...o,token:d.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(te,{text:"squad config set tracker"})]})]})}function vO(){const e=oe(),n=we({queryKey:["speech"],queryFn:()=>ke("/api/v1/speech")}),[s,r]=C.useState(""),i=n.data?.hasKey,o=n.data?.video!==!1,l=(d,u)=>e.mutate({path:"/api/v1/speech",method:"PUT",body:d,done:h=>h.unchecked?"Saved. squad-kit could not reach Munsit to check the key, so it finds out with the first note.":u},{onSuccess:()=>{r(""),n.refetch()}});return t.jsxs("div",{style:{marginBottom:26},children:[t.jsx("h2",{style:{marginTop:6},children:"Speech to text"}),t.jsxs("p",{className:"note",style:{margin:"2px 0 10px"},children:[o?"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.":"Agents cannot listen. With a Munsit key, squad-kit writes out every voice note you attach, in Arabic or English. Video notes need a Mac: on this computer they stay attached, and nobody hears them."," ","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:i?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:i?"Saved. Paste a new one to replace it":"API key from munsit.com",onChange:d=>r(d.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:()=>l({munsit:s},"Munsit is set up"),children:"Save"}),i&&t.jsx("button",{className:"btn sm",disabled:e.isPending,onClick:()=>l({remove:!0},"Munsit key removed"),children:"Remove"})]})]})}function bO(){const{restarting:e,restart:n}=cv();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(te,{text:"squad console --restart"})]})]})}function wO(){const e=Ue(),n=oe(),s=e.data?.ready?e.data.meta:void 0;if(!s)return null;const r=s.runner??"acp",i=(o,l)=>n.mutate({path:"/api/v1/settings",method:"PUT",body:{runner:o},done:l});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:()=>i("acp","The squad talks to Claude the usual way"),children:"The usual way"}),t.jsx("button",{className:`btn sm ${r==="direct"?"pri":""}`,onClick:()=>i("direct","The squad runs Claude Code directly"),children:"Directly"}),t.jsx("span",{className:"note",style:{marginLeft:6},children:"Leave this on The usual way. If that cannot start, a step runs Claude Code directly by itself."})]})]})}function NO(){const e=lv(),n=oe(),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,i)=>i+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 SO({on:e,locked:n}){const s=oe();return n?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",disabled:!0,children:"Off"}),t.jsx("span",{className:"note",children:n})]})]}):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:()=>s.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 CO({always:e}){const n=oe();return t.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[t.jsx("b",{children:"New tests"}),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:{alwaysNewTests:!e},done:e?"Each new story can be built without new tests again":"Every new story writes new tests now"}),children:e?"Always: let each story choose":"Each story chooses: make it always"}),t.jsxs("span",{className:"note",children:[e?'Every story writes new tests, so the new story form has no "Write new tests" switch.':'The new story form has a "Write new tests" switch, on by default. Turned off, the Builder writes no new tests; the checks, the review and the proof still run.'," ","Saved in the project's settings, for the whole team."]}),t.jsx(te,{text:`squad config set new-tests ${e?"switch":"always"}`})]})]})}function $O({phone:e}){const n=oe(),s=e??"auto",r=[{id:"auto",label:"Automatic"},{id:"iphone",label:"iPhone"},{id:"android",label:"Android"}];return t.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[t.jsx("b",{children:"Phone for pictures"}),t.jsxs("span",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[t.jsx("span",{className:"seg",role:"radiogroup","aria-label":"Phone for pictures",children:r.map(i=>t.jsx("button",{role:"radio","aria-checked":s===i.id,className:s===i.id?"on":"",onClick:()=>s!==i.id&&n.mutate({path:"/api/v1/settings",method:"PUT",body:{phone:i.id},done:`Phone for pictures: ${i.label}`}),children:i.label},i.id))}),t.jsx("span",{className:"note",children:"For an app that builds for both iPhone and Android. Automatic uses the iPhone on a Mac when its tools are ready, else Android; a computer that is not a Mac always uses Android. Saved in the project's settings, for the whole team."}),t.jsx(te,{text:`squad config set phone ${s==="auto"?"android":s==="android"?"iphone":"auto"}`})]})]})}function TO(){const e=oe();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 EO(){const e=Ue(),{theme:n,toggleTheme:s,showCommands:r,toggleCommands:i}=qe(),o=oe(),[l,d]=C.useState(!1),u=e.data?.ready?e.data.meta:void 0,h=e.data?.ready?e.data.self: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:i,children:r?"Hide them":"Show them"}),t.jsx("span",{className:"note",children:"Every button shows the command that does the same thing."})]})]}),t.jsx(Cz,{}),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."]})]}),u?.engine==="live"&&t.jsx(SO,{on:u.documentsInGit!==!1,...h?.docs?{locked:h.docs}:{}}),t.jsx(bO,{}),u?.engine==="live"&&t.jsx(NO,{}),u?.engine==="live"&&t.jsx(wO,{}),u?.engine==="live"&&t.jsx(JM,{}),u?.engine==="live"&&t.jsx(kO,{}),u?.engine==="live"&&t.jsx(vO,{}),u?.engine==="live"&&t.jsx(gO,{}),u?.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:()=>d(!0),children:[t.jsx(oi,{size:13})," Start the demo over"]}),t.jsxs("span",{className:"note",children:["The squad plays back a recorded run at ",u.speed,"x speed."]})]})]}),u&&t.jsx(Zz,{}),t.jsx("h2",{style:{marginTop:26},children:"About squad-kit"}),t.jsx(pv,{}),t.jsx(HI,{})]})}),l&&t.jsx(We,{title:"Start the demo over?",onClose:()=>d(!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:()=>d(!1)}),children:[t.jsx(oi,{size:15})," Start over"]}),t.jsx("button",{className:"btn",onClick:()=>d(!1),children:"Cancel"}),t.jsx("span",{className:"grow"}),t.jsx(te,{text:"squad demo"})]}),children:t.jsx("p",{children:"Every ticket, release and decision goes back to how the demo starts."})})]})}function H1(e=""){const[n,s]=C.useState(e),r=we({queryKey:["app","folders",n],queryFn:()=>ke(`/api/v1/app/folders${n?`?path=${encodeURIComponent(n)}`:""}`)});return{at:n,setAt:s,listing:r}}function AO(e){return we({queryKey:["app","folders","look",e?.path],queryFn:()=>ke(`/api/v1/app/folders/look?path=${encodeURIComponent(e.path)}`),enabled:!!e?.canAdd,retry:!1})}function PO(e){const n=e.split("/").filter(Boolean);return[{name:"/",path:"/"},...n.map((s,r)=>({name:s,path:`/${n.slice(0,r+1).join("/")}`}))]}function V1({at:e,go:n,listing:s,onError:r}){const[i,o]=C.useState(null),[l,d]=C.useState(!1),u=s.data,h=j=>j.replace(/[/\\][^/\\]+[/\\]?$/,"")||"/",m=u?.parent??(s.isError&&e?h(e):null),p=j=>{o(null),n(j)},x=async()=>{if(!(!u||!i?.trim()||l)){d(!0);try{const j=await ot("/api/v1/app/folders","POST",{parent:u.path,name:i.trim()});p(j.path)}catch(j){r(j instanceof Error?j.message:String(j))}finally{d(!1)}}},y=u?PO(u.path):[];return t.jsxs(t.Fragment,{children:[u&&t.jsx("div",{className:"places",children:u.places.map(j=>t.jsx("button",{className:`btn sm ${j.path===u.path?"pri":""}`,onClick:()=>p(j.path),children:j.name},j.path))}),t.jsxs("div",{className:"fb",children:[t.jsxs("div",{className:"fb-bar",children:[t.jsx("button",{className:"iconbtn",disabled:!m,onClick:()=>m&&p(m),"aria-label":"Up one folder",title:"Up one folder",children:t.jsx(l7,{size:15})}),t.jsx("span",{className:"crumbs mono",children:y.map((j,k)=>t.jsxs("span",{children:[k>0&&t.jsx(Bd,{size:12}),t.jsx("button",{onClick:()=>p(j.path),children:j.name})]},j.path))})]}),t.jsxs("div",{className:"fb-list",role:"list",children:[s.isError&&t.jsx("p",{className:"note bad",children:s.error.message}),u&&u.folders.length===0&&t.jsx("p",{className:"note",children:"No folders inside."}),u?.folders.map(j=>t.jsxs("button",{role:"listitem",className:"fb-row",onClick:()=>p(j.path),children:[j.kind==="project"?t.jsx(d7,{size:16}):j.kind==="repo"?t.jsx(u7,{size:16}):t.jsx(h7,{size:16}),t.jsx("span",{className:"nm",children:j.name}),j.kind==="project"&&t.jsx("span",{className:"pill ok sm",children:"squad-kit project"}),j.kind==="repo"&&t.jsx("span",{className:"pill sm",children:"code"})]},j.path))]}),t.jsx("div",{className:"fb-new",children:i===null?t.jsxs("button",{className:"btn sm",disabled:!u,onClick:()=>o(""),children:[t.jsx(hf,{size:14})," New folder here"]}):t.jsxs(t.Fragment,{children:[t.jsx("input",{className:"input",autoFocus:!0,dir:ge(i),placeholder:"Name of the new folder",value:i,onChange:j=>o(j.target.value),onKeyDown:j=>j.key==="Enter"&&void x()}),t.jsx("button",{className:"btn sm pri",disabled:!i.trim()||l,onClick:()=>void x(),children:"Make it"}),t.jsx("button",{className:"btn sm",onClick:()=>o(null),children:"Cancel"})]})})]})]})}const Id={all:"All agents",analyst:"Analyst",architect:"Architect",builder:"Builder",reviewer:"Reviewer",tester:"Tester"},n3={checks:"With the checks",merge:"Before merge",release:"Before release"},RO={checks:"with the checks",merge:"before merge",release:"before release"},K1="It applies from the next step of every story.",s3="On this computer it runs without the guard, as your project's own checks do.",Cj={try:"Try first",on:"On",off:"Off"},IO=/\b(commit|push|pull request|merge request|gh pr)\b/i;function FO(e){return e.kind==="rule"?`Rule, for ${e.agents?.includes("all")?"all agents":`the ${e.agents?.map(n=>Id[n]??n).join(" and ")}`}`:e.kind==="checklist"?`Checklist, for the ${Id[e.agent??"reviewer"]}`:`Gate, ${RO[e.when??"checks"]}${e.on_fail==="warn"?", warn only":""}`}function zO(e){const n=`the ${e.kind} "${hs(e.name)}"`;return e.did==="added"?`added ${n}${e.from?`, from the folder ${hs(e.from)}`:""}`:e.did==="removed"?`removed ${n}`:e.did==="tried"?`tried ${n} again`:e.did==="off"?`turned off ${n}`:e.did==="on"?`turned on ${n}`:`set ${n} to Try first`}const $j=8;function qO({view:e}){const[n,s]=C.useState(!1),[r,i]=C.useState(!1),o=e.additions;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"hn-addhead",children:[t.jsxs("div",{children:[t.jsx("h2",{className:"hn-title",children:"What your team added"}),t.jsxs("p",{className:"note",children:[o.shared?"Saved with the project. Your team gets it with your next release.":"Saved on this computer. This project keeps its board out of git, so your team does not get it."," Additions can only make the squad stricter."]})]}),t.jsxs("button",{className:"btn pri hn-big",disabled:!!o.broken,onClick:()=>s(!0),children:[t.jsx(xt,{size:16})," Add to your harness"]})]}),o.broken&&t.jsxs("div",{className:"hn-box bad",role:"alert",children:[t.jsx("b",{children:o.broken})," Until then, stories stop and ask at each check instead of going on without your team's gates."]}),!o.broken&&t.jsxs("div",{className:"hn-box",children:[t.jsx("b",{children:"Try first"})," lets a new gate or checklist run and tell you what it would have stopped, without stopping anything. Turn it on when you trust it."]}),o.items.length===0&&!o.broken&&t.jsxs("div",{className:"hn-empty",children:[t.jsx("b",{children:"Nothing added yet."}),t.jsx("p",{className:"note",children:"Your harness is fully working as it is. Add a rule, a checklist or a gate when your team needs one."}),t.jsxs("button",{className:"btn",onClick:()=>s(!0),children:[t.jsx(xt,{size:15})," Add the first one"]})]}),o.items.length>0&&t.jsx("div",{className:"hn-card",children:o.items.map(l=>t.jsx(LO,{a:l,view:e},l.id))}),t.jsxs("p",{className:"note hn-gap",children:["squad-kit's own gates aren't on this list, because they can't be turned off. ",t.jsx(xe,{className:"hn-link",to:"/harness",search:{},children:"See them on the line."})]}),o.log.length>0&&t.jsxs(t.Fragment,{children:[t.jsx("h3",{className:"hn-sub",children:"Who did what"}),t.jsx("ul",{className:"hn-log",children:(r?o.log:o.log.slice(0,$j)).map((l,d)=>t.jsxs("li",{children:[t.jsx("b",{children:hs(l.by)})," ",zO(l)," ",t.jsx("small",{children:Je(l.at)})]},d))}),!r&&o.log.length>$j&&t.jsxs("button",{className:"btn sm hn-gap",onClick:()=>i(!0),children:["Show all ",o.log.length]})]}),n&&t.jsx(MO,{view:e,close:()=>s(!1)})]})}function LO({a:e,view:n}){const s=oe(),{toast:r}=qe(),[i,o]=C.useState(!1),[l,d]=C.useState(!1),[u,h]=C.useState(null),m=x=>s.mutate({path:`/api/v1/harness/additions/${e.id}/state`,body:{state:x},done:x==="off"?`${e.name} is off.`:`${e.name} is ${Cj[x]}. ${K1}`}),p=async()=>{d(!0),h(null);try{h(await ot("/api/v1/harness/try","POST",{id:e.id}))}catch(x){r(x instanceof Error?x.message:String(x),"err")}d(!1)};return t.jsxs("article",{id:`add:${e.id}`,className:`hn-row hn-add ${e.state==="off"?"off":""}`,children:[t.jsxs("div",{className:"hn-addtop",children:[t.jsxs("div",{children:[t.jsx("h3",{dir:"auto",children:e.name}),t.jsx("small",{children:FO(e)})]}),t.jsx("div",{className:"hn-seg2",role:"group","aria-label":`${e.name}: on or off`,children:(e.kind==="rule"?["on","off"]:["try","on","off"]).map(x=>t.jsx("button",{className:x===e.state?`s-${x}`:"","aria-pressed":x===e.state,disabled:s.isPending,onClick:()=>x!==e.state&&m(x),children:Cj[x]},x))})]}),e.text&&t.jsx("p",{dir:"auto",className:"hn-said",children:e.text}),e.questions&&t.jsx("ol",{dir:"auto",className:"hn-qs",children:e.questions.map(x=>t.jsx("li",{children:x},x))}),e.command&&t.jsx("code",{className:"term hn-cmd",dir:"ltr",children:e.command}),e.note&&t.jsx("p",{className:"if",children:e.note}),e.kind==="gate"&&!l&&!u&&e.tried&&t.jsx("p",{className:"if",children:e.tried.result==="passed"?`Passed in ${e.tried.seconds} seconds when tried, ${Je(e.tried.at)}.`:`It fails on today's code, so it can't must-pass yet. Tried ${Je(e.tried.at)}.`}),l&&t.jsx(ha,{running:!0}),u&&t.jsx(ha,{answer:u}),e.partGone&&t.jsx("p",{className:"if hn-warn",children:"The part it runs in is no longer in the project, so it can't run."}),e.kind==="gate"&&!n.additions.guarded&&t.jsx("p",{className:"if hn-warn",children:s3}),e.seen&&t.jsx(l3,{s:e.seen}),t.jsxs("p",{className:"hn-from",children:[e.from==="typed"?"Typed here":`From the folder ${hs(e.from)}`,". Added by ",hs(e.added_by),", ",Je(e.added_at),"."]}),t.jsxs("div",{className:"hn-acts",children:[e.kind==="gate"&&!n.additions.demo&&t.jsxs("button",{className:"btn sm",disabled:l,onClick:()=>void p(),children:[t.jsx(gn,{size:13})," Try it now"]}),i?t.jsxs("span",{className:"hn-ask",children:["Remove it? It stays on the record.",t.jsx("button",{className:"btn sm",disabled:s.isPending,onClick:()=>s.mutate({path:`/api/v1/harness/additions/${e.id}/remove`,done:`${e.name} is removed.`}),children:"Yes, remove"}),t.jsx("button",{className:"btn sm",onClick:()=>o(!1),children:"Keep it"})]}):t.jsx("button",{className:"btn sm",onClick:()=>o(!0),children:"Remove"})]})]})}function ha({running:e,answer:n}){if(e)return t.jsxs("p",{className:"hn-try","aria-live":"polite",children:[t.jsx(Es,{size:15,className:"spin"})," Running inside the guard, on a clean copy of your code"]});if(!n)return null;const{result:s,seconds:r,why:i,output:o}=n;return t.jsxs("div",{"aria-live":"polite",children:[s==="passed"&&t.jsxs("p",{className:"hn-try ok",children:[t.jsx(fe,{size:15})," Passed in ",r," seconds"]}),s==="failed"&&t.jsx("p",{className:"hn-try you",children:"It runs, but it fails on today's code. It can stay on Try first, or be warn only."}),s==="cant-run"&&t.jsxs("p",{className:"hn-try bad",children:[t.jsx(Ve,{size:15})," It can't run, so it can't be saved. ",i]}),s!=="passed"&&o&&t.jsxs("details",{className:"hn-out",children:[t.jsx("summary",{children:"What it printed"}),t.jsx("pre",{dir:"ltr",children:o})]})]})}function pa({title:e,back:n,close:s,children:r,footer:i}){return C.useEffect(()=>{const o=l=>l.key==="Escape"&&s();return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[s]),t.jsx("div",{className:"hn-veil",onMouseDown:o=>o.target===o.currentTarget&&s(),children:t.jsxs("aside",{className:"hn-sheet",role:"dialog","aria-modal":"true","aria-label":e,children:[t.jsxs("header",{children:[t.jsxs("div",{children:[n&&t.jsxs("button",{className:"hn-back",onClick:n,children:[t.jsx(zk,{size:15})," Back"]}),t.jsx("h2",{children:e})]}),t.jsx("button",{className:"iconbtn","aria-label":"Close",onClick:s,children:t.jsx(Ve,{size:18})})]}),t.jsx("div",{className:"hn-sheetbody",children:r}),i&&t.jsx("footer",{children:i})]})})}function Xo({label:e,value:n,options:s,set:r}){return t.jsxs("div",{className:"field",children:[t.jsx("label",{children:e}),t.jsx("div",{className:"hn-pick",role:"group","aria-label":e,children:s.map(([i,o])=>t.jsx("button",{type:"button",className:i===n?"on":"","aria-pressed":i===n,onClick:()=>r(i),children:o},i))})]})}const Tj={pick:"Add to your harness",rule:"Add a rule",checklist:"Add a checklist",gate:"Add a gate",folder:"Bring in from a folder"};function MO({view:e,close:n}){const[s,r]=C.useState("pick"),i={view:e,close:n,title:Tj[s],back:()=>r("pick")};if(s==="rule")return t.jsx(OO,{...i});if(s==="checklist")return t.jsx(_O,{...i});if(s==="gate")return t.jsx(BO,{...i});if(s==="folder")return t.jsx(WO,{...i});const o=[["rule",t.jsx(ma,{size:20},"r"),"A rule","Words one agent or all agents follow."],["checklist",t.jsx(Uk,{size:20},"c"),"A checklist","Questions the Reviewer or the Tester answers, one by one."],["gate",t.jsx(Lo,{size:20},"g"),"A gate","A command squad-kit runs itself. Must pass, or warn only."],["folder",t.jsx(xm,{size:20},"f"),"From a folder","Your team's standard. You see what it holds, and tick what comes in."]];return t.jsxs(pa,{title:Tj.pick,close:n,children:[t.jsx("p",{className:"note",children:"Anything you add makes your squad stricter. It can't turn off a locked gate."}),t.jsx("div",{className:"hn-kinds",children:o.map(([l,d,u,h])=>t.jsxs("button",{onClick:()=>r(l),children:[t.jsx("span",{children:d}),t.jsx("b",{children:u}),t.jsx("small",{children:h})]},l))})]})}function Y1(e){const{toast:n}=qe(),s=oe();return{busy:s.isPending,save:r=>s.mutate({path:"/api/v1/harness/additions",body:r},{onSuccess:i=>{n(`${i.added.name} added. ${i.note??K1}`),e()}})}}function OO({view:e,close:n,back:s,title:r}){const[i,o]=C.useState(""),[l,d]=C.useState("all"),[u,h]=C.useState(""),{busy:m,save:p}=Y1(n),x=e.additions.limits.ruleChars;return t.jsxs(pa,{title:r,back:s,close:n,footer:t.jsx("button",{className:"btn pri",disabled:m||!i.trim()||!u.trim()||u.length>x,onClick:()=>p({kind:"rule",name:i,agents:[l],text:u}),children:"Add the rule"}),children:[t.jsxs("div",{className:"field",children:[t.jsx("label",{htmlFor:"hn-n",children:"Name"}),t.jsx("input",{id:"hn-n",className:"input",dir:ge(i),value:i,onChange:y=>o(y.target.value)})]}),t.jsx(Xo,{label:"Who follows it",value:l,set:d,options:Object.entries(Id)}),t.jsxs("div",{className:"field",children:[t.jsx("label",{htmlFor:"hn-t",children:"The rule"}),t.jsx("textarea",{id:"hn-t",className:"textarea",dir:ge(u),value:u,onChange:y=>h(y.target.value)}),t.jsxs("small",{className:`hn-n ${u.length>x?"over":""}`,children:[u.length," of ",x," characters"]})]}),IO.test(u)&&t.jsx("p",{className:"hn-box you",children:"This rule mentions a commit, a push or a pull request. squad-kit does those itself, so agents are told to leave that part out."}),t.jsx("p",{className:"note",children:"Rules are sent after squad-kit's own words, and can only add care. squad-kit's process comes first."})]})}function _O({view:e,close:n,back:s,title:r}){const[i,o]=C.useState(""),[l,d]=C.useState("reviewer"),[u,h]=C.useState(""),{busy:m,save:p}=Y1(n),x=u.split(`
|
|
697
|
-
`).map(j=>j.trim()).filter(Boolean),y=e.additions.limits.questions;return t.jsxs(pa,{title:r,back:s,close:n,footer:t.jsx("button",{className:"btn pri",disabled:m||!i.trim()||!x.length||x.length>y,onClick:()=>p({kind:"checklist",name:i,agent:l,questions:x}),children:"Add the checklist"}),children:[t.jsxs("div",{className:"field",children:[t.jsx("label",{htmlFor:"hn-n",children:"Name"}),t.jsx("input",{id:"hn-n",className:"input",dir:ge(i),value:i,onChange:j=>o(j.target.value)})]}),t.jsx(Xo,{label:"Who answers",value:l,set:d,options:[["reviewer","Reviewer"],["tester","Tester"]]}),t.jsxs("div",{className:"field",children:[t.jsx("label",{htmlFor:"hn-q",children:"Questions, one on each line"}),t.jsx("textarea",{id:"hn-q",className:"textarea",dir:ge(u),value:u,onChange:j=>h(j.target.value)}),t.jsxs("small",{className:`hn-n ${x.length>y?"over":""}`,children:[x.length," of ",y," questions"]})]}),t.jsxs("div",{className:"hn-box",children:[t.jsx("b",{children:"If an answer is no."})," It starts on Try first: the answers show on the story and a no stops nothing. On: ",l==="reviewer"?"a no counts as a review finding, and the Builder fixes it.":'a no goes the same way as a "done when" not shown.']})]})}function DO({view:e,part:n,set:s}){return e.additions.parts.length?t.jsx(Xo,{label:"Which part it runs in",value:n,set:s,options:e.additions.parts.map(r=>[r.id,r.name])}):null}function BO({view:e,close:n,back:s,title:r}){const[i,o]=C.useState(""),[l,d]=C.useState(""),[u,h]=C.useState("checks"),[m,p]=C.useState("stop"),[x,y]=C.useState(""),[j,k]=C.useState(!1),[b,w]=C.useState(null),[S,T]=C.useState(""),{busy:A,save:D}=Y1(n),$=e.additions.parts.length>0,P=async()=>{k(!0),w(null),T("");try{w(await ot("/api/v1/harness/try","POST",{command:l,...x?{part:x}:{}}))}catch(_){T(_ instanceof Error?_.message:String(_))}k(!1)},F=i.trim()&&b&&b.result!=="cant-run";return t.jsxs(pa,{title:r,back:s,close:n,footer:t.jsxs(t.Fragment,{children:[t.jsx("button",{className:"btn pri",disabled:A||!F,onClick:()=>D({kind:"gate",name:i,command:l,when:u,on_fail:m,...x?{part:x}:{}}),children:"Add the gate"}),t.jsx("span",{className:"note",children:"It starts on Try first."})]}),children:[t.jsx("p",{className:"note",children:"A command squad-kit runs itself, inside the guard. No agent can change it or talk its way past it."}),t.jsxs("div",{className:"field",children:[t.jsx("label",{htmlFor:"hn-n",children:"Name"}),t.jsx("input",{id:"hn-n",className:"input",dir:ge(i),value:i,onChange:_=>o(_.target.value)})]}),t.jsxs("div",{className:"field",children:[t.jsx("label",{htmlFor:"hn-c",children:"Command"}),t.jsx("input",{id:"hn-c",className:"input mono",dir:"ltr",value:l,onChange:_=>{d(_.target.value),w(null)}}),t.jsx("small",{className:"hn-n",children:"No passwords in the command: this file is shared with your team."})]}),t.jsx(Xo,{label:"When it runs",value:u,set:h,options:Object.entries(n3)}),t.jsx(Xo,{label:"If it fails",value:m,set:p,options:[["stop","Must pass"],["warn","Warn only"]]}),t.jsx(DO,{view:e,part:x,set:_=>{y(_),w(null)}}),t.jsxs("div",{className:"hn-box",children:[t.jsxs("div",{className:"hn-tryrow",children:[t.jsx("span",{children:"Try it once first, on your latest code, so a broken gate can't stop every story."}),t.jsxs("button",{className:"btn sm",disabled:j||!l.trim()||$&&!x,onClick:()=>void P(),children:[t.jsx(gn,{size:13})," Try it now"]})]}),j&&t.jsx(ha,{running:!0}),b&&t.jsx(ha,{answer:b}),S&&t.jsx("p",{className:"hn-try bad",role:"alert",children:S})]}),!e.additions.guarded&&t.jsx("p",{className:"note hn-warn",children:s3})]})}function WO({view:e,close:n,back:s,title:r}){const{at:i,setAt:o,listing:l}=H1(),{toast:d}=qe(),[u,h]=C.useState(null),[m,p]=C.useState(""),[x,y]=C.useState(!1),[j,k]=C.useState({}),b=oe(),w=(W,M)=>W??{on:!1,agent:M==="checklist"?"reviewer":"all",when:"checks",part:""},S=(W,M,G)=>k(ce=>({...ce,[W]:{...w(ce[W],M),...G}})),T=async()=>{y(!0),p("");try{h(await ot("/api/v1/harness/folder","POST",{path:l.data?.path??i})),k({})}catch(W){p(W instanceof Error?W.message:String(W))}y(!1)},A=async W=>{const M=w(j[W.key],W.kind);S(W.key,W.kind,{running:!0,answer:void 0,problem:""});try{const G=await ot("/api/v1/harness/try","POST",{command:W.command,...M.part?{part:M.part}:{}});S(W.key,W.kind,{running:!1,answer:G,on:G.result!=="cant-run"})}catch(G){S(W.key,W.kind,{running:!1,problem:G instanceof Error?G.message:String(G)})}};if(!u)return t.jsxs(pa,{title:r,back:s,close:n,footer:t.jsxs("button",{className:"btn pri",disabled:x||!l.data,onClick:()=>void T(),children:[t.jsx(xm,{size:15})," Look in this folder"]}),children:[t.jsx("p",{className:"note",children:"Bring in your team's standard. squad-kit shows what it finds, and nothing changes until you add it. Nothing in the folder runs while it looks."}),t.jsx(V1,{at:i,go:o,listing:l,onError:p}),m&&t.jsx("p",{className:"hn-try bad",role:"alert",children:m})]});const D=u.finds.filter(W=>!W.out&&!W.already),$=D.filter(W=>W.kind!=="gate"),P=D.filter(W=>W.kind==="gate"),F=u.finds.filter(W=>W.already&&!W.out),_=u.finds.filter(W=>W.out),z=D.filter(W=>j[W.key]?.on),U=()=>b.mutate({path:"/api/v1/harness/folder/add",body:{path:u.path,picks:z.map(W=>{const M=j[W.key];return{key:W.key,agent:M.agent,when:M.when,...M.part?{part:M.part}:{}}})}},{onSuccess:W=>{d(`${W.added.length} added from ${u.name}. ${K1}${W.left.length?` Not added: ${W.left.map(M=>`${M.name} (${M.why})`).join(", ")}`:""}`,W.left.length?"err":void 0),n()}}),I=W=>{const M=w(j[W.key],W.kind),G=W.kind==="gate",ce=!G||M.answer&&M.answer.result!=="cant-run";return t.jsxs("div",{className:"hn-find",children:[t.jsxs("label",{children:[t.jsx("input",{type:"checkbox",checked:M.on,disabled:!ce,onChange:V=>S(W.key,W.kind,{on:V.target.checked})}),t.jsxs("span",{children:[t.jsx("b",{dir:"auto",children:W.name}),t.jsxs("small",{dir:"auto",children:[W.kind==="checklist"?`${W.questions?.length} questions`:W.kind==="rule"?"Rule":"Gate",", from ",W.source]})]})]}),W.text&&t.jsx("p",{dir:"auto",className:"hn-said",children:W.text}),W.questions&&t.jsx("ol",{dir:"auto",className:"hn-qs",children:W.questions.map(V=>t.jsx("li",{children:V},V))}),W.command&&t.jsx("code",{className:"term hn-cmd",dir:"ltr",children:W.command}),W.kind==="rule"&&t.jsx("select",{className:"select","aria-label":"Who follows it",value:M.agent,onChange:V=>S(W.key,W.kind,{agent:V.target.value}),children:Object.entries(Id).map(([V,Y])=>t.jsx("option",{value:V,children:Y},V))}),W.kind==="checklist"&&t.jsxs("select",{className:"select","aria-label":"Who answers",value:M.agent,onChange:V=>S(W.key,W.kind,{agent:V.target.value}),children:[t.jsx("option",{value:"reviewer",children:"Reviewer"}),t.jsx("option",{value:"tester",children:"Tester"})]}),G&&t.jsxs(t.Fragment,{children:[t.jsx("select",{className:"select","aria-label":"When it runs",value:M.when,onChange:V=>S(W.key,W.kind,{when:V.target.value}),children:Object.entries(n3).map(([V,Y])=>t.jsx("option",{value:V,children:Y},V))}),e.additions.parts.length>0&&t.jsxs("select",{className:"select","aria-label":"Which part it runs in",value:M.part,onChange:V=>S(W.key,W.kind,{part:V.target.value,answer:void 0,on:!1}),children:[t.jsx("option",{value:"",children:"Which part?"}),e.additions.parts.map(V=>t.jsx("option",{value:V.id,children:V.name},V.id))]}),t.jsxs("div",{className:"hn-tryrow",children:[t.jsx("span",{className:"note",children:"Each command needs its own try before it can be ticked."}),t.jsxs("button",{className:"btn sm",disabled:M.running||e.additions.parts.length>0&&!M.part,onClick:()=>void A(W),children:[t.jsx(gn,{size:13})," Try it now"]})]}),M.running&&t.jsx(ha,{running:!0}),M.answer&&t.jsx(ha,{answer:M.answer}),M.problem&&t.jsx("p",{className:"hn-try bad",role:"alert",children:M.problem})]})]},W.key)};return t.jsxs(pa,{title:r,back:()=>h(null),close:n,footer:t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"btn pri",disabled:!z.length||b.isPending,onClick:U,children:["Add ",z.length," to your harness"]}),t.jsx("span",{className:"note",children:"You can turn each one off later."})]}),children:[t.jsxs("p",{className:"note",dir:"auto",children:["What ",u.name," holds. ",u.left>0?`Left out: ${u.left} too big, not text, keys or links leading out.`:""," ",u.more?"It holds more files than squad-kit looks at.":""]}),!u.finds.length&&t.jsxs("div",{className:"hn-empty",children:[t.jsx("b",{children:"Nothing to bring in here."}),t.jsx("p",{className:"note",children:"squad-kit looks for rule files, checkbox lists, a scripts/check and package scripts."})]}),$.length>0&&t.jsxs(t.Fragment,{children:[t.jsx("h3",{className:"hn-sub",children:"Rules and checklists"}),$.map(I)]}),P.length>0&&t.jsxs(t.Fragment,{children:[t.jsx("h3",{className:"hn-sub",children:"Commands"}),P.map(I)]}),F.length>0&&t.jsxs(t.Fragment,{children:[t.jsx("h3",{className:"hn-sub",children:"Already added"}),F.map(W=>t.jsxs("div",{className:"hn-find out",children:[t.jsx("b",{dir:"auto",children:W.name}),t.jsx("small",{children:"Already added"})]},W.key))]}),_.length>0&&t.jsxs(t.Fragment,{children:[t.jsx("h3",{className:"hn-sub",children:"squad-kit already does these"}),t.jsx("p",{className:"note",children:"Adding them would make two processes fight, so they stay out."}),_.map(W=>t.jsxs("div",{className:"hn-find out",children:[t.jsx("b",{dir:"auto",children:W.name}),t.jsx("small",{children:W.out})]},W.key))]})]})}const UO=[["line","The line"],["compare","Compare tracks"],["limits","Limits"],["safety","Safety"],["agents","Agents"],["additions","Your additions"]],HO=[["all","All"],["you","You decide"],["stopped","Stopped something"],["needs","Needs you"],["team","Added by your team"]],r3="Nothing matches that. Try another word, or clear the search.";function VO(){const e=Pr({from:"/harness"}),n=qt(),s=e.tab??"line",r=Ue(),i=r.data?.ready?r.data.meta.quality:void 0,o=we({queryKey:["harness",i],queryFn:()=>ke("/api/v1/harness"),refetchInterval:15e3}).data,[l,d]=C.useState("full"),[u,h]=C.useState("checks"),[m,p]=C.useState("all"),[x,y]=C.useState(""),[j,k]=C.useState(""),b=$=>void n({to:"/harness",search:$==="line"?{}:{tab:$},replace:!0}),w=$=>{p($),y("")},S=$=>{h($),w("all"),k(""),matchMedia("(max-width: 760px)").matches&&requestAnimationFrame(()=>document.querySelector(".hn-body")?.scrollIntoView())},T=o?.tiles.needs??[],A=!!o;C.useEffect(()=>{const $=()=>{const P=decodeURIComponent(location.hash.slice(1)),F=o?.stages.find(_=>_.gates.some(z=>z.id===P));!F&&!o?.alwaysOn.some(_=>_.id===P)||(F&&h(F.id),w("all"),k(P),s!=="line"&&b("line"),setTimeout(()=>document.getElementById(P)?.scrollIntoView({block:"center"}),60))};return $(),addEventListener("hashchange",$),()=>removeEventListener("hashchange",$)},[A]);const D=o&&t.jsxs(t.Fragment,{children:[t.jsx("b",{className:"ok",children:o.tiles.working})," gates working, ",t.jsx("b",{children:o.tiles.stopped})," stopped something this week, ",t.jsx("b",{className:"you",children:T.length})," needs you"]});return t.jsxs("div",{className:"scroll",children:[s==="line"?t.jsxs("header",{className:"hn-hero",children:[t.jsxs("div",{className:"hn-head",children:[t.jsxs("div",{children:[t.jsx("h1",{children:"Your harness"}),t.jsx("p",{children:"Every gate, rule and limit, exactly as the engine runs them. They are locked, so nothing can weaken them."})]}),t.jsx("div",{className:"hn-seg",role:"group","aria-label":"Track",children:o?.tracks.map($=>t.jsx("button",{className:$.id===l?"on":"","aria-pressed":$.id===l,onClick:()=>d($.id),children:$.name},$.id))})]}),o&&t.jsxs("div",{className:"hn-count",children:[t.jsxs("button",{onClick:()=>w("all"),children:[t.jsx("b",{className:"ok",children:o.tiles.working}),"gates working"]}),t.jsxs("button",{onClick:()=>w("stopped"),children:[t.jsx("b",{children:o.tiles.stopped}),"stopped something this week"]}),t.jsxs("button",{className:"you",onClick:()=>{const $=T.length===1?T[0]:null;$?$.proof?n({to:"/tickets/$id/proof",params:{id:$.id}}):n({to:"/board",search:{ticket:$.id}}):w("needs")},children:[t.jsx("b",{children:T.length}),"needs you now"]})]}),o&&t.jsx(KO,{stages:o.stages,track:l,on:m==="all"&&!x.trim()?u:"",pick:S})]}):t.jsxs("header",{className:"hn-hero slim",children:[t.jsx("h1",{children:"Your harness"}),t.jsx("p",{children:D})]}),t.jsx("nav",{className:"hn-tabs","aria-label":"Harness",children:UO.map(([$,P])=>t.jsx("button",{className:$===s?"on":"","aria-current":$===s?"page":void 0,onClick:()=>b($),children:P},$))}),t.jsxs("div",{className:"hn-body",children:[o&&s==="line"&&t.jsx(YO,{view:o,stageId:u,track:l,chip:m,setChip:p,q:x,setQ:y,spot:j}),o&&s==="compare"&&t.jsx(QO,{view:o}),o&&s==="limits"&&t.jsx(XO,{view:o}),o&&s==="safety"&&t.jsx(JO,{view:o}),o&&s==="agents"&&t.jsx(t_,{view:o}),o&&s==="additions"&&t.jsx(qO,{view:o})]})]})}function KO({stages:e,track:n,on:s,pick:r}){const i=C.useRef(null);return C.useEffect(()=>{const o=i.current?.querySelector(".on");o&&(i.current.scrollLeft=o.offsetLeft-i.current.clientWidth/2)},[s]),t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"hn-wrap",ref:i,children:t.jsx("div",{className:"hn-line",children:e.map((o,l)=>t.jsxs("button",{className:`hn-stop ${o.on[n].kind} ${o.id===s?"on":""}`,"aria-pressed":o.id===s,onClick:()=>r(o.id),children:[t.jsxs("i",{children:[l+1,!!o.stopped&&t.jsx("u",{"aria-label":`Stopped ${o.stopped} this week`,children:o.stopped})]}),t.jsx("b",{children:o.name}),t.jsx("small",{children:o.on[n].sub})]},o.id))})}),t.jsxs("div",{className:"hn-legend",children:[t.jsx("span",{children:"Green: squad-kit runs it, locked"}),t.jsx("span",{children:"Amber: you decide"}),t.jsx("span",{children:"Dashed: happens on its own on this track"}),t.jsx("span",{children:"Red number: stopped something this week"})]})]})}function i3(){const{engineers:e,toggleEngineers:n}=qe();return t.jsx(a3,{on:e,flip:n,name:"For engineers"})}function a3({on:e,flip:n,name:s}){return t.jsxs("button",{className:"hn-sw","aria-pressed":e,onClick:n,children:[t.jsx("span",{className:`tog ${e?"on":""}`}),s]})}function o3({s:e}){return t.jsx(xe,{to:"/board",search:{ticket:e.id},title:e.title,children:e.id})}function l3({s:e}){const n=e.passed!==void 0,s=(e.passed??0)+(e.stopped??0);return t.jsxs("div",{className:"hn-res",children:[n&&s>0&&t.jsx("div",{className:"bar",children:t.jsx("i",{style:{width:`${(e.passed??0)/s*100}%`}})}),n&&s>0&&t.jsxs("div",{children:[t.jsx("b",{children:e.passed})," passed, ",t.jsx("b",{children:e.stopped})," stopped",e.week?`, ${e.week} this week`:""]}),!n&&!!e.stopped&&t.jsxs("div",{children:["Stopped ",t.jsx("b",{children:e.stopped}),e.stopped===1?" story":" stories",e.week?`, ${e.week} this week`:""]}),e.last&&t.jsxs("div",{children:["Last stopped ",t.jsx(o3,{s:e.last}),", ",Je(e.last.at)]}),e.did&&t.jsx("div",{children:e.did})]})}function Ej({r:e,track:n,view:s,tag:r,spot:i}){const{engineers:o}=qe(),[l,d]=C.useState(!1),u=o||l,h=e.skip?.includes(n),m=e.skip?.map(p=>s.tracks.find(x=>x.id===p)?.name).join(" and ");return t.jsxs("article",{id:e.id,className:`hn-row ${h?"off":""} ${i?"spot":""}`,children:[t.jsxs("div",{className:"hn-top",children:[t.jsxs("div",{children:[t.jsxs("h3",{dir:e.team?"auto":void 0,children:[e.name,e.you&&t.jsx("em",{children:"You decide"}),e.team&&t.jsxs("small",{className:"hn-team",children:["Added by your team",e.team.state==="try"?", on Try first":""]}),r&&t.jsx("small",{children:r}),t.jsx("a",{href:`#${e.id}`,"aria-label":`A link to ${e.name}`,children:"#"})]}),t.jsxs("p",{dir:e.team?"auto":void 0,children:[e.note?.[n]?`${e.note[n]} `:"",e.what]}),e.fail&&t.jsxs("p",{className:"if",children:[t.jsx("b",{children:"If it fails:"})," ",e.fail]}),e.then&&t.jsx("p",{className:"if",children:e.then}),m&&t.jsxs("p",{className:"if",children:["Skipped on ",m,"."]})]}),e.seen&&t.jsx(l3,{s:e.seen})]}),e.needs?.map(p=>t.jsxs("div",{className:"hn-need",children:[t.jsxs("span",{children:[t.jsx("b",{children:p.id})," ",p.summary]}),p.proof?t.jsx(xe,{className:"btn pri sm",to:"/tickets/$id/proof",params:{id:p.id},children:"Open the story"}):t.jsx(xe,{className:"btn pri sm",to:"/board",search:{ticket:p.id},children:"Open the story"})]},p.id)),t.jsx("button",{className:"hn-more","aria-expanded":u,onClick:()=>d(!l),children:u?"Hide the details":"Details"}),u&&t.jsx("dl",{children:e.d?.map(([p,x])=>t.jsxs(C.Fragment,{children:[t.jsx("dt",{children:p}),t.jsx("dd",{className:"mono",children:x})]},p))})]})}function YO({view:e,stageId:n,track:s,chip:r,setChip:i,q:o,setQ:l,spot:d}){const u=o.trim().toLowerCase(),h=!!u||r!=="all",m=(S,T="")=>u&&!`${S.name} ${S.what} ${S.fail??""} ${S.then??""} ${T} ${S.d?.flat().join(" ")}`.toLowerCase().includes(u)?!1:r==="you"?!!S.you:r==="team"?!!S.team:r==="stopped"?!!S.seen?.week:r!=="needs"||!!S.needs?.length,p=e.stages.find(S=>S.id===n),x=e.stages.filter(S=>h||S===p).flatMap(S=>S.gates.filter(T=>m(T,S.name)).map(T=>({g:T,s:S}))),y=e.alwaysOn.filter(S=>m(S)),{days:j,weekDays:k,stories:b}=e.range,w=u?`${x.length+y.length} found`:r==="all"?p.name:{you:"You decide",stopped:"Stopped something this week",needs:"Needs you now",team:"Added by your team"}[r];return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"hn-tools",children:[t.jsxs("label",{children:["Search every gate and rule",t.jsx("input",{className:"input",dir:ge(o),value:o,placeholder:"Try tests, Docker, picture, refused",onChange:S=>l(S.target.value)})]}),t.jsx("div",{className:"hn-chips",role:"group","aria-label":"Show",children:HO.map(([S,T])=>t.jsx("button",{className:S===r?"on":"","aria-pressed":S===r,onClick:()=>i(S),children:T},S))}),t.jsx(i3,{})]}),t.jsx("p",{className:"note hn-range",children:b?`Counted from this project's ${b} ${b===1?"story":"stories"} on this computer, last ${j} days. This week: the last ${k} days. No record, no number.`:`No stories on this computer in the last ${j} days, so no numbers yet.`}),t.jsx("h2",{className:"hn-title hn-gap",children:w}),t.jsx("p",{className:"note hn-lead",children:h?"From every stage of the line.":p.about}),!x.length&&!y.length&&t.jsx("div",{className:"hn-none",children:r3}),x.length>0&&t.jsx("div",{className:"hn-card",children:x.map(({g:S,s:T})=>t.jsx(Ej,{r:S,track:s,view:e,tag:h?T.name:void 0,spot:d===S.id},S.id))}),y.length>0&&t.jsxs(t.Fragment,{children:[t.jsx("h2",{className:"hn-title hn-gap",children:"Working in every step"}),t.jsx("p",{className:"note hn-lead",children:"These belong to no stage. They watch the whole line, on every track."}),t.jsx("div",{className:"hn-card",children:y.map(S=>t.jsx(Ej,{r:S,track:s,view:e,spot:d===S.id},S.id))})]})]})}const GO={You:"you",Runs:"runs","By itself":"self","Not used":"none"};function QO({view:e}){const[n,s]=C.useState(!1),r=i=>new Set(e.tracks.map(o=>JSON.stringify(i.cells?.[o.id]))).size>1;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"hn-tools",children:[t.jsxs("div",{children:[t.jsx("h2",{className:"hn-title",children:"What each track does for you"}),t.jsx("p",{className:"note",children:"The quality gates run on every track. The tracks differ only in how much you are asked."})]}),t.jsx(a3,{on:n,flip:()=>s(!n),name:"Only what differs"})]}),t.jsxs("p",{className:"note hn-lead",children:[t.jsx("b",{children:"Runs"}),": squad-kit does it, locked. ",t.jsx("b",{children:"You"}),": it waits for you. ",t.jsx("b",{children:"By itself"}),": decided for you, and logged. ",t.jsx("b",{children:"Not used"}),": not part of this track."]}),t.jsxs("div",{className:"hn-card hn-cmp",role:"table","aria-label":"Gates on each track",children:[t.jsxs("div",{className:"hn-cr head",role:"row",children:[t.jsx("span",{role:"columnheader",children:"Gate"}),e.tracks.map(i=>t.jsx("span",{role:"columnheader",children:i.name},i.id))]}),e.stages.map(i=>{const o=i.gates.filter(l=>!n||r(l));return o.length?t.jsxs(C.Fragment,{children:[t.jsx("div",{className:"hn-cs",children:i.name}),o.map(l=>t.jsxs("div",{className:"hn-cr",role:"row",children:[t.jsxs("span",{role:"rowheader",dir:l.team?"auto":void 0,children:[l.name,l.team&&t.jsx("small",{className:"hn-team",children:"Added by your team"})]}),e.tracks.map(d=>t.jsxs("span",{role:"cell",className:GO[l.cells?.[d.id].word??""],"data-t":d.name,children:[l.cells?.[d.id].word,l.cells?.[d.id].note&&t.jsx("small",{children:l.cells[d.id].note})]},d.id))]},l.id))]},i.id):null})]})]})}const ZO=[["tries","Tries and rounds"],["pictures","Pictures and proof"],["asks","Asks and refusals"],["time","Time limits"],["sizes","Sizes and places"]];function XO({view:e}){const{engineers:n}=qe(),[s,r]=C.useState(""),[i,o]=C.useState(!1),l=s.trim().toLowerCase(),d=e.limits.filter(u=>(!l||`${u.n} ${u.name} ${u.what} ${u.id}`.toLowerCase().includes(l))&&(!i||u.hit));return t.jsxs(t.Fragment,{children:[t.jsx("h2",{className:"hn-title",children:"Your squad can't go round in circles"}),t.jsx("p",{className:"note hn-lead",children:"Every loop has an end. When one is reached, the work is kept and you decide what happens next."}),t.jsxs("div",{className:"hn-tools",children:[t.jsxs("label",{children:["Search the limits",t.jsx("input",{className:"input",dir:ge(s),value:s,placeholder:"Try picture, Docker, rounds",onChange:u=>r(u.target.value)})]}),t.jsx("div",{className:"hn-chips",children:t.jsxs("button",{className:i?"on":"","aria-pressed":i,onClick:()=>o(!i),children:["Reached in ",e.range.days," days"]})}),t.jsx(i3,{})]}),!d.length&&t.jsx("div",{className:"hn-none hn-gap",children:r3}),ZO.map(([u,h])=>{const m=d.filter(p=>p.group===u);return m.length>0&&t.jsxs("section",{children:[t.jsx("h3",{className:"hn-sub",children:h}),t.jsx("div",{className:"hn-ledger",children:m.map(p=>t.jsxs("div",{className:"hn-lim",children:[t.jsx("b",{children:p.n}),t.jsxs("span",{children:[t.jsx("strong",{children:p.name}),p.what,p.hit&&t.jsxs("em",{children:["Reached on ",t.jsx(o3,{s:p.hit}),", ",Je(p.hit.at)]}),n&&t.jsx("code",{className:"mono",children:p.id})]})]},p.id))})]},u)}),!l&&!i&&t.jsxs(t.Fragment,{children:[t.jsxs("h3",{className:"hn-sub",children:["The most one run can use, on ",Jf.find(u=>u.id===e.quality)?.name]}),t.jsx("p",{className:"note hn-lead",children:"Reaching one pauses the step with its work kept. Give it more doubles it."}),t.jsxs("table",{className:"table",children:[t.jsx("thead",{children:t.jsxs("tr",{children:[t.jsx("th",{children:"Step"}),t.jsx("th",{children:"Agent turns"}),t.jsx("th",{children:"Spend at API prices"})]})}),t.jsx("tbody",{children:e.caps.map(u=>t.jsxs("tr",{children:[t.jsx("td",{children:u.name}),t.jsx("td",{children:u.turns}),t.jsxs("td",{children:["$",u.spendUsd]})]},u.key))})]})]})]})}function Gr({title:e,what:n,items:s,mine:r=[],children:i}){return t.jsxs("div",{className:"hn-block",children:[t.jsxs("div",{children:[t.jsx("h3",{children:e}),t.jsx("p",{className:"note",children:n})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"pills",children:[s.map(o=>t.jsxs("span",{className:"pill wait",children:[t.jsx(Vk,{size:13,"aria-label":"Locked"}),o]},o)),r.map(o=>t.jsx("span",{className:"pill you mono",children:o},o))]}),i]})]})}function JO({view:e}){const n=Ue(),s=n.data?.ready?n.data.meta:void 0,r=bl().data,i=e.safety,o=!!(r&&r.tools.some(d=>d.available)&&r.guard?.on),l=[...r?.guard?.allowRead??[],...r?.guard?.allowWrite??[]];return t.jsxs(t.Fragment,{children:[t.jsx("h2",{className:"hn-title",children:"What your squad can never touch."}),r&&t.jsxs("div",{className:"hn-lead",children:[t.jsxs("span",{className:`pill ${o?"ok":"you"}`,children:[o?t.jsx(ra,{size:15}):t.jsx(jm,{size:15}),o?"Guard on, on this computer":"Less protected on this computer"]}),!o&&t.jsx(Q4,{})]}),t.jsx(Gr,{title:"Hidden from the squad",what:"The Builder, the Tester and your project's own commands can't read these. No agent can read squad-kit's keys or a local file.",items:i.hidden,mine:i.local,children:l.length>0&&t.jsxs("p",{className:"note hn-lead",children:["An engineer let your project's own commands use ",t.jsx("span",{className:"mono",children:l.join(", ")}),". See Settings."]})}),t.jsx(Gr,{title:"No agent can change",what:"A change goes back by itself, with a line saying so.",items:i.locked,mine:i.lockedByYou}),s?.engine==="live"&&t.jsx(Gr,{title:"Your own database",what:"A story never works on it. squad-kit only reads it, to make the copy stories start from.",items:[],children:t.jsx(uO,{})}),t.jsxs(Gr,{title:"Where agents can go",what:"The Builder only. The others have no internet, and the Tester's pictures stay on this story's app.",items:i.sites,mine:s?.engine==="live"?[]:s?.allowedHosts??[],children:[t.jsx(QM,{net:i.network,live:s?.engine==="live"}),s?.engine==="live"&&t.jsx(XM,{hosts:s.allowedHosts??[]})]}),t.jsx(Gr,{title:"Closed on every level",what:"Sites with no use in building software, but common for taking data out. A site refused stops nothing: the work goes on without it.",items:i.network.closed}),t.jsx(Gr,{title:"Questions that never reach you",what:"They are refused and logged, and the agent gets on with it.",items:i.refused}),t.jsx(Gr,{title:"What agents can ask squad-kit to do",what:"There is no free command. squad-kit checks every field and does the job itself.",items:i.tools})]})}const e_={claude:"Claude Code",codex:"Codex"};function t_({view:e}){const n=Ue(),s=lv(),r=n.data?.ready?n.data.meta:void 0,i=we({queryKey:["agents"],queryFn:()=>ke("/api/v1/agents"),refetchInterval:2e3}).data??[],[o,l]=C.useState("builder"),[d,u]=C.useState(null),h=i.find(m=>m.role===o);return t.jsxs(t.Fragment,{children:[t.jsx(r_,{notes:e.qualityNote}),t.jsx(Jz,{}),t.jsxs("div",{className:"maprow",children:[t.jsx("b",{children:"Stories at once"}),t.jsxs("span",{className:"note",children:["Up to ",s.data?.parallel??r?.parallel??2,", shared by all your projects. Change it in Settings."]})]}),t.jsx("div",{className:"hn-tiles",children:i.map(m=>t.jsxs("button",{className:`hn-tile ${m.role===o?"on":""}`,"aria-pressed":m.role===o,onClick:()=>l(m.role),children:[t.jsx(fi,{role:m.role}),t.jsx("b",{children:m.name}),t.jsx("small",{children:m.working.length?`Working on ${m.working.map(p=>p.id).join(", ")}`:G1(m.levels.find(p=>p.step==="design")?.now??m.levels[0].now)})]},m.role))}),h&&t.jsx(n_,{a:h,view:e,edit:()=>u(h)}),t.jsx(s_,{lead:e.lead}),t.jsx(Kz,{}),t.jsx("h2",{className:"hn-gap",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."}),(r?.tools??[]).map(m=>t.jsxs("div",{className:"toolrow",children:[t.jsx("span",{className:"logo",children:t.jsx(Lo,{size:18})}),t.jsxs("span",{children:[t.jsx("b",{children:m.name}),t.jsx("br",{}),t.jsx("span",{className:"note",children:m.name==="Codex"?"Your ChatGPT subscription":"Your Claude subscription"})]}),t.jsx("span",{className:`pill ${m.ready?"ok":"wait"}`,children:m.ready?"Ready":"Not found"})]},m.name)),t.jsx(Q4,{}),t.jsxs("div",{className:"toolrow off",children:[t.jsx("span",{className:"logo",children:t.jsx(Lo,{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",{})]}),d&&t.jsx(i_,{agent:d,onClose:()=>u(null)})]})}function n_({a:e,view:n,edit:s}){const r=we({queryKey:["core-prompts",e.role],queryFn:()=>ke(`/api/v1/agents/${e.role}/prompts`)}),i=u=>Sv(u??"").trim(),o=[{id:"all",name:"Every step",text:i(e.instructions)},...e.stepList.map(u=>({id:u.id,name:u.name,text:i(e.steps?.[u.id])}))].filter(u=>u.text),l=n.caps.filter(u=>u.key.split(".")[0]===e.role),d=n.additions.items.filter(u=>u.kind==="rule"&&u.state==="on"&&(u.agents?.includes("all")||u.agents?.includes(e.role)));return t.jsxs("div",{className:"hn-two even",children:[t.jsxs("div",{children:[t.jsx("h2",{className:"hn-title",children:e.name}),t.jsxs("p",{className:"note",children:[e.job,"."]}),e.working.map(u=>t.jsxs(xe,{className:"hn-now",to:"/board",search:{ticket:u.id},children:[t.jsx("b",{className:"mono",children:u.id})," ",u.status]},u.id)),t.jsx("h3",{className:"hn-sub",children:"What it can do"}),t.jsx("ul",{className:"hn-can",children:n.agents[e.role]?.can.map(([u,h])=>t.jsxs("li",{className:h?"":"no",children:[h?t.jsx(fe,{size:16,"aria-label":"Yes"}):t.jsx(Ve,{size:16,"aria-label":"No"}),u]},u))}),t.jsxs("h3",{className:"hn-sub",children:["Your rules for the ",e.name]}),o.map(u=>t.jsxs("p",{className:"hn-rule",children:[t.jsxs("b",{children:[u.name,"."]})," ",u.text]},u.id)),d.map(u=>t.jsxs("p",{className:"hn-rule",dir:"auto",children:[t.jsxs("b",{children:[u.name,"."]})," ",u.text," ",t.jsx("small",{className:"hn-team",children:"Added by your team"})]},u.id)),!o.length&&!d.length&&t.jsx("p",{className:"note",children:"Nothing added yet."}),t.jsxs("button",{className:"btn sm hn-edit",onClick:s,children:["Edit the ",e.name]})]}),t.jsxs("div",{children:[t.jsx("h3",{className:"hn-sub",children:"How it runs"}),t.jsxs("div",{className:"maprow",children:[t.jsx("b",{children:"AI tool"}),t.jsx("span",{className:"note",children:e_[e.tool]})]}),e.levels.map(u=>t.jsxs("div",{className:"maprow",children:[t.jsx("b",{children:u.name}),t.jsx("span",{className:"note",children:G1(u.now)})]},u.step)),l.map(u=>t.jsxs("div",{className:"maprow",children:[t.jsx("b",{children:u.name}),t.jsxs("span",{className:"note",children:["Up to ",u.turns," turns and $",u.spendUsd," for one run."]})]},u.key)),t.jsx("h3",{className:"hn-sub",children:"What it reads before it starts"}),t.jsxs("p",{className:"note",children:["Read only, and improved with every release. Your rules are added to these words and never replace them.",r.data&&` Filled in from ${r.data.ticket.title}.`]}),t.jsx("div",{className:"hn-card hn-reads",children:e.stepList.map(u=>t.jsxs("details",{children:[t.jsxs("summary",{children:[t.jsx(Vk,{size:14,"aria-label":"Locked"}),u.name]}),t.jsx("pre",{className:"coreprompt",children:r.data?.prompts.find(h=>h.step===u.id)?.prompt??(r.isLoading?"Loading…":"Not available.")})]},u.id))})]})]})}function s_({lead:e}){const n=e.always.can.filter(s=>e.always.on.includes(s.id)).map(s=>s.name);return t.jsxs("div",{className:"hn-two even hn-gap",children:[t.jsxs("div",{children:[t.jsx("h2",{className:"hn-title",children:"The Squad lead"}),t.jsx("p",{className:"note",children:"One contact for the whole project. It answers, drafts and passes work on; you press the button."}),e.levels.map(s=>t.jsxs(C.Fragment,{children:[t.jsx("h3",{className:"hn-sub",children:s.name}),t.jsx("p",{className:"note",children:s.words}),t.jsx("ul",{className:"hn-can",children:s.items.map(r=>t.jsxs("li",{className:s.level===3?"no":"",children:[s.level===3?t.jsx(Ve,{size:16,"aria-label":"Never"}):t.jsx(fe,{size:16,"aria-label":"Yes"}),r]},r))})]},s.level))]}),t.jsxs("div",{children:[t.jsx("h3",{className:"hn-sub",children:"How it runs"}),t.jsx("p",{className:"note",children:e.model}),e.limits.map(s=>t.jsxs("div",{className:"maprow",children:[t.jsx("b",{children:s.name}),t.jsxs("span",{className:"note",children:[s.n,". ",s.what]})]},s.name)),t.jsx("h3",{className:"hn-sub",children:"Without asking"}),t.jsx("p",{className:"note",children:e.always.words}),t.jsxs("div",{className:"maprow",children:[t.jsx("b",{children:"Always allow"}),t.jsx("span",{className:"note",children:n.length?n.join(", "):"Nothing yet"})]}),t.jsx(xe,{className:"btn sm hn-edit",to:"/lead",children:"Change it on the Squad lead page"}),t.jsx("h3",{className:"hn-sub",children:"What it may read"}),t.jsx("ul",{className:"hn-can",children:e.reads.map(s=>t.jsxs("li",{children:[t.jsx(fe,{size:16,"aria-label":"Yes"}),s]},s))})]})]})}const Jf=[{id:"best",name:"Best"},{id:"balanced",name:"Balanced"},{id:"thrifty",name:"Thrifty"}];function r_({notes:e}){const n=Ue(),s=oe(),r=n.data?.ready?n.data.meta:void 0;if(!r)return null;const i=r.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:[Jf.map(o=>t.jsx("button",{className:`btn sm ${o.id===i?"pri":""}`,"aria-pressed":o.id===i,onClick:()=>s.mutate({path:"/api/v1/settings",method:"PUT",body:{quality:o.id},done:`Quality is ${o.name} now. The squad uses it from its next step.`}),children:o.name},o.id)),t.jsx("span",{className:"grow"}),t.jsx(te,{text:`squad config set quality ${i}`})]}),Jf.map(o=>t.jsxs("span",{className:"note",style:{fontSize:12.5,...o.id===i?{color:"var(--text)"}:{}},children:[t.jsxs("b",{children:[o.name,":"]})," ",e[o.id]]},o.id))]})]})}function i_({agent:e,onClose:n}){const s=oe(),r=A=>Sv(A??"").trim(),[i,o]=C.useState(e.tool),[l,d]=C.useState(e.model),[u,h]=C.useState(e.youRole?.model??""),[m,p]=C.useState(()=>Object.fromEntries(e.levels.map(A=>[A.step,A.team??{}]))),[x,y]=C.useState(()=>Object.fromEntries(e.levels.map(A=>[A.step,A.you??{}]))),[j,k,b]=$e(`agent-${e.role}`,"instructions",r(e.instructions)),[w,S]=C.useState(()=>Object.fromEntries(e.stepList.map(A=>[A.id,r(e.steps?.[A.id])]))),T=async()=>{const A=($,P)=>($?.level??"")===(P.level??"")&&($?.effort??"")===(P.effort??"");try{for(const $ of e.levels)A($.you,x[$.step])||await ot("/api/v1/me/levels","PUT",{key:`${e.role}.${$.step}`,...x[$.step]});(e.youRole?.model??"")!==u.trim()&&await ot("/api/v1/me/levels","PUT",{key:e.role,...e.youRole,model:u.trim()})}catch($){return s.reset(),alert($ instanceof Error?$.message:String($))}const D={};(e.teamRole?.level||e.teamRole?.effort)&&(D[e.role]={level:e.teamRole.level,effort:e.teamRole.effort});for(const[$,P]of Object.entries(m))(P.level||P.effort)&&(D[`${e.role}.${$}`]=P);s.mutate({path:`/api/v1/agents/${e.role}`,method:"PUT",body:{tool:i,model:l,instructions:j,steps:w,levels:D},done:`${e.name} saved. It uses this from its next step.`},{onSuccess:()=>{b(),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:T,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:i,onChange:A=>o(A.target.value),children:[t.jsx("option",{value:"claude",children:"Claude Code"}),t.jsx("option",{value:"codex",disabled:!0,children:"Codex (coming soon)"})]})]}),t.jsx(o_,{agent:e,team:m,setTeam:p,you:x,setYou:y}),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:l,placeholder:"Empty: use the levels above",onChange:A=>d(A.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:u,placeholder:"Empty: use the levels above",onChange:A=>h(A.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"},dir:ge(j),value:j,placeholder:`Extra instructions the ${e.name} reads in every step, in plain words.`,onChange:A=>k(A.target.value)})]}),e.stepList.map(A=>t.jsxs("div",{className:"agentstep",children:[t.jsx("b",{children:A.name}),t.jsx("textarea",{className:"input",rows:2,style:{width:"100%",resize:"vertical"},dir:ge(w[A.id]??""),value:w[A.id]??"",placeholder:`Only for the ${A.name} step. For example: ${l_[A.id]??"keep it short"}.`,onChange:D=>S({...w,[A.id]:D.target.value})})]},A.id))]})}function G1(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?`, ${rd[e.effort]} effort`:""}), ${n}${e.why?`, ${e.why}`:""}`}const a_={strongest:"Strongest",balanced:"Balanced",fast:"Fast"},rd={xhigh:"extra high",high:"high",medium:"medium",low:"low"};function Aj({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:i=>n({...e,level:i.target.value||void 0}),"aria-label":"Level",children:[t.jsxs("option",{value:"",children:["Default",s.level?` (${s.level})`:""]}),["strongest","balanced","fast"].map(i=>t.jsxs("option",{value:i,children:[a_[i],r.modelOf[i]?` · ${r.modelOf[i]}`:""]},i))]}),r.supportsEffort&&t.jsxs("select",{className:"input",style:{fontSize:12.5,padding:"4px 6px",width:"100%"},value:e.effort??"",onChange:i=>n({...e,effort:i.target.value||void 0}),"aria-label":"Effort",children:[t.jsxs("option",{value:"",children:["Default",s.effort?` (${rd[s.effort]} effort)`:""]}),r.efforts.map(i=>t.jsxs("option",{value:i,children:[rd[i].charAt(0).toUpperCase(),rd[i].slice(1)," effort"]},i))]})]})}function o_({agent:e,team:n,setTeam:s,you:r,setYou:i}){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(Aj,{agent:e,value:n[o.step]??{},below:o.standard,onChange:l=>s({...n,[o.step]:l})}),t.jsx(Aj,{agent:e,value:r[o.step]??{},below:{...o.standard,...n[o.step]??{}},onChange:l=>i({...r,[o.step]:l})}),t.jsx("span",{className:"note",style:{fontSize:12.5},children:G1(o.now)})]},o.step))]})]})}const l_={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"};function c_(e,n,s){return[...(n&&e.startsWith(n)?e.slice(n.length):e).split(/[/\\]/).filter(Boolean),s||"Your project"].join(" / ")}function Pj({onClose:e}){const[n,s,r]=$e("new-project","mode","brd"),[i,o,l]=$e("new-project","name",""),[d,u,h]=$e("new-project","idea",""),[m,p,x]=$e("new-project","paste",!1),[y,j,k]=$e("new-project","text",""),[b,w]=C.useState(null),[S,T]=C.useState(!!i.trim()),[A,D]=C.useState(null),[$,P]=C.useState(!1),[F,_]=C.useState(!1),[z,U]=C.useState(null),I=H1(),W=I.listing.data,M=A??W?.place??"",G=async B=>{const J=B?[...B][0]:void 0;if(J){U(null);try{const q=await kw(J);w(q),S||o(_f(J.name))}catch(q){U(q.message)}}},ce=n==="idea"?d.trim():m?y.trim():b,V=!!(i.trim()&&ce&&M&&!F),Y=Le(i.trim()||"Your project"),se=n==="idea"?`squad projects --new ${Y} --idea ${Le(d.trim()&&d.trim().length<=60?d.trim():"<what you want to build>")}`:`squad projects --new ${Y} --brd ${Le(b?.name??"<file>")}`,R=async()=>{_(!0),U(null);try{const B={name:i.trim(),where:M,...n==="idea"?{idea:d}:m?{text:y}:{file:{name:b.name,data:b.data}}},J=await ot("/api/v1/app/projects/new","POST",B);for(const q of[r,l,h,x,k])q();window.location.assign(J.url.replace(/\/board$/,J.opens))}catch(B){_(!1),U(B instanceof Error?B.message:String(B))}};return t.jsxs(We,{title:"New project",wide:!0,onClose:e,losing:n==="brd"&&b?`the file ${b.name}`:null,footer:t.jsxs(t.Fragment,{children:[t.jsx("button",{className:"btn pri",disabled:!V,onClick:()=>void R(),children:F?"Creating…":"Create my project"}),t.jsx("button",{className:"btn",onClick:e,children:"Cancel"}),t.jsx("span",{className:"grow"}),t.jsx(te,{text:se})]}),children:[t.jsx("p",{children:"Tell your squad what you want. It sets everything else up."}),t.jsxs("div",{className:"np",children:[t.jsxs("div",{className:"seg",role:"group","aria-label":"What you have",children:[t.jsx("button",{className:n==="brd"?"on":"","aria-pressed":n==="brd",onClick:()=>s("brd"),children:"I have a BRD"}),t.jsx("button",{className:n==="idea"?"on":"","aria-pressed":n==="idea",onClick:()=>s("idea"),children:"I have an idea"})]}),n==="idea"?t.jsxs("div",{className:"field",children:[t.jsx("label",{htmlFor:"np-idea",children:"What do you want to build?"}),t.jsx("textarea",{id:"np-idea",className:"textarea",dir:ge(d),autoFocus:!0,rows:4,value:d,onChange:B=>u(B.target.value),placeholder:"In your own words, in Arabic or English. Who will use it, and what will they do?"})]}):m?t.jsxs("div",{className:"field",children:[t.jsx("label",{htmlFor:"np-paste",children:"The BRD's text"}),t.jsx("textarea",{id:"np-paste",className:"textarea rq-pastebox",dir:ge(y),autoFocus:!0,value:y,onChange:B=>j(B.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:()=>p(!1),children:"Choose a file instead"})]})]}):t.jsxs(t.Fragment,{children:[t.jsx(vw,{file:b,onPick:B=>void G(B),onClear:()=>w(null),hint:"Word or PDF, in Arabic or English. The Analyst reads it and asks only about real gaps."}),t.jsxs("div",{className:"rq-hint",children:["No file?"," ",t.jsx("button",{className:"rq-link",onClick:()=>p(!0),children:"Paste the text instead"})]})]}),t.jsxs("div",{className:"field",children:[t.jsx("label",{htmlFor:"np-name",children:"Project name"}),t.jsx("input",{id:"np-name",className:"input",dir:ge(i),value:i,placeholder:"Visitor log",onChange:B=>{o(B.target.value),T(!0),U(null)}})]}),t.jsxs("div",{className:"field",children:[t.jsx("label",{children:"Where it goes"}),$?t.jsxs(t.Fragment,{children:[t.jsx(V1,{at:I.at,go:B=>{U(null),I.setAt(B)},listing:I.listing,onError:U}),W?.notHere&&t.jsx("p",{className:"fb-error",children:W.notHere}),t.jsxs("div",{className:"np-pick",children:[t.jsx("button",{className:"btn sm pri",disabled:!W||!!W.notHere,onClick:()=>{D(W.path),P(!1)},children:"Put it here"}),t.jsx("button",{className:"btn sm",onClick:()=>P(!1),children:"Cancel"})]})]}):t.jsxs("div",{className:"np-where",children:[t.jsx("span",{className:"grow",dir:"auto",children:M?c_(M,W?.home,i.trim()):"…"}),t.jsx("button",{className:"btn sm",disabled:!M,onClick:()=>{I.setAt(M),P(!0)},children:"Change"})]})]}),t.jsx("p",{className:"note",children:"squad-kit makes the folder for you. Nothing leaves your computer except what your AI tool reads."}),z&&t.jsx("p",{className:"fb-error",children:z})]})]})}const di={en:{other:"العربية",head:"Meet your engineering squad.",sub:"Five specialists turn your idea into working software. They do the technical work. You make the decisions.",squad:[["Analyst","Understands what you need"],["Architect","Plans how to build it"],["Builder","Writes the code"],["Reviewer","Checks the work"],["Tester","Shows you the proof"]],you:"You",youDo:"Say if it looks right",go:"Get started",note:"It takes about 2 minutes to get ready.",readyHead:"Is your computer ready?",readySub:"squad-kit checks this by itself. If something is missing, you get one clear step.",git:"Git",gitOk:"It keeps every version of your work safe.",tool:"Your AI tool",toolOk:e=>`${e} is ready.`,browser:"The screenshot browser",browserOk:"squad-kit sets it up by itself the first time it is needed.",checking:"Checking your computer…",goOn:"Continue",allSet:"All set. You can change these later in Settings.",oneLeft:"One step left.",anyway:"Continue anyway",steps:{"install-git":"Git is not on this computer. Install it, then come back here.","update-git":"Git is too old for squad-kit. Update it to 2.38 or newer, then come back here.","install-tool":"Your squad needs an AI tool. Open a terminal and install Claude Code with this line, then come back here.","sign-in":e=>`${e??"Your AI tool"} is here. Sign in once and your squad can work: open a terminal, run this line, and follow what it says.`},download:"Get Git",copy:"Copy",startHead:"What do you have?",newHead:"A BRD or an idea",newBody:"Start a new project from nothing. You don't need a folder, code, or any technical knowledge.",newGo:"New project",addHead:"A project I already have",addBody:"Pick its folder. Your squad reads it first, and nothing changes until you approve.",showHead:"Just show me",showBody:"Watch a sample project being built. No AI runs, and it costs nothing.",showing:"Opening the sample project…",back:"Back"},ar:{other:"English",head:"تعرّف على فريقك الهندسي.",sub:"خمسة متخصصين يحوّلون فكرتك إلى برنامج يعمل. هم يتولون العمل التقني، وأنت تتخذ القرارات.",squad:[["المحلل","يفهم ما تحتاجه"],["المهندس","يخطط لطريقة البناء"],["المطوّر","يكتب الكود"],["المراجع","يفحص العمل"],["المختبِر","يعرض لك الدليل"]],you:"أنت",youDo:"تقرر إن كان مناسبًا",go:"لنبدأ",note:"يستغرق التجهيز نحو دقيقتين.",readyHead:"هل جهازك جاهز؟",readySub:"يتحقق squad-kit من ذلك بنفسه. وإن نقص شيء، تحصل على خطوة واحدة واضحة.",git:"Git",gitOk:"يحفظ كل نسخة من عملك بأمان.",tool:"أداة الذكاء الاصطناعي",toolOk:e=>`${e} جاهز.`,browser:"متصفح لقطات الشاشة",browserOk:"يجهّزه squad-kit بنفسه عند أول حاجة إليه.",checking:"جارٍ فحص جهازك…",goOn:"متابعة",allSet:"كل شيء جاهز. يمكنك تغيير هذا لاحقًا من الإعدادات.",oneLeft:"بقيت خطوة واحدة.",anyway:"متابعة على أي حال",steps:{"install-git":"Git غير موجود على هذا الجهاز. ثبّته ثم عد إلى هنا.","update-git":"نسخة Git قديمة بالنسبة إلى squad-kit. حدّثها إلى 2.38 أو أحدث ثم عد إلى هنا.","install-tool":"يحتاج فريقك إلى أداة ذكاء اصطناعي. افتح نافذة الأوامر وثبّت Claude Code بهذا السطر، ثم عد إلى هنا.","sign-in":e=>`${e??"أداة الذكاء الاصطناعي"} موجودة. سجّل الدخول مرة واحدة ليعمل فريقك: افتح نافذة الأوامر، وشغّل هذا السطر، واتبع ما يطلبه.`},download:"تنزيل Git",copy:"نسخ",startHead:"ماذا لديك؟",newHead:"وثيقة متطلبات أو فكرة",newBody:"ابدأ مشروعًا جديدًا من الصفر. لا تحتاج إلى مجلد أو كود أو خبرة تقنية.",newGo:"مشروع جديد",addHead:"مشروع لديّ بالفعل",addBody:"اختر مجلده. يقرؤه فريقك أولًا، ولا يتغير شيء حتى توافق.",showHead:"أرني فقط",showBody:"شاهد بناء مشروع تجريبي. بلا ذكاء اصطناعي وبلا تكلفة.",showing:"جارٍ فتح المشروع التجريبي…",back:"رجوع"}},d_=[{icon:pi,color:"#2f6fd0"},{icon:gm,color:"#6a4fc2"},{icon:o7,color:"#b4590f"},{icon:rl,color:"#0e6f7a"},{icon:km,color:"var(--accent)"}];async function c3(){const e=await ot("/api/v1/app/sample","POST");window.location.assign(e.url)}function u_({step:e,onStep:n,onNew:s,onAdd:r}){const[i,o]=C.useState(Am),l=di[i],d=()=>{const h=i==="ar"?"en":"ar";f9(h),o(h)},u=()=>{n("ready"),ot("/api/v1/app/settings","PUT",{welcomed:!0}).catch(()=>{})};return t.jsx("div",{className:"wl",dir:i==="ar"?"rtl":"ltr",lang:i,children:t.jsxs("div",{className:"wl-in",children:[t.jsxs("div",{className:"wl-top",children:[t.jsxs("div",{className:"wl-logo",dir:"ltr",children:[t.jsx("img",{src:"/logo.svg",alt:""}),t.jsx("span",{children:"squad-kit"})]}),t.jsx("button",{className:"wl-lang",onClick:d,children:l.other})]}),e==="welcome"&&t.jsx(h_,{lang:i,onGo:u}),e==="ready"&&t.jsx(m_,{lang:i,onGo:()=>n("start")}),e==="start"&&t.jsx(g_,{lang:i,onNew:s,onAdd:r,onBack:()=>n("ready")})]})})}function h_({lang:e,onGo:n}){const s=di[e];return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"wl-main wl-main-wide",children:[t.jsx("h1",{className:"wl-big",children:s.head}),t.jsx("p",{className:"wl-sub",children:s.sub}),t.jsxs("div",{className:"wl-squad",children:[t.jsx("div",{className:"wl-wire","aria-hidden":"true"}),s.squad.map(([r,i],o)=>{const{icon:l,color:d}=d_[o];return t.jsxs("div",{className:"wl-tile",style:{"--d":`${.1+o*.35}s`},children:[t.jsx("div",{className:"wl-mark",style:{color:d},children:t.jsx(l,{size:24,"aria-hidden":"true"})}),t.jsx("b",{children:r}),t.jsx("span",{children:i})]},r)}),t.jsxs("div",{className:"wl-tile",style:{"--d":"1.95s"},children:[t.jsx("div",{className:"wl-mark wl-mark-you",children:t.jsx(vm,{size:24,"aria-hidden":"true"})}),t.jsx("b",{className:"wl-you",children:s.you}),t.jsx("span",{children:s.youDo})]})]})]}),t.jsxs("div",{className:"wl-go wl-go-wide",children:[t.jsx("button",{className:"wl-cta",onClick:n,children:s.go}),t.jsx("span",{children:s.note})]})]})}function p_({text:e,copy:n}){return t.jsxs("span",{className:"wl-cmd",children:[t.jsx("span",{children:e}),t.jsx("button",{"aria-label":n,title:n,onClick:()=>void navigator.clipboard?.writeText(e).catch(()=>{}),children:t.jsx(Xn,{size:14})})]})}const f_={"install-tool":"npm install -g @anthropic-ai/claude-code","sign-in":"claude"};function Rj({lang:e,step:n,label:s}){const r=di[e],i=r.steps[n],o=f_[n];return t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"wl-line",children:typeof i=="function"?i(s):i}),t.jsxs("span",{className:"wl-step",children:[o&&t.jsx(p_,{text:o,copy:r.copy}),(n==="install-git"||n==="update-git")&&t.jsx("a",{className:"wl-act",href:"https://git-scm.com/downloads",target:"_blank",rel:"noreferrer",children:r.download})]})]})}function Vp({state:e}){return e==="wait"?t.jsx("span",{className:"wl-tick wl-tick-wait",children:t.jsx(st,{size:20,className:"spin",role:"img","aria-label":"Checking"})}):e==="needs"?t.jsx("span",{className:"wl-tick wl-tick-needs",children:t.jsx(Cs,{size:16,strokeWidth:2.5,role:"img","aria-label":"Needs one step"})}):t.jsx("span",{className:"wl-tick",children:t.jsx(fe,{size:15,strokeWidth:3,role:"img","aria-label":"Ready"})})}function m_({lang:e,onGo:n}){const s=di[e],r=we({queryKey:["app","ready"],queryFn:()=>ke("/api/v1/app/ready"),refetchInterval:l=>l.state.data?.git.ok&&l.state.data?.tool.ok?!1:3e3}),i=r.data,o=!!(i?.git.ok&&i?.tool.ok);return t.jsxs("div",{className:"wl-main wl-main-narrow",children:[t.jsx("h1",{children:s.readyHead}),t.jsx("p",{className:"wl-sub wl-sub-tight",children:s.readySub}),t.jsxs("div",{className:"wl-rows","aria-live":"polite",children:[t.jsxs("div",{className:"wl-row",children:[t.jsx(Vp,{state:i?i.git.ok?"ok":"needs":"wait"}),t.jsxs("div",{children:[t.jsx("b",{children:s.git}),i?i.git.step?t.jsx(Rj,{lang:e,step:i.git.step}):t.jsx("span",{className:"wl-line",children:s.gitOk}):t.jsx("span",{className:"wl-line",children:s.checking})]})]}),t.jsxs("div",{className:"wl-row",children:[t.jsx(Vp,{state:i?i.tool.ok?"ok":"needs":"wait"}),t.jsxs("div",{children:[t.jsx("b",{children:s.tool}),i?i.tool.step?t.jsx(Rj,{lang:e,step:i.tool.step,label:i.tool.label}):t.jsx("span",{className:"wl-line",children:s.toolOk(i.tool.label??"")}):t.jsx("span",{className:"wl-line",children:s.checking})]})]}),t.jsxs("div",{className:"wl-row",children:[t.jsx(Vp,{state:i?"ok":"wait"}),t.jsxs("div",{children:[t.jsx("b",{children:s.browser}),t.jsx("span",{className:"wl-line",children:s.browserOk})]})]})]}),t.jsxs("div",{className:"wl-go",style:{marginTop:32},children:[t.jsx("button",{className:"wl-cta",disabled:!o,onClick:n,children:s.goOn}),t.jsx("span",{children:o?s.allSet:i?s.oneLeft:s.checking}),i&&!o||r.isError?t.jsx("button",{className:"wl-quiet",onClick:n,children:s.anyway}):null]})]})}function g_({lang:e,onNew:n,onAdd:s,onBack:r}){const i=di[e],[o,l]=C.useState(!1),[d,u]=C.useState(""),h=async()=>{l(!0),u("");try{await c3()}catch(m){l(!1),u(m instanceof Error?m.message:String(m))}};return t.jsxs("div",{className:"wl-main wl-main-mid",children:[t.jsx("h1",{style:{marginBottom:32},children:i.startHead}),t.jsxs("div",{className:"wl-cards",children:[t.jsxs("button",{className:"wl-card wl-card-main",onClick:n,children:[t.jsx(ma,{size:36,strokeWidth:1.8,"aria-hidden":"true"}),t.jsx("span",{className:"wl-fill"}),t.jsx("b",{children:i.newHead}),t.jsx("span",{children:i.newBody}),t.jsx("i",{children:i.newGo})]}),t.jsxs("button",{className:"wl-card wl-card-side",onClick:s,children:[t.jsx(xm,{size:28,"aria-hidden":"true"}),t.jsx("span",{className:"wl-fill"}),t.jsx("b",{children:i.addHead}),t.jsx("span",{children:i.addBody})]}),t.jsxs("button",{className:"wl-card wl-card-side",disabled:o,onClick:()=>void h(),children:[t.jsx(gn,{size:28,"aria-hidden":"true"}),t.jsx("span",{className:"wl-fill"}),t.jsx("b",{children:i.showHead}),t.jsx("span",{children:o?i.showing:i.showBody})]})]}),d&&t.jsx("p",{className:"wl-err",role:"alert",children:d}),t.jsx("div",{className:"wl-go",style:{marginTop:20},children:t.jsx("button",{className:"wl-quiet",onClick:r,children:i.back})})]})}function x_(){const[e,n]=C.useState(!1),[s,r]=C.useState("");return t.jsxs("button",{className:"home-empty",disabled:e,onClick:()=>{n(!0),r(""),c3().catch(i=>{n(!1),r(i instanceof Error?i.message:String(i))})},children:[t.jsx(gn,{size:22}),t.jsx("b",{children:"Just show me"}),t.jsx("span",{role:s?"alert":void 0,children:s||(e?di.en.showing:di.en.showBody)})]})}const Ij=2e3,Fj=e=>`/p/${encodeURIComponent(e)}`;function y_(e,n){const s=gi(n);return e.replace(/\bsquad ([a-z-]+) (\S+)/g,(r,i,o)=>`squad ${i} ${o} --project ${s}`)}function j_(e,n){return n&&e.startsWith(n)?`~${e.slice(n.length)}`:e}function k_(){const{theme:e,toggleTheme:n}=qe(),s=we({queryKey:["app","projects"],queryFn:()=>ke("/api/v1/app/projects"),refetchInterval:Ij}),r=we({queryKey:["app","waiting"],queryFn:()=>ke("/api/v1/app/waiting"),refetchInterval:Ij}),[i,o]=C.useState(!1),[l,d]=C.useState(!1),[u,h]=C.useState(null),m=s.data?.projects??[],p=r.data?.items??[],x=Aw(),y=p.length+x.length,[j,k]=C.useState(null),b=!!s.data&&m.length===0&&!s.data?.welcomed,w=j??(b?"welcome":null);return w?t.jsxs(t.Fragment,{children:[t.jsx(u_,{step:w,onStep:k,onNew:()=>d(!0),onAdd:()=>o(!0)}),i&&t.jsx(zj,{onClose:()=>o(!1)}),l&&t.jsx(Pj,{onClose:()=>d(!1)})]}):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(v_,{s:s.data}),t.jsx(p9,{}),t.jsx("button",{className:"theme",onClick:n,"aria-label":e==="light"?"Switch to dark":"Switch to light",children:e==="light"?t.jsx(il,{size:15}):t.jsx(ol,{size:15})})]}),t.jsx(hv,{}),t.jsx(Uf,{}),t.jsx(Wf,{}),t.jsx(jz,{}),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.jsxs("button",{className:"btn",onClick:()=>o(!0),children:[t.jsx(hf,{size:15})," Add project"]}),t.jsxs("button",{className:"btn pri",onClick:()=>d(!0),children:[t.jsx(xt,{size:15})," New project"]})]}),s.isLoading?null:s.isError&&!s.data?t.jsx(Er,{what:"your projects",error:s.error,onRetry:()=>void s.refetch()}):m.length===0?t.jsxs("div",{className:"home-starts",children:[t.jsxs("button",{className:"home-empty",onClick:()=>d(!0),children:[t.jsx(ed,{size:22}),t.jsx("b",{children:"Start a new project"}),t.jsx("span",{children:"You have a BRD or an idea. You don't need a folder, code or any technical knowledge."})]}),t.jsxs("button",{className:"home-empty",onClick:()=>o(!0),children:[t.jsx(hf,{size:22}),t.jsx("b",{children:"Add a project you already have"}),t.jsx("span",{children:"Pick its folder: one repo, or a folder with several repos."})]}),t.jsx(x_,{})]}):t.jsx("div",{className:"pcards",children:m.map(S=>t.jsx(b_,{p:S,onRemove:()=>h(S)},S.id))}),t.jsx("div",{className:"home-cmd",children:t.jsx(te,{text:"squad projects"})})]}),t.jsxs("section",{className:"home-inbox",id:"waiting",children:[t.jsxs("div",{className:"home-h",children:[t.jsx("h2",{children:"Waiting for you"}),y>0&&t.jsx("span",{className:"badge you",children:y}),t.jsx("span",{className:"grow"}),t.jsx(te,{text:"squad inbox"})]}),r.isError&&!r.data?t.jsx(Er,{what:"what waits for you",error:r.error,onRetry:()=>void r.refetch()}):y===0?t.jsxs("div",{className:"calm",children:[t.jsx("span",{className:"ring",children:t.jsx(fe,{size:18,strokeWidth:2.5})}),t.jsxs("div",{children:[t.jsx("b",{children:"Nothing needs you right now"}),t.jsx("span",{children:m.length?"The squads are working. Questions, plans, proof and decisions from every project land here.":"Start a project to begin."})]})]}):t.jsxs("div",{className:"home-waiting",children:[x.map(S=>t.jsx(Rw,{w:S},`${S.project?.id??""}/${S.id}`)),p.map(({project:S,ticket:T})=>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:S.name}),t.jsx("span",{className:"id",children:T.id}),t.jsx("span",{children:Zs[T.stage]}),t.jsx("span",{children:Je(T.activity[0]?.at??T.createdAt)})]}),t.jsx(L,{as:"h3",text:T.title}),t.jsx(L,{as:"p",text:T.waiting?.summary??(Gs(T)?`Change ${mi(T).id} to the spec waits for you`:As(T)?Pm(T):T.outdated?.length?$m(T):`Looks stuck: ${T.quiet?.detail??""}`)})]}),t.jsx(te,{text:y_(Cm(T),S.name)}),t.jsx("a",{className:"btn pri sm",href:T.waiting?.kind==="proof"?`${Fj(S.id)}/tickets/${encodeURIComponent(T.id)}/proof`:`${Fj(S.id)}/board?ticket=${encodeURIComponent(T.id)}`,children:T.waiting?jd(T):"Check it"})]},`${S.id}/${T.id}`))]})]})]})}),i&&t.jsx(zj,{onClose:()=>o(!1)}),l&&t.jsx(Pj,{onClose:()=>d(!1)}),u&&t.jsx(S_,{p:u,onClose:()=>h(null)})]})}function v_({s:e}){const n=In(),{toast:s}=qe(),r=async i=>{try{await ot("/api/v1/app/settings","PUT",{parallel:i}),n.invalidateQueries({queryKey:["app"]}),s(`Up to ${i} 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:i=>void r(Number(i.target.value)),"aria-label":"Tickets at once, across all projects",children:Array.from({length:e.max},(i,o)=>o+1).map(i=>t.jsx("option",{value:i,children:i},i))})]})}function b_({p:e,onRemove:n}){const s=In(),{toast:r}=qe(),[i,o]=C.useState(!1),l=e.setup&&e.setup.status!=="done"?e.setup:null,d=e.open&&e.tickets===0?e.setup?.brd:void 0,u=async()=>{o(!0);try{await ot("/api/v1/app/projects","POST",{folder:e.root}),r(`${e.name} is open`)}catch(m){r(m instanceof Error?m.message:String(m),"err")}finally{o(!1),s.invalidateQueries({queryKey:["app"]})}},h=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}):l?.status==="failed"?t.jsx("span",{className:"bad",children:"The Architect could not read the project"}):d?t.jsx("span",{className:"you",children:"Your stories start from your BRD"}):l?t.jsxs("span",{className:"you",children:["Setting up: ",l.status==="running"?l.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:[t.jsx(L,{text: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:h})]}),t.jsxs("div",{className:"acts",children:[e.open?t.jsx("a",{className:"btn sm pri",href:d?e.url.replace(/\/board$/,`/requirements/${encodeURIComponent(d.id)}`):e.setup?.line&&!e.setup.approved?e.url.replace(/\/board$/,e.setup.ready?"/overview":"/setup"):e.url,children:d?"Open the BRD":e.setup?.line&&!e.setup.approved?e.setup.ready?"Check it":"See the setup":"Open board"}):t.jsx("button",{className:"btn sm",disabled:i,onClick:()=>void u(),children:"Try again"}),t.jsx("button",{className:"btn sm quiet",onClick:n,children:"Remove"})]})]})}const w_=[{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 code folders",text:"squad-kit reads each one and shows you how they fit together."}];function N_({look:e,looking:n}){return n?t.jsx("p",{className:"note","aria-live":"polite",children:"Looking at what is in this folder…"}):e?e.ask?t.jsx("div",{className:"ob-found","aria-live":"polite",children:t.jsxs("div",{className:"ob-found-c",role:"alert",children:[t.jsx("b",{children:e.title}),t.jsx("div",{children:e.found}),t.jsx("div",{className:"note",children:e.next})]})}):t.jsxs("div",{className:"ob-found","aria-live":"polite",children:[t.jsxs("div",{className:"ob-found-c",children:[t.jsx("b",{children:e.title}),t.jsx("div",{children:e.found}),t.jsx("div",{children:e.next}),t.jsx("div",{className:"note",children:e.safe})]}),t.jsxs("div",{className:"ob-also",children:[t.jsx("div",{className:"ob-k",children:"squad-kit also handles"}),w_.filter(s=>s.kind!==e.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:e.takes})]}):null}function zj({onClose:e}){const{at:n,setAt:s,listing:r}=H1(),[i,o]=C.useState(null),[l,d]=C.useState(!1),u=r.data,h=AO(u),m=y=>{o(null),s(y)},p=h.data?.ask,x=async y=>{if(u){d(!0),o(null);try{const j=await ot("/api/v1/app/projects","POST",{folder:u.path,...y?{choice:y}:{}}),k=j.setup&&!j.setup.ready&&!j.setup.approved&&j.setup.line;window.location.assign(k?j.url.replace(/\/board$/,"/setup"):j.url)}catch(j){d(!1),o(j instanceof Error?j.message:String(j))}}};return t.jsxs(We,{title:"Add a project",wide:!0,onClose:e,footer:t.jsxs(t.Fragment,{children:[p?t.jsxs(t.Fragment,{children:[t.jsx("button",{className:"btn pri",disabled:l||r.isFetching,onClick:()=>void x("above"),children:l?"Adding…":p.kind==="inside-repo"?`Add ${p.name} instead`:`Open ${p.name}`}),p.kind==="inside-project"&&t.jsx("button",{className:"btn",disabled:l||r.isFetching,onClick:()=>void x("here"),children:"Add this folder on its own"})]}):t.jsx("button",{className:"btn pri",disabled:!u?.canAdd||l||r.isFetching||h.isFetching,onClick:()=>void x(),children:l?"Adding…":u?.kind==="project"?"Open it":"Add and get to know it"}),t.jsx("button",{className:"btn",onClick:e,children:"Cancel"}),t.jsx("span",{className:"grow"}),u&&t.jsx(te,{text:`cd ${Le(p?.root??u.path)} && squad console`})]}),children:[t.jsx("p",{className:"note",children:"Pick the project's folder: one with its code, one that holds several code folders, or a new, empty folder for a new project."}),t.jsx(V1,{at:n,go:m,listing:r,onError:o}),u&&t.jsxs("p",{className:"fb-kind",children:[t.jsx("b",{children:j_(u.path,u.home)}),!u.canAdd&&t.jsx("span",{children:"This folder can't be a project. Open a folder inside it, or make a new one here."})]}),u?.canAdd&&t.jsx(N_,{look:h.data,looking:h.isFetching}),i&&t.jsx("p",{className:"fb-error",children:i})]})}function S_({p:e,onClose:n}){const s=In(),{toast:r}=qe(),[i,o]=C.useState(!1),l=async()=>{o(!0);try{await ot(`/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(u){o(!1),r(u instanceof Error?u.message:String(u),"err")}},d=/\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:i,onClick:()=>void l(),children:"Take it out"}),t.jsx("button",{className:"btn",onClick:n,children:"Cancel"}),t.jsx("span",{className:"grow"}),t.jsx(te,{text:`squad projects --remove ${d}`})]}),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 C_(){const e=Pr({from:"/conversations"}),n=qt({from:"/conversations"}),s=xa(ya),[r,i]=C.useState(""),o=Ko(r),d=Ko().data??[],u=e.ticket??d.find(y=>y.open)?.id??d[0]?.id,[h,m]=C.useState(null),p=y=>{m(null),n({search:{ticket:y}})},x=y=>{Ss.show(y),n({to:"/board"})};return s?t.jsx(I_,{id:u,all:d,pick:p,doc:h,setDoc:m}):t.jsxs("div",{className:"cpage",children:[t.jsx($_,{q:r,setQ:i}),t.jsxs("div",{className:"cpage-b",children:[t.jsx(E_,{list:o.data??[],id:u,pick:p,searching:!!r.trim()}),t.jsx("section",{className:"ccenter","aria-label":"Conversation",children:u?t.jsx(m1,{id:u,size:"full",onOpenDoc:m,onPanel:()=>x(u)},u):t.jsxs("div",{className:"cempty",children:[t.jsx("p",{children:"No talks yet. Start one with any agent on any ticket."}),t.jsx(Dw,{})]})}),h?t.jsx(i1,{doc:h,onClose:()=>m(null)}):u?t.jsx(A_,{id:u,onOpenDoc:m}):null]})]})}function $_({q:e,setQ:n}){const s=Ue(),{theme:r,toggleTheme:i}=qe(),o=s.data?.ready?s.data.meta.project:"";return t.jsxs("header",{className:"cpage-h",children:[t.jsxs(xe,{to:"/board",className:"btn",children:[t.jsx(zk,{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(pi,{size:15}),t.jsx("input",{value:e,onChange:l=>n(l.target.value),placeholder:"Search all conversations","aria-label":"Search all conversations",dir:ge(e)})]}),t.jsx("button",{className:"iconbtn",onClick:i,"aria-label":r==="light"?"Switch to dark":"Switch to light",children:r==="light"?t.jsx(il,{size:16}):t.jsx(ol,{size:16})})]})}function d3(e){return new Date(e).toDateString()===new Date().toDateString()?Rn(e):Is(e)}function T_(e){const s=(e.match??e.last?.text??"").replace(/[*_`#>]+/g,"").replace(/\s+/g," ").trim(),r=pt(s);return{text:`${e.last?.who==="you"&&!e.match?"You: ":""}${s}`,dir:r.dir,cls:Js(r)}}function E_({list:e,id:n,pick:s,searching:r}){const i=Kd(),o=[["Waiting for you",e.filter(l=>l.open&&l.yourTurn)],["Talking now",e.filter(l=>l.open&&!l.yourTurn)],["Earlier",e.filter(l=>!l.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(([l,d])=>d.length?t.jsxs("div",{children:[t.jsx("div",{className:"csec",children:l}),d.map(u=>{const h=u.id===n,m=T_(u),p=w1(u,i.seen);return t.jsxs("button",{className:`crow-i ${h?"on":""}`,onClick:()=>s(u.id),"aria-current":h,children:[t.jsx(Yn,{role:u.with,live:u.thinking}),t.jsxs("span",{className:"rt",children:[t.jsx("span",{className:"cid",children:u.id}),t.jsx("b",{children:ft[u.with]}),u.yourTurn&&t.jsx("span",{className:"cwait",children:"Your turn"})]}),t.jsx("span",{className:"rtime",children:u.thinking?"now":d3(u.at)}),t.jsx("span",{className:`rp ${u.thinking?"t-en":m.cls}`,dir:u.thinking?"ltr":m.dir,children:u.thinking?t.jsxs("span",{className:`rtyping c-${u.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"})]}):t.jsx(Gt,{text:m.text||u.title,dir:m.dir})}),p>0&&!h&&t.jsx("span",{className:"cbadge rb",children:p})]},u.id)})]},l):null)]})})}function A_({id:e,onOpenDoc:n}){const s=cl(e).data,[r,i]=C.useState("spec");if(!s)return t.jsx("aside",{className:"cspec"});const o=[...new Set([...(s.chat?.messages??[]).flatMap(l=>l.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:()=>i("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:()=>i("files"),children:["Files · ",o.length]}),t.jsx("button",{className:`cstab ${r==="activity"?"on":""}`,role:"tab","aria-selected":r==="activity",onClick:()=>i("activity"),children:"Activity"})]}),t.jsxs("div",{className:"csbody",children:[r==="spec"&&t.jsx(R_,{t:s}),r==="files"&&(o.length?t.jsx(r1,{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((l,d)=>t.jsxs("div",{className:"cact-row",children:[t.jsx("span",{className:"cdim",children:d3(l.at)}),t.jsxs("span",{children:[t.jsx("b",{children:Ys[l.who]})," ",t.jsx(P_,{text:l.text})]})]},d))})]})]})}function P_({text:e}){const n=pt(e);return t.jsx("span",{dir:n.dir,className:Js(n),children:t.jsx(Gt,{text:e,dir:n.dir})})}function Yc({text:e,fresh:n,chk:s,tone:r}){const i=pt(e);return t.jsxs("div",{className:`citem ${n?"new":""} ${r??""}`,children:[s&&t.jsx("span",{className:"cchk"}),t.jsx("span",{className:`grow ${Js(i)}`,dir:i.dir,lang:i.dir==="rtl"?"ar":"en",children:t.jsx(Gt,{text:e,dir:i.dir})}),n&&t.jsx("span",{className:"ctag",children:"From chat"})]})}function R_({t:e}){const n=e.chat?.messages[0]?.at??"",s=e.notes??[],r=p=>!!n&&p>=n,i=e.chat?.open&&!e.chat.beside&&e.chat.with==="analyst",o=[...(e.criteria??[]).map(p=>({text:p.then,at:""})),...(e.brief?.criteria??[]).map(p=>({text:p,at:""})),...s.filter(p=>p.kind==="criterion").map(p=>({text:p.text,at:p.at}))],l=[...(e.brief?.rules??[]).map(p=>({text:p,at:""})),...s.filter(p=>p.kind==="rule").map(p=>({text:p.text,at:p.at}))],d=s.filter(p=>p.kind==="note"&&!p.to),u=(e.questions??[]).filter(p=>!p.answer).map(p=>p.text),h=e.story??e.ask,m=pt(h);return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"cdim",children:i?"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:Js(m),dir:m.dir,children:t.jsx(Gt,{text:h,dir:m.dir})}),t.jsx("h3",{children:"Done when"}),o.length?o.map((p,x)=>t.jsx(Yc,{text:p.text,chk:!0,fresh:r(p.at)},x)):t.jsx("p",{className:"cdim",children:"Nothing yet."}),l.length>0&&t.jsxs(t.Fragment,{children:[t.jsx("h3",{children:"Rules"}),l.map((p,x)=>t.jsx(Yc,{text:p.text,fresh:r(p.at)},x))]}),d.length>0&&t.jsxs(t.Fragment,{children:[t.jsx("h3",{children:"Notes"}),d.map((p,x)=>t.jsx(Yc,{text:p.text,fresh:r(p.at)},x))]}),u.length>0&&t.jsxs(t.Fragment,{children:[t.jsx("h3",{children:"Still open"}),u.map((p,x)=>t.jsx(Yc,{text:p,tone:"open"},x))]})]})}function I_({id:e,all:n,pick:s,doc:r,setDoc:i}){const o=cl(e).data,l=Kd(),d=qt(),{theme:u,toggleTheme:h}=qe(),m=o?.chat,p=o?cw(o):null,x=n.filter(j=>j.open||j.id===e),y=C.useRef(null);return C.useEffect(()=>{y.current?.querySelector(".cv.on")?.scrollIntoView({block:"nearest",inline:"nearest"})},[e,x.length]),t.jsxs("div",{className:"cphone",children:[t.jsxs("header",{className:"cph-h",children:[t.jsx("button",{className:"ib",onClick:()=>r?i(null):void d({to:"/board"}),"aria-label":r?"Close the document":"Back to the board",children:t.jsx(Lk,{size:22})}),m&&t.jsx(Yn,{role:m.with,live:m.thinking}),t.jsxs("div",{className:"cph-who",children:[t.jsxs("div",{children:[t.jsx("b",{children:m?ft[m.with]:"Conversations"})," ",o&&t.jsx("span",{className:"cid",children:o.id})]}),p&&t.jsx("div",{className:`cph-stage ${p.tone}`,children:p.text})]}),t.jsx("span",{className:"grow"}),t.jsx("button",{className:"ib",onClick:h,"aria-label":u==="light"?"Switch to dark":"Switch to light",children:u==="light"?t.jsx(il,{size:18}):t.jsx(ol,{size:18})})]}),x.length>1&&t.jsx("div",{className:"cph-convs",role:"tablist","aria-label":"Conversations",ref:y,children:x.map(j=>{const k=j.id===e,b=w1(j,l.seen);return t.jsxs("button",{className:`cv ${k?"on":""}`,role:"tab","aria-selected":k,"aria-label":`${ft[j.with]} on ${j.id}`,onClick:()=>s(j.id),children:[t.jsx(Yn,{role:j.with,small:!0}),j.id,j.thinking&&!k&&t.jsxs("span",{className:`cdots sm c-${j.with}`,children:[t.jsx("i",{}),t.jsx("i",{}),t.jsx("i",{})]}),b>0&&!k&&t.jsx("span",{className:"cbadge",children:b})]},j.id)})}),e?t.jsx(m1,{id:e,size:"phone",onOpenDoc:i},e):t.jsx("div",{className:"cempty",children:"No talks yet."}),r&&t.jsx("div",{className:"cph-doc",children:t.jsx(i1,{doc:r,onClose:()=>i(null)})})]})}function F_(){return we({queryKey:["overview"],queryFn:()=>ke("/api/v1/overview"),refetchInterval:e=>e.state.data?.talk?.thinking||e.state.data?.handover==="reading"?1e3:3e3})}function z_(e){return e?new Date(e).toDateString()===new Date().toDateString()?`Read today at ${Rn(e)}`:`Read on ${Is(e)}`:""}function q_(){const e=F_(),n=oe(),s=qt(),[r,i]=C.useState(!1),[o,l]=C.useState(!1),d=e.data;if(e.isLoading)return t.jsx("div",{className:"center",children:"Loading the overview…"});if(!d)return t.jsx("div",{className:"center",children:"No overview yet."});const u=m=>void s({to:"/board",search:{ticket:m.id}}),h=d.empty&&d.handover==="ready"&&(!d.idea||o);return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"top",children:[t.jsx(L,{as:"h1",text:d.project}),d.readAt&&!d.empty&&t.jsx("span",{className:"note ob-read",children:z_(d.readAt)}),t.jsx("span",{className:"grow"}),d.handover!=="reading"&&!d.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(Es,{size:14})," Read it again"]}),t.jsx(te,{text:d.command})]}),t.jsx("div",{className:"scroll",children:t.jsxs("div",{className:"page ob-page",children:[d.self&&t.jsx(U1,{title:"squad-kit's own code",text:d.self}),d.handover==="reading"&&t.jsx(u4,{}),h&&t.jsx(L_,{v:d,onSent:()=>l(!1),onWrite:()=>i(!0)}),d.handover==="ready"&&!h&&!d.talk?.open&&t.jsx(M_,{v:d,...d.empty?{onChange:()=>l(!0)}:{}}),d.talk?.open&&t.jsx(O_,{t:d.talk}),d.brd&&t.jsxs("div",{className:"ob-card ready",children:[t.jsxs("span",{className:"grow",children:[t.jsx("b",{children:"Your stories start from your BRD"}),t.jsxs("span",{children:["There is no code yet. The Analyst reads ",t.jsx(L,{text:d.brd.title})," and asks only about real gaps. You approve the stories, then the squad builds them."]})]}),t.jsxs(xe,{to:"/requirements/$id",params:{id:d.brd.id},className:"btn pri",children:["Open the BRD ",t.jsx(ai,{size:15})]})]}),d.handover==="approved"&&d.approved&&t.jsxs("div",{className:"calmlane ob-approved",children:[t.jsx("span",{className:"glyph",children:t.jsx(fe,{size:14,strokeWidth:2.5})}),t.jsxs("span",{children:[t.jsxs("b",{children:[d.approved.by," approved this on ",Is(d.approved.at),"."]})," ",d.rules.length?"The squad follows these rules. ":"","This page stays up to date after every merged ticket."]})]}),d.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"})]}),d.empty?!h&&!d.brd&&d.handover!=="reading"&&t.jsxs("div",{className:"ob-row2",children:[t.jsx(qj,{v:d}),t.jsx(Lj,{v:d,onCreated:u,onWrite:()=>i(!0)})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"ob-row2",children:[t.jsx(qj,{v:d}),t.jsx(__,{v:d})]}),d.parts.length>0?t.jsx(D_,{v:d}):d.map.length>0?t.jsx(B_,{v:d}):null,t.jsxs("div",{className:"ob-row3",children:[t.jsx(W_,{v:d}),t.jsx(U_,{v:d}),t.jsx(Lj,{v:d,onCreated:u,onWrite:()=>i(!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(xe,{to:"/architecture",children:"Architecture page"}),"."]})]})]})}),r&&t.jsx(ow,{onClose:()=>i(!1),onCreated:u})]})}function L_({v:e,onSent:n,onWrite:s}){const r=oe(),[i,o]=C.useState(e.idea??""),l=()=>{!i.trim()||r.isPending||r.mutate({path:"/api/v1/overview/idea",body:{text:i},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(Yn,{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:ge(i),value:i,placeholder:"For example: a page where staff write down visitors' names and see today's list","aria-label":"What you want to build",onChange:d=>o(d.target.value),onKeyDown:d=>{d.key==="Enter"&&!d.shiftKey&&!d.nativeEvent.isComposing&&(d.preventDefault(),l())}}),t.jsxs("div",{className:"crow",children:[t.jsx("span",{className:"grow"}),t.jsx("button",{className:"csend","aria-label":"Send",disabled:!i.trim()||r.isPending,onClick:l,children:t.jsx(ds,{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(te,{text:'squad overview --build "…"'})]})]})}function M_({v:e,onChange:n}){const s=oe(),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(Gn,{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(Gn,{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(fe,{size:15})," Looks right, start working"]}),t.jsx(te,{text:"squad overview --approve"})]})]})}function O_({t:e}){const n=oe(),[s,r]=$e("overview","talk",""),i=e.messages.some(l=>l.who==="you"),o=(l=s)=>{!l.trim()||e.thinking||n.isPending||n.mutate({path:"/api/v1/overview/talk",body:{text:l}},{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(Yn,{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(Ve,{size:15})})]}),t.jsxs("div",{className:"ob-thread ccol",children:[e.messages.map((l,d)=>l.who==="you"?t.jsxs("div",{className:"cyou cmsg",children:[t.jsx("div",{className:"cybub",children:t.jsx(aa,{text:l.text,ticket:""})}),t.jsxs("span",{className:"cmeta",children:["You · ",Rn(l.at)]})]},d):l.who==="squad"?t.jsx("div",{className:"cnote-w cmsg",children:t.jsx(L,{className:"cnote-pill",text:l.text})},d):t.jsxs("div",{className:"cag cmsg ag-architect",children:[t.jsx(Yn,{role:"architect"}),t.jsxs("div",{className:"cwho",children:[t.jsx("b",{children:"Architect"}),t.jsx("span",{className:"ctime",children:Rn(l.at)})]}),t.jsxs("div",{className:"cagb",children:[t.jsx(aa,{text:l.text,ticket:""}),l.options&&l.options.length>0&&d===e.messages.length-1&&t.jsx("div",{className:"cchoices",children:l.options.map(u=>t.jsx("button",{className:"cch",onClick:()=>o(u),children:t.jsx(L,{text:u})},u))})]})]},d)),e.thinking&&t.jsxs("div",{className:"cag cmsg ag-architect thinking",children:[t.jsx(Yn,{role:"architect",live:!0}),t.jsxs("div",{className:"cwho",children:[t.jsx("b",{children:"Architect"}),t.jsx("span",{className:"shim",children:i?"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:ge(s),value:s,placeholder:"What did squad-kit get wrong? In Arabic or English","aria-label":"Your message",onChange:l=>r(l.target.value),onKeyDown:l=>{l.key==="Enter"&&!l.shiftKey&&!l.nativeEvent.isComposing&&(l.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(Qn,{size:12,fill:"currentColor"})," Stop"]}):t.jsx("button",{className:"csend","aria-label":"Send",disabled:!s.trim()||n.isPending,onClick:()=>o(),children:t.jsx(ds,{size:17})})]})]}),t.jsxs("div",{className:"ob-talk-f",children:[t.jsxs("button",{className:"btn pri",disabled:!i||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(Es,{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(te,{text:'squad overview --wrong "…"'})]})]})}function qj({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(L,{as:"p",className:"ob-lead",text: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(L,{as:"p",text: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.jsx(L,{as:"li",text:s.text,children:s.id&&t.jsxs(xe,{to:"/board",search:{ticket:s.id},className:"pill ok sm ob-new",title:"Merged since the first read",children:["new · ",s.id]})},r))})]})]})]})}function __({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(fe,{size:14})," ",n.files?`Read the project: ${n.files} ${n.files===1?"file":"files"}`:"Read the project"]}),(n.tests??[]).map((i,o)=>t.jsxs("li",{className:i.ok?"ok":"bad",children:[i.ok?t.jsx(fe,{size:14}):t.jsx(Cs,{size:14}),t.jsxs("span",{children:[i.ok?`Ran your tests: ${i.passed!==void 0?`${i.passed} pass`:"they pass"}`:"Your tests did not pass here",!i.ok&&i.output&&t.jsx("button",{className:"btn sm quiet",onClick:()=>r(s===o?null:o),children:s===o?"Hide":"See what failed"})]}),s===o&&i.output&&t.jsx("pre",{className:"ob-out",children:`${i.command}:
|
|
698
|
-
${i.output}`})]},o)),n.tests?.length===0&&t.jsxs("li",{className:"skip",children:[t.jsx(Cs,{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(fe,{size:14}):t.jsx(Cs,{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:`${Vn(`/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(fe,{size:14})," ",n.unsaved?`${n.unsaved} changes here are not saved yet: squad-kit works from what is saved`:"All the code here is saved"]})]}):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 D_({v:e}){const[n,s]=C.useState(null),{columns:r,below:i}=_9(e.parts,e.links),o=l=>{const d=D9(l,e.parts,e.links);return t.jsxs("button",{className:`ob-node k-${l.kind??"part"} ${n===l.id?"on":""}`,onClick:()=>s(n===l.id?null:l.id),"aria-expanded":n===l.id,children:[t.jsx(L,{as:"b",text:l.name}),l.what&&t.jsx(L,{text:l.what}),l.files.length>0&&n===l.id&&t.jsx("code",{children:l.files.join(`
|
|
699
|
-
`)}),n===l.id&&d&&t.jsx("small",{children:d})]},l.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((l,d)=>t.jsxs("div",{className:"ob-col-w",children:[d>0&&t.jsxs("span",{className:"ob-arw","aria-hidden":!0,children:[t.jsx(ai,{size:16,className:"h"}),t.jsx(n7,{size:16,className:"v"})]}),t.jsx("div",{className:"ob-col",children:l.map(o)})]},d))}),i.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:i.map(o)})]}),e.product&&t.jsxs("p",{className:"ob-product",children:[t.jsx(L,{text:e.product})," ",t.jsx(xe,{to:"/settings",className:"ob-more",children:"An engineer can correct this in Settings"})]})]})}function B_({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(L,{as:"b",text:n.area}),t.jsx(L,{text:n.detail})]},n.area))]})}function W_({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.jsx(L,{as:"li",title:r.why,text:r.title,children:r.proposed&&e.handover!=="ready"&&t.jsx("span",{className:"pill you sm ob-new",children:"proposed"})},r.id))}),n.length>0&&t.jsx(xe,{to:"/architecture",search:{view:"list"},className:"ob-more",children:"Review them one by one"})]})}function U_({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(L,{as:"li",text:n},s))}):t.jsx("p",{className:"note",children:"Nothing yet."})]})}function Lj({v:e,onCreated:n,onWrite:s}){const r=oe();return t.jsxs("section",{className:"ob-c",children:[t.jsx("h3",{children:e.empty?"Your first stories":e.since.length&&!e.ideas.length?"What next":"Good first tickets"}),t.jsx("ul",{className:"ob-ideas",children:e.ideas.map((i,o)=>t.jsxs("li",{children:[t.jsxs("span",{...De(i.title),children:[t.jsx(L,{as:"b",text:i.title}),i.why&&t.jsx(L,{as:"small",text:i.why})]}),i.ticket?t.jsx(xe,{to:"/board",search:{ticket:i.ticket},className:"btn sm",children:i.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:l=>n(l)}),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.":e.since.length?"Write a new ticket.":"Write your first ticket."})]}),e.ideas.some(i=>!i.ticket)&&t.jsx(te,{text:`squad overview --idea ${e.ideas.findIndex(i=>!i.ticket)+1}`}),!e.ideas.length&&t.jsxs("button",{className:"btn sm pri",onClick:s,children:[t.jsx(xt,{size:14})," New ticket"]})]})}function H_(){const e=ou(),n=oe(),{theme:s,toggleTheme:r}=qe(),i=e.data?.setup,o=i?i.steps.some(l=>l.state==="now"||l.state==="todo")&&!i.steps.some(l=>l.state==="stopped"||l.id==="read"&&l.state==="failed"):!1;return t.jsxs("div",{className:"ob-setup",children:[t.jsxs("header",{className:"cpage-h",children:[t.jsxs(xe,{to:"/board",className:"btn",children:[t.jsx(Wk,{size:15})," See the board meanwhile"]}),t.jsx("span",{className:"grow"}),t.jsx(te,{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(il,{size:16}):t.jsx(ol,{size:16})})]}),t.jsx("div",{className:"scroll",children:t.jsx("div",{className:"ob-setup-b",children:e.isLoading?null:i?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"ob-head",children:[t.jsx("div",{className:"ob-proj",children:i.project}),t.jsx("h2",{children:i.approved?"Your project is set up":i.ready?i.empty?"Your new project is ready":"squad-kit knows your project now":"Getting to know your project"}),t.jsx("p",{children:i.ready||i.approved?i.empty?"Tell the Architect what you want to build, on the Overview.":"Check what it understood on the Overview, then start your first ticket.":i.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."})]}),i.self&&t.jsx(U1,{title:"squad-kit's own code",text:i.self}),t.jsx(Pq,{s:i}),i.ready&&!i.approved&&t.jsxs("div",{className:"ob-card ready",children:[t.jsx("span",{className:"ob-ring",children:t.jsx(fe,{size:16,strokeWidth:2.5})}),t.jsxs("span",{className:"grow",children:[t.jsx("b",{children:i.empty?i.idea?"Your first stories are ready":"One question for you":"Your project overview is ready"}),t.jsx("span",{children:i.empty?i.idea?"What the Architect understood from what you said, for you to check.":"What do you want to build?":"What squad-kit understood, for you to check before the first ticket."})]}),t.jsxs(xe,{to:"/overview",className:"btn pri",children:[i.empty&&!i.idea?"Answer it":"Check what squad-kit understood"," ",t.jsx(ai,{size:15})]})]}),t.jsxs("div",{className:"ob-acts",children:[t.jsx(Aq,{s:i}),o&&t.jsx("button",{className:"btn",disabled:n.isPending||i.stopping,onClick:()=>n.mutate({path:"/api/v1/setup/stop",done:"Stopped. Start it again any time."}),children:i.stopping?"Stopping…":"Stop"}),o&&t.jsx(te,{text:"squad setup --stop"}),t.jsx("span",{className:"grow"}),t.jsx(Rq,{s:i})]}),!i.approved&&t.jsx(Eq,{s:i})]}):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(xe,{to:"/overview",children:"Overview"}),"."]})]})})})]})}const ls=e=>`/api/v1/requirements/${encodeURIComponent(e)}`;function V_(e,n){const[s,r]=C.useState(Date.now());return C.useEffect(()=>{if(!n)return;const i=setInterval(()=>r(Date.now()),e);return()=>clearInterval(i)},[e,n]),s}function K_({s:e}){return t.jsx("span",{className:`rq-dot ${e.state}`,"aria-hidden":"true",children:e.state==="done"?t.jsx(fe,{size:12,strokeWidth:3.2}):e.state==="now"?t.jsx("i",{}):null})}const Y_={done:"Done",now:"Now",todo:"Still to come",failed:"Stopped here"};function Q1({v:e}){const n=Pt();return!e.mine||!e.state.job?.heldFor?null:e.state.job.heldFor==="long"?t.jsxs("button",{className:"btn pri",disabled:n.isPending,title:`squad requirements retry ${e.id}`,onClick:()=>n.mutate({path:`${ls(e.id)}/retry`,done:"The Analyst starts reading."}),children:[t.jsx(gn,{size:13})," Read it"]}):t.jsxs("button",{className:"btn pri",disabled:n.isPending,title:`squad requirements retry ${e.id}`,onClick:()=>n.mutate({path:`${ls(e.id)}/retry`,done:"The Analyst goes on past this month's budget, for the rest of the month."}),children:[t.jsx(gn,{size:13})," Carry on"]})}function G_({v:e}){const n=Pt(),s=e.state.job,r=xi(s),i=V_(5e3,r),o=sS(e),l=s?.status==="stopping",d=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":d,children:[t.jsxs("div",{className:"rq-reading-head",children:[t.jsx("h2",{children:d}),t.jsx("span",{className:"rq-clock",children:tS(s,i)})]}),t.jsx("ol",{className:"rq-steps",children:o.map(u=>t.jsxs("li",{className:`rq-step ${u.state}`,children:[t.jsx(K_,{s:u}),t.jsxs("div",{className:"rq-step-t",children:[t.jsxs("b",{children:[u.title,t.jsxs("span",{className:"sr-only",children:[": ",Y_[u.state]]})]}),t.jsx(L,{text:u.sub}),u.bar&&u.state==="now"&&t.jsxs("span",{className:"rq-readbar",role:"progressbar","aria-valuemin":0,"aria-valuemax":u.bar.of,"aria-valuenow":u.bar.done,"aria-label":"How far the Analyst read",children:[t.jsx("i",{style:{flexGrow:Math.max(0,u.bar.done)}}),t.jsx("em",{style:{flexGrow:Math.max(0,u.bar.of-u.bar.done)}})]})]})]},u.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."}),t.jsx(Q1,{v:e}),e.mine&&r&&t.jsxs("button",{className:"btn",disabled:l||n.isPending,title:`squad requirements stop ${e.id}`,onClick:()=>n.mutate({path:`${ls(e.id)}/stop`,done:"Stopping the Analyst. Try again carries on from here."}),children:[t.jsx(Qn,{size:13})," ",l?"Stopping…":"Stop"]})]})]})}function Q_({v:e}){const n=Pt(),s=qt(),[r,i]=C.useState(!1),o=/^You stopped\b/.test(e.error??e.state.job?.error??""),l=!!e.state.job?.capped,d=o?"You stopped the Analyst":l?"The Analyst reached its limit":"The Analyst stopped";return t.jsx(u1,{calm:o,title:d,what:t.jsx(L,{as:"div",text:mS(e.error??e.state.job?.error??"The read did not get through.",d)}),safe:["Your document is saved.",...e.epics.length?["What the Analyst wrote so far is kept."]:[]],hint:t.jsx(te,{text:`squad requirements ${l?"more":"retry"} ${e.id}`}),ways:e.mine?[l?{label:"Give it more",primary:!0,icon:t.jsx(xt,{size:14}),onClick:()=>n.mutate({path:`${ls(e.id)}/more`,done:"The Analyst carries on with more room."}),disabled:n.isPending,title:`squad requirements more ${e.id}. It carries on where it stopped, with twice the turns and spend for this step.`}:{label:"Try again",primary:!0,icon:t.jsx(oi,{size:14}),onClick:()=>n.mutate({path:`${ls(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(Pn,{size:14}),title:`squad requirements delete ${e.id}`,disabled:n.isPending,onClick:()=>n.mutate({path:ls(e.id),method:"DELETE",done:`Deleted ${e.id}.`},{onSuccess:()=>void s({to:"/requirements"})})},{label:"Keep it",onClick:()=>i(!1)}]:[{label:"Delete this breakdown",icon:t.jsx(Pn,{size:14}),onClick:()=>i(!0),title:"Deletes the breakdown and its document"}]]:[]})}function Z_({v:e,onOpenRef:n}){const s=Pt(),[r,i]=C.useState(()=>Object.fromEntries(e.questions.filter(p=>p.answer).map(p=>[p.id,p.answer]))),o=e.questions,l=p=>{const x=r[p];return!!(x&&(x.choice!=="Other"||x.value?.trim()))},d=o.every(p=>l(p.id)),u=xi(e.state.job)&&e.state.job?.step!=="reply",h=e.decided.length,m=()=>{if(!o.filter(y=>l(y.id)).length)return s.mutate({path:`${ls(e.id)}/skip`,done:"The Analyst decides the open questions and writes each one down."});const x=Object.fromEntries(o.map(y=>[y.id,l(y.id)?r[y.id]:{choice:Ly}]));s.mutate({path:`${ls(e.id)}/answers`,body:{answers:x},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.",h>0&&` The Analyst decided ${h} small ${h===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?t.jsxs(t.Fragment,{children:[": ",t.jsx(L,{text:e.state.job.error})]}):"."," ",e.mine&&t.jsx("button",{className:"rq-link",onClick:()=>s.mutate({path:`${ls(e.id)}/${e.state.job?.capped?"more":"retry"}`,done:"The Analyst tries to answer again."}),children:e.state.job.capped?"Give it more":"Try again"})]}),e.state.job?.heldFor==="budget"&&e.state.job.step==="reply"&&t.jsxs("div",{className:"rq-jobline",role:"status",children:[t.jsx(L,{text:e.state.job.now??""}),t.jsx(Q1,{v:e})]}),o.map((p,x)=>t.jsx(X_,{v:e,q:p,n:x+1,answer:r[p.id],onAnswer:y=>i(j=>({...j,[p.id]:y})),onOpenRef:n},p.id)),e.mine&&t.jsxs("div",{className:"rq-qfoot",children:[t.jsx(te,{text:`squad requirements answer ${e.id}`}),t.jsx("span",{className:"grow"}),t.jsx("button",{className:"btn",disabled:s.isPending||u,onClick:m,title:`squad requirements answer ${e.id} --skip`,children:Ly}),t.jsxs("button",{className:"btn you",disabled:!d||s.isPending||u,onClick:()=>s.mutate({path:`${ls(e.id)}/answers`,body:{answers:r},done:"Answers sent. The Analyst writes the breakdown now."}),children:[t.jsx(Ps,{size:14})," Send answers"]})]})]})}function X_({v:e,q:n,n:s,answer:r,onAnswer:i,onOpenRef:o}){const l=Pt(),[d,u]=$e(e.id,`ask-${n.id}`,""),[h,m]=C.useState(!!d),p=`q-${e.id}-${n.id}`,x=()=>{d.trim()&&(l.mutate({path:`${ls(e.id)}/questions/${n.id}/ask`,body:{text:d}},{onSuccess:()=>u("")}),m(!1))},y=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((j,k)=>t.jsxs("span",{children:[k>0&&(k===(n.refs?.length??0)-1?" and ":", "),t.jsx("button",{className:"rq-link",onClick:()=>o(j),title:"Open this place in the document",children:t.jsx(L,{text:iS(j)})})]},k)),n.refs?.length&&n.impact?" · ":"",n.impact&&t.jsx(L,{text:n.impact})]})]}),t.jsx(L,{as:"div",className:"rq-qt",text:n.text}),(n.thread?.length||n.thinking)&&t.jsxs("div",{className:"thread",dir:De(n.text).dir,children:[n.thread?.map((j,k)=>t.jsxs("div",{className:`msg ${j.who==="you"?"":"squad"}`,children:[t.jsx("small",{children:j.who==="you"?"You":Ys[j.who]}),t.jsx(L,{as:"div",text:j.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(j=>t.jsxs("label",{className:`rq-opt ${r?.choice===j?"on":""}`,...De(j),children:[t.jsx("input",{type:"radio",name:p,checked:r?.choice===j,onChange:()=>i({choice:j}),disabled:!e.mine}),t.jsx(L,{text:j})]},j)),t.jsxs("label",{className:`rq-opt ${y?"on":""}`,children:[t.jsx("input",{type:"radio",name:p,checked:y,onChange:()=>i({choice:"Other",value:r?.value??""}),disabled:!e.mine}),"Something else…"]}),y&&t.jsx("input",{className:"input rq-own",autoFocus:!0,"aria-label":"Your answer",placeholder:"Your answer",dir:ge(r?.value??""),value:r?.value??"",onChange:j=>i({choice:"Other",value:j.target.value})}),e.mine&&(h?t.jsxs("div",{className:"askrow",children:[t.jsx("input",{className:"input",autoFocus:!0,dir:ge(d),value:d,onChange:j=>u(j.target.value),placeholder:"Ask the Analyst about this question","aria-label":"Your question to the Analyst",onKeyDown:j=>j.key==="Enter"&&x()}),t.jsx("button",{className:"btn",onClick:x,disabled:!d.trim()||l.isPending,children:"Ask"}),t.jsx("button",{className:"btn quiet",onClick:()=>m(!1),children:"Cancel"})]}):t.jsxs("button",{className:"asklink",onClick:()=>m(!0),disabled:n.thinking,title:`squad requirements ask ${e.id} ${n.id} "<text>"`,children:[t.jsx(Gn,{size:14})," Ask about this"]}))]})}const si=e=>`/api/v1/requirements/${encodeURIComponent(e)}`,Fd={epic:"Epic",feature:"Feature",story:"Story"};function Jo(e){return e.mine&&(e.status==="ready"||e.status==="approved")}function J_(e){const n=e.state.job;return xi(n)&&n?.step==="redo"?n.item??null:null}function u3(e,n){const s=J_(e);if(!s)return!1;if(s===e.id||s===n)return!0;const r=Zn(e,s);return!r||r.level==="story"?!1:yi(r.item).some(i=>i.key===n)||r.level==="epic"&&r.epic.features.some(i=>i.key===n)}function Kp({v:e,mode:n,selected:s,open:r,onToggle:i,onSelect:o,onDecide:l,onAdd:d}){const u=C.useMemo(()=>new Map(e.progress.map(y=>[y.key,y])),[e.progress]),h=Zn(e,s),m=h?h.level==="epic"?h.epic.features[0]?.key??h.epic.key:h.feature?.key??h.epic.key:void 0,p=h?.epic.key,x=(y,j)=>t.jsx(tD,{s:y,p:u.get(y.key),depth:j,mode:n,selected:s===y.key,onSelect:o,onDecide:l},y.key);return t.jsxs("section",{className:`rq-tree ${n} ${e.epics.some(y=>yi(y).some(j=>j.tracker))?"refs":""} ${o?"":"still"}`,"aria-label":"Breakdown",children:[e.epics.map(y=>{const j=r.has(y.key);return t.jsxs("div",{className:"rq-group",children:[t.jsx(Mj,{level:"epic",item:y,depth:0,mode:n,isOpen:j,selected:s===y.key,progress:u,onToggle:i,onSelect:o}),j&&t.jsxs(t.Fragment,{children:[y.features.map(k=>{const b=r.has(k.key);return t.jsxs("div",{className:"rq-sub",children:[t.jsx(Mj,{level:"feature",item:k,depth:1,mode:n,isOpen:b,selected:s===k.key,progress:u,onToggle:i,onSelect:o}),b&&k.stories.map(w=>x(w,2)),b&&!k.stories.length&&t.jsx("div",{className:"rq-none d2",children:"No stories yet."})]},k.key)}),y.stories.map(k=>x(k,1)),!y.features.length&&!y.stories.length&&t.jsx("div",{className:"rq-none d1",children:"Nothing under this epic yet."})]})]},y.key)}),!e.epics.length&&t.jsx("p",{className:"note rq-none",children:"No epics yet."}),d&&Jo(e)&&t.jsxs("div",{className:"rq-adds",children:[t.jsxs("button",{className:"btn rq-addbtn",onClick:()=>d("epic"),title:`squad requirements add-item ${e.id} --title "…"`,children:[t.jsx(xt,{size:14})," Add an epic"]}),e.epics.length>0&&t.jsxs("button",{className:"btn rq-addbtn",onClick:()=>d("feature",p??e.epics.at(-1)?.key),children:[t.jsx(xt,{size:14})," Add a feature"]}),e.epics.length>0&&t.jsxs("button",{className:"btn rq-addbtn",onClick:()=>d("story",m),children:[t.jsx(xt,{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 Mj({level:e,item:n,depth:s,mode:r,isOpen:i,selected:o,progress:l,onToggle:d,onSelect:u}){const h=yi(n),m=vd(h,l),p=e==="feature"?h.filter(y=>l.get(y.key)?.state==="building").map(y=>y.key):[],x=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":i,"aria-label":`${i?"Fold":"Open"} ${n.title}`,onClick:()=>d(n.key),children:i?t.jsx(Dd,{size:14,strokeWidth:2.4}):t.jsx(Bd,{size:14,strokeWidth:2.4})}),t.jsxs(p3,{onClick:u&&(()=>u(n.key)),current:o,label:`${Fd[e]} ${n.key} ${n.title}`,children:[t.jsx("span",{className:`rq-lv ${e}`,children:Fd[e]}),t.jsx(L,{className:"rq-t",title:n.title,text:n.title}),r==="plan"&&x&&t.jsx(L,{className:"rq-meta rq-goal",text:x}),r==="build"&&p.length>0&&t.jsxs("span",{className:"rq-meta rq-live",children:[p.join(", ")," building"]}),t.jsx("span",{className:"grow"}),r==="plan"?t.jsx("span",{className:"rq-meta",children:Ev(n)}):t.jsxs(t.Fragment,{children:[t.jsx(h3,{...m}),t.jsxs("span",{className:"rq-meta rq-of",children:[m.done," of ",m.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 eD({p:e}){const n=Im(e?.state);return t.jsxs("span",{className:`rq-st ${n} ${e?.state??"not-started"}`,children:[n==="m"?t.jsx(fe,{size:13,strokeWidth:3,"aria-hidden":"true"}):n==="b"?t.jsx("span",{className:"live","aria-hidden":"true"}):null,t.jsx(L,{className:"rq-stl",text:e?.line??"Not started"})]})}function tD({s:e,p:n,depth:s,mode:r,selected:i,onSelect:o,onDecide:l}){const d=n?.state==="needs-you",u=e.tracker;return t.jsxs("div",{className:`rq-row story d${s} ${i?"sel":""} ${d?"you":""}`,onClick:o&&(()=>o(e.key)),children:[t.jsxs(p3,{onClick:o&&(()=>o(e.key)),current:i,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(L,{className:"rq-t",title:e.title,text:e.title}),r==="plan"&&t.jsxs(t.Fragment,{children:[e.dependsOn.slice(0,2).map(h=>t.jsxs("span",{className:"rq-need",children:["needs ",h]},h)),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:rS(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??"–"})]}),r==="build"&&(u?.url?t.jsx("a",{className:"rq-ref",href:u.url,target:"_blank",rel:"noreferrer",title:`Open ${u.ref}`,onClick:h=>h.stopPropagation(),children:u.ref}):t.jsx("span",{className:"rq-ref",children:u?.ref??""})),r==="build"&&t.jsxs("span",{className:`rq-stcol ${d?"you":""}`,children:[t.jsx(eD,{p:n}),d&&n?.ticket&&t.jsx("button",{className:"btn you sm",onClick:h=>{h.stopPropagation(),l(n.ticket)},"aria-label":`Decide on ${e.key} ${e.title}`,children:"Decide"})]})]})}function nD(e){const n=Zn(e.v,e.k);return n?n.level==="story"?t.jsx(rD,{...e,f:n},n.item.key):t.jsx(iD,{...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:Fd[e.level]}),t.jsx("span",{className:"rq-id",children:e.item.key}),t.jsx("span",{className:"rq-place",children:t.jsx(iv,{path:aS(e)})}),t.jsx("span",{className:"grow"}),t.jsx("button",{className:"iconbtn","aria-label":"Close",onClick:n,children:t.jsx(Ve,{size:15})})]})}const sD=e=>({title:e.title,story:e.story,criteria:e.criteria.map(n=>({...n})),size:e.size,needs:[...e.dependsOn]}),So=(e,n)=>JSON.stringify(e)===JSON.stringify(n);function m3(e,n,s){const r=la(Ct,e,`panel-${n}`),[i,o]=C.useState(()=>Wo(r)??s),[l,d]=C.useState({key:n,server:s}),u=!So(i,l.server);return C.useEffect(()=>{u&&n===l.key?a1(r,i):Uo(r)},[r,i,u]),C.useEffect(()=>{if(n!==l.key){o(s),d({key:n,server:s});return}So(s,l.server)||(!u||So(i,s))&&(o(s),d({key:n,server:s}))},[n,s]),[i,o,u&&n===l.key,()=>o(l.server)]}function rD({v:e,f:n,onClose:s,onSelect:r,onAsk:i,onOpenRef:o,onOpenTicket:l}){const d=n.story,u=Pt(),{toast:h}=qe(),m=e.progress.find(M=>M.key===d.key),p=!!(d.ticket&&m?.ticket),x=u3(e,d.key),y=Jo(e)&&!p&&!x,j=C.useMemo(()=>sD(d),[d]),[k,b,w,S]=m3(e.id,d.key,j),[T,A]=C.useState(!1),[D,$]=C.useState(!1),P=e.decided.filter(M=>M.item===d.key),F=uS(e,d),_=e.status==="approved",z=M=>Zn(e,M)?.item.title??"",U=()=>{const M=By(k.criteria);if(M.length!==k.criteria.length&&b(ce=>({...ce,criteria:By(ce.criteria)})),M.some(mp)){$(!0),requestAnimationFrame(()=>[...document.querySelectorAll(".rq-gwt.half textarea")].find(ce=>!ce.value.trim())?.focus());return}$(!1);const G={};k.title!==d.title&&(G.title=k.title),k.story!==d.story&&(G.story=k.story),So(M,d.criteria)||(G.criteria=M),k.size!==d.size&&(G.size=k.size),So(k.needs,d.dependsOn)||(G.needs=k.needs),Object.keys(G).length&&u.mutate({path:`${si(e.id)}/items/${d.key}`,method:"PATCH",body:G,done:`Saved ${d.key}.`})},I=(M,G,ce)=>b(V=>({...V,criteria:V.criteria.map((Y,se)=>se===M?{...Y,[G]:ce}:Y)})),W=ez(e,d.key,k.needs);return t.jsxs("aside",{className:"rq-panel","aria-label":`Story ${d.key}`,"data-dirty":w,children:[t.jsx(f3,{f:n,onClose:s}),t.jsxs("div",{className:"rq-pbody",children:[p&&t.jsxs("div",{className:`rq-started ${Im(m?.state)}`,children:[t.jsxs("span",{children:[t.jsx("b",{className:"mono",children:d.ticket})," ",t.jsx(L,{text:m?.line??""})]}),t.jsx("button",{className:`btn sm ${m?.state==="needs-you"?"you":""}`,onClick:()=>l(d.ticket),children:m?.state==="needs-you"?"Decide":"Open the ticket"})]}),p&&t.jsxs("p",{className:"note",children:["It started as ",d.ticket,", so it changes on its ticket now."]}),x&&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"}),y?t.jsx("input",{id:"rq-st",className:"input rq-titlein",dir:ge(k.title),value:k.title,onChange:M=>b(G=>({...G,title:M.target.value}))}):t.jsx(L,{as:"div",id:"rq-st",className:"rq-ro rq-titlein",text:d.title})]}),t.jsxs("div",{className:"field",children:[t.jsx("label",{htmlFor:"rq-ss",children:"Story"}),y?t.jsx("textarea",{id:"rq-ss",className:"textarea rq-storyin",dir:ge(k.story),value:k.story,placeholder:"As a …, I want …, so that …",onChange:M=>b(G=>({...G,story:M.target.value}))}):d.story?t.jsx(L,{as:"div",id:"rq-ss",className:"rq-ro",text:d.story}):t.jsx("div",{id:"rq-ss",className:"rq-ro",children: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((M,G)=>t.jsxs("div",{className:`rq-gwt ${D&&mp(M)?"half":""}`,children:[["given","when","then"].map(ce=>t.jsxs("label",{className:"rq-gwtrow",children:[t.jsx("b",{children:ce.charAt(0).toUpperCase()+ce.slice(1)}),y?t.jsx("textarea",{rows:Math.max(1,Math.ceil(M[ce].length/40)),dir:ge(M[ce]),value:M[ce],onChange:V=>I(G,ce,V.target.value.replace(/\n/g," ")),"aria-label":`Check ${G+1}: ${ce}`}):t.jsx(L,{text:M[ce]})]},ce)),y&&t.jsx("button",{className:"rq-gwt-x","aria-label":`Remove check ${G+1}`,onClick:()=>b(ce=>({...ce,criteria:ce.criteria.filter((V,Y)=>Y!==G)})),children:t.jsx(Ve,{size:13})}),D&&mp(M)&&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.'}),y&&t.jsx("button",{className:"rq-link",onClick:()=>b(M=>({...M,criteria:[...M.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(M=>t.jsxs("span",{className:"rq-need big",children:[t.jsxs("button",{className:"rq-needname",onClick:()=>r(M),title:`Open ${M} ${z(M)}`,children:[t.jsx("b",{children:M}),t.jsx(L,{text:z(M)})]}),y&&t.jsx("button",{"aria-label":`${d.key} does not need ${M}`,onClick:()=>b(G=>({...G,needs:G.needs.filter(ce=>ce!==M)})),children:t.jsx(Ve,{size:11})})]},M)),!k.needs.length&&!y&&t.jsx("span",{className:"note",children:"Nothing first"}),y&&W.length>0&&t.jsxs("select",{className:"rq-addneed","aria-label":`Add a story ${d.key} needs first`,value:"",onChange:M=>M.target.value&&b(G=>({...G,needs:[...G.needs,M.target.value]})),children:[t.jsx("option",{value:"",children:"+ Add"}),W.map(M=>t.jsx("option",{value:M.key,children:hs(M.label)},M.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(M=>t.jsx("button",{className:k.size===M?"on":"","aria-pressed":k.size===M,disabled:!y,onClick:()=>b(G=>({...G,size:M})),children:M},M))})]})]}),y&&t.jsx(g3,{v:e,f:n}),d.ref&&t.jsxs("div",{className:"rq-fromline",children:["From the BRD:"," ",t.jsx("button",{className:"rq-link",onClick:()=>o(d.ref),children:t.jsx(L,{text:hl(d.ref)})})]}),P.length>0&&t.jsxs("div",{className:"rq-dbox",children:[t.jsx("div",{className:"rq-lab",children:"Decided for you"}),P.map(M=>t.jsx(Z1,{v:e,d:M,compact:!0,onOpenTicket:l},`${M.ticket??""}${M.id}`))]}),_&&!p&&t.jsxs("div",{className:"rq-startbox",children:[t.jsxs("button",{className:"btn",disabled:F.length>0||u.isPending||!e.mine||!d.criteria.length||w,onClick:()=>u.mutate({path:`${si(e.id)}/items/${d.key}/start`},{onSuccess:M=>h(`${d.key} started as ${M.ticket?.id??"a ticket"}. It builds by itself.`)}),title:`squad requirements start ${e.id} ${d.key}`,children:[t.jsx(gn,{size:13})," Start this story now"]}),t.jsx("span",{className:"note",children:F.length?`It starts after ${F.join(", ")} ${F.length===1?"merges":"merge"}.`:w?"Save your changes first.":d.ticket?"Its ticket was deleted. This makes a new one that builds by itself.":"It becomes a ticket that builds by itself."})]}),!p&&t.jsx(te,{text:_?`squad requirements start ${e.id} ${d.key}`:`squad requirements edit ${e.id} ${d.key} --title ${Le(k.title)}`})]}),y&&t.jsx("div",{className:"rq-pf",children:T?t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:"rq-sure",children:["Remove ",d.key,"? It goes out of other stories' needs too."]}),t.jsx("button",{className:"btn danger",onClick:()=>u.mutate({path:`${si(e.id)}/items/${d.key}`,method:"DELETE",done:`Removed ${d.key}.`},{onSuccess:()=>r(void 0)}),children:"Remove"}),t.jsx("button",{className:"btn",onClick:()=>A(!1),children:"Keep it"})]}):t.jsxs(t.Fragment,{children:[t.jsx("button",{className:"btn",onClick:()=>i(d.key),title:`squad requirements redo ${e.id} ${d.key} "<what to change>"`,children:"Ask the Analyst to redo this"}),w?t.jsx("button",{className:"btn quiet",onClick:()=>{S(),$(!1)},children:"Undo"}):t.jsx("button",{className:"btn quiet",onClick:()=>A(!0),title:`squad requirements remove ${e.id} ${d.key}`,children:"Remove"}),t.jsx("span",{className:"grow"}),t.jsx("button",{className:"btn pri",disabled:!w||u.isPending,onClick:U,children:"Save"})]})})]})}function g3({v:e,f:n}){const s=Pt(),r=oS(e,n),i=lS(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:i,title:`squad requirements move ${e.id} ${n.item.key} --under <key>`,onChange:o=>o.target.value!==i&&s.mutate({path:`${si(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:hs(o.label)},o.key))})]})}function iD({v:e,f:n,onClose:s,onSelect:r,onAsk:i,onOpenRef:o,onOpenTicket:l,onAdd:d}){const u=Pt(),h=n.level==="epic",m=n.item,p=h?m.goal??"":m.summary??"",x=C.useMemo(()=>({title:m.title,about:p}),[m.title,p]),[y,j,k,b]=m3(e.id,m.key,x),[w,S]=C.useState(!1),T=u3(e,m.key),A=yi(m),D=new Map(e.progress.map(U=>[U.key,U])),$=A.filter(U=>U.ticket&&D.get(U.key)?.ticket),P=Jo(e)&&!T,F=vd(A,D),_=e.decided.filter(U=>U.item===m.key),z=()=>u.mutate({path:`${si(e.id)}/items/${m.key}`,method:"PATCH",body:{...y.title!==m.title?{title:y.title}:{},...y.about!==p?h?{goal:y.about}:{summary:y.about}:{}},done:`Saved ${m.key}.`});return t.jsxs("aside",{className:"rq-panel","aria-label":`${Fd[n.level]} ${m.key}`,"data-dirty":k,children:[t.jsx(f3,{f:n,onClose:s}),t.jsxs("div",{className:"rq-pbody",children:[T&&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"}),P?t.jsx("input",{id:"rq-gt",className:"input rq-titlein",dir:ge(y.title),value:y.title,onChange:U=>j(I=>({...I,title:U.target.value}))}):t.jsx(L,{as:"div",id:"rq-gt",className:"rq-ro rq-titlein",text:m.title})]}),t.jsxs("div",{className:"field",children:[t.jsx("label",{htmlFor:"rq-ga",children:h?"What it is for":"What it covers"}),P?t.jsx("textarea",{id:"rq-ga",className:"textarea rq-storyin",dir:ge(y.about),value:y.about,onChange:U=>j(I=>({...I,about:U.target.value}))}):p?t.jsx(L,{as:"div",id:"rq-ga",className:"rq-ro",text:p}):t.jsx("div",{id:"rq-ga",className:"rq-ro",children:t.jsx("span",{className:"note",children:"Nothing written yet."})})]}),t.jsxs("div",{className:"rq-stats",children:[t.jsx("span",{children:Ev(m)}),e.status==="approved"&&A.length>0&&t.jsxs("span",{children:[t.jsx(h3,{...F})," ",F.done," of ",F.of," merged"]})]}),P&&n.level==="feature"&&t.jsx(g3,{v:e,f:n}),m.ref&&t.jsxs("div",{className:"rq-fromline",children:["From the BRD:"," ",t.jsx("button",{className:"rq-link",onClick:()=>o(m.ref),children:t.jsx(L,{text:hl(m.ref)})})]}),_.length>0&&t.jsxs("div",{className:"rq-dbox",children:[t.jsx("div",{className:"rq-lab",children:"Decided for you"}),_.map(U=>t.jsx(Z1,{v:e,d:U,compact:!0,onOpenTicket:l},`${U.ticket??""}${U.id}`))]}),Jo(e)&&t.jsxs("div",{className:"rq-hereadds",children:[h&&t.jsx("button",{className:"rq-link",onClick:()=>d("feature",m.key),children:"+ Add a feature here"}),t.jsx("button",{className:"rq-link",onClick:()=>d("story",h?m.features[0]?.key??m.key:m.key),children:"+ Add a story here"})]}),t.jsx(te,{text:`squad requirements edit ${e.id} ${m.key} --title ${Le(y.title)}`})]}),P&&t.jsx("div",{className:"rq-pf",children:w?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"rq-sure",children:$.length?`${m.key} has stories that started, so it stays. Move them out first.`:`Remove ${m.key} and the ${A.length} ${A.length===1?"story":"stories"} under it?`}),!$.length&&t.jsxs("button",{className:"btn danger",onClick:()=>u.mutate({path:`${si(e.id)}/items/${m.key}`,method:"DELETE",done:`Removed ${m.key}.`},{onSuccess:()=>r(void 0)}),children:[t.jsx(Pn,{size:13})," Remove"]}),t.jsx("button",{className:"btn",onClick:()=>S(!1),children:$.length?"OK":"Keep it"})]}):t.jsxs(t.Fragment,{children:[t.jsx("button",{className:"btn",onClick:()=>i(m.key),title:`squad requirements redo ${e.id} ${m.key} "<what to change>"`,children:"Ask the Analyst to redo this"}),k?t.jsx("button",{className:"btn quiet",onClick:b,children:"Undo"}):t.jsx("button",{className:"btn quiet",onClick:()=>S(!0),title:`squad requirements remove ${e.id} ${m.key}`,children:"Remove"}),t.jsx("span",{className:"grow"}),t.jsx("button",{className:"btn pri",disabled:!k||!y.title.trim()||u.isPending,onClick:z,children:"Save"})]})})]})}function Z1({v:e,d:n,compact:s,onSelect:r,onOpenTicket:i}){const o=Pt(),{toast:l}=qe(),[d,u]=$e(n.ticket??e.id,`decided-${n.id}`,""),[h,m]=C.useState(!!d),p=!n.ticket&&e.wholeRedo&&!(n.item&&Zn(e,n.item))?e.wholeRedo:null,[x,y]=C.useState(!1),j=n.ticket?`/api/v1/tickets/${encodeURIComponent(n.ticket)}/decided/${n.id}`:`${si(e.id)}/decided/${n.id}`,k=n.ticket?`squad decided ${n.ticket} ${n.id} ${Le(d.trim()||"<text>")}`:`squad requirements decided ${e.id} ${n.id} ${Le(d.trim()||"<text>")}`,b=()=>o.mutate({path:j,body:{text:d.trim(),...p?{whole:!0}:{}},...n.ticket?{}:{done:`Changed. The Analyst redoes ${p?"the breakdown":n.item??"the breakdown"} with it.`}},{onSuccess:T=>{m(!1),y(!1),u(""),n.ticket&&l(Iv(n.ticket,T?.decided?.find(A=>A.id===n.id)?.changed?.ticket))}}),w=n.changed?.ticket,S=w?/^c\d+$/.test(w)?n.ticket:w: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:Dy(n)}):Dy(n)}),n.changed?t.jsx(L,{as:"div",className:"rq-dt",text:n.changed.text,children:t.jsxs("span",{className:"rq-was",...De(n.text),children:[t.jsx("bdi",{dir:"ltr",children:"Was:"})," ",t.jsx(L,{text:n.text}),w&&t.jsxs(t.Fragment,{children:[" · ",S&&i?t.jsx("button",{className:"rq-link rq-now",onClick:()=>i(S),title:`Open ${S}`,children:/^c\d+$/.test(w)?`now change ${w} on ${n.ticket}`:`now ${w}`}):/^c\d+$/.test(w)?`now change ${w} on ${n.ticket}`:`now ${w}`]})]})}):t.jsx(L,{as:"div",className:"rq-dt",text:n.text,children:s&&n.by==="answer"&&t.jsx("span",{className:"rq-was",dir:"ltr",children:"From your answer"})}),h?t.jsxs("div",{className:"rq-dedit",children:[t.jsx("textarea",{className:"textarea",autoFocus:!0,dir:ge(d),value:d,onChange:T=>u(T.target.value),"aria-label":"What you want instead",placeholder:"What should it be instead?"}),x&&t.jsx("p",{className:"note",role:"alert",children:p}),t.jsxs("div",{className:"rq-dedit-b",children:[t.jsx("button",{className:"btn sm pri",disabled:!d.trim()||o.isPending,onClick:()=>p&&!x?y(!0):b(),children:x?"Yes, rewrite all of it":"Save change"}),t.jsx("button",{className:"btn sm",onClick:()=>x?y(!1):m(!1),children:x?"Keep it as it is":"Cancel"}),t.jsx(te,{text:k})]})]}):!n.changed&&e.mine&&t.jsx("button",{className:"rq-link",onClick:()=>m(!0),"aria-label":`Change: ${n.text}`,children:"Change"})]})}function aD({v:e,onSelect:n,onOpenTicket:s,onClose:r}){const[i,o]=C.useState(!1),l=e.decided,d=i?l:l.slice(0,5),u=e.status==="approved"&&e.progress.some(h=>h.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:l.length})]}),r&&t.jsx("button",{className:"iconbtn rq-dclose","aria-label":"Close",onClick:r,children:t.jsx(Ve,{size:15})})]}),t.jsxs("p",{className:"rq-dlead",children:["Small choices the squad made where the BRD says nothing. Change one and ",u?"it becomes a small change ticket":"the Analyst redoes the part it is about","."]}),d.map(h=>t.jsx(Z1,{v:e,d:h,onSelect:n,onOpenTicket:s},`${h.ticket??""}${h.id}`)),!l.length&&t.jsx("p",{className:"note",children:"Nothing yet. When the squad decides a small thing itself, it shows here."}),l.length>5&&t.jsx("button",{className:"rq-link rq-showall",onClick:()=>o(!i),children:i?"Show fewer":`Show all ${l.length}`})]})})}const Gc={min:.3,max:1.6,step:.1},Oj=e=>Math.round(e*100)/100;function oD({v:e,selected:n,onSelect:s,onDecide:r}){const i=C.useMemo(()=>xS(e),[e.epics,e.progress]),o=C.useMemo(()=>new Map(i.boxes.map(V=>[V.key,V])),[i]),l=C.useRef(null),[d,u]=C.useState(1),[h,m]=C.useState(null),p=C.useMemo(()=>new Map(e.progress.map(V=>[V.key,V])),[e.progress]),x=e.progress.filter(V=>V.state==="needs-you").map(V=>V.key),[y,j]=C.useState(x[0]??null),k=Ue(),b=k.data?.ready?k.data.tickets:[],w=y?o.get(y):void 0,S=w?yS(i,w):null,T=S?.height??i.height,A=()=>{const V=l.current;V&&u(jS({width:i.width,height:T},{width:V.clientWidth-16,height:V.clientHeight-16}))};C.useLayoutEffect(()=>{const V=l.current;V&&u(kS(i,{width:V.clientWidth-16}))},[]),C.useEffect(()=>{y&&!x.includes(y)&&j(x[0]??null)},[x.join()]);const D=C.useRef(null),$=V=>{if(V.target.closest("button"))return;const Y=l.current;D.current={x:V.clientX,y:V.clientY,left:Y.scrollLeft,top:Y.scrollTop},Y.setPointerCapture(V.pointerId)},P=V=>{const Y=D.current;Y&&(l.current.scrollLeft=Y.left-(V.clientX-Y.x),l.current.scrollTop=Y.top-(V.clientY-Y.y))},F=()=>D.current=null,z=Zn(e,h??n??null??void 0),U=z?.story?[...z.story.dependsOn.map(V=>({from:V,to:z.story.key})),...Oy(e,z.story.key).map(V=>({from:z.story.key,to:V}))].filter(V=>o.has(V.from)&&o.has(V.to)):[],I=y?p.get(y):void 0,W=I?.ticket?b.find(V=>V.id===I.ticket):void 0,M=y?Oy(e,y):[],G=W?.agentQuestion?.text?Pv(W.agentQuestion.text):W?.waiting?.summary??Zn(e,y??void 0)?.item.title??"",ce=V=>{V.level==="story"&&p.get(V.key)?.state==="needs-you"?j(V.key):(j(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:()=>u(V=>Math.max(Gc.min,Oj(V-Gc.step))),children:"−"}),t.jsx("button",{className:"btn sm","aria-label":"Zoom in",onClick:()=>u(V=>Math.min(Gc.max,Oj(V+Gc.step))),children:"+"}),t.jsx("button",{className:"btn sm",onClick:A,children:"Fit"})]}),t.jsx("div",{className:"rq-mapview",ref:l,onPointerDown:$,onPointerMove:P,onPointerUp:F,onPointerCancel:F,children:t.jsx("div",{className:"rq-mapsize",style:{width:i.width*d,height:T*d},children:t.jsxs("div",{className:"rq-mapcanvas",style:{width:i.width,height:T,transform:`scale(${d})`},children:[t.jsxs("svg",{className:"rq-lines",width:i.width,height:T,"aria-hidden":"true",children:[i.lines.map((V,Y)=>t.jsx("line",{x1:V.x1,y1:V.y1,x2:V.x2,y2:V.y2},Y)),U.map(V=>{const Y=o.get(V.from),se=o.get(V.to),R=Math.abs(Y.x-se.x)<2,B=R?Y.x+Y.w:Y.x+(se.x>Y.x?Y.w:0),J=R?se.x+se.w:se.x+(se.x>Y.x?0:se.w),q=Y.y+Y.h/2,me=se.y+se.h/2,ye=R?34:Math.max(30,Math.abs(J-B)/2),Ne=R?B+ye:B+(se.x>Y.x?ye:-ye),Fe=R?J+ye:J+(se.x>Y.x?-ye:ye);return t.jsx("path",{className:"rq-needline",d:`M${B},${q} C${Ne},${q} ${Fe},${me} ${J},${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"})})})]}),i.boxes.map(V=>{const Y=p.get(V.key),se={left:V.x,top:V.y,width:V.w,height:V.h};if(V.level==="story")return t.jsx("button",{className:`rq-chip ${Im(V.state)} ${n===V.key?"sel":""}`,style:se,title:`${V.key} ${V.title}${Y?`: ${Y.line}`:""}`,"aria-label":`Story ${V.key} ${V.title}${Y?`: ${Y.line}`:""}`,onClick:()=>ce(V),onMouseEnter:()=>m(V.key),onMouseLeave:()=>m(null),onFocus:()=>m(V.key),onBlur:()=>m(null),children:t.jsx(L,{className:"rq-chipt",lead:t.jsx("em",{children:V.key}),text:V.title})},V.key);const R=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:se,onClick:()=>ce(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(L,{className:"n",text:V.title}),t.jsxs("span",{className:"p",children:[t.jsx("i",{children:t.jsx("b",{style:{width:`${R}%`}})}),V.level==="epic"?`${V.done?.done??0} of ${V.done?.of??0}`:`${V.done?.done??0}/${V.done?.of??0}`]})]},V.key)}),w&&I&&S&&t.jsxs("div",{className:"rq-pop",style:{left:S.left,top:S.top,width:Us.popW},role:"dialog","aria-label":`${w.key} needs you`,children:[t.jsx("button",{className:"rq-pop-x","aria-label":"Close",onClick:()=>j(null),children:t.jsx(Ve,{size:13})}),t.jsx("div",{className:"rq-pop-w",children:[w.key,I.ticket,Av(I.stop)].filter(Boolean).join(" · ")}),t.jsx(L,{as:"div",className:"rq-pop-t",text:G}),t.jsxs("div",{className:"rq-pop-s",children:[M.length?`${M.join(", ")} ${M.length===1?"waits":"wait"} for it. `:"",e.state.build?.on?"Everything else keeps going.":""]}),I.ticket&&t.jsx("button",{className:"btn sm you",onClick:()=>r(I.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 ri=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 lD(){const e=fw(),n=Ue(),s=n.data?.ready?n.data.meta.user?.name:void 0,[r,i]=C.useState(!1),o=e.data?.breakdowns??[],l=n.data?.brokenRecords?.filter(d=>d.kind==="breakdown")??[];return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"top",children:[t.jsx("h1",{children:"Requirements"}),t.jsx("span",{className:"grow"}),t.jsx(te,{text:"squad requirements list"}),t.jsxs("button",{className:"btn pri",onClick:()=>i(!0),children:[t.jsx(xt,{size:15})," Add a BRD"]})]}),t.jsx("div",{className:"scroll",children:t.jsxs("div",{className:"page rq-list",children:[l.length>0&&t.jsx(Zo,{list:l,label:"Breakdowns that could not be read"}),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. ",ca(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(d=>t.jsx(cD,{r:d,me:s},d.id))})]}):t.jsxs("div",{className:"rq-empty",children:[t.jsx("span",{className:"ring",children:t.jsx(Hk,{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:()=>i(!0),children:[t.jsx(xt,{size:15})," Add a BRD"]})]})]})]})}),r&&t.jsx(KF,{onClose:()=>i(!1)})]})}function cD({r:e,me:n}){const[s,r]=C.useState(!1),i=Y9(e),o=e.counts,l=e.status==="approved"&&(o.merged>0||o.building>0||o.needsYou>0||e.building),d=!n||e.owner.trim().toLowerCase()===n.trim().toLowerCase();return t.jsxs("div",{className:`rq-rowcard ${e.status==="questions"||o.needsYou?"you":""}`,children:[t.jsx(dD,{r:e,chip:i,started:l}),d&&t.jsx(ww,{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(Pn,{size:15})," Delete breakdown…"]}),onPick:()=>r(!0)}]}),s&&t.jsx(bw,{id:e.id,title:e.title,onClose:()=>r(!1)})]})}function dD({r:e,chip:n,started:s}){const r=e.counts;return t.jsxs(xe,{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(L,{as:"b",text:e.title}),t.jsxs("span",{...De(e.source.name),children:[t.jsx(ma,{size:12,"aria-hidden":"true"})," ",t.jsx(L,{text:e.source.name})]})]}),t.jsx("span",{className:"rq-rcount",children:r.epics||r.stories?G9(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 uD(){const{id:e}=Md({from:"/requirements/$id"}),n=Pr({from:"/requirements/$id"}),s=qt({from:"/requirements/$id"}),r=DF(e),i=r.data,o=xa(ya),l=h=>void s({search:m=>({...m,...h}),replace:!0}),d=h=>l({item:h,decided:void 0}),u=h=>l({ticket:h});return r.isLoading?t.jsxs("div",{className:"center",children:["Opening ",e,"…"]}):i?t.jsx(hD,{v:i,search:n,select:d,openTicket:u,setSearch:l,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.":ca(r.error)}),t.jsx("p",{style:{marginTop:12},children:t.jsx(xe,{to:"/requirements",className:"btn",children:"All breakdowns"})})]})})}function hD({v:e,search:n,select:s,openTicket:r,setSearch:i,phone:o}){const l=Pt(),d=qt(),{toast:u}=qe(),[h,m]=C.useState(null),p=Sw(e),[x,y]=C.useState(()=>_y(e,n.item)),j=I=>y(W=>{const M=new Set(W);return M.has(I)?M.delete(I):M.add(I),M});C.useEffect(()=>{e.epics.length&&y(I=>I.size?I:_y(e,n.item))},[e.epics.length]),C.useEffect(()=>{const I=Zn(e,n.item);I&&y(W=>W.has(I.epic.key)&&(!I.feature||W.has(I.feature.key))?W:new Set([...W,I.epic.key,...I.feature?[I.feature.key]:[]]))},[n.item,e.epics.length]);const k=e.status==="ready"||e.status==="approved",b=n.view==="map"&&k&&!o,w=e.status==="approved"?"build":"plan",S=Zn(e,n.item)?n.item:void 0,T=!!e.state.build?.on,A=Cv(e),D=Jo(e)&&!xi(e.state.job),$=!!(h||n.ticket||p.viewer!==void 0);C.useEffect(()=>{if(!S||$)return;const I=W=>{if(W.key!=="Escape"||W.defaultPrevented||document.querySelector(".modal-veil"))return;const M=W.target instanceof HTMLElement?W.target:null;if(M&&/^(INPUT|TEXTAREA|SELECT)$/.test(M.tagName))return M.closest(".rq-panel")?M.blur():void 0;if(document.querySelector('.rq-panel[data-dirty="true"]'))return u("Save or undo your changes first.");s(void 0)};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[S,$]);const P=t.jsx(fD,{v:e,onSend:()=>m({kind:"send"}),onAsk:()=>m({kind:"ask",item:e.id}),phone:o}),F=e.mine?[...e.status==="approved"&&D&&pl(e).some(({story:I})=>!I.ticket)?[{key:"ask",title:`squad requirements redo ${e.id} ${e.id} "<what to change>"`,label:t.jsxs(t.Fragment,{children:[t.jsx(Gn,{size:15})," Ask the Analyst…"]}),onPick:()=>m({kind:"ask",item:e.id})}]:[],{key:"delete",danger:!0,title:`squad requirements delete ${e.id}`,label:t.jsxs(t.Fragment,{children:[t.jsx(Pn,{size:15})," Delete breakdown…"]}),onPick:()=>m({kind:"delete"})}]:[],_=b?`squad requirements show ${e.id} --map`:e.status==="approved"&&e.mine&&e.counts.merged<e.counts.stories?`squad requirements build ${e.id}${T?" --pause":""}`:`squad requirements show ${e.id}`,z=S?t.jsx(nD,{v:e,k:S,onClose:()=>s(void 0),onSelect:s,onAsk:I=>m({kind:"ask",item:I}),onOpenRef:p.open,onOpenTicket:r,onAdd:(I,W)=>m({kind:"add",level:I,under:W})}):null,U=I=>t.jsx(aD,{v:e,onSelect:s,onOpenTicket:r,onClose:I});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(xe,{to:"/requirements",children:"Requirements"})," › ",e.id,e.status==="questions"&&t.jsxs(t.Fragment,{children:[" › ",t.jsx(L,{text:e.title})]})]}),t.jsxs("div",{className:"rq-name",children:[t.jsx(pD,{v:e}),t.jsx(x3,{...A})]})]}),t.jsx(te,{text:_,keep:_.slice(_.indexOf(e.id))}),k&&!o&&t.jsxs("div",{className:"seg rq-viewseg",role:"group","aria-label":"View",children:[t.jsx("button",{className:b?"":"on","aria-pressed":!b,onClick:()=>i({view:void 0}),children:"Tree"}),t.jsx("button",{className:b?"on":"","aria-pressed":b,onClick:()=>i({view:"map"}),children:"Map"})]}),!o&&P,t.jsx(ww,{choices:F,label:`More actions for ${e.id}`})]}),k&&t.jsx(xD,{v:e,onDecided:()=>i({item:void 0,decided:!0}),onLeftOut:()=>m({kind:"leftout"}),onDoc:()=>p.open()}),e.status==="approved"&&t.jsx(yD,{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(I=>t.jsx(L,{as:"li",text:I},I)),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(jD,{v:e})]}),k?b?t.jsxs("div",{className:"rq-split",children:[t.jsx(oD,{v:e,selected:S,onSelect:I=>s(I),onDecide:r}),z&&t.jsx("div",{className:"rq-aside over",children:z})]}):o?t.jsxs("div",{className:"scroll rq-phonebody",children:[t.jsx(kD,{v:e,onDecide:r}),t.jsx("div",{className:"rq-phonetree",children:t.jsx(Kp,{v:e,mode:w,selected:S,open:x,onToggle:j,onSelect:s,onDecide:r,onAdd:(I,W)=>m({kind:"add",level:I,under:W})})}),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:()=>i({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(Kp,{v:e,mode:w,selected:S,open:x,onToggle:j,onSelect:s,onDecide:r,onAdd:(I,W)=>m({kind:"add",level:I,under:W})})}),t.jsx("div",{className:`rq-aside ${z?"":`idle ${n.decided?"wanted":""}`}`,children:z??U(n.decided?()=>i({decided:void 0}):void 0)})]}):t.jsx("div",{className:"scroll",children:t.jsxs("div",{className:"rq-pad",children:[e.status==="failed"?t.jsx(Q_,{v:e}):e.status==="questions"?t.jsx(Z_,{v:e,onOpenRef:p.open}):t.jsx(G_,{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(Kp,{v:e,mode:"plan",open:x,onToggle:j,onDecide:r})]})]})}),o&&k&&!b&&(z||n.decided)&&t.jsx("div",{className:"rq-sheet",children:z??U(()=>i({decided:void 0}))}),o&&k&&e.mine&&t.jsx("div",{className:"rq-bottom",children:P}),n.ticket&&t.jsx(W4,{id:n.ticket,onClose:()=>i({ticket:void 0})}),h?.kind==="send"&&t.jsx(YF,{v:e,onClose:()=>m(null)}),h?.kind==="ask"&&t.jsx(GF,{v:e,item:h.item,text:h.text,onClose:()=>m(null)}),h?.kind==="add"&&t.jsx(QF,{v:e,level:h.level,under:h.under,onClose:()=>m(null),onAdded:I=>s(I)}),h?.kind==="leftout"&&t.jsx(ZF,{v:e,onClose:()=>m(null),onOpenRef:p.open,onAsk:D?I=>m({kind:"ask",item:e.id,text:I}):void 0}),h?.kind==="delete"&&t.jsx(bw,{id:e.id,title:e.title,sentTo:e.sent?e.tracker?.label:void 0,onClose:()=>m(null),onDeleted:()=>void d({to:"/requirements"})}),p.viewer!==void 0&&t.jsx(Nw,{v:e,at:p.viewer??void 0,onClose:p.close}),l.isPending&&t.jsx("span",{className:"sr-only",role:"status",children:"Working…"})]})}function pD({v:e}){const n=Pt(),[s,r]=C.useState(!1),[i,o]=C.useState(e.title);if(!s)return t.jsxs(t.Fragment,{children:[t.jsx(L,{as:"h1",text: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(yd,{size:13})})]});const l=()=>n.mutate({path:ri(e.id),method:"PATCH",body:{title:i.trim()},done:"Renamed."},{onSuccess:()=>r(!1)});return t.jsxs("form",{className:"rq-renameform",onSubmit:d=>{d.preventDefault(),i.trim()&&l()},children:[t.jsx("input",{className:"input",autoFocus:!0,"aria-label":"Name of the breakdown",dir:ge(i),value:i,onChange:d=>o(d.target.value),onKeyDown:d=>d.key==="Escape"&&r(!1)}),t.jsx("button",{className:"btn sm pri",type:"submit",disabled:!i.trim()||n.isPending,title:`squad requirements rename ${e.id} ${Le(i.trim()||e.title)}`,children:"Save"}),t.jsx("button",{className:"btn sm",type:"button",onClick:()=>r(!1),children:"Cancel"})]})}function fD({v:e,onSend:n,onAsk:s,phone:r}){const i=Pt();if(!e.mine)return null;const o=xi(e.state.job),l=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(Ps,{size:14})," ",e.sent?"Send changes":`Send to ${e.tracker.label}`]});if(e.status==="ready"){const p=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(Gn,{size:14})," Ask the Analyst"]}),t.jsxs("button",{className:"btn pri rq-approve",disabled:p.length>0||o||i.isPending,"aria-describedby":p.length?"rq-probs":void 0,title:p.length?p[0]:`squad requirements approve ${e.id}`,onClick:()=>i.mutate({path:`${ri(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(fe,{size:15})," Approve breakdown"]})]})}if(e.status!=="approved")return null;const d=e.counts.stories>0&&e.counts.merged===e.counts.stories,u=!!e.state.build?.on,h=e.state.build?.heldFor==="budget",m=e.state.build?.heldFor==="review";return t.jsxs(t.Fragment,{children:[l,!d&&u&&t.jsxs("button",{className:"btn",disabled:i.isPending,title:`squad requirements build ${e.id} --pause`,onClick:()=>i.mutate({path:`${ri(e.id)}/build`,body:{on:!1},done:"Paused. Running stories finish their step; no new ones start."}),children:[t.jsx(al,{size:14})," Pause"]}),!d&&(!u||h||m)&&t.jsxs("button",{className:"btn pri",disabled:i.isPending,title:h?`Go on past this month's budget: squad requirements build ${e.id}`:`squad requirements build ${e.id}`,onClick:()=>i.mutate({path:`${ri(e.id)}/build`,body:{on:!0},done:h?"It goes on past this month's budget, for the rest of the month.":m?"It goes on, with the rewritten stories.":"Building continuously. Stories start in order of what they need."}),children:[t.jsx(gn,{size:14})," Build continuously"]})]})}function Yp(e,n,s=`${n}s`){return`${e} ${e===1?n:s}`}function mD(e,n){return n&&e.trim().toLowerCase()===n.trim().toLowerCase()?"you":e}function gD(e){const n=new Date(e);return n.toDateString()===new Date().toDateString()?"today":`on ${n.toLocaleDateString("en-GB",{day:"numeric",month:"short"})}`}function xD({v:e,onDecided:n,onLeftOut:s,onDoc:r}){const i=Ue(),o=i.data?.ready?i.data.meta.user?.name:void 0,l=e.source,d=e.estimate,u=Rm(d),h=e.counts,m=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:t.jsx(L,{text:l.name})}),l.kind==="pdf"&&l.pages?`, ${Yp(l.pages,"page")}`:"",l.pictures?`, ${Yp(l.pictures,"picture")}`:"",", added by ",t.jsx(L,{text:mD(l.addedBy,o)})," ",gD(l.addedAt)]}),t.jsxs("span",{children:[t.jsx("b",{children:h.epics})," ",h.epics===1?"epic":"epics",", ",t.jsx("b",{children:h.features})," ",h.features===1?"feature":"features",", ",t.jsx("b",{children:h.stories})," ",h.stories===1?"story":"stories"]}),m&&d.stories>0&&t.jsxs("span",{children:["About ",u.cost&&t.jsxs(t.Fragment,{children:[t.jsx("b",{children:u.cost})," and "]}),t.jsx("b",{children:u.time})," to build, ",d.parallel," at a time ",t.jsxs("span",{className:"rq-dim",children:["(",$v(d),")"]})]}),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:[Yp(e.leftOut.length,"part")," left out"]}),e.sent&&e.tracker&&t.jsxs("span",{children:["Sent to ",e.tracker.label]})]})}function yD({v:e}){const n=Pt(),s=e.counts,r=dS(s),i=!!e.state.build?.on,o=e.state.build?.held,l=e.state.sync,d=s.merged+s.building+s.needsYou>0||e.progress.some(y=>y.ticket),u=Math.max(0,s.stories-s.merged-s.building-s.needsYou),h=fS(e),m=jf(l,yw(e.id)),p=Rv(m),x="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:[d||i?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`:"",u?`${u} to go`:""].filter(Boolean).join(", ")}),s.merged<s.stories&&t.jsx("span",{className:"rq-meta",children:J9(e.estimate)})]}):e.mine&&t.jsxs("div",{className:"rq-rule",children:["Build continuously: ",X9(e.estimate),". ",x]}),(d||i)&&i&&s.merged<s.stories&&t.jsxs("div",{className:"rq-rule",children:[e.estimate.parallel," at a time. ",x]}),h&&t.jsxs("div",{className:"rq-built",role:"status",children:[t.jsx(fe,{size:14,strokeWidth:2.6,"aria-hidden":"true"}),t.jsxs("span",{children:[t.jsx(L,{text:h.text}),h.release&&t.jsxs(t.Fragment,{children:[" ","Send it out from ",t.jsx(xe,{to:"/releases",children:"Releases"}),"."]})]})]}),o&&(i||e.state.build?.heldFor==="budget")&&t.jsxs("div",{className:"rq-held",role:"status",children:[t.jsx(al,{size:13,"aria-hidden":"true"})," Waiting: ",t.jsx(L,{text:o})]}),l&&(l.status==="running"||l.status==="pending")&&t.jsxs("div",{className:"rq-syncline",role:"status",children:["Sending to ",e.tracker?.label??"the tracker",p?`: ${p}`:"…",t.jsx("span",{className:"rq-pbar",children:t.jsx("i",{style:{width:`${m.pct||5}%`}})})]}),l?.status==="failed"&&t.jsxs("div",{className:"rq-syncline fail",role:"alert",children:["The send to ",e.tracker?.label??"the tracker"," stopped",l.error?`: ${l.error}`:".",e.mine&&t.jsx("button",{className:"btn sm",disabled:n.isPending,onClick:()=>n.mutate({path:`${ri(e.id)}/send`,done:"Sending again. What was sent stays; nothing is made twice."}),children:"Send again"})]})]})}function jD({v:e}){const n=Pt(),s=e.state.job;return!xi(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?t.jsxs(t.Fragment,{children:[": ",t.jsx(L,{text:s.error})]}):".",e.mine&&t.jsx("button",{className:"btn sm",onClick:()=>n.mutate({path:`${ri(e.id)}/${s.capped?"more":"retry"}`,done:"The Analyst tries the redo again."}),children:s.capped?"Give it more":"Try again"})]}):null:t.jsxs("div",{className:"rq-jobline",role:"status",children:[t.jsx("span",{className:"live","aria-hidden":"true"}),t.jsx(L,{text:s.status==="stopping"?"Stopping the Analyst…":`${s.now??"The Analyst is working"}${s.ask?`: "${s.ask}"`:""}`}),t.jsx(Q1,{v:e}),e.mine&&s.status!=="stopping"&&t.jsx("button",{className:"btn sm",onClick:()=>n.mutate({path:`${ri(e.id)}/stop`,done:"Stopping the Analyst."}),title:`squad requirements stop ${e.id}`,children:"Stop"})]})}function kD({v:e,onDecide:n}){const s=Ue(),r=s.data?.ready?s.data.tickets:[],i=e.progress.filter(l=>l.state==="needs-you"),o=C.useMemo(()=>i.map(l=>{const d=Zn(e,l.key)?.story,u=l.ticket?r.find(m=>m.id===l.ticket):void 0,h=u?.agentQuestion?.text?Pv(u.agentQuestion.text):u?.waiting?.summary;return t.jsxs("div",{className:"rq-youcard",children:[t.jsx("div",{className:"rq-pop-w",children:[l.key,l.ticket,Av(l.stop)].filter(Boolean).join(" · ")}),t.jsx(L,{as:"div",className:"rq-youcard-t",text:`${d?.title??""}${h?`: ${h.charAt(0).toLowerCase()}${h.slice(1)}`:""}`}),l.ticket&&t.jsx("button",{className:"btn you",onClick:()=>n(l.ticket),children:"Decide"})]},l.key)}),[i.map(l=>l.key+l.ticket).join(),r]);return t.jsx(t.Fragment,{children:o})}function vD({view:e}){const[n,s]=C.useState(new Set),r=(e?.needsYou??[]).filter(o=>!n.has(o.id)),i=e?.squadNow??[];return t.jsxs("aside",{className:"lead-rail","aria-label":"Needs you and the squad now",children:[t.jsxs("section",{children:[t.jsxs("h5",{children:[r.length>0&&t.jsx("span",{className:"n",children:r.length}),"Needs you"]}),r.length?t.jsx("div",{className:"stack",children:r.map(o=>t.jsx(bD,{n:o,onNotNow:()=>s(l=>new Set(l).add(o.id))},o.id))}):t.jsxs("p",{className:"lr-calm",children:[t.jsx(fe,{size:14,strokeWidth:2.6,"aria-hidden":"true"})," Nothing needs you right now."]})]}),e?.brief&&t.jsx(wD,{b:e.brief}),t.jsxs("section",{children:[t.jsx("h5",{children:"The squad now"}),i.length?t.jsx("div",{className:"stack",children:i.map(o=>t.jsxs(xe,{to:"/board",search:{ticket:o.story},className:`sqr ${o.slow?"slow":""}`,title:`${o.story} ${o.title}`,children:[t.jsx("span",{className:"who",children:o.who}),t.jsx("span",{className:"id",children:o.story}),t.jsx(L,{className:"st",text:o.doing}),o.progress!==void 0&&t.jsx("span",{className:"bar2","aria-label":`About ${Math.round(o.progress*100)}% of this step`,children:t.jsx("i",{style:{width:`${Math.round(o.progress*100)}%`}})})]},`${o.story}-${o.who}`))}):t.jsx("p",{className:"lr-calm",children:"No one is working right now."})]}),t.jsx(ND,{view:e})]})}function bD({n:e,onNotNow:n}){const s=iw(e.open),r=()=>Hn.open({text:d1(Y2(e),e.story),context:{from:"problem",problem:Y2(e),story:e.story}}),i=e.cards.filter(d=>d.status==="open"&&!d.byItself),o=e.cards.find(d=>d.byItself)?.byItself,l=e.kind!=="slow";return t.jsxs("div",{className:`prow ${l?"you":""}`,children:[t.jsxs("div",{className:"pt",children:[t.jsx(L,{as:"b",text:e.words}),e.more&&t.jsx(L,{as:"small",text:e.more}),o&&t.jsx("small",{className:"by",children:o})]}),t.jsxs("div",{className:"acts",children:[i.length>0?t.jsx(aq,{cards:i}):s?.to==="/tickets/$id/proof"?t.jsx(xe,{to:"/tickets/$id/proof",params:{id:s.id},className:"btn pri sm",children:K2(e)}):t.jsx(xe,{to:"/board",search:{ticket:s?.to==="/board"?s.ticket:e.story},className:"btn pri sm",children:K2(e)}),e.kind!=="slow"&&t.jsx("button",{className:"btn sm ghost",onClick:r,children:"Ask about it"}),i.length>0&&t.jsx("button",{className:"btn sm ghost",onClick:n,title:"Hides it here for now. It comes back while the story still needs you.",children:"Not now"})]})]})}function wD({b:e}){const n=(s,r)=>r.length?t.jsx(L,{as:"li",lead:t.jsx("b",{children:s}),text:r.join(", ")}):null;return t.jsxs("section",{children:[t.jsx("h5",{children:"This morning"}),t.jsxs("div",{className:"lr-brief",children:[t.jsx(L,{as:"p",text:e.headline}),t.jsxs("ul",{children:[n("Merged",e.merged),n("Released",e.released),n("Working",e.working),n("Stopped",e.stopped)]}),e.costUsd!==void 0&&t.jsxs("span",{className:"note",children:["The AI used ",Tr(e.costUsd)," since then."]})]})]})}const y3=["var(--accent)","var(--you)","var(--bug)"],Gp=["Read the code and the stories, look at the app in its own copy, answer, tell you what needs you.",'Create a story, start or stop one, give more time. "Always allow" only for low-risk ones.',"Change code, merge, press Looks right, touch your real data or secrets."];function ND({view:e}){const n=Jw(),[s,r]=C.useState(!1),i=n.data?.levels??[{level:1,name:"On its own",words:Gp[0],items:[]},{level:2,name:"After your OK",words:Gp[1],items:[]},{level:3,name:"Never",words:Gp[2],items:[]}];return t.jsxs("section",{children:[t.jsxs("h5",{children:[t.jsx(ra,{size:14,"aria-hidden":"true"}),"What it can do"]}),t.jsxs("div",{className:"can",children:[i.map((o,l)=>t.jsxs("div",{className:"cl",children:[t.jsxs("b",{children:[t.jsx("span",{className:"d",style:{background:y3[l]}}),o.name]}),t.jsx("span",{children:o.words})]},o.level)),t.jsxs("button",{className:"more",onClick:()=>r(!0),children:["See everything, and your rules ",t.jsx(ai,{size:13})]})]}),e&&t.jsxs("p",{className:"lr-today",children:["Today: ",Tr(e.today.costUsd)," of ",Tr(e.today.limitUsd)," a day"]}),s&&t.jsx(SD,{onClose:()=>r(!1)})]})}function SD({onClose:e}){const n=Jw(),s=eq(),r=oe(),i=s.data,o=(h,m,p)=>r.mutate({path:"/api/v1/lead/rules",method:"PUT",body:{always:h,brief:m},done:p}),l=(h,m)=>{if(!i)return;const p=i.always.includes(h);o(p?i.always.filter(x=>x!==h):[...i.always,h],i.brief,p?`It asks you each time now: ${m.toLowerCase()}`:`Always allowed: ${m.toLowerCase()}`)},d=n.data?.levels??[],u=i?`squad lead rules --always ${i.always.length?i.always.join(","):"none"} --brief ${i.brief?"on":"off"}`:"squad lead rules";return t.jsx(We,{title:"What the Squad lead can do",wide:!0,onClose:e,footer:t.jsxs(t.Fragment,{children:[t.jsx(te,{text:u}),t.jsx("span",{className:"grow"}),t.jsx("button",{className:"btn pri",onClick:e,children:"Done"})]}),children:t.jsxs("div",{className:"lr-can",children:[d.map((h,m)=>t.jsxs("div",{className:"lr-level",children:[t.jsxs("b",{children:[t.jsx("span",{className:"d",style:{background:y3[m]}}),h.name]}),t.jsx("ul",{children:h.items.map(p=>t.jsx("li",{children:p},p))}),h.level===2&&i&&t.jsxs("div",{className:"lr-always",children:[t.jsx("p",{className:"note",children:n.data?.always.words}),i.allowable.map(p=>{const x=i.always.includes(p.id);return t.jsxs("button",{className:"switch",onClick:()=>l(p.id,p.name),"aria-pressed":x,disabled:r.isPending,children:[t.jsxs("span",{children:["Always allow: ",p.name.toLowerCase()]}),t.jsx("span",{className:`tog ${x?"on":""}`})]},p.id)})]}),h.level===3&&t.jsx("p",{className:"note",children:"squad-kit refuses these in its own words, whoever asks. They cannot be turned on."})]},h.level)),i&&t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"switch",onClick:()=>o(i.always,!i.brief,i.brief?"The morning brief is off":"The morning brief is on"),"aria-pressed":i.brief,disabled:r.isPending,children:[t.jsx("span",{children:"Morning brief: a short summary since yesterday evening, with no AI"}),t.jsx("span",{className:`tog ${i.brief?"on":""}`})]}),t.jsxs("p",{className:"note lr-limits",children:["One question may use up to ",Tr(i.limits.questionUsd)," or ",i.limits.questionTurns," turns and ",i.limits.minutes," minutes. All the answers of a day may use"," ",Tr(i.limits.dayUsd),", at API prices. Today: ",Tr(i.today.costUsd),"."]})]})]})})}function CD(){const e=Pr({from:"/lead"}),n=qt(),s=Zw(),r=Ue(),i=$D(),o=e.c??null,l=Xw(o),{send:d,busy:u}=i4(),[h,m]=C.useState(""),[p,x]=C.useState(!1),[y,j]=C.useState(!1),k=C.useRef(null),b=o?l.data:void 0,S=(r.data?.ready?r.data.meta:void 0)?.project??"the project",T=P=>{x(!1),n({to:"/lead",search:P?{c:P}:{}})},A=(P=h,F=!1)=>d({text:P.trim(),conversation:b?.id??null,context:b?null:{from:"board",page:"Squad lead"},fresh:F},_=>{m(""),_.id!==o&&T(_.id)}),D=b?.turns.length??0;C.useEffect(()=>{s4(k.current)},[o,D,b?.thinking]);const $=s.data?.needsYou.length??0;return t.jsxs("div",{className:`lead-page ${y?"rail-open":""}`,children:[t.jsxs("div",{className:"lead-thread",children:[t.jsxs("header",{className:"lead-h",children:[t.jsx("img",{className:"lead-logo",src:"/logo.svg",alt:""}),t.jsxs("div",{className:"lead-title",children:[t.jsx("h1",{children:"Squad lead"}),t.jsx(TD,{project:S,stories:r.data?.ready?r.data.tickets.length+r.data.stats.released30:void 0})]}),t.jsx("span",{className:"grow"}),t.jsxs("button",{className:"btn sm",onClick:()=>T(null),disabled:!o,"aria-label":"New conversation",children:[t.jsx(xt,{size:14})," ",t.jsx("span",{className:"wide",children:"New conversation"})]}),t.jsxs("span",{className:"lead-hist",children:[t.jsxs("button",{className:"btn sm",onClick:()=>x(!p),"aria-expanded":p,"aria-haspopup":"true","aria-label":"History",children:[t.jsx(m7,{size:14})," ",t.jsx("span",{className:"wide",children:"History"})]}),p&&t.jsx(AD,{items:s.data?.conversations??[],current:o,onPick:T,onClose:()=>x(!1)})]}),t.jsxs("button",{className:"btn sm lead-railbtn",onClick:()=>j(!y),"aria-expanded":y,children:["Needs you",$?` · ${$}`:""]})]}),t.jsx("div",{className:"scroll lead-feed",ref:k,children:t.jsx("div",{className:"lead-col",children:o&&l.isError&&!b?t.jsx(Er,{what:"this conversation",error:l.error,onRetry:()=>void l.refetch()}):b?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"lead-day",children:[Is(b.startedAt)," · ",t.jsx(L,{text:b.title})]}),b.turns.map((P,F)=>t.jsx(n4,{c:b,turn:P,last:F===b.turns.length-1,onAgain:(_,z)=>A(_,z)},P.n))]}):o?t.jsx("p",{className:"note",children:"Loading…"}):t.jsx(ED,{view:s.data,apps:i,onPick:P=>m(P),onOpen:T})})}),t.jsxs("div",{className:"lead-composer",children:[t.jsx(a4,{id:"lead-page-ask",value:h,onChange:m,onSend:()=>A(),busy:u||!!b?.thinking,placeholder:b?"Ask a follow-up…":`Ask about ${S}, or ask for something…`,chip:b&&b.context.from!=="board"?t.jsx(o4,{ctx:b.context}):void 0,autoFocus:!o}),t.jsx(l4,{})]})]}),y&&t.jsx("div",{className:"lead-veil",onClick:()=>j(!1)}),t.jsx(vD,{view:s.data}),y&&t.jsx("button",{className:"iconbtn lead-railx",onClick:()=>j(!1),"aria-label":"Close",children:t.jsx(Ve,{size:16})})]})}function $D(){return(Tm().data?.apps??[]).map(e=>e.name)}function TD({project:e,stories:n}){const s=we({queryKey:["lead","decisions"],queryFn:()=>ke("/api/v1/decisions"),staleTime:6e4}).data?.decisions.length,r=["knows the code",...n?[`${n} ${n===1?"story":"stories"}`]:[],...s?[`${s} ${s===1?"decision":"decisions"}`]:[]];return t.jsxs("div",{className:"lead-sub",children:[t.jsx("span",{className:"pulse","aria-hidden":"true"}),t.jsx(L,{text:e}),t.jsxs("span",{children:["· ",r.join(", ")]})]})}function ED({view:e,apps:n,onPick:s,onOpen:r}){const i=iF({apps:n,needsYou:e?.needsYou??[],squadNow:e?.squadNow??[]}),o=(e?.conversations??[]).slice(0,5);return t.jsxs("div",{className:"lead-empty",children:[t.jsx("h2",{children:"Ask about the app, the stories or the code"}),t.jsx("p",{children:"Or say what is wrong. It reads what the squad knows, looks at the app in its own copy, and answers in plain words. Changes come as stories you create."}),t.jsx("div",{className:"lead-examples",children:i.map(l=>t.jsx("button",{className:"lead-ex",onClick:()=>s(l),children:l},l))}),o.length>0&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"lbl",children:"Recent conversations"}),t.jsx(j3,{items:o,current:null,onPick:r})]})]})}function j3({items:e,current:n,onPick:s}){return t.jsx("ul",{className:"lead-list",children:e.map(r=>t.jsx("li",{children:t.jsxs("button",{className:r.id===n?"on":"",onClick:()=>s(r.id),children:[t.jsx(L,{as:"b",text:r.title}),t.jsxs("small",{children:[r.thinking?t.jsx("span",{className:"live","aria-label":"Answering now"}):null,Je(r.updatedAt),r.turns>1?` · ${r.turns} questions`:"",r.costUsd?` · ${Tr(r.costUsd)}`:"",r.story?` · made ${r.story}`:""]})]})},r.id))})}function AD({items:e,current:n,onPick:s,onClose:r}){return C.useEffect(()=>{const i=o=>o.key==="Escape"&&r();return window.addEventListener("keydown",i),()=>window.removeEventListener("keydown",i)},[r]),t.jsx("div",{className:"lead-histmenu",role:"dialog","aria-label":"Past conversations",children:e.length?t.jsx(j3,{items:e,current:n,onPick:s}):t.jsx("p",{className:"note",children:"No conversations yet."})})}const $t=PN({component:Ct?Jq:k_,beforeLoad:({location:e})=>{if(!Ct&&e.pathname!=="/")throw tl({to:"/"})}}),PD=At({getParentRoute:()=>$t,path:"/",beforeLoad:()=>{if(Ct)throw tl({to:"/overview"})}}),RD=At({getParentRoute:()=>$t,path:"/setup",component:H_}),ID=At({getParentRoute:()=>$t,path:"/overview",component:q_}),FD=At({getParentRoute:()=>$t,path:"/requirements",component:lD}),zD=At({getParentRoute:()=>$t,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:uD}),qD=At({getParentRoute:()=>$t,path:"/board",validateSearch:e=>({ticket:typeof e.ticket=="string"&&e.ticket?e.ticket:void 0,tab:e.tab==="story"||e.tab==="plan"||e.tab==="proof"?e.tab:void 0,view:e.view==="mine"||e.view==="bugs"?e.view:void 0,write:e.write===1||e.write==="1"?1:void 0}),component:bM}),LD=At({getParentRoute:()=>$t,path:"/tickets/$id/proof",component:CM}),MD=At({getParentRoute:()=>$t,path:"/backlog",component:RM}),OD=At({getParentRoute:()=>$t,path:"/inbox",component:pO}),_D=At({getParentRoute:()=>$t,path:"/releases",component:$M}),DD=At({getParentRoute:()=>$t,path:"/decisions",beforeLoad:()=>{throw tl({to:"/architecture",search:{view:"list"}})}}),BD=At({getParentRoute:()=>$t,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:FM}),WD=At({getParentRoute:()=>$t,path:"/conversations",validateSearch:e=>({ticket:typeof e.ticket=="string"&&e.ticket?e.ticket:void 0}),component:C_}),UD=At({getParentRoute:()=>$t,path:"/bugs",component:fO}),HD=At({getParentRoute:()=>$t,path:"/harness",validateSearch:e=>({tab:["compare","limits","safety","agents","additions"].includes(e.tab)?e.tab:void 0}),component:VO}),VD=At({getParentRoute:()=>$t,path:"/squad",beforeLoad:()=>{throw tl({to:"/harness",search:{tab:"agents"}})}}),KD=At({getParentRoute:()=>$t,path:"/settings",component:EO}),YD=At({getParentRoute:()=>$t,path:"/tools",component:Zq}),GD=At({getParentRoute:()=>$t,path:"/lead",validateSearch:e=>({c:typeof e.c=="string"&&/^[\w-]{1,64}$/.test(e.c)?e.c:void 0}),component:CD}),QD=$t.addChildren([PD,RD,ID,FD,zD,qD,MD,LD,OD,WD,_D,DD,BD,UD,HD,VD,YD,GD,KD]),ZD=BN({routeTree:QD,defaultPreload:!1,basepath:na||"/",defaultErrorComponent:k4}),XD=2e3;function JD(){const e=B4(),n=In();C.useEffect(()=>{const r=()=>{fetch("/healthz",{cache:"no-store"}).then(()=>KN(),()=>Ek())},i=window.setInterval(r,XD);return()=>window.clearInterval(i)},[]);const s=C.useRef(e);return C.useEffect(()=>{e==="down"?document.documentElement.dataset.appDown="1":delete document.documentElement.dataset.appDown,e==="up"&&s.current!=="up"&&n.invalidateQueries(),s.current=e},[e,n]),e==="up"?null:t.jsxs("div",{className:"appdown",role:"alert",children:[t.jsx("span",{className:"upd-ic",children:t.jsx(Rs,{size:16})}),t.jsx("div",{className:"upd-main",children:e==="down"?t.jsxs(t.Fragment,{children:[t.jsx("b",{className:"upd-title",children:"squad-kit has stopped, so this page is not up to date"}),t.jsx("span",{className:"upd-sub",children:"Your work and what you typed are safe. Start it again in a terminal. This page comes back by itself."})]}):t.jsxs(t.Fragment,{children:[t.jsx("b",{className:"upd-title",children:"This page's link is out of date"}),t.jsx("span",{className:"upd-sub",children:"Run this in a terminal: it opens the board with a fresh link. What you typed is kept."})]})}),t.jsx("div",{className:"upd-acts",children:t.jsx(te,{text:"squad"})})]})}document.documentElement.dataset.theme=Xk();const eB=new Q6({defaultOptions:{queries:{staleTime:500,retry:1,refetchOnWindowFocus:!0}}}),k3=document.getElementById("root");if(!k3)throw new Error("missing #root");const tB=ZN();CI();b6.createRoot(k3).render(t.jsx(C.StrictMode,{children:tB?t.jsx(Z6,{client:eB,children:t.jsxs(Iy,{children:[t.jsx(JD,{}),t.jsx(mj,{children:t.jsx(HN,{router:ZD})}),t.jsx(mj,{fallback:null,children:t.jsx(BI,{})})]})}):t.jsx(Iy,{children:t.jsx("div",{className:"center",style:{height:"100%"},children:t.jsxs("div",{style:{maxWidth:460},children:[t.jsx("h2",{children:"Open squad-kit once from a terminal"}),t.jsx("p",{children:"This browser has not opened squad-kit yet, so it does not have its private link. Run this in a terminal: it opens the board here, and after that new tabs and bookmarks work too."}),t.jsx(te,{text:"squad"})]})})})}));
|