@donartcha/openlag 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/LICENSE +373 -0
  2. package/README.md +82 -0
  3. package/bin/openlag.js +2 -0
  4. package/dist/assets/arc-4YUHkXo3.js +1 -0
  5. package/dist/assets/architectureDiagram-3BPJPVTR-WeGmL7HM.js +36 -0
  6. package/dist/assets/blockDiagram-GPEHLZMM-CtV7ubAx.js +132 -0
  7. package/dist/assets/c4Diagram-AAUBKEIU-DqYDW5c3.js +10 -0
  8. package/dist/assets/channel-Tsel3-MK.js +1 -0
  9. package/dist/assets/chunk-2J33WTMH-BE8P9tjh.js +1 -0
  10. package/dist/assets/chunk-4BX2VUAB-Bi7oLGF5.js +1 -0
  11. package/dist/assets/chunk-55IACEB6-D9Xhxp_r.js +1 -0
  12. package/dist/assets/chunk-727SXJPM-Dz8jKE60.js +206 -0
  13. package/dist/assets/chunk-AQP2D5EJ-BzmM0IeH.js +231 -0
  14. package/dist/assets/chunk-FMBD7UC4-Cvl5dpcx.js +15 -0
  15. package/dist/assets/chunk-ND2GUHAM-Dz2efqnq.js +1 -0
  16. package/dist/assets/chunk-QZHKN3VN-CwblgSnQ.js +1 -0
  17. package/dist/assets/classDiagram-4FO5ZUOK-Bgm-_cW8.js +1 -0
  18. package/dist/assets/classDiagram-v2-Q7XG4LA2-Bgm-_cW8.js +1 -0
  19. package/dist/assets/cose-bilkent-S5V4N54A-h_A3nZUx.js +1 -0
  20. package/dist/assets/cytoscape.esm-D_LviqZs.js +331 -0
  21. package/dist/assets/dagre-BM42HDAG-CN_B2Doz.js +4 -0
  22. package/dist/assets/defaultLocale-DX6XiGOO.js +1 -0
  23. package/dist/assets/diagram-2AECGRRQ-C9TAFwjG.js +43 -0
  24. package/dist/assets/diagram-5GNKFQAL-BThljQLo.js +10 -0
  25. package/dist/assets/diagram-KO2AKTUF-bRPq25Se.js +3 -0
  26. package/dist/assets/diagram-LMA3HP47-BubLCIus.js +24 -0
  27. package/dist/assets/diagram-OG6HWLK6-CJpfhIsS.js +24 -0
  28. package/dist/assets/erDiagram-TEJ5UH35-6Xkza9wL.js +85 -0
  29. package/dist/assets/flowDiagram-I6XJVG4X-Bq_to3hX.js +162 -0
  30. package/dist/assets/ganttDiagram-6RSMTGT7-C3CmvYl7.js +292 -0
  31. package/dist/assets/gitGraphDiagram-PVQCEYII-C93LTfrl.js +106 -0
  32. package/dist/assets/graph-CAnANduQ.js +1 -0
  33. package/dist/assets/index-0RMQQ34p.css +1 -0
  34. package/dist/assets/index-ByxguSZe.js +729 -0
  35. package/dist/assets/infoDiagram-5YYISTIA-CMfuwygl.js +2 -0
  36. package/dist/assets/init-Gi6I4Gst.js +1 -0
  37. package/dist/assets/ishikawaDiagram-YF4QCWOH-CbJ5ojDF.js +70 -0
  38. package/dist/assets/journeyDiagram-JHISSGLW-C_Xz8YyT.js +139 -0
  39. package/dist/assets/kanban-definition-UN3LZRKU-GVv_iRMq.js +89 -0
  40. package/dist/assets/katex-DkKDou_j.js +257 -0
  41. package/dist/assets/layout-DGIYPm2g.js +1 -0
  42. package/dist/assets/linear-BNEtUH2J.js +1 -0
  43. package/dist/assets/mindmap-definition-RKZ34NQL-DIsL0XSF.js +96 -0
  44. package/dist/assets/ordinal-Cboi1Yqb.js +1 -0
  45. package/dist/assets/pieDiagram-4H26LBE5-CSCTSOjk.js +30 -0
  46. package/dist/assets/quadrantDiagram-W4KKPZXB-CQQ9OaFY.js +7 -0
  47. package/dist/assets/requirementDiagram-4Y6WPE33-Cjn3la_S.js +84 -0
  48. package/dist/assets/sankeyDiagram-5OEKKPKP-DoVspvVc.js +40 -0
  49. package/dist/assets/sequenceDiagram-3UESZ5HK-UsoGmL4w.js +162 -0
  50. package/dist/assets/stateDiagram-AJRCARHV-DLmf7Dc8.js +1 -0
  51. package/dist/assets/stateDiagram-v2-BHNVJYJU-jkiDZ_3u.js +1 -0
  52. package/dist/assets/timeline-definition-PNZ67QCA-HfyRxZ8p.js +120 -0
  53. package/dist/assets/vennDiagram-CIIHVFJN-B6pM3L33.js +34 -0
  54. package/dist/assets/wardley-L42UT6IY-B-LdKtrI.js +173 -0
  55. package/dist/assets/wardleyDiagram-YWT4CUSO-BD45zhOu.js +78 -0
  56. package/dist/assets/xychartDiagram-2RQKCTM6-zsDMbUiS.js +7 -0
  57. package/dist/cli/openlag.js +1793 -0
  58. package/dist/index.html +14 -0
  59. package/index.html +13 -0
  60. package/package.json +84 -0
  61. package/scripts/cli/build.ts +34 -0
  62. package/scripts/cli/dev.ts +35 -0
  63. package/scripts/cli/generate.ts +92 -0
  64. package/scripts/cli/init.ts +427 -0
  65. package/scripts/cli/lint.ts +29 -0
  66. package/scripts/cli/openlag.ts +110 -0
  67. package/scripts/cli/vite-bin.ts +8 -0
  68. package/scripts/core/parser/diagnostic.ts +34 -0
  69. package/scripts/core/parser/normalizer.ts +27 -0
  70. package/scripts/core/parser/scanner.ts +30 -0
  71. package/scripts/core/parser/schemas.ts +23 -0
  72. package/scripts/core/parser/types.ts +30 -0
  73. package/scripts/core/parser.ts +127 -0
  74. package/scripts/generate-relations.ts +53 -0
  75. package/scripts/lint/lint-engine.ts +85 -0
  76. package/scripts/lint/lint-profiles.ts +49 -0
  77. package/scripts/lint/lint-rules.ts +174 -0
  78. package/scripts/lint/lint-types.ts +43 -0
  79. package/src/App.tsx +164 -0
  80. package/src/components/DocumentationView.tsx +905 -0
  81. package/src/components/GraphView.tsx +529 -0
  82. package/src/components/GuideView.tsx +535 -0
  83. package/src/components/ImpactView.tsx +365 -0
  84. package/src/components/MarkdownRenderer.tsx +120 -0
  85. package/src/components/OrphansView.tsx +360 -0
  86. package/src/components/SettingsView.tsx +146 -0
  87. package/src/core/generated/relation-definitions.ts +622 -0
  88. package/src/core/graph/GraphQueryLayer.ts +194 -0
  89. package/src/core/registry/ArtifactRegistry.ts +19 -0
  90. package/src/core/registry/RelationRegistry.ts +27 -0
  91. package/src/core/semantic/artifact-layers.ts +43 -0
  92. package/src/core/semantic/ownership-rules.ts +13 -0
  93. package/src/core/semantic/types.ts +11 -0
  94. package/src/index.css +121 -0
  95. package/src/lib/reportUtils.ts +59 -0
  96. package/src/main.tsx +10 -0
  97. package/src/store.ts +146 -0
  98. package/src/types.ts +77 -0
  99. package/vite.config.ts +31 -0
@@ -0,0 +1,729 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-BM42HDAG-CN_B2Doz.js","assets/graph-CAnANduQ.js","assets/layout-DGIYPm2g.js","assets/cose-bilkent-S5V4N54A-h_A3nZUx.js","assets/cytoscape.esm-D_LviqZs.js","assets/c4Diagram-AAUBKEIU-DqYDW5c3.js","assets/chunk-ND2GUHAM-Dz2efqnq.js","assets/flowDiagram-I6XJVG4X-Bq_to3hX.js","assets/chunk-FMBD7UC4-Cvl5dpcx.js","assets/chunk-55IACEB6-D9Xhxp_r.js","assets/chunk-2J33WTMH-BE8P9tjh.js","assets/channel-Tsel3-MK.js","assets/erDiagram-TEJ5UH35-6Xkza9wL.js","assets/gitGraphDiagram-PVQCEYII-C93LTfrl.js","assets/chunk-4BX2VUAB-Bi7oLGF5.js","assets/chunk-QZHKN3VN-CwblgSnQ.js","assets/wardley-L42UT6IY-B-LdKtrI.js","assets/ganttDiagram-6RSMTGT7-C3CmvYl7.js","assets/linear-BNEtUH2J.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-5YYISTIA-CMfuwygl.js","assets/pieDiagram-4H26LBE5-CSCTSOjk.js","assets/arc-4YUHkXo3.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-W4KKPZXB-CQQ9OaFY.js","assets/xychartDiagram-2RQKCTM6-zsDMbUiS.js","assets/requirementDiagram-4Y6WPE33-Cjn3la_S.js","assets/sequenceDiagram-3UESZ5HK-UsoGmL4w.js","assets/classDiagram-4FO5ZUOK-Bgm-_cW8.js","assets/chunk-727SXJPM-Dz8jKE60.js","assets/classDiagram-v2-Q7XG4LA2-Bgm-_cW8.js","assets/stateDiagram-AJRCARHV-DLmf7Dc8.js","assets/chunk-AQP2D5EJ-BzmM0IeH.js","assets/stateDiagram-v2-BHNVJYJU-jkiDZ_3u.js","assets/journeyDiagram-JHISSGLW-C_Xz8YyT.js","assets/timeline-definition-PNZ67QCA-HfyRxZ8p.js","assets/mindmap-definition-RKZ34NQL-DIsL0XSF.js","assets/kanban-definition-UN3LZRKU-GVv_iRMq.js","assets/sankeyDiagram-5OEKKPKP-DoVspvVc.js","assets/diagram-LMA3HP47-BubLCIus.js","assets/diagram-2AECGRRQ-C9TAFwjG.js","assets/blockDiagram-GPEHLZMM-CtV7ubAx.js","assets/diagram-5GNKFQAL-BThljQLo.js","assets/architectureDiagram-3BPJPVTR-WeGmL7HM.js","assets/diagram-KO2AKTUF-bRPq25Se.js","assets/diagram-OG6HWLK6-CJpfhIsS.js","assets/wardleyDiagram-YWT4CUSO-BD45zhOu.js"])))=>i.map(i=>d[i]);
2
+ var VP=Object.defineProperty;var WP=(t,e,r)=>e in t?VP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var qe=(t,e,r)=>WP(t,typeof e!="symbol"?e+"":e,r);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const s of n)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function r(n){const s={};return n.integrity&&(s.integrity=n.integrity),n.referrerPolicy&&(s.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?s.credentials="include":n.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(n){if(n.ep)return;n.ep=!0;const s=r(n);fetch(n.href,s)}})();var Fd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Wl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var f0={exports:{}},Xc={};/**
3
+ * @license React
4
+ * react-jsx-runtime.production.js
5
+ *
6
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */var yE;function XP(){if(yE)return Xc;yE=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function r(i,n,s){var o=null;if(s!==void 0&&(o=""+s),n.key!==void 0&&(o=""+n.key),"key"in n){s={};for(var c in n)c!=="key"&&(s[c]=n[c])}else s=n;return n=s.ref,{$$typeof:t,type:i,key:o,ref:n!==void 0?n:null,props:s}}return Xc.Fragment=e,Xc.jsx=r,Xc.jsxs=r,Xc}var xE;function QP(){return xE||(xE=1,f0.exports=XP()),f0.exports}var S=QP(),p0={exports:{}},ne={};/**
11
+ * @license React
12
+ * react.production.js
13
+ *
14
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
15
+ *
16
+ * This source code is licensed under the MIT license found in the
17
+ * LICENSE file in the root directory of this source tree.
18
+ */var bE;function ZP(){if(bE)return ne;bE=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),n=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),o=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),m=Symbol.iterator;function g(G){return G===null||typeof G!="object"?null:(G=m&&G[m]||G["@@iterator"],typeof G=="function"?G:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,b={};function w(G,Z,H){this.props=G,this.context=Z,this.refs=b,this.updater=H||x}w.prototype.isReactComponent={},w.prototype.setState=function(G,Z){if(typeof G!="object"&&typeof G!="function"&&G!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,G,Z,"setState")},w.prototype.forceUpdate=function(G){this.updater.enqueueForceUpdate(this,G,"forceUpdate")};function T(){}T.prototype=w.prototype;function k(G,Z,H){this.props=G,this.context=Z,this.refs=b,this.updater=H||x}var E=k.prototype=new T;E.constructor=k,v(E,w.prototype),E.isPureReactComponent=!0;var L=Array.isArray;function A(){}var R={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function Y(G,Z,H){var Q=H.ref;return{$$typeof:t,type:G,key:Z,ref:Q!==void 0?Q:null,props:H}}function V(G,Z){return Y(G.type,Z,G.props)}function O(G){return typeof G=="object"&&G!==null&&G.$$typeof===t}function z(G){var Z={"=":"=0",":":"=2"};return"$"+G.replace(/[=:]/g,function(H){return Z[H]})}var X=/\/+/g;function M(G,Z){return typeof G=="object"&&G!==null&&G.key!=null?z(""+G.key):Z.toString(36)}function I(G){switch(G.status){case"fulfilled":return G.value;case"rejected":throw G.reason;default:switch(typeof G.status=="string"?G.then(A,A):(G.status="pending",G.then(function(Z){G.status==="pending"&&(G.status="fulfilled",G.value=Z)},function(Z){G.status==="pending"&&(G.status="rejected",G.reason=Z)})),G.status){case"fulfilled":return G.value;case"rejected":throw G.reason}}throw G}function N(G,Z,H,Q,J){var et=typeof G;(et==="undefined"||et==="boolean")&&(G=null);var at=!1;if(G===null)at=!0;else switch(et){case"bigint":case"string":case"number":at=!0;break;case"object":switch(G.$$typeof){case t:case e:at=!0;break;case d:return at=G._init,N(at(G._payload),Z,H,Q,J)}}if(at)return J=J(G),at=Q===""?"."+M(G,0):Q,L(J)?(H="",at!=null&&(H=at.replace(X,"$&/")+"/"),N(J,Z,H,"",function(mt){return mt})):J!=null&&(O(J)&&(J=V(J,H+(J.key==null||G&&G.key===J.key?"":(""+J.key).replace(X,"$&/")+"/")+at)),Z.push(J)),1;at=0;var lt=Q===""?".":Q+":";if(L(G))for(var xt=0;xt<G.length;xt++)Q=G[xt],et=lt+M(Q,xt),at+=N(Q,Z,H,et,J);else if(xt=g(G),typeof xt=="function")for(G=xt.call(G),xt=0;!(Q=G.next()).done;)Q=Q.value,et=lt+M(Q,xt++),at+=N(Q,Z,H,et,J);else if(et==="object"){if(typeof G.then=="function")return N(I(G),Z,H,Q,J);throw Z=String(G),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(G).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.")}return at}function P(G,Z,H){if(G==null)return G;var Q=[],J=0;return N(G,Q,"","",function(et){return Z.call(H,et,J++)}),Q}function $(G){if(G._status===-1){var Z=G._result;Z=Z(),Z.then(function(H){(G._status===0||G._status===-1)&&(G._status=1,G._result=H)},function(H){(G._status===0||G._status===-1)&&(G._status=2,G._result=H)}),G._status===-1&&(G._status=0,G._result=Z)}if(G._status===1)return G._result.default;throw G._result}var D=typeof reportError=="function"?reportError:function(G){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Z=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof G=="object"&&G!==null&&typeof G.message=="string"?String(G.message):String(G),error:G});if(!window.dispatchEvent(Z))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",G);return}console.error(G)},q={map:P,forEach:function(G,Z,H){P(G,function(){Z.apply(this,arguments)},H)},count:function(G){var Z=0;return P(G,function(){Z++}),Z},toArray:function(G){return P(G,function(Z){return Z})||[]},only:function(G){if(!O(G))throw Error("React.Children.only expected to receive a single React element child.");return G}};return ne.Activity=p,ne.Children=q,ne.Component=w,ne.Fragment=r,ne.Profiler=n,ne.PureComponent=k,ne.StrictMode=i,ne.Suspense=u,ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=R,ne.__COMPILER_RUNTIME={__proto__:null,c:function(G){return R.H.useMemoCache(G)}},ne.cache=function(G){return function(){return G.apply(null,arguments)}},ne.cacheSignal=function(){return null},ne.cloneElement=function(G,Z,H){if(G==null)throw Error("The argument must be a React element, but you passed "+G+".");var Q=v({},G.props),J=G.key;if(Z!=null)for(et in Z.key!==void 0&&(J=""+Z.key),Z)!j.call(Z,et)||et==="key"||et==="__self"||et==="__source"||et==="ref"&&Z.ref===void 0||(Q[et]=Z[et]);var et=arguments.length-2;if(et===1)Q.children=H;else if(1<et){for(var at=Array(et),lt=0;lt<et;lt++)at[lt]=arguments[lt+2];Q.children=at}return Y(G.type,J,Q)},ne.createContext=function(G){return G={$$typeof:o,_currentValue:G,_currentValue2:G,_threadCount:0,Provider:null,Consumer:null},G.Provider=G,G.Consumer={$$typeof:s,_context:G},G},ne.createElement=function(G,Z,H){var Q,J={},et=null;if(Z!=null)for(Q in Z.key!==void 0&&(et=""+Z.key),Z)j.call(Z,Q)&&Q!=="key"&&Q!=="__self"&&Q!=="__source"&&(J[Q]=Z[Q]);var at=arguments.length-2;if(at===1)J.children=H;else if(1<at){for(var lt=Array(at),xt=0;xt<at;xt++)lt[xt]=arguments[xt+2];J.children=lt}if(G&&G.defaultProps)for(Q in at=G.defaultProps,at)J[Q]===void 0&&(J[Q]=at[Q]);return Y(G,et,J)},ne.createRef=function(){return{current:null}},ne.forwardRef=function(G){return{$$typeof:c,render:G}},ne.isValidElement=O,ne.lazy=function(G){return{$$typeof:d,_payload:{_status:-1,_result:G},_init:$}},ne.memo=function(G,Z){return{$$typeof:h,type:G,compare:Z===void 0?null:Z}},ne.startTransition=function(G){var Z=R.T,H={};R.T=H;try{var Q=G(),J=R.S;J!==null&&J(H,Q),typeof Q=="object"&&Q!==null&&typeof Q.then=="function"&&Q.then(A,D)}catch(et){D(et)}finally{Z!==null&&H.types!==null&&(Z.types=H.types),R.T=Z}},ne.unstable_useCacheRefresh=function(){return R.H.useCacheRefresh()},ne.use=function(G){return R.H.use(G)},ne.useActionState=function(G,Z,H){return R.H.useActionState(G,Z,H)},ne.useCallback=function(G,Z){return R.H.useCallback(G,Z)},ne.useContext=function(G){return R.H.useContext(G)},ne.useDebugValue=function(){},ne.useDeferredValue=function(G,Z){return R.H.useDeferredValue(G,Z)},ne.useEffect=function(G,Z){return R.H.useEffect(G,Z)},ne.useEffectEvent=function(G){return R.H.useEffectEvent(G)},ne.useId=function(){return R.H.useId()},ne.useImperativeHandle=function(G,Z,H){return R.H.useImperativeHandle(G,Z,H)},ne.useInsertionEffect=function(G,Z){return R.H.useInsertionEffect(G,Z)},ne.useLayoutEffect=function(G,Z){return R.H.useLayoutEffect(G,Z)},ne.useMemo=function(G,Z){return R.H.useMemo(G,Z)},ne.useOptimistic=function(G,Z){return R.H.useOptimistic(G,Z)},ne.useReducer=function(G,Z,H){return R.H.useReducer(G,Z,H)},ne.useRef=function(G){return R.H.useRef(G)},ne.useState=function(G){return R.H.useState(G)},ne.useSyncExternalStore=function(G,Z,H){return R.H.useSyncExternalStore(G,Z,H)},ne.useTransition=function(){return R.H.useTransition()},ne.version="19.2.6",ne}var vE;function ih(){return vE||(vE=1,p0.exports=ZP()),p0.exports}var ot=ih();const ul=Wl(ot);var g0={exports:{}},Qc={},m0={exports:{}},y0={};/**
19
+ * @license React
20
+ * scheduler.production.js
21
+ *
22
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
23
+ *
24
+ * This source code is licensed under the MIT license found in the
25
+ * LICENSE file in the root directory of this source tree.
26
+ */var CE;function KP(){return CE||(CE=1,(function(t){function e(N,P){var $=N.length;N.push(P);t:for(;0<$;){var D=$-1>>>1,q=N[D];if(0<n(q,P))N[D]=P,N[$]=q,$=D;else break t}}function r(N){return N.length===0?null:N[0]}function i(N){if(N.length===0)return null;var P=N[0],$=N.pop();if($!==P){N[0]=$;t:for(var D=0,q=N.length,G=q>>>1;D<G;){var Z=2*(D+1)-1,H=N[Z],Q=Z+1,J=N[Q];if(0>n(H,$))Q<q&&0>n(J,H)?(N[D]=J,N[Q]=$,D=Q):(N[D]=H,N[Z]=$,D=Z);else if(Q<q&&0>n(J,$))N[D]=J,N[Q]=$,D=Q;else break t}}return P}function n(N,P){var $=N.sortIndex-P.sortIndex;return $!==0?$:N.id-P.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,c=o.now();t.unstable_now=function(){return o.now()-c}}var u=[],h=[],d=1,p=null,m=3,g=!1,x=!1,v=!1,b=!1,w=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function E(N){for(var P=r(h);P!==null;){if(P.callback===null)i(h);else if(P.startTime<=N)i(h),P.sortIndex=P.expirationTime,e(u,P);else break;P=r(h)}}function L(N){if(v=!1,E(N),!x)if(r(u)!==null)x=!0,A||(A=!0,z());else{var P=r(h);P!==null&&I(L,P.startTime-N)}}var A=!1,R=-1,j=5,Y=-1;function V(){return b?!0:!(t.unstable_now()-Y<j)}function O(){if(b=!1,A){var N=t.unstable_now();Y=N;var P=!0;try{t:{x=!1,v&&(v=!1,T(R),R=-1),g=!0;var $=m;try{e:{for(E(N),p=r(u);p!==null&&!(p.expirationTime>N&&V());){var D=p.callback;if(typeof D=="function"){p.callback=null,m=p.priorityLevel;var q=D(p.expirationTime<=N);if(N=t.unstable_now(),typeof q=="function"){p.callback=q,E(N),P=!0;break e}p===r(u)&&i(u),E(N)}else i(u);p=r(u)}if(p!==null)P=!0;else{var G=r(h);G!==null&&I(L,G.startTime-N),P=!1}}break t}finally{p=null,m=$,g=!1}P=void 0}}finally{P?z():A=!1}}}var z;if(typeof k=="function")z=function(){k(O)};else if(typeof MessageChannel<"u"){var X=new MessageChannel,M=X.port2;X.port1.onmessage=O,z=function(){M.postMessage(null)}}else z=function(){w(O,0)};function I(N,P){R=w(function(){N(t.unstable_now())},P)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(N){N.callback=null},t.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<N?Math.floor(1e3/N):5},t.unstable_getCurrentPriorityLevel=function(){return m},t.unstable_next=function(N){switch(m){case 1:case 2:case 3:var P=3;break;default:P=m}var $=m;m=P;try{return N()}finally{m=$}},t.unstable_requestPaint=function(){b=!0},t.unstable_runWithPriority=function(N,P){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var $=m;m=N;try{return P()}finally{m=$}},t.unstable_scheduleCallback=function(N,P,$){var D=t.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?D+$:D):$=D,N){case 1:var q=-1;break;case 2:q=250;break;case 5:q=1073741823;break;case 4:q=1e4;break;default:q=5e3}return q=$+q,N={id:d++,callback:P,priorityLevel:N,startTime:$,expirationTime:q,sortIndex:-1},$>D?(N.sortIndex=$,e(h,N),r(u)===null&&N===r(h)&&(v?(T(R),R=-1):v=!0,I(L,$-D))):(N.sortIndex=q,e(u,N),x||g||(x=!0,A||(A=!0,z()))),N},t.unstable_shouldYield=V,t.unstable_wrapCallback=function(N){var P=m;return function(){var $=m;m=P;try{return N.apply(this,arguments)}finally{m=$}}}})(y0)),y0}var wE;function JP(){return wE||(wE=1,m0.exports=KP()),m0.exports}var x0={exports:{}},jr={};/**
27
+ * @license React
28
+ * react-dom.production.js
29
+ *
30
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
31
+ *
32
+ * This source code is licensed under the MIT license found in the
33
+ * LICENSE file in the root directory of this source tree.
34
+ */var SE;function t9(){if(SE)return jr;SE=1;var t=ih();function e(u){var h="https://react.dev/errors/"+u;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)h+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+u+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var i={d:{f:r,r:function(){throw Error(e(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},n=Symbol.for("react.portal");function s(u,h,d){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:n,key:p==null?null:""+p,children:u,containerInfo:h,implementation:d}}var o=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(u,h){if(u==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return jr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,jr.createPortal=function(u,h){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(e(299));return s(u,h,null,d)},jr.flushSync=function(u){var h=o.T,d=i.p;try{if(o.T=null,i.p=2,u)return u()}finally{o.T=h,i.p=d,i.d.f()}},jr.preconnect=function(u,h){typeof u=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,i.d.C(u,h))},jr.prefetchDNS=function(u){typeof u=="string"&&i.d.D(u)},jr.preinit=function(u,h){if(typeof u=="string"&&h&&typeof h.as=="string"){var d=h.as,p=c(d,h.crossOrigin),m=typeof h.integrity=="string"?h.integrity:void 0,g=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;d==="style"?i.d.S(u,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:p,integrity:m,fetchPriority:g}):d==="script"&&i.d.X(u,{crossOrigin:p,integrity:m,fetchPriority:g,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},jr.preinitModule=function(u,h){if(typeof u=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var d=c(h.as,h.crossOrigin);i.d.M(u,{crossOrigin:d,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&i.d.M(u)},jr.preload=function(u,h){if(typeof u=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var d=h.as,p=c(d,h.crossOrigin);i.d.L(u,d,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},jr.preloadModule=function(u,h){if(typeof u=="string")if(h){var d=c(h.as,h.crossOrigin);i.d.m(u,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:d,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else i.d.m(u)},jr.requestFormReset=function(u){i.d.r(u)},jr.unstable_batchedUpdates=function(u,h){return u(h)},jr.useFormState=function(u,h,d){return o.H.useFormState(u,h,d)},jr.useFormStatus=function(){return o.H.useHostTransitionStatus()},jr.version="19.2.6",jr}var kE;function cO(){if(kE)return x0.exports;kE=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),x0.exports=t9(),x0.exports}/**
35
+ * @license React
36
+ * react-dom-client.production.js
37
+ *
38
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
39
+ *
40
+ * This source code is licensed under the MIT license found in the
41
+ * LICENSE file in the root directory of this source tree.
42
+ */var _E;function e9(){if(_E)return Qc;_E=1;var t=JP(),e=ih(),r=cO();function i(a){var l="https://react.dev/errors/"+a;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var f=2;f<arguments.length;f++)l+="&args[]="+encodeURIComponent(arguments[f])}return"Minified React error #"+a+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function s(a){var l=a,f=a;if(a.alternate)for(;l.return;)l=l.return;else{a=l;do l=a,(l.flags&4098)!==0&&(f=l.return),a=l.return;while(a)}return l.tag===3?f:null}function o(a){if(a.tag===13){var l=a.memoizedState;if(l===null&&(a=a.alternate,a!==null&&(l=a.memoizedState)),l!==null)return l.dehydrated}return null}function c(a){if(a.tag===31){var l=a.memoizedState;if(l===null&&(a=a.alternate,a!==null&&(l=a.memoizedState)),l!==null)return l.dehydrated}return null}function u(a){if(s(a)!==a)throw Error(i(188))}function h(a){var l=a.alternate;if(!l){if(l=s(a),l===null)throw Error(i(188));return l!==a?null:a}for(var f=a,y=l;;){var C=f.return;if(C===null)break;var _=C.alternate;if(_===null){if(y=C.return,y!==null){f=y;continue}break}if(C.child===_.child){for(_=C.child;_;){if(_===f)return u(C),a;if(_===y)return u(C),l;_=_.sibling}throw Error(i(188))}if(f.return!==y.return)f=C,y=_;else{for(var F=!1,W=C.child;W;){if(W===f){F=!0,f=C,y=_;break}if(W===y){F=!0,y=C,f=_;break}W=W.sibling}if(!F){for(W=_.child;W;){if(W===f){F=!0,f=_,y=C;break}if(W===y){F=!0,y=_,f=C;break}W=W.sibling}if(!F)throw Error(i(189))}}if(f.alternate!==y)throw Error(i(190))}if(f.tag!==3)throw Error(i(188));return f.stateNode.current===f?a:l}function d(a){var l=a.tag;if(l===5||l===26||l===27||l===6)return a;for(a=a.child;a!==null;){if(l=d(a),l!==null)return l;a=a.sibling}return null}var p=Object.assign,m=Symbol.for("react.element"),g=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),k=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),Y=Symbol.for("react.activity"),V=Symbol.for("react.memo_cache_sentinel"),O=Symbol.iterator;function z(a){return a===null||typeof a!="object"?null:(a=O&&a[O]||a["@@iterator"],typeof a=="function"?a:null)}var X=Symbol.for("react.client.reference");function M(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===X?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case v:return"Fragment";case w:return"Profiler";case b:return"StrictMode";case L:return"Suspense";case A:return"SuspenseList";case Y:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case x:return"Portal";case k:return a.displayName||"Context";case T:return(a._context.displayName||"Context")+".Consumer";case E:var l=a.render;return a=a.displayName,a||(a=l.displayName||l.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case R:return l=a.displayName||null,l!==null?l:M(a.type)||"Memo";case j:l=a._payload,a=a._init;try{return M(a(l))}catch{}}return null}var I=Array.isArray,N=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$={pending:!1,data:null,method:null,action:null},D=[],q=-1;function G(a){return{current:a}}function Z(a){0>q||(a.current=D[q],D[q]=null,q--)}function H(a,l){q++,D[q]=a.current,a.current=l}var Q=G(null),J=G(null),et=G(null),at=G(null);function lt(a,l){switch(H(et,l),H(J,a),H(Q,null),l.nodeType){case 9:case 11:a=(a=l.documentElement)&&(a=a.namespaceURI)?jT(a):0;break;default:if(a=l.tagName,l=l.namespaceURI)l=jT(l),a=$T(l,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}Z(Q),H(Q,a)}function xt(){Z(Q),Z(J),Z(et)}function mt(a){a.memoizedState!==null&&H(at,a);var l=Q.current,f=$T(l,a.type);l!==f&&(H(J,a),H(Q,f))}function bt(a){J.current===a&&(Z(Q),Z(J)),at.current===a&&(Z(at),Gc._currentValue=$)}var Tt,_t;function Mt(a){if(Tt===void 0)try{throw Error()}catch(f){var l=f.stack.trim().match(/\n( *(at )?)/);Tt=l&&l[1]||"",_t=-1<f.stack.indexOf(`
43
+ at`)?" (<anonymous>)":-1<f.stack.indexOf("@")?"@unknown:0:0":""}return`
44
+ `+Tt+a+_t}var Et=!1;function Yt(a,l){if(!a||Et)return"";Et=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var y={DetermineComponentFrameRoot:function(){try{if(l){var Ct=function(){throw Error()};if(Object.defineProperty(Ct.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ct,[])}catch(pt){var ht=pt}Reflect.construct(a,[],Ct)}else{try{Ct.call()}catch(pt){ht=pt}a.call(Ct.prototype)}}else{try{throw Error()}catch(pt){ht=pt}(Ct=a())&&typeof Ct.catch=="function"&&Ct.catch(function(){})}}catch(pt){if(pt&&ht&&typeof pt.stack=="string")return[pt.stack,ht.stack]}return[null,null]}};y.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var C=Object.getOwnPropertyDescriptor(y.DetermineComponentFrameRoot,"name");C&&C.configurable&&Object.defineProperty(y.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var _=y.DetermineComponentFrameRoot(),F=_[0],W=_[1];if(F&&W){var rt=F.split(`
45
+ `),ut=W.split(`
46
+ `);for(C=y=0;y<rt.length&&!rt[y].includes("DetermineComponentFrameRoot");)y++;for(;C<ut.length&&!ut[C].includes("DetermineComponentFrameRoot");)C++;if(y===rt.length||C===ut.length)for(y=rt.length-1,C=ut.length-1;1<=y&&0<=C&&rt[y]!==ut[C];)C--;for(;1<=y&&0<=C;y--,C--)if(rt[y]!==ut[C]){if(y!==1||C!==1)do if(y--,C--,0>C||rt[y]!==ut[C]){var yt=`
47
+ `+rt[y].replace(" at new "," at ");return a.displayName&&yt.includes("<anonymous>")&&(yt=yt.replace("<anonymous>",a.displayName)),yt}while(1<=y&&0<=C);break}}}finally{Et=!1,Error.prepareStackTrace=f}return(f=a?a.displayName||a.name:"")?Mt(f):""}function zt(a,l){switch(a.tag){case 26:case 27:case 5:return Mt(a.type);case 16:return Mt("Lazy");case 13:return a.child!==l&&l!==null?Mt("Suspense Fallback"):Mt("Suspense");case 19:return Mt("SuspenseList");case 0:case 15:return Yt(a.type,!1);case 11:return Yt(a.type.render,!1);case 1:return Yt(a.type,!0);case 31:return Mt("Activity");default:return""}}function ve(a){try{var l="",f=null;do l+=zt(a,f),f=a,a=a.return;while(a);return l}catch(y){return`
48
+ Error generating stack: `+y.message+`
49
+ `+y.stack}}var Ee=Object.prototype.hasOwnProperty,Ve=t.unstable_scheduleCallback,ar=t.unstable_cancelCallback,We=t.unstable_shouldYield,Me=t.unstable_requestPaint,Ae=t.unstable_now,sr=t.unstable_getCurrentPriorityLevel,gt=t.unstable_ImmediatePriority,kt=t.unstable_UserBlockingPriority,Dt=t.unstable_NormalPriority,ee=t.unstable_LowPriority,ae=t.unstable_IdlePriority,Xe=t.log,K=t.unstable_setDisableYieldValue,Lt=null,Ht=null;function Bt(a){if(typeof Xe=="function"&&K(a),Ht&&typeof Ht.setStrictMode=="function")try{Ht.setStrictMode(Lt,a)}catch{}}var Nt=Math.clz32?Math.clz32:va,Ce=Math.log,je=Math.LN2;function va(a){return a>>>=0,a===0?32:31-(Ce(a)/je|0)|0}var gn=256,mn=262144,Ca=4194304;function Yr(a){var l=a&42;if(l!==0)return l;switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function wa(a,l,f){var y=a.pendingLanes;if(y===0)return 0;var C=0,_=a.suspendedLanes,F=a.pingedLanes;a=a.warmLanes;var W=y&134217727;return W!==0?(y=W&~_,y!==0?C=Yr(y):(F&=W,F!==0?C=Yr(F):f||(f=W&~a,f!==0&&(C=Yr(f))))):(W=y&~_,W!==0?C=Yr(W):F!==0?C=Yr(F):f||(f=y&~a,f!==0&&(C=Yr(f)))),C===0?0:l!==0&&l!==C&&(l&_)===0&&(_=C&-C,f=l&-l,_>=f||_===32&&(f&4194048)!==0)?l:C}function zn(a,l){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&l)===0}function rr(a,l){switch(a){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Vi(){var a=Ca;return Ca<<=1,(Ca&62914560)===0&&(Ca=4194304),a}function ds(a){for(var l=[],f=0;31>f;f++)l.push(a);return l}function yn(a,l){a.pendingLanes|=l,l!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function fs(a,l,f,y,C,_){var F=a.pendingLanes;a.pendingLanes=f,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=f,a.entangledLanes&=f,a.errorRecoveryDisabledLanes&=f,a.shellSuspendCounter=0;var W=a.entanglements,rt=a.expirationTimes,ut=a.hiddenUpdates;for(f=F&~f;0<f;){var yt=31-Nt(f),Ct=1<<yt;W[yt]=0,rt[yt]=-1;var ht=ut[yt];if(ht!==null)for(ut[yt]=null,yt=0;yt<ht.length;yt++){var pt=ht[yt];pt!==null&&(pt.lane&=-536870913)}f&=~Ct}y!==0&&ps(a,y,0),_!==0&&C===0&&a.tag!==0&&(a.suspendedLanes|=_&~(F&~l))}function ps(a,l,f){a.pendingLanes|=l,a.suspendedLanes&=~l;var y=31-Nt(l);a.entangledLanes|=l,a.entanglements[y]=a.entanglements[y]|1073741824|f&261930}function gs(a,l){var f=a.entangledLanes|=l;for(a=a.entanglements;f;){var y=31-Nt(f),C=1<<y;C&l|a[y]&l&&(a[y]|=l),f&=~C}}function po(a,l){var f=l&-l;return f=(f&42)!==0?1:Nr(f),(f&(a.suspendedLanes|l))!==0?0:f}function Nr(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function xi(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function ms(){var a=P.p;return a!==0?a:(a=window.event,a===void 0?32:uE(a.type))}function ys(a,l){var f=P.p;try{return P.p=a,l()}finally{P.p=f}}var ti=Math.random().toString(36).slice(2),ir="__reactFiber$"+ti,$e="__reactProps$"+ti,Mi="__reactContainer$"+ti,jn="__reactEvents$"+ti,go="__reactListeners$"+ti,mo="__reactHandles$"+ti,xs="__reactResources$"+ti,xn="__reactMarker$"+ti;function Ut(a){delete a[ir],delete a[$e],delete a[jn],delete a[go],delete a[mo]}function tt(a){var l=a[ir];if(l)return l;for(var f=a.parentNode;f;){if(l=f[Mi]||f[ir]){if(f=l.alternate,l.child!==null||f!==null&&f.child!==null)for(a=WT(a);a!==null;){if(f=a[ir])return f;a=WT(a)}return l}a=f,f=a.parentNode}return null}function wt(a){if(a=a[ir]||a[Mi]){var l=a.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return a}return null}function Ot(a){var l=a.tag;if(l===5||l===26||l===27||l===6)return a.stateNode;throw Error(i(33))}function me(a){var l=a[xs];return l||(l=a[xs]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function ue(a){a[xn]=!0}var Ue=new Set,_r={};function or(a,l){gr(a,l),gr(a+"Capture",l)}function gr(a,l){for(_r[a]=l,a=0;a<l.length;a++)Ue.add(l[a])}var bs=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Qe={},vs={};function yo(a){return Ee.call(vs,a)?!0:Ee.call(Qe,a)?!1:bs.test(a)?vs[a]=!0:(Qe[a]=!0,!1)}function xo(a,l,f){if(yo(l))if(f===null)a.removeAttribute(l);else{switch(typeof f){case"undefined":case"function":case"symbol":a.removeAttribute(l);return;case"boolean":var y=l.toLowerCase().slice(0,5);if(y!=="data-"&&y!=="aria-"){a.removeAttribute(l);return}}a.setAttribute(l,""+f)}}function bo(a,l,f){if(f===null)a.removeAttribute(l);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(l);return}a.setAttribute(l,""+f)}}function Wi(a,l,f,y){if(y===null)a.removeAttribute(f);else{switch(typeof y){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(f);return}a.setAttributeNS(l,f,""+y)}}function ei(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function kh(a){var l=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function og(a,l,f){var y=Object.getOwnPropertyDescriptor(a.constructor.prototype,l);if(!a.hasOwnProperty(l)&&typeof y<"u"&&typeof y.get=="function"&&typeof y.set=="function"){var C=y.get,_=y.set;return Object.defineProperty(a,l,{configurable:!0,get:function(){return C.call(this)},set:function(F){f=""+F,_.call(this,F)}}),Object.defineProperty(a,l,{enumerable:y.enumerable}),{getValue:function(){return f},setValue:function(F){f=""+F},stopTracking:function(){a._valueTracker=null,delete a[l]}}}}function Sa(a){if(!a._valueTracker){var l=kh(a)?"checked":"value";a._valueTracker=og(a,l,""+a[l])}}function _h(a){if(!a)return!1;var l=a._valueTracker;if(!l)return!0;var f=l.getValue(),y="";return a&&(y=kh(a)?a.checked?"true":"false":a.value),a=y,a!==f?(l.setValue(a),!0):!1}function Cs(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var lg=/[\n"\\]/g;function ri(a){return a.replace(lg,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function ws(a,l,f,y,C,_,F,W){a.name="",F!=null&&typeof F!="function"&&typeof F!="symbol"&&typeof F!="boolean"?a.type=F:a.removeAttribute("type"),l!=null?F==="number"?(l===0&&a.value===""||a.value!=l)&&(a.value=""+ei(l)):a.value!==""+ei(l)&&(a.value=""+ei(l)):F!=="submit"&&F!=="reset"||a.removeAttribute("value"),l!=null?oc(a,F,ei(l)):f!=null?oc(a,F,ei(f)):y!=null&&a.removeAttribute("value"),C==null&&_!=null&&(a.defaultChecked=!!_),C!=null&&(a.checked=C&&typeof C!="function"&&typeof C!="symbol"),W!=null&&typeof W!="function"&&typeof W!="symbol"&&typeof W!="boolean"?a.name=""+ei(W):a.removeAttribute("name")}function Th(a,l,f,y,C,_,F,W){if(_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(a.type=_),l!=null||f!=null){if(!(_!=="submit"&&_!=="reset"||l!=null)){Sa(a);return}f=f!=null?""+ei(f):"",l=l!=null?""+ei(l):f,W||l===a.value||(a.value=l),a.defaultValue=l}y=y??C,y=typeof y!="function"&&typeof y!="symbol"&&!!y,a.checked=W?a.checked:!!y,a.defaultChecked=!!y,F!=null&&typeof F!="function"&&typeof F!="symbol"&&typeof F!="boolean"&&(a.name=F),Sa(a)}function oc(a,l,f){l==="number"&&Cs(a.ownerDocument)===a||a.defaultValue===""+f||(a.defaultValue=""+f)}function $n(a,l,f,y){if(a=a.options,l){l={};for(var C=0;C<f.length;C++)l["$"+f[C]]=!0;for(f=0;f<a.length;f++)C=l.hasOwnProperty("$"+a[f].value),a[f].selected!==C&&(a[f].selected=C),C&&y&&(a[f].defaultSelected=!0)}else{for(f=""+ei(f),l=null,C=0;C<a.length;C++){if(a[C].value===f){a[C].selected=!0,y&&(a[C].defaultSelected=!0);return}l!==null||a[C].disabled||(l=a[C])}l!==null&&(l.selected=!0)}}function DS(a,l,f){if(l!=null&&(l=""+ei(l),l!==a.value&&(a.value=l),f==null)){a.defaultValue!==l&&(a.defaultValue=l);return}a.defaultValue=f!=null?""+ei(f):""}function FS(a,l,f,y){if(l==null){if(y!=null){if(f!=null)throw Error(i(92));if(I(y)){if(1<y.length)throw Error(i(93));y=y[0]}f=y}f==null&&(f=""),l=f}f=ei(l),a.defaultValue=f,y=a.textContent,y===f&&y!==""&&y!==null&&(a.value=y),Sa(a)}function vo(a,l){if(l){var f=a.firstChild;if(f&&f===a.lastChild&&f.nodeType===3){f.nodeValue=l;return}}a.textContent=l}var Pj=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function IS(a,l,f){var y=l.indexOf("--")===0;f==null||typeof f=="boolean"||f===""?y?a.setProperty(l,""):l==="float"?a.cssFloat="":a[l]="":y?a.setProperty(l,f):typeof f!="number"||f===0||Pj.has(l)?l==="float"?a.cssFloat=f:a[l]=(""+f).trim():a[l]=f+"px"}function qS(a,l,f){if(l!=null&&typeof l!="object")throw Error(i(62));if(a=a.style,f!=null){for(var y in f)!f.hasOwnProperty(y)||l!=null&&l.hasOwnProperty(y)||(y.indexOf("--")===0?a.setProperty(y,""):y==="float"?a.cssFloat="":a[y]="");for(var C in l)y=l[C],l.hasOwnProperty(C)&&f[C]!==y&&IS(a,C,y)}else for(var _ in l)l.hasOwnProperty(_)&&IS(a,_,l[_])}function cg(a){if(a.indexOf("-")===-1)return!1;switch(a){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Hj=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Uj=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Eh(a){return Uj.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function Pn(){}var ug=null;function hg(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Co=null,wo=null;function zS(a){var l=wt(a);if(l&&(a=l.stateNode)){var f=a[$e]||null;t:switch(a=l.stateNode,l.type){case"input":if(ws(a,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name),l=f.name,f.type==="radio"&&l!=null){for(f=a;f.parentNode;)f=f.parentNode;for(f=f.querySelectorAll('input[name="'+ri(""+l)+'"][type="radio"]'),l=0;l<f.length;l++){var y=f[l];if(y!==a&&y.form===a.form){var C=y[$e]||null;if(!C)throw Error(i(90));ws(y,C.value,C.defaultValue,C.defaultValue,C.checked,C.defaultChecked,C.type,C.name)}}for(l=0;l<f.length;l++)y=f[l],y.form===a.form&&_h(y)}break t;case"textarea":DS(a,f.value,f.defaultValue);break t;case"select":l=f.value,l!=null&&$n(a,!!f.multiple,l,!1)}}}var dg=!1;function jS(a,l,f){if(dg)return a(l,f);dg=!0;try{var y=a(l);return y}finally{if(dg=!1,(Co!==null||wo!==null)&&(pd(),Co&&(l=Co,a=wo,wo=Co=null,zS(l),a)))for(l=0;l<a.length;l++)zS(a[l])}}function lc(a,l){var f=a.stateNode;if(f===null)return null;var y=f[$e]||null;if(y===null)return null;f=y[l];t:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(y=!y.disabled)||(a=a.type,y=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!y;break t;default:a=!1}if(a)return null;if(f&&typeof f!="function")throw Error(i(231,l,typeof f));return f}var Hn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fg=!1;if(Hn)try{var cc={};Object.defineProperty(cc,"passive",{get:function(){fg=!0}}),window.addEventListener("test",cc,cc),window.removeEventListener("test",cc,cc)}catch{fg=!1}var ka=null,pg=null,Ah=null;function $S(){if(Ah)return Ah;var a,l=pg,f=l.length,y,C="value"in ka?ka.value:ka.textContent,_=C.length;for(a=0;a<f&&l[a]===C[a];a++);var F=f-a;for(y=1;y<=F&&l[f-y]===C[_-y];y++);return Ah=C.slice(a,1<y?1-y:void 0)}function Bh(a){var l=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&l===13&&(a=13)):a=l,a===10&&(a=13),32<=a||a===13?a:0}function Lh(){return!0}function PS(){return!1}function ii(a){function l(f,y,C,_,F){this._reactName=f,this._targetInst=C,this.type=y,this.nativeEvent=_,this.target=F,this.currentTarget=null;for(var W in a)a.hasOwnProperty(W)&&(f=a[W],this[W]=f?f(_):_[W]);return this.isDefaultPrevented=(_.defaultPrevented!=null?_.defaultPrevented:_.returnValue===!1)?Lh:PS,this.isPropagationStopped=PS,this}return p(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var f=this.nativeEvent;f&&(f.preventDefault?f.preventDefault():typeof f.returnValue!="unknown"&&(f.returnValue=!1),this.isDefaultPrevented=Lh)},stopPropagation:function(){var f=this.nativeEvent;f&&(f.stopPropagation?f.stopPropagation():typeof f.cancelBubble!="unknown"&&(f.cancelBubble=!0),this.isPropagationStopped=Lh)},persist:function(){},isPersistent:Lh}),l}var Ss={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Mh=ii(Ss),uc=p({},Ss,{view:0,detail:0}),Gj=ii(uc),gg,mg,hc,Nh=p({},uc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xg,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==hc&&(hc&&a.type==="mousemove"?(gg=a.screenX-hc.screenX,mg=a.screenY-hc.screenY):mg=gg=0,hc=a),gg)},movementY:function(a){return"movementY"in a?a.movementY:mg}}),HS=ii(Nh),Yj=p({},Nh,{dataTransfer:0}),Vj=ii(Yj),Wj=p({},uc,{relatedTarget:0}),yg=ii(Wj),Xj=p({},Ss,{animationName:0,elapsedTime:0,pseudoElement:0}),Qj=ii(Xj),Zj=p({},Ss,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),Kj=ii(Zj),Jj=p({},Ss,{data:0}),US=ii(Jj),t$={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},e$={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"},r$={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function i$(a){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(a):(a=r$[a])?!!l[a]:!1}function xg(){return i$}var n$=p({},uc,{key:function(a){if(a.key){var l=t$[a.key]||a.key;if(l!=="Unidentified")return l}return a.type==="keypress"?(a=Bh(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?e$[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xg,charCode:function(a){return a.type==="keypress"?Bh(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?Bh(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),a$=ii(n$),s$=p({},Nh,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),GS=ii(s$),o$=p({},uc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xg}),l$=ii(o$),c$=p({},Ss,{propertyName:0,elapsedTime:0,pseudoElement:0}),u$=ii(c$),h$=p({},Nh,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),d$=ii(h$),f$=p({},Ss,{newState:0,oldState:0}),p$=ii(f$),g$=[9,13,27,32],bg=Hn&&"CompositionEvent"in window,dc=null;Hn&&"documentMode"in document&&(dc=document.documentMode);var m$=Hn&&"TextEvent"in window&&!dc,YS=Hn&&(!bg||dc&&8<dc&&11>=dc),VS=" ",WS=!1;function XS(a,l){switch(a){case"keyup":return g$.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function QS(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var So=!1;function y$(a,l){switch(a){case"compositionend":return QS(l);case"keypress":return l.which!==32?null:(WS=!0,VS);case"textInput":return a=l.data,a===VS&&WS?null:a;default:return null}}function x$(a,l){if(So)return a==="compositionend"||!bg&&XS(a,l)?(a=$S(),Ah=pg=ka=null,So=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return YS&&l.locale!=="ko"?null:l.data;default:return null}}var b$={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 ZS(a){var l=a&&a.nodeName&&a.nodeName.toLowerCase();return l==="input"?!!b$[a.type]:l==="textarea"}function KS(a,l,f,y){Co?wo?wo.push(y):wo=[y]:Co=y,l=Cd(l,"onChange"),0<l.length&&(f=new Mh("onChange","change",null,f,y),a.push({event:f,listeners:l}))}var fc=null,pc=null;function v$(a){RT(a,0)}function Oh(a){var l=Ot(a);if(_h(l))return a}function JS(a,l){if(a==="change")return l}var tk=!1;if(Hn){var vg;if(Hn){var Cg="oninput"in document;if(!Cg){var ek=document.createElement("div");ek.setAttribute("oninput","return;"),Cg=typeof ek.oninput=="function"}vg=Cg}else vg=!1;tk=vg&&(!document.documentMode||9<document.documentMode)}function rk(){fc&&(fc.detachEvent("onpropertychange",ik),pc=fc=null)}function ik(a){if(a.propertyName==="value"&&Oh(pc)){var l=[];KS(l,pc,a,hg(a)),jS(v$,l)}}function C$(a,l,f){a==="focusin"?(rk(),fc=l,pc=f,fc.attachEvent("onpropertychange",ik)):a==="focusout"&&rk()}function w$(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return Oh(pc)}function S$(a,l){if(a==="click")return Oh(l)}function k$(a,l){if(a==="input"||a==="change")return Oh(l)}function _$(a,l){return a===l&&(a!==0||1/a===1/l)||a!==a&&l!==l}var bi=typeof Object.is=="function"?Object.is:_$;function gc(a,l){if(bi(a,l))return!0;if(typeof a!="object"||a===null||typeof l!="object"||l===null)return!1;var f=Object.keys(a),y=Object.keys(l);if(f.length!==y.length)return!1;for(y=0;y<f.length;y++){var C=f[y];if(!Ee.call(l,C)||!bi(a[C],l[C]))return!1}return!0}function nk(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function ak(a,l){var f=nk(a);a=0;for(var y;f;){if(f.nodeType===3){if(y=a+f.textContent.length,a<=l&&y>=l)return{node:f,offset:l-a};a=y}t:{for(;f;){if(f.nextSibling){f=f.nextSibling;break t}f=f.parentNode}f=void 0}f=nk(f)}}function sk(a,l){return a&&l?a===l?!0:a&&a.nodeType===3?!1:l&&l.nodeType===3?sk(a,l.parentNode):"contains"in a?a.contains(l):a.compareDocumentPosition?!!(a.compareDocumentPosition(l)&16):!1:!1}function ok(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var l=Cs(a.document);l instanceof a.HTMLIFrameElement;){try{var f=typeof l.contentWindow.location.href=="string"}catch{f=!1}if(f)a=l.contentWindow;else break;l=Cs(a.document)}return l}function wg(a){var l=a&&a.nodeName&&a.nodeName.toLowerCase();return l&&(l==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||l==="textarea"||a.contentEditable==="true")}var T$=Hn&&"documentMode"in document&&11>=document.documentMode,ko=null,Sg=null,mc=null,kg=!1;function lk(a,l,f){var y=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;kg||ko==null||ko!==Cs(y)||(y=ko,"selectionStart"in y&&wg(y)?y={start:y.selectionStart,end:y.selectionEnd}:(y=(y.ownerDocument&&y.ownerDocument.defaultView||window).getSelection(),y={anchorNode:y.anchorNode,anchorOffset:y.anchorOffset,focusNode:y.focusNode,focusOffset:y.focusOffset}),mc&&gc(mc,y)||(mc=y,y=Cd(Sg,"onSelect"),0<y.length&&(l=new Mh("onSelect","select",null,l,f),a.push({event:l,listeners:y}),l.target=ko)))}function ks(a,l){var f={};return f[a.toLowerCase()]=l.toLowerCase(),f["Webkit"+a]="webkit"+l,f["Moz"+a]="moz"+l,f}var _o={animationend:ks("Animation","AnimationEnd"),animationiteration:ks("Animation","AnimationIteration"),animationstart:ks("Animation","AnimationStart"),transitionrun:ks("Transition","TransitionRun"),transitionstart:ks("Transition","TransitionStart"),transitioncancel:ks("Transition","TransitionCancel"),transitionend:ks("Transition","TransitionEnd")},_g={},ck={};Hn&&(ck=document.createElement("div").style,"AnimationEvent"in window||(delete _o.animationend.animation,delete _o.animationiteration.animation,delete _o.animationstart.animation),"TransitionEvent"in window||delete _o.transitionend.transition);function _s(a){if(_g[a])return _g[a];if(!_o[a])return a;var l=_o[a],f;for(f in l)if(l.hasOwnProperty(f)&&f in ck)return _g[a]=l[f];return a}var uk=_s("animationend"),hk=_s("animationiteration"),dk=_s("animationstart"),E$=_s("transitionrun"),A$=_s("transitionstart"),B$=_s("transitioncancel"),fk=_s("transitionend"),pk=new Map,Tg="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Tg.push("scrollEnd");function Xi(a,l){pk.set(a,l),or(l,[a])}var Rh=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},Ni=[],To=0,Eg=0;function Dh(){for(var a=To,l=Eg=To=0;l<a;){var f=Ni[l];Ni[l++]=null;var y=Ni[l];Ni[l++]=null;var C=Ni[l];Ni[l++]=null;var _=Ni[l];if(Ni[l++]=null,y!==null&&C!==null){var F=y.pending;F===null?C.next=C:(C.next=F.next,F.next=C),y.pending=C}_!==0&&gk(f,C,_)}}function Fh(a,l,f,y){Ni[To++]=a,Ni[To++]=l,Ni[To++]=f,Ni[To++]=y,Eg|=y,a.lanes|=y,a=a.alternate,a!==null&&(a.lanes|=y)}function Ag(a,l,f,y){return Fh(a,l,f,y),Ih(a)}function Ts(a,l){return Fh(a,null,null,l),Ih(a)}function gk(a,l,f){a.lanes|=f;var y=a.alternate;y!==null&&(y.lanes|=f);for(var C=!1,_=a.return;_!==null;)_.childLanes|=f,y=_.alternate,y!==null&&(y.childLanes|=f),_.tag===22&&(a=_.stateNode,a===null||a._visibility&1||(C=!0)),a=_,_=_.return;return a.tag===3?(_=a.stateNode,C&&l!==null&&(C=31-Nt(f),a=_.hiddenUpdates,y=a[C],y===null?a[C]=[l]:y.push(l),l.lane=f|536870912),_):null}function Ih(a){if(50<qc)throw qc=0,Im=null,Error(i(185));for(var l=a.return;l!==null;)a=l,l=a.return;return a.tag===3?a.stateNode:null}var Eo={};function L$(a,l,f,y){this.tag=a,this.key=f,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=y,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vi(a,l,f,y){return new L$(a,l,f,y)}function Bg(a){return a=a.prototype,!(!a||!a.isReactComponent)}function Un(a,l){var f=a.alternate;return f===null?(f=vi(a.tag,l,a.key,a.mode),f.elementType=a.elementType,f.type=a.type,f.stateNode=a.stateNode,f.alternate=a,a.alternate=f):(f.pendingProps=l,f.type=a.type,f.flags=0,f.subtreeFlags=0,f.deletions=null),f.flags=a.flags&65011712,f.childLanes=a.childLanes,f.lanes=a.lanes,f.child=a.child,f.memoizedProps=a.memoizedProps,f.memoizedState=a.memoizedState,f.updateQueue=a.updateQueue,l=a.dependencies,f.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},f.sibling=a.sibling,f.index=a.index,f.ref=a.ref,f.refCleanup=a.refCleanup,f}function mk(a,l){a.flags&=65011714;var f=a.alternate;return f===null?(a.childLanes=0,a.lanes=l,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=f.childLanes,a.lanes=f.lanes,a.child=f.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=f.memoizedProps,a.memoizedState=f.memoizedState,a.updateQueue=f.updateQueue,a.type=f.type,l=f.dependencies,a.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),a}function qh(a,l,f,y,C,_){var F=0;if(y=a,typeof a=="function")Bg(a)&&(F=1);else if(typeof a=="string")F=DP(a,f,Q.current)?26:a==="html"||a==="head"||a==="body"?27:5;else t:switch(a){case Y:return a=vi(31,f,l,C),a.elementType=Y,a.lanes=_,a;case v:return Es(f.children,C,_,l);case b:F=8,C|=24;break;case w:return a=vi(12,f,l,C|2),a.elementType=w,a.lanes=_,a;case L:return a=vi(13,f,l,C),a.elementType=L,a.lanes=_,a;case A:return a=vi(19,f,l,C),a.elementType=A,a.lanes=_,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case k:F=10;break t;case T:F=9;break t;case E:F=11;break t;case R:F=14;break t;case j:F=16,y=null;break t}F=29,f=Error(i(130,a===null?"null":typeof a,"")),y=null}return l=vi(F,f,l,C),l.elementType=a,l.type=y,l.lanes=_,l}function Es(a,l,f,y){return a=vi(7,a,y,l),a.lanes=f,a}function Lg(a,l,f){return a=vi(6,a,null,l),a.lanes=f,a}function yk(a){var l=vi(18,null,null,0);return l.stateNode=a,l}function Mg(a,l,f){return l=vi(4,a.children!==null?a.children:[],a.key,l),l.lanes=f,l.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},l}var xk=new WeakMap;function Oi(a,l){if(typeof a=="object"&&a!==null){var f=xk.get(a);return f!==void 0?f:(l={value:a,source:l,stack:ve(l)},xk.set(a,l),l)}return{value:a,source:l,stack:ve(l)}}var Ao=[],Bo=0,zh=null,yc=0,Ri=[],Di=0,_a=null,bn=1,vn="";function Gn(a,l){Ao[Bo++]=yc,Ao[Bo++]=zh,zh=a,yc=l}function bk(a,l,f){Ri[Di++]=bn,Ri[Di++]=vn,Ri[Di++]=_a,_a=a;var y=bn;a=vn;var C=32-Nt(y)-1;y&=~(1<<C),f+=1;var _=32-Nt(l)+C;if(30<_){var F=C-C%5;_=(y&(1<<F)-1).toString(32),y>>=F,C-=F,bn=1<<32-Nt(l)+C|f<<C|y,vn=_+a}else bn=1<<_|f<<C|y,vn=a}function Ng(a){a.return!==null&&(Gn(a,1),bk(a,1,0))}function Og(a){for(;a===zh;)zh=Ao[--Bo],Ao[Bo]=null,yc=Ao[--Bo],Ao[Bo]=null;for(;a===_a;)_a=Ri[--Di],Ri[Di]=null,vn=Ri[--Di],Ri[Di]=null,bn=Ri[--Di],Ri[Di]=null}function vk(a,l){Ri[Di++]=bn,Ri[Di++]=vn,Ri[Di++]=_a,bn=l.id,vn=l.overflow,_a=a}var Or=null,Ge=null,ye=!1,Ta=null,Fi=!1,Rg=Error(i(519));function Ea(a){var l=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw xc(Oi(l,a)),Rg}function Ck(a){var l=a.stateNode,f=a.type,y=a.memoizedProps;switch(l[ir]=a,l[$e]=y,f){case"dialog":de("cancel",l),de("close",l);break;case"iframe":case"object":case"embed":de("load",l);break;case"video":case"audio":for(f=0;f<jc.length;f++)de(jc[f],l);break;case"source":de("error",l);break;case"img":case"image":case"link":de("error",l),de("load",l);break;case"details":de("toggle",l);break;case"input":de("invalid",l),Th(l,y.value,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name,!0);break;case"select":de("invalid",l);break;case"textarea":de("invalid",l),FS(l,y.value,y.defaultValue,y.children)}f=y.children,typeof f!="string"&&typeof f!="number"&&typeof f!="bigint"||l.textContent===""+f||y.suppressHydrationWarning===!0||qT(l.textContent,f)?(y.popover!=null&&(de("beforetoggle",l),de("toggle",l)),y.onScroll!=null&&de("scroll",l),y.onScrollEnd!=null&&de("scrollend",l),y.onClick!=null&&(l.onclick=Pn),l=!0):l=!1,l||Ea(a,!0)}function wk(a){for(Or=a.return;Or;)switch(Or.tag){case 5:case 31:case 13:Fi=!1;return;case 27:case 3:Fi=!0;return;default:Or=Or.return}}function Lo(a){if(a!==Or)return!1;if(!ye)return wk(a),ye=!0,!1;var l=a.tag,f;if((f=l!==3&&l!==27)&&((f=l===5)&&(f=a.type,f=!(f!=="form"&&f!=="button")||Km(a.type,a.memoizedProps)),f=!f),f&&Ge&&Ea(a),wk(a),l===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(i(317));Ge=VT(a)}else if(l===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(i(317));Ge=VT(a)}else l===27?(l=Ge,$a(a.type)?(a=i0,i0=null,Ge=a):Ge=l):Ge=Or?qi(a.stateNode.nextSibling):null;return!0}function As(){Ge=Or=null,ye=!1}function Dg(){var a=Ta;return a!==null&&(oi===null?oi=a:oi.push.apply(oi,a),Ta=null),a}function xc(a){Ta===null?Ta=[a]:Ta.push(a)}var Fg=G(null),Bs=null,Yn=null;function Aa(a,l,f){H(Fg,l._currentValue),l._currentValue=f}function Vn(a){a._currentValue=Fg.current,Z(Fg)}function Ig(a,l,f){for(;a!==null;){var y=a.alternate;if((a.childLanes&l)!==l?(a.childLanes|=l,y!==null&&(y.childLanes|=l)):y!==null&&(y.childLanes&l)!==l&&(y.childLanes|=l),a===f)break;a=a.return}}function qg(a,l,f,y){var C=a.child;for(C!==null&&(C.return=a);C!==null;){var _=C.dependencies;if(_!==null){var F=C.child;_=_.firstContext;t:for(;_!==null;){var W=_;_=C;for(var rt=0;rt<l.length;rt++)if(W.context===l[rt]){_.lanes|=f,W=_.alternate,W!==null&&(W.lanes|=f),Ig(_.return,f,a),y||(F=null);break t}_=W.next}}else if(C.tag===18){if(F=C.return,F===null)throw Error(i(341));F.lanes|=f,_=F.alternate,_!==null&&(_.lanes|=f),Ig(F,f,a),F=null}else F=C.child;if(F!==null)F.return=C;else for(F=C;F!==null;){if(F===a){F=null;break}if(C=F.sibling,C!==null){C.return=F.return,F=C;break}F=F.return}C=F}}function Mo(a,l,f,y){a=null;for(var C=l,_=!1;C!==null;){if(!_){if((C.flags&524288)!==0)_=!0;else if((C.flags&262144)!==0)break}if(C.tag===10){var F=C.alternate;if(F===null)throw Error(i(387));if(F=F.memoizedProps,F!==null){var W=C.type;bi(C.pendingProps.value,F.value)||(a!==null?a.push(W):a=[W])}}else if(C===at.current){if(F=C.alternate,F===null)throw Error(i(387));F.memoizedState.memoizedState!==C.memoizedState.memoizedState&&(a!==null?a.push(Gc):a=[Gc])}C=C.return}a!==null&&qg(l,a,f,y),l.flags|=262144}function jh(a){for(a=a.firstContext;a!==null;){if(!bi(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function Ls(a){Bs=a,Yn=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function Rr(a){return Sk(Bs,a)}function $h(a,l){return Bs===null&&Ls(a),Sk(a,l)}function Sk(a,l){var f=l._currentValue;if(l={context:l,memoizedValue:f,next:null},Yn===null){if(a===null)throw Error(i(308));Yn=l,a.dependencies={lanes:0,firstContext:l},a.flags|=524288}else Yn=Yn.next=l;return f}var M$=typeof AbortController<"u"?AbortController:function(){var a=[],l=this.signal={aborted:!1,addEventListener:function(f,y){a.push(y)}};this.abort=function(){l.aborted=!0,a.forEach(function(f){return f()})}},N$=t.unstable_scheduleCallback,O$=t.unstable_NormalPriority,mr={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zg(){return{controller:new M$,data:new Map,refCount:0}}function bc(a){a.refCount--,a.refCount===0&&N$(O$,function(){a.controller.abort()})}var vc=null,jg=0,No=0,Oo=null;function R$(a,l){if(vc===null){var f=vc=[];jg=0,No=Hm(),Oo={status:"pending",value:void 0,then:function(y){f.push(y)}}}return jg++,l.then(kk,kk),l}function kk(){if(--jg===0&&vc!==null){Oo!==null&&(Oo.status="fulfilled");var a=vc;vc=null,No=0,Oo=null;for(var l=0;l<a.length;l++)(0,a[l])()}}function D$(a,l){var f=[],y={status:"pending",value:null,reason:null,then:function(C){f.push(C)}};return a.then(function(){y.status="fulfilled",y.value=l;for(var C=0;C<f.length;C++)(0,f[C])(l)},function(C){for(y.status="rejected",y.reason=C,C=0;C<f.length;C++)(0,f[C])(void 0)}),y}var _k=N.S;N.S=function(a,l){lT=Ae(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&R$(a,l),_k!==null&&_k(a,l)};var Ms=G(null);function $g(){var a=Ms.current;return a!==null?a:ze.pooledCache}function Ph(a,l){l===null?H(Ms,Ms.current):H(Ms,l.pool)}function Tk(){var a=$g();return a===null?null:{parent:mr._currentValue,pool:a}}var Ro=Error(i(460)),Pg=Error(i(474)),Hh=Error(i(542)),Uh={then:function(){}};function Ek(a){return a=a.status,a==="fulfilled"||a==="rejected"}function Ak(a,l,f){switch(f=a[f],f===void 0?a.push(l):f!==l&&(l.then(Pn,Pn),l=f),l.status){case"fulfilled":return l.value;case"rejected":throw a=l.reason,Lk(a),a;default:if(typeof l.status=="string")l.then(Pn,Pn);else{if(a=ze,a!==null&&100<a.shellSuspendCounter)throw Error(i(482));a=l,a.status="pending",a.then(function(y){if(l.status==="pending"){var C=l;C.status="fulfilled",C.value=y}},function(y){if(l.status==="pending"){var C=l;C.status="rejected",C.reason=y}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw a=l.reason,Lk(a),a}throw Os=l,Ro}}function Ns(a){try{var l=a._init;return l(a._payload)}catch(f){throw f!==null&&typeof f=="object"&&typeof f.then=="function"?(Os=f,Ro):f}}var Os=null;function Bk(){if(Os===null)throw Error(i(459));var a=Os;return Os=null,a}function Lk(a){if(a===Ro||a===Hh)throw Error(i(483))}var Do=null,Cc=0;function Gh(a){var l=Cc;return Cc+=1,Do===null&&(Do=[]),Ak(Do,a,l)}function wc(a,l){l=l.props.ref,a.ref=l!==void 0?l:null}function Yh(a,l){throw l.$$typeof===m?Error(i(525)):(a=Object.prototype.toString.call(l),Error(i(31,a==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":a)))}function Mk(a){function l(st,it){if(a){var ct=st.deletions;ct===null?(st.deletions=[it],st.flags|=16):ct.push(it)}}function f(st,it){if(!a)return null;for(;it!==null;)l(st,it),it=it.sibling;return null}function y(st){for(var it=new Map;st!==null;)st.key!==null?it.set(st.key,st):it.set(st.index,st),st=st.sibling;return it}function C(st,it){return st=Un(st,it),st.index=0,st.sibling=null,st}function _(st,it,ct){return st.index=ct,a?(ct=st.alternate,ct!==null?(ct=ct.index,ct<it?(st.flags|=67108866,it):ct):(st.flags|=67108866,it)):(st.flags|=1048576,it)}function F(st){return a&&st.alternate===null&&(st.flags|=67108866),st}function W(st,it,ct,vt){return it===null||it.tag!==6?(it=Lg(ct,st.mode,vt),it.return=st,it):(it=C(it,ct),it.return=st,it)}function rt(st,it,ct,vt){var Wt=ct.type;return Wt===v?yt(st,it,ct.props.children,vt,ct.key):it!==null&&(it.elementType===Wt||typeof Wt=="object"&&Wt!==null&&Wt.$$typeof===j&&Ns(Wt)===it.type)?(it=C(it,ct.props),wc(it,ct),it.return=st,it):(it=qh(ct.type,ct.key,ct.props,null,st.mode,vt),wc(it,ct),it.return=st,it)}function ut(st,it,ct,vt){return it===null||it.tag!==4||it.stateNode.containerInfo!==ct.containerInfo||it.stateNode.implementation!==ct.implementation?(it=Mg(ct,st.mode,vt),it.return=st,it):(it=C(it,ct.children||[]),it.return=st,it)}function yt(st,it,ct,vt,Wt){return it===null||it.tag!==7?(it=Es(ct,st.mode,vt,Wt),it.return=st,it):(it=C(it,ct),it.return=st,it)}function Ct(st,it,ct){if(typeof it=="string"&&it!==""||typeof it=="number"||typeof it=="bigint")return it=Lg(""+it,st.mode,ct),it.return=st,it;if(typeof it=="object"&&it!==null){switch(it.$$typeof){case g:return ct=qh(it.type,it.key,it.props,null,st.mode,ct),wc(ct,it),ct.return=st,ct;case x:return it=Mg(it,st.mode,ct),it.return=st,it;case j:return it=Ns(it),Ct(st,it,ct)}if(I(it)||z(it))return it=Es(it,st.mode,ct,null),it.return=st,it;if(typeof it.then=="function")return Ct(st,Gh(it),ct);if(it.$$typeof===k)return Ct(st,$h(st,it),ct);Yh(st,it)}return null}function ht(st,it,ct,vt){var Wt=it!==null?it.key:null;if(typeof ct=="string"&&ct!==""||typeof ct=="number"||typeof ct=="bigint")return Wt!==null?null:W(st,it,""+ct,vt);if(typeof ct=="object"&&ct!==null){switch(ct.$$typeof){case g:return ct.key===Wt?rt(st,it,ct,vt):null;case x:return ct.key===Wt?ut(st,it,ct,vt):null;case j:return ct=Ns(ct),ht(st,it,ct,vt)}if(I(ct)||z(ct))return Wt!==null?null:yt(st,it,ct,vt,null);if(typeof ct.then=="function")return ht(st,it,Gh(ct),vt);if(ct.$$typeof===k)return ht(st,it,$h(st,ct),vt);Yh(st,ct)}return null}function pt(st,it,ct,vt,Wt){if(typeof vt=="string"&&vt!==""||typeof vt=="number"||typeof vt=="bigint")return st=st.get(ct)||null,W(it,st,""+vt,Wt);if(typeof vt=="object"&&vt!==null){switch(vt.$$typeof){case g:return st=st.get(vt.key===null?ct:vt.key)||null,rt(it,st,vt,Wt);case x:return st=st.get(vt.key===null?ct:vt.key)||null,ut(it,st,vt,Wt);case j:return vt=Ns(vt),pt(st,it,ct,vt,Wt)}if(I(vt)||z(vt))return st=st.get(ct)||null,yt(it,st,vt,Wt,null);if(typeof vt.then=="function")return pt(st,it,ct,Gh(vt),Wt);if(vt.$$typeof===k)return pt(st,it,ct,$h(it,vt),Wt);Yh(it,vt)}return null}function Ft(st,it,ct,vt){for(var Wt=null,Se=null,$t=it,oe=it=0,pe=null;$t!==null&&oe<ct.length;oe++){$t.index>oe?(pe=$t,$t=null):pe=$t.sibling;var ke=ht(st,$t,ct[oe],vt);if(ke===null){$t===null&&($t=pe);break}a&&$t&&ke.alternate===null&&l(st,$t),it=_(ke,it,oe),Se===null?Wt=ke:Se.sibling=ke,Se=ke,$t=pe}if(oe===ct.length)return f(st,$t),ye&&Gn(st,oe),Wt;if($t===null){for(;oe<ct.length;oe++)$t=Ct(st,ct[oe],vt),$t!==null&&(it=_($t,it,oe),Se===null?Wt=$t:Se.sibling=$t,Se=$t);return ye&&Gn(st,oe),Wt}for($t=y($t);oe<ct.length;oe++)pe=pt($t,st,oe,ct[oe],vt),pe!==null&&(a&&pe.alternate!==null&&$t.delete(pe.key===null?oe:pe.key),it=_(pe,it,oe),Se===null?Wt=pe:Se.sibling=pe,Se=pe);return a&&$t.forEach(function(Ya){return l(st,Ya)}),ye&&Gn(st,oe),Wt}function Zt(st,it,ct,vt){if(ct==null)throw Error(i(151));for(var Wt=null,Se=null,$t=it,oe=it=0,pe=null,ke=ct.next();$t!==null&&!ke.done;oe++,ke=ct.next()){$t.index>oe?(pe=$t,$t=null):pe=$t.sibling;var Ya=ht(st,$t,ke.value,vt);if(Ya===null){$t===null&&($t=pe);break}a&&$t&&Ya.alternate===null&&l(st,$t),it=_(Ya,it,oe),Se===null?Wt=Ya:Se.sibling=Ya,Se=Ya,$t=pe}if(ke.done)return f(st,$t),ye&&Gn(st,oe),Wt;if($t===null){for(;!ke.done;oe++,ke=ct.next())ke=Ct(st,ke.value,vt),ke!==null&&(it=_(ke,it,oe),Se===null?Wt=ke:Se.sibling=ke,Se=ke);return ye&&Gn(st,oe),Wt}for($t=y($t);!ke.done;oe++,ke=ct.next())ke=pt($t,st,oe,ke.value,vt),ke!==null&&(a&&ke.alternate!==null&&$t.delete(ke.key===null?oe:ke.key),it=_(ke,it,oe),Se===null?Wt=ke:Se.sibling=ke,Se=ke);return a&&$t.forEach(function(YP){return l(st,YP)}),ye&&Gn(st,oe),Wt}function Ie(st,it,ct,vt){if(typeof ct=="object"&&ct!==null&&ct.type===v&&ct.key===null&&(ct=ct.props.children),typeof ct=="object"&&ct!==null){switch(ct.$$typeof){case g:t:{for(var Wt=ct.key;it!==null;){if(it.key===Wt){if(Wt=ct.type,Wt===v){if(it.tag===7){f(st,it.sibling),vt=C(it,ct.props.children),vt.return=st,st=vt;break t}}else if(it.elementType===Wt||typeof Wt=="object"&&Wt!==null&&Wt.$$typeof===j&&Ns(Wt)===it.type){f(st,it.sibling),vt=C(it,ct.props),wc(vt,ct),vt.return=st,st=vt;break t}f(st,it);break}else l(st,it);it=it.sibling}ct.type===v?(vt=Es(ct.props.children,st.mode,vt,ct.key),vt.return=st,st=vt):(vt=qh(ct.type,ct.key,ct.props,null,st.mode,vt),wc(vt,ct),vt.return=st,st=vt)}return F(st);case x:t:{for(Wt=ct.key;it!==null;){if(it.key===Wt)if(it.tag===4&&it.stateNode.containerInfo===ct.containerInfo&&it.stateNode.implementation===ct.implementation){f(st,it.sibling),vt=C(it,ct.children||[]),vt.return=st,st=vt;break t}else{f(st,it);break}else l(st,it);it=it.sibling}vt=Mg(ct,st.mode,vt),vt.return=st,st=vt}return F(st);case j:return ct=Ns(ct),Ie(st,it,ct,vt)}if(I(ct))return Ft(st,it,ct,vt);if(z(ct)){if(Wt=z(ct),typeof Wt!="function")throw Error(i(150));return ct=Wt.call(ct),Zt(st,it,ct,vt)}if(typeof ct.then=="function")return Ie(st,it,Gh(ct),vt);if(ct.$$typeof===k)return Ie(st,it,$h(st,ct),vt);Yh(st,ct)}return typeof ct=="string"&&ct!==""||typeof ct=="number"||typeof ct=="bigint"?(ct=""+ct,it!==null&&it.tag===6?(f(st,it.sibling),vt=C(it,ct),vt.return=st,st=vt):(f(st,it),vt=Lg(ct,st.mode,vt),vt.return=st,st=vt),F(st)):f(st,it)}return function(st,it,ct,vt){try{Cc=0;var Wt=Ie(st,it,ct,vt);return Do=null,Wt}catch($t){if($t===Ro||$t===Hh)throw $t;var Se=vi(29,$t,null,st.mode);return Se.lanes=vt,Se.return=st,Se}finally{}}}var Rs=Mk(!0),Nk=Mk(!1),Ba=!1;function Hg(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ug(a,l){a=a.updateQueue,l.updateQueue===a&&(l.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function La(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function Ma(a,l,f){var y=a.updateQueue;if(y===null)return null;if(y=y.shared,(Be&2)!==0){var C=y.pending;return C===null?l.next=l:(l.next=C.next,C.next=l),y.pending=l,l=Ih(a),gk(a,null,f),l}return Fh(a,y,l,f),Ih(a)}function Sc(a,l,f){if(l=l.updateQueue,l!==null&&(l=l.shared,(f&4194048)!==0)){var y=l.lanes;y&=a.pendingLanes,f|=y,l.lanes=f,gs(a,f)}}function Gg(a,l){var f=a.updateQueue,y=a.alternate;if(y!==null&&(y=y.updateQueue,f===y)){var C=null,_=null;if(f=f.firstBaseUpdate,f!==null){do{var F={lane:f.lane,tag:f.tag,payload:f.payload,callback:null,next:null};_===null?C=_=F:_=_.next=F,f=f.next}while(f!==null);_===null?C=_=l:_=_.next=l}else C=_=l;f={baseState:y.baseState,firstBaseUpdate:C,lastBaseUpdate:_,shared:y.shared,callbacks:y.callbacks},a.updateQueue=f;return}a=f.lastBaseUpdate,a===null?f.firstBaseUpdate=l:a.next=l,f.lastBaseUpdate=l}var Yg=!1;function kc(){if(Yg){var a=Oo;if(a!==null)throw a}}function _c(a,l,f,y){Yg=!1;var C=a.updateQueue;Ba=!1;var _=C.firstBaseUpdate,F=C.lastBaseUpdate,W=C.shared.pending;if(W!==null){C.shared.pending=null;var rt=W,ut=rt.next;rt.next=null,F===null?_=ut:F.next=ut,F=rt;var yt=a.alternate;yt!==null&&(yt=yt.updateQueue,W=yt.lastBaseUpdate,W!==F&&(W===null?yt.firstBaseUpdate=ut:W.next=ut,yt.lastBaseUpdate=rt))}if(_!==null){var Ct=C.baseState;F=0,yt=ut=rt=null,W=_;do{var ht=W.lane&-536870913,pt=ht!==W.lane;if(pt?(fe&ht)===ht:(y&ht)===ht){ht!==0&&ht===No&&(Yg=!0),yt!==null&&(yt=yt.next={lane:0,tag:W.tag,payload:W.payload,callback:null,next:null});t:{var Ft=a,Zt=W;ht=l;var Ie=f;switch(Zt.tag){case 1:if(Ft=Zt.payload,typeof Ft=="function"){Ct=Ft.call(Ie,Ct,ht);break t}Ct=Ft;break t;case 3:Ft.flags=Ft.flags&-65537|128;case 0:if(Ft=Zt.payload,ht=typeof Ft=="function"?Ft.call(Ie,Ct,ht):Ft,ht==null)break t;Ct=p({},Ct,ht);break t;case 2:Ba=!0}}ht=W.callback,ht!==null&&(a.flags|=64,pt&&(a.flags|=8192),pt=C.callbacks,pt===null?C.callbacks=[ht]:pt.push(ht))}else pt={lane:ht,tag:W.tag,payload:W.payload,callback:W.callback,next:null},yt===null?(ut=yt=pt,rt=Ct):yt=yt.next=pt,F|=ht;if(W=W.next,W===null){if(W=C.shared.pending,W===null)break;pt=W,W=pt.next,pt.next=null,C.lastBaseUpdate=pt,C.shared.pending=null}}while(!0);yt===null&&(rt=Ct),C.baseState=rt,C.firstBaseUpdate=ut,C.lastBaseUpdate=yt,_===null&&(C.shared.lanes=0),Fa|=F,a.lanes=F,a.memoizedState=Ct}}function Ok(a,l){if(typeof a!="function")throw Error(i(191,a));a.call(l)}function Rk(a,l){var f=a.callbacks;if(f!==null)for(a.callbacks=null,a=0;a<f.length;a++)Ok(f[a],l)}var Fo=G(null),Vh=G(0);function Dk(a,l){a=ra,H(Vh,a),H(Fo,l),ra=a|l.baseLanes}function Vg(){H(Vh,ra),H(Fo,Fo.current)}function Wg(){ra=Vh.current,Z(Fo),Z(Vh)}var Ci=G(null),Ii=null;function Na(a){var l=a.alternate;H(dr,dr.current&1),H(Ci,a),Ii===null&&(l===null||Fo.current!==null||l.memoizedState!==null)&&(Ii=a)}function Xg(a){H(dr,dr.current),H(Ci,a),Ii===null&&(Ii=a)}function Fk(a){a.tag===22?(H(dr,dr.current),H(Ci,a),Ii===null&&(Ii=a)):Oa()}function Oa(){H(dr,dr.current),H(Ci,Ci.current)}function wi(a){Z(Ci),Ii===a&&(Ii=null),Z(dr)}var dr=G(0);function Wh(a){for(var l=a;l!==null;){if(l.tag===13){var f=l.memoizedState;if(f!==null&&(f=f.dehydrated,f===null||e0(f)||r0(f)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===a)break;for(;l.sibling===null;){if(l.return===null||l.return===a)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var Wn=0,se=null,De=null,yr=null,Xh=!1,Io=!1,Ds=!1,Qh=0,Tc=0,qo=null,F$=0;function lr(){throw Error(i(321))}function Qg(a,l){if(l===null)return!1;for(var f=0;f<l.length&&f<a.length;f++)if(!bi(a[f],l[f]))return!1;return!0}function Zg(a,l,f,y,C,_){return Wn=_,se=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,N.H=a===null||a.memoizedState===null?b_:dm,Ds=!1,_=f(y,C),Ds=!1,Io&&(_=qk(l,f,y,C)),Ik(a),_}function Ik(a){N.H=Bc;var l=De!==null&&De.next!==null;if(Wn=0,yr=De=se=null,Xh=!1,Tc=0,qo=null,l)throw Error(i(300));a===null||xr||(a=a.dependencies,a!==null&&jh(a)&&(xr=!0))}function qk(a,l,f,y){se=a;var C=0;do{if(Io&&(qo=null),Tc=0,Io=!1,25<=C)throw Error(i(301));if(C+=1,yr=De=null,a.updateQueue!=null){var _=a.updateQueue;_.lastEffect=null,_.events=null,_.stores=null,_.memoCache!=null&&(_.memoCache.index=0)}N.H=v_,_=l(f,y)}while(Io);return _}function I$(){var a=N.H,l=a.useState()[0];return l=typeof l.then=="function"?Ec(l):l,a=a.useState()[0],(De!==null?De.memoizedState:null)!==a&&(se.flags|=1024),l}function Kg(){var a=Qh!==0;return Qh=0,a}function Jg(a,l,f){l.updateQueue=a.updateQueue,l.flags&=-2053,a.lanes&=~f}function tm(a){if(Xh){for(a=a.memoizedState;a!==null;){var l=a.queue;l!==null&&(l.pending=null),a=a.next}Xh=!1}Wn=0,yr=De=se=null,Io=!1,Tc=Qh=0,qo=null}function Vr(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return yr===null?se.memoizedState=yr=a:yr=yr.next=a,yr}function fr(){if(De===null){var a=se.alternate;a=a!==null?a.memoizedState:null}else a=De.next;var l=yr===null?se.memoizedState:yr.next;if(l!==null)yr=l,De=a;else{if(a===null)throw se.alternate===null?Error(i(467)):Error(i(310));De=a,a={memoizedState:De.memoizedState,baseState:De.baseState,baseQueue:De.baseQueue,queue:De.queue,next:null},yr===null?se.memoizedState=yr=a:yr=yr.next=a}return yr}function Zh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ec(a){var l=Tc;return Tc+=1,qo===null&&(qo=[]),a=Ak(qo,a,l),l=se,(yr===null?l.memoizedState:yr.next)===null&&(l=l.alternate,N.H=l===null||l.memoizedState===null?b_:dm),a}function Kh(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return Ec(a);if(a.$$typeof===k)return Rr(a)}throw Error(i(438,String(a)))}function em(a){var l=null,f=se.updateQueue;if(f!==null&&(l=f.memoCache),l==null){var y=se.alternate;y!==null&&(y=y.updateQueue,y!==null&&(y=y.memoCache,y!=null&&(l={data:y.data.map(function(C){return C.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),f===null&&(f=Zh(),se.updateQueue=f),f.memoCache=l,f=l.data[l.index],f===void 0)for(f=l.data[l.index]=Array(a),y=0;y<a;y++)f[y]=V;return l.index++,f}function Xn(a,l){return typeof l=="function"?l(a):l}function Jh(a){var l=fr();return rm(l,De,a)}function rm(a,l,f){var y=a.queue;if(y===null)throw Error(i(311));y.lastRenderedReducer=f;var C=a.baseQueue,_=y.pending;if(_!==null){if(C!==null){var F=C.next;C.next=_.next,_.next=F}l.baseQueue=C=_,y.pending=null}if(_=a.baseState,C===null)a.memoizedState=_;else{l=C.next;var W=F=null,rt=null,ut=l,yt=!1;do{var Ct=ut.lane&-536870913;if(Ct!==ut.lane?(fe&Ct)===Ct:(Wn&Ct)===Ct){var ht=ut.revertLane;if(ht===0)rt!==null&&(rt=rt.next={lane:0,revertLane:0,gesture:null,action:ut.action,hasEagerState:ut.hasEagerState,eagerState:ut.eagerState,next:null}),Ct===No&&(yt=!0);else if((Wn&ht)===ht){ut=ut.next,ht===No&&(yt=!0);continue}else Ct={lane:0,revertLane:ut.revertLane,gesture:null,action:ut.action,hasEagerState:ut.hasEagerState,eagerState:ut.eagerState,next:null},rt===null?(W=rt=Ct,F=_):rt=rt.next=Ct,se.lanes|=ht,Fa|=ht;Ct=ut.action,Ds&&f(_,Ct),_=ut.hasEagerState?ut.eagerState:f(_,Ct)}else ht={lane:Ct,revertLane:ut.revertLane,gesture:ut.gesture,action:ut.action,hasEagerState:ut.hasEagerState,eagerState:ut.eagerState,next:null},rt===null?(W=rt=ht,F=_):rt=rt.next=ht,se.lanes|=Ct,Fa|=Ct;ut=ut.next}while(ut!==null&&ut!==l);if(rt===null?F=_:rt.next=W,!bi(_,a.memoizedState)&&(xr=!0,yt&&(f=Oo,f!==null)))throw f;a.memoizedState=_,a.baseState=F,a.baseQueue=rt,y.lastRenderedState=_}return C===null&&(y.lanes=0),[a.memoizedState,y.dispatch]}function im(a){var l=fr(),f=l.queue;if(f===null)throw Error(i(311));f.lastRenderedReducer=a;var y=f.dispatch,C=f.pending,_=l.memoizedState;if(C!==null){f.pending=null;var F=C=C.next;do _=a(_,F.action),F=F.next;while(F!==C);bi(_,l.memoizedState)||(xr=!0),l.memoizedState=_,l.baseQueue===null&&(l.baseState=_),f.lastRenderedState=_}return[_,y]}function zk(a,l,f){var y=se,C=fr(),_=ye;if(_){if(f===void 0)throw Error(i(407));f=f()}else f=l();var F=!bi((De||C).memoizedState,f);if(F&&(C.memoizedState=f,xr=!0),C=C.queue,sm(Pk.bind(null,y,C,a),[a]),C.getSnapshot!==l||F||yr!==null&&yr.memoizedState.tag&1){if(y.flags|=2048,zo(9,{destroy:void 0},$k.bind(null,y,C,f,l),null),ze===null)throw Error(i(349));_||(Wn&127)!==0||jk(y,l,f)}return f}function jk(a,l,f){a.flags|=16384,a={getSnapshot:l,value:f},l=se.updateQueue,l===null?(l=Zh(),se.updateQueue=l,l.stores=[a]):(f=l.stores,f===null?l.stores=[a]:f.push(a))}function $k(a,l,f,y){l.value=f,l.getSnapshot=y,Hk(l)&&Uk(a)}function Pk(a,l,f){return f(function(){Hk(l)&&Uk(a)})}function Hk(a){var l=a.getSnapshot;a=a.value;try{var f=l();return!bi(a,f)}catch{return!0}}function Uk(a){var l=Ts(a,2);l!==null&&li(l,a,2)}function nm(a){var l=Vr();if(typeof a=="function"){var f=a;if(a=f(),Ds){Bt(!0);try{f()}finally{Bt(!1)}}}return l.memoizedState=l.baseState=a,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xn,lastRenderedState:a},l}function Gk(a,l,f,y){return a.baseState=f,rm(a,De,typeof y=="function"?y:Xn)}function q$(a,l,f,y,C){if(rd(a))throw Error(i(485));if(a=l.action,a!==null){var _={payload:C,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(F){_.listeners.push(F)}};N.T!==null?f(!0):_.isTransition=!1,y(_),f=l.pending,f===null?(_.next=l.pending=_,Yk(l,_)):(_.next=f.next,l.pending=f.next=_)}}function Yk(a,l){var f=l.action,y=l.payload,C=a.state;if(l.isTransition){var _=N.T,F={};N.T=F;try{var W=f(C,y),rt=N.S;rt!==null&&rt(F,W),Vk(a,l,W)}catch(ut){am(a,l,ut)}finally{_!==null&&F.types!==null&&(_.types=F.types),N.T=_}}else try{_=f(C,y),Vk(a,l,_)}catch(ut){am(a,l,ut)}}function Vk(a,l,f){f!==null&&typeof f=="object"&&typeof f.then=="function"?f.then(function(y){Wk(a,l,y)},function(y){return am(a,l,y)}):Wk(a,l,f)}function Wk(a,l,f){l.status="fulfilled",l.value=f,Xk(l),a.state=f,l=a.pending,l!==null&&(f=l.next,f===l?a.pending=null:(f=f.next,l.next=f,Yk(a,f)))}function am(a,l,f){var y=a.pending;if(a.pending=null,y!==null){y=y.next;do l.status="rejected",l.reason=f,Xk(l),l=l.next;while(l!==y)}a.action=null}function Xk(a){a=a.listeners;for(var l=0;l<a.length;l++)(0,a[l])()}function Qk(a,l){return l}function Zk(a,l){if(ye){var f=ze.formState;if(f!==null){t:{var y=se;if(ye){if(Ge){e:{for(var C=Ge,_=Fi;C.nodeType!==8;){if(!_){C=null;break e}if(C=qi(C.nextSibling),C===null){C=null;break e}}_=C.data,C=_==="F!"||_==="F"?C:null}if(C){Ge=qi(C.nextSibling),y=C.data==="F!";break t}}Ea(y)}y=!1}y&&(l=f[0])}}return f=Vr(),f.memoizedState=f.baseState=l,y={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qk,lastRenderedState:l},f.queue=y,f=m_.bind(null,se,y),y.dispatch=f,y=nm(!1),_=hm.bind(null,se,!1,y.queue),y=Vr(),C={state:l,dispatch:null,action:a,pending:null},y.queue=C,f=q$.bind(null,se,C,_,f),C.dispatch=f,y.memoizedState=a,[l,f,!1]}function Kk(a){var l=fr();return Jk(l,De,a)}function Jk(a,l,f){if(l=rm(a,l,Qk)[0],a=Jh(Xn)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var y=Ec(l)}catch(F){throw F===Ro?Hh:F}else y=l;l=fr();var C=l.queue,_=C.dispatch;return f!==l.memoizedState&&(se.flags|=2048,zo(9,{destroy:void 0},z$.bind(null,C,f),null)),[y,_,a]}function z$(a,l){a.action=l}function t_(a){var l=fr(),f=De;if(f!==null)return Jk(l,f,a);fr(),l=l.memoizedState,f=fr();var y=f.queue.dispatch;return f.memoizedState=a,[l,y,!1]}function zo(a,l,f,y){return a={tag:a,create:f,deps:y,inst:l,next:null},l=se.updateQueue,l===null&&(l=Zh(),se.updateQueue=l),f=l.lastEffect,f===null?l.lastEffect=a.next=a:(y=f.next,f.next=a,a.next=y,l.lastEffect=a),a}function e_(){return fr().memoizedState}function td(a,l,f,y){var C=Vr();se.flags|=a,C.memoizedState=zo(1|l,{destroy:void 0},f,y===void 0?null:y)}function ed(a,l,f,y){var C=fr();y=y===void 0?null:y;var _=C.memoizedState.inst;De!==null&&y!==null&&Qg(y,De.memoizedState.deps)?C.memoizedState=zo(l,_,f,y):(se.flags|=a,C.memoizedState=zo(1|l,_,f,y))}function r_(a,l){td(8390656,8,a,l)}function sm(a,l){ed(2048,8,a,l)}function j$(a){se.flags|=4;var l=se.updateQueue;if(l===null)l=Zh(),se.updateQueue=l,l.events=[a];else{var f=l.events;f===null?l.events=[a]:f.push(a)}}function i_(a){var l=fr().memoizedState;return j$({ref:l,nextImpl:a}),function(){if((Be&2)!==0)throw Error(i(440));return l.impl.apply(void 0,arguments)}}function n_(a,l){return ed(4,2,a,l)}function a_(a,l){return ed(4,4,a,l)}function s_(a,l){if(typeof l=="function"){a=a();var f=l(a);return function(){typeof f=="function"?f():l(null)}}if(l!=null)return a=a(),l.current=a,function(){l.current=null}}function o_(a,l,f){f=f!=null?f.concat([a]):null,ed(4,4,s_.bind(null,l,a),f)}function om(){}function l_(a,l){var f=fr();l=l===void 0?null:l;var y=f.memoizedState;return l!==null&&Qg(l,y[1])?y[0]:(f.memoizedState=[a,l],a)}function c_(a,l){var f=fr();l=l===void 0?null:l;var y=f.memoizedState;if(l!==null&&Qg(l,y[1]))return y[0];if(y=a(),Ds){Bt(!0);try{a()}finally{Bt(!1)}}return f.memoizedState=[y,l],y}function lm(a,l,f){return f===void 0||(Wn&1073741824)!==0&&(fe&261930)===0?a.memoizedState=l:(a.memoizedState=f,a=uT(),se.lanes|=a,Fa|=a,f)}function u_(a,l,f,y){return bi(f,l)?f:Fo.current!==null?(a=lm(a,f,y),bi(a,l)||(xr=!0),a):(Wn&42)===0||(Wn&1073741824)!==0&&(fe&261930)===0?(xr=!0,a.memoizedState=f):(a=uT(),se.lanes|=a,Fa|=a,l)}function h_(a,l,f,y,C){var _=P.p;P.p=_!==0&&8>_?_:8;var F=N.T,W={};N.T=W,hm(a,!1,l,f);try{var rt=C(),ut=N.S;if(ut!==null&&ut(W,rt),rt!==null&&typeof rt=="object"&&typeof rt.then=="function"){var yt=D$(rt,y);Ac(a,l,yt,_i(a))}else Ac(a,l,y,_i(a))}catch(Ct){Ac(a,l,{then:function(){},status:"rejected",reason:Ct},_i())}finally{P.p=_,F!==null&&W.types!==null&&(F.types=W.types),N.T=F}}function $$(){}function cm(a,l,f,y){if(a.tag!==5)throw Error(i(476));var C=d_(a).queue;h_(a,C,l,$,f===null?$$:function(){return f_(a),f(y)})}function d_(a){var l=a.memoizedState;if(l!==null)return l;l={memoizedState:$,baseState:$,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xn,lastRenderedState:$},next:null};var f={};return l.next={memoizedState:f,baseState:f,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xn,lastRenderedState:f},next:null},a.memoizedState=l,a=a.alternate,a!==null&&(a.memoizedState=l),l}function f_(a){var l=d_(a);l.next===null&&(l=a.alternate.memoizedState),Ac(a,l.next.queue,{},_i())}function um(){return Rr(Gc)}function p_(){return fr().memoizedState}function g_(){return fr().memoizedState}function P$(a){for(var l=a.return;l!==null;){switch(l.tag){case 24:case 3:var f=_i();a=La(f);var y=Ma(l,a,f);y!==null&&(li(y,l,f),Sc(y,l,f)),l={cache:zg()},a.payload=l;return}l=l.return}}function H$(a,l,f){var y=_i();f={lane:y,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},rd(a)?y_(l,f):(f=Ag(a,l,f,y),f!==null&&(li(f,a,y),x_(f,l,y)))}function m_(a,l,f){var y=_i();Ac(a,l,f,y)}function Ac(a,l,f,y){var C={lane:y,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null};if(rd(a))y_(l,C);else{var _=a.alternate;if(a.lanes===0&&(_===null||_.lanes===0)&&(_=l.lastRenderedReducer,_!==null))try{var F=l.lastRenderedState,W=_(F,f);if(C.hasEagerState=!0,C.eagerState=W,bi(W,F))return Fh(a,l,C,0),ze===null&&Dh(),!1}catch{}finally{}if(f=Ag(a,l,C,y),f!==null)return li(f,a,y),x_(f,l,y),!0}return!1}function hm(a,l,f,y){if(y={lane:2,revertLane:Hm(),gesture:null,action:y,hasEagerState:!1,eagerState:null,next:null},rd(a)){if(l)throw Error(i(479))}else l=Ag(a,f,y,2),l!==null&&li(l,a,2)}function rd(a){var l=a.alternate;return a===se||l!==null&&l===se}function y_(a,l){Io=Xh=!0;var f=a.pending;f===null?l.next=l:(l.next=f.next,f.next=l),a.pending=l}function x_(a,l,f){if((f&4194048)!==0){var y=l.lanes;y&=a.pendingLanes,f|=y,l.lanes=f,gs(a,f)}}var Bc={readContext:Rr,use:Kh,useCallback:lr,useContext:lr,useEffect:lr,useImperativeHandle:lr,useLayoutEffect:lr,useInsertionEffect:lr,useMemo:lr,useReducer:lr,useRef:lr,useState:lr,useDebugValue:lr,useDeferredValue:lr,useTransition:lr,useSyncExternalStore:lr,useId:lr,useHostTransitionStatus:lr,useFormState:lr,useActionState:lr,useOptimistic:lr,useMemoCache:lr,useCacheRefresh:lr};Bc.useEffectEvent=lr;var b_={readContext:Rr,use:Kh,useCallback:function(a,l){return Vr().memoizedState=[a,l===void 0?null:l],a},useContext:Rr,useEffect:r_,useImperativeHandle:function(a,l,f){f=f!=null?f.concat([a]):null,td(4194308,4,s_.bind(null,l,a),f)},useLayoutEffect:function(a,l){return td(4194308,4,a,l)},useInsertionEffect:function(a,l){td(4,2,a,l)},useMemo:function(a,l){var f=Vr();l=l===void 0?null:l;var y=a();if(Ds){Bt(!0);try{a()}finally{Bt(!1)}}return f.memoizedState=[y,l],y},useReducer:function(a,l,f){var y=Vr();if(f!==void 0){var C=f(l);if(Ds){Bt(!0);try{f(l)}finally{Bt(!1)}}}else C=l;return y.memoizedState=y.baseState=C,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:C},y.queue=a,a=a.dispatch=H$.bind(null,se,a),[y.memoizedState,a]},useRef:function(a){var l=Vr();return a={current:a},l.memoizedState=a},useState:function(a){a=nm(a);var l=a.queue,f=m_.bind(null,se,l);return l.dispatch=f,[a.memoizedState,f]},useDebugValue:om,useDeferredValue:function(a,l){var f=Vr();return lm(f,a,l)},useTransition:function(){var a=nm(!1);return a=h_.bind(null,se,a.queue,!0,!1),Vr().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,l,f){var y=se,C=Vr();if(ye){if(f===void 0)throw Error(i(407));f=f()}else{if(f=l(),ze===null)throw Error(i(349));(fe&127)!==0||jk(y,l,f)}C.memoizedState=f;var _={value:f,getSnapshot:l};return C.queue=_,r_(Pk.bind(null,y,_,a),[a]),y.flags|=2048,zo(9,{destroy:void 0},$k.bind(null,y,_,f,l),null),f},useId:function(){var a=Vr(),l=ze.identifierPrefix;if(ye){var f=vn,y=bn;f=(y&~(1<<32-Nt(y)-1)).toString(32)+f,l="_"+l+"R_"+f,f=Qh++,0<f&&(l+="H"+f.toString(32)),l+="_"}else f=F$++,l="_"+l+"r_"+f.toString(32)+"_";return a.memoizedState=l},useHostTransitionStatus:um,useFormState:Zk,useActionState:Zk,useOptimistic:function(a){var l=Vr();l.memoizedState=l.baseState=a;var f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=f,l=hm.bind(null,se,!0,f),f.dispatch=l,[a,l]},useMemoCache:em,useCacheRefresh:function(){return Vr().memoizedState=P$.bind(null,se)},useEffectEvent:function(a){var l=Vr(),f={impl:a};return l.memoizedState=f,function(){if((Be&2)!==0)throw Error(i(440));return f.impl.apply(void 0,arguments)}}},dm={readContext:Rr,use:Kh,useCallback:l_,useContext:Rr,useEffect:sm,useImperativeHandle:o_,useInsertionEffect:n_,useLayoutEffect:a_,useMemo:c_,useReducer:Jh,useRef:e_,useState:function(){return Jh(Xn)},useDebugValue:om,useDeferredValue:function(a,l){var f=fr();return u_(f,De.memoizedState,a,l)},useTransition:function(){var a=Jh(Xn)[0],l=fr().memoizedState;return[typeof a=="boolean"?a:Ec(a),l]},useSyncExternalStore:zk,useId:p_,useHostTransitionStatus:um,useFormState:Kk,useActionState:Kk,useOptimistic:function(a,l){var f=fr();return Gk(f,De,a,l)},useMemoCache:em,useCacheRefresh:g_};dm.useEffectEvent=i_;var v_={readContext:Rr,use:Kh,useCallback:l_,useContext:Rr,useEffect:sm,useImperativeHandle:o_,useInsertionEffect:n_,useLayoutEffect:a_,useMemo:c_,useReducer:im,useRef:e_,useState:function(){return im(Xn)},useDebugValue:om,useDeferredValue:function(a,l){var f=fr();return De===null?lm(f,a,l):u_(f,De.memoizedState,a,l)},useTransition:function(){var a=im(Xn)[0],l=fr().memoizedState;return[typeof a=="boolean"?a:Ec(a),l]},useSyncExternalStore:zk,useId:p_,useHostTransitionStatus:um,useFormState:t_,useActionState:t_,useOptimistic:function(a,l){var f=fr();return De!==null?Gk(f,De,a,l):(f.baseState=a,[a,f.queue.dispatch])},useMemoCache:em,useCacheRefresh:g_};v_.useEffectEvent=i_;function fm(a,l,f,y){l=a.memoizedState,f=f(y,l),f=f==null?l:p({},l,f),a.memoizedState=f,a.lanes===0&&(a.updateQueue.baseState=f)}var pm={enqueueSetState:function(a,l,f){a=a._reactInternals;var y=_i(),C=La(y);C.payload=l,f!=null&&(C.callback=f),l=Ma(a,C,y),l!==null&&(li(l,a,y),Sc(l,a,y))},enqueueReplaceState:function(a,l,f){a=a._reactInternals;var y=_i(),C=La(y);C.tag=1,C.payload=l,f!=null&&(C.callback=f),l=Ma(a,C,y),l!==null&&(li(l,a,y),Sc(l,a,y))},enqueueForceUpdate:function(a,l){a=a._reactInternals;var f=_i(),y=La(f);y.tag=2,l!=null&&(y.callback=l),l=Ma(a,y,f),l!==null&&(li(l,a,f),Sc(l,a,f))}};function C_(a,l,f,y,C,_,F){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(y,_,F):l.prototype&&l.prototype.isPureReactComponent?!gc(f,y)||!gc(C,_):!0}function w_(a,l,f,y){a=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(f,y),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(f,y),l.state!==a&&pm.enqueueReplaceState(l,l.state,null)}function Fs(a,l){var f=l;if("ref"in l){f={};for(var y in l)y!=="ref"&&(f[y]=l[y])}if(a=a.defaultProps){f===l&&(f=p({},f));for(var C in a)f[C]===void 0&&(f[C]=a[C])}return f}function S_(a){Rh(a)}function k_(a){console.error(a)}function __(a){Rh(a)}function id(a,l){try{var f=a.onUncaughtError;f(l.value,{componentStack:l.stack})}catch(y){setTimeout(function(){throw y})}}function T_(a,l,f){try{var y=a.onCaughtError;y(f.value,{componentStack:f.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(C){setTimeout(function(){throw C})}}function gm(a,l,f){return f=La(f),f.tag=3,f.payload={element:null},f.callback=function(){id(a,l)},f}function E_(a){return a=La(a),a.tag=3,a}function A_(a,l,f,y){var C=f.type.getDerivedStateFromError;if(typeof C=="function"){var _=y.value;a.payload=function(){return C(_)},a.callback=function(){T_(l,f,y)}}var F=f.stateNode;F!==null&&typeof F.componentDidCatch=="function"&&(a.callback=function(){T_(l,f,y),typeof C!="function"&&(Ia===null?Ia=new Set([this]):Ia.add(this));var W=y.stack;this.componentDidCatch(y.value,{componentStack:W!==null?W:""})})}function U$(a,l,f,y,C){if(f.flags|=32768,y!==null&&typeof y=="object"&&typeof y.then=="function"){if(l=f.alternate,l!==null&&Mo(l,f,C,!0),f=Ci.current,f!==null){switch(f.tag){case 31:case 13:return Ii===null?gd():f.alternate===null&&cr===0&&(cr=3),f.flags&=-257,f.flags|=65536,f.lanes=C,y===Uh?f.flags|=16384:(l=f.updateQueue,l===null?f.updateQueue=new Set([y]):l.add(y),jm(a,y,C)),!1;case 22:return f.flags|=65536,y===Uh?f.flags|=16384:(l=f.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([y])},f.updateQueue=l):(f=l.retryQueue,f===null?l.retryQueue=new Set([y]):f.add(y)),jm(a,y,C)),!1}throw Error(i(435,f.tag))}return jm(a,y,C),gd(),!1}if(ye)return l=Ci.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=C,y!==Rg&&(a=Error(i(422),{cause:y}),xc(Oi(a,f)))):(y!==Rg&&(l=Error(i(423),{cause:y}),xc(Oi(l,f))),a=a.current.alternate,a.flags|=65536,C&=-C,a.lanes|=C,y=Oi(y,f),C=gm(a.stateNode,y,C),Gg(a,C),cr!==4&&(cr=2)),!1;var _=Error(i(520),{cause:y});if(_=Oi(_,f),Ic===null?Ic=[_]:Ic.push(_),cr!==4&&(cr=2),l===null)return!0;y=Oi(y,f),f=l;do{switch(f.tag){case 3:return f.flags|=65536,a=C&-C,f.lanes|=a,a=gm(f.stateNode,y,a),Gg(f,a),!1;case 1:if(l=f.type,_=f.stateNode,(f.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(Ia===null||!Ia.has(_))))return f.flags|=65536,C&=-C,f.lanes|=C,C=E_(C),A_(C,a,f,y),Gg(f,C),!1}f=f.return}while(f!==null);return!1}var mm=Error(i(461)),xr=!1;function Dr(a,l,f,y){l.child=a===null?Nk(l,null,f,y):Rs(l,a.child,f,y)}function B_(a,l,f,y,C){f=f.render;var _=l.ref;if("ref"in y){var F={};for(var W in y)W!=="ref"&&(F[W]=y[W])}else F=y;return Ls(l),y=Zg(a,l,f,F,_,C),W=Kg(),a!==null&&!xr?(Jg(a,l,C),Qn(a,l,C)):(ye&&W&&Ng(l),l.flags|=1,Dr(a,l,y,C),l.child)}function L_(a,l,f,y,C){if(a===null){var _=f.type;return typeof _=="function"&&!Bg(_)&&_.defaultProps===void 0&&f.compare===null?(l.tag=15,l.type=_,M_(a,l,_,y,C)):(a=qh(f.type,null,y,l,l.mode,C),a.ref=l.ref,a.return=l,l.child=a)}if(_=a.child,!km(a,C)){var F=_.memoizedProps;if(f=f.compare,f=f!==null?f:gc,f(F,y)&&a.ref===l.ref)return Qn(a,l,C)}return l.flags|=1,a=Un(_,y),a.ref=l.ref,a.return=l,l.child=a}function M_(a,l,f,y,C){if(a!==null){var _=a.memoizedProps;if(gc(_,y)&&a.ref===l.ref)if(xr=!1,l.pendingProps=y=_,km(a,C))(a.flags&131072)!==0&&(xr=!0);else return l.lanes=a.lanes,Qn(a,l,C)}return ym(a,l,f,y,C)}function N_(a,l,f,y){var C=y.children,_=a!==null?a.memoizedState:null;if(a===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),y.mode==="hidden"){if((l.flags&128)!==0){if(_=_!==null?_.baseLanes|f:f,a!==null){for(y=l.child=a.child,C=0;y!==null;)C=C|y.lanes|y.childLanes,y=y.sibling;y=C&~_}else y=0,l.child=null;return O_(a,l,_,f,y)}if((f&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},a!==null&&Ph(l,_!==null?_.cachePool:null),_!==null?Dk(l,_):Vg(),Fk(l);else return y=l.lanes=536870912,O_(a,l,_!==null?_.baseLanes|f:f,f,y)}else _!==null?(Ph(l,_.cachePool),Dk(l,_),Oa(),l.memoizedState=null):(a!==null&&Ph(l,null),Vg(),Oa());return Dr(a,l,C,f),l.child}function Lc(a,l){return a!==null&&a.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function O_(a,l,f,y,C){var _=$g();return _=_===null?null:{parent:mr._currentValue,pool:_},l.memoizedState={baseLanes:f,cachePool:_},a!==null&&Ph(l,null),Vg(),Fk(l),a!==null&&Mo(a,l,y,!0),l.childLanes=C,null}function nd(a,l){return l=sd({mode:l.mode,children:l.children},a.mode),l.ref=a.ref,a.child=l,l.return=a,l}function R_(a,l,f){return Rs(l,a.child,null,f),a=nd(l,l.pendingProps),a.flags|=2,wi(l),l.memoizedState=null,a}function G$(a,l,f){var y=l.pendingProps,C=(l.flags&128)!==0;if(l.flags&=-129,a===null){if(ye){if(y.mode==="hidden")return a=nd(l,y),l.lanes=536870912,Lc(null,a);if(Xg(l),(a=Ge)?(a=YT(a,Fi),a=a!==null&&a.data==="&"?a:null,a!==null&&(l.memoizedState={dehydrated:a,treeContext:_a!==null?{id:bn,overflow:vn}:null,retryLane:536870912,hydrationErrors:null},f=yk(a),f.return=l,l.child=f,Or=l,Ge=null)):a=null,a===null)throw Ea(l);return l.lanes=536870912,null}return nd(l,y)}var _=a.memoizedState;if(_!==null){var F=_.dehydrated;if(Xg(l),C)if(l.flags&256)l.flags&=-257,l=R_(a,l,f);else if(l.memoizedState!==null)l.child=a.child,l.flags|=128,l=null;else throw Error(i(558));else if(xr||Mo(a,l,f,!1),C=(f&a.childLanes)!==0,xr||C){if(y=ze,y!==null&&(F=po(y,f),F!==0&&F!==_.retryLane))throw _.retryLane=F,Ts(a,F),li(y,a,F),mm;gd(),l=R_(a,l,f)}else a=_.treeContext,Ge=qi(F.nextSibling),Or=l,ye=!0,Ta=null,Fi=!1,a!==null&&vk(l,a),l=nd(l,y),l.flags|=4096;return l}return a=Un(a.child,{mode:y.mode,children:y.children}),a.ref=l.ref,l.child=a,a.return=l,a}function ad(a,l){var f=l.ref;if(f===null)a!==null&&a.ref!==null&&(l.flags|=4194816);else{if(typeof f!="function"&&typeof f!="object")throw Error(i(284));(a===null||a.ref!==f)&&(l.flags|=4194816)}}function ym(a,l,f,y,C){return Ls(l),f=Zg(a,l,f,y,void 0,C),y=Kg(),a!==null&&!xr?(Jg(a,l,C),Qn(a,l,C)):(ye&&y&&Ng(l),l.flags|=1,Dr(a,l,f,C),l.child)}function D_(a,l,f,y,C,_){return Ls(l),l.updateQueue=null,f=qk(l,y,f,C),Ik(a),y=Kg(),a!==null&&!xr?(Jg(a,l,_),Qn(a,l,_)):(ye&&y&&Ng(l),l.flags|=1,Dr(a,l,f,_),l.child)}function F_(a,l,f,y,C){if(Ls(l),l.stateNode===null){var _=Eo,F=f.contextType;typeof F=="object"&&F!==null&&(_=Rr(F)),_=new f(y,_),l.memoizedState=_.state!==null&&_.state!==void 0?_.state:null,_.updater=pm,l.stateNode=_,_._reactInternals=l,_=l.stateNode,_.props=y,_.state=l.memoizedState,_.refs={},Hg(l),F=f.contextType,_.context=typeof F=="object"&&F!==null?Rr(F):Eo,_.state=l.memoizedState,F=f.getDerivedStateFromProps,typeof F=="function"&&(fm(l,f,F,y),_.state=l.memoizedState),typeof f.getDerivedStateFromProps=="function"||typeof _.getSnapshotBeforeUpdate=="function"||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(F=_.state,typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount(),F!==_.state&&pm.enqueueReplaceState(_,_.state,null),_c(l,y,_,C),kc(),_.state=l.memoizedState),typeof _.componentDidMount=="function"&&(l.flags|=4194308),y=!0}else if(a===null){_=l.stateNode;var W=l.memoizedProps,rt=Fs(f,W);_.props=rt;var ut=_.context,yt=f.contextType;F=Eo,typeof yt=="object"&&yt!==null&&(F=Rr(yt));var Ct=f.getDerivedStateFromProps;yt=typeof Ct=="function"||typeof _.getSnapshotBeforeUpdate=="function",W=l.pendingProps!==W,yt||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(W||ut!==F)&&w_(l,_,y,F),Ba=!1;var ht=l.memoizedState;_.state=ht,_c(l,y,_,C),kc(),ut=l.memoizedState,W||ht!==ut||Ba?(typeof Ct=="function"&&(fm(l,f,Ct,y),ut=l.memoizedState),(rt=Ba||C_(l,f,rt,y,ht,ut,F))?(yt||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount()),typeof _.componentDidMount=="function"&&(l.flags|=4194308)):(typeof _.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=y,l.memoizedState=ut),_.props=y,_.state=ut,_.context=F,y=rt):(typeof _.componentDidMount=="function"&&(l.flags|=4194308),y=!1)}else{_=l.stateNode,Ug(a,l),F=l.memoizedProps,yt=Fs(f,F),_.props=yt,Ct=l.pendingProps,ht=_.context,ut=f.contextType,rt=Eo,typeof ut=="object"&&ut!==null&&(rt=Rr(ut)),W=f.getDerivedStateFromProps,(ut=typeof W=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(F!==Ct||ht!==rt)&&w_(l,_,y,rt),Ba=!1,ht=l.memoizedState,_.state=ht,_c(l,y,_,C),kc();var pt=l.memoizedState;F!==Ct||ht!==pt||Ba||a!==null&&a.dependencies!==null&&jh(a.dependencies)?(typeof W=="function"&&(fm(l,f,W,y),pt=l.memoizedState),(yt=Ba||C_(l,f,yt,y,ht,pt,rt)||a!==null&&a.dependencies!==null&&jh(a.dependencies))?(ut||typeof _.UNSAFE_componentWillUpdate!="function"&&typeof _.componentWillUpdate!="function"||(typeof _.componentWillUpdate=="function"&&_.componentWillUpdate(y,pt,rt),typeof _.UNSAFE_componentWillUpdate=="function"&&_.UNSAFE_componentWillUpdate(y,pt,rt)),typeof _.componentDidUpdate=="function"&&(l.flags|=4),typeof _.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof _.componentDidUpdate!="function"||F===a.memoizedProps&&ht===a.memoizedState||(l.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||F===a.memoizedProps&&ht===a.memoizedState||(l.flags|=1024),l.memoizedProps=y,l.memoizedState=pt),_.props=y,_.state=pt,_.context=rt,y=yt):(typeof _.componentDidUpdate!="function"||F===a.memoizedProps&&ht===a.memoizedState||(l.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||F===a.memoizedProps&&ht===a.memoizedState||(l.flags|=1024),y=!1)}return _=y,ad(a,l),y=(l.flags&128)!==0,_||y?(_=l.stateNode,f=y&&typeof f.getDerivedStateFromError!="function"?null:_.render(),l.flags|=1,a!==null&&y?(l.child=Rs(l,a.child,null,C),l.child=Rs(l,null,f,C)):Dr(a,l,f,C),l.memoizedState=_.state,a=l.child):a=Qn(a,l,C),a}function I_(a,l,f,y){return As(),l.flags|=256,Dr(a,l,f,y),l.child}var xm={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function bm(a){return{baseLanes:a,cachePool:Tk()}}function vm(a,l,f){return a=a!==null?a.childLanes&~f:0,l&&(a|=ki),a}function q_(a,l,f){var y=l.pendingProps,C=!1,_=(l.flags&128)!==0,F;if((F=_)||(F=a!==null&&a.memoizedState===null?!1:(dr.current&2)!==0),F&&(C=!0,l.flags&=-129),F=(l.flags&32)!==0,l.flags&=-33,a===null){if(ye){if(C?Na(l):Oa(),(a=Ge)?(a=YT(a,Fi),a=a!==null&&a.data!=="&"?a:null,a!==null&&(l.memoizedState={dehydrated:a,treeContext:_a!==null?{id:bn,overflow:vn}:null,retryLane:536870912,hydrationErrors:null},f=yk(a),f.return=l,l.child=f,Or=l,Ge=null)):a=null,a===null)throw Ea(l);return r0(a)?l.lanes=32:l.lanes=536870912,null}var W=y.children;return y=y.fallback,C?(Oa(),C=l.mode,W=sd({mode:"hidden",children:W},C),y=Es(y,C,f,null),W.return=l,y.return=l,W.sibling=y,l.child=W,y=l.child,y.memoizedState=bm(f),y.childLanes=vm(a,F,f),l.memoizedState=xm,Lc(null,y)):(Na(l),Cm(l,W))}var rt=a.memoizedState;if(rt!==null&&(W=rt.dehydrated,W!==null)){if(_)l.flags&256?(Na(l),l.flags&=-257,l=wm(a,l,f)):l.memoizedState!==null?(Oa(),l.child=a.child,l.flags|=128,l=null):(Oa(),W=y.fallback,C=l.mode,y=sd({mode:"visible",children:y.children},C),W=Es(W,C,f,null),W.flags|=2,y.return=l,W.return=l,y.sibling=W,l.child=y,Rs(l,a.child,null,f),y=l.child,y.memoizedState=bm(f),y.childLanes=vm(a,F,f),l.memoizedState=xm,l=Lc(null,y));else if(Na(l),r0(W)){if(F=W.nextSibling&&W.nextSibling.dataset,F)var ut=F.dgst;F=ut,y=Error(i(419)),y.stack="",y.digest=F,xc({value:y,source:null,stack:null}),l=wm(a,l,f)}else if(xr||Mo(a,l,f,!1),F=(f&a.childLanes)!==0,xr||F){if(F=ze,F!==null&&(y=po(F,f),y!==0&&y!==rt.retryLane))throw rt.retryLane=y,Ts(a,y),li(F,a,y),mm;e0(W)||gd(),l=wm(a,l,f)}else e0(W)?(l.flags|=192,l.child=a.child,l=null):(a=rt.treeContext,Ge=qi(W.nextSibling),Or=l,ye=!0,Ta=null,Fi=!1,a!==null&&vk(l,a),l=Cm(l,y.children),l.flags|=4096);return l}return C?(Oa(),W=y.fallback,C=l.mode,rt=a.child,ut=rt.sibling,y=Un(rt,{mode:"hidden",children:y.children}),y.subtreeFlags=rt.subtreeFlags&65011712,ut!==null?W=Un(ut,W):(W=Es(W,C,f,null),W.flags|=2),W.return=l,y.return=l,y.sibling=W,l.child=y,Lc(null,y),y=l.child,W=a.child.memoizedState,W===null?W=bm(f):(C=W.cachePool,C!==null?(rt=mr._currentValue,C=C.parent!==rt?{parent:rt,pool:rt}:C):C=Tk(),W={baseLanes:W.baseLanes|f,cachePool:C}),y.memoizedState=W,y.childLanes=vm(a,F,f),l.memoizedState=xm,Lc(a.child,y)):(Na(l),f=a.child,a=f.sibling,f=Un(f,{mode:"visible",children:y.children}),f.return=l,f.sibling=null,a!==null&&(F=l.deletions,F===null?(l.deletions=[a],l.flags|=16):F.push(a)),l.child=f,l.memoizedState=null,f)}function Cm(a,l){return l=sd({mode:"visible",children:l},a.mode),l.return=a,a.child=l}function sd(a,l){return a=vi(22,a,null,l),a.lanes=0,a}function wm(a,l,f){return Rs(l,a.child,null,f),a=Cm(l,l.pendingProps.children),a.flags|=2,l.memoizedState=null,a}function z_(a,l,f){a.lanes|=l;var y=a.alternate;y!==null&&(y.lanes|=l),Ig(a.return,l,f)}function Sm(a,l,f,y,C,_){var F=a.memoizedState;F===null?a.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:y,tail:f,tailMode:C,treeForkCount:_}:(F.isBackwards=l,F.rendering=null,F.renderingStartTime=0,F.last=y,F.tail=f,F.tailMode=C,F.treeForkCount=_)}function j_(a,l,f){var y=l.pendingProps,C=y.revealOrder,_=y.tail;y=y.children;var F=dr.current,W=(F&2)!==0;if(W?(F=F&1|2,l.flags|=128):F&=1,H(dr,F),Dr(a,l,y,f),y=ye?yc:0,!W&&a!==null&&(a.flags&128)!==0)t:for(a=l.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&z_(a,f,l);else if(a.tag===19)z_(a,f,l);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===l)break t;for(;a.sibling===null;){if(a.return===null||a.return===l)break t;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(C){case"forwards":for(f=l.child,C=null;f!==null;)a=f.alternate,a!==null&&Wh(a)===null&&(C=f),f=f.sibling;f=C,f===null?(C=l.child,l.child=null):(C=f.sibling,f.sibling=null),Sm(l,!1,C,f,_,y);break;case"backwards":case"unstable_legacy-backwards":for(f=null,C=l.child,l.child=null;C!==null;){if(a=C.alternate,a!==null&&Wh(a)===null){l.child=C;break}a=C.sibling,C.sibling=f,f=C,C=a}Sm(l,!0,f,null,_,y);break;case"together":Sm(l,!1,null,null,void 0,y);break;default:l.memoizedState=null}return l.child}function Qn(a,l,f){if(a!==null&&(l.dependencies=a.dependencies),Fa|=l.lanes,(f&l.childLanes)===0)if(a!==null){if(Mo(a,l,f,!1),(f&l.childLanes)===0)return null}else return null;if(a!==null&&l.child!==a.child)throw Error(i(153));if(l.child!==null){for(a=l.child,f=Un(a,a.pendingProps),l.child=f,f.return=l;a.sibling!==null;)a=a.sibling,f=f.sibling=Un(a,a.pendingProps),f.return=l;f.sibling=null}return l.child}function km(a,l){return(a.lanes&l)!==0?!0:(a=a.dependencies,!!(a!==null&&jh(a)))}function Y$(a,l,f){switch(l.tag){case 3:lt(l,l.stateNode.containerInfo),Aa(l,mr,a.memoizedState.cache),As();break;case 27:case 5:mt(l);break;case 4:lt(l,l.stateNode.containerInfo);break;case 10:Aa(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,Xg(l),null;break;case 13:var y=l.memoizedState;if(y!==null)return y.dehydrated!==null?(Na(l),l.flags|=128,null):(f&l.child.childLanes)!==0?q_(a,l,f):(Na(l),a=Qn(a,l,f),a!==null?a.sibling:null);Na(l);break;case 19:var C=(a.flags&128)!==0;if(y=(f&l.childLanes)!==0,y||(Mo(a,l,f,!1),y=(f&l.childLanes)!==0),C){if(y)return j_(a,l,f);l.flags|=128}if(C=l.memoizedState,C!==null&&(C.rendering=null,C.tail=null,C.lastEffect=null),H(dr,dr.current),y)break;return null;case 22:return l.lanes=0,N_(a,l,f,l.pendingProps);case 24:Aa(l,mr,a.memoizedState.cache)}return Qn(a,l,f)}function $_(a,l,f){if(a!==null)if(a.memoizedProps!==l.pendingProps)xr=!0;else{if(!km(a,f)&&(l.flags&128)===0)return xr=!1,Y$(a,l,f);xr=(a.flags&131072)!==0}else xr=!1,ye&&(l.flags&1048576)!==0&&bk(l,yc,l.index);switch(l.lanes=0,l.tag){case 16:t:{var y=l.pendingProps;if(a=Ns(l.elementType),l.type=a,typeof a=="function")Bg(a)?(y=Fs(a,y),l.tag=1,l=F_(null,l,a,y,f)):(l.tag=0,l=ym(null,l,a,y,f));else{if(a!=null){var C=a.$$typeof;if(C===E){l.tag=11,l=B_(null,l,a,y,f);break t}else if(C===R){l.tag=14,l=L_(null,l,a,y,f);break t}}throw l=M(a)||a,Error(i(306,l,""))}}return l;case 0:return ym(a,l,l.type,l.pendingProps,f);case 1:return y=l.type,C=Fs(y,l.pendingProps),F_(a,l,y,C,f);case 3:t:{if(lt(l,l.stateNode.containerInfo),a===null)throw Error(i(387));y=l.pendingProps;var _=l.memoizedState;C=_.element,Ug(a,l),_c(l,y,null,f);var F=l.memoizedState;if(y=F.cache,Aa(l,mr,y),y!==_.cache&&qg(l,[mr],f,!0),kc(),y=F.element,_.isDehydrated)if(_={element:y,isDehydrated:!1,cache:F.cache},l.updateQueue.baseState=_,l.memoizedState=_,l.flags&256){l=I_(a,l,y,f);break t}else if(y!==C){C=Oi(Error(i(424)),l),xc(C),l=I_(a,l,y,f);break t}else{switch(a=l.stateNode.containerInfo,a.nodeType){case 9:a=a.body;break;default:a=a.nodeName==="HTML"?a.ownerDocument.body:a}for(Ge=qi(a.firstChild),Or=l,ye=!0,Ta=null,Fi=!0,f=Nk(l,null,y,f),l.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling}else{if(As(),y===C){l=Qn(a,l,f);break t}Dr(a,l,y,f)}l=l.child}return l;case 26:return ad(a,l),a===null?(f=KT(l.type,null,l.pendingProps,null))?l.memoizedState=f:ye||(f=l.type,a=l.pendingProps,y=wd(et.current).createElement(f),y[ir]=l,y[$e]=a,Fr(y,f,a),ue(y),l.stateNode=y):l.memoizedState=KT(l.type,a.memoizedProps,l.pendingProps,a.memoizedState),null;case 27:return mt(l),a===null&&ye&&(y=l.stateNode=XT(l.type,l.pendingProps,et.current),Or=l,Fi=!0,C=Ge,$a(l.type)?(i0=C,Ge=qi(y.firstChild)):Ge=C),Dr(a,l,l.pendingProps.children,f),ad(a,l),a===null&&(l.flags|=4194304),l.child;case 5:return a===null&&ye&&((C=y=Ge)&&(y=wP(y,l.type,l.pendingProps,Fi),y!==null?(l.stateNode=y,Or=l,Ge=qi(y.firstChild),Fi=!1,C=!0):C=!1),C||Ea(l)),mt(l),C=l.type,_=l.pendingProps,F=a!==null?a.memoizedProps:null,y=_.children,Km(C,_)?y=null:F!==null&&Km(C,F)&&(l.flags|=32),l.memoizedState!==null&&(C=Zg(a,l,I$,null,null,f),Gc._currentValue=C),ad(a,l),Dr(a,l,y,f),l.child;case 6:return a===null&&ye&&((a=f=Ge)&&(f=SP(f,l.pendingProps,Fi),f!==null?(l.stateNode=f,Or=l,Ge=null,a=!0):a=!1),a||Ea(l)),null;case 13:return q_(a,l,f);case 4:return lt(l,l.stateNode.containerInfo),y=l.pendingProps,a===null?l.child=Rs(l,null,y,f):Dr(a,l,y,f),l.child;case 11:return B_(a,l,l.type,l.pendingProps,f);case 7:return Dr(a,l,l.pendingProps,f),l.child;case 8:return Dr(a,l,l.pendingProps.children,f),l.child;case 12:return Dr(a,l,l.pendingProps.children,f),l.child;case 10:return y=l.pendingProps,Aa(l,l.type,y.value),Dr(a,l,y.children,f),l.child;case 9:return C=l.type._context,y=l.pendingProps.children,Ls(l),C=Rr(C),y=y(C),l.flags|=1,Dr(a,l,y,f),l.child;case 14:return L_(a,l,l.type,l.pendingProps,f);case 15:return M_(a,l,l.type,l.pendingProps,f);case 19:return j_(a,l,f);case 31:return G$(a,l,f);case 22:return N_(a,l,f,l.pendingProps);case 24:return Ls(l),y=Rr(mr),a===null?(C=$g(),C===null&&(C=ze,_=zg(),C.pooledCache=_,_.refCount++,_!==null&&(C.pooledCacheLanes|=f),C=_),l.memoizedState={parent:y,cache:C},Hg(l),Aa(l,mr,C)):((a.lanes&f)!==0&&(Ug(a,l),_c(l,null,null,f),kc()),C=a.memoizedState,_=l.memoizedState,C.parent!==y?(C={parent:y,cache:y},l.memoizedState=C,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=C),Aa(l,mr,y)):(y=_.cache,Aa(l,mr,y),y!==C.cache&&qg(l,[mr],f,!0))),Dr(a,l,l.pendingProps.children,f),l.child;case 29:throw l.pendingProps}throw Error(i(156,l.tag))}function Zn(a){a.flags|=4}function _m(a,l,f,y,C){if((l=(a.mode&32)!==0)&&(l=!1),l){if(a.flags|=16777216,(C&335544128)===C)if(a.stateNode.complete)a.flags|=8192;else if(pT())a.flags|=8192;else throw Os=Uh,Pg}else a.flags&=-16777217}function P_(a,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!iE(l))if(pT())a.flags|=8192;else throw Os=Uh,Pg}function od(a,l){l!==null&&(a.flags|=4),a.flags&16384&&(l=a.tag!==22?Vi():536870912,a.lanes|=l,Ho|=l)}function Mc(a,l){if(!ye)switch(a.tailMode){case"hidden":l=a.tail;for(var f=null;l!==null;)l.alternate!==null&&(f=l),l=l.sibling;f===null?a.tail=null:f.sibling=null;break;case"collapsed":f=a.tail;for(var y=null;f!==null;)f.alternate!==null&&(y=f),f=f.sibling;y===null?l||a.tail===null?a.tail=null:a.tail.sibling=null:y.sibling=null}}function Ye(a){var l=a.alternate!==null&&a.alternate.child===a.child,f=0,y=0;if(l)for(var C=a.child;C!==null;)f|=C.lanes|C.childLanes,y|=C.subtreeFlags&65011712,y|=C.flags&65011712,C.return=a,C=C.sibling;else for(C=a.child;C!==null;)f|=C.lanes|C.childLanes,y|=C.subtreeFlags,y|=C.flags,C.return=a,C=C.sibling;return a.subtreeFlags|=y,a.childLanes=f,l}function V$(a,l,f){var y=l.pendingProps;switch(Og(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ye(l),null;case 1:return Ye(l),null;case 3:return f=l.stateNode,y=null,a!==null&&(y=a.memoizedState.cache),l.memoizedState.cache!==y&&(l.flags|=2048),Vn(mr),xt(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(a===null||a.child===null)&&(Lo(l)?Zn(l):a===null||a.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Dg())),Ye(l),null;case 26:var C=l.type,_=l.memoizedState;return a===null?(Zn(l),_!==null?(Ye(l),P_(l,_)):(Ye(l),_m(l,C,null,y,f))):_?_!==a.memoizedState?(Zn(l),Ye(l),P_(l,_)):(Ye(l),l.flags&=-16777217):(a=a.memoizedProps,a!==y&&Zn(l),Ye(l),_m(l,C,a,y,f)),null;case 27:if(bt(l),f=et.current,C=l.type,a!==null&&l.stateNode!=null)a.memoizedProps!==y&&Zn(l);else{if(!y){if(l.stateNode===null)throw Error(i(166));return Ye(l),null}a=Q.current,Lo(l)?Ck(l):(a=XT(C,y,f),l.stateNode=a,Zn(l))}return Ye(l),null;case 5:if(bt(l),C=l.type,a!==null&&l.stateNode!=null)a.memoizedProps!==y&&Zn(l);else{if(!y){if(l.stateNode===null)throw Error(i(166));return Ye(l),null}if(_=Q.current,Lo(l))Ck(l);else{var F=wd(et.current);switch(_){case 1:_=F.createElementNS("http://www.w3.org/2000/svg",C);break;case 2:_=F.createElementNS("http://www.w3.org/1998/Math/MathML",C);break;default:switch(C){case"svg":_=F.createElementNS("http://www.w3.org/2000/svg",C);break;case"math":_=F.createElementNS("http://www.w3.org/1998/Math/MathML",C);break;case"script":_=F.createElement("div"),_.innerHTML="<script><\/script>",_=_.removeChild(_.firstChild);break;case"select":_=typeof y.is=="string"?F.createElement("select",{is:y.is}):F.createElement("select"),y.multiple?_.multiple=!0:y.size&&(_.size=y.size);break;default:_=typeof y.is=="string"?F.createElement(C,{is:y.is}):F.createElement(C)}}_[ir]=l,_[$e]=y;t:for(F=l.child;F!==null;){if(F.tag===5||F.tag===6)_.appendChild(F.stateNode);else if(F.tag!==4&&F.tag!==27&&F.child!==null){F.child.return=F,F=F.child;continue}if(F===l)break t;for(;F.sibling===null;){if(F.return===null||F.return===l)break t;F=F.return}F.sibling.return=F.return,F=F.sibling}l.stateNode=_;t:switch(Fr(_,C,y),C){case"button":case"input":case"select":case"textarea":y=!!y.autoFocus;break t;case"img":y=!0;break t;default:y=!1}y&&Zn(l)}}return Ye(l),_m(l,l.type,a===null?null:a.memoizedProps,l.pendingProps,f),null;case 6:if(a&&l.stateNode!=null)a.memoizedProps!==y&&Zn(l);else{if(typeof y!="string"&&l.stateNode===null)throw Error(i(166));if(a=et.current,Lo(l)){if(a=l.stateNode,f=l.memoizedProps,y=null,C=Or,C!==null)switch(C.tag){case 27:case 5:y=C.memoizedProps}a[ir]=l,a=!!(a.nodeValue===f||y!==null&&y.suppressHydrationWarning===!0||qT(a.nodeValue,f)),a||Ea(l,!0)}else a=wd(a).createTextNode(y),a[ir]=l,l.stateNode=a}return Ye(l),null;case 31:if(f=l.memoizedState,a===null||a.memoizedState!==null){if(y=Lo(l),f!==null){if(a===null){if(!y)throw Error(i(318));if(a=l.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(i(557));a[ir]=l}else As(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Ye(l),a=!1}else f=Dg(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=f),a=!0;if(!a)return l.flags&256?(wi(l),l):(wi(l),null);if((l.flags&128)!==0)throw Error(i(558))}return Ye(l),null;case 13:if(y=l.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(C=Lo(l),y!==null&&y.dehydrated!==null){if(a===null){if(!C)throw Error(i(318));if(C=l.memoizedState,C=C!==null?C.dehydrated:null,!C)throw Error(i(317));C[ir]=l}else As(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Ye(l),C=!1}else C=Dg(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=C),C=!0;if(!C)return l.flags&256?(wi(l),l):(wi(l),null)}return wi(l),(l.flags&128)!==0?(l.lanes=f,l):(f=y!==null,a=a!==null&&a.memoizedState!==null,f&&(y=l.child,C=null,y.alternate!==null&&y.alternate.memoizedState!==null&&y.alternate.memoizedState.cachePool!==null&&(C=y.alternate.memoizedState.cachePool.pool),_=null,y.memoizedState!==null&&y.memoizedState.cachePool!==null&&(_=y.memoizedState.cachePool.pool),_!==C&&(y.flags|=2048)),f!==a&&f&&(l.child.flags|=8192),od(l,l.updateQueue),Ye(l),null);case 4:return xt(),a===null&&Vm(l.stateNode.containerInfo),Ye(l),null;case 10:return Vn(l.type),Ye(l),null;case 19:if(Z(dr),y=l.memoizedState,y===null)return Ye(l),null;if(C=(l.flags&128)!==0,_=y.rendering,_===null)if(C)Mc(y,!1);else{if(cr!==0||a!==null&&(a.flags&128)!==0)for(a=l.child;a!==null;){if(_=Wh(a),_!==null){for(l.flags|=128,Mc(y,!1),a=_.updateQueue,l.updateQueue=a,od(l,a),l.subtreeFlags=0,a=f,f=l.child;f!==null;)mk(f,a),f=f.sibling;return H(dr,dr.current&1|2),ye&&Gn(l,y.treeForkCount),l.child}a=a.sibling}y.tail!==null&&Ae()>dd&&(l.flags|=128,C=!0,Mc(y,!1),l.lanes=4194304)}else{if(!C)if(a=Wh(_),a!==null){if(l.flags|=128,C=!0,a=a.updateQueue,l.updateQueue=a,od(l,a),Mc(y,!0),y.tail===null&&y.tailMode==="hidden"&&!_.alternate&&!ye)return Ye(l),null}else 2*Ae()-y.renderingStartTime>dd&&f!==536870912&&(l.flags|=128,C=!0,Mc(y,!1),l.lanes=4194304);y.isBackwards?(_.sibling=l.child,l.child=_):(a=y.last,a!==null?a.sibling=_:l.child=_,y.last=_)}return y.tail!==null?(a=y.tail,y.rendering=a,y.tail=a.sibling,y.renderingStartTime=Ae(),a.sibling=null,f=dr.current,H(dr,C?f&1|2:f&1),ye&&Gn(l,y.treeForkCount),a):(Ye(l),null);case 22:case 23:return wi(l),Wg(),y=l.memoizedState!==null,a!==null?a.memoizedState!==null!==y&&(l.flags|=8192):y&&(l.flags|=8192),y?(f&536870912)!==0&&(l.flags&128)===0&&(Ye(l),l.subtreeFlags&6&&(l.flags|=8192)):Ye(l),f=l.updateQueue,f!==null&&od(l,f.retryQueue),f=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(f=a.memoizedState.cachePool.pool),y=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(y=l.memoizedState.cachePool.pool),y!==f&&(l.flags|=2048),a!==null&&Z(Ms),null;case 24:return f=null,a!==null&&(f=a.memoizedState.cache),l.memoizedState.cache!==f&&(l.flags|=2048),Vn(mr),Ye(l),null;case 25:return null;case 30:return null}throw Error(i(156,l.tag))}function W$(a,l){switch(Og(l),l.tag){case 1:return a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 3:return Vn(mr),xt(),a=l.flags,(a&65536)!==0&&(a&128)===0?(l.flags=a&-65537|128,l):null;case 26:case 27:case 5:return bt(l),null;case 31:if(l.memoizedState!==null){if(wi(l),l.alternate===null)throw Error(i(340));As()}return a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 13:if(wi(l),a=l.memoizedState,a!==null&&a.dehydrated!==null){if(l.alternate===null)throw Error(i(340));As()}return a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 19:return Z(dr),null;case 4:return xt(),null;case 10:return Vn(l.type),null;case 22:case 23:return wi(l),Wg(),a!==null&&Z(Ms),a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 24:return Vn(mr),null;case 25:return null;default:return null}}function H_(a,l){switch(Og(l),l.tag){case 3:Vn(mr),xt();break;case 26:case 27:case 5:bt(l);break;case 4:xt();break;case 31:l.memoizedState!==null&&wi(l);break;case 13:wi(l);break;case 19:Z(dr);break;case 10:Vn(l.type);break;case 22:case 23:wi(l),Wg(),a!==null&&Z(Ms);break;case 24:Vn(mr)}}function Nc(a,l){try{var f=l.updateQueue,y=f!==null?f.lastEffect:null;if(y!==null){var C=y.next;f=C;do{if((f.tag&a)===a){y=void 0;var _=f.create,F=f.inst;y=_(),F.destroy=y}f=f.next}while(f!==C)}}catch(W){Re(l,l.return,W)}}function Ra(a,l,f){try{var y=l.updateQueue,C=y!==null?y.lastEffect:null;if(C!==null){var _=C.next;y=_;do{if((y.tag&a)===a){var F=y.inst,W=F.destroy;if(W!==void 0){F.destroy=void 0,C=l;var rt=f,ut=W;try{ut()}catch(yt){Re(C,rt,yt)}}}y=y.next}while(y!==_)}}catch(yt){Re(l,l.return,yt)}}function U_(a){var l=a.updateQueue;if(l!==null){var f=a.stateNode;try{Rk(l,f)}catch(y){Re(a,a.return,y)}}}function G_(a,l,f){f.props=Fs(a.type,a.memoizedProps),f.state=a.memoizedState;try{f.componentWillUnmount()}catch(y){Re(a,l,y)}}function Oc(a,l){try{var f=a.ref;if(f!==null){switch(a.tag){case 26:case 27:case 5:var y=a.stateNode;break;case 30:y=a.stateNode;break;default:y=a.stateNode}typeof f=="function"?a.refCleanup=f(y):f.current=y}}catch(C){Re(a,l,C)}}function Cn(a,l){var f=a.ref,y=a.refCleanup;if(f!==null)if(typeof y=="function")try{y()}catch(C){Re(a,l,C)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof f=="function")try{f(null)}catch(C){Re(a,l,C)}else f.current=null}function Y_(a){var l=a.type,f=a.memoizedProps,y=a.stateNode;try{t:switch(l){case"button":case"input":case"select":case"textarea":f.autoFocus&&y.focus();break t;case"img":f.src?y.src=f.src:f.srcSet&&(y.srcset=f.srcSet)}}catch(C){Re(a,a.return,C)}}function Tm(a,l,f){try{var y=a.stateNode;mP(y,a.type,f,l),y[$e]=l}catch(C){Re(a,a.return,C)}}function V_(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&$a(a.type)||a.tag===4}function Em(a){t:for(;;){for(;a.sibling===null;){if(a.return===null||V_(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&$a(a.type)||a.flags&2||a.child===null||a.tag===4)continue t;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function Am(a,l,f){var y=a.tag;if(y===5||y===6)a=a.stateNode,l?(f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f).insertBefore(a,l):(l=f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f,l.appendChild(a),f=f._reactRootContainer,f!=null||l.onclick!==null||(l.onclick=Pn));else if(y!==4&&(y===27&&$a(a.type)&&(f=a.stateNode,l=null),a=a.child,a!==null))for(Am(a,l,f),a=a.sibling;a!==null;)Am(a,l,f),a=a.sibling}function ld(a,l,f){var y=a.tag;if(y===5||y===6)a=a.stateNode,l?f.insertBefore(a,l):f.appendChild(a);else if(y!==4&&(y===27&&$a(a.type)&&(f=a.stateNode),a=a.child,a!==null))for(ld(a,l,f),a=a.sibling;a!==null;)ld(a,l,f),a=a.sibling}function W_(a){var l=a.stateNode,f=a.memoizedProps;try{for(var y=a.type,C=l.attributes;C.length;)l.removeAttributeNode(C[0]);Fr(l,y,f),l[ir]=a,l[$e]=f}catch(_){Re(a,a.return,_)}}var Kn=!1,br=!1,Bm=!1,X_=typeof WeakSet=="function"?WeakSet:Set,Lr=null;function X$(a,l){if(a=a.containerInfo,Qm=Bd,a=ok(a),wg(a)){if("selectionStart"in a)var f={start:a.selectionStart,end:a.selectionEnd};else t:{f=(f=a.ownerDocument)&&f.defaultView||window;var y=f.getSelection&&f.getSelection();if(y&&y.rangeCount!==0){f=y.anchorNode;var C=y.anchorOffset,_=y.focusNode;y=y.focusOffset;try{f.nodeType,_.nodeType}catch{f=null;break t}var F=0,W=-1,rt=-1,ut=0,yt=0,Ct=a,ht=null;e:for(;;){for(var pt;Ct!==f||C!==0&&Ct.nodeType!==3||(W=F+C),Ct!==_||y!==0&&Ct.nodeType!==3||(rt=F+y),Ct.nodeType===3&&(F+=Ct.nodeValue.length),(pt=Ct.firstChild)!==null;)ht=Ct,Ct=pt;for(;;){if(Ct===a)break e;if(ht===f&&++ut===C&&(W=F),ht===_&&++yt===y&&(rt=F),(pt=Ct.nextSibling)!==null)break;Ct=ht,ht=Ct.parentNode}Ct=pt}f=W===-1||rt===-1?null:{start:W,end:rt}}else f=null}f=f||{start:0,end:0}}else f=null;for(Zm={focusedElem:a,selectionRange:f},Bd=!1,Lr=l;Lr!==null;)if(l=Lr,a=l.child,(l.subtreeFlags&1028)!==0&&a!==null)a.return=l,Lr=a;else for(;Lr!==null;){switch(l=Lr,_=l.alternate,a=l.flags,l.tag){case 0:if((a&4)!==0&&(a=l.updateQueue,a=a!==null?a.events:null,a!==null))for(f=0;f<a.length;f++)C=a[f],C.ref.impl=C.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&_!==null){a=void 0,f=l,C=_.memoizedProps,_=_.memoizedState,y=f.stateNode;try{var Ft=Fs(f.type,C);a=y.getSnapshotBeforeUpdate(Ft,_),y.__reactInternalSnapshotBeforeUpdate=a}catch(Zt){Re(f,f.return,Zt)}}break;case 3:if((a&1024)!==0){if(a=l.stateNode.containerInfo,f=a.nodeType,f===9)t0(a);else if(f===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":t0(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(i(163))}if(a=l.sibling,a!==null){a.return=l.return,Lr=a;break}Lr=l.return}}function Q_(a,l,f){var y=f.flags;switch(f.tag){case 0:case 11:case 15:ta(a,f),y&4&&Nc(5,f);break;case 1:if(ta(a,f),y&4)if(a=f.stateNode,l===null)try{a.componentDidMount()}catch(F){Re(f,f.return,F)}else{var C=Fs(f.type,l.memoizedProps);l=l.memoizedState;try{a.componentDidUpdate(C,l,a.__reactInternalSnapshotBeforeUpdate)}catch(F){Re(f,f.return,F)}}y&64&&U_(f),y&512&&Oc(f,f.return);break;case 3:if(ta(a,f),y&64&&(a=f.updateQueue,a!==null)){if(l=null,f.child!==null)switch(f.child.tag){case 27:case 5:l=f.child.stateNode;break;case 1:l=f.child.stateNode}try{Rk(a,l)}catch(F){Re(f,f.return,F)}}break;case 27:l===null&&y&4&&W_(f);case 26:case 5:ta(a,f),l===null&&y&4&&Y_(f),y&512&&Oc(f,f.return);break;case 12:ta(a,f);break;case 31:ta(a,f),y&4&&J_(a,f);break;case 13:ta(a,f),y&4&&tT(a,f),y&64&&(a=f.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(f=nP.bind(null,f),kP(a,f))));break;case 22:if(y=f.memoizedState!==null||Kn,!y){l=l!==null&&l.memoizedState!==null||br,C=Kn;var _=br;Kn=y,(br=l)&&!_?ea(a,f,(f.subtreeFlags&8772)!==0):ta(a,f),Kn=C,br=_}break;case 30:break;default:ta(a,f)}}function Z_(a){var l=a.alternate;l!==null&&(a.alternate=null,Z_(l)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(l=a.stateNode,l!==null&&Ut(l)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var Ze=null,ni=!1;function Jn(a,l,f){for(f=f.child;f!==null;)K_(a,l,f),f=f.sibling}function K_(a,l,f){if(Ht&&typeof Ht.onCommitFiberUnmount=="function")try{Ht.onCommitFiberUnmount(Lt,f)}catch{}switch(f.tag){case 26:br||Cn(f,l),Jn(a,l,f),f.memoizedState?f.memoizedState.count--:f.stateNode&&(f=f.stateNode,f.parentNode.removeChild(f));break;case 27:br||Cn(f,l);var y=Ze,C=ni;$a(f.type)&&(Ze=f.stateNode,ni=!1),Jn(a,l,f),Pc(f.stateNode),Ze=y,ni=C;break;case 5:br||Cn(f,l);case 6:if(y=Ze,C=ni,Ze=null,Jn(a,l,f),Ze=y,ni=C,Ze!==null)if(ni)try{(Ze.nodeType===9?Ze.body:Ze.nodeName==="HTML"?Ze.ownerDocument.body:Ze).removeChild(f.stateNode)}catch(_){Re(f,l,_)}else try{Ze.removeChild(f.stateNode)}catch(_){Re(f,l,_)}break;case 18:Ze!==null&&(ni?(a=Ze,UT(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,f.stateNode),Zo(a)):UT(Ze,f.stateNode));break;case 4:y=Ze,C=ni,Ze=f.stateNode.containerInfo,ni=!0,Jn(a,l,f),Ze=y,ni=C;break;case 0:case 11:case 14:case 15:Ra(2,f,l),br||Ra(4,f,l),Jn(a,l,f);break;case 1:br||(Cn(f,l),y=f.stateNode,typeof y.componentWillUnmount=="function"&&G_(f,l,y)),Jn(a,l,f);break;case 21:Jn(a,l,f);break;case 22:br=(y=br)||f.memoizedState!==null,Jn(a,l,f),br=y;break;default:Jn(a,l,f)}}function J_(a,l){if(l.memoizedState===null&&(a=l.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{Zo(a)}catch(f){Re(l,l.return,f)}}}function tT(a,l){if(l.memoizedState===null&&(a=l.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{Zo(a)}catch(f){Re(l,l.return,f)}}function Q$(a){switch(a.tag){case 31:case 13:case 19:var l=a.stateNode;return l===null&&(l=a.stateNode=new X_),l;case 22:return a=a.stateNode,l=a._retryCache,l===null&&(l=a._retryCache=new X_),l;default:throw Error(i(435,a.tag))}}function cd(a,l){var f=Q$(a);l.forEach(function(y){if(!f.has(y)){f.add(y);var C=aP.bind(null,a,y);y.then(C,C)}})}function ai(a,l){var f=l.deletions;if(f!==null)for(var y=0;y<f.length;y++){var C=f[y],_=a,F=l,W=F;t:for(;W!==null;){switch(W.tag){case 27:if($a(W.type)){Ze=W.stateNode,ni=!1;break t}break;case 5:Ze=W.stateNode,ni=!1;break t;case 3:case 4:Ze=W.stateNode.containerInfo,ni=!0;break t}W=W.return}if(Ze===null)throw Error(i(160));K_(_,F,C),Ze=null,ni=!1,_=C.alternate,_!==null&&(_.return=null),C.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)eT(l,a),l=l.sibling}var Qi=null;function eT(a,l){var f=a.alternate,y=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:ai(l,a),si(a),y&4&&(Ra(3,a,a.return),Nc(3,a),Ra(5,a,a.return));break;case 1:ai(l,a),si(a),y&512&&(br||f===null||Cn(f,f.return)),y&64&&Kn&&(a=a.updateQueue,a!==null&&(y=a.callbacks,y!==null&&(f=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=f===null?y:f.concat(y))));break;case 26:var C=Qi;if(ai(l,a),si(a),y&512&&(br||f===null||Cn(f,f.return)),y&4){var _=f!==null?f.memoizedState:null;if(y=a.memoizedState,f===null)if(y===null)if(a.stateNode===null){t:{y=a.type,f=a.memoizedProps,C=C.ownerDocument||C;e:switch(y){case"title":_=C.getElementsByTagName("title")[0],(!_||_[xn]||_[ir]||_.namespaceURI==="http://www.w3.org/2000/svg"||_.hasAttribute("itemprop"))&&(_=C.createElement(y),C.head.insertBefore(_,C.querySelector("head > title"))),Fr(_,y,f),_[ir]=a,ue(_),y=_;break t;case"link":var F=eE("link","href",C).get(y+(f.href||""));if(F){for(var W=0;W<F.length;W++)if(_=F[W],_.getAttribute("href")===(f.href==null||f.href===""?null:f.href)&&_.getAttribute("rel")===(f.rel==null?null:f.rel)&&_.getAttribute("title")===(f.title==null?null:f.title)&&_.getAttribute("crossorigin")===(f.crossOrigin==null?null:f.crossOrigin)){F.splice(W,1);break e}}_=C.createElement(y),Fr(_,y,f),C.head.appendChild(_);break;case"meta":if(F=eE("meta","content",C).get(y+(f.content||""))){for(W=0;W<F.length;W++)if(_=F[W],_.getAttribute("content")===(f.content==null?null:""+f.content)&&_.getAttribute("name")===(f.name==null?null:f.name)&&_.getAttribute("property")===(f.property==null?null:f.property)&&_.getAttribute("http-equiv")===(f.httpEquiv==null?null:f.httpEquiv)&&_.getAttribute("charset")===(f.charSet==null?null:f.charSet)){F.splice(W,1);break e}}_=C.createElement(y),Fr(_,y,f),C.head.appendChild(_);break;default:throw Error(i(468,y))}_[ir]=a,ue(_),y=_}a.stateNode=y}else rE(C,a.type,a.stateNode);else a.stateNode=tE(C,y,a.memoizedProps);else _!==y?(_===null?f.stateNode!==null&&(f=f.stateNode,f.parentNode.removeChild(f)):_.count--,y===null?rE(C,a.type,a.stateNode):tE(C,y,a.memoizedProps)):y===null&&a.stateNode!==null&&Tm(a,a.memoizedProps,f.memoizedProps)}break;case 27:ai(l,a),si(a),y&512&&(br||f===null||Cn(f,f.return)),f!==null&&y&4&&Tm(a,a.memoizedProps,f.memoizedProps);break;case 5:if(ai(l,a),si(a),y&512&&(br||f===null||Cn(f,f.return)),a.flags&32){C=a.stateNode;try{vo(C,"")}catch(Ft){Re(a,a.return,Ft)}}y&4&&a.stateNode!=null&&(C=a.memoizedProps,Tm(a,C,f!==null?f.memoizedProps:C)),y&1024&&(Bm=!0);break;case 6:if(ai(l,a),si(a),y&4){if(a.stateNode===null)throw Error(i(162));y=a.memoizedProps,f=a.stateNode;try{f.nodeValue=y}catch(Ft){Re(a,a.return,Ft)}}break;case 3:if(_d=null,C=Qi,Qi=Sd(l.containerInfo),ai(l,a),Qi=C,si(a),y&4&&f!==null&&f.memoizedState.isDehydrated)try{Zo(l.containerInfo)}catch(Ft){Re(a,a.return,Ft)}Bm&&(Bm=!1,rT(a));break;case 4:y=Qi,Qi=Sd(a.stateNode.containerInfo),ai(l,a),si(a),Qi=y;break;case 12:ai(l,a),si(a);break;case 31:ai(l,a),si(a),y&4&&(y=a.updateQueue,y!==null&&(a.updateQueue=null,cd(a,y)));break;case 13:ai(l,a),si(a),a.child.flags&8192&&a.memoizedState!==null!=(f!==null&&f.memoizedState!==null)&&(hd=Ae()),y&4&&(y=a.updateQueue,y!==null&&(a.updateQueue=null,cd(a,y)));break;case 22:C=a.memoizedState!==null;var rt=f!==null&&f.memoizedState!==null,ut=Kn,yt=br;if(Kn=ut||C,br=yt||rt,ai(l,a),br=yt,Kn=ut,si(a),y&8192)t:for(l=a.stateNode,l._visibility=C?l._visibility&-2:l._visibility|1,C&&(f===null||rt||Kn||br||Is(a)),f=null,l=a;;){if(l.tag===5||l.tag===26){if(f===null){rt=f=l;try{if(_=rt.stateNode,C)F=_.style,typeof F.setProperty=="function"?F.setProperty("display","none","important"):F.display="none";else{W=rt.stateNode;var Ct=rt.memoizedProps.style,ht=Ct!=null&&Ct.hasOwnProperty("display")?Ct.display:null;W.style.display=ht==null||typeof ht=="boolean"?"":(""+ht).trim()}}catch(Ft){Re(rt,rt.return,Ft)}}}else if(l.tag===6){if(f===null){rt=l;try{rt.stateNode.nodeValue=C?"":rt.memoizedProps}catch(Ft){Re(rt,rt.return,Ft)}}}else if(l.tag===18){if(f===null){rt=l;try{var pt=rt.stateNode;C?GT(pt,!0):GT(rt.stateNode,!1)}catch(Ft){Re(rt,rt.return,Ft)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===a)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===a)break t;for(;l.sibling===null;){if(l.return===null||l.return===a)break t;f===l&&(f=null),l=l.return}f===l&&(f=null),l.sibling.return=l.return,l=l.sibling}y&4&&(y=a.updateQueue,y!==null&&(f=y.retryQueue,f!==null&&(y.retryQueue=null,cd(a,f))));break;case 19:ai(l,a),si(a),y&4&&(y=a.updateQueue,y!==null&&(a.updateQueue=null,cd(a,y)));break;case 30:break;case 21:break;default:ai(l,a),si(a)}}function si(a){var l=a.flags;if(l&2){try{for(var f,y=a.return;y!==null;){if(V_(y)){f=y;break}y=y.return}if(f==null)throw Error(i(160));switch(f.tag){case 27:var C=f.stateNode,_=Em(a);ld(a,_,C);break;case 5:var F=f.stateNode;f.flags&32&&(vo(F,""),f.flags&=-33);var W=Em(a);ld(a,W,F);break;case 3:case 4:var rt=f.stateNode.containerInfo,ut=Em(a);Am(a,ut,rt);break;default:throw Error(i(161))}}catch(yt){Re(a,a.return,yt)}a.flags&=-3}l&4096&&(a.flags&=-4097)}function rT(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var l=a;rT(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),a=a.sibling}}function ta(a,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)Q_(a,l.alternate,l),l=l.sibling}function Is(a){for(a=a.child;a!==null;){var l=a;switch(l.tag){case 0:case 11:case 14:case 15:Ra(4,l,l.return),Is(l);break;case 1:Cn(l,l.return);var f=l.stateNode;typeof f.componentWillUnmount=="function"&&G_(l,l.return,f),Is(l);break;case 27:Pc(l.stateNode);case 26:case 5:Cn(l,l.return),Is(l);break;case 22:l.memoizedState===null&&Is(l);break;case 30:Is(l);break;default:Is(l)}a=a.sibling}}function ea(a,l,f){for(f=f&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var y=l.alternate,C=a,_=l,F=_.flags;switch(_.tag){case 0:case 11:case 15:ea(C,_,f),Nc(4,_);break;case 1:if(ea(C,_,f),y=_,C=y.stateNode,typeof C.componentDidMount=="function")try{C.componentDidMount()}catch(ut){Re(y,y.return,ut)}if(y=_,C=y.updateQueue,C!==null){var W=y.stateNode;try{var rt=C.shared.hiddenCallbacks;if(rt!==null)for(C.shared.hiddenCallbacks=null,C=0;C<rt.length;C++)Ok(rt[C],W)}catch(ut){Re(y,y.return,ut)}}f&&F&64&&U_(_),Oc(_,_.return);break;case 27:W_(_);case 26:case 5:ea(C,_,f),f&&y===null&&F&4&&Y_(_),Oc(_,_.return);break;case 12:ea(C,_,f);break;case 31:ea(C,_,f),f&&F&4&&J_(C,_);break;case 13:ea(C,_,f),f&&F&4&&tT(C,_);break;case 22:_.memoizedState===null&&ea(C,_,f),Oc(_,_.return);break;case 30:break;default:ea(C,_,f)}l=l.sibling}}function Lm(a,l){var f=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(f=a.memoizedState.cachePool.pool),a=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(a=l.memoizedState.cachePool.pool),a!==f&&(a!=null&&a.refCount++,f!=null&&bc(f))}function Mm(a,l){a=null,l.alternate!==null&&(a=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==a&&(l.refCount++,a!=null&&bc(a))}function Zi(a,l,f,y){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)iT(a,l,f,y),l=l.sibling}function iT(a,l,f,y){var C=l.flags;switch(l.tag){case 0:case 11:case 15:Zi(a,l,f,y),C&2048&&Nc(9,l);break;case 1:Zi(a,l,f,y);break;case 3:Zi(a,l,f,y),C&2048&&(a=null,l.alternate!==null&&(a=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==a&&(l.refCount++,a!=null&&bc(a)));break;case 12:if(C&2048){Zi(a,l,f,y),a=l.stateNode;try{var _=l.memoizedProps,F=_.id,W=_.onPostCommit;typeof W=="function"&&W(F,l.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(rt){Re(l,l.return,rt)}}else Zi(a,l,f,y);break;case 31:Zi(a,l,f,y);break;case 13:Zi(a,l,f,y);break;case 23:break;case 22:_=l.stateNode,F=l.alternate,l.memoizedState!==null?_._visibility&2?Zi(a,l,f,y):Rc(a,l):_._visibility&2?Zi(a,l,f,y):(_._visibility|=2,jo(a,l,f,y,(l.subtreeFlags&10256)!==0||!1)),C&2048&&Lm(F,l);break;case 24:Zi(a,l,f,y),C&2048&&Mm(l.alternate,l);break;default:Zi(a,l,f,y)}}function jo(a,l,f,y,C){for(C=C&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var _=a,F=l,W=f,rt=y,ut=F.flags;switch(F.tag){case 0:case 11:case 15:jo(_,F,W,rt,C),Nc(8,F);break;case 23:break;case 22:var yt=F.stateNode;F.memoizedState!==null?yt._visibility&2?jo(_,F,W,rt,C):Rc(_,F):(yt._visibility|=2,jo(_,F,W,rt,C)),C&&ut&2048&&Lm(F.alternate,F);break;case 24:jo(_,F,W,rt,C),C&&ut&2048&&Mm(F.alternate,F);break;default:jo(_,F,W,rt,C)}l=l.sibling}}function Rc(a,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var f=a,y=l,C=y.flags;switch(y.tag){case 22:Rc(f,y),C&2048&&Lm(y.alternate,y);break;case 24:Rc(f,y),C&2048&&Mm(y.alternate,y);break;default:Rc(f,y)}l=l.sibling}}var Dc=8192;function $o(a,l,f){if(a.subtreeFlags&Dc)for(a=a.child;a!==null;)nT(a,l,f),a=a.sibling}function nT(a,l,f){switch(a.tag){case 26:$o(a,l,f),a.flags&Dc&&a.memoizedState!==null&&FP(f,Qi,a.memoizedState,a.memoizedProps);break;case 5:$o(a,l,f);break;case 3:case 4:var y=Qi;Qi=Sd(a.stateNode.containerInfo),$o(a,l,f),Qi=y;break;case 22:a.memoizedState===null&&(y=a.alternate,y!==null&&y.memoizedState!==null?(y=Dc,Dc=16777216,$o(a,l,f),Dc=y):$o(a,l,f));break;default:$o(a,l,f)}}function aT(a){var l=a.alternate;if(l!==null&&(a=l.child,a!==null)){l.child=null;do l=a.sibling,a.sibling=null,a=l;while(a!==null)}}function Fc(a){var l=a.deletions;if((a.flags&16)!==0){if(l!==null)for(var f=0;f<l.length;f++){var y=l[f];Lr=y,oT(y,a)}aT(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)sT(a),a=a.sibling}function sT(a){switch(a.tag){case 0:case 11:case 15:Fc(a),a.flags&2048&&Ra(9,a,a.return);break;case 3:Fc(a);break;case 12:Fc(a);break;case 22:var l=a.stateNode;a.memoizedState!==null&&l._visibility&2&&(a.return===null||a.return.tag!==13)?(l._visibility&=-3,ud(a)):Fc(a);break;default:Fc(a)}}function ud(a){var l=a.deletions;if((a.flags&16)!==0){if(l!==null)for(var f=0;f<l.length;f++){var y=l[f];Lr=y,oT(y,a)}aT(a)}for(a=a.child;a!==null;){switch(l=a,l.tag){case 0:case 11:case 15:Ra(8,l,l.return),ud(l);break;case 22:f=l.stateNode,f._visibility&2&&(f._visibility&=-3,ud(l));break;default:ud(l)}a=a.sibling}}function oT(a,l){for(;Lr!==null;){var f=Lr;switch(f.tag){case 0:case 11:case 15:Ra(8,f,l);break;case 23:case 22:if(f.memoizedState!==null&&f.memoizedState.cachePool!==null){var y=f.memoizedState.cachePool.pool;y!=null&&y.refCount++}break;case 24:bc(f.memoizedState.cache)}if(y=f.child,y!==null)y.return=f,Lr=y;else t:for(f=a;Lr!==null;){y=Lr;var C=y.sibling,_=y.return;if(Z_(y),y===f){Lr=null;break t}if(C!==null){C.return=_,Lr=C;break t}Lr=_}}}var Z$={getCacheForType:function(a){var l=Rr(mr),f=l.data.get(a);return f===void 0&&(f=a(),l.data.set(a,f)),f},cacheSignal:function(){return Rr(mr).controller.signal}},K$=typeof WeakMap=="function"?WeakMap:Map,Be=0,ze=null,he=null,fe=0,Oe=0,Si=null,Da=!1,Po=!1,Nm=!1,ra=0,cr=0,Fa=0,qs=0,Om=0,ki=0,Ho=0,Ic=null,oi=null,Rm=!1,hd=0,lT=0,dd=1/0,fd=null,Ia=null,Tr=0,qa=null,Uo=null,ia=0,Dm=0,Fm=null,cT=null,qc=0,Im=null;function _i(){return(Be&2)!==0&&fe!==0?fe&-fe:N.T!==null?Hm():ms()}function uT(){if(ki===0)if((fe&536870912)===0||ye){var a=mn;mn<<=1,(mn&3932160)===0&&(mn=262144),ki=a}else ki=536870912;return a=Ci.current,a!==null&&(a.flags|=32),ki}function li(a,l,f){(a===ze&&(Oe===2||Oe===9)||a.cancelPendingCommit!==null)&&(Go(a,0),za(a,fe,ki,!1)),yn(a,f),((Be&2)===0||a!==ze)&&(a===ze&&((Be&2)===0&&(qs|=f),cr===4&&za(a,fe,ki,!1)),wn(a))}function hT(a,l,f){if((Be&6)!==0)throw Error(i(327));var y=!f&&(l&127)===0&&(l&a.expiredLanes)===0||zn(a,l),C=y?eP(a,l):zm(a,l,!0),_=y;do{if(C===0){Po&&!y&&za(a,l,0,!1);break}else{if(f=a.current.alternate,_&&!J$(f)){C=zm(a,l,!1),_=!1;continue}if(C===2){if(_=l,a.errorRecoveryDisabledLanes&_)var F=0;else F=a.pendingLanes&-536870913,F=F!==0?F:F&536870912?536870912:0;if(F!==0){l=F;t:{var W=a;C=Ic;var rt=W.current.memoizedState.isDehydrated;if(rt&&(Go(W,F).flags|=256),F=zm(W,F,!1),F!==2){if(Nm&&!rt){W.errorRecoveryDisabledLanes|=_,qs|=_,C=4;break t}_=oi,oi=C,_!==null&&(oi===null?oi=_:oi.push.apply(oi,_))}C=F}if(_=!1,C!==2)continue}}if(C===1){Go(a,0),za(a,l,0,!0);break}t:{switch(y=a,_=C,_){case 0:case 1:throw Error(i(345));case 4:if((l&4194048)!==l)break;case 6:za(y,l,ki,!Da);break t;case 2:oi=null;break;case 3:case 5:break;default:throw Error(i(329))}if((l&62914560)===l&&(C=hd+300-Ae(),10<C)){if(za(y,l,ki,!Da),wa(y,0,!0)!==0)break t;ia=l,y.timeoutHandle=PT(dT.bind(null,y,f,oi,fd,Rm,l,ki,qs,Ho,Da,_,"Throttled",-0,0),C);break t}dT(y,f,oi,fd,Rm,l,ki,qs,Ho,Da,_,null,-0,0)}}break}while(!0);wn(a)}function dT(a,l,f,y,C,_,F,W,rt,ut,yt,Ct,ht,pt){if(a.timeoutHandle=-1,Ct=l.subtreeFlags,Ct&8192||(Ct&16785408)===16785408){Ct={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Pn},nT(l,_,Ct);var Ft=(_&62914560)===_?hd-Ae():(_&4194048)===_?lT-Ae():0;if(Ft=IP(Ct,Ft),Ft!==null){ia=_,a.cancelPendingCommit=Ft(vT.bind(null,a,l,_,f,y,C,F,W,rt,yt,Ct,null,ht,pt)),za(a,_,F,!ut);return}}vT(a,l,_,f,y,C,F,W,rt)}function J$(a){for(var l=a;;){var f=l.tag;if((f===0||f===11||f===15)&&l.flags&16384&&(f=l.updateQueue,f!==null&&(f=f.stores,f!==null)))for(var y=0;y<f.length;y++){var C=f[y],_=C.getSnapshot;C=C.value;try{if(!bi(_(),C))return!1}catch{return!1}}if(f=l.child,l.subtreeFlags&16384&&f!==null)f.return=l,l=f;else{if(l===a)break;for(;l.sibling===null;){if(l.return===null||l.return===a)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function za(a,l,f,y){l&=~Om,l&=~qs,a.suspendedLanes|=l,a.pingedLanes&=~l,y&&(a.warmLanes|=l),y=a.expirationTimes;for(var C=l;0<C;){var _=31-Nt(C),F=1<<_;y[_]=-1,C&=~F}f!==0&&ps(a,f,l)}function pd(){return(Be&6)===0?(zc(0),!1):!0}function qm(){if(he!==null){if(Oe===0)var a=he.return;else a=he,Yn=Bs=null,tm(a),Do=null,Cc=0,a=he;for(;a!==null;)H_(a.alternate,a),a=a.return;he=null}}function Go(a,l){var f=a.timeoutHandle;f!==-1&&(a.timeoutHandle=-1,bP(f)),f=a.cancelPendingCommit,f!==null&&(a.cancelPendingCommit=null,f()),ia=0,qm(),ze=a,he=f=Un(a.current,null),fe=l,Oe=0,Si=null,Da=!1,Po=zn(a,l),Nm=!1,Ho=ki=Om=qs=Fa=cr=0,oi=Ic=null,Rm=!1,(l&8)!==0&&(l|=l&32);var y=a.entangledLanes;if(y!==0)for(a=a.entanglements,y&=l;0<y;){var C=31-Nt(y),_=1<<C;l|=a[C],y&=~_}return ra=l,Dh(),f}function fT(a,l){se=null,N.H=Bc,l===Ro||l===Hh?(l=Bk(),Oe=3):l===Pg?(l=Bk(),Oe=4):Oe=l===mm?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,Si=l,he===null&&(cr=1,id(a,Oi(l,a.current)))}function pT(){var a=Ci.current;return a===null?!0:(fe&4194048)===fe?Ii===null:(fe&62914560)===fe||(fe&536870912)!==0?a===Ii:!1}function gT(){var a=N.H;return N.H=Bc,a===null?Bc:a}function mT(){var a=N.A;return N.A=Z$,a}function gd(){cr=4,Da||(fe&4194048)!==fe&&Ci.current!==null||(Po=!0),(Fa&134217727)===0&&(qs&134217727)===0||ze===null||za(ze,fe,ki,!1)}function zm(a,l,f){var y=Be;Be|=2;var C=gT(),_=mT();(ze!==a||fe!==l)&&(fd=null,Go(a,l)),l=!1;var F=cr;t:do try{if(Oe!==0&&he!==null){var W=he,rt=Si;switch(Oe){case 8:qm(),F=6;break t;case 3:case 2:case 9:case 6:Ci.current===null&&(l=!0);var ut=Oe;if(Oe=0,Si=null,Yo(a,W,rt,ut),f&&Po){F=0;break t}break;default:ut=Oe,Oe=0,Si=null,Yo(a,W,rt,ut)}}tP(),F=cr;break}catch(yt){fT(a,yt)}while(!0);return l&&a.shellSuspendCounter++,Yn=Bs=null,Be=y,N.H=C,N.A=_,he===null&&(ze=null,fe=0,Dh()),F}function tP(){for(;he!==null;)yT(he)}function eP(a,l){var f=Be;Be|=2;var y=gT(),C=mT();ze!==a||fe!==l?(fd=null,dd=Ae()+500,Go(a,l)):Po=zn(a,l);t:do try{if(Oe!==0&&he!==null){l=he;var _=Si;e:switch(Oe){case 1:Oe=0,Si=null,Yo(a,l,_,1);break;case 2:case 9:if(Ek(_)){Oe=0,Si=null,xT(l);break}l=function(){Oe!==2&&Oe!==9||ze!==a||(Oe=7),wn(a)},_.then(l,l);break t;case 3:Oe=7;break t;case 4:Oe=5;break t;case 7:Ek(_)?(Oe=0,Si=null,xT(l)):(Oe=0,Si=null,Yo(a,l,_,7));break;case 5:var F=null;switch(he.tag){case 26:F=he.memoizedState;case 5:case 27:var W=he;if(F?iE(F):W.stateNode.complete){Oe=0,Si=null;var rt=W.sibling;if(rt!==null)he=rt;else{var ut=W.return;ut!==null?(he=ut,md(ut)):he=null}break e}}Oe=0,Si=null,Yo(a,l,_,5);break;case 6:Oe=0,Si=null,Yo(a,l,_,6);break;case 8:qm(),cr=6;break t;default:throw Error(i(462))}}rP();break}catch(yt){fT(a,yt)}while(!0);return Yn=Bs=null,N.H=y,N.A=C,Be=f,he!==null?0:(ze=null,fe=0,Dh(),cr)}function rP(){for(;he!==null&&!We();)yT(he)}function yT(a){var l=$_(a.alternate,a,ra);a.memoizedProps=a.pendingProps,l===null?md(a):he=l}function xT(a){var l=a,f=l.alternate;switch(l.tag){case 15:case 0:l=D_(f,l,l.pendingProps,l.type,void 0,fe);break;case 11:l=D_(f,l,l.pendingProps,l.type.render,l.ref,fe);break;case 5:tm(l);default:H_(f,l),l=he=mk(l,ra),l=$_(f,l,ra)}a.memoizedProps=a.pendingProps,l===null?md(a):he=l}function Yo(a,l,f,y){Yn=Bs=null,tm(l),Do=null,Cc=0;var C=l.return;try{if(U$(a,C,l,f,fe)){cr=1,id(a,Oi(f,a.current)),he=null;return}}catch(_){if(C!==null)throw he=C,_;cr=1,id(a,Oi(f,a.current)),he=null;return}l.flags&32768?(ye||y===1?a=!0:Po||(fe&536870912)!==0?a=!1:(Da=a=!0,(y===2||y===9||y===3||y===6)&&(y=Ci.current,y!==null&&y.tag===13&&(y.flags|=16384))),bT(l,a)):md(l)}function md(a){var l=a;do{if((l.flags&32768)!==0){bT(l,Da);return}a=l.return;var f=V$(l.alternate,l,ra);if(f!==null){he=f;return}if(l=l.sibling,l!==null){he=l;return}he=l=a}while(l!==null);cr===0&&(cr=5)}function bT(a,l){do{var f=W$(a.alternate,a);if(f!==null){f.flags&=32767,he=f;return}if(f=a.return,f!==null&&(f.flags|=32768,f.subtreeFlags=0,f.deletions=null),!l&&(a=a.sibling,a!==null)){he=a;return}he=a=f}while(a!==null);cr=6,he=null}function vT(a,l,f,y,C,_,F,W,rt){a.cancelPendingCommit=null;do yd();while(Tr!==0);if((Be&6)!==0)throw Error(i(327));if(l!==null){if(l===a.current)throw Error(i(177));if(_=l.lanes|l.childLanes,_|=Eg,fs(a,f,_,F,W,rt),a===ze&&(he=ze=null,fe=0),Uo=l,qa=a,ia=f,Dm=_,Fm=C,cT=y,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,sP(Dt,function(){return _T(),null})):(a.callbackNode=null,a.callbackPriority=0),y=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||y){y=N.T,N.T=null,C=P.p,P.p=2,F=Be,Be|=4;try{X$(a,l,f)}finally{Be=F,P.p=C,N.T=y}}Tr=1,CT(),wT(),ST()}}function CT(){if(Tr===1){Tr=0;var a=qa,l=Uo,f=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||f){f=N.T,N.T=null;var y=P.p;P.p=2;var C=Be;Be|=4;try{eT(l,a);var _=Zm,F=ok(a.containerInfo),W=_.focusedElem,rt=_.selectionRange;if(F!==W&&W&&W.ownerDocument&&sk(W.ownerDocument.documentElement,W)){if(rt!==null&&wg(W)){var ut=rt.start,yt=rt.end;if(yt===void 0&&(yt=ut),"selectionStart"in W)W.selectionStart=ut,W.selectionEnd=Math.min(yt,W.value.length);else{var Ct=W.ownerDocument||document,ht=Ct&&Ct.defaultView||window;if(ht.getSelection){var pt=ht.getSelection(),Ft=W.textContent.length,Zt=Math.min(rt.start,Ft),Ie=rt.end===void 0?Zt:Math.min(rt.end,Ft);!pt.extend&&Zt>Ie&&(F=Ie,Ie=Zt,Zt=F);var st=ak(W,Zt),it=ak(W,Ie);if(st&&it&&(pt.rangeCount!==1||pt.anchorNode!==st.node||pt.anchorOffset!==st.offset||pt.focusNode!==it.node||pt.focusOffset!==it.offset)){var ct=Ct.createRange();ct.setStart(st.node,st.offset),pt.removeAllRanges(),Zt>Ie?(pt.addRange(ct),pt.extend(it.node,it.offset)):(ct.setEnd(it.node,it.offset),pt.addRange(ct))}}}}for(Ct=[],pt=W;pt=pt.parentNode;)pt.nodeType===1&&Ct.push({element:pt,left:pt.scrollLeft,top:pt.scrollTop});for(typeof W.focus=="function"&&W.focus(),W=0;W<Ct.length;W++){var vt=Ct[W];vt.element.scrollLeft=vt.left,vt.element.scrollTop=vt.top}}Bd=!!Qm,Zm=Qm=null}finally{Be=C,P.p=y,N.T=f}}a.current=l,Tr=2}}function wT(){if(Tr===2){Tr=0;var a=qa,l=Uo,f=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||f){f=N.T,N.T=null;var y=P.p;P.p=2;var C=Be;Be|=4;try{Q_(a,l.alternate,l)}finally{Be=C,P.p=y,N.T=f}}Tr=3}}function ST(){if(Tr===4||Tr===3){Tr=0,Me();var a=qa,l=Uo,f=ia,y=cT;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?Tr=5:(Tr=0,Uo=qa=null,kT(a,a.pendingLanes));var C=a.pendingLanes;if(C===0&&(Ia=null),xi(f),l=l.stateNode,Ht&&typeof Ht.onCommitFiberRoot=="function")try{Ht.onCommitFiberRoot(Lt,l,void 0,(l.current.flags&128)===128)}catch{}if(y!==null){l=N.T,C=P.p,P.p=2,N.T=null;try{for(var _=a.onRecoverableError,F=0;F<y.length;F++){var W=y[F];_(W.value,{componentStack:W.stack})}}finally{N.T=l,P.p=C}}(ia&3)!==0&&yd(),wn(a),C=a.pendingLanes,(f&261930)!==0&&(C&42)!==0?a===Im?qc++:(qc=0,Im=a):qc=0,zc(0)}}function kT(a,l){(a.pooledCacheLanes&=l)===0&&(l=a.pooledCache,l!=null&&(a.pooledCache=null,bc(l)))}function yd(){return CT(),wT(),ST(),_T()}function _T(){if(Tr!==5)return!1;var a=qa,l=Dm;Dm=0;var f=xi(ia),y=N.T,C=P.p;try{P.p=32>f?32:f,N.T=null,f=Fm,Fm=null;var _=qa,F=ia;if(Tr=0,Uo=qa=null,ia=0,(Be&6)!==0)throw Error(i(331));var W=Be;if(Be|=4,sT(_.current),iT(_,_.current,F,f),Be=W,zc(0,!1),Ht&&typeof Ht.onPostCommitFiberRoot=="function")try{Ht.onPostCommitFiberRoot(Lt,_)}catch{}return!0}finally{P.p=C,N.T=y,kT(a,l)}}function TT(a,l,f){l=Oi(f,l),l=gm(a.stateNode,l,2),a=Ma(a,l,2),a!==null&&(yn(a,2),wn(a))}function Re(a,l,f){if(a.tag===3)TT(a,a,f);else for(;l!==null;){if(l.tag===3){TT(l,a,f);break}else if(l.tag===1){var y=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(Ia===null||!Ia.has(y))){a=Oi(f,a),f=E_(2),y=Ma(l,f,2),y!==null&&(A_(f,y,l,a),yn(y,2),wn(y));break}}l=l.return}}function jm(a,l,f){var y=a.pingCache;if(y===null){y=a.pingCache=new K$;var C=new Set;y.set(l,C)}else C=y.get(l),C===void 0&&(C=new Set,y.set(l,C));C.has(f)||(Nm=!0,C.add(f),a=iP.bind(null,a,l,f),l.then(a,a))}function iP(a,l,f){var y=a.pingCache;y!==null&&y.delete(l),a.pingedLanes|=a.suspendedLanes&f,a.warmLanes&=~f,ze===a&&(fe&f)===f&&(cr===4||cr===3&&(fe&62914560)===fe&&300>Ae()-hd?(Be&2)===0&&Go(a,0):Om|=f,Ho===fe&&(Ho=0)),wn(a)}function ET(a,l){l===0&&(l=Vi()),a=Ts(a,l),a!==null&&(yn(a,l),wn(a))}function nP(a){var l=a.memoizedState,f=0;l!==null&&(f=l.retryLane),ET(a,f)}function aP(a,l){var f=0;switch(a.tag){case 31:case 13:var y=a.stateNode,C=a.memoizedState;C!==null&&(f=C.retryLane);break;case 19:y=a.stateNode;break;case 22:y=a.stateNode._retryCache;break;default:throw Error(i(314))}y!==null&&y.delete(l),ET(a,f)}function sP(a,l){return Ve(a,l)}var xd=null,Vo=null,$m=!1,bd=!1,Pm=!1,ja=0;function wn(a){a!==Vo&&a.next===null&&(Vo===null?xd=Vo=a:Vo=Vo.next=a),bd=!0,$m||($m=!0,lP())}function zc(a,l){if(!Pm&&bd){Pm=!0;do for(var f=!1,y=xd;y!==null;){if(a!==0){var C=y.pendingLanes;if(C===0)var _=0;else{var F=y.suspendedLanes,W=y.pingedLanes;_=(1<<31-Nt(42|a)+1)-1,_&=C&~(F&~W),_=_&201326741?_&201326741|1:_?_|2:0}_!==0&&(f=!0,MT(y,_))}else _=fe,_=wa(y,y===ze?_:0,y.cancelPendingCommit!==null||y.timeoutHandle!==-1),(_&3)===0||zn(y,_)||(f=!0,MT(y,_));y=y.next}while(f);Pm=!1}}function oP(){AT()}function AT(){bd=$m=!1;var a=0;ja!==0&&xP()&&(a=ja);for(var l=Ae(),f=null,y=xd;y!==null;){var C=y.next,_=BT(y,l);_===0?(y.next=null,f===null?xd=C:f.next=C,C===null&&(Vo=f)):(f=y,(a!==0||(_&3)!==0)&&(bd=!0)),y=C}Tr!==0&&Tr!==5||zc(a),ja!==0&&(ja=0)}function BT(a,l){for(var f=a.suspendedLanes,y=a.pingedLanes,C=a.expirationTimes,_=a.pendingLanes&-62914561;0<_;){var F=31-Nt(_),W=1<<F,rt=C[F];rt===-1?((W&f)===0||(W&y)!==0)&&(C[F]=rr(W,l)):rt<=l&&(a.expiredLanes|=W),_&=~W}if(l=ze,f=fe,f=wa(a,a===l?f:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),y=a.callbackNode,f===0||a===l&&(Oe===2||Oe===9)||a.cancelPendingCommit!==null)return y!==null&&y!==null&&ar(y),a.callbackNode=null,a.callbackPriority=0;if((f&3)===0||zn(a,f)){if(l=f&-f,l===a.callbackPriority)return l;switch(y!==null&&ar(y),xi(f)){case 2:case 8:f=kt;break;case 32:f=Dt;break;case 268435456:f=ae;break;default:f=Dt}return y=LT.bind(null,a),f=Ve(f,y),a.callbackPriority=l,a.callbackNode=f,l}return y!==null&&y!==null&&ar(y),a.callbackPriority=2,a.callbackNode=null,2}function LT(a,l){if(Tr!==0&&Tr!==5)return a.callbackNode=null,a.callbackPriority=0,null;var f=a.callbackNode;if(yd()&&a.callbackNode!==f)return null;var y=fe;return y=wa(a,a===ze?y:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),y===0?null:(hT(a,y,l),BT(a,Ae()),a.callbackNode!=null&&a.callbackNode===f?LT.bind(null,a):null)}function MT(a,l){if(yd())return null;hT(a,l,!0)}function lP(){vP(function(){(Be&6)!==0?Ve(gt,oP):AT()})}function Hm(){if(ja===0){var a=No;a===0&&(a=gn,gn<<=1,(gn&261888)===0&&(gn=256)),ja=a}return ja}function NT(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:Eh(""+a)}function OT(a,l){var f=l.ownerDocument.createElement("input");return f.name=l.name,f.value=l.value,a.id&&f.setAttribute("form",a.id),l.parentNode.insertBefore(f,l),a=new FormData(a),f.parentNode.removeChild(f),a}function cP(a,l,f,y,C){if(l==="submit"&&f&&f.stateNode===C){var _=NT((C[$e]||null).action),F=y.submitter;F&&(l=(l=F[$e]||null)?NT(l.formAction):F.getAttribute("formAction"),l!==null&&(_=l,F=null));var W=new Mh("action","action",null,y,C);a.push({event:W,listeners:[{instance:null,listener:function(){if(y.defaultPrevented){if(ja!==0){var rt=F?OT(C,F):new FormData(C);cm(f,{pending:!0,data:rt,method:C.method,action:_},null,rt)}}else typeof _=="function"&&(W.preventDefault(),rt=F?OT(C,F):new FormData(C),cm(f,{pending:!0,data:rt,method:C.method,action:_},_,rt))},currentTarget:C}]})}}for(var Um=0;Um<Tg.length;Um++){var Gm=Tg[Um],uP=Gm.toLowerCase(),hP=Gm[0].toUpperCase()+Gm.slice(1);Xi(uP,"on"+hP)}Xi(uk,"onAnimationEnd"),Xi(hk,"onAnimationIteration"),Xi(dk,"onAnimationStart"),Xi("dblclick","onDoubleClick"),Xi("focusin","onFocus"),Xi("focusout","onBlur"),Xi(E$,"onTransitionRun"),Xi(A$,"onTransitionStart"),Xi(B$,"onTransitionCancel"),Xi(fk,"onTransitionEnd"),gr("onMouseEnter",["mouseout","mouseover"]),gr("onMouseLeave",["mouseout","mouseover"]),gr("onPointerEnter",["pointerout","pointerover"]),gr("onPointerLeave",["pointerout","pointerover"]),or("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),or("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),or("onBeforeInput",["compositionend","keypress","textInput","paste"]),or("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),or("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),or("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var jc="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(" "),dP=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(jc));function RT(a,l){l=(l&4)!==0;for(var f=0;f<a.length;f++){var y=a[f],C=y.event;y=y.listeners;t:{var _=void 0;if(l)for(var F=y.length-1;0<=F;F--){var W=y[F],rt=W.instance,ut=W.currentTarget;if(W=W.listener,rt!==_&&C.isPropagationStopped())break t;_=W,C.currentTarget=ut;try{_(C)}catch(yt){Rh(yt)}C.currentTarget=null,_=rt}else for(F=0;F<y.length;F++){if(W=y[F],rt=W.instance,ut=W.currentTarget,W=W.listener,rt!==_&&C.isPropagationStopped())break t;_=W,C.currentTarget=ut;try{_(C)}catch(yt){Rh(yt)}C.currentTarget=null,_=rt}}}}function de(a,l){var f=l[jn];f===void 0&&(f=l[jn]=new Set);var y=a+"__bubble";f.has(y)||(DT(l,a,2,!1),f.add(y))}function Ym(a,l,f){var y=0;l&&(y|=4),DT(f,a,y,l)}var vd="_reactListening"+Math.random().toString(36).slice(2);function Vm(a){if(!a[vd]){a[vd]=!0,Ue.forEach(function(f){f!=="selectionchange"&&(dP.has(f)||Ym(f,!1,a),Ym(f,!0,a))});var l=a.nodeType===9?a:a.ownerDocument;l===null||l[vd]||(l[vd]=!0,Ym("selectionchange",!1,l))}}function DT(a,l,f,y){switch(uE(l)){case 2:var C=jP;break;case 8:C=$P;break;default:C=l0}f=C.bind(null,l,f,a),C=void 0,!fg||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(C=!0),y?C!==void 0?a.addEventListener(l,f,{capture:!0,passive:C}):a.addEventListener(l,f,!0):C!==void 0?a.addEventListener(l,f,{passive:C}):a.addEventListener(l,f,!1)}function Wm(a,l,f,y,C){var _=y;if((l&1)===0&&(l&2)===0&&y!==null)t:for(;;){if(y===null)return;var F=y.tag;if(F===3||F===4){var W=y.stateNode.containerInfo;if(W===C)break;if(F===4)for(F=y.return;F!==null;){var rt=F.tag;if((rt===3||rt===4)&&F.stateNode.containerInfo===C)return;F=F.return}for(;W!==null;){if(F=tt(W),F===null)return;if(rt=F.tag,rt===5||rt===6||rt===26||rt===27){y=_=F;continue t}W=W.parentNode}}y=y.return}jS(function(){var ut=_,yt=hg(f),Ct=[];t:{var ht=pk.get(a);if(ht!==void 0){var pt=Mh,Ft=a;switch(a){case"keypress":if(Bh(f)===0)break t;case"keydown":case"keyup":pt=a$;break;case"focusin":Ft="focus",pt=yg;break;case"focusout":Ft="blur",pt=yg;break;case"beforeblur":case"afterblur":pt=yg;break;case"click":if(f.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":pt=HS;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":pt=Vj;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":pt=l$;break;case uk:case hk:case dk:pt=Qj;break;case fk:pt=u$;break;case"scroll":case"scrollend":pt=Gj;break;case"wheel":pt=d$;break;case"copy":case"cut":case"paste":pt=Kj;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":pt=GS;break;case"toggle":case"beforetoggle":pt=p$}var Zt=(l&4)!==0,Ie=!Zt&&(a==="scroll"||a==="scrollend"),st=Zt?ht!==null?ht+"Capture":null:ht;Zt=[];for(var it=ut,ct;it!==null;){var vt=it;if(ct=vt.stateNode,vt=vt.tag,vt!==5&&vt!==26&&vt!==27||ct===null||st===null||(vt=lc(it,st),vt!=null&&Zt.push($c(it,vt,ct))),Ie)break;it=it.return}0<Zt.length&&(ht=new pt(ht,Ft,null,f,yt),Ct.push({event:ht,listeners:Zt}))}}if((l&7)===0){t:{if(ht=a==="mouseover"||a==="pointerover",pt=a==="mouseout"||a==="pointerout",ht&&f!==ug&&(Ft=f.relatedTarget||f.fromElement)&&(tt(Ft)||Ft[Mi]))break t;if((pt||ht)&&(ht=yt.window===yt?yt:(ht=yt.ownerDocument)?ht.defaultView||ht.parentWindow:window,pt?(Ft=f.relatedTarget||f.toElement,pt=ut,Ft=Ft?tt(Ft):null,Ft!==null&&(Ie=s(Ft),Zt=Ft.tag,Ft!==Ie||Zt!==5&&Zt!==27&&Zt!==6)&&(Ft=null)):(pt=null,Ft=ut),pt!==Ft)){if(Zt=HS,vt="onMouseLeave",st="onMouseEnter",it="mouse",(a==="pointerout"||a==="pointerover")&&(Zt=GS,vt="onPointerLeave",st="onPointerEnter",it="pointer"),Ie=pt==null?ht:Ot(pt),ct=Ft==null?ht:Ot(Ft),ht=new Zt(vt,it+"leave",pt,f,yt),ht.target=Ie,ht.relatedTarget=ct,vt=null,tt(yt)===ut&&(Zt=new Zt(st,it+"enter",Ft,f,yt),Zt.target=ct,Zt.relatedTarget=Ie,vt=Zt),Ie=vt,pt&&Ft)e:{for(Zt=fP,st=pt,it=Ft,ct=0,vt=st;vt;vt=Zt(vt))ct++;vt=0;for(var Wt=it;Wt;Wt=Zt(Wt))vt++;for(;0<ct-vt;)st=Zt(st),ct--;for(;0<vt-ct;)it=Zt(it),vt--;for(;ct--;){if(st===it||it!==null&&st===it.alternate){Zt=st;break e}st=Zt(st),it=Zt(it)}Zt=null}else Zt=null;pt!==null&&FT(Ct,ht,pt,Zt,!1),Ft!==null&&Ie!==null&&FT(Ct,Ie,Ft,Zt,!0)}}t:{if(ht=ut?Ot(ut):window,pt=ht.nodeName&&ht.nodeName.toLowerCase(),pt==="select"||pt==="input"&&ht.type==="file")var Se=JS;else if(ZS(ht))if(tk)Se=k$;else{Se=w$;var $t=C$}else pt=ht.nodeName,!pt||pt.toLowerCase()!=="input"||ht.type!=="checkbox"&&ht.type!=="radio"?ut&&cg(ut.elementType)&&(Se=JS):Se=S$;if(Se&&(Se=Se(a,ut))){KS(Ct,Se,f,yt);break t}$t&&$t(a,ht,ut),a==="focusout"&&ut&&ht.type==="number"&&ut.memoizedProps.value!=null&&oc(ht,"number",ht.value)}switch($t=ut?Ot(ut):window,a){case"focusin":(ZS($t)||$t.contentEditable==="true")&&(ko=$t,Sg=ut,mc=null);break;case"focusout":mc=Sg=ko=null;break;case"mousedown":kg=!0;break;case"contextmenu":case"mouseup":case"dragend":kg=!1,lk(Ct,f,yt);break;case"selectionchange":if(T$)break;case"keydown":case"keyup":lk(Ct,f,yt)}var oe;if(bg)t:{switch(a){case"compositionstart":var pe="onCompositionStart";break t;case"compositionend":pe="onCompositionEnd";break t;case"compositionupdate":pe="onCompositionUpdate";break t}pe=void 0}else So?XS(a,f)&&(pe="onCompositionEnd"):a==="keydown"&&f.keyCode===229&&(pe="onCompositionStart");pe&&(YS&&f.locale!=="ko"&&(So||pe!=="onCompositionStart"?pe==="onCompositionEnd"&&So&&(oe=$S()):(ka=yt,pg="value"in ka?ka.value:ka.textContent,So=!0)),$t=Cd(ut,pe),0<$t.length&&(pe=new US(pe,a,null,f,yt),Ct.push({event:pe,listeners:$t}),oe?pe.data=oe:(oe=QS(f),oe!==null&&(pe.data=oe)))),(oe=m$?y$(a,f):x$(a,f))&&(pe=Cd(ut,"onBeforeInput"),0<pe.length&&($t=new US("onBeforeInput","beforeinput",null,f,yt),Ct.push({event:$t,listeners:pe}),$t.data=oe)),cP(Ct,a,ut,f,yt)}RT(Ct,l)})}function $c(a,l,f){return{instance:a,listener:l,currentTarget:f}}function Cd(a,l){for(var f=l+"Capture",y=[];a!==null;){var C=a,_=C.stateNode;if(C=C.tag,C!==5&&C!==26&&C!==27||_===null||(C=lc(a,f),C!=null&&y.unshift($c(a,C,_)),C=lc(a,l),C!=null&&y.push($c(a,C,_))),a.tag===3)return y;a=a.return}return[]}function fP(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function FT(a,l,f,y,C){for(var _=l._reactName,F=[];f!==null&&f!==y;){var W=f,rt=W.alternate,ut=W.stateNode;if(W=W.tag,rt!==null&&rt===y)break;W!==5&&W!==26&&W!==27||ut===null||(rt=ut,C?(ut=lc(f,_),ut!=null&&F.unshift($c(f,ut,rt))):C||(ut=lc(f,_),ut!=null&&F.push($c(f,ut,rt)))),f=f.return}F.length!==0&&a.push({event:l,listeners:F})}var pP=/\r\n?/g,gP=/\u0000|\uFFFD/g;function IT(a){return(typeof a=="string"?a:""+a).replace(pP,`
50
+ `).replace(gP,"")}function qT(a,l){return l=IT(l),IT(a)===l}function Fe(a,l,f,y,C,_){switch(f){case"children":typeof y=="string"?l==="body"||l==="textarea"&&y===""||vo(a,y):(typeof y=="number"||typeof y=="bigint")&&l!=="body"&&vo(a,""+y);break;case"className":bo(a,"class",y);break;case"tabIndex":bo(a,"tabindex",y);break;case"dir":case"role":case"viewBox":case"width":case"height":bo(a,f,y);break;case"style":qS(a,y,_);break;case"data":if(l!=="object"){bo(a,"data",y);break}case"src":case"href":if(y===""&&(l!=="a"||f!=="href")){a.removeAttribute(f);break}if(y==null||typeof y=="function"||typeof y=="symbol"||typeof y=="boolean"){a.removeAttribute(f);break}y=Eh(""+y),a.setAttribute(f,y);break;case"action":case"formAction":if(typeof y=="function"){a.setAttribute(f,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof _=="function"&&(f==="formAction"?(l!=="input"&&Fe(a,l,"name",C.name,C,null),Fe(a,l,"formEncType",C.formEncType,C,null),Fe(a,l,"formMethod",C.formMethod,C,null),Fe(a,l,"formTarget",C.formTarget,C,null)):(Fe(a,l,"encType",C.encType,C,null),Fe(a,l,"method",C.method,C,null),Fe(a,l,"target",C.target,C,null)));if(y==null||typeof y=="symbol"||typeof y=="boolean"){a.removeAttribute(f);break}y=Eh(""+y),a.setAttribute(f,y);break;case"onClick":y!=null&&(a.onclick=Pn);break;case"onScroll":y!=null&&de("scroll",a);break;case"onScrollEnd":y!=null&&de("scrollend",a);break;case"dangerouslySetInnerHTML":if(y!=null){if(typeof y!="object"||!("__html"in y))throw Error(i(61));if(f=y.__html,f!=null){if(C.children!=null)throw Error(i(60));a.innerHTML=f}}break;case"multiple":a.multiple=y&&typeof y!="function"&&typeof y!="symbol";break;case"muted":a.muted=y&&typeof y!="function"&&typeof y!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(y==null||typeof y=="function"||typeof y=="boolean"||typeof y=="symbol"){a.removeAttribute("xlink:href");break}f=Eh(""+y),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",f);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":y!=null&&typeof y!="function"&&typeof y!="symbol"?a.setAttribute(f,""+y):a.removeAttribute(f);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":y&&typeof y!="function"&&typeof y!="symbol"?a.setAttribute(f,""):a.removeAttribute(f);break;case"capture":case"download":y===!0?a.setAttribute(f,""):y!==!1&&y!=null&&typeof y!="function"&&typeof y!="symbol"?a.setAttribute(f,y):a.removeAttribute(f);break;case"cols":case"rows":case"size":case"span":y!=null&&typeof y!="function"&&typeof y!="symbol"&&!isNaN(y)&&1<=y?a.setAttribute(f,y):a.removeAttribute(f);break;case"rowSpan":case"start":y==null||typeof y=="function"||typeof y=="symbol"||isNaN(y)?a.removeAttribute(f):a.setAttribute(f,y);break;case"popover":de("beforetoggle",a),de("toggle",a),xo(a,"popover",y);break;case"xlinkActuate":Wi(a,"http://www.w3.org/1999/xlink","xlink:actuate",y);break;case"xlinkArcrole":Wi(a,"http://www.w3.org/1999/xlink","xlink:arcrole",y);break;case"xlinkRole":Wi(a,"http://www.w3.org/1999/xlink","xlink:role",y);break;case"xlinkShow":Wi(a,"http://www.w3.org/1999/xlink","xlink:show",y);break;case"xlinkTitle":Wi(a,"http://www.w3.org/1999/xlink","xlink:title",y);break;case"xlinkType":Wi(a,"http://www.w3.org/1999/xlink","xlink:type",y);break;case"xmlBase":Wi(a,"http://www.w3.org/XML/1998/namespace","xml:base",y);break;case"xmlLang":Wi(a,"http://www.w3.org/XML/1998/namespace","xml:lang",y);break;case"xmlSpace":Wi(a,"http://www.w3.org/XML/1998/namespace","xml:space",y);break;case"is":xo(a,"is",y);break;case"innerText":case"textContent":break;default:(!(2<f.length)||f[0]!=="o"&&f[0]!=="O"||f[1]!=="n"&&f[1]!=="N")&&(f=Hj.get(f)||f,xo(a,f,y))}}function Xm(a,l,f,y,C,_){switch(f){case"style":qS(a,y,_);break;case"dangerouslySetInnerHTML":if(y!=null){if(typeof y!="object"||!("__html"in y))throw Error(i(61));if(f=y.__html,f!=null){if(C.children!=null)throw Error(i(60));a.innerHTML=f}}break;case"children":typeof y=="string"?vo(a,y):(typeof y=="number"||typeof y=="bigint")&&vo(a,""+y);break;case"onScroll":y!=null&&de("scroll",a);break;case"onScrollEnd":y!=null&&de("scrollend",a);break;case"onClick":y!=null&&(a.onclick=Pn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!_r.hasOwnProperty(f))t:{if(f[0]==="o"&&f[1]==="n"&&(C=f.endsWith("Capture"),l=f.slice(2,C?f.length-7:void 0),_=a[$e]||null,_=_!=null?_[f]:null,typeof _=="function"&&a.removeEventListener(l,_,C),typeof y=="function")){typeof _!="function"&&_!==null&&(f in a?a[f]=null:a.hasAttribute(f)&&a.removeAttribute(f)),a.addEventListener(l,y,C);break t}f in a?a[f]=y:y===!0?a.setAttribute(f,""):xo(a,f,y)}}}function Fr(a,l,f){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":de("error",a),de("load",a);var y=!1,C=!1,_;for(_ in f)if(f.hasOwnProperty(_)){var F=f[_];if(F!=null)switch(_){case"src":y=!0;break;case"srcSet":C=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,l));default:Fe(a,l,_,F,f,null)}}C&&Fe(a,l,"srcSet",f.srcSet,f,null),y&&Fe(a,l,"src",f.src,f,null);return;case"input":de("invalid",a);var W=_=F=C=null,rt=null,ut=null;for(y in f)if(f.hasOwnProperty(y)){var yt=f[y];if(yt!=null)switch(y){case"name":C=yt;break;case"type":F=yt;break;case"checked":rt=yt;break;case"defaultChecked":ut=yt;break;case"value":_=yt;break;case"defaultValue":W=yt;break;case"children":case"dangerouslySetInnerHTML":if(yt!=null)throw Error(i(137,l));break;default:Fe(a,l,y,yt,f,null)}}Th(a,_,W,rt,ut,F,C,!1);return;case"select":de("invalid",a),y=F=_=null;for(C in f)if(f.hasOwnProperty(C)&&(W=f[C],W!=null))switch(C){case"value":_=W;break;case"defaultValue":F=W;break;case"multiple":y=W;default:Fe(a,l,C,W,f,null)}l=_,f=F,a.multiple=!!y,l!=null?$n(a,!!y,l,!1):f!=null&&$n(a,!!y,f,!0);return;case"textarea":de("invalid",a),_=C=y=null;for(F in f)if(f.hasOwnProperty(F)&&(W=f[F],W!=null))switch(F){case"value":y=W;break;case"defaultValue":C=W;break;case"children":_=W;break;case"dangerouslySetInnerHTML":if(W!=null)throw Error(i(91));break;default:Fe(a,l,F,W,f,null)}FS(a,y,C,_);return;case"option":for(rt in f)if(f.hasOwnProperty(rt)&&(y=f[rt],y!=null))switch(rt){case"selected":a.selected=y&&typeof y!="function"&&typeof y!="symbol";break;default:Fe(a,l,rt,y,f,null)}return;case"dialog":de("beforetoggle",a),de("toggle",a),de("cancel",a),de("close",a);break;case"iframe":case"object":de("load",a);break;case"video":case"audio":for(y=0;y<jc.length;y++)de(jc[y],a);break;case"image":de("error",a),de("load",a);break;case"details":de("toggle",a);break;case"embed":case"source":case"link":de("error",a),de("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ut in f)if(f.hasOwnProperty(ut)&&(y=f[ut],y!=null))switch(ut){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,l));default:Fe(a,l,ut,y,f,null)}return;default:if(cg(l)){for(yt in f)f.hasOwnProperty(yt)&&(y=f[yt],y!==void 0&&Xm(a,l,yt,y,f,void 0));return}}for(W in f)f.hasOwnProperty(W)&&(y=f[W],y!=null&&Fe(a,l,W,y,f,null))}function mP(a,l,f,y){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var C=null,_=null,F=null,W=null,rt=null,ut=null,yt=null;for(pt in f){var Ct=f[pt];if(f.hasOwnProperty(pt)&&Ct!=null)switch(pt){case"checked":break;case"value":break;case"defaultValue":rt=Ct;default:y.hasOwnProperty(pt)||Fe(a,l,pt,null,y,Ct)}}for(var ht in y){var pt=y[ht];if(Ct=f[ht],y.hasOwnProperty(ht)&&(pt!=null||Ct!=null))switch(ht){case"type":_=pt;break;case"name":C=pt;break;case"checked":ut=pt;break;case"defaultChecked":yt=pt;break;case"value":F=pt;break;case"defaultValue":W=pt;break;case"children":case"dangerouslySetInnerHTML":if(pt!=null)throw Error(i(137,l));break;default:pt!==Ct&&Fe(a,l,ht,pt,y,Ct)}}ws(a,F,W,rt,ut,yt,_,C);return;case"select":pt=F=W=ht=null;for(_ in f)if(rt=f[_],f.hasOwnProperty(_)&&rt!=null)switch(_){case"value":break;case"multiple":pt=rt;default:y.hasOwnProperty(_)||Fe(a,l,_,null,y,rt)}for(C in y)if(_=y[C],rt=f[C],y.hasOwnProperty(C)&&(_!=null||rt!=null))switch(C){case"value":ht=_;break;case"defaultValue":W=_;break;case"multiple":F=_;default:_!==rt&&Fe(a,l,C,_,y,rt)}l=W,f=F,y=pt,ht!=null?$n(a,!!f,ht,!1):!!y!=!!f&&(l!=null?$n(a,!!f,l,!0):$n(a,!!f,f?[]:"",!1));return;case"textarea":pt=ht=null;for(W in f)if(C=f[W],f.hasOwnProperty(W)&&C!=null&&!y.hasOwnProperty(W))switch(W){case"value":break;case"children":break;default:Fe(a,l,W,null,y,C)}for(F in y)if(C=y[F],_=f[F],y.hasOwnProperty(F)&&(C!=null||_!=null))switch(F){case"value":ht=C;break;case"defaultValue":pt=C;break;case"children":break;case"dangerouslySetInnerHTML":if(C!=null)throw Error(i(91));break;default:C!==_&&Fe(a,l,F,C,y,_)}DS(a,ht,pt);return;case"option":for(var Ft in f)if(ht=f[Ft],f.hasOwnProperty(Ft)&&ht!=null&&!y.hasOwnProperty(Ft))switch(Ft){case"selected":a.selected=!1;break;default:Fe(a,l,Ft,null,y,ht)}for(rt in y)if(ht=y[rt],pt=f[rt],y.hasOwnProperty(rt)&&ht!==pt&&(ht!=null||pt!=null))switch(rt){case"selected":a.selected=ht&&typeof ht!="function"&&typeof ht!="symbol";break;default:Fe(a,l,rt,ht,y,pt)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Zt in f)ht=f[Zt],f.hasOwnProperty(Zt)&&ht!=null&&!y.hasOwnProperty(Zt)&&Fe(a,l,Zt,null,y,ht);for(ut in y)if(ht=y[ut],pt=f[ut],y.hasOwnProperty(ut)&&ht!==pt&&(ht!=null||pt!=null))switch(ut){case"children":case"dangerouslySetInnerHTML":if(ht!=null)throw Error(i(137,l));break;default:Fe(a,l,ut,ht,y,pt)}return;default:if(cg(l)){for(var Ie in f)ht=f[Ie],f.hasOwnProperty(Ie)&&ht!==void 0&&!y.hasOwnProperty(Ie)&&Xm(a,l,Ie,void 0,y,ht);for(yt in y)ht=y[yt],pt=f[yt],!y.hasOwnProperty(yt)||ht===pt||ht===void 0&&pt===void 0||Xm(a,l,yt,ht,y,pt);return}}for(var st in f)ht=f[st],f.hasOwnProperty(st)&&ht!=null&&!y.hasOwnProperty(st)&&Fe(a,l,st,null,y,ht);for(Ct in y)ht=y[Ct],pt=f[Ct],!y.hasOwnProperty(Ct)||ht===pt||ht==null&&pt==null||Fe(a,l,Ct,ht,y,pt)}function zT(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function yP(){if(typeof performance.getEntriesByType=="function"){for(var a=0,l=0,f=performance.getEntriesByType("resource"),y=0;y<f.length;y++){var C=f[y],_=C.transferSize,F=C.initiatorType,W=C.duration;if(_&&W&&zT(F)){for(F=0,W=C.responseEnd,y+=1;y<f.length;y++){var rt=f[y],ut=rt.startTime;if(ut>W)break;var yt=rt.transferSize,Ct=rt.initiatorType;yt&&zT(Ct)&&(rt=rt.responseEnd,F+=yt*(rt<W?1:(W-ut)/(rt-ut)))}if(--y,l+=8*(_+F)/(C.duration/1e3),a++,10<a)break}}if(0<a)return l/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var Qm=null,Zm=null;function wd(a){return a.nodeType===9?a:a.ownerDocument}function jT(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function $T(a,l){if(a===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&l==="foreignObject"?0:a}function Km(a,l){return a==="textarea"||a==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var Jm=null;function xP(){var a=window.event;return a&&a.type==="popstate"?a===Jm?!1:(Jm=a,!0):(Jm=null,!1)}var PT=typeof setTimeout=="function"?setTimeout:void 0,bP=typeof clearTimeout=="function"?clearTimeout:void 0,HT=typeof Promise=="function"?Promise:void 0,vP=typeof queueMicrotask=="function"?queueMicrotask:typeof HT<"u"?function(a){return HT.resolve(null).then(a).catch(CP)}:PT;function CP(a){setTimeout(function(){throw a})}function $a(a){return a==="head"}function UT(a,l){var f=l,y=0;do{var C=f.nextSibling;if(a.removeChild(f),C&&C.nodeType===8)if(f=C.data,f==="/$"||f==="/&"){if(y===0){a.removeChild(C),Zo(l);return}y--}else if(f==="$"||f==="$?"||f==="$~"||f==="$!"||f==="&")y++;else if(f==="html")Pc(a.ownerDocument.documentElement);else if(f==="head"){f=a.ownerDocument.head,Pc(f);for(var _=f.firstChild;_;){var F=_.nextSibling,W=_.nodeName;_[xn]||W==="SCRIPT"||W==="STYLE"||W==="LINK"&&_.rel.toLowerCase()==="stylesheet"||f.removeChild(_),_=F}}else f==="body"&&Pc(a.ownerDocument.body);f=C}while(f);Zo(l)}function GT(a,l){var f=a;a=0;do{var y=f.nextSibling;if(f.nodeType===1?l?(f._stashedDisplay=f.style.display,f.style.display="none"):(f.style.display=f._stashedDisplay||"",f.getAttribute("style")===""&&f.removeAttribute("style")):f.nodeType===3&&(l?(f._stashedText=f.nodeValue,f.nodeValue=""):f.nodeValue=f._stashedText||""),y&&y.nodeType===8)if(f=y.data,f==="/$"){if(a===0)break;a--}else f!=="$"&&f!=="$?"&&f!=="$~"&&f!=="$!"||a++;f=y}while(f)}function t0(a){var l=a.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var f=l;switch(l=l.nextSibling,f.nodeName){case"HTML":case"HEAD":case"BODY":t0(f),Ut(f);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(f.rel.toLowerCase()==="stylesheet")continue}a.removeChild(f)}}function wP(a,l,f,y){for(;a.nodeType===1;){var C=f;if(a.nodeName.toLowerCase()!==l.toLowerCase()){if(!y&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(y){if(!a[xn])switch(l){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(_=a.getAttribute("rel"),_==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(_!==C.rel||a.getAttribute("href")!==(C.href==null||C.href===""?null:C.href)||a.getAttribute("crossorigin")!==(C.crossOrigin==null?null:C.crossOrigin)||a.getAttribute("title")!==(C.title==null?null:C.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(_=a.getAttribute("src"),(_!==(C.src==null?null:C.src)||a.getAttribute("type")!==(C.type==null?null:C.type)||a.getAttribute("crossorigin")!==(C.crossOrigin==null?null:C.crossOrigin))&&_&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(l==="input"&&a.type==="hidden"){var _=C.name==null?null:""+C.name;if(C.type==="hidden"&&a.getAttribute("name")===_)return a}else return a;if(a=qi(a.nextSibling),a===null)break}return null}function SP(a,l,f){if(l==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!f||(a=qi(a.nextSibling),a===null))return null;return a}function YT(a,l){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!l||(a=qi(a.nextSibling),a===null))return null;return a}function e0(a){return a.data==="$?"||a.data==="$~"}function r0(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function kP(a,l){var f=a.ownerDocument;if(a.data==="$~")a._reactRetry=l;else if(a.data!=="$?"||f.readyState!=="loading")l();else{var y=function(){l(),f.removeEventListener("DOMContentLoaded",y)};f.addEventListener("DOMContentLoaded",y),a._reactRetry=y}}function qi(a){for(;a!=null;a=a.nextSibling){var l=a.nodeType;if(l===1||l===3)break;if(l===8){if(l=a.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return a}var i0=null;function VT(a){a=a.nextSibling;for(var l=0;a;){if(a.nodeType===8){var f=a.data;if(f==="/$"||f==="/&"){if(l===0)return qi(a.nextSibling);l--}else f!=="$"&&f!=="$!"&&f!=="$?"&&f!=="$~"&&f!=="&"||l++}a=a.nextSibling}return null}function WT(a){a=a.previousSibling;for(var l=0;a;){if(a.nodeType===8){var f=a.data;if(f==="$"||f==="$!"||f==="$?"||f==="$~"||f==="&"){if(l===0)return a;l--}else f!=="/$"&&f!=="/&"||l++}a=a.previousSibling}return null}function XT(a,l,f){switch(l=wd(f),a){case"html":if(a=l.documentElement,!a)throw Error(i(452));return a;case"head":if(a=l.head,!a)throw Error(i(453));return a;case"body":if(a=l.body,!a)throw Error(i(454));return a;default:throw Error(i(451))}}function Pc(a){for(var l=a.attributes;l.length;)a.removeAttributeNode(l[0]);Ut(a)}var zi=new Map,QT=new Set;function Sd(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var na=P.d;P.d={f:_P,r:TP,D:EP,C:AP,L:BP,m:LP,X:NP,S:MP,M:OP};function _P(){var a=na.f(),l=pd();return a||l}function TP(a){var l=wt(a);l!==null&&l.tag===5&&l.type==="form"?f_(l):na.r(a)}var Wo=typeof document>"u"?null:document;function ZT(a,l,f){var y=Wo;if(y&&typeof l=="string"&&l){var C=ri(l);C='link[rel="'+a+'"][href="'+C+'"]',typeof f=="string"&&(C+='[crossorigin="'+f+'"]'),QT.has(C)||(QT.add(C),a={rel:a,crossOrigin:f,href:l},y.querySelector(C)===null&&(l=y.createElement("link"),Fr(l,"link",a),ue(l),y.head.appendChild(l)))}}function EP(a){na.D(a),ZT("dns-prefetch",a,null)}function AP(a,l){na.C(a,l),ZT("preconnect",a,l)}function BP(a,l,f){na.L(a,l,f);var y=Wo;if(y&&a&&l){var C='link[rel="preload"][as="'+ri(l)+'"]';l==="image"&&f&&f.imageSrcSet?(C+='[imagesrcset="'+ri(f.imageSrcSet)+'"]',typeof f.imageSizes=="string"&&(C+='[imagesizes="'+ri(f.imageSizes)+'"]')):C+='[href="'+ri(a)+'"]';var _=C;switch(l){case"style":_=Xo(a);break;case"script":_=Qo(a)}zi.has(_)||(a=p({rel:"preload",href:l==="image"&&f&&f.imageSrcSet?void 0:a,as:l},f),zi.set(_,a),y.querySelector(C)!==null||l==="style"&&y.querySelector(Hc(_))||l==="script"&&y.querySelector(Uc(_))||(l=y.createElement("link"),Fr(l,"link",a),ue(l),y.head.appendChild(l)))}}function LP(a,l){na.m(a,l);var f=Wo;if(f&&a){var y=l&&typeof l.as=="string"?l.as:"script",C='link[rel="modulepreload"][as="'+ri(y)+'"][href="'+ri(a)+'"]',_=C;switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":_=Qo(a)}if(!zi.has(_)&&(a=p({rel:"modulepreload",href:a},l),zi.set(_,a),f.querySelector(C)===null)){switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(f.querySelector(Uc(_)))return}y=f.createElement("link"),Fr(y,"link",a),ue(y),f.head.appendChild(y)}}}function MP(a,l,f){na.S(a,l,f);var y=Wo;if(y&&a){var C=me(y).hoistableStyles,_=Xo(a);l=l||"default";var F=C.get(_);if(!F){var W={loading:0,preload:null};if(F=y.querySelector(Hc(_)))W.loading=5;else{a=p({rel:"stylesheet",href:a,"data-precedence":l},f),(f=zi.get(_))&&n0(a,f);var rt=F=y.createElement("link");ue(rt),Fr(rt,"link",a),rt._p=new Promise(function(ut,yt){rt.onload=ut,rt.onerror=yt}),rt.addEventListener("load",function(){W.loading|=1}),rt.addEventListener("error",function(){W.loading|=2}),W.loading|=4,kd(F,l,y)}F={type:"stylesheet",instance:F,count:1,state:W},C.set(_,F)}}}function NP(a,l){na.X(a,l);var f=Wo;if(f&&a){var y=me(f).hoistableScripts,C=Qo(a),_=y.get(C);_||(_=f.querySelector(Uc(C)),_||(a=p({src:a,async:!0},l),(l=zi.get(C))&&a0(a,l),_=f.createElement("script"),ue(_),Fr(_,"link",a),f.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},y.set(C,_))}}function OP(a,l){na.M(a,l);var f=Wo;if(f&&a){var y=me(f).hoistableScripts,C=Qo(a),_=y.get(C);_||(_=f.querySelector(Uc(C)),_||(a=p({src:a,async:!0,type:"module"},l),(l=zi.get(C))&&a0(a,l),_=f.createElement("script"),ue(_),Fr(_,"link",a),f.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},y.set(C,_))}}function KT(a,l,f,y){var C=(C=et.current)?Sd(C):null;if(!C)throw Error(i(446));switch(a){case"meta":case"title":return null;case"style":return typeof f.precedence=="string"&&typeof f.href=="string"?(l=Xo(f.href),f=me(C).hoistableStyles,y=f.get(l),y||(y={type:"style",instance:null,count:0,state:null},f.set(l,y)),y):{type:"void",instance:null,count:0,state:null};case"link":if(f.rel==="stylesheet"&&typeof f.href=="string"&&typeof f.precedence=="string"){a=Xo(f.href);var _=me(C).hoistableStyles,F=_.get(a);if(F||(C=C.ownerDocument||C,F={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},_.set(a,F),(_=C.querySelector(Hc(a)))&&!_._p&&(F.instance=_,F.state.loading=5),zi.has(a)||(f={rel:"preload",as:"style",href:f.href,crossOrigin:f.crossOrigin,integrity:f.integrity,media:f.media,hrefLang:f.hrefLang,referrerPolicy:f.referrerPolicy},zi.set(a,f),_||RP(C,a,f,F.state))),l&&y===null)throw Error(i(528,""));return F}if(l&&y!==null)throw Error(i(529,""));return null;case"script":return l=f.async,f=f.src,typeof f=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=Qo(f),f=me(C).hoistableScripts,y=f.get(l),y||(y={type:"script",instance:null,count:0,state:null},f.set(l,y)),y):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,a))}}function Xo(a){return'href="'+ri(a)+'"'}function Hc(a){return'link[rel="stylesheet"]['+a+"]"}function JT(a){return p({},a,{"data-precedence":a.precedence,precedence:null})}function RP(a,l,f,y){a.querySelector('link[rel="preload"][as="style"]['+l+"]")?y.loading=1:(l=a.createElement("link"),y.preload=l,l.addEventListener("load",function(){return y.loading|=1}),l.addEventListener("error",function(){return y.loading|=2}),Fr(l,"link",f),ue(l),a.head.appendChild(l))}function Qo(a){return'[src="'+ri(a)+'"]'}function Uc(a){return"script[async]"+a}function tE(a,l,f){if(l.count++,l.instance===null)switch(l.type){case"style":var y=a.querySelector('style[data-href~="'+ri(f.href)+'"]');if(y)return l.instance=y,ue(y),y;var C=p({},f,{"data-href":f.href,"data-precedence":f.precedence,href:null,precedence:null});return y=(a.ownerDocument||a).createElement("style"),ue(y),Fr(y,"style",C),kd(y,f.precedence,a),l.instance=y;case"stylesheet":C=Xo(f.href);var _=a.querySelector(Hc(C));if(_)return l.state.loading|=4,l.instance=_,ue(_),_;y=JT(f),(C=zi.get(C))&&n0(y,C),_=(a.ownerDocument||a).createElement("link"),ue(_);var F=_;return F._p=new Promise(function(W,rt){F.onload=W,F.onerror=rt}),Fr(_,"link",y),l.state.loading|=4,kd(_,f.precedence,a),l.instance=_;case"script":return _=Qo(f.src),(C=a.querySelector(Uc(_)))?(l.instance=C,ue(C),C):(y=f,(C=zi.get(_))&&(y=p({},f),a0(y,C)),a=a.ownerDocument||a,C=a.createElement("script"),ue(C),Fr(C,"link",y),a.head.appendChild(C),l.instance=C);case"void":return null;default:throw Error(i(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(y=l.instance,l.state.loading|=4,kd(y,f.precedence,a));return l.instance}function kd(a,l,f){for(var y=f.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),C=y.length?y[y.length-1]:null,_=C,F=0;F<y.length;F++){var W=y[F];if(W.dataset.precedence===l)_=W;else if(_!==C)break}_?_.parentNode.insertBefore(a,_.nextSibling):(l=f.nodeType===9?f.head:f,l.insertBefore(a,l.firstChild))}function n0(a,l){a.crossOrigin==null&&(a.crossOrigin=l.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=l.referrerPolicy),a.title==null&&(a.title=l.title)}function a0(a,l){a.crossOrigin==null&&(a.crossOrigin=l.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=l.referrerPolicy),a.integrity==null&&(a.integrity=l.integrity)}var _d=null;function eE(a,l,f){if(_d===null){var y=new Map,C=_d=new Map;C.set(f,y)}else C=_d,y=C.get(f),y||(y=new Map,C.set(f,y));if(y.has(a))return y;for(y.set(a,null),f=f.getElementsByTagName(a),C=0;C<f.length;C++){var _=f[C];if(!(_[xn]||_[ir]||a==="link"&&_.getAttribute("rel")==="stylesheet")&&_.namespaceURI!=="http://www.w3.org/2000/svg"){var F=_.getAttribute(l)||"";F=a+F;var W=y.get(F);W?W.push(_):y.set(F,[_])}}return y}function rE(a,l,f){a=a.ownerDocument||a,a.head.insertBefore(f,l==="title"?a.querySelector("head > title"):null)}function DP(a,l,f){if(f===1||l.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return a=l.disabled,typeof l.precedence=="string"&&a==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function iE(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function FP(a,l,f,y){if(f.type==="stylesheet"&&(typeof y.media!="string"||matchMedia(y.media).matches!==!1)&&(f.state.loading&4)===0){if(f.instance===null){var C=Xo(y.href),_=l.querySelector(Hc(C));if(_){l=_._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(a.count++,a=Td.bind(a),l.then(a,a)),f.state.loading|=4,f.instance=_,ue(_);return}_=l.ownerDocument||l,y=JT(y),(C=zi.get(C))&&n0(y,C),_=_.createElement("link"),ue(_);var F=_;F._p=new Promise(function(W,rt){F.onload=W,F.onerror=rt}),Fr(_,"link",y),f.instance=_}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(f,l),(l=f.state.preload)&&(f.state.loading&3)===0&&(a.count++,f=Td.bind(a),l.addEventListener("load",f),l.addEventListener("error",f))}}var s0=0;function IP(a,l){return a.stylesheets&&a.count===0&&Ad(a,a.stylesheets),0<a.count||0<a.imgCount?function(f){var y=setTimeout(function(){if(a.stylesheets&&Ad(a,a.stylesheets),a.unsuspend){var _=a.unsuspend;a.unsuspend=null,_()}},6e4+l);0<a.imgBytes&&s0===0&&(s0=62500*yP());var C=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&Ad(a,a.stylesheets),a.unsuspend)){var _=a.unsuspend;a.unsuspend=null,_()}},(a.imgBytes>s0?50:800)+l);return a.unsuspend=f,function(){a.unsuspend=null,clearTimeout(y),clearTimeout(C)}}:null}function Td(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ad(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var Ed=null;function Ad(a,l){a.stylesheets=null,a.unsuspend!==null&&(a.count++,Ed=new Map,l.forEach(qP,a),Ed=null,Td.call(a))}function qP(a,l){if(!(l.state.loading&4)){var f=Ed.get(a);if(f)var y=f.get(null);else{f=new Map,Ed.set(a,f);for(var C=a.querySelectorAll("link[data-precedence],style[data-precedence]"),_=0;_<C.length;_++){var F=C[_];(F.nodeName==="LINK"||F.getAttribute("media")!=="not all")&&(f.set(F.dataset.precedence,F),y=F)}y&&f.set(null,y)}C=l.instance,F=C.getAttribute("data-precedence"),_=f.get(F)||y,_===y&&f.set(null,C),f.set(F,C),this.count++,y=Td.bind(this),C.addEventListener("load",y),C.addEventListener("error",y),_?_.parentNode.insertBefore(C,_.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(C,a.firstChild)),l.state.loading|=4}}var Gc={$$typeof:k,Provider:null,Consumer:null,_currentValue:$,_currentValue2:$,_threadCount:0};function zP(a,l,f,y,C,_,F,W,rt){this.tag=1,this.containerInfo=a,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ds(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ds(0),this.hiddenUpdates=ds(null),this.identifierPrefix=y,this.onUncaughtError=C,this.onCaughtError=_,this.onRecoverableError=F,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=rt,this.incompleteTransitions=new Map}function nE(a,l,f,y,C,_,F,W,rt,ut,yt,Ct){return a=new zP(a,l,f,F,rt,ut,yt,Ct,W),l=1,_===!0&&(l|=24),_=vi(3,null,null,l),a.current=_,_.stateNode=a,l=zg(),l.refCount++,a.pooledCache=l,l.refCount++,_.memoizedState={element:y,isDehydrated:f,cache:l},Hg(_),a}function aE(a){return a?(a=Eo,a):Eo}function sE(a,l,f,y,C,_){C=aE(C),y.context===null?y.context=C:y.pendingContext=C,y=La(l),y.payload={element:f},_=_===void 0?null:_,_!==null&&(y.callback=_),f=Ma(a,y,l),f!==null&&(li(f,a,l),Sc(f,a,l))}function oE(a,l){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var f=a.retryLane;a.retryLane=f!==0&&f<l?f:l}}function o0(a,l){oE(a,l),(a=a.alternate)&&oE(a,l)}function lE(a){if(a.tag===13||a.tag===31){var l=Ts(a,67108864);l!==null&&li(l,a,67108864),o0(a,67108864)}}function cE(a){if(a.tag===13||a.tag===31){var l=_i();l=Nr(l);var f=Ts(a,l);f!==null&&li(f,a,l),o0(a,l)}}var Bd=!0;function jP(a,l,f,y){var C=N.T;N.T=null;var _=P.p;try{P.p=2,l0(a,l,f,y)}finally{P.p=_,N.T=C}}function $P(a,l,f,y){var C=N.T;N.T=null;var _=P.p;try{P.p=8,l0(a,l,f,y)}finally{P.p=_,N.T=C}}function l0(a,l,f,y){if(Bd){var C=c0(y);if(C===null)Wm(a,l,y,Ld,f),hE(a,y);else if(HP(C,a,l,f,y))y.stopPropagation();else if(hE(a,y),l&4&&-1<PP.indexOf(a)){for(;C!==null;){var _=wt(C);if(_!==null)switch(_.tag){case 3:if(_=_.stateNode,_.current.memoizedState.isDehydrated){var F=Yr(_.pendingLanes);if(F!==0){var W=_;for(W.pendingLanes|=2,W.entangledLanes|=2;F;){var rt=1<<31-Nt(F);W.entanglements[1]|=rt,F&=~rt}wn(_),(Be&6)===0&&(dd=Ae()+500,zc(0))}}break;case 31:case 13:W=Ts(_,2),W!==null&&li(W,_,2),pd(),o0(_,2)}if(_=c0(y),_===null&&Wm(a,l,y,Ld,f),_===C)break;C=_}C!==null&&y.stopPropagation()}else Wm(a,l,y,null,f)}}function c0(a){return a=hg(a),u0(a)}var Ld=null;function u0(a){if(Ld=null,a=tt(a),a!==null){var l=s(a);if(l===null)a=null;else{var f=l.tag;if(f===13){if(a=o(l),a!==null)return a;a=null}else if(f===31){if(a=c(l),a!==null)return a;a=null}else if(f===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;a=null}else l!==a&&(a=null)}}return Ld=a,null}function uE(a){switch(a){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(sr()){case gt:return 2;case kt:return 8;case Dt:case ee:return 32;case ae:return 268435456;default:return 32}default:return 32}}var h0=!1,Pa=null,Ha=null,Ua=null,Yc=new Map,Vc=new Map,Ga=[],PP="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function hE(a,l){switch(a){case"focusin":case"focusout":Pa=null;break;case"dragenter":case"dragleave":Ha=null;break;case"mouseover":case"mouseout":Ua=null;break;case"pointerover":case"pointerout":Yc.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":Vc.delete(l.pointerId)}}function Wc(a,l,f,y,C,_){return a===null||a.nativeEvent!==_?(a={blockedOn:l,domEventName:f,eventSystemFlags:y,nativeEvent:_,targetContainers:[C]},l!==null&&(l=wt(l),l!==null&&lE(l)),a):(a.eventSystemFlags|=y,l=a.targetContainers,C!==null&&l.indexOf(C)===-1&&l.push(C),a)}function HP(a,l,f,y,C){switch(l){case"focusin":return Pa=Wc(Pa,a,l,f,y,C),!0;case"dragenter":return Ha=Wc(Ha,a,l,f,y,C),!0;case"mouseover":return Ua=Wc(Ua,a,l,f,y,C),!0;case"pointerover":var _=C.pointerId;return Yc.set(_,Wc(Yc.get(_)||null,a,l,f,y,C)),!0;case"gotpointercapture":return _=C.pointerId,Vc.set(_,Wc(Vc.get(_)||null,a,l,f,y,C)),!0}return!1}function dE(a){var l=tt(a.target);if(l!==null){var f=s(l);if(f!==null){if(l=f.tag,l===13){if(l=o(f),l!==null){a.blockedOn=l,ys(a.priority,function(){cE(f)});return}}else if(l===31){if(l=c(f),l!==null){a.blockedOn=l,ys(a.priority,function(){cE(f)});return}}else if(l===3&&f.stateNode.current.memoizedState.isDehydrated){a.blockedOn=f.tag===3?f.stateNode.containerInfo:null;return}}}a.blockedOn=null}function Md(a){if(a.blockedOn!==null)return!1;for(var l=a.targetContainers;0<l.length;){var f=c0(a.nativeEvent);if(f===null){f=a.nativeEvent;var y=new f.constructor(f.type,f);ug=y,f.target.dispatchEvent(y),ug=null}else return l=wt(f),l!==null&&lE(l),a.blockedOn=f,!1;l.shift()}return!0}function fE(a,l,f){Md(a)&&f.delete(l)}function UP(){h0=!1,Pa!==null&&Md(Pa)&&(Pa=null),Ha!==null&&Md(Ha)&&(Ha=null),Ua!==null&&Md(Ua)&&(Ua=null),Yc.forEach(fE),Vc.forEach(fE)}function Nd(a,l){a.blockedOn===l&&(a.blockedOn=null,h0||(h0=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,UP)))}var Od=null;function pE(a){Od!==a&&(Od=a,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Od===a&&(Od=null);for(var l=0;l<a.length;l+=3){var f=a[l],y=a[l+1],C=a[l+2];if(typeof y!="function"){if(u0(y||f)===null)continue;break}var _=wt(f);_!==null&&(a.splice(l,3),l-=3,cm(_,{pending:!0,data:C,method:f.method,action:y},y,C))}}))}function Zo(a){function l(rt){return Nd(rt,a)}Pa!==null&&Nd(Pa,a),Ha!==null&&Nd(Ha,a),Ua!==null&&Nd(Ua,a),Yc.forEach(l),Vc.forEach(l);for(var f=0;f<Ga.length;f++){var y=Ga[f];y.blockedOn===a&&(y.blockedOn=null)}for(;0<Ga.length&&(f=Ga[0],f.blockedOn===null);)dE(f),f.blockedOn===null&&Ga.shift();if(f=(a.ownerDocument||a).$$reactFormReplay,f!=null)for(y=0;y<f.length;y+=3){var C=f[y],_=f[y+1],F=C[$e]||null;if(typeof _=="function")F||pE(f);else if(F){var W=null;if(_&&_.hasAttribute("formAction")){if(C=_,F=_[$e]||null)W=F.formAction;else if(u0(C)!==null)continue}else W=F.action;typeof W=="function"?f[y+1]=W:(f.splice(y,3),y-=3),pE(f)}}}function gE(){function a(_){_.canIntercept&&_.info==="react-transition"&&_.intercept({handler:function(){return new Promise(function(F){return C=F})},focusReset:"manual",scroll:"manual"})}function l(){C!==null&&(C(),C=null),y||setTimeout(f,20)}function f(){if(!y&&!navigation.transition){var _=navigation.currentEntry;_&&_.url!=null&&navigation.navigate(_.url,{state:_.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var y=!1,C=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(f,100),function(){y=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),C!==null&&(C(),C=null)}}}function d0(a){this._internalRoot=a}Rd.prototype.render=d0.prototype.render=function(a){var l=this._internalRoot;if(l===null)throw Error(i(409));var f=l.current,y=_i();sE(f,y,a,l,null,null)},Rd.prototype.unmount=d0.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var l=a.containerInfo;sE(a.current,2,null,a,null,null),pd(),l[Mi]=null}};function Rd(a){this._internalRoot=a}Rd.prototype.unstable_scheduleHydration=function(a){if(a){var l=ms();a={blockedOn:null,target:a,priority:l};for(var f=0;f<Ga.length&&l!==0&&l<Ga[f].priority;f++);Ga.splice(f,0,a),f===0&&dE(a)}};var mE=e.version;if(mE!=="19.2.6")throw Error(i(527,mE,"19.2.6"));P.findDOMNode=function(a){var l=a._reactInternals;if(l===void 0)throw typeof a.render=="function"?Error(i(188)):(a=Object.keys(a).join(","),Error(i(268,a)));return a=h(l),a=a!==null?d(a):null,a=a===null?null:a.stateNode,a};var GP={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:N,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Dd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Dd.isDisabled&&Dd.supportsFiber)try{Lt=Dd.inject(GP),Ht=Dd}catch{}}return Qc.createRoot=function(a,l){if(!n(a))throw Error(i(299));var f=!1,y="",C=S_,_=k_,F=__;return l!=null&&(l.unstable_strictMode===!0&&(f=!0),l.identifierPrefix!==void 0&&(y=l.identifierPrefix),l.onUncaughtError!==void 0&&(C=l.onUncaughtError),l.onCaughtError!==void 0&&(_=l.onCaughtError),l.onRecoverableError!==void 0&&(F=l.onRecoverableError)),l=nE(a,1,!1,null,null,f,y,null,C,_,F,gE),a[Mi]=l.current,Vm(a),new d0(l)},Qc.hydrateRoot=function(a,l,f){if(!n(a))throw Error(i(299));var y=!1,C="",_=S_,F=k_,W=__,rt=null;return f!=null&&(f.unstable_strictMode===!0&&(y=!0),f.identifierPrefix!==void 0&&(C=f.identifierPrefix),f.onUncaughtError!==void 0&&(_=f.onUncaughtError),f.onCaughtError!==void 0&&(F=f.onCaughtError),f.onRecoverableError!==void 0&&(W=f.onRecoverableError),f.formState!==void 0&&(rt=f.formState)),l=nE(a,1,!0,l,f??null,y,C,rt,_,F,W,gE),l.context=aE(null),f=l.current,y=_i(),y=Nr(y),C=La(y),C.callback=null,Ma(f,C,y),f=y,l.current.lanes=f,yn(l,f),wn(l),a[Mi]=l.current,Vm(a),new Rd(l)},Qc.version="19.2.6",Qc}var TE;function r9(){if(TE)return g0.exports;TE=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),g0.exports=e9(),g0.exports}var i9=r9();const EE=t=>{let e;const r=new Set,i=(h,d)=>{const p=typeof h=="function"?h(e):h;if(!Object.is(p,e)){const m=e;e=d??(typeof p!="object"||p===null)?p:Object.assign({},e,p),r.forEach(g=>g(e,m))}},n=()=>e,c={setState:i,getState:n,getInitialState:()=>u,subscribe:h=>(r.add(h),()=>r.delete(h))},u=e=t(i,n,c);return c},n9=(t=>t?EE(t):EE),a9=t=>t;function s9(t,e=a9){const r=ul.useSyncExternalStore(t.subscribe,ul.useCallback(()=>e(t.getState()),[t,e]),ul.useCallback(()=>e(t.getInitialState()),[t,e]));return ul.useDebugValue(r),r}const AE=t=>{const e=n9(t),r=i=>s9(e,i);return Object.assign(r,e),r},o9=(t=>t?AE(t):AE),Id=150,uO=1,l9=["SEMANTIC","TRACEABILITY","DEPENDENCY"];function c9(t){const e={artifactsById:new Map,relationsBySource:new Map,relationsByTarget:new Map,artifactsByType:new Map,artifactsByLayer:new Map,artifactsByStatus:new Map,artifactsByOwner:new Map,artifactsByTeam:new Map};return t.artifacts.forEach(r=>{var i,n;e.artifactsById.set(r.id,r),r.type&&(e.artifactsByType.has(r.type)||e.artifactsByType.set(r.type,[]),e.artifactsByType.get(r.type).push(r)),r.layer&&(e.artifactsByLayer.has(r.layer)||e.artifactsByLayer.set(r.layer,[]),e.artifactsByLayer.get(r.layer).push(r)),r.status&&(e.artifactsByStatus.has(r.status)||e.artifactsByStatus.set(r.status,[]),e.artifactsByStatus.get(r.status).push(r)),(i=r.ownership)!=null&&i.owner&&(e.artifactsByOwner.has(r.ownership.owner)||e.artifactsByOwner.set(r.ownership.owner,[]),e.artifactsByOwner.get(r.ownership.owner).push(r)),(n=r.ownership)!=null&&n.team&&(e.artifactsByTeam.has(r.ownership.team)||e.artifactsByTeam.set(r.ownership.team,[]),e.artifactsByTeam.get(r.ownership.team).push(r))}),t.relations.forEach(r=>{e.relationsBySource.has(r.from)||e.relationsBySource.set(r.from,[]),e.relationsBySource.get(r.from).push(r),e.relationsByTarget.has(r.to)||e.relationsByTarget.set(r.to,[]),e.relationsByTarget.get(r.to).push(r)}),e}function BE(t,e){return!(!e.showWeakRelations&&l9.includes(t.strength||(t.category==="SEMANTIC"?"WEAK":"STRONG"))&&["RELATES_TO","DOCUMENTS"].includes(t.type))}function u9(t,e,r){const{focusId:i,depth:n=uO,filterLayer:s="ALL",filterOwner:o="ALL",filterTeam:c="ALL"}=r;let u=new Set,h=new Set;const d=p=>{var m,g;return!(s!=="ALL"&&p.layer!==s||o!=="ALL"&&((m=p.ownership)==null?void 0:m.owner)!==o||c!=="ALL"&&((g=p.ownership)==null?void 0:g.team)!==c)};if(i){const p=e.artifactsById.get(i);if(!p||!d(p))return{artifacts:[],relations:[]};u.add(p);let m=[{id:i,currentDepth:0}];const g=new Set;for(;m.length>0;){const{id:x,currentDepth:v}=m.shift();if(g.has(x)||(g.add(x),v>=n))continue;const b=e.relationsBySource.get(x)||[],w=e.relationsByTarget.get(x)||[];[...b,...w].forEach(T=>{if(!BE(T,r))return;const k=T.from===x?T.to:T.from,E=e.artifactsById.get(k);E&&d(E)&&(h.add(T),u.add(E),g.has(k)||m.push({id:k,currentDepth:v+1}))})}}else if(t.artifacts.forEach(p=>{d(p)&&u.add(p)}),t.relations.forEach(p=>{const m=e.artifactsById.get(p.from),g=e.artifactsById.get(p.to);m&&g&&d(m)&&d(g)&&BE(p,r)&&h.add(p)}),u.size>Id&&!i){const p=Array.from(u).slice(0,Id),m=new Set(p.map(x=>x.id)),g=Array.from(h).filter(x=>m.has(x.from)&&m.has(x.to));return{artifacts:p,relations:g}}if(u.size>Id){const p=Array.from(u).slice(0,Id),m=new Set(p.map(x=>x.id)),g=Array.from(h).filter(x=>m.has(x.from)&&m.has(x.to));return{artifacts:p,relations:g}}return{artifacts:Array.from(u),relations:Array.from(h)}}let Zc=null;const ls=o9((t,e)=>({versions:[],systemVersions:[],changes:[],currentVersionId:null,fullGraph:null,graphIndex:null,currentSubgraph:null,activeView:"graph",selectedArtifactId:null,isLoading:!1,settings:{graphFocusDepth:uO,docsFocusDepth:1,defaultDocsFocusMode:!0,showWeakRelations:!1,language:"EN"},globalFilters:{layer:"ALL",owner:"ALL",team:"ALL"},updateSettings:r=>{t(i=>({settings:{...i.settings,...r}})),e().refreshSubgraph()},setGlobalFilter:(r,i)=>{t(n=>({globalFilters:{...n.globalFilters,[r]:i}})),e().refreshSubgraph()},refreshSubgraph:()=>{const{fullGraph:r,graphIndex:i,selectedArtifactId:n,settings:s,globalFilters:o}=e();if(!r||!i)return;const c={focusId:n||void 0,depth:s.graphFocusDepth,showWeakRelations:s.showWeakRelations,filterLayer:o.layer,filterOwner:o.owner,filterTeam:o.team},u=u9(r,i,c);t({currentSubgraph:u})},initializeStore:async()=>{t({isLoading:!0});try{const r=await fetch("/graph-data.json");if(!r.ok)throw new Error("Failed to load graph data");if(Zc=await r.json(),Zc){const{versions:i,systemVersions:n,changes:s}=Zc;t({versions:i,systemVersions:n||[],changes:s,isLoading:!1}),i.length>0&&!e().currentVersionId&&e().setVersion(i[i.length-1].id)}}catch(r){console.error("OpenLAG Error: Could not fetch static data.",r),t({isLoading:!1})}},setVersion:r=>{if(!Zc)return;const i=Zc.graphs[r]||null;let n=null;i&&(n=c9(i)),t({currentVersionId:r,selectedArtifactId:null,fullGraph:i,graphIndex:n}),e().refreshSubgraph()},setView:r=>t({activeView:r}),setSelectedArtifact:r=>{t({selectedArtifactId:r}),e().refreshSubgraph()}}));function Sr(t){if(typeof t=="string"||typeof t=="number")return""+t;let e="";if(Array.isArray(t))for(let r=0,i;r<t.length;r++)(i=Sr(t[r]))!==""&&(e+=(e&&" ")+i);else for(let r in t)t[r]&&(e+=(e&&" ")+r);return e}var h9={value:()=>{}};function dp(){for(var t=0,e=arguments.length,r={},i;t<e;++t){if(!(i=arguments[t]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new lf(r)}function lf(t){this._=t}function d9(t,e){return t.trim().split(/^|\s+/).map(function(r){var i="",n=r.indexOf(".");if(n>=0&&(i=r.slice(n+1),r=r.slice(0,n)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}lf.prototype=dp.prototype={constructor:lf,on:function(t,e){var r=this._,i=d9(t+"",r),n,s=-1,o=i.length;if(arguments.length<2){for(;++s<o;)if((n=(t=i[s]).type)&&(n=f9(r[n],t.name)))return n;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++s<o;)if(n=(t=i[s]).type)r[n]=LE(r[n],t.name,e);else if(e==null)for(n in r)r[n]=LE(r[n],t.name,null);return this},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new lf(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var r=new Array(n),i=0,n,s;i<n;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(s=this._[t],i=0,n=s.length;i<n;++i)s[i].value.apply(e,r)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],n=0,s=i.length;n<s;++n)i[n].value.apply(e,r)}};function f9(t,e){for(var r=0,i=t.length,n;r<i;++r)if((n=t[r]).name===e)return n.value}function LE(t,e,r){for(var i=0,n=t.length;i<n;++i)if(t[i].name===e){t[i]=h9,t=t.slice(0,i).concat(t.slice(i+1));break}return r!=null&&t.push({name:e,value:r}),t}var TC="http://www.w3.org/1999/xhtml";const ME={svg:"http://www.w3.org/2000/svg",xhtml:TC,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function fp(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),ME.hasOwnProperty(e)?{space:ME[e],local:t}:t}function p9(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===TC&&e.documentElement.namespaceURI===TC?e.createElement(t):e.createElementNS(r,t)}}function g9(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function hO(t){var e=fp(t);return(e.local?g9:p9)(e)}function m9(){}function Y2(t){return t==null?m9:function(){return this.querySelector(t)}}function y9(t){typeof t!="function"&&(t=Y2(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n<r;++n)for(var s=e[n],o=s.length,c=i[n]=new Array(o),u,h,d=0;d<o;++d)(u=s[d])&&(h=t.call(u,u.__data__,d,s))&&("__data__"in u&&(h.__data__=u.__data__),c[d]=h);return new Li(i,this._parents)}function x9(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function b9(){return[]}function dO(t){return t==null?b9:function(){return this.querySelectorAll(t)}}function v9(t){return function(){return x9(t.apply(this,arguments))}}function C9(t){typeof t=="function"?t=v9(t):t=dO(t);for(var e=this._groups,r=e.length,i=[],n=[],s=0;s<r;++s)for(var o=e[s],c=o.length,u,h=0;h<c;++h)(u=o[h])&&(i.push(t.call(u,u.__data__,h,o)),n.push(u));return new Li(i,n)}function fO(t){return function(){return this.matches(t)}}function pO(t){return function(e){return e.matches(t)}}var w9=Array.prototype.find;function S9(t){return function(){return w9.call(this.children,t)}}function k9(){return this.firstElementChild}function _9(t){return this.select(t==null?k9:S9(typeof t=="function"?t:pO(t)))}var T9=Array.prototype.filter;function E9(){return Array.from(this.children)}function A9(t){return function(){return T9.call(this.children,t)}}function B9(t){return this.selectAll(t==null?E9:A9(typeof t=="function"?t:pO(t)))}function L9(t){typeof t!="function"&&(t=fO(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n<r;++n)for(var s=e[n],o=s.length,c=i[n]=[],u,h=0;h<o;++h)(u=s[h])&&t.call(u,u.__data__,h,s)&&c.push(u);return new Li(i,this._parents)}function gO(t){return new Array(t.length)}function M9(){return new Li(this._enter||this._groups.map(gO),this._parents)}function Tf(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Tf.prototype={constructor:Tf,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function N9(t){return function(){return t}}function O9(t,e,r,i,n,s){for(var o=0,c,u=e.length,h=s.length;o<h;++o)(c=e[o])?(c.__data__=s[o],i[o]=c):r[o]=new Tf(t,s[o]);for(;o<u;++o)(c=e[o])&&(n[o]=c)}function R9(t,e,r,i,n,s,o){var c,u,h=new Map,d=e.length,p=s.length,m=new Array(d),g;for(c=0;c<d;++c)(u=e[c])&&(m[c]=g=o.call(u,u.__data__,c,e)+"",h.has(g)?n[c]=u:h.set(g,u));for(c=0;c<p;++c)g=o.call(t,s[c],c,s)+"",(u=h.get(g))?(i[c]=u,u.__data__=s[c],h.delete(g)):r[c]=new Tf(t,s[c]);for(c=0;c<d;++c)(u=e[c])&&h.get(m[c])===u&&(n[c]=u)}function D9(t){return t.__data__}function F9(t,e){if(!arguments.length)return Array.from(this,D9);var r=e?R9:O9,i=this._parents,n=this._groups;typeof t!="function"&&(t=N9(t));for(var s=n.length,o=new Array(s),c=new Array(s),u=new Array(s),h=0;h<s;++h){var d=i[h],p=n[h],m=p.length,g=I9(t.call(d,d&&d.__data__,h,i)),x=g.length,v=c[h]=new Array(x),b=o[h]=new Array(x),w=u[h]=new Array(m);r(d,p,v,b,w,g,e);for(var T=0,k=0,E,L;T<x;++T)if(E=v[T]){for(T>=k&&(k=T+1);!(L=b[k])&&++k<x;);E._next=L||null}}return o=new Li(o,i),o._enter=c,o._exit=u,o}function I9(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function q9(){return new Li(this._exit||this._groups.map(gO),this._parents)}function z9(t,e,r){var i=this.enter(),n=this,s=this.exit();return typeof t=="function"?(i=t(i),i&&(i=i.selection())):i=i.append(t+""),e!=null&&(n=e(n),n&&(n=n.selection())),r==null?s.remove():r(s),i&&n?i.merge(n).order():n}function j9(t){for(var e=t.selection?t.selection():t,r=this._groups,i=e._groups,n=r.length,s=i.length,o=Math.min(n,s),c=new Array(n),u=0;u<o;++u)for(var h=r[u],d=i[u],p=h.length,m=c[u]=new Array(p),g,x=0;x<p;++x)(g=h[x]||d[x])&&(m[x]=g);for(;u<n;++u)c[u]=r[u];return new Li(c,this._parents)}function $9(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var i=t[e],n=i.length-1,s=i[n],o;--n>=0;)(o=i[n])&&(s&&o.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(o,s),s=o);return this}function P9(t){t||(t=H9);function e(p,m){return p&&m?t(p.__data__,m.__data__):!p-!m}for(var r=this._groups,i=r.length,n=new Array(i),s=0;s<i;++s){for(var o=r[s],c=o.length,u=n[s]=new Array(c),h,d=0;d<c;++d)(h=o[d])&&(u[d]=h);u.sort(e)}return new Li(n,this._parents).order()}function H9(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function U9(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function G9(){return Array.from(this)}function Y9(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i=t[e],n=0,s=i.length;n<s;++n){var o=i[n];if(o)return o}return null}function V9(){let t=0;for(const e of this)++t;return t}function W9(){return!this.node()}function X9(t){for(var e=this._groups,r=0,i=e.length;r<i;++r)for(var n=e[r],s=0,o=n.length,c;s<o;++s)(c=n[s])&&t.call(c,c.__data__,s,n);return this}function Q9(t){return function(){this.removeAttribute(t)}}function Z9(t){return function(){this.removeAttributeNS(t.space,t.local)}}function K9(t,e){return function(){this.setAttribute(t,e)}}function J9(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function t7(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function e7(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function r7(t,e){var r=fp(t);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((e==null?r.local?Z9:Q9:typeof e=="function"?r.local?e7:t7:r.local?J9:K9)(r,e))}function mO(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function i7(t){return function(){this.style.removeProperty(t)}}function n7(t,e,r){return function(){this.style.setProperty(t,e,r)}}function a7(t,e,r){return function(){var i=e.apply(this,arguments);i==null?this.style.removeProperty(t):this.style.setProperty(t,i,r)}}function s7(t,e,r){return arguments.length>1?this.each((e==null?i7:typeof e=="function"?a7:n7)(t,e,r??"")):Dl(this.node(),t)}function Dl(t,e){return t.style.getPropertyValue(e)||mO(t).getComputedStyle(t,null).getPropertyValue(e)}function o7(t){return function(){delete this[t]}}function l7(t,e){return function(){this[t]=e}}function c7(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function u7(t,e){return arguments.length>1?this.each((e==null?o7:typeof e=="function"?c7:l7)(t,e)):this.node()[t]}function yO(t){return t.trim().split(/^|\s+/)}function V2(t){return t.classList||new xO(t)}function xO(t){this._node=t,this._names=yO(t.getAttribute("class")||"")}xO.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function bO(t,e){for(var r=V2(t),i=-1,n=e.length;++i<n;)r.add(e[i])}function vO(t,e){for(var r=V2(t),i=-1,n=e.length;++i<n;)r.remove(e[i])}function h7(t){return function(){bO(this,t)}}function d7(t){return function(){vO(this,t)}}function f7(t,e){return function(){(e.apply(this,arguments)?bO:vO)(this,t)}}function p7(t,e){var r=yO(t+"");if(arguments.length<2){for(var i=V2(this.node()),n=-1,s=r.length;++n<s;)if(!i.contains(r[n]))return!1;return!0}return this.each((typeof e=="function"?f7:e?h7:d7)(r,e))}function g7(){this.textContent=""}function m7(t){return function(){this.textContent=t}}function y7(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function x7(t){return arguments.length?this.each(t==null?g7:(typeof t=="function"?y7:m7)(t)):this.node().textContent}function b7(){this.innerHTML=""}function v7(t){return function(){this.innerHTML=t}}function C7(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function w7(t){return arguments.length?this.each(t==null?b7:(typeof t=="function"?C7:v7)(t)):this.node().innerHTML}function S7(){this.nextSibling&&this.parentNode.appendChild(this)}function k7(){return this.each(S7)}function _7(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function T7(){return this.each(_7)}function E7(t){var e=typeof t=="function"?t:hO(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function A7(){return null}function B7(t,e){var r=typeof t=="function"?t:hO(t),i=e==null?A7:typeof e=="function"?e:Y2(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function L7(){var t=this.parentNode;t&&t.removeChild(this)}function M7(){return this.each(L7)}function N7(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function O7(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function R7(t){return this.select(t?O7:N7)}function D7(t){return arguments.length?this.property("__data__",t):this.node().__data__}function F7(t){return function(e){t.call(this,e,this.__data__)}}function I7(t){return t.trim().split(/^|\s+/).map(function(e){var r="",i=e.indexOf(".");return i>=0&&(r=e.slice(i+1),e=e.slice(0,i)),{type:e,name:r}})}function q7(t){return function(){var e=this.__on;if(e){for(var r=0,i=-1,n=e.length,s;r<n;++r)s=e[r],(!t.type||s.type===t.type)&&s.name===t.name?this.removeEventListener(s.type,s.listener,s.options):e[++i]=s;++i?e.length=i:delete this.__on}}}function z7(t,e,r){return function(){var i=this.__on,n,s=F7(e);if(i){for(var o=0,c=i.length;o<c;++o)if((n=i[o]).type===t.type&&n.name===t.name){this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=s,n.options=r),n.value=e;return}}this.addEventListener(t.type,s,r),n={type:t.type,name:t.name,value:e,listener:s,options:r},i?i.push(n):this.__on=[n]}}function j7(t,e,r){var i=I7(t+""),n,s=i.length,o;if(arguments.length<2){var c=this.node().__on;if(c){for(var u=0,h=c.length,d;u<h;++u)for(n=0,d=c[u];n<s;++n)if((o=i[n]).type===d.type&&o.name===d.name)return d.value}return}for(c=e?z7:q7,n=0;n<s;++n)this.each(c(i[n],e,r));return this}function CO(t,e,r){var i=mO(t),n=i.CustomEvent;typeof n=="function"?n=new n(e,r):(n=i.document.createEvent("Event"),r?(n.initEvent(e,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(e,!1,!1)),t.dispatchEvent(n)}function $7(t,e){return function(){return CO(this,t,e)}}function P7(t,e){return function(){return CO(this,t,e.apply(this,arguments))}}function H7(t,e){return this.each((typeof e=="function"?P7:$7)(t,e))}function*U7(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i=t[e],n=0,s=i.length,o;n<s;++n)(o=i[n])&&(yield o)}var wO=[null];function Li(t,e){this._groups=t,this._parents=e}function nh(){return new Li([[document.documentElement]],wO)}function G7(){return this}Li.prototype=nh.prototype={constructor:Li,select:y9,selectAll:C9,selectChild:_9,selectChildren:B9,filter:L9,data:F9,enter:M9,exit:q9,join:z9,merge:j9,selection:G7,order:$9,sort:P9,call:U9,nodes:G9,node:Y9,size:V9,empty:W9,each:X9,attr:r7,style:s7,property:u7,classed:p7,text:x7,html:w7,raise:k7,lower:T7,append:E7,insert:B7,remove:M7,clone:R7,datum:D7,on:j7,dispatch:H7,[Symbol.iterator]:U7};function Xt(t){return typeof t=="string"?new Li([[document.querySelector(t)]],[document.documentElement]):new Li([[t]],wO)}function Y7(t){let e;for(;e=t.sourceEvent;)t=e;return t}function Ji(t,e){if(t=Y7(t),e===void 0&&(e=t.currentTarget),e){var r=e.ownerSVGElement||e;if(r.createSVGPoint){var i=r.createSVGPoint();return i.x=t.clientX,i.y=t.clientY,i=i.matrixTransform(e.getScreenCTM().inverse()),[i.x,i.y]}if(e.getBoundingClientRect){var n=e.getBoundingClientRect();return[t.clientX-n.left-e.clientLeft,t.clientY-n.top-e.clientTop]}}return[t.pageX,t.pageY]}const V7={passive:!1},Iu={capture:!0,passive:!1};function b0(t){t.stopImmediatePropagation()}function gl(t){t.preventDefault(),t.stopImmediatePropagation()}function SO(t){var e=t.document.documentElement,r=Xt(t).on("dragstart.drag",gl,Iu);"onselectstart"in e?r.on("selectstart.drag",gl,Iu):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function kO(t,e){var r=t.document.documentElement,i=Xt(t).on("dragstart.drag",null);e&&(i.on("click.drag",gl,Iu),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in r?i.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const qd=t=>()=>t;function EC(t,{sourceEvent:e,subject:r,target:i,identifier:n,active:s,x:o,y:c,dx:u,dy:h,dispatch:d}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:n,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:c,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:h,enumerable:!0,configurable:!0},_:{value:d}})}EC.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function W7(t){return!t.ctrlKey&&!t.button}function X7(){return this.parentNode}function Q7(t,e){return e??{x:t.x,y:t.y}}function Z7(){return navigator.maxTouchPoints||"ontouchstart"in this}function _O(){var t=W7,e=X7,r=Q7,i=Z7,n={},s=dp("start","drag","end"),o=0,c,u,h,d,p=0;function m(E){E.on("mousedown.drag",g).filter(i).on("touchstart.drag",b).on("touchmove.drag",w,V7).on("touchend.drag touchcancel.drag",T).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(E,L){if(!(d||!t.call(this,E,L))){var A=k(this,e.call(this,E,L),E,L,"mouse");A&&(Xt(E.view).on("mousemove.drag",x,Iu).on("mouseup.drag",v,Iu),SO(E.view),b0(E),h=!1,c=E.clientX,u=E.clientY,A("start",E))}}function x(E){if(gl(E),!h){var L=E.clientX-c,A=E.clientY-u;h=L*L+A*A>p}n.mouse("drag",E)}function v(E){Xt(E.view).on("mousemove.drag mouseup.drag",null),kO(E.view,h),gl(E),n.mouse("end",E)}function b(E,L){if(t.call(this,E,L)){var A=E.changedTouches,R=e.call(this,E,L),j=A.length,Y,V;for(Y=0;Y<j;++Y)(V=k(this,R,E,L,A[Y].identifier,A[Y]))&&(b0(E),V("start",E,A[Y]))}}function w(E){var L=E.changedTouches,A=L.length,R,j;for(R=0;R<A;++R)(j=n[L[R].identifier])&&(gl(E),j("drag",E,L[R]))}function T(E){var L=E.changedTouches,A=L.length,R,j;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),R=0;R<A;++R)(j=n[L[R].identifier])&&(b0(E),j("end",E,L[R]))}function k(E,L,A,R,j,Y){var V=s.copy(),O=Ji(Y||A,L),z,X,M;if((M=r.call(E,new EC("beforestart",{sourceEvent:A,target:m,identifier:j,active:o,x:O[0],y:O[1],dx:0,dy:0,dispatch:V}),R))!=null)return z=M.x-O[0]||0,X=M.y-O[1]||0,function I(N,P,$){var D=O,q;switch(N){case"start":n[j]=I,q=o++;break;case"end":delete n[j],--o;case"drag":O=Ji($||P,L),q=o;break}V.call(N,E,new EC(N,{sourceEvent:P,subject:M,target:m,identifier:j,active:q,x:O[0]+z,y:O[1]+X,dx:O[0]-D[0],dy:O[1]-D[1],dispatch:V}),R)}}return m.filter=function(E){return arguments.length?(t=typeof E=="function"?E:qd(!!E),m):t},m.container=function(E){return arguments.length?(e=typeof E=="function"?E:qd(E),m):e},m.subject=function(E){return arguments.length?(r=typeof E=="function"?E:qd(E),m):r},m.touchable=function(E){return arguments.length?(i=typeof E=="function"?E:qd(!!E),m):i},m.on=function(){var E=s.on.apply(s,arguments);return E===s?m:E},m.clickDistance=function(E){return arguments.length?(p=(E=+E)*E,m):Math.sqrt(p)},m}function W2(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function TO(t,e){var r=Object.create(t.prototype);for(var i in e)r[i]=e[i];return r}function ah(){}var qu=.7,Ef=1/qu,ml="\\s*([+-]?\\d+)\\s*",zu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ln="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",K7=/^#([0-9a-f]{3,8})$/,J7=new RegExp(`^rgb\\(${ml},${ml},${ml}\\)$`),tH=new RegExp(`^rgb\\(${Ln},${Ln},${Ln}\\)$`),eH=new RegExp(`^rgba\\(${ml},${ml},${ml},${zu}\\)$`),rH=new RegExp(`^rgba\\(${Ln},${Ln},${Ln},${zu}\\)$`),iH=new RegExp(`^hsl\\(${zu},${Ln},${Ln}\\)$`),nH=new RegExp(`^hsla\\(${zu},${Ln},${Ln},${zu}\\)$`),NE={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};W2(ah,Zs,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:OE,formatHex:OE,formatHex8:aH,formatHsl:sH,formatRgb:RE,toString:RE});function OE(){return this.rgb().formatHex()}function aH(){return this.rgb().formatHex8()}function sH(){return EO(this).formatHsl()}function RE(){return this.rgb().formatRgb()}function Zs(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=K7.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?DE(e):r===3?new pi(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?zd(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?zd(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=J7.exec(t))?new pi(e[1],e[2],e[3],1):(e=tH.exec(t))?new pi(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=eH.exec(t))?zd(e[1],e[2],e[3],e[4]):(e=rH.exec(t))?zd(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=iH.exec(t))?qE(e[1],e[2]/100,e[3]/100,1):(e=nH.exec(t))?qE(e[1],e[2]/100,e[3]/100,e[4]):NE.hasOwnProperty(t)?DE(NE[t]):t==="transparent"?new pi(NaN,NaN,NaN,0):null}function DE(t){return new pi(t>>16&255,t>>8&255,t&255,1)}function zd(t,e,r,i){return i<=0&&(t=e=r=NaN),new pi(t,e,r,i)}function oH(t){return t instanceof ah||(t=Zs(t)),t?(t=t.rgb(),new pi(t.r,t.g,t.b,t.opacity)):new pi}function AC(t,e,r,i){return arguments.length===1?oH(t):new pi(t,e,r,i??1)}function pi(t,e,r,i){this.r=+t,this.g=+e,this.b=+r,this.opacity=+i}W2(pi,AC,TO(ah,{brighter(t){return t=t==null?Ef:Math.pow(Ef,t),new pi(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?qu:Math.pow(qu,t),new pi(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new pi(Ws(this.r),Ws(this.g),Ws(this.b),Af(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:FE,formatHex:FE,formatHex8:lH,formatRgb:IE,toString:IE}));function FE(){return`#${Us(this.r)}${Us(this.g)}${Us(this.b)}`}function lH(){return`#${Us(this.r)}${Us(this.g)}${Us(this.b)}${Us((isNaN(this.opacity)?1:this.opacity)*255)}`}function IE(){const t=Af(this.opacity);return`${t===1?"rgb(":"rgba("}${Ws(this.r)}, ${Ws(this.g)}, ${Ws(this.b)}${t===1?")":`, ${t})`}`}function Af(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ws(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Us(t){return t=Ws(t),(t<16?"0":"")+t.toString(16)}function qE(t,e,r,i){return i<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new nn(t,e,r,i)}function EO(t){if(t instanceof nn)return new nn(t.h,t.s,t.l,t.opacity);if(t instanceof ah||(t=Zs(t)),!t)return new nn;if(t instanceof nn)return t;t=t.rgb();var e=t.r/255,r=t.g/255,i=t.b/255,n=Math.min(e,r,i),s=Math.max(e,r,i),o=NaN,c=s-n,u=(s+n)/2;return c?(e===s?o=(r-i)/c+(r<i)*6:r===s?o=(i-e)/c+2:o=(e-r)/c+4,c/=u<.5?s+n:2-s-n,o*=60):c=u>0&&u<1?0:o,new nn(o,c,u,t.opacity)}function cH(t,e,r,i){return arguments.length===1?EO(t):new nn(t,e,r,i??1)}function nn(t,e,r,i){this.h=+t,this.s=+e,this.l=+r,this.opacity=+i}W2(nn,cH,TO(ah,{brighter(t){return t=t==null?Ef:Math.pow(Ef,t),new nn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?qu:Math.pow(qu,t),new nn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*e,n=2*r-i;return new pi(v0(t>=240?t-240:t+120,n,i),v0(t,n,i),v0(t<120?t+240:t-120,n,i),this.opacity)},clamp(){return new nn(zE(this.h),jd(this.s),jd(this.l),Af(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Af(this.opacity);return`${t===1?"hsl(":"hsla("}${zE(this.h)}, ${jd(this.s)*100}%, ${jd(this.l)*100}%${t===1?")":`, ${t})`}`}}));function zE(t){return t=(t||0)%360,t<0?t+360:t}function jd(t){return Math.max(0,Math.min(1,t||0))}function v0(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}const pp=t=>()=>t;function AO(t,e){return function(r){return t+r*e}}function uH(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(i){return Math.pow(t+i*e,r)}}function Rft(t,e){var r=e-t;return r?AO(t,r>180||r<-180?r-360*Math.round(r/360):r):pp(isNaN(t)?e:t)}function hH(t){return(t=+t)==1?BO:function(e,r){return r-e?uH(e,r,t):pp(isNaN(e)?r:e)}}function BO(t,e){var r=e-t;return r?AO(t,r):pp(isNaN(t)?e:t)}const Bf=(function t(e){var r=hH(e);function i(n,s){var o=r((n=AC(n)).r,(s=AC(s)).r),c=r(n.g,s.g),u=r(n.b,s.b),h=BO(n.opacity,s.opacity);return function(d){return n.r=o(d),n.g=c(d),n.b=u(d),n.opacity=h(d),n+""}}return i.gamma=t,i})(1);function dH(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,i=e.slice(),n;return function(s){for(n=0;n<r;++n)i[n]=t[n]*(1-s)+e[n]*s;return i}}function fH(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function pH(t,e){var r=e?e.length:0,i=t?Math.min(r,t.length):0,n=new Array(i),s=new Array(r),o;for(o=0;o<i;++o)n[o]=_u(t[o],e[o]);for(;o<r;++o)s[o]=e[o];return function(c){for(o=0;o<i;++o)s[o]=n[o](c);return s}}function gH(t,e){var r=new Date;return t=+t,e=+e,function(i){return r.setTime(t*(1-i)+e*i),r}}function An(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function mH(t,e){var r={},i={},n;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(n in e)n in t?r[n]=_u(t[n],e[n]):i[n]=e[n];return function(s){for(n in r)i[n]=r[n](s);return i}}var BC=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,C0=new RegExp(BC.source,"g");function yH(t){return function(){return t}}function xH(t){return function(e){return t(e)+""}}function LO(t,e){var r=BC.lastIndex=C0.lastIndex=0,i,n,s,o=-1,c=[],u=[];for(t=t+"",e=e+"";(i=BC.exec(t))&&(n=C0.exec(e));)(s=n.index)>r&&(s=e.slice(r,s),c[o]?c[o]+=s:c[++o]=s),(i=i[0])===(n=n[0])?c[o]?c[o]+=n:c[++o]=n:(c[++o]=null,u.push({i:o,x:An(i,n)})),r=C0.lastIndex;return r<e.length&&(s=e.slice(r),c[o]?c[o]+=s:c[++o]=s),c.length<2?u[0]?xH(u[0].x):yH(e):(e=u.length,function(h){for(var d=0,p;d<e;++d)c[(p=u[d]).i]=p.x(h);return c.join("")})}function _u(t,e){var r=typeof e,i;return e==null||r==="boolean"?pp(e):(r==="number"?An:r==="string"?(i=Zs(e))?(e=i,Bf):LO:e instanceof Zs?Bf:e instanceof Date?gH:fH(e)?dH:Array.isArray(e)?pH:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?mH:An)(t,e)}var jE=180/Math.PI,LC={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function MO(t,e,r,i,n,s){var o,c,u;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(u=t*r+e*i)&&(r-=t*u,i-=e*u),(c=Math.sqrt(r*r+i*i))&&(r/=c,i/=c,u/=c),t*i<e*r&&(t=-t,e=-e,u=-u,o=-o),{translateX:n,translateY:s,rotate:Math.atan2(e,t)*jE,skewX:Math.atan(u)*jE,scaleX:o,scaleY:c}}var $d;function bH(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?LC:MO(e.a,e.b,e.c,e.d,e.e,e.f)}function vH(t){return t==null||($d||($d=document.createElementNS("http://www.w3.org/2000/svg","g")),$d.setAttribute("transform",t),!(t=$d.transform.baseVal.consolidate()))?LC:(t=t.matrix,MO(t.a,t.b,t.c,t.d,t.e,t.f))}function NO(t,e,r,i){function n(h){return h.length?h.pop()+" ":""}function s(h,d,p,m,g,x){if(h!==p||d!==m){var v=g.push("translate(",null,e,null,r);x.push({i:v-4,x:An(h,p)},{i:v-2,x:An(d,m)})}else(p||m)&&g.push("translate("+p+e+m+r)}function o(h,d,p,m){h!==d?(h-d>180?d+=360:d-h>180&&(h+=360),m.push({i:p.push(n(p)+"rotate(",null,i)-2,x:An(h,d)})):d&&p.push(n(p)+"rotate("+d+i)}function c(h,d,p,m){h!==d?m.push({i:p.push(n(p)+"skewX(",null,i)-2,x:An(h,d)}):d&&p.push(n(p)+"skewX("+d+i)}function u(h,d,p,m,g,x){if(h!==p||d!==m){var v=g.push(n(g)+"scale(",null,",",null,")");x.push({i:v-4,x:An(h,p)},{i:v-2,x:An(d,m)})}else(p!==1||m!==1)&&g.push(n(g)+"scale("+p+","+m+")")}return function(h,d){var p=[],m=[];return h=t(h),d=t(d),s(h.translateX,h.translateY,d.translateX,d.translateY,p,m),o(h.rotate,d.rotate,p,m),c(h.skewX,d.skewX,p,m),u(h.scaleX,h.scaleY,d.scaleX,d.scaleY,p,m),h=d=null,function(g){for(var x=-1,v=m.length,b;++x<v;)p[(b=m[x]).i]=b.x(g);return p.join("")}}}var CH=NO(bH,"px, ","px)","deg)"),wH=NO(vH,", ",")",")"),SH=1e-12;function $E(t){return((t=Math.exp(t))+1/t)/2}function kH(t){return((t=Math.exp(t))-1/t)/2}function _H(t){return((t=Math.exp(2*t))-1)/(t+1)}const cf=(function t(e,r,i){function n(s,o){var c=s[0],u=s[1],h=s[2],d=o[0],p=o[1],m=o[2],g=d-c,x=p-u,v=g*g+x*x,b,w;if(v<SH)w=Math.log(m/h)/e,b=function(R){return[c+R*g,u+R*x,h*Math.exp(e*R*w)]};else{var T=Math.sqrt(v),k=(m*m-h*h+i*v)/(2*h*r*T),E=(m*m-h*h-i*v)/(2*m*r*T),L=Math.log(Math.sqrt(k*k+1)-k),A=Math.log(Math.sqrt(E*E+1)-E);w=(A-L)/e,b=function(R){var j=R*w,Y=$E(L),V=h/(r*T)*(Y*_H(e*j+L)-kH(L));return[c+V*g,u+V*x,h*Y/$E(e*j+L)]}}return b.duration=w*1e3*e/Math.SQRT2,b}return n.rho=function(s){var o=Math.max(.001,+s),c=o*o,u=c*c;return t(o,c,u)},n})(Math.SQRT2,2,4);var Fl=0,pu=0,Kc=0,OO=1e3,Lf,gu,Mf=0,Ks=0,gp=0,ju=typeof performance=="object"&&performance.now?performance:Date,RO=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function X2(){return Ks||(RO(TH),Ks=ju.now()+gp)}function TH(){Ks=0}function Nf(){this._call=this._time=this._next=null}Nf.prototype=DO.prototype={constructor:Nf,restart:function(t,e,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?X2():+r)+(e==null?0:+e),!this._next&&gu!==this&&(gu?gu._next=this:Lf=this,gu=this),this._call=t,this._time=r,MC()},stop:function(){this._call&&(this._call=null,this._time=1/0,MC())}};function DO(t,e,r){var i=new Nf;return i.restart(t,e,r),i}function EH(){X2(),++Fl;for(var t=Lf,e;t;)(e=Ks-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Fl}function PE(){Ks=(Mf=ju.now())+gp,Fl=pu=0;try{EH()}finally{Fl=0,BH(),Ks=0}}function AH(){var t=ju.now(),e=t-Mf;e>OO&&(gp-=e,Mf=t)}function BH(){for(var t,e=Lf,r,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:Lf=r);gu=t,MC(i)}function MC(t){if(!Fl){pu&&(pu=clearTimeout(pu));var e=t-Ks;e>24?(t<1/0&&(pu=setTimeout(PE,t-ju.now()-gp)),Kc&&(Kc=clearInterval(Kc))):(Kc||(Mf=ju.now(),Kc=setInterval(AH,OO)),Fl=1,RO(PE))}}function HE(t,e,r){var i=new Nf;return e=e==null?0:+e,i.restart(n=>{i.stop(),t(n+e)},e,r),i}var LH=dp("start","end","cancel","interrupt"),MH=[],FO=0,UE=1,NC=2,uf=3,GE=4,OC=5,hf=6;function mp(t,e,r,i,n,s){var o=t.__transition;if(!o)t.__transition={};else if(r in o)return;NH(t,r,{name:e,index:i,group:n,on:LH,tween:MH,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:FO})}function Q2(t,e){var r=dn(t,e);if(r.state>FO)throw new Error("too late; already scheduled");return r}function Dn(t,e){var r=dn(t,e);if(r.state>uf)throw new Error("too late; already running");return r}function dn(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function NH(t,e,r){var i=t.__transition,n;i[e]=r,r.timer=DO(s,0,r.time);function s(h){r.state=UE,r.timer.restart(o,r.delay,r.time),r.delay<=h&&o(h-r.delay)}function o(h){var d,p,m,g;if(r.state!==UE)return u();for(d in i)if(g=i[d],g.name===r.name){if(g.state===uf)return HE(o);g.state===GE?(g.state=hf,g.timer.stop(),g.on.call("interrupt",t,t.__data__,g.index,g.group),delete i[d]):+d<e&&(g.state=hf,g.timer.stop(),g.on.call("cancel",t,t.__data__,g.index,g.group),delete i[d])}if(HE(function(){r.state===uf&&(r.state=GE,r.timer.restart(c,r.delay,r.time),c(h))}),r.state=NC,r.on.call("start",t,t.__data__,r.index,r.group),r.state===NC){for(r.state=uf,n=new Array(m=r.tween.length),d=0,p=-1;d<m;++d)(g=r.tween[d].value.call(t,t.__data__,r.index,r.group))&&(n[++p]=g);n.length=p+1}}function c(h){for(var d=h<r.duration?r.ease.call(null,h/r.duration):(r.timer.restart(u),r.state=OC,1),p=-1,m=n.length;++p<m;)n[p].call(t,d);r.state===OC&&(r.on.call("end",t,t.__data__,r.index,r.group),u())}function u(){r.state=hf,r.timer.stop(),delete i[e];for(var h in i)return;delete t.__transition}}function df(t,e){var r=t.__transition,i,n,s=!0,o;if(r){e=e==null?null:e+"";for(o in r){if((i=r[o]).name!==e){s=!1;continue}n=i.state>NC&&i.state<OC,i.state=hf,i.timer.stop(),i.on.call(n?"interrupt":"cancel",t,t.__data__,i.index,i.group),delete r[o]}s&&delete t.__transition}}function OH(t){return this.each(function(){df(this,t)})}function RH(t,e){var r,i;return function(){var n=Dn(this,t),s=n.tween;if(s!==r){i=r=s;for(var o=0,c=i.length;o<c;++o)if(i[o].name===e){i=i.slice(),i.splice(o,1);break}}n.tween=i}}function DH(t,e,r){var i,n;if(typeof r!="function")throw new Error;return function(){var s=Dn(this,t),o=s.tween;if(o!==i){n=(i=o).slice();for(var c={name:e,value:r},u=0,h=n.length;u<h;++u)if(n[u].name===e){n[u]=c;break}u===h&&n.push(c)}s.tween=n}}function FH(t,e){var r=this._id;if(t+="",arguments.length<2){for(var i=dn(this.node(),r).tween,n=0,s=i.length,o;n<s;++n)if((o=i[n]).name===t)return o.value;return null}return this.each((e==null?RH:DH)(r,t,e))}function Z2(t,e,r){var i=t._id;return t.each(function(){var n=Dn(this,i);(n.value||(n.value={}))[e]=r.apply(this,arguments)}),function(n){return dn(n,i).value[e]}}function IO(t,e){var r;return(typeof e=="number"?An:e instanceof Zs?Bf:(r=Zs(e))?(e=r,Bf):LO)(t,e)}function IH(t){return function(){this.removeAttribute(t)}}function qH(t){return function(){this.removeAttributeNS(t.space,t.local)}}function zH(t,e,r){var i,n=r+"",s;return function(){var o=this.getAttribute(t);return o===n?null:o===i?s:s=e(i=o,r)}}function jH(t,e,r){var i,n=r+"",s;return function(){var o=this.getAttributeNS(t.space,t.local);return o===n?null:o===i?s:s=e(i=o,r)}}function $H(t,e,r){var i,n,s;return function(){var o,c=r(this),u;return c==null?void this.removeAttribute(t):(o=this.getAttribute(t),u=c+"",o===u?null:o===i&&u===n?s:(n=u,s=e(i=o,c)))}}function PH(t,e,r){var i,n,s;return function(){var o,c=r(this),u;return c==null?void this.removeAttributeNS(t.space,t.local):(o=this.getAttributeNS(t.space,t.local),u=c+"",o===u?null:o===i&&u===n?s:(n=u,s=e(i=o,c)))}}function HH(t,e){var r=fp(t),i=r==="transform"?wH:IO;return this.attrTween(t,typeof e=="function"?(r.local?PH:$H)(r,i,Z2(this,"attr."+t,e)):e==null?(r.local?qH:IH)(r):(r.local?jH:zH)(r,i,e))}function UH(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}function GH(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}function YH(t,e){var r,i;function n(){var s=e.apply(this,arguments);return s!==i&&(r=(i=s)&&GH(t,s)),r}return n._value=e,n}function VH(t,e){var r,i;function n(){var s=e.apply(this,arguments);return s!==i&&(r=(i=s)&&UH(t,s)),r}return n._value=e,n}function WH(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;var i=fp(t);return this.tween(r,(i.local?YH:VH)(i,e))}function XH(t,e){return function(){Q2(this,t).delay=+e.apply(this,arguments)}}function QH(t,e){return e=+e,function(){Q2(this,t).delay=e}}function ZH(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?XH:QH)(e,t)):dn(this.node(),e).delay}function KH(t,e){return function(){Dn(this,t).duration=+e.apply(this,arguments)}}function JH(t,e){return e=+e,function(){Dn(this,t).duration=e}}function tU(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?KH:JH)(e,t)):dn(this.node(),e).duration}function eU(t,e){if(typeof e!="function")throw new Error;return function(){Dn(this,t).ease=e}}function rU(t){var e=this._id;return arguments.length?this.each(eU(e,t)):dn(this.node(),e).ease}function iU(t,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;Dn(this,t).ease=r}}function nU(t){if(typeof t!="function")throw new Error;return this.each(iU(this._id,t))}function aU(t){typeof t!="function"&&(t=fO(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n<r;++n)for(var s=e[n],o=s.length,c=i[n]=[],u,h=0;h<o;++h)(u=s[h])&&t.call(u,u.__data__,h,s)&&c.push(u);return new da(i,this._parents,this._name,this._id)}function sU(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,i=e.length,n=r.length,s=Math.min(i,n),o=new Array(i),c=0;c<s;++c)for(var u=e[c],h=r[c],d=u.length,p=o[c]=new Array(d),m,g=0;g<d;++g)(m=u[g]||h[g])&&(p[g]=m);for(;c<i;++c)o[c]=e[c];return new da(o,this._parents,this._name,this._id)}function oU(t){return(t+"").trim().split(/^|\s+/).every(function(e){var r=e.indexOf(".");return r>=0&&(e=e.slice(0,r)),!e||e==="start"})}function lU(t,e,r){var i,n,s=oU(e)?Q2:Dn;return function(){var o=s(this,t),c=o.on;c!==i&&(n=(i=c).copy()).on(e,r),o.on=n}}function cU(t,e){var r=this._id;return arguments.length<2?dn(this.node(),r).on.on(t):this.each(lU(r,t,e))}function uU(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function hU(){return this.on("end.remove",uU(this._id))}function dU(t){var e=this._name,r=this._id;typeof t!="function"&&(t=Y2(t));for(var i=this._groups,n=i.length,s=new Array(n),o=0;o<n;++o)for(var c=i[o],u=c.length,h=s[o]=new Array(u),d,p,m=0;m<u;++m)(d=c[m])&&(p=t.call(d,d.__data__,m,c))&&("__data__"in d&&(p.__data__=d.__data__),h[m]=p,mp(h[m],e,r,m,h,dn(d,r)));return new da(s,this._parents,e,r)}function fU(t){var e=this._name,r=this._id;typeof t!="function"&&(t=dO(t));for(var i=this._groups,n=i.length,s=[],o=[],c=0;c<n;++c)for(var u=i[c],h=u.length,d,p=0;p<h;++p)if(d=u[p]){for(var m=t.call(d,d.__data__,p,u),g,x=dn(d,r),v=0,b=m.length;v<b;++v)(g=m[v])&&mp(g,e,r,v,m,x);s.push(m),o.push(d)}return new da(s,o,e,r)}var pU=nh.prototype.constructor;function gU(){return new pU(this._groups,this._parents)}function mU(t,e){var r,i,n;return function(){var s=Dl(this,t),o=(this.style.removeProperty(t),Dl(this,t));return s===o?null:s===r&&o===i?n:n=e(r=s,i=o)}}function qO(t){return function(){this.style.removeProperty(t)}}function yU(t,e,r){var i,n=r+"",s;return function(){var o=Dl(this,t);return o===n?null:o===i?s:s=e(i=o,r)}}function xU(t,e,r){var i,n,s;return function(){var o=Dl(this,t),c=r(this),u=c+"";return c==null&&(u=c=(this.style.removeProperty(t),Dl(this,t))),o===u?null:o===i&&u===n?s:(n=u,s=e(i=o,c))}}function bU(t,e){var r,i,n,s="style."+e,o="end."+s,c;return function(){var u=Dn(this,t),h=u.on,d=u.value[s]==null?c||(c=qO(e)):void 0;(h!==r||n!==d)&&(i=(r=h).copy()).on(o,n=d),u.on=i}}function vU(t,e,r){var i=(t+="")=="transform"?CH:IO;return e==null?this.styleTween(t,mU(t,i)).on("end.style."+t,qO(t)):typeof e=="function"?this.styleTween(t,xU(t,i,Z2(this,"style."+t,e))).each(bU(this._id,t)):this.styleTween(t,yU(t,i,e),r).on("end.style."+t,null)}function CU(t,e,r){return function(i){this.style.setProperty(t,e.call(this,i),r)}}function wU(t,e,r){var i,n;function s(){var o=e.apply(this,arguments);return o!==n&&(i=(n=o)&&CU(t,o,r)),i}return s._value=e,s}function SU(t,e,r){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!="function")throw new Error;return this.tween(i,wU(t,e,r??""))}function kU(t){return function(){this.textContent=t}}function _U(t){return function(){var e=t(this);this.textContent=e??""}}function TU(t){return this.tween("text",typeof t=="function"?_U(Z2(this,"text",t)):kU(t==null?"":t+""))}function EU(t){return function(e){this.textContent=t.call(this,e)}}function AU(t){var e,r;function i(){var n=t.apply(this,arguments);return n!==r&&(e=(r=n)&&EU(n)),e}return i._value=t,i}function BU(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,AU(t))}function LU(){for(var t=this._name,e=this._id,r=zO(),i=this._groups,n=i.length,s=0;s<n;++s)for(var o=i[s],c=o.length,u,h=0;h<c;++h)if(u=o[h]){var d=dn(u,e);mp(u,t,r,h,o,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new da(i,this._parents,t,r)}function MU(){var t,e,r=this,i=r._id,n=r.size();return new Promise(function(s,o){var c={value:o},u={value:function(){--n===0&&s()}};r.each(function(){var h=Dn(this,i),d=h.on;d!==t&&(e=(t=d).copy(),e._.cancel.push(c),e._.interrupt.push(c),e._.end.push(u)),h.on=e}),n===0&&s()})}var NU=0;function da(t,e,r,i){this._groups=t,this._parents=e,this._name=r,this._id=i}function zO(){return++NU}var aa=nh.prototype;da.prototype={constructor:da,select:dU,selectAll:fU,selectChild:aa.selectChild,selectChildren:aa.selectChildren,filter:aU,merge:sU,selection:gU,transition:LU,call:aa.call,nodes:aa.nodes,node:aa.node,size:aa.size,empty:aa.empty,each:aa.each,on:cU,attr:HH,attrTween:WH,style:vU,styleTween:SU,text:TU,textTween:BU,remove:hU,tween:FH,delay:ZH,duration:tU,ease:rU,easeVarying:nU,end:MU,[Symbol.iterator]:aa[Symbol.iterator]};function OU(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var RU={time:null,delay:0,duration:250,ease:OU};function DU(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}function FU(t){var e,r;t instanceof da?(e=t._id,t=t._name):(e=zO(),(r=RU).time=X2(),t=t==null?null:t+"");for(var i=this._groups,n=i.length,s=0;s<n;++s)for(var o=i[s],c=o.length,u,h=0;h<c;++h)(u=o[h])&&mp(u,t,e,h,o,r||DU(u,e));return new da(i,this._parents,t,e)}nh.prototype.interrupt=OH;nh.prototype.transition=FU;const Pd=t=>()=>t;function IU(t,{sourceEvent:e,target:r,transform:i,dispatch:n}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:n}})}function ca(t,e,r){this.k=t,this.x=e,this.y=r}ca.prototype={constructor:ca,scale:function(t){return t===1?this:new ca(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new ca(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var yp=new ca(1,0,0);jO.prototype=ca.prototype;function jO(t){for(;!t.__zoom;)if(!(t=t.parentNode))return yp;return t.__zoom}function w0(t){t.stopImmediatePropagation()}function Jc(t){t.preventDefault(),t.stopImmediatePropagation()}function qU(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function zU(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function YE(){return this.__zoom||yp}function jU(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function $U(){return navigator.maxTouchPoints||"ontouchstart"in this}function PU(t,e,r){var i=t.invertX(e[0][0])-r[0][0],n=t.invertX(e[1][0])-r[1][0],s=t.invertY(e[0][1])-r[0][1],o=t.invertY(e[1][1])-r[1][1];return t.translate(n>i?(i+n)/2:Math.min(0,i)||Math.max(0,n),o>s?(s+o)/2:Math.min(0,s)||Math.max(0,o))}function $O(){var t=qU,e=zU,r=PU,i=jU,n=$U,s=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],c=250,u=cf,h=dp("start","zoom","end"),d,p,m,g=500,x=150,v=0,b=10;function w(M){M.property("__zoom",YE).on("wheel.zoom",j,{passive:!1}).on("mousedown.zoom",Y).on("dblclick.zoom",V).filter(n).on("touchstart.zoom",O).on("touchmove.zoom",z).on("touchend.zoom touchcancel.zoom",X).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}w.transform=function(M,I,N,P){var $=M.selection?M.selection():M;$.property("__zoom",YE),M!==$?L(M,I,N,P):$.interrupt().each(function(){A(this,arguments).event(P).start().zoom(null,typeof I=="function"?I.apply(this,arguments):I).end()})},w.scaleBy=function(M,I,N,P){w.scaleTo(M,function(){var $=this.__zoom.k,D=typeof I=="function"?I.apply(this,arguments):I;return $*D},N,P)},w.scaleTo=function(M,I,N,P){w.transform(M,function(){var $=e.apply(this,arguments),D=this.__zoom,q=N==null?E($):typeof N=="function"?N.apply(this,arguments):N,G=D.invert(q),Z=typeof I=="function"?I.apply(this,arguments):I;return r(k(T(D,Z),q,G),$,o)},N,P)},w.translateBy=function(M,I,N,P){w.transform(M,function(){return r(this.__zoom.translate(typeof I=="function"?I.apply(this,arguments):I,typeof N=="function"?N.apply(this,arguments):N),e.apply(this,arguments),o)},null,P)},w.translateTo=function(M,I,N,P,$){w.transform(M,function(){var D=e.apply(this,arguments),q=this.__zoom,G=P==null?E(D):typeof P=="function"?P.apply(this,arguments):P;return r(yp.translate(G[0],G[1]).scale(q.k).translate(typeof I=="function"?-I.apply(this,arguments):-I,typeof N=="function"?-N.apply(this,arguments):-N),D,o)},P,$)};function T(M,I){return I=Math.max(s[0],Math.min(s[1],I)),I===M.k?M:new ca(I,M.x,M.y)}function k(M,I,N){var P=I[0]-N[0]*M.k,$=I[1]-N[1]*M.k;return P===M.x&&$===M.y?M:new ca(M.k,P,$)}function E(M){return[(+M[0][0]+ +M[1][0])/2,(+M[0][1]+ +M[1][1])/2]}function L(M,I,N,P){M.on("start.zoom",function(){A(this,arguments).event(P).start()}).on("interrupt.zoom end.zoom",function(){A(this,arguments).event(P).end()}).tween("zoom",function(){var $=this,D=arguments,q=A($,D).event(P),G=e.apply($,D),Z=N==null?E(G):typeof N=="function"?N.apply($,D):N,H=Math.max(G[1][0]-G[0][0],G[1][1]-G[0][1]),Q=$.__zoom,J=typeof I=="function"?I.apply($,D):I,et=u(Q.invert(Z).concat(H/Q.k),J.invert(Z).concat(H/J.k));return function(at){if(at===1)at=J;else{var lt=et(at),xt=H/lt[2];at=new ca(xt,Z[0]-lt[0]*xt,Z[1]-lt[1]*xt)}q.zoom(null,at)}})}function A(M,I,N){return!N&&M.__zooming||new R(M,I)}function R(M,I){this.that=M,this.args=I,this.active=0,this.sourceEvent=null,this.extent=e.apply(M,I),this.taps=0}R.prototype={event:function(M){return M&&(this.sourceEvent=M),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(M,I){return this.mouse&&M!=="mouse"&&(this.mouse[1]=I.invert(this.mouse[0])),this.touch0&&M!=="touch"&&(this.touch0[1]=I.invert(this.touch0[0])),this.touch1&&M!=="touch"&&(this.touch1[1]=I.invert(this.touch1[0])),this.that.__zoom=I,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(M){var I=Xt(this.that).datum();h.call(M,this.that,new IU(M,{sourceEvent:this.sourceEvent,target:w,transform:this.that.__zoom,dispatch:h}),I)}};function j(M,...I){if(!t.apply(this,arguments))return;var N=A(this,I).event(M),P=this.__zoom,$=Math.max(s[0],Math.min(s[1],P.k*Math.pow(2,i.apply(this,arguments)))),D=Ji(M);if(N.wheel)(N.mouse[0][0]!==D[0]||N.mouse[0][1]!==D[1])&&(N.mouse[1]=P.invert(N.mouse[0]=D)),clearTimeout(N.wheel);else{if(P.k===$)return;N.mouse=[D,P.invert(D)],df(this),N.start()}Jc(M),N.wheel=setTimeout(q,x),N.zoom("mouse",r(k(T(P,$),N.mouse[0],N.mouse[1]),N.extent,o));function q(){N.wheel=null,N.end()}}function Y(M,...I){if(m||!t.apply(this,arguments))return;var N=M.currentTarget,P=A(this,I,!0).event(M),$=Xt(M.view).on("mousemove.zoom",Z,!0).on("mouseup.zoom",H,!0),D=Ji(M,N),q=M.clientX,G=M.clientY;SO(M.view),w0(M),P.mouse=[D,this.__zoom.invert(D)],df(this),P.start();function Z(Q){if(Jc(Q),!P.moved){var J=Q.clientX-q,et=Q.clientY-G;P.moved=J*J+et*et>v}P.event(Q).zoom("mouse",r(k(P.that.__zoom,P.mouse[0]=Ji(Q,N),P.mouse[1]),P.extent,o))}function H(Q){$.on("mousemove.zoom mouseup.zoom",null),kO(Q.view,P.moved),Jc(Q),P.event(Q).end()}}function V(M,...I){if(t.apply(this,arguments)){var N=this.__zoom,P=Ji(M.changedTouches?M.changedTouches[0]:M,this),$=N.invert(P),D=N.k*(M.shiftKey?.5:2),q=r(k(T(N,D),P,$),e.apply(this,I),o);Jc(M),c>0?Xt(this).transition().duration(c).call(L,q,P,M):Xt(this).call(w.transform,q,P,M)}}function O(M,...I){if(t.apply(this,arguments)){var N=M.touches,P=N.length,$=A(this,I,M.changedTouches.length===P).event(M),D,q,G,Z;for(w0(M),q=0;q<P;++q)G=N[q],Z=Ji(G,this),Z=[Z,this.__zoom.invert(Z),G.identifier],$.touch0?!$.touch1&&$.touch0[2]!==Z[2]&&($.touch1=Z,$.taps=0):($.touch0=Z,D=!0,$.taps=1+!!d);d&&(d=clearTimeout(d)),D&&($.taps<2&&(p=Z[0],d=setTimeout(function(){d=null},g)),df(this),$.start())}}function z(M,...I){if(this.__zooming){var N=A(this,I).event(M),P=M.changedTouches,$=P.length,D,q,G,Z;for(Jc(M),D=0;D<$;++D)q=P[D],G=Ji(q,this),N.touch0&&N.touch0[2]===q.identifier?N.touch0[0]=G:N.touch1&&N.touch1[2]===q.identifier&&(N.touch1[0]=G);if(q=N.that.__zoom,N.touch1){var H=N.touch0[0],Q=N.touch0[1],J=N.touch1[0],et=N.touch1[1],at=(at=J[0]-H[0])*at+(at=J[1]-H[1])*at,lt=(lt=et[0]-Q[0])*lt+(lt=et[1]-Q[1])*lt;q=T(q,Math.sqrt(at/lt)),G=[(H[0]+J[0])/2,(H[1]+J[1])/2],Z=[(Q[0]+et[0])/2,(Q[1]+et[1])/2]}else if(N.touch0)G=N.touch0[0],Z=N.touch0[1];else return;N.zoom("touch",r(k(q,G,Z),N.extent,o))}}function X(M,...I){if(this.__zooming){var N=A(this,I).event(M),P=M.changedTouches,$=P.length,D,q;for(w0(M),m&&clearTimeout(m),m=setTimeout(function(){m=null},g),D=0;D<$;++D)q=P[D],N.touch0&&N.touch0[2]===q.identifier?delete N.touch0:N.touch1&&N.touch1[2]===q.identifier&&delete N.touch1;if(N.touch1&&!N.touch0&&(N.touch0=N.touch1,delete N.touch1),N.touch0)N.touch0[1]=this.__zoom.invert(N.touch0[0]);else if(N.end(),N.taps===2&&(q=Ji(q,this),Math.hypot(p[0]-q[0],p[1]-q[1])<b)){var G=Xt(this).on("dblclick.zoom");G&&G.apply(this,arguments)}}}return w.wheelDelta=function(M){return arguments.length?(i=typeof M=="function"?M:Pd(+M),w):i},w.filter=function(M){return arguments.length?(t=typeof M=="function"?M:Pd(!!M),w):t},w.touchable=function(M){return arguments.length?(n=typeof M=="function"?M:Pd(!!M),w):n},w.extent=function(M){return arguments.length?(e=typeof M=="function"?M:Pd([[+M[0][0],+M[0][1]],[+M[1][0],+M[1][1]]]),w):e},w.scaleExtent=function(M){return arguments.length?(s[0]=+M[0],s[1]=+M[1],w):[s[0],s[1]]},w.translateExtent=function(M){return arguments.length?(o[0][0]=+M[0][0],o[1][0]=+M[1][0],o[0][1]=+M[0][1],o[1][1]=+M[1][1],w):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},w.constrain=function(M){return arguments.length?(r=M,w):r},w.duration=function(M){return arguments.length?(c=+M,w):c},w.interpolate=function(M){return arguments.length?(u=M,w):u},w.on=function(){var M=h.on.apply(h,arguments);return M===h?w:M},w.clickDistance=function(M){return arguments.length?(v=(M=+M)*M,w):Math.sqrt(v)},w.tapDistance=function(M){return arguments.length?(b=+M,w):b},w}const Mn={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:t=>`Node type "${t}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:t=>`The old edge with id=${t} does not exist.`,error009:t=>`Marker type "${t}" doesn't exist.`,error008:(t,{id:e,sourceHandle:r,targetHandle:i})=>`Couldn't create edge for ${t} handle id: "${t==="source"?r:i}", edge id: ${e}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:t=>`Edge type "${t}" not found. Using fallback type "default".`,error012:t=>`Node with id "${t}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(t="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${t}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},$u=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],PO=["Enter"," ","Escape"],HO={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:t,x:e,y:r})=>`Moved selected node ${t}. New position, x: ${e}, y: ${r}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Il;(function(t){t.Strict="strict",t.Loose="loose"})(Il||(Il={}));var Xs;(function(t){t.Free="free",t.Vertical="vertical",t.Horizontal="horizontal"})(Xs||(Xs={}));var Pu;(function(t){t.Partial="partial",t.Full="full"})(Pu||(Pu={}));const UO={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var Za;(function(t){t.Bezier="default",t.Straight="straight",t.Step="step",t.SmoothStep="smoothstep",t.SimpleBezier="simplebezier"})(Za||(Za={}));var Hu;(function(t){t.Arrow="arrow",t.ArrowClosed="arrowclosed"})(Hu||(Hu={}));var Gt;(function(t){t.Left="left",t.Top="top",t.Right="right",t.Bottom="bottom"})(Gt||(Gt={}));const VE={[Gt.Left]:Gt.Right,[Gt.Right]:Gt.Left,[Gt.Top]:Gt.Bottom,[Gt.Bottom]:Gt.Top};function GO(t){return t===null?null:t?"valid":"invalid"}const YO=t=>"id"in t&&"source"in t&&"target"in t,HU=t=>"id"in t&&"position"in t&&!("source"in t)&&!("target"in t),K2=t=>"id"in t&&"internals"in t&&!("source"in t)&&!("target"in t),sh=(t,e=[0,0])=>{const{width:r,height:i}=pa(t),n=t.origin??e,s=r*n[0],o=i*n[1];return{x:t.position.x-s,y:t.position.y-o}},UU=(t,e={nodeOrigin:[0,0]})=>{if(t.length===0)return{x:0,y:0,width:0,height:0};const r=t.reduce((i,n)=>{const s=typeof n=="string";let o=!e.nodeLookup&&!s?n:void 0;e.nodeLookup&&(o=s?e.nodeLookup.get(n):K2(n)?n:e.nodeLookup.get(n.id));const c=o?Of(o,e.nodeOrigin):{x:0,y:0,x2:0,y2:0};return xp(i,c)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return bp(r)},oh=(t,e={})=>{let r={x:1/0,y:1/0,x2:-1/0,y2:-1/0},i=!1;return t.forEach(n=>{(e.filter===void 0||e.filter(n))&&(r=xp(r,Of(n)),i=!0)}),i?bp(r):{x:0,y:0,width:0,height:0}},J2=(t,e,[r,i,n]=[0,0,1],s=!1,o=!1)=>{const c={...ch(e,[r,i,n]),width:e.width/n,height:e.height/n},u=[];for(const h of t.values()){const{measured:d,selectable:p=!0,hidden:m=!1}=h;if(o&&!p||m)continue;const g=d.width??h.width??h.initialWidth??null,x=d.height??h.height??h.initialHeight??null,v=Uu(c,zl(h)),b=(g??0)*(x??0),w=s&&v>0;(!h.internals.handleBounds||w||v>=b||h.dragging)&&u.push(h)}return u},GU=(t,e)=>{const r=new Set;return t.forEach(i=>{r.add(i.id)}),e.filter(i=>r.has(i.source)||r.has(i.target))};function YU(t,e){const r=new Map,i=e!=null&&e.nodes?new Set(e.nodes.map(n=>n.id)):null;return t.forEach(n=>{n.measured.width&&n.measured.height&&((e==null?void 0:e.includeHiddenNodes)||!n.hidden)&&(!i||i.has(n.id))&&r.set(n.id,n)}),r}async function VU({nodes:t,width:e,height:r,panZoom:i,minZoom:n,maxZoom:s},o){if(t.size===0)return Promise.resolve(!0);const c=YU(t,o),u=oh(c),h=tw(u,e,r,(o==null?void 0:o.minZoom)??n,(o==null?void 0:o.maxZoom)??s,(o==null?void 0:o.padding)??.1);return await i.setViewport(h,{duration:o==null?void 0:o.duration,ease:o==null?void 0:o.ease,interpolate:o==null?void 0:o.interpolate}),Promise.resolve(!0)}function VO({nodeId:t,nextPosition:e,nodeLookup:r,nodeOrigin:i=[0,0],nodeExtent:n,onError:s}){const o=r.get(t),c=o.parentId?r.get(o.parentId):void 0,{x:u,y:h}=c?c.internals.positionAbsolute:{x:0,y:0},d=o.origin??i;let p=o.extent||n;if(o.extent==="parent"&&!o.expandParent)if(!c)s==null||s("005",Mn.error005());else{const g=c.measured.width,x=c.measured.height;g&&x&&(p=[[u,h],[u+g,h+x]])}else c&&jl(o.extent)&&(p=[[o.extent[0][0]+u,o.extent[0][1]+h],[o.extent[1][0]+u,o.extent[1][1]+h]]);const m=jl(p)?Js(e,p,o.measured):e;return(o.measured.width===void 0||o.measured.height===void 0)&&(s==null||s("015",Mn.error015())),{position:{x:m.x-u+(o.measured.width??0)*d[0],y:m.y-h+(o.measured.height??0)*d[1]},positionAbsolute:m}}async function WU({nodesToRemove:t=[],edgesToRemove:e=[],nodes:r,edges:i,onBeforeDelete:n}){const s=new Set(t.map(m=>m.id)),o=[];for(const m of r){if(m.deletable===!1)continue;const g=s.has(m.id),x=!g&&m.parentId&&o.find(v=>v.id===m.parentId);(g||x)&&o.push(m)}const c=new Set(e.map(m=>m.id)),u=i.filter(m=>m.deletable!==!1),d=GU(o,u);for(const m of u)c.has(m.id)&&!d.find(x=>x.id===m.id)&&d.push(m);if(!n)return{edges:d,nodes:o};const p=await n({nodes:o,edges:d});return typeof p=="boolean"?p?{edges:d,nodes:o}:{edges:[],nodes:[]}:p}const ql=(t,e=0,r=1)=>Math.min(Math.max(t,e),r),Js=(t={x:0,y:0},e,r)=>({x:ql(t.x,e[0][0],e[1][0]-((r==null?void 0:r.width)??0)),y:ql(t.y,e[0][1],e[1][1]-((r==null?void 0:r.height)??0))});function WO(t,e,r){const{width:i,height:n}=pa(r),{x:s,y:o}=r.internals.positionAbsolute;return Js(t,[[s,o],[s+i,o+n]],e)}const WE=(t,e,r)=>t<e?ql(Math.abs(t-e),1,e)/e:t>r?-ql(Math.abs(t-r),1,e)/e:0,XO=(t,e,r=15,i=40)=>{const n=WE(t.x,i,e.width-i)*r,s=WE(t.y,i,e.height-i)*r;return[n,s]},xp=(t,e)=>({x:Math.min(t.x,e.x),y:Math.min(t.y,e.y),x2:Math.max(t.x2,e.x2),y2:Math.max(t.y2,e.y2)}),RC=({x:t,y:e,width:r,height:i})=>({x:t,y:e,x2:t+r,y2:e+i}),bp=({x:t,y:e,x2:r,y2:i})=>({x:t,y:e,width:r-t,height:i-e}),zl=(t,e=[0,0])=>{var n,s;const{x:r,y:i}=K2(t)?t.internals.positionAbsolute:sh(t,e);return{x:r,y:i,width:((n=t.measured)==null?void 0:n.width)??t.width??t.initialWidth??0,height:((s=t.measured)==null?void 0:s.height)??t.height??t.initialHeight??0}},Of=(t,e=[0,0])=>{var n,s;const{x:r,y:i}=K2(t)?t.internals.positionAbsolute:sh(t,e);return{x:r,y:i,x2:r+(((n=t.measured)==null?void 0:n.width)??t.width??t.initialWidth??0),y2:i+(((s=t.measured)==null?void 0:s.height)??t.height??t.initialHeight??0)}},QO=(t,e)=>bp(xp(RC(t),RC(e))),Uu=(t,e)=>{const r=Math.max(0,Math.min(t.x+t.width,e.x+e.width)-Math.max(t.x,e.x)),i=Math.max(0,Math.min(t.y+t.height,e.y+e.height)-Math.max(t.y,e.y));return Math.ceil(r*i)},XE=t=>sn(t.width)&&sn(t.height)&&sn(t.x)&&sn(t.y),sn=t=>!isNaN(t)&&isFinite(t),XU=(t,e)=>{},lh=(t,e=[1,1])=>({x:e[0]*Math.round(t.x/e[0]),y:e[1]*Math.round(t.y/e[1])}),ch=({x:t,y:e},[r,i,n],s=!1,o=[1,1])=>{const c={x:(t-r)/n,y:(e-i)/n};return s?lh(c,o):c},Rf=({x:t,y:e},[r,i,n])=>({x:t*n+r,y:e*n+i});function Ko(t,e){if(typeof t=="number")return Math.floor((e-e/(1+t))*.5);if(typeof t=="string"&&t.endsWith("px")){const r=parseFloat(t);if(!Number.isNaN(r))return Math.floor(r)}if(typeof t=="string"&&t.endsWith("%")){const r=parseFloat(t);if(!Number.isNaN(r))return Math.floor(e*r*.01)}return console.error(`[React Flow] The padding value "${t}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function QU(t,e,r){if(typeof t=="string"||typeof t=="number"){const i=Ko(t,r),n=Ko(t,e);return{top:i,right:n,bottom:i,left:n,x:n*2,y:i*2}}if(typeof t=="object"){const i=Ko(t.top??t.y??0,r),n=Ko(t.bottom??t.y??0,r),s=Ko(t.left??t.x??0,e),o=Ko(t.right??t.x??0,e);return{top:i,right:o,bottom:n,left:s,x:s+o,y:i+n}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function ZU(t,e,r,i,n,s){const{x:o,y:c}=Rf(t,[e,r,i]),{x:u,y:h}=Rf({x:t.x+t.width,y:t.y+t.height},[e,r,i]),d=n-u,p=s-h;return{left:Math.floor(o),top:Math.floor(c),right:Math.floor(d),bottom:Math.floor(p)}}const tw=(t,e,r,i,n,s)=>{const o=QU(s,e,r),c=(e-o.x)/t.width,u=(r-o.y)/t.height,h=Math.min(c,u),d=ql(h,i,n),p=t.x+t.width/2,m=t.y+t.height/2,g=e/2-p*d,x=r/2-m*d,v=ZU(t,g,x,d,e,r),b={left:Math.min(v.left-o.left,0),top:Math.min(v.top-o.top,0),right:Math.min(v.right-o.right,0),bottom:Math.min(v.bottom-o.bottom,0)};return{x:g-b.left+b.right,y:x-b.top+b.bottom,zoom:d}},Gu=()=>{var t;return typeof navigator<"u"&&((t=navigator==null?void 0:navigator.userAgent)==null?void 0:t.indexOf("Mac"))>=0};function jl(t){return t!=null&&t!=="parent"}function pa(t){var e,r;return{width:((e=t.measured)==null?void 0:e.width)??t.width??t.initialWidth??0,height:((r=t.measured)==null?void 0:r.height)??t.height??t.initialHeight??0}}function ZO(t){var e,r;return(((e=t.measured)==null?void 0:e.width)??t.width??t.initialWidth)!==void 0&&(((r=t.measured)==null?void 0:r.height)??t.height??t.initialHeight)!==void 0}function KO(t,e={width:0,height:0},r,i,n){const s={...t},o=i.get(r);if(o){const c=o.origin||n;s.x+=o.internals.positionAbsolute.x-(e.width??0)*c[0],s.y+=o.internals.positionAbsolute.y-(e.height??0)*c[1]}return s}function QE(t,e){if(t.size!==e.size)return!1;for(const r of t)if(!e.has(r))return!1;return!0}function KU(){let t,e;return{promise:new Promise((i,n)=>{t=i,e=n}),resolve:t,reject:e}}function JU(t){return{...HO,...t||{}}}function Tu(t,{snapGrid:e=[0,0],snapToGrid:r=!1,transform:i,containerBounds:n}){const{x:s,y:o}=on(t),c=ch({x:s-((n==null?void 0:n.left)??0),y:o-((n==null?void 0:n.top)??0)},i),{x:u,y:h}=r?lh(c,e):c;return{xSnapped:u,ySnapped:h,...c}}const ew=t=>({width:t.offsetWidth,height:t.offsetHeight}),JO=t=>{var e;return((e=t==null?void 0:t.getRootNode)==null?void 0:e.call(t))||(window==null?void 0:window.document)},tG=["INPUT","SELECT","TEXTAREA"];function tR(t){var i,n;const e=((n=(i=t.composedPath)==null?void 0:i.call(t))==null?void 0:n[0])||t.target;return(e==null?void 0:e.nodeType)!==1?!1:tG.includes(e.nodeName)||e.hasAttribute("contenteditable")||!!e.closest(".nokey")}const eR=t=>"clientX"in t,on=(t,e)=>{var s,o;const r=eR(t),i=r?t.clientX:(s=t.touches)==null?void 0:s[0].clientX,n=r?t.clientY:(o=t.touches)==null?void 0:o[0].clientY;return{x:i-((e==null?void 0:e.left)??0),y:n-((e==null?void 0:e.top)??0)}},ZE=(t,e,r,i,n)=>{const s=e.querySelectorAll(`.${t}`);return!s||!s.length?null:Array.from(s).map(o=>{const c=o.getBoundingClientRect();return{id:o.getAttribute("data-handleid"),type:t,nodeId:n,position:o.getAttribute("data-handlepos"),x:(c.left-r.left)/i,y:(c.top-r.top)/i,...ew(o)}})};function rR({sourceX:t,sourceY:e,targetX:r,targetY:i,sourceControlX:n,sourceControlY:s,targetControlX:o,targetControlY:c}){const u=t*.125+n*.375+o*.375+r*.125,h=e*.125+s*.375+c*.375+i*.125,d=Math.abs(u-t),p=Math.abs(h-e);return[u,h,d,p]}function Hd(t,e){return t>=0?.5*t:e*25*Math.sqrt(-t)}function KE({pos:t,x1:e,y1:r,x2:i,y2:n,c:s}){switch(t){case Gt.Left:return[e-Hd(e-i,s),r];case Gt.Right:return[e+Hd(i-e,s),r];case Gt.Top:return[e,r-Hd(r-n,s)];case Gt.Bottom:return[e,r+Hd(n-r,s)]}}function iR({sourceX:t,sourceY:e,sourcePosition:r=Gt.Bottom,targetX:i,targetY:n,targetPosition:s=Gt.Top,curvature:o=.25}){const[c,u]=KE({pos:r,x1:t,y1:e,x2:i,y2:n,c:o}),[h,d]=KE({pos:s,x1:i,y1:n,x2:t,y2:e,c:o}),[p,m,g,x]=rR({sourceX:t,sourceY:e,targetX:i,targetY:n,sourceControlX:c,sourceControlY:u,targetControlX:h,targetControlY:d});return[`M${t},${e} C${c},${u} ${h},${d} ${i},${n}`,p,m,g,x]}function nR({sourceX:t,sourceY:e,targetX:r,targetY:i}){const n=Math.abs(r-t)/2,s=r<t?r+n:r-n,o=Math.abs(i-e)/2,c=i<e?i+o:i-o;return[s,c,n,o]}function eG({sourceNode:t,targetNode:e,selected:r=!1,zIndex:i=0,elevateOnSelect:n=!1,zIndexMode:s="basic"}){if(s==="manual")return i;const o=n&&r?i+1e3:i,c=Math.max(t.parentId||n&&t.selected?t.internals.z:0,e.parentId||n&&e.selected?e.internals.z:0);return o+c}function rG({sourceNode:t,targetNode:e,width:r,height:i,transform:n}){const s=xp(Of(t),Of(e));s.x===s.x2&&(s.x2+=1),s.y===s.y2&&(s.y2+=1);const o={x:-n[0]/n[2],y:-n[1]/n[2],width:r/n[2],height:i/n[2]};return Uu(o,bp(s))>0}const iG=({source:t,sourceHandle:e,target:r,targetHandle:i})=>`xy-edge__${t}${e||""}-${r}${i||""}`,nG=(t,e)=>e.some(r=>r.source===t.source&&r.target===t.target&&(r.sourceHandle===t.sourceHandle||!r.sourceHandle&&!t.sourceHandle)&&(r.targetHandle===t.targetHandle||!r.targetHandle&&!t.targetHandle)),aG=(t,e,r={})=>{if(!t.source||!t.target)return e;const i=r.getEdgeId||iG;let n;return YO(t)?n={...t}:n={...t,id:i(t)},nG(n,e)?e:(n.sourceHandle===null&&delete n.sourceHandle,n.targetHandle===null&&delete n.targetHandle,e.concat(n))};function aR({sourceX:t,sourceY:e,targetX:r,targetY:i}){const[n,s,o,c]=nR({sourceX:t,sourceY:e,targetX:r,targetY:i});return[`M ${t},${e}L ${r},${i}`,n,s,o,c]}const JE={[Gt.Left]:{x:-1,y:0},[Gt.Right]:{x:1,y:0},[Gt.Top]:{x:0,y:-1},[Gt.Bottom]:{x:0,y:1}},sG=({source:t,sourcePosition:e=Gt.Bottom,target:r})=>e===Gt.Left||e===Gt.Right?t.x<r.x?{x:1,y:0}:{x:-1,y:0}:t.y<r.y?{x:0,y:1}:{x:0,y:-1},tA=(t,e)=>Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2));function oG({source:t,sourcePosition:e=Gt.Bottom,target:r,targetPosition:i=Gt.Top,center:n,offset:s,stepPosition:o}){const c=JE[e],u=JE[i],h={x:t.x+c.x*s,y:t.y+c.y*s},d={x:r.x+u.x*s,y:r.y+u.y*s},p=sG({source:h,sourcePosition:e,target:d}),m=p.x!==0?"x":"y",g=p[m];let x=[],v,b;const w={x:0,y:0},T={x:0,y:0},[,,k,E]=nR({sourceX:t.x,sourceY:t.y,targetX:r.x,targetY:r.y});if(c[m]*u[m]===-1){m==="x"?(v=n.x??h.x+(d.x-h.x)*o,b=n.y??(h.y+d.y)/2):(v=n.x??(h.x+d.x)/2,b=n.y??h.y+(d.y-h.y)*o);const j=[{x:v,y:h.y},{x:v,y:d.y}],Y=[{x:h.x,y:b},{x:d.x,y:b}];c[m]===g?x=m==="x"?j:Y:x=m==="x"?Y:j}else{const j=[{x:h.x,y:d.y}],Y=[{x:d.x,y:h.y}];if(m==="x"?x=c.x===g?Y:j:x=c.y===g?j:Y,e===i){const M=Math.abs(t[m]-r[m]);if(M<=s){const I=Math.min(s-1,s-M);c[m]===g?w[m]=(h[m]>t[m]?-1:1)*I:T[m]=(d[m]>r[m]?-1:1)*I}}if(e!==i){const M=m==="x"?"y":"x",I=c[m]===u[M],N=h[M]>d[M],P=h[M]<d[M];(c[m]===1&&(!I&&N||I&&P)||c[m]!==1&&(!I&&P||I&&N))&&(x=m==="x"?j:Y)}const V={x:h.x+w.x,y:h.y+w.y},O={x:d.x+T.x,y:d.y+T.y},z=Math.max(Math.abs(V.x-x[0].x),Math.abs(O.x-x[0].x)),X=Math.max(Math.abs(V.y-x[0].y),Math.abs(O.y-x[0].y));z>=X?(v=(V.x+O.x)/2,b=x[0].y):(v=x[0].x,b=(V.y+O.y)/2)}const L={x:h.x+w.x,y:h.y+w.y},A={x:d.x+T.x,y:d.y+T.y};return[[t,...L.x!==x[0].x||L.y!==x[0].y?[L]:[],...x,...A.x!==x[x.length-1].x||A.y!==x[x.length-1].y?[A]:[],r],v,b,k,E]}function lG(t,e,r,i){const n=Math.min(tA(t,e)/2,tA(e,r)/2,i),{x:s,y:o}=e;if(t.x===s&&s===r.x||t.y===o&&o===r.y)return`L${s} ${o}`;if(t.y===o){const h=t.x<r.x?-1:1,d=t.y<r.y?1:-1;return`L ${s+n*h},${o}Q ${s},${o} ${s},${o+n*d}`}const c=t.x<r.x?1:-1,u=t.y<r.y?-1:1;return`L ${s},${o+n*u}Q ${s},${o} ${s+n*c},${o}`}function DC({sourceX:t,sourceY:e,sourcePosition:r=Gt.Bottom,targetX:i,targetY:n,targetPosition:s=Gt.Top,borderRadius:o=5,centerX:c,centerY:u,offset:h=20,stepPosition:d=.5}){const[p,m,g,x,v]=oG({source:{x:t,y:e},sourcePosition:r,target:{x:i,y:n},targetPosition:s,center:{x:c,y:u},offset:h,stepPosition:d});let b=`M${p[0].x} ${p[0].y}`;for(let w=1;w<p.length-1;w++)b+=lG(p[w-1],p[w],p[w+1],o);return b+=`L${p[p.length-1].x} ${p[p.length-1].y}`,[b,m,g,x,v]}function eA(t){var e;return t&&!!(t.internals.handleBounds||(e=t.handles)!=null&&e.length)&&!!(t.measured.width||t.width||t.initialWidth)}function cG(t){var p;const{sourceNode:e,targetNode:r}=t;if(!eA(e)||!eA(r))return null;const i=e.internals.handleBounds||rA(e.handles),n=r.internals.handleBounds||rA(r.handles),s=iA((i==null?void 0:i.source)??[],t.sourceHandle),o=iA(t.connectionMode===Il.Strict?(n==null?void 0:n.target)??[]:((n==null?void 0:n.target)??[]).concat((n==null?void 0:n.source)??[]),t.targetHandle);if(!s||!o)return(p=t.onError)==null||p.call(t,"008",Mn.error008(s?"target":"source",{id:t.id,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle})),null;const c=(s==null?void 0:s.position)||Gt.Bottom,u=(o==null?void 0:o.position)||Gt.Top,h=to(e,s,c),d=to(r,o,u);return{sourceX:h.x,sourceY:h.y,targetX:d.x,targetY:d.y,sourcePosition:c,targetPosition:u}}function rA(t){if(!t)return null;const e=[],r=[];for(const i of t)i.width=i.width??1,i.height=i.height??1,i.type==="source"?e.push(i):i.type==="target"&&r.push(i);return{source:e,target:r}}function to(t,e,r=Gt.Left,i=!1){const n=((e==null?void 0:e.x)??0)+t.internals.positionAbsolute.x,s=((e==null?void 0:e.y)??0)+t.internals.positionAbsolute.y,{width:o,height:c}=e??pa(t);if(i)return{x:n+o/2,y:s+c/2};switch((e==null?void 0:e.position)??r){case Gt.Top:return{x:n+o/2,y:s};case Gt.Right:return{x:n+o,y:s+c/2};case Gt.Bottom:return{x:n+o/2,y:s+c};case Gt.Left:return{x:n,y:s+c/2}}}function iA(t,e){return t&&(e?t.find(r=>r.id===e):t[0])||null}function FC(t,e){return t?typeof t=="string"?t:`${e?`${e}__`:""}${Object.keys(t).sort().map(i=>`${i}=${t[i]}`).join("&")}`:""}function uG(t,{id:e,defaultColor:r,defaultMarkerStart:i,defaultMarkerEnd:n}){const s=new Set;return t.reduce((o,c)=>([c.markerStart||i,c.markerEnd||n].forEach(u=>{if(u&&typeof u=="object"){const h=FC(u,e);s.has(h)||(o.push({id:h,color:u.color||r,...u}),s.add(h))}}),o),[]).sort((o,c)=>o.id.localeCompare(c.id))}const sR=1e3,hG=10,rw={nodeOrigin:[0,0],nodeExtent:$u,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},dG={...rw,checkEquality:!0};function iw(t,e){const r={...t};for(const i in e)e[i]!==void 0&&(r[i]=e[i]);return r}function fG(t,e,r){const i=iw(rw,r);for(const n of t.values())if(n.parentId)aw(n,t,e,i);else{const s=sh(n,i.nodeOrigin),o=jl(n.extent)?n.extent:i.nodeExtent,c=Js(s,o,pa(n));n.internals.positionAbsolute=c}}function pG(t,e){if(!t.handles)return t.measured?e==null?void 0:e.internals.handleBounds:void 0;const r=[],i=[];for(const n of t.handles){const s={id:n.id,width:n.width??1,height:n.height??1,nodeId:t.id,x:n.x,y:n.y,position:n.position,type:n.type};n.type==="source"?r.push(s):n.type==="target"&&i.push(s)}return{source:r,target:i}}function nw(t){return t==="manual"}function IC(t,e,r,i={}){var d,p;const n=iw(dG,i),s={i:0},o=new Map(e),c=n!=null&&n.elevateNodesOnSelect&&!nw(n.zIndexMode)?sR:0;let u=t.length>0,h=!1;e.clear(),r.clear();for(const m of t){let g=o.get(m.id);if(n.checkEquality&&m===(g==null?void 0:g.internals.userNode))e.set(m.id,g);else{const x=sh(m,n.nodeOrigin),v=jl(m.extent)?m.extent:n.nodeExtent,b=Js(x,v,pa(m));g={...n.defaults,...m,measured:{width:(d=m.measured)==null?void 0:d.width,height:(p=m.measured)==null?void 0:p.height},internals:{positionAbsolute:b,handleBounds:pG(m,g),z:oR(m,c,n.zIndexMode),userNode:m}},e.set(m.id,g)}(g.measured===void 0||g.measured.width===void 0||g.measured.height===void 0)&&!g.hidden&&(u=!1),m.parentId&&aw(g,e,r,i,s),h||(h=m.selected??!1)}return{nodesInitialized:u,hasSelectedNodes:h}}function gG(t,e){if(!t.parentId)return;const r=e.get(t.parentId);r?r.set(t.id,t):e.set(t.parentId,new Map([[t.id,t]]))}function aw(t,e,r,i,n){const{elevateNodesOnSelect:s,nodeOrigin:o,nodeExtent:c,zIndexMode:u}=iw(rw,i),h=t.parentId,d=e.get(h);if(!d){console.warn(`Parent node ${h} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}gG(t,r),n&&!d.parentId&&d.internals.rootParentIndex===void 0&&u==="auto"&&(d.internals.rootParentIndex=++n.i,d.internals.z=d.internals.z+n.i*hG),n&&d.internals.rootParentIndex!==void 0&&(n.i=d.internals.rootParentIndex);const p=s&&!nw(u)?sR:0,{x:m,y:g,z:x}=mG(t,d,o,c,p,u),{positionAbsolute:v}=t.internals,b=m!==v.x||g!==v.y;(b||x!==t.internals.z)&&e.set(t.id,{...t,internals:{...t.internals,positionAbsolute:b?{x:m,y:g}:v,z:x}})}function oR(t,e,r){const i=sn(t.zIndex)?t.zIndex:0;return nw(r)?i:i+(t.selected?e:0)}function mG(t,e,r,i,n,s){const{x:o,y:c}=e.internals.positionAbsolute,u=pa(t),h=sh(t,r),d=jl(t.extent)?Js(h,t.extent,u):h;let p=Js({x:o+d.x,y:c+d.y},i,u);t.extent==="parent"&&(p=WO(p,u,e));const m=oR(t,n,s),g=e.internals.z??0;return{x:p.x,y:p.y,z:g>=m?g+1:m}}function sw(t,e,r,i=[0,0]){var o;const n=[],s=new Map;for(const c of t){const u=e.get(c.parentId);if(!u)continue;const h=((o=s.get(c.parentId))==null?void 0:o.expandedRect)??zl(u),d=QO(h,c.rect);s.set(c.parentId,{expandedRect:d,parent:u})}return s.size>0&&s.forEach(({expandedRect:c,parent:u},h)=>{var k;const d=u.internals.positionAbsolute,p=pa(u),m=u.origin??i,g=c.x<d.x?Math.round(Math.abs(d.x-c.x)):0,x=c.y<d.y?Math.round(Math.abs(d.y-c.y)):0,v=Math.max(p.width,Math.round(c.width)),b=Math.max(p.height,Math.round(c.height)),w=(v-p.width)*m[0],T=(b-p.height)*m[1];(g>0||x>0||w||T)&&(n.push({id:h,type:"position",position:{x:u.position.x-g+w,y:u.position.y-x+T}}),(k=r.get(h))==null||k.forEach(E=>{t.some(L=>L.id===E.id)||n.push({id:E.id,type:"position",position:{x:E.position.x+g,y:E.position.y+x}})})),(p.width<c.width||p.height<c.height||g||x)&&n.push({id:h,type:"dimensions",setAttributes:!0,dimensions:{width:v+(g?m[0]*g-w:0),height:b+(x?m[1]*x-T:0)}})}),n}function yG(t,e,r,i,n,s,o){const c=i==null?void 0:i.querySelector(".xyflow__viewport");let u=!1;if(!c)return{changes:[],updatedInternals:u};const h=[],d=window.getComputedStyle(c),{m22:p}=new window.DOMMatrixReadOnly(d.transform),m=[];for(const g of t.values()){const x=e.get(g.id);if(!x)continue;if(x.hidden){e.set(x.id,{...x,internals:{...x.internals,handleBounds:void 0}}),u=!0;continue}const v=ew(g.nodeElement),b=x.measured.width!==v.width||x.measured.height!==v.height;if(!!(v.width&&v.height&&(b||!x.internals.handleBounds||g.force))){const T=g.nodeElement.getBoundingClientRect(),k=jl(x.extent)?x.extent:s;let{positionAbsolute:E}=x.internals;x.parentId&&x.extent==="parent"?E=WO(E,v,e.get(x.parentId)):k&&(E=Js(E,k,v));const L={...x,measured:v,internals:{...x.internals,positionAbsolute:E,handleBounds:{source:ZE("source",g.nodeElement,T,p,x.id),target:ZE("target",g.nodeElement,T,p,x.id)}}};e.set(x.id,L),x.parentId&&aw(L,e,r,{nodeOrigin:n,zIndexMode:o}),u=!0,b&&(h.push({id:x.id,type:"dimensions",dimensions:v}),x.expandParent&&x.parentId&&m.push({id:x.id,parentId:x.parentId,rect:zl(L,n)}))}}if(m.length>0){const g=sw(m,e,r,n);h.push(...g)}return{changes:h,updatedInternals:u}}async function xG({delta:t,panZoom:e,transform:r,translateExtent:i,width:n,height:s}){if(!e||!t.x&&!t.y)return Promise.resolve(!1);const o=await e.setViewportConstrained({x:r[0]+t.x,y:r[1]+t.y,zoom:r[2]},[[0,0],[n,s]],i),c=!!o&&(o.x!==r[0]||o.y!==r[1]||o.k!==r[2]);return Promise.resolve(c)}function nA(t,e,r,i,n,s){let o=n;const c=i.get(o)||new Map;i.set(o,c.set(r,e)),o=`${n}-${t}`;const u=i.get(o)||new Map;if(i.set(o,u.set(r,e)),s){o=`${n}-${t}-${s}`;const h=i.get(o)||new Map;i.set(o,h.set(r,e))}}function lR(t,e,r){t.clear(),e.clear();for(const i of r){const{source:n,target:s,sourceHandle:o=null,targetHandle:c=null}=i,u={edgeId:i.id,source:n,target:s,sourceHandle:o,targetHandle:c},h=`${n}-${o}--${s}-${c}`,d=`${s}-${c}--${n}-${o}`;nA("source",u,d,t,n,o),nA("target",u,h,t,s,c),e.set(i.id,i)}}function cR(t,e){if(!t.parentId)return!1;const r=e.get(t.parentId);return r?r.selected?!0:cR(r,e):!1}function aA(t,e,r){var n;let i=t;do{if((n=i==null?void 0:i.matches)!=null&&n.call(i,e))return!0;if(i===r)return!1;i=i==null?void 0:i.parentElement}while(i);return!1}function bG(t,e,r,i){const n=new Map;for(const[s,o]of t)if((o.selected||o.id===i)&&(!o.parentId||!cR(o,t))&&(o.draggable||e&&typeof o.draggable>"u")){const c=t.get(s);c&&n.set(s,{id:s,position:c.position||{x:0,y:0},distance:{x:r.x-c.internals.positionAbsolute.x,y:r.y-c.internals.positionAbsolute.y},extent:c.extent,parentId:c.parentId,origin:c.origin,expandParent:c.expandParent,internals:{positionAbsolute:c.internals.positionAbsolute||{x:0,y:0}},measured:{width:c.measured.width??0,height:c.measured.height??0}})}return n}function S0({nodeId:t,dragItems:e,nodeLookup:r,dragging:i=!0}){var o,c,u;const n=[];for(const[h,d]of e){const p=(o=r.get(h))==null?void 0:o.internals.userNode;p&&n.push({...p,position:d.position,dragging:i})}if(!t)return[n[0],n];const s=(c=r.get(t))==null?void 0:c.internals.userNode;return[s?{...s,position:((u=e.get(t))==null?void 0:u.position)||s.position,dragging:i}:n[0],n]}function vG({dragItems:t,snapGrid:e,x:r,y:i}){const n=t.values().next().value;if(!n)return null;const s={x:r-n.distance.x,y:i-n.distance.y},o=lh(s,e);return{x:o.x-s.x,y:o.y-s.y}}function CG({onNodeMouseDown:t,getStoreItems:e,onDragStart:r,onDrag:i,onDragStop:n}){let s={x:null,y:null},o=0,c=new Map,u=!1,h={x:0,y:0},d=null,p=!1,m=null,g=!1,x=!1,v=null;function b({noDragClassName:T,handleSelector:k,domNode:E,isSelectable:L,nodeId:A,nodeClickDistance:R=0}){m=Xt(E);function j({x:z,y:X}){const{nodeLookup:M,nodeExtent:I,snapGrid:N,snapToGrid:P,nodeOrigin:$,onNodeDrag:D,onSelectionDrag:q,onError:G,updateNodePositions:Z}=e();s={x:z,y:X};let H=!1;const Q=c.size>1,J=Q&&I?RC(oh(c)):null,et=Q&&P?vG({dragItems:c,snapGrid:N,x:z,y:X}):null;for(const[at,lt]of c){if(!M.has(at))continue;let xt={x:z-lt.distance.x,y:X-lt.distance.y};P&&(xt=et?{x:Math.round(xt.x+et.x),y:Math.round(xt.y+et.y)}:lh(xt,N));let mt=null;if(Q&&I&&!lt.extent&&J){const{positionAbsolute:_t}=lt.internals,Mt=_t.x-J.x+I[0][0],Et=_t.x+lt.measured.width-J.x2+I[1][0],Yt=_t.y-J.y+I[0][1],zt=_t.y+lt.measured.height-J.y2+I[1][1];mt=[[Mt,Yt],[Et,zt]]}const{position:bt,positionAbsolute:Tt}=VO({nodeId:at,nextPosition:xt,nodeLookup:M,nodeExtent:mt||I,nodeOrigin:$,onError:G});H=H||lt.position.x!==bt.x||lt.position.y!==bt.y,lt.position=bt,lt.internals.positionAbsolute=Tt}if(x=x||H,!!H&&(Z(c,!0),v&&(i||D||!A&&q))){const[at,lt]=S0({nodeId:A,dragItems:c,nodeLookup:M});i==null||i(v,c,at,lt),D==null||D(v,at,lt),A||q==null||q(v,lt)}}async function Y(){if(!d)return;const{transform:z,panBy:X,autoPanSpeed:M,autoPanOnNodeDrag:I}=e();if(!I){u=!1,cancelAnimationFrame(o);return}const[N,P]=XO(h,d,M);(N!==0||P!==0)&&(s.x=(s.x??0)-N/z[2],s.y=(s.y??0)-P/z[2],await X({x:N,y:P})&&j(s)),o=requestAnimationFrame(Y)}function V(z){var Q;const{nodeLookup:X,multiSelectionActive:M,nodesDraggable:I,transform:N,snapGrid:P,snapToGrid:$,selectNodesOnDrag:D,onNodeDragStart:q,onSelectionDragStart:G,unselectNodesAndEdges:Z}=e();p=!0,(!D||!L)&&!M&&A&&((Q=X.get(A))!=null&&Q.selected||Z()),L&&D&&A&&(t==null||t(A));const H=Tu(z.sourceEvent,{transform:N,snapGrid:P,snapToGrid:$,containerBounds:d});if(s=H,c=bG(X,I,H,A),c.size>0&&(r||q||!A&&G)){const[J,et]=S0({nodeId:A,dragItems:c,nodeLookup:X});r==null||r(z.sourceEvent,c,J,et),q==null||q(z.sourceEvent,J,et),A||G==null||G(z.sourceEvent,et)}}const O=_O().clickDistance(R).on("start",z=>{const{domNode:X,nodeDragThreshold:M,transform:I,snapGrid:N,snapToGrid:P}=e();d=(X==null?void 0:X.getBoundingClientRect())||null,g=!1,x=!1,v=z.sourceEvent,M===0&&V(z),s=Tu(z.sourceEvent,{transform:I,snapGrid:N,snapToGrid:P,containerBounds:d}),h=on(z.sourceEvent,d)}).on("drag",z=>{const{autoPanOnNodeDrag:X,transform:M,snapGrid:I,snapToGrid:N,nodeDragThreshold:P,nodeLookup:$}=e(),D=Tu(z.sourceEvent,{transform:M,snapGrid:I,snapToGrid:N,containerBounds:d});if(v=z.sourceEvent,(z.sourceEvent.type==="touchmove"&&z.sourceEvent.touches.length>1||A&&!$.has(A))&&(g=!0),!g){if(!u&&X&&p&&(u=!0,Y()),!p){const q=on(z.sourceEvent,d),G=q.x-h.x,Z=q.y-h.y;Math.sqrt(G*G+Z*Z)>P&&V(z)}(s.x!==D.xSnapped||s.y!==D.ySnapped)&&c&&p&&(h=on(z.sourceEvent,d),j(D))}}).on("end",z=>{if(!(!p||g)&&(u=!1,p=!1,cancelAnimationFrame(o),c.size>0)){const{nodeLookup:X,updateNodePositions:M,onNodeDragStop:I,onSelectionDragStop:N}=e();if(x&&(M(c,!1),x=!1),n||I||!A&&N){const[P,$]=S0({nodeId:A,dragItems:c,nodeLookup:X,dragging:!1});n==null||n(z.sourceEvent,c,P,$),I==null||I(z.sourceEvent,P,$),A||N==null||N(z.sourceEvent,$)}}}).filter(z=>{const X=z.target;return!z.button&&(!T||!aA(X,`.${T}`,E))&&(!k||aA(X,k,E))});m.call(O)}function w(){m==null||m.on(".drag",null)}return{update:b,destroy:w}}function wG(t,e,r){const i=[],n={x:t.x-r,y:t.y-r,width:r*2,height:r*2};for(const s of e.values())Uu(n,zl(s))>0&&i.push(s);return i}const SG=250;function kG(t,e,r,i){var c,u;let n=[],s=1/0;const o=wG(t,r,e+SG);for(const h of o){const d=[...((c=h.internals.handleBounds)==null?void 0:c.source)??[],...((u=h.internals.handleBounds)==null?void 0:u.target)??[]];for(const p of d){if(i.nodeId===p.nodeId&&i.type===p.type&&i.id===p.id)continue;const{x:m,y:g}=to(h,p,p.position,!0),x=Math.sqrt(Math.pow(m-t.x,2)+Math.pow(g-t.y,2));x>e||(x<s?(n=[{...p,x:m,y:g}],s=x):x===s&&n.push({...p,x:m,y:g}))}}if(!n.length)return null;if(n.length>1){const h=i.type==="source"?"target":"source";return n.find(d=>d.type===h)??n[0]}return n[0]}function uR(t,e,r,i,n,s=!1){var h,d,p;const o=i.get(t);if(!o)return null;const c=n==="strict"?(h=o.internals.handleBounds)==null?void 0:h[e]:[...((d=o.internals.handleBounds)==null?void 0:d.source)??[],...((p=o.internals.handleBounds)==null?void 0:p.target)??[]],u=(r?c==null?void 0:c.find(m=>m.id===r):c==null?void 0:c[0])??null;return u&&s?{...u,...to(o,u,u.position,!0)}:u}function hR(t,e){return t||(e!=null&&e.classList.contains("target")?"target":e!=null&&e.classList.contains("source")?"source":null)}function _G(t,e){let r=null;return e?r=!0:t&&!e&&(r=!1),r}const dR=()=>!0;function TG(t,{connectionMode:e,connectionRadius:r,handleId:i,nodeId:n,edgeUpdaterType:s,isTarget:o,domNode:c,nodeLookup:u,lib:h,autoPanOnConnect:d,flowId:p,panBy:m,cancelConnection:g,onConnectStart:x,onConnect:v,onConnectEnd:b,isValidConnection:w=dR,onReconnectEnd:T,updateConnection:k,getTransform:E,getFromHandle:L,autoPanSpeed:A,dragThreshold:R=1,handleDomNode:j}){const Y=JO(t.target);let V=0,O;const{x:z,y:X}=on(t),M=hR(s,j),I=c==null?void 0:c.getBoundingClientRect();let N=!1;if(!I||!M)return;const P=uR(n,M,i,u,e);if(!P)return;let $=on(t,I),D=!1,q=null,G=!1,Z=null;function H(){if(!d||!I)return;const[bt,Tt]=XO($,I,A);m({x:bt,y:Tt}),V=requestAnimationFrame(H)}const Q={...P,nodeId:n,type:M,position:P.position},J=u.get(n);let at={inProgress:!0,isValid:null,from:to(J,Q,Gt.Left,!0),fromHandle:Q,fromPosition:Q.position,fromNode:J,to:$,toHandle:null,toPosition:VE[Q.position],toNode:null,pointer:$};function lt(){N=!0,k(at),x==null||x(t,{nodeId:n,handleId:i,handleType:M})}R===0&&lt();function xt(bt){if(!N){const{x:zt,y:ve}=on(bt),Ee=zt-z,Ve=ve-X;if(!(Ee*Ee+Ve*Ve>R*R))return;lt()}if(!L()||!Q){mt(bt);return}const Tt=E();$=on(bt,I),O=kG(ch($,Tt,!1,[1,1]),r,u,Q),D||(H(),D=!0);const _t=fR(bt,{handle:O,connectionMode:e,fromNodeId:n,fromHandleId:i,fromType:o?"target":"source",isValidConnection:w,doc:Y,lib:h,flowId:p,nodeLookup:u});Z=_t.handleDomNode,q=_t.connection,G=_G(!!O,_t.isValid);const Mt=u.get(n),Et=Mt?to(Mt,Q,Gt.Left,!0):at.from,Yt={...at,from:Et,isValid:G,to:_t.toHandle&&G?Rf({x:_t.toHandle.x,y:_t.toHandle.y},Tt):$,toHandle:_t.toHandle,toPosition:G&&_t.toHandle?_t.toHandle.position:VE[Q.position],toNode:_t.toHandle?u.get(_t.toHandle.nodeId):null,pointer:$};k(Yt),at=Yt}function mt(bt){if(!("touches"in bt&&bt.touches.length>0)){if(N){(O||Z)&&q&&G&&(v==null||v(q));const{inProgress:Tt,..._t}=at,Mt={..._t,toPosition:at.toHandle?at.toPosition:null};b==null||b(bt,Mt),s&&(T==null||T(bt,Mt))}g(),cancelAnimationFrame(V),D=!1,G=!1,q=null,Z=null,Y.removeEventListener("mousemove",xt),Y.removeEventListener("mouseup",mt),Y.removeEventListener("touchmove",xt),Y.removeEventListener("touchend",mt)}}Y.addEventListener("mousemove",xt),Y.addEventListener("mouseup",mt),Y.addEventListener("touchmove",xt),Y.addEventListener("touchend",mt)}function fR(t,{handle:e,connectionMode:r,fromNodeId:i,fromHandleId:n,fromType:s,doc:o,lib:c,flowId:u,isValidConnection:h=dR,nodeLookup:d}){const p=s==="target",m=e?o.querySelector(`.${c}-flow__handle[data-id="${u}-${e==null?void 0:e.nodeId}-${e==null?void 0:e.id}-${e==null?void 0:e.type}"]`):null,{x:g,y:x}=on(t),v=o.elementFromPoint(g,x),b=v!=null&&v.classList.contains(`${c}-flow__handle`)?v:m,w={handleDomNode:b,isValid:!1,connection:null,toHandle:null};if(b){const T=hR(void 0,b),k=b.getAttribute("data-nodeid"),E=b.getAttribute("data-handleid"),L=b.classList.contains("connectable"),A=b.classList.contains("connectableend");if(!k||!T)return w;const R={source:p?k:i,sourceHandle:p?E:n,target:p?i:k,targetHandle:p?n:E};w.connection=R;const Y=L&&A&&(r===Il.Strict?p&&T==="source"||!p&&T==="target":k!==i||E!==n);w.isValid=Y&&h(R),w.toHandle=uR(k,T,E,d,r,!0)}return w}const qC={onPointerDown:TG,isValid:fR};function EG({domNode:t,panZoom:e,getTransform:r,getViewScale:i}){const n=Xt(t);function s({translateExtent:c,width:u,height:h,zoomStep:d=1,pannable:p=!0,zoomable:m=!0,inversePan:g=!1}){const x=k=>{if(k.sourceEvent.type!=="wheel"||!e)return;const E=r(),L=k.sourceEvent.ctrlKey&&Gu()?10:1,A=-k.sourceEvent.deltaY*(k.sourceEvent.deltaMode===1?.05:k.sourceEvent.deltaMode?1:.002)*d,R=E[2]*Math.pow(2,A*L);e.scaleTo(R)};let v=[0,0];const b=k=>{(k.sourceEvent.type==="mousedown"||k.sourceEvent.type==="touchstart")&&(v=[k.sourceEvent.clientX??k.sourceEvent.touches[0].clientX,k.sourceEvent.clientY??k.sourceEvent.touches[0].clientY])},w=k=>{const E=r();if(k.sourceEvent.type!=="mousemove"&&k.sourceEvent.type!=="touchmove"||!e)return;const L=[k.sourceEvent.clientX??k.sourceEvent.touches[0].clientX,k.sourceEvent.clientY??k.sourceEvent.touches[0].clientY],A=[L[0]-v[0],L[1]-v[1]];v=L;const R=i()*Math.max(E[2],Math.log(E[2]))*(g?-1:1),j={x:E[0]-A[0]*R,y:E[1]-A[1]*R},Y=[[0,0],[u,h]];e.setViewportConstrained({x:j.x,y:j.y,zoom:E[2]},Y,c)},T=$O().on("start",b).on("zoom",p?w:null).on("zoom.wheel",m?x:null);n.call(T,{})}function o(){n.on("zoom",null)}return{update:s,destroy:o,pointer:Ji}}const vp=t=>({x:t.x,y:t.y,zoom:t.k}),k0=({x:t,y:e,zoom:r})=>yp.translate(t,e).scale(r),hl=(t,e)=>t.target.closest(`.${e}`),pR=(t,e)=>e===2&&Array.isArray(t)&&t.includes(2),AG=t=>((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2,_0=(t,e=0,r=AG,i=()=>{})=>{const n=typeof e=="number"&&e>0;return n||i(),n?t.transition().duration(e).ease(r).on("end",i):t},gR=t=>{const e=t.ctrlKey&&Gu()?10:1;return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*e};function BG({zoomPanValues:t,noWheelClassName:e,d3Selection:r,d3Zoom:i,panOnScrollMode:n,panOnScrollSpeed:s,zoomOnPinch:o,onPanZoomStart:c,onPanZoom:u,onPanZoomEnd:h}){return d=>{if(hl(d,e))return d.ctrlKey&&d.preventDefault(),!1;d.preventDefault(),d.stopImmediatePropagation();const p=r.property("__zoom").k||1;if(d.ctrlKey&&o){const b=Ji(d),w=gR(d),T=p*Math.pow(2,w);i.scaleTo(r,T,b,d);return}const m=d.deltaMode===1?20:1;let g=n===Xs.Vertical?0:d.deltaX*m,x=n===Xs.Horizontal?0:d.deltaY*m;!Gu()&&d.shiftKey&&n!==Xs.Vertical&&(g=d.deltaY*m,x=0),i.translateBy(r,-(g/p)*s,-(x/p)*s,{internal:!0});const v=vp(r.property("__zoom"));clearTimeout(t.panScrollTimeout),t.isPanScrolling?(u==null||u(d,v),t.panScrollTimeout=setTimeout(()=>{h==null||h(d,v),t.isPanScrolling=!1},150)):(t.isPanScrolling=!0,c==null||c(d,v))}}function LG({noWheelClassName:t,preventScrolling:e,d3ZoomHandler:r}){return function(i,n){const s=i.type==="wheel",o=!e&&s&&!i.ctrlKey,c=hl(i,t);if(i.ctrlKey&&s&&c&&i.preventDefault(),o||c)return null;i.preventDefault(),r.call(this,i,n)}}function MG({zoomPanValues:t,onDraggingChange:e,onPanZoomStart:r}){return i=>{var s,o,c;if((s=i.sourceEvent)!=null&&s.internal)return;const n=vp(i.transform);t.mouseButton=((o=i.sourceEvent)==null?void 0:o.button)||0,t.isZoomingOrPanning=!0,t.prevViewport=n,((c=i.sourceEvent)==null?void 0:c.type)==="mousedown"&&e(!0),r&&(r==null||r(i.sourceEvent,n))}}function NG({zoomPanValues:t,panOnDrag:e,onPaneContextMenu:r,onTransformChange:i,onPanZoom:n}){return s=>{var o,c;t.usedRightMouseButton=!!(r&&pR(e,t.mouseButton??0)),(o=s.sourceEvent)!=null&&o.sync||i([s.transform.x,s.transform.y,s.transform.k]),n&&!((c=s.sourceEvent)!=null&&c.internal)&&(n==null||n(s.sourceEvent,vp(s.transform)))}}function OG({zoomPanValues:t,panOnDrag:e,panOnScroll:r,onDraggingChange:i,onPanZoomEnd:n,onPaneContextMenu:s}){return o=>{var c;if(!((c=o.sourceEvent)!=null&&c.internal)&&(t.isZoomingOrPanning=!1,s&&pR(e,t.mouseButton??0)&&!t.usedRightMouseButton&&o.sourceEvent&&s(o.sourceEvent),t.usedRightMouseButton=!1,i(!1),n)){const u=vp(o.transform);t.prevViewport=u,clearTimeout(t.timerId),t.timerId=setTimeout(()=>{n==null||n(o.sourceEvent,u)},r?150:0)}}}function RG({zoomActivationKeyPressed:t,zoomOnScroll:e,zoomOnPinch:r,panOnDrag:i,panOnScroll:n,zoomOnDoubleClick:s,userSelectionActive:o,noWheelClassName:c,noPanClassName:u,lib:h,connectionInProgress:d}){return p=>{var b;const m=t||e,g=r&&p.ctrlKey,x=p.type==="wheel";if(p.button===1&&p.type==="mousedown"&&(hl(p,`${h}-flow__node`)||hl(p,`${h}-flow__edge`)))return!0;if(!i&&!m&&!n&&!s&&!r||o||d&&!x||hl(p,c)&&x||hl(p,u)&&(!x||n&&x&&!t)||!r&&p.ctrlKey&&x)return!1;if(!r&&p.type==="touchstart"&&((b=p.touches)==null?void 0:b.length)>1)return p.preventDefault(),!1;if(!m&&!n&&!g&&x||!i&&(p.type==="mousedown"||p.type==="touchstart")||Array.isArray(i)&&!i.includes(p.button)&&p.type==="mousedown")return!1;const v=Array.isArray(i)&&i.includes(p.button)||!p.button||p.button<=1;return(!p.ctrlKey||x)&&v}}function DG({domNode:t,minZoom:e,maxZoom:r,translateExtent:i,viewport:n,onPanZoom:s,onPanZoomStart:o,onPanZoomEnd:c,onDraggingChange:u}){const h={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},d=t.getBoundingClientRect(),p=$O().scaleExtent([e,r]).translateExtent(i),m=Xt(t).call(p);T({x:n.x,y:n.y,zoom:ql(n.zoom,e,r)},[[0,0],[d.width,d.height]],i);const g=m.on("wheel.zoom"),x=m.on("dblclick.zoom");p.wheelDelta(gR);function v(O,z){return m?new Promise(X=>{p==null||p.interpolate((z==null?void 0:z.interpolate)==="linear"?_u:cf).transform(_0(m,z==null?void 0:z.duration,z==null?void 0:z.ease,()=>X(!0)),O)}):Promise.resolve(!1)}function b({noWheelClassName:O,noPanClassName:z,onPaneContextMenu:X,userSelectionActive:M,panOnScroll:I,panOnDrag:N,panOnScrollMode:P,panOnScrollSpeed:$,preventScrolling:D,zoomOnPinch:q,zoomOnScroll:G,zoomOnDoubleClick:Z,zoomActivationKeyPressed:H,lib:Q,onTransformChange:J,connectionInProgress:et,paneClickDistance:at,selectionOnDrag:lt}){M&&!h.isZoomingOrPanning&&w();const xt=I&&!H&&!M;p.clickDistance(lt?1/0:!sn(at)||at<0?0:at);const mt=xt?BG({zoomPanValues:h,noWheelClassName:O,d3Selection:m,d3Zoom:p,panOnScrollMode:P,panOnScrollSpeed:$,zoomOnPinch:q,onPanZoomStart:o,onPanZoom:s,onPanZoomEnd:c}):LG({noWheelClassName:O,preventScrolling:D,d3ZoomHandler:g});if(m.on("wheel.zoom",mt,{passive:!1}),!M){const Tt=MG({zoomPanValues:h,onDraggingChange:u,onPanZoomStart:o});p.on("start",Tt);const _t=NG({zoomPanValues:h,panOnDrag:N,onPaneContextMenu:!!X,onPanZoom:s,onTransformChange:J});p.on("zoom",_t);const Mt=OG({zoomPanValues:h,panOnDrag:N,panOnScroll:I,onPaneContextMenu:X,onPanZoomEnd:c,onDraggingChange:u});p.on("end",Mt)}const bt=RG({zoomActivationKeyPressed:H,panOnDrag:N,zoomOnScroll:G,panOnScroll:I,zoomOnDoubleClick:Z,zoomOnPinch:q,userSelectionActive:M,noPanClassName:z,noWheelClassName:O,lib:Q,connectionInProgress:et});p.filter(bt),Z?m.on("dblclick.zoom",x):m.on("dblclick.zoom",null)}function w(){p.on("zoom",null)}async function T(O,z,X){const M=k0(O),I=p==null?void 0:p.constrain()(M,z,X);return I&&await v(I),new Promise(N=>N(I))}async function k(O,z){const X=k0(O);return await v(X,z),new Promise(M=>M(X))}function E(O){if(m){const z=k0(O),X=m.property("__zoom");(X.k!==O.zoom||X.x!==O.x||X.y!==O.y)&&(p==null||p.transform(m,z,null,{sync:!0}))}}function L(){const O=m?jO(m.node()):{x:0,y:0,k:1};return{x:O.x,y:O.y,zoom:O.k}}function A(O,z){return m?new Promise(X=>{p==null||p.interpolate((z==null?void 0:z.interpolate)==="linear"?_u:cf).scaleTo(_0(m,z==null?void 0:z.duration,z==null?void 0:z.ease,()=>X(!0)),O)}):Promise.resolve(!1)}function R(O,z){return m?new Promise(X=>{p==null||p.interpolate((z==null?void 0:z.interpolate)==="linear"?_u:cf).scaleBy(_0(m,z==null?void 0:z.duration,z==null?void 0:z.ease,()=>X(!0)),O)}):Promise.resolve(!1)}function j(O){p==null||p.scaleExtent(O)}function Y(O){p==null||p.translateExtent(O)}function V(O){const z=!sn(O)||O<0?0:O;p==null||p.clickDistance(z)}return{update:b,destroy:w,setViewport:k,setViewportConstrained:T,getViewport:L,scaleTo:A,scaleBy:R,setScaleExtent:j,setTranslateExtent:Y,syncViewport:E,setClickDistance:V}}var $l;(function(t){t.Line="line",t.Handle="handle"})($l||($l={}));function FG({width:t,prevWidth:e,height:r,prevHeight:i,affectsX:n,affectsY:s}){const o=t-e,c=r-i,u=[o>0?1:o<0?-1:0,c>0?1:c<0?-1:0];return o&&n&&(u[0]=u[0]*-1),c&&s&&(u[1]=u[1]*-1),u}function sA(t){const e=t.includes("right")||t.includes("left"),r=t.includes("bottom")||t.includes("top"),i=t.includes("left"),n=t.includes("top");return{isHorizontal:e,isVertical:r,affectsX:i,affectsY:n}}function Va(t,e){return Math.max(0,e-t)}function Wa(t,e){return Math.max(0,t-e)}function Ud(t,e,r){return Math.max(0,e-t,t-r)}function oA(t,e){return t?!e:e}function IG(t,e,r,i,n,s,o,c){let{affectsX:u,affectsY:h}=e;const{isHorizontal:d,isVertical:p}=e,m=d&&p,{xSnapped:g,ySnapped:x}=r,{minWidth:v,maxWidth:b,minHeight:w,maxHeight:T}=i,{x:k,y:E,width:L,height:A,aspectRatio:R}=t;let j=Math.floor(d?g-t.pointerX:0),Y=Math.floor(p?x-t.pointerY:0);const V=L+(u?-j:j),O=A+(h?-Y:Y),z=-s[0]*L,X=-s[1]*A;let M=Ud(V,v,b),I=Ud(O,w,T);if(o){let $=0,D=0;u&&j<0?$=Va(k+j+z,o[0][0]):!u&&j>0&&($=Wa(k+V+z,o[1][0])),h&&Y<0?D=Va(E+Y+X,o[0][1]):!h&&Y>0&&(D=Wa(E+O+X,o[1][1])),M=Math.max(M,$),I=Math.max(I,D)}if(c){let $=0,D=0;u&&j>0?$=Wa(k+j,c[0][0]):!u&&j<0&&($=Va(k+V,c[1][0])),h&&Y>0?D=Wa(E+Y,c[0][1]):!h&&Y<0&&(D=Va(E+O,c[1][1])),M=Math.max(M,$),I=Math.max(I,D)}if(n){if(d){const $=Ud(V/R,w,T)*R;if(M=Math.max(M,$),o){let D=0;!u&&!h||u&&!h&&m?D=Wa(E+X+V/R,o[1][1])*R:D=Va(E+X+(u?j:-j)/R,o[0][1])*R,M=Math.max(M,D)}if(c){let D=0;!u&&!h||u&&!h&&m?D=Va(E+V/R,c[1][1])*R:D=Wa(E+(u?j:-j)/R,c[0][1])*R,M=Math.max(M,D)}}if(p){const $=Ud(O*R,v,b)/R;if(I=Math.max(I,$),o){let D=0;!u&&!h||h&&!u&&m?D=Wa(k+O*R+z,o[1][0])/R:D=Va(k+(h?Y:-Y)*R+z,o[0][0])/R,I=Math.max(I,D)}if(c){let D=0;!u&&!h||h&&!u&&m?D=Va(k+O*R,c[1][0])/R:D=Wa(k+(h?Y:-Y)*R,c[0][0])/R,I=Math.max(I,D)}}}Y=Y+(Y<0?I:-I),j=j+(j<0?M:-M),n&&(m?V>O*R?Y=(oA(u,h)?-j:j)/R:j=(oA(u,h)?-Y:Y)*R:d?(Y=j/R,h=u):(j=Y*R,u=h));const N=u?k+j:k,P=h?E+Y:E;return{width:L+(u?-j:j),height:A+(h?-Y:Y),x:s[0]*j*(u?-1:1)+N,y:s[1]*Y*(h?-1:1)+P}}const mR={width:0,height:0,x:0,y:0},qG={...mR,pointerX:0,pointerY:0,aspectRatio:1};function zG(t){return[[0,0],[t.measured.width,t.measured.height]]}function jG(t,e,r){const i=e.position.x+t.position.x,n=e.position.y+t.position.y,s=t.measured.width??0,o=t.measured.height??0,c=r[0]*s,u=r[1]*o;return[[i-c,n-u],[i+s-c,n+o-u]]}function $G({domNode:t,nodeId:e,getStoreItems:r,onChange:i,onEnd:n}){const s=Xt(t);let o={controlDirection:sA("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function c({controlPosition:h,boundaries:d,keepAspectRatio:p,resizeDirection:m,onResizeStart:g,onResize:x,onResizeEnd:v,shouldResize:b}){let w={...mR},T={...qG};o={boundaries:d,resizeDirection:m,keepAspectRatio:p,controlDirection:sA(h)};let k,E=null,L=[],A,R,j,Y=!1;const V=_O().on("start",O=>{const{nodeLookup:z,transform:X,snapGrid:M,snapToGrid:I,nodeOrigin:N,paneDomNode:P}=r();if(k=z.get(e),!k)return;E=(P==null?void 0:P.getBoundingClientRect())??null;const{xSnapped:$,ySnapped:D}=Tu(O.sourceEvent,{transform:X,snapGrid:M,snapToGrid:I,containerBounds:E});w={width:k.measured.width??0,height:k.measured.height??0,x:k.position.x??0,y:k.position.y??0},T={...w,pointerX:$,pointerY:D,aspectRatio:w.width/w.height},A=void 0,k.parentId&&(k.extent==="parent"||k.expandParent)&&(A=z.get(k.parentId),R=A&&k.extent==="parent"?zG(A):void 0),L=[],j=void 0;for(const[q,G]of z)if(G.parentId===e&&(L.push({id:q,position:{...G.position},extent:G.extent}),G.extent==="parent"||G.expandParent)){const Z=jG(G,k,G.origin??N);j?j=[[Math.min(Z[0][0],j[0][0]),Math.min(Z[0][1],j[0][1])],[Math.max(Z[1][0],j[1][0]),Math.max(Z[1][1],j[1][1])]]:j=Z}g==null||g(O,{...w})}).on("drag",O=>{const{transform:z,snapGrid:X,snapToGrid:M,nodeOrigin:I}=r(),N=Tu(O.sourceEvent,{transform:z,snapGrid:X,snapToGrid:M,containerBounds:E}),P=[];if(!k)return;const{x:$,y:D,width:q,height:G}=w,Z={},H=k.origin??I,{width:Q,height:J,x:et,y:at}=IG(T,o.controlDirection,N,o.boundaries,o.keepAspectRatio,H,R,j),lt=Q!==q,xt=J!==G,mt=et!==$&&lt,bt=at!==D&&xt;if(!mt&&!bt&&!lt&&!xt)return;if((mt||bt||H[0]===1||H[1]===1)&&(Z.x=mt?et:w.x,Z.y=bt?at:w.y,w.x=Z.x,w.y=Z.y,L.length>0)){const Et=et-$,Yt=at-D;for(const zt of L)zt.position={x:zt.position.x-Et+H[0]*(Q-q),y:zt.position.y-Yt+H[1]*(J-G)},P.push(zt)}if((lt||xt)&&(Z.width=lt&&(!o.resizeDirection||o.resizeDirection==="horizontal")?Q:w.width,Z.height=xt&&(!o.resizeDirection||o.resizeDirection==="vertical")?J:w.height,w.width=Z.width,w.height=Z.height),A&&k.expandParent){const Et=H[0]*(Z.width??0);Z.x&&Z.x<Et&&(w.x=Et,T.x=T.x-(Z.x-Et));const Yt=H[1]*(Z.height??0);Z.y&&Z.y<Yt&&(w.y=Yt,T.y=T.y-(Z.y-Yt))}const Tt=FG({width:w.width,prevWidth:q,height:w.height,prevHeight:G,affectsX:o.controlDirection.affectsX,affectsY:o.controlDirection.affectsY}),_t={...w,direction:Tt};(b==null?void 0:b(O,_t))!==!1&&(Y=!0,x==null||x(O,_t),i(Z,P))}).on("end",O=>{Y&&(v==null||v(O,{...w}),n==null||n({...w}),Y=!1)});s.call(V)}function u(){s.on(".drag",null)}return{update:c,destroy:u}}var T0={exports:{}},E0={},A0={exports:{}},B0={};/**
51
+ * @license React
52
+ * use-sync-external-store-shim.production.js
53
+ *
54
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
55
+ *
56
+ * This source code is licensed under the MIT license found in the
57
+ * LICENSE file in the root directory of this source tree.
58
+ */var lA;function PG(){if(lA)return B0;lA=1;var t=ih();function e(p,m){return p===m&&(p!==0||1/p===1/m)||p!==p&&m!==m}var r=typeof Object.is=="function"?Object.is:e,i=t.useState,n=t.useEffect,s=t.useLayoutEffect,o=t.useDebugValue;function c(p,m){var g=m(),x=i({inst:{value:g,getSnapshot:m}}),v=x[0].inst,b=x[1];return s(function(){v.value=g,v.getSnapshot=m,u(v)&&b({inst:v})},[p,g,m]),n(function(){return u(v)&&b({inst:v}),p(function(){u(v)&&b({inst:v})})},[p]),o(g),g}function u(p){var m=p.getSnapshot;p=p.value;try{var g=m();return!r(p,g)}catch{return!0}}function h(p,m){return m()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:c;return B0.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:d,B0}var cA;function HG(){return cA||(cA=1,A0.exports=PG()),A0.exports}/**
59
+ * @license React
60
+ * use-sync-external-store-shim/with-selector.production.js
61
+ *
62
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
63
+ *
64
+ * This source code is licensed under the MIT license found in the
65
+ * LICENSE file in the root directory of this source tree.
66
+ */var uA;function UG(){if(uA)return E0;uA=1;var t=ih(),e=HG();function r(h,d){return h===d&&(h!==0||1/h===1/d)||h!==h&&d!==d}var i=typeof Object.is=="function"?Object.is:r,n=e.useSyncExternalStore,s=t.useRef,o=t.useEffect,c=t.useMemo,u=t.useDebugValue;return E0.useSyncExternalStoreWithSelector=function(h,d,p,m,g){var x=s(null);if(x.current===null){var v={hasValue:!1,value:null};x.current=v}else v=x.current;x=c(function(){function w(A){if(!T){if(T=!0,k=A,A=m(A),g!==void 0&&v.hasValue){var R=v.value;if(g(R,A))return E=R}return E=A}if(R=E,i(k,A))return R;var j=m(A);return g!==void 0&&g(R,j)?(k=A,R):(k=A,E=j)}var T=!1,k,E,L=p===void 0?null:p;return[function(){return w(d())},L===null?void 0:function(){return w(L())}]},[d,p,m,g]);var b=n(h,x[0],x[1]);return o(function(){v.hasValue=!0,v.value=b},[b]),u(b),b},E0}var hA;function GG(){return hA||(hA=1,T0.exports=UG()),T0.exports}var YG=GG();const VG=Wl(YG),WG={},dA=t=>{let e;const r=new Set,i=(d,p)=>{const m=typeof d=="function"?d(e):d;if(!Object.is(m,e)){const g=e;e=p??(typeof m!="object"||m===null)?m:Object.assign({},e,m),r.forEach(x=>x(e,g))}},n=()=>e,u={setState:i,getState:n,getInitialState:()=>h,subscribe:d=>(r.add(d),()=>r.delete(d)),destroy:()=>{(WG?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},h=e=t(i,n,u);return u},XG=t=>t?dA(t):dA,{useDebugValue:QG}=ul,{useSyncExternalStoreWithSelector:ZG}=VG,KG=t=>t;function yR(t,e=KG,r){const i=ZG(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,r);return QG(i),i}const fA=(t,e)=>{const r=XG(t),i=(n,s=e)=>yR(r,n,s);return Object.assign(i,r),i},JG=(t,e)=>t?fA(t,e):fA;function Je(t,e){if(Object.is(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(const[i,n]of t)if(!Object.is(n,e.get(i)))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0}const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!1;for(const i of r)if(!Object.prototype.hasOwnProperty.call(e,i)||!Object.is(t[i],e[i]))return!1;return!0}cO();const Cp=ot.createContext(null),tY=Cp.Provider,xR=Mn.error001();function we(t,e){const r=ot.useContext(Cp);if(r===null)throw new Error(xR);return yR(r,t,e)}function tr(){const t=ot.useContext(Cp);if(t===null)throw new Error(xR);return ot.useMemo(()=>({getState:t.getState,setState:t.setState,subscribe:t.subscribe}),[t])}const pA={display:"none"},eY={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},bR="react-flow__node-desc",vR="react-flow__edge-desc",rY="react-flow__aria-live",iY=t=>t.ariaLiveMessage,nY=t=>t.ariaLabelConfig;function aY({rfId:t}){const e=we(iY);return S.jsx("div",{id:`${rY}-${t}`,"aria-live":"assertive","aria-atomic":"true",style:eY,children:e})}function sY({rfId:t,disableKeyboardA11y:e}){const r=we(nY);return S.jsxs(S.Fragment,{children:[S.jsx("div",{id:`${bR}-${t}`,style:pA,children:e?r["node.a11yDescription.default"]:r["node.a11yDescription.keyboardDisabled"]}),S.jsx("div",{id:`${vR}-${t}`,style:pA,children:r["edge.a11yDescription.default"]}),!e&&S.jsx(aY,{rfId:t})]})}const Xl=ot.forwardRef(({position:t="top-left",children:e,className:r,style:i,...n},s)=>{const o=`${t}`.split("-");return S.jsx("div",{className:Sr(["react-flow__panel",r,...o]),style:i,ref:s,...n,children:e})});Xl.displayName="Panel";function oY({proOptions:t,position:e="bottom-right"}){return t!=null&&t.hideAttribution?null:S.jsx(Xl,{position:e,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:S.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const lY=t=>{const e=[],r=[];for(const[,i]of t.nodeLookup)i.selected&&e.push(i.internals.userNode);for(const[,i]of t.edgeLookup)i.selected&&r.push(i);return{selectedNodes:e,selectedEdges:r}},Gd=t=>t.id;function cY(t,e){return Je(t.selectedNodes.map(Gd),e.selectedNodes.map(Gd))&&Je(t.selectedEdges.map(Gd),e.selectedEdges.map(Gd))}function uY({onSelectionChange:t}){const e=tr(),{selectedNodes:r,selectedEdges:i}=we(lY,cY);return ot.useEffect(()=>{const n={nodes:r,edges:i};t==null||t(n),e.getState().onSelectionChangeHandlers.forEach(s=>s(n))},[r,i,t]),null}const hY=t=>!!t.onSelectionChangeHandlers;function dY({onSelectionChange:t}){const e=we(hY);return t||e?S.jsx(uY,{onSelectionChange:t}):null}const zC=typeof window<"u"?ot.useLayoutEffect:ot.useEffect,CR=[0,0],fY={x:0,y:0,zoom:1},pY=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],gA=[...pY,"rfId"],gY=t=>({setNodes:t.setNodes,setEdges:t.setEdges,setMinZoom:t.setMinZoom,setMaxZoom:t.setMaxZoom,setTranslateExtent:t.setTranslateExtent,setNodeExtent:t.setNodeExtent,reset:t.reset,setDefaultNodesAndEdges:t.setDefaultNodesAndEdges}),mA={translateExtent:$u,nodeOrigin:CR,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function mY(t){const{setNodes:e,setEdges:r,setMinZoom:i,setMaxZoom:n,setTranslateExtent:s,setNodeExtent:o,reset:c,setDefaultNodesAndEdges:u}=we(gY,Je),h=tr();zC(()=>(u(t.defaultNodes,t.defaultEdges),()=>{d.current=mA,c()}),[]);const d=ot.useRef(mA);return zC(()=>{for(const p of gA){const m=t[p],g=d.current[p];m!==g&&(typeof t[p]>"u"||(p==="nodes"?e(m):p==="edges"?r(m):p==="minZoom"?i(m):p==="maxZoom"?n(m):p==="translateExtent"?s(m):p==="nodeExtent"?o(m):p==="ariaLabelConfig"?h.setState({ariaLabelConfig:JU(m)}):p==="fitView"?h.setState({fitViewQueued:m}):p==="fitViewOptions"?h.setState({fitViewOptions:m}):h.setState({[p]:m})))}d.current=t},gA.map(p=>t[p])),null}function yA(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function yY(t){var i;const[e,r]=ot.useState(t==="system"?null:t);return ot.useEffect(()=>{if(t!=="system"){r(t);return}const n=yA(),s=()=>r(n!=null&&n.matches?"dark":"light");return s(),n==null||n.addEventListener("change",s),()=>{n==null||n.removeEventListener("change",s)}},[t]),e!==null?e:(i=yA())!=null&&i.matches?"dark":"light"}const xA=typeof document<"u"?document:null;function Yu(t=null,e={target:xA,actInsideInputWithModifier:!0}){const[r,i]=ot.useState(!1),n=ot.useRef(!1),s=ot.useRef(new Set([])),[o,c]=ot.useMemo(()=>{if(t!==null){const h=(Array.isArray(t)?t:[t]).filter(p=>typeof p=="string").map(p=>p.replace("+",`
67
+ `).replace(`
68
+
69
+ `,`
70
+ +`).split(`
71
+ `)),d=h.reduce((p,m)=>p.concat(...m),[]);return[h,d]}return[[],[]]},[t]);return ot.useEffect(()=>{const u=(e==null?void 0:e.target)??xA,h=(e==null?void 0:e.actInsideInputWithModifier)??!0;if(t!==null){const d=g=>{var b,w;if(n.current=g.ctrlKey||g.metaKey||g.shiftKey||g.altKey,(!n.current||n.current&&!h)&&tR(g))return!1;const v=vA(g.code,c);if(s.current.add(g[v]),bA(o,s.current,!1)){const T=((w=(b=g.composedPath)==null?void 0:b.call(g))==null?void 0:w[0])||g.target,k=(T==null?void 0:T.nodeName)==="BUTTON"||(T==null?void 0:T.nodeName)==="A";e.preventDefault!==!1&&(n.current||!k)&&g.preventDefault(),i(!0)}},p=g=>{const x=vA(g.code,c);bA(o,s.current,!0)?(i(!1),s.current.clear()):s.current.delete(g[x]),g.key==="Meta"&&s.current.clear(),n.current=!1},m=()=>{s.current.clear(),i(!1)};return u==null||u.addEventListener("keydown",d),u==null||u.addEventListener("keyup",p),window.addEventListener("blur",m),window.addEventListener("contextmenu",m),()=>{u==null||u.removeEventListener("keydown",d),u==null||u.removeEventListener("keyup",p),window.removeEventListener("blur",m),window.removeEventListener("contextmenu",m)}}},[t,i]),r}function bA(t,e,r){return t.filter(i=>r||i.length===e.size).some(i=>i.every(n=>e.has(n)))}function vA(t,e){return e.includes(t)?"code":"key"}const xY=()=>{const t=tr();return ot.useMemo(()=>({zoomIn:e=>{const{panZoom:r}=t.getState();return r?r.scaleBy(1.2,e):Promise.resolve(!1)},zoomOut:e=>{const{panZoom:r}=t.getState();return r?r.scaleBy(1/1.2,e):Promise.resolve(!1)},zoomTo:(e,r)=>{const{panZoom:i}=t.getState();return i?i.scaleTo(e,r):Promise.resolve(!1)},getZoom:()=>t.getState().transform[2],setViewport:async(e,r)=>{const{transform:[i,n,s],panZoom:o}=t.getState();return o?(await o.setViewport({x:e.x??i,y:e.y??n,zoom:e.zoom??s},r),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[e,r,i]=t.getState().transform;return{x:e,y:r,zoom:i}},setCenter:async(e,r,i)=>t.getState().setCenter(e,r,i),fitBounds:async(e,r)=>{const{width:i,height:n,minZoom:s,maxZoom:o,panZoom:c}=t.getState(),u=tw(e,i,n,s,o,(r==null?void 0:r.padding)??.1);return c?(await c.setViewport(u,{duration:r==null?void 0:r.duration,ease:r==null?void 0:r.ease,interpolate:r==null?void 0:r.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(e,r={})=>{const{transform:i,snapGrid:n,snapToGrid:s,domNode:o}=t.getState();if(!o)return e;const{x:c,y:u}=o.getBoundingClientRect(),h={x:e.x-c,y:e.y-u},d=r.snapGrid??n,p=r.snapToGrid??s;return ch(h,i,p,d)},flowToScreenPosition:e=>{const{transform:r,domNode:i}=t.getState();if(!i)return e;const{x:n,y:s}=i.getBoundingClientRect(),o=Rf(e,r);return{x:o.x+n,y:o.y+s}}}),[])};function wR(t,e){const r=[],i=new Map,n=[];for(const s of t)if(s.type==="add"){n.push(s);continue}else if(s.type==="remove"||s.type==="replace")i.set(s.id,[s]);else{const o=i.get(s.id);o?o.push(s):i.set(s.id,[s])}for(const s of e){const o=i.get(s.id);if(!o){r.push(s);continue}if(o[0].type==="remove")continue;if(o[0].type==="replace"){r.push({...o[0].item});continue}const c={...s};for(const u of o)bY(u,c);r.push(c)}return n.length&&n.forEach(s=>{s.index!==void 0?r.splice(s.index,0,{...s.item}):r.push({...s.item})}),r}function bY(t,e){switch(t.type){case"select":{e.selected=t.selected;break}case"position":{typeof t.position<"u"&&(e.position=t.position),typeof t.dragging<"u"&&(e.dragging=t.dragging);break}case"dimensions":{typeof t.dimensions<"u"&&(e.measured={...t.dimensions},t.setAttributes&&((t.setAttributes===!0||t.setAttributes==="width")&&(e.width=t.dimensions.width),(t.setAttributes===!0||t.setAttributes==="height")&&(e.height=t.dimensions.height))),typeof t.resizing=="boolean"&&(e.resizing=t.resizing);break}}}function SR(t,e){return wR(t,e)}function kR(t,e){return wR(t,e)}function $s(t,e){return{id:t,type:"select",selected:e}}function dl(t,e=new Set,r=!1){const i=[];for(const[n,s]of t){const o=e.has(n);!(s.selected===void 0&&!o)&&s.selected!==o&&(r&&(s.selected=o),i.push($s(s.id,o)))}return i}function CA({items:t=[],lookup:e}){var n;const r=[],i=new Map(t.map(s=>[s.id,s]));for(const[s,o]of t.entries()){const c=e.get(o.id),u=((n=c==null?void 0:c.internals)==null?void 0:n.userNode)??c;u!==void 0&&u!==o&&r.push({id:o.id,item:o,type:"replace"}),u===void 0&&r.push({item:o,type:"add",index:s})}for(const[s]of e)i.get(s)===void 0&&r.push({id:s,type:"remove"});return r}function wA(t){return{id:t.id,type:"remove"}}const SA=t=>HU(t),vY=t=>YO(t);function _R(t){return ot.forwardRef(t)}function kA(t){const[e,r]=ot.useState(BigInt(0)),[i]=ot.useState(()=>CY(()=>r(n=>n+BigInt(1))));return zC(()=>{const n=i.get();n.length&&(t(n),i.reset())},[e]),i}function CY(t){let e=[];return{get:()=>e,reset:()=>{e=[]},push:r=>{e.push(r),t()}}}const TR=ot.createContext(null);function wY({children:t}){const e=tr(),r=ot.useCallback(c=>{const{nodes:u=[],setNodes:h,hasDefaultNodes:d,onNodesChange:p,nodeLookup:m,fitViewQueued:g,onNodesChangeMiddlewareMap:x}=e.getState();let v=u;for(const w of c)v=typeof w=="function"?w(v):w;let b=CA({items:v,lookup:m});for(const w of x.values())b=w(b);d&&h(v),b.length>0?p==null||p(b):g&&window.requestAnimationFrame(()=>{const{fitViewQueued:w,nodes:T,setNodes:k}=e.getState();w&&k(T)})},[]),i=kA(r),n=ot.useCallback(c=>{const{edges:u=[],setEdges:h,hasDefaultEdges:d,onEdgesChange:p,edgeLookup:m}=e.getState();let g=u;for(const x of c)g=typeof x=="function"?x(g):x;d?h(g):p&&p(CA({items:g,lookup:m}))},[]),s=kA(n),o=ot.useMemo(()=>({nodeQueue:i,edgeQueue:s}),[]);return S.jsx(TR.Provider,{value:o,children:t})}function SY(){const t=ot.useContext(TR);if(!t)throw new Error("useBatchContext must be used within a BatchProvider");return t}const kY=t=>!!t.panZoom;function wp(){const t=xY(),e=tr(),r=SY(),i=we(kY),n=ot.useMemo(()=>{const s=p=>e.getState().nodeLookup.get(p),o=p=>{r.nodeQueue.push(p)},c=p=>{r.edgeQueue.push(p)},u=p=>{var w,T;const{nodeLookup:m,nodeOrigin:g}=e.getState(),x=SA(p)?p:m.get(p.id),v=x.parentId?KO(x.position,x.measured,x.parentId,m,g):x.position,b={...x,position:v,width:((w=x.measured)==null?void 0:w.width)??x.width,height:((T=x.measured)==null?void 0:T.height)??x.height};return zl(b)},h=(p,m,g={replace:!1})=>{o(x=>x.map(v=>{if(v.id===p){const b=typeof m=="function"?m(v):m;return g.replace&&SA(b)?b:{...v,...b}}return v}))},d=(p,m,g={replace:!1})=>{c(x=>x.map(v=>{if(v.id===p){const b=typeof m=="function"?m(v):m;return g.replace&&vY(b)?b:{...v,...b}}return v}))};return{getNodes:()=>e.getState().nodes.map(p=>({...p})),getNode:p=>{var m;return(m=s(p))==null?void 0:m.internals.userNode},getInternalNode:s,getEdges:()=>{const{edges:p=[]}=e.getState();return p.map(m=>({...m}))},getEdge:p=>e.getState().edgeLookup.get(p),setNodes:o,setEdges:c,addNodes:p=>{const m=Array.isArray(p)?p:[p];r.nodeQueue.push(g=>[...g,...m])},addEdges:p=>{const m=Array.isArray(p)?p:[p];r.edgeQueue.push(g=>[...g,...m])},toObject:()=>{const{nodes:p=[],edges:m=[],transform:g}=e.getState(),[x,v,b]=g;return{nodes:p.map(w=>({...w})),edges:m.map(w=>({...w})),viewport:{x,y:v,zoom:b}}},deleteElements:async({nodes:p=[],edges:m=[]})=>{const{nodes:g,edges:x,onNodesDelete:v,onEdgesDelete:b,triggerNodeChanges:w,triggerEdgeChanges:T,onDelete:k,onBeforeDelete:E}=e.getState(),{nodes:L,edges:A}=await WU({nodesToRemove:p,edgesToRemove:m,nodes:g,edges:x,onBeforeDelete:E}),R=A.length>0,j=L.length>0;if(R){const Y=A.map(wA);b==null||b(A),T(Y)}if(j){const Y=L.map(wA);v==null||v(L),w(Y)}return(j||R)&&(k==null||k({nodes:L,edges:A})),{deletedNodes:L,deletedEdges:A}},getIntersectingNodes:(p,m=!0,g)=>{const x=XE(p),v=x?p:u(p),b=g!==void 0;return v?(g||e.getState().nodes).filter(w=>{const T=e.getState().nodeLookup.get(w.id);if(T&&!x&&(w.id===p.id||!T.internals.positionAbsolute))return!1;const k=zl(b?w:T),E=Uu(k,v);return m&&E>0||E>=k.width*k.height||E>=v.width*v.height}):[]},isNodeIntersecting:(p,m,g=!0)=>{const v=XE(p)?p:u(p);if(!v)return!1;const b=Uu(v,m);return g&&b>0||b>=m.width*m.height||b>=v.width*v.height},updateNode:h,updateNodeData:(p,m,g={replace:!1})=>{h(p,x=>{const v=typeof m=="function"?m(x):m;return g.replace?{...x,data:v}:{...x,data:{...x.data,...v}}},g)},updateEdge:d,updateEdgeData:(p,m,g={replace:!1})=>{d(p,x=>{const v=typeof m=="function"?m(x):m;return g.replace?{...x,data:v}:{...x,data:{...x.data,...v}}},g)},getNodesBounds:p=>{const{nodeLookup:m,nodeOrigin:g}=e.getState();return UU(p,{nodeLookup:m,nodeOrigin:g})},getHandleConnections:({type:p,id:m,nodeId:g})=>{var x;return Array.from(((x=e.getState().connectionLookup.get(`${g}-${p}${m?`-${m}`:""}`))==null?void 0:x.values())??[])},getNodeConnections:({type:p,handleId:m,nodeId:g})=>{var x;return Array.from(((x=e.getState().connectionLookup.get(`${g}${p?m?`-${p}-${m}`:`-${p}`:""}`))==null?void 0:x.values())??[])},fitView:async p=>{const m=e.getState().fitViewResolver??KU();return e.setState({fitViewQueued:!0,fitViewOptions:p,fitViewResolver:m}),r.nodeQueue.push(g=>[...g]),m.promise}}},[]);return ot.useMemo(()=>({...n,...t,viewportInitialized:i}),[i])}const _A=t=>t.selected,_Y=typeof window<"u"?window:void 0;function TY({deleteKeyCode:t,multiSelectionKeyCode:e}){const r=tr(),{deleteElements:i}=wp(),n=Yu(t,{actInsideInputWithModifier:!1}),s=Yu(e,{target:_Y});ot.useEffect(()=>{if(n){const{edges:o,nodes:c}=r.getState();i({nodes:c.filter(_A),edges:o.filter(_A)}),r.setState({nodesSelectionActive:!1})}},[n]),ot.useEffect(()=>{r.setState({multiSelectionActive:s})},[s])}function EY(t){const e=tr();ot.useEffect(()=>{const r=()=>{var n,s,o,c;if(!t.current||!(((s=(n=t.current).checkVisibility)==null?void 0:s.call(n))??!0))return!1;const i=ew(t.current);(i.height===0||i.width===0)&&((c=(o=e.getState()).onError)==null||c.call(o,"004",Mn.error004())),e.setState({width:i.width||500,height:i.height||500})};if(t.current){r(),window.addEventListener("resize",r);const i=new ResizeObserver(()=>r());return i.observe(t.current),()=>{window.removeEventListener("resize",r),i&&t.current&&i.unobserve(t.current)}}},[])}const Sp={position:"absolute",width:"100%",height:"100%",top:0,left:0},AY=t=>({userSelectionActive:t.userSelectionActive,lib:t.lib,connectionInProgress:t.connection.inProgress});function BY({onPaneContextMenu:t,zoomOnScroll:e=!0,zoomOnPinch:r=!0,panOnScroll:i=!1,panOnScrollSpeed:n=.5,panOnScrollMode:s=Xs.Free,zoomOnDoubleClick:o=!0,panOnDrag:c=!0,defaultViewport:u,translateExtent:h,minZoom:d,maxZoom:p,zoomActivationKeyCode:m,preventScrolling:g=!0,children:x,noWheelClassName:v,noPanClassName:b,onViewportChange:w,isControlledViewport:T,paneClickDistance:k,selectionOnDrag:E}){const L=tr(),A=ot.useRef(null),{userSelectionActive:R,lib:j,connectionInProgress:Y}=we(AY,Je),V=Yu(m),O=ot.useRef();EY(A);const z=ot.useCallback(X=>{w==null||w({x:X[0],y:X[1],zoom:X[2]}),T||L.setState({transform:X})},[w,T]);return ot.useEffect(()=>{if(A.current){O.current=DG({domNode:A.current,minZoom:d,maxZoom:p,translateExtent:h,viewport:u,onDraggingChange:N=>L.setState(P=>P.paneDragging===N?P:{paneDragging:N}),onPanZoomStart:(N,P)=>{const{onViewportChangeStart:$,onMoveStart:D}=L.getState();D==null||D(N,P),$==null||$(P)},onPanZoom:(N,P)=>{const{onViewportChange:$,onMove:D}=L.getState();D==null||D(N,P),$==null||$(P)},onPanZoomEnd:(N,P)=>{const{onViewportChangeEnd:$,onMoveEnd:D}=L.getState();D==null||D(N,P),$==null||$(P)}});const{x:X,y:M,zoom:I}=O.current.getViewport();return L.setState({panZoom:O.current,transform:[X,M,I],domNode:A.current.closest(".react-flow")}),()=>{var N;(N=O.current)==null||N.destroy()}}},[]),ot.useEffect(()=>{var X;(X=O.current)==null||X.update({onPaneContextMenu:t,zoomOnScroll:e,zoomOnPinch:r,panOnScroll:i,panOnScrollSpeed:n,panOnScrollMode:s,zoomOnDoubleClick:o,panOnDrag:c,zoomActivationKeyPressed:V,preventScrolling:g,noPanClassName:b,userSelectionActive:R,noWheelClassName:v,lib:j,onTransformChange:z,connectionInProgress:Y,selectionOnDrag:E,paneClickDistance:k})},[t,e,r,i,n,s,o,c,V,g,b,R,v,j,z,Y,E,k]),S.jsx("div",{className:"react-flow__renderer",ref:A,style:Sp,children:x})}const LY=t=>({userSelectionActive:t.userSelectionActive,userSelectionRect:t.userSelectionRect});function MY(){const{userSelectionActive:t,userSelectionRect:e}=we(LY,Je);return t&&e?S.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:e.width,height:e.height,transform:`translate(${e.x}px, ${e.y}px)`}}):null}const L0=(t,e)=>r=>{r.target===e.current&&(t==null||t(r))},NY=t=>({userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable,connectionInProgress:t.connection.inProgress,dragging:t.paneDragging});function OY({isSelecting:t,selectionKeyPressed:e,selectionMode:r=Pu.Full,panOnDrag:i,paneClickDistance:n,selectionOnDrag:s,onSelectionStart:o,onSelectionEnd:c,onPaneClick:u,onPaneContextMenu:h,onPaneScroll:d,onPaneMouseEnter:p,onPaneMouseMove:m,onPaneMouseLeave:g,children:x}){const v=tr(),{userSelectionActive:b,elementsSelectable:w,dragging:T,connectionInProgress:k}=we(NY,Je),E=w&&(t||b),L=ot.useRef(null),A=ot.useRef(),R=ot.useRef(new Set),j=ot.useRef(new Set),Y=ot.useRef(!1),V=$=>{if(Y.current||k){Y.current=!1;return}u==null||u($),v.getState().resetSelectedElements(),v.setState({nodesSelectionActive:!1})},O=$=>{if(Array.isArray(i)&&(i!=null&&i.includes(2))){$.preventDefault();return}h==null||h($)},z=d?$=>d($):void 0,X=$=>{Y.current&&($.stopPropagation(),Y.current=!1)},M=$=>{var J,et;const{domNode:D}=v.getState();if(A.current=D==null?void 0:D.getBoundingClientRect(),!A.current)return;const q=$.target===L.current;if(!q&&!!$.target.closest(".nokey")||!t||!(s&&q||e)||$.button!==0||!$.isPrimary)return;(et=(J=$.target)==null?void 0:J.setPointerCapture)==null||et.call(J,$.pointerId),Y.current=!1;const{x:H,y:Q}=on($.nativeEvent,A.current);v.setState({userSelectionRect:{width:0,height:0,startX:H,startY:Q,x:H,y:Q}}),q||($.stopPropagation(),$.preventDefault())},I=$=>{const{userSelectionRect:D,transform:q,nodeLookup:G,edgeLookup:Z,connectionLookup:H,triggerNodeChanges:Q,triggerEdgeChanges:J,defaultEdgeOptions:et,resetSelectedElements:at}=v.getState();if(!A.current||!D)return;const{x:lt,y:xt}=on($.nativeEvent,A.current),{startX:mt,startY:bt}=D;if(!Y.current){const Yt=e?0:n;if(Math.hypot(lt-mt,xt-bt)<=Yt)return;at(),o==null||o($)}Y.current=!0;const Tt={startX:mt,startY:bt,x:lt<mt?lt:mt,y:xt<bt?xt:bt,width:Math.abs(lt-mt),height:Math.abs(xt-bt)},_t=R.current,Mt=j.current;R.current=new Set(J2(G,Tt,q,r===Pu.Partial,!0).map(Yt=>Yt.id)),j.current=new Set;const Et=(et==null?void 0:et.selectable)??!0;for(const Yt of R.current){const zt=H.get(Yt);if(zt)for(const{edgeId:ve}of zt.values()){const Ee=Z.get(ve);Ee&&(Ee.selectable??Et)&&j.current.add(ve)}}if(!QE(_t,R.current)){const Yt=dl(G,R.current,!0);Q(Yt)}if(!QE(Mt,j.current)){const Yt=dl(Z,j.current);J(Yt)}v.setState({userSelectionRect:Tt,userSelectionActive:!0,nodesSelectionActive:!1})},N=$=>{var D,q;$.button===0&&((q=(D=$.target)==null?void 0:D.releasePointerCapture)==null||q.call(D,$.pointerId),!b&&$.target===L.current&&v.getState().userSelectionRect&&(V==null||V($)),v.setState({userSelectionActive:!1,userSelectionRect:null}),Y.current&&(c==null||c($),v.setState({nodesSelectionActive:R.current.size>0})))},P=i===!0||Array.isArray(i)&&i.includes(0);return S.jsxs("div",{className:Sr(["react-flow__pane",{draggable:P,dragging:T,selection:t}]),onClick:E?void 0:L0(V,L),onContextMenu:L0(O,L),onWheel:L0(z,L),onPointerEnter:E?void 0:p,onPointerMove:E?I:m,onPointerUp:E?N:void 0,onPointerDownCapture:E?M:void 0,onClickCapture:E?X:void 0,onPointerLeave:g,ref:L,style:Sp,children:[x,S.jsx(MY,{})]})}function jC({id:t,store:e,unselect:r=!1,nodeRef:i}){const{addSelectedNodes:n,unselectNodesAndEdges:s,multiSelectionActive:o,nodeLookup:c,onError:u}=e.getState(),h=c.get(t);if(!h){u==null||u("012",Mn.error012(t));return}e.setState({nodesSelectionActive:!1}),h.selected?(r||h.selected&&o)&&(s({nodes:[h],edges:[]}),requestAnimationFrame(()=>{var d;return(d=i==null?void 0:i.current)==null?void 0:d.blur()})):n([t])}function ER({nodeRef:t,disabled:e=!1,noDragClassName:r,handleSelector:i,nodeId:n,isSelectable:s,nodeClickDistance:o}){const c=tr(),[u,h]=ot.useState(!1),d=ot.useRef();return ot.useEffect(()=>{d.current=CG({getStoreItems:()=>c.getState(),onNodeMouseDown:p=>{jC({id:p,store:c,nodeRef:t})},onDragStart:()=>{h(!0)},onDragStop:()=>{h(!1)}})},[]),ot.useEffect(()=>{if(!(e||!t.current||!d.current))return d.current.update({noDragClassName:r,handleSelector:i,domNode:t.current,isSelectable:s,nodeId:n,nodeClickDistance:o}),()=>{var p;(p=d.current)==null||p.destroy()}},[r,i,e,s,t,n,o]),u}const RY=t=>e=>e.selected&&(e.draggable||t&&typeof e.draggable>"u");function AR(){const t=tr();return ot.useCallback(r=>{const{nodeExtent:i,snapToGrid:n,snapGrid:s,nodesDraggable:o,onError:c,updateNodePositions:u,nodeLookup:h,nodeOrigin:d}=t.getState(),p=new Map,m=RY(o),g=n?s[0]:5,x=n?s[1]:5,v=r.direction.x*g*r.factor,b=r.direction.y*x*r.factor;for(const[,w]of h){if(!m(w))continue;let T={x:w.internals.positionAbsolute.x+v,y:w.internals.positionAbsolute.y+b};n&&(T=lh(T,s));const{position:k,positionAbsolute:E}=VO({nodeId:w.id,nextPosition:T,nodeLookup:h,nodeExtent:i,nodeOrigin:d,onError:c});w.position=k,w.internals.positionAbsolute=E,p.set(w.id,w)}u(p)},[])}const ow=ot.createContext(null),DY=ow.Provider;ow.Consumer;const BR=()=>ot.useContext(ow),FY=t=>({connectOnClick:t.connectOnClick,noPanClassName:t.noPanClassName,rfId:t.rfId}),IY=(t,e,r)=>i=>{const{connectionClickStartHandle:n,connectionMode:s,connection:o}=i,{fromHandle:c,toHandle:u,isValid:h}=o,d=(u==null?void 0:u.nodeId)===t&&(u==null?void 0:u.id)===e&&(u==null?void 0:u.type)===r;return{connectingFrom:(c==null?void 0:c.nodeId)===t&&(c==null?void 0:c.id)===e&&(c==null?void 0:c.type)===r,connectingTo:d,clickConnecting:(n==null?void 0:n.nodeId)===t&&(n==null?void 0:n.id)===e&&(n==null?void 0:n.type)===r,isPossibleEndHandle:s===Il.Strict?(c==null?void 0:c.type)!==r:t!==(c==null?void 0:c.nodeId)||e!==(c==null?void 0:c.id),connectionInProcess:!!c,clickConnectionInProcess:!!n,valid:d&&h}};function qY({type:t="source",position:e=Gt.Top,isValidConnection:r,isConnectable:i=!0,isConnectableStart:n=!0,isConnectableEnd:s=!0,id:o,onConnect:c,children:u,className:h,onMouseDown:d,onTouchStart:p,...m},g){var I,N;const x=o||null,v=t==="target",b=tr(),w=BR(),{connectOnClick:T,noPanClassName:k,rfId:E}=we(FY,Je),{connectingFrom:L,connectingTo:A,clickConnecting:R,isPossibleEndHandle:j,connectionInProcess:Y,clickConnectionInProcess:V,valid:O}=we(IY(w,x,t),Je);w||(N=(I=b.getState()).onError)==null||N.call(I,"010",Mn.error010());const z=P=>{const{defaultEdgeOptions:$,onConnect:D,hasDefaultEdges:q}=b.getState(),G={...$,...P};if(q){const{edges:Z,setEdges:H}=b.getState();H(aG(G,Z))}D==null||D(G),c==null||c(G)},X=P=>{if(!w)return;const $=eR(P.nativeEvent);if(n&&($&&P.button===0||!$)){const D=b.getState();qC.onPointerDown(P.nativeEvent,{handleDomNode:P.currentTarget,autoPanOnConnect:D.autoPanOnConnect,connectionMode:D.connectionMode,connectionRadius:D.connectionRadius,domNode:D.domNode,nodeLookup:D.nodeLookup,lib:D.lib,isTarget:v,handleId:x,nodeId:w,flowId:D.rfId,panBy:D.panBy,cancelConnection:D.cancelConnection,onConnectStart:D.onConnectStart,onConnectEnd:(...q)=>{var G,Z;return(Z=(G=b.getState()).onConnectEnd)==null?void 0:Z.call(G,...q)},updateConnection:D.updateConnection,onConnect:z,isValidConnection:r||((...q)=>{var G,Z;return((Z=(G=b.getState()).isValidConnection)==null?void 0:Z.call(G,...q))??!0}),getTransform:()=>b.getState().transform,getFromHandle:()=>b.getState().connection.fromHandle,autoPanSpeed:D.autoPanSpeed,dragThreshold:D.connectionDragThreshold})}$?d==null||d(P):p==null||p(P)},M=P=>{const{onClickConnectStart:$,onClickConnectEnd:D,connectionClickStartHandle:q,connectionMode:G,isValidConnection:Z,lib:H,rfId:Q,nodeLookup:J,connection:et}=b.getState();if(!w||!q&&!n)return;if(!q){$==null||$(P.nativeEvent,{nodeId:w,handleId:x,handleType:t}),b.setState({connectionClickStartHandle:{nodeId:w,type:t,id:x}});return}const at=JO(P.target),lt=r||Z,{connection:xt,isValid:mt}=qC.isValid(P.nativeEvent,{handle:{nodeId:w,id:x,type:t},connectionMode:G,fromNodeId:q.nodeId,fromHandleId:q.id||null,fromType:q.type,isValidConnection:lt,flowId:Q,doc:at,lib:H,nodeLookup:J});mt&&xt&&z(xt);const bt=structuredClone(et);delete bt.inProgress,bt.toPosition=bt.toHandle?bt.toHandle.position:null,D==null||D(P,bt),b.setState({connectionClickStartHandle:null})};return S.jsx("div",{"data-handleid":x,"data-nodeid":w,"data-handlepos":e,"data-id":`${E}-${w}-${x}-${t}`,className:Sr(["react-flow__handle",`react-flow__handle-${e}`,"nodrag",k,h,{source:!v,target:v,connectable:i,connectablestart:n,connectableend:s,clickconnecting:R,connectingfrom:L,connectingto:A,valid:O,connectionindicator:i&&(!Y||j)&&(Y||V?s:n)}]),onMouseDown:X,onTouchStart:X,onClick:T?M:void 0,ref:g,...m,children:u})}const Ka=ot.memo(_R(qY));function zY({data:t,isConnectable:e,sourcePosition:r=Gt.Bottom}){return S.jsxs(S.Fragment,{children:[t==null?void 0:t.label,S.jsx(Ka,{type:"source",position:r,isConnectable:e})]})}function jY({data:t,isConnectable:e,targetPosition:r=Gt.Top,sourcePosition:i=Gt.Bottom}){return S.jsxs(S.Fragment,{children:[S.jsx(Ka,{type:"target",position:r,isConnectable:e}),t==null?void 0:t.label,S.jsx(Ka,{type:"source",position:i,isConnectable:e})]})}function $Y(){return null}function PY({data:t,isConnectable:e,targetPosition:r=Gt.Top}){return S.jsxs(S.Fragment,{children:[S.jsx(Ka,{type:"target",position:r,isConnectable:e}),t==null?void 0:t.label]})}const Df={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},TA={input:zY,default:jY,output:PY,group:$Y};function HY(t){var e,r,i,n;return t.internals.handleBounds===void 0?{width:t.width??t.initialWidth??((e=t.style)==null?void 0:e.width),height:t.height??t.initialHeight??((r=t.style)==null?void 0:r.height)}:{width:t.width??((i=t.style)==null?void 0:i.width),height:t.height??((n=t.style)==null?void 0:n.height)}}const UY=t=>{const{width:e,height:r,x:i,y:n}=oh(t.nodeLookup,{filter:s=>!!s.selected});return{width:sn(e)?e:null,height:sn(r)?r:null,userSelectionActive:t.userSelectionActive,transformString:`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]}) translate(${i}px,${n}px)`}};function GY({onSelectionContextMenu:t,noPanClassName:e,disableKeyboardA11y:r}){const i=tr(),{width:n,height:s,transformString:o,userSelectionActive:c}=we(UY,Je),u=AR(),h=ot.useRef(null);ot.useEffect(()=>{var g;r||(g=h.current)==null||g.focus({preventScroll:!0})},[r]);const d=!c&&n!==null&&s!==null;if(ER({nodeRef:h,disabled:!d}),!d)return null;const p=t?g=>{const x=i.getState().nodes.filter(v=>v.selected);t(g,x)}:void 0,m=g=>{Object.prototype.hasOwnProperty.call(Df,g.key)&&(g.preventDefault(),u({direction:Df[g.key],factor:g.shiftKey?4:1}))};return S.jsx("div",{className:Sr(["react-flow__nodesselection","react-flow__container",e]),style:{transform:o},children:S.jsx("div",{ref:h,className:"react-flow__nodesselection-rect",onContextMenu:p,tabIndex:r?void 0:-1,onKeyDown:r?void 0:m,style:{width:n,height:s}})})}const EA=typeof window<"u"?window:void 0,YY=t=>({nodesSelectionActive:t.nodesSelectionActive,userSelectionActive:t.userSelectionActive});function LR({children:t,onPaneClick:e,onPaneMouseEnter:r,onPaneMouseMove:i,onPaneMouseLeave:n,onPaneContextMenu:s,onPaneScroll:o,paneClickDistance:c,deleteKeyCode:u,selectionKeyCode:h,selectionOnDrag:d,selectionMode:p,onSelectionStart:m,onSelectionEnd:g,multiSelectionKeyCode:x,panActivationKeyCode:v,zoomActivationKeyCode:b,elementsSelectable:w,zoomOnScroll:T,zoomOnPinch:k,panOnScroll:E,panOnScrollSpeed:L,panOnScrollMode:A,zoomOnDoubleClick:R,panOnDrag:j,defaultViewport:Y,translateExtent:V,minZoom:O,maxZoom:z,preventScrolling:X,onSelectionContextMenu:M,noWheelClassName:I,noPanClassName:N,disableKeyboardA11y:P,onViewportChange:$,isControlledViewport:D}){const{nodesSelectionActive:q,userSelectionActive:G}=we(YY,Je),Z=Yu(h,{target:EA}),H=Yu(v,{target:EA}),Q=H||j,J=H||E,et=d&&Q!==!0,at=Z||G||et;return TY({deleteKeyCode:u,multiSelectionKeyCode:x}),S.jsx(BY,{onPaneContextMenu:s,elementsSelectable:w,zoomOnScroll:T,zoomOnPinch:k,panOnScroll:J,panOnScrollSpeed:L,panOnScrollMode:A,zoomOnDoubleClick:R,panOnDrag:!Z&&Q,defaultViewport:Y,translateExtent:V,minZoom:O,maxZoom:z,zoomActivationKeyCode:b,preventScrolling:X,noWheelClassName:I,noPanClassName:N,onViewportChange:$,isControlledViewport:D,paneClickDistance:c,selectionOnDrag:et,children:S.jsxs(OY,{onSelectionStart:m,onSelectionEnd:g,onPaneClick:e,onPaneMouseEnter:r,onPaneMouseMove:i,onPaneMouseLeave:n,onPaneContextMenu:s,onPaneScroll:o,panOnDrag:Q,isSelecting:!!at,selectionMode:p,selectionKeyPressed:Z,paneClickDistance:c,selectionOnDrag:et,children:[t,q&&S.jsx(GY,{onSelectionContextMenu:M,noPanClassName:N,disableKeyboardA11y:P})]})})}LR.displayName="FlowRenderer";const VY=ot.memo(LR),WY=t=>e=>t?J2(e.nodeLookup,{x:0,y:0,width:e.width,height:e.height},e.transform,!0).map(r=>r.id):Array.from(e.nodeLookup.keys());function XY(t){return we(ot.useCallback(WY(t),[t]),Je)}const QY=t=>t.updateNodeInternals;function ZY(){const t=we(QY),[e]=ot.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(r=>{const i=new Map;r.forEach(n=>{const s=n.target.getAttribute("data-id");i.set(s,{id:s,nodeElement:n.target,force:!0})}),t(i)}));return ot.useEffect(()=>()=>{e==null||e.disconnect()},[e]),e}function KY({node:t,nodeType:e,hasDimensions:r,resizeObserver:i}){const n=tr(),s=ot.useRef(null),o=ot.useRef(null),c=ot.useRef(t.sourcePosition),u=ot.useRef(t.targetPosition),h=ot.useRef(e),d=r&&!!t.internals.handleBounds;return ot.useEffect(()=>{s.current&&!t.hidden&&(!d||o.current!==s.current)&&(o.current&&(i==null||i.unobserve(o.current)),i==null||i.observe(s.current),o.current=s.current)},[d,t.hidden]),ot.useEffect(()=>()=>{o.current&&(i==null||i.unobserve(o.current),o.current=null)},[]),ot.useEffect(()=>{if(s.current){const p=h.current!==e,m=c.current!==t.sourcePosition,g=u.current!==t.targetPosition;(p||m||g)&&(h.current=e,c.current=t.sourcePosition,u.current=t.targetPosition,n.getState().updateNodeInternals(new Map([[t.id,{id:t.id,nodeElement:s.current,force:!0}]])))}},[t.id,e,t.sourcePosition,t.targetPosition]),s}function JY({id:t,onClick:e,onMouseEnter:r,onMouseMove:i,onMouseLeave:n,onContextMenu:s,onDoubleClick:o,nodesDraggable:c,elementsSelectable:u,nodesConnectable:h,nodesFocusable:d,resizeObserver:p,noDragClassName:m,noPanClassName:g,disableKeyboardA11y:x,rfId:v,nodeTypes:b,nodeClickDistance:w,onError:T}){const{node:k,internals:E,isParent:L}=we(lt=>{const xt=lt.nodeLookup.get(t),mt=lt.parentLookup.has(t);return{node:xt,internals:xt.internals,isParent:mt}},Je);let A=k.type||"default",R=(b==null?void 0:b[A])||TA[A];R===void 0&&(T==null||T("003",Mn.error003(A)),A="default",R=(b==null?void 0:b.default)||TA.default);const j=!!(k.draggable||c&&typeof k.draggable>"u"),Y=!!(k.selectable||u&&typeof k.selectable>"u"),V=!!(k.connectable||h&&typeof k.connectable>"u"),O=!!(k.focusable||d&&typeof k.focusable>"u"),z=tr(),X=ZO(k),M=KY({node:k,nodeType:A,hasDimensions:X,resizeObserver:p}),I=ER({nodeRef:M,disabled:k.hidden||!j,noDragClassName:m,handleSelector:k.dragHandle,nodeId:t,isSelectable:Y,nodeClickDistance:w}),N=AR();if(k.hidden)return null;const P=pa(k),$=HY(k),D=Y||j||e||r||i||n,q=r?lt=>r(lt,{...E.userNode}):void 0,G=i?lt=>i(lt,{...E.userNode}):void 0,Z=n?lt=>n(lt,{...E.userNode}):void 0,H=s?lt=>s(lt,{...E.userNode}):void 0,Q=o?lt=>o(lt,{...E.userNode}):void 0,J=lt=>{const{selectNodesOnDrag:xt,nodeDragThreshold:mt}=z.getState();Y&&(!xt||!j||mt>0)&&jC({id:t,store:z,nodeRef:M}),e&&e(lt,{...E.userNode})},et=lt=>{if(!(tR(lt.nativeEvent)||x)){if(PO.includes(lt.key)&&Y){const xt=lt.key==="Escape";jC({id:t,store:z,unselect:xt,nodeRef:M})}else if(j&&k.selected&&Object.prototype.hasOwnProperty.call(Df,lt.key)){lt.preventDefault();const{ariaLabelConfig:xt}=z.getState();z.setState({ariaLiveMessage:xt["node.a11yDescription.ariaLiveMessage"]({direction:lt.key.replace("Arrow","").toLowerCase(),x:~~E.positionAbsolute.x,y:~~E.positionAbsolute.y})}),N({direction:Df[lt.key],factor:lt.shiftKey?4:1})}}},at=()=>{var Mt;if(x||!((Mt=M.current)!=null&&Mt.matches(":focus-visible")))return;const{transform:lt,width:xt,height:mt,autoPanOnNodeFocus:bt,setCenter:Tt}=z.getState();if(!bt)return;J2(new Map([[t,k]]),{x:0,y:0,width:xt,height:mt},lt,!0).length>0||Tt(k.position.x+P.width/2,k.position.y+P.height/2,{zoom:lt[2]})};return S.jsx("div",{className:Sr(["react-flow__node",`react-flow__node-${A}`,{[g]:j},k.className,{selected:k.selected,selectable:Y,parent:L,draggable:j,dragging:I}]),ref:M,style:{zIndex:E.z,transform:`translate(${E.positionAbsolute.x}px,${E.positionAbsolute.y}px)`,pointerEvents:D?"all":"none",visibility:X?"visible":"hidden",...k.style,...$},"data-id":t,"data-testid":`rf__node-${t}`,onMouseEnter:q,onMouseMove:G,onMouseLeave:Z,onContextMenu:H,onClick:J,onDoubleClick:Q,onKeyDown:O?et:void 0,tabIndex:O?0:void 0,onFocus:O?at:void 0,role:k.ariaRole??(O?"group":void 0),"aria-roledescription":"node","aria-describedby":x?void 0:`${bR}-${v}`,"aria-label":k.ariaLabel,...k.domAttributes,children:S.jsx(DY,{value:t,children:S.jsx(R,{id:t,data:k.data,type:A,positionAbsoluteX:E.positionAbsolute.x,positionAbsoluteY:E.positionAbsolute.y,selected:k.selected??!1,selectable:Y,draggable:j,deletable:k.deletable??!0,isConnectable:V,sourcePosition:k.sourcePosition,targetPosition:k.targetPosition,dragging:I,dragHandle:k.dragHandle,zIndex:E.z,parentId:k.parentId,...P})})})}var tV=ot.memo(JY);const eV=t=>({nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,nodesFocusable:t.nodesFocusable,elementsSelectable:t.elementsSelectable,onError:t.onError});function MR(t){const{nodesDraggable:e,nodesConnectable:r,nodesFocusable:i,elementsSelectable:n,onError:s}=we(eV,Je),o=XY(t.onlyRenderVisibleElements),c=ZY();return S.jsx("div",{className:"react-flow__nodes",style:Sp,children:o.map(u=>S.jsx(tV,{id:u,nodeTypes:t.nodeTypes,nodeExtent:t.nodeExtent,onClick:t.onNodeClick,onMouseEnter:t.onNodeMouseEnter,onMouseMove:t.onNodeMouseMove,onMouseLeave:t.onNodeMouseLeave,onContextMenu:t.onNodeContextMenu,onDoubleClick:t.onNodeDoubleClick,noDragClassName:t.noDragClassName,noPanClassName:t.noPanClassName,rfId:t.rfId,disableKeyboardA11y:t.disableKeyboardA11y,resizeObserver:c,nodesDraggable:e,nodesConnectable:r,nodesFocusable:i,elementsSelectable:n,nodeClickDistance:t.nodeClickDistance,onError:s},u))})}MR.displayName="NodeRenderer";const rV=ot.memo(MR);function iV(t){return we(ot.useCallback(r=>{if(!t)return r.edges.map(n=>n.id);const i=[];if(r.width&&r.height)for(const n of r.edges){const s=r.nodeLookup.get(n.source),o=r.nodeLookup.get(n.target);s&&o&&rG({sourceNode:s,targetNode:o,width:r.width,height:r.height,transform:r.transform})&&i.push(n.id)}return i},[t]),Je)}const nV=({color:t="none",strokeWidth:e=1})=>{const r={strokeWidth:e,...t&&{stroke:t}};return S.jsx("polyline",{className:"arrow",style:r,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},aV=({color:t="none",strokeWidth:e=1})=>{const r={strokeWidth:e,...t&&{stroke:t,fill:t}};return S.jsx("polyline",{className:"arrowclosed",style:r,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},AA={[Hu.Arrow]:nV,[Hu.ArrowClosed]:aV};function sV(t){const e=tr();return ot.useMemo(()=>{var n,s;return Object.prototype.hasOwnProperty.call(AA,t)?AA[t]:((s=(n=e.getState()).onError)==null||s.call(n,"009",Mn.error009(t)),null)},[t])}const oV=({id:t,type:e,color:r,width:i=12.5,height:n=12.5,markerUnits:s="strokeWidth",strokeWidth:o,orient:c="auto-start-reverse"})=>{const u=sV(e);return u?S.jsx("marker",{className:"react-flow__arrowhead",id:t,markerWidth:`${i}`,markerHeight:`${n}`,viewBox:"-10 -10 20 20",markerUnits:s,orient:c,refX:"0",refY:"0",children:S.jsx(u,{color:r,strokeWidth:o})}):null},NR=({defaultColor:t,rfId:e})=>{const r=we(s=>s.edges),i=we(s=>s.defaultEdgeOptions),n=ot.useMemo(()=>uG(r,{id:e,defaultColor:t,defaultMarkerStart:i==null?void 0:i.markerStart,defaultMarkerEnd:i==null?void 0:i.markerEnd}),[r,i,e,t]);return n.length?S.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:S.jsx("defs",{children:n.map(s=>S.jsx(oV,{id:s.id,type:s.type,color:s.color,width:s.width,height:s.height,markerUnits:s.markerUnits,strokeWidth:s.strokeWidth,orient:s.orient},s.id))})}):null};NR.displayName="MarkerDefinitions";var lV=ot.memo(NR);function OR({x:t,y:e,label:r,labelStyle:i,labelShowBg:n=!0,labelBgStyle:s,labelBgPadding:o=[2,4],labelBgBorderRadius:c=2,children:u,className:h,...d}){const[p,m]=ot.useState({x:1,y:0,width:0,height:0}),g=Sr(["react-flow__edge-textwrapper",h]),x=ot.useRef(null);return ot.useEffect(()=>{if(x.current){const v=x.current.getBBox();m({x:v.x,y:v.y,width:v.width,height:v.height})}},[r]),r?S.jsxs("g",{transform:`translate(${t-p.width/2} ${e-p.height/2})`,className:g,visibility:p.width?"visible":"hidden",...d,children:[n&&S.jsx("rect",{width:p.width+2*o[0],x:-o[0],y:-o[1],height:p.height+2*o[1],className:"react-flow__edge-textbg",style:s,rx:c,ry:c}),S.jsx("text",{className:"react-flow__edge-text",y:p.height/2,dy:"0.3em",ref:x,style:i,children:r}),u]}):null}OR.displayName="EdgeText";const cV=ot.memo(OR);function kp({path:t,labelX:e,labelY:r,label:i,labelStyle:n,labelShowBg:s,labelBgStyle:o,labelBgPadding:c,labelBgBorderRadius:u,interactionWidth:h=20,...d}){return S.jsxs(S.Fragment,{children:[S.jsx("path",{...d,d:t,fill:"none",className:Sr(["react-flow__edge-path",d.className])}),h?S.jsx("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:h,className:"react-flow__edge-interaction"}):null,i&&sn(e)&&sn(r)?S.jsx(cV,{x:e,y:r,label:i,labelStyle:n,labelShowBg:s,labelBgStyle:o,labelBgPadding:c,labelBgBorderRadius:u}):null]})}function BA({pos:t,x1:e,y1:r,x2:i,y2:n}){return t===Gt.Left||t===Gt.Right?[.5*(e+i),r]:[e,.5*(r+n)]}function RR({sourceX:t,sourceY:e,sourcePosition:r=Gt.Bottom,targetX:i,targetY:n,targetPosition:s=Gt.Top}){const[o,c]=BA({pos:r,x1:t,y1:e,x2:i,y2:n}),[u,h]=BA({pos:s,x1:i,y1:n,x2:t,y2:e}),[d,p,m,g]=rR({sourceX:t,sourceY:e,targetX:i,targetY:n,sourceControlX:o,sourceControlY:c,targetControlX:u,targetControlY:h});return[`M${t},${e} C${o},${c} ${u},${h} ${i},${n}`,d,p,m,g]}function DR(t){return ot.memo(({id:e,sourceX:r,sourceY:i,targetX:n,targetY:s,sourcePosition:o,targetPosition:c,label:u,labelStyle:h,labelShowBg:d,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:g,style:x,markerEnd:v,markerStart:b,interactionWidth:w})=>{const[T,k,E]=RR({sourceX:r,sourceY:i,sourcePosition:o,targetX:n,targetY:s,targetPosition:c}),L=t.isInternal?void 0:e;return S.jsx(kp,{id:L,path:T,labelX:k,labelY:E,label:u,labelStyle:h,labelShowBg:d,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:g,style:x,markerEnd:v,markerStart:b,interactionWidth:w})})}const uV=DR({isInternal:!1}),FR=DR({isInternal:!0});uV.displayName="SimpleBezierEdge";FR.displayName="SimpleBezierEdgeInternal";function IR(t){return ot.memo(({id:e,sourceX:r,sourceY:i,targetX:n,targetY:s,label:o,labelStyle:c,labelShowBg:u,labelBgStyle:h,labelBgPadding:d,labelBgBorderRadius:p,style:m,sourcePosition:g=Gt.Bottom,targetPosition:x=Gt.Top,markerEnd:v,markerStart:b,pathOptions:w,interactionWidth:T})=>{const[k,E,L]=DC({sourceX:r,sourceY:i,sourcePosition:g,targetX:n,targetY:s,targetPosition:x,borderRadius:w==null?void 0:w.borderRadius,offset:w==null?void 0:w.offset,stepPosition:w==null?void 0:w.stepPosition}),A=t.isInternal?void 0:e;return S.jsx(kp,{id:A,path:k,labelX:E,labelY:L,label:o,labelStyle:c,labelShowBg:u,labelBgStyle:h,labelBgPadding:d,labelBgBorderRadius:p,style:m,markerEnd:v,markerStart:b,interactionWidth:T})})}const qR=IR({isInternal:!1}),zR=IR({isInternal:!0});qR.displayName="SmoothStepEdge";zR.displayName="SmoothStepEdgeInternal";function jR(t){return ot.memo(({id:e,...r})=>{var n;const i=t.isInternal?void 0:e;return S.jsx(qR,{...r,id:i,pathOptions:ot.useMemo(()=>{var s;return{borderRadius:0,offset:(s=r.pathOptions)==null?void 0:s.offset}},[(n=r.pathOptions)==null?void 0:n.offset])})})}const hV=jR({isInternal:!1}),$R=jR({isInternal:!0});hV.displayName="StepEdge";$R.displayName="StepEdgeInternal";function PR(t){return ot.memo(({id:e,sourceX:r,sourceY:i,targetX:n,targetY:s,label:o,labelStyle:c,labelShowBg:u,labelBgStyle:h,labelBgPadding:d,labelBgBorderRadius:p,style:m,markerEnd:g,markerStart:x,interactionWidth:v})=>{const[b,w,T]=aR({sourceX:r,sourceY:i,targetX:n,targetY:s}),k=t.isInternal?void 0:e;return S.jsx(kp,{id:k,path:b,labelX:w,labelY:T,label:o,labelStyle:c,labelShowBg:u,labelBgStyle:h,labelBgPadding:d,labelBgBorderRadius:p,style:m,markerEnd:g,markerStart:x,interactionWidth:v})})}const dV=PR({isInternal:!1}),HR=PR({isInternal:!0});dV.displayName="StraightEdge";HR.displayName="StraightEdgeInternal";function UR(t){return ot.memo(({id:e,sourceX:r,sourceY:i,targetX:n,targetY:s,sourcePosition:o=Gt.Bottom,targetPosition:c=Gt.Top,label:u,labelStyle:h,labelShowBg:d,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:g,style:x,markerEnd:v,markerStart:b,pathOptions:w,interactionWidth:T})=>{const[k,E,L]=iR({sourceX:r,sourceY:i,sourcePosition:o,targetX:n,targetY:s,targetPosition:c,curvature:w==null?void 0:w.curvature}),A=t.isInternal?void 0:e;return S.jsx(kp,{id:A,path:k,labelX:E,labelY:L,label:u,labelStyle:h,labelShowBg:d,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:g,style:x,markerEnd:v,markerStart:b,interactionWidth:T})})}const fV=UR({isInternal:!1}),GR=UR({isInternal:!0});fV.displayName="BezierEdge";GR.displayName="BezierEdgeInternal";const LA={default:GR,straight:HR,step:$R,smoothstep:zR,simplebezier:FR},MA={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},pV=(t,e,r)=>r===Gt.Left?t-e:r===Gt.Right?t+e:t,gV=(t,e,r)=>r===Gt.Top?t-e:r===Gt.Bottom?t+e:t,NA="react-flow__edgeupdater";function OA({position:t,centerX:e,centerY:r,radius:i=10,onMouseDown:n,onMouseEnter:s,onMouseOut:o,type:c}){return S.jsx("circle",{onMouseDown:n,onMouseEnter:s,onMouseOut:o,className:Sr([NA,`${NA}-${c}`]),cx:pV(e,i,t),cy:gV(r,i,t),r:i,stroke:"transparent",fill:"transparent"})}function mV({isReconnectable:t,reconnectRadius:e,edge:r,sourceX:i,sourceY:n,targetX:s,targetY:o,sourcePosition:c,targetPosition:u,onReconnect:h,onReconnectStart:d,onReconnectEnd:p,setReconnecting:m,setUpdateHover:g}){const x=tr(),v=(E,L)=>{if(E.button!==0)return;const{autoPanOnConnect:A,domNode:R,connectionMode:j,connectionRadius:Y,lib:V,onConnectStart:O,cancelConnection:z,nodeLookup:X,rfId:M,panBy:I,updateConnection:N}=x.getState(),P=L.type==="target",$=(G,Z)=>{m(!1),p==null||p(G,r,L.type,Z)},D=G=>h==null?void 0:h(r,G),q=(G,Z)=>{m(!0),d==null||d(E,r,L.type),O==null||O(G,Z)};qC.onPointerDown(E.nativeEvent,{autoPanOnConnect:A,connectionMode:j,connectionRadius:Y,domNode:R,handleId:L.id,nodeId:L.nodeId,nodeLookup:X,isTarget:P,edgeUpdaterType:L.type,lib:V,flowId:M,cancelConnection:z,panBy:I,isValidConnection:(...G)=>{var Z,H;return((H=(Z=x.getState()).isValidConnection)==null?void 0:H.call(Z,...G))??!0},onConnect:D,onConnectStart:q,onConnectEnd:(...G)=>{var Z,H;return(H=(Z=x.getState()).onConnectEnd)==null?void 0:H.call(Z,...G)},onReconnectEnd:$,updateConnection:N,getTransform:()=>x.getState().transform,getFromHandle:()=>x.getState().connection.fromHandle,dragThreshold:x.getState().connectionDragThreshold,handleDomNode:E.currentTarget})},b=E=>v(E,{nodeId:r.target,id:r.targetHandle??null,type:"target"}),w=E=>v(E,{nodeId:r.source,id:r.sourceHandle??null,type:"source"}),T=()=>g(!0),k=()=>g(!1);return S.jsxs(S.Fragment,{children:[(t===!0||t==="source")&&S.jsx(OA,{position:c,centerX:i,centerY:n,radius:e,onMouseDown:b,onMouseEnter:T,onMouseOut:k,type:"source"}),(t===!0||t==="target")&&S.jsx(OA,{position:u,centerX:s,centerY:o,radius:e,onMouseDown:w,onMouseEnter:T,onMouseOut:k,type:"target"})]})}function yV({id:t,edgesFocusable:e,edgesReconnectable:r,elementsSelectable:i,onClick:n,onDoubleClick:s,onContextMenu:o,onMouseEnter:c,onMouseMove:u,onMouseLeave:h,reconnectRadius:d,onReconnect:p,onReconnectStart:m,onReconnectEnd:g,rfId:x,edgeTypes:v,noPanClassName:b,onError:w,disableKeyboardA11y:T}){let k=we(Tt=>Tt.edgeLookup.get(t));const E=we(Tt=>Tt.defaultEdgeOptions);k=E?{...E,...k}:k;let L=k.type||"default",A=(v==null?void 0:v[L])||LA[L];A===void 0&&(w==null||w("011",Mn.error011(L)),L="default",A=(v==null?void 0:v.default)||LA.default);const R=!!(k.focusable||e&&typeof k.focusable>"u"),j=typeof p<"u"&&(k.reconnectable||r&&typeof k.reconnectable>"u"),Y=!!(k.selectable||i&&typeof k.selectable>"u"),V=ot.useRef(null),[O,z]=ot.useState(!1),[X,M]=ot.useState(!1),I=tr(),{zIndex:N,sourceX:P,sourceY:$,targetX:D,targetY:q,sourcePosition:G,targetPosition:Z}=we(ot.useCallback(Tt=>{const _t=Tt.nodeLookup.get(k.source),Mt=Tt.nodeLookup.get(k.target);if(!_t||!Mt)return{zIndex:k.zIndex,...MA};const Et=cG({id:t,sourceNode:_t,targetNode:Mt,sourceHandle:k.sourceHandle||null,targetHandle:k.targetHandle||null,connectionMode:Tt.connectionMode,onError:w});return{zIndex:eG({selected:k.selected,zIndex:k.zIndex,sourceNode:_t,targetNode:Mt,elevateOnSelect:Tt.elevateEdgesOnSelect,zIndexMode:Tt.zIndexMode}),...Et||MA}},[k.source,k.target,k.sourceHandle,k.targetHandle,k.selected,k.zIndex]),Je),H=ot.useMemo(()=>k.markerStart?`url('#${FC(k.markerStart,x)}')`:void 0,[k.markerStart,x]),Q=ot.useMemo(()=>k.markerEnd?`url('#${FC(k.markerEnd,x)}')`:void 0,[k.markerEnd,x]);if(k.hidden||P===null||$===null||D===null||q===null)return null;const J=Tt=>{var Yt;const{addSelectedEdges:_t,unselectNodesAndEdges:Mt,multiSelectionActive:Et}=I.getState();Y&&(I.setState({nodesSelectionActive:!1}),k.selected&&Et?(Mt({nodes:[],edges:[k]}),(Yt=V.current)==null||Yt.blur()):_t([t])),n&&n(Tt,k)},et=s?Tt=>{s(Tt,{...k})}:void 0,at=o?Tt=>{o(Tt,{...k})}:void 0,lt=c?Tt=>{c(Tt,{...k})}:void 0,xt=u?Tt=>{u(Tt,{...k})}:void 0,mt=h?Tt=>{h(Tt,{...k})}:void 0,bt=Tt=>{var _t;if(!T&&PO.includes(Tt.key)&&Y){const{unselectNodesAndEdges:Mt,addSelectedEdges:Et}=I.getState();Tt.key==="Escape"?((_t=V.current)==null||_t.blur(),Mt({edges:[k]})):Et([t])}};return S.jsx("svg",{style:{zIndex:N},children:S.jsxs("g",{className:Sr(["react-flow__edge",`react-flow__edge-${L}`,k.className,b,{selected:k.selected,animated:k.animated,inactive:!Y&&!n,updating:O,selectable:Y}]),onClick:J,onDoubleClick:et,onContextMenu:at,onMouseEnter:lt,onMouseMove:xt,onMouseLeave:mt,onKeyDown:R?bt:void 0,tabIndex:R?0:void 0,role:k.ariaRole??(R?"group":"img"),"aria-roledescription":"edge","data-id":t,"data-testid":`rf__edge-${t}`,"aria-label":k.ariaLabel===null?void 0:k.ariaLabel||`Edge from ${k.source} to ${k.target}`,"aria-describedby":R?`${vR}-${x}`:void 0,ref:V,...k.domAttributes,children:[!X&&S.jsx(A,{id:t,source:k.source,target:k.target,type:k.type,selected:k.selected,animated:k.animated,selectable:Y,deletable:k.deletable??!0,label:k.label,labelStyle:k.labelStyle,labelShowBg:k.labelShowBg,labelBgStyle:k.labelBgStyle,labelBgPadding:k.labelBgPadding,labelBgBorderRadius:k.labelBgBorderRadius,sourceX:P,sourceY:$,targetX:D,targetY:q,sourcePosition:G,targetPosition:Z,data:k.data,style:k.style,sourceHandleId:k.sourceHandle,targetHandleId:k.targetHandle,markerStart:H,markerEnd:Q,pathOptions:"pathOptions"in k?k.pathOptions:void 0,interactionWidth:k.interactionWidth}),j&&S.jsx(mV,{edge:k,isReconnectable:j,reconnectRadius:d,onReconnect:p,onReconnectStart:m,onReconnectEnd:g,sourceX:P,sourceY:$,targetX:D,targetY:q,sourcePosition:G,targetPosition:Z,setUpdateHover:z,setReconnecting:M})]})})}var xV=ot.memo(yV);const bV=t=>({edgesFocusable:t.edgesFocusable,edgesReconnectable:t.edgesReconnectable,elementsSelectable:t.elementsSelectable,connectionMode:t.connectionMode,onError:t.onError});function YR({defaultMarkerColor:t,onlyRenderVisibleElements:e,rfId:r,edgeTypes:i,noPanClassName:n,onReconnect:s,onEdgeContextMenu:o,onEdgeMouseEnter:c,onEdgeMouseMove:u,onEdgeMouseLeave:h,onEdgeClick:d,reconnectRadius:p,onEdgeDoubleClick:m,onReconnectStart:g,onReconnectEnd:x,disableKeyboardA11y:v}){const{edgesFocusable:b,edgesReconnectable:w,elementsSelectable:T,onError:k}=we(bV,Je),E=iV(e);return S.jsxs("div",{className:"react-flow__edges",children:[S.jsx(lV,{defaultColor:t,rfId:r}),E.map(L=>S.jsx(xV,{id:L,edgesFocusable:b,edgesReconnectable:w,elementsSelectable:T,noPanClassName:n,onReconnect:s,onContextMenu:o,onMouseEnter:c,onMouseMove:u,onMouseLeave:h,onClick:d,reconnectRadius:p,onDoubleClick:m,onReconnectStart:g,onReconnectEnd:x,rfId:r,onError:k,edgeTypes:i,disableKeyboardA11y:v},L))]})}YR.displayName="EdgeRenderer";const vV=ot.memo(YR),CV=t=>`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]})`;function wV({children:t}){const e=we(CV);return S.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:e},children:t})}function SV(t){const e=wp(),r=ot.useRef(!1);ot.useEffect(()=>{!r.current&&e.viewportInitialized&&t&&(setTimeout(()=>t(e),1),r.current=!0)},[t,e.viewportInitialized])}const kV=t=>{var e;return(e=t.panZoom)==null?void 0:e.syncViewport};function _V(t){const e=we(kV),r=tr();return ot.useEffect(()=>{t&&(e==null||e(t),r.setState({transform:[t.x,t.y,t.zoom]}))},[t,e]),null}function TV(t){return t.connection.inProgress?{...t.connection,to:ch(t.connection.to,t.transform)}:{...t.connection}}function EV(t){return TV}function AV(t){const e=EV();return we(e,Je)}const BV=t=>({nodesConnectable:t.nodesConnectable,isValid:t.connection.isValid,inProgress:t.connection.inProgress,width:t.width,height:t.height});function LV({containerStyle:t,style:e,type:r,component:i}){const{nodesConnectable:n,width:s,height:o,isValid:c,inProgress:u}=we(BV,Je);return!(s&&n&&u)?null:S.jsx("svg",{style:t,width:s,height:o,className:"react-flow__connectionline react-flow__container",children:S.jsx("g",{className:Sr(["react-flow__connection",GO(c)]),children:S.jsx(VR,{style:e,type:r,CustomComponent:i,isValid:c})})})}const VR=({style:t,type:e=Za.Bezier,CustomComponent:r,isValid:i})=>{const{inProgress:n,from:s,fromNode:o,fromHandle:c,fromPosition:u,to:h,toNode:d,toHandle:p,toPosition:m,pointer:g}=AV();if(!n)return;if(r)return S.jsx(r,{connectionLineType:e,connectionLineStyle:t,fromNode:o,fromHandle:c,fromX:s.x,fromY:s.y,toX:h.x,toY:h.y,fromPosition:u,toPosition:m,connectionStatus:GO(i),toNode:d,toHandle:p,pointer:g});let x="";const v={sourceX:s.x,sourceY:s.y,sourcePosition:u,targetX:h.x,targetY:h.y,targetPosition:m};switch(e){case Za.Bezier:[x]=iR(v);break;case Za.SimpleBezier:[x]=RR(v);break;case Za.Step:[x]=DC({...v,borderRadius:0});break;case Za.SmoothStep:[x]=DC(v);break;default:[x]=aR(v)}return S.jsx("path",{d:x,fill:"none",className:"react-flow__connection-path",style:t})};VR.displayName="ConnectionLine";const MV={};function RA(t=MV){ot.useRef(t),tr(),ot.useEffect(()=>{},[t])}function NV(){tr(),ot.useRef(!1),ot.useEffect(()=>{},[])}function WR({nodeTypes:t,edgeTypes:e,onInit:r,onNodeClick:i,onEdgeClick:n,onNodeDoubleClick:s,onEdgeDoubleClick:o,onNodeMouseEnter:c,onNodeMouseMove:u,onNodeMouseLeave:h,onNodeContextMenu:d,onSelectionContextMenu:p,onSelectionStart:m,onSelectionEnd:g,connectionLineType:x,connectionLineStyle:v,connectionLineComponent:b,connectionLineContainerStyle:w,selectionKeyCode:T,selectionOnDrag:k,selectionMode:E,multiSelectionKeyCode:L,panActivationKeyCode:A,zoomActivationKeyCode:R,deleteKeyCode:j,onlyRenderVisibleElements:Y,elementsSelectable:V,defaultViewport:O,translateExtent:z,minZoom:X,maxZoom:M,preventScrolling:I,defaultMarkerColor:N,zoomOnScroll:P,zoomOnPinch:$,panOnScroll:D,panOnScrollSpeed:q,panOnScrollMode:G,zoomOnDoubleClick:Z,panOnDrag:H,onPaneClick:Q,onPaneMouseEnter:J,onPaneMouseMove:et,onPaneMouseLeave:at,onPaneScroll:lt,onPaneContextMenu:xt,paneClickDistance:mt,nodeClickDistance:bt,onEdgeContextMenu:Tt,onEdgeMouseEnter:_t,onEdgeMouseMove:Mt,onEdgeMouseLeave:Et,reconnectRadius:Yt,onReconnect:zt,onReconnectStart:ve,onReconnectEnd:Ee,noDragClassName:Ve,noWheelClassName:ar,noPanClassName:We,disableKeyboardA11y:Me,nodeExtent:Ae,rfId:sr,viewport:gt,onViewportChange:kt}){return RA(t),RA(e),NV(),SV(r),_V(gt),S.jsx(VY,{onPaneClick:Q,onPaneMouseEnter:J,onPaneMouseMove:et,onPaneMouseLeave:at,onPaneContextMenu:xt,onPaneScroll:lt,paneClickDistance:mt,deleteKeyCode:j,selectionKeyCode:T,selectionOnDrag:k,selectionMode:E,onSelectionStart:m,onSelectionEnd:g,multiSelectionKeyCode:L,panActivationKeyCode:A,zoomActivationKeyCode:R,elementsSelectable:V,zoomOnScroll:P,zoomOnPinch:$,zoomOnDoubleClick:Z,panOnScroll:D,panOnScrollSpeed:q,panOnScrollMode:G,panOnDrag:H,defaultViewport:O,translateExtent:z,minZoom:X,maxZoom:M,onSelectionContextMenu:p,preventScrolling:I,noDragClassName:Ve,noWheelClassName:ar,noPanClassName:We,disableKeyboardA11y:Me,onViewportChange:kt,isControlledViewport:!!gt,children:S.jsxs(wV,{children:[S.jsx(vV,{edgeTypes:e,onEdgeClick:n,onEdgeDoubleClick:o,onReconnect:zt,onReconnectStart:ve,onReconnectEnd:Ee,onlyRenderVisibleElements:Y,onEdgeContextMenu:Tt,onEdgeMouseEnter:_t,onEdgeMouseMove:Mt,onEdgeMouseLeave:Et,reconnectRadius:Yt,defaultMarkerColor:N,noPanClassName:We,disableKeyboardA11y:Me,rfId:sr}),S.jsx(LV,{style:v,type:x,component:b,containerStyle:w}),S.jsx("div",{className:"react-flow__edgelabel-renderer"}),S.jsx(rV,{nodeTypes:t,onNodeClick:i,onNodeDoubleClick:s,onNodeMouseEnter:c,onNodeMouseMove:u,onNodeMouseLeave:h,onNodeContextMenu:d,nodeClickDistance:bt,onlyRenderVisibleElements:Y,noPanClassName:We,noDragClassName:Ve,disableKeyboardA11y:Me,nodeExtent:Ae,rfId:sr}),S.jsx("div",{className:"react-flow__viewport-portal"})]})})}WR.displayName="GraphView";const OV=ot.memo(WR),DA=({nodes:t,edges:e,defaultNodes:r,defaultEdges:i,width:n,height:s,fitView:o,fitViewOptions:c,minZoom:u=.5,maxZoom:h=2,nodeOrigin:d,nodeExtent:p,zIndexMode:m="basic"}={})=>{const g=new Map,x=new Map,v=new Map,b=new Map,w=i??e??[],T=r??t??[],k=d??[0,0],E=p??$u;lR(v,b,w);const{nodesInitialized:L}=IC(T,g,x,{nodeOrigin:k,nodeExtent:E,zIndexMode:m});let A=[0,0,1];if(o&&n&&s){const R=oh(g,{filter:O=>!!((O.width||O.initialWidth)&&(O.height||O.initialHeight))}),{x:j,y:Y,zoom:V}=tw(R,n,s,u,h,(c==null?void 0:c.padding)??.1);A=[j,Y,V]}return{rfId:"1",width:n??0,height:s??0,transform:A,nodes:T,nodesInitialized:L,nodeLookup:g,parentLookup:x,edges:w,edgeLookup:b,connectionLookup:v,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:r!==void 0,hasDefaultEdges:i!==void 0,panZoom:null,minZoom:u,maxZoom:h,translateExtent:$u,nodeExtent:E,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Il.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:k,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:o??!1,fitViewOptions:c,fitViewResolver:null,connection:{...UO},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:XU,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:HO,zIndexMode:m,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},RV=({nodes:t,edges:e,defaultNodes:r,defaultEdges:i,width:n,height:s,fitView:o,fitViewOptions:c,minZoom:u,maxZoom:h,nodeOrigin:d,nodeExtent:p,zIndexMode:m})=>JG((g,x)=>{async function v(){const{nodeLookup:b,panZoom:w,fitViewOptions:T,fitViewResolver:k,width:E,height:L,minZoom:A,maxZoom:R}=x();w&&(await VU({nodes:b,width:E,height:L,panZoom:w,minZoom:A,maxZoom:R},T),k==null||k.resolve(!0),g({fitViewResolver:null}))}return{...DA({nodes:t,edges:e,width:n,height:s,fitView:o,fitViewOptions:c,minZoom:u,maxZoom:h,nodeOrigin:d,nodeExtent:p,defaultNodes:r,defaultEdges:i,zIndexMode:m}),setNodes:b=>{const{nodeLookup:w,parentLookup:T,nodeOrigin:k,elevateNodesOnSelect:E,fitViewQueued:L,zIndexMode:A,nodesSelectionActive:R}=x(),{nodesInitialized:j,hasSelectedNodes:Y}=IC(b,w,T,{nodeOrigin:k,nodeExtent:p,elevateNodesOnSelect:E,checkEquality:!0,zIndexMode:A}),V=R&&Y;L&&j?(v(),g({nodes:b,nodesInitialized:j,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:V})):g({nodes:b,nodesInitialized:j,nodesSelectionActive:V})},setEdges:b=>{const{connectionLookup:w,edgeLookup:T}=x();lR(w,T,b),g({edges:b})},setDefaultNodesAndEdges:(b,w)=>{if(b){const{setNodes:T}=x();T(b),g({hasDefaultNodes:!0})}if(w){const{setEdges:T}=x();T(w),g({hasDefaultEdges:!0})}},updateNodeInternals:b=>{const{triggerNodeChanges:w,nodeLookup:T,parentLookup:k,domNode:E,nodeOrigin:L,nodeExtent:A,debug:R,fitViewQueued:j,zIndexMode:Y}=x(),{changes:V,updatedInternals:O}=yG(b,T,k,E,L,A,Y);O&&(fG(T,k,{nodeOrigin:L,nodeExtent:A,zIndexMode:Y}),j?(v(),g({fitViewQueued:!1,fitViewOptions:void 0})):g({}),(V==null?void 0:V.length)>0&&(R&&console.log("React Flow: trigger node changes",V),w==null||w(V)))},updateNodePositions:(b,w=!1)=>{const T=[];let k=[];const{nodeLookup:E,triggerNodeChanges:L,connection:A,updateConnection:R,onNodesChangeMiddlewareMap:j}=x();for(const[Y,V]of b){const O=E.get(Y),z=!!(O!=null&&O.expandParent&&(O!=null&&O.parentId)&&(V!=null&&V.position)),X={id:Y,type:"position",position:z?{x:Math.max(0,V.position.x),y:Math.max(0,V.position.y)}:V.position,dragging:w};if(O&&A.inProgress&&A.fromNode.id===O.id){const M=to(O,A.fromHandle,Gt.Left,!0);R({...A,from:M})}z&&O.parentId&&T.push({id:Y,parentId:O.parentId,rect:{...V.internals.positionAbsolute,width:V.measured.width??0,height:V.measured.height??0}}),k.push(X)}if(T.length>0){const{parentLookup:Y,nodeOrigin:V}=x(),O=sw(T,E,Y,V);k.push(...O)}for(const Y of j.values())k=Y(k);L(k)},triggerNodeChanges:b=>{const{onNodesChange:w,setNodes:T,nodes:k,hasDefaultNodes:E,debug:L}=x();if(b!=null&&b.length){if(E){const A=SR(b,k);T(A)}L&&console.log("React Flow: trigger node changes",b),w==null||w(b)}},triggerEdgeChanges:b=>{const{onEdgesChange:w,setEdges:T,edges:k,hasDefaultEdges:E,debug:L}=x();if(b!=null&&b.length){if(E){const A=kR(b,k);T(A)}L&&console.log("React Flow: trigger edge changes",b),w==null||w(b)}},addSelectedNodes:b=>{const{multiSelectionActive:w,edgeLookup:T,nodeLookup:k,triggerNodeChanges:E,triggerEdgeChanges:L}=x();if(w){const A=b.map(R=>$s(R,!0));E(A);return}E(dl(k,new Set([...b]),!0)),L(dl(T))},addSelectedEdges:b=>{const{multiSelectionActive:w,edgeLookup:T,nodeLookup:k,triggerNodeChanges:E,triggerEdgeChanges:L}=x();if(w){const A=b.map(R=>$s(R,!0));L(A);return}L(dl(T,new Set([...b]))),E(dl(k,new Set,!0))},unselectNodesAndEdges:({nodes:b,edges:w}={})=>{const{edges:T,nodes:k,nodeLookup:E,triggerNodeChanges:L,triggerEdgeChanges:A}=x(),R=b||k,j=w||T,Y=[];for(const O of R){if(!O.selected)continue;const z=E.get(O.id);z&&(z.selected=!1),Y.push($s(O.id,!1))}const V=[];for(const O of j)O.selected&&V.push($s(O.id,!1));L(Y),A(V)},setMinZoom:b=>{const{panZoom:w,maxZoom:T}=x();w==null||w.setScaleExtent([b,T]),g({minZoom:b})},setMaxZoom:b=>{const{panZoom:w,minZoom:T}=x();w==null||w.setScaleExtent([T,b]),g({maxZoom:b})},setTranslateExtent:b=>{var w;(w=x().panZoom)==null||w.setTranslateExtent(b),g({translateExtent:b})},resetSelectedElements:()=>{const{edges:b,nodes:w,triggerNodeChanges:T,triggerEdgeChanges:k,elementsSelectable:E}=x();if(!E)return;const L=w.reduce((R,j)=>j.selected?[...R,$s(j.id,!1)]:R,[]),A=b.reduce((R,j)=>j.selected?[...R,$s(j.id,!1)]:R,[]);T(L),k(A)},setNodeExtent:b=>{const{nodes:w,nodeLookup:T,parentLookup:k,nodeOrigin:E,elevateNodesOnSelect:L,nodeExtent:A,zIndexMode:R}=x();b[0][0]===A[0][0]&&b[0][1]===A[0][1]&&b[1][0]===A[1][0]&&b[1][1]===A[1][1]||(IC(w,T,k,{nodeOrigin:E,nodeExtent:b,elevateNodesOnSelect:L,checkEquality:!1,zIndexMode:R}),g({nodeExtent:b}))},panBy:b=>{const{transform:w,width:T,height:k,panZoom:E,translateExtent:L}=x();return xG({delta:b,panZoom:E,transform:w,translateExtent:L,width:T,height:k})},setCenter:async(b,w,T)=>{const{width:k,height:E,maxZoom:L,panZoom:A}=x();if(!A)return Promise.resolve(!1);const R=typeof(T==null?void 0:T.zoom)<"u"?T.zoom:L;return await A.setViewport({x:k/2-b*R,y:E/2-w*R,zoom:R},{duration:T==null?void 0:T.duration,ease:T==null?void 0:T.ease,interpolate:T==null?void 0:T.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{g({connection:{...UO}})},updateConnection:b=>{g({connection:b})},reset:()=>g({...DA()})}},Object.is);function XR({initialNodes:t,initialEdges:e,defaultNodes:r,defaultEdges:i,initialWidth:n,initialHeight:s,initialMinZoom:o,initialMaxZoom:c,initialFitViewOptions:u,fitView:h,nodeOrigin:d,nodeExtent:p,zIndexMode:m,children:g}){const[x]=ot.useState(()=>RV({nodes:t,edges:e,defaultNodes:r,defaultEdges:i,width:n,height:s,fitView:h,minZoom:o,maxZoom:c,fitViewOptions:u,nodeOrigin:d,nodeExtent:p,zIndexMode:m}));return S.jsx(tY,{value:x,children:S.jsx(wY,{children:g})})}function DV({children:t,nodes:e,edges:r,defaultNodes:i,defaultEdges:n,width:s,height:o,fitView:c,fitViewOptions:u,minZoom:h,maxZoom:d,nodeOrigin:p,nodeExtent:m,zIndexMode:g}){return ot.useContext(Cp)?S.jsx(S.Fragment,{children:t}):S.jsx(XR,{initialNodes:e,initialEdges:r,defaultNodes:i,defaultEdges:n,initialWidth:s,initialHeight:o,fitView:c,initialFitViewOptions:u,initialMinZoom:h,initialMaxZoom:d,nodeOrigin:p,nodeExtent:m,zIndexMode:g,children:t})}const FV={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function IV({nodes:t,edges:e,defaultNodes:r,defaultEdges:i,className:n,nodeTypes:s,edgeTypes:o,onNodeClick:c,onEdgeClick:u,onInit:h,onMove:d,onMoveStart:p,onMoveEnd:m,onConnect:g,onConnectStart:x,onConnectEnd:v,onClickConnectStart:b,onClickConnectEnd:w,onNodeMouseEnter:T,onNodeMouseMove:k,onNodeMouseLeave:E,onNodeContextMenu:L,onNodeDoubleClick:A,onNodeDragStart:R,onNodeDrag:j,onNodeDragStop:Y,onNodesDelete:V,onEdgesDelete:O,onDelete:z,onSelectionChange:X,onSelectionDragStart:M,onSelectionDrag:I,onSelectionDragStop:N,onSelectionContextMenu:P,onSelectionStart:$,onSelectionEnd:D,onBeforeDelete:q,connectionMode:G,connectionLineType:Z=Za.Bezier,connectionLineStyle:H,connectionLineComponent:Q,connectionLineContainerStyle:J,deleteKeyCode:et="Backspace",selectionKeyCode:at="Shift",selectionOnDrag:lt=!1,selectionMode:xt=Pu.Full,panActivationKeyCode:mt="Space",multiSelectionKeyCode:bt=Gu()?"Meta":"Control",zoomActivationKeyCode:Tt=Gu()?"Meta":"Control",snapToGrid:_t,snapGrid:Mt,onlyRenderVisibleElements:Et=!1,selectNodesOnDrag:Yt,nodesDraggable:zt,autoPanOnNodeFocus:ve,nodesConnectable:Ee,nodesFocusable:Ve,nodeOrigin:ar=CR,edgesFocusable:We,edgesReconnectable:Me,elementsSelectable:Ae=!0,defaultViewport:sr=fY,minZoom:gt=.5,maxZoom:kt=2,translateExtent:Dt=$u,preventScrolling:ee=!0,nodeExtent:ae,defaultMarkerColor:Xe="#b1b1b7",zoomOnScroll:K=!0,zoomOnPinch:Lt=!0,panOnScroll:Ht=!1,panOnScrollSpeed:Bt=.5,panOnScrollMode:Nt=Xs.Free,zoomOnDoubleClick:Ce=!0,panOnDrag:je=!0,onPaneClick:va,onPaneMouseEnter:gn,onPaneMouseMove:mn,onPaneMouseLeave:Ca,onPaneScroll:Yr,onPaneContextMenu:wa,paneClickDistance:zn=1,nodeClickDistance:rr=0,children:Vi,onReconnect:ds,onReconnectStart:yn,onReconnectEnd:fs,onEdgeContextMenu:ps,onEdgeDoubleClick:gs,onEdgeMouseEnter:po,onEdgeMouseMove:Nr,onEdgeMouseLeave:xi,reconnectRadius:ms=10,onNodesChange:ys,onEdgesChange:ti,noDragClassName:ir="nodrag",noWheelClassName:$e="nowheel",noPanClassName:Mi="nopan",fitView:jn,fitViewOptions:go,connectOnClick:mo,attributionPosition:xs,proOptions:xn,defaultEdgeOptions:Ut,elevateNodesOnSelect:tt=!0,elevateEdgesOnSelect:wt=!1,disableKeyboardA11y:Ot=!1,autoPanOnConnect:me,autoPanOnNodeDrag:ue,autoPanSpeed:Ue,connectionRadius:_r,isValidConnection:or,onError:gr,style:bs,id:Qe,nodeDragThreshold:vs,connectionDragThreshold:yo,viewport:xo,onViewportChange:bo,width:Wi,height:ei,colorMode:kh="light",debug:og,onScroll:Sa,ariaLabelConfig:_h,zIndexMode:Cs="basic",...lg},ri){const ws=Qe||"1",Th=yY(kh),oc=ot.useCallback($n=>{$n.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Sa==null||Sa($n)},[Sa]);return S.jsx("div",{"data-testid":"rf__wrapper",...lg,onScroll:oc,style:{...bs,...FV},ref:ri,className:Sr(["react-flow",n,Th]),id:Qe,role:"application",children:S.jsxs(DV,{nodes:t,edges:e,width:Wi,height:ei,fitView:jn,fitViewOptions:go,minZoom:gt,maxZoom:kt,nodeOrigin:ar,nodeExtent:ae,zIndexMode:Cs,children:[S.jsx(mY,{nodes:t,edges:e,defaultNodes:r,defaultEdges:i,onConnect:g,onConnectStart:x,onConnectEnd:v,onClickConnectStart:b,onClickConnectEnd:w,nodesDraggable:zt,autoPanOnNodeFocus:ve,nodesConnectable:Ee,nodesFocusable:Ve,edgesFocusable:We,edgesReconnectable:Me,elementsSelectable:Ae,elevateNodesOnSelect:tt,elevateEdgesOnSelect:wt,minZoom:gt,maxZoom:kt,nodeExtent:ae,onNodesChange:ys,onEdgesChange:ti,snapToGrid:_t,snapGrid:Mt,connectionMode:G,translateExtent:Dt,connectOnClick:mo,defaultEdgeOptions:Ut,fitView:jn,fitViewOptions:go,onNodesDelete:V,onEdgesDelete:O,onDelete:z,onNodeDragStart:R,onNodeDrag:j,onNodeDragStop:Y,onSelectionDrag:I,onSelectionDragStart:M,onSelectionDragStop:N,onMove:d,onMoveStart:p,onMoveEnd:m,noPanClassName:Mi,nodeOrigin:ar,rfId:ws,autoPanOnConnect:me,autoPanOnNodeDrag:ue,autoPanSpeed:Ue,onError:gr,connectionRadius:_r,isValidConnection:or,selectNodesOnDrag:Yt,nodeDragThreshold:vs,connectionDragThreshold:yo,onBeforeDelete:q,debug:og,ariaLabelConfig:_h,zIndexMode:Cs}),S.jsx(OV,{onInit:h,onNodeClick:c,onEdgeClick:u,onNodeMouseEnter:T,onNodeMouseMove:k,onNodeMouseLeave:E,onNodeContextMenu:L,onNodeDoubleClick:A,nodeTypes:s,edgeTypes:o,connectionLineType:Z,connectionLineStyle:H,connectionLineComponent:Q,connectionLineContainerStyle:J,selectionKeyCode:at,selectionOnDrag:lt,selectionMode:xt,deleteKeyCode:et,multiSelectionKeyCode:bt,panActivationKeyCode:mt,zoomActivationKeyCode:Tt,onlyRenderVisibleElements:Et,defaultViewport:sr,translateExtent:Dt,minZoom:gt,maxZoom:kt,preventScrolling:ee,zoomOnScroll:K,zoomOnPinch:Lt,zoomOnDoubleClick:Ce,panOnScroll:Ht,panOnScrollSpeed:Bt,panOnScrollMode:Nt,panOnDrag:je,onPaneClick:va,onPaneMouseEnter:gn,onPaneMouseMove:mn,onPaneMouseLeave:Ca,onPaneScroll:Yr,onPaneContextMenu:wa,paneClickDistance:zn,nodeClickDistance:rr,onSelectionContextMenu:P,onSelectionStart:$,onSelectionEnd:D,onReconnect:ds,onReconnectStart:yn,onReconnectEnd:fs,onEdgeContextMenu:ps,onEdgeDoubleClick:gs,onEdgeMouseEnter:po,onEdgeMouseMove:Nr,onEdgeMouseLeave:xi,reconnectRadius:ms,defaultMarkerColor:Xe,noDragClassName:ir,noWheelClassName:$e,noPanClassName:Mi,rfId:ws,disableKeyboardA11y:Ot,nodeExtent:ae,viewport:xo,onViewportChange:bo}),S.jsx(dY,{onSelectionChange:X}),Vi,S.jsx(oY,{proOptions:xn,position:xs}),S.jsx(sY,{rfId:ws,disableKeyboardA11y:Ot})]})})}var qV=_R(IV);function zV(t){const[e,r]=ot.useState(t),i=ot.useCallback(n=>r(s=>SR(n,s)),[]);return[e,r,i]}function jV(t){const[e,r]=ot.useState(t),i=ot.useCallback(n=>r(s=>kR(n,s)),[]);return[e,r,i]}function $V({dimensions:t,lineWidth:e,variant:r,className:i}){return S.jsx("path",{strokeWidth:e,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`,className:Sr(["react-flow__background-pattern",r,i])})}function PV({radius:t,className:e}){return S.jsx("circle",{cx:t,cy:t,r:t,className:Sr(["react-flow__background-pattern","dots",e])})}var es;(function(t){t.Lines="lines",t.Dots="dots",t.Cross="cross"})(es||(es={}));const HV={[es.Dots]:1,[es.Lines]:1,[es.Cross]:6},UV=t=>({transform:t.transform,patternId:`pattern-${t.rfId}`});function QR({id:t,variant:e=es.Dots,gap:r=20,size:i,lineWidth:n=1,offset:s=0,color:o,bgColor:c,style:u,className:h,patternClassName:d}){const p=ot.useRef(null),{transform:m,patternId:g}=we(UV,Je),x=i||HV[e],v=e===es.Dots,b=e===es.Cross,w=Array.isArray(r)?r:[r,r],T=[w[0]*m[2]||1,w[1]*m[2]||1],k=x*m[2],E=Array.isArray(s)?s:[s,s],L=b?[k,k]:T,A=[E[0]*m[2]||1+L[0]/2,E[1]*m[2]||1+L[1]/2],R=`${g}${t||""}`;return S.jsxs("svg",{className:Sr(["react-flow__background",h]),style:{...u,...Sp,"--xy-background-color-props":c,"--xy-background-pattern-color-props":o},ref:p,"data-testid":"rf__background",children:[S.jsx("pattern",{id:R,x:m[0]%T[0],y:m[1]%T[1],width:T[0],height:T[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${A[0]},-${A[1]})`,children:v?S.jsx(PV,{radius:k/2,className:d}):S.jsx($V,{dimensions:L,lineWidth:n,variant:e,className:d})}),S.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${R})`})]})}QR.displayName="Background";const GV=ot.memo(QR);function YV(){return S.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:S.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function VV(){return S.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:S.jsx("path",{d:"M0 0h32v4.2H0z"})})}function WV(){return S.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:S.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function XV(){return S.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:S.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function QV(){return S.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:S.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function Yd({children:t,className:e,...r}){return S.jsx("button",{type:"button",className:Sr(["react-flow__controls-button",e]),...r,children:t})}const ZV=t=>({isInteractive:t.nodesDraggable||t.nodesConnectable||t.elementsSelectable,minZoomReached:t.transform[2]<=t.minZoom,maxZoomReached:t.transform[2]>=t.maxZoom,ariaLabelConfig:t.ariaLabelConfig});function ZR({style:t,showZoom:e=!0,showFitView:r=!0,showInteractive:i=!0,fitViewOptions:n,onZoomIn:s,onZoomOut:o,onFitView:c,onInteractiveChange:u,className:h,children:d,position:p="bottom-left",orientation:m="vertical","aria-label":g}){const x=tr(),{isInteractive:v,minZoomReached:b,maxZoomReached:w,ariaLabelConfig:T}=we(ZV,Je),{zoomIn:k,zoomOut:E,fitView:L}=wp(),A=()=>{k(),s==null||s()},R=()=>{E(),o==null||o()},j=()=>{L(n),c==null||c()},Y=()=>{x.setState({nodesDraggable:!v,nodesConnectable:!v,elementsSelectable:!v}),u==null||u(!v)},V=m==="horizontal"?"horizontal":"vertical";return S.jsxs(Xl,{className:Sr(["react-flow__controls",V,h]),position:p,style:t,"data-testid":"rf__controls","aria-label":g??T["controls.ariaLabel"],children:[e&&S.jsxs(S.Fragment,{children:[S.jsx(Yd,{onClick:A,className:"react-flow__controls-zoomin",title:T["controls.zoomIn.ariaLabel"],"aria-label":T["controls.zoomIn.ariaLabel"],disabled:w,children:S.jsx(YV,{})}),S.jsx(Yd,{onClick:R,className:"react-flow__controls-zoomout",title:T["controls.zoomOut.ariaLabel"],"aria-label":T["controls.zoomOut.ariaLabel"],disabled:b,children:S.jsx(VV,{})})]}),r&&S.jsx(Yd,{className:"react-flow__controls-fitview",onClick:j,title:T["controls.fitView.ariaLabel"],"aria-label":T["controls.fitView.ariaLabel"],children:S.jsx(WV,{})}),i&&S.jsx(Yd,{className:"react-flow__controls-interactive",onClick:Y,title:T["controls.interactive.ariaLabel"],"aria-label":T["controls.interactive.ariaLabel"],children:v?S.jsx(QV,{}):S.jsx(XV,{})}),d]})}ZR.displayName="Controls";const KV=ot.memo(ZR);function JV({id:t,x:e,y:r,width:i,height:n,style:s,color:o,strokeColor:c,strokeWidth:u,className:h,borderRadius:d,shapeRendering:p,selected:m,onClick:g}){const{background:x,backgroundColor:v}=s||{},b=o||x||v;return S.jsx("rect",{className:Sr(["react-flow__minimap-node",{selected:m},h]),x:e,y:r,rx:d,ry:d,width:i,height:n,style:{fill:b,stroke:c,strokeWidth:u},shapeRendering:p,onClick:g?w=>g(w,t):void 0})}const tW=ot.memo(JV),eW=t=>t.nodes.map(e=>e.id),M0=t=>t instanceof Function?t:()=>t;function rW({nodeStrokeColor:t,nodeColor:e,nodeClassName:r="",nodeBorderRadius:i=5,nodeStrokeWidth:n,nodeComponent:s=tW,onClick:o}){const c=we(eW,Je),u=M0(e),h=M0(t),d=M0(r),p=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return S.jsx(S.Fragment,{children:c.map(m=>S.jsx(nW,{id:m,nodeColorFunc:u,nodeStrokeColorFunc:h,nodeClassNameFunc:d,nodeBorderRadius:i,nodeStrokeWidth:n,NodeComponent:s,onClick:o,shapeRendering:p},m))})}function iW({id:t,nodeColorFunc:e,nodeStrokeColorFunc:r,nodeClassNameFunc:i,nodeBorderRadius:n,nodeStrokeWidth:s,shapeRendering:o,NodeComponent:c,onClick:u}){const{node:h,x:d,y:p,width:m,height:g}=we(x=>{const v=x.nodeLookup.get(t);if(!v)return{node:void 0,x:0,y:0,width:0,height:0};const b=v.internals.userNode,{x:w,y:T}=v.internals.positionAbsolute,{width:k,height:E}=pa(b);return{node:b,x:w,y:T,width:k,height:E}},Je);return!h||h.hidden||!ZO(h)?null:S.jsx(c,{x:d,y:p,width:m,height:g,style:h.style,selected:!!h.selected,className:i(h),color:e(h),borderRadius:n,strokeColor:r(h),strokeWidth:s,shapeRendering:o,onClick:u,id:h.id})}const nW=ot.memo(iW);var aW=ot.memo(rW);const sW=200,oW=150,lW=t=>!t.hidden,cW=t=>{const e={x:-t.transform[0]/t.transform[2],y:-t.transform[1]/t.transform[2],width:t.width/t.transform[2],height:t.height/t.transform[2]};return{viewBB:e,boundingRect:t.nodeLookup.size>0?QO(oh(t.nodeLookup,{filter:lW}),e):e,rfId:t.rfId,panZoom:t.panZoom,translateExtent:t.translateExtent,flowWidth:t.width,flowHeight:t.height,ariaLabelConfig:t.ariaLabelConfig}},uW="react-flow__minimap-desc";function KR({style:t,className:e,nodeStrokeColor:r,nodeColor:i,nodeClassName:n="",nodeBorderRadius:s=5,nodeStrokeWidth:o,nodeComponent:c,bgColor:u,maskColor:h,maskStrokeColor:d,maskStrokeWidth:p,position:m="bottom-right",onClick:g,onNodeClick:x,pannable:v=!1,zoomable:b=!1,ariaLabel:w,inversePan:T,zoomStep:k=1,offsetScale:E=5}){const L=tr(),A=ot.useRef(null),{boundingRect:R,viewBB:j,rfId:Y,panZoom:V,translateExtent:O,flowWidth:z,flowHeight:X,ariaLabelConfig:M}=we(cW,Je),I=(t==null?void 0:t.width)??sW,N=(t==null?void 0:t.height)??oW,P=R.width/I,$=R.height/N,D=Math.max(P,$),q=D*I,G=D*N,Z=E*D,H=R.x-(q-R.width)/2-Z,Q=R.y-(G-R.height)/2-Z,J=q+Z*2,et=G+Z*2,at=`${uW}-${Y}`,lt=ot.useRef(0),xt=ot.useRef();lt.current=D,ot.useEffect(()=>{if(A.current&&V)return xt.current=EG({domNode:A.current,panZoom:V,getTransform:()=>L.getState().transform,getViewScale:()=>lt.current}),()=>{var _t;(_t=xt.current)==null||_t.destroy()}},[V]),ot.useEffect(()=>{var _t;(_t=xt.current)==null||_t.update({translateExtent:O,width:z,height:X,inversePan:T,pannable:v,zoomStep:k,zoomable:b})},[v,b,T,k,O,z,X]);const mt=g?_t=>{var Yt;const[Mt,Et]=((Yt=xt.current)==null?void 0:Yt.pointer(_t))||[0,0];g(_t,{x:Mt,y:Et})}:void 0,bt=x?ot.useCallback((_t,Mt)=>{const Et=L.getState().nodeLookup.get(Mt).internals.userNode;x(_t,Et)},[]):void 0,Tt=w??M["minimap.ariaLabel"];return S.jsx(Xl,{position:m,style:{...t,"--xy-minimap-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-background-color-props":typeof h=="string"?h:void 0,"--xy-minimap-mask-stroke-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-width-props":typeof p=="number"?p*D:void 0,"--xy-minimap-node-background-color-props":typeof i=="string"?i:void 0,"--xy-minimap-node-stroke-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-width-props":typeof o=="number"?o:void 0},className:Sr(["react-flow__minimap",e]),"data-testid":"rf__minimap",children:S.jsxs("svg",{width:I,height:N,viewBox:`${H} ${Q} ${J} ${et}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":at,ref:A,onClick:mt,children:[Tt&&S.jsx("title",{id:at,children:Tt}),S.jsx(aW,{onClick:bt,nodeColor:i,nodeStrokeColor:r,nodeBorderRadius:s,nodeClassName:n,nodeStrokeWidth:o,nodeComponent:c}),S.jsx("path",{className:"react-flow__minimap-mask",d:`M${H-Z},${Q-Z}h${J+Z*2}v${et+Z*2}h${-J-Z*2}z
72
+ M${j.x},${j.y}h${j.width}v${j.height}h${-j.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}KR.displayName="MiniMap";const hW=ot.memo(KR),dW=t=>e=>t?`${Math.max(1/e.transform[2],1)}`:void 0,fW={[$l.Line]:"right",[$l.Handle]:"bottom-right"};function pW({nodeId:t,position:e,variant:r=$l.Handle,className:i,style:n=void 0,children:s,color:o,minWidth:c=10,minHeight:u=10,maxWidth:h=Number.MAX_VALUE,maxHeight:d=Number.MAX_VALUE,keepAspectRatio:p=!1,resizeDirection:m,autoScale:g=!0,shouldResize:x,onResizeStart:v,onResize:b,onResizeEnd:w}){const T=BR(),k=typeof t=="string"?t:T,E=tr(),L=ot.useRef(null),A=r===$l.Handle,R=we(ot.useCallback(dW(A&&g),[A,g]),Je),j=ot.useRef(null),Y=e??fW[r];ot.useEffect(()=>{if(!(!L.current||!k))return j.current||(j.current=$G({domNode:L.current,nodeId:k,getStoreItems:()=>{const{nodeLookup:O,transform:z,snapGrid:X,snapToGrid:M,nodeOrigin:I,domNode:N}=E.getState();return{nodeLookup:O,transform:z,snapGrid:X,snapToGrid:M,nodeOrigin:I,paneDomNode:N}},onChange:(O,z)=>{const{triggerNodeChanges:X,nodeLookup:M,parentLookup:I,nodeOrigin:N}=E.getState(),P=[],$={x:O.x,y:O.y},D=M.get(k);if(D&&D.expandParent&&D.parentId){const q=D.origin??N,G=O.width??D.measured.width??0,Z=O.height??D.measured.height??0,H={id:D.id,parentId:D.parentId,rect:{width:G,height:Z,...KO({x:O.x??D.position.x,y:O.y??D.position.y},{width:G,height:Z},D.parentId,M,q)}},Q=sw([H],M,I,N);P.push(...Q),$.x=O.x?Math.max(q[0]*G,O.x):void 0,$.y=O.y?Math.max(q[1]*Z,O.y):void 0}if($.x!==void 0&&$.y!==void 0){const q={id:k,type:"position",position:{...$}};P.push(q)}if(O.width!==void 0&&O.height!==void 0){const G={id:k,type:"dimensions",resizing:!0,setAttributes:m?m==="horizontal"?"width":"height":!0,dimensions:{width:O.width,height:O.height}};P.push(G)}for(const q of z){const G={...q,type:"position"};P.push(G)}X(P)},onEnd:({width:O,height:z})=>{const X={id:k,type:"dimensions",resizing:!1,dimensions:{width:O,height:z}};E.getState().triggerNodeChanges([X])}})),j.current.update({controlPosition:Y,boundaries:{minWidth:c,minHeight:u,maxWidth:h,maxHeight:d},keepAspectRatio:p,resizeDirection:m,onResizeStart:v,onResize:b,onResizeEnd:w,shouldResize:x}),()=>{var O;(O=j.current)==null||O.destroy()}},[Y,c,u,h,d,p,v,b,w,x]);const V=Y.split("-");return S.jsx("div",{className:Sr(["react-flow__resize-control","nodrag",...V,r,i]),ref:L,style:{...n,scale:R,...o&&{[A?"backgroundColor":"borderColor"]:o}},children:s})}ot.memo(pW);function lw(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var N0,FA;function gW(){if(FA)return N0;FA=1;function t(){this.__data__=[],this.size=0}return N0=t,N0}var O0,IA;function Ql(){if(IA)return O0;IA=1;function t(e,r){return e===r||e!==e&&r!==r}return O0=t,O0}var R0,qA;function _p(){if(qA)return R0;qA=1;var t=Ql();function e(r,i){for(var n=r.length;n--;)if(t(r[n][0],i))return n;return-1}return R0=e,R0}var D0,zA;function mW(){if(zA)return D0;zA=1;var t=_p(),e=Array.prototype,r=e.splice;function i(n){var s=this.__data__,o=t(s,n);if(o<0)return!1;var c=s.length-1;return o==c?s.pop():r.call(s,o,1),--this.size,!0}return D0=i,D0}var F0,jA;function yW(){if(jA)return F0;jA=1;var t=_p();function e(r){var i=this.__data__,n=t(i,r);return n<0?void 0:i[n][1]}return F0=e,F0}var I0,$A;function xW(){if($A)return I0;$A=1;var t=_p();function e(r){return t(this.__data__,r)>-1}return I0=e,I0}var q0,PA;function bW(){if(PA)return q0;PA=1;var t=_p();function e(r,i){var n=this.__data__,s=t(n,r);return s<0?(++this.size,n.push([r,i])):n[s][1]=i,this}return q0=e,q0}var z0,HA;function Tp(){if(HA)return z0;HA=1;var t=gW(),e=mW(),r=yW(),i=xW(),n=bW();function s(o){var c=-1,u=o==null?0:o.length;for(this.clear();++c<u;){var h=o[c];this.set(h[0],h[1])}}return s.prototype.clear=t,s.prototype.delete=e,s.prototype.get=r,s.prototype.has=i,s.prototype.set=n,z0=s,z0}var j0,UA;function vW(){if(UA)return j0;UA=1;var t=Tp();function e(){this.__data__=new t,this.size=0}return j0=e,j0}var $0,GA;function CW(){if(GA)return $0;GA=1;function t(e){var r=this.__data__,i=r.delete(e);return this.size=r.size,i}return $0=t,$0}var P0,YA;function wW(){if(YA)return P0;YA=1;function t(e){return this.__data__.get(e)}return P0=t,P0}var H0,VA;function SW(){if(VA)return H0;VA=1;function t(e){return this.__data__.has(e)}return H0=t,H0}var U0,WA;function JR(){if(WA)return U0;WA=1;var t=typeof Fd=="object"&&Fd&&Fd.Object===Object&&Fd;return U0=t,U0}var G0,XA;function fn(){if(XA)return G0;XA=1;var t=JR(),e=typeof self=="object"&&self&&self.Object===Object&&self,r=t||e||Function("return this")();return G0=r,G0}var Y0,QA;function Zl(){if(QA)return Y0;QA=1;var t=fn(),e=t.Symbol;return Y0=e,Y0}var V0,ZA;function kW(){if(ZA)return V0;ZA=1;var t=Zl(),e=Object.prototype,r=e.hasOwnProperty,i=e.toString,n=t?t.toStringTag:void 0;function s(o){var c=r.call(o,n),u=o[n];try{o[n]=void 0;var h=!0}catch{}var d=i.call(o);return h&&(c?o[n]=u:delete o[n]),d}return V0=s,V0}var W0,KA;function _W(){if(KA)return W0;KA=1;var t=Object.prototype,e=t.toString;function r(i){return e.call(i)}return W0=r,W0}var X0,JA;function oo(){if(JA)return X0;JA=1;var t=Zl(),e=kW(),r=_W(),i="[object Null]",n="[object Undefined]",s=t?t.toStringTag:void 0;function o(c){return c==null?c===void 0?n:i:s&&s in Object(c)?e(c):r(c)}return X0=o,X0}var Q0,tB;function Gi(){if(tB)return Q0;tB=1;function t(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}return Q0=t,Q0}var Z0,eB;function uh(){if(eB)return Z0;eB=1;var t=oo(),e=Gi(),r="[object AsyncFunction]",i="[object Function]",n="[object GeneratorFunction]",s="[object Proxy]";function o(c){if(!e(c))return!1;var u=t(c);return u==i||u==n||u==r||u==s}return Z0=o,Z0}var K0,rB;function TW(){if(rB)return K0;rB=1;var t=fn(),e=t["__core-js_shared__"];return K0=e,K0}var J0,iB;function EW(){if(iB)return J0;iB=1;var t=TW(),e=(function(){var i=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})();function r(i){return!!e&&e in i}return J0=r,J0}var ty,nB;function tD(){if(nB)return ty;nB=1;var t=Function.prototype,e=t.toString;function r(i){if(i!=null){try{return e.call(i)}catch{}try{return i+""}catch{}}return""}return ty=r,ty}var ey,aB;function AW(){if(aB)return ey;aB=1;var t=uh(),e=EW(),r=Gi(),i=tD(),n=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,o=Function.prototype,c=Object.prototype,u=o.toString,h=c.hasOwnProperty,d=RegExp("^"+u.call(h).replace(n,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function p(m){if(!r(m)||e(m))return!1;var g=t(m)?d:s;return g.test(i(m))}return ey=p,ey}var ry,sB;function BW(){if(sB)return ry;sB=1;function t(e,r){return e==null?void 0:e[r]}return ry=t,ry}var iy,oB;function lo(){if(oB)return iy;oB=1;var t=AW(),e=BW();function r(i,n){var s=e(i,n);return t(s)?s:void 0}return iy=r,iy}var ny,lB;function cw(){if(lB)return ny;lB=1;var t=lo(),e=fn(),r=t(e,"Map");return ny=r,ny}var ay,cB;function Ep(){if(cB)return ay;cB=1;var t=lo(),e=t(Object,"create");return ay=e,ay}var sy,uB;function LW(){if(uB)return sy;uB=1;var t=Ep();function e(){this.__data__=t?t(null):{},this.size=0}return sy=e,sy}var oy,hB;function MW(){if(hB)return oy;hB=1;function t(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}return oy=t,oy}var ly,dB;function NW(){if(dB)return ly;dB=1;var t=Ep(),e="__lodash_hash_undefined__",r=Object.prototype,i=r.hasOwnProperty;function n(s){var o=this.__data__;if(t){var c=o[s];return c===e?void 0:c}return i.call(o,s)?o[s]:void 0}return ly=n,ly}var cy,fB;function OW(){if(fB)return cy;fB=1;var t=Ep(),e=Object.prototype,r=e.hasOwnProperty;function i(n){var s=this.__data__;return t?s[n]!==void 0:r.call(s,n)}return cy=i,cy}var uy,pB;function RW(){if(pB)return uy;pB=1;var t=Ep(),e="__lodash_hash_undefined__";function r(i,n){var s=this.__data__;return this.size+=this.has(i)?0:1,s[i]=t&&n===void 0?e:n,this}return uy=r,uy}var hy,gB;function DW(){if(gB)return hy;gB=1;var t=LW(),e=MW(),r=NW(),i=OW(),n=RW();function s(o){var c=-1,u=o==null?0:o.length;for(this.clear();++c<u;){var h=o[c];this.set(h[0],h[1])}}return s.prototype.clear=t,s.prototype.delete=e,s.prototype.get=r,s.prototype.has=i,s.prototype.set=n,hy=s,hy}var dy,mB;function FW(){if(mB)return dy;mB=1;var t=DW(),e=Tp(),r=cw();function i(){this.size=0,this.__data__={hash:new t,map:new(r||e),string:new t}}return dy=i,dy}var fy,yB;function IW(){if(yB)return fy;yB=1;function t(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}return fy=t,fy}var py,xB;function Ap(){if(xB)return py;xB=1;var t=IW();function e(r,i){var n=r.__data__;return t(i)?n[typeof i=="string"?"string":"hash"]:n.map}return py=e,py}var gy,bB;function qW(){if(bB)return gy;bB=1;var t=Ap();function e(r){var i=t(this,r).delete(r);return this.size-=i?1:0,i}return gy=e,gy}var my,vB;function zW(){if(vB)return my;vB=1;var t=Ap();function e(r){return t(this,r).get(r)}return my=e,my}var yy,CB;function jW(){if(CB)return yy;CB=1;var t=Ap();function e(r){return t(this,r).has(r)}return yy=e,yy}var xy,wB;function $W(){if(wB)return xy;wB=1;var t=Ap();function e(r,i){var n=t(this,r),s=n.size;return n.set(r,i),this.size+=n.size==s?0:1,this}return xy=e,xy}var by,SB;function uw(){if(SB)return by;SB=1;var t=FW(),e=qW(),r=zW(),i=jW(),n=$W();function s(o){var c=-1,u=o==null?0:o.length;for(this.clear();++c<u;){var h=o[c];this.set(h[0],h[1])}}return s.prototype.clear=t,s.prototype.delete=e,s.prototype.get=r,s.prototype.has=i,s.prototype.set=n,by=s,by}var vy,kB;function PW(){if(kB)return vy;kB=1;var t=Tp(),e=cw(),r=uw(),i=200;function n(s,o){var c=this.__data__;if(c instanceof t){var u=c.__data__;if(!e||u.length<i-1)return u.push([s,o]),this.size=++c.size,this;c=this.__data__=new r(u)}return c.set(s,o),this.size=c.size,this}return vy=n,vy}var Cy,_B;function Bp(){if(_B)return Cy;_B=1;var t=Tp(),e=vW(),r=CW(),i=wW(),n=SW(),s=PW();function o(c){var u=this.__data__=new t(c);this.size=u.size}return o.prototype.clear=e,o.prototype.delete=r,o.prototype.get=i,o.prototype.has=n,o.prototype.set=s,Cy=o,Cy}var wy,TB;function hw(){if(TB)return wy;TB=1;function t(e,r){for(var i=-1,n=e==null?0:e.length;++i<n&&r(e[i],i,e)!==!1;);return e}return wy=t,wy}var Sy,EB;function eD(){if(EB)return Sy;EB=1;var t=lo(),e=(function(){try{var r=t(Object,"defineProperty");return r({},"",{}),r}catch{}})();return Sy=e,Sy}var ky,AB;function Lp(){if(AB)return ky;AB=1;var t=eD();function e(r,i,n){i=="__proto__"&&t?t(r,i,{configurable:!0,enumerable:!0,value:n,writable:!0}):r[i]=n}return ky=e,ky}var _y,BB;function Mp(){if(BB)return _y;BB=1;var t=Lp(),e=Ql(),r=Object.prototype,i=r.hasOwnProperty;function n(s,o,c){var u=s[o];(!(i.call(s,o)&&e(u,c))||c===void 0&&!(o in s))&&t(s,o,c)}return _y=n,_y}var Ty,LB;function hh(){if(LB)return Ty;LB=1;var t=Mp(),e=Lp();function r(i,n,s,o){var c=!s;s||(s={});for(var u=-1,h=n.length;++u<h;){var d=n[u],p=o?o(s[d],i[d],d,s,i):void 0;p===void 0&&(p=i[d]),c?e(s,d,p):t(s,d,p)}return s}return Ty=r,Ty}var Ey,MB;function HW(){if(MB)return Ey;MB=1;function t(e,r){for(var i=-1,n=Array(e);++i<e;)n[i]=r(i);return n}return Ey=t,Ey}var Ay,NB;function Fn(){if(NB)return Ay;NB=1;function t(e){return e!=null&&typeof e=="object"}return Ay=t,Ay}var By,OB;function UW(){if(OB)return By;OB=1;var t=oo(),e=Fn(),r="[object Arguments]";function i(n){return e(n)&&t(n)==r}return By=i,By}var Ly,RB;function dh(){if(RB)return Ly;RB=1;var t=UW(),e=Fn(),r=Object.prototype,i=r.hasOwnProperty,n=r.propertyIsEnumerable,s=t((function(){return arguments})())?t:function(o){return e(o)&&i.call(o,"callee")&&!n.call(o,"callee")};return Ly=s,Ly}var My,DB;function kr(){if(DB)return My;DB=1;var t=Array.isArray;return My=t,My}var mu={exports:{}},Ny,FB;function GW(){if(FB)return Ny;FB=1;function t(){return!1}return Ny=t,Ny}mu.exports;var IB;function Kl(){return IB||(IB=1,(function(t,e){var r=fn(),i=GW(),n=e&&!e.nodeType&&e,s=n&&!0&&t&&!t.nodeType&&t,o=s&&s.exports===n,c=o?r.Buffer:void 0,u=c?c.isBuffer:void 0,h=u||i;t.exports=h})(mu,mu.exports)),mu.exports}var Oy,qB;function Np(){if(qB)return Oy;qB=1;var t=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function r(i,n){var s=typeof i;return n=n??t,!!n&&(s=="number"||s!="symbol"&&e.test(i))&&i>-1&&i%1==0&&i<n}return Oy=r,Oy}var Ry,zB;function dw(){if(zB)return Ry;zB=1;var t=9007199254740991;function e(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=t}return Ry=e,Ry}var Dy,jB;function YW(){if(jB)return Dy;jB=1;var t=oo(),e=dw(),r=Fn(),i="[object Arguments]",n="[object Array]",s="[object Boolean]",o="[object Date]",c="[object Error]",u="[object Function]",h="[object Map]",d="[object Number]",p="[object Object]",m="[object RegExp]",g="[object Set]",x="[object String]",v="[object WeakMap]",b="[object ArrayBuffer]",w="[object DataView]",T="[object Float32Array]",k="[object Float64Array]",E="[object Int8Array]",L="[object Int16Array]",A="[object Int32Array]",R="[object Uint8Array]",j="[object Uint8ClampedArray]",Y="[object Uint16Array]",V="[object Uint32Array]",O={};O[T]=O[k]=O[E]=O[L]=O[A]=O[R]=O[j]=O[Y]=O[V]=!0,O[i]=O[n]=O[b]=O[s]=O[w]=O[o]=O[c]=O[u]=O[h]=O[d]=O[p]=O[m]=O[g]=O[x]=O[v]=!1;function z(X){return r(X)&&e(X.length)&&!!O[t(X)]}return Dy=z,Dy}var Fy,$B;function Op(){if($B)return Fy;$B=1;function t(e){return function(r){return e(r)}}return Fy=t,Fy}var yu={exports:{}};yu.exports;var PB;function fw(){return PB||(PB=1,(function(t,e){var r=JR(),i=e&&!e.nodeType&&e,n=i&&!0&&t&&!t.nodeType&&t,s=n&&n.exports===i,o=s&&r.process,c=(function(){try{var u=n&&n.require&&n.require("util").types;return u||o&&o.binding&&o.binding("util")}catch{}})();t.exports=c})(yu,yu.exports)),yu.exports}var Iy,HB;function fh(){if(HB)return Iy;HB=1;var t=YW(),e=Op(),r=fw(),i=r&&r.isTypedArray,n=i?e(i):t;return Iy=n,Iy}var qy,UB;function rD(){if(UB)return qy;UB=1;var t=HW(),e=dh(),r=kr(),i=Kl(),n=Np(),s=fh(),o=Object.prototype,c=o.hasOwnProperty;function u(h,d){var p=r(h),m=!p&&e(h),g=!p&&!m&&i(h),x=!p&&!m&&!g&&s(h),v=p||m||g||x,b=v?t(h.length,String):[],w=b.length;for(var T in h)(d||c.call(h,T))&&!(v&&(T=="length"||g&&(T=="offset"||T=="parent")||x&&(T=="buffer"||T=="byteLength"||T=="byteOffset")||n(T,w)))&&b.push(T);return b}return qy=u,qy}var zy,GB;function Rp(){if(GB)return zy;GB=1;var t=Object.prototype;function e(r){var i=r&&r.constructor,n=typeof i=="function"&&i.prototype||t;return r===n}return zy=e,zy}var jy,YB;function iD(){if(YB)return jy;YB=1;function t(e,r){return function(i){return e(r(i))}}return jy=t,jy}var $y,VB;function VW(){if(VB)return $y;VB=1;var t=iD(),e=t(Object.keys,Object);return $y=e,$y}var Py,WB;function pw(){if(WB)return Py;WB=1;var t=Rp(),e=VW(),r=Object.prototype,i=r.hasOwnProperty;function n(s){if(!t(s))return e(s);var o=[];for(var c in Object(s))i.call(s,c)&&c!="constructor"&&o.push(c);return o}return Py=n,Py}var Hy,XB;function ga(){if(XB)return Hy;XB=1;var t=uh(),e=dw();function r(i){return i!=null&&e(i.length)&&!t(i)}return Hy=r,Hy}var Uy,QB;function cs(){if(QB)return Uy;QB=1;var t=rD(),e=pw(),r=ga();function i(n){return r(n)?t(n):e(n)}return Uy=i,Uy}var Gy,ZB;function WW(){if(ZB)return Gy;ZB=1;var t=hh(),e=cs();function r(i,n){return i&&t(n,e(n),i)}return Gy=r,Gy}var Yy,KB;function XW(){if(KB)return Yy;KB=1;function t(e){var r=[];if(e!=null)for(var i in Object(e))r.push(i);return r}return Yy=t,Yy}var Vy,JB;function QW(){if(JB)return Vy;JB=1;var t=Gi(),e=Rp(),r=XW(),i=Object.prototype,n=i.hasOwnProperty;function s(o){if(!t(o))return r(o);var c=e(o),u=[];for(var h in o)h=="constructor"&&(c||!n.call(o,h))||u.push(h);return u}return Vy=s,Vy}var Wy,tL;function co(){if(tL)return Wy;tL=1;var t=rD(),e=QW(),r=ga();function i(n){return r(n)?t(n,!0):e(n)}return Wy=i,Wy}var Xy,eL;function ZW(){if(eL)return Xy;eL=1;var t=hh(),e=co();function r(i,n){return i&&t(n,e(n),i)}return Xy=r,Xy}var xu={exports:{}};xu.exports;var rL;function nD(){return rL||(rL=1,(function(t,e){var r=fn(),i=e&&!e.nodeType&&e,n=i&&!0&&t&&!t.nodeType&&t,s=n&&n.exports===i,o=s?r.Buffer:void 0,c=o?o.allocUnsafe:void 0;function u(h,d){if(d)return h.slice();var p=h.length,m=c?c(p):new h.constructor(p);return h.copy(m),m}t.exports=u})(xu,xu.exports)),xu.exports}var Qy,iL;function aD(){if(iL)return Qy;iL=1;function t(e,r){var i=-1,n=e.length;for(r||(r=Array(n));++i<n;)r[i]=e[i];return r}return Qy=t,Qy}var Zy,nL;function sD(){if(nL)return Zy;nL=1;function t(e,r){for(var i=-1,n=e==null?0:e.length,s=0,o=[];++i<n;){var c=e[i];r(c,i,e)&&(o[s++]=c)}return o}return Zy=t,Zy}var Ky,aL;function oD(){if(aL)return Ky;aL=1;function t(){return[]}return Ky=t,Ky}var Jy,sL;function gw(){if(sL)return Jy;sL=1;var t=sD(),e=oD(),r=Object.prototype,i=r.propertyIsEnumerable,n=Object.getOwnPropertySymbols,s=n?function(o){return o==null?[]:(o=Object(o),t(n(o),function(c){return i.call(o,c)}))}:e;return Jy=s,Jy}var tx,oL;function KW(){if(oL)return tx;oL=1;var t=hh(),e=gw();function r(i,n){return t(i,e(i),n)}return tx=r,tx}var ex,lL;function mw(){if(lL)return ex;lL=1;function t(e,r){for(var i=-1,n=r.length,s=e.length;++i<n;)e[s+i]=r[i];return e}return ex=t,ex}var rx,cL;function Dp(){if(cL)return rx;cL=1;var t=iD(),e=t(Object.getPrototypeOf,Object);return rx=e,rx}var ix,uL;function lD(){if(uL)return ix;uL=1;var t=mw(),e=Dp(),r=gw(),i=oD(),n=Object.getOwnPropertySymbols,s=n?function(o){for(var c=[];o;)t(c,r(o)),o=e(o);return c}:i;return ix=s,ix}var nx,hL;function JW(){if(hL)return nx;hL=1;var t=hh(),e=lD();function r(i,n){return t(i,e(i),n)}return nx=r,nx}var ax,dL;function cD(){if(dL)return ax;dL=1;var t=mw(),e=kr();function r(i,n,s){var o=n(i);return e(i)?o:t(o,s(i))}return ax=r,ax}var sx,fL;function uD(){if(fL)return sx;fL=1;var t=cD(),e=gw(),r=cs();function i(n){return t(n,r,e)}return sx=i,sx}var ox,pL;function tX(){if(pL)return ox;pL=1;var t=cD(),e=lD(),r=co();function i(n){return t(n,r,e)}return ox=i,ox}var lx,gL;function eX(){if(gL)return lx;gL=1;var t=lo(),e=fn(),r=t(e,"DataView");return lx=r,lx}var cx,mL;function rX(){if(mL)return cx;mL=1;var t=lo(),e=fn(),r=t(e,"Promise");return cx=r,cx}var ux,yL;function hD(){if(yL)return ux;yL=1;var t=lo(),e=fn(),r=t(e,"Set");return ux=r,ux}var hx,xL;function iX(){if(xL)return hx;xL=1;var t=lo(),e=fn(),r=t(e,"WeakMap");return hx=r,hx}var dx,bL;function Jl(){if(bL)return dx;bL=1;var t=eX(),e=cw(),r=rX(),i=hD(),n=iX(),s=oo(),o=tD(),c="[object Map]",u="[object Object]",h="[object Promise]",d="[object Set]",p="[object WeakMap]",m="[object DataView]",g=o(t),x=o(e),v=o(r),b=o(i),w=o(n),T=s;return(t&&T(new t(new ArrayBuffer(1)))!=m||e&&T(new e)!=c||r&&T(r.resolve())!=h||i&&T(new i)!=d||n&&T(new n)!=p)&&(T=function(k){var E=s(k),L=E==u?k.constructor:void 0,A=L?o(L):"";if(A)switch(A){case g:return m;case x:return c;case v:return h;case b:return d;case w:return p}return E}),dx=T,dx}var fx,vL;function nX(){if(vL)return fx;vL=1;var t=Object.prototype,e=t.hasOwnProperty;function r(i){var n=i.length,s=new i.constructor(n);return n&&typeof i[0]=="string"&&e.call(i,"index")&&(s.index=i.index,s.input=i.input),s}return fx=r,fx}var px,CL;function dD(){if(CL)return px;CL=1;var t=fn(),e=t.Uint8Array;return px=e,px}var gx,wL;function yw(){if(wL)return gx;wL=1;var t=dD();function e(r){var i=new r.constructor(r.byteLength);return new t(i).set(new t(r)),i}return gx=e,gx}var mx,SL;function aX(){if(SL)return mx;SL=1;var t=yw();function e(r,i){var n=i?t(r.buffer):r.buffer;return new r.constructor(n,r.byteOffset,r.byteLength)}return mx=e,mx}var yx,kL;function sX(){if(kL)return yx;kL=1;var t=/\w*$/;function e(r){var i=new r.constructor(r.source,t.exec(r));return i.lastIndex=r.lastIndex,i}return yx=e,yx}var xx,_L;function oX(){if(_L)return xx;_L=1;var t=Zl(),e=t?t.prototype:void 0,r=e?e.valueOf:void 0;function i(n){return r?Object(r.call(n)):{}}return xx=i,xx}var bx,TL;function fD(){if(TL)return bx;TL=1;var t=yw();function e(r,i){var n=i?t(r.buffer):r.buffer;return new r.constructor(n,r.byteOffset,r.length)}return bx=e,bx}var vx,EL;function lX(){if(EL)return vx;EL=1;var t=yw(),e=aX(),r=sX(),i=oX(),n=fD(),s="[object Boolean]",o="[object Date]",c="[object Map]",u="[object Number]",h="[object RegExp]",d="[object Set]",p="[object String]",m="[object Symbol]",g="[object ArrayBuffer]",x="[object DataView]",v="[object Float32Array]",b="[object Float64Array]",w="[object Int8Array]",T="[object Int16Array]",k="[object Int32Array]",E="[object Uint8Array]",L="[object Uint8ClampedArray]",A="[object Uint16Array]",R="[object Uint32Array]";function j(Y,V,O){var z=Y.constructor;switch(V){case g:return t(Y);case s:case o:return new z(+Y);case x:return e(Y,O);case v:case b:case w:case T:case k:case E:case L:case A:case R:return n(Y,O);case c:return new z;case u:case p:return new z(Y);case h:return r(Y);case d:return new z;case m:return i(Y)}}return vx=j,vx}var Cx,AL;function pD(){if(AL)return Cx;AL=1;var t=Gi(),e=Object.create,r=(function(){function i(){}return function(n){if(!t(n))return{};if(e)return e(n);i.prototype=n;var s=new i;return i.prototype=void 0,s}})();return Cx=r,Cx}var wx,BL;function gD(){if(BL)return wx;BL=1;var t=pD(),e=Dp(),r=Rp();function i(n){return typeof n.constructor=="function"&&!r(n)?t(e(n)):{}}return wx=i,wx}var Sx,LL;function cX(){if(LL)return Sx;LL=1;var t=Jl(),e=Fn(),r="[object Map]";function i(n){return e(n)&&t(n)==r}return Sx=i,Sx}var kx,ML;function uX(){if(ML)return kx;ML=1;var t=cX(),e=Op(),r=fw(),i=r&&r.isMap,n=i?e(i):t;return kx=n,kx}var _x,NL;function hX(){if(NL)return _x;NL=1;var t=Jl(),e=Fn(),r="[object Set]";function i(n){return e(n)&&t(n)==r}return _x=i,_x}var Tx,OL;function dX(){if(OL)return Tx;OL=1;var t=hX(),e=Op(),r=fw(),i=r&&r.isSet,n=i?e(i):t;return Tx=n,Tx}var Ex,RL;function mD(){if(RL)return Ex;RL=1;var t=Bp(),e=hw(),r=Mp(),i=WW(),n=ZW(),s=nD(),o=aD(),c=KW(),u=JW(),h=uD(),d=tX(),p=Jl(),m=nX(),g=lX(),x=gD(),v=kr(),b=Kl(),w=uX(),T=Gi(),k=dX(),E=cs(),L=co(),A=1,R=2,j=4,Y="[object Arguments]",V="[object Array]",O="[object Boolean]",z="[object Date]",X="[object Error]",M="[object Function]",I="[object GeneratorFunction]",N="[object Map]",P="[object Number]",$="[object Object]",D="[object RegExp]",q="[object Set]",G="[object String]",Z="[object Symbol]",H="[object WeakMap]",Q="[object ArrayBuffer]",J="[object DataView]",et="[object Float32Array]",at="[object Float64Array]",lt="[object Int8Array]",xt="[object Int16Array]",mt="[object Int32Array]",bt="[object Uint8Array]",Tt="[object Uint8ClampedArray]",_t="[object Uint16Array]",Mt="[object Uint32Array]",Et={};Et[Y]=Et[V]=Et[Q]=Et[J]=Et[O]=Et[z]=Et[et]=Et[at]=Et[lt]=Et[xt]=Et[mt]=Et[N]=Et[P]=Et[$]=Et[D]=Et[q]=Et[G]=Et[Z]=Et[bt]=Et[Tt]=Et[_t]=Et[Mt]=!0,Et[X]=Et[M]=Et[H]=!1;function Yt(zt,ve,Ee,Ve,ar,We){var Me,Ae=ve&A,sr=ve&R,gt=ve&j;if(Ee&&(Me=ar?Ee(zt,Ve,ar,We):Ee(zt)),Me!==void 0)return Me;if(!T(zt))return zt;var kt=v(zt);if(kt){if(Me=m(zt),!Ae)return o(zt,Me)}else{var Dt=p(zt),ee=Dt==M||Dt==I;if(b(zt))return s(zt,Ae);if(Dt==$||Dt==Y||ee&&!ar){if(Me=sr||ee?{}:x(zt),!Ae)return sr?u(zt,n(Me,zt)):c(zt,i(Me,zt))}else{if(!Et[Dt])return ar?zt:{};Me=g(zt,Dt,Ae)}}We||(We=new t);var ae=We.get(zt);if(ae)return ae;We.set(zt,Me),k(zt)?zt.forEach(function(Lt){Me.add(Yt(Lt,ve,Ee,Lt,zt,We))}):w(zt)&&zt.forEach(function(Lt,Ht){Me.set(Ht,Yt(Lt,ve,Ee,Ht,zt,We))});var Xe=gt?sr?d:h:sr?L:E,K=kt?void 0:Xe(zt);return e(K||zt,function(Lt,Ht){K&&(Ht=Lt,Lt=zt[Ht]),r(Me,Ht,Yt(Lt,ve,Ee,Ht,zt,We))}),Me}return Ex=Yt,Ex}var Ax,DL;function fX(){if(DL)return Ax;DL=1;var t=mD(),e=4;function r(i){return t(i,e)}return Ax=r,Ax}var Bx,FL;function xw(){if(FL)return Bx;FL=1;function t(e){return function(){return e}}return Bx=t,Bx}var Lx,IL;function pX(){if(IL)return Lx;IL=1;function t(e){return function(r,i,n){for(var s=-1,o=Object(r),c=n(r),u=c.length;u--;){var h=c[e?u:++s];if(i(o[h],h,o)===!1)break}return r}}return Lx=t,Lx}var Mx,qL;function bw(){if(qL)return Mx;qL=1;var t=pX(),e=t();return Mx=e,Mx}var Nx,zL;function vw(){if(zL)return Nx;zL=1;var t=bw(),e=cs();function r(i,n){return i&&t(i,n,e)}return Nx=r,Nx}var Ox,jL;function gX(){if(jL)return Ox;jL=1;var t=ga();function e(r,i){return function(n,s){if(n==null)return n;if(!t(n))return r(n,s);for(var o=n.length,c=i?o:-1,u=Object(n);(i?c--:++c<o)&&s(u[c],c,u)!==!1;);return n}}return Ox=e,Ox}var Rx,$L;function Fp(){if($L)return Rx;$L=1;var t=vw(),e=gX(),r=e(t);return Rx=r,Rx}var Dx,PL;function uo(){if(PL)return Dx;PL=1;function t(e){return e}return Dx=t,Dx}var Fx,HL;function yD(){if(HL)return Fx;HL=1;var t=uo();function e(r){return typeof r=="function"?r:t}return Fx=e,Fx}var Ix,UL;function xD(){if(UL)return Ix;UL=1;var t=hw(),e=Fp(),r=yD(),i=kr();function n(s,o){var c=i(s)?t:e;return c(s,r(o))}return Ix=n,Ix}var qx,GL;function bD(){return GL||(GL=1,qx=xD()),qx}var zx,YL;function mX(){if(YL)return zx;YL=1;var t=Fp();function e(r,i){var n=[];return t(r,function(s,o,c){i(s,o,c)&&n.push(s)}),n}return zx=e,zx}var jx,VL;function yX(){if(VL)return jx;VL=1;var t="__lodash_hash_undefined__";function e(r){return this.__data__.set(r,t),this}return jx=e,jx}var $x,WL;function xX(){if(WL)return $x;WL=1;function t(e){return this.__data__.has(e)}return $x=t,$x}var Px,XL;function vD(){if(XL)return Px;XL=1;var t=uw(),e=yX(),r=xX();function i(n){var s=-1,o=n==null?0:n.length;for(this.__data__=new t;++s<o;)this.add(n[s])}return i.prototype.add=i.prototype.push=e,i.prototype.has=r,Px=i,Px}var Hx,QL;function bX(){if(QL)return Hx;QL=1;function t(e,r){for(var i=-1,n=e==null?0:e.length;++i<n;)if(r(e[i],i,e))return!0;return!1}return Hx=t,Hx}var Ux,ZL;function CD(){if(ZL)return Ux;ZL=1;function t(e,r){return e.has(r)}return Ux=t,Ux}var Gx,KL;function wD(){if(KL)return Gx;KL=1;var t=vD(),e=bX(),r=CD(),i=1,n=2;function s(o,c,u,h,d,p){var m=u&i,g=o.length,x=c.length;if(g!=x&&!(m&&x>g))return!1;var v=p.get(o),b=p.get(c);if(v&&b)return v==c&&b==o;var w=-1,T=!0,k=u&n?new t:void 0;for(p.set(o,c),p.set(c,o);++w<g;){var E=o[w],L=c[w];if(h)var A=m?h(L,E,w,c,o,p):h(E,L,w,o,c,p);if(A!==void 0){if(A)continue;T=!1;break}if(k){if(!e(c,function(R,j){if(!r(k,j)&&(E===R||d(E,R,u,h,p)))return k.push(j)})){T=!1;break}}else if(!(E===L||d(E,L,u,h,p))){T=!1;break}}return p.delete(o),p.delete(c),T}return Gx=s,Gx}var Yx,JL;function vX(){if(JL)return Yx;JL=1;function t(e){var r=-1,i=Array(e.size);return e.forEach(function(n,s){i[++r]=[s,n]}),i}return Yx=t,Yx}var Vx,t5;function Cw(){if(t5)return Vx;t5=1;function t(e){var r=-1,i=Array(e.size);return e.forEach(function(n){i[++r]=n}),i}return Vx=t,Vx}var Wx,e5;function CX(){if(e5)return Wx;e5=1;var t=Zl(),e=dD(),r=Ql(),i=wD(),n=vX(),s=Cw(),o=1,c=2,u="[object Boolean]",h="[object Date]",d="[object Error]",p="[object Map]",m="[object Number]",g="[object RegExp]",x="[object Set]",v="[object String]",b="[object Symbol]",w="[object ArrayBuffer]",T="[object DataView]",k=t?t.prototype:void 0,E=k?k.valueOf:void 0;function L(A,R,j,Y,V,O,z){switch(j){case T:if(A.byteLength!=R.byteLength||A.byteOffset!=R.byteOffset)return!1;A=A.buffer,R=R.buffer;case w:return!(A.byteLength!=R.byteLength||!O(new e(A),new e(R)));case u:case h:case m:return r(+A,+R);case d:return A.name==R.name&&A.message==R.message;case g:case v:return A==R+"";case p:var X=n;case x:var M=Y&o;if(X||(X=s),A.size!=R.size&&!M)return!1;var I=z.get(A);if(I)return I==R;Y|=c,z.set(A,R);var N=i(X(A),X(R),Y,V,O,z);return z.delete(A),N;case b:if(E)return E.call(A)==E.call(R)}return!1}return Wx=L,Wx}var Xx,r5;function wX(){if(r5)return Xx;r5=1;var t=uD(),e=1,r=Object.prototype,i=r.hasOwnProperty;function n(s,o,c,u,h,d){var p=c&e,m=t(s),g=m.length,x=t(o),v=x.length;if(g!=v&&!p)return!1;for(var b=g;b--;){var w=m[b];if(!(p?w in o:i.call(o,w)))return!1}var T=d.get(s),k=d.get(o);if(T&&k)return T==o&&k==s;var E=!0;d.set(s,o),d.set(o,s);for(var L=p;++b<g;){w=m[b];var A=s[w],R=o[w];if(u)var j=p?u(R,A,w,o,s,d):u(A,R,w,s,o,d);if(!(j===void 0?A===R||h(A,R,c,u,d):j)){E=!1;break}L||(L=w=="constructor")}if(E&&!L){var Y=s.constructor,V=o.constructor;Y!=V&&"constructor"in s&&"constructor"in o&&!(typeof Y=="function"&&Y instanceof Y&&typeof V=="function"&&V instanceof V)&&(E=!1)}return d.delete(s),d.delete(o),E}return Xx=n,Xx}var Qx,i5;function SX(){if(i5)return Qx;i5=1;var t=Bp(),e=wD(),r=CX(),i=wX(),n=Jl(),s=kr(),o=Kl(),c=fh(),u=1,h="[object Arguments]",d="[object Array]",p="[object Object]",m=Object.prototype,g=m.hasOwnProperty;function x(v,b,w,T,k,E){var L=s(v),A=s(b),R=L?d:n(v),j=A?d:n(b);R=R==h?p:R,j=j==h?p:j;var Y=R==p,V=j==p,O=R==j;if(O&&o(v)){if(!o(b))return!1;L=!0,Y=!1}if(O&&!Y)return E||(E=new t),L||c(v)?e(v,b,w,T,k,E):r(v,b,R,w,T,k,E);if(!(w&u)){var z=Y&&g.call(v,"__wrapped__"),X=V&&g.call(b,"__wrapped__");if(z||X){var M=z?v.value():v,I=X?b.value():b;return E||(E=new t),k(M,I,w,T,E)}}return O?(E||(E=new t),i(v,b,w,T,k,E)):!1}return Qx=x,Qx}var Zx,n5;function SD(){if(n5)return Zx;n5=1;var t=SX(),e=Fn();function r(i,n,s,o,c){return i===n?!0:i==null||n==null||!e(i)&&!e(n)?i!==i&&n!==n:t(i,n,s,o,r,c)}return Zx=r,Zx}var Kx,a5;function kX(){if(a5)return Kx;a5=1;var t=Bp(),e=SD(),r=1,i=2;function n(s,o,c,u){var h=c.length,d=h,p=!u;if(s==null)return!d;for(s=Object(s);h--;){var m=c[h];if(p&&m[2]?m[1]!==s[m[0]]:!(m[0]in s))return!1}for(;++h<d;){m=c[h];var g=m[0],x=s[g],v=m[1];if(p&&m[2]){if(x===void 0&&!(g in s))return!1}else{var b=new t;if(u)var w=u(x,v,g,s,o,b);if(!(w===void 0?e(v,x,r|i,u,b):w))return!1}}return!0}return Kx=n,Kx}var Jx,s5;function kD(){if(s5)return Jx;s5=1;var t=Gi();function e(r){return r===r&&!t(r)}return Jx=e,Jx}var tb,o5;function _X(){if(o5)return tb;o5=1;var t=kD(),e=cs();function r(i){for(var n=e(i),s=n.length;s--;){var o=n[s],c=i[o];n[s]=[o,c,t(c)]}return n}return tb=r,tb}var eb,l5;function _D(){if(l5)return eb;l5=1;function t(e,r){return function(i){return i==null?!1:i[e]===r&&(r!==void 0||e in Object(i))}}return eb=t,eb}var rb,c5;function TX(){if(c5)return rb;c5=1;var t=kX(),e=_X(),r=_D();function i(n){var s=e(n);return s.length==1&&s[0][2]?r(s[0][0],s[0][1]):function(o){return o===n||t(o,n,s)}}return rb=i,rb}var ib,u5;function tc(){if(u5)return ib;u5=1;var t=oo(),e=Fn(),r="[object Symbol]";function i(n){return typeof n=="symbol"||e(n)&&t(n)==r}return ib=i,ib}var nb,h5;function ww(){if(h5)return nb;h5=1;var t=kr(),e=tc(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;function n(s,o){if(t(s))return!1;var c=typeof s;return c=="number"||c=="symbol"||c=="boolean"||s==null||e(s)?!0:i.test(s)||!r.test(s)||o!=null&&s in Object(o)}return nb=n,nb}var ab,d5;function EX(){if(d5)return ab;d5=1;var t=uw(),e="Expected a function";function r(i,n){if(typeof i!="function"||n!=null&&typeof n!="function")throw new TypeError(e);var s=function(){var o=arguments,c=n?n.apply(this,o):o[0],u=s.cache;if(u.has(c))return u.get(c);var h=i.apply(this,o);return s.cache=u.set(c,h)||u,h};return s.cache=new(r.Cache||t),s}return r.Cache=t,ab=r,ab}var sb,f5;function AX(){if(f5)return sb;f5=1;var t=EX(),e=500;function r(i){var n=t(i,function(o){return s.size===e&&s.clear(),o}),s=n.cache;return n}return sb=r,sb}var ob,p5;function BX(){if(p5)return ob;p5=1;var t=AX(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,i=t(function(n){var s=[];return n.charCodeAt(0)===46&&s.push(""),n.replace(e,function(o,c,u,h){s.push(u?h.replace(r,"$1"):c||o)}),s});return ob=i,ob}var lb,g5;function Ip(){if(g5)return lb;g5=1;function t(e,r){for(var i=-1,n=e==null?0:e.length,s=Array(n);++i<n;)s[i]=r(e[i],i,e);return s}return lb=t,lb}var cb,m5;function LX(){if(m5)return cb;m5=1;var t=Zl(),e=Ip(),r=kr(),i=tc(),n=t?t.prototype:void 0,s=n?n.toString:void 0;function o(c){if(typeof c=="string")return c;if(r(c))return e(c,o)+"";if(i(c))return s?s.call(c):"";var u=c+"";return u=="0"&&1/c==-1/0?"-0":u}return cb=o,cb}var ub,y5;function TD(){if(y5)return ub;y5=1;var t=LX();function e(r){return r==null?"":t(r)}return ub=e,ub}var hb,x5;function qp(){if(x5)return hb;x5=1;var t=kr(),e=ww(),r=BX(),i=TD();function n(s,o){return t(s)?s:e(s,o)?[s]:r(i(s))}return hb=n,hb}var db,b5;function ph(){if(b5)return db;b5=1;var t=tc();function e(r){if(typeof r=="string"||t(r))return r;var i=r+"";return i=="0"&&1/r==-1/0?"-0":i}return db=e,db}var fb,v5;function zp(){if(v5)return fb;v5=1;var t=qp(),e=ph();function r(i,n){n=t(n,i);for(var s=0,o=n.length;i!=null&&s<o;)i=i[e(n[s++])];return s&&s==o?i:void 0}return fb=r,fb}var pb,C5;function MX(){if(C5)return pb;C5=1;var t=zp();function e(r,i,n){var s=r==null?void 0:t(r,i);return s===void 0?n:s}return pb=e,pb}var gb,w5;function NX(){if(w5)return gb;w5=1;function t(e,r){return e!=null&&r in Object(e)}return gb=t,gb}var mb,S5;function ED(){if(S5)return mb;S5=1;var t=qp(),e=dh(),r=kr(),i=Np(),n=dw(),s=ph();function o(c,u,h){u=t(u,c);for(var d=-1,p=u.length,m=!1;++d<p;){var g=s(u[d]);if(!(m=c!=null&&h(c,g)))break;c=c[g]}return m||++d!=p?m:(p=c==null?0:c.length,!!p&&n(p)&&i(g,p)&&(r(c)||e(c)))}return mb=o,mb}var yb,k5;function AD(){if(k5)return yb;k5=1;var t=NX(),e=ED();function r(i,n){return i!=null&&e(i,n,t)}return yb=r,yb}var xb,_5;function OX(){if(_5)return xb;_5=1;var t=SD(),e=MX(),r=AD(),i=ww(),n=kD(),s=_D(),o=ph(),c=1,u=2;function h(d,p){return i(d)&&n(p)?s(o(d),p):function(m){var g=e(m,d);return g===void 0&&g===p?r(m,d):t(p,g,c|u)}}return xb=h,xb}var bb,T5;function BD(){if(T5)return bb;T5=1;function t(e){return function(r){return r==null?void 0:r[e]}}return bb=t,bb}var vb,E5;function RX(){if(E5)return vb;E5=1;var t=zp();function e(r){return function(i){return t(i,r)}}return vb=e,vb}var Cb,A5;function DX(){if(A5)return Cb;A5=1;var t=BD(),e=RX(),r=ww(),i=ph();function n(s){return r(s)?t(i(s)):e(s)}return Cb=n,Cb}var wb,B5;function ma(){if(B5)return wb;B5=1;var t=TX(),e=OX(),r=uo(),i=kr(),n=DX();function s(o){return typeof o=="function"?o:o==null?r:typeof o=="object"?i(o)?e(o[0],o[1]):t(o):n(o)}return wb=s,wb}var Sb,L5;function LD(){if(L5)return Sb;L5=1;var t=sD(),e=mX(),r=ma(),i=kr();function n(s,o){var c=i(s)?t:e;return c(s,r(o,3))}return Sb=n,Sb}var kb,M5;function FX(){if(M5)return kb;M5=1;var t=Object.prototype,e=t.hasOwnProperty;function r(i,n){return i!=null&&e.call(i,n)}return kb=r,kb}var _b,N5;function MD(){if(N5)return _b;N5=1;var t=FX(),e=ED();function r(i,n){return i!=null&&e(i,n,t)}return _b=r,_b}var Tb,O5;function IX(){if(O5)return Tb;O5=1;var t=pw(),e=Jl(),r=dh(),i=kr(),n=ga(),s=Kl(),o=Rp(),c=fh(),u="[object Map]",h="[object Set]",d=Object.prototype,p=d.hasOwnProperty;function m(g){if(g==null)return!0;if(n(g)&&(i(g)||typeof g=="string"||typeof g.splice=="function"||s(g)||c(g)||r(g)))return!g.length;var x=e(g);if(x==u||x==h)return!g.size;if(o(g))return!t(g).length;for(var v in g)if(p.call(g,v))return!1;return!0}return Tb=m,Tb}var Eb,R5;function ND(){if(R5)return Eb;R5=1;function t(e){return e===void 0}return Eb=t,Eb}var Ab,D5;function OD(){if(D5)return Ab;D5=1;var t=Fp(),e=ga();function r(i,n){var s=-1,o=e(i)?Array(i.length):[];return t(i,function(c,u,h){o[++s]=n(c,u,h)}),o}return Ab=r,Ab}var Bb,F5;function RD(){if(F5)return Bb;F5=1;var t=Ip(),e=ma(),r=OD(),i=kr();function n(s,o){var c=i(s)?t:r;return c(s,e(o,3))}return Bb=n,Bb}var Lb,I5;function qX(){if(I5)return Lb;I5=1;function t(e,r,i,n){var s=-1,o=e==null?0:e.length;for(n&&o&&(i=e[++s]);++s<o;)i=r(i,e[s],s,e);return i}return Lb=t,Lb}var Mb,q5;function zX(){if(q5)return Mb;q5=1;function t(e,r,i,n,s){return s(e,function(o,c,u){i=n?(n=!1,o):r(i,o,c,u)}),i}return Mb=t,Mb}var Nb,z5;function DD(){if(z5)return Nb;z5=1;var t=qX(),e=Fp(),r=ma(),i=zX(),n=kr();function s(o,c,u){var h=n(o)?t:i,d=arguments.length<3;return h(o,r(c,4),u,d,e)}return Nb=s,Nb}var Ob,j5;function jX(){if(j5)return Ob;j5=1;var t=oo(),e=kr(),r=Fn(),i="[object String]";function n(s){return typeof s=="string"||!e(s)&&r(s)&&t(s)==i}return Ob=n,Ob}var Rb,$5;function $X(){if($5)return Rb;$5=1;var t=BD(),e=t("length");return Rb=e,Rb}var Db,P5;function PX(){if(P5)return Db;P5=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",n=e+r+i,s="\\ufe0e\\ufe0f",o="\\u200d",c=RegExp("["+o+t+n+s+"]");function u(h){return c.test(h)}return Db=u,Db}var Fb,H5;function HX(){if(H5)return Fb;H5=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",n=e+r+i,s="\\ufe0e\\ufe0f",o="["+t+"]",c="["+n+"]",u="\\ud83c[\\udffb-\\udfff]",h="(?:"+c+"|"+u+")",d="[^"+t+"]",p="(?:\\ud83c[\\udde6-\\uddff]){2}",m="[\\ud800-\\udbff][\\udc00-\\udfff]",g="\\u200d",x=h+"?",v="["+s+"]?",b="(?:"+g+"(?:"+[d,p,m].join("|")+")"+v+x+")*",w=v+x+b,T="(?:"+[d+c+"?",c,p,m,o].join("|")+")",k=RegExp(u+"(?="+u+")|"+T+w,"g");function E(L){for(var A=k.lastIndex=0;k.test(L);)++A;return A}return Fb=E,Fb}var Ib,U5;function UX(){if(U5)return Ib;U5=1;var t=$X(),e=PX(),r=HX();function i(n){return e(n)?r(n):t(n)}return Ib=i,Ib}var qb,G5;function GX(){if(G5)return qb;G5=1;var t=pw(),e=Jl(),r=ga(),i=jX(),n=UX(),s="[object Map]",o="[object Set]";function c(u){if(u==null)return 0;if(r(u))return i(u)?n(u):u.length;var h=e(u);return h==s||h==o?u.size:t(u).length}return qb=c,qb}var zb,Y5;function YX(){if(Y5)return zb;Y5=1;var t=hw(),e=pD(),r=vw(),i=ma(),n=Dp(),s=kr(),o=Kl(),c=uh(),u=Gi(),h=fh();function d(p,m,g){var x=s(p),v=x||o(p)||h(p);if(m=i(m,4),g==null){var b=p&&p.constructor;v?g=x?new b:[]:u(p)?g=c(b)?e(n(p)):{}:g={}}return(v?t:r)(p,function(w,T,k){return m(g,w,T,k)}),g}return zb=d,zb}var jb,V5;function VX(){if(V5)return jb;V5=1;var t=Zl(),e=dh(),r=kr(),i=t?t.isConcatSpreadable:void 0;function n(s){return r(s)||e(s)||!!(i&&s&&s[i])}return jb=n,jb}var $b,W5;function Sw(){if(W5)return $b;W5=1;var t=mw(),e=VX();function r(i,n,s,o,c){var u=-1,h=i.length;for(s||(s=e),c||(c=[]);++u<h;){var d=i[u];n>0&&s(d)?n>1?r(d,n-1,s,o,c):t(c,d):o||(c[c.length]=d)}return c}return $b=r,$b}var Pb,X5;function WX(){if(X5)return Pb;X5=1;function t(e,r,i){switch(i.length){case 0:return e.call(r);case 1:return e.call(r,i[0]);case 2:return e.call(r,i[0],i[1]);case 3:return e.call(r,i[0],i[1],i[2])}return e.apply(r,i)}return Pb=t,Pb}var Hb,Q5;function FD(){if(Q5)return Hb;Q5=1;var t=WX(),e=Math.max;function r(i,n,s){return n=e(n===void 0?i.length-1:n,0),function(){for(var o=arguments,c=-1,u=e(o.length-n,0),h=Array(u);++c<u;)h[c]=o[n+c];c=-1;for(var d=Array(n+1);++c<n;)d[c]=o[c];return d[n]=s(h),t(i,this,d)}}return Hb=r,Hb}var Ub,Z5;function XX(){if(Z5)return Ub;Z5=1;var t=xw(),e=eD(),r=uo(),i=e?function(n,s){return e(n,"toString",{configurable:!0,enumerable:!1,value:t(s),writable:!0})}:r;return Ub=i,Ub}var Gb,K5;function QX(){if(K5)return Gb;K5=1;var t=800,e=16,r=Date.now;function i(n){var s=0,o=0;return function(){var c=r(),u=e-(c-o);if(o=c,u>0){if(++s>=t)return arguments[0]}else s=0;return n.apply(void 0,arguments)}}return Gb=i,Gb}var Yb,J5;function ID(){if(J5)return Yb;J5=1;var t=XX(),e=QX(),r=e(t);return Yb=r,Yb}var Vb,tM;function jp(){if(tM)return Vb;tM=1;var t=uo(),e=FD(),r=ID();function i(n,s){return r(e(n,s,t),n+"")}return Vb=i,Vb}var Wb,eM;function qD(){if(eM)return Wb;eM=1;function t(e,r,i,n){for(var s=e.length,o=i+(n?1:-1);n?o--:++o<s;)if(r(e[o],o,e))return o;return-1}return Wb=t,Wb}var Xb,rM;function ZX(){if(rM)return Xb;rM=1;function t(e){return e!==e}return Xb=t,Xb}var Qb,iM;function KX(){if(iM)return Qb;iM=1;function t(e,r,i){for(var n=i-1,s=e.length;++n<s;)if(e[n]===r)return n;return-1}return Qb=t,Qb}var Zb,nM;function JX(){if(nM)return Zb;nM=1;var t=qD(),e=ZX(),r=KX();function i(n,s,o){return s===s?r(n,s,o):t(n,e,o)}return Zb=i,Zb}var Kb,aM;function tQ(){if(aM)return Kb;aM=1;var t=JX();function e(r,i){var n=r==null?0:r.length;return!!n&&t(r,i,0)>-1}return Kb=e,Kb}var Jb,sM;function eQ(){if(sM)return Jb;sM=1;function t(e,r,i){for(var n=-1,s=e==null?0:e.length;++n<s;)if(i(r,e[n]))return!0;return!1}return Jb=t,Jb}var t1,oM;function rQ(){if(oM)return t1;oM=1;function t(){}return t1=t,t1}var e1,lM;function iQ(){if(lM)return e1;lM=1;var t=hD(),e=rQ(),r=Cw(),i=1/0,n=t&&1/r(new t([,-0]))[1]==i?function(s){return new t(s)}:e;return e1=n,e1}var r1,cM;function nQ(){if(cM)return r1;cM=1;var t=vD(),e=tQ(),r=eQ(),i=CD(),n=iQ(),s=Cw(),o=200;function c(u,h,d){var p=-1,m=e,g=u.length,x=!0,v=[],b=v;if(d)x=!1,m=r;else if(g>=o){var w=h?null:n(u);if(w)return s(w);x=!1,m=i,b=new t}else b=h?[]:v;t:for(;++p<g;){var T=u[p],k=h?h(T):T;if(T=d||T!==0?T:0,x&&k===k){for(var E=b.length;E--;)if(b[E]===k)continue t;h&&b.push(k),v.push(T)}else m(b,k,d)||(b!==v&&b.push(k),v.push(T))}return v}return r1=c,r1}var i1,uM;function zD(){if(uM)return i1;uM=1;var t=ga(),e=Fn();function r(i){return e(i)&&t(i)}return i1=r,i1}var n1,hM;function aQ(){if(hM)return n1;hM=1;var t=Sw(),e=jp(),r=nQ(),i=zD(),n=e(function(s){return r(t(s,1,i,!0))});return n1=n,n1}var a1,dM;function sQ(){if(dM)return a1;dM=1;var t=Ip();function e(r,i){return t(i,function(n){return r[n]})}return a1=e,a1}var s1,fM;function jD(){if(fM)return s1;fM=1;var t=sQ(),e=cs();function r(i){return i==null?[]:t(i,e(i))}return s1=r,s1}var o1,pM;function Yi(){if(pM)return o1;pM=1;var t;if(typeof lw=="function")try{t={clone:fX(),constant:xw(),each:bD(),filter:LD(),has:MD(),isArray:kr(),isEmpty:IX(),isFunction:uh(),isUndefined:ND(),keys:cs(),map:RD(),reduce:DD(),size:GX(),transform:YX(),union:aQ(),values:jD()}}catch{}return t||(t=window._),o1=t,o1}var l1,gM;function kw(){if(gM)return l1;gM=1;var t=Yi();l1=n;var e="\0",r="\0",i="";function n(d){this._isDirected=t.has(d,"directed")?d.directed:!0,this._isMultigraph=t.has(d,"multigraph")?d.multigraph:!1,this._isCompound=t.has(d,"compound")?d.compound:!1,this._label=void 0,this._defaultNodeLabelFn=t.constant(void 0),this._defaultEdgeLabelFn=t.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[r]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}n.prototype._nodeCount=0,n.prototype._edgeCount=0,n.prototype.isDirected=function(){return this._isDirected},n.prototype.isMultigraph=function(){return this._isMultigraph},n.prototype.isCompound=function(){return this._isCompound},n.prototype.setGraph=function(d){return this._label=d,this},n.prototype.graph=function(){return this._label},n.prototype.setDefaultNodeLabel=function(d){return t.isFunction(d)||(d=t.constant(d)),this._defaultNodeLabelFn=d,this},n.prototype.nodeCount=function(){return this._nodeCount},n.prototype.nodes=function(){return t.keys(this._nodes)},n.prototype.sources=function(){var d=this;return t.filter(this.nodes(),function(p){return t.isEmpty(d._in[p])})},n.prototype.sinks=function(){var d=this;return t.filter(this.nodes(),function(p){return t.isEmpty(d._out[p])})},n.prototype.setNodes=function(d,p){var m=arguments,g=this;return t.each(d,function(x){m.length>1?g.setNode(x,p):g.setNode(x)}),this},n.prototype.setNode=function(d,p){return t.has(this._nodes,d)?(arguments.length>1&&(this._nodes[d]=p),this):(this._nodes[d]=arguments.length>1?p:this._defaultNodeLabelFn(d),this._isCompound&&(this._parent[d]=r,this._children[d]={},this._children[r][d]=!0),this._in[d]={},this._preds[d]={},this._out[d]={},this._sucs[d]={},++this._nodeCount,this)},n.prototype.node=function(d){return this._nodes[d]},n.prototype.hasNode=function(d){return t.has(this._nodes,d)},n.prototype.removeNode=function(d){var p=this;if(t.has(this._nodes,d)){var m=function(g){p.removeEdge(p._edgeObjs[g])};delete this._nodes[d],this._isCompound&&(this._removeFromParentsChildList(d),delete this._parent[d],t.each(this.children(d),function(g){p.setParent(g)}),delete this._children[d]),t.each(t.keys(this._in[d]),m),delete this._in[d],delete this._preds[d],t.each(t.keys(this._out[d]),m),delete this._out[d],delete this._sucs[d],--this._nodeCount}return this},n.prototype.setParent=function(d,p){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(t.isUndefined(p))p=r;else{p+="";for(var m=p;!t.isUndefined(m);m=this.parent(m))if(m===d)throw new Error("Setting "+p+" as parent of "+d+" would create a cycle");this.setNode(p)}return this.setNode(d),this._removeFromParentsChildList(d),this._parent[d]=p,this._children[p][d]=!0,this},n.prototype._removeFromParentsChildList=function(d){delete this._children[this._parent[d]][d]},n.prototype.parent=function(d){if(this._isCompound){var p=this._parent[d];if(p!==r)return p}},n.prototype.children=function(d){if(t.isUndefined(d)&&(d=r),this._isCompound){var p=this._children[d];if(p)return t.keys(p)}else{if(d===r)return this.nodes();if(this.hasNode(d))return[]}},n.prototype.predecessors=function(d){var p=this._preds[d];if(p)return t.keys(p)},n.prototype.successors=function(d){var p=this._sucs[d];if(p)return t.keys(p)},n.prototype.neighbors=function(d){var p=this.predecessors(d);if(p)return t.union(p,this.successors(d))},n.prototype.isLeaf=function(d){var p;return this.isDirected()?p=this.successors(d):p=this.neighbors(d),p.length===0},n.prototype.filterNodes=function(d){var p=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});p.setGraph(this.graph());var m=this;t.each(this._nodes,function(v,b){d(b)&&p.setNode(b,v)}),t.each(this._edgeObjs,function(v){p.hasNode(v.v)&&p.hasNode(v.w)&&p.setEdge(v,m.edge(v))});var g={};function x(v){var b=m.parent(v);return b===void 0||p.hasNode(b)?(g[v]=b,b):b in g?g[b]:x(b)}return this._isCompound&&t.each(p.nodes(),function(v){p.setParent(v,x(v))}),p},n.prototype.setDefaultEdgeLabel=function(d){return t.isFunction(d)||(d=t.constant(d)),this._defaultEdgeLabelFn=d,this},n.prototype.edgeCount=function(){return this._edgeCount},n.prototype.edges=function(){return t.values(this._edgeObjs)},n.prototype.setPath=function(d,p){var m=this,g=arguments;return t.reduce(d,function(x,v){return g.length>1?m.setEdge(x,v,p):m.setEdge(x,v),v}),this},n.prototype.setEdge=function(){var d,p,m,g,x=!1,v=arguments[0];typeof v=="object"&&v!==null&&"v"in v?(d=v.v,p=v.w,m=v.name,arguments.length===2&&(g=arguments[1],x=!0)):(d=v,p=arguments[1],m=arguments[3],arguments.length>2&&(g=arguments[2],x=!0)),d=""+d,p=""+p,t.isUndefined(m)||(m=""+m);var b=c(this._isDirected,d,p,m);if(t.has(this._edgeLabels,b))return x&&(this._edgeLabels[b]=g),this;if(!t.isUndefined(m)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(d),this.setNode(p),this._edgeLabels[b]=x?g:this._defaultEdgeLabelFn(d,p,m);var w=u(this._isDirected,d,p,m);return d=w.v,p=w.w,Object.freeze(w),this._edgeObjs[b]=w,s(this._preds[p],d),s(this._sucs[d],p),this._in[p][b]=w,this._out[d][b]=w,this._edgeCount++,this},n.prototype.edge=function(d,p,m){var g=arguments.length===1?h(this._isDirected,arguments[0]):c(this._isDirected,d,p,m);return this._edgeLabels[g]},n.prototype.hasEdge=function(d,p,m){var g=arguments.length===1?h(this._isDirected,arguments[0]):c(this._isDirected,d,p,m);return t.has(this._edgeLabels,g)},n.prototype.removeEdge=function(d,p,m){var g=arguments.length===1?h(this._isDirected,arguments[0]):c(this._isDirected,d,p,m),x=this._edgeObjs[g];return x&&(d=x.v,p=x.w,delete this._edgeLabels[g],delete this._edgeObjs[g],o(this._preds[p],d),o(this._sucs[d],p),delete this._in[p][g],delete this._out[d][g],this._edgeCount--),this},n.prototype.inEdges=function(d,p){var m=this._in[d];if(m){var g=t.values(m);return p?t.filter(g,function(x){return x.v===p}):g}},n.prototype.outEdges=function(d,p){var m=this._out[d];if(m){var g=t.values(m);return p?t.filter(g,function(x){return x.w===p}):g}},n.prototype.nodeEdges=function(d,p){var m=this.inEdges(d,p);if(m)return m.concat(this.outEdges(d,p))};function s(d,p){d[p]?d[p]++:d[p]=1}function o(d,p){--d[p]||delete d[p]}function c(d,p,m,g){var x=""+p,v=""+m;if(!d&&x>v){var b=x;x=v,v=b}return x+i+v+i+(t.isUndefined(g)?e:g)}function u(d,p,m,g){var x=""+p,v=""+m;if(!d&&x>v){var b=x;x=v,v=b}var w={v:x,w:v};return g&&(w.name=g),w}function h(d,p){return c(d,p.v,p.w,p.name)}return l1}var c1,mM;function oQ(){return mM||(mM=1,c1="2.1.8"),c1}var u1,yM;function lQ(){return yM||(yM=1,u1={Graph:kw(),version:oQ()}),u1}var h1,xM;function cQ(){if(xM)return h1;xM=1;var t=Yi(),e=kw();h1={write:r,read:s};function r(o){var c={options:{directed:o.isDirected(),multigraph:o.isMultigraph(),compound:o.isCompound()},nodes:i(o),edges:n(o)};return t.isUndefined(o.graph())||(c.value=t.clone(o.graph())),c}function i(o){return t.map(o.nodes(),function(c){var u=o.node(c),h=o.parent(c),d={v:c};return t.isUndefined(u)||(d.value=u),t.isUndefined(h)||(d.parent=h),d})}function n(o){return t.map(o.edges(),function(c){var u=o.edge(c),h={v:c.v,w:c.w};return t.isUndefined(c.name)||(h.name=c.name),t.isUndefined(u)||(h.value=u),h})}function s(o){var c=new e(o.options).setGraph(o.value);return t.each(o.nodes,function(u){c.setNode(u.v,u.value),u.parent&&c.setParent(u.v,u.parent)}),t.each(o.edges,function(u){c.setEdge({v:u.v,w:u.w,name:u.name},u.value)}),c}return h1}var d1,bM;function uQ(){if(bM)return d1;bM=1;var t=Yi();d1=e;function e(r){var i={},n=[],s;function o(c){t.has(i,c)||(i[c]=!0,s.push(c),t.each(r.successors(c),o),t.each(r.predecessors(c),o))}return t.each(r.nodes(),function(c){s=[],o(c),s.length&&n.push(s)}),n}return d1}var f1,vM;function $D(){if(vM)return f1;vM=1;var t=Yi();f1=e;function e(){this._arr=[],this._keyIndices={}}return e.prototype.size=function(){return this._arr.length},e.prototype.keys=function(){return this._arr.map(function(r){return r.key})},e.prototype.has=function(r){return t.has(this._keyIndices,r)},e.prototype.priority=function(r){var i=this._keyIndices[r];if(i!==void 0)return this._arr[i].priority},e.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},e.prototype.add=function(r,i){var n=this._keyIndices;if(r=String(r),!t.has(n,r)){var s=this._arr,o=s.length;return n[r]=o,s.push({key:r,priority:i}),this._decrease(o),!0}return!1},e.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var r=this._arr.pop();return delete this._keyIndices[r.key],this._heapify(0),r.key},e.prototype.decrease=function(r,i){var n=this._keyIndices[r];if(i>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+r+" Old: "+this._arr[n].priority+" New: "+i);this._arr[n].priority=i,this._decrease(n)},e.prototype._heapify=function(r){var i=this._arr,n=2*r,s=n+1,o=r;n<i.length&&(o=i[n].priority<i[o].priority?n:o,s<i.length&&(o=i[s].priority<i[o].priority?s:o),o!==r&&(this._swap(r,o),this._heapify(o)))},e.prototype._decrease=function(r){for(var i=this._arr,n=i[r].priority,s;r!==0&&(s=r>>1,!(i[s].priority<n));)this._swap(r,s),r=s},e.prototype._swap=function(r,i){var n=this._arr,s=this._keyIndices,o=n[r],c=n[i];n[r]=c,n[i]=o,s[c.key]=r,s[o.key]=i},f1}var p1,CM;function PD(){if(CM)return p1;CM=1;var t=Yi(),e=$D();p1=i;var r=t.constant(1);function i(s,o,c,u){return n(s,String(o),c||r,u||function(h){return s.outEdges(h)})}function n(s,o,c,u){var h={},d=new e,p,m,g=function(x){var v=x.v!==p?x.v:x.w,b=h[v],w=c(x),T=m.distance+w;if(w<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+x+" Weight: "+w);T<b.distance&&(b.distance=T,b.predecessor=p,d.decrease(v,T))};for(s.nodes().forEach(function(x){var v=x===o?0:Number.POSITIVE_INFINITY;h[x]={distance:v},d.add(x,v)});d.size()>0&&(p=d.removeMin(),m=h[p],m.distance!==Number.POSITIVE_INFINITY);)u(p).forEach(g);return h}return p1}var g1,wM;function hQ(){if(wM)return g1;wM=1;var t=PD(),e=Yi();g1=r;function r(i,n,s){return e.transform(i.nodes(),function(o,c){o[c]=t(i,c,n,s)},{})}return g1}var m1,SM;function HD(){if(SM)return m1;SM=1;var t=Yi();m1=e;function e(r){var i=0,n=[],s={},o=[];function c(u){var h=s[u]={onStack:!0,lowlink:i,index:i++};if(n.push(u),r.successors(u).forEach(function(m){t.has(s,m)?s[m].onStack&&(h.lowlink=Math.min(h.lowlink,s[m].index)):(c(m),h.lowlink=Math.min(h.lowlink,s[m].lowlink))}),h.lowlink===h.index){var d=[],p;do p=n.pop(),s[p].onStack=!1,d.push(p);while(u!==p);o.push(d)}}return r.nodes().forEach(function(u){t.has(s,u)||c(u)}),o}return m1}var y1,kM;function dQ(){if(kM)return y1;kM=1;var t=Yi(),e=HD();y1=r;function r(i){return t.filter(e(i),function(n){return n.length>1||n.length===1&&i.hasEdge(n[0],n[0])})}return y1}var x1,_M;function fQ(){if(_M)return x1;_M=1;var t=Yi();x1=r;var e=t.constant(1);function r(n,s,o){return i(n,s||e,o||function(c){return n.outEdges(c)})}function i(n,s,o){var c={},u=n.nodes();return u.forEach(function(h){c[h]={},c[h][h]={distance:0},u.forEach(function(d){h!==d&&(c[h][d]={distance:Number.POSITIVE_INFINITY})}),o(h).forEach(function(d){var p=d.v===h?d.w:d.v,m=s(d);c[h][p]={distance:m,predecessor:h}})}),u.forEach(function(h){var d=c[h];u.forEach(function(p){var m=c[p];u.forEach(function(g){var x=m[h],v=d[g],b=m[g],w=x.distance+v.distance;w<b.distance&&(b.distance=w,b.predecessor=v.predecessor)})})}),c}return x1}var b1,TM;function UD(){if(TM)return b1;TM=1;var t=Yi();b1=e,e.CycleException=r;function e(i){var n={},s={},o=[];function c(u){if(t.has(s,u))throw new r;t.has(n,u)||(s[u]=!0,n[u]=!0,t.each(i.predecessors(u),c),delete s[u],o.push(u))}if(t.each(i.sinks(),c),t.size(n)!==i.nodeCount())throw new r;return o}function r(){}return r.prototype=new Error,b1}var v1,EM;function pQ(){if(EM)return v1;EM=1;var t=UD();v1=e;function e(r){try{t(r)}catch(i){if(i instanceof t.CycleException)return!1;throw i}return!0}return v1}var C1,AM;function GD(){if(AM)return C1;AM=1;var t=Yi();C1=e;function e(i,n,s){t.isArray(n)||(n=[n]);var o=(i.isDirected()?i.successors:i.neighbors).bind(i),c=[],u={};return t.each(n,function(h){if(!i.hasNode(h))throw new Error("Graph does not have node: "+h);r(i,h,s==="post",u,o,c)}),c}function r(i,n,s,o,c,u){t.has(o,n)||(o[n]=!0,s||u.push(n),t.each(c(n),function(h){r(i,h,s,o,c,u)}),s&&u.push(n))}return C1}var w1,BM;function gQ(){if(BM)return w1;BM=1;var t=GD();w1=e;function e(r,i){return t(r,i,"post")}return w1}var S1,LM;function mQ(){if(LM)return S1;LM=1;var t=GD();S1=e;function e(r,i){return t(r,i,"pre")}return S1}var k1,MM;function yQ(){if(MM)return k1;MM=1;var t=Yi(),e=kw(),r=$D();k1=i;function i(n,s){var o=new e,c={},u=new r,h;function d(m){var g=m.v===h?m.w:m.v,x=u.priority(g);if(x!==void 0){var v=s(m);v<x&&(c[g]=h,u.decrease(g,v))}}if(n.nodeCount()===0)return o;t.each(n.nodes(),function(m){u.add(m,Number.POSITIVE_INFINITY),o.setNode(m)}),u.decrease(n.nodes()[0],0);for(var p=!1;u.size()>0;){if(h=u.removeMin(),t.has(c,h))o.setEdge(h,c[h]);else{if(p)throw new Error("Input graph is not connected: "+n);p=!0}n.nodeEdges(h).forEach(d)}return o}return k1}var _1,NM;function xQ(){return NM||(NM=1,_1={components:uQ(),dijkstra:PD(),dijkstraAll:hQ(),findCycles:dQ(),floydWarshall:fQ(),isAcyclic:pQ(),postorder:gQ(),preorder:mQ(),prim:yQ(),tarjan:HD(),topsort:UD()}),_1}var T1,OM;function bQ(){if(OM)return T1;OM=1;var t=lQ();return T1={Graph:t.Graph,json:cQ(),alg:xQ(),version:t.version},T1}var E1,RM;function un(){if(RM)return E1;RM=1;var t;if(typeof lw=="function")try{t=bQ()}catch{}return t||(t=window.graphlib),E1=t,E1}var A1,DM;function vQ(){if(DM)return A1;DM=1;var t=mD(),e=1,r=4;function i(n){return t(n,e|r)}return A1=i,A1}var B1,FM;function $p(){if(FM)return B1;FM=1;var t=Ql(),e=ga(),r=Np(),i=Gi();function n(s,o,c){if(!i(c))return!1;var u=typeof o;return(u=="number"?e(c)&&r(o,c.length):u=="string"&&o in c)?t(c[o],s):!1}return B1=n,B1}var L1,IM;function CQ(){if(IM)return L1;IM=1;var t=jp(),e=Ql(),r=$p(),i=co(),n=Object.prototype,s=n.hasOwnProperty,o=t(function(c,u){c=Object(c);var h=-1,d=u.length,p=d>2?u[2]:void 0;for(p&&r(u[0],u[1],p)&&(d=1);++h<d;)for(var m=u[h],g=i(m),x=-1,v=g.length;++x<v;){var b=g[x],w=c[b];(w===void 0||e(w,n[b])&&!s.call(c,b))&&(c[b]=m[b])}return c});return L1=o,L1}var M1,qM;function wQ(){if(qM)return M1;qM=1;var t=ma(),e=ga(),r=cs();function i(n){return function(s,o,c){var u=Object(s);if(!e(s)){var h=t(o,3);s=r(s),o=function(p){return h(u[p],p,u)}}var d=n(s,o,c);return d>-1?u[h?s[d]:d]:void 0}}return M1=i,M1}var N1,zM;function SQ(){if(zM)return N1;zM=1;var t=/\s/;function e(r){for(var i=r.length;i--&&t.test(r.charAt(i)););return i}return N1=e,N1}var O1,jM;function kQ(){if(jM)return O1;jM=1;var t=SQ(),e=/^\s+/;function r(i){return i&&i.slice(0,t(i)+1).replace(e,"")}return O1=r,O1}var R1,$M;function _Q(){if($M)return R1;$M=1;var t=kQ(),e=Gi(),r=tc(),i=NaN,n=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,o=/^0o[0-7]+$/i,c=parseInt;function u(h){if(typeof h=="number")return h;if(r(h))return i;if(e(h)){var d=typeof h.valueOf=="function"?h.valueOf():h;h=e(d)?d+"":d}if(typeof h!="string")return h===0?h:+h;h=t(h);var p=s.test(h);return p||o.test(h)?c(h.slice(2),p?2:8):n.test(h)?i:+h}return R1=u,R1}var D1,PM;function YD(){if(PM)return D1;PM=1;var t=_Q(),e=1/0,r=17976931348623157e292;function i(n){if(!n)return n===0?n:0;if(n=t(n),n===e||n===-e){var s=n<0?-1:1;return s*r}return n===n?n:0}return D1=i,D1}var F1,HM;function TQ(){if(HM)return F1;HM=1;var t=YD();function e(r){var i=t(r),n=i%1;return i===i?n?i-n:i:0}return F1=e,F1}var I1,UM;function EQ(){if(UM)return I1;UM=1;var t=qD(),e=ma(),r=TQ(),i=Math.max;function n(s,o,c){var u=s==null?0:s.length;if(!u)return-1;var h=c==null?0:r(c);return h<0&&(h=i(u+h,0)),t(s,e(o,3),h)}return I1=n,I1}var q1,GM;function AQ(){if(GM)return q1;GM=1;var t=wQ(),e=EQ(),r=t(e);return q1=r,q1}var z1,YM;function VD(){if(YM)return z1;YM=1;var t=Sw();function e(r){var i=r==null?0:r.length;return i?t(r,1):[]}return z1=e,z1}var j1,VM;function BQ(){if(VM)return j1;VM=1;var t=bw(),e=yD(),r=co();function i(n,s){return n==null?n:t(n,e(s),r)}return j1=i,j1}var $1,WM;function LQ(){if(WM)return $1;WM=1;function t(e){var r=e==null?0:e.length;return r?e[r-1]:void 0}return $1=t,$1}var P1,XM;function MQ(){if(XM)return P1;XM=1;var t=Lp(),e=vw(),r=ma();function i(n,s){var o={};return s=r(s,3),e(n,function(c,u,h){t(o,u,s(c,u,h))}),o}return P1=i,P1}var H1,QM;function _w(){if(QM)return H1;QM=1;var t=tc();function e(r,i,n){for(var s=-1,o=r.length;++s<o;){var c=r[s],u=i(c);if(u!=null&&(h===void 0?u===u&&!t(u):n(u,h)))var h=u,d=c}return d}return H1=e,H1}var U1,ZM;function NQ(){if(ZM)return U1;ZM=1;function t(e,r){return e>r}return U1=t,U1}var G1,KM;function OQ(){if(KM)return G1;KM=1;var t=_w(),e=NQ(),r=uo();function i(n){return n&&n.length?t(n,r,e):void 0}return G1=i,G1}var Y1,JM;function WD(){if(JM)return Y1;JM=1;var t=Lp(),e=Ql();function r(i,n,s){(s!==void 0&&!e(i[n],s)||s===void 0&&!(n in i))&&t(i,n,s)}return Y1=r,Y1}var V1,tN;function RQ(){if(tN)return V1;tN=1;var t=oo(),e=Dp(),r=Fn(),i="[object Object]",n=Function.prototype,s=Object.prototype,o=n.toString,c=s.hasOwnProperty,u=o.call(Object);function h(d){if(!r(d)||t(d)!=i)return!1;var p=e(d);if(p===null)return!0;var m=c.call(p,"constructor")&&p.constructor;return typeof m=="function"&&m instanceof m&&o.call(m)==u}return V1=h,V1}var W1,eN;function XD(){if(eN)return W1;eN=1;function t(e,r){if(!(r==="constructor"&&typeof e[r]=="function")&&r!="__proto__")return e[r]}return W1=t,W1}var X1,rN;function DQ(){if(rN)return X1;rN=1;var t=hh(),e=co();function r(i){return t(i,e(i))}return X1=r,X1}var Q1,iN;function FQ(){if(iN)return Q1;iN=1;var t=WD(),e=nD(),r=fD(),i=aD(),n=gD(),s=dh(),o=kr(),c=zD(),u=Kl(),h=uh(),d=Gi(),p=RQ(),m=fh(),g=XD(),x=DQ();function v(b,w,T,k,E,L,A){var R=g(b,T),j=g(w,T),Y=A.get(j);if(Y){t(b,T,Y);return}var V=L?L(R,j,T+"",b,w,A):void 0,O=V===void 0;if(O){var z=o(j),X=!z&&u(j),M=!z&&!X&&m(j);V=j,z||X||M?o(R)?V=R:c(R)?V=i(R):X?(O=!1,V=e(j,!0)):M?(O=!1,V=r(j,!0)):V=[]:p(j)||s(j)?(V=R,s(R)?V=x(R):(!d(R)||h(R))&&(V=n(j))):O=!1}O&&(A.set(j,V),E(V,j,k,L,A),A.delete(j)),t(b,T,V)}return Q1=v,Q1}var Z1,nN;function IQ(){if(nN)return Z1;nN=1;var t=Bp(),e=WD(),r=bw(),i=FQ(),n=Gi(),s=co(),o=XD();function c(u,h,d,p,m){u!==h&&r(h,function(g,x){if(m||(m=new t),n(g))i(u,h,x,d,c,p,m);else{var v=p?p(o(u,x),g,x+"",u,h,m):void 0;v===void 0&&(v=g),e(u,x,v)}},s)}return Z1=c,Z1}var K1,aN;function qQ(){if(aN)return K1;aN=1;var t=jp(),e=$p();function r(i){return t(function(n,s){var o=-1,c=s.length,u=c>1?s[c-1]:void 0,h=c>2?s[2]:void 0;for(u=i.length>3&&typeof u=="function"?(c--,u):void 0,h&&e(s[0],s[1],h)&&(u=c<3?void 0:u,c=1),n=Object(n);++o<c;){var d=s[o];d&&i(n,d,o,u)}return n})}return K1=r,K1}var J1,sN;function zQ(){if(sN)return J1;sN=1;var t=IQ(),e=qQ(),r=e(function(i,n,s){t(i,n,s)});return J1=r,J1}var tv,oN;function QD(){if(oN)return tv;oN=1;function t(e,r){return e<r}return tv=t,tv}var ev,lN;function jQ(){if(lN)return ev;lN=1;var t=_w(),e=QD(),r=uo();function i(n){return n&&n.length?t(n,r,e):void 0}return ev=i,ev}var rv,cN;function $Q(){if(cN)return rv;cN=1;var t=_w(),e=ma(),r=QD();function i(n,s){return n&&n.length?t(n,e(s,2),r):void 0}return rv=i,rv}var iv,uN;function PQ(){if(uN)return iv;uN=1;var t=fn(),e=function(){return t.Date.now()};return iv=e,iv}var nv,hN;function HQ(){if(hN)return nv;hN=1;var t=Mp(),e=qp(),r=Np(),i=Gi(),n=ph();function s(o,c,u,h){if(!i(o))return o;c=e(c,o);for(var d=-1,p=c.length,m=p-1,g=o;g!=null&&++d<p;){var x=n(c[d]),v=u;if(x==="__proto__"||x==="constructor"||x==="prototype")return o;if(d!=m){var b=g[x];v=h?h(b,x,g):void 0,v===void 0&&(v=i(b)?b:r(c[d+1])?[]:{})}t(g,x,v),g=g[x]}return o}return nv=s,nv}var av,dN;function UQ(){if(dN)return av;dN=1;var t=zp(),e=HQ(),r=qp();function i(n,s,o){for(var c=-1,u=s.length,h={};++c<u;){var d=s[c],p=t(n,d);o(p,d)&&e(h,r(d,n),p)}return h}return av=i,av}var sv,fN;function GQ(){if(fN)return sv;fN=1;var t=UQ(),e=AD();function r(i,n){return t(i,n,function(s,o){return e(i,o)})}return sv=r,sv}var ov,pN;function YQ(){if(pN)return ov;pN=1;var t=VD(),e=FD(),r=ID();function i(n){return r(e(n,void 0,t),n+"")}return ov=i,ov}var lv,gN;function VQ(){if(gN)return lv;gN=1;var t=GQ(),e=YQ(),r=e(function(i,n){return i==null?{}:t(i,n)});return lv=r,lv}var cv,mN;function WQ(){if(mN)return cv;mN=1;var t=Math.ceil,e=Math.max;function r(i,n,s,o){for(var c=-1,u=e(t((n-i)/(s||1)),0),h=Array(u);u--;)h[o?u:++c]=i,i+=s;return h}return cv=r,cv}var uv,yN;function XQ(){if(yN)return uv;yN=1;var t=WQ(),e=$p(),r=YD();function i(n){return function(s,o,c){return c&&typeof c!="number"&&e(s,o,c)&&(o=c=void 0),s=r(s),o===void 0?(o=s,s=0):o=r(o),c=c===void 0?s<o?1:-1:r(c),t(s,o,c,n)}}return uv=i,uv}var hv,xN;function QQ(){if(xN)return hv;xN=1;var t=XQ(),e=t();return hv=e,hv}var dv,bN;function ZQ(){if(bN)return dv;bN=1;function t(e,r){var i=e.length;for(e.sort(r);i--;)e[i]=e[i].value;return e}return dv=t,dv}var fv,vN;function KQ(){if(vN)return fv;vN=1;var t=tc();function e(r,i){if(r!==i){var n=r!==void 0,s=r===null,o=r===r,c=t(r),u=i!==void 0,h=i===null,d=i===i,p=t(i);if(!h&&!p&&!c&&r>i||c&&u&&d&&!h&&!p||s&&u&&d||!n&&d||!o)return 1;if(!s&&!c&&!p&&r<i||p&&n&&o&&!s&&!c||h&&n&&o||!u&&o||!d)return-1}return 0}return fv=e,fv}var pv,CN;function JQ(){if(CN)return pv;CN=1;var t=KQ();function e(r,i,n){for(var s=-1,o=r.criteria,c=i.criteria,u=o.length,h=n.length;++s<u;){var d=t(o[s],c[s]);if(d){if(s>=h)return d;var p=n[s];return d*(p=="desc"?-1:1)}}return r.index-i.index}return pv=e,pv}var gv,wN;function tZ(){if(wN)return gv;wN=1;var t=Ip(),e=zp(),r=ma(),i=OD(),n=ZQ(),s=Op(),o=JQ(),c=uo(),u=kr();function h(d,p,m){p.length?p=t(p,function(v){return u(v)?function(b){return e(b,v.length===1?v[0]:v)}:v}):p=[c];var g=-1;p=t(p,s(r));var x=i(d,function(v,b,w){var T=t(p,function(k){return k(v)});return{criteria:T,index:++g,value:v}});return n(x,function(v,b){return o(v,b,m)})}return gv=h,gv}var mv,SN;function eZ(){if(SN)return mv;SN=1;var t=Sw(),e=tZ(),r=jp(),i=$p(),n=r(function(s,o){if(s==null)return[];var c=o.length;return c>1&&i(s,o[0],o[1])?o=[]:c>2&&i(o[0],o[1],o[2])&&(o=[o[0]]),e(s,t(o,1),[])});return mv=n,mv}var yv,kN;function rZ(){if(kN)return yv;kN=1;var t=TD(),e=0;function r(i){var n=++e;return t(i)+n}return yv=r,yv}var xv,_N;function iZ(){if(_N)return xv;_N=1;function t(e,r,i){for(var n=-1,s=e.length,o=r.length,c={};++n<s;){var u=n<o?r[n]:void 0;i(c,e[n],u)}return c}return xv=t,xv}var bv,TN;function nZ(){if(TN)return bv;TN=1;var t=Mp(),e=iZ();function r(i,n){return e(i||[],n||[],t)}return bv=r,bv}var vv,EN;function er(){if(EN)return vv;EN=1;var t;if(typeof lw=="function")try{t={cloneDeep:vQ(),constant:xw(),defaults:CQ(),each:bD(),filter:LD(),find:AQ(),flatten:VD(),forEach:xD(),forIn:BQ(),has:MD(),isUndefined:ND(),last:LQ(),map:RD(),mapValues:MQ(),max:OQ(),merge:zQ(),min:jQ(),minBy:$Q(),now:PQ(),pick:VQ(),range:QQ(),reduce:DD(),sortBy:eZ(),uniqueId:rZ(),values:jD(),zipObject:nZ()}}catch{}return t||(t=window._),vv=t,vv}var Cv,AN;function aZ(){if(AN)return Cv;AN=1,Cv=t;function t(){var i={};i._next=i._prev=i,this._sentinel=i}t.prototype.dequeue=function(){var i=this._sentinel,n=i._prev;if(n!==i)return e(n),n},t.prototype.enqueue=function(i){var n=this._sentinel;i._prev&&i._next&&e(i),i._next=n._next,n._next._prev=i,n._next=i,i._prev=n},t.prototype.toString=function(){for(var i=[],n=this._sentinel,s=n._prev;s!==n;)i.push(JSON.stringify(s,r)),s=s._prev;return"["+i.join(", ")+"]"};function e(i){i._prev._next=i._next,i._next._prev=i._prev,delete i._next,delete i._prev}function r(i,n){if(i!=="_next"&&i!=="_prev")return n}return Cv}var wv,BN;function sZ(){if(BN)return wv;BN=1;var t=er(),e=un().Graph,r=aZ();wv=n;var i=t.constant(1);function n(h,d){if(h.nodeCount()<=1)return[];var p=c(h,d||i),m=s(p.graph,p.buckets,p.zeroIdx);return t.flatten(t.map(m,function(g){return h.outEdges(g.v,g.w)}),!0)}function s(h,d,p){for(var m=[],g=d[d.length-1],x=d[0],v;h.nodeCount();){for(;v=x.dequeue();)o(h,d,p,v);for(;v=g.dequeue();)o(h,d,p,v);if(h.nodeCount()){for(var b=d.length-2;b>0;--b)if(v=d[b].dequeue(),v){m=m.concat(o(h,d,p,v,!0));break}}}return m}function o(h,d,p,m,g){var x=g?[]:void 0;return t.forEach(h.inEdges(m.v),function(v){var b=h.edge(v),w=h.node(v.v);g&&x.push({v:v.v,w:v.w}),w.out-=b,u(d,p,w)}),t.forEach(h.outEdges(m.v),function(v){var b=h.edge(v),w=v.w,T=h.node(w);T.in-=b,u(d,p,T)}),h.removeNode(m.v),x}function c(h,d){var p=new e,m=0,g=0;t.forEach(h.nodes(),function(b){p.setNode(b,{v:b,in:0,out:0})}),t.forEach(h.edges(),function(b){var w=p.edge(b.v,b.w)||0,T=d(b),k=w+T;p.setEdge(b.v,b.w,k),g=Math.max(g,p.node(b.v).out+=T),m=Math.max(m,p.node(b.w).in+=T)});var x=t.range(g+m+3).map(function(){return new r}),v=m+1;return t.forEach(p.nodes(),function(b){u(x,v,p.node(b))}),{graph:p,buckets:x,zeroIdx:v}}function u(h,d,p){p.out?p.in?h[p.out-p.in+d].enqueue(p):h[h.length-1].enqueue(p):h[0].enqueue(p)}return wv}var Sv,LN;function oZ(){if(LN)return Sv;LN=1;var t=er(),e=sZ();Sv={run:r,undo:n};function r(s){var o=s.graph().acyclicer==="greedy"?e(s,c(s)):i(s);t.forEach(o,function(u){var h=s.edge(u);s.removeEdge(u),h.forwardName=u.name,h.reversed=!0,s.setEdge(u.w,u.v,h,t.uniqueId("rev"))});function c(u){return function(h){return u.edge(h).weight}}}function i(s){var o=[],c={},u={};function h(d){t.has(u,d)||(u[d]=!0,c[d]=!0,t.forEach(s.outEdges(d),function(p){t.has(c,p.w)?o.push(p):h(p.w)}),delete c[d])}return t.forEach(s.nodes(),h),o}function n(s){t.forEach(s.edges(),function(o){var c=s.edge(o);if(c.reversed){s.removeEdge(o);var u=c.forwardName;delete c.reversed,delete c.forwardName,s.setEdge(o.w,o.v,c,u)}})}return Sv}var kv,MN;function gi(){if(MN)return kv;MN=1;var t=er(),e=un().Graph;kv={addDummyNode:r,simplify:i,asNonCompoundGraph:n,successorWeights:s,predecessorWeights:o,intersectRect:c,buildLayerMatrix:u,normalizeRanks:h,removeEmptyRanks:d,addBorderNode:p,maxRank:m,partition:g,time:x,notime:v};function r(b,w,T,k){var E;do E=t.uniqueId(k);while(b.hasNode(E));return T.dummy=w,b.setNode(E,T),E}function i(b){var w=new e().setGraph(b.graph());return t.forEach(b.nodes(),function(T){w.setNode(T,b.node(T))}),t.forEach(b.edges(),function(T){var k=w.edge(T.v,T.w)||{weight:0,minlen:1},E=b.edge(T);w.setEdge(T.v,T.w,{weight:k.weight+E.weight,minlen:Math.max(k.minlen,E.minlen)})}),w}function n(b){var w=new e({multigraph:b.isMultigraph()}).setGraph(b.graph());return t.forEach(b.nodes(),function(T){b.children(T).length||w.setNode(T,b.node(T))}),t.forEach(b.edges(),function(T){w.setEdge(T,b.edge(T))}),w}function s(b){var w=t.map(b.nodes(),function(T){var k={};return t.forEach(b.outEdges(T),function(E){k[E.w]=(k[E.w]||0)+b.edge(E).weight}),k});return t.zipObject(b.nodes(),w)}function o(b){var w=t.map(b.nodes(),function(T){var k={};return t.forEach(b.inEdges(T),function(E){k[E.v]=(k[E.v]||0)+b.edge(E).weight}),k});return t.zipObject(b.nodes(),w)}function c(b,w){var T=b.x,k=b.y,E=w.x-T,L=w.y-k,A=b.width/2,R=b.height/2;if(!E&&!L)throw new Error("Not possible to find intersection inside of the rectangle");var j,Y;return Math.abs(L)*A>Math.abs(E)*R?(L<0&&(R=-R),j=R*E/L,Y=R):(E<0&&(A=-A),j=A,Y=A*L/E),{x:T+j,y:k+Y}}function u(b){var w=t.map(t.range(m(b)+1),function(){return[]});return t.forEach(b.nodes(),function(T){var k=b.node(T),E=k.rank;t.isUndefined(E)||(w[E][k.order]=T)}),w}function h(b){var w=t.min(t.map(b.nodes(),function(T){return b.node(T).rank}));t.forEach(b.nodes(),function(T){var k=b.node(T);t.has(k,"rank")&&(k.rank-=w)})}function d(b){var w=t.min(t.map(b.nodes(),function(L){return b.node(L).rank})),T=[];t.forEach(b.nodes(),function(L){var A=b.node(L).rank-w;T[A]||(T[A]=[]),T[A].push(L)});var k=0,E=b.graph().nodeRankFactor;t.forEach(T,function(L,A){t.isUndefined(L)&&A%E!==0?--k:k&&t.forEach(L,function(R){b.node(R).rank+=k})})}function p(b,w,T,k){var E={width:0,height:0};return arguments.length>=4&&(E.rank=T,E.order=k),r(b,"border",E,w)}function m(b){return t.max(t.map(b.nodes(),function(w){var T=b.node(w).rank;if(!t.isUndefined(T))return T}))}function g(b,w){var T={lhs:[],rhs:[]};return t.forEach(b,function(k){w(k)?T.lhs.push(k):T.rhs.push(k)}),T}function x(b,w){var T=t.now();try{return w()}finally{console.log(b+" time: "+(t.now()-T)+"ms")}}function v(b,w){return w()}return kv}var _v,NN;function lZ(){if(NN)return _v;NN=1;var t=er(),e=gi();_v={run:r,undo:n};function r(s){s.graph().dummyChains=[],t.forEach(s.edges(),function(o){i(s,o)})}function i(s,o){var c=o.v,u=s.node(c).rank,h=o.w,d=s.node(h).rank,p=o.name,m=s.edge(o),g=m.labelRank;if(d!==u+1){s.removeEdge(o);var x,v,b;for(b=0,++u;u<d;++b,++u)m.points=[],v={width:0,height:0,edgeLabel:m,edgeObj:o,rank:u},x=e.addDummyNode(s,"edge",v,"_d"),u===g&&(v.width=m.width,v.height=m.height,v.dummy="edge-label",v.labelpos=m.labelpos),s.setEdge(c,x,{weight:m.weight},p),b===0&&s.graph().dummyChains.push(x),c=x;s.setEdge(c,h,{weight:m.weight},p)}}function n(s){t.forEach(s.graph().dummyChains,function(o){var c=s.node(o),u=c.edgeLabel,h;for(s.setEdge(c.edgeObj,u);c.dummy;)h=s.successors(o)[0],s.removeNode(o),u.points.push({x:c.x,y:c.y}),c.dummy==="edge-label"&&(u.x=c.x,u.y=c.y,u.width=c.width,u.height=c.height),o=h,c=s.node(o)})}return _v}var Tv,ON;function Ff(){if(ON)return Tv;ON=1;var t=er();Tv={longestPath:e,slack:r};function e(i){var n={};function s(o){var c=i.node(o);if(t.has(n,o))return c.rank;n[o]=!0;var u=t.min(t.map(i.outEdges(o),function(h){return s(h.w)-i.edge(h).minlen}));return(u===Number.POSITIVE_INFINITY||u===void 0||u===null)&&(u=0),c.rank=u}t.forEach(i.sources(),s)}function r(i,n){return i.node(n.w).rank-i.node(n.v).rank-i.edge(n).minlen}return Tv}var Ev,RN;function ZD(){if(RN)return Ev;RN=1;var t=er(),e=un().Graph,r=Ff().slack;Ev=i;function i(c){var u=new e({directed:!1}),h=c.nodes()[0],d=c.nodeCount();u.setNode(h,{});for(var p,m;n(u,c)<d;)p=s(u,c),m=u.hasNode(p.v)?r(c,p):-r(c,p),o(u,c,m);return u}function n(c,u){function h(d){t.forEach(u.nodeEdges(d),function(p){var m=p.v,g=d===m?p.w:m;!c.hasNode(g)&&!r(u,p)&&(c.setNode(g,{}),c.setEdge(d,g,{}),h(g))})}return t.forEach(c.nodes(),h),c.nodeCount()}function s(c,u){return t.minBy(u.edges(),function(h){if(c.hasNode(h.v)!==c.hasNode(h.w))return r(u,h)})}function o(c,u,h){t.forEach(c.nodes(),function(d){u.node(d).rank+=h})}return Ev}var Av,DN;function cZ(){if(DN)return Av;DN=1;var t=er(),e=ZD(),r=Ff().slack,i=Ff().longestPath,n=un().alg.preorder,s=un().alg.postorder,o=gi().simplify;Av=c,c.initLowLimValues=p,c.initCutValues=u,c.calcCutValue=d,c.leaveEdge=g,c.enterEdge=x,c.exchangeEdges=v;function c(k){k=o(k),i(k);var E=e(k);p(E),u(E,k);for(var L,A;L=g(E);)A=x(E,k,L),v(E,k,L,A)}function u(k,E){var L=s(k,k.nodes());L=L.slice(0,L.length-1),t.forEach(L,function(A){h(k,E,A)})}function h(k,E,L){var A=k.node(L),R=A.parent;k.edge(L,R).cutvalue=d(k,E,L)}function d(k,E,L){var A=k.node(L),R=A.parent,j=!0,Y=E.edge(L,R),V=0;return Y||(j=!1,Y=E.edge(R,L)),V=Y.weight,t.forEach(E.nodeEdges(L),function(O){var z=O.v===L,X=z?O.w:O.v;if(X!==R){var M=z===j,I=E.edge(O).weight;if(V+=M?I:-I,w(k,L,X)){var N=k.edge(L,X).cutvalue;V+=M?-N:N}}}),V}function p(k,E){arguments.length<2&&(E=k.nodes()[0]),m(k,{},1,E)}function m(k,E,L,A,R){var j=L,Y=k.node(A);return E[A]=!0,t.forEach(k.neighbors(A),function(V){t.has(E,V)||(L=m(k,E,L,V,A))}),Y.low=j,Y.lim=L++,R?Y.parent=R:delete Y.parent,L}function g(k){return t.find(k.edges(),function(E){return k.edge(E).cutvalue<0})}function x(k,E,L){var A=L.v,R=L.w;E.hasEdge(A,R)||(A=L.w,R=L.v);var j=k.node(A),Y=k.node(R),V=j,O=!1;j.lim>Y.lim&&(V=Y,O=!0);var z=t.filter(E.edges(),function(X){return O===T(k,k.node(X.v),V)&&O!==T(k,k.node(X.w),V)});return t.minBy(z,function(X){return r(E,X)})}function v(k,E,L,A){var R=L.v,j=L.w;k.removeEdge(R,j),k.setEdge(A.v,A.w,{}),p(k),u(k,E),b(k,E)}function b(k,E){var L=t.find(k.nodes(),function(R){return!E.node(R).parent}),A=n(k,L);A=A.slice(1),t.forEach(A,function(R){var j=k.node(R).parent,Y=E.edge(R,j),V=!1;Y||(Y=E.edge(j,R),V=!0),E.node(R).rank=E.node(j).rank+(V?Y.minlen:-Y.minlen)})}function w(k,E,L){return k.hasEdge(E,L)}function T(k,E,L){return L.low<=E.lim&&E.lim<=L.lim}return Av}var Bv,FN;function uZ(){if(FN)return Bv;FN=1;var t=Ff(),e=t.longestPath,r=ZD(),i=cZ();Bv=n;function n(u){switch(u.graph().ranker){case"network-simplex":c(u);break;case"tight-tree":o(u);break;case"longest-path":s(u);break;default:c(u)}}var s=e;function o(u){e(u),r(u)}function c(u){i(u)}return Bv}var Lv,IN;function hZ(){if(IN)return Lv;IN=1;var t=er();Lv=e;function e(n){var s=i(n);t.forEach(n.graph().dummyChains,function(o){for(var c=n.node(o),u=c.edgeObj,h=r(n,s,u.v,u.w),d=h.path,p=h.lca,m=0,g=d[m],x=!0;o!==u.w;){if(c=n.node(o),x){for(;(g=d[m])!==p&&n.node(g).maxRank<c.rank;)m++;g===p&&(x=!1)}if(!x){for(;m<d.length-1&&n.node(g=d[m+1]).minRank<=c.rank;)m++;g=d[m]}n.setParent(o,g),o=n.successors(o)[0]}})}function r(n,s,o,c){var u=[],h=[],d=Math.min(s[o].low,s[c].low),p=Math.max(s[o].lim,s[c].lim),m,g;m=o;do m=n.parent(m),u.push(m);while(m&&(s[m].low>d||p>s[m].lim));for(g=m,m=c;(m=n.parent(m))!==g;)h.push(m);return{path:u.concat(h.reverse()),lca:g}}function i(n){var s={},o=0;function c(u){var h=o;t.forEach(n.children(u),c),s[u]={low:h,lim:o++}}return t.forEach(n.children(),c),s}return Lv}var Mv,qN;function dZ(){if(qN)return Mv;qN=1;var t=er(),e=gi();Mv={run:r,cleanup:o};function r(c){var u=e.addDummyNode(c,"root",{},"_root"),h=n(c),d=t.max(t.values(h))-1,p=2*d+1;c.graph().nestingRoot=u,t.forEach(c.edges(),function(g){c.edge(g).minlen*=p});var m=s(c)+1;t.forEach(c.children(),function(g){i(c,u,p,m,d,h,g)}),c.graph().nodeRankFactor=p}function i(c,u,h,d,p,m,g){var x=c.children(g);if(!x.length){g!==u&&c.setEdge(u,g,{weight:0,minlen:h});return}var v=e.addBorderNode(c,"_bt"),b=e.addBorderNode(c,"_bb"),w=c.node(g);c.setParent(v,g),w.borderTop=v,c.setParent(b,g),w.borderBottom=b,t.forEach(x,function(T){i(c,u,h,d,p,m,T);var k=c.node(T),E=k.borderTop?k.borderTop:T,L=k.borderBottom?k.borderBottom:T,A=k.borderTop?d:2*d,R=E!==L?1:p-m[g]+1;c.setEdge(v,E,{weight:A,minlen:R,nestingEdge:!0}),c.setEdge(L,b,{weight:A,minlen:R,nestingEdge:!0})}),c.parent(g)||c.setEdge(u,v,{weight:0,minlen:p+m[g]})}function n(c){var u={};function h(d,p){var m=c.children(d);m&&m.length&&t.forEach(m,function(g){h(g,p+1)}),u[d]=p}return t.forEach(c.children(),function(d){h(d,1)}),u}function s(c){return t.reduce(c.edges(),function(u,h){return u+c.edge(h).weight},0)}function o(c){var u=c.graph();c.removeNode(u.nestingRoot),delete u.nestingRoot,t.forEach(c.edges(),function(h){var d=c.edge(h);d.nestingEdge&&c.removeEdge(h)})}return Mv}var Nv,zN;function fZ(){if(zN)return Nv;zN=1;var t=er(),e=gi();Nv=r;function r(n){function s(o){var c=n.children(o),u=n.node(o);if(c.length&&t.forEach(c,s),t.has(u,"minRank")){u.borderLeft=[],u.borderRight=[];for(var h=u.minRank,d=u.maxRank+1;h<d;++h)i(n,"borderLeft","_bl",o,u,h),i(n,"borderRight","_br",o,u,h)}}t.forEach(n.children(),s)}function i(n,s,o,c,u,h){var d={width:0,height:0,rank:h,borderType:s},p=u[s][h-1],m=e.addDummyNode(n,"border",d,o);u[s][h]=m,n.setParent(m,c),p&&n.setEdge(p,m,{weight:1})}return Nv}var Ov,jN;function pZ(){if(jN)return Ov;jN=1;var t=er();Ov={adjust:e,undo:r};function e(h){var d=h.graph().rankdir.toLowerCase();(d==="lr"||d==="rl")&&i(h)}function r(h){var d=h.graph().rankdir.toLowerCase();(d==="bt"||d==="rl")&&s(h),(d==="lr"||d==="rl")&&(c(h),i(h))}function i(h){t.forEach(h.nodes(),function(d){n(h.node(d))}),t.forEach(h.edges(),function(d){n(h.edge(d))})}function n(h){var d=h.width;h.width=h.height,h.height=d}function s(h){t.forEach(h.nodes(),function(d){o(h.node(d))}),t.forEach(h.edges(),function(d){var p=h.edge(d);t.forEach(p.points,o),t.has(p,"y")&&o(p)})}function o(h){h.y=-h.y}function c(h){t.forEach(h.nodes(),function(d){u(h.node(d))}),t.forEach(h.edges(),function(d){var p=h.edge(d);t.forEach(p.points,u),t.has(p,"x")&&u(p)})}function u(h){var d=h.x;h.x=h.y,h.y=d}return Ov}var Rv,$N;function gZ(){if($N)return Rv;$N=1;var t=er();Rv=e;function e(r){var i={},n=t.filter(r.nodes(),function(h){return!r.children(h).length}),s=t.max(t.map(n,function(h){return r.node(h).rank})),o=t.map(t.range(s+1),function(){return[]});function c(h){if(!t.has(i,h)){i[h]=!0;var d=r.node(h);o[d.rank].push(h),t.forEach(r.successors(h),c)}}var u=t.sortBy(n,function(h){return r.node(h).rank});return t.forEach(u,c),o}return Rv}var Dv,PN;function mZ(){if(PN)return Dv;PN=1;var t=er();Dv=e;function e(i,n){for(var s=0,o=1;o<n.length;++o)s+=r(i,n[o-1],n[o]);return s}function r(i,n,s){for(var o=t.zipObject(s,t.map(s,function(m,g){return g})),c=t.flatten(t.map(n,function(m){return t.sortBy(t.map(i.outEdges(m),function(g){return{pos:o[g.w],weight:i.edge(g).weight}}),"pos")}),!0),u=1;u<s.length;)u<<=1;var h=2*u-1;u-=1;var d=t.map(new Array(h),function(){return 0}),p=0;return t.forEach(c.forEach(function(m){var g=m.pos+u;d[g]+=m.weight;for(var x=0;g>0;)g%2&&(x+=d[g+1]),g=g-1>>1,d[g]+=m.weight;p+=m.weight*x})),p}return Dv}var Fv,HN;function yZ(){if(HN)return Fv;HN=1;var t=er();Fv=e;function e(r,i){return t.map(i,function(n){var s=r.inEdges(n);if(s.length){var o=t.reduce(s,function(c,u){var h=r.edge(u),d=r.node(u.v);return{sum:c.sum+h.weight*d.order,weight:c.weight+h.weight}},{sum:0,weight:0});return{v:n,barycenter:o.sum/o.weight,weight:o.weight}}else return{v:n}})}return Fv}var Iv,UN;function xZ(){if(UN)return Iv;UN=1;var t=er();Iv=e;function e(n,s){var o={};t.forEach(n,function(u,h){var d=o[u.v]={indegree:0,in:[],out:[],vs:[u.v],i:h};t.isUndefined(u.barycenter)||(d.barycenter=u.barycenter,d.weight=u.weight)}),t.forEach(s.edges(),function(u){var h=o[u.v],d=o[u.w];!t.isUndefined(h)&&!t.isUndefined(d)&&(d.indegree++,h.out.push(o[u.w]))});var c=t.filter(o,function(u){return!u.indegree});return r(c)}function r(n){var s=[];function o(h){return function(d){d.merged||(t.isUndefined(d.barycenter)||t.isUndefined(h.barycenter)||d.barycenter>=h.barycenter)&&i(h,d)}}function c(h){return function(d){d.in.push(h),--d.indegree===0&&n.push(d)}}for(;n.length;){var u=n.pop();s.push(u),t.forEach(u.in.reverse(),o(u)),t.forEach(u.out,c(u))}return t.map(t.filter(s,function(h){return!h.merged}),function(h){return t.pick(h,["vs","i","barycenter","weight"])})}function i(n,s){var o=0,c=0;n.weight&&(o+=n.barycenter*n.weight,c+=n.weight),s.weight&&(o+=s.barycenter*s.weight,c+=s.weight),n.vs=s.vs.concat(n.vs),n.barycenter=o/c,n.weight=c,n.i=Math.min(s.i,n.i),s.merged=!0}return Iv}var qv,GN;function bZ(){if(GN)return qv;GN=1;var t=er(),e=gi();qv=r;function r(s,o){var c=e.partition(s,function(v){return t.has(v,"barycenter")}),u=c.lhs,h=t.sortBy(c.rhs,function(v){return-v.i}),d=[],p=0,m=0,g=0;u.sort(n(!!o)),g=i(d,h,g),t.forEach(u,function(v){g+=v.vs.length,d.push(v.vs),p+=v.barycenter*v.weight,m+=v.weight,g=i(d,h,g)});var x={vs:t.flatten(d,!0)};return m&&(x.barycenter=p/m,x.weight=m),x}function i(s,o,c){for(var u;o.length&&(u=t.last(o)).i<=c;)o.pop(),s.push(u.vs),c++;return c}function n(s){return function(o,c){return o.barycenter<c.barycenter?-1:o.barycenter>c.barycenter?1:s?c.i-o.i:o.i-c.i}}return qv}var zv,YN;function vZ(){if(YN)return zv;YN=1;var t=er(),e=yZ(),r=xZ(),i=bZ();zv=n;function n(c,u,h,d){var p=c.children(u),m=c.node(u),g=m?m.borderLeft:void 0,x=m?m.borderRight:void 0,v={};g&&(p=t.filter(p,function(L){return L!==g&&L!==x}));var b=e(c,p);t.forEach(b,function(L){if(c.children(L.v).length){var A=n(c,L.v,h,d);v[L.v]=A,t.has(A,"barycenter")&&o(L,A)}});var w=r(b,h);s(w,v);var T=i(w,d);if(g&&(T.vs=t.flatten([g,T.vs,x],!0),c.predecessors(g).length)){var k=c.node(c.predecessors(g)[0]),E=c.node(c.predecessors(x)[0]);t.has(T,"barycenter")||(T.barycenter=0,T.weight=0),T.barycenter=(T.barycenter*T.weight+k.order+E.order)/(T.weight+2),T.weight+=2}return T}function s(c,u){t.forEach(c,function(h){h.vs=t.flatten(h.vs.map(function(d){return u[d]?u[d].vs:d}),!0)})}function o(c,u){t.isUndefined(c.barycenter)?(c.barycenter=u.barycenter,c.weight=u.weight):(c.barycenter=(c.barycenter*c.weight+u.barycenter*u.weight)/(c.weight+u.weight),c.weight+=u.weight)}return zv}var jv,VN;function CZ(){if(VN)return jv;VN=1;var t=er(),e=un().Graph;jv=r;function r(n,s,o){var c=i(n),u=new e({compound:!0}).setGraph({root:c}).setDefaultNodeLabel(function(h){return n.node(h)});return t.forEach(n.nodes(),function(h){var d=n.node(h),p=n.parent(h);(d.rank===s||d.minRank<=s&&s<=d.maxRank)&&(u.setNode(h),u.setParent(h,p||c),t.forEach(n[o](h),function(m){var g=m.v===h?m.w:m.v,x=u.edge(g,h),v=t.isUndefined(x)?0:x.weight;u.setEdge(g,h,{weight:n.edge(m).weight+v})}),t.has(d,"minRank")&&u.setNode(h,{borderLeft:d.borderLeft[s],borderRight:d.borderRight[s]}))}),u}function i(n){for(var s;n.hasNode(s=t.uniqueId("_root")););return s}return jv}var $v,WN;function wZ(){if(WN)return $v;WN=1;var t=er();$v=e;function e(r,i,n){var s={},o;t.forEach(n,function(c){for(var u=r.parent(c),h,d;u;){if(h=r.parent(u),h?(d=s[h],s[h]=u):(d=o,o=u),d&&d!==u){i.setEdge(d,u);return}u=h}})}return $v}var Pv,XN;function SZ(){if(XN)return Pv;XN=1;var t=er(),e=gZ(),r=mZ(),i=vZ(),n=CZ(),s=wZ(),o=un().Graph,c=gi();Pv=u;function u(m){var g=c.maxRank(m),x=h(m,t.range(1,g+1),"inEdges"),v=h(m,t.range(g-1,-1,-1),"outEdges"),b=e(m);p(m,b);for(var w=Number.POSITIVE_INFINITY,T,k=0,E=0;E<4;++k,++E){d(k%2?x:v,k%4>=2),b=c.buildLayerMatrix(m);var L=r(m,b);L<w&&(E=0,T=t.cloneDeep(b),w=L)}p(m,T)}function h(m,g,x){return t.map(g,function(v){return n(m,v,x)})}function d(m,g){var x=new o;t.forEach(m,function(v){var b=v.graph().root,w=i(v,b,x,g);t.forEach(w.vs,function(T,k){v.node(T).order=k}),s(v,x,w.vs)})}function p(m,g){t.forEach(g,function(x){t.forEach(x,function(v,b){m.node(v).order=b})})}return Pv}var Hv,QN;function kZ(){if(QN)return Hv;QN=1;var t=er(),e=un().Graph,r=gi();Hv={positionX:x,findType1Conflicts:i,findType2Conflicts:n,addConflict:o,hasConflict:c,verticalAlignment:u,horizontalCompaction:h,alignCoordinates:m,findSmallestWidthAlignment:p,balance:g};function i(w,T){var k={};function E(L,A){var R=0,j=0,Y=L.length,V=t.last(A);return t.forEach(A,function(O,z){var X=s(w,O),M=X?w.node(X).order:Y;(X||O===V)&&(t.forEach(A.slice(j,z+1),function(I){t.forEach(w.predecessors(I),function(N){var P=w.node(N),$=P.order;($<R||M<$)&&!(P.dummy&&w.node(I).dummy)&&o(k,N,I)})}),j=z+1,R=M)}),A}return t.reduce(T,E),k}function n(w,T){var k={};function E(A,R,j,Y,V){var O;t.forEach(t.range(R,j),function(z){O=A[z],w.node(O).dummy&&t.forEach(w.predecessors(O),function(X){var M=w.node(X);M.dummy&&(M.order<Y||M.order>V)&&o(k,X,O)})})}function L(A,R){var j=-1,Y,V=0;return t.forEach(R,function(O,z){if(w.node(O).dummy==="border"){var X=w.predecessors(O);X.length&&(Y=w.node(X[0]).order,E(R,V,z,j,Y),V=z,j=Y)}E(R,V,R.length,Y,A.length)}),R}return t.reduce(T,L),k}function s(w,T){if(w.node(T).dummy)return t.find(w.predecessors(T),function(k){return w.node(k).dummy})}function o(w,T,k){if(T>k){var E=T;T=k,k=E}var L=w[T];L||(w[T]=L={}),L[k]=!0}function c(w,T,k){if(T>k){var E=T;T=k,k=E}return t.has(w[T],k)}function u(w,T,k,E){var L={},A={},R={};return t.forEach(T,function(j){t.forEach(j,function(Y,V){L[Y]=Y,A[Y]=Y,R[Y]=V})}),t.forEach(T,function(j){var Y=-1;t.forEach(j,function(V){var O=E(V);if(O.length){O=t.sortBy(O,function(N){return R[N]});for(var z=(O.length-1)/2,X=Math.floor(z),M=Math.ceil(z);X<=M;++X){var I=O[X];A[V]===V&&Y<R[I]&&!c(k,V,I)&&(A[I]=V,A[V]=L[V]=L[I],Y=R[I])}}})}),{root:L,align:A}}function h(w,T,k,E,L){var A={},R=d(w,T,k,L),j=L?"borderLeft":"borderRight";function Y(z,X){for(var M=R.nodes(),I=M.pop(),N={};I;)N[I]?z(I):(N[I]=!0,M.push(I),M=M.concat(X(I))),I=M.pop()}function V(z){A[z]=R.inEdges(z).reduce(function(X,M){return Math.max(X,A[M.v]+R.edge(M))},0)}function O(z){var X=R.outEdges(z).reduce(function(I,N){return Math.min(I,A[N.w]-R.edge(N))},Number.POSITIVE_INFINITY),M=w.node(z);X!==Number.POSITIVE_INFINITY&&M.borderType!==j&&(A[z]=Math.max(A[z],X))}return Y(V,R.predecessors.bind(R)),Y(O,R.successors.bind(R)),t.forEach(E,function(z){A[z]=A[k[z]]}),A}function d(w,T,k,E){var L=new e,A=w.graph(),R=v(A.nodesep,A.edgesep,E);return t.forEach(T,function(j){var Y;t.forEach(j,function(V){var O=k[V];if(L.setNode(O),Y){var z=k[Y],X=L.edge(z,O);L.setEdge(z,O,Math.max(R(w,V,Y),X||0))}Y=V})}),L}function p(w,T){return t.minBy(t.values(T),function(k){var E=Number.NEGATIVE_INFINITY,L=Number.POSITIVE_INFINITY;return t.forIn(k,function(A,R){var j=b(w,R)/2;E=Math.max(A+j,E),L=Math.min(A-j,L)}),E-L})}function m(w,T){var k=t.values(T),E=t.min(k),L=t.max(k);t.forEach(["u","d"],function(A){t.forEach(["l","r"],function(R){var j=A+R,Y=w[j],V;if(Y!==T){var O=t.values(Y);V=R==="l"?E-t.min(O):L-t.max(O),V&&(w[j]=t.mapValues(Y,function(z){return z+V}))}})})}function g(w,T){return t.mapValues(w.ul,function(k,E){if(T)return w[T.toLowerCase()][E];var L=t.sortBy(t.map(w,E));return(L[1]+L[2])/2})}function x(w){var T=r.buildLayerMatrix(w),k=t.merge(i(w,T),n(w,T)),E={},L;t.forEach(["u","d"],function(R){L=R==="u"?T:t.values(T).reverse(),t.forEach(["l","r"],function(j){j==="r"&&(L=t.map(L,function(z){return t.values(z).reverse()}));var Y=(R==="u"?w.predecessors:w.successors).bind(w),V=u(w,L,k,Y),O=h(w,L,V.root,V.align,j==="r");j==="r"&&(O=t.mapValues(O,function(z){return-z})),E[R+j]=O})});var A=p(w,E);return m(E,A),g(E,w.graph().align)}function v(w,T,k){return function(E,L,A){var R=E.node(L),j=E.node(A),Y=0,V;if(Y+=R.width/2,t.has(R,"labelpos"))switch(R.labelpos.toLowerCase()){case"l":V=-R.width/2;break;case"r":V=R.width/2;break}if(V&&(Y+=k?V:-V),V=0,Y+=(R.dummy?T:w)/2,Y+=(j.dummy?T:w)/2,Y+=j.width/2,t.has(j,"labelpos"))switch(j.labelpos.toLowerCase()){case"l":V=j.width/2;break;case"r":V=-j.width/2;break}return V&&(Y+=k?V:-V),V=0,Y}}function b(w,T){return w.node(T).width}return Hv}var Uv,ZN;function _Z(){if(ZN)return Uv;ZN=1;var t=er(),e=gi(),r=kZ().positionX;Uv=i;function i(s){s=e.asNonCompoundGraph(s),n(s),t.forEach(r(s),function(o,c){s.node(c).x=o})}function n(s){var o=e.buildLayerMatrix(s),c=s.graph().ranksep,u=0;t.forEach(o,function(h){var d=t.max(t.map(h,function(p){return s.node(p).height}));t.forEach(h,function(p){s.node(p).y=u+d/2}),u+=d+c})}return Uv}var Gv,KN;function TZ(){if(KN)return Gv;KN=1;var t=er(),e=oZ(),r=lZ(),i=uZ(),n=gi().normalizeRanks,s=hZ(),o=gi().removeEmptyRanks,c=dZ(),u=fZ(),h=pZ(),d=SZ(),p=_Z(),m=gi(),g=un().Graph;Gv=x;function x(Q,J){var et=J&&J.debugTiming?m.time:m.notime;et("layout",function(){var at=et(" buildLayoutGraph",function(){return Y(Q)});et(" runLayout",function(){v(at,et)}),et(" updateInputGraph",function(){b(Q,at)})})}function v(Q,J){J(" makeSpaceForEdgeLabels",function(){V(Q)}),J(" removeSelfEdges",function(){D(Q)}),J(" acyclic",function(){e.run(Q)}),J(" nestingGraph.run",function(){c.run(Q)}),J(" rank",function(){i(m.asNonCompoundGraph(Q))}),J(" injectEdgeLabelProxies",function(){O(Q)}),J(" removeEmptyRanks",function(){o(Q)}),J(" nestingGraph.cleanup",function(){c.cleanup(Q)}),J(" normalizeRanks",function(){n(Q)}),J(" assignRankMinMax",function(){z(Q)}),J(" removeEdgeLabelProxies",function(){X(Q)}),J(" normalize.run",function(){r.run(Q)}),J(" parentDummyChains",function(){s(Q)}),J(" addBorderSegments",function(){u(Q)}),J(" order",function(){d(Q)}),J(" insertSelfEdges",function(){q(Q)}),J(" adjustCoordinateSystem",function(){h.adjust(Q)}),J(" position",function(){p(Q)}),J(" positionSelfEdges",function(){G(Q)}),J(" removeBorderNodes",function(){$(Q)}),J(" normalize.undo",function(){r.undo(Q)}),J(" fixupEdgeLabelCoords",function(){N(Q)}),J(" undoCoordinateSystem",function(){h.undo(Q)}),J(" translateGraph",function(){M(Q)}),J(" assignNodeIntersects",function(){I(Q)}),J(" reversePoints",function(){P(Q)}),J(" acyclic.undo",function(){e.undo(Q)})}function b(Q,J){t.forEach(Q.nodes(),function(et){var at=Q.node(et),lt=J.node(et);at&&(at.x=lt.x,at.y=lt.y,J.children(et).length&&(at.width=lt.width,at.height=lt.height))}),t.forEach(Q.edges(),function(et){var at=Q.edge(et),lt=J.edge(et);at.points=lt.points,t.has(lt,"x")&&(at.x=lt.x,at.y=lt.y)}),Q.graph().width=J.graph().width,Q.graph().height=J.graph().height}var w=["nodesep","edgesep","ranksep","marginx","marginy"],T={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},k=["acyclicer","ranker","rankdir","align"],E=["width","height"],L={width:0,height:0},A=["minlen","weight","width","height","labeloffset"],R={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},j=["labelpos"];function Y(Q){var J=new g({multigraph:!0,compound:!0}),et=H(Q.graph());return J.setGraph(t.merge({},T,Z(et,w),t.pick(et,k))),t.forEach(Q.nodes(),function(at){var lt=H(Q.node(at));J.setNode(at,t.defaults(Z(lt,E),L)),J.setParent(at,Q.parent(at))}),t.forEach(Q.edges(),function(at){var lt=H(Q.edge(at));J.setEdge(at,t.merge({},R,Z(lt,A),t.pick(lt,j)))}),J}function V(Q){var J=Q.graph();J.ranksep/=2,t.forEach(Q.edges(),function(et){var at=Q.edge(et);at.minlen*=2,at.labelpos.toLowerCase()!=="c"&&(J.rankdir==="TB"||J.rankdir==="BT"?at.width+=at.labeloffset:at.height+=at.labeloffset)})}function O(Q){t.forEach(Q.edges(),function(J){var et=Q.edge(J);if(et.width&&et.height){var at=Q.node(J.v),lt=Q.node(J.w),xt={rank:(lt.rank-at.rank)/2+at.rank,e:J};m.addDummyNode(Q,"edge-proxy",xt,"_ep")}})}function z(Q){var J=0;t.forEach(Q.nodes(),function(et){var at=Q.node(et);at.borderTop&&(at.minRank=Q.node(at.borderTop).rank,at.maxRank=Q.node(at.borderBottom).rank,J=t.max(J,at.maxRank))}),Q.graph().maxRank=J}function X(Q){t.forEach(Q.nodes(),function(J){var et=Q.node(J);et.dummy==="edge-proxy"&&(Q.edge(et.e).labelRank=et.rank,Q.removeNode(J))})}function M(Q){var J=Number.POSITIVE_INFINITY,et=0,at=Number.POSITIVE_INFINITY,lt=0,xt=Q.graph(),mt=xt.marginx||0,bt=xt.marginy||0;function Tt(_t){var Mt=_t.x,Et=_t.y,Yt=_t.width,zt=_t.height;J=Math.min(J,Mt-Yt/2),et=Math.max(et,Mt+Yt/2),at=Math.min(at,Et-zt/2),lt=Math.max(lt,Et+zt/2)}t.forEach(Q.nodes(),function(_t){Tt(Q.node(_t))}),t.forEach(Q.edges(),function(_t){var Mt=Q.edge(_t);t.has(Mt,"x")&&Tt(Mt)}),J-=mt,at-=bt,t.forEach(Q.nodes(),function(_t){var Mt=Q.node(_t);Mt.x-=J,Mt.y-=at}),t.forEach(Q.edges(),function(_t){var Mt=Q.edge(_t);t.forEach(Mt.points,function(Et){Et.x-=J,Et.y-=at}),t.has(Mt,"x")&&(Mt.x-=J),t.has(Mt,"y")&&(Mt.y-=at)}),xt.width=et-J+mt,xt.height=lt-at+bt}function I(Q){t.forEach(Q.edges(),function(J){var et=Q.edge(J),at=Q.node(J.v),lt=Q.node(J.w),xt,mt;et.points?(xt=et.points[0],mt=et.points[et.points.length-1]):(et.points=[],xt=lt,mt=at),et.points.unshift(m.intersectRect(at,xt)),et.points.push(m.intersectRect(lt,mt))})}function N(Q){t.forEach(Q.edges(),function(J){var et=Q.edge(J);if(t.has(et,"x"))switch((et.labelpos==="l"||et.labelpos==="r")&&(et.width-=et.labeloffset),et.labelpos){case"l":et.x-=et.width/2+et.labeloffset;break;case"r":et.x+=et.width/2+et.labeloffset;break}})}function P(Q){t.forEach(Q.edges(),function(J){var et=Q.edge(J);et.reversed&&et.points.reverse()})}function $(Q){t.forEach(Q.nodes(),function(J){if(Q.children(J).length){var et=Q.node(J),at=Q.node(et.borderTop),lt=Q.node(et.borderBottom),xt=Q.node(t.last(et.borderLeft)),mt=Q.node(t.last(et.borderRight));et.width=Math.abs(mt.x-xt.x),et.height=Math.abs(lt.y-at.y),et.x=xt.x+et.width/2,et.y=at.y+et.height/2}}),t.forEach(Q.nodes(),function(J){Q.node(J).dummy==="border"&&Q.removeNode(J)})}function D(Q){t.forEach(Q.edges(),function(J){if(J.v===J.w){var et=Q.node(J.v);et.selfEdges||(et.selfEdges=[]),et.selfEdges.push({e:J,label:Q.edge(J)}),Q.removeEdge(J)}})}function q(Q){var J=m.buildLayerMatrix(Q);t.forEach(J,function(et){var at=0;t.forEach(et,function(lt,xt){var mt=Q.node(lt);mt.order=xt+at,t.forEach(mt.selfEdges,function(bt){m.addDummyNode(Q,"selfedge",{width:bt.label.width,height:bt.label.height,rank:mt.rank,order:xt+ ++at,e:bt.e,label:bt.label},"_se")}),delete mt.selfEdges})})}function G(Q){t.forEach(Q.nodes(),function(J){var et=Q.node(J);if(et.dummy==="selfedge"){var at=Q.node(et.e.v),lt=at.x+at.width/2,xt=at.y,mt=et.x-lt,bt=at.height/2;Q.setEdge(et.e,et.label),Q.removeNode(J),et.label.points=[{x:lt+2*mt/3,y:xt-bt},{x:lt+5*mt/6,y:xt-bt},{x:lt+mt,y:xt},{x:lt+5*mt/6,y:xt+bt},{x:lt+2*mt/3,y:xt+bt}],et.label.x=et.x,et.label.y=et.y}})}function Z(Q,J){return t.mapValues(t.pick(Q,J),Number)}function H(Q){var J={};return t.forEach(Q,function(et,at){J[at.toLowerCase()]=et}),J}return Gv}var Yv,JN;function EZ(){if(JN)return Yv;JN=1;var t=er(),e=gi(),r=un().Graph;Yv={debugOrdering:i};function i(n){var s=e.buildLayerMatrix(n),o=new r({compound:!0,multigraph:!0}).setGraph({});return t.forEach(n.nodes(),function(c){o.setNode(c,{label:c}),o.setParent(c,"layer"+n.node(c).rank)}),t.forEach(n.edges(),function(c){o.setEdge(c.v,c.w,{},c.name)}),t.forEach(s,function(c,u){var h="layer"+u;o.setNode(h,{rank:"same"}),t.reduce(c,function(d,p){return o.setEdge(d,p,{style:"invis"}),p})}),o}return Yv}var Vv,t3;function AZ(){return t3||(t3=1,Vv="0.8.5"),Vv}var Wv,e3;function BZ(){return e3||(e3=1,Wv={graphlib:un(),layout:TZ(),debug:EZ(),util:{time:gi().time,notime:gi().notime},version:AZ()}),Wv}var LZ=BZ();const r3=Wl(LZ);/**
73
+ * @license lucide-react v0.546.0 - ISC
74
+ *
75
+ * This source code is licensed under the ISC license.
76
+ * See the LICENSE file in the root directory of this source tree.
77
+ */const MZ=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),NZ=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,i)=>i?i.toUpperCase():r.toLowerCase()),i3=t=>{const e=NZ(t);return e.charAt(0).toUpperCase()+e.slice(1)},KD=(...t)=>t.filter((e,r,i)=>!!e&&e.trim()!==""&&i.indexOf(e)===r).join(" ").trim(),OZ=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};/**
78
+ * @license lucide-react v0.546.0 - ISC
79
+ *
80
+ * This source code is licensed under the ISC license.
81
+ * See the LICENSE file in the root directory of this source tree.
82
+ */var RZ={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
83
+ * @license lucide-react v0.546.0 - ISC
84
+ *
85
+ * This source code is licensed under the ISC license.
86
+ * See the LICENSE file in the root directory of this source tree.
87
+ */const DZ=ot.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:i,className:n="",children:s,iconNode:o,...c},u)=>ot.createElement("svg",{ref:u,...RZ,width:e,height:e,stroke:t,strokeWidth:i?Number(r)*24/Number(e):r,className:KD("lucide",n),...!s&&!OZ(c)&&{"aria-hidden":"true"},...c},[...o.map(([h,d])=>ot.createElement(h,d)),...Array.isArray(s)?s:[s]]));/**
88
+ * @license lucide-react v0.546.0 - ISC
89
+ *
90
+ * This source code is licensed under the ISC license.
91
+ * See the LICENSE file in the root directory of this source tree.
92
+ */const ge=(t,e)=>{const r=ot.forwardRef(({className:i,...n},s)=>ot.createElement(DZ,{ref:s,iconNode:e,className:KD(`lucide-${MZ(i3(t))}`,`lucide-${t}`,i),...n}));return r.displayName=i3(t),r};/**
93
+ * @license lucide-react v0.546.0 - ISC
94
+ *
95
+ * This source code is licensed under the ISC license.
96
+ * See the LICENSE file in the root directory of this source tree.
97
+ */const FZ=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Eu=ge("activity",FZ);/**
98
+ * @license lucide-react v0.546.0 - ISC
99
+ *
100
+ * This source code is licensed under the ISC license.
101
+ * See the LICENSE file in the root directory of this source tree.
102
+ */const IZ=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],qZ=ge("arrow-right",IZ);/**
103
+ * @license lucide-react v0.546.0 - ISC
104
+ *
105
+ * This source code is licensed under the ISC license.
106
+ * See the LICENSE file in the root directory of this source tree.
107
+ */const zZ=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],jZ=ge("book-open",zZ);/**
108
+ * @license lucide-react v0.546.0 - ISC
109
+ *
110
+ * This source code is licensed under the ISC license.
111
+ * See the LICENSE file in the root directory of this source tree.
112
+ */const $Z=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],JD=ge("box",$Z);/**
113
+ * @license lucide-react v0.546.0 - ISC
114
+ *
115
+ * This source code is licensed under the ISC license.
116
+ * See the LICENSE file in the root directory of this source tree.
117
+ */const PZ=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],HZ=ge("chevron-down",PZ);/**
118
+ * @license lucide-react v0.546.0 - ISC
119
+ *
120
+ * This source code is licensed under the ISC license.
121
+ * See the LICENSE file in the root directory of this source tree.
122
+ */const UZ=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ff=ge("chevron-right",UZ);/**
123
+ * @license lucide-react v0.546.0 - ISC
124
+ *
125
+ * This source code is licensed under the ISC license.
126
+ * See the LICENSE file in the root directory of this source tree.
127
+ */const GZ=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],YZ=ge("chevron-up",GZ);/**
128
+ * @license lucide-react v0.546.0 - ISC
129
+ *
130
+ * This source code is licensed under the ISC license.
131
+ * See the LICENSE file in the root directory of this source tree.
132
+ */const VZ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],tn=ge("circle-alert",VZ);/**
133
+ * @license lucide-react v0.546.0 - ISC
134
+ *
135
+ * This source code is licensed under the ISC license.
136
+ * See the LICENSE file in the root directory of this source tree.
137
+ */const WZ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],XZ=ge("circle-check",WZ);/**
138
+ * @license lucide-react v0.546.0 - ISC
139
+ *
140
+ * This source code is licensed under the ISC license.
141
+ * See the LICENSE file in the root directory of this source tree.
142
+ */const QZ=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],ZZ=ge("database",QZ);/**
143
+ * @license lucide-react v0.546.0 - ISC
144
+ *
145
+ * This source code is licensed under the ISC license.
146
+ * See the LICENSE file in the root directory of this source tree.
147
+ */const KZ=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],JZ=ge("download",KZ);/**
148
+ * @license lucide-react v0.546.0 - ISC
149
+ *
150
+ * This source code is licensed under the ISC license.
151
+ * See the LICENSE file in the root directory of this source tree.
152
+ */const tK=[["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"}]],eK=ge("external-link",tK);/**
153
+ * @license lucide-react v0.546.0 - ISC
154
+ *
155
+ * This source code is licensed under the ISC license.
156
+ * See the LICENSE file in the root directory of this source tree.
157
+ */const rK=[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m5 12-3 3 3 3",key:"oke12k"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]],iK=ge("file-code-2",rK);/**
158
+ * @license lucide-react v0.546.0 - ISC
159
+ *
160
+ * This source code is licensed under the ISC license.
161
+ * See the LICENSE file in the root directory of this source tree.
162
+ */const nK=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],tF=ge("file-text",nK);/**
163
+ * @license lucide-react v0.546.0 - ISC
164
+ *
165
+ * This source code is licensed under the ISC license.
166
+ * See the LICENSE file in the root directory of this source tree.
167
+ */const aK=[["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"}]],sK=ge("git-commit-horizontal",aK);/**
168
+ * @license lucide-react v0.546.0 - ISC
169
+ *
170
+ * This source code is licensed under the ISC license.
171
+ * See the LICENSE file in the root directory of this source tree.
172
+ */const oK=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],lK=ge("git-branch",oK);/**
173
+ * @license lucide-react v0.546.0 - ISC
174
+ *
175
+ * This source code is licensed under the ISC license.
176
+ * See the LICENSE file in the root directory of this source tree.
177
+ */const cK=[["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"}]],eF=ge("git-pull-request",cK);/**
178
+ * @license lucide-react v0.546.0 - ISC
179
+ *
180
+ * This source code is licensed under the ISC license.
181
+ * See the LICENSE file in the root directory of this source tree.
182
+ */const uK=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],hK=ge("globe",uK);/**
183
+ * @license lucide-react v0.546.0 - ISC
184
+ *
185
+ * This source code is licensed under the ISC license.
186
+ * See the LICENSE file in the root directory of this source tree.
187
+ */const dK=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],fK=ge("info",dK);/**
188
+ * @license lucide-react v0.546.0 - ISC
189
+ *
190
+ * This source code is licensed under the ISC license.
191
+ * See the LICENSE file in the root directory of this source tree.
192
+ */const pK=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],rF=ge("layers",pK);/**
193
+ * @license lucide-react v0.546.0 - ISC
194
+ *
195
+ * This source code is licensed under the ISC license.
196
+ * See the LICENSE file in the root directory of this source tree.
197
+ */const gK=[["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"}]],mK=ge("link-2",gK);/**
198
+ * @license lucide-react v0.546.0 - ISC
199
+ *
200
+ * This source code is licensed under the ISC license.
201
+ * See the LICENSE file in the root directory of this source tree.
202
+ */const yK=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M12 3v3",key:"1n5kay"}],["path",{d:"M4 6a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1h13a2 2 0 0 0 1.152-.365l3.424-2.317a1 1 0 0 0 0-1.635l-3.424-2.318A2 2 0 0 0 17 6z",key:"1btarq"}]],iF=ge("milestone",yK);/**
203
+ * @license lucide-react v0.546.0 - ISC
204
+ *
205
+ * This source code is licensed under the ISC license.
206
+ * See the LICENSE file in the root directory of this source tree.
207
+ */const xK=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],bK=ge("network",xK);/**
208
+ * @license lucide-react v0.546.0 - ISC
209
+ *
210
+ * This source code is licensed under the ISC license.
211
+ * See the LICENSE file in the root directory of this source tree.
212
+ */const vK=[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]],CK=ge("printer",vK);/**
213
+ * @license lucide-react v0.546.0 - ISC
214
+ *
215
+ * This source code is licensed under the ISC license.
216
+ * See the LICENSE file in the root directory of this source tree.
217
+ */const wK=[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]],nF=ge("repeat",wK);/**
218
+ * @license lucide-react v0.546.0 - ISC
219
+ *
220
+ * This source code is licensed under the ISC license.
221
+ * See the LICENSE file in the root directory of this source tree.
222
+ */const SK=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],aF=ge("rocket",SK);/**
223
+ * @license lucide-react v0.546.0 - ISC
224
+ *
225
+ * This source code is licensed under the ISC license.
226
+ * See the LICENSE file in the root directory of this source tree.
227
+ */const kK=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Vu=ge("search",kK);/**
228
+ * @license lucide-react v0.546.0 - ISC
229
+ *
230
+ * This source code is licensed under the ISC license.
231
+ * See the LICENSE file in the root directory of this source tree.
232
+ */const _K=[["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"}]],sF=ge("settings",_K);/**
233
+ * @license lucide-react v0.546.0 - ISC
234
+ *
235
+ * This source code is licensed under the ISC license.
236
+ * See the LICENSE file in the root directory of this source tree.
237
+ */const TK=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],oF=ge("shield-alert",TK);/**
238
+ * @license lucide-react v0.546.0 - ISC
239
+ *
240
+ * This source code is licensed under the ISC license.
241
+ * See the LICENSE file in the root directory of this source tree.
242
+ */const EK=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],AK=ge("shield-check",EK);/**
243
+ * @license lucide-react v0.546.0 - ISC
244
+ *
245
+ * This source code is licensed under the ISC license.
246
+ * See the LICENSE file in the root directory of this source tree.
247
+ */const BK=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],n3=ge("terminal",BK);/**
248
+ * @license lucide-react v0.546.0 - ISC
249
+ *
250
+ * This source code is licensed under the ISC license.
251
+ * See the LICENSE file in the root directory of this source tree.
252
+ */const LK=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],If=ge("trash-2",LK);/**
253
+ * @license lucide-react v0.546.0 - ISC
254
+ *
255
+ * This source code is licensed under the ISC license.
256
+ * See the LICENSE file in the root directory of this source tree.
257
+ */const MK=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],lF=ge("triangle-alert",MK);/**
258
+ * @license lucide-react v0.546.0 - ISC
259
+ *
260
+ * This source code is licensed under the ISC license.
261
+ * See the LICENSE file in the root directory of this source tree.
262
+ */const NK=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],cF=ge("wrench",NK);/**
263
+ * @license lucide-react v0.546.0 - ISC
264
+ *
265
+ * This source code is licensed under the ISC license.
266
+ * See the LICENSE file in the root directory of this source tree.
267
+ */const OK=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],RK=ge("x",OK);/**
268
+ * @license lucide-react v0.546.0 - ISC
269
+ *
270
+ * This source code is licensed under the ISC license.
271
+ * See the LICENSE file in the root directory of this source tree.
272
+ */const DK=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],FK=ge("zap",DK),qf={REQUIREMENT:"text-blue-400 border-blue-400",USE_CASE:"text-indigo-400 border-indigo-400",DESIGN:"text-purple-400 border-purple-400",COMPONENT:"text-amber-400 border-amber-400",CODE_ENTITY:"text-emerald-400 border-emerald-400",TEST:"text-rose-400 border-rose-400",DOCUMENTATION:"text-slate-400 border-slate-400",INCIDENT:"text-red-400 border-red-400",INFRASTRUCTURE:"text-cyan-400 border-cyan-400",DEPLOYMENT:"text-sky-400 border-sky-400",MONITORING:"text-orange-400 border-orange-400",MAINTENANCE:"text-violet-400 border-violet-400",PROJECT:"text-stone-400 border-stone-400",EPIC:"text-indigo-500 border-indigo-500",FEATURE:"text-blue-500 border-blue-500",BUSINESS_RULE:"text-teal-400 border-teal-400",DECISION:"text-pink-400 border-pink-400",TEST_CASE:"text-rose-500 border-rose-500",CHANGE:"text-lime-400 border-lime-400",BUG:"text-red-500 border-red-500",RISK:"text-fuchsia-400 border-fuchsia-400",GLOSSARY_TERM:"text-gray-400 border-gray-400",API:"text-emerald-500 border-emerald-500",DATABASE_ENTITY:"text-orange-500 border-orange-500",SYSTEM_VERSION:"text-yellow-500 border-yellow-500",VERSION:"text-teal-500 border-teal-500",LIBRARY:"text-blue-400 border-blue-400",ENVIRONMENT:"text-indigo-400 border-indigo-400",CHECK:"text-red-400 border-red-400",PROCESS:"text-fuchsia-400 border-fuchsia-400",PIPELINE:"text-sky-400 border-sky-400"},IK=({data:t,selected:e})=>{var s,o;const r=qf[t.type]||"text-white/40 border-white/40",i=t.dimmed,n=t.isOrphan;return S.jsxs("div",{className:`p-4 shadow-xl border bg-[#151515] w-[260px] cursor-pointer transition-all duration-300
273
+ ${e?"ring-1 ring-white/50 border-white/50 z-10":"border-white/10 hover:border-white/30"}
274
+ ${i?"opacity-30 grayscale saturate-0":"opacity-100"}
275
+ ${n?"border-red-500/50":"border-white/10"}
276
+ border-l-[3px]`,style:{borderLeftColor:n?"#ef4444":"currentColor"},children:[S.jsx(Ka,{type:"target",position:Gt.Top,id:"t-top",className:`w-2 h-2 rounded-none ${i?"opacity-0":"bg-emerald-500/50 border-0"}`,style:{left:"30%"}}),S.jsx(Ka,{type:"source",position:Gt.Top,id:"s-top",className:`w-2 h-2 rounded-none ${i?"opacity-0":"bg-blue-500/50 border-0"}`,style:{left:"70%"}}),S.jsxs("div",{className:`flex justify-between items-start mb-3 ${r}`,children:[S.jsxs("div",{className:"flex flex-col gap-0.5",children:[S.jsxs("div",{className:"flex items-center gap-1.5",children:[S.jsx("span",{className:"text-[9px] font-bold uppercase tracking-widest",children:t.type}),n&&S.jsx("div",{className:"text-red-500",title:"Orphan Artifact (No relationships)",children:S.jsx(tn,{size:10})})]}),t.subType&&S.jsx("span",{className:"text-[8px] font-sans uppercase tracking-wider opacity-60",children:t.subType}),t.layer&&S.jsx("span",{className:"text-[7px] font-mono tracking-wider opacity-40",children:t.layer})]}),S.jsx("span",{className:"text-[10px] font-mono opacity-60 shrink-0 ml-2 border border-white/10 px-1",children:t.id})]}),S.jsx("div",{className:"font-serif text-[#e0e0e0] text-sm mb-2 leading-tight",children:t.title}),S.jsxs("div",{className:"flex flex-col gap-1",children:[S.jsx("div",{className:"text-[11px] leading-relaxed opacity-60 h-8 overflow-hidden text-ellipsis line-clamp-2",children:t.description}),((s=t.ownership)==null?void 0:s.owner)&&S.jsxs("div",{className:"text-[8px] text-emerald-500 font-mono",children:["OWNER: ",t.ownership.owner]}),((o=t.ownership)==null?void 0:o.team)&&S.jsxs("div",{className:"text-[8px] text-blue-400 font-mono",children:["TEAM: ",t.ownership.team]})]}),S.jsx(Ka,{type:"target",position:Gt.Bottom,id:"t-bot",className:`w-2 h-2 rounded-none ${i?"opacity-0":"bg-emerald-500/50 border-0"}`,style:{left:"70%"}}),S.jsx(Ka,{type:"source",position:Gt.Bottom,id:"s-bot",className:`w-2 h-2 rounded-none ${i?"opacity-0":"bg-blue-500/50 border-0"}`,style:{left:"30%"}})]})},qK={artifact:IK},$C=260,PC=140,zK=(t,e,r="TB")=>{const i=new r3.graphlib.Graph;return i.setDefaultEdgeLabel(()=>({})),i.setGraph({rankdir:r,align:"UL",edgesep:120,ranksep:160,nodesep:100}),t.forEach(s=>{s.hidden||i.setNode(s.id,{width:$C,height:PC})}),e.forEach(s=>{s.hidden||i.setEdge(s.source,s.target)}),r3.layout(i),{nodes:t.map(s=>{if(s.hidden)return{...s,position:{x:0,y:0}};const o=i.node(s.id);return{...s,position:{x:o.x-$C/2,y:o.y-PC/2}}}),edges:e}},jK=()=>{const[t,e]=ot.useState(!1);return S.jsx(Xl,{position:"bottom-center",className:"m-4 z-50",children:S.jsxs("div",{className:"bg-[#0c0c0c] border border-white/10 p-3 shadow-2xl rounded-md flex flex-col gap-2 w-48",children:[S.jsxs("div",{className:"flex items-center justify-between cursor-pointer",onClick:()=>e(!t),children:[S.jsx("span",{className:"text-[10px] uppercase font-bold tracking-widest text-white/50 hover:text-white transition-colors",children:"Legend"}),t?S.jsx(HZ,{size:12,className:"text-white/50"}):S.jsx(YZ,{size:12,className:"text-white/50"})]}),t&&S.jsxs("div",{className:"flex flex-col gap-3 pt-2 border-t border-white/10 max-h-[60vh] overflow-y-auto",style:{scrollbarWidth:"thin"},children:[S.jsxs("div",{className:"flex flex-col gap-1.5",children:[S.jsx("div",{className:"text-[9px] uppercase font-bold text-white/30",children:"Relation Strength"}),S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("div",{className:"w-4 h-[2px] bg-[#f87171]"}),S.jsx("span",{className:"text-[9px] text-white/70 font-mono",children:"STRONG (Solid)"})]}),S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("div",{className:"w-4 h-[2px]",style:{borderTop:"2px dashed #38bdf8"}}),S.jsx("span",{className:"text-[9px] text-white/70 font-mono",children:"MEDIUM (Dashed)"})]}),S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("div",{className:"w-4 h-[1px]",style:{borderTop:"2px dotted #94a3b8"}}),S.jsx("span",{className:"text-[9px] text-white/70 font-mono",children:"WEAK (Dotted)"})]})]}),S.jsxs("div",{className:"flex flex-col gap-1.5",children:[S.jsx("div",{className:"text-[9px] uppercase font-bold text-white/30",children:"Node Connectors"}),S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("div",{className:"w-2 h-2 rounded bg-blue-500/50"}),S.jsx("span",{className:"text-[9px] text-white/70 font-mono",children:"Outputs (Source)"})]}),S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("div",{className:"w-2 h-2 rounded bg-emerald-500/50"}),S.jsx("span",{className:"text-[9px] text-white/70 font-mono",children:"Inputs (Target)"})]})]}),S.jsxs("div",{className:"flex flex-col gap-1.5",children:[S.jsx("div",{className:"text-[9px] uppercase font-bold text-white/30",children:"Artifact Types"}),Object.entries(qf).map(([r,i])=>S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("div",{className:`w-2 h-2 rounded-full border border-current bg-current ${i.split(" ")[0]}`}),S.jsx("span",{className:`text-[9px] font-mono ${i.split(" ")[0]}`,children:r})]},r))]})]})]})})},$K=()=>{const{fullGraph:t,currentSubgraph:e,selectedArtifactId:r,setSelectedArtifact:i,setView:n,settings:s,globalFilters:o,setGlobalFilter:c}=ls(),{setCenter:u}=wp(),[h,d,p]=zV([]),m=ot.useMemo(()=>{if(!t)return new Set;const M=new Set;t.relations.forEach(N=>{M.add(N.from),M.add(N.to)});const I=new Set;return t.artifacts.forEach(N=>{M.has(N.id)||I.add(N.id)}),I},[t]),[g,x]=ot.useState(""),[v,b]=ot.useState(!1),w=o.layer,T=o.owner,k=o.team,E=M=>c("layer",M),L=M=>c("owner",M),A=M=>c("team",M),R=ot.useMemo(()=>{if(!t||!t.artifacts)return{layers:[],owners:[],teams:[]};const M=Array.from(new Set(t.artifacts.map(P=>P.layer).filter(Boolean))),I=Array.from(new Set(t.artifacts.map(P=>{var $;return($=P.ownership)==null?void 0:$.owner}).filter(Boolean))),N=Array.from(new Set(t.artifacts.map(P=>{var $;return($=P.ownership)==null?void 0:$.team}).filter(Boolean)));return{layers:M,owners:I,teams:N}},[t]),j=ot.useMemo(()=>e?e.artifacts.filter(M=>{if(!g)return!0;const I=g.toLowerCase();return M.title.toLowerCase().includes(I)||M.type.toLowerCase().includes(I)||M.subType&&M.subType.toLowerCase().includes(I)||M.id.toLowerCase().includes(I)}):[],[e,g]);ot.useEffect(()=>{if(r&&h.length>0){const M=h.find(I=>I.id===r);M&&u(M.position.x+$C/2,M.position.y+PC/2,{zoom:1,duration:800})}},[r,h,u]);const[Y,V,O]=jV([]);ot.useEffect(()=>{if(!e)return;let M=new Set,I=new Set;if(r){M.add(r);let D=new Set([r]);const q=s.graphFocusDepth===0?1/0:s.graphFocusDepth;for(let G=0;G<q;G++){let Z=new Set,H=new Set;if(e.relations.forEach(Q=>{(D.has(Q.from)||D.has(Q.to))&&(H.add(Q.id),M.has(Q.from)||Z.add(Q.from),M.has(Q.to)||Z.add(Q.to))}),Z.size===0)break;Z.forEach(Q=>M.add(Q)),H.forEach(Q=>I.add(Q)),D=Z}}let N=e.artifacts.map(D=>{var J,et;const q=r===D.id;let G=!1;r&&(G=M.has(D.id));const H=w!=="ALL"&&D.layer!==w||T!=="ALL"&&((J=D.ownership)==null?void 0:J.owner)!==T||k!=="ALL"&&((et=D.ownership)==null?void 0:et.team)!==k||r!==null&&!q&&!G,Q=m.has(D.id);return{id:D.id,type:"artifact",position:{x:0,y:0},data:{...D,dimmed:H,isOrphan:Q}}}),P=e.relations.map(D=>{var lt,xt,mt,bt;let q=!0;r&&(q=I.has(D.id));const G=e.artifacts.find(Tt=>Tt.id===D.from),Z=e.artifacts.find(Tt=>Tt.id===D.to),Q=w!=="ALL"&&((G==null?void 0:G.layer)!==w||(Z==null?void 0:Z.layer)!==w)||T!=="ALL"&&(((lt=G==null?void 0:G.ownership)==null?void 0:lt.owner)!==T||((xt=Z==null?void 0:Z.ownership)==null?void 0:xt.owner)!==T)||k!=="ALL"&&(((mt=G==null?void 0:G.ownership)==null?void 0:mt.team)!==k||((bt=Z==null?void 0:Z.ownership)==null?void 0:bt.team)!==k)||r!==null&&!q,J=D.strength==="WEAK",et=D.strength==="STRONG";let at="#38bdf8";return et&&(at="#f87171"),J&&(at="#94a3b8"),Q&&(at="rgba(255,255,255,0.05)"),{id:D.id,source:D.from,target:D.to,sourceHandle:"s-bot",targetHandle:"t-top",label:D.category?`${D.type} (${D.category})`:D.type,type:"default",animated:r!==null&&q,markerEnd:{type:Hu.ArrowClosed,color:at},style:{stroke:at,strokeWidth:Q?1:r&&q?et?3:J?1.5:2.5:et?2:J?1:1.5,strokeDasharray:J?"2 4":et?"0":"5",transition:"all 0.3s ease"},labelStyle:{fill:Q?"transparent":"rgba(255,255,255,0.8)",fontSize:8,fontWeight:et?700:400,letterSpacing:"1px"},labelBgStyle:{fill:Q?"transparent":"#111111",opacity:Q?0:1,stroke:Q?"transparent":"rgba(255,255,255,0.1)",strokeWidth:1},labelBgBorderRadius:4,labelBgPadding:[8,4]}});const $=zK(N,P,"TB");d($.nodes),V($.edges)},[e,r,s.graphFocusDepth,d,V,m,w,T,k]);const z=ot.useCallback((M,I)=>{i(I.id),b(!1)},[i]),X=ot.useCallback(()=>{i(null),b(!1)},[i]);return e?S.jsx("div",{className:"h-full w-full bg-[#0a0a0a] relative",children:S.jsxs(qV,{nodes:h,edges:Y,onNodesChange:p,onEdgesChange:O,onNodeClick:z,onPaneClick:X,nodeTypes:qK,fitView:!0,colorMode:"dark",minZoom:.2,elevateNodesOnSelect:!0,children:[S.jsx(jK,{}),S.jsx(Xl,{position:"top-left",className:"m-4 z-50",children:S.jsxs("div",{className:"bg-[#0c0c0c] border border-white/10 p-3 shadow-2xl w-80 flex flex-col gap-2 rounded-md transition-all",children:[S.jsxs("div",{className:"flex items-center gap-3 border-b border-white/5 pb-2",children:[S.jsx(Vu,{size:16,className:"text-white/40 shrink-0"}),S.jsx("input",{type:"text",placeholder:"Search by Type, Title or ID...",className:"bg-transparent border-none text-xs text-white outline-none w-full placeholder:text-white/20 font-sans",value:g,onChange:M=>{x(M.target.value),b(!0)},onFocus:()=>b(!0)}),r&&S.jsx("button",{onClick:()=>{i(null),x(""),b(!1)},className:"text-white/40 hover:text-emerald-400 transition-colors shrink-0 p-1",title:"Clear Selection",children:S.jsx(RK,{size:14})})]}),v&&S.jsxs("div",{className:"max-h-[50vh] overflow-y-auto flex flex-col mt-1 space-y-1 pr-1",style:{scrollbarWidth:"thin"},children:[m.size>0&&!g&&S.jsxs("button",{onClick:()=>n("orphans"),className:"flex items-center gap-2 p-2 bg-red-500/10 border border-red-500/20 text-red-400 text-[10px] rounded mb-2 hover:bg-red-500/20 transition-all uppercase tracking-widest font-bold",children:[S.jsx(tn,{size:14}),m.size," Orphan Artifacts Found"]}),j.length===0?S.jsx("div",{className:"text-xs text-white/40 p-2 italic",children:"No artifacts found."}):j.map(M=>{var I,N;return S.jsxs("button",{className:`text-left text-xs p-2 hover:bg-white/10 border-l-[3px] transition-colors flex flex-col gap-1 rounded-r-md
277
+ ${r===M.id?`${((I=qf[M.type])==null?void 0:I.split(" ")[1])||"border-emerald-500"} bg-white/5`:"border-transparent hover:border-white/30"}`,onClick:()=>{i(M.id),b(!1)},children:[S.jsxs("div",{className:"text-[9px] uppercase tracking-widest text-[#e0e0e0] opacity-50 font-bold flex justify-between",children:[S.jsxs("div",{className:"flex flex-col gap-0.5",children:[S.jsx("span",{children:M.type}),M.subType&&S.jsx("span",{className:"text-[8px] opacity-70",children:M.subType})]}),S.jsx("span",{className:"font-mono",children:M.id})]}),S.jsx("div",{className:`truncate font-serif text-sm ${((N=qf[M.type])==null?void 0:N.split(" ")[0])||"text-emerald-400"}`,children:M.title})]},M.id)})]}),S.jsxs("div",{className:"flex gap-1 pt-2",children:[S.jsxs("select",{value:w,onChange:M=>E(M.target.value),className:`bg-transparent py-1 px-1 text-[8px] focus:outline-none cursor-pointer uppercase tracking-wider flex-1 text-center transition-all border rounded-sm ${w!=="ALL"?"bg-blue-500/20 border-blue-500/40 text-blue-400 font-bold":"border-white/10 text-white/50 hover:border-white/20"}`,children:[S.jsx("option",{value:"ALL",className:"bg-[#0c0c0c] text-white font-normal",children:"LAYER"}),R.layers.map(M=>S.jsx("option",{value:M,className:"bg-[#0c0c0c] text-white font-normal",children:M},M))]}),S.jsxs("select",{value:T,onChange:M=>L(M.target.value),className:`bg-transparent py-1 px-1 text-[8px] focus:outline-none cursor-pointer uppercase tracking-wider flex-1 text-center transition-all border rounded-sm ${T!=="ALL"?"bg-blue-500/20 border-blue-500/40 text-blue-400 font-bold":"border-white/10 text-white/50 hover:border-white/20"}`,children:[S.jsx("option",{value:"ALL",className:"bg-[#0c0c0c] text-white font-normal",children:"OWNER"}),R.owners.map(M=>S.jsx("option",{value:M,className:"bg-[#0c0c0c] text-white font-normal",children:M},M))]}),S.jsxs("select",{value:k,onChange:M=>A(M.target.value),className:`bg-transparent py-1 px-1 text-[8px] focus:outline-none cursor-pointer uppercase tracking-wider flex-1 text-center transition-all border rounded-sm ${k!=="ALL"?"bg-blue-500/20 border-blue-500/40 text-blue-400 font-bold":"border-white/10 text-white/50 hover:border-white/20"}`,children:[S.jsx("option",{value:"ALL",className:"bg-[#0c0c0c] text-white font-normal",children:"TEAM"}),R.teams.map(M=>S.jsx("option",{value:M,className:"bg-[#0c0c0c] text-white font-normal",children:M},M))]})]})]})}),S.jsx(hW,{style:{backgroundColor:"#0c0c0c",border:"1px solid rgba(255,255,255,0.1)"},maskColor:"rgba(0,0,0,0.5)",nodeColor:"#333"}),S.jsx(KV,{style:{backgroundColor:"#151515",border:"1px solid rgba(255,255,255,0.1)",fill:"#fff"}}),S.jsx(GV,{color:"#ffffff",gap:20,size:1,style:{opacity:.03}})]})}):S.jsx("div",{className:"p-8 text-white/50",children:"Loading graph..."})},PK=()=>S.jsx(XR,{children:S.jsx($K,{})});function HK(t,e){const r={};return(t[t.length-1]===""?[...t,""]:t).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const UK=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,GK=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,YK={};function a3(t,e){return(YK.jsx?GK:UK).test(t)}const VK=/[ \t\n\f\r]/g;function WK(t){return typeof t=="object"?t.type==="text"?s3(t.value):!1:s3(t)}function s3(t){return t.replace(VK,"")===""}class gh{constructor(e,r,i){this.normal=r,this.property=e,i&&(this.space=i)}}gh.prototype.normal={};gh.prototype.property={};gh.prototype.space=void 0;function uF(t,e){const r={},i={};for(const n of t)Object.assign(r,n.property),Object.assign(i,n.normal);return new gh(r,i,e)}function HC(t){return t.toLowerCase()}class yi{constructor(e,r){this.attribute=r,this.property=e}}yi.prototype.attribute="";yi.prototype.booleanish=!1;yi.prototype.boolean=!1;yi.prototype.commaOrSpaceSeparated=!1;yi.prototype.commaSeparated=!1;yi.prototype.defined=!1;yi.prototype.mustUseProperty=!1;yi.prototype.number=!1;yi.prototype.overloadedBoolean=!1;yi.prototype.property="";yi.prototype.spaceSeparated=!1;yi.prototype.space=void 0;let XK=0;const ce=ho(),vr=ho(),UC=ho(),At=ho(),Pe=ho(),yl=ho(),Ei=ho();function ho(){return 2**++XK}const GC=Object.freeze(Object.defineProperty({__proto__:null,boolean:ce,booleanish:vr,commaOrSpaceSeparated:Ei,commaSeparated:yl,number:At,overloadedBoolean:UC,spaceSeparated:Pe},Symbol.toStringTag,{value:"Module"})),Xv=Object.keys(GC);class Tw extends yi{constructor(e,r,i,n){let s=-1;if(super(e,r),o3(this,"space",n),typeof i=="number")for(;++s<Xv.length;){const o=Xv[s];o3(this,Xv[s],(i&GC[o])===GC[o])}}}Tw.prototype.defined=!0;function o3(t,e,r){r&&(t[e]=r)}function ec(t){const e={},r={};for(const[i,n]of Object.entries(t.properties)){const s=new Tw(i,t.transform(t.attributes||{},i),n,t.space);t.mustUseProperty&&t.mustUseProperty.includes(i)&&(s.mustUseProperty=!0),e[i]=s,r[HC(i)]=i,r[HC(s.attribute)]=i}return new gh(e,r,t.space)}const hF=ec({properties:{ariaActiveDescendant:null,ariaAtomic:vr,ariaAutoComplete:null,ariaBusy:vr,ariaChecked:vr,ariaColCount:At,ariaColIndex:At,ariaColSpan:At,ariaControls:Pe,ariaCurrent:null,ariaDescribedBy:Pe,ariaDetails:null,ariaDisabled:vr,ariaDropEffect:Pe,ariaErrorMessage:null,ariaExpanded:vr,ariaFlowTo:Pe,ariaGrabbed:vr,ariaHasPopup:null,ariaHidden:vr,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Pe,ariaLevel:At,ariaLive:null,ariaModal:vr,ariaMultiLine:vr,ariaMultiSelectable:vr,ariaOrientation:null,ariaOwns:Pe,ariaPlaceholder:null,ariaPosInSet:At,ariaPressed:vr,ariaReadOnly:vr,ariaRelevant:null,ariaRequired:vr,ariaRoleDescription:Pe,ariaRowCount:At,ariaRowIndex:At,ariaRowSpan:At,ariaSelected:vr,ariaSetSize:At,ariaSort:null,ariaValueMax:At,ariaValueMin:At,ariaValueNow:At,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function dF(t,e){return e in t?t[e]:e}function fF(t,e){return dF(t,e.toLowerCase())}const QK=ec({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:yl,acceptCharset:Pe,accessKey:Pe,action:null,allow:null,allowFullScreen:ce,allowPaymentRequest:ce,allowUserMedia:ce,alt:null,as:null,async:ce,autoCapitalize:null,autoComplete:Pe,autoFocus:ce,autoPlay:ce,blocking:Pe,capture:null,charSet:null,checked:ce,cite:null,className:Pe,cols:At,colSpan:null,content:null,contentEditable:vr,controls:ce,controlsList:Pe,coords:At|yl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ce,defer:ce,dir:null,dirName:null,disabled:ce,download:UC,draggable:vr,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ce,formTarget:null,headers:Pe,height:At,hidden:UC,high:At,href:null,hrefLang:null,htmlFor:Pe,httpEquiv:Pe,id:null,imageSizes:null,imageSrcSet:null,inert:ce,inputMode:null,integrity:null,is:null,isMap:ce,itemId:null,itemProp:Pe,itemRef:Pe,itemScope:ce,itemType:Pe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ce,low:At,manifest:null,max:null,maxLength:At,media:null,method:null,min:null,minLength:At,multiple:ce,muted:ce,name:null,nonce:null,noModule:ce,noValidate:ce,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:ce,optimum:At,pattern:null,ping:Pe,placeholder:null,playsInline:ce,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ce,referrerPolicy:null,rel:Pe,required:ce,reversed:ce,rows:At,rowSpan:At,sandbox:Pe,scope:null,scoped:ce,seamless:ce,selected:ce,shadowRootClonable:ce,shadowRootDelegatesFocus:ce,shadowRootMode:null,shape:null,size:At,sizes:null,slot:null,span:At,spellCheck:vr,src:null,srcDoc:null,srcLang:null,srcSet:null,start:At,step:null,style:null,tabIndex:At,target:null,title:null,translate:null,type:null,typeMustMatch:ce,useMap:null,value:vr,width:At,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Pe,axis:null,background:null,bgColor:null,border:At,borderColor:null,bottomMargin:At,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ce,declare:ce,event:null,face:null,frame:null,frameBorder:null,hSpace:At,leftMargin:At,link:null,longDesc:null,lowSrc:null,marginHeight:At,marginWidth:At,noResize:ce,noHref:ce,noShade:ce,noWrap:ce,object:null,profile:null,prompt:null,rev:null,rightMargin:At,rules:null,scheme:null,scrolling:vr,standby:null,summary:null,text:null,topMargin:At,valueType:null,version:null,vAlign:null,vLink:null,vSpace:At,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ce,disableRemotePlayback:ce,prefix:null,property:null,results:At,security:null,unselectable:null},space:"html",transform:fF}),ZK=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",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:Ei,accentHeight:At,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:At,amplitude:At,arabicForm:null,ascent:At,attributeName:null,attributeType:null,azimuth:At,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:At,by:null,calcMode:null,capHeight:At,className:Pe,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:At,diffuseConstant:At,direction:null,display:null,dur:null,divisor:At,dominantBaseline:null,download:ce,dx:null,dy:null,edgeMode:null,editable:null,elevation:At,enableBackground:null,end:null,event:null,exponent:At,externalResourcesRequired:null,fill:null,fillOpacity:At,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:yl,g2:yl,glyphName:yl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:At,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:At,horizOriginX:At,horizOriginY:At,id:null,ideographic:At,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:At,k:At,k1:At,k2:At,k3:At,k4:At,kernelMatrix:Ei,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:At,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:At,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:At,overlineThickness:At,paintOrder:null,panose1:null,path:null,pathLength:At,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Pe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:At,pointsAtY:At,pointsAtZ:At,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ei,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ei,rev:Ei,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ei,requiredFeatures:Ei,requiredFonts:Ei,requiredFormats:Ei,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:At,specularExponent:At,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:At,strikethroughThickness:At,string:null,stroke:null,strokeDashArray:Ei,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:At,strokeOpacity:At,strokeWidth:null,style:null,surfaceScale:At,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ei,tabIndex:At,tableValues:null,target:null,targetX:At,targetY:At,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ei,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:At,underlineThickness:At,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:At,values:null,vAlphabetic:At,vMathematical:At,vectorEffect:null,vHanging:At,vIdeographic:At,version:null,vertAdvY:At,vertOriginX:At,vertOriginY:At,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:At,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:dF}),pF=ec({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}}),gF=ec({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:fF}),mF=ec({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),KK={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"},JK=/[A-Z]/g,l3=/-[a-z]/g,tJ=/^data[-\w.:]+$/i;function eJ(t,e){const r=HC(e);let i=e,n=yi;if(r in t.normal)return t.property[t.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&tJ.test(e)){if(e.charAt(4)==="-"){const s=e.slice(5).replace(l3,iJ);i="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=e.slice(4);if(!l3.test(s)){let o=s.replace(JK,rJ);o.charAt(0)!=="-"&&(o="-"+o),e="data"+o}}n=Tw}return new n(i,e)}function rJ(t){return"-"+t.toLowerCase()}function iJ(t){return t.charAt(1).toUpperCase()}const nJ=uF([hF,QK,pF,gF,mF],"html"),Ew=uF([hF,ZK,pF,gF,mF],"svg");function aJ(t){return t.join(" ").trim()}var Jo={},Qv,c3;function sJ(){if(c3)return Qv;c3=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,r=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,n=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,c=/^\s+|\s+$/g,u=`
278
+ `,h="/",d="*",p="",m="comment",g="declaration";function x(b,w){if(typeof b!="string")throw new TypeError("First argument must be a string");if(!b)return[];w=w||{};var T=1,k=1;function E(M){var I=M.match(e);I&&(T+=I.length);var N=M.lastIndexOf(u);k=~N?M.length-N:k+M.length}function L(){var M={line:T,column:k};return function(I){return I.position=new A(M),Y(),I}}function A(M){this.start=M,this.end={line:T,column:k},this.source=w.source}A.prototype.content=b;function R(M){var I=new Error(w.source+":"+T+":"+k+": "+M);if(I.reason=M,I.filename=w.source,I.line=T,I.column=k,I.source=b,!w.silent)throw I}function j(M){var I=M.exec(b);if(I){var N=I[0];return E(N),b=b.slice(N.length),I}}function Y(){j(r)}function V(M){var I;for(M=M||[];I=O();)I!==!1&&M.push(I);return M}function O(){var M=L();if(!(h!=b.charAt(0)||d!=b.charAt(1))){for(var I=2;p!=b.charAt(I)&&(d!=b.charAt(I)||h!=b.charAt(I+1));)++I;if(I+=2,p===b.charAt(I-1))return R("End of comment missing");var N=b.slice(2,I-2);return k+=2,E(N),b=b.slice(I),k+=2,M({type:m,comment:N})}}function z(){var M=L(),I=j(i);if(I){if(O(),!j(n))return R("property missing ':'");var N=j(s),P=M({type:g,property:v(I[0].replace(t,p)),value:N?v(N[0].replace(t,p)):p});return j(o),P}}function X(){var M=[];V(M);for(var I;I=z();)I!==!1&&(M.push(I),V(M));return M}return Y(),X()}function v(b){return b?b.replace(c,p):p}return Qv=x,Qv}var u3;function oJ(){if(u3)return Jo;u3=1;var t=Jo&&Jo.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Jo,"__esModule",{value:!0}),Jo.default=r;const e=t(sJ());function r(i,n){let s=null;if(!i||typeof i!="string")return s;const o=(0,e.default)(i),c=typeof n=="function";return o.forEach(u=>{if(u.type!=="declaration")return;const{property:h,value:d}=u;c?n(h,d,u):d&&(s=s||{},s[h]=d)}),s}return Jo}var tu={},h3;function lJ(){if(h3)return tu;h3=1,Object.defineProperty(tu,"__esModule",{value:!0}),tu.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,e=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,n=/^-(ms)-/,s=function(h){return!h||r.test(h)||t.test(h)},o=function(h,d){return d.toUpperCase()},c=function(h,d){return"".concat(d,"-")},u=function(h,d){return d===void 0&&(d={}),s(h)?h:(h=h.toLowerCase(),d.reactCompat?h=h.replace(n,c):h=h.replace(i,c),h.replace(e,o))};return tu.camelCase=u,tu}var eu,d3;function cJ(){if(d3)return eu;d3=1;var t=eu&&eu.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},e=t(oJ()),r=lJ();function i(n,s){var o={};return!n||typeof n!="string"||(0,e.default)(n,function(c,u){c&&u&&(o[(0,r.camelCase)(c,s)]=u)}),o}return i.default=i,eu=i,eu}var uJ=cJ();const hJ=Wl(uJ),yF=xF("end"),Aw=xF("start");function xF(t){return e;function e(r){const i=r&&r.position&&r.position[t]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function dJ(t){const e=Aw(t),r=yF(t);if(e&&r)return{start:e,end:r}}function Au(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?f3(t.position):"start"in t||"end"in t?f3(t):"line"in t||"column"in t?YC(t):""}function YC(t){return p3(t&&t.line)+":"+p3(t&&t.column)}function f3(t){return YC(t&&t.start)+"-"+YC(t&&t.end)}function p3(t){return t&&typeof t=="number"?t:1}class Ur extends Error{constructor(e,r,i){super(),typeof r=="string"&&(i=r,r=void 0);let n="",s={},o=!1;if(r&&("line"in r&&"column"in r?s={place:r}:"start"in r&&"end"in r?s={place:r}:"type"in r?s={ancestors:[r],place:r.position}:s={...r}),typeof e=="string"?n=e:!s.cause&&e&&(o=!0,n=e.message,s.cause=e),!s.ruleId&&!s.source&&typeof i=="string"){const u=i.indexOf(":");u===-1?s.ruleId=i:(s.source=i.slice(0,u),s.ruleId=i.slice(u+1))}if(!s.place&&s.ancestors&&s.ancestors){const u=s.ancestors[s.ancestors.length-1];u&&(s.place=u.position)}const c=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=n,this.line=c?c.line:void 0,this.name=Au(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=o&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ur.prototype.file="";Ur.prototype.name="";Ur.prototype.reason="";Ur.prototype.message="";Ur.prototype.stack="";Ur.prototype.column=void 0;Ur.prototype.line=void 0;Ur.prototype.ancestors=void 0;Ur.prototype.cause=void 0;Ur.prototype.fatal=void 0;Ur.prototype.place=void 0;Ur.prototype.ruleId=void 0;Ur.prototype.source=void 0;const Bw={}.hasOwnProperty,fJ=new Map,pJ=/[A-Z]/g,gJ=new Set(["table","tbody","thead","tfoot","tr"]),mJ=new Set(["td","th"]),bF="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function yJ(t,e){if(!e||e.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=e.filePath||void 0;let i;if(e.development){if(typeof e.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=_J(r,e.jsxDEV)}else{if(typeof e.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof e.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=kJ(r,e.jsx,e.jsxs)}const n={Fragment:e.Fragment,ancestors:[],components:e.components||{},create:i,elementAttributeNameCase:e.elementAttributeNameCase||"react",evaluater:e.createEvaluater?e.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:e.ignoreInvalidStyle||!1,passKeys:e.passKeys!==!1,passNode:e.passNode||!1,schema:e.space==="svg"?Ew:nJ,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},s=vF(n,t,void 0);return s&&typeof s!="string"?s:n.create(t,n.Fragment,{children:s||void 0},void 0)}function vF(t,e,r){if(e.type==="element")return xJ(t,e,r);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return bJ(t,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return CJ(t,e,r);if(e.type==="mdxjsEsm")return vJ(t,e);if(e.type==="root")return wJ(t,e,r);if(e.type==="text")return SJ(t,e)}function xJ(t,e,r){const i=t.schema;let n=i;e.tagName.toLowerCase()==="svg"&&i.space==="html"&&(n=Ew,t.schema=n),t.ancestors.push(e);const s=wF(t,e.tagName,!1),o=TJ(t,e);let c=Mw(t,e);return gJ.has(e.tagName)&&(c=c.filter(function(u){return typeof u=="string"?!WK(u):!0})),CF(t,o,s,e),Lw(o,c),t.ancestors.pop(),t.schema=i,t.create(e,s,o,r)}function bJ(t,e){if(e.data&&e.data.estree&&t.evaluater){const i=e.data.estree.body[0];return i.type,t.evaluater.evaluateExpression(i.expression)}Wu(t,e.position)}function vJ(t,e){if(e.data&&e.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(e.data.estree);Wu(t,e.position)}function CJ(t,e,r){const i=t.schema;let n=i;e.name==="svg"&&i.space==="html"&&(n=Ew,t.schema=n),t.ancestors.push(e);const s=e.name===null?t.Fragment:wF(t,e.name,!0),o=EJ(t,e),c=Mw(t,e);return CF(t,o,s,e),Lw(o,c),t.ancestors.pop(),t.schema=i,t.create(e,s,o,r)}function wJ(t,e,r){const i={};return Lw(i,Mw(t,e)),t.create(e,t.Fragment,i,r)}function SJ(t,e){return e.value}function CF(t,e,r,i){typeof r!="string"&&r!==t.Fragment&&t.passNode&&(e.node=i)}function Lw(t,e){if(e.length>0){const r=e.length>1?e:e[0];r&&(t.children=r)}}function kJ(t,e,r){return i;function i(n,s,o,c){const h=Array.isArray(o.children)?r:e;return c?h(s,o,c):h(s,o)}}function _J(t,e){return r;function r(i,n,s,o){const c=Array.isArray(s.children),u=Aw(i);return e(n,s,o,c,{columnNumber:u?u.column-1:void 0,fileName:t,lineNumber:u?u.line:void 0},void 0)}}function TJ(t,e){const r={};let i,n;for(n in e.properties)if(n!=="children"&&Bw.call(e.properties,n)){const s=AJ(t,n,e.properties[n]);if(s){const[o,c]=s;t.tableCellAlignToStyle&&o==="align"&&typeof c=="string"&&mJ.has(e.tagName)?i=c:r[o]=c}}if(i){const s=r.style||(r.style={});s[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return r}function EJ(t,e){const r={};for(const i of e.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&t.evaluater){const s=i.data.estree.body[0];s.type;const o=s.expression;o.type;const c=o.properties[0];c.type,Object.assign(r,t.evaluater.evaluateExpression(c.argument))}else Wu(t,e.position);else{const n=i.name;let s;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&t.evaluater){const c=i.value.data.estree.body[0];c.type,s=t.evaluater.evaluateExpression(c.expression)}else Wu(t,e.position);else s=i.value===null?!0:i.value;r[n]=s}return r}function Mw(t,e){const r=[];let i=-1;const n=t.passKeys?new Map:fJ;for(;++i<e.children.length;){const s=e.children[i];let o;if(t.passKeys){const u=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(u){const h=n.get(u)||0;o=u+"-"+h,n.set(u,h+1)}}const c=vF(t,s,o);c!==void 0&&r.push(c)}return r}function AJ(t,e,r){const i=eJ(t.schema,e);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=i.commaSeparated?HK(r):aJ(r)),i.property==="style"){let n=typeof r=="object"?r:BJ(t,String(r));return t.stylePropertyNameCase==="css"&&(n=LJ(n)),["style",n]}return[t.elementAttributeNameCase==="react"&&i.space?KK[i.property]||i.property:i.attribute,r]}}function BJ(t,e){try{return hJ(e,{reactCompat:!0})}catch(r){if(t.ignoreInvalidStyle)return{};const i=r,n=new Ur("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw n.file=t.filePath||void 0,n.url=bF+"#cannot-parse-style-attribute",n}}function wF(t,e,r){let i;if(!r)i={type:"Literal",value:e};else if(e.includes(".")){const n=e.split(".");let s=-1,o;for(;++s<n.length;){const c=a3(n[s])?{type:"Identifier",name:n[s]}:{type:"Literal",value:n[s]};o=o?{type:"MemberExpression",object:o,property:c,computed:!!(s&&c.type==="Literal"),optional:!1}:c}i=o}else i=a3(e)&&!/^[a-z]/.test(e)?{type:"Identifier",name:e}:{type:"Literal",value:e};if(i.type==="Literal"){const n=i.value;return Bw.call(t.components,n)?t.components[n]:n}if(t.evaluater)return t.evaluater.evaluateExpression(i);Wu(t)}function Wu(t,e){const r=new Ur("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:e,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=t.filePath||void 0,r.url=bF+"#cannot-handle-mdx-estrees-without-createevaluater",r}function LJ(t){const e={};let r;for(r in t)Bw.call(t,r)&&(e[MJ(r)]=t[r]);return e}function MJ(t){let e=t.replace(pJ,NJ);return e.slice(0,3)==="ms-"&&(e="-"+e),e}function NJ(t){return"-"+t.toLowerCase()}const Zv={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"]},OJ={};function RJ(t,e){const r=OJ,i=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,n=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return SF(t,i,n)}function SF(t,e,r){if(DJ(t)){if("value"in t)return t.type==="html"&&!r?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return g3(t.children,e,r)}return Array.isArray(t)?g3(t,e,r):""}function g3(t,e,r){const i=[];let n=-1;for(;++n<t.length;)i[n]=SF(t[n],e,r);return i.join("")}function DJ(t){return!!(t&&typeof t=="object")}const m3=document.createElement("i");function Nw(t){const e="&"+t+";";m3.innerHTML=e;const r=m3.textContent;return r.charCodeAt(r.length-1)===59&&t!=="semi"||r===e?!1:r}function Nn(t,e,r,i){const n=t.length;let s=0,o;if(e<0?e=-e>n?0:n+e:e=e>n?n:e,r=r>0?r:0,i.length<1e4)o=Array.from(i),o.unshift(e,r),t.splice(...o);else for(r&&t.splice(e,r);s<i.length;)o=i.slice(s,s+1e4),o.unshift(e,0),t.splice(...o),s+=1e4,e+=1e4}function Pi(t,e){return t.length>0?(Nn(t,t.length,0,e),t):e}const y3={}.hasOwnProperty;function FJ(t){const e={};let r=-1;for(;++r<t.length;)IJ(e,t[r]);return e}function IJ(t,e){let r;for(r in e){const n=(y3.call(t,r)?t[r]:void 0)||(t[r]={}),s=e[r];let o;if(s)for(o in s){y3.call(n,o)||(n[o]=[]);const c=s[o];qJ(n[o],Array.isArray(c)?c:c?[c]:[])}}}function qJ(t,e){let r=-1;const i=[];for(;++r<e.length;)(e[r].add==="after"?t:i).push(e[r]);Nn(t,0,0,i)}function kF(t,e){const r=Number.parseInt(t,e);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function xl(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Bn=us(/[A-Za-z]/),Ai=us(/[\dA-Za-z]/),zJ=us(/[#-'*+\--9=?A-Z^-~]/);function VC(t){return t!==null&&(t<32||t===127)}const WC=us(/\d/),jJ=us(/[\dA-Fa-f]/),$J=us(/[!-/:-@[-`{-~]/);function ie(t){return t!==null&&t<-2}function mi(t){return t!==null&&(t<0||t===32)}function Le(t){return t===-2||t===-1||t===32}const PJ=us(new RegExp("\\p{P}|\\p{S}","u")),HJ=us(/\s/);function us(t){return e;function e(r){return r!==null&&r>-1&&t.test(String.fromCharCode(r))}}function rc(t){const e=[];let r=-1,i=0,n=0;for(;++r<t.length;){const s=t.charCodeAt(r);let o="";if(s===37&&Ai(t.charCodeAt(r+1))&&Ai(t.charCodeAt(r+2)))n=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(o=String.fromCharCode(s));else if(s>55295&&s<57344){const c=t.charCodeAt(r+1);s<56320&&c>56319&&c<57344?(o=String.fromCharCode(s,c),n=1):o="�"}else o=String.fromCharCode(s);o&&(e.push(t.slice(i,r),encodeURIComponent(o)),i=r+n+1,o=""),n&&(r+=n,n=0)}return e.join("")+t.slice(i)}function He(t,e,r,i){const n=i?i-1:Number.POSITIVE_INFINITY;let s=0;return o;function o(u){return Le(u)?(t.enter(r),c(u)):e(u)}function c(u){return Le(u)&&s++<n?(t.consume(u),c):(t.exit(r),e(u))}}const UJ={tokenize:GJ};function GJ(t){const e=t.attempt(this.parser.constructs.contentInitial,i,n);let r;return e;function i(c){if(c===null){t.consume(c);return}return t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),He(t,e,"linePrefix")}function n(c){return t.enter("paragraph"),s(c)}function s(c){const u=t.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=u),r=u,o(c)}function o(c){if(c===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(c);return}return ie(c)?(t.consume(c),t.exit("chunkText"),s):(t.consume(c),o)}}const YJ={tokenize:VJ},x3={tokenize:WJ};function VJ(t){const e=this,r=[];let i=0,n,s,o;return c;function c(k){if(i<r.length){const E=r[i];return e.containerState=E[1],t.attempt(E[0].continuation,u,h)(k)}return h(k)}function u(k){if(i++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,n&&T();const E=e.events.length;let L=E,A;for(;L--;)if(e.events[L][0]==="exit"&&e.events[L][1].type==="chunkFlow"){A=e.events[L][1].end;break}w(i);let R=E;for(;R<e.events.length;)e.events[R][1].end={...A},R++;return Nn(e.events,L+1,0,e.events.slice(E)),e.events.length=R,h(k)}return c(k)}function h(k){if(i===r.length){if(!n)return m(k);if(n.currentConstruct&&n.currentConstruct.concrete)return x(k);e.interrupt=!!(n.currentConstruct&&!n._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(x3,d,p)(k)}function d(k){return n&&T(),w(i),m(k)}function p(k){return e.parser.lazy[e.now().line]=i!==r.length,o=e.now().offset,x(k)}function m(k){return e.containerState={},t.attempt(x3,g,x)(k)}function g(k){return i++,r.push([e.currentConstruct,e.containerState]),m(k)}function x(k){if(k===null){n&&T(),w(0),t.consume(k);return}return n=n||e.parser.flow(e.now()),t.enter("chunkFlow",{_tokenizer:n,contentType:"flow",previous:s}),v(k)}function v(k){if(k===null){b(t.exit("chunkFlow"),!0),w(0),t.consume(k);return}return ie(k)?(t.consume(k),b(t.exit("chunkFlow")),i=0,e.interrupt=void 0,c):(t.consume(k),v)}function b(k,E){const L=e.sliceStream(k);if(E&&L.push(null),k.previous=s,s&&(s.next=k),s=k,n.defineSkip(k.start),n.write(L),e.parser.lazy[k.start.line]){let A=n.events.length;for(;A--;)if(n.events[A][1].start.offset<o&&(!n.events[A][1].end||n.events[A][1].end.offset>o))return;const R=e.events.length;let j=R,Y,V;for(;j--;)if(e.events[j][0]==="exit"&&e.events[j][1].type==="chunkFlow"){if(Y){V=e.events[j][1].end;break}Y=!0}for(w(i),A=R;A<e.events.length;)e.events[A][1].end={...V},A++;Nn(e.events,j+1,0,e.events.slice(R)),e.events.length=A}}function w(k){let E=r.length;for(;E-- >k;){const L=r[E];e.containerState=L[1],L[0].exit.call(e,t)}r.length=k}function T(){n.write([null]),s=void 0,n=void 0,e.containerState._closeFlow=void 0}}function WJ(t,e,r){return He(t,t.attempt(this.parser.constructs.document,e,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function b3(t){if(t===null||mi(t)||HJ(t))return 1;if(PJ(t))return 2}function Ow(t,e,r){const i=[];let n=-1;for(;++n<t.length;){const s=t[n].resolveAll;s&&!i.includes(s)&&(e=s(e,r),i.push(s))}return e}const XC={name:"attention",resolveAll:XJ,tokenize:QJ};function XJ(t,e){let r=-1,i,n,s,o,c,u,h,d;for(;++r<t.length;)if(t[r][0]==="enter"&&t[r][1].type==="attentionSequence"&&t[r][1]._close){for(i=r;i--;)if(t[i][0]==="exit"&&t[i][1].type==="attentionSequence"&&t[i][1]._open&&e.sliceSerialize(t[i][1]).charCodeAt(0)===e.sliceSerialize(t[r][1]).charCodeAt(0)){if((t[i][1]._close||t[r][1]._open)&&(t[r][1].end.offset-t[r][1].start.offset)%3&&!((t[i][1].end.offset-t[i][1].start.offset+t[r][1].end.offset-t[r][1].start.offset)%3))continue;u=t[i][1].end.offset-t[i][1].start.offset>1&&t[r][1].end.offset-t[r][1].start.offset>1?2:1;const p={...t[i][1].end},m={...t[r][1].start};v3(p,-u),v3(m,u),o={type:u>1?"strongSequence":"emphasisSequence",start:p,end:{...t[i][1].end}},c={type:u>1?"strongSequence":"emphasisSequence",start:{...t[r][1].start},end:m},s={type:u>1?"strongText":"emphasisText",start:{...t[i][1].end},end:{...t[r][1].start}},n={type:u>1?"strong":"emphasis",start:{...o.start},end:{...c.end}},t[i][1].end={...o.start},t[r][1].start={...c.end},h=[],t[i][1].end.offset-t[i][1].start.offset&&(h=Pi(h,[["enter",t[i][1],e],["exit",t[i][1],e]])),h=Pi(h,[["enter",n,e],["enter",o,e],["exit",o,e],["enter",s,e]]),h=Pi(h,Ow(e.parser.constructs.insideSpan.null,t.slice(i+1,r),e)),h=Pi(h,[["exit",s,e],["enter",c,e],["exit",c,e],["exit",n,e]]),t[r][1].end.offset-t[r][1].start.offset?(d=2,h=Pi(h,[["enter",t[r][1],e],["exit",t[r][1],e]])):d=0,Nn(t,i-1,r-i+3,h),r=i+h.length-d-2;break}}for(r=-1;++r<t.length;)t[r][1].type==="attentionSequence"&&(t[r][1].type="data");return t}function QJ(t,e){const r=this.parser.constructs.attentionMarkers.null,i=this.previous,n=b3(i);let s;return o;function o(u){return s=u,t.enter("attentionSequence"),c(u)}function c(u){if(u===s)return t.consume(u),c;const h=t.exit("attentionSequence"),d=b3(u),p=!d||d===2&&n||r.includes(u),m=!n||n===2&&d||r.includes(i);return h._open=!!(s===42?p:p&&(n||!m)),h._close=!!(s===42?m:m&&(d||!p)),e(u)}}function v3(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}const ZJ={name:"autolink",tokenize:KJ};function KJ(t,e,r){let i=0;return n;function n(g){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(g),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),s}function s(g){return Bn(g)?(t.consume(g),o):g===64?r(g):h(g)}function o(g){return g===43||g===45||g===46||Ai(g)?(i=1,c(g)):h(g)}function c(g){return g===58?(t.consume(g),i=0,u):(g===43||g===45||g===46||Ai(g))&&i++<32?(t.consume(g),c):(i=0,h(g))}function u(g){return g===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(g),t.exit("autolinkMarker"),t.exit("autolink"),e):g===null||g===32||g===60||VC(g)?r(g):(t.consume(g),u)}function h(g){return g===64?(t.consume(g),d):zJ(g)?(t.consume(g),h):r(g)}function d(g){return Ai(g)?p(g):r(g)}function p(g){return g===46?(t.consume(g),i=0,d):g===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(g),t.exit("autolinkMarker"),t.exit("autolink"),e):m(g)}function m(g){if((g===45||Ai(g))&&i++<63){const x=g===45?m:p;return t.consume(g),x}return r(g)}}const Pp={partial:!0,tokenize:JJ};function JJ(t,e,r){return i;function i(s){return Le(s)?He(t,n,"linePrefix")(s):n(s)}function n(s){return s===null||ie(s)?e(s):r(s)}}const _F={continuation:{tokenize:ett},exit:rtt,name:"blockQuote",tokenize:ttt};function ttt(t,e,r){const i=this;return n;function n(o){if(o===62){const c=i.containerState;return c.open||(t.enter("blockQuote",{_container:!0}),c.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(o),t.exit("blockQuoteMarker"),s}return r(o)}function s(o){return Le(o)?(t.enter("blockQuotePrefixWhitespace"),t.consume(o),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(o))}}function ett(t,e,r){const i=this;return n;function n(o){return Le(o)?He(t,s,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):s(o)}function s(o){return t.attempt(_F,e,r)(o)}}function rtt(t){t.exit("blockQuote")}const TF={name:"characterEscape",tokenize:itt};function itt(t,e,r){return i;function i(s){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(s),t.exit("escapeMarker"),n}function n(s){return $J(s)?(t.enter("characterEscapeValue"),t.consume(s),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):r(s)}}const EF={name:"characterReference",tokenize:ntt};function ntt(t,e,r){const i=this;let n=0,s,o;return c;function c(p){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(p),t.exit("characterReferenceMarker"),u}function u(p){return p===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(p),t.exit("characterReferenceMarkerNumeric"),h):(t.enter("characterReferenceValue"),s=31,o=Ai,d(p))}function h(p){return p===88||p===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(p),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),s=6,o=jJ,d):(t.enter("characterReferenceValue"),s=7,o=WC,d(p))}function d(p){if(p===59&&n){const m=t.exit("characterReferenceValue");return o===Ai&&!Nw(i.sliceSerialize(m))?r(p):(t.enter("characterReferenceMarker"),t.consume(p),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return o(p)&&n++<s?(t.consume(p),d):r(p)}}const C3={partial:!0,tokenize:stt},w3={concrete:!0,name:"codeFenced",tokenize:att};function att(t,e,r){const i=this,n={partial:!0,tokenize:L};let s=0,o=0,c;return u;function u(A){return h(A)}function h(A){const R=i.events[i.events.length-1];return s=R&&R[1].type==="linePrefix"?R[2].sliceSerialize(R[1],!0).length:0,c=A,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),d(A)}function d(A){return A===c?(o++,t.consume(A),d):o<3?r(A):(t.exit("codeFencedFenceSequence"),Le(A)?He(t,p,"whitespace")(A):p(A))}function p(A){return A===null||ie(A)?(t.exit("codeFencedFence"),i.interrupt?e(A):t.check(C3,v,E)(A)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),m(A))}function m(A){return A===null||ie(A)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),p(A)):Le(A)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),He(t,g,"whitespace")(A)):A===96&&A===c?r(A):(t.consume(A),m)}function g(A){return A===null||ie(A)?p(A):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),x(A))}function x(A){return A===null||ie(A)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),p(A)):A===96&&A===c?r(A):(t.consume(A),x)}function v(A){return t.attempt(n,E,b)(A)}function b(A){return t.enter("lineEnding"),t.consume(A),t.exit("lineEnding"),w}function w(A){return s>0&&Le(A)?He(t,T,"linePrefix",s+1)(A):T(A)}function T(A){return A===null||ie(A)?t.check(C3,v,E)(A):(t.enter("codeFlowValue"),k(A))}function k(A){return A===null||ie(A)?(t.exit("codeFlowValue"),T(A)):(t.consume(A),k)}function E(A){return t.exit("codeFenced"),e(A)}function L(A,R,j){let Y=0;return V;function V(I){return A.enter("lineEnding"),A.consume(I),A.exit("lineEnding"),O}function O(I){return A.enter("codeFencedFence"),Le(I)?He(A,z,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):z(I)}function z(I){return I===c?(A.enter("codeFencedFenceSequence"),X(I)):j(I)}function X(I){return I===c?(Y++,A.consume(I),X):Y>=o?(A.exit("codeFencedFenceSequence"),Le(I)?He(A,M,"whitespace")(I):M(I)):j(I)}function M(I){return I===null||ie(I)?(A.exit("codeFencedFence"),R(I)):j(I)}}}function stt(t,e,r){const i=this;return n;function n(o){return o===null?r(o):(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),s)}function s(o){return i.parser.lazy[i.now().line]?r(o):e(o)}}const Kv={name:"codeIndented",tokenize:ltt},ott={partial:!0,tokenize:ctt};function ltt(t,e,r){const i=this;return n;function n(h){return t.enter("codeIndented"),He(t,s,"linePrefix",5)(h)}function s(h){const d=i.events[i.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?o(h):r(h)}function o(h){return h===null?u(h):ie(h)?t.attempt(ott,o,u)(h):(t.enter("codeFlowValue"),c(h))}function c(h){return h===null||ie(h)?(t.exit("codeFlowValue"),o(h)):(t.consume(h),c)}function u(h){return t.exit("codeIndented"),e(h)}}function ctt(t,e,r){const i=this;return n;function n(o){return i.parser.lazy[i.now().line]?r(o):ie(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),n):He(t,s,"linePrefix",5)(o)}function s(o){const c=i.events[i.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?e(o):ie(o)?n(o):r(o)}}const utt={name:"codeText",previous:dtt,resolve:htt,tokenize:ftt};function htt(t){let e=t.length-4,r=3,i,n;if((t[r][1].type==="lineEnding"||t[r][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(i=r;++i<e;)if(t[i][1].type==="codeTextData"){t[r][1].type="codeTextPadding",t[e][1].type="codeTextPadding",r+=2,e-=2;break}}for(i=r-1,e++;++i<=e;)n===void 0?i!==e&&t[i][1].type!=="lineEnding"&&(n=i):(i===e||t[i][1].type==="lineEnding")&&(t[n][1].type="codeTextData",i!==n+2&&(t[n][1].end=t[i-1][1].end,t.splice(n+2,i-n-2),e-=i-n-2,i=n+2),n=void 0);return t}function dtt(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function ftt(t,e,r){let i=0,n,s;return o;function o(p){return t.enter("codeText"),t.enter("codeTextSequence"),c(p)}function c(p){return p===96?(t.consume(p),i++,c):(t.exit("codeTextSequence"),u(p))}function u(p){return p===null?r(p):p===32?(t.enter("space"),t.consume(p),t.exit("space"),u):p===96?(s=t.enter("codeTextSequence"),n=0,d(p)):ie(p)?(t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),u):(t.enter("codeTextData"),h(p))}function h(p){return p===null||p===32||p===96||ie(p)?(t.exit("codeTextData"),u(p)):(t.consume(p),h)}function d(p){return p===96?(t.consume(p),n++,d):n===i?(t.exit("codeTextSequence"),t.exit("codeText"),e(p)):(s.type="codeTextData",h(p))}}class ptt{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new 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,r){const i=r??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(e,i):e>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(e,r,i){const n=r||0;this.setCursor(Math.trunc(e));const s=this.right.splice(this.right.length-n,Number.POSITIVE_INFINITY);return i&&ru(this.left,i),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),ru(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),ru(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){const r=this.left.splice(e,Number.POSITIVE_INFINITY);ru(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);ru(this.left,r.reverse())}}}function ru(t,e){let r=0;if(e.length<1e4)t.push(...e);else for(;r<e.length;)t.push(...e.slice(r,r+1e4)),r+=1e4}function AF(t){const e={};let r=-1,i,n,s,o,c,u,h;const d=new ptt(t);for(;++r<d.length;){for(;r in e;)r=e[r];if(i=d.get(r),r&&i[1].type==="chunkFlow"&&d.get(r-1)[1].type==="listItemPrefix"&&(u=i[1]._tokenizer.events,s=0,s<u.length&&u[s][1].type==="lineEndingBlank"&&(s+=2),s<u.length&&u[s][1].type==="content"))for(;++s<u.length&&u[s][1].type!=="content";)u[s][1].type==="chunkText"&&(u[s][1]._isInFirstContentOfListItem=!0,s++);if(i[0]==="enter")i[1].contentType&&(Object.assign(e,gtt(d,r)),r=e[r],h=!0);else if(i[1]._container){for(s=r,n=void 0;s--;)if(o=d.get(s),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(n&&(d.get(n)[1].type="lineEndingBlank"),o[1].type="lineEnding",n=s);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;n&&(i[1].end={...d.get(n)[1].start},c=d.slice(n,r),c.unshift(i),d.splice(n,r-n+1,c))}}return Nn(t,0,Number.POSITIVE_INFINITY,d.slice(0)),!h}function gtt(t,e){const r=t.get(e)[1],i=t.get(e)[2];let n=e-1;const s=[];let o=r._tokenizer;o||(o=i.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const c=o.events,u=[],h={};let d,p,m=-1,g=r,x=0,v=0;const b=[v];for(;g;){for(;t.get(++n)[1]!==g;);s.push(n),g._tokenizer||(d=i.sliceStream(g),g.next||d.push(null),p&&o.defineSkip(g.start),g._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(d),g._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),p=g,g=g.next}for(g=r;++m<c.length;)c[m][0]==="exit"&&c[m-1][0]==="enter"&&c[m][1].type===c[m-1][1].type&&c[m][1].start.line!==c[m][1].end.line&&(v=m+1,b.push(v),g._tokenizer=void 0,g.previous=void 0,g=g.next);for(o.events=[],g?(g._tokenizer=void 0,g.previous=void 0):b.pop(),m=b.length;m--;){const w=c.slice(b[m],b[m+1]),T=s.pop();u.push([T,T+w.length-1]),t.splice(T,2,w)}for(u.reverse(),m=-1;++m<u.length;)h[x+u[m][0]]=x+u[m][1],x+=u[m][1]-u[m][0]-1;return h}const mtt={resolve:xtt,tokenize:btt},ytt={partial:!0,tokenize:vtt};function xtt(t){return AF(t),t}function btt(t,e){let r;return i;function i(c){return t.enter("content"),r=t.enter("chunkContent",{contentType:"content"}),n(c)}function n(c){return c===null?s(c):ie(c)?t.check(ytt,o,s)(c):(t.consume(c),n)}function s(c){return t.exit("chunkContent"),t.exit("content"),e(c)}function o(c){return t.consume(c),t.exit("chunkContent"),r.next=t.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,n}}function vtt(t,e,r){const i=this;return n;function n(o){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),He(t,s,"linePrefix")}function s(o){if(o===null||ie(o))return r(o);const c=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?e(o):t.interrupt(i.parser.constructs.flow,r,e)(o)}}function BF(t,e,r,i,n,s,o,c,u){const h=u||Number.POSITIVE_INFINITY;let d=0;return p;function p(w){return w===60?(t.enter(i),t.enter(n),t.enter(s),t.consume(w),t.exit(s),m):w===null||w===32||w===41||VC(w)?r(w):(t.enter(i),t.enter(o),t.enter(c),t.enter("chunkString",{contentType:"string"}),v(w))}function m(w){return w===62?(t.enter(s),t.consume(w),t.exit(s),t.exit(n),t.exit(i),e):(t.enter(c),t.enter("chunkString",{contentType:"string"}),g(w))}function g(w){return w===62?(t.exit("chunkString"),t.exit(c),m(w)):w===null||w===60||ie(w)?r(w):(t.consume(w),w===92?x:g)}function x(w){return w===60||w===62||w===92?(t.consume(w),g):g(w)}function v(w){return!d&&(w===null||w===41||mi(w))?(t.exit("chunkString"),t.exit(c),t.exit(o),t.exit(i),e(w)):d<h&&w===40?(t.consume(w),d++,v):w===41?(t.consume(w),d--,v):w===null||w===32||w===40||VC(w)?r(w):(t.consume(w),w===92?b:v)}function b(w){return w===40||w===41||w===92?(t.consume(w),v):v(w)}}function LF(t,e,r,i,n,s){const o=this;let c=0,u;return h;function h(g){return t.enter(i),t.enter(n),t.consume(g),t.exit(n),t.enter(s),d}function d(g){return c>999||g===null||g===91||g===93&&!u||g===94&&!c&&"_hiddenFootnoteSupport"in o.parser.constructs?r(g):g===93?(t.exit(s),t.enter(n),t.consume(g),t.exit(n),t.exit(i),e):ie(g)?(t.enter("lineEnding"),t.consume(g),t.exit("lineEnding"),d):(t.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===null||g===91||g===93||ie(g)||c++>999?(t.exit("chunkString"),d(g)):(t.consume(g),u||(u=!Le(g)),g===92?m:p)}function m(g){return g===91||g===92||g===93?(t.consume(g),c++,p):p(g)}}function MF(t,e,r,i,n,s){let o;return c;function c(m){return m===34||m===39||m===40?(t.enter(i),t.enter(n),t.consume(m),t.exit(n),o=m===40?41:m,u):r(m)}function u(m){return m===o?(t.enter(n),t.consume(m),t.exit(n),t.exit(i),e):(t.enter(s),h(m))}function h(m){return m===o?(t.exit(s),u(o)):m===null?r(m):ie(m)?(t.enter("lineEnding"),t.consume(m),t.exit("lineEnding"),He(t,h,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===o||m===null||ie(m)?(t.exit("chunkString"),h(m)):(t.consume(m),m===92?p:d)}function p(m){return m===o||m===92?(t.consume(m),d):d(m)}}function Bu(t,e){let r;return i;function i(n){return ie(n)?(t.enter("lineEnding"),t.consume(n),t.exit("lineEnding"),r=!0,i):Le(n)?He(t,i,r?"linePrefix":"lineSuffix")(n):e(n)}}const Ctt={name:"definition",tokenize:Stt},wtt={partial:!0,tokenize:ktt};function Stt(t,e,r){const i=this;let n;return s;function s(g){return t.enter("definition"),o(g)}function o(g){return LF.call(i,t,c,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function c(g){return n=xl(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),g===58?(t.enter("definitionMarker"),t.consume(g),t.exit("definitionMarker"),u):r(g)}function u(g){return mi(g)?Bu(t,h)(g):h(g)}function h(g){return BF(t,d,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function d(g){return t.attempt(wtt,p,p)(g)}function p(g){return Le(g)?He(t,m,"whitespace")(g):m(g)}function m(g){return g===null||ie(g)?(t.exit("definition"),i.parser.defined.push(n),e(g)):r(g)}}function ktt(t,e,r){return i;function i(c){return mi(c)?Bu(t,n)(c):r(c)}function n(c){return MF(t,s,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function s(c){return Le(c)?He(t,o,"whitespace")(c):o(c)}function o(c){return c===null||ie(c)?e(c):r(c)}}const _tt={name:"hardBreakEscape",tokenize:Ttt};function Ttt(t,e,r){return i;function i(s){return t.enter("hardBreakEscape"),t.consume(s),n}function n(s){return ie(s)?(t.exit("hardBreakEscape"),e(s)):r(s)}}const Ett={name:"headingAtx",resolve:Att,tokenize:Btt};function Att(t,e){let r=t.length-2,i=3,n,s;return t[i][1].type==="whitespace"&&(i+=2),r-2>i&&t[r][1].type==="whitespace"&&(r-=2),t[r][1].type==="atxHeadingSequence"&&(i===r-1||r-4>i&&t[r-2][1].type==="whitespace")&&(r-=i+1===r?2:4),r>i&&(n={type:"atxHeadingText",start:t[i][1].start,end:t[r][1].end},s={type:"chunkText",start:t[i][1].start,end:t[r][1].end,contentType:"text"},Nn(t,i,r-i+1,[["enter",n,e],["enter",s,e],["exit",s,e],["exit",n,e]])),t}function Btt(t,e,r){let i=0;return n;function n(d){return t.enter("atxHeading"),s(d)}function s(d){return t.enter("atxHeadingSequence"),o(d)}function o(d){return d===35&&i++<6?(t.consume(d),o):d===null||mi(d)?(t.exit("atxHeadingSequence"),c(d)):r(d)}function c(d){return d===35?(t.enter("atxHeadingSequence"),u(d)):d===null||ie(d)?(t.exit("atxHeading"),e(d)):Le(d)?He(t,c,"whitespace")(d):(t.enter("atxHeadingText"),h(d))}function u(d){return d===35?(t.consume(d),u):(t.exit("atxHeadingSequence"),c(d))}function h(d){return d===null||d===35||mi(d)?(t.exit("atxHeadingText"),c(d)):(t.consume(d),h)}}const Ltt=["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"],S3=["pre","script","style","textarea"],Mtt={concrete:!0,name:"htmlFlow",resolveTo:Rtt,tokenize:Dtt},Ntt={partial:!0,tokenize:Itt},Ott={partial:!0,tokenize:Ftt};function Rtt(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function Dtt(t,e,r){const i=this;let n,s,o,c,u;return h;function h(H){return d(H)}function d(H){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(H),p}function p(H){return H===33?(t.consume(H),m):H===47?(t.consume(H),s=!0,v):H===63?(t.consume(H),n=3,i.interrupt?e:q):Bn(H)?(t.consume(H),o=String.fromCharCode(H),b):r(H)}function m(H){return H===45?(t.consume(H),n=2,g):H===91?(t.consume(H),n=5,c=0,x):Bn(H)?(t.consume(H),n=4,i.interrupt?e:q):r(H)}function g(H){return H===45?(t.consume(H),i.interrupt?e:q):r(H)}function x(H){const Q="CDATA[";return H===Q.charCodeAt(c++)?(t.consume(H),c===Q.length?i.interrupt?e:z:x):r(H)}function v(H){return Bn(H)?(t.consume(H),o=String.fromCharCode(H),b):r(H)}function b(H){if(H===null||H===47||H===62||mi(H)){const Q=H===47,J=o.toLowerCase();return!Q&&!s&&S3.includes(J)?(n=1,i.interrupt?e(H):z(H)):Ltt.includes(o.toLowerCase())?(n=6,Q?(t.consume(H),w):i.interrupt?e(H):z(H)):(n=7,i.interrupt&&!i.parser.lazy[i.now().line]?r(H):s?T(H):k(H))}return H===45||Ai(H)?(t.consume(H),o+=String.fromCharCode(H),b):r(H)}function w(H){return H===62?(t.consume(H),i.interrupt?e:z):r(H)}function T(H){return Le(H)?(t.consume(H),T):V(H)}function k(H){return H===47?(t.consume(H),V):H===58||H===95||Bn(H)?(t.consume(H),E):Le(H)?(t.consume(H),k):V(H)}function E(H){return H===45||H===46||H===58||H===95||Ai(H)?(t.consume(H),E):L(H)}function L(H){return H===61?(t.consume(H),A):Le(H)?(t.consume(H),L):k(H)}function A(H){return H===null||H===60||H===61||H===62||H===96?r(H):H===34||H===39?(t.consume(H),u=H,R):Le(H)?(t.consume(H),A):j(H)}function R(H){return H===u?(t.consume(H),u=null,Y):H===null||ie(H)?r(H):(t.consume(H),R)}function j(H){return H===null||H===34||H===39||H===47||H===60||H===61||H===62||H===96||mi(H)?L(H):(t.consume(H),j)}function Y(H){return H===47||H===62||Le(H)?k(H):r(H)}function V(H){return H===62?(t.consume(H),O):r(H)}function O(H){return H===null||ie(H)?z(H):Le(H)?(t.consume(H),O):r(H)}function z(H){return H===45&&n===2?(t.consume(H),N):H===60&&n===1?(t.consume(H),P):H===62&&n===4?(t.consume(H),G):H===63&&n===3?(t.consume(H),q):H===93&&n===5?(t.consume(H),D):ie(H)&&(n===6||n===7)?(t.exit("htmlFlowData"),t.check(Ntt,Z,X)(H)):H===null||ie(H)?(t.exit("htmlFlowData"),X(H)):(t.consume(H),z)}function X(H){return t.check(Ott,M,Z)(H)}function M(H){return t.enter("lineEnding"),t.consume(H),t.exit("lineEnding"),I}function I(H){return H===null||ie(H)?X(H):(t.enter("htmlFlowData"),z(H))}function N(H){return H===45?(t.consume(H),q):z(H)}function P(H){return H===47?(t.consume(H),o="",$):z(H)}function $(H){if(H===62){const Q=o.toLowerCase();return S3.includes(Q)?(t.consume(H),G):z(H)}return Bn(H)&&o.length<8?(t.consume(H),o+=String.fromCharCode(H),$):z(H)}function D(H){return H===93?(t.consume(H),q):z(H)}function q(H){return H===62?(t.consume(H),G):H===45&&n===2?(t.consume(H),q):z(H)}function G(H){return H===null||ie(H)?(t.exit("htmlFlowData"),Z(H)):(t.consume(H),G)}function Z(H){return t.exit("htmlFlow"),e(H)}}function Ftt(t,e,r){const i=this;return n;function n(o){return ie(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),s):r(o)}function s(o){return i.parser.lazy[i.now().line]?r(o):e(o)}}function Itt(t,e,r){return i;function i(n){return t.enter("lineEnding"),t.consume(n),t.exit("lineEnding"),t.attempt(Pp,e,r)}}const qtt={name:"htmlText",tokenize:ztt};function ztt(t,e,r){const i=this;let n,s,o;return c;function c(q){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(q),u}function u(q){return q===33?(t.consume(q),h):q===47?(t.consume(q),L):q===63?(t.consume(q),k):Bn(q)?(t.consume(q),j):r(q)}function h(q){return q===45?(t.consume(q),d):q===91?(t.consume(q),s=0,x):Bn(q)?(t.consume(q),T):r(q)}function d(q){return q===45?(t.consume(q),g):r(q)}function p(q){return q===null?r(q):q===45?(t.consume(q),m):ie(q)?(o=p,P(q)):(t.consume(q),p)}function m(q){return q===45?(t.consume(q),g):p(q)}function g(q){return q===62?N(q):q===45?m(q):p(q)}function x(q){const G="CDATA[";return q===G.charCodeAt(s++)?(t.consume(q),s===G.length?v:x):r(q)}function v(q){return q===null?r(q):q===93?(t.consume(q),b):ie(q)?(o=v,P(q)):(t.consume(q),v)}function b(q){return q===93?(t.consume(q),w):v(q)}function w(q){return q===62?N(q):q===93?(t.consume(q),w):v(q)}function T(q){return q===null||q===62?N(q):ie(q)?(o=T,P(q)):(t.consume(q),T)}function k(q){return q===null?r(q):q===63?(t.consume(q),E):ie(q)?(o=k,P(q)):(t.consume(q),k)}function E(q){return q===62?N(q):k(q)}function L(q){return Bn(q)?(t.consume(q),A):r(q)}function A(q){return q===45||Ai(q)?(t.consume(q),A):R(q)}function R(q){return ie(q)?(o=R,P(q)):Le(q)?(t.consume(q),R):N(q)}function j(q){return q===45||Ai(q)?(t.consume(q),j):q===47||q===62||mi(q)?Y(q):r(q)}function Y(q){return q===47?(t.consume(q),N):q===58||q===95||Bn(q)?(t.consume(q),V):ie(q)?(o=Y,P(q)):Le(q)?(t.consume(q),Y):N(q)}function V(q){return q===45||q===46||q===58||q===95||Ai(q)?(t.consume(q),V):O(q)}function O(q){return q===61?(t.consume(q),z):ie(q)?(o=O,P(q)):Le(q)?(t.consume(q),O):Y(q)}function z(q){return q===null||q===60||q===61||q===62||q===96?r(q):q===34||q===39?(t.consume(q),n=q,X):ie(q)?(o=z,P(q)):Le(q)?(t.consume(q),z):(t.consume(q),M)}function X(q){return q===n?(t.consume(q),n=void 0,I):q===null?r(q):ie(q)?(o=X,P(q)):(t.consume(q),X)}function M(q){return q===null||q===34||q===39||q===60||q===61||q===96?r(q):q===47||q===62||mi(q)?Y(q):(t.consume(q),M)}function I(q){return q===47||q===62||mi(q)?Y(q):r(q)}function N(q){return q===62?(t.consume(q),t.exit("htmlTextData"),t.exit("htmlText"),e):r(q)}function P(q){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(q),t.exit("lineEnding"),$}function $(q){return Le(q)?He(t,D,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(q):D(q)}function D(q){return t.enter("htmlTextData"),o(q)}}const Rw={name:"labelEnd",resolveAll:Htt,resolveTo:Utt,tokenize:Gtt},jtt={tokenize:Ytt},$tt={tokenize:Vtt},Ptt={tokenize:Wtt};function Htt(t){let e=-1;const r=[];for(;++e<t.length;){const i=t[e][1];if(r.push(t[e]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const n=i.type==="labelImage"?4:2;i.type="data",e+=n}}return t.length!==r.length&&Nn(t,0,t.length,r),t}function Utt(t,e){let r=t.length,i=0,n,s,o,c;for(;r--;)if(n=t[r][1],s){if(n.type==="link"||n.type==="labelLink"&&n._inactive)break;t[r][0]==="enter"&&n.type==="labelLink"&&(n._inactive=!0)}else if(o){if(t[r][0]==="enter"&&(n.type==="labelImage"||n.type==="labelLink")&&!n._balanced&&(s=r,n.type!=="labelLink")){i=2;break}}else n.type==="labelEnd"&&(o=r);const u={type:t[s][1].type==="labelLink"?"link":"image",start:{...t[s][1].start},end:{...t[t.length-1][1].end}},h={type:"label",start:{...t[s][1].start},end:{...t[o][1].end}},d={type:"labelText",start:{...t[s+i+2][1].end},end:{...t[o-2][1].start}};return c=[["enter",u,e],["enter",h,e]],c=Pi(c,t.slice(s+1,s+i+3)),c=Pi(c,[["enter",d,e]]),c=Pi(c,Ow(e.parser.constructs.insideSpan.null,t.slice(s+i+4,o-3),e)),c=Pi(c,[["exit",d,e],t[o-2],t[o-1],["exit",h,e]]),c=Pi(c,t.slice(o+1)),c=Pi(c,[["exit",u,e]]),Nn(t,s,t.length,c),t}function Gtt(t,e,r){const i=this;let n=i.events.length,s,o;for(;n--;)if((i.events[n][1].type==="labelImage"||i.events[n][1].type==="labelLink")&&!i.events[n][1]._balanced){s=i.events[n][1];break}return c;function c(m){return s?s._inactive?p(m):(o=i.parser.defined.includes(xl(i.sliceSerialize({start:s.end,end:i.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(m),t.exit("labelMarker"),t.exit("labelEnd"),u):r(m)}function u(m){return m===40?t.attempt(jtt,d,o?d:p)(m):m===91?t.attempt($tt,d,o?h:p)(m):o?d(m):p(m)}function h(m){return t.attempt(Ptt,d,p)(m)}function d(m){return e(m)}function p(m){return s._balanced=!0,r(m)}}function Ytt(t,e,r){return i;function i(p){return t.enter("resource"),t.enter("resourceMarker"),t.consume(p),t.exit("resourceMarker"),n}function n(p){return mi(p)?Bu(t,s)(p):s(p)}function s(p){return p===41?d(p):BF(t,o,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function o(p){return mi(p)?Bu(t,u)(p):d(p)}function c(p){return r(p)}function u(p){return p===34||p===39||p===40?MF(t,h,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):d(p)}function h(p){return mi(p)?Bu(t,d)(p):d(p)}function d(p){return p===41?(t.enter("resourceMarker"),t.consume(p),t.exit("resourceMarker"),t.exit("resource"),e):r(p)}}function Vtt(t,e,r){const i=this;return n;function n(c){return LF.call(i,t,s,o,"reference","referenceMarker","referenceString")(c)}function s(c){return i.parser.defined.includes(xl(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?e(c):r(c)}function o(c){return r(c)}}function Wtt(t,e,r){return i;function i(s){return t.enter("reference"),t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),n}function n(s){return s===93?(t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),t.exit("reference"),e):r(s)}}const Xtt={name:"labelStartImage",resolveAll:Rw.resolveAll,tokenize:Qtt};function Qtt(t,e,r){const i=this;return n;function n(c){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(c),t.exit("labelImageMarker"),s}function s(c){return c===91?(t.enter("labelMarker"),t.consume(c),t.exit("labelMarker"),t.exit("labelImage"),o):r(c)}function o(c){return c===94&&"_hiddenFootnoteSupport"in i.parser.constructs?r(c):e(c)}}const Ztt={name:"labelStartLink",resolveAll:Rw.resolveAll,tokenize:Ktt};function Ktt(t,e,r){const i=this;return n;function n(o){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(o),t.exit("labelMarker"),t.exit("labelLink"),s}function s(o){return o===94&&"_hiddenFootnoteSupport"in i.parser.constructs?r(o):e(o)}}const Jv={name:"lineEnding",tokenize:Jtt};function Jtt(t,e){return r;function r(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),He(t,e,"linePrefix")}}const pf={name:"thematicBreak",tokenize:tet};function tet(t,e,r){let i=0,n;return s;function s(h){return t.enter("thematicBreak"),o(h)}function o(h){return n=h,c(h)}function c(h){return h===n?(t.enter("thematicBreakSequence"),u(h)):i>=3&&(h===null||ie(h))?(t.exit("thematicBreak"),e(h)):r(h)}function u(h){return h===n?(t.consume(h),i++,u):(t.exit("thematicBreakSequence"),Le(h)?He(t,c,"whitespace")(h):c(h))}}const ui={continuation:{tokenize:net},exit:set,name:"list",tokenize:iet},eet={partial:!0,tokenize:oet},ret={partial:!0,tokenize:aet};function iet(t,e,r){const i=this,n=i.events[i.events.length-1];let s=n&&n[1].type==="linePrefix"?n[2].sliceSerialize(n[1],!0).length:0,o=0;return c;function c(g){const x=i.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!i.containerState.marker||g===i.containerState.marker:WC(g)){if(i.containerState.type||(i.containerState.type=x,t.enter(x,{_container:!0})),x==="listUnordered")return t.enter("listItemPrefix"),g===42||g===45?t.check(pf,r,h)(g):h(g);if(!i.interrupt||g===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),u(g)}return r(g)}function u(g){return WC(g)&&++o<10?(t.consume(g),u):(!i.interrupt||o<2)&&(i.containerState.marker?g===i.containerState.marker:g===41||g===46)?(t.exit("listItemValue"),h(g)):r(g)}function h(g){return t.enter("listItemMarker"),t.consume(g),t.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||g,t.check(Pp,i.interrupt?r:d,t.attempt(eet,m,p))}function d(g){return i.containerState.initialBlankLine=!0,s++,m(g)}function p(g){return Le(g)?(t.enter("listItemPrefixWhitespace"),t.consume(g),t.exit("listItemPrefixWhitespace"),m):r(g)}function m(g){return i.containerState.size=s+i.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(g)}}function net(t,e,r){const i=this;return i.containerState._closeFlow=void 0,t.check(Pp,n,s);function n(c){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,He(t,e,"listItemIndent",i.containerState.size+1)(c)}function s(c){return i.containerState.furtherBlankLines||!Le(c)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,o(c)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,t.attempt(ret,e,o)(c))}function o(c){return i.containerState._closeFlow=!0,i.interrupt=void 0,He(t,t.attempt(ui,e,r),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function aet(t,e,r){const i=this;return He(t,n,"listItemIndent",i.containerState.size+1);function n(s){const o=i.events[i.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===i.containerState.size?e(s):r(s)}}function set(t){t.exit(this.containerState.type)}function oet(t,e,r){const i=this;return He(t,n,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function n(s){const o=i.events[i.events.length-1];return!Le(s)&&o&&o[1].type==="listItemPrefixWhitespace"?e(s):r(s)}}const k3={name:"setextUnderline",resolveTo:cet,tokenize:uet};function cet(t,e){let r=t.length,i,n,s;for(;r--;)if(t[r][0]==="enter"){if(t[r][1].type==="content"){i=r;break}t[r][1].type==="paragraph"&&(n=r)}else t[r][1].type==="content"&&t.splice(r,1),!s&&t[r][1].type==="definition"&&(s=r);const o={type:"setextHeading",start:{...t[i][1].start},end:{...t[t.length-1][1].end}};return t[n][1].type="setextHeadingText",s?(t.splice(n,0,["enter",o,e]),t.splice(s+1,0,["exit",t[i][1],e]),t[i][1].end={...t[s][1].end}):t[i][1]=o,t.push(["exit",o,e]),t}function uet(t,e,r){const i=this;let n;return s;function s(h){let d=i.events.length,p;for(;d--;)if(i.events[d][1].type!=="lineEnding"&&i.events[d][1].type!=="linePrefix"&&i.events[d][1].type!=="content"){p=i.events[d][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||p)?(t.enter("setextHeadingLine"),n=h,o(h)):r(h)}function o(h){return t.enter("setextHeadingLineSequence"),c(h)}function c(h){return h===n?(t.consume(h),c):(t.exit("setextHeadingLineSequence"),Le(h)?He(t,u,"lineSuffix")(h):u(h))}function u(h){return h===null||ie(h)?(t.exit("setextHeadingLine"),e(h)):r(h)}}const het={tokenize:det};function det(t){const e=this,r=t.attempt(Pp,i,t.attempt(this.parser.constructs.flowInitial,n,He(t,t.attempt(this.parser.constructs.flow,n,t.attempt(mtt,n)),"linePrefix")));return r;function i(s){if(s===null){t.consume(s);return}return t.enter("lineEndingBlank"),t.consume(s),t.exit("lineEndingBlank"),e.currentConstruct=void 0,r}function n(s){if(s===null){t.consume(s);return}return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),e.currentConstruct=void 0,r}}const fet={resolveAll:OF()},pet=NF("string"),get=NF("text");function NF(t){return{resolveAll:OF(t==="text"?met:void 0),tokenize:e};function e(r){const i=this,n=this.parser.constructs[t],s=r.attempt(n,o,c);return o;function o(d){return h(d)?s(d):c(d)}function c(d){if(d===null){r.consume(d);return}return r.enter("data"),r.consume(d),u}function u(d){return h(d)?(r.exit("data"),s(d)):(r.consume(d),u)}function h(d){if(d===null)return!0;const p=n[d];let m=-1;if(p)for(;++m<p.length;){const g=p[m];if(!g.previous||g.previous.call(i,i.previous))return!0}return!1}}}function OF(t){return e;function e(r,i){let n=-1,s;for(;++n<=r.length;)s===void 0?r[n]&&r[n][1].type==="data"&&(s=n,n++):(!r[n]||r[n][1].type!=="data")&&(n!==s+2&&(r[s][1].end=r[n-1][1].end,r.splice(s+2,n-s-2),n=s+2),s=void 0);return t?t(r,i):r}}function met(t,e){let r=0;for(;++r<=t.length;)if((r===t.length||t[r][1].type==="lineEnding")&&t[r-1][1].type==="data"){const i=t[r-1][1],n=e.sliceStream(i);let s=n.length,o=-1,c=0,u;for(;s--;){const h=n[s];if(typeof h=="string"){for(o=h.length;h.charCodeAt(o-1)===32;)c++,o--;if(o)break;o=-1}else if(h===-2)u=!0,c++;else if(h!==-1){s++;break}}if(e._contentTypeTextTrailing&&r===t.length&&(c=0),c){const h={type:r===t.length||u||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?o:i.start._bufferIndex+o,_index:i.start._index+s,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...h.start},i.start.offset===i.end.offset?Object.assign(i,h):(t.splice(r,0,["enter",h,e],["exit",h,e]),r+=2)}r++}return t}const yet={42:ui,43:ui,45:ui,48:ui,49:ui,50:ui,51:ui,52:ui,53:ui,54:ui,55:ui,56:ui,57:ui,62:_F},xet={91:Ctt},bet={[-2]:Kv,[-1]:Kv,32:Kv},vet={35:Ett,42:pf,45:[k3,pf],60:Mtt,61:k3,95:pf,96:w3,126:w3},Cet={38:EF,92:TF},wet={[-5]:Jv,[-4]:Jv,[-3]:Jv,33:Xtt,38:EF,42:XC,60:[ZJ,qtt],91:Ztt,92:[_tt,TF],93:Rw,95:XC,96:utt},ket={null:[XC,fet]},_et={null:[42,95]},Tet={null:[]},Eet=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:_et,contentInitial:xet,disable:Tet,document:yet,flow:vet,flowInitial:bet,insideSpan:ket,string:Cet,text:wet},Symbol.toStringTag,{value:"Module"}));function Aet(t,e,r){let i={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const n={},s=[];let o=[],c=[];const u={attempt:R(L),check:R(A),consume:T,enter:k,exit:E,interrupt:R(A,{interrupt:!0})},h={code:null,containerState:{},defineSkip:v,events:[],now:x,parser:t,previous:null,sliceSerialize:m,sliceStream:g,write:p};let d=e.tokenize.call(h,u);return e.resolveAll&&s.push(e),h;function p(O){return o=Pi(o,O),b(),o[o.length-1]!==null?[]:(j(e,0),h.events=Ow(s,h.events,h),h.events)}function m(O,z){return Let(g(O),z)}function g(O){return Bet(o,O)}function x(){const{_bufferIndex:O,_index:z,line:X,column:M,offset:I}=i;return{_bufferIndex:O,_index:z,line:X,column:M,offset:I}}function v(O){n[O.line]=O.column,V()}function b(){let O;for(;i._index<o.length;){const z=o[i._index];if(typeof z=="string")for(O=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===O&&i._bufferIndex<z.length;)w(z.charCodeAt(i._bufferIndex));else w(z)}}function w(O){d=d(O)}function T(O){ie(O)?(i.line++,i.column=1,i.offset+=O===-3?2:1,V()):O!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===o[i._index].length&&(i._bufferIndex=-1,i._index++)),h.previous=O}function k(O,z){const X=z||{};return X.type=O,X.start=x(),h.events.push(["enter",X,h]),c.push(X),X}function E(O){const z=c.pop();return z.end=x(),h.events.push(["exit",z,h]),z}function L(O,z){j(O,z.from)}function A(O,z){z.restore()}function R(O,z){return X;function X(M,I,N){let P,$,D,q;return Array.isArray(M)?Z(M):"tokenize"in M?Z([M]):G(M);function G(et){return at;function at(lt){const xt=lt!==null&&et[lt],mt=lt!==null&&et.null,bt=[...Array.isArray(xt)?xt:xt?[xt]:[],...Array.isArray(mt)?mt:mt?[mt]:[]];return Z(bt)(lt)}}function Z(et){return P=et,$=0,et.length===0?N:H(et[$])}function H(et){return at;function at(lt){return q=Y(),D=et,et.partial||(h.currentConstruct=et),et.name&&h.parser.constructs.disable.null.includes(et.name)?J():et.tokenize.call(z?Object.assign(Object.create(h),z):h,u,Q,J)(lt)}}function Q(et){return O(D,q),I}function J(et){return q.restore(),++$<P.length?H(P[$]):N}}}function j(O,z){O.resolveAll&&!s.includes(O)&&s.push(O),O.resolve&&Nn(h.events,z,h.events.length-z,O.resolve(h.events.slice(z),h)),O.resolveTo&&(h.events=O.resolveTo(h.events,h))}function Y(){const O=x(),z=h.previous,X=h.currentConstruct,M=h.events.length,I=Array.from(c);return{from:M,restore:N};function N(){i=O,h.previous=z,h.currentConstruct=X,h.events.length=M,c=I,V()}}function V(){i.line in n&&i.column<2&&(i.column=n[i.line],i.offset+=n[i.line]-1)}}function Bet(t,e){const r=e.start._index,i=e.start._bufferIndex,n=e.end._index,s=e.end._bufferIndex;let o;if(r===n)o=[t[r].slice(i,s)];else{if(o=t.slice(r,n),i>-1){const c=o[0];typeof c=="string"?o[0]=c.slice(i):o.shift()}s>0&&o.push(t[n].slice(0,s))}return o}function Let(t,e){let r=-1;const i=[];let n;for(;++r<t.length;){const s=t[r];let o;if(typeof s=="string")o=s;else switch(s){case-5:{o="\r";break}case-4:{o=`
279
+ `;break}case-3:{o=`\r
280
+ `;break}case-2:{o=e?" ":" ";break}case-1:{if(!e&&n)continue;o=" ";break}default:o=String.fromCharCode(s)}n=s===-2,i.push(o)}return i.join("")}function Met(t){const i={constructs:FJ([Eet,...(t||{}).extensions||[]]),content:n(UJ),defined:[],document:n(YJ),flow:n(het),lazy:{},string:n(pet),text:n(get)};return i;function n(s){return o;function o(c){return Aet(i,s,c)}}}function Net(t){for(;!AF(t););return t}const _3=/[\0\t\n\r]/g;function Oet(){let t=1,e="",r=!0,i;return n;function n(s,o,c){const u=[];let h,d,p,m,g;for(s=e+(typeof s=="string"?s.toString():new TextDecoder(o||void 0).decode(s)),p=0,e="",r&&(s.charCodeAt(0)===65279&&p++,r=void 0);p<s.length;){if(_3.lastIndex=p,h=_3.exec(s),m=h&&h.index!==void 0?h.index:s.length,g=s.charCodeAt(m),!h){e=s.slice(p);break}if(g===10&&p===m&&i)u.push(-3),i=void 0;else switch(i&&(u.push(-5),i=void 0),p<m&&(u.push(s.slice(p,m)),t+=m-p),g){case 0:{u.push(65533),t++;break}case 9:{for(d=Math.ceil(t/4)*4,u.push(-2);t++<d;)u.push(-1);break}case 10:{u.push(-4),t=1;break}default:i=!0,t=1}p=m+1}return c&&(i&&u.push(-5),e&&u.push(e),u.push(null)),u}}const Ret=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Det(t){return t.replace(Ret,Fet)}function Fet(t,e,r){if(e)return e;if(r.charCodeAt(0)===35){const n=r.charCodeAt(1),s=n===120||n===88;return kF(r.slice(s?2:1),s?16:10)}return Nw(r)||t}const RF={}.hasOwnProperty;function Iet(t,e,r){return e&&typeof e=="object"&&(r=e,e=void 0),qet(r)(Net(Met(r).document().write(Oet()(t,e,!0))))}function qet(t){const e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Ee),autolinkProtocol:Y,autolinkEmail:Y,atxHeading:s(Et),blockQuote:s(mt),characterEscape:Y,characterReference:Y,codeFenced:s(bt),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:s(bt,o),codeText:s(Tt,o),codeTextData:Y,data:Y,codeFlowValue:Y,definition:s(_t),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:s(Mt),hardBreakEscape:s(Yt),hardBreakTrailing:s(Yt),htmlFlow:s(zt,o),htmlFlowData:Y,htmlText:s(zt,o),htmlTextData:Y,image:s(ve),label:o,link:s(Ee),listItem:s(ar),listItemValue:m,listOrdered:s(Ve,p),listUnordered:s(Ve),paragraph:s(We),reference:H,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:s(Et),strong:s(Me),thematicBreak:s(sr)},exit:{atxHeading:u(),atxHeadingSequence:L,autolink:u(),autolinkEmail:xt,autolinkProtocol:lt,blockQuote:u(),characterEscapeValue:V,characterReferenceMarkerHexadecimal:J,characterReferenceMarkerNumeric:J,characterReferenceValue:et,characterReference:at,codeFenced:u(b),codeFencedFence:v,codeFencedFenceInfo:g,codeFencedFenceMeta:x,codeFlowValue:V,codeIndented:u(w),codeText:u(I),codeTextData:V,data:V,definition:u(),definitionDestinationString:E,definitionLabelString:T,definitionTitleString:k,emphasis:u(),hardBreakEscape:u(z),hardBreakTrailing:u(z),htmlFlow:u(X),htmlFlowData:V,htmlText:u(M),htmlTextData:V,image:u(P),label:D,labelText:$,lineEnding:O,link:u(N),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:Q,resourceDestinationString:q,resourceTitleString:G,resource:Z,setextHeading:u(j),setextHeadingLineSequence:R,setextHeadingText:A,strong:u(),thematicBreak:u()}};DF(e,(t||{}).mdastExtensions||[]);const r={};return i;function i(gt){let kt={type:"root",children:[]};const Dt={stack:[kt],tokenStack:[],config:e,enter:c,exit:h,buffer:o,resume:d,data:r},ee=[];let ae=-1;for(;++ae<gt.length;)if(gt[ae][1].type==="listOrdered"||gt[ae][1].type==="listUnordered")if(gt[ae][0]==="enter")ee.push(ae);else{const Xe=ee.pop();ae=n(gt,Xe,ae)}for(ae=-1;++ae<gt.length;){const Xe=e[gt[ae][0]];RF.call(Xe,gt[ae][1].type)&&Xe[gt[ae][1].type].call(Object.assign({sliceSerialize:gt[ae][2].sliceSerialize},Dt),gt[ae][1])}if(Dt.tokenStack.length>0){const Xe=Dt.tokenStack[Dt.tokenStack.length-1];(Xe[1]||T3).call(Dt,void 0,Xe[0])}for(kt.position={start:Xa(gt.length>0?gt[0][1].start:{line:1,column:1,offset:0}),end:Xa(gt.length>0?gt[gt.length-2][1].end:{line:1,column:1,offset:0})},ae=-1;++ae<e.transforms.length;)kt=e.transforms[ae](kt)||kt;return kt}function n(gt,kt,Dt){let ee=kt-1,ae=-1,Xe=!1,K,Lt,Ht,Bt;for(;++ee<=Dt;){const Nt=gt[ee];switch(Nt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Nt[0]==="enter"?ae++:ae--,Bt=void 0;break}case"lineEndingBlank":{Nt[0]==="enter"&&(K&&!Bt&&!ae&&!Ht&&(Ht=ee),Bt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Bt=void 0}if(!ae&&Nt[0]==="enter"&&Nt[1].type==="listItemPrefix"||ae===-1&&Nt[0]==="exit"&&(Nt[1].type==="listUnordered"||Nt[1].type==="listOrdered")){if(K){let Ce=ee;for(Lt=void 0;Ce--;){const je=gt[Ce];if(je[1].type==="lineEnding"||je[1].type==="lineEndingBlank"){if(je[0]==="exit")continue;Lt&&(gt[Lt][1].type="lineEndingBlank",Xe=!0),je[1].type="lineEnding",Lt=Ce}else if(!(je[1].type==="linePrefix"||je[1].type==="blockQuotePrefix"||je[1].type==="blockQuotePrefixWhitespace"||je[1].type==="blockQuoteMarker"||je[1].type==="listItemIndent"))break}Ht&&(!Lt||Ht<Lt)&&(K._spread=!0),K.end=Object.assign({},Lt?gt[Lt][1].start:Nt[1].end),gt.splice(Lt||ee,0,["exit",K,Nt[2]]),ee++,Dt++}if(Nt[1].type==="listItemPrefix"){const Ce={type:"listItem",_spread:!1,start:Object.assign({},Nt[1].start),end:void 0};K=Ce,gt.splice(ee,0,["enter",Ce,Nt[2]]),ee++,Dt++,Ht=void 0,Bt=!0}}}return gt[kt][1]._spread=Xe,Dt}function s(gt,kt){return Dt;function Dt(ee){c.call(this,gt(ee),ee),kt&&kt.call(this,ee)}}function o(){this.stack.push({type:"fragment",children:[]})}function c(gt,kt,Dt){this.stack[this.stack.length-1].children.push(gt),this.stack.push(gt),this.tokenStack.push([kt,Dt||void 0]),gt.position={start:Xa(kt.start),end:void 0}}function u(gt){return kt;function kt(Dt){gt&&gt.call(this,Dt),h.call(this,Dt)}}function h(gt,kt){const Dt=this.stack.pop(),ee=this.tokenStack.pop();if(ee)ee[0].type!==gt.type&&(kt?kt.call(this,gt,ee[0]):(ee[1]||T3).call(this,gt,ee[0]));else throw new Error("Cannot close `"+gt.type+"` ("+Au({start:gt.start,end:gt.end})+"): it’s not open");Dt.position.end=Xa(gt.end)}function d(){return RJ(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function m(gt){if(this.data.expectingFirstListItemValue){const kt=this.stack[this.stack.length-2];kt.start=Number.parseInt(this.sliceSerialize(gt),10),this.data.expectingFirstListItemValue=void 0}}function g(){const gt=this.resume(),kt=this.stack[this.stack.length-1];kt.lang=gt}function x(){const gt=this.resume(),kt=this.stack[this.stack.length-1];kt.meta=gt}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const gt=this.resume(),kt=this.stack[this.stack.length-1];kt.value=gt.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function w(){const gt=this.resume(),kt=this.stack[this.stack.length-1];kt.value=gt.replace(/(\r?\n|\r)$/g,"")}function T(gt){const kt=this.resume(),Dt=this.stack[this.stack.length-1];Dt.label=kt,Dt.identifier=xl(this.sliceSerialize(gt)).toLowerCase()}function k(){const gt=this.resume(),kt=this.stack[this.stack.length-1];kt.title=gt}function E(){const gt=this.resume(),kt=this.stack[this.stack.length-1];kt.url=gt}function L(gt){const kt=this.stack[this.stack.length-1];if(!kt.depth){const Dt=this.sliceSerialize(gt).length;kt.depth=Dt}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function R(gt){const kt=this.stack[this.stack.length-1];kt.depth=this.sliceSerialize(gt).codePointAt(0)===61?1:2}function j(){this.data.setextHeadingSlurpLineEnding=void 0}function Y(gt){const Dt=this.stack[this.stack.length-1].children;let ee=Dt[Dt.length-1];(!ee||ee.type!=="text")&&(ee=Ae(),ee.position={start:Xa(gt.start),end:void 0},Dt.push(ee)),this.stack.push(ee)}function V(gt){const kt=this.stack.pop();kt.value+=this.sliceSerialize(gt),kt.position.end=Xa(gt.end)}function O(gt){const kt=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Dt=kt.children[kt.children.length-1];Dt.position.end=Xa(gt.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(kt.type)&&(Y.call(this,gt),V.call(this,gt))}function z(){this.data.atHardBreak=!0}function X(){const gt=this.resume(),kt=this.stack[this.stack.length-1];kt.value=gt}function M(){const gt=this.resume(),kt=this.stack[this.stack.length-1];kt.value=gt}function I(){const gt=this.resume(),kt=this.stack[this.stack.length-1];kt.value=gt}function N(){const gt=this.stack[this.stack.length-1];if(this.data.inReference){const kt=this.data.referenceType||"shortcut";gt.type+="Reference",gt.referenceType=kt,delete gt.url,delete gt.title}else delete gt.identifier,delete gt.label;this.data.referenceType=void 0}function P(){const gt=this.stack[this.stack.length-1];if(this.data.inReference){const kt=this.data.referenceType||"shortcut";gt.type+="Reference",gt.referenceType=kt,delete gt.url,delete gt.title}else delete gt.identifier,delete gt.label;this.data.referenceType=void 0}function $(gt){const kt=this.sliceSerialize(gt),Dt=this.stack[this.stack.length-2];Dt.label=Det(kt),Dt.identifier=xl(kt).toLowerCase()}function D(){const gt=this.stack[this.stack.length-1],kt=this.resume(),Dt=this.stack[this.stack.length-1];if(this.data.inReference=!0,Dt.type==="link"){const ee=gt.children;Dt.children=ee}else Dt.alt=kt}function q(){const gt=this.resume(),kt=this.stack[this.stack.length-1];kt.url=gt}function G(){const gt=this.resume(),kt=this.stack[this.stack.length-1];kt.title=gt}function Z(){this.data.inReference=void 0}function H(){this.data.referenceType="collapsed"}function Q(gt){const kt=this.resume(),Dt=this.stack[this.stack.length-1];Dt.label=kt,Dt.identifier=xl(this.sliceSerialize(gt)).toLowerCase(),this.data.referenceType="full"}function J(gt){this.data.characterReferenceType=gt.type}function et(gt){const kt=this.sliceSerialize(gt),Dt=this.data.characterReferenceType;let ee;Dt?(ee=kF(kt,Dt==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ee=Nw(kt);const ae=this.stack[this.stack.length-1];ae.value+=ee}function at(gt){const kt=this.stack.pop();kt.position.end=Xa(gt.end)}function lt(gt){V.call(this,gt);const kt=this.stack[this.stack.length-1];kt.url=this.sliceSerialize(gt)}function xt(gt){V.call(this,gt);const kt=this.stack[this.stack.length-1];kt.url="mailto:"+this.sliceSerialize(gt)}function mt(){return{type:"blockquote",children:[]}}function bt(){return{type:"code",lang:null,meta:null,value:""}}function Tt(){return{type:"inlineCode",value:""}}function _t(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Mt(){return{type:"emphasis",children:[]}}function Et(){return{type:"heading",depth:0,children:[]}}function Yt(){return{type:"break"}}function zt(){return{type:"html",value:""}}function ve(){return{type:"image",title:null,url:"",alt:null}}function Ee(){return{type:"link",title:null,url:"",children:[]}}function Ve(gt){return{type:"list",ordered:gt.type==="listOrdered",start:null,spread:gt._spread,children:[]}}function ar(gt){return{type:"listItem",spread:gt._spread,checked:null,children:[]}}function We(){return{type:"paragraph",children:[]}}function Me(){return{type:"strong",children:[]}}function Ae(){return{type:"text",value:""}}function sr(){return{type:"thematicBreak"}}}function Xa(t){return{line:t.line,column:t.column,offset:t.offset}}function DF(t,e){let r=-1;for(;++r<e.length;){const i=e[r];Array.isArray(i)?DF(t,i):zet(t,i)}}function zet(t,e){let r;for(r in e)if(RF.call(e,r))switch(r){case"canContainEols":{const i=e[r];i&&t[r].push(...i);break}case"transforms":{const i=e[r];i&&t[r].push(...i);break}case"enter":case"exit":{const i=e[r];i&&Object.assign(t[r],i);break}}}function T3(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+Au({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+Au({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+Au({start:e.start,end:e.end})+") is still open")}function jet(t){const e=this;e.parser=r;function r(i){return Iet(i,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}function $et(t,e){const r={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(e),!0)};return t.patch(e,r),t.applyData(e,r)}function Pet(t,e){const r={type:"element",tagName:"br",properties:{},children:[]};return t.patch(e,r),[t.applyData(e,r),{type:"text",value:`
281
+ `}]}function Het(t,e){const r=e.value?e.value+`
282
+ `:"",i={},n=e.lang?e.lang.split(/\s+/):[];n.length>0&&(i.className=["language-"+n[0]]);let s={type:"element",tagName:"code",properties:i,children:[{type:"text",value:r}]};return e.meta&&(s.data={meta:e.meta}),t.patch(e,s),s=t.applyData(e,s),s={type:"element",tagName:"pre",properties:{},children:[s]},t.patch(e,s),s}function Uet(t,e){const r={type:"element",tagName:"del",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function Get(t,e){const r={type:"element",tagName:"em",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function Yet(t,e){const r=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",i=String(e.identifier).toUpperCase(),n=rc(i.toLowerCase()),s=t.footnoteOrder.indexOf(i);let o,c=t.footnoteCounts.get(i);c===void 0?(c=0,t.footnoteOrder.push(i),o=t.footnoteOrder.length):o=s+1,c+=1,t.footnoteCounts.set(i,c);const u={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+n,id:r+"fnref-"+n+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};t.patch(e,u);const h={type:"element",tagName:"sup",properties:{},children:[u]};return t.patch(e,h),t.applyData(e,h)}function Vet(t,e){const r={type:"element",tagName:"h"+e.depth,properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function Wet(t,e){if(t.options.allowDangerousHtml){const r={type:"raw",value:e.value};return t.patch(e,r),t.applyData(e,r)}}function FF(t,e){const r=e.referenceType;let i="]";if(r==="collapsed"?i+="[]":r==="full"&&(i+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+i}];const n=t.all(e),s=n[0];s&&s.type==="text"?s.value="["+s.value:n.unshift({type:"text",value:"["});const o=n[n.length-1];return o&&o.type==="text"?o.value+=i:n.push({type:"text",value:i}),n}function Xet(t,e){const r=String(e.identifier).toUpperCase(),i=t.definitionById.get(r);if(!i)return FF(t,e);const n={src:rc(i.url||""),alt:e.alt};i.title!==null&&i.title!==void 0&&(n.title=i.title);const s={type:"element",tagName:"img",properties:n,children:[]};return t.patch(e,s),t.applyData(e,s)}function Qet(t,e){const r={src:rc(e.url)};e.alt!==null&&e.alt!==void 0&&(r.alt=e.alt),e.title!==null&&e.title!==void 0&&(r.title=e.title);const i={type:"element",tagName:"img",properties:r,children:[]};return t.patch(e,i),t.applyData(e,i)}function Zet(t,e){const r={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};t.patch(e,r);const i={type:"element",tagName:"code",properties:{},children:[r]};return t.patch(e,i),t.applyData(e,i)}function Ket(t,e){const r=String(e.identifier).toUpperCase(),i=t.definitionById.get(r);if(!i)return FF(t,e);const n={href:rc(i.url||"")};i.title!==null&&i.title!==void 0&&(n.title=i.title);const s={type:"element",tagName:"a",properties:n,children:t.all(e)};return t.patch(e,s),t.applyData(e,s)}function Jet(t,e){const r={href:rc(e.url)};e.title!==null&&e.title!==void 0&&(r.title=e.title);const i={type:"element",tagName:"a",properties:r,children:t.all(e)};return t.patch(e,i),t.applyData(e,i)}function trt(t,e,r){const i=t.all(e),n=r?ert(r):IF(e),s={},o=[];if(typeof e.checked=="boolean"){const d=i[0];let p;d&&d.type==="element"&&d.tagName==="p"?p=d:(p={type:"element",tagName:"p",properties:{},children:[]},i.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let c=-1;for(;++c<i.length;){const d=i[c];(n||c!==0||d.type!=="element"||d.tagName!=="p")&&o.push({type:"text",value:`
283
+ `}),d.type==="element"&&d.tagName==="p"&&!n?o.push(...d.children):o.push(d)}const u=i[i.length-1];u&&(n||u.type!=="element"||u.tagName!=="p")&&o.push({type:"text",value:`
284
+ `});const h={type:"element",tagName:"li",properties:s,children:o};return t.patch(e,h),t.applyData(e,h)}function ert(t){let e=!1;if(t.type==="list"){e=t.spread||!1;const r=t.children;let i=-1;for(;!e&&++i<r.length;)e=IF(r[i])}return e}function IF(t){const e=t.spread;return e??t.children.length>1}function rrt(t,e){const r={},i=t.all(e);let n=-1;for(typeof e.start=="number"&&e.start!==1&&(r.start=e.start);++n<i.length;){const o=i[n];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const s={type:"element",tagName:e.ordered?"ol":"ul",properties:r,children:t.wrap(i,!0)};return t.patch(e,s),t.applyData(e,s)}function irt(t,e){const r={type:"element",tagName:"p",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function nrt(t,e){const r={type:"root",children:t.wrap(t.all(e))};return t.patch(e,r),t.applyData(e,r)}function art(t,e){const r={type:"element",tagName:"strong",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function srt(t,e){const r=t.all(e),i=r.shift(),n=[];if(i){const o={type:"element",tagName:"thead",properties:{},children:t.wrap([i],!0)};t.patch(e.children[0],o),n.push(o)}if(r.length>0){const o={type:"element",tagName:"tbody",properties:{},children:t.wrap(r,!0)},c=Aw(e.children[1]),u=yF(e.children[e.children.length-1]);c&&u&&(o.position={start:c,end:u}),n.push(o)}const s={type:"element",tagName:"table",properties:{},children:t.wrap(n,!0)};return t.patch(e,s),t.applyData(e,s)}function ort(t,e,r){const i=r?r.children:void 0,s=(i?i.indexOf(e):1)===0?"th":"td",o=r&&r.type==="table"?r.align:void 0,c=o?o.length:e.children.length;let u=-1;const h=[];for(;++u<c;){const p=e.children[u],m={},g=o?o[u]:void 0;g&&(m.align=g);let x={type:"element",tagName:s,properties:m,children:[]};p&&(x.children=t.all(p),t.patch(p,x),x=t.applyData(p,x)),h.push(x)}const d={type:"element",tagName:"tr",properties:{},children:t.wrap(h,!0)};return t.patch(e,d),t.applyData(e,d)}function lrt(t,e){const r={type:"element",tagName:"td",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}const E3=9,A3=32;function crt(t){const e=String(t),r=/\r?\n|\r/g;let i=r.exec(e),n=0;const s=[];for(;i;)s.push(B3(e.slice(n,i.index),n>0,!0),i[0]),n=i.index+i[0].length,i=r.exec(e);return s.push(B3(e.slice(n),n>0,!1)),s.join("")}function B3(t,e,r){let i=0,n=t.length;if(e){let s=t.codePointAt(i);for(;s===E3||s===A3;)i++,s=t.codePointAt(i)}if(r){let s=t.codePointAt(n-1);for(;s===E3||s===A3;)n--,s=t.codePointAt(n-1)}return n>i?t.slice(i,n):""}function urt(t,e){const r={type:"text",value:crt(String(e.value))};return t.patch(e,r),t.applyData(e,r)}function hrt(t,e){const r={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,r),t.applyData(e,r)}const drt={blockquote:$et,break:Pet,code:Het,delete:Uet,emphasis:Get,footnoteReference:Yet,heading:Vet,html:Wet,imageReference:Xet,image:Qet,inlineCode:Zet,linkReference:Ket,link:Jet,listItem:trt,list:rrt,paragraph:irt,root:nrt,strong:art,table:srt,tableCell:lrt,tableRow:ort,text:urt,thematicBreak:hrt,toml:Vd,yaml:Vd,definition:Vd,footnoteDefinition:Vd};function Vd(){}const qF=-1,Hp=0,Lu=1,zf=2,Dw=3,Fw=4,Iw=5,qw=6,zF=7,jF=8,frt=typeof self=="object"?self:globalThis,L3=(t,e)=>{switch(t){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+t)}return new frt[t](e)},prt=(t,e)=>{const r=(n,s)=>(t.set(s,n),n),i=n=>{if(t.has(n))return t.get(n);const[s,o]=e[n];switch(s){case Hp:case qF:return r(o,n);case Lu:{const c=r([],n);for(const u of o)c.push(i(u));return c}case zf:{const c=r({},n);for(const[u,h]of o)c[i(u)]=i(h);return c}case Dw:return r(new Date(o),n);case Fw:{const{source:c,flags:u}=o;return r(new RegExp(c,u),n)}case Iw:{const c=r(new Map,n);for(const[u,h]of o)c.set(i(u),i(h));return c}case qw:{const c=r(new Set,n);for(const u of o)c.add(i(u));return c}case zF:{const{name:c,message:u}=o;return r(L3(c,u),n)}case jF:return r(BigInt(o),n);case"BigInt":return r(Object(BigInt(o)),n);case"ArrayBuffer":return r(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:c}=new Uint8Array(o);return r(new DataView(c),o)}}return r(L3(s,o),n)};return i},M3=t=>prt(new Map,t)(0),tl="",{toString:grt}={},{keys:mrt}=Object,iu=t=>{const e=typeof t;if(e!=="object"||!t)return[Hp,e];const r=grt.call(t).slice(8,-1);switch(r){case"Array":return[Lu,tl];case"Object":return[zf,tl];case"Date":return[Dw,tl];case"RegExp":return[Fw,tl];case"Map":return[Iw,tl];case"Set":return[qw,tl];case"DataView":return[Lu,r]}return r.includes("Array")?[Lu,r]:r.includes("Error")?[zF,r]:[zf,r]},Wd=([t,e])=>t===Hp&&(e==="function"||e==="symbol"),yrt=(t,e,r,i)=>{const n=(o,c)=>{const u=i.push(o)-1;return r.set(c,u),u},s=o=>{if(r.has(o))return r.get(o);let[c,u]=iu(o);switch(c){case Hp:{let d=o;switch(u){case"bigint":c=jF,d=o.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+u);d=null;break;case"undefined":return n([qF],o)}return n([c,d],o)}case Lu:{if(u){let m=o;return u==="DataView"?m=new Uint8Array(o.buffer):u==="ArrayBuffer"&&(m=new Uint8Array(o)),n([u,[...m]],o)}const d=[],p=n([c,d],o);for(const m of o)d.push(s(m));return p}case zf:{if(u)switch(u){case"BigInt":return n([u,o.toString()],o);case"Boolean":case"Number":case"String":return n([u,o.valueOf()],o)}if(e&&"toJSON"in o)return s(o.toJSON());const d=[],p=n([c,d],o);for(const m of mrt(o))(t||!Wd(iu(o[m])))&&d.push([s(m),s(o[m])]);return p}case Dw:return n([c,o.toISOString()],o);case Fw:{const{source:d,flags:p}=o;return n([c,{source:d,flags:p}],o)}case Iw:{const d=[],p=n([c,d],o);for(const[m,g]of o)(t||!(Wd(iu(m))||Wd(iu(g))))&&d.push([s(m),s(g)]);return p}case qw:{const d=[],p=n([c,d],o);for(const m of o)(t||!Wd(iu(m)))&&d.push(s(m));return p}}const{message:h}=o;return n([c,{name:u,message:h}],o)};return s},N3=(t,{json:e,lossy:r}={})=>{const i=[];return yrt(!(e||r),!!e,new Map,i)(t),i},jf=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?M3(N3(t,e)):structuredClone(t):(t,e)=>M3(N3(t,e));function xrt(t,e){const r=[{type:"text",value:"↩"}];return e>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),r}function brt(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}function vrt(t){const e=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=t.options.footnoteBackContent||xrt,i=t.options.footnoteBackLabel||brt,n=t.options.footnoteLabel||"Footnotes",s=t.options.footnoteLabelTagName||"h2",o=t.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let u=-1;for(;++u<t.footnoteOrder.length;){const h=t.footnoteById.get(t.footnoteOrder[u]);if(!h)continue;const d=t.all(h),p=String(h.identifier).toUpperCase(),m=rc(p.toLowerCase());let g=0;const x=[],v=t.footnoteCounts.get(p);for(;v!==void 0&&++g<=v;){x.length>0&&x.push({type:"text",value:" "});let T=typeof r=="string"?r:r(u,g);typeof T=="string"&&(T={type:"text",value:T}),x.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+m+(g>1?"-"+g:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(u,g),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}const b=d[d.length-1];if(b&&b.type==="element"&&b.tagName==="p"){const T=b.children[b.children.length-1];T&&T.type==="text"?T.value+=" ":b.children.push({type:"text",value:" "}),b.children.push(...x)}else d.push(...x);const w={type:"element",tagName:"li",properties:{id:e+"fn-"+m},children:t.wrap(d,!0)};t.patch(h,w),c.push(w)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...jf(o),id:"footnote-label"},children:[{type:"text",value:n}]},{type:"text",value:`
285
+ `},{type:"element",tagName:"ol",properties:{},children:t.wrap(c,!0)},{type:"text",value:`
286
+ `}]}}const $F=(function(t){if(t==null)return krt;if(typeof t=="function")return Up(t);if(typeof t=="object")return Array.isArray(t)?Crt(t):wrt(t);if(typeof t=="string")return Srt(t);throw new Error("Expected function, string, or object as test")});function Crt(t){const e=[];let r=-1;for(;++r<t.length;)e[r]=$F(t[r]);return Up(i);function i(...n){let s=-1;for(;++s<e.length;)if(e[s].apply(this,n))return!0;return!1}}function wrt(t){const e=t;return Up(r);function r(i){const n=i;let s;for(s in t)if(n[s]!==e[s])return!1;return!0}}function Srt(t){return Up(e);function e(r){return r&&r.type===t}}function Up(t){return e;function e(r,i,n){return!!(_rt(r)&&t.call(this,r,typeof i=="number"?i:void 0,n||void 0))}}function krt(){return!0}function _rt(t){return t!==null&&typeof t=="object"&&"type"in t}const PF=[],Trt=!0,O3=!1,Ert="skip";function Art(t,e,r,i){let n;typeof e=="function"&&typeof r!="function"?(i=r,r=e):n=e;const s=$F(n),o=i?-1:1;c(t,void 0,[])();function c(u,h,d){const p=u&&typeof u=="object"?u:{};if(typeof p.type=="string"){const g=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(u.type+(g?"<"+g+">":""))+")"})}return m;function m(){let g=PF,x,v,b;if((!e||s(u,h,d[d.length-1]||void 0))&&(g=Brt(r(u,d)),g[0]===O3))return g;if("children"in u&&u.children){const w=u;if(w.children&&g[0]!==Ert)for(v=(i?w.children.length:-1)+o,b=d.concat(w);v>-1&&v<w.children.length;){const T=w.children[v];if(x=c(T,v,b)(),x[0]===O3)return x;v=typeof x[1]=="number"?x[1]:v+o}}return g}}}function Brt(t){return Array.isArray(t)?t:typeof t=="number"?[Trt,t]:t==null?PF:[t]}function HF(t,e,r,i){let n,s,o;typeof e=="function"&&typeof r!="function"?(s=void 0,o=e,n=r):(s=e,o=r,n=i),Art(t,s,c,n);function c(u,h){const d=h[h.length-1],p=d?d.children.indexOf(u):void 0;return o(u,p,d)}}const QC={}.hasOwnProperty,Lrt={};function Mrt(t,e){const r=e||Lrt,i=new Map,n=new Map,s=new Map,o={...drt,...r.handlers},c={all:h,applyData:Ort,definitionById:i,footnoteById:n,footnoteCounts:s,footnoteOrder:[],handlers:o,one:u,options:r,patch:Nrt,wrap:Drt};return HF(t,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const p=d.type==="definition"?i:n,m=String(d.identifier).toUpperCase();p.has(m)||p.set(m,d)}}),c;function u(d,p){const m=d.type,g=c.handlers[m];if(QC.call(c.handlers,m)&&g)return g(c,d,p);if(c.options.passThrough&&c.options.passThrough.includes(m)){if("children"in d){const{children:v,...b}=d,w=jf(b);return w.children=c.all(d),w}return jf(d)}return(c.options.unknownHandler||Rrt)(c,d,p)}function h(d){const p=[];if("children"in d){const m=d.children;let g=-1;for(;++g<m.length;){const x=c.one(m[g],d);if(x){if(g&&m[g-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=R3(x.value)),!Array.isArray(x)&&x.type==="element")){const v=x.children[0];v&&v.type==="text"&&(v.value=R3(v.value))}Array.isArray(x)?p.push(...x):p.push(x)}}}return p}}function Nrt(t,e){t.position&&(e.position=dJ(t))}function Ort(t,e){let r=e;if(t&&t.data){const i=t.data.hName,n=t.data.hChildren,s=t.data.hProperties;if(typeof i=="string")if(r.type==="element")r.tagName=i;else{const o="children"in r?r.children:[r];r={type:"element",tagName:i,properties:{},children:o}}r.type==="element"&&s&&Object.assign(r.properties,jf(s)),"children"in r&&r.children&&n!==null&&n!==void 0&&(r.children=n)}return r}function Rrt(t,e){const r=e.data||{},i="value"in e&&!(QC.call(r,"hProperties")||QC.call(r,"hChildren"))?{type:"text",value:e.value}:{type:"element",tagName:"div",properties:{},children:t.all(e)};return t.patch(e,i),t.applyData(e,i)}function Drt(t,e){const r=[];let i=-1;for(e&&r.push({type:"text",value:`
287
+ `});++i<t.length;)i&&r.push({type:"text",value:`
288
+ `}),r.push(t[i]);return e&&t.length>0&&r.push({type:"text",value:`
289
+ `}),r}function R3(t){let e=0,r=t.charCodeAt(e);for(;r===9||r===32;)e++,r=t.charCodeAt(e);return t.slice(e)}function D3(t,e){const r=Mrt(t,e),i=r.one(t,void 0),n=vrt(r),s=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return n&&s.children.push({type:"text",value:`
290
+ `},n),s}function Frt(t,e){return t&&"run"in t?async function(r,i){const n=D3(r,{file:i,...e});await t.run(n,i)}:function(r,i){return D3(r,{file:i,...t||e})}}function F3(t){if(t)throw t}var tC,I3;function Irt(){if(I3)return tC;I3=1;var t=Object.prototype.hasOwnProperty,e=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,n=function(h){return typeof Array.isArray=="function"?Array.isArray(h):e.call(h)==="[object Array]"},s=function(h){if(!h||e.call(h)!=="[object Object]")return!1;var d=t.call(h,"constructor"),p=h.constructor&&h.constructor.prototype&&t.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!d&&!p)return!1;var m;for(m in h);return typeof m>"u"||t.call(h,m)},o=function(h,d){r&&d.name==="__proto__"?r(h,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):h[d.name]=d.newValue},c=function(h,d){if(d==="__proto__")if(t.call(h,d)){if(i)return i(h,d).value}else return;return h[d]};return tC=function u(){var h,d,p,m,g,x,v=arguments[0],b=1,w=arguments.length,T=!1;for(typeof v=="boolean"&&(T=v,v=arguments[1]||{},b=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});b<w;++b)if(h=arguments[b],h!=null)for(d in h)p=c(v,d),m=c(h,d),v!==m&&(T&&m&&(s(m)||(g=n(m)))?(g?(g=!1,x=p&&n(p)?p:[]):x=p&&s(p)?p:{},o(v,{name:d,newValue:u(T,x,m)})):typeof m<"u"&&o(v,{name:d,newValue:m}));return v},tC}var qrt=Irt();const eC=Wl(qrt);function ZC(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function zrt(){const t=[],e={run:r,use:i};return e;function r(...n){let s=-1;const o=n.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);c(null,...n);function c(u,...h){const d=t[++s];let p=-1;if(u){o(u);return}for(;++p<n.length;)(h[p]===null||h[p]===void 0)&&(h[p]=n[p]);n=h,d?jrt(d,c)(...h):o(null,...h)}}function i(n){if(typeof n!="function")throw new TypeError("Expected `middelware` to be a function, not "+n);return t.push(n),e}}function jrt(t,e){let r;return i;function i(...o){const c=t.length>o.length;let u;c&&o.push(n);try{u=t.apply(this,o)}catch(h){const d=h;if(c&&r)throw d;return n(d)}c||(u&&u.then&&typeof u.then=="function"?u.then(s,n):u instanceof Error?n(u):s(u))}function n(o,...c){r||(r=!0,e(o,...c))}function s(o){n(null,o)}}const Tn={basename:$rt,dirname:Prt,extname:Hrt,join:Urt,sep:"/"};function $rt(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');mh(t);let r=0,i=-1,n=t.length,s;if(e===void 0||e.length===0||e.length>t.length){for(;n--;)if(t.codePointAt(n)===47){if(s){r=n+1;break}}else i<0&&(s=!0,i=n+1);return i<0?"":t.slice(r,i)}if(e===t)return"";let o=-1,c=e.length-1;for(;n--;)if(t.codePointAt(n)===47){if(s){r=n+1;break}}else o<0&&(s=!0,o=n+1),c>-1&&(t.codePointAt(n)===e.codePointAt(c--)?c<0&&(i=n):(c=-1,i=o));return r===i?i=o:i<0&&(i=t.length),t.slice(r,i)}function Prt(t){if(mh(t),t.length===0)return".";let e=-1,r=t.length,i;for(;--r;)if(t.codePointAt(r)===47){if(i){e=r;break}}else i||(i=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function Hrt(t){mh(t);let e=t.length,r=-1,i=0,n=-1,s=0,o;for(;e--;){const c=t.codePointAt(e);if(c===47){if(o){i=e+1;break}continue}r<0&&(o=!0,r=e+1),c===46?n<0?n=e:s!==1&&(s=1):n>-1&&(s=-1)}return n<0||r<0||s===0||s===1&&n===r-1&&n===i+1?"":t.slice(n,r)}function Urt(...t){let e=-1,r;for(;++e<t.length;)mh(t[e]),t[e]&&(r=r===void 0?t[e]:r+"/"+t[e]);return r===void 0?".":Grt(r)}function Grt(t){mh(t);const e=t.codePointAt(0)===47;let r=Yrt(t,!e);return r.length===0&&!e&&(r="."),r.length>0&&t.codePointAt(t.length-1)===47&&(r+="/"),e?"/"+r:r}function Yrt(t,e){let r="",i=0,n=-1,s=0,o=-1,c,u;for(;++o<=t.length;){if(o<t.length)c=t.codePointAt(o);else{if(c===47)break;c=47}if(c===47){if(!(n===o-1||s===1))if(n!==o-1&&s===2){if(r.length<2||i!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(u=r.lastIndexOf("/"),u!==r.length-1){u<0?(r="",i=0):(r=r.slice(0,u),i=r.length-1-r.lastIndexOf("/")),n=o,s=0;continue}}else if(r.length>0){r="",i=0,n=o,s=0;continue}}e&&(r=r.length>0?r+"/..":"..",i=2)}else r.length>0?r+="/"+t.slice(n+1,o):r=t.slice(n+1,o),i=o-n-1;n=o,s=0}else c===46&&s>-1?s++:s=-1}return r}function mh(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const Vrt={cwd:Wrt};function Wrt(){return"/"}function KC(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function Xrt(t){if(typeof t=="string")t=new URL(t);else if(!KC(t)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return Qrt(t)}function Qrt(t){if(t.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const e=t.pathname;let r=-1;for(;++r<e.length;)if(e.codePointAt(r)===37&&e.codePointAt(r+1)===50){const i=e.codePointAt(r+2);if(i===70||i===102){const n=new TypeError("File URL path must not include encoded / characters");throw n.code="ERR_INVALID_FILE_URL_PATH",n}}return decodeURIComponent(e)}const rC=["history","path","basename","stem","extname","dirname"];class UF{constructor(e){let r;e?KC(e)?r={path:e}:typeof e=="string"||Zrt(e)?r={value:e}:r=e:r={},this.cwd="cwd"in r?"":Vrt.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<rC.length;){const s=rC[i];s in r&&r[s]!==void 0&&r[s]!==null&&(this[s]=s==="history"?[...r[s]]:r[s])}let n;for(n in r)rC.includes(n)||(this[n]=r[n])}get basename(){return typeof this.path=="string"?Tn.basename(this.path):void 0}set basename(e){nC(e,"basename"),iC(e,"basename"),this.path=Tn.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?Tn.dirname(this.path):void 0}set dirname(e){q3(this.basename,"dirname"),this.path=Tn.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?Tn.extname(this.path):void 0}set extname(e){if(iC(e,"extname"),q3(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Tn.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){KC(e)&&(e=Xrt(e)),nC(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?Tn.basename(this.path,this.extname):void 0}set stem(e){nC(e,"stem"),iC(e,"stem"),this.path=Tn.join(this.dirname||"",e+(this.extname||""))}fail(e,r,i){const n=this.message(e,r,i);throw n.fatal=!0,n}info(e,r,i){const n=this.message(e,r,i);return n.fatal=void 0,n}message(e,r,i){const n=new Ur(e,r,i);return this.path&&(n.name=this.path+":"+n.name,n.file=this.path),n.fatal=!1,this.messages.push(n),n}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}}function iC(t,e){if(t&&t.includes(Tn.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+Tn.sep+"`")}function nC(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function q3(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function Zrt(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const Krt=(function(t){const i=this.constructor.prototype,n=i[t],s=function(){return n.apply(s,arguments)};return Object.setPrototypeOf(s,i),s}),Jrt={}.hasOwnProperty;class zw extends Krt{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=zrt()}copy(){const e=new zw;let r=-1;for(;++r<this.attachers.length;){const i=this.attachers[r];e.use(...i)}return e.data(eC(!0,{},this.namespace)),e}data(e,r){return typeof e=="string"?arguments.length===2?(oC("data",this.frozen),this.namespace[e]=r,this):Jrt.call(this.namespace,e)&&this.namespace[e]||void 0:e?(oC("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const n=r.call(e,...i);typeof n=="function"&&this.transformers.use(n)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const r=Xd(e),i=this.parser||this.Parser;return aC("parse",i),i(String(r),r)}process(e,r){const i=this;return this.freeze(),aC("process",this.parser||this.Parser),sC("process",this.compiler||this.Compiler),r?n(void 0,r):new Promise(n);function n(s,o){const c=Xd(e),u=i.parse(c);i.run(u,c,function(d,p,m){if(d||!p||!m)return h(d);const g=p,x=i.stringify(g,m);rit(x)?m.value=x:m.result=x,h(d,m)});function h(d,p){d||!p?o(d):s?s(p):r(void 0,p)}}}processSync(e){let r=!1,i;return this.freeze(),aC("processSync",this.parser||this.Parser),sC("processSync",this.compiler||this.Compiler),this.process(e,n),j3("processSync","process",r),i;function n(s,o){r=!0,F3(s),i=o}}run(e,r,i){z3(e),this.freeze();const n=this.transformers;return!i&&typeof r=="function"&&(i=r,r=void 0),i?s(void 0,i):new Promise(s);function s(o,c){const u=Xd(r);n.run(e,u,h);function h(d,p,m){const g=p||e;d?c(d):o?o(g):i(void 0,g,m)}}}runSync(e,r){let i=!1,n;return this.run(e,r,s),j3("runSync","run",i),n;function s(o,c){F3(o),n=c,i=!0}}stringify(e,r){this.freeze();const i=Xd(r),n=this.compiler||this.Compiler;return sC("stringify",n),z3(e),n(e,i)}use(e,...r){const i=this.attachers,n=this.namespace;if(oC("use",this.frozen),e!=null)if(typeof e=="function")u(e,r);else if(typeof e=="object")Array.isArray(e)?c(e):o(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function s(h){if(typeof h=="function")u(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[d,...p]=h;u(d,p)}else o(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function o(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(h.plugins),h.settings&&(n.settings=eC(!0,n.settings,h.settings))}function c(h){let d=-1;if(h!=null)if(Array.isArray(h))for(;++d<h.length;){const p=h[d];s(p)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function u(h,d){let p=-1,m=-1;for(;++p<i.length;)if(i[p][0]===h){m=p;break}if(m===-1)i.push([h,...d]);else if(d.length>0){let[g,...x]=d;const v=i[m][1];ZC(v)&&ZC(g)&&(g=eC(!0,v,g)),i[m]=[h,g,...x]}}}}const tit=new zw().freeze();function aC(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function sC(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function oC(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function z3(t){if(!ZC(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function j3(t,e,r){if(!r)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function Xd(t){return eit(t)?t:new UF(t)}function eit(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function rit(t){return typeof t=="string"||iit(t)}function iit(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const nit="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",$3=[],P3={allowDangerousHtml:!0},ait=/^(https?|ircs?|mailto|xmpp)$/i,sit=[{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 oit(t){const e=lit(t),r=cit(t);return uit(e.runSync(e.parse(r),r),t)}function lit(t){const e=t.rehypePlugins||$3,r=t.remarkPlugins||$3,i=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...P3}:P3;return tit().use(jet).use(r).use(Frt,i).use(e)}function cit(t){const e=t.children||"",r=new UF;return typeof e=="string"&&(r.value=e),r}function uit(t,e){const r=e.allowedElements,i=e.allowElement,n=e.components,s=e.disallowedElements,o=e.skipHtml,c=e.unwrapDisallowed,u=e.urlTransform||hit;for(const d of sit)Object.hasOwn(e,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+nit+d.id,void 0);return HF(t,h),yJ(t,{Fragment:S.Fragment,components:n,ignoreInvalidStyle:!0,jsx:S.jsx,jsxs:S.jsxs,passKeys:!0,passNode:!0});function h(d,p,m){if(d.type==="raw"&&m&&typeof p=="number")return o?m.children.splice(p,1):m.children[p]={type:"text",value:d.value},p;if(d.type==="element"){let g;for(g in Zv)if(Object.hasOwn(Zv,g)&&Object.hasOwn(d.properties,g)){const x=d.properties[g],v=Zv[g];(v===null||v.includes(d.tagName))&&(d.properties[g]=u(String(x||""),g,d))}}if(d.type==="element"){let g=r?!r.includes(d.tagName):s?s.includes(d.tagName):!1;if(!g&&i&&typeof p=="number"&&(g=!i(d,p,m)),g&&m&&typeof p=="number")return c&&d.children?m.children.splice(p,1,...d.children):m.children.splice(p,1),p}}}function hit(t){const e=t.indexOf(":"),r=t.indexOf("?"),i=t.indexOf("#"),n=t.indexOf("/");return e===-1||n!==-1&&e>n||r!==-1&&e>r||i!==-1&&e>i||ait.test(t.slice(0,e))?t:""}const dit="modulepreload",fit=function(t){return"/"+t},H3={},be=function(e,r,i){let n=Promise.resolve();if(r&&r.length>0){let o=function(h){return Promise.all(h.map(d=>Promise.resolve(d).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),u=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));n=o(r.map(h=>{if(h=fit(h),h in H3)return;H3[h]=!0;const d=h.endsWith(".css"),p=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${p}`))return;const m=document.createElement("link");if(m.rel=d?"stylesheet":dit,d||(m.as="script"),m.crossOrigin="",m.href=h,u&&m.setAttribute("nonce",u),document.head.appendChild(m),d)return new Promise((g,x)=>{m.addEventListener("load",g),m.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${h}`)))})}))}function s(o){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=o,window.dispatchEvent(c),!c.defaultPrevented)throw o}return n.then(o=>{for(const c of o||[])c.status==="rejected"&&s(c.reason);return e().catch(s)})};var gf={exports:{}},pit=gf.exports,U3;function git(){return U3||(U3=1,(function(t,e){(function(r,i){t.exports=i()})(pit,(function(){var r=1e3,i=6e4,n=36e5,s="millisecond",o="second",c="minute",u="hour",h="day",d="week",p="month",m="quarter",g="year",x="date",v="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,T={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(M){var I=["th","st","nd","rd"],N=M%100;return"["+M+(I[(N-20)%10]||I[N]||I[0])+"]"}},k=function(M,I,N){var P=String(M);return!P||P.length>=I?M:""+Array(I+1-P.length).join(N)+M},E={s:k,z:function(M){var I=-M.utcOffset(),N=Math.abs(I),P=Math.floor(N/60),$=N%60;return(I<=0?"+":"-")+k(P,2,"0")+":"+k($,2,"0")},m:function M(I,N){if(I.date()<N.date())return-M(N,I);var P=12*(N.year()-I.year())+(N.month()-I.month()),$=I.clone().add(P,p),D=N-$<0,q=I.clone().add(P+(D?-1:1),p);return+(-(P+(N-$)/(D?$-q:q-$))||0)},a:function(M){return M<0?Math.ceil(M)||0:Math.floor(M)},p:function(M){return{M:p,y:g,w:d,d:h,D:x,h:u,m:c,s:o,ms:s,Q:m}[M]||String(M||"").toLowerCase().replace(/s$/,"")},u:function(M){return M===void 0}},L="en",A={};A[L]=T;var R="$isDayjsObject",j=function(M){return M instanceof z||!(!M||!M[R])},Y=function M(I,N,P){var $;if(!I)return L;if(typeof I=="string"){var D=I.toLowerCase();A[D]&&($=D),N&&(A[D]=N,$=D);var q=I.split("-");if(!$&&q.length>1)return M(q[0])}else{var G=I.name;A[G]=I,$=G}return!P&&$&&(L=$),$||!P&&L},V=function(M,I){if(j(M))return M.clone();var N=typeof I=="object"?I:{};return N.date=M,N.args=arguments,new z(N)},O=E;O.l=Y,O.i=j,O.w=function(M,I){return V(M,{locale:I.$L,utc:I.$u,x:I.$x,$offset:I.$offset})};var z=(function(){function M(N){this.$L=Y(N.locale,null,!0),this.parse(N),this.$x=this.$x||N.x||{},this[R]=!0}var I=M.prototype;return I.parse=function(N){this.$d=(function(P){var $=P.date,D=P.utc;if($===null)return new Date(NaN);if(O.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var q=$.match(b);if(q){var G=q[2]-1||0,Z=(q[7]||"0").substring(0,3);return D?new Date(Date.UTC(q[1],G,q[3]||1,q[4]||0,q[5]||0,q[6]||0,Z)):new Date(q[1],G,q[3]||1,q[4]||0,q[5]||0,q[6]||0,Z)}}return new Date($)})(N),this.init()},I.init=function(){var N=this.$d;this.$y=N.getFullYear(),this.$M=N.getMonth(),this.$D=N.getDate(),this.$W=N.getDay(),this.$H=N.getHours(),this.$m=N.getMinutes(),this.$s=N.getSeconds(),this.$ms=N.getMilliseconds()},I.$utils=function(){return O},I.isValid=function(){return this.$d.toString()!==v},I.isSame=function(N,P){var $=V(N);return this.startOf(P)<=$&&$<=this.endOf(P)},I.isAfter=function(N,P){return V(N)<this.startOf(P)},I.isBefore=function(N,P){return this.endOf(P)<V(N)},I.$g=function(N,P,$){return O.u(N)?this[P]:this.set($,N)},I.unix=function(){return Math.floor(this.valueOf()/1e3)},I.valueOf=function(){return this.$d.getTime()},I.startOf=function(N,P){var $=this,D=!!O.u(P)||P,q=O.p(N),G=function(xt,mt){var bt=O.w($.$u?Date.UTC($.$y,mt,xt):new Date($.$y,mt,xt),$);return D?bt:bt.endOf(h)},Z=function(xt,mt){return O.w($.toDate()[xt].apply($.toDate("s"),(D?[0,0,0,0]:[23,59,59,999]).slice(mt)),$)},H=this.$W,Q=this.$M,J=this.$D,et="set"+(this.$u?"UTC":"");switch(q){case g:return D?G(1,0):G(31,11);case p:return D?G(1,Q):G(0,Q+1);case d:var at=this.$locale().weekStart||0,lt=(H<at?H+7:H)-at;return G(D?J-lt:J+(6-lt),Q);case h:case x:return Z(et+"Hours",0);case u:return Z(et+"Minutes",1);case c:return Z(et+"Seconds",2);case o:return Z(et+"Milliseconds",3);default:return this.clone()}},I.endOf=function(N){return this.startOf(N,!1)},I.$set=function(N,P){var $,D=O.p(N),q="set"+(this.$u?"UTC":""),G=($={},$[h]=q+"Date",$[x]=q+"Date",$[p]=q+"Month",$[g]=q+"FullYear",$[u]=q+"Hours",$[c]=q+"Minutes",$[o]=q+"Seconds",$[s]=q+"Milliseconds",$)[D],Z=D===h?this.$D+(P-this.$W):P;if(D===p||D===g){var H=this.clone().set(x,1);H.$d[G](Z),H.init(),this.$d=H.set(x,Math.min(this.$D,H.daysInMonth())).$d}else G&&this.$d[G](Z);return this.init(),this},I.set=function(N,P){return this.clone().$set(N,P)},I.get=function(N){return this[O.p(N)]()},I.add=function(N,P){var $,D=this;N=Number(N);var q=O.p(P),G=function(Q){var J=V(D);return O.w(J.date(J.date()+Math.round(Q*N)),D)};if(q===p)return this.set(p,this.$M+N);if(q===g)return this.set(g,this.$y+N);if(q===h)return G(1);if(q===d)return G(7);var Z=($={},$[c]=i,$[u]=n,$[o]=r,$)[q]||1,H=this.$d.getTime()+N*Z;return O.w(H,this)},I.subtract=function(N,P){return this.add(-1*N,P)},I.format=function(N){var P=this,$=this.$locale();if(!this.isValid())return $.invalidDate||v;var D=N||"YYYY-MM-DDTHH:mm:ssZ",q=O.z(this),G=this.$H,Z=this.$m,H=this.$M,Q=$.weekdays,J=$.months,et=$.meridiem,at=function(mt,bt,Tt,_t){return mt&&(mt[bt]||mt(P,D))||Tt[bt].slice(0,_t)},lt=function(mt){return O.s(G%12||12,mt,"0")},xt=et||function(mt,bt,Tt){var _t=mt<12?"AM":"PM";return Tt?_t.toLowerCase():_t};return D.replace(w,(function(mt,bt){return bt||(function(Tt){switch(Tt){case"YY":return String(P.$y).slice(-2);case"YYYY":return O.s(P.$y,4,"0");case"M":return H+1;case"MM":return O.s(H+1,2,"0");case"MMM":return at($.monthsShort,H,J,3);case"MMMM":return at(J,H);case"D":return P.$D;case"DD":return O.s(P.$D,2,"0");case"d":return String(P.$W);case"dd":return at($.weekdaysMin,P.$W,Q,2);case"ddd":return at($.weekdaysShort,P.$W,Q,3);case"dddd":return Q[P.$W];case"H":return String(G);case"HH":return O.s(G,2,"0");case"h":return lt(1);case"hh":return lt(2);case"a":return xt(G,Z,!0);case"A":return xt(G,Z,!1);case"m":return String(Z);case"mm":return O.s(Z,2,"0");case"s":return String(P.$s);case"ss":return O.s(P.$s,2,"0");case"SSS":return O.s(P.$ms,3,"0");case"Z":return q}return null})(mt)||q.replace(":","")}))},I.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},I.diff=function(N,P,$){var D,q=this,G=O.p(P),Z=V(N),H=(Z.utcOffset()-this.utcOffset())*i,Q=this-Z,J=function(){return O.m(q,Z)};switch(G){case g:D=J()/12;break;case p:D=J();break;case m:D=J()/3;break;case d:D=(Q-H)/6048e5;break;case h:D=(Q-H)/864e5;break;case u:D=Q/n;break;case c:D=Q/i;break;case o:D=Q/r;break;default:D=Q}return $?D:O.a(D)},I.daysInMonth=function(){return this.endOf(p).$D},I.$locale=function(){return A[this.$L]},I.locale=function(N,P){if(!N)return this.$L;var $=this.clone(),D=Y(N,P,!0);return D&&($.$L=D),$},I.clone=function(){return O.w(this.$d,this)},I.toDate=function(){return new Date(this.valueOf())},I.toJSON=function(){return this.isValid()?this.toISOString():null},I.toISOString=function(){return this.$d.toISOString()},I.toString=function(){return this.$d.toUTCString()},M})(),X=z.prototype;return V.prototype=X,[["$ms",s],["$s",o],["$m",c],["$H",u],["$W",h],["$M",p],["$y",g],["$D",x]].forEach((function(M){X[M[1]]=function(I){return this.$g(I,M[0],M[1])}})),V.extend=function(M,I){return M.$i||(M(I,z,V),M.$i=!0),V},V.locale=Y,V.isDayjs=j,V.unix=function(M){return V(1e3*M)},V.en=A[L],V.Ls=A,V.p={},V}))})(gf)),gf.exports}var mit=git();const yit=Wl(mit);var GF=Object.defineProperty,B=(t,e)=>GF(t,"name",{value:e,configurable:!0}),xit=(t,e)=>{for(var r in e)GF(t,r,{get:e[r],enumerable:!0})},sa={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},St={trace:B((...t)=>{},"trace"),debug:B((...t)=>{},"debug"),info:B((...t)=>{},"info"),warn:B((...t)=>{},"warn"),error:B((...t)=>{},"error"),fatal:B((...t)=>{},"fatal")},jw=B(function(t="fatal"){let e=sa.fatal;typeof t=="string"?t.toLowerCase()in sa&&(e=sa[t]):typeof t=="number"&&(e=t),St.trace=()=>{},St.debug=()=>{},St.info=()=>{},St.warn=()=>{},St.error=()=>{},St.fatal=()=>{},e<=sa.fatal&&(St.fatal=console.error?console.error.bind(console,ji("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",ji("FATAL"))),e<=sa.error&&(St.error=console.error?console.error.bind(console,ji("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",ji("ERROR"))),e<=sa.warn&&(St.warn=console.warn?console.warn.bind(console,ji("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",ji("WARN"))),e<=sa.info&&(St.info=console.info?console.info.bind(console,ji("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",ji("INFO"))),e<=sa.debug&&(St.debug=console.debug?console.debug.bind(console,ji("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ji("DEBUG"))),e<=sa.trace&&(St.trace=console.debug?console.debug.bind(console,ji("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ji("TRACE")))},"setLogLevel"),ji=B(t=>`%c${yit().format("ss.SSS")} : ${t} : `,"format");const mf={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},i)=>{if(!e)return r*2.55;t/=360,e/=100,r/=100;const n=r<.5?r*(1+e):r+e-r*e,s=2*r-n;switch(i){case"r":return mf.hue2rgb(s,n,t+1/3)*255;case"g":return mf.hue2rgb(s,n,t)*255;case"b":return mf.hue2rgb(s,n,t-1/3)*255}},rgb2hsl:({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;const n=Math.max(t,e,r),s=Math.min(t,e,r),o=(n+s)/2;if(i==="l")return o*100;if(n===s)return 0;const c=n-s,u=o>.5?c/(2-n-s):c/(n+s);if(i==="s")return u*100;switch(n){case t:return((e-r)/c+(e<r?6:0))*60;case e:return((r-t)/c+2)*60;case r:return((t-e)/c+4)*60;default:return-1}}},bit={clamp:(t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(t*1e10)/1e10},vit={dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},re={channel:mf,lang:bit,unit:vit},Qa={};for(let t=0;t<=255;t++)Qa[t]=re.unit.dec2hex(t);const $r={ALL:0,RGB:1,HSL:2};class Cit{constructor(){this.type=$r.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=$r.ALL}is(e){return this.type===e}}class wit{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new Cit}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=$r.ALL,this}_ensureHSL(){const e=this.data,{h:r,s:i,l:n}=e;r===void 0&&(e.h=re.channel.rgb2hsl(e,"h")),i===void 0&&(e.s=re.channel.rgb2hsl(e,"s")),n===void 0&&(e.l=re.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r,g:i,b:n}=e;r===void 0&&(e.r=re.channel.hsl2rgb(e,"r")),i===void 0&&(e.g=re.channel.hsl2rgb(e,"g")),n===void 0&&(e.b=re.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,r=e.r;return!this.type.is($r.HSL)&&r!==void 0?r:(this._ensureHSL(),re.channel.hsl2rgb(e,"r"))}get g(){const e=this.data,r=e.g;return!this.type.is($r.HSL)&&r!==void 0?r:(this._ensureHSL(),re.channel.hsl2rgb(e,"g"))}get b(){const e=this.data,r=e.b;return!this.type.is($r.HSL)&&r!==void 0?r:(this._ensureHSL(),re.channel.hsl2rgb(e,"b"))}get h(){const e=this.data,r=e.h;return!this.type.is($r.RGB)&&r!==void 0?r:(this._ensureRGB(),re.channel.rgb2hsl(e,"h"))}get s(){const e=this.data,r=e.s;return!this.type.is($r.RGB)&&r!==void 0?r:(this._ensureRGB(),re.channel.rgb2hsl(e,"s"))}get l(){const e=this.data,r=e.l;return!this.type.is($r.RGB)&&r!==void 0?r:(this._ensureRGB(),re.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set($r.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set($r.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set($r.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set($r.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set($r.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set($r.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}const Gp=new wit({r:0,g:0,b:0,a:0},"transparent"),bl={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(t.charCodeAt(0)!==35)return;const e=t.match(bl.re);if(!e)return;const r=e[1],i=parseInt(r,16),n=r.length,s=n%4===0,o=n>4,c=o?1:17,u=o?8:4,h=s?0:-1,d=o?255:15;return Gp.set({r:(i>>u*(h+3)&d)*c,g:(i>>u*(h+2)&d)*c,b:(i>>u*(h+1)&d)*c,a:s?(i&d)*c/255:1},t)},stringify:t=>{const{r:e,g:r,b:i,a:n}=t;return n<1?`#${Qa[Math.round(e)]}${Qa[Math.round(r)]}${Qa[Math.round(i)]}${Qa[Math.round(n*255)]}`:`#${Qa[Math.round(e)]}${Qa[Math.round(r)]}${Qa[Math.round(i)]}`}},Gs={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{const e=t.match(Gs.hueRe);if(e){const[,r,i]=e;switch(i){case"grad":return re.channel.clamp.h(parseFloat(r)*.9);case"rad":return re.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return re.channel.clamp.h(parseFloat(r)*360)}}return re.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(e!==104&&e!==72)return;const r=t.match(Gs.re);if(!r)return;const[,i,n,s,o,c]=r;return Gp.set({h:Gs._hue2deg(i),s:re.channel.clamp.s(parseFloat(n)),l:re.channel.clamp.l(parseFloat(s)),a:o?re.channel.clamp.a(c?parseFloat(o)/100:parseFloat(o)):1},t)},stringify:t=>{const{h:e,s:r,l:i,a:n}=t;return n<1?`hsla(${re.lang.round(e)}, ${re.lang.round(r)}%, ${re.lang.round(i)}%, ${n})`:`hsl(${re.lang.round(e)}, ${re.lang.round(r)}%, ${re.lang.round(i)}%)`}},Mu={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:t=>{t=t.toLowerCase();const e=Mu.colors[t];if(e)return bl.parse(e)},stringify:t=>{const e=bl.stringify(t);for(const r in Mu.colors)if(Mu.colors[r]===e)return r}},bu={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:t=>{const e=t.charCodeAt(0);if(e!==114&&e!==82)return;const r=t.match(bu.re);if(!r)return;const[,i,n,s,o,c,u,h,d]=r;return Gp.set({r:re.channel.clamp.r(n?parseFloat(i)*2.55:parseFloat(i)),g:re.channel.clamp.g(o?parseFloat(s)*2.55:parseFloat(s)),b:re.channel.clamp.b(u?parseFloat(c)*2.55:parseFloat(c)),a:h?re.channel.clamp.a(d?parseFloat(h)/100:parseFloat(h)):1},t)},stringify:t=>{const{r:e,g:r,b:i,a:n}=t;return n<1?`rgba(${re.lang.round(e)}, ${re.lang.round(r)}, ${re.lang.round(i)}, ${re.lang.round(n)})`:`rgb(${re.lang.round(e)}, ${re.lang.round(r)}, ${re.lang.round(i)})`}},On={format:{keyword:Mu,hex:bl,rgb:bu,rgba:bu,hsl:Gs,hsla:Gs},parse:t=>{if(typeof t!="string")return t;const e=bl.parse(t)||bu.parse(t)||Gs.parse(t)||Mu.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is($r.HSL)||t.data.r===void 0?Gs.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?bu.stringify(t):bl.stringify(t)},YF=(t,e)=>{const r=On.parse(t);for(const i in e)r[i]=re.channel.clamp[i](e[i]);return On.stringify(r)},rs=(t,e,r=0,i=1)=>{if(typeof t!="number")return YF(t,{a:e});const n=Gp.set({r:re.channel.clamp.r(t),g:re.channel.clamp.g(e),b:re.channel.clamp.b(r),a:re.channel.clamp.a(i)});return On.stringify(n)},Sit=t=>{const{r:e,g:r,b:i}=On.parse(t),n=.2126*re.channel.toLinear(e)+.7152*re.channel.toLinear(r)+.0722*re.channel.toLinear(i);return re.lang.round(n)},kit=t=>Sit(t)>=.5,pn=t=>!kit(t),VF=(t,e,r)=>{const i=On.parse(t),n=i[e],s=re.channel.clamp[e](n+r);return n!==s&&(i[e]=s),On.stringify(i)},dt=(t,e)=>VF(t,"l",e),ft=(t,e)=>VF(t,"l",-e),U=(t,e)=>{const r=On.parse(t),i={};for(const n in e)e[n]&&(i[n]=r[n]+e[n]);return YF(t,i)},_it=(t,e,r=50)=>{const{r:i,g:n,b:s,a:o}=On.parse(t),{r:c,g:u,b:h,a:d}=On.parse(e),p=r/100,m=p*2-1,g=o-d,v=((m*g===-1?m:(m+g)/(1+m*g))+1)/2,b=1-v,w=i*v+c*b,T=n*v+u*b,k=s*v+h*b,E=o*p+d*(1-p);return rs(w,T,k,E)},nt=(t,e=100)=>{const r=On.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,_it(r,t,e)};/*! @license DOMPurify 3.4.2 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.2/LICENSE */const{entries:WF,setPrototypeOf:G3,isFrozen:Tit,getPrototypeOf:Eit,getOwnPropertyDescriptor:Ait}=Object;let{freeze:Kr,seal:Hi,create:al}=Object,{apply:JC,construct:t2}=typeof Reflect<"u"&&Reflect;Kr||(Kr=function(e){return e});Hi||(Hi=function(e){return e});JC||(JC=function(e,r){for(var i=arguments.length,n=new Array(i>2?i-2:0),s=2;s<i;s++)n[s-2]=arguments[s];return e.apply(r,n)});t2||(t2=function(e){for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return new e(...i)});const nu=wr(Array.prototype.forEach),Bit=wr(Array.prototype.lastIndexOf),Y3=wr(Array.prototype.pop),au=wr(Array.prototype.push),Lit=wr(Array.prototype.splice),Xr=Array.isArray,vu=wr(String.prototype.toLowerCase),lC=wr(String.prototype.toString),V3=wr(String.prototype.match),el=wr(String.prototype.replace),W3=wr(String.prototype.indexOf),Mit=wr(String.prototype.trim),Nit=wr(Number.prototype.toString),Oit=wr(Boolean.prototype.toString),X3=typeof BigInt>"u"?null:wr(BigInt.prototype.toString),Q3=typeof Symbol>"u"?null:wr(Symbol.prototype.toString),hr=wr(Object.prototype.hasOwnProperty),su=wr(Object.prototype.toString),Ir=wr(RegExp.prototype.test),Qd=Rit(TypeError);function wr(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return JC(t,e,i)}}function Rit(t){return function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return t2(t,r)}}function le(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:vu;if(G3&&G3(t,null),!Xr(e))return t;let i=e.length;for(;i--;){let n=e[i];if(typeof n=="string"){const s=r(n);s!==n&&(Tit(e)||(e[i]=s),n=s)}t[n]=!0}return t}function Dit(t){for(let e=0;e<t.length;e++)hr(t,e)||(t[e]=null);return t}function hi(t){const e=al(null);for(const[r,i]of WF(t))hr(t,r)&&(Xr(i)?e[r]=Dit(i):i&&typeof i=="object"&&i.constructor===Object?e[r]=hi(i):e[r]=i);return e}function Fit(t){switch(typeof t){case"string":return t;case"number":return Nit(t);case"boolean":return Oit(t);case"bigint":return X3?X3(t):"0";case"symbol":return Q3?Q3(t):"Symbol()";case"undefined":return su(t);case"function":case"object":{if(t===null)return su(t);const e=t,r=sl(e,"toString");if(typeof r=="function"){const i=r(e);return typeof i=="string"?i:su(i)}return su(t)}default:return su(t)}}function sl(t,e){for(;t!==null;){const i=Ait(t,e);if(i){if(i.get)return wr(i.get);if(typeof i.value=="function")return wr(i.value)}t=Eit(t)}function r(){return null}return r}function Iit(t){try{return Ir(t,""),!0}catch{return!1}}const Z3=Kr(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),cC=Kr(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),uC=Kr(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),qit=Kr(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),hC=Kr(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),zit=Kr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),K3=Kr(["#text"]),J3=Kr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),dC=Kr(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),t4=Kr(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Zd=Kr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),jit=Hi(/\{\{[\w\W]*|[\w\W]*\}\}/gm),$it=Hi(/<%[\w\W]*|[\w\W]*%>/gm),Pit=Hi(/\$\{[\w\W]*/gm),Hit=Hi(/^data-[\-\w.\u00B7-\uFFFF]+$/),Uit=Hi(/^aria-[\-\w]+$/),XF=Hi(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Git=Hi(/^(?:\w+script|data):/i),Yit=Hi(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),QF=Hi(/^html$/i),Vit=Hi(/^[a-z][.\w]*(-[.\w]+)+$/i);var e4=Object.freeze({__proto__:null,ARIA_ATTR:Uit,ATTR_WHITESPACE:Yit,CUSTOM_ELEMENT:Vit,DATA_ATTR:Hit,DOCTYPE_NAME:QF,ERB_EXPR:$it,IS_ALLOWED_URI:XF,IS_SCRIPT_OR_DATA:Git,MUSTACHE_EXPR:jit,TMPLIT_EXPR:Pit});const ou={element:1,text:3,progressingInstruction:7,comment:8,document:9},Wit=function(){return typeof window>"u"?null:window},Xit=function(e,r){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let i=null;const n="data-tt-policy-suffix";r&&r.hasAttribute(n)&&(i=r.getAttribute(n));const s="dompurify"+(i?"#"+i:"");try{return e.createPolicy(s,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},r4=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function ZF(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Wit();const e=Ut=>ZF(Ut);if(e.version="3.4.2",e.removed=[],!t||!t.document||t.document.nodeType!==ou.document||!t.Element)return e.isSupported=!1,e;let{document:r}=t;const i=r,n=i.currentScript,{DocumentFragment:s,HTMLTemplateElement:o,Node:c,Element:u,NodeFilter:h,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:p,DOMParser:m,trustedTypes:g}=t,x=u.prototype,v=sl(x,"cloneNode"),b=sl(x,"remove"),w=sl(x,"nextSibling"),T=sl(x,"childNodes"),k=sl(x,"parentNode");if(typeof o=="function"){const Ut=r.createElement("template");Ut.content&&Ut.content.ownerDocument&&(r=Ut.content.ownerDocument)}let E,L="";const{implementation:A,createNodeIterator:R,createDocumentFragment:j,getElementsByTagName:Y}=r,{importNode:V}=i;let O=r4();e.isSupported=typeof WF=="function"&&typeof k=="function"&&A&&A.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:z,ERB_EXPR:X,TMPLIT_EXPR:M,DATA_ATTR:I,ARIA_ATTR:N,IS_SCRIPT_OR_DATA:P,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:D}=e4;let{IS_ALLOWED_URI:q}=e4,G=null;const Z=le({},[...Z3,...cC,...uC,...hC,...K3]);let H=null;const Q=le({},[...J3,...dC,...t4,...Zd]);let J=Object.seal(al(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),et=null,at=null;const lt=Object.seal(al(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let xt=!0,mt=!0,bt=!1,Tt=!0,_t=!1,Mt=!0,Et=!1,Yt=!1,zt=!1,ve=!1,Ee=!1,Ve=!1,ar=!0,We=!1;const Me="user-content-";let Ae=!0,sr=!1,gt={},kt=null;const Dt=le({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ee=null;const ae=le({},["audio","video","img","source","image","track"]);let Xe=null;const K=le({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Lt="http://www.w3.org/1998/Math/MathML",Ht="http://www.w3.org/2000/svg",Bt="http://www.w3.org/1999/xhtml";let Nt=Bt,Ce=!1,je=null;const va=le({},[Lt,Ht,Bt],lC);let gn=le({},["mi","mo","mn","ms","mtext"]),mn=le({},["annotation-xml"]);const Ca=le({},["title","style","font","a","script"]);let Yr=null;const wa=["application/xhtml+xml","text/html"],zn="text/html";let rr=null,Vi=null;const ds=r.createElement("form"),yn=function(tt){return tt instanceof RegExp||tt instanceof Function},fs=function(){let tt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Vi&&Vi===tt)return;(!tt||typeof tt!="object")&&(tt={}),tt=hi(tt),Yr=wa.indexOf(tt.PARSER_MEDIA_TYPE)===-1?zn:tt.PARSER_MEDIA_TYPE,rr=Yr==="application/xhtml+xml"?lC:vu,G=hr(tt,"ALLOWED_TAGS")&&Xr(tt.ALLOWED_TAGS)?le({},tt.ALLOWED_TAGS,rr):Z,H=hr(tt,"ALLOWED_ATTR")&&Xr(tt.ALLOWED_ATTR)?le({},tt.ALLOWED_ATTR,rr):Q,je=hr(tt,"ALLOWED_NAMESPACES")&&Xr(tt.ALLOWED_NAMESPACES)?le({},tt.ALLOWED_NAMESPACES,lC):va,Xe=hr(tt,"ADD_URI_SAFE_ATTR")&&Xr(tt.ADD_URI_SAFE_ATTR)?le(hi(K),tt.ADD_URI_SAFE_ATTR,rr):K,ee=hr(tt,"ADD_DATA_URI_TAGS")&&Xr(tt.ADD_DATA_URI_TAGS)?le(hi(ae),tt.ADD_DATA_URI_TAGS,rr):ae,kt=hr(tt,"FORBID_CONTENTS")&&Xr(tt.FORBID_CONTENTS)?le({},tt.FORBID_CONTENTS,rr):Dt,et=hr(tt,"FORBID_TAGS")&&Xr(tt.FORBID_TAGS)?le({},tt.FORBID_TAGS,rr):hi({}),at=hr(tt,"FORBID_ATTR")&&Xr(tt.FORBID_ATTR)?le({},tt.FORBID_ATTR,rr):hi({}),gt=hr(tt,"USE_PROFILES")?tt.USE_PROFILES&&typeof tt.USE_PROFILES=="object"?hi(tt.USE_PROFILES):tt.USE_PROFILES:!1,xt=tt.ALLOW_ARIA_ATTR!==!1,mt=tt.ALLOW_DATA_ATTR!==!1,bt=tt.ALLOW_UNKNOWN_PROTOCOLS||!1,Tt=tt.ALLOW_SELF_CLOSE_IN_ATTR!==!1,_t=tt.SAFE_FOR_TEMPLATES||!1,Mt=tt.SAFE_FOR_XML!==!1,Et=tt.WHOLE_DOCUMENT||!1,ve=tt.RETURN_DOM||!1,Ee=tt.RETURN_DOM_FRAGMENT||!1,Ve=tt.RETURN_TRUSTED_TYPE||!1,zt=tt.FORCE_BODY||!1,ar=tt.SANITIZE_DOM!==!1,We=tt.SANITIZE_NAMED_PROPS||!1,Ae=tt.KEEP_CONTENT!==!1,sr=tt.IN_PLACE||!1,q=Iit(tt.ALLOWED_URI_REGEXP)?tt.ALLOWED_URI_REGEXP:XF,Nt=typeof tt.NAMESPACE=="string"?tt.NAMESPACE:Bt,gn=hr(tt,"MATHML_TEXT_INTEGRATION_POINTS")&&tt.MATHML_TEXT_INTEGRATION_POINTS&&typeof tt.MATHML_TEXT_INTEGRATION_POINTS=="object"?hi(tt.MATHML_TEXT_INTEGRATION_POINTS):le({},["mi","mo","mn","ms","mtext"]),mn=hr(tt,"HTML_INTEGRATION_POINTS")&&tt.HTML_INTEGRATION_POINTS&&typeof tt.HTML_INTEGRATION_POINTS=="object"?hi(tt.HTML_INTEGRATION_POINTS):le({},["annotation-xml"]);const wt=hr(tt,"CUSTOM_ELEMENT_HANDLING")&&tt.CUSTOM_ELEMENT_HANDLING&&typeof tt.CUSTOM_ELEMENT_HANDLING=="object"?hi(tt.CUSTOM_ELEMENT_HANDLING):al(null);if(J=al(null),hr(wt,"tagNameCheck")&&yn(wt.tagNameCheck)&&(J.tagNameCheck=wt.tagNameCheck),hr(wt,"attributeNameCheck")&&yn(wt.attributeNameCheck)&&(J.attributeNameCheck=wt.attributeNameCheck),hr(wt,"allowCustomizedBuiltInElements")&&typeof wt.allowCustomizedBuiltInElements=="boolean"&&(J.allowCustomizedBuiltInElements=wt.allowCustomizedBuiltInElements),_t&&(mt=!1),Ee&&(ve=!0),gt&&(G=le({},K3),H=al(null),gt.html===!0&&(le(G,Z3),le(H,J3)),gt.svg===!0&&(le(G,cC),le(H,dC),le(H,Zd)),gt.svgFilters===!0&&(le(G,uC),le(H,dC),le(H,Zd)),gt.mathMl===!0&&(le(G,hC),le(H,t4),le(H,Zd))),lt.tagCheck=null,lt.attributeCheck=null,hr(tt,"ADD_TAGS")&&(typeof tt.ADD_TAGS=="function"?lt.tagCheck=tt.ADD_TAGS:Xr(tt.ADD_TAGS)&&(G===Z&&(G=hi(G)),le(G,tt.ADD_TAGS,rr))),hr(tt,"ADD_ATTR")&&(typeof tt.ADD_ATTR=="function"?lt.attributeCheck=tt.ADD_ATTR:Xr(tt.ADD_ATTR)&&(H===Q&&(H=hi(H)),le(H,tt.ADD_ATTR,rr))),hr(tt,"ADD_URI_SAFE_ATTR")&&Xr(tt.ADD_URI_SAFE_ATTR)&&le(Xe,tt.ADD_URI_SAFE_ATTR,rr),hr(tt,"FORBID_CONTENTS")&&Xr(tt.FORBID_CONTENTS)&&(kt===Dt&&(kt=hi(kt)),le(kt,tt.FORBID_CONTENTS,rr)),hr(tt,"ADD_FORBID_CONTENTS")&&Xr(tt.ADD_FORBID_CONTENTS)&&(kt===Dt&&(kt=hi(kt)),le(kt,tt.ADD_FORBID_CONTENTS,rr)),Ae&&(G["#text"]=!0),Et&&le(G,["html","head","body"]),G.table&&(le(G,["tbody"]),delete et.tbody),tt.TRUSTED_TYPES_POLICY){if(typeof tt.TRUSTED_TYPES_POLICY.createHTML!="function")throw Qd('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof tt.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Qd('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');E=tt.TRUSTED_TYPES_POLICY,L=E.createHTML("")}else E===void 0&&(E=Xit(g,n)),E!==null&&typeof L=="string"&&(L=E.createHTML(""));Kr&&Kr(tt),Vi=tt},ps=le({},[...cC,...uC,...qit]),gs=le({},[...hC,...zit]),po=function(tt){let wt=k(tt);(!wt||!wt.tagName)&&(wt={namespaceURI:Nt,tagName:"template"});const Ot=vu(tt.tagName),me=vu(wt.tagName);return je[tt.namespaceURI]?tt.namespaceURI===Ht?wt.namespaceURI===Bt?Ot==="svg":wt.namespaceURI===Lt?Ot==="svg"&&(me==="annotation-xml"||gn[me]):!!ps[Ot]:tt.namespaceURI===Lt?wt.namespaceURI===Bt?Ot==="math":wt.namespaceURI===Ht?Ot==="math"&&mn[me]:!!gs[Ot]:tt.namespaceURI===Bt?wt.namespaceURI===Ht&&!mn[me]||wt.namespaceURI===Lt&&!gn[me]?!1:!gs[Ot]&&(Ca[Ot]||!ps[Ot]):!!(Yr==="application/xhtml+xml"&&je[tt.namespaceURI]):!1},Nr=function(tt){au(e.removed,{element:tt});try{k(tt).removeChild(tt)}catch{b(tt)}},xi=function(tt,wt){try{au(e.removed,{attribute:wt.getAttributeNode(tt),from:wt})}catch{au(e.removed,{attribute:null,from:wt})}if(wt.removeAttribute(tt),tt==="is")if(ve||Ee)try{Nr(wt)}catch{}else try{wt.setAttribute(tt,"")}catch{}},ms=function(tt){let wt=null,Ot=null;if(zt)tt="<remove></remove>"+tt;else{const Ue=V3(tt,/^[\r\n\t ]+/);Ot=Ue&&Ue[0]}Yr==="application/xhtml+xml"&&Nt===Bt&&(tt='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+tt+"</body></html>");const me=E?E.createHTML(tt):tt;if(Nt===Bt)try{wt=new m().parseFromString(me,Yr)}catch{}if(!wt||!wt.documentElement){wt=A.createDocument(Nt,"template",null);try{wt.documentElement.innerHTML=Ce?L:me}catch{}}const ue=wt.body||wt.documentElement;return tt&&Ot&&ue.insertBefore(r.createTextNode(Ot),ue.childNodes[0]||null),Nt===Bt?Y.call(wt,Et?"html":"body")[0]:Et?wt.documentElement:ue},ys=function(tt){return R.call(tt.ownerDocument||tt,tt,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},ti=function(tt){return tt instanceof p&&(typeof tt.nodeName!="string"||typeof tt.textContent!="string"||typeof tt.removeChild!="function"||!(tt.attributes instanceof d)||typeof tt.removeAttribute!="function"||typeof tt.setAttribute!="function"||typeof tt.namespaceURI!="string"||typeof tt.insertBefore!="function"||typeof tt.hasChildNodes!="function")},ir=function(tt){return typeof c=="function"&&tt instanceof c};function $e(Ut,tt,wt){nu(Ut,Ot=>{Ot.call(e,tt,wt,Vi)})}const Mi=function(tt){let wt=null;if($e(O.beforeSanitizeElements,tt,null),ti(tt))return Nr(tt),!0;const Ot=rr(tt.nodeName);if($e(O.uponSanitizeElement,tt,{tagName:Ot,allowedTags:G}),Mt&&tt.hasChildNodes()&&!ir(tt.firstElementChild)&&Ir(/<[/\w!]/g,tt.innerHTML)&&Ir(/<[/\w!]/g,tt.textContent)||Mt&&tt.namespaceURI===Bt&&Ot==="style"&&ir(tt.firstElementChild)||tt.nodeType===ou.progressingInstruction||Mt&&tt.nodeType===ou.comment&&Ir(/<[/\w]/g,tt.data))return Nr(tt),!0;if(et[Ot]||!(lt.tagCheck instanceof Function&&lt.tagCheck(Ot))&&!G[Ot]){if(!et[Ot]&&mo(Ot)&&(J.tagNameCheck instanceof RegExp&&Ir(J.tagNameCheck,Ot)||J.tagNameCheck instanceof Function&&J.tagNameCheck(Ot)))return!1;if(Ae&&!kt[Ot]){const me=k(tt)||tt.parentNode,ue=T(tt)||tt.childNodes;if(ue&&me){const Ue=ue.length;for(let _r=Ue-1;_r>=0;--_r){const or=v(ue[_r],!0);me.insertBefore(or,w(tt))}}}return Nr(tt),!0}return tt instanceof u&&!po(tt)||(Ot==="noscript"||Ot==="noembed"||Ot==="noframes")&&Ir(/<\/no(script|embed|frames)/i,tt.innerHTML)?(Nr(tt),!0):(_t&&tt.nodeType===ou.text&&(wt=tt.textContent,nu([z,X,M],me=>{wt=el(wt,me," ")}),tt.textContent!==wt&&(au(e.removed,{element:tt.cloneNode()}),tt.textContent=wt)),$e(O.afterSanitizeElements,tt,null),!1)},jn=function(tt,wt,Ot){if(at[wt]||ar&&(wt==="id"||wt==="name")&&(Ot in r||Ot in ds))return!1;const me=H[wt]||lt.attributeCheck instanceof Function&&lt.attributeCheck(wt,tt);if(!(mt&&!at[wt]&&Ir(I,wt))){if(!(xt&&Ir(N,wt))){if(!me||at[wt]){if(!(mo(tt)&&(J.tagNameCheck instanceof RegExp&&Ir(J.tagNameCheck,tt)||J.tagNameCheck instanceof Function&&J.tagNameCheck(tt))&&(J.attributeNameCheck instanceof RegExp&&Ir(J.attributeNameCheck,wt)||J.attributeNameCheck instanceof Function&&J.attributeNameCheck(wt,tt))||wt==="is"&&J.allowCustomizedBuiltInElements&&(J.tagNameCheck instanceof RegExp&&Ir(J.tagNameCheck,Ot)||J.tagNameCheck instanceof Function&&J.tagNameCheck(Ot))))return!1}else if(!Xe[wt]){if(!Ir(q,el(Ot,$,""))){if(!((wt==="src"||wt==="xlink:href"||wt==="href")&&tt!=="script"&&W3(Ot,"data:")===0&&ee[tt])){if(!(bt&&!Ir(P,el(Ot,$,"")))){if(Ot)return!1}}}}}}return!0},go=le({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),mo=function(tt){return!go[vu(tt)]&&Ir(D,tt)},xs=function(tt){$e(O.beforeSanitizeAttributes,tt,null);const{attributes:wt}=tt;if(!wt||ti(tt))return;const Ot={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H,forceKeepAttr:void 0};let me=wt.length;for(;me--;){const ue=wt[me],{name:Ue,namespaceURI:_r,value:or}=ue,gr=rr(Ue),bs=or;let Qe=Ue==="value"?bs:Mit(bs);if(Ot.attrName=gr,Ot.attrValue=Qe,Ot.keepAttr=!0,Ot.forceKeepAttr=void 0,$e(O.uponSanitizeAttribute,tt,Ot),Qe=Ot.attrValue,We&&(gr==="id"||gr==="name")&&W3(Qe,Me)!==0&&(xi(Ue,tt),Qe=Me+Qe),Mt&&Ir(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Qe)){xi(Ue,tt);continue}if(gr==="attributename"&&V3(Qe,"href")){xi(Ue,tt);continue}if(Ot.forceKeepAttr)continue;if(!Ot.keepAttr){xi(Ue,tt);continue}if(!Tt&&Ir(/\/>/i,Qe)){xi(Ue,tt);continue}_t&&nu([z,X,M],yo=>{Qe=el(Qe,yo," ")});const vs=rr(tt.nodeName);if(!jn(vs,gr,Qe)){xi(Ue,tt);continue}if(E&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!_r)switch(g.getAttributeType(vs,gr)){case"TrustedHTML":{Qe=E.createHTML(Qe);break}case"TrustedScriptURL":{Qe=E.createScriptURL(Qe);break}}if(Qe!==bs)try{_r?tt.setAttributeNS(_r,Ue,Qe):tt.setAttribute(Ue,Qe),ti(tt)?Nr(tt):Y3(e.removed)}catch{xi(Ue,tt)}}$e(O.afterSanitizeAttributes,tt,null)},xn=function(tt){let wt=null;const Ot=ys(tt);for($e(O.beforeSanitizeShadowDOM,tt,null);wt=Ot.nextNode();)$e(O.uponSanitizeShadowNode,wt,null),Mi(wt),xs(wt),wt.content instanceof s&&xn(wt.content);$e(O.afterSanitizeShadowDOM,tt,null)};return e.sanitize=function(Ut){let tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},wt=null,Ot=null,me=null,ue=null;if(Ce=!Ut,Ce&&(Ut="<!-->"),typeof Ut!="string"&&!ir(Ut)&&(Ut=Fit(Ut),typeof Ut!="string"))throw Qd("dirty is not a string, aborting");if(!e.isSupported)return Ut;if(Yt||fs(tt),e.removed=[],typeof Ut=="string"&&(sr=!1),sr){const or=Ut.nodeName;if(typeof or=="string"){const gr=rr(or);if(!G[gr]||et[gr])throw Qd("root node is forbidden and cannot be sanitized in-place")}}else if(Ut instanceof c)wt=ms("<!---->"),Ot=wt.ownerDocument.importNode(Ut,!0),Ot.nodeType===ou.element&&Ot.nodeName==="BODY"||Ot.nodeName==="HTML"?wt=Ot:wt.appendChild(Ot);else{if(!ve&&!_t&&!Et&&Ut.indexOf("<")===-1)return E&&Ve?E.createHTML(Ut):Ut;if(wt=ms(Ut),!wt)return ve?null:Ve?L:""}wt&&zt&&Nr(wt.firstChild);const Ue=ys(sr?Ut:wt);for(;me=Ue.nextNode();)Mi(me),xs(me),me.content instanceof s&&xn(me.content);if(sr)return Ut;if(ve){if(_t){wt.normalize();let or=wt.innerHTML;nu([z,X,M],gr=>{or=el(or,gr," ")}),wt.innerHTML=or}if(Ee)for(ue=j.call(wt.ownerDocument);wt.firstChild;)ue.appendChild(wt.firstChild);else ue=wt;return(H.shadowroot||H.shadowrootmode)&&(ue=V.call(i,ue,!0)),ue}let _r=Et?wt.outerHTML:wt.innerHTML;return Et&&G["!doctype"]&&wt.ownerDocument&&wt.ownerDocument.doctype&&wt.ownerDocument.doctype.name&&Ir(QF,wt.ownerDocument.doctype.name)&&(_r="<!DOCTYPE "+wt.ownerDocument.doctype.name+`>
291
+ `+_r),_t&&nu([z,X,M],or=>{_r=el(_r,or," ")}),E&&Ve?E.createHTML(_r):_r},e.setConfig=function(){let Ut=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};fs(Ut),Yt=!0},e.clearConfig=function(){Vi=null,Yt=!1},e.isValidAttribute=function(Ut,tt,wt){Vi||fs({});const Ot=rr(Ut),me=rr(tt);return jn(Ot,me,wt)},e.addHook=function(Ut,tt){typeof tt=="function"&&au(O[Ut],tt)},e.removeHook=function(Ut,tt){if(tt!==void 0){const wt=Bit(O[Ut],tt);return wt===-1?void 0:Lit(O[Ut],wt,1)[0]}return Y3(O[Ut])},e.removeHooks=function(Ut){O[Ut]=[]},e.removeAllHooks=function(){O=r4()},e}var Pl=ZF(),KF=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Nu=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Qit=/\s*%%.*\n/gm,Cl,JF=(Cl=class extends Error{constructor(e){super(e),this.name="UnknownDiagramError"}},B(Cl,"UnknownDiagramError"),Cl),eo={},$w=B(function(t,e){t=t.replace(KF,"").replace(Nu,"").replace(Qit,`
292
+ `);for(const[r,{detector:i}]of Object.entries(eo))if(i(t,e))return r;throw new JF(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),e2=B((...t)=>{for(const{id:e,detector:r,loader:i}of t)tI(e,r,i)},"registerLazyLoadedDiagrams"),tI=B((t,e,r)=>{eo[t]&&St.warn(`Detector with key ${t} already exists. Overwriting.`),eo[t]={detector:e,loader:r},St.debug(`Detector with key ${t} added${r?" with loader":""}`)},"addDetector"),Zit=B(t=>eo[t].loader,"getDiagramLoader"),r2=B((t,e,{depth:r=2,clobber:i=!1}={})=>{const n={depth:r,clobber:i};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(s=>r2(t,s,n)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(s=>{t.includes(s)||t.push(s)}),t):t===void 0||r<=0?t!=null&&typeof t=="object"&&typeof e=="object"?Object.assign(t,e):e:(e!==void 0&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(s=>{typeof e[s]=="object"&&e[s]!==null&&(t[s]===void 0||typeof t[s]=="object")?(t[s]===void 0&&(t[s]=Array.isArray(e[s])?[]:{}),t[s]=r2(t[s],e[s],{depth:r-1,clobber:i})):(i||typeof t[s]!="object"&&typeof e[s]!="object")&&(t[s]=e[s])}),t)},"assignWithDepth"),Ar=r2,In="#ffffff",qn="#f2f2f2",te=B((t,e)=>e?U(t,{s:-40,l:10}):U(t,{s:-40,l:-10}),"mkBorder"),wl,Kit=(wl=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var r,i,n,s,o,c,u,h,d,p,m,g,x,v,b,w,T,k,E,L,A,R,j,Y,V,O,z,X,M,I,N,P,$,D;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||U(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||U(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||te(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||te(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||te(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||nt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||nt(this.tertiaryColor),this.lineColor=this.lineColor||nt(this.background),this.arrowheadColor=this.arrowheadColor||nt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ft(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||nt(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||dt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||ft(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||ft(this.mainBkg,10)):(this.rowOdd=this.rowOdd||dt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||dt(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||U(this.primaryColor,{h:30}),this.cScale4=this.cScale4||U(this.primaryColor,{h:60}),this.cScale5=this.cScale5||U(this.primaryColor,{h:90}),this.cScale6=this.cScale6||U(this.primaryColor,{h:120}),this.cScale7=this.cScale7||U(this.primaryColor,{h:150}),this.cScale8=this.cScale8||U(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||U(this.primaryColor,{h:270}),this.cScale10=this.cScale10||U(this.primaryColor,{h:300}),this.cScale11=this.cScale11||U(this.primaryColor,{h:330}),this.darkMode)for(let q=0;q<this.THEME_COLOR_LIMIT;q++)this["cScale"+q]=ft(this["cScale"+q],75);else for(let q=0;q<this.THEME_COLOR_LIMIT;q++)this["cScale"+q]=ft(this["cScale"+q],25);for(let q=0;q<this.THEME_COLOR_LIMIT;q++)this["cScaleInv"+q]=this["cScaleInv"+q]||nt(this["cScale"+q]);for(let q=0;q<this.THEME_COLOR_LIMIT;q++)this.darkMode?this["cScalePeer"+q]=this["cScalePeer"+q]||dt(this["cScale"+q],10):this["cScalePeer"+q]=this["cScalePeer"+q]||ft(this["cScale"+q],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let q=0;q<this.THEME_COLOR_LIMIT;q++)this["cScaleLabel"+q]=this["cScaleLabel"+q]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let q=0;q<5;q++)this["surface"+q]=this["surface"+q]||U(this.mainBkg,{h:180,s:-15,l:e*(5+q*3)}),this["surfacePeer"+q]=this["surfacePeer"+q]||U(this.mainBkg,{h:180,s:-15,l:e*(8+q*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||U(this.primaryColor,{h:64}),this.fillType3=this.fillType3||U(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||U(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||U(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||U(this.primaryColor,{h:128}),this.fillType7=this.fillType7||U(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||U(this.primaryColor,{l:-10}),this.pie5=this.pie5||U(this.secondaryColor,{l:-10}),this.pie6=this.pie6||U(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||U(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||U(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||U(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||U(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||U(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||U(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??U(this.primaryColor,{l:-30}),this.venn2=this.venn2??U(this.secondaryColor,{l:-30}),this.venn3=this.venn3??U(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??U(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??U(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??U(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??U(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??U(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:((r=this.radar)==null?void 0:r.axisColor)||this.lineColor,axisStrokeWidth:((i=this.radar)==null?void 0:i.axisStrokeWidth)||2,axisLabelFontSize:((n=this.radar)==null?void 0:n.axisLabelFontSize)||12,curveOpacity:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((c=this.radar)==null?void 0:c.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((u=this.radar)==null?void 0:u.graticuleStrokeWidth)||1,graticuleOpacity:((h=this.radar)==null?void 0:h.graticuleOpacity)||.3,legendBoxSize:((d=this.radar)==null?void 0:d.legendBoxSize)||12,legendFontSize:((p=this.radar)==null?void 0:p.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((m=this.wardley)==null?void 0:m.backgroundColor)||this.background,axisColor:((g=this.wardley)==null?void 0:g.axisColor)||this.lineColor,axisTextColor:((x=this.wardley)==null?void 0:x.axisTextColor)||this.primaryTextColor,gridColor:((v=this.wardley)==null?void 0:v.gridColor)||this.gridColor,componentFill:((b=this.wardley)==null?void 0:b.componentFill)||this.background,componentStroke:((w=this.wardley)==null?void 0:w.componentStroke)||this.lineColor,componentLabelColor:((T=this.wardley)==null?void 0:T.componentLabelColor)||this.primaryTextColor,linkStroke:((k=this.wardley)==null?void 0:k.linkStroke)||this.lineColor,evolutionStroke:((E=this.wardley)==null?void 0:E.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((L=this.wardley)==null?void 0:L.annotationStroke)||this.lineColor,annotationTextColor:((A=this.wardley)==null?void 0:A.annotationTextColor)||this.primaryTextColor,annotationFill:((R=this.wardley)==null?void 0:R.annotationFill)||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||U(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||U(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||U(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||U(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||U(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||U(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||pn(this.quadrant1Fill)?dt(this.quadrant1Fill):ft(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((j=this.xyChart)==null?void 0:j.backgroundColor)||this.background,titleColor:((Y=this.xyChart)==null?void 0:Y.titleColor)||this.primaryTextColor,dataLabelColor:((V=this.xyChart)==null?void 0:V.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((O=this.xyChart)==null?void 0:O.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((z=this.xyChart)==null?void 0:z.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((X=this.xyChart)==null?void 0:X.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((M=this.xyChart)==null?void 0:M.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((I=this.xyChart)==null?void 0:I.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((N=this.xyChart)==null?void 0:N.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((P=this.xyChart)==null?void 0:P.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(($=this.xyChart)==null?void 0:$.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((D=this.xyChart)==null?void 0:D.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||U(this.primaryColor,{h:-30}),this.git4=this.git4||U(this.primaryColor,{h:-60}),this.git5=this.git5||U(this.primaryColor,{h:-90}),this.git6=this.git6||U(this.primaryColor,{h:60}),this.git7=this.git7||U(this.primaryColor,{h:120}),this.darkMode?(this.git0=dt(this.git0,25),this.git1=dt(this.git1,25),this.git2=dt(this.git2,25),this.git3=dt(this.git3,25),this.git4=dt(this.git4,25),this.git5=dt(this.git5,25),this.git6=dt(this.git6,25),this.git7=dt(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||nt(this.git0),this.gitInv1=this.gitInv1||nt(this.git1),this.gitInv2=this.gitInv2||nt(this.git2),this.gitInv3=this.gitInv3||nt(this.git3),this.gitInv4=this.gitInv4||nt(this.git4),this.gitInv5=this.gitInv5||nt(this.git5),this.gitInv6=this.gitInv6||nt(this.git6),this.gitInv7=this.gitInv7||nt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||In,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qn,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},B(wl,"Theme"),wl),Jit=B(t=>{const e=new Kit;return e.calculate(t),e},"getThemeVariables"),Sl,tnt=(Sl=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=dt(this.primaryColor,16),this.tertiaryColor=U(this.primaryColor,{h:-160}),this.primaryBorderColor=nt(this.background),this.secondaryBorderColor=te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=te(this.tertiaryColor,this.darkMode),this.primaryTextColor=nt(this.primaryColor),this.secondaryTextColor=nt(this.secondaryColor),this.tertiaryTextColor=nt(this.tertiaryColor),this.lineColor=nt(this.background),this.textColor=nt(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=dt(nt("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=rs(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=ft("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=ft(this.sectionBkgColor,10),this.taskBorderColor=rs(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=rs(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||dt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||ft(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){var e,r,i,n,s,o,c,u,h,d,p,m,g,x,v,b,w,T,k,E,L,A,R,j,Y,V,O,z,X,M,I,N,P,$;this.secondBkg=dt(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=dt(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=dt(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=nt(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=U(this.primaryColor,{h:64}),this.fillType3=U(this.secondaryColor,{h:64}),this.fillType4=U(this.primaryColor,{h:-64}),this.fillType5=U(this.secondaryColor,{h:-64}),this.fillType6=U(this.primaryColor,{h:128}),this.fillType7=U(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||U(this.primaryColor,{h:30}),this.cScale4=this.cScale4||U(this.primaryColor,{h:60}),this.cScale5=this.cScale5||U(this.primaryColor,{h:90}),this.cScale6=this.cScale6||U(this.primaryColor,{h:120}),this.cScale7=this.cScale7||U(this.primaryColor,{h:150}),this.cScale8=this.cScale8||U(this.primaryColor,{h:210}),this.cScale9=this.cScale9||U(this.primaryColor,{h:270}),this.cScale10=this.cScale10||U(this.primaryColor,{h:300}),this.cScale11=this.cScale11||U(this.primaryColor,{h:330});for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleInv"+D]=this["cScaleInv"+D]||nt(this["cScale"+D]);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScalePeer"+D]=this["cScalePeer"+D]||dt(this["cScale"+D],10);for(let D=0;D<5;D++)this["surface"+D]=this["surface"+D]||U(this.mainBkg,{h:30,s:-30,l:-(-10+D*4)}),this["surfacePeer"+D]=this["surfacePeer"+D]||U(this.mainBkg,{h:30,s:-30,l:-(-7+D*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleLabel"+D]=this["cScaleLabel"+D]||this.scaleLabelColor;for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["pie"+D]=this["cScale"+D];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let D=0;D<8;D++)this["venn"+(D+1)]=this["venn"+(D+1)]??dt(this["cScale"+D],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||U(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||U(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||U(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||U(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||U(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||U(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||pn(this.quadrant1Fill)?dt(this.quadrant1Fill):ft(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((e=this.xyChart)==null?void 0:e.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((i=this.xyChart)==null?void 0:i.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((s=this.xyChart)==null?void 0:s.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((p=this.xyChart)==null?void 0:p.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((m=this.xyChart)==null?void 0:m.plotColorPalette)||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:((g=this.radar)==null?void 0:g.axisColor)||this.lineColor,axisStrokeWidth:((x=this.radar)==null?void 0:x.axisStrokeWidth)||2,axisLabelFontSize:((v=this.radar)==null?void 0:v.axisLabelFontSize)||12,curveOpacity:((b=this.radar)==null?void 0:b.curveOpacity)||.5,curveStrokeWidth:((w=this.radar)==null?void 0:w.curveStrokeWidth)||2,graticuleColor:((T=this.radar)==null?void 0:T.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((k=this.radar)==null?void 0:k.graticuleStrokeWidth)||1,graticuleOpacity:((E=this.radar)==null?void 0:E.graticuleOpacity)||.3,legendBoxSize:((L=this.radar)==null?void 0:L.legendBoxSize)||12,legendFontSize:((A=this.radar)==null?void 0:A.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:((R=this.wardley)==null?void 0:R.backgroundColor)||this.background,axisColor:((j=this.wardley)==null?void 0:j.axisColor)||this.lineColor,axisTextColor:((Y=this.wardley)==null?void 0:Y.axisTextColor)||this.primaryTextColor,gridColor:((V=this.wardley)==null?void 0:V.gridColor)||this.gridColor,componentFill:((O=this.wardley)==null?void 0:O.componentFill)||this.mainBkg,componentStroke:((z=this.wardley)==null?void 0:z.componentStroke)||this.lineColor,componentLabelColor:((X=this.wardley)==null?void 0:X.componentLabelColor)||this.primaryTextColor,linkStroke:((M=this.wardley)==null?void 0:M.linkStroke)||this.lineColor,evolutionStroke:((I=this.wardley)==null?void 0:I.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((N=this.wardley)==null?void 0:N.annotationStroke)||this.lineColor,annotationTextColor:((P=this.wardley)==null?void 0:P.annotationTextColor)||this.primaryTextColor,annotationFill:(($=this.wardley)==null?void 0:$.annotationFill)||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=dt(this.secondaryColor,20),this.git1=dt(this.pie2||this.secondaryColor,20),this.git2=dt(this.pie3||this.tertiaryColor,20),this.git3=dt(this.pie4||U(this.primaryColor,{h:-30}),20),this.git4=dt(this.pie5||U(this.primaryColor,{h:-60}),20),this.git5=dt(this.pie6||U(this.primaryColor,{h:-90}),10),this.git6=dt(this.pie7||U(this.primaryColor,{h:60}),10),this.git7=dt(this.pie8||U(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||nt(this.git0),this.gitInv1=this.gitInv1||nt(this.git1),this.gitInv2=this.gitInv2||nt(this.git2),this.gitInv3=this.gitInv3||nt(this.git3),this.gitInv4=this.gitInv4||nt(this.git4),this.gitInv5=this.gitInv5||nt(this.git5),this.gitInv6=this.gitInv6||nt(this.git6),this.gitInv7=this.gitInv7||nt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||nt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||nt(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||dt("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||dt("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||dt("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||dt("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||dt(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||dt(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||dt(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||dt(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},B(Sl,"Theme"),Sl),ent=B(t=>{const e=new tnt;return e.calculate(t),e},"getThemeVariables"),kl,rnt=(kl=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=U(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=U(this.primaryColor,{h:-160}),this.primaryBorderColor=te(this.primaryColor,this.darkMode),this.secondaryBorderColor=te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=te(this.tertiaryColor,this.darkMode),this.primaryTextColor=nt(this.primaryColor),this.secondaryTextColor=nt(this.secondaryColor),this.tertiaryTextColor=nt(this.tertiaryColor),this.lineColor=nt(this.background),this.textColor=nt(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=te(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=rs(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){var e,r,i,n,s,o,c,u,h,d,p,m,g,x,v,b,w,T,k,E,L,A,R,j,Y,V,O,z,X,M,I,N,P,$;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||U(this.primaryColor,{h:30}),this.cScale4=this.cScale4||U(this.primaryColor,{h:60}),this.cScale5=this.cScale5||U(this.primaryColor,{h:90}),this.cScale6=this.cScale6||U(this.primaryColor,{h:120}),this.cScale7=this.cScale7||U(this.primaryColor,{h:150}),this.cScale8=this.cScale8||U(this.primaryColor,{h:210}),this.cScale9=this.cScale9||U(this.primaryColor,{h:270}),this.cScale10=this.cScale10||U(this.primaryColor,{h:300}),this.cScale11=this.cScale11||U(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||ft(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||ft(this.tertiaryColor,40);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScale"+D]=ft(this["cScale"+D],10),this["cScalePeer"+D]=this["cScalePeer"+D]||ft(this["cScale"+D],25);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleInv"+D]=this["cScaleInv"+D]||U(this["cScale"+D],{h:180});for(let D=0;D<5;D++)this["surface"+D]=this["surface"+D]||U(this.mainBkg,{h:30,l:-(5+D*5)}),this["surfacePeer"+D]=this["surfacePeer"+D]||U(this.mainBkg,{h:30,l:-(7+D*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||nt(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||nt(this.labelTextColor);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleLabel"+D]=this["cScaleLabel"+D]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||dt(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||dt(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=U(this.primaryColor,{h:64}),this.fillType3=U(this.secondaryColor,{h:64}),this.fillType4=U(this.primaryColor,{h:-64}),this.fillType5=U(this.secondaryColor,{h:-64}),this.fillType6=U(this.primaryColor,{h:128}),this.fillType7=U(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||U(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||U(this.primaryColor,{l:-10}),this.pie5=this.pie5||U(this.secondaryColor,{l:-30}),this.pie6=this.pie6||U(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||U(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||U(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||U(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||U(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||U(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||U(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??U(this.primaryColor,{l:-30}),this.venn2=this.venn2??U(this.secondaryColor,{l:-30}),this.venn3=this.venn3??U(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??U(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??U(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??U(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??U(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??U(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||U(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||U(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||U(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||U(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||U(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||U(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||pn(this.quadrant1Fill)?dt(this.quadrant1Fill):ft(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:((e=this.radar)==null?void 0:e.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((n=this.radar)==null?void 0:n.curveOpacity)||.5,curveStrokeWidth:((s=this.radar)==null?void 0:s.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((c=this.radar)==null?void 0:c.graticuleStrokeWidth)||1,graticuleOpacity:((u=this.radar)==null?void 0:u.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((d=this.radar)==null?void 0:d.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((p=this.wardley)==null?void 0:p.backgroundColor)||this.background,axisColor:((m=this.wardley)==null?void 0:m.axisColor)||this.lineColor,axisTextColor:((g=this.wardley)==null?void 0:g.axisTextColor)||this.primaryTextColor,gridColor:((x=this.wardley)==null?void 0:x.gridColor)||this.gridColor,componentFill:((v=this.wardley)==null?void 0:v.componentFill)||this.background,componentStroke:((b=this.wardley)==null?void 0:b.componentStroke)||this.lineColor,componentLabelColor:((w=this.wardley)==null?void 0:w.componentLabelColor)||this.primaryTextColor,linkStroke:((T=this.wardley)==null?void 0:T.linkStroke)||this.lineColor,evolutionStroke:((k=this.wardley)==null?void 0:k.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((E=this.wardley)==null?void 0:E.annotationStroke)||this.lineColor,annotationTextColor:((L=this.wardley)==null?void 0:L.annotationTextColor)||this.primaryTextColor,annotationFill:((A=this.wardley)==null?void 0:A.annotationFill)||this.background},this.xyChart={backgroundColor:((R=this.xyChart)==null?void 0:R.backgroundColor)||this.background,titleColor:((j=this.xyChart)==null?void 0:j.titleColor)||this.primaryTextColor,dataLabelColor:((Y=this.xyChart)==null?void 0:Y.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((V=this.xyChart)==null?void 0:V.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((O=this.xyChart)==null?void 0:O.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((z=this.xyChart)==null?void 0:z.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((X=this.xyChart)==null?void 0:X.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((M=this.xyChart)==null?void 0:M.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((I=this.xyChart)==null?void 0:I.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((N=this.xyChart)==null?void 0:N.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((P=this.xyChart)==null?void 0:P.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(($=this.xyChart)==null?void 0:$.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||U(this.primaryColor,{h:-30}),this.git4=this.git4||U(this.primaryColor,{h:-60}),this.git5=this.git5||U(this.primaryColor,{h:-90}),this.git6=this.git6||U(this.primaryColor,{h:60}),this.git7=this.git7||U(this.primaryColor,{h:120}),this.darkMode?(this.git0=dt(this.git0,25),this.git1=dt(this.git1,25),this.git2=dt(this.git2,25),this.git3=dt(this.git3,25),this.git4=dt(this.git4,25),this.git5=dt(this.git5,25),this.git6=dt(this.git6,25),this.git7=dt(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||ft(nt(this.git0),25),this.gitInv1=this.gitInv1||nt(this.git1),this.gitInv2=this.gitInv2||nt(this.git2),this.gitInv3=this.gitInv3||nt(this.git3),this.gitInv4=this.gitInv4||nt(this.git4),this.gitInv5=this.gitInv5||nt(this.git5),this.gitInv6=this.gitInv6||nt(this.git6),this.gitInv7=this.gitInv7||nt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||nt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||nt(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||In,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qn}calculate(e){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},B(kl,"Theme"),kl),int=B(t=>{const e=new rnt;return e.calculate(t),e},"getThemeVariables"),_l,nnt=(_l=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=dt("#cde498",10),this.primaryBorderColor=te(this.primaryColor,this.darkMode),this.secondaryBorderColor=te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=te(this.tertiaryColor,this.darkMode),this.primaryTextColor=nt(this.primaryColor),this.secondaryTextColor=nt(this.secondaryColor),this.tertiaryTextColor=nt(this.primaryColor),this.lineColor=nt(this.background),this.textColor=nt(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){var e,r,i,n,s,o,c,u,h,d,p,m,g,x,v,b,w,T,k,E,L,A,R,j,Y,V,O,z,X,M,I,N,P,$;this.actorBorder=ft(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||U(this.primaryColor,{h:30}),this.cScale4=this.cScale4||U(this.primaryColor,{h:60}),this.cScale5=this.cScale5||U(this.primaryColor,{h:90}),this.cScale6=this.cScale6||U(this.primaryColor,{h:120}),this.cScale7=this.cScale7||U(this.primaryColor,{h:150}),this.cScale8=this.cScale8||U(this.primaryColor,{h:210}),this.cScale9=this.cScale9||U(this.primaryColor,{h:270}),this.cScale10=this.cScale10||U(this.primaryColor,{h:300}),this.cScale11=this.cScale11||U(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||ft(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||ft(this.tertiaryColor,40);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScale"+D]=ft(this["cScale"+D],10),this["cScalePeer"+D]=this["cScalePeer"+D]||ft(this["cScale"+D],25);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleInv"+D]=this["cScaleInv"+D]||U(this["cScale"+D],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleLabel"+D]=this["cScaleLabel"+D]||this.scaleLabelColor;for(let D=0;D<5;D++)this["surface"+D]=this["surface"+D]||U(this.mainBkg,{h:30,s:-30,l:-(5+D*5)}),this["surfacePeer"+D]=this["surfacePeer"+D]||U(this.mainBkg,{h:30,s:-30,l:-(8+D*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||dt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||dt(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=U(this.primaryColor,{h:64}),this.fillType3=U(this.secondaryColor,{h:64}),this.fillType4=U(this.primaryColor,{h:-64}),this.fillType5=U(this.secondaryColor,{h:-64}),this.fillType6=U(this.primaryColor,{h:128}),this.fillType7=U(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||U(this.primaryColor,{l:-30}),this.pie5=this.pie5||U(this.secondaryColor,{l:-30}),this.pie6=this.pie6||U(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||U(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||U(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||U(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||U(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||U(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||U(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??U(this.primaryColor,{l:-30}),this.venn2=this.venn2??U(this.secondaryColor,{l:-30}),this.venn3=this.venn3??U(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??U(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??U(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??U(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??U(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??U(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||U(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||U(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||U(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||U(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||U(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||U(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||pn(this.quadrant1Fill)?dt(this.quadrant1Fill):ft(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:((e=this.radar)==null?void 0:e.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((n=this.radar)==null?void 0:n.curveOpacity)||.5,curveStrokeWidth:((s=this.radar)==null?void 0:s.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((c=this.radar)==null?void 0:c.graticuleStrokeWidth)||1,graticuleOpacity:((u=this.radar)==null?void 0:u.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((d=this.radar)==null?void 0:d.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((p=this.wardley)==null?void 0:p.backgroundColor)||this.background,axisColor:((m=this.wardley)==null?void 0:m.axisColor)||this.lineColor,axisTextColor:((g=this.wardley)==null?void 0:g.axisTextColor)||this.primaryTextColor,gridColor:((x=this.wardley)==null?void 0:x.gridColor)||this.gridColor,componentFill:((v=this.wardley)==null?void 0:v.componentFill)||this.background,componentStroke:((b=this.wardley)==null?void 0:b.componentStroke)||this.lineColor,componentLabelColor:((w=this.wardley)==null?void 0:w.componentLabelColor)||this.primaryTextColor,linkStroke:((T=this.wardley)==null?void 0:T.linkStroke)||this.lineColor,evolutionStroke:((k=this.wardley)==null?void 0:k.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((E=this.wardley)==null?void 0:E.annotationStroke)||this.lineColor,annotationTextColor:((L=this.wardley)==null?void 0:L.annotationTextColor)||this.primaryTextColor,annotationFill:((A=this.wardley)==null?void 0:A.annotationFill)||this.background},this.xyChart={backgroundColor:((R=this.xyChart)==null?void 0:R.backgroundColor)||this.background,titleColor:((j=this.xyChart)==null?void 0:j.titleColor)||this.primaryTextColor,dataLabelColor:((Y=this.xyChart)==null?void 0:Y.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((V=this.xyChart)==null?void 0:V.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((O=this.xyChart)==null?void 0:O.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((z=this.xyChart)==null?void 0:z.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((X=this.xyChart)==null?void 0:X.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((M=this.xyChart)==null?void 0:M.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((I=this.xyChart)==null?void 0:I.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((N=this.xyChart)==null?void 0:N.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((P=this.xyChart)==null?void 0:P.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(($=this.xyChart)==null?void 0:$.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||U(this.primaryColor,{h:-30}),this.git4=this.git4||U(this.primaryColor,{h:-60}),this.git5=this.git5||U(this.primaryColor,{h:-90}),this.git6=this.git6||U(this.primaryColor,{h:60}),this.git7=this.git7||U(this.primaryColor,{h:120}),this.darkMode?(this.git0=dt(this.git0,25),this.git1=dt(this.git1,25),this.git2=dt(this.git2,25),this.git3=dt(this.git3,25),this.git4=dt(this.git4,25),this.git5=dt(this.git5,25),this.git6=dt(this.git6,25),this.git7=dt(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||nt(this.git0),this.gitInv1=this.gitInv1||nt(this.git1),this.gitInv2=this.gitInv2||nt(this.git2),this.gitInv3=this.gitInv3||nt(this.git3),this.gitInv4=this.gitInv4||nt(this.git4),this.gitInv5=this.gitInv5||nt(this.git5),this.gitInv6=this.gitInv6||nt(this.git6),this.gitInv7=this.gitInv7||nt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||nt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||nt(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||In,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qn}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},B(_l,"Theme"),_l),ant=B(t=>{const e=new nnt;return e.calculate(t),e},"getThemeVariables"),Tl,snt=(Tl=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=dt(this.contrast,55),this.background="#ffffff",this.tertiaryColor=U(this.primaryColor,{h:-160}),this.primaryBorderColor=te(this.primaryColor,this.darkMode),this.secondaryBorderColor=te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=te(this.tertiaryColor,this.darkMode),this.primaryTextColor=nt(this.primaryColor),this.secondaryTextColor=nt(this.secondaryColor),this.tertiaryTextColor=nt(this.tertiaryColor),this.lineColor=nt(this.background),this.textColor=nt(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||dt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var e,r,i,n,s,o,c,u,h,d,p,m,g,x,v,b,w,T,k,E,L,A,R,j,Y,V,O,z,X,M,I,N,P,$;this.secondBkg=dt(this.contrast,55),this.border2=this.contrast,this.actorBorder=dt(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleInv"+D]=this["cScaleInv"+D]||nt(this["cScale"+D]);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this.darkMode?this["cScalePeer"+D]=this["cScalePeer"+D]||dt(this["cScale"+D],10):this["cScalePeer"+D]=this["cScalePeer"+D]||ft(this["cScale"+D],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleLabel"+D]=this["cScaleLabel"+D]||this.scaleLabelColor;for(let D=0;D<5;D++)this["surface"+D]=this["surface"+D]||U(this.mainBkg,{l:-(5+D*5)}),this["surfacePeer"+D]=this["surfacePeer"+D]||U(this.mainBkg,{l:-(8+D*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=dt(this.contrast,30),this.sectionBkgColor2=dt(this.contrast,30),this.taskBorderColor=ft(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=dt(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=ft(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=U(this.primaryColor,{h:64}),this.fillType3=U(this.secondaryColor,{h:64}),this.fillType4=U(this.primaryColor,{h:-64}),this.fillType5=U(this.secondaryColor,{h:-64}),this.fillType6=U(this.primaryColor,{h:128}),this.fillType7=U(this.secondaryColor,{h:128});for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["pie"+D]=this["cScale"+D];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let D=0;D<8;D++)this["venn"+(D+1)]=this["venn"+(D+1)]??this["cScale"+D];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||U(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||U(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||U(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||U(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||U(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||U(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||pn(this.quadrant1Fill)?dt(this.quadrant1Fill):ft(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((e=this.xyChart)==null?void 0:e.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((i=this.xyChart)==null?void 0:i.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((s=this.xyChart)==null?void 0:s.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((p=this.xyChart)==null?void 0:p.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((m=this.xyChart)==null?void 0:m.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((g=this.radar)==null?void 0:g.axisColor)||this.lineColor,axisStrokeWidth:((x=this.radar)==null?void 0:x.axisStrokeWidth)||2,axisLabelFontSize:((v=this.radar)==null?void 0:v.axisLabelFontSize)||12,curveOpacity:((b=this.radar)==null?void 0:b.curveOpacity)||.5,curveStrokeWidth:((w=this.radar)==null?void 0:w.curveStrokeWidth)||2,graticuleColor:((T=this.radar)==null?void 0:T.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((k=this.radar)==null?void 0:k.graticuleStrokeWidth)||1,graticuleOpacity:((E=this.radar)==null?void 0:E.graticuleOpacity)||.3,legendBoxSize:((L=this.radar)==null?void 0:L.legendBoxSize)||12,legendFontSize:((A=this.radar)==null?void 0:A.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((R=this.wardley)==null?void 0:R.backgroundColor)||this.background,axisColor:((j=this.wardley)==null?void 0:j.axisColor)||this.lineColor,axisTextColor:((Y=this.wardley)==null?void 0:Y.axisTextColor)||this.primaryTextColor,gridColor:((V=this.wardley)==null?void 0:V.gridColor)||this.gridColor,componentFill:((O=this.wardley)==null?void 0:O.componentFill)||this.background,componentStroke:((z=this.wardley)==null?void 0:z.componentStroke)||this.lineColor,componentLabelColor:((X=this.wardley)==null?void 0:X.componentLabelColor)||this.primaryTextColor,linkStroke:((M=this.wardley)==null?void 0:M.linkStroke)||this.lineColor,evolutionStroke:((I=this.wardley)==null?void 0:I.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((N=this.wardley)==null?void 0:N.annotationStroke)||this.lineColor,annotationTextColor:((P=this.wardley)==null?void 0:P.annotationTextColor)||this.primaryTextColor,annotationFill:(($=this.wardley)==null?void 0:$.annotationFill)||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=ft(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||U(this.primaryColor,{h:-30}),this.git4=this.pie5||U(this.primaryColor,{h:-60}),this.git5=this.pie6||U(this.primaryColor,{h:-90}),this.git6=this.pie7||U(this.primaryColor,{h:60}),this.git7=this.pie8||U(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||nt(this.git0),this.gitInv1=this.gitInv1||nt(this.git1),this.gitInv2=this.gitInv2||nt(this.git2),this.gitInv3=this.gitInv3||nt(this.git3),this.gitInv4=this.gitInv4||nt(this.git4),this.gitInv5=this.gitInv5||nt(this.git5),this.gitInv6=this.gitInv6||nt(this.git6),this.gitInv7=this.gitInv7||nt(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||In,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qn}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},B(Tl,"Theme"),Tl),ont=B(t=>{const e=new snt;return e.calculate(t),e},"getThemeVariables"),El,lnt=(El=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=te(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var s,o,c,u,h,d,p,m,g,x,v;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||U(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||U(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||te(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||te(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||te(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||nt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||nt(this.tertiaryColor),this.lineColor=this.lineColor||nt(this.background),this.arrowheadColor=this.arrowheadColor||nt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ft(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||nt(this.lineColor);const e="#ECECFE",r="#E9E9F1",i=U(e,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||dt(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||e,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||U(e,{h:30}),this.cScale4=this.cScale4||U(e,{h:60}),this.cScale5=this.cScale5||U(e,{h:90}),this.cScale6=this.cScale6||U(e,{h:120}),this.cScale7=this.cScale7||U(e,{h:150}),this.cScale8=this.cScale8||U(e,{h:210,l:150}),this.cScale9=this.cScale9||U(e,{h:270}),this.cScale10=this.cScale10||U(e,{h:300}),this.cScale11=this.cScale11||U(e,{h:330}),this.darkMode)for(let b=0;b<this.THEME_COLOR_LIMIT;b++)this["cScale"+b]=ft(this["cScale"+b],75);else for(let b=0;b<this.THEME_COLOR_LIMIT;b++)this["cScale"+b]=ft(this["cScale"+b],25);for(let b=0;b<this.THEME_COLOR_LIMIT;b++)this["cScaleInv"+b]=this["cScaleInv"+b]||nt(this["cScale"+b]);for(let b=0;b<this.THEME_COLOR_LIMIT;b++)this.darkMode?this["cScalePeer"+b]=this["cScalePeer"+b]||dt(this["cScale"+b],10):this["cScalePeer"+b]=this["cScalePeer"+b]||ft(this["cScale"+b],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let b=0;b<this.THEME_COLOR_LIMIT;b++)this["cScaleLabel"+b]=this["cScaleLabel"+b]||this.scaleLabelColor;const n=this.darkMode?-4:-1;for(let b=0;b<5;b++)this["surface"+b]=this["surface"+b]||U(this.mainBkg,{h:180,s:-15,l:n*(5+b*3)}),this["surfacePeer"+b]=this["surfacePeer"+b]||U(this.mainBkg,{h:180,s:-15,l:n*(8+b*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||U(e,{h:64}),this.fillType3=this.fillType3||U(r,{h:64}),this.fillType4=this.fillType4||U(e,{h:-64}),this.fillType5=this.fillType5||U(r,{h:-64}),this.fillType6=this.fillType6||U(e,{h:128}),this.fillType7=this.fillType7||U(r,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||U(e,{l:-10}),this.pie5=this.pie5||U(r,{l:-10}),this.pie6=this.pie6||U(i,{l:-10}),this.pie7=this.pie7||U(e,{h:60,l:-10}),this.pie8=this.pie8||U(e,{h:-60,l:-10}),this.pie9=this.pie9||U(e,{h:120,l:0}),this.pie10=this.pie10||U(e,{h:60,l:-20}),this.pie11=this.pie11||U(e,{h:-60,l:-20}),this.pie12=this.pie12||U(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||U(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||U(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||U(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||U(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||U(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||U(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||pn(this.quadrant1Fill)?dt(this.quadrant1Fill):ft(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((s=this.xyChart)==null?void 0:s.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((c=this.xyChart)==null?void 0:c.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((u=this.xyChart)==null?void 0:u.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((d=this.xyChart)==null?void 0:d.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((p=this.xyChart)==null?void 0:p.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((m=this.xyChart)==null?void 0:m.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((g=this.xyChart)==null?void 0:g.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((x=this.xyChart)==null?void 0:x.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((v=this.xyChart)==null?void 0:v.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||U(e,{h:-30}),this.git4=this.git4||U(e,{h:-60}),this.git5=this.git5||U(e,{h:-90}),this.git6=this.git6||U(e,{h:60}),this.git7=this.git7||U(e,{h:120}),this.darkMode?(this.git0=dt(this.git0,25),this.git1=dt(this.git1,25),this.git2=dt(this.git2,25),this.git3=dt(this.git3,25),this.git4=dt(this.git4,25),this.git5=dt(this.git5,25),this.git6=dt(this.git6,25),this.git7=dt(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||nt(this.git0),this.gitInv1=this.gitInv1||nt(this.git1),this.gitInv2=this.gitInv2||nt(this.git2),this.gitInv3=this.gitInv3||nt(this.git3),this.gitInv4=this.gitInv4||nt(this.git4),this.gitInv5=this.gitInv5||nt(this.git5),this.gitInv6=this.gitInv6||nt(this.git6),this.gitInv7=this.gitInv7||nt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||In,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qn}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},B(El,"Theme"),El),cnt=B(t=>{const e=new lnt;return e.calculate(t),e},"getThemeVariables"),Al,unt=(Al=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=dt(this.primaryColor,16),this.tertiaryColor=U(this.primaryColor,{h:-160}),this.primaryBorderColor=nt(this.background),this.secondaryBorderColor=te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=te(this.tertiaryColor,this.darkMode),this.primaryTextColor=nt(this.primaryColor),this.secondaryTextColor=nt(this.secondaryColor),this.tertiaryTextColor=nt(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=dt(nt("#323D47"),10),this.border1="#ccc",this.border2=rs(255,255,255,.25),this.arrowheadColor=nt(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var r,i,n,s,o,c,u,h,d,p,m;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||U(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||U(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||te(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||te(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||te(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||nt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||nt(this.tertiaryColor),this.lineColor=this.lineColor||nt(this.background),this.arrowheadColor=this.arrowheadColor||nt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ft(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||nt(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||dt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||U(this.primaryColor,{h:30}),this.cScale4=this.cScale4||U(this.primaryColor,{h:60}),this.cScale5=this.cScale5||U(this.primaryColor,{h:90}),this.cScale6=this.cScale6||U(this.primaryColor,{h:120}),this.cScale7=this.cScale7||U(this.primaryColor,{h:150}),this.cScale8=this.cScale8||U(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||U(this.primaryColor,{h:270}),this.cScale10=this.cScale10||U(this.primaryColor,{h:300}),this.cScale11=this.cScale11||U(this.primaryColor,{h:330}),this.darkMode)for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScale"+g]=ft(this["cScale"+g],75);else for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScale"+g]=ft(this["cScale"+g],25);for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScaleInv"+g]=this["cScaleInv"+g]||nt(this["cScale"+g]);for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this.darkMode?this["cScalePeer"+g]=this["cScalePeer"+g]||dt(this["cScale"+g],10):this["cScalePeer"+g]=this["cScalePeer"+g]||ft(this["cScale"+g],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScaleLabel"+g]=this["cScaleLabel"+g]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let g=0;g<5;g++)this["surface"+g]=this["surface"+g]||U(this.mainBkg,{h:180,s:-15,l:e*(5+g*3)}),this["surfacePeer"+g]=this["surfacePeer"+g]||U(this.mainBkg,{h:180,s:-15,l:e*(8+g*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||U(this.primaryColor,{h:64}),this.fillType3=this.fillType3||U(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||U(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||U(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||U(this.primaryColor,{h:128}),this.fillType7=this.fillType7||U(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||U(this.primaryColor,{l:-10}),this.pie5=this.pie5||U(this.secondaryColor,{l:-10}),this.pie6=this.pie6||U(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||U(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||U(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||U(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||U(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||U(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||U(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||U(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||U(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||U(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||U(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||U(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||U(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||pn(this.quadrant1Fill)?dt(this.quadrant1Fill):ft(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((s=this.xyChart)==null?void 0:s.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((p=this.xyChart)==null?void 0:p.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((m=this.xyChart)==null?void 0:m.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=dt(this.git0,25),this.git1=dt(this.git1,25),this.git2=dt(this.git2,25),this.git3=dt(this.git3,25),this.git4=dt(this.git4,25),this.git5=dt(this.git5,25),this.git6=dt(this.git6,25),this.git7=dt(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||nt(this.git0),this.gitInv1=this.gitInv1||nt(this.git1),this.gitInv2=this.gitInv2||nt(this.git2),this.gitInv3=this.gitInv3||nt(this.git3),this.gitInv4=this.gitInv4||nt(this.git4),this.gitInv5=this.gitInv5||nt(this.git5),this.gitInv6=this.gitInv6||nt(this.git6),this.gitInv7=this.gitInv7||nt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||In,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qn}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},B(Al,"Theme"),Al),hnt=B(t=>{const e=new unt;return e.calculate(t),e},"getThemeVariables"),Bl,dnt=(Bl=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=te("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){var s,o,c,u,h,d,p,m,g,x,v;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||U(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||U(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||te(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||te(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||te(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||nt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||nt(this.tertiaryColor),this.lineColor=this.lineColor||nt(this.background),this.arrowheadColor=this.arrowheadColor||nt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ft(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||nt(this.lineColor);const e="#ECECFE",r="#E9E9F1",i=U(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||dt(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let b=0;b<this.THEME_COLOR_LIMIT;b++)this["cScale"+b]=this.mainBkg;if(this.darkMode)for(let b=0;b<this.THEME_COLOR_LIMIT;b++)this["cScale"+b]=ft(this["cScale"+b],75);else for(let b=0;b<this.THEME_COLOR_LIMIT;b++)this["cScale"+b]=ft(this["cScale"+b],25);for(let b=0;b<this.THEME_COLOR_LIMIT;b++)this["cScaleInv"+b]=this["cScaleInv"+b]||nt(this["cScale"+b]);for(let b=0;b<this.THEME_COLOR_LIMIT;b++)this.darkMode?this["cScalePeer"+b]=this["cScalePeer"+b]||dt(this["cScale"+b],10):this["cScalePeer"+b]=this["cScalePeer"+b]||ft(this["cScale"+b],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let b=0;b<this.THEME_COLOR_LIMIT;b++)this["cScaleLabel"+b]=this["cScaleLabel"+b]||this.scaleLabelColor;const n=this.darkMode?-4:-1;for(let b=0;b<5;b++)this["surface"+b]=this["surface"+b]||U(this.mainBkg,{h:180,s:-15,l:n*(5+b*3)}),this["surfacePeer"+b]=this["surfacePeer"+b]||U(this.mainBkg,{h:180,s:-15,l:n*(8+b*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||U(e,{h:64}),this.fillType3=this.fillType3||U(r,{h:64}),this.fillType4=this.fillType4||U(e,{h:-64}),this.fillType5=this.fillType5||U(r,{h:-64}),this.fillType6=this.fillType6||U(e,{h:128}),this.fillType7=this.fillType7||U(r,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||U(e,{l:-10}),this.pie5=this.pie5||U(r,{l:-10}),this.pie6=this.pie6||U(i,{l:-10}),this.pie7=this.pie7||U(e,{h:60,l:-10}),this.pie8=this.pie8||U(e,{h:-60,l:-10}),this.pie9=this.pie9||U(e,{h:120,l:0}),this.pie10=this.pie10||U(e,{h:60,l:-20}),this.pie11=this.pie11||U(e,{h:-60,l:-20}),this.pie12=this.pie12||U(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||U(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||U(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||U(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||U(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||U(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||U(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||pn(this.quadrant1Fill)?dt(this.quadrant1Fill):ft(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((s=this.xyChart)==null?void 0:s.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((c=this.xyChart)==null?void 0:c.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((u=this.xyChart)==null?void 0:u.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((d=this.xyChart)==null?void 0:d.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((p=this.xyChart)==null?void 0:p.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((m=this.xyChart)==null?void 0:m.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((g=this.xyChart)==null?void 0:g.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((x=this.xyChart)==null?void 0:x.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((v=this.xyChart)==null?void 0:v.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||e,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||U(e,{h:-30}),this.git4=this.git4||U(e,{h:-60}),this.git5=this.git5||U(e,{h:-90}),this.git6=this.git6||U(e,{h:60}),this.git7=this.git7||U(e,{h:120}),this.darkMode?(this.git0=dt(this.git0,25),this.git1=dt(this.git1,25),this.git2=dt(this.git2,25),this.git3=dt(this.git3,25),this.git4=dt(this.git4,25),this.git5=dt(this.git5,25),this.git6=dt(this.git6,25),this.git7=dt(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||nt(this.git0),this.gitInv1=this.gitInv1||nt(this.git1),this.gitInv2=this.gitInv2||nt(this.git2),this.gitInv3=this.gitInv3||nt(this.git3),this.gitInv4=this.gitInv4||nt(this.git4),this.gitInv5=this.gitInv5||nt(this.git5),this.gitInv6=this.gitInv6||nt(this.git6),this.gitInv7=this.gitInv7||nt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||In,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qn}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},B(Bl,"Theme"),Bl),fnt=B(t=>{const e=new dnt;return e.calculate(t),e},"getThemeVariables"),Ll,pnt=(Ll=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=dt(this.primaryColor,16),this.tertiaryColor=U(this.primaryColor,{h:-160}),this.primaryBorderColor=nt(this.background),this.secondaryBorderColor=te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=te(this.tertiaryColor,this.darkMode),this.primaryTextColor=nt(this.primaryColor),this.secondaryTextColor=nt(this.secondaryColor),this.tertiaryTextColor=nt(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=dt(nt("#323D47"),10),this.border1="#ccc",this.border2=rs(255,255,255,.25),this.arrowheadColor=nt(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){var r,i,n,s,o,c,u,h,d,p,m;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||U(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||U(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||te(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||te(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||te(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||nt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||nt(this.tertiaryColor),this.lineColor=this.lineColor||nt(this.background),this.arrowheadColor=this.arrowheadColor||nt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ft(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||nt(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||dt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||U(this.primaryColor,{h:30}),this.cScale4=this.cScale4||U(this.primaryColor,{h:60}),this.cScale5=this.cScale5||U(this.primaryColor,{h:90}),this.cScale6=this.cScale6||U(this.primaryColor,{h:120}),this.cScale7=this.cScale7||U(this.primaryColor,{h:150}),this.cScale8=this.cScale8||U(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||U(this.primaryColor,{h:270}),this.cScale10=this.cScale10||U(this.primaryColor,{h:300}),this.cScale11=this.cScale11||U(this.primaryColor,{h:330}),this.darkMode)for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScale"+g]=ft(this["cScale"+g],75);else for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScale"+g]=ft(this["cScale"+g],25);for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScaleInv"+g]=this["cScaleInv"+g]||nt(this["cScale"+g]);for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this.darkMode?this["cScalePeer"+g]=this["cScalePeer"+g]||dt(this["cScale"+g],10):this["cScalePeer"+g]=this["cScalePeer"+g]||ft(this["cScale"+g],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScaleLabel"+g]=this["cScaleLabel"+g]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let g=0;g<5;g++)this["surface"+g]=this["surface"+g]||U(this.mainBkg,{h:180,s:-15,l:e*(5+g*3)}),this["surfacePeer"+g]=this["surfacePeer"+g]||U(this.mainBkg,{h:180,s:-15,l:e*(8+g*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||U(this.primaryColor,{h:64}),this.fillType3=this.fillType3||U(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||U(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||U(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||U(this.primaryColor,{h:128}),this.fillType7=this.fillType7||U(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||U(this.primaryColor,{l:-10}),this.pie5=this.pie5||U(this.secondaryColor,{l:-10}),this.pie6=this.pie6||U(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||U(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||U(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||U(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||U(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||U(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||U(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||U(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||U(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||U(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||U(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||U(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||U(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||pn(this.quadrant1Fill)?dt(this.quadrant1Fill):ft(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((s=this.xyChart)==null?void 0:s.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((p=this.xyChart)==null?void 0:p.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((m=this.xyChart)==null?void 0:m.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||U(this.primaryColor,{h:-30}),this.git4=this.git4||U(this.primaryColor,{h:-60}),this.git5=this.git5||U(this.primaryColor,{h:-90}),this.git6=this.git6||U(this.primaryColor,{h:60}),this.git7=this.git7||U(this.primaryColor,{h:120}),this.darkMode?(this.git0=dt(this.git0,25),this.git1=dt(this.git1,25),this.git2=dt(this.git2,25),this.git3=dt(this.git3,25),this.git4=dt(this.git4,25),this.git5=dt(this.git5,25),this.git6=dt(this.git6,25),this.git7=dt(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||nt(this.git0),this.gitInv1=this.gitInv1||nt(this.git1),this.gitInv2=this.gitInv2||nt(this.git2),this.gitInv3=this.gitInv3||nt(this.git3),this.gitInv4=this.gitInv4||nt(this.git4),this.gitInv5=this.gitInv5||nt(this.git5),this.gitInv6=this.gitInv6||nt(this.git6),this.gitInv7=this.gitInv7||nt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||In,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qn}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},B(Ll,"Theme"),Ll),gnt=B(t=>{const e=new pnt;return e.calculate(t),e},"getThemeVariables"),Ml,mnt=(Ml=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=te(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){var s,o,c,u,h,d,p,m,g,x,v;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||U(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||U(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||te(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||te(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||te(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||nt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||nt(this.tertiaryColor),this.lineColor=this.lineColor||nt(this.background),this.arrowheadColor=this.arrowheadColor||nt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ft(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||nt(this.lineColor);const e="#ECECFE",r="#E9E9F1",i=U(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||dt(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let b=0;b<this.THEME_COLOR_LIMIT;b++)this["cScaleInv"+b]=this["cScaleInv"+b]||nt(this["cScale"+b]);for(let b=0;b<this.THEME_COLOR_LIMIT;b++)this.darkMode?this["cScalePeer"+b]=this["cScalePeer"+b]||dt(this["cScale"+b],10):this["cScalePeer"+b]=this["cScalePeer"+b]||ft(this["cScale"+b],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let b=0;b<this.THEME_COLOR_LIMIT;b++)this["cScaleLabel"+b]=this["cScaleLabel"+b]||this.scaleLabelColor;const n=this.darkMode?-4:-1;for(let b=0;b<5;b++)this["surface"+b]=this["surface"+b]||U(this.mainBkg,{h:180,s:-15,l:n*(5+b*3)}),this["surfacePeer"+b]=this["surfacePeer"+b]||U(this.mainBkg,{h:180,s:-15,l:n*(8+b*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||U(e,{h:64}),this.fillType3=this.fillType3||U(r,{h:64}),this.fillType4=this.fillType4||U(e,{h:-64}),this.fillType5=this.fillType5||U(r,{h:-64}),this.fillType6=this.fillType6||U(e,{h:128}),this.fillType7=this.fillType7||U(r,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||U(e,{l:-10}),this.pie5=this.pie5||U(r,{l:-10}),this.pie6=this.pie6||U(i,{l:-10}),this.pie7=this.pie7||U(e,{h:60,l:-10}),this.pie8=this.pie8||U(e,{h:-60,l:-10}),this.pie9=this.pie9||U(e,{h:120,l:0}),this.pie10=this.pie10||U(e,{h:60,l:-20}),this.pie11=this.pie11||U(e,{h:-60,l:-20}),this.pie12=this.pie12||U(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||U(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||U(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||U(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||U(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||U(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||U(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||pn(this.quadrant1Fill)?dt(this.quadrant1Fill):ft(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((s=this.xyChart)==null?void 0:s.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((c=this.xyChart)==null?void 0:c.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((u=this.xyChart)==null?void 0:u.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((d=this.xyChart)==null?void 0:d.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((p=this.xyChart)==null?void 0:p.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((m=this.xyChart)==null?void 0:m.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((g=this.xyChart)==null?void 0:g.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((x=this.xyChart)==null?void 0:x.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((v=this.xyChart)==null?void 0:v.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||U(e,{h:-30}),this.git4=this.git4||U(e,{h:-60}),this.git5=this.git5||U(e,{h:-90}),this.git6=this.git6||U(e,{h:60}),this.git7=this.git7||U(e,{h:120}),this.darkMode?(this.git0=dt(this.git0,25),this.git1=dt(this.git1,25),this.git2=dt(this.git2,25),this.git3=dt(this.git3,25),this.git4=dt(this.git4,25),this.git5=dt(this.git5,25),this.git6=dt(this.git6,25),this.git7=dt(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||nt(this.git0),this.gitInv1=this.gitInv1||nt(this.git1),this.gitInv2=this.gitInv2||nt(this.git2),this.gitInv3=this.gitInv3||nt(this.git3),this.gitInv4=this.gitInv4||nt(this.git4),this.gitInv5=this.gitInv5||nt(this.git5),this.gitInv6=this.gitInv6||nt(this.git6),this.gitInv7=this.gitInv7||nt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||In,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qn}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},B(Ml,"Theme"),Ml),ynt=B(t=>{const e=new mnt;return e.calculate(t),e},"getThemeVariables"),Nl,xnt=(Nl=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=dt(this.primaryColor,16),this.tertiaryColor=U(this.primaryColor,{h:-160}),this.primaryBorderColor=nt(this.background),this.secondaryBorderColor=te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=te(this.tertiaryColor,this.darkMode),this.primaryTextColor=nt(this.primaryColor),this.secondaryTextColor=nt(this.secondaryColor),this.tertiaryTextColor=nt(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=dt(nt("#323D47"),10),this.border1="#ccc",this.border2=rs(255,255,255,.25),this.arrowheadColor=nt(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){var r,i,n,s,o,c,u,h,d,p,m;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||U(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||U(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||te(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||te(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||te(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||nt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||nt(this.tertiaryColor),this.lineColor=this.lineColor||nt(this.background),this.arrowheadColor=this.arrowheadColor||nt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ft(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||nt(this.lineColor),this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||dt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScaleInv"+g]=this["cScaleInv"+g]||nt(this["cScale"+g]);for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this.darkMode?this["cScalePeer"+g]=this["cScalePeer"+g]||dt(this["cScale"+g],10):this["cScalePeer"+g]=this["cScalePeer"+g]||ft(this["cScale"+g],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScaleLabel"+g]=ft(this["cScale"+g],75);const e=this.darkMode?-4:-1;for(let g=0;g<5;g++)this["surface"+g]=this["surface"+g]||U(this.mainBkg,{h:180,s:-15,l:e*(5+g*3)}),this["surfacePeer"+g]=this["surfacePeer"+g]||U(this.mainBkg,{h:180,s:-15,l:e*(8+g*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||U(this.primaryColor,{h:64}),this.fillType3=this.fillType3||U(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||U(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||U(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||U(this.primaryColor,{h:128}),this.fillType7=this.fillType7||U(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||U(this.primaryColor,{l:-10}),this.pie5=this.pie5||U(this.secondaryColor,{l:-10}),this.pie6=this.pie6||U(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||U(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||U(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||U(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||U(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||U(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||U(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||U(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||U(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||U(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||U(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||U(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||U(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||pn(this.quadrant1Fill)?dt(this.quadrant1Fill):ft(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((s=this.xyChart)==null?void 0:s.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((p=this.xyChart)==null?void 0:p.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((m=this.xyChart)==null?void 0:m.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||U(this.primaryColor,{h:-30}),this.git4=this.git4||U(this.primaryColor,{h:-60}),this.git5=this.git5||U(this.primaryColor,{h:-90}),this.git6=this.git6||U(this.primaryColor,{h:60}),this.git7=this.git7||U(this.primaryColor,{h:120}),this.darkMode?(this.git0=dt(this.git0,25),this.git1=dt(this.git1,25),this.git2=dt(this.git2,25),this.git3=dt(this.git3,25),this.git4=dt(this.git4,25),this.git5=dt(this.git5,25),this.git6=dt(this.git6,25),this.git7=dt(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||nt(this.git0),this.gitInv1=this.gitInv1||nt(this.git1),this.gitInv2=this.gitInv2||nt(this.git2),this.gitInv3=this.gitInv3||nt(this.git3),this.gitInv4=this.gitInv4||nt(this.git4),this.gitInv5=this.gitInv5||nt(this.git5),this.gitInv6=this.gitInv6||nt(this.git6),this.gitInv7=this.gitInv7||nt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||In,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qn}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},B(Nl,"Theme"),Nl),bnt=B(t=>{const e=new xnt;return e.calculate(t),e},"getThemeVariables"),ua={base:{getThemeVariables:Jit},dark:{getThemeVariables:ent},default:{getThemeVariables:int},forest:{getThemeVariables:ant},neutral:{getThemeVariables:ont},neo:{getThemeVariables:cnt},"neo-dark":{getThemeVariables:hnt},redux:{getThemeVariables:fnt},"redux-dark":{getThemeVariables:gnt},"redux-color":{getThemeVariables:ynt},"redux-dark-color":{getThemeVariables:bnt}},Wr={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},eI={...Wr,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:ua.default.getThemeVariables(),sequence:{...Wr.sequence,messageFont:B(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:B(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:B(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Wr.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Wr.c4,useWidth:void 0,personFont:B(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Wr.flowchart,inheritDir:!1},external_personFont:B(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:B(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:B(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:B(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:B(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:B(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:B(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:B(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:B(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:B(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:B(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:B(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:B(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:B(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:B(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:B(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:B(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:B(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:B(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:B(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:B(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Wr.pie,useWidth:984},xyChart:{...Wr.xyChart,useWidth:void 0},requirement:{...Wr.requirement,useWidth:void 0},packet:{...Wr.packet},eventmodeling:{...Wr.eventmodeling},treeView:{...Wr.treeView,useWidth:void 0},radar:{...Wr.radar},ishikawa:{...Wr.ishikawa},sankey:{...Wr.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...Wr.venn}},rI=B((t,e="")=>Object.keys(t).reduce((r,i)=>Array.isArray(t[i])?r:typeof t[i]=="object"&&t[i]!==null?[...r,e+i,...rI(t[i],"")]:[...r,e+i],[]),"keyify"),vnt=new Set(rI(eI,"")),iI=eI,$f=B(t=>{if(St.debug("sanitizeDirective called with",t),!(typeof t!="object"||t==null)){if(Array.isArray(t)){t.forEach(e=>$f(e));return}for(const e of Object.keys(t)){if(St.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!vnt.has(e)||t[e]==null){St.debug("sanitize deleting key: ",e),delete t[e];continue}if(typeof t[e]=="object"){if(e==="nodeColors"){const i=/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i;for(const n of Object.keys(t[e]))(typeof t[e][n]!="string"||!i.test(t[e][n]))&&(St.debug("sanitize deleting invalid color:",n,t[e][n]),delete t[e][n])}else St.debug("sanitizing object",e),$f(t[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)e.includes(i)&&(St.debug("sanitizing css option",e),t[e]=nI(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}St.debug("After sanitization",t)}},"sanitizeDirective"),nI=B(t=>{let e=0,r=0;for(const i of t){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?e++:i==="}"&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t},"sanitizeCss"),Hl=Object.freeze(iI),ya=B(t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),di=Ar({},Hl),Pf,ro=[],Ou=Ar({},Hl),Yp=B((t,e)=>{let r=Ar({},t),i={};for(const n of e)oI(n),i=Ar(i,n);if(r=Ar(r,i),i.theme&&i.theme in ua){const n=Ar({},Pf),s=Ar(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in ua&&(r.themeVariables=ua[r.theme].getThemeVariables(s))}return Ou=r,cI(Ou),Ou},"updateCurrentConfig"),Cnt=B(t=>(di=Ar({},Hl),di=Ar(di,t),t.theme&&ua[t.theme]&&(di.themeVariables=ua[t.theme].getThemeVariables(t.themeVariables)),Yp(di,ro),di),"setSiteConfig"),wnt=B(t=>{Pf=Ar({},t)},"saveConfigFromInitialize"),Snt=B(t=>(di=Ar(di,t),Yp(di,ro),di),"updateSiteConfig"),aI=B(()=>Ar({},di),"getSiteConfig"),sI=B(t=>(cI(t),Ar(Ou,t),nr()),"setConfig"),nr=B(()=>Ar({},Ou),"getConfig"),oI=B(t=>{t&&(["secure",...di.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(St.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e]}),Object.keys(t).forEach(e=>{typeof t[e]=="string"&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],typeof t[e]=="object"&&oI(t[e])}))},"sanitize"),knt=B(t=>{var e;$f(t),t.fontFamily&&!((e=t.themeVariables)!=null&&e.fontFamily)&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),ro.push(t),Yp(di,ro)},"addDirective"),Hf=B((t=di)=>{ro=[],Yp(t,ro)},"reset"),_nt={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},i4={},lI=B(t=>{i4[t]||(St.warn(_nt[t]),i4[t]=!0)},"issueWarning"),cI=B(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&lI("LAZY_LOAD_DEPRECATED")},"checkConfig"),Dft=B(()=>{let t={};Pf&&(t=Ar(t,Pf));for(const e of ro)t=Ar(t,e);return t},"getUserDefinedConfig"),Jr=B(t=>{var e,r;return((e=t.flowchart)==null?void 0:e.htmlLabels)!=null&&lI("FLOWCHART_HTML_LABELS_DEPRECATED"),ya(t.htmlLabels??((r=t.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),yh=/<br\s*\/?>/gi,Tnt=B(t=>t?dI(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Ent=(()=>{let t=!1;return()=>{t||(uI(),t=!0)}})();function uI(){const t="data-temp-href-target";Pl.addHook("beforeSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),Pl.addHook("afterSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener"))})}B(uI,"setupDompurifyHooks");var hI=B(t=>(Ent(),Pl.sanitize(t)),"removeScript"),n4=B((t,e)=>{if(Jr(e)){const r=e.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?t=hI(t):r!=="loose"&&(t=dI(t),t=t.replace(/</g,"&lt;").replace(/>/g,"&gt;"),t=t.replace(/=/g,"&equals;"),t=Mnt(t))}return t},"sanitizeMore"),hn=B((t,e)=>t&&(e.dompurifyConfig?t=Pl.sanitize(n4(t,e),e.dompurifyConfig).toString():t=Pl.sanitize(n4(t,e),{FORBID_TAGS:["style"]}).toString(),t),"sanitizeText"),Ant=B((t,e)=>typeof t=="string"?hn(t,e):t.flat().map(r=>hn(r,e)),"sanitizeTextOrArray"),Bnt=B(t=>yh.test(t),"hasBreaks"),Lnt=B(t=>t.split(yh),"splitBreaks"),Mnt=B(t=>t.replace(/#br#/g,"<br/>"),"placeholderToBreak"),dI=B(t=>t.replace(yh,"#br#"),"breakToPlaceholder"),Nnt=B(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),Ont=B(function(...t){const e=t.filter(r=>!isNaN(r));return Math.max(...e)},"getMax"),Rnt=B(function(...t){const e=t.filter(r=>!isNaN(r));return Math.min(...e)},"getMin"),a4=B(function(t){const e=t.split(/(,)/),r=[];for(let i=0;i<e.length;i++){let n=e[i];if(n===","&&i>0&&i+1<e.length){const s=e[i-1],o=e[i+1];Dnt(s,o)&&(n=s+","+o,i++,r.pop())}r.push(Fnt(n))}return r.join("")},"parseGenericTypes"),i2=B((t,e)=>Math.max(0,t.split(e).length-1),"countOccurrence"),Dnt=B((t,e)=>{const r=i2(t,"~"),i=i2(e,"~");return r===1&&i===1},"shouldCombineSets"),Fnt=B(t=>{const e=i2(t,"~");let r=!1;if(e<=1)return t;e%2!==0&&t.startsWith("~")&&(t=t.substring(1),r=!0);const i=[...t];let n=i.indexOf("~"),s=i.lastIndexOf("~");for(;n!==-1&&s!==-1&&n!==s;)i[n]="<",i[s]=">",n=i.indexOf("~"),s=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),s4=B(()=>window.MathMLElement!==void 0,"isMathMLSupported"),n2=/\$\$(.*)\$\$/g,Xu=B(t=>{var e;return(((e=t.match(n2))==null?void 0:e.length)??0)>0},"hasKatex"),Fft=B(async(t,e)=>{const r=document.createElement("div");r.innerHTML=await fI(t,e),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const n={width:r.clientWidth,height:r.clientHeight};return r.remove(),n},"calculateMathMLDimensions"),Int=B(async(t,e)=>{if(!Xu(t))return t;if(!(s4()||e.legacyMathML||e.forceLegacyMathML))return t.replace(n2,"MathML is unsupported in this environment.");{const{default:r}=await be(async()=>{const{default:n}=await import("./katex-DkKDou_j.js");return{default:n}},[]),i=e.forceLegacyMathML||!s4()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(yh).map(n=>Xu(n)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${n}</div>`:`<div>${n}</div>`).join("").replace(n2,(n,s)=>r.renderToString(s,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),fI=B(async(t,e)=>hn(await Int(t,e),e),"renderKatexSanitized"),xh={getRows:Tnt,sanitizeText:hn,sanitizeTextOrArray:Ant,hasBreaks:Bnt,splitBreaks:Lnt,lineBreakRegex:yh,removeScript:hI,getUrl:Nnt,evaluate:ya,getMax:Ont,getMin:Rnt},qnt=B(function(t,e){for(let r of e)t.attr(r[0],r[1])},"d3Attrs"),znt=B(function(t,e,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i},"calculateSvgSizeAttrs"),pI=B(function(t,e,r,i){const n=znt(e,r,i);qnt(t,n)},"configureSvgSize"),jnt=B(function(t,e,r,i){const n=e.node().getBBox(),s=n.width,o=n.height;St.info(`SVG bounds: ${s}x${o}`,n);let c=0,u=0;St.info(`Graph bounds: ${c}x${u}`,t),c=s+r*2,u=o+r*2,St.info(`Calculated bounds: ${c}x${u}`),pI(e,u,c,i);const h=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;e.attr("viewBox",h)},"setupGraphViewbox"),yf={};function a2(t){return[...t.cssRules].map(e=>e.cssText).join(`
293
+ `)}B(a2,"cssStyleSheetToString");var $nt=B((t,e,r,i)=>{let n="";return t in yf&&yf[t]?n=yf[t]({...r,svgId:i}):St.warn(`No theme found for ${t}`),` & {
294
+ font-family: ${r.fontFamily};
295
+ font-size: ${r.fontSize};
296
+ fill: ${r.textColor}
297
+ }
298
+ @keyframes edge-animation-frame {
299
+ from {
300
+ stroke-dashoffset: 0;
301
+ }
302
+ }
303
+ @keyframes dash {
304
+ to {
305
+ stroke-dashoffset: 0;
306
+ }
307
+ }
308
+ & .edge-animation-slow {
309
+ stroke-dasharray: 9,5 !important;
310
+ stroke-dashoffset: 900;
311
+ animation: dash 50s linear infinite;
312
+ stroke-linecap: round;
313
+ }
314
+ & .edge-animation-fast {
315
+ stroke-dasharray: 9,5 !important;
316
+ stroke-dashoffset: 900;
317
+ animation: dash 20s linear infinite;
318
+ stroke-linecap: round;
319
+ }
320
+ /* Classes common for multiple diagrams */
321
+
322
+ & .error-icon {
323
+ fill: ${r.errorBkgColor};
324
+ }
325
+ & .error-text {
326
+ fill: ${r.errorTextColor};
327
+ stroke: ${r.errorTextColor};
328
+ }
329
+
330
+ & .edge-thickness-normal {
331
+ stroke-width: ${r.strokeWidth??1}px;
332
+ }
333
+ & .edge-thickness-thick {
334
+ stroke-width: 3.5px
335
+ }
336
+ & .edge-pattern-solid {
337
+ stroke-dasharray: 0;
338
+ }
339
+ & .edge-thickness-invisible {
340
+ stroke-width: 0;
341
+ fill: none;
342
+ }
343
+ & .edge-pattern-dashed{
344
+ stroke-dasharray: 3;
345
+ }
346
+ .edge-pattern-dotted {
347
+ stroke-dasharray: 2;
348
+ }
349
+
350
+ & .marker {
351
+ fill: ${r.lineColor};
352
+ stroke: ${r.lineColor};
353
+ }
354
+ & .marker.cross {
355
+ stroke: ${r.lineColor};
356
+ }
357
+
358
+ & svg {
359
+ font-family: ${r.fontFamily};
360
+ font-size: ${r.fontSize};
361
+ }
362
+ & p {
363
+ margin: 0
364
+ }
365
+
366
+ ${n}
367
+ .node .neo-node {
368
+ stroke: ${r.nodeBorder};
369
+ }
370
+
371
+ [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
372
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
373
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
374
+ }
375
+
376
+
377
+ [data-look="neo"].node path {
378
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
379
+ stroke-width: ${r.strokeWidth??1}px;
380
+ }
381
+
382
+ [data-look="neo"].node .outer-path {
383
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
384
+ }
385
+
386
+ [data-look="neo"].node .neo-line path {
387
+ stroke: ${r.nodeBorder};
388
+ filter: none;
389
+ }
390
+
391
+ [data-look="neo"].node circle{
392
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
393
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
394
+ }
395
+
396
+ [data-look="neo"].node circle .state-start{
397
+ fill: #000000;
398
+ }
399
+
400
+ [data-look="neo"].icon-shape .icon {
401
+ fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
402
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
403
+ }
404
+
405
+ [data-look="neo"].icon-shape .icon-neo path {
406
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
407
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
408
+ }
409
+
410
+ ${e}
411
+ `},"getStyles"),Pnt=B((t,e)=>{e!==void 0&&(yf[t]=e)},"addStylesForDiagram"),Hnt=$nt,gI={};xit(gI,{clear:()=>Unt,getAccDescription:()=>Wnt,getAccTitle:()=>Ynt,getDiagramTitle:()=>Qnt,setAccDescription:()=>Vnt,setAccTitle:()=>Gnt,setDiagramTitle:()=>Xnt});var Pw="",Hw="",Uw="",Gw=B(t=>hn(t,nr()),"sanitizeText"),Unt=B(()=>{Pw="",Uw="",Hw=""},"clear"),Gnt=B(t=>{Pw=Gw(t).replace(/^\s+/g,"")},"setAccTitle"),Ynt=B(()=>Pw,"getAccTitle"),Vnt=B(t=>{Uw=Gw(t).replace(/\n\s+/g,`
412
+ `)},"setAccDescription"),Wnt=B(()=>Uw,"getAccDescription"),Xnt=B(t=>{Hw=Gw(t)},"setDiagramTitle"),Qnt=B(()=>Hw,"getDiagramTitle"),o4=St,Znt=jw,_e=nr,Ift=sI,qft=Hl,Yw=B(t=>hn(t,_e()),"sanitizeText"),Knt=jnt,Jnt=B(()=>gI,"getCommonDb"),Uf={},Gf=B((t,e,r)=>{var i;Uf[t]&&o4.warn(`Diagram with id ${t} already registered. Overwriting.`),Uf[t]=e,r&&tI(t,r),Pnt(t,e.styles),(i=e.injectUtils)==null||i.call(e,o4,Znt,_e,Yw,Knt,Jnt(),()=>{})},"registerDiagram"),s2=B(t=>{if(t in Uf)return Uf[t];throw new tat(t)},"getDiagram"),Ol,tat=(Ol=class extends Error{constructor(e){super(`Diagram ${e} not found.`)}},B(Ol,"DiagramNotFoundError"),Ol);const o2=Math.PI,l2=2*o2,Ps=1e-6,eat=l2-Ps;function mI(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}function rat(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return mI;const r=10**e;return function(i){this._+=i[0];for(let n=1,s=i.length;n<s;++n)this._+=Math.round(arguments[n]*r)/r+i[n]}}class iat{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?mI:rat(e)}moveTo(e,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,r){this._append`L${this._x1=+e},${this._y1=+r}`}quadraticCurveTo(e,r,i,n){this._append`Q${+e},${+r},${this._x1=+i},${this._y1=+n}`}bezierCurveTo(e,r,i,n,s,o){this._append`C${+e},${+r},${+i},${+n},${this._x1=+s},${this._y1=+o}`}arcTo(e,r,i,n,s){if(e=+e,r=+r,i=+i,n=+n,s=+s,s<0)throw new Error(`negative radius: ${s}`);let o=this._x1,c=this._y1,u=i-e,h=n-r,d=o-e,p=c-r,m=d*d+p*p;if(this._x1===null)this._append`M${this._x1=e},${this._y1=r}`;else if(m>Ps)if(!(Math.abs(p*u-h*d)>Ps)||!s)this._append`L${this._x1=e},${this._y1=r}`;else{let g=i-o,x=n-c,v=u*u+h*h,b=g*g+x*x,w=Math.sqrt(v),T=Math.sqrt(m),k=s*Math.tan((o2-Math.acos((v+m-b)/(2*w*T)))/2),E=k/T,L=k/w;Math.abs(E-1)>Ps&&this._append`L${e+E*d},${r+E*p}`,this._append`A${s},${s},0,0,${+(p*g>d*x)},${this._x1=e+L*u},${this._y1=r+L*h}`}}arc(e,r,i,n,s,o){if(e=+e,r=+r,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let c=i*Math.cos(n),u=i*Math.sin(n),h=e+c,d=r+u,p=1^o,m=o?n-s:s-n;this._x1===null?this._append`M${h},${d}`:(Math.abs(this._x1-h)>Ps||Math.abs(this._y1-d)>Ps)&&this._append`L${h},${d}`,i&&(m<0&&(m=m%l2+l2),m>eat?this._append`A${i},${i},0,1,${p},${e-c},${r-u}A${i},${i},0,1,${p},${this._x1=h},${this._y1=d}`:m>Ps&&this._append`A${i},${i},0,${+(m>=o2)},${p},${this._x1=e+i*Math.cos(s)},${this._y1=r+i*Math.sin(s)}`)}rect(e,r,i,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}}function rl(t){return function(){return t}}const zft=Math.abs,jft=Math.atan2,$ft=Math.cos,Pft=Math.max,Hft=Math.min,Uft=Math.sin,Gft=Math.sqrt,l4=1e-12,Vw=Math.PI,c4=Vw/2,Yft=2*Vw;function Vft(t){return t>1?0:t<-1?Vw:Math.acos(t)}function Wft(t){return t>=1?c4:t<=-1?-c4:Math.asin(t)}function nat(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(r==null)e=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);e=i}return t},()=>new iat(e)}function aat(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function yI(t){this._context=t}yI.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function Ru(t){return new yI(t)}function sat(t){return t[0]}function oat(t){return t[1]}function lat(t,e){var r=rl(!0),i=null,n=Ru,s=null,o=nat(c);t=typeof t=="function"?t:t===void 0?sat:rl(t),e=typeof e=="function"?e:e===void 0?oat:rl(e);function c(u){var h,d=(u=aat(u)).length,p,m=!1,g;for(i==null&&(s=n(g=o())),h=0;h<=d;++h)!(h<d&&r(p=u[h],h,u))===m&&((m=!m)?s.lineStart():s.lineEnd()),m&&s.point(+t(p,h,u),+e(p,h,u));if(g)return s=null,g+""||null}return c.x=function(u){return arguments.length?(t=typeof u=="function"?u:rl(+u),c):t},c.y=function(u){return arguments.length?(e=typeof u=="function"?u:rl(+u),c):e},c.defined=function(u){return arguments.length?(r=typeof u=="function"?u:rl(!!u),c):r},c.curve=function(u){return arguments.length?(n=u,i!=null&&(s=n(i)),c):n},c.context=function(u){return arguments.length?(u==null?i=s=null:s=n(i=u),c):i},c}class xI{constructor(e,r){this._context=e,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,r){switch(e=+e,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,r,e,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,e,this._y0,e,r);break}}this._x0=e,this._y0=r}}function bI(t){return new xI(t,!0)}function vI(t){return new xI(t,!1)}function ns(){}function Yf(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function Vp(t){this._context=t}Vp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Yf(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Yf(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function c2(t){return new Vp(t)}function CI(t){this._context=t}CI.prototype={areaStart:ns,areaEnd:ns,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:Yf(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function cat(t){return new CI(t)}function wI(t){this._context=t}wI.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:Yf(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function uat(t){return new wI(t)}function SI(t,e){this._basis=new Vp(t),this._beta=e}SI.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var i=t[0],n=e[0],s=t[r]-i,o=e[r]-n,c=-1,u;++c<=r;)u=c/r,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+u*s),this._beta*e[c]+(1-this._beta)*(n+u*o));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const hat=(function t(e){function r(i){return e===1?new Vp(i):new SI(i,e)}return r.beta=function(i){return t(+i)},r})(.85);function Vf(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function Ww(t,e){this._context=t,this._k=(1-e)/6}Ww.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Vf(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Vf(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const kI=(function t(e){function r(i){return new Ww(i,e)}return r.tension=function(i){return t(+i)},r})(0);function Xw(t,e){this._context=t,this._k=(1-e)/6}Xw.prototype={areaStart:ns,areaEnd:ns,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Vf(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const dat=(function t(e){function r(i){return new Xw(i,e)}return r.tension=function(i){return t(+i)},r})(0);function Qw(t,e){this._context=t,this._k=(1-e)/6}Qw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Vf(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const fat=(function t(e){function r(i){return new Qw(i,e)}return r.tension=function(i){return t(+i)},r})(0);function Zw(t,e,r){var i=t._x1,n=t._y1,s=t._x2,o=t._y2;if(t._l01_a>l4){var c=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*c-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,n=(n*c-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>l4){var h=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,d=3*t._l23_a*(t._l23_a+t._l12_a);s=(s*h+t._x1*t._l23_2a-e*t._l12_2a)/d,o=(o*h+t._y1*t._l23_2a-r*t._l12_2a)/d}t._context.bezierCurveTo(i,n,s,o,t._x2,t._y2)}function _I(t,e){this._context=t,this._alpha=e}_I.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Zw(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const TI=(function t(e){function r(i){return e?new _I(i,e):new Ww(i,0)}return r.alpha=function(i){return t(+i)},r})(.5);function EI(t,e){this._context=t,this._alpha=e}EI.prototype={areaStart:ns,areaEnd:ns,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Zw(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const pat=(function t(e){function r(i){return e?new EI(i,e):new Xw(i,0)}return r.alpha=function(i){return t(+i)},r})(.5);function AI(t,e){this._context=t,this._alpha=e}AI.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Zw(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const gat=(function t(e){function r(i){return e?new AI(i,e):new Qw(i,0)}return r.alpha=function(i){return t(+i)},r})(.5);function BI(t){this._context=t}BI.prototype={areaStart:ns,areaEnd:ns,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function mat(t){return new BI(t)}function u4(t){return t<0?-1:1}function h4(t,e,r){var i=t._x1-t._x0,n=e-t._x1,s=(t._y1-t._y0)/(i||n<0&&-0),o=(r-t._y1)/(n||i<0&&-0),c=(s*n+o*i)/(i+n);return(u4(s)+u4(o))*Math.min(Math.abs(s),Math.abs(o),.5*Math.abs(c))||0}function d4(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function fC(t,e,r){var i=t._x0,n=t._y0,s=t._x1,o=t._y1,c=(s-i)/3;t._context.bezierCurveTo(i+c,n+c*e,s-c,o-c*r,s,o)}function Wf(t){this._context=t}Wf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:fC(this,this._t0,d4(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,fC(this,d4(this,r=h4(this,t,e)),r);break;default:fC(this,this._t0,r=h4(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};function LI(t){this._context=new MI(t)}(LI.prototype=Object.create(Wf.prototype)).point=function(t,e){Wf.prototype.point.call(this,e,t)};function MI(t){this._context=t}MI.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,r,i,n,s){this._context.bezierCurveTo(e,t,i,r,s,n)}};function NI(t){return new Wf(t)}function OI(t){return new LI(t)}function RI(t){this._context=t}RI.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),r===2)this._context.lineTo(t[1],e[1]);else for(var i=f4(t),n=f4(e),s=0,o=1;o<r;++s,++o)this._context.bezierCurveTo(i[0][s],n[0][s],i[1][s],n[1][s],t[o],e[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function f4(t){var e,r=t.length-1,i,n=new Array(r),s=new Array(r),o=new Array(r);for(n[0]=0,s[0]=2,o[0]=t[0]+2*t[1],e=1;e<r-1;++e)n[e]=1,s[e]=4,o[e]=4*t[e]+2*t[e+1];for(n[r-1]=2,s[r-1]=7,o[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)i=n[e]/s[e-1],s[e]-=i,o[e]-=i*o[e-1];for(n[r-1]=o[r-1]/s[r-1],e=r-2;e>=0;--e)n[e]=(o[e]-n[e+1])/s[e];for(s[r-1]=(t[r]+n[r-1])/2,e=0;e<r-1;++e)s[e]=2*t[e+1]-n[e+1];return[n,s]}function DI(t){return new RI(t)}function Wp(t,e){this._context=t,this._t=e}Wp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}break}}this._x=t,this._y=e}};function FI(t){return new Wp(t,.5)}function II(t){return new Wp(t,0)}function qI(t){return new Wp(t,1)}var yat=B(t=>{var n;const{securityLevel:e}=_e();let r=Xt("body");if(e==="sandbox"){const o=((n=Xt(`#i${t}`).node())==null?void 0:n.contentDocument)??document;r=Xt(o.body)}return r.select(`#${t}`)},"selectSvgElement");function Kw(t){return typeof t>"u"||t===null}B(Kw,"isNothing");function zI(t){return typeof t=="object"&&t!==null}B(zI,"isObject");function jI(t){return Array.isArray(t)?t:Kw(t)?[]:[t]}B(jI,"toArray");function $I(t,e){var r,i,n,s;if(e)for(s=Object.keys(e),r=0,i=s.length;r<i;r+=1)n=s[r],t[n]=e[n];return t}B($I,"extend");function PI(t,e){var r="",i;for(i=0;i<e;i+=1)r+=t;return r}B(PI,"repeat");function HI(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}B(HI,"isNegativeZero");var xat=Kw,bat=zI,vat=jI,Cat=PI,wat=HI,Sat=$I,Br={isNothing:xat,isObject:bat,toArray:vat,repeat:Cat,isNegativeZero:wat,extend:Sat};function Jw(t,e){var r="",i=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+=`
413
+
414
+ `+t.mark.snippet),i+" "+r):i}B(Jw,"formatError");function Ul(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=Jw(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}B(Ul,"YAMLException$1");Ul.prototype=Object.create(Error.prototype);Ul.prototype.constructor=Ul;Ul.prototype.toString=B(function(e){return this.name+": "+Jw(this,e)},"toString");var fi=Ul;function xf(t,e,r,i,n){var s="",o="",c=Math.floor(n/2)-1;return i-e>c&&(s=" ... ",e=i-c+s.length),r-i>c&&(o=" ...",r=i+c-o.length),{str:s+t.slice(e,r).replace(/\t/g,"→")+o,pos:i-e+s.length}}B(xf,"getLine");function bf(t,e){return Br.repeat(" ",e-t.length)+t}B(bf,"padStart");function UI(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],n=[],s,o=-1;s=r.exec(t.buffer);)n.push(s.index),i.push(s.index+s[0].length),t.position<=s.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var c="",u,h,d=Math.min(t.line+e.linesAfter,n.length).toString().length,p=e.maxLength-(e.indent+d+3);for(u=1;u<=e.linesBefore&&!(o-u<0);u++)h=xf(t.buffer,i[o-u],n[o-u],t.position-(i[o]-i[o-u]),p),c=Br.repeat(" ",e.indent)+bf((t.line-u+1).toString(),d)+" | "+h.str+`
415
+ `+c;for(h=xf(t.buffer,i[o],n[o],t.position,p),c+=Br.repeat(" ",e.indent)+bf((t.line+1).toString(),d)+" | "+h.str+`
416
+ `,c+=Br.repeat("-",e.indent+d+3+h.pos)+`^
417
+ `,u=1;u<=e.linesAfter&&!(o+u>=n.length);u++)h=xf(t.buffer,i[o+u],n[o+u],t.position-(i[o]-i[o+u]),p),c+=Br.repeat(" ",e.indent)+bf((t.line+u+1).toString(),d)+" | "+h.str+`
418
+ `;return c.replace(/\n$/,"")}B(UI,"makeSnippet");var kat=UI,_at=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Tat=["scalar","sequence","mapping"];function GI(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(i){e[String(i)]=r})}),e}B(GI,"compileStyleAliases");function YI(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(_at.indexOf(r)===-1)throw new fi('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=GI(e.styleAliases||null),Tat.indexOf(this.kind)===-1)throw new fi('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}B(YI,"Type$1");var Hr=YI;function u2(t,e){var r=[];return t[e].forEach(function(i){var n=r.length;r.forEach(function(s,o){s.tag===i.tag&&s.kind===i.kind&&s.multi===i.multi&&(n=o)}),r[n]=i}),r}B(u2,"compileList");function VI(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function i(n){n.multi?(t.multi[n.kind].push(n),t.multi.fallback.push(n)):t[n.kind][n.tag]=t.fallback[n.tag]=n}for(B(i,"collectType"),e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(i);return t}B(VI,"compileMap");function Xf(t){return this.extend(t)}B(Xf,"Schema$1");Xf.prototype.extend=B(function(e){var r=[],i=[];if(e instanceof Hr)i.push(e);else if(Array.isArray(e))i=i.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(r=r.concat(e.implicit)),e.explicit&&(i=i.concat(e.explicit));else throw new fi("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof Hr))throw new fi("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new fi("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new fi("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(s){if(!(s instanceof Hr))throw new fi("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(Xf.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=u2(n,"implicit"),n.compiledExplicit=u2(n,"explicit"),n.compiledTypeMap=VI(n.compiledImplicit,n.compiledExplicit),n},"extend");var Eat=Xf,Aat=new Hr("tag:yaml.org,2002:str",{kind:"scalar",construct:B(function(t){return t!==null?t:""},"construct")}),Bat=new Hr("tag:yaml.org,2002:seq",{kind:"sequence",construct:B(function(t){return t!==null?t:[]},"construct")}),Lat=new Hr("tag:yaml.org,2002:map",{kind:"mapping",construct:B(function(t){return t!==null?t:{}},"construct")}),Mat=new Eat({explicit:[Aat,Bat,Lat]});function WI(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}B(WI,"resolveYamlNull");function XI(){return null}B(XI,"constructYamlNull");function QI(t){return t===null}B(QI,"isNull");var Nat=new Hr("tag:yaml.org,2002:null",{kind:"scalar",resolve:WI,construct:XI,predicate:QI,represent:{canonical:B(function(){return"~"},"canonical"),lowercase:B(function(){return"null"},"lowercase"),uppercase:B(function(){return"NULL"},"uppercase"),camelcase:B(function(){return"Null"},"camelcase"),empty:B(function(){return""},"empty")},defaultStyle:"lowercase"});function ZI(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}B(ZI,"resolveYamlBoolean");function KI(t){return t==="true"||t==="True"||t==="TRUE"}B(KI,"constructYamlBoolean");function JI(t){return Object.prototype.toString.call(t)==="[object Boolean]"}B(JI,"isBoolean");var Oat=new Hr("tag:yaml.org,2002:bool",{kind:"scalar",resolve:ZI,construct:KI,predicate:JI,represent:{lowercase:B(function(t){return t?"true":"false"},"lowercase"),uppercase:B(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:B(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function t6(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}B(t6,"isHexCode");function e6(t){return 48<=t&&t<=55}B(e6,"isOctCode");function r6(t){return 48<=t&&t<=57}B(r6,"isDecCode");function i6(t){if(t===null)return!1;var e=t.length,r=0,i=!1,n;if(!e)return!1;if(n=t[r],(n==="-"||n==="+")&&(n=t[++r]),n==="0"){if(r+1===e)return!0;if(n=t[++r],n==="b"){for(r++;r<e;r++)if(n=t[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;i=!0}return i&&n!=="_"}if(n==="x"){for(r++;r<e;r++)if(n=t[r],n!=="_"){if(!t6(t.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="o"){for(r++;r<e;r++)if(n=t[r],n!=="_"){if(!e6(t.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}}if(n==="_")return!1;for(;r<e;r++)if(n=t[r],n!=="_"){if(!r6(t.charCodeAt(r)))return!1;i=!0}return!(!i||n==="_")}B(i6,"resolveYamlInteger");function n6(t){var e=t,r=1,i;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),i=e[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),e=e.slice(1),i=e[0]),e==="0")return 0;if(i==="0"){if(e[1]==="b")return r*parseInt(e.slice(2),2);if(e[1]==="x")return r*parseInt(e.slice(2),16);if(e[1]==="o")return r*parseInt(e.slice(2),8)}return r*parseInt(e,10)}B(n6,"constructYamlInteger");function a6(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!Br.isNegativeZero(t)}B(a6,"isInteger");var Rat=new Hr("tag:yaml.org,2002:int",{kind:"scalar",resolve:i6,construct:n6,predicate:a6,represent:{binary:B(function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:B(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:B(function(t){return t.toString(10)},"decimal"),hexadecimal:B(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Dat=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function s6(t){return!(t===null||!Dat.test(t)||t[t.length-1]==="_")}B(s6,"resolveYamlFloat");function o6(t){var e,r;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}B(o6,"constructYamlFloat");var Fat=/^[-+]?[0-9]+e/;function l6(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Br.isNegativeZero(t))return"-0.0";return r=t.toString(10),Fat.test(r)?r.replace("e",".e"):r}B(l6,"representYamlFloat");function c6(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||Br.isNegativeZero(t))}B(c6,"isFloat");var Iat=new Hr("tag:yaml.org,2002:float",{kind:"scalar",resolve:s6,construct:o6,predicate:c6,represent:l6,defaultStyle:"lowercase"}),u6=Mat.extend({implicit:[Nat,Oat,Rat,Iat]}),qat=u6,h6=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),d6=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function f6(t){return t===null?!1:h6.exec(t)!==null||d6.exec(t)!==null}B(f6,"resolveYamlTimestamp");function p6(t){var e,r,i,n,s,o,c,u=0,h=null,d,p,m;if(e=h6.exec(t),e===null&&(e=d6.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],i=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(r,i,n));if(s=+e[4],o=+e[5],c=+e[6],e[7]){for(u=e[7].slice(0,3);u.length<3;)u+="0";u=+u}return e[9]&&(d=+e[10],p=+(e[11]||0),h=(d*60+p)*6e4,e[9]==="-"&&(h=-h)),m=new Date(Date.UTC(r,i,n,s,o,c,u)),h&&m.setTime(m.getTime()-h),m}B(p6,"constructYamlTimestamp");function g6(t){return t.toISOString()}B(g6,"representYamlTimestamp");var zat=new Hr("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:f6,construct:p6,instanceOf:Date,represent:g6});function m6(t){return t==="<<"||t===null}B(m6,"resolveYamlMerge");var jat=new Hr("tag:yaml.org,2002:merge",{kind:"scalar",resolve:m6}),tS=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
419
+ \r`;function y6(t){if(t===null)return!1;var e,r,i=0,n=t.length,s=tS;for(r=0;r<n;r++)if(e=s.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;i+=6}return i%8===0}B(y6,"resolveYamlBinary");function x6(t){var e,r,i=t.replace(/[\r\n=]/g,""),n=i.length,s=tS,o=0,c=[];for(e=0;e<n;e++)e%4===0&&e&&(c.push(o>>16&255),c.push(o>>8&255),c.push(o&255)),o=o<<6|s.indexOf(i.charAt(e));return r=n%4*6,r===0?(c.push(o>>16&255),c.push(o>>8&255),c.push(o&255)):r===18?(c.push(o>>10&255),c.push(o>>2&255)):r===12&&c.push(o>>4&255),new Uint8Array(c)}B(x6,"constructYamlBinary");function b6(t){var e="",r=0,i,n,s=t.length,o=tS;for(i=0;i<s;i++)i%3===0&&i&&(e+=o[r>>18&63],e+=o[r>>12&63],e+=o[r>>6&63],e+=o[r&63]),r=(r<<8)+t[i];return n=s%3,n===0?(e+=o[r>>18&63],e+=o[r>>12&63],e+=o[r>>6&63],e+=o[r&63]):n===2?(e+=o[r>>10&63],e+=o[r>>4&63],e+=o[r<<2&63],e+=o[64]):n===1&&(e+=o[r>>2&63],e+=o[r<<4&63],e+=o[64],e+=o[64]),e}B(b6,"representYamlBinary");function v6(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}B(v6,"isBinary");var $at=new Hr("tag:yaml.org,2002:binary",{kind:"scalar",resolve:y6,construct:x6,predicate:v6,represent:b6}),Pat=Object.prototype.hasOwnProperty,Hat=Object.prototype.toString;function C6(t){if(t===null)return!0;var e=[],r,i,n,s,o,c=t;for(r=0,i=c.length;r<i;r+=1){if(n=c[r],o=!1,Hat.call(n)!=="[object Object]")return!1;for(s in n)if(Pat.call(n,s))if(!o)o=!0;else return!1;if(!o)return!1;if(e.indexOf(s)===-1)e.push(s);else return!1}return!0}B(C6,"resolveYamlOmap");function w6(t){return t!==null?t:[]}B(w6,"constructYamlOmap");var Uat=new Hr("tag:yaml.org,2002:omap",{kind:"sequence",resolve:C6,construct:w6}),Gat=Object.prototype.toString;function S6(t){if(t===null)return!0;var e,r,i,n,s,o=t;for(s=new Array(o.length),e=0,r=o.length;e<r;e+=1){if(i=o[e],Gat.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;s[e]=[n[0],i[n[0]]]}return!0}B(S6,"resolveYamlPairs");function k6(t){if(t===null)return[];var e,r,i,n,s,o=t;for(s=new Array(o.length),e=0,r=o.length;e<r;e+=1)i=o[e],n=Object.keys(i),s[e]=[n[0],i[n[0]]];return s}B(k6,"constructYamlPairs");var Yat=new Hr("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:S6,construct:k6}),Vat=Object.prototype.hasOwnProperty;function _6(t){if(t===null)return!0;var e,r=t;for(e in r)if(Vat.call(r,e)&&r[e]!==null)return!1;return!0}B(_6,"resolveYamlSet");function T6(t){return t!==null?t:{}}B(T6,"constructYamlSet");var Wat=new Hr("tag:yaml.org,2002:set",{kind:"mapping",resolve:_6,construct:T6}),E6=qat.extend({implicit:[zat,jat],explicit:[$at,Uat,Yat,Wat]}),as=Object.prototype.hasOwnProperty,Qf=1,A6=2,B6=3,Zf=4,pC=1,Xat=2,p4=3,Qat=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Zat=/[\x85\u2028\u2029]/,Kat=/[,\[\]\{\}]/,L6=/^(?:!|!!|![a-z\-]+!)$/i,M6=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function h2(t){return Object.prototype.toString.call(t)}B(h2,"_class");function ln(t){return t===10||t===13}B(ln,"is_EOL");function is(t){return t===9||t===32}B(is,"is_WHITE_SPACE");function Qr(t){return t===9||t===32||t===10||t===13}B(Qr,"is_WS_OR_EOL");function Ys(t){return t===44||t===91||t===93||t===123||t===125}B(Ys,"is_FLOW_INDICATOR");function N6(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}B(N6,"fromHexCode");function O6(t){return t===120?2:t===117?4:t===85?8:0}B(O6,"escapedHexLen");function R6(t){return 48<=t&&t<=57?t-48:-1}B(R6,"fromDecimalCode");function d2(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
420
+ `:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"…":t===95?" ":t===76?"\u2028":t===80?"\u2029":""}B(d2,"simpleEscapeSequence");function D6(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}B(D6,"charFromCodepoint");function eS(t,e,r){e==="__proto__"?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[e]=r}B(eS,"setProperty");var F6=new Array(256),I6=new Array(256);for(zs=0;zs<256;zs++)F6[zs]=d2(zs)?1:0,I6[zs]=d2(zs);var zs;function q6(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||E6,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}B(q6,"State$1");function rS(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=kat(r),new fi(e,r)}B(rS,"generateError");function Vt(t,e){throw rS(t,e)}B(Vt,"throwError");function Qu(t,e){t.onWarning&&t.onWarning.call(null,rS(t,e))}B(Qu,"throwWarning");var g4={YAML:B(function(e,r,i){var n,s,o;e.version!==null&&Vt(e,"duplication of %YAML directive"),i.length!==1&&Vt(e,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&Vt(e,"ill-formed argument of the YAML directive"),s=parseInt(n[1],10),o=parseInt(n[2],10),s!==1&&Vt(e,"unacceptable YAML version of the document"),e.version=i[0],e.checkLineBreaks=o<2,o!==1&&o!==2&&Qu(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:B(function(e,r,i){var n,s;i.length!==2&&Vt(e,"TAG directive accepts exactly two arguments"),n=i[0],s=i[1],L6.test(n)||Vt(e,"ill-formed tag handle (first argument) of the TAG directive"),as.call(e.tagMap,n)&&Vt(e,'there is a previously declared suffix for "'+n+'" tag handle'),M6.test(s)||Vt(e,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{Vt(e,"tag prefix is malformed: "+s)}e.tagMap[n]=s},"handleTagDirective")};function ha(t,e,r,i){var n,s,o,c;if(e<r){if(c=t.input.slice(e,r),i)for(n=0,s=c.length;n<s;n+=1)o=c.charCodeAt(n),o===9||32<=o&&o<=1114111||Vt(t,"expected valid JSON character");else Qat.test(c)&&Vt(t,"the stream contains non-printable characters");t.result+=c}}B(ha,"captureSegment");function f2(t,e,r,i){var n,s,o,c;for(Br.isObject(r)||Vt(t,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),o=0,c=n.length;o<c;o+=1)s=n[o],as.call(e,s)||(eS(e,s,r[s]),i[s]=!0)}B(f2,"mergeMappings");function Vs(t,e,r,i,n,s,o,c,u){var h,d;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),h=0,d=n.length;h<d;h+=1)Array.isArray(n[h])&&Vt(t,"nested arrays are not supported inside keys"),typeof n=="object"&&h2(n[h])==="[object Object]"&&(n[h]="[object Object]");if(typeof n=="object"&&h2(n)==="[object Object]"&&(n="[object Object]"),n=String(n),e===null&&(e={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(h=0,d=s.length;h<d;h+=1)f2(t,e,s[h],r);else f2(t,e,s,r);else!t.json&&!as.call(r,n)&&as.call(e,n)&&(t.line=o||t.line,t.lineStart=c||t.lineStart,t.position=u||t.position,Vt(t,"duplicated mapping key")),eS(e,n,s),delete r[n];return e}B(Vs,"storeMappingPair");function Xp(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):Vt(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}B(Xp,"readLineBreak");function pr(t,e,r){for(var i=0,n=t.input.charCodeAt(t.position);n!==0;){for(;is(n);)n===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),n=t.input.charCodeAt(++t.position);if(e&&n===35)do n=t.input.charCodeAt(++t.position);while(n!==10&&n!==13&&n!==0);if(ln(n))for(Xp(t),n=t.input.charCodeAt(t.position),i++,t.lineIndent=0;n===32;)t.lineIndent++,n=t.input.charCodeAt(++t.position);else break}return r!==-1&&i!==0&&t.lineIndent<r&&Qu(t,"deficient indentation"),i}B(pr,"skipSeparationSpace");function bh(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||Qr(r)))}B(bh,"testDocumentSeparator");function Qp(t,e){e===1?t.result+=" ":e>1&&(t.result+=Br.repeat(`
421
+ `,e-1))}B(Qp,"writeFoldedLines");function z6(t,e,r){var i,n,s,o,c,u,h,d,p=t.kind,m=t.result,g;if(g=t.input.charCodeAt(t.position),Qr(g)||Ys(g)||g===35||g===38||g===42||g===33||g===124||g===62||g===39||g===34||g===37||g===64||g===96||(g===63||g===45)&&(n=t.input.charCodeAt(t.position+1),Qr(n)||r&&Ys(n)))return!1;for(t.kind="scalar",t.result="",s=o=t.position,c=!1;g!==0;){if(g===58){if(n=t.input.charCodeAt(t.position+1),Qr(n)||r&&Ys(n))break}else if(g===35){if(i=t.input.charCodeAt(t.position-1),Qr(i))break}else{if(t.position===t.lineStart&&bh(t)||r&&Ys(g))break;if(ln(g))if(u=t.line,h=t.lineStart,d=t.lineIndent,pr(t,!1,-1),t.lineIndent>=e){c=!0,g=t.input.charCodeAt(t.position);continue}else{t.position=o,t.line=u,t.lineStart=h,t.lineIndent=d;break}}c&&(ha(t,s,o,!1),Qp(t,t.line-u),s=o=t.position,c=!1),is(g)||(o=t.position+1),g=t.input.charCodeAt(++t.position)}return ha(t,s,o,!1),t.result?!0:(t.kind=p,t.result=m,!1)}B(z6,"readPlainScalar");function j6(t,e){var r,i,n;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,i=n=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(ha(t,i,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)i=t.position,t.position++,n=t.position;else return!0;else ln(r)?(ha(t,i,n,!0),Qp(t,pr(t,!1,e)),i=n=t.position):t.position===t.lineStart&&bh(t)?Vt(t,"unexpected end of the document within a single quoted scalar"):(t.position++,n=t.position);Vt(t,"unexpected end of the stream within a single quoted scalar")}B(j6,"readSingleQuotedScalar");function $6(t,e){var r,i,n,s,o,c;if(c=t.input.charCodeAt(t.position),c!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;(c=t.input.charCodeAt(t.position))!==0;){if(c===34)return ha(t,r,t.position,!0),t.position++,!0;if(c===92){if(ha(t,r,t.position,!0),c=t.input.charCodeAt(++t.position),ln(c))pr(t,!1,e);else if(c<256&&F6[c])t.result+=I6[c],t.position++;else if((o=O6(c))>0){for(n=o,s=0;n>0;n--)c=t.input.charCodeAt(++t.position),(o=N6(c))>=0?s=(s<<4)+o:Vt(t,"expected hexadecimal character");t.result+=D6(s),t.position++}else Vt(t,"unknown escape sequence");r=i=t.position}else ln(c)?(ha(t,r,i,!0),Qp(t,pr(t,!1,e)),r=i=t.position):t.position===t.lineStart&&bh(t)?Vt(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}Vt(t,"unexpected end of the stream within a double quoted scalar")}B($6,"readDoubleQuotedScalar");function P6(t,e){var r=!0,i,n,s,o=t.tag,c,u=t.anchor,h,d,p,m,g,x=Object.create(null),v,b,w,T;if(T=t.input.charCodeAt(t.position),T===91)d=93,g=!1,c=[];else if(T===123)d=125,g=!0,c={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=c),T=t.input.charCodeAt(++t.position);T!==0;){if(pr(t,!0,e),T=t.input.charCodeAt(t.position),T===d)return t.position++,t.tag=o,t.anchor=u,t.kind=g?"mapping":"sequence",t.result=c,!0;r?T===44&&Vt(t,"expected the node content, but found ','"):Vt(t,"missed comma between flow collection entries"),b=v=w=null,p=m=!1,T===63&&(h=t.input.charCodeAt(t.position+1),Qr(h)&&(p=m=!0,t.position++,pr(t,!0,e))),i=t.line,n=t.lineStart,s=t.position,io(t,e,Qf,!1,!0),b=t.tag,v=t.result,pr(t,!0,e),T=t.input.charCodeAt(t.position),(m||t.line===i)&&T===58&&(p=!0,T=t.input.charCodeAt(++t.position),pr(t,!0,e),io(t,e,Qf,!1,!0),w=t.result),g?Vs(t,c,x,b,v,w,i,n,s):p?c.push(Vs(t,null,x,b,v,w,i,n,s)):c.push(v),pr(t,!0,e),T=t.input.charCodeAt(t.position),T===44?(r=!0,T=t.input.charCodeAt(++t.position)):r=!1}Vt(t,"unexpected end of the stream within a flow collection")}B(P6,"readFlowCollection");function H6(t,e){var r,i,n=pC,s=!1,o=!1,c=e,u=0,h=!1,d,p;if(p=t.input.charCodeAt(t.position),p===124)i=!1;else if(p===62)i=!0;else return!1;for(t.kind="scalar",t.result="";p!==0;)if(p=t.input.charCodeAt(++t.position),p===43||p===45)pC===n?n=p===43?p4:Xat:Vt(t,"repeat of a chomping mode identifier");else if((d=R6(p))>=0)d===0?Vt(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?Vt(t,"repeat of an indentation width identifier"):(c=e+d-1,o=!0);else break;if(is(p)){do p=t.input.charCodeAt(++t.position);while(is(p));if(p===35)do p=t.input.charCodeAt(++t.position);while(!ln(p)&&p!==0)}for(;p!==0;){for(Xp(t),t.lineIndent=0,p=t.input.charCodeAt(t.position);(!o||t.lineIndent<c)&&p===32;)t.lineIndent++,p=t.input.charCodeAt(++t.position);if(!o&&t.lineIndent>c&&(c=t.lineIndent),ln(p)){u++;continue}if(t.lineIndent<c){n===p4?t.result+=Br.repeat(`
422
+ `,s?1+u:u):n===pC&&s&&(t.result+=`
423
+ `);break}for(i?is(p)?(h=!0,t.result+=Br.repeat(`
424
+ `,s?1+u:u)):h?(h=!1,t.result+=Br.repeat(`
425
+ `,u+1)):u===0?s&&(t.result+=" "):t.result+=Br.repeat(`
426
+ `,u):t.result+=Br.repeat(`
427
+ `,s?1+u:u),s=!0,o=!0,u=0,r=t.position;!ln(p)&&p!==0;)p=t.input.charCodeAt(++t.position);ha(t,r,t.position,!1)}return!0}B(H6,"readBlockScalar");function p2(t,e){var r,i=t.tag,n=t.anchor,s=[],o,c=!1,u;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=s),u=t.input.charCodeAt(t.position);u!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,Vt(t,"tab characters must not be used in indentation")),!(u!==45||(o=t.input.charCodeAt(t.position+1),!Qr(o))));){if(c=!0,t.position++,pr(t,!0,-1)&&t.lineIndent<=e){s.push(null),u=t.input.charCodeAt(t.position);continue}if(r=t.line,io(t,e,B6,!1,!0),s.push(t.result),pr(t,!0,-1),u=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&u!==0)Vt(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return c?(t.tag=i,t.anchor=n,t.kind="sequence",t.result=s,!0):!1}B(p2,"readBlockSequence");function U6(t,e,r){var i,n,s,o,c,u,h=t.tag,d=t.anchor,p={},m=Object.create(null),g=null,x=null,v=null,b=!1,w=!1,T;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=p),T=t.input.charCodeAt(t.position);T!==0;){if(!b&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,Vt(t,"tab characters must not be used in indentation")),i=t.input.charCodeAt(t.position+1),s=t.line,(T===63||T===58)&&Qr(i))T===63?(b&&(Vs(t,p,m,g,x,null,o,c,u),g=x=v=null),w=!0,b=!0,n=!0):b?(b=!1,n=!0):Vt(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,T=i;else{if(o=t.line,c=t.lineStart,u=t.position,!io(t,r,A6,!1,!0))break;if(t.line===s){for(T=t.input.charCodeAt(t.position);is(T);)T=t.input.charCodeAt(++t.position);if(T===58)T=t.input.charCodeAt(++t.position),Qr(T)||Vt(t,"a whitespace character is expected after the key-value separator within a block mapping"),b&&(Vs(t,p,m,g,x,null,o,c,u),g=x=v=null),w=!0,b=!1,n=!1,g=t.tag,x=t.result;else if(w)Vt(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=h,t.anchor=d,!0}else if(w)Vt(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=h,t.anchor=d,!0}if((t.line===s||t.lineIndent>e)&&(b&&(o=t.line,c=t.lineStart,u=t.position),io(t,e,Zf,!0,n)&&(b?x=t.result:v=t.result),b||(Vs(t,p,m,g,x,v,o,c,u),g=x=v=null),pr(t,!0,-1),T=t.input.charCodeAt(t.position)),(t.line===s||t.lineIndent>e)&&T!==0)Vt(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return b&&Vs(t,p,m,g,x,null,o,c,u),w&&(t.tag=h,t.anchor=d,t.kind="mapping",t.result=p),w}B(U6,"readBlockMapping");function G6(t){var e,r=!1,i=!1,n,s,o;if(o=t.input.charCodeAt(t.position),o!==33)return!1;if(t.tag!==null&&Vt(t,"duplication of a tag property"),o=t.input.charCodeAt(++t.position),o===60?(r=!0,o=t.input.charCodeAt(++t.position)):o===33?(i=!0,n="!!",o=t.input.charCodeAt(++t.position)):n="!",e=t.position,r){do o=t.input.charCodeAt(++t.position);while(o!==0&&o!==62);t.position<t.length?(s=t.input.slice(e,t.position),o=t.input.charCodeAt(++t.position)):Vt(t,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!Qr(o);)o===33&&(i?Vt(t,"tag suffix cannot contain exclamation marks"):(n=t.input.slice(e-1,t.position+1),L6.test(n)||Vt(t,"named tag handle cannot contain such characters"),i=!0,e=t.position+1)),o=t.input.charCodeAt(++t.position);s=t.input.slice(e,t.position),Kat.test(s)&&Vt(t,"tag suffix cannot contain flow indicator characters")}s&&!M6.test(s)&&Vt(t,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{Vt(t,"tag name is malformed: "+s)}return r?t.tag=s:as.call(t.tagMap,n)?t.tag=t.tagMap[n]+s:n==="!"?t.tag="!"+s:n==="!!"?t.tag="tag:yaml.org,2002:"+s:Vt(t,'undeclared tag handle "'+n+'"'),!0}B(G6,"readTagProperty");function Y6(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&Vt(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!Qr(r)&&!Ys(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Vt(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}B(Y6,"readAnchorProperty");function V6(t){var e,r,i;if(i=t.input.charCodeAt(t.position),i!==42)return!1;for(i=t.input.charCodeAt(++t.position),e=t.position;i!==0&&!Qr(i)&&!Ys(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&Vt(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),as.call(t.anchorMap,r)||Vt(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],pr(t,!0,-1),!0}B(V6,"readAlias");function io(t,e,r,i,n){var s,o,c,u=1,h=!1,d=!1,p,m,g,x,v,b;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,s=o=c=Zf===r||B6===r,i&&pr(t,!0,-1)&&(h=!0,t.lineIndent>e?u=1:t.lineIndent===e?u=0:t.lineIndent<e&&(u=-1)),u===1)for(;G6(t)||Y6(t);)pr(t,!0,-1)?(h=!0,c=s,t.lineIndent>e?u=1:t.lineIndent===e?u=0:t.lineIndent<e&&(u=-1)):c=!1;if(c&&(c=h||n),(u===1||Zf===r)&&(Qf===r||A6===r?v=e:v=e+1,b=t.position-t.lineStart,u===1?c&&(p2(t,b)||U6(t,b,v))||P6(t,v)?d=!0:(o&&H6(t,v)||j6(t,v)||$6(t,v)?d=!0:V6(t)?(d=!0,(t.tag!==null||t.anchor!==null)&&Vt(t,"alias node should not have any properties")):z6(t,v,Qf===r)&&(d=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):u===0&&(d=c&&p2(t,b))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&Vt(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),p=0,m=t.implicitTypes.length;p<m;p+=1)if(x=t.implicitTypes[p],x.resolve(t.result)){t.result=x.construct(t.result),t.tag=x.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(as.call(t.typeMap[t.kind||"fallback"],t.tag))x=t.typeMap[t.kind||"fallback"][t.tag];else for(x=null,g=t.typeMap.multi[t.kind||"fallback"],p=0,m=g.length;p<m;p+=1)if(t.tag.slice(0,g[p].tag.length)===g[p].tag){x=g[p];break}x||Vt(t,"unknown tag !<"+t.tag+">"),t.result!==null&&x.kind!==t.kind&&Vt(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+x.kind+'", not "'+t.kind+'"'),x.resolve(t.result,t.tag)?(t.result=x.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):Vt(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||d}B(io,"composeNode");function W6(t){var e=t.position,r,i,n,s=!1,o;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(o=t.input.charCodeAt(t.position))!==0&&(pr(t,!0,-1),o=t.input.charCodeAt(t.position),!(t.lineIndent>0||o!==37));){for(s=!0,o=t.input.charCodeAt(++t.position),r=t.position;o!==0&&!Qr(o);)o=t.input.charCodeAt(++t.position);for(i=t.input.slice(r,t.position),n=[],i.length<1&&Vt(t,"directive name must not be less than one character in length");o!==0;){for(;is(o);)o=t.input.charCodeAt(++t.position);if(o===35){do o=t.input.charCodeAt(++t.position);while(o!==0&&!ln(o));break}if(ln(o))break;for(r=t.position;o!==0&&!Qr(o);)o=t.input.charCodeAt(++t.position);n.push(t.input.slice(r,t.position))}o!==0&&Xp(t),as.call(g4,i)?g4[i](t,i,n):Qu(t,'unknown document directive "'+i+'"')}if(pr(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,pr(t,!0,-1)):s&&Vt(t,"directives end mark is expected"),io(t,t.lineIndent-1,Zf,!1,!0),pr(t,!0,-1),t.checkLineBreaks&&Zat.test(t.input.slice(e,t.position))&&Qu(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&bh(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,pr(t,!0,-1));return}if(t.position<t.length-1)Vt(t,"end of the stream or a document separator is expected");else return}B(W6,"readDocument");function iS(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
428
+ `),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new q6(t,e),i=t.indexOf("\0");for(i!==-1&&(r.position=i,Vt(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)W6(r);return r.documents}B(iS,"loadDocuments");function Jat(t,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var i=iS(t,r);if(typeof e!="function")return i;for(var n=0,s=i.length;n<s;n+=1)e(i[n])}B(Jat,"loadAll$1");function X6(t,e){var r=iS(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new fi("expected a single document in the stream, but found more")}}B(X6,"load$1");var tst=X6,est={load:tst},Q6=Object.prototype.toString,Z6=Object.prototype.hasOwnProperty,nS=65279,rst=9,Zu=10,ist=13,nst=32,ast=33,sst=34,g2=35,ost=37,lst=38,cst=39,ust=42,K6=44,hst=45,Kf=58,dst=61,fst=62,pst=63,gst=64,J6=91,tq=93,mst=96,eq=123,yst=124,rq=125,Gr={};Gr[0]="\\0";Gr[7]="\\a";Gr[8]="\\b";Gr[9]="\\t";Gr[10]="\\n";Gr[11]="\\v";Gr[12]="\\f";Gr[13]="\\r";Gr[27]="\\e";Gr[34]='\\"';Gr[92]="\\\\";Gr[133]="\\N";Gr[160]="\\_";Gr[8232]="\\L";Gr[8233]="\\P";var xst=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],bst=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function iq(t,e){var r,i,n,s,o,c,u;if(e===null)return{};for(r={},i=Object.keys(e),n=0,s=i.length;n<s;n+=1)o=i[n],c=String(e[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),u=t.compiledTypeMap.fallback[o],u&&Z6.call(u.styleAliases,c)&&(c=u.styleAliases[c]),r[o]=c;return r}B(iq,"compileStyleMap");function nq(t){var e,r,i;if(e=t.toString(16).toUpperCase(),t<=255)r="x",i=2;else if(t<=65535)r="u",i=4;else if(t<=4294967295)r="U",i=8;else throw new fi("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Br.repeat("0",i-e.length)+e}B(nq,"encodeHex");var vst=1,Ku=2;function aq(t){this.schema=t.schema||E6,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=Br.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=iq(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType=t.quotingType==='"'?Ku:vst,this.forceQuotes=t.forceQuotes||!1,this.replacer=typeof t.replacer=="function"?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}B(aq,"State");function m2(t,e){for(var r=Br.repeat(" ",e),i=0,n=-1,s="",o,c=t.length;i<c;)n=t.indexOf(`
429
+ `,i),n===-1?(o=t.slice(i),i=c):(o=t.slice(i,n+1),i=n+1),o.length&&o!==`
430
+ `&&(s+=r),s+=o;return s}B(m2,"indentString");function Jf(t,e){return`
431
+ `+Br.repeat(" ",t.indent*e)}B(Jf,"generateNextLine");function sq(t,e){var r,i,n;for(r=0,i=t.implicitTypes.length;r<i;r+=1)if(n=t.implicitTypes[r],n.resolve(e))return!0;return!1}B(sq,"testImplicitResolving");function Ju(t){return t===nst||t===rst}B(Ju,"isWhitespace");function Gl(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==nS||65536<=t&&t<=1114111}B(Gl,"isPrintable");function y2(t){return Gl(t)&&t!==nS&&t!==ist&&t!==Zu}B(y2,"isNsCharOrWhitespace");function x2(t,e,r){var i=y2(t),n=i&&!Ju(t);return(r?i:i&&t!==K6&&t!==J6&&t!==tq&&t!==eq&&t!==rq)&&t!==g2&&!(e===Kf&&!n)||y2(e)&&!Ju(e)&&t===g2||e===Kf&&n}B(x2,"isPlainSafe");function oq(t){return Gl(t)&&t!==nS&&!Ju(t)&&t!==hst&&t!==pst&&t!==Kf&&t!==K6&&t!==J6&&t!==tq&&t!==eq&&t!==rq&&t!==g2&&t!==lst&&t!==ust&&t!==ast&&t!==yst&&t!==dst&&t!==fst&&t!==cst&&t!==sst&&t!==ost&&t!==gst&&t!==mst}B(oq,"isPlainSafeFirst");function lq(t){return!Ju(t)&&t!==Kf}B(lq,"isPlainSafeLast");function fl(t,e){var r=t.charCodeAt(e),i;return r>=55296&&r<=56319&&e+1<t.length&&(i=t.charCodeAt(e+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}B(fl,"codePointAt");function aS(t){var e=/^\n* /;return e.test(t)}B(aS,"needIndentIndicator");var cq=1,b2=2,uq=3,hq=4,ol=5;function dq(t,e,r,i,n,s,o,c){var u,h=0,d=null,p=!1,m=!1,g=i!==-1,x=-1,v=oq(fl(t,0))&&lq(fl(t,t.length-1));if(e||o)for(u=0;u<t.length;h>=65536?u+=2:u++){if(h=fl(t,u),!Gl(h))return ol;v=v&&x2(h,d,c),d=h}else{for(u=0;u<t.length;h>=65536?u+=2:u++){if(h=fl(t,u),h===Zu)p=!0,g&&(m=m||u-x-1>i&&t[x+1]!==" ",x=u);else if(!Gl(h))return ol;v=v&&x2(h,d,c),d=h}m=m||g&&u-x-1>i&&t[x+1]!==" "}return!p&&!m?v&&!o&&!n(t)?cq:s===Ku?ol:b2:r>9&&aS(t)?ol:o?s===Ku?ol:b2:m?hq:uq}B(dq,"chooseScalarStyle");function fq(t,e,r,i,n){t.dump=(function(){if(e.length===0)return t.quotingType===Ku?'""':"''";if(!t.noCompatMode&&(xst.indexOf(e)!==-1||bst.test(e)))return t.quotingType===Ku?'"'+e+'"':"'"+e+"'";var s=t.indent*Math.max(1,r),o=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-s),c=i||t.flowLevel>-1&&r>=t.flowLevel;function u(h){return sq(t,h)}switch(B(u,"testAmbiguity"),dq(e,c,t.indent,o,u,t.quotingType,t.forceQuotes&&!i,n)){case cq:return e;case b2:return"'"+e.replace(/'/g,"''")+"'";case uq:return"|"+v2(e,t.indent)+C2(m2(e,s));case hq:return">"+v2(e,t.indent)+C2(m2(pq(e,o),s));case ol:return'"'+gq(e)+'"';default:throw new fi("impossible error: invalid scalar style")}})()}B(fq,"writeScalar");function v2(t,e){var r=aS(t)?String(e):"",i=t[t.length-1]===`
432
+ `,n=i&&(t[t.length-2]===`
433
+ `||t===`
434
+ `),s=n?"+":i?"":"-";return r+s+`
435
+ `}B(v2,"blockHeader");function C2(t){return t[t.length-1]===`
436
+ `?t.slice(0,-1):t}B(C2,"dropEndingNewline");function pq(t,e){for(var r=/(\n+)([^\n]*)/g,i=(function(){var h=t.indexOf(`
437
+ `);return h=h!==-1?h:t.length,r.lastIndex=h,w2(t.slice(0,h),e)})(),n=t[0]===`
438
+ `||t[0]===" ",s,o;o=r.exec(t);){var c=o[1],u=o[2];s=u[0]===" ",i+=c+(!n&&!s&&u!==""?`
439
+ `:"")+w2(u,e),n=s}return i}B(pq,"foldString");function w2(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,i,n=0,s,o=0,c=0,u="";i=r.exec(t);)c=i.index,c-n>e&&(s=o>n?o:c,u+=`
440
+ `+t.slice(n,s),n=s+1),o=c;return u+=`
441
+ `,t.length-n>e&&o>n?u+=t.slice(n,o)+`
442
+ `+t.slice(o+1):u+=t.slice(n),u.slice(1)}B(w2,"foldLine");function gq(t){for(var e="",r=0,i,n=0;n<t.length;r>=65536?n+=2:n++)r=fl(t,n),i=Gr[r],!i&&Gl(r)?(e+=t[n],r>=65536&&(e+=t[n+1])):e+=i||nq(r);return e}B(gq,"escapeString");function mq(t,e,r){var i="",n=t.tag,s,o,c;for(s=0,o=r.length;s<o;s+=1)c=r[s],t.replacer&&(c=t.replacer.call(r,String(s),c)),(Rn(t,e,c,!1,!1)||typeof c>"u"&&Rn(t,e,null,!1,!1))&&(i!==""&&(i+=","+(t.condenseFlow?"":" ")),i+=t.dump);t.tag=n,t.dump="["+i+"]"}B(mq,"writeFlowSequence");function S2(t,e,r,i){var n="",s=t.tag,o,c,u;for(o=0,c=r.length;o<c;o+=1)u=r[o],t.replacer&&(u=t.replacer.call(r,String(o),u)),(Rn(t,e+1,u,!0,!0,!1,!0)||typeof u>"u"&&Rn(t,e+1,null,!0,!0,!1,!0))&&((!i||n!=="")&&(n+=Jf(t,e)),t.dump&&Zu===t.dump.charCodeAt(0)?n+="-":n+="- ",n+=t.dump);t.tag=s,t.dump=n||"[]"}B(S2,"writeBlockSequence");function yq(t,e,r){var i="",n=t.tag,s=Object.keys(r),o,c,u,h,d;for(o=0,c=s.length;o<c;o+=1)d="",i!==""&&(d+=", "),t.condenseFlow&&(d+='"'),u=s[o],h=r[u],t.replacer&&(h=t.replacer.call(r,u,h)),Rn(t,e,u,!1,!1)&&(t.dump.length>1024&&(d+="? "),d+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Rn(t,e,h,!1,!1)&&(d+=t.dump,i+=d));t.tag=n,t.dump="{"+i+"}"}B(yq,"writeFlowMapping");function xq(t,e,r,i){var n="",s=t.tag,o=Object.keys(r),c,u,h,d,p,m;if(t.sortKeys===!0)o.sort();else if(typeof t.sortKeys=="function")o.sort(t.sortKeys);else if(t.sortKeys)throw new fi("sortKeys must be a boolean or a function");for(c=0,u=o.length;c<u;c+=1)m="",(!i||n!=="")&&(m+=Jf(t,e)),h=o[c],d=r[h],t.replacer&&(d=t.replacer.call(r,h,d)),Rn(t,e+1,h,!0,!0,!0)&&(p=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,p&&(t.dump&&Zu===t.dump.charCodeAt(0)?m+="?":m+="? "),m+=t.dump,p&&(m+=Jf(t,e)),Rn(t,e+1,d,!0,p)&&(t.dump&&Zu===t.dump.charCodeAt(0)?m+=":":m+=": ",m+=t.dump,n+=m));t.tag=s,t.dump=n||"{}"}B(xq,"writeBlockMapping");function k2(t,e,r){var i,n,s,o,c,u;for(n=r?t.explicitTypes:t.implicitTypes,s=0,o=n.length;s<o;s+=1)if(c=n[s],(c.instanceOf||c.predicate)&&(!c.instanceOf||typeof e=="object"&&e instanceof c.instanceOf)&&(!c.predicate||c.predicate(e))){if(r?c.multi&&c.representName?t.tag=c.representName(e):t.tag=c.tag:t.tag="?",c.represent){if(u=t.styleMap[c.tag]||c.defaultStyle,Q6.call(c.represent)==="[object Function]")i=c.represent(e,u);else if(Z6.call(c.represent,u))i=c.represent[u](e,u);else throw new fi("!<"+c.tag+'> tag resolver accepts not "'+u+'" style');t.dump=i}return!0}return!1}B(k2,"detectType");function Rn(t,e,r,i,n,s,o){t.tag=null,t.dump=r,k2(t,r,!1)||k2(t,r,!0);var c=Q6.call(t.dump),u=i,h;i&&(i=t.flowLevel<0||t.flowLevel>e);var d=c==="[object Object]"||c==="[object Array]",p,m;if(d&&(p=t.duplicates.indexOf(r),m=p!==-1),(t.tag!==null&&t.tag!=="?"||m||t.indent!==2&&e>0)&&(n=!1),m&&t.usedDuplicates[p])t.dump="*ref_"+p;else{if(d&&m&&!t.usedDuplicates[p]&&(t.usedDuplicates[p]=!0),c==="[object Object]")i&&Object.keys(t.dump).length!==0?(xq(t,e,t.dump,n),m&&(t.dump="&ref_"+p+t.dump)):(yq(t,e,t.dump),m&&(t.dump="&ref_"+p+" "+t.dump));else if(c==="[object Array]")i&&t.dump.length!==0?(t.noArrayIndent&&!o&&e>0?S2(t,e-1,t.dump,n):S2(t,e,t.dump,n),m&&(t.dump="&ref_"+p+t.dump)):(mq(t,e,t.dump),m&&(t.dump="&ref_"+p+" "+t.dump));else if(c==="[object String]")t.tag!=="?"&&fq(t,t.dump,e,s,u);else{if(c==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new fi("unacceptable kind of an object to dump "+c)}t.tag!==null&&t.tag!=="?"&&(h=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?h="!"+h:h.slice(0,18)==="tag:yaml.org,2002:"?h="!!"+h.slice(18):h="!<"+h+">",t.dump=h+" "+t.dump)}return!0}B(Rn,"writeNode");function bq(t,e){var r=[],i=[],n,s;for(tp(t,r,i),n=0,s=i.length;n<s;n+=1)e.duplicates.push(r[i[n]]);e.usedDuplicates=new Array(s)}B(bq,"getDuplicateReferences");function tp(t,e,r){var i,n,s;if(t!==null&&typeof t=="object")if(n=e.indexOf(t),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(e.push(t),Array.isArray(t))for(n=0,s=t.length;n<s;n+=1)tp(t[n],e,r);else for(i=Object.keys(t),n=0,s=i.length;n<s;n+=1)tp(t[i[n]],e,r)}B(tp,"inspectNode");function Cst(t,e){e=e||{};var r=new aq(e);r.noRefs||bq(t,r);var i=t;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Rn(r,0,i,!0,!0)?r.dump+`
443
+ `:""}B(Cst,"dump$1");function wst(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}B(wst,"renamed");var Sst=u6,kst=est.load;/*! Bundled license information:
444
+
445
+ js-yaml/dist/js-yaml.mjs:
446
+ (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
447
+ */var lu=B((t,e)=>{if(e)return"translate("+-t.width/2+", "+-t.height/2+")";const r=t.x??0,i=t.y??0;return"translate("+-(r+t.width/2)+", "+-(i+t.height/2)+")"},"computeLabelTransform"),Pr={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},m4={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Cu(t,e){if(t===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};t=Ke(t),e=Ke(e);const[r,i]=[t.x,t.y],[n,s]=[e.x,e.y],o=n-r,c=s-i;return{angle:Math.atan(c/o),deltaX:o,deltaY:c}}B(Cu,"calculateDeltaAndAngle");var Ke=B(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),_st=B(t=>({x:B(function(e,r,i){let n=0;const s=Ke(i[0]).x<Ke(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Pr,t.arrowTypeStart)){const{angle:g,deltaX:x}=Cu(i[0],i[1]);n=Pr[t.arrowTypeStart]*Math.cos(g)*(x>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Pr,t.arrowTypeEnd)){const{angle:g,deltaX:x}=Cu(i[i.length-1],i[i.length-2]);n=Pr[t.arrowTypeEnd]*Math.cos(g)*(x>=0?1:-1)}const o=Math.abs(Ke(e).x-Ke(i[i.length-1]).x),c=Math.abs(Ke(e).y-Ke(i[i.length-1]).y),u=Math.abs(Ke(e).x-Ke(i[0]).x),h=Math.abs(Ke(e).y-Ke(i[0]).y),d=Pr[t.arrowTypeStart],p=Pr[t.arrowTypeEnd],m=1;if(o<p&&o>0&&c<p){let g=p+m-o;g*=s==="right"?-1:1,n-=g}if(u<d&&u>0&&h<d){let g=d+m-u;g*=s==="right"?-1:1,n+=g}return Ke(e).x+n},"x"),y:B(function(e,r,i){let n=0;const s=Ke(i[0]).y<Ke(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Pr,t.arrowTypeStart)){const{angle:g,deltaY:x}=Cu(i[0],i[1]);n=Pr[t.arrowTypeStart]*Math.abs(Math.sin(g))*(x>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Pr,t.arrowTypeEnd)){const{angle:g,deltaY:x}=Cu(i[i.length-1],i[i.length-2]);n=Pr[t.arrowTypeEnd]*Math.abs(Math.sin(g))*(x>=0?1:-1)}const o=Math.abs(Ke(e).y-Ke(i[i.length-1]).y),c=Math.abs(Ke(e).x-Ke(i[i.length-1]).x),u=Math.abs(Ke(e).y-Ke(i[0]).y),h=Math.abs(Ke(e).x-Ke(i[0]).x),d=Pr[t.arrowTypeStart],p=Pr[t.arrowTypeEnd],m=1;if(o<p&&o>0&&c<p){let g=p+m-o;g*=s==="up"?-1:1,n-=g}if(u<d&&u>0&&h<d){let g=d+m-u;g*=s==="up"?-1:1,n+=g}return Ke(e).y+n},"y")}),"getLineFunctionsWithOffset"),Kd={},Er={},y4;function Tst(){return y4||(y4=1,Object.defineProperty(Er,"__esModule",{value:!0}),Er.BLANK_URL=Er.relativeFirstCharacters=Er.whitespaceEscapeCharsRegex=Er.urlSchemeRegex=Er.ctrlCharactersRegex=Er.htmlCtrlEntityRegex=Er.htmlEntitiesRegex=Er.invalidProtocolRegex=void 0,Er.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Er.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Er.htmlCtrlEntityRegex=/&(newline|tab);/gi,Er.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Er.urlSchemeRegex=/^.+(:|&colon;)/gim,Er.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Er.relativeFirstCharacters=[".","/"],Er.BLANK_URL="about:blank"),Er}var x4;function Est(){if(x4)return Kd;x4=1,Object.defineProperty(Kd,"__esModule",{value:!0}),Kd.sanitizeUrl=s;var t=Tst();function e(o){return t.relativeFirstCharacters.indexOf(o[0])>-1}function r(o){var c=o.replace(t.ctrlCharactersRegex,"");return c.replace(t.htmlEntitiesRegex,function(u,h){return String.fromCharCode(h)})}function i(o){return URL.canParse(o)}function n(o){try{return decodeURIComponent(o)}catch{return o}}function s(o){if(!o)return t.BLANK_URL;var c,u=n(o.trim());do u=r(u).replace(t.htmlCtrlEntityRegex,"").replace(t.ctrlCharactersRegex,"").replace(t.whitespaceEscapeCharsRegex,"").trim(),u=n(u),c=u.match(t.ctrlCharactersRegex)||u.match(t.htmlEntitiesRegex)||u.match(t.htmlCtrlEntityRegex)||u.match(t.whitespaceEscapeCharsRegex);while(c&&c.length>0);var h=u;if(!h)return t.BLANK_URL;if(e(h))return h;var d=h.trimStart(),p=d.match(t.urlSchemeRegex);if(!p)return h;var m=p[0].toLowerCase().trim();if(t.invalidProtocolRegex.test(m))return t.BLANK_URL;var g=d.replace(/\\/g,"/");if(m==="mailto:"||m.includes("://"))return g;if(m==="http:"||m==="https:"){if(!i(g))return t.BLANK_URL;var x=new URL(g);return x.protocol=x.protocol.toLowerCase(),x.hostname=x.hostname.toLowerCase(),x.toString()}return g}return Kd}var Ast=Est();function Bst(t){return Number.isSafeInteger(t)&&t>=0}function vq(t){return t!=null&&typeof t!="function"&&Bst(t.length)}function Lst(t){return t==="__proto__"}function sS(t){return t==null||typeof t!="object"&&typeof t!="function"}function Cq(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}function oS(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const Mst="[object RegExp]",wq="[object String]",Sq="[object Number]",kq="[object Boolean]",_q="[object Arguments]",Nst="[object Symbol]",Ost="[object Date]",Rst="[object Map]",Dst="[object Set]",Fst="[object Array]",Ist="[object ArrayBuffer]",Tq="[object Object]",qst="[object DataView]",zst="[object Uint8Array]",jst="[object Uint8ClampedArray]",$st="[object Uint16Array]",Pst="[object Uint32Array]",Hst="[object Int8Array]",Ust="[object Int16Array]",Gst="[object Int32Array]",Yst="[object Float32Array]",Vst="[object Float64Array]",b4=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})()||Function("return this")();function lS(t){return typeof b4.Buffer<"u"&&b4.Buffer.isBuffer(t)}function cS(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Wst(t,e){return pl(t,void 0,t,new Map,e)}function pl(t,e,r,i=new Map,n=void 0){const s=n==null?void 0:n(t,e,r,i);if(s!==void 0)return s;if(sS(t))return t;if(i.has(t))return i.get(t);if(Array.isArray(t)){const o=new Array(t.length);i.set(t,o);for(let c=0;c<t.length;c++)o[c]=pl(t[c],c,r,i,n);return Object.hasOwn(t,"index")&&(o.index=t.index),Object.hasOwn(t,"input")&&(o.input=t.input),o}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const o=new RegExp(t.source,t.flags);return o.lastIndex=t.lastIndex,o}if(t instanceof Map){const o=new Map;i.set(t,o);for(const[c,u]of t)o.set(c,pl(u,c,r,i,n));return o}if(t instanceof Set){const o=new Set;i.set(t,o);for(const c of t)o.add(pl(c,void 0,r,i,n));return o}if(lS(t))return t.subarray();if(cS(t)){const o=new(Object.getPrototypeOf(t)).constructor(t.length);i.set(t,o);for(let c=0;c<t.length;c++)o[c]=pl(t[c],c,r,i,n);return o}if(t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer)return t.slice(0);if(t instanceof DataView){const o=new DataView(t.buffer.slice(0),t.byteOffset,t.byteLength);return i.set(t,o),Ki(o,t,r,i,n),o}if(typeof File<"u"&&t instanceof File){const o=new File([t],t.name,{type:t.type});return i.set(t,o),Ki(o,t,r,i,n),o}if(typeof Blob<"u"&&t instanceof Blob){const o=new Blob([t],{type:t.type});return i.set(t,o),Ki(o,t,r,i,n),o}if(t instanceof Error){const o=structuredClone(t);return i.set(t,o),o.message=t.message,o.name=t.name,o.stack=t.stack,o.cause=t.cause,o.constructor=t.constructor,Ki(o,t,r,i,n),o}if(t instanceof Boolean){const o=new Boolean(t.valueOf());return i.set(t,o),Ki(o,t,r,i,n),o}if(t instanceof Number){const o=new Number(t.valueOf());return i.set(t,o),Ki(o,t,r,i,n),o}if(t instanceof String){const o=new String(t.valueOf());return i.set(t,o),Ki(o,t,r,i,n),o}if(typeof t=="object"&&Xst(t)){const o=Object.create(Object.getPrototypeOf(t));return i.set(t,o),Ki(o,t,r,i,n),o}return t}function Ki(t,e,r=t,i,n){const s=[...Object.keys(e),...Cq(e)];for(let o=0;o<s.length;o++){const c=s[o],u=Object.getOwnPropertyDescriptor(t,c);(u==null||u.writable)&&(t[c]=pl(e[c],c,r,i,n))}}function Xst(t){switch(oS(t)){case _q:case Fst:case Ist:case qst:case kq:case Ost:case Yst:case Vst:case Hst:case Ust:case Gst:case Rst:case Sq:case Tq:case Mst:case Dst:case wq:case Nst:case zst:case jst:case $st:case Pst:return!0;default:return!1}}function Qst(t,e){return Wst(t,(r,i,n,s)=>{if(typeof t=="object"){if(oS(t)===Tq&&typeof t.constructor!="function"){const o={};return s.set(t,o),Ki(o,t,n,s),o}switch(Object.prototype.toString.call(t)){case Sq:case wq:case kq:{const o=new t.constructor(t==null?void 0:t.valueOf());return Ki(o,t),o}case _q:{const o={};return Ki(o,t),o.length=t.length,o[Symbol.iterator]=t[Symbol.iterator],o}default:return}}})}function v4(t){return Qst(t)}function _2(t){return t!==null&&typeof t=="object"&&oS(t)==="[object Arguments]"}function T2(t){return typeof t=="object"&&t!==null}function Zst(t){return T2(t)&&vq(t)}function vh(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError("Expected a function");const r=function(...n){const s=e?e.apply(this,n):n[0],o=r.cache;if(o.has(s))return o.get(s);const c=t.apply(this,n);return r.cache=o.set(s,c)||o,c},i=vh.Cache||Map;return r.cache=new i,r}vh.Cache=Map;function Kst(){}function Jst(t){const e=t==null?void 0:t.constructor,r=typeof e=="function"?e.prototype:Object.prototype;return t===r}function vf(t){return cS(t)}function gC(t){var r;if(typeof t!="object"||t==null)return!1;if(Object.getPrototypeOf(t)===null)return!0;if(Object.prototype.toString.call(t)!=="[object Object]"){const i=t[Symbol.toStringTag];return i==null||!((r=Object.getOwnPropertyDescriptor(t,Symbol.toStringTag))!=null&&r.writable)?!1:t.toString()===`[object ${i}]`}let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function tot(t){if(sS(t))return t;if(Array.isArray(t)||cS(t)||t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer)return t.slice(0);const e=Object.getPrototypeOf(t);if(e==null)return Object.assign(Object.create(e),t);const r=e.constructor;if(t instanceof Date||t instanceof Map||t instanceof Set)return new r(t);if(t instanceof RegExp){const i=new r(t);return i.lastIndex=t.lastIndex,i}if(t instanceof DataView)return new r(t.buffer.slice(0));if(t instanceof Error){let i;return t instanceof AggregateError?i=new r(t.errors,t.message,{cause:t.cause}):i=new r(t.message,{cause:t.cause}),i.stack=t.stack,Object.assign(i,t),i}if(typeof File<"u"&&t instanceof File)return new r([t],t.name,{type:t.type,lastModified:t.lastModified});if(typeof t=="object"){const i=Object.create(e);return Object.assign(i,t)}return t}function eot(t,...e){const r=e.slice(0,-1),i=e[e.length-1];let n=t;for(let s=0;s<r.length;s++){const o=r[s];n=Cf(n,o,i,new Map)}return n}function Cf(t,e,r,i){if(sS(t)&&(t=Object(t)),e==null||typeof e!="object")return t;if(i.has(e))return tot(i.get(e));if(i.set(e,t),Array.isArray(e)){e=e.slice();for(let s=0;s<e.length;s++)e[s]=e[s]??void 0}const n=[...Object.keys(e),...Cq(e)];for(let s=0;s<n.length;s++){const o=n[s];if(Lst(o))continue;let c=e[o],u=t[o];if(_2(c)&&(c={...c}),_2(u)&&(u={...u}),lS(c)&&(c=v4(c)),Array.isArray(c))if(Array.isArray(u)){const d=[],p=Reflect.ownKeys(u);for(let m=0;m<p.length;m++){const g=p[m];d[g]=u[g]}u=d}else if(Zst(u)){const d=[];for(let p=0;p<u.length;p++)d[p]=u[p];u=d}else u=[];const h=r(u,c,o,t,e,i);h!==void 0?t[o]=h:Array.isArray(c)||T2(u)&&T2(c)&&(gC(u)||gC(c)||vf(u)||vf(c))?t[o]=Cf(u,c,r,i):u==null&&gC(c)?t[o]=Cf({},c,r,i):u==null&&vf(c)?t[o]=v4(c):(u===void 0||c!==void 0)&&(t[o]=c)}return t}function rot(t,...e){return eot(t,...e,Kst)}function C4(t){if(t==null)return!0;if(vq(t))return typeof t.splice!="function"&&typeof t!="string"&&!lS(t)&&!vf(t)&&!_2(t)?!1:t.length===0;if(typeof t=="object"){if(t instanceof Map||t instanceof Set)return t.size===0;const e=Object.keys(t);return Jst(t)?e.filter(r=>r!=="constructor").length===0:e.length===0}return!0}var iot="​",not={curveBasis:c2,curveBasisClosed:cat,curveBasisOpen:uat,curveBumpX:bI,curveBumpY:vI,curveBundle:hat,curveCardinalClosed:dat,curveCardinalOpen:fat,curveCardinal:kI,curveCatmullRomClosed:pat,curveCatmullRomOpen:gat,curveCatmullRom:TI,curveLinear:Ru,curveLinearClosed:mat,curveMonotoneX:NI,curveMonotoneY:OI,curveNatural:DI,curveStep:FI,curveStepAfter:qI,curveStepBefore:II},aot=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,sot=B(function(t,e){const r=Eq(t,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(c=>c.args);$f(o),i=Ar(i,[...o])}else i=r.args;if(!i)return;let n=$w(t,e);const s="config";return i[s]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),i[n]=i[s],delete i[s]),i},"detectInit"),Eq=B(function(t,e=null){var r,i;try{const n=new RegExp(`[%]{2}(?![{]${aot.source})(?=[}][%]{2}).*
448
+ `,"ig");t=t.trim().replace(n,"").replace(/'/gm,'"'),St.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let s;const o=[];for(;(s=Nu.exec(t))!==null;)if(s.index===Nu.lastIndex&&Nu.lastIndex++,s&&!e||e&&((r=s[1])!=null&&r.match(e))||e&&((i=s[2])!=null&&i.match(e))){const c=s[1]?s[1]:s[2],u=s[3]?s[3].trim():s[4]?JSON.parse(s[4].trim()):null;o.push({type:c,args:u})}return o.length===0?{type:t,args:null}:o.length===1?o[0]:o}catch(n){return St.error(`ERROR: ${n.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),oot=B(function(t){return t.replace(Nu,"")},"removeDirectives"),lot=B(function(t,e){for(const[r,i]of e.entries())if(i.match(t))return r;return-1},"isSubstringInArray");function uS(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return not[r]??e}B(uS,"interpolateToCurve");function Aq(t,e){const r=t.trim();if(r)return e.securityLevel!=="loose"?Ast.sanitizeUrl(r):r}B(Aq,"formatUrl");var cot=B((t,...e)=>{const r=t.split("."),i=r.length-1,n=r[i];let s=window;for(let o=0;o<i;o++)if(s=s[r[o]],!s){St.error(`Function name: ${t} not found in window`);return}s[n](...e)},"runFunc");function hS(t,e){return!t||!e?0:Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}B(hS,"distance");function Bq(t){let e,r=0;t.forEach(n=>{r+=hS(n,e),e=n});const i=r/2;return dS(t,i)}B(Bq,"traverseEdge");function Lq(t){return t.length===1?t[0]:Bq(t)}B(Lq,"calcLabelPosition");var w4=B((t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r},"roundNumber"),dS=B((t,e)=>{let r,i=e;for(const n of t){if(r){const s=hS(n,r);if(s===0)return r;if(s<i)i-=s;else{const o=i/s;if(o<=0)return r;if(o>=1)return{x:n.x,y:n.y};if(o>0&&o<1)return{x:w4((1-o)*r.x+o*n.x,5),y:w4((1-o)*r.y+o*n.y,5)}}}r=n}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),uot=B((t,e,r)=>{St.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const n=dS(e,25),s=t?10:5,o=Math.atan2(e[0].y-n.y,e[0].x-n.x),c={x:0,y:0};return c.x=Math.sin(o)*s+(e[0].x+n.x)/2,c.y=-Math.cos(o)*s+(e[0].y+n.y)/2,c},"calcCardinalityPosition");function Mq(t,e,r){const i=structuredClone(r);St.info("our points",i),e!=="start_left"&&e!=="start_right"&&i.reverse();const n=25+t,s=dS(i,n),o=10+t*.5,c=Math.atan2(i[0].y-s.y,i[0].x-s.x),u={x:0,y:0};return e==="start_left"?(u.x=Math.sin(c+Math.PI)*o+(i[0].x+s.x)/2,u.y=-Math.cos(c+Math.PI)*o+(i[0].y+s.y)/2):e==="end_right"?(u.x=Math.sin(c-Math.PI)*o+(i[0].x+s.x)/2-5,u.y=-Math.cos(c-Math.PI)*o+(i[0].y+s.y)/2-5):e==="end_left"?(u.x=Math.sin(c)*o+(i[0].x+s.x)/2-5,u.y=-Math.cos(c)*o+(i[0].y+s.y)/2-5):(u.x=Math.sin(c)*o+(i[0].x+s.x)/2,u.y=-Math.cos(c)*o+(i[0].y+s.y)/2),u}B(Mq,"calcTerminalLabelPosition");function Nq(t){let e="",r="";for(const i of t)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}B(Nq,"getStylesFromArray");var S4=0,hot=B(()=>(S4++,"id-"+Math.random().toString(36).substr(2,12)+"-"+S4),"generateId");function Oq(t){let e="";const r="0123456789abcdef",i=r.length;for(let n=0;n<t;n++)e+=r.charAt(Math.floor(Math.random()*i));return e}B(Oq,"makeRandomHex");var dot=B(t=>Oq(t.length),"random"),fot=B(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),pot=B(function(t,e){const r=e.text.replace(xh.lineBreakRegex," "),[,i]=Zp(e.fontSize),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.style("text-anchor",e.anchor),n.style("font-family",e.fontFamily),n.style("font-size",i),n.style("font-weight",e.fontWeight),n.attr("fill",e.fill),e.class!==void 0&&n.attr("class",e.class);const s=n.append("tspan");return s.attr("x",e.x+e.textMargin*2),s.attr("fill",e.fill),s.text(r),n},"drawSimpleText"),got=vh((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),xh.lineBreakRegex.test(t)))return t;const i=t.split(" ").filter(Boolean),n=[];let s="";return i.forEach((o,c)=>{const u=fa(`${o} `,r),h=fa(s,r);if(u>e){const{hyphenatedStrings:m,remainingWord:g}=mot(o,e,"-",r);n.push(s,...m),s=g}else h+u>=e?(n.push(s),s=o):s=[s,o].filter(Boolean).join(" ");c+1===i.length&&n.push(s)}),n.filter(o=>o!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),mot=vh((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const n=[...t],s=[];let o="";return n.forEach((c,u)=>{const h=`${o}${c}`;if(fa(h,i)>=e){const p=u+1,m=n.length===p,g=`${h}${r}`;s.push(m?h:g),o=""}else o=h}),{hyphenatedStrings:s,remainingWord:o}},(t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Rq(t,e){return fS(t,e).height}B(Rq,"calculateTextHeight");function fa(t,e){return fS(t,e).width}B(fa,"calculateTextWidth");var fS=vh((t,e)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:n=400}=e;if(!t)return{width:0,height:0};const[,s]=Zp(r),o=["sans-serif",i],c=t.split(xh.lineBreakRegex),u=[],h=Xt("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const d=h.append("svg");for(const m of o){let g=0;const x={width:0,height:0,lineHeight:0};for(const v of c){const b=fot();b.text=v||iot;const w=pot(d,b).style("font-size",s).style("font-weight",n).style("font-family",m),T=(w._groups||w)[0][0].getBBox();if(T.width===0&&T.height===0)throw new Error("svg element not in render tree");x.width=Math.round(Math.max(x.width,T.width)),g=Math.round(T.height),x.height+=g,x.lineHeight=Math.round(Math.max(x.lineHeight,g))}u.push(x)}d.remove();const p=isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1;return u[p]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),Rl,yot=(Rl=class{constructor(e=!1,r){this.count=0,this.count=r?r.length:0,this.next=e?()=>this.count++:()=>Date.now()}},B(Rl,"InitIDGenerator"),Rl),Jd,xot=B(function(t){return Jd=Jd||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Jd.innerHTML=t,unescape(Jd.textContent)},"entityDecode");function pS(t){return"str"in t}B(pS,"isDetailedError");var bot=B((t,e,r,i)=>{var s;if(!i)return;const n=(s=t.node())==null?void 0:s.getBBox();n&&t.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",e)},"insertTitle"),Zp=B(t=>{if(typeof t=="number")return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");function gS(t,e){return rot({},t,e)}B(gS,"cleanAndMerge");var an={assignWithDepth:Ar,wrapLabel:got,calculateTextHeight:Rq,calculateTextWidth:fa,calculateTextDimensions:fS,cleanAndMerge:gS,detectInit:sot,detectDirective:Eq,isSubstringInArray:lot,interpolateToCurve:uS,calcLabelPosition:Lq,calcCardinalityPosition:uot,calcTerminalLabelPosition:Mq,formatUrl:Aq,getStylesFromArray:Nq,generateId:hot,random:dot,runFunc:cot,entityDecode:xot,insertTitle:bot,isLabelCoordinateInPath:Dq,parseFontSize:Zp,InitIDGenerator:yot},vot=B(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),e},"encodeEntities"),no=B(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),Xft=B((t,e,{counter:r=0,prefix:i,suffix:n},s)=>s||`${i?`${i}_`:""}${t}_${e}_${r}${n?`_${n}`:""}`,"getEdgeId");function Mr(t){return t??null}B(Mr,"handleUndefinedAttr");function Dq(t,e){const r=Math.round(t.x),i=Math.round(t.y),n=e.replace(/(\d+\.\d+)/g,s=>Math.round(parseFloat(s)).toString());return n.includes(r.toString())||n.includes(i.toString())}B(Dq,"isLabelCoordinateInPath");var mS=B(({flowchart:t})=>{var n,s;const e=((n=t==null?void 0:t.subGraphTitleMargin)==null?void 0:n.top)??0,r=((s=t==null?void 0:t.subGraphTitleMargin)==null?void 0:s.bottom)??0,i=e+r;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function Fq(t,e){const r=t.getElementsByTagName("img");if(!r||r.length===0)return;const i=e.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...r].map(n=>new Promise(s=>{function o(){if(n.style.display="flex",n.style.flexDirection="column",i){const c=_e().fontSize?_e().fontSize:window.getComputedStyle(document.body).fontSize,u=5,[h=iI.fontSize]=Zp(c),d=h*u+"px";n.style.minWidth=d,n.style.maxWidth=d}else n.style.width="100%";s(n)}B(o,"setupImage"),setTimeout(()=>{n.complete&&o()}),n.addEventListener("error",o),n.addEventListener("load",o)})))}B(Fq,"configureLabelImages");var Cot=B(t=>{const{handDrawnSeed:e}=_e();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),ic=B(t=>{const e=wot([...t.cssCompiledStyles||[],...t.cssStyles||[],...t.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),wot=B(t=>{const e=new Map;return t.forEach(r=>{const[i,n]=r.split(":");e.set(i.trim(),n==null?void 0:n.trim())}),e},"styles2Map"),Iq=B(t=>t==="color"||t==="font-size"||t==="font-family"||t==="font-weight"||t==="font-style"||t==="text-decoration"||t==="text-align"||t==="text-transform"||t==="line-height"||t==="letter-spacing"||t==="word-spacing"||t==="text-shadow"||t==="text-overflow"||t==="white-space"||t==="word-wrap"||t==="word-break"||t==="overflow-wrap"||t==="hyphens","isLabelStyle"),jt=B(t=>{const{stylesArray:e}=ic(t),r=[],i=[],n=[],s=[];return e.forEach(o=>{const c=o[0];Iq(c)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),c.includes("stroke")&&n.push(o.join(":")+" !important"),c==="fill"&&s.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:e,borderStyles:n,backgroundStyles:s}},"styles2String"),qt=B((t,e)=>{var u;const{themeVariables:r,handDrawnSeed:i}=_e(),{nodeBorder:n,mainBkg:s}=r,{stylesMap:o}=ic(t);return Object.assign({roughness:.7,fill:o.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||n,seed:i,strokeWidth:((u=o.get("stroke-width"))==null?void 0:u.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:Sot(o.get("stroke-dasharray"))},e)},"userNodeOverrides"),Sot=B(t=>{if(!t)return[0,0];const e=t.trim().split(/\s+/).map(Number);if(e.length===1){const n=isNaN(e[0])?0:e[0];return[n,n]}const r=isNaN(e[0])?0:e[0],i=isNaN(e[1])?0:e[1];return[r,i]},"getStrokeDashArray");const kot=Object.freeze({left:0,top:0,width:16,height:16}),ep=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),qq=Object.freeze({...kot,...ep}),_ot=Object.freeze({...qq,body:"",hidden:!1}),Tot=Object.freeze({width:null,height:null}),Eot=Object.freeze({...Tot,...ep}),Aot=(t,e,r,i="")=>{const n=t.split(":");if(t.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const c=n.pop(),u=n.pop(),h={provider:n.length>0?n[0]:i,prefix:u,name:c};return mC(h)?h:null}const s=n[0],o=s.split("-");if(o.length>1){const c={provider:i,prefix:o.shift(),name:o.join("-")};return mC(c)?c:null}if(r&&i===""){const c={provider:i,prefix:"",name:s};return mC(c,r)?c:null}return null},mC=(t,e)=>t?!!((e&&t.prefix===""||t.prefix)&&t.name):!1;function Bot(t,e){const r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);const i=((t.rotate||0)+(e.rotate||0))%4;return i&&(r.rotate=i),r}function k4(t,e){const r=Bot(t,e);for(const i in _ot)i in ep?i in t&&!(i in r)&&(r[i]=ep[i]):i in e?r[i]=e[i]:i in t&&(r[i]=t[i]);return r}function Lot(t,e){const r=t.icons,i=t.aliases||Object.create(null),n=Object.create(null);function s(o){if(r[o])return n[o]=[];if(!(o in n)){n[o]=null;const c=i[o]&&i[o].parent,u=c&&s(c);u&&(n[o]=[c].concat(u))}return n[o]}return(e||Object.keys(r).concat(Object.keys(i))).forEach(s),n}function _4(t,e,r){const i=t.icons,n=t.aliases||Object.create(null);let s={};function o(c){s=k4(i[c]||n[c],s)}return o(e),r.forEach(o),k4(t,s)}function Mot(t,e){if(t.icons[e])return _4(t,e,[]);const r=Lot(t,[e])[e];return r?_4(t,e,r):null}const Not=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Oot=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function T4(t,e,r){if(e===1)return t;if(r=r||100,typeof t=="number")return Math.ceil(t*e*r)/r;if(typeof t!="string")return t;const i=t.split(Not);if(i===null||!i.length)return t;const n=[];let s=i.shift(),o=Oot.test(s);for(;;){if(o){const c=parseFloat(s);isNaN(c)?n.push(s):n.push(Math.ceil(c*e*r)/r)}else n.push(s);if(s=i.shift(),s===void 0)return n.join("");o=!o}}function Rot(t,e="defs"){let r="";const i=t.indexOf("<"+e);for(;i>=0;){const n=t.indexOf(">",i),s=t.indexOf("</"+e);if(n===-1||s===-1)break;const o=t.indexOf(">",s);if(o===-1)break;r+=t.slice(n+1,s).trim(),t=t.slice(0,i).trim()+t.slice(o+1)}return{defs:r,content:t}}function Dot(t,e){return t?"<defs>"+t+"</defs>"+e:e}function Fot(t,e,r){const i=Rot(t);return Dot(i.defs,e+i.content+r)}const Iot=t=>t==="unset"||t==="undefined"||t==="none";function qot(t,e){const r={...qq,...t},i={...Eot,...e},n={left:r.left,top:r.top,width:r.width,height:r.height};let s=r.body;[r,i].forEach(v=>{const b=[],w=v.hFlip,T=v.vFlip;let k=v.rotate;w?T?k+=2:(b.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),b.push("scale(-1 1)"),n.top=n.left=0):T&&(b.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),b.push("scale(1 -1)"),n.top=n.left=0);let E;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:E=n.height/2+n.top,b.unshift("rotate(90 "+E.toString()+" "+E.toString()+")");break;case 2:b.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:E=n.width/2+n.left,b.unshift("rotate(-90 "+E.toString()+" "+E.toString()+")");break}k%2===1&&(n.left!==n.top&&(E=n.left,n.left=n.top,n.top=E),n.width!==n.height&&(E=n.width,n.width=n.height,n.height=E)),b.length&&(s=Fot(s,'<g transform="'+b.join(" ")+'">',"</g>"))});const o=i.width,c=i.height,u=n.width,h=n.height;let d,p;o===null?(p=c===null?"1em":c==="auto"?h:c,d=T4(p,u/h)):(d=o==="auto"?u:o,p=c===null?T4(d,h/u):c==="auto"?h:c);const m={},g=(v,b)=>{Iot(b)||(m[v]=b.toString())};g("width",d),g("height",p);const x=[n.left,n.top,u,h];return m.viewBox=x.join(" "),{attributes:m,viewBox:x,body:s}}const zot=/\sid="(\S+)"/g,E4=new Map;function jot(t){t=t.replace(/[0-9]+$/,"")||"a";const e=E4.get(t)||0;return E4.set(t,e+1),e?`${t}${e}`:t}function $ot(t){const e=[];let r;for(;r=zot.exec(t);)e.push(r[1]);if(!e.length)return t;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return e.forEach(n=>{const s=jot(n),o=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+s+i+"$3")}),t=t.replace(new RegExp(i,"g"),""),t}function Pot(t,e){let r=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in e)r+=" "+i+'="'+e[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+t+"</svg>"}function yS(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var fo=yS();function zq(t){fo=t}var Du={exec:()=>null};function Te(t,e=""){let r=typeof t=="string"?t:t.source,i={replace:(n,s)=>{let o=typeof s=="string"?s:s.source;return o=o.replace(Zr.caret,"$1"),r=r.replace(n,o),i},getRegex:()=>new RegExp(r,e)};return i}var Hot=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Zr={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},Uot=/^(?:[ \t]*(?:\n|$))+/,Got=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Yot=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ch=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Vot=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,xS=/(?:[*+-]|\d{1,9}[.)])/,jq=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,$q=Te(jq).replace(/bull/g,xS).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Wot=Te(jq).replace(/bull/g,xS).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),bS=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Xot=/^[^\n]+/,vS=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Qot=Te(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",vS).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Zot=Te(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,xS).getRegex(),Kp="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",CS=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Kot=Te("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",CS).replace("tag",Kp).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Pq=Te(bS).replace("hr",Ch).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Kp).getRegex(),Jot=Te(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Pq).getRegex(),wS={blockquote:Jot,code:Got,def:Qot,fences:Yot,heading:Vot,hr:Ch,html:Kot,lheading:$q,list:Zot,newline:Uot,paragraph:Pq,table:Du,text:Xot},A4=Te("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ch).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Kp).getRegex(),tlt={...wS,lheading:Wot,table:A4,paragraph:Te(bS).replace("hr",Ch).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",A4).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Kp).getRegex()},elt={...wS,html:Te(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",CS).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Du,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Te(bS).replace("hr",Ch).replace("heading",` *#{1,6} *[^
449
+ ]`).replace("lheading",$q).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},rlt=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ilt=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Hq=/^( {2,}|\\)\n(?!\s*$)/,nlt=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Jp=/[\p{P}\p{S}]/u,SS=/[\s\p{P}\p{S}]/u,Uq=/[^\s\p{P}\p{S}]/u,alt=Te(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,SS).getRegex(),Gq=/(?!~)[\p{P}\p{S}]/u,slt=/(?!~)[\s\p{P}\p{S}]/u,olt=/(?:[^\s\p{P}\p{S}]|~)/u,llt=Te(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Hot?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Yq=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,clt=Te(Yq,"u").replace(/punct/g,Jp).getRegex(),ult=Te(Yq,"u").replace(/punct/g,Gq).getRegex(),Vq="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",hlt=Te(Vq,"gu").replace(/notPunctSpace/g,Uq).replace(/punctSpace/g,SS).replace(/punct/g,Jp).getRegex(),dlt=Te(Vq,"gu").replace(/notPunctSpace/g,olt).replace(/punctSpace/g,slt).replace(/punct/g,Gq).getRegex(),flt=Te("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Uq).replace(/punctSpace/g,SS).replace(/punct/g,Jp).getRegex(),plt=Te(/\\(punct)/,"gu").replace(/punct/g,Jp).getRegex(),glt=Te(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),mlt=Te(CS).replace("(?:-->|$)","-->").getRegex(),ylt=Te("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",mlt).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),rp=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,xlt=Te(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",rp).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Wq=Te(/^!?\[(label)\]\[(ref)\]/).replace("label",rp).replace("ref",vS).getRegex(),Xq=Te(/^!?\[(ref)\](?:\[\])?/).replace("ref",vS).getRegex(),blt=Te("reflink|nolink(?!\\()","g").replace("reflink",Wq).replace("nolink",Xq).getRegex(),B4=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,kS={_backpedal:Du,anyPunctuation:plt,autolink:glt,blockSkip:llt,br:Hq,code:ilt,del:Du,emStrongLDelim:clt,emStrongRDelimAst:hlt,emStrongRDelimUnd:flt,escape:rlt,link:xlt,nolink:Xq,punctuation:alt,reflink:Wq,reflinkSearch:blt,tag:ylt,text:nlt,url:Du},vlt={...kS,link:Te(/^!?\[(label)\]\((.*?)\)/).replace("label",rp).getRegex(),reflink:Te(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",rp).getRegex()},E2={...kS,emStrongRDelimAst:dlt,emStrongLDelim:ult,url:Te(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",B4).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Te(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",B4).getRegex()},Clt={...E2,br:Te(Hq).replace("{2,}","*").getRegex(),text:Te(E2.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},tf={normal:wS,gfm:tlt,pedantic:elt},cu={normal:kS,gfm:E2,breaks:Clt,pedantic:vlt},wlt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},L4=t=>wlt[t];function kn(t,e){if(e){if(Zr.escapeTest.test(t))return t.replace(Zr.escapeReplace,L4)}else if(Zr.escapeTestNoEncode.test(t))return t.replace(Zr.escapeReplaceNoEncode,L4);return t}function M4(t){try{t=encodeURI(t).replace(Zr.percentDecode,"%")}catch{return null}return t}function N4(t,e){var s;let r=t.replace(Zr.findPipe,(o,c,u)=>{let h=!1,d=c;for(;--d>=0&&u[d]==="\\";)h=!h;return h?"|":" |"}),i=r.split(Zr.splitPipe),n=0;if(i[0].trim()||i.shift(),i.length>0&&!((s=i.at(-1))!=null&&s.trim())&&i.pop(),e)if(i.length>e)i.splice(e);else for(;i.length<e;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(Zr.slashPipe,"|");return i}function uu(t,e,r){let i=t.length;if(i===0)return"";let n=0;for(;n<i&&t.charAt(i-n-1)===e;)n++;return t.slice(0,i-n)}function Slt(t,e){if(t.indexOf(e[1])===-1)return-1;let r=0;for(let i=0;i<t.length;i++)if(t[i]==="\\")i++;else if(t[i]===e[0])r++;else if(t[i]===e[1]&&(r--,r<0))return i;return r>0?-2:-1}function O4(t,e,r,i,n){let s=e.href,o=e.title||null,c=t[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;let u={type:t[0].charAt(0)==="!"?"image":"link",raw:r,href:s,title:o,text:c,tokens:i.inlineTokens(c)};return i.state.inLink=!1,u}function klt(t,e,r){let i=t.match(r.other.indentCodeCompensation);if(i===null)return e;let n=i[1];return e.split(`
450
+ `).map(s=>{let o=s.match(r.other.beginningSpace);if(o===null)return s;let[c]=o;return c.length>=n.length?s.slice(n.length):s}).join(`
451
+ `)}var ip=class{constructor(e){qe(this,"options");qe(this,"rules");qe(this,"lexer");this.options=e||fo}space(e){let r=this.rules.block.newline.exec(e);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(e){let r=this.rules.block.code.exec(e);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:uu(i,`
452
+ `)}}}fences(e){let r=this.rules.block.fences.exec(e);if(r){let i=r[0],n=klt(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:n}}}heading(e){let r=this.rules.block.heading.exec(e);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let n=uu(i,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(i=n.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(e){let r=this.rules.block.hr.exec(e);if(r)return{type:"hr",raw:uu(r[0],`
453
+ `)}}blockquote(e){let r=this.rules.block.blockquote.exec(e);if(r){let i=uu(r[0],`
454
+ `).split(`
455
+ `),n="",s="",o=[];for(;i.length>0;){let c=!1,u=[],h;for(h=0;h<i.length;h++)if(this.rules.other.blockquoteStart.test(i[h]))u.push(i[h]),c=!0;else if(!c)u.push(i[h]);else break;i=i.slice(h);let d=u.join(`
456
+ `),p=d.replace(this.rules.other.blockquoteSetextReplace,`
457
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
458
+ ${d}`:d,s=s?`${s}
459
+ ${p}`:p;let m=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,o,!0),this.lexer.state.top=m,i.length===0)break;let g=o.at(-1);if((g==null?void 0:g.type)==="code")break;if((g==null?void 0:g.type)==="blockquote"){let x=g,v=x.raw+`
460
+ `+i.join(`
461
+ `),b=this.blockquote(v);o[o.length-1]=b,n=n.substring(0,n.length-x.raw.length)+b.raw,s=s.substring(0,s.length-x.text.length)+b.text;break}else if((g==null?void 0:g.type)==="list"){let x=g,v=x.raw+`
462
+ `+i.join(`
463
+ `),b=this.list(v);o[o.length-1]=b,n=n.substring(0,n.length-g.raw.length)+b.raw,s=s.substring(0,s.length-x.raw.length)+b.raw,i=v.substring(o.at(-1).raw.length).split(`
464
+ `);continue}}return{type:"blockquote",raw:n,tokens:o,text:s}}}list(e){let r=this.rules.block.list.exec(e);if(r){let i=r[1].trim(),n=i.length>1,s={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");let o=this.rules.other.listItemRegex(i),c=!1;for(;e;){let h=!1,d="",p="";if(!(r=o.exec(e))||this.rules.block.hr.test(e))break;d=r[0],e=e.substring(d.length);let m=r[2].split(`
465
+ `,1)[0].replace(this.rules.other.listReplaceTabs,T=>" ".repeat(3*T.length)),g=e.split(`
466
+ `,1)[0],x=!m.trim(),v=0;if(this.options.pedantic?(v=2,p=m.trimStart()):x?v=r[1].length+1:(v=r[2].search(this.rules.other.nonSpaceChar),v=v>4?1:v,p=m.slice(v),v+=r[1].length),x&&this.rules.other.blankLine.test(g)&&(d+=g+`
467
+ `,e=e.substring(g.length+1),h=!0),!h){let T=this.rules.other.nextBulletRegex(v),k=this.rules.other.hrRegex(v),E=this.rules.other.fencesBeginRegex(v),L=this.rules.other.headingBeginRegex(v),A=this.rules.other.htmlBeginRegex(v);for(;e;){let R=e.split(`
468
+ `,1)[0],j;if(g=R,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),j=g):j=g.replace(this.rules.other.tabCharGlobal," "),E.test(g)||L.test(g)||A.test(g)||T.test(g)||k.test(g))break;if(j.search(this.rules.other.nonSpaceChar)>=v||!g.trim())p+=`
469
+ `+j.slice(v);else{if(x||m.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||E.test(m)||L.test(m)||k.test(m))break;p+=`
470
+ `+g}!x&&!g.trim()&&(x=!0),d+=R+`
471
+ `,e=e.substring(R.length+1),m=j.slice(v)}}s.loose||(c?s.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(c=!0));let b=null,w;this.options.gfm&&(b=this.rules.other.listIsTask.exec(p),b&&(w=b[0]!=="[ ] ",p=p.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:d,task:!!b,checked:w,loose:!1,text:p,tokens:[]}),s.raw+=d}let u=s.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let h=0;h<s.items.length;h++)if(this.lexer.state.top=!1,s.items[h].tokens=this.lexer.blockTokens(s.items[h].text,[]),!s.loose){let d=s.items[h].tokens.filter(m=>m.type==="space"),p=d.length>0&&d.some(m=>this.rules.other.anyLine.test(m.raw));s.loose=p}if(s.loose)for(let h=0;h<s.items.length;h++)s.items[h].loose=!0;return s}}html(e){let r=this.rules.block.html.exec(e);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(e){let r=this.rules.block.def.exec(e);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:n,title:s}}}table(e){var c;let r=this.rules.block.table.exec(e);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=N4(r[1]),n=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=(c=r[3])!=null&&c.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
472
+ `):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===n.length){for(let u of n)this.rules.other.tableAlignRight.test(u)?o.align.push("right"):this.rules.other.tableAlignCenter.test(u)?o.align.push("center"):this.rules.other.tableAlignLeft.test(u)?o.align.push("left"):o.align.push(null);for(let u=0;u<i.length;u++)o.header.push({text:i[u],tokens:this.lexer.inline(i[u]),header:!0,align:o.align[u]});for(let u of s)o.rows.push(N4(u,o.header.length).map((h,d)=>({text:h,tokens:this.lexer.inline(h),header:!1,align:o.align[d]})));return o}}lheading(e){let r=this.rules.block.lheading.exec(e);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(e){let r=this.rules.block.paragraph.exec(e);if(r){let i=r[1].charAt(r[1].length-1)===`
473
+ `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(e){let r=this.rules.block.text.exec(e);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(e){let r=this.rules.inline.escape.exec(e);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(e){let r=this.rules.inline.tag.exec(e);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(e){let r=this.rules.inline.link.exec(e);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let o=uu(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{let o=Slt(r[2],"()");if(o===-2)return;if(o>-1){let c=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,c).trim(),r[3]=""}}let n=r[2],s="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(n);o&&(n=o[1],s=o[3])}else s=r[3]?r[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?n=n.slice(1):n=n.slice(1,-1)),O4(r,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(e,r){let i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){let n=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=r[n.toLowerCase()];if(!s){let o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return O4(i,s,i[0],this.lexer,this.rules)}}emStrong(e,r,i=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!(!n||n[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!i||this.rules.inline.punctuation.exec(i))){let s=[...n[0]].length-1,o,c,u=s,h=0,d=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,r=r.slice(-1*e.length+s);(n=d.exec(r))!=null;){if(o=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!o)continue;if(c=[...o].length,n[3]||n[4]){u+=c;continue}else if((n[5]||n[6])&&s%3&&!((s+c)%3)){h+=c;continue}if(u-=c,u>0)continue;c=Math.min(c,c+u+h);let p=[...n[0]][0].length,m=e.slice(0,s+n.index+p+c);if(Math.min(s,c)%2){let x=m.slice(1,-1);return{type:"em",raw:m,text:x,tokens:this.lexer.inlineTokens(x)}}let g=m.slice(2,-2);return{type:"strong",raw:m,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(e){let r=this.rules.inline.code.exec(e);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(i),s=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return n&&s&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(e){let r=this.rules.inline.br.exec(e);if(r)return{type:"br",raw:r[0]}}del(e){let r=this.rules.inline.del.exec(e);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(e){let r=this.rules.inline.autolink.exec(e);if(r){let i,n;return r[2]==="@"?(i=r[1],n="mailto:"+i):(i=r[1],n=i),{type:"link",raw:r[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}url(e){var i;let r;if(r=this.rules.inline.url.exec(e)){let n,s;if(r[2]==="@")n=r[0],s="mailto:"+n;else{let o;do o=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(o!==r[0]);n=r[0],r[1]==="www."?s="http://"+r[0]:s=r[0]}return{type:"link",raw:r[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let r=this.rules.inline.text.exec(e);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},en=class A2{constructor(e){qe(this,"tokens");qe(this,"options");qe(this,"state");qe(this,"tokenizer");qe(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||fo,this.options.tokenizer=this.options.tokenizer||new ip,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:Zr,block:tf.normal,inline:cu.normal};this.options.pedantic?(r.block=tf.pedantic,r.inline=cu.pedantic):this.options.gfm&&(r.block=tf.gfm,this.options.breaks?r.inline=cu.breaks:r.inline=cu.gfm),this.tokenizer.rules=r}static get rules(){return{block:tf,inline:cu}}static lex(e,r){return new A2(r).lex(e)}static lexInline(e,r){return new A2(r).inlineTokens(e)}lex(e){e=e.replace(Zr.carriageReturn,`
474
+ `),this.blockTokens(e,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,r=[],i=!1){var n,s,o;for(this.options.pedantic&&(e=e.replace(Zr.tabCharGlobal," ").replace(Zr.spaceLine,""));e;){let c;if((s=(n=this.options.extensions)==null?void 0:n.block)!=null&&s.some(h=>(c=h.call({lexer:this},e,r))?(e=e.substring(c.raw.length),r.push(c),!0):!1))continue;if(c=this.tokenizer.space(e)){e=e.substring(c.raw.length);let h=r.at(-1);c.raw.length===1&&h!==void 0?h.raw+=`
475
+ `:r.push(c);continue}if(c=this.tokenizer.code(e)){e=e.substring(c.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
476
+ `)?"":`
477
+ `)+c.raw,h.text+=`
478
+ `+c.text,this.inlineQueue.at(-1).src=h.text):r.push(c);continue}if(c=this.tokenizer.fences(e)){e=e.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.heading(e)){e=e.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.hr(e)){e=e.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.blockquote(e)){e=e.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.list(e)){e=e.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.html(e)){e=e.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.def(e)){e=e.substring(c.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
479
+ `)?"":`
480
+ `)+c.raw,h.text+=`
481
+ `+c.raw,this.inlineQueue.at(-1).src=h.text):this.tokens.links[c.tag]||(this.tokens.links[c.tag]={href:c.href,title:c.title},r.push(c));continue}if(c=this.tokenizer.table(e)){e=e.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.lheading(e)){e=e.substring(c.raw.length),r.push(c);continue}let u=e;if((o=this.options.extensions)!=null&&o.startBlock){let h=1/0,d=e.slice(1),p;this.options.extensions.startBlock.forEach(m=>{p=m.call({lexer:this},d),typeof p=="number"&&p>=0&&(h=Math.min(h,p))}),h<1/0&&h>=0&&(u=e.substring(0,h+1))}if(this.state.top&&(c=this.tokenizer.paragraph(u))){let h=r.at(-1);i&&(h==null?void 0:h.type)==="paragraph"?(h.raw+=(h.raw.endsWith(`
482
+ `)?"":`
483
+ `)+c.raw,h.text+=`
484
+ `+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(c),i=u.length!==e.length,e=e.substring(c.raw.length);continue}if(c=this.tokenizer.text(e)){e=e.substring(c.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
485
+ `)?"":`
486
+ `)+c.raw,h.text+=`
487
+ `+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(c);continue}if(e){let h="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){var u,h,d,p,m;let i=e,n=null;if(this.tokens.links){let g=Object.keys(this.tokens.links);if(g.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)g.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,n.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s;for(;(n=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)s=n[2]?n[2].length:0,i=i.slice(0,n.index+s)+"["+"a".repeat(n[0].length-s-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((h=(u=this.options.hooks)==null?void 0:u.emStrongMask)==null?void 0:h.call({lexer:this},i))??i;let o=!1,c="";for(;e;){o||(c=""),o=!1;let g;if((p=(d=this.options.extensions)==null?void 0:d.inline)!=null&&p.some(v=>(g=v.call({lexer:this},e,r))?(e=e.substring(g.raw.length),r.push(g),!0):!1))continue;if(g=this.tokenizer.escape(e)){e=e.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.tag(e)){e=e.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.link(e)){e=e.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(g.raw.length);let v=r.at(-1);g.type==="text"&&(v==null?void 0:v.type)==="text"?(v.raw+=g.raw,v.text+=g.text):r.push(g);continue}if(g=this.tokenizer.emStrong(e,i,c)){e=e.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.codespan(e)){e=e.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.br(e)){e=e.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.del(e)){e=e.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.autolink(e)){e=e.substring(g.raw.length),r.push(g);continue}if(!this.state.inLink&&(g=this.tokenizer.url(e))){e=e.substring(g.raw.length),r.push(g);continue}let x=e;if((m=this.options.extensions)!=null&&m.startInline){let v=1/0,b=e.slice(1),w;this.options.extensions.startInline.forEach(T=>{w=T.call({lexer:this},b),typeof w=="number"&&w>=0&&(v=Math.min(v,w))}),v<1/0&&v>=0&&(x=e.substring(0,v+1))}if(g=this.tokenizer.inlineText(x)){e=e.substring(g.raw.length),g.raw.slice(-1)!=="_"&&(c=g.raw.slice(-1)),o=!0;let v=r.at(-1);(v==null?void 0:v.type)==="text"?(v.raw+=g.raw,v.text+=g.text):r.push(g);continue}if(e){let v="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(v);break}else throw new Error(v)}}return r}},np=class{constructor(e){qe(this,"options");qe(this,"parser");this.options=e||fo}space(e){return""}code({text:e,lang:r,escaped:i}){var o;let n=(o=(r||"").match(Zr.notSpaceStart))==null?void 0:o[0],s=e.replace(Zr.endingNewline,"")+`
488
+ `;return n?'<pre><code class="language-'+kn(n)+'">'+(i?s:kn(s,!0))+`</code></pre>
489
+ `:"<pre><code>"+(i?s:kn(s,!0))+`</code></pre>
490
+ `}blockquote({tokens:e}){return`<blockquote>
491
+ ${this.parser.parse(e)}</blockquote>
492
+ `}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:r}){return`<h${r}>${this.parser.parseInline(e)}</h${r}>
493
+ `}hr(e){return`<hr>
494
+ `}list(e){let r=e.ordered,i=e.start,n="";for(let c=0;c<e.items.length;c++){let u=e.items[c];n+=this.listitem(u)}let s=r?"ol":"ul",o=r&&i!==1?' start="'+i+'"':"";return"<"+s+o+`>
495
+ `+n+"</"+s+`>
496
+ `}listitem(e){var i;let r="";if(e.task){let n=this.checkbox({checked:!!e.checked});e.loose?((i=e.tokens[0])==null?void 0:i.type)==="paragraph"?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=n+" "+kn(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):r+=n+" "}return r+=this.parser.parse(e.tokens,!!e.loose),`<li>${r}</li>
497
+ `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
498
+ `}table(e){let r="",i="";for(let s=0;s<e.header.length;s++)i+=this.tablecell(e.header[s]);r+=this.tablerow({text:i});let n="";for(let s=0;s<e.rows.length;s++){let o=e.rows[s];i="";for(let c=0;c<o.length;c++)i+=this.tablecell(o[c]);n+=this.tablerow({text:i})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
499
+ <thead>
500
+ `+r+`</thead>
501
+ `+n+`</table>
502
+ `}tablerow({text:e}){return`<tr>
503
+ ${e}</tr>
504
+ `}tablecell(e){let r=this.parser.parseInline(e.tokens),i=e.header?"th":"td";return(e.align?`<${i} align="${e.align}">`:`<${i}>`)+r+`</${i}>
505
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${kn(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:r,tokens:i}){let n=this.parser.parseInline(i),s=M4(e);if(s===null)return n;e=s;let o='<a href="'+e+'"';return r&&(o+=' title="'+kn(r)+'"'),o+=">"+n+"</a>",o}image({href:e,title:r,text:i,tokens:n}){n&&(i=this.parser.parseInline(n,this.parser.textRenderer));let s=M4(e);if(s===null)return kn(i);e=s;let o=`<img src="${e}" alt="${i}"`;return r&&(o+=` title="${kn(r)}"`),o+=">",o}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:kn(e.text)}},_S=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},rn=class B2{constructor(e){qe(this,"options");qe(this,"renderer");qe(this,"textRenderer");this.options=e||fo,this.options.renderer=this.options.renderer||new np,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new _S}static parse(e,r){return new B2(r).parse(e)}static parseInline(e,r){return new B2(r).parseInline(e)}parse(e,r=!0){var n,s;let i="";for(let o=0;o<e.length;o++){let c=e[o];if((s=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&s[c.type]){let h=c,d=this.options.extensions.renderers[h.type].call({parser:this},h);if(d!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(h.type)){i+=d||"";continue}}let u=c;switch(u.type){case"space":{i+=this.renderer.space(u);continue}case"hr":{i+=this.renderer.hr(u);continue}case"heading":{i+=this.renderer.heading(u);continue}case"code":{i+=this.renderer.code(u);continue}case"table":{i+=this.renderer.table(u);continue}case"blockquote":{i+=this.renderer.blockquote(u);continue}case"list":{i+=this.renderer.list(u);continue}case"html":{i+=this.renderer.html(u);continue}case"def":{i+=this.renderer.def(u);continue}case"paragraph":{i+=this.renderer.paragraph(u);continue}case"text":{let h=u,d=this.renderer.text(h);for(;o+1<e.length&&e[o+1].type==="text";)h=e[++o],d+=`
506
+ `+this.renderer.text(h);r?i+=this.renderer.paragraph({type:"paragraph",raw:d,text:d,tokens:[{type:"text",raw:d,text:d,escaped:!0}]}):i+=d;continue}default:{let h='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}parseInline(e,r=this.renderer){var n,s;let i="";for(let o=0;o<e.length;o++){let c=e[o];if((s=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&s[c.type]){let h=this.options.extensions.renderers[c.type].call({parser:this},c);if(h!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(c.type)){i+=h||"";continue}}let u=c;switch(u.type){case"escape":{i+=r.text(u);break}case"html":{i+=r.html(u);break}case"link":{i+=r.link(u);break}case"image":{i+=r.image(u);break}case"strong":{i+=r.strong(u);break}case"em":{i+=r.em(u);break}case"codespan":{i+=r.codespan(u);break}case"br":{i+=r.br(u);break}case"del":{i+=r.del(u);break}case"text":{i+=r.text(u);break}default:{let h='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}},of,wu=(of=class{constructor(e){qe(this,"options");qe(this,"block");this.options=e||fo}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?en.lex:en.lexInline}provideParser(){return this.block?rn.parse:rn.parseInline}},qe(of,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),qe(of,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),of),_lt=class{constructor(...e){qe(this,"defaults",yS());qe(this,"options",this.setOptions);qe(this,"parse",this.parseMarkdown(!0));qe(this,"parseInline",this.parseMarkdown(!1));qe(this,"Parser",rn);qe(this,"Renderer",np);qe(this,"TextRenderer",_S);qe(this,"Lexer",en);qe(this,"Tokenizer",ip);qe(this,"Hooks",wu);this.use(...e)}walkTokens(e,r){var n,s;let i=[];for(let o of e)switch(i=i.concat(r.call(this,o)),o.type){case"table":{let c=o;for(let u of c.header)i=i.concat(this.walkTokens(u.tokens,r));for(let u of c.rows)for(let h of u)i=i.concat(this.walkTokens(h.tokens,r));break}case"list":{let c=o;i=i.concat(this.walkTokens(c.items,r));break}default:{let c=o;(s=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&s[c.type]?this.defaults.extensions.childTokens[c.type].forEach(u=>{let h=c[u].flat(1/0);i=i.concat(this.walkTokens(h,r))}):c.tokens&&(i=i.concat(this.walkTokens(c.tokens,r)))}}return i}use(...e){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(i=>{let n={...i};if(n.async=this.defaults.async||n.async||!1,i.extensions&&(i.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let o=r.renderers[s.name];o?r.renderers[s.name]=function(...c){let u=s.renderer.apply(this,c);return u===!1&&(u=o.apply(this,c)),u}:r.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=r[s.level];o?o.unshift(s.tokenizer):r[s.level]=[s.tokenizer],s.start&&(s.level==="block"?r.startBlock?r.startBlock.push(s.start):r.startBlock=[s.start]:s.level==="inline"&&(r.startInline?r.startInline.push(s.start):r.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(r.childTokens[s.name]=s.childTokens)}),n.extensions=r),i.renderer){let s=this.defaults.renderer||new np(this.defaults);for(let o in i.renderer){if(!(o in s))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let c=o,u=i.renderer[c],h=s[c];s[c]=(...d)=>{let p=u.apply(s,d);return p===!1&&(p=h.apply(s,d)),p||""}}n.renderer=s}if(i.tokenizer){let s=this.defaults.tokenizer||new ip(this.defaults);for(let o in i.tokenizer){if(!(o in s))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let c=o,u=i.tokenizer[c],h=s[c];s[c]=(...d)=>{let p=u.apply(s,d);return p===!1&&(p=h.apply(s,d)),p}}n.tokenizer=s}if(i.hooks){let s=this.defaults.hooks||new wu;for(let o in i.hooks){if(!(o in s))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let c=o,u=i.hooks[c],h=s[c];wu.passThroughHooks.has(o)?s[c]=d=>{if(this.defaults.async&&wu.passThroughHooksRespectAsync.has(o))return(async()=>{let m=await u.call(s,d);return h.call(s,m)})();let p=u.call(s,d);return h.call(s,p)}:s[c]=(...d)=>{if(this.defaults.async)return(async()=>{let m=await u.apply(s,d);return m===!1&&(m=await h.apply(s,d)),m})();let p=u.apply(s,d);return p===!1&&(p=h.apply(s,d)),p}}n.hooks=s}if(i.walkTokens){let s=this.defaults.walkTokens,o=i.walkTokens;n.walkTokens=function(c){let u=[];return u.push(o.call(this,c)),s&&(u=u.concat(s.call(this,c))),u}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,r){return en.lex(e,r??this.defaults)}parser(e,r){return rn.parse(e,r??this.defaults)}parseMarkdown(e){return(r,i)=>{let n={...i},s={...this.defaults,...n},o=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&n.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=e),s.async)return(async()=>{let c=s.hooks?await s.hooks.preprocess(r):r,u=await(s.hooks?await s.hooks.provideLexer():e?en.lex:en.lexInline)(c,s),h=s.hooks?await s.hooks.processAllTokens(u):u;s.walkTokens&&await Promise.all(this.walkTokens(h,s.walkTokens));let d=await(s.hooks?await s.hooks.provideParser():e?rn.parse:rn.parseInline)(h,s);return s.hooks?await s.hooks.postprocess(d):d})().catch(o);try{s.hooks&&(r=s.hooks.preprocess(r));let c=(s.hooks?s.hooks.provideLexer():e?en.lex:en.lexInline)(r,s);s.hooks&&(c=s.hooks.processAllTokens(c)),s.walkTokens&&this.walkTokens(c,s.walkTokens);let u=(s.hooks?s.hooks.provideParser():e?rn.parse:rn.parseInline)(c,s);return s.hooks&&(u=s.hooks.postprocess(u)),u}catch(c){return o(c)}}}onError(e,r){return i=>{if(i.message+=`
507
+ Please report this to https://github.com/markedjs/marked.`,e){let n="<p>An error occurred:</p><pre>"+kn(i.message+"",!0)+"</pre>";return r?Promise.resolve(n):n}if(r)return Promise.reject(i);throw i}}},ao=new _lt;function Ne(t,e){return ao.parse(t,e)}Ne.options=Ne.setOptions=function(t){return ao.setOptions(t),Ne.defaults=ao.defaults,zq(Ne.defaults),Ne};Ne.getDefaults=yS;Ne.defaults=fo;Ne.use=function(...t){return ao.use(...t),Ne.defaults=ao.defaults,zq(Ne.defaults),Ne};Ne.walkTokens=function(t,e){return ao.walkTokens(t,e)};Ne.parseInline=ao.parseInline;Ne.Parser=rn;Ne.parser=rn.parse;Ne.Renderer=np;Ne.TextRenderer=_S;Ne.Lexer=en;Ne.lexer=en.lex;Ne.Tokenizer=ip;Ne.Hooks=wu;Ne.parse=Ne;Ne.options;Ne.setOptions;Ne.use;Ne.walkTokens;Ne.parseInline;rn.parse;en.lex;function Qq(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var i=Array.from(typeof t=="string"?[t]:t);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var n=i.reduce(function(c,u){var h=u.match(/\n([\t ]+|(?!\s).)/g);return h?c.concat(h.map(function(d){var p,m;return(m=(p=d.match(/[\t ]/g))===null||p===void 0?void 0:p.length)!==null&&m!==void 0?m:0})):c},[]);if(n.length){var s=new RegExp(`
508
+ [ ]{`+Math.min.apply(Math,n)+"}","g");i=i.map(function(c){return c.replace(s,`
509
+ `)})}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return e.forEach(function(c,u){var h=o.match(/(?:^|\n)( *)$/),d=h?h[1]:"",p=c;typeof c=="string"&&c.includes(`
510
+ `)&&(p=String(c).split(`
511
+ `).map(function(m,g){return g===0?m:""+d+m}).join(`
512
+ `)),o+=p+i[u+1]}),o}var Tlt={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},L2=new Map,Zq=new Map,Elt=B(t=>{for(const e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(St.debug("Registering icon pack:",e.name),"loader"in e)Zq.set(e.name,e.loader);else if("icons"in e)L2.set(e.name,e.icons);else throw St.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Kq=B(async(t,e)=>{const r=Aot(t,!0,e!==void 0);if(!r)throw new Error(`Invalid icon name: ${t}`);const i=r.prefix||e;if(!i)throw new Error(`Icon name must contain a prefix: ${t}`);let n=L2.get(i);if(!n){const o=Zq.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{n={...await o(),prefix:i},L2.set(i,n)}catch(c){throw St.error(c),new Error(`Failed to load icon set: ${r.prefix}`)}}const s=Mot(n,r.name);if(!s)throw new Error(`Icon not found: ${t}`);return s},"getRegisteredIconData"),Alt=B(async t=>{try{return await Kq(t),!0}catch{return!1}},"isIconAvailable"),wh=B(async(t,e,r)=>{let i;try{i=await Kq(t,e==null?void 0:e.fallbackPrefix)}catch(o){St.error(o),i=Tlt}const n=qot(i,e),s=Pot($ot(n.body),{...n.attributes,...r});return hn(s,nr())},"getIconSVG");function Jq(t,{markdownAutoWrap:e}){const i=t.replace(/<br\/>/g,`
513
+ `).replace(/\n{2,}/g,`
514
+ `);return Qq(i)}B(Jq,"preprocessMarkdown");function tz(t){return t.split(/\\n|\n|<br\s*\/?>/gi).map(e=>{var r;return((r=e.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:r.map(i=>({content:i,type:"normal"})))??[]})}B(tz,"nonMarkdownToLines");function ez(t,e={}){const r=Jq(t,e),i=Ne.lexer(r),n=[[]];let s=0;function o(c,u="normal"){c.type==="text"?c.text.split(`
515
+ `).forEach((d,p)=>{p!==0&&(s++,n.push([])),d.split(" ").forEach(m=>{m=m.replace(/&#39;/g,"'"),m&&n[s].push({content:m,type:u})})}):c.type==="strong"||c.type==="em"?c.tokens.forEach(h=>{o(h,c.type)}):c.type==="html"&&n[s].push({content:c.text,type:"normal"})}return B(o,"processNode"),i.forEach(c=>{var u;c.type==="paragraph"?(u=c.tokens)==null||u.forEach(h=>{o(h)}):c.type==="html"?n[s].push({content:c.text,type:"normal"}):n[s].push({content:c.raw,type:"normal"})}),n}B(ez,"markdownToLines");function rz(t){return t?`<p>${t.replace(/\\n|\n/g,"<br />")}</p>`:""}B(rz,"nonMarkdownToHTML");function iz(t,{markdownAutoWrap:e}={}){const r=Ne.lexer(t);function i(n){var s,o,c;return n.type==="text"?e===!1?n.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):n.text.replace(/\n */g,"<br/>"):n.type==="strong"?`<strong>${(s=n.tokens)==null?void 0:s.map(i).join("")}</strong>`:n.type==="em"?`<em>${(o=n.tokens)==null?void 0:o.map(i).join("")}</em>`:n.type==="paragraph"?`<p>${(c=n.tokens)==null?void 0:c.map(i).join("")}</p>`:n.type==="space"?"":n.type==="html"?`${n.text}`:n.type==="escape"?n.text:(St.warn(`Unsupported markdown: ${n.type}`),n.raw)}return B(i,"output"),r.map(i).join("")}B(iz,"markdownToHTML");function nz(t){return Intl.Segmenter?[...new Intl.Segmenter().segment(t)].map(e=>e.segment):[...t]}B(nz,"splitTextToChars");function az(t,e){const r=nz(e.content);return TS(t,[],r,e.type)}B(az,"splitWordToFitWidth");function TS(t,e,r,i){if(r.length===0)return[{content:e.join(""),type:i},{content:"",type:i}];const[n,...s]=r,o=[...e,n];return t([{content:o.join(""),type:i}])?TS(t,o,s,i):(e.length===0&&n&&(e.push(n),r.shift()),[{content:e.join(""),type:i},{content:r.join(""),type:i}])}B(TS,"splitWordToFitWidthRecursion");function sz(t,e){if(t.some(({content:r})=>r.includes(`
516
+ `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return ap(t,e)}B(sz,"splitLineToFitWidth");function ap(t,e,r=[],i=[]){if(t.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let n="";t[0].content===" "&&(n=" ",t.shift());const s=t.shift()??{content:" ",type:"normal"},o=[...i];if(n!==""&&o.push({content:n,type:"normal"}),o.push(s),e(o))return ap(t,e,r,o);if(i.length>0)r.push(i),t.unshift(s);else if(s.content){const[c,u]=az(e,s);r.push([c]),u.content&&t.unshift(u)}return ap(t,e,r)}B(ap,"splitLineToFitWidthRecursion");function M2(t,e){e&&t.attr("style",e)}B(M2,"applyStyle");var R4=16384;async function oz(t,e,r,i,n=!1,s=nr()){const o=t.append("foreignObject");o.attr("width",`${Math.min(10*r,R4)}px`),o.attr("height",`${Math.min(10*r,R4)}px`);const c=o.append("xhtml:div"),u=Xu(e.label)?await fI(e.label.replace(xh.lineBreakRegex,`
517
+ `),s):hn(e.label,s),h=e.isNode?"nodeLabel":"edgeLabel",d=c.append("span");d.html(u),M2(d,e.labelStyle),d.attr("class",`${h} ${i}`),M2(c,e.labelStyle),c.style("display","table-cell"),c.style("white-space","nowrap"),c.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(c.style("max-width",r+"px"),c.style("text-align","center")),c.attr("xmlns","http://www.w3.org/1999/xhtml"),n&&c.attr("class","labelBkg");let p=c.node().getBoundingClientRect();return p.width===r&&(c.style("display","table"),c.style("white-space","break-spaces"),c.style("width",r+"px"),p=c.node().getBoundingClientRect()),o.node()}B(oz,"addHtmlSpan");function tg(t,e,r,i=!1){const n=t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em");return i&&n.attr("text-anchor","middle"),n}B(tg,"createTspan");function lz(t,e,r){const i=t.append("text"),n=tg(i,1,e);eg(n,r);const s=n.node().getComputedTextLength();return i.remove(),s}B(lz,"computeWidthOfText");function Blt(t,e,r){var o;const i=t.append("text"),n=tg(i,1,e);eg(n,[{content:r,type:"normal"}]);const s=(o=n.node())==null?void 0:o.getBoundingClientRect();return s&&i.remove(),s}B(Blt,"computeDimensionOfText");function cz(t,e,r,i=!1,n=!1){const o=e.append("g"),c=o.insert("rect").attr("class","background").attr("style","stroke: none"),u=o.append("text").attr("y","-10.1");n&&u.attr("text-anchor","middle");let h=0;for(const d of r){const p=B(g=>lz(o,1.1,g)<=t,"checkWidth"),m=p(d)?[d]:sz(d,p);for(const g of m){const x=tg(u,h,1.1,n);eg(x,g),h++}}if(i){const d=u.node().getBBox(),p=2;return c.attr("x",d.x-p).attr("y",d.y-p).attr("width",d.width+2*p).attr("height",d.height+2*p),o.node()}else return u.node()}B(cz,"createFormattedText");function N2(t){const e=/&(amp|lt|gt);/g;return t.replace(e,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}B(N2,"decodeHTMLEntities");function eg(t,e){t.text(""),e.forEach((r,i)=>{const n=t.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?n.text(N2(r.content)):n.text(" "+N2(r.content))})}B(eg,"updateTextContentAndStyles");async function uz(t,e={}){const r=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(n,s,o)=>(r.push((async()=>{const c=`${s}:${o}`;return await Alt(c)?await wh(c,void 0,{class:"label-icon"}):`<i class='${hn(n,e).replace(":"," ")}'></i>`})()),n));const i=await Promise.all(r);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}B(uz,"replaceIconSubstring");var xa=B(async(t,e="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:s=!0,markdown:o=!0,isNode:c=!0,width:u=200,addSvgBackground:h=!1}={},d)=>{if(St.debug("XYZ createText",e,r,i,n,s,c,"addSvgBackground: ",h),s){const p=o?iz(e,d):rz(e),m=await uz(no(p),d),g=e.replace(/\\\\/g,"\\"),x={isNode:c,label:Xu(e)?g:m,labelStyle:r.replace("fill:","color:")};return await oz(t,x,u,n,h,d)}else{const p=no(e.replace(/<br\s*\/?>/g,"<br/>")),m=o?ez(p.replace("<br>","<br/>"),d):tz(p),g=cz(u,t,m,e?h:!1,!c);if(c){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const x=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Xt(g).attr("style",x)}else{const x=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Xt(g).select("rect").attr("style",x.replace(/background:/g,"fill:"));const v=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Xt(g).select("text").attr("style",v)}return i?Xt(g).selectAll("tspan.text-outer-tspan").classed("title-row",!0):Xt(g).selectAll("tspan.text-outer-tspan").classed("row",!0),g}},"createText");function yC(t,e,r){if(t&&t.length){const[i,n]=e,s=Math.PI/180*r,o=Math.cos(s),c=Math.sin(s);for(const u of t){const[h,d]=u;u[0]=(h-i)*o-(d-n)*c+i,u[1]=(h-i)*c+(d-n)*o+n}}}function Llt(t,e){return t[0]===e[0]&&t[1]===e[1]}function Mlt(t,e,r,i=1){const n=r,s=Math.max(e,.1),o=t[0]&&t[0][0]&&typeof t[0][0]=="number"?[t]:t,c=[0,0];if(n)for(const h of o)yC(h,c,n);const u=(function(h,d,p){const m=[];for(const T of h){const k=[...T];Llt(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&m.push(k)}const g=[];d=Math.max(d,.1);const x=[];for(const T of m)for(let k=0;k<T.length-1;k++){const E=T[k],L=T[k+1];if(E[1]!==L[1]){const A=Math.min(E[1],L[1]);x.push({ymin:A,ymax:Math.max(E[1],L[1]),x:A===E[1]?E[0]:L[0],islope:(L[0]-E[0])/(L[1]-E[1])})}}if(x.sort(((T,k)=>T.ymin<k.ymin?-1:T.ymin>k.ymin?1:T.x<k.x?-1:T.x>k.x?1:T.ymax===k.ymax?0:(T.ymax-k.ymax)/Math.abs(T.ymax-k.ymax))),!x.length)return g;let v=[],b=x[0].ymin,w=0;for(;v.length||x.length;){if(x.length){let T=-1;for(let k=0;k<x.length&&!(x[k].ymin>b);k++)T=k;x.splice(0,T+1).forEach((k=>{v.push({s:b,edge:k})}))}if(v=v.filter((T=>!(T.edge.ymax<=b))),v.sort(((T,k)=>T.edge.x===k.edge.x?0:(T.edge.x-k.edge.x)/Math.abs(T.edge.x-k.edge.x))),(p!==1||w%d==0)&&v.length>1)for(let T=0;T<v.length;T+=2){const k=T+1;if(k>=v.length)break;const E=v[T].edge,L=v[k].edge;g.push([[Math.round(E.x),b],[Math.round(L.x),b]])}b+=p,v.forEach((T=>{T.edge.x=T.edge.x+p*T.edge.islope})),w++}return g})(o,s,i);if(n){for(const h of o)yC(h,c,-n);(function(h,d,p){const m=[];h.forEach((g=>m.push(...g))),yC(m,d,p)})(u,c,-n)}return u}function Sh(t,e){var r;const i=e.hachureAngle+90;let n=e.hachureGap;n<0&&(n=4*e.strokeWidth),n=Math.round(Math.max(n,.1));let s=1;return e.roughness>=1&&(((r=e.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(s=n),Mlt(t,n,i,s||1)}class ES{constructor(e){this.helper=e}fillPolygons(e,r){return this._fillPolygons(e,r)}_fillPolygons(e,r){const i=Sh(e,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(e,r){const i=[];for(const n of e)i.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],r));return i}}function rg(t){const e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}class Nlt extends ES{fillPolygons(e,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const n=Sh(e,Object.assign({},r,{hachureGap:i})),s=Math.PI/180*r.hachureAngle,o=[],c=.5*i*Math.cos(s),u=.5*i*Math.sin(s);for(const[h,d]of n)rg([h,d])&&o.push([[h[0]-c,h[1]+u],[...d]],[[h[0]+c,h[1]-u],[...d]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class Olt extends ES{fillPolygons(e,r){const i=this._fillPolygons(e,r),n=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),s=this._fillPolygons(e,n);return i.ops=i.ops.concat(s.ops),i}}class Rlt{constructor(e){this.helper=e}fillPolygons(e,r){const i=Sh(e,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(e,r){const i=[];let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let s=r.fillWeight;s<0&&(s=r.strokeWidth/2);const o=n/4;for(const c of e){const u=rg(c),h=u/n,d=Math.ceil(h)-1,p=u-d*n,m=(c[0][0]+c[1][0])/2-n/4,g=Math.min(c[0][1],c[1][1]);for(let x=0;x<d;x++){const v=g+p+x*n,b=m-o+2*Math.random()*o,w=v-o+2*Math.random()*o,T=this.helper.ellipse(b,w,s,s,r);i.push(...T.ops)}}return{type:"fillSketch",ops:i}}}class Dlt{constructor(e){this.helper=e}fillPolygons(e,r){const i=Sh(e,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(e,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,n=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,s=[];return e.forEach((o=>{const c=rg(o),u=Math.floor(c/(i+n)),h=(c+n-u*(i+n))/2;let d=o[0],p=o[1];d[0]>p[0]&&(d=o[1],p=o[0]);const m=Math.atan((p[1]-d[1])/(p[0]-d[0]));for(let g=0;g<u;g++){const x=g*(i+n),v=x+i,b=[d[0]+x*Math.cos(m)+h*Math.cos(m),d[1]+x*Math.sin(m)+h*Math.sin(m)],w=[d[0]+v*Math.cos(m)+h*Math.cos(m),d[1]+v*Math.sin(m)+h*Math.sin(m)];s.push(...this.helper.doubleLineOps(b[0],b[1],w[0],w[1],r))}})),s}}class Flt{constructor(e){this.helper=e}fillPolygons(e,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,n=r.zigzagOffset<0?i:r.zigzagOffset,s=Sh(e,r=Object.assign({},r,{hachureGap:i+n}));return{type:"fillSketch",ops:this.zigzagLines(s,n,r)}}zigzagLines(e,r,i){const n=[];return e.forEach((s=>{const o=rg(s),c=Math.round(o/(2*r));let u=s[0],h=s[1];u[0]>h[0]&&(u=s[1],h=s[0]);const d=Math.atan((h[1]-u[1])/(h[0]-u[0]));for(let p=0;p<c;p++){const m=2*p*r,g=2*(p+1)*r,x=Math.sqrt(2*Math.pow(r,2)),v=[u[0]+m*Math.cos(d),u[1]+m*Math.sin(d)],b=[u[0]+g*Math.cos(d),u[1]+g*Math.sin(d)],w=[v[0]+x*Math.cos(d+Math.PI/4),v[1]+x*Math.sin(d+Math.PI/4)];n.push(...this.helper.doubleLineOps(v[0],v[1],w[0],w[1],i),...this.helper.doubleLineOps(w[0],w[1],b[0],b[1],i))}})),n}}const ci={};class Ilt{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const qlt=0,xC=1,D4=2,ef={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function bC(t,e){return t.type===e}function AS(t){const e=[],r=(function(o){const c=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))c[c.length]={type:qlt,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];c[c.length]={type:xC,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return c[c.length]={type:D4,text:""},c})(t);let i="BOD",n=0,s=r[n];for(;!bC(s,D4);){let o=0;const c=[];if(i==="BOD"){if(s.text!=="M"&&s.text!=="m")return AS("M0,0"+t);n++,o=ef[s.text],i=s.text}else bC(s,xC)?o=ef[i]:(n++,o=ef[s.text],i=s.text);if(!(n+o<r.length))throw new Error("Path data ended short");for(let u=n;u<n+o;u++){const h=r[u];if(!bC(h,xC))throw new Error("Param not a number: "+i+","+h.text);c[c.length]=+h.text}if(typeof ef[i]!="number")throw new Error("Bad segment: "+i);{const u={key:i,data:c};e.push(u),n+=o,s=r[n],i==="M"&&(i="L"),i==="m"&&(i="l")}}return e}function hz(t){let e=0,r=0,i=0,n=0;const s=[];for(const{key:o,data:c}of t)switch(o){case"M":s.push({key:"M",data:[...c]}),[e,r]=c,[i,n]=c;break;case"m":e+=c[0],r+=c[1],s.push({key:"M",data:[e,r]}),i=e,n=r;break;case"L":s.push({key:"L",data:[...c]}),[e,r]=c;break;case"l":e+=c[0],r+=c[1],s.push({key:"L",data:[e,r]});break;case"C":s.push({key:"C",data:[...c]}),e=c[4],r=c[5];break;case"c":{const u=c.map(((h,d)=>d%2?h+r:h+e));s.push({key:"C",data:u}),e=u[4],r=u[5];break}case"Q":s.push({key:"Q",data:[...c]}),e=c[2],r=c[3];break;case"q":{const u=c.map(((h,d)=>d%2?h+r:h+e));s.push({key:"Q",data:u}),e=u[2],r=u[3];break}case"A":s.push({key:"A",data:[...c]}),e=c[5],r=c[6];break;case"a":e+=c[5],r+=c[6],s.push({key:"A",data:[c[0],c[1],c[2],c[3],c[4],e,r]});break;case"H":s.push({key:"H",data:[...c]}),e=c[0];break;case"h":e+=c[0],s.push({key:"H",data:[e]});break;case"V":s.push({key:"V",data:[...c]}),r=c[0];break;case"v":r+=c[0],s.push({key:"V",data:[r]});break;case"S":s.push({key:"S",data:[...c]}),e=c[2],r=c[3];break;case"s":{const u=c.map(((h,d)=>d%2?h+r:h+e));s.push({key:"S",data:u}),e=u[2],r=u[3];break}case"T":s.push({key:"T",data:[...c]}),e=c[0],r=c[1];break;case"t":e+=c[0],r+=c[1],s.push({key:"T",data:[e,r]});break;case"Z":case"z":s.push({key:"Z",data:[]}),e=i,r=n}return s}function dz(t){const e=[];let r="",i=0,n=0,s=0,o=0,c=0,u=0;for(const{key:h,data:d}of t){switch(h){case"M":e.push({key:"M",data:[...d]}),[i,n]=d,[s,o]=d;break;case"C":e.push({key:"C",data:[...d]}),i=d[4],n=d[5],c=d[2],u=d[3];break;case"L":e.push({key:"L",data:[...d]}),[i,n]=d;break;case"H":i=d[0],e.push({key:"L",data:[i,n]});break;case"V":n=d[0],e.push({key:"L",data:[i,n]});break;case"S":{let p=0,m=0;r==="C"||r==="S"?(p=i+(i-c),m=n+(n-u)):(p=i,m=n),e.push({key:"C",data:[p,m,...d]}),c=d[0],u=d[1],i=d[2],n=d[3];break}case"T":{const[p,m]=d;let g=0,x=0;r==="Q"||r==="T"?(g=i+(i-c),x=n+(n-u)):(g=i,x=n);const v=i+2*(g-i)/3,b=n+2*(x-n)/3,w=p+2*(g-p)/3,T=m+2*(x-m)/3;e.push({key:"C",data:[v,b,w,T,p,m]}),c=g,u=x,i=p,n=m;break}case"Q":{const[p,m,g,x]=d,v=i+2*(p-i)/3,b=n+2*(m-n)/3,w=g+2*(p-g)/3,T=x+2*(m-x)/3;e.push({key:"C",data:[v,b,w,T,g,x]}),c=p,u=m,i=g,n=x;break}case"A":{const p=Math.abs(d[0]),m=Math.abs(d[1]),g=d[2],x=d[3],v=d[4],b=d[5],w=d[6];p===0||m===0?(e.push({key:"C",data:[i,n,b,w,b,w]}),i=b,n=w):(i!==b||n!==w)&&(fz(i,n,b,w,p,m,g,x,v).forEach((function(T){e.push({key:"C",data:T})})),i=b,n=w);break}case"Z":e.push({key:"Z",data:[]}),i=s,n=o}r=h}return e}function hu(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function fz(t,e,r,i,n,s,o,c,u,h){const d=(p=o,Math.PI*p/180);var p;let m=[],g=0,x=0,v=0,b=0;if(h)[g,x,v,b]=h;else{[t,e]=hu(t,e,-d),[r,i]=hu(r,i,-d);const X=(t-r)/2,M=(e-i)/2;let I=X*X/(n*n)+M*M/(s*s);I>1&&(I=Math.sqrt(I),n*=I,s*=I);const N=n*n,P=s*s,$=N*P-N*M*M-P*X*X,D=N*M*M+P*X*X,q=(c===u?-1:1)*Math.sqrt(Math.abs($/D));v=q*n*M/s+(t+r)/2,b=q*-s*X/n+(e+i)/2,g=Math.asin(parseFloat(((e-b)/s).toFixed(9))),x=Math.asin(parseFloat(((i-b)/s).toFixed(9))),t<v&&(g=Math.PI-g),r<v&&(x=Math.PI-x),g<0&&(g=2*Math.PI+g),x<0&&(x=2*Math.PI+x),u&&g>x&&(g-=2*Math.PI),!u&&x>g&&(x-=2*Math.PI)}let w=x-g;if(Math.abs(w)>120*Math.PI/180){const X=x,M=r,I=i;x=u&&x>g?g+120*Math.PI/180*1:g+120*Math.PI/180*-1,m=fz(r=v+n*Math.cos(x),i=b+s*Math.sin(x),M,I,n,s,o,0,u,[x,X,v,b])}w=x-g;const T=Math.cos(g),k=Math.sin(g),E=Math.cos(x),L=Math.sin(x),A=Math.tan(w/4),R=4/3*n*A,j=4/3*s*A,Y=[t,e],V=[t+R*k,e-j*T],O=[r+R*L,i-j*E],z=[r,i];if(V[0]=2*Y[0]-V[0],V[1]=2*Y[1]-V[1],h)return[V,O,z].concat(m);{m=[V,O,z].concat(m);const X=[];for(let M=0;M<m.length;M+=3){const I=hu(m[M][0],m[M][1],d),N=hu(m[M+1][0],m[M+1][1],d),P=hu(m[M+2][0],m[M+2][1],d);X.push([I[0],I[1],N[0],N[1],P[0],P[1]])}return X}}const zlt={randOffset:function(t,e){return Jt(t,e)},randOffsetWithRange:function(t,e,r){return sp(t,e,r)},ellipse:function(t,e,r,i,n){const s=gz(r,i,n);return O2(t,e,n,s).opset},doubleLineOps:function(t,e,r,i,n){return ss(t,e,r,i,n,!0)}};function pz(t,e,r,i,n){return{type:"path",ops:ss(t,e,r,i,n)}}function wf(t,e,r){const i=(t||[]).length;if(i>2){const n=[];for(let s=0;s<i-1;s++)n.push(...ss(t[s][0],t[s][1],t[s+1][0],t[s+1][1],r));return e&&n.push(...ss(t[i-1][0],t[i-1][1],t[0][0],t[0][1],r)),{type:"path",ops:n}}return i===2?pz(t[0][0],t[0][1],t[1][0],t[1][1],r):{type:"path",ops:[]}}function jlt(t,e,r,i,n){return(function(s,o){return wf(s,!0,o)})([[t,e],[t+r,e],[t+r,e+i],[t,e+i]],n)}function F4(t,e){if(t.length){const r=typeof t[0][0]=="number"?[t]:t,i=rf(r[0],1*(1+.2*e.roughness),e),n=e.disableMultiStroke?[]:rf(r[0],1.5*(1+.22*e.roughness),z4(e));for(let s=1;s<r.length;s++){const o=r[s];if(o.length){const c=rf(o,1*(1+.2*e.roughness),e),u=e.disableMultiStroke?[]:rf(o,1.5*(1+.22*e.roughness),z4(e));for(const h of c)h.op!=="move"&&i.push(h);for(const h of u)h.op!=="move"&&n.push(h)}}return{type:"path",ops:i.concat(n)}}return{type:"path",ops:[]}}function gz(t,e,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),n=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),s=2*Math.PI/n;let o=Math.abs(t/2),c=Math.abs(e/2);const u=1-r.curveFitting;return o+=Jt(o*u,r),c+=Jt(c*u,r),{increment:s,rx:o,ry:c}}function O2(t,e,r,i){const[n,s]=j4(i.increment,t,e,i.rx,i.ry,1,i.increment*sp(.1,sp(.4,1,r),r),r);let o=op(n,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[c]=j4(i.increment,t,e,i.rx,i.ry,1.5,0,r),u=op(c,null,r);o=o.concat(u)}return{estimatedPoints:s,opset:{type:"path",ops:o}}}function I4(t,e,r,i,n,s,o,c,u){const h=t,d=e;let p=Math.abs(r/2),m=Math.abs(i/2);p+=Jt(.01*p,u),m+=Jt(.01*m,u);let g=n,x=s;for(;g<0;)g+=2*Math.PI,x+=2*Math.PI;x-g>2*Math.PI&&(g=0,x=2*Math.PI);const v=2*Math.PI/u.curveStepCount,b=Math.min(v/2,(x-g)/2),w=$4(b,h,d,p,m,g,x,1,u);if(!u.disableMultiStroke){const T=$4(b,h,d,p,m,g,x,1.5,u);w.push(...T)}return o&&(c?w.push(...ss(h,d,h+p*Math.cos(g),d+m*Math.sin(g),u),...ss(h,d,h+p*Math.cos(x),d+m*Math.sin(x),u)):w.push({op:"lineTo",data:[h,d]},{op:"lineTo",data:[h+p*Math.cos(g),d+m*Math.sin(g)]})),{type:"path",ops:w}}function q4(t,e){const r=dz(hz(AS(t))),i=[];let n=[0,0],s=[0,0];for(const{key:o,data:c}of r)switch(o){case"M":s=[c[0],c[1]],n=[c[0],c[1]];break;case"L":i.push(...ss(s[0],s[1],c[0],c[1],e)),s=[c[0],c[1]];break;case"C":{const[u,h,d,p,m,g]=c;i.push(...$lt(u,h,d,p,m,g,s,e)),s=[m,g];break}case"Z":i.push(...ss(s[0],s[1],n[0],n[1],e)),s=[n[0],n[1]]}return{type:"path",ops:i}}function vC(t,e){const r=[];for(const i of t)if(i.length){const n=e.maxRandomnessOffset||0,s=i.length;if(s>2){r.push({op:"move",data:[i[0][0]+Jt(n,e),i[0][1]+Jt(n,e)]});for(let o=1;o<s;o++)r.push({op:"lineTo",data:[i[o][0]+Jt(n,e),i[o][1]+Jt(n,e)]})}}return{type:"fillPath",ops:r}}function il(t,e){return(function(r,i){let n=r.fillStyle||"hachure";if(!ci[n])switch(n){case"zigzag":ci[n]||(ci[n]=new Nlt(i));break;case"cross-hatch":ci[n]||(ci[n]=new Olt(i));break;case"dots":ci[n]||(ci[n]=new Rlt(i));break;case"dashed":ci[n]||(ci[n]=new Dlt(i));break;case"zigzag-line":ci[n]||(ci[n]=new Flt(i));break;default:n="hachure",ci[n]||(ci[n]=new ES(i))}return ci[n]})(e,zlt).fillPolygons(t,e)}function z4(t){const e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function mz(t){return t.randomizer||(t.randomizer=new Ilt(t.seed||0)),t.randomizer.next()}function sp(t,e,r,i=1){return r.roughness*i*(mz(r)*(e-t)+t)}function Jt(t,e,r=1){return sp(-t,t,e,r)}function ss(t,e,r,i,n,s=!1){const o=s?n.disableMultiStrokeFill:n.disableMultiStroke,c=R2(t,e,r,i,n,!0,!1);if(o)return c;const u=R2(t,e,r,i,n,!0,!0);return c.concat(u)}function R2(t,e,r,i,n,s,o){const c=Math.pow(t-r,2)+Math.pow(e-i,2),u=Math.sqrt(c);let h=1;h=u<200?1:u>500?.4:-.0016668*u+1.233334;let d=n.maxRandomnessOffset||0;d*d*100>c&&(d=u/10);const p=d/2,m=.2+.2*mz(n);let g=n.bowing*n.maxRandomnessOffset*(i-e)/200,x=n.bowing*n.maxRandomnessOffset*(t-r)/200;g=Jt(g,n,h),x=Jt(x,n,h);const v=[],b=()=>Jt(p,n,h),w=()=>Jt(d,n,h),T=n.preserveVertices;return o?v.push({op:"move",data:[t+(T?0:b()),e+(T?0:b())]}):v.push({op:"move",data:[t+(T?0:Jt(d,n,h)),e+(T?0:Jt(d,n,h))]}),o?v.push({op:"bcurveTo",data:[g+t+(r-t)*m+b(),x+e+(i-e)*m+b(),g+t+2*(r-t)*m+b(),x+e+2*(i-e)*m+b(),r+(T?0:b()),i+(T?0:b())]}):v.push({op:"bcurveTo",data:[g+t+(r-t)*m+w(),x+e+(i-e)*m+w(),g+t+2*(r-t)*m+w(),x+e+2*(i-e)*m+w(),r+(T?0:w()),i+(T?0:w())]}),v}function rf(t,e,r){if(!t.length)return[];const i=[];i.push([t[0][0]+Jt(e,r),t[0][1]+Jt(e,r)]),i.push([t[0][0]+Jt(e,r),t[0][1]+Jt(e,r)]);for(let n=1;n<t.length;n++)i.push([t[n][0]+Jt(e,r),t[n][1]+Jt(e,r)]),n===t.length-1&&i.push([t[n][0]+Jt(e,r),t[n][1]+Jt(e,r)]);return op(i,null,r)}function op(t,e,r){const i=t.length,n=[];if(i>3){const s=[],o=1-r.curveTightness;n.push({op:"move",data:[t[1][0],t[1][1]]});for(let c=1;c+2<i;c++){const u=t[c];s[0]=[u[0],u[1]],s[1]=[u[0]+(o*t[c+1][0]-o*t[c-1][0])/6,u[1]+(o*t[c+1][1]-o*t[c-1][1])/6],s[2]=[t[c+1][0]+(o*t[c][0]-o*t[c+2][0])/6,t[c+1][1]+(o*t[c][1]-o*t[c+2][1])/6],s[3]=[t[c+1][0],t[c+1][1]],n.push({op:"bcurveTo",data:[s[1][0],s[1][1],s[2][0],s[2][1],s[3][0],s[3][1]]})}}else i===3?(n.push({op:"move",data:[t[1][0],t[1][1]]}),n.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):i===2&&n.push(...R2(t[0][0],t[0][1],t[1][0],t[1][1],r,!0,!0));return n}function j4(t,e,r,i,n,s,o,c){const u=[],h=[];if(c.roughness===0){t/=4,h.push([e+i*Math.cos(-t),r+n*Math.sin(-t)]);for(let d=0;d<=2*Math.PI;d+=t){const p=[e+i*Math.cos(d),r+n*Math.sin(d)];u.push(p),h.push(p)}h.push([e+i*Math.cos(0),r+n*Math.sin(0)]),h.push([e+i*Math.cos(t),r+n*Math.sin(t)])}else{const d=Jt(.5,c)-Math.PI/2;h.push([Jt(s,c)+e+.9*i*Math.cos(d-t),Jt(s,c)+r+.9*n*Math.sin(d-t)]);const p=2*Math.PI+d-.01;for(let m=d;m<p;m+=t){const g=[Jt(s,c)+e+i*Math.cos(m),Jt(s,c)+r+n*Math.sin(m)];u.push(g),h.push(g)}h.push([Jt(s,c)+e+i*Math.cos(d+2*Math.PI+.5*o),Jt(s,c)+r+n*Math.sin(d+2*Math.PI+.5*o)]),h.push([Jt(s,c)+e+.98*i*Math.cos(d+o),Jt(s,c)+r+.98*n*Math.sin(d+o)]),h.push([Jt(s,c)+e+.9*i*Math.cos(d+.5*o),Jt(s,c)+r+.9*n*Math.sin(d+.5*o)])}return[h,u]}function $4(t,e,r,i,n,s,o,c,u){const h=s+Jt(.1,u),d=[];d.push([Jt(c,u)+e+.9*i*Math.cos(h-t),Jt(c,u)+r+.9*n*Math.sin(h-t)]);for(let p=h;p<=o;p+=t)d.push([Jt(c,u)+e+i*Math.cos(p),Jt(c,u)+r+n*Math.sin(p)]);return d.push([e+i*Math.cos(o),r+n*Math.sin(o)]),d.push([e+i*Math.cos(o),r+n*Math.sin(o)]),op(d,null,u)}function $lt(t,e,r,i,n,s,o,c){const u=[],h=[c.maxRandomnessOffset||1,(c.maxRandomnessOffset||1)+.3];let d=[0,0];const p=c.disableMultiStroke?1:2,m=c.preserveVertices;for(let g=0;g<p;g++)g===0?u.push({op:"move",data:[o[0],o[1]]}):u.push({op:"move",data:[o[0]+(m?0:Jt(h[0],c)),o[1]+(m?0:Jt(h[0],c))]}),d=m?[n,s]:[n+Jt(h[g],c),s+Jt(h[g],c)],u.push({op:"bcurveTo",data:[t+Jt(h[g],c),e+Jt(h[g],c),r+Jt(h[g],c),i+Jt(h[g],c),d[0],d[1]]});return u}function du(t){return[...t]}function P4(t,e=0){const r=t.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(du(t[0]),du(t[1]),du(t[2]),du(t[2]));else{const n=[];n.push(t[0],t[0]);for(let c=1;c<t.length;c++)n.push(t[c]),c===t.length-1&&n.push(t[c]);const s=[],o=1-e;i.push(du(n[0]));for(let c=1;c+2<n.length;c++){const u=n[c];s[0]=[u[0],u[1]],s[1]=[u[0]+(o*n[c+1][0]-o*n[c-1][0])/6,u[1]+(o*n[c+1][1]-o*n[c-1][1])/6],s[2]=[n[c+1][0]+(o*n[c][0]-o*n[c+2][0])/6,n[c+1][1]+(o*n[c][1]-o*n[c+2][1])/6],s[3]=[n[c+1][0],n[c+1][1]],i.push(s[1],s[2],s[3])}}return i}function Sf(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function Plt(t,e,r){const i=Sf(e,r);if(i===0)return Sf(t,e);let n=((t[0]-e[0])*(r[0]-e[0])+(t[1]-e[1])*(r[1]-e[1]))/i;return n=Math.max(0,Math.min(1,n)),Sf(t,Hs(e,r,n))}function Hs(t,e,r){return[t[0]+(e[0]-t[0])*r,t[1]+(e[1]-t[1])*r]}function D2(t,e,r,i){const n=i||[];if((function(c,u){const h=c[u+0],d=c[u+1],p=c[u+2],m=c[u+3];let g=3*d[0]-2*h[0]-m[0];g*=g;let x=3*d[1]-2*h[1]-m[1];x*=x;let v=3*p[0]-2*m[0]-h[0];v*=v;let b=3*p[1]-2*m[1]-h[1];return b*=b,g<v&&(g=v),x<b&&(x=b),g+x})(t,e)<r){const c=t[e+0];n.length?(s=n[n.length-1],o=c,Math.sqrt(Sf(s,o))>1&&n.push(c)):n.push(c),n.push(t[e+3])}else{const u=t[e+0],h=t[e+1],d=t[e+2],p=t[e+3],m=Hs(u,h,.5),g=Hs(h,d,.5),x=Hs(d,p,.5),v=Hs(m,g,.5),b=Hs(g,x,.5),w=Hs(v,b,.5);D2([u,m,v,w],0,r,n),D2([w,b,x,p],0,r,n)}var s,o;return n}function Hlt(t,e){return lp(t,0,t.length,e)}function lp(t,e,r,i,n){const s=n||[],o=t[e],c=t[r-1];let u=0,h=1;for(let d=e+1;d<r-1;++d){const p=Plt(t[d],o,c);p>u&&(u=p,h=d)}return Math.sqrt(u)>i?(lp(t,e,h+1,i,s),lp(t,h,r,i,s)):(s.length||s.push(o),s.push(c)),s}function CC(t,e=.15,r){const i=[],n=(t.length-1)/3;for(let s=0;s<n;s++)D2(t,3*s,e,i);return r&&r>0?lp(i,0,i.length,r):i}const Ti="none";class cp{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,r,i){return{shape:e,sets:r||[],options:i||this.defaultOptions}}line(e,r,i,n,s){const o=this._o(s);return this._d("line",[pz(e,r,i,n,o)],o)}rectangle(e,r,i,n,s){const o=this._o(s),c=[],u=jlt(e,r,i,n,o);if(o.fill){const h=[[e,r],[e+i,r],[e+i,r+n],[e,r+n]];o.fillStyle==="solid"?c.push(vC([h],o)):c.push(il([h],o))}return o.stroke!==Ti&&c.push(u),this._d("rectangle",c,o)}ellipse(e,r,i,n,s){const o=this._o(s),c=[],u=gz(i,n,o),h=O2(e,r,o,u);if(o.fill)if(o.fillStyle==="solid"){const d=O2(e,r,o,u).opset;d.type="fillPath",c.push(d)}else c.push(il([h.estimatedPoints],o));return o.stroke!==Ti&&c.push(h.opset),this._d("ellipse",c,o)}circle(e,r,i,n){const s=this.ellipse(e,r,i,i,n);return s.shape="circle",s}linearPath(e,r){const i=this._o(r);return this._d("linearPath",[wf(e,!1,i)],i)}arc(e,r,i,n,s,o,c=!1,u){const h=this._o(u),d=[],p=I4(e,r,i,n,s,o,c,!0,h);if(c&&h.fill)if(h.fillStyle==="solid"){const m=Object.assign({},h);m.disableMultiStroke=!0;const g=I4(e,r,i,n,s,o,!0,!1,m);g.type="fillPath",d.push(g)}else d.push((function(m,g,x,v,b,w,T){const k=m,E=g;let L=Math.abs(x/2),A=Math.abs(v/2);L+=Jt(.01*L,T),A+=Jt(.01*A,T);let R=b,j=w;for(;R<0;)R+=2*Math.PI,j+=2*Math.PI;j-R>2*Math.PI&&(R=0,j=2*Math.PI);const Y=(j-R)/T.curveStepCount,V=[];for(let O=R;O<=j;O+=Y)V.push([k+L*Math.cos(O),E+A*Math.sin(O)]);return V.push([k+L*Math.cos(j),E+A*Math.sin(j)]),V.push([k,E]),il([V],T)})(e,r,i,n,s,o,h));return h.stroke!==Ti&&d.push(p),this._d("arc",d,h)}curve(e,r){const i=this._o(r),n=[],s=F4(e,i);if(i.fill&&i.fill!==Ti)if(i.fillStyle==="solid"){const o=F4(e,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],c=e;if(c.length){const u=typeof c[0][0]=="number"?[c]:c;for(const h of u)h.length<3?o.push(...h):h.length===3?o.push(...CC(P4([h[0],h[0],h[1],h[2]]),10,(1+i.roughness)/2)):o.push(...CC(P4(h),10,(1+i.roughness)/2))}o.length&&n.push(il([o],i))}return i.stroke!==Ti&&n.push(s),this._d("curve",n,i)}polygon(e,r){const i=this._o(r),n=[],s=wf(e,!0,i);return i.fill&&(i.fillStyle==="solid"?n.push(vC([e],i)):n.push(il([e],i))),i.stroke!==Ti&&n.push(s),this._d("polygon",n,i)}path(e,r){const i=this._o(r),n=[];if(!e)return this._d("path",n,i);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const s=i.fill&&i.fill!=="transparent"&&i.fill!==Ti,o=i.stroke!==Ti,c=!!(i.simplification&&i.simplification<1),u=(function(d,p,m){const g=dz(hz(AS(d))),x=[];let v=[],b=[0,0],w=[];const T=()=>{w.length>=4&&v.push(...CC(w,p)),w=[]},k=()=>{T(),v.length&&(x.push(v),v=[])};for(const{key:L,data:A}of g)switch(L){case"M":k(),b=[A[0],A[1]],v.push(b);break;case"L":T(),v.push([A[0],A[1]]);break;case"C":if(!w.length){const R=v.length?v[v.length-1]:b;w.push([R[0],R[1]])}w.push([A[0],A[1]]),w.push([A[2],A[3]]),w.push([A[4],A[5]]);break;case"Z":T(),v.push([b[0],b[1]])}if(k(),!m)return x;const E=[];for(const L of x){const A=Hlt(L,m);A.length&&E.push(A)}return E})(e,1,c?4-4*(i.simplification||1):(1+i.roughness)/2),h=q4(e,i);if(s)if(i.fillStyle==="solid")if(u.length===1){const d=q4(e,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(d.ops)})}else n.push(vC(u,i));else n.push(il(u,i));return o&&(c?u.forEach((d=>{n.push(wf(d,!1,i))})):n.push(h)),this._d("path",n,i)}opsToPath(e,r){let i="";for(const n of e.ops){const s=typeof r=="number"&&r>=0?n.data.map((o=>+o.toFixed(r))):n.data;switch(n.op){case"move":i+=`M${s[0]} ${s[1]} `;break;case"bcurveTo":i+=`C${s[0]} ${s[1]}, ${s[2]} ${s[3]}, ${s[4]} ${s[5]} `;break;case"lineTo":i+=`L${s[0]} ${s[1]} `}}return i.trim()}toPaths(e){const r=e.sets||[],i=e.options||this.defaultOptions,n=[];for(const s of r){let o=null;switch(s.type){case"path":o={d:this.opsToPath(s),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Ti};break;case"fillPath":o={d:this.opsToPath(s),stroke:Ti,strokeWidth:0,fill:i.fill||Ti};break;case"fillSketch":o=this.fillSketch(s,i)}o&&n.push(o)}return n}fillSketch(e,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(e),stroke:r.fill||Ti,strokeWidth:i,fill:Ti}}_mergedShape(e){return e.filter(((r,i)=>i===0||r.op!=="move"))}}class Ult{constructor(e,r){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new cp(r)}draw(e){const r=e.sets||[],i=e.options||this.getDefaultOptions(),n=this.ctx,s=e.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":n.save(),n.strokeStyle=i.stroke==="none"?"transparent":i.stroke,n.lineWidth=i.strokeWidth,i.strokeLineDash&&n.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(n.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(n,o,s),n.restore();break;case"fillPath":{n.save(),n.fillStyle=i.fill||"";const c=e.shape==="curve"||e.shape==="polygon"||e.shape==="path"?"evenodd":"nonzero";this._drawToContext(n,o,s,c),n.restore();break}case"fillSketch":this.fillSketch(n,o,i)}}fillSketch(e,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2),e.save(),i.fillLineDash&&e.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(e.lineDashOffset=i.fillLineDashOffset),e.strokeStyle=i.fill||"",e.lineWidth=n,this._drawToContext(e,r,i.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,r,i,n="nonzero"){e.beginPath();for(const s of r.ops){const o=typeof i=="number"&&i>=0?s.data.map((c=>+c.toFixed(i))):s.data;switch(s.op){case"move":e.moveTo(o[0],o[1]);break;case"bcurveTo":e.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":e.lineTo(o[0],o[1])}}r.type==="fillPath"?e.fill(n):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,r,i,n,s){const o=this.gen.line(e,r,i,n,s);return this.draw(o),o}rectangle(e,r,i,n,s){const o=this.gen.rectangle(e,r,i,n,s);return this.draw(o),o}ellipse(e,r,i,n,s){const o=this.gen.ellipse(e,r,i,n,s);return this.draw(o),o}circle(e,r,i,n){const s=this.gen.circle(e,r,i,n);return this.draw(s),s}linearPath(e,r){const i=this.gen.linearPath(e,r);return this.draw(i),i}polygon(e,r){const i=this.gen.polygon(e,r);return this.draw(i),i}arc(e,r,i,n,s,o,c=!1,u){const h=this.gen.arc(e,r,i,n,s,o,c,u);return this.draw(h),h}curve(e,r){const i=this.gen.curve(e,r);return this.draw(i),i}path(e,r){const i=this.gen.path(e,r);return this.draw(i),i}}const nf="http://www.w3.org/2000/svg";class Glt{constructor(e,r){this.svg=e,this.gen=new cp(r)}draw(e){const r=e.sets||[],i=e.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,s=n.createElementNS(nf,"g"),o=e.options.fixedDecimalPlaceDigits;for(const c of r){let u=null;switch(c.type){case"path":u=n.createElementNS(nf,"path"),u.setAttribute("d",this.opsToPath(c,o)),u.setAttribute("stroke",i.stroke),u.setAttribute("stroke-width",i.strokeWidth+""),u.setAttribute("fill","none"),i.strokeLineDash&&u.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&u.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":u=n.createElementNS(nf,"path"),u.setAttribute("d",this.opsToPath(c,o)),u.setAttribute("stroke","none"),u.setAttribute("stroke-width","0"),u.setAttribute("fill",i.fill||""),e.shape!=="curve"&&e.shape!=="polygon"||u.setAttribute("fill-rule","evenodd");break;case"fillSketch":u=this.fillSketch(n,c,i)}u&&s.appendChild(u)}return s}fillSketch(e,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2);const s=e.createElementNS(nf,"path");return s.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),s.setAttribute("stroke",i.fill||""),s.setAttribute("stroke-width",n+""),s.setAttribute("fill","none"),i.fillLineDash&&s.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&s.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),s}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,r){return this.gen.opsToPath(e,r)}line(e,r,i,n,s){const o=this.gen.line(e,r,i,n,s);return this.draw(o)}rectangle(e,r,i,n,s){const o=this.gen.rectangle(e,r,i,n,s);return this.draw(o)}ellipse(e,r,i,n,s){const o=this.gen.ellipse(e,r,i,n,s);return this.draw(o)}circle(e,r,i,n){const s=this.gen.circle(e,r,i,n);return this.draw(s)}linearPath(e,r){const i=this.gen.linearPath(e,r);return this.draw(i)}polygon(e,r){const i=this.gen.polygon(e,r);return this.draw(i)}arc(e,r,i,n,s,o,c=!1,u){const h=this.gen.arc(e,r,i,n,s,o,c,u);return this.draw(h)}curve(e,r){const i=this.gen.curve(e,r);return this.draw(i)}path(e,r){const i=this.gen.path(e,r);return this.draw(i)}}var It={canvas:(t,e)=>new Ult(t,e),svg:(t,e)=>new Glt(t,e),generator:t=>new cp(t),newSeed:()=>cp.newSeed()},Kt=B(async(t,e,r)=>{var g,x;let i;const n=e.useHtmlLabels||ya((g=_e())==null?void 0:g.htmlLabels);r?i=r:i="node default";const s=t.insert("g").attr("class",i).attr("id",e.domId||e.id),o=s.insert("g").attr("class","label").attr("style",Mr(e.labelStyle));let c;e.label===void 0?c="":c=typeof e.label=="string"?e.label:e.label[0];const u=!!e.icon||!!e.img,h=e.labelType==="markdown",d=await xa(o,hn(no(c),_e()),{useHtmlLabels:n,width:e.width||((x=_e().flowchart)==null?void 0:x.wrappingWidth),classes:h?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:u,markdown:h},_e());let p=d.getBBox();const m=((e==null?void 0:e.padding)??0)/2;if(n){const v=d.children[0],b=Xt(d);await Fq(v,c),p=v.getBoundingClientRect(),b.attr("width",p.width),b.attr("height",p.height)}return n?o.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"):o.attr("transform","translate(0, "+-p.height/2+")"),e.centerLabel&&o.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:s,bbox:p,halfPadding:m,label:o}},"labelHelper"),wC=B(async(t,e,r)=>{var u,h;const i=r.useHtmlLabels??Jr(_e()),n=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),s=await xa(n,hn(no(e),_e()),{useHtmlLabels:i,width:r.width||((h=(u=_e())==null?void 0:u.flowchart)==null?void 0:h.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=s.getBBox();const c=r.padding/2;if(Jr(_e())){const d=s.children[0],p=Xt(s);o=d.getBoundingClientRect(),p.attr("width",o.width),p.attr("height",o.height)}return i?n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):n.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:t,bbox:o,halfPadding:c,label:n}},"insertLabel"),Pt=B((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),Qt=B((t,e)=>(t.look==="handDrawn"?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function xe(t){const e=t.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return e.push("Z"),e.join(" ")}B(xe,"createPathFromPoints");function os(t,e,r,i,n,s){const o=[],u=r-t,h=i-e,d=u/s,p=2*Math.PI/d,m=e+h/2;for(let g=0;g<=50;g++){const x=g/50,v=t+x*u,b=m+n*Math.sin(p*(v-t));o.push({x:v,y:b})}return o}B(os,"generateFullSineWavePoints");function th(t,e,r,i,n,s){const o=[],c=n*Math.PI/180,d=(s*Math.PI/180-c)/(i-1);for(let p=0;p<i;p++){const m=c+p*d,g=t+r*Math.cos(m),x=e+r*Math.sin(m);o.push({x:-g,y:-x})}return o}B(th,"generateCirclePoints");function F2(t){const e=Array.from(t.childNodes).filter(u=>u.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=e.map(u=>u.getAttribute("d")).filter(u=>u!==null).join(" ");r.setAttribute("d",i);const n=e.find(u=>u.getAttribute("fill")!=="none"),s=e.find(u=>u.getAttribute("stroke")!=="none"),o=B((u,h)=>(u==null?void 0:u.getAttribute(h))??void 0,"getAttr");if(n){const u={fill:o(n,"fill"),"fill-opacity":o(n,"fill-opacity")??"1"};Object.entries(u).forEach(([h,d])=>{d&&r.setAttribute(h,d)})}if(s){const u={stroke:o(s,"stroke"),"stroke-width":o(s,"stroke-width")??"1","stroke-opacity":o(s,"stroke-opacity")??"1"};Object.entries(u).forEach(([h,d])=>{d&&r.setAttribute(h,d)})}const c=document.createElementNS("http://www.w3.org/2000/svg","g");return c.appendChild(r),c}B(F2,"mergePaths");var Ylt=B((t,e)=>{var r=t.x,i=t.y,n=e.x-r,s=e.y-i,o=t.width/2,c=t.height/2,u,h;return Math.abs(s)*o>Math.abs(n)*c?(s<0&&(c=-c),u=s===0?0:c*n/s,h=c):(n<0&&(o=-o),u=o,h=n===0?0:o*s/n),{x:r+u,y:i+h}},"intersectRect"),nc=Ylt,Vlt=B(async(t,e,r,i=!1,n=!1)=>{let s=e||"";typeof s=="object"&&(s=s[0]);const o=_e(),c=Jr(o);return await xa(t,s,{style:r,isTitle:i,useHtmlLabels:c,markdown:!1,isNode:n,width:Number.POSITIVE_INFINITY},o)},"createLabel"),Ja=Vlt,hs=B((t,e,r,i,n)=>["M",t+n,e,"H",t+r-n,"A",n,n,0,0,1,t+r,e+n,"V",e+i-n,"A",n,n,0,0,1,t+r-n,e+i,"H",t+n,"A",n,n,0,0,1,t,e+i-n,"V",e+n,"A",n,n,0,0,1,t+n,e,"Z"].join(" "),"createRoundedRectPathD"),yz=B(async(t,e)=>{St.info("Creating subgraph rect for ",e.id,e);const r=_e(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:s,clusterBorder:o}=i,{labelStyles:c,nodeStyles:u,borderStyles:h,backgroundStyles:d}=jt(e),p=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),m=Jr(r),g=p.insert("g").attr("class","cluster-label ");let x;e.labelType==="markdown"?x=await xa(g,e.label,{style:e.labelStyle,useHtmlLabels:m,isNode:!0,width:e.width}):x=await Ja(g,e.label,e.labelStyle||"",!1,!0);let v=x.getBBox();if(Jr(r)){const R=x.children[0],j=Xt(x);v=R.getBoundingClientRect(),j.attr("width",v.width),j.attr("height",v.height)}const b=e.width<=v.width+e.padding?v.width+e.padding:e.width;e.width<=v.width+e.padding?e.diff=(b-e.width)/2-e.padding:e.diff=-e.padding;const w=e.height,T=e.x-b/2,k=e.y-w/2;St.trace("Data ",e,JSON.stringify(e));let E;if(e.look==="handDrawn"){const R=It.svg(p),j=qt(e,{roughness:.7,fill:s,stroke:o,fillWeight:3,seed:n}),Y=R.path(hs(T,k,b,w,0),j);E=p.insert(()=>(St.debug("Rough node insert CXC",Y),Y),":first-child"),E.select("path:nth-child(2)").attr("style",h.join(";")),E.select("path").attr("style",d.join(";").replace("fill","stroke"))}else E=p.insert("rect",":first-child"),E.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",T).attr("y",k).attr("width",b).attr("height",w);const{subGraphTitleTopMargin:L}=mS(r);if(g.attr("transform",`translate(${e.x-v.width/2}, ${e.y-e.height/2+L})`),c){const R=g.select("span");R&&R.attr("style",c)}const A=E.node().getBBox();return e.offsetX=0,e.width=A.width,e.height=A.height,e.offsetY=v.height-e.padding/2,e.intersect=function(R){return nc(e,R)},{cluster:p,labelBBox:v}},"rect"),Wlt=B((t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.domId),i=r.insert("rect",":first-child"),n=0*e.padding,s=n/2;i.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-s).attr("y",e.y-e.height/2-s).attr("width",e.width+n).attr("height",e.height+n).attr("fill","none");const o=i.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(c){return nc(e,c)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),Xlt=B(async(t,e)=>{const r=_e(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:s,compositeBackground:o,compositeTitleBackground:c,nodeBorder:u}=i,h=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look),d=h.insert("g",":first-child"),p=h.insert("g").attr("class","cluster-label");let m=h.append("rect");const g=await Ja(p,e.label,e.labelStyle,void 0,!0);let x=g.getBBox();if(Jr(r)){const Y=g.children[0],V=Xt(g);x=Y.getBoundingClientRect(),V.attr("width",x.width),V.attr("height",x.height)}const v=0*e.padding,b=v/2,w=(e.width<=x.width+e.padding?x.width+e.padding:e.width)+v;e.width<=x.width+e.padding?e.diff=(w-e.width)/2-e.padding:e.diff=-e.padding;const T=e.height+v,k=e.height+v-x.height-6,E=e.x-w/2,L=e.y-T/2;e.width=w;const A=e.y-e.height/2-b+x.height+2;let R;if(e.look==="handDrawn"){const Y=e.cssClasses.includes("statediagram-cluster-alt"),V=It.svg(h),O=e.rx||e.ry?V.path(hs(E,L,w,T,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:u,seed:n}):V.rectangle(E,L,w,T,{seed:n});R=h.insert(()=>O,":first-child");const z=V.rectangle(E,A,w,k,{fill:Y?s:o,fillStyle:Y?"hachure":"solid",stroke:u,seed:n});R=h.insert(()=>O,":first-child"),m=h.insert(()=>z)}else R=d.insert("rect",":first-child"),R.attr("class","outer").attr("x",E).attr("y",L).attr("width",w).attr("height",T).attr("data-look",e.look),m.attr("class","inner").attr("x",E).attr("y",A).attr("width",w).attr("height",k);p.attr("transform",`translate(${e.x-x.width/2}, ${L+1-(Jr(r)?0:3)})`);const j=R.node().getBBox();return e.height=j.height,e.offsetX=0,e.offsetY=x.height-e.padding/2,e.labelBBox=x,e.intersect=function(Y){return nc(e,Y)},{cluster:h,labelBBox:x}},"roundedWithTitle"),Qlt=B(async(t,e)=>{St.info("Creating subgraph rect for ",e.id,e);const r=_e(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:s,clusterBorder:o}=i,{labelStyles:c,nodeStyles:u,borderStyles:h,backgroundStyles:d}=jt(e),p=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),m=Jr(r),g=p.insert("g").attr("class","cluster-label "),x=await xa(g,e.label,{style:e.labelStyle,useHtmlLabels:m,isNode:!0,width:e.width});let v=x.getBBox();if(Jr(r)){const R=x.children[0],j=Xt(x);v=R.getBoundingClientRect(),j.attr("width",v.width),j.attr("height",v.height)}const b=e.width<=v.width+e.padding?v.width+e.padding:e.width;e.width<=v.width+e.padding?e.diff=(b-e.width)/2-e.padding:e.diff=-e.padding;const w=e.height,T=e.x-b/2,k=e.y-w/2;St.trace("Data ",e,JSON.stringify(e));let E;if(e.look==="handDrawn"){const R=It.svg(p),j=qt(e,{roughness:.7,fill:s,stroke:o,fillWeight:4,seed:n}),Y=R.path(hs(T,k,b,w,e.rx),j);E=p.insert(()=>(St.debug("Rough node insert CXC",Y),Y),":first-child"),E.select("path:nth-child(2)").attr("style",h.join(";")),E.select("path").attr("style",d.join(";").replace("fill","stroke"))}else E=p.insert("rect",":first-child"),E.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",T).attr("y",k).attr("width",b).attr("height",w);const{subGraphTitleTopMargin:L}=mS(r);if(g.attr("transform",`translate(${e.x-v.width/2}, ${e.y-e.height/2+L})`),c){const R=g.select("span");R&&R.attr("style",c)}const A=E.node().getBBox();return e.offsetX=0,e.width=A.width,e.height=A.height,e.offsetY=v.height-e.padding/2,e.intersect=function(R){return nc(e,R)},{cluster:p,labelBBox:v}},"kanbanSection"),Zlt=B((t,e)=>{const r=_e(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:s}=i,o=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look),c=o.insert("g",":first-child"),u=0*e.padding,h=e.width+u;e.diff=-e.padding;const d=e.height+u,p=e.x-h/2,m=e.y-d/2;e.width=h;let g;if(e.look==="handDrawn"){const b=It.svg(o).rectangle(p,m,h,d,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:s,seed:n});g=o.insert(()=>b,":first-child")}else{g=c.insert("rect",":first-child");let v="outer";e.look,v="divider",g.attr("class",v).attr("x",p).attr("y",m).attr("width",h).attr("height",d).attr("data-look",e.look)}const x=g.node().getBBox();return e.height=x.height,e.offsetX=0,e.offsetY=0,e.intersect=function(v){return nc(e,v)},{cluster:o,labelBBox:{}}},"divider"),Klt=yz,Jlt={rect:yz,squareRect:Klt,roundedWithTitle:Xlt,noteGroup:Wlt,divider:Zlt,kanbanSection:Qlt},xz=new Map,tct=B(async(t,e)=>{const r=e.shape||"rect",i=await Jlt[r](t,e);return xz.set(e.id,i),i},"insertCluster"),ept=B(()=>{xz=new Map},"clear");function bz(t,e){return t.intersect(e)}B(bz,"intersectNode");var ect=bz;function vz(t,e,r,i){var n=t.x,s=t.y,o=n-i.x,c=s-i.y,u=Math.sqrt(e*e*c*c+r*r*o*o),h=Math.abs(e*r*o/u);i.x<n&&(h=-h);var d=Math.abs(e*r*c/u);return i.y<s&&(d=-d),{x:n+h,y:s+d}}B(vz,"intersectEllipse");var Cz=vz;function wz(t,e,r){return Cz(t,e,e,r)}B(wz,"intersectCircle");var rct=wz;function Sz(t,e,r,i){{const n=e.y-t.y,s=t.x-e.x,o=e.x*t.y-t.x*e.y,c=n*r.x+s*r.y+o,u=n*i.x+s*i.y+o,h=1e-6;if(c!==0&&u!==0&&I2(c,u))return;const d=i.y-r.y,p=r.x-i.x,m=i.x*r.y-r.x*i.y,g=d*t.x+p*t.y+m,x=d*e.x+p*e.y+m;if(Math.abs(g)<h&&Math.abs(x)<h&&I2(g,x))return;const v=n*p-d*s;if(v===0)return;const b=Math.abs(v/2);let w=s*m-p*o;const T=w<0?(w-b)/v:(w+b)/v;w=d*o-n*m;const k=w<0?(w-b)/v:(w+b)/v;return{x:T,y:k}}}B(Sz,"intersectLine");function I2(t,e){return t*e>0}B(I2,"sameSign");var ict=Sz;function kz(t,e,r){let i=t.x,n=t.y,s=[],o=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(d){o=Math.min(o,d.x),c=Math.min(c,d.y)}):(o=Math.min(o,e.x),c=Math.min(c,e.y));let u=i-t.width/2-o,h=n-t.height/2-c;for(let d=0;d<e.length;d++){let p=e[d],m=e[d<e.length-1?d+1:0],g=ict(t,r,{x:u+p.x,y:h+p.y},{x:u+m.x,y:h+m.y});g&&s.push(g)}return s.length?(s.length>1&&s.sort(function(d,p){let m=d.x-r.x,g=d.y-r.y,x=Math.sqrt(m*m+g*g),v=p.x-r.x,b=p.y-r.y,w=Math.sqrt(v*v+b*b);return x<w?-1:x===w?0:1}),s[0]):t}B(kz,"intersectPolygon");var nct=kz,Rt={node:ect,circle:rct,ellipse:Cz,polygon:nct,rect:nc};function _z(t,e){const{labelStyles:r}=jt(e);e.labelStyle=r;const i=Qt(e);let n=i;i||(n="anchor");const s=t.insert("g").attr("class",n).attr("id",e.domId||e.id),o=1,{cssStyles:c}=e,u=It.svg(s),h=qt(e,{fill:"black",stroke:"none",fillStyle:"solid"});e.look!=="handDrawn"&&(h.roughness=0);const d=u.circle(0,0,o*2,h),p=s.insert(()=>d,":first-child");return p.attr("class","anchor").attr("style",Mr(c)),Pt(e,p),e.intersect=function(m){return St.info("Circle intersect",e,o,m),Rt.circle(e,o,m)},s}B(_z,"anchor");function q2(t,e,r,i,n,s,o){const u=(t+r)/2,h=(e+i)/2,d=Math.atan2(i-e,r-t),p=(r-t)/2,m=(i-e)/2,g=p/n,x=m/s,v=Math.sqrt(g**2+x**2);if(v>1)throw new Error("The given radii are too small to create an arc between the points.");const b=Math.sqrt(1-v**2),w=u+b*s*Math.sin(d)*(o?-1:1),T=h-b*n*Math.cos(d)*(o?-1:1),k=Math.atan2((e-T)/s,(t-w)/n);let L=Math.atan2((i-T)/s,(r-w)/n)-k;o&&L<0&&(L+=2*Math.PI),!o&&L>0&&(L-=2*Math.PI);const A=[];for(let R=0;R<20;R++){const j=R/19,Y=k+j*L,V=w+n*Math.cos(Y),O=T+s*Math.sin(Y);A.push({x:V,y:O})}return A}B(q2,"generateArcPoints");function Tz(t,e,r){const[i,n]=[e,r].sort((s,o)=>o-s);return n*(1-Math.sqrt(1-(t/i/2)**2))}B(Tz,"calculateArcSagitta");async function Ez(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;const n=e.padding??0,s=e.look==="neo"?16:n,o=e.look==="neo"?12:n,c=B(Y=>Y+o,"calcTotalHeight"),u=B(Y=>{const V=Y/2;return[V/(2.5+Y/50),V]},"calcEllipseRadius"),{shapeSvg:h,bbox:d}=await Kt(t,e,Qt(e)),p=c(e!=null&&e.height?e==null?void 0:e.height:d.height),[m,g]=u(p),x=Tz(p,m,g),b=(e!=null&&e.width?e==null?void 0:e.width:d.width)+s*2+x-x,w=p,{cssStyles:T}=e,k=[{x:b/2,y:-w/2},{x:-b/2,y:-w/2},...q2(-b/2,-w/2,-b/2,w/2,m,g,!1),{x:b/2,y:w/2},...q2(b/2,w/2,b/2,-w/2,m,g,!0)],E=It.svg(h),L=qt(e,{});e.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const A=xe(k),R=E.path(A,L),j=h.insert(()=>R,":first-child");return j.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn"&&j.selectAll("path").attr("style",T),i&&e.look!=="handDrawn"&&j.selectAll("path").attr("style",i),j.attr("transform",`translate(${m/2}, 0)`),Pt(e,j),e.intersect=function(Y){return Rt.polygon(e,k,Y)},h}B(Ez,"bowTieRect");function ba(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}B(ba,"insertPolygonShape");var af=12;async function Az(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;const n=e.padding??0,s=e.look==="neo"?28:n,o=e.look==="neo"?24:n,{shapeSvg:c,bbox:u}=await Kt(t,e,Qt(e)),h=((e==null?void 0:e.width)??u.width)+(e.look==="neo"?s*2:s+af),d=((e==null?void 0:e.height)??u.height)+(e.look==="neo"?o*2:o),p=0,m=h,g=-d,x=0,v=[{x:p+af,y:g},{x:m,y:g},{x:m,y:x},{x:p,y:x},{x:p,y:g+af},{x:p+af,y:g}];let b;const{cssStyles:w}=e;if(e.look==="handDrawn"){const T=It.svg(c),k=qt(e,{}),E=xe(v),L=T.path(E,k);b=c.insert(()=>L,":first-child").attr("transform",`translate(${-h/2}, ${d/2})`),w&&b.attr("style",w)}else b=ba(c,h,d,v);return i&&b.attr("style",i),Pt(e,b),e.intersect=function(T){return Rt.polygon(e,v,T)},c}B(Az,"card");function Bz(t,e){const{nodeStyles:r}=jt(e);e.label="";const i=t.insert("g").attr("class",Qt(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,s=Math.max(28,e.width??0),o=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}],c=It.svg(i),u=qt(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const h=xe(o),d=c.path(h,u),p=i.insert(()=>d,":first-child");return n&&e.look!=="handDrawn"&&p.selectAll("path").attr("style",n),r&&e.look!=="handDrawn"&&p.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(m){return Rt.polygon(e,o,m)},i}B(Bz,"choice");async function BS(t,e,r){const{labelStyles:i,nodeStyles:n}=jt(e);e.labelStyle=i;const{shapeSvg:s,bbox:o,halfPadding:c}=await Kt(t,e,Qt(e)),u=16,h=(r==null?void 0:r.padding)??c,d=e.look==="neo"?o.width/2+u*2:o.width/2+h;let p;const{cssStyles:m}=e;if(e.look==="handDrawn"){const g=It.svg(s),x=qt(e,{}),v=g.circle(0,0,d*2,x);p=s.insert(()=>v,":first-child"),p.attr("class","basic label-container").attr("style",Mr(m))}else p=s.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",d).attr("cx",0).attr("cy",0);return Pt(e,p),e.calcIntersect=function(g,x){const v=g.width/2;return Rt.circle(g,v,x)},e.intersect=function(g){return St.info("Circle intersect",e,d,g),Rt.circle(e,d,g)},s}B(BS,"circle");function Lz(t){const e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=t*2,n={x:i/2*e,y:i/2*r},s={x:-(i/2)*e,y:i/2*r},o={x:-(i/2)*e,y:-(i/2)*r},c={x:i/2*e,y:-(i/2)*r};return`M ${s.x},${s.y} L ${c.x},${c.y}
518
+ M ${n.x},${n.y} L ${o.x},${o.y}`}B(Lz,"createLine");function Mz(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r,e.label="";const n=t.insert("g").attr("class",Qt(e)).attr("id",e.domId??e.id),s=Math.max(30,(e==null?void 0:e.width)??0),{cssStyles:o}=e,c=It.svg(n),u=qt(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const h=c.circle(0,0,s*2,u),d=Lz(s),p=c.path(d,u),m=n.insert(()=>h,":first-child");return m.insert(()=>p),m.attr("class","outer-path"),o&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",o),i&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",i),Pt(e,m),e.intersect=function(g){return St.info("crossedCircle intersect",e,{radius:s,point:g}),Rt.circle(e,s,g)},n}B(Mz,"crossedCircle");function oa(t,e,r,i=100,n=0,s=180){const o=[],c=n*Math.PI/180,d=(s*Math.PI/180-c)/(i-1);for(let p=0;p<i;p++){const m=c+p*d,g=t+r*Math.cos(m),x=e+r*Math.sin(m);o.push({x:-g,y:-x})}return o}B(oa,"generateCirclePoints");async function Nz(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await Kt(t,e,Qt(e)),c=e.look==="neo"?18:e.padding??0,u=e.look==="neo"?12:e.padding??0,h=s.width+c,d=s.height+u,p=Math.max(5,d*.1),{cssStyles:m}=e,g=[...oa(h/2,-d/2,p,30,-90,0),{x:-h/2-p,y:p},...oa(h/2+p*2,-p,p,20,-180,-270),...oa(h/2+p*2,p,p,20,-90,-180),{x:-h/2-p,y:-d/2},...oa(h/2,d/2,p,20,0,90)],x=[{x:h/2,y:-d/2-p},{x:-h/2,y:-d/2-p},...oa(h/2,-d/2,p,20,-90,0),{x:-h/2-p,y:-p},...oa(h/2+h*.1,-p,p,20,-180,-270),...oa(h/2+h*.1,p,p,20,-90,-180),{x:-h/2-p,y:d/2},...oa(h/2,d/2,p,20,0,90),{x:-h/2,y:d/2+p},{x:h/2,y:d/2+p}],v=It.svg(n),b=qt(e,{fill:"none"});e.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const T=xe(g).replace("Z",""),k=v.path(T,b),E=xe(x),L=v.path(E,{...b}),A=n.insert("g",":first-child");return A.insert(()=>L,":first-child").attr("stroke-opacity",0),A.insert(()=>k,":first-child"),A.attr("class","text"),m&&e.look!=="handDrawn"&&A.selectAll("path").attr("style",m),i&&e.look!=="handDrawn"&&A.selectAll("path").attr("style",i),A.attr("transform",`translate(${p}, 0)`),o.attr("transform",`translate(${-h/2+p-(s.x-(s.left??0))},${-d/2+(e.padding??0)/2-(s.y-(s.top??0))})`),Pt(e,A),e.intersect=function(R){return Rt.polygon(e,x,R)},n}B(Nz,"curlyBraceLeft");function la(t,e,r,i=100,n=0,s=180){const o=[],c=n*Math.PI/180,d=(s*Math.PI/180-c)/(i-1);for(let p=0;p<i;p++){const m=c+p*d,g=t+r*Math.cos(m),x=e+r*Math.sin(m);o.push({x:g,y:x})}return o}B(la,"generateCirclePoints");async function Oz(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await Kt(t,e,Qt(e)),c=e.look==="neo"?18:e.padding??0,u=e.look==="neo"?12:e.padding??0,h=s.width+(e.look==="neo"?c*2:c),d=s.height+(e.look==="neo"?u*2:u),p=Math.max(5,d*.1),{cssStyles:m}=e,g=[...la(h/2,-d/2,p,20,-90,0),{x:h/2+p,y:-p},...la(h/2+p*2,-p,p,20,-180,-270),...la(h/2+p*2,p,p,20,-90,-180),{x:h/2+p,y:d/2},...la(h/2,d/2,p,20,0,90)],x=[{x:-h/2,y:-d/2-p},{x:h/2,y:-d/2-p},...la(h/2,-d/2,p,20,-90,0),{x:h/2+p,y:-p},...la(h/2+p*2,-p,p,20,-180,-270),...la(h/2+p*2,p,p,20,-90,-180),{x:h/2+p,y:d/2},...la(h/2,d/2,p,20,0,90),{x:h/2,y:d/2+p},{x:-h/2,y:d/2+p}],v=It.svg(n),b=qt(e,{fill:"none"});e.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const T=xe(g).replace("Z",""),k=v.path(T,b),E=xe(x),L=v.path(E,{...b}),A=n.insert("g",":first-child");return A.insert(()=>L,":first-child").attr("stroke-opacity",0),A.insert(()=>k,":first-child"),A.attr("class","text"),m&&e.look!=="handDrawn"&&A.selectAll("path").attr("style",m),i&&e.look!=="handDrawn"&&A.selectAll("path").attr("style",i),A.attr("transform",`translate(${-p}, 0)`),o.attr("transform",`translate(${-h/2+(e.padding??0)/2-(s.x-(s.left??0))},${-d/2+(e.padding??0)/2-(s.y-(s.top??0))})`),Pt(e,A),e.intersect=function(R){return Rt.polygon(e,x,R)},n}B(Oz,"curlyBraceRight");function qr(t,e,r,i=100,n=0,s=180){const o=[],c=n*Math.PI/180,d=(s*Math.PI/180-c)/(i-1);for(let p=0;p<i;p++){const m=c+p*d,g=t+r*Math.cos(m),x=e+r*Math.sin(m);o.push({x:-g,y:-x})}return o}B(qr,"generateCirclePoints");async function Rz(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await Kt(t,e,Qt(e)),c=e.look==="neo"?18:e.padding??0,u=e.look==="neo"?12:e.padding??0,h=s.width+(e.look==="neo"?c*2:c),d=s.height+(e.look==="neo"?u*2:u),p=Math.max(5,d*.1),{cssStyles:m}=e,g=[...qr(h/2,-d/2,p,30,-90,0),{x:-h/2-p,y:p},...qr(h/2+p*2,-p,p,20,-180,-270),...qr(h/2+p*2,p,p,20,-90,-180),{x:-h/2-p,y:-d/2},...qr(h/2,d/2,p,20,0,90)],x=[...qr(-h/2+p+p/2,-d/2,p,20,-90,-180),{x:h/2-p/2,y:p},...qr(-h/2-p/2,-p,p,20,0,90),...qr(-h/2-p/2,p,p,20,-90,0),{x:h/2-p/2,y:-p},...qr(-h/2+p+p/2,d/2,p,30,-180,-270)],v=[{x:h/2,y:-d/2-p},{x:-h/2,y:-d/2-p},...qr(h/2,-d/2,p,20,-90,0),{x:-h/2-p,y:-p},...qr(h/2+p*2,-p,p,20,-180,-270),...qr(h/2+p*2,p,p,20,-90,-180),{x:-h/2-p,y:d/2},...qr(h/2,d/2,p,20,0,90),{x:-h/2,y:d/2+p},{x:h/2-p-p/2,y:d/2+p},...qr(-h/2+p+p/2,-d/2,p,20,-90,-180),{x:h/2-p/2,y:p},...qr(-h/2-p/2,-p,p,20,0,90),...qr(-h/2-p/2,p,p,20,-90,0),{x:h/2-p/2,y:-p},...qr(-h/2+p+p/2,d/2,p,30,-180,-270)],b=It.svg(n),w=qt(e,{fill:"none"});e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const k=xe(g).replace("Z",""),E=b.path(k,w),A=xe(x).replace("Z",""),R=b.path(A,w),j=xe(v),Y=b.path(j,{...w}),V=n.insert("g",":first-child");return V.insert(()=>Y,":first-child").attr("stroke-opacity",0),V.insert(()=>E,":first-child"),V.insert(()=>R,":first-child"),V.attr("class","text"),m&&e.look!=="handDrawn"&&V.selectAll("path").attr("style",m),i&&e.look!=="handDrawn"&&V.selectAll("path").attr("style",i),V.attr("transform",`translate(${p-p/4}, 0)`),o.attr("transform",`translate(${-h/2+(e.padding??0)/2-(s.x-(s.left??0))},${-d/2+(e.padding??0)/2-(s.y-(s.top??0))})`),Pt(e,V),e.intersect=function(O){return Rt.polygon(e,v,O)},n}B(Rz,"curlyBraces");async function Dz(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;const n=e.padding??0,s=e.look==="neo"?16:n,o=e.look==="neo"?12:n,c=20,u=5,{shapeSvg:h,bbox:d}=await Kt(t,e,Qt(e)),p=Math.max(c,(d.width+s*2)*1.25,(e==null?void 0:e.width)??0),m=Math.max(u,d.height+o*2,(e==null?void 0:e.height)??0),g=m/2,{cssStyles:x}=e,v=It.svg(h),b=qt(e,{});e.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const w=p,T=m,k=w-g,E=T/4,L=[{x:k,y:0},{x:E,y:0},{x:0,y:T/2},{x:E,y:T},{x:k,y:T},...th(-k,-T/2,g,50,270,90)],A=xe(L),R=v.path(A,b),j=h.insert(()=>R,":first-child");return j.attr("class","basic label-container outer-path"),x&&e.look!=="handDrawn"&&j.selectChildren("path").attr("style",x),i&&e.look!=="handDrawn"&&j.selectChildren("path").attr("style",i),j.attr("transform",`translate(${-p/2}, ${-m/2})`),Pt(e,j),e.intersect=function(Y){return Rt.polygon(e,L,Y)},h}B(Dz,"curvedTrapezoid");var act=B((t,e,r,i,n,s)=>[`M${t},${e+s}`,`a${n},${s} 0,0,0 ${r},0`,`a${n},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),sct=B((t,e,r,i,n,s)=>[`M${t},${e+s}`,`M${t+r},${e+s}`,`a${n},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),oct=B((t,e,r,i,n,s)=>[`M${t-r/2},${-i/2}`,`a${n},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),H4=8,U4=8;async function Fz(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;const n=e.padding??0,s=e.look==="neo"?24:n,o=e.look==="neo"?24:n;if(e.width||e.height){const b=e.width??0;e.width=(e.width??0)-o,e.width<U4&&(e.width=U4);const T=b/2/(2.5+b/50);e.height=(e.height??0)-s-T*3,e.height<H4&&(e.height=H4)}const{shapeSvg:c,bbox:u,label:h}=await Kt(t,e,Qt(e)),d=(e.width?e.width:u.width)+o,p=d/2,m=p/(2.5+d/50),g=(e.height?e.height:u.height)+s+m;let x;const{cssStyles:v}=e;if(e.look==="handDrawn"){const b=It.svg(c),w=sct(0,0,d,g,p,m),T=oct(0,m,d,g,p,m),k=qt(e,{}),E=b.path(w,k),L=b.path(T,qt(e,{fill:"none"}));x=c.insert(()=>L,":first-child"),x=c.insert(()=>E,":first-child"),x.attr("class","basic label-container"),v&&x.attr("style",v)}else{const b=act(0,0,d,g,p,m);x=c.insert("path",":first-child").attr("d",b).attr("class","basic label-container outer-path").attr("style",Mr(v)).attr("style",i)}return x.attr("label-offset-y",m),x.attr("transform",`translate(${-d/2}, ${-(g/2+m)})`),Pt(e,x),h.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+(e.padding??0)/1.5-(u.y-(u.top??0))})`),e.intersect=function(b){const w=Rt.rect(e,b),T=w.x-(e.x??0);if(p!=0&&(Math.abs(T)<(e.width??0)/2||Math.abs(T)==(e.width??0)/2&&Math.abs(w.y-(e.y??0))>(e.height??0)/2-m)){let k=m*m*(1-T*T/(p*p));k>0&&(k=Math.sqrt(k)),k=m-k,b.y-(e.y??0)>0&&(k=-k),w.y+=k}return w},c}B(Fz,"cylinder");async function ac(t,e,r){const{labelStyles:i,nodeStyles:n}=jt(e);e.labelStyle=i;const{shapeSvg:s,bbox:o}=await Kt(t,e,Qt(e)),c=Math.max(o.width+r.labelPaddingX*2,(e==null?void 0:e.width)||0),u=Math.max(o.height+r.labelPaddingY*2,(e==null?void 0:e.height)||0),h=-c/2,d=-u/2;let p,{rx:m,ry:g}=e;const{cssStyles:x}=e;if(r!=null&&r.rx&&r.ry&&(m=r.rx,g=r.ry),e.look==="handDrawn"){const v=It.svg(s),b=qt(e,{}),w=m||g?v.path(hs(h,d,c,u,m||0),b):v.rectangle(h,d,c,u,b);p=s.insert(()=>w,":first-child"),p.attr("class","basic label-container").attr("style",Mr(x))}else p=s.insert("rect",":first-child"),p.attr("class","basic label-container").attr("style",n).attr("rx",Mr(m)).attr("ry",Mr(g)).attr("x",h).attr("y",d).attr("width",c).attr("height",u);return Pt(e,p),e.calcIntersect=function(v,b){return Rt.rect(v,b)},e.intersect=function(v){return Rt.rect(e,v)},s}B(ac,"drawRect");async function Iz(t,e){const{cssClasses:r,labelPaddingX:i,labelPaddingY:n,padding:s,width:o,height:c}=e,u={rx:0,ry:0,labelPaddingX:i??(s??0)*2,labelPaddingY:n??s??0},h=await ac(t,e,u);if(e.look==="handDrawn"){const g=It.svg(h),x=qt(e,{}),v=h.select(".basic.label-container > path:nth-child(2)"),b=v.node();if(!b)return h;let w=null;if(b instanceof SVGGraphicsElement)w=b.getBBox();else return h;return h.insert(()=>g.line(w.x,w.y,w.x+w.width,w.y,x),".basic.label-container g.label"),h.insert(()=>g.line(w.x,w.y+w.height,w.x+w.width,w.y+w.height,x),".basic.label-container g.label"),v.remove(),h}const d=h.select(".basic.label-container"),p=(Number(d.attr("width"))||o)??0,m=(Number(d.attr("height"))||c)??0;return p>0&&m>0&&d.attr("stroke-dasharray",`${p} ${m}`),h}B(Iz,"datastore");async function qz(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;const n=e.look==="neo"?16:e.padding??0,s=e.look==="neo"?16:e.padding??0,{shapeSvg:o,bbox:c,label:u}=await Kt(t,e,Qt(e)),h=c.width+n,d=c.height+s,p=d*.2,m=-h/2,g=-d/2-p/2,{cssStyles:x}=e,v=It.svg(o),b=qt(e,{});e.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const w=[{x:m,y:g+p},{x:-m,y:g+p},{x:-m,y:-g},{x:m,y:-g},{x:m,y:g},{x:-m,y:g},{x:-m,y:g+p}],T=v.polygon(w.map(E=>[E.x,E.y]),b),k=o.insert(()=>T,":first-child");return k.attr("class","basic label-container outer-path"),x&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",x),i&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",i),u.attr("transform",`translate(${m+(e.padding??0)/2-(c.x-(c.left??0))}, ${g+p+(e.padding??0)/2-(c.y-(c.top??0))})`),Pt(e,k),e.intersect=function(E){return Rt.rect(e,E)},o}B(qz,"dividedRectangle");async function zz(t,e){var g,x;const{labelStyles:r,nodeStyles:i}=jt(e),n=e.look==="neo"?12:5;e.labelStyle=r;const s=e.padding??0,o=e.look==="neo"?16:s,{shapeSvg:c,bbox:u}=await Kt(t,e,Qt(e)),h=(e!=null&&e.width?(e==null?void 0:e.width)/2:u.width/2)+(o??0),d=h-n;let p;const{cssStyles:m}=e;if(e.look==="handDrawn"){const v=It.svg(c),b=qt(e,{roughness:.2,strokeWidth:2.5}),w=qt(e,{roughness:.2,strokeWidth:1.5}),T=v.circle(0,0,h*2,b),k=v.circle(0,0,d*2,w);p=c.insert("g",":first-child"),p.attr("class",Mr(e.cssClasses)).attr("style",Mr(m)),(g=p.node())==null||g.appendChild(T),(x=p.node())==null||x.appendChild(k)}else{p=c.insert("g",":first-child");const v=p.insert("circle",":first-child"),b=p.insert("circle");p.attr("class","basic label-container").attr("style",i),v.attr("class","outer-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0),b.attr("class","inner-circle").attr("style",i).attr("r",d).attr("cx",0).attr("cy",0)}return Pt(e,p),e.intersect=function(v){return St.info("DoubleCircle intersect",e,h,v),Rt.circle(e,h,v)},c}B(zz,"doublecircle");function jz(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=jt(e);e.label="",e.labelStyle=i;const s=t.insert("g").attr("class",Qt(e)).attr("id",e.domId??e.id),o=7,{cssStyles:c}=e,u=It.svg(s),{nodeBorder:h}=r,d=qt(e,{fillStyle:"solid"});e.look!=="handDrawn"&&(d.roughness=0);const p=u.circle(0,0,o*2,d),m=s.insert(()=>p,":first-child");return m.selectAll("path").attr("style",`fill: ${h} !important;`),c&&c.length>0&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",c),n&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",n),Pt(e,m),e.intersect=function(g){return St.info("filledCircle intersect",e,{radius:o,point:g}),Rt.circle(e,o,g)},s}B(jz,"filledCircle");var G4=10,Y4=10;async function $z(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;const n=e.padding??0,s=e.look==="neo"?n*2:n;(e.width||e.height)&&(e.height=(e==null?void 0:e.height)??0,e.height<G4&&(e.height=G4),e.width=((e==null?void 0:e.width)??0)-s-s/2,e.width<Y4&&(e.width=Y4));const{shapeSvg:o,bbox:c,label:u}=await Kt(t,e,Qt(e)),h=(e!=null&&e.width?e==null?void 0:e.width:c.width)+(s??0),d=e!=null&&e.height?e==null?void 0:e.height:h+c.height,p=d,m=[{x:0,y:-d},{x:p,y:-d},{x:p/2,y:0}],{cssStyles:g}=e,x=It.svg(o),v=qt(e,{});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const b=xe(m),w=x.path(b,v),T=o.insert(()=>w,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`).attr("class","outer-path");return g&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",g),i&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",i),e.width=h,e.height=d,Pt(e,T),u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))}, ${-d/2+(e.padding??0)/2+(c.y-(c.top??0))})`),e.intersect=function(k){return St.info("Triangle intersect",e,m,k),Rt.polygon(e,m,k)},o}B($z,"flippedTriangle");function Pz(t,e,{dir:r,config:{state:i,themeVariables:n}}){const{nodeStyles:s}=jt(e);e.label="";const o=t.insert("g").attr("class",Qt(e)).attr("id",e.domId??e.id),{cssStyles:c}=e;let u=Math.max(70,(e==null?void 0:e.width)??0),h=Math.max(10,(e==null?void 0:e.height)??0);r==="LR"&&(u=Math.max(10,(e==null?void 0:e.width)??0),h=Math.max(70,(e==null?void 0:e.height)??0));const d=-1*u/2,p=-1*h/2,m=It.svg(o),g=qt(e,{stroke:n.lineColor,fill:n.lineColor});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=m.rectangle(d,p,u,h,g),v=o.insert(()=>x,":first-child");c&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",c),s&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",s),Pt(e,v);const b=(i==null?void 0:i.padding)??0;return e.width&&e.height&&(e.width+=b/2||0,e.height+=b/2||0),e.intersect=function(w){return Rt.rect(e,w)},o}B(Pz,"forkJoin");async function Hz(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;const n=15,s=10,o=e.look==="neo"?16:e.padding??0,c=e.look==="neo"?12:e.padding??0;(e.width||e.height)&&(e.height=((e==null?void 0:e.height)??0)-c*2,e.height<s&&(e.height=s),e.width=((e==null?void 0:e.width)??0)-o*2,e.width<n&&(e.width=n));const{shapeSvg:u,bbox:h}=await Kt(t,e,Qt(e)),d=(e!=null&&e.width?e==null?void 0:e.width:Math.max(n,h.width))+o*2,p=(e!=null&&e.height?e==null?void 0:e.height:Math.max(s,h.height))+c*2,m=p/2,{cssStyles:g}=e,x=It.svg(u),v=qt(e,{});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const b=[{x:-d/2,y:-p/2},{x:d/2-m,y:-p/2},...th(-d/2+m,0,m,50,90,270),{x:d/2-m,y:p/2},{x:-d/2,y:p/2}],w=xe(b),T=x.path(w,v),k=u.insert(()=>T,":first-child");return k.attr("class","basic label-container outer-path"),g&&e.look!=="handDrawn"&&k.selectChildren("path").attr("style",g),i&&e.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),Pt(e,k),e.intersect=function(E){return St.info("Pill intersect",e,{radius:m,point:E}),Rt.polygon(e,b,E)},u}B(Hz,"halfRoundedRectangle");var lct=B((t,e,r,i,n)=>[`M${t+n},${e}`,`L${t+r-n},${e}`,`L${t+r},${e-i/2}`,`L${t+r-n},${e-i}`,`L${t+n},${e-i}`,`L${t},${e-i/2}`,"Z"].join(" "),"createHexagonPathD");async function Uz(t,e){const{labelStyles:r,nodeStyles:i}=jt(e),n=e.look==="neo"?3.5:4;e.labelStyle=r;const s=e.padding??0,o=70,c=32,u=e.look==="neo"?o:s,h=e.look==="neo"?c:s;if(e.width||e.height){const k=(e.height??0)/n;e.width=((e==null?void 0:e.width)??0)-2*k-h,e.height=(e.height??0)-u}const{shapeSvg:d,bbox:p}=await Kt(t,e,Qt(e)),m=(e!=null&&e.height?e==null?void 0:e.height:p.height)+u,g=m/n,x=(e!=null&&e.width?e==null?void 0:e.width:p.width)+2*g+h,v=[{x:g,y:0},{x:x-g,y:0},{x,y:-m/2},{x:x-g,y:-m},{x:g,y:-m},{x:0,y:-m/2}];let b;const{cssStyles:w}=e;if(e.look==="handDrawn"){const T=It.svg(d),k=qt(e,{}),E=lct(0,0,x,m,g),L=T.path(E,k);b=d.insert(()=>L,":first-child").attr("transform",`translate(${-x/2}, ${m/2})`),w&&b.attr("style",w)}else b=ba(d,x,m,v);return i&&b.attr("style",i),e.width=x,e.height=m,Pt(e,b),e.intersect=function(T){return Rt.polygon(e,v,T)},d}B(Uz,"hexagon");async function Gz(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.label="",e.labelStyle=r;const{shapeSvg:n}=await Kt(t,e,Qt(e)),s=Math.max(30,(e==null?void 0:e.width)??0),o=Math.max(30,(e==null?void 0:e.height)??0),{cssStyles:c}=e,u=It.svg(n),h=qt(e,{});e.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const d=[{x:0,y:0},{x:s,y:0},{x:0,y:o},{x:s,y:o}],p=xe(d),m=u.path(p,h),g=n.insert(()=>m,":first-child");return g.attr("class","basic label-container outer-path"),c&&e.look!=="handDrawn"&&g.selectChildren("path").attr("style",c),i&&e.look!=="handDrawn"&&g.selectChildren("path").attr("style",i),g.attr("transform",`translate(${-s/2}, ${-o/2})`),Pt(e,g),e.intersect=function(x){return St.info("Pill intersect",e,{points:d}),Rt.polygon(e,d,x)},n}B(Gz,"hourglass");async function Yz(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=jt(e);e.labelStyle=n;const s=e.assetHeight??48,o=e.assetWidth??48,c=Math.max(s,o),u=i==null?void 0:i.wrappingWidth;e.width=Math.max(c,u??0);const{shapeSvg:h,bbox:d,label:p}=await Kt(t,e,"icon-shape default"),m=e.pos==="t",g=c,x=c,{nodeBorder:v}=r,{stylesMap:b}=ic(e),w=-x/2,T=-g/2,k=e.label?8:0,E=It.svg(h),L=qt(e,{stroke:"none",fill:"none"});e.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const A=E.rectangle(w,T,x,g,L),R=Math.max(x,d.width),j=g+d.height+k,Y=E.rectangle(-R/2,-j/2,R,j,{...L,fill:"transparent",stroke:"none"}),V=h.insert(()=>A,":first-child"),O=h.insert(()=>Y);if(e.icon){const z=h.append("g");z.html(`<g>${await wh(e.icon,{height:c,width:c,fallbackPrefix:""})}</g>`);const X=z.node().getBBox(),M=X.width,I=X.height,N=X.x,P=X.y;z.attr("transform",`translate(${-M/2-N},${m?d.height/2+k/2-I/2-P:-d.height/2-k/2-I/2-P})`),z.attr("style",`color: ${b.get("stroke")??v};`)}return p.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${m?-j/2:j/2-d.height})`),V.attr("transform",`translate(0,${m?d.height/2+k/2:-d.height/2-k/2})`),Pt(e,O),e.intersect=function(z){if(St.info("iconSquare intersect",e,z),!e.label)return Rt.rect(e,z);const X=e.x??0,M=e.y??0,I=e.height??0;let N=[];return m?N=[{x:X-d.width/2,y:M-I/2},{x:X+d.width/2,y:M-I/2},{x:X+d.width/2,y:M-I/2+d.height+k},{x:X+x/2,y:M-I/2+d.height+k},{x:X+x/2,y:M+I/2},{x:X-x/2,y:M+I/2},{x:X-x/2,y:M-I/2+d.height+k},{x:X-d.width/2,y:M-I/2+d.height+k}]:N=[{x:X-x/2,y:M-I/2},{x:X+x/2,y:M-I/2},{x:X+x/2,y:M-I/2+g},{x:X+d.width/2,y:M-I/2+g},{x:X+d.width/2/2,y:M+I/2},{x:X-d.width/2,y:M+I/2},{x:X-d.width/2,y:M-I/2+g},{x:X-x/2,y:M-I/2+g}],Rt.polygon(e,N,z)},h}B(Yz,"icon");async function Vz(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=jt(e);e.labelStyle=n;const s=e.assetHeight??48,o=e.assetWidth??48,c=Math.max(s,o),u=i==null?void 0:i.wrappingWidth;e.width=Math.max(c,u??0);const{shapeSvg:h,bbox:d,label:p}=await Kt(t,e,"icon-shape default"),m=20,g=e.label?8:0,x=e.pos==="t",{nodeBorder:v,mainBkg:b}=r,{stylesMap:w}=ic(e),T=It.svg(h),k=qt(e,{});e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const E=w.get("fill");k.stroke=E??b;const L=h.append("g");e.icon&&L.html(`<g>${await wh(e.icon,{height:c,width:c,fallbackPrefix:""})}</g>`);const A=L.node().getBBox(),R=A.width,j=A.height,Y=A.x,V=A.y,O=Math.max(R,j)*Math.SQRT2+m*2,z=T.circle(0,0,O,k),X=Math.max(O,d.width),M=O+d.height+g,I=T.rectangle(-X/2,-M/2,X,M,{...k,fill:"transparent",stroke:"none"}),N=h.insert(()=>z,":first-child"),P=h.insert(()=>I);return L.attr("transform",`translate(${-R/2-Y},${x?d.height/2+g/2-j/2-V:-d.height/2-g/2-j/2-V})`),L.attr("style",`color: ${w.get("stroke")??v};`),p.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${x?-M/2:M/2-d.height})`),N.attr("transform",`translate(0,${x?d.height/2+g/2:-d.height/2-g/2})`),Pt(e,P),e.intersect=function($){return St.info("iconSquare intersect",e,$),Rt.rect(e,$)},h}B(Vz,"iconCircle");async function Wz(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=jt(e);e.labelStyle=n;const s=e.assetHeight??48,o=e.assetWidth??48,c=Math.max(s,o),u=i==null?void 0:i.wrappingWidth;e.width=Math.max(c,u??0);const{shapeSvg:h,bbox:d,halfPadding:p,label:m}=await Kt(t,e,"icon-shape default"),g=e.pos==="t",x=c+p*2,v=c+p*2,{nodeBorder:b,mainBkg:w}=r,{stylesMap:T}=ic(e),k=-v/2,E=-x/2,L=e.label?8:0,A=It.svg(h),R=qt(e,{});e.look!=="handDrawn"&&(R.roughness=0,R.fillStyle="solid");const j=T.get("fill");R.stroke=j??w;const Y=A.path(hs(k,E,v,x,5),R),V=Math.max(v,d.width),O=x+d.height+L,z=A.rectangle(-V/2,-O/2,V,O,{...R,fill:"transparent",stroke:"none"}),X=h.insert(()=>Y,":first-child").attr("class","icon-shape2"),M=h.insert(()=>z);if(e.icon){const I=h.append("g");I.html(`<g>${await wh(e.icon,{height:c,width:c,fallbackPrefix:""})}</g>`);const N=I.node().getBBox(),P=N.width,$=N.height,D=N.x,q=N.y;I.attr("transform",`translate(${-P/2-D},${g?d.height/2+L/2-$/2-q:-d.height/2-L/2-$/2-q})`),I.attr("style",`color: ${T.get("stroke")??b};`)}return m.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${g?-O/2:O/2-d.height})`),X.attr("transform",`translate(0,${g?d.height/2+L/2:-d.height/2-L/2})`),Pt(e,M),e.intersect=function(I){if(St.info("iconSquare intersect",e,I),!e.label)return Rt.rect(e,I);const N=e.x??0,P=e.y??0,$=e.height??0;let D=[];return g?D=[{x:N-d.width/2,y:P-$/2},{x:N+d.width/2,y:P-$/2},{x:N+d.width/2,y:P-$/2+d.height+L},{x:N+v/2,y:P-$/2+d.height+L},{x:N+v/2,y:P+$/2},{x:N-v/2,y:P+$/2},{x:N-v/2,y:P-$/2+d.height+L},{x:N-d.width/2,y:P-$/2+d.height+L}]:D=[{x:N-v/2,y:P-$/2},{x:N+v/2,y:P-$/2},{x:N+v/2,y:P-$/2+x},{x:N+d.width/2,y:P-$/2+x},{x:N+d.width/2/2,y:P+$/2},{x:N-d.width/2,y:P+$/2},{x:N-d.width/2,y:P-$/2+x},{x:N-v/2,y:P-$/2+x}],Rt.polygon(e,D,I)},h}B(Wz,"iconRounded");async function Xz(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=jt(e);e.labelStyle=n;const s=e.assetHeight??48,o=e.assetWidth??48,c=Math.max(s,o),u=i==null?void 0:i.wrappingWidth;e.width=Math.max(c,u??0);const{shapeSvg:h,bbox:d,halfPadding:p,label:m}=await Kt(t,e,"icon-shape default"),g=e.pos==="t",x=c+p*2,v=c+p*2,{nodeBorder:b,mainBkg:w}=r,{stylesMap:T}=ic(e),k=-v/2,E=-x/2,L=e.label?8:0,A=It.svg(h),R=qt(e,{});e.look!=="handDrawn"&&(R.roughness=0,R.fillStyle="solid");const j=T.get("fill");R.stroke=j??w;const Y=A.path(hs(k,E,v,x,.1),R),V=Math.max(v,d.width),O=x+d.height+L,z=A.rectangle(-V/2,-O/2,V,O,{...R,fill:"transparent",stroke:"none"}),X=h.insert(()=>Y,":first-child"),M=h.insert(()=>z);if(e.icon){const I=h.append("g");I.html(`<g>${await wh(e.icon,{height:c,width:c,fallbackPrefix:""})}</g>`);const N=I.node().getBBox(),P=N.width,$=N.height,D=N.x,q=N.y;I.attr("transform",`translate(${-P/2-D},${g?d.height/2+L/2-$/2-q:-d.height/2-L/2-$/2-q})`),I.attr("style",`color: ${T.get("stroke")??b};`)}return m.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${g?-O/2:O/2-d.height})`),X.attr("transform",`translate(0,${g?d.height/2+L/2:-d.height/2-L/2})`),Pt(e,M),e.intersect=function(I){if(St.info("iconSquare intersect",e,I),!e.label)return Rt.rect(e,I);const N=e.x??0,P=e.y??0,$=e.height??0;let D=[];return g?D=[{x:N-d.width/2,y:P-$/2},{x:N+d.width/2,y:P-$/2},{x:N+d.width/2,y:P-$/2+d.height+L},{x:N+v/2,y:P-$/2+d.height+L},{x:N+v/2,y:P+$/2},{x:N-v/2,y:P+$/2},{x:N-v/2,y:P-$/2+d.height+L},{x:N-d.width/2,y:P-$/2+d.height+L}]:D=[{x:N-v/2,y:P-$/2},{x:N+v/2,y:P-$/2},{x:N+v/2,y:P-$/2+x},{x:N+d.width/2,y:P-$/2+x},{x:N+d.width/2/2,y:P+$/2},{x:N-d.width/2,y:P+$/2},{x:N-d.width/2,y:P-$/2+x},{x:N-v/2,y:P-$/2+x}],Rt.polygon(e,D,I)},h}B(Xz,"iconSquare");async function Qz(t,e,{config:{flowchart:r}}){const i=new Image;i.src=(e==null?void 0:e.img)??"",await i.decode();const n=Number(i.naturalWidth.toString().replace("px","")),s=Number(i.naturalHeight.toString().replace("px",""));e.imageAspectRatio=n/s;const{labelStyles:o}=jt(e);e.labelStyle=o;const c=r==null?void 0:r.wrappingWidth;e.defaultWidth=r==null?void 0:r.wrappingWidth;const u=Math.max(e.label?c??0:0,(e==null?void 0:e.assetWidth)??n),h=e.constraint==="on"&&e!=null&&e.assetHeight?e.assetHeight*e.imageAspectRatio:u,d=e.constraint==="on"?h/e.imageAspectRatio:(e==null?void 0:e.assetHeight)??s;e.width=Math.max(h,c??0);const{shapeSvg:p,bbox:m,label:g}=await Kt(t,e,"image-shape default"),x=e.pos==="t",v=-h/2,b=-d/2,w=e.label?8:0,T=It.svg(p),k=qt(e,{});e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const E=T.rectangle(v,b,h,d,k),L=Math.max(h,m.width),A=d+m.height+w,R=T.rectangle(-L/2,-A/2,L,A,{...k,fill:"none",stroke:"none"}),j=p.insert(()=>E,":first-child"),Y=p.insert(()=>R);if(e.img){const V=p.append("image");V.attr("href",e.img),V.attr("width",h),V.attr("height",d),V.attr("preserveAspectRatio","none"),V.attr("transform",`translate(${-h/2},${x?A/2-d:-A/2})`)}return g.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${x?-d/2-m.height/2-w/2:d/2-m.height/2+w/2})`),j.attr("transform",`translate(0,${x?m.height/2+w/2:-m.height/2-w/2})`),Pt(e,Y),e.intersect=function(V){if(St.info("iconSquare intersect",e,V),!e.label)return Rt.rect(e,V);const O=e.x??0,z=e.y??0,X=e.height??0;let M=[];return x?M=[{x:O-m.width/2,y:z-X/2},{x:O+m.width/2,y:z-X/2},{x:O+m.width/2,y:z-X/2+m.height+w},{x:O+h/2,y:z-X/2+m.height+w},{x:O+h/2,y:z+X/2},{x:O-h/2,y:z+X/2},{x:O-h/2,y:z-X/2+m.height+w},{x:O-m.width/2,y:z-X/2+m.height+w}]:M=[{x:O-h/2,y:z-X/2},{x:O+h/2,y:z-X/2},{x:O+h/2,y:z-X/2+d},{x:O+m.width/2,y:z-X/2+d},{x:O+m.width/2/2,y:z+X/2},{x:O-m.width/2,y:z+X/2},{x:O-m.width/2,y:z-X/2+d},{x:O-h/2,y:z-X/2+d}],Rt.polygon(e,M,V)},p}B(Qz,"imageSquare");async function Zz(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;const n=e.padding??0,s=n,o=e.look==="neo"?n*2:n,{shapeSvg:c,bbox:u}=await Kt(t,e,Qt(e)),h=Math.max(u.width+(o??0)*2,(e==null?void 0:e.width)??0),d=Math.max(u.height+(s??0)*2,(e==null?void 0:e.height)??0),p=[{x:0,y:0},{x:h,y:0},{x:h+3*d/6,y:-d},{x:-3*d/6,y:-d}];let m;const{cssStyles:g}=e;if(e.look==="handDrawn"){const x=It.svg(c),v=qt(e,{}),b=xe(p),w=x.path(b,v);m=c.insert(()=>w,":first-child").attr("transform",`translate(${-h/2}, ${d/2})`),g&&m.attr("style",g)}else m=ba(c,h,d,p);return i&&m.attr("style",i),e.width=h,e.height=d,Pt(e,m),e.intersect=function(x){return Rt.polygon(e,p,x)},c}B(Zz,"inv_trapezoid");async function Kz(t,e){const{shapeSvg:r,bbox:i,label:n}=await Kt(t,e,"label"),s=r.insert("rect",":first-child");return s.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),n.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),Pt(e,s),e.intersect=function(u){return Rt.rect(e,u)},r}B(Kz,"labelRect");async function Jz(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;const n=e.padding??0,s=n,o=e.look==="neo"?n*2:n,{shapeSvg:c,bbox:u}=await Kt(t,e,Qt(e)),h=((e==null?void 0:e.height)??u.height)+s,d=((e==null?void 0:e.width)??u.width)+o,p=[{x:0,y:0},{x:d+3*h/6,y:0},{x:d,y:-h},{x:-(3*h)/6,y:-h}];let m;const{cssStyles:g}=e;if(e.look==="handDrawn"){const x=It.svg(c),v=qt(e,{}),b=xe(p),w=x.path(b,v);m=c.insert(()=>w,":first-child").attr("transform",`translate(${-d/2}, ${h/2})`),g&&m.attr("style",g)}else m=ba(c,d,h,p);return i&&m.attr("style",i),e.width=d,e.height=h,Pt(e,m),e.intersect=function(x){return Rt.polygon(e,p,x)},c}B(Jz,"lean_left");async function t8(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;const n=e.padding??0,s=n,o=e.look==="neo"?n*2:n,{shapeSvg:c,bbox:u}=await Kt(t,e,Qt(e)),h=((e==null?void 0:e.height)??u.height)+s,d=((e==null?void 0:e.width)??u.width)+o,p=[{x:-3*h/6,y:0},{x:d,y:0},{x:d+3*h/6,y:-h},{x:0,y:-h}];let m;const{cssStyles:g}=e;if(e.look==="handDrawn"){const x=It.svg(c),v=qt(e,{}),b=xe(p),w=x.path(b,v);m=c.insert(()=>w,":first-child").attr("transform",`translate(${-d/2}, ${h/2})`),g&&m.attr("style",g)}else m=ba(c,d,h,p);return i&&m.attr("style",i),e.width=d,e.height=h,Pt(e,m),e.intersect=function(x){return Rt.polygon(e,p,x)},c}B(t8,"lean_right");function e8(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.label="",e.labelStyle=r;const n=t.insert("g").attr("class",Qt(e)).attr("id",e.domId??e.id),{cssStyles:s}=e,o=Math.max(35,(e==null?void 0:e.width)??0),c=Math.max(35,(e==null?void 0:e.height)??0),u=7,h=[{x:o,y:0},{x:0,y:c+u/2},{x:o-2*u,y:c+u/2},{x:0,y:2*c},{x:o,y:c-u/2},{x:2*u,y:c-u/2}],d=It.svg(n),p=qt(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const m=xe(h),g=d.path(m,p),x=n.insert(()=>g,":first-child");return x.attr("class","outer-path"),s&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",s),i&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",i),x.attr("transform",`translate(-${o/2},${-c})`),Pt(e,x),e.intersect=function(v){return St.info("lightningBolt intersect",e,v),Rt.polygon(e,h,v)},n}B(e8,"lightningBolt");var cct=B((t,e,r,i,n,s,o)=>[`M${t},${e+s}`,`a${n},${s} 0,0,0 ${r},0`,`a${n},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${t},${e+s+o}`,`a${n},${s} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),uct=B((t,e,r,i,n,s,o)=>[`M${t},${e+s}`,`M${t+r},${e+s}`,`a${n},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${t},${e+s+o}`,`a${n},${s} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),hct=B((t,e,r,i,n,s)=>[`M${t-r/2},${-i/2}`,`a${n},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),V4=10,W4=10;async function r8(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;const n=e.padding??0,s=e.look==="neo"?16:n,o=e.look==="neo"?24:n;if(e.width||e.height){const w=e.width??0;e.width=(e.width??0)-s,e.width<W4&&(e.width=W4);const k=w/2/(2.5+w/50);e.height=(e.height??0)-o-k*3,e.height<V4&&(e.height=V4)}const{shapeSvg:c,bbox:u,label:h}=await Kt(t,e,Qt(e)),d=(e!=null&&e.width?e==null?void 0:e.width:u.width)+s*2,p=d/2,m=p/(2.5+d/50),g=(e!=null&&e.height?e==null?void 0:e.height:u.height)+m+o*2,x=g*.1;let v;const{cssStyles:b}=e;if(e.look==="handDrawn"){const w=It.svg(c),T=uct(0,0,d,g,p,m,x),k=hct(0,m,d,g,p,m),E=qt(e,{}),L=w.path(T,E),A=w.path(k,E);c.insert(()=>A,":first-child").attr("class","line"),v=c.insert(()=>L,":first-child"),v.attr("class","basic label-container"),b&&v.attr("style",b)}else{const w=cct(0,0,d,g,p,m,x);v=c.insert("path",":first-child").attr("d",w).attr("class","basic label-container outer-path").attr("style",Mr(b)).attr("style",i)}return v.attr("label-offset-y",m),v.attr("transform",`translate(${-d/2}, ${-(g/2+m)})`),Pt(e,v),h.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+m-(u.y-(u.top??0))})`),e.intersect=function(w){const T=Rt.rect(e,w),k=T.x-(e.x??0);if(p!=0&&(Math.abs(k)<(e.width??0)/2||Math.abs(k)==(e.width??0)/2&&Math.abs(T.y-(e.y??0))>(e.height??0)/2-m)){let E=m*m*(1-k*k/(p*p));E>0&&(E=Math.sqrt(E)),E=m-E,w.y-(e.y??0)>0&&(E=-E),T.y+=E}return T},c}B(r8,"linedCylinder");async function i8(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;const n=e.padding??0,s=e.look==="neo"?16:n,o=e.look==="neo"?12:n;if(e.width||e.height){const E=e.width;e.width=(E??0)*10/11-s*2,e.width<10&&(e.width=10),e.height=((e==null?void 0:e.height)??0)-o*2,e.height<10&&(e.height=10)}const{shapeSvg:c,bbox:u,label:h}=await Kt(t,e,Qt(e)),d=(e!=null&&e.width?e==null?void 0:e.width:u.width)+(s??0)*2,p=(e!=null&&e.height?e==null?void 0:e.height:u.height)+(o??0)*2,m=e.look==="neo"?p/4:p/8,g=p+m,{cssStyles:x}=e,v=It.svg(c),b=qt(e,{});e.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const w=[{x:-d/2-d/2*.1,y:-g/2},{x:-d/2-d/2*.1,y:g/2},...os(-d/2-d/2*.1,g/2,d/2+d/2*.1,g/2,m,.8),{x:d/2+d/2*.1,y:-g/2},{x:-d/2-d/2*.1,y:-g/2},{x:-d/2,y:-g/2},{x:-d/2,y:g/2*1.1},{x:-d/2,y:-g/2}],T=v.polygon(w.map(E=>[E.x,E.y]),b),k=c.insert(()=>T,":first-child");return k.attr("class","basic label-container outer-path"),x&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",x),i&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-m/2})`),h.attr("transform",`translate(${-d/2+(e.padding??0)+d/2*.1/2-(u.x-(u.left??0))},${-p/2+(e.padding??0)-m/2-(u.y-(u.top??0))})`),Pt(e,k),e.intersect=function(E){return Rt.polygon(e,w,E)},c}B(i8,"linedWaveEdgedRect");async function n8(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;const n=e.padding??0,s=e.look==="neo"?16:n,o=e.look==="neo"?12:n,c=e.look==="neo"?10:5;(e.width||e.height)&&(e.width=Math.max(((e==null?void 0:e.width)??0)-s*2-2*c,10),e.height=Math.max(((e==null?void 0:e.height)??0)-o*2-2*c,10));const{shapeSvg:u,bbox:h,label:d}=await Kt(t,e,Qt(e)),p=(e!=null&&e.width?e==null?void 0:e.width:h.width)+s*2+2*c,m=(e!=null&&e.height?e==null?void 0:e.height:h.height)+o*2+2*c,g=p-2*c,x=m-2*c,v=-g/2,b=-x/2,{cssStyles:w}=e,T=It.svg(u),k=qt(e,{}),E=[{x:v-c,y:b+c},{x:v-c,y:b+x+c},{x:v+g-c,y:b+x+c},{x:v+g-c,y:b+x},{x:v+g,y:b+x},{x:v+g,y:b+x-c},{x:v+g+c,y:b+x-c},{x:v+g+c,y:b-c},{x:v+c,y:b-c},{x:v+c,y:b},{x:v,y:b},{x:v,y:b+c}],L=[{x:v,y:b+c},{x:v+g-c,y:b+c},{x:v+g-c,y:b+x},{x:v+g,y:b+x},{x:v+g,y:b},{x:v,y:b}];e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const A=xe(E);let R=T.path(A,k);const j=xe(L);let Y=T.path(j,k);e.look!=="handDrawn"&&(R=F2(R),Y=F2(Y));const V=u.insert("g",":first-child");return V.insert(()=>R),V.insert(()=>Y),V.attr("class","basic label-container outer-path"),w&&e.look!=="handDrawn"&&V.selectAll("path").attr("style",w),i&&e.look!=="handDrawn"&&V.selectAll("path").attr("style",i),d.attr("transform",`translate(${-(h.width/2)-c-(h.x-(h.left??0))}, ${-(h.height/2)+c-(h.y-(h.top??0))})`),Pt(e,V),e.intersect=function(O){return Rt.polygon(e,E,O)},u}B(n8,"multiRect");async function a8(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await Kt(t,e,Qt(e)),c=e.padding??0,u=e.look==="neo"?16:c,h=e.look==="neo"?12:c;let d=!0;(e.width||e.height)&&(d=!1,e.width=((e==null?void 0:e.width)??0)-u*2,e.height=((e==null?void 0:e.height)??0)-h*3);const p=Math.max(s.width,(e==null?void 0:e.width)??0)+u*2,m=Math.max(s.height,(e==null?void 0:e.height)??0)+h*3,g=e.look==="neo"?m/4:m/8,x=m+(d?g/2:-g/2),v=-p/2,b=-x/2,w=10,{cssStyles:T}=e,k=os(v-w,b+x+w,v+p-w,b+x+w,g,.8),E=k==null?void 0:k[k.length-1],L=[{x:v-w,y:b+w},{x:v-w,y:b+x+w},...k,{x:v+p-w,y:E.y-w},{x:v+p,y:E.y-w},{x:v+p,y:E.y-2*w},{x:v+p+w,y:E.y-2*w},{x:v+p+w,y:b-w},{x:v+w,y:b-w},{x:v+w,y:b},{x:v,y:b},{x:v,y:b+w}],A=[{x:v,y:b+w},{x:v+p-w,y:b+w},{x:v+p-w,y:E.y-w},{x:v+p,y:E.y-w},{x:v+p,y:b},{x:v,y:b}],R=It.svg(n),j=qt(e,{});e.look!=="handDrawn"&&(j.roughness=0,j.fillStyle="solid");const Y=xe(L),V=R.path(Y,j),O=xe(A),z=R.path(O,j),X=n.insert(()=>V,":first-child");return X.insert(()=>z),X.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn"&&X.selectAll("path").attr("style",T),i&&e.look!=="handDrawn"&&X.selectAll("path").attr("style",i),X.attr("transform",`translate(0,${-g/2})`),o.attr("transform",`translate(${-(s.width/2)-w-(s.x-(s.left??0))}, ${-(s.height/2)+w-g/2-(s.y-(s.top??0))})`),Pt(e,X),e.intersect=function(M){return Rt.polygon(e,L,M)},n}B(a8,"multiWaveEdgedRectangle");async function s8(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=jt(e);e.labelStyle=i,e.useHtmlLabels||Jr(nr())||(e.centerLabel=!0);const{shapeSvg:o,bbox:c,label:u}=await Kt(t,e,Qt(e)),h=Math.max(c.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),d=Math.max(c.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),p=-h/2,m=-d/2,{cssStyles:g}=e,x=It.svg(o),v=qt(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const b=x.rectangle(p,m,h,d,v),w=o.insert(()=>b,":first-child");return w.attr("class","basic label-container outer-path"),u.attr("class","label noteLabel"),g&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",g),n&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",n),u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),Pt(e,w),e.intersect=function(T){return Rt.rect(e,T)},o}B(s8,"note");var dct=B((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function o8(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;const{shapeSvg:n,bbox:s}=await Kt(t,e,Qt(e)),o=s.width+(e.padding??0),c=s.height+(e.padding??0),u=o+c,h=.5,d=[{x:u/2,y:0},{x:u,y:-u/2},{x:u/2,y:-u},{x:0,y:-u/2}];let p;const{cssStyles:m}=e;if(e.look==="handDrawn"){const g=It.svg(n),x=qt(e,{}),v=dct(0,0,u),b=g.path(v,x);p=n.insert(()=>b,":first-child").attr("transform",`translate(${-u/2+h}, ${u/2})`),m&&p.attr("style",m)}else p=ba(n,u,u,d),p.attr("transform",`translate(${-u/2+h}, ${u/2})`);return i&&p.attr("style",i),Pt(e,p),e.calcIntersect=function(g,x){const v=g.width,b=[{x:v/2,y:0},{x:v,y:-v/2},{x:v/2,y:-v},{x:0,y:-v/2}],w=Rt.polygon(g,b,x);return{x:w.x-.5,y:w.y-.5}},e.intersect=function(g){return this.calcIntersect(e,g)},n}B(o8,"question");async function l8(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;const n=e.padding??0,s=e.look==="neo"?21:n??0,o=e.look==="neo"?12:n??0,{shapeSvg:c,bbox:u,label:h}=await Kt(t,e,Qt(e)),d=((e==null?void 0:e.width)??u.width)+(e.look==="neo"?s*2:s),p=((e==null?void 0:e.height)??u.height)+(e.look==="neo"?o*2:o),m=-d/2,g=-p/2,x=g/2,v=[{x:m+x,y:g},{x:m,y:0},{x:m+x,y:-g},{x:-m,y:-g},{x:-m,y:g}],{cssStyles:b}=e,w=It.svg(c),T=qt(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const k=xe(v),E=w.path(k,T),L=c.insert(()=>E,":first-child");return L.attr("class","basic label-container outer-path"),b&&e.look!=="handDrawn"&&L.selectAll("path").attr("style",b),i&&e.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${-x/2},0)`),h.attr("transform",`translate(${-x/2-u.width/2-(u.x-(u.left??0))}, ${-(u.height/2)-(u.y-(u.top??0))})`),Pt(e,L),e.intersect=function(A){return Rt.polygon(e,v,A)},c}B(l8,"rect_left_inv_arrow");async function c8(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;let n;e.cssClasses?n="node "+e.cssClasses:n="node default";const s=t.insert("g").attr("class",n).attr("id",e.domId||e.id),o=s.insert("g"),c=s.insert("g").attr("class","label").attr("style",i),u=e.description,h=e.label,d=await Ja(c,h,e.labelStyle,!0,!0);let p={width:0,height:0};if(Jr(_e())){const j=d.children[0],Y=Xt(d);p=j.getBoundingClientRect(),Y.attr("width",p.width),Y.attr("height",p.height)}St.info("Text 2",u);const m=u||[],g=d.getBBox(),x=await Ja(c,Array.isArray(m)?m.join("<br/>"):m,e.labelStyle,!0,!0),v=x.children[0],b=Xt(x);p=v.getBoundingClientRect(),b.attr("width",p.width),b.attr("height",p.height);const w=(e.padding||0)/2;Xt(x).attr("transform","translate( "+(p.width>g.width?0:(g.width-p.width)/2)+", "+(g.height+w+5)+")"),Xt(d).attr("transform","translate( "+(p.width<g.width?0:-(g.width-p.width)/2)+", 0)"),p=c.node().getBBox(),c.attr("transform","translate("+-p.width/2+", "+(-p.height/2-w+3)+")");const T=p.width+(e.padding||0),k=p.height+(e.padding||0),E=-p.width/2-w,L=-p.height/2-w;let A,R;if(e.look==="handDrawn"){const j=It.svg(s),Y=qt(e,{}),V=j.path(hs(E,L,T,k,e.rx||0),Y),O=j.line(-p.width/2-w,-p.height/2-w+g.height+w,p.width/2+w,-p.height/2-w+g.height+w,Y);R=s.insert(()=>(St.debug("Rough node insert CXC",V),O),":first-child"),A=s.insert(()=>(St.debug("Rough node insert CXC",V),V),":first-child")}else A=o.insert("rect",":first-child"),R=o.insert("line"),A.attr("class","outer title-state").attr("style",i).attr("x",-p.width/2-w).attr("y",-p.height/2-w).attr("width",p.width+(e.padding||0)).attr("height",p.height+(e.padding||0)),R.attr("class","divider").attr("x1",-p.width/2-w).attr("x2",p.width/2+w).attr("y1",-p.height/2-w+g.height+w).attr("y2",-p.height/2-w+g.height+w);return Pt(e,A),e.intersect=function(j){return Rt.rect(e,j)},s}B(c8,"rectWithTitle");async function u8(t,e,{config:{themeVariables:r}}){const i=(r==null?void 0:r.radius)??5,n={rx:i,ry:i,labelPaddingX:((e==null?void 0:e.padding)??0)*1,labelPaddingY:((e==null?void 0:e.padding)??0)*1};return ac(t,e,n)}B(u8,"roundedRect");var js=8;async function h8(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;const n=e.look==="neo"?16:e.padding??0,s=e.look==="neo"?12:e.padding??0,{shapeSvg:o,bbox:c,label:u}=await Kt(t,e,Qt(e)),h=((e==null?void 0:e.width)??c.width)+n*2+(e.look==="neo"?js:js*2),d=((e==null?void 0:e.height)??c.height)+s*2,p=h-js,m=d,g=js-h/2,x=-d/2,{cssStyles:v}=e,b=It.svg(o),w=qt(e,{});e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const T=[{x:g,y:x},{x:g+p,y:x},{x:g+p,y:x+m},{x:g-js,y:x+m},{x:g-js,y:x},{x:g,y:x},{x:g,y:x+m}],k=b.polygon(T.map(L=>[L.x,L.y]),w),E=o.insert(()=>k,":first-child");return E.attr("class","basic label-container outer-path").attr("style",Mr(v)),i&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",i),v&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",i),u.attr("transform",`translate(${js/2-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),Pt(e,E),e.intersect=function(L){return Rt.rect(e,L)},o}B(h8,"shadedProcess");async function d8(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;const n=e.padding??0,s=e.look==="neo"?16:n,o=e.look==="neo"?12:n;(e.width||e.height)&&(e.width=Math.max(((e==null?void 0:e.width)??0)-s*2,10),e.height=Math.max(((e==null?void 0:e.height)??0)/1.5-o*2,10));const{shapeSvg:c,bbox:u,label:h}=await Kt(t,e,Qt(e)),d=(e!=null&&e.width?e==null?void 0:e.width:u.width)+s*2,p=((e!=null&&e.height?e==null?void 0:e.height:u.height)+o*2)*1.5,m=d,g=p/1.5,x=-m/2,v=-g/2,{cssStyles:b}=e,w=It.svg(c),T=qt(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const k=[{x,y:v},{x,y:v+g},{x:x+m,y:v+g},{x:x+m,y:v-g/2}],E=xe(k),L=w.path(E,T),A=c.insert(()=>L,":first-child");return A.attr("class","basic label-container outer-path"),b&&e.look!=="handDrawn"&&A.selectChildren("path").attr("style",b),i&&e.look!=="handDrawn"&&A.selectChildren("path").attr("style",i),A.attr("transform",`translate(0, ${g/4})`),h.attr("transform",`translate(${-m/2+(e.padding??0)-(u.x-(u.left??0))}, ${-g/4+(e.padding??0)-(u.y-(u.top??0))})`),Pt(e,A),e.intersect=function(R){return Rt.polygon(e,k,R)},c}B(d8,"slopedRect");async function f8(t,e){const r=e.padding??0,i=e.look==="neo"?16:r*2,n=e.look==="neo"?12:r,s={rx:0,ry:0,labelPaddingX:e.labelPaddingX??i,labelPaddingY:n};return ac(t,e,s)}B(f8,"squareRect");async function p8(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;const n=e.padding??0,s=e.look==="neo"?20:n,o=e.look==="neo"?12:n,{shapeSvg:c,bbox:u}=await Kt(t,e,Qt(e)),h=u.height+(e.look==="neo"?o*2:o),d=u.width+h/4+(e.look==="neo"?s*2:s),p=h/2,{cssStyles:m}=e,g=It.svg(c),x=qt(e,{});e.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const v=[{x:-d/2+p,y:-h/2},{x:d/2-p,y:-h/2},...th(-d/2+p,0,p,50,90,270),{x:d/2-p,y:h/2},...th(d/2-p,0,p,50,270,450)],b=xe(v),w=g.path(b,x),T=c.insert(()=>w,":first-child");return T.attr("class","basic label-container outer-path"),m&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",m),i&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",i),Pt(e,T),e.intersect=function(k){return Rt.polygon(e,v,k)},c}B(p8,"stadium");async function g8(t,e){const r={rx:e.look==="neo"?3:5,ry:e.look==="neo"?3:5};return ac(t,e,r)}B(g8,"state");function m8(t,e,{config:{themeVariables:r}}){var T,k;const{labelStyles:i,nodeStyles:n}=jt(e);e.labelStyle=i;const{cssStyles:s}=e,{lineColor:o,stateBorder:c,nodeBorder:u,nodeShadow:h}=r;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const d=t.insert("g").attr("class","node default").attr("id",e.domId??e.id),p=It.svg(d),m=qt(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const g=p.circle(0,0,e.width,{...m,stroke:o,strokeWidth:2}),x=c??u,v=(e.width??0)*5/14,b=p.circle(0,0,v,{...m,fill:x,stroke:x,strokeWidth:2,fillStyle:"solid"}),w=d.insert(()=>g,":first-child");if(w.insert(()=>b),e.look!=="handDrawn"&&w.attr("class","outer-path"),s&&w.selectAll("path").attr("style",s),n&&w.selectAll("path").attr("style",n),e.width<25&&h&&e.look!=="handDrawn"){const E=((k=(T=t.node())==null?void 0:T.ownerSVGElement)==null?void 0:k.id)??"",L=E?`${E}-drop-shadow-small`:"drop-shadow-small";w.attr("style",`filter:url(#${L})`)}return Pt(e,w),e.intersect=function(E){return Rt.circle(e,(e.width??0)/2,E)},d}B(m8,"stateEnd");function y8(t,e,{config:{themeVariables:r}}){var c,u;const{lineColor:i,nodeShadow:n}=r;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const s=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let o;if(e.look==="handDrawn"){const d=It.svg(s).circle(0,0,e.width,Cot(i));o=s.insert(()=>d),o.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else o=s.insert("circle",":first-child"),o.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14);if(e.width<25&&n&&e.look!=="handDrawn"){const h=((u=(c=t.node())==null?void 0:c.ownerSVGElement)==null?void 0:u.id)??"",d=h?`${h}-drop-shadow-small`:"drop-shadow-small";o.attr("style",`filter:url(#${d})`)}return Pt(e,o),e.intersect=function(h){return Rt.circle(e,(e.width??7)/2,h)},s}B(y8,"stateStart");var nl=8;async function x8(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;const n=(e==null?void 0:e.padding)??8,s=e.look==="neo"?28:n,o=e.look==="neo"?12:n,{shapeSvg:c,bbox:u}=await Kt(t,e,Qt(e)),h=((e==null?void 0:e.width)??u.width)+2*nl+s,d=((e==null?void 0:e.height)??u.height)+o,p=h-2*nl,m=d,g=-h/2,x=-d/2,v=[{x:0,y:0},{x:p,y:0},{x:p,y:-m},{x:0,y:-m},{x:0,y:0},{x:-8,y:0},{x:p+8,y:0},{x:p+8,y:-m},{x:-8,y:-m},{x:-8,y:0}];if(e.look==="handDrawn"){const b=It.svg(c),w=qt(e,{}),T=b.rectangle(g,x,p+16,m,w),k=b.line(g+nl,x,g+nl,x+m,w),E=b.line(g+nl+p,x,g+nl+p,x+m,w);c.insert(()=>k,":first-child"),c.insert(()=>E,":first-child");const L=c.insert(()=>T,":first-child"),{cssStyles:A}=e;L.attr("class","basic label-container").attr("style",Mr(A)),Pt(e,L)}else{const b=ba(c,p,m,v);i&&b.attr("style",i),Pt(e,b)}return e.intersect=function(b){return Rt.polygon(e,v,b)},c}B(x8,"subroutine");var SC=.2;async function b8(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;const n=e.padding??0,s=e.look==="neo"?16:n,o=e.look==="neo"?12:n;(e.width||e.height)&&(e.height=Math.max(((e==null?void 0:e.height)??0)-o*2,10),e.width=Math.max(((e==null?void 0:e.width)??0)-s*2-SC*(e.height+o*2),10));const{shapeSvg:c,bbox:u}=await Kt(t,e,Qt(e)),h=(e!=null&&e.height?e==null?void 0:e.height:u.height)+o*2,d=SC*h,p=SC*h,g=(e!=null&&e.width?e==null?void 0:e.width:u.width)+s*2+d-d,x=h,v=-g/2,b=-x/2,{cssStyles:w}=e,T=It.svg(c),k=qt(e,{}),E=[{x:v-d/2,y:b},{x:v+g+d/2,y:b},{x:v+g+d/2,y:b+x},{x:v-d/2,y:b+x}],L=[{x:v+g-d/2,y:b+x},{x:v+g+d/2,y:b+x},{x:v+g+d/2,y:b+x-p}];e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const A=xe(E),R=T.path(A,k),j=xe(L),Y=T.path(j,{...k,fillStyle:"solid"}),V=c.insert(()=>Y,":first-child");return V.insert(()=>R,":first-child"),V.attr("class","basic label-container outer-path"),w&&e.look!=="handDrawn"&&V.selectAll("path").attr("style",w),i&&e.look!=="handDrawn"&&V.selectAll("path").attr("style",i),Pt(e,V),e.intersect=function(O){return Rt.polygon(e,E,O)},c}B(b8,"taggedRect");async function v8(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await Kt(t,e,Qt(e)),c=Math.max(s.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),u=Math.max(s.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),h=u/8,d=.2*c,p=.2*u,m=u+h,{cssStyles:g}=e,x=It.svg(n),v=qt(e,{});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const b=[{x:-c/2-c/2*.1,y:m/2},...os(-c/2-c/2*.1,m/2,c/2+c/2*.1,m/2,h,.8),{x:c/2+c/2*.1,y:-m/2},{x:-c/2-c/2*.1,y:-m/2}],w=-c/2+c/2*.1,T=-m/2-p*.4,k=[{x:w+c-d,y:(T+u)*1.3},{x:w+c,y:T+u-p},{x:w+c,y:(T+u)*.9},...os(w+c,(T+u)*1.25,w+c-d,(T+u)*1.3,-u*.02,.5)],E=xe(b),L=x.path(E,v),A=xe(k),R=x.path(A,{...v,fillStyle:"solid"}),j=n.insert(()=>R,":first-child");return j.insert(()=>L,":first-child"),j.attr("class","basic label-container outer-path"),g&&e.look!=="handDrawn"&&j.selectAll("path").attr("style",g),i&&e.look!=="handDrawn"&&j.selectAll("path").attr("style",i),j.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-c/2+(e.padding??0)-(s.x-(s.left??0))},${-u/2+(e.padding??0)-h/2-(s.y-(s.top??0))})`),Pt(e,j),e.intersect=function(Y){return Rt.polygon(e,b,Y)},n}B(v8,"taggedWaveEdgedRectangle");async function C8(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;const{shapeSvg:n,bbox:s}=await Kt(t,e,Qt(e)),o=Math.max(s.width+(e.padding??0),(e==null?void 0:e.width)||0),c=Math.max(s.height+(e.padding??0),(e==null?void 0:e.height)||0),u=-o/2,h=-c/2,d=n.insert("rect",":first-child");return d.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",u).attr("y",h).attr("width",o).attr("height",c),Pt(e,d),e.intersect=function(p){return Rt.rect(e,p)},n}B(C8,"text");var fct=B((t,e,r,i,n,s)=>`M${t},${e}
519
+ a${n},${s} 0,0,1 0,${-i}
520
+ l${r},0
521
+ a${n},${s} 0,0,1 0,${i}
522
+ M${r},${-i}
523
+ a${n},${s} 0,0,0 0,${i}
524
+ l${-r},0`,"createCylinderPathD"),pct=B((t,e,r,i,n,s)=>[`M${t},${e}`,`M${t+r},${e}`,`a${n},${s} 0,0,0 0,${-i}`,`l${-r},0`,`a${n},${s} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),gct=B((t,e,r,i,n,s)=>[`M${t+r/2},${-i/2}`,`a${n},${s} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),X4=5,Q4=10;async function w8(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;const n=e.padding??0,s=e.look==="neo"?12:n/2;if(e.width||e.height){const v=e.height??0;e.height=(e.height??0)-s,e.height<X4&&(e.height=X4);const w=v/2/(2.5+v/50);e.width=(e.width??0)-s-w*3,e.width<Q4&&(e.width=Q4)}const{shapeSvg:o,bbox:c,label:u}=await Kt(t,e,Qt(e)),h=(e.height?e.height:c.height)+s,d=h/2,p=d/(2.5+h/50),m=(e.width?e.width:c.width)+p+s,{cssStyles:g}=e;let x;if(e.look==="handDrawn"){const v=It.svg(o),b=pct(0,0,m,h,p,d),w=gct(0,0,m,h,p,d),T=v.path(b,qt(e,{})),k=v.path(w,qt(e,{fill:"none"}));x=o.insert(()=>k,":first-child"),x=o.insert(()=>T,":first-child"),x.attr("class","basic label-container"),g&&x.attr("style",g)}else{const v=fct(0,0,m,h,p,d);x=o.insert("path",":first-child").attr("d",v).attr("class","basic label-container").attr("style",Mr(g)).attr("style",i),x.attr("class","basic label-container outer-path"),g&&x.selectAll("path").attr("style",g),i&&x.selectAll("path").attr("style",i)}return x.attr("label-offset-x",p),x.attr("transform",`translate(${-m/2}, ${h/2} )`),u.attr("transform",`translate(${-(c.width/2)-p-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),Pt(e,x),e.intersect=function(v){const b=Rt.rect(e,v),w=b.y-(e.y??0);if(d!=0&&(Math.abs(w)<(e.height??0)/2||Math.abs(w)==(e.height??0)/2&&Math.abs(b.x-(e.x??0))>(e.width??0)/2-p)){let T=p*p*(1-w*w/(d*d));T!=0&&(T=Math.sqrt(Math.abs(T))),T=p-T,v.x-(e.x??0)>0&&(T=-T),b.x+=T}return b},o}B(w8,"tiltedCylinder");async function S8(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;const n=e.padding??0,s=(e.look==="neo",n),o=e.look==="neo"?n*2:n,{shapeSvg:c,bbox:u}=await Kt(t,e,Qt(e)),h=((e==null?void 0:e.height)??u.height)+s,d=((e==null?void 0:e.width)??u.width)+o,p=[{x:-3*h/6,y:0},{x:d+3*h/6,y:0},{x:d,y:-h},{x:0,y:-h}];let m;const{cssStyles:g}=e;if(e.look==="handDrawn"){const x=It.svg(c),v=qt(e,{}),b=xe(p),w=x.path(b,v);m=c.insert(()=>w,":first-child").attr("transform",`translate(${-d/2}, ${h/2})`),g&&m.attr("style",g)}else m=ba(c,d,h,p);return i&&m.attr("style",i),e.width=d,e.height=h,Pt(e,m),e.intersect=function(x){return Rt.polygon(e,p,x)},c}B(S8,"trapezoid");async function k8(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;const n=e.padding??0,s=e.look==="neo"?16:n,o=e.look==="neo"?12:n,c=15,u=5;(e.width||e.height)&&(e.height=(e.height??0)-o*2,e.height<u&&(e.height=u),e.width=(e.width??0)-s*2,e.width<c&&(e.width=c));const{shapeSvg:h,bbox:d}=await Kt(t,e,Qt(e)),p=(e!=null&&e.width?e==null?void 0:e.width:d.width)+s*2,m=(e!=null&&e.height?e==null?void 0:e.height:d.height)+o*2,{cssStyles:g}=e,x=It.svg(h),v=qt(e,{});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const b=[{x:-p/2*.8,y:-m/2},{x:p/2*.8,y:-m/2},{x:p/2,y:-m/2*.6},{x:p/2,y:m/2},{x:-p/2,y:m/2},{x:-p/2,y:-m/2*.6}],w=xe(b),T=x.path(w,v),k=h.insert(()=>T,":first-child");return k.attr("class","basic label-container outer-path"),g&&e.look!=="handDrawn"&&k.selectChildren("path").attr("style",g),i&&e.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),Pt(e,k),e.intersect=function(E){return Rt.polygon(e,b,E)},h}B(k8,"trapezoidalPentagon");var Z4=10,K4=10;async function _8(t,e){var E;const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;const n=e.padding??0,s=e.look==="neo"?n*2:n;(e.width||e.height)&&(e.width=(((e==null?void 0:e.width)??0)-s)/2,e.width<K4&&(e.width=K4),e.height=(e==null?void 0:e.height)??0,e.height<Z4&&(e.height=Z4));const{shapeSvg:o,bbox:c,label:u}=await Kt(t,e,Qt(e)),h=ya((E=_e().flowchart)==null?void 0:E.htmlLabels),d=(e!=null&&e.width?e==null?void 0:e.width:c.width)+s,p=e!=null&&e.height?e==null?void 0:e.height:d+c.height,m=p,g=[{x:0,y:0},{x:m,y:0},{x:m/2,y:-p}],{cssStyles:x}=e,v=It.svg(o),b=qt(e,{});e.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const w=xe(g),T=v.path(w,b),k=o.insert(()=>T,":first-child").attr("transform",`translate(${-p/2}, ${p/2})`).attr("class","outer-path");return x&&e.look!=="handDrawn"&&k.selectChildren("path").attr("style",x),i&&e.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),e.width=d,e.height=p,Pt(e,k),u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))}, ${p/2-(c.height+(e.padding??0)/(h?2:1)-(c.y-(c.top??0)))})`),e.intersect=function(L){return St.info("Triangle intersect",e,g,L),Rt.polygon(e,g,L)},o}B(_8,"triangle");async function T8(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;const n=e.padding??0,s=e.look==="neo"?16:n,o=e.look==="neo"?12:n;let c=!0;(e.width||e.height)&&(c=!1,e.width=((e==null?void 0:e.width)??0)-s*2,e.width<10&&(e.width=10),e.height=((e==null?void 0:e.height)??0)-o*2,e.height<10&&(e.height=10));const{shapeSvg:u,bbox:h,label:d}=await Kt(t,e,Qt(e)),p=(e!=null&&e.width?e==null?void 0:e.width:h.width)+(s??0)*2,m=(e!=null&&e.height?e==null?void 0:e.height:h.height)+(o??0)*2,g=e.look==="neo"?m/4:m/8,x=m+(c?g:-g),{cssStyles:v}=e,w=14-p,T=w>0?w/2:0,k=It.svg(u),E=qt(e,{});e.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const L=[{x:-p/2-T,y:x/2},...os(-p/2-T,x/2,p/2+T,x/2,g,.8),{x:p/2+T,y:-x/2},{x:-p/2-T,y:-x/2}],A=xe(L),R=k.path(A,E),j=u.insert(()=>R,":first-child");return j.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn"&&j.selectAll("path").attr("style",v),i&&e.look!=="handDrawn"&&j.selectAll("path").attr("style",i),j.attr("transform",`translate(0,${-g/2})`),d.attr("transform",`translate(${-p/2+(e.padding??0)-(h.x-(h.left??0))},${-m/2+(e.padding??0)-g-(h.y-(h.top??0))})`),Pt(e,j),e.intersect=function(Y){return Rt.polygon(e,L,Y)},u}B(T8,"waveEdgedRectangle");async function E8(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;const n=e.padding??0,s=e.look==="neo"?16:n,o=e.look==="neo"?20:n;if(e.width||e.height){e.width=(e==null?void 0:e.width)??0,e.width<20&&(e.width=20),e.height=(e==null?void 0:e.height)??0,e.height<10&&(e.height=10);const E=Math.min(e.height*.2,e.height/4);e.height=Math.ceil(e.height-o-E*(20/9)),e.width=e.width-s*2}const{shapeSvg:c,bbox:u}=await Kt(t,e,Qt(e)),h=(e!=null&&e.width?e==null?void 0:e.width:u.width)+s*2,d=(e!=null&&e.height?e==null?void 0:e.height:u.height)+o,p=d/8,m=d+p*2,{cssStyles:g}=e,x=It.svg(c),v=qt(e,{});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const b=[{x:-h/2,y:m/2},...os(-h/2,m/2,h/2,m/2,p,1),{x:h/2,y:-m/2},...os(h/2,-m/2,-h/2,-m/2,p,-1)],w=xe(b),T=x.path(w,v),k=c.insert(()=>T,":first-child");return k.attr("class","basic label-container"),g&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",g),i&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",i),Pt(e,k),e.intersect=function(E){return Rt.polygon(e,b,E)},c}B(E8,"waveRectangle");var ur=10;async function A8(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;const n=e.look==="neo"?16:e.padding??0,s=e.look==="neo"?12:e.padding??0;(e.width||e.height)&&(e.width=Math.max(((e==null?void 0:e.width)??0)-n*2-ur,10),e.height=Math.max(((e==null?void 0:e.height)??0)-s*2-ur,10));const{shapeSvg:o,bbox:c,label:u}=await Kt(t,e,Qt(e)),h=(e!=null&&e.width?e==null?void 0:e.width:c.width)+n*2+ur,d=(e!=null&&e.height?e==null?void 0:e.height:c.height)+s*2+ur,p=h-ur,m=d-ur,g=-p/2,x=-m/2,{cssStyles:v}=e,b=It.svg(o),w=qt(e,{}),T=[{x:g-ur,y:x-ur},{x:g-ur,y:x+m},{x:g+p,y:x+m},{x:g+p,y:x-ur}],k=`M${g-ur},${x-ur} L${g+p},${x-ur} L${g+p},${x+m} L${g-ur},${x+m} L${g-ur},${x-ur}
525
+ M${g-ur},${x} L${g+p},${x}
526
+ M${g},${x-ur} L${g},${x+m}`;e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const E=b.path(k,w),L=o.insert(()=>E,":first-child");return L.attr("transform",`translate(${ur/2}, ${ur/2})`),L.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn"&&L.selectAll("path").attr("style",v),i&&e.look!=="handDrawn"&&L.selectAll("path").attr("style",i),u.attr("transform",`translate(${-(c.width/2)+ur/2-(c.x-(c.left??0))}, ${-(c.height/2)+ur/2-(c.y-(c.top??0))})`),Pt(e,L),e.intersect=function(A){return Rt.polygon(e,T,A)},o}B(A8,"windowPane");var J4=new Set(["redux-color","redux-dark-color"]),mct=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function LS(t,e){var et,at,lt,xt;const r=e;r.alias&&(e.label=r.alias);const{theme:i,themeVariables:n}=nr(),{rowEven:s,rowOdd:o,nodeBorder:c,borderColorArray:u}=n;if(e.look==="handDrawn"){const{themeVariables:mt}=nr(),{background:bt}=mt,Tt={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${bt}`]};await LS(t,Tt)}const h=nr();e.useHtmlLabels=h.htmlLabels;let d=((et=h.er)==null?void 0:et.diagramPadding)??10,p=((at=h.er)==null?void 0:at.entityPadding)??6;const{cssStyles:m}=e,{labelStyles:g,nodeStyles:x}=jt(e);if(r.attributes.length===0&&e.label){const mt={rx:0,ry:0,labelPaddingX:d,labelPaddingY:d*1.5};fa(e.label,h)+mt.labelPaddingX*2<h.er.minEntityWidth&&(e.width=h.er.minEntityWidth);const bt=await ac(t,e,mt);if(i!=null&&J4.has(i)){const Tt=r.colorIndex??0;bt.attr("data-color-id",`color-${Tt%u.length}`)}if(!ya(h.htmlLabels)){const Tt=bt.select("text"),_t=(lt=Tt.node())==null?void 0:lt.getBBox();Tt.attr("transform",`translate(${-_t.width/2}, 0)`)}return bt}h.htmlLabels||(d*=1.25,p*=1.25);let v=Qt(e);v||(v="node default");const b=t.insert("g").attr("class",v).attr("id",e.domId||e.id),w=await ll(b,e.label??"",h,0,0,["name"],g);w.height+=p;let T=0;const k=[],E=[];let L=0,A=0,R=0,j=0,Y=!0,V=!0;for(const mt of r.attributes){const bt=await ll(b,mt.type,h,0,T,["attribute-type"],g);L=Math.max(L,bt.width+d);const Tt=await ll(b,mt.name,h,0,T,["attribute-name"],g);A=Math.max(A,Tt.width+d);const _t=await ll(b,mt.keys.join(),h,0,T,["attribute-keys"],g);R=Math.max(R,_t.width+d);const Mt=await ll(b,mt.comment,h,0,T,["attribute-comment"],g);j=Math.max(j,Mt.width+d);const Et=Math.max(bt.height,Tt.height,_t.height,Mt.height)+p;E.push({yOffset:T,rowHeight:Et}),T+=Et}let O=4;R<=d&&(Y=!1,R=0,O--),j<=d&&(V=!1,j=0,O--);const z=b.node().getBBox();if(w.width+d*2-(L+A+R+j)>0){const mt=w.width+d*2-(L+A+R+j);L+=mt/O,A+=mt/O,R>0&&(R+=mt/O),j>0&&(j+=mt/O)}const X=L+A+R+j,M=It.svg(b),I=qt(e,{});e.look!=="handDrawn"&&(I.roughness=0,I.fillStyle="solid");let N=0;E.length>0&&(N=E.reduce((mt,bt)=>mt+((bt==null?void 0:bt.rowHeight)??0),0));const P=Math.max(z.width+d*2,(e==null?void 0:e.width)||0,X),$=Math.max((N??0)+w.height,(e==null?void 0:e.height)||0),D=-P/2,q=-$/2;if(b.selectAll("g:not(:first-child)").each((mt,bt,Tt)=>{const _t=Xt(Tt[bt]),Mt=_t.attr("transform");let Et=0,Yt=0;if(Mt){const ve=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Mt);ve&&(Et=parseFloat(ve[1]),Yt=parseFloat(ve[2]),_t.attr("class").includes("attribute-name")?Et+=L:_t.attr("class").includes("attribute-keys")?Et+=L+A:_t.attr("class").includes("attribute-comment")&&(Et+=L+A+R))}_t.attr("transform",`translate(${D+d/2+Et}, ${Yt+q+w.height+p/2})`)}),b.select(".name").attr("transform","translate("+-w.width/2+", "+(q+p/2)+")"),i!=null&&J4.has(i)){const mt=r.colorIndex??0;b.attr("data-color-id",`color-${mt%u.length}`)}const G=M.rectangle(D,q,P,$,I),Z=b.insert(()=>G,":first-child").attr("class","outer-path").attr("style",m.join(""));k.push(0);for(const[mt,bt]of E.entries()){const _t=(mt+1)%2===0&&bt.yOffset!==0,Mt=M.rectangle(D,w.height+q+(bt==null?void 0:bt.yOffset),P,bt==null?void 0:bt.rowHeight,{...I,fill:_t?s:o,stroke:c});b.insert(()=>Mt,"g.label").attr("style",m.join("")).attr("class",`row-rect-${_t?"even":"odd"}`)}const H=1e-4;let Q=cl(D,w.height+q,P+D,w.height+q,H),J=M.polygon(Q.map(mt=>[mt.x,mt.y]),I);if(b.insert(()=>J).attr("class","divider"),Q=cl(L+D,w.height+q,L+D,$+q,H),J=M.polygon(Q.map(mt=>[mt.x,mt.y]),I),b.insert(()=>J).attr("class","divider"),Y){const mt=L+A+D;Q=cl(mt,w.height+q,mt,$+q,H),J=M.polygon(Q.map(bt=>[bt.x,bt.y]),I),b.insert(()=>J).attr("class","divider")}if(V){const mt=L+A+R+D;Q=cl(mt,w.height+q,mt,$+q,H),J=M.polygon(Q.map(bt=>[bt.x,bt.y]),I),b.insert(()=>J).attr("class","divider")}for(const mt of k){const bt=w.height+q+mt;Q=cl(D,bt,P+D,bt,H),J=M.polygon(Q.map(Tt=>[Tt.x,Tt.y]),I),b.insert(()=>J).attr("class","divider")}if(Pt(e,Z),x&&e.look!=="handDrawn")if(i!=null&&mct.has(i))b.selectAll("path").attr("style",x);else{const mt=x.split(";"),bt=(xt=mt==null?void 0:mt.filter(Tt=>Tt.includes("stroke")))==null?void 0:xt.map(Tt=>`${Tt}`).join("; ");b.selectAll("path").attr("style",bt??""),b.selectAll(".row-rect-even path").attr("style",x)}return e.intersect=function(mt){return Rt.rect(e,mt)},b}B(LS,"erBox");async function ll(t,e,r,i=0,n=0,s=[],o=""){const c=t.insert("g").attr("class",`label ${s.join(" ")}`).attr("transform",`translate(${i}, ${n})`).attr("style",o);e!==a4(e)&&(e=a4(e),e=e.replaceAll("<","&lt;").replaceAll(">","&gt;"));const u=c.node().appendChild(await xa(c,e,{width:fa(e,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(e.includes("&lt;")||e.includes("&gt;")){let d=u.children[0];for(d.textContent=d.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");d.childNodes[0];)d=d.childNodes[0],d.textContent=d.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let h=u.getBBox();if(ya(r.htmlLabels)){const d=u.children[0];d.style.textAlign="start";const p=Xt(u);h=d.getBoundingClientRect(),p.attr("width",h.width),p.attr("height",h.height)}return h}B(ll,"addText");function cl(t,e,r,i,n){return t===r?[{x:t-n/2,y:e},{x:t+n/2,y:e},{x:r+n/2,y:i},{x:r-n/2,y:i}]:[{x:t,y:e-n/2},{x:t,y:e+n/2},{x:r,y:i+n/2},{x:r,y:i-n/2}]}B(cl,"lineToPolygon");async function B8(t,e,r,i,n=r.class.padding??12){const s=i?0:3,o=t.insert("g").attr("class",Qt(e)).attr("id",e.domId||e.id);let c=null,u=null,h=null,d=null,p=0,m=0,g=0;if(c=o.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const T=e.annotations[0];await Su(c,{text:`«${T}»`},0),p=c.node().getBBox().height}u=o.insert("g").attr("class","label-group text"),await Su(u,e,0,["font-weight: bolder"]);const x=u.node().getBBox();m=x.height,h=o.insert("g").attr("class","members-group text");let v=0;for(const T of e.members){const k=await Su(h,T,v,[T.parseClassifier()]);v+=k+s}g=h.node().getBBox().height,g<=0&&(g=n/2),d=o.insert("g").attr("class","methods-group text");let b=0;for(const T of e.methods){const k=await Su(d,T,b,[T.parseClassifier()]);b+=k+s}let w=o.node().getBBox();if(c!==null){const T=c.node().getBBox();c.attr("transform",`translate(${-T.width/2})`)}return u.attr("transform",`translate(${-x.width/2}, ${p})`),w=o.node().getBBox(),h.attr("transform",`translate(0, ${p+m+n*2})`),w=o.node().getBBox(),d.attr("transform",`translate(0, ${p+m+(g?g+n*4:n*2)})`),w=o.node().getBBox(),{shapeSvg:o,bbox:w}}B(B8,"textHelper");async function Su(t,e,r,i=[]){const n=t.insert("g").attr("class","label").attr("style",i.join("; ")),s=nr();let o="useHtmlLabels"in e?e.useHtmlLabels:ya(s.htmlLabels)??!0,c="";"text"in e?c=e.text:c=e.label,!o&&c.startsWith("\\")&&(c=c.substring(1)),Xu(c)&&(o=!0);const u=await xa(n,Yw(no(c)),{width:fa(c,s)+50,classes:"markdown-node-label",useHtmlLabels:o},s);let h,d=1;if(o){const p=u.children[0],m=Xt(u);d=p.innerHTML.split("<br>").length,p.innerHTML.includes("</math>")&&(d+=p.innerHTML.split("<mrow>").length-1);const g=p.getElementsByTagName("img");if(g){const x=c.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...g].map(v=>new Promise(b=>{function w(){var T;if(v.style.display="flex",v.style.flexDirection="column",x){const k=((T=s.fontSize)==null?void 0:T.toString())??window.getComputedStyle(document.body).fontSize,L=parseInt(k,10)*5+"px";v.style.minWidth=L,v.style.maxWidth=L}else v.style.width="100%";b(v)}B(w,"setupImage"),setTimeout(()=>{v.complete&&w()}),v.addEventListener("error",w),v.addEventListener("load",w)})))}h=p.getBoundingClientRect(),m.attr("width",h.width),m.attr("height",h.height)}else{i.includes("font-weight: bolder")&&Xt(u).selectAll("tspan").attr("font-weight",""),d=u.children.length;const p=u.children[0];(u.textContent===""||u.textContent.includes("&gt"))&&(p.textContent=c[0]+c.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),c[1]===" "&&(p.textContent=p.textContent[0]+" "+p.textContent.substring(1))),p.textContent==="undefined"&&(p.textContent=""),h=u.getBBox()}return n.attr("transform","translate(0,"+(-h.height/(2*d)+r)+")"),h.height}B(Su,"addText");async function L8(t,e){var M,I;const r=_e(),{themeVariables:i}=r,{useGradient:n}=i,s=r.class.padding??12,o=s,c=e.useHtmlLabels??ya(r.htmlLabels)??!0,u=e;u.annotations=u.annotations??[],u.members=u.members??[],u.methods=u.methods??[];const{shapeSvg:h,bbox:d}=await B8(t,e,r,c,o),{labelStyles:p,nodeStyles:m}=jt(e);e.labelStyle=p,e.cssStyles=u.styles||"";const g=((M=u.styles)==null?void 0:M.join(";"))||m||"";e.cssStyles||(e.cssStyles=g.replaceAll("!important","").split(";"));const x=u.members.length===0&&u.methods.length===0&&!((I=r.class)!=null&&I.hideEmptyMembersBox),v=It.svg(h),b=qt(e,{});e.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const w=Math.max(e.width??0,d.width);let T=Math.max(e.height??0,d.height);const k=(e.height??0)>d.height;u.members.length===0&&u.methods.length===0?T+=o:u.members.length>0&&u.methods.length===0&&(T+=o*2);const E=-w/2,L=-T/2;let A=x?s*2:u.members.length===0&&u.methods.length===0?-s:0;k&&(A=s*2);const R=v.rectangle(E-s,L-s-(x?s:u.members.length===0&&u.methods.length===0?-s/2:0),w+2*s,T+2*s+A,b),j=h.insert(()=>R,":first-child");j.attr("class","basic label-container outer-path");const Y=j.node().getBBox(),V=h.select(".annotation-group").node().getBBox().height-(x?s/2:0)||0,O=h.select(".label-group").node().getBBox().height-(x?s/2:0)||0,z=h.select(".members-group").node().getBBox().height-(x?s/2:0)||0,X=(V+O+L+s-(L-s-(x?s:u.members.length===0&&u.methods.length===0?-s/2:0)))/2;if(h.selectAll(".text").each((N,P,$)=>{var Q,J;const D=Xt($[P]),q=D.attr("transform");let G=0;if(q){const at=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(q);at&&(G=parseFloat(at[2]))}let Z=G+L+s-(x?s:u.members.length===0&&u.methods.length===0?-s/2:0);if(D.attr("class").includes("methods-group")){const et=Math.max(z,o/2);k?Z=Math.max(X,V+O+et+L+o*2+s)+o*2:Z=V+O+et+L+o*4+s}u.members.length===0&&u.methods.length===0&&((Q=r.class)!=null&&Q.hideEmptyMembersBox)&&(u.annotations.length>0?Z=G-o:Z=G),c||(Z-=4);let H=E;(D.attr("class").includes("label-group")||D.attr("class").includes("annotation-group"))&&(H=-((J=D.node())==null?void 0:J.getBBox().width)/2||0,h.selectAll("text").each(function(et,at,lt){window.getComputedStyle(lt[at]).textAnchor==="middle"&&(H=0)})),D.attr("transform",`translate(${H}, ${Z})`)}),u.members.length>0||u.methods.length>0||x){const N=V+O+L+s,P=v.line(Y.x,N,Y.x+Y.width,N+.001,b);h.insert(()=>P).attr("class",`divider${e.look==="neo"&&!n?" neo-line":""}`).attr("style",g)}if(x||u.members.length>0||u.methods.length>0){const N=V+O+z+L+o*2+s,P=v.line(Y.x,k?Math.max(X,N):N,Y.x+Y.width,(k?Math.max(X,N):N)+.001,b);h.insert(()=>P).attr("class",`divider${e.look==="neo"&&!n?" neo-line":""}`).attr("style",g)}if(u.look!=="handDrawn"&&h.selectAll("path").attr("style",g),j.select(":nth-child(2)").attr("style",g),h.selectAll(".divider").select("path").attr("style",g),e.labelStyle?h.selectAll("span").attr("style",e.labelStyle):h.selectAll("span").attr("style",g),!c){const N=RegExp(/color\s*:\s*([^;]*)/),P=N.exec(g);if(P){const $=P[0].replace("color","fill");h.selectAll("tspan").attr("style",$)}else if(p){const $=N.exec(p);if($){const D=$[0].replace("color","fill");h.selectAll("tspan").attr("style",D)}}}return Pt(e,j),e.intersect=function(N){return Rt.rect(e,N)},h}B(L8,"classBox");async function M8(t,e){var Y,V;const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;const n=e,s=e,o=20,c=20,u="verifyMethod"in e,h=Qt(e),{themeVariables:d}=_e(),{borderColorArray:p,requirementEdgeLabelBackground:m}=d,g=t.insert("g").attr("class",h).attr("id",e.domId??e.id);let x;u?x=await _n(g,`&lt;&lt;${n.type}&gt;&gt;`,0,e.labelStyle):x=await _n(g,"&lt;&lt;Element&gt;&gt;",0,e.labelStyle);let v=x;const b=await _n(g,n.name,v,e.labelStyle+"; font-weight: bold;");if(v+=b+c,u){const O=await _n(g,`${n.requirementId?`ID: ${n.requirementId}`:""}`,v,e.labelStyle);v+=O;const z=await _n(g,`${n.text?`Text: ${n.text}`:""}`,v,e.labelStyle);v+=z;const X=await _n(g,`${n.risk?`Risk: ${n.risk}`:""}`,v,e.labelStyle);v+=X,await _n(g,`${n.verifyMethod?`Verification: ${n.verifyMethod}`:""}`,v,e.labelStyle)}else{const O=await _n(g,`${s.type?`Type: ${s.type}`:""}`,v,e.labelStyle);v+=O,await _n(g,`${s.docRef?`Doc Ref: ${s.docRef}`:""}`,v,e.labelStyle)}const w=(((Y=g.node())==null?void 0:Y.getBBox().width)??200)+o,T=(((V=g.node())==null?void 0:V.getBBox().height)??200)+o,k=-w/2,E=-T/2,L=It.svg(g),A=qt(e,{});e.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const R=L.rectangle(k,E,w,T,A),j=g.insert(()=>R,":first-child");if(j.attr("class","basic label-container outer-path").attr("style",i),p!=null&&p.length){const O=e.colorIndex??0;g.attr("data-color-id",`color-${O%p.length}`)}if(g.selectAll(".label").each((O,z,X)=>{const M=Xt(X[z]),I=M.attr("transform");let N=0,P=0;if(I){const G=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(I);G&&(N=parseFloat(G[1]),P=parseFloat(G[2]))}const $=P-T/2;let D=k+o/2;(z===0||z===1)&&(D=N),M.attr("transform",`translate(${D}, ${$+o})`)}),v>x+b+c){const O=E+x+b+c;let z;if(e.look==="neo"){const I=[[k,O],[k+w,O],[k+w,O+.001],[k,O+.001]];z=L.polygon(I,A)}else z=L.line(k,O,k+w,O,A);g.insert(()=>z).attr("class","divider")}return Pt(e,j),e.intersect=function(O){return Rt.rect(e,O)},i&&e.look!=="handDrawn"&&(m||p!=null&&p.length)&&g.selectAll("path").attr("style",i),g}B(M8,"requirementBox");async function _n(t,e,r,i=""){if(e==="")return 0;const n=t.insert("g").attr("class","label").attr("style",i),s=_e(),o=s.htmlLabels??!0,c=await xa(n,Yw(no(e)),{width:fa(e,s)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},s);let u;if(o){const h=c.children[0],d=Xt(c);u=h.getBoundingClientRect(),d.attr("width",u.width),d.attr("height",u.height)}else{const h=c.children[0];for(const d of h.children)i&&d.setAttribute("style",i);u=c.getBBox(),u.height+=6}return n.attr("transform",`translate(${-u.width/2},${-u.height/2+r})`),u.height}B(_n,"addText");var yct=B(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function N8(t,e,{config:r}){var z,X;const{labelStyles:i,nodeStyles:n}=jt(e);e.labelStyle=i||"";const s=10,o=e.width;e.width=(e.width??200)-10;const{shapeSvg:c,bbox:u,label:h}=await Kt(t,e,Qt(e)),d=e.padding||10;let p="",m;"ticket"in e&&e.ticket&&((z=r==null?void 0:r.kanban)!=null&&z.ticketBaseUrl)&&(p=(X=r==null?void 0:r.kanban)==null?void 0:X.ticketBaseUrl.replace("#TICKET#",e.ticket),m=c.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",p).attr("target","_blank"));const g={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let x,v;m?{label:x,bbox:v}=await wC(m,"ticket"in e&&e.ticket||"",g):{label:x,bbox:v}=await wC(c,"ticket"in e&&e.ticket||"",g);const{label:b,bbox:w}=await wC(c,"assigned"in e&&e.assigned||"",g);e.width=o;const T=10,k=(e==null?void 0:e.width)||0,E=Math.max(v.height,w.height)/2,L=Math.max(u.height+T*2,(e==null?void 0:e.height)||0)+E,A=-k/2,R=-L/2;h.attr("transform","translate("+(d-k/2)+", "+(-E-u.height/2)+")"),x.attr("transform","translate("+(d-k/2)+", "+(-E+u.height/2)+")"),b.attr("transform","translate("+(d+k/2-w.width-2*s)+", "+(-E+u.height/2)+")");let j;const{rx:Y,ry:V}=e,{cssStyles:O}=e;if(e.look==="handDrawn"){const M=It.svg(c),I=qt(e,{}),N=Y||V?M.path(hs(A,R,k,L,Y||0),I):M.rectangle(A,R,k,L,I);j=c.insert(()=>N,":first-child"),j.attr("class","basic label-container").attr("style",O||null)}else{j=c.insert("rect",":first-child"),j.attr("class","basic label-container __APA__").attr("style",n).attr("rx",Y??5).attr("ry",V??5).attr("x",A).attr("y",R).attr("width",k).attr("height",L);const M="priority"in e&&e.priority;if(M){const I=c.append("line"),N=A+2,P=R+Math.floor((Y??0)/2),$=R+L-Math.floor((Y??0)/2);I.attr("x1",N).attr("y1",P).attr("x2",N).attr("y2",$).attr("stroke-width","4").attr("stroke",yct(M))}}return Pt(e,j),e.height=L,e.intersect=function(M){return Rt.rect(e,M)},c}B(N8,"kanbanItem");async function O8(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;const{shapeSvg:n,bbox:s,halfPadding:o,label:c}=await Kt(t,e,Qt(e)),u=s.width+10*o,h=s.height+8*o,d=.15*u,{cssStyles:p}=e,m=s.width+20,g=s.height+20,x=Math.max(u,m),v=Math.max(h,g);c.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`);let b;const w=`M0 0
527
+ a${d},${d} 1 0,0 ${x*.25},${-1*v*.1}
528
+ a${d},${d} 1 0,0 ${x*.25},0
529
+ a${d},${d} 1 0,0 ${x*.25},0
530
+ a${d},${d} 1 0,0 ${x*.25},${v*.1}
531
+
532
+ a${d},${d} 1 0,0 ${x*.15},${v*.33}
533
+ a${d*.8},${d*.8} 1 0,0 0,${v*.34}
534
+ a${d},${d} 1 0,0 ${-1*x*.15},${v*.33}
535
+
536
+ a${d},${d} 1 0,0 ${-1*x*.25},${v*.15}
537
+ a${d},${d} 1 0,0 ${-1*x*.25},0
538
+ a${d},${d} 1 0,0 ${-1*x*.25},0
539
+ a${d},${d} 1 0,0 ${-1*x*.25},${-1*v*.15}
540
+
541
+ a${d},${d} 1 0,0 ${-1*x*.1},${-1*v*.33}
542
+ a${d*.8},${d*.8} 1 0,0 0,${-1*v*.34}
543
+ a${d},${d} 1 0,0 ${x*.1},${-1*v*.33}
544
+ H0 V0 Z`;if(e.look==="handDrawn"){const T=It.svg(n),k=qt(e,{}),E=T.path(w,k);b=n.insert(()=>E,":first-child"),b.attr("class","basic label-container").attr("style",Mr(p))}else b=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",w);return b.attr("transform",`translate(${-x/2}, ${-v/2})`),Pt(e,b),e.calcIntersect=function(T,k){return Rt.rect(T,k)},e.intersect=function(T){return St.info("Bang intersect",e,T),Rt.rect(e,T)},n}B(O8,"bang");async function R8(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;const{shapeSvg:n,bbox:s,halfPadding:o,label:c}=await Kt(t,e,Qt(e)),u=s.width+2*o,h=s.height+2*o,d=.15*u,p=.25*u,m=.35*u,g=.2*u,{cssStyles:x}=e;let v;const b=`M0 0
545
+ a${d},${d} 0 0,1 ${u*.25},${-1*u*.1}
546
+ a${m},${m} 1 0,1 ${u*.4},${-1*u*.1}
547
+ a${p},${p} 1 0,1 ${u*.35},${u*.2}
548
+
549
+ a${d},${d} 1 0,1 ${u*.15},${h*.35}
550
+ a${g},${g} 1 0,1 ${-1*u*.15},${h*.65}
551
+
552
+ a${p},${d} 1 0,1 ${-1*u*.25},${u*.15}
553
+ a${m},${m} 1 0,1 ${-1*u*.5},0
554
+ a${d},${d} 1 0,1 ${-1*u*.25},${-1*u*.15}
555
+
556
+ a${d},${d} 1 0,1 ${-1*u*.1},${-1*h*.35}
557
+ a${g},${g} 1 0,1 ${u*.1},${-1*h*.65}
558
+ H0 V0 Z`;if(e.look==="handDrawn"){const w=It.svg(n),T=qt(e,{}),k=w.path(b,T);v=n.insert(()=>k,":first-child"),v.attr("class","basic label-container").attr("style",Mr(x))}else v=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",b);return c.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),v.attr("transform",`translate(${-u/2}, ${-h/2})`),Pt(e,v),e.calcIntersect=function(w,T){return Rt.rect(w,T)},e.intersect=function(w){return St.info("Cloud intersect",e,w),Rt.rect(e,w)},n}B(R8,"cloud");async function D8(t,e){const{labelStyles:r,nodeStyles:i}=jt(e);e.labelStyle=r;const{shapeSvg:n,bbox:s,halfPadding:o,label:c}=await Kt(t,e,Qt(e)),u=s.width+8*o,h=s.height+2*o,d=5,p=e.look==="neo"?`
559
+ M${-u/2} ${h/2-d}
560
+ v${-h+2*d}
561
+ q0,-${d} ${d},-${d}
562
+ h${u-2*d}
563
+ q${d},0 ${d},${d}
564
+ v${h-d}
565
+ H${-u/2}
566
+ Z
567
+ `:`
568
+ M${-u/2} ${h/2-d}
569
+ v${-h+2*d}
570
+ q0,-${d} ${d},-${d}
571
+ h${u-2*d}
572
+ q${d},0 ${d},${d}
573
+ v${h-2*d}
574
+ q0,${d} ${-d},${d}
575
+ h${-(u-2*d)}
576
+ q${-d},0 ${-d},${-d}
577
+ Z
578
+ `;if(!e.domId)throw new Error(`defaultMindmapNode: node "${e.id}" is missing a domId — was render.ts domId prefixing skipped?`);const m=n.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",i).attr("d",p);return n.append("line").attr("class","node-line-").attr("x1",-u/2).attr("y1",h/2).attr("x2",u/2).attr("y2",h/2),c.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),n.append(()=>c.node()),Pt(e,m),e.calcIntersect=function(g,x){return Rt.rect(g,x)},e.intersect=function(g){return Rt.rect(e,g)},n}B(D8,"defaultMindmapNode");async function F8(t,e){const r={padding:e.padding??0};return BS(t,e,r)}B(F8,"mindmapCircle");var xct=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:f8},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:u8},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:p8},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:x8},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Fz},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Iz},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:BS},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:O8},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:R8},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:o8},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Uz},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:t8},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Jz},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:S8},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:Zz},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:zz},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:C8},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Az},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:h8},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:y8},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:m8},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Pz},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Gz},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Nz},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Oz},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Rz},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:e8},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:T8},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Hz},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:w8},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:r8},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Dz},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:qz},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:_8},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:A8},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:jz},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:k8},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:$z},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:d8},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:a8},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:n8},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Ez},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Mz},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:v8},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:b8},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:E8},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:l8},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:i8}],bct=B(()=>{const e=[...Object.entries({state:g8,choice:Bz,note:s8,rectWithTitle:c8,labelRect:Kz,iconSquare:Xz,iconCircle:Vz,icon:Yz,iconRounded:Wz,imageSquare:Qz,anchor:_z,kanbanItem:N8,mindmapCircle:F8,defaultMindmapNode:D8,classBox:L8,erBox:LS,requirementBox:M8}),...xct.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(n=>[n,r.handler]))];return Object.fromEntries(e)},"generateShapeMap"),I8=bct();function vct(t){return t in I8}B(vct,"isValidShape");var ig=new Map;async function q8(t,e,r){let i,n;e.shape==="rect"&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const s=e.shape?I8[e.shape]:void 0;if(!s)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let o;r.config.securityLevel==="sandbox"?o="_top":e.linkTarget&&(o=e.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",e.link).attr("target",o??null),n=await s(i,e,r)}else n=await s(t,e,r),i=n;return i.attr("data-look",Mr(e.look)),e.tooltip&&n.attr("title",e.tooltip),ig.set(e.id,i),e.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}B(q8,"insertNode");var rpt=B((t,e)=>{ig.set(e.id,t)},"setNodeElem"),ipt=B(()=>{ig.clear()},"clear"),npt=B(t=>{const e=ig.get(t.id);St.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=8,i=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+i-t.width/2)+", "+(t.y-t.height/2-r)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),i},"positionNode"),Cct=B((t,e,r,i,n,s=!1,o)=>{e.arrowTypeStart&&tO(t,"start",e.arrowTypeStart,r,i,n,s,o),e.arrowTypeEnd&&tO(t,"end",e.arrowTypeEnd,r,i,n,s,o)},"addEdgeMarkers"),wct={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},Sct=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],tO=B((t,e,r,i,n,s,o=!1,c)=>{var x;const u=wct[r],h=u&&Sct.includes(u.type);if(!u){St.warn(`Unknown arrow type: ${r}`);return}const d=u.type,g=`${n}_${s}-${d}${e==="start"?"Start":"End"}${o&&h?"-margin":""}`;if(c&&c.trim()!==""){const v=c.replace(/[^\dA-Za-z]/g,"_"),b=`${g}_${v}`;if(!document.getElementById(b)){const w=document.getElementById(g);if(w){const T=w.cloneNode(!0);T.id=b,T.querySelectorAll("path, circle, line").forEach(E=>{E.setAttribute("stroke",c),u.fill&&E.setAttribute("fill",c)}),(x=w.parentNode)==null||x.appendChild(T)}}t.attr(`marker-${e}`,`url(${i}#${b})`)}else t.attr(`marker-${e}`,`url(${i}#${g})`)},"addEdgeMarker"),kct=B(t=>{var e,r;return typeof t=="string"?t:(r=(e=_e())==null?void 0:e.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),up=new Map,zr=new Map,apt=B(()=>{up.clear(),zr.clear()},"clear"),fu=B(t=>t?typeof t=="string"?t:t.reduce((e,r)=>e+";"+r,""):"","getLabelStyles"),_ct=B(async(t,e)=>{const r=_e();let i=Jr(r);const{labelStyles:n}=jt(e);e.labelStyle=n;const s=t.insert("g").attr("class","edgeLabel"),o=s.insert("g").attr("class","label").attr("data-id",e.id),c=e.labelType==="markdown",h=await xa(t,e.label,{style:fu(e.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:c,width:c?void 0:void 0},r);o.node().appendChild(h),St.info("abc82",e,e.labelType);let d=h.getBBox(),p=d;if(i){const g=h.children[0],x=Xt(h);d=g.getBoundingClientRect(),p=d,x.attr("width",d.width),x.attr("height",d.height)}else{const g=Xt(h).select("text").node();g&&typeof g.getBBox=="function"&&(p=g.getBBox())}o.attr("transform",lu(p,i)),up.set(e.id,s),e.width=d.width,e.height=d.height;let m;if(e.startLabelLeft){const g=t.insert("g").attr("class","edgeTerminals"),x=g.insert("g").attr("class","inner"),v=await Ja(x,e.startLabelLeft,fu(e.labelStyle)||"",!1,!1);m=v;let b=v.getBBox();if(i){const w=v.children[0],T=Xt(v);b=w.getBoundingClientRect(),T.attr("width",b.width),T.attr("height",b.height)}x.attr("transform",lu(b,i)),zr.get(e.id)||zr.set(e.id,{}),zr.get(e.id).startLeft=g,ku(m,e.startLabelLeft)}if(e.startLabelRight){const g=t.insert("g").attr("class","edgeTerminals"),x=g.insert("g").attr("class","inner"),v=await Ja(x,e.startLabelRight,fu(e.labelStyle)||"",!1,!1);m=v;let b=v.getBBox();if(i){const w=v.children[0],T=Xt(v);b=w.getBoundingClientRect(),T.attr("width",b.width),T.attr("height",b.height)}x.attr("transform",lu(b,i)),zr.get(e.id)||zr.set(e.id,{}),zr.get(e.id).startRight=g,ku(m,e.startLabelRight)}if(e.endLabelLeft){const g=t.insert("g").attr("class","edgeTerminals"),x=g.insert("g").attr("class","inner"),v=await Ja(g,e.endLabelLeft,fu(e.labelStyle)||"",!1,!1);m=v;let b=v.getBBox();if(i){const w=v.children[0],T=Xt(v);b=w.getBoundingClientRect(),T.attr("width",b.width),T.attr("height",b.height)}x.attr("transform",lu(b,i)),zr.get(e.id)||zr.set(e.id,{}),zr.get(e.id).endLeft=g,ku(m,e.endLabelLeft)}if(e.endLabelRight){const g=t.insert("g").attr("class","edgeTerminals"),x=g.insert("g").attr("class","inner"),v=await Ja(g,e.endLabelRight,fu(e.labelStyle)||"",!1,!1);m=v;let b=v.getBBox();if(i){const w=v.children[0],T=Xt(v);b=w.getBoundingClientRect(),T.attr("width",b.width),T.attr("height",b.height)}x.attr("transform",lu(b,i)),zr.get(e.id)||zr.set(e.id,{}),zr.get(e.id).endRight=g,ku(m,e.endLabelRight)}return h},"insertEdgeLabel");function ku(t,e){Jr(_e())&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}B(ku,"setTerminalWidth");var Tct=B((t,e)=>{St.debug("Moving label abc88 ",t.id,t.label,up.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath;const i=_e(),{subGraphTitleTotalMargin:n}=mS(i);if(t.label){const s=up.get(t.id);let o=t.x,c=t.y;if(r){const u=an.calcLabelPosition(r);St.debug("Moving label "+t.label+" from (",o,",",c,") to (",u.x,",",u.y,") abc88"),e.updatedPath&&(o=u.x,c=u.y)}s.attr("transform",`translate(${o}, ${c+n/2})`)}if(t.startLabelLeft){const s=zr.get(t.id).startLeft;let o=t.x,c=t.y;if(r){const u=an.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);o=u.x,c=u.y}s.attr("transform",`translate(${o}, ${c})`)}if(t.startLabelRight){const s=zr.get(t.id).startRight;let o=t.x,c=t.y;if(r){const u=an.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);o=u.x,c=u.y}s.attr("transform",`translate(${o}, ${c})`)}if(t.endLabelLeft){const s=zr.get(t.id).endLeft;let o=t.x,c=t.y;if(r){const u=an.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);o=u.x,c=u.y}s.attr("transform",`translate(${o}, ${c})`)}if(t.endLabelRight){const s=zr.get(t.id).endRight;let o=t.x,c=t.y;if(r){const u=an.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);o=u.x,c=u.y}s.attr("transform",`translate(${o}, ${c})`)}},"positionEdgeLabel"),Ect=B((t,e)=>{const r=t.x,i=t.y,n=Math.abs(e.x-r),s=Math.abs(e.y-i),o=t.width/2,c=t.height/2;return n>=o||s>=c},"outsideNode"),Act=B((t,e,r)=>{St.debug(`intersection calc abc89:
579
+ outsidePoint: ${JSON.stringify(e)}
580
+ insidePoint : ${JSON.stringify(r)}
581
+ node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const i=t.x,n=t.y,s=Math.abs(i-r.x),o=t.width/2;let c=r.x<e.x?o-s:o+s;const u=t.height/2,h=Math.abs(e.y-r.y),d=Math.abs(e.x-r.x);if(Math.abs(n-e.y)*o>Math.abs(i-e.x)*u){let p=r.y<e.y?e.y-u-n:n-u-e.y;c=d*p/h;const m={x:r.x<e.x?r.x+c:r.x-d+c,y:r.y<e.y?r.y+h-p:r.y-h+p};return c===0&&(m.x=e.x,m.y=e.y),d===0&&(m.x=e.x),h===0&&(m.y=e.y),St.debug(`abc89 top/bottom calc, Q ${h}, q ${p}, R ${d}, r ${c}`,m),m}else{r.x<e.x?c=e.x-o-i:c=i-o-e.x;let p=h*c/d,m=r.x<e.x?r.x+d-c:r.x-d+c,g=r.y<e.y?r.y+p:r.y-p;return St.debug(`sides calc abc89, Q ${h}, q ${p}, R ${d}, r ${c}`,{_x:m,_y:g}),c===0&&(m=e.x,g=e.y),d===0&&(m=e.x),h===0&&(g=e.y),{x:m,y:g}}},"intersection"),eO=B((t,e)=>{St.warn("abc88 cutPathAtIntersect",t,e);let r=[],i=t[0],n=!1;return t.forEach(s=>{if(St.info("abc88 checking point",s,e),!Ect(e,s)&&!n){const o=Act(e,i,s);St.debug("abc88 inside",s,i,o),St.debug("abc88 intersection",o,e);let c=!1;r.forEach(u=>{c=c||u.x===o.x&&u.y===o.y}),r.some(u=>u.x===o.x&&u.y===o.y)?St.warn("abc88 no intersect",o,r):r.push(o),n=!0}else St.warn("abc88 outside",s,i),i=s,n||r.push(s)}),St.debug("returning points",r),r},"cutPathAtIntersect");function z8(t){const e=[],r=[];for(let i=1;i<t.length-1;i++){const n=t[i-1],s=t[i],o=t[i+1];(n.x===s.x&&s.y===o.y&&Math.abs(s.x-o.x)>5&&Math.abs(s.y-n.y)>5||n.y===s.y&&s.x===o.x&&Math.abs(s.x-n.x)>5&&Math.abs(s.y-o.y)>5)&&(e.push(s),r.push(i))}return{cornerPoints:e,cornerPointPositions:r}}B(z8,"extractCornerPoints");var rO=B(function(t,e,r){const i=e.x-t.x,n=e.y-t.y,s=Math.sqrt(i*i+n*n),o=r/s;return{x:e.x-o*i,y:e.y-o*n}},"findAdjacentPoint"),Bct=B(function(t){const{cornerPointPositions:e}=z8(t),r=[];for(let i=0;i<t.length;i++)if(e.includes(i)){const n=t[i-1],s=t[i+1],o=t[i],c=rO(n,o,5),u=rO(s,o,5),h=u.x-c.x,d=u.y-c.y;r.push(c);const p=Math.sqrt(2)*2;let m={x:o.x,y:o.y};if(Math.abs(s.x-n.x)>10&&Math.abs(s.y-n.y)>=10){St.debug("Corner point fixing",Math.abs(s.x-n.x),Math.abs(s.y-n.y));const g=5;o.x===c.x?m={x:h<0?c.x-g+p:c.x+g-p,y:d<0?c.y-p:c.y+p}:m={x:h<0?c.x-p:c.x+p,y:d<0?c.y-g+p:c.y+g-p}}else St.debug("Corner point skipping fixing",Math.abs(s.x-n.x),Math.abs(s.y-n.y));r.push(m,u)}else r.push(t[i]);return r},"fixCorners"),Lct=B((t,e,r)=>{const i=t-e-r,n=2,s=2,o=n+s,c=Math.floor(i/o),u=Array(c).fill(`${n} ${s}`).join(" ");return`0 ${e} ${u} ${r}`},"generateDashArray"),Mct=B(function(t,e,r,i,n,s,o,c=!1){var P;if(!o)throw new Error(`insertEdge: missing diagramId for edge "${e.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:u}=_e();let h=e.points,d=!1;const p=n;var m=s;const g=[];for(const $ in e.cssCompiledStyles)Iq($)||g.push(e.cssCompiledStyles[$]);St.debug("UIO intersect check",e.points,m.x,p.x),m.intersect&&p.intersect&&!c&&(h=h.slice(1,e.points.length-1),h.unshift(p.intersect(h[0])),St.debug("Last point UIO",e.start,"-->",e.end,h[h.length-1],m,m.intersect(h[h.length-1])),h.push(m.intersect(h[h.length-1])));const x=btoa(JSON.stringify(h));e.toCluster&&(St.info("to cluster abc88",r.get(e.toCluster)),h=eO(e.points,r.get(e.toCluster).node),d=!0),e.fromCluster&&(St.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(h,null,2)),h=eO(h.reverse(),r.get(e.fromCluster).node).reverse(),d=!0);let v=h.filter($=>!Number.isNaN($.y));const b=kct(e.curve);b!=="rounded"&&(v=Bct(v));let w=Ru;switch(b){case"linear":w=Ru;break;case"basis":w=c2;break;case"cardinal":w=kI;break;case"bumpX":w=bI;break;case"bumpY":w=vI;break;case"catmullRom":w=TI;break;case"monotoneX":w=NI;break;case"monotoneY":w=OI;break;case"natural":w=DI;break;case"step":w=FI;break;case"stepAfter":w=qI;break;case"stepBefore":w=II;break;case"rounded":w=Ru;break;default:w=c2}const{x:T,y:k}=_st(e),E=lat().x(T).y(k).curve(w);let L;switch(e.thickness){case"normal":L="edge-thickness-normal";break;case"thick":L="edge-thickness-thick";break;case"invisible":L="edge-thickness-invisible";break;default:L="edge-thickness-normal"}switch(e.pattern){case"solid":L+=" edge-pattern-solid";break;case"dotted":L+=" edge-pattern-dotted";break;case"dashed":L+=" edge-pattern-dashed";break;default:L+=" edge-pattern-solid"}let A,R=b==="rounded"?j8($8(v,e),5):E(v);const j=Array.isArray(e.style)?e.style:[e.style];let Y=j.find($=>$==null?void 0:$.startsWith("stroke:")),V="";e.animate&&(V="edge-animation-fast"),e.animation&&(V="edge-animation-"+e.animation);let O=!1;if(e.look==="handDrawn"){const $=It.svg(t);Object.assign([],v);const D=$.path(R,{roughness:.3,seed:u});L+=" transition",A=Xt(D).select("path").attr("id",`${o}-${e.id}`).attr("class"," "+L+(e.classes?" "+e.classes:"")+(V?" "+V:"")).attr("style",j?j.reduce((G,Z)=>G+";"+Z,""):"");let q=A.attr("d");A.attr("d",q),t.node().appendChild(A.node())}else{const $=g.join(";"),D=j?j.reduce((J,et)=>J+et+";",""):"",q=($?$+";"+D+";":D)+";"+(j?j.reduce((J,et)=>J+";"+et,""):"");A=t.append("path").attr("d",R).attr("id",`${o}-${e.id}`).attr("class"," "+L+(e.classes?" "+e.classes:"")+(V?" "+V:"")).attr("style",q),Y=(P=q.match(/stroke:([^;]+)/))==null?void 0:P[1],O=e.animate===!0||!!e.animation||$.includes("animation");const G=A.node(),Z=typeof G.getTotalLength=="function"?G.getTotalLength():0,H=m4[e.arrowTypeStart]||0,Q=m4[e.arrowTypeEnd]||0;if(e.look==="neo"&&!O){const et=`stroke-dasharray: ${e.pattern==="dotted"||e.pattern==="dashed"?Lct(Z,H,Q):`0 ${H} ${Z-H-Q} ${Q}`}; stroke-dashoffset: 0;`;A.attr("style",et+A.attr("style"))}}A.attr("data-edge",!0),A.attr("data-et","edge"),A.attr("data-id",e.id),A.attr("data-points",x),A.attr("data-look",Mr(e.look)),e.showPoints&&v.forEach($=>{t.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",$.x).attr("cy",$.y)});let z="";(_e().flowchart.arrowMarkerAbsolute||_e().state.arrowMarkerAbsolute)&&(z=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,z=z.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),St.info("arrowTypeStart",e.arrowTypeStart),St.info("arrowTypeEnd",e.arrowTypeEnd);const X=!O&&(e==null?void 0:e.look)==="neo";Cct(A,e,z,o,i,X,Y);const M=Math.floor(h.length/2),I=h[M];an.isLabelCoordinateInPath(I,A.attr("d"))||(d=!0);let N={};return d&&(N.updatedPath=h),N.originalPath=e.points,N},"insertEdge");function j8(t,e){if(t.length<2)return"";let r="";const i=t.length,n=1e-5;for(let s=0;s<i;s++){const o=t[s],c=t[s-1],u=t[s+1];if(s===0)r+=`M${o.x},${o.y}`;else if(s===i-1)r+=`L${o.x},${o.y}`;else{const h=o.x-c.x,d=o.y-c.y,p=u.x-o.x,m=u.y-o.y,g=Math.hypot(h,d),x=Math.hypot(p,m);if(g<n||x<n){r+=`L${o.x},${o.y}`;continue}const v=h/g,b=d/g,w=p/x,T=m/x,k=v*w+b*T,E=Math.max(-1,Math.min(1,k)),L=Math.acos(E);if(L<n||Math.abs(Math.PI-L)<n){r+=`L${o.x},${o.y}`;continue}const A=Math.min(e/Math.sin(L/2),g/2,x/2),R=o.x-v*A,j=o.y-b*A,Y=o.x+w*A,V=o.y+T*A;r+=`L${R},${j}`,r+=`Q${o.x},${o.y} ${Y},${V}`}}return r}B(j8,"generateRoundedPath");function z2(t,e){if(!t||!e)return{angle:0,deltaX:0,deltaY:0};const r=e.x-t.x,i=e.y-t.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}B(z2,"calculateDeltaAndAngle");function $8(t,e){const r=t.map(n=>({...n}));if(t.length>=2&&Pr[e.arrowTypeStart]){const n=Pr[e.arrowTypeStart],s=t[0],o=t[1],{angle:c}=z2(s,o),u=n*Math.cos(c),h=n*Math.sin(c);r[0].x=s.x+u,r[0].y=s.y+h}const i=t.length;if(i>=2&&Pr[e.arrowTypeEnd]){const n=Pr[e.arrowTypeEnd],s=t[i-1],o=t[i-2],{angle:c}=z2(o,s),u=n*Math.cos(c),h=n*Math.sin(c);r[i-1].x=s.x-u,r[i-1].y=s.y-h}return r}B($8,"applyMarkerOffsetsToPoints");var Nct=B((t,e,r,i)=>{e.forEach(n=>{eut[n](t,r,i)})},"insertMarkers"),Oct=B((t,e,r)=>{St.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),t.append("marker").attr("id",r+"_"+e+"-extensionStart-margin").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd-margin").attr("class","marker extension "+e).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),Rct=B((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart-margin").attr("class","marker composition "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd-margin").attr("class","marker composition "+e).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Dct=B((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart-margin").attr("class","marker aggregation "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd-margin").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Fct=B((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart-margin").attr("class","marker dependency "+e).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd-margin").attr("class","marker dependency "+e).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),Ict=B((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart-margin").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd-margin").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),qct=B((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),zct=B((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),jct=B((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossEnd-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),t.append("marker").attr("id",r+"_"+e+"-crossStart-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),$ct=B((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),Pct=B((t,e,r)=>{const i=nr(),{themeVariables:n}=i,{transitionColor:s}=n;t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${s}`)},"barbNeo"),Hct=B((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),Uct=B((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),Gct=B((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),Yct=B((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),Vct=B((t,e,r)=>{const i=nr(),{themeVariables:n}=i,{strokeWidth:s}=n;t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${s}`),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${s}`)},"only_one_neo"),Wct=B((t,e,r)=>{const i=nr(),{themeVariables:n}=i,{strokeWidth:s,mainBkg:o}=n,c=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");c.append("circle").attr("fill",o??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${s}`).attr("r",6),c.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${s}`);const u=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");u.append("circle").attr("fill",o??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${s}`).attr("r",6),u.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${s}`)},"zero_or_one_neo"),Xct=B((t,e,r)=>{const i=nr(),{themeVariables:n}=i,{strokeWidth:s}=n;t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${s}`),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${s}`)},"one_or_more_neo"),Qct=B((t,e,r)=>{const i=nr(),{themeVariables:n}=i,{strokeWidth:s,mainBkg:o}=n,c=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");c.append("circle").attr("fill",o??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${s}`),c.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${s}`);const u=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");u.append("circle").attr("fill",o??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${s}`),u.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${s}`)},"zero_or_more_neo"),Zct=B((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
582
+ L20,10
583
+ M20,10
584
+ L0,20`)},"requirement_arrow"),Kct=B((t,e,r)=>{const i=nr(),{themeVariables:n}=i,{strokeWidth:s}=n;t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${s}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
585
+ L20,10
586
+ M20,10
587
+ L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),Jct=B((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),tut=B((t,e,r)=>{const i=nr(),{themeVariables:n}=i,{strokeWidth:s}=n,o=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");o.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),o.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),o.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),o.selectAll("*").attr("stroke-width",`${s}`)},"requirement_contains_neo"),eut={extension:Oct,composition:Rct,aggregation:Dct,dependency:Fct,lollipop:Ict,point:qct,circle:zct,cross:jct,barb:$ct,barbNeo:Pct,only_one:Hct,zero_or_one:Uct,one_or_more:Gct,zero_or_more:Yct,only_one_neo:Vct,zero_or_one_neo:Wct,one_or_more_neo:Xct,zero_or_more_neo:Qct,requirement_arrow:Zct,requirement_contains:Jct,requirement_arrow_neo:Kct,requirement_contains_neo:tut},rut=Nct,iut={common:xh,getConfig:nr,insertCluster:tct,insertEdge:Mct,insertEdgeLabel:_ct,insertMarkers:rut,insertNode:q8,interpolateToCurve:uS,labelHelper:Kt,log:St,positionEdgeLabel:Tct},eh={},P8=B(t=>{for(const e of t)eh[e.name]=e},"registerLayoutLoaders"),nut=B(()=>{P8([{name:"dagre",loader:B(async()=>await be(()=>import("./dagre-BM42HDAG-CN_B2Doz.js"),__vite__mapDeps([0,1,2])),"loader")},{name:"cose-bilkent",loader:B(async()=>await be(()=>import("./cose-bilkent-S5V4N54A-h_A3nZUx.js"),__vite__mapDeps([3,4])),"loader")}])},"registerDefaultLayoutLoaders");nut();var spt=B(async(t,e)=>{if(!(t.layoutAlgorithm in eh))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);if(t.diagramId)for(const d of t.nodes){const p=d.domId||d.id;d.domId=`${t.diagramId}-${p}`}const r=eh[t.layoutAlgorithm],i=await r.loader(),{theme:n,themeVariables:s}=t.config,{useGradient:o,gradientStart:c,gradientStop:u}=s,h=e.attr("id");if(e.append("defs").append("filter").attr("id",`${h}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${n!=null&&n.includes("dark")?"#FFFFFF":"#000000"}`),e.append("defs").append("filter").attr("id",`${h}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${n!=null&&n.includes("dark")?"#FFFFFF":"#000000"}`),o){const d=e.append("linearGradient").attr("id",e.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");d.append("svg:stop").attr("offset","0%").attr("stop-color",c).attr("stop-opacity",1),d.append("svg:stop").attr("offset","100%").attr("stop-color",u).attr("stop-opacity",1)}return i.render(t,e,iut,{algorithm:r.algorithm})},"render"),opt=B((t="",{fallback:e="dagre"}={})=>{if(t in eh)return t;if(e in eh)return St.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm"),MS="comm",H8="rule",U8="decl",aut="@media",sut="@import",out="@supports",lut="@namespace",j2="@keyframes",G8="@layer",cut="@scope",uut=Math.abs,Fu=String.fromCharCode;function Y8(t){return t.trim()}function $2(t,e,r){return t.replace(e,r)}function vl(t,e){return t.charCodeAt(e)|0}function Yl(t,e,r){return t.slice(e,r)}function En(t){return t.length}function V8(t){return t.length}function sf(t,e){return e.push(t),t}var ng=1,Vl=1,W8=0,Ui=0,Cr=0,sc="";function NS(t,e,r,i,n,s,o,c){return{value:t,root:e,parent:r,type:i,props:n,children:s,line:ng,column:Vl,length:o,return:"",siblings:c}}function hut(){return Cr}function dut(){return Cr=Ui>0?vl(sc,--Ui):0,Vl--,Cr===10&&(Vl=1,ng--),Cr}function cn(){return Cr=Ui<W8?vl(sc,Ui++):0,Vl++,Cr===10&&(Vl=1,ng++),Cr}function ts(){return vl(sc,Ui)}function kf(){return Ui}function ag(t,e){return Yl(sc,t,e)}function rh(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function fut(t){return ng=Vl=1,W8=En(sc=t),Ui=0,[]}function put(t){return sc="",t}function kC(t){return Y8(ag(Ui-1,P2(t===91?t+2:t===40?t+1:t)))}function gut(t){for(;(Cr=ts())&&Cr<33;)cn();return rh(t)>2||rh(Cr)>3?"":" "}function mut(t,e){for(;--e&&cn()&&!(Cr<48||Cr>102||Cr>57&&Cr<65||Cr>70&&Cr<97););return ag(t,kf()+(e<6&&ts()==32&&cn()==32))}function P2(t){for(;cn();)switch(Cr){case t:return Ui;case 34:case 39:t!==34&&t!==39&&P2(Cr);break;case 40:t===41&&P2(t);break;case 92:cn();break}return Ui}function yut(t,e){for(;cn()&&t+Cr!==57;)if(t+Cr===84&&ts()===47)break;return"/*"+ag(e,Ui-1)+"*"+Fu(t===47?t:cn())}function xut(t){for(;!rh(ts());)cn();return ag(t,Ui)}function but(t){return put(_f("",null,null,null,[""],t=fut(t),0,[0],t))}function _f(t,e,r,i,n,s,o,c,u){for(var h=0,d=0,p=o,m=0,g=0,x=0,v=1,b=1,w=1,T=0,k=0,E="",L=n,A=s,R=i,j=E;b;)switch(x=k,k=cn()){case 40:x!=108&&vl(j,p-1)==58?(T++,j+="("):j+=kC(k);break;case 41:T--,j+=")";break;case 34:case 39:case 91:j+=kC(k);break;case 9:case 10:case 13:case 32:if(T>0){j+=Fu(k);break}j+=gut(x);break;case 92:j+=mut(kf()-1,7);continue;case 47:switch(ts()){case 42:case 47:sf(vut(yut(cn(),kf()),e,r,u),u),(rh(x||1)==5||rh(ts()||1)==5)&&En(j)&&Yl(j,-1,void 0)!==" "&&(j+=" ");break;default:j+="/"}break;case 123*v:c[h++]=En(j)*w;case 125*v:case 59:case 0:if(T>0&&k){j+=Fu(k);break}switch(k){case 0:case 125:b=0;case 59+d:w==-1&&(j=$2(j,/\f/g,"")),g>0&&(En(j)-p||v===0)&&sf(g>32?nO(j+";",i,r,p-1,u):nO($2(j," ","")+";",i,r,p-2,u),u);break;case 59:j+=";";default:if(sf(R=iO(j,e,r,h,d,n,c,E,L=[],A=[],p,s),s),k===123)if(d===0)_f(j,e,R,R,L,s,p,c,A);else{switch(m){case 99:if(vl(j,3)===110)break;case 108:if(vl(j,2)===97)break;default:d=0;case 100:case 109:case 115:}d?_f(t,R,R,i&&sf(iO(t,R,R,0,0,n,c,E,n,L=[],p,A),A),n,A,p,c,i?L:A):_f(j,R,R,R,[""],A,0,c,A)}}h=d=g=0,v=w=1,E=j="",p=o;break;case 58:p=1+En(j),g=x;default:if(v<1){if(k==123)--v;else if(k==125&&v++==0&&dut()==125)continue}switch(j+=Fu(k),k*v){case 38:w=d>0?1:(j+="\f",-1);break;case 44:if(T>0)break;c[h++]=(En(j)-1)*w,w=1;break;case 64:ts()===45&&(j+=kC(cn())),m=ts(),d=p=En(E=j+=xut(kf())),k++;break;case 45:x===45&&En(j)==2&&(v=0)}}return s}function iO(t,e,r,i,n,s,o,c,u,h,d,p){for(var m=n-1,g=n===0?s:[""],x=V8(g),v=0,b=0,w=0;v<i;++v)for(var T=0,k=Yl(t,m+1,m=uut(b=o[v])),E=t;T<x;++T)(E=Y8(b>0?g[T]+" "+k:$2(k,/&\f/g,g[T])))&&(u[w++]=E);return NS(t,e,r,n===0?H8:c,u,h,d,p)}function vut(t,e,r,i){return NS(t,e,r,MS,Fu(hut()),Yl(t,2,-2),0,i)}function nO(t,e,r,i,n){return NS(t,e,r,U8,Yl(t,0,i),Yl(t,i+1,-1),i,n)}function H2(t,e){for(var r="",i=0;i<t.length;i++)r+=e(t[i],i,t,e)||"";return r}function Cut(t,e,r,i){switch(t.type){case G8:if(t.children.length)break;case sut:case lut:case U8:return t.return=t.return||t.value;case MS:return"";case j2:return t.return=t.value+"{"+H2(t.children,i)+"}";case H8:if(!En(t.value=t.props.join(",")))return""}return En(r=H2(t.children,i))?t.return=t.value+"{"+r+"}":""}function wut(t){var e=V8(t);return function(r,i,n,s){for(var o="",c=0;c<e;c++)o+=t[c](r,i,n,s)||"";return o}}var X8="c4",Sut=B(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),kut=B(async()=>{const{diagram:t}=await be(async()=>{const{diagram:e}=await import("./c4Diagram-AAUBKEIU-DqYDW5c3.js");return{diagram:e}},__vite__mapDeps([5,6]));return{id:X8,diagram:t}},"loader"),_ut={id:X8,detector:Sut,loader:kut},Tut=_ut,Q8="flowchart",Eut=B((t,e)=>{var r,i;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(t)},"detector"),Aut=B(async()=>{const{diagram:t}=await be(async()=>{const{diagram:e}=await import("./flowDiagram-I6XJVG4X-Bq_to3hX.js");return{diagram:e}},__vite__mapDeps([7,8,6,9,10,11]));return{id:Q8,diagram:t}},"loader"),But={id:Q8,detector:Eut,loader:Aut},Lut=But,Z8="flowchart-v2",Mut=B((t,e)=>{var r,i,n;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(e.layout="elk"),/^\s*graph/.test(t)&&((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(t))},"detector"),Nut=B(async()=>{const{diagram:t}=await be(async()=>{const{diagram:e}=await import("./flowDiagram-I6XJVG4X-Bq_to3hX.js");return{diagram:e}},__vite__mapDeps([7,8,6,9,10,11]));return{id:Z8,diagram:t}},"loader"),Out={id:Z8,detector:Mut,loader:Nut},Rut=Out,K8="er",Dut=B(t=>/^\s*erDiagram/.test(t),"detector"),Fut=B(async()=>{const{diagram:t}=await be(async()=>{const{diagram:e}=await import("./erDiagram-TEJ5UH35-6Xkza9wL.js");return{diagram:e}},__vite__mapDeps([12,9,10,11]));return{id:K8,diagram:t}},"loader"),Iut={id:K8,detector:Dut,loader:Fut},qut=Iut,J8="gitGraph",zut=B(t=>/^\s*gitGraph/.test(t),"detector"),jut=B(async()=>{const{diagram:t}=await be(async()=>{const{diagram:e}=await import("./gitGraphDiagram-PVQCEYII-C93LTfrl.js");return{diagram:e}},__vite__mapDeps([13,14,15,16]));return{id:J8,diagram:t}},"loader"),$ut={id:J8,detector:zut,loader:jut},Put=$ut,tj="gantt",Hut=B(t=>/^\s*gantt/.test(t),"detector"),Uut=B(async()=>{const{diagram:t}=await be(async()=>{const{diagram:e}=await import("./ganttDiagram-6RSMTGT7-C3CmvYl7.js");return{diagram:e}},__vite__mapDeps([17,18,19,20]));return{id:tj,diagram:t}},"loader"),Gut={id:tj,detector:Hut,loader:Uut},Yut=Gut,ej="info",Vut=B(t=>/^\s*info/.test(t),"detector"),Wut=B(async()=>{const{diagram:t}=await be(async()=>{const{diagram:e}=await import("./infoDiagram-5YYISTIA-CMfuwygl.js");return{diagram:e}},__vite__mapDeps([21,16]));return{id:ej,diagram:t}},"loader"),Xut={id:ej,detector:Vut,loader:Wut},rj="pie",Qut=B(t=>/^\s*pie/.test(t),"detector"),Zut=B(async()=>{const{diagram:t}=await be(async()=>{const{diagram:e}=await import("./pieDiagram-4H26LBE5-CSCTSOjk.js");return{diagram:e}},__vite__mapDeps([22,14,16,23,24,19]));return{id:rj,diagram:t}},"loader"),Kut={id:rj,detector:Qut,loader:Zut},ij="quadrantChart",Jut=B(t=>/^\s*quadrantChart/.test(t),"detector"),tht=B(async()=>{const{diagram:t}=await be(async()=>{const{diagram:e}=await import("./quadrantDiagram-W4KKPZXB-CQQ9OaFY.js");return{diagram:e}},__vite__mapDeps([25,18,19,20]));return{id:ij,diagram:t}},"loader"),eht={id:ij,detector:Jut,loader:tht},rht=eht,nj="xychart",iht=B(t=>/^\s*xychart(-beta)?/.test(t),"detector"),nht=B(async()=>{const{diagram:t}=await be(async()=>{const{diagram:e}=await import("./xychartDiagram-2RQKCTM6-zsDMbUiS.js");return{diagram:e}},__vite__mapDeps([26,19,24,18,20]));return{id:nj,diagram:t}},"loader"),aht={id:nj,detector:iht,loader:nht},sht=aht,aj="requirement",oht=B(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),lht=B(async()=>{const{diagram:t}=await be(async()=>{const{diagram:e}=await import("./requirementDiagram-4Y6WPE33-Cjn3la_S.js");return{diagram:e}},__vite__mapDeps([27,9,10]));return{id:aj,diagram:t}},"loader"),cht={id:aj,detector:oht,loader:lht},uht=cht,sj="sequence",hht=B(t=>/^\s*sequenceDiagram/.test(t),"detector"),dht=B(async()=>{const{diagram:t}=await be(async()=>{const{diagram:e}=await import("./sequenceDiagram-3UESZ5HK-UsoGmL4w.js");return{diagram:e}},__vite__mapDeps([28,6,15]));return{id:sj,diagram:t}},"loader"),fht={id:sj,detector:hht,loader:dht},pht=fht,oj="class",ght=B((t,e)=>{var r;return((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(t)},"detector"),mht=B(async()=>{const{diagram:t}=await be(async()=>{const{diagram:e}=await import("./classDiagram-4FO5ZUOK-Bgm-_cW8.js");return{diagram:e}},__vite__mapDeps([29,30,8,6,9,10]));return{id:oj,diagram:t}},"loader"),yht={id:oj,detector:ght,loader:mht},xht=yht,lj="classDiagram",bht=B((t,e)=>{var r;return/^\s*classDiagram/.test(t)&&((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(t)},"detector"),vht=B(async()=>{const{diagram:t}=await be(async()=>{const{diagram:e}=await import("./classDiagram-v2-Q7XG4LA2-Bgm-_cW8.js");return{diagram:e}},__vite__mapDeps([31,30,8,6,9,10]));return{id:lj,diagram:t}},"loader"),Cht={id:lj,detector:bht,loader:vht},wht=Cht,cj="state",Sht=B((t,e)=>{var r;return((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(t)},"detector"),kht=B(async()=>{const{diagram:t}=await be(async()=>{const{diagram:e}=await import("./stateDiagram-AJRCARHV-DLmf7Dc8.js");return{diagram:e}},__vite__mapDeps([32,33,9,10,1,2]));return{id:cj,diagram:t}},"loader"),_ht={id:cj,detector:Sht,loader:kht},Tht=_ht,uj="stateDiagram",Eht=B((t,e)=>{var r;return!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),Aht=B(async()=>{const{diagram:t}=await be(async()=>{const{diagram:e}=await import("./stateDiagram-v2-BHNVJYJU-jkiDZ_3u.js");return{diagram:e}},__vite__mapDeps([34,33,9,10]));return{id:uj,diagram:t}},"loader"),Bht={id:uj,detector:Eht,loader:Aht},Lht=Bht,hj="journey",Mht=B(t=>/^\s*journey/.test(t),"detector"),Nht=B(async()=>{const{diagram:t}=await be(async()=>{const{diagram:e}=await import("./journeyDiagram-JHISSGLW-C_Xz8YyT.js");return{diagram:e}},__vite__mapDeps([35,8,6,23]));return{id:hj,diagram:t}},"loader"),Oht={id:hj,detector:Mht,loader:Nht},Rht=Oht,Dht=B((t,e,r)=>{St.debug(`rendering svg for syntax error
588
+ `);const i=yat(e),n=i.append("g");i.attr("viewBox","0 0 2412 512"),pI(i,100,512,!0),n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),dj={draw:Dht},Fht=dj,Iht={db:{},renderer:dj,parser:{parse:B(()=>{},"parse")}},qht=Iht,fj="flowchart-elk",zht=B((t,e={})=>{var r;return/^\s*flowchart-elk/.test(t)||/^\s*(flowchart|graph)/.test(t)&&((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(e.layout="elk",!0):!1},"detector"),jht=B(async()=>{const{diagram:t}=await be(async()=>{const{diagram:e}=await import("./flowDiagram-I6XJVG4X-Bq_to3hX.js");return{diagram:e}},__vite__mapDeps([7,8,6,9,10,11]));return{id:fj,diagram:t}},"loader"),$ht={id:fj,detector:zht,loader:jht},Pht=$ht,pj="timeline",Hht=B(t=>/^\s*timeline/.test(t),"detector"),Uht=B(async()=>{const{diagram:t}=await be(async()=>{const{diagram:e}=await import("./timeline-definition-PNZ67QCA-HfyRxZ8p.js");return{diagram:e}},__vite__mapDeps([36,23]));return{id:pj,diagram:t}},"loader"),Ght={id:pj,detector:Hht,loader:Uht},Yht=Ght,gj="mindmap",Vht=B(t=>/^\s*mindmap/.test(t),"detector"),Wht=B(async()=>{const{diagram:t}=await be(async()=>{const{diagram:e}=await import("./mindmap-definition-RKZ34NQL-DIsL0XSF.js");return{diagram:e}},__vite__mapDeps([37,9,10]));return{id:gj,diagram:t}},"loader"),Xht={id:gj,detector:Vht,loader:Wht},Qht=Xht,mj="kanban",Zht=B(t=>/^\s*kanban/.test(t),"detector"),Kht=B(async()=>{const{diagram:t}=await be(async()=>{const{diagram:e}=await import("./kanban-definition-UN3LZRKU-GVv_iRMq.js");return{diagram:e}},__vite__mapDeps([38,8]));return{id:mj,diagram:t}},"loader"),Jht={id:mj,detector:Zht,loader:Kht},tdt=Jht,yj="sankey",edt=B(t=>/^\s*sankey(-beta)?/.test(t),"detector"),rdt=B(async()=>{const{diagram:t}=await be(async()=>{const{diagram:e}=await import("./sankeyDiagram-5OEKKPKP-DoVspvVc.js");return{diagram:e}},__vite__mapDeps([39,24,19]));return{id:yj,diagram:t}},"loader"),idt={id:yj,detector:edt,loader:rdt},ndt=idt,xj="packet",adt=B(t=>/^\s*packet(-beta)?/.test(t),"detector"),sdt=B(async()=>{const{diagram:t}=await be(async()=>{const{diagram:e}=await import("./diagram-LMA3HP47-BubLCIus.js");return{diagram:e}},__vite__mapDeps([40,14,16]));return{id:xj,diagram:t}},"loader"),odt={id:xj,detector:adt,loader:sdt},bj="radar",ldt=B(t=>/^\s*radar-beta/.test(t),"detector"),cdt=B(async()=>{const{diagram:t}=await be(async()=>{const{diagram:e}=await import("./diagram-2AECGRRQ-C9TAFwjG.js");return{diagram:e}},__vite__mapDeps([41,14,16]));return{id:bj,diagram:t}},"loader"),udt={id:bj,detector:ldt,loader:cdt},vj="block",hdt=B(t=>/^\s*block(-beta)?/.test(t),"detector"),ddt=B(async()=>{const{diagram:t}=await be(async()=>{const{diagram:e}=await import("./blockDiagram-GPEHLZMM-CtV7ubAx.js");return{diagram:e}},__vite__mapDeps([42,8,1,11]));return{id:vj,diagram:t}},"loader"),fdt={id:vj,detector:hdt,loader:ddt},pdt=fdt,Cj="treeView",gdt=B(t=>/^\s*treeView-beta/.test(t),"detector"),mdt=B(async()=>{const{diagram:t}=await be(async()=>{const{diagram:e}=await import("./diagram-5GNKFQAL-BThljQLo.js");return{diagram:e}},__vite__mapDeps([43,14,15,16]));return{id:Cj,diagram:t}},"loader"),ydt={id:Cj,detector:gdt,loader:mdt},xdt=ydt,wj="architecture",bdt=B(t=>/^\s*architecture/.test(t),"detector"),vdt=B(async()=>{const{diagram:t}=await be(async()=>{const{diagram:e}=await import("./architectureDiagram-3BPJPVTR-WeGmL7HM.js");return{diagram:e}},__vite__mapDeps([44,14,16,4]));return{id:wj,diagram:t}},"loader"),Cdt={id:wj,detector:bdt,loader:vdt},wdt=Cdt,Sj="eventmodeling",Sdt=B(t=>/^\s*eventmodeling/.test(t),"detector"),kdt=B(async()=>{const{diagram:t}=await be(async()=>{const{diagram:e}=await import("./diagram-KO2AKTUF-bRPq25Se.js");return{diagram:e}},__vite__mapDeps([45,14,16]));return{id:Sj,diagram:t}},"loader"),_dt={id:Sj,detector:Sdt,loader:kdt},Tdt=_dt,kj="ishikawa",Edt=B(t=>/^\s*ishikawa(-beta)?\b/i.test(t),"detector"),Adt=B(async()=>{const{diagram:t}=await be(async()=>{const{diagram:e}=await import("./ishikawaDiagram-YF4QCWOH-CbJ5ojDF.js");return{diagram:e}},[]);return{id:kj,diagram:t}},"loader"),Bdt={id:kj,detector:Edt,loader:Adt},_j="venn",Ldt=B(t=>/^\s*venn-beta/.test(t),"detector"),Mdt=B(async()=>{const{diagram:t}=await be(async()=>{const{diagram:e}=await import("./vennDiagram-CIIHVFJN-B6pM3L33.js");return{diagram:e}},[]);return{id:_j,diagram:t}},"loader"),Ndt={id:_j,detector:Ldt,loader:Mdt},Odt=Ndt,Tj="treemap",Rdt=B(t=>/^\s*treemap/.test(t),"detector"),Ddt=B(async()=>{const{diagram:t}=await be(async()=>{const{diagram:e}=await import("./diagram-OG6HWLK6-CJpfhIsS.js");return{diagram:e}},__vite__mapDeps([46,10,14,16,20,24,19]));return{id:Tj,diagram:t}},"loader"),Fdt={id:Tj,detector:Rdt,loader:Ddt},Ej="wardley-beta",Idt=B(t=>/^\s*wardley-beta/i.test(t),"detector"),qdt=B(async()=>{const{diagram:t}=await be(async()=>{const{diagram:e}=await import("./wardleyDiagram-YWT4CUSO-BD45zhOu.js");return{diagram:e}},__vite__mapDeps([47,14,16]));return{id:Ej,diagram:t}},"loader"),zdt={id:Ej,detector:Idt,loader:qdt},jdt=zdt,aO=!1,sg=B(()=>{aO||(aO=!0,Gf("error",qht,t=>t.toLowerCase().trim()==="error"),Gf("---",{db:{clear:B(()=>{},"clear")},styles:{},renderer:{draw:B(()=>{},"draw")},parser:{parse:B(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:B(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),e2(Pht,Qht,wdt),e2(Tut,tdt,wht,xht,qut,Yut,Xut,Kut,uht,pht,Rut,Lut,Yht,Put,Lht,Tht,Rht,rht,ndt,odt,sht,pdt,Tdt,xdt,udt,Bdt,Fdt,Odt,jdt))},"addDiagrams"),$dt=B(async()=>{St.debug("Loading registered diagrams");const e=(await Promise.allSettled(Object.entries(eo).map(async([r,{detector:i,loader:n}])=>{if(n)try{s2(r)}catch{try{const{diagram:s,id:o}=await n();Gf(o,s,i)}catch(s){throw St.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete eo[r],s}}}))).filter(r=>r.status==="rejected");if(e.length>0){St.error(`Failed to load ${e.length} external diagrams`);for(const r of e)St.error(r);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams"),Pdt="graphics-document document";function Aj(t,e){t.attr("role",Pdt),e!==""&&t.attr("aria-roledescription",e)}B(Aj,"setA11yDiagramInfo");function Bj(t,e,r,i){if(t.insert!==void 0){if(r){const n=`chart-desc-${i}`;t.attr("aria-describedby",n),t.insert("desc",":first-child").attr("id",n).text(r)}if(e){const n=`chart-title-${i}`;t.attr("aria-labelledby",n),t.insert("title",":first-child").attr("id",n).text(e)}}}B(Bj,"addSVGa11yTitleDescription");var Qs,U2=(Qs=class{constructor(e,r,i,n,s){this.type=e,this.text=r,this.db=i,this.parser=n,this.renderer=s}static async fromText(e,r={}){var h,d;const i=nr(),n=$w(e,i);e=vot(e)+`
589
+ `;try{s2(n)}catch{const p=Zit(n);if(!p)throw new JF(`Diagram ${n} not found.`);const{id:m,diagram:g}=await p();Gf(m,g)}const{db:s,parser:o,renderer:c,init:u}=s2(n);return o.parser&&(o.parser.yy=s),(h=s.clear)==null||h.call(s),u==null||u(i),r.title&&((d=s.setDiagramTitle)==null||d.call(s,r.title)),await o.parse(e),new Qs(n,e,s,o,c)}async render(e,r){await this.renderer.draw(this.text,e,r,this)}getParser(){return this.parser}getType(){return this.type}},B(Qs,"Diagram"),Qs),sO=[],Hdt=B(()=>{sO.forEach(t=>{t()}),sO=[]},"attachFunctions"),Udt=B(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Lj(t){const e=t.match(KF);if(!e)return{text:t,metadata:{}};let r=kst(e[1],{schema:Sst})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:t.slice(e[0].length),metadata:i}}B(Lj,"extractFrontMatter");var Gdt=B(t=>t.replace(/\r\n?/g,`
590
+ `).replace(/<(\w+)([^>]*)>/g,(e,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Ydt=B(t=>{const{text:e,metadata:r}=Lj(t),{displayMode:i,title:n,config:s={}}=r;return i&&(s.gantt||(s.gantt={}),s.gantt.displayMode=i),{title:n,config:s,text:e}},"processFrontmatter"),Vdt=B(t=>{const e=an.detectInit(t)??{},r=an.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(e.wrap=!0),{text:oot(t),directive:e}},"processDirectives");function OS(t){const e=Gdt(t),r=Ydt(e),i=Vdt(r.text),n=gS(r.config,i.directive);return t=Udt(i.text),{code:t,title:r.title,config:n}}B(OS,"preprocessDiagram");function Mj(t){const e=new TextEncoder().encode(t),r=Array.from(e,i=>String.fromCodePoint(i)).join("");return btoa(r)}B(Mj,"toBase64");var Wdt=5e4,Xdt="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Qdt="sandbox",Zdt="loose",Kdt="http://www.w3.org/2000/svg",Jdt="http://www.w3.org/1999/xlink",tft="http://www.w3.org/1999/xhtml",eft="100%",rft="100%",ift="border:0;margin:0;",nft="margin:0",aft="allow-top-navigation-by-user-activation allow-popups",sft='The "iframe" tag is not supported by your browser.',oft=["foreignobject"],lft=["dominant-baseline"];function RS(t){const e=OS(t);return Hf(),knt(e.config??{}),e}B(RS,"processAndSetConfigs");async function Nj(t,e){sg();try{const{code:r,config:i}=RS(t);return{diagramType:(await Rj(r)).type,config:i}}catch(r){if(e!=null&&e.suppressErrors)return!1;throw r}}B(Nj,"parse");var oO=B((t,e,r=[])=>{const i=nI(`{ ${r.join(" !important; ")} !important; }`);return`.${t} ${e} ${i}`},"cssImportantStyles"),cft=B((t,e=new Map)=>{const r=new CSSStyleSheet;if(t.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${t.fontFamily}}`,r.cssRules.length),t.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${t.altFontFamily}}`,r.cssRules.length),e instanceof Map){const c=Jr(t)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(u=>{C4(u.styles)||c.forEach(h=>{r.insertRule(oO(u.id,h,u.styles),r.cssRules.length)}),C4(u.textStyles)||r.insertRule(oO(u.id,"tspan",((u==null?void 0:u.textStyles)||[]).map(h=>h.replace("color","fill"))),r.cssRules.length)})}let i="";if(t.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const n=new CSSStyleSheet;n.replaceSync(t.themeCSS),i=a2(n)+`
591
+ `}else i+=`${t.themeCSS}
592
+ `;return i+a2(r)},"createCssStyles"),uft=B((t,e)=>H2(but(`${t}{${e}}`),wut([B(function(i,n,s,o){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===j2)return;i.props=i.props.map(c=>c.startsWith(t)?c:`${t} ${c}`)}else i.type.startsWith("@")&&([...[aut,out,G8,cut,"@container","@starting-style"],j2].includes(i.type)||(St.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=MS))},"addNamespace"),Cut])),"compileCSS"),hft=B((t,e,r,i)=>{const n=cft(t,r),s=Hnt(e,n,{...t.themeVariables,theme:t.theme,look:t.look},i);return uft(i,s)},"createUserStyles"),dft=B((t="",e,r)=>{let i=t;return!r&&!e&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=no(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),fft=B((t="",e)=>{var n,s;const r=(s=(n=e==null?void 0:e.viewBox)==null?void 0:n.baseVal)!=null&&s.height?e.viewBox.baseVal.height+"px":rft,i=Mj(`<body style="${nft}">${t}</body>`);return`<iframe style="width:${eft};height:${r};${ift}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${aft}">
593
+ ${sft}
594
+ </iframe>`},"putIntoIFrame"),lO=B((t,e,r,i,n)=>{const s=t.append("div");s.attr("id",r),i&&s.attr("style",i);const o=s.append("svg").attr("id",e).attr("width","100%").attr("xmlns",Kdt);return n&&o.attr("xmlns:xlink",n),o.append("g"),t},"appendDivSvgG");function G2(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}B(G2,"sandboxedIframe");var pft=B((t,e,r,i)=>{var n,s,o;(n=t.getElementById(e))==null||n.remove(),(s=t.getElementById(r))==null||s.remove(),(o=t.getElementById(i))==null||o.remove()},"removeExistingElements"),gft=B(async function(t,e,r){var z,X,M,I,N,P;sg();const i=RS(e);e=i.code;const n=nr();St.debug(n),e.length>((n==null?void 0:n.maxTextSize)??Wdt)&&(e=Xdt);const s=`#${t}`,o="i"+t,c="#"+o,u="d"+t,h="#"+u,d=B(()=>{const D=Xt(m?c:h).node();D&&"remove"in D&&D.remove()},"removeTempElements");let p=Xt(document.body);const m=n.securityLevel===Qdt,g=n.securityLevel===Zdt,x=n.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),m){const $=G2(Xt(r),o);p=Xt($.nodes()[0].contentDocument.body),p.node().style.margin="0"}else p=Xt(r);lO(p,t,u,`font-family: ${x}`,Jdt)}else{if(pft(document,t,u,o),m){const $=G2(Xt(document.body),o);p=Xt($.nodes()[0].contentDocument.body),p.node().style.margin="0"}else p=Xt("body");lO(p,t,u)}let v,b;try{v=await U2.fromText(e,{title:i.title})}catch($){if(n.suppressErrorRendering)throw d(),$;v=await U2.fromText("error"),b=$}const w=p.select(h).node(),T=v.type,k=w.firstChild,E=k.firstChild,L=(X=(z=v.renderer).getClasses)==null?void 0:X.call(z,e,v),A=hft(n,T,L,s),R=document.createElement("style");R.innerHTML=A,k.insertBefore(R,E);try{await v.renderer.draw(e,t,"11.15.0",v)}catch($){throw n.suppressErrorRendering?d():Fht.draw(e,t,"11.15.0"),$}const j=p.select(`${h} svg`),Y=(I=(M=v.db).getAccTitle)==null?void 0:I.call(M),V=(P=(N=v.db).getAccDescription)==null?void 0:P.call(N);Dj(T,j,Y,V),p.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",tft);let O=p.select(h).node().innerHTML;if(St.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),O=dft(O,m,ya(n.arrowMarkerAbsolute)),m){const $=p.select(h+" svg").node();O=fft(O,$)}else g||(O=Pl.sanitize(O,{ADD_TAGS:oft,ADD_ATTR:lft,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(Hdt(),b)throw b;return d(),{diagramType:T,svg:O,bindFunctions:v.db.bindFunctions}},"render");function Oj(t={}){var i;const e=Ar({},t);e!=null&&e.fontFamily&&!((i=e.themeVariables)!=null&&i.fontFamily)&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),wnt(e),e!=null&&e.theme&&e.theme in ua?e.themeVariables=ua[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=ua.default.getThemeVariables(e.themeVariables));const r=typeof e=="object"?Cnt(e):aI();jw(r.logLevel),sg()}B(Oj,"initialize");var Rj=B((t,e={})=>{const{code:r}=OS(t);return U2.fromText(r,e)},"getDiagramFromText");function Dj(t,e,r,i){Aj(e,t),Bj(e,r,i,e.attr("id"))}B(Dj,"addA11yInfo");var so=Object.freeze({render:gft,parse:Nj,getDiagramFromText:Rj,initialize:Oj,getConfig:nr,setConfig:sI,getSiteConfig:aI,updateSiteConfig:Snt,reset:B(()=>{Hf()},"reset"),globalReset:B(()=>{Hf(Hl)},"globalReset"),defaultConfig:Hl});jw(nr().logLevel);Hf(nr());var mft=B((t,e,r)=>{St.warn(t),pS(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),Fj=B(async function(t={querySelector:".mermaid"}){try{await yft(t)}catch(e){if(pS(e)&&St.error(e.str),Bi.parseError&&Bi.parseError(e),!t.suppressErrors)throw St.error("Use the suppressErrors option to suppress these errors"),e}},"run"),yft=B(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const i=so.getConfig();St.debug(`${t?"":"No "}Callback function found`);let n;if(r)n=r;else if(e)n=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");St.debug(`Found ${n.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(St.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),so.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const s=new an.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const c=[];for(const u of Array.from(n)){if(St.info("Rendering diagram: "+u.id),u.getAttribute("data-processed"))continue;u.setAttribute("data-processed","true");const h=`mermaid-${s.next()}`;o=u.innerHTML,o=Qq(an.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const d=an.detectInit(o);d&&St.debug("Detected early reinit: ",d);try{const{svg:p,bindFunctions:m}=await jj(h,o,u);u.innerHTML=p,t&&await t(h),m&&m(u)}catch(p){mft(p,c,Bi.parseError)}}if(c.length>0)throw c[0]},"runThrowsErrors"),Ij=B(function(t){so.initialize(t)},"initialize"),xft=B(async function(t,e,r){St.warn("mermaid.init is deprecated. Please use run instead."),t&&Ij(t);const i={postRenderCallback:r,querySelector:".mermaid"};typeof e=="string"?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await Fj(i)},"init"),bft=B(async(t,{lazyLoad:e=!0}={})=>{sg(),e2(...t),e===!1&&await $dt()},"registerExternalDiagrams"),qj=B(function(){if(Bi.startOnLoad){const{startOnLoad:t}=so.getConfig();t&&Bi.run().catch(e=>St.error("Mermaid failed to initialize",e))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",qj,!1);var vft=B(function(t){Bi.parseError=t},"setParseErrorHandler"),hp=[],_C=!1,zj=B(async()=>{if(!_C){for(_C=!0;hp.length>0;){const t=hp.shift();if(t)try{await t()}catch(e){St.error("Error executing queue",e)}}_C=!1}},"executeQueue"),Cft=B(async(t,e)=>new Promise((r,i)=>{const n=B(()=>new Promise((s,o)=>{so.parse(t,e).then(c=>{s(c),r(c)},c=>{var u;St.error("Error parsing",c),(u=Bi.parseError)==null||u.call(Bi,c),o(c),i(c)})}),"performCall");hp.push(n),zj().catch(i)}),"parse"),jj=B((t,e,r)=>new Promise((i,n)=>{const s=B(()=>new Promise((o,c)=>{so.render(t,e,r).then(u=>{o(u),i(u)},u=>{var h;St.error("Error parsing",u),(h=Bi.parseError)==null||h.call(Bi,u),c(u),n(u)})}),"performCall");hp.push(s),zj().catch(n)}),"render"),wft=B(()=>Object.keys(eo).map(t=>({id:t})),"getRegisteredDiagramsMetadata"),Bi={startOnLoad:!0,mermaidAPI:so,parse:Cft,render:jj,init:xft,run:Fj,registerExternalDiagrams:bft,registerLayoutLoaders:P8,initialize:Ij,parseError:void 0,contentLoaded:qj,setParseErrorHandler:vft,detectType:$w,registerIconPacks:Elt,getRegisteredDiagramsMetadata:wft},$j=Bi;/*! Check if previously processed *//*!
595
+ * Wait for document loaded before starting the execution
596
+ */$j.initialize({startOnLoad:!1,theme:"base",themeVariables:{background:"transparent",fontFamily:"ui-sans-serif, system-ui, sans-serif",primaryColor:"#0a0a0a",primaryTextColor:"#e0e0e0",primaryBorderColor:"#10b981",lineColor:"#34d399",secondaryColor:"#064e3b",tertiaryColor:"#111111",noteBkgColor:"#022c22",noteTextColor:"#e0e0e0",noteBorderColor:"#059669"}});const Sft=({chart:t})=>{const e=ot.useRef(null);return ot.useEffect(()=>{let r=!0;return e.current&&$j.render(`mermaid-${Math.random().toString(36).substring(2,9)}`,t).then(({svg:i})=>{r&&e.current&&(e.current.innerHTML=i)}).catch(i=>{console.error("Mermaid parsing issue",i),r&&e.current&&(e.current.innerHTML='<div class="text-red-400 text-xs p-2 border border-red-500/20 bg-red-950/30">Failed to render Mermaid diagram</div>')}),()=>{r=!1}},[t]),S.jsx("div",{ref:e,className:"my-6 flex justify-center bg-transparent border border-white/5 p-6 rounded-lg overflow-auto w-full mermaid-wrapper"})},$i=({content:t})=>{const{setSelectedArtifact:e,setView:r}=ls();return S.jsx("div",{className:"markdown-body prose prose-invert prose-sm max-w-none text-[#e0e0e0]/80",children:S.jsx(oit,{components:{code({node:i,className:n,children:s,...o}){const c=/language-(\w+)/.exec(n||"");return c&&c[1]==="mermaid"?S.jsx(Sft,{chart:String(s).replace(/\n$/,"")}):c?S.jsx("code",{className:n,...o,children:s}):S.jsx("code",{className:"bg-white/10 px-1 py-0.5 rounded text-emerald-400 font-mono text-[11px] whitespace-pre-wrap",...o,children:s})},pre({children:i,...n}){var o,c;return((c=(o=i==null?void 0:i.props)==null?void 0:o.className)==null?void 0:c.includes("language-mermaid"))?S.jsx(S.Fragment,{children:i}):S.jsx("pre",{className:"bg-[#050505] p-3 rounded-md overflow-x-auto text-xs my-3 border border-white/10",...n,children:i})},p({children:i,...n}){return S.jsx("p",{className:"mb-3 leading-relaxed",...n,children:i})},ul({children:i,...n}){return S.jsx("ul",{className:"list-disc pl-5 mb-3 space-y-1",...n,children:i})},ol({children:i,...n}){return S.jsx("ol",{className:"list-decimal pl-5 mb-3 space-y-1",...n,children:i})},h1({children:i,...n}){return S.jsx("h1",{className:"text-xl font-serif text-white mt-6 mb-3",...n,children:i})},h2({children:i,...n}){return S.jsx("h2",{className:"text-lg font-serif text-white mt-5 mb-2 border-b border-white/10 pb-1",...n,children:i})},h3({children:i,...n}){return S.jsx("h3",{className:"text-base font-serif text-white mt-4 mb-2",...n,children:i})},h4({children:i,...n}){return S.jsx("h4",{className:"text-sm font-semibold text-white mt-3 mb-1",...n,children:i})},a({href:i,children:n,...s}){if((i==null?void 0:i.startsWith("#"))||!(i!=null&&i.startsWith("http"))&&!(i!=null&&i.startsWith("mailto"))&&!(i!=null&&i.startsWith("tel"))){const c=i.replace(/^#/,"");return S.jsx("button",{onClick:u=>{u.preventDefault(),e(c),r("docs")},className:"text-emerald-400 hover:text-emerald-300 underline cursor-pointer font-medium p-0 bg-transparent border-0 inline",children:n})}return S.jsx("a",{href:i,target:"_blank",rel:"noreferrer",className:"text-blue-400 hover:text-blue-300 underline",...s,children:n})}},children:t})})},Sn=({artifact:t})=>{var e,r,i,n,s,o;return!t.layer&&!((e=t.ownership)!=null&&e.owner)&&!((r=t.ownership)!=null&&r.team)?null:S.jsxs("div",{className:"flex gap-2 mb-3 mt-1 pointer-events-none",children:[t.layer&&S.jsxs("span",{className:"text-[9px] text-purple-400 border border-purple-400/20 bg-purple-400/5 px-1.5 py-0.5 rounded-sm font-mono tracking-tighter",children:["LAYER: ",t.layer]}),((i=t.ownership)==null?void 0:i.owner)&&S.jsxs("span",{className:"text-[9px] text-blue-400 border border-blue-400/20 bg-blue-400/5 px-1.5 py-0.5 rounded-sm font-mono tracking-tighter",children:["OWNER: ",(n=t.ownership)==null?void 0:n.owner]}),((s=t.ownership)==null?void 0:s.team)&&S.jsxs("span",{className:"text-[9px] text-emerald-400 border border-emerald-400/20 bg-emerald-400/5 px-1.5 py-0.5 rounded-sm font-mono tracking-tighter",children:["TEAM: ",(o=t.ownership)==null?void 0:o.team]})]})},kft=[{id:"req",title:"Requirements / Analysis",icon:tF,types:["REQUIREMENT","USE_CASE"]},{id:"design",title:"Technical Design",icon:rF,types:["DESIGN","COMPONENT"]},{id:"dev",title:"Development",icon:iK,types:["CODE_ENTITY"]},{id:"review",title:"Code Review",icon:eF,types:["CODE_ENTITY"]},{id:"ci",title:"Continuous Integration",icon:nF,types:["INFRASTRUCTURE"]},{id:"verif",title:"Testing",icon:AK,types:["TEST"]},{id:"build",title:"Build / Packaging",icon:JD,types:["INFRASTRUCTURE"]},{id:"deploy",title:"Deployment",icon:aF,types:["DEPLOYMENT"]},{id:"monitor",title:"Monitoring",icon:Eu,types:["MONITORING","INCIDENT"]},{id:"maint",title:"Maintenance / Refactoring",icon:cF,types:["MAINTENANCE"]},{id:"retire",title:"Retirement / Replacement",icon:If,types:["MAINTENANCE"]},{id:"versions",title:"Releases & Versions",icon:iF,types:["VERSION","SYSTEM_VERSION"]}],_ft=()=>{var Yt,zt,ve,Ee,Ve,ar,We,Me,Ae,sr,gt,kt,Dt,ee,ae,Xe;const{fullGraph:t,currentVersionId:e,versions:r,systemVersions:i,selectedArtifactId:n,setSelectedArtifact:s,settings:o,globalFilters:c,setGlobalFilter:u}=ls(),[h,d]=ot.useState(null),[p,m]=ot.useState(null),[g,x]=ot.useState(""),v=c.layer,b=c.owner,w=c.team,T=K=>u("layer",K),k=K=>u("owner",K),E=K=>u("team",K),[L,A]=ot.useState("ALL"),[R,j]=ot.useState(!1),[Y,V]=ot.useState(!1),[O,z]=ot.useState(!1),[X,M]=ot.useState(o.defaultDocsFocusMode),I=ot.useMemo(()=>{if(!t||!t.artifacts)return{layers:[],owners:[],teams:[]};const K=Array.from(new Set(t.artifacts.map(Bt=>Bt.layer).filter(Boolean))),Lt=Array.from(new Set(t.artifacts.map(Bt=>{var Nt;return(Nt=Bt.ownership)==null?void 0:Nt.owner}).filter(Boolean))),Ht=Array.from(new Set(t.artifacts.map(Bt=>{var Nt;return(Nt=Bt.ownership)==null?void 0:Nt.team}).filter(Boolean)));return{layers:K,owners:Lt,teams:Ht}},[t]),N=ot.useMemo(()=>{if(!t)return new Set;const K=new Set;t.relations.forEach(Ht=>{K.add(Ht.from),K.add(Ht.to)});const Lt=new Set;return t.artifacts.forEach(Ht=>{K.has(Ht.id)||Lt.add(Ht.id)}),Lt},[t]),P=ot.useMemo(()=>{if(!n||!t)return new Set;const K=new Set;K.add(n);let Lt=new Set([n]);const Ht=o.docsFocusDepth===0?1/0:o.docsFocusDepth;for(let Bt=0;Bt<Ht;Bt++){let Nt=new Set;if(t.relations.forEach(Ce=>{(Lt.has(Ce.from)||Lt.has(Ce.to))&&(K.has(Ce.from)||Nt.add(Ce.from),K.has(Ce.to)||Nt.add(Ce.to))}),Nt.size===0)break;Nt.forEach(Ce=>K.add(Ce)),Lt=Nt}return K},[n,t,o.docsFocusDepth]),$=ot.useMemo(()=>{const K={REQUIREMENT:[],USE_CASE:[],DESIGN:[],COMPONENT:[],CODE_ENTITY:[],TEST:[],DOCUMENTATION:[],INCIDENT:[],INFRASTRUCTURE:[],DEPLOYMENT:[],MONITORING:[],MAINTENANCE:[],VERSION:[],SYSTEM_VERSION:[]};return t&&t.artifacts&&t.artifacts.forEach(Lt=>{const Ht=Lt.type;K[Ht]&&K[Ht].push(Lt)}),K},[t]),D=ot.useMemo(()=>{const K=(Nt=[])=>{if(!g.trim())return Nt;const Ce=g.toLowerCase();return Nt.filter(je=>je.title.toLowerCase().includes(Ce)||je.description.toLowerCase().includes(Ce)||je.id.toLowerCase().includes(Ce)||je.subType&&je.subType.toLowerCase().includes(Ce))},Lt=(Nt=[])=>!n||!X?Nt:Nt.filter(Ce=>P.has(Ce.id)),Ht=(Nt=[])=>Nt.filter(Ce=>{var je,va;return!(v!=="ALL"&&Ce.layer!==v||b!=="ALL"&&((je=Ce.ownership)==null?void 0:je.owner)!==b||w!=="ALL"&&((va=Ce.ownership)==null?void 0:va.team)!==w)}),Bt=(Nt=[])=>Lt(Ht(K(Nt)));return{REQUIREMENT:Bt($.REQUIREMENT),USE_CASE:Bt($.USE_CASE),DESIGN:Bt($.DESIGN),COMPONENT:Bt($.COMPONENT),CODE_ENTITY:Bt($.CODE_ENTITY),TEST:Bt($.TEST),DOCUMENTATION:Bt($.DOCUMENTATION),INCIDENT:Bt($.INCIDENT),INFRASTRUCTURE:Bt($.INFRASTRUCTURE),DEPLOYMENT:Bt($.DEPLOYMENT),MONITORING:Bt($.MONITORING),MAINTENANCE:Bt($.MAINTENANCE),VERSION:Bt($.VERSION),SYSTEM_VERSION:Bt($.SYSTEM_VERSION)}},[$,g,n,P,X,v,b,w]),q=ot.useMemo(()=>kft.map(K=>{let Lt=K.types.flatMap(Bt=>D[Bt]||[]);K.id==="dev"?Lt=Lt.filter(Bt=>Bt.subType!=="Review"):K.id==="review"?Lt=Lt.filter(Bt=>Bt.subType==="Review"):K.id==="ci"?Lt=Lt.filter(Bt=>{var Nt;return((Nt=Bt.subType)==null?void 0:Nt.includes("CI"))||Bt.subType==="Pipeline"}):K.id==="build"?Lt=Lt.filter(Bt=>Bt.subType==="Build"||Bt.subType==="Package"):K.id==="maint"?Lt=Lt.filter(Bt=>Bt.subType!=="Retirement"):K.id==="retire"&&(Lt=Lt.filter(Bt=>Bt.subType==="Retirement"));const Ht=Array.from(new Set(Lt.map(Bt=>Bt.subType).filter(Boolean)));if(K.id==="design"&&(D.COMPONENT||[]).length>0){const Bt=Array.from(new Set((D.COMPONENT||[]).map(Nt=>Nt.subType).filter(Boolean)));for(const Nt of Bt)Ht.includes(Nt)||Ht.push(Nt);Bt.length===0&&!Ht.includes("Component")&&Ht.push("Component")}return{...K,count:Lt.length,subTypes:Ht}}),[D]);if(ot.useEffect(()=>{n&&setTimeout(()=>{const K=document.getElementById(n);K&&K.scrollIntoView({behavior:"smooth",block:"start"})},100)},[n,D]),!t)return S.jsx("div",{className:"p-8",children:"Loading documentation..."});const G=r.find(K=>K.id===e),Z=K=>{h===K&&!p?d(null):(d(K),m(null))},H=(K,Lt)=>{p===Lt?(m(null),d(K)):(d(K),m(Lt))},Q=(((Yt=D.REQUIREMENT)==null?void 0:Yt.length)||0)+(((zt=D.USE_CASE)==null?void 0:zt.length)||0)>0,J=(((ve=D.DESIGN)==null?void 0:ve.length)||0)+(((Ee=D.COMPONENT)==null?void 0:Ee.length)||0)>0,et=(D.CODE_ENTITY||[]).filter(K=>K.subType!=="Review").length>0,at=(D.CODE_ENTITY||[]).filter(K=>K.subType==="Review").length>0,lt=(D.INFRASTRUCTURE||[]).filter(K=>{var Lt;return((Lt=K.subType)==null?void 0:Lt.includes("CI"))||K.subType==="Pipeline"}).length>0,xt=(((Ve=D.TEST)==null?void 0:Ve.length)||0)>0,mt=(D.INFRASTRUCTURE||[]).filter(K=>K.subType==="Build"||K.subType==="Package").length>0,bt=(((ar=D.DEPLOYMENT)==null?void 0:ar.length)||0)>0,Tt=(((We=D.MONITORING)==null?void 0:We.length)||0)+(((Me=D.INCIDENT)==null?void 0:Me.length)||0)>0,_t=(D.MAINTENANCE||[]).filter(K=>K.subType!=="Retirement").length>0,Mt=(D.MAINTENANCE||[]).filter(K=>K.subType==="Retirement").length>0;(((Ae=D.VERSION)==null?void 0:Ae.length)||0)+(((sr=D.SYSTEM_VERSION)==null?void 0:sr.length)||0)>0;const Et=K=>!(X&&n&&!K);return S.jsxs("div",{className:"h-full w-full bg-[#0a0a0a] flex overflow-hidden print-block",children:[S.jsxs("div",{className:`shrink-0 bg-[#0c0c0c] border-r border-white/5 flex flex-col transition-all duration-300 print-hidden ${R?"w-12":"w-64"}`,children:[S.jsxs("div",{className:"p-4 border-b border-white/5 sticky top-0 bg-[#0c0c0c]/90 backdrop-blur z-10 flex items-center justify-between",children:[!R&&S.jsx("div",{className:"text-[10px] uppercase tracking-widest text-emerald-500 font-bold",children:"Lifecycle Phases"}),S.jsx("button",{onClick:()=>j(!R),className:"p-1 hover:bg-white/10 rounded transition-colors text-white/40 hover:text-white",children:S.jsx(ff,{className:`transition-transform duration-300 ${R?"":"rotate-180"}`,size:16})})]}),S.jsxs("div",{className:`p-4 space-y-1 overflow-y-auto custom-scrollbar flex-1 ${R?"items-center px-2":""}`,children:[!R&&S.jsx("button",{className:`w-full text-left px-4 py-2 text-xs font-semibold uppercase tracking-widest rounded transition-colors mb-2 ${h?"text-white/40 hover:bg-white/5 hover:text-white/80":"bg-white/10 text-white"}`,onClick:()=>{d(null),m(null)},children:"All Assets"}),q.map((K,Lt)=>{const Ht=K.icon,Bt=h===K.id;return R?S.jsxs("button",{onClick:()=>Z(K.id),className:`p-2 rounded transition-colors mb-1 group relative ${Bt?"bg-emerald-500/10 text-emerald-400":"text-white/40 hover:bg-white/5"}`,title:K.title,children:[S.jsx(Ht,{size:18}),S.jsxs("div",{className:"absolute left-full ml-2 px-2 py-1 bg-black border border-white/20 text-[10px] whitespace-nowrap rounded opacity-0 group-hover:opacity-100 pointer-events-none z-50",children:[K.title," (",K.count,")"]})]},K.id):S.jsxs("div",{className:"flex flex-col mb-1",children:[S.jsxs("button",{onClick:()=>Z(K.id),className:`w-full text-left px-3 py-2 text-xs transition-colors rounded-sm flex items-center justify-between group
597
+ ${Bt&&!p?"bg-emerald-500/10 text-emerald-400 border border-emerald-500/20":"text-white/60 hover:bg-white/5 border border-transparent"}`,children:[S.jsxs("div",{className:"flex items-center gap-3",children:[S.jsx(Ht,{size:14,className:Bt&&!p?"text-emerald-400":"text-white/40 group-hover:text-white/70"}),S.jsxs("span",{children:[Lt+1,". ",K.title]})]}),S.jsx("span",{className:"text-[9px] bg-white/10 px-1.5 py-0.5 rounded-sm tabular-nums opacity-60 group-hover:opacity-100",children:K.count})]}),(Bt||h===K.id)&&K.subTypes.length>0&&S.jsx("div",{className:"flex flex-col ml-6 mt-1 space-y-0.5 border-l border-white/10 pl-2",children:K.subTypes.map(Nt=>S.jsx("button",{onClick:()=>H(K.id,Nt),className:`text-left px-2 py-1.5 text-[10px] uppercase tracking-widest transition-colors rounded-sm
598
+ ${p===Nt?"text-white bg-white/10 font-bold":"text-white/40 hover:text-white/80 hover:bg-white/5"}`,children:Nt},Nt))})]},K.id)})]})]}),S.jsx("div",{className:"flex-1 overflow-y-auto relative flex flex-col group/doc",children:S.jsxs("div",{className:"flex flex-col w-full bg-[#0a0a0a] min-h-max",children:[S.jsxs("div",{className:`sticky top-0 z-30 transition-all duration-300 bg-[#0a0a0a]/80 backdrop-blur-md px-8 lg:px-16 border-b border-white/5 flex items-center justify-between print-hidden ${Y?"py-2":"py-8 pt-12 pb-4"}`,children:[S.jsxs("div",{className:"flex items-center gap-4",children:[S.jsx("h1",{className:`font-serif italic tracking-tight transition-all duration-300 ${Y?"text-lg":"text-3xl"}`,children:p?`${p} Documentation`:h?(gt=q.find(K=>K.id===h))==null?void 0:gt.title:"System Documentation"}),S.jsx("div",{className:"h-4 w-px bg-white/10"}),S.jsx("button",{onClick:()=>V(!Y),className:"p-1 hover:bg-white/10 rounded transition-colors text-white/20 hover:text-white/60",title:Y?"Expand Header":"Minimize Header",children:S.jsx(ff,{className:`transition-transform duration-300 ${Y?"rotate-90":"-rotate-90"}`,size:14})})]}),S.jsxs("div",{className:"flex flex-col md:flex-row gap-2 items-center",children:[n&&S.jsxs("div",{className:"flex items-center gap-2 mr-4",children:[S.jsxs("button",{onClick:()=>M(!X),className:`flex items-center gap-2 px-3 py-1 rounded-sm border transition-all text-[10px] font-mono tracking-tight cursor-pointer ${X?"bg-emerald-500/20 border-emerald-500/40 text-emerald-400":"bg-white/5 border-white/10 text-white/40 hover:text-white/60"}`,children:[S.jsx(Eu,{size:12,className:X?"animate-pulse":""}),"FOCUS: ",X?"ON":"OFF"]}),S.jsx("div",{className:"h-4 w-[1px] bg-white/10 mx-1"}),S.jsx("span",{className:"text-[10px] text-white/40 font-mono italic",children:n}),S.jsx("button",{onClick:()=>s(null),className:"p-1 text-white/20 hover:text-red-400 transition-colors",title:"Clear Selection",children:S.jsx(If,{size:12})})]}),S.jsxs("div",{className:"flex flex-col gap-2 w-full md:w-auto",children:[S.jsxs("div",{className:"flex flex-col md:flex-row gap-2",children:[S.jsxs("div",{className:"relative w-full md:w-40",children:[S.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:S.jsx(Vu,{size:14,className:"text-white/40"})}),S.jsx("input",{type:"text",placeholder:"Keywords...",value:g,onChange:K=>x(K.target.value),className:"w-full bg-[#111] border border-white/10 rounded-md py-1.5 pl-8 pr-3 text-xs text-white focus:outline-none focus:border-emerald-500/50 focus:ring-1 focus:ring-emerald-500/50 transition-colors"})]}),S.jsxs("div",{className:"flex gap-1 w-full lg:w-auto",children:[S.jsxs("select",{value:L,onChange:K=>A(K.target.value),className:`bg-transparent py-1 px-2 text-[9px] focus:outline-none cursor-pointer uppercase tracking-wider transition-all border rounded-sm ${L!=="ALL"?"bg-blue-500/20 border-blue-500/40 text-blue-400 font-bold":"border-white/10 text-white/50 hover:border-white/20"}`,children:[S.jsx("option",{value:"ALL",className:"bg-[#0c0c0c] text-white",children:"All Types"}),Object.keys($).map(K=>S.jsx("option",{value:K,className:"bg-[#0c0c0c] text-white",children:K.replace("_"," ")},K))]}),S.jsxs("select",{value:n||"",onChange:K=>s(K.target.value||null),className:`bg-transparent py-1 px-2 text-[9px] focus:outline-none cursor-pointer font-mono max-w-[120px] transition-all border rounded-sm ${n?"bg-emerald-500/20 border-emerald-500/40 text-emerald-400 font-bold":"border-white/10 text-white/50 hover:border-white/20"}`,children:[S.jsx("option",{value:"",className:"bg-[#0c0c0c] text-white",children:"Artifact..."}),((t==null?void 0:t.artifacts)||[]).filter(K=>L==="ALL"||K.type===L).sort((K,Lt)=>K.id.localeCompare(Lt.id)).map(K=>S.jsx("option",{value:K.id,className:"text-white bg-[#0c0c0c]",children:K.id},K.id))]})]}),S.jsx("button",{onClick:()=>window.print(),className:"flex items-center justify-center p-1.5 ml-2 hover:bg-white/10 rounded transition-colors text-white/40 hover:text-white print-hidden",title:"Print Native (System Print Dialog)",children:S.jsx(CK,{size:16})})]}),S.jsxs("div",{className:"flex gap-1 w-full mt-2 lg:mt-0",children:[S.jsxs("select",{value:v,onChange:K=>T(K.target.value),className:`bg-transparent py-1 px-1 text-[9px] focus:outline-none cursor-pointer uppercase tracking-wider flex-1 text-center transition-all border rounded-sm ${v!=="ALL"?"bg-blue-500/20 border-blue-500/40 text-blue-400 font-bold":"border-white/10 text-white/50 hover:border-white/20"}`,children:[S.jsx("option",{value:"ALL",className:"bg-[#0c0c0c] text-white font-normal",children:"LAYER"}),I.layers.map(K=>S.jsx("option",{value:K,className:"bg-[#0c0c0c] text-white font-normal",children:K},K))]}),S.jsxs("select",{value:b,onChange:K=>k(K.target.value),className:`bg-transparent py-1 px-1 text-[9px] focus:outline-none cursor-pointer uppercase tracking-wider flex-1 text-center transition-all border rounded-sm ${b!=="ALL"?"bg-blue-500/20 border-blue-500/40 text-blue-400 font-bold":"border-white/10 text-white/50 hover:border-white/20"}`,children:[S.jsx("option",{value:"ALL",className:"bg-[#0c0c0c] text-white font-normal",children:"OWNER"}),I.owners.map(K=>S.jsx("option",{value:K,className:"bg-[#0c0c0c] text-white font-normal",children:K},K))]}),S.jsxs("select",{value:w,onChange:K=>E(K.target.value),className:`bg-transparent py-1 px-1 text-[9px] focus:outline-none cursor-pointer uppercase tracking-wider flex-1 text-center transition-all border rounded-sm ${w!=="ALL"?"bg-blue-500/20 border-blue-500/40 text-blue-400 font-bold":"border-white/10 text-white/50 hover:border-white/20"}`,children:[S.jsx("option",{value:"ALL",className:"bg-[#0c0c0c] text-white font-normal",children:"TEAM"}),I.teams.map(K=>S.jsx("option",{value:K,className:"bg-[#0c0c0c] text-white font-normal",children:K},K))]})]})]})]})]}),S.jsx("div",{className:"px-8 lg:px-16 pt-4 shrink-0",children:S.jsxs("div",{className:"flex flex-col md:flex-row md:items-start gap-4 md:gap-12 mb-8 mt-2 animate-in fade-in slide-in-from-top-1 duration-300",children:[S.jsxs("div",{className:"text-xs font-mono text-white/40",children:["SYS DOMAIN: ",S.jsx("span",{className:"text-emerald-400 font-bold tracking-widest",children:p?`${p} Documentation`:h?(kt=q.find(K=>K.id===h))==null?void 0:kt.title:"System Documentation"}),S.jsx("br",{}),"VERSION: ",S.jsxs("span",{className:"text-white/80",children:[G==null?void 0:G.name," (",e,")"]}),S.jsx("br",{}),"DATE: ",new Date().toISOString().split("T")[0]]}),i.length>0&&S.jsxs("div",{className:"flex flex-col gap-2",children:[S.jsxs("button",{onClick:()=>z(!O),className:"text-[10px] uppercase tracking-widest text-white/20 font-bold flex items-center gap-2 hover:text-white/40 transition-colors print-hidden",children:["System Inventory",S.jsx(ff,{size:10,className:`transition-transform ${O?"rotate-90":""}`})]}),O&&S.jsx("div",{className:"flex gap-2 flex-wrap animate-in fade-in slide-in-from-top-2 duration-300",children:i.map(K=>S.jsxs("div",{className:"flex items-center gap-2 bg-white/5 border border-white/10 px-2 py-1 rounded text-[10px] tabular-nums",children:[S.jsx("span",{className:"text-emerald-500 font-bold",children:K.component}),S.jsx("span",{className:"text-white/40 font-mono",children:K.version})]},K.id))})]})]})}),S.jsxs("div",{className:"flex-1 overflow-y-auto px-8 lg:px-16 pb-12 custom-scrollbar",children:[(!h||h==="req")&&Et(Q)&&S.jsxs("section",{className:"mb-16",children:[S.jsx("h2",{className:"text-[10px] uppercase tracking-widest text-white/40 mb-6 bg-white/5 p-3 border-l-2 border-white/20",children:"1. Requirements / Analysis"}),((Dt=D.REQUIREMENT)==null?void 0:Dt.length)===0&&((ee=D.USE_CASE)==null?void 0:ee.length)===0&&S.jsx("p",{className:"italic text-white/40 text-xs",children:"No requirements found in this version."}),[...D.REQUIREMENT||[],...D.USE_CASE||[]].filter(K=>!p||K.subType===p).map(K=>S.jsxs("div",{id:K.id,className:"mb-6 bg-[#0c0c0c] border border-white/10 p-5 pl-6 border-l-[3px] border-l-blue-500/50 hover:bg-white-[0.02] transition-colors relative group",children:[S.jsxs("h3",{className:"font-serif text-lg text-white flex items-center gap-4 flex-wrap mb-4",children:[S.jsx("button",{onClick:()=>s(K.id),className:`text-[10px] font-mono bg-black px-2 py-1 border border-white/5 uppercase tracking-widest hover:border-blue-500/50 transition-colors ${n===K.id?"text-blue-400 border-blue-500/50":"text-white/40"}`,children:K.id}),K.subType&&S.jsx("span",{className:"text-[10px] font-sans bg-blue-500/10 text-blue-300 px-2 py-1 border border-blue-500/20 uppercase tracking-widest",children:K.subType}),N.has(K.id)&&S.jsxs("span",{className:"text-[10px] bg-red-500/10 text-red-400 px-2 py-1 border border-red-500/20 uppercase tracking-widest flex items-center gap-1",children:[S.jsx(tn,{size:10}),"Traceability Gap"]}),K.title]}),S.jsx(Sn,{artifact:K}),S.jsx($i,{content:K.description})]},K.id))]}),(!h||h==="design")&&Et(J)&&S.jsxs("section",{className:"mb-16",children:[S.jsx("h2",{className:"text-[10px] uppercase tracking-widest text-white/40 mb-6 bg-white/5 p-3 border-l-2 border-white/20",children:"2. Technical Design"}),((ae=D.DESIGN)==null?void 0:ae.length)===0&&(((Xe=D.COMPONENT)==null?void 0:Xe.length)||0)===0&&S.jsx("p",{className:"italic text-white/40 text-xs text-center p-12 bg-white/5 border border-dashed border-white/10 rounded",children:"No architectural design for this phase."}),(D.DESIGN||[]).filter(K=>!p||K.subType===p).map(K=>S.jsxs("div",{id:K.id,className:"mb-6 bg-[#0c0c0c] border border-white/10 p-5 pl-6 border-l-[3px] border-l-purple-500/50 hover:bg-white-[0.02] transition-colors",children:[S.jsxs("h3",{className:"font-serif text-lg text-white mb-4 flex items-center gap-3",children:[S.jsx("button",{onClick:()=>s(K.id),className:`text-[10px] font-mono bg-black px-2 py-1 border border-white/5 uppercase tracking-widest hover:border-purple-500/50 transition-colors ${n===K.id?"text-purple-400 border-purple-500/50":"text-white/40"}`,children:K.id}),N.has(K.id)&&S.jsxs("span",{className:"text-[8px] bg-red-500/10 text-red-400 px-1.5 py-0.5 border border-red-500/20 uppercase font-mono tracking-tighter flex items-center gap-1",children:[S.jsx(tn,{size:10}),"Orphan"]}),K.title]}),S.jsx(Sn,{artifact:K}),S.jsx($i,{content:K.description})]},K.id))]}),(!h||h==="dev")&&Et(et)&&S.jsxs("section",{className:"mb-16",children:[S.jsx("h2",{className:"text-[10px] uppercase tracking-widest text-white/40 mb-6 bg-white/5 p-3 border-l-2 border-white/20",children:"3. Development"}),S.jsx("div",{className:"overflow-x-auto rounded border border-white/10",children:S.jsxs("table",{className:"min-w-full border-collapse text-xs",children:[S.jsx("thead",{className:"bg-[#0c0c0c] border-b border-white/10 text-white/40 uppercase tracking-[0.2em] text-[8px] font-bold",children:S.jsxs("tr",{children:[S.jsx("th",{className:"p-4 text-left",children:"Code Entity"}),S.jsx("th",{className:"p-4 text-left border-l border-white/5",children:"Mapping"}),S.jsx("th",{className:"p-4 text-left border-l border-white/5 w-1/2",children:"Logic Summary"})]})}),S.jsxs("tbody",{className:"divide-y divide-white/5",children:[(D.CODE_ENTITY||[]).filter(K=>K.subType!=="Review").filter(K=>!p||K.subType===p).map(K=>S.jsxs("tr",{id:K.id,className:"bg-transparent hover:bg-white/[0.02] transition-colors group",children:[S.jsxs("td",{className:"p-4 font-mono",children:[S.jsx("button",{onClick:()=>s(K.id),className:`text-left hover:text-emerald-300 transition-colors ${n===K.id?"text-emerald-400":"text-emerald-500/70"}`,children:K.title}),S.jsx(Sn,{artifact:K}),N.has(K.id)&&S.jsxs("div",{className:"flex items-center gap-1 text-[8px] text-red-400 mt-0.5 font-bold uppercase tracking-tighter",children:[S.jsx(tn,{size:8}),"Unlinked Entity"]}),S.jsx("div",{className:"text-[8px] text-white/20 mt-1 uppercase tracking-tighter",children:K.id})]}),S.jsx("td",{className:"p-4 border-l border-white/5 text-amber-400/80",children:K.subType||"-"}),S.jsx("td",{className:"p-4 border-l border-white/5 text-white/60",children:S.jsx($i,{content:K.description})})]},K.id)),(D.CODE_ENTITY||[]).filter(K=>K.subType!=="Review").length===0&&S.jsx("tr",{children:S.jsx("td",{colSpan:3,className:"p-12 text-center text-white/20 italic",children:"No code entities documented for this version."})})]})]})})]}),(!h||h==="review")&&Et(at)&&S.jsxs("section",{className:"mb-16",children:[S.jsx("h2",{className:"text-[10px] uppercase tracking-widest text-white/40 mb-6 bg-white/5 p-3 border-l-2 border-white/20",children:"4. Code Review"}),(D.CODE_ENTITY||[]).filter(K=>K.subType==="Review").length===0&&S.jsx("p",{className:"italic text-white/40 text-xs text-center p-8 bg-white/5 border border-dashed border-white/10 rounded",children:"No active reviews for this version."}),S.jsx("div",{className:"grid grid-cols-1 gap-4",children:(D.CODE_ENTITY||[]).filter(K=>K.subType==="Review").map(K=>S.jsxs("div",{id:K.id,className:"bg-[#0c0c0c] border border-white/10 p-5 pl-6 border-l-[3px] border-l-emerald-500/50",children:[S.jsxs("h3",{className:"font-serif text-lg text-white mb-2 flex items-center gap-3",children:[S.jsx("button",{onClick:()=>s(K.id),className:`text-[10px] font-mono bg-black px-2 py-1 border border-white/5 uppercase tracking-widest hover:border-emerald-500/50 transition-colors ${n===K.id?"text-emerald-400 border-emerald-500/50":"text-white/40"}`,children:K.id}),K.title]}),S.jsx($i,{content:K.description})]},K.id))})]}),(!h||h==="ci")&&Et(lt)&&S.jsxs("section",{className:"mb-16",children:[S.jsx("h2",{className:"text-[10px] uppercase tracking-widest text-white/40 mb-6 bg-white/5 p-3 border-l-2 border-white/20",children:"5. Continuous Integration (CI)"}),(D.INFRASTRUCTURE||[]).filter(K=>{var Lt;return((Lt=K.subType)==null?void 0:Lt.includes("CI"))||K.subType==="Pipeline"}).length===0&&S.jsx("p",{className:"italic text-white/40 text-xs p-12 bg-white/5 border border-dashed border-white/10 rounded text-center",children:"No CI pipelines defined."}),S.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:(D.INFRASTRUCTURE||[]).filter(K=>{var Lt;return((Lt=K.subType)==null?void 0:Lt.includes("CI"))||K.subType==="Pipeline"}).map(K=>S.jsxs("div",{id:K.id,className:"bg-[#0c0c0c] border border-white/10 p-5 hover:bg-white/[0.03] transition-all",children:[S.jsxs("h4",{className:"text-white font-bold mb-2 flex items-center gap-2",children:[S.jsx(nF,{size:14,className:"text-emerald-400"}),K.title]}),S.jsx($i,{content:K.description})]},K.id))})]}),(!h||h==="verif")&&Et(xt)&&S.jsxs("section",{className:"mb-16",children:[S.jsx("h2",{className:"text-[10px] uppercase tracking-widest text-white/40 mb-6 bg-white/5 p-3 border-l-2 border-white/20",children:"6. Verification & Quality"}),S.jsxs("div",{className:"space-y-4",children:[(D.TEST||[]).map(K=>S.jsxs("div",{id:K.id,className:"bg-[#0c0c0c] border border-white/10 p-5 border-l-[3px] border-l-rose-500/50",children:[S.jsxs("h3",{className:"font-serif text-[#e0e0e0] mb-2 flex items-center gap-3",children:[S.jsx("button",{onClick:()=>s(K.id),className:`text-[10px] font-mono bg-black px-2 py-1 border border-white/5 uppercase tracking-widest hover:border-rose-500/50 transition-colors ${n===K.id?"text-rose-400 border-rose-500/50":"text-white/40"}`,children:K.id}),N.has(K.id)&&S.jsxs("span",{className:"text-[10px] bg-red-500/10 text-red-400 px-2 py-1 border border-red-500/20 uppercase tracking-widest flex items-center gap-1",children:[S.jsx(tn,{size:10}),"Gap"]}),K.title]}),S.jsx(Sn,{artifact:K}),S.jsx($i,{content:K.description})]},K.id)),(D.TEST||[]).length===0&&S.jsx("p",{className:"italic text-white/40 text-xs",children:"No verification artifacts recorded."})]})]}),(!h||h==="build")&&Et(mt)&&S.jsxs("section",{className:"mb-16",children:[S.jsx("h2",{className:"text-[10px] uppercase tracking-widest text-white/40 mb-6 bg-white/5 p-3 border-l-2 border-white/20",children:"7. Build & Packaging"}),S.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(D.INFRASTRUCTURE||[]).filter(K=>K.subType==="Build"||K.subType==="Package").map(K=>S.jsxs("div",{id:K.id,className:"bg-[#0c0c0c] border border-white/10 p-5 border-l-[3px] border-l-amber-500/50",children:[S.jsxs("h4",{className:"text-white font-bold mb-2 flex items-center gap-2",children:[S.jsx(JD,{size:14,className:"text-amber-400"}),K.title]}),S.jsx(Sn,{artifact:K}),S.jsx($i,{content:K.description})]},K.id)),(D.INFRASTRUCTURE||[]).filter(K=>K.subType==="Build"||K.subType==="Package").length===0&&S.jsx("p",{className:"italic text-white/40 text-xs col-span-2",children:"Build configurations are handled externally."})]})]}),(!h||h==="deploy")&&Et(bt)&&S.jsxs("section",{className:"mb-16",children:[S.jsx("h2",{className:"text-[10px] uppercase tracking-widest text-white/40 mb-6 bg-white/5 p-3 border-l-2 border-white/20",children:"8. Deployment"}),S.jsxs("div",{className:"space-y-6",children:[(D.DEPLOYMENT||[]).map(K=>S.jsxs("div",{id:K.id,className:"bg-[#0c0c0c] border border-white/10 p-6 rounded-sm border-l-[3px] border-l-sky-500/50",children:[S.jsxs("h3",{className:"text-xl font-serif italic text-white mb-4 flex items-center gap-3",children:[S.jsx(aF,{size:20,className:"text-sky-400"}),S.jsx("button",{onClick:()=>s(K.id),className:`text-[10px] font-mono bg-black px-2 py-1 border border-white/5 uppercase tracking-widest hover:border-sky-500/50 transition-colors ${n===K.id?"text-sky-400 border-sky-500/50":"text-white/40"}`,children:K.id}),N.has(K.id)&&S.jsxs("span",{className:"text-[10px] bg-red-500/10 text-red-400 px-2 py-1 border border-red-500/20 uppercase tracking-widest flex items-center gap-1",children:[S.jsx(tn,{size:10}),"Unlinked"]}),K.title]}),S.jsx(Sn,{artifact:K}),S.jsx($i,{content:K.description})]},K.id)),(D.DEPLOYMENT||[]).length===0&&S.jsx("p",{className:"italic text-white/40 text-xs",children:"No deployment records found."})]})]}),(!h||h==="monitor")&&Et(Tt)&&S.jsxs("section",{className:"mb-16",children:[S.jsx("h2",{className:"text-[10px] uppercase tracking-widest text-white/40 mb-6 bg-white/5 p-3 border-l-2 border-white/20",children:"9. Monitoring & Observability"}),S.jsxs("div",{className:"grid grid-cols-1 gap-6",children:[(D.MONITORING||[]).map(K=>S.jsxs("div",{id:K.id,className:"bg-black/40 border border-white/10 p-6 rounded relative overflow-hidden",children:[S.jsx("div",{className:"absolute top-0 right-0 p-4 opacity-5",children:S.jsx(Eu,{size:80})}),S.jsxs("h3",{className:"text-white font-bold mb-3 flex items-center gap-2",children:[S.jsx(Eu,{size:16,className:"text-red-400"}),S.jsx("button",{onClick:()=>s(K.id),className:`text-[10px] font-mono bg-black/40 px-2 py-1 border border-white/5 uppercase tracking-widest hover:border-red-400/50 transition-colors ${n===K.id?"text-red-400 border-red-500/50":"text-white/40"}`,children:K.id}),N.has(K.id)&&S.jsxs("span",{className:"text-[10px] bg-red-500/10 text-red-400 px-2 py-1 border border-red-500/20 uppercase tracking-widest flex items-center gap-1",children:[S.jsx(tn,{size:10}),"Unlinked"]}),K.title]}),S.jsx(Sn,{artifact:K}),S.jsx($i,{content:K.description})]},K.id)),(D.INCIDENT||[]).length>0&&S.jsxs("div",{className:"mt-8",children:[S.jsx("h4",{className:"text-[10px] uppercase tracking-widest text-red-500/60 font-bold mb-4",children:"Historical Incidents (Feedback Loop)"}),S.jsx("div",{className:"space-y-3",children:D.INCIDENT.map(K=>S.jsxs("div",{id:K.id,className:"bg-red-500/5 border border-red-500/10 p-4 rounded text-xs",children:[S.jsxs("span",{className:"font-bold text-red-400 mr-2",children:["[",K.id,"]"]}),S.jsx("span",{className:"text-white/80",children:K.title})]},K.id))})]})]})]}),(!h||h==="maint")&&Et(_t)&&S.jsxs("section",{className:"mb-16",children:[S.jsx("h2",{className:"text-[10px] uppercase tracking-widest text-white/40 mb-6 bg-white/5 p-3 border-l-2 border-white/20",children:"10. Maintenance / Refactoring"}),S.jsxs("div",{className:"space-y-4",children:[(D.MAINTENANCE||[]).filter(K=>K.subType!=="Retirement").map(K=>S.jsxs("div",{id:K.id,className:"bg-[#0c0c0c] border border-white/10 p-5 border-l-[3px] border-l-indigo-500/50",children:[S.jsxs("h3",{className:"text-white font-bold mb-2 flex items-center gap-2",children:[S.jsx(cF,{size:14,className:"text-indigo-400"}),K.title]}),S.jsx(Sn,{artifact:K}),S.jsx($i,{content:K.description})]},K.id)),(D.MAINTENANCE||[]).filter(K=>K.subType!=="Retirement").length===0&&S.jsx("p",{className:"italic text-white/40 text-xs",children:"System is in active health. No maintenance tasks scheduled."})]})]}),(!h||h==="retire")&&Et(Mt)&&S.jsxs("section",{className:"mb-16",children:[S.jsx("h2",{className:"text-[10px] uppercase tracking-widest text-white/40 mb-6 bg-white/5 p-3 border-l-2 border-white/20",children:"11. Retirement / Replacement"}),S.jsxs("div",{className:"space-y-4",children:[(D.MAINTENANCE||[]).filter(K=>K.subType==="Retirement").map(K=>S.jsxs("div",{id:K.id,className:"bg-[#1a0a0a] border border-red-900/30 p-5 border-l-[3px] border-l-red-900",children:[S.jsxs("h3",{className:"text-white/60 font-bold mb-2 flex items-center gap-2",children:[S.jsx(If,{size:14,className:"text-red-900"}),K.title]}),S.jsx(Sn,{artifact:K}),S.jsx($i,{content:K.description})]},K.id)),(D.MAINTENANCE||[]).filter(K=>K.subType==="Retirement").length===0&&S.jsx("p",{className:"italic text-white/40 text-xs",children:"No retired components for this version."})]})]}),(!h||h==="versions")&&S.jsxs("section",{className:"mb-16",children:[S.jsx("h2",{className:"text-[10px] uppercase tracking-widest text-white/40 mb-6 bg-white/5 p-3 border-l-2 border-white/20",children:"12. Releases & Versions"}),S.jsxs("div",{className:"space-y-4",children:[[...$.VERSION||[],...$.SYSTEM_VERSION||[]].map(K=>S.jsxs("div",{id:K.id,className:"bg-[#0c0c0c] border border-white/10 p-5 border-l-[3px] border-l-emerald-500/50",children:[S.jsxs("h3",{className:"font-serif text-lg text-white mb-2 flex items-center gap-3",children:[S.jsx(iF,{size:16,className:"text-emerald-400"}),S.jsx("button",{onClick:()=>s(K.id),className:`text-[10px] font-mono bg-black px-2 py-1 border border-white/5 uppercase tracking-widest hover:border-emerald-500/50 transition-colors ${n===K.id?"text-emerald-400 border-emerald-500/50":"text-white/40"}`,children:K.id}),S.jsx("span",{children:K.title}),K.type==="SYSTEM_VERSION"&&S.jsxs("span",{className:"ml-auto text-xs font-mono text-emerald-400 border border-emerald-500/30 bg-emerald-500/10 px-2 py-1 rounded",children:[K.component," v",K.version]}),K.type==="VERSION"&&S.jsxs("span",{className:"ml-auto text-xs font-mono text-emerald-400 border border-emerald-500/30 bg-emerald-500/10 px-2 py-1 rounded",children:["v",K.version]})]}),S.jsx(Sn,{artifact:K}),S.jsx($i,{content:K.description})]},K.id)),[...$.VERSION||[],...$.SYSTEM_VERSION||[]].length===0&&S.jsx("p",{className:"italic text-white/40 text-xs",children:"No version artifacts."})]})]})]})]})})]})},Tft=()=>{var Y,V;const{changes:t,versions:e,fullGraph:r,systemVersions:i,globalFilters:n,setGlobalFilter:s}=ls(),[o,c]=ot.useState(null),[u,h]=ot.useState(""),[d,p]=ot.useState("ALL"),[m,g]=ot.useState("ALL"),x=n.layer,v=n.owner,b=n.team,w=O=>s("layer",O),T=O=>s("owner",O),k=O=>s("team",O),E=ot.useMemo(()=>{if(!r||!r.artifacts)return{layers:[],owners:[],teams:[]};const O=Array.from(new Set(r.artifacts.map(M=>M.layer).filter(Boolean))),z=Array.from(new Set(r.artifacts.map(M=>{var I;return(I=M.ownership)==null?void 0:I.owner}).filter(Boolean))),X=Array.from(new Set(r.artifacts.map(M=>{var I;return(I=M.ownership)==null?void 0:I.team}).filter(Boolean)));return{layers:O,owners:z,teams:X}},[r]);ot.useEffect(()=>{!o&&(t||[]).length>0&&c(t[0].id)},[t,o]);const L=ot.useMemo(()=>(t||[]).filter(O=>{const z=(O.title||"").toLowerCase().includes((u||"").toLowerCase())||(O.description||"").toLowerCase().includes((u||"").toLowerCase()),X=d==="ALL"||O.type===d,M=(O.affects||[]).some(P=>{var Z,H;const $=r==null?void 0:r.artifacts.find(Q=>Q.id===P);if(!$)return!1;const D=x==="ALL"||$.layer===x,q=v==="ALL"||((Z=$.ownership)==null?void 0:Z.owner)===v,G=b==="ALL"||((H=$.ownership)==null?void 0:H.team)===b;return D&&q&&G}),I=x==="ALL"&&v==="ALL"&&b==="ALL"||M,N=m==="ALL"||(O.affects||[]).some(P=>r==null?void 0:r.relations.some($=>$.from!==P&&$.to!==P?!1:m==="IGNORE_WEAK"?$.strength!=="WEAK":$.strength===m));return z&&X&&I&&N}),[t,u,d,x,v,b,m,r]),A=(t||[]).find(O=>O.id===o),R=ot.useMemo(()=>{if(!A)return[];const O=(i||[]).filter(I=>(A.affects||[]).includes(I.id)),z=(A.affects||[]).map(I=>{var N;return(N=r==null?void 0:r.artifacts.find(P=>P.id===I))==null?void 0:N.systemVersionId}).filter(Boolean),X=(i||[]).filter(I=>z.includes(I.id));return([...O,...X]||[]).filter(I=>I!==void 0).reduce((I,N)=>(I.find(P=>P.id===N.id)||I.push(N),I),[])},[A,i,r]),j=ot.useMemo(()=>!A||!r||!r.artifacts?{}:(A.affects||[]).map(z=>r.artifacts.find(X=>X.id===z)).filter(Boolean).reduce((z,X)=>(z[X.type]=(z[X.type]||0)+1,z),{}),[A,r]);return S.jsxs("div",{className:"h-full w-full bg-[#0a0a0a] text-[#e0e0e0] flex overflow-hidden",children:[S.jsxs("div",{className:"w-80 bg-[#0c0c0c] border-r border-white/10 h-full overflow-y-auto shrink-0 z-10 flex flex-col",children:[S.jsxs("div",{className:"p-6 border-b border-white/10 bg-[#0a0a0a]",children:[S.jsxs("div",{className:"text-[10px] uppercase tracking-widest text-white/60 font-bold flex items-center gap-3 mb-4",children:[S.jsx(Eu,{size:16,className:"text-emerald-400"})," CHANGE TIMELINE"]}),S.jsxs("div",{className:"space-y-3",children:[S.jsxs("div",{className:"relative",children:[S.jsx(Vu,{size:12,className:"absolute left-3 top-1/2 -translate-y-1/2 text-white/30"}),S.jsx("input",{type:"text",placeholder:"Search changes...",value:u,onChange:O=>h(O.target.value),className:"w-full bg-black/40 border border-white/10 rounded-sm py-1.5 pl-8 pr-3 text-[10px] font-mono focus:border-emerald-500/50 outline-none transition-colors"})]}),S.jsx("div",{className:"flex gap-1",children:["ALL","ERROR","FEATURE","EVOLUTION","REFACTOR","ADAPTATION"].map(O=>S.jsx("button",{onClick:()=>p(O),className:`flex-1 text-[8px] font-bold py-1 border transition-all ${d===O?"bg-emerald-500/20 border-emerald-500/40 text-emerald-400":"bg-transparent border-white/5 text-white/30 hover:border-white/20"}`,children:O},O))}),S.jsx("div",{className:"flex gap-1 pt-2 border-t border-white/5",children:["ALL","STRONG","MEDIUM","WEAK","IGNORE_WEAK"].map(O=>S.jsx("button",{onClick:()=>g(O),className:`flex-1 text-[8px] font-bold py-1 border transition-all ${m===O?"bg-amber-500/20 border-amber-500/40 text-amber-400":"bg-transparent border-white/5 text-white/30 hover:border-white/20"}`,title:`Filter by Relation Strength: ${O}`,children:O==="IGNORE_WEAK"?"NO WEAK":O},O))}),S.jsxs("div",{className:"flex gap-1 pt-2 border-t border-white/5",children:[S.jsxs("select",{value:x,onChange:O=>w(O.target.value),className:`bg-transparent py-1 px-1 text-[8px] focus:outline-none cursor-pointer uppercase tracking-wider flex-1 text-center transition-all border ${x!=="ALL"?"bg-blue-500/20 border-blue-500/40 text-blue-400 font-bold":"border-white/10 text-white/50 hover:border-white/20"}`,children:[S.jsx("option",{value:"ALL",className:"bg-[#0c0c0c] text-white font-normal",children:"LAYER"}),E.layers.map(O=>S.jsx("option",{value:O,className:"bg-[#0c0c0c] text-white font-normal",children:O},O))]}),S.jsxs("select",{value:v,onChange:O=>T(O.target.value),className:`bg-transparent py-1 px-1 text-[8px] focus:outline-none cursor-pointer uppercase tracking-wider flex-1 text-center transition-all border ${v!=="ALL"?"bg-blue-500/20 border-blue-500/40 text-blue-400 font-bold":"border-white/10 text-white/50 hover:border-white/20"}`,children:[S.jsx("option",{value:"ALL",className:"bg-[#0c0c0c] text-white font-normal",children:"OWNER"}),E.owners.map(O=>S.jsx("option",{value:O,className:"bg-[#0c0c0c] text-white font-normal",children:O},O))]}),S.jsxs("select",{value:b,onChange:O=>k(O.target.value),className:`bg-transparent py-1 px-1 text-[8px] focus:outline-none cursor-pointer uppercase tracking-wider flex-1 text-center transition-all border ${b!=="ALL"?"bg-blue-500/20 border-blue-500/40 text-blue-400 font-bold":"border-white/10 text-white/50 hover:border-white/20"}`,children:[S.jsx("option",{value:"ALL",className:"bg-[#0c0c0c] text-white font-normal",children:"TEAM"}),E.teams.map(O=>S.jsx("option",{value:O,className:"bg-[#0c0c0c] text-white font-normal",children:O},O))]})]})]})]}),S.jsxs("div",{className:"flex flex-col flex-1",children:[(L||[]).length>0?(L||[]).map(O=>{var M,I;const z=(M=e.find(N=>N.id===O.versionFrom))==null?void 0:M.name,X=(I=e.find(N=>N.id===O.versionTo))==null?void 0:I.name;return S.jsxs("button",{onClick:()=>c(O.id),className:`p-5 text-left border-b border-white/5 hover:bg-white/5 transition-all outline-none ${o===O.id?"bg-white/5 border-l-[3px] border-l-emerald-500 shadow-inner":"border-l-[3px] border-l-transparent"}`,children:[S.jsxs("div",{className:"flex justify-between items-center mb-2",children:[S.jsx("span",{className:`text-[8px] font-bold px-2 py-0.5 border uppercase tracking-widest ${O.type==="ERROR"?"text-red-400 bg-red-400/10 border-red-500/20":O.type==="FEATURE"?"text-emerald-400 bg-emerald-400/10 border-emerald-500/20":O.type==="EVOLUTION"?"text-blue-400 bg-blue-400/10 border-blue-500/20":O.type==="REFACTOR"?"text-amber-400 bg-amber-400/10 border-amber-500/20":O.type==="ADAPTATION"?"text-purple-400 bg-purple-400/10 border-purple-500/20":"text-gray-400 bg-gray-400/10 border-gray-500/20"}`,children:O.type}),S.jsxs("span",{className:"text-[9px] text-white/40 font-mono tracking-tighter truncate max-w-[80px]",children:[z," ",S.jsx(qZ,{size:8,className:"inline opacity-30 mx-0.5"})," ",X]})]}),S.jsx("div",{className:"font-serif text-[#e0e0e0] mb-1 leading-snug text-sm tracking-tight",children:O.title})]},O.id)}):S.jsx("div",{className:"p-8 text-center text-[10px] text-white/20 font-mono italic",children:"No changes found matching criteria"}),(t||[]).length===0&&S.jsx("div",{className:"p-6 text-xs text-white/40 italic text-center",children:"No changes logged."})]})]}),S.jsx("div",{className:"flex-1 overflow-y-auto bg-grid-white/[0.02]",children:A?S.jsxs("div",{className:"max-w-5xl mx-auto p-12",children:[S.jsxs("div",{className:"flex flex-col md:flex-row gap-8 items-start mb-12",children:[S.jsxs("div",{className:"flex-1",children:[S.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[S.jsx("div",{className:"h-[1px] w-8 bg-emerald-500/50"}),S.jsx("span",{className:"text-[10px] font-mono text-emerald-500 uppercase tracking-[0.3em]",children:"Lifecycle Intervention"})]}),S.jsx("h2",{className:"text-4xl font-serif italic tracking-tight mb-4 text-white",children:A.title}),S.jsx("p",{className:"text-sm leading-relaxed opacity-60 max-w-2xl font-sans",children:A.description}),(R||[]).length>0&&S.jsxs("div",{className:"mt-8 flex flex-col gap-3",children:[S.jsx("span",{className:"text-[9px] uppercase tracking-widest text-white/20 font-bold",children:"Related Systems"}),S.jsx("div",{className:"flex gap-2 flex-wrap",children:(R||[]).map(O=>S.jsxs("div",{className:"flex items-center gap-3 bg-emerald-500/5 border border-emerald-500/20 px-3 py-1.5 rounded-sm",children:[S.jsx("div",{className:"w-1.5 h-1.5 bg-emerald-400 rounded-full animate-pulse"}),S.jsxs("div",{className:"flex flex-col",children:[S.jsx("span",{className:"text-[10px] font-bold text-white/80",children:O.component}),S.jsx("span",{className:"text-[9px] font-mono text-white/40",children:O.version})]})]},O.id))})]})]}),S.jsxs("div",{className:"w-full md:w-64 bg-white/[0.02] border border-white/10 p-6 rounded-sm backdrop-blur-sm",children:[S.jsxs("div",{className:"text-[9px] uppercase tracking-widest text-white/30 font-bold mb-4 flex items-center gap-2",children:[S.jsx(FK,{size:12,className:"text-amber-400"})," Magnitude of Change"]}),S.jsx("div",{className:"space-y-3",children:Object.entries(j||{}).length>0?Object.entries(j||{}).map(([O,z])=>S.jsxs("div",{className:"flex justify-between items-center bg-black/40 px-3 py-1.5 border border-white/5",children:[S.jsx("span",{className:"text-[9px] font-mono text-white/50",children:O}),S.jsxs("span",{className:"text-[10px] font-bold text-emerald-400",children:["+",z]})]},O)):S.jsx("div",{className:"text-[10px] text-white/20 italic",children:"No nodes affected"})})]})]}),S.jsxs("div",{className:"grid grid-cols-1 gap-12",children:[S.jsxs("section",{children:[S.jsxs("h3",{className:"text-[10px] uppercase tracking-[0.3em] text-white/40 mb-8 flex items-center gap-4",children:[S.jsx("span",{children:"Affected Node Inventory"}),S.jsx("div",{className:"flex-1 h-[1px] bg-white/5 shadow-[0_0_10px_rgba(255,255,255,0.05)]"})]}),S.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:(A.affects||[]).map(O=>{var M,I;const z=r==null?void 0:r.artifacts.find(N=>N.id===O),X=i.find(N=>N.id===O);return!z&&!X?S.jsxs("div",{className:"bg-[#0c0c0c] p-6 border border-white/5 flex items-center gap-3 text-red-400/40 opacity-50",children:[S.jsx(oF,{size:16}),S.jsxs("span",{className:"text-[11px] italic",children:["Artifact ",O," (Not in current snapshot)"]})]},O):S.jsxs("div",{className:"bg-[#0c0c0c] p-6 border border-white/5 hover:border-emerald-500/30 transition-all flex items-start flex-col group relative overflow-hidden",children:[S.jsx("div",{className:"absolute top-0 right-0 p-2 opacity-0 group-hover:opacity-100 transition-opacity",children:S.jsx(Vu,{size:14,className:"text-white/20"})}),z?S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:"flex items-center gap-3 mb-4 w-full",children:[S.jsx("span",{className:"text-[8px] font-bold px-2 py-0.5 bg-white/5 border border-white/10 uppercase tracking-widest text-[#888]",children:z.type}),S.jsx("span",{className:"font-mono text-[9px] text-emerald-500/50",children:z.id})]}),S.jsx("div",{className:"font-serif text-[#f0f0f0] text-base mb-3 group-hover:text-emerald-400 transition-colors",children:z.title}),S.jsxs("div",{className:"flex flex-col gap-2",children:[S.jsxs("div",{className:"flex gap-2 items-center mb-1",children:[z.layer&&S.jsx("span",{className:"text-[8px] border border-emerald-500/20 text-emerald-500/60 font-mono px-1 rounded-sm uppercase",children:z.layer}),((M=z.ownership)==null?void 0:M.owner)&&S.jsxs("span",{className:"text-[8px] text-blue-400 border border-blue-400/20 bg-blue-400/5 font-mono px-1 rounded-sm",children:["OWNER: ",z.ownership.owner]}),((I=z.ownership)==null?void 0:I.team)&&S.jsxs("span",{className:"text-[8px] text-emerald-400 border border-emerald-400/20 bg-emerald-400/5 font-mono px-1 rounded-sm",children:["TEAM: ",z.ownership.team]})]}),S.jsx("div",{className:"text-[11px] text-[#e0e0e0]/40 leading-relaxed font-sans line-clamp-3",children:z.description})]})]}):X&&S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:"flex items-center gap-3 mb-4 w-full",children:[S.jsx("span",{className:"text-[8px] font-bold px-2 py-0.5 bg-emerald-500/10 border border-emerald-500/20 uppercase tracking-widest text-emerald-400",children:"SYSTEM ENTITY"}),S.jsx("span",{className:"font-mono text-[9px] text-emerald-500/50",children:X.id})]}),S.jsx("div",{className:"font-serif text-[#f0f0f0] text-base mb-3 group-hover:text-emerald-400 transition-colors",children:X.component}),S.jsxs("div",{className:"text-[11px] text-[#e0e0e0]/40 leading-relaxed font-sans",children:["Core system component released on ",new Date(X.releaseDate).toLocaleDateString(),"."]})]})]},O)})})]}),S.jsx("section",{className:"bg-emerald-500/[0.02] border-y border-white/5 p-12 -mx-12",children:S.jsxs("div",{className:"max-w-3xl",children:[S.jsx("h4",{className:"text-[10px] uppercase tracking-widest text-emerald-500/60 font-bold mb-4",children:"Architectural Integrity Report"}),S.jsxs("p",{className:"text-xs text-white/40 leading-relaxed italic",children:["This intervention enabled the transition between ",S.jsx("span",{className:"text-white/60",children:(Y=(e||[]).find(O=>O.id===A.versionFrom))==null?void 0:Y.name})," and ",S.jsx("span",{className:"text-white/60",children:(V=(e||[]).find(O=>O.id===A.versionTo))==null?void 0:V.name}),". The impact is primarily concentrated at the ",S.jsxs("span",{className:"text-white/60",children:[Object.keys(j||{}).join(", ")||"Core"," layer"]}),", affecting critical systems such as ",S.jsx("span",{className:"text-white/60",children:(R||[]).map(O=>O.component).join(", ")||"Base Components"}),".",(()=>{switch(A.type){case"ERROR":return" This change addresses technical debt or a previously identified operational failure.";case"FEATURE":return" The implementation adds capabilities that expand the existing architecture.";case"EVOLUTION":return" This change provides gradual improvements, security, or compliance updates.";case"REFACTOR":return" This change focuses on code re-structuring without altering external behavior.";case"ADAPTATION":return" This change adjusts the system to new environmental or integration constraints.";default:return" This change modifies the system architecture."}})()]})]})})]})]}):S.jsxs("div",{className:"h-full flex flex-col items-center justify-center opacity-20 gap-4",children:[S.jsx(sK,{size:64,className:"animate-pulse"}),S.jsx("div",{className:"text-[10px] uppercase tracking-[0.5em] font-bold",children:"Select a change for analysis"})]})})]})};function Eft(t,e){const r=t.length,i=t.filter(c=>c.severity==="HIGH").length,n=t.filter(c=>c.severity==="MEDIUM").length,s=t.filter(c=>c.severity==="LOW").length;let o=`# OpenLAG GAPs Report
599
+
600
+ Generated at: ${new Date().toISOString()}
601
+
602
+ Scope: ${e?"filtered":"all"}
603
+
604
+ ## Summary
605
+
606
+ - Total issues: ${r}
607
+ - Critical: ${i}
608
+ - Warning: ${n}
609
+ - Info: ${s}
610
+
611
+ ## Issues
612
+
613
+ `;return r===0?(o+=`*No GAPs found for the current exact filters. Great job!*
614
+ `,o):(t.forEach((c,u)=>{const h=c.artifact;o+=`### ${u+1}. ${h.id} — ${c.severity}
615
+
616
+ `,o+=`- Artifact: ${h.title||"Untitled"}
617
+ `,o+=`- Type: ${h.type}
618
+ `,h.status&&(o+=`- Status: ${h.status}
619
+ `),o+=`- Relation: N/A
620
+ `,o+=`- Reason: ${c.message}
621
+
622
+ `}),o)}function Aft(t,e){const r=new Blob([e],{type:"text/markdown;charset=utf-8;"}),i=URL.createObjectURL(r),n=document.createElement("a");n.href=i,n.setAttribute("download",t),document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(i)}const Bft=()=>{const{fullGraph:t,setView:e,selectedArtifactId:r,setSelectedArtifact:i,globalFilters:n,setGlobalFilter:s}=ls(),[o,c]=ot.useState(""),[u,h]=ot.useState("ALL"),[d,p]=ot.useState("ALL"),m=n.layer,g=n.owner,x=n.team,v=z=>s("layer",z),b=z=>s("owner",z),w=z=>s("team",z),T=ot.useMemo(()=>{if(!t||!t.artifacts)return{layers:[],owners:[],teams:[]};const z=new Set,X=new Set,M=new Set;return t.artifacts.forEach(I=>{var N,P;I.layer&&z.add(I.layer),(N=I.ownership)!=null&&N.owner&&X.add(I.ownership.owner),(P=I.ownership)!=null&&P.team&&M.add(I.ownership.team)}),{layers:Array.from(z).sort(),owners:Array.from(X).sort(),teams:Array.from(M).sort()}},[t]),k=ot.useMemo(()=>{if(!t)return[];const z=new Set;t.relations.forEach(M=>{z.add(M.from),z.add(M.to)});const X=[];return t.artifacts.forEach(M=>{var I,N;z.has(M.id)||X.push({artifact:M,type:"ORPHAN",message:"No relationships defined",severity:"HIGH"}),M.layer||X.push({artifact:M,type:"NO_LAYER",message:"Missing layer classification",severity:"MEDIUM"}),(I=M.ownership)!=null&&I.owner||X.push({artifact:M,type:"NO_OWNER",message:"Missing ownership (owner)",severity:"HIGH"}),(N=M.ownership)!=null&&N.team||X.push({artifact:M,type:"NO_TEAM",message:"Missing organizational team",severity:"LOW"}),(!M.description||M.description.length<5)&&X.push({artifact:M,type:"NO_DESCRIPTION",message:"Description is too short or missing",severity:"MEDIUM"})}),X},[t]),E=ot.useMemo(()=>k.filter(z=>{var P,$;const X=z.artifact;if(m!=="ALL"&&X.layer!==m||g!=="ALL"&&((P=X.ownership)==null?void 0:P.owner)!==g||x!=="ALL"&&(($=X.ownership)==null?void 0:$.team)!==x||r&&X.id!==r)return!1;const M=X.id.toLowerCase().includes(o.toLowerCase())||X.title.toLowerCase().includes(o.toLowerCase())||(X.description||"").toLowerCase().includes(o.toLowerCase()),I=u==="ALL"||X.type===u,N=d==="ALL"||z.type===d;return M&&I&&N}),[k,o,u,d,m,g,x,r]),L=ot.useMemo(()=>["REQUIREMENT","USE_CASE","DESIGN","COMPONENT","CODE_ENTITY","TEST","DOCUMENTATION","INCIDENT","INFRASTRUCTURE","DEPLOYMENT","MONITORING","MAINTENANCE"],[]),A=ot.useMemo(()=>Array.from(new Set(k.map(z=>z.type))),[k]),R=z=>{i(z),e("docs")},j=o!==""||u!=="ALL"||d!=="ALL"||m!=="ALL"||g!=="ALL"||x!=="ALL"||r!==null,Y=()=>{const z=Eft(E,j);Aft("openlag-gaps-report.md",z)};if(!t)return S.jsx("div",{className:"p-8 text-white/50",children:"Loading..."});const V=({severity:z})=>{switch(z){case"HIGH":return S.jsx(oF,{size:14,className:"text-red-500/80"});case"MEDIUM":return S.jsx(lF,{size:14,className:"text-amber-500/80"});case"LOW":return S.jsx(fK,{size:14,className:"text-blue-500/80"});default:return S.jsx(tn,{size:14,className:"text-white/40"})}},O=z=>{switch(z){case"HIGH":return"border-red-500/20 bg-red-500/5 hover:border-red-500/40 text-red-400";case"MEDIUM":return"border-amber-500/20 bg-amber-500/5 hover:border-amber-500/40 text-amber-400";case"LOW":return"border-blue-500/20 bg-blue-500/5 hover:border-blue-500/40 text-blue-400";default:return"border-white/10 hover:border-white/30 text-white/60"}};return S.jsxs("div",{className:"h-full w-full bg-[#0a0a0a] flex flex-col overflow-hidden",children:[S.jsx("div",{className:"p-8 lg:px-16 pt-12 shrink-0 border-b border-white/5 bg-[#0c0c0c]/30",children:S.jsxs("div",{className:"flex flex-col md:flex-row md:items-start justify-between gap-6 mb-8",children:[S.jsxs("div",{className:"flex-1",children:[S.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[S.jsx("h1",{className:"text-3xl font-serif italic tracking-tight",children:"Traceability GAPs"}),S.jsxs("div",{className:"bg-red-500/20 border border-red-500/30 text-red-400 text-[10px] font-mono px-2 py-0.5 rounded uppercase tracking-wider flex items-center gap-1.5 shadow-[0_0_15px_rgba(239,68,68,0.1)]",children:[S.jsx(tn,{size:12}),E.length," Violations Found"]})]}),S.jsx("p",{className:"text-xs text-white/40 max-w-2xl leading-relaxed",children:"These artifacts have been flagged for structural or documentation violations such as missing links, absent ownership, or incomplete descriptions. Clean these up to improve the system's traceability."})]}),S.jsxs("div",{className:"flex flex-col items-end gap-2 shrink-0",children:[S.jsxs("div",{className:"flex gap-2 p-0.5 bg-white/5 border border-white/10 rounded-md w-full",children:[S.jsxs("div",{className:"relative flex items-center flex-1",children:[S.jsx(Vu,{className:"absolute left-3 text-white/20",size:12}),S.jsx("input",{type:"text",placeholder:"Search...",value:o,onChange:z=>c(z.target.value),className:"bg-transparent border-none py-1.5 pl-8 pr-3 text-[10px] text-white focus:outline-none w-full placeholder:text-white/10"})]}),S.jsx("div",{className:"w-px h-4 bg-white/10 self-center"}),S.jsxs("select",{value:d,onChange:z=>p(z.target.value),className:`bg-transparent py-1.5 px-3 text-[10px] outline-none cursor-pointer uppercase tracking-widest transition-all border rounded-sm flex-1 ${d!=="ALL"?"bg-blue-500/20 border-blue-500/40 text-blue-400 font-bold":"border-transparent border-l-white/10 text-white/50 hover:border-white/20"}`,children:[S.jsx("option",{value:"ALL",className:"bg-[#0c0c0c] text-white font-normal",children:"All Violations"}),A.map(z=>S.jsx("option",{value:z,className:"bg-[#0c0c0c] text-white font-normal",children:z.replace("_"," ")},z))]}),S.jsxs("select",{value:u,onChange:z=>h(z.target.value),className:`bg-transparent py-1.5 px-3 text-[10px] outline-none cursor-pointer uppercase tracking-widest transition-all border rounded-sm flex-1 ${u!=="ALL"?"bg-blue-500/20 border-blue-500/40 text-blue-400 font-bold":"border-transparent border-l-white/10 text-white/50 hover:border-white/20"}`,children:[S.jsx("option",{value:"ALL",className:"bg-[#0c0c0c] text-white font-normal",children:"All Types"}),L.map(z=>S.jsx("option",{value:z,className:"bg-[#0c0c0c] text-white font-normal",children:z.replace("_"," ")},z))]}),S.jsxs("select",{value:r||"",onChange:z=>i(z.target.value||null),className:`bg-transparent py-1.5 px-3 text-[10px] outline-none cursor-pointer tracking-widest transition-all border rounded-sm flex-1 font-mono max-w-[150px] ${r?"bg-emerald-500/20 border-emerald-500/40 text-emerald-400 font-bold":"border-transparent border-l-white/10 text-white/50 hover:border-white/20"}`,children:[S.jsx("option",{value:"",className:"bg-[#0c0c0c] text-white font-sans uppercase",children:"Artifact..."}),((t==null?void 0:t.artifacts)||[]).filter(z=>u==="ALL"||z.type===u).sort((z,X)=>z.id.localeCompare(X.id)).map(z=>S.jsx("option",{value:z.id,className:"bg-[#0c0c0c] text-white",children:z.id},z.id))]})]}),S.jsxs("div",{className:"flex gap-1 w-full lg:w-auto items-center",children:[S.jsxs("select",{value:m,onChange:z=>v(z.target.value),className:`bg-transparent py-1 px-1 text-[9px] focus:outline-none cursor-pointer uppercase tracking-wider flex-1 text-center transition-all border rounded-sm ${m!=="ALL"?"bg-blue-500/20 border-blue-500/40 text-blue-400 font-bold":"border-white/10 text-white/50 hover:border-white/20"}`,children:[S.jsx("option",{value:"ALL",className:"bg-[#0c0c0c] text-white font-normal",children:"LAYER"}),T.layers.map(z=>S.jsx("option",{value:z,className:"bg-[#0c0c0c] text-white font-normal",children:z},z))]}),S.jsxs("select",{value:g,onChange:z=>b(z.target.value),className:`bg-transparent py-1 px-1 text-[9px] focus:outline-none cursor-pointer uppercase tracking-wider flex-1 text-center transition-all border rounded-sm ${g!=="ALL"?"bg-blue-500/20 border-blue-500/40 text-blue-400 font-bold":"border-white/10 text-white/50 hover:border-white/20"}`,children:[S.jsx("option",{value:"ALL",className:"bg-[#0c0c0c] text-white font-normal",children:"OWNER"}),T.owners.map(z=>S.jsx("option",{value:z,className:"bg-[#0c0c0c] text-white font-normal",children:z},z))]}),S.jsxs("select",{value:x,onChange:z=>w(z.target.value),className:`bg-transparent py-1 px-1 text-[9px] focus:outline-none cursor-pointer uppercase tracking-wider flex-1 text-center transition-all border rounded-sm ${x!=="ALL"?"bg-blue-500/20 border-blue-500/40 text-blue-400 font-bold":"border-white/10 text-white/50 hover:border-white/20"}`,children:[S.jsx("option",{value:"ALL",className:"bg-[#0c0c0c] text-white font-normal",children:"TEAM"}),T.teams.map(z=>S.jsx("option",{value:z,className:"bg-[#0c0c0c] text-white font-normal",children:z},z))]}),S.jsxs("button",{onClick:Y,className:"bg-emerald-500/20 text-emerald-400 hover:bg-emerald-500/30 border border-emerald-500/40 font-mono text-[9px] uppercase tracking-widest px-3 py-1 flex items-center gap-1.5 rounded-sm transition-all h-full",title:"Download GAPs Report",children:[S.jsx(JZ,{size:12}),"Generar reporte"]})]})]})]})}),S.jsx("div",{className:"flex-1 overflow-y-auto p-8 lg:px-16 pb-12 custom-scrollbar",children:E.length===0?S.jsxs("div",{className:"h-64 flex flex-col items-center justify-center border border-dashed border-white/10 rounded-lg",children:[S.jsx(If,{className:"text-white/10 mb-4",size:48,strokeWidth:1}),S.jsx("p",{className:"text-white/30 text-sm italic",children:"No violations found matching filters."})]}):S.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-6",children:E.map((z,X)=>{var I,N;const M=z.artifact;return S.jsxs("div",{className:`border p-5 rounded-sm transition-all group relative overflow-hidden flex flex-col ${O(z.severity)}`,children:[S.jsx("div",{className:"absolute top-0 right-0 p-3 opacity-0 group-hover:opacity-100 transition-opacity",children:S.jsx("button",{onClick:()=>R(M.id),className:"p-2 bg-white/5 hover:bg-emerald-500/20 text-white/40 hover:text-emerald-400 rounded transition-colors",title:"View in Documentation",children:S.jsx(eK,{size:14})})}),S.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[S.jsx("div",{className:`p-2 rounded border bg-black/40 ${O(z.severity)}`,children:S.jsx(V,{severity:z.severity})}),S.jsxs("div",{className:"flex flex-col gap-1",children:[S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("span",{className:"text-[10px] font-bold uppercase tracking-widest leading-none",children:z.type}),M.layer&&S.jsx("span",{className:"text-[8px] bg-white/5 text-white/50 px-1 rounded-sm uppercase tracking-widest",children:M.layer})]}),S.jsx("span",{className:"text-[9px] font-mono text-white/20 mt-1 uppercase tracking-tighter italic leading-none",children:M.id})]})]}),S.jsxs("div",{className:"mb-4",children:[S.jsx("div",{className:"text-[10px] font-mono text-white/60 mb-1 opacity-60",children:"Message"}),S.jsx("div",{className:"font-serif text-sm leading-tight",children:z.message})]}),S.jsx("hr",{className:"border-white/5 my-4"}),S.jsx("h3",{className:"font-serif text-lg text-white mb-2 leading-tight",children:M.title}),(((I=M.ownership)==null?void 0:I.owner)||((N=M.ownership)==null?void 0:N.team))&&S.jsxs("div",{className:"flex gap-2 mb-2",children:[M.ownership.owner&&S.jsxs("span",{className:"text-[9px] text-blue-400 border border-blue-400/20 bg-blue-400/5 px-1 rounded-sm font-mono",children:["OWNER: ",M.ownership.owner]}),M.ownership.team&&S.jsxs("span",{className:"text-[9px] text-emerald-400 border border-emerald-400/20 bg-emerald-400/5 px-1 rounded-sm font-mono",children:["TEAM: ",M.ownership.team]})]}),S.jsx("p",{className:"text-xs text-white/40 leading-relaxed line-clamp-2 mb-6 flex-1 min-h-[36px]",children:M.description}),S.jsxs("div",{className:"flex items-center justify-between border-t border-white/5 pt-4 mt-auto",children:[S.jsxs("div",{className:"flex items-center gap-4",children:[S.jsxs("div",{className:"flex flex-col",children:[S.jsx("span",{className:"text-[8px] uppercase tracking-tighter text-white/20",children:"Artifact Type"}),S.jsx("span",{className:"text-[10px] text-white/60 font-mono",children:M.type})]}),M.subType&&S.jsxs("div",{className:"flex flex-col border-l border-white/10 pl-4",children:[S.jsx("span",{className:"text-[8px] uppercase tracking-tighter text-white/20",children:"Subtype"}),S.jsx("span",{className:"text-[10px] text-white/60 font-mono",children:M.subType})]})]}),S.jsxs("button",{onClick:()=>R(M.id),className:"text-[10px] text-emerald-400/60 hover:text-emerald-400 font-bold uppercase tracking-widest flex items-center gap-1.5 transition-colors",children:["Open Docs",S.jsx(ff,{size:12})]})]})]},`${M.id}-${z.type}-${X}`)})})})]})},Lft=()=>{const{settings:t}=ls(),e=t.language||"EN",i={EN:{title:"Management Guide",desc:"Instructions for maintaining the architectural graph, documenting artifacts, and managing the project lifecycle according to OpenLAG v0.1 Specification.",langBtn:"Switch to Spanish",layerTaxonomy:"Layer Taxonomy & Artifacts",layerTaxonomyDesc:"OpenLAG classifies artifacts into semantic layers to understand their abstraction level and valid relations.",businessLayer:"Business Layer",businessLayerDesc:"Defines what to build and why. Align business goals without dictating implementation.",architectureLayer:"Architecture Layer",architectureLayerDesc:"Defines technical design and constraints of the system.",implementationLayer:"Implementation Layer",implementationLayerDesc:"Models code, tests, databases and its traceability.",operationsLayer:"Operations Layer",operationsLayerDesc:"Models infrastructure, deployment, and runtime health observability.",docsLayer:"Documentation Layer",docsLayerDesc:"Cross-cutting knowledge context.",relations:"Relationship Semantics & Strength",relationsDesc:"Relations define a semantic weight (Strength) and category purpose between artifacts.",strongRelations:"Strong",strongRelationsDesc:"Direct coupling: IMPLEMENTS, TESTS, DEPENDS_ON, BLOCKS, BREAKS, DEFINES, VALIDATES, REPLACES",mediumRelations:"Medium",mediumRelationsDesc:"Descriptive/Flow: DERIVES_FROM, USES, IMPACTS, JUSTIFIES, REFINES, MONITORS, DEPLOYS",weakRelations:"Weak",weakRelationsDesc:"Semantic/Loose: RELATES_TO, DOCUMENTS",changeTypes:"Change Types",changeTypesDesc:"Defines the nature of an architectural change or modification:",error:{label:"ERROR",desc:"Fixes for bugs or critical technical debt."},feature:{label:"FEATURE",desc:"New capabilities impacting architecture."},evolution:{label:"EVOLUTION",desc:"Gradual improvements, security or compliance updates."},refactor:{label:"REFACTOR",desc:"Code restructurings without changing external behavior."},adaptation:{label:"ADAPTATION",desc:"Changes to adjust to new environmental/integration constraints."},frontmatter:"Official Markdown Format",frontmatterDesc:"Each artifact requires a YAML frontmatter. Mandatory fields: id, type, status, title.",statusFlow:"Lifecycle Status Flow",statusFlowDesc:"Evolution of artifacts. The system tolerates missing relations in 'draft', but expects full traceability in 'closed'.",versions:"Project & System Versions",versionsDesc:"The docs/versions/ directory controls the global timeline and component versions.",bestPractices:"Best Practices & ID Conventions",bestPracticesDesc:"IDs must be unique and stable (e.g. REQ-001, CODE-023). Prefix defines the logical type.",tutorialTitle:"Step-by-Step Tutorial",tutorialDesc:"Follow these steps to structure a complete project using the OpenLAG specification.",step1Title:"Step 1: The Global Versions",step1Desc:"Always start by defining global versions of the project creating separate files inside docs/versions/ (e.g. docs/versions/v-1.md).",step2Title:"Step 2: Business Requirements",step2Desc:"Create the Business Layer artifacts (e.g., REQ-001) defining what needs to be built.",step3Title:"Step 3: Architecture & Design",step3Desc:"Define the Architecture Layer (e.g., DESIGN-001) and link it to the Business requirement.",step4Title:"Step 4: Implementation & Operations",step4Desc:"Finally, define Code and Infra (e.g., CODE-001, INFRA-001) linking them back up the chain.",step5Title:"Step 5: System Versions",step5Desc:"Document external libraries and components in individual files inside docs/versions/ (e.g. sv-lib-1.md) using SYSTEM_VERSION artifacts.",step6Title:"Step 6: Changes & Tracking",step6Desc:"Add CHANGE type artifacts inside docs/changes/ to govern modifications, bugs, or major refactors affecting the graph."},ES:{title:"Guía de Gestión",desc:"Instrucciones para mantener el grafo arquitectónico, documentar artefactos y gestionar el ciclo de vida según la Especificación OpenLAG v0.1.",langBtn:"Cambiar a Inglés",layerTaxonomy:"Taxonomía de Capas y Artefactos",layerTaxonomyDesc:"OpenLAG clasifica los artefactos en capas semánticas para entender su nivel de abstracción y relaciones válidas.",businessLayer:"Business Layer",businessLayerDesc:"Define qué construir y por qué. Alinea negocio sin dictar implementación.",architectureLayer:"Architecture Layer",architectureLayerDesc:"Define el diseño y los límites técnicos del sistema.",implementationLayer:"Implementation Layer",implementationLayerDesc:"Modela código, tests, bases de datos y su trazabilidad.",operationsLayer:"Operations Layer",operationsLayerDesc:"Modela infraestructura, despliegue y estado de ejecución/observabilidad.",docsLayer:"Documentation Layer",docsLayerDesc:"Contexto y conocimiento transversal.",relations:"Semántica y Peso de Relaciones",relationsDesc:"Las relaciones definen un peso semántico (Strength) y categoría entre los artefactos.",strongRelations:"Fuerte (Strong)",strongRelationsDesc:"Acoplamiento directo: IMPLEMENTS, TESTS, DEPENDS_ON, BLOCKS, BREAKS, DEFINES, VALIDATES, REPLACES",mediumRelations:"Media (Medium)",mediumRelationsDesc:"Descriptivas o de flujo: DERIVES_FROM, USES, IMPACTS, JUSTIFIES, REFINES, MONITORS, DEPLOYS",weakRelations:"Débil (Weak)",weakRelationsDesc:"Semánticas y laxas: RELATES_TO, DOCUMENTS",changeTypes:"Tipos de Cambios (Change Types)",changeTypesDesc:"Naturaleza de una modificación arquitectónica:",error:{label:"ERROR",desc:"Corrección de fallos o deuda técnica crítica."},feature:{label:"FEATURE",desc:"Nuevas capacidades con impacto en la arquitectura."},evolution:{label:"EVOLUTION",desc:"Mejoras graduales, seguridad o actualizaciones de cumplimiento."},refactor:{label:"REFACTOR",desc:"Reestructuraciones sin alterar el comportamiento externo."},adaptation:{label:"ADAPTATION",desc:"Ajustes para nuevas integraciones o restricciones del entorno."},frontmatter:"Formato Oficial Markdown",frontmatterDesc:"Cada artefacto requiere un YAML frontmatter. Campos obligatorios: id, type, status, title.",statusFlow:"Estados y Ciclo de Vida",statusFlowDesc:"En estado 'draft' se permiten huérfanos, pero en 'closed' se exige trazabilidad completa.",versions:"Versiones del Sistema y Proyecto",versionsDesc:"El directorio docs/versions/ define las versiones temporales globales y de componentes.",bestPractices:"Buenas Prácticas y Convención de IDs",bestPracticesDesc:"Los IDs deben ser únicos y estables (Ej: REQ-001). El prefijo define su tipo lógico de forma clara.",tutorialTitle:"Tutorial Paso a Paso",tutorialDesc:"Sigue estos pasos para estructurar un proyecto completo usando la especificación OpenLAG.",step1Title:"Paso 1: Versiones Globales",step1Desc:"Comienza siempre definiendo versiones a nivel global del proyecto creando archivos separados en docs/versions/ (ej. docs/versions/v-1.md).",step2Title:"Paso 2: Requisitos de Negocio",step2Desc:"Crea los artefactos de la Capa de Negocio (Ej. REQ-001) para definir qué se debe construir.",step3Title:"Paso 3: Arquitectura y Diseño",step3Desc:"Define la Capa de Arquitectura (Ej. DESIGN-001) y enlaza con los requisitos de negocio.",step4Title:"Paso 4: Implementación y Operaciones",step4Desc:"Finalmente, documenta Código e Infra (Ej. CODE-001, INFRA-001) trazando los enlaces hacia arriba.",step5Title:"Paso 5: Versiones de Sistemas",step5Desc:"Documenta en archivos individuales dentro de docs/versions/ (ej. sv-lib-1.md) los componentes y librerías externas mediante artefactos de tipo SYSTEM_VERSION.",step6Title:"Paso 6: Registro de Cambios",step6Desc:"Añade en docs/changes/ artefactos de tipo CHANGE para gobernar las modificaciones, errores o refactors mayores que afecten el grafo."}}[e];return S.jsxs("div",{className:"h-full w-full bg-[#0a0a0a] flex flex-col overflow-hidden",children:[S.jsxs("div",{className:"p-8 lg:px-16 pt-12 shrink-0 border-b border-white/5 bg-[#0c0c0c]/30",children:[S.jsx("div",{className:"flex items-center justify-between mb-2",children:S.jsxs("div",{className:"flex items-center gap-3",children:[S.jsx("h1",{className:"text-3xl font-serif italic tracking-tight",children:i.title}),S.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-0.5 bg-blue-500/10 border border-blue-500/20 text-blue-400 text-[10px] font-mono rounded uppercase tracking-widest",children:[S.jsx(hK,{size:12}),e==="EN"?"English":"Español"]})]})}),S.jsx("p",{className:"text-xs text-white/40 max-w-2xl leading-relaxed",children:i.desc})]}),S.jsxs("div",{className:"flex-1 overflow-y-auto p-8 lg:px-16 pb-20 custom-scrollbar space-y-16",children:[S.jsxs("section",{children:[S.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[S.jsx("div",{className:"p-2 bg-pink-500/10 rounded border border-pink-500/20",children:S.jsx(rF,{size:18,className:"text-pink-400"})}),S.jsx("h2",{className:"text-xl font-medium tracking-tight",children:i.layerTaxonomy})]}),S.jsx("p",{className:"text-sm text-white/50 mb-8 leading-relaxed max-w-3xl",children:i.layerTaxonomyDesc}),S.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[S.jsxs("div",{className:"bg-[#0c0c0c] border border-white/5 p-6 rounded relative overflow-hidden group",children:[S.jsx("h3",{className:"text-sm font-bold text-white/80 mb-2 uppercase tracking-widest",children:i.businessLayer}),S.jsx("p",{className:"text-[11px] text-white/40 leading-relaxed mb-4",children:i.businessLayerDesc}),S.jsx("div",{className:"flex flex-wrap gap-2",children:["PROJECT","EPIC","FEATURE","REQUIREMENT","BUSINESS_RULE","USE_CASE"].map(n=>S.jsx("span",{className:"text-[9px] bg-white/5 px-1.5 py-0.5 rounded text-white/60",children:n},n))})]}),S.jsxs("div",{className:"bg-[#0c0c0c] border border-white/5 p-6 rounded relative overflow-hidden group",children:[S.jsx("h3",{className:"text-sm font-bold text-white/80 mb-2 uppercase tracking-widest",children:i.architectureLayer}),S.jsx("p",{className:"text-[11px] text-white/40 leading-relaxed mb-4",children:i.architectureLayerDesc}),S.jsx("div",{className:"flex flex-wrap gap-2",children:["DESIGN","DECISION","COMPONENT","API"].map(n=>S.jsx("span",{className:"text-[9px] bg-white/5 px-1.5 py-0.5 rounded text-white/60",children:n},n))})]}),S.jsxs("div",{className:"bg-[#0c0c0c] border border-white/5 p-6 rounded relative overflow-hidden group",children:[S.jsx("h3",{className:"text-sm font-bold text-white/80 mb-2 uppercase tracking-widest",children:i.implementationLayer}),S.jsx("p",{className:"text-[11px] text-white/40 leading-relaxed mb-4",children:i.implementationLayerDesc}),S.jsx("div",{className:"flex flex-wrap gap-2",children:["CODE_ENTITY","TEST_CASE","DATABASE_ENTITY","CHANGE","BUG","RISK","TEST"].map(n=>S.jsx("span",{className:"text-[9px] bg-white/5 px-1.5 py-0.5 rounded text-white/60",children:n},n))})]}),S.jsxs("div",{className:"bg-[#0c0c0c] border border-white/5 p-6 rounded relative overflow-hidden group",children:[S.jsx("h3",{className:"text-sm font-bold text-white/80 mb-2 uppercase tracking-widest",children:i.operationsLayer}),S.jsx("p",{className:"text-[11px] text-white/40 leading-relaxed mb-4",children:i.operationsLayerDesc}),S.jsx("div",{className:"flex flex-wrap gap-2",children:["INFRASTRUCTURE","DEPLOYMENT","MONITORING","INCIDENT","MAINTENANCE"].map(n=>S.jsx("span",{className:"text-[9px] bg-white/5 px-1.5 py-0.5 rounded text-white/60",children:n},n))})]}),S.jsxs("div",{className:"bg-[#0c0c0c] border border-white/5 p-6 rounded relative overflow-hidden group",children:[S.jsx("h3",{className:"text-sm font-bold text-white/80 mb-2 uppercase tracking-widest",children:i.docsLayer}),S.jsx("p",{className:"text-[11px] text-white/40 leading-relaxed mb-4",children:i.docsLayerDesc}),S.jsx("div",{className:"flex flex-wrap gap-2",children:["GLOSSARY_TERM","DOCUMENTATION"].map(n=>S.jsx("span",{className:"text-[9px] bg-white/5 px-1.5 py-0.5 rounded text-white/60",children:n},n))})]})]})]}),S.jsxs("section",{children:[S.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[S.jsx("div",{className:"p-2 bg-indigo-500/10 rounded border border-indigo-500/20",children:S.jsx(mK,{size:18,className:"text-indigo-400"})}),S.jsx("h2",{className:"text-xl font-medium tracking-tight",children:i.relations})]}),S.jsx("p",{className:"text-sm text-white/50 mb-8 leading-relaxed max-w-3xl",children:i.relationsDesc}),S.jsxs("div",{className:"space-y-4",children:[S.jsxs("div",{className:"bg-[#0c0c0c] border border-white/5 p-5 rounded flex items-start gap-4",children:[S.jsx("div",{className:"w-2 h-2 rounded-full bg-red-500 mt-1.5 shrink-0"}),S.jsxs("div",{children:[S.jsx("h4",{className:"text-sm font-bold text-white mb-1",children:i.strongRelations}),S.jsx("p",{className:"text-xs text-white/60 font-mono leading-relaxed",children:i.strongRelationsDesc})]})]}),S.jsxs("div",{className:"bg-[#0c0c0c] border border-white/5 p-5 rounded flex items-start gap-4",children:[S.jsx("div",{className:"w-2 h-2 rounded-full bg-amber-500 mt-1.5 shrink-0"}),S.jsxs("div",{children:[S.jsx("h4",{className:"text-sm font-bold text-white mb-1",children:i.mediumRelations}),S.jsx("p",{className:"text-xs text-white/60 font-mono leading-relaxed",children:i.mediumRelationsDesc})]})]}),S.jsxs("div",{className:"bg-[#0c0c0c] border border-white/5 p-5 rounded flex items-start gap-4",children:[S.jsx("div",{className:"w-2 h-2 rounded-full bg-blue-500 mt-1.5 shrink-0"}),S.jsxs("div",{children:[S.jsx("h4",{className:"text-sm font-bold text-white mb-1",children:i.weakRelations}),S.jsx("p",{className:"text-xs text-white/60 font-mono leading-relaxed",children:i.weakRelationsDesc})]})]})]})]}),S.jsxs("section",{children:[S.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[S.jsx("div",{className:"p-2 bg-indigo-500/10 rounded border border-indigo-500/20",children:S.jsx(n3,{size:18,className:"text-indigo-400"})}),S.jsx("h2",{className:"text-xl font-medium tracking-tight",children:i.changeTypes})]}),S.jsx("p",{className:"text-sm text-white/50 mb-8 leading-relaxed max-w-3xl",children:i.changeTypesDesc}),S.jsx("div",{className:"space-y-4",children:S.jsx("div",{className:"bg-[#0c0c0c] border border-white/5 p-5 rounded",children:S.jsxs("ul",{className:"space-y-3",children:[S.jsxs("li",{className:"text-sm text-white/80 font-mono",children:[S.jsx("span",{className:"text-rose-400 font-bold p-1 bg-rose-500/10 rounded mr-2",children:i.error.label})," ",i.error.desc]}),S.jsxs("li",{className:"text-sm text-white/80 font-mono",children:[S.jsx("span",{className:"text-emerald-400 font-bold p-1 bg-emerald-500/10 rounded mr-2",children:i.feature.label})," ",i.feature.desc]}),S.jsxs("li",{className:"text-sm text-white/80 font-mono",children:[S.jsx("span",{className:"text-blue-400 font-bold p-1 bg-blue-500/10 rounded mr-2",children:i.evolution.label})," ",i.evolution.desc]}),S.jsxs("li",{className:"text-sm text-white/80 font-mono",children:[S.jsx("span",{className:"text-amber-400 font-bold p-1 bg-amber-500/10 rounded mr-2",children:i.refactor.label})," ",i.refactor.desc]}),S.jsxs("li",{className:"text-sm text-white/80 font-mono",children:[S.jsx("span",{className:"text-purple-400 font-bold p-1 bg-purple-500/10 rounded mr-2",children:i.adaptation.label})," ",i.adaptation.desc]})]})})})]}),S.jsxs("section",{children:[S.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[S.jsx("div",{className:"p-2 bg-emerald-500/10 rounded border border-emerald-500/20",children:S.jsx(lK,{size:18,className:"text-emerald-400"})}),S.jsx("h2",{className:"text-xl font-medium tracking-tight",children:i.statusFlow})]}),S.jsx("p",{className:"text-sm text-white/50 mb-8 leading-relaxed max-w-3xl",children:i.statusFlowDesc}),S.jsx("div",{className:"flex flex-col md:flex-row items-center gap-4",children:["draft","in_progress","ready","closed","deprecated"].map((n,s)=>S.jsxs(ul.Fragment,{children:[S.jsx("div",{className:"bg-[#0c0c0c] border border-white/10 px-4 py-2 rounded text-xs font-mono text-white/80",children:n}),s<4&&S.jsx("div",{className:"h-4 w-px md:h-px md:w-8 md:flex-1 bg-white/20"})]},n))})]}),S.jsxs("section",{children:[S.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[S.jsx("div",{className:"p-2 bg-purple-500/10 rounded border border-purple-500/20",children:S.jsx(n3,{size:18,className:"text-purple-400"})}),S.jsx("h2",{className:"text-xl font-medium tracking-tight",children:i.frontmatter})]}),S.jsx("p",{className:"text-sm text-white/50 mb-8 leading-relaxed max-w-3xl",children:i.frontmatterDesc}),S.jsxs("div",{className:"bg-black/40 border border-white/5 rounded-lg overflow-hidden",children:[S.jsx("div",{className:"p-4 bg-white/[0.03] border-b border-white/5 flex items-center justify-between",children:S.jsx("span",{className:"text-[10px] font-mono text-white/40 italic",children:"docs/requirements/REQ-001.md"})}),S.jsx("div",{className:"p-6",children:S.jsx("pre",{className:"text-[11px] font-mono leading-relaxed text-white/60 select-all",children:`---
623
+ id: REQ-001
624
+ type: REQUIREMENT
625
+ status: draft
626
+ layer: BUSINESS
627
+ title: Generar graph-data.json
628
+ version: v1
629
+ ownership:
630
+ owner: dony
631
+ team: architecture
632
+ maintainers:
633
+ - backend-team
634
+ tags:
635
+ - parser
636
+ - graph
637
+ relations:
638
+ - type: IMPLEMENTS
639
+ target: CODE-001
640
+ strength: STRONG
641
+ category: TRACEABILITY
642
+ ---
643
+
644
+ # Generar graph-data.json
645
+ ...contenido descriptivo...`})})]})]}),S.jsxs("section",{children:[S.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[S.jsx("div",{className:"p-2 bg-amber-500/10 rounded border border-amber-500/20",children:S.jsx(lF,{size:18,className:"text-amber-400"})}),S.jsx("h2",{className:"text-xl font-medium tracking-tight",children:i.bestPractices})]}),S.jsx("p",{className:"text-sm text-white/50 mb-8 leading-relaxed max-w-3xl",children:i.bestPracticesDesc})]}),S.jsxs("section",{className:"border-t border-white/5 pt-16",children:[S.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[S.jsx("div",{className:"p-2 bg-blue-500/10 rounded border border-blue-500/20",children:S.jsx(XZ,{size:18,className:"text-blue-400"})}),S.jsx("h2",{className:"text-xl font-medium tracking-tight",children:i.tutorialTitle})]}),S.jsx("p",{className:"text-sm text-white/50 mb-8 leading-relaxed max-w-3xl",children:i.tutorialDesc}),S.jsxs("div",{className:"space-y-8",children:[S.jsxs("div",{className:"bg-[#0c0c0c] border border-white/5 rounded-lg overflow-hidden flex flex-col",children:[S.jsxs("div",{className:"p-4 bg-white/[0.03] border-b border-white/5 flex items-center justify-between",children:[S.jsx("h4",{className:"text-sm font-bold text-white/80",children:i.step1Title}),S.jsx("span",{className:"text-[10px] font-mono text-white/40 italic",children:"docs/versions/v-1.md"})]}),S.jsxs("div",{className:"p-6",children:[S.jsx("p",{className:"text-xs text-white/50 mb-4",children:i.step1Desc}),S.jsx("pre",{className:"text-[11px] font-mono leading-relaxed text-white/60 bg-black/40 p-4 rounded border border-white/5 overflow-x-auto",children:`---
646
+ id: v-1
647
+ type: VERSION
648
+ name: "1.0.0"
649
+ timestamp: "2026-05-06"
650
+ parentVersion: null
651
+ layer: DOCUMENTATION
652
+ title: "Project Release v1.0.0"
653
+ description: "Initial stable release of the project architecture and features."
654
+ ownership:
655
+ owner: pcaro
656
+ team: architecture
657
+ relations:
658
+ - type: DOCUMENTS
659
+ to: req-func-1
660
+ ---`})]})]}),S.jsxs("div",{className:"bg-[#0c0c0c] border border-white/5 rounded-lg overflow-hidden flex flex-col",children:[S.jsxs("div",{className:"p-4 bg-white/[0.03] border-b border-white/5 flex items-center justify-between",children:[S.jsx("h4",{className:"text-sm font-bold text-white/80",children:i.step2Title}),S.jsx("span",{className:"text-[10px] font-mono text-white/40 italic",children:"docs/requirements/REQ-001.md"})]}),S.jsxs("div",{className:"p-6",children:[S.jsx("p",{className:"text-xs text-white/50 mb-4",children:i.step2Desc}),S.jsx("pre",{className:"text-[11px] font-mono leading-relaxed text-blue-400/80 bg-black/40 p-4 rounded border border-white/5 overflow-x-auto",children:`---
661
+ id: REQ-001
662
+ type: REQUIREMENT
663
+ status: ready
664
+ layer: BUSINESS
665
+ title: User Authentication
666
+ version: v1
667
+ ---
668
+
669
+ # Authentication Requirement
670
+ The system must allow users to log in securely.`})]})]}),S.jsxs("div",{className:"bg-[#0c0c0c] border border-white/5 rounded-lg overflow-hidden flex flex-col",children:[S.jsxs("div",{className:"p-4 bg-white/[0.03] border-b border-white/5 flex items-center justify-between",children:[S.jsx("h4",{className:"text-sm font-bold text-white/80",children:i.step3Title}),S.jsx("span",{className:"text-[10px] font-mono text-white/40 italic",children:"docs/architecture/DESIGN-auth.md"})]}),S.jsxs("div",{className:"p-6",children:[S.jsx("p",{className:"text-xs text-white/50 mb-4",children:i.step3Desc}),S.jsx("pre",{className:"text-[11px] font-mono leading-relaxed text-purple-400/80 bg-black/40 p-4 rounded border border-white/5 overflow-x-auto",children:`---
671
+ id: DESIGN-auth
672
+ type: DESIGN
673
+ status: ready
674
+ layer: ARCHITECTURE
675
+ title: Auth Architecture
676
+ version: v1
677
+ relations:
678
+ - type: IMPLEMENTS
679
+ target: REQ-001
680
+ strength: STRONG
681
+ category: TRACEABILITY
682
+ ---
683
+
684
+ # Auth Design
685
+ We will use JWT tokens for authentication...`})]})]}),S.jsxs("div",{className:"bg-[#0c0c0c] border border-white/5 rounded-lg overflow-hidden flex flex-col",children:[S.jsxs("div",{className:"p-4 bg-white/[0.03] border-b border-white/5 flex items-center justify-between",children:[S.jsx("h4",{className:"text-sm font-bold text-white/80",children:i.step4Title}),S.jsx("span",{className:"text-[10px] font-mono text-white/40 italic",children:"docs/implementation/CODE-auth-service.md"})]}),S.jsxs("div",{className:"p-6",children:[S.jsx("p",{className:"text-xs text-white/50 mb-4",children:i.step4Desc}),S.jsx("pre",{className:"text-[11px] font-mono leading-relaxed text-emerald-400/80 bg-black/40 p-4 rounded border border-white/5 overflow-x-auto",children:`---
686
+ id: CODE-auth-service
687
+ type: CODE_ENTITY
688
+ status: in_progress
689
+ layer: IMPLEMENTATION
690
+ title: AuthService.ts
691
+ version: v1
692
+ relations:
693
+ - type: IMPLEMENTS
694
+ target: DESIGN-auth
695
+ strength: STRONG
696
+ category: TRACEABILITY
697
+ ---
698
+
699
+ # AuthService
700
+ Implementation of the login endpoint...`})]})]}),S.jsxs("div",{className:"bg-[#0c0c0c] border border-white/5 rounded-lg overflow-hidden flex flex-col",children:[S.jsxs("div",{className:"p-4 bg-white/[0.03] border-b border-white/5 flex items-center justify-between",children:[S.jsx("h4",{className:"text-sm font-bold text-white/80",children:i.step5Title}),S.jsx("span",{className:"text-[10px] font-mono text-white/40 italic",children:"docs/versions/sv-db-1.md"})]}),S.jsxs("div",{className:"p-6",children:[S.jsx("p",{className:"text-xs text-white/50 mb-4",children:i.step5Desc}),S.jsx("pre",{className:"text-[11px] font-mono leading-relaxed text-yellow-400/80 bg-black/40 p-4 rounded border border-white/5 overflow-x-auto",children:`---
701
+ id: sv-db-pg-15
702
+ type: SYSTEM_VERSION
703
+ component: PostgreSQL Engine
704
+ version: 15.4
705
+ releaseDate: "2023-08-10"
706
+ layer: OPERATIONS
707
+ title: "PostgreSQL Database Engine"
708
+ description: "Used for primary relational data storage."
709
+ ownership:
710
+ owner: pcaro
711
+ team: architecture
712
+ relations:
713
+ - type: RELATES_TO
714
+ to: arch-overview
715
+ ---
716
+
717
+ # PostgreSQL Engine
718
+ Used for primary relational data storage.`})]})]}),S.jsxs("div",{className:"bg-[#0c0c0c] border border-white/5 rounded-lg overflow-hidden flex flex-col",children:[S.jsxs("div",{className:"p-4 bg-white/[0.03] border-b border-white/5 flex items-center justify-between",children:[S.jsx("h4",{className:"text-sm font-bold text-white/80",children:i.step6Title}),S.jsx("span",{className:"text-[10px] font-mono text-white/40 italic",children:"docs/changes/ch-auth-pool.md"})]}),S.jsxs("div",{className:"p-6",children:[S.jsx("p",{className:"text-xs text-white/50 mb-4",children:i.step6Desc}),S.jsx("pre",{className:"text-[11px] font-mono leading-relaxed text-rose-400/80 bg-black/40 p-4 rounded border border-white/5 overflow-x-auto",children:`---
719
+ id: ch-auth-pool
720
+ type: CHANGE
721
+ changeType: ERROR
722
+ title: Resolve Auth API Timeouts
723
+ affects: ["CODE-auth-service", "sv-db-pg-15"]
724
+ versionFrom: "v-1"
725
+ versionTo: "v-2"
726
+ ---
727
+
728
+ # Auth Pool Issue
729
+ Database connection pool was insufficient for v1 traffic volume.`})]})]})]})]})]})]})},Mft=()=>{const{settings:t,updateSettings:e}=ls(),r=n=>{e({graphFocusDepth:parseInt(n.target.value)})},i=n=>{e({docsFocusDepth:parseInt(n.target.value)})};return S.jsx("div",{className:"h-full w-full bg-[#0a0a0a] text-white p-8 overflow-y-auto",children:S.jsxs("div",{className:"max-w-3xl mx-auto",children:[S.jsxs("div",{className:"flex items-center gap-3 mb-8 border-b border-white/10 pb-6",children:[S.jsx("div",{className:"p-3 bg-indigo-500/10 border border-indigo-500/20 rounded-md",children:S.jsx(sF,{className:"text-indigo-400",size:24})}),S.jsxs("div",{children:[S.jsx("h1",{className:"text-2xl font-serif",children:"Settings"}),S.jsx("p",{className:"text-white/40 text-sm mt-1",children:"Configure workspace preferences and focus behaviors."})]})]}),S.jsxs("div",{className:"space-y-8",children:[S.jsxs("section",{className:"bg-[#111] border border-white/10 p-6 rounded-md",children:[S.jsx("h2",{className:"text-lg font-bold mb-4 flex items-center gap-2",children:"Global Preferences"}),S.jsx("div",{className:"space-y-4",children:S.jsxs("div",{className:"flex justify-between items-start border-t border-white/5 pt-4",children:[S.jsxs("div",{children:[S.jsx("h3",{className:"font-medium text-sm",children:"Language"}),S.jsx("p",{className:"text-xs text-white/50 mt-1 max-w-sm",children:"Set the preferred language for guides and documentation interfaces where supported."})]}),S.jsxs("select",{value:t.language||"EN",onChange:n=>e({language:n.target.value}),className:"bg-black text-white border border-white/20 rounded px-3 py-1.5 text-sm outline-none focus:border-indigo-500 transition-colors",children:[S.jsx("option",{value:"EN",className:"bg-black text-white",children:"English"}),S.jsx("option",{value:"ES",className:"bg-black text-white",children:"Español"})]})]})})]}),S.jsxs("section",{className:"bg-[#111] border border-white/10 p-6 rounded-md",children:[S.jsx("h2",{className:"text-lg font-bold mb-4 flex items-center gap-2",children:"Graph View Configuration"}),S.jsxs("div",{className:"space-y-4",children:[S.jsxs("div",{className:"flex justify-between items-start border-t border-white/5 pt-4",children:[S.jsxs("div",{children:[S.jsx("h3",{className:"font-medium text-sm",children:"Selection Focus Depth (Subgraph Exploration)"}),S.jsx("p",{className:"text-xs text-white/50 mt-1 max-w-sm",children:"How many levels of relationships to project into the subgraph when an artifact is focused."})]}),S.jsxs("select",{value:t.graphFocusDepth,onChange:r,className:"bg-black border border-white/20 rounded px-3 py-1.5 text-sm outline-none focus:border-indigo-500 transition-colors",children:[S.jsx("option",{value:1,children:"1 Level (Direct)"}),S.jsx("option",{value:2,children:"2 Levels"}),S.jsx("option",{value:3,children:"3 Levels"})]})]}),S.jsxs("div",{className:"flex justify-between items-start border-t border-white/5 pt-4",children:[S.jsxs("div",{children:[S.jsx("h3",{className:"font-medium text-sm",children:"Show Weak Relations"}),S.jsx("p",{className:"text-xs text-white/50 mt-1 max-w-sm",children:"Display semantic, generic, or weakly coupled relations (e.g., RELATES_TO, DOCUMENTS). Turn off to reduce noise and hubs."})]}),S.jsxs("label",{className:"relative inline-flex items-center cursor-pointer",children:[S.jsx("input",{type:"checkbox",value:"",className:"sr-only peer",checked:t.showWeakRelations,onChange:n=>e({showWeakRelations:n.target.checked})}),S.jsx("div",{className:"w-11 h-6 bg-white/10 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-indigo-500"})]})]})]})]}),S.jsxs("section",{className:"bg-[#111] border border-white/10 p-6 rounded-md",children:[S.jsx("h2",{className:"text-lg font-bold mb-4 flex items-center gap-2",children:"Documentation View Configuration"}),S.jsxs("div",{className:"space-y-4",children:[S.jsxs("div",{className:"flex justify-between items-start border-t border-white/5 pt-4",children:[S.jsxs("div",{children:[S.jsx("h3",{className:"font-medium text-sm",children:"Default Focus Mode"}),S.jsx("p",{className:"text-xs text-white/50 mt-1 max-w-sm",children:"Whether the impact focus filter should be ON or OFF by default when opening Documentation view."})]}),S.jsxs("label",{className:"relative inline-flex items-center cursor-pointer",children:[S.jsx("input",{type:"checkbox",value:"",className:"sr-only peer",checked:t.defaultDocsFocusMode,onChange:n=>e({defaultDocsFocusMode:n.target.checked})}),S.jsx("div",{className:"w-11 h-6 bg-white/10 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-emerald-500/50"})]})]}),S.jsxs("div",{className:"flex justify-between items-start border-t border-white/5 pt-4",children:[S.jsxs("div",{children:[S.jsx("h3",{className:"font-medium text-sm",children:"Documentation Focus Depth"}),S.jsx("p",{className:"text-xs text-white/50 mt-1 max-w-sm",children:"How many levels of relationships to include in the documentation when Focus Mode is ON."})]}),S.jsxs("select",{value:t.docsFocusDepth,onChange:i,className:"bg-black border border-white/20 rounded px-3 py-1.5 text-sm outline-none focus:border-indigo-500 transition-colors",children:[S.jsx("option",{value:1,children:"1 Level (Direct Dependencies)"}),S.jsx("option",{value:2,children:"2 Levels"}),S.jsx("option",{value:3,children:"3 Levels"}),S.jsx("option",{value:0,children:"Infinite (Full Impact Graph)"})]})]})]})]})]})]})})};function Nft(){const{initializeStore:t,versions:e,currentVersionId:r,setVersion:i,activeView:n,setView:s,isLoading:o,systemVersions:c}=ls();return ot.useEffect(()=>{t()},[t]),S.jsxs("div",{className:"flex h-screen w-screen overflow-hidden bg-[#0a0a0a] text-[#e0e0e0] font-sans selection:bg-emerald-500/30 print-block",children:[S.jsxs("nav",{className:"w-16 flex flex-col items-center py-6 bg-[#0c0c0c] text-white/40 border-r border-white/10 shrink-0",children:[S.jsx("div",{className:"w-8 h-8 bg-white flex items-center justify-center rounded-sm mb-8",children:S.jsx("div",{className:"w-4 h-4 border-2 border-black rotate-45"})}),S.jsxs("div",{className:"flex flex-col gap-6 w-full items-center",children:[S.jsx("button",{onClick:()=>s("graph"),className:`transition-all hover:text-white hover:opacity-100 ${n==="graph"?"text-white opacity-100":"opacity-40"}`,title:"Graph View",children:S.jsx(bK,{size:20,strokeWidth:1.5})}),S.jsx("button",{onClick:()=>s("docs"),className:`transition-all hover:text-white hover:opacity-100 ${n==="docs"?"text-white opacity-100":"opacity-40"}`,title:"Documentation Engine",children:S.jsx(tF,{size:20,strokeWidth:1.5})}),S.jsx("button",{onClick:()=>s("impact"),className:`transition-all hover:text-white hover:opacity-100 ${n==="impact"?"text-white opacity-100":"opacity-40"}`,title:"Impact Analysis",children:S.jsx(eF,{size:20,strokeWidth:1.5})}),S.jsx("button",{onClick:()=>s("orphans"),className:`transition-all hover:text-white hover:opacity-100 ${n==="orphans"?"text-red-400 opacity-100":"opacity-40"}`,title:"Traceability GAPs",children:S.jsx(tn,{size:20,strokeWidth:1.5})}),S.jsx("button",{onClick:()=>s("guide"),className:`transition-all hover:text-white hover:opacity-100 ${n==="guide"?"text-amber-400 opacity-100":"opacity-40"}`,title:"Usage Guide",children:S.jsx(jZ,{size:20,strokeWidth:1.5})})]}),S.jsx("div",{className:"mt-auto",children:S.jsx("button",{onClick:()=>s("settings"),className:`transition-all hover:text-white hover:opacity-100 ${n==="settings"?"text-white opacity-100":"opacity-40"}`,title:"Settings",children:S.jsx(sF,{size:20,strokeWidth:1.5})})})]}),S.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[S.jsxs("header",{className:"h-16 bg-[#0f0f0f] border-b border-white/10 flex items-center px-8 justify-between shrink-0 z-10",children:[S.jsxs("div",{className:"font-serif text-xl italic tracking-tight flex items-center gap-2",children:["OpenLAG ",S.jsx("span",{className:"text-xs font-mono opacity-50 ml-2 not-italic",children:"| Lifecycle Engine"})]}),S.jsxs("div",{className:"flex items-center gap-6",children:[S.jsxs("div",{className:"flex items-center gap-3",children:[S.jsx("div",{className:"flex flex-col items-end",children:S.jsx("span",{className:"text-[10px] opacity-40 uppercase tracking-widest",children:"Doc Snapshot"})}),S.jsx("select",{value:r||"",onChange:u=>i(u.target.value),className:"bg-[#0c0c0c] border border-white/20 text-xs font-mono text-emerald-400 rounded-sm px-3 py-1.5 outline-none cursor-pointer hover:bg-white/5 transition-colors focus:border-emerald-400",children:e.map(u=>S.jsxs("option",{value:u.id,className:"bg-[#0c0c0c] text-white",children:[u.name," (",new Date(u.timestamp).toLocaleDateString(),")"]},u.id))})]}),S.jsx("div",{className:"h-6 w-[1px] bg-white/10"}),S.jsxs("div",{className:"flex items-center gap-3 group relative",children:[S.jsx("div",{className:"p-2 bg-emerald-500/10 rounded-full border border-emerald-500/20",children:S.jsx(ZZ,{size:14,className:"text-emerald-400"})}),S.jsxs("div",{className:"flex flex-col",children:[S.jsx("span",{className:"text-[10px] opacity-40 uppercase tracking-widest leading-none",children:"System State"}),S.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[S.jsxs("span",{className:"text-[10px] text-white/80 font-bold tracking-tight",children:[c.length," Components Active"]}),S.jsx("div",{className:"w-1.5 h-1.5 bg-emerald-500 rounded-full animate-pulse shadow-[0_0_8px_rgba(16,185,129,0.5)]"})]})]}),S.jsxs("div",{className:"absolute top-full right-0 mt-2 w-64 bg-[#0f0f0f] border border-white/10 p-4 rounded-sm shadow-2xl opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none z-50",children:[S.jsx("div",{className:"text-[9px] uppercase tracking-widest text-[#888] font-bold mb-3 border-b border-white/5 pb-2",children:"Active Inventory"}),S.jsxs("div",{className:"space-y-2",children:[c.map(u=>S.jsxs("div",{className:"flex justify-between items-center text-[10px]",children:[S.jsx("span",{className:"text-white/60",children:u.component}),S.jsx("span",{className:"font-mono text-emerald-500/60",children:u.version})]},u.id)),c.length===0&&S.jsx("div",{className:"text-white/20 italic",children:"No system components logged."})]})]})]})]})]}),S.jsxs("main",{className:"flex-1 relative overflow-hidden",children:[o&&!r?S.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-white/50 backdrop-blur-sm z-50",children:S.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})}):null,n==="graph"&&S.jsx(PK,{}),n==="docs"&&S.jsx(_ft,{}),n==="impact"&&S.jsx(Tft,{}),n==="orphans"&&S.jsx(Bft,{}),n==="guide"&&S.jsx(Lft,{}),n==="settings"&&S.jsx(Mft,{})]})]})]})}i9.createRoot(document.getElementById("root")).render(S.jsx(ot.StrictMode,{children:S.jsx(Nft,{})}));export{gI as $,qft as A,rs as B,xit as C,nr as D,Knt as E,gS as F,iI as G,dot as H,yat as I,Sst as J,int as K,Xu as L,Fft as M,Zp as N,Nnt as O,fI as P,a4 as Q,lat as R,c2 as S,hot as T,yh as U,pn as V,dt as W,ft as X,jnt as Y,iot as Z,B as _,Ynt as a,Mct as a$,nat as a0,c4 as a1,l4 as a2,Yft as a3,$ft as a4,Uft as a5,Hft as a6,zft as a7,Vw as a8,Gft as a9,_q as aA,Pst as aB,$st as aC,jst as aD,zst as aE,Tq as aF,Gst as aG,Ust as aH,Hst as aI,Vst as aJ,Yst as aK,Fst as aL,_st as aM,Jr as aN,xa as aO,lu as aP,mS as aQ,Nq as aR,no as aS,Fq as aT,VF as aU,rut as aV,ipt as aW,apt as aX,ept as aY,Pt as aZ,rpt as a_,jft as aa,rl as ab,Wft as ac,Vft as ad,Pft as ae,tct as af,q8 as ag,npt as ah,re as ai,On as aj,fS as ak,It as al,Blt as am,sS as an,oS as ao,vf as ap,Ist as aq,qst as ar,kq as as,Sq as at,wq as au,Ost as av,Mst as aw,Nst as ax,Rst as ay,Dst as az,Gnt as b,Tct as b0,_ct as b1,aat as b2,Dft as b3,Wl as b4,wh as b5,Elt as b6,Tlt as b7,An as b8,_u as b9,jt as ba,Iq as bb,pi as bc,oH as bd,W2 as be,TO as bf,ah as bg,BO as bh,Rft as bi,yit as bj,be as bk,_e as c,Xt as d,pI as e,Ar as f,Wnt as g,fa as h,hn as i,Ast as j,xh as k,St as l,Rq as m,Ift as n,opt as o,Xnt as p,Qnt as q,spt as r,Vnt as s,kst as t,an as u,vct as v,got as w,Xft as x,Pl as y,Unt as z};