slateboard 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -192
- package/dist/arch-3JZTL2DJ.js +1842 -0
- package/dist/bin.js +35 -11
- package/dist/{chunk-WXM4BB4D.js → chunk-4PKRRMRZ.js} +1340 -868
- package/dist/{chunk-FMO5B2KJ.js → chunk-4TPC7U6A.js} +5 -5
- package/dist/{chunk-SQHGMBUM.js → chunk-ANFNDJZO.js} +3 -2
- package/dist/{chunk-ONZFKR4I.js → chunk-PJ5WOZB3.js} +171 -21
- package/dist/{chunk-BWNUX4FT.js → chunk-V3PED2Z5.js} +4 -4
- package/dist/{client-JHI2EG6J.js → client-5B46626J.js} +2 -2
- package/dist/{commands-ONES545N.js → commands-6UA3YOD4.js} +1 -1
- package/dist/{doctor-H5Y5L2JZ.js → doctor-ZTQFKV32.js} +2 -2
- package/dist/{lifecycle-ZB5HEO5P.js → lifecycle-IZH4RJK5.js} +4 -4
- package/dist/{service-command-26BPMBK3.js → service-command-GKRIZCBL.js} +5 -5
- package/dist/{src-QZIVUACM.js → src-BDZFYUYY.js} +12 -2
- package/dist/{src-YVFB3ZLM.js → src-YO7L7J26.js} +13 -1
- package/dist/ui/assets/abnfDiagram-XWFEHMT6-DAC8TnbO.js +1 -0
- package/dist/ui/assets/architecture-WOLXFQ4H-X8k0-LVf.js +1 -0
- package/dist/ui/assets/architectureDiagram-CSQXQB3N-CVoxvA0s.js +36 -0
- package/dist/ui/assets/blockDiagram-BEDRHYPZ-DGf5VAwB.js +140 -0
- package/dist/ui/assets/bpmnIcons-APHXDYXF-C0jbCElo.js +1 -0
- package/dist/ui/assets/c4Diagram-M2UUVUY5-PB5quCOl.js +38 -0
- package/dist/ui/assets/chunk-2Q5K7J3B-C1jixKkw.js +1 -0
- package/dist/ui/assets/chunk-3GCGMST5-RRiusQp9.js +1 -0
- package/dist/ui/assets/chunk-5VM5RSS4-ZNzvKenW.js +15 -0
- package/dist/ui/assets/chunk-7U7NFRK5-CSOOpKZT.js +88 -0
- package/dist/ui/assets/chunk-CNRTWJTD-DJuDnaYn.js +1 -0
- package/dist/ui/assets/chunk-D5HYT7QG-imLQxbAy.js +1 -0
- package/dist/ui/assets/chunk-DUW6YSOI-Dgx8z5s3.js +1 -0
- package/dist/ui/assets/chunk-DZSZGQHW-BCXsfFfT.js +1 -0
- package/dist/ui/assets/chunk-EBZ3SEQC-CdDips7b.js +2 -0
- package/dist/ui/assets/chunk-F3AE6A5H-DTVcMSk7.js +1 -0
- package/dist/ui/assets/chunk-FGVZ23HU-BEVs0fgA.js +213 -0
- package/dist/ui/assets/chunk-GZTWQ64R-CKGVWw4I.js +62 -0
- package/dist/ui/assets/chunk-J5ZVWO5B-oDCd-gWO.js +1 -0
- package/dist/ui/assets/chunk-JWPE2WC7-DVXcaiue.js +1 -0
- package/dist/ui/assets/chunk-KTR4FSNJ-DSr3q0Xy.js +1 -0
- package/dist/ui/assets/chunk-MDAHDJXZ-YMIkXJ0O.js +10 -0
- package/dist/ui/assets/chunk-MPYPSXSE-C-CxVwa7.js +1 -0
- package/dist/ui/assets/chunk-ND7LMLKX-lfusdDHU.js +72 -0
- package/dist/ui/assets/chunk-NGNAAXSQ-DqoPQk1a.js +136 -0
- package/dist/ui/assets/chunk-OWCVCYLK-4-W-ynqW.js +2 -0
- package/dist/ui/assets/chunk-QDWOWVBQ-Du0KmhW4.js +129 -0
- package/dist/ui/assets/chunk-T47YP6PS-CKli33QU.js +1 -0
- package/dist/ui/assets/chunk-XXDRQBXY-DSL17ZTh.js +1 -0
- package/dist/ui/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +1 -0
- package/dist/ui/assets/classDiagram-v2-KXABOMEV-CYc2BZ2y.js +217 -0
- package/dist/ui/assets/cose-bilkent-JH36ORCC-81nUs0at.js +1 -0
- package/dist/ui/assets/cynefin-EF2NZ3EQ-Clvwy422.js +1 -0
- package/dist/ui/assets/cynefinDiagram-NJNITYFG-CsgTQqAC.js +62 -0
- package/dist/ui/assets/cytoscape.esm-BPveszXl.js +321 -0
- package/dist/ui/assets/d3-scale-lXtN6-Od.js +1 -0
- package/dist/ui/assets/d3-selection-BFzs9NTX.js +1 -0
- package/dist/ui/assets/dagre-KIHZ2IZ3--BpWd3hW.js +4 -0
- package/dist/ui/assets/diagram-7YQZDPLS-Dp_m-C1a.js +41 -0
- package/dist/ui/assets/diagram-QBROCOUO-Bt-Lp7vq.js +200 -0
- package/dist/ui/assets/diagram-RJJCUUZO-DLsG2Tej.js +30 -0
- package/dist/ui/assets/diagram-WERXNKYE-D31SLp70.js +24 -0
- package/dist/ui/assets/diagram-YHHI257C-CVMeUILe.js +3 -0
- package/dist/ui/assets/diagram-YR4HJLHV-Bz9qvIhJ.js +24 -0
- package/dist/ui/assets/dist-YCovsM_S.js +1 -0
- package/dist/ui/assets/ebnfDiagram-N527522P-_FIZSf8P.js +1 -0
- package/dist/ui/assets/elk-O5DQBFGD-BK3qD3UW.js +27 -0
- package/dist/ui/assets/erDiagram-K3K3BIDK-Dmpdi5Ob.js +99 -0
- package/dist/ui/assets/eventmodeling-K75KTNOO-Dt-51L4s.js +1 -0
- package/dist/ui/assets/flowDiagram-Z6JWZHQI-Cn2ZVzvO.js +1 -0
- package/dist/ui/assets/ganttDiagram-3PRQTZWP-BaZof7eT.js +292 -0
- package/dist/ui/assets/gitGraph-VSP46ZUC-ezyaB0jQ.js +1 -0
- package/dist/ui/assets/gitGraphDiagram-VXDFKS5L-DRNdClPw.js +106 -0
- package/dist/ui/assets/graphlib-DS17s2tU.js +1 -0
- package/dist/ui/assets/grid-E2QIVN74--djCUwdI.js +1 -0
- package/dist/ui/assets/index-Bly281F6.css +1 -0
- package/dist/ui/assets/index-CXK8WmR8.js +45 -0
- package/dist/ui/assets/info-OHQRW6UA-DsFXrFWI.js +1 -0
- package/dist/ui/assets/infoDiagram-EZ3ZOAHP-e8qx3eqc.js +2 -0
- package/dist/ui/assets/ishikawaDiagram-S3EKX5GW-CuKExPKN.js +70 -0
- package/dist/ui/assets/journeyDiagram-POQNLL5X-D0GE8iji.js +139 -0
- package/dist/ui/assets/kanban-definition-BH5XI6FM-NL5dOF_0.js +89 -0
- package/dist/ui/assets/katex-BXIx1Jgr.js +257 -0
- package/dist/ui/assets/mermaid-parser.core-0pE4JCc_.js +7 -0
- package/dist/ui/assets/mermaid.core-BVgUieVU.js +44 -0
- package/dist/ui/assets/mindmap-definition-WVAN44T4-BLTtjuVH.js +98 -0
- package/dist/ui/assets/packet-JDAUHWVQ-C-7DeilZ.js +1 -0
- package/dist/ui/assets/pegDiagram-D4NLKWP3-F2SSXiqv.js +1 -0
- package/dist/ui/assets/pie-XZMESJXO-B4BkiWTy.js +1 -0
- package/dist/ui/assets/pieDiagram-36ENHN4W-BB5uEdtB.js +39 -0
- package/dist/ui/assets/quadrantDiagram-ZQUDMS73-B5iPooYO.js +7 -0
- package/dist/ui/assets/radar-ABXABTNO-Dx3jkQdr.js +1 -0
- package/dist/ui/assets/railroad-I3PHUGI6-BSh47OT_.js +1 -0
- package/dist/ui/assets/railroad-abnf-LNEFI6M7-BWFvDxOj.js +1 -0
- package/dist/ui/assets/railroad-ebnf-DWYD2UWJ-GBoLzumA.js +1 -0
- package/dist/ui/assets/railroad-peg-JR7BVNR7-DByw5Orh.js +1 -0
- package/dist/ui/assets/railroadDiagram-JIZHGYPL--ptGd2NR.js +1 -0
- package/dist/ui/assets/render-VIF2ZAQL-CzNp-J42.js +2 -0
- package/dist/ui/assets/requirementDiagram-AXW2TVFA-DBh9Dt63.js +84 -0
- package/dist/ui/assets/rough.esm-Dy-Kn_BL.js +1 -0
- package/dist/ui/assets/sankeyDiagram-FBCJTAIF-CjJtGyu8.js +40 -0
- package/dist/ui/assets/sequenceDiagram-3LA2ROMG-BzeMVuzG.js +169 -0
- package/dist/ui/assets/sizeCapture-2Q2CQKSF-DSY_W0YL.js +1 -0
- package/dist/ui/assets/stateDiagram-v2-ATKHQDJO-DYavre2v.js +291 -0
- package/dist/ui/assets/swimlanes-YQL5WMAO-CUTCsfPM.js +1 -0
- package/dist/ui/assets/swimlanesDiagram-UCCPES4V-B7bXxKVr.js +8 -0
- package/dist/ui/assets/timeline-definition-7Z437IG3-HWrtH0QT.js +120 -0
- package/dist/ui/assets/treeView-D4JQ5SDB-B5lbyI_M.js +1 -0
- package/dist/ui/assets/treemap-SAJKECNS-Ckfi-DGc.js +1 -0
- package/dist/ui/assets/usecaseDiagram-RDK6N6HP-BuKN2NAW.js +328 -0
- package/dist/ui/assets/vennDiagram-SHRQU5PJ-s2gljkjP.js +34 -0
- package/dist/ui/assets/wardley-7MLQ67FV-CjAqYBcP.js +1 -0
- package/dist/ui/assets/wardleyDiagram-F3OXNVQS-Ba_SoMTx.js +78 -0
- package/dist/ui/assets/xychartDiagram-GDYJKCDI-FsxUUoqL.js +7 -0
- package/dist/ui/index.html +2 -2
- package/dist/{upgrade-FND3UBJR.js → upgrade-2CI4OVTY.js} +15 -15
- package/migrations/0006_arch_auto.sql +8 -0
- package/package.json +1 -1
- package/dist/ui/assets/index-4WzXlYHs.css +0 -1
- package/dist/ui/assets/index-ZKfByx7Q.js +0 -42
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.iterator;function p(e){return typeof e!=`object`||!e?null:(e=f&&e[f]||e[`@@iterator`],typeof e==`function`?e:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,g={};function _(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}_.prototype.isReactComponent={},_.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`setState(...): takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function v(){}v.prototype=_.prototype;function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}var b=y.prototype=new v;b.constructor=y,h(b,_.prototype),b.isPureReactComponent=!0;var x=Array.isArray,S=Object.prototype.hasOwnProperty,C={current:null},w={key:!0,ref:!0,__self:!0,__source:!0};function T(e,n,r){var i,a={},o=null,s=null;if(n!=null)for(i in n.ref!==void 0&&(s=n.ref),n.key!==void 0&&(o=``+n.key),n)S.call(n,i)&&!w.hasOwnProperty(i)&&(a[i]=n[i]);var c=arguments.length-2;if(c===1)a.children=r;else if(1<c){for(var l=Array(c),u=0;u<c;u++)l[u]=arguments[u+2];a.children=l}if(e&&e.defaultProps)for(i in c=e.defaultProps,c)a[i]===void 0&&(a[i]=c[i]);return{$$typeof:t,type:e,key:o,ref:s,props:a,_owner:C.current}}function E(e,n){return{$$typeof:t,type:e.type,key:n,ref:e.ref,props:e.props,_owner:e._owner}}function D(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function O(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var k=/\/+/g;function A(e,t){return typeof e==`object`&&e&&e.key!=null?O(``+e.key):t.toString(36)}function ee(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0}}if(c)return c=e,o=o(c),e=a===``?`.`+A(c,0):a,x(o)?(i=``,e!=null&&(i=e.replace(k,`$&/`)+`/`),ee(o,r,i,``,function(e){return e})):o!=null&&(D(o)&&(o=E(o,i+(!o.key||c&&c.key===o.key?``:(``+o.key).replace(k,`$&/`)+`/`)+e)),r.push(o)),1;if(c=0,a=a===``?`.`:a+`:`,x(e))for(var l=0;l<e.length;l++){s=e[l];var u=a+A(s,l);c+=ee(s,r,i,u,o)}else if(u=p(e),typeof u==`function`)for(e=u.call(e),l=0;!(s=e.next()).done;)s=s.value,u=a+A(s,l++),c+=ee(s,r,i,u,o);else if(s===`object`)throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`);return c}function j(e,t,n){if(e==null)return e;var r=[],i=0;return ee(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function M(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var N={current:null},te={transition:null},ne={ReactCurrentDispatcher:N,ReactCurrentBatchConfig:te,ReactCurrentOwner:C};function re(){throw Error(`act(...) is not supported in production builds of React.`)}e.Children={map:j,forEach:function(e,t,n){j(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return j(e,function(){t++}),t},toArray:function(e){return j(e,function(e){return e})||[]},only:function(e){if(!D(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}},e.Component=_,e.Fragment=r,e.Profiler=a,e.PureComponent=y,e.StrictMode=i,e.Suspense=l,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ne,e.act=re,e.cloneElement=function(e,n,r){if(e==null)throw Error(`React.cloneElement(...): The argument must be a React element, but you passed `+e+`.`);var i=h({},e.props),a=e.key,o=e.ref,s=e._owner;if(n!=null){if(n.ref!==void 0&&(o=n.ref,s=C.current),n.key!==void 0&&(a=``+n.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in n)S.call(n,l)&&!w.hasOwnProperty(l)&&(i[l]=n[l]===void 0&&c!==void 0?c[l]:n[l])}var l=arguments.length-2;if(l===1)i.children=r;else if(1<l){c=Array(l);for(var u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}return{$$typeof:t,type:e.type,key:a,ref:o,props:i,_owner:s}},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:o,_context:e},e.Consumer=e},e.createElement=T,e.createFactory=function(e){var t=T.bind(null,e);return t.type=e,t},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=D,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:M}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=te.transition;te.transition={};try{e()}finally{te.transition=t}},e.unstable_act=re,e.useCallback=function(e,t){return N.current.useCallback(e,t)},e.useContext=function(e){return N.current.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e){return N.current.useDeferredValue(e)},e.useEffect=function(e,t){return N.current.useEffect(e,t)},e.useId=function(){return N.current.useId()},e.useImperativeHandle=function(e,t,n){return N.current.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return N.current.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return N.current.useLayoutEffect(e,t)},e.useMemo=function(e,t){return N.current.useMemo(e,t)},e.useReducer=function(e,t,n){return N.current.useReducer(e,t,n)},e.useRef=function(e){return N.current.useRef(e)},e.useState=function(e){return N.current.useState(e)},e.useSyncExternalStore=function(e,t,n){return N.current.useSyncExternalStore(e,t,n)},e.useTransition=function(){return N.current.useTransition()},e.version=`18.3.1`})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{var t=d(),n=Symbol.for(`react.element`),r=Symbol.for(`react.fragment`),i=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var s,c={},l=null,u=null;for(s in r!==void 0&&(l=``+r),t.key!==void 0&&(l=``+t.key),t.ref!==void 0&&(u=t.ref),t)i.call(t,s)&&!o.hasOwnProperty(s)&&(c[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)c[s]===void 0&&(c[s]=t[s]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:a.current}}e.Fragment=r,e.jsx=s,e.jsxs=s})),p=o(((e,t)=>{t.exports=f()})),m=l(d(),1),h=p(),g=m.createContext(void 0),_=e=>{let t=m.useContext(g);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},v=({client:e,children:t})=>(m.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,h.jsx)(g.Provider,{value:e,children:t})),y={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},b=new class{#e=y;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function x(e){setTimeout(e,0)}var S=typeof window>`u`||`Deno`in globalThis;function C(){}function w(e,t){return typeof e==`function`?e(t):e}function T(e){return typeof e==`number`&&e>=0&&e!==1/0}function E(e,t){return Math.max(e+(t||0)-Date.now(),0)}function D(e,t){return typeof e==`function`?e(t):e}function O(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==A(o,t.options))return!1}else if(!j(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function k(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(ee(t.options.mutationKey)!==ee(a))return!1}else if(!j(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function A(e,t){return(t?.queryKeyHashFn||ee)(e)}function ee(e){return JSON.stringify(e,(e,t)=>re(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function j(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let n=0;n<t.length;n++)if(!j(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!j(e[r],t[r]))return!1;return!0}return!1}var M=Object.prototype.hasOwnProperty;function N(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=ne(e)&&ne(t);if(!r&&!(re(e)&&re(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:M.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=N(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function te(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function ne(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function re(e){if(!P(e))return!1;let t=Object.getPrototypeOf(e),n=t?.constructor;if(n===void 0)return!0;if(typeof n!=`function`)return!1;let r=n.prototype;return!(!P(r)||!r.hasOwnProperty(`isPrototypeOf`)||t!==Object.prototype)}function P(e){return Object.prototype.toString.call(e)===`[object Object]`}function ie(e){return new Promise(t=>{b.setTimeout(t,e)})}function ae(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:N(e,t)}function oe(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function se(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ce=Symbol();function le(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===ce?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function ue(e,t){return typeof e==`function`?e(...t):!!e}function de(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var fe=()=>S,pe=()=>fe(),me=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(){}},he=new class extends me{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},ge=x;function _e(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=ge,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var ve=_e(),ye=new class extends me{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function be(e){return Math.min(1e3*2**e,3e4)}function xe(e){return(e??`online`)!==`online`||ye.isOnline()}var Se=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function Ce(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(C);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new Se(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>he.isFocused()&&(e.networkMode===`always`||ye.isOnline())&&e.canRun(),p=()=>xe(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=()=>new Promise(t=>{r=e=>{(c()||f())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(pe()?0:3),a=e.retryDelay??be,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!s){h(r);return}n++,e.onFail?.(n,r),ie(o).then(()=>f()?void 0:g()).then(()=>{t?h(r):_()})})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g().then(_),s)}}var we=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),T(this.gcTime)&&(this.#e=b.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(pe()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(b.clearTimeout(this.#e),this.#e=void 0)}};function Te(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{de(e,()=>t.signal,()=>n=!0)},u=le(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?se:oe;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?De:Ee,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:Ee(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function Ee(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function De(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Oe=class extends we{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=je(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=je(this.options);e.data!==void 0&&(this.setState(Ae(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=ae(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#c({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(C).catch(C):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>D(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ce||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>D(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!E(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#s||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=le(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?Te(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=Ce({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof Se&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await o.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof Se){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0),this.scheduleGc()}}#c(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...ke(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Ae(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),ve.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function ke(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:xe(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Ae(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function je(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var Me=class extends me{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Pe(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Fe(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Fe(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof D(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!te(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Ie(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||D(this.options.enabled,this.#t)!==D(t.enabled,this.#t)||D(this.options.staleTime,this.#t)!==D(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||D(this.options.enabled,this.#t)!==D(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return te(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch().then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(C)),t}#h(e){return!pe()&&D(this.options.enabled,this.#t)!==!1&&T(e)}#g(){this.#b();let e=D(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=E(this.#r.dataUpdatedAt,e)+1;this.#u=b.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return D(this.options.refetchInterval,this.#t)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=b.setInterval(()=>{(this.options.refetchIntervalInBackground||he.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(b.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(b.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Pe(e,t),o=i&&Ie(e,n,t,r);(a||o)&&(l={...l,...ke(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=ae(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=ae(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=Date.now(),m=`error`,u=!1);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Le(e,t),refetch:this.refetch,isEnabled:D(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),te(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size)return!0;let r=new Set(n??this.#p);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})();ve.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function Ne(e,t){return D(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||D(t.retryOnMount,e)!==!1)}function Pe(e,t){return Ne(e,t)||e.state.data!==void 0&&Fe(e,t,t.refetchOnMount)}function Fe(e,t,n){if(D(t.enabled,e)!==!1&&D(t.staleTime,e)!==`static`){let r=D(n,e);return r===`always`||r!==!1&&Le(e,t)}return!1}function Ie(e,t,n,r){return(e!==t||D(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Le(e,n)}function Le(e,t){return D(t.enabled,e)!==!1&&e.isStaleByTime(D(t.staleTime,e))}var Re=class extends we{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||ze(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=Ce({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),ve.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function ze(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Be=class extends me{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){let r=new Re({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Ve(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=Ve(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Ve(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=Ve(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){ve.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>k(t,e))}findAll(e={}){return this.getAll().filter(t=>k(e,t))}notify(e){ve.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return ve.batch(()=>Promise.all(e.map(e=>e.continue().catch(C))))}};function Ve(e){return e.options.scope?.id}var He=class extends me{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),te(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&ee(t.mutationKey)!==ee(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??ze();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){ve.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}};function Ue(e,t){let n=new Set(t);return e.filter(e=>!n.has(e))}var We=class extends me{#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=[];constructor(e,t,n){super(),this.#e=e,this.#r=n,this.#n=[],this.#i=[],this.#t=[],this.setQueries(t)}onSubscribe(){this.listeners.size===1&&this.#i.forEach(e=>{e.subscribe(t=>{this.#m(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#i.forEach(e=>{e.destroy()})}setQueries(e,t){this.#n=e,this.#r=t,ve.batch(()=>{let e=this.#i,t=this.#p(this.#n);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let n=t.map(e=>e.observer),r=n.map(e=>e.getCurrentResult()),i=e.length!==n.length,a=n.some((t,n)=>t!==e[n]),o=i||a,s=o?!0:r.some((e,t)=>{let n=this.#t[t];return!n||!te(e,n)});(o||s)&&(o&&(this.#l=t,this.#i=n),this.#t=r,this.hasListeners()&&(o&&(Ue(e,n).forEach(e=>{e.destroy()}),Ue(n,e).forEach(e=>{e.subscribe(t=>{this.#m(e,t)})})),this.#h()))})}getCurrentResult(){return this.#t}getQueries(){return this.#i.map(e=>e.getCurrentQuery())}getObservers(){return this.#i}getOptimisticResult(e,t){let n=this.#p(e),r=n.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions)),i=n.map(e=>e.defaultedQueryOptions.queryHash);return[r,e=>this.#d(e??r,t,i),()=>this.#u(r,n)]}#u(e,t){let n=new Set;return t.map((r,i)=>{let a=e[i];return r.defaultedQueryOptions.notifyOnChangeProps?a:r.observer.trackResult(a,e=>{n.has(e)||(n.add(e),t.forEach(t=>{t.observer.trackProp(e)}))})})}#d(e,t,n){if(t){let r=this.#c,i=n!==void 0&&r!==void 0&&(r.length!==n.length||n.some((e,t)=>e!==r[t]));return(this.#t!==this.#s||i||t!==this.#o)&&(this.#o=t,this.#s=this.#t,n!==void 0&&(this.#c=n),this.#a=N(this.#a,t(e))),this.#a}return e}#f(){return!this.#r?.combine||this.#i.some((e,t)=>e.options.suspense&&this.#t[t]?.data===void 0)}#p(e){let t=new Map;this.#i.forEach(e=>{let n=e.options.queryHash;if(!n)return;let r=t.get(n);r?r.push(e):t.set(n,[e])});let n=[];return e.forEach(e=>{let r=this.#e.defaultQueryOptions(e),i=t.get(r.queryHash)?.shift()??new Me(this.#e,r);n.push({defaultedQueryOptions:r,observer:i})}),n}#m(e,t){let n=this.#i.indexOf(e);n!==-1&&(this.#t=this.#t.slice(),this.#t[n]=t,this.#h())}#h(){if(this.hasListeners()){let e=this.#f(),t=this.#a,n=e?t:this.#d(this.#u(this.#t,this.#l),this.#r?.combine);(e||t!==n)&&ve.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},Ge=class extends me{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??A(r,t),a=this.get(i);return a||(a=new Oe({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){this.#e.get(e.queryHash)===e&&(e.destroy(),this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){ve.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>O(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>O(e,t)):t}notify(e){ve.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){ve.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ve.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Ke=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Ge,this.#t=e.mutationCache||new Be,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=he.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=ye.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(D(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=w(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return ve.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;ve.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return ve.batch(()=>{let r=n.findAll(e),i=new Set(r);return r.forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t},r=ve.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(C).catch(C)}invalidateQueries(e,t={}){return ve.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=ve.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(C)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(C)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t),r=n.isStaleByTime(D(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(D(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(C).catch(C)}infiniteQuery(e){return e._type=`infinite`,this.query(e)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(C).catch(C)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return ye.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(ee(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{j(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(ee(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{j(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=A(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===ce&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},qe=m.createContext(!1),Je=()=>m.useContext(qe);qe.Provider;function Ye(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Xe=m.createContext(Ye()),Ze=()=>m.useContext(Xe),Qe=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?ue(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},$e=e=>{m.useEffect(()=>{e.clearReset()},[e])},et=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||ue(n,[e.error,r])),tt=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},nt=(e,t)=>e?.suspense&&t.isPending,rt=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function it({queries:e,...t},n){let r=_(n),i=Je(),a=Ze(),o=t.subscribed!==!1,s=m.useMemo(()=>e.map(e=>{let t=r.defaultQueryOptions(e);return t._optimisticResults=i?`isRestoring`:o?`optimistic`:void 0,t}),[e,r,i,o]);s.forEach(e=>{tt(e);let t=r.getQueryCache().get(e.queryHash);Qe(e,a,t)}),$e(a);let[c]=m.useState(()=>new We(r,s,t)),[l,u,d]=c.getOptimisticResult(s,t.combine),f=!i&&o;m.useSyncExternalStore(m.useCallback(e=>f?c.subscribe(ve.batchCalls(e)):C,[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),m.useEffect(()=>{c.setQueries(s,t)},[s,t,c]);let p=l.some((e,t)=>nt(s[t],e))?l.flatMap((e,t)=>{let n=s[t];return n&&nt(n,e)?rt(n,new Me(r,n),a):[]}):[];if(p.length>0)throw Promise.all(p);let h=l.find((e,t)=>{let n=s[t];return n&&et({result:e,errorResetBoundary:a,throwOnError:n.throwOnError,query:r.getQueryCache().get(n.queryHash),suspense:n.suspense})});if(h)throw h.error;return u(d())}function at(e,t,n){let r=Je(),i=Ze(),a=_(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,tt(o),Qe(o,i,s),$e(i);let[l]=m.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&c;if(m.useSyncExternalStore(m.useCallback(e=>{let t=d?l.subscribe(ve.batchCalls(e)):C;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),m.useEffect(()=>{l.setOptions(o)},[o,l]),nt(o,u))throw rt(o,l,i);if(et({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}function ot(e,t){return at(e,Me,t)}function st(e,t){let n=_(t),[r]=m.useState(()=>new He(n,e));m.useEffect(()=>{r.setOptions(e)},[r,e]);let i=m.useSyncExternalStore(m.useCallback(e=>r.subscribe(ve.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=m.useCallback((...e)=>{r.mutate(e[0],e[1]).catch(C)},[r]);if(i.error&&ue(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var ct=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=typeof setTimeout==`function`?setTimeout:null,_=typeof clearTimeout==`function`?clearTimeout:null,v=typeof setImmediate<`u`?setImmediate:null;typeof navigator<`u`&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function b(e){if(h=!1,y(e),!m){if(n(c)!==null)m=!0,j(x);else{var t=n(l);t!==null&&M(b,t.startTime-e)}}}function x(t,i){m=!1,h&&(h=!1,_(w),w=-1),p=!0;var a=f;try{for(y(i),d=n(c);d!==null&&(!(d.expirationTime>i)||t&&!D());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=i);i=e.unstable_now(),typeof s==`function`?d.callback=s:d===n(c)&&r(c),y(i)}else r(c);d=n(c)}if(d!==null)var u=!0;else{var g=n(l);g!==null&&M(b,g.startTime-i),u=!1}return u}finally{d=null,f=a,p=!1}}var S=!1,C=null,w=-1,T=5,E=-1;function D(){return!(e.unstable_now()-E<T)}function O(){if(C!==null){var t=e.unstable_now();E=t;var n=!0;try{n=C(!0,t)}finally{n?k():(S=!1,C=null)}}else S=!1}var k;if(typeof v==`function`)k=function(){v(O)};else if(typeof MessageChannel<`u`){var A=new MessageChannel,ee=A.port2;A.port1.onmessage=O,k=function(){ee.postMessage(null)}}else k=function(){g(O,0)};function j(e){C=e,S||(S=!0,k())}function M(t,n){w=g(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,j(x))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):T=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(_(w),w=-1):h=!0,M(b,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,j(x))),r},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),lt=o(((e,t)=>{t.exports=ct()})),ut=o((e=>{var t=d(),n=lt();function r(e){for(var t=`https://reactjs.org/docs/error-decoder.html?invariant=`+e,n=1;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n]);return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}var i=new Set,a={};function o(e,t){s(e,t),s(e+`Capture`,t)}function s(e,t){for(a[e]=t,e=0;e<t.length;e++)i.add(t[e])}var c=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,l=Object.prototype.hasOwnProperty,u=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,f={},p={};function m(e){return l.call(p,e)?!0:l.call(f,e)?!1:u.test(e)?p[e]=!0:(f[e]=!0,!1)}function h(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case`function`:case`symbol`:return!0;case`boolean`:return r?!1:n===null?(e=e.toLowerCase().slice(0,5),e!==`data-`&&e!==`aria-`):!n.acceptsBooleans;default:return!1}}function g(e,t,n,r){if(t==null||h(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function _(e,t,n,r,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var v={};`children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style`.split(` `).forEach(function(e){v[e]=new _(e,0,!1,e,null,!1,!1)}),[[`acceptCharset`,`accept-charset`],[`className`,`class`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`]].forEach(function(e){var t=e[0];v[t]=new _(t,1,!1,e[1],null,!1,!1)}),[`contentEditable`,`draggable`,`spellCheck`,`value`].forEach(function(e){v[e]=new _(e,2,!1,e.toLowerCase(),null,!1,!1)}),[`autoReverse`,`externalResourcesRequired`,`focusable`,`preserveAlpha`].forEach(function(e){v[e]=new _(e,2,!1,e,null,!1,!1)}),`allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope`.split(` `).forEach(function(e){v[e]=new _(e,3,!1,e.toLowerCase(),null,!1,!1)}),[`checked`,`multiple`,`muted`,`selected`].forEach(function(e){v[e]=new _(e,3,!0,e,null,!1,!1)}),[`capture`,`download`].forEach(function(e){v[e]=new _(e,4,!1,e,null,!1,!1)}),[`cols`,`rows`,`size`,`span`].forEach(function(e){v[e]=new _(e,6,!1,e,null,!1,!1)}),[`rowSpan`,`start`].forEach(function(e){v[e]=new _(e,5,!1,e.toLowerCase(),null,!1,!1)});var y=/[\-:]([a-z])/g;function b(e){return e[1].toUpperCase()}`accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height`.split(` `).forEach(function(e){var t=e.replace(y,b);v[t]=new _(t,1,!1,e,null,!1,!1)}),`xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type`.split(` `).forEach(function(e){var t=e.replace(y,b);v[t]=new _(t,1,!1,e,`http://www.w3.org/1999/xlink`,!1,!1)}),[`xml:base`,`xml:lang`,`xml:space`].forEach(function(e){var t=e.replace(y,b);v[t]=new _(t,1,!1,e,`http://www.w3.org/XML/1998/namespace`,!1,!1)}),[`tabIndex`,`crossOrigin`].forEach(function(e){v[e]=new _(e,1,!1,e.toLowerCase(),null,!1,!1)}),v.xlinkHref=new _(`xlinkHref`,1,!1,`xlink:href`,`http://www.w3.org/1999/xlink`,!0,!1),[`src`,`href`,`action`,`formAction`].forEach(function(e){v[e]=new _(e,1,!1,e.toLowerCase(),null,!0,!0)});function x(e,t,n,r){var i=v.hasOwnProperty(t)?v[t]:null;(i===null?r||!(2<t.length)||t[0]!==`o`&&t[0]!==`O`||t[1]!==`n`&&t[1]!==`N`:i.type!==0)&&(g(t,n,i,r)&&(n=null),r||i===null?m(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,``+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type!==3&&``:n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&!0===n?``:``+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var S=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,C=Symbol.for(`react.element`),w=Symbol.for(`react.portal`),T=Symbol.for(`react.fragment`),E=Symbol.for(`react.strict_mode`),D=Symbol.for(`react.profiler`),O=Symbol.for(`react.provider`),k=Symbol.for(`react.context`),A=Symbol.for(`react.forward_ref`),ee=Symbol.for(`react.suspense`),j=Symbol.for(`react.suspense_list`),M=Symbol.for(`react.memo`),N=Symbol.for(`react.lazy`),te=Symbol.for(`react.offscreen`),ne=Symbol.iterator;function re(e){return typeof e!=`object`||!e?null:(e=ne&&e[ne]||e[`@@iterator`],typeof e==`function`?e:null)}var P=Object.assign,ie;function ae(e){if(ie===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ie=t&&t[1]||``}return`
|
|
2
|
-
`+ie+e}var oe=!1;function se(e,t){if(!e||oe)return``;oe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t){if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&typeof t.stack==`string`){for(var i=t.stack.split(`
|
|
3
|
-
`),a=r.stack.split(`
|
|
4
|
-
`),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(o!==1||s!==1)do if(o--,s--,0>s||i[o]!==a[s]){var c=`
|
|
5
|
-
`+i[o].replace(` at new `,` at `);return e.displayName&&c.includes(`<anonymous>`)&&(c=c.replace(`<anonymous>`,e.displayName)),c}while(1<=o&&0<=s);break}}}finally{oe=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:``)?ae(e):``}function ce(e){switch(e.tag){case 5:return ae(e.type);case 16:return ae(`Lazy`);case 13:return ae(`Suspense`);case 19:return ae(`SuspenseList`);case 0:case 2:case 15:return e=se(e.type,!1),e;case 11:return e=se(e.type.render,!1),e;case 1:return e=se(e.type,!0),e;default:return``}}function le(e){if(e==null)return null;if(typeof e==`function`)return e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case T:return`Fragment`;case w:return`Portal`;case D:return`Profiler`;case E:return`StrictMode`;case ee:return`Suspense`;case j:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case k:return(e.displayName||`Context`)+`.Consumer`;case O:return(e._context.displayName||`Context`)+`.Provider`;case A:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case M:return t=e.displayName||null,t===null?le(e.type)||`Memo`:t;case N:t=e._payload,e=e._init;try{return le(e(t))}catch{}}return null}function ue(e){var t=e.type;switch(e.tag){case 24:return`Cache`;case 9:return(t.displayName||`Context`)+`.Consumer`;case 10:return(t._context.displayName||`Context`)+`.Provider`;case 18:return`DehydratedFragment`;case 11:return e=t.render,e=e.displayName||e.name||``,t.displayName||(e===``?`ForwardRef`:`ForwardRef(`+e+`)`);case 7:return`Fragment`;case 5:return t;case 4:return`Portal`;case 3:return`Root`;case 6:return`Text`;case 16:return le(t);case 8:return t===E?`StrictMode`:`Mode`;case 22:return`Offscreen`;case 12:return`Profiler`;case 21:return`Scope`;case 13:return`Suspense`;case 19:return`SuspenseList`;case 25:return`TracingMarker`;case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t==`function`)return t.displayName||t.name||null;if(typeof t==`string`)return t}return null}function de(e){switch(typeof e){case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function fe(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function pe(e){var t=fe(e)?`checked`:`value`,n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=``+e[t];if(!e.hasOwnProperty(t)&&n!==void 0&&typeof n.get==`function`&&typeof n.set==`function`){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function me(e){e._valueTracker||=pe(e)}function he(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=fe(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function ge(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function _e(e,t){var n=t.checked;return P({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ve(e,t){var n=t.defaultValue==null?``:t.defaultValue,r=t.checked==null?t.defaultChecked:t.checked;n=de(t.value==null?n:t.value),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type===`checkbox`||t.type===`radio`?t.checked!=null:t.value!=null}}function ye(e,t){t=t.checked,t!=null&&x(e,`checked`,t,!1)}function be(e,t){ye(e,t);var n=de(t.value),r=t.type;if(n!=null)r===`number`?(n===0&&e.value===``||e.value!=n)&&(e.value=``+n):e.value!==``+n&&(e.value=``+n);else if(r===`submit`||r===`reset`){e.removeAttribute(`value`);return}t.hasOwnProperty(`value`)?Se(e,t.type,n):t.hasOwnProperty(`defaultValue`)&&Se(e,t.type,de(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function xe(e,t,n){if(t.hasOwnProperty(`value`)||t.hasOwnProperty(`defaultValue`)){var r=t.type;if(!(r!==`submit`&&r!==`reset`||t.value!==void 0&&t.value!==null))return;t=``+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==``&&(e.name=``),e.defaultChecked=!!e._wrapperState.initialChecked,n!==``&&(e.name=n)}function Se(e,t,n){(t!==`number`||ge(e.ownerDocument)!==e)&&(n==null?e.defaultValue=``+e._wrapperState.initialValue:e.defaultValue!==``+n&&(e.defaultValue=``+n))}var Ce=Array.isArray;function we(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+de(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Te(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(r(91));return P({},t,{value:void 0,defaultValue:void 0,children:``+e._wrapperState.initialValue})}function Ee(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(r(92));if(Ce(n)){if(1<n.length)throw Error(r(93));n=n[0]}t=n}t??=``,n=t}e._wrapperState={initialValue:de(n)}}function De(e,t){var n=de(t.value),r=de(t.defaultValue);n!=null&&(n=``+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=``+r)}function Oe(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==``&&t!==null&&(e.value=t)}function ke(e){switch(e){case`svg`:return`http://www.w3.org/2000/svg`;case`math`:return`http://www.w3.org/1998/Math/MathML`;default:return`http://www.w3.org/1999/xhtml`}}function Ae(e,t){return e==null||e===`http://www.w3.org/1999/xhtml`?ke(t):e===`http://www.w3.org/2000/svg`&&t===`foreignObject`?`http://www.w3.org/1999/xhtml`:e}var je,Me=function(e){return typeof MSApp<`u`&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!==`http://www.w3.org/2000/svg`||`innerHTML`in e)e.innerHTML=t;else{for(je||=document.createElement(`div`),je.innerHTML=`<svg>`+t.valueOf().toString()+`</svg>`,t=je.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ne(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Pe={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},Fe=[`Webkit`,`ms`,`Moz`,`O`];Object.keys(Pe).forEach(function(e){Fe.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Pe[t]=Pe[e]})});function Ie(e,t,n){return t==null||typeof t==`boolean`||t===``?``:n||typeof t!=`number`||t===0||Pe.hasOwnProperty(e)&&Pe[e]?(``+t).trim():t+`px`}function Le(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=n.indexOf(`--`)===0,i=Ie(n,t[n],r);n===`float`&&(n=`cssFloat`),r?e.setProperty(n,i):e[n]=i}}var Re=P({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 ze(e,t){if(t){if(Re[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(r(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(r(60));if(typeof t.dangerouslySetInnerHTML!=`object`||!(`__html`in t.dangerouslySetInnerHTML))throw Error(r(61))}if(t.style!=null&&typeof t.style!=`object`)throw Error(r(62))}}function Be(e,t){if(e.indexOf(`-`)===-1)return typeof t.is==`string`;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Ve=null;function He(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ue=null,We=null,Ge=null;function Ke(e){if(e=Gi(e)){if(typeof Ue!=`function`)throw Error(r(280));var t=e.stateNode;t&&(t=qi(t),Ue(e.stateNode,e.type,t))}}function qe(e){We?Ge?Ge.push(e):Ge=[e]:We=e}function Je(){if(We){var e=We,t=Ge;if(Ge=We=null,Ke(e),t)for(e=0;e<t.length;e++)Ke(t[e])}}function Ye(e,t){return e(t)}function Xe(){}var Ze=!1;function Qe(e,t,n){if(Ze)return e(t,n);Ze=!0;try{return Ye(e,t,n)}finally{Ze=!1,(We!==null||Ge!==null)&&(Xe(),Je())}}function $e(e,t){var n=e.stateNode;if(n===null)return null;var i=qi(n);if(i===null)return null;n=i[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(i=!i.disabled)||(e=e.type,i=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!i;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(r(231,t,typeof n));return n}var et=!1;if(c)try{var tt={};Object.defineProperty(tt,"passive",{get:function(){et=!0}}),window.addEventListener(`test`,tt,tt),window.removeEventListener(`test`,tt,tt)}catch{et=!1}function nt(e,t,n,r,i,a,o,s,c){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(e){this.onError(e)}}var rt=!1,it=null,at=!1,ot=null,st={onError:function(e){rt=!0,it=e}};function ct(e,t,n,r,i,a,o,s,c){rt=!1,it=null,nt.apply(st,arguments)}function ut(e,t,n,i,a,o,s,c,l){if(ct.apply(this,arguments),rt){if(rt){var u=it;rt=!1,it=null}else throw Error(r(198));at||(at=!0,ot=u)}}function dt(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function ft(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function pt(e){if(dt(e)!==e)throw Error(r(188))}function mt(e){var t=e.alternate;if(!t){if(t=dt(e),t===null)throw Error(r(188));return t===e?e:null}for(var n=e,i=t;;){var a=n.return;if(a===null)break;var o=a.alternate;if(o===null){if(i=a.return,i!==null){n=i;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return pt(a),e;if(o===i)return pt(a),t;o=o.sibling}throw Error(r(188))}if(n.return!==i.return)n=a,i=o;else{for(var s=!1,c=a.child;c;){if(c===n){s=!0,n=a,i=o;break}if(c===i){s=!0,i=a,n=o;break}c=c.sibling}if(!s){for(c=o.child;c;){if(c===n){s=!0,n=o,i=a;break}if(c===i){s=!0,i=o,n=a;break}c=c.sibling}if(!s)throw Error(r(189))}}if(n.alternate!==i)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?e:t}function ht(e){return e=mt(e),e===null?null:F(e)}function F(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=F(e);if(t!==null)return t;e=e.sibling}return null}var gt=n.unstable_scheduleCallback,_t=n.unstable_cancelCallback,vt=n.unstable_shouldYield,yt=n.unstable_requestPaint,bt=n.unstable_now,xt=n.unstable_getCurrentPriorityLevel,St=n.unstable_ImmediatePriority,Ct=n.unstable_UserBlockingPriority,wt=n.unstable_NormalPriority,Tt=n.unstable_LowPriority,Et=n.unstable_IdlePriority,Dt=null,Ot=null;function kt(e){if(Ot&&typeof Ot.onCommitFiberRoot==`function`)try{Ot.onCommitFiberRoot(Dt,e,void 0,(e.current.flags&128)==128)}catch{}}var At=Math.clz32?Math.clz32:I,jt=Math.log,Mt=Math.LN2;function I(e){return e>>>=0,e===0?32:31-(jt(e)/Mt|0)|0}var Nt=64,Pt=4194304;function Ft(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function It(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s===0?(a&=o,a!==0&&(r=Ft(a))):r=Ft(s)}else o=n&~i,o===0?a!==0&&(r=Ft(a)):r=Ft(o);if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,a=t&-t,i>=a||i===16&&a&4194240))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-At(t),i=1<<n,r|=e[n],t&=~i;return r}function Lt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Rt(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-At(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Lt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}}function zt(e){return e=e.pendingLanes&-1073741825,e===0?e&1073741824?1073741824:0:e}function Bt(){var e=Nt;return Nt<<=1,!(Nt&4194240)&&(Nt=64),e}function Vt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ht(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-At(t),e[t]=n}function Ut(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-At(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}function Wt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-At(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Gt=0;function Kt(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var qt,Jt,Yt,Xt,Zt,Qt=!1,$t=[],en=null,tn=null,nn=null,rn=new Map,an=new Map,on=[],sn=`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 cn(e,t){switch(e){case`focusin`:case`focusout`:en=null;break;case`dragenter`:case`dragleave`:tn=null;break;case`mouseover`:case`mouseout`:nn=null;break;case`pointerover`:case`pointerout`:rn.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:an.delete(t.pointerId)}}function ln(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Gi(t),t!==null&&Jt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function un(e,t,n,r,i){switch(t){case`focusin`:return en=ln(en,e,t,n,r,i),!0;case`dragenter`:return tn=ln(tn,e,t,n,r,i),!0;case`mouseover`:return nn=ln(nn,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return rn.set(a,ln(rn.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,an.set(a,ln(an.get(a)||null,e,t,n,r,i)),!0}return!1}function dn(e){var t=Wi(e.target);if(t!==null){var n=dt(t);if(n!==null){if(t=n.tag,t===13){if(t=ft(n),t!==null){e.blockedOn=t,Zt(e.priority,function(){Yt(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function fn(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Cn(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ve=r,n.target.dispatchEvent(r),Ve=null}else return t=Gi(n),t!==null&&Jt(t),e.blockedOn=n,!1;t.shift()}return!0}function pn(e,t,n){fn(e)&&n.delete(t)}function mn(){Qt=!1,en!==null&&fn(en)&&(en=null),tn!==null&&fn(tn)&&(tn=null),nn!==null&&fn(nn)&&(nn=null),rn.forEach(pn),an.forEach(pn)}function hn(e,t){e.blockedOn===t&&(e.blockedOn=null,Qt||(Qt=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,mn)))}function gn(e){function t(t){return hn(t,e)}if(0<$t.length){hn($t[0],e);for(var n=1;n<$t.length;n++){var r=$t[n];r.blockedOn===e&&(r.blockedOn=null)}}for(en!==null&&hn(en,e),tn!==null&&hn(tn,e),nn!==null&&hn(nn,e),rn.forEach(t),an.forEach(t),n=0;n<on.length;n++)r=on[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<on.length&&(n=on[0],n.blockedOn===null);)dn(n),n.blockedOn===null&&on.shift()}var _n=S.ReactCurrentBatchConfig,vn=!0;function yn(e,t,n,r){var i=Gt,a=_n.transition;_n.transition=null;try{Gt=1,xn(e,t,n,r)}finally{Gt=i,_n.transition=a}}function bn(e,t,n,r){var i=Gt,a=_n.transition;_n.transition=null;try{Gt=4,xn(e,t,n,r)}finally{Gt=i,_n.transition=a}}function xn(e,t,n,r){if(vn){var i=Cn(e,t,n,r);if(i===null)gi(e,t,r,Sn,n),cn(e,r);else if(un(i,e,t,n,r))r.stopPropagation();else if(cn(e,r),t&4&&-1<sn.indexOf(e)){for(;i!==null;){var a=Gi(i);if(a!==null&&qt(a),a=Cn(e,t,n,r),a===null&&gi(e,t,r,Sn,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else gi(e,t,r,null,n)}}var Sn=null;function Cn(e,t,n,r){if(Sn=null,e=He(r),e=Wi(e),e!==null){if(t=dt(e),t===null)e=null;else if(n=t.tag,n===13){if(e=ft(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}return Sn=e,null}function wn(e){switch(e){case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 1;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`toggle`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 4;case`message`:switch(xt()){case St:return 1;case Ct:return 4;case wt:case Tt:return 16;case Et:return 536870912;default:return 16}default:return 16}}var Tn=null,En=null,Dn=null;function On(){if(Dn)return Dn;var e,t=En,n=t.length,r,i=`value`in Tn?Tn.value:Tn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return Dn=i.slice(e,1<r?1-r:void 0)}function kn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function An(){return!0}function jn(){return!1}function Mn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?An:jn,this.isPropagationStopped=jn,this}return P(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=An)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=An)},persist:function(){},isPersistent:An}),t}var Nn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Pn=Mn(Nn),Fn=P({},Nn,{view:0,detail:0}),In=Mn(Fn),Ln,Rn,zn,Bn=P({},Fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Zn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==zn&&(zn&&e.type===`mousemove`?(Ln=e.screenX-zn.screenX,Rn=e.screenY-zn.screenY):Rn=Ln=0,zn=e),Ln)},movementY:function(e){return`movementY`in e?e.movementY:Rn}}),Vn=Mn(Bn),Hn=Mn(P({},Bn,{dataTransfer:0})),Un=Mn(P({},Fn,{relatedTarget:0})),Wn=Mn(P({},Nn,{animationName:0,elapsedTime:0,pseudoElement:0})),Gn=Mn(P({},Nn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Kn=Mn(P({},Nn,{data:0})),qn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Jn={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`},Yn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Xn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Yn[e])?!!t[e]:!1}function Zn(){return Xn}var Qn=Mn(P({},Fn,{key:function(e){if(e.key){var t=qn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=kn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Jn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Zn,charCode:function(e){return e.type===`keypress`?kn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?kn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),$n=Mn(P({},Bn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),er=Mn(P({},Fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zn})),tr=Mn(P({},Nn,{propertyName:0,elapsedTime:0,pseudoElement:0})),nr=Mn(P({},Bn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),rr=[9,13,27,32],ir=c&&`CompositionEvent`in window,ar=null;c&&`documentMode`in document&&(ar=document.documentMode);var or=c&&`TextEvent`in window&&!ar,sr=c&&(!ir||ar&&8<ar&&11>=ar),cr=` `,lr=!1;function ur(e,t){switch(e){case`keyup`:return rr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function dr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var fr=!1;function pr(e,t){switch(e){case`compositionend`:return dr(t);case`keypress`:return t.which===32?(lr=!0,cr):null;case`textInput`:return e=t.data,e===cr&&lr?null:e;default:return null}}function mr(e,t){if(fr)return e===`compositionend`||!ir&&ur(e,t)?(e=On(),Dn=En=Tn=null,fr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return sr&&t.locale!==`ko`?null:t.data;default:return null}}var hr={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 gr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!hr[e.type]:t===`textarea`}function _r(e,t,n,r){qe(r),t=vi(t,`onChange`),0<t.length&&(n=new Pn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var vr=null,yr=null;function br(e){ui(e,0)}function xr(e){if(he(Ki(e)))return e}function Sr(e,t){if(e===`change`)return t}var Cr=!1;if(c){var wr;if(c){var Tr=`oninput`in document;if(!Tr){var Er=document.createElement(`div`);Er.setAttribute(`oninput`,`return;`),Tr=typeof Er.oninput==`function`}wr=Tr}else wr=!1;Cr=wr&&(!document.documentMode||9<document.documentMode)}function Dr(){vr&&(vr.detachEvent(`onpropertychange`,Or),yr=vr=null)}function Or(e){if(e.propertyName===`value`&&xr(yr)){var t=[];_r(t,yr,e,He(e)),Qe(br,t)}}function kr(e,t,n){e===`focusin`?(Dr(),vr=t,yr=n,vr.attachEvent(`onpropertychange`,Or)):e===`focusout`&&Dr()}function Ar(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return xr(yr)}function jr(e,t){if(e===`click`)return xr(t)}function Mr(e,t){if(e===`input`||e===`change`)return xr(t)}function Nr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Pr=typeof Object.is==`function`?Object.is:Nr;function Fr(e,t){if(Pr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!l.call(t,i)||!Pr(e[i],t[i]))return!1}return!0}function Ir(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Lr(e,t){var n=Ir(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Ir(n)}}function Rr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Rr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function zr(){for(var e=window,t=ge();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=ge(e.document)}return t}function Br(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}function Vr(e){var t=zr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Rr(n.ownerDocument.documentElement,n)){if(r!==null&&Br(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),`selectionStart`in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=Lr(n,a);var o=Lr(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus==`function`&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Hr=c&&`documentMode`in document&&11>=document.documentMode,Ur=null,Wr=null,Gr=null,Kr=!1;function qr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Kr||Ur==null||Ur!==ge(r)||(r=Ur,`selectionStart`in r&&Br(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Gr&&Fr(Gr,r)||(Gr=r,r=vi(Wr,`onSelect`),0<r.length&&(t=new Pn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Ur)))}function L(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Jr={animationend:L(`Animation`,`AnimationEnd`),animationiteration:L(`Animation`,`AnimationIteration`),animationstart:L(`Animation`,`AnimationStart`),transitionend:L(`Transition`,`TransitionEnd`)},Yr={},Xr={};c&&(Xr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Jr.animationend.animation,delete Jr.animationiteration.animation,delete Jr.animationstart.animation),`TransitionEvent`in window||delete Jr.transitionend.transition);function Zr(e){if(Yr[e])return Yr[e];if(!Jr[e])return e;var t=Jr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Xr)return Yr[e]=t[n];return e}var Qr=Zr(`animationend`),$r=Zr(`animationiteration`),ei=Zr(`animationstart`),ti=Zr(`transitionend`),ni=new Map,ri=`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 ii(e,t){ni.set(e,t),o(t,[e])}for(var ai=0;ai<ri.length;ai++){var oi=ri[ai];ii(oi.toLowerCase(),`on`+(oi[0].toUpperCase()+oi.slice(1)))}ii(Qr,`onAnimationEnd`),ii($r,`onAnimationIteration`),ii(ei,`onAnimationStart`),ii(`dblclick`,`onDoubleClick`),ii(`focusin`,`onFocus`),ii(`focusout`,`onBlur`),ii(ti,`onTransitionEnd`),s(`onMouseEnter`,[`mouseout`,`mouseover`]),s(`onMouseLeave`,[`mouseout`,`mouseover`]),s(`onPointerEnter`,[`pointerout`,`pointerover`]),s(`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 si=`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(` `),ci=new Set(`cancel close invalid load scroll toggle`.split(` `).concat(si));function li(e,t,n){var r=e.type||`unknown-event`;e.currentTarget=n,ut(r,t,void 0,e),e.currentTarget=null}function ui(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;li(i,s,l),a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;li(i,s,l),a=c}}}if(at)throw e=ot,at=!1,ot=null,e}function di(e,t){var n=t[Vi];n===void 0&&(n=t[Vi]=new Set);var r=e+`__bubble`;n.has(r)||(hi(t,e,2,!1),n.add(r))}function fi(e,t,n){var r=0;t&&(r|=4),hi(n,e,r,t)}var pi=`_reactListening`+Math.random().toString(36).slice(2);function mi(e){if(!e[pi]){e[pi]=!0,i.forEach(function(t){t!==`selectionchange`&&(ci.has(t)||fi(t,!1,e),fi(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[pi]||(t[pi]=!0,fi(`selectionchange`,!1,t))}}function hi(e,t,n,r){switch(wn(t)){case 1:var i=yn;break;case 4:i=bn;break;default:i=xn}n=i.bind(null,t,n,e),i=void 0,!et||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function gi(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;o=o.return}for(;s!==null;){if(o=Wi(s),o===null)return;if(c=o.tag,c===5||c===6){r=a=o;continue a}s=s.parentNode}}r=r.return}Qe(function(){var r=a,i=He(n),o=[];a:{var s=ni.get(e);if(s!==void 0){var c=Pn,l=e;switch(e){case`keypress`:if(kn(n)===0)break a;case`keydown`:case`keyup`:c=Qn;break;case`focusin`:l=`focus`,c=Un;break;case`focusout`:l=`blur`,c=Un;break;case`beforeblur`:case`afterblur`:c=Un;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:c=Vn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:c=Hn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:c=er;break;case Qr:case $r:case ei:c=Wn;break;case ti:c=tr;break;case`scroll`:c=In;break;case`wheel`:c=nr;break;case`copy`:case`cut`:case`paste`:c=Gn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:c=$n}var u=!!(t&4),d=!u&&e===`scroll`,f=u?s===null?null:s+`Capture`:s;u=[];for(var p=r,m;p!==null;){m=p;var h=m.stateNode;if(m.tag===5&&h!==null&&(m=h,f!==null&&(h=$e(p,f),h!=null&&u.push(_i(p,h,m)))),d)break;p=p.return}0<u.length&&(s=new c(s,l,null,n,i),o.push({event:s,listeners:u}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,s&&n!==Ve&&(l=n.relatedTarget||n.fromElement)&&(Wi(l)||l[Bi]))break a;if((c||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Wi(l):null,l!==null&&(d=dt(l),l!==d||l.tag!==5&&l.tag!==6)&&(l=null)):(c=null,l=r),c!==l)){if(u=Vn,h=`onMouseLeave`,f=`onMouseEnter`,p=`mouse`,(e===`pointerout`||e===`pointerover`)&&(u=$n,h=`onPointerLeave`,f=`onPointerEnter`,p=`pointer`),d=c==null?s:Ki(c),m=l==null?s:Ki(l),s=new u(h,p+`leave`,c,n,i),s.target=d,s.relatedTarget=m,h=null,Wi(i)===r&&(u=new u(f,p+`enter`,l,n,i),u.target=m,u.relatedTarget=d,h=u),d=h,c&&l)b:{for(u=c,f=l,p=0,m=u;m;m=yi(m))p++;for(m=0,h=f;h;h=yi(h))m++;for(;0<p-m;)u=yi(u),p--;for(;0<m-p;)f=yi(f),m--;for(;p--;){if(u===f||f!==null&&u===f.alternate)break b;u=yi(u),f=yi(f)}u=null}else u=null;c!==null&&bi(o,s,c,u,!1),l!==null&&d!==null&&bi(o,d,l,u,!0)}}a:{if(s=r?Ki(r):window,c=s.nodeName&&s.nodeName.toLowerCase(),c===`select`||c===`input`&&s.type===`file`)var g=Sr;else if(gr(s)){if(Cr)g=Mr;else{g=Ar;var _=kr}}else(c=s.nodeName)&&c.toLowerCase()===`input`&&(s.type===`checkbox`||s.type===`radio`)&&(g=jr);if(g&&=g(e,r)){_r(o,g,n,i);break a}_&&_(e,s,r),e===`focusout`&&(_=s._wrapperState)&&_.controlled&&s.type===`number`&&Se(s,`number`,s.value)}switch(_=r?Ki(r):window,e){case`focusin`:(gr(_)||_.contentEditable===`true`)&&(Ur=_,Wr=r,Gr=null);break;case`focusout`:Gr=Wr=Ur=null;break;case`mousedown`:Kr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Kr=!1,qr(o,n,i);break;case`selectionchange`:if(Hr)break;case`keydown`:case`keyup`:qr(o,n,i)}var v;if(ir)b:{switch(e){case`compositionstart`:var y=`onCompositionStart`;break b;case`compositionend`:y=`onCompositionEnd`;break b;case`compositionupdate`:y=`onCompositionUpdate`;break b}y=void 0}else fr?ur(e,n)&&(y=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(y=`onCompositionStart`);y&&(sr&&n.locale!==`ko`&&(fr||y!==`onCompositionStart`?y===`onCompositionEnd`&&fr&&(v=On()):(Tn=i,En=`value`in Tn?Tn.value:Tn.textContent,fr=!0)),_=vi(r,y),0<_.length&&(y=new Kn(y,e,null,n,i),o.push({event:y,listeners:_}),v?y.data=v:(v=dr(n),v!==null&&(y.data=v)))),(v=or?pr(e,n):mr(e,n))&&(r=vi(r,`onBeforeInput`),0<r.length&&(i=new Kn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:i,listeners:r}),i.data=v))}ui(o,t)})}function _i(e,t,n){return{instance:e,listener:t,currentTarget:n}}function vi(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=$e(e,n),a!=null&&r.unshift(_i(e,a,i)),a=$e(e,t),a!=null&&r.push(_i(e,a,i))),e=e.return}return r}function yi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function bi(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(c!==null&&c===r)break;s.tag===5&&l!==null&&(s=l,i?(c=$e(n,a),c!=null&&o.unshift(_i(n,c,s))):i||(c=$e(n,a),c!=null&&o.push(_i(n,c,s)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var xi=/\r\n?/g,Si=/\u0000|\uFFFD/g;function Ci(e){return(typeof e==`string`?e:``+e).replace(xi,`
|
|
6
|
-
`).replace(Si,``)}function wi(e,t,n){if(t=Ci(t),Ci(e)!==t&&n)throw Error(r(425))}function Ti(){}var Ei=null,Di=null;function Oi(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ki=typeof setTimeout==`function`?setTimeout:void 0,Ai=typeof clearTimeout==`function`?clearTimeout:void 0,ji=typeof Promise==`function`?Promise:void 0,Mi=typeof queueMicrotask==`function`?queueMicrotask:ji===void 0?ki:function(e){return ji.resolve(null).then(e).catch(Ni)};function Ni(e){setTimeout(function(){throw e})}function Pi(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`){if(r===0){e.removeChild(i),gn(t);return}r--}else n!==`$`&&n!==`$?`&&n!==`$!`||r++}n=i}while(n);gn(t)}function Fi(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`)break;if(t===`/$`)return null}}return e}function Ii(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`){if(t===0)return e;t--}else n===`/$`&&t++}e=e.previousSibling}return null}var Li=Math.random().toString(36).slice(2),Ri=`__reactFiber$`+Li,zi=`__reactProps$`+Li,Bi=`__reactContainer$`+Li,Vi=`__reactEvents$`+Li,Hi=`__reactListeners$`+Li,Ui=`__reactHandles$`+Li;function Wi(e){var t=e[Ri];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Bi]||n[Ri]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ii(e);e!==null;){if(n=e[Ri])return n;e=Ii(e)}return t}e=n,n=e.parentNode}return null}function Gi(e){return e=e[Ri]||e[Bi],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ki(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(r(33))}function qi(e){return e[zi]||null}var Ji=[],Yi=-1;function Xi(e){return{current:e}}function R(e){0>Yi||(e.current=Ji[Yi],Ji[Yi]=null,Yi--)}function Zi(e,t){Yi++,Ji[Yi]=e.current,e.current=t}var Qi={},$i=Xi(Qi),ea=Xi(!1),ta=Qi;function na(e,t){var n=e.type.contextTypes;if(!n)return Qi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function ra(e){return e=e.childContextTypes,e!=null}function ia(){R(ea),R($i)}function aa(e,t,n){if($i.current!==Qi)throw Error(r(168));Zi($i,t),Zi(ea,n)}function oa(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!=`function`)return n;for(var a in i=i.getChildContext(),i)if(!(a in t))throw Error(r(108,ue(e)||`Unknown`,a));return P({},n,i)}function sa(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Qi,ta=$i.current,Zi($i,e),Zi(ea,ea.current),!0}function ca(e,t,n){var i=e.stateNode;if(!i)throw Error(r(169));n?(e=oa(e,t,ta),i.__reactInternalMemoizedMergedChildContext=e,R(ea),R($i),Zi($i,e)):R(ea),Zi(ea,n)}var la=null,ua=!1,da=!1;function fa(e){la===null?la=[e]:la.push(e)}function pa(e){ua=!0,fa(e)}function ma(){if(!da&&la!==null){da=!0;var e=0,t=Gt;try{var n=la;for(Gt=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}la=null,ua=!1}catch(t){throw la!==null&&(la=la.slice(e+1)),gt(St,ma),t}finally{Gt=t,da=!1}}return null}var ha=[],ga=0,_a=null,va=0,ya=[],ba=0,xa=null,Sa=1,Ca=``;function wa(e,t){ha[ga++]=va,ha[ga++]=_a,_a=e,va=t}function Ta(e,t,n){ya[ba++]=Sa,ya[ba++]=Ca,ya[ba++]=xa,xa=e;var r=Sa;e=Ca;var i=32-At(r)-1;r&=~(1<<i),n+=1;var a=32-At(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Sa=1<<32-At(t)+i|n<<i|r,Ca=a+e}else Sa=1<<a|n<<i|r,Ca=e}function Ea(e){e.return!==null&&(wa(e,1),Ta(e,1,0))}function Da(e){for(;e===_a;)_a=ha[--ga],ha[ga]=null,va=ha[--ga],ha[ga]=null;for(;e===xa;)xa=ya[--ba],ya[ba]=null,Ca=ya[--ba],ya[ba]=null,Sa=ya[--ba],ya[ba]=null}var Oa=null,ka=null,Aa=!1,ja=null;function Ma(e,t){var n=q(5,null,null,0);n.elementType=`DELETED`,n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Na(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null&&(e.stateNode=t,Oa=e,ka=Fi(t.firstChild),!0);case 6:return t=e.pendingProps===``||t.nodeType!==3?null:t,t!==null&&(e.stateNode=t,Oa=e,ka=null,!0);case 13:return t=t.nodeType===8?t:null,t!==null&&(n=xa===null?null:{id:Sa,overflow:Ca},e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=q(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Oa=e,ka=null,!0);default:return!1}}function Pa(e){return!!(e.mode&1)&&!(e.flags&128)}function Fa(e){if(Aa){var t=ka;if(t){var n=t;if(!Na(e,t)){if(Pa(e))throw Error(r(418));t=Fi(n.nextSibling);var i=Oa;t&&Na(e,t)?Ma(i,n):(e.flags=e.flags&-4097|2,Aa=!1,Oa=e)}}else{if(Pa(e))throw Error(r(418));e.flags=e.flags&-4097|2,Aa=!1,Oa=e}}}function Ia(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Oa=e}function La(e){if(e!==Oa)return!1;if(!Aa)return Ia(e),Aa=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!==`head`&&t!==`body`&&!Oi(e.type,e.memoizedProps)),t&&=ka){if(Pa(e))throw Ra(),Error(r(418));for(;t;)Ma(e,t),t=Fi(t.nextSibling)}if(Ia(e),e.tag===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(r(317));a:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`){if(t===0){ka=Fi(e.nextSibling);break a}t--}else n!==`$`&&n!==`$!`&&n!==`$?`||t++}e=e.nextSibling}ka=null}}else ka=Oa?Fi(e.stateNode.nextSibling):null;return!0}function Ra(){for(var e=ka;e;)e=Fi(e.nextSibling)}function za(){ka=Oa=null,Aa=!1}function Ba(e){ja===null?ja=[e]:ja.push(e)}var Va=S.ReactCurrentBatchConfig;function Ha(e,t,n){if(e=n.ref,e!==null&&typeof e!=`function`&&typeof e!=`object`){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(r(309));var i=n.stateNode}if(!i)throw Error(r(147,e));var a=i,o=``+e;return t!==null&&t.ref!==null&&typeof t.ref==`function`&&t.ref._stringRef===o?t.ref:(t=function(e){var t=a.refs;e===null?delete t[o]:t[o]=e},t._stringRef=o,t)}if(typeof e!=`string`)throw Error(r(284));if(!n._owner)throw Error(r(290,e))}return e}function Ua(e,t){throw e=Object.prototype.toString.call(t),Error(r(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e))}function Wa(e){var t=e._init;return t(e._payload)}function Ga(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function i(e,t){for(e=new Map;t!==null;)t.key===null?e.set(t.index,t):e.set(t.key,t),t=t.sibling;return e}function a(e,t){return e=eu(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=2,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=2),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=ru(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===T?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===N&&Wa(i)===t.type)?(r=a(t,n.props),r.ref=Ha(e,t,n),r.return=e,r):(r=tu(n.type,n.key,n.props,null,e.mode,r),r.ref=Ha(e,t,n),r.return=e,r)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=iu(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=nu(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`)return t=ru(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case C:return n=tu(t.type,t.key,t.props,null,e.mode,n),n.ref=Ha(e,null,t),n.return=e,n;case w:return t=iu(t,e.mode,n),t.return=e,t;case N:var r=t._init;return f(e,r(t._payload),n)}if(Ce(t)||re(t))return t=nu(t,e.mode,n,null),t.return=e,t;Ua(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case C:return n.key===i?l(e,t,n,r):null;case w:return n.key===i?u(e,t,n,r):null;case N:return i=n._init,p(e,t,i(n._payload),r)}if(Ce(n)||re(n))return i===null?d(e,t,n,r,null):null;Ua(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case C:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case w:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case N:var a=r._init;return m(e,t,n,a(r._payload),i)}if(Ce(r)||re(r))return e=e.get(n)||null,d(t,e,r,i,null);Ua(t,r)}return null}function h(r,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(r,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(r,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(r,d),Aa&&wa(r,h),l;if(d===null){for(;h<s.length;h++)d=f(r,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Aa&&wa(r,h),l}for(d=i(r,d);h<s.length;h++)g=m(d,r,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(r,e)}),Aa&&wa(r,h),l}function g(a,s,c,l){var u=re(c);if(typeof u!=`function`)throw Error(r(150));if(c=u.call(c),c==null)throw Error(r(151));for(var d=u=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Aa&&wa(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Aa&&wa(a,g),u}for(h=i(a,h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Aa&&wa(a,g),u}function _(e,r,i,o){if(typeof i==`object`&&i&&i.type===T&&i.key===null&&(i=i.props.children),typeof i==`object`&&i){switch(i.$$typeof){case C:a:{for(var c=i.key,l=r;l!==null;){if(l.key===c){if(c=i.type,c===T){if(l.tag===7){n(e,l.sibling),r=a(l,i.props.children),r.return=e,e=r;break a}}else if(l.elementType===c||typeof c==`object`&&c&&c.$$typeof===N&&Wa(c)===l.type){n(e,l.sibling),r=a(l,i.props),r.ref=Ha(e,l,i),r.return=e,e=r;break a}n(e,l);break}t(e,l),l=l.sibling}i.type===T?(r=nu(i.props.children,e.mode,o,i.key),r.return=e,e=r):(o=tu(i.type,i.key,i.props,null,e.mode,o),o.ref=Ha(e,r,i),o.return=e,e=o)}return s(e);case w:a:{for(l=i.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),r=a(r,i.children||[]),r.return=e,e=r;break a}n(e,r);break}t(e,r),r=r.sibling}r=iu(i,e.mode,o),r.return=e,e=r}return s(e);case N:return l=i._init,_(e,r,l(i._payload),o)}if(Ce(i))return h(e,r,i,o);if(re(i))return g(e,r,i,o);Ua(e,i)}return typeof i==`string`&&i!==``||typeof i==`number`?(i=``+i,r!==null&&r.tag===6?(n(e,r.sibling),r=a(r,i),r.return=e,e=r):(n(e,r),r=ru(i,e.mode,o),r.return=e,e=r),s(e)):n(e,r)}return _}var Ka=Ga(!0),qa=Ga(!1),Ja=Xi(null),Ya=null,Xa=null,Za=null;function Qa(){Za=Xa=Ya=null}function $a(e){var t=Ja.current;R(Ja),e._currentValue=t}function eo(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function to(e,t){Ya=e,Za=Xa=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Gs=!0),e.firstContext=null)}function no(e){var t=e._currentValue;if(Za!==e){if(e={context:e,memoizedValue:t,next:null},Xa===null){if(Ya===null)throw Error(r(308));Xa=e,Ya.dependencies={lanes:0,firstContext:e}}else Xa=Xa.next=e}return t}var ro=null;function io(e){ro===null?ro=[e]:ro.push(e)}function ao(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,io(t)):(n.next=i.next,i.next=n),t.interleaved=n,oo(e,r)}function oo(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var so=!1;function co(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function lo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function uo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function fo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,U&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,oo(e,n)}return i=r.interleaved,i===null?(t.next=t,io(r)):(t.next=i.next,i.next=t),r.interleaved=t,oo(e,n)}function po(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194240)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Wt(e,n)}}function mo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ho(e,t,n,r){var i=e.updateQueue;so=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane,p=s.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});a:{var m=e,h=s;switch(f=t,p=n,h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(p,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(p,d,f):m,f==null)break a;d=P({},d,f);break a;case 2:so=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(1);if(u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);rl|=o,e.lanes=o,e.memoizedState=d}}function go(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],a=i.callback;if(a!==null){if(i.callback=null,i=n,typeof a!=`function`)throw Error(r(191,a));a.call(i)}}}var _o={},vo=Xi(_o),yo=Xi(_o),bo=Xi(_o);function xo(e){if(e===_o)throw Error(r(174));return e}function So(e,t){switch(Zi(bo,t),Zi(yo,e),Zi(vo,_o),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ae(null,``);break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ae(t,e)}R(vo),Zi(vo,t)}function Co(){R(vo),R(yo),R(bo)}function wo(e){xo(bo.current);var t=xo(vo.current),n=Ae(t,e.type);t!==n&&(Zi(yo,e),Zi(vo,n))}function To(e){yo.current===e&&(R(vo),R(yo))}var Eo=Xi(0);function Do(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data===`$?`||n.data===`$!`))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Oo=[];function ko(){for(var e=0;e<Oo.length;e++)Oo[e]._workInProgressVersionPrimary=null;Oo.length=0}var Ao=S.ReactCurrentDispatcher,jo=S.ReactCurrentBatchConfig,Mo=0,No=null,Po=null,Fo=null,Io=!1,Lo=!1,Ro=0,zo=0;function Bo(){throw Error(r(321))}function Vo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Pr(e[n],t[n]))return!1;return!0}function Ho(e,t,n,i,a,o){if(Mo=o,No=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ao.current=e===null||e.memoizedState===null?Ts:Es,e=n(i,a),Lo){o=0;do{if(Lo=!1,Ro=0,25<=o)throw Error(r(301));o+=1,Fo=Po=null,t.updateQueue=null,Ao.current=Ds,e=n(i,a)}while(Lo)}if(Ao.current=ws,t=Po!==null&&Po.next!==null,Mo=0,Fo=Po=No=null,Io=!1,t)throw Error(r(300));return e}function Uo(){var e=Ro!==0;return Ro=0,e}function Wo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Fo===null?No.memoizedState=Fo=e:Fo=Fo.next=e,Fo}function Go(){if(Po===null){var e=No.alternate;e=e===null?null:e.memoizedState}else e=Po.next;var t=Fo===null?No.memoizedState:Fo.next;if(t!==null)Fo=t,Po=e;else{if(e===null)throw Error(r(310));Po=e,e={memoizedState:Po.memoizedState,baseState:Po.baseState,baseQueue:Po.baseQueue,queue:Po.queue,next:null},Fo===null?No.memoizedState=Fo=e:Fo=Fo.next=e}return Fo}function Ko(e,t){return typeof t==`function`?t(e):t}function qo(e){var t=Go(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=Po,a=i.baseQueue,o=n.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}i.baseQueue=a=o,n.pending=null}if(a!==null){o=a.next,i=i.baseState;var c=s=null,l=null,u=o;do{var d=u.lane;if((Mo&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),i=u.hasEagerState?u.eagerState:e(i,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(c=l=f,s=i):l=l.next=f,No.lanes|=d,rl|=d}u=u.next}while(u!==null&&u!==o);l===null?s=i:l.next=c,Pr(i,t.memoizedState)||(Gs=!0),t.memoizedState=i,t.baseState=s,t.baseQueue=l,n.lastRenderedState=i}if(e=n.interleaved,e!==null){a=e;do o=a.lane,No.lanes|=o,rl|=o,a=a.next;while(a!==e)}else a===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Jo(e){var t=Go(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Pr(o,t.memoizedState)||(Gs=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,i]}function Yo(){}function Xo(e,t){var n=No,i=Go(),a=t(),o=!Pr(i.memoizedState,a);if(o&&(i.memoizedState=a,Gs=!0),i=i.queue,cs($o.bind(null,n,i,e),[e]),i.getSnapshot!==t||o||Fo!==null&&Fo.memoizedState.tag&1){if(n.flags|=2048,rs(9,Qo.bind(null,n,i,a,t),void 0,null),Zc===null)throw Error(r(349));Mo&30||Zo(n,t,a)}return a}function Zo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=No.updateQueue,t===null?(t={lastEffect:null,stores:null},No.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Qo(e,t,n,r){t.value=n,t.getSnapshot=r,es(t)&&ts(e)}function $o(e,t,n){return n(function(){es(t)&&ts(e)})}function es(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Pr(e,n)}catch{return!0}}function ts(e){var t=oo(e,1);t!==null&&Cl(t,e,1,-1)}function ns(e){var t=Wo();return typeof e==`function`&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ko,lastRenderedState:e},t.queue=e,e=e.dispatch=bs.bind(null,No,e),[t.memoizedState,e]}function rs(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=No.updateQueue,t===null?(t={lastEffect:null,stores:null},No.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function is(){return Go().memoizedState}function as(e,t,n,r){var i=Wo();No.flags|=e,i.memoizedState=rs(1|t,n,void 0,r===void 0?null:r)}function os(e,t,n,r){var i=Go();r=r===void 0?null:r;var a=void 0;if(Po!==null){var o=Po.memoizedState;if(a=o.destroy,r!==null&&Vo(r,o.deps)){i.memoizedState=rs(t,n,a,r);return}}No.flags|=e,i.memoizedState=rs(1|t,n,a,r)}function ss(e,t){return as(8390656,8,e,t)}function cs(e,t){return os(2048,8,e,t)}function ls(e,t){return os(4,2,e,t)}function us(e,t){return os(4,4,e,t)}function ds(e,t){if(typeof t==`function`)return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function fs(e,t,n){return n=n==null?null:n.concat([e]),os(4,4,ds.bind(null,t,e),n)}function ps(){}function ms(e,t){var n=Go();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Vo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function hs(e,t){var n=Go();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Vo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function gs(e,t,n){return Mo&21?(Pr(n,t)||(n=Bt(),No.lanes|=n,rl|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Gs=!0),e.memoizedState=n)}function _s(e,t){var n=Gt;Gt=n!==0&&4>n?n:4,e(!0);var r=jo.transition;jo.transition={};try{e(!1),t()}finally{Gt=n,jo.transition=r}}function vs(){return Go().memoizedState}function ys(e,t,n){var r=Sl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},xs(e))Ss(t,n);else if(n=ao(e,t,n,r),n!==null){var i=xl();Cl(n,e,r,i),Cs(n,t,r)}}function bs(e,t,n){var r=Sl(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(xs(e))Ss(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Pr(s,o)){var c=t.interleaved;c===null?(i.next=i,io(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}n=ao(e,t,i,r),n!==null&&(i=xl(),Cl(n,e,r,i),Cs(n,t,r))}}function xs(e){var t=e.alternate;return e===No||t!==null&&t===No}function Ss(e,t){Lo=Io=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Cs(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Wt(e,n)}}var ws={readContext:no,useCallback:Bo,useContext:Bo,useEffect:Bo,useImperativeHandle:Bo,useInsertionEffect:Bo,useLayoutEffect:Bo,useMemo:Bo,useReducer:Bo,useRef:Bo,useState:Bo,useDebugValue:Bo,useDeferredValue:Bo,useTransition:Bo,useMutableSource:Bo,useSyncExternalStore:Bo,useId:Bo,unstable_isNewReconciler:!1},Ts={readContext:no,useCallback:function(e,t){return Wo().memoizedState=[e,t===void 0?null:t],e},useContext:no,useEffect:ss,useImperativeHandle:function(e,t,n){return n=n==null?null:n.concat([e]),as(4194308,4,ds.bind(null,t,e),n)},useLayoutEffect:function(e,t){return as(4194308,4,e,t)},useInsertionEffect:function(e,t){return as(4,2,e,t)},useMemo:function(e,t){var n=Wo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Wo();return t=n===void 0?t:n(t),r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ys.bind(null,No,e),[r.memoizedState,e]},useRef:function(e){var t=Wo();return e={current:e},t.memoizedState=e},useState:ns,useDebugValue:ps,useDeferredValue:function(e){return Wo().memoizedState=e},useTransition:function(){var e=ns(!1),t=e[0];return e=_s.bind(null,e[1]),Wo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=No,a=Wo();if(Aa){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),Zc===null)throw Error(r(349));Mo&30||Zo(i,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ss($o.bind(null,i,o,e),[e]),i.flags|=2048,rs(9,Qo.bind(null,i,o,n,t),void 0,null),n},useId:function(){var e=Wo(),t=Zc.identifierPrefix;if(Aa){var n=Ca,r=Sa;n=(r&~(1<<32-At(r)-1)).toString(32)+n,t=`:`+t+`R`+n,n=Ro++,0<n&&(t+=`H`+n.toString(32)),t+=`:`}else n=zo++,t=`:`+t+`r`+n.toString(32)+`:`;return e.memoizedState=t},unstable_isNewReconciler:!1},Es={readContext:no,useCallback:ms,useContext:no,useEffect:cs,useImperativeHandle:fs,useInsertionEffect:ls,useLayoutEffect:us,useMemo:hs,useReducer:qo,useRef:is,useState:function(){return qo(Ko)},useDebugValue:ps,useDeferredValue:function(e){return gs(Go(),Po.memoizedState,e)},useTransition:function(){return[qo(Ko)[0],Go().memoizedState]},useMutableSource:Yo,useSyncExternalStore:Xo,useId:vs,unstable_isNewReconciler:!1},Ds={readContext:no,useCallback:ms,useContext:no,useEffect:cs,useImperativeHandle:fs,useInsertionEffect:ls,useLayoutEffect:us,useMemo:hs,useReducer:Jo,useRef:is,useState:function(){return Jo(Ko)},useDebugValue:ps,useDeferredValue:function(e){var t=Go();return Po===null?t.memoizedState=e:gs(t,Po.memoizedState,e)},useTransition:function(){return[Jo(Ko)[0],Go().memoizedState]},useMutableSource:Yo,useSyncExternalStore:Xo,useId:vs,unstable_isNewReconciler:!1};function Os(e,t){if(e&&e.defaultProps){for(var n in t=P({},t),e=e.defaultProps,e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function ks(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:P({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var As={isMounted:function(e){return(e=e._reactInternals)?dt(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=xl(),i=Sl(e),a=uo(r,i);a.payload=t,n!=null&&(a.callback=n),t=fo(e,a,i),t!==null&&(Cl(t,e,i,r),po(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=xl(),i=Sl(e),a=uo(r,i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=fo(e,a,i),t!==null&&(Cl(t,e,i,r),po(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=xl(),r=Sl(e),i=uo(n,r);i.tag=2,t!=null&&(i.callback=t),t=fo(e,i,r),t!==null&&(Cl(t,e,r,n),po(t,e,r))}};function js(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Fr(n,r)||!Fr(i,a):!0}function Ms(e,t,n){var r=!1,i=Qi,a=t.contextType;return typeof a==`object`&&a?a=no(a):(i=ra(t)?ta:$i.current,r=t.contextTypes,a=(r=r!=null)?na(e,i):Qi),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=As,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function Ns(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&As.enqueueReplaceState(t,t.state,null)}function Ps(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},co(e);var a=t.contextType;typeof a==`object`&&a?i.context=no(a):(a=ra(t)?ta:$i.current,i.context=na(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a==`function`&&(ks(e,t,a,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps==`function`||typeof i.getSnapshotBeforeUpdate==`function`||typeof i.UNSAFE_componentWillMount!=`function`&&typeof i.componentWillMount!=`function`||(t=i.state,typeof i.componentWillMount==`function`&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount==`function`&&i.UNSAFE_componentWillMount(),t!==i.state&&As.enqueueReplaceState(i,i.state,null),ho(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount==`function`&&(e.flags|=4194308)}function Fs(e,t){try{var n=``,r=t;do n+=ce(r),r=r.return;while(r);var i=n}catch(e){i=`
|
|
7
|
-
Error generating stack: `+e.message+`
|
|
8
|
-
`+e.stack}return{value:e,source:t,stack:i,digest:null}}function Is(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Ls(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var Rs=typeof WeakMap==`function`?WeakMap:Map;function zs(e,t,n){n=uo(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){dl||(dl=!0,fl=r),Ls(e,t)},n}function Bs(e,t,n){n=uo(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r==`function`){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Ls(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch==`function`&&(n.callback=function(){Ls(e,t),typeof r!=`function`&&(pl===null?pl=new Set([this]):pl.add(this));var n=t.stack;this.componentDidCatch(t.value,{componentStack:n===null?``:n})}),n}function Vs(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Rs;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=ql.bind(null,e,t,n),t.then(e,e))}function Hs(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t===null||t.dehydrated!==null),t)return e;e=e.return}while(e!==null);return null}function Us(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=uo(-1,1),t.tag=2,fo(n,t,1))),n.lanes|=1),e)}var Ws=S.ReactCurrentOwner,Gs=!1;function Ks(e,t,n,r){t.child=e===null?qa(t,null,n,r):Ka(t,e.child,n,r)}function qs(e,t,n,r,i){n=n.render;var a=t.ref;return to(t,i),r=Ho(e,t,n,r,a,i),n=Uo(),e!==null&&!Gs?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,pc(e,t,i)):(Aa&&n&&Ea(t),t.flags|=1,Ks(e,t,r,i),t.child)}function Js(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!J(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,Ys(e,t,a,r,i)):(e=tu(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&i)===0){var o=a.memoizedProps;if(n=n.compare,n=n===null?Fr:n,n(o,r)&&e.ref===t.ref)return pc(e,t,i)}return t.flags|=1,e=eu(a,r),e.ref=t.ref,e.return=t,t.child=e}function Ys(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Fr(a,r)&&e.ref===t.ref){if(Gs=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(Gs=!0);else return t.lanes=e.lanes,pc(e,t,i)}}return Qs(e,t,n,r,i)}function Xs(e,t,n){var r=t.pendingProps,i=r.children,a=e===null?null:e.memoizedState;if(r.mode===`hidden`){if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Zi(tl,el),el|=n;else{if(!(n&1073741824))return e=a===null?n:a.baseLanes|n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Zi(tl,el),el|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a===null?n:a.baseLanes,Zi(tl,el),el|=r}}else a===null?r=n:(r=a.baseLanes|n,t.memoizedState=null),Zi(tl,el),el|=r;return Ks(e,t,i,n),t.child}function Zs(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Qs(e,t,n,r,i){var a=ra(n)?ta:$i.current;return a=na(t,a),to(t,i),n=Ho(e,t,n,r,a,i),r=Uo(),e!==null&&!Gs?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,pc(e,t,i)):(Aa&&r&&Ea(t),t.flags|=1,Ks(e,t,n,i),t.child)}function $s(e,t,n,r,i){if(ra(n)){var a=!0;sa(t)}else a=!1;if(to(t,i),t.stateNode===null)fc(e,t),Ms(t,n,r),Ps(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var c=o.context,l=n.contextType;typeof l==`object`&&l?l=no(l):(l=ra(n)?ta:$i.current,l=na(t,l));var u=n.getDerivedStateFromProps,d=typeof u==`function`||typeof o.getSnapshotBeforeUpdate==`function`;d||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==r||c!==l)&&Ns(t,o,r,l),so=!1;var f=t.memoizedState;o.state=f,ho(t,r,o,i),c=t.memoizedState,s!==r||f!==c||ea.current||so?(typeof u==`function`&&(ks(t,n,u,r),c=t.memoizedState),(s=so||js(t,n,s,r,f,c,l))?(d||typeof o.UNSAFE_componentWillMount!=`function`&&typeof o.componentWillMount!=`function`||(typeof o.componentWillMount==`function`&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount==`function`&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount==`function`&&(t.flags|=4194308)):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=l,r=s):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,lo(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:Os(t.type,s),o.props=l,d=t.pendingProps,f=o.context,c=n.contextType,typeof c==`object`&&c?c=no(c):(c=ra(n)?ta:$i.current,c=na(t,c));var p=n.getDerivedStateFromProps;(u=typeof p==`function`||typeof o.getSnapshotBeforeUpdate==`function`)||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==d||f!==c)&&Ns(t,o,r,c),so=!1,f=t.memoizedState,o.state=f,ho(t,r,o,i);var m=t.memoizedState;s!==d||f!==m||ea.current||so?(typeof p==`function`&&(ks(t,n,p,r),m=t.memoizedState),(l=so||js(t,n,l,r,f,m,c)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!=`function`&&typeof o.componentWillUpdate!=`function`||(typeof o.componentWillUpdate==`function`&&o.componentWillUpdate(r,m,c),typeof o.UNSAFE_componentWillUpdate==`function`&&o.UNSAFE_componentWillUpdate(r,m,c)),typeof o.componentDidUpdate==`function`&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=c,r=l):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return ec(e,t,n,r,a,i)}function ec(e,t,n,r,i,a){Zs(e,t);var o=!!(t.flags&128);if(!r&&!o)return i&&ca(t,n,!1),pc(e,t,a);r=t.stateNode,Ws.current=t;var s=o&&typeof n.getDerivedStateFromError!=`function`?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Ka(t,e.child,null,a),t.child=Ka(t,null,s,a)):Ks(e,t,s,a),t.memoizedState=r.state,i&&ca(t,n,!0),t.child}function tc(e){var t=e.stateNode;t.pendingContext?aa(e,t.pendingContext,t.pendingContext!==t.context):t.context&&aa(e,t.context,!1),So(e,t.containerInfo)}function nc(e,t,n,r,i){return za(),Ba(i),t.flags|=256,Ks(e,t,n,r),t.child}var rc={dehydrated:null,treeContext:null,retryLane:0};function ic(e){return{baseLanes:e,cachePool:null,transitions:null}}function ac(e,t,n){var r=t.pendingProps,i=Eo.current,a=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!(i&2)),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Zi(Eo,i&1),e===null)return Fa(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.lanes=t.mode&1?e.data===`$!`?8:1073741824:1,null):(o=r.children,e=r.fallback,a?(r=t.mode,a=t.child,o={mode:`hidden`,children:o},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=Y(o,r,0,null),e=nu(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=ic(n),t.memoizedState=rc,e):oc(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return cc(e,t,o,r,s,i,n);if(a){a=r.fallback,o=t.mode,i=e.child,s=i.sibling;var c={mode:`hidden`,children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=eu(i,c),r.subtreeFlags=i.subtreeFlags&14680064),s===null?(a=nu(a,o,n,null),a.flags|=2):a=eu(s,a),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?ic(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=rc,r}return a=e.child,e=a.sibling,r=eu(a,{mode:`visible`,children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function oc(e,t){return t=Y({mode:`visible`,children:t},e.mode,0,null),t.return=e,e.child=t}function sc(e,t,n,r){return r!==null&&Ba(r),Ka(t,e.child,null,n),e=oc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function cc(e,t,n,i,a,o,s){if(n)return t.flags&256?(t.flags&=-257,i=Is(Error(r(422))),sc(e,t,s,i)):t.memoizedState===null?(o=i.fallback,a=t.mode,i=Y({mode:`visible`,children:i.children},a,0,null),o=nu(o,a,s,null),o.flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,t.mode&1&&Ka(t,e.child,null,s),t.child.memoizedState=ic(s),t.memoizedState=rc,o):(t.child=e.child,t.flags|=128,null);if(!(t.mode&1))return sc(e,t,s,null);if(a.data===`$!`){if(i=a.nextSibling&&a.nextSibling.dataset,i)var c=i.dgst;return i=c,o=Error(r(419)),i=Is(o,i,void 0),sc(e,t,s,i)}if(c=(s&e.childLanes)!==0,Gs||c){if(i=Zc,i!==null){switch(s&-s){case 4:a=2;break;case 16:a=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:a=32;break;case 536870912:a=268435456;break;default:a=0}a=(a&(i.suspendedLanes|s))===0?a:0,a!==0&&a!==o.retryLane&&(o.retryLane=a,oo(e,a),Cl(i,e,a,-1))}return Ll(),i=Is(Error(r(421))),sc(e,t,s,i)}return a.data===`$?`?(t.flags|=128,t.child=e.child,t=Yl.bind(null,e),a._reactRetry=t,null):(e=o.treeContext,ka=Fi(a.nextSibling),Oa=t,Aa=!0,ja=null,e!==null&&(ya[ba++]=Sa,ya[ba++]=Ca,ya[ba++]=xa,Sa=e.id,Ca=e.overflow,xa=t),t=oc(t,i.children),t.flags|=4096,t)}function lc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),eo(e.return,t,n)}function uc(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function dc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Ks(e,t,r.children,n),r=Eo.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&lc(e,n,t);else if(e.tag===19)lc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Zi(Eo,r),!(t.mode&1))t.memoizedState=null;else switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Do(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),uc(t,!1,i,n,a);break;case`backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Do(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}uc(t,!0,n,null,a);break;case`together`:uc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function fc(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function pc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),rl|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=eu(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=eu(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function mc(e,t,n){switch(t.tag){case 3:tc(t),za();break;case 5:wo(t);break;case 1:ra(t.type)&&sa(t);break;case 4:So(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Zi(Ja,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(Zi(Eo,Eo.current&1),e=pc(e,t,n),e===null?null:e.sibling):ac(e,t,n):(Zi(Eo,Eo.current&1),t.flags|=128,null);Zi(Eo,Eo.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return dc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Zi(Eo,Eo.current),r)break;return null;case 22:case 23:return t.lanes=0,Xs(e,t,n)}return pc(e,t,n)}var hc=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},gc=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,xo(vo.current);var o=null;switch(n){case`input`:i=_e(e,i),r=_e(e,r),o=[];break;case`select`:i=P({},i,{value:void 0}),r=P({},r,{value:void 0}),o=[];break;case`textarea`:i=Te(e,i),r=Te(e,r),o=[];break;default:typeof i.onClick!=`function`&&typeof r.onClick==`function`&&(e.onclick=Ti)}ze(n,r);var s;for(u in n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null){if(u===`style`){var c=i[u];for(s in c)c.hasOwnProperty(s)&&(n||={},n[s]=``)}else u!==`dangerouslySetInnerHTML`&&u!==`children`&&u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&u!==`autoFocus`&&(a.hasOwnProperty(u)?o||=[]:(o||=[]).push(u,null))}for(u in r){var l=r[u];if(c=i?.[u],r.hasOwnProperty(u)&&l!==c&&(l!=null||c!=null)){if(u===`style`){if(c){for(s in c)!c.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||={},n[s]=``);for(s in l)l.hasOwnProperty(s)&&c[s]!==l[s]&&(n||={},n[s]=l[s])}else n||(o||=[],o.push(u,n)),n=l}else u===`dangerouslySetInnerHTML`?(l=l?l.__html:void 0,c=c?c.__html:void 0,l!=null&&c!==l&&(o||=[]).push(u,l)):u===`children`?typeof l!=`string`&&typeof l!=`number`||(o||=[]).push(u,``+l):u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&(a.hasOwnProperty(u)?(l!=null&&u===`onScroll`&&di(`scroll`,e),o||c===l||(o=[])):(o||=[]).push(u,l))}}n&&(o||=[]).push(`style`,n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}},_c=function(e,t,n,r){n!==r&&(t.flags|=4)};function vc(e,t){if(!Aa)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function z(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function yc(e,t,n){var i=t.pendingProps;switch(Da(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return z(t),null;case 1:return ra(t.type)&&ia(),z(t),null;case 3:return i=t.stateNode,Co(),R(ea),R($i),ko(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(La(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ja!==null&&(Dl(ja),ja=null))),z(t),null;case 5:To(t);var o=xo(bo.current);if(n=t.type,e!==null&&t.stateNode!=null)gc(e,t,n,i,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(r(166));return z(t),null}if(e=xo(vo.current),La(t)){i=t.stateNode,n=t.type;var s=t.memoizedProps;switch(i[Ri]=t,i[zi]=s,e=!!(t.mode&1),n){case`dialog`:di(`cancel`,i),di(`close`,i);break;case`iframe`:case`object`:case`embed`:di(`load`,i);break;case`video`:case`audio`:for(o=0;o<si.length;o++)di(si[o],i);break;case`source`:di(`error`,i);break;case`img`:case`image`:case`link`:di(`error`,i),di(`load`,i);break;case`details`:di(`toggle`,i);break;case`input`:ve(i,s),di(`invalid`,i);break;case`select`:i._wrapperState={wasMultiple:!!s.multiple},di(`invalid`,i);break;case`textarea`:Ee(i,s),di(`invalid`,i)}for(var c in ze(n,s),o=null,s)if(s.hasOwnProperty(c)){var l=s[c];c===`children`?typeof l==`string`?i.textContent!==l&&(!0!==s.suppressHydrationWarning&&wi(i.textContent,l,e),o=[`children`,l]):typeof l==`number`&&i.textContent!==``+l&&(!0!==s.suppressHydrationWarning&&wi(i.textContent,l,e),o=[`children`,``+l]):a.hasOwnProperty(c)&&l!=null&&c===`onScroll`&&di(`scroll`,i)}switch(n){case`input`:me(i),xe(i,s,!0);break;case`textarea`:me(i),Oe(i);break;case`select`:case`option`:break;default:typeof s.onClick==`function`&&(i.onclick=Ti)}i=o,t.updateQueue=i,i!==null&&(t.flags|=4)}else{c=o.nodeType===9?o:o.ownerDocument,e===`http://www.w3.org/1999/xhtml`&&(e=ke(n)),e===`http://www.w3.org/1999/xhtml`?n===`script`?(e=c.createElement(`div`),e.innerHTML=`<script><\/script>`,e=e.removeChild(e.firstChild)):typeof i.is==`string`?e=c.createElement(n,{is:i.is}):(e=c.createElement(n),n===`select`&&(c=e,i.multiple?c.multiple=!0:i.size&&(c.size=i.size))):e=c.createElementNS(e,n),e[Ri]=t,e[zi]=i,hc(e,t,!1,!1),t.stateNode=e;a:{switch(c=Be(n,i),n){case`dialog`:di(`cancel`,e),di(`close`,e),o=i;break;case`iframe`:case`object`:case`embed`:di(`load`,e),o=i;break;case`video`:case`audio`:for(o=0;o<si.length;o++)di(si[o],e);o=i;break;case`source`:di(`error`,e),o=i;break;case`img`:case`image`:case`link`:di(`error`,e),di(`load`,e),o=i;break;case`details`:di(`toggle`,e),o=i;break;case`input`:ve(e,i),o=_e(e,i),di(`invalid`,e);break;case`option`:o=i;break;case`select`:e._wrapperState={wasMultiple:!!i.multiple},o=P({},i,{value:void 0}),di(`invalid`,e);break;case`textarea`:Ee(e,i),o=Te(e,i),di(`invalid`,e);break;default:o=i}for(s in ze(n,o),l=o,l)if(l.hasOwnProperty(s)){var u=l[s];s===`style`?Le(e,u):s===`dangerouslySetInnerHTML`?(u=u?u.__html:void 0,u!=null&&Me(e,u)):s===`children`?typeof u==`string`?(n!==`textarea`||u!==``)&&Ne(e,u):typeof u==`number`&&Ne(e,``+u):s!==`suppressContentEditableWarning`&&s!==`suppressHydrationWarning`&&s!==`autoFocus`&&(a.hasOwnProperty(s)?u!=null&&s===`onScroll`&&di(`scroll`,e):u!=null&&x(e,s,u,c))}switch(n){case`input`:me(e),xe(e,i,!1);break;case`textarea`:me(e),Oe(e);break;case`option`:i.value!=null&&e.setAttribute(`value`,``+de(i.value));break;case`select`:e.multiple=!!i.multiple,s=i.value,s==null?i.defaultValue!=null&&we(e,!!i.multiple,i.defaultValue,!0):we(e,!!i.multiple,s,!1);break;default:typeof o.onClick==`function`&&(e.onclick=Ti)}switch(n){case`button`:case`input`:case`select`:case`textarea`:i=!!i.autoFocus;break a;case`img`:i=!0;break a;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return z(t),null;case 6:if(e&&t.stateNode!=null)_c(e,t,e.memoizedProps,i);else{if(typeof i!=`string`&&t.stateNode===null)throw Error(r(166));if(n=xo(bo.current),xo(vo.current),La(t)){if(i=t.stateNode,n=t.memoizedProps,i[Ri]=t,(s=i.nodeValue!==n)&&(e=Oa,e!==null))switch(e.tag){case 3:wi(i.nodeValue,n,!!(e.mode&1));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&wi(i.nodeValue,n,!!(e.mode&1))}s&&(t.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[Ri]=t,t.stateNode=i}return z(t),null;case 13:if(R(Eo),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Aa&&ka!==null&&t.mode&1&&!(t.flags&128))Ra(),za(),t.flags|=98560,s=!1;else if(s=La(t),i!==null&&i.dehydrated!==null){if(e===null){if(!s)throw Error(r(318));if(s=t.memoizedState,s=s===null?null:s.dehydrated,!s)throw Error(r(317));s[Ri]=t}else za(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;z(t),s=!1}else ja!==null&&(Dl(ja),ja=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,t.mode&1&&(e===null||Eo.current&1?W===0&&(W=3):Ll())),t.updateQueue!==null&&(t.flags|=4),z(t),null);case 4:return Co(),e===null&&mi(t.stateNode.containerInfo),z(t),null;case 10:return $a(t.type._context),z(t),null;case 17:return ra(t.type)&&ia(),z(t),null;case 19:if(R(Eo),s=t.memoizedState,s===null)return z(t),null;if(i=!!(t.flags&128),c=s.rendering,c===null){if(i)vc(s,!1);else{if(W!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(c=Do(e),c!==null){for(t.flags|=128,vc(s,!1),i=c.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;n!==null;)s=n,e=i,s.flags&=14680066,c=s.alternate,c===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,e=c.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Zi(Eo,Eo.current&1|2),t.child}e=e.sibling}s.tail!==null&&bt()>ll&&(t.flags|=128,i=!0,vc(s,!1),t.lanes=4194304)}}else{if(!i){if(e=Do(c),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),vc(s,!0),s.tail===null&&s.tailMode===`hidden`&&!c.alternate&&!Aa)return z(t),null}else 2*bt()-s.renderingStartTime>ll&&n!==1073741824&&(t.flags|=128,i=!0,vc(s,!1),t.lanes=4194304)}s.isBackwards?(c.sibling=t.child,t.child=c):(n=s.last,n===null?t.child=c:n.sibling=c,s.last=c)}return s.tail===null?(z(t),null):(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=bt(),t.sibling=null,n=Eo.current,Zi(Eo,i?n&1|2:n&1),t);case 22:case 23:return Nl(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?el&1073741824&&(z(t),t.subtreeFlags&6&&(t.flags|=8192)):z(t),null;case 24:return null;case 25:return null}throw Error(r(156,t.tag))}function bc(e,t){switch(Da(t),t.tag){case 1:return ra(t.type)&&ia(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Co(),R(ea),R($i),ko(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return To(t),null;case 13:if(R(Eo),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));za()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return R(Eo),null;case 4:return Co(),null;case 10:return $a(t.type._context),null;case 22:case 23:return Nl(),null;case 24:return null;default:return null}}var B=!1,V=!1,xc=typeof WeakSet==`function`?WeakSet:Set,H=null;function Sc(e,t){var n=e.ref;if(n!==null){if(typeof n==`function`)try{n(null)}catch(n){G(e,t,n)}else n.current=null}}function Cc(e,t,n){try{n()}catch(n){G(e,t,n)}}var wc=!1;function Tc(e,t){if(Ei=vn,e=zr(),Br(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Di={focusedElem:e,selectionRange:n},vn=!1,H=t;H!==null;)if(t=H,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,H=e;else for(;H!==null;){t=H;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var g=h.memoizedProps,_=h.memoizedState,v=t.stateNode;v.__reactInternalSnapshotBeforeUpdate=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:Os(t.type,g),_)}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent=``:y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(e){G(t,t.return,e)}if(e=t.sibling,e!==null){e.return=t.return,H=e;break}H=t.return}return h=wc,wc=!1,h}function Ec(e,t,n){var r=t.updateQueue;if(r=r===null?null:r.lastEffect,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&Cc(t,n,a)}i=i.next}while(i!==r)}}function Dc(e,t){if(t=t.updateQueue,t=t===null?null:t.lastEffect,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Oc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t==`function`?t(e):t.current=e}}function kc(e){var t=e.alternate;t!==null&&(e.alternate=null,kc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ri],delete t[zi],delete t[Vi],delete t[Hi],delete t[Ui])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ac(e){return e.tag===5||e.tag===3||e.tag===4}function jc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Ac(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Mc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ti));else if(r!==4&&(e=e.child,e!==null))for(Mc(e,t,n),e=e.sibling;e!==null;)Mc(e,t,n),e=e.sibling}function Nc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Nc(e,t,n),e=e.sibling;e!==null;)Nc(e,t,n),e=e.sibling}var Pc=null,Fc=!1;function Ic(e,t,n){for(n=n.child;n!==null;)Lc(e,t,n),n=n.sibling}function Lc(e,t,n){if(Ot&&typeof Ot.onCommitFiberUnmount==`function`)try{Ot.onCommitFiberUnmount(Dt,n)}catch{}switch(n.tag){case 5:V||Sc(n,t);case 6:var r=Pc,i=Fc;Pc=null,Ic(e,t,n),Pc=r,Fc=i,Pc!==null&&(Fc?(e=Pc,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Pc.removeChild(n.stateNode));break;case 18:Pc!==null&&(Fc?(e=Pc,n=n.stateNode,e.nodeType===8?Pi(e.parentNode,n):e.nodeType===1&&Pi(e,n),gn(e)):Pi(Pc,n.stateNode));break;case 4:r=Pc,i=Fc,Pc=n.stateNode.containerInfo,Fc=!0,Ic(e,t,n),Pc=r,Fc=i;break;case 0:case 11:case 14:case 15:if(!V&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&Cc(n,t,o),i=i.next}while(i!==r)}Ic(e,t,n);break;case 1:if(!V&&(Sc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){G(n,t,e)}Ic(e,t,n);break;case 21:Ic(e,t,n);break;case 22:n.mode&1?(V=(r=V)||n.memoizedState!==null,Ic(e,t,n),V=r):Ic(e,t,n);break;default:Ic(e,t,n)}}function Rc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new xc),t.forEach(function(t){var r=Xl.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function zc(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var a=n[i];try{var o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 5:Pc=c.stateNode,Fc=!1;break a;case 3:Pc=c.stateNode.containerInfo,Fc=!0;break a;case 4:Pc=c.stateNode.containerInfo,Fc=!0;break a}c=c.return}if(Pc===null)throw Error(r(160));Lc(o,s,a),Pc=null,Fc=!1;var l=a.alternate;l!==null&&(l.return=null),a.return=null}catch(e){G(a,t,e)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Bc(t,e),t=t.sibling}function Bc(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(zc(t,e),Vc(e),i&4){try{Ec(3,e,e.return),Dc(3,e)}catch(t){G(e,e.return,t)}try{Ec(5,e,e.return)}catch(t){G(e,e.return,t)}}break;case 1:zc(t,e),Vc(e),i&512&&n!==null&&Sc(n,n.return);break;case 5:if(zc(t,e),Vc(e),i&512&&n!==null&&Sc(n,n.return),e.flags&32){var a=e.stateNode;try{Ne(a,``)}catch(t){G(e,e.return,t)}}if(i&4&&(a=e.stateNode,a!=null)){var o=e.memoizedProps,s=n===null?o:n.memoizedProps,c=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{c===`input`&&o.type===`radio`&&o.name!=null&&ye(a,o),Be(c,s);var u=Be(c,o);for(s=0;s<l.length;s+=2){var d=l[s],f=l[s+1];d===`style`?Le(a,f):d===`dangerouslySetInnerHTML`?Me(a,f):d===`children`?Ne(a,f):x(a,d,f,u)}switch(c){case`input`:be(a,o);break;case`textarea`:De(a,o);break;case`select`:var p=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m==null?p!==!!o.multiple&&(o.defaultValue==null?we(a,!!o.multiple,o.multiple?[]:``,!1):we(a,!!o.multiple,o.defaultValue,!0)):we(a,!!o.multiple,m,!1)}a[zi]=o}catch(t){G(e,e.return,t)}}break;case 6:if(zc(t,e),Vc(e),i&4){if(e.stateNode===null)throw Error(r(162));a=e.stateNode,o=e.memoizedProps;try{a.nodeValue=o}catch(t){G(e,e.return,t)}}break;case 3:if(zc(t,e),Vc(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{gn(t.containerInfo)}catch(t){G(e,e.return,t)}break;case 4:zc(t,e),Vc(e);break;case 13:zc(t,e),Vc(e),a=e.child,a.flags&8192&&(o=a.memoizedState!==null,a.stateNode.isHidden=o,!o||a.alternate!==null&&a.alternate.memoizedState!==null||(cl=bt())),i&4&&Rc(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(V=(u=V)||d,zc(t,e),V=u):zc(t,e),Vc(e),i&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(H=e,d=e.child;d!==null;){for(f=H=d;H!==null;){switch(p=H,m=p.child,p.tag){case 0:case 11:case 14:case 15:Ec(4,p,p.return);break;case 1:Sc(p,p.return);var h=p.stateNode;if(typeof h.componentWillUnmount==`function`){i=p,n=p.return;try{t=i,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(e){G(i,n,e)}}break;case 5:Sc(p,p.return);break;case 22:if(p.memoizedState!==null){Gc(f);continue}}m===null?Gc(f):(m.return=p,H=m)}d=d.sibling}a:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{a=f.stateNode,u?(o=a.style,typeof o.setProperty==`function`?o.setProperty(`display`,`none`,`important`):o.display=`none`):(c=f.stateNode,l=f.memoizedProps.style,s=l!=null&&l.hasOwnProperty(`display`)?l.display:null,c.style.display=Ie(`display`,s))}catch(t){G(e,e.return,t)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?``:f.memoizedProps}catch(t){G(e,e.return,t)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break a;for(;f.sibling===null;){if(f.return===null||f.return===e)break a;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:zc(t,e),Vc(e),i&4&&Rc(e);break;case 21:break;default:zc(t,e),Vc(e)}}function Vc(e){var t=e.flags;if(t&2){try{a:{for(var n=e.return;n!==null;){if(Ac(n)){var i=n;break a}n=n.return}throw Error(r(160))}switch(i.tag){case 5:var a=i.stateNode;i.flags&32&&(Ne(a,``),i.flags&=-33),Nc(e,jc(e),a);break;case 3:case 4:var o=i.stateNode.containerInfo;Mc(e,jc(e),o);break;default:throw Error(r(161))}}catch(t){G(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Hc(e,t,n){H=e,Uc(e,t,n)}function Uc(e,t,n){for(var r=!!(e.mode&1);H!==null;){var i=H,a=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||B;if(!o){var s=i.alternate,c=s!==null&&s.memoizedState!==null||V;s=B;var l=V;if(B=o,(V=c)&&!l)for(H=i;H!==null;)o=H,c=o.child,o.tag===22&&o.memoizedState!==null||c===null?Kc(i):(c.return=o,H=c);for(;a!==null;)H=a,Uc(a,t,n),a=a.sibling;H=i,B=s,V=l}Wc(e,t,n)}else i.subtreeFlags&8772&&a!==null?(a.return=i,H=a):Wc(e,t,n)}}function Wc(e){for(;H!==null;){var t=H;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:V||Dc(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!V){if(n===null)i.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:Os(t.type,n.memoizedProps);i.componentDidUpdate(a,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}}var o=t.updateQueue;o!==null&&go(t,o,i);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}go(t,s,n)}break;case 5:var c=t.stateNode;if(n===null&&t.flags&4){n=c;var l=t.memoizedProps;switch(t.type){case`button`:case`input`:case`select`:case`textarea`:l.autoFocus&&n.focus();break;case`img`:l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&gn(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}V||t.flags&512&&Oc(t)}catch(e){G(t,t.return,e)}}if(t===e){H=null;break}if(n=t.sibling,n!==null){n.return=t.return,H=n;break}H=t.return}}function Gc(e){for(;H!==null;){var t=H;if(t===e){H=null;break}var n=t.sibling;if(n!==null){n.return=t.return,H=n;break}H=t.return}}function Kc(e){for(;H!==null;){var t=H;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Dc(4,t)}catch(e){G(t,n,e)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount==`function`){var i=t.return;try{r.componentDidMount()}catch(e){G(t,i,e)}}var a=t.return;try{Oc(t)}catch(e){G(t,a,e)}break;case 5:var o=t.return;try{Oc(t)}catch(e){G(t,o,e)}}}catch(e){G(t,t.return,e)}if(t===e){H=null;break}var s=t.sibling;if(s!==null){s.return=t.return,H=s;break}H=t.return}}var qc=Math.ceil,Jc=S.ReactCurrentDispatcher,Yc=S.ReactCurrentOwner,Xc=S.ReactCurrentBatchConfig,U=0,Zc=null,Qc=null,$c=0,el=0,tl=Xi(0),W=0,nl=null,rl=0,il=0,al=0,ol=null,sl=null,cl=0,ll=1/0,ul=null,dl=!1,fl=null,pl=null,ml=!1,hl=null,gl=0,_l=0,vl=null,yl=-1,bl=0;function xl(){return U&6?bt():yl===-1?yl=bt():yl}function Sl(e){return e.mode&1?U&2&&$c!==0?$c&-$c:Va.transition===null?(e=Gt,e===0?(e=window.event,e=e===void 0?16:wn(e.type),e):e):(bl===0&&(bl=Bt()),bl):1}function Cl(e,t,n,i){if(50<_l)throw _l=0,vl=null,Error(r(185));Ht(e,n,i),(!(U&2)||e!==Zc)&&(e===Zc&&(!(U&2)&&(il|=n),W===4&&kl(e,$c)),wl(e,i),n===1&&U===0&&!(t.mode&1)&&(ll=bt()+500,ua&&ma()))}function wl(e,t){var n=e.callbackNode;Rt(e,t);var r=It(e,e===Zc?$c:0);if(r===0)n!==null&&_t(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&_t(n),t===1)e.tag===0?pa(Al.bind(null,e)):fa(Al.bind(null,e)),Mi(function(){!(U&6)&&ma()}),n=null;else{switch(Kt(r)){case 1:n=St;break;case 4:n=Ct;break;case 16:n=wt;break;case 536870912:n=Et;break;default:n=wt}n=Ql(n,Tl.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Tl(e,t){if(yl=-1,bl=0,U&6)throw Error(r(327));var n=e.callbackNode;if(Gl()&&e.callbackNode!==n)return null;var i=It(e,e===Zc?$c:0);if(i===0)return null;if(i&30||(i&e.expiredLanes)!==0||t)t=Rl(e,i);else{t=i;var a=U;U|=2;var o=Il();(Zc!==e||$c!==t)&&(ul=null,ll=bt()+500,Pl(e,t));do try{Bl();break}catch(t){Fl(e,t)}while(1);Qa(),Jc.current=o,U=a,Qc===null?(Zc=null,$c=0,t=W):t=0}if(t!==0){if(t===2&&(a=zt(e),a!==0&&(i=a,t=El(e,a))),t===1)throw n=nl,Pl(e,0),kl(e,i),wl(e,bt()),n;if(t===6)kl(e,i);else{if(a=e.current.alternate,!(i&30)&&!Ol(a)&&(t=Rl(e,i),t===2&&(o=zt(e),o!==0&&(i=o,t=El(e,o))),t===1))throw n=nl,Pl(e,0),kl(e,i),wl(e,bt()),n;switch(e.finishedWork=a,e.finishedLanes=i,t){case 0:case 1:throw Error(r(345));case 2:Ul(e,sl,ul);break;case 3:if(kl(e,i),(i&130023424)===i&&(t=cl+500-bt(),10<t)){if(It(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){xl(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=ki(Ul.bind(null,e,sl,ul),t);break}Ul(e,sl,ul);break;case 4:if(kl(e,i),(i&4194240)===i)break;for(t=e.eventTimes,a=-1;0<i;){var s=31-At(i);o=1<<s,s=t[s],s>a&&(a=s),i&=~o}if(i=a,i=bt()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*qc(i/1960))-i,10<i){e.timeoutHandle=ki(Ul.bind(null,e,sl,ul),i);break}Ul(e,sl,ul);break;case 5:Ul(e,sl,ul);break;default:throw Error(r(329))}}}return wl(e,bt()),e.callbackNode===n?Tl.bind(null,e):null}function El(e,t){var n=ol;return e.current.memoizedState.isDehydrated&&(Pl(e,t).flags|=256),e=Rl(e,t),e!==2&&(t=sl,sl=n,t!==null&&Dl(t)),e}function Dl(e){sl===null?sl=e:sl.push.apply(sl,e)}function Ol(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Pr(a(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function kl(e,t){for(t&=~al,t&=~il,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-At(t),r=1<<n;e[n]=-1,t&=~r}}function Al(e){if(U&6)throw Error(r(327));Gl();var t=It(e,0);if(!(t&1))return wl(e,bt()),null;var n=Rl(e,t);if(e.tag!==0&&n===2){var i=zt(e);i!==0&&(t=i,n=El(e,i))}if(n===1)throw n=nl,Pl(e,0),kl(e,t),wl(e,bt()),n;if(n===6)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ul(e,sl,ul),wl(e,bt()),null}function jl(e,t){var n=U;U|=1;try{return e(t)}finally{U=n,U===0&&(ll=bt()+500,ua&&ma())}}function Ml(e){hl!==null&&hl.tag===0&&!(U&6)&&Gl();var t=U;U|=1;var n=Xc.transition,r=Gt;try{if(Xc.transition=null,Gt=1,e)return e()}finally{Gt=r,Xc.transition=n,U=t,!(U&6)&&ma()}}function Nl(){el=tl.current,R(tl)}function Pl(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Ai(n)),Qc!==null)for(n=Qc.return;n!==null;){var r=n;switch(Da(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&ia();break;case 3:Co(),R(ea),R($i),ko();break;case 5:To(r);break;case 4:Co();break;case 13:R(Eo);break;case 19:R(Eo);break;case 10:$a(r.type._context);break;case 22:case 23:Nl()}n=n.return}if(Zc=e,Qc=e=eu(e.current,null),$c=el=t,W=0,nl=null,al=il=rl=0,sl=ol=null,ro!==null){for(t=0;t<ro.length;t++)if(n=ro[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=i,r.next=o}n.pending=r}ro=null}return e}function Fl(e,t){do{var n=Qc;try{if(Qa(),Ao.current=ws,Io){for(var i=No.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}Io=!1}if(Mo=0,Fo=Po=No=null,Lo=!1,Ro=0,Yc.current=null,n===null||n.return===null){W=1,nl=t,Qc=null;break}a:{var o=e,s=n.return,c=n,l=t;if(t=$c,c.flags|=32768,typeof l==`object`&&l&&typeof l.then==`function`){var u=l,d=c,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=Hs(s);if(m!==null){m.flags&=-257,Us(m,s,c,o,t),m.mode&1&&Vs(o,u,t),t=m,l=u;var h=t.updateQueue;if(h===null){var g=new Set;g.add(l),t.updateQueue=g}else h.add(l);break a}if(!(t&1)){Vs(o,u,t),Ll();break a}l=Error(r(426))}else if(Aa&&c.mode&1){var _=Hs(s);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Us(_,s,c,o,t),Ba(Fs(l,c));break a}}o=l=Fs(l,c),W!==4&&(W=2),ol===null?ol=[o]:ol.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=zs(o,l,t);mo(o,v);break a;case 1:c=l;var y=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof y.getDerivedStateFromError==`function`||b!==null&&typeof b.componentDidCatch==`function`&&(pl===null||!pl.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var x=Bs(o,c,t);mo(o,x);break a}}o=o.return}while(o!==null)}Hl(n)}catch(e){t=e,Qc===n&&n!==null&&(Qc=n=n.return);continue}break}while(1)}function Il(){var e=Jc.current;return Jc.current=ws,e===null?ws:e}function Ll(){(W===0||W===3||W===2)&&(W=4),Zc===null||!(rl&268435455)&&!(il&268435455)||kl(Zc,$c)}function Rl(e,t){var n=U;U|=2;var i=Il();(Zc!==e||$c!==t)&&(ul=null,Pl(e,t));do try{zl();break}catch(t){Fl(e,t)}while(1);if(Qa(),U=n,Jc.current=i,Qc!==null)throw Error(r(261));return Zc=null,$c=0,W}function zl(){for(;Qc!==null;)Vl(Qc)}function Bl(){for(;Qc!==null&&!vt();)Vl(Qc)}function Vl(e){var t=Zl(e.alternate,e,el);e.memoizedProps=e.pendingProps,t===null?Hl(e):Qc=t,Yc.current=null}function Hl(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=bc(n,t),n!==null){n.flags&=32767,Qc=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{W=6,Qc=null;return}}else if(n=yc(n,t,el),n!==null){Qc=n;return}if(t=t.sibling,t!==null){Qc=t;return}Qc=t=e}while(t!==null);W===0&&(W=5)}function Ul(e,t,n){var r=Gt,i=Xc.transition;try{Xc.transition=null,Gt=1,Wl(e,t,n,r)}finally{Xc.transition=i,Gt=r}return null}function Wl(e,t,n,i){do Gl();while(hl!==null);if(U&6)throw Error(r(327));n=e.finishedWork;var a=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(r(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(Ut(e,o),e===Zc&&(Qc=Zc=null,$c=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||ml||(ml=!0,Ql(wt,function(){return Gl(),null})),o=!!(n.flags&15990),n.subtreeFlags&15990||o){o=Xc.transition,Xc.transition=null;var s=Gt;Gt=1;var c=U;U|=4,Yc.current=null,Tc(e,n),Bc(n,e),Vr(Di),vn=!!Ei,Di=Ei=null,e.current=n,Hc(n,e,a),yt(),U=c,Gt=s,Xc.transition=o}else e.current=n;if(ml&&(ml=!1,hl=e,gl=a),o=e.pendingLanes,o===0&&(pl=null),kt(n.stateNode,i),wl(e,bt()),t!==null)for(i=e.onRecoverableError,n=0;n<t.length;n++)a=t[n],i(a.value,{componentStack:a.stack,digest:a.digest});if(dl)throw dl=!1,e=fl,fl=null,e;return gl&1&&e.tag!==0&&Gl(),o=e.pendingLanes,o&1?e===vl?_l++:(_l=0,vl=e):_l=0,ma(),null}function Gl(){if(hl!==null){var e=Kt(gl),t=Xc.transition,n=Gt;try{if(Xc.transition=null,Gt=16>e?16:e,hl===null)var i=!1;else{if(e=hl,hl=null,gl=0,U&6)throw Error(r(331));var a=U;for(U|=4,H=e.current;H!==null;){var o=H,s=o.child;if(H.flags&16){var c=o.deletions;if(c!==null){for(var l=0;l<c.length;l++){var u=c[l];for(H=u;H!==null;){var d=H;switch(d.tag){case 0:case 11:case 15:Ec(8,d,o)}var f=d.child;if(f!==null)f.return=d,H=f;else for(;H!==null;){d=H;var p=d.sibling,m=d.return;if(kc(d),d===u){H=null;break}if(p!==null){p.return=m,H=p;break}H=m}}}var h=o.alternate;if(h!==null){var g=h.child;if(g!==null){h.child=null;do{var _=g.sibling;g.sibling=null,g=_}while(g!==null)}}H=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,H=s;else b:for(;H!==null;){if(o=H,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Ec(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,H=v;break b}H=o.return}}var y=e.current;for(H=y;H!==null;){s=H;var b=s.child;if(s.subtreeFlags&2064&&b!==null)b.return=s,H=b;else b:for(s=y;H!==null;){if(c=H,c.flags&2048)try{switch(c.tag){case 0:case 11:case 15:Dc(9,c)}}catch(e){G(c,c.return,e)}if(c===s){H=null;break b}var x=c.sibling;if(x!==null){x.return=c.return,H=x;break b}H=c.return}}if(U=a,ma(),Ot&&typeof Ot.onPostCommitFiberRoot==`function`)try{Ot.onPostCommitFiberRoot(Dt,e)}catch{}i=!0}return i}finally{Gt=n,Xc.transition=t}}return!1}function Kl(e,t,n){t=Fs(n,t),t=zs(e,t,1),e=fo(e,t,1),t=xl(),e!==null&&(Ht(e,1,t),wl(e,t))}function G(e,t,n){if(e.tag===3)Kl(e,e,n);else for(;t!==null;){if(t.tag===3){Kl(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(pl===null||!pl.has(r))){e=Fs(n,e),e=Bs(t,e,1),t=fo(t,e,1),e=xl(),t!==null&&(Ht(t,1,e),wl(t,e));break}}t=t.return}}function ql(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=xl(),e.pingedLanes|=e.suspendedLanes&n,Zc===e&&($c&n)===n&&(W===4||W===3&&($c&130023424)===$c&&500>bt()-cl?Pl(e,0):al|=n),wl(e,t)}function Jl(e,t){t===0&&(e.mode&1?(t=Pt,Pt<<=1,!(Pt&130023424)&&(Pt=4194304)):t=1);var n=xl();e=oo(e,t),e!==null&&(Ht(e,t,n),wl(e,n))}function Yl(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Jl(e,n)}function Xl(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(r(314))}i!==null&&i.delete(t),Jl(e,n)}var Zl=function(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps||ea.current)Gs=!0;else{if((e.lanes&n)===0&&!(t.flags&128))return Gs=!1,mc(e,t,n);Gs=!!(e.flags&131072)}}else Gs=!1,Aa&&t.flags&1048576&&Ta(t,va,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;fc(e,t),e=t.pendingProps;var a=na(t,$i.current);to(t,n),a=Ho(null,t,i,e,a,n);var o=Uo();return t.flags|=1,typeof a==`object`&&a&&typeof a.render==`function`&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ra(i)?(o=!0,sa(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,co(t),a.updater=As,t.stateNode=a,a._reactInternals=t,Ps(t,i,e,n),t=ec(null,t,i,!0,o,n)):(t.tag=0,Aa&&o&&Ea(t),Ks(null,t,a,n),t=t.child),t;case 16:i=t.elementType;a:{switch(fc(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=$l(i),e=Os(i,e),a){case 0:t=Qs(null,t,i,e,n);break a;case 1:t=$s(null,t,i,e,n);break a;case 11:t=qs(null,t,i,e,n);break a;case 14:t=Js(null,t,i,Os(i.type,e),n);break a}throw Error(r(306,i,``))}return t;case 0:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Os(i,a),Qs(e,t,i,a,n);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Os(i,a),$s(e,t,i,a,n);case 3:a:{if(tc(t),e===null)throw Error(r(387));i=t.pendingProps,o=t.memoizedState,a=o.element,lo(e,t),ho(t,i,null,n);var s=t.memoizedState;if(i=s.element,o.isDehydrated){if(o={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){a=Fs(Error(r(423)),t),t=nc(e,t,i,n,a);break a}if(i!==a){a=Fs(Error(r(424)),t),t=nc(e,t,i,n,a);break a}for(ka=Fi(t.stateNode.containerInfo.firstChild),Oa=t,Aa=!0,ja=null,n=qa(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(za(),i===a){t=pc(e,t,n);break a}Ks(e,t,i,n)}t=t.child}return t;case 5:return wo(t),e===null&&Fa(t),i=t.type,a=t.pendingProps,o=e===null?null:e.memoizedProps,s=a.children,Oi(i,a)?s=null:o!==null&&Oi(i,o)&&(t.flags|=32),Zs(e,t),Ks(e,t,s,n),t.child;case 6:return e===null&&Fa(t),null;case 13:return ac(e,t,n);case 4:return So(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Ka(t,null,i,n):Ks(e,t,i,n),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Os(i,a),qs(e,t,i,a,n);case 7:return Ks(e,t,t.pendingProps,n),t.child;case 8:return Ks(e,t,t.pendingProps.children,n),t.child;case 12:return Ks(e,t,t.pendingProps.children,n),t.child;case 10:a:{if(i=t.type._context,a=t.pendingProps,o=t.memoizedProps,s=a.value,Zi(Ja,i._currentValue),i._currentValue=s,o!==null){if(Pr(o.value,s)){if(o.children===a.children&&!ea.current){t=pc(e,t,n);break a}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var c=o.dependencies;if(c!==null){s=o.child;for(var l=c.firstContext;l!==null;){if(l.context===i){if(o.tag===1){l=uo(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),eo(o.return,n,t),c.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(r(341));s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),eo(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}}Ks(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,to(t,n),a=no(a),i=i(a),t.flags|=1,Ks(e,t,i,n),t.child;case 14:return i=t.type,a=Os(i,t.pendingProps),a=Os(i.type,a),Js(e,t,i,a,n);case 15:return Ys(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Os(i,a),fc(e,t),t.tag=1,ra(i)?(e=!0,sa(t)):e=!1,to(t,n),Ms(t,i,a),Ps(t,i,a,n),ec(null,t,i,!0,e,n);case 19:return dc(e,t,n);case 22:return Xs(e,t,n)}throw Error(r(156,t.tag))};function Ql(e,t){return gt(e,t)}function K(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function q(e,t,n,r){return new K(e,t,n,r)}function J(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $l(e){if(typeof e==`function`)return+!!J(e);if(e!=null){if(e=e.$$typeof,e===A)return 11;if(e===M)return 14}return 2}function eu(e,t){var n=e.alternate;return n===null?(n=q(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function tu(e,t,n,i,a,o){var s=2;if(i=e,typeof e==`function`)J(e)&&(s=1);else if(typeof e==`string`)s=5;else a:switch(e){case T:return nu(n.children,a,o,t);case E:s=8,a|=8;break;case D:return e=q(12,n,t,a|2),e.elementType=D,e.lanes=o,e;case ee:return e=q(13,n,t,a),e.elementType=ee,e.lanes=o,e;case j:return e=q(19,n,t,a),e.elementType=j,e.lanes=o,e;case te:return Y(n,a,o,t);default:if(typeof e==`object`&&e)switch(e.$$typeof){case O:s=10;break a;case k:s=9;break a;case A:s=11;break a;case M:s=14;break a;case N:s=16,i=null;break a}throw Error(r(130,e==null?e:typeof e,``))}return t=q(s,n,t,a),t.elementType=e,t.type=i,t.lanes=o,t}function nu(e,t,n,r){return e=q(7,e,r,t),e.lanes=n,e}function Y(e,t,n,r){return e=q(22,e,r,t),e.elementType=te,e.lanes=n,e.stateNode={isHidden:!1},e}function ru(e,t,n){return e=q(6,e,null,t),e.lanes=n,e}function iu(e,t,n){return t=q(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function au(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Vt(0),this.expirationTimes=Vt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function ou(e,t,n,r,i,a,o,s,c){return e=new au(e,t,n,s,c),t===1?(t=1,!0===a&&(t|=8)):t=0,a=q(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},co(a),e}function su(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:w,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}function cu(e){if(!e)return Qi;e=e._reactInternals;a:{if(dt(e)!==e||e.tag!==1)throw Error(r(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break a;case 1:if(ra(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break a}}t=t.return}while(t!==null);throw Error(r(171))}if(e.tag===1){var n=e.type;if(ra(n))return oa(e,n,t)}return t}function lu(e,t,n,r,i,a,o,s,c){return e=ou(n,r,!0,e,i,a,o,s,c),e.context=cu(null),n=e.current,r=xl(),i=Sl(n),a=uo(r,i),a.callback=t??null,fo(n,a,i),e.current.lanes=i,Ht(e,i,r),wl(e,r),e}function uu(e,t,n,r){var i=t.current,a=xl(),o=Sl(i);return n=cu(n),t.context===null?t.context=n:t.pendingContext=n,t=uo(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=fo(i,t,o),e!==null&&(Cl(e,i,o,a),po(e,i,o)),o}function du(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function fu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function pu(e,t){fu(e,t),(e=e.alternate)&&fu(e,t)}function mu(){return null}var hu=typeof reportError==`function`?reportError:function(e){console.error(e)};function gu(e){this._internalRoot=e}_u.prototype.render=gu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));uu(e,t,null,null)},_u.prototype.unmount=gu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ml(function(){uu(null,e,null,null)}),t[Bi]=null}};function _u(e){this._internalRoot=e}_u.prototype.unstable_scheduleHydration=function(e){if(e){var t=Xt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<on.length&&t!==0&&t<on[n].priority;n++);on.splice(n,0,e),n===0&&dn(e)}};function vu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function yu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==` react-mount-point-unstable `))}function bu(){}function xu(e,t,n,r,i){if(i){if(typeof r==`function`){var a=r;r=function(){var e=du(o);a.call(e)}}var o=lu(t,r,e,0,null,!1,!1,``,bu);return e._reactRootContainer=o,e[Bi]=o.current,mi(e.nodeType===8?e.parentNode:e),Ml(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r==`function`){var s=r;r=function(){var e=du(c);s.call(e)}}var c=ou(e,0,!1,null,null,!1,!1,``,bu);return e._reactRootContainer=c,e[Bi]=c.current,mi(e.nodeType===8?e.parentNode:e),Ml(function(){uu(t,c,n,r)}),c}function Su(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if(typeof i==`function`){var s=i;i=function(){var e=du(o);s.call(e)}}uu(t,o,e,i)}else o=xu(n,t,e,i,r);return du(o)}qt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ft(t.pendingLanes);n!==0&&(Wt(t,n|1),wl(t,bt()),!(U&6)&&(ll=bt()+500,ma()))}break;case 13:Ml(function(){var t=oo(e,1);t!==null&&Cl(t,e,1,xl())}),pu(e,1)}},Jt=function(e){if(e.tag===13){var t=oo(e,134217728);t!==null&&Cl(t,e,134217728,xl()),pu(e,134217728)}},Yt=function(e){if(e.tag===13){var t=Sl(e),n=oo(e,t);n!==null&&Cl(n,e,t,xl()),pu(e,t)}},Xt=function(){return Gt},Zt=function(e,t){var n=Gt;try{return Gt=e,t()}finally{Gt=n}},Ue=function(e,t,n){switch(t){case`input`:if(be(e,n),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name=`+JSON.stringify(``+t)+`][type="radio"]`),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var a=qi(i);if(!a)throw Error(r(90));he(i),be(i,a)}}}break;case`textarea`:De(e,n);break;case`select`:t=n.value,t!=null&&we(e,!!n.multiple,t,!1)}},Ye=jl,Xe=Ml;var Cu={usingClientEntryPoint:!1,Events:[Gi,Ki,qi,qe,Je,jl]},wu={findFiberByHostInstance:Wi,bundleType:0,version:`18.3.1`,rendererPackageName:`react-dom`},Tu={bundleType:wu.bundleType,version:wu.version,rendererPackageName:wu.rendererPackageName,rendererConfig:wu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:S.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=ht(e),e===null?null:e.stateNode},findFiberByHostInstance:wu.findFiberByHostInstance||mu,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 Eu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Eu.isDisabled&&Eu.supportsFiber)try{Dt=Eu.inject(Tu),Ot=Eu}catch{}}e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Cu,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!vu(t))throw Error(r(200));return su(e,t,null,n)},e.createRoot=function(e,t){if(!vu(e))throw Error(r(299));var n=!1,i=``,a=hu;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=ou(e,1,!1,null,null,n,!1,i,a),e[Bi]=t.current,mi(e.nodeType===8?e.parentNode:e),new gu(t)},e.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(r(188)):(e=Object.keys(e).join(`,`),Error(r(268,e)));return e=ht(t),e=e===null?null:e.stateNode,e},e.flushSync=function(e){return Ml(e)},e.hydrate=function(e,t,n){if(!yu(t))throw Error(r(200));return Su(null,e,t,!0,n)},e.hydrateRoot=function(e,t,n){if(!vu(e))throw Error(r(405));var i=n!=null&&n.hydratedSources||null,a=!1,o=``,s=hu;if(n!=null&&(!0===n.unstable_strictMode&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=lu(t,null,e,1,n??null,a,!1,o,s),e[Bi]=t.current,mi(e),i)for(e=0;e<i.length;e++)n=i[e],a=n._getVersion,a=a(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,a]:t.mutableSourceEagerHydrationData.push(n,a);return new _u(t)},e.render=function(e,t,n){if(!yu(t))throw Error(r(200));return Su(null,e,t,!1,n)},e.unmountComponentAtNode=function(e){if(!yu(e))throw Error(r(40));return e._reactRootContainer?(Ml(function(){Su(null,null,e,!1,function(){e._reactRootContainer=null,e[Bi]=null})}),!0):!1},e.unstable_batchedUpdates=jl,e.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!yu(n))throw Error(r(200));if(e==null||e._reactInternals===void 0)throw Error(r(38));return Su(e,t,n,!1,i)},e.version=`18.3.1-next-f1338f8080-20240426`})),dt=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=ut()})),ft=o((e=>{var t=dt();e.createRoot=t.createRoot,e.hydrateRoot=t.hydrateRoot}))(),pt=class extends Error{status;code;data;constructor(e,t,n,r){super(n),this.status=e,this.code=t,this.data=r}};async function mt(e,t,n){let r=await fetch(`/api${t}`,{method:e,headers:n===void 0?{}:{"content-type":`application/json`},body:n===void 0?null:JSON.stringify(n)}),i=r.headers.get(`content-type`)?.includes(`json`)?await r.json():await r.text();if(!r.ok){let e=i.error;throw new pt(r.status,e?.code??`http_error`,e?.message??r.statusText,e?.data)}return i}var ht=e=>{let t=Object.entries(e).filter(e=>e[1]!==void 0&&e[1]!==``);return t.length?`?${new URLSearchParams(t.map(([e,t])=>[e,String(t)]))}`:``},F={health:()=>mt(`GET`,`/health`),overview:()=>mt(`GET`,`/overview`),workspaces:()=>mt(`GET`,`/workspaces`),createWorkspace:e=>mt(`POST`,`/workspaces`,e),updateWorkspace:(e,t)=>mt(`PATCH`,`/workspaces/${e}`,t),deleteWorkspace:e=>mt(`DELETE`,`/workspaces/${e}`),scanWorkspace:e=>mt(`POST`,`/workspaces/${e}/scan`),workspaceStatuses:e=>mt(`GET`,`/workspaces/${e}/statuses`),setWorkspaceStatuses:(e,t,n)=>mt(`PUT`,`/workspaces/${e}/statuses`,{statuses:t,remap:n}),projects:e=>mt(`GET`,`/projects${ht({workspaceId:e,includeArchived:!0})}`),project:e=>mt(`GET`,`/projects/${e}`),createProject:e=>mt(`POST`,`/projects`,e),updateProject:(e,t)=>mt(`PATCH`,`/projects/${e}`,t),deleteProject:e=>mt(`DELETE`,`/projects/${e}`),setProjectStatuses:(e,t,n)=>mt(`PUT`,`/projects/${e}/statuses`,{statuses:t,remap:n}),board:e=>mt(`GET`,`/projects/${e}/board?includeDone=true`),searchItems:e=>mt(`GET`,`/items${ht(e)}`),item:e=>mt(`GET`,`/items/${e}`),createItem:e=>mt(`POST`,`/items`,e),updateItem:(e,t)=>mt(`PATCH`,`/items/${e}`,t),moveItem:(e,t)=>mt(`POST`,`/items/${e}/move`,t),deleteItem:e=>mt(`DELETE`,`/items/${e}`),itemCommits:e=>mt(`GET`,`/items/${e}/commits`),projectCommits:e=>mt(`GET`,`/projects/${e}/commits?recent=5`),addRef:(e,t)=>mt(`POST`,`/items/${e}/refs`,t),removeRef:(e,t)=>mt(`DELETE`,`/items/${e}/refs/${t}`),refContent:(e,t,n=!1)=>mt(`GET`,`/items/${e}/refs/${t}/content${n?`?full=true`:``}`),link:(e,t,n)=>mt(`POST`,`/items/${e}/links`,{toId:t,kind:n}),unlink:(e,t,n)=>mt(`DELETE`,`/items/${e}/links/${t}/${n}`)},gt=new Set;function _t(e){gt.add(e),setTimeout(()=>gt.delete(e),2e3)}var vt=window.matchMedia(`(prefers-reduced-motion: reduce)`);function yt(e,t){let n=(0,m.useRef)(new Map);(0,m.useLayoutEffect)(()=>{let t=e.current;if(!t)return;let r=t.getBoundingClientRect(),i=new Map;for(let e of t.querySelectorAll(`[data-card-id]`)){let t=e.getBoundingClientRect(),a={x:t.left-r.left,y:t.top-r.top,column:e.closest(`[data-column]`)?.dataset.column??``},o=e.dataset.cardId;i.set(o,a);let s=n.current.get(o);if(!s||gt.has(o)||vt.matches)continue;let c=s.x-a.x,l=s.y-a.y;Math.abs(c)<1&&Math.abs(l)<1||e.animate([{transform:`translate(${c}px, ${l}px)`},{transform:`none`}],{duration:200,easing:`ease-out`})}n.current=i},[e,t])}function bt(e,t){let[n,r]=(0,m.useState)(e);return(0,m.useEffect)(()=>{if(e!==null)return r(e);if(n===null)return;if(vt.matches)return r(null);let i=setTimeout(()=>r(null),t);return()=>clearTimeout(i)},[e,n,t]),[e??n,e===null&&n!==null]}function xt(e){return e instanceof HTMLElement?e.isContentEditable||[`INPUT`,`TEXTAREA`,`SELECT`].includes(e.tagName):!1}function St(e,t=!0){let n=(0,m.useRef)(e);n.current=e,(0,m.useEffect)(()=>{if(!t)return;let e=e=>{e.defaultPrevented||e.metaKey||e.ctrlKey||e.altKey||xt(e.target)||n.current(e)!==!1&&e.preventDefault()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[t])}var Ct=[`item.created`,`item.updated`,`item.moved`,`item.deleted`,`ref.added`,`ref.removed`,`link.added`,`link.removed`,`statuses.changed`,`project.created`,`project.updated`,`project.deleted`,`workspace.created`,`workspace.updated`,`workspace.deleted`];function wt(e){let[t]=e.type.split(`.`),n=[`overview`];switch(t){case`workspace`:return[n,[`workspaces`],[`projects`],[`statuses`]];case`project`:return[n,[`projects`],[`project`,e.id],[`board`,e.id]];case`statuses`:return[n,[`project`],[`board`],[`statuses`],[`item`]];default:return[n,[`board`],[`item`],[`items`]]}}function Tt(e){let t=new Map,n=null;return r=>{for(let e of r)t.set(e.join(`\0`),e);n??=setTimeout(()=>{n=null;let r=[...t.values()];t.clear();for(let t of r)e.invalidateQueries({queryKey:t})},30)}}function Et(e){let t=_();(0,m.useEffect)(()=>{if(!e)return;let n=Tt(t),r=new EventSource(e===`all`?`/api/events`:`/api/events?workspaceId=${encodeURIComponent(e)}`),i=!1;r.onerror=()=>{i=!0},r.onopen=()=>{i&&t.invalidateQueries(),i=!1};let a=e=>n(wt(JSON.parse(e.data)));for(let e of Ct)r.addEventListener(e,a);return()=>r.close()},[t,e])}function Dt(e,t){return e.length===0?{position:`bottom`}:t<=0?{before:e[0]}:{after:e[Math.min(t,e.length)-1]}}function Ot(e,t,n,r){let i=e.columns.flatMap(e=>e.items).find(e=>e.id===t);if(!i)return e;let a={...i,status:n},o=e.columns.map(e=>{let o=e.items.filter(e=>e.id!==t);if(e.key!==n)return{...e,items:o,count:e.count-+(o.length<e.items.length)};let s=i.status===n,c=o.length;return r.position===`top`?c=0:r.before?c=Math.max(0,o.findIndex(e=>e.id===r.before)):r.after?c=o.findIndex(e=>e.id===r.after)+1:s&&(c=e.items.findIndex(e=>e.id===t)),o.splice(c,0,a),{...e,items:o,count:e.count+ +!s}});return{...e,columns:o}}function kt(e,t,n){return{...e,columns:e.columns.map(e=>({...e,items:e.items.map(e=>e.id===t?{...e,...n}:e)}))}}function At(e){let t=0,n=0,r=0;for(let i of e?.columns??[])(i.kind===`active`||i.kind===`review`)&&(t+=i.count),i.kind!==`done`&&(n+=i.count,r+=i.items.filter(e=>e.blocked).length);return{active:t,open:n,blocked:r}}var jt={done:0,review:1,active:2,backlog:3};function Mt(e,t){let n=e.columns.flatMap(e=>e.items.map(t=>({item:t,column:e}))).sort((e,t)=>jt[e.column.kind]-jt[t.column.kind]||e.column.position-t.column.position);return[...t,...new Set(n.map(e=>e.item.milestone).filter(e=>!!e&&!t.includes(e))),null].map(e=>{let t=n.filter(t=>t.item.milestone===e);return{milestone:e,rows:t,done:t.filter(e=>e.column.kind===`done`).length}}).filter(e=>e.rows.length>0)}var I={overview:[`overview`],workspaces:[`workspaces`],projects:e=>[`projects`,e],project:e=>[`project`,e],board:e=>[`board`,e],item:e=>[`item`,e],itemCommits:e=>[`item`,e,`commits`],projectCommits:e=>[`board`,e,`commits`],search:(e,t)=>[`items`,e,t],workspaceStatuses:e=>[`statuses`,e],health:[`health`]},Nt=()=>ot({queryKey:I.overview,queryFn:F.overview}),Pt=()=>ot({queryKey:I.workspaces,queryFn:F.workspaces}),Ft=e=>ot({queryKey:I.projects(e??``),queryFn:()=>F.projects(e),enabled:!!e}),It=e=>ot({queryKey:I.project(e??``),queryFn:()=>F.project(e),enabled:!!e}),Lt=e=>ot({queryKey:I.board(e??``),queryFn:()=>F.board(e),enabled:!!e}),Rt=e=>it({queries:e.map(e=>({queryKey:I.board(e),queryFn:()=>F.board(e)}))}),zt=e=>ot({queryKey:I.item(e??``),queryFn:()=>F.item(e),enabled:!!e}),Bt=e=>ot({queryKey:I.itemCommits(e),queryFn:()=>F.itemCommits(e)}),Vt=e=>ot({queryKey:I.projectCommits(e??``),queryFn:()=>F.projectCommits(e),enabled:!!e,refetchInterval:3e4}),Ht=(e,t)=>ot({queryKey:I.search(e??``,t),queryFn:()=>F.searchItems({workspaceId:e,q:t,includeDone:!0,limit:20}),enabled:!!e&&t.trim().length>0,placeholderData:e=>e});async function Ut(e,t,n){await e.cancelQueries({queryKey:I.board(t)});let r=e.getQueryData(I.board(t));return r&&e.setQueryData(I.board(t),n(r)),()=>e.setQueryData(I.board(t),r)}function Wt(){let e=_();return st({mutationFn:({id:e,projectId:t,...n})=>F.moveItem(e,n),onMutate:async({id:t,projectId:n,status:r,position:i,after:a,before:o})=>(_t(t),{rollback:await Ut(e,n,e=>Ot(e,t,r,{position:i,after:a,before:o}))}),onError:(e,t,n)=>n?.rollback(),onSuccess:t=>e.setQueryData(I.item(t.id),t),onSettled:(t,n,{projectId:r,id:i})=>{e.invalidateQueries({queryKey:I.board(r)}),e.invalidateQueries({queryKey:I.item(i)})}})}function Gt(){let e=_();return st({mutationFn:({id:e,projectId:t,...n})=>F.updateItem(e,n),onMutate:async({id:t,projectId:n,expectedRevision:r,...i})=>{await e.cancelQueries({queryKey:I.item(t),exact:!0});let a=e.getQueryData(I.item(t));a&&e.setQueryData(I.item(t),{...a,...i});let{details:o,...s}=i,c=await Ut(e,n,e=>kt(e,t,s));return{rollback:()=>{e.setQueryData(I.item(t),a),c()}}},onError:(e,t,n)=>n?.rollback(),onSuccess:t=>e.setQueryData(I.item(t.id),t),onSettled:(t,n,{projectId:r})=>{e.invalidateQueries({queryKey:I.board(r)}),e.invalidateQueries({queryKey:I.project(r)})}})}function Kt(e){try{return localStorage.getItem(`slate.${e}`)}catch{return null}}function qt(e,t){try{t===null?localStorage.removeItem(`slate.${e}`):localStorage.setItem(`slate.${e}`,t)}catch{}}var Jt=window.matchMedia(`(prefers-color-scheme: dark)`);function Yt(){let e=document.documentElement.dataset.theme;return e?e===`dark`:Jt.matches}var Xt=new Set;function Zt(e){return Xt.add(e),Jt.addEventListener(`change`,e),()=>{Xt.delete(e),Jt.removeEventListener(`change`,e)}}function Qt(){return{dark:(0,m.useSyncExternalStore)(Zt,Yt),toggle:(0,m.useCallback)(()=>{let e=Yt()?`light`:`dark`;document.documentElement.dataset.theme=e,qt(`theme`,e);for(let e of Xt)e()},[])}}var $t=[`overview`,`board`,`roadmap`,`workspace`,`settings`],en=`slate:navigate`;function tn(){let e=new URLSearchParams(location.search),t=e.get(`view`);return{view:t&&$t.includes(t)?t:`overview`,project:e.get(`project`),item:e.get(`item`)}}var nn={search:``,state:tn()};function rn(){return nn.search!==location.search&&(nn={search:location.search,state:tn()}),nn.state}function an(e){return window.addEventListener(`popstate`,e),window.addEventListener(en,e),()=>{window.removeEventListener(`popstate`,e),window.removeEventListener(en,e)}}function on(e,{replace:t=!1}={}){let n={...rn(),...e},r=new URLSearchParams;n.project&&r.set(`project`,n.project),n.view!==`overview`&&r.set(`view`,n.view),n.item&&r.set(`item`,n.item);let i=r.size?`?${r}`:``;i!==location.search&&(history[t?`replaceState`:`pushState`](null,``,`${location.pathname}${i}`),window.dispatchEvent(new Event(en)))}function sn(){return[(0,m.useSyncExternalStore)(an,rn),(0,m.useCallback)(on,[])]}var cn={app:`_app_e7lqh_1`,noSidebar:`_noSidebar_e7lqh_11`,main:`_main_e7lqh_17`,view:`_view_e7lqh_26`},ln=dt();function un(){var e=[...arguments];return(0,m.useMemo)(()=>t=>{e.forEach(e=>e(t))},e)}var dn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function fn(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function pn(e){return`nodeType`in e}function mn(e){return e?fn(e)?e:pn(e)?e.ownerDocument?.defaultView??window:window:window}function hn(e){let{Document:t}=mn(e);return e instanceof t}function gn(e){return!fn(e)&&e instanceof mn(e).HTMLElement}function _n(e){return e instanceof mn(e).SVGElement}function vn(e){return e?fn(e)?e.document:pn(e)?hn(e)?e:gn(e)||_n(e)?e.ownerDocument:document:document:document}var yn=dn?m.useLayoutEffect:m.useEffect;function bn(e){let t=(0,m.useRef)(e);return yn(()=>{t.current=e}),(0,m.useCallback)(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function xn(){let e=(0,m.useRef)(null);return[(0,m.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,m.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}function Sn(e,t){t===void 0&&(t=[e]);let n=(0,m.useRef)(e);return yn(()=>{n.current!==e&&(n.current=e)},t),n}function Cn(e,t){let n=(0,m.useRef)();return(0,m.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function wn(e){let t=bn(e),n=(0,m.useRef)(null);return[n,(0,m.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}function Tn(e){let t=(0,m.useRef)();return(0,m.useEffect)(()=>{t.current=e},[e]),t.current}var En={};function Dn(e,t){return(0,m.useMemo)(()=>{if(t)return t;let n=En[e]==null?0:En[e]+1;return En[e]=n,e+`-`+n},[e,t])}function On(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var kn=On(1),An=On(-1);function jn(e){return`clientX`in e&&`clientY`in e}function Mn(e){if(!e)return!1;let{KeyboardEvent:t}=mn(e.target);return t&&e instanceof t}function Nn(e){if(!e)return!1;let{TouchEvent:t}=mn(e.target);return t&&e instanceof t}function Pn(e){if(Nn(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return jn(e)?{x:e.clientX,y:e.clientY}:null}var Fn=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return`translate3d(`+(t?Math.round(t):0)+`px, `+(n?Math.round(n):0)+`px, 0)`}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return`scaleX(`+t+`) scaleY(`+n+`)`}},Transform:{toString(e){if(e)return[Fn.Translate.toString(e),Fn.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),In=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function Ln(e){return e.matches(In)?e:e.querySelector(In)}var Rn={display:`none`};function zn(e){let{id:t,value:n}=e;return m.createElement(`div`,{id:t,style:Rn},n)}function Bn(e){let{id:t,announcement:n,ariaLiveType:r=`assertive`}=e;return m.createElement(`div`,{id:t,style:{position:`fixed`,top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(100%)`,whiteSpace:`nowrap`},role:`status`,"aria-live":r,"aria-atomic":!0},n)}function Vn(){let[e,t]=(0,m.useState)(``);return{announce:(0,m.useCallback)(e=>{e!=null&&t(e)},[]),announcement:e}}var Hn=(0,m.createContext)(null);function Un(e){let t=(0,m.useContext)(Hn);(0,m.useEffect)(()=>{if(!t)throw Error(`useDndMonitor must be used within a children of <DndContext>`);return t(e)},[e,t])}function Wn(){let[e]=(0,m.useState)(()=>new Set),t=(0,m.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,m.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>e[n]?.call(e,r))},[e]),t]}var Gn={draggable:`
|
|
9
|
-
To pick up a draggable item, press the space bar.
|
|
10
|
-
While dragging, use the arrow keys to move the item.
|
|
11
|
-
Press space again to drop the item in its new position, or press escape to cancel.
|
|
12
|
-
`},Kn={onDragStart(e){let{active:t}=e;return`Picked up draggable item `+t.id+`.`},onDragOver(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was moved over droppable area `+n.id+`.`:`Draggable item `+t.id+` is no longer over a droppable area.`},onDragEnd(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was dropped over droppable area `+n.id:`Draggable item `+t.id+` was dropped.`},onDragCancel(e){let{active:t}=e;return`Dragging was cancelled. Draggable item `+t.id+` was dropped.`}};function qn(e){let{announcements:t=Kn,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=Gn}=e,{announce:a,announcement:o}=Vn(),s=Dn(`DndLiveRegion`),[c,l]=(0,m.useState)(!1);if((0,m.useEffect)(()=>{l(!0)},[]),Un((0,m.useMemo)(()=>({onDragStart(e){let{active:n}=e;a(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&a(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;a(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;a(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;a(t.onDragCancel({active:n,over:r}))}}),[a,t])),!c)return null;let u=m.createElement(m.Fragment,null,m.createElement(zn,{id:r,value:i.draggable}),m.createElement(Bn,{id:s,announcement:o}));return n?(0,ln.createPortal)(u,n):u}var Jn;(function(e){e.DragStart=`dragStart`,e.DragMove=`dragMove`,e.DragEnd=`dragEnd`,e.DragCancel=`dragCancel`,e.DragOver=`dragOver`,e.RegisterDroppable=`registerDroppable`,e.SetDroppableDisabled=`setDroppableDisabled`,e.UnregisterDroppable=`unregisterDroppable`})(Jn||={});function Yn(){}function Xn(e,t){return(0,m.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}function Zn(){var e=[...arguments];return(0,m.useMemo)(()=>[...e].filter(e=>e!=null),[...e])}var Qn=Object.freeze({x:0,y:0});function $n(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}function er(e,t){let n=Pn(e);if(!n)return`0 0`;let r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+`% `+r.y+`%`}function tr(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function nr(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function rr(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function ir(e,t){if(!e||e.length===0)return null;let[n]=e;return t?n[t]:n}function ar(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}var or=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=ar(t,t.left,t.top),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=$n(ar(r),i);a.push({id:t,data:{droppableContainer:e,value:n}})}}return a.sort(tr)},sr=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=rr(t),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=rr(r),o=i.reduce((e,t,r)=>e+$n(n[r],t),0),s=Number((o/4).toFixed(4));a.push({id:t,data:{droppableContainer:e,value:s}})}}return a.sort(tr)};function cr(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,s=a-n;if(r<i&&n<a){let n=t.width*t.height,r=e.width*e.height,i=o*s,a=i/(n+r-i);return Number(a.toFixed(4))}return 0}var lr=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=[];for(let e of r){let{id:r}=e,a=n.get(r);if(a){let n=cr(a,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(nr)};function ur(e,t){let{top:n,left:r,bottom:i,right:a}=t;return n<=e.y&&e.y<=i&&r<=e.x&&e.x<=a}var dr=e=>{let{droppableContainers:t,droppableRects:n,pointerCoordinates:r}=e;if(!r)return[];let i=[];for(let e of t){let{id:t}=e,a=n.get(t);if(a&&ur(r,a)){let n=rr(a).reduce((e,t)=>e+$n(r,t),0),o=Number((n/4).toFixed(4));i.push({id:t,data:{droppableContainer:e,value:o}})}}return i.sort(tr)};function fr(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function pr(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Qn}function mr(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}var hr=mr(1);function gr(e){if(e.startsWith(`matrix3d(`)){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith(`matrix(`)){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function _r(e,t,n){let r=gr(t);if(!r)return e;let{scaleX:i,scaleY:a,x:o,y:s}=r,c=e.left-o-(1-i)*parseFloat(n),l=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(` `)+1)),u=i?e.width/i:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c}}var vr={ignoreTransform:!1};function yr(e,t){t===void 0&&(t=vr);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=mn(e).getComputedStyle(e);t&&(n=_r(n,t,r))}let{top:r,left:i,width:a,height:o,bottom:s,right:c}=n;return{top:r,left:i,width:a,height:o,bottom:s,right:c}}function br(e){return yr(e,{ignoreTransform:!0})}function xr(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Sr(e,t){return t===void 0&&(t=mn(e).getComputedStyle(e)),t.position===`fixed`}function Cr(e,t){t===void 0&&(t=mn(e).getComputedStyle(e));let n=/(auto|scroll|overlay)/;return[`overflow`,`overflowX`,`overflowY`].some(e=>{let r=t[e];return typeof r==`string`&&n.test(r)})}function wr(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(hn(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!gn(i)||_n(i)||n.includes(i))return n;let a=mn(e).getComputedStyle(i);return i!==e&&Cr(i,a)&&n.push(i),Sr(i,a)?n:r(i.parentNode)}return e?r(e):n}function Tr(e){let[t]=wr(e,1);return t??null}function Er(e){return!dn||!e?null:fn(e)?e:pn(e)?hn(e)||e===vn(e).scrollingElement?window:gn(e)?e:null:null}function Dr(e){return fn(e)?e.scrollX:e.scrollLeft}function Or(e){return fn(e)?e.scrollY:e.scrollTop}function kr(e){return{x:Dr(e),y:Or(e)}}var Ar;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(Ar||={});function jr(e){return!dn||!e?!1:e===document.scrollingElement}function Mr(e){let t={x:0,y:0},n=jr(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}var Nr={x:.2,y:.2};function Pr(e,t,n,r,i){let{top:a,left:o,right:s,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=Nr);let{isTop:l,isBottom:u,isLeft:d,isRight:f}=Mr(e),p={x:0,y:0},m={x:0,y:0},h={height:t.height*i.y,width:t.width*i.x};return!l&&a<=t.top+h.height?(p.y=Ar.Backward,m.y=r*Math.abs((t.top+h.height-a)/h.height)):!u&&c>=t.bottom-h.height&&(p.y=Ar.Forward,m.y=r*Math.abs((t.bottom-h.height-c)/h.height)),!f&&s>=t.right-h.width?(p.x=Ar.Forward,m.x=r*Math.abs((t.right-h.width-s)/h.width)):!d&&o<=t.left+h.width&&(p.x=Ar.Backward,m.x=r*Math.abs((t.left+h.width-o)/h.width)),{direction:p,speed:m}}function Fr(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Ir(e){return e.reduce((e,t)=>kn(e,kr(t)),Qn)}function Lr(e){return e.reduce((e,t)=>e+Dr(t),0)}function Rr(e){return e.reduce((e,t)=>e+Or(t),0)}function zr(e,t){if(t===void 0&&(t=yr),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e);Tr(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:`center`,inline:`center`})}var Br=[[`x`,[`left`,`right`],Lr],[`y`,[`top`,`bottom`],Rr]],Vr=class{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let n=wr(t),r=Ir(n);this.rect={...e},this.width=e.width,this.height=e.height;for(let[e,t,i]of Br)for(let a of t)Object.defineProperty(this,a,{get:()=>{let t=i(n),o=r[e]-t;return this.rect[a]+o},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}},Hr=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>this.target?.removeEventListener(...e))},this.target=e}add(e,t,n){var r;(r=this.target)==null||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function Ur(e){let{EventTarget:t}=mn(e);return e instanceof t?e:vn(e)}function Wr(e,t){let n=Math.abs(e.x),r=Math.abs(e.y);return typeof t==`number`?Math.sqrt(n**2+r**2)>t:`x`in t&&`y`in t?n>t.x&&r>t.y:`x`in t?n>t.x:`y`in t&&r>t.y}var Gr;(function(e){e.Click=`click`,e.DragStart=`dragstart`,e.Keydown=`keydown`,e.ContextMenu=`contextmenu`,e.Resize=`resize`,e.SelectionChange=`selectionchange`,e.VisibilityChange=`visibilitychange`})(Gr||={});function Kr(e){e.preventDefault()}function qr(e){e.stopPropagation()}var L;(function(e){e.Space=`Space`,e.Down=`ArrowDown`,e.Right=`ArrowRight`,e.Left=`ArrowLeft`,e.Up=`ArrowUp`,e.Esc=`Escape`,e.Enter=`Enter`,e.Tab=`Tab`})(L||={});var Jr={start:[L.Space,L.Enter],cancel:[L.Esc],end:[L.Space,L.Enter,L.Tab]},Yr=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case L.Right:return{...n,x:n.x+25};case L.Left:return{...n,x:n.x-25};case L.Down:return{...n,y:n.y+25};case L.Up:return{...n,y:n.y-25}}},Xr=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;let{event:{target:t}}=e;this.props=e,this.listeners=new Hr(vn(t)),this.windowListeners=new Hr(mn(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Gr.Resize,this.handleCancel),this.windowListeners.add(Gr.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Gr.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&zr(n),t(Qn)}handleKeyDown(e){if(Mn(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=Jr,coordinateGetter:a=Yr,scrollBehavior:o=`smooth`}=r,{code:s}=e;if(i.end.includes(s)){this.handleEnd(e);return}if(i.cancel.includes(s)){this.handleCancel(e);return}let{collisionRect:c}=n.current,l=c?{x:c.left,y:c.top}:Qn;this.referenceCoordinates||=l;let u=a(e,{active:t,context:n.current,currentCoordinates:l});if(u){let t=An(u,l),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(let n of i){let i=e.code,{isTop:a,isRight:s,isLeft:c,isBottom:l,maxScroll:d,minScroll:f}=Mr(n),p=Fr(n),m={x:Math.min(i===L.Right?p.right-p.width/2:p.right,Math.max(i===L.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===L.Down?p.bottom-p.height/2:p.bottom,Math.max(i===L.Down?p.top:p.top+p.height/2,u.y))},h=i===L.Right&&!s||i===L.Left&&!c,g=i===L.Down&&!l||i===L.Up&&!a;if(h&&m.x!==u.x){let e=n.scrollLeft+t.x,a=i===L.Right&&e<=d.x||i===L.Left&&e>=f.x;if(a&&!t.y){n.scrollTo({left:e,behavior:o});return}r.x=a?n.scrollLeft-e:i===L.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}if(g&&m.y!==u.y){let e=n.scrollTop+t.y,a=i===L.Down&&e<=d.y||i===L.Up&&e>=f.y;if(a&&!t.x){n.scrollTo({top:e,behavior:o});return}r.y=a?n.scrollTop-e:i===L.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,kn(An(u,this.referenceCoordinates),r))}}}handleMove(e,t){let{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};Xr.activators=[{eventName:`onKeyDown`,handler:(e,t,n)=>{let{keyboardCodes:r=Jr,onActivation:i}=t,{active:a}=n,{code:o}=e.nativeEvent;if(r.start.includes(o)){let t=a.activatorNode.current;return t&&e.target!==t?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function Zr(e){return!!(e&&`distance`in e)}function Qr(e){return!!(e&&`delay`in e)}var $r=class{constructor(e,t,n){n===void 0&&(n=Ur(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;let{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=vn(i),this.documentListeners=new Hr(this.document),this.listeners=new Hr(n),this.windowListeners=new Hr(mn(i)),this.initialCoordinates=Pn(r)??Qn,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(Gr.Resize,this.handleCancel),this.windowListeners.add(Gr.DragStart,Kr),this.windowListeners.add(Gr.VisibilityChange,this.handleCancel),this.windowListeners.add(Gr.ContextMenu,Kr),this.documentListeners.add(Gr.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Qr(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(Zr(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){let{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(Gr.Click,qr,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Gr.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){let{activated:t,initialCoordinates:n,props:r}=this,{onMove:i,options:{activationConstraint:a}}=r;if(!n)return;let o=Pn(e)??Qn,s=An(n,o);if(!t&&a){if(Zr(a)){if(a.tolerance!=null&&Wr(s,a.tolerance))return this.handleCancel();if(Wr(s,a.distance))return this.handleStart()}if(Qr(a)&&Wr(s,a.tolerance))return this.handleCancel();this.handlePending(a,s);return}e.cancelable&&e.preventDefault(),i(o)}handleEnd(){let{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){let{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===L.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},ei={cancel:{name:`pointercancel`},move:{name:`pointermove`},end:{name:`pointerup`}},ti=class extends $r{constructor(e){let{event:t}=e,n=vn(t.target);super(e,ei,n)}};ti.activators=[{eventName:`onPointerDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];var ni={move:{name:`mousemove`},end:{name:`mouseup`}},ri;(function(e){e[e.RightClick=2]=`RightClick`})(ri||={});var ii=class extends $r{constructor(e){super(e,ni,vn(e.event.target))}};ii.activators=[{eventName:`onMouseDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==ri.RightClick&&(r?.({event:n}),!0)}}];var ai={cancel:{name:`touchcancel`},move:{name:`touchmove`},end:{name:`touchend`}},oi=class extends $r{constructor(e){super(e,ai)}static setup(){return window.addEventListener(ai.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(ai.move.name,e)};function e(){}}};oi.activators=[{eventName:`onTouchStart`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t,{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var si;(function(e){e[e.Pointer=0]=`Pointer`,e[e.DraggableRect=1]=`DraggableRect`})(si||={});var ci;(function(e){e[e.TreeOrder=0]=`TreeOrder`,e[e.ReversedTreeOrder=1]=`ReversedTreeOrder`})(ci||={});function li(e){let{acceleration:t,activator:n=si.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:o=5,order:s=ci.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:u,delta:d,threshold:f}=e,p=di({delta:d,disabled:!a}),[h,g]=xn(),_=(0,m.useRef)({x:0,y:0}),v=(0,m.useRef)({x:0,y:0}),y=(0,m.useMemo)(()=>{switch(n){case si.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case si.DraggableRect:return i}},[n,i,c]),b=(0,m.useRef)(null),x=(0,m.useCallback)(()=>{let e=b.current;if(!e)return;let t=_.current.x*v.current.x,n=_.current.y*v.current.y;e.scrollBy(t,n)},[]),S=(0,m.useMemo)(()=>s===ci.TreeOrder?[...l].reverse():l,[s,l]);(0,m.useEffect)(()=>{if(!a||!l.length||!y){g();return}for(let e of S){if(r?.(e)===!1)continue;let n=l.indexOf(e),i=u[n];if(!i)continue;let{direction:a,speed:s}=Pr(e,i,y,t,f);for(let e of[`x`,`y`])p[e][a[e]]||(s[e]=0,a[e]=0);if(s.x>0||s.y>0){g(),b.current=e,h(x,o),_.current=s,v.current=a;return}}_.current={x:0,y:0},v.current={x:0,y:0},g()},[t,x,r,g,a,o,JSON.stringify(y),JSON.stringify(p),h,l,S,u,JSON.stringify(f)])}var ui={x:{[Ar.Backward]:!1,[Ar.Forward]:!1},y:{[Ar.Backward]:!1,[Ar.Forward]:!1}};function di(e){let{delta:t,disabled:n}=e,r=Tn(t);return Cn(e=>{if(n||!r||!e)return ui;let i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Ar.Backward]:e.x[Ar.Backward]||i.x===-1,[Ar.Forward]:e.x[Ar.Forward]||i.x===1},y:{[Ar.Backward]:e.y[Ar.Backward]||i.y===-1,[Ar.Forward]:e.y[Ar.Forward]||i.y===1}}},[n,t,r])}function fi(e,t){let n=t==null?void 0:e.get(t),r=n?n.node.current:null;return Cn(e=>t==null?null:r??e??null,[r,t])}function pi(e,t){return(0,m.useMemo)(()=>e.reduce((e,n)=>{let{sensor:r}=n,i=r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}));return[...e,...i]},[]),[e,t])}var mi;(function(e){e[e.Always=0]=`Always`,e[e.BeforeDragging=1]=`BeforeDragging`,e[e.WhileDragging=2]=`WhileDragging`})(mi||={});var hi;(function(e){e.Optimized=`optimized`})(hi||={});var gi=new Map;function _i(e,t){let{dragging:n,dependencies:r,config:i}=t,[a,o]=(0,m.useState)(null),{frequency:s,measure:c,strategy:l}=i,u=(0,m.useRef)(e),d=_(),f=Sn(d),p=(0,m.useCallback)(function(e){e===void 0&&(e=[]),!f.current&&o(t=>t===null?e:t.concat(e.filter(e=>!t.includes(e))))},[f]),h=(0,m.useRef)(null),g=Cn(t=>{if(d&&!n)return gi;if(!t||t===gi||u.current!==e||a!=null){let t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}let e=n.node.current,r=e?new Vr(c(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,a,n,d,c]);return(0,m.useEffect)(()=>{u.current=e},[e]),(0,m.useEffect)(()=>{d||p()},[n,d]),(0,m.useEffect)(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),(0,m.useEffect)(()=>{d||typeof s!=`number`||h.current!==null||(h.current=setTimeout(()=>{p(),h.current=null},s))},[s,d,p,...r]),{droppableRects:g,measureDroppableContainers:p,measuringScheduled:a!=null};function _(){switch(l){case mi.Always:return!1;case mi.BeforeDragging:return n;default:return!n}}}function vi(e,t){return Cn(n=>e?n||(typeof t==`function`?t(e):e):null,[t,e])}function yi(e,t){return vi(e,t)}function bi(e){let{callback:t,disabled:n}=e,r=bn(t),i=(0,m.useMemo)(()=>{if(n||typeof window>`u`||window.MutationObserver===void 0)return;let{MutationObserver:e}=window;return new e(r)},[r,n]);return(0,m.useEffect)(()=>()=>i?.disconnect(),[i]),i}function xi(e){let{callback:t,disabled:n}=e,r=bn(t),i=(0,m.useMemo)(()=>{if(n||typeof window>`u`||window.ResizeObserver===void 0)return;let{ResizeObserver:e}=window;return new e(r)},[n]);return(0,m.useEffect)(()=>()=>i?.disconnect(),[i]),i}function Si(e){return new Vr(yr(e),e)}function Ci(e,t,n){t===void 0&&(t=Si);let[r,i]=(0,m.useState)(null);function a(){i(r=>{if(!e)return null;if(e.isConnected===!1)return r??n??null;let i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i})}let o=bi({callback(t){if(e)for(let n of t){let{type:t,target:r}=n;if(t===`childList`&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),s=xi({callback:a});return yn(()=>{a(),e?(s?.observe(e),o?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),o?.disconnect())},[e]),r}function wi(e){return pr(e,vi(e))}var Ti=[];function Ei(e){let t=(0,m.useRef)(e),n=Cn(n=>e?n&&n!==Ti&&e&&t.current&&e.parentNode===t.current.parentNode?n:wr(e):Ti,[e]);return(0,m.useEffect)(()=>{t.current=e},[e]),n}function Di(e){let[t,n]=(0,m.useState)(null),r=(0,m.useRef)(e),i=(0,m.useCallback)(e=>{let t=Er(e.target);t&&n(e=>e?(e.set(t,kr(t)),new Map(e)):null)},[]);return(0,m.useEffect)(()=>{let t=r.current;if(e!==t){a(t);let o=e.map(e=>{let t=Er(e);return t?(t.addEventListener(`scroll`,i,{passive:!0}),[t,kr(t)]):null}).filter(e=>e!=null);n(o.length?new Map(o):null),r.current=e}return()=>{a(e),a(t)};function a(e){e.forEach(e=>{Er(e)?.removeEventListener(`scroll`,i)})}},[i,e]),(0,m.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>kn(e,t),Qn):Ir(e):Qn,[e,t])}function Oi(e,t){t===void 0&&(t=[]);let n=(0,m.useRef)(null);return(0,m.useEffect)(()=>{n.current=null},t),(0,m.useEffect)(()=>{let t=e!==Qn;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?An(e,n.current):Qn}function ki(e){(0,m.useEffect)(()=>{if(!dn)return;let t=e.map(e=>{let{sensor:t}=e;return t.setup==null?void 0:t.setup()});return()=>{for(let e of t)e?.()}},e.map(e=>{let{sensor:t}=e;return t}))}function Ai(e,t){return(0,m.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}function ji(e){return(0,m.useMemo)(()=>e?xr(e):null,[e])}var Mi=[];function Ni(e,t){t===void 0&&(t=yr);let[n]=e,r=ji(n?mn(n):null),[i,a]=(0,m.useState)(Mi);function o(){a(()=>e.length?e.map(e=>jr(e)?r:new Vr(t(e),e)):Mi)}let s=xi({callback:o});return yn(()=>{s?.disconnect(),o(),e.forEach(e=>s?.observe(e))},[e]),i}function Pi(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return gn(t)?t:e}function Fi(e){let{measure:t}=e,[n,r]=(0,m.useState)(null),i=xi({callback:(0,m.useCallback)(e=>{for(let{target:n}of e)if(gn(n)){r(e=>{let r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),[a,o]=wn((0,m.useCallback)(e=>{let n=Pi(e);i?.disconnect(),n&&i?.observe(n),r(n?t(n):null)},[t,i]));return(0,m.useMemo)(()=>({nodeRef:a,rect:n,setRef:o}),[n,a,o])}var Ii=[{sensor:ti,options:{}},{sensor:Xr,options:{}}],Li={current:{}},Ri={draggable:{measure:br},droppable:{measure:br,strategy:mi.WhileDragging,frequency:hi.Optimized},dragOverlay:{measure:yr}},zi=class extends Map{get(e){return e==null?void 0:super.get(e)??void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){return this.get(e)?.node.current??void 0}},Bi={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new zi,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Yn},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Ri,measureDroppableContainers:Yn,windowRect:null,measuringScheduled:!1},Vi={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:``},dispatch:Yn,draggableNodes:new Map,over:null,measureDroppableContainers:Yn},Hi=(0,m.createContext)(Vi),Ui=(0,m.createContext)(Bi);function Wi(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new zi}}}function Gi(e,t){switch(t.type){case Jn.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Jn.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Jn.DragEnd:case Jn.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Jn.RegisterDroppable:{let{element:n}=t,{id:r}=n,i=new zi(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case Jn.SetDroppableDisabled:{let{id:n,key:r,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;let o=new zi(e.droppable.containers);return o.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case Jn.UnregisterDroppable:{let{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;let a=new zi(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function Ki(e){let{disabled:t}=e,{active:n,activatorEvent:r,draggableNodes:i}=(0,m.useContext)(Hi),a=Tn(r),o=Tn(n?.id);return(0,m.useEffect)(()=>{if(!t&&!r&&a&&o!=null){if(!Mn(a)||document.activeElement===a.target)return;let e=i.get(o);if(!e)return;let{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(let e of[t.current,n.current]){if(!e)continue;let t=Ln(e);if(t){t.focus();break}}})}},[r,t,i,o,a]),null}function qi(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}function Ji(e){return(0,m.useMemo)(()=>({draggable:{...Ri.draggable,...e?.draggable},droppable:{...Ri.droppable,...e?.droppable},dragOverlay:{...Ri.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function Yi(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e,a=(0,m.useRef)(!1),{x:o,y:s}=typeof i==`boolean`?{x:i,y:i}:i;yn(()=>{if(!o&&!s||!t){a.current=!1;return}if(a.current||!r)return;let e=t?.node.current;if(!e||e.isConnected===!1)return;let i=pr(n(e),r);if(o||(i.x=0),s||(i.y=0),a.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){let t=Tr(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,o,s,r,n])}var Xi=(0,m.createContext)({...Qn,scaleX:1,scaleY:1}),R;(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Initializing=1]=`Initializing`,e[e.Initialized=2]=`Initialized`})(R||={});var Zi=(0,m.memo)(function(e){let{id:t,accessibility:n,autoScroll:r=!0,children:i,sensors:a=Ii,collisionDetection:o=lr,measuring:s,modifiers:c,...l}=e,[u,d]=(0,m.useReducer)(Gi,void 0,Wi),[f,p]=Wn(),[h,g]=(0,m.useState)(R.Uninitialized),_=h===R.Initialized,{draggable:{active:v,nodes:y,translate:b},droppable:{containers:x}}=u,S=v==null?null:y.get(v),C=(0,m.useRef)({initial:null,translated:null}),w=(0,m.useMemo)(()=>v==null?null:{id:v,data:S?.data??Li,rect:C},[v,S]),T=(0,m.useRef)(null),[E,D]=(0,m.useState)(null),[O,k]=(0,m.useState)(null),A=Sn(l,Object.values(l)),ee=Dn(`DndDescribedBy`,t),j=(0,m.useMemo)(()=>x.getEnabled(),[x]),M=Ji(s),{droppableRects:N,measureDroppableContainers:te,measuringScheduled:ne}=_i(j,{dragging:_,dependencies:[b.x,b.y],config:M.droppable}),re=fi(y,v),P=(0,m.useMemo)(()=>O?Pn(O):null,[O]),ie=Fe(),ae=yi(re,M.draggable.measure);Yi({activeNode:v==null?null:y.get(v),config:ie.layoutShiftCompensation,initialRect:ae,measure:M.draggable.measure});let oe=Ci(re,M.draggable.measure,ae),se=Ci(re?re.parentElement:null),ce=(0,m.useRef)({activatorEvent:null,active:null,activeNode:re,collisionRect:null,collisions:null,droppableRects:N,draggableNodes:y,draggingNode:null,draggingNodeRect:null,droppableContainers:x,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),le=x.getNodeFor(ce.current.over?.id),ue=Fi({measure:M.dragOverlay.measure}),de=ue.nodeRef.current??re,fe=_?ue.rect??oe:null,pe=!!(ue.nodeRef.current&&ue.rect),me=wi(pe?null:oe),he=ji(de?mn(de):null),ge=Ei(_?le??re:null),_e=Ni(ge),ve=qi(c,{transform:{x:b.x-me.x,y:b.y-me.y,scaleX:1,scaleY:1},activatorEvent:O,active:w,activeNodeRect:oe,containerNodeRect:se,draggingNodeRect:fe,over:ce.current.over,overlayNodeRect:ue.rect,scrollableAncestors:ge,scrollableAncestorRects:_e,windowRect:he}),ye=P?kn(P,b):null,be=Di(ge),xe=Oi(be),Se=Oi(be,[oe]),Ce=kn(ve,xe),we=fe?hr(fe,ve):null,Te=w&&we?o({active:w,collisionRect:we,droppableRects:N,droppableContainers:j,pointerCoordinates:ye}):null,Ee=ir(Te,`id`),[De,Oe]=(0,m.useState)(null),ke=fr(pe?ve:kn(ve,Se),De?.rect??null,oe),Ae=(0,m.useRef)(null),je=(0,m.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(T.current==null)return;let i=y.get(T.current);if(!i)return;let a=e.nativeEvent,o=new n({active:T.current,activeNode:i,event:a,options:r,context:ce,onAbort(e){if(!y.get(e))return;let{onDragAbort:t}=A.current,n={id:e};t?.(n),f({type:`onDragAbort`,event:n})},onPending(e,t,n,r){if(!y.get(e))return;let{onDragPending:i}=A.current,a={id:e,constraint:t,initialCoordinates:n,offset:r};i?.(a),f({type:`onDragPending`,event:a})},onStart(e){let t=T.current;if(t==null)return;let n=y.get(t);if(!n)return;let{onDragStart:r}=A.current,i={activatorEvent:a,active:{id:t,data:n.data,rect:C}};(0,ln.unstable_batchedUpdates)(()=>{r?.(i),g(R.Initializing),d({type:Jn.DragStart,initialCoordinates:e,active:t}),f({type:`onDragStart`,event:i}),D(Ae.current),k(a)})},onMove(e){d({type:Jn.DragMove,coordinates:e})},onEnd:s(Jn.DragEnd),onCancel:s(Jn.DragCancel)});Ae.current=o;function s(e){return async function(){let{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=ce.current,o=null;if(t&&i){let{cancelDrop:s}=A.current;o={activatorEvent:a,active:t,collisions:n,delta:i,over:r},e===Jn.DragEnd&&typeof s==`function`&&await Promise.resolve(s(o))&&(e=Jn.DragCancel)}T.current=null,(0,ln.unstable_batchedUpdates)(()=>{d({type:e}),g(R.Uninitialized),Oe(null),D(null),k(null),Ae.current=null;let t=e===Jn.DragEnd?`onDragEnd`:`onDragCancel`;if(o){let e=A.current[t];e?.(o),f({type:t,event:o})}})}}},[y]),Me=pi(a,(0,m.useCallback)((e,t)=>(n,r)=>{let i=n.nativeEvent,a=y.get(r);if(T.current!==null||!a||i.dndKit||i.defaultPrevented)return;let o={active:a};e(n,t.options,o)===!0&&(i.dndKit={capturedBy:t.sensor},T.current=r,je(n,t))},[y,je]));ki(a),yn(()=>{oe&&h===R.Initializing&&g(R.Initialized)},[oe,h]),(0,m.useEffect)(()=>{let{onDragMove:e}=A.current,{active:t,activatorEvent:n,collisions:r,over:i}=ce.current;if(!t||!n)return;let a={active:t,activatorEvent:n,collisions:r,delta:{x:Ce.x,y:Ce.y},over:i};(0,ln.unstable_batchedUpdates)(()=>{e?.(a),f({type:`onDragMove`,event:a})})},[Ce.x,Ce.y]),(0,m.useEffect)(()=>{let{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=ce.current;if(!e||T.current==null||!t||!i)return;let{onDragOver:a}=A.current,o=r.get(Ee),s=o&&o.rect.current?{id:o.id,rect:o.rect.current,data:o.data,disabled:o.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:s};(0,ln.unstable_batchedUpdates)(()=>{Oe(s),a?.(c),f({type:`onDragOver`,event:c})})},[Ee]),yn(()=>{ce.current={activatorEvent:O,active:w,activeNode:re,collisionRect:we,collisions:Te,droppableRects:N,draggableNodes:y,draggingNode:de,draggingNodeRect:fe,droppableContainers:x,over:De,scrollableAncestors:ge,scrollAdjustedTranslate:Ce},C.current={initial:fe,translated:we}},[w,re,Te,we,y,de,fe,N,x,De,ge,Ce]),li({...ie,delta:b,draggingRect:we,pointerCoordinates:ye,scrollableAncestors:ge,scrollableAncestorRects:_e});let Ne=(0,m.useMemo)(()=>({active:w,activeNode:re,activeNodeRect:oe,activatorEvent:O,collisions:Te,containerNodeRect:se,dragOverlay:ue,draggableNodes:y,droppableContainers:x,droppableRects:N,over:De,measureDroppableContainers:te,scrollableAncestors:ge,scrollableAncestorRects:_e,measuringConfiguration:M,measuringScheduled:ne,windowRect:he}),[w,re,oe,O,Te,se,ue,y,x,N,De,te,ge,_e,M,ne,he]),Pe=(0,m.useMemo)(()=>({activatorEvent:O,activators:Me,active:w,activeNodeRect:oe,ariaDescribedById:{draggable:ee},dispatch:d,draggableNodes:y,over:De,measureDroppableContainers:te}),[O,Me,w,oe,d,ee,y,De,te]);return m.createElement(Hn.Provider,{value:p},m.createElement(Hi.Provider,{value:Pe},m.createElement(Ui.Provider,{value:Ne},m.createElement(Xi.Provider,{value:ke},i)),m.createElement(Ki,{disabled:n?.restoreFocus===!1})),m.createElement(qn,{...n,hiddenTextDescribedById:ee}));function Fe(){let e=E?.autoScrollEnabled===!1,t=typeof r==`object`?r.enabled===!1:r===!1,n=_&&!e&&!t;return typeof r==`object`?{...r,enabled:n}:{enabled:n}}}),Qi=(0,m.createContext)(null),$i=`button`,ea=`Draggable`;function ta(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,a=Dn(ea),{activators:o,activatorEvent:s,active:c,activeNodeRect:l,ariaDescribedById:u,draggableNodes:d,over:f}=(0,m.useContext)(Hi),{role:p=$i,roleDescription:h=`draggable`,tabIndex:g=0}=i??{},_=c?.id===t,v=(0,m.useContext)(_?Xi:Qi),[y,b]=wn(),[x,S]=wn(),C=Ai(o,t),w=Sn(n);return yn(()=>(d.set(t,{id:t,key:a,node:y,activatorNode:x,data:w}),()=>{let e=d.get(t);e&&e.key===a&&d.delete(t)}),[d,t]),{active:c,activatorEvent:s,activeNodeRect:l,attributes:(0,m.useMemo)(()=>({role:p,tabIndex:g,"aria-disabled":r,"aria-pressed":_&&p===$i?!0:void 0,"aria-roledescription":h,"aria-describedby":u.draggable}),[r,p,g,_,h,u.draggable]),isDragging:_,listeners:r?void 0:C,node:y,over:f,setNodeRef:b,setActivatorNodeRef:S,transform:v}}function na(){return(0,m.useContext)(Ui)}var ra=`Droppable`,ia={timeout:25};function aa(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,a=Dn(ra),{active:o,dispatch:s,over:c,measureDroppableContainers:l}=(0,m.useContext)(Hi),u=(0,m.useRef)({disabled:n}),d=(0,m.useRef)(!1),f=(0,m.useRef)(null),p=(0,m.useRef)(null),{disabled:h,updateMeasurementsFor:g,timeout:_}={...ia,...i},v=Sn(g??r),y=xi({callback:(0,m.useCallback)(()=>{if(!d.current){d.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{l(Array.isArray(v.current)?v.current:[v.current]),p.current=null},_)},[_]),disabled:h||!o}),[b,x]=wn((0,m.useCallback)((e,t)=>{y&&(t&&(y.unobserve(t),d.current=!1),e&&y.observe(e))},[y])),S=Sn(t);return(0,m.useEffect)(()=>{y&&b.current&&(y.disconnect(),d.current=!1,y.observe(b.current))},[b,y]),(0,m.useEffect)(()=>(s({type:Jn.RegisterDroppable,element:{id:r,key:a,disabled:n,node:b,rect:f,data:S}}),()=>s({type:Jn.UnregisterDroppable,key:a,id:r})),[r]),(0,m.useEffect)(()=>{n!==u.current.disabled&&(s({type:Jn.SetDroppableDisabled,id:r,key:a,disabled:n}),u.current.disabled=n)},[r,a,n,s]),{active:o,rect:f,isOver:c?.id===r,node:b,over:c,setNodeRef:x}}function oa(e){let{animation:t,children:n}=e,[r,i]=(0,m.useState)(null),[a,o]=(0,m.useState)(null),s=Tn(n);return!n&&!r&&s&&i(s),yn(()=>{if(!a)return;let e=r?.key,n=r?.props.id;if(e==null||n==null){i(null);return}Promise.resolve(t(n,a)).then(()=>{i(null)})},[t,r,a]),m.createElement(m.Fragment,null,n,r?(0,m.cloneElement)(r,{ref:o}):null)}var sa={x:0,y:0,scaleX:1,scaleY:1};function ca(e){let{children:t}=e;return m.createElement(Hi.Provider,{value:Vi},m.createElement(Xi.Provider,{value:sa},t))}var la={position:`fixed`,touchAction:`none`},ua=e=>Mn(e)?`transform 250ms ease`:void 0,da=(0,m.forwardRef)((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:a,className:o,rect:s,style:c,transform:l,transition:u=ua}=e;if(!s)return null;let d=i?l:{...l,scaleX:1,scaleY:1},f={...la,width:s.width,height:s.height,top:s.top,left:s.left,transform:Fn.Transform.toString(d),transformOrigin:i&&r?er(r,s):void 0,transition:typeof u==`function`?u(r):u,...c};return m.createElement(n,{className:o,style:f,ref:t},a)}),fa={duration:250,easing:`ease`,keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Fn.Transform.toString(t)},{transform:Fn.Transform.toString(n)}]},sideEffects:(e=>t=>{let{active:n,dragOverlay:r}=t,i={},{styles:a,className:o}=e;if(a!=null&&a.active)for(let[e,t]of Object.entries(a.active))t!==void 0&&(i[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,t));if(a!=null&&a.dragOverlay)for(let[e,t]of Object.entries(a.dragOverlay))t!==void 0&&r.node.style.setProperty(e,t);return o!=null&&o.active&&n.node.classList.add(o.active),o!=null&&o.dragOverlay&&r.node.classList.add(o.dragOverlay),function(){for(let[e,t]of Object.entries(i))n.node.style.setProperty(e,t);o!=null&&o.active&&n.node.classList.remove(o.active)}})({styles:{active:{opacity:`0`}}})};function pa(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return bn((e,a)=>{if(t===null)return;let o=n.get(e);if(!o)return;let s=o.node.current;if(!s)return;let c=Pi(a);if(!c)return;let{transform:l}=mn(a).getComputedStyle(a),u=gr(l);if(!u)return;let d=typeof t==`function`?t:ma(t);return zr(s,i.draggable.measure),d({active:{id:e,data:o.data,node:s,rect:i.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:i,transform:u})})}function ma(e){let{duration:t,easing:n,sideEffects:r,keyframes:i}={...fa,...e};return e=>{let{active:a,dragOverlay:o,transform:s,...c}=e;if(!t)return;let l={x:o.rect.left-a.rect.left,y:o.rect.top-a.rect.top},u={scaleX:s.scaleX===1?1:a.rect.width*s.scaleX/o.rect.width,scaleY:s.scaleY===1?1:a.rect.height*s.scaleY/o.rect.height},d={x:s.x-l.x,y:s.y-l.y,...u},f=i({...c,active:a,dragOverlay:o,transform:{initial:s,final:d}}),[p]=f,m=f[f.length-1];if(JSON.stringify(p)===JSON.stringify(m))return;let h=r?.({active:a,dragOverlay:o,...c}),g=o.node.animate(f,{duration:t,easing:n,fill:`forwards`});return new Promise(e=>{g.onfinish=()=>{h?.(),e()}})}}var ha=0;function ga(e){return(0,m.useMemo)(()=>{if(e!=null)return ha++,ha},[e])}var _a=m.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:i,transition:a,modifiers:o,wrapperElement:s=`div`,className:c,zIndex:l=999}=e,{activatorEvent:u,active:d,activeNodeRect:f,containerNodeRect:p,draggableNodes:h,droppableContainers:g,dragOverlay:_,over:v,measuringConfiguration:y,scrollableAncestors:b,scrollableAncestorRects:x,windowRect:S}=na(),C=(0,m.useContext)(Xi),w=ga(d?.id),T=qi(o,{activatorEvent:u,active:d,activeNodeRect:f,containerNodeRect:p,draggingNodeRect:_.rect,over:v,overlayNodeRect:_.rect,scrollableAncestors:b,scrollableAncestorRects:x,transform:C,windowRect:S}),E=vi(f),D=pa({config:r,draggableNodes:h,droppableContainers:g,measuringConfiguration:y}),O=E?_.setRef:void 0;return m.createElement(ca,null,m.createElement(oa,{animation:D},d&&w?m.createElement(da,{key:w,id:d.id,ref:O,as:s,activatorEvent:u,adjustScale:t,className:c,transition:a,rect:E,style:{zIndex:l,...i},transform:T},n):null))});function va(e,t,n){let r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function ya(e,t){return e.reduce((e,n,r)=>{let i=t.get(n);return i&&(e[r]=i),e},Array(e.length))}function ba(e){return e!==null&&e>=0}function xa(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Sa(e){return typeof e==`boolean`?{draggable:e,droppable:e}:e}var Ca=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e,a=va(t,r,n),o=t[i],s=a[i];return!s||!o?null:{x:s.left-o.left,y:s.top-o.top,scaleX:s.width/o.width,scaleY:s.height/o.height}},wa={scaleX:1,scaleY:1},Ta=e=>{let{activeIndex:t,activeNodeRect:n,index:r,rects:i,overIndex:a}=e,o=i[t]??n;if(!o)return null;if(r===t){let e=i[a];return e?{x:0,y:t<a?e.top+e.height-(o.top+o.height):e.top-o.top,...wa}:null}let s=Ea(i,r,t);return r>t&&r<=a?{x:0,y:-o.height-s,...wa}:r<t&&r>=a?{x:0,y:o.height+s,...wa}:{x:0,y:0,...wa}};function Ea(e,t,n){let r=e[t],i=e[t-1],a=e[t+1];return r?n<t?i?r.top-(i.top+i.height):a?a.top-(r.top+r.height):0:a?a.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}var Da=`Sortable`,Oa=m.createContext({activeIndex:-1,containerId:Da,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Ca,disabled:{draggable:!1,droppable:!1}});function ka(e){let{children:t,id:n,items:r,strategy:i=Ca,disabled:a=!1}=e,{active:o,dragOverlay:s,droppableRects:c,over:l,measureDroppableContainers:u}=na(),d=Dn(Da,n),f=s.rect!==null,p=(0,m.useMemo)(()=>r.map(e=>typeof e==`object`&&`id`in e?e.id:e),[r]),h=o!=null,g=o?p.indexOf(o.id):-1,_=l?p.indexOf(l.id):-1,v=(0,m.useRef)(p),y=!xa(p,v.current),b=_!==-1&&g===-1||y,x=Sa(a);yn(()=>{y&&h&&u(p)},[y,p,h,u]),(0,m.useEffect)(()=>{v.current=p},[p]);let S=(0,m.useMemo)(()=>({activeIndex:g,containerId:d,disabled:x,disableTransforms:b,items:p,overIndex:_,useDragOverlay:f,sortedRects:ya(p,c),strategy:i}),[g,d,x.draggable,x.droppable,b,p,_,c,f,i]);return m.createElement(Oa.Provider,{value:S},t)}var Aa=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return va(n,r,i).indexOf(t)},ja=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:a,newIndex:o,previousItems:s,previousContainerId:c,transition:l}=e;return!l||!r||s!==a&&i===o?!1:n?!0:o!==i&&t===c},Ma={duration:200,easing:`ease`},Na=`transform`,Pa=Fn.Transition.toString({property:Na,duration:0,easing:`linear`}),Fa={roleDescription:`sortable`};function Ia(e){let{disabled:t,index:n,node:r,rect:i}=e,[a,o]=(0,m.useState)(null),s=(0,m.useRef)(n);return yn(()=>{if(!t&&n!==s.current&&r.current){let e=i.current;if(e){let t=yr(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&o(n)}}n!==s.current&&(s.current=n)},[t,n,r,i]),(0,m.useEffect)(()=>{a&&o(null)},[a]),a}function La(e){let{animateLayoutChanges:t=ja,attributes:n,disabled:r,data:i,getNewIndex:a=Aa,id:o,strategy:s,resizeObserverConfig:c,transition:l=Ma}=e,{items:u,containerId:d,activeIndex:f,disabled:p,disableTransforms:h,sortedRects:g,overIndex:_,useDragOverlay:v,strategy:y}=(0,m.useContext)(Oa),b=Ra(r,p),x=u.indexOf(o),S=(0,m.useMemo)(()=>({sortable:{containerId:d,index:x,items:u},...i}),[d,i,x,u]),C=(0,m.useMemo)(()=>u.slice(u.indexOf(o)),[u,o]),{rect:w,node:T,isOver:E,setNodeRef:D}=aa({id:o,data:S,disabled:b.droppable,resizeObserverConfig:{updateMeasurementsFor:C,...c}}),{active:O,activatorEvent:k,activeNodeRect:A,attributes:ee,setNodeRef:j,listeners:M,isDragging:N,over:te,setActivatorNodeRef:ne,transform:re}=ta({id:o,data:S,attributes:{...Fa,...n},disabled:b.draggable}),P=un(D,j),ie=!!O,ae=ie&&!h&&ba(f)&&ba(_),oe=!v&&N,se=ae?(oe&&ae?re:null)??(s??y)({rects:g,activeNodeRect:A,activeIndex:f,overIndex:_,index:x}):null,ce=ba(f)&&ba(_)?a({id:o,items:u,activeIndex:f,overIndex:_}):x,le=O?.id,ue=(0,m.useRef)({activeId:le,items:u,newIndex:ce,containerId:d}),de=u!==ue.current.items,fe=t({active:O,containerId:d,isDragging:N,isSorting:ie,id:o,index:x,items:u,newIndex:ue.current.newIndex,previousItems:ue.current.items,previousContainerId:ue.current.containerId,transition:l,wasDragging:ue.current.activeId!=null}),pe=Ia({disabled:!fe,index:x,node:T,rect:w});return(0,m.useEffect)(()=>{ie&&ue.current.newIndex!==ce&&(ue.current.newIndex=ce),d!==ue.current.containerId&&(ue.current.containerId=d),u!==ue.current.items&&(ue.current.items=u)},[ie,ce,d,u]),(0,m.useEffect)(()=>{if(le===ue.current.activeId)return;if(le!=null&&ue.current.activeId==null){ue.current.activeId=le;return}let e=setTimeout(()=>{ue.current.activeId=le},50);return()=>clearTimeout(e)},[le]),{active:O,activeIndex:f,attributes:ee,data:S,rect:w,index:x,newIndex:ce,items:u,isOver:E,isSorting:ie,isDragging:N,listeners:M,node:T,overIndex:_,over:te,setNodeRef:P,setActivatorNodeRef:ne,setDroppableNodeRef:D,setDraggableNodeRef:j,transform:pe??se,transition:me()};function me(){if(pe||de&&ue.current.newIndex===x)return Pa;if(!(oe&&!Mn(k)||!l)&&(ie||fe))return Fn.Transition.toString({...l,property:Na})}}function Ra(e,t){return typeof e==`boolean`?{draggable:e,droppable:!1}:{draggable:e?.draggable??t.draggable,droppable:e?.droppable??t.droppable}}function za(e){if(!e)return!1;let t=e.data.current;return!!(t&&`sortable`in t&&typeof t.sortable==`object`&&`containerId`in t.sortable&&`items`in t.sortable&&`index`in t.sortable)}var Ba=[L.Down,L.Right,L.Up,L.Left],Va=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:a,over:o,scrollableAncestors:s}}=t;if(Ba.includes(e.code)){if(e.preventDefault(),!n||!r)return;let t=[];a.getEnabled().forEach(n=>{if(!n||n!=null&&n.disabled)return;let a=i.get(n.id);if(a)switch(e.code){case L.Down:r.top<a.top&&t.push(n);break;case L.Up:r.top>a.top&&t.push(n);break;case L.Left:r.left>a.left&&t.push(n);break;case L.Right:r.left<a.left&&t.push(n)}});let c=sr({active:n,collisionRect:r,droppableRects:i,droppableContainers:t,pointerCoordinates:null}),l=ir(c,`id`);if(l===o?.id&&c.length>1&&(l=c[1].id),l!=null){let e=a.get(n.id),t=a.get(l),o=t?i.get(t.id):null,c=t?.node.current;if(c&&o&&e&&t){let n=wr(c).some((e,t)=>s[t]!==e),i=Ha(e,t),a=Ua(e,t),l=n||!i?{x:0,y:0}:{x:a?r.width-o.width:0,y:a?r.height-o.height:0},u={x:o.left,y:o.top};return l.x&&l.y?u:An(u,l)}}}};function Ha(e,t){return!za(e)||!za(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function Ua(e,t){return!za(e)||!za(t)||!Ha(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}var Wa={board:`_board_116k8_1`,empty:`_empty_116k8_9`,keys:`_keys_116k8_12`},Ga=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function Ka(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:Ga(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var qa=e=>{let t=``,n=!1;for(let r of e){if(r===`-`||r===`_`||r<=` `){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t},Ja=e=>{let t=qa(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ya=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Xa={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function Za(e){return e!=null}function Qa(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??Xa.width,a=e.size??e.height??Xa.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?Ya(...c):Ya(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??Xa[`stroke-width`])*Number(e.size??e.width??Xa.width)/Number(t.size??t.width??Xa.width):t.strokeWidth??Xa[`stroke-width`];return[`svg`,{...Object.entries(Xa).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&Za(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&Za(t.width)&&{[r(`width`)]:t.width},...`height`in t&&Za(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function $a(e,t={}){return Qa(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var eo=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},to=(0,m.createContext)({}),no=()=>(0,m.useContext)(to),ro=(0,m.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:h=2,absoluteStrokeWidth:g=!1,nonScalingStroke:_=!1,color:v=`currentColor`,className:y=``}=no()??{},b=!!c||eo(d),[x,S,C=[]]=$a(u,{color:e??v,width:n??t??p,height:r??t??p,strokeWidth:i??h,absoluteStrokeWidth:a??g,nonScalingStroke:o??_,className:Ya(y,s),hasA11yProp:b,attributes:d});return(0,m.createElement)(x,{ref:f,...S},[...C.map(([e,t])=>(0,m.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function io(e,t=[],n=[]){let r=typeof e==`string`?Ka(e,t,n):e,i=(0,m.forwardRef)(({className:e,...t},n)=>(0,m.createElement)(ro,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=Ja(r.name)),i}var ao={name:`arrow-down`,size:24,node:[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]};ao.node;var oo=io(ao),so={name:`arrow-right`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]};so.node;var co=io(so),lo={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]};lo.node;var uo=io(lo),fo={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};fo.node;var po=io(fo),mo={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};mo.node;var ho=io(mo),go={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};go.node;var _o=io(go),vo={name:`corner-up-left`,size:24,node:[[`path`,{d:`M20 20v-7a4 4 0 0 0-4-4H4`,key:`1nkjon`}],[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}]]};vo.node;var yo=io(vo),bo={name:`external-link`,size:24,node:[[`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`}]]};bo.node;var xo=io(bo),So={name:`file-text`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]};So.node;var Co=io(So),wo={name:`flag`,size:24,node:[[`path`,{d:`M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528`,key:`1jaruq`}]]};wo.node;var To=io(wo),Eo={name:`git-commit-horizontal`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`line`,{x1:`3`,x2:`9`,y1:`12`,y2:`12`,key:`1dyftd`}],[`line`,{x1:`15`,x2:`21`,y1:`12`,y2:`12`,key:`oup4p8`}]],aliases:[`git-commit`]};Eo.node;var Do=io(Eo),Oo={name:`git-pull-request`,size:24,node:[[`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`}]]};Oo.node;var ko=io(Oo),Ao={name:`grip-vertical`,size:24,node:[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]};Ao.node;var jo=io(Ao),Mo={name:`link-2`,size:24,node:[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]};Mo.node;var No=io(Mo),Po={name:`lock`,size:24,node:[[`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`}]]};Po.node;var Fo=io(Po),Io={name:`moon`,size:24,node:[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]};Io.node;var Lo=io(Io),Ro={name:`paperclip`,size:24,node:[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]};Ro.node;var zo=io(Ro),Bo={name:`rotate-ccw`,size:24,node:[[`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`}]]};Bo.node;var Vo=io(Bo),Ho={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};Ho.node;var Uo=io(Ho),Wo={name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};Wo.node;var Go=io(Wo),Ko={name:`sun`,size:24,node:[[`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`}]]};Ko.node;var qo=io(Ko),Jo={name:`undo-2`,size:24,node:[[`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`}]]};Jo.node;var Yo=io(Jo),Xo={name:`user-round`,size:24,node:[[`circle`,{cx:`12`,cy:`8`,r:`5`,key:`1hypcn`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`,key:`rfgkzh`}]],aliases:[`user-2`]};Xo.node;var Zo=io(Xo),Qo={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};Qo.node;var $o=io(Qo),es={slot:`_slot_11jbj_1`,origin:`_origin_11jbj_12`,card:`_card_11jbj_15`,blocked:`_blocked_11jbj_36`,dragging:`_dragging_11jbj_46`,title:`_title_11jbj_52`,meta:`_meta_11jbj_60`,chip:`_chip_11jbj_73`,tags:`_tags_11jbj_79`,count:`_count_11jbj_88`,lock:`_lock_11jbj_97`,tip:`_tip_11jbj_100`,claim:`_claim_11jbj_117`},ts=[`None`,`Low`,`Medium`,`High`];function ns({priority:e}){return e<2?null:(0,h.jsx)(`span`,{className:`pri ${e===3?`pri-high`:`pri-medium`}`,title:ts[e],"aria-label":`${ts[e]} priority`,children:`▲`})}var rs=ts,is=(e,t)=>{let{backlog:n,active:r,review:i,done:a}=t.counts;return{project:t,workspace:e,inMotion:r,toTest:i,blocked:t.blocked,done:a,total:n+r+i+a}},as=e=>e.toTest+e.blocked,os=(e,t)=>as(t)-as(e)||t.inMotion-e.inMotion||t.total-t.done-(e.total-e.done)||e.project.name.localeCompare(t.project.name),ss=(e,t)=>t.project.lastActivity.localeCompare(e.project.lastActivity)||e.project.name.localeCompare(t.project.name);function cs(e,t=Date.now()){let n=Math.max(0,Math.floor((t-Date.parse(e))/6e4));if(n<1)return`just now`;if(n<60)return`${n} min ago`;let r=Math.floor(n/60);if(r<24)return`${r} h ago`;let i=Math.floor(r/24);return i===1?`yesterday`:i<14?`${i} days ago`:i<56?`${Math.floor(i/7)} weeks ago`:new Date(e).toLocaleDateString(void 0,{day:`numeric`,month:`short`,year:`numeric`})}function ls(e){let t=e.projects.filter(e=>!e.archived).map(t=>is(e,t)),n=t.filter(e=>e.total>0).sort(os);return{workspace:e,lines:n,empty:t.filter(e=>e.total===0),archived:e.projects.length-t.length,inMotion:n.reduce((e,t)=>e+t.inMotion,0),blocked:n.reduce((e,t)=>e+t.blocked,0)}}function us(e){return e.workspaces.flatMap(e=>ls(e).lines).filter(e=>as(e)>0).sort(os)}var ds=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`;function fs(e){if(e.length===0)return`Nothing is waiting for you to check, and nothing is blocked.`;let t=e.reduce((e,t)=>e+t.toTest,0),n=e.reduce((e,t)=>e+t.blocked,0);return`${[t>0&&`${ds(t,`item`)} ready for you to check`,n>0&&(t>0?`${n} blocked`:`${ds(n,`item`)} blocked`)].filter(Boolean).join(` and `)}, in ${ds(e.length,`project`)}.`}var ps={mark:`_mark_1jqs9_1`},ms=(0,m.createContext)({}),hs=e=>(0,m.useContext)(ms)[e];function gs({summary:e}){if(!e)return null;let t=`${e.count} ${e.count===1?`commit`:`commits`}, latest ${e.last.shortSha} ${cs(e.last.date)}`;return(0,h.jsxs)(`span`,{className:ps.mark,title:t,"aria-label":t,children:[(0,h.jsx)(Do,{size:14,strokeWidth:1.75,"aria-hidden":`true`}),e.count]})}var _s={key:`_key_fro3t_1`};function vs({value:e,className:t=``}){let[n,r]=(0,m.useState)(!1);return e?(0,h.jsx)(`button`,{type:`button`,className:`${_s.key} ${t}`,title:n?`Copied`:`Copy ${e}`,"aria-label":`Copy key ${e}`,onPointerDown:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),onClick:t=>{t.stopPropagation(),navigator.clipboard?.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),1200)})},children:n?`Copied`:e}):null}var ys={bar:`_bar_wqsrv_1`,thick:`_thick_wqsrv_10`,done:`_done_wqsrv_17`,active:`_active_wqsrv_20`,review:`_review_wqsrv_23`,backlog:`_backlog_wqsrv_26`,dot:`_dot_wqsrv_30`,legend:`_legend_wqsrv_45`,swatch:`_swatch_wqsrv_60`,milestone:`_milestone_wqsrv_66`,none:`_none_wqsrv_79`,milestoneName:`_milestoneName_wqsrv_83`},bs={done:`Done`,active:`Doing now`,review:`Ready to check`,backlog:`Not started`},xs=[`done`,`active`,`review`,`backlog`];function Ss({counts:e,total:t,thick:n=!1}){let r=xs.filter(t=>e[t]>0).map(t=>`${e[t]} ${bs[t].toLowerCase()}`).join(`, `);return(0,h.jsx)(`span`,{className:`${ys.bar} ${n?ys.thick:``}`,role:`img`,"aria-label":r||`No items`,children:t>0&&xs.map(t=>e[t]>0&&(0,h.jsx)(`span`,{className:ys[t],style:{flexGrow:e[t]}},t))})}function Cs({kind:e}){return(0,h.jsx)(`span`,{className:`${ys.dot} ${ys[e]}`,"aria-hidden":`true`})}function ws(){return(0,h.jsx)(`ul`,{className:ys.legend,"aria-label":`Legend`,children:xs.map(e=>(0,h.jsxs)(`li`,{children:[(0,h.jsx)(`span`,{className:`${ys.swatch} ${ys[e]}`,"aria-hidden":`true`}),bs[e]]},e))})}function Ts({name:e}){return(0,h.jsxs)(`span`,{className:`${ys.milestone} ${e?``:ys.none}`,title:e?`Milestone: ${e}`:`No milestone`,children:[(0,h.jsx)(To,{size:12,strokeWidth:2,"aria-hidden":`true`}),(0,h.jsx)(`span`,{className:ys.milestoneName,children:e??`No milestone`})]})}function Es({item:e,selected:t=!1,dragging:n=!1}){let r=hs(e.id),i=!!e.claim||!!e.key||!!e.milestone||e.priority>=2||e.tags.length>0||e.blocked||e.refCount>0||!!r;return(0,h.jsxs)(`div`,{className:`${es.card} ${e.blocked?es.blocked:``} ${n?es.dragging:``}`,"aria-selected":t,children:[(0,h.jsx)(`div`,{className:es.title,children:e.title}),i&&(0,h.jsxs)(`div`,{className:es.meta,children:[(0,h.jsx)(vs,{value:e.key}),e.milestone&&(0,h.jsx)(`span`,{className:es.chip,children:(0,h.jsx)(Ts,{name:e.milestone})}),(0,h.jsx)(ns,{priority:e.priority}),(0,h.jsx)(`span`,{className:es.tags,children:e.tags.join(` · `)}),(0,h.jsx)(gs,{summary:r}),e.claim&&(0,h.jsxs)(`span`,{className:es.claim,title:`Claimed by ${e.claim.by} until ${new Date(e.claim.until).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})}`,children:[(0,h.jsx)(Zo,{size:13,strokeWidth:1.75,"aria-hidden":`true`}),e.claim.by.split(/[\\/]/).filter(Boolean).at(-1)??e.claim.by]}),e.blocked?(0,h.jsxs)(`span`,{className:`${es.count} ${es.lock}`,"aria-label":`Blocked`,children:[(0,h.jsx)(Fo,{size:13,strokeWidth:1.5}),e.blockedBy.length]}):e.refCount>0&&(0,h.jsxs)(`span`,{className:es.count,"aria-label":`${e.refCount} refs`,children:[(0,h.jsx)(zo,{size:13,strokeWidth:1.5}),e.refCount]})]})]})}function Ds({item:e,column:t,selected:n,onOpen:r}){let{setNodeRef:i,attributes:a,listeners:o,isDragging:s}=La({id:e.id,data:{column:t}}),[c,l]=(0,m.useState)(!1),[u,d]=(0,m.useState)(!1);return(0,m.useEffect)(()=>{if(!c||!e.blocked)return d(!1);let t=setTimeout(()=>d(!0),350);return()=>clearTimeout(t)},[c,e.blocked]),(0,h.jsxs)(`div`,{ref:i,"data-card-id":e.id,className:`${es.slot} ${s?es.origin:``}`,...a,...o,"aria-roledescription":`card`,"aria-label":e.title,onClick:()=>r(e.id),onKeyDown:t=>{o?.onKeyDown?.(t),!t.defaultPrevented&&t.key===`Enter`&&r(e.id)},onPointerEnter:()=>l(!0),onPointerLeave:()=>l(!1),children:[(0,h.jsx)(Es,{item:e,selected:n}),u&&!s&&e.blockedBy.length>0&&(0,h.jsxs)(`div`,{className:es.tip,role:`tooltip`,children:[`Blocked by `,e.blockedBy.map(e=>e.title).join(`, `)]})]})}var Os={column:`_column_1ajgo_1`,collapsed:`_collapsed_1ajgo_14`,header:`_header_1ajgo_18`,label:`_label_1ajgo_26`,count:`_count_1ajgo_30`,chevron:`_chevron_1ajgo_34`,toggle:`_toggle_1ajgo_37`,cards:`_cards_1ajgo_43`,drop:`_drop_1ajgo_50`},ks=()=>null;function As({column:e,collapsed:t,onToggle:n,activeId:r,dropIndex:i,selectedId:a,onOpen:o,children:s}){let{setNodeRef:c,isOver:l}=aa({id:`column:${e.key}`,data:{column:e.key}}),u=(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Cs,{kind:e.kind}),(0,h.jsx)(`span`,{className:Os.label,children:e.label})]}),d=(0,h.jsx)(`span`,{className:Os.count,children:e.count});if(t)return(0,h.jsxs)(`section`,{ref:c,"data-column":e.key,className:`${Os.column} ${Os.collapsed}`,children:[(0,h.jsxs)(`button`,{type:`button`,className:Os.header,onClick:n,"aria-expanded":!1,"aria-label":`Expand ${e.label}`,children:[u,d,(0,h.jsx)(_o,{size:14,strokeWidth:1.5,className:Os.chevron})]}),l&&i!==null&&(0,h.jsx)(`div`,{className:Os.drop})]});let f=0,p=e.items.filter(e=>e.id!==r).length;return(0,h.jsxs)(`section`,{ref:c,"data-column":e.key,className:Os.column,"aria-label":e.label,children:[(0,h.jsxs)(`header`,{className:Os.header,children:[u,d,n&&(0,h.jsx)(`button`,{type:`button`,className:`btn btn-ghost ${Os.toggle}`,onClick:n,"aria-label":`Collapse ${e.label}`,children:(0,h.jsx)(ho,{size:14,strokeWidth:1.5})})]}),s,e.items.length>0&&(0,h.jsx)(ka,{id:e.key,items:e.items.map(e=>e.id),strategy:ks,children:(0,h.jsxs)(`div`,{className:Os.cards,children:[e.items.map(t=>{let n=t.id!==r&&i===f;return t.id!==r&&f++,(0,h.jsxs)(m.Fragment,{children:[n&&(0,h.jsx)(`div`,{className:Os.drop}),(0,h.jsx)(Ds,{item:t,column:e.key,selected:t.id===a,onOpen:o})]},t.id)}),i!==null&&i>=p&&(0,h.jsx)(`div`,{className:Os.drop})]})}),e.items.length===0&&i!==null&&(0,h.jsx)(`div`,{className:Os.drop})]})}var js={input:`_input_1udyg_1`};function Ms({onCreate:e,onClose:t}){let[n,r]=(0,m.useState)(``);return(0,h.jsx)(`input`,{autoFocus:!0,className:js.input,placeholder:`New item title`,"aria-label":`New item title`,value:n,onChange:e=>r(e.target.value),onBlur:()=>{n.trim()||t()},onKeyDown:i=>{i.key===`Escape`?(i.preventDefault(),i.stopPropagation(),t()):i.key===`Enter`&&n.trim()&&(i.preventDefault(),e(n.trim()),r(``))}})}var Ns=e=>{let t=dr(e);return t.length>0?[...t].sort((e,t)=>Number(String(e.id).startsWith(`column:`))-Number(String(t.id).startsWith(`column:`))):sr(e)};function Ps({board:e,selectedId:t,createPending:n=!1,onCreateStarted:r,onSelect:i,onOpen:a}){let[o,s]=(0,m.useState)(!1),[c,l]=(0,m.useState)(!1),[u,d]=(0,m.useState)(null),[f,p]=(0,m.useState)(null),g=(0,m.useRef)(null),v=_(),y=Wt(),b=st({mutationFn:F.createItem,onSettled:()=>v.invalidateQueries({queryKey:I.board(e.project.id)})});yt(g,e);let x=e.project.id,S=e=>e.kind===`done`&&!o,C=e.columns.filter(e=>!S(e)).flatMap(e=>e.items),w=e.columns.find(e=>e.isDefault)??e.columns[0],T=u?e.columns.flatMap(e=>e.items).find(e=>e.id===u):void 0,E=e.columns.every(e=>e.count===0),D=Zn(Xn(ti,{activationConstraint:{distance:4}}),Xn(Xr,{coordinateGetter:Va}));(0,m.useEffect)(()=>{n&&(l(!0),r?.())},[n,r]),(0,m.useEffect)(()=>{t&&g.current?.querySelector(`[data-card-id="${CSS.escape(t)}"]`)?.scrollIntoView({block:`nearest`,inline:`nearest`})},[t]);function O(t,n,r){let i=e.columns.find(e=>e.key===n),a=C.find(e=>e.id===t)??e.columns.flatMap(e=>e.items).find(e=>e.id===t);if(!i||!a)return;let o=i.items.map(e=>e.id).filter(e=>e!==t);if(a.status===n){let e=i.items.findIndex(e=>e.id===t);if(r===`bottom`?e===i.items.length-1:e===r)return}let s=r===`bottom`?{position:`bottom`}:Dt(o,r);y.mutate({id:t,projectId:x,status:n,...s})}function k(t){let n=t.over?.data.current?.column,r=e.columns.find(e=>e.key===n),i=t.active.rect.current.translated;if(!r||!i)return null;if(S(r))return{column:r.key,index:r.items.length};let a=i.top+i.height/2,o=[...g.current?.querySelectorAll(`[data-column="${r.key}"] [data-card-id]`)??[]].filter(e=>e.dataset.cardId!==t.active.id),s=o.findIndex(e=>{let t=e.getBoundingClientRect();return a<t.top+t.height/2});return{column:r.key,index:s<0?o.length:s}}function A(e){let t=k(e);p(e=>e?.column===t?.column&&e?.index===t?.index?e:t)}function ee(t){let n=k(t);if(d(null),p(null),!n)return;let r=e.columns.find(e=>e.key===n.column);O(String(t.active.id),n.column,S(r)?`bottom`:n.index)}return St(n=>{let r=C.findIndex(e=>e.id===t),o=C[r];if(n.key===`n`)l(!0);else if(n.key===`j`){let e=C[Math.min(r+1,C.length-1)];e&&i(e.id)}else if(n.key===`k`){let e=C[Math.max(r-1,0)];e&&i(e.id)}else if(n.key===`e`&&o)a(o.id);else if(n.key===`b`&&o)a(o.id,{blocker:!0});else if(/^[1-9]$/.test(n.key)&&o){let t=e.columns[Number(n.key)-1];if(!t)return!1;t.key!==o.status&&O(o.id,t.key,`bottom`)}else return!1},!u),(0,h.jsxs)(h.Fragment,{children:[E&&!c&&(0,h.jsx)(`p`,{className:`caption ${Wa.empty}`,children:`No items. Press n.`}),(!E||c)&&(0,h.jsxs)(Zi,{sensors:D,collisionDetection:Ns,onDragStart:e=>d(String(e.active.id)),onDragMove:A,onDragEnd:ee,onDragCancel:()=>{d(null),p(null)},children:[(0,h.jsx)(`div`,{ref:g,className:Wa.board,children:e.columns.map(e=>(0,h.jsx)(As,{column:e,collapsed:S(e),...e.kind===`done`?{onToggle:()=>s(!o)}:{},activeId:u,dropIndex:f?.column===e.key?f.index:null,selectedId:t,onOpen:a,children:c&&e.key===w?.key&&(0,h.jsx)(Ms,{onCreate:t=>b.mutate({projectId:x,title:t,status:e.key,position:`top`}),onClose:()=>l(!1)})},e.key))}),(0,h.jsx)(_a,{dropAnimation:null,children:T&&(0,h.jsx)(Es,{item:T,dragging:!0})})]})]})}function Fs({columns:e}){let t=[[[`n`],`new item`],[[`/`],`search`],[[`j`,`k`],`move between cards`],[[`e`],`open`],[[`1`,String(Math.min(e,9))],`move to column`],[[`b`],`add blocker`],[[/Mac|iPhone|iPad/.test(navigator.platform)?`⌘K`:`Ctrl K`],`commands`]];return(0,h.jsx)(`div`,{className:Wa.keys,"aria-label":`Keyboard shortcuts`,children:t.map(([e,t])=>(0,h.jsxs)(`span`,{children:[e.map((e,n)=>(0,h.jsxs)(`span`,{children:[n>0&&(t===`move to column`?`–`:` `),(0,h.jsx)(`kbd`,{children:e})]},e)),` `,t]},t))})}var Is=e=>e.toLowerCase().split(/\s+/).filter(Boolean);function Ls(e,t){let n=`${e.label} ${e.detail??``} ${e.meta??``}`.toLowerCase();return Is(t).every(e=>n.includes(e))}function Rs(e,t){let n=t.trim().toLowerCase();if(!n)return e;let r=e=>e.label.toLowerCase().startsWith(n)||e.detail?.toLowerCase().startsWith(n)?0:1;return e.map((e,t)=>({c:e,i:t})).filter(({c:e})=>Ls(e,n)).sort((e,t)=>r(e.c)-r(t.c)||e.i-t.i).map(({c:e})=>e)}function zs(e,t,n){return n===0?0:(e+t+n)%n}var Bs={palette:`_palette_rcwgt_1`,field:`_field_rcwgt_16`,input:`_input_rcwgt_34`,list:`_list_rcwgt_46`,group:`_group_rcwgt_54`,row:`_row_rcwgt_57`,text:`_text_rcwgt_71`,detail:`_detail_rcwgt_77`,meta:`_meta_rcwgt_81`,status:`_status_rcwgt_84`,empty:`_empty_rcwgt_88`},Vs={panel:`_panel_10rd3_1`,end:`_end_10rd3_17`,wide:`_wide_10rd3_21`,item:`_item_10rd3_24`,active:`_active_10rd3_36`};function Hs(e,t,n){(0,m.useEffect)(()=>{if(!t)return;let r=t=>{e.current?.contains(t.target)||n()},i=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),n())};return document.addEventListener(`pointerdown`,r),window.addEventListener(`keydown`,i,!0),()=>{document.removeEventListener(`pointerdown`,r),window.removeEventListener(`keydown`,i,!0)}},[e,t,n])}function Us({children:e,align:t=`start`,wide:n=!1}){return(0,h.jsx)(`div`,{className:`${Vs.panel} ${t===`end`?Vs.end:``} ${n?Vs.wide:``}`,children:e})}function Ws({children:e,active:t,selected:n,onSelect:r,onHover:i}){return(0,h.jsx)(`button`,{type:`button`,role:`option`,"aria-selected":n??!1,className:`${Vs.item} ${t?Vs.active:``}`,onPointerMove:i,onClick:r,children:e})}function Gs({commands:e,workspaceId:t,projects:n,statusLabel:r,onOpenItem:i,onClose:a}){let[o,s]=(0,m.useState)(``),[c,l]=(0,m.useState)(0),u=(0,m.useRef)(null),d=(0,m.useRef)(null),f=(0,m.useRef)(null),[p]=(0,m.useState)(()=>document.activeElement),g=Ht(t,o);Hs(u,!0,a),(0,m.useEffect)(()=>(f.current?.focus(),()=>p?.focus?.()),[p]);let _=Rs(e,o),v=o.trim()?g.data??[]:[],y=[..._.map(e=>({kind:`command`,command:e})),...v.map(e=>({kind:`item`,item:e}))],b=Math.min(c,Math.max(y.length-1,0));(0,m.useLayoutEffect)(()=>{d.current?.querySelector(`[data-index="${b}"]`)?.scrollIntoView({block:`nearest`})},[b]);let x=e=>{e&&(a(),e.kind===`command`?e.command.run():i(e.item))},S=e=>n.find(t=>t.id===e)?.name??``,C=e=>`palette-option-${e}`,w=(e,t)=>(0,h.jsx)(`div`,{id:C(t),"data-index":t,role:`option`,"aria-selected":t===b,className:Bs.row,onPointerMove:()=>l(t),onPointerDown:e=>e.preventDefault(),onClick:()=>x(e),children:e.kind===`command`?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(`span`,{className:Bs.text,children:[e.command.label,e.command.detail&&(0,h.jsx)(`span`,{className:`mono ${Bs.detail}`,children:e.command.detail})]}),e.command.meta&&(0,h.jsx)(`span`,{className:`mono ${Bs.meta}`,children:e.command.meta}),e.command.hint&&(0,h.jsx)(`kbd`,{children:e.command.hint})]}):(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`span`,{className:Bs.text,children:e.item.title}),(0,h.jsx)(`span`,{className:`mono ${Bs.meta}`,children:S(e.item.projectId)}),(0,h.jsx)(`span`,{className:`caption ${Bs.status}`,children:r(e.item.projectId,e.item.status)})]})},e.kind===`command`?e.command.id:e.item.id);return(0,h.jsxs)(`div`,{ref:u,className:Bs.palette,role:`dialog`,"aria-label":`Command palette`,children:[(0,h.jsxs)(`label`,{className:Bs.field,children:[(0,h.jsx)(Uo,{size:14,strokeWidth:1.5}),(0,h.jsx)(`span`,{className:`visually-hidden`,children:`Search actions and items`}),(0,h.jsx)(`input`,{ref:f,className:Bs.input,placeholder:`Type a command or search items`,role:`combobox`,"aria-expanded":!0,"aria-controls":`palette-list`,"aria-activedescendant":y.length?C(b):void 0,value:o,onChange:e=>{s(e.target.value),l(0)},onKeyDown:e=>{if(e.key===`ArrowDown`||e.ctrlKey&&e.key===`n`)l(zs(b,1,y.length));else if(e.key===`ArrowUp`||e.ctrlKey&&e.key===`p`)l(zs(b,-1,y.length));else if(e.key===`Enter`)x(y[b]);else return;e.preventDefault()}}),(0,h.jsx)(`kbd`,{children:`esc`})]}),(0,h.jsxs)(`div`,{ref:d,id:`palette-list`,role:`listbox`,"aria-label":`Results`,className:Bs.list,children:[_.length>0&&(0,h.jsx)(`div`,{className:`label ${Bs.group}`,children:`Actions`}),_.map((e,t)=>w({kind:`command`,command:e},t)),v.length>0&&(0,h.jsx)(`div`,{className:`label ${Bs.group}`,children:`Items`}),v.map((e,t)=>w({kind:`item`,item:e},_.length+t)),y.length===0&&!g.isFetching&&(0,h.jsx)(`p`,{className:`caption ${Bs.empty}`,children:`Nothing matches.`})]})]})}var Ks=e=>String(e).padStart(2,`0`);function qs(e,t){let n=new Date(e),r=`${n.getFullYear()}-${Ks(n.getMonth()+1)}-${Ks(n.getDate())}`,i=new Date().toDateString()===n.toDateString();return t&&i?`${Ks(n.getHours())}:${Ks(n.getMinutes())}`:r}var Js={section:`_section_14340_1`,list:`_list_14340_6`,row:`_row_14340_11`,line:`_line_14340_22`,icon:`_icon_14340_31`,sha:`_sha_14340_35`,subject:`_subject_14340_39`,missing:`_missing_14340_48`,aside:`_aside_14340_49`,tag:`_tag_14340_56`,project:`_project_14340_65`,date:`_date_14340_70`,attach:`_attach_14340_77`};function Ys({sha:e,commit:t,projectId:n,label:r,tag:i}){return t?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`span`,{className:`mono ${Js.sha}`,children:t.shortSha}),(0,h.jsx)(`span`,{className:Js.subject,children:t.subject}),r&&(0,h.jsx)(`span`,{className:`caption ${Js.aside}`,children:r}),t.projectId!==n&&(0,h.jsx)(`span`,{className:`mono-sm ${Js.project}`,"data-commit-project":t.projectName,children:t.projectName}),i,(0,h.jsx)(`span`,{className:`mono-sm ${Js.date}`,"data-commit-date":``,children:qs(t.date,!1)})]}):(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`span`,{className:`mono ${Js.sha}`,children:e}),(0,h.jsx)(`span`,{className:`caption ${Js.missing}`,children:`not found`})]})}function Xs({commits:e,projectId:t,onAttach:n}){if(!e)return null;let r=e.filter(e=>e.source===`discovered`);return r.length===0?null:(0,h.jsxs)(`section`,{className:Js.section,"aria-label":`Commits`,children:[(0,h.jsx)(`div`,{className:`label`,children:`Commits`}),(0,h.jsx)(`div`,{className:Js.list,children:r.map(e=>(0,h.jsxs)(`div`,{className:Js.row,"data-commit":e.sha,title:`${e.author} · ${e.sha}${e.projectId===t?``:`\n${e.projectPath}`}`,children:[(0,h.jsxs)(`span`,{className:Js.line,children:[(0,h.jsx)(Do,{size:14,strokeWidth:1.5,className:Js.icon}),(0,h.jsx)(Ys,{sha:e.sha,commit:e,projectId:t,tag:(0,h.jsx)(`span`,{className:`mono-sm ${Js.tag}`,children:`discovered`})})]}),(0,h.jsx)(`button`,{type:`button`,className:Js.attach,onClick:()=>n(e),"aria-label":`Attach commit ${e.shortSha}`,children:`Attach`})]},e.sha))})]})}var Zs={confirm:`_confirm_1sjhn_1`};function Qs({label:e,onConfirm:t}){let[n,r]=(0,m.useState)(!1);return n?(0,h.jsxs)(`span`,{className:Zs.confirm,children:[`Delete?`,(0,h.jsx)(`button`,{type:`button`,className:`btn btn-danger`,onClick:t,children:`Yes`}),(0,h.jsx)(`button`,{type:`button`,className:`btn btn-link`,autoFocus:!0,onClick:()=>r(!1),children:`No`})]}):(0,h.jsx)(`button`,{type:`button`,className:`btn btn-danger`,onClick:()=>r(!0),children:e})}var $s={drawer:`_drawer_1f69c_1`,"slide-in":`_slide-in_1f69c_1`,leaving:`_leaving_1f69c_20`,"slide-out":`_slide-out_1f69c_1`,bar:`_bar_1f69c_29`,barButton:`_barButton_1f69c_38`,body:`_body_1f69c_52`,itemKey:`_itemKey_1f69c_61`,top:`_top_1f69c_65`,actions:`_actions_1f69c_71`,primary:`_primary_1f69c_79`,fields:`_fields_1f69c_87`,addRow:`_addRow_1f69c_102`,flag:`_flag_1f69c_108`,none:`_none_1f69c_111`,footer:`_footer_1f69c_114`,id:`_id_1f69c_123`,grow:`_grow_1f69c_130`},ec=/#L(\d+)(?:-(\d+))?$/;function tc(e){let t=ec.exec(e);if(!t)return{path:e,lines:null};let n=Number(t[1]);return{path:e.slice(0,t.index),lines:{start:n,end:t[2]===void 0?n:Number(t[2])}}}function nc(e){return e.end===e.start?`L${e.start}`:`L${e.start}–${e.end}`}function rc(e,t){return!!e&&t>=e.start&&t<=e.end}var ic={viewer:`_viewer_18alg_1`,header:`_header_18alg_9`,path:`_path_18alg_17`,size:`_size_18alg_24`,body:`_body_18alg_27`,source:`_source_18alg_32`,range:`_range_18alg_39`,numbered:`_numbered_18alg_44`,line:`_line_18alg_47`};function ac(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var oc=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,sc=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,cc={};function lc(e,t){return((t||cc).jsx?sc:oc).test(e)}var uc=/[ \t\n\f\r]/g;function dc(e){return typeof e==`object`?e.type===`text`&&fc(e.value):fc(e)}function fc(e){return e.replace(uc,``)===``}var pc=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};pc.prototype.normal={},pc.prototype.property={},pc.prototype.space=void 0;function mc(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new pc(n,r,t)}function hc(e){return e.toLowerCase()}var gc=class{constructor(e,t){this.attribute=t,this.property=e}};gc.prototype.attribute=``,gc.prototype.booleanish=!1,gc.prototype.boolean=!1,gc.prototype.commaOrSpaceSeparated=!1,gc.prototype.commaSeparated=!1,gc.prototype.defined=!1,gc.prototype.mustUseProperty=!1,gc.prototype.number=!1,gc.prototype.overloadedBoolean=!1,gc.prototype.property=``,gc.prototype.spaceSeparated=!1,gc.prototype.space=void 0;var _c=s({boolean:()=>z,booleanish:()=>yc,commaOrSpaceSeparated:()=>H,commaSeparated:()=>xc,number:()=>B,overloadedBoolean:()=>bc,spaceSeparated:()=>V}),vc=0,z=Sc(),yc=Sc(),bc=Sc(),B=Sc(),V=Sc(),xc=Sc(),H=Sc();function Sc(){return 2**++vc}var Cc=Object.keys(_c),wc=class extends gc{constructor(e,t,n,r){let i=-1;if(super(e,t),Tc(this,`space`,r),typeof n==`number`)for(;++i<Cc.length;){let e=Cc[i];Tc(this,Cc[i],(n&_c[e])===_c[e])}}};wc.prototype.defined=!0;function Tc(e,t,n){n&&(e[t]=n)}function Ec(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new wc(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[hc(r)]=r,n[hc(a.attribute)]=r}return new pc(t,n,e.space)}var Dc=Ec({properties:{ariaActiveDescendant:null,ariaAtomic:yc,ariaAutoComplete:null,ariaBusy:yc,ariaChecked:yc,ariaColCount:B,ariaColIndex:B,ariaColSpan:B,ariaControls:V,ariaCurrent:null,ariaDescribedBy:V,ariaDetails:null,ariaDisabled:yc,ariaDropEffect:V,ariaErrorMessage:null,ariaExpanded:yc,ariaFlowTo:V,ariaGrabbed:yc,ariaHasPopup:null,ariaHidden:yc,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:V,ariaLevel:B,ariaLive:null,ariaModal:yc,ariaMultiLine:yc,ariaMultiSelectable:yc,ariaOrientation:null,ariaOwns:V,ariaPlaceholder:null,ariaPosInSet:B,ariaPressed:yc,ariaReadOnly:yc,ariaRelevant:null,ariaRequired:yc,ariaRoleDescription:V,ariaRowCount:B,ariaRowIndex:B,ariaRowSpan:B,ariaSelected:yc,ariaSetSize:B,ariaSort:null,ariaValueMax:B,ariaValueMin:B,ariaValueNow:B,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Oc(e,t){return t in e?e[t]:t}function kc(e,t){return Oc(e,t.toLowerCase())}var Ac=Ec({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:xc,acceptCharset:V,accessKey:V,action:null,allow:null,allowFullScreen:z,allowPaymentRequest:z,allowUserMedia:z,alpha:z,alt:null,as:null,async:z,autoCapitalize:null,autoComplete:V,autoFocus:z,autoPlay:z,blocking:V,capture:null,charSet:null,checked:z,cite:null,className:V,closedBy:null,colorSpace:null,cols:B,colSpan:B,command:null,commandFor:null,content:null,contentEditable:yc,controls:z,controlsList:V,coords:B|xc,crossOrigin:null,data:null,dateTime:null,decoding:null,default:z,defer:z,dir:null,dirName:null,disabled:z,download:bc,draggable:yc,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:z,formTarget:null,headers:V,height:B,hidden:bc,high:B,href:null,hrefLang:null,htmlFor:V,httpEquiv:V,id:null,imageSizes:null,imageSrcSet:null,inert:z,inputMode:null,integrity:null,is:null,isMap:z,itemId:null,itemProp:V,itemRef:V,itemScope:z,itemType:V,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:z,low:B,manifest:null,max:null,maxLength:B,media:null,method:null,min:null,minLength:B,multiple:z,muted:z,name:null,nonce:null,noModule:z,noValidate:z,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:z,optimum:B,pattern:null,ping:V,placeholder:null,playsInline:z,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:z,referrerPolicy:null,rel:V,required:z,reversed:z,rows:B,rowSpan:B,sandbox:V,scope:null,scoped:z,seamless:z,selected:z,shadowRootClonable:z,shadowRootCustomElementRegistry:z,shadowRootDelegatesFocus:z,shadowRootMode:null,shadowRootSerializable:z,shape:null,size:B,sizes:null,slot:null,span:B,spellCheck:yc,src:null,srcDoc:null,srcLang:null,srcSet:null,start:B,step:null,style:null,tabIndex:B,target:null,title:null,translate:null,type:null,typeMustMatch:z,useMap:null,value:yc,width:B,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:V,axis:null,background:null,bgColor:null,border:B,borderColor:null,bottomMargin:B,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:z,declare:z,event:null,face:null,frame:null,frameBorder:null,hSpace:B,leftMargin:B,link:null,longDesc:null,lowSrc:null,marginHeight:B,marginWidth:B,noResize:z,noHref:z,noShade:z,noWrap:z,object:null,profile:null,prompt:null,rev:null,rightMargin:B,rules:null,scheme:null,scrolling:yc,standby:null,summary:null,text:null,topMargin:B,valueType:null,version:null,vAlign:null,vLink:null,vSpace:B,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:z,disablePictureInPicture:z,disableRemotePlayback:z,exportParts:xc,part:V,prefix:null,property:null,results:B,security:null,unselectable:null},space:`html`,transform:kc}),jc=Ec({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`,maskType:`mask-type`,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:H,accentHeight:B,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:B,amplitude:B,arabicForm:null,ascent:B,attributeName:null,attributeType:null,azimuth:B,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:B,by:null,calcMode:null,capHeight:B,className:V,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:B,diffuseConstant:B,direction:null,display:null,dur:null,divisor:B,dominantBaseline:null,download:z,dx:null,dy:null,edgeMode:null,editable:null,elevation:B,enableBackground:null,end:null,event:null,exponent:B,externalResourcesRequired:null,fill:null,fillOpacity:B,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:xc,g2:xc,glyphName:xc,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:B,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:B,horizOriginX:B,horizOriginY:B,id:null,ideographic:B,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:B,k:B,k1:B,k2:B,k3:B,k4:B,kernelMatrix:H,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:B,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:B,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:B,overlineThickness:B,paintOrder:null,panose1:null,path:null,pathLength:B,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:V,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:B,pointsAtY:B,pointsAtZ:B,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:H,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:H,rev:H,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:H,requiredFeatures:H,requiredFonts:H,requiredFormats:H,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:B,specularExponent:B,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:B,strikethroughThickness:B,string:null,stroke:null,strokeDashArray:H,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:B,strokeOpacity:B,strokeWidth:null,style:null,surfaceScale:B,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:H,tabIndex:B,tableValues:null,target:null,targetX:B,targetY:B,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:H,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:B,underlineThickness:B,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:B,values:null,vAlphabetic:B,vMathematical:B,vectorEffect:null,vHanging:B,vIdeographic:B,version:null,vertAdvY:B,vertOriginX:B,vertOriginY:B,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:B,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Oc}),Mc=Ec({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),Nc=Ec({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:kc}),Pc=Ec({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Fc={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`},Ic=/[A-Z]/g,Lc=/-[a-z]/g,Rc=/^data[-\w.:]+$/i;function zc(e,t){let n=hc(t),r=t,i=gc;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Rc.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Lc,Vc);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Lc.test(e)){let n=e.replace(Ic,Bc);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=wc}return new i(r,t)}function Bc(e){return`-`+e.toLowerCase()}function Vc(e){return e.charAt(1).toUpperCase()}var Hc=mc([Dc,Ac,Mc,Nc,Pc],`html`),Uc=mc([Dc,jc,Mc,Nc,Pc],`svg`);function Wc(e){return e.join(` `).trim()}var Gc=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
13
|
-
`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),Kc=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(Gc());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),qc=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),Jc=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Kc()),r=qc();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),Yc=U(`end`),Xc=U(`start`);function U(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Zc(e){let t=Xc(e),n=Yc(e);if(t&&n)return{start:t,end:n}}function Qc(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?el(e.position):`start`in e||`end`in e?el(e):`line`in e||`column`in e?$c(e):``}function $c(e){return tl(e&&e.line)+`:`+tl(e&&e.column)}function el(e){return $c(e&&e.start)+`-`+$c(e&&e.end)}function tl(e){return e&&typeof e==`number`?e:1}var W=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=Qc(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};W.prototype.file=``,W.prototype.name=``,W.prototype.reason=``,W.prototype.message=``,W.prototype.stack=``,W.prototype.column=void 0,W.prototype.line=void 0,W.prototype.ancestors=void 0,W.prototype.cause=void 0,W.prototype.fatal=void 0,W.prototype.place=void 0,W.prototype.ruleId=void 0,W.prototype.source=void 0;var nl=l(Jc(),1),rl={}.hasOwnProperty,il=new Map,al=/[A-Z]/g,ol=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),sl=new Set([`td`,`th`]),cl=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function ll(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=bl(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=yl(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?Uc:Hc,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=ul(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function ul(e,t,n){if(t.type===`element`)return dl(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return fl(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return ml(e,t,n);if(t.type===`mdxjsEsm`)return pl(e,t);if(t.type===`root`)return hl(e,t,n);if(t.type===`text`)return gl(e,t)}function dl(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Uc,e.schema=i),e.ancestors.push(t);let a=El(e,t.tagName,!1),o=xl(e,t),s=Cl(e,t);return ol.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!dc(e)})),_l(e,o,a,t),vl(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function fl(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Dl(e,t.position)}function pl(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Dl(e,t.position)}function ml(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Uc,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:El(e,t.name,!0),o=Sl(e,t),s=Cl(e,t);return _l(e,o,a,t),vl(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function hl(e,t,n){let r={};return vl(r,Cl(e,t)),e.create(t,e.Fragment,r,n)}function gl(e,t){return t.value}function _l(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function vl(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function yl(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function bl(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Xc(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function xl(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&rl.call(t.properties,i)){let a=wl(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&sl.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Sl(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Dl(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Dl(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function Cl(e,t){let n=[],r=-1,i=e.passKeys?new Map:il;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=ul(e,a,o);s!==void 0&&n.push(s)}return n}function wl(e,t,n){let r=zc(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?ac(n):Wc(n)),r.property===`style`){let t=typeof n==`object`?n:Tl(e,String(n));return e.stylePropertyNameCase===`css`&&(t=Ol(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?Fc[r.property]||r.property:r.attribute,n]}}function Tl(e,t){try{return(0,nl.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new W("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=cl+`#cannot-parse-style-attribute`,r}}function El(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=lc(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=lc(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return rl.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Dl(e)}function Dl(e,t){let n=new W("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=cl+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function Ol(e){let t={},n;for(n in e)rl.call(e,n)&&(t[kl(n)]=e[n]);return t}function kl(e){let t=e.replace(al,Al);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function Al(e){return`-`+e.toLowerCase()}var jl={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`]},Ml={};function Nl(e,t){let n=t||Ml;return Pl(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function Pl(e,t,n){if(Il(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return Fl(e.children,t,n)}return Array.isArray(e)?Fl(e,t,n):``}function Fl(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=Pl(e[i],t,n);return r.join(``)}function Il(e){return!!(e&&typeof e==`object`)}var Ll=document.createElement(`i`);function Rl(e){let t=`&`+e+`;`;Ll.innerHTML=t;let n=Ll.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function zl(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Bl(e,t){return e.length>0?(zl(e,e.length,0,t),e):t}var Vl={}.hasOwnProperty;function Hl(e){let t={},n=-1;for(;++n<e.length;)Ul(t,e[n]);return t}function Ul(e,t){let n;for(n in t){let r=(Vl.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){Vl.call(r,a)||(r[a]=[]);let e=i[a];Wl(r[a],Array.isArray(e)?e:e?[e]:[])}}}function Wl(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);zl(e,0,0,r)}function Gl(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function Kl(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var G=tu(/[A-Za-z]/),ql=tu(/[\dA-Za-z]/),Jl=tu(/[#-'*+\--9=?A-Z^-~]/);function Yl(e){return e!==null&&(e<32||e===127)}var Xl=tu(/\d/),Zl=tu(/[\dA-Fa-f]/),Ql=tu(/[!-/:-@[-`{-~]/);function K(e){return e!==null&&e<-2}function q(e){return e!==null&&(e<0||e===32)}function J(e){return e===-2||e===-1||e===32}var $l=tu(/\p{P}|\p{S}/u),eu=tu(/\s/);function tu(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function nu(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&ql(e.charCodeAt(n+1))&&ql(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function Y(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return J(r)?(e.enter(n),s(r)):t(r)}function s(r){return J(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function ru(e,t,n,r,i,a){let o=0;return s;function s(t){return a>0&&J(t)?(e.enter(r),c(t)):l(t)}function c(t){return J(t)&&o<a?(e.consume(t),o++,c):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}var iu={tokenize:au};function au(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Y(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return K(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var ou=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){su(this,e,t,n,!1)}addBefore(e,t,n){su(this,e,t,n,!0)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function su(e,t,n,r,i){if(n===0&&r.length===0)return;let a=e.index.get(t);if(a){a[1]+=n,i?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}let o=[t,n,r];e.map.push(o),e.index.set(t,o)}var cu={tokenize:uu},lu={tokenize:du};function uu(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;let c=new ou;return c.add(a+1,0,t.events.slice(n)),c.add(n,s-n,[]),c.consume(t.events),l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(lu,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(lu,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return K(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;let l=new ou;l.add(a+1,0,t.events.slice(n)),l.add(n,e-n,[]),l.consume(t.events)}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function du(e,t,n){return Y(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function fu(e){if(e===null||q(e)||eu(e))return 1;if($l(e))return 2}function pu(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var mu={name:`attention`,resolveAll:hu,tokenize:gu};function hu(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]===`exit`&&e[i][1].type===`attentionSequence`&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;let a=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[n][1].start};_u(o,-a),_u(s,a);let c={type:a>1?`strongSequence`:`emphasisSequence`,start:o,end:{...e[i][1].end}},l={type:a>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:s},u={type:a>1?`strongText`:`emphasisText`,start:{...e[i][1].end},end:{...e[n][1].start}},d={type:a>1?`strong`:`emphasis`,start:{...c.start},end:{...l.end}};e[i][1].end={...c.start},e[n][1].start={...l.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=Bl(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=Bl(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=Bl(r,pu(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=Bl(r,[[`exit`,u,t],[`enter`,l,t],[`exit`,l,t],[`exit`,d,t]]);let f=0;e[n][1].end.offset-e[n][1].start.offset&&(f=2,r=Bl(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),zl(e,i-1,n-i+3,r),n=i+r.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function gu(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=fu(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=fu(o),u=!l||l===2&&i||n.includes(o)&&o!==42&&o!==95,d=!i||i===2&&l||n.includes(r)&&r!==42&&r!==95;return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function _u(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var vu={name:`autolink`,tokenize:yu};function yu(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return G(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||ql(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||ql(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||Yl(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):Jl(t)?(e.consume(t),l):n(t)}function u(e){return ql(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||ql(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var bu={partial:!0,tokenize:xu};function xu(e,t,n){return r;function r(t){return J(t)?Y(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||K(e)?t(e):n(e)}}var Su={continuation:{tokenize:wu},exit:Tu,name:`blockQuote`,tokenize:Cu};function Cu(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return J(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function wu(e,t,n){let r=this;return i;function i(t){return J(t)?Y(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Su,t,n)(r)}}function Tu(e){e.exit(`blockQuote`)}var Eu={name:`characterEscape`,tokenize:Du};function Du(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return Ql(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Ou={name:`characterReference`,tokenize:ku};function ku(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=ql,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=Zl,u):(e.enter(`characterReferenceValue`),a=7,o=Xl,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===ql&&!Rl(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var Au={partial:!0,tokenize:ju};function ju(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var Mu={concrete:!0,name:`codeFenced`,tokenize:Nu};function Nu(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),J(t)?Y(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||K(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Au,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||K(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):J(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),Y(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||K(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||K(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&J(t)?Y(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||K(t)?e.check(Au,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||K(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),J(t)?Y(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),J(t)?Y(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||K(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var Pu={name:`codeIndented`,tokenize:Iu},Fu={partial:!0,tokenize:Lu};function Iu(e,t,n){return r;function r(t){return e.enter(`codeIndented`),ru(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):K(t)?e.attempt(Fu,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||K(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function Lu(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):K(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):ru(e,t,a,`linePrefix`,4,4)(o)}function a(e){return K(e)?i(e):n(e)}}var Ru={name:`codeText`,previous:Bu,resolve:zu,tokenize:Vu};function zu(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Bu(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function Vu(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):K(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||K(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var Hu=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&Uu(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),Uu(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Uu(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);Uu(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);Uu(this.left,t.reverse())}}}};function Uu(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Wu(e){let t={},n=-1,r,i,a,o,s,c,l,u=new Hu(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,Gu(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return zl(e,0,1/0,u.slice(0)),!l}function Gu(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var Ku={resolve:Ju,tokenize:Yu},qu={partial:!0,tokenize:Xu};function Ju(e){return Wu(e),e}function Yu(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):K(t)?e.check(qu,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function Xu(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Y(e,a,`linePrefix`)}function a(i){if(i===null||K(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Zu(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Yl(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||K(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||q(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||Yl(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function Qu(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):K(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||K(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!J(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function $u(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):K(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Y(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||K(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function ed(e,t){let n;return r;function r(i){return K(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):J(i)?Y(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var td={name:`definition`,tokenize:rd},nd={partial:!0,tokenize:id};function rd(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Qu.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=Kl(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return q(t)?ed(e,l)(t):l(t)}function l(t){return Zu(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(nd,d,d)(t)}function d(t){return J(t)?Y(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||K(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function id(e,t,n){return r;function r(t){return q(t)?ed(e,i)(t):n(t)}function i(t){return $u(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return J(t)?Y(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||K(e)?t(e):n(e)}}var ad={name:`hardBreakEscape`,tokenize:od};function od(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return K(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var sd={name:`headingAtx`,resolve:cd,tokenize:ld};function cd(e,t){let n=e.length-2,r=3;if(e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r){let i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`};zl(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function ld(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||q(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||K(n)?(e.exit(`atxHeading`),t(n)):J(n)?Y(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||q(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var ud=`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`.split(`.`),dd=[`pre`,`script`,`style`,`textarea`],fd={concrete:!0,name:`htmlFlow`,resolveTo:md,tokenize:hd},pd={partial:!0,tokenize:gd};function md(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function hd(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:ne):G(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):G(a)?(e.consume(a),i=4,r.interrupt?t:ne):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:ne):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return G(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||q(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&dd.includes(l)?(i=1,r.interrupt?t(s):O(s)):ud.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||ql(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return J(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||G(t)?(e.consume(t),b):J(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||ql(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):J(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):J(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||K(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||q(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||J(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||K(t)?O(t):J(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),j):t===60&&i===1?(e.consume(t),M):t===62&&i===4?(e.consume(t),re):t===63&&i===3?(e.consume(t),ne):t===93&&i===5?(e.consume(t),te):K(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(pd,P,k)(t)):t===null||K(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(Au,A,P)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ee}function ee(t){return t===null||K(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function j(t){return t===45?(e.consume(t),ne):O(t)}function M(t){return t===47?(e.consume(t),o=``,N):O(t)}function N(t){if(t===62){let n=o.toLowerCase();return dd.includes(n)?(e.consume(t),re):O(t)}return G(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),N):O(t)}function te(t){return t===93?(e.consume(t),ne):O(t)}function ne(t){return t===62?(e.consume(t),re):t===45&&i===2?(e.consume(t),ne):O(t)}function re(t){return t===null||K(t)?(e.exit(`htmlFlowData`),P(t)):(e.consume(t),re)}function P(n){return e.exit(`htmlFlow`),t(n)}}function gd(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(bu,t,n)}}var _d={name:`htmlText`,tokenize:vd};function vd(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):G(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):G(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):K(t)?(o=d,M(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?j(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):K(t)?(o=h,M(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?j(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?j(t):K(t)?(o=v,M(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):K(t)?(o=y,M(t)):(e.consume(t),y)}function b(e){return e===62?j(e):y(e)}function x(t){return G(t)?(e.consume(t),S):n(t)}function S(t){return t===45||ql(t)?(e.consume(t),S):C(t)}function C(t){return K(t)?(o=C,M(t)):J(t)?(e.consume(t),C):j(t)}function w(t){return t===45||ql(t)?(e.consume(t),w):t===47||t===62||q(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),j):t===58||t===95||G(t)?(e.consume(t),E):K(t)?(o=T,M(t)):J(t)?(e.consume(t),T):j(t)}function E(t){return t===45||t===46||t===58||t===95||ql(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):K(t)?(o=D,M(t)):J(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):K(t)?(o=O,M(t)):J(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,ee):t===null?n(t):K(t)?(o=k,M(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||q(t)?T(t):(e.consume(t),A)}function ee(e){return e===47||e===62||q(e)?T(e):n(e)}function j(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function M(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),N}function N(t){return J(t)?Y(e,te,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):te(t)}function te(t){return e.enter(`htmlTextData`),o(t)}}var yd={name:`labelEnd`,resolveAll:Cd,resolveTo:wd,tokenize:Td},bd={tokenize:Ed},xd={tokenize:Dd},Sd={tokenize:Od};function Cd(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&zl(e,0,e.length,n),e}function wd(e,t){let n=e.length,r=0,i,a,o;for(;n--;){let t=e[n][1];if(i){if(t.type===`link`||t.type===`labelLink`&&t._inactive)break;e[n][0]===`enter`&&t.type===`labelLink`&&(t._inactive=!0)}else if(a){if(e[n][0]===`enter`&&(t.type===`labelImage`||t.type===`labelLink`)&&!t._balanced&&(i=n,t.type!==`labelLink`)){r=2;break}}else t.type===`labelEnd`&&(a=n)}let s={type:e[i][1].type===`labelLink`?`link`:`image`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:`label`,start:{...e[i][1].start},end:{...e[a][1].end}},l={type:`labelText`,start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[[`enter`,s,t],[`enter`,c,t]],o=Bl(o,e.slice(i+1,i+r+3)),o=Bl(o,[[`enter`,l,t]]),o=Bl(o,pu(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=Bl(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=Bl(o,e.slice(a+1)),o=Bl(o,[[`exit`,s,t]]),zl(e,i,e.length,o),e}function Td(e,t,n){let r=this,i=r._labelStarts,a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(Kl(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(bd,u,o?u:d)(t):t===91?e.attempt(xd,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Sd,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function Ed(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return q(t)?ed(e,a)(t):a(t)}function a(t){return t===41?u(t):Zu(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return q(t)?ed(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?$u(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return q(t)?ed(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function Dd(e,t,n){let r=this;return i;function i(t){return Qu.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(Kl(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function Od(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var kd={name:`labelStartImage`,resolveAll:yd.resolveAll,tokenize:Ad};function Ad(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),o}function o(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelImage`),s):n(t)}function s(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var jd={name:`labelStartLink`,resolveAll:yd.resolveAll,tokenize:Md};function Md(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelLink`),o}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var Nd={name:`lineEnding`,tokenize:Pd};function Pd(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Y(e,t,`linePrefix`)}}var Fd={name:`thematicBreak`,tokenize:Id};function Id(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||K(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),J(t)?Y(e,s,`whitespace`)(t):s(t))}}var Ld={continuation:{tokenize:Vd},exit:Ud,name:`list`,tokenize:Bd},Rd={partial:!0,tokenize:Wd},zd={partial:!0,tokenize:Hd};function Bd(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:Xl(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(Fd,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return Xl(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(bu,r.interrupt?n:u,e.attempt(Rd,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return J(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function Vd(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(bu,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Y(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!J(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(zd,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Y(e,e.attempt(Ld,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function Hd(e,t,n){let r=this;return Y(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function Ud(e){e.exit(this.containerState.type)}function Wd(e,t,n){let r=this;return Y(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!J(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Gd={name:`setextUnderline`,resolveTo:Kd,tokenize:qd};function Kd(e,t){let n=new ou,r=e.length,i,a,o;for(;r--;)if(e[r][0]===`enter`){if(e[r][1].type===`content`){i=r;break}e[r][1].type===`paragraph`&&(a=r)}else e[r][1].type===`content`&&n.add(r,1,[]),!o&&e[r][1].type===`definition`&&(o=r);let s={type:`setextHeading`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=`setextHeadingText`,o?(n.add(a,0,[[`enter`,s,t]]),n.add(o+1,0,[[`exit`,e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=s,n.add(e.length,0,[[`exit`,s,t]]),n.consume(e),e}function qd(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),J(t)?Y(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||K(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var Jd={tokenize:Yd};function Yd(e){let t=this,n=e.attempt(bu,r,e.attempt(this.parser.constructs.flowInitial,i,Y(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Ku,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var Xd={resolveAll:ef()},Zd=$d(`string`),Qd=$d(`text`);function $d(e){return{resolveAll:ef(e===`text`?tf:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function ef(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function tf(e,t){let n=new ou,r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type===`lineEnding`)&&e[r-1][1].type===`data`){let i=e[r-1][1],a=t.sliceStream(i),o=a.length,s=-1,c=0,l;for(;o--;){let e=a[o];if(typeof e==`string`){for(s=e.length;e.charCodeAt(s-1)===32;)c++,s--;if(s)break;s=-1}else if(e===-2)l=!0,c++;else if(e!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){let a={type:r===e.length||l||c<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...a.start},i.start.offset===i.end.offset?Object.assign(i,a):n.add(r,0,[[`enter`,a,t],[`exit`,a,t]])}r++}return n.consume(e),e}var nf=s({attentionMarkers:()=>df,contentInitial:()=>af,disable:()=>ff,document:()=>rf,flow:()=>sf,flowInitial:()=>of,insideSpan:()=>uf,string:()=>cf,text:()=>lf}),rf={42:Ld,43:Ld,45:Ld,48:Ld,49:Ld,50:Ld,51:Ld,52:Ld,53:Ld,54:Ld,55:Ld,56:Ld,57:Ld,62:Su},af={91:td},of={[-2]:Pu,[-1]:Pu,32:Pu},sf={35:sd,42:Fd,45:[Gd,Fd],60:fd,61:Gd,95:Fd,96:Mu,126:Mu},cf={38:Ou,92:Eu},lf={[-5]:Nd,[-4]:Nd,[-3]:Nd,33:kd,38:Ou,42:mu,60:[vu,_d],91:jd,92:[ad,Eu],93:yd,95:mu,96:Ru},uf={null:[mu,Xd]},df={null:[42,95]},ff={null:[]};function pf(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=Bl(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=pu(a,l.events,l),l.events):[]}function f(e,t){return hf(p(e),t)}function p(e){return mf(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){for(;r._index<o.length;){let e=o[r._index];if(typeof e==`string`){let t=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===t&&r._bufferIndex<e.length;)_(e.charCodeAt(r._bufferIndex))}else _(e)}}function _(e){u=u(e)}function v(e){K(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&zl(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function mf(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function hf(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
14
|
-
`;break;case-3:o=`\r
|
|
15
|
-
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function gf(e){let t={constructs:Hl([nf,...(e||{}).extensions||[]]),content:n(iu),defined:[],document:n(cu),flow:n(Jd),lazy:{},string:n(Zd),text:n(Qd)};return t;function n(e){return n;function n(n){return pf(t,e,n)}}}function _f(e){for(;!Wu(e););return e}var vf=/[\0\t\n\r]/g;function yf(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i));let s=[],c=0;for(t=``,n&&=(i.charCodeAt(0)===65279&&c++,void 0);c<i.length;){vf.lastIndex=c;let n=vf.exec(i),a=n&&n.index!==void 0?n.index:i.length,o=i.charCodeAt(a);if(!n){t=i.slice(c);break}if(o===10&&c===a&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),c<a&&(s.push(i.slice(c,a)),e+=a-c),o){case 0:s.push(65533),e++;break;case 9:{let t=Math.ceil(e/4)*4;for(s.push(-2);e++<t;)s.push(-1);break}case 10:s.push(-4),e=1;break;default:r=!0,e=1}c=a+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var bf=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function xf(e){return e.replace(bf,Sf)}function Sf(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return Gl(n.slice(t?2:1),t?16:10)}return Rl(n)||e}var Cf={}.hasOwnProperty;function wf(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),Tf(n)(_f(gf(n).document().write(yf()(e,t,!0))))}function Tf(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(be),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(ge),blockQuote:a(de),characterEscape:T,characterReference:T,codeFenced:a(fe),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(fe,o),codeText:a(pe,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(me),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(he),hardBreakEscape:a(_e),hardBreakTrailing:a(_e),htmlFlow:a(ve,o),htmlFlowData:T,htmlText:a(ve,o),htmlTextData:T,image:a(ye),label:o,link:a(be),listItem:a(Se),listItemValue:f,listOrdered:a(xe,d),listUnordered:a(xe),paragraph:a(Ce),reference:ie,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(ge),strong:a(we),thematicBreak:a(Ee)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:ue,autolinkProtocol:le,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:oe,characterReferenceMarkerNumeric:oe,characterReferenceValue:se,characterReference:ce,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(ee),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(M),label:te,labelText:N,lineEnding:D,link:c(j),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ae,resourceDestinationString:ne,resourceTitleString:re,resource:P,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};Df(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];Cf.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||kf).call(a,void 0,e[0])}for(r.position={start:Ef(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Ef(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Ef(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||kf).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+Qc({start:e.start,end:e.end})+`): it’s not open`);n.position.end=Ef(e.end)}function u(){return Nl(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Kl(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=Te(),n.position={start:Ef(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Ef(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=Ef(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=xf(t),n.identifier=Kl(t).toLowerCase()}function te(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function re(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function P(){this.data.inReference=void 0}function ie(){this.data.referenceType=`collapsed`}function ae(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Kl(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function oe(e){this.data.characterReferenceType=e.type}function se(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=Gl(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=Rl(t);let i=this.stack[this.stack.length-1];i.value+=r}function ce(e){let t=this.stack.pop();t.position.end=Ef(e.end)}function le(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ue(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function de(){return{type:`blockquote`,children:[]}}function fe(){return{type:`code`,lang:null,meta:null,value:``}}function pe(){return{type:`inlineCode`,value:``}}function me(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function he(){return{type:`emphasis`,children:[]}}function ge(){return{type:`heading`,depth:0,children:[]}}function _e(){return{type:`break`}}function ve(){return{type:`html`,value:``}}function ye(){return{type:`image`,title:null,url:``,alt:null}}function be(){return{type:`link`,title:null,url:``,children:[]}}function xe(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function Se(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function Ce(){return{type:`paragraph`,children:[]}}function we(){return{type:`strong`,children:[]}}function Te(){return{type:`text`,value:``}}function Ee(){return{type:`thematicBreak`}}}function Ef(e){return{line:e.line,column:e.column,offset:e.offset}}function Df(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Df(e,r):Of(e,r)}}function Of(e,t){let n;for(n in t)if(Cf.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function kf(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+Qc({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Qc({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+Qc({start:t.start,end:t.end})+`) is still open`)}function Af(e){let t=this;t.parser=n;function n(n){return wf(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function jf(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Mf(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
16
|
-
`}]}function Nf(e,t){let n=t.value?t.value+`
|
|
17
|
-
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function Pf(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ff(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function If(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=nu(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function Lf(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Rf(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function zf(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function Bf(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return zf(e,t);let i={src:nu(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function Vf(e,t){let n={src:nu(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Hf(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Uf(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return zf(e,t);let i={href:nu(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Wf(e,t){let n={href:nu(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Gf(e,t,n){let r=e.all(t),i=n?Kf(n):qf(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
18
|
-
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
19
|
-
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function Kf(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=qf(n[r])}return t}function qf(e){return e.spread??e.children.length>1}function Jf(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Yf(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Xf(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Zf(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Qf(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=Xc(t.children[1]),o=Yc(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function $f(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function ep(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var tp=9,np=32;function rp(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(ip(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(ip(t.slice(i),i>0,!1)),a.join(``)}function ip(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===tp||t===np;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===tp||t===np;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function ap(e,t){let n={type:`text`,value:rp(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function op(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var sp={blockquote:jf,break:Mf,code:Nf,delete:Pf,emphasis:Ff,footnoteReference:If,heading:Lf,html:Rf,imageReference:Bf,image:Vf,inlineCode:Hf,linkReference:Uf,link:Wf,listItem:Gf,list:Jf,paragraph:Yf,root:Xf,strong:Zf,table:Qf,tableCell:ep,tableRow:$f,text:ap,thematicBreak:op,toml:cp,yaml:cp,definition:cp,footnoteDefinition:cp};function cp(){}var{defineProperty:lp}=Object,up=typeof self==`object`?self:globalThis,dp=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new up[e](t)},fp=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?lp(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof up[e]==`function`?dp(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(dp(a,o),i)};return r},pp=e=>fp(new Map,e)(0),mp=``,{toString:hp}={},{keys:gp,is:_p}=Object,vp=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=hp.call(e).slice(8,-1);switch(n){case`Array`:return[1,mp];case`Object`:return[2,mp];case`Date`:return[3,mp];case`RegExp`:return[4,mp];case`Map`:return[5,mp];case`Set`:return[6,mp];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},yp=([e,t])=>e===0&&(t===`function`||t===`symbol`),bp=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=vp(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&_p(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of gp(o))(e||!yp(vp(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?mp:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(yp(vp(n))||yp(vp(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!yp(vp(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},xp=(e,{json:t,lossy:n}={})=>{let r=[];return bp(!(t||n),!!t,new Map,r)(e),r},Sp=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?pp(xp(e,t)):structuredClone(e):(e,t)=>pp(xp(e,t));function Cp(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function wp(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function Tp(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||Cp,r=e.options.footnoteBackLabel||wp,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=nu(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...Sp(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
20
|
-
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
21
|
-
`}]}}var Ep=(function(e){if(e==null)return jp;if(typeof e==`function`)return Ap(e);if(typeof e==`object`)return Array.isArray(e)?Dp(e):Op(e);if(typeof e==`string`)return kp(e);throw Error(`Expected function, string, or object as test`)});function Dp(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Ep(e[n]);return Ap(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function Op(e){let t=e;return Ap(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function kp(e){return Ap(t);function t(t){return t&&t.type===e}}function Ap(e){return t;function t(t,n,r){return!!(Mp(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function jp(){return!0}function Mp(e){return typeof e==`object`&&!!e&&`type`in e}function Np(e){return e}var Pp=[];function Fp(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=Ep(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+Np(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=Pp,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=Ip(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function Ip(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?Pp:[e]}function Lp(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),Fp(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var Rp={}.hasOwnProperty,zp={};function Bp(e,t){let n=t||zp,r=new Map,i=new Map,a={all:s,applyData:Hp,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...sp,...n.handlers},one:o,options:n,patch:Vp,wrap:Wp};return Lp(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(Rp.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=Sp(n);return r.children=a.all(e),r}return Sp(e)}return(a.options.unknownHandler||Up)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=Gp(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=Gp(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function Vp(e,t){e.position&&(t.position=Zc(e))}function Hp(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,Sp(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function Up(e,t){let n=t.data||{},r=`value`in t&&!(Rp.call(n,`hProperties`)||Rp.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Wp(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
22
|
-
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
23
|
-
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
24
|
-
`}),n}function Gp(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Kp(e,t){let n=Bp(e,t),r=n.one(e,void 0),i=Tp(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
25
|
-
`},i)),a}function qp(e,t){return e&&`run`in e?async function(n,r){let i=Kp(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Kp(n,{file:r,...e||t})}}function Jp(e){if(e)throw e}var Yp=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function Xp(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Zp(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?Qp(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function Qp(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var $p={basename:em,dirname:tm,extname:nm,join:rm,sep:`/`};function em(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);om(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function tm(e){if(om(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function nm(e){om(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function rm(...e){let t=-1,n;for(;++t<e.length;)om(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:im(n)}function im(e){om(e);let t=e.codePointAt(0)===47,n=am(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function am(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function om(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var sm={cwd:cm};function cm(){return`/`}function lm(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function um(e){if(typeof e==`string`)e=new URL(e);else if(!lm(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return dm(e)}function dm(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var fm=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],pm=class{constructor(e){let t;t=e?lm(e)?{path:e}:typeof e==`string`||_m(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:sm.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<fm.length;){let e=fm[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)fm.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?$p.basename(this.path):void 0}set basename(e){hm(e,`basename`),mm(e,`basename`),this.path=$p.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?$p.dirname(this.path):void 0}set dirname(e){gm(this.basename,`dirname`),this.path=$p.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?$p.extname(this.path):void 0}set extname(e){if(mm(e,`extname`),gm(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=$p.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){lm(e)&&(e=um(e)),hm(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?$p.basename(this.path,this.extname):void 0}set stem(e){hm(e,`stem`),mm(e,`stem`),this.path=$p.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new W(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function mm(e,t){if(e&&e.includes($p.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+$p.sep+"`")}function hm(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function gm(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function _m(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var vm=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),ym=l(Yp(),1),bm={}.hasOwnProperty,xm=new class e extends vm{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=Zp()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,ym.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(wm(`data`,this.frozen),this.namespace[e]=t,this):bm.call(this.namespace,e)&&this.namespace[e]||void 0:e?(wm(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=Dm(e),n=this.parser||this.Parser;return Sm(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Sm(`process`,this.parser||this.Parser),Cm(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=Dm(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);km(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Sm(`processSync`,this.parser||this.Parser),Cm(`processSync`,this.compiler||this.Compiler),this.process(e,r),Em(`processSync`,`process`,t),n;function r(e,r){t=!0,Jp(e),n=r}}run(e,t,n){Tm(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=Dm(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),Em(`runSync`,`run`,n),r;function i(e,t){Jp(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=Dm(t),r=this.compiler||this.Compiler;return Cm(`stringify`,r),Tm(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(wm(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw 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");o(e.plugins),e.settings&&(r.settings=(0,ym.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];Xp(o)&&Xp(r)&&(r=(0,ym.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Sm(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Cm(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function wm(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Tm(e){if(!Xp(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Em(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Dm(e){return Om(e)?e:new pm(e)}function Om(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function km(e){return typeof e==`string`||Am(e)}function Am(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var jm=[],Mm={allowDangerousHtml:!0},Nm=/^(https?|ircs?|mailto|xmpp)$/i,Pm=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function Fm(e){let t=Im(e),n=Lm(e);return Rm(t.runSync(t.parse(n),n),e)}function Im(e){let t=e.rehypePlugins||jm,n=e.remarkPlugins||jm,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Mm}:Mm;return xm().use(Af).use(n).use(qp,r).use(t)}function Lm(e){let t=e.children||``,n=new pm;return typeof t==`string`?n.value=t:``+t,n}function Rm(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||zm;for(let e of Pm)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return Lp(e,l),ll(e,{Fragment:h.Fragment,components:i,ignoreInvalidStyle:!0,jsx:h.jsx,jsxs:h.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in jl)if(Object.hasOwn(jl,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=jl[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function zm(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Nm.test(e.slice(0,t))?e:``}var Bm=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],Vm={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...Bm,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...Bm],h2:[[`className`,`sr-only`]],img:[...Bm,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...Bm,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...Bm],table:[...Bm],ul:[...Bm,[`className`,`contains-task-list`]],"*":`abbr.accept.acceptCharset.accessKey.action.align.alt.axis.border.cellPadding.cellSpacing.char.charOff.charSet.checked.clear.colSpan.color.cols.compact.coords.dateTime.dir.encType.frame.hSpace.headers.height.hrefLang.htmlFor.id.isMap.itemProp.label.lang.maxLength.media.method.multiple.name.noHref.noShade.noWrap.open.prompt.readOnly.rev.rowSpan.rows.rules.scope.selected.shape.size.span.start.summary.tabIndex.title.useMap.vAlign.value.width`.split(`.`)},clobber:[`ariaDescribedBy`,`ariaLabelledBy`,`id`,`name`],clobberPrefix:`user-content-`,protocols:{cite:[`http`,`https`],href:[`http`,`https`,`irc`,`ircs`,`mailto`,`xmpp`],longDesc:[`http`,`https`],src:[`http`,`https`]},required:{input:{disabled:!0,type:`checkbox`}},strip:[`script`],tagNames:`a.b.blockquote.br.code.dd.del.details.div.dl.dt.em.h1.h2.h3.h4.h5.h6.hr.i.img.input.ins.kbd.li.ol.p.picture.pre.q.rp.rt.ruby.s.samp.section.source.span.strike.strong.sub.summary.sup.table.tbody.td.tfoot.th.thead.tr.tt.ul.var`.split(`.`)},Hm={}.hasOwnProperty;function Um(e,t){let n={type:`root`,children:[]},r=Wm({schema:t?{...Vm,...t}:Vm,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function Wm(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return Gm(e,n);case`doctype`:return Km(e,n);case`element`:return qm(e,n);case`root`:return Jm(e,n);case`text`:return Ym(e,n)}}}function Gm(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return nh(r,t),r}}function Km(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return nh(e,t),e}}function qm(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=Xm(e,t.children),i=Zm(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&Hm.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r<t.length;)e.stack.includes(t[r])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;let o={type:`element`,tagName:n,properties:i,children:r};return nh(o,t),o}function Jm(e,t){let n={type:`root`,children:Xm(e,t.children)};return nh(n,t),n}function Ym(e,t){let n={type:`text`,value:typeof t.value==`string`?t.value:``};return nh(n,t),n}function Xm(e,t){let n=[];if(Array.isArray(t)){let r=t,i=-1;for(;++i<r.length;){let t=Wm(e,r[i]);t&&(Array.isArray(t)?n.push(...t):n.push(t))}}return n}function Zm(e,t){let n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&Hm.call(r,n)?r[n]:void 0,o=r&&Hm.call(r,`*`)?r[`*`]:void 0,s=t&&typeof t==`object`?t:{},c={},l;for(l in s)if(Hm.call(s,l)){let t=s[l],n=Qm(e,rh(a,l),l,t);n??=Qm(e,rh(o,l),l,t),n!=null&&(c[l]=n)}if(i&&Hm.call(i,n)){let e=i[n];for(l in e)Hm.call(e,l)&&!Hm.call(c,l)&&(c[l]=e[l])}return c}function Qm(e,t,n,r){return t?Array.isArray(r)?$m(e,t,n,r):eh(e,t,n,r):void 0}function $m(e,t,n,r){let i=-1,a=[];for(;++i<r.length;){let o=eh(e,t,n,r[i]);(typeof o==`number`||typeof o==`string`)&&a.push(o)}return a}function eh(e,t,n,r){if((typeof r==`boolean`||typeof r==`number`||typeof r==`string`)&&th(e,n,r)){if(typeof t==`object`&&t.length>1){let e=!1,n=0;for(;++n<t.length;){let i=t[n];if(i&&typeof i==`object`&&`flags`in i){if(i.test(String(r))){e=!0;break}}else if(i===r){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function th(e,t,n){let r=e.schema.protocols&&Hm.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;let i=String(n),a=i.indexOf(`:`),o=i.indexOf(`?`),s=i.indexOf(`#`),c=i.indexOf(`/`);if(a<0||c>-1&&a>c||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l<r.length;){let e=r[l];if(a===e.length&&i.slice(0,e.length)===e)return!0}return!1}function nh(e,t){let n=Zc(t);t.data&&(e.data=Sp(t.data)),n&&(e.position=n)}function rh(e,t){let n,r=-1;if(e)for(;++r<e.length;){let i=e[r],a=typeof i==`string`?i:i[0];if(a===t)return i;a===`data*`&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()===`data`)return n}function ih(e){return function(t){return Um(t,e)}}function ah(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function oh(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function sh(e,t,n){let r=Ep((n||{}).ignore||[]),i=ch(t),a=-1;for(;++a<i.length;)Fp(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function ch(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([lh(e[0]),uh(e[1])])}return t}function lh(e){return typeof e==`string`?new RegExp(oh(e),`g`):e}function uh(e){return typeof e==`function`?e:function(){return e}}var dh=`phrasing`,fh=[`autolink`,`link`,`image`,`label`];function ph(){return{transforms:[xh],enter:{literalAutolink:hh,literalAutolinkEmail:gh,literalAutolinkHttp:gh,literalAutolinkWww:gh},exit:{literalAutolink:bh,literalAutolinkEmail:yh,literalAutolinkHttp:_h,literalAutolinkWww:vh}}}function mh(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:dh,notInConstruct:fh},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:dh,notInConstruct:fh},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:dh,notInConstruct:fh}]}}function hh(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function gh(e){this.config.enter.autolinkProtocol.call(this,e)}function _h(e){this.config.exit.autolinkProtocol.call(this,e)}function vh(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function yh(e){this.config.exit.autolinkEmail.call(this,e)}function bh(e){this.exit(e)}function xh(e){sh(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Sh],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Ch]],{ignore:[`link`,`linkReference`]})}function Sh(e,t,n,r,i){let a=``;if(!Eh(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!wh(n)))return!1;let o=Th(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function Ch(e,t,n,r){return!Eh(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function wh(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Th(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=ah(e,`(`),a=ah(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function Eh(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||eu(n)||$l(n))&&(!t||n!==47)}Ih.peek=Fh;function Dh(){this.buffer()}function Oh(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function kh(){this.buffer()}function Ah(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function jh(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Kl(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Mh(e){this.exit(e)}function Nh(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Kl(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Ph(e){this.exit(e)}function Fh(){return`[`}function Ih(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function Lh(){return{enter:{gfmFootnoteCallString:Dh,gfmFootnoteCall:Oh,gfmFootnoteDefinitionLabelString:kh,gfmFootnoteDefinition:Ah},exit:{gfmFootnoteCallString:jh,gfmFootnoteCall:Mh,gfmFootnoteDefinitionLabelString:Nh,gfmFootnoteDefinition:Ph}}}function Rh(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Ih},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
26
|
-
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?Bh:zh))),s(),o}}function zh(e,t,n){return t===0?e:Bh(e,t,n)}function Bh(e,t,n){return(n?``:` `)+e}var Vh=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];Kh.attention=qh,Kh.peek=Jh;function Hh(){return{canContainEols:[`delete`],enter:{strikethrough:Wh},exit:{strikethrough:Gh}}}function Uh(){return{handlers:{delete:Kh},unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Vh}]}}function Wh(e){this.enter({type:`delete`,children:[],position:void 0},e)}function Gh(e){this.exit(e)}function Kh(e,t,n,r){let i=n.createTracker(r),a=n.stack.includes(`strikethrough`)?`~`:`~~`,o=n.enter(`strikethrough`),s=i.move(a);return s+=n.containerPhrasing(e,{...i.current(),before:s,after:`~`}),s+=i.move(a),o(),s}function qh(){return{construct:`strikethrough`,markers:[`~`],sizes:[2,1]}}function Jh(){return`~`}function Yh(e){return e.length}function Xh(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Yh,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=Zh(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=Qh(r[d]);else{let e=Qh(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&(n.alignDelimiters!==!1||i!==``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
|
|
27
|
-
`)}function Zh(e){return e==null?``:String(e)}function Qh(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}var $h=Ep([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function eg(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),tg);return i(),o}function tg(e,t,n){return`>`+(n?``:` `)+e}function ng(e,t){return rg(e,t.inConstruct,!0)&&!rg(e,t.notInConstruct,!1)}function rg(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function ig(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){let e=n.unsafe[i];if(e.character===`
|
|
28
|
-
`&&!e.before&&!e.after&&ng(n.stack,e))return/[\t ]/.test(r.before)?``:` `}return`\\
|
|
29
|
-
`}function ag(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function og(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^\n\r ]/.test(e.value)||/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function sg(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function cg(e,t,n,r){let i=sg(n),a=e.value||``;if(og(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,lg);return e(),t}let o=n.createTracker(r),s=i.repeat(Math.max(ag(a,i)+1,3)),c=n.enter(`codeFenced`),l=i==="`"?`GraveAccent`:`Tilde`,u=o.move(s);if(e.lang){let t=n.enter(`codeFencedLang${l}`);u+=o.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...o.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${l}`);u+=o.move(` `),u+=o.move(n.safe(e.meta,{before:u,after:`
|
|
30
|
-
`,encode:["`"],...o.current()})),t()}return u+=o.move(`
|
|
31
|
-
`),a&&(u+=o.move(a+`
|
|
32
|
-
`)),u+=o.move(s),c(),u}function lg(e,t,n){return(n?``:` `)+e}function ug(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function dg(e,t,n,r){let i=ug(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
|
|
33
|
-
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function fg(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}pg.attention=mg,pg.peek=hg;function pg(e,t,n,r){let i=n.enter(`phrasing`),a=n.containerPhrasing({type:`root`,children:[e]},r);return i(),a}function mg(e,t){return{construct:`emphasis`,markers:fg(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[1]}}function hg(e,t,n){return n.options.emphasis||`*`}function gg(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function _g(e,t){let n=!1;return Lp(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&Nl(e)&&(t.options.setext||n))}function vg(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(_g(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
34
|
-
`,after:`
|
|
35
|
-
`});return r(),t(),o+`
|
|
36
|
-
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
37
|
-
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
38
|
-
`,...a.current()}),u=l.charCodeAt(0);return(u===9||u===32)&&(l=gg(u)+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}yg.peek=bg;function yg(e){return e.value||``}function bg(){return`<`}xg.peek=Sg;function xg(e,t,n,r){let i=ug(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function Sg(){return`!`}Cg.peek=wg;function Cg(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function wg(){return`!`}Tg.peek=Eg;function Tg(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e);if(!e.atBreak)continue;let i;for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function Eg(){return"`"}function Dg(e,t){let n=Nl(e);return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][+\-.a-z]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}Og.peek=kg;function Og(e,t,n,r){let i=ug(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r);if(Dg(e,n)){let t=n.stack;n.stack=t.filter(function(e){return e!==`phrasing`});let r=n.enter(`autolink`),i=o.move(`<`);return i+=o.move(n.containerPhrasing(e,{before:i,after:`>`,...o.current()})),i+=o.move(`>`),r(),n.stack=t,i}let s=n.enter(`link`),c=n.enter(`label`),l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function kg(e,t,n){return Dg(e,n)?`<`:`[`}Ag.peek=jg;function Ag(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function jg(){return`[`}function Mg(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Ng(e){let t=Mg(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Pg(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Fg(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Ig(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?Pg(n):Mg(n),s=e.ordered?o===`.`?`)`:`.`:Ng(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),Fg(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function Lg(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Rg(e,t,n,r){let i=Lg(n),a=n.bulletCurrent||Mg(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function zg(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function Bg(e,t,n,r){if(!e.children.some(function(e){return $h(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function Vg(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Hg.attention=Ug,Hg.peek=Wg;function Hg(e,t,n,r){let i=n.enter(`phrasing`),a=n.containerPhrasing({type:`root`,children:[e]},r);return i(),a}function Ug(e,t){return{construct:`strong`,markers:Vg(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function Wg(e,t,n){return n.options.strong||`*`}function Gg(e,t,n,r){return n.safe(e.value,r)}function Kg(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function qg(e,t,n){let r=(Fg(n)+(n.options.ruleSpaces?` `:``)).repeat(Kg(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Jg={blockquote:eg,break:ig,code:cg,definition:dg,emphasis:pg,hardBreak:ig,heading:vg,html:yg,image:xg,imageReference:Cg,inlineCode:Tg,link:Og,linkReference:Ag,list:Ig,listItem:Rg,paragraph:zg,root:Bg,strong:Hg,text:Gg,thematicBreak:qg};function Yg(){return{enter:{table:Xg,tableData:e_,tableHeader:e_,tableRow:Qg},exit:{codeText:t_,table:Zg,tableData:$g,tableHeader:$g,tableRow:$g}}}function Xg(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Zg(e){this.exit(e),this.data.inTable=void 0}function Qg(e){this.enter({type:`tableRow`,children:[]},e)}function $g(e){this.exit(e)}function e_(e){this.enter({type:`tableCell`,children:[]},e)}function t_(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,n_));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function n_(e,t){return t===`|`?t:e}function r_(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
39
|
-
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
40
|
-
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return Xh(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=Jg.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function i_(){return{exit:{taskListCheckValueChecked:o_,taskListCheckValueUnchecked:o_,paragraph:s_}}}function a_(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:c_}}}function o_(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function s_(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function c_(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=Jg.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function l_(){return[ph(),Lh(),Hh(),Yg(),i_()]}function u_(e){return{extensions:[mh(),Rh(e),Uh(),r_(e),a_()]}}var d_={tokenize:T_,partial:!0},f_={tokenize:E_,partial:!0},p_={tokenize:D_,partial:!0},m_={tokenize:O_,partial:!0},h_={tokenize:k_,partial:!0},g_={name:`wwwAutolink`,tokenize:C_,previous:A_},__={name:`protocolAutolink`,tokenize:w_,previous:j_},v_={name:`emailAutolink`,tokenize:S_,previous:M_},y_={};function b_(){return{text:y_}}for(var x_=48;x_<123;)y_[x_]=v_,x_++,x_===58?x_=65:x_===91&&(x_=97);y_[43]=v_,y_[45]=v_,y_[46]=v_,y_[95]=v_,y_[72]=[v_,__],y_[104]=[v_,__],y_[87]=[v_,g_],y_[119]=[v_,g_];function S_(e,t,n){let r=this,i,a;return o;function o(t){return!N_(t)||!M_.call(r,r.previous)||P_(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return N_(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(h_,u,l)(t):t===45||t===95||ql(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&G(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function C_(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!A_.call(r,r.previous)||P_(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(d_,e.attempt(f_,e.attempt(p_,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function w_(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&j_.call(r,r.previous)&&!P_(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(G(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||Yl(t)||q(t)||eu(t)||$l(t)?n(t):e.attempt(f_,e.attempt(p_,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function T_(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function E_(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(m_,c,s)(t):t===null||q(t)||eu(t)||t!==45&&$l(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function D_(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(m_,t,a)(o):o===null||q(o)||eu(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function O_(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||q(o)||eu(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||q(e)||eu(e)?t(e):r(e)}function a(e){return G(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):G(t)?(e.consume(t),o):n(t)}}function k_(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return ql(e)?n(e):t(e)}}function A_(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||q(e)}function j_(e){return!G(e)}function M_(e){return!(e===47||N_(e))}function N_(e){return e===43||e===45||e===46||e===95||ql(e)}function P_(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var F_={tokenize:U_,partial:!0};function I_(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:B_,continuation:{tokenize:V_},exit:H_}},text:{91:{name:`gfmFootnoteCall`,tokenize:z_},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:L_,resolveTo:R_}}}}function L_(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=Kl(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function R_(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function z_(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||q(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(Kl(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return q(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function B_(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||q(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=Kl(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return q(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),Y(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function V_(e,t,n){return e.check(bu,t,e.attempt(F_,t,n))}function H_(e){e.exit(`gfmFootnoteDefinition`)}function U_(e,t,n){let r=this;return Y(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function W_(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&zl(o,o.length,0,pu(s,e.slice(r+1,n),t)),zl(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),zl(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=fu(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=fu(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var G_=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){K_(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function K_(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function q_(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function J_(){return{flow:{null:{name:`table`,tokenize:Y_,resolveAll:X_}}}}function Y_(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):K(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):J(t)?Y(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||q(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,J(t)?Y(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return J(t)?Y(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||K(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return J(t)?Y(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||K(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||K(n)?(e.exit(`tableRow`),t(n)):J(n)?Y(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||q(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function X_(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new G_;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(Q_(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=Z_(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=Z_(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=Z_(f,t,o,i,n,d)):(o[0]=o[1],d=Z_(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&Q_(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=q_(t.events,n))}return e}function Z_(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},$_(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=$_(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=$_(t.events,n[2]),a=$_(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},$_(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Q_(e,t,n,r,i){let a=[],o=$_(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function $_(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var ev={name:`tasklistCheck`,tokenize:nv};function tv(){return{text:{91:ev}}}function nv(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return q(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return K(r)?t(r):J(r)?e.check({tokenize:rv},t,n)(r):n(r)}}function rv(e,t,n){return Y(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function iv(e){return Hl([b_(),I_(),W_(e),J_(),tv()])}var av={};function ov(e){let t=this,n=e||av,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(iv(n)),a.push(l_()),o.push(u_(n))}var sv={prose:`_prose_1yrdz_1`};function cv({source:e}){return(0,h.jsx)(`div`,{className:sv.prose,children:(0,h.jsx)(Fm,{remarkPlugins:[ov],rehypePlugins:[ih],components:{a:({node:e,...t})=>(0,h.jsx)(`a`,{...t,target:`_blank`,rel:`noreferrer`})},children:e})})}function lv({itemId:e,fileRef:t,onClose:n}){let{path:r,lines:i}=tc(t.target),a=ot({queryKey:[`ref`,t.id,`full`],queryFn:()=>F.refContent(e,t.id,!0)}),o=(0,m.useRef)(null);(0,m.useEffect)(()=>{let e=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),n())};return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[n]);let s=a.data;(0,m.useLayoutEffect)(()=>{let e=o.current;if(!e||!i||s?.state!==`ok`)return;let t=e.querySelector(`[data-line="${Math.min(i.start,s.lines?.total??i.start)}"]`);t&&(e.scrollTop+=t.getBoundingClientRect().top-e.getBoundingClientRect().top-e.clientHeight/4)},[s,i?.start]);let c=null;if(a.error){let e=a.error;c=(0,h.jsx)(`p`,{className:`caption`,children:e instanceof pt&&e.code===`too_large`?`Larger than 256 KB. Not shown.`:e.message})}else if(s?.state===`missing`)c=(0,h.jsxs)(`p`,{className:`caption`,children:[`No file at `,s.path,`.`]});else if(s?.state===`binary`)c=(0,h.jsxs)(`p`,{className:`caption`,children:[`Binary file, `,s.size,` bytes. Not shown.`]});else if(s?.state===`ok`){if(i){let e=s.content.endsWith(`
|
|
41
|
-
`)?s.content.slice(0,-1):s.content;c=(0,h.jsx)(`pre`,{className:`${ic.source} ${ic.numbered}`,children:e.split(`
|
|
42
|
-
`).map((e,t)=>(0,h.jsx)(`span`,{"data-line":t+1,"data-highlighted":rc(i,t+1)||void 0,className:ic.line,children:e.replace(/\r$/,``)||` `},t))})}else c=/\.(md|markdown)$/i.test(r)?(0,h.jsx)(cv,{source:s.content}):(0,h.jsx)(`pre`,{className:ic.source,children:s.content})}return(0,h.jsxs)(`div`,{className:ic.viewer,role:`dialog`,"aria-label":t.target,children:[(0,h.jsxs)(`header`,{className:ic.header,children:[(0,h.jsx)(`span`,{className:`mono ${ic.path}`,children:r}),i&&(0,h.jsx)(`span`,{className:`mono-sm ${ic.range}`,title:s?.state===`ok`&&s.lines?`${s.lines.total} lines in the file`:void 0,children:nc(i)}),s&&`size`in s&&(0,h.jsxs)(`span`,{className:`mono-sm ${ic.size}`,children:[s.size,` B`]}),(0,h.jsx)(`button`,{type:`button`,className:`btn btn-ghost`,"aria-label":`Close file`,onClick:n,children:(0,h.jsx)($o,{size:16,strokeWidth:1.5})})]}),(0,h.jsx)(`div`,{ref:o,className:ic.body,children:c})]})}var uv={root:`_root_11deu_1`,trigger:`_trigger_11deu_4`,fieldRoot:`_fieldRoot_11deu_23`,field:`_field_11deu_23`,menu:`_menu_11deu_42`,filter:`_filter_11deu_47`,option:`_option_11deu_50`,check:`_check_11deu_56`,hint:`_hint_11deu_61`};function dv({label:e,value:t,options:n,onChange:r,onCreate:i,createPlaceholder:a,field:o=!1}){let[s,c]=(0,m.useState)(!1),[l,u]=(0,m.useState)(``),[d,f]=(0,m.useState)(0),p=(0,m.useRef)(null),g=(0,m.useRef)(null),_=(0,m.useRef)(null),v=()=>{c(!1),u(``)};Hs(p,s,()=>{v(),_.current?.focus()});let y=l?n.filter(e=>e.label.toLowerCase().includes(l.toLowerCase())):n,b=n.find(e=>e.value===t);(0,m.useEffect)(()=>{s&&(f(Math.max(0,y.findIndex(e=>e.value===t))),(g.current?.querySelector(`input`)??g.current)?.focus())},[s]);let x=e=>{e&&(v(),_.current?.focus(),e.value!==t&&r(e.value))};return(0,h.jsxs)(`div`,{ref:p,className:`${uv.root} ${o?uv.fieldRoot:``}`,children:[(0,h.jsxs)(`button`,{ref:_,type:`button`,className:`${uv.trigger} ${o?uv.field:``}`,"aria-label":`${e}: ${b?.label??``}`,"aria-haspopup":`listbox`,"aria-expanded":s,onClick:()=>s?v():c(!0),children:[b?.content??b?.label,(0,h.jsx)(ho,{size:12,strokeWidth:1.5})]}),s&&(0,h.jsx)(Us,{children:(0,h.jsxs)(`div`,{ref:g,role:`listbox`,"aria-label":e,tabIndex:-1,className:uv.menu,onKeyDown:e=>{if(e.key===`ArrowDown`)f(e=>Math.min(e+1,y.length-1));else if(e.key===`ArrowUp`)f(e=>Math.max(e-1,0));else if(e.key===`Enter`){let e=y.find(e=>e.label.toLowerCase()===l.trim().toLowerCase());i&&l.trim()&&!e?(v(),i(l.trim())):x(e??y[d])}else return;e.preventDefault()},children:[i&&(0,h.jsx)(`input`,{className:`input ${uv.filter}`,placeholder:a,value:l,onChange:e=>{u(e.target.value),f(0)}}),y.map((e,n)=>(0,h.jsxs)(Ws,{active:n===d,selected:e.value===t,onHover:()=>f(n),onSelect:()=>x(e),children:[(0,h.jsx)(`span`,{className:uv.option,children:e.content??e.label}),(0,h.jsx)(`span`,{className:uv.check,children:e.value===t&&(0,h.jsx)(po,{size:14,strokeWidth:1.5})})]},String(e.value))),i&&l.trim()&&!y.some(e=>e.label.toLowerCase()===l.trim().toLowerCase())&&(0,h.jsxs)(`div`,{className:`caption ${uv.hint}`,children:[`Enter to add “`,l.trim(),`”`]})]})})]})}var fv={root:`_root_ecvpc_1`,title:`_title_ecvpc_5`,project:`_project_ecvpc_11`,empty:`_empty_ecvpc_14`};function pv({workspaceId:e,exclude:t,projectName:n,onPick:r,onClose:i}){let[a,o]=(0,m.useState)(``),[s,c]=(0,m.useState)(0),l=(0,m.useRef)(null),u=(Ht(e,a).data??[]).filter(e=>!t.has(e.id));return Hs(l,!0,i),(0,h.jsxs)(`div`,{ref:l,className:fv.root,children:[(0,h.jsx)(`input`,{autoFocus:!0,className:`input`,placeholder:`Search items`,"aria-label":`Search items to link`,value:a,onChange:e=>{o(e.target.value),c(0)},onKeyDown:e=>{if(e.key===`ArrowDown`)c(e=>Math.min(e+1,u.length-1));else if(e.key===`ArrowUp`)c(e=>Math.max(e-1,0));else if(e.key===`Enter`&&u[s])r(u[s]);else return;e.preventDefault()}}),a.trim()&&(0,h.jsxs)(Us,{wide:!0,children:[u.length===0&&(0,h.jsx)(`div`,{className:`caption ${fv.empty}`,children:`No matching items.`}),u.map((e,t)=>(0,h.jsxs)(Ws,{active:t===s,onHover:()=>c(t),onSelect:()=>r(e),children:[(0,h.jsx)(`span`,{className:fv.title,children:e.title}),(0,h.jsx)(`span`,{className:`mono ${fv.project}`,children:n(e.projectId)})]},e.id))]})]})}var mv={section:`_section_1q2sy_1`,list:`_list_1q2sy_6`,row:`_row_1q2sy_11`,link:`_link_1q2sy_22`,dash:`_dash_1q2sy_32`,solid:`_solid_1q2sy_38`,icon:`_icon_1q2sy_44`,title:`_title_1q2sy_47`,done:`_done_1q2sy_53`,status:`_status_1q2sy_56`,project:`_project_1q2sy_62`,remove:`_remove_1q2sy_65`,error:`_error_1q2sy_85`},hv=[{key:`blockedBy`,label:`Blocked by`,add:`+ blocker`},{key:`blocks`,label:`Blocks`,add:`+ link`},{key:`relates`,label:`Related`,add:`+ related`}];function gv({item:e,workspaceId:t,statusLabel:n,projectName:r,blockerRequest:i,request:a,onOpen:o,onAdd:s,onRemove:c}){let[l,u]=(0,m.useState)(null),[d,f]=(0,m.useState)(null);(0,m.useEffect)(()=>{i>0&&u(`blockedBy`)},[i]),(0,m.useEffect)(()=>{a&&u(a.section)},[a]);let p=new Set([e.id,...e.links.blockedBy.map(e=>e.id),...e.links.blocks.map(e=>e.id),...e.links.relates.map(e=>e.id)]),g=async(e,t)=>{try{await s(e,t),u(null),f(null)}catch(t){let n=t instanceof pt&&t.code===`link_cycle`?`That would create a blocking cycle.`:String(t.message);f({section:e,message:n})}};return(0,h.jsx)(h.Fragment,{children:hv.filter(({key:t})=>e.links[t].length>0||l===t||d?.section===t).map(({key:i,label:a,add:s})=>(0,h.jsxs)(`section`,{className:mv.section,children:[(0,h.jsx)(`div`,{className:`label`,children:a}),(0,h.jsxs)(`div`,{className:mv.list,children:[e.links[i].map(t=>(0,h.jsxs)(`div`,{className:mv.row,children:[(0,h.jsxs)(`button`,{type:`button`,className:mv.link,onClick:()=>o(t.id),children:[i===`relates`?(0,h.jsx)(No,{size:14,strokeWidth:1.5,className:mv.icon}):(0,h.jsx)(`span`,{className:t.done?mv.solid:mv.dash}),(0,h.jsx)(`span`,{className:`${mv.title} ${t.done?mv.done:``}`,children:t.title}),(0,h.jsx)(`span`,{className:mv.status,children:n(t.status,t.projectId)}),t.projectId!==e.projectId&&(0,h.jsx)(`span`,{className:`mono ${mv.project}`,children:r(t.projectId)})]}),(0,h.jsx)(`button`,{type:`button`,className:mv.remove,"aria-label":`Remove link to ${t.title}`,onClick:()=>c(i,t),children:(0,h.jsx)($o,{size:14,strokeWidth:1.5})})]},t.id)),l===i?(0,h.jsx)(pv,{workspaceId:t,exclude:p,projectName:r,onPick:e=>void g(i,e),onClose:()=>u(null)}):(0,h.jsx)(`button`,{type:`button`,className:`add`,onClick:()=>u(i),children:s}),d?.section===i&&(0,h.jsx)(`div`,{className:mv.error,children:d.message})]})]},i))})}var _v={section:`_section_1xbne_1`,labelRow:`_labelRow_1xbne_6`,toggle:`_toggle_1xbne_11`,editor:`_editor_1xbne_32`,preview:`_preview_1xbne_56`};function vv({value:e,revision:t,onSave:n}){let[r,i]=(0,m.useState)(e.trim()?`preview`:`write`),a=(0,m.useRef)(null),o=()=>{i(`write`),requestAnimationFrame(()=>a.current?.focus())},[s,c]=(0,m.useState)(e),[l,u]=(0,m.useState)(null);return(0,m.useEffect)(()=>{l===null&&c(e)},[e,l]),(0,h.jsxs)(`section`,{className:_v.section,children:[(0,h.jsxs)(`div`,{className:_v.labelRow,children:[(0,h.jsx)(`div`,{className:`label`,children:`Details`}),(0,h.jsxs)(`div`,{className:_v.toggle,role:`tablist`,"aria-label":`Details mode`,children:[(0,h.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":r===`write`,onClick:()=>i(`write`),children:`Write`}),(0,h.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":r===`preview`,onClick:()=>i(`preview`),children:`Preview`})]})]}),r===`write`?(0,h.jsx)(`textarea`,{ref:a,className:_v.editor,"aria-label":`Details`,placeholder:`Add details…`,value:s,onFocus:()=>u(t),onChange:e=>c(e.target.value),onKeyDown:e=>{e.key===`Escape`&&e.currentTarget.blur()},onBlur:()=>{s!==e&&l!==null&&n(s,l),u(null)}}):(0,h.jsx)(`div`,{className:_v.preview,title:`Click to edit`,onClick:e=>{e.target.closest(`a`)||o()},children:e.trim()?(0,h.jsx)(cv,{source:e}):(0,h.jsx)(`span`,{className:`caption`,children:`Nothing written yet.`})})]})}var yv={section:`_section_1ekhx_1`,list:`_list_1ekhx_6`,row:`_row_1ekhx_11`,ref:`_ref_1ekhx_22`,target:`_target_1ekhx_35`,range:`_range_1ekhx_41`,refLabel:`_refLabel_1ekhx_49`,remove:`_remove_1ekhx_55`,form:`_form_1ekhx_80`,types:`_types_1ekhx_87`,targetInput:`_targetInput_1ekhx_107`,labelInput:`_labelInput_1ekhx_110`,error:`_error_1ekhx_113`},bv={file:Co,url:xo,commit:Do,pr:ko},xv=[`file`,`url`,`commit`,`pr`],Sv={file:`docs/plan.md or src/a.ts#L40-80`,url:`https://…`,commit:`sha`,pr:`123 or URL`};function Cv(e){return e.type===`url`||e.type===`pr`&&/^https?:/.test(e.target)?e.target:null}function wv(e){return e.type===`file`?tc(e.target).lines?`View ${e.target}`:`View file`:e.type===`commit`?e.commit?`${e.commit.author} · ${e.commit.sha}\n${e.commit.projectPath}\nClick to copy the sha`:e.commit===null?`${e.target} is in no repository of this workspace\nClick to copy the sha`:`Copy sha`:`Open link`}function Tv({value:e}){let{path:t,lines:n}=e.type===`file`?tc(e.target):{path:e.target,lines:null};return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`span`,{className:`mono ${yv.target}`,children:t}),n&&(0,h.jsx)(`span`,{className:`mono-sm ${yv.range}`,children:nc(n)})]})}function Ev({refs:e,projectId:t,onOpenFile:n,onAdd:r,onRemove:i,request:a}){let[o,s]=(0,m.useState)(!1),[c,l]=(0,m.useState)(`file`),[u,d]=(0,m.useState)(``),[f,p]=(0,m.useState)(``),[g,_]=(0,m.useState)(null);(0,m.useEffect)(()=>{a>0&&s(!0)},[a]);let v=async()=>{if(u.trim())try{await r({type:c,target:u.trim(),label:f.trim()||null}),d(``),p(``),_(null),s(!1)}catch(e){_(e instanceof pt?e.message:String(e))}},y=e=>{if(e.type===`file`)return n(e);let t=Cv(e);t?window.open(t,`_blank`,`noopener`):navigator.clipboard?.writeText(e.target)};return e.length===0&&!o?null:(0,h.jsxs)(`section`,{className:yv.section,children:[(0,h.jsx)(`div`,{className:`label`,children:`Refs`}),(0,h.jsxs)(`div`,{className:yv.list,children:[e.map(e=>{let n=bv[e.type];return(0,h.jsxs)(`div`,{className:yv.row,children:[(0,h.jsxs)(`button`,{type:`button`,className:yv.ref,onClick:()=>y(e),title:wv(e),children:[(0,h.jsx)(n,{size:14,strokeWidth:1.5}),e.type===`commit`&&e.commit!==void 0?(0,h.jsx)(Ys,{sha:e.target,commit:e.commit,projectId:t,label:e.label}):(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Tv,{value:e}),e.label&&(0,h.jsx)(`span`,{className:yv.refLabel,children:e.label})]})]}),(0,h.jsx)(`button`,{type:`button`,className:yv.remove,"aria-label":`Remove ref ${e.target}`,onClick:()=>i(e),children:(0,h.jsx)($o,{size:14,strokeWidth:1.5})})]},e.id)}),o?(0,h.jsxs)(`form`,{className:yv.form,onSubmit:e=>{e.preventDefault(),v()},onKeyDown:e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),s(!1))},children:[(0,h.jsx)(`div`,{className:yv.types,role:`radiogroup`,"aria-label":`Ref type`,children:xv.map(e=>(0,h.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":e===c,onClick:()=>l(e),children:e},e))}),(0,h.jsx)(`input`,{autoFocus:!0,className:`input mono ${yv.targetInput}`,"aria-label":`Target`,placeholder:Sv[c],value:u,onChange:e=>d(e.target.value)}),(0,h.jsx)(`input`,{className:`input ${yv.labelInput}`,"aria-label":`Label`,placeholder:`label`,value:f,onChange:e=>p(e.target.value)}),(0,h.jsx)(`button`,{type:`submit`,className:`btn`,children:`Add`}),g&&(0,h.jsx)(`div`,{className:yv.error,children:g})]}):(0,h.jsx)(`button`,{type:`button`,className:`add`,onClick:()=>s(!0),children:`+ ref`})]})]})}var Dv={section:`_section_105po_1`,tags:`_tags_105po_6`,tag:`_tag_105po_6`,dot:`_dot_105po_19`,remove:`_remove_105po_22`,input:`_input_105po_42`};function Ov({tags:e,onChange:t}){let[n,r]=(0,m.useState)(!1),[i,a]=(0,m.useState)(``),o=()=>{let n=i.split(`,`).map(e=>e.trim()).filter(t=>t&&!e.includes(t));n.length&&t([...e,...n]),a(``)};return(0,h.jsxs)(`section`,{className:Dv.section,children:[(0,h.jsx)(`div`,{className:`label`,children:`Tags`}),(0,h.jsxs)(`div`,{className:Dv.tags,children:[e.map((n,r)=>(0,h.jsxs)(`span`,{className:Dv.tag,children:[r>0&&(0,h.jsx)(`span`,{className:Dv.dot,children:`·`}),n,(0,h.jsx)(`button`,{type:`button`,className:Dv.remove,"aria-label":`Remove tag ${n}`,onClick:()=>t(e.filter(e=>e!==n)),children:(0,h.jsx)($o,{size:12,strokeWidth:1.5})})]},n)),n?(0,h.jsx)(`input`,{autoFocus:!0,className:`input ${Dv.input}`,"aria-label":`New tag`,placeholder:`tag`,value:i,onChange:e=>a(e.target.value),onBlur:()=>{o(),r(!1)},onKeyDown:n=>{n.key===`Enter`?(n.preventDefault(),o()):n.key===`Escape`?(n.preventDefault(),a(``),r(!1)):n.key===`Backspace`&&!i&&e.length&&t(e.slice(0,-1))}}):(0,h.jsx)(`button`,{type:`button`,className:`add`,onClick:()=>r(!0),children:`+ tag`})]})]})}var kv={title:`_title_xg5mw_1`};function Av({value:e,revision:t,onSave:n}){let[r,i]=(0,m.useState)(e),[a,o]=(0,m.useState)(null);return(0,m.useEffect)(()=>{a===null&&i(e)},[e,a]),(0,h.jsx)(`textarea`,{className:kv.title,"aria-label":`Title`,rows:1,value:r,onFocus:()=>o(t),onChange:e=>i(e.target.value.replace(/\n/g,` `)),onKeyDown:t=>{t.key===`Enter`?(t.preventDefault(),t.currentTarget.blur()):t.key===`Escape`&&(t.preventDefault(),i(e),o(null),requestAnimationFrame(()=>document.activeElement?.blur()))},onBlur:()=>{let t=r.trim();t&&t!==e&&a!==null?n(t,a):i(e),o(null)}})}function jv({itemId:e,workspaceId:t,projects:n,blockerRequest:r,leaving:i=!1,onOpen:a,onClose:o}){let s=zt(e),c=`${$s.drawer} ${i?$s.leaving:``}`;return i&&!s.data?null:s.error?(0,h.jsx)(`aside`,{className:c,"aria-label":`Item`,children:(0,h.jsx)(`div`,{className:$s.body,children:(0,h.jsxs)(`div`,{className:$s.top,children:[(0,h.jsx)(`p`,{className:`caption`,children:s.error instanceof pt&&s.error.status===404?`This item no longer exists.`:s.error.message}),(0,h.jsx)(`button`,{type:`button`,className:`btn btn-ghost`,"aria-label":`Close`,onClick:o,children:(0,h.jsx)($o,{size:16,strokeWidth:1.5})})]})})}):s.data?(0,h.jsx)(Mv,{item:s.data,workspaceId:t,projects:n,blockerRequest:r,className:c,leaving:i,onOpen:a,onClose:o},s.data.id):null}function Mv({item:e,workspaceId:t,projects:n,blockerRequest:r,className:i,leaving:a,onOpen:o,onClose:s}){let c=_(),l=It(e.projectId).data,u=Bt(e.id).data,d=Gt(),f=Wt(),[p,g]=(0,m.useState)(!1),[v,y]=(0,m.useState)(null),[b,x]=(0,m.useState)(null),[S,C]=(0,m.useState)(0),[w,T]=(0,m.useState)(0),[E,D]=(0,m.useState)(null),O=e=>{e instanceof pt&&e.code===`conflict`?g(!0):y(e instanceof Error?e.message:String(e))},k=(t,n=e.revision)=>d.mutate({id:e.id,projectId:e.projectId,...t,expectedRevision:n},{onError:O,onSuccess:()=>y(null)}),A=()=>{c.invalidateQueries({queryKey:I.item(e.id)}),c.invalidateQueries({queryKey:I.board(e.projectId)})},ee=async()=>{await c.refetchQueries({queryKey:I.item(e.id)}),g(!1),y(null),C(e=>e+1)},j=l?.statuses??[],M=l?.milestones??[],N=e=>n.find(t=>t.id===e)?.name??``,te=(t,n)=>(n===e.projectId?j.find(e=>e.key===t)?.label:void 0)??t.replace(/_/g,` `),ne=async(t,n)=>{t===`blockedBy`?await F.link(n.id,e.id,`blocks`):await F.link(e.id,n.id,t),A()},re=(t,n)=>{(t===`blockedBy`?F.unlink(n.id,e.id,`blocks`):F.unlink(e.id,n.id,t)).then(A,O)};return(0,h.jsxs)(`aside`,{className:i,"aria-label":`Item`,"aria-hidden":a||void 0,children:[p&&(0,h.jsxs)(`div`,{className:$s.bar,role:`alert`,children:[`Changed elsewhere. Reload to see the latest.`,(0,h.jsx)(`button`,{type:`button`,className:$s.barButton,onClick:()=>void ee(),children:`Reload`})]}),v&&!p&&(0,h.jsxs)(`div`,{className:$s.bar,role:`alert`,children:[v,(0,h.jsx)(`button`,{type:`button`,className:$s.barButton,onClick:()=>y(null),children:`Dismiss`})]}),(0,h.jsxs)(`div`,{className:$s.body,children:[(0,h.jsx)(vs,{value:e.key,className:$s.itemKey}),(0,h.jsxs)(`div`,{className:$s.top,children:[(0,h.jsx)(Av,{value:e.title,revision:e.revision,onSave:(e,t)=>k({title:e},t)}),(0,h.jsx)(`button`,{type:`button`,className:`btn btn-ghost`,"aria-label":`Close`,title:`Close (Esc)`,onClick:s,children:(0,h.jsx)($o,{size:16,strokeWidth:1.5})})]}),(0,h.jsx)(Fv,{statuses:j,status:e.status,onMove:t=>f.mutate({id:e.id,projectId:e.projectId,status:t,expectedRevision:e.revision},{onError:O})}),(0,h.jsxs)(`dl`,{className:$s.fields,children:[(0,h.jsx)(`dt`,{children:`Status`}),(0,h.jsx)(`dd`,{children:(0,h.jsx)(dv,{field:!0,label:`Status`,value:e.status,options:j.map(e=>({value:e.key,label:e.label,content:(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Cs,{kind:e.kind}),e.label]})})),onChange:t=>f.mutate({id:e.id,projectId:e.projectId,status:t,expectedRevision:e.revision},{onError:O})})}),(0,h.jsx)(`dt`,{children:`Milestone`}),(0,h.jsx)(`dd`,{children:(0,h.jsx)(dv,{field:!0,label:`Milestone`,value:e.milestone,options:[...M.map(e=>({value:e,label:e,content:(0,h.jsx)(Nv,{name:e})})),{value:null,label:`No milestone`,content:(0,h.jsx)(`span`,{className:$s.none,children:`No milestone`})}],onChange:e=>k({milestone:e}),onCreate:e=>k({milestone:e}),createPlaceholder:`Milestone`})}),(0,h.jsx)(`dt`,{children:`Priority`}),(0,h.jsx)(`dd`,{children:(0,h.jsx)(dv,{field:!0,label:`Priority`,value:e.priority,options:[3,2,1,0].map(e=>({value:e,label:rs[e],content:(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(ns,{priority:e}),rs[e]]})})),onChange:e=>k({priority:e})})})]}),(0,h.jsx)(Ov,{tags:e.tags,onChange:e=>k({tags:e})}),(0,h.jsx)(vv,{value:e.details??``,revision:e.revision,onSave:(e,t)=>k({details:e||null},t)}),(0,h.jsx)(Ev,{refs:e.refs,projectId:e.projectId,onOpenFile:x,onAdd:async t=>{await F.addRef(e.id,t),A()},onRemove:t=>F.removeRef(e.id,t.id).then(A,O),request:w}),(0,h.jsx)(Xs,{commits:u,projectId:e.projectId,onAttach:t=>F.addRef(e.id,{type:`commit`,target:t.sha}).then(A,O)}),(0,h.jsx)(gv,{item:e,workspaceId:t,statusLabel:te,projectName:N,blockerRequest:r,request:E,onOpen:o,onAdd:ne,onRemove:re}),(0,h.jsx)(Lv,{refs:e.refs.length===0,links:e.links,onRef:()=>T(e=>e+1),onLink:e=>D(t=>({section:e,n:(t?.n??0)+1}))})]},S),(0,h.jsxs)(`footer`,{className:$s.footer,children:[(0,h.jsx)(`span`,{className:`mono-sm ${$s.id}`,title:`Item id: put it in commit messages`,children:e.id}),(0,h.jsxs)(`span`,{className:`caption`,children:[`Created `,qs(e.createdAt,!1),` · updated `,qs(e.updatedAt,!0)]}),(0,h.jsx)(`span`,{className:$s.grow}),(0,h.jsx)(Qs,{label:`Delete item`,onConfirm:()=>F.deleteItem(e.id).then(()=>{s(),c.removeQueries({queryKey:I.item(e.id)}),c.invalidateQueries({queryKey:I.board(e.projectId)})},O)})]}),b&&(0,h.jsx)(lv,{itemId:e.id,fileRef:b,onClose:()=>x(null)})]})}function Nv({name:e}){return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(To,{size:13,strokeWidth:2,"aria-hidden":`true`,className:$s.flag}),e]})}var Pv=(e,...t)=>{for(let n of t){let t=e.find(e=>e.kind===n);if(t)return t}return null};function Fv({statuses:e,status:t,onMove:n}){let r=e.find(e=>e.key===t)?.kind;if(!r)return null;let i=Pv(e,`done`),a=Pv(e,`active`),o=Pv(e,`review`),s=Pv(e,`active`,`backlog`),c=(e,t,r,i=!1)=>e&&(0,h.jsxs)(`button`,{type:`button`,className:`btn ${i?$s.primary:``}`,title:`Move to ${e.label}`,onClick:()=>n(e.key),children:[r,t]}),l=(0,h.jsx)(co,{size:14,strokeWidth:2.5,"aria-hidden":`true`}),u=(0,h.jsx)(po,{size:14,strokeWidth:2.5,"aria-hidden":`true`});return(0,h.jsxs)(`div`,{className:$s.actions,children:[r===`backlog`&&c(a,`Start`,l,!0),r===`active`&&c(o,`Ready to check`,l,!0),r===`active`&&c(i,`Mark done`,u,!o),r===`review`&&c(s,`Send back`,(0,h.jsx)(Yo,{size:14,strokeWidth:2,"aria-hidden":`true`})),r===`review`&&c(i,`Mark done`,u,!0),r===`done`&&c(s,`Reopen`,(0,h.jsx)(Vo,{size:14,strokeWidth:2,"aria-hidden":`true`}))]})}var Iv=[{section:`blockedBy`,label:`blocker`},{section:`blocks`,label:`blocks`},{section:`relates`,label:`related`}];function Lv({refs:e,links:t,onRef:n,onLink:r}){let i=Iv.filter(({section:e})=>t[e].length===0);return!e&&i.length===0?null:(0,h.jsxs)(`div`,{className:$s.addRow,children:[(0,h.jsx)(`span`,{className:`label`,children:`Add`}),e&&(0,h.jsx)(`button`,{type:`button`,className:`add`,onClick:n,children:`+ ref`}),i.map(({section:e,label:t})=>(0,h.jsxs)(`button`,{type:`button`,className:`add`,onClick:()=>r(e),children:[`+ `,t]},e))]})}var Rv=4848;function zv(e){return e.port?Number(e.port):e.protocol===`https:`?443:80}function Bv(e=Rv){return`claude mcp add --scope user slate -- slate mcp${e===4848?``:` --port ${e}`}`}function Vv(e=Rv){return JSON.stringify({mcpServers:{slate:{command:`slate`,args:e===4848?[`mcp`]:[`mcp`,`--port`,String(e)]}}})}function Hv(e,t=zv(e)){return`${e.protocol}//${e.hostname}:${t}/mcp`}function Uv(e,t){return t?.port??zv(e)}var Wv={connect:`_connect_1wvid_1`,code:`_code_1wvid_7`,text:`_text_1wvid_17`,copy:`_copy_1wvid_25`,other:`_other_1wvid_32`,summary:`_summary_1wvid_35`,chevron:`_chevron_1wvid_49`,otherBody:`_otherBody_1wvid_59`};function Gv(e){let t=document.createRange();t.selectNodeContents(e);let n=window.getSelection();n?.removeAllRanges(),n?.addRange(t)}function Kv({text:e,label:t}){let n=(0,m.useRef)(null),[r,i]=(0,m.useState)(!1);(0,m.useEffect)(()=>{if(!r)return;let e=setTimeout(()=>i(!1),1500);return()=>clearTimeout(e)},[r]);let a=async()=>{try{await navigator.clipboard.writeText(e),i(!0)}catch{n.current&&Gv(n.current)}};return(0,h.jsxs)(`div`,{className:Wv.code,children:[(0,h.jsx)(`code`,{ref:n,className:`mono ${Wv.text}`,children:e}),(0,h.jsx)(`button`,{type:`button`,className:`btn ${Wv.copy}`,"aria-label":`Copy ${t}`,onClick:()=>void a(),children:r?`Copied`:`Copy`})]})}function qv(){let e=ot({queryKey:I.health,queryFn:F.health,staleTime:6e4}),t=Uv(window.location,e.data);return(0,h.jsxs)(`div`,{className:Wv.connect,children:[(0,h.jsx)(Kv,{text:Bv(t),label:`command`}),(0,h.jsxs)(`details`,{className:Wv.other,children:[(0,h.jsxs)(`summary`,{className:Wv.summary,children:[(0,h.jsx)(_o,{size:14,strokeWidth:1.5,className:Wv.chevron,"aria-hidden":!0}),`Other MCP clients`]}),(0,h.jsxs)(`div`,{className:Wv.otherBody,children:[(0,h.jsx)(`p`,{children:`Add slate to the client's MCP config:`}),(0,h.jsx)(Kv,{text:Vv(t),label:`config`}),(0,h.jsx)(`p`,{children:`Or connect over streamable HTTP:`}),(0,h.jsx)(Kv,{text:Hv(window.location,t),label:`URL`})]})]})]})}var Jv={firstRun:`_firstRun_685gq_1`,step:`_step_685gq_6`,heading:`_heading_685gq_17`,body:`_body_685gq_21`},X={settings:`_settings_1qv53_1`,section:`_section_1qv53_8`,sectionHead:`_sectionHead_1qv53_15`,heading:`_heading_1qv53_21`,segmented:`_segmented_1qv53_25`,revert:`_revert_1qv53_46`,stack:`_stack_1qv53_49`,inline:`_inline_1qv53_54`,rows:`_rows_1qv53_60`,wsRow:`_wsRow_1qv53_64`,candidate:`_candidate_1qv53_65`,wsName:`_wsName_1qv53_85`,path:`_path_1qv53_89`,dim:`_dim_1qv53_97`,registered:`_registered_1qv53_101`,form:`_form_1qv53_104`,lineInput:`_lineInput_1qv53_108`,nameInput:`_nameInput_1qv53_112`,pathInput:`_pathInput_1qv53_115`,error:`_error_1qv53_118`,facts:`_facts_1qv53_122`,statusDot:`_statusDot_1qv53_137`};function Yv({onCreated:e,bare:t=!1}){let n=_(),[r,i]=(0,m.useState)(``),[a,o]=(0,m.useState)(``),[s,c]=(0,m.useState)(null),l=async()=>{c(null);try{let t=await F.createWorkspace({name:r.trim(),rootPath:a.trim()});i(``),o(``),await n.invalidateQueries({predicate:e=>[`workspaces`,`projects`,`board`].includes(String(e.queryKey[0]))}),e(t.id)}catch(e){c(e instanceof pt?e.message:String(e))}};return(0,h.jsxs)(`form`,{className:X.form,onSubmit:e=>{e.preventDefault(),l()},children:[!t&&(0,h.jsx)(`div`,{className:`label`,children:`New workspace`}),(0,h.jsxs)(`div`,{className:X.inline,children:[(0,h.jsx)(`input`,{className:`input ${X.nameInput}`,"aria-label":`Workspace name`,placeholder:`Name`,value:r,onChange:e=>i(e.target.value)}),(0,h.jsx)(`input`,{className:`input mono ${X.pathInput}`,"aria-label":`Root directory`,placeholder:`~/Projects/personal`,value:a,onChange:e=>o(e.target.value)}),(0,h.jsx)(`button`,{type:`submit`,className:`btn`,disabled:!r.trim()||!a.trim(),children:`Create workspace`})]}),s&&(0,h.jsx)(`p`,{className:X.error,children:s})]})}function Xv({onCreated:e}){return(0,h.jsxs)(`div`,{className:Jv.firstRun,children:[(0,h.jsxs)(`section`,{className:Jv.step,"aria-labelledby":`first-run-workspace`,children:[(0,h.jsx)(`div`,{className:`label`,children:`Step 1`}),(0,h.jsx)(`h2`,{id:`first-run-workspace`,className:Jv.heading,children:`Create a workspace`}),(0,h.jsx)(`p`,{className:Jv.body,children:`A workspace is a directory that holds your repositories. Scan it in settings to add them as projects.`}),(0,h.jsx)(Yv,{bare:!0,onCreated:e})]}),(0,h.jsxs)(`section`,{className:Jv.step,"aria-labelledby":`first-run-agent`,children:[(0,h.jsx)(`div`,{className:`label`,children:`Step 2`}),(0,h.jsx)(`h2`,{id:`first-run-agent`,className:Jv.heading,children:`Connect an agent`}),(0,h.jsx)(`p`,{className:Jv.body,children:`Register slate with Claude Code at user scope, so agents can read and move items from any project.`}),(0,h.jsx)(qv,{})]})]})}var Zv={header:`_header_1qlpi_1`,mark:`_mark_1qlpi_10`,sep:`_sep_1qlpi_22`,project:`_project_1qlpi_25`,here:`_here_1qlpi_34`,segmented:`_segmented_1qlpi_39`,grow:`_grow_1qlpi_60`,palette:`_palette_1qlpi_63`};function Qv({size:e=24}){return(0,h.jsxs)(`svg`,{width:e,height:e,viewBox:`0 0 32 32`,"aria-hidden":`true`,children:[(0,h.jsx)(`rect`,{width:`32`,height:`32`,rx:`8`,fill:`#2453c9`}),(0,h.jsx)(`path`,{d:`M9 23 23 9`,stroke:`#fff`,strokeWidth:`2.5`,strokeLinecap:`round`}),(0,h.jsx)(`circle`,{cx:`9`,cy:`23`,r:`3.25`,fill:`#fff`}),(0,h.jsx)(`circle`,{cx:`16`,cy:`16`,r:`3.25`,fill:`#fff`}),(0,h.jsx)(`circle`,{cx:`23`,cy:`9`,r:`3.25`,fill:`#2453c9`,stroke:`#ee8420`,strokeWidth:`2.5`})]})}var $v={root:`_root_y0mwz_1`,field:`_field_y0mwz_4`,input:`_input_y0mwz_22`,title:`_title_y0mwz_34`,project:`_project_y0mwz_40`,empty:`_empty_y0mwz_43`};function ey({workspaceId:e,projects:t,onOpen:n}){let[r,i]=(0,m.useState)(``),[a,o]=(0,m.useState)(!1),[s,c]=(0,m.useState)(0),l=(0,m.useRef)(null),u=(0,m.useRef)(null),d=Ht(e,r).data??[],f=a&&r.trim().length>0;Hs(u,f,()=>o(!1)),St(e=>{if(e.key!==`/`)return!1;l.current?.focus()});let p=e=>{e&&(i(``),o(!1),l.current?.blur(),n(e))},g=e=>t.find(t=>t.id===e)?.name??``;return(0,h.jsxs)(`div`,{ref:u,className:$v.root,children:[(0,h.jsxs)(`label`,{className:$v.field,children:[(0,h.jsx)(Uo,{size:14,strokeWidth:1.5}),(0,h.jsx)(`span`,{className:`visually-hidden`,children:`Search items`}),(0,h.jsx)(`input`,{ref:l,className:$v.input,placeholder:`Search`,value:r,onChange:e=>{i(e.target.value),c(0),o(!0)},onFocus:()=>o(!0),onKeyDown:e=>{if(e.key===`ArrowDown`)c(e=>Math.min(e+1,d.length-1));else if(e.key===`ArrowUp`)c(e=>Math.max(e-1,0));else if(e.key===`Enter`)p(d[s]);else if(e.key===`Escape`)i(``),l.current?.blur();else return;e.preventDefault()}}),!r&&(0,h.jsx)(`kbd`,{children:`/`})]}),f&&(0,h.jsxs)(Us,{align:`end`,wide:!0,children:[d.length===0&&(0,h.jsx)(`div`,{className:`caption ${$v.empty}`,children:`No matching items.`}),d.map((e,t)=>(0,h.jsxs)(Ws,{active:t===s,onHover:()=>c(t),onSelect:()=>p(e),children:[(0,h.jsx)(`span`,{className:$v.title,children:e.title}),(0,h.jsx)(`span`,{className:`mono ${$v.project}`,children:g(e.projectId)})]},e.id))]})]})}var ty={root:`_root_1bh7p_1`,trigger:`_trigger_1bh7p_5`,name:`_name_1bh7p_21`,itemName:`_itemName_1bh7p_26`,count:`_count_1bh7p_29`,check:`_check_1bh7p_32`,rule:`_rule_1bh7p_37`,manage:`_manage_1bh7p_42`};function ny({workspaces:e,currentId:t,onSelect:n,onManage:r}){let[i,a]=(0,m.useState)(!1),o=(0,m.useRef)(null),s=()=>a(!1);Hs(o,i,s);let c=e.find(e=>e.id===t);return(0,h.jsxs)(`div`,{ref:o,className:ty.root,children:[(0,h.jsxs)(`button`,{type:`button`,className:ty.trigger,"aria-haspopup":`listbox`,"aria-expanded":i,onClick:()=>a(!i),children:[(0,h.jsx)(`span`,{className:ty.name,children:c?.name??`No workspace`}),(0,h.jsx)(ho,{size:12,strokeWidth:1.5})]}),i&&(0,h.jsxs)(Us,{children:[(0,h.jsx)(`div`,{role:`listbox`,"aria-label":`Workspaces`,children:e.map(e=>(0,h.jsxs)(Ws,{selected:e.id===t,onSelect:()=>{s(),n(e.id)},children:[(0,h.jsx)(`span`,{className:ty.itemName,children:e.name}),(0,h.jsx)(`span`,{className:`mono ${ty.count}`,children:e.projectCount}),(0,h.jsx)(`span`,{className:ty.check,children:e.id===t&&(0,h.jsx)(po,{size:14,strokeWidth:1.5})})]},e.id))}),(0,h.jsx)(`div`,{className:ty.rule}),(0,h.jsx)(Ws,{onSelect:()=>{s(),r()},children:(0,h.jsx)(`span`,{className:ty.manage,children:`Manage workspaces`})})]})]})}var ry=[{id:`overview`,label:`Overview`},{id:`board`,label:`Board`},{id:`roadmap`,label:`Roadmap`},{id:`workspace`,label:`Workspace`}],iy=(e,t)=>e.toLowerCase()===t?.toLowerCase(),ay=/Mac|iPhone|iPad/.test(navigator.platform)?`⌘`:`Ctrl `;function oy({home:e,onHome:t,workspaces:n,workspaceId:r,project:i,projects:a,solo:o,view:s,onView:c,onWorkspace:l,onOpenItem:u,onPalette:d}){let f=Qt();return(0,h.jsxs)(`header`,{className:Zv.header,children:[(0,h.jsx)(`a`,{href:location.pathname,className:Zv.mark,"aria-label":`Home`,"aria-current":e?`page`:void 0,title:`Home (g h)`,onClick:e=>{e.metaKey||e.ctrlKey||e.shiftKey||e.button!==0||(e.preventDefault(),t())},children:(0,h.jsx)(Qv,{})}),e?(0,h.jsx)(`span`,{className:Zv.here,children:`Home`}):(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(ny,{workspaces:n,currentId:r,onSelect:l,onManage:()=>c(`settings`)}),i&&!(o&&iy(i.name,n.find(e=>e.id===r)?.name))&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`span`,{className:Zv.sep,children:`/`}),(0,h.jsx)(`span`,{className:Zv.project,children:i.name})]}),(0,h.jsx)(`div`,{className:Zv.segmented,role:`tablist`,"aria-label":`View`,children:ry.filter(e=>!(o&&e.id===`workspace`)).map(e=>(0,h.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":s===e.id,onClick:()=>c(e.id),children:e.label},e.id))})]}),(0,h.jsx)(`div`,{className:Zv.grow}),(0,h.jsx)(ey,{workspaceId:r,projects:a,onOpen:u}),(0,h.jsx)(`button`,{type:`button`,className:`btn btn-ghost ${Zv.palette}`,"aria-label":`Command palette`,title:`Command palette`,onClick:d,children:(0,h.jsxs)(`kbd`,{children:[ay,`K`]})}),(0,h.jsx)(`button`,{type:`button`,className:`btn btn-ghost`,"aria-label":`Toggle theme`,title:`Toggle theme`,onClick:f.toggle,children:f.dark?(0,h.jsx)(Lo,{size:16,strokeWidth:1.5}):(0,h.jsx)(qo,{size:16,strokeWidth:1.5})}),(0,h.jsx)(`button`,{type:`button`,className:`btn btn-ghost`,"aria-label":`Settings`,title:`Settings`,"aria-pressed":s===`settings`,onClick:()=>c(`settings`),children:(0,h.jsx)(Go,{size:16,strokeWidth:1.5})})]})}var Z={home:`_home_1ko9f_1`,title:`_title_1ko9f_10`,lede:`_lede_1ko9f_15`,waiting:`_waiting_1ko9f_21`,waitRow:`_waitRow_1ko9f_35`,waitName:`_waitName_1ko9f_47`,waitCounts:`_waitCounts_1ko9f_55`,chevron:`_chevron_1ko9f_61`,workspace:`_workspace_1ko9f_66`,count:`_count_1ko9f_72`,blocked:`_blocked_1ko9f_84`,blockedDot:`_blockedDot_1ko9f_88`,projects:`_projects_1ko9f_97`,grid:`_grid_1ko9f_104`,card:`_card_1ko9f_109`,cardHead:`_cardHead_1ko9f_124`,cardName:`_cardName_1ko9f_129`,description:`_description_1ko9f_136`,progress:`_progress_1ko9f_144`,ratio:`_ratio_1ko9f_148`,counts:`_counts_1ko9f_153`,next:`_next_1ko9f_158`,nextLabel:`_nextLabel_1ko9f_168`,empty:`_empty_1ko9f_174`,note:`_note_1ko9f_175`,link:`_link_1ko9f_181`,leftovers:`_leftovers_1ko9f_190`};function sy({overview:e,onProject:t,onWorkspace:n}){let r=us(e),i=e.workspaces.map(ls),a=i.flatMap(e=>e.lines).sort(ss),o=i.flatMap(e=>e.empty),s=i.reduce((e,t)=>e+t.archived,0),c=i.filter(e=>e.workspace.projects.length===0);return(0,h.jsxs)(`div`,{className:Z.home,children:[(0,h.jsxs)(`section`,{className:Z.needs,"aria-labelledby":`needs-h`,children:[(0,h.jsx)(`h2`,{id:`needs-h`,className:Z.title,children:`Needs you`}),(0,h.jsx)(`p`,{className:Z.lede,children:fs(r)}),r.length>0&&(0,h.jsx)(`ul`,{className:Z.waiting,children:r.map(e=>(0,h.jsx)(`li`,{children:(0,h.jsxs)(`button`,{type:`button`,className:Z.waitRow,"data-needs-project":e.project.id,onClick:()=>t(e.project.id),children:[(0,h.jsxs)(`span`,{className:Z.waitName,children:[e.project.name,cy(e)&&(0,h.jsx)(`span`,{className:Z.workspace,children:e.workspace.name})]}),(0,h.jsxs)(`span`,{className:Z.waitCounts,children:[e.toTest>0&&(0,h.jsx)(ly,{kind:`review`,n:e.toTest,words:`to check`}),e.blocked>0&&(0,h.jsx)(ly,{kind:`blocked`,n:e.blocked,words:`blocked`})]}),(0,h.jsx)(_o,{size:16,strokeWidth:2,className:Z.chevron,"aria-hidden":`true`})]})},e.project.id))})]}),(0,h.jsxs)(`section`,{className:Z.projects,"aria-labelledby":`projects-h`,children:[(0,h.jsx)(`h2`,{id:`projects-h`,className:Z.title,children:`Projects`}),a.length>0&&(0,h.jsx)(`div`,{className:Z.grid,children:a.map(e=>(0,h.jsx)(uy,{line:e,onOpen:()=>t(e.project.id)},e.project.id))}),(0,h.jsxs)(`div`,{className:Z.leftovers,children:[(0,h.jsx)(dy,{lines:o,onProject:t}),c.map(e=>(0,h.jsxs)(`p`,{className:Z.note,children:[(0,h.jsx)(`button`,{type:`button`,className:Z.link,onClick:()=>n(e.workspace.id),children:e.workspace.name}),` `,`has no projects. Scan it in settings.`]},e.workspace.id)),s>0&&(0,h.jsxs)(`p`,{className:Z.note,children:[s===1?`1 archived project`:`${s} archived projects`,` not shown.`]})]})]})]})}var cy=e=>!e.project.name.toLowerCase().includes(e.workspace.name.toLowerCase());function ly({kind:e,n:t,words:n}){return(0,h.jsxs)(`span`,{className:`${Z.count} ${e===`blocked`?Z.blocked:``}`,children:[e===`blocked`?(0,h.jsx)(`span`,{className:Z.blockedDot,"aria-hidden":`true`}):(0,h.jsx)(Cs,{kind:e}),(0,h.jsx)(`strong`,{children:t}),` `,n]})}function uy({line:e,onOpen:t}){let{project:n,inMotion:r,toTest:i,blocked:a,done:o,total:s}=e,c=o===s;return(0,h.jsxs)(`button`,{type:`button`,className:Z.card,"data-project-id":n.id,title:n.path,onClick:t,children:[(0,h.jsxs)(`span`,{className:Z.cardHead,children:[(0,h.jsx)(`span`,{className:Z.cardName,children:n.name}),cy(e)&&(0,h.jsx)(`span`,{className:Z.workspace,children:e.workspace.name})]}),n.description&&(0,h.jsx)(`span`,{className:Z.description,children:n.description}),(0,h.jsxs)(`span`,{className:Z.progress,children:[(0,h.jsx)(Ss,{counts:n.counts,total:s}),(0,h.jsxs)(`span`,{className:Z.ratio,children:[c?`All ${s} done`:`${o} of ${s} done`,(0,h.jsxs)(`span`,{title:new Date(n.lastActivity).toLocaleString(),children:[` · updated `,cs(n.lastActivity)]})]})]}),(r>0||i>0||a>0)&&(0,h.jsxs)(`span`,{className:Z.counts,children:[r>0&&(0,h.jsx)(ly,{kind:`active`,n:r,words:`doing now`}),i>0&&(0,h.jsx)(ly,{kind:`review`,n:i,words:`to check`}),a>0&&(0,h.jsx)(ly,{kind:`blocked`,n:a,words:`blocked`})]}),n.next&&(0,h.jsxs)(`span`,{className:Z.next,title:`Next: ${n.next.title}`,children:[(0,h.jsx)(`span`,{className:Z.nextLabel,children:`Next`}),` `,n.next.title]})]})}function dy({lines:e,onProject:t}){return e.length===0?null:(0,h.jsxs)(`p`,{className:Z.empty,children:[(0,h.jsxs)(`span`,{children:[e.length===1?`1 project`:`${e.length} projects`,` with no items yet:`]}),` `,e.map((n,r)=>(0,h.jsxs)(`span`,{children:[(0,h.jsx)(`button`,{type:`button`,className:Z.link,"data-project-id":n.project.id,title:n.project.path,onClick:()=>t(n.project.id),children:n.project.name}),cy(n)&&(0,h.jsxs)(`span`,{className:Z.workspace,children:[` (`,n.workspace.name,`)`]}),r<e.length-1?`, `:``]},n.project.id))]})}var fy=()=>({backlog:0,active:0,review:0,done:0}),py={review:0,active:1,backlog:2,done:3};function my(e){let t=e.columns.flatMap(e=>e.items.map(t=>({item:t,column:e}))),n=e.project.milestones,r=[...n,...new Set(t.map(e=>e.item.milestone).filter(e=>!!e&&!n.includes(e))),null].map(e=>{let n=t.filter(t=>t.item.milestone===e),r=fy();for(let e of n)r[e.column.kind]++;let i=n.filter(e=>e.column.kind!==`done`).sort((e,t)=>py[e.column.kind]-py[t.column.kind]||e.column.position-t.column.position).map(e=>e.item);return{name:e,total:n.length,counts:r,open:i}}).filter(e=>e.total>0||e.name!==null&&n.includes(e.name)),i=fy();for(let e of r)for(let t of Object.keys(i))i[t]+=e.counts[t];let a=r.filter(e=>e.name!==null&&e.open.length>0);return{total:t.length,counts:i,blocked:t.filter(e=>e.column.kind!==`done`&&e.item.blocked).length,milestones:r,current:a[0]??null,following:a[1]??null}}var hy=(e,t)=>t===0?0:Math.round(e/t*100);function gy(e,t){return e.columns.filter(e=>e.kind===t).flatMap(e=>e.items.map(t=>({item:t,column:e})))}var _y=(e,t)=>e.columns.find(e=>e.kind===t)??null,Q={overview:`_overview_1mblm_1`,top:`_top_1mblm_7`,headline:`_headline_1mblm_12`,title:`_title_1mblm_18`,summary:`_summary_1mblm_22`,body:`_body_1mblm_31`,main:`_main_1mblm_37`,section:`_section_1mblm_42`,count:`_count_1mblm_50`,lede:`_lede_1mblm_54`,list:`_list_1mblm_59`,row:`_row_1mblm_71`,open:`_open_1mblm_80`,itemTitle:`_itemTitle_1mblm_87`,meta:`_meta_1mblm_95`,tags:`_tags_1mblm_102`,lock:`_lock_1mblm_106`,actions:`_actions_1mblm_113`,done:`_done_1mblm_118`,status:`_status_1mblm_126`,aside:`_aside_1mblm_140`,panel:`_panel_1mblm_145`,panelTitle:`_panelTitle_1mblm_153`,stats:`_stats_1mblm_157`,blocked:`_blocked_1mblm_172`,isBlocked:`_isBlocked_1mblm_183`,thenTitle:`_thenTitle_1mblm_188`,then:`_then_1mblm_188`,more:`_more_1mblm_209`,commits:`_commits_1mblm_220`,commitSubject:`_commitSubject_1mblm_232`,subjectText:`_subjectText_1mblm_241`,commitMeta:`_commitMeta_1mblm_250`,commitItem:`_commitItem_1mblm_255`,wide:`_wide_1mblm_291`,column:`_column_1mblm_296`},vy={ribbon:`_ribbon_13wbf_2`,compact:`_compact_13wbf_27`,foldedItem:`_foldedItem_13wbf_27`,folded:`_folded_13wbf_27`,name:`_name_13wbf_31`,segment:`_segment_13wbf_35`,text:`_text_13wbf_58`,check:`_check_13wbf_63`,here:`_here_13wbf_66`,meta:`_meta_13wbf_74`,fraction:`_fraction_13wbf_81`};function yy({milestones:e,current:t,onSelect:n,compact:r=!1}){let i=(0,m.useRef)(null);if((0,m.useEffect)(()=>{let e=i.current,t=e?.querySelector(`[aria-current]`)?.parentElement;e&&t&&e.scrollWidth>e.clientWidth&&(e.scrollLeft=t.offsetLeft-e.offsetLeft-16)},[t?.name]),e.length===0)return null;let a=t?e.indexOf(t):-1,o=a>=2&&e.slice(0,a).every(e=>e.total>0&&e.open.length===0)?e.slice(0,a):[],s=e.slice(o.length);return(0,h.jsxs)(`ol`,{ref:i,className:`${vy.ribbon} ${r?vy.compact:``}`,"aria-label":`Milestones`,children:[o.length>0&&(0,h.jsx)(`li`,{className:vy.foldedItem,children:(0,h.jsxs)(`button`,{type:`button`,className:`${vy.segment} ${vy.folded}`,title:`Finished: ${o.map(e=>e.name??`No milestone`).join(`, `)}`,onClick:()=>n(o[0].name),children:[(0,h.jsxs)(`span`,{className:vy.name,children:[(0,h.jsx)(po,{size:r?14:16,strokeWidth:2.5,className:vy.check,"aria-hidden":`true`}),(0,h.jsxs)(`span`,{className:vy.text,children:[o.length,` finished`]})]}),!r&&(0,h.jsx)(`span`,{className:vy.meta,children:o.map(e=>e.name).join(`, `)}),(0,h.jsx)(Ss,{counts:{backlog:0,active:0,review:0,done:1},total:1})]})}),s.map(e=>{let i=e===t,a=e.total>0&&e.open.length===0,o=e.name??`No milestone`;return(0,h.jsx)(`li`,{children:(0,h.jsxs)(`button`,{type:`button`,className:vy.segment,"aria-current":i?`step`:void 0,title:r?`${o}: ${e.counts.done} of ${e.total} done${i?`. You are here`:``}`:void 0,onClick:()=>n(e.name),children:[(0,h.jsxs)(`span`,{className:vy.name,children:[a&&(0,h.jsx)(po,{size:r?14:16,strokeWidth:2.5,className:vy.check,"aria-label":`Finished`}),(0,h.jsx)(`span`,{className:vy.text,children:o}),r?e.total>0&&!a&&(0,h.jsx)(`span`,{className:vy.fraction,children:`${e.counts.done}/${e.total}`}):i&&(0,h.jsx)(`span`,{className:vy.here,children:`You are here`})]}),!r&&(0,h.jsx)(`span`,{className:vy.meta,children:e.total===0?`No items`:a?`All ${e.total} done`:`${e.counts.done} of ${e.total} done · ${e.open.length} left`}),(0,h.jsx)(Ss,{counts:e.counts,total:e.total})]})},e.name??``)})]})}var by=(e,t,n=`${t}s`)=>`${e===1?`one`:e} ${e===1?t:n}`;function xy({board:e,onOpen:t,onMilestone:n}){let r=Wt(),i=my(e),a=e.project.id,o=_y(e,`done`),s=_y(e,`active`)??_y(e,`backlog`),c=gy(e,`active`),l=gy(e,`review`),u=new Map(e.columns.flatMap(e=>e.items.map(t=>[t.id,e]))),d=e=>u.get(e)??null,f=new Map(e.columns.flatMap(e=>e.items.map(e=>[e.id,e.title]))),p=i.current??i.milestones.find(e=>e.name===null&&e.open.length>0)??null;return(0,h.jsxs)(`div`,{className:Q.overview,children:[(0,h.jsxs)(`section`,{className:Q.top,"aria-labelledby":`overview-title`,children:[(0,h.jsxs)(`div`,{className:Q.headline,children:[(0,h.jsx)(`h1`,{id:`overview-title`,className:Q.title,children:e.project.name}),(0,h.jsxs)(`p`,{className:Q.summary,children:[(0,h.jsxs)(`strong`,{children:[i.counts.done,` of `,i.total,` done`]}),` `,`(`,hy(i.counts.done,i.total),`%).`,i.current&&(0,h.jsxs)(h.Fragment,{children:[` `,`You're on `,(0,h.jsx)(`strong`,{children:i.current.name}),i.current.open.length===1?`, one item away from finishing it.`:`, ${i.current.open.length} items left.`]}),i.total>0&&c.length===0&&` Nothing is in progress right now.`]}),(0,h.jsx)(ws,{})]}),(0,h.jsx)(yy,{milestones:i.milestones,current:i.current,onSelect:n})]}),i.total===0?(0,h.jsx)(`p`,{className:`caption`,children:`No items yet. Press n on the board to add one.`}):(0,h.jsxs)(`div`,{className:Q.body,children:[(0,h.jsxs)(`div`,{className:Q.main,children:[c.length>0&&(0,h.jsxs)(`section`,{"aria-labelledby":`doing-h`,children:[(0,h.jsxs)(`h2`,{id:`doing-h`,className:Q.section,children:[(0,h.jsx)(Cs,{kind:`active`}),`Doing now `,(0,h.jsx)(`span`,{className:Q.count,children:c.length})]}),(0,h.jsx)(`ul`,{className:Q.list,children:c.map(({item:e,column:n})=>(0,h.jsx)(`li`,{children:(0,h.jsx)(Sy,{item:e,onOpen:t,children:new Set(c.map(e=>e.column.key)).size>1&&(0,h.jsx)(Cy,{column:n})})},e.id))})]}),(0,h.jsxs)(`section`,{"aria-labelledby":`check-h`,children:[(0,h.jsxs)(`h2`,{id:`check-h`,className:Q.section,children:[(0,h.jsx)(Cs,{kind:`review`}),`Ready for you to check `,(0,h.jsx)(`span`,{className:Q.count,children:l.length})]}),l.length===0?(0,h.jsx)(`p`,{className:`caption`,children:`Nothing waiting for you.`}):(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`p`,{className:Q.lede,children:`Built and waiting. Try each one, then mark it done or send it back.`}),(0,h.jsx)(`ul`,{className:Q.list,children:l.map(({item:e})=>(0,h.jsx)(`li`,{children:(0,h.jsxs)(Sy,{item:e,onOpen:t,children:[s&&(0,h.jsxs)(`button`,{type:`button`,className:`btn`,title:`Send back to ${s.label}`,onClick:()=>r.mutate({id:e.id,projectId:a,status:s.key,position:`top`}),children:[(0,h.jsx)(yo,{size:14,strokeWidth:2,"aria-hidden":`true`}),(0,h.jsx)(`span`,{className:Q.wide,children:`Send back`})]}),o&&(0,h.jsxs)(`button`,{type:`button`,className:`btn ${Q.done}`,onClick:()=>r.mutate({id:e.id,projectId:a,status:o.key,position:`top`}),children:[(0,h.jsx)(po,{size:14,strokeWidth:2.5,"aria-hidden":`true`}),`Mark done`]})]})},e.id))})]})]}),p&&(0,h.jsx)(wy,{milestone:p,kindOf:d,onOpen:t,onMore:()=>n(p.name)})]}),(0,h.jsxs)(`aside`,{className:Q.aside,"aria-label":`Progress`,children:[(0,h.jsxs)(`section`,{className:Q.panel,"aria-labelledby":`stands-h`,children:[(0,h.jsx)(`h2`,{id:`stands-h`,className:Q.panelTitle,children:`Where everything stands`}),(0,h.jsx)(Ss,{counts:i.counts,total:i.total,thick:!0}),(0,h.jsx)(`dl`,{className:Q.stats,children:[[`Done`,i.counts.done],[`Doing now`,i.counts.active],[`Ready to check`,i.counts.review],[`Not started`,i.counts.backlog]].map(([e,t])=>(0,h.jsxs)(`div`,{children:[(0,h.jsx)(`dt`,{children:e}),(0,h.jsx)(`dd`,{children:t})]},e))}),(0,h.jsxs)(`p`,{className:`${Q.blocked} ${i.blocked?Q.isBlocked:``}`,children:[i.blocked?(0,h.jsx)(Fo,{size:14,strokeWidth:2,"aria-hidden":`true`}):(0,h.jsx)(po,{size:14,strokeWidth:2.5,"aria-hidden":`true`}),i.blocked?`${by(i.blocked,`item`)} blocked.`:`Nothing is blocked.`]})]}),(0,h.jsx)(Ty,{projectId:a,titleOf:e=>f.get(e),onOpen:t}),i.following&&(0,h.jsxs)(`section`,{"aria-labelledby":`then-h`,children:[(0,h.jsxs)(`h2`,{id:`then-h`,className:Q.thenTitle,children:[`Then, in `,i.following.name]}),(0,h.jsx)(`ul`,{className:Q.then,children:i.following.open.slice(0,5).map(e=>(0,h.jsx)(`li`,{children:(0,h.jsx)(`button`,{type:`button`,onClick:()=>t(e.id),children:e.title})},e.id))}),i.following.open.length>5&&(0,h.jsxs)(`button`,{type:`button`,className:Q.more,onClick:()=>n(i.following.name),children:[i.following.open.length-5,` more on the roadmap`]})]})]})]})]})}function Sy({item:e,onOpen:t,showMilestone:n=!0,children:r}){return(0,h.jsxs)(`div`,{className:Q.row,children:[(0,h.jsxs)(`button`,{type:`button`,className:Q.open,onClick:()=>t(e.id),children:[(0,h.jsx)(`span`,{className:Q.itemTitle,children:e.title}),(0,h.jsxs)(`span`,{className:Q.meta,children:[n&&e.milestone&&(0,h.jsx)(Ts,{name:e.milestone}),(0,h.jsx)(ns,{priority:e.priority}),e.blocked&&(0,h.jsxs)(`span`,{className:Q.lock,children:[(0,h.jsx)(Fo,{size:13,strokeWidth:2,"aria-hidden":`true`}),`Blocked`]}),e.tags.length>0&&(0,h.jsx)(`span`,{className:Q.tags,children:e.tags.join(`, `)})]})]}),(0,h.jsx)(`span`,{className:Q.actions,children:r})]})}function Cy({column:e}){return(0,h.jsxs)(`span`,{className:Q.status,children:[(0,h.jsx)(co,{size:14,strokeWidth:2.5,"aria-hidden":`true`}),e.label]})}function wy({milestone:e,kindOf:t,onOpen:n,onMore:r}){let i=e.open.filter(e=>t(e.id)?.kind===`backlog`);return i.length===0?null:(0,h.jsxs)(`section`,{"aria-labelledby":`next-h`,children:[(0,h.jsxs)(`h2`,{id:`next-h`,className:Q.section,children:[(0,h.jsx)(Cs,{kind:`backlog`}),e.name?`Up next in ${e.name}`:`Up next`,` `,(0,h.jsx)(`span`,{className:Q.count,children:i.length})]}),(0,h.jsx)(`ul`,{className:Q.list,children:i.slice(0,5).map(e=>(0,h.jsx)(`li`,{children:(0,h.jsx)(Sy,{item:e,onOpen:n,showMilestone:!1,children:(0,h.jsx)(`span`,{className:Q.column,children:t(e.id)?.label})})},e.id))}),i.length>5&&(0,h.jsxs)(`button`,{type:`button`,className:Q.more,onClick:r,children:[i.length-5,` more on the roadmap`]})]})}function Ty({projectId:e,titleOf:t,onOpen:n}){let r=Vt(e).data?.recent??[];return r.length===0?null:(0,h.jsxs)(`section`,{"aria-labelledby":`commits-h`,children:[(0,h.jsx)(`h2`,{id:`commits-h`,className:Q.thenTitle,children:`Recent commits`}),(0,h.jsx)(`ul`,{className:Q.commits,children:r.map(r=>(0,h.jsxs)(`li`,{title:`${r.author} · ${r.sha}`,children:[(0,h.jsxs)(`span`,{className:Q.commitSubject,children:[(0,h.jsx)(Do,{size:14,strokeWidth:1.75,"aria-hidden":`true`}),(0,h.jsx)(`span`,{className:Q.subjectText,children:r.subject})]}),(0,h.jsxs)(`span`,{className:Q.commitMeta,children:[(0,h.jsx)(`span`,{className:`mono-sm`,children:r.shortSha}),` · `,cs(r.date),r.projectId!==e&&` · ${r.projectName}`]}),r.itemIds.map(e=>{let r=t(e);return r&&(0,h.jsx)(`button`,{type:`button`,className:Q.commitItem,onClick:()=>n(e),children:r},e)})]},r.sha))})]})}var Ey={strip:`_strip_1oc3s_1`,summary:`_summary_1oc3s_10`,ribbon:`_ribbon_1oc3s_23`};function Dy({board:e,onMilestone:t}){let n=my(e);return(0,h.jsxs)(`div`,{className:Ey.strip,children:[(0,h.jsxs)(`p`,{className:Ey.summary,children:[(0,h.jsx)(`strong`,{children:e.project.name}),(0,h.jsxs)(`span`,{children:[n.counts.done,` of `,n.total,` done`]})]}),n.milestones.length>0&&(0,h.jsx)(`div`,{className:Ey.ribbon,children:(0,h.jsx)(yy,{milestones:n.milestones,current:n.current,onSelect:t,compact:!0})})]})}var $={layout:`_layout_iwxkt_1`,main:`_main_iwxkt_9`,intro:`_intro_iwxkt_14`,title:`_title_iwxkt_18`,lede:`_lede_iwxkt_22`,path:`_path_iwxkt_26`,step:`_step_iwxkt_31`,nodeDone:`_nodeDone_iwxkt_49`,node:`_node_iwxkt_49`,nodeHere:`_nodeHere_iwxkt_68`,content:`_content_iwxkt_74`,heading:`_heading_iwxkt_79`,name:`_name_iwxkt_86`,here:`_here_iwxkt_90`,meta:`_meta_iwxkt_97`,bar:`_bar_iwxkt_101`,rows:`_rows_iwxkt_104`,fold:`_fold_iwxkt_112`,aside:`_aside_iwxkt_128`,panel:`_panel_iwxkt_134`,hint:`_hint_iwxkt_135`,panelLabel:`_panelLabel_iwxkt_145`,big:`_big_iwxkt_149`,tally:`_tally_iwxkt_161`,swatch:`_swatch_iwxkt_180`,done:`_done_iwxkt_185`,active:`_active_iwxkt_188`,review:`_review_iwxkt_191`,backlog:`_backlog_iwxkt_194`,hintTitle:`_hintTitle_iwxkt_201`},Oy={row:`_row_71h0z_1`,icon:`_icon_71h0z_20`,ok:`_ok_71h0z_27`,lock:`_lock_71h0z_30`,title:`_title_71h0z_34`,key:`_key_71h0z_41`,done:`_done_71h0z_45`,project:`_project_71h0z_48`,milestone:`_milestone_71h0z_56`,status:`_status_71h0z_61`,commits:`_commits_71h0z_75`,statusLabel:`_statusLabel_71h0z_82`};function ky({item:e,status:t,kind:n,project:r,selected:i=!1,onOpen:a}){let o=n===`done`,s=hs(e.id);return(0,h.jsxs)(`button`,{type:`button`,className:`${Oy.row} ${o?Oy.done:``}`,"aria-current":i,title:e.title,onClick:a,children:[o?(0,h.jsx)(po,{size:16,strokeWidth:2.5,className:Oy.ok,"aria-label":`Done`}):e.blocked?(0,h.jsx)(Fo,{size:16,strokeWidth:2,className:Oy.lock,"aria-label":`Blocked`}):(0,h.jsx)(`span`,{className:Oy.icon}),r!==void 0&&(0,h.jsx)(`span`,{className:`mono ${Oy.project}`,children:r}),e.key&&(0,h.jsx)(`span`,{className:`mono-sm ${Oy.key}`,children:e.key}),(0,h.jsx)(`span`,{className:Oy.title,children:e.title}),e.priority===3&&(0,h.jsx)(`span`,{className:`pri pri-high`,children:`▲`}),e.milestone&&r!==void 0&&(0,h.jsx)(`span`,{className:`mono ${Oy.milestone}`,children:e.milestone}),s&&(0,h.jsx)(`span`,{className:Oy.commits,children:(0,h.jsx)(gs,{summary:s})}),(0,h.jsxs)(`span`,{className:Oy.status,children:[(0,h.jsx)(Cs,{kind:n}),(0,h.jsx)(`span`,{className:Oy.statusLabel,children:t})]})]})}function Ay({board:e,selectedId:t,target:n,onOpen:r}){let i=my(e),a=new Map(Mt(e,e.project.milestones).map(e=>[e.milestone,e.rows])),[o,s]=(0,m.useState)(new Set),c=(0,m.useRef)(null),l=e=>s(t=>{let n=new Set(t);return n.delete(e)||n.add(e),n});if((0,m.useEffect)(()=>{if(!n)return;let e=i.milestones.findIndex(e=>e.name===n.name);i.milestones[e]?.open.length===0&&s(e=>new Set(e).add(n.name)),c.current?.querySelector(`[data-milestone-index="${e}"]`)?.scrollIntoView({block:`start`})},[n?.at]),i.total===0)return(0,h.jsx)(`p`,{className:`caption`,children:`No items. Press n on the board.`});let u=[...i.milestones].filter(e=>e.name!==null&&e.open.length>0).sort((e,t)=>e.open.length-t.open.length)[0],d=[...i.milestones].filter(e=>e.counts.review>0).sort((e,t)=>t.counts.review-e.counts.review)[0];return(0,h.jsxs)(`div`,{ref:c,className:$.layout,children:[(0,h.jsxs)(`div`,{className:$.main,children:[(0,h.jsxs)(`header`,{className:$.intro,children:[(0,h.jsxs)(`h1`,{className:$.title,children:[e.project.name,` roadmap`]}),(0,h.jsx)(`p`,{className:$.lede,children:`Milestones in the order you set. Finished ones fold away so what's left stays in front of you.`})]}),(0,h.jsx)(`ol`,{className:$.path,children:i.milestones.map((e,n)=>(0,h.jsx)(My,{index:n,milestone:e,here:e===i.current,rows:a.get(e.name)??[],unfolded:o.has(e.name),onToggle:()=>l(e.name),selectedId:t,onOpen:r},e.name??``))})]}),(0,h.jsxs)(`aside`,{className:$.aside,"aria-label":`Progress`,children:[(0,h.jsxs)(`section`,{className:$.panel,"aria-label":`Overall`,children:[(0,h.jsx)(`p`,{className:$.panelLabel,children:`Overall`}),(0,h.jsxs)(`p`,{className:$.big,children:[(0,h.jsxs)(`strong`,{children:[hy(i.counts.done,i.total),`%`]}),(0,h.jsxs)(`span`,{children:[i.counts.done,` of `,i.total,` done`]})]}),(0,h.jsx)(Ss,{counts:i.counts,total:i.total,thick:!0}),(0,h.jsx)(`dl`,{className:$.tally,children:[`done`,`active`,`review`,`backlog`].map(e=>(0,h.jsxs)(`div`,{children:[(0,h.jsxs)(`dt`,{children:[(0,h.jsx)(`span`,{className:`${$.swatch} ${$[e]}`,"aria-hidden":`true`}),bs[e]]}),(0,h.jsx)(`dd`,{children:i.counts[e]})]},e))})]}),u&&(0,h.jsxs)(`section`,{className:$.hint,"aria-label":`Closest to the finish`,children:[(0,h.jsx)(`p`,{className:$.hintTitle,children:`Closest to the finish`}),(0,h.jsxs)(`p`,{children:[u.name,` needs `,u.open.length===1?`one item`:`${u.open.length} items`,`.`,d&&` ${jy(d)}`]})]})]})]})}function jy(e){let t=e.counts.review===1?`One item`:`${e.counts.review} items`;return e.name===null?`${t} without a milestone ${e.counts.review===1?`is`:`are`} waiting for you to check.`:`${t} in ${e.name} ${e.counts.review===1?`is`:`are`} waiting for you to check.`}function My({index:e,milestone:t,here:n,rows:r,unfolded:i,onToggle:a,selectedId:o,onOpen:s}){let c=t.total>0&&t.open.length===0,l=r.filter(e=>e.column.kind!==`done`),u=r.filter(e=>e.column.kind===`done`),d=e=>(0,h.jsx)(`div`,{className:$.rows,children:e.map(({item:e,column:t})=>(0,h.jsx)(ky,{item:e,status:t.label,kind:t.kind,selected:e.id===o,onOpen:()=>s(e.id)},e.id))});return(0,h.jsxs)(`li`,{className:$.step,"data-milestone-index":e,"aria-current":n?`step`:void 0,children:[(0,h.jsx)(`span`,{className:`${$.node} ${c?$.nodeDone:n?$.nodeHere:``}`,"aria-hidden":`true`,children:c&&(0,h.jsx)(po,{size:14,strokeWidth:3})}),(0,h.jsxs)(`div`,{className:$.content,children:[(0,h.jsxs)(`h2`,{className:$.heading,children:[(0,h.jsx)(`span`,{className:$.name,children:t.name??`No milestone`}),n&&(0,h.jsx)(`span`,{className:$.here,children:`You are here`}),(0,h.jsx)(`span`,{className:$.meta,children:t.total===0?`No items`:c?`All ${t.total} done`:`${t.counts.done} of ${t.total} done, ${t.open.length} left`})]}),t.total>0&&(0,h.jsx)(`div`,{className:$.bar,children:(0,h.jsx)(Ss,{counts:t.counts,total:t.total})}),l.length>0&&d(l),u.length>0&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(`button`,{type:`button`,className:$.fold,"aria-expanded":i,onClick:a,children:[i?(0,h.jsx)(ho,{size:16,strokeWidth:2}):(0,h.jsx)(_o,{size:16,strokeWidth:2}),i?`Hide`:`Show`,` `,c?`the ${u.length} done items`:`${u.length} done`]}),i&&d(u)]})]})]})}var Ny={dialog:`_dialog_erqr0_1`,title:`_title_erqr0_10`,row:`_row_erqr0_13`,actions:`_actions_erqr0_24`};function Py({title:e,stranded:t,targets:n,onConfirm:r,onCancel:i}){let[a,o]=(0,m.useState)(()=>Object.fromEntries(t.map(e=>[e.key,n[0].value])));return(0,h.jsxs)(`div`,{className:Ny.dialog,role:`dialog`,"aria-label":e,children:[(0,h.jsx)(`p`,{className:Ny.title,children:e}),t.map(e=>(0,h.jsxs)(`div`,{className:Ny.row,children:[(0,h.jsxs)(`span`,{children:[e.count,` `,e.count===1?`item`:`items`,` in `,(0,h.jsx)(`strong`,{children:e.label}),` move to`]}),(0,h.jsx)(dv,{label:`Move ${e.label} to`,value:a[e.key],options:n,onChange:t=>o({...a,[e.key]:t})})]},e.key)),(0,h.jsxs)(`div`,{className:Ny.actions,children:[(0,h.jsx)(`button`,{type:`button`,className:`btn btn-primary`,onClick:()=>r(a),children:`Move and save`}),(0,h.jsx)(`button`,{type:`button`,className:`btn btn-link`,onClick:i,children:`Cancel`})]})]})}var Fy={editor:`_editor_wz5nj_1`,list:`_list_wz5nj_5`,row:`_row_wz5nj_11`,index:`_index_wz5nj_25`,name:`_name_wz5nj_29`,icon:`_icon_wz5nj_32`,add:`_add_wz5nj_36`,actions:`_actions_wz5nj_41`,error:`_error_wz5nj_46`};function Iy({milestones:e,onSave:t}){let[n,r]=(0,m.useState)(e),[i,a]=(0,m.useState)(``),[o,s]=(0,m.useState)(null),[c,l]=(0,m.useState)(null),u=JSON.stringify(n)!==JSON.stringify(e),d=(e,t)=>{let i=[...n];[i[e],i[t]]=[i[t],i[e]],r(i)},f=()=>{let e=i.trim();e&&!n.includes(e)&&r([...n,e]),a(``)},p=async e=>{l(null);try{await t(n,e),s(null)}catch(e){if(e instanceof pt&&e.code===`milestone_in_use`){let t=e.data;s(t.milestones.map(e=>({key:e.name,label:e.name,count:e.count})))}else l(e instanceof Error?e.message:String(e))}};return(0,h.jsxs)(`div`,{className:Fy.editor,children:[n.length===0&&(0,h.jsx)(`p`,{className:`caption`,children:`No milestones. Setting one on an item adds it here.`}),(0,h.jsx)(`ol`,{className:Fy.list,children:n.map((e,t)=>(0,h.jsxs)(`li`,{className:Fy.row,children:[(0,h.jsx)(`span`,{className:`mono ${Fy.index}`,children:t+1}),(0,h.jsx)(`span`,{className:`mono ${Fy.name}`,children:e}),(0,h.jsx)(`button`,{type:`button`,className:`btn btn-ghost ${Fy.icon}`,"aria-label":`Move ${e} up`,disabled:t===0,onClick:()=>d(t,t-1),children:(0,h.jsx)(uo,{size:14,strokeWidth:1.5})}),(0,h.jsx)(`button`,{type:`button`,className:`btn btn-ghost ${Fy.icon}`,"aria-label":`Move ${e} down`,disabled:t===n.length-1,onClick:()=>d(t,t+1),children:(0,h.jsx)(oo,{size:14,strokeWidth:1.5})}),(0,h.jsx)(`button`,{type:`button`,className:`btn btn-ghost ${Fy.icon}`,"aria-label":`Remove ${e}`,onClick:()=>r(n.filter(t=>t!==e)),children:(0,h.jsx)($o,{size:14,strokeWidth:1.5})})]},e))}),(0,h.jsxs)(`form`,{className:Fy.add,onSubmit:e=>{e.preventDefault(),f()},children:[(0,h.jsx)(`input`,{className:`input mono`,"aria-label":`New milestone`,placeholder:`New milestone`,value:i,onChange:e=>a(e.target.value)}),(0,h.jsx)(`button`,{type:`submit`,className:`btn`,disabled:!i.trim(),children:`Add`})]}),o&&(0,h.jsx)(Py,{title:`Some removed milestones still have items.`,stranded:o,targets:[...n.map(e=>({value:e,label:e})),{value:null,label:`No milestone`}],onConfirm:e=>void p(e),onCancel:()=>s(null)}),c&&(0,h.jsx)(`p`,{className:Fy.error,children:c}),(0,h.jsxs)(`div`,{className:Fy.actions,children:[(0,h.jsx)(`button`,{type:`button`,className:`btn btn-primary`,disabled:!u,onClick:()=>void p(),children:`Save milestones`}),u&&(0,h.jsx)(`button`,{type:`button`,className:`btn btn-link`,onClick:()=>r(e),children:`Reset`})]})]})}function Ly({value:e,label:t,placeholder:n,allowEmpty:r=!1,onSave:i}){let[a,o]=(0,m.useState)(e);(0,m.useEffect)(()=>o(e),[e]);let s=a.trim(),c=s!==e&&(r||s.length>0);return(0,h.jsxs)(`form`,{className:X.inline,onSubmit:e=>{e.preventDefault(),c&&i(s)},children:[(0,h.jsx)(`input`,{className:`input ${X.lineInput}`,"aria-label":t,placeholder:n,value:a,onChange:e=>o(e.target.value),onKeyDown:t=>{t.key===`Escape`&&a!==e&&(t.stopPropagation(),o(e))}}),(0,h.jsx)(`button`,{type:`submit`,className:`btn`,disabled:!c,children:`Save`})]})}function Ry({project:e,onDeleted:t}){let n=_(),[r,i]=(0,m.useState)(null),a=()=>n.invalidateQueries({predicate:e=>[`projects`,`project`,`board`,`items`,`workspaces`].includes(String(e.queryKey[0]))}),o=(e,t)=>{i(null),e().then(async()=>{t?.(),await a()},e=>i(e instanceof Error?e.message:String(e)))};return(0,h.jsxs)(`div`,{className:X.stack,children:[(0,h.jsxs)(`div`,{className:X.form,children:[(0,h.jsx)(`div`,{className:`label`,children:`Name`}),(0,h.jsx)(Ly,{value:e.name,label:`Project name`,onSave:t=>o(()=>F.updateProject(e.id,{name:t}))})]}),(0,h.jsxs)(`div`,{className:X.form,children:[(0,h.jsx)(`div`,{className:`label`,children:`Key`}),(0,h.jsx)(Ly,{value:e.key??``,label:`Project key`,placeholder:`SLT`,onSave:t=>o(()=>F.updateProject(e.id,{key:t}))}),(0,h.jsxs)(`p`,{className:`caption`,children:[`2 to 5 letters; items are `,e.key??`KEY`,`-1, `,e.key??`KEY`,`-2… The old key keeps working after a change.`]})]}),(0,h.jsxs)(`div`,{className:X.form,children:[(0,h.jsx)(`div`,{className:`label`,children:`Description`}),(0,h.jsx)(Ly,{value:e.description??``,label:`Project description`,placeholder:`What this project is`,allowEmpty:!0,onSave:t=>o(()=>F.updateProject(e.id,{description:t||null}))})]}),(0,h.jsxs)(`div`,{className:X.form,children:[(0,h.jsxs)(`label`,{className:X.inline,children:[(0,h.jsx)(`input`,{type:`checkbox`,checked:e.gitTransitions,onChange:t=>o(()=>F.updateProject(e.id,{gitTransitions:t.target.checked}))}),`Move items from git activity`]}),(0,h.jsxs)(`p`,{className:`caption`,children:[`A commit that names an item (slate: `,e.key??`KEY`,`-12) moves it from not started to the first active column; once that commit is on the default branch, to the first review column. Checked every minute; nothing moves backwards.`]})]}),(0,h.jsxs)(`div`,{className:X.form,children:[(0,h.jsxs)(`label`,{className:X.inline,children:[(0,h.jsx)(`input`,{type:`checkbox`,checked:e.roadmapFile!==null,onChange:t=>o(()=>F.updateProject(e.id,{roadmapFile:t.target.checked?`docs/ROADMAP.md`:null}))}),`Keep the board as a file in the repository`]}),e.roadmapFile!==null&&(0,h.jsx)(Ly,{value:e.roadmapFile,label:`Roadmap file`,onSave:t=>o(()=>F.updateProject(e.id,{roadmapFile:t}))}),(0,h.jsx)(`p`,{className:`caption`,children:`slate rewrites it in the board-file format after each change (slate import reads it back). It never commits, and never writes over a hand edit: slate doctor tells you to import it.`})]}),(0,h.jsxs)(`div`,{className:X.inline,children:[(0,h.jsx)(`button`,{type:`button`,className:`btn`,onClick:()=>o(()=>F.updateProject(e.id,{archived:!e.archived})),children:e.archived?`Unarchive project`:`Archive project`}),(0,h.jsx)(Qs,{label:`Delete project`,onConfirm:()=>o(()=>F.deleteProject(e.id),t)})]}),(0,h.jsxs)(`p`,{className:`caption`,children:[e.archived?`Archived: listed under Show archived in the sidebar. `:`Archiving hides the project behind Show archived in the sidebar. `,`Deleting removes the project and its items from slate; the repository at `,(0,h.jsx)(`span`,{className:`mono`,children:e.path}),` is untouched.`]}),r&&(0,h.jsx)(`p`,{className:X.error,children:r})]})}var zy={editor:`_editor_1hbtr_1`,rows:`_rows_1hbtr_5`,row:`_row_1hbtr_5`,dragging:`_dragging_1hbtr_17`,handle:`_handle_1hbtr_23`,labelInput:`_labelInput_1hbtr_37`,keyInput:`_keyInput_1hbtr_40`,key:`_key_1hbtr_40`,default:`_default_1hbtr_50`,remove:`_remove_1hbtr_63`,actions:`_actions_1hbtr_67`,error:`_error_1hbtr_72`,kind:`_kind_1hbtr_86`},By=[`backlog`,`active`,`review`,`done`],Vy=e=>e.toLowerCase().trim().replace(/[^a-z0-9]+/g,`_`).replace(/^[^a-z]+|_+$/g,``).slice(0,64),Hy=0,Uy=e=>e.map(e=>({uid:`s${Hy++}`,...e,isNew:!1}));function Wy({row:e,onChange:t,onRemove:n,canRemove:r}){let{setNodeRef:i,attributes:a,listeners:o,transform:s,transition:c,isDragging:l}=La({id:e.uid});return(0,h.jsxs)(`div`,{ref:i,className:`${zy.row} ${l?zy.dragging:``}`,style:{transform:Fn.Translate.toString(s),transition:c},children:[(0,h.jsx)(`button`,{type:`button`,className:zy.handle,"aria-label":`Reorder ${e.label||`status`}`,...a,...o,children:(0,h.jsx)(jo,{size:16,strokeWidth:1.5})}),(0,h.jsx)(`input`,{className:`input ${zy.labelInput}`,"aria-label":`Label`,placeholder:`Label`,value:e.label,onChange:n=>t({...e,label:n.target.value,key:e.isNew?Vy(n.target.value):e.key})}),e.isNew?(0,h.jsx)(`input`,{className:`input mono ${zy.keyInput}`,"aria-label":`Key`,placeholder:`key`,value:e.key,onChange:n=>t({...e,key:n.target.value})}):(0,h.jsx)(`span`,{className:`mono ${zy.key}`,children:e.key}),(0,h.jsx)(`span`,{className:zy.kind,children:(0,h.jsx)(dv,{label:`Kind`,value:e.kind,options:By.map(e=>({value:e,label:e})),onChange:n=>t({...e,kind:n})})}),(0,h.jsxs)(`label`,{className:zy.default,children:[(0,h.jsx)(`input`,{type:`radio`,name:`default-status`,checked:e.isDefault,onChange:()=>t({...e,isDefault:!0})}),`Default`]}),(0,h.jsx)(`button`,{type:`button`,className:`btn btn-ghost ${zy.remove}`,"aria-label":`Remove ${e.label}`,disabled:!r,onClick:n,children:(0,h.jsx)($o,{size:14,strokeWidth:1.5})})]})}function Gy({statuses:e,onSave:t}){let[n,r]=(0,m.useState)(()=>Uy(e)),[i,a]=(0,m.useState)(null),[o,s]=(0,m.useState)(null),[c,l]=(0,m.useState)(!1),u=Zn(Xn(ti),Xn(Xr,{coordinateGetter:Va})),d=JSON.stringify(e.map(({key:e,label:t,kind:n,isDefault:r})=>({key:e,label:t,kind:n,isDefault:r}))),f=JSON.stringify(n.map(({key:e,label:t,kind:n,isDefault:r})=>({key:e,label:t,kind:n,isDefault:r}))),p=n.every(e=>/^[a-z][a-z0-9_-]*$/.test(e.key)&&e.label.trim())&&new Set(n.map(e=>e.key)).size===n.length,g=(e,t)=>r(n.map(n=>n.uid===e?t:t.isDefault&&n.isDefault?{...n,isDefault:!1}:n)),_=e=>{let t=n.filter(t=>t.uid!==e);!t.some(e=>e.isDefault)&&t[0]&&(t[0]={...t[0],isDefault:!0}),r(t)},v=({active:e,over:t})=>{t&&e.id!==t.id&&r(va(n,n.findIndex(t=>t.uid===e.id),n.findIndex(e=>e.uid===t.id)))},y=async r=>{l(!0),s(null);try{await t(n.map(({key:e,label:t,kind:n,isDefault:r},i)=>({key:e,label:t.trim(),kind:n,isDefault:r,position:i})),r),a(null)}catch(t){if(t instanceof pt&&t.code===`status_in_use`){let n=t.data;a(n.stranded.map(t=>({...t,label:e.find(e=>e.key===t.key)?.label??t.key})))}else s(t instanceof Error?t.message:String(t))}finally{l(!1)}};return(0,h.jsxs)(`div`,{className:zy.editor,children:[(0,h.jsx)(Zi,{sensors:u,collisionDetection:or,onDragEnd:v,children:(0,h.jsx)(ka,{items:n.map(e=>e.uid),strategy:Ta,children:(0,h.jsx)(`div`,{className:zy.rows,children:n.map(e=>(0,h.jsx)(Wy,{row:e,canRemove:n.length>1,onChange:t=>g(e.uid,t),onRemove:()=>_(e.uid)},e.uid))})})}),(0,h.jsx)(`button`,{type:`button`,className:`add`,onClick:()=>r([...n,{uid:`s${Hy++}`,key:``,label:``,kind:`backlog`,isDefault:!1,isNew:!0}]),children:`+ status`}),i&&(0,h.jsx)(Py,{title:`Some removed statuses still have items.`,stranded:i,targets:n.map(e=>({value:e.key,label:e.label})),onConfirm:e=>void y(e),onCancel:()=>a(null)}),o&&(0,h.jsx)(`p`,{className:zy.error,children:o}),(0,h.jsxs)(`div`,{className:zy.actions,children:[(0,h.jsx)(`button`,{type:`button`,className:`btn btn-primary`,disabled:c||f===d||!p,onClick:()=>void y(),children:`Save statuses`}),f!==d&&(0,h.jsx)(`button`,{type:`button`,className:`btn btn-link`,onClick:()=>r(Uy(e)),children:`Reset`})]})]})}function Ky({workspaces:e,currentId:t,onSelect:n}){let r=_(),[i,a]=(0,m.useState)(null),[o,s]=(0,m.useState)(null),c=e.find(e=>e.id===t),l=async e=>{s(null);try{return await e()}catch(e){s(e instanceof pt?e.message:String(e));return}},u=()=>r.invalidateQueries({predicate:e=>[`workspaces`,`projects`,`board`].includes(String(e.queryKey[0]))}),d=async e=>{c&&await l(()=>F.updateWorkspace(c.id,{name:e}))&&await u()},f=async()=>{if(!c||!await l(()=>F.deleteWorkspace(c.id)))return;a(null);let t=e.find(e=>e.id!==c.id);await u(),t&&n(t.id)},p=async()=>{c&&a(await l(()=>F.scanWorkspace(c.id))??null)},g=async e=>{if(c){for(let t of e)if(!await l(()=>F.createProject({workspaceId:c.id,name:t.name,path:t.path})))break;await u(),await p()}},v=i?.filter(e=>!e.registered)??[];return(0,h.jsxs)(`div`,{className:X.stack,children:[(0,h.jsx)(`div`,{className:X.rows,children:e.map(e=>(0,h.jsxs)(`button`,{type:`button`,className:X.wsRow,"aria-current":e.id===t,onClick:()=>n(e.id),children:[(0,h.jsx)(`span`,{className:X.wsName,children:e.name}),(0,h.jsx)(`span`,{className:`mono ${X.path}`,children:e.rootPath}),(0,h.jsxs)(`span`,{className:`mono ${X.dim}`,children:[e.projectCount,` `,e.projectCount===1?`project`:`projects`]})]},e.id))}),c&&(0,h.jsxs)(`div`,{className:X.stack,children:[(0,h.jsxs)(`div`,{className:X.form,children:[(0,h.jsx)(`div`,{className:`label`,children:`Workspace name`}),(0,h.jsx)(Ly,{value:c.name,label:`Workspace name`,onSave:e=>void d(e)},c.id)]}),(0,h.jsxs)(`div`,{className:X.form,children:[(0,h.jsx)(`div`,{className:X.inline,children:(0,h.jsx)(Qs,{label:`Delete workspace`,onConfirm:()=>void f()})}),(0,h.jsxs)(`p`,{className:`caption`,children:[`Deleting a workspace removes its projects and items from slate; `,(0,h.jsx)(`span`,{className:`mono`,children:c.rootPath}),` is untouched.`]})]}),(0,h.jsxs)(`div`,{className:X.inline,children:[(0,h.jsxs)(`button`,{type:`button`,className:`btn`,onClick:()=>void p(),children:[`Scan `,c.name,` for repositories`]}),v.length>1&&(0,h.jsxs)(`button`,{type:`button`,className:`btn`,onClick:()=>void g(v),children:[`Register all `,v.length]})]}),i&&i.length===0&&(0,h.jsxs)(`p`,{className:`caption`,children:[`No git repositories under `,c.rootPath,`.`]}),i&&i.length>0&&(0,h.jsx)(`div`,{className:X.rows,children:i.map(e=>(0,h.jsxs)(`div`,{className:X.candidate,children:[(0,h.jsx)(`span`,{className:X.wsName,children:e.name}),(0,h.jsx)(`span`,{className:`mono ${X.path}`,children:e.path}),e.registered?(0,h.jsx)(`span`,{className:`caption ${X.registered}`,children:`Registered`}):(0,h.jsx)(`button`,{type:`button`,className:`btn`,onClick:()=>void g([e]),children:`Register`})]},e.path))})]}),(0,h.jsx)(Yv,{onCreated:n}),o&&(0,h.jsx)(`p`,{className:X.error,children:o})]})}function qy(e){return e<60?`${e}s`:e<3600?`${Math.floor(e/60)}m`:e<86400?`${Math.floor(e/3600)}h ${Math.floor(e%3600/60)}m`:`${Math.floor(e/86400)}d ${Math.floor(e%86400/3600)}h`}var Jy=e=>e.map(e=>`${e.key}:${e.label}:${e.kind}:${e.isDefault}`).join(`|`);function Yy({workspaces:e,workspaceId:t,project:n,onWorkspace:r,onProjectDeleted:i}){let a=_(),[o,s]=(0,m.useState)(n?`project`:`workspace`),c=e.find(e=>e.id===t),l=ot({queryKey:I.workspaceStatuses(t??``),queryFn:()=>F.workspaceStatuses(t),enabled:!!t}),u=ot({queryKey:I.health,queryFn:F.health,refetchInterval:3e4}),d=()=>a.invalidateQueries({predicate:e=>[`project`,`board`,`statuses`,`item`].includes(String(e.queryKey[0]))}),f=async(e,r)=>{o===`project`&&n?await F.setProjectStatuses(n.id,e,r):t&&await F.setWorkspaceStatuses(t,e,r),await d()},p=o===`project`&&n,g=p?n.statuses:l.data;return(0,h.jsxs)(`div`,{className:X.settings,children:[(n||c)&&(0,h.jsxs)(`section`,{className:X.section,children:[(0,h.jsxs)(`div`,{className:X.sectionHead,children:[(0,h.jsx)(`h2`,{className:X.heading,children:`Statuses`}),(0,h.jsxs)(`div`,{className:X.segmented,role:`tablist`,"aria-label":`Statuses scope`,children:[n&&(0,h.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":o===`project`,onClick:()=>s(`project`),children:n.name}),c&&(0,h.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":o===`workspace`,onClick:()=>s(`workspace`),children:[`Workspace `,c.name]})]})]}),p&&n.inheritsStatuses?(0,h.jsxs)(`div`,{className:X.inline,children:[(0,h.jsx)(`p`,{className:`caption`,children:`This project uses the workspace statuses.`}),(0,h.jsx)(`button`,{type:`button`,className:`btn`,onClick:()=>void f(n.statuses),children:`Override for this project`})]}):g&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Gy,{statuses:g,onSave:f},`${o}:${Jy(g)}`),p&&(0,h.jsx)(`button`,{type:`button`,className:`btn btn-link ${X.revert}`,onClick:()=>void f([]),children:`Use the workspace statuses instead`})]})]}),n&&(0,h.jsxs)(`section`,{className:X.section,children:[(0,h.jsx)(`h2`,{className:X.heading,children:`Milestones`}),(0,h.jsx)(`p`,{className:`caption`,children:`Order sets the roadmap. Items without a milestone are listed last.`}),(0,h.jsx)(Iy,{milestones:n.milestones,onSave:async(e,t)=>{await F.updateProject(n.id,{milestones:e,...t?{remap:t}:{}}),await d()}},n.milestones.join(`|`))]}),n&&(0,h.jsxs)(`section`,{className:X.section,children:[(0,h.jsx)(`h2`,{className:X.heading,children:`Project`}),(0,h.jsx)(Ry,{project:n,onDeleted:i})]}),(0,h.jsxs)(`section`,{className:X.section,children:[(0,h.jsx)(`h2`,{className:X.heading,children:`Workspaces`}),e.length===0&&(0,h.jsx)(`p`,{className:`caption`,children:`No workspaces yet. Create one for a directory that holds your repositories.`}),(0,h.jsx)(Ky,{workspaces:e,currentId:t,onSelect:r})]}),(0,h.jsxs)(`section`,{className:X.section,children:[(0,h.jsx)(`h2`,{className:X.heading,children:`Service`}),u.data&&(0,h.jsxs)(`dl`,{className:X.facts,children:[(0,h.jsx)(`dt`,{children:`Status`}),(0,h.jsxs)(`dd`,{children:[(0,h.jsx)(`span`,{className:X.statusDot}),` Running`]}),(0,h.jsx)(`dt`,{children:`Version`}),(0,h.jsx)(`dd`,{className:`mono`,children:u.data.version??`unknown`}),u.data.updateAvailable===!0&&typeof u.data.latestVersion==`string`&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`dt`,{children:`Update`}),(0,h.jsxs)(`dd`,{children:[`Update available: `,(0,h.jsx)(`span`,{className:`mono`,children:u.data.latestVersion})]})]}),(0,h.jsx)(`dt`,{children:`Uptime`}),(0,h.jsx)(`dd`,{className:`mono`,children:typeof u.data.uptime==`number`?qy(Math.floor(u.data.uptime)):`unknown`}),(0,h.jsx)(`dt`,{children:`Process`}),(0,h.jsxs)(`dd`,{className:`mono`,children:[`pid `,u.data.pid]}),(0,h.jsx)(`dt`,{children:`Schema`}),(0,h.jsxs)(`dd`,{className:`mono`,children:[`v`,u.data.schemaVersion]})]}),u.error&&(0,h.jsx)(`p`,{className:X.error,children:`The server is not answering.`})]}),(0,h.jsxs)(`section`,{className:X.section,children:[(0,h.jsx)(`h2`,{className:X.heading,children:`Connect an agent`}),(0,h.jsx)(`p`,{className:`caption`,children:`Register slate with Claude Code at user scope, so agents can read and move items from any project.`}),(0,h.jsx)(qv,{})]})]})}var Xy={sidebar:`_sidebar_1gnsq_1`,group:`_group_1gnsq_11`,row:`_row_1gnsq_14`,name:`_name_1gnsq_33`,archived:`_archived_1gnsq_40`,count:`_count_1gnsq_43`,active:`_active_1gnsq_49`,warn:`_warn_1gnsq_52`,dim:`_dim_1gnsq_55`,muted:`_muted_1gnsq_58`,empty:`_empty_1gnsq_62`,initial:`_initial_1gnsq_65`};function Zy({projects:e,boards:t,currentId:n,onSelect:r}){let[i,a]=(0,m.useState)(!1),o=e.filter(e=>e.archived),s=e.filter(e=>!e.archived||i||e.id===n);return(0,h.jsxs)(`nav`,{className:Xy.sidebar,"aria-label":`Projects`,children:[(0,h.jsx)(`div`,{className:`label ${Xy.group}`,children:`Projects`}),s.map(e=>{let{active:i,open:a,blocked:o}=At(t.get(e.id));return(0,h.jsxs)(`button`,{type:`button`,className:`${Xy.row} ${e.archived?Xy.archived:``}`,"aria-current":e.id===n,title:e.path,onClick:()=>r(e.id),children:[(0,h.jsx)(`span`,{className:Xy.initial,"aria-hidden":!0,children:e.name.slice(0,2)}),(0,h.jsx)(`span`,{className:Xy.name,children:e.name}),o>0&&(0,h.jsxs)(`span`,{className:`mono ${Xy.count} ${Xy.warn}`,title:`${o} blocked`,children:[(0,h.jsx)(Fo,{size:12,strokeWidth:1.5}),o]}),(0,h.jsxs)(`span`,{className:`mono ${Xy.count} ${a===0?Xy.dim:``}`,title:i>0?`${i} in motion, ${a} open`:`${a} open`,children:[i>0&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`span`,{className:Xy.active,children:i}),(0,h.jsx)(`span`,{"aria-hidden":!0,children:`·`})]}),a]})]},e.id)}),e.length===0&&(0,h.jsx)(`div`,{className:`caption ${Xy.empty}`,children:`No projects. Scan the workspace in settings.`}),o.length>0&&(0,h.jsxs)(`button`,{type:`button`,className:`${Xy.row} ${Xy.muted}`,onClick:()=>a(!i),children:[(0,h.jsx)(`span`,{className:Xy.name,children:i?`Hide archived`:`Show archived`}),(0,h.jsx)(`span`,{className:`mono ${Xy.count} ${Xy.dim}`,children:o.length})]})]})}function Qy({projects:e,boards:t,selectedId:n,onOpen:r}){let i=e.filter(e=>!e.archived).flatMap(e=>(t.get(e.id)?.columns??[]).filter(e=>e.kind===`active`||e.kind===`review`).flatMap(t=>t.items.map(n=>({project:e,column:t,item:n})))),a=new Set(i.map(e=>e.project.id)).size;return(0,h.jsx)(`div`,{className:$.roadmap,children:(0,h.jsxs)(`section`,{children:[(0,h.jsxs)(`h3`,{className:$.heading,children:[(0,h.jsx)(`span`,{children:`In motion and to test`}),(0,h.jsxs)(`span`,{className:`mono ${$.progress}`,children:[i.length,` across `,a,` `,a===1?`project`:`projects`]})]}),i.length===0&&(0,h.jsx)(`p`,{className:`caption`,children:`Nothing active in this workspace.`}),(0,h.jsx)(`div`,{className:$.rows,children:i.map(({project:e,column:t,item:i})=>(0,h.jsx)(ky,{item:i,project:e.name,status:t.label,kind:t.kind,selected:i.id===n,onOpen:()=>r(e.id,i.id)},i.id))})]})})}var $y={};function eb(){let[e,t]=sn(),n=Pt(),r=Nt(),i=It(e.project),[a,o]=(0,m.useState)(()=>Kt(`workspace`)),[s,c]=(0,m.useState)(e.item),[l,u]=(0,m.useState)(0),[d,f]=(0,m.useState)(!1),[p,g]=(0,m.useState)(!1),[_,v]=(0,m.useState)(null),y=Qt(),b=Wt(),x=i.data?.workspaceId??(e=>e&&n.data?.some(t=>t.id===e)?e:null)(a)??n.data?.[0]?.id??null,S=Ft(x).data??[],C=S.length===1,w=Rt(S.map(e=>e.id)),T=new Map;for(let e of w)e.data&&T.set(e.data.project.id,e.data);let E=Lt(e.project),D=Vt(e.project),O=n.data?.length===0,k=e.view,A=O&&k!==`settings`,ee=!A&&!e.project&&k!==`settings`&&k!==`workspace`;Et(ee?`all`:x),(0,m.useEffect)(()=>{i.data&&i.data.workspaceId!==a&&(o(i.data.workspaceId),qt(`workspace`,i.data.workspaceId))},[i.data,a]),(0,m.useEffect)(()=>{i.error instanceof pt&&i.error.status===404&&t({project:null,item:null},{replace:!0})},[i.error,t]),(0,m.useEffect)(()=>{e.item&&c(e.item)},[e.item]);let j=zt(e.item);(0,m.useEffect)(()=>{j.data&&e.item&&j.data.id!==e.item&&j.data.key?.toLowerCase()===e.item.toLowerCase()&&t({project:j.data.projectId,item:j.data.id},{replace:!0})},[j.data,e.item,t]),(0,m.useEffect)(()=>{let e=e=>{!(e.metaKey||e.ctrlKey)||e.altKey||e.shiftKey||e.key.toLowerCase()!==`k`||(e.preventDefault(),f(e=>!e))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]);let M=()=>t({project:null,item:null,view:`overview`}),N=(0,m.useRef)(0);St(n=>{if(n.key===`g`){N.current=n.timeStamp;return}if(n.key===`h`&&N.current&&n.timeStamp-N.current<1e3){N.current=0,M();return}if(N.current=0,n.key!==`Escape`)return!1;if(e.item)t({item:null});else if(s)c(null);else return!1});let te=e=>r.data?.workspaces.find(t=>t.id===e)?.projects.find(e=>!e.archived)??null,ne=e=>{o(e),qt(`workspace`,e)},re=e=>{if(ne(e),e===x&&!ee)return;if(k===`settings`)return t({project:null,item:null});let n=te(e);t({project:n?.id??null,item:null,view:n?k:`overview`})},P=e=>{ne(e),t({project:te(e)?.id??null,item:null,view:`workspace`})},ie=(n,r)=>{c(n),r?.blocker&&u(e=>e+1),t({item:e.item===n&&!r?.blocker?null:n})},ae=n=>{c(n.id),t({project:n.projectId,item:n.id,view:e.view===`settings`?`board`:e.view})},oe=e=>{v({name:e,at:Date.now()}),t({view:`roadmap`,item:null})},se=e=>t({project:e,item:null,view:k===`settings`||k===`workspace`?`overview`:k}),ce=(e,t)=>T.get(e)?.columns.find(e=>e.key===t)?.label??t.replace(/_/g,` `),le=fe(),[ue,de]=bt(e.item&&x&&k!==`settings`?e.item:null,200);function fe(){let n=[];i.data&&n.push({id:`new`,label:`New item`,hint:`n`,run:()=>{t({view:`board`}),g(!0)}});let a=E.data?.columns??[],o=a.flatMap(e=>e.items).find(e=>e.id===s);if(o&&E.data){let e=E.data.project.id;a.forEach((t,r)=>{t.key!==o.status&&n.push({id:`move:${t.key}`,label:`Move selected card to ${t.label}`,...r<9?{hint:String(r+1)}:{},run:()=>b.mutate({id:o.id,projectId:e,status:t.key,position:`bottom`})})})}for(let[r,i]of[[`overview`,`Overview`],[`board`,`Board`],[`roadmap`,`Roadmap`],[`workspace`,`Workspace`]])r!==k&&(e.project||r===`workspace`)&&n.push({id:`view:${r}`,label:`Switch to ${i} view`,run:()=>t({view:r})});ee||n.push({id:`home`,label:`Go home`,hint:`g h`,run:M});let c=r.data?.workspaces??[];for(let t of c)for(let r of t.projects)r.archived||r.id===e.project||n.push({id:`project:${r.id}`,label:`Switch to project`,detail:r.name,...c.length>1?{meta:t.name}:{},run:()=>se(r.id)});return n.push({id:`theme`,label:`Toggle theme`,detail:y.dark?`light`:`dark`,run:y.toggle}),k!==`settings`&&n.push({id:`settings`,label:`Open settings`,run:()=>t({view:`settings`})}),n}return(0,h.jsxs)(`div`,{className:`${cn.app} ${ee||C?cn.noSidebar:``}`,children:[(0,h.jsx)(oy,{home:ee,onHome:M,workspaces:n.data??[],workspaceId:x,project:i.data??null,projects:S,solo:C,view:k,onView:e=>t({view:e}),onWorkspace:re,onOpenItem:ae,onPalette:()=>f(!0)}),!ee&&!C&&(0,h.jsx)(Zy,{projects:S,boards:T,currentId:e.project,onSelect:se}),(0,h.jsx)(ms.Provider,{value:D.data?.items??$y,children:(0,h.jsxs)(`main`,{className:cn.main,children:[!A&&(k===`board`||k===`roadmap`)&&e.project&&E.data&&(0,h.jsx)(Dy,{board:E.data,onMilestone:oe}),(0,h.jsxs)(`div`,{className:cn.view,children:[A&&(0,h.jsx)(Xv,{onCreated:re}),ee&&r.data&&(0,h.jsx)(sy,{overview:r.data,onProject:e=>t({project:e,item:null,view:`overview`}),onWorkspace:P}),!A&&k===`overview`&&e.project&&E.data&&(0,h.jsx)(xy,{board:E.data,onOpen:e=>ie(e),onMilestone:oe}),!A&&k===`board`&&e.project&&E.data&&(0,h.jsx)(Ps,{board:E.data,selectedId:s,createPending:p,onCreateStarted:()=>g(!1),onSelect:c,onOpen:ie}),!A&&k===`roadmap`&&e.project&&E.data&&(0,h.jsx)(Ay,{board:E.data,selectedId:e.item,target:_,onOpen:e=>ie(e)}),!A&&k===`workspace`&&(0,h.jsx)(Qy,{projects:S,boards:T,selectedId:e.item,onOpen:(e,n)=>{c(n),t({project:e,item:n})}}),k===`settings`&&n.data&&(0,h.jsx)(Yy,{workspaces:n.data,workspaceId:x,project:i.data??null,onWorkspace:re,onProjectDeleted:()=>t({project:null,item:null},{replace:!0})},`${x}:${e.project}`)]}),!A&&k===`board`&&e.project&&E.data&&(0,h.jsx)(Fs,{columns:E.data.columns.length}),ue&&x&&(0,h.jsx)(jv,{itemId:ue,leaving:de,workspaceId:x,projects:S,blockerRequest:l,onOpen:e=>ie(e),onClose:()=>t({item:null})})]})}),d&&(0,h.jsx)(Gs,{commands:le,workspaceId:x,projects:S,statusLabel:ce,onOpenItem:ae,onClose:()=>f(!1)})]})}var tb=new Ke({defaultOptions:{queries:{staleTime:3e4,retry:!1,refetchOnWindowFocus:!0},mutations:{retry:!1}}});(0,ft.createRoot)(document.getElementById(`root`)).render((0,h.jsx)(m.StrictMode,{children:(0,h.jsx)(v,{client:tb,children:(0,h.jsx)(eb,{})})}));
|