colonynote 1.0.0-beta.8 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/README.zh.md +6 -6
- package/bin/colonynote.js +48 -81
- package/dist/client/assets/arc-Ezd9GmKE.js +1 -0
- package/dist/client/assets/architecture-YZFGNWBL-Dns9u0e5.js +1 -0
- package/dist/client/assets/architectureDiagram-Q4EWVU46-BmLJotd1.js +36 -0
- package/dist/client/assets/array-C0548cPn.js +1 -0
- package/dist/client/assets/blockDiagram-DXYQGD6D-ZqrNO8HM.js +132 -0
- package/dist/client/assets/c4Diagram-AHTNJAMY-BJWyymhT.js +10 -0
- package/dist/client/assets/channel-C-zEXS3V.js +1 -0
- package/dist/client/assets/chunk-2KRD3SAO-B1G2AY6H.js +1 -0
- package/dist/client/assets/chunk-4BX2VUAB-mLNpdiNK.js +1 -0
- package/dist/client/assets/chunk-4TB4RGXK-BsRi3qra.js +206 -0
- package/dist/client/assets/chunk-55IACEB6-BkCqG_Mc.js +1 -0
- package/dist/client/assets/chunk-67CJDMHE-Cz-mqdi4.js +1 -0
- package/dist/client/assets/chunk-7N4EOEYR-BFd0Oy6w.js +1 -0
- package/dist/client/assets/chunk-AA7GKIK3-D77gJjH7.js +1 -0
- package/dist/client/assets/chunk-CIAEETIT-DxQTGSBH.js +1 -0
- package/dist/client/assets/chunk-Dlc7tRH4.js +1 -0
- package/dist/client/assets/chunk-EDXVE4YY-DglU8MxC.js +1 -0
- package/dist/client/assets/{chunk-FMBD7UC4-aAnHvYnB.js → chunk-FMBD7UC4-B_1_v8GP.js} +2 -2
- package/dist/client/assets/chunk-FOC6F5B3-CEMl5H_U.js +1 -0
- package/dist/client/assets/chunk-K5T4RW27-Dzh5Xx8O.js +94 -0
- package/dist/client/assets/chunk-KGLVRYIC-Be2dMs_W.js +1 -0
- package/dist/client/assets/chunk-LIHQZDEY-BGBWPKdn.js +1 -0
- package/dist/client/assets/chunk-ORNJ4GCN-W_NT507t.js +1 -0
- package/dist/client/assets/chunk-OYMX7WX6-BV6RCL_j.js +231 -0
- package/dist/client/assets/chunk-QZHKN3VN-B0CMV9NG.js +1 -0
- package/dist/client/assets/chunk-YZCP3GAM-CDitFgw3.js +1 -0
- package/dist/client/assets/classDiagram-6PBFFD2Q-XeqY_hie.js +1 -0
- package/dist/client/assets/classDiagram-v2-HSJHXN6E-D5yY32qd.js +1 -0
- package/dist/client/assets/clone-AnN0418d.js +1 -0
- package/dist/client/assets/cose-bilkent-S5V4N54A-YQtZwRYb.js +1 -0
- package/dist/client/assets/cytoscape.esm-DT0IEibP.js +321 -0
- package/dist/client/assets/dagre-Cs_hK0RA.js +1 -0
- package/dist/client/assets/dagre-KV5264BT-DvMqAy8J.js +4 -0
- package/dist/client/assets/defaultLocale-ClcAPJ5U.js +1 -0
- package/dist/client/assets/diagram-5BDNPKRD-BwrN8bUG.js +10 -0
- package/dist/client/assets/diagram-G4DWMVQ6-Cqaj-jnn.js +24 -0
- package/dist/client/assets/diagram-MMDJMWI5-DNA312HK.js +43 -0
- package/dist/client/assets/diagram-TYMM5635-BujcYOHW.js +24 -0
- package/dist/client/assets/erDiagram-SMLLAGMA-ZjZZH-zN.js +85 -0
- package/dist/client/assets/flatten-DA7ZzNkq.js +1 -0
- package/dist/client/assets/flowDiagram-DWJPFMVM-CeIGHswO.js +162 -0
- package/dist/client/assets/ganttDiagram-T4ZO3ILL-BeGMFmHq.js +292 -0
- package/dist/client/assets/gitGraph-7Q5UKJZL-Dib3-KZp.js +1 -0
- package/dist/client/assets/gitGraphDiagram-UUTBAWPF-2fnUKQRp.js +106 -0
- package/dist/client/assets/graphlib-DRri47Ms.js +1 -0
- package/dist/client/assets/identity-CQcu21F9.js +1 -0
- package/dist/client/assets/index-DKyd5iCm.css +2 -0
- package/dist/client/assets/index-Ts5WhtRB.js +574 -0
- package/dist/client/assets/info-OMHHGYJF-oQ5--hGK.js +1 -0
- package/dist/client/assets/infoDiagram-42DDH7IO-KL_uq6JQ.js +2 -0
- package/dist/client/assets/init-TU6eJ00_.js +1 -0
- package/dist/client/assets/ishikawaDiagram-UXIWVN3A-DYWG2VdA.js +70 -0
- package/dist/client/assets/journeyDiagram-VCZTEJTY-DT7IVz7z.js +139 -0
- package/dist/client/assets/kanban-definition-6JOO6SKY-CHPPLj8n.js +89 -0
- package/dist/client/assets/katex-HOUACuRw.js +257 -0
- package/dist/client/assets/linear-CizMozZt.js +1 -0
- package/dist/client/assets/mermaid-parser.core-Bpqvb2jv.js +4 -0
- package/dist/client/assets/mindmap-definition-QFDTVHPH-Dov77gi8.js +96 -0
- package/dist/client/assets/ordinal-DCsgWfZW.js +1 -0
- package/dist/client/assets/packet-4T2RLAQJ-Cuyyn0tM.js +1 -0
- package/dist/client/assets/path-yo4Xej8w.js +1 -0
- package/dist/client/assets/pie-ZZUOXDRM-DajTPYmY.js +1 -0
- package/dist/client/assets/pieDiagram-DEJITSTG-DwmqzTu7.js +30 -0
- package/dist/client/assets/quadrantDiagram-34T5L4WZ-CdCBXbvb.js +7 -0
- package/dist/client/assets/radar-PYXPWWZC-DWe78GFc.js +1 -0
- package/dist/client/assets/reduce-DV5GRzs4.js +1 -0
- package/dist/client/assets/requirementDiagram-MS252O5E-32eCbPFl.js +84 -0
- package/dist/client/assets/rough.esm-DulVNktb.js +1 -0
- package/dist/client/assets/sankeyDiagram-XADWPNL6-BBDL_wPZ.js +10 -0
- package/dist/client/assets/sequenceDiagram-FGHM5R23-Ck7ukfb7.js +157 -0
- package/dist/client/assets/stateDiagram-FHFEXIEX-BKJrixhp.js +1 -0
- package/dist/client/assets/stateDiagram-v2-QKLJ7IA2-Bio1QBYF.js +1 -0
- package/dist/client/assets/timeline-definition-GMOUNBTQ-B_D-q7Kc.js +120 -0
- package/dist/client/assets/treeView-SZITEDCU-BQ27_5HI.js +1 -0
- package/dist/client/assets/treemap-W4RFUUIX-D2TpEq--.js +1 -0
- package/dist/client/assets/vennDiagram-DHZGUBPP-CvHqv3h2.js +34 -0
- package/dist/client/assets/wardley-RL74JXVD-DoAmhKVb.js +1 -0
- package/dist/client/assets/wardleyDiagram-NUSXRM2D-CYRpN4xk.js +20 -0
- package/dist/client/assets/xychartDiagram-5P7HB3ND-Dh0MaaMp.js +7 -0
- package/dist/client/index.html +7 -2
- package/dist/config.js +122 -52
- package/dist/server/api.js +637 -31
- package/dist/server/ignore.js +221 -0
- package/dist/server/index.js +78 -24
- package/dist/server/search-ignore.test.js +51 -0
- package/dist/server/watcher.js +54 -18
- package/package.json +16 -16
- package/dist/client/assets/__vite-browser-external-BIHI7g3E.js +0 -1
- package/dist/client/assets/_basePickBy-COW6_o5l.js +0 -1
- package/dist/client/assets/_baseUniq-BZLZ0Cq5.js +0 -1
- package/dist/client/assets/arc-ChrJd4LX.js +0 -1
- package/dist/client/assets/architectureDiagram-2XIMDMQ5-DUvtAUqm.js +0 -36
- package/dist/client/assets/blockDiagram-WCTKOSBZ-CZjHlzLw.js +0 -132
- package/dist/client/assets/c4Diagram-IC4MRINW-Bb4QcjBn.js +0 -10
- package/dist/client/assets/channel-Kq606-yO.js +0 -1
- package/dist/client/assets/chunk-4BX2VUAB-U2gnuzht.js +0 -1
- package/dist/client/assets/chunk-55IACEB6-DDf5FyZA.js +0 -1
- package/dist/client/assets/chunk-JSJVCQXG-95g2NCsz.js +0 -1
- package/dist/client/assets/chunk-KX2RTZJC-Uw77DOxq.js +0 -1
- package/dist/client/assets/chunk-NQ4KR5QH-CEtk7AxS.js +0 -220
- package/dist/client/assets/chunk-QZHKN3VN-CxHNihbm.js +0 -1
- package/dist/client/assets/chunk-WL4C6EOR-YWnktay4.js +0 -189
- package/dist/client/assets/classDiagram-VBA2DB6C-Bgw-akZn.js +0 -1
- package/dist/client/assets/classDiagram-v2-RAHNMMFH-Bgw-akZn.js +0 -1
- package/dist/client/assets/clone-DXEvmIA_.js +0 -1
- package/dist/client/assets/cose-bilkent-S5V4N54A-BcT_Pp_t.js +0 -1
- package/dist/client/assets/cytoscape.esm-BQaXIfA_.js +0 -331
- package/dist/client/assets/dagre-KLK3FWXG-DfkYqpYp.js +0 -4
- package/dist/client/assets/defaultLocale-DX6XiGOO.js +0 -1
- package/dist/client/assets/diagram-E7M64L7V-kzGsyL8B.js +0 -24
- package/dist/client/assets/diagram-IFDJBPK2-DK7bXX4F.js +0 -43
- package/dist/client/assets/diagram-P4PSJMXO-z9xCBdYx.js +0 -24
- package/dist/client/assets/erDiagram-INFDFZHY-D7a5C5o_.js +0 -70
- package/dist/client/assets/flowDiagram-PKNHOUZH-DqBsAGYI.js +0 -162
- package/dist/client/assets/ganttDiagram-A5KZAMGK-CytDHso0.js +0 -292
- package/dist/client/assets/gitGraphDiagram-K3NZZRJ6-C_xN53WG.js +0 -65
- package/dist/client/assets/graph-CZtfE55r.js +0 -1
- package/dist/client/assets/index-AcpT_uDS.css +0 -1
- package/dist/client/assets/index-Ci71-3A2.js +0 -705
- package/dist/client/assets/infoDiagram-LFFYTUFH-JmJVtb4-.js +0 -2
- package/dist/client/assets/init-Gi6I4Gst.js +0 -1
- package/dist/client/assets/ishikawaDiagram-PHBUUO56-BZLBgU5l.js +0 -70
- package/dist/client/assets/journeyDiagram-4ABVD52K-Bso62bBS.js +0 -139
- package/dist/client/assets/kanban-definition-K7BYSVSG-D9jsFbIS.js +0 -89
- package/dist/client/assets/katex-B1X10hvy.js +0 -261
- package/dist/client/assets/layout-Db-5vCEZ.js +0 -1
- package/dist/client/assets/linear-DdXT-poy.js +0 -1
- package/dist/client/assets/mindmap-definition-YRQLILUH-DUpkjOn4.js +0 -68
- package/dist/client/assets/ordinal-Cboi1Yqb.js +0 -1
- package/dist/client/assets/pieDiagram-SKSYHLDU-BTseg5zx.js +0 -30
- package/dist/client/assets/quadrantDiagram-337W2JSQ-Cf86XD1_.js +0 -7
- package/dist/client/assets/requirementDiagram-Z7DCOOCP-BK2yRQcz.js +0 -73
- package/dist/client/assets/sankeyDiagram-WA2Y5GQK-jBbEn6rj.js +0 -10
- package/dist/client/assets/sequenceDiagram-2WXFIKYE-qg69rBRP.js +0 -145
- package/dist/client/assets/stateDiagram-RAJIS63D-BFIxDKEY.js +0 -1
- package/dist/client/assets/stateDiagram-v2-FVOUBMTO-DYqLkNfp.js +0 -1
- package/dist/client/assets/timeline-definition-YZTLITO2-B17QFyRY.js +0 -61
- package/dist/client/assets/treemap-KZPCXAKY-CGSXpgHF.js +0 -162
- package/dist/client/assets/vennDiagram-LZ73GAT5-mbh453Lq.js +0 -34
- package/dist/client/assets/xychartDiagram-JWTSCODW-COWgeBYx.js +0 -7
- package/dist/server/app.js +0 -14
|
@@ -0,0 +1,574 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-KV5264BT-DvMqAy8J.js","assets/dagre-Cs_hK0RA.js","assets/graphlib-DRri47Ms.js","assets/identity-CQcu21F9.js","assets/reduce-DV5GRzs4.js","assets/flatten-DA7ZzNkq.js","assets/clone-AnN0418d.js","assets/cose-bilkent-S5V4N54A-YQtZwRYb.js","assets/chunk-Dlc7tRH4.js","assets/cytoscape.esm-DT0IEibP.js","assets/c4Diagram-AHTNJAMY-BJWyymhT.js","assets/chunk-YZCP3GAM-CDitFgw3.js","assets/flowDiagram-DWJPFMVM-CeIGHswO.js","assets/channel-C-zEXS3V.js","assets/chunk-55IACEB6-BkCqG_Mc.js","assets/chunk-EDXVE4YY-DglU8MxC.js","assets/chunk-FMBD7UC4-B_1_v8GP.js","assets/erDiagram-SMLLAGMA-ZjZZH-zN.js","assets/gitGraphDiagram-UUTBAWPF-2fnUKQRp.js","assets/mermaid-parser.core-Bpqvb2jv.js","assets/chunk-K5T4RW27-Dzh5Xx8O.js","assets/chunk-2KRD3SAO-B1G2AY6H.js","assets/chunk-67CJDMHE-Cz-mqdi4.js","assets/chunk-7N4EOEYR-BFd0Oy6w.js","assets/chunk-AA7GKIK3-D77gJjH7.js","assets/chunk-CIAEETIT-DxQTGSBH.js","assets/chunk-FOC6F5B3-CEMl5H_U.js","assets/chunk-KGLVRYIC-Be2dMs_W.js","assets/chunk-LIHQZDEY-BGBWPKdn.js","assets/chunk-ORNJ4GCN-W_NT507t.js","assets/chunk-4BX2VUAB-mLNpdiNK.js","assets/chunk-QZHKN3VN-B0CMV9NG.js","assets/ganttDiagram-T4ZO3ILL-BeGMFmHq.js","assets/linear-CizMozZt.js","assets/defaultLocale-ClcAPJ5U.js","assets/init-TU6eJ00_.js","assets/infoDiagram-42DDH7IO-KL_uq6JQ.js","assets/pieDiagram-DEJITSTG-DwmqzTu7.js","assets/path-yo4Xej8w.js","assets/ordinal-DCsgWfZW.js","assets/arc-Ezd9GmKE.js","assets/array-C0548cPn.js","assets/quadrantDiagram-34T5L4WZ-CdCBXbvb.js","assets/xychartDiagram-5P7HB3ND-Dh0MaaMp.js","assets/requirementDiagram-MS252O5E-32eCbPFl.js","assets/sequenceDiagram-FGHM5R23-Ck7ukfb7.js","assets/classDiagram-6PBFFD2Q-XeqY_hie.js","assets/chunk-4TB4RGXK-BsRi3qra.js","assets/classDiagram-v2-HSJHXN6E-D5yY32qd.js","assets/stateDiagram-FHFEXIEX-BKJrixhp.js","assets/chunk-OYMX7WX6-BV6RCL_j.js","assets/stateDiagram-v2-QKLJ7IA2-Bio1QBYF.js","assets/journeyDiagram-VCZTEJTY-DT7IVz7z.js","assets/timeline-definition-GMOUNBTQ-B_D-q7Kc.js","assets/mindmap-definition-QFDTVHPH-Dov77gi8.js","assets/kanban-definition-6JOO6SKY-CHPPLj8n.js","assets/sankeyDiagram-XADWPNL6-BBDL_wPZ.js","assets/diagram-TYMM5635-BujcYOHW.js","assets/diagram-MMDJMWI5-DNA312HK.js","assets/blockDiagram-DXYQGD6D-ZqrNO8HM.js","assets/diagram-5BDNPKRD-BwrN8bUG.js","assets/architectureDiagram-Q4EWVU46-BmLJotd1.js","assets/ishikawaDiagram-UXIWVN3A-DYWG2VdA.js","assets/rough.esm-DulVNktb.js","assets/vennDiagram-DHZGUBPP-CvHqv3h2.js","assets/diagram-G4DWMVQ6-Cqaj-jnn.js","assets/wardleyDiagram-NUSXRM2D-CYRpN4xk.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{o as e,r as t,t as n}from"./chunk-Dlc7tRH4.js";import{n as r,t as i}from"./path-yo4Xej8w.js";import{t as a}from"./array-C0548cPn.js";import{C as o,E as s,O as c,S as l,T as u,_ as d,b as f,c as p,d as m,f as h,g,h as _,i as v,m as y,n as b,p as x,r as S,s as C,t as w,u as T,v as E,w as D,x as O}from"./identity-CQcu21F9.js";import{t as k}from"./rough.esm-DulVNktb.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var A=n((e=>{var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.iterator;function p(e){return typeof e!=`object`||!e?null:(e=f&&e[f]||e[`@@iterator`],typeof e==`function`?e:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,g={};function _(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}_.prototype.isReactComponent={},_.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`setState(...): takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function v(){}v.prototype=_.prototype;function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}var b=y.prototype=new v;b.constructor=y,h(b,_.prototype),b.isPureReactComponent=!0;var x=Array.isArray,S=Object.prototype.hasOwnProperty,C={current:null},w={key:!0,ref:!0,__self:!0,__source:!0};function T(e,n,r){var i,a={},o=null,s=null;if(n!=null)for(i in n.ref!==void 0&&(s=n.ref),n.key!==void 0&&(o=``+n.key),n)S.call(n,i)&&!w.hasOwnProperty(i)&&(a[i]=n[i]);var c=arguments.length-2;if(c===1)a.children=r;else if(1<c){for(var l=Array(c),u=0;u<c;u++)l[u]=arguments[u+2];a.children=l}if(e&&e.defaultProps)for(i in c=e.defaultProps,c)a[i]===void 0&&(a[i]=c[i]);return{$$typeof:t,type:e,key:o,ref:s,props:a,_owner:C.current}}function E(e,n){return{$$typeof:t,type:e.type,key:n,ref:e.ref,props:e.props,_owner:e._owner}}function D(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function O(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var k=/\/+/g;function A(e,t){return typeof e==`object`&&e&&e.key!=null?O(``+e.key):t.toString(36)}function ee(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0}}if(c)return c=e,o=o(c),e=a===``?`.`+A(c,0):a,x(o)?(i=``,e!=null&&(i=e.replace(k,`$&/`)+`/`),ee(o,r,i,``,function(e){return e})):o!=null&&(D(o)&&(o=E(o,i+(!o.key||c&&c.key===o.key?``:(``+o.key).replace(k,`$&/`)+`/`)+e)),r.push(o)),1;if(c=0,a=a===``?`.`:a+`:`,x(e))for(var l=0;l<e.length;l++){s=e[l];var u=a+A(s,l);c+=ee(s,r,i,u,o)}else if(u=p(e),typeof u==`function`)for(e=u.call(e),l=0;!(s=e.next()).done;)s=s.value,u=a+A(s,l++),c+=ee(s,r,i,u,o);else if(s===`object`)throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`);return c}function j(e,t,n){if(e==null)return e;var r=[],i=0;return ee(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function te(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var M={current:null},ne={transition:null},N={ReactCurrentDispatcher:M,ReactCurrentBatchConfig:ne,ReactCurrentOwner:C};function re(){throw Error(`act(...) is not supported in production builds of React.`)}e.Children={map:j,forEach:function(e,t,n){j(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return j(e,function(){t++}),t},toArray:function(e){return j(e,function(e){return e})||[]},only:function(e){if(!D(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}},e.Component=_,e.Fragment=r,e.Profiler=a,e.PureComponent=y,e.StrictMode=i,e.Suspense=l,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=N,e.act=re,e.cloneElement=function(e,n,r){if(e==null)throw Error(`React.cloneElement(...): The argument must be a React element, but you passed `+e+`.`);var i=h({},e.props),a=e.key,o=e.ref,s=e._owner;if(n!=null){if(n.ref!==void 0&&(o=n.ref,s=C.current),n.key!==void 0&&(a=``+n.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in n)S.call(n,l)&&!w.hasOwnProperty(l)&&(i[l]=n[l]===void 0&&c!==void 0?c[l]:n[l])}var l=arguments.length-2;if(l===1)i.children=r;else if(1<l){c=Array(l);for(var u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}return{$$typeof:t,type:e.type,key:a,ref:o,props:i,_owner:s}},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:o,_context:e},e.Consumer=e},e.createElement=T,e.createFactory=function(e){var t=T.bind(null,e);return t.type=e,t},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=D,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:te}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=ne.transition;ne.transition={};try{e()}finally{ne.transition=t}},e.unstable_act=re,e.useCallback=function(e,t){return M.current.useCallback(e,t)},e.useContext=function(e){return M.current.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e){return M.current.useDeferredValue(e)},e.useEffect=function(e,t){return M.current.useEffect(e,t)},e.useId=function(){return M.current.useId()},e.useImperativeHandle=function(e,t,n){return M.current.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return M.current.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return M.current.useLayoutEffect(e,t)},e.useMemo=function(e,t){return M.current.useMemo(e,t)},e.useReducer=function(e,t,n){return M.current.useReducer(e,t,n)},e.useRef=function(e){return M.current.useRef(e)},e.useState=function(e){return M.current.useState(e)},e.useSyncExternalStore=function(e,t,n){return M.current.useSyncExternalStore(e,t,n)},e.useTransition=function(){return M.current.useTransition()},e.version=`18.3.1`})),ee=n(((e,t)=>{t.exports=A()})),j=n((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=typeof setTimeout==`function`?setTimeout:null,_=typeof clearTimeout==`function`?clearTimeout:null,v=typeof setImmediate<`u`?setImmediate:null;typeof navigator<`u`&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function b(e){if(h=!1,y(e),!m)if(n(c)!==null)m=!0,j(x);else{var t=n(l);t!==null&&te(b,t.startTime-e)}}function x(t,i){m=!1,h&&(h=!1,_(w),w=-1),p=!0;var a=f;try{for(y(i),d=n(c);d!==null&&(!(d.expirationTime>i)||t&&!D());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=i);i=e.unstable_now(),typeof s==`function`?d.callback=s:d===n(c)&&r(c),y(i)}else r(c);d=n(c)}if(d!==null)var u=!0;else{var g=n(l);g!==null&&te(b,g.startTime-i),u=!1}return u}finally{d=null,f=a,p=!1}}var S=!1,C=null,w=-1,T=5,E=-1;function D(){return!(e.unstable_now()-E<T)}function O(){if(C!==null){var t=e.unstable_now();E=t;var n=!0;try{n=C(!0,t)}finally{n?k():(S=!1,C=null)}}else S=!1}var k;if(typeof v==`function`)k=function(){v(O)};else if(typeof MessageChannel<`u`){var A=new MessageChannel,ee=A.port2;A.port1.onmessage=O,k=function(){ee.postMessage(null)}}else k=function(){g(O,0)};function j(e){C=e,S||(S=!0,k())}function te(t,n){w=g(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,j(x))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):T=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(_(w),w=-1):h=!0,te(b,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,j(x))),r},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),te=n(((e,t)=>{t.exports=j()})),M=n((e=>{var t=ee(),n=te();function r(e){for(var t=`https://reactjs.org/docs/error-decoder.html?invariant=`+e,n=1;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n]);return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}var i=new Set,a={};function o(e,t){s(e,t),s(e+`Capture`,t)}function s(e,t){for(a[e]=t,e=0;e<t.length;e++)i.add(t[e])}var c=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),l=Object.prototype.hasOwnProperty,u=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,d={},f={};function p(e){return l.call(f,e)?!0:l.call(d,e)?!1:u.test(e)?f[e]=!0:(d[e]=!0,!1)}function m(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case`function`:case`symbol`:return!0;case`boolean`:return r?!1:n===null?(e=e.toLowerCase().slice(0,5),e!==`data-`&&e!==`aria-`):!n.acceptsBooleans;default:return!1}}function h(e,t,n,r){if(t==null||m(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function g(e,t,n,r,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var _={};`children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style`.split(` `).forEach(function(e){_[e]=new g(e,0,!1,e,null,!1,!1)}),[[`acceptCharset`,`accept-charset`],[`className`,`class`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`]].forEach(function(e){var t=e[0];_[t]=new g(t,1,!1,e[1],null,!1,!1)}),[`contentEditable`,`draggable`,`spellCheck`,`value`].forEach(function(e){_[e]=new g(e,2,!1,e.toLowerCase(),null,!1,!1)}),[`autoReverse`,`externalResourcesRequired`,`focusable`,`preserveAlpha`].forEach(function(e){_[e]=new g(e,2,!1,e,null,!1,!1)}),`allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope`.split(` `).forEach(function(e){_[e]=new g(e,3,!1,e.toLowerCase(),null,!1,!1)}),[`checked`,`multiple`,`muted`,`selected`].forEach(function(e){_[e]=new g(e,3,!0,e,null,!1,!1)}),[`capture`,`download`].forEach(function(e){_[e]=new g(e,4,!1,e,null,!1,!1)}),[`cols`,`rows`,`size`,`span`].forEach(function(e){_[e]=new g(e,6,!1,e,null,!1,!1)}),[`rowSpan`,`start`].forEach(function(e){_[e]=new g(e,5,!1,e.toLowerCase(),null,!1,!1)});var v=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}`accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height`.split(` `).forEach(function(e){var t=e.replace(v,y);_[t]=new g(t,1,!1,e,null,!1,!1)}),`xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type`.split(` `).forEach(function(e){var t=e.replace(v,y);_[t]=new g(t,1,!1,e,`http://www.w3.org/1999/xlink`,!1,!1)}),[`xml:base`,`xml:lang`,`xml:space`].forEach(function(e){var t=e.replace(v,y);_[t]=new g(t,1,!1,e,`http://www.w3.org/XML/1998/namespace`,!1,!1)}),[`tabIndex`,`crossOrigin`].forEach(function(e){_[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)}),_.xlinkHref=new g(`xlinkHref`,1,!1,`xlink:href`,`http://www.w3.org/1999/xlink`,!0,!1),[`src`,`href`,`action`,`formAction`].forEach(function(e){_[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)});function b(e,t,n,r){var i=_.hasOwnProperty(t)?_[t]:null;(i===null?r||!(2<t.length)||t[0]!==`o`&&t[0]!==`O`||t[1]!==`n`&&t[1]!==`N`:i.type!==0)&&(h(t,n,i,r)&&(n=null),r||i===null?p(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,``+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:``:n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&!0===n?``:``+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var x=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,S=Symbol.for(`react.element`),C=Symbol.for(`react.portal`),w=Symbol.for(`react.fragment`),T=Symbol.for(`react.strict_mode`),E=Symbol.for(`react.profiler`),D=Symbol.for(`react.provider`),O=Symbol.for(`react.context`),k=Symbol.for(`react.forward_ref`),A=Symbol.for(`react.suspense`),j=Symbol.for(`react.suspense_list`),M=Symbol.for(`react.memo`),ne=Symbol.for(`react.lazy`),N=Symbol.for(`react.offscreen`),re=Symbol.iterator;function ie(e){return typeof e!=`object`||!e?null:(e=re&&e[re]||e[`@@iterator`],typeof e==`function`?e:null)}var ae=Object.assign,oe;function se(e){if(oe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);oe=t&&t[1]||``}return`
|
|
3
|
+
`+oe+e}var ce=!1;function P(e,t){if(!e||ce)return``;ce=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&typeof t.stack==`string`){for(var i=t.stack.split(`
|
|
4
|
+
`),a=r.stack.split(`
|
|
5
|
+
`),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(o!==1||s!==1)do if(o--,s--,0>s||i[o]!==a[s]){var c=`
|
|
6
|
+
`+i[o].replace(` at new `,` at `);return e.displayName&&c.includes(`<anonymous>`)&&(c=c.replace(`<anonymous>`,e.displayName)),c}while(1<=o&&0<=s);break}}}finally{ce=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:``)?se(e):``}function le(e){switch(e.tag){case 5:return se(e.type);case 16:return se(`Lazy`);case 13:return se(`Suspense`);case 19:return se(`SuspenseList`);case 0:case 2:case 15:return e=P(e.type,!1),e;case 11:return e=P(e.type.render,!1),e;case 1:return e=P(e.type,!0),e;default:return``}}function F(e){if(e==null)return null;if(typeof e==`function`)return e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case w:return`Fragment`;case C:return`Portal`;case E:return`Profiler`;case T:return`StrictMode`;case A:return`Suspense`;case j:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case O:return(e.displayName||`Context`)+`.Consumer`;case D:return(e._context.displayName||`Context`)+`.Provider`;case k:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case M:return t=e.displayName||null,t===null?F(e.type)||`Memo`:t;case ne:t=e._payload,e=e._init;try{return F(e(t))}catch{}}return null}function ue(e){var t=e.type;switch(e.tag){case 24:return`Cache`;case 9:return(t.displayName||`Context`)+`.Consumer`;case 10:return(t._context.displayName||`Context`)+`.Provider`;case 18:return`DehydratedFragment`;case 11:return e=t.render,e=e.displayName||e.name||``,t.displayName||(e===``?`ForwardRef`:`ForwardRef(`+e+`)`);case 7:return`Fragment`;case 5:return t;case 4:return`Portal`;case 3:return`Root`;case 6:return`Text`;case 16:return F(t);case 8:return t===T?`StrictMode`:`Mode`;case 22:return`Offscreen`;case 12:return`Profiler`;case 21:return`Scope`;case 13:return`Suspense`;case 19:return`SuspenseList`;case 25:return`TracingMarker`;case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t==`function`)return t.displayName||t.name||null;if(typeof t==`string`)return t}return null}function de(e){switch(typeof e){case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function fe(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function pe(e){var t=fe(e)?`checked`:`value`,n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=``+e[t];if(!e.hasOwnProperty(t)&&n!==void 0&&typeof n.get==`function`&&typeof n.set==`function`){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function me(e){e._valueTracker||=pe(e)}function he(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=fe(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function ge(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function _e(e,t){var n=t.checked;return ae({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ve(e,t){var n=t.defaultValue==null?``:t.defaultValue,r=t.checked==null?t.defaultChecked:t.checked;n=de(t.value==null?n:t.value),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type===`checkbox`||t.type===`radio`?t.checked!=null:t.value!=null}}function ye(e,t){t=t.checked,t!=null&&b(e,`checked`,t,!1)}function be(e,t){ye(e,t);var n=de(t.value),r=t.type;if(n!=null)r===`number`?(n===0&&e.value===``||e.value!=n)&&(e.value=``+n):e.value!==``+n&&(e.value=``+n);else if(r===`submit`||r===`reset`){e.removeAttribute(`value`);return}t.hasOwnProperty(`value`)?Se(e,t.type,n):t.hasOwnProperty(`defaultValue`)&&Se(e,t.type,de(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function xe(e,t,n){if(t.hasOwnProperty(`value`)||t.hasOwnProperty(`defaultValue`)){var r=t.type;if(!(r!==`submit`&&r!==`reset`||t.value!==void 0&&t.value!==null))return;t=``+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==``&&(e.name=``),e.defaultChecked=!!e._wrapperState.initialChecked,n!==``&&(e.name=n)}function Se(e,t,n){(t!==`number`||ge(e.ownerDocument)!==e)&&(n==null?e.defaultValue=``+e._wrapperState.initialValue:e.defaultValue!==``+n&&(e.defaultValue=``+n))}var Ce=Array.isArray;function we(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+de(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Te(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(r(91));return ae({},t,{value:void 0,defaultValue:void 0,children:``+e._wrapperState.initialValue})}function Ee(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(r(92));if(Ce(n)){if(1<n.length)throw Error(r(93));n=n[0]}t=n}t??=``,n=t}e._wrapperState={initialValue:de(n)}}function De(e,t){var n=de(t.value),r=de(t.defaultValue);n!=null&&(n=``+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=``+r)}function Oe(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==``&&t!==null&&(e.value=t)}function ke(e){switch(e){case`svg`:return`http://www.w3.org/2000/svg`;case`math`:return`http://www.w3.org/1998/Math/MathML`;default:return`http://www.w3.org/1999/xhtml`}}function Ae(e,t){return e==null||e===`http://www.w3.org/1999/xhtml`?ke(t):e===`http://www.w3.org/2000/svg`&&t===`foreignObject`?`http://www.w3.org/1999/xhtml`:e}var je,Me=function(e){return typeof MSApp<`u`&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!==`http://www.w3.org/2000/svg`||`innerHTML`in e)e.innerHTML=t;else{for(je||=document.createElement(`div`),je.innerHTML=`<svg>`+t.valueOf().toString()+`</svg>`,t=je.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ne(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Pe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Fe=[`Webkit`,`ms`,`Moz`,`O`];Object.keys(Pe).forEach(function(e){Fe.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Pe[t]=Pe[e]})});function Ie(e,t,n){return t==null||typeof t==`boolean`||t===``?``:n||typeof t!=`number`||t===0||Pe.hasOwnProperty(e)&&Pe[e]?(``+t).trim():t+`px`}function Le(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=n.indexOf(`--`)===0,i=Ie(n,t[n],r);n===`float`&&(n=`cssFloat`),r?e.setProperty(n,i):e[n]=i}}var Re=ae({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ze(e,t){if(t){if(Re[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(r(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(r(60));if(typeof t.dangerouslySetInnerHTML!=`object`||!(`__html`in t.dangerouslySetInnerHTML))throw Error(r(61))}if(t.style!=null&&typeof t.style!=`object`)throw Error(r(62))}}function Be(e,t){if(e.indexOf(`-`)===-1)return typeof t.is==`string`;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Ve=null;function He(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ue=null,We=null,Ge=null;function Ke(e){if(e=Ui(e)){if(typeof Ue!=`function`)throw Error(r(280));var t=e.stateNode;t&&(t=Gi(t),Ue(e.stateNode,e.type,t))}}function qe(e){We?Ge?Ge.push(e):Ge=[e]:We=e}function Je(){if(We){var e=We,t=Ge;if(Ge=We=null,Ke(e),t)for(e=0;e<t.length;e++)Ke(t[e])}}function Ye(e,t){return e(t)}function Xe(){}var Ze=!1;function Qe(e,t,n){if(Ze)return e(t,n);Ze=!0;try{return Ye(e,t,n)}finally{Ze=!1,(We!==null||Ge!==null)&&(Xe(),Je())}}function $e(e,t){var n=e.stateNode;if(n===null)return null;var i=Gi(n);if(i===null)return null;n=i[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(i=!i.disabled)||(e=e.type,i=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!i;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(r(231,t,typeof n));return n}var et=!1;if(c)try{var tt={};Object.defineProperty(tt,`passive`,{get:function(){et=!0}}),window.addEventListener(`test`,tt,tt),window.removeEventListener(`test`,tt,tt)}catch{et=!1}function nt(e,t,n,r,i,a,o,s,c){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(e){this.onError(e)}}var rt=!1,it=null,at=!1,ot=null,st={onError:function(e){rt=!0,it=e}};function ct(e,t,n,r,i,a,o,s,c){rt=!1,it=null,nt.apply(st,arguments)}function lt(e,t,n,i,a,o,s,c,l){if(ct.apply(this,arguments),rt){if(rt){var u=it;rt=!1,it=null}else throw Error(r(198));at||(at=!0,ot=u)}}function ut(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function dt(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function ft(e){if(ut(e)!==e)throw Error(r(188))}function pt(e){var t=e.alternate;if(!t){if(t=ut(e),t===null)throw Error(r(188));return t===e?e:null}for(var n=e,i=t;;){var a=n.return;if(a===null)break;var o=a.alternate;if(o===null){if(i=a.return,i!==null){n=i;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return ft(a),e;if(o===i)return ft(a),t;o=o.sibling}throw Error(r(188))}if(n.return!==i.return)n=a,i=o;else{for(var s=!1,c=a.child;c;){if(c===n){s=!0,n=a,i=o;break}if(c===i){s=!0,i=a,n=o;break}c=c.sibling}if(!s){for(c=o.child;c;){if(c===n){s=!0,n=o,i=a;break}if(c===i){s=!0,i=o,n=a;break}c=c.sibling}if(!s)throw Error(r(189))}}if(n.alternate!==i)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?e:t}function mt(e){return e=pt(e),e===null?null:ht(e)}function ht(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=ht(e);if(t!==null)return t;e=e.sibling}return null}var gt=n.unstable_scheduleCallback,_t=n.unstable_cancelCallback,vt=n.unstable_shouldYield,yt=n.unstable_requestPaint,bt=n.unstable_now,xt=n.unstable_getCurrentPriorityLevel,St=n.unstable_ImmediatePriority,Ct=n.unstable_UserBlockingPriority,wt=n.unstable_NormalPriority,Tt=n.unstable_LowPriority,Et=n.unstable_IdlePriority,Dt=null,Ot=null;function kt(e){if(Ot&&typeof Ot.onCommitFiberRoot==`function`)try{Ot.onCommitFiberRoot(Dt,e,void 0,(e.current.flags&128)==128)}catch{}}var At=Math.clz32?Math.clz32:Nt,jt=Math.log,Mt=Math.LN2;function Nt(e){return e>>>=0,e===0?32:31-(jt(e)/Mt|0)|0}var Pt=64,Ft=4194304;function It(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Lt(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s===0?(a&=o,a!==0&&(r=It(a))):r=It(s)}else o=n&~i,o===0?a!==0&&(r=It(a)):r=It(o);if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,a=t&-t,i>=a||i===16&&a&4194240))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-At(t),i=1<<n,r|=e[n],t&=~i;return r}function Rt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function zt(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-At(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Rt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}}function Bt(e){return e=e.pendingLanes&-1073741825,e===0?e&1073741824?1073741824:0:e}function Vt(){var e=Pt;return Pt<<=1,!(Pt&4194240)&&(Pt=64),e}function Ht(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ut(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-At(t),e[t]=n}function Wt(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-At(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}function Gt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-At(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Kt=0;function qt(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Jt,Yt,Xt,Zt,Qt,$t=!1,en=[],tn=null,nn=null,rn=null,an=new Map,on=new Map,sn=[],cn=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit`.split(` `);function ln(e,t){switch(e){case`focusin`:case`focusout`:tn=null;break;case`dragenter`:case`dragleave`:nn=null;break;case`mouseover`:case`mouseout`:rn=null;break;case`pointerover`:case`pointerout`:an.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:on.delete(t.pointerId)}}function I(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Ui(t),t!==null&&Yt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function un(e,t,n,r,i){switch(t){case`focusin`:return tn=I(tn,e,t,n,r,i),!0;case`dragenter`:return nn=I(nn,e,t,n,r,i),!0;case`mouseover`:return rn=I(rn,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return an.set(a,I(an.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,on.set(a,I(on.get(a)||null,e,t,n,r,i)),!0}return!1}function dn(e){var t=Hi(e.target);if(t!==null){var n=ut(t);if(n!==null){if(t=n.tag,t===13){if(t=dt(n),t!==null){e.blockedOn=t,Qt(e.priority,function(){Xt(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function fn(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Sn(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ve=r,n.target.dispatchEvent(r),Ve=null}else return t=Ui(n),t!==null&&Yt(t),e.blockedOn=n,!1;t.shift()}return!0}function pn(e,t,n){fn(e)&&n.delete(t)}function mn(){$t=!1,tn!==null&&fn(tn)&&(tn=null),nn!==null&&fn(nn)&&(nn=null),rn!==null&&fn(rn)&&(rn=null),an.forEach(pn),on.forEach(pn)}function hn(e,t){e.blockedOn===t&&(e.blockedOn=null,$t||($t=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,mn)))}function gn(e){function t(t){return hn(t,e)}if(0<en.length){hn(en[0],e);for(var n=1;n<en.length;n++){var r=en[n];r.blockedOn===e&&(r.blockedOn=null)}}for(tn!==null&&hn(tn,e),nn!==null&&hn(nn,e),rn!==null&&hn(rn,e),an.forEach(t),on.forEach(t),n=0;n<sn.length;n++)r=sn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<sn.length&&(n=sn[0],n.blockedOn===null);)dn(n),n.blockedOn===null&&sn.shift()}var L=x.ReactCurrentBatchConfig,_n=!0;function vn(e,t,n,r){var i=Kt,a=L.transition;L.transition=null;try{Kt=1,bn(e,t,n,r)}finally{Kt=i,L.transition=a}}function yn(e,t,n,r){var i=Kt,a=L.transition;L.transition=null;try{Kt=4,bn(e,t,n,r)}finally{Kt=i,L.transition=a}}function bn(e,t,n,r){if(_n){var i=Sn(e,t,n,r);if(i===null)mi(e,t,r,xn,n),ln(e,r);else if(un(i,e,t,n,r))r.stopPropagation();else if(ln(e,r),t&4&&-1<cn.indexOf(e)){for(;i!==null;){var a=Ui(i);if(a!==null&&Jt(a),a=Sn(e,t,n,r),a===null&&mi(e,t,r,xn,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else mi(e,t,r,null,n)}}var xn=null;function Sn(e,t,n,r){if(xn=null,e=He(r),e=Hi(e),e!==null)if(t=ut(e),t===null)e=null;else if(n=t.tag,n===13){if(e=dt(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return xn=e,null}function Cn(e){switch(e){case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 1;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`toggle`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 4;case`message`:switch(xt()){case St:return 1;case Ct:return 4;case wt:case Tt:return 16;case Et:return 536870912;default:return 16}default:return 16}}var wn=null,Tn=null,En=null;function Dn(){if(En)return En;var e,t=Tn,n=t.length,r,i=`value`in wn?wn.value:wn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return En=i.slice(e,1<r?1-r:void 0)}function On(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function kn(){return!0}function An(){return!1}function jn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?kn:An,this.isPropagationStopped=An,this}return ae(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=kn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=kn)},persist:function(){},isPersistent:kn}),t}var Mn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Nn=jn(Mn),Pn=ae({},Mn,{view:0,detail:0}),R=jn(Pn),Fn,z,In,Ln=ae({},Pn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Jn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==In&&(In&&e.type===`mousemove`?(Fn=e.screenX-In.screenX,z=e.screenY-In.screenY):z=Fn=0,In=e),Fn)},movementY:function(e){return`movementY`in e?e.movementY:z}}),Rn=jn(Ln),zn=jn(ae({},Ln,{dataTransfer:0})),Bn=jn(ae({},Pn,{relatedTarget:0})),Vn=jn(ae({},Mn,{animationName:0,elapsedTime:0,pseudoElement:0})),Hn=jn(ae({},Mn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Un=jn(ae({},Mn,{data:0})),Wn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Gn={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`},Kn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function qn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Kn[e])?!!t[e]:!1}function Jn(){return qn}var Yn=jn(ae({},Pn,{key:function(e){if(e.key){var t=Wn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=On(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Gn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Jn,charCode:function(e){return e.type===`keypress`?On(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?On(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Xn=jn(ae({},Ln,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Zn=jn(ae({},Pn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Jn})),Qn=jn(ae({},Mn,{propertyName:0,elapsedTime:0,pseudoElement:0})),$n=jn(ae({},Ln,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),er=[9,13,27,32],tr=c&&`CompositionEvent`in window,nr=null;c&&`documentMode`in document&&(nr=document.documentMode);var rr=c&&`TextEvent`in window&&!nr,ir=c&&(!tr||nr&&8<nr&&11>=nr),ar=` `,or=!1;function sr(e,t){switch(e){case`keyup`:return er.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function cr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var lr=!1;function ur(e,t){switch(e){case`compositionend`:return cr(t);case`keypress`:return t.which===32?(or=!0,ar):null;case`textInput`:return e=t.data,e===ar&&or?null:e;default:return null}}function dr(e,t){if(lr)return e===`compositionend`||!tr&&sr(e,t)?(e=Dn(),En=Tn=wn=null,lr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return ir&&t.locale!==`ko`?null:t.data;default:return null}}var fr={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 pr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!fr[e.type]:t===`textarea`}function mr(e,t,n,r){qe(r),t=gi(t,`onChange`),0<t.length&&(n=new Nn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var hr=null,gr=null;function _r(e){ci(e,0)}function vr(e){if(he(Wi(e)))return e}function yr(e,t){if(e===`change`)return t}var br=!1;if(c){var xr;if(c){var Sr=`oninput`in document;if(!Sr){var Cr=document.createElement(`div`);Cr.setAttribute(`oninput`,`return;`),Sr=typeof Cr.oninput==`function`}xr=Sr}else xr=!1;br=xr&&(!document.documentMode||9<document.documentMode)}function wr(){hr&&(hr.detachEvent(`onpropertychange`,Tr),gr=hr=null)}function Tr(e){if(e.propertyName===`value`&&vr(gr)){var t=[];mr(t,gr,e,He(e)),Qe(_r,t)}}function Er(e,t,n){e===`focusin`?(wr(),hr=t,gr=n,hr.attachEvent(`onpropertychange`,Tr)):e===`focusout`&&wr()}function Dr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return vr(gr)}function Or(e,t){if(e===`click`)return vr(t)}function kr(e,t){if(e===`input`||e===`change`)return vr(t)}function Ar(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var jr=typeof Object.is==`function`?Object.is:Ar;function Mr(e,t){if(jr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!l.call(t,i)||!jr(e[i],t[i]))return!1}return!0}function Nr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Pr(e,t){var n=Nr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Nr(n)}}function Fr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Fr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ir(){for(var e=window,t=ge();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=ge(e.document)}return t}function Lr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}function Rr(e){var t=Ir(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Fr(n.ownerDocument.documentElement,n)){if(r!==null&&Lr(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),`selectionStart`in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=Pr(n,a);var o=Pr(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus==`function`&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var zr=c&&`documentMode`in document&&11>=document.documentMode,Br=null,Vr=null,Hr=null,Ur=!1;function Wr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ur||Br==null||Br!==ge(r)||(r=Br,`selectionStart`in r&&Lr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Hr&&Mr(Hr,r)||(Hr=r,r=gi(Vr,`onSelect`),0<r.length&&(t=new Nn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Br)))}function Gr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Kr={animationend:Gr(`Animation`,`AnimationEnd`),animationiteration:Gr(`Animation`,`AnimationIteration`),animationstart:Gr(`Animation`,`AnimationStart`),transitionend:Gr(`Transition`,`TransitionEnd`)},qr={},Jr={};c&&(Jr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Kr.animationend.animation,delete Kr.animationiteration.animation,delete Kr.animationstart.animation),`TransitionEvent`in window||delete Kr.transitionend.transition);function Yr(e){if(qr[e])return qr[e];if(!Kr[e])return e;var t=Kr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Jr)return qr[e]=t[n];return e}var Xr=Yr(`animationend`),Zr=Yr(`animationiteration`),Qr=Yr(`animationstart`),$r=Yr(`transitionend`),ei=new Map,ti=`abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);function ni(e,t){ei.set(e,t),o(t,[e])}for(var ri=0;ri<ti.length;ri++){var ii=ti[ri];ni(ii.toLowerCase(),`on`+(ii[0].toUpperCase()+ii.slice(1)))}ni(Xr,`onAnimationEnd`),ni(Zr,`onAnimationIteration`),ni(Qr,`onAnimationStart`),ni(`dblclick`,`onDoubleClick`),ni(`focusin`,`onFocus`),ni(`focusout`,`onBlur`),ni($r,`onTransitionEnd`),s(`onMouseEnter`,[`mouseout`,`mouseover`]),s(`onMouseLeave`,[`mouseout`,`mouseover`]),s(`onPointerEnter`,[`pointerout`,`pointerover`]),s(`onPointerLeave`,[`pointerout`,`pointerover`]),o(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),o(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),o(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),o(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),o(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),o(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var ai=`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(` `),oi=new Set(`cancel close invalid load scroll toggle`.split(` `).concat(ai));function si(e,t,n){var r=e.type||`unknown-event`;e.currentTarget=n,lt(r,t,void 0,e),e.currentTarget=null}function ci(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;si(i,s,l),a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;si(i,s,l),a=c}}}if(at)throw e=ot,at=!1,ot=null,e}function li(e,t){var n=t[zi];n===void 0&&(n=t[zi]=new Set);var r=e+`__bubble`;n.has(r)||(pi(t,e,2,!1),n.add(r))}function ui(e,t,n){var r=0;t&&(r|=4),pi(n,e,r,t)}var di=`_reactListening`+Math.random().toString(36).slice(2);function fi(e){if(!e[di]){e[di]=!0,i.forEach(function(t){t!==`selectionchange`&&(oi.has(t)||ui(t,!1,e),ui(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[di]||(t[di]=!0,ui(`selectionchange`,!1,t))}}function pi(e,t,n,r){switch(Cn(t)){case 1:var i=vn;break;case 4:i=yn;break;default:i=bn}n=i.bind(null,t,n,e),i=void 0,!et||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function mi(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;o=o.return}for(;s!==null;){if(o=Hi(s),o===null)return;if(c=o.tag,c===5||c===6){r=a=o;continue a}s=s.parentNode}}r=r.return}Qe(function(){var r=a,i=He(n),o=[];a:{var s=ei.get(e);if(s!==void 0){var c=Nn,l=e;switch(e){case`keypress`:if(On(n)===0)break a;case`keydown`:case`keyup`:c=Yn;break;case`focusin`:l=`focus`,c=Bn;break;case`focusout`:l=`blur`,c=Bn;break;case`beforeblur`:case`afterblur`:c=Bn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:c=Rn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:c=zn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:c=Zn;break;case Xr:case Zr:case Qr:c=Vn;break;case $r:c=Qn;break;case`scroll`:c=R;break;case`wheel`:c=$n;break;case`copy`:case`cut`:case`paste`:c=Hn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:c=Xn}var u=(t&4)!=0,d=!u&&e===`scroll`,f=u?s===null?null:s+`Capture`:s;u=[];for(var p=r,m;p!==null;){m=p;var h=m.stateNode;if(m.tag===5&&h!==null&&(m=h,f!==null&&(h=$e(p,f),h!=null&&u.push(hi(p,h,m)))),d)break;p=p.return}0<u.length&&(s=new c(s,l,null,n,i),o.push({event:s,listeners:u}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,s&&n!==Ve&&(l=n.relatedTarget||n.fromElement)&&(Hi(l)||l[Ri]))break a;if((c||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Hi(l):null,l!==null&&(d=ut(l),l!==d||l.tag!==5&&l.tag!==6)&&(l=null)):(c=null,l=r),c!==l)){if(u=Rn,h=`onMouseLeave`,f=`onMouseEnter`,p=`mouse`,(e===`pointerout`||e===`pointerover`)&&(u=Xn,h=`onPointerLeave`,f=`onPointerEnter`,p=`pointer`),d=c==null?s:Wi(c),m=l==null?s:Wi(l),s=new u(h,p+`leave`,c,n,i),s.target=d,s.relatedTarget=m,h=null,Hi(i)===r&&(u=new u(f,p+`enter`,l,n,i),u.target=m,u.relatedTarget=d,h=u),d=h,c&&l)b:{for(u=c,f=l,p=0,m=u;m;m=_i(m))p++;for(m=0,h=f;h;h=_i(h))m++;for(;0<p-m;)u=_i(u),p--;for(;0<m-p;)f=_i(f),m--;for(;p--;){if(u===f||f!==null&&u===f.alternate)break b;u=_i(u),f=_i(f)}u=null}else u=null;c!==null&&vi(o,s,c,u,!1),l!==null&&d!==null&&vi(o,d,l,u,!0)}}a:{if(s=r?Wi(r):window,c=s.nodeName&&s.nodeName.toLowerCase(),c===`select`||c===`input`&&s.type===`file`)var g=yr;else if(pr(s))if(br)g=kr;else{g=Dr;var _=Er}else (c=s.nodeName)&&c.toLowerCase()===`input`&&(s.type===`checkbox`||s.type===`radio`)&&(g=Or);if(g&&=g(e,r)){mr(o,g,n,i);break a}_&&_(e,s,r),e===`focusout`&&(_=s._wrapperState)&&_.controlled&&s.type===`number`&&Se(s,`number`,s.value)}switch(_=r?Wi(r):window,e){case`focusin`:(pr(_)||_.contentEditable===`true`)&&(Br=_,Vr=r,Hr=null);break;case`focusout`:Hr=Vr=Br=null;break;case`mousedown`:Ur=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Ur=!1,Wr(o,n,i);break;case`selectionchange`:if(zr)break;case`keydown`:case`keyup`:Wr(o,n,i)}var v;if(tr)b:{switch(e){case`compositionstart`:var y=`onCompositionStart`;break b;case`compositionend`:y=`onCompositionEnd`;break b;case`compositionupdate`:y=`onCompositionUpdate`;break b}y=void 0}else lr?sr(e,n)&&(y=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(y=`onCompositionStart`);y&&(ir&&n.locale!==`ko`&&(lr||y!==`onCompositionStart`?y===`onCompositionEnd`&&lr&&(v=Dn()):(wn=i,Tn=`value`in wn?wn.value:wn.textContent,lr=!0)),_=gi(r,y),0<_.length&&(y=new Un(y,e,null,n,i),o.push({event:y,listeners:_}),v?y.data=v:(v=cr(n),v!==null&&(y.data=v)))),(v=rr?ur(e,n):dr(e,n))&&(r=gi(r,`onBeforeInput`),0<r.length&&(i=new Un(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:i,listeners:r}),i.data=v))}ci(o,t)})}function hi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function gi(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=$e(e,n),a!=null&&r.unshift(hi(e,a,i)),a=$e(e,t),a!=null&&r.push(hi(e,a,i))),e=e.return}return r}function _i(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function vi(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(c!==null&&c===r)break;s.tag===5&&l!==null&&(s=l,i?(c=$e(n,a),c!=null&&o.unshift(hi(n,c,s))):i||(c=$e(n,a),c!=null&&o.push(hi(n,c,s)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var yi=/\r\n?/g,bi=/\u0000|\uFFFD/g;function xi(e){return(typeof e==`string`?e:``+e).replace(yi,`
|
|
7
|
+
`).replace(bi,``)}function Si(e,t,n){if(t=xi(t),xi(e)!==t&&n)throw Error(r(425))}function Ci(){}var wi=null,Ti=null;function Ei(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Di=typeof setTimeout==`function`?setTimeout:void 0,Oi=typeof clearTimeout==`function`?clearTimeout:void 0,ki=typeof Promise==`function`?Promise:void 0,Ai=typeof queueMicrotask==`function`?queueMicrotask:ki===void 0?Di:function(e){return ki.resolve(null).then(e).catch(ji)};function ji(e){setTimeout(function(){throw e})}function Mi(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`){if(r===0){e.removeChild(i),gn(t);return}r--}else n!==`$`&&n!==`$?`&&n!==`$!`||r++;n=i}while(n);gn(t)}function Ni(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`)break;if(t===`/$`)return null}}return e}function Pi(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`){if(t===0)return e;t--}else n===`/$`&&t++}e=e.previousSibling}return null}var Fi=Math.random().toString(36).slice(2),Ii=`__reactFiber$`+Fi,Li=`__reactProps$`+Fi,Ri=`__reactContainer$`+Fi,zi=`__reactEvents$`+Fi,Bi=`__reactListeners$`+Fi,Vi=`__reactHandles$`+Fi;function Hi(e){var t=e[Ii];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ri]||n[Ii]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Pi(e);e!==null;){if(n=e[Ii])return n;e=Pi(e)}return t}e=n,n=e.parentNode}return null}function Ui(e){return e=e[Ii]||e[Ri],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Wi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(r(33))}function Gi(e){return e[Li]||null}var Ki=[],qi=-1;function Ji(e){return{current:e}}function Yi(e){0>qi||(e.current=Ki[qi],Ki[qi]=null,qi--)}function Xi(e,t){qi++,Ki[qi]=e.current,e.current=t}var Zi={},Qi=Ji(Zi),$i=Ji(!1),ea=Zi;function ta(e,t){var n=e.type.contextTypes;if(!n)return Zi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function na(e){return e=e.childContextTypes,e!=null}function ra(){Yi($i),Yi(Qi)}function ia(e,t,n){if(Qi.current!==Zi)throw Error(r(168));Xi(Qi,t),Xi($i,n)}function aa(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!=`function`)return n;for(var a in i=i.getChildContext(),i)if(!(a in t))throw Error(r(108,ue(e)||`Unknown`,a));return ae({},n,i)}function oa(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Zi,ea=Qi.current,Xi(Qi,e),Xi($i,$i.current),!0}function sa(e,t,n){var i=e.stateNode;if(!i)throw Error(r(169));n?(e=aa(e,t,ea),i.__reactInternalMemoizedMergedChildContext=e,Yi($i),Yi(Qi),Xi(Qi,e)):Yi($i),Xi($i,n)}var ca=null,la=!1,ua=!1;function da(e){ca===null?ca=[e]:ca.push(e)}function fa(e){la=!0,da(e)}function pa(){if(!ua&&ca!==null){ua=!0;var e=0,t=Kt;try{var n=ca;for(Kt=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ca=null,la=!1}catch(t){throw ca!==null&&(ca=ca.slice(e+1)),gt(St,pa),t}finally{Kt=t,ua=!1}}return null}var ma=[],ha=0,ga=null,_a=0,va=[],ya=0,ba=null,xa=1,Sa=``;function Ca(e,t){ma[ha++]=_a,ma[ha++]=ga,ga=e,_a=t}function wa(e,t,n){va[ya++]=xa,va[ya++]=Sa,va[ya++]=ba,ba=e;var r=xa;e=Sa;var i=32-At(r)-1;r&=~(1<<i),n+=1;var a=32-At(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,xa=1<<32-At(t)+i|n<<i|r,Sa=a+e}else xa=1<<a|n<<i|r,Sa=e}function Ta(e){e.return!==null&&(Ca(e,1),wa(e,1,0))}function Ea(e){for(;e===ga;)ga=ma[--ha],ma[ha]=null,_a=ma[--ha],ma[ha]=null;for(;e===ba;)ba=va[--ya],va[ya]=null,Sa=va[--ya],va[ya]=null,xa=va[--ya],va[ya]=null}var Da=null,Oa=null,ka=!1,Aa=null;function ja(e,t){var n=iu(5,null,null,0);n.elementType=`DELETED`,n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Ma(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t===null?!1:(e.stateNode=t,Da=e,Oa=Ni(t.firstChild),!0);case 6:return t=e.pendingProps===``||t.nodeType!==3?null:t,t===null?!1:(e.stateNode=t,Da=e,Oa=null,!0);case 13:return t=t.nodeType===8?t:null,t===null?!1:(n=ba===null?null:{id:xa,overflow:Sa},e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=iu(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Da=e,Oa=null,!0);default:return!1}}function Na(e){return(e.mode&1)!=0&&(e.flags&128)==0}function Pa(e){if(ka){var t=Oa;if(t){var n=t;if(!Ma(e,t)){if(Na(e))throw Error(r(418));t=Ni(n.nextSibling);var i=Da;t&&Ma(e,t)?ja(i,n):(e.flags=e.flags&-4097|2,ka=!1,Da=e)}}else{if(Na(e))throw Error(r(418));e.flags=e.flags&-4097|2,ka=!1,Da=e}}}function Fa(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Da=e}function Ia(e){if(e!==Da)return!1;if(!ka)return Fa(e),ka=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!==`head`&&t!==`body`&&!Ei(e.type,e.memoizedProps)),t&&=Oa){if(Na(e))throw La(),Error(r(418));for(;t;)ja(e,t),t=Ni(t.nextSibling)}if(Fa(e),e.tag===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(r(317));a:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`){if(t===0){Oa=Ni(e.nextSibling);break a}t--}else n!==`$`&&n!==`$!`&&n!==`$?`||t++}e=e.nextSibling}Oa=null}}else Oa=Da?Ni(e.stateNode.nextSibling):null;return!0}function La(){for(var e=Oa;e;)e=Ni(e.nextSibling)}function Ra(){Oa=Da=null,ka=!1}function za(e){Aa===null?Aa=[e]:Aa.push(e)}var Ba=x.ReactCurrentBatchConfig;function Va(e,t,n){if(e=n.ref,e!==null&&typeof e!=`function`&&typeof e!=`object`){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(r(309));var i=n.stateNode}if(!i)throw Error(r(147,e));var a=i,o=``+e;return t!==null&&t.ref!==null&&typeof t.ref==`function`&&t.ref._stringRef===o?t.ref:(t=function(e){var t=a.refs;e===null?delete t[o]:t[o]=e},t._stringRef=o,t)}if(typeof e!=`string`)throw Error(r(284));if(!n._owner)throw Error(r(290,e))}return e}function Ha(e,t){throw e=Object.prototype.toString.call(t),Error(r(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e))}function Ua(e){var t=e._init;return t(e._payload)}function Wa(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function i(e,t){for(e=new Map;t!==null;)t.key===null?e.set(t.index,t):e.set(t.key,t),t=t.sibling;return e}function a(e,t){return e=su(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=2,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=2),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=du(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===w?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===ne&&Ua(i)===t.type)?(r=a(t,n.props),r.ref=Va(e,t,n),r.return=e,r):(r=cu(n.type,n.key,n.props,null,e.mode,r),r.ref=Va(e,t,n),r.return=e,r)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=fu(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=lu(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`)return t=du(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case S:return n=cu(t.type,t.key,t.props,null,e.mode,n),n.ref=Va(e,null,t),n.return=e,n;case C:return t=fu(t,e.mode,n),t.return=e,t;case ne:var r=t._init;return f(e,r(t._payload),n)}if(Ce(t)||ie(t))return t=lu(t,e.mode,n,null),t.return=e,t;Ha(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case S:return n.key===i?l(e,t,n,r):null;case C:return n.key===i?u(e,t,n,r):null;case ne:return i=n._init,p(e,t,i(n._payload),r)}if(Ce(n)||ie(n))return i===null?d(e,t,n,r,null):null;Ha(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case S:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case C:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case ne:var a=r._init;return m(e,t,n,a(r._payload),i)}if(Ce(r)||ie(r))return e=e.get(n)||null,d(t,e,r,i,null);Ha(t,r)}return null}function h(r,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(r,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(r,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(r,d),ka&&Ca(r,h),l;if(d===null){for(;h<s.length;h++)d=f(r,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return ka&&Ca(r,h),l}for(d=i(r,d);h<s.length;h++)g=m(d,r,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(r,e)}),ka&&Ca(r,h),l}function g(a,s,c,l){var u=ie(c);if(typeof u!=`function`)throw Error(r(150));if(c=u.call(c),c==null)throw Error(r(151));for(var d=u=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),ka&&Ca(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return ka&&Ca(a,g),u}for(h=i(a,h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),ka&&Ca(a,g),u}function _(e,r,i,o){if(typeof i==`object`&&i&&i.type===w&&i.key===null&&(i=i.props.children),typeof i==`object`&&i){switch(i.$$typeof){case S:a:{for(var c=i.key,l=r;l!==null;){if(l.key===c){if(c=i.type,c===w){if(l.tag===7){n(e,l.sibling),r=a(l,i.props.children),r.return=e,e=r;break a}}else if(l.elementType===c||typeof c==`object`&&c&&c.$$typeof===ne&&Ua(c)===l.type){n(e,l.sibling),r=a(l,i.props),r.ref=Va(e,l,i),r.return=e,e=r;break a}n(e,l);break}else t(e,l);l=l.sibling}i.type===w?(r=lu(i.props.children,e.mode,o,i.key),r.return=e,e=r):(o=cu(i.type,i.key,i.props,null,e.mode,o),o.ref=Va(e,r,i),o.return=e,e=o)}return s(e);case C:a:{for(l=i.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),r=a(r,i.children||[]),r.return=e,e=r;break a}else{n(e,r);break}else t(e,r);r=r.sibling}r=fu(i,e.mode,o),r.return=e,e=r}return s(e);case ne:return l=i._init,_(e,r,l(i._payload),o)}if(Ce(i))return h(e,r,i,o);if(ie(i))return g(e,r,i,o);Ha(e,i)}return typeof i==`string`&&i!==``||typeof i==`number`?(i=``+i,r!==null&&r.tag===6?(n(e,r.sibling),r=a(r,i),r.return=e,e=r):(n(e,r),r=du(i,e.mode,o),r.return=e,e=r),s(e)):n(e,r)}return _}var Ga=Wa(!0),Ka=Wa(!1),qa=Ji(null),Ja=null,Ya=null,Xa=null;function Za(){Xa=Ya=Ja=null}function Qa(e){var t=qa.current;Yi(qa),e._currentValue=t}function $a(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function eo(e,t){Ja=e,Xa=Ya=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Gs=!0),e.firstContext=null)}function to(e){var t=e._currentValue;if(Xa!==e)if(e={context:e,memoizedValue:t,next:null},Ya===null){if(Ja===null)throw Error(r(308));Ya=e,Ja.dependencies={lanes:0,firstContext:e}}else Ya=Ya.next=e;return t}var no=null;function ro(e){no===null?no=[e]:no.push(e)}function io(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,ro(t)):(n.next=i.next,i.next=n),t.interleaved=n,ao(e,r)}function ao(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var oo=!1;function so(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function co(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function lo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function uo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Qc&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,ao(e,n)}return i=r.interleaved,i===null?(t.next=t,ro(r)):(t.next=i.next,i.next=t),r.interleaved=t,ao(e,n)}function fo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194240)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Gt(e,n)}}function po(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function mo(e,t,n,r){var i=e.updateQueue;oo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane,p=s.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});a:{var m=e,h=s;switch(f=t,p=n,h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(p,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(p,d,f):m,f==null)break a;d=ae({},d,f);break a;case 2:oo=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(1);if(u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);ol|=o,e.lanes=o,e.memoizedState=d}}function ho(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],a=i.callback;if(a!==null){if(i.callback=null,i=n,typeof a!=`function`)throw Error(r(191,a));a.call(i)}}}var go={},_o=Ji(go),vo=Ji(go),yo=Ji(go);function bo(e){if(e===go)throw Error(r(174));return e}function xo(e,t){switch(Xi(yo,t),Xi(vo,e),Xi(_o,go),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ae(null,``);break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ae(t,e)}Yi(_o),Xi(_o,t)}function So(){Yi(_o),Yi(vo),Yi(yo)}function Co(e){bo(yo.current);var t=bo(_o.current),n=Ae(t,e.type);t!==n&&(Xi(vo,e),Xi(_o,n))}function wo(e){vo.current===e&&(Yi(_o),Yi(vo))}var To=Ji(0);function Eo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data===`$?`||n.data===`$!`))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Do=[];function Oo(){for(var e=0;e<Do.length;e++)Do[e]._workInProgressVersionPrimary=null;Do.length=0}var ko=x.ReactCurrentDispatcher,Ao=x.ReactCurrentBatchConfig,jo=0,Mo=null,No=null,Po=null,Fo=!1,Io=!1,Lo=0,Ro=0;function zo(){throw Error(r(321))}function Bo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!jr(e[n],t[n]))return!1;return!0}function Vo(e,t,n,i,a,o){if(jo=o,Mo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ko.current=e===null||e.memoizedState===null?Ts:Es,e=n(i,a),Io){o=0;do{if(Io=!1,Lo=0,25<=o)throw Error(r(301));o+=1,Po=No=null,t.updateQueue=null,ko.current=Ds,e=n(i,a)}while(Io)}if(ko.current=ws,t=No!==null&&No.next!==null,jo=0,Po=No=Mo=null,Fo=!1,t)throw Error(r(300));return e}function Ho(){var e=Lo!==0;return Lo=0,e}function Uo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Po===null?Mo.memoizedState=Po=e:Po=Po.next=e,Po}function Wo(){if(No===null){var e=Mo.alternate;e=e===null?null:e.memoizedState}else e=No.next;var t=Po===null?Mo.memoizedState:Po.next;if(t!==null)Po=t,No=e;else{if(e===null)throw Error(r(310));No=e,e={memoizedState:No.memoizedState,baseState:No.baseState,baseQueue:No.baseQueue,queue:No.queue,next:null},Po===null?Mo.memoizedState=Po=e:Po=Po.next=e}return Po}function Go(e,t){return typeof t==`function`?t(e):t}function Ko(e){var t=Wo(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=No,a=i.baseQueue,o=n.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}i.baseQueue=a=o,n.pending=null}if(a!==null){o=a.next,i=i.baseState;var c=s=null,l=null,u=o;do{var d=u.lane;if((jo&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),i=u.hasEagerState?u.eagerState:e(i,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(c=l=f,s=i):l=l.next=f,Mo.lanes|=d,ol|=d}u=u.next}while(u!==null&&u!==o);l===null?s=i:l.next=c,jr(i,t.memoizedState)||(Gs=!0),t.memoizedState=i,t.baseState=s,t.baseQueue=l,n.lastRenderedState=i}if(e=n.interleaved,e!==null){a=e;do o=a.lane,Mo.lanes|=o,ol|=o,a=a.next;while(a!==e)}else a===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function qo(e){var t=Wo(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);jr(o,t.memoizedState)||(Gs=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,i]}function Jo(){}function Yo(e,t){var n=Mo,i=Wo(),a=t(),o=!jr(i.memoizedState,a);if(o&&(i.memoizedState=a,Gs=!0),i=i.queue,cs(Qo.bind(null,n,i,e),[e]),i.getSnapshot!==t||o||Po!==null&&Po.memoizedState.tag&1){if(n.flags|=2048,ns(9,Zo.bind(null,n,i,a,t),void 0,null),$c===null)throw Error(r(349));jo&30||Xo(n,t,a)}return a}function Xo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Mo.updateQueue,t===null?(t={lastEffect:null,stores:null},Mo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Zo(e,t,n,r){t.value=n,t.getSnapshot=r,$o(t)&&es(e)}function Qo(e,t,n){return n(function(){$o(t)&&es(e)})}function $o(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!jr(e,n)}catch{return!0}}function es(e){var t=ao(e,1);t!==null&&El(t,e,1,-1)}function ts(e){var t=Uo();return typeof e==`function`&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Go,lastRenderedState:e},t.queue=e,e=e.dispatch=bs.bind(null,Mo,e),[t.memoizedState,e]}function ns(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Mo.updateQueue,t===null?(t={lastEffect:null,stores:null},Mo.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function rs(){return Wo().memoizedState}function is(e,t,n,r){var i=Uo();Mo.flags|=e,i.memoizedState=ns(1|t,n,void 0,r===void 0?null:r)}function as(e,t,n,r){var i=Wo();r=r===void 0?null:r;var a=void 0;if(No!==null){var o=No.memoizedState;if(a=o.destroy,r!==null&&Bo(r,o.deps)){i.memoizedState=ns(t,n,a,r);return}}Mo.flags|=e,i.memoizedState=ns(1|t,n,a,r)}function ss(e,t){return is(8390656,8,e,t)}function cs(e,t){return as(2048,8,e,t)}function ls(e,t){return as(4,2,e,t)}function us(e,t){return as(4,4,e,t)}function ds(e,t){if(typeof t==`function`)return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function fs(e,t,n){return n=n==null?null:n.concat([e]),as(4,4,ds.bind(null,t,e),n)}function ps(){}function ms(e,t){var n=Wo();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Bo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function hs(e,t){var n=Wo();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Bo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function gs(e,t,n){return jo&21?(jr(n,t)||(n=Vt(),Mo.lanes|=n,ol|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Gs=!0),e.memoizedState=n)}function _s(e,t){var n=Kt;Kt=n!==0&&4>n?n:4,e(!0);var r=Ao.transition;Ao.transition={};try{e(!1),t()}finally{Kt=n,Ao.transition=r}}function vs(){return Wo().memoizedState}function ys(e,t,n){var r=Tl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},xs(e))Ss(t,n);else if(n=io(e,t,n,r),n!==null){var i=wl();El(n,e,r,i),Cs(n,t,r)}}function bs(e,t,n){var r=Tl(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(xs(e))Ss(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,jr(s,o)){var c=t.interleaved;c===null?(i.next=i,ro(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}n=io(e,t,i,r),n!==null&&(i=wl(),El(n,e,r,i),Cs(n,t,r))}}function xs(e){var t=e.alternate;return e===Mo||t!==null&&t===Mo}function Ss(e,t){Io=Fo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Cs(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Gt(e,n)}}var ws={readContext:to,useCallback:zo,useContext:zo,useEffect:zo,useImperativeHandle:zo,useInsertionEffect:zo,useLayoutEffect:zo,useMemo:zo,useReducer:zo,useRef:zo,useState:zo,useDebugValue:zo,useDeferredValue:zo,useTransition:zo,useMutableSource:zo,useSyncExternalStore:zo,useId:zo,unstable_isNewReconciler:!1},Ts={readContext:to,useCallback:function(e,t){return Uo().memoizedState=[e,t===void 0?null:t],e},useContext:to,useEffect:ss,useImperativeHandle:function(e,t,n){return n=n==null?null:n.concat([e]),is(4194308,4,ds.bind(null,t,e),n)},useLayoutEffect:function(e,t){return is(4194308,4,e,t)},useInsertionEffect:function(e,t){return is(4,2,e,t)},useMemo:function(e,t){var n=Uo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Uo();return t=n===void 0?t:n(t),r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ys.bind(null,Mo,e),[r.memoizedState,e]},useRef:function(e){var t=Uo();return e={current:e},t.memoizedState=e},useState:ts,useDebugValue:ps,useDeferredValue:function(e){return Uo().memoizedState=e},useTransition:function(){var e=ts(!1),t=e[0];return e=_s.bind(null,e[1]),Uo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=Mo,a=Uo();if(ka){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),$c===null)throw Error(r(349));jo&30||Xo(i,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ss(Qo.bind(null,i,o,e),[e]),i.flags|=2048,ns(9,Zo.bind(null,i,o,n,t),void 0,null),n},useId:function(){var e=Uo(),t=$c.identifierPrefix;if(ka){var n=Sa,r=xa;n=(r&~(1<<32-At(r)-1)).toString(32)+n,t=`:`+t+`R`+n,n=Lo++,0<n&&(t+=`H`+n.toString(32)),t+=`:`}else n=Ro++,t=`:`+t+`r`+n.toString(32)+`:`;return e.memoizedState=t},unstable_isNewReconciler:!1},Es={readContext:to,useCallback:ms,useContext:to,useEffect:cs,useImperativeHandle:fs,useInsertionEffect:ls,useLayoutEffect:us,useMemo:hs,useReducer:Ko,useRef:rs,useState:function(){return Ko(Go)},useDebugValue:ps,useDeferredValue:function(e){return gs(Wo(),No.memoizedState,e)},useTransition:function(){return[Ko(Go)[0],Wo().memoizedState]},useMutableSource:Jo,useSyncExternalStore:Yo,useId:vs,unstable_isNewReconciler:!1},Ds={readContext:to,useCallback:ms,useContext:to,useEffect:cs,useImperativeHandle:fs,useInsertionEffect:ls,useLayoutEffect:us,useMemo:hs,useReducer:qo,useRef:rs,useState:function(){return qo(Go)},useDebugValue:ps,useDeferredValue:function(e){var t=Wo();return No===null?t.memoizedState=e:gs(t,No.memoizedState,e)},useTransition:function(){return[qo(Go)[0],Wo().memoizedState]},useMutableSource:Jo,useSyncExternalStore:Yo,useId:vs,unstable_isNewReconciler:!1};function Os(e,t){if(e&&e.defaultProps){for(var n in t=ae({},t),e=e.defaultProps,e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function ks(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ae({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var As={isMounted:function(e){return(e=e._reactInternals)?ut(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=wl(),i=Tl(e),a=lo(r,i);a.payload=t,n!=null&&(a.callback=n),t=uo(e,a,i),t!==null&&(El(t,e,i,r),fo(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=wl(),i=Tl(e),a=lo(r,i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=uo(e,a,i),t!==null&&(El(t,e,i,r),fo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=wl(),r=Tl(e),i=lo(n,r);i.tag=2,t!=null&&(i.callback=t),t=uo(e,i,r),t!==null&&(El(t,e,r,n),fo(t,e,r))}};function js(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Mr(n,r)||!Mr(i,a):!0}function Ms(e,t,n){var r=!1,i=Zi,a=t.contextType;return typeof a==`object`&&a?a=to(a):(i=na(t)?ea:Qi.current,r=t.contextTypes,a=(r=r!=null)?ta(e,i):Zi),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=As,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function Ns(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&As.enqueueReplaceState(t,t.state,null)}function Ps(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},so(e);var a=t.contextType;typeof a==`object`&&a?i.context=to(a):(a=na(t)?ea:Qi.current,i.context=ta(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a==`function`&&(ks(e,t,a,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps==`function`||typeof i.getSnapshotBeforeUpdate==`function`||typeof i.UNSAFE_componentWillMount!=`function`&&typeof i.componentWillMount!=`function`||(t=i.state,typeof i.componentWillMount==`function`&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount==`function`&&i.UNSAFE_componentWillMount(),t!==i.state&&As.enqueueReplaceState(i,i.state,null),mo(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount==`function`&&(e.flags|=4194308)}function Fs(e,t){try{var n=``,r=t;do n+=le(r),r=r.return;while(r);var i=n}catch(e){i=`
|
|
8
|
+
Error generating stack: `+e.message+`
|
|
9
|
+
`+e.stack}return{value:e,source:t,stack:i,digest:null}}function Is(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Ls(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var Rs=typeof WeakMap==`function`?WeakMap:Map;function zs(e,t,n){n=lo(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ml||(ml=!0,hl=r),Ls(e,t)},n}function Bs(e,t,n){n=lo(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r==`function`){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Ls(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch==`function`&&(n.callback=function(){Ls(e,t),typeof r!=`function`&&(gl===null?gl=new Set([this]):gl.add(this));var n=t.stack;this.componentDidCatch(t.value,{componentStack:n===null?``:n})}),n}function Vs(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Rs;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Zl.bind(null,e,t,n),t.then(e,e))}function Hs(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t===null?!0:t.dehydrated!==null),t)return e;e=e.return}while(e!==null);return null}function Us(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=lo(-1,1),t.tag=2,uo(n,t,1))),n.lanes|=1),e)}var Ws=x.ReactCurrentOwner,Gs=!1;function Ks(e,t,n,r){t.child=e===null?Ka(t,null,n,r):Ga(t,e.child,n,r)}function qs(e,t,n,r,i){n=n.render;var a=t.ref;return eo(t,i),r=Vo(e,t,n,r,a,i),n=Ho(),e!==null&&!Gs?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,dc(e,t,i)):(ka&&n&&Ta(t),t.flags|=1,Ks(e,t,r,i),t.child)}function Js(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!au(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,Ys(e,t,a,r,i)):(e=cu(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&i)===0){var o=a.memoizedProps;if(n=n.compare,n=n===null?Mr:n,n(o,r)&&e.ref===t.ref)return dc(e,t,i)}return t.flags|=1,e=su(a,r),e.ref=t.ref,e.return=t,t.child=e}function Ys(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Mr(a,r)&&e.ref===t.ref)if(Gs=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(Gs=!0);else return t.lanes=e.lanes,dc(e,t,i)}return Zs(e,t,n,r,i)}function Xs(e,t,n){var r=t.pendingProps,i=r.children,a=e===null?null:e.memoizedState;if(r.mode===`hidden`)if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Xi(rl,nl),nl|=n;else{if(!(n&1073741824))return e=a===null?n:a.baseLanes|n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Xi(rl,nl),nl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a===null?n:a.baseLanes,Xi(rl,nl),nl|=r}else a===null?r=n:(r=a.baseLanes|n,t.memoizedState=null),Xi(rl,nl),nl|=r;return Ks(e,t,i,n),t.child}function B(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Zs(e,t,n,r,i){var a=na(n)?ea:Qi.current;return a=ta(t,a),eo(t,i),n=Vo(e,t,n,r,a,i),r=Ho(),e!==null&&!Gs?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,dc(e,t,i)):(ka&&r&&Ta(t),t.flags|=1,Ks(e,t,n,i),t.child)}function Qs(e,t,n,r,i){if(na(n)){var a=!0;oa(t)}else a=!1;if(eo(t,i),t.stateNode===null)uc(e,t),Ms(t,n,r),Ps(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var c=o.context,l=n.contextType;typeof l==`object`&&l?l=to(l):(l=na(n)?ea:Qi.current,l=ta(t,l));var u=n.getDerivedStateFromProps,d=typeof u==`function`||typeof o.getSnapshotBeforeUpdate==`function`;d||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==r||c!==l)&&Ns(t,o,r,l),oo=!1;var f=t.memoizedState;o.state=f,mo(t,r,o,i),c=t.memoizedState,s!==r||f!==c||$i.current||oo?(typeof u==`function`&&(ks(t,n,u,r),c=t.memoizedState),(s=oo||js(t,n,s,r,f,c,l))?(d||typeof o.UNSAFE_componentWillMount!=`function`&&typeof o.componentWillMount!=`function`||(typeof o.componentWillMount==`function`&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount==`function`&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount==`function`&&(t.flags|=4194308)):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=l,r=s):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,co(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:Os(t.type,s),o.props=l,d=t.pendingProps,f=o.context,c=n.contextType,typeof c==`object`&&c?c=to(c):(c=na(n)?ea:Qi.current,c=ta(t,c));var p=n.getDerivedStateFromProps;(u=typeof p==`function`||typeof o.getSnapshotBeforeUpdate==`function`)||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==d||f!==c)&&Ns(t,o,r,c),oo=!1,f=t.memoizedState,o.state=f,mo(t,r,o,i);var m=t.memoizedState;s!==d||f!==m||$i.current||oo?(typeof p==`function`&&(ks(t,n,p,r),m=t.memoizedState),(l=oo||js(t,n,l,r,f,m,c)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!=`function`&&typeof o.componentWillUpdate!=`function`||(typeof o.componentWillUpdate==`function`&&o.componentWillUpdate(r,m,c),typeof o.UNSAFE_componentWillUpdate==`function`&&o.UNSAFE_componentWillUpdate(r,m,c)),typeof o.componentDidUpdate==`function`&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=c,r=l):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return $s(e,t,n,r,a,i)}function $s(e,t,n,r,i,a){B(e,t);var o=(t.flags&128)!=0;if(!r&&!o)return i&&sa(t,n,!1),dc(e,t,a);r=t.stateNode,Ws.current=t;var s=o&&typeof n.getDerivedStateFromError!=`function`?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Ga(t,e.child,null,a),t.child=Ga(t,null,s,a)):Ks(e,t,s,a),t.memoizedState=r.state,i&&sa(t,n,!0),t.child}function ec(e){var t=e.stateNode;t.pendingContext?ia(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ia(e,t.context,!1),xo(e,t.containerInfo)}function tc(e,t,n,r,i){return Ra(),za(i),t.flags|=256,Ks(e,t,n,r),t.child}var V={dehydrated:null,treeContext:null,retryLane:0};function nc(e){return{baseLanes:e,cachePool:null,transitions:null}}function rc(e,t,n){var r=t.pendingProps,i=To.current,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!=0),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Xi(To,i&1),e===null)return Pa(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data===`$!`?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,a?(r=t.mode,a=t.child,o={mode:`hidden`,children:o},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=uu(o,r,0,null),e=lu(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=nc(n),t.memoizedState=V,e):ic(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return oc(e,t,o,r,s,i,n);if(a){a=r.fallback,o=t.mode,i=e.child,s=i.sibling;var c={mode:`hidden`,children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=su(i,c),r.subtreeFlags=i.subtreeFlags&14680064),s===null?(a=lu(a,o,n,null),a.flags|=2):a=su(s,a),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?nc(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=V,r}return a=e.child,e=a.sibling,r=su(a,{mode:`visible`,children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function ic(e,t){return t=uu({mode:`visible`,children:t},e.mode,0,null),t.return=e,e.child=t}function ac(e,t,n,r){return r!==null&&za(r),Ga(t,e.child,null,n),e=ic(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function oc(e,t,n,i,a,o,s){if(n)return t.flags&256?(t.flags&=-257,i=Is(Error(r(422))),ac(e,t,s,i)):t.memoizedState===null?(o=i.fallback,a=t.mode,i=uu({mode:`visible`,children:i.children},a,0,null),o=lu(o,a,s,null),o.flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,t.mode&1&&Ga(t,e.child,null,s),t.child.memoizedState=nc(s),t.memoizedState=V,o):(t.child=e.child,t.flags|=128,null);if(!(t.mode&1))return ac(e,t,s,null);if(a.data===`$!`){if(i=a.nextSibling&&a.nextSibling.dataset,i)var c=i.dgst;return i=c,o=Error(r(419)),i=Is(o,i,void 0),ac(e,t,s,i)}if(c=(s&e.childLanes)!==0,Gs||c){if(i=$c,i!==null){switch(s&-s){case 4:a=2;break;case 16:a=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}a=(a&(i.suspendedLanes|s))===0?a:0,a!==0&&a!==o.retryLane&&(o.retryLane=a,ao(e,a),El(i,e,a,-1))}return Bl(),i=Is(Error(r(421))),ac(e,t,s,i)}return a.data===`$?`?(t.flags|=128,t.child=e.child,t=$l.bind(null,e),a._reactRetry=t,null):(e=o.treeContext,Oa=Ni(a.nextSibling),Da=t,ka=!0,Aa=null,e!==null&&(va[ya++]=xa,va[ya++]=Sa,va[ya++]=ba,xa=e.id,Sa=e.overflow,ba=t),t=ic(t,i.children),t.flags|=4096,t)}function sc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),$a(e.return,t,n)}function cc(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function lc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Ks(e,t,r.children,n),r=To.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&sc(e,n,t);else if(e.tag===19)sc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Xi(To,r),!(t.mode&1))t.memoizedState=null;else switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Eo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),cc(t,!1,i,n,a);break;case`backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Eo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}cc(t,!0,n,null,a);break;case`together`:cc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function uc(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function dc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ol|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=su(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=su(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function fc(e,t,n){switch(t.tag){case 3:ec(t),Ra();break;case 5:Co(t);break;case 1:na(t.type)&&oa(t);break;case 4:xo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Xi(qa,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(Xi(To,To.current&1),e=dc(e,t,n),e===null?null:e.sibling):rc(e,t,n):(Xi(To,To.current&1),t.flags|=128,null);Xi(To,To.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return lc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Xi(To,To.current),r)break;return null;case 22:case 23:return t.lanes=0,Xs(e,t,n)}return dc(e,t,n)}var pc=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},mc=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,bo(_o.current);var o=null;switch(n){case`input`:i=_e(e,i),r=_e(e,r),o=[];break;case`select`:i=ae({},i,{value:void 0}),r=ae({},r,{value:void 0}),o=[];break;case`textarea`:i=Te(e,i),r=Te(e,r),o=[];break;default:typeof i.onClick!=`function`&&typeof r.onClick==`function`&&(e.onclick=Ci)}ze(n,r);var s;for(u in n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u===`style`){var c=i[u];for(s in c)c.hasOwnProperty(s)&&(n||={},n[s]=``)}else u!==`dangerouslySetInnerHTML`&&u!==`children`&&u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&u!==`autoFocus`&&(a.hasOwnProperty(u)?o||=[]:(o||=[]).push(u,null));for(u in r){var l=r[u];if(c=i?.[u],r.hasOwnProperty(u)&&l!==c&&(l!=null||c!=null))if(u===`style`)if(c){for(s in c)!c.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||={},n[s]=``);for(s in l)l.hasOwnProperty(s)&&c[s]!==l[s]&&(n||={},n[s]=l[s])}else n||(o||=[],o.push(u,n)),n=l;else u===`dangerouslySetInnerHTML`?(l=l?l.__html:void 0,c=c?c.__html:void 0,l!=null&&c!==l&&(o||=[]).push(u,l)):u===`children`?typeof l!=`string`&&typeof l!=`number`||(o||=[]).push(u,``+l):u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&(a.hasOwnProperty(u)?(l!=null&&u===`onScroll`&&li(`scroll`,e),o||c===l||(o=[])):(o||=[]).push(u,l))}n&&(o||=[]).push(`style`,n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}},hc=function(e,t,n,r){n!==r&&(t.flags|=4)};function gc(e,t){if(!ka)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function _c(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function vc(e,t,n){var i=t.pendingProps;switch(Ea(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return _c(t),null;case 1:return na(t.type)&&ra(),_c(t),null;case 3:return i=t.stateNode,So(),Yi($i),Yi(Qi),Oo(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Ia(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Aa!==null&&(Al(Aa),Aa=null))),_c(t),null;case 5:wo(t);var o=bo(yo.current);if(n=t.type,e!==null&&t.stateNode!=null)mc(e,t,n,i,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(r(166));return _c(t),null}if(e=bo(_o.current),Ia(t)){i=t.stateNode,n=t.type;var s=t.memoizedProps;switch(i[Ii]=t,i[Li]=s,e=(t.mode&1)!=0,n){case`dialog`:li(`cancel`,i),li(`close`,i);break;case`iframe`:case`object`:case`embed`:li(`load`,i);break;case`video`:case`audio`:for(o=0;o<ai.length;o++)li(ai[o],i);break;case`source`:li(`error`,i);break;case`img`:case`image`:case`link`:li(`error`,i),li(`load`,i);break;case`details`:li(`toggle`,i);break;case`input`:ve(i,s),li(`invalid`,i);break;case`select`:i._wrapperState={wasMultiple:!!s.multiple},li(`invalid`,i);break;case`textarea`:Ee(i,s),li(`invalid`,i)}for(var c in ze(n,s),o=null,s)if(s.hasOwnProperty(c)){var l=s[c];c===`children`?typeof l==`string`?i.textContent!==l&&(!0!==s.suppressHydrationWarning&&Si(i.textContent,l,e),o=[`children`,l]):typeof l==`number`&&i.textContent!==``+l&&(!0!==s.suppressHydrationWarning&&Si(i.textContent,l,e),o=[`children`,``+l]):a.hasOwnProperty(c)&&l!=null&&c===`onScroll`&&li(`scroll`,i)}switch(n){case`input`:me(i),xe(i,s,!0);break;case`textarea`:me(i),Oe(i);break;case`select`:case`option`:break;default:typeof s.onClick==`function`&&(i.onclick=Ci)}i=o,t.updateQueue=i,i!==null&&(t.flags|=4)}else{c=o.nodeType===9?o:o.ownerDocument,e===`http://www.w3.org/1999/xhtml`&&(e=ke(n)),e===`http://www.w3.org/1999/xhtml`?n===`script`?(e=c.createElement(`div`),e.innerHTML=`<script><\/script>`,e=e.removeChild(e.firstChild)):typeof i.is==`string`?e=c.createElement(n,{is:i.is}):(e=c.createElement(n),n===`select`&&(c=e,i.multiple?c.multiple=!0:i.size&&(c.size=i.size))):e=c.createElementNS(e,n),e[Ii]=t,e[Li]=i,pc(e,t,!1,!1),t.stateNode=e;a:{switch(c=Be(n,i),n){case`dialog`:li(`cancel`,e),li(`close`,e),o=i;break;case`iframe`:case`object`:case`embed`:li(`load`,e),o=i;break;case`video`:case`audio`:for(o=0;o<ai.length;o++)li(ai[o],e);o=i;break;case`source`:li(`error`,e),o=i;break;case`img`:case`image`:case`link`:li(`error`,e),li(`load`,e),o=i;break;case`details`:li(`toggle`,e),o=i;break;case`input`:ve(e,i),o=_e(e,i),li(`invalid`,e);break;case`option`:o=i;break;case`select`:e._wrapperState={wasMultiple:!!i.multiple},o=ae({},i,{value:void 0}),li(`invalid`,e);break;case`textarea`:Ee(e,i),o=Te(e,i),li(`invalid`,e);break;default:o=i}for(s in ze(n,o),l=o,l)if(l.hasOwnProperty(s)){var u=l[s];s===`style`?Le(e,u):s===`dangerouslySetInnerHTML`?(u=u?u.__html:void 0,u!=null&&Me(e,u)):s===`children`?typeof u==`string`?(n!==`textarea`||u!==``)&&Ne(e,u):typeof u==`number`&&Ne(e,``+u):s!==`suppressContentEditableWarning`&&s!==`suppressHydrationWarning`&&s!==`autoFocus`&&(a.hasOwnProperty(s)?u!=null&&s===`onScroll`&&li(`scroll`,e):u!=null&&b(e,s,u,c))}switch(n){case`input`:me(e),xe(e,i,!1);break;case`textarea`:me(e),Oe(e);break;case`option`:i.value!=null&&e.setAttribute(`value`,``+de(i.value));break;case`select`:e.multiple=!!i.multiple,s=i.value,s==null?i.defaultValue!=null&&we(e,!!i.multiple,i.defaultValue,!0):we(e,!!i.multiple,s,!1);break;default:typeof o.onClick==`function`&&(e.onclick=Ci)}switch(n){case`button`:case`input`:case`select`:case`textarea`:i=!!i.autoFocus;break a;case`img`:i=!0;break a;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return _c(t),null;case 6:if(e&&t.stateNode!=null)hc(e,t,e.memoizedProps,i);else{if(typeof i!=`string`&&t.stateNode===null)throw Error(r(166));if(n=bo(yo.current),bo(_o.current),Ia(t)){if(i=t.stateNode,n=t.memoizedProps,i[Ii]=t,(s=i.nodeValue!==n)&&(e=Da,e!==null))switch(e.tag){case 3:Si(i.nodeValue,n,(e.mode&1)!=0);break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Si(i.nodeValue,n,(e.mode&1)!=0)}s&&(t.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[Ii]=t,t.stateNode=i}return _c(t),null;case 13:if(Yi(To),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ka&&Oa!==null&&t.mode&1&&!(t.flags&128))La(),Ra(),t.flags|=98560,s=!1;else if(s=Ia(t),i!==null&&i.dehydrated!==null){if(e===null){if(!s)throw Error(r(318));if(s=t.memoizedState,s=s===null?null:s.dehydrated,!s)throw Error(r(317));s[Ii]=t}else Ra(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;_c(t),s=!1}else Aa!==null&&(Al(Aa),Aa=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,t.mode&1&&(e===null||To.current&1?il===0&&(il=3):Bl())),t.updateQueue!==null&&(t.flags|=4),_c(t),null);case 4:return So(),e===null&&fi(t.stateNode.containerInfo),_c(t),null;case 10:return Qa(t.type._context),_c(t),null;case 17:return na(t.type)&&ra(),_c(t),null;case 19:if(Yi(To),s=t.memoizedState,s===null)return _c(t),null;if(i=(t.flags&128)!=0,c=s.rendering,c===null)if(i)gc(s,!1);else{if(il!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(c=Eo(e),c!==null){for(t.flags|=128,gc(s,!1),i=c.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;n!==null;)s=n,e=i,s.flags&=14680066,c=s.alternate,c===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,e=c.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Xi(To,To.current&1|2),t.child}e=e.sibling}s.tail!==null&&bt()>fl&&(t.flags|=128,i=!0,gc(s,!1),t.lanes=4194304)}else{if(!i)if(e=Eo(c),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),gc(s,!0),s.tail===null&&s.tailMode===`hidden`&&!c.alternate&&!ka)return _c(t),null}else 2*bt()-s.renderingStartTime>fl&&n!==1073741824&&(t.flags|=128,i=!0,gc(s,!1),t.lanes=4194304);s.isBackwards?(c.sibling=t.child,t.child=c):(n=s.last,n===null?t.child=c:n.sibling=c,s.last=c)}return s.tail===null?(_c(t),null):(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=bt(),t.sibling=null,n=To.current,Xi(To,i?n&1|2:n&1),t);case 22:case 23:return Il(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?nl&1073741824&&(_c(t),t.subtreeFlags&6&&(t.flags|=8192)):_c(t),null;case 24:return null;case 25:return null}throw Error(r(156,t.tag))}function yc(e,t){switch(Ea(t),t.tag){case 1:return na(t.type)&&ra(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return So(),Yi($i),Yi(Qi),Oo(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return wo(t),null;case 13:if(Yi(To),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Ra()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Yi(To),null;case 4:return So(),null;case 10:return Qa(t.type._context),null;case 22:case 23:return Il(),null;case 24:return null;default:return null}}var bc=!1,xc=!1,Sc=typeof WeakSet==`function`?WeakSet:Set,H=null;function Cc(e,t){var n=e.ref;if(n!==null)if(typeof n==`function`)try{n(null)}catch(n){Xl(e,t,n)}else n.current=null}function wc(e,t,n){try{n()}catch(n){Xl(e,t,n)}}var Tc=!1;function Ec(e,t){if(wi=_n,e=Ir(),Lr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Ti={focusedElem:e,selectionRange:n},_n=!1,H=t;H!==null;)if(t=H,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,H=e;else for(;H!==null;){t=H;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var g=h.memoizedProps,_=h.memoizedState,v=t.stateNode;v.__reactInternalSnapshotBeforeUpdate=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:Os(t.type,g),_)}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent=``:y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(e){Xl(t,t.return,e)}if(e=t.sibling,e!==null){e.return=t.return,H=e;break}H=t.return}return h=Tc,Tc=!1,h}function Dc(e,t,n){var r=t.updateQueue;if(r=r===null?null:r.lastEffect,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&wc(t,n,a)}i=i.next}while(i!==r)}}function Oc(e,t){if(t=t.updateQueue,t=t===null?null:t.lastEffect,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function kc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t==`function`?t(e):t.current=e}}function Ac(e){var t=e.alternate;t!==null&&(e.alternate=null,Ac(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ii],delete t[Li],delete t[zi],delete t[Bi],delete t[Vi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function jc(e){return e.tag===5||e.tag===3||e.tag===4}function Mc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||jc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Nc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ci));else if(r!==4&&(e=e.child,e!==null))for(Nc(e,t,n),e=e.sibling;e!==null;)Nc(e,t,n),e=e.sibling}function Pc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Pc(e,t,n),e=e.sibling;e!==null;)Pc(e,t,n),e=e.sibling}var Fc=null,Ic=!1;function Lc(e,t,n){for(n=n.child;n!==null;)Rc(e,t,n),n=n.sibling}function Rc(e,t,n){if(Ot&&typeof Ot.onCommitFiberUnmount==`function`)try{Ot.onCommitFiberUnmount(Dt,n)}catch{}switch(n.tag){case 5:xc||Cc(n,t);case 6:var r=Fc,i=Ic;Fc=null,Lc(e,t,n),Fc=r,Ic=i,Fc!==null&&(Ic?(e=Fc,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Fc.removeChild(n.stateNode));break;case 18:Fc!==null&&(Ic?(e=Fc,n=n.stateNode,e.nodeType===8?Mi(e.parentNode,n):e.nodeType===1&&Mi(e,n),gn(e)):Mi(Fc,n.stateNode));break;case 4:r=Fc,i=Ic,Fc=n.stateNode.containerInfo,Ic=!0,Lc(e,t,n),Fc=r,Ic=i;break;case 0:case 11:case 14:case 15:if(!xc&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&wc(n,t,o),i=i.next}while(i!==r)}Lc(e,t,n);break;case 1:if(!xc&&(Cc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){Xl(n,t,e)}Lc(e,t,n);break;case 21:Lc(e,t,n);break;case 22:n.mode&1?(xc=(r=xc)||n.memoizedState!==null,Lc(e,t,n),xc=r):Lc(e,t,n);break;default:Lc(e,t,n)}}function zc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Sc),t.forEach(function(t){var r=eu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function Bc(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var a=n[i];try{var o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 5:Fc=c.stateNode,Ic=!1;break a;case 3:Fc=c.stateNode.containerInfo,Ic=!0;break a;case 4:Fc=c.stateNode.containerInfo,Ic=!0;break a}c=c.return}if(Fc===null)throw Error(r(160));Rc(o,s,a),Fc=null,Ic=!1;var l=a.alternate;l!==null&&(l.return=null),a.return=null}catch(e){Xl(a,t,e)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Vc(t,e),t=t.sibling}function Vc(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Bc(t,e),Hc(e),i&4){try{Dc(3,e,e.return),Oc(3,e)}catch(t){Xl(e,e.return,t)}try{Dc(5,e,e.return)}catch(t){Xl(e,e.return,t)}}break;case 1:Bc(t,e),Hc(e),i&512&&n!==null&&Cc(n,n.return);break;case 5:if(Bc(t,e),Hc(e),i&512&&n!==null&&Cc(n,n.return),e.flags&32){var a=e.stateNode;try{Ne(a,``)}catch(t){Xl(e,e.return,t)}}if(i&4&&(a=e.stateNode,a!=null)){var o=e.memoizedProps,s=n===null?o:n.memoizedProps,c=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{c===`input`&&o.type===`radio`&&o.name!=null&&ye(a,o),Be(c,s);var u=Be(c,o);for(s=0;s<l.length;s+=2){var d=l[s],f=l[s+1];d===`style`?Le(a,f):d===`dangerouslySetInnerHTML`?Me(a,f):d===`children`?Ne(a,f):b(a,d,f,u)}switch(c){case`input`:be(a,o);break;case`textarea`:De(a,o);break;case`select`:var p=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m==null?p!==!!o.multiple&&(o.defaultValue==null?we(a,!!o.multiple,o.multiple?[]:``,!1):we(a,!!o.multiple,o.defaultValue,!0)):we(a,!!o.multiple,m,!1)}a[Li]=o}catch(t){Xl(e,e.return,t)}}break;case 6:if(Bc(t,e),Hc(e),i&4){if(e.stateNode===null)throw Error(r(162));a=e.stateNode,o=e.memoizedProps;try{a.nodeValue=o}catch(t){Xl(e,e.return,t)}}break;case 3:if(Bc(t,e),Hc(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{gn(t.containerInfo)}catch(t){Xl(e,e.return,t)}break;case 4:Bc(t,e),Hc(e);break;case 13:Bc(t,e),Hc(e),a=e.child,a.flags&8192&&(o=a.memoizedState!==null,a.stateNode.isHidden=o,!o||a.alternate!==null&&a.alternate.memoizedState!==null||(dl=bt())),i&4&&zc(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(xc=(u=xc)||d,Bc(t,e),xc=u):Bc(t,e),Hc(e),i&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(H=e,d=e.child;d!==null;){for(f=H=d;H!==null;){switch(p=H,m=p.child,p.tag){case 0:case 11:case 14:case 15:Dc(4,p,p.return);break;case 1:Cc(p,p.return);var h=p.stateNode;if(typeof h.componentWillUnmount==`function`){i=p,n=p.return;try{t=i,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(e){Xl(i,n,e)}}break;case 5:Cc(p,p.return);break;case 22:if(p.memoizedState!==null){Kc(f);continue}}m===null?Kc(f):(m.return=p,H=m)}d=d.sibling}a:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{a=f.stateNode,u?(o=a.style,typeof o.setProperty==`function`?o.setProperty(`display`,`none`,`important`):o.display=`none`):(c=f.stateNode,l=f.memoizedProps.style,s=l!=null&&l.hasOwnProperty(`display`)?l.display:null,c.style.display=Ie(`display`,s))}catch(t){Xl(e,e.return,t)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?``:f.memoizedProps}catch(t){Xl(e,e.return,t)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break a;for(;f.sibling===null;){if(f.return===null||f.return===e)break a;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Bc(t,e),Hc(e),i&4&&zc(e);break;case 21:break;default:Bc(t,e),Hc(e)}}function Hc(e){var t=e.flags;if(t&2){try{a:{for(var n=e.return;n!==null;){if(jc(n)){var i=n;break a}n=n.return}throw Error(r(160))}switch(i.tag){case 5:var a=i.stateNode;i.flags&32&&(Ne(a,``),i.flags&=-33),Pc(e,Mc(e),a);break;case 3:case 4:var o=i.stateNode.containerInfo;Nc(e,Mc(e),o);break;default:throw Error(r(161))}}catch(t){Xl(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Uc(e,t,n){H=e,Wc(e,t,n)}function Wc(e,t,n){for(var r=(e.mode&1)!=0;H!==null;){var i=H,a=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||bc;if(!o){var s=i.alternate,c=s!==null&&s.memoizedState!==null||xc;s=bc;var l=xc;if(bc=o,(xc=c)&&!l)for(H=i;H!==null;)o=H,c=o.child,o.tag===22&&o.memoizedState!==null||c===null?qc(i):(c.return=o,H=c);for(;a!==null;)H=a,Wc(a,t,n),a=a.sibling;H=i,bc=s,xc=l}Gc(e,t,n)}else i.subtreeFlags&8772&&a!==null?(a.return=i,H=a):Gc(e,t,n)}}function Gc(e){for(;H!==null;){var t=H;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:xc||Oc(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!xc)if(n===null)i.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:Os(t.type,n.memoizedProps);i.componentDidUpdate(a,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&ho(t,o,i);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}ho(t,s,n)}break;case 5:var c=t.stateNode;if(n===null&&t.flags&4){n=c;var l=t.memoizedProps;switch(t.type){case`button`:case`input`:case`select`:case`textarea`:l.autoFocus&&n.focus();break;case`img`:l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&gn(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}xc||t.flags&512&&kc(t)}catch(e){Xl(t,t.return,e)}}if(t===e){H=null;break}if(n=t.sibling,n!==null){n.return=t.return,H=n;break}H=t.return}}function Kc(e){for(;H!==null;){var t=H;if(t===e){H=null;break}var n=t.sibling;if(n!==null){n.return=t.return,H=n;break}H=t.return}}function qc(e){for(;H!==null;){var t=H;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Oc(4,t)}catch(e){Xl(t,n,e)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount==`function`){var i=t.return;try{r.componentDidMount()}catch(e){Xl(t,i,e)}}var a=t.return;try{kc(t)}catch(e){Xl(t,a,e)}break;case 5:var o=t.return;try{kc(t)}catch(e){Xl(t,o,e)}}}catch(e){Xl(t,t.return,e)}if(t===e){H=null;break}var s=t.sibling;if(s!==null){s.return=t.return,H=s;break}H=t.return}}var Jc=Math.ceil,Yc=x.ReactCurrentDispatcher,Xc=x.ReactCurrentOwner,Zc=x.ReactCurrentBatchConfig,Qc=0,$c=null,el=null,tl=0,nl=0,rl=Ji(0),il=0,al=null,ol=0,sl=0,cl=0,ll=null,ul=null,dl=0,fl=1/0,pl=null,ml=!1,hl=null,gl=null,_l=!1,vl=null,yl=0,bl=0,xl=null,Sl=-1,Cl=0;function wl(){return Qc&6?bt():Sl===-1?Sl=bt():Sl}function Tl(e){return e.mode&1?Qc&2&&tl!==0?tl&-tl:Ba.transition===null?(e=Kt,e===0?(e=window.event,e=e===void 0?16:Cn(e.type),e):e):(Cl===0&&(Cl=Vt()),Cl):1}function El(e,t,n,i){if(50<bl)throw bl=0,xl=null,Error(r(185));Ut(e,n,i),(!(Qc&2)||e!==$c)&&(e===$c&&(!(Qc&2)&&(sl|=n),il===4&&Ml(e,tl)),Dl(e,i),n===1&&Qc===0&&!(t.mode&1)&&(fl=bt()+500,la&&pa()))}function Dl(e,t){var n=e.callbackNode;zt(e,t);var r=Lt(e,e===$c?tl:0);if(r===0)n!==null&&_t(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&_t(n),t===1)e.tag===0?fa(Nl.bind(null,e)):da(Nl.bind(null,e)),Ai(function(){!(Qc&6)&&pa()}),n=null;else{switch(qt(r)){case 1:n=St;break;case 4:n=Ct;break;case 16:n=wt;break;case 536870912:n=Et;break;default:n=wt}n=nu(n,Ol.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Ol(e,t){if(Sl=-1,Cl=0,Qc&6)throw Error(r(327));var n=e.callbackNode;if(Jl()&&e.callbackNode!==n)return null;var i=Lt(e,e===$c?tl:0);if(i===0)return null;if(i&30||(i&e.expiredLanes)!==0||t)t=Vl(e,i);else{t=i;var a=Qc;Qc|=2;var o=zl();($c!==e||tl!==t)&&(pl=null,fl=bt()+500,Ll(e,t));do try{Ul();break}catch(t){Rl(e,t)}while(1);Za(),Yc.current=o,Qc=a,el===null?($c=null,tl=0,t=il):t=0}if(t!==0){if(t===2&&(a=Bt(e),a!==0&&(i=a,t=kl(e,a))),t===1)throw n=al,Ll(e,0),Ml(e,i),Dl(e,bt()),n;if(t===6)Ml(e,i);else{if(a=e.current.alternate,!(i&30)&&!jl(a)&&(t=Vl(e,i),t===2&&(o=Bt(e),o!==0&&(i=o,t=kl(e,o))),t===1))throw n=al,Ll(e,0),Ml(e,i),Dl(e,bt()),n;switch(e.finishedWork=a,e.finishedLanes=i,t){case 0:case 1:throw Error(r(345));case 2:Kl(e,ul,pl);break;case 3:if(Ml(e,i),(i&130023424)===i&&(t=dl+500-bt(),10<t)){if(Lt(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){wl(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=Di(Kl.bind(null,e,ul,pl),t);break}Kl(e,ul,pl);break;case 4:if(Ml(e,i),(i&4194240)===i)break;for(t=e.eventTimes,a=-1;0<i;){var s=31-At(i);o=1<<s,s=t[s],s>a&&(a=s),i&=~o}if(i=a,i=bt()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Jc(i/1960))-i,10<i){e.timeoutHandle=Di(Kl.bind(null,e,ul,pl),i);break}Kl(e,ul,pl);break;case 5:Kl(e,ul,pl);break;default:throw Error(r(329))}}}return Dl(e,bt()),e.callbackNode===n?Ol.bind(null,e):null}function kl(e,t){var n=ll;return e.current.memoizedState.isDehydrated&&(Ll(e,t).flags|=256),e=Vl(e,t),e!==2&&(t=ul,ul=n,t!==null&&Al(t)),e}function Al(e){ul===null?ul=e:ul.push.apply(ul,e)}function jl(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!jr(a(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ml(e,t){for(t&=~cl,t&=~sl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-At(t),r=1<<n;e[n]=-1,t&=~r}}function Nl(e){if(Qc&6)throw Error(r(327));Jl();var t=Lt(e,0);if(!(t&1))return Dl(e,bt()),null;var n=Vl(e,t);if(e.tag!==0&&n===2){var i=Bt(e);i!==0&&(t=i,n=kl(e,i))}if(n===1)throw n=al,Ll(e,0),Ml(e,t),Dl(e,bt()),n;if(n===6)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Kl(e,ul,pl),Dl(e,bt()),null}function Pl(e,t){var n=Qc;Qc|=1;try{return e(t)}finally{Qc=n,Qc===0&&(fl=bt()+500,la&&pa())}}function Fl(e){vl!==null&&vl.tag===0&&!(Qc&6)&&Jl();var t=Qc;Qc|=1;var n=Zc.transition,r=Kt;try{if(Zc.transition=null,Kt=1,e)return e()}finally{Kt=r,Zc.transition=n,Qc=t,!(Qc&6)&&pa()}}function Il(){nl=rl.current,Yi(rl)}function Ll(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Oi(n)),el!==null)for(n=el.return;n!==null;){var r=n;switch(Ea(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&ra();break;case 3:So(),Yi($i),Yi(Qi),Oo();break;case 5:wo(r);break;case 4:So();break;case 13:Yi(To);break;case 19:Yi(To);break;case 10:Qa(r.type._context);break;case 22:case 23:Il()}n=n.return}if($c=e,el=e=su(e.current,null),tl=nl=t,il=0,al=null,cl=sl=ol=0,ul=ll=null,no!==null){for(t=0;t<no.length;t++)if(n=no[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=i,r.next=o}n.pending=r}no=null}return e}function Rl(e,t){do{var n=el;try{if(Za(),ko.current=ws,Fo){for(var i=Mo.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}Fo=!1}if(jo=0,Po=No=Mo=null,Io=!1,Lo=0,Xc.current=null,n===null||n.return===null){il=1,al=t,el=null;break}a:{var o=e,s=n.return,c=n,l=t;if(t=tl,c.flags|=32768,typeof l==`object`&&l&&typeof l.then==`function`){var u=l,d=c,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=Hs(s);if(m!==null){m.flags&=-257,Us(m,s,c,o,t),m.mode&1&&Vs(o,u,t),t=m,l=u;var h=t.updateQueue;if(h===null){var g=new Set;g.add(l),t.updateQueue=g}else h.add(l);break a}else{if(!(t&1)){Vs(o,u,t),Bl();break a}l=Error(r(426))}}else if(ka&&c.mode&1){var _=Hs(s);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Us(_,s,c,o,t),za(Fs(l,c));break a}}o=l=Fs(l,c),il!==4&&(il=2),ll===null?ll=[o]:ll.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=zs(o,l,t);po(o,v);break a;case 1:c=l;var y=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof y.getDerivedStateFromError==`function`||b!==null&&typeof b.componentDidCatch==`function`&&(gl===null||!gl.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var x=Bs(o,c,t);po(o,x);break a}}o=o.return}while(o!==null)}Gl(n)}catch(e){t=e,el===n&&n!==null&&(el=n=n.return);continue}break}while(1)}function zl(){var e=Yc.current;return Yc.current=ws,e===null?ws:e}function Bl(){(il===0||il===3||il===2)&&(il=4),$c===null||!(ol&268435455)&&!(sl&268435455)||Ml($c,tl)}function Vl(e,t){var n=Qc;Qc|=2;var i=zl();($c!==e||tl!==t)&&(pl=null,Ll(e,t));do try{Hl();break}catch(t){Rl(e,t)}while(1);if(Za(),Qc=n,Yc.current=i,el!==null)throw Error(r(261));return $c=null,tl=0,il}function Hl(){for(;el!==null;)Wl(el)}function Ul(){for(;el!==null&&!vt();)Wl(el)}function Wl(e){var t=tu(e.alternate,e,nl);e.memoizedProps=e.pendingProps,t===null?Gl(e):el=t,Xc.current=null}function Gl(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=yc(n,t),n!==null){n.flags&=32767,el=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{il=6,el=null;return}}else if(n=vc(n,t,nl),n!==null){el=n;return}if(t=t.sibling,t!==null){el=t;return}el=t=e}while(t!==null);il===0&&(il=5)}function Kl(e,t,n){var r=Kt,i=Zc.transition;try{Zc.transition=null,Kt=1,ql(e,t,n,r)}finally{Zc.transition=i,Kt=r}return null}function ql(e,t,n,i){do Jl();while(vl!==null);if(Qc&6)throw Error(r(327));n=e.finishedWork;var a=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(r(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(Wt(e,o),e===$c&&(el=$c=null,tl=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||_l||(_l=!0,nu(wt,function(){return Jl(),null})),o=(n.flags&15990)!=0,n.subtreeFlags&15990||o){o=Zc.transition,Zc.transition=null;var s=Kt;Kt=1;var c=Qc;Qc|=4,Xc.current=null,Ec(e,n),Vc(n,e),Rr(Ti),_n=!!wi,Ti=wi=null,e.current=n,Uc(n,e,a),yt(),Qc=c,Kt=s,Zc.transition=o}else e.current=n;if(_l&&(_l=!1,vl=e,yl=a),o=e.pendingLanes,o===0&&(gl=null),kt(n.stateNode,i),Dl(e,bt()),t!==null)for(i=e.onRecoverableError,n=0;n<t.length;n++)a=t[n],i(a.value,{componentStack:a.stack,digest:a.digest});if(ml)throw ml=!1,e=hl,hl=null,e;return yl&1&&e.tag!==0&&Jl(),o=e.pendingLanes,o&1?e===xl?bl++:(bl=0,xl=e):bl=0,pa(),null}function Jl(){if(vl!==null){var e=qt(yl),t=Zc.transition,n=Kt;try{if(Zc.transition=null,Kt=16>e?16:e,vl===null)var i=!1;else{if(e=vl,vl=null,yl=0,Qc&6)throw Error(r(331));var a=Qc;for(Qc|=4,H=e.current;H!==null;){var o=H,s=o.child;if(H.flags&16){var c=o.deletions;if(c!==null){for(var l=0;l<c.length;l++){var u=c[l];for(H=u;H!==null;){var d=H;switch(d.tag){case 0:case 11:case 15:Dc(8,d,o)}var f=d.child;if(f!==null)f.return=d,H=f;else for(;H!==null;){d=H;var p=d.sibling,m=d.return;if(Ac(d),d===u){H=null;break}if(p!==null){p.return=m,H=p;break}H=m}}}var h=o.alternate;if(h!==null){var g=h.child;if(g!==null){h.child=null;do{var _=g.sibling;g.sibling=null,g=_}while(g!==null)}}H=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,H=s;else b:for(;H!==null;){if(o=H,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Dc(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,H=v;break b}H=o.return}}var y=e.current;for(H=y;H!==null;){s=H;var b=s.child;if(s.subtreeFlags&2064&&b!==null)b.return=s,H=b;else b:for(s=y;H!==null;){if(c=H,c.flags&2048)try{switch(c.tag){case 0:case 11:case 15:Oc(9,c)}}catch(e){Xl(c,c.return,e)}if(c===s){H=null;break b}var x=c.sibling;if(x!==null){x.return=c.return,H=x;break b}H=c.return}}if(Qc=a,pa(),Ot&&typeof Ot.onPostCommitFiberRoot==`function`)try{Ot.onPostCommitFiberRoot(Dt,e)}catch{}i=!0}return i}finally{Kt=n,Zc.transition=t}}return!1}function Yl(e,t,n){t=Fs(n,t),t=zs(e,t,1),e=uo(e,t,1),t=wl(),e!==null&&(Ut(e,1,t),Dl(e,t))}function Xl(e,t,n){if(e.tag===3)Yl(e,e,n);else for(;t!==null;){if(t.tag===3){Yl(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(gl===null||!gl.has(r))){e=Fs(n,e),e=Bs(t,e,1),t=uo(t,e,1),e=wl(),t!==null&&(Ut(t,1,e),Dl(t,e));break}}t=t.return}}function Zl(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=wl(),e.pingedLanes|=e.suspendedLanes&n,$c===e&&(tl&n)===n&&(il===4||il===3&&(tl&130023424)===tl&&500>bt()-dl?Ll(e,0):cl|=n),Dl(e,t)}function Ql(e,t){t===0&&(e.mode&1?(t=Ft,Ft<<=1,!(Ft&130023424)&&(Ft=4194304)):t=1);var n=wl();e=ao(e,t),e!==null&&(Ut(e,t,n),Dl(e,n))}function $l(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ql(e,n)}function eu(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(r(314))}i!==null&&i.delete(t),Ql(e,n)}var tu=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||$i.current)Gs=!0;else{if((e.lanes&n)===0&&!(t.flags&128))return Gs=!1,fc(e,t,n);Gs=!!(e.flags&131072)}else Gs=!1,ka&&t.flags&1048576&&wa(t,_a,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;uc(e,t),e=t.pendingProps;var a=ta(t,Qi.current);eo(t,n),a=Vo(null,t,i,e,a,n);var o=Ho();return t.flags|=1,typeof a==`object`&&a&&typeof a.render==`function`&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,na(i)?(o=!0,oa(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,so(t),a.updater=As,t.stateNode=a,a._reactInternals=t,Ps(t,i,e,n),t=$s(null,t,i,!0,o,n)):(t.tag=0,ka&&o&&Ta(t),Ks(null,t,a,n),t=t.child),t;case 16:i=t.elementType;a:{switch(uc(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=ou(i),e=Os(i,e),a){case 0:t=Zs(null,t,i,e,n);break a;case 1:t=Qs(null,t,i,e,n);break a;case 11:t=qs(null,t,i,e,n);break a;case 14:t=Js(null,t,i,Os(i.type,e),n);break a}throw Error(r(306,i,``))}return t;case 0:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Os(i,a),Zs(e,t,i,a,n);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Os(i,a),Qs(e,t,i,a,n);case 3:a:{if(ec(t),e===null)throw Error(r(387));i=t.pendingProps,o=t.memoizedState,a=o.element,co(e,t),mo(t,i,null,n);var s=t.memoizedState;if(i=s.element,o.isDehydrated)if(o={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){a=Fs(Error(r(423)),t),t=tc(e,t,i,n,a);break a}else if(i!==a){a=Fs(Error(r(424)),t),t=tc(e,t,i,n,a);break a}else for(Oa=Ni(t.stateNode.containerInfo.firstChild),Da=t,ka=!0,Aa=null,n=Ka(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ra(),i===a){t=dc(e,t,n);break a}Ks(e,t,i,n)}t=t.child}return t;case 5:return Co(t),e===null&&Pa(t),i=t.type,a=t.pendingProps,o=e===null?null:e.memoizedProps,s=a.children,Ei(i,a)?s=null:o!==null&&Ei(i,o)&&(t.flags|=32),B(e,t),Ks(e,t,s,n),t.child;case 6:return e===null&&Pa(t),null;case 13:return rc(e,t,n);case 4:return xo(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Ga(t,null,i,n):Ks(e,t,i,n),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Os(i,a),qs(e,t,i,a,n);case 7:return Ks(e,t,t.pendingProps,n),t.child;case 8:return Ks(e,t,t.pendingProps.children,n),t.child;case 12:return Ks(e,t,t.pendingProps.children,n),t.child;case 10:a:{if(i=t.type._context,a=t.pendingProps,o=t.memoizedProps,s=a.value,Xi(qa,i._currentValue),i._currentValue=s,o!==null)if(jr(o.value,s)){if(o.children===a.children&&!$i.current){t=dc(e,t,n);break a}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var c=o.dependencies;if(c!==null){s=o.child;for(var l=c.firstContext;l!==null;){if(l.context===i){if(o.tag===1){l=lo(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),$a(o.return,n,t),c.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(r(341));s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),$a(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Ks(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,eo(t,n),a=to(a),i=i(a),t.flags|=1,Ks(e,t,i,n),t.child;case 14:return i=t.type,a=Os(i,t.pendingProps),a=Os(i.type,a),Js(e,t,i,a,n);case 15:return Ys(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Os(i,a),uc(e,t),t.tag=1,na(i)?(e=!0,oa(t)):e=!1,eo(t,n),Ms(t,i,a),Ps(t,i,a,n),$s(null,t,i,!0,e,n);case 19:return lc(e,t,n);case 22:return Xs(e,t,n)}throw Error(r(156,t.tag))};function nu(e,t){return gt(e,t)}function ru(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function iu(e,t,n,r){return new ru(e,t,n,r)}function au(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ou(e){if(typeof e==`function`)return+!!au(e);if(e!=null){if(e=e.$$typeof,e===k)return 11;if(e===M)return 14}return 2}function su(e,t){var n=e.alternate;return n===null?(n=iu(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function cu(e,t,n,i,a,o){var s=2;if(i=e,typeof e==`function`)au(e)&&(s=1);else if(typeof e==`string`)s=5;else a:switch(e){case w:return lu(n.children,a,o,t);case T:s=8,a|=8;break;case E:return e=iu(12,n,t,a|2),e.elementType=E,e.lanes=o,e;case A:return e=iu(13,n,t,a),e.elementType=A,e.lanes=o,e;case j:return e=iu(19,n,t,a),e.elementType=j,e.lanes=o,e;case N:return uu(n,a,o,t);default:if(typeof e==`object`&&e)switch(e.$$typeof){case D:s=10;break a;case O:s=9;break a;case k:s=11;break a;case M:s=14;break a;case ne:s=16,i=null;break a}throw Error(r(130,e==null?e:typeof e,``))}return t=iu(s,n,t,a),t.elementType=e,t.type=i,t.lanes=o,t}function lu(e,t,n,r){return e=iu(7,e,r,t),e.lanes=n,e}function uu(e,t,n,r){return e=iu(22,e,r,t),e.elementType=N,e.lanes=n,e.stateNode={isHidden:!1},e}function du(e,t,n){return e=iu(6,e,null,t),e.lanes=n,e}function fu(e,t,n){return t=iu(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function pu(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ht(0),this.expirationTimes=Ht(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ht(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function mu(e,t,n,r,i,a,o,s,c){return e=new pu(e,t,n,s,c),t===1?(t=1,!0===a&&(t|=8)):t=0,a=iu(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},so(a),e}function hu(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:C,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}function gu(e){if(!e)return Zi;e=e._reactInternals;a:{if(ut(e)!==e||e.tag!==1)throw Error(r(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break a;case 1:if(na(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break a}}t=t.return}while(t!==null);throw Error(r(171))}if(e.tag===1){var n=e.type;if(na(n))return aa(e,n,t)}return t}function _u(e,t,n,r,i,a,o,s,c){return e=mu(n,r,!0,e,i,a,o,s,c),e.context=gu(null),n=e.current,r=wl(),i=Tl(n),a=lo(r,i),a.callback=t??null,uo(n,a,i),e.current.lanes=i,Ut(e,i,r),Dl(e,r),e}function vu(e,t,n,r){var i=t.current,a=wl(),o=Tl(i);return n=gu(n),t.context===null?t.context=n:t.pendingContext=n,t=lo(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=uo(i,t,o),e!==null&&(El(e,i,o,a),fo(e,i,o)),o}function yu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function bu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function xu(e,t){bu(e,t),(e=e.alternate)&&bu(e,t)}function Su(){return null}var Cu=typeof reportError==`function`?reportError:function(e){console.error(e)};function wu(e){this._internalRoot=e}Tu.prototype.render=wu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));vu(e,t,null,null)},Tu.prototype.unmount=wu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Fl(function(){vu(null,e,null,null)}),t[Ri]=null}};function Tu(e){this._internalRoot=e}Tu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Zt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<sn.length&&t!==0&&t<sn[n].priority;n++);sn.splice(n,0,e),n===0&&dn(e)}};function Eu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Du(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==` react-mount-point-unstable `))}function Ou(){}function ku(e,t,n,r,i){if(i){if(typeof r==`function`){var a=r;r=function(){var e=yu(o);a.call(e)}}var o=_u(t,r,e,0,null,!1,!1,``,Ou);return e._reactRootContainer=o,e[Ri]=o.current,fi(e.nodeType===8?e.parentNode:e),Fl(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r==`function`){var s=r;r=function(){var e=yu(c);s.call(e)}}var c=mu(e,0,!1,null,null,!1,!1,``,Ou);return e._reactRootContainer=c,e[Ri]=c.current,fi(e.nodeType===8?e.parentNode:e),Fl(function(){vu(t,c,n,r)}),c}function Au(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if(typeof i==`function`){var s=i;i=function(){var e=yu(o);s.call(e)}}vu(t,o,e,i)}else o=ku(n,t,e,i,r);return yu(o)}Jt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=It(t.pendingLanes);n!==0&&(Gt(t,n|1),Dl(t,bt()),!(Qc&6)&&(fl=bt()+500,pa()))}break;case 13:Fl(function(){var t=ao(e,1);t!==null&&El(t,e,1,wl())}),xu(e,1)}},Yt=function(e){if(e.tag===13){var t=ao(e,134217728);t!==null&&El(t,e,134217728,wl()),xu(e,134217728)}},Xt=function(e){if(e.tag===13){var t=Tl(e),n=ao(e,t);n!==null&&El(n,e,t,wl()),xu(e,t)}},Zt=function(){return Kt},Qt=function(e,t){var n=Kt;try{return Kt=e,t()}finally{Kt=n}},Ue=function(e,t,n){switch(t){case`input`:if(be(e,n),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name=`+JSON.stringify(``+t)+`][type="radio"]`),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var a=Gi(i);if(!a)throw Error(r(90));he(i),be(i,a)}}}break;case`textarea`:De(e,n);break;case`select`:t=n.value,t!=null&&we(e,!!n.multiple,t,!1)}},Ye=Pl,Xe=Fl;var ju={usingClientEntryPoint:!1,Events:[Ui,Wi,Gi,qe,Je,Pl]},Mu={findFiberByHostInstance:Hi,bundleType:0,version:`18.3.1`,rendererPackageName:`react-dom`},Nu={bundleType:Mu.bundleType,version:Mu.version,rendererPackageName:Mu.rendererPackageName,rendererConfig:Mu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:x.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=mt(e),e===null?null:e.stateNode},findFiberByHostInstance:Mu.findFiberByHostInstance||Su,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:`18.3.1-next-f1338f8080-20240426`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Pu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pu.isDisabled&&Pu.supportsFiber)try{Dt=Pu.inject(Nu),Ot=Pu}catch{}}e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ju,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Eu(t))throw Error(r(200));return hu(e,t,null,n)},e.createRoot=function(e,t){if(!Eu(e))throw Error(r(299));var n=!1,i=``,a=Cu;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=mu(e,1,!1,null,null,n,!1,i,a),e[Ri]=t.current,fi(e.nodeType===8?e.parentNode:e),new wu(t)},e.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(r(188)):(e=Object.keys(e).join(`,`),Error(r(268,e)));return e=mt(t),e=e===null?null:e.stateNode,e},e.flushSync=function(e){return Fl(e)},e.hydrate=function(e,t,n){if(!Du(t))throw Error(r(200));return Au(null,e,t,!0,n)},e.hydrateRoot=function(e,t,n){if(!Eu(e))throw Error(r(405));var i=n!=null&&n.hydratedSources||null,a=!1,o=``,s=Cu;if(n!=null&&(!0===n.unstable_strictMode&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=_u(t,null,e,1,n??null,a,!1,o,s),e[Ri]=t.current,fi(e),i)for(e=0;e<i.length;e++)n=i[e],a=n._getVersion,a=a(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,a]:t.mutableSourceEagerHydrationData.push(n,a);return new Tu(t)},e.render=function(e,t,n){if(!Du(t))throw Error(r(200));return Au(null,e,t,!1,n)},e.unmountComponentAtNode=function(e){if(!Du(e))throw Error(r(40));return e._reactRootContainer?(Fl(function(){Au(null,null,e,!1,function(){e._reactRootContainer=null,e[Ri]=null})}),!0):!1},e.unstable_batchedUpdates=Pl,e.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!Du(n))throw Error(r(200));if(e==null||e._reactInternals===void 0)throw Error(r(38));return Au(e,t,n,!1,i)},e.version=`18.3.1-next-f1338f8080-20240426`})),ne=n(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=M()})),N=n((e=>{var t=ne();e.createRoot=t.createRoot,e.hydrateRoot=t.hydrateRoot})),re=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),ie=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),ae=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),oe=e=>{let t=ae(e);return t.charAt(0).toUpperCase()+t.slice(1)},se={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`},ce=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},P=e(ee()),le=(0,P.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,P.createElement)(`svg`,{ref:c,...se,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:re(`lucide`,i),...!a&&!ce(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,P.createElement)(e,t)),...Array.isArray(a)?a:[a]])),F=(e,t)=>{let n=(0,P.forwardRef)(({className:n,...r},i)=>(0,P.createElement)(le,{ref:i,iconNode:t,className:re(`lucide-${ie(oe(e))}`,`lucide-${e}`,n),...r}));return n.displayName=oe(e),n},ue=F(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),de=F(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),fe=F(`bold`,[[`path`,{d:`M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8`,key:`mg9rjx`}]]),pe=F(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),me=F(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),he=F(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),ge=F(`circle-alert`,[[`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`}]]),_e=F(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),ve=F(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),ye=F(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),be=F(`ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),xe=F(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Se=F(`file-plus`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M9 15h6`,key:`cctwl0`}],[`path`,{d:`M12 18v-6`,key:`17g6i2`}]]),Ce=F(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),we=F(`file`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]),Te=F(`folder-input`,[[`path`,{d:`M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1`,key:`fm4g5t`}],[`path`,{d:`M2 13h10`,key:`pgb2dq`}],[`path`,{d:`m9 16 3-3-3-3`,key:`6m91ic`}]]),Ee=F(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),De=F(`folder-plus`,[[`path`,{d:`M12 10v6`,key:`1bos4e`}],[`path`,{d:`M9 13h6`,key:`1uhe8q`}],[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),Oe=F(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),ke=F(`italic`,[[`line`,{x1:`19`,x2:`10`,y1:`4`,y2:`4`,key:`15jd3p`}],[`line`,{x1:`14`,x2:`5`,y1:`20`,y2:`20`,key:`bu0au3`}],[`line`,{x1:`15`,x2:`9`,y1:`4`,y2:`20`,key:`uljnxc`}]]),Ae=F(`list-ordered`,[[`path`,{d:`M11 5h10`,key:`1cz7ny`}],[`path`,{d:`M11 12h10`,key:`1438ji`}],[`path`,{d:`M11 19h10`,key:`11t30w`}],[`path`,{d:`M4 4h1v5`,key:`10yrso`}],[`path`,{d:`M4 9h2`,key:`r1h2o0`}],[`path`,{d:`M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02`,key:`xtkcd5`}]]),je=F(`list-todo`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`rect`,{x:`3`,y:`4`,width:`6`,height:`6`,rx:`1`,key:`cif1o7`}]]),Me=F(`list`,[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]),Ne=F(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),Pe=F(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),Fe=F(`minimize-2`,[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]),Ie=F(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),Le=F(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),Re=F(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),ze=F(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Be=F(`quote`,[[`path`,{d:`M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z`,key:`rib7q0`}],[`path`,{d:`M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z`,key:`1ymkrd`}]]),Ve=F(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),He=F(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Ue=F(`settings`,[[`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`}]]),We=F(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),Ge=F(`trash-2`,[[`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`}]]),Ke=F(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),qe=F(`zap`,[[`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`}]]),Je=F(`zoom-in`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`11`,x2:`11`,y1:`8`,y2:`14`,key:`1vmskp`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]),Ye=F(`zoom-out`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]),Xe=e(N(),1),Ze=null,Qe=new Set,$e=`disconnected`,et=new Set;function tt(e){$e=e,et.forEach(t=>t(e))}function nt(){if(Ze?.readyState===WebSocket.OPEN||Ze?.readyState===WebSocket.CONNECTING)return;let e=`${window.location.protocol===`https:`?`wss:`:`ws:`}//${window.location.host}/ws`;tt(`connecting`);let t=new WebSocket(e);Ze=t,t.onopen=()=>{tt(`connected`)},t.onclose=()=>{Ze=null,tt(`disconnected`),setTimeout(()=>nt(),3e3)},t.onerror=()=>{t.close()},t.onmessage=e=>{try{let t=JSON.parse(e.data);if(t.type===`config:reload`){window.dispatchEvent(new CustomEvent(`config-changed`));return}Qe.forEach(e=>e(t))}catch{}}}function rt(e){let[t,n]=(0,P.useState)($e);return(0,P.useEffect)(()=>(Qe.add(e),et.add(n),n($e),(!Ze||Ze.readyState!==WebSocket.OPEN&&Ze.readyState!==WebSocket.CONNECTING)&&nt(),()=>{Qe.delete(e),et.delete(n)}),[e]),{status:t,reconnect:(0,P.useCallback)(()=>{Ze&&=(Ze.close(),null),nt()},[])}}var it=5e3,at=`colonynote:tabs`;function ot(e,t){return t?`${t}::${e}`:e}function st(e={}){let t=(0,P.useRef)(new Map),[n,r]=(0,P.useState)(0),[i,a]=(0,P.useState)([]),[o,s]=(0,P.useState)(null),c=(0,P.useRef)(e);c.current=e;let l=(0,P.useRef)(new Map),u=(0,P.useRef)(new Map),d=(0,P.useRef)(new Map),f=(0,P.useCallback)(()=>r(e=>e+1),[]),p=(0,P.useCallback)((e,t,n=``,r=``)=>({key:ot(e,t),path:e,rootPath:t,content:n,lastSavedContent:r,status:`idle`,saveSessionId:null,lastSelfSaveTime:null}),[]),m=(0,P.useCallback)(async(e,n)=>{let r=`${e.path}:${Date.now()}`,i=e.key,a=t.current.get(i);a&&t.current.set(i,{...a,status:`saving`,saveSessionId:r,lastSelfSaveTime:Date.now()}),f();let o=u.current.get(i)||new Set;o.add(r),u.current.set(i,o),d.current.set(i,Date.now()),c.current.onSaveStart?.(e.path,r);try{let r=n?`/api/files${e.path}?root=${encodeURIComponent(n)}`:`/api/files${e.path}`;if(!(await fetch(r,{method:`POST`,body:e.content})).ok)throw Error(`Failed to save`);let a=t.current.get(i);a&&t.current.set(i,{...a,status:`saved`,lastSavedContent:a.content}),f(),setTimeout(()=>{if(u.current.get(i)){let e=Date.now()-it,t=d.current.get(i);t&&t<e&&(u.current.delete(i),d.current.delete(i))}},it),c.current.onSave?.(e.path)}catch(n){let r=t.current.get(i);r&&t.current.set(i,{...r,status:`error`}),f(),u.current.delete(i),d.current.delete(i),c.current.onError?.(n instanceof Error?n:Error(`Unknown error`),e.path)}},[f]),h=(0,P.useCallback)((e,n)=>{let r=ot(e,n);if(n?window.location.hash=`${n}:${e}`:window.location.hash=e,t.current.has(r)){s(r);return}a(e=>{if(e.includes(r))return e;let t=[...e,r];return s(r),t}),t.current.set(r,p(e,n)),f();let i=n?`/api/files${e}?root=${encodeURIComponent(n)}`:`/api/files${e}`;fetch(i).then(e=>{if(!e.ok)throw Error(`Failed to load file`);return e.text()}).then(e=>{let n=t.current.get(r);n&&(t.current.set(r,{...n,content:e,lastSavedContent:e}),f())}).catch(e=>{console.error(e)})},[p,f]),g=(0,P.useCallback)(e=>{let n=l.current.get(e);n&&(clearTimeout(n),l.current.delete(e)),u.current.delete(e),d.current.delete(e),a(n=>{let r=n.indexOf(e);if(r===-1)return n;let i=n.filter(t=>t!==e);return s(n=>{if(n!==e)return n;if(i.length===0)return window.location.hash=``,null;let a=i[Math.min(r,i.length-1)],o=t.current.get(a);return o?.rootPath?window.location.hash=`${o.rootPath}:${o.path}`:o&&(window.location.hash=o.path),a}),i}),t.current.delete(e),f()},[f]),_=(0,P.useCallback)((e,n,r=300)=>{let i=t.current.get(e);if(i){let r={...i,content:n,status:i.status===`saved`?`idle`:i.status};t.current.set(e,r)}f();let a=l.current.get(e);a&&clearTimeout(a);let o=window.setTimeout(()=>{l.current.delete(e);let n=t.current.get(e);n&&m(n,n.rootPath)},r);l.current.set(e,o)},[m,f]),v=(0,P.useCallback)(e=>{let n=l.current.get(e);n&&(clearTimeout(n),l.current.delete(e));let r=t.current.get(e);r&&m(r,r.rootPath)},[m]),y=(0,P.useCallback)(()=>{new Map(t.current).forEach((e,t)=>{let n=l.current.get(t);n&&(clearTimeout(n),l.current.delete(t)),e.content!==e.lastSavedContent&&m(e,e.rootPath)})},[m]),b=(0,P.useCallback)(()=>o&&t.current.get(o)||null,[o]),x=(0,P.useCallback)((e,n,r)=>{let i=Date.now();for(let[r,a]of t.current){if(a.path!==e||n!==void 0&&a.rootPath!==n)continue;let o=u.current.get(r),s=d.current.get(r);if(o&&o.size>0||s&&i-s<it||a.content!==a.lastSavedContent)continue;let c=a.rootPath?`/api/files${e}?root=${encodeURIComponent(a.rootPath)}`:`/api/files${e}`;fetch(c).then(e=>{if(!e.ok)throw Error(`Failed to reload`);return e.text()}).then(e=>{let n=t.current.get(r);n&&(t.current.set(r,{...n,content:e,lastSavedContent:e}),f())}).catch(()=>{})}r()},[f]),S=(0,P.useRef)(!1),C=(0,P.useRef)(!1);return(0,P.useEffect)(()=>{if(!S.current){S.current=!0,C.current=!0;try{let e=localStorage.getItem(at);if(!e){C.current=!1;return}let n=JSON.parse(e);if(!n.tabOrder?.length){C.current=!1;return}let r=[];for(let e of n.tabOrder){let n=e.split(`::`),i,a;n.length>=2?(a=n[0],i=n.slice(1).join(`::`)):(a=null,i=e);let o=ot(i,a);if(!t.current.has(o)){t.current.set(o,p(i,a));let e=a?`/api/files${i}?root=${encodeURIComponent(a)}`:`/api/files${i}`;fetch(e).then(e=>{if(!e.ok)throw Error(`Failed to load file`);return e.text()}).then(e=>{let n=t.current.get(o);n&&(t.current.set(o,{...n,content:e,lastSavedContent:e}),f())}).catch(()=>{})}r.push(o)}if(a(r),n.activeTabPath&&t.current.has(n.activeTabPath)){s(n.activeTabPath);let e=t.current.get(n.activeTabPath);e?.rootPath?window.location.hash=`${e.rootPath}:${e.path}`:e&&(window.location.hash=e.path)}f()}catch(e){console.error(`Failed to restore tabs:`,e)}finally{C.current=!1}}},[p,f]),(0,P.useEffect)(()=>{if(!C.current)try{i.length===0?localStorage.removeItem(at):localStorage.setItem(at,JSON.stringify({tabOrder:i,activeTabPath:o}))}catch(e){console.error(`Failed to persist tabs:`,e)}},[i,o]),{tabs:t.current,tabOrder:i,activeTabPath:o,openTab:h,closeTab:g,updateTabContent:_,saveTab:v,saveAllTabs:y,isTabDirty:e=>{let n=t.current.get(e);return n?n.content!==n.lastSavedContent:!1},getActiveTab:b,handleWsFileChange:x}}function ct(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=ct(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function lt(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=ct(e))&&(r&&(r+=` `),r+=t);return r}var ut=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},dt=(e,t)=>({classGroupId:e,validator:t}),ft=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),pt=`-`,mt=[],ht=`arbitrary..`,gt=e=>{let t=yt(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return vt(e);let n=e.split(pt);return _t(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?ut(i,t):t:i||mt}return n[e]||mt}}},_t=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=_t(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(pt):e.slice(t).join(pt),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},vt=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?ht+r:void 0})(),yt=e=>{let{theme:t,classGroups:n}=e;return bt(n,t)},bt=(e,t)=>{let n=ft();for(let r in e){let i=e[r];xt(i,n,r,t)}return n},xt=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];St(i,t,n,r)}},St=(e,t,n,r)=>{if(typeof e==`string`){Ct(e,t,n);return}if(typeof e==`function`){wt(e,t,n,r);return}Tt(e,t,n,r)},Ct=(e,t,n)=>{let r=e===``?t:Et(t,e);r.classGroupId=n},wt=(e,t,n,r)=>{if(Dt(e)){xt(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(dt(n,e))},Tt=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];xt(o,Et(t,a),n,r)}},Et=(e,t)=>{let n=e,r=t.split(pt),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=ft(),n.nextPart.set(t,i)),n=i}return n},Dt=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Ot=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},kt=`!`,At=`:`,jt=[],Mt=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Nt=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===At){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(kt)?(c=s.slice(0,-1),l=!0):s.startsWith(kt)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Mt(t,l,c,u)};if(t){let e=t+At,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Mt(jt,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Pt=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Ft=e=>({cache:Ot(e.cacheSize),parseClassName:Nt(e),sortModifiers:Pt(e),...gt(e)}),It=/\s+/,Lt=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(It),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+kt:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},Rt=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=zt(n))&&(i&&(i+=` `),i+=r);return i},zt=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=zt(e[r]))&&(n&&(n+=` `),n+=t);return n},Bt=(e,...t)=>{let n,r,i,a,o=o=>(n=Ft(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Lt(e,n);return i(e,a),a};return a=o,(...e)=>a(Rt(...e))},Vt=[],Ht=e=>{let t=t=>t[e]||Vt;return t.isThemeGetter=!0,t},Ut=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Wt=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Gt=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Kt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,qt=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Jt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Yt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Xt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Zt=e=>Gt.test(e),Qt=e=>!!e&&!Number.isNaN(Number(e)),$t=e=>!!e&&Number.isInteger(Number(e)),en=e=>e.endsWith(`%`)&&Qt(e.slice(0,-1)),tn=e=>Kt.test(e),nn=()=>!0,rn=e=>qt.test(e)&&!Jt.test(e),an=()=>!1,on=e=>Yt.test(e),sn=e=>Xt.test(e),cn=e=>!I(e)&&!L(e),ln=e=>wn(e,On,an),I=e=>Ut.test(e),un=e=>wn(e,kn,rn),dn=e=>wn(e,An,Qt),fn=e=>wn(e,Mn,nn),pn=e=>wn(e,jn,an),mn=e=>wn(e,En,an),hn=e=>wn(e,Dn,sn),gn=e=>wn(e,Nn,on),L=e=>Wt.test(e),_n=e=>Tn(e,kn),vn=e=>Tn(e,jn),yn=e=>Tn(e,En),bn=e=>Tn(e,On),xn=e=>Tn(e,Dn),Sn=e=>Tn(e,Nn,!0),Cn=e=>Tn(e,Mn,!0),wn=(e,t,n)=>{let r=Ut.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Tn=(e,t,n=!1)=>{let r=Wt.exec(e);return r?r[1]?t(r[1]):n:!1},En=e=>e===`position`||e===`percentage`,Dn=e=>e===`image`||e===`url`,On=e=>e===`length`||e===`size`||e===`bg-size`,kn=e=>e===`length`,An=e=>e===`number`,jn=e=>e===`family-name`,Mn=e=>e===`number`||e===`weight`,Nn=e=>e===`shadow`,Pn=Bt(()=>{let e=Ht(`color`),t=Ht(`font`),n=Ht(`text`),r=Ht(`font-weight`),i=Ht(`tracking`),a=Ht(`leading`),o=Ht(`breakpoint`),s=Ht(`container`),c=Ht(`spacing`),l=Ht(`radius`),u=Ht(`shadow`),d=Ht(`inset-shadow`),f=Ht(`text-shadow`),p=Ht(`drop-shadow`),m=Ht(`blur`),h=Ht(`perspective`),g=Ht(`aspect`),_=Ht(`ease`),v=Ht(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),L,I],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[L,I,c],T=()=>[Zt,`full`,`auto`,...w()],E=()=>[$t,`none`,`subgrid`,L,I],D=()=>[`auto`,{span:[`full`,$t,L,I]},$t,L,I],O=()=>[$t,`auto`,L,I],k=()=>[`auto`,`min`,`max`,`fr`,L,I],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],ee=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],j=()=>[`auto`,...w()],te=()=>[Zt,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],M=()=>[Zt,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],ne=()=>[Zt,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],N=()=>[e,L,I],re=()=>[...b(),yn,mn,{position:[L,I]}],ie=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ae=()=>[`auto`,`cover`,`contain`,bn,ln,{size:[L,I]}],oe=()=>[en,_n,un],se=()=>[``,`none`,`full`,l,L,I],ce=()=>[``,Qt,_n,un],P=()=>[`solid`,`dashed`,`dotted`,`double`],le=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],F=()=>[Qt,en,yn,mn],ue=()=>[``,`none`,m,L,I],de=()=>[`none`,Qt,L,I],fe=()=>[`none`,Qt,L,I],pe=()=>[Qt,L,I],me=()=>[Zt,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[tn],breakpoint:[tn],color:[nn],container:[tn],"drop-shadow":[tn],ease:[`in`,`out`,`in-out`],font:[cn],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[tn],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[tn],shadow:[tn],spacing:[`px`,Qt],text:[tn],"text-shadow":[tn],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Zt,I,L,g]}],container:[`container`],columns:[{columns:[Qt,I,L,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[$t,`auto`,L,I]}],basis:[{basis:[Zt,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Qt,Zt,`auto`,`initial`,`none`,I]}],grow:[{grow:[``,Qt,L,I]}],shrink:[{shrink:[``,Qt,L,I]}],order:[{order:[$t,`first`,`last`,`none`,L,I]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...ee(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...ee()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...ee(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...ee(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...ee(),`baseline`]}],"place-self":[{"place-self":[`auto`,...ee()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mbs:[{mbs:j()}],mbe:[{mbe:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:te()}],"inline-size":[{inline:[`auto`,...M()]}],"min-inline-size":[{"min-inline":[`auto`,...M()]}],"max-inline-size":[{"max-inline":[`none`,...M()]}],"block-size":[{block:[`auto`,...ne()]}],"min-block-size":[{"min-block":[`auto`,...ne()]}],"max-block-size":[{"max-block":[`none`,...ne()]}],w:[{w:[s,`screen`,...te()]}],"min-w":[{"min-w":[s,`screen`,`none`,...te()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...te()]}],h:[{h:[`screen`,`lh`,...te()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...te()]}],"max-h":[{"max-h":[`screen`,`lh`,...te()]}],"font-size":[{text:[`base`,n,_n,un]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Cn,fn]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,en,I]}],"font-family":[{font:[vn,pn,t]}],"font-features":[{"font-features":[I]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,L,I]}],"line-clamp":[{"line-clamp":[Qt,`none`,L,dn]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,L,I]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,L,I]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...P(),`wavy`]}],"text-decoration-thickness":[{decoration:[Qt,`from-font`,`auto`,L,un]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[Qt,`auto`,L,I]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,L,I]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,L,I]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:re()}],"bg-repeat":[{bg:ie()}],"bg-size":[{bg:ae()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},$t,L,I],radial:[``,L,I],conic:[$t,L,I]},xn,hn]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:oe()}],"gradient-via-pos":[{via:oe()}],"gradient-to-pos":[{to:oe()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:se()}],"rounded-s":[{"rounded-s":se()}],"rounded-e":[{"rounded-e":se()}],"rounded-t":[{"rounded-t":se()}],"rounded-r":[{"rounded-r":se()}],"rounded-b":[{"rounded-b":se()}],"rounded-l":[{"rounded-l":se()}],"rounded-ss":[{"rounded-ss":se()}],"rounded-se":[{"rounded-se":se()}],"rounded-ee":[{"rounded-ee":se()}],"rounded-es":[{"rounded-es":se()}],"rounded-tl":[{"rounded-tl":se()}],"rounded-tr":[{"rounded-tr":se()}],"rounded-br":[{"rounded-br":se()}],"rounded-bl":[{"rounded-bl":se()}],"border-w":[{border:ce()}],"border-w-x":[{"border-x":ce()}],"border-w-y":[{"border-y":ce()}],"border-w-s":[{"border-s":ce()}],"border-w-e":[{"border-e":ce()}],"border-w-bs":[{"border-bs":ce()}],"border-w-be":[{"border-be":ce()}],"border-w-t":[{"border-t":ce()}],"border-w-r":[{"border-r":ce()}],"border-w-b":[{"border-b":ce()}],"border-w-l":[{"border-l":ce()}],"divide-x":[{"divide-x":ce()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":ce()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...P(),`hidden`,`none`]}],"divide-style":[{divide:[...P(),`hidden`,`none`]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-bs":[{"border-bs":N()}],"border-color-be":[{"border-be":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...P(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Qt,L,I]}],"outline-w":[{outline:[``,Qt,_n,un]}],"outline-color":[{outline:N()}],shadow:[{shadow:[``,`none`,u,Sn,gn]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":[`none`,d,Sn,gn]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:ce()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[Qt,un]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":ce()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":[`none`,f,Sn,gn]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[Qt,L,I]}],"mix-blend":[{"mix-blend":[...le(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":le()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[Qt]}],"mask-image-linear-from-pos":[{"mask-linear-from":F()}],"mask-image-linear-to-pos":[{"mask-linear-to":F()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":F()}],"mask-image-t-to-pos":[{"mask-t-to":F()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":F()}],"mask-image-r-to-pos":[{"mask-r-to":F()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":F()}],"mask-image-b-to-pos":[{"mask-b-to":F()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":F()}],"mask-image-l-to-pos":[{"mask-l-to":F()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":F()}],"mask-image-x-to-pos":[{"mask-x-to":F()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":F()}],"mask-image-y-to-pos":[{"mask-y-to":F()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[L,I]}],"mask-image-radial-from-pos":[{"mask-radial-from":F()}],"mask-image-radial-to-pos":[{"mask-radial-to":F()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Qt]}],"mask-image-conic-from-pos":[{"mask-conic-from":F()}],"mask-image-conic-to-pos":[{"mask-conic-to":F()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:re()}],"mask-repeat":[{mask:ie()}],"mask-size":[{mask:ae()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,L,I]}],filter:[{filter:[``,`none`,L,I]}],blur:[{blur:ue()}],brightness:[{brightness:[Qt,L,I]}],contrast:[{contrast:[Qt,L,I]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Sn,gn]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:[``,Qt,L,I]}],"hue-rotate":[{"hue-rotate":[Qt,L,I]}],invert:[{invert:[``,Qt,L,I]}],saturate:[{saturate:[Qt,L,I]}],sepia:[{sepia:[``,Qt,L,I]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,L,I]}],"backdrop-blur":[{"backdrop-blur":ue()}],"backdrop-brightness":[{"backdrop-brightness":[Qt,L,I]}],"backdrop-contrast":[{"backdrop-contrast":[Qt,L,I]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Qt,L,I]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Qt,L,I]}],"backdrop-invert":[{"backdrop-invert":[``,Qt,L,I]}],"backdrop-opacity":[{"backdrop-opacity":[Qt,L,I]}],"backdrop-saturate":[{"backdrop-saturate":[Qt,L,I]}],"backdrop-sepia":[{"backdrop-sepia":[``,Qt,L,I]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,L,I]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Qt,`initial`,L,I]}],ease:[{ease:[`linear`,`initial`,_,L,I]}],delay:[{delay:[Qt,L,I]}],animate:[{animate:[`none`,v,L,I]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,L,I]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:de()}],"rotate-x":[{"rotate-x":de()}],"rotate-y":[{"rotate-y":de()}],"rotate-z":[{"rotate-z":de()}],scale:[{scale:fe()}],"scale-x":[{"scale-x":fe()}],"scale-y":[{"scale-y":fe()}],"scale-z":[{"scale-z":fe()}],"scale-3d":[`scale-3d`],skew:[{skew:pe()}],"skew-x":[{"skew-x":pe()}],"skew-y":[{"skew-y":pe()}],transform:[{transform:[L,I,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:me()}],"translate-x":[{"translate-x":me()}],"translate-y":[{"translate-y":me()}],"translate-z":[{"translate-z":me()}],"translate-none":[`translate-none`],accent:[{accent:N()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:N()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,L,I]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,L,I]}],fill:[{fill:[`none`,...N()]}],"stroke-w":[{stroke:[Qt,_n,un,dn]}],stroke:[{stroke:[`none`,...N()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function R(...e){return Pn(lt(e))}var Fn=n((e=>{var t=ee(),n=Symbol.for(`react.element`),r=Symbol.for(`react.fragment`),i=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var s,c={},l=null,u=null;for(s in r!==void 0&&(l=``+r),t.key!==void 0&&(l=``+t.key),t.ref!==void 0&&(u=t.ref),t)i.call(t,s)&&!o.hasOwnProperty(s)&&(c[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)c[s]===void 0&&(c[s]=t[s]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:a.current}}e.Fragment=r,e.jsx=s,e.jsxs=s})),z=n(((e,t)=>{t.exports=Fn()}))(),In=P.forwardRef(({className:e,type:t,...n},r)=>(0,z.jsx)(`input`,{type:t,className:R(`flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,e),ref:r,...n}));In.displayName=`Input`;function Ln(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Rn(...e){return t=>{let n=!1,r=e.map(e=>{let r=Ln(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Ln(e[t],null)}}}}function zn(...e){return P.useCallback(Rn(...e),e)}var Bn=Symbol.for(`react.lazy`),Vn=P.use;function Hn(e){return typeof e==`object`&&!!e&&`then`in e}function Un(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Bn&&`_payload`in e&&Hn(e._payload)}function Wn(e){let t=Kn(e),n=P.forwardRef((e,n)=>{let{children:r,...i}=e;Un(r)&&typeof Vn==`function`&&(r=Vn(r._payload));let a=P.Children.toArray(r),o=a.find(Jn);if(o){let e=o.props.children,r=a.map(t=>t===o?P.Children.count(e)>1?P.Children.only(null):P.isValidElement(e)?e.props.children:null:t);return(0,z.jsx)(t,{...i,ref:n,children:P.isValidElement(e)?P.cloneElement(e,void 0,r):null})}return(0,z.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var Gn=Wn(`Slot`);function Kn(e){let t=P.forwardRef((e,t)=>{let{children:n,...r}=e;if(Un(n)&&typeof Vn==`function`&&(n=Vn(n._payload)),P.isValidElement(n)){let e=Xn(n),i=Yn(r,n.props);return n.type!==P.Fragment&&(i.ref=t?Rn(t,e):e),P.cloneElement(n,i)}return P.Children.count(n)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var qn=Symbol(`radix.slottable`);function Jn(e){return P.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===qn}function Yn(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Xn(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Zn=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Qn=lt,$n=(e,t)=>n=>{if(t?.variants==null)return Qn(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Zn(t)||Zn(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Qn(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},er=$n(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/90`,destructive:`bg-destructive text-destructive-foreground hover:bg-destructive/90`,outline:`border border-input bg-background hover:bg-accent hover:text-accent-foreground`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-10 px-4 py-2`,sm:`h-9 rounded-md px-3`,lg:`h-11 rounded-md px-8`,icon:`size-10`}},defaultVariants:{variant:`default`,size:`default`}});function tr({className:e,variant:t,size:n,asChild:r=!1,...i}){return(0,z.jsx)(r?Gn:`button`,{className:R(er({variant:t,size:n,className:e})),...i})}typeof window<`u`&&window.document&&window.document.createElement;function nr(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function rr(e,t){let n=P.createContext(t),r=e=>{let{children:t,...r}=e,i=P.useMemo(()=>r,Object.values(r));return(0,z.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=P.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function ir(e,t=[]){let n=[];function r(t,r){let i=P.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=P.useMemo(()=>o,Object.values(o));return(0,z.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=P.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>P.createContext(e));return function(n){let r=n?.[e]||t;return P.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,ar(i,...t)]}function ar(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return P.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var or=globalThis?.document?P.useLayoutEffect:()=>{},sr=P.useInsertionEffect||or;function cr({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=lr({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=P.useRef(e!==void 0);P.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,P.useCallback(t=>{if(s){let n=ur(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function lr({defaultProp:e,onChange:t}){let[n,r]=P.useState(e),i=P.useRef(n),a=P.useRef(t);return sr(()=>{a.current=t},[t]),P.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function ur(e){return typeof e==`function`}var dr=e(ne(),1);function fr(e){let t=pr(e),n=P.forwardRef((e,n)=>{let{children:r,...i}=e,a=P.Children.toArray(r),o=a.find(gr);if(o){let e=o.props.children,r=a.map(t=>t===o?P.Children.count(e)>1?P.Children.only(null):P.isValidElement(e)?e.props.children:null:t);return(0,z.jsx)(t,{...i,ref:n,children:P.isValidElement(e)?P.cloneElement(e,void 0,r):null})}return(0,z.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function pr(e){let t=P.forwardRef((e,t)=>{let{children:n,...r}=e;if(P.isValidElement(n)){let e=vr(n),i=_r(r,n.props);return n.type!==P.Fragment&&(i.ref=t?Rn(t,e):e),P.cloneElement(n,i)}return P.Children.count(n)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var mr=Symbol(`radix.slottable`);function hr(e){let t=({children:e})=>(0,z.jsx)(z.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=mr,t}function gr(e){return P.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===mr}function _r(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function vr(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var yr=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=fr(`Primitive.${t}`),r=P.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,z.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function br(e,t){e&&dr.flushSync(()=>e.dispatchEvent(t))}function xr(e,t){return P.useReducer((e,n)=>t[e][n]??e,e)}var Sr=e=>{let{present:t,children:n}=e,r=Cr(t),i=typeof n==`function`?n({present:r.isPresent}):P.Children.only(n),a=zn(r.ref,Tr(i));return typeof n==`function`||r.isPresent?P.cloneElement(i,{ref:a}):null};Sr.displayName=`Presence`;function Cr(e){let[t,n]=P.useState(),r=P.useRef(null),i=P.useRef(e),a=P.useRef(`none`),[o,s]=xr(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return P.useEffect(()=>{let e=wr(r.current);a.current=o===`mounted`?e:`none`},[o]),or(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=wr(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),or(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=wr(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=wr(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:P.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function wr(e){return e?.animationName||`none`}function Tr(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Er=P.useId||(()=>void 0),Dr=0;function Or(e){let[t,n]=P.useState(Er());return or(()=>{e||n(e=>e??String(Dr++))},[e]),e||(t?`radix-${t}`:``)}var kr=`Collapsible`,[Ar,jr]=ir(kr),[Mr,Nr]=Ar(kr),Pr=P.forwardRef((e,t)=>{let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[c,l]=cr({prop:r,defaultProp:i??!1,onChange:o,caller:kr});return(0,z.jsx)(Mr,{scope:n,disabled:a,contentId:Or(),open:c,onOpenToggle:P.useCallback(()=>l(e=>!e),[l]),children:(0,z.jsx)(yr.div,{"data-state":Br(c),"data-disabled":a?``:void 0,...s,ref:t})})});Pr.displayName=kr;var Fr=`CollapsibleTrigger`,Ir=P.forwardRef((e,t)=>{let{__scopeCollapsible:n,...r}=e,i=Nr(Fr,n);return(0,z.jsx)(yr.button,{type:`button`,"aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":Br(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:nr(e.onClick,i.onOpenToggle)})});Ir.displayName=Fr;var Lr=`CollapsibleContent`,Rr=P.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=Nr(Lr,e.__scopeCollapsible);return(0,z.jsx)(Sr,{present:n||i.open,children:({present:e})=>(0,z.jsx)(zr,{...r,ref:t,present:e})})});Rr.displayName=Lr;var zr=P.forwardRef((e,t)=>{let{__scopeCollapsible:n,present:r,children:i,...a}=e,o=Nr(Lr,n),[s,c]=P.useState(r),l=P.useRef(null),u=zn(t,l),d=P.useRef(0),f=d.current,p=P.useRef(0),m=p.current,h=o.open||s,g=P.useRef(h),_=P.useRef(void 0);return P.useEffect(()=>{let e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),or(()=>{let e=l.current;if(e){_.current=_.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();d.current=t.height,p.current=t.width,g.current||(e.style.transitionDuration=_.current.transitionDuration,e.style.animationName=_.current.animationName),c(r)}},[o.open,r]),(0,z.jsx)(yr.div,{"data-state":Br(o.open),"data-disabled":o.disabled?``:void 0,id:o.contentId,hidden:!h,...a,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&i})});function Br(e){return e?`open`:`closed`}var Vr=Pr,Hr=Rr,Ur=Vr,Wr=Ir,Gr=P.forwardRef(({className:e,children:t,...n},r)=>(0,z.jsx)(Hr,{ref:r,className:R(`overflow-hidden`,`data-[state=closed]:h-0 data-[state=open]:h-auto`,`transition-[height] duration-200 ease-out`,e),...n,children:t}));Gr.displayName=Hr.displayName,P.createContext(void 0);var Kr=({className:e,...t})=>(0,z.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:R(`relative flex w-full min-w-0 flex-col p-2`,e),...t}),qr=({className:e,asChild:t=!1,...n})=>(0,z.jsx)(t?Gn:`div`,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:R(`flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,e),...n}),Jr=({className:e,...t})=>(0,z.jsx)(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:R(`w-full text-sm`,e),...t}),Yr=({className:e,...t})=>(0,z.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:R(`flex w-full min-w-0 flex-col gap-1`,e),...t}),Xr=({className:e,...t})=>(0,z.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:R(`group/menu-item relative`,e),...t}),Zr=$n(`peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>svg]:size-4 [&>svg]:shrink-0`,{variants:{variant:{default:`hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,outline:`bg-background shadow-[0_0_0_1px_var(--color-sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--color-sidebar-accent)]`},size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}}),Qr=({asChild:e=!1,isActive:t=!1,variant:n=`default`,size:r=`default`,tooltip:i,className:a,...o})=>(0,z.jsx)(e?Gn:`button`,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":r,"data-active":t,className:R(Zr({variant:n,size:r}),a),...o}),$r=({className:e,...t})=>(0,z.jsx)(`ul`,{"data-slot":`sidebar-menu-sub`,"data-sidebar":`menu-sub`,className:R(`ml-3 flex min-w-0 flex-col gap-1 border-l border-sidebar-border pl-2.5 py-0.5`,`group-data-[collapsible=icon]:hidden`,e),...t});function ei(e){let t=P.useRef(e);return P.useEffect(()=>{t.current=e}),P.useMemo(()=>(...e)=>t.current?.(...e),[])}function ti(e,t=globalThis?.document){let n=ei(e);P.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var ni=`DismissableLayer`,ri=`dismissableLayer.update`,ii=`dismissableLayer.pointerDownOutside`,ai=`dismissableLayer.focusOutside`,oi,si=P.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ci=P.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=P.useContext(si),[u,d]=P.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=P.useState({}),m=zn(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=h.indexOf(g),v=u?h.indexOf(u):-1,y=l.layersWithOutsidePointerEventsDisabled.size>0,b=v>=_,x=di(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!b||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),S=fi(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return ti(e=>{v===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),P.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(oi=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),pi(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=oi)}},[u,f,n,l]),P.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),pi())},[u,l]),P.useEffect(()=>{let e=()=>p({});return document.addEventListener(ri,e),()=>document.removeEventListener(ri,e)},[]),(0,z.jsx)(yr.div,{...c,ref:m,style:{pointerEvents:y?b?`auto`:`none`:void 0,...e.style},onFocusCapture:nr(e.onFocusCapture,S.onFocusCapture),onBlurCapture:nr(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:nr(e.onPointerDownCapture,x.onPointerDownCapture)})});ci.displayName=ni;var li=`DismissableLayerBranch`,ui=P.forwardRef((e,t)=>{let n=P.useContext(si),r=P.useRef(null),i=zn(t,r);return P.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,z.jsx)(yr.div,{...e,ref:i})});ui.displayName=li;function di(e,t=globalThis?.document){let n=ei(e),r=P.useRef(!1),i=P.useRef(()=>{});return P.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){mi(ii,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function fi(e,t=globalThis?.document){let n=ei(e),r=P.useRef(!1);return P.useEffect(()=>{let e=e=>{e.target&&!r.current&&mi(ai,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function pi(){let e=new CustomEvent(ri);document.dispatchEvent(e)}function mi(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?br(i,a):i.dispatchEvent(a)}var hi=`focusScope.autoFocusOnMount`,gi=`focusScope.autoFocusOnUnmount`,_i={bubbles:!1,cancelable:!0},vi=`FocusScope`,yi=P.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=P.useState(null),l=ei(i),u=ei(a),d=P.useRef(null),f=zn(t,e=>c(e)),p=P.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;P.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:Ei(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Ei(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Ei(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),P.useEffect(()=>{if(s){Di.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(hi,_i);s.addEventListener(hi,l),s.dispatchEvent(t),t.defaultPrevented||(bi(Ai(Si(s)),{select:!0}),document.activeElement===e&&Ei(s))}return()=>{s.removeEventListener(hi,l),setTimeout(()=>{let t=new CustomEvent(gi,_i);s.addEventListener(gi,u),s.dispatchEvent(t),t.defaultPrevented||Ei(e??document.body,{select:!0}),s.removeEventListener(gi,u),Di.remove(p)},0)}}},[s,l,u,p]);let m=P.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=xi(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Ei(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Ei(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,z.jsx)(yr.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});yi.displayName=vi;function bi(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Ei(r,{select:t}),document.activeElement!==n)return}function xi(e){let t=Si(e);return[Ci(t,e),Ci(t.reverse(),e)]}function Si(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Ci(e,t){for(let n of e)if(!wi(n,{upTo:t}))return n}function wi(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function Ti(e){return e instanceof HTMLInputElement&&`select`in e}function Ei(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Ti(e)&&t&&e.select()}}var Di=Oi();function Oi(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=ki(e,t),e.unshift(t)},remove(t){e=ki(e,t),e[0]?.resume()}}}function ki(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Ai(e){return e.filter(e=>e.tagName!==`A`)}var ji=`Portal`,Mi=P.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=P.useState(!1);or(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?dr.createPortal((0,z.jsx)(yr.div,{...r,ref:t}),o):null});Mi.displayName=ji;var Ni=0;function Pi(){P.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??Fi()),document.body.insertAdjacentElement(`beforeend`,e[1]??Fi()),Ni++,()=>{Ni===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),Ni--}},[])}function Fi(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var Ii=function(){return Ii=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ii.apply(this,arguments)};function Li(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Ri(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var zi=`right-scroll-bar-position`,Bi=`width-before-scroll-bar`,Vi=`with-scroll-bars-hidden`,Hi=`--removed-body-scroll-bar-size`;function Ui(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Wi(e,t){var n=(0,P.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Gi=typeof window<`u`?P.useLayoutEffect:P.useEffect,Ki=new WeakMap;function qi(e,t){var n=Wi(t||null,function(t){return e.forEach(function(e){return Ui(e,t)})});return Gi(function(){var t=Ki.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Ui(e,null)}),i.forEach(function(e){r.has(e)||Ui(e,a)})}Ki.set(n,e)},[e]),n}function Ji(e){return e}function Yi(e,t){t===void 0&&(t=Ji);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Xi(e){e===void 0&&(e={});var t=Yi(null);return t.options=Ii({async:!0,ssr:!1},e),t}var Zi=function(e){var t=e.sideCar,n=Li(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return P.createElement(r,Ii({},n))};Zi.isSideCarExport=!0;function Qi(e,t){return e.useMedium(t),Zi}var $i=Xi(),ea=function(){},ta=P.forwardRef(function(e,t){var n=P.useRef(null),r=P.useState({onScrollCapture:ea,onWheelCapture:ea,onTouchMoveCapture:ea}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=Li(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=qi([n,t]),C=Ii(Ii({},b),i);return P.createElement(P.Fragment,null,u&&P.createElement(x,{sideCar:$i,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?P.cloneElement(P.Children.only(s),Ii(Ii({},C),{ref:S})):P.createElement(v,Ii({},C,{className:c,ref:S}),s))});ta.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ta.classNames={fullWidth:Bi,zeroRight:zi};var na,ra=function(){if(na)return na;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function ia(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=ra();return t&&e.setAttribute(`nonce`,t),e}function aa(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function oa(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var sa=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ia())&&(aa(t,n),oa(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ca=function(){var e=sa();return function(t,n){P.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},la=function(){var e=ca();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},ua={left:0,top:0,right:0,gap:0},da=function(e){return parseInt(e||``,10)||0},fa=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[da(n),da(r),da(i)]},pa=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return ua;var t=fa(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},ma=la(),ha=`data-scroll-locked`,ga=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
10
|
+
.${Vi} {
|
|
11
|
+
overflow: hidden ${r};
|
|
12
|
+
padding-right: ${s}px ${r};
|
|
13
|
+
}
|
|
14
|
+
body[${ha}] {
|
|
15
|
+
overflow: hidden ${r};
|
|
16
|
+
overscroll-behavior: contain;
|
|
17
|
+
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
18
|
+
padding-left: ${i}px;
|
|
19
|
+
padding-top: ${a}px;
|
|
20
|
+
padding-right: ${o}px;
|
|
21
|
+
margin-left:0;
|
|
22
|
+
margin-top:0;
|
|
23
|
+
margin-right: ${s}px ${r};
|
|
24
|
+
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.${zi} {
|
|
28
|
+
right: ${s}px ${r};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.${Bi} {
|
|
32
|
+
margin-right: ${s}px ${r};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.${zi} .${zi} {
|
|
36
|
+
right: 0 ${r};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.${Bi} .${Bi} {
|
|
40
|
+
margin-right: 0 ${r};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
body[${ha}] {
|
|
44
|
+
${Hi}: ${s}px;
|
|
45
|
+
}
|
|
46
|
+
`},_a=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},va=function(){P.useEffect(function(){return document.body.setAttribute(ha,(_a()+1).toString()),function(){var e=_a()-1;e<=0?document.body.removeAttribute(ha):document.body.setAttribute(ha,e.toString())}},[])},ya=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;va();var a=P.useMemo(function(){return pa(i)},[i]);return P.createElement(ma,{styles:ga(a,!t,i,n?``:`!important`)})},ba=!1;if(typeof window<`u`)try{var xa=Object.defineProperty({},`passive`,{get:function(){return ba=!0,!0}});window.addEventListener(`test`,xa,xa),window.removeEventListener(`test`,xa,xa)}catch{ba=!1}var Sa=ba?{passive:!1}:!1,Ca=function(e){return e.tagName===`TEXTAREA`},wa=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Ca(e)&&n[t]===`visible`)},Ta=function(e){return wa(e,`overflowY`)},Ea=function(e){return wa(e,`overflowX`)},Da=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Aa(e,r)){var i=ja(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Oa=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},ka=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Aa=function(e,t){return e===`v`?Ta(t):Ea(t)},ja=function(e,t){return e===`v`?Oa(t):ka(t)},Ma=function(e,t){return e===`h`&&t===`rtl`?-1:1},Na=function(e,t,n,r,i){var a=Ma(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=ja(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Aa(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Pa=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Fa=function(e){return[e.deltaX,e.deltaY]},Ia=function(e){return e&&`current`in e?e.current:e},La=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ra=function(e){return`
|
|
47
|
+
.block-interactivity-${e} {pointer-events: none;}
|
|
48
|
+
.allow-interactivity-${e} {pointer-events: all;}
|
|
49
|
+
`},za=0,Ba=[];function Va(e){var t=P.useRef([]),n=P.useRef([0,0]),r=P.useRef(),i=P.useState(za++)[0],a=P.useState(la)[0],o=P.useRef(e);P.useEffect(function(){o.current=e},[e]),P.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Ri([e.lockRef.current],(e.shards||[]).map(Ia),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=P.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Pa(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Da(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Da(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Na(h,t,e,h===`h`?s:c,!0)},[]),c=P.useCallback(function(e){var n=e;if(!(!Ba.length||Ba[Ba.length-1]!==a)){var r=`deltaY`in n?Fa(n):Pa(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&La(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(Ia).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=P.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Ha(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=P.useCallback(function(e){n.current=Pa(e),r.current=void 0},[]),d=P.useCallback(function(t){l(t.type,Fa(t),t.target,s(t,e.lockRef.current))},[]),f=P.useCallback(function(t){l(t.type,Pa(t),t.target,s(t,e.lockRef.current))},[]);P.useEffect(function(){return Ba.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,Sa),document.addEventListener(`touchmove`,c,Sa),document.addEventListener(`touchstart`,u,Sa),function(){Ba=Ba.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Sa),document.removeEventListener(`touchmove`,c,Sa),document.removeEventListener(`touchstart`,u,Sa)}},[]);var p=e.removeScrollBar,m=e.inert;return P.createElement(P.Fragment,null,m?P.createElement(a,{styles:Ra(i)}):null,p?P.createElement(ya,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ha(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Ua=Qi($i,Va),Wa=P.forwardRef(function(e,t){return P.createElement(ta,Ii({},e,{ref:t,sideCar:Ua}))});Wa.classNames=ta.classNames;var Ga=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Ka=new WeakMap,qa=new WeakMap,Ja={},Ya=0,Xa=function(e){return e&&(e.host||Xa(e.parentNode))},Za=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Xa(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Qa=function(e,t,n,r){var i=Za(t,Array.isArray(e)?e:[e]);Ja[n]||(Ja[n]=new WeakMap);var a=Ja[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Ka.get(e)||0)+1,l=(a.get(e)||0)+1;Ka.set(e,c),a.set(e,l),o.push(e),c===1&&i&&qa.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Ya++,function(){o.forEach(function(e){var t=Ka.get(e)-1,i=a.get(e)-1;Ka.set(e,t),a.set(e,i),t||(qa.has(e)||e.removeAttribute(r),qa.delete(e)),i||e.removeAttribute(n)}),Ya--,Ya||(Ka=new WeakMap,Ka=new WeakMap,qa=new WeakMap,Ja={})}},$a=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Ga(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Qa(r,i,n,`aria-hidden`)):function(){return null}},eo=`Dialog`,[to,no]=ir(eo),[ro,io]=to(eo),ao=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=P.useRef(null),c=P.useRef(null),[l,u]=cr({prop:r,defaultProp:i??!1,onChange:a,caller:eo});return(0,z.jsx)(ro,{scope:t,triggerRef:s,contentRef:c,contentId:Or(),titleId:Or(),descriptionId:Or(),open:l,onOpenChange:u,onOpenToggle:P.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};ao.displayName=eo;var oo=`DialogTrigger`,so=P.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=io(oo,n),a=zn(t,i.triggerRef);return(0,z.jsx)(yr.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Oo(i.open),...r,ref:a,onClick:nr(e.onClick,i.onOpenToggle)})});so.displayName=oo;var co=`DialogPortal`,[lo,uo]=to(co,{forceMount:void 0}),fo=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=io(co,t);return(0,z.jsx)(lo,{scope:t,forceMount:n,children:P.Children.map(r,e=>(0,z.jsx)(Sr,{present:n||a.open,children:(0,z.jsx)(Mi,{asChild:!0,container:i,children:e})}))})};fo.displayName=co;var po=`DialogOverlay`,mo=P.forwardRef((e,t)=>{let n=uo(po,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=io(po,e.__scopeDialog);return a.modal?(0,z.jsx)(Sr,{present:r||a.open,children:(0,z.jsx)(go,{...i,ref:t})}):null});mo.displayName=po;var ho=fr(`DialogOverlay.RemoveScroll`),go=P.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=io(po,n);return(0,z.jsx)(Wa,{as:ho,allowPinchZoom:!0,shards:[i.contentRef],children:(0,z.jsx)(yr.div,{"data-state":Oo(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),_o=`DialogContent`,vo=P.forwardRef((e,t)=>{let n=uo(_o,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=io(_o,e.__scopeDialog);return(0,z.jsx)(Sr,{present:r||a.open,children:a.modal?(0,z.jsx)(yo,{...i,ref:t}):(0,z.jsx)(bo,{...i,ref:t})})});vo.displayName=_o;var yo=P.forwardRef((e,t)=>{let n=io(_o,e.__scopeDialog),r=P.useRef(null),i=zn(t,n.contentRef,r);return P.useEffect(()=>{let e=r.current;if(e)return $a(e)},[]),(0,z.jsx)(xo,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:nr(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:nr(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:nr(e.onFocusOutside,e=>e.preventDefault())})}),bo=P.forwardRef((e,t)=>{let n=io(_o,e.__scopeDialog),r=P.useRef(!1),i=P.useRef(!1);return(0,z.jsx)(xo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),xo=P.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=io(_o,n),c=P.useRef(null),l=zn(t,c);return Pi(),(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(yi,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,z.jsx)(ci,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Oo(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Mo,{titleId:s.titleId}),(0,z.jsx)(Po,{contentRef:c,descriptionId:s.descriptionId})]})]})}),So=`DialogTitle`,Co=P.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=io(So,n);return(0,z.jsx)(yr.h2,{id:i.titleId,...r,ref:t})});Co.displayName=So;var wo=`DialogDescription`,To=P.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=io(wo,n);return(0,z.jsx)(yr.p,{id:i.descriptionId,...r,ref:t})});To.displayName=wo;var Eo=`DialogClose`,Do=P.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=io(Eo,n);return(0,z.jsx)(yr.button,{type:`button`,...r,ref:t,onClick:nr(e.onClick,()=>i.onOpenChange(!1))})});Do.displayName=Eo;function Oo(e){return e?`open`:`closed`}var ko=`DialogTitleWarning`,[Ao,jo]=rr(ko,{contentName:_o,titleName:So,docsSlug:`dialog`}),Mo=({titleId:e})=>{let t=jo(ko),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
50
|
+
|
|
51
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
52
|
+
|
|
53
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return P.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},No=`DialogDescriptionWarning`,Po=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${jo(No).contentName}}.`;return P.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Fo=ao,Io=so,Lo=fo,Ro=mo,zo=vo,Bo=Co,Vo=To,Ho=Do,Uo=Fo,Wo=$n(`fixed z-50 gap-4 bg-background p-6 shadow-lg`,{variants:{side:{top:`inset-x-0 top-0 border-b`,bottom:`inset-x-0 bottom-0 border-t`,left:`inset-y-0 left-0 h-full w-[280px] border-r`,right:`inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm`}},defaultVariants:{side:`right`}}),Go=P.forwardRef(({className:e,...t},n)=>(0,z.jsx)(Ro,{className:R(`fixed inset-0 z-50 bg-black/80 animate-fade-in`,e),...t,ref:n}));Go.displayName=Ro.displayName;var Ko=P.forwardRef(({side:e=`right`,className:t,children:n,noClose:r,...i},a)=>{let o=e===`bottom`?`animate-slide-in-bottom`:`animate-slide-in-right`;return(0,z.jsxs)(Lo,{children:[(0,z.jsx)(Go,{}),(0,z.jsxs)(zo,{ref:a,className:R(Wo({side:e}),o,t),...i,children:[!r&&(0,z.jsxs)(Ho,{className:`absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary`,children:[(0,z.jsx)(Ke,{className:`size-4`}),(0,z.jsx)(`span`,{className:`sr-only`,children:`Close`})]}),n]})]})});Ko.displayName=zo.displayName;var qo=({className:e,...t})=>(0,z.jsx)(`div`,{className:R(`flex flex-col space-y-2 text-center sm:text-left`,e),...t});qo.displayName=`SheetHeader`;var Jo=({className:e,...t})=>(0,z.jsx)(`div`,{className:R(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,e),...t});Jo.displayName=`SheetFooter`;var Yo=P.forwardRef(({className:e,...t},n)=>(0,z.jsx)(Bo,{ref:n,className:R(`text-lg font-semibold text-foreground`,e),...t}));Yo.displayName=Bo.displayName;var Xo=P.forwardRef(({className:e,...t},n)=>(0,z.jsx)(Vo,{ref:n,className:R(`text-sm text-muted-foreground`,e),...t}));Xo.displayName=Vo.displayName;var Zo=`AlertDialog`,[Qo,$o]=ir(Zo,[no]),es=no(),ts=e=>{let{__scopeAlertDialog:t,...n}=e,r=es(t);return(0,z.jsx)(Fo,{...r,...n,modal:!0})};ts.displayName=Zo;var ns=`AlertDialogTrigger`,rs=P.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=es(n);return(0,z.jsx)(Io,{...i,...r,ref:t})});rs.displayName=ns;var is=`AlertDialogPortal`,as=e=>{let{__scopeAlertDialog:t,...n}=e,r=es(t);return(0,z.jsx)(Lo,{...r,...n})};as.displayName=is;var ss=`AlertDialogOverlay`,cs=P.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=es(n);return(0,z.jsx)(Ro,{...i,...r,ref:t})});cs.displayName=ss;var ls=`AlertDialogContent`,[us,ds]=Qo(ls),fs=hr(`AlertDialogContent`),ps=P.forwardRef((e,t)=>{let{__scopeAlertDialog:n,children:r,...i}=e,a=es(n),o=P.useRef(null),s=zn(t,o),c=P.useRef(null);return(0,z.jsx)(Ao,{contentName:ls,titleName:ms,docsSlug:`alert-dialog`,children:(0,z.jsx)(us,{scope:n,cancelRef:c,children:(0,z.jsxs)(zo,{role:`alertdialog`,...a,...i,ref:s,onOpenAutoFocus:nr(i.onOpenAutoFocus,e=>{e.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[(0,z.jsx)(fs,{children:r}),(0,z.jsx)(Ss,{contentRef:o})]})})})});ps.displayName=ls;var ms=`AlertDialogTitle`,hs=P.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=es(n);return(0,z.jsx)(Bo,{...i,...r,ref:t})});hs.displayName=ms;var gs=`AlertDialogDescription`,_s=P.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=es(n);return(0,z.jsx)(Vo,{...i,...r,ref:t})});_s.displayName=gs;var vs=`AlertDialogAction`,ys=P.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=es(n);return(0,z.jsx)(Ho,{...i,...r,ref:t})});ys.displayName=vs;var bs=`AlertDialogCancel`,xs=P.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=ds(bs,n),a=es(n),o=zn(t,i);return(0,z.jsx)(Ho,{...a,...r,ref:o})});xs.displayName=bs;var Ss=({contentRef:e})=>{let t=`\`${ls}\` requires a description for the component to be accessible for screen reader users.
|
|
54
|
+
|
|
55
|
+
You can add a description to the \`${ls}\` by passing a \`${gs}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
56
|
+
|
|
57
|
+
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${ls}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
58
|
+
|
|
59
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return P.useEffect(()=>{document.getElementById(e.current?.getAttribute(`aria-describedby`))||console.warn(t)},[t,e]),null},Cs=ts,ws=as,Ts=cs,Es=ps,Ds=ys,Os=xs,ks=hs,As=_s,js=Cs,Ms=ws,Ns=P.forwardRef(({className:e,...t},n)=>(0,z.jsx)(Ts,{className:R(`fixed inset-0 z-50 bg-black/80 animate-fade-in`,e),...t,ref:n}));Ns.displayName=Ts.displayName;var Ps=P.forwardRef(({className:e,...t},n)=>(0,z.jsxs)(Ms,{children:[(0,z.jsx)(Ns,{}),(0,z.jsx)(Es,{ref:n,className:R(`fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 animate-zoom-in sm:rounded-lg`,e),...t})]}));Ps.displayName=Es.displayName;var Fs=({className:e,...t})=>(0,z.jsx)(`div`,{className:R(`flex flex-col space-y-2 text-center sm:text-left`,e),...t});Fs.displayName=`AlertDialogHeader`;var Is=({className:e,...t})=>(0,z.jsx)(`div`,{className:R(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,e),...t});Is.displayName=`AlertDialogFooter`;var Ls=P.forwardRef(({className:e,...t},n)=>(0,z.jsx)(ks,{ref:n,className:R(`text-lg font-semibold`,e),...t}));Ls.displayName=ks.displayName;var Rs=P.forwardRef(({className:e,id:t,...n},r)=>(0,z.jsx)(As,{ref:r,id:t,className:R(`text-sm text-muted-foreground`,e),...n}));Rs.displayName=As.displayName;var zs=P.forwardRef(({className:e,...t},n)=>(0,z.jsx)(Ds,{ref:n,className:R(er(),e),...t}));zs.displayName=Ds.displayName;var Bs=P.forwardRef(({className:e,...t},n)=>(0,z.jsx)(Os,{ref:n,className:R(er({variant:`outline`}),`mt-2 sm:mt-0`,e),...t}));Bs.displayName=Os.displayName;function Vs({item:e,currentDir:t,onRenameRequest:n,onMoveRequest:r,onCopyRequest:i,onDelete:a,onCreateRequest:o}){let[s,c]=(0,P.useState)(!1),[l,u]=(0,P.useState)(!1),[d,f]=(0,P.useState)(!1),[p,m]=(0,P.useState)(null);(0,P.useEffect)(()=>{let e=()=>f(window.innerWidth<768);return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),(0,P.useEffect)(()=>{c(!!e)},[e]);let h=()=>{c(!1)},g=()=>{u(!0)},_=()=>{e&&a(e.path,e.rootPath),u(!1),h()};if(!e)return null;let v=e.type===`directory`?e.path:t,y=()=>(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`div`,{className:`flex justify-center pt-2.5 pb-1 md:hidden`,children:(0,z.jsx)(`div`,{className:`w-10 h-1 rounded-full bg-muted-foreground/25`})}),(0,z.jsx)(`div`,{className:`px-4 pt-1 pb-3 md:hidden`,children:(0,z.jsxs)(`div`,{className:`flex items-center gap-3 pt-3`,children:[(0,z.jsx)(`div`,{className:`size-9 rounded-lg bg-primary/10 flex items-center justify-center shrink-0`,children:e.type===`directory`?(0,z.jsx)(Oe,{className:`size-5 text-primary`}):(0,z.jsx)(Ce,{className:`size-5 text-primary`})}),(0,z.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,z.jsx)(`span`,{className:`text-sm font-medium block truncate`,children:e.name}),(0,z.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:e.type===`directory`?`文件夹${e.childrenCount?` · ${e.childrenCount} 个项目`:``}`:`文件`})]})]})})]}),b=()=>(0,z.jsxs)(`div`,{className:`hidden md:flex items-center gap-3 px-4 py-3 border-b border-border`,children:[(0,z.jsx)(`div`,{className:`size-8 rounded-lg bg-primary/10 flex items-center justify-center shrink-0`,children:e.type===`directory`?(0,z.jsx)(Oe,{className:`size-4 text-primary`}):(0,z.jsx)(Ce,{className:`size-4 text-primary`})}),(0,z.jsx)(`div`,{className:`flex-1 min-w-0`,children:(0,z.jsx)(`span`,{className:`text-sm font-medium block truncate`,children:e.name})})]}),x=[{icon:Re,label:`重命名`,color:`bg-blue-500/10 text-blue-600 dark:text-blue-400`,onClick:()=>{n(e),h()}},{icon:Te,label:`移动到`,color:`bg-amber-500/10 text-amber-600 dark:text-amber-400`,onClick:()=>{r(e),h()}},{icon:ye,label:`复制到`,color:`bg-purple-500/10 text-purple-600 dark:text-purple-400`,onClick:()=>{i?.(e),h()}}];return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Uo,{open:s,onOpenChange:h,children:(0,z.jsxs)(Ko,{side:d?`bottom`:`right`,className:R(`p-0`,!d&&`w-[280px] sm:w-[300px]`),noClose:!0,children:[(0,z.jsx)(y,{}),(0,z.jsx)(b,{}),(0,z.jsxs)(`div`,{className:`px-3 py-2 flex gap-2`,children:[(0,z.jsxs)(`button`,{className:`flex-1 flex items-center justify-center gap-1.5 py-2 rounded-lg bg-primary text-primary-foreground text-xs font-medium hover:bg-primary/90 transition-colors shadow-sm`,onClick:()=>{o?.(!1,v),h()},children:[(0,z.jsx)(ze,{className:`size-3.5`}),`新建文件`]}),(0,z.jsxs)(`button`,{className:`flex-1 flex items-center justify-center gap-1.5 py-2 rounded-lg bg-muted text-foreground text-xs font-medium hover:bg-muted/80 transition-colors border border-border`,onClick:()=>{o?.(!0,v),h()},children:[(0,z.jsx)(ze,{className:`size-3.5`}),`新建文件夹`]})]}),(0,z.jsx)(`div`,{className:`px-3 pb-1.5 space-y-1.5`,children:x.map((e,t)=>(0,z.jsxs)(`button`,{onMouseEnter:()=>m(t),onMouseLeave:()=>m(null),onClick:e.onClick,className:R(`flex items-center gap-3 w-full px-3 py-2.5 rounded-xl text-sm transition-all`,p===t?`bg-muted shadow-sm scale-[1.01]`:`bg-card border border-border/60`),children:[(0,z.jsx)(`div`,{className:R(`size-7 rounded-lg flex items-center justify-center shrink-0`,e.color),children:(0,z.jsx)(e.icon,{className:`size-4`})}),(0,z.jsx)(`span`,{children:e.label})]},t))}),(0,z.jsx)(`div`,{className:`px-3 pb-4`,children:(0,z.jsxs)(`button`,{onClick:g,className:`flex items-center gap-3 w-full px-3 py-2.5 rounded-xl text-sm text-destructive bg-destructive/5 border border-destructive/10 hover:bg-destructive/10 transition-colors`,children:[(0,z.jsx)(`div`,{className:`size-7 rounded-lg bg-destructive/10 flex items-center justify-center shrink-0`,children:(0,z.jsx)(Ge,{className:`size-4`})}),(0,z.jsxs)(`span`,{children:[`删除`,e.type===`directory`?`此文件夹`:`此文件`]})]})})]})}),(0,z.jsx)(js,{open:l,onOpenChange:u,children:(0,z.jsxs)(Ps,{children:[(0,z.jsxs)(Fs,{children:[(0,z.jsx)(Ls,{children:`确认删除`}),(0,z.jsx)(Rs,{children:e.type===`directory`&&e.childrenCount&&e.childrenCount>0?(0,z.jsxs)(`span`,{className:`text-destructive font-medium`,children:[`文件夹「`,e.name,`」包含 `,e.childrenCount,` 个项目,删除后将全部删除且无法恢复。确定要继续吗?`]}):(0,z.jsxs)(z.Fragment,{children:[`确定要删除「`,e.name,`」吗?此操作无法撤销。`]})})]}),(0,z.jsxs)(Is,{children:[(0,z.jsx)(Bs,{children:`取消`}),(0,z.jsx)(zs,{onClick:_,className:`bg-destructive text-destructive-foreground hover:bg-destructive/90`,children:`删除`})]})]})})]})}var Hs=(0,P.memo)(function e({node:t,activePath:n,expandedPaths:r,setExpandedPaths:i,onSelect:a,onDelete:o,onRenameRequest:s,onMoveRequest:c,onCopyRequest:l,onExpand:u,editingType:d,onEditingChange:f,onCreateSubmit:p,onCreateRequest:m,currentDir:h,activeRoot:g}){let[_,v]=(0,P.useState)(``),[y,b]=(0,P.useState)(null),x=(0,P.useRef)(null),S=t.type===`directory`,C=t.path===n&&t.rootPath===g,w=r.has(t.path);S&&t.children&&t.children.length;let T=t.children?.length||0;(0,P.useEffect)(()=>{d&&t.path===h&&setTimeout(()=>{x.current?.focus()},50)},[d,h]);let E=()=>{_.trim()&&p&&(p(_.trim(),d===`directory`),v(``),f?.(null))};return S?(0,z.jsx)(Xr,{className:`sidebar-menu-item`,children:(0,z.jsxs)(Ur,{className:`group/collapsible`,open:w,onOpenChange:e=>{e&&u&&u(t.path),i(n=>{let r=new Set(n);return e?r.add(t.path):r.delete(t.path),r})},children:[(0,z.jsxs)(`div`,{className:`flex items-center relative`,children:[(0,z.jsx)(Wr,{asChild:!0,children:(0,z.jsxs)(Qr,{isActive:C,className:`data-[active=true]:bg-transparent flex-1 pr-8`,children:[(0,z.jsx)(he,{className:R(`size-4 shrink-0 transition-transform`,w&&`rotate-90`)}),(0,z.jsx)(Oe,{className:`size-4 shrink-0`}),(0,z.jsx)(`span`,{className:`flex-1 whitespace-nowrap`,children:t.name})]})}),(0,z.jsx)(`button`,{"data-sidebar":`menu-action`,onClick:()=>b({path:t.path,name:t.name,type:`directory`,rootPath:t.rootPath,childrenCount:T}),className:`sidebar-menu-item-action absolute right-1 top-1/2 -translate-y-1/2 size-6 flex items-center justify-center rounded-md hover:bg-accent z-10`,children:(0,z.jsx)(be,{className:`size-3.5`})})]}),(0,z.jsx)(Vs,{item:y,currentDir:h,onRenameRequest:s,onMoveRequest:c,onCopyRequest:l,onDelete:o,onCreateRequest:m}),(0,z.jsx)(Gr,{children:(0,z.jsxs)($r,{children:[t.children?.map(t=>(0,z.jsx)(e,{node:t,activePath:n,expandedPaths:r,setExpandedPaths:i,onSelect:a,onDelete:o,onRenameRequest:s,onMoveRequest:c,onCopyRequest:l,onExpand:u,editingType:d,onEditingChange:f,onCreateSubmit:p,onCreateRequest:m,currentDir:h,activeRoot:g},t.path)),d&&t.path===h&&(0,z.jsx)(Xr,{className:`px-2`,children:(0,z.jsxs)(`div`,{className:`flex items-center gap-2 py-1.5`,children:[d===`directory`?(0,z.jsx)(Oe,{className:`size-4 shrink-0 text-muted-foreground`}):(0,z.jsx)(Ce,{className:`size-4 shrink-0 text-muted-foreground`}),(0,z.jsx)(In,{ref:x,id:`create-input-${t.path}`,placeholder:d===`directory`?`文件夹名称`:`文件名称`,value:_,onChange:e=>v(e.target.value),onKeyDown:e=>{e.key===`Enter`?E():e.key===`Escape`&&(v(``),f?.(null))},onBlur:()=>{_.trim()&&p?E():(v(``),f?.(null))},className:`h-7 text-sm`,autoFocus:!0})]})})]})})]})}):(0,z.jsxs)(Xr,{className:`sidebar-menu-item`,children:[(0,z.jsxs)(Qr,{isActive:C,className:`data-[active=true]:bg-sidebar-accent pr-8`,onClick:()=>a(t.path,`file`,g||void 0),children:[(0,z.jsx)(we,{className:`size-4 shrink-0`}),(0,z.jsx)(`span`,{className:`flex-1 whitespace-nowrap`,children:t.name})]}),(0,z.jsx)(`button`,{"data-sidebar":`menu-action`,onClick:e=>{e.stopPropagation(),b({path:t.path,name:t.name,type:`file`,rootPath:t.rootPath})},className:`sidebar-menu-item-action absolute right-1 top-1/2 -translate-y-1/2 size-6 flex items-center justify-center rounded-md hover:bg-accent z-10`,children:(0,z.jsx)(be,{className:`size-3.5`})}),(0,z.jsx)(Vs,{item:y,currentDir:h,onRenameRequest:s,onMoveRequest:c,onCopyRequest:l,onDelete:o,onCreateRequest:m})]})}),Us=(0,P.memo)(({activeRoot:e,onCreateRequest:t,onEditDir:n})=>{let r=e?.split(`/`).pop()||`根目录`,[i,a]=(0,P.useState)(null);return(0,z.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-full text-center p-6`,children:[(0,z.jsx)(`div`,{className:`mb-5 relative`,children:(0,z.jsxs)(`div`,{className:R(`size-16 rounded-xl flex items-center justify-center transition-colors duration-300`,i===`file`?`bg-primary/10`:i===`folder`?`bg-orange-500/10`:`bg-muted`),children:[i===`file`&&(0,z.jsx)(Ce,{className:`size-8 text-primary`}),i===`folder`&&(0,z.jsx)(Oe,{className:`size-8 text-orange-500`}),!i&&(0,z.jsx)(Ee,{className:`size-8 text-muted-foreground/40`})]})}),(0,z.jsx)(`h3`,{className:`text-base font-semibold text-foreground mb-1.5`,children:`这个目录是空的`}),(0,z.jsxs)(`p`,{className:`text-xs text-muted-foreground mb-6 max-w-[220px]`,children:[`「`,r,`」里还没有任何内容,选择下面的操作来开始吧`]}),(0,z.jsxs)(`div`,{className:`flex flex-col gap-2 w-full max-w-[200px]`,children:[(0,z.jsxs)(tr,{size:`sm`,className:`w-full justify-between text-xs`,onMouseEnter:()=>a(`file`),onMouseLeave:()=>a(null),onClick:()=>t?.(!1,``),children:[(0,z.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(Se,{className:`size-4`}),`新建 Markdown 文件`]}),(0,z.jsx)(de,{className:`size-3.5 opacity-70`})]}),(0,z.jsxs)(tr,{variant:`secondary`,size:`sm`,className:`w-full justify-start text-xs`,onMouseEnter:()=>a(`folder`),onMouseLeave:()=>a(null),onClick:()=>t?.(!0,``),children:[(0,z.jsx)(De,{className:`size-4 mr-2`}),`新建文件夹`]}),(0,z.jsx)(`button`,{className:`text-[11px] text-muted-foreground hover:text-foreground transition-colors mt-1`,onClick:()=>n?.(),children:`或者,打开目录设置`})]})]})}),Ws=(0,P.memo)(function({files:e,activePath:t,activeRoot:n,currentDir:r,expandedPaths:i,setExpandedPaths:a,onSelect:o,onDelete:s,onRenameRequest:c,onMoveRequest:l,onCopyRequest:u,onExpand:d,editingType:f,onEditingChange:p,onCreateSubmit:m,onCreateRequest:h,onEditDir:g}){let[_,v]=(0,P.useState)(``),y=(0,P.useRef)(null);(0,P.useEffect)(()=>{f&&y.current&&y.current.focus()},[f]);let b=()=>{_.trim()&&m&&(m(_.trim(),f===`directory`),v(``),p&&p(null))},x=e=>{e.key===`Enter`?b():e.key===`Escape`&&(v(``),p&&p(null))},S=()=>{_.trim()&&m?b():(v(``),p&&p(null))},C=r?r.split(`/`).filter(Boolean).join(` / `):`根目录`;return e.length===0&&!f?(0,z.jsx)(`div`,{className:`flex-1 overflow-y-auto`,children:(0,z.jsx)(Us,{activeRoot:n,onCreateRequest:h,onEditDir:g})}):(0,z.jsx)(`div`,{className:`flex-1 overflow-y-auto overflow-x-auto`,children:(0,z.jsxs)(`div`,{className:`min-w-max`,children:[(0,z.jsxs)(Kr,{children:[(0,z.jsxs)(`div`,{className:`flex items-center justify-between px-2`,children:[(0,z.jsx)(qr,{children:`Files`}),(0,z.jsxs)(`div`,{className:`flex gap-1`,children:[(0,z.jsx)(tr,{variant:`ghost`,size:`icon`,className:`size-6`,onClick:()=>h?.(!1,``),title:`新建文件`,children:(0,z.jsx)(Ce,{className:`size-4`})}),(0,z.jsx)(tr,{variant:`ghost`,size:`icon`,className:`size-6`,onClick:()=>h?.(!0,``),title:`新建文件夹`,children:(0,z.jsx)(Oe,{className:`size-4`})}),(0,z.jsx)(tr,{variant:`ghost`,size:`icon`,className:`size-6`,onClick:()=>g?.(),title:`目录设置`,children:(0,z.jsx)(Re,{className:`size-4`})})]})]}),(0,z.jsx)(Jr,{children:(0,z.jsxs)(Yr,{children:[e.map(e=>(0,z.jsx)(Hs,{node:e,activePath:t,expandedPaths:i,setExpandedPaths:a,onSelect:o,onDelete:s,onRenameRequest:c,onMoveRequest:l,onCopyRequest:u,onExpand:d,editingType:f,onEditingChange:p,onCreateSubmit:m,onCreateRequest:h,currentDir:r,activeRoot:n},e.path)),f&&(r===``||r===`/`)&&(0,z.jsx)(Xr,{className:`sidebar-menu-item`,children:(0,z.jsxs)(`div`,{className:`flex items-center gap-2 px-2 py-1.5 w-full`,children:[f===`directory`?(0,z.jsx)(Oe,{className:`size-4 shrink-0 text-muted-foreground`}):(0,z.jsx)(Ce,{className:`size-4 shrink-0 text-muted-foreground`}),(0,z.jsx)(In,{id:`root-create-input`,placeholder:f===`directory`?`文件夹名称`:`文件名称`,value:_,onChange:e=>v(e.target.value),onKeyDown:x,onBlur:S,className:`h-7 text-sm`,autoFocus:!0})]})})]})})]}),f&&(0,z.jsxs)(`div`,{className:`px-4 py-2 text-xs text-muted-foreground border-t`,children:[`位置: `,C]})]})})}),Gs=n((e=>{var t=ee();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),Ks=n(((e,t)=>{t.exports=Gs()})),qs=Ks();function Js(e){this.content=e}Js.prototype={constructor:Js,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),a=r.content.slice();return i==-1?a.push(n||e,t):(a[i+1]=t,n&&(a[i]=n)),new Js(a)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new Js(n)},addToStart:function(e,t){return new Js([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new Js(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),a=r.find(e);return i.splice(a==-1?i.length:a,0,t,n),new Js(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=Js.from(e),e.size?new Js(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=Js.from(e),e.size?new Js(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=Js.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},Js.from=function(e){if(e instanceof Js)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Js(t)};function Ys(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),a=t.child(r);if(i==a){n+=i.nodeSize;continue}if(!i.sameMarkup(a))return n;if(i.isText&&i.text!=a.text){for(let e=0;i.text[e]==a.text[e];e++)n++;return n}if(i.content.size||a.content.size){let e=Ys(i.content,a.content,n+1);if(e!=null)return e}n+=i.nodeSize}}function Xs(e,t,n,r){for(let i=e.childCount,a=t.childCount;;){if(i==0||a==0)return i==a?null:{a:n,b:r};let o=e.child(--i),s=t.child(--a),c=o.nodeSize;if(o==s){n-=c,r-=c;continue}if(!o.sameMarkup(s))return{a:n,b:r};if(o.isText&&o.text!=s.text){let e=0,t=Math.min(o.text.length,s.text.length);for(;e<t&&o.text[o.text.length-e-1]==s.text[s.text.length-e-1];)e++,n--,r--;return{a:n,b:r}}if(o.content.size||s.content.size){let e=Xs(o.content,s.content,n-1,r-1);if(e)return e}n-=c,r-=c}}var B=class e{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let t=0;t<e.length;t++)this.size+=e[t].nodeSize}nodesBetween(e,t,n,r=0,i){for(let a=0,o=0;o<t;a++){let s=this.content[a],c=o+s.nodeSize;if(c>e&&n(s,r+o,i||null,a)!==!1&&s.content.size){let i=o+1;s.nodesBetween(Math.max(0,e-i),Math.min(s.content.size,t-i),n,r+i)}o=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i=``,a=!0;return this.nodesBetween(e,t,(o,s)=>{let c=o.isText?o.text.slice(Math.max(e,s)-s,t-s):o.isLeaf?r?typeof r==`function`?r(o):r:o.type.spec.leafText?o.type.spec.leafText(o):``:``;o.isBlock&&(o.isLeaf&&c||o.isTextblock)&&n&&(a?a=!1:i+=n),i+=c},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),a=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),a=1);a<t.content.length;a++)i.push(t.content[a]);return new e(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let e=0,a=0;a<n;e++){let o=this.content[e],s=a+o.nodeSize;s>t&&((a<t||s>n)&&(o=o.isText?o.cut(Math.max(0,t-a),Math.min(o.text.length,n-a)):o.cut(Math.max(0,t-a-1),Math.min(o.content.size,n-a-1))),r.push(o),i+=o.nodeSize),a=s}return new e(r,i)}cutByIndex(t,n){return t==n?e.empty:t==0&&n==this.content.length?this:new e(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),a=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new e(i,a)}addToStart(t){return new e([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new e(this.content.concat(t),this.size+t.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw RangeError(`Index `+e+` out of range for `+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return Ys(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return Xs(this,e,t,n)}findIndex(e){if(e==0)return Qs(0,e);if(e==this.size)return Qs(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,n=0;;t++){let r=this.child(t),i=n+r.nodeSize;if(i>=e)return i==e?Qs(t+1,i):Qs(t,n);n=i}}toString(){return`<`+this.toStringInner()+`>`}toStringInner(){return this.content.join(`, `)}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw RangeError(`Invalid input for Fragment.fromJSON`);return new e(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return e.empty;let n,r=0;for(let e=0;e<t.length;e++){let i=t[e];r+=i.nodeSize,e&&i.isText&&t[e-1].sameMarkup(i)?(n||=t.slice(0,e),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new e(n||t,r)}static from(t){if(!t)return e.empty;if(t instanceof e)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new e([t],t.nodeSize);throw RangeError(`Can not convert `+t+` to a Fragment`+(t.nodesBetween?` (looks like multiple versions of prosemirror-model were loaded)`:``))}};B.empty=new B([],0);var Zs={index:0,offset:0};function Qs(e,t){return Zs.index=e,Zs.offset=t,Zs}function $s(e,t){if(e===t)return!0;if(!(e&&typeof e==`object`)||!(t&&typeof t==`object`))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!$s(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!$s(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}var ec=class e{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(this.eq(i))return e;if(this.type.excludes(i.type))t||=e.slice(0,r);else if(i.type.excludes(this.type))return e;else !n&&i.type.rank>this.type.rank&&(t||=e.slice(0,r),t.push(this),n=!0),t&&t.push(i)}return t||=e.slice(),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&$s(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw RangeError(`Invalid input for Mark.fromJSON`);let n=e.marks[t.type];if(!n)throw RangeError(`There is no mark type ${t.type} in this schema`);let r=n.create(t.attrs);return n.checkAttrs(r.attrs),r}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return e.none;if(t instanceof e)return[t];let n=t.slice();return n.sort((e,t)=>e.type.rank-t.type.rank),n}};ec.none=[];var tc=class extends Error{},V=class e{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=rc(this.content,t+this.openStart,n);return r&&new e(r,this.openStart,this.openEnd)}removeBetween(t,n){return new e(nc(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+`(`+this.openStart+`,`+this.openEnd+`)`}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(t,n){if(!n)return e.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!=`number`||typeof i!=`number`)throw RangeError(`Invalid input for Slice.fromJSON`);return new e(B.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let e=t.firstChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.firstChild)r++;for(let e=t.lastChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.lastChild)i++;return new e(t,r,i)}};V.empty=new V(B.empty,0,0);function nc(e,t,n){let{index:r,offset:i}=e.findIndex(t),a=e.maybeChild(r),{index:o,offset:s}=e.findIndex(n);if(i==t||a.isText){if(s!=n&&!e.child(o).isText)throw RangeError(`Removing non-flat range`);return e.cut(0,t).append(e.cut(n))}if(r!=o)throw RangeError(`Removing non-flat range`);return e.replaceChild(r,a.copy(nc(a.content,t-i-1,n-i-1)))}function rc(e,t,n,r){let{index:i,offset:a}=e.findIndex(t),o=e.maybeChild(i);if(a==t||o.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));let s=rc(o.content,t-a-1,n,o);return s&&e.replaceChild(i,o.copy(s))}function ic(e,t,n){if(n.openStart>e.depth)throw new tc(`Inserted content deeper than insertion position`);if(e.depth-n.openStart!=t.depth-n.openEnd)throw new tc(`Inconsistent open depths`);return ac(e,t,n,0)}function ac(e,t,n,r){let i=e.index(r),a=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let o=ac(e,t,n,r+1);return a.copy(a.content.replaceChild(i,o))}else if(!n.content.size)return uc(a,fc(e,t,r));else if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let r=e.parent,i=r.content;return uc(r,i.cut(0,e.parentOffset).append(n.content).append(i.cut(t.parentOffset)))}else{let{start:i,end:o}=pc(n,e);return uc(a,dc(e,i,o,t,r))}}function oc(e,t){if(!t.type.compatibleContent(e.type))throw new tc(`Cannot join `+t.type.name+` onto `+e.type.name)}function sc(e,t,n){let r=e.node(n);return oc(r,t.node(n)),r}function cc(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function lc(e,t,n,r){let i=(t||e).node(n),a=0,o=t?t.index(n):i.childCount;e&&(a=e.index(n),e.depth>n?a++:e.textOffset&&(cc(e.nodeAfter,r),a++));for(let e=a;e<o;e++)cc(i.child(e),r);t&&t.depth==n&&t.textOffset&&cc(t.nodeBefore,r)}function uc(e,t){return e.type.checkContent(t),e.copy(t)}function dc(e,t,n,r,i){let a=e.depth>i&&sc(e,t,i+1),o=r.depth>i&&sc(n,r,i+1),s=[];return lc(null,e,i,s),a&&o&&t.index(i)==n.index(i)?(oc(a,o),cc(uc(a,dc(e,t,n,r,i+1)),s)):(a&&cc(uc(a,fc(e,t,i+1)),s),lc(t,n,i,s),o&&cc(uc(o,fc(n,r,i+1)),s)),lc(r,null,i,s),new B(s)}function fc(e,t,n){let r=[];return lc(null,e,n,r),e.depth>n&&cc(uc(sc(e,t,n+1),fc(e,t,n+1)),r),lc(t,null,n,r),new B(r)}function pc(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let e=n-1;e>=0;e--)r=t.node(e).copy(B.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}var mc=class e{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw RangeError(`There is no position before the top-level node`);return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw RangeError(`There is no position after the top-level node`);return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[t*3],r=t==0?0:this.path[t*3-1]+1;for(let t=0;t<e;t++)r+=n.child(t).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return ec.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let i=n.marks;for(var a=0;a<i.length;a++)i[a].type.spec.inclusive===!1&&(!r||!i[a].isInSet(r.marks))&&(i=i[a--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var i=0;i<n.length;i++)n[i].type.spec.inclusive===!1&&(!r||!n[i].isInSet(r.marks))&&(n=n[i--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new vc(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e=``;for(let t=1;t<=this.depth;t++)e+=(e?`/`:``)+this.node(t).type.name+`_`+this.index(t-1);return e+`:`+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw RangeError(`Position `+n+` out of range`);let r=[],i=0,a=n;for(let e=t;;){let{index:t,offset:n}=e.content.findIndex(a),o=a-n;if(r.push(e,t,i+n),!o||(e=e.child(t),e.isText))break;a=o-1,i+=n+1}return new e(n,r,a)}static resolveCached(t,n){let r=_c.get(t);if(r)for(let e=0;e<r.elts.length;e++){let t=r.elts[e];if(t.pos==n)return t}else _c.set(t,r=new hc);let i=r.elts[r.i]=e.resolve(t,n);return r.i=(r.i+1)%gc,i}},hc=class{constructor(){this.elts=[],this.i=0}},gc=12,_c=new WeakMap,vc=class{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}},yc=Object.create(null),bc=class e{constructor(e,t,n,r=ec.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||B.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,``)}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&$s(this.attrs,t||e.defaultAttrs||yc)&&ec.sameSet(this.marks,n||ec.none)}copy(t=null){return t==this.content?this:new e(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.content,t)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return V.empty;let r=this.resolve(e),i=this.resolve(t),a=n?0:r.sharedDepth(t),o=r.start(a);return new V(r.node(a).content.cut(r.pos-o,i.pos-o),r.depth-a,i.depth-a)}replace(e,t,n){return ic(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(t=t.maybeChild(n),!t)return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return mc.resolveCached(this,e)}resolveNoCache(e){return mc.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,e=>(n.isInSet(e.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+=`(`+this.content.toStringInner()+`)`),Sc(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error(`Called contentMatchAt on a node with invalid content`);return t}canReplace(e,t,n=B.empty,r=0,i=n.childCount){let a=this.contentMatchAt(e).matchFragment(n,r,i),o=a&&a.matchFragment(this.content,t);if(!o||!o.validEnd)return!1;for(let e=r;e<i;e++)if(!this.type.allowsMarks(n.child(e).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(e).matchType(n),a=i&&i.matchFragment(this.content,t);return a?a.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=ec.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!ec.sameSet(e,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(e=>e.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(e=>e.toJSON())),e}static fromJSON(e,t){if(!t)throw RangeError(`Invalid input for Node.fromJSON`);let n;if(t.marks){if(!Array.isArray(t.marks))throw RangeError(`Invalid mark data for Node.fromJSON`);n=t.marks.map(e.markFromJSON)}if(t.type==`text`){if(typeof t.text!=`string`)throw RangeError(`Invalid text node in JSON`);return e.text(t.text,n)}let r=B.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,r,n);return i.type.checkAttrs(i.attrs),i}};bc.prototype.text=void 0;var xc=class e extends bc{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw RangeError(`Empty text nodes are not allowed`);this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Sc(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new e(this.type,this.attrs,t,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};function Sc(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+`(`+t+`)`;return t}var H=class e{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new Cc(t,n);if(r.next==null)return e.empty;let i=wc(r);r.next&&r.err(`Unexpected trailing text`);let a=Pc(jc(i));return Fc(a,r),a}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let i=t;r&&i<n;i++)r=r.matchType(e.child(i).type);return r}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];function i(a,o){let s=a.matchFragment(e,n);if(s&&(!t||s.validEnd))return B.from(o.map(e=>e.createAndFill()));for(let e=0;e<a.next.length;e++){let{type:t,next:n}=a.next[e];if(!(t.isText||t.hasRequiredAttrs())&&r.indexOf(n)==-1){r.push(n);let e=i(n,o.concat(t));if(e)return e}}return null}return i(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<i.next.length;e++){let{type:a,next:o}=i.next[e];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in t)&&(!r.type||o.validEnd)&&(n.push({match:a.contentMatch,type:a,via:r}),t[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(n){e.push(n);for(let r=0;r<n.next.length;r++)e.indexOf(n.next[r].next)==-1&&t(n.next[r].next)}return t(this),e.map((t,n)=>{let r=n+(t.validEnd?`*`:` `)+` `;for(let n=0;n<t.next.length;n++)r+=(n?`, `:``)+t.next[n].type.name+`->`+e.indexOf(t.next[n].next);return r}).join(`
|
|
60
|
+
`)}};H.empty=new H(!0);var Cc=class{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==``&&this.tokens.pop(),this.tokens[0]==``&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw SyntaxError(e+` (in content expression '`+this.string+`')`)}};function wc(e){let t=[];do t.push(Tc(e));while(e.eat(`|`));return t.length==1?t[0]:{type:`choice`,exprs:t}}function Tc(e){let t=[];do t.push(Ec(e));while(e.next&&e.next!=`)`&&e.next!=`|`);return t.length==1?t[0]:{type:`seq`,exprs:t}}function Ec(e){let t=Ac(e);for(;;)if(e.eat(`+`))t={type:`plus`,expr:t};else if(e.eat(`*`))t={type:`star`,expr:t};else if(e.eat(`?`))t={type:`opt`,expr:t};else if(e.eat(`{`))t=Oc(e,t);else break;return t}function Dc(e){/\D/.test(e.next)&&e.err(`Expected number, got '`+e.next+`'`);let t=Number(e.next);return e.pos++,t}function Oc(e,t){let n=Dc(e),r=n;return e.eat(`,`)&&(r=e.next==`}`?-1:Dc(e)),e.eat(`}`)||e.err(`Unclosed braced range`),{type:`range`,min:n,max:r,expr:t}}function kc(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let e in n){let r=n[e];r.isInGroup(t)&&i.push(r)}return i.length==0&&e.err(`No node type or group '`+t+`' found`),i}function Ac(e){if(e.eat(`(`)){let t=wc(e);return e.eat(`)`)||e.err(`Missing closing paren`),t}else if(/\W/.test(e.next))e.err(`Unexpected token '`+e.next+`'`);else{let t=kc(e,e.next).map(t=>(e.inline==null?e.inline=t.isInline:e.inline!=t.isInline&&e.err(`Mixing inline and block content`),{type:`name`,value:t}));return e.pos++,t.length==1?t[0]:{type:`choice`,exprs:t}}}function jc(e){let t=[[]];return i(a(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let i={term:r,to:n};return t[e].push(i),i}function i(e,t){e.forEach(e=>e.to=t)}function a(e,t){if(e.type==`choice`)return e.exprs.reduce((e,n)=>e.concat(a(n,t)),[]);if(e.type==`seq`)for(let r=0;;r++){let o=a(e.exprs[r],t);if(r==e.exprs.length-1)return o;i(o,t=n())}else if(e.type==`star`){let o=n();return r(t,o),i(a(e.expr,o),o),[r(o)]}else if(e.type==`plus`){let o=n();return i(a(e.expr,t),o),i(a(e.expr,o),o),[r(o)]}else if(e.type==`opt`)return[r(t)].concat(a(e.expr,t));else if(e.type==`range`){let o=t;for(let t=0;t<e.min;t++){let t=n();i(a(e.expr,o),t),o=t}if(e.max==-1)i(a(e.expr,o),o);else for(let t=e.min;t<e.max;t++){let t=n();r(o,t),i(a(e.expr,o),t),o=t}return[r(o)]}else if(e.type==`name`)return[r(t,void 0,e.value)];else throw Error(`Unknown expr type`)}}function Mc(e,t){return t-e}function Nc(e,t){let n=[];return r(t),n.sort(Mc);function r(t){let i=e[t];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(t);for(let e=0;e<i.length;e++){let{term:t,to:a}=i[e];!t&&n.indexOf(a)==-1&&r(a)}}}function Pc(e){let t=Object.create(null);return n(Nc(e,0));function n(r){let i=[];r.forEach(t=>{e[t].forEach(({term:t,to:n})=>{if(!t)return;let r;for(let e=0;e<i.length;e++)i[e][0]==t&&(r=i[e][1]);Nc(e,n).forEach(e=>{r||i.push([t,r=[]]),r.indexOf(e)==-1&&r.push(e)})})});let a=t[r.join(`,`)]=new H(r.indexOf(e.length-1)>-1);for(let e=0;e<i.length;e++){let r=i[e][1].sort(Mc);a.next.push({type:i[e][0],next:t[r.join(`,`)]||n(r)})}return a}}function Fc(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],i=!e.validEnd,a=[];for(let t=0;t<e.next.length;t++){let{type:n,next:o}=e.next[t];a.push(n.name),i&&!(n.isText||n.hasRequiredAttrs())&&(i=!1),r.indexOf(o)==-1&&r.push(o)}i&&t.err(`Only non-generatable nodes (`+a.join(`, `)+`) in a required position (see https://prosemirror.net/docs/guide/#generatable)`)}}function Ic(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function Lc(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(i===void 0){let t=e[r];if(t.hasDefault)i=t.default;else throw RangeError(`No value supplied for attribute `+r)}n[r]=i}return n}function Rc(e,t,n,r){for(let r in t)if(!(r in e))throw RangeError(`Unsupported attribute ${r} for ${n} of type ${r}`);for(let n in e){let r=e[n];r.validate&&r.validate(t[n])}}function zc(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new Hc(e,r,t[r]);return n}var Bc=class e{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(` `):[],this.attrs=zc(e,n.attrs),this.defaultAttrs=Ic(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||e==`text`),this.isText=e==`text`}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==H.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?`pre`:`normal`)}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:Lc(this.attrs,e)}create(e=null,t,n){if(this.isText)throw Error(`NodeType.create can't construct text nodes`);return new bc(this,this.computeAttrs(e),B.from(t),ec.setFrom(n))}createChecked(e=null,t,n){return t=B.from(t),this.checkContent(t),new bc(this,this.computeAttrs(e),t,ec.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),t=B.from(t),t.size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),i=r&&r.fillBefore(B.empty,!0);return i?new bc(this,e,t.append(i),ec.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let t=0;t<e.childCount;t++)if(!this.allowsMarks(e.child(t).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){Rc(this.attrs,e,`node`,this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||=e.slice(0,n);return t?t.length?t:ec.none:e}static compile(t,n){let r=Object.create(null);t.forEach((t,i)=>r[t]=new e(t,n,i));let i=n.spec.topNode||`doc`;if(!r[i])throw RangeError(`Schema is missing its top node type ('`+i+`')`);if(!r.text)throw RangeError(`Every schema needs a 'text' type`);for(let e in r.text.attrs)throw RangeError(`The text node type should not have attributes`);return r}};function Vc(e,t,n){let r=n.split(`|`);return n=>{let i=n===null?`null`:typeof n;if(r.indexOf(i)<0)throw RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${i}`)}}var Hc=class{constructor(e,t,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,`default`),this.default=n.default,this.validate=typeof n.validate==`string`?Vc(e,t,n.validate):n.validate}get isRequired(){return!this.hasDefault}},Uc=class e{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=zc(e,r.attrs),this.excluded=null;let i=Ic(this.attrs);this.instance=i?new ec(this,i):null}create(e=null){return!e&&this.instance?this.instance:new ec(this,Lc(this.attrs,e))}static compile(t,n){let r=Object.create(null),i=0;return t.forEach((t,a)=>r[t]=new e(t,i++,n,a)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){Rc(this.attrs,e,`mark`,this.name)}excludes(e){return this.excluded.indexOf(e)>-1}},Wc=class{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let n in e)t[n]=e[n];t.nodes=Js.from(e.nodes),t.marks=Js.from(e.marks||{}),this.nodes=Bc.compile(this.spec.nodes,this),this.marks=Uc.compile(this.spec.marks,this);let n=Object.create(null);for(let e in this.nodes){if(e in this.marks)throw RangeError(e+` can not be both a node and a mark`);let t=this.nodes[e],r=t.spec.content||``,i=t.spec.marks;if(t.contentMatch=n[r]||(n[r]=H.parse(r,this.nodes)),t.inlineContent=t.contentMatch.inlineContent,t.spec.linebreakReplacement){if(this.linebreakReplacement)throw RangeError(`Multiple linebreak nodes defined`);if(!t.isInline||!t.isLeaf)throw RangeError(`Linebreak replacement nodes must be inline leaf nodes`);this.linebreakReplacement=t}t.markSet=i==`_`?null:i?Gc(this,i.split(` `)):i==``||!t.inlineContent?[]:null}for(let e in this.marks){let t=this.marks[e],n=t.spec.excludes;t.excluded=n==null?[t]:n==``?[]:Gc(this,n.split(` `))}this.nodeFromJSON=e=>bc.fromJSON(this,e),this.markFromJSON=e=>ec.fromJSON(this,e),this.topNodeType=this.nodes[this.spec.topNode||`doc`],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if(typeof e==`string`)e=this.nodeType(e);else if(!(e instanceof Bc))throw RangeError(`Invalid node type: `+e);else if(e.schema!=this)throw RangeError(`Node type from different schema used (`+e.name+`)`);return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new xc(n,n.defaultAttrs,e,ec.setFrom(t))}mark(e,t){return typeof e==`string`&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw RangeError(`Unknown node type: `+e);return t}};function Gc(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],a=e.marks[i],o=a;if(a)n.push(a);else for(let t in e.marks){let r=e.marks[t];(i==`_`||r.spec.group&&r.spec.group.split(` `).indexOf(i)>-1)&&n.push(o=r)}if(!o)throw SyntaxError(`Unknown mark type: '`+t[r]+`'`)}return n}function Kc(e){return e.tag!=null}function qc(e){return e.style!=null}var Jc=class e{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];t.forEach(e=>{if(Kc(e))this.tags.push(e);else if(qc(e)){let t=/[^=]*/.exec(e.style)[0];n.indexOf(t)<0&&n.push(t),this.styles.push(e)}}),this.normalizeLists=!this.tags.some(t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)})}parse(e,t={}){let n=new rl(this,t,!1);return n.addAll(e,ec.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new rl(this,t,!0);return n.addAll(e,ec.none,t.from,t.to),V.maxOpen(n.finish())}matchTag(e,t,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let n=this.tags[r];if(al(e,n.tag)&&(n.namespace===void 0||e.namespaceURI==n.namespace)&&(!n.context||t.matchesContext(n.context))){if(n.getAttrs){let t=n.getAttrs(e);if(t===!1)continue;n.attrs=t||void 0}return n}}}matchStyle(e,t,n,r){for(let i=r?this.styles.indexOf(r)+1:0;i<this.styles.length;i++){let r=this.styles[i],a=r.style;if(!(a.indexOf(e)!=0||r.context&&!n.matchesContext(r.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=t))){if(r.getAttrs){let e=r.getAttrs(t);if(e===!1)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=e.priority==null?50:e.priority,r=0;for(;r<t.length;r++){let e=t[r];if((e.priority==null?50:e.priority)<n)break}t.splice(r,0,e)}for(let t in e.marks){let r=e.marks[t].spec.parseDOM;r&&r.forEach(e=>{n(e=ol(e)),e.mark||e.ignore||e.clearMark||(e.mark=t)})}for(let t in e.nodes){let r=e.nodes[t].spec.parseDOM;r&&r.forEach(e=>{n(e=ol(e)),e.node||e.ignore||e.mark||(e.node=t)})}return t}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new e(t,e.schemaRules(t)))}},Yc={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Xc={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Zc={ol:!0,ul:!0},Qc=1,$c=2,el=4;function tl(e,t,n){return t==null?e&&e.whitespace==`pre`?Qc|$c:n&~el:(t?Qc:0)|(t===`full`?$c:0)}var nl=class{constructor(e,t,n,r,i,a){this.type=e,this.attrs=t,this.marks=n,this.solid=r,this.options=a,this.content=[],this.activeMarks=ec.none,this.match=i||(a&el?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(B.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let t=this.type.contentMatch,n;return(n=t.findWrapping(e.type))?(this.match=t,n):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Qc)){let e=this.content[this.content.length-1],t;if(e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))){let n=e;e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-t[0].length))}}let t=B.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(B.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Yc.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}},rl=class{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let r=t.topNode,i,a=tl(null,t.preserveWhitespace,0)|(n?el:0);i=r?new nl(r.type,r.attrs,ec.none,!0,t.topMatch||r.type.contentMatch,a):n?new nl(null,null,ec.none,!0,null,a):new nl(e.schema.topNodeType,null,ec.none,!0,null,a),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let n=e.nodeValue,r=this.top,i=r.options&$c?`full`:this.localPreserveWS||(r.options&Qc)>0,{schema:a}=this.parser;if(i===`full`||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(!i){if(n=n.replace(/[ \t\r\n\u000c]+/g,` `),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let t=r.content[r.content.length-1],i=e.previousSibling;(!t||i&&i.nodeName==`BR`||t.isText&&/[ \t\r\n\u000c]$/.test(t.text))&&(n=n.slice(1))}}else if(i===`full`)n=n.replace(/\r\n?/g,`
|
|
61
|
+
`);else if(a.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(a.linebreakReplacement.create())){let e=n.split(/\r?\n|\r/);for(let n=0;n<e.length;n++)n&&this.insertNode(a.linebreakReplacement.create(),t,!0),e[n]&&this.insertNode(a.text(e[n]),t,!/\S/.test(e[n]));n=``}else n=n.replace(/\r?\n|\r/g,` `);n&&this.insertNode(a.text(n),t,!/\S/.test(n)),this.findInText(e)}else this.findInside(e)}addElement(e,t,n){let r=this.localPreserveWS,i=this.top;(e.tagName==`PRE`||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let a=e.nodeName.toLowerCase(),o;Zc.hasOwnProperty(a)&&this.parser.normalizeLists&&il(e);let s=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,n));out:if(s?s.ignore:Xc.hasOwnProperty(a))this.findInside(e),this.ignoreFallback(e,t);else if(!s||s.skip||s.closeParent){s&&s.closeParent?this.open=Math.max(0,this.open-1):s&&s.skip.nodeType&&(e=s.skip);let n,r=this.needsBlock;if(Yc.hasOwnProperty(a))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),n=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break out}let o=s&&s.skip?t:this.readStyles(e,t);o&&this.addAll(e,o),n&&this.sync(i),this.needsBlock=r}else{let n=this.readStyles(e,t);n&&this.addElementByRule(e,s,n,s.consuming===!1?o:void 0)}this.localPreserveWS=r}leafFallback(e,t){e.nodeName==`BR`&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
62
|
+
`),t)}ignoreFallback(e,t){e.nodeName==`BR`&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text(`-`),t,!0)}readStyles(e,t){let n=e.style;if(n&&n.length)for(let e=0;e<this.parser.matchedStyles.length;e++){let r=this.parser.matchedStyles[e],i=n.getPropertyValue(r);if(i)for(let e;;){let n=this.parser.matchStyle(r,i,this,e);if(!n)break;if(n.ignore)return null;if(t=n.clearMark?t.filter(e=>!n.clearMark(e)):t.concat(this.parser.schema.marks[n.mark].create(n.attrs)),n.consuming===!1)e=n;else break}}return t}addElementByRule(e,t,n,r){let i,a;if(t.node)if(a=this.parser.schema.nodes[t.node],a.isLeaf)this.insertNode(a.create(t.attrs),n,e.nodeName==`BR`)||this.leafFallback(e,n);else{let e=this.enter(a,t.attrs||null,n,t.preserveWhitespace);e&&(i=!0,n=e)}else{let e=this.parser.schema.marks[t.mark];n=n.concat(e.create(t.attrs))}let o=this.top;if(a&&a.isLeaf)this.findInside(e);else if(r)this.addElement(e,n,r);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(e=>this.insertNode(e,n,!1));else{let r=e;typeof t.contentElement==`string`?r=e.querySelector(t.contentElement):typeof t.contentElement==`function`?r=t.contentElement(e):t.contentElement&&(r=t.contentElement),this.findAround(e,r,!0),this.addAll(r,n),this.findAround(e,r,!1)}i&&this.sync(o)&&this.open--}addAll(e,t,n,r){let i=n||0;for(let a=n?e.childNodes[n]:e.firstChild,o=r==null?null:e.childNodes[r];a!=o;a=a.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(a,t);this.findAtPoint(e,i)}findPlace(e,t,n){let r,i;for(let t=this.open,a=0;t>=0;t--){let o=this.nodes[t],s=o.findWrapping(e);if(s&&(!r||r.length>s.length+a)&&(r=s,i=o,!s.length))break;if(o.solid){if(n)break;a+=2}}if(!r)return null;this.sync(i);for(let e=0;e<r.length;e++)t=this.enterInner(r[e],null,t,!1);return t}insertNode(e,t,n){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&(t=this.enterInner(e,null,t))}let r=this.findPlace(e,t,n);if(r){this.closeExtra();let t=this.top;t.match&&=t.match.matchType(e.type);let n=ec.none;for(let i of r.concat(e.marks))(t.type?t.type.allowsMarkType(i.type):sl(i.type,e.type))&&(n=i.addToSet(n));return t.content.push(e.mark(n)),!0}return!1}enter(e,t,n,r){let i=this.findPlace(e.create(t),n,!1);return i&&=this.enterInner(e,t,n,!0,r),i}enterInner(e,t,n,r=!1,i){this.closeExtra();let a=this.top;a.match=a.match&&a.match.matchType(e);let o=tl(e,i,a.options);a.options&el&&a.content.length==0&&(o|=el);let s=ec.none;return n=n.filter(t=>(a.type?a.type.allowsMarkType(t.type):sl(t.type,e))?(s=t.addToSet(s),!1):!0),this.nodes.push(new nl(e,t,s,r,null,o)),this.open++,n}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;else this.localPreserveWS&&(this.nodes[t].options|=Qc);return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let t=n.length-1;t>=0;t--)e+=n[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find)for(let r=0;r<this.find.length;r++)this.find[r].pos==null&&e.nodeType==1&&e.contains(this.find[r].node)&&t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf(`|`)>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split(`/`),n=this.options.context,r=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),i=-(n?n.depth+1:0)+ +!r,a=(e,o)=>{for(;e>=0;e--){let s=t[e];if(s==``){if(e==t.length-1||e==0)continue;for(;o>=i;o--)if(a(e-1,o))return!0;return!1}else{let e=o>0||o==0&&r?this.nodes[o].type:n&&o>=i?n.node(o-i).type:null;if(!e||e.name!=s&&!e.isInGroup(s))return!1;o--}}return!0};return a(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];if(t.isTextblock&&t.defaultAttrs)return t}}};function il(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let e=t.nodeType==1?t.nodeName.toLowerCase():null;e&&Zc.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):e==`li`?n=t:e&&(n=null)}}function al(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function ol(e){let t={};for(let n in e)t[n]=e[n];return t}function sl(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let a=[],o=e=>{a.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:i}=e.edge(n);if(r==t||a.indexOf(i)<0&&o(i))return!0}};if(o(i.contentMatch))return!0}}var cl=class e{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||=ul(t).createDocumentFragment();let r=n,i=[];return e.forEach(e=>{if(i.length||e.marks.length){let n=0,a=0;for(;n<i.length&&a<e.marks.length;){let t=e.marks[a];if(!this.marks[t.type.name]){a++;continue}if(!t.eq(i[n][0])||t.type.spec.spanning===!1)break;n++,a++}for(;n<i.length;)r=i.pop()[1];for(;a<e.marks.length;){let n=e.marks[a++],o=this.serializeMark(n,e.isInline,t);o&&(i.push([n,r]),r.appendChild(o.dom),r=o.contentDOM||o.dom)}}r.appendChild(this.serializeNodeInner(e,t))}),n}serializeNodeInner(e,t){let{dom:n,contentDOM:r}=ml(ul(t),this.nodes[e.type.name](e),null,e.attrs);if(r){if(e.isLeaf)throw RangeError(`Content hole not allowed in a leaf node spec`);this.serializeFragment(e.content,t,r)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let r=e.marks.length-1;r>=0;r--){let i=this.serializeMark(e.marks[r],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&ml(ul(n),r(e,t),null,e.attrs)}static renderSpec(e,t,n=null,r){return ml(e,t,n,r)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new e(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(e){let t=ll(e.nodes);return t.text||=e=>e.text,t}static marksFromSchema(e){return ll(e.marks)}};function ll(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function ul(e){return e.document||window.document}var dl=new WeakMap;function fl(e){let t=dl.get(e);return t===void 0&&dl.set(e,t=pl(e)),t}function pl(e){let t=null;function n(e){if(e&&typeof e==`object`)if(Array.isArray(e))if(typeof e[0]==`string`)t||=[],t.push(e);else for(let t=0;t<e.length;t++)n(e[t]);else for(let t in e)n(e[t])}return n(e),t}function ml(e,t,n,r){if(typeof t==`string`)return{dom:e.createTextNode(t)};if(t.nodeType!=null)return{dom:t};if(t.dom&&t.dom.nodeType!=null)return t;let i=t[0],a;if(typeof i!=`string`)throw RangeError(`Invalid array passed to renderSpec`);if(r&&(a=fl(r))&&a.indexOf(t)>-1)throw RangeError(`Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.`);let o=i.indexOf(` `);o>0&&(n=i.slice(0,o),i=i.slice(o+1));let s,c=n?e.createElementNS(n,i):e.createElement(i),l=t[1],u=1;if(l&&typeof l==`object`&&l.nodeType==null&&!Array.isArray(l)){u=2;for(let e in l)if(l[e]!=null){let t=e.indexOf(` `);t>0?c.setAttributeNS(e.slice(0,t),e.slice(t+1),l[e]):e==`style`&&c.style?c.style.cssText=l[e]:c.setAttribute(e,l[e])}}for(let i=u;i<t.length;i++){let a=t[i];if(a===0){if(i<t.length-1||i>u)throw RangeError(`Content hole must be the only child of its parent node`);return{dom:c,contentDOM:c}}else{let{dom:t,contentDOM:i}=ml(e,a,n,r);if(c.appendChild(t),i){if(s)throw RangeError(`Multiple content holes`);s=i}}}return{dom:c,contentDOM:s}}var hl=65535,gl=2**16;function _l(e,t){return e+t*gl}function vl(e){return e&hl}function yl(e){return(e-(e&hl))/gl}var bl=1,xl=2,Sl=4,Cl=8,wl=class{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(this.delInfo&Cl)>0}get deletedBefore(){return(this.delInfo&(bl|Sl))>0}get deletedAfter(){return(this.delInfo&(xl|Sl))>0}get deletedAcross(){return(this.delInfo&Sl)>0}},Tl=class e{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&e.empty)return e.empty}recover(e){let t=0,n=vl(e);if(!this.inverted)for(let e=0;e<n;e++)t+=this.ranges[e*3+2]-this.ranges[e*3+1];return this.ranges[n*3]+t+yl(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let r=0,i=this.inverted?2:1,a=this.inverted?1:2;for(let o=0;o<this.ranges.length;o+=3){let s=this.ranges[o]-(this.inverted?r:0);if(s>e)break;let c=this.ranges[o+i],l=this.ranges[o+a],u=s+c;if(e<=u){let i=c?e==s?-1:e==u?1:t:t,a=s+r+(i<0?0:l);if(n)return a;let d=e==(t<0?s:u)?null:_l(o/3,e-s),f=e==s?xl:e==u?bl:Sl;return(t<0?e!=s:e!=u)&&(f|=Cl),new wl(a,f,d)}r+=l-c}return n?e+r:new wl(e+r,0,null)}touches(e,t){let n=0,r=vl(t),i=this.inverted?2:1,a=this.inverted?1:2;for(let t=0;t<this.ranges.length;t+=3){let o=this.ranges[t]-(this.inverted?n:0);if(o>e)break;let s=this.ranges[t+i];if(e<=o+s&&t==r*3)return!0;n+=this.ranges[t+a]-s}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,i=0;r<this.ranges.length;r+=3){let a=this.ranges[r],o=a-(this.inverted?i:0),s=a+(this.inverted?0:i),c=this.ranges[r+t],l=this.ranges[r+n];e(o,o+c,s,s+l),i+=l-c}}invert(){return new e(this.ranges,!this.inverted)}toString(){return(this.inverted?`-`:``)+JSON.stringify(this.ranges)}static offset(t){return t==0?e.empty:new e(t<0?[0,-t,0]:[0,0,t])}};Tl.empty=new Tl([]);var El=class e{constructor(e,t,n=0,r=e?e.length:0){this.mirror=t,this.from=n,this.to=r,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(t=0,n=this.maps.length){return new e(this._maps,this.mirror,t,n)}appendMap(e,t){this.ownData||=(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,n=this._maps.length;t<e._maps.length;t++){let r=e.getMirror(t);this.appendMap(e._maps[t],r!=null&&r<t?n+r:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||=[],this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this._maps.length+e._maps.length;t>=0;t--){let r=e.getMirror(t);this.appendMap(e._maps[t].invert(),r!=null&&r>t?n-r-1:void 0)}}invert(){let t=new e;return t.appendMappingInverted(this),t}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this._maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let r=0;for(let n=this.from;n<this.to;n++){let i=this._maps[n].mapResult(e,t);if(i.recover!=null){let t=this.getMirror(n);if(t!=null&&t>n&&t<this.to){n=t,e=this._maps[t].recover(i.recover);continue}}r|=i.delInfo,e=i.pos}return n?e:new wl(e,r,null)}},Dl=Object.create(null),Ol=class{getMap(){return Tl.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw RangeError(`Invalid input for Step.fromJSON`);let n=Dl[t.stepType];if(!n)throw RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in Dl)throw RangeError(`Duplicate use of step JSON ID `+e);return Dl[e]=t,t.prototype.jsonID=e,t}},kl=class e{constructor(e,t){this.doc=e,this.failed=t}static ok(t){return new e(t,null)}static fail(t){return new e(null,t)}static fromReplace(t,n,r,i){try{return e.ok(t.replace(n,r,i))}catch(t){if(t instanceof tc)return e.fail(t.message);throw t}}};function Al(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let a=e.child(i);a.content.size&&(a=a.copy(Al(a.content,t,a))),a.isInline&&(a=t(a,n,i)),r.push(a)}return B.fromArray(r)}var jl=class e extends Ol{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),r=n.node(n.sharedDepth(this.to)),i=new V(Al(t.content,(e,t)=>!e.isAtom||!t.type.allowsMarkType(this.mark.type)?e:e.mark(this.mark.addToSet(e.marks)),r),t.openStart,t.openEnd);return kl.fromReplace(e,this.from,this.to,i)}invert(){return new Ml(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:`addMark`,mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`)throw RangeError(`Invalid input for AddMarkStep.fromJSON`);return new e(n.from,n.to,t.markFromJSON(n.mark))}};Ol.jsonID(`addMark`,jl);var Ml=class e extends Ol{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new V(Al(t.content,e=>e.mark(this.mark.removeFromSet(e.marks)),e),t.openStart,t.openEnd);return kl.fromReplace(e,this.from,this.to,n)}invert(){return new jl(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:`removeMark`,mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`)throw RangeError(`Invalid input for RemoveMarkStep.fromJSON`);return new e(n.from,n.to,t.markFromJSON(n.mark))}};Ol.jsonID(`removeMark`,Ml);var Nl=class e extends Ol{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return kl.fail(`No node at mark step's position`);let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return kl.fromReplace(e,this.pos,this.pos+1,new V(B.from(n),0,+!t.isLeaf))}invert(t){let n=t.nodeAt(this.pos);if(n){let t=this.mark.addToSet(n.marks);if(t.length==n.marks.length){for(let r=0;r<n.marks.length;r++)if(!n.marks[r].isInSet(t))return new e(this.pos,n.marks[r]);return new e(this.pos,this.mark)}}return new Pl(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.mark)}toJSON(){return{stepType:`addNodeMark`,pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!=`number`)throw RangeError(`Invalid input for AddNodeMarkStep.fromJSON`);return new e(n.pos,t.markFromJSON(n.mark))}};Ol.jsonID(`addNodeMark`,Nl);var Pl=class e extends Ol{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return kl.fail(`No node at mark step's position`);let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return kl.fromReplace(e,this.pos,this.pos+1,new V(B.from(n),0,+!t.isLeaf))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new Nl(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.mark)}toJSON(){return{stepType:`removeNodeMark`,pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!=`number`)throw RangeError(`Invalid input for RemoveNodeMarkStep.fromJSON`);return new e(n.pos,t.markFromJSON(n.mark))}};Ol.jsonID(`removeNodeMark`,Pl);var Fl=class e extends Ol{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&Ll(e,this.from,this.to)?kl.fail(`Structure replace would overwrite content`):kl.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Tl([this.from,this.to-this.from,this.slice.size])}invert(t){return new e(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.to,-1),r=this.from==this.to&&e.MAP_BIAS<0?n:t.mapResult(this.from,1);return r.deletedAcross&&n.deletedAcross?null:new e(r.pos,Math.max(r.pos,n.pos),this.slice,this.structure)}merge(t){if(!(t instanceof e)||t.structure||this.structure)return null;if(this.from+this.slice.size==t.from&&!this.slice.openEnd&&!t.slice.openStart){let n=this.slice.size+t.slice.size==0?V.empty:new V(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new e(this.from,this.to+(t.to-t.from),n,this.structure)}else if(t.to==this.from&&!this.slice.openStart&&!t.slice.openEnd){let n=this.slice.size+t.slice.size==0?V.empty:new V(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new e(t.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:`replace`,from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`)throw RangeError(`Invalid input for ReplaceStep.fromJSON`);return new e(n.from,n.to,V.fromJSON(t,n.slice),!!n.structure)}};Fl.MAP_BIAS=1,Ol.jsonID(`replace`,Fl);var Il=class e extends Ol{constructor(e,t,n,r,i,a,o=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=a,this.structure=o}apply(e){if(this.structure&&(Ll(e,this.from,this.gapFrom)||Ll(e,this.gapTo,this.to)))return kl.fail(`Structure gap-replace would overwrite content`);let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return kl.fail(`Gap is not a flat range`);let n=this.slice.insertAt(this.insert,t.content);return n?kl.fromReplace(e,this.from,this.to,n):kl.fail(`Content does not fit in gap`)}getMap(){return new Tl([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new e(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:t.map(this.gapFrom,-1),a=this.to==this.gapTo?r.pos:t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||a>r.pos?null:new e(n.pos,r.pos,i,a,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:`replaceAround`,from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`||typeof n.gapFrom!=`number`||typeof n.gapTo!=`number`||typeof n.insert!=`number`)throw RangeError(`Invalid input for ReplaceAroundStep.fromJSON`);return new e(n.from,n.to,n.gapFrom,n.gapTo,V.fromJSON(t,n.slice),n.insert,!!n.structure)}};Ol.jsonID(`replaceAround`,Il);function Ll(e,t,n){let r=e.resolve(t),i=n-t,a=r.depth;for(;i>0&&a>0&&r.indexAfter(a)==r.node(a).childCount;)a--,i--;if(i>0){let e=r.node(a).maybeChild(r.indexAfter(a));for(;i>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,i--}}return!1}function Rl(e,t,n,r){let i=[],a=[],o,s;e.doc.nodesBetween(t,n,(e,c,l)=>{if(!e.isInline)return;let u=e.marks;if(!r.isInSet(u)&&l.type.allowsMarkType(r.type)){let l=Math.max(c,t),d=Math.min(c+e.nodeSize,n),f=r.addToSet(u);for(let e=0;e<u.length;e++)u[e].isInSet(f)||(o&&o.to==l&&o.mark.eq(u[e])?o.to=d:i.push(o=new Ml(l,d,u[e])));s&&s.to==l?s.to=d:a.push(s=new jl(l,d,r))}}),i.forEach(t=>e.step(t)),a.forEach(t=>e.step(t))}function zl(e,t,n,r){let i=[],a=0;e.doc.nodesBetween(t,n,(e,o)=>{if(!e.isInline)return;a++;let s=null;if(r instanceof Uc){let t=e.marks,n;for(;n=r.isInSet(t);)(s||=[]).push(n),t=n.removeFromSet(t)}else r?r.isInSet(e.marks)&&(s=[r]):s=e.marks;if(s&&s.length){let r=Math.min(o+e.nodeSize,n);for(let e=0;e<s.length;e++){let n=s[e],c;for(let e=0;e<i.length;e++){let t=i[e];t.step==a-1&&n.eq(i[e].style)&&(c=t)}c?(c.to=r,c.step=a):i.push({style:n,from:Math.max(o,t),to:r,step:a})}}}),i.forEach(t=>e.step(new Ml(t.from,t.to,t.style)))}function Bl(e,t,n,r=n.contentMatch,i=!0){let a=e.doc.nodeAt(t),o=[],s=t+1;for(let t=0;t<a.childCount;t++){let c=a.child(t),l=s+c.nodeSize,u=r.matchType(c.type);if(!u)o.push(new Fl(s,l,V.empty));else{r=u;for(let t=0;t<c.marks.length;t++)n.allowsMarkType(c.marks[t].type)||e.step(new Ml(s,l,c.marks[t]));if(i&&c.isText&&n.whitespace!=`pre`){let e,t=/\r?\n|\r/g,r;for(;e=t.exec(c.text);)r||=new V(B.from(n.schema.text(` `,n.allowedMarks(c.marks))),0,0),o.push(new Fl(s+e.index,s+e.index+e[0].length,r))}}s=l}if(!r.validEnd){let t=r.fillBefore(B.empty,!0);e.replace(s,s,new V(t,0,0))}for(let t=o.length-1;t>=0;t--)e.step(o[t])}function Vl(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Hl(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth,r=0,i=0;;--n){let a=e.$from.node(n),o=e.$from.index(n)+r,s=e.$to.indexAfter(n)-i;if(n<e.depth&&a.canReplace(o,s,t))return n;if(n==0||a.type.spec.isolating||!Vl(a,o,s))break;o&&(r=1),s<a.childCount&&(i=1)}return null}function Ul(e,t,n){let{$from:r,$to:i,depth:a}=t,o=r.before(a+1),s=i.after(a+1),c=o,l=s,u=B.empty,d=0;for(let e=a,t=!1;e>n;e--)t||r.index(e)>0?(t=!0,u=B.from(r.node(e).copy(u)),d++):c--;let f=B.empty,p=0;for(let e=a,t=!1;e>n;e--)t||i.after(e+1)<i.end(e)?(t=!0,f=B.from(i.node(e).copy(f)),p++):l++;e.step(new Il(c,l,o,s,new V(u.append(f),d,p),u.size-d,!0))}function Wl(e,t,n=null,r=e){let i=Kl(e,t),a=i&&ql(r,t);return a?i.map(Gl).concat({type:t,attrs:n}).concat(a.map(Gl)):null}function Gl(e){return{type:e,attrs:null}}function Kl(e,t){let{parent:n,startIndex:r,endIndex:i}=e,a=n.contentMatchAt(r).findWrapping(t);if(!a)return null;let o=a.length?a[0]:t;return n.canReplaceWith(r,i,o)?a:null}function ql(e,t){let{parent:n,startIndex:r,endIndex:i}=e,a=n.child(r),o=t.contentMatch.findWrapping(a.type);if(!o)return null;let s=(o.length?o[o.length-1]:t).contentMatch;for(let e=r;s&&e<i;e++)s=s.matchType(n.child(e).type);return!s||!s.validEnd?null:o}function Jl(e,t,n){let r=B.empty;for(let e=n.length-1;e>=0;e--){if(r.size){let t=n[e].type.contentMatch.matchFragment(r);if(!t||!t.validEnd)throw RangeError(`Wrapper type given to Transform.wrap does not form valid content of its parent wrapper`)}r=B.from(n[e].type.create(n[e].attrs,r))}let i=t.start,a=t.end;e.step(new Il(i,a,i,a,new V(r,0,0),n.length,!0))}function Yl(e,t,n,r,i){if(!r.isTextblock)throw RangeError(`Type given to setBlockType should be a textblock`);let a=e.steps.length;e.doc.nodesBetween(t,n,(t,n)=>{let o=typeof i==`function`?i(t):i;if(t.isTextblock&&!t.hasMarkup(r,o)&&Ql(e.doc,e.mapping.slice(a).map(n),r)){let i=null;if(r.schema.linebreakReplacement){let e=r.whitespace==`pre`,t=!!r.contentMatch.matchType(r.schema.linebreakReplacement);e&&!t?i=!1:!e&&t&&(i=!0)}i===!1&&Zl(e,t,n,a),Bl(e,e.mapping.slice(a).map(n,1),r,void 0,i===null);let s=e.mapping.slice(a),c=s.map(n,1),l=s.map(n+t.nodeSize,1);return e.step(new Il(c,l,c+1,l-1,new V(B.from(r.create(o,null,t.marks)),0,0),1,!0)),i===!0&&Xl(e,t,n,a),!1}})}function Xl(e,t,n,r){t.forEach((i,a)=>{if(i.isText){let o,s=/\r?\n|\r/g;for(;o=s.exec(i.text);){let i=e.mapping.slice(r).map(n+1+a+o.index);e.replaceWith(i,i+1,t.type.schema.linebreakReplacement.create())}}})}function Zl(e,t,n,r){t.forEach((i,a)=>{if(i.type==i.type.schema.linebreakReplacement){let i=e.mapping.slice(r).map(n+1+a);e.replaceWith(i,i+1,t.type.schema.text(`
|
|
63
|
+
`))}})}function Ql(e,t,n){let r=e.resolve(t),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function $l(e,t,n,r,i){let a=e.doc.nodeAt(t);if(!a)throw RangeError(`No node at given position`);n||=a.type;let o=n.create(r,null,i||a.marks);if(a.isLeaf)return e.replaceWith(t,t+a.nodeSize,o);if(!n.validContent(a.content))throw RangeError(`Invalid content for node type `+n.name);e.step(new Il(t,t+a.nodeSize,t+1,t+a.nodeSize-1,new V(B.from(o),0,0),1,!0))}function eu(e,t,n=1,r){let i=e.resolve(t),a=i.depth-n,o=r&&r[r.length-1]||i.parent;if(a<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let e=i.depth-1,t=n-2;e>a;e--,t--){let n=i.node(e),a=i.index(e);if(n.type.spec.isolating)return!1;let o=n.content.cutByIndex(a,n.childCount),s=r&&r[t+1];s&&(o=o.replaceChild(0,s.type.create(s.attrs)));let c=r&&r[t]||n;if(!n.canReplace(a+1,n.childCount)||!c.type.validContent(o))return!1}let s=i.indexAfter(a),c=r&&r[0];return i.node(a).canReplaceWith(s,s,c?c.type:i.node(a+1).type)}function tu(e,t,n=1,r){let i=e.doc.resolve(t),a=B.empty,o=B.empty;for(let e=i.depth,t=i.depth-n,s=n-1;e>t;e--,s--){a=B.from(i.node(e).copy(a));let t=r&&r[s];o=B.from(t?t.type.create(t.attrs,o):i.node(e).copy(o))}e.step(new Fl(t,t,new V(a.append(o),n,n),!0))}function nu(e,t){let n=e.resolve(t),r=n.index();return iu(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function ru(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let i=0;i<t.childCount;i++){let a=t.child(i),o=a.type==r?e.type.schema.nodes.text:a.type;if(n=n.matchType(o),!n||!e.type.allowsMarks(a.marks))return!1}return n.validEnd}function iu(e,t){return!!(e&&t&&!e.isLeaf&&ru(e,t))}function au(e,t,n=-1){let r=e.resolve(t);for(let e=r.depth;;e--){let i,a,o=r.index(e);if(e==r.depth?(i=r.nodeBefore,a=r.nodeAfter):n>0?(i=r.node(e+1),o++,a=r.node(e).maybeChild(o)):(i=r.node(e).maybeChild(o-1),a=r.node(e+1)),i&&!i.isTextblock&&iu(i,a)&&r.node(e).canReplace(o,o+1))return t;if(e==0)break;t=n<0?r.before(e):r.after(e)}}function ou(e,t,n){let r=null,{linebreakReplacement:i}=e.doc.type.schema,a=e.doc.resolve(t-n),o=a.node().type;if(i&&o.inlineContent){let e=o.whitespace==`pre`,t=!!o.contentMatch.matchType(i);e&&!t?r=!1:!e&&t&&(r=!0)}let s=e.steps.length;if(r===!1){let r=e.doc.resolve(t+n);Zl(e,r.node(),r.before(),s)}o.inlineContent&&Bl(e,t+n-1,o,a.node().contentMatchAt(a.index()),r==null);let c=e.mapping.slice(s),l=c.map(t-n);if(e.step(new Fl(l,c.map(t+n,-1),V.empty,!0)),r===!0){let t=e.doc.resolve(l);Xl(e,t.node(),t.before(),e.steps.length)}return e}function su(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let e=r.depth-1;e>=0;e--){let t=r.index(e);if(r.node(e).canReplaceWith(t,t,n))return r.before(e+1);if(t>0)return null}if(r.parentOffset==r.parent.content.size)for(let e=r.depth-1;e>=0;e--){let t=r.indexAfter(e);if(r.node(e).canReplaceWith(t,t,n))return r.after(e+1);if(t<r.node(e).childCount)return null}return null}function cu(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let e=0;e<n.openStart;e++)i=i.firstChild.content;for(let e=1;e<=(n.openStart==0&&n.size?2:1);e++)for(let t=r.depth;t>=0;t--){let n=t==r.depth?0:r.pos<=(r.start(t+1)+r.end(t+1))/2?-1:1,a=r.index(t)+ +(n>0),o=r.node(t),s=!1;if(e==1)s=o.canReplace(a,a,i);else{let e=o.contentMatchAt(a).findWrapping(i.firstChild.type);s=e&&o.canReplaceWith(a,a,e[0])}if(s)return n==0?r.pos:n<0?r.before(t+1):r.after(t+1)}return null}function lu(e,t,n=t,r=V.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),a=e.resolve(n);return uu(i,a,r)?new Fl(t,n,r):new du(i,a,r).fit()}function uu(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}var du=class{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=B.empty;for(let t=0;t<=e.depth;t++){let n=e.node(t);this.frontier.push({type:n.type,match:n.contentMatchAt(e.indexAfter(t))})}for(let t=e.depth;t>0;t--)this.placed=B.from(e.node(t).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,r=this.close(e<0?this.$to:n.doc.resolve(e));if(!r)return null;let i=this.placed,a=n.depth,o=r.depth;for(;a&&o&&i.childCount==1;)i=i.firstChild.content,a--,o--;let s=new V(i,a,o);return e>-1?new Il(n.pos,e,this.$to.pos,this.$to.end(),s,t):s.size||n.pos!=this.$to.pos?new Fl(n.pos,r.pos,s):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<e;n++){let i=t.firstChild;if(t.childCount>1&&(r=0),i.type.spec.isolating&&r<=n){e=n;break}t=i.content}for(let t=1;t<=2;t++)for(let n=t==1?e:this.unplaced.openStart;n>=0;n--){let e,r=null;n?(r=mu(this.unplaced.content,n-1).firstChild,e=r.content):e=this.unplaced.content;let i=e.firstChild;for(let e=this.depth;e>=0;e--){let{type:a,match:o}=this.frontier[e],s,c=null;if(t==1&&(i?o.matchType(i.type)||(c=o.fillBefore(B.from(i),!1)):r&&a.compatibleContent(r.type)))return{sliceDepth:n,frontierDepth:e,parent:r,inject:c};if(t==2&&i&&(s=o.findWrapping(i.type)))return{sliceDepth:n,frontierDepth:e,parent:r,wrap:s};if(r&&o.matchType(r.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=mu(e,t);return!r.childCount||r.firstChild.isLeaf?!1:(this.unplaced=new V(e,t+1,Math.max(n,r.size+t>=e.size-n?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=mu(e,t);if(r.childCount<=1&&t>0){let i=e.size-t<=t+r.size;this.unplaced=new V(fu(e,t-1,1),t-1,i?t-1:n)}else this.unplaced=new V(fu(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:r,wrap:i}){for(;this.depth>t;)this.closeFrontierNode();if(i)for(let e=0;e<i.length;e++)this.openFrontierNode(i[e]);let a=this.unplaced,o=n?n.content:a.content,s=a.openStart-e,c=0,l=[],{match:u,type:d}=this.frontier[t];if(r){for(let e=0;e<r.childCount;e++)l.push(r.child(e));u=u.matchFragment(r)}let f=o.size+e-(a.content.size-a.openEnd);for(;c<o.childCount;){let e=o.child(c),t=u.matchType(e.type);if(!t)break;c++,(c>1||s==0||e.content.size)&&(u=t,l.push(hu(e.mark(d.allowedMarks(e.marks)),c==1?s:0,c==o.childCount?f:-1)))}let p=c==o.childCount;p||(f=-1),this.placed=pu(this.placed,t,B.from(l)),this.frontier[t].match=u,p&&f<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let e=0,t=o;e<f;e++){let e=t.lastChild;this.frontier.push({type:e.type,match:e.contentMatchAt(e.childCount)}),t=e.content}this.unplaced=p?e==0?V.empty:new V(fu(a.content,e-1,1),e-1,f<0?a.openEnd:e-1):new V(fu(a.content,e,c),a.openStart,a.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!gu(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(e){scan:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),a=gu(e,t,r,n,i);if(a){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],i=gu(e,n,r,t,!0);if(!i||i.childCount)continue scan}return{depth:t,fit:a,move:i?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=pu(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let t=e.node(n),r=t.type.contentMatch.fillBefore(t.content,!0,e.index(n));this.openFrontierNode(t.type,t.attrs,r)}return e}openFrontierNode(e,t=null,n){let r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=pu(this.placed,this.depth,B.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(B.empty,!0);e.childCount&&(this.placed=pu(this.placed,this.frontier.length,e))}};function fu(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(fu(e.firstChild.content,t-1,n)))}function pu(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(pu(e.lastChild.content,t-1,n)))}function mu(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function hu(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,hu(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(B.empty,!0)))),e.copy(r)}function gu(e,t,n,r,i){let a=e.node(t),o=i?e.indexAfter(t):e.index(t);if(o==a.childCount&&!n.compatibleContent(a.type))return null;let s=r.fillBefore(a.content,!0,o);return s&&!_u(n,a.content,o)?s:null}function _u(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}function vu(e){return e.spec.defining||e.spec.definingForContent}function yu(e,t,n,r){if(!r.size)return e.deleteRange(t,n);let i=e.doc.resolve(t),a=e.doc.resolve(n);if(uu(i,a,r))return e.step(new Fl(t,n,r));let o=Cu(i,a);o[o.length-1]==0&&o.pop();let s=-(i.depth+1);o.unshift(s);for(let e=i.depth,t=i.pos-1;e>0;e--,t--){let n=i.node(e).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;o.indexOf(e)>-1?s=e:i.before(e)==t&&o.splice(1,0,-e)}let c=o.indexOf(s),l=[],u=r.openStart;for(let e=r.content,t=0;;t++){let n=e.firstChild;if(l.push(n),t==r.openStart)break;e=n.content}for(let e=u-1;e>=0;e--){let t=l[e],n=vu(t.type);if(n&&!t.sameMarkup(i.node(Math.abs(s)-1)))u=e;else if(n||!t.type.isTextblock)break}for(let t=r.openStart;t>=0;t--){let s=(t+u+1)%(r.openStart+1),d=l[s];if(d)for(let t=0;t<o.length;t++){let l=o[(t+c)%o.length],u=!0;l<0&&(u=!1,l=-l);let f=i.node(l-1),p=i.index(l-1);if(f.canReplaceWith(p,p,d.type,d.marks))return e.replace(i.before(l),u?a.after(l):n,new V(bu(r.content,0,r.openStart,s),s,r.openEnd))}}let d=e.steps.length;for(let s=o.length-1;s>=0&&(e.replace(t,n,r),!(e.steps.length>d));s--){let e=o[s];e<0||(t=i.before(e),n=a.after(e))}}function bu(e,t,n,r,i){if(t<n){let i=e.firstChild;e=e.replaceChild(0,i.copy(bu(i.content,t+1,n,r,i)))}if(t>r){let t=i.contentMatchAt(0),n=t.fillBefore(e).append(e);e=n.append(t.matchFragment(n).fillBefore(B.empty,!0))}return e}function xu(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let i=su(e.doc,t,r.type);i!=null&&(t=n=i)}e.replaceRange(t,n,new V(B.from(r),0,0))}function Su(e,t,n){let r=e.doc.resolve(t),i=e.doc.resolve(n);if(r.parent.isTextblock&&i.parent.isTextblock&&r.start()!=i.start()&&r.parentOffset==0&&i.parentOffset==0){let a=r.sharedDepth(n),o=!1;for(let e=r.depth;e>a;e--)r.node(e).type.spec.isolating&&(o=!0);for(let e=i.depth;e>a;e--)i.node(e).type.spec.isolating&&(o=!0);if(!o){for(let e=r.depth;e>0&&t==r.start(e);e--)t=r.before(e);for(let e=i.depth;e>0&&n==i.start(e);e--)n=i.before(e);r=e.doc.resolve(t),i=e.doc.resolve(n)}}let a=Cu(r,i);for(let t=0;t<a.length;t++){let n=a[t],o=t==a.length-1;if(o&&n==0||r.node(n).type.contentMatch.validEnd)return e.delete(r.start(n),i.end(n));if(n>0&&(o||r.node(n-1).canReplace(r.index(n-1),i.indexAfter(n-1))))return e.delete(r.before(n),i.after(n))}for(let a=1;a<=r.depth&&a<=i.depth;a++)if(t-r.start(a)==r.depth-a&&n>r.end(a)&&i.end(a)-n!=i.depth-a&&r.start(a-1)==i.start(a-1)&&r.node(a-1).canReplace(r.index(a-1),i.index(a-1)))return e.delete(r.before(a),n);e.delete(t,n)}function Cu(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let i=r;i>=0;i--){let r=e.start(i);if(r<e.pos-(e.depth-i)||t.end(i)>t.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;(r==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==r-1)&&n.push(i)}return n}var wu=class e extends Ol{constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return kl.fail(`No node at attribute step's position`);let n=Object.create(null);for(let e in t.attrs)n[e]=t.attrs[e];n[this.attr]=this.value;let r=t.type.create(n,null,t.marks);return kl.fromReplace(e,this.pos,this.pos+1,new V(B.from(r),0,+!t.isLeaf))}getMap(){return Tl.empty}invert(t){return new e(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.attr,this.value)}toJSON(){return{stepType:`attr`,pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!=`number`||typeof n.attr!=`string`)throw RangeError(`Invalid input for AttrStep.fromJSON`);return new e(n.pos,n.attr,n.value)}};Ol.jsonID(`attr`,wu);var Tu=class e extends Ol{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let n in e.attrs)t[n]=e.attrs[n];t[this.attr]=this.value;let n=e.type.create(t,e.content,e.marks);return kl.ok(n)}getMap(){return Tl.empty}invert(t){return new e(this.attr,t.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:`docAttr`,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!=`string`)throw RangeError(`Invalid input for DocAttrStep.fromJSON`);return new e(n.attr,n.value)}};Ol.jsonID(`docAttr`,Tu);var Eu=class extends Error{};Eu=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n},Eu.prototype=Object.create(Error.prototype),Eu.prototype.constructor=Eu,Eu.prototype.name=`TransformError`;var Du=class{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new El}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new Eu(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,t=-1e9;for(let n=0;n<this.mapping.maps.length;n++){let r=this.mapping.maps[n];n&&(e=r.map(e,1),t=r.map(t,-1)),r.forEach((n,r,i,a)=>{e=Math.min(e,i),t=Math.max(t,a)})}return e==1e9?null:{from:e,to:t}}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=V.empty){let r=lu(this.doc,e,t,n);return r&&this.step(r),this}replaceWith(e,t,n){return this.replace(e,t,new V(B.from(n),0,0))}delete(e,t){return this.replace(e,t,V.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return yu(this,e,t,n),this}replaceRangeWith(e,t,n){return xu(this,e,t,n),this}deleteRange(e,t){return Su(this,e,t),this}lift(e,t){return Ul(this,e,t),this}join(e,t=1){return ou(this,e,t),this}wrap(e,t){return Jl(this,e,t),this}setBlockType(e,t=e,n,r=null){return Yl(this,e,t,n,r),this}setNodeMarkup(e,t,n=null,r){return $l(this,e,t,n,r),this}setNodeAttribute(e,t,n){return this.step(new wu(e,t,n)),this}setDocAttribute(e,t){return this.step(new Tu(e,t)),this}addNodeMark(e,t){return this.step(new Nl(e,t)),this}removeNodeMark(e,t){let n=this.doc.nodeAt(e);if(!n)throw RangeError(`No node at position `+e);if(t instanceof ec)t.isInSet(n.marks)&&this.step(new Pl(e,t));else{let r=n.marks,i,a=[];for(;i=t.isInSet(r);)a.push(new Pl(e,i)),r=i.removeFromSet(r);for(let e=a.length-1;e>=0;e--)this.step(a[e])}return this}split(e,t=1,n){return tu(this,e,t,n),this}addMark(e,t,n){return Rl(this,e,t,n),this}removeMark(e,t,n){return zl(this,e,t,n),this}clearIncompatible(e,t,n){return Bl(this,e,t,n),this}},Ou=Object.create(null),ku=class{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new Au(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=V.empty){let n=t.content.lastChild,r=null;for(let e=0;e<t.openEnd;e++)r=n,n=n.lastChild;let i=e.steps.length,a=this.ranges;for(let o=0;o<a.length;o++){let{$from:s,$to:c}=a[o],l=e.mapping.slice(i);e.replaceRange(l.map(s.pos),l.map(c.pos),o?V.empty:t),o==0&&Bu(e,i,(n?n.isInline:r&&r.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:a,$to:o}=r[i],s=e.mapping.slice(n),c=s.map(a.pos),l=s.map(o.pos);i?e.deleteRange(c,l):(e.replaceRangeWith(c,l,t),Bu(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new Nu(e):zu(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let r=e.depth-1;r>=0;r--){let i=t<0?zu(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):zu(e.node(0),e.node(r),e.after(r+1),e.index(r)+1,t,n);if(i)return i}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new Lu(e.node(0))}static atStart(e){return zu(e,e,0,0,1)||new Lu(e)}static atEnd(e){return zu(e,e,e.content.size,e.childCount,-1)||new Lu(e)}static fromJSON(e,t){if(!t||!t.type)throw RangeError(`Invalid input for Selection.fromJSON`);let n=Ou[t.type];if(!n)throw RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in Ou)throw RangeError(`Duplicate use of selection JSON ID `+e);return Ou[e]=t,t.prototype.jsonID=e,t}getBookmark(){return Nu.between(this.$anchor,this.$head).getBookmark()}};ku.prototype.visible=!0;var Au=class{constructor(e,t){this.$from=e,this.$to=t}},ju=!1;function Mu(e){!ju&&!e.parent.inlineContent&&(ju=!0,console.warn(`TextSelection endpoint not pointing into a node with inline content (`+e.parent.type.name+`)`))}var Nu=class e extends ku{constructor(e,t=e){Mu(e),Mu(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return ku.near(r);let i=t.resolve(n.map(this.anchor));return new e(i.parent.inlineContent?i:r,r)}replace(e,t=V.empty){if(super.replace(e,t),t==V.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(t){return t instanceof e&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new Pu(this.anchor,this.head)}toJSON(){return{type:`text`,anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!=`number`||typeof n.head!=`number`)throw RangeError(`Invalid input for TextSelection.fromJSON`);return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(t,n,r){let i=t.pos-n.pos;if((!r||i)&&(r=i>=0?1:-1),!n.parent.inlineContent){let e=ku.findFrom(n,r,!0)||ku.findFrom(n,-r,!0);if(e)n=e.$head;else return ku.near(n,r)}return t.parent.inlineContent||(i==0?t=n:(t=(ku.findFrom(t,-r,!0)||ku.findFrom(t,r,!0)).$anchor,t.pos<n.pos!=i<0&&(t=n))),new e(t,n)}};ku.jsonID(`text`,Nu);var Pu=class e{constructor(e,t){this.anchor=e,this.head=t}map(t){return new e(t.map(this.anchor),t.map(this.head))}resolve(e){return Nu.between(e.resolve(this.anchor),e.resolve(this.head))}},Fu=class e extends ku{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(t,n){let{deleted:r,pos:i}=n.mapResult(this.anchor),a=t.resolve(i);return r?ku.near(a):new e(a)}content(){return new V(B.from(this.node),0,0)}eq(t){return t instanceof e&&t.anchor==this.anchor}toJSON(){return{type:`node`,anchor:this.anchor}}getBookmark(){return new Iu(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!=`number`)throw RangeError(`Invalid input for NodeSelection.fromJSON`);return new e(t.resolve(n.anchor))}static create(t,n){return new e(t.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}};Fu.prototype.visible=!1,ku.jsonID(`node`,Fu);var Iu=class e{constructor(e){this.anchor=e}map(t){let{deleted:n,pos:r}=t.mapResult(this.anchor);return n?new Pu(r,r):new e(r)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&Fu.isSelectable(n)?new Fu(t):ku.near(t)}},Lu=class e extends ku{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=V.empty){if(t==V.empty){e.delete(0,e.doc.content.size);let t=ku.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,t)}toJSON(){return{type:`all`}}static fromJSON(t){return new e(t)}map(t){return new e(t)}eq(t){return t instanceof e}getBookmark(){return Ru}};ku.jsonID(`all`,Lu);var Ru={map(){return this},resolve(e){return new Lu(e)}};function zu(e,t,n,r,i,a=!1){if(t.inlineContent)return Nu.create(e,n);for(let o=r-(i>0?0:1);i>0?o<t.childCount:o>=0;o+=i){let r=t.child(o);if(!r.isAtom){let t=zu(e,r,n+i,i<0?r.childCount:0,i,a);if(t)return t}else if(!a&&Fu.isSelectable(r))return Fu.create(e,n-(i<0?r.nodeSize:0));n+=r.nodeSize*i}return null}function Bu(e,t,n){let r=e.steps.length-1;if(r<t)return;let i=e.steps[r];if(!(i instanceof Fl||i instanceof Il))return;let a=e.mapping.maps[r],o;a.forEach((e,t,n,r)=>{o??=r}),e.setSelection(ku.near(e.doc.resolve(o),n))}var Vu=1,Hu=2,Uu=4,Wu=class extends Du{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw RangeError(`Selection passed to setSelection must point at the current document`);return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|Vu)&~Hu,this.storedMarks=null,this}get selectionSet(){return(this.updated&Vu)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Hu,this}ensureMarks(e){return ec.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Hu)>0}addStep(e,t){super.addStep(e,t),this.updated&=~Hu,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||ec.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let r=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(n??=t,!e)return this.deleteRange(t,n);let i=this.storedMarks;if(!i){let e=this.doc.resolve(t);i=n==t?e.marks():e.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,i)),!this.selection.empty&&this.selection.to==t+e.length&&this.setSelection(ku.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e==`string`?e:e.key]=t,this}getMeta(e){return this.meta[typeof e==`string`?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=Uu,this}get scrolledIntoView(){return(this.updated&Uu)>0}};function Gu(e,t){return!t||!e?e:e.bind(t)}var Ku=class{constructor(e,t,n){this.name=e,this.init=Gu(t.init,n),this.apply=Gu(t.apply,n)}},qu=[new Ku(`doc`,{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new Ku(`selection`,{init(e,t){return e.selection||ku.atStart(t.doc)},apply(e){return e.selection}}),new Ku(`storedMarks`,{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new Ku(`scrollToSelection`,{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})],Ju=class{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=qu.slice(),t&&t.forEach(e=>{if(this.pluginsByKey[e.key])throw RangeError(`Adding different instances of a keyed plugin (`+e.key+`)`);this.plugins.push(e),this.pluginsByKey[e.key]=e,e.spec.state&&this.fields.push(new Ku(e.key,e.spec.state,e))})}},Yu=class e{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=t){let t=this.config.plugins[n];if(t.spec.filterTransaction&&!t.spec.filterTransaction.call(t,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],n=this.applyInner(e),r=null;for(;;){let i=!1;for(let a=0;a<this.config.plugins.length;a++){let o=this.config.plugins[a];if(o.spec.appendTransaction){let s=r?r[a].n:0,c=r?r[a].state:this,l=s<t.length&&o.spec.appendTransaction.call(o,s?t.slice(s):t,c,n);if(l&&n.filterTransaction(l,a)){if(l.setMeta(`appendedTransaction`,e),!r){r=[];for(let e=0;e<this.config.plugins.length;e++)r.push(e<a?{state:n,n:t.length}:{state:this,n:0})}t.push(l),n=n.applyInner(l),i=!0}r&&(r[a]={state:n,n:t.length})}}if(!i)return{state:n,transactions:t}}}applyInner(t){if(!t.before.eq(this.doc))throw RangeError(`Applying a mismatched transaction`);let n=new e(this.config),r=this.config.fields;for(let e=0;e<r.length;e++){let i=r[e];n[i.name]=i.apply(t,this[i.name],this,n)}return n}get tr(){return new Wu(this)}static create(t){let n=new Ju(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new e(n);for(let e=0;e<n.fields.length;e++)r[n.fields[e].name]=n.fields[e].init(t,r);return r}reconfigure(t){let n=new Ju(this.schema,t.plugins),r=n.fields,i=new e(n);for(let e=0;e<r.length;e++){let n=r[e].name;i[n]=this.hasOwnProperty(n)?this[n]:r[e].init(t,i)}return i}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(e=>e.toJSON())),e&&typeof e==`object`)for(let n in e){if(n==`doc`||n==`selection`)throw RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],i=r.spec.state;i&&i.toJSON&&(t[n]=i.toJSON.call(r,this[r.key]))}return t}static fromJSON(t,n,r){if(!n)throw RangeError(`Invalid input for EditorState.fromJSON`);if(!t.schema)throw RangeError(`Required config field 'schema' missing`);let i=new Ju(t.schema,t.plugins),a=new e(i);return i.fields.forEach(e=>{if(e.name==`doc`)a.doc=bc.fromJSON(t.schema,n.doc);else if(e.name==`selection`)a.selection=ku.fromJSON(a.doc,n.selection);else if(e.name==`storedMarks`)n.storedMarks&&(a.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let i in r){let o=r[i],s=o.spec.state;if(o.key==e.name&&s&&s.fromJSON&&Object.prototype.hasOwnProperty.call(n,i)){a[e.name]=s.fromJSON.call(o,t,n[i],a);return}}a[e.name]=e.init(t,a)}}),a}};function Xu(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):r==`handleDOMEvents`&&(i=Xu(i,t,{})),n[r]=i}return n}var Zu=class{constructor(e){this.spec=e,this.props={},e.props&&Xu(e.props,this,this.props),this.key=e.key?e.key.key:$u(`plugin`)}getState(e){return e[this.key]}},Qu=Object.create(null);function $u(e){return e in Qu?e+`$`+ ++Qu[e]:(Qu[e]=0,e+`$`)}var ed=class{constructor(e=`key`){this.key=$u(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}},td=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function nd(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock(`backward`,e):n.parentOffset>0)?null:n}var rd=(e,t,n)=>{let r=nd(e,n);if(!r)return!1;let i=ld(r);if(!i){let n=r.blockRange(),i=n&&Hl(n);return i==null?!1:(t&&t(e.tr.lift(n,i).scrollIntoView()),!0)}let a=i.nodeBefore;if(Cd(e,i,t,-1))return!0;if(r.parent.content.size==0&&(sd(a,`end`)||Fu.isSelectable(a)))for(let n=r.depth;;n--){let o=lu(e.doc,r.before(n),r.after(n),V.empty);if(o&&o.slice.size<o.to-o.from){if(t){let n=e.tr.step(o);n.setSelection(sd(a,`end`)?ku.findFrom(n.doc.resolve(n.mapping.map(i.pos,-1)),-1):Fu.create(n.doc,i.pos-a.nodeSize)),t(n.scrollIntoView())}return!0}if(n==1||r.node(n-1).childCount>1)break}return a.isAtom&&i.depth==r.depth-1?(t&&t(e.tr.delete(i.pos-a.nodeSize,i.pos).scrollIntoView()),!0):!1},id=(e,t,n)=>{let r=nd(e,n);if(!r)return!1;let i=ld(r);return i?od(e,i,t):!1},ad=(e,t,n)=>{let r=ud(e,n);if(!r)return!1;let i=pd(r);return i?od(e,i,t):!1};function od(e,t,n){let r=t.nodeBefore,i=t.pos-1;for(;!r.isTextblock;i--){if(r.type.spec.isolating)return!1;let e=r.lastChild;if(!e)return!1;r=e}let a=t.nodeAfter,o=t.pos+1;for(;!a.isTextblock;o++){if(a.type.spec.isolating)return!1;let e=a.firstChild;if(!e)return!1;a=e}let s=lu(e.doc,i,o,V.empty);if(!s||s.from!=i||s instanceof Fl&&s.slice.size>=o-i)return!1;if(n){let t=e.tr.step(s);t.setSelection(Nu.create(t.doc,i)),n(t.scrollIntoView())}return!0}function sd(e,t,n=!1){for(let r=e;r;r=t==`start`?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}var cd=(e,t,n)=>{let{$head:r,empty:i}=e.selection,a=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock(`backward`,e):r.parentOffset>0)return!1;a=ld(r)}let o=a&&a.nodeBefore;return!o||!Fu.isSelectable(o)?!1:(t&&t(e.tr.setSelection(Fu.create(e.doc,a.pos-o.nodeSize)).scrollIntoView()),!0)};function ld(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function ud(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock(`forward`,e):n.parentOffset<n.parent.content.size)?null:n}var dd=(e,t,n)=>{let r=ud(e,n);if(!r)return!1;let i=pd(r);if(!i)return!1;let a=i.nodeAfter;if(Cd(e,i,t,1))return!0;if(r.parent.content.size==0&&(sd(a,`start`)||Fu.isSelectable(a))){let n=lu(e.doc,r.before(),r.after(),V.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(sd(a,`start`)?ku.findFrom(r.doc.resolve(r.mapping.map(i.pos)),1):Fu.create(r.doc,r.mapping.map(i.pos))),t(r.scrollIntoView())}return!0}}return a.isAtom&&i.depth==r.depth-1?(t&&t(e.tr.delete(i.pos,i.pos+a.nodeSize).scrollIntoView()),!0):!1},fd=(e,t,n)=>{let{$head:r,empty:i}=e.selection,a=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock(`forward`,e):r.parentOffset<r.parent.content.size)return!1;a=pd(r)}let o=a&&a.nodeAfter;return!o||!Fu.isSelectable(o)?!1:(t&&t(e.tr.setSelection(Fu.create(e.doc,a.pos)).scrollIntoView()),!0)};function pd(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}var md=(e,t)=>{let n=e.selection,r=n instanceof Fu,i;if(r){if(n.node.isTextblock||!nu(e.doc,n.from))return!1;i=n.from}else if(i=au(e.doc,n.from,-1),i==null)return!1;if(t){let n=e.tr.join(i);r&&n.setSelection(Fu.create(n.doc,i-e.doc.resolve(i).nodeBefore.nodeSize)),t(n.scrollIntoView())}return!0},hd=(e,t)=>{let n=e.selection,r;if(n instanceof Fu){if(n.node.isTextblock||!nu(e.doc,n.to))return!1;r=n.to}else if(r=au(e.doc,n.to,1),r==null)return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0},gd=(e,t)=>{let{$from:n,$to:r}=e.selection,i=n.blockRange(r),a=i&&Hl(i);return a==null?!1:(t&&t(e.tr.lift(i,a).scrollIntoView()),!0)},_d=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(`
|
|
64
|
+
`).scrollIntoView()),!0)};function vd(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}var yd=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),a=n.indexAfter(-1),o=vd(i.contentMatchAt(a));if(!o||!i.canReplaceWith(a,a,o))return!1;if(t){let r=n.after(),i=e.tr.replaceWith(r,r,o.createAndFill());i.setSelection(ku.near(i.doc.resolve(r),1)),t(i.scrollIntoView())}return!0},bd=(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof Lu||r.parent.inlineContent||i.parent.inlineContent)return!1;let a=vd(i.parent.contentMatchAt(i.indexAfter()));if(!a||!a.isTextblock)return!1;if(t){let n=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,o=e.tr.insert(n,a.createAndFill());o.setSelection(Nu.create(o.doc,n+1)),t(o.scrollIntoView())}return!0},xd=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let r=n.before();if(eu(e.doc,r))return t&&t(e.tr.split(r).scrollIntoView()),!0}let r=n.blockRange(),i=r&&Hl(r);return i==null?!1:(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)};function Sd(e){return(t,n)=>{let{$from:r,$to:i}=t.selection;if(t.selection instanceof Fu&&t.selection.node.isBlock)return!r.parentOffset||!eu(t.doc,r.pos)?!1:(n&&n(t.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let a=[],o,s,c=!1,l=!1;for(let t=r.depth;;t--)if(r.node(t).isBlock){c=r.end(t)==r.pos+(r.depth-t),l=r.start(t)==r.pos-(r.depth-t),s=vd(r.node(t-1).contentMatchAt(r.indexAfter(t-1)));let n=e&&e(i.parent,c,r);a.unshift(n||(c&&s?{type:s}:null)),o=t;break}else{if(t==1)return!1;a.unshift(null)}let u=t.tr;(t.selection instanceof Nu||t.selection instanceof Lu)&&u.deleteSelection();let d=u.mapping.map(r.pos),f=eu(u.doc,d,a.length,a);if(f||=(a[0]=s?{type:s}:null,eu(u.doc,d,a.length,a)),!f)return!1;if(u.split(d,a.length,a),!c&&l&&r.node(o).type!=s){let e=u.mapping.map(r.before(o)),t=u.doc.resolve(e);s&&r.node(o-1).canReplaceWith(t.index(),t.index()+1,s)&&u.setNodeMarkup(u.mapping.map(r.before(o)),s)}return n&&n(u.scrollIntoView()),!0}}var eee=Sd(),tee=(e,t)=>{let{$from:n,to:r}=e.selection,i,a=n.sharedDepth(r);return a==0?!1:(i=n.before(a),t&&t(e.tr.setSelection(Fu.create(e.doc,i))),!0)},nee=(e,t)=>(t&&t(e.tr.setSelection(new Lu(e.doc))),!0);function ree(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,a=t.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&t.parent.canReplace(a-1,a)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(a,a+1)||!(i.isTextblock||nu(e.doc,t.pos))?!1:(n&&n(e.tr.join(t.pos).scrollIntoView()),!0)}function Cd(e,t,n,r){let i=t.nodeBefore,a=t.nodeAfter,o,s,c=i.type.spec.isolating||a.type.spec.isolating;if(!c&&ree(e,t,n))return!0;let l=!c&&t.parent.canReplace(t.index(),t.index()+1);if(l&&(o=(s=i.contentMatchAt(i.childCount)).findWrapping(a.type))&&s.matchType(o[0]||a.type).validEnd){if(n){let r=t.pos+a.nodeSize,s=B.empty;for(let e=o.length-1;e>=0;e--)s=B.from(o[e].create(null,s));s=B.from(i.copy(s));let c=e.tr.step(new Il(t.pos-1,r,t.pos,r,new V(s,1,0),o.length,!0)),l=c.doc.resolve(r+2*o.length);l.nodeAfter&&l.nodeAfter.type==i.type&&nu(c.doc,l.pos)&&c.join(l.pos),n(c.scrollIntoView())}return!0}let u=a.type.spec.isolating||r>0&&c?null:ku.findFrom(t,1),d=u&&u.$from.blockRange(u.$to),f=d&&Hl(d);if(f!=null&&f>=t.depth)return n&&n(e.tr.lift(d,f).scrollIntoView()),!0;if(l&&sd(a,`start`,!0)&&sd(i,`end`)){let r=i,o=[];for(;o.push(r),!r.isTextblock;)r=r.lastChild;let s=a,c=1;for(;!s.isTextblock;s=s.firstChild)c++;if(r.canReplace(r.childCount,r.childCount,s.content)){if(n){let r=B.empty;for(let e=o.length-1;e>=0;e--)r=B.from(o[e].copy(r));n(e.tr.step(new Il(t.pos-o.length,t.pos+a.nodeSize,t.pos+c,t.pos+a.nodeSize-c,new V(r,o.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function wd(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,a=i.depth;for(;i.node(a).isInline;){if(!a)return!1;a--}return i.node(a).isTextblock?(n&&n(t.tr.setSelection(Nu.create(t.doc,e<0?i.start(a):i.end(a)))),!0):!1}}var Td=wd(-1),Ed=wd(1);function Dd(e,t=null){return function(n,r){let{$from:i,$to:a}=n.selection,o=i.blockRange(a),s=o&&Wl(o,e,t);return s?(r&&r(n.tr.wrap(o,s).scrollIntoView()),!0):!1}}function Od(e,t=null){return function(n,r){let i=!1;for(let r=0;r<n.selection.ranges.length&&!i;r++){let{$from:{pos:a},$to:{pos:o}}=n.selection.ranges[r];n.doc.nodesBetween(a,o,(r,a)=>{if(i)return!1;if(!(!r.isTextblock||r.hasMarkup(e,t)))if(r.type==e)i=!0;else{let t=n.doc.resolve(a),r=t.index();i=t.parent.canReplaceWith(r,r+1,e)}})}if(!i)return!1;if(r){let i=n.tr;for(let r=0;r<n.selection.ranges.length;r++){let{$from:{pos:a},$to:{pos:o}}=n.selection.ranges[r];i.setBlockType(a,o,e,t)}r(i.scrollIntoView())}return!0}}function kd(...e){return function(t,n,r){for(let i=0;i<e.length;i++)if(e[i](t,n,r))return!0;return!1}}var Ad=kd(td,rd,cd),jd=kd(td,dd,fd),Md={Enter:kd(_d,bd,xd,eee),"Mod-Enter":yd,Backspace:Ad,"Mod-Backspace":Ad,"Shift-Backspace":Ad,Delete:jd,"Mod-Delete":jd,"Mod-a":nee},Nd={"Ctrl-h":Md.Backspace,"Alt-Backspace":Md[`Mod-Backspace`],"Ctrl-d":Md.Delete,"Ctrl-Alt-Backspace":Md[`Mod-Delete`],"Alt-Delete":Md[`Mod-Delete`],"Alt-d":Md[`Mod-Delete`],"Ctrl-a":Td,"Ctrl-e":Ed};for(let e in Md)Nd[e]=Md[e];typeof navigator<`u`?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<`u`&&os.platform&&os.platform();function Pd(e,t=null){return function(n,r){let{$from:i,$to:a}=n.selection,o=i.blockRange(a);if(!o)return!1;let s=r?n.tr:null;return Fd(s,o,e,t)?(r&&r(s.scrollIntoView()),!0):!1}}function Fd(e,t,n,r=null){let i=!1,a=t,o=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&t.startIndex==0){if(t.$from.index(t.depth-1)==0)return!1;let e=o.resolve(t.start-2);a=new vc(e,e,t.depth),t.endIndex<t.parent.childCount&&(t=new vc(t.$from,o.resolve(t.$to.end(t.depth)),t.depth)),i=!0}let s=Wl(a,n,r,t);return s?(e&&Id(e,t,s,i,n),!0):!1}function Id(e,t,n,r,i){let a=B.empty;for(let e=n.length-1;e>=0;e--)a=B.from(n[e].type.create(n[e].attrs,a));e.step(new Il(t.start-(r?2:0),t.end,t.start,t.end,new V(a,0,0),n.length,!0));let o=0;for(let e=0;e<n.length;e++)n[e].type==i&&(o=e+1);let s=n.length-o,c=t.start+n.length-(r?2:0),l=t.parent;for(let n=t.startIndex,r=t.endIndex,i=!0;n<r;n++,i=!1)!i&&eu(e.doc,c,s)&&(e.split(c,s),c+=2*s),c+=l.child(n).nodeSize;return e}function Ld(e){return function(t,n){let{$from:r,$to:i}=t.selection,a=r.blockRange(i,t=>t.childCount>0&&t.firstChild.type==e);return a?n?r.node(a.depth-1).type==e?Rd(t,n,e,a):zd(t,n,a):!0:!1}}function Rd(e,t,n,r){let i=e.tr,a=r.end,o=r.$to.end(r.depth);a<o&&(i.step(new Il(a-1,o,a,o,new V(B.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new vc(i.doc.resolve(r.$from.pos),i.doc.resolve(o),r.depth));let s=Hl(r);if(s==null)return!1;i.lift(r,s);let c=i.doc.resolve(i.mapping.map(a,-1)-1);return nu(i.doc,c.pos)&&c.nodeBefore.type==c.nodeAfter.type&&i.join(c.pos),t(i.scrollIntoView()),!0}function zd(e,t,n){let r=e.tr,i=n.parent;for(let e=n.end,t=n.endIndex-1,a=n.startIndex;t>a;t--)e-=i.child(t).nodeSize,r.delete(e-1,e+1);let a=r.doc.resolve(n.start),o=a.nodeAfter;if(r.mapping.map(n.end)!=n.start+a.nodeAfter.nodeSize)return!1;let s=n.startIndex==0,c=n.endIndex==i.childCount,l=a.node(-1),u=a.index(-1);if(!l.canReplace(u+ +!s,u+1,o.content.append(c?B.empty:B.from(i))))return!1;let d=a.pos,f=d+o.nodeSize;return r.step(new Il(d-+!!s,f+ +!!c,d+1,f-1,new V((s?B.empty:B.from(i.copy(B.empty))).append(c?B.empty:B.from(i.copy(B.empty))),+!s,+!c),+!s)),t(r.scrollIntoView()),!0}function Bd(e){return function(t,n){let{$from:r,$to:i}=t.selection,a=r.blockRange(i,t=>t.childCount>0&&t.firstChild.type==e);if(!a)return!1;let o=a.startIndex;if(o==0)return!1;let s=a.parent,c=s.child(o-1);if(c.type!=e)return!1;if(n){let r=c.lastChild&&c.lastChild.type==s.type,i=B.from(r?e.create():null),o=new V(B.from(e.create(null,B.from(s.type.create(null,i)))),r?3:1,0),l=a.start,u=a.end;n(t.tr.step(new Il(l-(r?3:1),u,l,u,o,1,!0)).scrollIntoView())}return!0}}var Vd=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},Hd=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t},Ud=null,Wd=function(e,t,n){let r=Ud||=document.createRange();return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},Gd=function(){Ud=null},Kd=function(e,t,n,r){return n&&(Jd(e,t,n,r,-1)||Jd(e,t,n,r,1))},qd=/^(img|br|input|textarea|hr)$/i;function Jd(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:Yd(e))){let n=e.parentNode;if(!n||n.nodeType!=1||$d(e)||qd.test(e.nodeName)||e.contentEditable==`false`)return!1;t=Vd(e)+(i<0?0:1),e=n}else if(e.nodeType==1){let n=e.childNodes[t+(i<0?-1:0)];if(n.nodeType==1&&n.contentEditable==`false`)if(n.pmViewDesc?.ignoreForSelection)t+=i;else return!1;else e=n,t=i<0?Yd(e):0}else return!1}}function Yd(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Xd(e,t){for(;;){if(e.nodeType==3&&t)return e;if(e.nodeType==1&&t>0){if(e.contentEditable==`false`)return null;e=e.childNodes[t-1],t=Yd(e)}else if(e.parentNode&&!$d(e))t=Vd(e),e=e.parentNode;else return null}}function Zd(e,t){for(;;){if(e.nodeType==3&&t<e.nodeValue.length)return e;if(e.nodeType==1&&t<e.childNodes.length){if(e.contentEditable==`false`)return null;e=e.childNodes[t],t=0}else if(e.parentNode&&!$d(e))t=Vd(e)+1,e=e.parentNode;else return null}}function Qd(e,t,n){for(let r=t==0,i=t==Yd(e);r||i;){if(e==n)return!0;let t=Vd(e);if(e=e.parentNode,!e)return!1;r&&=t==0,i&&=t==Yd(e)}}function $d(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}var ef=function(e){return e.focusNode&&Kd(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function tf(e,t){let n=document.createEvent(`Event`);return n.initEvent(`keydown`,!0,!0),n.keyCode=e,n.key=n.code=t,n}function nf(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function rf(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:Math.min(Yd(r.offsetNode),r.offset)}}catch{}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:Math.min(Yd(r.startContainer),r.startOffset)}}}var af=typeof navigator<`u`?navigator:null,of=typeof document<`u`?document:null,sf=af&&af.userAgent||``,cf=/Edge\/(\d+)/.exec(sf),lf=/MSIE \d/.exec(sf),uf=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(sf),df=!!(lf||uf||cf),ff=lf?document.documentMode:uf?+uf[1]:cf?+cf[1]:0,pf=!df&&/gecko\/(\d+)/i.test(sf);pf&&+(/Firefox\/(\d+)/.exec(sf)||[0,0])[1];var mf=!df&&/Chrome\/(\d+)/.exec(sf),hf=!!mf,gf=mf?+mf[1]:0,_f=!df&&!!af&&/Apple Computer/.test(af.vendor),vf=_f&&(/Mobile\/\w+/.test(sf)||!!af&&af.maxTouchPoints>2),yf=vf||(af?/Mac/.test(af.platform):!1),bf=af?/Win/.test(af.platform):!1,xf=/Android \d/.test(sf),Sf=!!of&&`webkitFontSmoothing`in of.documentElement.style,Cf=Sf?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function wf(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function Tf(e,t){return typeof e==`number`?e:e[t]}function Ef(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function Df(e,t,n){let r=e.someProp(`scrollThreshold`)||0,i=e.someProp(`scrollMargin`)||5,a=e.dom.ownerDocument;for(let o=n||e.dom;o;){if(o.nodeType!=1){o=Hd(o);continue}let e=o,n=e==a.body,s=n?wf(a):Ef(e),c=0,l=0;if(t.top<s.top+Tf(r,`top`)?l=-(s.top-t.top+Tf(i,`top`)):t.bottom>s.bottom-Tf(r,`bottom`)&&(l=t.bottom-t.top>s.bottom-s.top?t.top+Tf(i,`top`)-s.top:t.bottom-s.bottom+Tf(i,`bottom`)),t.left<s.left+Tf(r,`left`)?c=-(s.left-t.left+Tf(i,`left`)):t.right>s.right-Tf(r,`right`)&&(c=t.right-s.right+Tf(i,`right`)),c||l)if(n)a.defaultView.scrollBy(c,l);else{let n=e.scrollLeft,r=e.scrollTop;l&&(e.scrollTop+=l),c&&(e.scrollLeft+=c);let i=e.scrollLeft-n,a=e.scrollTop-r;t={left:t.left-i,top:t.top-a,right:t.right-i,bottom:t.bottom-a}}let u=n?`fixed`:getComputedStyle(o).position;if(/^(fixed|sticky)$/.test(u))break;o=u==`absolute`?o.offsetParent:Hd(o)}}function Of(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,i;for(let a=(t.left+t.right)/2,o=n+1;o<Math.min(innerHeight,t.bottom);o+=5){let t=e.root.elementFromPoint(a,o);if(!t||t==e.dom||!e.dom.contains(t))continue;let s=t.getBoundingClientRect();if(s.top>=n-20){r=t,i=s.top;break}}return{refDOM:r,refTop:i,stack:kf(e.dom)}}function kf(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=Hd(r));return t}function Af({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;jf(n,r==0?0:r-t)}function jf(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:i,left:a}=e[n];r.scrollTop!=i+t&&(r.scrollTop=i+t),r.scrollLeft!=a&&(r.scrollLeft=a)}}var Mf=null;function Nf(e){if(e.setActive)return e.setActive();if(Mf)return e.focus(Mf);let t=kf(e);e.focus(Mf==null?{get preventScroll(){return Mf={preventScroll:!0},!0}}:void 0),Mf||(Mf=!1,jf(t,0))}function Pf(e,t){let n,r=2e8,i,a=0,o=t.top,s=t.top,c,l;for(let u=e.firstChild,d=0;u;u=u.nextSibling,d++){let e;if(u.nodeType==1)e=u.getClientRects();else if(u.nodeType==3)e=Wd(u).getClientRects();else continue;for(let f=0;f<e.length;f++){let p=e[f];if(p.top<=o&&p.bottom>=s){o=Math.max(p.bottom,o),s=Math.min(p.top,s);let e=p.left>t.left?p.left-t.left:p.right<t.left?t.left-p.right:0;if(e<r){n=u,r=e,i=e&&n.nodeType==3?{left:p.right<t.left?p.right:p.left,top:t.top}:t,u.nodeType==1&&e&&(a=d+ +(t.left>=(p.left+p.right)/2));continue}}else p.top>t.top&&!c&&p.left<=t.left&&p.right>=t.left&&(c=u,l={left:Math.max(p.left,Math.min(p.right,t.left)),top:p.top});!n&&(t.left>=p.right&&t.top>=p.top||t.left>=p.left&&t.top>=p.bottom)&&(a=d+1)}}return!n&&c&&(n=c,i=l,r=0),n&&n.nodeType==3?Ff(n,i):!n||r&&n.nodeType==1?{node:e,offset:a}:Pf(n,i)}function Ff(e,t){let n=e.nodeValue.length,r=document.createRange(),i;for(let a=0;a<n;a++){r.setEnd(e,a+1),r.setStart(e,a);let n=Uf(r,1);if(n.top!=n.bottom&&If(t,n)){i={node:e,offset:a+ +(t.left>=(n.left+n.right)/2)};break}}return r.detach(),i||{node:e,offset:0}}function If(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function Lf(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}function Rf(e,t,n){let{node:r,offset:i}=Pf(t,n),a=-1;if(r.nodeType==1&&!r.firstChild){let e=r.getBoundingClientRect();a=e.left!=e.right&&n.left>(e.left+e.right)/2?1:-1}return e.docView.posFromDOM(r,i,a)}function zf(e,t,n,r){let i=-1;for(let n=t,a=!1;n!=e.dom;){let t=e.docView.nearestDesc(n,!0),o;if(!t)return null;if(t.dom.nodeType==1&&(t.node.isBlock&&t.parent||!t.contentDOM)&&((o=t.dom.getBoundingClientRect()).width||o.height)&&(t.node.isBlock&&t.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(t.dom.nodeName)&&(!a&&o.left>r.left||o.top>r.top?i=t.posBefore:(!a&&o.right<r.left||o.bottom<r.top)&&(i=t.posAfter),a=!0),!t.contentDOM&&i<0&&!t.node.isText))return(t.node.isBlock?r.top<(o.top+o.bottom)/2:r.left<(o.left+o.right)/2)?t.posBefore:t.posAfter;n=t.dom.parentNode}return i>-1?i:e.docView.posFromDOM(t,n,-1)}function Bf(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),a=i;;){let n=e.childNodes[a];if(n.nodeType==1){let e=n.getClientRects();for(let r=0;r<e.length;r++){let i=e[r];if(If(t,i))return Bf(n,t,i)}}if((a=(a+1)%r)==i)break}return e}function Vf(e,t){let n=e.dom.ownerDocument,r,i=0,a=rf(n,t.left,t.top);a&&({node:r,offset:i}=a);let o=(e.root.elementFromPoint?e.root:n).elementFromPoint(t.left,t.top),s;if(!o||!e.dom.contains(o.nodeType==1?o:o.parentNode)){let n=e.dom.getBoundingClientRect();if(!If(t,n)||(o=Bf(e.dom,t,n),!o))return null}if(_f)for(let e=o;r&&e;e=Hd(e))e.draggable&&(r=void 0);if(o=Lf(o,t),r){if(pf&&r.nodeType==1&&(i=Math.min(i,r.childNodes.length),i<r.childNodes.length)){let e=r.childNodes[i],n;e.nodeName==`IMG`&&(n=e.getBoundingClientRect()).right<=t.left&&n.bottom>t.top&&i++}let n;Sf&&i&&r.nodeType==1&&(n=r.childNodes[i-1]).nodeType==1&&n.contentEditable==`false`&&n.getBoundingClientRect().top>=t.top&&i--,r==e.dom&&i==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:(i==0||r.nodeType!=1||r.childNodes[i-1].nodeName!=`BR`)&&(s=zf(e,r,i,t))}s??=Rf(e,o,t);let c=e.docView.nearestDesc(o,!0);return{pos:s,inside:c?c.posAtStart-c.border:-1}}function Hf(e){return e.top<e.bottom||e.left<e.right}function Uf(e,t){let n=e.getClientRects();if(n.length){let e=n[t<0?0:n.length-1];if(Hf(e))return e}return Array.prototype.find.call(n,Hf)||e.getBoundingClientRect()}var Wf=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Gf(e,t,n){let{node:r,offset:i,atom:a}=e.docView.domFromPos(t,n<0?-1:1),o=Sf||pf;if(r.nodeType==3)if(o&&(Wf.test(r.nodeValue)||(n<0?!i:i==r.nodeValue.length))){let e=Uf(Wd(r,i,i),n);if(pf&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let t=Uf(Wd(r,i-1,i-1),-1);if(t.top==e.top){let n=Uf(Wd(r,i,i+1),-1);if(n.top!=e.top)return Kf(n,n.left<t.left)}}return e}else{let e=i,t=i,a=n<0?1:-1;return n<0&&!i?(t++,a=-1):n>=0&&i==r.nodeValue.length?(e--,a=1):n<0?e--:t++,Kf(Uf(Wd(r,e,t),a),a<0)}if(!e.state.doc.resolve(t-(a||0)).parent.inlineContent){if(a==null&&i&&(n<0||i==Yd(r))){let e=r.childNodes[i-1];if(e.nodeType==1)return qf(e.getBoundingClientRect(),!1)}if(a==null&&i<Yd(r)){let e=r.childNodes[i];if(e.nodeType==1)return qf(e.getBoundingClientRect(),!0)}return qf(r.getBoundingClientRect(),n>=0)}if(a==null&&i&&(n<0||i==Yd(r))){let e=r.childNodes[i-1],t=e.nodeType==3?Wd(e,Yd(e)-+!o):e.nodeType==1&&(e.nodeName!=`BR`||!e.nextSibling)?e:null;if(t)return Kf(Uf(t,1),!1)}if(a==null&&i<Yd(r)){let e=r.childNodes[i];for(;e.pmViewDesc&&e.pmViewDesc.ignoreForCoords;)e=e.nextSibling;let t=e?e.nodeType==3?Wd(e,0,+!o):e.nodeType==1?e:null:null;if(t)return Kf(Uf(t,-1),!0)}return Kf(Uf(r.nodeType==3?Wd(r):r,-n),n>=0)}function Kf(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function qf(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function Jf(e,t,n){let r=e.state,i=e.root.activeElement;r!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),i!=e.dom&&i&&i.focus()}}function Yf(e,t,n){let r=t.selection,i=n==`up`?r.$from:r.$to;return Jf(e,t,()=>{let{node:t}=e.docView.domFromPos(i.pos,n==`up`?-1:1);for(;;){let n=e.docView.nearestDesc(t,!0);if(!n)break;if(n.node.isBlock){t=n.contentDOM||n.dom;break}t=n.dom.parentNode}let r=Gf(e,i.pos,1);for(let e=t.firstChild;e;e=e.nextSibling){let t;if(e.nodeType==1)t=e.getClientRects();else if(e.nodeType==3)t=Wd(e,0,e.nodeValue.length).getClientRects();else continue;for(let e=0;e<t.length;e++){let i=t[e];if(i.bottom>i.top+1&&(n==`up`?r.top-i.top>(i.bottom-r.top)*2:i.bottom-r.bottom>(r.bottom-i.top)*2))return!1}}return!0})}var Xf=/[\u0590-\u08ac]/;function Zf(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,a=!i,o=i==r.parent.content.size,s=e.domSelection();return s?!Xf.test(r.parent.textContent)||!s.modify?n==`left`||n==`backward`?a:o:Jf(e,t,()=>{let{focusNode:t,focusOffset:i,anchorNode:a,anchorOffset:o}=e.domSelectionRange(),c=s.caretBidiLevel;s.modify(`move`,n,`character`);let l=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:u,focusOffset:d}=e.domSelectionRange(),f=u&&!l.contains(u.nodeType==1?u:u.parentNode)||t==u&&i==d;try{s.collapse(a,o),t&&(t!=a||i!=o)&&s.extend&&s.extend(t,i)}catch{}return c!=null&&(s.caretBidiLevel=c),f}):r.pos==r.start()||r.pos==r.end()}var Qf=null,$f=null,ep=!1;function tp(e,t,n){return Qf==t&&$f==n?ep:(Qf=t,$f=n,ep=n==`up`||n==`down`?Yf(e,t,n):Zf(e,t,n))}var np=0,rp=1,ip=2,ap=3,op=class{constructor(e,t,n,r){this.parent=e,this.children=t,this.dom=n,this.contentDOM=r,this.dirty=np,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,n=this.posAtStart;;t++){let r=this.children[t];if(r==e)return n;n+=r.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,n){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(n<0){let n,r;if(e==this.contentDOM)n=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.previousSibling}for(;n&&!((r=n.pmViewDesc)&&r.parent==this);)n=n.previousSibling;return n?this.posBeforeChild(r)+r.size:this.posAtStart}else{let n,r;if(e==this.contentDOM)n=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.nextSibling}for(;n&&!((r=n.pmViewDesc)&&r.parent==this);)n=n.nextSibling;return n?this.posBeforeChild(r):this.posAtEnd}let r;if(e==this.dom&&this.contentDOM)r=t>Vd(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(t==0)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!1;break}if(t.previousSibling)break}if(r==null&&t==e.childNodes.length)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!0;break}if(t.nextSibling)break}}return r??n>0?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let n=!0,r=e;r;r=r.parentNode){let i=this.getDesc(r),a;if(i&&(!t||i.node))if(n&&(a=i.nodeDOM)&&!(a.nodeType==1?a.contains(e.nodeType==1?e:e.parentNode):a==e))n=!1;else return i}}getDesc(e){let t=e.pmViewDesc;for(let e=t;e;e=e.parent)if(e==this)return t}posFromDOM(e,t,n){for(let r=e;r;r=r.parentNode){let i=this.getDesc(r);if(i)return i.localPosFromDOM(e,t,n)}return-1}descAt(e){for(let t=0,n=0;t<this.children.length;t++){let r=this.children[t],i=n+r.size;if(n==e&&i!=n){for(;!r.border&&r.children.length;)for(let e=0;e<r.children.length;e++){let t=r.children[e];if(t.size){r=t;break}}return r}if(e<i)return r.descAt(e-n-r.border);n=i}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let n=0,r=0;for(let t=0;n<this.children.length;n++){let i=this.children[n],a=t+i.size;if(a>e||i instanceof pp){r=e-t;break}t=a}if(r)return this.children[n].domFromPos(r-this.children[n].border,t);for(let e;n&&!(e=this.children[n-1]).size&&e instanceof sp&&e.side>=0;n--);if(t<=0){let e,r=!0;for(;e=n?this.children[n-1]:null,!(!e||e.dom.parentNode==this.contentDOM);n--,r=!1);return e&&t&&r&&!e.border&&!e.domAtom?e.domFromPos(e.size,t):{node:this.contentDOM,offset:e?Vd(e.dom)+1:0}}else{let e,r=!0;for(;e=n<this.children.length?this.children[n]:null,!(!e||e.dom.parentNode==this.contentDOM);n++,r=!1);return e&&r&&!e.border&&!e.domAtom?e.domFromPos(0,t):{node:this.contentDOM,offset:e?Vd(e.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,n=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,i=-1;for(let a=n,o=0;;o++){let n=this.children[o],s=a+n.size;if(r==-1&&e<=s){let i=a+n.border;if(e>=i&&t<=s-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(e,t,i);e=a;for(let t=o;t>0;t--){let n=this.children[t-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=Vd(n.dom)+1;break}e-=n.size}r==-1&&(r=0)}if(r>-1&&(s>t||o==this.children.length-1)){t=s;for(let e=o+1;e<this.children.length;e++){let n=this.children[e];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(-1)){i=Vd(n.dom);break}t+=n.size}i==-1&&(i=this.contentDOM.childNodes.length);break}a=s}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return t.size==0||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:n}=this.domFromPos(e,0);if(t.nodeType!=1||n==t.childNodes.length)throw RangeError(`No node after pos `+e);return t.childNodes[n]}setSelection(e,t,n,r=!1){let i=Math.min(e,t),a=Math.max(e,t);for(let o=0,s=0;o<this.children.length;o++){let c=this.children[o],l=s+c.size;if(i>s&&a<l)return c.setSelection(e-s-c.border,t-s-c.border,n,r);s=l}let o=this.domFromPos(e,e?-1:1),s=t==e?o:this.domFromPos(t,t?-1:1),c=n.root.getSelection(),l=n.domSelectionRange(),u=!1;if((pf||_f)&&e==t){let{node:e,offset:t}=o;if(e.nodeType==3){if(u=!!(t&&e.nodeValue[t-1]==`
|
|
65
|
+
`),u&&t==e.nodeValue.length)for(let t=e,n;t;t=t.parentNode){if(n=t.nextSibling){n.nodeName==`BR`&&(o=s={node:n.parentNode,offset:Vd(n)+1});break}let e=t.pmViewDesc;if(e&&e.node&&e.node.isBlock)break}}else{let n=e.childNodes[t-1];u=n&&(n.nodeName==`BR`||n.contentEditable==`false`)}}if(pf&&l.focusNode&&l.focusNode!=s.node&&l.focusNode.nodeType==1){let e=l.focusNode.childNodes[l.focusOffset];e&&e.contentEditable==`false`&&(r=!0)}if(!(r||u&&_f)&&Kd(o.node,o.offset,l.anchorNode,l.anchorOffset)&&Kd(s.node,s.offset,l.focusNode,l.focusOffset))return;let d=!1;if((c.extend||e==t)&&!(u&&pf)){c.collapse(o.node,o.offset);try{e!=t&&c.extend(s.node,s.offset),d=!0}catch{}}if(!d){if(e>t){let e=o;o=s,s=e}let n=document.createRange();n.setEnd(s.node,s.offset),n.setStart(o.node,o.offset),c.removeAllRanges(),c.addRange(n)}}ignoreMutation(e){return!this.contentDOM&&e.type!=`selection`}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,r=0;r<this.children.length;r++){let i=this.children[r],a=n+i.size;if(n==a?e<=a&&t>=n:e<a&&t>n){let r=n+i.border,o=a-i.border;if(e>=r&&t<=o){this.dirty=e==n||t==a?ip:rp,e==r&&t==o&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=ap:i.markDirty(e-r,t-r);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?ip:ap}n=a}this.dirty=ip}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=e==1?ip:rp;t.dirty<n&&(t.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}},sp=class extends op{constructor(e,t,n,r){let i,a=t.type.toDOM;if(typeof a==`function`&&(a=a(n,()=>{if(!i)return r;if(i.parent)return i.parent.posBeforeChild(i)})),!t.type.spec.raw){if(a.nodeType!=1){let e=document.createElement(`span`);e.appendChild(a),a=e}a.contentEditable=`false`,a.classList.add(`ProseMirror-widget`)}super(e,[],a,null),this.widget=t,this.widget=t,i=this}matchesWidget(e){return this.dirty==np&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(e):!1}ignoreMutation(e){return e.type!=`selection`||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}},cp=class extends op{constructor(e,t,n,r){super(e,[],t,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(e,t){return e==this.textDOM?this.posAtStart+t:this.posAtStart+(t?this.size:0)}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type===`characterData`&&e.target.nodeValue==e.oldValue}},lp=class e extends op{constructor(e,t,n,r,i){super(e,[],n,r),this.mark=t,this.spec=i}static create(t,n,r,i){let a=i.nodeViews[n.type.name],o=a&&a(n,i,r);return(!o||!o.dom)&&(o=cl.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new e(t,n,o.dom,o.contentDOM||o.dom,o)}parseRule(){return this.dirty&ap||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=ap&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=np){let e=this.parent;for(;!e.node;)e=e.parent;e.dirty<this.dirty&&(e.dirty=this.dirty),this.dirty=np}}slice(t,n,r){let i=e.create(this.parent,this.mark,!0,r),a=this.children,o=this.size;n<o&&(a=Ap(a,n,o,r)),t>0&&(a=Ap(a,0,t,r));for(let e=0;e<a.length;e++)a[e].parent=i;return i.children=a,i}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}},up=class e extends op{constructor(e,t,n,r,i,a,o,s,c){super(e,[],i,a),this.node=t,this.outerDeco=n,this.innerDeco=r,this.nodeDOM=o}static create(t,n,r,i,a,o){let s=a.nodeViews[n.type.name],c,l=s&&s(n,a,()=>{if(!c)return o;if(c.parent)return c.parent.posBeforeChild(c)},r,i),u=l&&l.dom,d=l&&l.contentDOM;if(n.isText){if(!u)u=document.createTextNode(n.text);else if(u.nodeType!=3)throw RangeError(`Text must be rendered as a DOM text node`)}else if(!u){let e=cl.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs);({dom:u,contentDOM:d}=e)}!d&&!n.isText&&u.nodeName!=`BR`&&(u.hasAttribute(`contenteditable`)||(u.contentEditable=`false`),n.type.spec.draggable&&(u.draggable=!0));let f=u;return u=xp(u,r,n),l?c=new mp(t,n,r,i,u,d||null,f,l,a,o+1):n.isText?new fp(t,n,r,i,u,f,a):new e(t,n,r,i,u,d||null,f,a,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace==`pre`&&(e.preserveWhitespace=`full`),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let t=this.children.length-1;t>=0;t--){let n=this.children[t];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}e.contentElement||(e.getContent=()=>B.empty)}return e}matchesNode(e,t,n){return this.dirty==np&&e.eq(this.node)&&Sp(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return+!this.node.isLeaf}updateChildren(e,t){let n=this.node.inlineContent,r=t,i=e.composing?this.localCompositionInfo(e,t):null,a=i&&i.pos>-1?i:null,o=i&&i.pos<0,s=new wp(this,a&&a.node,e);Dp(this.node,this.innerDeco,(t,i,a)=>{t.spec.marks?s.syncToMarks(t.spec.marks,n,e,i):t.type.side>=0&&!a&&s.syncToMarks(i==this.node.childCount?ec.none:this.node.child(i).marks,n,e,i),s.placeWidget(t,e,r)},(t,a,c,l)=>{s.syncToMarks(t.marks,n,e,l);let u;s.findNodeMatch(t,a,c,l)||o&&e.state.selection.from>r&&e.state.selection.to<r+t.nodeSize&&(u=s.findIndexWithChild(i.node))>-1&&s.updateNodeAt(t,a,c,u,e)||s.updateNextNode(t,a,c,e,l,r)||s.addNode(t,a,c,e,r),r+=t.nodeSize}),s.syncToMarks([],n,e,0),this.node.isTextblock&&s.addTextblockHacks(),s.destroyRest(),(s.changed||this.dirty==ip)&&(a&&this.protectLocalComposition(e,a),hp(this.contentDOM,this.children,e),vf&&Op(this.dom))}localCompositionInfo(e,t){let{from:n,to:r}=e.state.selection;if(!(e.state.selection instanceof Nu)||n<t||r>t+this.node.content.size)return null;let i=e.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let e=i.nodeValue,a=kp(this.node.content,e,n-t,r-t);return a<0?null:{node:i,pos:a,text:e}}else return{node:i,pos:-1,text:``}}protectLocalComposition(e,{node:t,pos:n,text:r}){if(this.getDesc(t))return;let i=t;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&=void 0}let a=new cp(this,i,t,r);e.input.compositionNodes.push(a),this.children=Ap(this.children,n,n+r.length,e,a)}update(e,t,n,r){return this.dirty==ap||!e.sameMarkup(this.node)?!1:(this.updateInner(e,t,n,r),!0)}updateInner(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=np}updateOuterDeco(e){if(Sp(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,n=this.dom;this.dom=yp(this.dom,this.nodeDOM,vp(this.outerDeco,this.node,t),vp(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add(`ProseMirror-selectednode`),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove(`ProseMirror-selectednode`),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute(`draggable`))}get domAtom(){return this.node.isAtom}};function dp(e,t,n,r,i){xp(r,t,e);let a=new up(void 0,e,t,n,r,r,r,i,0);return a.contentDOM&&a.updateChildren(i,0),a}var fp=class e extends up{constructor(e,t,n,r,i,a,o){super(e,t,n,r,i,null,a,o,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,n,r){return this.dirty==ap||this.dirty!=np&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=np||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=np,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,n)}ignoreMutation(e){return e.type!=`characterData`&&e.type!=`selection`}slice(t,n,r){let i=this.node.cut(t,n),a=document.createTextNode(i.text);return new e(this.parent,i,this.outerDeco,this.innerDeco,a,a,r)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length)&&(this.dirty=ap)}get domAtom(){return!1}isText(e){return this.node.text==e}},pp=class extends op{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==np&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName==`IMG`}},mp=class extends up{constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r,i,a,o,c,l),this.spec=s}update(e,t,n,r){if(this.dirty==ap)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,t,n);return i&&this.updateInner(e,t,n,r),i}else if(!this.contentDOM&&!e.isLeaf)return!1;else return super.update(e,t,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,r){this.spec.setSelection?this.spec.setSelection(e,t,n.root):super.setSelection(e,t,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}};function hp(e,t,n){let r=e.firstChild,i=!1;for(let a=0;a<t.length;a++){let o=t[a],s=o.dom;if(s.parentNode==e){for(;s!=r;)r=Cp(r),i=!0;r=r.nextSibling}else i=!0,e.insertBefore(s,r);if(o instanceof lp){let t=r?r.previousSibling:e.lastChild;hp(o.contentDOM,o.children,n),r=t?t.nextSibling:e.firstChild}}for(;r;)r=Cp(r),i=!0;i&&n.trackWrites==e&&(n.trackWrites=null)}var gp=function(e){e&&(this.nodeName=e)};gp.prototype=Object.create(null);var _p=[new gp];function vp(e,t,n){if(e.length==0)return _p;let r=n?_p[0]:new gp,i=[r];for(let a=0;a<e.length;a++){let o=e[a].type.attrs;if(o){o.nodeName&&i.push(r=new gp(o.nodeName));for(let e in o){let a=o[e];a!=null&&(n&&i.length==1&&i.push(r=new gp(t.isInline?`span`:`div`)),e==`class`?r.class=(r.class?r.class+` `:``)+a:e==`style`?r.style=(r.style?r.style+`;`:``)+a:e!=`nodeName`&&(r[e]=a))}}}return i}function yp(e,t,n,r){if(n==_p&&r==_p)return t;let i=t;for(let t=0;t<r.length;t++){let a=r[t],o=n[t];if(t){let t;o&&o.nodeName==a.nodeName&&i!=e&&(t=i.parentNode)&&t.nodeName.toLowerCase()==a.nodeName?i=t:(t=document.createElement(a.nodeName),t.pmIsDeco=!0,t.appendChild(i),o=_p[0],i=t)}bp(i,o||_p[0],a)}return i}function bp(e,t,n){for(let r in t)r!=`class`&&r!=`style`&&r!=`nodeName`&&!(r in n)&&e.removeAttribute(r);for(let r in n)r!=`class`&&r!=`style`&&r!=`nodeName`&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(` `).filter(Boolean):[],i=n.class?n.class.split(` `).filter(Boolean):[];for(let t=0;t<r.length;t++)i.indexOf(r[t])==-1&&e.classList.remove(r[t]);for(let t=0;t<i.length;t++)r.indexOf(i[t])==-1&&e.classList.add(i[t]);e.classList.length==0&&e.removeAttribute(`class`)}if(t.style!=n.style){if(t.style){let n=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,r;for(;r=n.exec(t.style);)e.style.removeProperty(r[1])}n.style&&(e.style.cssText+=n.style)}}function xp(e,t,n){return yp(e,e,_p,vp(t,n,e.nodeType!=1))}function Sp(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function Cp(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}var wp=class{constructor(e,t,n){this.lock=t,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=Tp(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,n,r){let i=0,a=this.stack.length>>1,o=Math.min(a,e.length);for(;i<o&&(i==a-1?this.top:this.stack[i+1<<1]).matchesMark(e[i])&&e[i].type.spec.spanning!==!1;)i++;for(;i<a;)this.destroyRest(),this.top.dirty=np,this.index=this.stack.pop(),this.top=this.stack.pop(),a--;for(;a<e.length;){this.stack.push(this.top,this.index+1);let i=-1,o=this.top.children.length;r<this.preMatch.index&&(o=Math.min(this.index+3,o));for(let t=this.index;t<o;t++){let n=this.top.children[t];if(n.matchesMark(e[a])&&!this.isLocked(n.dom)){i=t;break}}if(i>-1)i>this.index&&(this.changed=!0,this.destroyBetween(this.index,i)),this.top=this.top.children[this.index];else{let r=lp.create(this.top,e[a],t,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,a++}}findNodeMatch(e,t,n,r){let i=-1,a;if(r>=this.preMatch.index&&(a=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&a.matchesNode(e,t,n))i=this.top.children.indexOf(a,this.index);else for(let r=this.index,a=Math.min(this.top.children.length,r+5);r<a;r++){let a=this.top.children[r];if(a.matchesNode(e,t,n)&&!this.preMatch.matched.has(a)){i=r;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(e,t,n,r,i){let a=this.top.children[r];return a.dirty==ap&&a.dom==a.contentDOM&&(a.dirty=ip),a.update(e,t,n,i)?(this.destroyBetween(this.index,r),this.index++,!0):!1}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let t=e.pmViewDesc;if(t){for(let e=this.index;e<this.top.children.length;e++)if(this.top.children[e]==t)return e}return-1}e=t}}updateNextNode(e,t,n,r,i,a){for(let o=this.index;o<this.top.children.length;o++){let s=this.top.children[o];if(s instanceof up){let c=this.preMatch.matched.get(s);if(c!=null&&c!=i)return!1;let l=s.dom,u,d=this.isLocked(l)&&!(e.isText&&s.node&&s.node.isText&&s.nodeDOM.nodeValue==e.text&&s.dirty!=ap&&Sp(t,s.outerDeco));if(!d&&s.update(e,t,n,r))return this.destroyBetween(this.index,o),s.dom!=l&&(this.changed=!0),this.index++,!0;if(!d&&(u=this.recreateWrapper(s,e,t,n,r,a)))return this.destroyBetween(this.index,o),this.top.children[this.index]=u,u.contentDOM&&(u.dirty=ip,u.updateChildren(r,a+1),u.dirty=np),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,n,r,i,a){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content)||!Sp(n,e.outerDeco)||!r.eq(e.innerDeco))return null;let o=up.create(this.top,t,n,r,i,a);if(o.contentDOM){o.children=e.children,e.children=[];for(let e of o.children)e.parent=o}return e.destroy(),o}addNode(e,t,n,r,i){let a=up.create(this.top,e,t,n,r,i);a.contentDOM&&a.updateChildren(r,i+1),this.top.children.splice(this.index++,0,a),this.changed=!0}placeWidget(e,t,n){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(r&&r.matchesWidget(e)&&(e==r.widget||!r.widget.type.toDOM.parentNode))this.index++;else{let r=new sp(this.top,e,t,n);this.top.children.splice(this.index++,0,r),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof lp;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof fp)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((_f||hf)&&e&&e.dom.contentEditable==`false`&&this.addHackNode(`IMG`,t),this.addHackNode(`BR`,this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let n=document.createElement(e);e==`IMG`&&(n.className=`ProseMirror-separator`,n.alt=``),e==`BR`&&(n.className=`ProseMirror-trailingBreak`);let r=new pp(this.top,[],n,null);t==this.top?t.children.splice(this.index++,0,r):t.children.push(r),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}};function Tp(e,t){let n=t,r=n.children.length,i=e.childCount,a=new Map,o=[];outer:for(;i>0;){let s;for(;;)if(r){let e=n.children[r-1];if(e instanceof lp)n=e,r=e.children.length;else{s=e,r--;break}}else if(n==t)break outer;else r=n.parent.children.indexOf(n),n=n.parent;let c=s.node;if(c){if(c!=e.child(i-1))break;--i,a.set(s,i),o.push(s)}}return{index:i,matched:a,matches:o.reverse()}}function Ep(e,t){return e.type.side-t.type.side}function Dp(e,t,n,r){let i=t.locals(e),a=0;if(i.length==0){for(let n=0;n<e.childCount;n++){let o=e.child(n);r(o,i,t.forChild(a,o),n),a+=o.nodeSize}return}let o=0,s=[],c=null;for(let l=0;;){let u,d;for(;o<i.length&&i[o].to==a;){let e=i[o++];e.widget&&(u?(d||=[u]).push(e):u=e)}if(u)if(d){d.sort(Ep);for(let e=0;e<d.length;e++)n(d[e],l,!!c)}else n(u,l,!!c);let f,p;if(c)p=-1,f=c,c=null;else if(l<e.childCount)p=l,f=e.child(l++);else break;for(let e=0;e<s.length;e++)s[e].to<=a&&s.splice(e--,1);for(;o<i.length&&i[o].from<=a&&i[o].to>a;)s.push(i[o++]);let m=a+f.nodeSize;if(f.isText){let e=m;o<i.length&&i[o].from<e&&(e=i[o].from);for(let t=0;t<s.length;t++)s[t].to<e&&(e=s[t].to);e<m&&(c=f.cut(e-a),f=f.cut(0,e-a),m=e,p=-1)}else for(;o<i.length&&i[o].to<m;)o++;let h=f.isInline&&!f.isLeaf?s.filter(e=>!e.inline):s.slice();r(f,h,t.forChild(a,f),p),a=m}}function Op(e){if(e.nodeName==`UL`||e.nodeName==`OL`){let t=e.style.cssText;e.style.cssText=t+`; list-style: square !important`,window.getComputedStyle(e).listStyle,e.style.cssText=t}}function kp(e,t,n,r){for(let i=0,a=0;i<e.childCount&&a<=r;){let o=e.child(i++),s=a;if(a+=o.nodeSize,!o.isText)continue;let c=o.text;for(;i<e.childCount;){let t=e.child(i++);if(a+=t.nodeSize,!t.isText)break;c+=t.text}if(a>=n){if(a>=r&&c.slice(r-t.length-s,r-s)==t)return r-t.length;let e=s<r?c.lastIndexOf(t,r-s-1):-1;if(e>=0&&e+t.length+s>=n)return s+e;if(n==r&&c.length>=r+t.length-s&&c.slice(r-s,r-s+t.length)==t)return r}}return-1}function Ap(e,t,n,r,i){let a=[];for(let o=0,s=0;o<e.length;o++){let c=e[o],l=s,u=s+=c.size;l>=n||u<=t?a.push(c):(l<t&&a.push(c.slice(0,t-l,r)),i&&=(a.push(i),void 0),u>n&&a.push(c.slice(n-l,c.size,r)))}return a}function jp(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),a=i&&i.size==0,o=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(o<0)return null;let s=r.resolve(o),c,l;if(ef(n)){for(c=o;i&&!i.node;)i=i.parent;let e=i.node;if(i&&e.isAtom&&Fu.isSelectable(e)&&i.parent&&!(e.isInline&&Qd(n.focusNode,n.focusOffset,i.dom))){let e=i.posBefore;l=new Fu(o==e?s:r.resolve(e))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let t=o,i=o;for(let r=0;r<n.rangeCount;r++){let a=n.getRangeAt(r);t=Math.min(t,e.docView.posFromDOM(a.startContainer,a.startOffset,1)),i=Math.max(i,e.docView.posFromDOM(a.endContainer,a.endOffset,-1))}if(t<0)return null;[c,o]=i==e.state.selection.anchor?[i,t]:[t,i],s=r.resolve(o)}else c=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(c<0)return null}let u=r.resolve(c);if(!l){let n=t==`pointer`||e.state.selection.head<s.pos&&!a?1:-1;l=Hp(e,u,s,n)}return l}function Mp(e){return e.editable?e.hasFocus():Wp(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function Np(e,t=!1){let n=e.state.selection;if(Bp(e,n),Mp(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&hf){let t=e.domSelectionRange(),n=e.domObserver.currentSelection;if(t.anchorNode&&n.anchorNode&&Kd(t.anchorNode,t.anchorOffset,n.anchorNode,n.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)zp(e);else{let{anchor:r,head:i}=n,a,o;Pp&&!(n instanceof Nu)&&(n.$from.parent.inlineContent||(a=Fp(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(o=Fp(e,n.to))),e.docView.setSelection(r,i,e,t),Pp&&(a&&Lp(a),o&&Lp(o)),n.visible?e.dom.classList.remove(`ProseMirror-hideselection`):(e.dom.classList.add(`ProseMirror-hideselection`),`onselectionchange`in document&&Rp(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}var Pp=_f||hf&&gf<63;function Fp(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),i=r<n.childNodes.length?n.childNodes[r]:null,a=r?n.childNodes[r-1]:null;if(_f&&i&&i.contentEditable==`false`)return Ip(i);if((!i||i.contentEditable==`false`)&&(!a||a.contentEditable==`false`)){if(i)return Ip(i);if(a)return Ip(a)}}function Ip(e){return e.contentEditable=`true`,_f&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function Lp(e){e.contentEditable=`false`,e.wasDraggable&&=(e.draggable=!0,null)}function Rp(e){let t=e.dom.ownerDocument;t.removeEventListener(`selectionchange`,e.input.hideSelectionGuard);let n=e.domSelectionRange(),r=n.anchorNode,i=n.anchorOffset;t.addEventListener(`selectionchange`,e.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=i)&&(t.removeEventListener(`selectionchange`,e.input.hideSelectionGuard),setTimeout(()=>{(!Mp(e)||e.state.selection.visible)&&e.dom.classList.remove(`ProseMirror-hideselection`)},20))})}function zp(e){let t=e.domSelection();if(!t)return;let n=e.cursorWrapper.dom,r=n.nodeName==`IMG`;r?t.collapse(n.parentNode,Vd(n)+1):t.collapse(n,0),!r&&!e.state.selection.visible&&df&&ff<=11&&(n.disabled=!0,n.disabled=!1)}function Bp(e,t){if(t instanceof Fu){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Vp(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Vp(e)}function Vp(e){e.lastSelectedViewDesc&&=(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),void 0)}function Hp(e,t,n,r){return e.someProp(`createSelectionBetween`,r=>r(e,t,n))||Nu.between(t,n,r)}function Up(e){return e.editable&&!e.hasFocus()?!1:Wp(e)}function Wp(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function Gp(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return Kd(t.node,t.offset,n.anchorNode,n.anchorOffset)}function Kp(e,t){let{$anchor:n,$head:r}=e.selection,i=t>0?n.max(r):n.min(r),a=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return a&&ku.findFrom(a,t)}function qp(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Jp(e,t,n){let r=e.state.selection;if(r instanceof Nu){if(n.indexOf(`s`)>-1){let{$head:n}=r,i=n.textOffset?null:t<0?n.nodeBefore:n.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let a=e.state.doc.resolve(n.pos+i.nodeSize*(t<0?-1:1));return qp(e,new Nu(r.$anchor,a))}else if(!r.empty)return!1;else if(e.endOfTextblock(t>0?`forward`:`backward`)){let n=Kp(e.state,t);return n&&n instanceof Fu?qp(e,n):!1}else if(!(yf&&n.indexOf(`m`)>-1)){let n=r.$head,i=n.textOffset?null:t<0?n.nodeBefore:n.nodeAfter,a;if(!i||i.isText)return!1;let o=t<0?n.pos-i.nodeSize:n.pos;return i.isAtom||(a=e.docView.descAt(o))&&!a.contentDOM?Fu.isSelectable(i)?qp(e,new Fu(t<0?e.state.doc.resolve(n.pos-i.nodeSize):n)):Sf?qp(e,new Nu(e.state.doc.resolve(t<0?o:o+i.nodeSize))):!1:!1}}else if(r instanceof Fu&&r.node.isInline)return qp(e,new Nu(t>0?r.$to:r.$from));else{let n=Kp(e.state,t);return n?qp(e,n):!1}}function Yp(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Xp(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!=`BR`)}function Zp(e,t){return t<0?Qp(e):$p(e)}function Qp(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,a,o=!1;for(pf&&n.nodeType==1&&r<Yp(n)&&Xp(n.childNodes[r],-1)&&(o=!0);;)if(r>0){if(n.nodeType!=1)break;{let e=n.childNodes[r-1];if(Xp(e,-1))i=n,a=--r;else if(e.nodeType==3)n=e,r=n.nodeValue.length;else break}}else if(em(n))break;else{let t=n.previousSibling;for(;t&&Xp(t,-1);)i=n.parentNode,a=Vd(t),t=t.previousSibling;if(t)n=t,r=Yp(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}o?rm(e,n,r):i&&rm(e,i,a)}function $p(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i=Yp(n),a,o;for(;;)if(r<i){if(n.nodeType!=1)break;let e=n.childNodes[r];if(Xp(e,1))a=n,o=++r;else break}else if(em(n))break;else{let t=n.nextSibling;for(;t&&Xp(t,1);)a=t.parentNode,o=Vd(t)+1,t=t.nextSibling;if(t)n=t,r=0,i=Yp(n);else{if(n=n.parentNode,n==e.dom)break;r=i=0}}a&&rm(e,a,o)}function em(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function tm(e,t){for(;e&&t==e.childNodes.length&&!$d(e);)t=Vd(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable==`false`)break;e=n,t=0}}function nm(e,t){for(;e&&!t&&!$d(e);)t=Vd(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable==`false`)break;e=n,t=e.childNodes.length}}function rm(e,t,n){if(t.nodeType!=3){let e,r;(r=tm(t,n))?(t=r,n=0):(e=nm(t,n))&&(t=e,n=e.nodeValue.length)}let r=e.domSelection();if(!r)return;if(ef(r)){let e=document.createRange();e.setEnd(t,n),e.setStart(t,n),r.removeAllRanges(),r.addRange(e)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:i}=e;setTimeout(()=>{e.state==i&&Np(e)},50)}function im(e,t){let n=e.state.doc.resolve(t);if(!(hf||bf)&&n.parent.inlineContent){let r=e.coordsAtPos(t);if(t>n.start()){let n=e.coordsAtPos(t-1),i=(n.top+n.bottom)/2;if(i>r.top&&i<r.bottom&&Math.abs(n.left-r.left)>1)return n.left<r.left?`ltr`:`rtl`}if(t<n.end()){let n=e.coordsAtPos(t+1),i=(n.top+n.bottom)/2;if(i>r.top&&i<r.bottom&&Math.abs(n.left-r.left)>1)return n.left>r.left?`ltr`:`rtl`}}return getComputedStyle(e.dom).direction==`rtl`?`rtl`:`ltr`}function am(e,t,n){let r=e.state.selection;if(r instanceof Nu&&!r.empty||n.indexOf(`s`)>-1||yf&&n.indexOf(`m`)>-1)return!1;let{$from:i,$to:a}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?`up`:`down`)){let n=Kp(e.state,t);if(n&&n instanceof Fu)return qp(e,n)}if(!i.parent.inlineContent){let n=t<0?i:a,o=r instanceof Lu?ku.near(n,t):ku.findFrom(n,t);return o?qp(e,o):!1}return!1}function om(e,t){if(!(e.state.selection instanceof Nu))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?`forward`:`backward`))return!0;let a=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(a&&!a.isText){let r=e.state.tr;return t<0?r.delete(n.pos-a.nodeSize,n.pos):r.delete(n.pos,n.pos+a.nodeSize),e.dispatch(r),!0}return!1}function sm(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function cm(e){if(!_f||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable==`false`){let n=t.firstChild;sm(e,n,`true`),setTimeout(()=>sm(e,n,`false`),20)}return!1}function iee(e){let t=``;return e.ctrlKey&&(t+=`c`),e.metaKey&&(t+=`m`),e.altKey&&(t+=`a`),e.shiftKey&&(t+=`s`),t}function aee(e,t){let n=t.keyCode,r=iee(t);if(n==8||yf&&n==72&&r==`c`)return om(e,-1)||Zp(e,-1);if(n==46&&!t.shiftKey||yf&&n==68&&r==`c`)return om(e,1)||Zp(e,1);if(n==13||n==27)return!0;if(n==37||yf&&n==66&&r==`c`){let t=n==37?im(e,e.state.selection.from)==`ltr`?-1:1:-1;return Jp(e,t,r)||Zp(e,t)}else if(n==39||yf&&n==70&&r==`c`){let t=n==39?im(e,e.state.selection.from)==`ltr`?1:-1:1;return Jp(e,t,r)||Zp(e,t)}else if(n==38||yf&&n==80&&r==`c`)return am(e,-1,r)||Zp(e,-1);else if(n==40||yf&&n==78&&r==`c`)return cm(e)||am(e,1,r)||Zp(e,1);else if(r==(yf?`m`:`c`)&&(n==66||n==73||n==89||n==90))return!0;return!1}function lm(e,t){e.someProp(`transformCopied`,n=>{t=n(t,e)});let n=[],{content:r,openStart:i,openEnd:a}=t;for(;i>1&&a>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,a--;let e=r.firstChild;n.push(e.type.name,e.attrs==e.type.defaultAttrs?null:e.attrs),r=e.content}let o=e.someProp(`clipboardSerializer`)||cl.fromSchema(e.state.schema),s=vm(),c=s.createElement(`div`);c.appendChild(o.serializeFragment(r,{document:s}));let l=c.firstChild,u,d=0;for(;l&&l.nodeType==1&&(u=gm[l.nodeName.toLowerCase()]);){for(let e=u.length-1;e>=0;e--){let t=s.createElement(u[e]);for(;c.firstChild;)t.appendChild(c.firstChild);c.appendChild(t),d++}l=c.firstChild}return l&&l.nodeType==1&&l.setAttribute(`data-pm-slice`,`${i} ${a}${d?` -${d}`:``} ${JSON.stringify(n)}`),{dom:c,text:e.someProp(`clipboardTextSerializer`,n=>n(t,e))||t.content.textBetween(0,t.content.size,`
|
|
66
|
+
|
|
67
|
+
`),slice:t}}function um(e,t,n,r,i){let a=i.parent.type.spec.code,o,s;if(!n&&!t)return null;let c=!!t&&(r||a||!n);if(c){if(e.someProp(`transformPastedText`,n=>{t=n(t,a||r,e)}),a)return s=new V(B.from(e.state.schema.text(t.replace(/\r\n?/g,`
|
|
68
|
+
`))),0,0),e.someProp(`transformPasted`,t=>{s=t(s,e,!0)}),s;let n=e.someProp(`clipboardTextParser`,n=>n(t,i,r,e));if(n)s=n;else{let n=i.marks(),{schema:r}=e.state,a=cl.fromSchema(r);o=document.createElement(`div`),t.split(/(?:\r\n?|\n)+/).forEach(e=>{let t=o.appendChild(document.createElement(`p`));e&&t.appendChild(a.serializeNode(r.text(e,n)))})}}else e.someProp(`transformPastedHTML`,t=>{n=t(n,e)}),o=xm(n),Sf&&Sm(o);let l=o&&o.querySelector(`[data-pm-slice]`),u=l&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(l.getAttribute(`data-pm-slice`)||``);if(u&&u[3])for(let e=+u[3];e>0;e--){let e=o.firstChild;for(;e&&e.nodeType!=1;)e=e.nextSibling;if(!e)break;o=e}if(s||=(e.someProp(`clipboardParser`)||e.someProp(`domParser`)||Jc.fromSchema(e.state.schema)).parseSlice(o,{preserveWhitespace:!!(c||u),context:i,ruleFromNode(e){return e.nodeName==`BR`&&!e.nextSibling&&e.parentNode&&!oee.test(e.parentNode.nodeName)?{ignore:!0}:null}}),u)s=Cm(hm(s,+u[1],+u[2]),u[4]);else if(s=V.maxOpen(see(s.content,i),!0),s.openStart||s.openEnd){let e=0,t=0;for(let t=s.content.firstChild;e<s.openStart&&!t.type.spec.isolating;e++,t=t.firstChild);for(let e=s.content.lastChild;t<s.openEnd&&!e.type.spec.isolating;t++,e=e.lastChild);s=hm(s,e,t)}return e.someProp(`transformPasted`,t=>{s=t(s,e,c)}),s}var oee=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function see(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.index(n)),i,a=[];if(e.forEach(e=>{if(!a)return;let t=r.findWrapping(e.type),n;if(!t)return a=null;if(n=a.length&&i.length&&fm(t,i,e,a[a.length-1],0))a[a.length-1]=n;else{a.length&&(a[a.length-1]=pm(a[a.length-1],i.length));let n=dm(e,t);a.push(n),r=r.matchType(n.type),i=t}}),a)return B.from(a)}return e}function dm(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,B.from(e));return e}function fm(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let a=fm(e,t,n,r.lastChild,i+1);if(a)return r.copy(r.content.replaceChild(r.childCount-1,a));if(r.contentMatchAt(r.childCount).matchType(i==e.length-1?n.type:e[i+1]))return r.copy(r.content.append(B.from(dm(n,e,i+1))))}}function pm(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,pm(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(B.empty,!0);return e.copy(n.append(r))}function mm(e,t,n,r,i,a){let o=t<0?e.firstChild:e.lastChild,s=o.content;return e.childCount>1&&(a=0),i<r-1&&(s=mm(s,t,n,r,i+1,a)),i>=n&&(s=t<0?o.contentMatchAt(0).fillBefore(s,a<=i).append(s):s.append(o.contentMatchAt(o.childCount).fillBefore(B.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,o.copy(s))}function hm(e,t,n){return t<e.openStart&&(e=new V(mm(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new V(mm(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}var gm={thead:[`table`],tbody:[`table`],tfoot:[`table`],caption:[`table`],colgroup:[`table`],col:[`table`,`colgroup`],tr:[`table`,`tbody`],td:[`table`,`tbody`,`tr`],th:[`table`,`tbody`,`tr`]},_m=null;function vm(){return _m||=document.implementation.createHTMLDocument(`title`)}var ym=null;function bm(e){let t=window.trustedTypes;return t?(ym||=t.defaultPolicy||t.createPolicy(`ProseMirrorClipboard`,{createHTML:e=>e}),ym.createHTML(e)):e}function xm(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=vm().createElement(`div`),r=/<([a-z][^>\s]+)/i.exec(e),i;if((i=r&&gm[r[1].toLowerCase()])&&(e=i.map(e=>`<`+e+`>`).join(``)+e+i.map(e=>`</`+e+`>`).reverse().join(``)),n.innerHTML=bm(e),i)for(let e=0;e<i.length;e++)n=n.querySelector(i[e])||n;return n}function Sm(e){let t=e.querySelectorAll(hf?`span:not([class]):not([style])`:`span.Apple-converted-space`);for(let n=0;n<t.length;n++){let r=t[n];r.childNodes.length==1&&r.textContent==`\xA0`&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(` `),r)}}function Cm(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,r;try{r=JSON.parse(t)}catch{return e}let{content:i,openStart:a,openEnd:o}=e;for(let e=r.length-2;e>=0;e-=2){let t=n.nodes[r[e]];if(!t||t.hasRequiredAttrs())break;i=B.from(t.create(r[e+1],i)),a++,o++}return new V(i,a,o)}var wm={},Tm={},Em={touchstart:!0,touchmove:!0},Dm=class{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:``,button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}};function Om(e){for(let t in wm){let n=wm[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=t=>{Nm(e,t)&&!Mm(e,t)&&(e.editable||!(t.type in Tm))&&n(e,t)},Em[t]?{passive:!0}:void 0)}_f&&e.dom.addEventListener(`input`,()=>null),jm(e)}function km(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function Am(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function jm(e){e.someProp(`handleDOMEvents`,t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=t=>Mm(e,t))})}function Mm(e,t){return e.someProp(`handleDOMEvents`,n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function Nm(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function Pm(e,t){!Mm(e,t)&&wm[t.type]&&(e.editable||!(t.type in Tm))&&wm[t.type](e,t)}Tm.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!Jm(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(xf&&hf&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),vf&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let t=Date.now();e.input.lastIOSEnter=t,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==t&&(e.someProp(`handleKeyDown`,t=>t(e,tf(13,`Enter`))),e.input.lastIOSEnter=0)},200)}else e.someProp(`handleKeyDown`,t=>t(e,n))||aee(e,n)?n.preventDefault():km(e,`key`)},Tm.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)},Tm.keypress=(e,t)=>{let n=t;if(Jm(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||yf&&n.metaKey)return;if(e.someProp(`handleKeyPress`,t=>t(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof Nu)||!r.$from.sameParent(r.$to)){let t=String.fromCharCode(n.charCode),i=()=>e.state.tr.insertText(t).scrollIntoView();!/[\r\n]/.test(t)&&!e.someProp(`handleTextInput`,n=>n(e,r.$from.pos,r.$to.pos,t,i))&&e.dispatch(i()),n.preventDefault()}};function Fm(e){return{left:e.clientX,top:e.clientY}}function Im(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function Lm(e,t,n,r,i){if(r==-1)return!1;let a=e.state.doc.resolve(r);for(let r=a.depth+1;r>0;r--)if(e.someProp(t,t=>r>a.depth?t(e,n,a.nodeAfter,a.before(r),i,!0):t(e,n,a.node(r),a.before(r),i,!1)))return!0;return!1}function Rm(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);n==`pointer`&&r.setMeta(`pointer`,!0),e.dispatch(r)}function zm(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&Fu.isSelectable(r)?(Rm(e,new Fu(n),`pointer`),!0):!1}function Bm(e,t){if(t==-1)return!1;let n=e.state.selection,r,i;n instanceof Fu&&(r=n.node);let a=e.state.doc.resolve(t);for(let e=a.depth+1;e>0;e--){let t=e>a.depth?a.nodeAfter:a.node(e);if(Fu.isSelectable(t)){i=r&&n.$from.depth>0&&e>=n.$from.depth&&a.before(n.$from.depth+1)==n.$from.pos?a.before(n.$from.depth):a.before(e);break}}return i==null?!1:(Rm(e,Fu.create(e.state.doc,i),`pointer`),!0)}function Vm(e,t,n,r,i){return Lm(e,`handleClickOn`,t,n,r)||e.someProp(`handleClick`,n=>n(e,t,r))||(i?Bm(e,n):zm(e,n))}function Hm(e,t,n,r){return Lm(e,`handleDoubleClickOn`,t,n,r)||e.someProp(`handleDoubleClick`,n=>n(e,t,r))}function Um(e,t,n,r){return Lm(e,`handleTripleClickOn`,t,n,r)||e.someProp(`handleTripleClick`,n=>n(e,t,r))||Wm(e,n,r)}function Wm(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?(Rm(e,Nu.create(r,0,r.content.size),`pointer`),!0):!1;let i=r.resolve(t);for(let t=i.depth+1;t>0;t--){let n=t>i.depth?i.nodeAfter:i.node(t),a=i.before(t);if(n.inlineContent)Rm(e,Nu.create(r,a+1,a+1+n.content.size),`pointer`);else if(Fu.isSelectable(n))Rm(e,Fu.create(r,a),`pointer`);else continue;return!0}}function Gm(e){return th(e)}var Km=yf?`metaKey`:`ctrlKey`;wm.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=Gm(e),i=Date.now(),a=`singleClick`;i-e.input.lastClick.time<500&&Im(n,e.input.lastClick)&&!n[Km]&&e.input.lastClick.button==n.button&&(e.input.lastClick.type==`singleClick`?a=`doubleClick`:e.input.lastClick.type==`doubleClick`&&(a=`tripleClick`)),e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:a,button:n.button};let o=e.posAtCoords(Fm(n));o&&(a==`singleClick`?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new qm(e,o,n,!!r)):(a==`doubleClick`?Hm:Um)(e,o.pos,o.inside,n)?n.preventDefault():km(e,`pointer`))};var qm=class{constructor(e,t,n,r){this.view=e,this.pos=t,this.event=n,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[Km],this.allowDefault=n.shiftKey;let i,a;if(t.inside>-1)i=e.state.doc.nodeAt(t.inside),a=t.inside;else{let n=e.state.doc.resolve(t.pos);i=n.parent,a=n.depth?n.before():0}let o=r?null:n.target,s=o?e.docView.nearestDesc(o,!0):null;this.target=s&&s.nodeDOM.nodeType==1?s.nodeDOM:null;let{selection:c}=e.state;n.button==0&&(i.type.spec.draggable&&i.type.spec.selectable!==!1||c instanceof Fu&&c.from<=a&&c.to>a)&&(this.mightDrag={node:i,pos:a,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&pf&&!this.target.hasAttribute(`contentEditable`))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute(`contentEditable`,`false`)},20),this.view.domObserver.start()),e.root.addEventListener(`mouseup`,this.up=this.up.bind(this)),e.root.addEventListener(`mousemove`,this.move=this.move.bind(this)),km(e,`pointer`)}done(){this.view.root.removeEventListener(`mouseup`,this.up),this.view.root.removeEventListener(`mousemove`,this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute(`draggable`),this.mightDrag.setUneditable&&this.target.removeAttribute(`contentEditable`),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Np(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Fm(e))),this.updateAllowDefault(e),this.allowDefault||!t?km(this.view,`pointer`):Vm(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||_f&&this.mightDrag&&!this.mightDrag.node.isAtom||hf&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(Rm(this.view,ku.near(this.view.state.doc.resolve(t.pos)),`pointer`),e.preventDefault()):km(this.view,`pointer`)}move(e){this.updateAllowDefault(e),km(this.view,`pointer`),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}};wm.touchstart=e=>{e.input.lastTouch=Date.now(),Gm(e),km(e,`pointer`)},wm.touchmove=e=>{e.input.lastTouch=Date.now(),km(e,`pointer`)},wm.contextmenu=e=>Gm(e);function Jm(e,t){return e.composing?!0:_f&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}var Ym=xf?5e3:-1;Tm.compositionstart=Tm.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof Nu&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(e=>e.type.spec.inclusive===!1)||hf&&bf&&Xm(e)))e.markCursor=e.state.storedMarks||n.marks(),th(e,!0),e.markCursor=null;else if(th(e,!t.selection.empty),pf&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let t=e.domSelectionRange();for(let n=t.focusNode,r=t.focusOffset;n&&n.nodeType==1&&r!=0;){let t=r<0?n.lastChild:n.childNodes[r-1];if(!t)break;if(t.nodeType==3){let n=e.domSelection();n&&n.collapse(t,t.nodeValue.length);break}else n=t,r=-1}}e.input.composing=!0}Zm(e,Ym)};function Xm(e){let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(!t||t.nodeType!=1||n>=t.childNodes.length)return!1;let r=t.childNodes[n];return r.nodeType==1&&r.contentEditable==`false`}Tm.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.badSafariComposition?e.domObserver.forceFlush():e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,Zm(e,20))};function Zm(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>th(e),t))}function Qm(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=eh());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function $m(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=Xd(t.focusNode,t.focusOffset),r=Zd(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let t=r.pmViewDesc,i=e.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!t||!t.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let e=n.pmViewDesc;if(!(!e||!e.isText(n.nodeValue)))return r}}return n||r}function eh(){let e=document.createEvent(`Event`);return e.initEvent(`event`,!0,!0),e.timeStamp}function th(e,t=!1){if(!(xf&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),Qm(e),t||e.docView&&e.docView.dirty){let n=jp(e),r=e.state.selection;return n&&!n.eq(r)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function nh(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement(`div`));n.appendChild(t),n.style.cssText=`position: fixed; left: -10000px; top: 10px`;let r=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}var rh=df&&ff<15||vf&&Cf<604;wm.copy=Tm.cut=(e,t)=>{let n=t,r=e.state.selection,i=n.type==`cut`;if(r.empty)return;let a=rh?null:n.clipboardData,{dom:o,text:s}=lm(e,r.content());a?(n.preventDefault(),a.clearData(),a.setData(`text/html`,o.innerHTML),a.setData(`text/plain`,s)):nh(e,o),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta(`uiEvent`,`cut`))};function ih(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function ah(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?`textarea`:`div`));n||(r.contentEditable=`true`),r.style.cssText=`position: fixed; left: -10000px; top: 10px`,r.focus();let i=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?oh(e,r.value,null,i,t):oh(e,r.textContent,r.innerHTML,i,t)},50)}function oh(e,t,n,r,i){let a=um(e,t,n,r,e.state.selection.$from);if(e.someProp(`handlePaste`,t=>t(e,i,a||V.empty)))return!0;if(!a)return!1;let o=ih(a),s=o?e.state.tr.replaceSelectionWith(o,r):e.state.tr.replaceSelection(a);return e.dispatch(s.scrollIntoView().setMeta(`paste`,!0).setMeta(`uiEvent`,`paste`)),!0}function sh(e){let t=e.getData(`text/plain`)||e.getData(`Text`);if(t)return t;let n=e.getData(`text/uri-list`);return n?n.replace(/\r?\n/g,` `):``}Tm.paste=(e,t)=>{let n=t;if(e.composing&&!xf)return;let r=rh?null:n.clipboardData,i=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&oh(e,sh(r),r.getData(`text/html`),i,n)?n.preventDefault():ah(e,n)};var ch=class{constructor(e,t,n){this.slice=e,this.move=t,this.node=n}},lh=yf?`altKey`:`ctrlKey`;function uh(e,t){let n;return e.someProp(`dragCopies`,e=>{n||=e(t)}),n==null?!t[lh]:!n}wm.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=e.state.selection,a=i.empty?null:e.posAtCoords(Fm(n)),o;if(!(a&&a.pos>=i.from&&a.pos<=(i instanceof Fu?i.to-1:i.to))){if(r&&r.mightDrag)o=Fu.create(e.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let t=e.docView.nearestDesc(n.target,!0);t&&t.node.type.spec.draggable&&t!=e.docView&&(o=Fu.create(e.state.doc,t.posBefore))}}let{dom:s,text:c,slice:l}=lm(e,(o||e.state.selection).content());(!n.dataTransfer.files.length||!hf||gf>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(rh?`Text`:`text/html`,s.innerHTML),n.dataTransfer.effectAllowed=`copyMove`,rh||n.dataTransfer.setData(`text/plain`,c),e.dragging=new ch(l,uh(e,n),o)},wm.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)},Tm.dragover=Tm.dragenter=(e,t)=>t.preventDefault(),Tm.drop=(e,t)=>{try{dh(e,t,e.dragging)}finally{e.dragging=null}};function dh(e,t,n){if(!t.dataTransfer)return;let r=e.posAtCoords(Fm(t));if(!r)return;let i=e.state.doc.resolve(r.pos),a=n&&n.slice;a?e.someProp(`transformPasted`,t=>{a=t(a,e,!1)}):a=um(e,sh(t.dataTransfer),rh?null:t.dataTransfer.getData(`text/html`),!1,i);let o=!!(n&&uh(e,t));if(e.someProp(`handleDrop`,n=>n(e,t,a||V.empty,o))){t.preventDefault();return}if(!a)return;t.preventDefault();let s=a?cu(e.state.doc,i.pos,a):i.pos;s??=i.pos;let c=e.state.tr;if(o){let{node:e}=n;e?e.replace(c):c.deleteSelection()}let l=c.mapping.map(s),u=a.openStart==0&&a.openEnd==0&&a.content.childCount==1,d=c.doc;if(u?c.replaceRangeWith(l,l,a.content.firstChild):c.replaceRange(l,l,a),c.doc.eq(d))return;let f=c.doc.resolve(l);if(u&&Fu.isSelectable(a.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(a.content.firstChild))c.setSelection(new Fu(f));else{let t=c.mapping.map(s);c.mapping.maps[c.mapping.maps.length-1].forEach((e,n,r,i)=>t=i),c.setSelection(Hp(e,f,c.doc.resolve(t)))}e.focus(),e.dispatch(c.setMeta(`uiEvent`,`drop`))}wm.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add(`ProseMirror-focused`),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&Np(e)},20))},wm.blur=(e,t)=>{let n=t;e.focused&&=(e.domObserver.stop(),e.dom.classList.remove(`ProseMirror-focused`),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),!1)},wm.beforeinput=(e,t)=>{if(hf&&xf&&t.inputType==`deleteContentBackward`){e.domObserver.flushSoon();let{domChangeCount:t}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=t||(e.dom.blur(),e.focus(),e.someProp(`handleKeyDown`,t=>t(e,tf(8,`Backspace`)))))return;let{$cursor:n}=e.state.selection;n&&n.pos>0&&e.dispatch(e.state.tr.delete(n.pos-1,n.pos).scrollIntoView())},50)}};for(let e in Tm)wm[e]=Tm[e];function fh(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}var ph=class e{constructor(e,t){this.toDOM=e,this.spec=t||_h,this.side=this.spec.side||0}map(e,t,n,r){let{pos:i,deleted:a}=e.mapResult(t.from+r,this.side<0?-1:1);return a?null:new hh(i-n,i-n,this)}valid(){return!0}eq(t){return this==t||t instanceof e&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&fh(this.spec,t.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}},mh=class e{constructor(e,t){this.attrs=e,this.spec=t||_h}map(e,t,n,r){let i=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,a=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return i>=a?null:new hh(i,a,this)}valid(e,t){return t.from<t.to}eq(t){return this==t||t instanceof e&&fh(this.attrs,t.attrs)&&fh(this.spec,t.spec)}static is(t){return t.type instanceof e}destroy(){}},cee=class e{constructor(e,t){this.attrs=e,this.spec=t||_h}map(e,t,n,r){let i=e.mapResult(t.from+r,1);if(i.deleted)return null;let a=e.mapResult(t.to+r,-1);return a.deleted||a.pos<=i.pos?null:new hh(i.pos-n,a.pos-n,this)}valid(e,t){let{index:n,offset:r}=e.content.findIndex(t.from),i;return r==t.from&&!(i=e.child(n)).isText&&r+i.nodeSize==t.to}eq(t){return this==t||t instanceof e&&fh(this.attrs,t.attrs)&&fh(this.spec,t.spec)}destroy(){}},hh=class e{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(t,n){return new e(t,n,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(t,n,r){return new e(t,t,new ph(n,r))}static inline(t,n,r,i){return new e(t,n,new mh(r,i))}static node(t,n,r,i){return new e(t,n,new cee(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof mh}get widget(){return this.type instanceof ph}},gh=[],_h={},vh=class e{constructor(e,t){this.local=e.length?e:gh,this.children=t.length?t:gh}static create(e,t){return t.length?Eh(t,e,0,_h):yh}find(e,t,n){let r=[];return this.findInner(e??0,t??1e9,r,0,n),r}findInner(e,t,n,r,i){for(let a=0;a<this.local.length;a++){let o=this.local[a];o.from<=t&&o.to>=e&&(!i||i(o.spec))&&n.push(o.copy(o.from+r,o.to+r))}for(let a=0;a<this.children.length;a+=3)if(this.children[a]<t&&this.children[a+1]>e){let o=this.children[a]+1;this.children[a+2].findInner(e-o,t-o,n,r+o,i)}}map(e,t,n){return this==yh||e.maps.length==0?this:this.mapInner(e,t,0,0,n||_h)}mapInner(t,n,r,i,a){let o;for(let e=0;e<this.local.length;e++){let s=this.local[e].map(t,r,i);s&&s.type.valid(n,s)?(o||=[]).push(s):a.onRemove&&a.onRemove(this.local[e].spec)}return this.children.length?xh(this.children,o||[],t,n,r,i,a):o?new e(o.sort(Dh),gh):yh}add(t,n){return n.length?this==yh?e.create(t,n):this.addInner(t,n,0):this}addInner(t,n,r){let i,a=0;t.forEach((e,t)=>{let o=t+r,s;if(s=wh(n,e,o)){for(i||=this.children.slice();a<i.length&&i[a]<t;)a+=3;i[a]==t?i[a+2]=i[a+2].addInner(e,s,o+1):i.splice(a,0,t,t+e.nodeSize,Eh(s,e,o+1,_h)),a+=3}});let o=Sh(a?Th(n):n,-r);for(let e=0;e<o.length;e++)o[e].type.valid(t,o[e])||o.splice(e--,1);return new e(o.length?this.local.concat(o).sort(Dh):this.local,i||this.children)}remove(e){return e.length==0||this==yh?this:this.removeInner(e,0)}removeInner(t,n){let r=this.children,i=this.local;for(let e=0;e<r.length;e+=3){let i,a=r[e]+n,o=r[e+1]+n;for(let e=0,n;e<t.length;e++)(n=t[e])&&n.from>a&&n.to<o&&(t[e]=null,(i||=[]).push(n));if(!i)continue;r==this.children&&(r=this.children.slice());let s=r[e+2].removeInner(i,a+1);s==yh?(r.splice(e,3),e-=3):r[e+2]=s}if(i.length){for(let e=0,r;e<t.length;e++)if(r=t[e])for(let e=0;e<i.length;e++)i[e].eq(r,n)&&(i==this.local&&(i=this.local.slice()),i.splice(e--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new e(i,r):yh}forChild(t,n){if(this==yh)return this;if(n.isLeaf)return e.empty;let r,i;for(let e=0;e<this.children.length;e+=3)if(this.children[e]>=t){this.children[e]==t&&(r=this.children[e+2]);break}let a=t+1,o=a+n.content.size;for(let e=0;e<this.local.length;e++){let t=this.local[e];if(t.from<o&&t.to>a&&t.type instanceof mh){let e=Math.max(a,t.from)-a,n=Math.min(o,t.to)-a;e<n&&(i||=[]).push(t.copy(e,n))}}if(i){let t=new e(i.sort(Dh),gh);return r?new bh([t,r]):t}return r||yh}eq(t){if(this==t)return!0;if(!(t instanceof e)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let e=0;e<this.local.length;e++)if(!this.local[e].eq(t.local[e]))return!1;for(let e=0;e<this.children.length;e+=3)if(this.children[e]!=t.children[e]||this.children[e+1]!=t.children[e+1]||!this.children[e+2].eq(t.children[e+2]))return!1;return!0}locals(e){return Oh(this.localsInner(e))}localsInner(e){if(this==yh)return gh;if(e.inlineContent||!this.local.some(mh.is))return this.local;let t=[];for(let e=0;e<this.local.length;e++)this.local[e].type instanceof mh||t.push(this.local[e]);return t}forEachSet(e){e(this)}};vh.empty=new vh([],[]),vh.removeOverlap=Oh;var yh=vh.empty,bh=class e{constructor(e){this.members=e}map(t,n){let r=this.members.map(e=>e.map(t,n,_h));return e.from(r)}forChild(t,n){if(n.isLeaf)return vh.empty;let r=[];for(let i=0;i<this.members.length;i++){let a=this.members[i].forChild(t,n);a!=yh&&(a instanceof e?r=r.concat(a.members):r.push(a))}return e.from(r)}eq(t){if(!(t instanceof e)||t.members.length!=this.members.length)return!1;for(let e=0;e<this.members.length;e++)if(!this.members[e].eq(t.members[e]))return!1;return!0}locals(e){let t,n=!0;for(let r=0;r<this.members.length;r++){let i=this.members[r].localsInner(e);if(i.length)if(!t)t=i;else{n&&=(t=t.slice(),!1);for(let e=0;e<i.length;e++)t.push(i[e])}}return t?Oh(n?t:t.sort(Dh)):gh}static from(t){switch(t.length){case 0:return yh;case 1:return t[0];default:return new e(t.every(e=>e instanceof vh)?t:t.reduce((e,t)=>e.concat(t instanceof vh?t:t.members),[]))}}forEachSet(e){for(let t=0;t<this.members.length;t++)this.members[t].forEachSet(e)}};function xh(e,t,n,r,i,a,o){let s=e.slice();for(let e=0,t=a;e<n.maps.length;e++){let r=0;n.maps[e].forEach((e,n,i,a)=>{let o=a-i-(n-e);for(let i=0;i<s.length;i+=3){let a=s[i+1];if(a<0||e>a+t-r)continue;let c=s[i]+t-r;n>=c?s[i+1]=e<=c?-2:-1:e>=t&&o&&(s[i]+=o,s[i+1]+=o)}r+=o}),t=n.maps[e].map(t,-1)}let c=!1;for(let t=0;t<s.length;t+=3)if(s[t+1]<0){if(s[t+1]==-2){c=!0,s[t+1]=-1;continue}let l=n.map(e[t]+a),u=l-i;if(u<0||u>=r.content.size){c=!0;continue}let d=n.map(e[t+1]+a,-1)-i,{index:f,offset:p}=r.content.findIndex(u),m=r.maybeChild(f);if(m&&p==u&&p+m.nodeSize==d){let r=s[t+2].mapInner(n,m,l+1,e[t]+a+1,o);r==yh?(s[t+1]=-2,c=!0):(s[t]=u,s[t+1]=d,s[t+2]=r)}else c=!0}if(c){let c=Eh(Ch(s,e,t,n,i,a,o),r,0,o);t=c.local;for(let e=0;e<s.length;e+=3)s[e+1]<0&&(s.splice(e,3),e-=3);for(let e=0,t=0;e<c.children.length;e+=3){let n=c.children[e];for(;t<s.length&&s[t]<n;)t+=3;s.splice(t,0,c.children[e],c.children[e+1],c.children[e+2])}}return new vh(t.sort(Dh),s)}function Sh(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let i=e[r];n.push(new hh(i.from+t,i.to+t,i.type))}return n}function Ch(e,t,n,r,i,a,o){function s(e,t){for(let a=0;a<e.local.length;a++){let s=e.local[a].map(r,i,t);s?n.push(s):o.onRemove&&o.onRemove(e.local[a].spec)}for(let n=0;n<e.children.length;n+=3)s(e.children[n+2],e.children[n]+t+1)}for(let n=0;n<e.length;n+=3)e[n+1]==-1&&s(e[n+2],t[n]+a+1);return n}function wh(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,i=null;for(let t=0,a;t<e.length;t++)(a=e[t])&&a.from>n&&a.to<r&&((i||=[]).push(a),e[t]=null);return i}function Th(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function Eh(e,t,n,r){let i=[],a=!1;t.forEach((t,o)=>{let s=wh(e,t,o+n);if(s){a=!0;let e=Eh(s,t,n+o+1,r);e!=yh&&i.push(o,o+t.nodeSize,e)}});let o=Sh(a?Th(e):e,-n).sort(Dh);for(let e=0;e<o.length;e++)o[e].type.valid(t,o[e])||(r.onRemove&&r.onRemove(o[e].spec),o.splice(e--,1));return o.length||i.length?new vh(o,i):yh}function Dh(e,t){return e.from-t.from||e.to-t.to}function Oh(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let i=n+1;i<t.length;i++){let a=t[i];if(a.from==r.from){a.to!=r.to&&(t==e&&(t=e.slice()),t[i]=a.copy(a.from,r.to),kh(t,i+1,a.copy(r.to,a.to)));continue}else{a.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,a.from),kh(t,i,r.copy(a.from,r.to)));break}}}return t}function kh(e,t,n){for(;t<e.length&&Dh(n,e[t])>0;)t++;e.splice(t,0,n)}function Ah(e){let t=[];return e.someProp(`decorations`,n=>{let r=n(e.state);r&&r!=yh&&t.push(r)}),e.cursorWrapper&&t.push(vh.create(e.state.doc,[e.cursorWrapper.deco])),bh.from(t)}var jh={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Mh=df&&ff<=11,Nh=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}},Ph=class{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Nh,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(t=>{for(let e=0;e<t.length;e++)this.queue.push(t[e]);df&&ff<=11&&t.some(e=>e.type==`childList`&&e.removedNodes.length||e.type==`characterData`&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():_f&&e.composing&&t.some(e=>e.type==`childList`&&e.target.nodeName==`TR`)?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),Mh&&(this.onCharData=e=>{this.queue.push({target:e.target,type:`characterData`,oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,jh)),this.onCharData&&this.view.dom.addEventListener(`DOMCharacterDataModified`,this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener(`DOMCharacterDataModified`,this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener(`selectionchange`,this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener(`selectionchange`,this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(Up(this.view)){if(this.suppressingSelectionUpdates)return Np(this.view);if(df&&ff<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Kd(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t=new Set,n;for(let n=e.focusNode;n;n=Hd(n))t.add(n);for(let r=e.anchorNode;r;r=Hd(r))if(t.has(r)){n=r;break}let r=n&&this.view.docView.nearestDesc(n);if(r&&r.ignoreMutation({type:`selection`,target:n.nodeType==3?n.parentNode:n}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.pendingRecords();t.length&&(this.queue=[]);let n=e.domSelectionRange(),r=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&Up(e)&&!this.ignoreSelectionChange(n),i=-1,a=-1,o=!1,s=[];if(e.editable)for(let e=0;e<t.length;e++){let n=this.registerMutation(t[e],s);n&&(i=i<0?n.from:Math.min(n.from,i),a=a<0?n.to:Math.max(n.to,a),n.typeOver&&(o=!0))}if(s.some(e=>e.nodeName==`BR`)&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46)){for(let e of s)if(e.nodeName==`BR`&&e.parentNode){let t=e.nextSibling;for(;t&&t.nodeType==1;){if(t.contentEditable==`false`){e.parentNode.removeChild(e);break}t=t.firstChild}}}else if(pf&&s.length){let t=s.filter(e=>e.nodeName==`BR`);if(t.length==2){let[e,n]=t;e.parentNode&&e.parentNode.parentNode==n.parentNode?n.remove():e.remove()}else{let{focusNode:n}=this.currentSelection;for(let r of t){let t=r.parentNode;t&&t.nodeName==`LI`&&(!n||Bh(e,n)!=t)&&r.remove()}}}let c=null;i<0&&r&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&ef(n)&&(c=jp(e))&&c.eq(ku.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Np(e),this.currentSelection.set(n),e.scrollToSelection()):(i>-1||r)&&(i>-1&&(e.docView.markDirty(i,a),Lh(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,Vh(e,s)),this.handleDOMChange(i,a,o,s),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(n)||Np(e),this.currentSelection.set(n))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if(e.type==`attributes`&&(n==this.view.docView||e.attributeName==`contenteditable`||e.attributeName==`style`&&!e.oldValue&&!e.target.getAttribute(`style`))||!n||n.ignoreMutation(e))return null;if(e.type==`childList`){for(let n=0;n<e.addedNodes.length;n++){let r=e.addedNodes[n];t.push(r),r.nodeType==3&&(this.lastChangedTextNode=r)}if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};let r=e.previousSibling,i=e.nextSibling;if(df&&ff<=11&&e.addedNodes.length)for(let t=0;t<e.addedNodes.length;t++){let{previousSibling:n,nextSibling:a}=e.addedNodes[t];(!n||Array.prototype.indexOf.call(e.addedNodes,n)<0)&&(r=n),(!a||Array.prototype.indexOf.call(e.addedNodes,a)<0)&&(i=a)}let a=r&&r.parentNode==e.target?Vd(r)+1:0,o=n.localPosFromDOM(e.target,a,-1),s=i&&i.parentNode==e.target?Vd(i):e.target.childNodes.length;return{from:o,to:n.localPosFromDOM(e.target,s,1)}}else if(e.type==`attributes`)return{from:n.posAtStart-n.border,to:n.posAtEnd+n.border};else return this.lastChangedTextNode=e.target,{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}}},Fh=new WeakMap,Ih=!1;function Lh(e){if(!Fh.has(e)&&(Fh.set(e,null),[`normal`,`nowrap`,`pre-line`].indexOf(getComputedStyle(e.dom).whiteSpace)!==-1)){if(e.requiresGeckoHackNode=pf,Ih)return;console.warn(`ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.`),Ih=!0}}function Rh(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,a=t.endOffset,o=e.domAtPos(e.state.selection.anchor);return Kd(o.node,o.offset,i,a)&&([n,r,i,a]=[i,a,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}}function zh(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return Rh(e,n)}let n;function r(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.dom.addEventListener(`beforeinput`,r,!0),document.execCommand(`indent`),e.dom.removeEventListener(`beforeinput`,r,!0),n?Rh(e,n):null}function Bh(e,t){for(let n=t.parentNode;n&&n!=e.dom;n=n.parentNode){let t=e.docView.nearestDesc(n,!0);if(t&&t.node.isBlock)return n}return null}function Vh(e,t){let{focusNode:n,focusOffset:r}=e.domSelectionRange();for(let i of t)if(i.parentNode?.nodeName==`TR`){let t=i.nextSibling;for(;t&&t.nodeName!=`TD`&&t.nodeName!=`TH`;)t=t.nextSibling;if(t){let a=t;for(;;){let e=a.firstChild;if(!e||e.nodeType!=1||e.contentEditable==`false`||/^(BR|IMG)$/.test(e.nodeName))break;a=e}a.insertBefore(i,a.firstChild),n==i&&e.domSelection().collapse(i,r)}else i.parentNode.removeChild(i)}}function Hh(e,t,n){let{node:r,fromOffset:i,toOffset:a,from:o,to:s}=e.docView.parseRange(t,n),c=e.domSelectionRange(),l,u=c.anchorNode;if(u&&e.dom.contains(u.nodeType==1?u:u.parentNode)&&(l=[{node:u,offset:c.anchorOffset}],ef(c)||l.push({node:c.focusNode,offset:c.focusOffset})),hf&&e.input.lastKeyCode===8)for(let e=a;e>i;e--){let t=r.childNodes[e-1],n=t.pmViewDesc;if(t.nodeName==`BR`&&!n){a=e;break}if(!n||n.size)break}let d=e.state.doc,f=e.someProp(`domParser`)||Jc.fromSchema(e.state.schema),p=d.resolve(o),m=null,h=f.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:i,to:a,preserveWhitespace:p.parent.type.whitespace==`pre`?`full`:!0,findPositions:l,ruleFromNode:Uh,context:p});if(l&&l[0].pos!=null){let e=l[0].pos,t=l[1]&&l[1].pos;t??=e,m={anchor:e+o,head:t+o}}return{doc:h,sel:m,from:o,to:s}}function Uh(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName==`BR`&&e.parentNode){if(_f&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let e=document.createElement(`div`);return e.appendChild(document.createElement(`li`)),{skip:e}}else if(e.parentNode.lastChild==e||_f&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName==`IMG`&&e.getAttribute(`mark-placeholder`))return{ignore:!0};return null}var Wh=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function Gh(e,t,n,r,i){let a=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let t=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,n=jp(e,t);if(n&&!e.state.selection.eq(n)){if(hf&&xf&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp(`handleKeyDown`,t=>t(e,tf(13,`Enter`))))return;let r=e.state.tr.setSelection(n);t==`pointer`?r.setMeta(`pointer`,!0):t==`key`&&r.scrollIntoView(),a&&r.setMeta(`composition`,a),e.dispatch(r)}return}let o=e.state.doc.resolve(t),s=o.sharedDepth(n);t=o.before(s+1),n=e.state.doc.resolve(n).after(s+1);let c=e.state.selection,l=Hh(e,t,n),u=e.state.doc,d=u.slice(l.from,l.to),f,p;e.input.lastKeyCode===8&&Date.now()-100<e.input.lastKeyCodeTime?(f=e.state.selection.to,p=`end`):(f=e.state.selection.from,p=`start`),e.input.lastKeyCode=null;let m=Xh(d.content,l.doc.content,l.from,f,p);if(m&&e.input.domChangeCount++,(vf&&e.input.lastIOSEnter>Date.now()-225||xf)&&i.some(e=>e.nodeType==1&&!Wh.test(e.nodeName))&&(!m||m.endA>=m.endB)&&e.someProp(`handleKeyDown`,t=>t(e,tf(13,`Enter`)))){e.input.lastIOSEnter=0;return}if(!m)if(r&&c instanceof Nu&&!c.empty&&c.$head.sameParent(c.$anchor)&&!e.composing&&!(l.sel&&l.sel.anchor!=l.sel.head))m={start:c.from,endA:c.to,endB:c.to};else{if(l.sel){let t=Kh(e,e.state.doc,l.sel);if(t&&!t.eq(e.state.selection)){let n=e.state.tr.setSelection(t);a&&n.setMeta(`composition`,a),e.dispatch(n)}}return}e.state.selection.from<e.state.selection.to&&m.start==m.endB&&e.state.selection instanceof Nu&&(m.start>e.state.selection.from&&m.start<=e.state.selection.from+2&&e.state.selection.from>=l.from?m.start=e.state.selection.from:m.endA<e.state.selection.to&&m.endA>=e.state.selection.to-2&&e.state.selection.to<=l.to&&(m.endB+=e.state.selection.to-m.endA,m.endA=e.state.selection.to)),df&&ff<=11&&m.endB==m.start+1&&m.endA==m.start&&m.start>l.from&&l.doc.textBetween(m.start-l.from-1,m.start-l.from+1)==` \xA0`&&(m.start--,m.endA--,m.endB--);let h=l.doc.resolveNoCache(m.start-l.from),g=l.doc.resolveNoCache(m.endB-l.from),_=u.resolve(m.start),v=h.sameParent(g)&&h.parent.inlineContent&&_.end()>=m.endA;if((vf&&e.input.lastIOSEnter>Date.now()-225&&(!v||i.some(e=>e.nodeName==`DIV`||e.nodeName==`P`))||!v&&h.pos<l.doc.content.size&&(!h.sameParent(g)||!h.parent.inlineContent)&&h.pos<g.pos&&!/\S/.test(l.doc.textBetween(h.pos,g.pos,``,``)))&&e.someProp(`handleKeyDown`,t=>t(e,tf(13,`Enter`)))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>m.start&&Jh(u,m.start,m.endA,h,g)&&e.someProp(`handleKeyDown`,t=>t(e,tf(8,`Backspace`)))){xf&&hf&&e.domObserver.suppressSelectionUpdates();return}hf&&m.endB==m.start&&(e.input.lastChromeDelete=Date.now()),xf&&!v&&h.start()!=g.start()&&g.parentOffset==0&&h.depth==g.depth&&l.sel&&l.sel.anchor==l.sel.head&&l.sel.head==m.endA&&(m.endB-=2,g=l.doc.resolveNoCache(m.endB-l.from),setTimeout(()=>{e.someProp(`handleKeyDown`,function(t){return t(e,tf(13,`Enter`))})},20));let y=m.start,b=m.endA,x=t=>{let n=t||e.state.tr.replace(y,b,l.doc.slice(m.start-l.from,m.endB-l.from));if(l.sel){let t=Kh(e,n.doc,l.sel);t&&!(hf&&e.composing&&t.empty&&(m.start!=m.endB||e.input.lastChromeDelete<Date.now()-100)&&(t.head==y||t.head==n.mapping.map(b)-1)||df&&t.empty&&t.head==y)&&n.setSelection(t)}return a&&n.setMeta(`composition`,a),n.scrollIntoView()},S;if(v)if(h.pos==g.pos){df&&ff<=11&&h.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>Np(e),20));let t=x(e.state.tr.delete(y,b)),n=u.resolve(m.start).marksAcross(u.resolve(m.endA));n&&t.ensureMarks(n),e.dispatch(t)}else if(m.endA==m.endB&&(S=qh(h.parent.content.cut(h.parentOffset,g.parentOffset),_.parent.content.cut(_.parentOffset,m.endA-_.start())))){let t=x(e.state.tr);S.type==`add`?t.addMark(y,b,S.mark):t.removeMark(y,b,S.mark),e.dispatch(t)}else if(h.parent.child(h.index()).isText&&h.index()==g.index()-+!g.textOffset){let t=h.parent.textBetween(h.parentOffset,g.parentOffset),n=()=>x(e.state.tr.insertText(t,y,b));e.someProp(`handleTextInput`,r=>r(e,y,b,t,n))||e.dispatch(n())}else e.dispatch(x());else e.dispatch(x())}function Kh(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:Hp(e,t.resolve(n.anchor),t.resolve(n.head))}function qh(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,i=n,a=r,o,s,c;for(let e=0;e<r.length;e++)i=r[e].removeFromSet(i);for(let e=0;e<n.length;e++)a=n[e].removeFromSet(a);if(i.length==1&&a.length==0)s=i[0],o=`add`,c=e=>e.mark(s.addToSet(e.marks));else if(i.length==0&&a.length==1)s=a[0],o=`remove`,c=e=>e.mark(s.removeFromSet(e.marks));else return null;let l=[];for(let e=0;e<t.childCount;e++)l.push(c(t.child(e)));if(B.from(l).eq(e))return{mark:s,type:o}}function Jh(e,t,n,r,i){if(n-t<=i.pos-r.pos||Yh(r,!0,!1)<i.pos)return!1;let a=e.resolve(t);if(!r.parent.isTextblock){let e=a.nodeAfter;return e!=null&&n==t+e.nodeSize}if(a.parentOffset<a.parent.content.size||!a.parent.isTextblock)return!1;let o=e.resolve(Yh(a,!0,!0));return!o.parent.isTextblock||o.pos>n||Yh(o,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(o.parent.content)}function Yh(e,t,n){let r=e.depth,i=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,i++,t=!1;if(n){let t=e.node(r).maybeChild(e.indexAfter(r));for(;t&&!t.isLeaf;)t=t.firstChild,i++}return i}function Xh(e,t,n,r,i){let a=e.findDiffStart(t,n);if(a==null)return null;let{a:o,b:s}=e.findDiffEnd(t,n+e.size,n+t.size);if(i==`end`){let e=Math.max(0,a-Math.min(o,s));r-=o+e-a}if(o<a&&e.size<t.size){let e=r<=a&&r>=o?a-r:0;a-=e,a&&a<t.size&&Zh(t.textBetween(a-1,a+1))&&(a+=e?1:-1),s=a+(s-o),o=a}else if(s<a){let t=r<=a&&r>=s?a-r:0;a-=t,a&&a<e.size&&Zh(e.textBetween(a-1,a+1))&&(a+=t?1:-1),o=a+(o-s),s=a}return{start:a,endA:o,endB:s}}function Zh(e){if(e.length!=2)return!1;let t=e.charCodeAt(0),n=e.charCodeAt(1);return t>=56320&&t<=57343&&n>=55296&&n<=56319}var Qh=class{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new Dm,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(ag),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement(`div`),e&&(e.appendChild?e.appendChild(this.dom):typeof e==`function`?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=tg(this),eg(this),this.nodeViews=rg(this),this.docView=dp(this.state.doc,$h(this),Ah(this),this.dom,this),this.domObserver=new Ph(this,(e,t,n,r)=>Gh(this,e,t,n,r)),this.domObserver.start(),Om(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&jm(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(ag),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let e in this._props)t[e]=this._props[e];t.state=this.state;for(let n in e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){let n=this.state,r=!1,i=!1;e.storedMarks&&this.composing&&(Qm(this),i=!0),this.state=e;let a=n.plugins!=e.plugins||this._props.plugins!=t.plugins;if(a||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let e=rg(this);ig(e,this.nodeViews)&&(this.nodeViews=e,r=!0)}(a||t.handleDOMEvents!=this._props.handleDOMEvents)&&jm(this),this.editable=tg(this),eg(this);let o=Ah(this),s=$h(this),c=n.plugins!=e.plugins&&!n.doc.eq(e.doc)?`reset`:e.scrollToSelection>n.scrollToSelection?`to selection`:`preserve`,l=r||!this.docView.matchesNode(e.doc,s,o);(l||!e.selection.eq(n.selection))&&(i=!0);let u=c==`preserve`&&i&&this.dom.style.overflowAnchor==null&&Of(this);if(i){this.domObserver.stop();let t=l&&(df||hf)&&!this.composing&&!n.selection.empty&&!e.selection.empty&&ng(n.selection,e.selection);if(l){let n=hf?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=$m(this)),(r||!this.docView.update(e.doc,s,o,this))&&(this.docView.updateOuterDeco(s),this.docView.destroy(),this.docView=dp(e.doc,s,o,this.dom,this)),n&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(t=!0)}t||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&Gp(this))?Np(this,t):(Bp(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(n),this.dragging?.node&&!n.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,n),c==`reset`?this.dom.scrollTop=0:c==`to selection`?this.scrollToSelection():u&&Af(u)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))&&!this.someProp(`handleScrollToSelection`,e=>e(this)))if(this.state.selection instanceof Fu){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&Df(this,t.getBoundingClientRect(),e)}else Df(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let e=0;e<this.directPlugins.length;e++){let t=this.directPlugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}for(let e=0;e<this.state.plugins.length;e++){let t=this.state.plugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}}else for(let t=0;t<this.pluginViews.length;t++){let n=this.pluginViews[t];n.update&&n.update(this,e)}}updateDraggedNode(e,t){let n=e.node,r=-1;if(n.from<this.state.doc.content.size&&this.state.doc.nodeAt(n.from)==n.node)r=n.from;else{let e=n.from+(this.state.doc.content.size-t.doc.content.size);(e>0&&e<this.state.doc.content.size&&this.state.doc.nodeAt(e))==n.node&&(r=e)}this.dragging=new ch(e.slice,e.move,r<0?void 0:Fu.create(this.state.doc,r))}someProp(e,t){let n=this._props&&this._props[e],r;if(n!=null&&(r=t?t(n):n))return r;for(let n=0;n<this.directPlugins.length;n++){let i=this.directPlugins[n].props[e];if(i!=null&&(r=t?t(i):i))return r}let i=this.state.plugins;if(i)for(let n=0;n<i.length;n++){let a=i[n].props[e];if(a!=null&&(r=t?t(a):a))return r}}hasFocus(){if(df){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable==`false`)return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&Nf(this.dom),Np(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let e=this.dom.parentNode;e;e=e.parentNode)if(e.nodeType==9||e.nodeType==11&&e.host)return e.getSelection||(Object.getPrototypeOf(e).getSelection=()=>e.ownerDocument.getSelection()),this._root=e}return e||document}updateRoot(){this._root=null}posAtCoords(e){return Vf(this,e)}coordsAtPos(e,t=1){return Gf(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,n=-1){let r=this.docView.posFromDOM(e,t,n);if(r==null)throw RangeError(`DOM position not inside the editor`);return r}endOfTextblock(e,t){return tp(this,t||this.state,e)}pasteHTML(e,t){return oh(this,``,e,!1,t||new ClipboardEvent(`paste`))}pasteText(e,t){return oh(this,e,null,!0,t||new ClipboardEvent(`paste`))}serializeForClipboard(e){return lm(this,e)}destroy(){this.docView&&(Am(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Ah(this),this),this.dom.textContent=``):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,Gd())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return Pm(this,e)}domSelectionRange(){let e=this.domSelection();return e?_f&&this.root.nodeType===11&&nf(this.dom.ownerDocument)==this.dom&&zh(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}};Qh.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))};function $h(e){let t=Object.create(null);return t.class=`ProseMirror`,t.contenteditable=String(e.editable),e.someProp(`attributes`,n=>{if(typeof n==`function`&&(n=n(e.state)),n)for(let e in n)e==`class`?t.class+=` `+n[e]:e==`style`?t.style=(t.style?t.style+`;`:``)+n[e]:!t[e]&&e!=`contenteditable`&&e!=`nodeName`&&(t[e]=String(n[e]))}),t.translate||=`no`,[hh.node(0,e.state.doc.content.size,t)]}function eg(e){if(e.markCursor){let t=document.createElement(`img`);t.className=`ProseMirror-separator`,t.setAttribute(`mark-placeholder`,`true`),t.setAttribute(`alt`,``),e.cursorWrapper={dom:t,deco:hh.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function tg(e){return!e.someProp(`editable`,t=>t(e.state)===!1)}function ng(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function rg(e){let t=Object.create(null);function n(e){for(let n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp(`nodeViews`,n),e.someProp(`markViews`,n),t}function ig(e,t){let n=0,r=0;for(let r in e){if(e[r]!=t[r])return!0;n++}for(let e in t)r++;return n!=r}function ag(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw RangeError(`Plugins passed directly to the view must not have a state component`)}for(var og={8:`Backspace`,9:`Tab`,10:`Enter`,12:`NumLock`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,44:`PrintScreen`,45:`Insert`,46:`Delete`,59:`;`,61:`=`,91:`Meta`,92:`Meta`,106:`*`,107:`+`,108:`,`,109:`-`,110:`.`,111:`/`,144:`NumLock`,145:`ScrollLock`,160:`Shift`,161:`Shift`,162:`Control`,163:`Control`,164:`Alt`,165:`Alt`,173:`-`,186:`;`,187:`=`,188:`,`,189:`-`,190:`.`,191:`/`,192:"`",219:`[`,220:`\\`,221:`]`,222:`'`},sg={48:`)`,49:`!`,50:`@`,51:`#`,52:`$`,53:`%`,54:`^`,55:`&`,56:`*`,57:`(`,59:`:`,61:`+`,173:`_`,186:`:`,187:`+`,188:`<`,189:`_`,190:`>`,191:`?`,192:`~`,219:`{`,220:`|`,221:`}`,222:`"`},cg=typeof navigator<`u`&&/Mac/.test(navigator.platform),lg=typeof navigator<`u`&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),ug=0;ug<10;ug++)og[48+ug]=og[96+ug]=String(ug);for(var ug=1;ug<=24;ug++)og[ug+111]=`F`+ug;for(var ug=65;ug<=90;ug++)og[ug]=String.fromCharCode(ug+32),sg[ug]=String.fromCharCode(ug);for(var dg in og)sg.hasOwnProperty(dg)||(sg[dg]=og[dg]);function fg(e){var t=!(cg&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||lg&&e.shiftKey&&e.key&&e.key.length==1||e.key==`Unidentified`)&&e.key||(e.shiftKey?sg:og)[e.keyCode]||e.key||`Unidentified`;return t==`Esc`&&(t=`Escape`),t==`Del`&&(t=`Delete`),t==`Left`&&(t=`ArrowLeft`),t==`Up`&&(t=`ArrowUp`),t==`Right`&&(t=`ArrowRight`),t==`Down`&&(t=`ArrowDown`),t}var pg=typeof navigator<`u`&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),mg=typeof navigator<`u`&&/Win/.test(navigator.platform);function hg(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n==`Space`&&(n=` `);let r,i,a,o;for(let e=0;e<t.length-1;e++){let n=t[e];if(/^(cmd|meta|m)$/i.test(n))o=!0;else if(/^a(lt)?$/i.test(n))r=!0;else if(/^(c|ctrl|control)$/i.test(n))i=!0;else if(/^s(hift)?$/i.test(n))a=!0;else if(/^mod$/i.test(n))pg?o=!0:i=!0;else throw Error(`Unrecognized modifier name: `+n)}return r&&(n=`Alt-`+n),i&&(n=`Ctrl-`+n),o&&(n=`Meta-`+n),a&&(n=`Shift-`+n),n}function gg(e){let t=Object.create(null);for(let n in e)t[hg(n)]=e[n];return t}function _g(e,t,n=!0){return t.altKey&&(e=`Alt-`+e),t.ctrlKey&&(e=`Ctrl-`+e),t.metaKey&&(e=`Meta-`+e),n&&t.shiftKey&&(e=`Shift-`+e),e}function vg(e){return new Zu({props:{handleKeyDown:yg(e)}})}function yg(e){let t=gg(e);return function(e,n){let r=fg(n),i,a=t[_g(r,n)];if(a&&a(e.state,e.dispatch,e))return!0;if(r.length==1&&r!=` `){if(n.shiftKey){let i=t[_g(r,n,!1)];if(i&&i(e.state,e.dispatch,e))return!0}if((n.altKey||n.metaKey||n.ctrlKey)&&!(mg&&n.ctrlKey&&n.altKey)&&(i=og[n.keyCode])&&i!=r){let r=t[_g(i,n)];if(r&&r(e.state,e.dispatch,e))return!0}}return!1}}var bg=Object.defineProperty,xg=(e,t)=>{for(var n in t)bg(e,n,{get:t[n],enumerable:!0})};function Sg(e){let{state:t,transaction:n}=e,{selection:r}=n,{doc:i}=n,{storedMarks:a}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return a},get selection(){return r},get doc(){return i},get tr(){return r=n.selection,i=n.doc,a=n.storedMarks,n}}}var Cg=class{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){let{rawCommands:e,editor:t,state:n}=this,{view:r}=t,{tr:i}=n,a=this.buildProps(i);return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,(...e)=>{let n=t(...e)(a);return!i.getMeta(`preventDispatch`)&&!this.hasCustomState&&r.dispatch(i),n}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){let{rawCommands:n,editor:r,state:i}=this,{view:a}=r,o=[],s=!!e,c=e||i.tr,l=()=>(!s&&t&&!c.getMeta(`preventDispatch`)&&!this.hasCustomState&&a.dispatch(c),o.every(e=>e===!0)),u={...Object.fromEntries(Object.entries(n).map(([e,n])=>[e,(...e)=>{let r=this.buildProps(c,t),i=n(...e)(r);return o.push(i),u}])),run:l};return u}createCan(e){let{rawCommands:t,state:n}=this,r=e||n.tr,i=this.buildProps(r,!1);return{...Object.fromEntries(Object.entries(t).map(([e,t])=>[e,(...e)=>t(...e)({...i,dispatch:void 0})])),chain:()=>this.createChain(r,!1)}}buildProps(e,t=!0){let{rawCommands:n,editor:r,state:i}=this,{view:a}=r,o={tr:e,editor:r,view:a,state:Sg({state:i,transaction:e}),dispatch:t?()=>void 0:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map(([e,t])=>[e,(...e)=>t(...e)(o)]))}};return o}},wg={};xg(wg,{blur:()=>Tg,clearContent:()=>Eg,clearNodes:()=>Dg,command:()=>Og,createParagraphNear:()=>kg,cut:()=>Ag,deleteCurrentNode:()=>jg,deleteNode:()=>Ng,deleteRange:()=>Pg,deleteSelection:()=>Fg,enter:()=>Ig,exitCode:()=>Lg,extendMarkRange:()=>Wg,first:()=>Gg,focus:()=>Qg,forEach:()=>$g,insertContent:()=>e_,insertContentAt:()=>o_,joinBackward:()=>l_,joinDown:()=>c_,joinForward:()=>u_,joinItemBackward:()=>d_,joinItemForward:()=>f_,joinTextblockBackward:()=>p_,joinTextblockForward:()=>m_,joinUp:()=>s_,keyboardShortcut:()=>__,lift:()=>y_,liftEmptyBlock:()=>b_,liftListItem:()=>x_,newlineInCode:()=>S_,resetAttributes:()=>T_,scrollIntoView:()=>E_,selectAll:()=>D_,selectNodeBackward:()=>O_,selectNodeForward:()=>k_,selectParentNode:()=>A_,selectTextblockEnd:()=>j_,selectTextblockStart:()=>M_,setContent:()=>P_,setMark:()=>Tv,setMeta:()=>Ev,setNode:()=>Dv,setNodeSelection:()=>Ov,setTextDirection:()=>kv,setTextSelection:()=>Av,sinkListItem:()=>jv,splitBlock:()=>Nv,splitListItem:()=>Pv,toggleList:()=>Rv,toggleMark:()=>zv,toggleNode:()=>Bv,toggleWrap:()=>Vv,undoInputRule:()=>Hv,unsetAllMarks:()=>Uv,unsetMark:()=>Wv,unsetTextDirection:()=>Gv,updateAttributes:()=>Kv,wrapIn:()=>qv,wrapInList:()=>Jv});var Tg=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),(n=window==null?void 0:window.getSelection())==null||n.removeAllRanges())}),!0),Eg=(e=!0)=>({commands:t})=>t.setContent(``,{emitUpdate:e}),Dg=()=>({state:e,tr:t,dispatch:n})=>{let{selection:r}=t,{ranges:i}=r;return n&&i.forEach(({$from:n,$to:r})=>{e.doc.nodesBetween(n.pos,r.pos,(e,n)=>{if(e.type.isText)return;let{doc:r,mapping:i}=t,a=r.resolve(i.map(n)),o=r.resolve(i.map(n+e.nodeSize)),s=a.blockRange(o);if(!s)return;let c=Hl(s);if(e.type.isTextblock){let{defaultType:e}=a.parent.contentMatchAt(a.index());t.setNodeMarkup(s.start,e)}(c||c===0)&&t.lift(s,c)})}),!0},Og=e=>t=>e(t),kg=()=>({state:e,dispatch:t})=>bd(e,t),Ag=(e,t)=>({editor:n,tr:r})=>{let{state:i}=n,a=i.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);let o=r.mapping.map(t);return r.insert(o,a.content),r.setSelection(new Nu(r.doc.resolve(Math.max(o-1,0)))),!0},jg=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;let i=e.selection.$anchor;for(let n=i.depth;n>0;--n)if(i.node(n).type===r.type){if(t){let t=i.before(n),r=i.after(n);e.delete(t,r).scrollIntoView()}return!0}return!1};function Mg(e,t){if(typeof e==`string`){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}var Ng=e=>({tr:t,state:n,dispatch:r})=>{let i=Mg(e,n.schema),a=t.selection.$anchor;for(let e=a.depth;e>0;--e)if(a.node(e).type===i){if(r){let n=a.before(e),r=a.after(e);t.delete(n,r).scrollIntoView()}return!0}return!1},Pg=e=>({tr:t,dispatch:n})=>{let{from:r,to:i}=e;return n&&t.delete(r,i),!0},Fg=()=>({state:e,dispatch:t})=>td(e,t),Ig=()=>({commands:e})=>e.keyboardShortcut(`Enter`),Lg=()=>({state:e,dispatch:t})=>yd(e,t);function Rg(e){return Object.prototype.toString.call(e)===`[object RegExp]`}function zg(e,t,n={strict:!0}){let r=Object.keys(t);return r.length?r.every(r=>n.strict?t[r]===e[r]:Rg(t[r])?t[r].test(e[r]):t[r]===e[r]):!0}function Bg(e,t,n={}){return e.find(e=>e.type===t&&zg(Object.fromEntries(Object.keys(n).map(t=>[t,e.attrs[t]])),n))}function Vg(e,t,n={}){return!!Bg(e,t,n)}function Hg(e,t,n){if(!e||!t)return;let r=e.parent.childAfter(e.parentOffset);if((!r.node||!r.node.marks.some(e=>e.type===t))&&(r=e.parent.childBefore(e.parentOffset)),!r.node||!r.node.marks.some(e=>e.type===t))return;if(!n){let e=r.node.marks.find(e=>e.type===t);e&&(n=e.attrs)}if(!Bg([...r.node.marks],t,n))return;let i=r.index,a=e.start()+r.offset,o=i+1,s=a+r.node.nodeSize;for(;i>0&&Vg([...e.parent.child(i-1).marks],t,n);)--i,a-=e.parent.child(i).nodeSize;for(;o<e.parent.childCount&&Vg([...e.parent.child(o).marks],t,n);)s+=e.parent.child(o).nodeSize,o+=1;return{from:a,to:s}}function Ug(e,t){if(typeof e==`string`){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}var Wg=(e,t)=>({tr:n,state:r,dispatch:i})=>{let a=Ug(e,r.schema),{doc:o,selection:s}=n,{$from:c,from:l,to:u}=s;if(i){let e=Hg(c,a,t);if(e&&e.from<=l&&e.to>=u){let t=Nu.create(o,e.from,e.to);n.setSelection(t)}}return!0},Gg=e=>t=>{let n=typeof e==`function`?e(t):e;for(let e=0;e<n.length;e+=1)if(n[e](t))return!0;return!1};function Kg(e){return e instanceof Nu}function qg(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function Jg(e,t=null){if(!t)return null;let n=ku.atStart(e),r=ku.atEnd(e);if(t===`start`||t===!0)return n;if(t===`end`)return r;let i=n.from,a=r.to;return t===`all`?Nu.create(e,qg(0,i,a),qg(e.content.size,i,a)):Nu.create(e,qg(t,i,a),qg(t,i,a))}function Yg(){return navigator.platform===`Android`||/android/i.test(navigator.userAgent)}function Xg(){return[`iPad Simulator`,`iPhone Simulator`,`iPod Simulator`,`iPad`,`iPhone`,`iPod`].includes(navigator.platform)||navigator.userAgent.includes(`Mac`)&&`ontouchend`in document}function Zg(){return typeof navigator<`u`?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1}var Qg=(e=null,t={})=>({editor:n,view:r,tr:i,dispatch:a})=>{t={scrollIntoView:!0,...t};let o=()=>{(Xg()||Yg())&&r.dom.focus(),Zg()&&!Xg()&&!Yg()&&r.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),t?.scrollIntoView&&n.commands.scrollIntoView())})};try{if(r.hasFocus()&&e===null||e===!1)return!0}catch{return!1}if(a&&e===null&&!Kg(n.state.selection))return o(),!0;let s=Jg(i.doc,e)||n.state.selection,c=n.state.selection.eq(s);return a&&(c||i.setSelection(s),c&&i.storedMarks&&i.setStoredMarks(i.storedMarks),o()),!0},$g=(e,t)=>n=>e.every((e,r)=>t(e,{...n,index:r})),e_=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),t_=e=>{let t=e.childNodes;for(let n=t.length-1;n>=0;--n){let r=t[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?e.removeChild(r):r.nodeType===1&&t_(r)}return e};function n_(e){if(typeof window>`u`)throw Error(`[tiptap error]: there is no window object available, so this function cannot be used`);let t=`<body>${e}</body>`,n=new window.DOMParser().parseFromString(t,`text/html`).body;return t_(n)}function r_(e,t,n){if(e instanceof bc||e instanceof B)return e;n={slice:!0,parseOptions:{},...n};let r=typeof e==`object`&&!!e,i=typeof e==`string`;if(r)try{if(Array.isArray(e)&&e.length>0)return B.fromArray(e.map(e=>t.nodeFromJSON(e)));let r=t.nodeFromJSON(e);return n.errorOnInvalidContent&&r.check(),r}catch(r){if(n.errorOnInvalidContent)throw Error(`[tiptap error]: Invalid JSON content`,{cause:r});return console.warn(`[tiptap warn]: Invalid content.`,`Passed value:`,e,`Error:`,r),r_(``,t,n)}if(i){if(n.errorOnInvalidContent){let r=!1,i=``,a=new Wc({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:`inline*`,group:`block`,parseDOM:[{tag:`*`,getAttrs:e=>(r=!0,i=typeof e==`string`?e:e.outerHTML,null)}]}})});if(n.slice?Jc.fromSchema(a).parseSlice(n_(e),n.parseOptions):Jc.fromSchema(a).parse(n_(e),n.parseOptions),n.errorOnInvalidContent&&r)throw Error(`[tiptap error]: Invalid HTML content`,{cause:Error(`Invalid element found: ${i}`)})}let r=Jc.fromSchema(t);return n.slice?r.parseSlice(n_(e),n.parseOptions).content:r.parse(n_(e),n.parseOptions)}return r_(``,t,n)}function i_(e,t,n){let r=e.steps.length-1;if(r<t)return;let i=e.steps[r];if(!(i instanceof Fl||i instanceof Il))return;let a=e.mapping.maps[r],o=0;a.forEach((e,t,n,r)=>{o===0&&(o=r)}),e.setSelection(ku.near(e.doc.resolve(o),n))}var a_=e=>!(`type`in e),o_=(e,t,n)=>({tr:r,dispatch:i,editor:a})=>{if(i){n={parseOptions:a.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let i,o=e=>{a.emit(`contentError`,{editor:a,error:e,disableCollaboration:()=>{`collaboration`in a.storage&&typeof a.storage.collaboration==`object`&&a.storage.collaboration&&(a.storage.collaboration.isDisabled=!0)}})},s={preserveWhitespace:`full`,...n.parseOptions};if(!n.errorOnInvalidContent&&!a.options.enableContentCheck&&a.options.emitContentError)try{r_(t,a.schema,{parseOptions:s,errorOnInvalidContent:!0})}catch(e){o(e)}try{i=r_(t,a.schema,{parseOptions:s,errorOnInvalidContent:n.errorOnInvalidContent??a.options.enableContentCheck})}catch(e){return o(e),!1}let{from:c,to:l}=typeof e==`number`?{from:e,to:e}:{from:e.from,to:e.to},u=!0,d=!0;if((a_(i)?i:[i]).forEach(e=>{e.check(),u=u?e.isText&&e.marks.length===0:!1,d=d?e.isBlock:!1}),c===l&&d){let{parent:e}=r.doc.resolve(c);e.isTextblock&&!e.type.spec.code&&!e.childCount&&(--c,l+=1)}let f;if(u){if(Array.isArray(t))f=t.map(e=>e.text||``).join(``);else if(t instanceof B){let e=``;t.forEach(t=>{t.text&&(e+=t.text)}),f=e}else f=typeof t==`object`&&t&&t.text?t.text:t;r.insertText(f,c,l)}else{f=i;let e=r.doc.resolve(c),t=e.node(),n=e.parentOffset===0,a=t.isText||t.isTextblock,o=t.content.size>0;n&&a&&o&&(c=Math.max(0,c-1)),r.replaceWith(c,l,f)}n.updateSelection&&i_(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta(`applyInputRules`,{from:c,text:f}),n.applyPasteRules&&r.setMeta(`applyPasteRules`,{from:c,text:f})}return!0},s_=()=>({state:e,dispatch:t})=>md(e,t),c_=()=>({state:e,dispatch:t})=>hd(e,t),l_=()=>({state:e,dispatch:t})=>rd(e,t),u_=()=>({state:e,dispatch:t})=>dd(e,t),d_=()=>({state:e,dispatch:t,tr:n})=>{try{let r=au(e.doc,e.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},f_=()=>({state:e,dispatch:t,tr:n})=>{try{let r=au(e.doc,e.selection.$from.pos,1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},p_=()=>({state:e,dispatch:t})=>id(e,t),m_=()=>({state:e,dispatch:t})=>ad(e,t);function h_(){return typeof navigator<`u`?/Mac/.test(navigator.platform):!1}function g_(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n===`Space`&&(n=` `);let r,i,a,o;for(let e=0;e<t.length-1;e+=1){let n=t[e];if(/^(cmd|meta|m)$/i.test(n))o=!0;else if(/^a(lt)?$/i.test(n))r=!0;else if(/^(c|ctrl|control)$/i.test(n))i=!0;else if(/^s(hift)?$/i.test(n))a=!0;else if(/^mod$/i.test(n))Xg()||h_()?o=!0:i=!0;else throw Error(`Unrecognized modifier name: ${n}`)}return r&&(n=`Alt-${n}`),i&&(n=`Ctrl-${n}`),o&&(n=`Meta-${n}`),a&&(n=`Shift-${n}`),n}var __=e=>({editor:t,view:n,tr:r,dispatch:i})=>{let a=g_(e).split(/-(?!$)/),o=a.find(e=>![`Alt`,`Ctrl`,`Meta`,`Shift`].includes(e)),s=new KeyboardEvent(`keydown`,{key:o===`Space`?` `:o,altKey:a.includes(`Alt`),ctrlKey:a.includes(`Ctrl`),metaKey:a.includes(`Meta`),shiftKey:a.includes(`Shift`),bubbles:!0,cancelable:!0});return t.captureTransaction(()=>{n.someProp(`handleKeyDown`,e=>e(n,s))})?.steps.forEach(e=>{let t=e.map(r.mapping);t&&i&&r.maybeStep(t)}),!0};function v_(e,t,n={}){let{from:r,to:i,empty:a}=e.selection,o=t?Mg(t,e.schema):null,s=[];e.doc.nodesBetween(r,i,(e,t)=>{if(e.isText)return;let n=Math.max(r,t),a=Math.min(i,t+e.nodeSize);s.push({node:e,from:n,to:a})});let c=i-r,l=s.filter(e=>o?o.name===e.node.type.name:!0).filter(e=>zg(e.node.attrs,n,{strict:!1}));return a?!!l.length:l.reduce((e,t)=>e+t.to-t.from,0)>=c}var y_=(e,t={})=>({state:n,dispatch:r})=>v_(n,Mg(e,n.schema),t)?gd(n,r):!1,b_=()=>({state:e,dispatch:t})=>xd(e,t),x_=e=>({state:t,dispatch:n})=>Ld(Mg(e,t.schema))(t,n),S_=()=>({state:e,dispatch:t})=>_d(e,t);function C_(e,t){return t.nodes[e]?`node`:t.marks[e]?`mark`:null}function w_(e,t){let n=typeof t==`string`?[t]:t;return Object.keys(e).reduce((t,r)=>(n.includes(r)||(t[r]=e[r]),t),{})}var T_=(e,t)=>({tr:n,state:r,dispatch:i})=>{let a=null,o=null,s=C_(typeof e==`string`?e:e.name,r.schema);if(!s)return!1;s===`node`&&(a=Mg(e,r.schema)),s===`mark`&&(o=Ug(e,r.schema));let c=!1;return n.selection.ranges.forEach(e=>{r.doc.nodesBetween(e.$from.pos,e.$to.pos,(e,r)=>{a&&a===e.type&&(c=!0,i&&n.setNodeMarkup(r,void 0,w_(e.attrs,t))),o&&e.marks.length&&e.marks.forEach(a=>{o===a.type&&(c=!0,i&&n.addMark(r,r+e.nodeSize,o.create(w_(a.attrs,t))))})})}),c},E_=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),D_=()=>({tr:e,dispatch:t})=>{if(t){let t=new Lu(e.doc);e.setSelection(t)}return!0},O_=()=>({state:e,dispatch:t})=>cd(e,t),k_=()=>({state:e,dispatch:t})=>fd(e,t),A_=()=>({state:e,dispatch:t})=>tee(e,t),j_=()=>({state:e,dispatch:t})=>Ed(e,t),M_=()=>({state:e,dispatch:t})=>Td(e,t);function N_(e,t,n={},r={}){return r_(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var P_=(e,{errorOnInvalidContent:t,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:i,tr:a,dispatch:o,commands:s})=>{let{doc:c}=a;if(r.preserveWhitespace!==`full`){let s=N_(e,i.schema,r,{errorOnInvalidContent:t??i.options.enableContentCheck});return o&&a.replaceWith(0,c.content.size,s).setMeta(`preventUpdate`,!n),!0}return o&&a.setMeta(`preventUpdate`,!n),s.insertContentAt({from:0,to:c.content.size},e,{parseOptions:r,errorOnInvalidContent:t??i.options.enableContentCheck})};function F_(e,t){let n=Ug(t,e.schema),{from:r,to:i,empty:a}=e.selection,o=[];a?(e.storedMarks&&o.push(...e.storedMarks),o.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,i,e=>{o.push(...e.marks)});let s=o.find(e=>e.type.name===n.name);return s?{...s.attrs}:{}}function I_(e,t){let n=new Du(e);return t.forEach(e=>{e.steps.forEach(e=>{n.step(e)})}),n}function L_(e){for(let t=0;t<e.edgeCount;t+=1){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function R_(e,t){let n=[];return e.descendants((e,r)=>{t(e)&&n.push({node:e,pos:r})}),n}function z_(e,t,n){let r=[];return e.nodesBetween(t.from,t.to,(e,t)=>{n(e)&&r.push({node:e,pos:t})}),r}function B_(e,t){for(let n=e.depth;n>0;--n){let r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function V_(e){return t=>B_(t.$from,e)}function H_(e,t,n){return e.config[t]===void 0&&e.parent?H_(e.parent,t,n):typeof e.config[t]==`function`?e.config[t].bind({...n,parent:e.parent?H_(e.parent,t,n):null}):e.config[t]}function U_(e){return e.map(e=>{let t=H_(e,`addExtensions`,{name:e.name,options:e.options,storage:e.storage});return t?[e,...U_(t())]:e}).flat(10)}function W_(e,t){let n=cl.fromSchema(t).serializeFragment(e),r=document.implementation.createHTMLDocument().createElement(`div`);return r.appendChild(n),r.innerHTML}function G_(e){return typeof e==`function`}function K_(e,t=void 0,...n){return G_(e)?t?e.bind(t)(...n):e(...n):e}function q_(e={}){return Object.keys(e).length===0&&e.constructor===Object}function J_(e){return{baseExtensions:e.filter(e=>e.type===`extension`),nodeExtensions:e.filter(e=>e.type===`node`),markExtensions:e.filter(e=>e.type===`mark`)}}function Y_(e){let t=[],{nodeExtensions:n,markExtensions:r}=J_(e),i=[...n,...r],a={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},o=n.filter(e=>e.name!==`text`).map(e=>e.name),s=r.map(e=>e.name),c=[...o,...s];return e.forEach(e=>{let n=H_(e,`addGlobalAttributes`,{name:e.name,options:e.options,storage:e.storage,extensions:i});n&&n().forEach(e=>{let n;n=Array.isArray(e.types)?e.types:e.types===`*`?c:e.types===`nodes`?o:e.types===`marks`?s:[],n.forEach(n=>{Object.entries(e.attributes).forEach(([e,r])=>{t.push({type:n,name:e,attribute:{...a,...r}})})})})}),i.forEach(e=>{let n=H_(e,`addAttributes`,{name:e.name,options:e.options,storage:e.storage});if(!n)return;let r=n();Object.entries(r).forEach(([n,r])=>{let i={...a,...r};typeof i?.default==`function`&&(i.default=i.default()),i?.isRequired&&i?.default===void 0&&delete i.default,t.push({type:e.name,name:n,attribute:i})})}),t}function lee(e){let t=[],n=``,r=!1,i=!1,a=0,o=e.length;for(let s=0;s<o;s+=1){let o=e[s];if(o===`'`&&!i){r=!r,n+=o;continue}if(o===`"`&&!r){i=!i,n+=o;continue}if(!r&&!i){if(o===`(`){a+=1,n+=o;continue}if(o===`)`&&a>0){--a,n+=o;continue}if(o===`;`&&a===0){t.push(n),n=``;continue}}n+=o}return n&&t.push(n),t}function X_(e){let t=[],n=lee(e||``),r=n.length;for(let e=0;e<r;e+=1){let r=n[e],i=r.indexOf(`:`);if(i===-1)continue;let a=r.slice(0,i).trim(),o=r.slice(i+1).trim();a&&o&&t.push([a,o])}return t}function Z_(...e){return e.filter(e=>!!e).reduce((e,t)=>{let n={...e};return Object.entries(t).forEach(([e,t])=>{if(!n[e]){n[e]=t;return}if(e===`class`){let r=t?String(t).split(` `):[],i=n[e]?n[e].split(` `):[],a=r.filter(e=>!i.includes(e));n[e]=[...i,...a].join(` `)}else if(e===`style`){let r=new Map([...X_(n[e]),...X_(t)]);n[e]=Array.from(r.entries()).map(([e,t])=>`${e}: ${t}`).join(`; `)}else n[e]=t}),n},{})}function Q_(e,t){return t.filter(t=>t.type===e.type.name).filter(e=>e.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(e.attrs)||{}:{[t.name]:e.attrs[t.name]}).reduce((e,t)=>Z_(e,t),{})}function uee(e){return typeof e==`string`?e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e===`true`?!0:e===`false`?!1:e:e}function $_(e,t){return`style`in e?e:{...e,getAttrs:n=>{let r=e.getAttrs?e.getAttrs(n):e.attrs;if(r===!1)return!1;let i=t.reduce((e,t)=>{let r=t.attribute.parseHTML?t.attribute.parseHTML(n):uee(n.getAttribute(t.name));return r==null?e:{...e,[t.name]:r}},{});return{...r,...i}}}}function ev(e){return Object.fromEntries(Object.entries(e).filter(([e,t])=>e===`attrs`&&q_(t)?!1:t!=null))}function tv(e){let t={};return!e?.attribute?.isRequired&&`default`in(e?.attribute||{})&&(t.default=e.attribute.default),e?.attribute?.validate!==void 0&&(t.validate=e.attribute.validate),[e.name,t]}function dee(e,t){let n=Y_(e),{nodeExtensions:r,markExtensions:i}=J_(e);return new Wc({topNode:r.find(e=>H_(e,`topNode`))?.name,nodes:Object.fromEntries(r.map(r=>{let i=n.filter(e=>e.type===r.name),a={name:r.name,options:r.options,storage:r.storage,editor:t},o=ev({...e.reduce((e,t)=>{let n=H_(t,`extendNodeSchema`,a);return{...e,...n?n(r):{}}},{}),content:K_(H_(r,`content`,a)),marks:K_(H_(r,`marks`,a)),group:K_(H_(r,`group`,a)),inline:K_(H_(r,`inline`,a)),atom:K_(H_(r,`atom`,a)),selectable:K_(H_(r,`selectable`,a)),draggable:K_(H_(r,`draggable`,a)),code:K_(H_(r,`code`,a)),whitespace:K_(H_(r,`whitespace`,a)),linebreakReplacement:K_(H_(r,`linebreakReplacement`,a)),defining:K_(H_(r,`defining`,a)),isolating:K_(H_(r,`isolating`,a)),attrs:Object.fromEntries(i.map(tv))}),s=K_(H_(r,`parseHTML`,a));s&&(o.parseDOM=s.map(e=>$_(e,i)));let c=H_(r,`renderHTML`,a);c&&(o.toDOM=e=>c({node:e,HTMLAttributes:Q_(e,i)}));let l=H_(r,`renderText`,a);return l&&(o.toText=l),[r.name,o]})),marks:Object.fromEntries(i.map(r=>{let i=n.filter(e=>e.type===r.name),a={name:r.name,options:r.options,storage:r.storage,editor:t},o=ev({...e.reduce((e,t)=>{let n=H_(t,`extendMarkSchema`,a);return{...e,...n?n(r):{}}},{}),inclusive:K_(H_(r,`inclusive`,a)),excludes:K_(H_(r,`excludes`,a)),group:K_(H_(r,`group`,a)),spanning:K_(H_(r,`spanning`,a)),code:K_(H_(r,`code`,a)),attrs:Object.fromEntries(i.map(tv))}),s=K_(H_(r,`parseHTML`,a));s&&(o.parseDOM=s.map(e=>$_(e,i)));let c=H_(r,`renderHTML`,a);return c&&(o.toDOM=e=>c({mark:e,HTMLAttributes:Q_(e,i)})),[r.name,o]}))})}function fee(e){let t=e.filter((t,n)=>e.indexOf(t)!==n);return Array.from(new Set(t))}function nv(e){return e.sort((e,t)=>{let n=H_(e,`priority`)||100,r=H_(t,`priority`)||100;return n>r?-1:+(n<r)})}function rv(e){let t=nv(U_(e)),n=fee(t.map(e=>e.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(e=>`'${e}'`).join(`, `)}]. This can lead to issues.`),t}function iv(e,t,n){let{from:r,to:i}=t,{blockSeparator:a=`
|
|
69
|
+
|
|
70
|
+
`,textSerializers:o={}}=n||{},s=``;return e.nodesBetween(r,i,(e,n,c,l)=>{e.isBlock&&n>r&&(s+=a);let u=o?.[e.type.name];if(u)return c&&(s+=u({node:e,pos:n,parent:c,index:l,range:t})),!1;e.isText&&(s+=(e?.text)?.slice(Math.max(r,n)-n,i-n))}),s}function pee(e,t){return iv(e,{from:0,to:e.content.size},t)}function av(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}function mee(e,t){let n=Mg(t,e.schema),{from:r,to:i}=e.selection,a=[];e.doc.nodesBetween(r,i,e=>{a.push(e)});let o=a.reverse().find(e=>e.type.name===n.name);return o?{...o.attrs}:{}}function ov(e,t){let n=C_(typeof t==`string`?t:t.name,e.schema);return n===`node`?mee(e,t):n===`mark`?F_(e,t):{}}function hee(e,t=JSON.stringify){let n={};return e.filter(e=>{let r=t(e);return Object.prototype.hasOwnProperty.call(n,r)?!1:n[r]=!0})}function gee(e){let t=hee(e);return t.length===1?t:t.filter((e,n)=>!t.filter((e,t)=>t!==n).some(t=>e.oldRange.from>=t.oldRange.from&&e.oldRange.to<=t.oldRange.to&&e.newRange.from>=t.newRange.from&&e.newRange.to<=t.newRange.to))}function sv(e){let{mapping:t,steps:n}=e,r=[];return t.maps.forEach((e,i)=>{let a=[];if(e.ranges.length)e.forEach((e,t)=>{a.push({from:e,to:t})});else{let{from:e,to:t}=n[i];if(e===void 0||t===void 0)return;a.push({from:e,to:t})}a.forEach(({from:e,to:n})=>{let a=t.slice(i).map(e,-1),o=t.slice(i).map(n),s=t.invert().map(a,-1),c=t.invert().map(o);r.push({oldRange:{from:s,to:c},newRange:{from:a,to:o}})})}),gee(r)}function cv(e,t,n){let r=[];return e===t?n.resolve(e).marks().forEach(t=>{let i=Hg(n.resolve(e),t.type);i&&r.push({mark:t,...i})}):n.nodesBetween(e,t,(e,t)=>{!e||e?.nodeSize===void 0||r.push(...e.marks.map(n=>({from:t,to:t+e.nodeSize,mark:n})))}),r}var lv=(e,t,n,r=20)=>{let i=e.doc.resolve(n),a=r,o=null;for(;a>0&&o===null;){let e=i.node(a);e?.type.name===t?o=e:--a}return[o,a]};function uv(e,t){return t.nodes[e]||t.marks[e]||null}function dv(e,t,n){return Object.fromEntries(Object.entries(n).filter(([n])=>{let r=e.find(e=>e.type===t&&e.name===n);return r?r.attribute.keepOnSplit:!1}))}var fv=(e,t=500)=>{let n=``,r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(e,t,i,a)=>{var o;let s=(o=e.type.spec).toText?.call(o,{node:e,pos:t,parent:i,index:a})||e.textContent||`%leaf%`;n+=e.isAtom&&!e.isText?s:s.slice(0,Math.max(0,r-t))}),n};function pv(e,t,n={}){let{empty:r,ranges:i}=e.selection,a=t?Ug(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(e=>a?a.name===e.type.name:!0).find(e=>zg(e.attrs,n,{strict:!1}));let o=0,s=[];if(i.forEach(({$from:t,$to:n})=>{let r=t.pos,i=n.pos;e.doc.nodesBetween(r,i,(e,t)=>{if(a&&e.inlineContent&&!e.type.allowsMarkType(a))return!1;if(!e.isText&&!e.marks.length)return;let n=Math.max(r,t),c=Math.min(i,t+e.nodeSize),l=c-n;o+=l,s.push(...e.marks.map(e=>({mark:e,from:n,to:c})))})}),o===0)return!1;let c=s.filter(e=>a?a.name===e.mark.type.name:!0).filter(e=>zg(e.mark.attrs,n,{strict:!1})).reduce((e,t)=>e+t.to-t.from,0),l=s.filter(e=>a?e.mark.type!==a&&e.mark.type.excludes(a):!0).reduce((e,t)=>e+t.to-t.from,0);return(c>0?c+l:c)>=o}function mv(e,t,n={}){if(!t)return v_(e,null,n)||pv(e,null,n);let r=C_(t,e.schema);return r===`node`?v_(e,t,n):r===`mark`?pv(e,t,n):!1}var hv=(e,t)=>{let{$from:n,$to:r,$anchor:i}=e.selection;if(t){let n=V_(e=>e.type.name===t)(e.selection);if(!n)return!1;let r=e.doc.resolve(n.pos+1);return i.pos+1===r.end()}return!(r.parentOffset<r.parent.nodeSize-2||n.pos!==r.pos)},gv=e=>{let{$from:t,$to:n}=e.selection;return!(t.parentOffset>0||t.pos!==n.pos)};function _v(e,t){return Array.isArray(t)?t.some(t=>(typeof t==`string`?t:t.name)===e.name):t}function vv(e,t){let{nodeExtensions:n}=J_(t),r=n.find(t=>t.name===e);if(!r)return!1;let i=K_(H_(r,`group`,{name:r.name,options:r.options,storage:r.storage}));return typeof i==`string`?i.split(` `).includes(`list`):!1}function yv(e,{checkChildren:t=!0,ignoreWhitespace:n=!1}={}){if(n){if(e.type.name===`hardBreak`)return!0;if(e.isText)return!/\S/.test(e.text??``)}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(e.content.childCount===0)return!0;if(t){let r=!0;return e.content.forEach(e=>{r!==!1&&(yv(e,{ignoreWhitespace:n,checkChildren:t})||(r=!1))}),r}return!1}function bv(e){return e instanceof Fu}var xv=class e{constructor(e){this.position=e}static fromJSON(t){return new e(t.position)}toJSON(){return{position:this.position}}};function Sv(e,t){let n=t.mapping.mapResult(e.position);return{position:new xv(n.pos),mapResult:n}}function Cv(e){return new xv(e)}function wv(e,t,n){let{selection:r}=t,i=null;if(Kg(r)&&(i=r.$cursor),i){let t=e.storedMarks??i.marks();return i.parent.type.allowsMarkType(n)&&(!!n.isInSet(t)||!t.some(e=>e.type.excludes(n)))}let{ranges:a}=r;return a.some(({$from:t,$to:r})=>{let i=t.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(n):!1;return e.doc.nodesBetween(t.pos,r.pos,(e,t,r)=>{if(i)return!1;if(e.isInline){let t=!r||r.type.allowsMarkType(n),a=!!n.isInSet(e.marks)||!e.marks.some(e=>e.type.excludes(n));i=t&&a}return!i}),i})}var Tv=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let{selection:a}=n,{empty:o,ranges:s}=a,c=Ug(e,r.schema);if(i)if(o){let e=F_(r,c);n.addStoredMark(c.create({...e,...t}))}else s.forEach(e=>{let i=e.$from.pos,a=e.$to.pos;r.doc.nodesBetween(i,a,(e,r)=>{let o=Math.max(r,i),s=Math.min(r+e.nodeSize,a);e.marks.find(e=>e.type===c)?e.marks.forEach(e=>{c===e.type&&n.addMark(o,s,c.create({...e.attrs,...t}))}):n.addMark(o,s,c.create(t))})});return wv(r,n,c)},Ev=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),Dv=(e,t={})=>({state:n,dispatch:r,chain:i})=>{let a=Mg(e,n.schema),o;return n.selection.$anchor.sameParent(n.selection.$head)&&(o=n.selection.$anchor.parent.attrs),a.isTextblock?i().command(({commands:e})=>Od(a,{...o,...t})(n)?!0:e.clearNodes()).command(({state:e})=>Od(a,{...o,...t})(e,r)).run():(console.warn(`[tiptap warn]: Currently "setNode()" only supports text block nodes.`),!1)},Ov=e=>({tr:t,dispatch:n})=>{if(n){let{doc:n}=t,r=qg(e,0,n.content.size),i=Fu.create(n,r);t.setSelection(i)}return!0},kv=(e,t)=>({tr:n,state:r,dispatch:i})=>{let{selection:a}=r,o,s;return typeof t==`number`?(o=t,s=t):t&&`from`in t&&`to`in t?(o=t.from,s=t.to):(o=a.from,s=a.to),i&&n.doc.nodesBetween(o,s,(t,r)=>{t.isText||n.setNodeMarkup(r,void 0,{...t.attrs,dir:e})}),!0},Av=e=>({tr:t,dispatch:n})=>{if(n){let{doc:n}=t,{from:r,to:i}=typeof e==`number`?{from:e,to:e}:e,a=Nu.atStart(n).from,o=Nu.atEnd(n).to,s=qg(r,a,o),c=qg(i,a,o),l=Nu.create(n,s,c);t.setSelection(l)}return!0},jv=e=>({state:t,dispatch:n})=>Bd(Mg(e,t.schema))(t,n);function Mv(e,t){let n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){let r=n.filter(e=>t?.includes(e.type.name));e.tr.ensureMarks(r)}}var Nv=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:i})=>{let{selection:a,doc:o}=t,{$from:s,$to:c}=a,l=i.extensionManager.attributes,u=dv(l,s.node().type.name,s.node().attrs);if(a instanceof Fu&&a.node.isBlock)return!s.parentOffset||!eu(o,s.pos)?!1:(r&&(e&&Mv(n,i.extensionManager.splittableMarks),t.split(s.pos).scrollIntoView()),!0);if(!s.parent.isBlock)return!1;let d=c.parentOffset===c.parent.content.size,f=s.depth===0?void 0:L_(s.node(-1).contentMatchAt(s.indexAfter(-1))),p=d&&f?[{type:f,attrs:u}]:void 0,m=eu(t.doc,t.mapping.map(s.pos),1,p);if(!p&&!m&&eu(t.doc,t.mapping.map(s.pos),1,f?[{type:f}]:void 0)&&(m=!0,p=f?[{type:f,attrs:u}]:void 0),r){if(m&&(a instanceof Nu&&t.deleteSelection(),t.split(t.mapping.map(s.pos),1,p),f&&!d&&!s.parentOffset&&s.parent.type!==f)){let e=t.mapping.map(s.before()),n=t.doc.resolve(e);s.node(-1).canReplaceWith(n.index(),n.index()+1,f)&&t.setNodeMarkup(t.mapping.map(s.before()),f)}e&&Mv(n,i.extensionManager.splittableMarks),t.scrollIntoView()}return m},Pv=(e,t={})=>({tr:n,state:r,dispatch:i,editor:a})=>{let o=Mg(e,r.schema),{$from:s,$to:c}=r.selection,l=r.selection.node;if(l&&l.isBlock||s.depth<2||!s.sameParent(c))return!1;let u=s.node(-1);if(u.type!==o)return!1;let d=a.extensionManager.attributes;if(s.parent.content.size===0&&s.node(-1).childCount===s.indexAfter(-1)){if(s.depth===2||s.node(-3).type!==o||s.index(-2)!==s.node(-2).childCount-1)return!1;if(i){let e=B.empty,r=s.index(-1)?1:s.index(-2)?2:3;for(let t=s.depth-r;t>=s.depth-3;--t)e=B.from(s.node(t).copy(e));let i=s.indexAfter(-1)<s.node(-2).childCount?1:s.indexAfter(-2)<s.node(-3).childCount?2:3,a={...dv(d,s.node().type.name,s.node().attrs),...t},c=o.contentMatch.defaultType?.createAndFill(a)||void 0;e=e.append(B.from(o.createAndFill(null,c)||void 0));let l=s.before(s.depth-(r-1));n.replace(l,s.after(-i),new V(e,4-r,0));let u=-1;n.doc.nodesBetween(l,n.doc.content.size,(e,t)=>{if(u>-1)return!1;e.isTextblock&&e.content.size===0&&(u=t+1)}),u>-1&&n.setSelection(Nu.near(n.doc.resolve(u))),n.scrollIntoView()}return!0}let f=c.pos===s.end()?u.contentMatchAt(0).defaultType:null,p={...dv(d,u.type.name,u.attrs),...t},m={...dv(d,s.node().type.name,s.node().attrs),...t};n.delete(s.pos,c.pos);let h=f?[{type:o,attrs:p},{type:f,attrs:m}]:[{type:o,attrs:p}];if(!eu(n.doc,s.pos,2))return!1;if(i){let{selection:e,storedMarks:t}=r,{splittableMarks:o}=a.extensionManager,c=t||e.$to.parentOffset&&e.$from.marks();if(n.split(s.pos,2,h).scrollIntoView(),!c||!i)return!0;let l=c.filter(e=>o.includes(e.type.name));n.ensureMarks(l)}return!0},Fv=(e,t)=>{let n=V_(e=>e.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;let i=e.doc.nodeAt(r);return n.node.type===i?.type&&nu(e.doc,n.pos)&&e.join(n.pos),!0},Iv=(e,t)=>{let n=V_(e=>e.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;let i=e.doc.nodeAt(r);return n.node.type===i?.type&&nu(e.doc,r)&&e.join(r),!0};function Lv(e){let t=e.doc,n=t.firstChild;if(!n)return null;let r=n.nodeSize-1;return Nu.create(t,1,r)}var Rv=(e,t,n,r={})=>({editor:i,tr:a,state:o,dispatch:s,chain:c,commands:l,can:u})=>{let{extensions:d,splittableMarks:f}=i.extensionManager,p=Mg(e,o.schema),m=Mg(t,o.schema),{selection:h,storedMarks:g}=o,{$from:_,$to:v}=h,y=_.blockRange(v),b=g||h.$to.parentOffset&&h.$from.marks();if(!y)return!1;let x=V_(e=>vv(e.type.name,d))(h),S=h.from===0&&h.to===o.doc.content.size,C=o.doc.content.content,w=C.length===1?C[0]:null,T=S&&w&&vv(w.type.name,d)?{node:w,pos:0,depth:0}:null,E=x??T,D=!!x&&y.depth>=1&&y.depth-x.depth<=1,O=!!T;if((D||O)&&E){if(E.node.type===p)return S&&O?c().command(({tr:e,dispatch:t})=>{let n=Lv(e);return n?(e.setSelection(n),t&&t(e),!0):!1}).liftListItem(m).run():l.liftListItem(m);if(vv(E.node.type.name,d)&&p.validContent(E.node.content))return c().command(()=>(a.setNodeMarkup(E.pos,p),!0)).command(()=>Fv(a,p)).command(()=>Iv(a,p)).run()}return!n||!b||!s?c().command(()=>u().wrapInList(p,r)?!0:l.clearNodes()).wrapInList(p,r).command(()=>Fv(a,p)).command(()=>Iv(a,p)).run():c().command(()=>{let e=u().wrapInList(p,r),t=b.filter(e=>f.includes(e.type.name));return a.ensureMarks(t),e?!0:l.clearNodes()}).wrapInList(p,r).command(()=>Fv(a,p)).command(()=>Iv(a,p)).run()},zv=(e,t={},n={})=>({state:r,commands:i})=>{let{extendEmptyMarkRange:a=!1}=n,o=Ug(e,r.schema);return pv(r,o,t)?i.unsetMark(o,{extendEmptyMarkRange:a}):i.setMark(o,t)},Bv=(e,t,n={})=>({state:r,commands:i})=>{let a=Mg(e,r.schema),o=Mg(t,r.schema),s=v_(r,a,n),c;return r.selection.$anchor.sameParent(r.selection.$head)&&(c=r.selection.$anchor.parent.attrs),s?i.setNode(o,c):i.setNode(a,{...c,...n})},Vv=(e,t={})=>({state:n,commands:r})=>{let i=Mg(e,n.schema);return v_(n,i,t)?r.lift(i):r.wrapIn(i,t)},Hv=()=>({state:e,dispatch:t})=>{let n=e.plugins;for(let r=0;r<n.length;r+=1){let i=n[r],a;if(i.spec.isInputRules&&(a=i.getState(e))){if(t){let t=e.tr,n=a.transform;for(let e=n.steps.length-1;e>=0;--e)t.step(n.steps[e].invert(n.docs[e]));if(a.text){let n=t.doc.resolve(a.from).marks();t.replaceWith(a.from,a.to,e.schema.text(a.text,n))}else t.delete(a.from,a.to)}return!0}}return!1},Uv=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,{empty:r,ranges:i}=n;return r||t&&i.forEach(t=>{e.removeMark(t.$from.pos,t.$to.pos)}),!0},Wv=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let{extendEmptyMarkRange:a=!1}=t,{selection:o}=n,s=Ug(e,r.schema),{$from:c,empty:l,ranges:u}=o;if(!i)return!0;if(l&&a){let{from:e,to:t}=o,r=Hg(c,s,c.marks().find(e=>e.type===s)?.attrs);r&&(e=r.from,t=r.to),n.removeMark(e,t,s)}else u.forEach(e=>{n.removeMark(e.$from.pos,e.$to.pos,s)});return n.removeStoredMark(s),!0},Gv=e=>({tr:t,state:n,dispatch:r})=>{let{selection:i}=n,a,o;return typeof e==`number`?(a=e,o=e):e&&`from`in e&&`to`in e?(a=e.from,o=e.to):(a=i.from,o=i.to),r&&t.doc.nodesBetween(a,o,(e,n)=>{if(e.isText)return;let r={...e.attrs};delete r.dir,t.setNodeMarkup(n,void 0,r)}),!0},Kv=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let a=null,o=null,s=C_(typeof e==`string`?e:e.name,r.schema);if(!s)return!1;s===`node`&&(a=Mg(e,r.schema)),s===`mark`&&(o=Ug(e,r.schema));let c=!1;return n.selection.ranges.forEach(e=>{let s=e.$from.pos,l=e.$to.pos,u,d,f,p;n.selection.empty?r.doc.nodesBetween(s,l,(e,t)=>{a&&a===e.type&&(c=!0,f=Math.max(t,s),p=Math.min(t+e.nodeSize,l),u=t,d=e)}):r.doc.nodesBetween(s,l,(e,r)=>{r<s&&a&&a===e.type&&(c=!0,f=Math.max(r,s),p=Math.min(r+e.nodeSize,l),u=r,d=e),r>=s&&r<=l&&(a&&a===e.type&&(c=!0,i&&n.setNodeMarkup(r,void 0,{...e.attrs,...t})),o&&e.marks.length&&e.marks.forEach(a=>{if(o===a.type&&(c=!0,i)){let i=Math.max(r,s),c=Math.min(r+e.nodeSize,l);n.addMark(i,c,o.create({...a.attrs,...t}))}}))}),d&&(u!==void 0&&i&&n.setNodeMarkup(u,void 0,{...d.attrs,...t}),o&&d.marks.length&&d.marks.forEach(e=>{o===e.type&&i&&n.addMark(f,p,o.create({...e.attrs,...t}))}))}),c},qv=(e,t={})=>({state:n,dispatch:r})=>Dd(Mg(e,n.schema),t)(n,r),Jv=(e,t={})=>({state:n,dispatch:r})=>Pd(Mg(e,n.schema),t)(n,r),Yv=class{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){let n=this.callbacks[e];return n&&n.forEach(e=>e.apply(this,t)),this}off(e,t){let n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter(e=>e!==t):delete this.callbacks[e]),this}once(e,t){let n=(...r)=>{this.off(e,n),t.apply(this,r)};return this.on(e,n)}removeAllListeners(){this.callbacks={}}},Xv=class{constructor(e){this.find=e.find,this.handler=e.handler,this.undoable=e.undoable??!0}},Zv=(e,t)=>{if(Rg(t))return t.exec(e);let n=t(e);if(!n)return null;let r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn(`[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".`),r.push(n.replaceWith)),r};function Qv(e){let{editor:t,from:n,to:r,text:i,rules:a,plugin:o}=e,{view:s}=t;if(s.composing)return!1;let c=s.state.doc.resolve(n);if(c.parent.type.spec.code||(c.nodeBefore||c.nodeAfter)?.marks.find(e=>e.type.spec.code))return!1;let l=!1,u=fv(c)+i;return a.forEach(e=>{if(l)return;let a=Zv(u,e.find);if(!a)return;let c=s.state.tr,d=Sg({state:s.state,transaction:c}),f={from:n-(a[0].length-i.length),to:r},{commands:p,chain:m,can:h}=new Cg({editor:t,state:d});e.handler({state:d,range:f,match:a,commands:p,chain:m,can:h})===null||!c.steps.length||(e.undoable&&c.setMeta(o,{transform:c,from:n,to:r,text:i}),s.dispatch(c),l=!0)}),l}function $v(e){let{editor:t,rules:n}=e,r=new Zu({state:{init(){return null},apply(e,i,a){let o=e.getMeta(r);if(o)return o;let s=e.getMeta(`applyInputRules`);return s&&setTimeout(()=>{let{text:e}=s;e=typeof e==`string`?e:W_(B.from(e),a.schema);let{from:i}=s;Qv({editor:t,from:i,to:i+e.length,text:e,rules:n,plugin:r})}),e.selectionSet||e.docChanged?null:i}},props:{handleTextInput(e,i,a,o){return Qv({editor:t,from:i,to:a,text:o,rules:n,plugin:r})},handleDOMEvents:{compositionend:e=>(setTimeout(()=>{let{$cursor:i}=e.state.selection;i&&Qv({editor:t,from:i.pos,to:i.pos,text:``,rules:n,plugin:r})}),!1)},handleKeyDown(e,i){if(i.key!==`Enter`)return!1;let{$cursor:a}=e.state.selection;return a?Qv({editor:t,from:a.pos,to:a.pos,text:`
|
|
71
|
+
`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function ey(e){return Object.prototype.toString.call(e).slice(8,-1)}function ty(e){return ey(e)===`Object`?e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype:!1}function ny(e,t){let n={...e};return ty(e)&&ty(t)&&Object.keys(t).forEach(r=>{ty(t[r])&&ty(e[r])?n[r]=ny(e[r],t[r]):n[r]=t[r]}),n}var ry=class{constructor(e={}){this.type=`extendable`,this.parent=null,this.child=null,this.name=``,this.config={name:this.name},this.config={...this.config,...e},this.name=this.config.name}get options(){return{...K_(H_(this,`addOptions`,{name:this.name}))||{}}}get storage(){return{...K_(H_(this,`addStorage`,{name:this.name,options:this.options}))||{}}}configure(e={}){let t=this.extend({...this.config,addOptions:()=>ny(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){let t=new this.constructor({...this.config,...e});return t.parent=this,this.child=t,t.name=`name`in e?e.name:t.parent.name,t}},iy=class e extends ry{constructor(){super(...arguments),this.type=`mark`}static create(t={}){return new e(typeof t==`function`?t():t)}static handleExit({editor:e,mark:t}){let{tr:n}=e.state,r=e.state.selection.$from;if(r.pos===r.end()){let i=r.marks();if(!i.find(e=>e?.type.name===t.name))return!1;let a=i.find(e=>e?.type.name===t.name);return a&&n.removeStoredMark(a),n.insertText(` `,r.pos),e.view.dispatch(n),!0}return!1}configure(e){return super.configure(e)}extend(e){let t=typeof e==`function`?e():e;return super.extend(t)}};function ay(e){return typeof e==`number`}var oy=class{constructor(e){this.find=e.find,this.handler=e.handler}},sy=(e,t,n)=>{if(Rg(t))return[...e.matchAll(t)];let r=t(e,n);return r?r.map(t=>{let n=[t.text];return n.index=t.index,n.input=e,n.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn(`[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".`),n.push(t.replaceWith)),n}):[]};function cy(e){let{editor:t,state:n,from:r,to:i,rule:a,pasteEvent:o,dropEvent:s}=e,{commands:c,chain:l,can:u}=new Cg({editor:t,state:n}),d=[];return n.doc.nodesBetween(r,i,(e,t)=>{if(e.type?.spec?.code||!(e.isText||e.isTextblock||e.isInline))return;let f=e.content?.size??e.nodeSize??0,p=Math.max(r,t),m=Math.min(i,t+f);p>=m||sy(e.isText?e.text||``:e.textBetween(p-t,m-t,void 0,``),a.find,o).forEach(e=>{if(e.index===void 0)return;let t=p+e.index+1,r=t+e[0].length,i={from:n.tr.mapping.map(t),to:n.tr.mapping.map(r)},f=a.handler({state:n,range:i,match:e,commands:c,chain:l,can:u,pasteEvent:o,dropEvent:s});d.push(f)})}),d.every(e=>e!==null)}var ly=null,uy=e=>{var t;let n=new ClipboardEvent(`paste`,{clipboardData:new DataTransfer});return(t=n.clipboardData)==null||t.setData(`text/html`,e),n};function dy(e){let{editor:t,rules:n}=e,r=null,i=!1,a=!1,o=typeof ClipboardEvent<`u`?new ClipboardEvent(`paste`):null,s;try{s=typeof DragEvent<`u`?new DragEvent(`drop`):null}catch{s=null}let c=({state:e,from:n,to:r,rule:i,pasteEvt:a})=>{let c=e.tr;if(!(!cy({editor:t,state:Sg({state:e,transaction:c}),from:Math.max(n-1,0),to:r.b-1,rule:i,pasteEvent:a,dropEvent:s})||!c.steps.length)){try{s=typeof DragEvent<`u`?new DragEvent(`drop`):null}catch{s=null}return o=typeof ClipboardEvent<`u`?new ClipboardEvent(`paste`):null,c}};return n.map(e=>new Zu({view(e){let n=n=>{r=e.dom.parentElement?.contains(n.target)?e.dom.parentElement:null,r&&(ly=t)},i=()=>{ly&&=null};return window.addEventListener(`dragstart`,n),window.addEventListener(`dragend`,i),{destroy(){window.removeEventListener(`dragstart`,n),window.removeEventListener(`dragend`,i)}}},props:{handleDOMEvents:{drop:(e,t)=>{if(a=r===e.dom.parentElement,s=t,!a){let e=ly;e?.isEditable&&setTimeout(()=>{let t=e.state.selection;t&&e.commands.deleteRange({from:t.from,to:t.to})},10)}return!1},paste:(e,t)=>{let n=t.clipboardData?.getData(`text/html`);return o=t,i=!!n?.includes(`data-pm-slice`),!1}}},appendTransaction:(t,n,r)=>{let s=t[0],l=s.getMeta(`uiEvent`)===`paste`&&!i,u=s.getMeta(`uiEvent`)===`drop`&&!a,d=s.getMeta(`applyPasteRules`),f=!!d;if(!l&&!u&&!f)return;if(f){let{text:t}=d;t=typeof t==`string`?t:W_(B.from(t),r.schema);let{from:n}=d,i=n+t.length,a=uy(t);return c({rule:e,state:r,from:n,to:{b:i},pasteEvt:a})}let p=n.doc.content.findDiffStart(r.doc.content),m=n.doc.content.findDiffEnd(r.doc.content);if(!(!ay(p)||!m||p===m.b))return c({rule:e,state:r,from:p,to:m,pasteEvt:o})}}))}var fy=class{constructor(e,t){this.splittableMarks=[],this.editor=t,this.baseExtensions=e,this.extensions=rv(e),this.schema=dee(this.extensions,t),this.setupExtensions()}get commands(){return this.extensions.reduce((e,t)=>{let n=H_(t,`addCommands`,{name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:uv(t.name,this.schema)});return n?{...e,...n()}:e},{})}get plugins(){let{editor:e}=this;return nv([...this.extensions].reverse()).flatMap(t=>{let n={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:e,type:uv(t.name,this.schema)},r=[],i=H_(t,`addKeyboardShortcuts`,n),a={};if(t.type===`mark`&&H_(t,`exitable`,n)&&(a.ArrowRight=()=>iy.handleExit({editor:e,mark:t})),i){let t=Object.fromEntries(Object.entries(i()).map(([t,n])=>[t,()=>n({editor:e})]));a={...a,...t}}let o=vg(a);r.push(o);let s=H_(t,`addInputRules`,n);if(_v(t,e.options.enableInputRules)&&s){let t=s();if(t&&t.length){let n=$v({editor:e,rules:t}),i=Array.isArray(n)?n:[n];r.push(...i)}}let c=H_(t,`addPasteRules`,n);if(_v(t,e.options.enablePasteRules)&&c){let t=c();if(t&&t.length){let n=dy({editor:e,rules:t});r.push(...n)}}let l=H_(t,`addProseMirrorPlugins`,n);if(l){let e=l();r.push(...e)}return r})}get attributes(){return Y_(this.extensions)}get nodeViews(){let{editor:e}=this,{nodeExtensions:t}=J_(this.extensions);return Object.fromEntries(t.filter(e=>!!H_(e,`addNodeView`)).map(t=>{let n=this.attributes.filter(e=>e.type===t.name),r=H_(t,`addNodeView`,{name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:e,type:Mg(t.name,this.schema)});if(!r)return[];let i=r();return i?[t.name,(r,a,o,s,c)=>i({node:r,view:a,getPos:o,decorations:s,innerDecorations:c,editor:e,extension:t,HTMLAttributes:Q_(r,n)})]:[]}))}dispatchTransaction(e){let{editor:t}=this;return nv([...this.extensions].reverse()).reduceRight((e,n)=>{let r={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:uv(n.name,this.schema)},i=H_(n,`dispatchTransaction`,r);return i?t=>{i.call(r,{transaction:t,next:e})}:e},e)}transformPastedHTML(e){let{editor:t}=this;return nv([...this.extensions]).reduce((e,n)=>{let r={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:uv(n.name,this.schema)},i=H_(n,`transformPastedHTML`,r);return i?(t,n)=>{let a=e(t,n);return i.call(r,a)}:e},e||(e=>e))}get markViews(){let{editor:e}=this,{markExtensions:t}=J_(this.extensions);return Object.fromEntries(t.filter(e=>!!H_(e,`addMarkView`)).map(t=>{let n=this.attributes.filter(e=>e.type===t.name),r=H_(t,`addMarkView`,{name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:e,type:Ug(t.name,this.schema)});return r?[t.name,(i,a,o)=>{let s=Q_(i,n);return r()({mark:i,view:a,inline:o,editor:e,extension:t,HTMLAttributes:s,updateAttributes:t=>{Xy(i,e,t)}})}]:[]}))}setupExtensions(){let e=this.extensions;this.editor.extensionStorage=Object.fromEntries(e.map(e=>[e.name,e.storage])),e.forEach(e=>{let t={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:uv(e.name,this.schema)};e.type===`mark`&&(K_(H_(e,`keepOnSplit`,t))??!0)&&this.splittableMarks.push(e.name);let n=H_(e,`onBeforeCreate`,t),r=H_(e,`onCreate`,t),i=H_(e,`onUpdate`,t),a=H_(e,`onSelectionUpdate`,t),o=H_(e,`onTransaction`,t),s=H_(e,`onFocus`,t),c=H_(e,`onBlur`,t),l=H_(e,`onDestroy`,t);n&&this.editor.on(`beforeCreate`,n),r&&this.editor.on(`create`,r),i&&this.editor.on(`update`,i),a&&this.editor.on(`selectionUpdate`,a),o&&this.editor.on(`transaction`,o),s&&this.editor.on(`focus`,s),c&&this.editor.on(`blur`,c),l&&this.editor.on(`destroy`,l)})}};fy.resolve=rv,fy.sort=nv,fy.flatten=U_;var py={};xg(py,{ClipboardTextSerializer:()=>hy,Commands:()=>gy,Delete:()=>_y,Drop:()=>vy,Editable:()=>yy,FocusEvents:()=>xy,Keymap:()=>Sy,Paste:()=>Cy,Tabindex:()=>wy,TextDirection:()=>Ty,focusEventsPluginKey:()=>by});var my=class e extends ry{constructor(){super(...arguments),this.type=`extension`}static create(t={}){return new e(typeof t==`function`?t():t)}configure(e){return super.configure(e)}extend(e){let t=typeof e==`function`?e():e;return super.extend(t)}},hy=my.create({name:`clipboardTextSerializer`,addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new Zu({key:new ed(`clipboardTextSerializer`),props:{clipboardTextSerializer:()=>{let{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:i}=t,{ranges:a}=i,o=Math.min(...a.map(e=>e.$from.pos)),s=Math.max(...a.map(e=>e.$to.pos)),c=av(n);return iv(r,{from:o,to:s},{...this.options.blockSeparator===void 0?{}:{blockSeparator:this.options.blockSeparator},textSerializers:c})}}})]}}),gy=my.create({name:`commands`,addCommands(){return{...wg}}}),_y=my.create({name:`delete`,onUpdate({transaction:e,appendedTransactions:t}){let n=()=>{var n;if(((n=this.editor.options.coreExtensionOptions?.delete)?.filterTransaction)?.call(n,e)??e.getMeta(`y-sync$`))return;let r=I_(e.before,[e,...t]);sv(r).forEach(t=>{r.mapping.mapResult(t.oldRange.from).deletedAfter&&r.mapping.mapResult(t.oldRange.to).deletedBefore&&r.before.nodesBetween(t.oldRange.from,t.oldRange.to,(n,i)=>{let a=i+n.nodeSize-2,o=t.oldRange.from<=i&&a<=t.oldRange.to;this.editor.emit(`delete`,{type:`node`,node:n,from:i,to:a,newFrom:r.mapping.map(i),newTo:r.mapping.map(a),deletedRange:t.oldRange,newRange:t.newRange,partial:!o,editor:this.editor,transaction:e,combinedTransform:r})})});let i=r.mapping;r.steps.forEach((t,n)=>{if(t instanceof Ml){let a=i.slice(n).map(t.from,-1),o=i.slice(n).map(t.to),s=i.invert().map(a,-1),c=i.invert().map(o),l=a>0?r.doc.nodeAt(a-1)?.marks.some(e=>e.eq(t.mark)):!1,u=r.doc.nodeAt(o)?.marks.some(e=>e.eq(t.mark));this.editor.emit(`delete`,{type:`mark`,mark:t.mark,from:t.from,to:t.to,deletedRange:{from:s,to:c},newRange:{from:a,to:o},partial:!!(u||l),editor:this.editor,transaction:e,combinedTransform:r})}})};this.editor.options.coreExtensionOptions?.delete?.async??!0?setTimeout(n,0):n()}}),vy=my.create({name:`drop`,addProseMirrorPlugins(){return[new Zu({key:new ed(`tiptapDrop`),props:{handleDrop:(e,t,n,r)=>{this.editor.emit(`drop`,{editor:this.editor,event:t,slice:n,moved:r})}}})]}}),yy=my.create({name:`editable`,addProseMirrorPlugins(){return[new Zu({key:new ed(`editable`),props:{editable:()=>this.editor.options.editable}})]}}),by=new ed(`focusEvents`),xy=my.create({name:`focusEvents`,addProseMirrorPlugins(){let{editor:e}=this;return[new Zu({key:by,props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;let r=e.state.tr.setMeta(`focus`,{event:n}).setMeta(`addToHistory`,!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;let r=e.state.tr.setMeta(`blur`,{event:n}).setMeta(`addToHistory`,!1);return t.dispatch(r),!1}}}})]}}),Sy=my.create({name:`keymap`,addKeyboardShortcuts(){let e=()=>this.editor.commands.first(({commands:e})=>[()=>e.undoInputRule(),()=>e.command(({tr:t})=>{let{selection:n,doc:r}=t,{empty:i,$anchor:a}=n,{pos:o,parent:s}=a,c=a.parent.isTextblock&&o>0?t.doc.resolve(o-1):a,l=c.parent.type.spec.isolating,u=a.pos-a.parentOffset,d=l&&c.parent.childCount===1?u===a.pos:ku.atStart(r).from===o;return!i||!s.type.isTextblock||s.textContent.length||!d||d&&a.parent.type.name===`paragraph`?!1:e.clearNodes()}),()=>e.deleteSelection(),()=>e.joinBackward(),()=>e.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:e})=>[()=>e.deleteSelection(),()=>e.deleteCurrentNode(),()=>e.joinForward(),()=>e.selectNodeForward()]),n={Enter:()=>this.editor.commands.first(({commands:e})=>[()=>e.newlineInCode(),()=>e.createParagraphNear(),()=>e.liftEmptyBlock(),()=>e.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},r={...n},i={...n,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return Xg()||h_()?i:r},addProseMirrorPlugins(){return[new Zu({key:new ed(`clearDocument`),appendTransaction:(e,t,n)=>{if(e.some(e=>e.getMeta(`composition`)))return;let r=e.some(e=>e.docChanged)&&!t.doc.eq(n.doc),i=e.some(e=>e.getMeta(`preventClearDocument`));if(!r||i)return;let{empty:a,from:o,to:s}=t.selection,c=ku.atStart(t.doc).from,l=ku.atEnd(t.doc).to;if(a||!(o===c&&s===l)||!yv(n.doc))return;let u=n.tr,d=Sg({state:n,transaction:u}),{commands:f}=new Cg({editor:this.editor,state:d});if(f.clearNodes(),u.steps.length)return u}})]}}),Cy=my.create({name:`paste`,addProseMirrorPlugins(){return[new Zu({key:new ed(`tiptapPaste`),props:{handlePaste:(e,t,n)=>{this.editor.emit(`paste`,{editor:this.editor,event:t,slice:n})}}})]}}),wy=my.create({name:`tabindex`,addProseMirrorPlugins(){return[new Zu({key:new ed(`tabindex`),props:{attributes:()=>this.editor.isEditable?{tabindex:`0`}:{}}})]}}),Ty=my.create({name:`textDirection`,addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];let{nodeExtensions:e}=J_(this.extensions);return[{types:e.filter(e=>e.name!==`text`).map(e=>e.name),attributes:{dir:{default:this.options.direction,parseHTML:e=>{let t=e.getAttribute(`dir`);return t&&(t===`ltr`||t===`rtl`||t===`auto`)?t:this.options.direction},renderHTML:e=>e.dir?{dir:e.dir}:{}}}}]},addProseMirrorPlugins(){return[new Zu({key:new ed(`textDirection`),props:{attributes:()=>{let e=this.options.direction;return e?{dir:e}:{}}}})]}}),Ey=class e{constructor(e,t,n=!1,r=null){this.currentNode=null,this.actualDepth=null,this.isBlock=n,this.resolvedPos=e,this.editor=t,this.currentNode=r}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){return this.actualDepth??this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let t=this.from,n=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can\u2019t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}t=this.from+1,n=this.to-1}this.editor.commands.insertContentAt({from:t,to:n},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+ +!this.node.isText}get parent(){if(this.depth===0)return null;let t=this.resolvedPos.start(this.resolvedPos.depth-1);return new e(this.resolvedPos.doc.resolve(t),this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new e(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new e(t,this.editor)}get children(){let t=[];return this.node.content.forEach((n,r)=>{let i=n.isBlock&&!n.isTextblock,a=n.isAtom&&!n.isText,o=n.isInline,s=this.pos+r+ +!a;if(s<0||s>this.resolvedPos.doc.nodeSize-2)return;let c=this.resolvedPos.doc.resolve(s);if(!i&&!o&&c.depth<=this.depth)return;let l=new e(c,this.editor,i,i||o?n:null);i&&(l.actualDepth=this.depth+1),t.push(l)}),t}get firstChild(){return this.children[0]||null}get lastChild(){let e=this.children;return e[e.length-1]||null}closest(e,t={}){let n=null,r=this.parent;for(;r&&!n;){if(r.node.type.name===e)if(Object.keys(t).length>0){let e=r.node.attrs,n=Object.keys(t);for(let r=0;r<n.length;r+=1){let i=n[r];if(e[i]!==t[i])break}}else n=r;r=r.parent}return n}querySelector(e,t={}){return this.querySelectorAll(e,t,!0)[0]||null}querySelectorAll(e,t={},n=!1){let r=[];if(!this.children||this.children.length===0)return r;let i=Object.keys(t);return this.children.forEach(a=>{n&&r.length>0||(a.node.type.name===e&&i.every(e=>t[e]===a.node.attrs[e])&&r.push(a),!(n&&r.length>0)&&(r=r.concat(a.querySelectorAll(e,t,n))))}),r}setAttribute(e){let{tr:t}=this.editor.state;t.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(t)}},Dy=`.ProseMirror {
|
|
72
|
+
position: relative;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.ProseMirror {
|
|
76
|
+
word-wrap: break-word;
|
|
77
|
+
white-space: pre-wrap;
|
|
78
|
+
white-space: break-spaces;
|
|
79
|
+
-webkit-font-variant-ligatures: none;
|
|
80
|
+
font-variant-ligatures: none;
|
|
81
|
+
font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.ProseMirror [contenteditable="false"] {
|
|
85
|
+
white-space: normal;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.ProseMirror [contenteditable="false"] [contenteditable="true"] {
|
|
89
|
+
white-space: pre-wrap;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.ProseMirror pre {
|
|
93
|
+
white-space: pre-wrap;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
img.ProseMirror-separator {
|
|
97
|
+
display: inline !important;
|
|
98
|
+
border: none !important;
|
|
99
|
+
margin: 0 !important;
|
|
100
|
+
width: 0 !important;
|
|
101
|
+
height: 0 !important;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.ProseMirror-gapcursor {
|
|
105
|
+
display: none;
|
|
106
|
+
pointer-events: none;
|
|
107
|
+
position: absolute;
|
|
108
|
+
margin: 0;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.ProseMirror-gapcursor:after {
|
|
112
|
+
content: "";
|
|
113
|
+
display: block;
|
|
114
|
+
position: absolute;
|
|
115
|
+
top: -2px;
|
|
116
|
+
width: 20px;
|
|
117
|
+
border-top: 1px solid black;
|
|
118
|
+
animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@keyframes ProseMirror-cursor-blink {
|
|
122
|
+
to {
|
|
123
|
+
visibility: hidden;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.ProseMirror-hideselection *::selection {
|
|
128
|
+
background: transparent;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.ProseMirror-hideselection *::-moz-selection {
|
|
132
|
+
background: transparent;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.ProseMirror-hideselection * {
|
|
136
|
+
caret-color: transparent;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.ProseMirror-focused .ProseMirror-gapcursor {
|
|
140
|
+
display: block;
|
|
141
|
+
}`;function Oy(e,t,n){let r=document.querySelector(`style[data-tiptap-style${n?`-${n}`:``}]`);if(r!==null)return r;let i=document.createElement(`style`);return t&&i.setAttribute(`nonce`,t),i.setAttribute(`data-tiptap-style${n?`-${n}`:``}`,``),i.innerHTML=e,document.getElementsByTagName(`head`)[0].appendChild(i),i}var ky=class extends Yv{constructor(e={}){super(),this.css=null,this.className=`tiptap`,this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<`u`?document.createElement(`div`):null,content:``,injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:e})=>{throw e},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:Sv,createMappablePosition:Cv},this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on(`beforeCreate`,this.options.onBeforeCreate),this.emit(`beforeCreate`,{editor:this}),this.on(`mount`,this.options.onMount),this.on(`unmount`,this.options.onUnmount),this.on(`contentError`,this.options.onContentError),this.on(`create`,this.options.onCreate),this.on(`update`,this.options.onUpdate),this.on(`selectionUpdate`,this.options.onSelectionUpdate),this.on(`transaction`,this.options.onTransaction),this.on(`focus`,this.options.onFocus),this.on(`blur`,this.options.onBlur),this.on(`destroy`,this.options.onDestroy),this.on(`drop`,({event:e,slice:t,moved:n})=>this.options.onDrop(e,t,n)),this.on(`paste`,({event:e,slice:t})=>this.options.onPaste(e,t)),this.on(`delete`,this.options.onDelete);let t=this.createDoc(),n=Jg(t,this.options.autofocus);this.editorState=Yu.create({doc:t,schema:this.schema,selection:n||void 0}),this.options.element&&this.mount(this.options.element)}mount(e){if(typeof document>`u`)throw Error(`[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.`);this.createView(e),this.emit(`mount`,{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit(`create`,{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){let e=this.editorView.dom;e?.editor&&delete e.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove==`function`?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(e){console.warn(`Failed to remove CSS element:`,e)}this.css=null,this.emit(`unmount`,{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<`u`&&(this.css=Oy(Dy,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit(`update`,{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:e=>{this.editorState=e},dispatch:e=>{this.dispatchTransaction(e)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(e,t)=>{if(this.editorView)return this.editorView[t];if(t===`state`)return this.editorState;if(t in e)return Reflect.get(e,t);throw Error(`[tiptap error]: The editor view is not available. Cannot access view['${t}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(e,t){let n=G_(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(e){if(this.isDestroyed)return;let t=this.state.plugins,n=t;if([].concat(e).forEach(e=>{let t=typeof e==`string`?`${e}$`:e.key;n=n.filter(e=>!e.key.startsWith(t))}),t.length===n.length)return;let r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){let e=[...this.options.enableCoreExtensions?[yy,hy.configure({blockSeparator:this.options.coreExtensionOptions?.clipboardTextSerializer?.blockSeparator}),gy,xy,Sy,wy,vy,Cy,_y,Ty.configure({direction:this.options.textDirection})].filter(e=>typeof this.options.enableCoreExtensions==`object`?this.options.enableCoreExtensions[e.name]!==!1:!0):[],...this.options.extensions].filter(e=>[`extension`,`node`,`mark`].includes(e?.type));this.extensionManager=new fy(e,this)}createCommandManager(){this.commandManager=new Cg({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let e;try{e=N_(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(t){if(!(t instanceof Error)||![`[tiptap error]: Invalid JSON content`,`[tiptap error]: Invalid HTML content`].includes(t.message))throw t;this.emit(`contentError`,{editor:this,error:t,disableCollaboration:()=>{`collaboration`in this.storage&&typeof this.storage.collaboration==`object`&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(e=>e.name!==`collaboration`),this.createExtensionManager()}}),e=N_(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return e}createView(e){let{editorProps:t,enableExtensionDispatchTransaction:n}=this.options,r=t.dispatchTransaction||this.dispatchTransaction.bind(this),i=n?this.extensionManager.dispatchTransaction(r):r,a=t.transformPastedHTML,o=this.extensionManager.transformPastedHTML(a);this.editorView=new Qh(e,{...t,attributes:{role:`textbox`,...t?.attributes},dispatchTransaction:i,transformPastedHTML:o,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});let s=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(s),this.prependClass(),this.injectCSS();let c=this.view.dom;c.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;let t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(e=>this.capturedTransaction?.step(e));return}let{state:t,transactions:n}=this.state.applyTransaction(e),r=!this.state.selection.eq(t.selection),i=n.includes(e),a=this.state;if(this.emit(`beforeTransaction`,{editor:this,transaction:e,nextState:t}),!i)return;this.view.updateState(t),this.emit(`transaction`,{editor:this,transaction:e,appendedTransactions:n.slice(1)}),r&&this.emit(`selectionUpdate`,{editor:this,transaction:e});let o=n.findLast(e=>e.getMeta(`focus`)||e.getMeta(`blur`)),s=o?.getMeta(`focus`),c=o?.getMeta(`blur`);s&&this.emit(`focus`,{editor:this,event:s.event,transaction:o}),c&&this.emit(`blur`,{editor:this,event:c.event,transaction:o}),!(e.getMeta(`preventUpdate`)||!n.some(e=>e.docChanged)||a.doc.eq(t.doc))&&this.emit(`update`,{editor:this,transaction:e,appendedTransactions:n.slice(1)})}getAttributes(e){return ov(this.state,e)}isActive(e,t){let n=typeof e==`string`?e:null,r=typeof e==`string`?t:e;return mv(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return W_(this.state.doc.content,this.schema)}getText(e){let{blockSeparator:t=`
|
|
142
|
+
|
|
143
|
+
`,textSerializers:n={}}=e||{};return pee(this.state.doc,{blockSeparator:t,textSerializers:{...av(this.schema),...n}})}get isEmpty(){return yv(this.state.doc)}destroy(){this.emit(`destroy`),this.unmount(),this.removeAllListeners()}get isDestroyed(){return this.editorView?.isDestroyed??!0}$node(e,t){return this.$doc?.querySelector(e,t)||null}$nodes(e,t){return this.$doc?.querySelectorAll(e,t)||null}$pos(e){return new Ey(this.state.doc.resolve(e),this)}get $doc(){return this.$pos(0)}};function Ay(e){return new Xv({find:e.find,handler:({state:t,range:n,match:r})=>{let i=K_(e.getAttributes,void 0,r);if(i===!1||i===null)return null;let{tr:a}=t,o=r[r.length-1],s=r[0];if(o){let r=s.search(/\S/),c=n.from+s.indexOf(o),l=c+o.length;if(cv(n.from,n.to,t.doc).filter(t=>t.mark.type.excluded.find(n=>n===e.type&&n!==t.mark.type)).filter(e=>e.to>c).length)return null;l<n.to&&a.delete(l,n.to),c>n.from&&a.delete(n.from+r,c);let u=n.from+r+o.length;a.addMark(n.from+r,u,e.type.create(i||{})),a.removeStoredMark(e.type)}},undoable:e.undoable})}function jy(e){return new Xv({find:e.find,handler:({state:t,range:n,match:r})=>{let i=K_(e.getAttributes,void 0,r)||{},{tr:a}=t,o=n.from,s=n.to,c=e.type.create(i);if(r[1]){let e=o+r[0].lastIndexOf(r[1]);e>s?e=s:s=e+r[1].length;let t=r[0][r[0].length-1];a.insertText(t,o+r[0].length-1),a.replaceWith(e,s,c)}else if(r[0]){let t=e.type.isInline?o:o-1;a.insert(t,e.type.create(i)).delete(a.mapping.map(o),a.mapping.map(s))}a.scrollIntoView()},undoable:e.undoable})}function My(e){return new Xv({find:e.find,handler:({state:t,range:n,match:r})=>{let i=t.doc.resolve(n.from),a=K_(e.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,a)},undoable:e.undoable})}function Ny(e){return new Xv({find:e.find,handler:({state:t,range:n,match:r})=>{let i=e.replace,a=n.from,o=n.to;if(r[1]){let e=r[0].lastIndexOf(r[1]);i+=r[0].slice(e+r[1].length),a+=e;let t=a-o;t>0&&(i=r[0].slice(e-t,e)+i,a=o)}t.tr.insertText(i,a,o)},undoable:e.undoable})}function Py(e){return new Xv({find:e.find,handler:({state:t,range:n,match:r,chain:i})=>{let a=K_(e.getAttributes,void 0,r)||{},o=t.tr.delete(n.from,n.to),s=o.doc.resolve(n.from).blockRange(),c=s&&Wl(s,e.type,a);if(!c)return null;if(o.wrap(s,c),e.keepMarks&&e.editor){let{selection:n,storedMarks:r}=t,{splittableMarks:i}=e.editor.extensionManager,a=r||n.$to.parentOffset&&n.$from.marks();if(a){let e=a.filter(e=>i.includes(e.type.name));o.ensureMarks(e)}}if(e.keepAttributes){let t=e.type.name===`bulletList`||e.type.name===`orderedList`?`listItem`:`taskList`;i().updateAttributes(t,a).run()}let l=o.doc.resolve(n.from-1).nodeBefore;l&&l.type===e.type&&nu(o.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,l))&&o.join(n.from-1)},undoable:e.undoable})}var Fy=e=>`touches`in e,Iy=class{constructor(e){this.directions=[`bottom-left`,`bottom-right`,`top-left`,`top-right`],this.minSize={height:8,width:8},this.preserveAspectRatio=!1,this.classNames={container:``,wrapper:``,handle:``,resizing:``},this.initialWidth=0,this.initialHeight=0,this.aspectRatio=1,this.isResizing=!1,this.activeHandle=null,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.isShiftKeyPressed=!1,this.lastEditableState=void 0,this.handleMap=new Map,this.handleMouseMove=e=>{if(!this.isResizing||!this.activeHandle)return;let t=e.clientX-this.startX,n=e.clientY-this.startY;this.handleResize(t,n)},this.handleTouchMove=e=>{if(!this.isResizing||!this.activeHandle)return;let t=e.touches[0];if(!t)return;let n=t.clientX-this.startX,r=t.clientY-this.startY;this.handleResize(n,r)},this.handleMouseUp=()=>{if(!this.isResizing)return;let e=this.element.offsetWidth,t=this.element.offsetHeight;this.onCommit(e,t),this.isResizing=!1,this.activeHandle=null,this.container.dataset.resizeState=`false`,this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener(`mousemove`,this.handleMouseMove),document.removeEventListener(`mouseup`,this.handleMouseUp),document.removeEventListener(`keydown`,this.handleKeyDown),document.removeEventListener(`keyup`,this.handleKeyUp)},this.handleKeyDown=e=>{e.key===`Shift`&&(this.isShiftKeyPressed=!0)},this.handleKeyUp=e=>{e.key===`Shift`&&(this.isShiftKeyPressed=!1)},this.node=e.node,this.editor=e.editor,this.element=e.element,this.contentElement=e.contentElement,this.getPos=e.getPos,this.onResize=e.onResize,this.onCommit=e.onCommit,this.onUpdate=e.onUpdate,e.options?.min&&(this.minSize={...this.minSize,...e.options.min}),e.options?.max&&(this.maxSize=e.options.max),e?.options?.directions&&(this.directions=e.options.directions),e.options?.preserveAspectRatio&&(this.preserveAspectRatio=e.options.preserveAspectRatio),e.options?.className&&(this.classNames={container:e.options.className.container||``,wrapper:e.options.className.wrapper||``,handle:e.options.className.handle||``,resizing:e.options.className.resizing||``}),e.options?.createCustomHandle&&(this.createCustomHandle=e.options.createCustomHandle),this.wrapper=this.createWrapper(),this.container=this.createContainer(),this.applyInitialSize(),this.attachHandles(),this.editor.on(`update`,this.handleEditorUpdate.bind(this))}get dom(){return this.container}get contentDOM(){return this.contentElement??null}handleEditorUpdate(){let e=this.editor.isEditable;e!==this.lastEditableState&&(this.lastEditableState=e,e?e&&this.handleMap.size===0&&this.attachHandles():this.removeHandles())}update(e,t,n){return e.type===this.node.type?(this.node=e,this.onUpdate?this.onUpdate(e,t,n):!0):!1}destroy(){this.isResizing&&(this.container.dataset.resizeState=`false`,this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener(`mousemove`,this.handleMouseMove),document.removeEventListener(`mouseup`,this.handleMouseUp),document.removeEventListener(`keydown`,this.handleKeyDown),document.removeEventListener(`keyup`,this.handleKeyUp),this.isResizing=!1,this.activeHandle=null),this.editor.off(`update`,this.handleEditorUpdate.bind(this)),this.container.remove()}createContainer(){let e=document.createElement(`div`);return e.dataset.resizeContainer=``,e.dataset.node=this.node.type.name,e.style.display=this.node.type.isInline?`inline-flex`:`flex`,this.classNames.container&&(e.className=this.classNames.container),e.appendChild(this.wrapper),e}createWrapper(){let e=document.createElement(`div`);return e.style.position=`relative`,e.style.display=`block`,e.dataset.resizeWrapper=``,this.classNames.wrapper&&(e.className=this.classNames.wrapper),e.appendChild(this.element),e}createHandle(e){let t=document.createElement(`div`);return t.dataset.resizeHandle=e,t.style.position=`absolute`,this.classNames.handle&&(t.className=this.classNames.handle),t}positionHandle(e,t){let n=t.includes(`top`),r=t.includes(`bottom`),i=t.includes(`left`),a=t.includes(`right`);n&&(e.style.top=`0`),r&&(e.style.bottom=`0`),i&&(e.style.left=`0`),a&&(e.style.right=`0`),(t===`top`||t===`bottom`)&&(e.style.left=`0`,e.style.right=`0`),(t===`left`||t===`right`)&&(e.style.top=`0`,e.style.bottom=`0`)}attachHandles(){this.directions.forEach(e=>{let t;t=this.createCustomHandle?this.createCustomHandle(e):this.createHandle(e),t instanceof HTMLElement||(console.warn(`[ResizableNodeView] createCustomHandle("${e}") did not return an HTMLElement. Falling back to default handle.`),t=this.createHandle(e)),this.createCustomHandle||this.positionHandle(t,e),t.addEventListener(`mousedown`,t=>this.handleResizeStart(t,e)),t.addEventListener(`touchstart`,t=>this.handleResizeStart(t,e)),this.handleMap.set(e,t),this.wrapper.appendChild(t)})}removeHandles(){this.handleMap.forEach(e=>e.remove()),this.handleMap.clear()}applyInitialSize(){let e=this.node.attrs.width,t=this.node.attrs.height;e?(this.element.style.width=`${e}px`,this.initialWidth=e):this.initialWidth=this.element.offsetWidth,t?(this.element.style.height=`${t}px`,this.initialHeight=t):this.initialHeight=this.element.offsetHeight,this.initialWidth>0&&this.initialHeight>0&&(this.aspectRatio=this.initialWidth/this.initialHeight)}handleResizeStart(e,t){e.preventDefault(),e.stopPropagation(),this.isResizing=!0,this.activeHandle=t,Fy(e)?(this.startX=e.touches[0].clientX,this.startY=e.touches[0].clientY):(this.startX=e.clientX,this.startY=e.clientY),this.startWidth=this.element.offsetWidth,this.startHeight=this.element.offsetHeight,this.startWidth>0&&this.startHeight>0&&(this.aspectRatio=this.startWidth/this.startHeight),this.getPos(),this.container.dataset.resizeState=`true`,this.classNames.resizing&&this.container.classList.add(this.classNames.resizing),document.addEventListener(`mousemove`,this.handleMouseMove),document.addEventListener(`touchmove`,this.handleTouchMove),document.addEventListener(`mouseup`,this.handleMouseUp),document.addEventListener(`keydown`,this.handleKeyDown),document.addEventListener(`keyup`,this.handleKeyUp)}handleResize(e,t){if(!this.activeHandle)return;let n=this.preserveAspectRatio||this.isShiftKeyPressed,{width:r,height:i}=this.calculateNewDimensions(this.activeHandle,e,t),a=this.applyConstraints(r,i,n);this.element.style.width=`${a.width}px`,this.element.style.height=`${a.height}px`,this.onResize&&this.onResize(a.width,a.height)}calculateNewDimensions(e,t,n){let r=this.startWidth,i=this.startHeight,a=e.includes(`right`),o=e.includes(`left`),s=e.includes(`bottom`),c=e.includes(`top`);return a?r=this.startWidth+t:o&&(r=this.startWidth-t),s?i=this.startHeight+n:c&&(i=this.startHeight-n),(e===`right`||e===`left`)&&(r=this.startWidth+(a?t:-t)),(e===`top`||e===`bottom`)&&(i=this.startHeight+(s?n:-n)),this.preserveAspectRatio||this.isShiftKeyPressed?this.applyAspectRatio(r,i,e):{width:r,height:i}}applyConstraints(e,t,n){if(!n){let n=Math.max(this.minSize.width,e),r=Math.max(this.minSize.height,t);return this.maxSize?.width&&(n=Math.min(this.maxSize.width,n)),this.maxSize?.height&&(r=Math.min(this.maxSize.height,r)),{width:n,height:r}}let r=e,i=t;return r<this.minSize.width&&(r=this.minSize.width,i=r/this.aspectRatio),i<this.minSize.height&&(i=this.minSize.height,r=i*this.aspectRatio),this.maxSize?.width&&r>this.maxSize.width&&(r=this.maxSize.width,i=r/this.aspectRatio),this.maxSize?.height&&i>this.maxSize.height&&(i=this.maxSize.height,r=i*this.aspectRatio),{width:r,height:i}}applyAspectRatio(e,t,n){return n===`left`||n===`right`?{width:e,height:e/this.aspectRatio}:n===`top`||n===`bottom`?{width:t*this.aspectRatio,height:t}:{width:e,height:e/this.aspectRatio}}};function Ly(e,t){let{selection:n}=e,{$from:r}=n;if(n instanceof Fu){let e=r.index();return r.parent.canReplaceWith(e,e+1,t)}let i=r.depth;for(;i>=0;){let e=r.index(i);if(r.node(i).contentMatchAt(e).matchType(t))return!0;--i}return!1}xg({},{createAtomBlockMarkdownSpec:()=>By,createBlockMarkdownSpec:()=>Vy,createInlineMarkdownSpec:()=>Wy,parseAttributes:()=>Ry,parseIndentedBlocks:()=>Gy,renderNestedMarkdownContent:()=>Ky,serializeAttributes:()=>zy});function Ry(e){if(!e?.trim())return{};let t={},n=[],r=e.replace(/["']([^"']*)["']/g,e=>(n.push(e),`__QUOTED_${n.length-1}__`)),i=r.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);i&&(t.class=i.map(e=>e.trim().slice(1)).join(` `));let a=r.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);a&&(t.id=a[1]),Array.from(r.matchAll(/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g)).forEach(([,e,r])=>{let i=n[parseInt(r.match(/__QUOTED_(\d+)__/)?.[1]||`0`,10)];i&&(t[e]=i.slice(1,-1))});let o=r.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g,``).replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g,``).replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,``).trim();return o&&o.split(/\s+/).filter(Boolean).forEach(e=>{e.match(/^[a-zA-Z][\w-]*$/)&&(t[e]=!0)}),t}function zy(e){if(!e||Object.keys(e).length===0)return``;let t=[];return e.class&&String(e.class).split(/\s+/).filter(Boolean).forEach(e=>t.push(`.${e}`)),e.id&&t.push(`#${e.id}`),Object.entries(e).forEach(([e,n])=>{e===`class`||e===`id`||(n===!0?t.push(e):n!==!1&&n!=null&&t.push(`${e}="${String(n)}"`))}),t.join(` `)}function By(e){let{nodeName:t,name:n,parseAttributes:r=Ry,serializeAttributes:i=zy,defaultAttributes:a={},requiredAttributes:o=[],allowedAttributes:s}=e,c=n||t,l=e=>{if(!s)return e;let t={};return s.forEach(n=>{n in e&&(t[n]=e[n])}),t};return{parseMarkdown:(e,n)=>{let r={...a,...e.attributes};return n.createNode(t,r,[])},markdownTokenizer:{name:t,level:`block`,start(e){let t=RegExp(`^:::${c}(?:\\s|$)`,`m`),n=e.match(t)?.index;return n===void 0?-1:n},tokenize(e,n,i){let a=RegExp(`^:::${c}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),s=e.match(a);if(!s)return;let l=r(s[1]||``);if(!o.find(e=>!(e in l)))return{type:t,raw:s[0],attributes:l}}},renderMarkdown:e=>{let t=i(l(e.attrs||{}));return`:::${c}${t?` {${t}}`:``} :::`}}}function Vy(e){let{nodeName:t,name:n,getContent:r,parseAttributes:i=Ry,serializeAttributes:a=zy,defaultAttributes:o={},content:s=`block`,allowedAttributes:c}=e,l=n||t,u=e=>{if(!c)return e;let t={};return c.forEach(n=>{n in e&&(t[n]=e[n])}),t};return{parseMarkdown:(e,n)=>{let i;if(r){let t=r(e);i=typeof t==`string`?[{type:`text`,text:t}]:t}else i=s===`block`?n.parseChildren(e.tokens||[]):n.parseInline(e.tokens||[]);let a={...o,...e.attributes};return n.createNode(t,a,i)},markdownTokenizer:{name:t,level:`block`,start(e){let t=RegExp(`^:::${l}`,`m`),n=e.match(t)?.index;return n===void 0?-1:n},tokenize(e,n,r){let a=RegExp(`^:::${l}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),o=e.match(a);if(!o)return;let[c,u=``]=o,d=i(u),f=1,p=c.length,m=``,h=/^:::([\w-]*)(\s.*)?/gm,g=e.slice(p);for(h.lastIndex=0;;){let n=h.exec(g);if(n===null)break;let i=n.index,a=n[1];if(!n[2]?.endsWith(`:::`)){if(a)f+=1;else if(--f,f===0){let a=g.slice(0,i);m=a.trim();let o=e.slice(0,p+i+n[0].length),c=[];if(m)if(s===`block`)for(c=r.blockTokens(a),c.forEach(e=>{e.text&&(!e.tokens||e.tokens.length===0)&&(e.tokens=r.inlineTokens(e.text))});c.length>0;){let e=c[c.length-1];if(e.type===`paragraph`&&(!e.text||e.text.trim()===``))c.pop();else break}else c=r.inlineTokens(m);return{type:t,raw:o,attributes:d,content:m,tokens:c}}}}}},renderMarkdown:(e,t)=>{let n=a(u(e.attrs||{}));return`:::${l}${n?` {${n}}`:``}
|
|
144
|
+
|
|
145
|
+
${t.renderChildren(e.content||[],`
|
|
146
|
+
|
|
147
|
+
`)}
|
|
148
|
+
|
|
149
|
+
:::`}}}function Hy(e){if(!e.trim())return{};let t={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g,r=n.exec(e);for(;r!==null;){let[,i,a,o]=r;t[i]=a||o,r=n.exec(e)}return t}function Uy(e){return Object.entries(e).filter(([,e])=>e!=null).map(([e,t])=>`${e}="${t}"`).join(` `)}function Wy(e){let{nodeName:t,name:n,getContent:r,parseAttributes:i=Hy,serializeAttributes:a=Uy,defaultAttributes:o={},selfClosing:s=!1,allowedAttributes:c}=e,l=n||t,u=e=>{if(!c)return e;let t={};return c.forEach(n=>{let r=typeof n==`string`?n:n.name,i=typeof n==`string`?void 0:n.skipIfDefault;if(r in e){let n=e[r];if(i!==void 0&&n===i)return;t[r]=n}}),t},d=l.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);return{parseMarkdown:(e,n)=>{let i={...o,...e.attributes};if(s)return n.createNode(t,i);let a=r?r(e):e.content||``;return a?n.createNode(t,i,[n.createTextNode(a)]):n.createNode(t,i,[])},markdownTokenizer:{name:t,level:`inline`,start(e){let t=RegExp(s?`\\[${d}\\s*[^\\]]*\\]`:`\\[${d}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${d}\\]`),n=e.match(t)?.index;return n===void 0?-1:n},tokenize(e,n,r){let a=RegExp(s?`^\\[${d}\\s*([^\\]]*)\\]`:`^\\[${d}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${d}\\]`),o=e.match(a);if(!o)return;let c=``,l=``;if(s){let[,e]=o;l=e}else{let[,e,t]=o;l=e,c=t||``}let u=i(l.trim());return{type:t,raw:o[0],content:c.trim(),attributes:u}}},renderMarkdown:e=>{let t=``;r?t=r(e):e.content&&e.content.length>0&&(t=e.content.filter(e=>e.type===`text`).map(e=>e.text).join(``));let n=a(u(e.attrs||{})),i=n?` ${n}`:``;return s?`[${l}${i}]`:`[${l}${i}]${t}[/${l}]`}}}function Gy(e,t,n){let r=e.split(`
|
|
150
|
+
`),i=[],a=``,o=0,s=t.baseIndentSize||2;for(;o<r.length;){let e=r[o],c=e.match(t.itemPattern);if(!c){if(i.length>0)break;if(e.trim()===``){o+=1,a=`${a}${e}
|
|
151
|
+
`;continue}else return}let l=t.extractItemData(c),{indentLevel:u,mainContent:d}=l;a=`${a}${e}
|
|
152
|
+
`;let f=[d];for(o+=1;o<r.length;){let e=r[o];if(e.trim()===``){let t=r.slice(o+1).findIndex(e=>e.trim()!==``);if(t===-1)break;if((r[o+1+t].match(/^(\s*)/)?.[1]?.length||0)>u){f.push(e),a=`${a}${e}
|
|
153
|
+
`,o+=1;continue}else break}if((e.match(/^(\s*)/)?.[1]?.length||0)>u)f.push(e),a=`${a}${e}
|
|
154
|
+
`,o+=1;else break}let p,m=f.slice(1);if(m.length>0){let e=m.map(e=>e.slice(u+s)).join(`
|
|
155
|
+
`);e.trim()&&(p=t.customNestedParser?t.customNestedParser(e):n.blockTokens(e))}let h=t.createToken(l,p);i.push(h)}if(i.length!==0)return{items:i,raw:a}}function Ky(e,t,n,r){if(!e||!Array.isArray(e.content))return``;let i=typeof n==`function`?n(r):n,[a,...o]=e.content,s=`${i}${t.renderChildren([a])}`;return o&&o.length>0&&o.forEach((e,n)=>{let r=t.renderChild?.call(t,e,n+1)??t.renderChildren([e]);if(r!=null){let n=r.split(`
|
|
156
|
+
`).map(e=>e?t.indent(e):t.indent(``)).join(`
|
|
157
|
+
`);s+=e.type===`paragraph`?`
|
|
158
|
+
|
|
159
|
+
${n}`:`
|
|
160
|
+
${n}`}}),s}var qy=new WeakMap;function Jy(e,t){let n=qy.get(e);if(!n){let t={callbacks:new Set,rafId:null,handler:()=>{t.rafId!==null&&cancelAnimationFrame(t.rafId),t.rafId=requestAnimationFrame(()=>{t.rafId=null,t.callbacks.forEach(e=>e())})}};qy.set(e,t),e.on(`update`,t.handler),n=t}n.callbacks.add(t)}function Yy(e,t){let n=qy.get(e);n&&(n.callbacks.delete(t),n.callbacks.size===0&&(n.rafId!==null&&cancelAnimationFrame(n.rafId),e.off(`update`,n.handler),qy.delete(e)))}function Xy(e,t,n={}){let{state:r}=t,{doc:i,tr:a}=r,o=e;i.descendants((t,r)=>{let i=a.mapping.map(r),s=a.mapping.map(r)+t.nodeSize,c=null;if(t.marks.forEach(e=>{if(e!==o)return!1;c=e}),!c)return;let l=!1;if(Object.keys(n).forEach(e=>{n[e]!==c.attrs[e]&&(l=!0)}),l){let t=e.type.create({...e.attrs,...n});a.removeMark(i,s,e.type),a.addMark(i,s,t)}}),a.docChanged&&t.view.dispatch(a)}var Zy=class e extends ry{constructor(){super(...arguments),this.type=`node`}static create(t={}){return new e(typeof t==`function`?t():t)}configure(e){return super.configure(e)}extend(e){let t=typeof e==`function`?e():e;return super.extend(t)}},Qy=class{constructor(e,t,n){this.isDragging=!1,this.component=e,this.editor=t.editor,this.options={stopEvent:null,ignoreMutation:null,...n},this.extension=t.extension,this.node=t.node,this.decorations=t.decorations,this.innerDecorations=t.innerDecorations,this.view=t.view,this.HTMLAttributes=t.HTMLAttributes,this.getPos=t.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var t;let{view:n}=this.editor,r=e.target,i=r.nodeType===3?r.parentElement?.closest(`[data-drag-handle]`):r.closest(`[data-drag-handle]`);if(!this.dom||this.contentDOM?.contains(r)||!i)return;let a=0,o=0;if(this.dom!==i){let t=this.dom.getBoundingClientRect(),n=i.getBoundingClientRect(),r=e.offsetX??e.nativeEvent?.offsetX,s=e.offsetY??e.nativeEvent?.offsetY;a=n.x-t.x+r,o=n.y-t.y+s}let s=this.dom.cloneNode(!0);try{let e=this.dom.getBoundingClientRect();s.style.width=`${Math.round(e.width)}px`,s.style.height=`${Math.round(e.height)}px`,s.style.boxSizing=`border-box`,s.style.pointerEvents=`none`}catch{}let c=null;try{c=document.createElement(`div`),c.style.position=`absolute`,c.style.top=`-9999px`,c.style.left=`-9999px`,c.style.pointerEvents=`none`,c.appendChild(s),document.body.appendChild(c),(t=e.dataTransfer)==null||t.setDragImage(s,a,o)}finally{c&&setTimeout(()=>{try{c?.remove()}catch{}},0)}let l=this.getPos();if(typeof l!=`number`)return;let u=Fu.create(n.state.doc,l),d=n.state.tr.setSelection(u);n.dispatch(d)}stopEvent(e){if(!this.dom)return!1;if(typeof this.options.stopEvent==`function`)return this.options.stopEvent({event:e});let t=e.target;if(!(this.dom.contains(t)&&!this.contentDOM?.contains(t)))return!1;let n=e.type.startsWith(`drag`),r=e.type===`dragover`||e.type===`dragenter`,i=e.type===`drop`;if(([`INPUT`,`BUTTON`,`SELECT`,`TEXTAREA`].includes(t.tagName)||t.isContentEditable)&&!i&&!n)return!0;let{isEditable:a}=this.editor,{isDragging:o}=this,s=!!this.node.type.spec.draggable,c=Fu.isSelectable(this.node),l=e.type===`copy`,u=e.type===`paste`,d=e.type===`cut`,f=e.type===`mousedown`;if(!s&&c&&n&&e.target===this.dom&&e.preventDefault(),s&&n&&!o&&e.target===this.dom)return e.preventDefault(),!1;if(s&&a&&!o&&f){let e=t.closest(`[data-drag-handle]`);e&&(this.dom===e||this.dom.contains(e))&&(this.isDragging=!0,document.addEventListener(`dragend`,()=>{this.isDragging=!1},{once:!0}),document.addEventListener(`drop`,()=>{this.isDragging=!1},{once:!0}),document.addEventListener(`mouseup`,()=>{this.isDragging=!1},{once:!0}))}return!(o||r||i||l||u||d||f&&c)}ignoreMutation(e){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation==`function`?this.options.ignoreMutation({mutation:e}):this.node.isLeaf||this.node.isAtom?!0:e.type===`selection`||this.dom.contains(e.target)&&e.type===`childList`&&(Xg()||Yg())&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every(e=>e.isContentEditable)?!1:this.contentDOM===e.target&&e.type===`attributes`?!0:!this.contentDOM.contains(e.target)}updateAttributes(e){this.editor.commands.command(({tr:t})=>{let n=this.getPos();return typeof n==`number`?(t.setNodeMarkup(n,void 0,{...this.node.attrs,...e}),!0):!1})}deleteNode(){let e=this.getPos();if(typeof e!=`number`)return;let t=e+this.node.nodeSize;this.editor.commands.deleteRange({from:e,to:t})}};function $y(e){return new oy({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:i})=>{let a=K_(e.getAttributes,void 0,r,i);if(a===!1||a===null)return null;let{tr:o}=t,s=r[r.length-1],c=r[0],l=n.to;if(s){let i=c.search(/\S/),u=n.from+c.indexOf(s),d=u+s.length;if(cv(n.from,n.to,t.doc).filter(t=>t.mark.type.excluded.find(n=>n===e.type&&n!==t.mark.type)).filter(e=>e.to>u).length)return null;d<n.to&&o.delete(d,n.to),u>n.from&&o.delete(n.from+i,u),l=n.from+i+s.length,o.addMark(n.from+i,l,e.type.create(a||{})),r.index!==void 0&&r.input!==void 0&&r.index+r[0].length>=r.input.length||o.removeStoredMark(e.type)}}})}var{getOwnPropertyNames:eb,getOwnPropertySymbols:tb}=Object,{hasOwnProperty:nb}=Object.prototype;function rb(e,t){return function(n,r,i){return e(n,r,i)&&t(n,r,i)}}function ib(e){return function(t,n,r){if(!t||!n||typeof t!=`object`||typeof n!=`object`)return e(t,n,r);let{cache:i}=r,a=i.get(t),o=i.get(n);if(a&&o)return a===n&&o===t;i.set(t,n),i.set(n,t);let s=e(t,n,r);return i.delete(t),i.delete(n),s}}function ab(e){return e?.[Symbol.toStringTag]}function ob(e){return eb(e).concat(tb(e))}var sb=Object.hasOwn||((e,t)=>nb.call(e,t));function cb(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var lb=`__v`,ub=`__o`,db=`_owner`,{getOwnPropertyDescriptor:fb,keys:pb}=Object;function mb(e,t){return e.byteLength===t.byteLength&&Db(new Uint8Array(e),new Uint8Array(t))}function hb(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function gb(e,t){return e.byteLength===t.byteLength&&Db(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function _b(e,t){return cb(e.getTime(),t.getTime())}function vb(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function yb(e,t){return e===t}function bb(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.entries(),o,s,c=0;for(;(o=a.next())&&!o.done;){let r=t.entries(),a=!1,l=0;for(;(s=r.next())&&!s.done;){if(i[l]){l++;continue}let r=o.value,u=s.value;if(n.equals(r[0],u[0],c,l,e,t,n)&&n.equals(r[1],u[1],r[0],u[0],e,t,n)){a=i[l]=!0;break}l++}if(!a)return!1;c++}return!0}var xb=cb;function Sb(e,t,n){let r=pb(e),i=r.length;if(pb(t).length!==i)return!1;for(;i-- >0;)if(!kb(e,t,n,r[i]))return!1;return!0}function Cb(e,t,n){let r=ob(e),i=r.length;if(ob(t).length!==i)return!1;let a,o,s;for(;i-- >0;)if(a=r[i],!kb(e,t,n,a)||(o=fb(e,a),s=fb(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function wb(e,t){return cb(e.valueOf(),t.valueOf())}function Tb(e,t){return e.source===t.source&&e.flags===t.flags}function Eb(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.values(),o,s;for(;(o=a.next())&&!o.done;){let r=t.values(),a=!1,c=0;for(;(s=r.next())&&!s.done;){if(!i[c]&&n.equals(o.value,s.value,o.value,s.value,e,t,n)){a=i[c]=!0;break}c++}if(!a)return!1}return!0}function Db(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function Ob(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function kb(e,t,n,r){return(r===db||r===ub||r===lb)&&(e.$$typeof||t.$$typeof)?!0:sb(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var Ab=`[object ArrayBuffer]`,jb=`[object Arguments]`,Mb=`[object Boolean]`,Nb=`[object DataView]`,Pb=`[object Date]`,Fb=`[object Error]`,Ib=`[object Map]`,Lb=`[object Number]`,Rb=`[object Object]`,zb=`[object RegExp]`,Bb=`[object Set]`,Vb=`[object String]`,Hb={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},Ub=`[object URL]`,Wb=Object.prototype.toString;function Gb({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:c,arePrimitiveWrappersEqual:l,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:f,areUrlsEqual:p,unknownTagComparators:m}){return function(h,g,_){if(h===g)return!0;if(h==null||g==null)return!1;let v=typeof h;if(v!==typeof g)return!1;if(v!==`object`)return v===`number`?s(h,g,_):v===`function`?a(h,g,_):!1;let y=h.constructor;if(y!==g.constructor)return!1;if(y===Object)return c(h,g,_);if(Array.isArray(h))return t(h,g,_);if(y===Date)return r(h,g,_);if(y===RegExp)return u(h,g,_);if(y===Map)return o(h,g,_);if(y===Set)return d(h,g,_);let b=Wb.call(h);if(b===Pb)return r(h,g,_);if(b===zb)return u(h,g,_);if(b===Ib)return o(h,g,_);if(b===Bb)return d(h,g,_);if(b===Rb)return typeof h.then!=`function`&&typeof g.then!=`function`&&c(h,g,_);if(b===Ub)return p(h,g,_);if(b===Fb)return i(h,g,_);if(b===jb)return c(h,g,_);if(Hb[b])return f(h,g,_);if(b===Ab)return e(h,g,_);if(b===Nb)return n(h,g,_);if(b===Mb||b===Lb||b===Vb)return l(h,g,_);if(m){let e=m[b];if(!e){let t=ab(h);t&&(e=m[t])}if(e)return e(h,g,_)}return!1}}function Kb({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:mb,areArraysEqual:n?Cb:hb,areDataViewsEqual:gb,areDatesEqual:_b,areErrorsEqual:vb,areFunctionsEqual:yb,areMapsEqual:n?rb(bb,Cb):bb,areNumbersEqual:xb,areObjectsEqual:n?Cb:Sb,arePrimitiveWrappersEqual:wb,areRegExpsEqual:Tb,areSetsEqual:n?rb(Eb,Cb):Eb,areTypedArraysEqual:n?rb(Db,Cb):Db,areUrlsEqual:Ob,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){let e=ib(r.areArraysEqual),t=ib(r.areMapsEqual),n=ib(r.areObjectsEqual),i=ib(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:n,areSetsEqual:i})}return r}function qb(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function Jb({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(a,o){let{cache:s=e?new WeakMap:void 0,meta:c}=n();return t(a,o,{cache:s,equals:r,meta:c,strict:i})};if(e)return function(e,n){return t(e,n,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};let a={cache:void 0,equals:r,meta:void 0,strict:i};return function(e,n){return t(e,n,a)}}var Yb=Xb();Xb({strict:!0}),Xb({circular:!0}),Xb({circular:!0,strict:!0}),Xb({createInternalComparator:()=>cb}),Xb({strict:!0,createInternalComparator:()=>cb}),Xb({circular:!0,createInternalComparator:()=>cb}),Xb({circular:!0,createInternalComparator:()=>cb,strict:!0});function Xb(e={}){let{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,a=Gb(Kb(e));return Jb({circular:t,comparator:a,createState:r,equals:n?n(a):qb(a),strict:i})}var Zb=n((e=>{var t=ee(),n=Ks();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),Qb=n(((e,t)=>{t.exports=Zb()}))(),$b=(...e)=>t=>{e.forEach(e=>{typeof e==`function`?e(t):e&&(e.current=t)})},ex=({contentComponent:e})=>{let t=(0,qs.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getServerSnapshot);return(0,z.jsx)(z.Fragment,{children:Object.values(t)})};function tx(){let e=new Set,t={};return{subscribe(t){return e.add(t),()=>{e.delete(t)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(n,r){t={...t,[n]:dr.createPortal(r.reactElement,r.element,n)},e.forEach(e=>e())},removeRenderer(n){let r={...t};delete r[n],t=r,e.forEach(e=>e())}}}var nx=class extends P.Component{constructor(e){super(e),this.editorContentRef=P.createRef()}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){let e=this.props.editor;if(e&&!e.isDestroyed&&e.view.dom?.parentNode){if(e.contentComponent)return;let t=this.editorContentRef.current;t.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:t}),e.contentComponent=tx(),e.createNodeViews(),e.isEditorContentInitialized=!0,this.forceUpdate()}}componentWillUnmount(){let e=this.props.editor;if(e){e.isEditorContentInitialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),e.contentComponent=null;try{if(!e.view.dom?.parentNode)return;let t=document.createElement(`div`);t.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:t})}catch{}}}render(){let{editor:e,innerRef:t,...n}=this.props;return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`div`,{ref:$b(t,this.editorContentRef),...n}),e?.contentComponent&&(0,z.jsx)(ex,{contentComponent:e.contentComponent})]})}},rx=(0,P.forwardRef)((e,t)=>{let n=P.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return P.createElement(nx,{key:n,innerRef:t,...e})}),ix=P.memo(rx),ax=typeof window<`u`?P.useLayoutEffect:P.useEffect,ox=class{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){let e=()=>{this.transactionNumber+=1,this.subscribers.forEach(e=>e())},t=this.editor;return t.on(`transaction`,e),()=>{t.off(`transaction`,e)}}}};function sx(e){let[t]=(0,P.useState)(()=>new ox(e.editor)),n=(0,Qb.useSyncExternalStoreWithSelector)(t.subscribe,t.getSnapshot,t.getServerSnapshot,e.selector,e.equalityFn??Yb);return ax(()=>t.watch(e.editor),[e.editor,t]),(0,P.useDebugValue)(n),n}var cx=!1,lx=typeof window>`u`,ux=lx||!!(typeof window<`u`&&window.next),dx=class e{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId=``,this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(e=>e())}getInitialEditor(){if(this.options.current.immediatelyRender===void 0){if(lx||ux){if(cx)throw Error("Tiptap Error: SSR has been detected, please set `immediatelyRender` explicitly to `false` to avoid hydration mismatches.");return null}return this.createEditor()}if(this.options.current.immediatelyRender&&lx&&cx)throw Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){return new ky({...this.options.current,onBeforeCreate:(...e)=>{var t;return(t=this.options.current).onBeforeCreate?.call(t,...e)},onBlur:(...e)=>{var t;return(t=this.options.current).onBlur?.call(t,...e)},onCreate:(...e)=>{var t;return(t=this.options.current).onCreate?.call(t,...e)},onDestroy:(...e)=>{var t;return(t=this.options.current).onDestroy?.call(t,...e)},onFocus:(...e)=>{var t;return(t=this.options.current).onFocus?.call(t,...e)},onSelectionUpdate:(...e)=>{var t;return(t=this.options.current).onSelectionUpdate?.call(t,...e)},onTransaction:(...e)=>{var t;return(t=this.options.current).onTransaction?.call(t,...e)},onUpdate:(...e)=>{var t;return(t=this.options.current).onUpdate?.call(t,...e)},onContentError:(...e)=>{var t;return(t=this.options.current).onContentError?.call(t,...e)},onDrop:(...e)=>{var t;return(t=this.options.current).onDrop?.call(t,...e)},onPaste:(...e)=>{var t;return(t=this.options.current).onPaste?.call(t,...e)},onDelete:(...e)=>{var t;return(t=this.options.current).onDelete?.call(t,...e)}})}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,t){return Object.keys(e).every(n=>[`onCreate`,`onBeforeCreate`,`onDestroy`,`onUpdate`,`onTransaction`,`onFocus`,`onBlur`,`onSelectionUpdate`,`onContentError`,`onDrop`,`onPaste`].includes(n)?!0:n===`extensions`&&e.extensions&&t.extensions?e.extensions.length===t.extensions.length?e.extensions.every((e,n)=>e===t.extensions?.[n]):!1:e[n]===t[n])}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&t.length===0?e.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((t,n)=>t===e[n]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){let e=this.instanceId,t=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){t&&t.setOptions(this.options.current);return}t&&!t.isDestroyed&&(t.destroy(),this.instanceId===e&&this.setEditor(null))},1)}};function fx(e={},t=[]){let n=(0,P.useRef)(e);n.current=e;let[r]=(0,P.useState)(()=>new dx(n)),i=(0,qs.useSyncExternalStore)(r.subscribe,r.getEditor,r.getServerSnapshot);return(0,P.useDebugValue)(i),(0,P.useEffect)(r.onRender(t)),sx({editor:i,selector:({transactionNumber:t})=>e.shouldRerenderOnTransaction===!1||e.shouldRerenderOnTransaction===void 0?null:e.immediatelyRender&&t===0?0:t+1}),i}var px=(0,P.createContext)({editor:null});px.Consumer;var mx=(0,P.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),hx=()=>(0,P.useContext)(mx);function gx({as:e=`div`,...t}){let{nodeViewContentRef:n,nodeViewContentChildren:r}=hx();return(0,z.jsx)(e,{...t,ref:n,"data-node-view-content":``,style:{whiteSpace:`pre-wrap`,...t.style},children:r})}var _x=P.forwardRef((e,t)=>{let{onDragStart:n}=hx();return(0,z.jsx)(e.as||`div`,{...e,ref:t,"data-node-view-wrapper":``,onDragStart:n,style:{whiteSpace:`normal`,...e.style}})});function vx(e){return!!(typeof e==`function`&&e.prototype&&e.prototype.isReactComponent)}function yx(e){return!!(typeof e==`object`&&e.$$typeof&&(e.$$typeof.toString()===`Symbol(react.forward_ref)`||e.$$typeof.description===`react.forward_ref`))}function bx(e){return!!(typeof e==`object`&&e.$$typeof&&(e.$$typeof.toString()===`Symbol(react.memo)`||e.$$typeof.description===`react.memo`))}function xx(e){if(vx(e)||yx(e))return!0;if(bx(e)){let t=e.type;if(t)return vx(t)||yx(t)}return!1}function Sx(){try{if(P.version)return parseInt(P.version.split(`.`)[0],10)>=19}catch{}return!1}var Cx=class{constructor(e,{editor:t,props:n={},as:r=`div`,className:i=``}){this.ref=null,this.destroyed=!1,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=e,this.editor=t,this.props=n,this.element=document.createElement(r),this.element.classList.add(`react-renderer`),i&&this.element.classList.add(...i.split(` `)),this.editor.isEditorContentInitialized?(0,dr.flushSync)(()=>{this.render()}):queueMicrotask(()=>{this.destroyed||this.render()})}render(){var e;if(this.destroyed)return;let t=this.component,n=this.props,r=this.editor,i=Sx(),a=xx(t),o={...n};o.ref&&!(i||a)&&delete o.ref,!o.ref&&(i||a)&&(o.ref=e=>{this.ref=e}),this.reactElement=(0,z.jsx)(t,{...o}),(e=r?.contentComponent)==null||e.setRenderer(this.id,this)}updateProps(e={}){this.destroyed||(this.props={...this.props,...e},this.render())}destroy(){var e;this.destroyed=!0,(e=this.editor?.contentComponent)==null||e.removeRenderer(this.id);try{this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}catch{}}updateAttributes(e){Object.keys(e).forEach(t=>{this.element.setAttribute(t,e[t])})}};P.createContext({markViewContentRef:()=>{}});var wx=class extends Qy{constructor(e,t,n){if(super(e,t,n),this.selectionRafId=null,this.positionCheckCallback=null,this.cachedExtensionWithSyncedStorage=null,!this.node.isLeaf){this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?`span`:`div`),this.contentDOMElement.dataset.nodeViewContentReact=``,this.contentDOMElement.dataset.nodeViewWrapper=``,this.contentDOMElement.style.whiteSpace=`inherit`;let e=this.dom.querySelector(`[data-node-view-content]`);if(!e)return;e.appendChild(this.contentDOMElement)}}get extensionWithSyncedStorage(){if(!this.cachedExtensionWithSyncedStorage){let e=this.editor,t=this.extension;this.cachedExtensionWithSyncedStorage=new Proxy(t,{get(n,r,i){return r===`storage`?e.storage[t.name]??{}:Reflect.get(n,r,i)}})}return this.cachedExtensionWithSyncedStorage}mount(){let e={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extensionWithSyncedStorage,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(e={})=>this.updateAttributes(e),deleteNode:()=>this.deleteNode(),ref:(0,P.createRef)()};if(!this.component.displayName){let e=e=>e.charAt(0).toUpperCase()+e.substring(1);this.component.displayName=e(this.extension.name)}let t={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:e=>{e&&this.contentDOMElement&&e.firstChild!==this.contentDOMElement&&(e.hasAttribute(`data-node-view-wrapper`)&&e.removeAttribute(`data-node-view-wrapper`),e.appendChild(this.contentDOMElement))}},n=this.component,r=(0,P.memo)(e=>(0,z.jsx)(mx.Provider,{value:t,children:(0,P.createElement)(n,e)}));r.displayName=`ReactNodeView`;let i=this.node.isInline?`span`:`div`;this.options.as&&(i=this.options.as);let{className:a=``}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.renderer=new Cx(r,{editor:this.editor,props:e,as:i,className:`node-${this.node.type.name} ${a}`.trim()}),this.editor.on(`selectionUpdate`,this.handleSelectionUpdate),this.updateElementAttributes(),this.currentPos=this.getPos(),this.positionCheckCallback=()=>{let e=this.getPos();typeof e!=`number`||e===this.currentPos||(this.currentPos=e,this.renderer.updateProps({getPos:()=>this.getPos()}),typeof this.options.attrs==`function`&&this.updateElementAttributes())},Jy(this.editor,this.positionCheckCallback)}get dom(){if(this.renderer.element.firstElementChild&&!this.renderer.element.firstElementChild?.hasAttribute(`data-node-view-wrapper`))throw Error(`Please use the NodeViewWrapper component for your node view.`);return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){this.selectionRafId&&=(cancelAnimationFrame(this.selectionRafId),null),this.selectionRafId=requestAnimationFrame(()=>{this.selectionRafId=null;let{from:e,to:t}=this.editor.state.selection,n=this.currentPos;if(typeof n==`number`)if(e<=n&&t>=n+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}})}update(e,t,n){let r=e=>{this.renderer.updateProps(e),typeof this.options.attrs==`function`&&this.updateElementAttributes()};if(e.type!==this.node.type)return!1;if(typeof this.options.update==`function`){let i=this.node,a=this.decorations,o=this.innerDecorations;return this.node=e,this.decorations=t,this.innerDecorations=n,this.currentPos=this.getPos(),this.options.update({oldNode:i,oldDecorations:a,newNode:e,newDecorations:t,oldInnerDecorations:o,innerDecorations:n,updateProps:()=>r({node:e,decorations:t,innerDecorations:n,extension:this.extensionWithSyncedStorage})})}let i=this.getPos();return e===this.node&&this.decorations===t&&this.innerDecorations===n?i===this.currentPos?!0:(this.currentPos=i,r({node:e,decorations:t,innerDecorations:n,extension:this.extensionWithSyncedStorage,getPos:()=>this.getPos()}),!0):(this.node=e,this.decorations=t,this.innerDecorations=n,this.currentPos=i,r({node:e,decorations:t,innerDecorations:n,extension:this.extensionWithSyncedStorage}),!0)}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add(`ProseMirror-selectednode`)}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove(`ProseMirror-selectednode`)}destroy(){this.renderer.destroy(),this.editor.off(`selectionUpdate`,this.handleSelectionUpdate),this.positionCheckCallback&&=(Yy(this.editor,this.positionCheckCallback),null),this.contentDOMElement=null,this.selectionRafId&&=(cancelAnimationFrame(this.selectionRafId),null)}updateElementAttributes(){if(this.options.attrs){let e={};if(typeof this.options.attrs==`function`){let t=this.editor.extensionManager.attributes,n=Q_(this.node,t);e=this.options.attrs({node:this.node,HTMLAttributes:n})}else e=this.options.attrs;this.renderer.updateAttributes(e)}}};function Tx(e,t){return n=>n.editor.contentComponent?new wx(e,n,t):{}}var Ex=(0,P.createContext)({get editor(){throw Error(`useTiptap must be used within a <Tiptap> provider`)}});Ex.displayName=`TiptapContext`;var Dx=()=>(0,P.useContext)(Ex);function Ox({editor:e,instance:t,children:n}){let r=e??t;if(!r)throw Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");let i=(0,P.useMemo)(()=>({editor:r}),[r]),a=(0,P.useMemo)(()=>({editor:r}),[r]);return(0,z.jsx)(px.Provider,{value:a,children:(0,z.jsx)(Ex.Provider,{value:i,children:n})})}Ox.displayName=`Tiptap`;function kx({...e}){let{editor:t}=Dx();return(0,z.jsx)(ix,{editor:t,...e})}kx.displayName=`Tiptap.Content`,Object.assign(Ox,{Content:kx});var Ax=(e,t)=>{if(e===`slot`)return 0;if(e instanceof Function)return e(t);let{children:n,...r}=t??{};if(e===`svg`)throw Error(`SVG elements are not supported in the JSX syntax, use the array syntax instead`);return[e,r,n]},jx=/^\s*>\s$/,Mx=Zy.create({name:`blockquote`,addOptions(){return{HTMLAttributes:{}}},content:`block+`,group:`block`,defining:!0,parseHTML(){return[{tag:`blockquote`}]},renderHTML({HTMLAttributes:e}){return Ax(`blockquote`,{...Z_(this.options.HTMLAttributes,e),children:Ax(`slot`,{})})},parseMarkdown:(e,t)=>{let n=t.parseBlockChildren??t.parseChildren;return t.createNode(`blockquote`,void 0,n(e.tokens||[]))},renderMarkdown:(e,t)=>{if(!e.content)return``;let n=[];return e.content.forEach((e,r)=>{let i=(t.renderChild?.call(t,e,r)??t.renderChildren([e])).split(`
|
|
161
|
+
`).map(e=>e.trim()===``?`>`:`> ${e}`);n.push(i.join(`
|
|
162
|
+
`))}),n.join(`
|
|
163
|
+
>
|
|
164
|
+
`)},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Py({find:jx,type:this.type})]}}),Nx=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,Px=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,Fx=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,Ix=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,Lx=iy.create({name:`bold`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`strong`},{tag:`b`,getAttrs:e=>e.style.fontWeight!==`normal`&&null},{style:`font-weight=400`,clearMark:e=>e.type.name===this.name},{style:`font-weight`,getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return Ax(`strong`,{...Z_(this.options.HTMLAttributes,e),children:Ax(`slot`,{})})},markdownTokenName:`strong`,parseMarkdown:(e,t)=>t.applyMark(`bold`,t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:`<strong>`,close:`</strong>`}},renderMarkdown:(e,t)=>`**${t.renderChildren(e)}**`,addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Ay({find:Nx,type:this.type}),Ay({find:Fx,type:this.type})]},addPasteRules(){return[$y({find:Px,type:this.type}),$y({find:Ix,type:this.type})]}}),Rx=/(^|[^`])`([^`]+)`(?!`)$/,zx=/(^|[^`])`([^`]+)`(?!`)/g,Bx=iy.create({name:`code`,addOptions(){return{HTMLAttributes:{}}},excludes:`_`,code:!0,exitable:!0,parseHTML(){return[{tag:`code`}]},renderHTML({HTMLAttributes:e}){return[`code`,Z_(this.options.HTMLAttributes,e),0]},markdownTokenName:`codespan`,parseMarkdown:(e,t)=>t.applyMark(`code`,[{type:`text`,text:e.text||``}]),renderMarkdown:(e,t)=>e.content?`\`${t.renderChildren(e.content)}\``:``,addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Ay({find:Rx,type:this.type})]},addPasteRules(){return[$y({find:zx,type:this.type})]}}),Vx=4,Hx=/^```([a-z]+)?[\s\n]$/,Ux=/^~~~([a-z]+)?[\s\n]$/,Wx=Zy.create({name:`codeBlock`,addOptions(){return{languageClassPrefix:`language-`,exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:Vx,HTMLAttributes:{}}},content:`text*`,marks:``,group:`block`,code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{let{languageClassPrefix:t}=this.options;return t&&[...e.firstElementChild?.classList||[]].filter(e=>e.startsWith(t)).map(e=>e.replace(t,``))[0]||null},rendered:!1}}},parseHTML(){return[{tag:`pre`,preserveWhitespace:`full`}]},renderHTML({node:e,HTMLAttributes:t}){return[`pre`,Z_(this.options.HTMLAttributes,t),[`code`,{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},markdownTokenName:`code`,parseMarkdown:(e,t)=>e.raw?.startsWith("```")===!1&&e.raw?.startsWith(`~~~`)===!1&&e.codeBlockStyle!==`indented`?[]:t.createNode(`codeBlock`,{language:e.lang||null},e.text?[t.createTextNode(e.text)]:[]),renderMarkdown:(e,t)=>{let n=``,r=e.attrs?.language||``;return n=e.content?[`\`\`\`${r}`,t.renderChildren(e.content),"```"].join(`
|
|
165
|
+
`):`\`\`\`${r}
|
|
166
|
+
|
|
167
|
+
\`\`\``,n},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,`paragraph`,e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:e})=>{if(!this.options.enableTabIndentation)return!1;let t=this.options.tabSize??Vx,{state:n}=e,{selection:r}=n,{$from:i,empty:a}=r;if(i.parent.type!==this.type)return!1;let o=` `.repeat(t);return a?e.commands.insertContent(o):e.commands.command(({tr:e})=>{let{from:t,to:i}=r,a=n.doc.textBetween(t,i,`
|
|
168
|
+
`,`
|
|
169
|
+
`).split(`
|
|
170
|
+
`).map(e=>o+e).join(`
|
|
171
|
+
`);return e.replaceWith(t,i,n.schema.text(a)),!0})},"Shift-Tab":({editor:e})=>{if(!this.options.enableTabIndentation)return!1;let t=this.options.tabSize??Vx,{state:n}=e,{selection:r}=n,{$from:i,empty:a}=r;return i.parent.type===this.type?a?e.commands.command(({tr:e})=>{let{pos:r}=i,a=i.start(),o=i.end(),s=n.doc.textBetween(a,o,`
|
|
172
|
+
`,`
|
|
173
|
+
`).split(`
|
|
174
|
+
`),c=0,l=0,u=r-a;for(let e=0;e<s.length;e+=1){if(l+s[e].length>=u){c=e;break}l+=s[e].length+1}let d=s[c].match(/^ */)?.[0]||``,f=Math.min(d.length,t);if(f===0)return!0;let p=a;for(let e=0;e<c;e+=1)p+=s[e].length+1;return e.delete(p,p+f),r-p<=f&&e.setSelection(Nu.create(e.doc,p)),!0}):e.commands.command(({tr:e})=>{let{from:i,to:a}=r,o=n.doc.textBetween(i,a,`
|
|
175
|
+
`,`
|
|
176
|
+
`).split(`
|
|
177
|
+
`).map(e=>{let n=e.match(/^ */)?.[0]||``,r=Math.min(n.length,t);return e.slice(r)}).join(`
|
|
178
|
+
`);return e.replaceWith(i,a,n.schema.text(o)),!0}):!1},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:t}=e,{selection:n}=t,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type)return!1;let a=r.parentOffset===r.parent.nodeSize-2,o=r.parent.textContent.endsWith(`
|
|
179
|
+
|
|
180
|
+
`);return!a||!o?!1:e.chain().command(({tr:e})=>(e.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;let{state:t}=e,{selection:n,doc:r}=t,{$from:i,empty:a}=n;if(!a||i.parent.type!==this.type||i.parentOffset!==i.parent.nodeSize-2)return!1;let o=i.after();return o===void 0?!1:r.nodeAt(o)?e.commands.command(({tr:e})=>(e.setSelection(ku.near(r.resolve(o))),!0)):e.commands.exitCode()}}},addInputRules(){return[My({find:Hx,type:this.type,getAttributes:e=>({language:e[1]})}),My({find:Ux,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new Zu({key:new ed(`codeBlockVSCodeHandler`),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;let n=t.clipboardData.getData(`text/plain`),r=t.clipboardData.getData(`vscode-editor-data`),i=(r?JSON.parse(r):void 0)?.mode;if(!n||!i)return!1;let{tr:a,schema:o}=e.state,s=o.text(n.replace(/\r\n?/g,`
|
|
181
|
+
`));return a.replaceSelectionWith(this.type.create({language:i},s)),a.selection.$from.parent.type!==this.type&&a.setSelection(Nu.near(a.doc.resolve(Math.max(0,a.selection.from-2)))),a.setMeta(`paste`,!0),e.dispatch(a),!0}}})]}}),Gx=Zy.create({name:`doc`,topNode:!0,content:`block+`,renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
|
|
182
|
+
|
|
183
|
+
`):``}),Kx=Zy.create({name:`hardBreak`,markdownTokenName:`br`,addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:`inline`,selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:`br`}]},renderHTML({HTMLAttributes:e}){return[`br`,Z_(this.options.HTMLAttributes,e)]},renderText(){return`
|
|
184
|
+
`},renderMarkdown:()=>`
|
|
185
|
+
`,parseMarkdown:()=>({type:`hardBreak`}),addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{let{selection:e,storedMarks:i}=n;if(e.$from.parent.type.spec.isolating)return!1;let{keepMarks:a}=this.options,{splittableMarks:o}=r.extensionManager,s=i||e.$to.parentOffset&&e.$from.marks();return t().insertContent({type:this.name}).command(({tr:e,dispatch:t})=>{if(t&&s&&a){let t=s.filter(e=>o.includes(e.type.name));e.ensureMarks(t)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),qx=Zy.create({name:`heading`,addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:`inline*`,group:`block`,defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,Z_(this.options.HTMLAttributes,t),0]},parseMarkdown:(e,t)=>t.createNode(`heading`,{level:e.depth||1},t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>{let n=e.attrs?.level?parseInt(e.attrs.level,10):1,r=`#`.repeat(n);return e.content?`${r} ${t.renderChildren(e.content)}`:``},addCommands(){return{setHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.setNode(this.name,e):!1,toggleHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.toggleNode(this.name,`paragraph`,e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>My({find:RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}}),Jx=Zy.create({name:`horizontalRule`,addOptions(){return{HTMLAttributes:{},nextNodeType:`paragraph`}},group:`block`,parseHTML(){return[{tag:`hr`}]},renderHTML({HTMLAttributes:e}){return[`hr`,Z_(this.options.HTMLAttributes,e)]},markdownTokenName:`hr`,parseMarkdown:(e,t)=>t.createNode(`horizontalRule`),renderMarkdown:()=>`---`,addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{if(!Ly(t,t.schema.nodes[this.name]))return!1;let{selection:n}=t,{$to:r}=n,i=e();return bv(n)?i.insertContentAt(r.pos,{type:this.name}):i.insertContent({type:this.name}),i.command(({state:e,tr:t,dispatch:n})=>{if(n){let{$to:n}=t.selection,r=n.end();if(n.nodeAfter)n.nodeAfter.isTextblock?t.setSelection(Nu.create(t.doc,n.pos+1)):n.nodeAfter.isBlock?t.setSelection(Fu.create(t.doc,n.pos)):t.setSelection(Nu.create(t.doc,n.pos));else{let i=(e.schema.nodes[this.options.nextNodeType]||n.parent.type.contentMatch.defaultType)?.create();i&&(t.insert(r,i),t.setSelection(Nu.create(t.doc,r+1)))}t.scrollIntoView()}return!0}).run()}}},addInputRules(){return[jy({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),Yx=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,Xx=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,Zx=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,Qx=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,$x=iy.create({name:`italic`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`em`},{tag:`i`,getAttrs:e=>e.style.fontStyle!==`normal`&&null},{style:`font-style=normal`,clearMark:e=>e.type.name===this.name},{style:`font-style=italic`}]},renderHTML({HTMLAttributes:e}){return[`em`,Z_(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},markdownTokenName:`em`,parseMarkdown:(e,t)=>t.applyMark(`italic`,t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:`<em>`,close:`</em>`}},renderMarkdown:(e,t)=>`*${t.renderChildren(e)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Ay({find:Yx,type:this.type}),Ay({find:Zx,type:this.type})]},addPasteRules(){return[$y({find:Xx,type:this.type}),$y({find:Qx,type:this.type})]}}),eS=`aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2`,tS=`ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2`,nS=`numeric`,rS=`ascii`,iS=`alpha`,aS=`asciinumeric`,oS=`alphanumeric`,sS=`domain`,cS=`emoji`,lS=`scheme`,uS=`slashscheme`,dS=`whitespace`;function fS(e,t){return e in t||(t[e]=[]),t[e]}function pS(e,t,n){t[nS]&&(t[aS]=!0,t[oS]=!0),t[rS]&&(t[aS]=!0,t[iS]=!0),t[aS]&&(t[oS]=!0),t[iS]&&(t[oS]=!0),t[oS]&&(t[sS]=!0),t[cS]&&(t[sS]=!0);for(let r in t){let t=fS(r,n);t.indexOf(e)<0&&t.push(e)}}function mS(e,t){let n={};for(let r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}function hS(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}hS.groups={},hS.prototype={accepts(){return!!this.t},go(e){let t=this,n=t.j[e];if(n)return n;for(let n=0;n<t.jr.length;n++){let r=t.jr[n][0],i=t.jr[n][1];if(i&&r.test(e))return i}return t.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,n,r){for(let i=0;i<e.length;i++)this.tt(e[i],t,n,r)},tr(e,t,n,r){r||=hS.groups;let i;return t&&t.j?i=t:(i=new hS(t),n&&r&&pS(t,n,r)),this.jr.push([e,i]),i},ts(e,t,n,r){let i=this,a=e.length;if(!a)return i;for(let t=0;t<a-1;t++)i=i.tt(e[t]);return i.tt(e[a-1],t,n,r)},tt(e,t,n,r){r||=hS.groups;let i=this;if(t&&t.j)return i.j[e]=t,t;let a=t,o,s=i.go(e);return s?(o=new hS,Object.assign(o.j,s.j),o.jr.push.apply(o.jr,s.jr),o.jd=s.jd,o.t=s.t):o=new hS,a&&(r&&(o.t&&typeof o.t==`string`?pS(a,Object.assign(mS(o.t,r),n),r):n&&pS(a,n,r)),o.t=a),i.j[e]=o,o}};var gS=(e,t,n,r,i)=>e.ta(t,n,r,i),_S=(e,t,n,r,i)=>e.tr(t,n,r,i),vS=(e,t,n,r,i)=>e.ts(t,n,r,i),U=(e,t,n,r,i)=>e.tt(t,n,r,i),yS=`WORD`,bS=`UWORD`,xS=`ASCIINUMERICAL`,SS=`ALPHANUMERICAL`,CS=`LOCALHOST`,wS=`TLD`,TS=`UTLD`,ES=`SCHEME`,DS=`SLASH_SCHEME`,OS=`NUM`,kS=`WS`,AS=`NL`,jS=`OPENBRACE`,MS=`CLOSEBRACE`,NS=`OPENBRACKET`,PS=`CLOSEBRACKET`,FS=`OPENPAREN`,IS=`CLOSEPAREN`,LS=`OPENANGLEBRACKET`,RS=`CLOSEANGLEBRACKET`,zS=`FULLWIDTHLEFTPAREN`,BS=`FULLWIDTHRIGHTPAREN`,VS=`LEFTCORNERBRACKET`,HS=`RIGHTCORNERBRACKET`,US=`LEFTWHITECORNERBRACKET`,WS=`RIGHTWHITECORNERBRACKET`,GS=`FULLWIDTHLESSTHAN`,KS=`FULLWIDTHGREATERTHAN`,qS=`AMPERSAND`,JS=`APOSTROPHE`,YS=`ASTERISK`,XS=`AT`,ZS=`BACKSLASH`,QS=`BACKTICK`,$S=`CARET`,eC=`COLON`,tC=`COMMA`,nC=`DOLLAR`,rC=`DOT`,iC=`EQUALS`,aC=`EXCLAMATION`,oC=`HYPHEN`,sC=`PERCENT`,cC=`PIPE`,lC=`PLUS`,uC=`POUND`,dC=`QUERY`,fC=`QUOTE`,pC=`FULLWIDTHMIDDLEDOT`,mC=`SEMI`,hC=`SLASH`,gC=`TILDE`,_C=`UNDERSCORE`,vC=`EMOJI`,yC=`SYM`,bC=Object.freeze({__proto__:null,ALPHANUMERICAL:SS,AMPERSAND:qS,APOSTROPHE:JS,ASCIINUMERICAL:xS,ASTERISK:YS,AT:XS,BACKSLASH:ZS,BACKTICK:QS,CARET:$S,CLOSEANGLEBRACKET:RS,CLOSEBRACE:MS,CLOSEBRACKET:PS,CLOSEPAREN:IS,COLON:eC,COMMA:tC,DOLLAR:nC,DOT:rC,EMOJI:vC,EQUALS:iC,EXCLAMATION:aC,FULLWIDTHGREATERTHAN:KS,FULLWIDTHLEFTPAREN:zS,FULLWIDTHLESSTHAN:GS,FULLWIDTHMIDDLEDOT:pC,FULLWIDTHRIGHTPAREN:BS,HYPHEN:oC,LEFTCORNERBRACKET:VS,LEFTWHITECORNERBRACKET:US,LOCALHOST:CS,NL:AS,NUM:OS,OPENANGLEBRACKET:LS,OPENBRACE:jS,OPENBRACKET:NS,OPENPAREN:FS,PERCENT:sC,PIPE:cC,PLUS:lC,POUND:uC,QUERY:dC,QUOTE:fC,RIGHTCORNERBRACKET:HS,RIGHTWHITECORNERBRACKET:WS,SCHEME:ES,SEMI:mC,SLASH:hC,SLASH_SCHEME:DS,SYM:yC,TILDE:gC,TLD:wS,UNDERSCORE:_C,UTLD:TS,UWORD:bS,WORD:yS,WS:kS}),xC=/[a-z]/,SC=/\p{L}/u,CC=/\p{Emoji}/u,wC=/\d/,TC=/\s/,EC=`\r`,DC=`
|
|
186
|
+
`,OC=`️`,kC=``,AC=``,jC=null,MC=null;function NC(e=[]){let t={};hS.groups=t;let n=new hS;jC??=IC(eS),MC??=IC(tS),U(n,`'`,JS),U(n,`{`,jS),U(n,`}`,MS),U(n,`[`,NS),U(n,`]`,PS),U(n,`(`,FS),U(n,`)`,IS),U(n,`<`,LS),U(n,`>`,RS),U(n,`(`,zS),U(n,`)`,BS),U(n,`「`,VS),U(n,`」`,HS),U(n,`『`,US),U(n,`』`,WS),U(n,`<`,GS),U(n,`>`,KS),U(n,`&`,qS),U(n,`*`,YS),U(n,`@`,XS),U(n,"`",QS),U(n,`^`,$S),U(n,`:`,eC),U(n,`,`,tC),U(n,`$`,nC),U(n,`.`,rC),U(n,`=`,iC),U(n,`!`,aC),U(n,`-`,oC),U(n,`%`,sC),U(n,`|`,cC),U(n,`+`,lC),U(n,`#`,uC),U(n,`?`,dC),U(n,`"`,fC),U(n,`/`,hC),U(n,`;`,mC),U(n,`~`,gC),U(n,`_`,_C),U(n,`\\`,ZS),U(n,`・`,pC);let r=_S(n,wC,OS,{[nS]:!0});_S(r,wC,r);let i=_S(r,xC,xS,{[aS]:!0}),a=_S(r,SC,SS,{[oS]:!0}),o=_S(n,xC,yS,{[rS]:!0});_S(o,wC,i),_S(o,xC,o),_S(i,wC,i),_S(i,xC,i);let s=_S(n,SC,bS,{[iS]:!0});_S(s,xC),_S(s,wC,a),_S(s,SC,s),_S(a,wC,a),_S(a,xC),_S(a,SC,a);let c=U(n,DC,AS,{[dS]:!0}),l=U(n,EC,kS,{[dS]:!0}),u=_S(n,TC,kS,{[dS]:!0});U(n,AC,u),U(l,DC,c),U(l,AC,u),_S(l,TC,u),U(u,EC),U(u,DC),_S(u,TC,u),U(u,AC,u);let d=_S(n,CC,vC,{[cS]:!0});U(d,`#`),_S(d,CC,d),U(d,OC,d);let f=U(d,kC);U(f,`#`),_S(f,CC,d);let p=[[xC,o],[wC,i]],m=[[xC,null],[SC,s],[wC,a]];for(let e=0;e<jC.length;e++)FC(n,jC[e],wS,yS,p);for(let e=0;e<MC.length;e++)FC(n,MC[e],TS,bS,m);pS(wS,{tld:!0,ascii:!0},t),pS(TS,{utld:!0,alpha:!0},t),FC(n,`file`,ES,yS,p),FC(n,`mailto`,ES,yS,p),FC(n,`http`,DS,yS,p),FC(n,`https`,DS,yS,p),FC(n,`ftp`,DS,yS,p),FC(n,`ftps`,DS,yS,p),pS(ES,{scheme:!0,ascii:!0},t),pS(DS,{slashscheme:!0,ascii:!0},t),e=e.sort((e,t)=>e[0]>t[0]?1:-1);for(let t=0;t<e.length;t++){let r=e[t][0],i=e[t][1]?{[lS]:!0}:{[uS]:!0};r.indexOf(`-`)>=0?i[sS]=!0:xC.test(r)?wC.test(r)?i[aS]=!0:i[rS]=!0:i[nS]=!0,vS(n,r,r,i)}return vS(n,`localhost`,CS,{ascii:!0}),n.jd=new hS(yC),{start:n,tokens:Object.assign({groups:t},bC)}}function PC(e,t){let n=_ee(t.replace(/[A-Z]/g,e=>e.toLowerCase())),r=n.length,i=[],a=0,o=0;for(;o<r;){let s=e,c=null,l=0,u=null,d=-1,f=-1;for(;o<r&&(c=s.go(n[o]));)s=c,s.accepts()?(d=0,f=0,u=s):d>=0&&(d+=n[o].length,f++),l+=n[o].length,a+=n[o].length,o++;a-=d,o-=f,l-=d,i.push({t:u.t,v:t.slice(a-l,a),s:a-l,e:a})}return i}function _ee(e){let t=[],n=e.length,r=0;for(;r<n;){let i=e.charCodeAt(r),a,o=i<55296||i>56319||r+1===n||(a=e.charCodeAt(r+1))<56320||a>57343?e[r]:e.slice(r,r+2);t.push(o),r+=o.length}return t}function FC(e,t,n,r,i){let a,o=t.length;for(let n=0;n<o-1;n++){let o=t[n];e.j[o]?a=e.j[o]:(a=new hS(r),a.jr=i.slice(),e.j[o]=a),e=a}return a=new hS(n),a.jr=i.slice(),e.j[t[o-1]]=a,a}function IC(e){let t=[],n=[],r=0;for(;r<e.length;){let i=0;for(;`0123456789`.indexOf(e[r+i])>=0;)i++;if(i>0){t.push(n.join(``));for(let t=parseInt(e.substring(r,r+i),10);t>0;t--)n.pop();r+=i}else n.push(e[r]),r++}return t}var LC={defaultProtocol:`http`,events:null,format:zC,formatHref:zC,nl2br:!1,tagName:`a`,target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function RC(e,t=null){let n=Object.assign({},LC);e&&(n=Object.assign(n,e instanceof RC?e.o:e));let r=n.ignoreTags,i=[];for(let e=0;e<r.length;e++)i.push(r[e].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=i}RC.prototype={o:LC,ignoreTags:[],defaultRender(e){return e},check(e){return this.get(`validate`,e.toString(),e)},get(e,t,n){let r=t!=null,i=this.o[e];return i&&(typeof i==`object`?(i=n.t in i?i[n.t]:LC[e],typeof i==`function`&&r&&(i=i(t,n))):typeof i==`function`&&r&&(i=i(t,n.t,n)),i)},getObj(e,t,n){let r=this.o[e];return typeof r==`function`&&t!=null&&(r=r(t,n.t,n)),r},render(e){let t=e.render(this);return(this.get(`render`,null,e)||this.defaultRender)(t,e.t,e)}};function zC(e){return e}function BC(e,t){this.t=`token`,this.v=e,this.tk=t}BC.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){let t=this.toString(),n=e.get(`truncate`,t,this),r=e.get(`format`,t,this);return n&&r.length>n?r.substring(0,n)+`…`:r},toFormattedHref(e){return e.get(`formatHref`,this.toHref(e.get(`defaultProtocol`)),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=LC.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get(`validate`,this.toString(),this)},render(e){let t=this,n=this.toHref(e.get(`defaultProtocol`)),r=e.get(`formatHref`,n,this),i=e.get(`tagName`,n,t),a=this.toFormattedString(e),o={},s=e.get(`className`,n,t),c=e.get(`target`,n,t),l=e.get(`rel`,n,t),u=e.getObj(`attributes`,n,t),d=e.getObj(`events`,n,t);return o.href=r,s&&(o.class=s),c&&(o.target=c),l&&(o.rel=l),u&&Object.assign(o,u),{tagName:i,attributes:o,content:a,eventListeners:d}}};function VC(e,t){class n extends BC{constructor(t,n){super(t,n),this.t=e}}for(let e in t)n.prototype[e]=t[e];return n.t=e,n}var HC=VC(`email`,{isLink:!0,toHref(){return`mailto:`+this.toString()}}),UC=VC(`text`),vee=VC(`nl`),WC=VC(`url`,{isLink:!0,toHref(e=LC.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==CS&&e[1].t===eC}}),GC=e=>new hS(e);function yee({groups:e}){let t=e.domain.concat([qS,YS,XS,ZS,QS,$S,nC,iC,oC,OS,sC,cC,lC,uC,hC,yC,gC,_C]),n=[JS,eC,tC,rC,aC,sC,dC,fC,mC,LS,RS,jS,MS,PS,NS,FS,IS,zS,BS,VS,HS,US,WS,GS,KS],r=[qS,JS,YS,ZS,QS,$S,nC,iC,oC,jS,MS,sC,cC,lC,uC,dC,hC,yC,gC,_C],i=GC(),a=U(i,gC);gS(a,r,a),gS(a,e.domain,a);let o=GC(),s=GC(),c=GC();gS(i,e.domain,o),gS(i,e.scheme,s),gS(i,e.slashscheme,c),gS(o,r,a),gS(o,e.domain,o);let l=U(o,XS);U(a,XS,l),U(s,XS,l),U(c,XS,l);let u=U(a,rC);gS(u,r,a),gS(u,e.domain,a);let d=GC();gS(l,e.domain,d),gS(d,e.domain,d);let f=U(d,rC);gS(f,e.domain,d);let p=GC(HC);gS(f,e.tld,p),gS(f,e.utld,p),U(l,CS,p);let m=U(d,oC);U(m,oC,m),gS(m,e.domain,d),gS(p,e.domain,d),U(p,rC,f),U(p,oC,m),gS(U(p,eC),e.numeric,HC);let h=U(o,oC),g=U(o,rC);U(h,oC,h),gS(h,e.domain,o),gS(g,r,a),gS(g,e.domain,o);let _=GC(WC);gS(g,e.tld,_),gS(g,e.utld,_),gS(_,e.domain,o),gS(_,r,a),U(_,rC,g),U(_,oC,h),U(_,XS,l);let v=U(_,eC),y=GC(WC);gS(v,e.numeric,y);let b=GC(WC),x=GC();gS(b,t,b),gS(b,n,x),gS(x,t,b),gS(x,n,x),U(_,hC,b),U(y,hC,b);let S=U(s,eC),C=U(U(U(c,eC),hC),hC);gS(s,e.domain,o),U(s,rC,g),U(s,oC,h),gS(c,e.domain,o),U(c,rC,g),U(c,oC,h),gS(S,e.domain,b),U(S,hC,b),U(S,dC,b),gS(C,e.domain,b),gS(C,t,b),U(C,hC,b);let w=[[jS,MS],[NS,PS],[FS,IS],[LS,RS],[zS,BS],[VS,HS],[US,WS],[GS,KS]];for(let e=0;e<w.length;e++){let[r,i]=w[e],a=U(b,r);U(x,r,a),U(a,i,b);let o=GC(WC);gS(a,t,o);let s=GC();gS(a,n),gS(o,t,o),gS(o,n,s),gS(s,t,o),gS(s,n,s),U(o,i,b),U(s,i,b)}return U(i,CS,_),U(i,AS,vee),{start:i,tokens:bC}}function bee(e,t,n){let r=n.length,i=0,a=[],o=[];for(;i<r;){let s=e,c=null,l=null,u=0,d=null,f=-1;for(;i<r&&!(c=s.go(n[i].t));)o.push(n[i++]);for(;i<r&&(l=c||s.go(n[i].t));)c=null,s=l,s.accepts()?(f=0,d=s):f>=0&&f++,i++,u++;if(f<0)i-=u,i<r&&(o.push(n[i]),i++);else{o.length>0&&(a.push(KC(UC,t,o)),o=[]),i-=f,u-=f;let e=d.t,r=n.slice(i-u,i);a.push(KC(e,t,r))}}return o.length>0&&a.push(KC(UC,t,o)),a}function KC(e,t,n){let r=n[0].s,i=n[n.length-1].e;return new e(t.slice(r,i),n)}var xee=typeof console<`u`&&console&&console.warn||(()=>{}),See=`until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.`,qC={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function Cee(){return hS.groups={},qC.scanner=null,qC.parser=null,qC.tokenQueue=[],qC.pluginQueue=[],qC.customSchemes=[],qC.initialized=!1,qC}function JC(e,t=!1){if(qC.initialized&&xee(`linkifyjs: already initialized - will not register custom scheme "${e}" ${See}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw Error(`linkifyjs: incorrect scheme format.
|
|
187
|
+
1. Must only contain digits, lowercase ASCII letters or "-"
|
|
188
|
+
2. Cannot start or end with "-"
|
|
189
|
+
3. "-" cannot repeat`);qC.customSchemes.push([e,t])}function wee(){qC.scanner=NC(qC.customSchemes);for(let e=0;e<qC.tokenQueue.length;e++)qC.tokenQueue[e][1]({scanner:qC.scanner});qC.parser=yee(qC.scanner.tokens);for(let e=0;e<qC.pluginQueue.length;e++)qC.pluginQueue[e][1]({scanner:qC.scanner,parser:qC.parser});return qC.initialized=!0,qC}function YC(e){return qC.initialized||wee(),bee(qC.parser.start,e,PC(qC.scanner.start,e))}YC.scan=PC;function XC(e,t=null,n=null){if(t&&typeof t==`object`){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}let r=new RC(n),i=YC(e),a=[];for(let e=0;e<i.length;e++){let n=i[e];n.isLink&&(!t||n.t===t)&&r.check(n)&&a.push(n.toFormattedObject(r))}return a}var ZC=`[\0- \xA0 -\u2029 ]`,Tee=new RegExp(ZC),Eee=RegExp(`${ZC}$`),Dee=new RegExp(ZC,`g`);function Oee(e){return e.length===1?e[0].isLink:e.length===3&&e[1].isLink?[`()`,`[]`].includes(e[0].value+e[2].value):!1}function kee(e){return new Zu({key:new ed(`autolink`),appendTransaction:(t,n,r)=>{let i=t.some(e=>e.docChanged)&&!n.doc.eq(r.doc),a=t.some(e=>e.getMeta(`preventAutolink`));if(!i||a)return;let{tr:o}=r;if(sv(I_(n.doc,[...t])).forEach(({newRange:t})=>{let n=z_(r.doc,t,e=>e.isTextblock),i,a;if(n.length>1)i=n[0],a=r.doc.textBetween(i.pos,i.pos+i.node.nodeSize,void 0,` `);else if(n.length){let e=r.doc.textBetween(t.from,t.to,` `,` `);if(!Eee.test(e))return;i=n[0],a=r.doc.textBetween(i.pos,t.to,void 0,` `)}if(i&&a){let t=a.split(Tee).filter(Boolean);if(t.length<=0)return!1;let n=t[t.length-1],s=i.pos+a.lastIndexOf(n);if(!n)return!1;let c=YC(n).map(t=>t.toObject(e.defaultProtocol));if(!Oee(c))return!1;c.filter(e=>e.isLink).map(e=>({...e,from:s+e.start+1,to:s+e.end+1})).filter(e=>r.schema.marks.code?!r.doc.rangeHasMark(e.from,e.to,r.schema.marks.code):!0).filter(t=>e.validate(t.value)).filter(t=>e.shouldAutoLink(t.value)).forEach(t=>{cv(t.from,t.to,r.doc).some(t=>t.mark.type===e.type)||o.addMark(t.from,t.to,e.type.create({href:t.href}))})}}),o.steps.length)return o}})}function Aee(e){return new Zu({key:new ed(`handleClickLink`),props:{handleClick:(t,n,r)=>{if(r.button!==0||!t.editable)return!1;let i=null;if(r.target instanceof HTMLAnchorElement)i=r.target;else{let t=r.target;if(!t)return!1;let n=e.editor.view.dom;i=t.closest(`a`),i&&!n.contains(i)&&(i=null)}if(!i)return!1;let a=!1;if(e.enableClickSelection&&(a=e.editor.commands.extendMarkRange(e.type.name)),e.openOnClick){let n=ov(t.state,e.type.name),r=i.href??n.href,o=i.target??n.target;r&&(window.open(r,o),a=!0)}return a}}})}function jee(e){return new Zu({key:new ed(`handlePasteLink`),props:{handlePaste:(t,n,r)=>{let{shouldAutoLink:i}=e,{state:a}=t,{selection:o}=a,{empty:s}=o;if(s)return!1;let c=``;r.content.forEach(e=>{c+=e.textContent});let l=XC(c,{defaultProtocol:e.defaultProtocol}).find(e=>e.isLink&&e.value===c);return!c||!l||i!==void 0&&!i(l.value)?!1:e.editor.commands.setMark(e.type,{href:l.href})}}})}function QC(e,t){let n=[`http`,`https`,`ftp`,`ftps`,`mailto`,`tel`,`callto`,`sms`,`cid`,`xmpp`];return t&&t.forEach(e=>{let t=typeof e==`string`?e:e.scheme;t&&n.push(t)}),!e||e.replace(Dee,``).match(RegExp(`^(?:(?:${n.join(`|`)}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,`i`))}var $C=iy.create({name:`link`,priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(e=>{if(typeof e==`string`){JC(e);return}JC(e.scheme,e.optionalSlashes)})},onDestroy(){Cee()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:`http`,HTMLAttributes:{target:`_blank`,rel:`noopener noreferrer nofollow`,class:null},isAllowedUri:(e,t)=>!!QC(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>{let t=/^[a-z][a-z0-9+.-]*:\/\//i.test(e),n=/^[a-z][a-z0-9+.-]*:/i.test(e);if(t||n&&!e.includes(`@`))return!0;let r=(e.includes(`@`)?e.split(`@`).pop():e).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(r)||!/\./.test(r))}}},addAttributes(){return{href:{default:null,parseHTML(e){return e.getAttribute(`href`)}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class},title:{default:null}}},parseHTML(){return[{tag:`a[href]`,getAttrs:e=>{let t=e.getAttribute(`href`);return!t||!this.options.isAllowedUri(t,{defaultValidate:e=>!!QC(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:e=>!!QC(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?[`a`,Z_(this.options.HTMLAttributes,e),0]:[`a`,Z_(this.options.HTMLAttributes,{...e,href:``}),0]},markdownTokenName:`link`,parseMarkdown:(e,t)=>t.applyMark(`link`,t.parseInline(e.tokens||[]),{href:e.href,title:e.title||null}),renderMarkdown:(e,t)=>{let n=e.attrs?.href??``,r=e.attrs?.title??``,i=t.renderChildren(e);return r?`[${i}](${n} "${r}")`:`[${i}](${n})`},addCommands(){return{setLink:e=>({chain:t})=>{let{href:n}=e;return this.options.isAllowedUri(n,{defaultValidate:e=>!!QC(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().setMark(this.name,e).setMeta(`preventAutolink`,!0).run():!1},toggleLink:e=>({chain:t})=>{let{href:n}=e||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:e=>!!QC(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta(`preventAutolink`,!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta(`preventAutolink`,!0).run()}},addPasteRules(){return[$y({find:e=>{let t=[];if(e){let{protocols:n,defaultProtocol:r}=this.options,i=XC(e).filter(e=>e.isLink&&this.options.isAllowedUri(e.value,{defaultValidate:e=>!!QC(e,n),protocols:n,defaultProtocol:r}));i.length&&i.forEach(e=>{this.options.shouldAutoLink(e.value)&&t.push({text:e.value,data:{href:e.href},index:e.start})})}return t},type:this.type,getAttributes:e=>({href:e.data?.href})})]},addProseMirrorPlugins(){let e=[],{protocols:t,defaultProtocol:n}=this.options;return this.options.autolink&&e.push(kee({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:e=>this.options.isAllowedUri(e,{defaultValidate:e=>!!QC(e,t),protocols:t,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),e.push(Aee({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick===`whenNotEditable`?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&e.push(jee({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),e}}),Mee=Object.defineProperty,Nee=(e,t)=>{for(var n in t)Mee(e,n,{get:t[n],enumerable:!0})},Pee=`listItem`,ew=`textStyle`,tw=/^\s*([-+*])\s$/,nw=Zy.create({name:`bulletList`,addOptions(){return{itemTypeName:`listItem`,HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:`block list`,content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul`}]},renderHTML({HTMLAttributes:e}){return[`ul`,Z_(this.options.HTMLAttributes,e),0]},markdownTokenName:`list`,parseMarkdown:(e,t)=>e.type!==`list`||e.ordered?[]:{type:`bulletList`,content:e.items?t.parseChildren(e.items):[]},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
|
|
190
|
+
`):``,markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Pee,this.editor.getAttributes(ew)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=Py({find:tw,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Py({find:tw,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(ew),editor:this.editor})),[e]}}),rw=Zy.create({name:`listItem`,addOptions(){return{HTMLAttributes:{},bulletListTypeName:`bulletList`,orderedListTypeName:`orderedList`}},content:`paragraph block*`,defining:!0,parseHTML(){return[{tag:`li`}]},renderHTML({HTMLAttributes:e}){return[`li`,Z_(this.options.HTMLAttributes,e),0]},markdownTokenName:`list_item`,parseMarkdown:(e,t)=>{if(e.type!==`list_item`)return[];let n=t.parseBlockChildren??t.parseChildren,r=[];if(e.tokens&&e.tokens.length>0)if(e.tokens.some(e=>e.type===`paragraph`))r=n(e.tokens);else{let i=e.tokens[0];if(i&&i.type===`text`&&i.tokens&&i.tokens.length>0){if(r=[{type:`paragraph`,content:t.parseInline(i.tokens)}],e.tokens.length>1){let t=n(e.tokens.slice(1));r.push(...t)}}else r=n(e.tokens)}return r.length===0&&(r=[{type:`paragraph`,content:[]}]),{type:`listItem`,content:r}},renderMarkdown:(e,t,n)=>Ky(e,t,e=>e.parentType===`bulletList`?`- `:e.parentType===`orderedList`?`${(e.meta?.parentAttrs?.start||1)+e.index}. `:`- `,n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}});Nee({},{findListItemPos:()=>iw,getNextListDepth:()=>aw,handleBackspace:()=>lw,handleDelete:()=>fw,hasListBefore:()=>ow,hasListItemAfter:()=>pw,hasListItemBefore:()=>sw,listItemHasSubList:()=>cw,nextListIsDeeper:()=>uw,nextListIsHigher:()=>dw});var iw=(e,t)=>{let{$from:n}=t.selection,r=Mg(e,t.schema),i=null,a=n.depth,o=n.pos,s=null;for(;a>0&&s===null;)i=n.node(a),i.type===r?s=a:(--a,--o);return s===null?null:{$pos:t.doc.resolve(o),depth:s}},aw=(e,t)=>{let n=iw(e,t);if(!n)return!1;let[,r]=lv(t,e,n.$pos.pos+4);return r},ow=(e,t,n)=>{let{$anchor:r}=e.selection,i=Math.max(0,r.pos-2),a=e.doc.resolve(i).node();return!(!a||!n.includes(a.type.name))},sw=(e,t)=>{let{$anchor:n}=t.selection,r=t.doc.resolve(n.pos-2);return!(r.index()===0||r.nodeBefore?.type.name!==e)},cw=(e,t,n)=>{if(!n)return!1;let r=Mg(e,t.schema),i=!1;return n.descendants(e=>{e.type===r&&(i=!0)}),i},lw=(e,t,n)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!v_(e.state,t)&&ow(e.state,t,n)){let{$anchor:n}=e.state.selection,r=e.state.doc.resolve(n.before()-1),i=[];r.node().descendants((e,n)=>{e.type.name===t&&i.push({node:e,pos:n})});let a=i.at(-1);if(!a)return!1;let o=e.state.doc.resolve(r.start()+a.pos+1);return e.chain().cut({from:n.start()-1,to:n.end()+1},o.end()).joinForward().run()}if(!v_(e.state,t)||!gv(e.state))return!1;let r=iw(t,e.state);if(!r)return!1;let i=e.state.doc.resolve(r.$pos.pos-2).node(r.depth),a=cw(t,e.state,i);return sw(t,e.state)&&!a?e.commands.joinItemBackward():e.chain().liftListItem(t).run()},uw=(e,t)=>{let n=aw(e,t),r=iw(e,t);return!r||!n?!1:n>r.depth},dw=(e,t)=>{let n=aw(e,t),r=iw(e,t);return!r||!n?!1:n<r.depth},fw=(e,t)=>{if(!v_(e.state,t)||!hv(e.state,t))return!1;let{selection:n}=e.state,{$from:r,$to:i}=n;return!n.empty&&r.sameParent(i)?!1:uw(t,e.state)?e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run():dw(t,e.state)?e.chain().joinForward().joinBackward().run():e.commands.joinItemForward()},pw=(e,t)=>{let{$anchor:n}=t.selection,r=t.doc.resolve(n.pos-n.parentOffset-2);return!(r.index()===r.parent.childCount-1||r.nodeAfter?.type.name!==e)},mw=my.create({name:`listKeymap`,addOptions(){return{listTypes:[{itemName:`listItem`,wrapperNames:[`bulletList`,`orderedList`]},{itemName:`taskItem`,wrapperNames:[`taskList`]}]}},addKeyboardShortcuts(){return{Delete:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&fw(e,n)&&(t=!0)}),t},"Mod-Delete":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&fw(e,n)&&(t=!0)}),t},Backspace:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&lw(e,n,r)&&(t=!0)}),t},"Mod-Backspace":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&lw(e,n,r)&&(t=!0)}),t}}}}),hw=/^(\s*)(\d+)\.\s+(.*)$/,gw=/^\s/;function _w(e){let t=[],n=0,r=0;for(;n<e.length;){let i=e[n],a=i.match(hw);if(!a)break;let[,o,s,c]=a,l=o.length,u=c,d=n+1,f=[i];for(;d<e.length;){let t=e[d];if(t.match(hw))break;if(t.trim()===``)f.push(t),u+=`
|
|
191
|
+
`,d+=1;else if(t.match(gw))f.push(t),u+=`
|
|
192
|
+
${t.slice(l+2)}`,d+=1;else break}t.push({indent:l,number:parseInt(s,10),content:u.trim(),raw:f.join(`
|
|
193
|
+
`)}),r=d,n=d}return[t,r]}function vw(e,t,n){let r=[],i=0;for(;i<e.length;){let a=e[i];if(a.indent===t){let o=a.content.split(`
|
|
194
|
+
`),s=o[0]?.trim()||``,c=[];s&&c.push({type:`paragraph`,raw:s,tokens:n.inlineTokens(s)});let l=o.slice(1).join(`
|
|
195
|
+
`).trim();if(l){let e=n.blockTokens(l);c.push(...e)}let u=i+1,d=[];for(;u<e.length&&e[u].indent>t;)d.push(e[u]),u+=1;if(d.length>0){let e=vw(d,Math.min(...d.map(e=>e.indent)),n);c.push({type:`list`,ordered:!0,start:d[0].number,items:e,raw:d.map(e=>e.raw).join(`
|
|
196
|
+
`)})}r.push({type:`list_item`,raw:a.raw,tokens:c}),i=u}else i+=1}return r}function yw(e,t){return e.map(e=>{if(e.type!==`list_item`)return t.parseChildren([e])[0];let n=[];return e.tokens&&e.tokens.length>0&&e.tokens.forEach(e=>{if(e.type===`paragraph`||e.type===`list`||e.type===`blockquote`||e.type===`code`)n.push(...t.parseChildren([e]));else if(e.type===`text`&&e.tokens){let r=t.parseChildren([e]);n.push({type:`paragraph`,content:r})}else{let r=t.parseChildren([e]);r.length>0&&n.push(...r)}}),{type:`listItem`,content:n}})}var bw=`listItem`,xw=`textStyle`,Sw=/^(\d+)\.\s$/,Cw=Zy.create({name:`orderedList`,addOptions(){return{itemTypeName:`listItem`,HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:`block list`,content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:e=>e.hasAttribute(`start`)?parseInt(e.getAttribute(`start`)||``,10):1},type:{default:null,parseHTML:e=>e.getAttribute(`type`)}}},parseHTML(){return[{tag:`ol`}]},renderHTML({HTMLAttributes:e}){let{start:t,...n}=e;return t===1?[`ol`,Z_(this.options.HTMLAttributes,n),0]:[`ol`,Z_(this.options.HTMLAttributes,e),0]},markdownTokenName:`list`,parseMarkdown:(e,t)=>{if(e.type!==`list`||!e.ordered)return[];let n=e.start||1,r=e.items?yw(e.items,t):[];return n===1?{type:`orderedList`,content:r}:{type:`orderedList`,attrs:{start:n},content:r}},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
|
|
197
|
+
`):``,markdownTokenizer:{name:`orderedList`,level:`block`,start:e=>{let t=e.match(/^(\s*)(\d+)\.\s+/)?.index;return t===void 0?-1:t},tokenize:(e,t,n)=>{let r=e.split(`
|
|
198
|
+
`),[i,a]=_w(r);if(i.length===0)return;let o=vw(i,0,n);if(o.length!==0)return{type:`list`,ordered:!0,start:i[0]?.number||1,items:o,raw:r.slice(0,a).join(`
|
|
199
|
+
`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(bw,this.editor.getAttributes(xw)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=Py({find:Sw,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Py({find:Sw,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(xw)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[e]}}),ww=/^\s*(\[([( |x])?\])\s$/,Tw=Zy.create({name:`taskItem`,addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:`taskList`,a11y:void 0}},content(){return this.options.nested?`paragraph block*`:`paragraph+`},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{let t=e.getAttribute(`data-checked`);return t===``||t===`true`},renderHTML:e=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return[`li`,Z_(this.options.HTMLAttributes,t,{"data-type":this.name}),[`label`,[`input`,{type:`checkbox`,checked:e.attrs.checked?`checked`:null}],[`span`]],[`div`,0]]},parseMarkdown:(e,t)=>{let n=[];if(e.tokens&&e.tokens.length>0?n.push(t.createNode(`paragraph`,{},t.parseInline(e.tokens))):e.text?n.push(t.createNode(`paragraph`,{},[t.createNode(`text`,{text:e.text})])):n.push(t.createNode(`paragraph`,{},[])),e.nestedTokens&&e.nestedTokens.length>0){let r=t.parseChildren(e.nestedTokens);n.push(...r)}return t.createNode(`taskItem`,{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>Ky(e,t,`- [${e.attrs?.checked?`x`:` `}] `),addKeyboardShortcuts(){let e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:r})=>{let i=document.createElement(`li`),a=document.createElement(`label`),o=document.createElement(`span`),s=document.createElement(`input`),c=document.createElement(`div`),l=e=>{var t;s.ariaLabel=((t=this.options.a11y)?.checkboxLabel)?.call(t,e,s.checked)||`Task item checkbox for ${e.textContent||`empty task item`}`};l(e),a.contentEditable=`false`,s.type=`checkbox`,s.addEventListener(`mousedown`,e=>e.preventDefault()),s.addEventListener(`change`,t=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){s.checked=!s.checked;return}let{checked:i}=t.target;r.isEditable&&typeof n==`function`&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:e})=>{let t=n();if(typeof t!=`number`)return!1;let r=e.doc.nodeAt(t);return e.setNodeMarkup(t,void 0,{...r?.attrs,checked:i}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,i)||(s.checked=!s.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([e,t])=>{i.setAttribute(e,t)}),i.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,a.append(s,o),i.append(a,c),Object.entries(t).forEach(([e,t])=>{i.setAttribute(e,t)});let u=new Set(Object.keys(t));return{dom:i,contentDOM:c,update:e=>{if(e.type!==this.type)return!1;i.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,l(e);let t=r.extensionManager.attributes,n=Q_(e,t),a=new Set(Object.keys(n)),o=this.options.HTMLAttributes;return u.forEach(e=>{a.has(e)||(e in o?i.setAttribute(e,o[e]):i.removeAttribute(e))}),Object.entries(n).forEach(([e,t])=>{t==null?e in o?i.setAttribute(e,o[e]):i.removeAttribute(e):i.setAttribute(e,t)}),u=a,!0}}}},addInputRules(){return[Py({find:ww,type:this.type,getAttributes:e=>({checked:e[e.length-1]===`x`})})]}}),Ew=Zy.create({name:`taskList`,addOptions(){return{itemTypeName:`taskItem`,HTMLAttributes:{}}},group:`block list`,content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return[`ul`,Z_(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode(`taskList`,{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
|
|
200
|
+
`):``,markdownTokenizer:{name:`taskList`,level:`block`,start(e){let t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/)?.index;return t===void 0?-1:t},tokenize(e,t,n){let r=e=>{let t=Gy(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:e[3].toLowerCase()===`x`}),createToken:(e,t)=>({type:`taskItem`,raw:``,mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);return t?[{type:`taskList`,raw:t.raw,items:t.items}]:n.blockTokens(e)},i=Gy(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:e[3].toLowerCase()===`x`}),createToken:(e,t)=>({type:`taskItem`,raw:``,mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);if(i)return{type:`taskList`,raw:i.raw,items:i.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});my.create({name:`listKit`,addExtensions(){let e=[];return this.options.bulletList!==!1&&e.push(nw.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(rw.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(mw.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(Cw.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(Tw.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(Ew.configure(this.options.taskList)),e}});var Dw=` `,Ow=`\xA0`,kw=Zy.create({name:`paragraph`,priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:`block`,content:`inline*`,parseHTML(){return[{tag:`p`}]},renderHTML({HTMLAttributes:e}){return[`p`,Z_(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let n=e.tokens||[];if(n.length===1&&n[0].type===`image`)return t.parseChildren([n[0]]);let r=t.parseInline(n);return n.length===1&&n[0].type===`text`&&(n[0].raw===Dw||n[0].text===Dw||n[0].raw===Ow||n[0].text===Ow)&&r.length===1&&r[0].type===`text`&&(r[0].text===Dw||r[0].text===Ow)?t.createNode(`paragraph`,void 0,[]):t.createNode(`paragraph`,void 0,r)},renderMarkdown:(e,t,n)=>{if(!e)return``;let r=Array.isArray(e.content)?e.content:[];if(r.length===0){let e=Array.isArray(n?.previousNode?.content)?n.previousNode.content:[];return n?.previousNode?.type===`paragraph`&&e.length===0?Dw:``}return t.renderChildren(r)},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Aw=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,jw=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,Mw=iy.create({name:`strike`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`s`},{tag:`del`},{tag:`strike`},{style:`text-decoration`,consuming:!1,getAttrs:e=>e.includes(`line-through`)?{}:!1}]},renderHTML({HTMLAttributes:e}){return[`s`,Z_(this.options.HTMLAttributes,e),0]},markdownTokenName:`del`,parseMarkdown:(e,t)=>t.applyMark(`strike`,t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Ay({find:Aw,type:this.type})]},addPasteRules(){return[$y({find:jw,type:this.type})]}}),Nw=Zy.create({name:`text`,group:`inline`,parseMarkdown:e=>({type:`text`,text:e.text||``}),renderMarkdown:e=>e.text||``}),Pw=iy.create({name:`underline`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`u`},{style:`text-decoration`,consuming:!1,getAttrs:e=>e.includes(`underline`)?{}:!1}]},renderHTML({HTMLAttributes:e}){return[`u`,Z_(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||`underline`,t.parseInline(e.tokens||[]))},renderMarkdown(e,t){return`++${t.renderChildren(e)}++`},markdownTokenizer:{name:`underline`,level:`inline`,start(e){return e.indexOf(`++`)},tokenize(e,t,n){let r=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!r)return;let i=r[2].trim();return{type:`underline`,raw:r[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function Fee(e={}){return new Zu({view(t){return new Fw(t,e)}})}var Fw=class{constructor(e,t){this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=t.width??1,this.color=t.color===!1?void 0:t.color||`black`,this.class=t.class,this.handlers=[`dragover`,`dragend`,`drop`,`dragleave`].map(t=>{let n=e=>{this[t](e)};return e.dom.addEventListener(t,n),{name:t,handler:n}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){this.cursorPos!=null&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),t=!e.parent.inlineContent,n,r=this.editorView.dom,i=r.getBoundingClientRect(),a=i.width/r.offsetWidth,o=i.height/r.offsetHeight;if(t){let t=e.nodeBefore,r=e.nodeAfter;if(t||r){let e=this.editorView.nodeDOM(this.cursorPos-(t?t.nodeSize:0));if(e){let i=e.getBoundingClientRect(),a=t?i.bottom:i.top;t&&r&&(a=(a+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let s=this.width/2*o;n={left:i.left,right:i.right,top:a-s,bottom:a+s}}}}if(!n){let e=this.editorView.coordsAtPos(this.cursorPos),t=this.width/2*a;n={left:e.left-t,right:e.left+t,top:e.top,bottom:e.bottom}}let s=this.editorView.dom.offsetParent;this.element||(this.element=s.appendChild(document.createElement(`div`)),this.class&&(this.element.className=this.class),this.element.style.cssText=`position: absolute; z-index: 50; pointer-events: none;`,this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle(`prosemirror-dropcursor-block`,t),this.element.classList.toggle(`prosemirror-dropcursor-inline`,!t);let c,l;if(!s||s==document.body&&getComputedStyle(s).position==`static`)c=-pageXOffset,l=-pageYOffset;else{let e=s.getBoundingClientRect(),t=e.width/s.offsetWidth,n=e.height/s.offsetHeight;c=e.left-s.scrollLeft*t,l=e.top-s.scrollTop*n}this.element.style.left=(n.left-c)/a+`px`,this.element.style.top=(n.top-l)/o+`px`,this.element.style.width=(n.right-n.left)/a+`px`,this.element.style.height=(n.bottom-n.top)/o+`px`}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,i=typeof r==`function`?r(this.editorView,t,e):r;if(t&&!i){let e=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let t=cu(this.editorView.state.doc,e,this.editorView.dragging.slice);t!=null&&(e=t)}this.setCursor(e),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}},Iw=class e extends ku{constructor(e){super(e,e)}map(t,n){let r=t.resolve(n.map(this.head));return e.valid(r)?new e(r):ku.near(r)}content(){return V.empty}eq(t){return t instanceof e&&t.head==this.head}toJSON(){return{type:`gapcursor`,pos:this.head}}static fromJSON(t,n){if(typeof n.pos!=`number`)throw RangeError(`Invalid input for GapCursor.fromJSON`);return new e(t.resolve(n.pos))}getBookmark(){return new Lw(this.anchor)}static valid(e){let t=e.parent;if(t.inlineContent||!zw(e)||!Bw(e))return!1;let n=t.type.spec.allowGapCursor;if(n!=null)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(t,n,r=!1){search:for(;;){if(!r&&e.valid(t))return t;let i=t.pos,a=null;for(let r=t.depth;;r--){let o=t.node(r);if(n>0?t.indexAfter(r)<o.childCount:t.index(r)>0){a=o.child(n>0?t.indexAfter(r):t.index(r)-1);break}else if(r==0)return null;i+=n;let s=t.doc.resolve(i);if(e.valid(s))return s}for(;;){let o=n>0?a.firstChild:a.lastChild;if(!o){if(a.isAtom&&!a.isText&&!Fu.isSelectable(a)){t=t.doc.resolve(i+a.nodeSize*n),r=!1;continue search}break}a=o,i+=n;let s=t.doc.resolve(i);if(e.valid(s))return s}return null}}};Iw.prototype.visible=!1,Iw.findFrom=Iw.findGapCursorFrom,ku.jsonID(`gapcursor`,Iw);var Lw=class e{constructor(e){this.pos=e}map(t){return new e(t.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return Iw.valid(t)?new Iw(t):ku.near(t)}};function Rw(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function zw(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n-1);;e=e.lastChild){if(e.childCount==0&&!e.inlineContent||Rw(e.type))return!0;if(e.inlineContent)return!1}}return!0}function Bw(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n);;e=e.firstChild){if(e.childCount==0&&!e.inlineContent||Rw(e.type))return!0;if(e.inlineContent)return!1}}return!0}function Vw(){return new Zu({props:{decorations:Kw,createSelectionBetween(e,t,n){return t.pos==n.pos&&Iw.valid(n)?new Iw(n):null},handleClick:Ww,handleKeyDown:Hw,handleDOMEvents:{beforeinput:Gw}}})}var Hw=yg({ArrowLeft:Uw(`horiz`,-1),ArrowRight:Uw(`horiz`,1),ArrowUp:Uw(`vert`,-1),ArrowDown:Uw(`vert`,1)});function Uw(e,t){let n=e==`vert`?t>0?`down`:`up`:t>0?`right`:`left`;return function(e,r,i){let a=e.selection,o=t>0?a.$to:a.$from,s=a.empty;if(a instanceof Nu){if(!i.endOfTextblock(n)||o.depth==0)return!1;s=!1,o=e.doc.resolve(t>0?o.after():o.before())}let c=Iw.findGapCursorFrom(o,t,s);return c?(r&&r(e.tr.setSelection(new Iw(c))),!0):!1}}function Ww(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!Iw.valid(r))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&Fu.isSelectable(e.state.doc.nodeAt(i.inside))?!1:(e.dispatch(e.state.tr.setSelection(new Iw(r))),!0)}function Gw(e,t){if(t.inputType!=`insertCompositionText`||!(e.state.selection instanceof Iw))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let i=B.empty;for(let e=r.length-1;e>=0;e--)i=B.from(r[e].createAndFill(null,i));let a=e.state.tr.replace(n.pos,n.pos,new V(i,0,0));return a.setSelection(Nu.near(a.doc.resolve(n.pos+1))),e.dispatch(a),!1}function Kw(e){if(!(e.selection instanceof Iw))return null;let t=document.createElement(`div`);return t.className=`ProseMirror-gapcursor`,vh.create(e.doc,[hh.widget(e.selection.head,t,{key:`gapcursor`})])}var qw=200,Jw=function(){};Jw.prototype.append=function(e){return e.length?(e=Jw.from(e),!this.length&&e||e.length<qw&&this.leafAppend(e)||this.length<qw&&e.leafPrepend(this)||this.appendInner(e)):this},Jw.prototype.prepend=function(e){return e.length?Jw.from(e).append(this):this},Jw.prototype.appendInner=function(e){return new Xw(this,e)},Jw.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?Jw.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},Jw.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},Jw.prototype.forEach=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},Jw.prototype.map=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length);var r=[];return this.forEach(function(t,n){return r.push(e(t,n))},t,n),r},Jw.from=function(e){return e instanceof Jw?e:e&&e.length?new Yw(e):Jw.empty};var Yw=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return e==0&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var i=t;i<n;i++)if(e(this.values[i],r+i)===!1)return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var i=t-1;i>=n;i--)if(e(this.values[i],r+i)===!1)return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=qw)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=qw)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(Jw);Jw.empty=new Yw([]);var Xw=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var i=this.left.length;if(t<i&&this.left.forEachInner(e,t,Math.min(n,i),r)===!1||n>i&&this.right.forEachInner(e,Math.max(t-i,0),Math.min(this.length,n)-i,r+i)===!1)return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;if(t>i&&this.right.forEachInvertedInner(e,t-i,Math.max(n,i)-i,r+i)===!1||n<i&&this.left.forEachInvertedInner(e,Math.min(t,i),n,r)===!1)return!1},t.prototype.sliceInner=function(e,t){if(e==0&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(Jw),Zw=500,Qw=class e{constructor(e,t){this.items=e,this.eventCount=t}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,a;n&&(i=this.remapping(r,this.items.length),a=i.maps.length);let o=t.tr,s,c,l=[],u=[];return this.items.forEach((t,n)=>{if(!t.step){i||(i=this.remapping(r,n+1),a=i.maps.length),a--,u.push(t);return}if(i){u.push(new eT(t.map));let e=t.step.map(i.slice(a)),n;e&&o.maybeStep(e).doc&&(n=o.mapping.maps[o.mapping.maps.length-1],l.push(new eT(n,void 0,void 0,l.length+u.length))),a--,n&&i.appendMap(n,a)}else o.maybeStep(t.step);if(t.selection)return s=i?t.selection.map(i.slice(a)):t.selection,c=new e(this.items.slice(0,r).append(u.reverse().concat(l)),this.eventCount-1),!1},this.items.length,0),{remaining:c,transform:o,selection:s}}addTransform(t,n,r,i){let a=[],o=this.eventCount,s=this.items,c=!i&&s.length?s.get(s.length-1):null;for(let e=0;e<t.steps.length;e++){let r=t.steps[e].invert(t.docs[e]),l=new eT(t.mapping.maps[e],r,n),u;(u=c&&c.merge(l))&&(l=u,e?a.pop():s=s.slice(0,s.length-1)),a.push(l),n&&=(o++,void 0),i||(c=l)}let l=o-r.depth;return l>nT&&(s=$w(s,l),o-=l),new e(s.append(a),o)}remapping(e,t){let n=new El;return this.items.forEach((t,r)=>{let i=t.mirrorOffset!=null&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,i)},e,t),n}addMaps(t){return this.eventCount==0?this:new e(this.items.append(t.map(e=>new eT(e))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),a=t.mapping,o=t.steps.length,s=this.eventCount;this.items.forEach(e=>{e.selection&&s--},i);let c=n;this.items.forEach(e=>{let n=a.getMirror(--c);if(n==null)return;o=Math.min(o,n);let i=a.maps[n];if(e.step){let o=t.steps[n].invert(t.docs[n]),l=e.selection&&e.selection.map(a.slice(c+1,n));l&&s++,r.push(new eT(i,o,l))}else r.push(new eT(i))},i);let l=[];for(let e=n;e<o;e++)l.push(new eT(a.maps[e]));let u=new e(this.items.slice(0,i).append(l).append(r),s);return u.emptyItemCount()>Zw&&(u=u.compress(this.items.length-r.length)),u}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,i=[],a=0;return this.items.forEach((e,o)=>{if(o>=t)i.push(e),e.selection&&a++;else if(e.step){let t=e.step.map(n.slice(r)),o=t&&t.getMap();if(r--,o&&n.appendMap(o,r),t){let s=e.selection&&e.selection.map(n.slice(r));s&&a++;let c=new eT(o.invert(),t,s),l,u=i.length-1;(l=i.length&&i[u].merge(c))?i[u]=l:i.push(c)}}else e.map&&r--},this.items.length,0),new e(Jw.from(i.reverse()),a)}};Qw.empty=new Qw(Jw.empty,0);function $w(e,t){let n;return e.forEach((e,r)=>{if(e.selection&&t--==0)return n=r,!1}),e.slice(n)}var eT=class e{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new e(n.getMap().invert(),n,this.selection)}}},tT=class{constructor(e,t,n,r,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=i}},nT=20;function rT(e,t,n,r){let i=n.getMeta(dT),a;if(i)return i.historyState;n.getMeta(fT)&&(e=new tT(e.done,e.undone,null,0,-1));let o=n.getMeta(`appendedTransaction`);if(n.steps.length==0)return e;if(o&&o.getMeta(dT))return o.getMeta(dT).redo?new tT(e.done.addTransform(n,void 0,r,uT(t)),e.undone,aT(n.mapping.maps),e.prevTime,e.prevComposition):new tT(e.done,e.undone.addTransform(n,void 0,r,uT(t)),null,e.prevTime,e.prevComposition);if(n.getMeta(`addToHistory`)!==!1&&!(o&&o.getMeta(`addToHistory`)===!1)){let i=n.getMeta(`composition`),a=e.prevTime==0||!o&&e.prevComposition!=i&&(e.prevTime<(n.time||0)-r.newGroupDelay||!iT(n,e.prevRanges)),s=o?oT(e.prevRanges,n.mapping):aT(n.mapping.maps);return new tT(e.done.addTransform(n,a?t.selection.getBookmark():void 0,r,uT(t)),Qw.empty,s,n.time,i??e.prevComposition)}else if(a=n.getMeta(`rebased`))return new tT(e.done.rebased(n,a),e.undone.rebased(n,a),oT(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);else return new tT(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),oT(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function iT(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((e,r)=>{for(let i=0;i<t.length;i+=2)e<=t[i+1]&&r>=t[i]&&(n=!0)}),n}function aT(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((e,n,r,i)=>t.push(r,i));return t}function oT(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),a=t.map(e[r+1],-1);i<=a&&n.push(i,a)}return n}function sT(e,t,n){let r=uT(t),i=dT.get(t).spec.config,a=(n?e.undone:e.done).popEvent(t,r);if(!a)return null;let o=a.selection.resolve(a.transform.doc),s=(n?e.done:e.undone).addTransform(a.transform,t.selection.getBookmark(),i,r),c=new tT(n?s:a.remaining,n?a.remaining:s,null,0,-1);return a.transform.setSelection(o).setMeta(dT,{redo:n,historyState:c})}var cT=!1,lT=null;function uT(e){let t=e.plugins;if(lT!=t){cT=!1,lT=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){cT=!0;break}}return cT}var dT=new ed(`history`),fT=new ed(`closeHistory`);function pT(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new Zu({key:dT,state:{init(){return new tT(Qw.empty,Qw.empty,null,0,-1)},apply(t,n,r){return rT(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r=n==`historyUndo`?hT:n==`historyRedo`?gT:null;return!r||!e.editable?!1:(t.preventDefault(),r(e.state,e.dispatch))}}}})}function mT(e,t){return(n,r)=>{let i=dT.getState(n);if(!i||(e?i.undone:i.done).eventCount==0)return!1;if(r){let a=sT(i,n,e);a&&r(t?a.scrollIntoView():a)}return!0}}var hT=mT(!1,!0),gT=mT(!0,!0);my.create({name:`characterCount`,addOptions(){return{limit:null,mode:`textSize`,textCounter:e=>e.length,wordCounter:e=>e.split(` `).filter(e=>e!==``).length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{let t=e?.node||this.editor.state.doc;if((e?.mode||this.options.mode)===`textSize`){let e=t.textBetween(0,t.content.size,void 0,` `);return this.options.textCounter(e)}return t.nodeSize},this.storage.words=e=>{let t=e?.node||this.editor.state.doc,n=t.textBetween(0,t.content.size,` `,` `);return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new Zu({key:new ed(`characterCount`),appendTransaction:(t,n,r)=>{if(e)return;let i=this.options.limit;if(i==null||i===0){e=!0;return}let a=this.storage.characters({node:r.doc});if(a>i){let t=a-i;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);let n=r.tr.deleteRange(0,t);return e=!0,n}e=!0},filterTransaction:(e,t)=>{let n=this.options.limit;if(!e.docChanged||n===0||n==null)return!0;let r=this.storage.characters({node:t.doc}),i=this.storage.characters({node:e.doc});if(i<=n||r>n&&i>n&&i<=r)return!0;if(r>n&&i>n&&i>r||!e.getMeta(`paste`))return!1;let a=e.selection.$head.pos,o=a-(i-n),s=a;return e.deleteRange(o,s),!(this.storage.characters({node:e.doc})>n)}})]}});var _T=my.create({name:`dropCursor`,addOptions(){return{color:`currentColor`,width:1,class:void 0}},addProseMirrorPlugins(){return[Fee(this.options)]}});my.create({name:`focus`,addOptions(){return{className:`has-focus`,mode:`all`}},addProseMirrorPlugins(){return[new Zu({key:new ed(`focus`),props:{decorations:({doc:e,selection:t})=>{let{isEditable:n,isFocused:r}=this.editor,{anchor:i}=t,a=[];if(!n||!r)return vh.create(e,[]);let o=0;this.options.mode===`deepest`&&e.descendants((e,t)=>{if(!e.isText){if(!(i>=t&&i<=t+e.nodeSize-1))return!1;o+=1}});let s=0;return e.descendants((e,t)=>{if(e.isText||!(i>=t&&i<=t+e.nodeSize-1))return!1;if(s+=1,this.options.mode===`deepest`&&o-s>0||this.options.mode===`shallowest`&&s>1)return this.options.mode===`deepest`;a.push(hh.node(t,t+e.nodeSize,{class:this.options.className}))}),vh.create(e,a)}}})]}});var vT=my.create({name:`gapCursor`,addProseMirrorPlugins(){return[Vw()]},extendNodeSchema(e){return{allowGapCursor:K_(H_(e,`allowGapCursor`,{name:e.name,options:e.options,storage:e.storage}))??null}}}),yT=`placeholder`;function bT(e){return e.replace(/\s+/g,`-`).replace(/[^a-zA-Z0-9-]/g,``).replace(/^[0-9-]+/,``).replace(/^-+/,``).toLowerCase()}var xT=my.create({name:`placeholder`,addOptions(){return{emptyEditorClass:`is-editor-empty`,emptyNodeClass:`is-empty`,dataAttribute:yT,placeholder:`Write something …`,showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){let e=this.options.dataAttribute?`data-${bT(this.options.dataAttribute)}`:`data-${yT}`;return[new Zu({key:new ed(`placeholder`),props:{decorations:({doc:t,selection:n})=>{let r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=n,a=[];if(!r)return null;let o=this.editor.isEmpty;return t.descendants((t,n)=>{let r=i>=n&&i<=n+t.nodeSize,s=!t.isLeaf&&yv(t);if(!t.type.isTextblock)return this.options.includeChildren;if((r||!this.options.showOnlyCurrent)&&s){let i=[this.options.emptyNodeClass];o&&i.push(this.options.emptyEditorClass);let s=hh.node(n,n+t.nodeSize,{class:i.join(` `),[e]:typeof this.options.placeholder==`function`?this.options.placeholder({editor:this.editor,node:t,pos:n,hasAnchor:r}):this.options.placeholder});a.push(s)}return this.options.includeChildren}),vh.create(t,a)}}})]}});my.create({name:`selection`,addOptions(){return{className:`selection`}},addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new Zu({key:new ed(`selection`),props:{decorations(n){return n.selection.empty||e.isFocused||!e.isEditable||bv(n.selection)||e.view.dragging?null:vh.create(n.doc,[hh.inline(n.selection.from,n.selection.to,{class:t.className})])}}})]}});function ST({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||t?.type===e}var CT=my.create({name:`trailingNode`,addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){let e=new ed(this.name),t=this.options.node||this.editor.schema.topNodeType.contentMatch.defaultType?.name||`paragraph`,n=Object.entries(this.editor.schema.nodes).map(([,e])=>e).filter(e=>(this.options.notAfter||[]).concat(t).includes(e.name));return[new Zu({key:e,appendTransaction:(n,r,i)=>{let{doc:a,tr:o,schema:s}=i,c=e.getState(i),l=a.content.size,u=s.nodes[t];if(!n.some(e=>e.getMeta(`skipTrailingNode`))&&c)return o.insert(l,u.create())},state:{init:(e,t)=>{let r=t.tr.doc.lastChild;return!ST({node:r,types:n})},apply:(e,t)=>{if(!e.docChanged||e.getMeta(`__uniqueIDTransaction`))return t;let r=e.doc.lastChild;return!ST({node:r,types:n})}}})]}}),Iee=my.create({name:`undoRedo`,addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>hT(e,t),redo:()=>({state:e,dispatch:t})=>gT(e,t)}},addProseMirrorPlugins(){return[pT(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),Lee=my.create({name:`starterKit`,addExtensions(){let e=[];return this.options.bold!==!1&&e.push(Lx.configure(this.options.bold)),this.options.blockquote!==!1&&e.push(Mx.configure(this.options.blockquote)),this.options.bulletList!==!1&&e.push(nw.configure(this.options.bulletList)),this.options.code!==!1&&e.push(Bx.configure(this.options.code)),this.options.codeBlock!==!1&&e.push(Wx.configure(this.options.codeBlock)),this.options.document!==!1&&e.push(Gx.configure(this.options.document)),this.options.dropcursor!==!1&&e.push(_T.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&e.push(vT.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&e.push(Kx.configure(this.options.hardBreak)),this.options.heading!==!1&&e.push(qx.configure(this.options.heading)),this.options.undoRedo!==!1&&e.push(Iee.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&e.push(Jx.configure(this.options.horizontalRule)),this.options.italic!==!1&&e.push($x.configure(this.options.italic)),this.options.listItem!==!1&&e.push(rw.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(mw.configure(this.options?.listKeymap)),this.options.link!==!1&&e.push($C.configure(this.options?.link)),this.options.orderedList!==!1&&e.push(Cw.configure(this.options.orderedList)),this.options.paragraph!==!1&&e.push(kw.configure(this.options.paragraph)),this.options.strike!==!1&&e.push(Mw.configure(this.options.strike)),this.options.text!==!1&&e.push(Nw.configure(this.options.text)),this.options.underline!==!1&&e.push(Pw.configure(this.options?.underline)),this.options.trailingNode!==!1&&e.push(CT.configure(this.options?.trailingNode)),e}}),wT=e(n(((e,t)=>{function n(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw Error(`map is read-only`)}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw Error(`set is read-only`)}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{let r=e[t],i=typeof r;(i===`object`||i===`function`)&&!Object.isFrozen(r)&&n(r)}),e}var r=class{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function i(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}function a(e,...t){let n=Object.create(null);for(let t in e)n[t]=e[t];return t.forEach(function(e){for(let t in e)n[t]=e[t]}),n}var o=`</span>`,s=e=>!!e.scope,c=(e,{prefix:t})=>{if(e.startsWith(`language:`))return e.replace(`language:`,`language-`);if(e.includes(`.`)){let n=e.split(`.`);return[`${t}${n.shift()}`,...n.map((e,t)=>`${e}${`_`.repeat(t+1)}`)].join(` `)}return`${t}${e}`},l=class{constructor(e,t){this.buffer=``,this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=i(e)}openNode(e){if(!s(e))return;let t=c(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){s(e)&&(this.buffer+=o)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}},u=(e={})=>{let t={children:[]};return Object.assign(t,e),t},d=class e{constructor(){this.rootNode=u(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){let t=u({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return typeof t==`string`?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(t=>this._walk(e,t)),e.closeNode(t)),e}static _collapse(t){typeof t!=`string`&&t.children&&(t.children.every(e=>typeof e==`string`)?t.children=[t.children.join(``)]:t.children.forEach(t=>{e._collapse(t)}))}},f=class extends d{constructor(e){super(),this.options=e}addText(e){e!==``&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){let n=e.root;t&&(n.scope=`language:${t}`),this.add(n)}toHTML(){return new l(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function p(e){return e?typeof e==`string`?e:e.source:null}function m(e){return _(`(?=`,e,`)`)}function h(e){return _(`(?:`,e,`)*`)}function g(e){return _(`(?:`,e,`)?`)}function _(...e){return e.map(e=>p(e)).join(``)}function v(e){let t=e[e.length-1];return typeof t==`object`&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function y(...e){return`(`+(v(e).capture?``:`?:`)+e.map(e=>p(e)).join(`|`)+`)`}function b(e){return RegExp(e.toString()+`|`).exec(``).length-1}function x(e,t){let n=e&&e.exec(t);return n&&n.index===0}var S=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function C(e,{joinWith:t}){let n=0;return e.map(e=>{n+=1;let t=n,r=p(e),i=``;for(;r.length>0;){let e=S.exec(r);if(!e){i+=r;break}i+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),e[0][0]===`\\`&&e[1]?i+=`\\`+String(Number(e[1])+t):(i+=e[0],e[0]===`(`&&n++)}return i}).map(e=>`(${e})`).join(t)}var w=/\b\B/,T=`[a-zA-Z]\\w*`,E=`[a-zA-Z_]\\w*`,D=`\\b\\d+(\\.\\d+)?`,O=`(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)`,k=`\\b(0b[01]+)`,A=`!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~`,ee=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=_(t,/.*\b/,e.binary,/\b.*/)),a({scope:`meta`,begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{e.index!==0&&t.ignoreMatch()}},e)},j={begin:`\\\\[\\s\\S]`,relevance:0},te={scope:`string`,begin:`'`,end:`'`,illegal:`\\n`,contains:[j]},M={scope:`string`,begin:`"`,end:`"`,illegal:`\\n`,contains:[j]},ne={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},N=function(e,t,n={}){let r=a({scope:`comment`,begin:e,end:t,contains:[]},n);r.contains.push({scope:`doctag`,begin:`[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)`,end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let i=y(`I`,`a`,`is`,`so`,`us`,`to`,`at`,`if`,`in`,`it`,`on`,/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:_(/[ ]+/,`(`,i,/[.]?[:]?([.][ ]|[ ])/,`){3}`)}),r},re=N(`//`,`$`),ie=N(`/\\*`,`\\*/`),ae=N(`#`,`$`),oe={scope:`number`,begin:D,relevance:0},se={scope:`number`,begin:O,relevance:0},ce={scope:`number`,begin:k,relevance:0},P={scope:`regexp`,begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[j,{begin:/\[/,end:/\]/,relevance:0,contains:[j]}]},le={scope:`title`,begin:T,relevance:0},F={scope:`title`,begin:E,relevance:0},ue={begin:`\\.\\s*`+E,relevance:0},de=Object.freeze({__proto__:null,APOS_STRING_MODE:te,BACKSLASH_ESCAPE:j,BINARY_NUMBER_MODE:ce,BINARY_NUMBER_RE:k,COMMENT:N,C_BLOCK_COMMENT_MODE:ie,C_LINE_COMMENT_MODE:re,C_NUMBER_MODE:se,C_NUMBER_RE:O,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})},HASH_COMMENT_MODE:ae,IDENT_RE:T,MATCH_NOTHING_RE:w,METHOD_GUARD:ue,NUMBER_MODE:oe,NUMBER_RE:D,PHRASAL_WORDS_MODE:ne,QUOTE_STRING_MODE:M,REGEXP_MODE:P,RE_STARTERS_RE:A,SHEBANG:ee,TITLE_MODE:le,UNDERSCORE_IDENT_RE:E,UNDERSCORE_TITLE_MODE:F});function fe(e,t){e.input[e.index-1]===`.`&&t.ignoreMatch()}function pe(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function me(e,t){t&&e.beginKeywords&&(e.begin=`\\b(`+e.beginKeywords.split(` `).join(`|`)+`)(?!\\.)(?=\\b|\\s)`,e.__beforeBegin=fe,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function he(e,t){Array.isArray(e.illegal)&&(e.illegal=y(...e.illegal))}function ge(e,t){if(e.match){if(e.begin||e.end)throw Error(`begin & end are not supported with match`);e.begin=e.match,delete e.match}}function _e(e,t){e.relevance===void 0&&(e.relevance=1)}var ve=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw Error(`beforeMatch cannot be used with starts`);let n=Object.assign({},e);Object.keys(e).forEach(t=>{delete e[t]}),e.keywords=n.keywords,e.begin=_(n.beforeMatch,m(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},ye=[`of`,`and`,`for`,`in`,`not`,`or`,`if`,`then`,`parent`,`list`,`value`],be=`keyword`;function xe(e,t,n=be){let r=Object.create(null);return typeof e==`string`?i(n,e.split(` `)):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(n){Object.assign(r,xe(e[n],t,n))}),r;function i(e,n){t&&(n=n.map(e=>e.toLowerCase())),n.forEach(function(t){let n=t.split(`|`);r[n[0]]=[e,Se(n[0],n[1])]})}}function Se(e,t){return t?Number(t):+!Ce(e)}function Ce(e){return ye.includes(e.toLowerCase())}var we={},Te=e=>{console.error(e)},Ee=(e,...t)=>{console.log(`WARN: ${e}`,...t)},De=(e,t)=>{we[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),we[`${e}/${t}`]=!0)},Oe=Error();function ke(e,t,{key:n}){let r=0,i=e[n],a={},o={};for(let e=1;e<=t.length;e++)o[e+r]=i[e],a[e+r]=!0,r+=b(t[e-1]);e[n]=o,e[n]._emit=a,e[n]._multi=!0}function Ae(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Te(`skip, excludeBegin, returnBegin not compatible with beginScope: {}`),Oe;if(typeof e.beginScope!=`object`||e.beginScope===null)throw Te(`beginScope must be object`),Oe;ke(e,e.begin,{key:`beginScope`}),e.begin=C(e.begin,{joinWith:``})}}function je(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Te(`skip, excludeEnd, returnEnd not compatible with endScope: {}`),Oe;if(typeof e.endScope!=`object`||e.endScope===null)throw Te(`endScope must be object`),Oe;ke(e,e.end,{key:`endScope`}),e.end=C(e.end,{joinWith:``})}}function Me(e){e.scope&&typeof e.scope==`object`&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function Ne(e){Me(e),typeof e.beginScope==`string`&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope==`string`&&(e.endScope={_wrap:e.endScope}),Ae(e),je(e)}function Pe(e){function t(t,n){return new RegExp(p(t),`m`+(e.case_insensitive?`i`:``)+(e.unicodeRegex?`u`:``)+(n?`g`:``))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=b(e)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);let e=this.regexes.map(e=>e[1]);this.matcherRe=t(C(e,{joinWith:`|`}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;let t=this.matcherRe.exec(e);if(!t)return null;let n=t.findIndex((e,t)=>t>0&&e!==void 0),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];let t=new n;return this.rules.slice(e).forEach(([e,n])=>t.addRule(e,n)),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),t.type===`begin`&&this.count++}exec(e){let t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition()&&!(n&&n.index===this.lastIndex)){let t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}function i(e){let t=new r;return e.contains.forEach(e=>t.addRule(e.begin,{rule:e,type:`begin`})),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:`end`}),e.illegal&&t.addRule(e.illegal,{type:`illegal`}),t}function o(n,r){let a=n;if(n.isCompiled)return a;[pe,ge,Ne,ve].forEach(e=>e(n,r)),e.compilerExtensions.forEach(e=>e(n,r)),n.__beforeBegin=null,[me,he,_e].forEach(e=>e(n,r)),n.isCompiled=!0;let s=null;return typeof n.keywords==`object`&&n.keywords.$pattern&&(n.keywords=Object.assign({},n.keywords),s=n.keywords.$pattern,delete n.keywords.$pattern),s||=/\w+/,n.keywords&&=xe(n.keywords,e.case_insensitive),a.keywordPatternRe=t(s,!0),r&&(n.begin||=/\B|\b/,a.beginRe=t(a.begin),!n.end&&!n.endsWithParent&&(n.end=/\B|\b/),n.end&&(a.endRe=t(a.end)),a.terminatorEnd=p(a.end)||``,n.endsWithParent&&r.terminatorEnd&&(a.terminatorEnd+=(n.end?`|`:``)+r.terminatorEnd)),n.illegal&&(a.illegalRe=t(n.illegal)),n.contains||=[],n.contains=[].concat(...n.contains.map(function(e){return Ie(e===`self`?n:e)})),n.contains.forEach(function(e){o(e,a)}),n.starts&&o(n.starts,r),a.matcher=i(a),a}if(e.compilerExtensions||=[],e.contains&&e.contains.includes(`self`))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=a(e.classNameAliases||{}),o(e)}function Fe(e){return e?e.endsWithParent||Fe(e.starts):!1}function Ie(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return a(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:Fe(e)?a(e,{starts:e.starts?a(e.starts):null}):Object.isFrozen(e)?a(e):e}var Le=`11.11.1`,Re=class extends Error{constructor(e,t){super(e),this.name=`HTMLInjectionError`,this.html=t}},ze=i,Be=a,Ve=Symbol(`nomatch`),He=7,Ue=function(e){let t=Object.create(null),i=Object.create(null),a=[],o=!0,s=`Could not find the language '{}', did you forget to load/include a language module?`,c={disableAutodetect:!0,name:`Plain text`,contains:[]},l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:`hljs-`,cssSelector:`pre code`,languages:null,__emitter:f};function u(e){return l.noHighlightRe.test(e)}function d(e){let t=e.className+` `;t+=e.parentNode?e.parentNode.className:``;let n=l.languageDetectRe.exec(t);if(n){let t=te(n[1]);return t||(Ee(s.replace(`{}`,n[1])),Ee(`Falling back to no-highlight mode for this block.`,e)),t?n[1]:`no-highlight`}return t.split(/\s+/).find(e=>u(e)||te(e))}function p(e,t,n){let r=``,i=``;typeof t==`object`?(r=e,n=t.ignoreIllegals,i=t.language):(De(`10.7.0`,`highlight(lang, code, ...args) has been deprecated.`),De(`10.7.0`,`Please use highlight(code, options) instead.
|
|
201
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),i=e,r=t),n===void 0&&(n=!0);let a={code:r,language:i};ae(`before:highlight`,a);let o=a.result?a.result:v(a.language,a.code,n);return o.code=a.code,ae(`after:highlight`,o),o}function v(e,n,i,a){let c=Object.create(null);function u(e,t){return e.keywords[t]}function d(){if(!A.keywords){j.addText(M);return}let e=0;A.keywordPatternRe.lastIndex=0;let t=A.keywordPatternRe.exec(M),n=``;for(;t;){n+=M.substring(e,t.index);let r=D.case_insensitive?t[0].toLowerCase():t[0],i=u(A,r);if(i){let[e,a]=i;if(j.addText(n),n=``,c[r]=(c[r]||0)+1,c[r]<=He&&(ne+=a),e.startsWith(`_`))n+=t[0];else{let n=D.classNameAliases[e]||e;m(t[0],n)}}else n+=t[0];e=A.keywordPatternRe.lastIndex,t=A.keywordPatternRe.exec(M)}n+=M.substring(e),j.addText(n)}function f(){if(M===``)return;let e=null;if(typeof A.subLanguage==`string`){if(!t[A.subLanguage]){j.addText(M);return}e=v(A.subLanguage,M,!0,ee[A.subLanguage]),ee[A.subLanguage]=e._top}else e=S(M,A.subLanguage.length?A.subLanguage:null);A.relevance>0&&(ne+=e.relevance),j.__addSublanguage(e._emitter,e.language)}function p(){A.subLanguage==null?d():f(),M=``}function m(e,t){e!==``&&(j.startScope(t),j.addText(e),j.endScope())}function h(e,t){let n=1,r=t.length-1;for(;n<=r;){if(!e._emit[n]){n++;continue}let r=D.classNameAliases[e[n]]||e[n],i=t[n];r?m(i,r):(M=i,d(),M=``),n++}}function g(e,t){return e.scope&&typeof e.scope==`string`&&j.openNode(D.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(m(M,D.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),M=``):e.beginScope._multi&&(h(e.beginScope,t),M=``)),A=Object.create(e,{parent:{value:A}}),A}function _(e,t,n){let i=x(e.endRe,n);if(i){if(e[`on:end`]){let n=new r(e);e[`on:end`](t,n),n.isMatchIgnored&&(i=!1)}if(i){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return _(e.parent,t,n)}function y(e){return A.matcher.regexIndex===0?(M+=e[0],1):(ie=!0,0)}function b(e){let t=e[0],n=e.rule,i=new r(n),a=[n.__beforeBegin,n[`on:begin`]];for(let n of a)if(n&&(n(e,i),i.isMatchIgnored))return y(t);return n.skip?M+=t:(n.excludeBegin&&(M+=t),p(),!n.returnBegin&&!n.excludeBegin&&(M=t)),g(n,e),n.returnBegin?0:t.length}function C(e){let t=e[0],r=n.substring(e.index),i=_(A,e,r);if(!i)return Ve;let a=A;A.endScope&&A.endScope._wrap?(p(),m(t,A.endScope._wrap)):A.endScope&&A.endScope._multi?(p(),h(A.endScope,e)):a.skip?M+=t:(a.returnEnd||a.excludeEnd||(M+=t),p(),a.excludeEnd&&(M=t));do A.scope&&j.closeNode(),!A.skip&&!A.subLanguage&&(ne+=A.relevance),A=A.parent;while(A!==i.parent);return i.starts&&g(i.starts,e),a.returnEnd?0:t.length}function w(){let e=[];for(let t=A;t!==D;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach(e=>j.openNode(e))}let T={};function E(t,r){let a=r&&r[0];if(M+=t,a==null)return p(),0;if(T.type===`begin`&&r.type===`end`&&T.index===r.index&&a===``){if(M+=n.slice(r.index,r.index+1),!o){let t=Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=T.rule,t}return 1}if(T=r,r.type===`begin`)return b(r);if(r.type===`illegal`&&!i){let e=Error(`Illegal lexeme "`+a+`" for mode "`+(A.scope||`<unnamed>`)+`"`);throw e.mode=A,e}else if(r.type===`end`){let e=C(r);if(e!==Ve)return e}if(r.type===`illegal`&&a===``)return M+=`
|
|
202
|
+
`,1;if(re>1e5&&re>r.index*3)throw Error(`potential infinite loop, way more iterations than matches`);return M+=a,a.length}let D=te(e);if(!D)throw Te(s.replace(`{}`,e)),Error(`Unknown language: "`+e+`"`);let O=Pe(D),k=``,A=a||O,ee={},j=new l.__emitter(l);w();let M=``,ne=0,N=0,re=0,ie=!1;try{if(D.__emitTokens)D.__emitTokens(n,j);else{for(A.matcher.considerAll();;){re++,ie?ie=!1:A.matcher.considerAll(),A.matcher.lastIndex=N;let e=A.matcher.exec(n);if(!e)break;let t=E(n.substring(N,e.index),e);N=e.index+t}E(n.substring(N))}return j.finalize(),k=j.toHTML(),{language:e,value:k,relevance:ne,illegal:!1,_emitter:j,_top:A}}catch(t){if(t.message&&t.message.includes(`Illegal`))return{language:e,value:ze(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:N,context:n.slice(N-100,N+100),mode:t.mode,resultSoFar:k},_emitter:j};if(o)return{language:e,value:ze(n),illegal:!1,relevance:0,errorRaised:t,_emitter:j,_top:A};throw t}}function b(e){let t={value:ze(e),illegal:!1,relevance:0,_top:c,_emitter:new l.__emitter(l)};return t._emitter.addText(e),t}function S(e,n){n=n||l.languages||Object.keys(t);let r=b(e),i=n.filter(te).filter(ne).map(t=>v(t,e,!1));i.unshift(r);let[a,o]=i.sort((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(te(e.language).supersetOf===t.language)return 1;if(te(t.language).supersetOf===e.language)return-1}return 0}),s=a;return s.secondBest=o,s}function C(e,t,n){let r=t&&i[t]||n;e.classList.add(`hljs`),e.classList.add(`language-${r}`)}function w(e){let t=null,n=d(e);if(u(n))return;if(ae(`before:highlightElement`,{el:e,language:n}),e.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",e);return}if(e.children.length>0&&(l.ignoreUnescapedHTML||(console.warn(`One of your code blocks includes unescaped HTML. This is a potentially serious security risk.`),console.warn(`https://github.com/highlightjs/highlight.js/wiki/security`),console.warn(`The element with unescaped HTML:`),console.warn(e)),l.throwUnescapedHTML))throw new Re(`One of your code blocks includes unescaped HTML.`,e.innerHTML);t=e;let r=t.textContent,i=n?p(r,{language:n,ignoreIllegals:!0}):S(r);e.innerHTML=i.value,e.dataset.highlighted=`yes`,C(e,n,i.language),e.result={language:i.language,re:i.relevance,relevance:i.relevance},i.secondBest&&(e.secondBest={language:i.secondBest.language,relevance:i.secondBest.relevance}),ae(`after:highlightElement`,{el:e,result:i,text:r})}function T(e){l=Be(l,e)}let E=()=>{k(),De(`10.6.0`,`initHighlighting() deprecated. Use highlightAll() now.`)};function D(){k(),De(`10.6.0`,`initHighlightingOnLoad() deprecated. Use highlightAll() now.`)}let O=!1;function k(){function e(){k()}if(document.readyState===`loading`){O||window.addEventListener(`DOMContentLoaded`,e,!1),O=!0;return}document.querySelectorAll(l.cssSelector).forEach(w)}function A(n,r){let i=null;try{i=r(e)}catch(e){if(Te(`Language definition for '{}' could not be registered.`.replace(`{}`,n)),o)Te(e);else throw e;i=c}i.name||=n,t[n]=i,i.rawDefinition=r.bind(null,e),i.aliases&&M(i.aliases,{languageName:n})}function ee(e){delete t[e];for(let t of Object.keys(i))i[t]===e&&delete i[t]}function j(){return Object.keys(t)}function te(e){return e=(e||``).toLowerCase(),t[e]||t[i[e]]}function M(e,{languageName:t}){typeof e==`string`&&(e=[e]),e.forEach(e=>{i[e.toLowerCase()]=t})}function ne(e){let t=te(e);return t&&!t.disableAutodetect}function N(e){e[`before:highlightBlock`]&&!e[`before:highlightElement`]&&(e[`before:highlightElement`]=t=>{e[`before:highlightBlock`](Object.assign({block:t.el},t))}),e[`after:highlightBlock`]&&!e[`after:highlightElement`]&&(e[`after:highlightElement`]=t=>{e[`after:highlightBlock`](Object.assign({block:t.el},t))})}function re(e){N(e),a.push(e)}function ie(e){let t=a.indexOf(e);t!==-1&&a.splice(t,1)}function ae(e,t){let n=e;a.forEach(function(e){e[n]&&e[n](t)})}function oe(e){return De(`10.7.0`,`highlightBlock will be removed entirely in v12.0`),De(`10.7.0`,`Please use highlightElement now.`),w(e)}Object.assign(e,{highlight:p,highlightAuto:S,highlightAll:k,highlightElement:w,highlightBlock:oe,configure:T,initHighlighting:E,initHighlightingOnLoad:D,registerLanguage:A,unregisterLanguage:ee,listLanguages:j,getLanguage:te,registerAliases:M,autoDetection:ne,inherit:Be,addPlugin:re,removePlugin:ie}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=Le,e.regex={concat:_,lookahead:m,either:y,optional:g,anyNumberOfTimes:h};for(let e in de)typeof de[e]==`object`&&n(de[e]);return Object.assign(e,de),e},We=Ue({});We.newInstance=()=>Ue({}),t.exports=We,We.HighlightJS=We,We.default=We}))()).default;function TT(e,t=[]){return e.flatMap(e=>{let n=[...t,...e.properties?e.properties.className:[]];return e.children?TT(e.children,n):{text:e.value,classes:n}})}function ET(e){return e.value||e.children||[]}function DT(e){return!!wT.getLanguage(e)}function OT({doc:e,name:t,lowlight:n,defaultLanguage:r}){let i=[];return R_(e,e=>e.type.name===t).forEach(e=>{let t=e.pos+1,a=e.node.attrs.language||r,o=n.listLanguages();TT(a&&(o.includes(a)||DT(a)||n.registered?.call(n,a))?ET(n.highlight(a,e.node.textContent)):ET(n.highlightAuto(e.node.textContent))).forEach(e=>{let n=t+e.text.length;if(e.classes.length){let r=hh.inline(t,n,{class:e.classes.join(` `)});i.push(r)}t=n})}),vh.create(e,i)}function kT(e){return typeof e==`function`}function AT({name:e,lowlight:t,defaultLanguage:n}){if(![`highlight`,`highlightAuto`,`listLanguages`].every(e=>kT(t[e])))throw Error(`You should provide an instance of lowlight to use the code-block-lowlight extension`);let r=new Zu({key:new ed(`lowlight`),state:{init:(r,{doc:i})=>OT({doc:i,name:e,lowlight:t,defaultLanguage:n}),apply:(r,i,a,o)=>{let s=a.selection.$head.parent.type.name,c=o.selection.$head.parent.type.name,l=R_(a.doc,t=>t.type.name===e),u=R_(o.doc,t=>t.type.name===e);return r.docChanged&&([s,c].includes(e)||u.length!==l.length||r.steps.some(e=>e.from!==void 0&&e.to!==void 0&&l.some(t=>t.pos>=e.from&&t.pos+t.node.nodeSize<=e.to)))?OT({doc:r.doc,name:e,lowlight:t,defaultLanguage:n}):i.map(r.mapping,r.doc)}},props:{decorations(e){return r.getState(e)}}});return r}var jT=Wx.extend({addOptions(){return{...this.parent?.call(this),lowlight:{},languageClassPrefix:`language-`,exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:4,HTMLAttributes:{}}},addProseMirrorPlugins(){return[...this.parent?.call(this)||[],AT({name:this.name,lowlight:this.options.lowlight,defaultLanguage:this.options.defaultLanguage})]}}),MT=xT,NT={};function PT(e){let t=NT[e];if(t)return t;t=NT[e]=[];for(let e=0;e<128;e++){let n=String.fromCharCode(e);t.push(n)}for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t[r]=`%`+(`0`+r.toString(16).toUpperCase()).slice(-2)}return t}function FT(e,t){typeof t!=`string`&&(t=FT.defaultChars);let n=PT(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(e){let t=``;for(let r=0,i=e.length;r<i;r+=3){let a=parseInt(e.slice(r+1,r+3),16);if(a<128){t+=n[a];continue}if((a&224)==192&&r+3<i){let n=parseInt(e.slice(r+4,r+6),16);if((n&192)==128){let e=a<<6&1984|n&63;e<128?t+=`��`:t+=String.fromCharCode(e),r+=3;continue}}if((a&240)==224&&r+6<i){let n=parseInt(e.slice(r+4,r+6),16),i=parseInt(e.slice(r+7,r+9),16);if((n&192)==128&&(i&192)==128){let e=a<<12&61440|n<<6&4032|i&63;e<2048||e>=55296&&e<=57343?t+=`���`:t+=String.fromCharCode(e),r+=6;continue}}if((a&248)==240&&r+9<i){let n=parseInt(e.slice(r+4,r+6),16),i=parseInt(e.slice(r+7,r+9),16),o=parseInt(e.slice(r+10,r+12),16);if((n&192)==128&&(i&192)==128&&(o&192)==128){let e=a<<18&1835008|n<<12&258048|i<<6&4032|o&63;e<65536||e>1114111?t+=`����`:(e-=65536,t+=String.fromCharCode(55296+(e>>10),56320+(e&1023))),r+=9;continue}}t+=`�`}return t})}FT.defaultChars=`;/?:@&=+$,#`,FT.componentChars=``;var IT={};function LT(e){let t=IT[e];if(t)return t;t=IT[e]=[];for(let e=0;e<128;e++){let n=String.fromCharCode(e);/^[0-9a-z]$/i.test(n)?t.push(n):t.push(`%`+(`0`+e.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}function RT(e,t,n){typeof t!=`string`&&(n=t,t=RT.defaultChars),n===void 0&&(n=!0);let r=LT(t),i=``;for(let t=0,a=e.length;t<a;t++){let o=e.charCodeAt(t);if(n&&o===37&&t+2<a&&/^[0-9a-f]{2}$/i.test(e.slice(t+1,t+3))){i+=e.slice(t,t+3),t+=2;continue}if(o<128){i+=r[o];continue}if(o>=55296&&o<=57343){if(o>=55296&&o<=56319&&t+1<a){let n=e.charCodeAt(t+1);if(n>=56320&&n<=57343){i+=encodeURIComponent(e[t]+e[t+1]),t++;continue}}i+=`%EF%BF%BD`;continue}i+=encodeURIComponent(e[t])}return i}RT.defaultChars=`;/?:@&=+$,-_.!~*'()#`,RT.componentChars=`-_.!~*'()`;function zT(e){let t=``;return t+=e.protocol||``,t+=e.slashes?`//`:``,t+=e.auth?e.auth+`@`:``,e.hostname&&e.hostname.indexOf(`:`)!==-1?t+=`[`+e.hostname+`]`:t+=e.hostname||``,t+=e.port?`:`+e.port:``,t+=e.pathname||``,t+=e.search||``,t+=e.hash||``,t}function BT(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var VT=/^([a-z0-9.+-]+:)/i,HT=/:[0-9]*$/,UT=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,WT=[`%`,`/`,`?`,`;`,`#`,`'`,`{`,`}`,`|`,`\\`,`^`,"`",`<`,`>`,`"`,"`",` `,`\r`,`
|
|
203
|
+
`,` `],GT=[`/`,`?`,`#`],KT=255,qT=/^[+a-z0-9A-Z_-]{0,63}$/,JT=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,YT={javascript:!0,"javascript:":!0},XT={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function ZT(e,t){if(e&&e instanceof BT)return e;let n=new BT;return n.parse(e,t),n}BT.prototype.parse=function(e,t){let n,r,i,a=e;if(a=a.trim(),!t&&e.split(`#`).length===1){let e=UT.exec(a);if(e)return this.pathname=e[1],e[2]&&(this.search=e[2]),this}let o=VT.exec(a);if(o&&(o=o[0],n=o.toLowerCase(),this.protocol=o,a=a.substr(o.length)),(t||o||a.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=a.substr(0,2)===`//`,i&&!(o&&YT[o])&&(a=a.substr(2),this.slashes=!0)),!YT[o]&&(i||o&&!XT[o])){let e=-1;for(let t=0;t<GT.length;t++)r=a.indexOf(GT[t]),r!==-1&&(e===-1||r<e)&&(e=r);let t,n;n=e===-1?a.lastIndexOf(`@`):a.lastIndexOf(`@`,e),n!==-1&&(t=a.slice(0,n),a=a.slice(n+1),this.auth=t),e=-1;for(let t=0;t<WT.length;t++)r=a.indexOf(WT[t]),r!==-1&&(e===-1||r<e)&&(e=r);e===-1&&(e=a.length),a[e-1]===`:`&&e--;let i=a.slice(0,e);a=a.slice(e),this.parseHost(i),this.hostname=this.hostname||``;let o=this.hostname[0]===`[`&&this.hostname[this.hostname.length-1]===`]`;if(!o){let e=this.hostname.split(/\./);for(let t=0,n=e.length;t<n;t++){let n=e[t];if(n&&!n.match(qT)){let r=``;for(let e=0,t=n.length;e<t;e++)n.charCodeAt(e)>127?r+=`x`:r+=n[e];if(!r.match(qT)){let r=e.slice(0,t),i=e.slice(t+1),o=n.match(JT);o&&(r.push(o[1]),i.unshift(o[2])),i.length&&(a=i.join(`.`)+a),this.hostname=r.join(`.`);break}}}}this.hostname.length>KT&&(this.hostname=``),o&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}let s=a.indexOf(`#`);s!==-1&&(this.hash=a.substr(s),a=a.slice(0,s));let c=a.indexOf(`?`);return c!==-1&&(this.search=a.substr(c),a=a.slice(0,c)),a&&(this.pathname=a),XT[n]&&this.hostname&&!this.pathname&&(this.pathname=``),this},BT.prototype.parseHost=function(e){let t=HT.exec(e);t&&(t=t[0],t!==`:`&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var QT=t({decode:()=>FT,encode:()=>RT,format:()=>zT,parse:()=>ZT}),$T=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,eE=/[\0-\x1F\x7F-\x9F]/,tE=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,nE=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,rE=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,iE=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,aE=t({Any:()=>$T,Cc:()=>eE,Cf:()=>tE,P:()=>nE,S:()=>rE,Z:()=>iE}),oE=new Uint16Array(`ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻\xA0ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌`.split(``).map(e=>e.charCodeAt(0))),sE=new Uint16Array(`Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢`.split(``).map(e=>e.charCodeAt(0))),cE=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),lE=String.fromCodePoint??function(e){let t=``;return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function uE(e){return e>=55296&&e<=57343||e>1114111?65533:cE.get(e)??e}var dE;(function(e){e[e.NUM=35]=`NUM`,e[e.SEMI=59]=`SEMI`,e[e.EQUALS=61]=`EQUALS`,e[e.ZERO=48]=`ZERO`,e[e.NINE=57]=`NINE`,e[e.LOWER_A=97]=`LOWER_A`,e[e.LOWER_F=102]=`LOWER_F`,e[e.LOWER_X=120]=`LOWER_X`,e[e.LOWER_Z=122]=`LOWER_Z`,e[e.UPPER_A=65]=`UPPER_A`,e[e.UPPER_F=70]=`UPPER_F`,e[e.UPPER_Z=90]=`UPPER_Z`})(dE||={});var fE=32,pE;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(pE||={});function mE(e){return e>=dE.ZERO&&e<=dE.NINE}function hE(e){return e>=dE.UPPER_A&&e<=dE.UPPER_F||e>=dE.LOWER_A&&e<=dE.LOWER_F}function gE(e){return e>=dE.UPPER_A&&e<=dE.UPPER_Z||e>=dE.LOWER_A&&e<=dE.LOWER_Z||mE(e)}function _E(e){return e===dE.EQUALS||gE(e)}var vE;(function(e){e[e.EntityStart=0]=`EntityStart`,e[e.NumericStart=1]=`NumericStart`,e[e.NumericDecimal=2]=`NumericDecimal`,e[e.NumericHex=3]=`NumericHex`,e[e.NamedEntity=4]=`NamedEntity`})(vE||={});var yE;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(yE||={});var bE=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=vE.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=yE.Strict}startEntity(e){this.decodeMode=e,this.state=vE.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case vE.EntityStart:return e.charCodeAt(t)===dE.NUM?(this.state=vE.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=vE.NamedEntity,this.stateNamedEntity(e,t));case vE.NumericStart:return this.stateNumericStart(e,t);case vE.NumericDecimal:return this.stateNumericDecimal(e,t);case vE.NumericHex:return this.stateNumericHex(e,t);case vE.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|fE)===dE.LOWER_X?(this.state=vE.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=vE.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*r**+i+parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(mE(r)||hE(r))t+=1;else return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(r,3)}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(mE(r))t+=1;else return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2)}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return(n=this.errors)==null||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===dE.SEMI)this.consumed+=1;else if(this.decodeMode===yE.Strict)return 0;return this.emitCodePoint(uE(this.result),this.consumed),this.errors&&(e!==dE.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&pE.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let a=e.charCodeAt(t);if(this.treeIndex=SE(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===yE.Attribute&&(i===0||_E(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&pE.VALUE_LENGTH)>>14,i!==0){if(a===dE.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==yE.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&pE.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)==null||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~pE.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case vE.NamedEntity:return this.result!==0&&(this.decodeMode!==yE.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case vE.NumericDecimal:return this.emitNumericEntity(0,2);case vE.NumericHex:return this.emitNumericEntity(0,3);case vE.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case vE.EntityStart:return 0}}};function xE(e){let t=``,n=new bE(e,e=>t+=lE(e));return function(e,r){let i=0,a=0;for(;(a=e.indexOf(`&`,a))>=0;){t+=e.slice(i,a),n.startEntity(r);let o=n.write(e,a+1);if(o<0){i=a+n.end();break}i=a+o,a=o===0?i+1:i}let o=t+e.slice(i);return t=``,o}}function SE(e,t,n,r){let i=(t&pE.BRANCH_LENGTH)>>7,a=t&pE.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=n,s=o+i-1;for(;o<=s;){let t=o+s>>>1,n=e[t];if(n<r)o=t+1;else if(n>r)s=t-1;else return e[t+i]}return-1}var CE=xE(oE);xE(sE);function wE(e,t=yE.Legacy){return CE(e,t)}var TE=t({arrayReplaceAt:()=>jE,assign:()=>AE,escapeHtml:()=>WE,escapeRE:()=>KE,fromCodePoint:()=>NE,has:()=>kE,isMdAsciiPunct:()=>XE,isPunctChar:()=>YE,isSpace:()=>qE,isString:()=>DE,isValidEntityCode:()=>ME,isWhiteSpace:()=>JE,lib:()=>QE,normalizeReference:()=>ZE,unescapeAll:()=>zE,unescapeMd:()=>RE});function EE(e){return Object.prototype.toString.call(e)}function DE(e){return EE(e)===`[object String]`}var OE=Object.prototype.hasOwnProperty;function kE(e,t){return OE.call(e,t)}function AE(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){if(t){if(typeof t!=`object`)throw TypeError(t+`must be object`);Object.keys(t).forEach(function(n){e[n]=t[n]})}}),e}function jE(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function ME(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)==65535||(e&65535)==65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function NE(e){if(e>65535){e-=65536;let t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var PE=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,FE=RegExp(PE.source+`|&([a-z#][a-z0-9]{1,31});`,`gi`),IE=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function LE(e,t){if(t.charCodeAt(0)===35&&IE.test(t)){let n=t[1].toLowerCase()===`x`?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return ME(n)?NE(n):e}let n=wE(e);return n===e?e:n}function RE(e){return e.indexOf(`\\`)<0?e:e.replace(PE,`$1`)}function zE(e){return e.indexOf(`\\`)<0&&e.indexOf(`&`)<0?e:e.replace(FE,function(e,t,n){return t||LE(e,n)})}var BE=/[&<>"]/,VE=/[&<>"]/g,HE={"&":`&`,"<":`<`,">":`>`,'"':`"`};function UE(e){return HE[e]}function WE(e){return BE.test(e)?e.replace(VE,UE):e}var GE=/[.?*+^$[\]\\(){}|-]/g;function KE(e){return e.replace(GE,`\\$&`)}function qE(e){switch(e){case 9:case 32:return!0}return!1}function JE(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function YE(e){return nE.test(e)||rE.test(e)}function XE(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function ZE(e){return e=e.trim().replace(/\s+/g,` `),e.toLowerCase().toUpperCase()}var QE={mdurl:QT,ucmicro:aE};function $E(e,t,n){let r,i,a,o,s=e.posMax,c=e.pos;for(e.pos=t+1,r=1;e.pos<s;){if(a=e.src.charCodeAt(e.pos),a===93&&(r--,r===0)){i=!0;break}if(o=e.pos,e.md.inline.skipToken(e),a===91){if(o===e.pos-1)r++;else if(n)return e.pos=c,-1}}let l=-1;return i&&(l=e.pos),e.pos=c,l}function eD(e,t,n){let r,i=t,a={ok:!1,pos:0,str:``};if(e.charCodeAt(i)===60){for(i++;i<n;){if(r=e.charCodeAt(i),r===10||r===60)return a;if(r===62)return a.pos=i+1,a.str=zE(e.slice(t+1,i)),a.ok=!0,a;if(r===92&&i+1<n){i+=2;continue}i++}return a}let o=0;for(;i<n&&(r=e.charCodeAt(i),!(r===32||r<32||r===127));){if(r===92&&i+1<n){if(e.charCodeAt(i+1)===32)break;i+=2;continue}if(r===40&&(o++,o>32))return a;if(r===41){if(o===0)break;o--}i++}return t===i||o!==0?a:(a.str=zE(e.slice(t,i)),a.pos=i,a.ok=!0,a)}function tD(e,t,n,r){let i,a=t,o={ok:!1,can_continue:!1,pos:0,str:``,marker:0};if(r)o.str=r.str,o.marker=r.marker;else{if(a>=n)return o;let r=e.charCodeAt(a);if(r!==34&&r!==39&&r!==40)return o;t++,a++,r===40&&(r=41),o.marker=r}for(;a<n;){if(i=e.charCodeAt(a),i===o.marker)return o.pos=a+1,o.str+=zE(e.slice(t,a)),o.ok=!0,o;if(i===40&&o.marker===41)return o;i===92&&a+1<n&&a++,a++}return o.can_continue=!0,o.str+=zE(e.slice(t,a)),o}var nD=t({parseLinkDestination:()=>eD,parseLinkLabel:()=>$E,parseLinkTitle:()=>tD}),rD={};rD.code_inline=function(e,t,n,r,i){let a=e[t];return`<code`+i.renderAttrs(a)+`>`+WE(a.content)+`</code>`},rD.code_block=function(e,t,n,r,i){let a=e[t];return`<pre`+i.renderAttrs(a)+`><code>`+WE(e[t].content)+`</code></pre>
|
|
204
|
+
`},rD.fence=function(e,t,n,r,i){let a=e[t],o=a.info?zE(a.info).trim():``,s=``,c=``;if(o){let e=o.split(/(\s+)/g);s=e[0],c=e.slice(2).join(``)}let l;if(l=n.highlight&&n.highlight(a.content,s,c)||WE(a.content),l.indexOf(`<pre`)===0)return l+`
|
|
205
|
+
`;if(o){let e=a.attrIndex(`class`),t=a.attrs?a.attrs.slice():[];e<0?t.push([`class`,n.langPrefix+s]):(t[e]=t[e].slice(),t[e][1]+=` `+n.langPrefix+s);let r={attrs:t};return`<pre><code${i.renderAttrs(r)}>${l}</code></pre>\n`}return`<pre><code${i.renderAttrs(a)}>${l}</code></pre>\n`},rD.image=function(e,t,n,r,i){let a=e[t];return a.attrs[a.attrIndex(`alt`)][1]=i.renderInlineAsText(a.children,n,r),i.renderToken(e,t,n)},rD.hardbreak=function(e,t,n){return n.xhtmlOut?`<br />
|
|
206
|
+
`:`<br>
|
|
207
|
+
`},rD.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`<br />
|
|
208
|
+
`:`<br>
|
|
209
|
+
`:`
|
|
210
|
+
`},rD.text=function(e,t){return WE(e[t].content)},rD.html_block=function(e,t){return e[t].content},rD.html_inline=function(e,t){return e[t].content};function iD(){this.rules=AE({},rD)}iD.prototype.renderAttrs=function(e){let t,n,r;if(!e.attrs)return``;for(r=``,t=0,n=e.attrs.length;t<n;t++)r+=` `+WE(e.attrs[t][0])+`="`+WE(e.attrs[t][1])+`"`;return r},iD.prototype.renderToken=function(e,t,n){let r=e[t],i=``;if(r.hidden)return``;r.block&&r.nesting!==-1&&t&&e[t-1].hidden&&(i+=`
|
|
211
|
+
`),i+=(r.nesting===-1?`</`:`<`)+r.tag,i+=this.renderAttrs(r),r.nesting===0&&n.xhtmlOut&&(i+=` /`);let a=!1;if(r.block&&(a=!0,r.nesting===1&&t+1<e.length)){let n=e[t+1];(n.type===`inline`||n.hidden||n.nesting===-1&&n.tag===r.tag)&&(a=!1)}return i+=a?`>
|
|
212
|
+
`:`>`,i},iD.prototype.renderInline=function(e,t,n){let r=``,i=this.rules;for(let a=0,o=e.length;a<o;a++){let o=e[a].type;i[o]===void 0?r+=this.renderToken(e,a,t):r+=i[o](e,a,t,n,this)}return r},iD.prototype.renderInlineAsText=function(e,t,n){let r=``;for(let i=0,a=e.length;i<a;i++)switch(e[i].type){case`text`:r+=e[i].content;break;case`image`:r+=this.renderInlineAsText(e[i].children,t,n);break;case`html_inline`:case`html_block`:r+=e[i].content;break;case`softbreak`:case`hardbreak`:r+=`
|
|
213
|
+
`;break;default:}return r},iD.prototype.render=function(e,t,n){let r=``,i=this.rules;for(let a=0,o=e.length;a<o;a++){let o=e[a].type;o===`inline`?r+=this.renderInline(e[a].children,t,n):i[o]===void 0?r+=this.renderToken(e,a,t,n):r+=i[o](e,a,t,n,this)}return r};function aD(){this.__rules__=[],this.__cache__=null}aD.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},aD.prototype.__compile__=function(){let e=this,t=[``];e.__rules__.forEach(function(e){e.enabled&&e.alt.forEach(function(e){t.indexOf(e)<0&&t.push(e)})}),e.__cache__={},t.forEach(function(t){e.__cache__[t]=[],e.__rules__.forEach(function(n){n.enabled&&(t&&n.alt.indexOf(t)<0||e.__cache__[t].push(n.fn))})})},aD.prototype.at=function(e,t,n){let r=this.__find__(e),i=n||{};if(r===-1)throw Error(`Parser rule not found: `+e);this.__rules__[r].fn=t,this.__rules__[r].alt=i.alt||[],this.__cache__=null},aD.prototype.before=function(e,t,n,r){let i=this.__find__(e),a=r||{};if(i===-1)throw Error(`Parser rule not found: `+e);this.__rules__.splice(i,0,{name:t,enabled:!0,fn:n,alt:a.alt||[]}),this.__cache__=null},aD.prototype.after=function(e,t,n,r){let i=this.__find__(e),a=r||{};if(i===-1)throw Error(`Parser rule not found: `+e);this.__rules__.splice(i+1,0,{name:t,enabled:!0,fn:n,alt:a.alt||[]}),this.__cache__=null},aD.prototype.push=function(e,t,n){let r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null},aD.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);let n=[];return e.forEach(function(e){let r=this.__find__(e);if(r<0){if(t)return;throw Error(`Rules manager: invalid rule name `+e)}this.__rules__[r].enabled=!0,n.push(e)},this),this.__cache__=null,n},aD.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(e){e.enabled=!1}),this.enable(e,t)},aD.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);let n=[];return e.forEach(function(e){let r=this.__find__(e);if(r<0){if(t)return;throw Error(`Rules manager: invalid rule name `+e)}this.__rules__[r].enabled=!1,n.push(e)},this),this.__cache__=null,n},aD.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function oD(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content=``,this.markup=``,this.info=``,this.meta=null,this.block=!1,this.hidden=!1}oD.prototype.attrIndex=function(e){if(!this.attrs)return-1;let t=this.attrs;for(let n=0,r=t.length;n<r;n++)if(t[n][0]===e)return n;return-1},oD.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},oD.prototype.attrSet=function(e,t){let n=this.attrIndex(e),r=[e,t];n<0?this.attrPush(r):this.attrs[n]=r},oD.prototype.attrGet=function(e){let t=this.attrIndex(e),n=null;return t>=0&&(n=this.attrs[t][1]),n},oD.prototype.attrJoin=function(e,t){let n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+` `+t};function sD(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}sD.prototype.Token=oD;var cD=/\r\n?|\n/g,lD=/\0/g;function uD(e){let t;t=e.src.replace(cD,`
|
|
214
|
+
`),t=t.replace(lD,`�`),e.src=t}function dD(e){let t;e.inlineMode?(t=new e.Token(`inline`,``,0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function fD(e){let t=e.tokens;for(let n=0,r=t.length;n<r;n++){let r=t[n];r.type===`inline`&&e.md.inline.parse(r.content,e.md,e.env,r.children)}}function pD(e){return/^<a[>\s]/i.test(e)}function mD(e){return/^<\/a\s*>/i.test(e)}function hD(e){let t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n<r;n++){if(t[n].type!==`inline`||!e.md.linkify.pretest(t[n].content))continue;let r=t[n].children,i=0;for(let a=r.length-1;a>=0;a--){let o=r[a];if(o.type===`link_close`){for(a--;r[a].level!==o.level&&r[a].type!==`link_open`;)a--;continue}if(o.type===`html_inline`&&(pD(o.content)&&i>0&&i--,mD(o.content)&&i++),!(i>0)&&o.type===`text`&&e.md.linkify.test(o.content)){let i=o.content,s=e.md.linkify.match(i),c=[],l=o.level,u=0;s.length>0&&s[0].index===0&&a>0&&r[a-1].type===`text_special`&&(s=s.slice(1));for(let t=0;t<s.length;t++){let n=s[t].url,r=e.md.normalizeLink(n);if(!e.md.validateLink(r))continue;let a=s[t].text;a=s[t].schema?s[t].schema===`mailto:`&&!/^mailto:/i.test(a)?e.md.normalizeLinkText(`mailto:`+a).replace(/^mailto:/,``):e.md.normalizeLinkText(a):e.md.normalizeLinkText(`http://`+a).replace(/^http:\/\//,``);let o=s[t].index;if(o>u){let t=new e.Token(`text`,``,0);t.content=i.slice(u,o),t.level=l,c.push(t)}let d=new e.Token(`link_open`,`a`,1);d.attrs=[[`href`,r]],d.level=l++,d.markup=`linkify`,d.info=`auto`,c.push(d);let f=new e.Token(`text`,``,0);f.content=a,f.level=l,c.push(f);let p=new e.Token(`link_close`,`a`,-1);p.level=--l,p.markup=`linkify`,p.info=`auto`,c.push(p),u=s[t].lastIndex}if(u<i.length){let t=new e.Token(`text`,``,0);t.content=i.slice(u),t.level=l,c.push(t)}t[n].children=r=jE(r,a,c)}}}}var gD=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,_D=/\((c|tm|r)\)/i,vD=/\((c|tm|r)\)/gi,yD={c:`©`,r:`®`,tm:`™`};function bD(e,t){return yD[t.toLowerCase()]}function xD(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];r.type===`text`&&!t&&(r.content=r.content.replace(vD,bD)),r.type===`link_open`&&r.info===`auto`&&t--,r.type===`link_close`&&r.info===`auto`&&t++}}function SD(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];r.type===`text`&&!t&&gD.test(r.content)&&(r.content=r.content.replace(/\+-/g,`±`).replace(/\.{2,}/g,`…`).replace(/([?!])…/g,`$1..`).replace(/([?!]){4,}/g,`$1$1$1`).replace(/,{2,}/g,`,`).replace(/(^|[^-])---(?=[^-]|$)/gm,`$1—`).replace(/(^|\s)--(?=\s|$)/gm,`$1–`).replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,`$1–`)),r.type===`link_open`&&r.info===`auto`&&t--,r.type===`link_close`&&r.info===`auto`&&t++}}function CD(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type===`inline`&&(_D.test(e.tokens[t].content)&&xD(e.tokens[t].children),gD.test(e.tokens[t].content)&&SD(e.tokens[t].children))}var wD=/['"]/,TD=/['"]/g,ED=`’`;function DD(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function OD(e,t){let n,r=[];for(let i=0;i<e.length;i++){let a=e[i],o=e[i].level;for(n=r.length-1;n>=0&&!(r[n].level<=o);n--);if(r.length=n+1,a.type!==`text`)continue;let s=a.content,c=0,l=s.length;OUTER:for(;c<l;){TD.lastIndex=c;let u=TD.exec(s);if(!u)break;let d=!0,f=!0;c=u.index+1;let p=u[0]===`'`,m=32;if(u.index-1>=0)m=s.charCodeAt(u.index-1);else for(n=i-1;n>=0&&!(e[n].type===`softbreak`||e[n].type===`hardbreak`);n--)if(e[n].content){m=e[n].content.charCodeAt(e[n].content.length-1);break}let h=32;if(c<l)h=s.charCodeAt(c);else for(n=i+1;n<e.length&&!(e[n].type===`softbreak`||e[n].type===`hardbreak`);n++)if(e[n].content){h=e[n].content.charCodeAt(0);break}let g=XE(m)||YE(String.fromCharCode(m)),_=XE(h)||YE(String.fromCharCode(h)),v=JE(m),y=JE(h);if(y?d=!1:_&&(v||g||(d=!1)),v?f=!1:g&&(y||_||(f=!1)),h===34&&u[0]===`"`&&m>=48&&m<=57&&(f=d=!1),d&&f&&(d=g,f=_),!d&&!f){p&&(a.content=DD(a.content,u.index,ED));continue}if(f)for(n=r.length-1;n>=0;n--){let d=r[n];if(r[n].level<o)break;if(d.single===p&&r[n].level===o){d=r[n];let o,f;p?(o=t.md.options.quotes[2],f=t.md.options.quotes[3]):(o=t.md.options.quotes[0],f=t.md.options.quotes[1]),a.content=DD(a.content,u.index,f),e[d.token].content=DD(e[d.token].content,d.pos,o),c+=f.length-1,d.token===i&&(c+=o.length-1),s=a.content,l=s.length,r.length=n;continue OUTER}}d?r.push({token:i,pos:u.index,single:p,level:o}):f&&p&&(a.content=DD(a.content,u.index,ED))}}}function kD(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!==`inline`||!wD.test(e.tokens[t].content)||OD(e.tokens[t].children,e)}function AD(e){let t,n,r=e.tokens,i=r.length;for(let e=0;e<i;e++){if(r[e].type!==`inline`)continue;let i=r[e].children,a=i.length;for(t=0;t<a;t++)i[t].type===`text_special`&&(i[t].type=`text`);for(t=n=0;t<a;t++)i[t].type===`text`&&t+1<a&&i[t+1].type===`text`?i[t+1].content=i[t].content+i[t+1].content:(t!==n&&(i[n]=i[t]),n++);t!==n&&(i.length=n)}}var jD=[[`normalize`,uD],[`block`,dD],[`inline`,fD],[`linkify`,hD],[`replacements`,CD],[`smartquotes`,kD],[`text_join`,AD]];function MD(){this.ruler=new aD;for(let e=0;e<jD.length;e++)this.ruler.push(jD[e][0],jD[e][1])}MD.prototype.process=function(e){let t=this.ruler.getRules(``);for(let n=0,r=t.length;n<r;n++)t[n](e)},MD.prototype.State=sD;function ND(e,t,n,r){this.src=e,this.md=t,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType=`root`,this.level=0;let i=this.src;for(let e=0,t=0,n=0,r=0,a=i.length,o=!1;t<a;t++){let s=i.charCodeAt(t);if(!o)if(qE(s)){n++,s===9?r+=4-r%4:r++;continue}else o=!0;(s===10||t===a-1)&&(s!==10&&t++,this.bMarks.push(e),this.eMarks.push(t),this.tShift.push(n),this.sCount.push(r),this.bsCount.push(0),o=!1,n=0,r=0,e=t+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}ND.prototype.push=function(e,t,n){let r=new oD(e,t,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r},ND.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},ND.prototype.skipEmptyLines=function(e){for(let t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},ND.prototype.skipSpaces=function(e){for(let t=this.src.length;e<t&&qE(this.src.charCodeAt(e));e++);return e},ND.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!qE(this.src.charCodeAt(--e)))return e+1;return e},ND.prototype.skipChars=function(e,t){for(let n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e},ND.prototype.skipCharsBack=function(e,t,n){if(e<=n)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e},ND.prototype.getLines=function(e,t,n,r){if(e>=t)return``;let i=Array(t-e);for(let a=0,o=e;o<t;o++,a++){let e=0,s=this.bMarks[o],c=s,l;for(l=o+1<t||r?this.eMarks[o]+1:this.eMarks[o];c<l&&e<n;){let t=this.src.charCodeAt(c);if(qE(t))t===9?e+=4-(e+this.bsCount[o])%4:e++;else if(c-s<this.tShift[o])e++;else break;c++}e>n?i[a]=Array(e-n+1).join(` `)+this.src.slice(c,l):i[a]=this.src.slice(c,l)}return i.join(``)},ND.prototype.Token=oD;var PD=65536;function FD(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function ID(e){let t=[],n=e.length,r=0,i=e.charCodeAt(r),a=!1,o=0,s=``;for(;r<n;)i===124&&(a?(s+=e.substring(o,r-1),o=r):(t.push(s+e.substring(o,r)),s=``,o=r+1)),a=i===92,r++,i=e.charCodeAt(r);return t.push(s+e.substring(o)),t}function LD(e,t,n,r){if(t+2>n)return!1;let i=t+1;if(e.sCount[i]<e.blkIndent||e.sCount[i]-e.blkIndent>=4)return!1;let a=e.bMarks[i]+e.tShift[i];if(a>=e.eMarks[i])return!1;let o=e.src.charCodeAt(a++);if(o!==124&&o!==45&&o!==58||a>=e.eMarks[i])return!1;let s=e.src.charCodeAt(a++);if(s!==124&&s!==45&&s!==58&&!qE(s)||o===45&&qE(s))return!1;for(;a<e.eMarks[i];){let t=e.src.charCodeAt(a);if(t!==124&&t!==45&&t!==58&&!qE(t))return!1;a++}let c=FD(e,t+1),l=c.split(`|`),u=[];for(let e=0;e<l.length;e++){let t=l[e].trim();if(!t){if(e===0||e===l.length-1)continue;return!1}if(!/^:?-+:?$/.test(t))return!1;t.charCodeAt(t.length-1)===58?u.push(t.charCodeAt(0)===58?`center`:`right`):t.charCodeAt(0)===58?u.push(`left`):u.push(``)}if(c=FD(e,t).trim(),c.indexOf(`|`)===-1||e.sCount[t]-e.blkIndent>=4)return!1;l=ID(c),l.length&&l[0]===``&&l.shift(),l.length&&l[l.length-1]===``&&l.pop();let d=l.length;if(d===0||d!==u.length)return!1;if(r)return!0;let f=e.parentType;e.parentType=`table`;let p=e.md.block.ruler.getRules(`blockquote`),m=e.push(`table_open`,`table`,1),h=[t,0];m.map=h;let g=e.push(`thead_open`,`thead`,1);g.map=[t,t+1];let _=e.push(`tr_open`,`tr`,1);_.map=[t,t+1];for(let t=0;t<l.length;t++){let n=e.push(`th_open`,`th`,1);u[t]&&(n.attrs=[[`style`,`text-align:`+u[t]]]);let r=e.push(`inline`,``,0);r.content=l[t].trim(),r.children=[],e.push(`th_close`,`th`,-1)}e.push(`tr_close`,`tr`,-1),e.push(`thead_close`,`thead`,-1);let v,y=0;for(i=t+2;i<n&&!(e.sCount[i]<e.blkIndent);i++){let r=!1;for(let t=0,a=p.length;t<a;t++)if(p[t](e,i,n,!0)){r=!0;break}if(r||(c=FD(e,i).trim(),!c)||e.sCount[i]-e.blkIndent>=4||(l=ID(c),l.length&&l[0]===``&&l.shift(),l.length&&l[l.length-1]===``&&l.pop(),y+=d-l.length,y>PD))break;if(i===t+2){let n=e.push(`tbody_open`,`tbody`,1);n.map=v=[t+2,0]}let a=e.push(`tr_open`,`tr`,1);a.map=[i,i+1];for(let t=0;t<d;t++){let n=e.push(`td_open`,`td`,1);u[t]&&(n.attrs=[[`style`,`text-align:`+u[t]]]);let r=e.push(`inline`,``,0);r.content=l[t]?l[t].trim():``,r.children=[],e.push(`td_close`,`td`,-1)}e.push(`tr_close`,`tr`,-1)}return v&&(e.push(`tbody_close`,`tbody`,-1),v[1]=i),e.push(`table_close`,`table`,-1),h[1]=i,e.parentType=f,e.line=i,!0}function RD(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let r=t+1,i=r;for(;r<n;){if(e.isEmpty(r)){r++;continue}if(e.sCount[r]-e.blkIndent>=4){r++,i=r;continue}break}e.line=i;let a=e.push(`code_block`,`code`,0);return a.content=e.getLines(t,i,4+e.blkIndent,!1)+`
|
|
215
|
+
`,a.map=[t,e.line],!0}function zD(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||i+3>a)return!1;let o=e.src.charCodeAt(i);if(o!==126&&o!==96)return!1;let s=i;i=e.skipChars(i,o);let c=i-s;if(c<3)return!1;let l=e.src.slice(s,i),u=e.src.slice(i,a);if(o===96&&u.indexOf(String.fromCharCode(o))>=0)return!1;if(r)return!0;let d=t,f=!1;for(;d++,!(d>=n||(i=s=e.bMarks[d]+e.tShift[d],a=e.eMarks[d],i<a&&e.sCount[d]<e.blkIndent));)if(e.src.charCodeAt(i)===o&&!(e.sCount[d]-e.blkIndent>=4)&&(i=e.skipChars(i,o),!(i-s<c)&&(i=e.skipSpaces(i),!(i<a)))){f=!0;break}c=e.sCount[t],e.line=d+ +!!f;let p=e.push(`fence`,`code`,0);return p.info=u,p.content=e.getLines(t+1,d,c,!0),p.markup=l,p.map=[t,e.line],!0}function BD(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t],o=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==62)return!1;if(r)return!0;let s=[],c=[],l=[],u=[],d=e.md.block.ruler.getRules(`blockquote`),f=e.parentType;e.parentType=`blockquote`;let p=!1,m;for(m=t;m<n;m++){let t=e.sCount[m]<e.blkIndent;if(i=e.bMarks[m]+e.tShift[m],a=e.eMarks[m],i>=a)break;if(e.src.charCodeAt(i++)===62&&!t){let t=e.sCount[m]+1,n,r;e.src.charCodeAt(i)===32?(i++,t++,r=!1,n=!0):e.src.charCodeAt(i)===9?(n=!0,(e.bsCount[m]+t)%4==3?(i++,t++,r=!1):r=!0):n=!1;let o=t;for(s.push(e.bMarks[m]),e.bMarks[m]=i;i<a;){let t=e.src.charCodeAt(i);if(qE(t))t===9?o+=4-(o+e.bsCount[m]+ +!!r)%4:o++;else break;i++}p=i>=a,c.push(e.bsCount[m]),e.bsCount[m]=e.sCount[m]+1+ +!!n,l.push(e.sCount[m]),e.sCount[m]=o-t,u.push(e.tShift[m]),e.tShift[m]=i-e.bMarks[m];continue}if(p)break;let r=!1;for(let t=0,i=d.length;t<i;t++)if(d[t](e,m,n,!0)){r=!0;break}if(r){e.lineMax=m,e.blkIndent!==0&&(s.push(e.bMarks[m]),c.push(e.bsCount[m]),u.push(e.tShift[m]),l.push(e.sCount[m]),e.sCount[m]-=e.blkIndent);break}s.push(e.bMarks[m]),c.push(e.bsCount[m]),u.push(e.tShift[m]),l.push(e.sCount[m]),e.sCount[m]=-1}let h=e.blkIndent;e.blkIndent=0;let g=e.push(`blockquote_open`,`blockquote`,1);g.markup=`>`;let _=[t,0];g.map=_,e.md.block.tokenize(e,t,m);let v=e.push(`blockquote_close`,`blockquote`,-1);v.markup=`>`,e.lineMax=o,e.parentType=f,_[1]=e.line;for(let n=0;n<u.length;n++)e.bMarks[n+t]=s[n],e.tShift[n+t]=u[n],e.sCount[n+t]=l[n],e.bsCount[n+t]=c[n];return e.blkIndent=h,!0}function VD(e,t,n,r){let i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let a=e.bMarks[t]+e.tShift[t],o=e.src.charCodeAt(a++);if(o!==42&&o!==45&&o!==95)return!1;let s=1;for(;a<i;){let t=e.src.charCodeAt(a++);if(t!==o&&!qE(t))return!1;t===o&&s++}if(s<3)return!1;if(r)return!0;e.line=t+1;let c=e.push(`hr`,`hr`,0);return c.map=[t,e.line],c.markup=Array(s+1).join(String.fromCharCode(o)),!0}function HD(e,t){let n=e.eMarks[t],r=e.bMarks[t]+e.tShift[t],i=e.src.charCodeAt(r++);return i!==42&&i!==45&&i!==43||r<n&&!qE(e.src.charCodeAt(r))?-1:r}function UD(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t],i=n;if(i+1>=r)return-1;let a=e.src.charCodeAt(i++);if(a<48||a>57)return-1;for(;;){if(i>=r)return-1;if(a=e.src.charCodeAt(i++),a>=48&&a<=57){if(i-n>=10)return-1;continue}if(a===41||a===46)break;return-1}return i<r&&(a=e.src.charCodeAt(i),!qE(a))?-1:i}function WD(e,t){let n=e.level+2;for(let r=t+2,i=e.tokens.length-2;r<i;r++)e.tokens[r].level===n&&e.tokens[r].type===`paragraph_open`&&(e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2)}function GD(e,t,n,r){let i,a,o,s,c=t,l=!0;if(e.sCount[c]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[c]-e.listIndent>=4&&e.sCount[c]<e.blkIndent)return!1;let u=!1;r&&e.parentType===`paragraph`&&e.sCount[c]>=e.blkIndent&&(u=!0);let d,f,p;if((p=UD(e,c))>=0){if(d=!0,o=e.bMarks[c]+e.tShift[c],f=Number(e.src.slice(o,p-1)),u&&f!==1)return!1}else if((p=HD(e,c))>=0)d=!1;else return!1;if(u&&e.skipSpaces(p)>=e.eMarks[c])return!1;if(r)return!0;let m=e.src.charCodeAt(p-1),h=e.tokens.length;d?(s=e.push(`ordered_list_open`,`ol`,1),f!==1&&(s.attrs=[[`start`,f]])):s=e.push(`bullet_list_open`,`ul`,1);let g=[c,0];s.map=g,s.markup=String.fromCharCode(m);let _=!1,v=e.md.block.ruler.getRules(`list`),y=e.parentType;for(e.parentType=`list`;c<n;){a=p,i=e.eMarks[c];let t=e.sCount[c]+p-(e.bMarks[c]+e.tShift[c]),r=t;for(;a<i;){let t=e.src.charCodeAt(a);if(t===9)r+=4-(r+e.bsCount[c])%4;else if(t===32)r++;else break;a++}let u=a,f;f=u>=i?1:r-t,f>4&&(f=1);let h=t+f;s=e.push(`list_item_open`,`li`,1),s.markup=String.fromCharCode(m);let g=[c,0];s.map=g,d&&(s.info=e.src.slice(o,p-1));let y=e.tight,b=e.tShift[c],x=e.sCount[c],S=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=h,e.tight=!0,e.tShift[c]=u-e.bMarks[c],e.sCount[c]=r,u>=i&&e.isEmpty(c+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,c,n,!0),(!e.tight||_)&&(l=!1),_=e.line-c>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=S,e.tShift[c]=b,e.sCount[c]=x,e.tight=y,s=e.push(`list_item_close`,`li`,-1),s.markup=String.fromCharCode(m),c=e.line,g[1]=c,c>=n||e.sCount[c]<e.blkIndent||e.sCount[c]-e.blkIndent>=4)break;let C=!1;for(let t=0,r=v.length;t<r;t++)if(v[t](e,c,n,!0)){C=!0;break}if(C)break;if(d){if(p=UD(e,c),p<0)break;o=e.bMarks[c]+e.tShift[c]}else if(p=HD(e,c),p<0)break;if(m!==e.src.charCodeAt(p-1))break}return s=d?e.push(`ordered_list_close`,`ol`,-1):e.push(`bullet_list_close`,`ul`,-1),s.markup=String.fromCharCode(m),g[1]=c,e.line=c,e.parentType=y,l&&WD(e,h),!0}function KD(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t],o=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==91)return!1;function s(t){let n=e.lineMax;if(t>=n||e.isEmpty(t))return null;let r=!1;if(e.sCount[t]-e.blkIndent>3&&(r=!0),e.sCount[t]<0&&(r=!0),!r){let r=e.md.block.ruler.getRules(`reference`),i=e.parentType;e.parentType=`reference`;let a=!1;for(let i=0,o=r.length;i<o;i++)if(r[i](e,t,n,!0)){a=!0;break}if(e.parentType=i,a)return null}let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];return e.src.slice(i,a+1)}let c=e.src.slice(i,a+1);a=c.length;let l=-1;for(i=1;i<a;i++){let e=c.charCodeAt(i);if(e===91)return!1;if(e===93){l=i;break}else if(e===10){let e=s(o);e!==null&&(c+=e,a=c.length,o++)}else if(e===92&&(i++,i<a&&c.charCodeAt(i)===10)){let e=s(o);e!==null&&(c+=e,a=c.length,o++)}}if(l<0||c.charCodeAt(l+1)!==58)return!1;for(i=l+2;i<a;i++){let e=c.charCodeAt(i);if(e===10){let e=s(o);e!==null&&(c+=e,a=c.length,o++)}else if(!qE(e))break}let u=e.md.helpers.parseLinkDestination(c,i,a);if(!u.ok)return!1;let d=e.md.normalizeLink(u.str);if(!e.md.validateLink(d))return!1;i=u.pos;let f=i,p=o,m=i;for(;i<a;i++){let e=c.charCodeAt(i);if(e===10){let e=s(o);e!==null&&(c+=e,a=c.length,o++)}else if(!qE(e))break}let h=e.md.helpers.parseLinkTitle(c,i,a);for(;h.can_continue;){let t=s(o);if(t===null)break;c+=t,i=a,a=c.length,o++,h=e.md.helpers.parseLinkTitle(c,i,a,h)}let g;for(i<a&&m!==i&&h.ok?(g=h.str,i=h.pos):(g=``,i=f,o=p);i<a&&qE(c.charCodeAt(i));)i++;if(i<a&&c.charCodeAt(i)!==10&&g)for(g=``,i=f,o=p;i<a&&qE(c.charCodeAt(i));)i++;if(i<a&&c.charCodeAt(i)!==10)return!1;let _=ZE(c.slice(1,l));return _?r?!0:(e.env.references===void 0&&(e.env.references={}),e.env.references[_]===void 0&&(e.env.references[_]={title:g,href:d}),e.line=o,!0):!1}var qD=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),JD=`<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^"'=<>\`\\x00-\\x20]+|'[^']*'|"[^"]*"))?)*\\s*\\/?>`,YD=RegExp(`^(?:`+JD+`|<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>|<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)`),XD=RegExp(`^(?:`+JD+`|<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>)`),ZD=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[RegExp(`^</?(`+qD.join(`|`)+`)(?=(\\s|/?>|$))`,`i`),/^$/,!0],[RegExp(XD.source+`\\s*$`),/^$/,!1]];function QD(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(i)!==60)return!1;let o=e.src.slice(i,a),s=0;for(;s<ZD.length&&!ZD[s][0].test(o);s++);if(s===ZD.length)return!1;if(r)return ZD[s][2];let c=t+1;if(!ZD[s][1].test(o)){for(;c<n&&!(e.sCount[c]<e.blkIndent);c++)if(i=e.bMarks[c]+e.tShift[c],a=e.eMarks[c],o=e.src.slice(i,a),ZD[s][1].test(o)){o.length!==0&&c++;break}}e.line=c;let l=e.push(`html_block`,``,0);return l.map=[t,c],l.content=e.getLines(t,c,e.blkIndent,!0),!0}function $D(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.src.charCodeAt(i);if(o!==35||i>=a)return!1;let s=1;for(o=e.src.charCodeAt(++i);o===35&&i<a&&s<=6;)s++,o=e.src.charCodeAt(++i);if(s>6||i<a&&!qE(o))return!1;if(r)return!0;a=e.skipSpacesBack(a,i);let c=e.skipCharsBack(a,35,i);c>i&&qE(e.src.charCodeAt(c-1))&&(a=c),e.line=t+1;let l=e.push(`heading_open`,`h`+String(s),1);l.markup=`########`.slice(0,s),l.map=[t,e.line];let u=e.push(`inline`,``,0);u.content=e.src.slice(i,a).trim(),u.map=[t,e.line],u.children=[];let d=e.push(`heading_close`,`h`+String(s),-1);return d.markup=`########`.slice(0,s),!0}function eO(e,t,n){let r=e.md.block.ruler.getRules(`paragraph`);if(e.sCount[t]-e.blkIndent>=4)return!1;let i=e.parentType;e.parentType=`paragraph`;let a=0,o,s=t+1;for(;s<n&&!e.isEmpty(s);s++){if(e.sCount[s]-e.blkIndent>3)continue;if(e.sCount[s]>=e.blkIndent){let t=e.bMarks[s]+e.tShift[s],n=e.eMarks[s];if(t<n&&(o=e.src.charCodeAt(t),(o===45||o===61)&&(t=e.skipChars(t,o),t=e.skipSpaces(t),t>=n))){a=o===61?1:2;break}}if(e.sCount[s]<0)continue;let t=!1;for(let i=0,a=r.length;i<a;i++)if(r[i](e,s,n,!0)){t=!0;break}if(t)break}if(!a)return!1;let c=e.getLines(t,s,e.blkIndent,!1).trim();e.line=s+1;let l=e.push(`heading_open`,`h`+String(a),1);l.markup=String.fromCharCode(o),l.map=[t,e.line];let u=e.push(`inline`,``,0);u.content=c,u.map=[t,e.line-1],u.children=[];let d=e.push(`heading_close`,`h`+String(a),-1);return d.markup=String.fromCharCode(o),e.parentType=i,!0}function tO(e,t,n){let r=e.md.block.ruler.getRules(`paragraph`),i=e.parentType,a=t+1;for(e.parentType=`paragraph`;a<n&&!e.isEmpty(a);a++){if(e.sCount[a]-e.blkIndent>3||e.sCount[a]<0)continue;let t=!1;for(let i=0,o=r.length;i<o;i++)if(r[i](e,a,n,!0)){t=!0;break}if(t)break}let o=e.getLines(t,a,e.blkIndent,!1).trim();e.line=a;let s=e.push(`paragraph_open`,`p`,1);s.map=[t,e.line];let c=e.push(`inline`,``,0);return c.content=o,c.map=[t,e.line],c.children=[],e.push(`paragraph_close`,`p`,-1),e.parentType=i,!0}var nO=[[`table`,LD,[`paragraph`,`reference`]],[`code`,RD],[`fence`,zD,[`paragraph`,`reference`,`blockquote`,`list`]],[`blockquote`,BD,[`paragraph`,`reference`,`blockquote`,`list`]],[`hr`,VD,[`paragraph`,`reference`,`blockquote`,`list`]],[`list`,GD,[`paragraph`,`reference`,`blockquote`]],[`reference`,KD],[`html_block`,QD,[`paragraph`,`reference`,`blockquote`]],[`heading`,$D,[`paragraph`,`reference`,`blockquote`]],[`lheading`,eO],[`paragraph`,tO]];function rO(){this.ruler=new aD;for(let e=0;e<nO.length;e++)this.ruler.push(nO[e][0],nO[e][1],{alt:(nO[e][2]||[]).slice()})}rO.prototype.tokenize=function(e,t,n){let r=this.ruler.getRules(``),i=r.length,a=e.md.options.maxNesting,o=t,s=!1;for(;o<n&&(e.line=o=e.skipEmptyLines(o),!(o>=n||e.sCount[o]<e.blkIndent));){if(e.level>=a){e.line=n;break}let t=e.line,c=!1;for(let a=0;a<i;a++)if(c=r[a](e,o,n,!1),c){if(t>=e.line)throw Error(`block rule didn't increment state.line`);break}if(!c)throw Error(`none of the block rules matched`);e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),o=e.line,o<n&&e.isEmpty(o)&&(s=!0,o++,e.line=o)}},rO.prototype.parse=function(e,t,n,r){if(!e)return;let i=new this.State(e,t,n,r);this.tokenize(i,i.line,i.lineMax)},rO.prototype.State=ND;function iO(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending=``,this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}iO.prototype.pushPending=function(){let e=new oD(`text`,``,0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending=``,e},iO.prototype.push=function(e,t,n){this.pending&&this.pushPending();let r=new oD(e,t,n),i=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(i),r},iO.prototype.scanDelims=function(e,t){let n=this.posMax,r=this.src.charCodeAt(e),i=e>0?this.src.charCodeAt(e-1):32,a=e;for(;a<n&&this.src.charCodeAt(a)===r;)a++;let o=a-e,s=a<n?this.src.charCodeAt(a):32,c=XE(i)||YE(String.fromCharCode(i)),l=XE(s)||YE(String.fromCharCode(s)),u=JE(i),d=JE(s),f=!d&&(!l||u||c),p=!u&&(!c||d||l);return{can_open:f&&(t||!p||c),can_close:p&&(t||!f||l),length:o}},iO.prototype.Token=oD;function aO(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function oO(e,t){let n=e.pos;for(;n<e.posMax&&!aO(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}var sO=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function cO(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;let n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;let i=e.pending.match(sO);if(!i)return!1;let a=i[1],o=e.md.linkify.matchAtStart(e.src.slice(n-a.length));if(!o)return!1;let s=o.url;if(s.length<=a.length)return!1;let c=s.length;for(;c>0&&s.charCodeAt(c-1)===42;)c--;c!==s.length&&(s=s.slice(0,c));let l=e.md.normalizeLink(s);if(!e.md.validateLink(l))return!1;if(!t){e.pending=e.pending.slice(0,-a.length);let t=e.push(`link_open`,`a`,1);t.attrs=[[`href`,l]],t.markup=`linkify`,t.info=`auto`;let n=e.push(`text`,``,0);n.content=e.md.normalizeLinkText(s);let r=e.push(`link_close`,`a`,-1);r.markup=`linkify`,r.info=`auto`}return e.pos+=s.length-a.length,!0}function lO(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;let r=e.pending.length-1,i=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let t=r-1;for(;t>=1&&e.pending.charCodeAt(t-1)===32;)t--;e.pending=e.pending.slice(0,t),e.push(`hardbreak`,`br`,0)}else e.pending=e.pending.slice(0,-1),e.push(`softbreak`,`br`,0);else e.push(`softbreak`,`br`,0);for(n++;n<i&&qE(e.src.charCodeAt(n));)n++;return e.pos=n,!0}var uO=[];for(let e=0;e<256;e++)uO.push(0);`\\!"#$%&'()*+,./:;<=>?@[]^_\`{|}~-`.split(``).forEach(function(e){uO[e.charCodeAt(0)]=1});function dO(e,t){let n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let i=e.src.charCodeAt(n);if(i===10){for(t||e.push(`hardbreak`,`br`,0),n++;n<r&&(i=e.src.charCodeAt(n),qE(i));)n++;return e.pos=n,!0}let a=e.src[n];if(i>=55296&&i<=56319&&n+1<r){let t=e.src.charCodeAt(n+1);t>=56320&&t<=57343&&(a+=e.src[n+1],n++)}let o=`\\`+a;if(!t){let t=e.push(`text_special`,``,0);i<256&&uO[i]!==0?t.content=a:t.content=o,t.markup=o,t.info=`escape`}return e.pos=n+1,!0}function fO(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;let r=n;n++;let i=e.posMax;for(;n<i&&e.src.charCodeAt(n)===96;)n++;let a=e.src.slice(r,n),o=a.length;if(e.backticksScanned&&(e.backticks[o]||0)<=r)return t||(e.pending+=a),e.pos+=o,!0;let s=n,c;for(;(c=e.src.indexOf("`",s))!==-1;){for(s=c+1;s<i&&e.src.charCodeAt(s)===96;)s++;let r=s-c;if(r===o){if(!t){let t=e.push(`code_inline`,`code`,0);t.markup=a,t.content=e.src.slice(n,c).replace(/\n/g,` `).replace(/^ (.+) $/,`$1`)}return e.pos=s,!0}e.backticks[r]=c}return e.backticksScanned=!0,t||(e.pending+=a),e.pos+=o,!0}function pO(e,t){let n=e.pos,r=e.src.charCodeAt(n);if(t||r!==126)return!1;let i=e.scanDelims(e.pos,!0),a=i.length,o=String.fromCharCode(r);if(a<2)return!1;let s;a%2&&(s=e.push(`text`,``,0),s.content=o,a--);for(let t=0;t<a;t+=2)s=e.push(`text`,``,0),s.content=o+o,e.delimiters.push({marker:r,length:0,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close});return e.pos+=i.length,!0}function mO(e,t){let n,r=[],i=t.length;for(let a=0;a<i;a++){let i=t[a];if(i.marker!==126||i.end===-1)continue;let o=t[i.end];n=e.tokens[i.token],n.type=`s_open`,n.tag=`s`,n.nesting=1,n.markup=`~~`,n.content=``,n=e.tokens[o.token],n.type=`s_close`,n.tag=`s`,n.nesting=-1,n.markup=`~~`,n.content=``,e.tokens[o.token-1].type===`text`&&e.tokens[o.token-1].content===`~`&&r.push(o.token-1)}for(;r.length;){let t=r.pop(),i=t+1;for(;i<e.tokens.length&&e.tokens[i].type===`s_close`;)i++;i--,t!==i&&(n=e.tokens[i],e.tokens[i]=e.tokens[t],e.tokens[t]=n)}}function hO(e){let t=e.tokens_meta,n=e.tokens_meta.length;mO(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&mO(e,t[r].delimiters)}var gO={tokenize:pO,postProcess:hO};function _O(e,t){let n=e.pos,r=e.src.charCodeAt(n);if(t||r!==95&&r!==42)return!1;let i=e.scanDelims(e.pos,r===42);for(let t=0;t<i.length;t++){let t=e.push(`text`,``,0);t.content=String.fromCharCode(r),e.delimiters.push({marker:r,length:i.length,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close})}return e.pos+=i.length,!0}function vO(e,t){let n=t.length;for(let r=n-1;r>=0;r--){let n=t[r];if(n.marker!==95&&n.marker!==42||n.end===-1)continue;let i=t[n.end],a=r>0&&t[r-1].end===n.end+1&&t[r-1].marker===n.marker&&t[r-1].token===n.token-1&&t[n.end+1].token===i.token+1,o=String.fromCharCode(n.marker),s=e.tokens[n.token];s.type=a?`strong_open`:`em_open`,s.tag=a?`strong`:`em`,s.nesting=1,s.markup=a?o+o:o,s.content=``;let c=e.tokens[i.token];c.type=a?`strong_close`:`em_close`,c.tag=a?`strong`:`em`,c.nesting=-1,c.markup=a?o+o:o,c.content=``,a&&(e.tokens[t[r-1].token].content=``,e.tokens[t[n.end+1].token].content=``,r--)}}function yO(e){let t=e.tokens_meta,n=e.tokens_meta.length;vO(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&vO(e,t[r].delimiters)}var bO={tokenize:_O,postProcess:yO};function xO(e,t){let n,r,i,a,o=``,s=``,c=e.pos,l=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;let u=e.pos,d=e.posMax,f=e.pos+1,p=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(p<0)return!1;let m=p+1;if(m<d&&e.src.charCodeAt(m)===40){for(l=!1,m++;m<d&&(n=e.src.charCodeAt(m),!(!qE(n)&&n!==10));m++);if(m>=d)return!1;if(c=m,i=e.md.helpers.parseLinkDestination(e.src,m,e.posMax),i.ok){for(o=e.md.normalizeLink(i.str),e.md.validateLink(o)?m=i.pos:o=``,c=m;m<d&&(n=e.src.charCodeAt(m),!(!qE(n)&&n!==10));m++);if(i=e.md.helpers.parseLinkTitle(e.src,m,e.posMax),m<d&&c!==m&&i.ok)for(s=i.str,m=i.pos;m<d&&(n=e.src.charCodeAt(m),!(!qE(n)&&n!==10));m++);}(m>=d||e.src.charCodeAt(m)!==41)&&(l=!0),m++}if(l){if(e.env.references===void 0)return!1;if(m<d&&e.src.charCodeAt(m)===91?(c=m+1,m=e.md.helpers.parseLinkLabel(e,m),m>=0?r=e.src.slice(c,m++):m=p+1):m=p+1,r||=e.src.slice(f,p),a=e.env.references[ZE(r)],!a)return e.pos=u,!1;o=a.href,s=a.title}if(!t){e.pos=f,e.posMax=p;let t=e.push(`link_open`,`a`,1),n=[[`href`,o]];t.attrs=n,s&&n.push([`title`,s]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push(`link_close`,`a`,-1)}return e.pos=m,e.posMax=d,!0}function Ree(e,t){let n,r,i,a,o,s,c,l,u=``,d=e.pos,f=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;let p=e.pos+2,m=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(m<0)return!1;if(a=m+1,a<f&&e.src.charCodeAt(a)===40){for(a++;a<f&&(n=e.src.charCodeAt(a),!(!qE(n)&&n!==10));a++);if(a>=f)return!1;for(l=a,s=e.md.helpers.parseLinkDestination(e.src,a,e.posMax),s.ok&&(u=e.md.normalizeLink(s.str),e.md.validateLink(u)?a=s.pos:u=``),l=a;a<f&&(n=e.src.charCodeAt(a),!(!qE(n)&&n!==10));a++);if(s=e.md.helpers.parseLinkTitle(e.src,a,e.posMax),a<f&&l!==a&&s.ok)for(c=s.str,a=s.pos;a<f&&(n=e.src.charCodeAt(a),!(!qE(n)&&n!==10));a++);else c=``;if(a>=f||e.src.charCodeAt(a)!==41)return e.pos=d,!1;a++}else{if(e.env.references===void 0)return!1;if(a<f&&e.src.charCodeAt(a)===91?(l=a+1,a=e.md.helpers.parseLinkLabel(e,a),a>=0?i=e.src.slice(l,a++):a=m+1):a=m+1,i||=e.src.slice(p,m),o=e.env.references[ZE(i)],!o)return e.pos=d,!1;u=o.href,c=o.title}if(!t){r=e.src.slice(p,m);let t=[];e.md.inline.parse(r,e.md,e.env,t);let n=e.push(`image`,`img`,0),i=[[`src`,u],[`alt`,``]];n.attrs=i,n.children=t,n.content=r,c&&i.push([`title`,c])}return e.pos=a,e.posMax=f,!0}var zee=/^([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])?)*)$/,Bee=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function Vee(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;let r=e.pos,i=e.posMax;for(;;){if(++n>=i)return!1;let t=e.src.charCodeAt(n);if(t===60)return!1;if(t===62)break}let a=e.src.slice(r+1,n);if(Bee.test(a)){let n=e.md.normalizeLink(a);if(!e.md.validateLink(n))return!1;if(!t){let t=e.push(`link_open`,`a`,1);t.attrs=[[`href`,n]],t.markup=`autolink`,t.info=`auto`;let r=e.push(`text`,``,0);r.content=e.md.normalizeLinkText(a);let i=e.push(`link_close`,`a`,-1);i.markup=`autolink`,i.info=`auto`}return e.pos+=a.length+2,!0}if(zee.test(a)){let n=e.md.normalizeLink(`mailto:`+a);if(!e.md.validateLink(n))return!1;if(!t){let t=e.push(`link_open`,`a`,1);t.attrs=[[`href`,n]],t.markup=`autolink`,t.info=`auto`;let r=e.push(`text`,``,0);r.content=e.md.normalizeLinkText(a);let i=e.push(`link_close`,`a`,-1);i.markup=`autolink`,i.info=`auto`}return e.pos+=a.length+2,!0}return!1}function Hee(e){return/^<a[>\s]/i.test(e)}function Uee(e){return/^<\/a\s*>/i.test(e)}function Wee(e){let t=e|32;return t>=97&&t<=122}function Gee(e,t){if(!e.md.options.html)return!1;let n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;let i=e.src.charCodeAt(r+1);if(i!==33&&i!==63&&i!==47&&!Wee(i))return!1;let a=e.src.slice(r).match(YD);if(!a)return!1;if(!t){let t=e.push(`html_inline`,``,0);t.content=a[0],Hee(t.content)&&e.linkLevel++,Uee(t.content)&&e.linkLevel--}return e.pos+=a[0].length,!0}var Kee=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,qee=/^&([a-z][a-z0-9]{1,31});/i;function Jee(e,t){let n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){let r=e.src.slice(n).match(Kee);if(r){if(!t){let t=r[1][0].toLowerCase()===`x`?parseInt(r[1].slice(1),16):parseInt(r[1],10),n=e.push(`text_special`,``,0);n.content=ME(t)?NE(t):NE(65533),n.markup=r[0],n.info=`entity`}return e.pos+=r[0].length,!0}}else{let r=e.src.slice(n).match(qee);if(r){let n=wE(r[0]);if(n!==r[0]){if(!t){let t=e.push(`text_special`,``,0);t.content=n,t.markup=r[0],t.info=`entity`}return e.pos+=r[0].length,!0}}}return!1}function SO(e){let t={},n=e.length;if(!n)return;let r=0,i=-2,a=[];for(let o=0;o<n;o++){let n=e[o];if(a.push(0),(e[r].marker!==n.marker||i!==n.token-1)&&(r=o),i=n.token,n.length=n.length||0,!n.close)continue;t.hasOwnProperty(n.marker)||(t[n.marker]=[-1,-1,-1,-1,-1,-1]);let s=t[n.marker][(n.open?3:0)+n.length%3],c=r-a[r]-1,l=c;for(;c>s;c-=a[c]+1){let t=e[c];if(t.marker===n.marker&&t.open&&t.end<0){let r=!1;if((t.close||n.open)&&(t.length+n.length)%3==0&&(t.length%3!=0||n.length%3!=0)&&(r=!0),!r){let r=c>0&&!e[c-1].open?a[c-1]+1:0;a[o]=o-c+r,a[c]=r,n.open=!1,t.end=o,t.close=!1,l=-1,i=-2;break}}}l!==-1&&(t[n.marker][(n.open?3:0)+(n.length||0)%3]=l)}}function Yee(e){let t=e.tokens_meta,n=e.tokens_meta.length;SO(e.delimiters);for(let e=0;e<n;e++)t[e]&&t[e].delimiters&&SO(t[e].delimiters)}function Xee(e){let t,n,r=0,i=e.tokens,a=e.tokens.length;for(t=n=0;t<a;t++)i[t].nesting<0&&r--,i[t].level=r,i[t].nesting>0&&r++,i[t].type===`text`&&t+1<a&&i[t+1].type===`text`?i[t+1].content=i[t].content+i[t+1].content:(t!==n&&(i[n]=i[t]),n++);t!==n&&(i.length=n)}var CO=[[`text`,oO],[`linkify`,cO],[`newline`,lO],[`escape`,dO],[`backticks`,fO],[`strikethrough`,gO.tokenize],[`emphasis`,bO.tokenize],[`link`,xO],[`image`,Ree],[`autolink`,Vee],[`html_inline`,Gee],[`entity`,Jee]],wO=[[`balance_pairs`,Yee],[`strikethrough`,gO.postProcess],[`emphasis`,bO.postProcess],[`fragments_join`,Xee]];function TO(){this.ruler=new aD;for(let e=0;e<CO.length;e++)this.ruler.push(CO[e][0],CO[e][1]);this.ruler2=new aD;for(let e=0;e<wO.length;e++)this.ruler2.push(wO[e][0],wO[e][1])}TO.prototype.skipToken=function(e){let t=e.pos,n=this.ruler.getRules(``),r=n.length,i=e.md.options.maxNesting,a=e.cache;if(a[t]!==void 0){e.pos=a[t];return}let o=!1;if(e.level<i){for(let i=0;i<r;i++)if(e.level++,o=n[i](e,!0),e.level--,o){if(t>=e.pos)throw Error(`inline rule didn't increment state.pos`);break}}else e.pos=e.posMax;o||e.pos++,a[t]=e.pos},TO.prototype.tokenize=function(e){let t=this.ruler.getRules(``),n=t.length,r=e.posMax,i=e.md.options.maxNesting;for(;e.pos<r;){let a=e.pos,o=!1;if(e.level<i){for(let r=0;r<n;r++)if(o=t[r](e,!1),o){if(a>=e.pos)throw Error(`inline rule didn't increment state.pos`);break}}if(o){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},TO.prototype.parse=function(e,t,n,r){let i=new this.State(e,t,n,r);this.tokenize(i);let a=this.ruler2.getRules(``),o=a.length;for(let e=0;e<o;e++)a[e](i)},TO.prototype.State=iO;function Zee(e){let t={};e||={},t.src_Any=$T.source,t.src_Cc=eE.source,t.src_Z=iE.source,t.src_P=nE.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join(`|`),t.src_ZCc=[t.src_Z,t.src_Cc].join(`|`);let n=`[><|]`;return t.src_pseudo_letter=`(?:(?!`+n+`|`+t.src_ZPCc+`)`+t.src_Any+`)`,t.src_ip4=`(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)`,t.src_auth=`(?:(?:(?!`+t.src_ZCc+`|[@/\\[\\]()]).)+@)?`,t.src_port=`(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?`,t.src_host_terminator=`(?=$|`+n+`|`+t.src_ZPCc+`)(?!`+(e[`---`]?`-(?!--)|`:`-|`)+`_|:\\d|\\.-|\\.(?!$|`+t.src_ZPCc+`))`,t.src_path=`(?:[/?#](?:(?!`+t.src_ZCc+`|[><|]|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+t.src_ZCc+`|\\]).)*\\]|\\((?:(?!`+t.src_ZCc+`|[)]).)*\\)|\\{(?:(?!`+t.src_ZCc+`|[}]).)*\\}|\\"(?:(?!`+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+`|[']).)+\\'|\\'(?=`+t.src_pseudo_letter+`|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!`+t.src_ZCc+`|[.]|$)|`+(e[`---`]?`\\-(?!--(?:[^-]|$))(?:-*)|`:`\\-+|`)+`,(?!`+t.src_ZCc+`|$)|;(?!`+t.src_ZCc+`|$)|\\!+(?!`+t.src_ZCc+`|[!]|$)|\\?(?!`+t.src_ZCc+`|[?]|$))+|\\/)?`,t.src_email_name=`[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*`,t.src_xn=`xn--[a-z0-9\\-]{1,59}`,t.src_domain_root=`(?:`+t.src_xn+`|`+t.src_pseudo_letter+`{1,63})`,t.src_domain=`(?:`+t.src_xn+`|(?:`+t.src_pseudo_letter+`)|(?:`+t.src_pseudo_letter+`(?:-|`+t.src_pseudo_letter+`){0,61}`+t.src_pseudo_letter+`))`,t.src_host=`(?:(?:(?:(?:`+t.src_domain+`)\\.)*`+t.src_domain+`))`,t.tpl_host_fuzzy=`(?:`+t.src_ip4+`|(?:(?:(?:`+t.src_domain+`)\\.)+(?:%TLDS%)))`,t.tpl_host_no_ip_fuzzy=`(?:(?:(?:`+t.src_domain+`)\\.)+(?:%TLDS%))`,t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test=`localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:`+t.src_ZPCc+`|>|$))`,t.tpl_email_fuzzy=`(^|`+n+`|"|\\(|`+t.src_ZCc+`)(`+t.src_email_name+`@`+t.tpl_host_fuzzy_strict+`)`,t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+`)`,t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+`)`,t}function EO(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e}function DO(e){return Object.prototype.toString.call(e)}function Qee(e){return DO(e)===`[object String]`}function $ee(e){return DO(e)===`[object Object]`}function ete(e){return DO(e)===`[object RegExp]`}function OO(e){return DO(e)===`[object Function]`}function tte(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,`\\$&`)}var kO={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function nte(e){return Object.keys(e||{}).reduce(function(e,t){return e||kO.hasOwnProperty(t)},!1)}var rte={"http:":{validate:function(e,t,n){let r=e.slice(t);return n.re.http||(n.re.http=RegExp(`^\\/\\/`+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,`i`)),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":`http:`,"ftp:":`http:`,"//":{validate:function(e,t,n){let r=e.slice(t);return n.re.no_http||(n.re.no_http=RegExp(`^`+n.re.src_auth+`(?:localhost|(?:(?:`+n.re.src_domain+`)\\.)+`+n.re.src_domain_root+`)`+n.re.src_port+n.re.src_host_terminator+n.re.src_path,`i`)),n.re.no_http.test(r)?t>=3&&e[t-3]===`:`||t>=3&&e[t-3]===`/`?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){let r=e.slice(t);return n.re.mailto||(n.re.mailto=RegExp(`^`+n.re.src_email_name+`@`+n.re.src_host_strict,`i`)),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},AO=`a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]`,jO=`biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф`.split(`|`);function MO(e){e.__index__=-1,e.__text_cache__=``}function NO(e){return function(t,n){let r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function PO(){return function(e,t){t.normalize(e)}}function FO(e){let t=e.re=Zee(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(AO),n.push(t.src_xn),t.src_tlds=n.join(`|`);function r(e){return e.replace(`%TLDS%`,t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),`i`),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),`i`),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),`i`),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),`i`);let i=[];e.__compiled__={};function a(e,t){throw Error(`(LinkifyIt) Invalid schema "`+e+`": `+t)}Object.keys(e.__schemas__).forEach(function(t){let n=e.__schemas__[t];if(n===null)return;let r={validate:null,link:null};if(e.__compiled__[t]=r,$ee(n)){ete(n.validate)?r.validate=NO(n.validate):OO(n.validate)?r.validate=n.validate:a(t,n),OO(n.normalize)?r.normalize=n.normalize:n.normalize?a(t,n):r.normalize=PO();return}if(Qee(n)){i.push(t);return}a(t,n)}),i.forEach(function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)}),e.__compiled__[``]={validate:null,normalize:PO()};let o=Object.keys(e.__compiled__).filter(function(t){return t.length>0&&e.__compiled__[t]}).map(tte).join(`|`);e.re.schema_test=RegExp(`(^|(?!_)(?:[><|]|`+t.src_ZPCc+`))(`+o+`)`,`i`),e.re.schema_search=RegExp(`(^|(?!_)(?:[><|]|`+t.src_ZPCc+`))(`+o+`)`,`ig`),e.re.schema_at_start=RegExp(`^`+e.re.schema_search.source,`i`),e.re.pretest=RegExp(`(`+e.re.schema_test.source+`)|(`+e.re.host_fuzzy_test.source+`)|@`,`i`),MO(e)}function IO(e,t){let n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function LO(e,t){let n=new IO(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function RO(e,t){if(!(this instanceof RO))return new RO(e,t);t||nte(e)&&(t=e,e={}),this.__opts__=EO({},kO,t),this.__index__=-1,this.__last_index__=-1,this.__schema__=``,this.__text_cache__=``,this.__schemas__=EO({},rte,e),this.__compiled__={},this.__tlds__=jO,this.__tlds_replaced__=!1,this.re={},FO(this)}RO.prototype.add=function(e,t){return this.__schemas__[e]=t,FO(this),this},RO.prototype.set=function(e){return this.__opts__=EO(this.__opts__,e),this},RO.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;let t,n,r,i,a,o,s,c,l;if(this.re.schema_test.test(e)){for(s=this.re.schema_search,s.lastIndex=0;(t=s.exec(e))!==null;)if(i=this.testSchemaAt(e,t[2],s.lastIndex),i){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+i;break}}return this.__opts__.fuzzyLink&&this.__compiled__[`http:`]&&(c=e.search(this.re.host_fuzzy_test),c>=0&&(this.__index__<0||c<this.__index__)&&(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(a=n.index+n[1].length,(this.__index__<0||a<this.__index__)&&(this.__schema__=``,this.__index__=a,this.__last_index__=n.index+n[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__[`mailto:`]&&(l=e.indexOf(`@`),l>=0&&(r=e.match(this.re.email_fuzzy))!==null&&(a=r.index+r[1].length,o=r.index+r[0].length,(this.__index__<0||a<this.__index__||a===this.__index__&&o>this.__last_index__)&&(this.__schema__=`mailto:`,this.__index__=a,this.__last_index__=o))),this.__index__>=0},RO.prototype.pretest=function(e){return this.re.pretest.test(e)},RO.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},RO.prototype.match=function(e){let t=[],n=0;this.__index__>=0&&this.__text_cache__===e&&(t.push(LO(this,n)),n=this.__last_index__);let r=n?e.slice(n):e;for(;this.test(r);)t.push(LO(this,n)),r=r.slice(this.__last_index__),n+=this.__last_index__;return t.length?t:null},RO.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;let t=this.re.schema_at_start.exec(e);if(!t)return null;let n=this.testSchemaAt(e,t[2],t[0].length);return n?(this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+n,LO(this,0)):null},RO.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,n){return e!==n[t-1]}).reverse(),FO(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,FO(this),this)},RO.prototype.normalize=function(e){e.schema||(e.url=`http://`+e.url),e.schema===`mailto:`&&!/^mailto:/i.test(e.url)&&(e.url=`mailto:`+e.url)},RO.prototype.onCompile=function(){};var zO=2147483647,BO=36,VO=1,HO=26,UO=38,WO=700,GO=72,KO=128,qO=`-`,JO=/^xn--/,YO=/[^\0-\x7F]/,XO=/[\x2E\u3002\uFF0E\uFF61]/g,ZO={overflow:`Overflow: input needs wider integers to process`,"not-basic":`Illegal input >= 0x80 (not a basic code point)`,"invalid-input":`Invalid input`},QO=BO-VO,$O=Math.floor,ek=String.fromCharCode;function tk(e){throw RangeError(ZO[e])}function nk(e,t){let n=[],r=e.length;for(;r--;)n[r]=t(e[r]);return n}function rk(e,t){let n=e.split(`@`),r=``;n.length>1&&(r=n[0]+`@`,e=n[1]),e=e.replace(XO,`.`);let i=nk(e.split(`.`),t).join(`.`);return r+i}function ik(e){let t=[],n=0,r=e.length;for(;n<r;){let i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){let r=e.charCodeAt(n++);(r&64512)==56320?t.push(((i&1023)<<10)+(r&1023)+65536):(t.push(i),n--)}else t.push(i)}return t}var ak=e=>String.fromCodePoint(...e),ok=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:BO},sk=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},ck=function(e,t,n){let r=0;for(e=n?$O(e/WO):e>>1,e+=$O(e/t);e>QO*HO>>1;r+=BO)e=$O(e/QO);return $O(r+(QO+1)*e/(e+UO))},lk=function(e){let t=[],n=e.length,r=0,i=KO,a=GO,o=e.lastIndexOf(qO);o<0&&(o=0);for(let n=0;n<o;++n)e.charCodeAt(n)>=128&&tk(`not-basic`),t.push(e.charCodeAt(n));for(let s=o>0?o+1:0;s<n;){let o=r;for(let t=1,i=BO;;i+=BO){s>=n&&tk(`invalid-input`);let o=ok(e.charCodeAt(s++));o>=BO&&tk(`invalid-input`),o>$O((zO-r)/t)&&tk(`overflow`),r+=o*t;let c=i<=a?VO:i>=a+HO?HO:i-a;if(o<c)break;let l=BO-c;t>$O(zO/l)&&tk(`overflow`),t*=l}let c=t.length+1;a=ck(r-o,c,o==0),$O(r/c)>zO-i&&tk(`overflow`),i+=$O(r/c),r%=c,t.splice(r++,0,i)}return String.fromCodePoint(...t)},uk=function(e){let t=[];e=ik(e);let n=e.length,r=KO,i=0,a=GO;for(let n of e)n<128&&t.push(ek(n));let o=t.length,s=o;for(o&&t.push(qO);s<n;){let n=zO;for(let t of e)t>=r&&t<n&&(n=t);let c=s+1;n-r>$O((zO-i)/c)&&tk(`overflow`),i+=(n-r)*c,r=n;for(let n of e)if(n<r&&++i>zO&&tk(`overflow`),n===r){let e=i;for(let n=BO;;n+=BO){let r=n<=a?VO:n>=a+HO?HO:n-a;if(e<r)break;let i=e-r,o=BO-r;t.push(ek(sk(r+i%o,0))),e=$O(i/o)}t.push(ek(sk(e,0))),a=ck(i,c,s===o),i=0,++s}++i,++r}return t.join(``)},dk={version:`2.3.1`,ucs2:{decode:ik,encode:ak},decode:lk,encode:uk,toASCII:function(e){return rk(e,function(e){return YO.test(e)?`xn--`+uk(e):e})},toUnicode:function(e){return rk(e,function(e){return JO.test(e)?lk(e.slice(4).toLowerCase()):e})}},fk={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:`language-`,linkify:!1,typographer:!1,quotes:`“”‘’`,highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:`language-`,linkify:!1,typographer:!1,quotes:`“”‘’`,highlight:null,maxNesting:20},components:{core:{rules:[`normalize`,`block`,`inline`,`text_join`]},block:{rules:[`paragraph`]},inline:{rules:[`text`],rules2:[`balance_pairs`,`fragments_join`]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:`language-`,linkify:!1,typographer:!1,quotes:`“”‘’`,highlight:null,maxNesting:20},components:{core:{rules:[`normalize`,`block`,`inline`,`text_join`]},block:{rules:[`blockquote`,`code`,`fence`,`heading`,`hr`,`html_block`,`lheading`,`list`,`reference`,`paragraph`]},inline:{rules:[`autolink`,`backticks`,`emphasis`,`entity`,`escape`,`html_inline`,`image`,`link`,`newline`,`text`],rules2:[`balance_pairs`,`emphasis`,`fragments_join`]}}}},pk=/^(vbscript|javascript|file|data):/,mk=/^data:image\/(gif|png|jpeg|webp);/;function hk(e){let t=e.trim().toLowerCase();return pk.test(t)?mk.test(t):!0}var gk=[`http:`,`https:`,`mailto:`];function _k(e){let t=ZT(e,!0);if(t.hostname&&(!t.protocol||gk.indexOf(t.protocol)>=0))try{t.hostname=dk.toASCII(t.hostname)}catch{}return RT(zT(t))}function vk(e){let t=ZT(e,!0);if(t.hostname&&(!t.protocol||gk.indexOf(t.protocol)>=0))try{t.hostname=dk.toUnicode(t.hostname)}catch{}return FT(zT(t),FT.defaultChars+`%`)}function yk(e,t){if(!(this instanceof yk))return new yk(e,t);t||DE(e)||(t=e||{},e=`default`),this.inline=new TO,this.block=new rO,this.core=new MD,this.renderer=new iD,this.linkify=new RO,this.validateLink=hk,this.normalizeLink=_k,this.normalizeLinkText=vk,this.utils=TE,this.helpers=AE({},nD),this.options={},this.configure(e),t&&this.set(t)}yk.prototype.set=function(e){return AE(this.options,e),this},yk.prototype.configure=function(e){let t=this;if(DE(e)){let t=e;if(e=fk[t],!e)throw Error('Wrong `markdown-it` preset "'+t+`", check name`)}if(!e)throw Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this},yk.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),[`core`,`block`,`inline`].forEach(function(t){n=n.concat(this[t].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));let r=e.filter(function(e){return n.indexOf(e)<0});if(r.length&&!t)throw Error(`MarkdownIt. Failed to enable unknown rule(s): `+r);return this},yk.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),[`core`,`block`,`inline`].forEach(function(t){n=n.concat(this[t].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));let r=e.filter(function(e){return n.indexOf(e)<0});if(r.length&&!t)throw Error(`MarkdownIt. Failed to disable unknown rule(s): `+r);return this},yk.prototype.use=function(e){let t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},yk.prototype.parse=function(e,t){if(typeof e!=`string`)throw Error(`Input data should be a String`);let n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},yk.prototype.render=function(e,t){return t||={},this.renderer.render(this.parse(e,t),this.options,t)},yk.prototype.parseInline=function(e,t){let n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},yk.prototype.renderInline=function(e,t){return t||={},this.renderer.render(this.parseInline(e,t),this.options,t)};var bk=new Wc({nodes:{doc:{content:`block+`},paragraph:{content:`inline*`,group:`block`,parseDOM:[{tag:`p`}],toDOM(){return[`p`,0]}},blockquote:{content:`block+`,group:`block`,parseDOM:[{tag:`blockquote`}],toDOM(){return[`blockquote`,0]}},horizontal_rule:{group:`block`,parseDOM:[{tag:`hr`}],toDOM(){return[`div`,[`hr`]]}},heading:{attrs:{level:{default:1}},content:`(text | image)*`,group:`block`,defining:!0,parseDOM:[{tag:`h1`,attrs:{level:1}},{tag:`h2`,attrs:{level:2}},{tag:`h3`,attrs:{level:3}},{tag:`h4`,attrs:{level:4}},{tag:`h5`,attrs:{level:5}},{tag:`h6`,attrs:{level:6}}],toDOM(e){return[`h`+e.attrs.level,0]}},code_block:{content:`text*`,group:`block`,code:!0,defining:!0,marks:``,attrs:{params:{default:``}},parseDOM:[{tag:`pre`,preserveWhitespace:`full`,getAttrs:e=>({params:e.getAttribute(`data-params`)||``})}],toDOM(e){return[`pre`,e.attrs.params?{"data-params":e.attrs.params}:{},[`code`,0]]}},ordered_list:{content:`list_item+`,group:`block`,attrs:{order:{default:1},tight:{default:!1}},parseDOM:[{tag:`ol`,getAttrs(e){return{order:e.hasAttribute(`start`)?+e.getAttribute(`start`):1,tight:e.hasAttribute(`data-tight`)}}}],toDOM(e){return[`ol`,{start:e.attrs.order==1?null:e.attrs.order,"data-tight":e.attrs.tight?`true`:null},0]}},bullet_list:{content:`list_item+`,group:`block`,attrs:{tight:{default:!1}},parseDOM:[{tag:`ul`,getAttrs:e=>({tight:e.hasAttribute(`data-tight`)})}],toDOM(e){return[`ul`,{"data-tight":e.attrs.tight?`true`:null},0]}},list_item:{content:`block+`,defining:!0,parseDOM:[{tag:`li`}],toDOM(){return[`li`,0]}},text:{group:`inline`},image:{inline:!0,attrs:{src:{},alt:{default:null},title:{default:null}},group:`inline`,draggable:!0,parseDOM:[{tag:`img[src]`,getAttrs(e){return{src:e.getAttribute(`src`),title:e.getAttribute(`title`),alt:e.getAttribute(`alt`)}}}],toDOM(e){return[`img`,e.attrs]}},hard_break:{inline:!0,group:`inline`,selectable:!1,parseDOM:[{tag:`br`}],toDOM(){return[`br`]}}},marks:{em:{parseDOM:[{tag:`i`},{tag:`em`},{style:`font-style=italic`},{style:`font-style=normal`,clearMark:e=>e.type.name==`em`}],toDOM(){return[`em`]}},strong:{parseDOM:[{tag:`strong`},{tag:`b`,getAttrs:e=>e.style.fontWeight!=`normal`&&null},{style:`font-weight=400`,clearMark:e=>e.type.name==`strong`},{style:`font-weight`,getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],toDOM(){return[`strong`]}},link:{attrs:{href:{},title:{default:null}},inclusive:!1,parseDOM:[{tag:`a[href]`,getAttrs(e){return{href:e.getAttribute(`href`),title:e.getAttribute(`title`)}}}],toDOM(e){return[`a`,e.attrs]}},code:{code:!0,parseDOM:[{tag:`code`}],toDOM(){return[`code`]}}}});function xk(e,t){if(e.isText&&t.isText&&ec.sameSet(e.marks,t.marks))return e.withText(e.text+t.text)}var Sk=class{constructor(e,t){this.schema=e,this.tokenHandlers=t,this.stack=[{type:e.topNodeType,attrs:null,content:[],marks:ec.none}]}top(){return this.stack[this.stack.length-1]}push(e){this.stack.length&&this.top().content.push(e)}addText(e){if(!e)return;let t=this.top(),n=t.content,r=n[n.length-1],i=this.schema.text(e,t.marks),a;r&&(a=xk(r,i))?n[n.length-1]=a:n.push(i)}openMark(e){let t=this.top();t.marks=e.addToSet(t.marks)}closeMark(e){let t=this.top();t.marks=e.removeFromSet(t.marks)}parseTokens(e){for(let t=0;t<e.length;t++){let n=e[t],r=this.tokenHandlers[n.type];if(!r)throw Error("Token type `"+n.type+"` not supported by Markdown parser");r(this,n,e,t)}}addNode(e,t,n){let r=this.top(),i=e.createAndFill(t,n,r?r.marks:[]);return i?(this.push(i),i):null}openNode(e,t){this.stack.push({type:e,attrs:t,content:[],marks:ec.none})}closeNode(){let e=this.stack.pop();return this.addNode(e.type,e.attrs,e.content)}};function Ck(e,t,n,r){return e.getAttrs?e.getAttrs(t,n,r):e.attrs instanceof Function?e.attrs(t):e.attrs}function wk(e,t){return e.noCloseToken||t==`code_inline`||t==`code_block`||t==`fence`}function Tk(e){return e[e.length-1]==`
|
|
216
|
+
`?e.slice(0,e.length-1):e}function Ek(){}function Dk(e,t){let n=Object.create(null);for(let r in t){let i=t[r];if(i.block){let t=e.nodeType(i.block);wk(i,r)?n[r]=(e,n,r,a)=>{e.openNode(t,Ck(i,n,r,a)),e.addText(Tk(n.content)),e.closeNode()}:(n[r+`_open`]=(e,n,r,a)=>e.openNode(t,Ck(i,n,r,a)),n[r+`_close`]=e=>e.closeNode())}else if(i.node){let t=e.nodeType(i.node);n[r]=(e,n,r,a)=>e.addNode(t,Ck(i,n,r,a))}else if(i.mark){let t=e.marks[i.mark];wk(i,r)?n[r]=(e,n,r,a)=>{e.openMark(t.create(Ck(i,n,r,a))),e.addText(Tk(n.content)),e.closeMark(t)}:(n[r+`_open`]=(e,n,r,a)=>e.openMark(t.create(Ck(i,n,r,a))),n[r+`_close`]=e=>e.closeMark(t))}else if(i.ignore)wk(i,r)?n[r]=Ek:(n[r+`_open`]=Ek,n[r+`_close`]=Ek);else throw RangeError(`Unrecognized parsing spec `+JSON.stringify(i))}return n.text=(e,t)=>e.addText(t.content),n.inline=(e,t)=>e.parseTokens(t.children),n.softbreak=n.softbreak||(e=>e.addText(` `)),n}var Ok=class{constructor(e,t,n){this.schema=e,this.tokenizer=t,this.tokens=n,this.tokenHandlers=Dk(e,n)}parse(e,t={}){let n=new Sk(this.schema,this.tokenHandlers),r;n.parseTokens(this.tokenizer.parse(e,t));do r=n.closeNode();while(n.stack.length);return r||this.schema.topNodeType.createAndFill()}};function kk(e,t){for(;++t<e.length;)if(e[t].type!=`list_item_open`)return e[t].hidden;return!1}new Ok(bk,yk(`commonmark`,{html:!1}),{blockquote:{block:`blockquote`},paragraph:{block:`paragraph`},list_item:{block:`list_item`},bullet_list:{block:`bullet_list`,getAttrs:(e,t,n)=>({tight:kk(t,n)})},ordered_list:{block:`ordered_list`,getAttrs:(e,t,n)=>({order:+e.attrGet(`start`)||1,tight:kk(t,n)})},heading:{block:`heading`,getAttrs:e=>({level:+e.tag.slice(1)})},code_block:{block:`code_block`,noCloseToken:!0},fence:{block:`code_block`,getAttrs:e=>({params:e.info||``}),noCloseToken:!0},hr:{node:`horizontal_rule`},image:{node:`image`,getAttrs:e=>({src:e.attrGet(`src`),title:e.attrGet(`title`)||null,alt:e.children[0]&&e.children[0].content||null})},hardbreak:{node:`hard_break`},em:{mark:`em`},strong:{mark:`strong`},link:{mark:`link`,getAttrs:e=>({href:e.attrGet(`href`),title:e.attrGet(`title`)||null})},code_inline:{mark:`code`,noCloseToken:!0}});var Ak={open:``,close:``,mixable:!0},jk=new class{constructor(e,t,n={}){this.nodes=e,this.marks=t,this.options=n}serialize(e,t={}){t=Object.assign({},this.options,t);let n=new Pk(this.nodes,this.marks,t);return n.renderContent(e),n.out}}({blockquote(e,t){e.wrapBlock(`> `,null,t,()=>e.renderContent(t))},code_block(e,t){let n=t.textContent.match(/`{3,}/gm),r=n?n.sort().slice(-1)[0]+"`":"```";e.write(r+(t.attrs.params||``)+`
|
|
217
|
+
`),e.text(t.textContent,!1),e.write(`
|
|
218
|
+
`),e.write(r),e.closeBlock(t)},heading(e,t){e.write(e.repeat(`#`,t.attrs.level)+` `),e.renderInline(t,!1),e.closeBlock(t)},horizontal_rule(e,t){e.write(t.attrs.markup||`---`),e.closeBlock(t)},bullet_list(e,t){e.renderList(t,` `,()=>(t.attrs.bullet||`*`)+` `)},ordered_list(e,t){let n=t.attrs.order||1,r=String(n+t.childCount-1).length,i=e.repeat(` `,r+2);e.renderList(t,i,t=>{let i=String(n+t);return e.repeat(` `,r-i.length)+i+`. `})},list_item(e,t){e.renderContent(t)},paragraph(e,t){e.renderInline(t),e.closeBlock(t)},image(e,t){e.write(`]/g,`\\$&`)+(t.attrs.title?` "`+t.attrs.title.replace(/"/g,`\\"`)+`"`:``)+`)`)},hard_break(e,t,n,r){for(let i=r+1;i<n.childCount;i++)if(n.child(i).type!=t.type){e.write(`\\
|
|
219
|
+
`);return}},text(e,t){e.text(t.text,!e.inAutolink)}},{em:{open:`*`,close:`*`,mixable:!0,expelEnclosingWhitespace:!0},strong:{open:`**`,close:`**`,mixable:!0,expelEnclosingWhitespace:!0},link:{open(e,t,n,r){return e.inAutolink=Nk(t,n,r),e.inAutolink?`<`:`[`},close(e,t,n,r){let{inAutolink:i}=e;return e.inAutolink=void 0,i?`>`:`](`+t.attrs.href.replace(/[\(\)"]/g,`\\$&`)+(t.attrs.title?` "${t.attrs.title.replace(/"/g,`\\"`)}"`:``)+`)`},mixable:!0},code:{open(e,t,n,r){return Mk(n.child(r),-1)},close(e,t,n,r){return Mk(n.child(r-1),1)},escape:!1}});function Mk(e,t){let n=/`+/g,r,i=0;if(e.isText)for(;r=n.exec(e.text);)i=Math.max(i,r[0].length);let a=i>0&&t>0?" `":"`";for(let e=0;e<i;e++)a+="`";return i>0&&t<0&&(a+=` `),a}function Nk(e,t,n){if(e.attrs.title||!/^\w+:/.test(e.attrs.href))return!1;let r=t.child(n);return!r.isText||r.text!=e.attrs.href||r.marks[r.marks.length-1]!=e?!1:n==t.childCount-1||!e.isInSet(t.child(n+1).marks)}var Pk=class{constructor(e,t,n){this.nodes=e,this.marks=t,this.options=n,this.delim=``,this.out=``,this.closed=null,this.inAutolink=void 0,this.atBlockStart=!1,this.inTightList=!1,this.options.tightLists===void 0&&(this.options.tightLists=!1),this.options.hardBreakNodeName===void 0&&(this.options.hardBreakNodeName=`hard_break`)}flushClose(e=2){if(this.closed){if(this.atBlank()||(this.out+=`
|
|
220
|
+
`),e>1){let t=this.delim,n=/\s+$/.exec(t);n&&(t=t.slice(0,t.length-n[0].length));for(let n=1;n<e;n++)this.out+=t+`
|
|
221
|
+
`}this.closed=null}}getMark(e){let t=this.marks[e];if(!t){if(this.options.strict!==!1)throw Error(`Mark type \`${e}\` not supported by Markdown renderer`);t=Ak}return t}wrapBlock(e,t,n,r){let i=this.delim;this.write(t??e),this.delim+=e,r(),this.delim=i,this.closeBlock(n)}atBlank(){return/(^|\n)$/.test(this.out)}ensureNewLine(){this.atBlank()||(this.out+=`
|
|
222
|
+
`)}write(e){this.flushClose(),this.delim&&this.atBlank()&&(this.out+=this.delim),e&&(this.out+=e)}closeBlock(e){this.closed=e}text(e,t=!0){let n=e.split(`
|
|
223
|
+
`);for(let e=0;e<n.length;e++)this.write(),!t&&n[e][0]==`[`&&/(^|[^\\])\!$/.test(this.out)&&(this.out=this.out.slice(0,this.out.length-1)+`\\!`),this.out+=t?this.esc(n[e],this.atBlockStart):n[e],e!=n.length-1&&(this.out+=`
|
|
224
|
+
`)}render(e,t,n){if(this.nodes[e.type.name])this.nodes[e.type.name](this,e,t,n);else if(this.options.strict!==!1)throw Error("Token type `"+e.type.name+"` not supported by Markdown renderer");else e.type.isLeaf||(e.type.inlineContent?this.renderInline(e):this.renderContent(e),e.isBlock&&this.closeBlock(e))}renderContent(e){e.forEach((t,n,r)=>this.render(t,e,r))}renderInline(e,t=!0){this.atBlockStart=t;let n=[],r=``,i=(t,i,a)=>{let o=t?t.marks:[];t&&t.type.name===this.options.hardBreakNodeName&&(o=o.filter(t=>{if(a+1==e.childCount)return!1;let n=e.child(a+1);return t.isInSet(n.marks)&&(!n.isText||/\S/.test(n.text))}));let s=r;if(r=``,t&&t.isText&&o.some(e=>{let t=this.getMark(e.type.name);return t&&t.expelEnclosingWhitespace&&!e.isInSet(n)})){let[e,r,i]=/^(\s*)(.*)$/m.exec(t.text);r&&(s+=r,t=i?t.withText(i):null,t||(o=n))}if(t&&t.isText&&o.some(t=>{let n=this.getMark(t.type.name);return n&&n.expelEnclosingWhitespace&&!this.isMarkAhead(e,a+1,t)})){let[e,i,a]=/^(.*?)(\s*)$/m.exec(t.text);a&&(r=a,t=i?t.withText(i):null,t||(o=n))}let c=o.length?o[o.length-1]:null,l=c&&this.getMark(c.type.name).escape===!1,u=o.length-+!!l;outer:for(let e=0;e<u;e++){let t=o[e];if(!this.getMark(t.type.name).mixable)break;for(let r=0;r<n.length;r++){let i=n[r];if(!this.getMark(i.type.name).mixable)break;if(t.eq(i)){e>r?o=o.slice(0,r).concat(t).concat(o.slice(r,e)).concat(o.slice(e+1,u)):r>e&&(o=o.slice(0,e).concat(o.slice(e+1,r)).concat(t).concat(o.slice(r,u)));continue outer}}}let d=0;for(;d<Math.min(n.length,u)&&o[d].eq(n[d]);)++d;for(;d<n.length;)this.text(this.markString(n.pop(),!1,e,a),!1);if(s&&this.text(s),t){for(;n.length<u;){let t=o[n.length];n.push(t),this.text(this.markString(t,!0,e,a),!1),this.atBlockStart=!1}l&&t.isText?this.text(this.markString(c,!0,e,a)+t.text+this.markString(c,!1,e,a+1),!1):this.render(t,e,a),this.atBlockStart=!1}t?.isText&&t.nodeSize>0&&(this.atBlockStart=!1)};e.forEach(i),i(null,0,e.childCount),this.atBlockStart=!1}renderList(e,t,n){this.closed&&this.closed.type==e.type?this.flushClose(3):this.inTightList&&this.flushClose(1);let r=e.attrs.tight===void 0?this.options.tightLists:e.attrs.tight,i=this.inTightList;this.inTightList=r,e.forEach((i,a,o)=>{o&&r&&this.flushClose(1),this.wrapBlock(t,n(o),e,()=>this.render(i,e,o))}),this.inTightList=i}esc(e,t=!1){return e=e.replace(/[`*\\~\[\]_]/g,(t,n)=>t==`_`&&n>0&&n+1<e.length&&e[n-1].match(/\w/)&&e[n+1].match(/\w/)?t:`\\`+t),t&&(e=e.replace(/^(\+[ ]|[\-*>])/,`\\$&`).replace(/^(\s*)(#{1,6})(\s|$)/,`$1\\$2$3`).replace(/^(\s*\d+)\.\s/,`$1\\. `)),this.options.escapeExtraCharacters&&(e=e.replace(this.options.escapeExtraCharacters,`\\$&`)),e}quote(e){let t=e.indexOf(`"`)==-1?`""`:e.indexOf(`'`)==-1?`''`:`()`;return t[0]+e+t[1]}repeat(e,t){let n=``;for(let r=0;r<t;r++)n+=e;return n}markString(e,t,n,r){let i=this.getMark(e.type.name),a=t?i.open:i.close;return typeof a==`string`?a:a(this,e,n,r)}getEnclosingWhitespace(e){return{leading:(e.match(/^(\s+)/)||[void 0])[0],trailing:(e.match(/(\s+)$/)||[void 0])[0]}}isMarkAhead(e,t,n){for(;;t++){if(t>=e.childCount)return!1;let r=e.child(t);if(r.type.name!=this.options.hardBreakNodeName)return n.isInSet(r.marks);t++}}},Fk=e(n(((e,t)=>{var n=!0,r=!1,i=!1;t.exports=function(e,t){t&&(n=!t.enabled,r=!!t.label,i=!!t.labelAfter),e.core.ruler.after(`inline`,`github-task-lists`,function(e){for(var t=e.tokens,r=2;r<t.length;r++)s(t,r)&&(c(t[r],e.Token),a(t[r-2],`class`,`task-list-item`+(n?``:` enabled`)),a(t[o(t,r-2)],`class`,`contains-task-list`))})};function a(e,t,n){var r=e.attrIndex(t),i=[t,n];r<0?e.attrPush(i):e.attrs[r]=i}function o(e,t){for(var n=e[t].level-1,r=t-1;r>=0;r--)if(e[r].level===n)return r;return-1}function s(e,t){return p(e[t])&&m(e[t-1])&&h(e[t-2])&&g(e[t])}function c(e,t){if(e.children.unshift(l(e,t)),e.children[1].content=e.children[1].content.slice(3),e.content=e.content.slice(3),r)if(i){e.children.pop();var n=`task-item-`+Math.ceil(1e4*1e3*Math.random()-1e3);e.children[0].content=e.children[0].content.slice(0,-1)+` id="`+n+`">`,e.children.push(f(e.content,n,t))}else e.children.unshift(u(t)),e.children.push(d(t))}function l(e,t){var r=new t(`html_inline`,``,0),i=n?` disabled="" `:``;return e.content.indexOf(`[ ] `)===0?r.content=`<input class="task-list-item-checkbox"`+i+`type="checkbox">`:(e.content.indexOf(`[x] `)===0||e.content.indexOf(`[X] `)===0)&&(r.content=`<input class="task-list-item-checkbox" checked=""`+i+`type="checkbox">`),r}function u(e){var t=new e(`html_inline`,``,0);return t.content=`<label>`,t}function d(e){var t=new e(`html_inline`,``,0);return t.content=`</label>`,t}function f(e,t,n){var r=new n(`html_inline`,``,0);return r.content=`<label class="task-list-item-label" for="`+t+`">`+e+`</label>`,r.attrs=[{for:t}],r}function p(e){return e.type===`inline`}function m(e){return e.type===`paragraph_open`}function h(e){return e.type===`list_item_open`}function g(e){return e.content.indexOf(`[ ] `)===0||e.content.indexOf(`[x] `)===0||e.content.indexOf(`[X] `)===0}}))(),1),Ik=Object.defineProperty,Lk=(e,t,n)=>t in e?Ik(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rk=(e,t,n)=>(Lk(e,typeof t==`symbol`?t:t+``,n),n),zk=my.create({name:`markdownTightLists`,addOptions:()=>({tight:!0,tightClass:`tight`,listTypes:[`bulletList`,`orderedList`]}),addGlobalAttributes(){return[{types:this.options.listTypes,attributes:{tight:{default:this.options.tight,parseHTML:e=>e.getAttribute(`data-tight`)===`true`||!e.querySelector(`p`),renderHTML:e=>({class:e.tight?this.options.tightClass:null,"data-tight":e.tight?`true`:null})}}}]},addCommands(){var e=this;return{toggleTight:function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return n=>{let{editor:r,commands:i}=n;function a(e){if(!r.isActive(e))return!1;let n=r.getAttributes(e);return i.updateAttributes(e,{tight:t??!(n!=null&&n.tight)})}return e.options.listTypes.some(e=>a(e))}}}}}),Bk=yk();function Vk(e,t){return Bk.inline.State.prototype.scanDelims.call({src:e,posMax:e.length}),new Bk.inline.State(e,null,null,[]).scanDelims(t,!0)}function Hk(e,t,n,r){let i=e.substring(0,n)+e.substring(n+t.length);return i=i.substring(0,n+r)+t+i.substring(n+r),i}function Uk(e,t,n,r){let i=n,a=e;for(;i<r&&!Vk(a,i).can_open;)a=Hk(a,t,i,1),i++;return{text:a,from:i,to:r}}function Wk(e,t,n,r){let i=r,a=e;for(;i>n&&!Vk(a,i).can_close;)a=Hk(a,t,i,-1),i--;return{text:a,from:n,to:i}}function Gk(e,t,n,r){let i={text:e,from:n,to:r};return i=Uk(i.text,t,i.from,i.to),i=Wk(i.text,t,i.from,i.to),i.to-i.from<t.length+1&&(i.text=i.text.substring(0,i.from)+i.text.substring(i.to+t.length)),i.text}var Kk=class extends Pk{constructor(e,t,n){super(e,t,n??{}),Rk(this,`inTable`,!1),this.inlines=[]}render(e,t,n){super.render(e,t,n);let r=this.inlines[this.inlines.length-1];if(r!=null&&r.start&&r!=null&&r.end){let{delimiter:e,start:t,end:n}=this.normalizeInline(r);this.out=Gk(this.out,e,t,n),this.inlines.pop()}}markString(e,t,n,r){let i=this.marks[e.type.name];if(i.expelEnclosingWhitespace)if(t)this.inlines.push({start:this.out.length,delimiter:i.open});else{let e=this.inlines.pop();this.inlines.push({...e,end:this.out.length})}return super.markString(e,t,n,r)}normalizeInline(e){let{start:t,end:n}=e;for(;this.out.charAt(t).match(/\s/);)t++;return{...e,start:t}}},qk=iy.create({name:`markdownHTMLMark`,addStorage(){return{markdown:{serialize:{open(e,t){return this.editor.storage.markdown.options.html?Jk(t)?.[0]??``:(console.warn(`Tiptap Markdown: "${t.type.name}" mark is only available in html mode`),``)},close(e,t){return this.editor.storage.markdown.options.html?Jk(t)?.[1]??``:``}},parse:{}}}}});function Jk(e){let t=e.type.schema,n=t.text(` `,[e]),r=W_(B.from(n),t).match(/^(<.*?>) (<\/.*?>)$/);return r?[r[1],r[2]]:null}function Yk(e){let t=`<body>${e}</body>`;return new window.DOMParser().parseFromString(t,`text/html`).body}function Xk(e){return e?.replace(/</g,`<`).replace(/>/g,`>`)}function Zk(e){let t=e.parentElement,n=t.cloneNode();for(;t.firstChild&&t.firstChild!==e;)n.appendChild(t.firstChild);n.childNodes.length>0&&t.parentElement.insertBefore(n,t),t.parentElement.insertBefore(e,t),t.childNodes.length===0&&t.remove()}function Qk(e){let t=e.parentNode;for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}var $k=Zy.create({name:`markdownHTMLNode`,addStorage(){return{markdown:{serialize(e,t,n){this.editor.storage.markdown.options.html?e.write(eA(t,n)):(console.warn(`Tiptap Markdown: "${t.type.name}" node is only available in html mode`),e.write(`[${t.type.name}]`)),t.isBlock&&e.closeBlock(t)},parse:{}}}}});function eA(e,t){let n=e.type.schema,r=W_(B.from(e),n);return e.isBlock&&(t instanceof B||t.type.name===n.topNodeType.name)?tA(r):r}function tA(e){let t=Yk(e).firstElementChild;return t.innerHTML=t.innerHTML.trim()?`
|
|
225
|
+
${t.innerHTML}
|
|
226
|
+
`:`
|
|
227
|
+
`,t.outerHTML}var nA=Zy.create({name:`blockquote`}).extend({addStorage(){return{markdown:{serialize:jk.nodes.blockquote,parse:{}}}}}),rA=Zy.create({name:`bulletList`}).extend({addStorage(){return{markdown:{serialize(e,t){return e.renderList(t,` `,()=>(this.editor.storage.markdown.options.bulletListMarker||`-`)+` `)},parse:{}}}}}),iA=Zy.create({name:`codeBlock`}).extend({addStorage(){return{markdown:{serialize(e,t){e.write("```"+(t.attrs.language||``)+`
|
|
228
|
+
`),e.text(t.textContent,!1),e.ensureNewLine(),e.write("```"),e.closeBlock(t)},parse:{setup(e){e.set({langPrefix:this.options.languageClassPrefix??`language-`})},updateDOM(e){e.innerHTML=e.innerHTML.replace(/\n<\/code><\/pre>/g,`</code></pre>`)}}}}}}),aA=Zy.create({name:`hardBreak`}).extend({addStorage(){return{markdown:{serialize(e,t,n,r){for(let i=r+1;i<n.childCount;i++)if(n.child(i).type!=t.type){e.write(e.inTable?$k.storage.markdown.serialize.call(this,e,t,n):`\\
|
|
229
|
+
`);return}},parse:{}}}}}),oA=Zy.create({name:`heading`}).extend({addStorage(){return{markdown:{serialize:jk.nodes.heading,parse:{}}}}}),sA=Zy.create({name:`horizontalRule`}).extend({addStorage(){return{markdown:{serialize:jk.nodes.horizontal_rule,parse:{}}}}}),cA=Zy.create({name:`image`}).extend({addStorage(){return{markdown:{serialize:jk.nodes.image,parse:{}}}}}),lA=Zy.create({name:`listItem`}).extend({addStorage(){return{markdown:{serialize:jk.nodes.list_item,parse:{}}}}}),uA=Zy.create({name:`orderedList`});function dA(e,t,n){let r=0;for(;n-r>0&&t.child(n-r-1).type.name===e.type.name;r++);return r}var fA=uA.extend({addStorage(){return{markdown:{serialize(e,t,n,r){let i=t.attrs.start||1,a=String(i+t.childCount-1).length,o=e.repeat(` `,a+2),s=dA(t,n,r)%2?`) `:`. `;e.renderList(t,o,t=>{let n=String(i+t);return e.repeat(` `,a-n.length)+n+s})},parse:{}}}}}),pA=Zy.create({name:`paragraph`}).extend({addStorage(){return{markdown:{serialize:jk.nodes.paragraph,parse:{}}}}});function mA(e){var t;return(e==null||(t=e.content)==null?void 0:t.content)??[]}var hA=Zy.create({name:`table`}).extend({addStorage(){return{markdown:{serialize(e,t,n){if(!_A(t)){$k.storage.markdown.serialize.call(this,e,t,n);return}e.inTable=!0,t.forEach((t,n,r)=>{if(e.write(`| `),t.forEach((t,n,r)=>{r&&e.write(` | `);let i=t.firstChild;i.textContent.trim()&&e.renderInline(i)}),e.write(` |`),e.ensureNewLine(),!r){let n=Array.from({length:t.childCount}).map(()=>`---`).join(` | `);e.write(`| ${n} |`),e.ensureNewLine()}}),e.closeBlock(t),e.inTable=!1},parse:{}}}}});function gA(e){return e.attrs.colspan>1||e.attrs.rowspan>1}function _A(e){let t=mA(e),n=t[0],r=t.slice(1);return!(mA(n).some(e=>e.type.name!==`tableHeader`||gA(e)||e.childCount>1)||r.some(e=>mA(e).some(e=>e.type.name===`tableHeader`||gA(e)||e.childCount>1)))}var vA=[nA,rA,iA,aA,oA,sA,$k,cA,lA,fA,pA,hA,Zy.create({name:`taskItem`}).extend({addStorage(){return{markdown:{serialize(e,t){let n=t.attrs.checked?`[x]`:`[ ]`;e.write(`${n} `),e.renderContent(t)},parse:{updateDOM(e){[...e.querySelectorAll(`.task-list-item`)].forEach(e=>{let t=e.querySelector(`input`);e.setAttribute(`data-type`,`taskItem`),t&&(e.setAttribute(`data-checked`,t.checked),t.remove())})}}}}}}),Zy.create({name:`taskList`}).extend({addStorage(){return{markdown:{serialize:rA.storage.markdown.serialize,parse:{setup(e){e.use(Fk.default)},updateDOM(e){[...e.querySelectorAll(`.contains-task-list`)].forEach(e=>{e.setAttribute(`data-type`,`taskList`)})}}}}}}),Zy.create({name:`text`}).extend({addStorage(){return{markdown:{serialize(e,t){e.text(Xk(t.text))},parse:{}}}}}),iy.create({name:`bold`}).extend({addStorage(){return{markdown:{serialize:jk.marks.strong,parse:{}}}}}),iy.create({name:`code`}).extend({addStorage(){return{markdown:{serialize:jk.marks.code,parse:{}}}}}),qk,iy.create({name:`italic`}).extend({addStorage(){return{markdown:{serialize:jk.marks.em,parse:{}}}}}),iy.create({name:`link`}).extend({addStorage(){return{markdown:{serialize:jk.marks.link,parse:{}}}}}),iy.create({name:`strike`}).extend({addStorage(){return{markdown:{serialize:{open:`~~`,close:`~~`,expelEnclosingWhitespace:!0},parse:{}}}}})];function yA(e){let t=e.storage?.markdown,n=vA.find(t=>t.name===e.name)?.storage.markdown;return t||n?{...n,...t}:null}var bA=class{constructor(e){Rk(this,`editor`,null),this.editor=e}serialize(e){let t=new Kk(this.nodes,this.marks,{hardBreakNodeName:aA.name});return t.renderContent(e),t.out}get nodes(){return{...Object.fromEntries(Object.keys(this.editor.schema.nodes).map(e=>[e,this.serializeNode($k)])),...Object.fromEntries(this.editor.extensionManager.extensions.filter(e=>e.type===`node`&&this.serializeNode(e)).map(e=>[e.name,this.serializeNode(e)])??[])}}get marks(){return{...Object.fromEntries(Object.keys(this.editor.schema.marks).map(e=>[e,this.serializeMark(qk)])),...Object.fromEntries(this.editor.extensionManager.extensions.filter(e=>e.type===`mark`&&this.serializeMark(e)).map(e=>[e.name,this.serializeMark(e)])??[])}}serializeNode(e){var t;return(t=yA(e))==null||(t=t.serialize)==null?void 0:t.bind({editor:this.editor,options:e.options})}serializeMark(e){let t=yA(e)?.serialize;return t?{...t,open:typeof t.open==`function`?t.open.bind({editor:this.editor,options:e.options}):t.open,close:typeof t.close==`function`?t.close.bind({editor:this.editor,options:e.options}):t.close}:null}},xA=class{constructor(e,t){Rk(this,`editor`,null),Rk(this,`md`,null);let{html:n,linkify:r,breaks:i}=t;this.editor=e,this.md=this.withPatchedRenderer(yk({html:n,linkify:r,breaks:i}))}parse(e){let{inline:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof e==`string`){this.editor.extensionManager.extensions.forEach(e=>{var t;return(t=yA(e))==null||(t=t.parse)==null||(t=t.setup)==null?void 0:t.call({editor:this.editor,options:e.options},this.md)});let n=Yk(this.md.render(e));return this.editor.extensionManager.extensions.forEach(e=>{var t;return(t=yA(e))==null||(t=t.parse)==null||(t=t.updateDOM)==null?void 0:t.call({editor:this.editor,options:e.options},n)}),this.normalizeDOM(n,{inline:t,content:e}),n.innerHTML}return e}normalizeDOM(e,t){let{inline:n,content:r}=t;return this.normalizeBlocks(e),e.querySelectorAll(`*`).forEach(e=>{e.nextSibling?.nodeType===Node.TEXT_NODE&&!e.closest(`pre`)&&(e.nextSibling.textContent=e.nextSibling.textContent.replace(/^\n/,``))}),n&&this.normalizeInline(e,r),e}normalizeBlocks(e){let t=Object.values(this.editor.schema.nodes).filter(e=>e.isBlock).map(e=>e.spec.parseDOM?.map(e=>e.tag)).flat().filter(Boolean).join(`,`);t&&[...e.querySelectorAll(t)].forEach(e=>{e.parentElement.matches(`p`)&&Zk(e)})}normalizeInline(e,t){var n;if((n=e.firstElementChild)!=null&&n.matches(`p`)){let n=e.firstElementChild,{nextElementSibling:r}=n,i=t.match(/^\s+/)?.[0]??``,a=r?``:t.match(/\s+$/)?.[0]??``;if(t.match(/^\n\n/)){n.innerHTML=`${n.innerHTML}${a}`;return}Qk(n),e.innerHTML=`${i}${e.innerHTML}${a}`}}withPatchedRenderer(e){let t=e=>function(){let t=e(...arguments);return t===`
|
|
230
|
+
`?t:t[t.length-1]===`
|
|
231
|
+
`?t.slice(0,-1):t};return e.renderer.rules.hardbreak=t(e.renderer.rules.hardbreak),e.renderer.rules.softbreak=t(e.renderer.rules.softbreak),e.renderer.rules.fence=t(e.renderer.rules.fence),e.renderer.rules.code_block=t(e.renderer.rules.code_block),e.renderer.renderToken=t(e.renderer.renderToken.bind(e.renderer)),e}},SA=my.create({name:`markdownClipboard`,addOptions(){return{transformPastedText:!1,transformCopiedText:!1}},addProseMirrorPlugins(){return[new Zu({key:new ed(`markdownClipboard`),props:{clipboardTextParser:(e,t,n)=>{if(n||!this.options.transformPastedText)return null;let r=this.editor.storage.markdown.parser.parse(e,{inline:!0});return Jc.fromSchema(this.editor.schema).parseSlice(Yk(r),{preserveWhitespace:!0,context:t})},clipboardTextSerializer:e=>this.options.transformCopiedText?this.editor.storage.markdown.serializer.serialize(e.content):null}})]}}),CA=my.create({name:`markdown`,priority:50,addOptions(){return{html:!0,tightLists:!0,tightListClass:`tight`,bulletListMarker:`-`,linkify:!1,breaks:!1,transformPastedText:!1,transformCopiedText:!1}},addCommands(){let e=py.Commands.config.addCommands();return{setContent:(t,n)=>r=>e.setContent(r.editor.storage.markdown.parser.parse(t),n)(r),insertContentAt:(t,n,r)=>i=>e.insertContentAt(t,i.editor.storage.markdown.parser.parse(n,{inline:!0}),r)(i)}},onBeforeCreate(){this.editor.storage.markdown={options:{...this.options},parser:new xA(this.editor,this.options),serializer:new bA(this.editor),getMarkdown:()=>this.editor.storage.markdown.serializer.serialize(this.editor.state.doc)},this.editor.options.initialContent=this.editor.options.content,this.editor.options.content=this.editor.storage.markdown.parser.parse(this.editor.options.content)},onCreate(){this.editor.options.content=this.editor.options.initialContent,delete this.editor.options.initialContent},addStorage(){return{}},addExtensions(){return[zk.configure({tight:this.options.tightLists,tightClass:this.options.tightListClass}),SA.configure({transformPastedText:this.options.transformPastedText,transformCopiedText:this.options.transformCopiedText})]}}),wA,TA;if(typeof WeakMap<`u`){let e=new WeakMap;wA=t=>e.get(t),TA=(t,n)=>(e.set(t,n),n)}else{let e=[],t=0;wA=t=>{for(let n=0;n<e.length;n+=2)if(e[n]==t)return e[n+1]},TA=(n,r)=>(t==10&&(t=0),e[t++]=n,e[t++]=r)}var EA=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t<this.map.length;t++){let n=this.map[t];if(n!=e)continue;let r=t%this.width,i=t/this.width|0,a=r+1,o=i+1;for(let e=1;a<this.width&&this.map[t+e]==n;e++)a++;for(let e=1;o<this.height&&this.map[t+this.width*e]==n;e++)o++;return{left:r,top:i,right:a,bottom:o}}throw RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){let{left:r,right:i,top:a,bottom:o}=this.findCell(e);return t==`horiz`?(n<0?r==0:i==this.width)?null:this.map[a*this.width+(n<0?r-1:i)]:(n<0?a==0:o==this.height)?null:this.map[r+this.width*(n<0?a-1:o)]}rectBetween(e,t){let{left:n,right:r,top:i,bottom:a}=this.findCell(e),{left:o,right:s,top:c,bottom:l}=this.findCell(t);return{left:Math.min(n,o),top:Math.min(i,c),right:Math.max(r,s),bottom:Math.max(a,l)}}cellsInRect(e){let t=[],n={};for(let r=e.top;r<e.bottom;r++)for(let i=e.left;i<e.right;i++){let a=r*this.width+i,o=this.map[a];n[o]||(n[o]=!0,!(i==e.left&&i&&this.map[a-1]==o||r==e.top&&r&&this.map[a-this.width]==o)&&t.push(o))}return t}positionAt(e,t,n){for(let r=0,i=0;;r++){let a=i+n.child(r).nodeSize;if(r==e){let n=t+e*this.width,r=(e+1)*this.width;for(;n<r&&this.map[n]<i;)n++;return n==r?a-1:this.map[n]}i=a}}static get(e){return wA(e)||TA(e,DA(e))}};function DA(e){if(e.type.spec.tableRole!=`table`)throw RangeError(`Not a table node: `+e.type.name);let t=OA(e),n=e.childCount,r=[],i=0,a=null,o=[];for(let e=0,i=t*n;e<i;e++)r[e]=0;for(let s=0,c=0;s<n;s++){let l=e.child(s);c++;for(let e=0;;e++){for(;i<r.length&&r[i]!=0;)i++;if(e==l.childCount)break;let u=l.child(e),{colspan:d,rowspan:f,colwidth:p}=u.attrs;for(let e=0;e<f;e++){if(e+s>=n){(a||=[]).push({type:`overlong_rowspan`,pos:c,n:f-e});break}let l=i+e*t;for(let e=0;e<d;e++){r[l+e]==0?r[l+e]=c:(a||=[]).push({type:`collision`,row:s,pos:c,n:d-e});let n=p&&p[e];if(n){let r=(l+e)%t*2,i=o[r];i==null||i!=n&&o[r+1]==1?(o[r]=n,o[r+1]=1):i==n&&o[r+1]++}}}i+=d,c+=u.nodeSize}let u=(s+1)*t,d=0;for(;i<u;)r[i++]==0&&d++;d&&(a||=[]).push({type:`missing`,row:s,n:d}),c++}(t===0||n===0)&&(a||=[]).push({type:`zero_sized`});let s=new EA(t,n,r,a),c=!1;for(let e=0;!c&&e<o.length;e+=2)o[e]!=null&&o[e+1]<n&&(c=!0);return c&&kA(s,o,e),s}function OA(e){let t=-1,n=!1;for(let r=0;r<e.childCount;r++){let i=e.child(r),a=0;if(n)for(let t=0;t<r;t++){let n=e.child(t);for(let e=0;e<n.childCount;e++){let i=n.child(e);t+i.attrs.rowspan>r&&(a+=i.attrs.colspan)}}for(let e=0;e<i.childCount;e++){let t=i.child(e);a+=t.attrs.colspan,t.attrs.rowspan>1&&(n=!0)}t==-1?t=a:t!=a&&(t=Math.max(t,a))}return t}function kA(e,t,n){e.problems||=[];let r={};for(let i=0;i<e.map.length;i++){let a=e.map[i];if(r[a])continue;r[a]=!0;let o=n.nodeAt(a);if(!o)throw RangeError(`No cell with offset ${a} found`);let s=null,c=o.attrs;for(let n=0;n<c.colspan;n++){let r=t[(i+n)%e.width*2];r!=null&&(!c.colwidth||c.colwidth[n]!=r)&&((s||=AA(c))[n]=r)}s&&e.problems.unshift({type:`colwidth mismatch`,pos:a,colwidth:s})}}function AA(e){if(e.colwidth)return e.colwidth.slice();let t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function jA(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(let n in e.nodes){let r=e.nodes[n],i=r.spec.tableRole;i&&(t[i]=r)}}return t}var MA=new ed(`selectingCells`);function NA(e){for(let t=e.depth-1;t>0;t--)if(e.node(t).type.spec.tableRole==`row`)return e.node(0).resolve(e.before(t+1));return null}function PA(e){for(let t=e.depth;t>0;t--){let n=e.node(t).type.spec.tableRole;if(n===`cell`||n===`header_cell`)return e.node(t)}return null}function FA(e){let t=e.selection.$head;for(let e=t.depth;e>0;e--)if(t.node(e).type.spec.tableRole==`row`)return!0;return!1}function IA(e){let t=e.selection;if(`$anchorCell`in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if(`node`in t&&t.node&&t.node.type.spec.tableRole==`cell`)return t.$anchor;let n=NA(t.$head)||LA(t.$head);if(n)return n;throw RangeError(`No cell found around position ${t.head}`)}function LA(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){let r=t.type.spec.tableRole;if(r==`cell`||r==`header_cell`)return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){let r=t.type.spec.tableRole;if(r==`cell`||r==`header_cell`)return e.doc.resolve(n-t.nodeSize)}}function RA(e){return e.parent.type.spec.tableRole==`row`&&!!e.nodeAfter}function zA(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function BA(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function VA(e,t,n){let r=e.node(-1),i=EA.get(r),a=e.start(-1),o=i.nextCell(e.pos-a,t,n);return o==null?null:e.node(0).resolve(a+o)}function HA(e,t,n=1){let r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some(e=>e>0)||(r.colwidth=null)),r}function UA(e,t,n=1){let r={...e,colspan:e.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let e=0;e<n;e++)r.colwidth.splice(t,0,0)}return r}function WA(e,t,n){let r=jA(t.type.schema).header_cell;for(let i=0;i<e.height;i++)if(t.nodeAt(e.map[n+i*e.width]).type!=r)return!1;return!0}var GA=class e extends ku{constructor(e,t=e){let n=e.node(-1),r=EA.get(n),i=e.start(-1),a=r.rectBetween(e.pos-i,t.pos-i),o=e.node(0),s=r.cellsInRect(a).filter(e=>e!=t.pos-i);s.unshift(t.pos-i);let c=s.map(e=>{let t=n.nodeAt(e);if(!t)throw RangeError(`No cell with offset ${e} found`);let r=i+e+1;return new Au(o.resolve(r),o.resolve(r+t.content.size))});super(c[0].$from,c[0].$to,c),this.$anchorCell=e,this.$headCell=t}map(t,n){let r=t.resolve(n.map(this.$anchorCell.pos)),i=t.resolve(n.map(this.$headCell.pos));if(RA(r)&&RA(i)&&BA(r,i)){let t=this.$anchorCell.node(-1)!=r.node(-1);return t&&this.isRowSelection()?e.rowSelection(r,i):t&&this.isColSelection()?e.colSelection(r,i):new e(r,i)}return Nu.between(r,i)}content(){let e=this.$anchorCell.node(-1),t=EA.get(e),n=this.$anchorCell.start(-1),r=t.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),i={},a=[];for(let n=r.top;n<r.bottom;n++){let o=[];for(let a=n*t.width+r.left,s=r.left;s<r.right;s++,a++){let n=t.map[a];if(i[n])continue;i[n]=!0;let s=t.findCell(n),c=e.nodeAt(n);if(!c)throw RangeError(`No cell with offset ${n} found`);let l=r.left-s.left,u=s.right-r.right;if(l>0||u>0){let e=c.attrs;if(l>0&&(e=HA(e,0,l)),u>0&&(e=HA(e,e.colspan-u,u)),s.left<r.left){if(c=c.type.createAndFill(e),!c)throw RangeError(`Could not create cell with attrs ${JSON.stringify(e)}`)}else c=c.type.create(e,c.content)}if(s.top<r.top||s.bottom>r.bottom){let e={...c.attrs,rowspan:Math.min(s.bottom,r.bottom)-Math.max(s.top,r.top)};c=s.top<r.top?c.type.createAndFill(e):c.type.create(e,c.content)}o.push(c)}a.push(e.child(n).copy(B.from(o)))}let o=this.isColSelection()&&this.isRowSelection()?e:a;return new V(B.from(o),1,1)}replace(e,t=V.empty){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:a,$to:o}=r[i],s=e.mapping.slice(n);e.replace(s.map(a.pos),s.map(o.pos),i?V.empty:t)}let i=ku.findFrom(e.doc.resolve(e.mapping.slice(n).map(this.to)),-1);i&&e.setSelection(i)}replaceWith(e,t){this.replace(e,new V(B.from(t),0,0))}forEachCell(e){let t=this.$anchorCell.node(-1),n=EA.get(t),r=this.$anchorCell.start(-1),i=n.cellsInRect(n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r));for(let n=0;n<i.length;n++)e(t.nodeAt(i[n]),r+i[n])}isColSelection(){let e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);if(Math.min(e,t)>0)return!1;let n=e+this.$anchorCell.nodeAfter.attrs.rowspan,r=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){let r=t.node(-1),i=EA.get(r),a=t.start(-1),o=i.findCell(t.pos-a),s=i.findCell(n.pos-a),c=t.node(0);return o.top<=s.top?(o.top>0&&(t=c.resolve(a+i.map[o.left])),s.bottom<i.height&&(n=c.resolve(a+i.map[i.width*(i.height-1)+s.right-1]))):(s.top>0&&(n=c.resolve(a+i.map[s.left])),o.bottom<i.height&&(t=c.resolve(a+i.map[i.width*(i.height-1)+o.right-1]))),new e(t,n)}isRowSelection(){let e=this.$anchorCell.node(-1),t=EA.get(e),n=this.$anchorCell.start(-1),r=t.colCount(this.$anchorCell.pos-n),i=t.colCount(this.$headCell.pos-n);if(Math.min(r,i)>0)return!1;let a=r+this.$anchorCell.nodeAfter.attrs.colspan,o=i+this.$headCell.nodeAfter.attrs.colspan;return Math.max(a,o)==t.width}eq(t){return t instanceof e&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){let r=t.node(-1),i=EA.get(r),a=t.start(-1),o=i.findCell(t.pos-a),s=i.findCell(n.pos-a),c=t.node(0);return o.left<=s.left?(o.left>0&&(t=c.resolve(a+i.map[o.top*i.width])),s.right<i.width&&(n=c.resolve(a+i.map[i.width*(s.top+1)-1]))):(s.left>0&&(n=c.resolve(a+i.map[s.top*i.width])),o.right<i.width&&(t=c.resolve(a+i.map[i.width*(o.top+1)-1]))),new e(t,n)}toJSON(){return{type:`cell`,anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){return new e(t.resolve(n),t.resolve(r))}getBookmark(){return new KA(this.$anchorCell.pos,this.$headCell.pos)}};GA.prototype.visible=!1,ku.jsonID(`cell`,GA);var KA=class e{constructor(e,t){this.anchor=e,this.head=t}map(t){return new e(t.map(this.anchor),t.map(this.head))}resolve(e){let t=e.resolve(this.anchor),n=e.resolve(this.head);return t.parent.type.spec.tableRole==`row`&&n.parent.type.spec.tableRole==`row`&&t.index()<t.parent.childCount&&n.index()<n.parent.childCount&&BA(t,n)?new GA(t,n):ku.near(n,1)}};function qA(e){if(!(e.selection instanceof GA))return null;let t=[];return e.selection.forEachCell((e,n)=>{t.push(hh.node(n,n+e.nodeSize,{class:`selectedCell`}))}),vh.create(e.doc,t)}function JA({$from:e,$to:t}){if(e.pos==t.pos||e.pos<t.pos-6)return!1;let n=e.pos,r=t.pos,i=e.depth;for(;i>=0&&!(e.after(i+1)<e.end(i));i--,n++);for(let e=t.depth;e>=0&&!(t.before(e+1)>t.start(e));e--,r--);return n==r&&/row|table/.test(e.node(i).type.spec.tableRole)}function YA({$from:e,$to:t}){let n,r;for(let t=e.depth;t>0;t--){let r=e.node(t);if(r.type.spec.tableRole===`cell`||r.type.spec.tableRole===`header_cell`){n=r;break}}for(let e=t.depth;e>0;e--){let n=t.node(e);if(n.type.spec.tableRole===`cell`||n.type.spec.tableRole===`header_cell`){r=n;break}}return n!==r&&t.parentOffset===0}function XA(e,t,n){let r=(t||e).selection,i=(t||e).doc,a,o;if(r instanceof Fu&&(o=r.node.type.spec.tableRole)){if(o==`cell`||o==`header_cell`)a=GA.create(i,r.from);else if(o==`row`){let e=i.resolve(r.from+1);a=GA.rowSelection(e,e)}else if(!n){let e=EA.get(r.node),t=r.from+1,n=t+e.map[e.width*e.height-1];a=GA.create(i,t+1,n)}}else r instanceof Nu&&JA(r)?a=Nu.create(i,r.from):r instanceof Nu&&YA(r)&&(a=Nu.create(i,r.$from.start(),r.$from.end()));return a&&(t||=e.tr).setSelection(a),t}var ZA=new ed(`fix-tables`);function QA(e,t,n,r){let i=e.childCount,a=t.childCount;outer:for(let o=0,s=0;o<a;o++){let a=t.child(o);for(let t=s,r=Math.min(i,o+3);t<r;t++)if(e.child(t)==a){s=t+1,n+=a.nodeSize;continue outer}r(a,n),s<i&&e.child(s).sameMarkup(a)?QA(e.child(s),a,n+1,r):a.nodesBetween(0,a.content.size,r,n+1),n+=a.nodeSize}}function $A(e,t){let n,r=(t,r)=>{t.type.spec.tableRole==`table`&&(n=ej(e,t,r,n))};return t?t.doc!=e.doc&&QA(t.doc,e.doc,0,r):e.doc.descendants(r),n}function ej(e,t,n,r){let i=EA.get(t);if(!i.problems)return r;r||=e.tr;let a=[];for(let e=0;e<i.height;e++)a.push(0);for(let e=0;e<i.problems.length;e++){let o=i.problems[e];if(o.type==`collision`){let e=t.nodeAt(o.pos);if(!e)continue;let i=e.attrs;for(let e=0;e<i.rowspan;e++)a[o.row+e]+=o.n;r.setNodeMarkup(r.mapping.map(n+1+o.pos),null,HA(i,i.colspan-o.n,o.n))}else if(o.type==`missing`)a[o.row]+=o.n;else if(o.type==`overlong_rowspan`){let e=t.nodeAt(o.pos);if(!e)continue;r.setNodeMarkup(r.mapping.map(n+1+o.pos),null,{...e.attrs,rowspan:e.attrs.rowspan-o.n})}else if(o.type==`colwidth mismatch`){let e=t.nodeAt(o.pos);if(!e)continue;r.setNodeMarkup(r.mapping.map(n+1+o.pos),null,{...e.attrs,colwidth:o.colwidth})}else if(o.type==`zero_sized`){let e=r.mapping.map(n);r.delete(e,e+t.nodeSize)}}let o,s;for(let e=0;e<a.length;e++)a[e]&&(o??=e,s=e);for(let c=0,l=n+1;c<i.height;c++){let n=t.child(c),i=l+n.nodeSize,u=a[c];if(u>0){let t=`cell`;n.firstChild&&(t=n.firstChild.type.spec.tableRole);let a=[];for(let n=0;n<u;n++){let n=jA(e.schema)[t].createAndFill();n&&a.push(n)}let d=(c==0||o==c-1)&&s==c?l+1:i-1;r.insert(r.mapping.map(d),a)}l=i}return r.setMeta(ZA,{fixTables:!0})}function tj(e){let t=e.selection,n=IA(e),r=n.node(-1),i=n.start(-1),a=EA.get(r);return{...t instanceof GA?a.rectBetween(t.$anchorCell.pos-i,t.$headCell.pos-i):a.findCell(n.pos-i),tableStart:i,map:a,table:r}}function nj(e,{map:t,tableStart:n,table:r},i){let a=i>0?-1:0;WA(t,r,i+a)&&(a=i==0||i==t.width?null:0);for(let o=0;o<t.height;o++){let s=o*t.width+i;if(i>0&&i<t.width&&t.map[s-1]==t.map[s]){let a=t.map[s],c=r.nodeAt(a);e.setNodeMarkup(e.mapping.map(n+a),null,UA(c.attrs,i-t.colCount(a))),o+=c.attrs.rowspan-1}else{let c=a==null?jA(r.type.schema).cell:r.nodeAt(t.map[s+a]).type,l=t.positionAt(o,i,r);e.insert(e.mapping.map(n+l),c.createAndFill())}}return e}function rj(e,t){if(!FA(e))return!1;if(t){let n=tj(e);t(nj(e.tr,n,n.left))}return!0}function ij(e,t){if(!FA(e))return!1;if(t){let n=tj(e);t(nj(e.tr,n,n.right))}return!0}function aj(e,{map:t,table:n,tableStart:r},i){let a=e.mapping.maps.length;for(let o=0;o<t.height;){let s=o*t.width+i,c=t.map[s],l=n.nodeAt(c),u=l.attrs;if(i>0&&t.map[s-1]==c||i<t.width-1&&t.map[s+1]==c)e.setNodeMarkup(e.mapping.slice(a).map(r+c),null,HA(u,i-t.colCount(c)));else{let t=e.mapping.slice(a).map(r+c);e.delete(t,t+l.nodeSize)}o+=u.rowspan}}function oj(e,t){if(!FA(e))return!1;if(t){let n=tj(e),r=e.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let e=n.right-1;aj(r,n,e),e!=n.left;e--){let e=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!e)throw RangeError(`No table found`);n.table=e,n.map=EA.get(e)}t(r)}return!0}function sj(e,t,n){let r=jA(t.type.schema).header_cell;for(let i=0;i<e.width;i++)if(t.nodeAt(e.map[i+n*e.width])?.type!=r)return!1;return!0}function cj(e,{map:t,tableStart:n,table:r},i){let a=n;for(let e=0;e<i;e++)a+=r.child(e).nodeSize;let o=[],s=i>0?-1:0;sj(t,r,i+s)&&(s=i==0||i==t.height?null:0);for(let a=0,c=t.width*i;a<t.width;a++,c++)if(i>0&&i<t.height&&t.map[c]==t.map[c-t.width]){let i=t.map[c],o=r.nodeAt(i).attrs;e.setNodeMarkup(n+i,null,{...o,rowspan:o.rowspan+1}),a+=o.colspan-1}else{let e=(s==null?jA(r.type.schema).cell:r.nodeAt(t.map[c+s*t.width])?.type)?.createAndFill();e&&o.push(e)}return e.insert(a,jA(r.type.schema).row.create(null,o)),e}function lj(e,t){if(!FA(e))return!1;if(t){let n=tj(e);t(cj(e.tr,n,n.top))}return!0}function uj(e,t){if(!FA(e))return!1;if(t){let n=tj(e);t(cj(e.tr,n,n.bottom))}return!0}function dj(e,{map:t,table:n,tableStart:r},i){let a=0;for(let e=0;e<i;e++)a+=n.child(e).nodeSize;let o=a+n.child(i).nodeSize,s=e.mapping.maps.length;e.delete(a+r,o+r);let c=new Set;for(let a=0,o=i*t.width;a<t.width;a++,o++){let l=t.map[o];if(!c.has(l)){if(c.add(l),i>0&&l==t.map[o-t.width]){let t=n.nodeAt(l).attrs;e.setNodeMarkup(e.mapping.slice(s).map(l+r),null,{...t,rowspan:t.rowspan-1}),a+=t.colspan-1}else if(i<t.height&&l==t.map[o+t.width]){let o=n.nodeAt(l),c=o.attrs,u=o.type.create({...c,rowspan:o.attrs.rowspan-1},o.content),d=t.positionAt(i+1,a,n);e.insert(e.mapping.slice(s).map(r+d),u),a+=c.colspan-1}}}}function fj(e,t){if(!FA(e))return!1;if(t){let n=tj(e),r=e.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let e=n.bottom-1;dj(r,n,e),e!=n.top;e--){let e=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!e)throw RangeError(`No table found`);n.table=e,n.map=EA.get(n.table)}t(r)}return!0}function pj(e){let t=e.content;return t.childCount==1&&t.child(0).isTextblock&&t.child(0).childCount==0}function mj({width:e,height:t,map:n},r){let i=r.top*e+r.left,a=i,o=(r.bottom-1)*e+r.left,s=i+(r.right-r.left-1);for(let t=r.top;t<r.bottom;t++){if(r.left>0&&n[a]==n[a-1]||r.right<e&&n[s]==n[s+1])return!0;a+=e,s+=e}for(let a=r.left;a<r.right;a++){if(r.top>0&&n[i]==n[i-e]||r.bottom<t&&n[o]==n[o+e])return!0;i++,o++}return!1}function hj(e,t){let n=e.selection;if(!(n instanceof GA)||n.$anchorCell.pos==n.$headCell.pos)return!1;let r=tj(e),{map:i}=r;if(mj(i,r))return!1;if(t){let n=e.tr,a={},o=B.empty,s,c;for(let e=r.top;e<r.bottom;e++)for(let t=r.left;t<r.right;t++){let l=i.map[e*i.width+t],u=r.table.nodeAt(l);if(!(a[l]||!u))if(a[l]=!0,s==null)s=l,c=u;else{pj(u)||(o=o.append(u.content));let e=n.mapping.map(l+r.tableStart);n.delete(e,e+u.nodeSize)}}if(s==null||c==null)return!0;if(n.setNodeMarkup(s+r.tableStart,null,{...UA(c.attrs,c.attrs.colspan,r.right-r.left-c.attrs.colspan),rowspan:r.bottom-r.top}),o.size>0){let e=s+1+c.content.size,t=pj(c)?s+1:e;n.replaceWith(t+r.tableStart,e+r.tableStart,o)}n.setSelection(new GA(n.doc.resolve(s+r.tableStart))),t(n)}return!0}function gj(e,t){let n=jA(e.schema);return _j(({node:e})=>n[e.type.spec.tableRole])(e,t)}function _j(e){return(t,n)=>{let r=t.selection,i,a;if(r instanceof GA){if(r.$anchorCell.pos!=r.$headCell.pos)return!1;i=r.$anchorCell.nodeAfter,a=r.$anchorCell.pos}else{if(i=PA(r.$from),!i)return!1;a=NA(r.$from)?.pos}if(i==null||a==null||i.attrs.colspan==1&&i.attrs.rowspan==1)return!1;if(n){let o=i.attrs,s=[],c=o.colwidth;o.rowspan>1&&(o={...o,rowspan:1}),o.colspan>1&&(o={...o,colspan:1});let l=tj(t),u=t.tr;for(let e=0;e<l.right-l.left;e++)s.push(c?{...o,colwidth:c&&c[e]?[c[e]]:null}:o);let d;for(let t=l.top;t<l.bottom;t++){let n=l.map.positionAt(t,l.left,l.table);t==l.top&&(n+=i.nodeSize);for(let r=l.left,a=0;r<l.right;r++,a++)r==l.left&&t==l.top||u.insert(d=u.mapping.map(n+l.tableStart,1),e({node:i,row:t,col:r}).createAndFill(s[a]))}u.setNodeMarkup(a,e({node:i,row:l.top,col:l.left}),s[0]),r instanceof GA&&u.setSelection(new GA(u.doc.resolve(r.$anchorCell.pos),d?u.doc.resolve(d):void 0)),n(u)}return!0}}function vj(e,t){return function(n,r){if(!FA(n))return!1;let i=IA(n);if(i.nodeAfter.attrs[e]===t)return!1;if(r){let a=n.tr;n.selection instanceof GA?n.selection.forEachCell((n,r)=>{n.attrs[e]!==t&&a.setNodeMarkup(r,null,{...n.attrs,[e]:t})}):a.setNodeMarkup(i.pos,null,{...i.nodeAfter.attrs,[e]:t}),r(a)}return!0}}function yj(e){return function(t,n){if(!FA(t))return!1;if(n){let r=jA(t.schema),i=tj(t),a=t.tr,o=i.map.cellsInRect(e==`column`?{left:i.left,top:0,right:i.right,bottom:i.map.height}:e==`row`?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),s=o.map(e=>i.table.nodeAt(e));for(let e=0;e<o.length;e++)s[e].type==r.header_cell&&a.setNodeMarkup(i.tableStart+o[e],r.cell,s[e].attrs);if(a.steps.length===0)for(let e=0;e<o.length;e++)a.setNodeMarkup(i.tableStart+o[e],r.header_cell,s[e].attrs);n(a)}return!0}}function bj(e,t,n){let r=t.map.cellsInRect({left:0,top:0,right:e==`row`?t.map.width:1,bottom:e==`column`?t.map.height:1});for(let e=0;e<r.length;e++){let i=t.table.nodeAt(r[e]);if(i&&i.type!==n.header_cell)return!1}return!0}function xj(e,t){return t||={useDeprecatedLogic:!1},t.useDeprecatedLogic?yj(e):function(t,n){if(!FA(t))return!1;if(n){let r=jA(t.schema),i=tj(t),a=t.tr,o=bj(`row`,i,r),s=bj(`column`,i,r),c=(e===`column`?o:e===`row`&&s)?1:0,l=e==`column`?{left:0,top:c,right:1,bottom:i.map.height}:e==`row`?{left:c,top:0,right:i.map.width,bottom:1}:i,u=e==`column`?s?r.cell:r.header_cell:e==`row`?o?r.cell:r.header_cell:r.cell;i.map.cellsInRect(l).forEach(e=>{let t=e+i.tableStart,n=a.doc.nodeAt(t);n&&a.setNodeMarkup(t,u,n.attrs)}),n(a)}return!0}}xj(`row`,{useDeprecatedLogic:!0}),xj(`column`,{useDeprecatedLogic:!0});var Sj=xj(`cell`,{useDeprecatedLogic:!0});function Cj(e,t){if(t<0){let t=e.nodeBefore;if(t)return e.pos-t.nodeSize;for(let t=e.index(-1)-1,n=e.before();t>=0;t--){let r=e.node(-1).child(t),i=r.lastChild;if(i)return n-1-i.nodeSize;n-=r.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;let t=e.node(-1);for(let n=e.indexAfter(-1),r=e.after();n<t.childCount;n++){let e=t.child(n);if(e.childCount)return r+1;r+=e.nodeSize}}return null}function wj(e){return function(t,n){if(!FA(t))return!1;let r=Cj(IA(t),e);if(r==null)return!1;if(n){let e=t.doc.resolve(r);n(t.tr.setSelection(Nu.between(e,zA(e))).scrollIntoView())}return!0}}function Tj(e,t){let n=e.selection.$anchor;for(let r=n.depth;r>0;r--)if(n.node(r).type.spec.tableRole==`table`)return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function Ej(e,t){let n=e.selection;if(!(n instanceof GA))return!1;if(t){let r=e.tr,i=jA(e.schema).cell.createAndFill().content;n.forEachCell((e,t)=>{e.content.eq(i)||r.replace(r.mapping.map(t+1),r.mapping.map(t+e.nodeSize-1),new V(i,0,0))}),r.docChanged&&t(r)}return!0}function Dj(e){if(e.size===0)return null;let{content:t,openStart:n,openEnd:r}=e;for(;t.childCount==1&&(n>0&&r>0||t.child(0).type.spec.tableRole==`table`);)n--,r--,t=t.child(0).content;let i=t.child(0),a=i.type.spec.tableRole,o=i.type.schema,s=[];if(a==`row`)for(let e=0;e<t.childCount;e++){let i=t.child(e).content,a=e?0:Math.max(0,n-1),c=e<t.childCount-1?0:Math.max(0,r-1);(a||c)&&(i=kj(jA(o).row,new V(i,a,c)).content),s.push(i)}else if(a==`cell`||a==`header_cell`)s.push(n||r?kj(jA(o).row,new V(t,n,r)).content:t);else return null;return Oj(o,s)}function Oj(e,t){let n=[];for(let e=0;e<t.length;e++){let r=t[e];for(let t=r.childCount-1;t>=0;t--){let{rowspan:i,colspan:a}=r.child(t).attrs;for(let t=e;t<e+i;t++)n[t]=(n[t]||0)+a}}let r=0;for(let e=0;e<n.length;e++)r=Math.max(r,n[e]);for(let i=0;i<n.length;i++)if(i>=t.length&&t.push(B.empty),n[i]<r){let a=jA(e).cell.createAndFill(),o=[];for(let e=n[i];e<r;e++)o.push(a);t[i]=t[i].append(B.from(o))}return{height:t.length,width:r,rows:t}}function kj(e,t){let n=e.createAndFill();return new Du(n).replace(0,n.content.size,t).doc}function Aj({width:e,height:t,rows:n},r,i){if(e!=r){let t=[],i=[];for(let e=0;e<n.length;e++){let a=n[e],o=[];for(let n=t[e]||0,i=0;n<r;i++){let s=a.child(i%a.childCount);n+s.attrs.colspan>r&&(s=s.type.createChecked(HA(s.attrs,s.attrs.colspan,n+s.attrs.colspan-r),s.content)),o.push(s),n+=s.attrs.colspan;for(let n=1;n<s.attrs.rowspan;n++)t[e+n]=(t[e+n]||0)+s.attrs.colspan}i.push(B.from(o))}n=i,e=r}if(t!=i){let e=[];for(let r=0,a=0;r<i;r++,a++){let o=[],s=n[a%t];for(let e=0;e<s.childCount;e++){let t=s.child(e);r+t.attrs.rowspan>i&&(t=t.type.create({...t.attrs,rowspan:Math.max(1,i-t.attrs.rowspan)},t.content)),o.push(t)}e.push(B.from(o))}n=e,t=i}return{width:e,height:t,rows:n}}function jj(e,t,n,r,i,a,o){let s=e.doc.type.schema,c=jA(s),l,u;if(i>t.width)for(let a=0,s=0;a<t.height;a++){let d=n.child(a);s+=d.nodeSize;let f=[],p;p=d.lastChild==null||d.lastChild.type==c.cell?l||=c.cell.createAndFill():u||=c.header_cell.createAndFill();for(let e=t.width;e<i;e++)f.push(p);e.insert(e.mapping.slice(o).map(s-1+r),f)}if(a>t.height){let s=[];for(let e=0,r=(t.height-1)*t.width;e<Math.max(t.width,i);e++){let i=e>=t.width?!1:n.nodeAt(t.map[r+e]).type==c.header_cell;s.push(i?u||=c.header_cell.createAndFill():l||=c.cell.createAndFill())}let d=c.row.create(null,B.from(s)),f=[];for(let e=t.height;e<a;e++)f.push(d);e.insert(e.mapping.slice(o).map(r+n.nodeSize-2),f)}return!!(l||u)}function Mj(e,t,n,r,i,a,o,s){if(o==0||o==t.height)return!1;let c=!1;for(let l=i;l<a;l++){let i=o*t.width+l,a=t.map[i];if(t.map[i-t.width]==a){c=!0;let i=n.nodeAt(a),{top:u,left:d}=t.findCell(a);e.setNodeMarkup(e.mapping.slice(s).map(a+r),null,{...i.attrs,rowspan:o-u}),e.insert(e.mapping.slice(s).map(t.positionAt(o,d,n)),i.type.createAndFill({...i.attrs,rowspan:u+i.attrs.rowspan-o})),l+=i.attrs.colspan-1}}return c}function Nj(e,t,n,r,i,a,o,s){if(o==0||o==t.width)return!1;let c=!1;for(let l=i;l<a;l++){let i=l*t.width+o,a=t.map[i];if(t.map[i-1]==a){c=!0;let i=n.nodeAt(a),u=t.colCount(a),d=e.mapping.slice(s).map(a+r);e.setNodeMarkup(d,null,HA(i.attrs,o-u,i.attrs.colspan-(o-u))),e.insert(d+i.nodeSize,i.type.createAndFill(HA(i.attrs,0,o-u))),l+=i.attrs.rowspan-1}}return c}function Pj(e,t,n,r,i){let a=n?e.doc.nodeAt(n-1):e.doc;if(!a)throw Error(`No table found`);let o=EA.get(a),{top:s,left:c}=r,l=c+i.width,u=s+i.height,d=e.tr,f=0;function p(){if(a=n?d.doc.nodeAt(n-1):d.doc,!a)throw Error(`No table found`);o=EA.get(a),f=d.mapping.maps.length}jj(d,o,a,n,l,u,f)&&p(),Mj(d,o,a,n,c,l,s,f)&&p(),Mj(d,o,a,n,c,l,u,f)&&p(),Nj(d,o,a,n,s,u,c,f)&&p(),Nj(d,o,a,n,s,u,l,f)&&p();for(let e=s;e<u;e++){let t=o.positionAt(e,c,a),r=o.positionAt(e,l,a);d.replace(d.mapping.slice(f).map(t+n),d.mapping.slice(f).map(r+n),new V(i.rows[e-s],0,0))}p(),d.setSelection(new GA(d.doc.resolve(n+o.positionAt(s,c,a)),d.doc.resolve(n+o.positionAt(u-1,l-1,a)))),t(d)}var Fj=yg({ArrowLeft:Lj(`horiz`,-1),ArrowRight:Lj(`horiz`,1),ArrowUp:Lj(`vert`,-1),ArrowDown:Lj(`vert`,1),"Shift-ArrowLeft":Rj(`horiz`,-1),"Shift-ArrowRight":Rj(`horiz`,1),"Shift-ArrowUp":Rj(`vert`,-1),"Shift-ArrowDown":Rj(`vert`,1),Backspace:Ej,"Mod-Backspace":Ej,Delete:Ej,"Mod-Delete":Ej});function Ij(e,t,n){return n.eq(e.selection)?!1:(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function Lj(e,t){return(n,r,i)=>{if(!i)return!1;let a=n.selection;if(a instanceof GA)return Ij(n,r,ku.near(a.$headCell,t));if(e!=`horiz`&&!a.empty)return!1;let o=Hj(i,e,t);if(o==null)return!1;if(e==`horiz`)return Ij(n,r,ku.near(n.doc.resolve(a.head+t),t));{let i=n.doc.resolve(o),a=VA(i,e,t),s;return s=a?ku.near(a,1):t<0?ku.near(n.doc.resolve(i.before(-1)),-1):ku.near(n.doc.resolve(i.after(-1)),1),Ij(n,r,s)}}}function Rj(e,t){return(n,r,i)=>{if(!i)return!1;let a=n.selection,o;if(a instanceof GA)o=a;else{let r=Hj(i,e,t);if(r==null)return!1;o=new GA(n.doc.resolve(r))}let s=VA(o.$headCell,e,t);return s?Ij(n,r,new GA(o.$anchorCell,s)):!1}}function zj(e,t){let n=e.state.doc,r=NA(n.resolve(t));return r?(e.dispatch(e.state.tr.setSelection(new GA(r))),!0):!1}function Bj(e,t,n){if(!FA(e.state))return!1;let r=Dj(n),i=e.state.selection;if(i instanceof GA){r||={width:1,height:1,rows:[B.from(kj(jA(e.state.schema).cell,n))]};let t=i.$anchorCell.node(-1),a=i.$anchorCell.start(-1),o=EA.get(t).rectBetween(i.$anchorCell.pos-a,i.$headCell.pos-a);return r=Aj(r,o.right-o.left,o.bottom-o.top),Pj(e.state,e.dispatch,a,o,r),!0}else if(r){let t=IA(e.state),n=t.start(-1);return Pj(e.state,e.dispatch,n,EA.get(t.node(-1)).findCell(t.pos-n),r),!0}else return!1}function Vj(e,t){if(t.button!=0||t.ctrlKey||t.metaKey)return;let n=Uj(e,t.target),r;if(t.shiftKey&&e.state.selection instanceof GA)i(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&n&&(r=NA(e.state.selection.$anchor))!=null&&Wj(e,t)?.pos!=r.pos)i(r,t),t.preventDefault();else if(!n)return;function i(t,n){let r=Wj(e,n),i=MA.getState(e.state)==null;if(!r||!BA(t,r))if(i)r=t;else return;let a=new GA(t,r);if(i||!e.state.selection.eq(a)){let n=e.state.tr.setSelection(a);i&&n.setMeta(MA,t.pos),e.dispatch(n)}}function a(){e.root.removeEventListener(`mouseup`,a),e.root.removeEventListener(`dragstart`,a),e.root.removeEventListener(`mousemove`,o),MA.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta(MA,-1))}function o(r){let o=r,s=MA.getState(e.state),c;if(s!=null)c=e.state.doc.resolve(s);else if(Uj(e,o.target)!=n&&(c=Wj(e,t),!c))return a();c&&i(c,o)}e.root.addEventListener(`mouseup`,a),e.root.addEventListener(`dragstart`,a),e.root.addEventListener(`mousemove`,o)}function Hj(e,t,n){if(!(e.state.selection instanceof Nu))return null;let{$head:r}=e.state.selection;for(let i=r.depth-1;i>=0;i--){let a=r.node(i);if((n<0?r.index(i):r.indexAfter(i))!=(n<0?0:a.childCount))return null;if(a.type.spec.tableRole==`cell`||a.type.spec.tableRole==`header_cell`){let a=r.before(i),o=t==`vert`?n>0?`down`:`up`:n>0?`right`:`left`;return e.endOfTextblock(o)?a:null}}return null}function Uj(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName==`TD`||t.nodeName==`TH`)return t;return null}function Wj(e,t){let n=e.posAtCoords({left:t.clientX,top:t.clientY});if(!n)return null;let{inside:r,pos:i}=n;return r>=0&&NA(e.state.doc.resolve(r))||NA(e.state.doc.resolve(i))}var Gj=class{constructor(e,t){this.node=e,this.defaultCellMinWidth=t,this.dom=document.createElement(`div`),this.dom.className=`tableWrapper`,this.table=this.dom.appendChild(document.createElement(`table`)),this.table.style.setProperty(`--default-cell-min-width`,`${t}px`),this.colgroup=this.table.appendChild(document.createElement(`colgroup`)),Kj(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement(`tbody`))}update(e){return e.type==this.node.type?(this.node=e,Kj(e,this.colgroup,this.table,this.defaultCellMinWidth),!0):!1}ignoreMutation(e){return e.type==`attributes`&&(e.target==this.table||this.colgroup.contains(e.target))}};function Kj(e,t,n,r,i,a){let o=0,s=!0,c=t.firstChild,l=e.firstChild;if(l){for(let e=0,n=0;e<l.childCount;e++){let{colspan:u,colwidth:d}=l.child(e).attrs;for(let e=0;e<u;e++,n++){let l=i==n?a:d&&d[e],u=l?l+`px`:``;if(o+=l||r,l||(s=!1),c)c.style.width!=u&&(c.style.width=u),c=c.nextSibling;else{let e=document.createElement(`col`);e.style.width=u,t.appendChild(e)}}}for(;c;){var u;let e=c.nextSibling;(u=c.parentNode)==null||u.removeChild(c),c=e}s?(n.style.width=o+`px`,n.style.minWidth=``):(n.style.width=``,n.style.minWidth=o+`px`)}}var qj=new ed(`tableColumnResizing`);function Jj({handleWidth:e=5,cellMinWidth:t=25,defaultCellMinWidth:n=100,View:r=Gj,lastColumnResizable:i=!0}={}){let a=new Zu({key:qj,state:{init(e,t){var i;let o=(i=a.spec)==null||(i=i.props)==null?void 0:i.nodeViews,s=jA(t.schema).table.name;return r&&o&&(o[s]=(e,t)=>new r(e,n,t)),new Yj(-1,!1)},apply(e,t){return t.apply(e)}},props:{attributes:e=>{let t=qj.getState(e);return t&&t.activeHandle>-1?{class:`resize-cursor`}:{}},handleDOMEvents:{mousemove:(t,n)=>{Xj(t,n,e,i)},mouseleave:e=>{Zj(e)},mousedown:(e,r)=>{Qj(e,r,t,n)}},decorations:e=>{let t=qj.getState(e);if(t&&t.activeHandle>-1)return sM(e,t.activeHandle)},nodeViews:{}}});return a}var Yj=class e{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(t){let n=this,r=t.getMeta(qj);if(r&&r.setHandle!=null)return new e(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new e(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&t.docChanged){let r=t.mapping.map(n.activeHandle,-1);return RA(t.doc.resolve(r))||(r=-1),new e(r,n.dragging)}return n}};function Xj(e,t,n,r){if(!e.editable)return;let i=qj.getState(e.state);if(i&&!i.dragging){let a=eM(t.target),o=-1;if(a){let{left:r,right:i}=a.getBoundingClientRect();t.clientX-r<=n?o=tM(e,t,`left`,n):i-t.clientX<=n&&(o=tM(e,t,`right`,n))}if(o!=i.activeHandle){if(!r&&o!==-1){let t=e.state.doc.resolve(o),n=t.node(-1),r=EA.get(n),i=t.start(-1);if(r.colCount(t.pos-i)+t.nodeAfter.attrs.colspan-1==r.width-1)return}rM(e,o)}}}function Zj(e){if(!e.editable)return;let t=qj.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&rM(e,-1)}function Qj(e,t,n,r){if(!e.editable)return!1;let i=e.dom.ownerDocument.defaultView??window,a=qj.getState(e.state);if(!a||a.activeHandle==-1||a.dragging)return!1;let o=e.state.doc.nodeAt(a.activeHandle),s=$j(e,a.activeHandle,o.attrs);e.dispatch(e.state.tr.setMeta(qj,{setDragging:{startX:t.clientX,startWidth:s}}));function c(t){i.removeEventListener(`mouseup`,c),i.removeEventListener(`mousemove`,l);let r=qj.getState(e.state);r?.dragging&&(iM(e,r.activeHandle,nM(r.dragging,t,n)),e.dispatch(e.state.tr.setMeta(qj,{setDragging:null})))}function l(t){if(!t.which)return c(t);let i=qj.getState(e.state);if(i&&i.dragging){let a=nM(i.dragging,t,n);aM(e,i.activeHandle,a,r)}}return aM(e,a.activeHandle,s,r),i.addEventListener(`mouseup`,c),i.addEventListener(`mousemove`,l),t.preventDefault(),!0}function $j(e,t,{colspan:n,colwidth:r}){let i=r&&r[r.length-1];if(i)return i;let a=e.domAtPos(t),o=a.node.childNodes[a.offset].offsetWidth,s=n;if(r)for(let e=0;e<n;e++)r[e]&&(o-=r[e],s--);return o/s}function eM(e){for(;e&&e.nodeName!=`TD`&&e.nodeName!=`TH`;)e=e.classList&&e.classList.contains(`ProseMirror`)?null:e.parentNode;return e}function tM(e,t,n,r){let i=n==`right`?-r:r,a=e.posAtCoords({left:t.clientX+i,top:t.clientY});if(!a)return-1;let{pos:o}=a,s=NA(e.state.doc.resolve(o));if(!s)return-1;if(n==`right`)return s.pos;let c=EA.get(s.node(-1)),l=s.start(-1),u=c.map.indexOf(s.pos-l);return u%c.width==0?-1:l+c.map[u-1]}function nM(e,t,n){let r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function rM(e,t){e.dispatch(e.state.tr.setMeta(qj,{setHandle:t}))}function iM(e,t,n){let r=e.state.doc.resolve(t),i=r.node(-1),a=EA.get(i),o=r.start(-1),s=a.colCount(r.pos-o)+r.nodeAfter.attrs.colspan-1,c=e.state.tr;for(let e=0;e<a.height;e++){let t=e*a.width+s;if(e&&a.map[t]==a.map[t-a.width])continue;let r=a.map[t],l=i.nodeAt(r).attrs,u=l.colspan==1?0:s-a.colCount(r);if(l.colwidth&&l.colwidth[u]==n)continue;let d=l.colwidth?l.colwidth.slice():oM(l.colspan);d[u]=n,c.setNodeMarkup(o+r,null,{...l,colwidth:d})}c.docChanged&&e.dispatch(c)}function aM(e,t,n,r){let i=e.state.doc.resolve(t),a=i.node(-1),o=i.start(-1),s=EA.get(a).colCount(i.pos-o)+i.nodeAfter.attrs.colspan-1,c=e.domAtPos(i.start(-1)).node;for(;c&&c.nodeName!=`TABLE`;)c=c.parentNode;c&&Kj(a,c.firstChild,c,r,s,n)}function oM(e){return Array(e).fill(0)}function sM(e,t){let n=[],r=e.doc.resolve(t),i=r.node(-1);if(!i)return vh.empty;let a=EA.get(i),o=r.start(-1),s=a.colCount(r.pos-o)+r.nodeAfter.attrs.colspan-1;for(let t=0;t<a.height;t++){let r=s+t*a.width;if((s==a.width-1||a.map[r]!=a.map[r+1])&&(t==0||a.map[r]!=a.map[r-a.width])){let t=a.map[r],s=o+t+i.nodeAt(t).nodeSize-1,c=document.createElement(`div`);c.className=`column-resize-handle`,qj.getState(e)?.dragging&&n.push(hh.node(o+t,o+t+i.nodeAt(t).nodeSize,{class:`column-resize-dragging`})),n.push(hh.widget(s,c))}}return vh.create(e.doc,n)}function cM({allowTableNodeSelection:e=!1}={}){return new Zu({key:MA,state:{init(){return null},apply(e,t){let n=e.getMeta(MA);if(n!=null)return n==-1?null:n;if(t==null||!e.docChanged)return t;let{deleted:r,pos:i}=e.mapping.mapResult(t);return r?null:i}},props:{decorations:qA,handleDOMEvents:{mousedown:Vj},createSelectionBetween(e){return MA.getState(e.state)==null?null:e.state.selection},handleTripleClick:zj,handleKeyDown:Fj,handlePaste:Bj},appendTransaction(t,n,r){return XA(r,$A(r,n),e)}})}function lM(e){return e===`left`||e===`right`||e===`center`?e:null}function uM(e){let t=(e.style.textAlign||``).trim().toLowerCase(),n=(e.getAttribute(`align`)||``).trim().toLowerCase();return lM(t||n)}function dM(e){return lM(e?.align)}function fM(){return{default:null,parseHTML:e=>uM(e),renderHTML:e=>e.align?{style:`text-align: ${e.align}`}:{}}}var pM=Zy.create({name:`tableCell`,addOptions(){return{HTMLAttributes:{}}},content:`block+`,addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{let t=e.getAttribute(`colwidth`),n=t?t.split(`,`).map(e=>parseInt(e,10)):null;if(!n){let t=e.closest(`table`)?.querySelectorAll(`colgroup > col`),n=Array.from(e.parentElement?.children||[]).indexOf(e);if(n&&n>-1&&t&&t[n]){let e=t[n].getAttribute(`width`);return e?[parseInt(e,10)]:null}}return n}},align:fM()}},tableRole:`cell`,isolating:!0,parseHTML(){return[{tag:`td`}]},renderHTML({HTMLAttributes:e}){return[`td`,Z_(this.options.HTMLAttributes,e),0]}}),mM=Zy.create({name:`tableHeader`,addOptions(){return{HTMLAttributes:{}}},content:`block+`,addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{let t=e.getAttribute(`colwidth`);return t?t.split(`,`).map(e=>parseInt(e,10)):null}},align:fM()}},tableRole:`header_cell`,isolating:!0,parseHTML(){return[{tag:`th`}]},renderHTML({HTMLAttributes:e}){return[`th`,Z_(this.options.HTMLAttributes,e),0]}}),hM=Zy.create({name:`tableRow`,addOptions(){return{HTMLAttributes:{}}},content:`(tableCell | tableHeader)*`,tableRole:`row`,parseHTML(){return[{tag:`tr`}]},renderHTML({HTMLAttributes:e}){return[`tr`,Z_(this.options.HTMLAttributes,e),0]}});function gM(e,t){return t?[`width`,`${Math.max(t,e)}px`]:[`min-width`,`${e}px`]}function _M(e,t,n,r,i,a){var o;let s=0,c=!0,l=t.firstChild,u=e.firstChild;if(u!==null)for(let e=0,n=0;e<u.childCount;e+=1){let{colspan:o,colwidth:d}=u.child(e).attrs;for(let e=0;e<o;e+=1,n+=1){let o=i===n?a:d&&d[e],u=o?`${o}px`:``;if(s+=o||r,o||(c=!1),l){if(l.style.width!==u){let[e,t]=gM(r,o);l.style.setProperty(e,t)}l=l.nextSibling}else{let e=document.createElement(`col`),[n,i]=gM(r,o);e.style.setProperty(n,i),t.appendChild(e)}}}for(;l;){let e=l.nextSibling;(o=l.parentNode)==null||o.removeChild(l),l=e}let d=e.attrs.style&&typeof e.attrs.style==`string`&&/\bwidth\s*:/i.test(e.attrs.style);c&&!d?(n.style.width=`${s}px`,n.style.minWidth=``):(n.style.width=``,n.style.minWidth=`${s}px`)}var vM=class{constructor(e,t){this.node=e,this.cellMinWidth=t,this.dom=document.createElement(`div`),this.dom.className=`tableWrapper`,this.table=this.dom.appendChild(document.createElement(`table`)),e.attrs.style&&(this.table.style.cssText=e.attrs.style),this.colgroup=this.table.appendChild(document.createElement(`colgroup`)),_M(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement(`tbody`))}update(e){return e.type===this.node.type?(this.node=e,_M(e,this.colgroup,this.table,this.cellMinWidth),!0):!1}ignoreMutation(e){let t=e.target,n=this.dom.contains(t),r=this.contentDOM.contains(t);return!!(n&&!r&&(e.type===`attributes`||e.type===`childList`||e.type===`characterData`))}};function yM(e,t,n,r){let i=0,a=!0,o=[],s=e.firstChild;if(!s)return{};for(let e=0,c=0;e<s.childCount;e+=1){let{colspan:l,colwidth:u}=s.child(e).attrs;for(let e=0;e<l;e+=1,c+=1){let s=n===c?r:u&&u[e];i+=s||t,s||(a=!1);let[l,d]=gM(t,s);o.push([`col`,{style:`${l}: ${d}`}])}}let c=a?`${i}px`:``,l=a?``:`${i}px`;return{colgroup:[`colgroup`,{},...o],tableWidth:c,tableMinWidth:l}}function bM(e,t){return t?e.createChecked(null,t):e.createAndFill()}function xM(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;let t={};return Object.keys(e.nodes).forEach(n=>{let r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)}),e.cached.tableNodeTypes=t,t}function SM(e,t,n,r,i){let a=xM(e),o=[],s=[];for(let e=0;e<n;e+=1){let e=bM(a.cell,i);if(e&&s.push(e),r){let e=bM(a.header_cell,i);e&&o.push(e)}}let c=[];for(let e=0;e<t;e+=1)c.push(a.row.createChecked(null,r&&e===0?o:s));return a.table.createChecked(null,c)}function CM(e){return e instanceof GA}var wM=({editor:e})=>{let{selection:t}=e.state;if(!CM(t))return!1;let n=0;return B_(t.ranges[0].$from,e=>e.type.name===`table`)?.node.descendants(e=>{if(e.type.name===`table`)return!1;[`tableCell`,`tableHeader`].includes(e.type.name)&&(n+=1)}),n===t.ranges.length?(e.commands.deleteTable(),!0):!1};function TM(e){return(e||``).replace(/\s+/g,` `).trim()}function EM(e,t,n={}){let r=n.cellLineSeparator??``;if(!e||!e.content||e.content.length===0)return``;let i=[];e.content.forEach(e=>{let n=[];e.content&&e.content.forEach(e=>{let i=``;i=e.content&&Array.isArray(e.content)&&e.content.length>1?e.content.map(e=>t.renderChildren(e)).join(r):e.content?t.renderChildren(e.content):``;let a=TM(i),o=e.type===`tableHeader`,s=dM(e.attrs);n.push({text:a,isHeader:o,align:s})}),i.push(n)});let a=i.reduce((e,t)=>Math.max(e,t.length),0);if(a===0)return``;let o=Array(a).fill(0);i.forEach(e=>{for(let t=0;t<a;t+=1){let n=(e[t]?.text||``).length;n>o[t]&&(o[t]=n),o[t]<3&&(o[t]=3)}});let s=(e,t)=>e+` `.repeat(Math.max(0,t-e.length)),c=i[0],l=c.some(e=>e.isHeader),u=Array(a).fill(null);i.forEach(e=>{for(let t=0;t<a;t+=1)!u[t]&&e[t]?.align&&(u[t]=e[t].align)});let d=`
|
|
232
|
+
`,f=Array(a).fill(0).map((e,t)=>l&&c[t]&&c[t].text||``);return d+=`| ${f.map((e,t)=>s(e,o[t])).join(` | `)} |
|
|
233
|
+
`,d+=`| ${o.map((e,t)=>{let n=Math.max(3,e),r=u[t];return r===`left`?`:${`-`.repeat(n)}`:r===`right`?`${`-`.repeat(n)}:`:r===`center`?`:${`-`.repeat(n)}:`:`-`.repeat(n)}).join(` | `)} |
|
|
234
|
+
`,(l?i.slice(1):i).forEach(e=>{d+=`| ${Array(a).fill(0).map((t,n)=>s(e[n]&&e[n].text||``,o[n])).join(` | `)} |
|
|
235
|
+
`}),d}var DM=EM,OM=Zy.create({name:`table`,addOptions(){return{HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:vM,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:`tableRow+`,tableRole:`table`,isolating:!0,group:`block`,parseHTML(){return[{tag:`table`}]},renderHTML({node:e,HTMLAttributes:t}){let{colgroup:n,tableWidth:r,tableMinWidth:i}=yM(e,this.options.cellMinWidth),a=t.style;function o(){return a||(r?`width: ${r}`:`min-width: ${i}`)}let s=[`table`,Z_(this.options.HTMLAttributes,t,{style:o()}),n,[`tbody`,0]];return this.options.renderWrapper?[`div`,{class:`tableWrapper`},s]:s},parseMarkdown:(e,t)=>{let n=[],r=Array.isArray(e.align)?e.align:[];if(e.header){let i=[];e.header.forEach((e,n)=>{let a=lM(r[n]??e.align),o=a?{align:a}:{};i.push(t.createNode(`tableHeader`,o,[{type:`paragraph`,content:t.parseInline(e.tokens)}]))}),n.push(t.createNode(`tableRow`,{},i))}return e.rows&&e.rows.forEach(e=>{let i=[];e.forEach((e,n)=>{let a=lM(r[n]??e.align),o=a?{align:a}:{};i.push(t.createNode(`tableCell`,o,[{type:`paragraph`,content:t.parseInline(e.tokens)}]))}),n.push(t.createNode(`tableRow`,{},i))}),t.createNode(`table`,void 0,n)},renderMarkdown:(e,t)=>DM(e,t),addCommands(){return{insertTable:({rows:e=3,cols:t=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:i,editor:a})=>{let o=SM(a.schema,e,t,n);if(i){let e=r.selection.from+1;r.replaceSelectionWith(o).scrollIntoView().setSelection(Nu.near(r.doc.resolve(e)))}return!0},addColumnBefore:()=>({state:e,dispatch:t})=>rj(e,t),addColumnAfter:()=>({state:e,dispatch:t})=>ij(e,t),deleteColumn:()=>({state:e,dispatch:t})=>oj(e,t),addRowBefore:()=>({state:e,dispatch:t})=>lj(e,t),addRowAfter:()=>({state:e,dispatch:t})=>uj(e,t),deleteRow:()=>({state:e,dispatch:t})=>fj(e,t),deleteTable:()=>({state:e,dispatch:t})=>Tj(e,t),mergeCells:()=>({state:e,dispatch:t})=>hj(e,t),splitCell:()=>({state:e,dispatch:t})=>gj(e,t),toggleHeaderColumn:()=>({state:e,dispatch:t})=>xj(`column`)(e,t),toggleHeaderRow:()=>({state:e,dispatch:t})=>xj(`row`)(e,t),toggleHeaderCell:()=>({state:e,dispatch:t})=>Sj(e,t),mergeOrSplit:()=>({state:e,dispatch:t})=>hj(e,t)?!0:gj(e,t),setCellAttribute:(e,t)=>({state:n,dispatch:r})=>vj(e,t)(n,r),goToNextCell:()=>({state:e,dispatch:t})=>wj(1)(e,t),goToPreviousCell:()=>({state:e,dispatch:t})=>wj(-1)(e,t),fixTables:()=>({state:e,dispatch:t})=>(t&&$A(e),!0),setCellSelection:e=>({tr:t,dispatch:n})=>{if(n){let n=GA.create(t.doc,e.anchorCell,e.headCell);t.setSelection(n)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:wM,"Mod-Backspace":wM,Delete:wM,"Mod-Delete":wM}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[Jj({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],cM({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(e){return{tableRole:K_(H_(e,`tableRole`,{name:e.name,options:e.options,storage:e.storage}))}}});my.create({name:`tableKit`,addExtensions(){let e=[];return this.options.table!==!1&&e.push(OM.configure(this.options.table)),this.options.tableCell!==!1&&e.push(pM.configure(this.options.tableCell)),this.options.tableHeader!==!1&&e.push(mM.configure(this.options.tableHeader)),this.options.tableRow!==!1&&e.push(hM.configure(this.options.tableRow)),e}});var kM=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,AM=Zy.create({name:`image`,addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{},resize:!1}},inline(){return this.options.inline},group(){return this.options.inline?`inline`:`block`},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?`img[src]`:`img[src]:not([src^="data:"])`}]},renderHTML({HTMLAttributes:e}){return[`img`,Z_(this.options.HTMLAttributes,e)]},parseMarkdown:(e,t)=>t.createNode(`image`,{src:e.href,title:e.title,alt:e.text}),renderMarkdown:e=>{let t=e.attrs?.src??``,n=e.attrs?.alt??``,r=e.attrs?.title??``;return r?``:``},addNodeView(){if(!this.options.resize||!this.options.resize.enabled||typeof document>`u`)return null;let{directions:e,minWidth:t,minHeight:n,alwaysPreserveAspectRatio:r}=this.options.resize;return({node:i,getPos:a,HTMLAttributes:o,editor:s})=>{let c=document.createElement(`img`);Object.entries(o).forEach(([e,t])=>{if(t!=null)switch(e){case`width`:case`height`:break;default:c.setAttribute(e,t);break}}),c.src=o.src;let l=new Iy({element:c,editor:s,node:i,getPos:a,onResize:(e,t)=>{c.style.width=`${e}px`,c.style.height=`${t}px`},onCommit:(e,t)=>{let n=a();n!==void 0&&this.editor.chain().setNodeSelection(n).updateAttributes(this.name,{width:e,height:t}).run()},onUpdate:(e,t,n)=>e.type===i.type,options:{directions:e,min:{width:t,height:n},preserveAspectRatio:r===!0}}),u=l.dom;return u.style.visibility=`hidden`,u.style.pointerEvents=`none`,c.onload=()=>{u.style.visibility=``,u.style.pointerEvents=``},l}},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[jy({find:kM,type:this.type,getAttributes:e=>{let[,,t,n,r]=e;return{src:n,alt:t,title:r}}})]}}),jM=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,MM=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,NM=iy.create({name:`highlight`,addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:e=>e.getAttribute(`data-color`)||e.style.backgroundColor,renderHTML:e=>e.color?{"data-color":e.color,style:`background-color: ${e.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:`mark`}]},renderHTML({HTMLAttributes:e}){return[`mark`,Z_(this.options.HTMLAttributes,e),0]},renderMarkdown:(e,t)=>`==${t.renderChildren(e)}==`,parseMarkdown:(e,t)=>t.applyMark(`highlight`,t.parseInline(e.tokens||[])),markdownTokenizer:{name:`highlight`,level:`inline`,start:e=>e.indexOf(`==`),tokenize(e,t,n){let r=/^(==)([^=]+)(==)/.exec(e);if(r){let e=r[2].trim(),t=n.inlineTokens(e);return{type:`highlight`,raw:r[0],text:e,tokens:t}}}},addCommands(){return{setHighlight:e=>({commands:t})=>t.setMark(this.name,e),toggleHighlight:e=>({commands:t})=>t.toggleMark(this.name,e),unsetHighlight:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[Ay({find:jM,type:this.type})]},addPasteRules(){return[$y({find:MM,type:this.type})]}}),PM=e=>Ny({find:/--$/,replace:e??`—`}),FM=e=>Ny({find:/\.\.\.$/,replace:e??`…`}),IM=e=>Ny({find:/(?:^|[\s{[(<'"\u2018\u201C])(")$/,replace:e??`“`}),LM=e=>Ny({find:/"$/,replace:e??`”`}),RM=e=>Ny({find:/(?:^|[\s{[(<'"\u2018\u201C])(')$/,replace:e??`‘`}),zM=e=>Ny({find:/'$/,replace:e??`’`}),BM=e=>Ny({find:/<-$/,replace:e??`←`}),VM=e=>Ny({find:/->$/,replace:e??`→`}),HM=e=>Ny({find:/\(c\)$/,replace:e??`©`}),UM=e=>Ny({find:/\(tm\)$/,replace:e??`™`}),WM=e=>Ny({find:/\(sm\)$/,replace:e??`℠`}),GM=e=>Ny({find:/\(r\)$/,replace:e??`®`}),KM=e=>Ny({find:/(?:^|\s)(1\/2)\s$/,replace:e??`½`}),qM=e=>Ny({find:/\+\/-$/,replace:e??`±`}),JM=e=>Ny({find:/!=$/,replace:e??`≠`}),YM=e=>Ny({find:/<<$/,replace:e??`«`}),XM=e=>Ny({find:/>>$/,replace:e??`»`}),ZM=e=>Ny({find:/\d+\s?([*x])\s?\d+$/,replace:e??`×`}),QM=e=>Ny({find:/\^2$/,replace:e??`²`}),$M=e=>Ny({find:/\^3$/,replace:e??`³`}),eN=e=>Ny({find:/(?:^|\s)(1\/4)\s$/,replace:e??`¼`}),tN=e=>Ny({find:/(?:^|\s)(3\/4)\s$/,replace:e??`¾`}),nN=my.create({name:`typography`,addOptions(){return{closeDoubleQuote:`”`,closeSingleQuote:`’`,copyright:`©`,ellipsis:`…`,emDash:`—`,laquo:`«`,leftArrow:`←`,multiplication:`×`,notEqual:`≠`,oneHalf:`½`,oneQuarter:`¼`,openDoubleQuote:`“`,openSingleQuote:`‘`,plusMinus:`±`,raquo:`»`,registeredTrademark:`®`,rightArrow:`→`,servicemark:`℠`,superscriptThree:`³`,superscriptTwo:`²`,threeQuarters:`¾`,trademark:`™`}},addInputRules(){let e=[];this.options.emDash!==!1&&e.push(PM(this.options.emDash)),this.options.ellipsis!==!1&&e.push(FM(this.options.ellipsis));let t=this.editor.options.textDirection===`rtl`;if(this.options.doubleQuotes?.rtl){let{open:t,close:n}=this.options.doubleQuotes.rtl;e.push(IM(t)),e.push(LM(n))}else t?(e.push(IM(`”`)),e.push(LM(`“`))):(this.options.openDoubleQuote!==!1&&e.push(IM(this.options.openDoubleQuote)),this.options.closeDoubleQuote!==!1&&e.push(LM(this.options.closeDoubleQuote)));if(this.options.singleQuotes?.rtl){let{open:t,close:n}=this.options.singleQuotes.rtl;e.push(RM(t)),e.push(zM(n))}else t?(e.push(RM(`’`)),e.push(zM(`‘`))):(this.options.openSingleQuote!==!1&&e.push(RM(this.options.openSingleQuote)),this.options.closeSingleQuote!==!1&&e.push(zM(this.options.closeSingleQuote)));return this.options.leftArrow!==!1&&e.push(BM(this.options.leftArrow)),this.options.rightArrow!==!1&&e.push(VM(this.options.rightArrow)),this.options.copyright!==!1&&e.push(HM(this.options.copyright)),this.options.trademark!==!1&&e.push(UM(this.options.trademark)),this.options.servicemark!==!1&&e.push(WM(this.options.servicemark)),this.options.registeredTrademark!==!1&&e.push(GM(this.options.registeredTrademark)),this.options.oneHalf!==!1&&e.push(KM(this.options.oneHalf)),this.options.plusMinus!==!1&&e.push(qM(this.options.plusMinus)),this.options.notEqual!==!1&&e.push(JM(this.options.notEqual)),this.options.laquo!==!1&&e.push(YM(this.options.laquo)),this.options.raquo!==!1&&e.push(XM(this.options.raquo)),this.options.multiplication!==!1&&e.push(ZM(this.options.multiplication)),this.options.superscriptTwo!==!1&&e.push(QM(this.options.superscriptTwo)),this.options.superscriptThree!==!1&&e.push($M(this.options.superscriptThree)),this.options.oneQuarter!==!1&&e.push(eN(this.options.oneQuarter)),this.options.threeQuarters!==!1&&e.push(tN(this.options.threeQuarters)),e}});function rN(e){let t=e.regex,n=e.COMMENT(`//`,`$`,{contains:[{begin:/\\\n/}]}),r=`decltype\\(auto\\)`,i=`[a-zA-Z_]\\w*::`,a=`(?!struct)(`+r+`|`+t.optional(i)+`[a-zA-Z_]\\w*`+t.optional(`<[^<>]+>`)+`)`,o={className:`type`,begin:`\\b[a-z\\d_]*_t\\b`},s={className:`string`,variants:[{begin:`(u8?|U|L)?"`,end:`"`,illegal:`\\n`,contains:[e.BACKSLASH_ESCAPE]},{begin:`(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)`,end:`'`,illegal:`.`},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:`number`,variants:[{begin:`[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)`},{begin:`[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)`}],relevance:0},l={className:`meta`,begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:`if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include`},contains:[{begin:/\\\n/,relevance:0},e.inherit(s,{className:`string`}),{className:`string`,begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},u={className:`title`,begin:t.optional(i)+e.IDENT_RE,relevance:0},d=t.optional(i)+e.IDENT_RE+`\\s*\\(`,f=`alignas.alignof.and.and_eq.asm.atomic_cancel.atomic_commit.atomic_noexcept.auto.bitand.bitor.break.case.catch.class.co_await.co_return.co_yield.compl.concept.const_cast|10.consteval.constexpr.constinit.continue.decltype.default.delete.do.dynamic_cast|10.else.enum.explicit.export.extern.false.final.for.friend.goto.if.import.inline.module.mutable.namespace.new.noexcept.not.not_eq.nullptr.operator.or.or_eq.override.private.protected.public.reflexpr.register.reinterpret_cast|10.requires.return.sizeof.static_assert.static_cast|10.struct.switch.synchronized.template.this.thread_local.throw.transaction_safe.transaction_safe_dynamic.true.try.typedef.typeid.typename.union.using.virtual.volatile.while.xor.xor_eq`.split(`.`),p=[`bool`,`char`,`char16_t`,`char32_t`,`char8_t`,`double`,`float`,`int`,`long`,`short`,`void`,`wchar_t`,`unsigned`,`signed`,`const`,`static`],m=`any.auto_ptr.barrier.binary_semaphore.bitset.complex.condition_variable.condition_variable_any.counting_semaphore.deque.false_type.flat_map.flat_set.future.imaginary.initializer_list.istringstream.jthread.latch.lock_guard.multimap.multiset.mutex.optional.ostringstream.packaged_task.pair.promise.priority_queue.queue.recursive_mutex.recursive_timed_mutex.scoped_lock.set.shared_future.shared_lock.shared_mutex.shared_timed_mutex.shared_ptr.stack.string_view.stringstream.timed_mutex.thread.true_type.tuple.unique_lock.unique_ptr.unordered_map.unordered_multimap.unordered_multiset.unordered_set.variant.vector.weak_ptr.wstring.wstring_view`.split(`.`),h=`abort.abs.acos.apply.as_const.asin.atan.atan2.calloc.ceil.cerr.cin.clog.cos.cosh.cout.declval.endl.exchange.exit.exp.fabs.floor.fmod.forward.fprintf.fputs.free.frexp.fscanf.future.invoke.isalnum.isalpha.iscntrl.isdigit.isgraph.islower.isprint.ispunct.isspace.isupper.isxdigit.labs.launder.ldexp.log.log10.make_pair.make_shared.make_shared_for_overwrite.make_tuple.make_unique.malloc.memchr.memcmp.memcpy.memset.modf.move.pow.printf.putchar.puts.realloc.scanf.sin.sinh.snprintf.sprintf.sqrt.sscanf.std.stderr.stdin.stdout.strcat.strchr.strcmp.strcpy.strcspn.strlen.strncat.strncmp.strncpy.strpbrk.strrchr.strspn.strstr.swap.tan.tanh.terminate.to_underlying.tolower.toupper.vfprintf.visit.vprintf.vsprintf`.split(`.`),g={type:p,keyword:f,literal:[`NULL`,`false`,`nullopt`,`nullptr`,`true`],built_in:[`_Pragma`],_type_hints:m},_={className:`function.dispatch`,relevance:0,keywords:{_hint:h},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},v=[_,l,o,n,e.C_BLOCK_COMMENT_MODE,c,s],y={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:`new throw return else`,end:/;/}],keywords:g,contains:v.concat([{begin:/\(/,end:/\)/,keywords:g,contains:v.concat([`self`]),relevance:0}]),relevance:0},b={className:`function`,begin:`(`+a+`[\\*&\\s]+)+`+d,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:g,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:g,relevance:0},{begin:d,returnBegin:!0,contains:[u],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[s,c]},{relevance:0,match:/,/},{className:`params`,begin:/\(/,end:/\)/,keywords:g,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,s,c,o,{begin:/\(/,end:/\)/,keywords:g,relevance:0,contains:[`self`,n,e.C_BLOCK_COMMENT_MODE,s,c,o]}]},o,n,e.C_BLOCK_COMMENT_MODE,l]};return{name:`C++`,aliases:[`cc`,`c++`,`h++`,`hpp`,`hh`,`hxx`,`cxx`],keywords:g,illegal:`</`,classNameAliases:{"function.dispatch":`built_in`},contains:[].concat(y,b,_,v,[l,{begin:`\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)`,end:`>`,keywords:g,contains:[`self`,o]},{begin:e.IDENT_RE+`::`,keywords:g},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:`keyword`,3:`title.class`}}])}}function iN(e){let t={type:[`boolean`,`byte`,`word`,`String`],built_in:`KeyboardController.MouseController.SoftwareSerial.EthernetServer.EthernetClient.LiquidCrystal.RobotControl.GSMVoiceCall.EthernetUDP.EsploraTFT.HttpClient.RobotMotor.WiFiClient.GSMScanner.FileSystem.Scheduler.GSMServer.YunClient.YunServer.IPAddress.GSMClient.GSMModem.Keyboard.Ethernet.Console.GSMBand.Esplora.Stepper.Process.WiFiUDP.GSM_SMS.Mailbox.USBHost.Firmata.PImage.Client.Server.GSMPIN.FileIO.Bridge.Serial.EEPROM.Stream.Mouse.Audio.Servo.File.Task.GPRS.WiFi.Wire.TFT.GSM.SPI.SD`.split(`.`),_hints:`setup.loop.runShellCommandAsynchronously.analogWriteResolution.retrieveCallingNumber.printFirmwareVersion.analogReadResolution.sendDigitalPortPair.noListenOnLocalhost.readJoystickButton.setFirmwareVersion.readJoystickSwitch.scrollDisplayRight.getVoiceCallStatus.scrollDisplayLeft.writeMicroseconds.delayMicroseconds.beginTransmission.getSignalStrength.runAsynchronously.getAsynchronously.listenOnLocalhost.getCurrentCarrier.readAccelerometer.messageAvailable.sendDigitalPorts.lineFollowConfig.countryNameWrite.runShellCommand.readStringUntil.rewindDirectory.readTemperature.setClockDivider.readLightSensor.endTransmission.analogReference.detachInterrupt.countryNameRead.attachInterrupt.encryptionType.readBytesUntil.robotNameWrite.readMicrophone.robotNameRead.cityNameWrite.userNameWrite.readJoystickY.readJoystickX.mouseReleased.openNextFile.scanNetworks.noInterrupts.digitalWrite.beginSpeaker.mousePressed.isActionDone.mouseDragged.displayLogos.noAutoscroll.addParameter.remoteNumber.getModifiers.keyboardRead.userNameRead.waitContinue.processInput.parseCommand.printVersion.readNetworks.writeMessage.blinkVersion.cityNameRead.readMessage.setDataMode.parsePacket.isListening.setBitOrder.beginPacket.isDirectory.motorsWrite.drawCompass.digitalRead.clearScreen.serialEvent.rightToLeft.setTextSize.leftToRight.requestFrom.keyReleased.compassRead.analogWrite.interrupts.WiFiServer.disconnect.playMelody.parseFloat.autoscroll.getPINUsed.setPINUsed.setTimeout.sendAnalog.readSlider.analogRead.beginWrite.createChar.motorsStop.keyPressed.tempoWrite.readButton.subnetMask.debugPrint.macAddress.writeGreen.randomSeed.attachGPRS.readString.sendString.remotePort.releaseAll.mouseMoved.background.getXChange.getYChange.answerCall.getResult.voiceCall.endPacket.constrain.getSocket.writeJSON.getButton.available.connected.findUntil.readBytes.exitValue.readGreen.writeBlue.startLoop.IPAddress.isPressed.sendSysex.pauseMode.gatewayIP.setCursor.getOemKey.tuneWrite.noDisplay.loadImage.switchPIN.onRequest.onReceive.changePIN.playFile.noBuffer.parseInt.overflow.checkPIN.knobRead.beginTFT.bitClear.updateIR.bitWrite.position.writeRGB.highByte.writeRed.setSpeed.readBlue.noStroke.remoteIP.transfer.shutdown.hangCall.beginSMS.endWrite.attached.maintain.noCursor.checkReg.checkPUK.shiftOut.isValid.shiftIn.pulseIn.connect.println.localIP.pinMode.getIMEI.display.noBlink.process.getBand.running.beginSD.drawBMP.lowByte.setBand.release.bitRead.prepare.pointTo.readRed.setMode.noFill.remove.listen.stroke.detach.attach.noTone.exists.buffer.height.bitSet.circle.config.cursor.random.IRread.setDNS.endSMS.getKey.micros.millis.begin.print.write.ready.flush.width.isPIN.blink.clear.press.mkdir.rmdir.close.point.yield.image.BSSID.click.delay.read.text.move.peek.beep.rect.line.open.seek.fill.size.turn.stop.home.find.step.tone.sqrt.RSSI.SSID.end.bit.tan.cos.sin.pow.map.abs.max.min.get.run.put`.split(`.`),literal:[`DIGITAL_MESSAGE`,`FIRMATA_STRING`,`ANALOG_MESSAGE`,`REPORT_DIGITAL`,`REPORT_ANALOG`,`INPUT_PULLUP`,`SET_PIN_MODE`,`INTERNAL2V56`,`SYSTEM_RESET`,`LED_BUILTIN`,`INTERNAL1V1`,`SYSEX_START`,`INTERNAL`,`EXTERNAL`,`DEFAULT`,`OUTPUT`,`INPUT`,`HIGH`,`LOW`]},n=rN(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name=`Arduino`,n.aliases=[`ino`],n.supersetOf=`cpp`,n}function aN(e){let t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:[`self`,{begin:/:-/,contains:[n]}]};Object.assign(n,{className:`variable`,variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,`(?![\\w\\d])(?![$])`)},r]});let i={className:`subst`,begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},a=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:`comment`}}),o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:`string`})]}},s={className:`string`,begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,i]};i.contains.push(s);let c={match:/\\"/},l={className:`string`,begin:/'/,end:/'/},u={match:/\\'/},d={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:`number`},e.NUMBER_MODE,n]},f=e.SHEBANG({binary:`(${[`fish`,`bash`,`zsh`,`sh`,`csh`,`ksh`,`tcsh`,`dash`,`scsh`].join(`|`)})`,relevance:10}),p={className:`function`,begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},m=[`if`,`then`,`else`,`elif`,`fi`,`time`,`for`,`while`,`until`,`in`,`do`,`done`,`case`,`esac`,`coproc`,`function`,`select`],h=[`true`,`false`],g={match:/(\/[a-z._-]+)+/},_=[`break`,`cd`,`continue`,`eval`,`exec`,`exit`,`export`,`getopts`,`hash`,`pwd`,`readonly`,`return`,`shift`,`test`,`times`,`trap`,`umask`,`unset`],v=[`alias`,`bind`,`builtin`,`caller`,`command`,`declare`,`echo`,`enable`,`help`,`let`,`local`,`logout`,`mapfile`,`printf`,`read`,`readarray`,`source`,`sudo`,`type`,`typeset`,`ulimit`,`unalias`],y=`autoload.bg.bindkey.bye.cap.chdir.clone.comparguments.compcall.compctl.compdescribe.compfiles.compgroups.compquote.comptags.comptry.compvalues.dirs.disable.disown.echotc.echoti.emulate.fc.fg.float.functions.getcap.getln.history.integer.jobs.kill.limit.log.noglob.popd.print.pushd.pushln.rehash.sched.setcap.setopt.stat.suspend.ttyctl.unfunction.unhash.unlimit.unsetopt.vared.wait.whence.where.which.zcompile.zformat.zftp.zle.zmodload.zparseopts.zprof.zpty.zregexparse.zsocket.zstyle.ztcp`.split(`.`),b=`chcon.chgrp.chown.chmod.cp.dd.df.dir.dircolors.ln.ls.mkdir.mkfifo.mknod.mktemp.mv.realpath.rm.rmdir.shred.sync.touch.truncate.vdir.b2sum.base32.base64.cat.cksum.comm.csplit.cut.expand.fmt.fold.head.join.md5sum.nl.numfmt.od.paste.ptx.pr.sha1sum.sha224sum.sha256sum.sha384sum.sha512sum.shuf.sort.split.sum.tac.tail.tr.tsort.unexpand.uniq.wc.arch.basename.chroot.date.dirname.du.echo.env.expr.factor.groups.hostid.id.link.logname.nice.nohup.nproc.pathchk.pinky.printenv.printf.pwd.readlink.runcon.seq.sleep.stat.stdbuf.stty.tee.test.timeout.tty.uname.unlink.uptime.users.who.whoami.yes`.split(`.`);return{name:`Bash`,aliases:[`sh`,`zsh`],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:m,literal:h,built_in:[..._,...v,`set`,`shopt`,...y,...b]},contains:[f,e.SHEBANG(),p,d,a,o,g,s,c,l,u,n]}}function oN(e){let t=e.regex,n=e.COMMENT(`//`,`$`,{contains:[{begin:/\\\n/}]}),r=`decltype\\(auto\\)`,i=`[a-zA-Z_]\\w*::`,a=`(`+r+`|`+t.optional(i)+`[a-zA-Z_]\\w*`+t.optional(`<[^<>]+>`)+`)`,o={className:`type`,variants:[{begin:`\\b[a-z\\d_]*_t\\b`},{match:/\batomic_[a-z]{3,6}\b/}]},s={className:`string`,variants:[{begin:`(u8?|U|L)?"`,end:`"`,illegal:`\\n`,contains:[e.BACKSLASH_ESCAPE]},{begin:`(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)`,end:`'`,illegal:`.`},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:`number`,variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},l={className:`meta`,begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:`if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include`},contains:[{begin:/\\\n/,relevance:0},e.inherit(s,{className:`string`}),{className:`string`,begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},u={className:`title`,begin:t.optional(i)+e.IDENT_RE,relevance:0},d=t.optional(i)+e.IDENT_RE+`\\s*\\(`,f={keyword:`asm.auto.break.case.continue.default.do.else.enum.extern.for.fortran.goto.if.inline.register.restrict.return.sizeof.typeof.typeof_unqual.struct.switch.typedef.union.volatile.while._Alignas._Alignof._Atomic._Generic._Noreturn._Static_assert._Thread_local.alignas.alignof.noreturn.static_assert.thread_local._Pragma`.split(`.`),type:`float.double.signed.unsigned.int.short.long.char.void._Bool._BitInt._Complex._Imaginary._Decimal32._Decimal64._Decimal96._Decimal128._Decimal64x._Decimal128x._Float16._Float32._Float64._Float128._Float32x._Float64x._Float128x.const.static.constexpr.complex.bool.imaginary`.split(`.`),literal:`true false NULL`,built_in:`std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr`},p=[l,o,n,e.C_BLOCK_COMMENT_MODE,c,s],m={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:`new throw return else`,end:/;/}],keywords:f,contains:p.concat([{begin:/\(/,end:/\)/,keywords:f,contains:p.concat([`self`]),relevance:0}]),relevance:0},h={begin:`(`+a+`[\\*&\\s]+)+`+d,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:f,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:f,relevance:0},{begin:d,returnBegin:!0,contains:[e.inherit(u,{className:`title.function`})],relevance:0},{relevance:0,match:/,/},{className:`params`,begin:/\(/,end:/\)/,keywords:f,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,s,c,o,{begin:/\(/,end:/\)/,keywords:f,relevance:0,contains:[`self`,n,e.C_BLOCK_COMMENT_MODE,s,c,o]}]},o,n,e.C_BLOCK_COMMENT_MODE,l]};return{name:`C`,aliases:[`h`],keywords:f,disableAutodetect:!0,illegal:`</`,contains:[].concat(m,h,p,[l,{begin:e.IDENT_RE+`::`,keywords:f},{className:`class`,beginKeywords:`enum class struct union`,end:/[{;:<>=]/,contains:[{beginKeywords:`final class struct`},e.TITLE_MODE]}]),exports:{preprocessor:l,strings:s,keywords:f}}}function sN(e){let t=e.regex,n=e.COMMENT(`//`,`$`,{contains:[{begin:/\\\n/}]}),r=`decltype\\(auto\\)`,i=`[a-zA-Z_]\\w*::`,a=`(?!struct)(`+r+`|`+t.optional(i)+`[a-zA-Z_]\\w*`+t.optional(`<[^<>]+>`)+`)`,o={className:`type`,begin:`\\b[a-z\\d_]*_t\\b`},s={className:`string`,variants:[{begin:`(u8?|U|L)?"`,end:`"`,illegal:`\\n`,contains:[e.BACKSLASH_ESCAPE]},{begin:`(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)`,end:`'`,illegal:`.`},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:`number`,variants:[{begin:`[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)`},{begin:`[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)`}],relevance:0},l={className:`meta`,begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:`if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include`},contains:[{begin:/\\\n/,relevance:0},e.inherit(s,{className:`string`}),{className:`string`,begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},u={className:`title`,begin:t.optional(i)+e.IDENT_RE,relevance:0},d=t.optional(i)+e.IDENT_RE+`\\s*\\(`,f=`alignas.alignof.and.and_eq.asm.atomic_cancel.atomic_commit.atomic_noexcept.auto.bitand.bitor.break.case.catch.class.co_await.co_return.co_yield.compl.concept.const_cast|10.consteval.constexpr.constinit.continue.decltype.default.delete.do.dynamic_cast|10.else.enum.explicit.export.extern.false.final.for.friend.goto.if.import.inline.module.mutable.namespace.new.noexcept.not.not_eq.nullptr.operator.or.or_eq.override.private.protected.public.reflexpr.register.reinterpret_cast|10.requires.return.sizeof.static_assert.static_cast|10.struct.switch.synchronized.template.this.thread_local.throw.transaction_safe.transaction_safe_dynamic.true.try.typedef.typeid.typename.union.using.virtual.volatile.while.xor.xor_eq`.split(`.`),p=[`bool`,`char`,`char16_t`,`char32_t`,`char8_t`,`double`,`float`,`int`,`long`,`short`,`void`,`wchar_t`,`unsigned`,`signed`,`const`,`static`],m=`any.auto_ptr.barrier.binary_semaphore.bitset.complex.condition_variable.condition_variable_any.counting_semaphore.deque.false_type.flat_map.flat_set.future.imaginary.initializer_list.istringstream.jthread.latch.lock_guard.multimap.multiset.mutex.optional.ostringstream.packaged_task.pair.promise.priority_queue.queue.recursive_mutex.recursive_timed_mutex.scoped_lock.set.shared_future.shared_lock.shared_mutex.shared_timed_mutex.shared_ptr.stack.string_view.stringstream.timed_mutex.thread.true_type.tuple.unique_lock.unique_ptr.unordered_map.unordered_multimap.unordered_multiset.unordered_set.variant.vector.weak_ptr.wstring.wstring_view`.split(`.`),h=`abort.abs.acos.apply.as_const.asin.atan.atan2.calloc.ceil.cerr.cin.clog.cos.cosh.cout.declval.endl.exchange.exit.exp.fabs.floor.fmod.forward.fprintf.fputs.free.frexp.fscanf.future.invoke.isalnum.isalpha.iscntrl.isdigit.isgraph.islower.isprint.ispunct.isspace.isupper.isxdigit.labs.launder.ldexp.log.log10.make_pair.make_shared.make_shared_for_overwrite.make_tuple.make_unique.malloc.memchr.memcmp.memcpy.memset.modf.move.pow.printf.putchar.puts.realloc.scanf.sin.sinh.snprintf.sprintf.sqrt.sscanf.std.stderr.stdin.stdout.strcat.strchr.strcmp.strcpy.strcspn.strlen.strncat.strncmp.strncpy.strpbrk.strrchr.strspn.strstr.swap.tan.tanh.terminate.to_underlying.tolower.toupper.vfprintf.visit.vprintf.vsprintf`.split(`.`),g={type:p,keyword:f,literal:[`NULL`,`false`,`nullopt`,`nullptr`,`true`],built_in:[`_Pragma`],_type_hints:m},_={className:`function.dispatch`,relevance:0,keywords:{_hint:h},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},v=[_,l,o,n,e.C_BLOCK_COMMENT_MODE,c,s],y={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:`new throw return else`,end:/;/}],keywords:g,contains:v.concat([{begin:/\(/,end:/\)/,keywords:g,contains:v.concat([`self`]),relevance:0}]),relevance:0},b={className:`function`,begin:`(`+a+`[\\*&\\s]+)+`+d,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:g,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:g,relevance:0},{begin:d,returnBegin:!0,contains:[u],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[s,c]},{relevance:0,match:/,/},{className:`params`,begin:/\(/,end:/\)/,keywords:g,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,s,c,o,{begin:/\(/,end:/\)/,keywords:g,relevance:0,contains:[`self`,n,e.C_BLOCK_COMMENT_MODE,s,c,o]}]},o,n,e.C_BLOCK_COMMENT_MODE,l]};return{name:`C++`,aliases:[`cc`,`c++`,`h++`,`hpp`,`hh`,`hxx`,`cxx`],keywords:g,illegal:`</`,classNameAliases:{"function.dispatch":`built_in`},contains:[].concat(y,b,_,v,[l,{begin:`\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)`,end:`>`,keywords:g,contains:[`self`,o]},{begin:e.IDENT_RE+`::`,keywords:g},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:`keyword`,3:`title.class`}}])}}function cN(e){let t=[`bool`,`byte`,`char`,`decimal`,`delegate`,`double`,`dynamic`,`enum`,`float`,`int`,`long`,`nint`,`nuint`,`object`,`sbyte`,`short`,`string`,`ulong`,`uint`,`ushort`],n=[`public`,`private`,`protected`,`static`,`internal`,`protected`,`abstract`,`async`,`extern`,`override`,`unsafe`,`virtual`,`new`,`sealed`,`partial`],r={keyword:`abstract.as.base.break.case.catch.class.const.continue.do.else.event.explicit.extern.finally.fixed.for.foreach.goto.if.implicit.in.interface.internal.is.lock.namespace.new.operator.out.override.params.private.protected.public.readonly.record.ref.return.scoped.sealed.sizeof.stackalloc.static.struct.switch.this.throw.try.typeof.unchecked.unsafe.using.virtual.void.volatile.while`.split(`.`).concat(`add.alias.and.ascending.args.async.await.by.descending.dynamic.equals.file.from.get.global.group.init.into.join.let.nameof.not.notnull.on.or.orderby.partial.record.remove.required.scoped.select.set.unmanaged.value|0.var.when.where.with.yield`.split(`.`)),built_in:t,literal:[`default`,`false`,`null`,`true`]},i=e.inherit(e.TITLE_MODE,{begin:`[a-zA-Z](\\.?\\w)*`}),a={className:`number`,variants:[{begin:`\\b(0b[01']+)`},{begin:`(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)`},{begin:`(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)`}],relevance:0},o={className:`string`,begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},s={className:`string`,begin:`@"`,end:`"`,contains:[{begin:`""`}]},c=e.inherit(s,{illegal:/\n/}),l={className:`subst`,begin:/\{/,end:/\}/,keywords:r},u=e.inherit(l,{illegal:/\n/}),d={className:`string`,begin:/\$"/,end:`"`,illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,u]},f={className:`string`,begin:/\$@"/,end:`"`,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:`""`},l]},p=e.inherit(f,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:`""`},u]});l.contains=[f,d,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.C_BLOCK_COMMENT_MODE],u.contains=[p,d,c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];let m={variants:[o,f,d,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},h={begin:`<`,end:`>`,contains:[{beginKeywords:`in out`},i]},g=e.IDENT_RE+`(<`+e.IDENT_RE+`(\\s*,\\s*`+e.IDENT_RE+`)*>)?(\\[\\])?`,_={begin:`@`+e.IDENT_RE,relevance:0};return{name:`C#`,aliases:[`cs`,`c#`],keywords:r,illegal:/::/,contains:[e.COMMENT(`///`,`$`,{returnBegin:!0,contains:[{className:`doctag`,variants:[{begin:`///`,relevance:0},{begin:`<!--|-->`},{begin:`</?`,end:`>`}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:`meta`,begin:`#`,end:`$`,keywords:{keyword:`if else elif endif define undef warning error line region endregion pragma checksum`}},m,a,{beginKeywords:`class interface`,relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:`where class`},i,h,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:`namespace`,relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[i,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:`record`,relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[i,h,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:`meta`,begin:`^\\s*\\[(?=[\\w])`,excludeBegin:!0,end:`\\]`,excludeEnd:!0,contains:[{className:`string`,begin:/"/,end:/"/}]},{beginKeywords:`new return throw await else`,relevance:0},{className:`function`,begin:`(`+g+`\\s+)+`+e.IDENT_RE+`\\s*(<[^=]+>\\s*)?\\(`,returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:r,contains:[{beginKeywords:n.join(` `),relevance:0},{begin:e.IDENT_RE+`\\s*(<[^=]+>\\s*)?\\(`,returnBegin:!0,contains:[e.TITLE_MODE,h],relevance:0},{match:/\(\)/},{className:`params`,begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:r,relevance:0,contains:[m,a,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},_]}}var lN=e=>({IMPORTANT:{scope:`meta`,begin:`!important`},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:`number`,begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:`built_in`,begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:`selector-attr`,begin:/\[/,end:/\]/,illegal:`$`,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:`number`,begin:e.NUMBER_RE+`(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?`,relevance:0},CSS_VARIABLE:{className:`attr`,begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),uN=`a.abbr.address.article.aside.audio.b.blockquote.body.button.canvas.caption.cite.code.dd.del.details.dfn.div.dl.dt.em.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hgroup.html.i.iframe.img.input.ins.kbd.label.legend.li.main.mark.menu.nav.object.ol.optgroup.option.p.picture.q.quote.samp.section.select.source.span.strong.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.tr.ul.var.video`.split(`.`),dN=`defs.g.marker.mask.pattern.svg.switch.symbol.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feFlood.feGaussianBlur.feImage.feMerge.feMorphology.feOffset.feSpecularLighting.feTile.feTurbulence.linearGradient.radialGradient.stop.circle.ellipse.image.line.path.polygon.polyline.rect.text.use.textPath.tspan.foreignObject.clipPath`.split(`.`),fN=[...uN,...dN],pN=`any-hover.any-pointer.aspect-ratio.color.color-gamut.color-index.device-aspect-ratio.device-height.device-width.display-mode.forced-colors.grid.height.hover.inverted-colors.monochrome.orientation.overflow-block.overflow-inline.pointer.prefers-color-scheme.prefers-contrast.prefers-reduced-motion.prefers-reduced-transparency.resolution.scan.scripting.update.width.min-width.max-width.min-height.max-height`.split(`.`).sort().reverse(),mN=`active.any-link.blank.checked.current.default.defined.dir.disabled.drop.empty.enabled.first.first-child.first-of-type.fullscreen.future.focus.focus-visible.focus-within.has.host.host-context.hover.indeterminate.in-range.invalid.is.lang.last-child.last-of-type.left.link.local-link.not.nth-child.nth-col.nth-last-child.nth-last-col.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.past.placeholder-shown.read-only.read-write.required.right.root.scope.target.target-within.user-invalid.valid.visited.where`.split(`.`).sort().reverse(),hN=[`after`,`backdrop`,`before`,`cue`,`cue-region`,`first-letter`,`first-line`,`grammar-error`,`marker`,`part`,`placeholder`,`selection`,`slotted`,`spelling-error`].sort().reverse(),gN=`accent-color.align-content.align-items.align-self.alignment-baseline.all.anchor-name.animation.animation-composition.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-range.animation-range-end.animation-range-start.animation-timeline.animation-timing-function.appearance.aspect-ratio.backdrop-filter.backface-visibility.background.background-attachment.background-blend-mode.background-clip.background-color.background-image.background-origin.background-position.background-position-x.background-position-y.background-repeat.background-size.baseline-shift.block-size.border.border-block.border-block-color.border-block-end.border-block-end-color.border-block-end-style.border-block-end-width.border-block-start.border-block-start-color.border-block-start-style.border-block-start-width.border-block-style.border-block-width.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-end-end-radius.border-end-start-radius.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-inline.border-inline-color.border-inline-end.border-inline-end-color.border-inline-end-style.border-inline-end-width.border-inline-start.border-inline-start-color.border-inline-start-style.border-inline-start-width.border-inline-style.border-inline-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-start-end-radius.border-start-start-radius.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-align.box-decoration-break.box-direction.box-flex.box-flex-group.box-lines.box-ordinal-group.box-orient.box-pack.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.caret-color.clear.clip.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.color-scheme.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.contain.contain-intrinsic-block-size.contain-intrinsic-height.contain-intrinsic-inline-size.contain-intrinsic-size.contain-intrinsic-width.container.container-name.container-type.content.content-visibility.counter-increment.counter-reset.counter-set.cue.cue-after.cue-before.cursor.cx.cy.direction.display.dominant-baseline.empty-cells.enable-background.field-sizing.fill.fill-opacity.fill-rule.filter.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.flood-color.flood-opacity.flow.font.font-display.font-family.font-feature-settings.font-kerning.font-language-override.font-optical-sizing.font-palette.font-size.font-size-adjust.font-smooth.font-smoothing.font-stretch.font-style.font-synthesis.font-synthesis-position.font-synthesis-small-caps.font-synthesis-style.font-synthesis-weight.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-emoji.font-variant-ligatures.font-variant-numeric.font-variant-position.font-variation-settings.font-weight.forced-color-adjust.gap.glyph-orientation-horizontal.glyph-orientation-vertical.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-rows.grid-column.grid-column-end.grid-column-start.grid-gap.grid-row.grid-row-end.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphenate-character.hyphenate-limit-chars.hyphens.icon.image-orientation.image-rendering.image-resolution.ime-mode.initial-letter.initial-letter-align.inline-size.inset.inset-area.inset-block.inset-block-end.inset-block-start.inset-inline.inset-inline-end.inset-inline-start.isolation.justify-content.justify-items.justify-self.kerning.left.letter-spacing.lighting-color.line-break.line-height.line-height-step.list-style.list-style-image.list-style-position.list-style-type.margin.margin-block.margin-block-end.margin-block-start.margin-bottom.margin-inline.margin-inline-end.margin-inline-start.margin-left.margin-right.margin-top.margin-trim.marker.marker-end.marker-mid.marker-start.marks.mask.mask-border.mask-border-mode.mask-border-outset.mask-border-repeat.mask-border-slice.mask-border-source.mask-border-width.mask-clip.mask-composite.mask-image.mask-mode.mask-origin.mask-position.mask-repeat.mask-size.mask-type.masonry-auto-flow.math-depth.math-shift.math-style.max-block-size.max-height.max-inline-size.max-width.min-block-size.min-height.min-inline-size.min-width.mix-blend-mode.nav-down.nav-index.nav-left.nav-right.nav-up.none.normal.object-fit.object-position.offset.offset-anchor.offset-distance.offset-path.offset-position.offset-rotate.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-anchor.overflow-block.overflow-clip-margin.overflow-inline.overflow-wrap.overflow-x.overflow-y.overlay.overscroll-behavior.overscroll-behavior-block.overscroll-behavior-inline.overscroll-behavior-x.overscroll-behavior-y.padding.padding-block.padding-block-end.padding-block-start.padding-bottom.padding-inline.padding-inline-end.padding-inline-start.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.paint-order.pause.pause-after.pause-before.perspective.perspective-origin.place-content.place-items.place-self.pointer-events.position.position-anchor.position-visibility.print-color-adjust.quotes.r.resize.rest.rest-after.rest-before.right.rotate.row-gap.ruby-align.ruby-position.scale.scroll-behavior.scroll-margin.scroll-margin-block.scroll-margin-block-end.scroll-margin-block-start.scroll-margin-bottom.scroll-margin-inline.scroll-margin-inline-end.scroll-margin-inline-start.scroll-margin-left.scroll-margin-right.scroll-margin-top.scroll-padding.scroll-padding-block.scroll-padding-block-end.scroll-padding-block-start.scroll-padding-bottom.scroll-padding-inline.scroll-padding-inline-end.scroll-padding-inline-start.scroll-padding-left.scroll-padding-right.scroll-padding-top.scroll-snap-align.scroll-snap-stop.scroll-snap-type.scroll-timeline.scroll-timeline-axis.scroll-timeline-name.scrollbar-color.scrollbar-gutter.scrollbar-width.shape-image-threshold.shape-margin.shape-outside.shape-rendering.speak.speak-as.src.stop-color.stop-opacity.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.tab-size.table-layout.text-align.text-align-all.text-align-last.text-anchor.text-combine-upright.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-skip-ink.text-decoration-style.text-decoration-thickness.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-indent.text-justify.text-orientation.text-overflow.text-rendering.text-shadow.text-size-adjust.text-transform.text-underline-offset.text-underline-position.text-wrap.text-wrap-mode.text-wrap-style.timeline-scope.top.touch-action.transform.transform-box.transform-origin.transform-style.transition.transition-behavior.transition-delay.transition-duration.transition-property.transition-timing-function.translate.unicode-bidi.user-modify.user-select.vector-effect.vertical-align.view-timeline.view-timeline-axis.view-timeline-inset.view-timeline-name.view-transition-name.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.white-space.white-space-collapse.widows.width.will-change.word-break.word-spacing.word-wrap.writing-mode.x.y.z-index.zoom`.split(`.`).sort().reverse();function _N(e){let t=e.regex,n=lN(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},i=/@-?\w[\w]*(-\w+)*/,a=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:`CSS`,case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:`from to`},classNameAliases:{keyframePosition:`selector-tag`},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:`selector-id`,begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:`selector-class`,begin:`\\.[a-zA-Z-][a-zA-Z0-9_-]*`,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:`selector-pseudo`,variants:[{begin:`:(`+mN.join(`|`)+`)`},{begin:`:(:)?(`+hN.join(`|`)+`)`}]},n.CSS_VARIABLE,{className:`attribute`,begin:`\\b(`+gN.join(`|`)+`)\\b`},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...a,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:`url data-uri`},contains:[...a,{className:`string`,begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:`[{;]`,relevance:0,illegal:/:/,contains:[{className:`keyword`,begin:i},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:`and or not only`,attribute:pN.join(` `)},contains:[{begin:/[a-z-]+(?=:)/,className:`attribute`},...a,n.CSS_NUMBER_MODE]}]},{className:`selector-tag`,begin:`\\b(`+fN.join(`|`)+`)\\b`}]}}function vN(e){let t=e.regex;return{name:`Diff`,aliases:[`patch`],contains:[{className:`meta`,relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:`comment`,variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:`addition`,begin:/^\+/,end:/$/},{className:`deletion`,begin:/^-/,end:/$/},{className:`addition`,begin:/^!/,end:/$/}]}}function yN(e){let t={keyword:[`break`,`case`,`chan`,`const`,`continue`,`default`,`defer`,`else`,`fallthrough`,`for`,`func`,`go`,`goto`,`if`,`import`,`interface`,`map`,`package`,`range`,`return`,`select`,`struct`,`switch`,`type`,`var`],type:[`bool`,`byte`,`complex64`,`complex128`,`error`,`float32`,`float64`,`int8`,`int16`,`int32`,`int64`,`string`,`uint8`,`uint16`,`uint32`,`uint64`,`int`,`uint`,`uintptr`,`rune`],literal:[`true`,`false`,`iota`,`nil`],built_in:[`append`,`cap`,`close`,`complex`,`copy`,`imag`,`len`,`make`,`new`,`panic`,`print`,`println`,`real`,`recover`,`delete`]};return{name:`Go`,aliases:[`golang`],keywords:t,illegal:`</`,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:`string`,variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:`number`,variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:`function`,beginKeywords:`func`,end:`\\s*(\\{|$)`,excludeEnd:!0,contains:[e.TITLE_MODE,{className:`params`,begin:/\(/,end:/\)/,endsParent:!0,keywords:t,illegal:/["']/}]}]}}function bN(e){let t=e.regex;return{name:`GraphQL`,aliases:[`gql`],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:[`query`,`mutation`,`subscription`,`type`,`input`,`schema`,`directive`,`interface`,`union`,`scalar`,`fragment`,`enum`,`on`],literal:[`true`,`false`,`null`]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:`punctuation`,match:/[.]{3}/,relevance:0},{scope:`punctuation`,begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:`variable`,begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:`meta`,match:/@\w+/,excludeEnd:!0},{scope:`symbol`,begin:t.concat(/[_A-Za-z][_0-9A-Za-z]*/,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function xN(e){let t=e.regex,n={className:`number`,relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},r=e.COMMENT();r.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];let i={className:`variable`,variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},a={className:`literal`,begin:/\bon|off|true|false|yes|no\b/},o={className:`string`,contains:[e.BACKSLASH_ESCAPE],variants:[{begin:`'''`,end:`'''`,relevance:10},{begin:`"""`,end:`"""`,relevance:10},{begin:`"`,end:`"`},{begin:`'`,end:`'`}]},s={begin:/\[/,end:/\]/,contains:[r,a,i,o,n,`self`],relevance:0},c=t.either(/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/);return{name:`TOML, also INI`,aliases:[`toml`],case_insensitive:!0,illegal:/\S/,contains:[r,{className:`section`,begin:/\[+/,end:/\]+/},{begin:t.concat(c,`(\\s*\\.\\s*`,c,`)*`,t.lookahead(/\s*=\s*[^#\s]/)),className:`attr`,starts:{end:/$/,contains:[r,s,a,i,o,n]}}]}}var SN=`[0-9](_*[0-9])*`,CN=`\\.(${SN})`,wN=`[0-9a-fA-F](_*[0-9a-fA-F])*`,TN={className:`number`,variants:[{begin:`(\\b(${SN})((${CN})|\\.)?|(${CN}))[eE][+-]?(${SN})[fFdD]?\\b`},{begin:`\\b(${SN})((${CN})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${CN})[fFdD]?\\b`},{begin:`\\b(${SN})[fFdD]\\b`},{begin:`\\b0[xX]((${wN})\\.?|(${wN})?\\.(${wN}))[pP][+-]?(${SN})[fFdD]?\\b`},{begin:`\\b(0|[1-9](_*[0-9])*)[lL]?\\b`},{begin:`\\b0[xX](${wN})[lL]?\\b`},{begin:`\\b0(_*[0-7])*[lL]?\\b`},{begin:`\\b0[bB][01](_*[01])*[lL]?\\b`}],relevance:0};function EN(e,t,n){return n===-1?``:e.replace(t,r=>EN(e,t,n-1))}function DN(e){let t=e.regex,n=`[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*`,r=n+EN(`(?:<`+n+`~~~(?:\\s*,\\s*[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*~~~)*>)?`,/~~~/g,2),i={keyword:`synchronized.abstract.private.var.static.if.const .for.while.strictfp.finally.protected.import.native.final.void.enum.else.break.transient.catch.instanceof.volatile.case.assert.package.default.public.try.switch.continue.throws.protected.public.private.module.requires.exports.do.sealed.yield.permits.goto.when`.split(`.`),literal:[`false`,`true`,`null`],type:[`char`,`boolean`,`long`,`float`,`int`,`byte`,`short`,`double`],built_in:[`super`,`this`]},a={className:`meta`,begin:`@`+n,contains:[{begin:/\(/,end:/\)/,contains:[`self`]}]},o={className:`params`,begin:/\(/,end:/\)/,keywords:i,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:`Java`,aliases:[`jsp`],keywords:i,illegal:/<\/|#/,contains:[e.COMMENT(`/\\*\\*`,`\\*/`,{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:`doctag`,begin:`@[A-Za-z]+`}]}),{begin:/import java\.[a-z]+\./,keywords:`import`,relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:`string`,contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:`keyword`,3:`title.class`}},{match:/non-sealed/,scope:`keyword`},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:`type`,3:`variable`,5:`operator`}},{begin:[/record/,/\s+/,n],className:{1:`keyword`,3:`title.class`},contains:[o,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:`new throw return else`,relevance:0},{begin:[`(?:`+r+`\\s+)`,e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:`title.function`},keywords:i,contains:[{className:`params`,begin:/\(/,end:/\)/,keywords:i,relevance:0,contains:[a,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,TN,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},TN,a]}}var ON=`[A-Za-z$_][0-9A-Za-z$_]*`,kN=`as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using`.split(`.`),AN=[`true`,`false`,`null`,`undefined`,`NaN`,`Infinity`],jN=`Object.Function.Boolean.Symbol.Math.Date.Number.BigInt.String.RegExp.Array.Float32Array.Float64Array.Int8Array.Uint8Array.Uint8ClampedArray.Int16Array.Int32Array.Uint16Array.Uint32Array.BigInt64Array.BigUint64Array.Set.Map.WeakSet.WeakMap.ArrayBuffer.SharedArrayBuffer.Atomics.DataView.JSON.Promise.Generator.GeneratorFunction.AsyncFunction.Reflect.Proxy.Intl.WebAssembly`.split(`.`),MN=[`Error`,`EvalError`,`InternalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],NN=[`setInterval`,`setTimeout`,`clearInterval`,`clearTimeout`,`require`,`exports`,`eval`,`isFinite`,`isNaN`,`parseFloat`,`parseInt`,`decodeURI`,`decodeURIComponent`,`encodeURI`,`encodeURIComponent`,`escape`,`unescape`],PN=[`arguments`,`this`,`super`,`console`,`window`,`document`,`localStorage`,`sessionStorage`,`module`,`global`],FN=[].concat(NN,jN,MN);function IN(e){let t=e.regex,n=(e,{after:t})=>{let n=`</`+e[0].slice(1);return e.input.indexOf(n,t)!==-1},r=ON,i={begin:`<>`,end:`</>`},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{let r=e[0].length+e.index,i=e.input[r];if(i===`<`||i===`,`){t.ignoreMatch();return}i===`>`&&(n(e,{after:r})||t.ignoreMatch());let a,o=e.input.substring(r);if(a=o.match(/^\s*=/)){t.ignoreMatch();return}if((a=o.match(/^\s+extends\s+/))&&a.index===0){t.ignoreMatch();return}}},s={$pattern:ON,keyword:kN,literal:AN,built_in:FN,"variable.language":PN},c=`[0-9](_?[0-9])*`,l=`\\.(${c})`,u=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,d={className:`number`,variants:[{begin:`(\\b(${u})((${l})|\\.)?|(${l}))[eE][+-]?(${c})\\b`},{begin:`\\b(${u})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:`\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b`},{begin:`\\b0[bB][0-1](_?[0-1])*n?\\b`},{begin:`\\b0[oO][0-7](_?[0-7])*n?\\b`},{begin:`\\b0[0-7]+n?\\b`}],relevance:0},f={className:`subst`,begin:`\\$\\{`,end:`\\}`,keywords:s,contains:[]},p={begin:".?html`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`xml`}},m={begin:".?css`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`css`}},h={begin:".?gql`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`graphql`}},g={className:`string`,begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},_={className:`comment`,variants:[e.COMMENT(/\/\*\*(?!\/)/,`\\*/`,{relevance:0,contains:[{begin:`(?=@[A-Za-z]+)`,relevance:0,contains:[{className:`doctag`,begin:`@[A-Za-z]+`},{className:`type`,begin:`\\{`,end:`\\}`,excludeEnd:!0,excludeBegin:!0,relevance:0},{className:`variable`,begin:r+`(?=\\s*(-)|$)`,endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,{match:/\$\d+/},d];f.contains=v.concat({begin:/\{/,end:/\}/,keywords:s,contains:[`self`].concat(v)});let y=[].concat(_,f.contains),b=y.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:[`self`].concat(y)}]),x={className:`params`,begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b},S={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,`(`,t.concat(/\./,r),`)*`)],scope:{1:`keyword`,3:`title.class`,5:`keyword`,7:`title.class.inherited`}},{match:[/class/,/\s+/,r],scope:{1:`keyword`,3:`title.class`}}]},C={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:`title.class`,keywords:{_:[...jN,...MN]}},w={label:`use_strict`,className:`meta`,relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},T={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:`keyword`,3:`title.function`},label:`func.def`,contains:[x],illegal:/%/},E={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:`variable.constant`};function D(e){return t.concat(`(?!`,e.join(`|`),`)`)}let O={match:t.concat(/\b/,D([...NN,`super`,`import`].map(e=>`${e}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:`title.function`,relevance:0},k={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:`prototype`,className:`property`,relevance:0},A={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:`keyword`,3:`title.function`},contains:[{begin:/\(\)/},x]},ee=`(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|`+e.UNDERSCORE_IDENT_RE+`)\\s*=>`,j={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(ee)],keywords:`async`,className:{1:`keyword`,3:`title.function`},contains:[x]};return{name:`JavaScript`,aliases:[`js`,`jsx`,`mjs`,`cjs`],keywords:s,exports:{PARAMS_CONTAINS:b,CLASS_REFERENCE:C},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:`shebang`,binary:`node`,relevance:5}),w,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,_,{match:/\$\d+/},d,C,{scope:`attr`,match:r+t.lookahead(`:`),relevance:0},j,{begin:`(`+e.RE_STARTERS_RE+`|\\b(case|return|throw)\\b)\\s*`,keywords:`return throw case`,relevance:0,contains:[_,e.REGEXP_MODE,{className:`function`,begin:ee,returnBegin:!0,end:`\\s*=>`,contains:[{className:`params`,variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:`xml`,contains:[{begin:o.begin,end:o.end,skip:!0,contains:[`self`]}]}]},T,{beginKeywords:`while if switch catch for`},{begin:`\\b(?!function)`+e.UNDERSCORE_IDENT_RE+`\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{`,returnBegin:!0,label:`func.def`,contains:[x,e.inherit(e.TITLE_MODE,{begin:r,className:`title.function`})]},{match:/\.\.\./,relevance:0},k,{match:`\\$`+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:`title.function`},contains:[x]},O,E,S,A,{match:/\$[(.]/}]}}function LN(e){let t={className:`attr`,begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:`punctuation`,relevance:0},r=[`true`,`false`,`null`],i={scope:`literal`,beginKeywords:r.join(` `)};return{name:`JSON`,aliases:[`jsonc`],keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,i,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:`\\S`}}var RN=`[0-9](_*[0-9])*`,zN=`\\.(${RN})`,BN=`[0-9a-fA-F](_*[0-9a-fA-F])*`,VN={className:`number`,variants:[{begin:`(\\b(${RN})((${zN})|\\.)?|(${zN}))[eE][+-]?(${RN})[fFdD]?\\b`},{begin:`\\b(${RN})((${zN})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${zN})[fFdD]?\\b`},{begin:`\\b(${RN})[fFdD]\\b`},{begin:`\\b0[xX]((${BN})\\.?|(${BN})?\\.(${BN}))[pP][+-]?(${RN})[fFdD]?\\b`},{begin:`\\b(0|[1-9](_*[0-9])*)[lL]?\\b`},{begin:`\\b0[xX](${BN})[lL]?\\b`},{begin:`\\b0(_*[0-7])*[lL]?\\b`},{begin:`\\b0[bB][01](_*[01])*[lL]?\\b`}],relevance:0};function HN(e){let t={keyword:`abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual`,built_in:`Byte Short Char Int Long Boolean Float Double Void Unit Nothing`,literal:`true false null`},n={className:`keyword`,begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:`symbol`,begin:/@\w+/}]}},r={className:`symbol`,begin:e.UNDERSCORE_IDENT_RE+`@`},i={className:`subst`,begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},a={className:`variable`,begin:`\\$`+e.UNDERSCORE_IDENT_RE},o={className:`string`,variants:[{begin:`"""`,end:`"""(?=[^"])`,contains:[a,i]},{begin:`'`,end:`'`,illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:`"`,end:`"`,illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,a,i]}]};i.contains.push(o);let s={className:`meta`,begin:`@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*`+e.UNDERSCORE_IDENT_RE+`)?`},c={className:`meta`,begin:`@`+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(o,{className:`string`}),`self`]}]},l=VN,u=e.COMMENT(`/\\*`,`\\*/`,{contains:[e.C_BLOCK_COMMENT_MODE]}),d={variants:[{className:`type`,begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},f=d;return f.variants[1].contains=[d],d.variants[1].contains=[f],{name:`Kotlin`,aliases:[`kt`,`kts`],keywords:t,contains:[e.COMMENT(`/\\*\\*`,`\\*/`,{relevance:0,contains:[{className:`doctag`,begin:`@[A-Za-z]+`}]}),e.C_LINE_COMMENT_MODE,u,n,r,s,c,{className:`function`,beginKeywords:`fun`,end:`[(]|$`,returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+`\\s*\\(`,returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:`type`,begin:/</,end:/>/,keywords:`reified`,relevance:0},{className:`params`,begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[d,e.C_LINE_COMMENT_MODE,u],relevance:0},e.C_LINE_COMMENT_MODE,u,s,c,o,e.C_NUMBER_MODE]},u]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:`title.class`},keywords:`class interface trait`,end:/[:\{(]|$/,excludeEnd:!0,illegal:`extends implements`,contains:[{beginKeywords:`public protected internal private constructor`},e.UNDERSCORE_TITLE_MODE,{className:`type`,begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:`type`,begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},s,c]},o,{className:`meta`,begin:`^#!/usr/bin/env`,end:`$`,illegal:`
|
|
236
|
+
`},l]}}var UN=e=>({IMPORTANT:{scope:`meta`,begin:`!important`},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:`number`,begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:`built_in`,begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:`selector-attr`,begin:/\[/,end:/\]/,illegal:`$`,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:`number`,begin:e.NUMBER_RE+`(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?`,relevance:0},CSS_VARIABLE:{className:`attr`,begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),WN=`a.abbr.address.article.aside.audio.b.blockquote.body.button.canvas.caption.cite.code.dd.del.details.dfn.div.dl.dt.em.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hgroup.html.i.iframe.img.input.ins.kbd.label.legend.li.main.mark.menu.nav.object.ol.optgroup.option.p.picture.q.quote.samp.section.select.source.span.strong.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.tr.ul.var.video`.split(`.`),GN=`defs.g.marker.mask.pattern.svg.switch.symbol.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feFlood.feGaussianBlur.feImage.feMerge.feMorphology.feOffset.feSpecularLighting.feTile.feTurbulence.linearGradient.radialGradient.stop.circle.ellipse.image.line.path.polygon.polyline.rect.text.use.textPath.tspan.foreignObject.clipPath`.split(`.`),KN=[...WN,...GN],qN=`any-hover.any-pointer.aspect-ratio.color.color-gamut.color-index.device-aspect-ratio.device-height.device-width.display-mode.forced-colors.grid.height.hover.inverted-colors.monochrome.orientation.overflow-block.overflow-inline.pointer.prefers-color-scheme.prefers-contrast.prefers-reduced-motion.prefers-reduced-transparency.resolution.scan.scripting.update.width.min-width.max-width.min-height.max-height`.split(`.`).sort().reverse(),JN=`active.any-link.blank.checked.current.default.defined.dir.disabled.drop.empty.enabled.first.first-child.first-of-type.fullscreen.future.focus.focus-visible.focus-within.has.host.host-context.hover.indeterminate.in-range.invalid.is.lang.last-child.last-of-type.left.link.local-link.not.nth-child.nth-col.nth-last-child.nth-last-col.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.past.placeholder-shown.read-only.read-write.required.right.root.scope.target.target-within.user-invalid.valid.visited.where`.split(`.`).sort().reverse(),YN=[`after`,`backdrop`,`before`,`cue`,`cue-region`,`first-letter`,`first-line`,`grammar-error`,`marker`,`part`,`placeholder`,`selection`,`slotted`,`spelling-error`].sort().reverse(),XN=`accent-color.align-content.align-items.align-self.alignment-baseline.all.anchor-name.animation.animation-composition.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-range.animation-range-end.animation-range-start.animation-timeline.animation-timing-function.appearance.aspect-ratio.backdrop-filter.backface-visibility.background.background-attachment.background-blend-mode.background-clip.background-color.background-image.background-origin.background-position.background-position-x.background-position-y.background-repeat.background-size.baseline-shift.block-size.border.border-block.border-block-color.border-block-end.border-block-end-color.border-block-end-style.border-block-end-width.border-block-start.border-block-start-color.border-block-start-style.border-block-start-width.border-block-style.border-block-width.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-end-end-radius.border-end-start-radius.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-inline.border-inline-color.border-inline-end.border-inline-end-color.border-inline-end-style.border-inline-end-width.border-inline-start.border-inline-start-color.border-inline-start-style.border-inline-start-width.border-inline-style.border-inline-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-start-end-radius.border-start-start-radius.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-align.box-decoration-break.box-direction.box-flex.box-flex-group.box-lines.box-ordinal-group.box-orient.box-pack.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.caret-color.clear.clip.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.color-scheme.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.contain.contain-intrinsic-block-size.contain-intrinsic-height.contain-intrinsic-inline-size.contain-intrinsic-size.contain-intrinsic-width.container.container-name.container-type.content.content-visibility.counter-increment.counter-reset.counter-set.cue.cue-after.cue-before.cursor.cx.cy.direction.display.dominant-baseline.empty-cells.enable-background.field-sizing.fill.fill-opacity.fill-rule.filter.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.flood-color.flood-opacity.flow.font.font-display.font-family.font-feature-settings.font-kerning.font-language-override.font-optical-sizing.font-palette.font-size.font-size-adjust.font-smooth.font-smoothing.font-stretch.font-style.font-synthesis.font-synthesis-position.font-synthesis-small-caps.font-synthesis-style.font-synthesis-weight.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-emoji.font-variant-ligatures.font-variant-numeric.font-variant-position.font-variation-settings.font-weight.forced-color-adjust.gap.glyph-orientation-horizontal.glyph-orientation-vertical.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-rows.grid-column.grid-column-end.grid-column-start.grid-gap.grid-row.grid-row-end.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphenate-character.hyphenate-limit-chars.hyphens.icon.image-orientation.image-rendering.image-resolution.ime-mode.initial-letter.initial-letter-align.inline-size.inset.inset-area.inset-block.inset-block-end.inset-block-start.inset-inline.inset-inline-end.inset-inline-start.isolation.justify-content.justify-items.justify-self.kerning.left.letter-spacing.lighting-color.line-break.line-height.line-height-step.list-style.list-style-image.list-style-position.list-style-type.margin.margin-block.margin-block-end.margin-block-start.margin-bottom.margin-inline.margin-inline-end.margin-inline-start.margin-left.margin-right.margin-top.margin-trim.marker.marker-end.marker-mid.marker-start.marks.mask.mask-border.mask-border-mode.mask-border-outset.mask-border-repeat.mask-border-slice.mask-border-source.mask-border-width.mask-clip.mask-composite.mask-image.mask-mode.mask-origin.mask-position.mask-repeat.mask-size.mask-type.masonry-auto-flow.math-depth.math-shift.math-style.max-block-size.max-height.max-inline-size.max-width.min-block-size.min-height.min-inline-size.min-width.mix-blend-mode.nav-down.nav-index.nav-left.nav-right.nav-up.none.normal.object-fit.object-position.offset.offset-anchor.offset-distance.offset-path.offset-position.offset-rotate.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-anchor.overflow-block.overflow-clip-margin.overflow-inline.overflow-wrap.overflow-x.overflow-y.overlay.overscroll-behavior.overscroll-behavior-block.overscroll-behavior-inline.overscroll-behavior-x.overscroll-behavior-y.padding.padding-block.padding-block-end.padding-block-start.padding-bottom.padding-inline.padding-inline-end.padding-inline-start.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.paint-order.pause.pause-after.pause-before.perspective.perspective-origin.place-content.place-items.place-self.pointer-events.position.position-anchor.position-visibility.print-color-adjust.quotes.r.resize.rest.rest-after.rest-before.right.rotate.row-gap.ruby-align.ruby-position.scale.scroll-behavior.scroll-margin.scroll-margin-block.scroll-margin-block-end.scroll-margin-block-start.scroll-margin-bottom.scroll-margin-inline.scroll-margin-inline-end.scroll-margin-inline-start.scroll-margin-left.scroll-margin-right.scroll-margin-top.scroll-padding.scroll-padding-block.scroll-padding-block-end.scroll-padding-block-start.scroll-padding-bottom.scroll-padding-inline.scroll-padding-inline-end.scroll-padding-inline-start.scroll-padding-left.scroll-padding-right.scroll-padding-top.scroll-snap-align.scroll-snap-stop.scroll-snap-type.scroll-timeline.scroll-timeline-axis.scroll-timeline-name.scrollbar-color.scrollbar-gutter.scrollbar-width.shape-image-threshold.shape-margin.shape-outside.shape-rendering.speak.speak-as.src.stop-color.stop-opacity.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.tab-size.table-layout.text-align.text-align-all.text-align-last.text-anchor.text-combine-upright.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-skip-ink.text-decoration-style.text-decoration-thickness.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-indent.text-justify.text-orientation.text-overflow.text-rendering.text-shadow.text-size-adjust.text-transform.text-underline-offset.text-underline-position.text-wrap.text-wrap-mode.text-wrap-style.timeline-scope.top.touch-action.transform.transform-box.transform-origin.transform-style.transition.transition-behavior.transition-delay.transition-duration.transition-property.transition-timing-function.translate.unicode-bidi.user-modify.user-select.vector-effect.vertical-align.view-timeline.view-timeline-axis.view-timeline-inset.view-timeline-name.view-transition-name.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.white-space.white-space-collapse.widows.width.will-change.word-break.word-spacing.word-wrap.writing-mode.x.y.z-index.zoom`.split(`.`).sort().reverse(),ZN=JN.concat(YN).sort().reverse();function QN(e){let t=UN(e),n=ZN,r=`[\\w-]+`,i=`(`+r+`|@\\{[\\w-]+\\})`,a=[],o=[],s=function(e){return{className:`string`,begin:`~?`+e+`.*?`+e}},c=function(e,t,n){return{className:e,begin:t,relevance:n}},l={$pattern:/[a-z-]+/,keyword:`and or not only`,attribute:qN.join(` `)},u={begin:`\\(`,end:`\\)`,contains:o,keywords:l,relevance:0};o.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,s(`'`),s(`"`),t.CSS_NUMBER_MODE,{begin:`(url|data-uri)\\(`,starts:{className:`string`,end:`[\\)\\n]`,excludeEnd:!0}},t.HEXCOLOR,u,c(`variable`,`@@?`+r,10),c(`variable`,`@\\{`+r+`\\}`),c(`built_in`,"~?`[^`]*?`"),{className:`attribute`,begin:r+`\\s*:`,end:`:`,returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:`and not`},t.FUNCTION_DISPATCH);let d=o.concat({begin:/\{/,end:/\}/,contains:a}),f={beginKeywords:`when`,endsWithParent:!0,contains:[{beginKeywords:`and not`}].concat(o)},p={begin:i+`\\s*:`,returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:`attribute`,begin:`\\b(`+XN.join(`|`)+`)\\b`,end:/(?=:)/,starts:{endsWithParent:!0,illegal:`[<=$]`,relevance:0,contains:o}}]},m={className:`keyword`,begin:`@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b`,starts:{end:`[;{}]`,keywords:l,returnEnd:!0,contains:o,relevance:0}},h={className:`variable`,variants:[{begin:`@`+r+`\\s*:`,relevance:15},{begin:`@`+r}],starts:{end:`[;}]`,returnEnd:!0,contains:d}},g={variants:[{begin:`[\\.#:&\\[>]`,end:`[;{}]`},{begin:i,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,f,c(`keyword`,`all\\b`),c(`variable`,`@\\{`+r+`\\}`),{begin:`\\b(`+KN.join(`|`)+`)\\b`,className:`selector-tag`},t.CSS_NUMBER_MODE,c(`selector-tag`,i,0),c(`selector-id`,`#`+i),c(`selector-class`,`\\.`+i,0),c(`selector-tag`,`&`,0),t.ATTRIBUTE_SELECTOR_MODE,{className:`selector-pseudo`,begin:`:(`+JN.join(`|`)+`)`},{className:`selector-pseudo`,begin:`:(:)?(`+YN.join(`|`)+`)`},{begin:/\(/,end:/\)/,relevance:0,contains:d},{begin:`!important`},t.FUNCTION_DISPATCH]},_={begin:`[\\w-]+:(:)?(${n.join(`|`)})`,returnBegin:!0,contains:[g]};return a.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,m,h,_,p,g,f,t.FUNCTION_DISPATCH),{name:`Less`,case_insensitive:!0,illegal:`[=>'/<($"]`,contains:a}}function $N(e){let t=`\\[=*\\[`,n=`\\]=*\\]`,r={begin:t,end:n,contains:[`self`]},i=[e.COMMENT(`--(?!`+t+`)`,`$`),e.COMMENT(`--`+t,n,{contains:[r],relevance:10})];return{name:`Lua`,aliases:[`pluto`],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:`true false nil`,keyword:`and break do else elseif end for goto if in local not or repeat return then until while`,built_in:`_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove`},contains:i.concat([{className:`function`,beginKeywords:`function`,end:`\\)`,contains:[e.inherit(e.TITLE_MODE,{begin:`([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*`}),{className:`params`,begin:`\\(`,endsWithParent:!0,contains:i}].concat(i)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:`string`,begin:t,end:n,contains:[r],relevance:5}])}}function eP(e){let t={className:`variable`,variants:[{begin:`\\$\\(`+e.UNDERSCORE_IDENT_RE+`\\)`,contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:`string`,begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},r={className:`variable`,begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:`subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value`},contains:[t,n]},i={begin:`^`+e.UNDERSCORE_IDENT_RE+`\\s*(?=[:+?]?=)`},a={className:`meta`,begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:`.PHONY`}},o={className:`section`,begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:`Makefile`,aliases:[`mk`,`mak`,`make`],keywords:{$pattern:/[\w-]+/,keyword:`define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath`},contains:[e.HASH_COMMENT_MODE,t,n,r,i,a,o]}}function tP(e){let t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:`>`,subLanguage:`xml`,relevance:0},r={begin:`^[-\\*]{3,}`,end:`$`},i={className:`code`,variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:`(~{3,})[^~](.|\\n)*?\\1~*[ ]*`},{begin:"```",end:"```+[ ]*$"},{begin:`~~~`,end:`~~~+[ ]*$`},{begin:"`.+?`"},{begin:`(?=^( {4}|\\t))`,contains:[{begin:`^( {4}|\\t)`,end:`(\\n)$`}],relevance:0}]},a={className:`bullet`,begin:`^[ ]*([*+-]|(\\d+\\.))(?=\\s+)`,end:`\\s+`,excludeEnd:!0},o={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:`symbol`,begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:`link`,begin:/:\s*/,end:/$/,excludeBegin:!0}]},s={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:`string`,relevance:0,begin:`\\[`,end:`\\]`,excludeBegin:!0,returnEnd:!0},{className:`link`,relevance:0,begin:`\\]\\(`,end:`\\)`,excludeBegin:!0,excludeEnd:!0},{className:`symbol`,relevance:0,begin:`\\]\\[`,end:`\\]`,excludeBegin:!0,excludeEnd:!0}]},c={className:`strong`,contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},l={className:`emphasis`,contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},u=e.inherit(c,{contains:[]}),d=e.inherit(l,{contains:[]});c.contains.push(d),l.contains.push(u);let f=[n,s];return[c,l,u,d].forEach(e=>{e.contains=e.contains.concat(f)}),f=f.concat(c,l),{name:`Markdown`,aliases:[`md`,`mkdown`,`mkd`],contains:[{className:`section`,variants:[{begin:`^#{1,6}`,end:`$`,contains:f},{begin:`(?=^.+?\\n[=-]{2,}$)`,contains:[{begin:`^[=-]*$`},{begin:`^`,end:`\\n`,contains:f}]}]},n,a,c,l,{className:`quote`,begin:`^>\\s+`,contains:f,end:`$`},i,r,s,o,{scope:`literal`,match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function nP(e){let t={className:`built_in`,begin:`\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+`},n=/[a-zA-Z@][a-zA-Z0-9_]*/,r={"variable.language":[`this`,`super`],$pattern:n,keyword:`while.export.sizeof.typedef.const.struct.for.union.volatile.static.mutable.if.do.return.goto.enum.else.break.extern.asm.case.default.register.explicit.typename.switch.continue.inline.readonly.assign.readwrite.self.@synchronized.id.typeof.nonatomic.IBOutlet.IBAction.strong.weak.copy.in.out.inout.bycopy.byref.oneway.__strong.__weak.__block.__autoreleasing.@private.@protected.@public.@try.@property.@end.@throw.@catch.@finally.@autoreleasepool.@synthesize.@dynamic.@selector.@optional.@required.@encode.@package.@import.@defs.@compatibility_alias.__bridge.__bridge_transfer.__bridge_retained.__bridge_retain.__covariant.__contravariant.__kindof._Nonnull._Nullable._Null_unspecified.__FUNCTION__.__PRETTY_FUNCTION__.__attribute__.getter.setter.retain.unsafe_unretained.nonnull.nullable.null_unspecified.null_resettable.class.instancetype.NS_DESIGNATED_INITIALIZER.NS_UNAVAILABLE.NS_REQUIRES_SUPER.NS_RETURNS_INNER_POINTER.NS_INLINE.NS_AVAILABLE.NS_DEPRECATED.NS_ENUM.NS_OPTIONS.NS_SWIFT_UNAVAILABLE.NS_ASSUME_NONNULL_BEGIN.NS_ASSUME_NONNULL_END.NS_REFINED_FOR_SWIFT.NS_SWIFT_NAME.NS_SWIFT_NOTHROW.NS_DURING.NS_HANDLER.NS_ENDHANDLER.NS_VALUERETURN.NS_VOIDRETURN`.split(`.`),literal:[`false`,`true`,`FALSE`,`TRUE`,`nil`,`YES`,`NO`,`NULL`],built_in:[`dispatch_once_t`,`dispatch_queue_t`,`dispatch_sync`,`dispatch_async`,`dispatch_once`],type:[`int`,`float`,`char`,`unsigned`,`signed`,`short`,`long`,`double`,`wchar_t`,`unichar`,`void`,`bool`,`BOOL`,`id|0`,`_Bool`]},i={$pattern:n,keyword:[`@interface`,`@class`,`@protocol`,`@implementation`]};return{name:`Objective-C`,aliases:[`mm`,`objc`,`obj-c`,`obj-c++`,`objective-c++`],keywords:r,illegal:`</`,contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:`string`,variants:[{begin:`@"`,end:`"`,illegal:`\\n`,contains:[e.BACKSLASH_ESCAPE]}]},{className:`meta`,begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:`if else elif endif define undef warning error line pragma ifdef ifndef include`},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:`string`}),{className:`string`,begin:/<.*?>/,end:/$/,illegal:`\\n`},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:`class`,begin:`(`+i.keyword.join(`|`)+`)\\b`,end:/(\{|$)/,excludeEnd:!0,keywords:i,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:`\\.`+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function rP(e){let t=e.regex,n=`abs.accept.alarm.and.atan2.bind.binmode.bless.break.caller.chdir.chmod.chomp.chop.chown.chr.chroot.class.close.closedir.connect.continue.cos.crypt.dbmclose.dbmopen.defined.delete.die.do.dump.each.else.elsif.endgrent.endhostent.endnetent.endprotoent.endpwent.endservent.eof.eval.exec.exists.exit.exp.fcntl.field.fileno.flock.for.foreach.fork.format.formline.getc.getgrent.getgrgid.getgrnam.gethostbyaddr.gethostbyname.gethostent.getlogin.getnetbyaddr.getnetbyname.getnetent.getpeername.getpgrp.getpriority.getprotobyname.getprotobynumber.getprotoent.getpwent.getpwnam.getpwuid.getservbyname.getservbyport.getservent.getsockname.getsockopt.given.glob.gmtime.goto.grep.gt.hex.if.index.int.ioctl.join.keys.kill.last.lc.lcfirst.length.link.listen.local.localtime.log.lstat.lt.ma.map.method.mkdir.msgctl.msgget.msgrcv.msgsnd.my.ne.next.no.not.oct.open.opendir.or.ord.our.pack.package.pipe.pop.pos.print.printf.prototype.push.q|0.qq.quotemeta.qw.qx.rand.read.readdir.readline.readlink.readpipe.recv.redo.ref.rename.require.reset.return.reverse.rewinddir.rindex.rmdir.say.scalar.seek.seekdir.select.semctl.semget.semop.send.setgrent.sethostent.setnetent.setpgrp.setpriority.setprotoent.setpwent.setservent.setsockopt.shift.shmctl.shmget.shmread.shmwrite.shutdown.sin.sleep.socket.socketpair.sort.splice.split.sprintf.sqrt.srand.stat.state.study.sub.substr.symlink.syscall.sysopen.sysread.sysseek.system.syswrite.tell.telldir.tie.tied.time.times.tr.truncate.uc.ucfirst.umask.undef.unless.unlink.unpack.unshift.untie.until.use.utime.values.vec.wait.waitpid.wantarray.warn.when.while.write.x|0.xor.y|0`.split(`.`),r=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:n.join(` `)},a={className:`subst`,begin:`[$@]\\{`,end:`\\}`,keywords:i},o={begin:/->\{/,end:/\}/},s={scope:`attr`,match:/\s+:\s*\w+(\s*\(.*?\))?/},c={scope:`variable`,variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,`(?![A-Za-z])(?![@$%])`)},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[s]},l={className:`number`,variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},u=[e.BACKSLASH_ESCAPE,a,c],d=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],f=(e,n,i=`\\1`)=>{let a=i===`\\1`?i:t.concat(i,n);return t.concat(t.concat(`(?:`,e,`)`),n,/(?:\\.|[^\\\/])*?/,a,/(?:\\.|[^\\\/])*?/,i,r)},p=(e,n,i)=>t.concat(t.concat(`(?:`,e,`)`),n,/(?:\\.|[^\\\/])*?/,i,r),m=[c,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),o,{className:`string`,contains:u,variants:[{begin:`q[qwxr]?\\s*\\(`,end:`\\)`,relevance:5},{begin:`q[qwxr]?\\s*\\[`,end:`\\]`,relevance:5},{begin:`q[qwxr]?\\s*\\{`,end:`\\}`,relevance:5},{begin:`q[qwxr]?\\s*\\|`,end:`\\|`,relevance:5},{begin:`q[qwxr]?\\s*<`,end:`>`,relevance:5},{begin:`qw\\s+q`,end:`q`,relevance:5},{begin:`'`,end:`'`,contains:[e.BACKSLASH_ESCAPE]},{begin:`"`,end:`"`},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:`-?\\w+\\s*=>`,relevance:0}]},l,{begin:`(\\/\\/|`+e.RE_STARTERS_RE+`|\\b(split|return|print|reverse|grep)\\b)\\s*`,keywords:`split return print reverse grep`,relevance:0,contains:[e.HASH_COMMENT_MODE,{className:`regexp`,variants:[{begin:f(`s|tr|y`,t.either(...d,{capture:!0}))},{begin:f(`s|tr|y`,`\\(`,`\\)`)},{begin:f(`s|tr|y`,`\\[`,`\\]`)},{begin:f(`s|tr|y`,`\\{`,`\\}`)}],relevance:2},{className:`regexp`,variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:p(`(?:m|qr)?`,/\//,/\//)},{begin:p(`m|qr`,t.either(...d,{capture:!0}),/\1/)},{begin:p(`m|qr`,/\(/,/\)/)},{begin:p(`m|qr`,/\[/,/\]/)},{begin:p(`m|qr`,/\{/,/\}/)}]}]},{className:`function`,beginKeywords:`sub method`,end:`(\\s*\\(.*?\\))?[;{]`,excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,s]},{className:`class`,beginKeywords:`class`,end:`[;{]`,excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,s,l]},{begin:`-\\w\\b`,relevance:0},{begin:`^__DATA__$`,end:`^__END__$`,subLanguage:`mojolicious`,contains:[{begin:`^@@.*`,end:`$`,className:`comment`}]}];return a.contains=m,o.contains=m,{name:`Perl`,aliases:[`pl`,`pm`],keywords:i,contains:m}}function iP(e){let t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),i=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),a=t.concat(/[A-Z]+/,n),o={scope:`variable`,match:`\\$+`+r},s={scope:`meta`,variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},c={scope:`subst`,variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},l=e.inherit(e.APOS_STRING_MODE,{illegal:null}),u=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(c)}),d={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(c),"on:begin":(e,t)=>{t.data._beginMatch=e[1]||e[2]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}},f=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),p=`[
|
|
237
|
+
]`,m={scope:`string`,variants:[u,l,d,f]},h={scope:`number`,variants:[{begin:`\\b0[bB][01]+(?:_[01]+)*\\b`},{begin:`\\b0[oO][0-7]+(?:_[0-7]+)*\\b`},{begin:`\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b`},{begin:`(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?`}],relevance:0},g=[`false`,`null`,`true`],_=`__CLASS__.__DIR__.__FILE__.__FUNCTION__.__COMPILER_HALT_OFFSET__.__LINE__.__METHOD__.__NAMESPACE__.__TRAIT__.die.echo.exit.include.include_once.print.require.require_once.array.abstract.and.as.binary.bool.boolean.break.callable.case.catch.class.clone.const.continue.declare.default.do.double.else.elseif.empty.enddeclare.endfor.endforeach.endif.endswitch.endwhile.enum.eval.extends.final.finally.float.for.foreach.from.global.goto.if.implements.instanceof.insteadof.int.integer.interface.isset.iterable.list.match|0.mixed.new.never.object.or.private.protected.public.readonly.real.return.string.switch.throw.trait.try.unset.use.var.void.while.xor.yield`.split(`.`),v=`Error|0.AppendIterator.ArgumentCountError.ArithmeticError.ArrayIterator.ArrayObject.AssertionError.BadFunctionCallException.BadMethodCallException.CachingIterator.CallbackFilterIterator.CompileError.Countable.DirectoryIterator.DivisionByZeroError.DomainException.EmptyIterator.ErrorException.Exception.FilesystemIterator.FilterIterator.GlobIterator.InfiniteIterator.InvalidArgumentException.IteratorIterator.LengthException.LimitIterator.LogicException.MultipleIterator.NoRewindIterator.OutOfBoundsException.OutOfRangeException.OuterIterator.OverflowException.ParentIterator.ParseError.RangeException.RecursiveArrayIterator.RecursiveCachingIterator.RecursiveCallbackFilterIterator.RecursiveDirectoryIterator.RecursiveFilterIterator.RecursiveIterator.RecursiveIteratorIterator.RecursiveRegexIterator.RecursiveTreeIterator.RegexIterator.RuntimeException.SeekableIterator.SplDoublyLinkedList.SplFileInfo.SplFileObject.SplFixedArray.SplHeap.SplMaxHeap.SplMinHeap.SplObjectStorage.SplObserver.SplPriorityQueue.SplQueue.SplStack.SplSubject.SplTempFileObject.TypeError.UnderflowException.UnexpectedValueException.UnhandledMatchError.ArrayAccess.BackedEnum.Closure.Fiber.Generator.Iterator.IteratorAggregate.Serializable.Stringable.Throwable.Traversable.UnitEnum.WeakReference.WeakMap.Directory.__PHP_Incomplete_Class.parent.php_user_filter.self.static.stdClass`.split(`.`),y={keyword:_,literal:(e=>{let t=[];return e.forEach(e=>{t.push(e),e.toLowerCase()===e?t.push(e.toUpperCase()):t.push(e.toLowerCase())}),t})(g),built_in:v},b=e=>e.map(e=>e.replace(/\|\d+$/,``)),x={variants:[{match:[/new/,t.concat(p,`+`),t.concat(`(?!`,b(v).join(`\\b|`),`\\b)`),i],scope:{1:`keyword`,4:`title.class`}}]},S=t.concat(r,`\\b(?!\\()`),C={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),S],scope:{2:`variable.constant`}},{match:[/::/,/class/],scope:{2:`variable.language`}},{match:[i,t.concat(/::/,t.lookahead(/(?!class\b)/)),S],scope:{1:`title.class`,3:`variable.constant`}},{match:[i,t.concat(`::`,t.lookahead(/(?!class\b)/))],scope:{1:`title.class`}},{match:[i,/::/,/class/],scope:{1:`title.class`,3:`variable.language`}}]},w={scope:`attr`,match:t.concat(r,t.lookahead(`:`),t.lookahead(/(?!::)/))},T={relevance:0,begin:/\(/,end:/\)/,keywords:y,contains:[w,o,C,e.C_BLOCK_COMMENT_MODE,m,h,x]},E={relevance:0,match:[/\b/,t.concat(`(?!fn\\b|function\\b|`,b(_).join(`\\b|`),`|`,b(v).join(`\\b|`),`\\b)`),r,t.concat(p,`*`),t.lookahead(/(?=\()/)],scope:{3:`title.function.invoke`},contains:[T]};T.contains.push(E);let D=[w,C,e.C_BLOCK_COMMENT_MODE,m,h,x],O={begin:t.concat(/#\[\s*\\?/,t.either(i,a)),beginScope:`meta`,end:/]/,endScope:`meta`,keywords:{literal:g,keyword:[`new`,`array`]},contains:[{begin:/\[/,end:/]/,keywords:{literal:g,keyword:[`new`,`array`]},contains:[`self`,...D]},...D,{scope:`meta`,variants:[{match:i},{match:a}]}]};return{case_insensitive:!1,keywords:y,contains:[O,e.HASH_COMMENT_MODE,e.COMMENT(`//`,`$`),e.COMMENT(`/\\*`,`\\*/`,{contains:[{scope:`doctag`,match:`@[A-Za-z]+`}]}),{match:/__halt_compiler\(\);/,keywords:`__halt_compiler`,starts:{scope:`comment`,end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:`meta`,endsParent:!0}]}},s,{scope:`variable.language`,match:/\$this\b/},o,E,C,{match:[/const/,/\s/,r],scope:{1:`keyword`,3:`variable.constant`}},x,{scope:`function`,relevance:0,beginKeywords:`fn function`,end:/[;{]/,excludeEnd:!0,illegal:`[$%\\[]`,contains:[{beginKeywords:`use`},e.UNDERSCORE_TITLE_MODE,{begin:`=>`,endsParent:!0},{scope:`params`,begin:`\\(`,end:`\\)`,excludeBegin:!0,excludeEnd:!0,keywords:y,contains:[`self`,O,o,C,e.C_BLOCK_COMMENT_MODE,m,h]}]},{scope:`class`,variants:[{beginKeywords:`enum`,illegal:/[($"]/},{beginKeywords:`class interface trait`,illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:`extends implements`},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:`namespace`,relevance:0,end:`;`,illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:`title.class`})]},{beginKeywords:`use`,relevance:0,end:`;`,contains:[{match:/\b(as|const|function)\b/,scope:`keyword`},e.UNDERSCORE_TITLE_MODE]},m,h]}}function aP(e){return{name:`PHP template`,subLanguage:`xml`,contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:`php`,contains:[{begin:`/\\*`,end:`\\*/`,skip:!0},{begin:`b"`,end:`"`,skip:!0},{begin:`b'`,end:`'`,skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function oP(e){return{name:`Plain text`,aliases:[`text`,`txt`],disableAutodetect:!0}}function sP(e){let t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=`and.as.assert.async.await.break.case.class.continue.def.del.elif.else.except.finally.for.from.global.if.import.in.is.lambda.match.nonlocal|10.not.or.pass.raise.return.try.while.with.yield`.split(`.`),i={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:`__import__.abs.all.any.ascii.bin.bool.breakpoint.bytearray.bytes.callable.chr.classmethod.compile.complex.delattr.dict.dir.divmod.enumerate.eval.exec.filter.float.format.frozenset.getattr.globals.hasattr.hash.help.hex.id.input.int.isinstance.issubclass.iter.len.list.locals.map.max.memoryview.min.next.object.oct.open.ord.pow.print.property.range.repr.reversed.round.set.setattr.slice.sorted.staticmethod.str.sum.super.tuple.type.vars.zip`.split(`.`),literal:[`__debug__`,`Ellipsis`,`False`,`None`,`NotImplemented`,`True`],type:[`Any`,`Callable`,`Coroutine`,`Dict`,`List`,`Literal`,`Generic`,`Optional`,`Sequence`,`Set`,`Tuple`,`Type`,`Union`]},a={className:`meta`,begin:/^(>>>|\.\.\.) /},o={className:`subst`,begin:/\{/,end:/\}/,keywords:i,illegal:/#/},s={begin:/\{\{/,relevance:0},c={className:`string`,contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a,s,o]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a,s,o]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,s,o]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,s,o]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},l=`[0-9](_?[0-9])*`,u=`(\\b(${l}))?\\.(${l})|\\b(${l})\\.`,d=`\\b|${r.join(`|`)}`,f={className:`number`,relevance:0,variants:[{begin:`(\\b(${l})|(${u}))[eE][+-]?(${l})[jJ]?(?=${d})`},{begin:`(${u})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${d})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${d})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${d})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${d})`},{begin:`\\b(${l})[jJ](?=${d})`}]},p={className:`comment`,begin:t.lookahead(/# type:/),end:/$/,keywords:i,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},m={className:`params`,variants:[{className:``,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,contains:[`self`,a,f,c,e.HASH_COMMENT_MODE]}]};return o.contains=[c,f,a],{name:`Python`,aliases:[`py`,`gyp`,`ipython`],unicodeRegex:!0,keywords:i,illegal:/(<\/|\?)|=>/,contains:[a,f,{scope:`variable.language`,match:/\bself\b/},{beginKeywords:`if`,relevance:0},{match:/\bor\b/,scope:`keyword`},c,p,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:`keyword`,3:`title.function`},contains:[m]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:`keyword`,3:`title.class`,6:`title.class.inherited`}},{className:`meta`,begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[f,m,c]}]}}function cP(e){return{aliases:[`pycon`],contains:[{className:`meta.prompt`,starts:{end:/ |$/,starts:{end:`$`,subLanguage:`python`}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function lP(e){let t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,a=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:`R`,keywords:{$pattern:n,keyword:`function if in break next repeat else for while`,literal:`NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10`,built_in:`LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm`},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:`doctag`,match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:`doctag`,begin:`@param`,end:/$/,contains:[{scope:`variable`,variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:`doctag`,match:/@[a-zA-Z]+/},{scope:`keyword`,match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:`string`,contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:`"`,end:`"`,relevance:0},{begin:`'`,end:`'`,relevance:0}]},{relevance:0,variants:[{scope:{1:`operator`,2:`number`},match:[i,r]},{scope:{1:`operator`,2:`number`},match:[/%[^%]*%/,r]},{scope:{1:`punctuation`,2:`number`},match:[a,r]},{scope:{2:`number`},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:`operator`},match:[n,/\s+/,/<-/,/\s+/]},{scope:`operator`,relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:`punctuation`,relevance:0,match:a},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function uP(e){let t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=t.concat(r,/(::\w+)*/),a={"variable.constant":[`__FILE__`,`__LINE__`,`__ENCODING__`],"variable.language":[`self`,`super`],keyword:[`alias`,`and`,`begin`,`BEGIN`,`break`,`case`,`class`,`defined`,`do`,`else`,`elsif`,`end`,`END`,`ensure`,`for`,`if`,`in`,`module`,`next`,`not`,`or`,`redo`,`require`,`rescue`,`retry`,`return`,`then`,`undef`,`unless`,`until`,`when`,`while`,`yield`,...[`include`,`extend`,`prepend`,`public`,`private`,`protected`,`raise`,`throw`]],built_in:[`proc`,`lambda`,`attr_accessor`,`attr_reader`,`attr_writer`,`define_method`,`private_constant`,`module_function`],literal:[`true`,`false`,`nil`]},o={className:`doctag`,begin:`@[A-Za-z]+`},s={begin:`#<`,end:`>`},c=[e.COMMENT(`#`,`$`,{contains:[o]}),e.COMMENT(`^=begin`,`^=end`,{contains:[o],relevance:10}),e.COMMENT(`^__END__`,e.MATCH_NOTHING_RE)],l={className:`subst`,begin:/#\{/,end:/\}/,keywords:a},u={className:`string`,contains:[e.BACKSLASH_ESCAPE,l],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,l]})]}]},d=`[0-9](_?[0-9])*`,f={className:`number`,relevance:0,variants:[{begin:`\\b([1-9](_?[0-9])*|0)(\\.(${d}))?([eE][+-]?(${d})|r)?i?\\b`},{begin:`\\b0[dD][0-9](_?[0-9])*r?i?\\b`},{begin:`\\b0[bB][0-1](_?[0-1])*r?i?\\b`},{begin:`\\b0[oO][0-7](_?[0-7])*r?i?\\b`},{begin:`\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b`},{begin:`\\b0(_?[0-7])+r?i?\\b`}]},p={variants:[{match:/\(\)/},{className:`params`,begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:a}]},m=[u,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/\b(class|module)\s+/,i]}],scope:{2:`title.class`,4:`title.class.inherited`},keywords:a},{match:[/(include|extend)\s+/,i],scope:{2:`title.class`},keywords:a},{relevance:0,match:[i,/\.new[. (]/],scope:{1:`title.class`}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:`variable.constant`},{relevance:0,match:r,scope:`title.class`},{match:[/def/,/\s+/,n],scope:{1:`keyword`,3:`title.function`},contains:[p]},{begin:e.IDENT_RE+`::`},{className:`symbol`,begin:e.UNDERSCORE_IDENT_RE+`(!|\\?)?:`,relevance:0},{className:`symbol`,begin:`:(?!\\s)`,contains:[u,{begin:n}],relevance:0},f,{className:`variable`,begin:`(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])`},{className:`params`,begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:a},{begin:`(`+e.RE_STARTERS_RE+`|unless)\\s*`,keywords:`unless`,contains:[{className:`regexp`,contains:[e.BACKSLASH_ESCAPE,l],illegal:/\n/,variants:[{begin:`/`,end:`/[a-z]*`},{begin:/%r\{/,end:/\}[a-z]*/},{begin:`%r\\(`,end:`\\)[a-z]*`},{begin:`%r!`,end:`![a-z]*`},{begin:`%r\\[`,end:`\\][a-z]*`}]}].concat(s,c),relevance:0}].concat(s,c);l.contains=m,p.contains=m;let h=[{begin:/^\s*=>/,starts:{end:`$`,contains:m}},{className:`meta.prompt`,begin:`^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]|(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>)(?=[ ])`,starts:{end:`$`,keywords:a,contains:m}}];return c.unshift(s),{name:`Ruby`,aliases:[`rb`,`gemspec`,`podspec`,`thor`,`irb`],keywords:a,illegal:/\/\*/,contains:[e.SHEBANG({binary:`ruby`})].concat(h,c,m)}}function dP(e){let t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),i=t.concat(n,e.IDENT_RE),a={className:`title.function.invoke`,relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,i,t.lookahead(/\s*\(/))},o=`([ui](8|16|32|64|128|size)|f(32|64))?`,s=`abstract.as.async.await.become.box.break.const.continue.crate.do.dyn.else.enum.extern.false.final.fn.for.if.impl.in.let.loop.macro.match.mod.move.mut.override.priv.pub.ref.return.self.Self.static.struct.super.trait.true.try.type.typeof.union.unsafe.unsized.use.virtual.where.while.yield`.split(`.`),c=[`true`,`false`,`Some`,`None`,`Ok`,`Err`],l=`drop .Copy.Send.Sized.Sync.Drop.Fn.FnMut.FnOnce.ToOwned.Clone.Debug.PartialEq.PartialOrd.Eq.Ord.AsRef.AsMut.Into.From.Default.Iterator.Extend.IntoIterator.DoubleEndedIterator.ExactSizeIterator.SliceConcatExt.ToString.assert!.assert_eq!.bitflags!.bytes!.cfg!.col!.concat!.concat_idents!.debug_assert!.debug_assert_eq!.env!.eprintln!.panic!.file!.format!.format_args!.include_bytes!.include_str!.line!.local_data_key!.module_path!.option_env!.print!.println!.select!.stringify!.try!.unimplemented!.unreachable!.vec!.write!.writeln!.macro_rules!.assert_ne!.debug_assert_ne!`.split(`.`),u=[`i8`,`i16`,`i32`,`i64`,`i128`,`isize`,`u8`,`u16`,`u32`,`u64`,`u128`,`usize`,`f32`,`f64`,`str`,`char`,`bool`,`Box`,`Option`,`Result`,`String`,`Vec`];return{name:`Rust`,aliases:[`rs`],keywords:{$pattern:e.IDENT_RE+`!?`,type:u,keyword:s,literal:c,built_in:l},illegal:`</`,contains:[e.C_LINE_COMMENT_MODE,e.COMMENT(`/\\*`,`\\*/`,{contains:[`self`]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:`symbol`,begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:`string`,variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:`char.escape`,match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:`number`,variants:[{begin:`\\b0b([01_]+)`+o},{begin:`\\b0o([0-7_]+)`+o},{begin:`\\b0x([A-Fa-f0-9_]+)`+o},{begin:`\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)`+o}],relevance:0},{begin:[/fn/,/\s+/,r],className:{1:`keyword`,3:`title.function`}},{className:`meta`,begin:`#!?\\[`,end:`\\]`,contains:[{className:`string`,begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,r],className:{1:`keyword`,3:`keyword`,4:`variable`}},{begin:[/for/,/\s+/,r,/\s+/,/in/],className:{1:`keyword`,3:`variable`,5:`keyword`}},{begin:[/type/,/\s+/,r],className:{1:`keyword`,3:`title.class`}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,r],className:{1:`keyword`,3:`title.class`}},{begin:e.IDENT_RE+`::`,keywords:{keyword:`Self`,built_in:l,type:u}},{className:`punctuation`,begin:`->`},a]}}var fP=e=>({IMPORTANT:{scope:`meta`,begin:`!important`},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:`number`,begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:`built_in`,begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:`selector-attr`,begin:/\[/,end:/\]/,illegal:`$`,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:`number`,begin:e.NUMBER_RE+`(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?`,relevance:0},CSS_VARIABLE:{className:`attr`,begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),pP=`a.abbr.address.article.aside.audio.b.blockquote.body.button.canvas.caption.cite.code.dd.del.details.dfn.div.dl.dt.em.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hgroup.html.i.iframe.img.input.ins.kbd.label.legend.li.main.mark.menu.nav.object.ol.optgroup.option.p.picture.q.quote.samp.section.select.source.span.strong.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.tr.ul.var.video`.split(`.`),mP=`defs.g.marker.mask.pattern.svg.switch.symbol.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feFlood.feGaussianBlur.feImage.feMerge.feMorphology.feOffset.feSpecularLighting.feTile.feTurbulence.linearGradient.radialGradient.stop.circle.ellipse.image.line.path.polygon.polyline.rect.text.use.textPath.tspan.foreignObject.clipPath`.split(`.`),hP=[...pP,...mP],gP=`any-hover.any-pointer.aspect-ratio.color.color-gamut.color-index.device-aspect-ratio.device-height.device-width.display-mode.forced-colors.grid.height.hover.inverted-colors.monochrome.orientation.overflow-block.overflow-inline.pointer.prefers-color-scheme.prefers-contrast.prefers-reduced-motion.prefers-reduced-transparency.resolution.scan.scripting.update.width.min-width.max-width.min-height.max-height`.split(`.`).sort().reverse(),_P=`active.any-link.blank.checked.current.default.defined.dir.disabled.drop.empty.enabled.first.first-child.first-of-type.fullscreen.future.focus.focus-visible.focus-within.has.host.host-context.hover.indeterminate.in-range.invalid.is.lang.last-child.last-of-type.left.link.local-link.not.nth-child.nth-col.nth-last-child.nth-last-col.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.past.placeholder-shown.read-only.read-write.required.right.root.scope.target.target-within.user-invalid.valid.visited.where`.split(`.`).sort().reverse(),vP=[`after`,`backdrop`,`before`,`cue`,`cue-region`,`first-letter`,`first-line`,`grammar-error`,`marker`,`part`,`placeholder`,`selection`,`slotted`,`spelling-error`].sort().reverse(),yP=`accent-color.align-content.align-items.align-self.alignment-baseline.all.anchor-name.animation.animation-composition.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-range.animation-range-end.animation-range-start.animation-timeline.animation-timing-function.appearance.aspect-ratio.backdrop-filter.backface-visibility.background.background-attachment.background-blend-mode.background-clip.background-color.background-image.background-origin.background-position.background-position-x.background-position-y.background-repeat.background-size.baseline-shift.block-size.border.border-block.border-block-color.border-block-end.border-block-end-color.border-block-end-style.border-block-end-width.border-block-start.border-block-start-color.border-block-start-style.border-block-start-width.border-block-style.border-block-width.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-end-end-radius.border-end-start-radius.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-inline.border-inline-color.border-inline-end.border-inline-end-color.border-inline-end-style.border-inline-end-width.border-inline-start.border-inline-start-color.border-inline-start-style.border-inline-start-width.border-inline-style.border-inline-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-start-end-radius.border-start-start-radius.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-align.box-decoration-break.box-direction.box-flex.box-flex-group.box-lines.box-ordinal-group.box-orient.box-pack.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.caret-color.clear.clip.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.color-scheme.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.contain.contain-intrinsic-block-size.contain-intrinsic-height.contain-intrinsic-inline-size.contain-intrinsic-size.contain-intrinsic-width.container.container-name.container-type.content.content-visibility.counter-increment.counter-reset.counter-set.cue.cue-after.cue-before.cursor.cx.cy.direction.display.dominant-baseline.empty-cells.enable-background.field-sizing.fill.fill-opacity.fill-rule.filter.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.flood-color.flood-opacity.flow.font.font-display.font-family.font-feature-settings.font-kerning.font-language-override.font-optical-sizing.font-palette.font-size.font-size-adjust.font-smooth.font-smoothing.font-stretch.font-style.font-synthesis.font-synthesis-position.font-synthesis-small-caps.font-synthesis-style.font-synthesis-weight.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-emoji.font-variant-ligatures.font-variant-numeric.font-variant-position.font-variation-settings.font-weight.forced-color-adjust.gap.glyph-orientation-horizontal.glyph-orientation-vertical.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-rows.grid-column.grid-column-end.grid-column-start.grid-gap.grid-row.grid-row-end.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphenate-character.hyphenate-limit-chars.hyphens.icon.image-orientation.image-rendering.image-resolution.ime-mode.initial-letter.initial-letter-align.inline-size.inset.inset-area.inset-block.inset-block-end.inset-block-start.inset-inline.inset-inline-end.inset-inline-start.isolation.justify-content.justify-items.justify-self.kerning.left.letter-spacing.lighting-color.line-break.line-height.line-height-step.list-style.list-style-image.list-style-position.list-style-type.margin.margin-block.margin-block-end.margin-block-start.margin-bottom.margin-inline.margin-inline-end.margin-inline-start.margin-left.margin-right.margin-top.margin-trim.marker.marker-end.marker-mid.marker-start.marks.mask.mask-border.mask-border-mode.mask-border-outset.mask-border-repeat.mask-border-slice.mask-border-source.mask-border-width.mask-clip.mask-composite.mask-image.mask-mode.mask-origin.mask-position.mask-repeat.mask-size.mask-type.masonry-auto-flow.math-depth.math-shift.math-style.max-block-size.max-height.max-inline-size.max-width.min-block-size.min-height.min-inline-size.min-width.mix-blend-mode.nav-down.nav-index.nav-left.nav-right.nav-up.none.normal.object-fit.object-position.offset.offset-anchor.offset-distance.offset-path.offset-position.offset-rotate.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-anchor.overflow-block.overflow-clip-margin.overflow-inline.overflow-wrap.overflow-x.overflow-y.overlay.overscroll-behavior.overscroll-behavior-block.overscroll-behavior-inline.overscroll-behavior-x.overscroll-behavior-y.padding.padding-block.padding-block-end.padding-block-start.padding-bottom.padding-inline.padding-inline-end.padding-inline-start.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.paint-order.pause.pause-after.pause-before.perspective.perspective-origin.place-content.place-items.place-self.pointer-events.position.position-anchor.position-visibility.print-color-adjust.quotes.r.resize.rest.rest-after.rest-before.right.rotate.row-gap.ruby-align.ruby-position.scale.scroll-behavior.scroll-margin.scroll-margin-block.scroll-margin-block-end.scroll-margin-block-start.scroll-margin-bottom.scroll-margin-inline.scroll-margin-inline-end.scroll-margin-inline-start.scroll-margin-left.scroll-margin-right.scroll-margin-top.scroll-padding.scroll-padding-block.scroll-padding-block-end.scroll-padding-block-start.scroll-padding-bottom.scroll-padding-inline.scroll-padding-inline-end.scroll-padding-inline-start.scroll-padding-left.scroll-padding-right.scroll-padding-top.scroll-snap-align.scroll-snap-stop.scroll-snap-type.scroll-timeline.scroll-timeline-axis.scroll-timeline-name.scrollbar-color.scrollbar-gutter.scrollbar-width.shape-image-threshold.shape-margin.shape-outside.shape-rendering.speak.speak-as.src.stop-color.stop-opacity.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.tab-size.table-layout.text-align.text-align-all.text-align-last.text-anchor.text-combine-upright.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-skip-ink.text-decoration-style.text-decoration-thickness.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-indent.text-justify.text-orientation.text-overflow.text-rendering.text-shadow.text-size-adjust.text-transform.text-underline-offset.text-underline-position.text-wrap.text-wrap-mode.text-wrap-style.timeline-scope.top.touch-action.transform.transform-box.transform-origin.transform-style.transition.transition-behavior.transition-delay.transition-duration.transition-property.transition-timing-function.translate.unicode-bidi.user-modify.user-select.vector-effect.vertical-align.view-timeline.view-timeline-axis.view-timeline-inset.view-timeline-name.view-transition-name.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.white-space.white-space-collapse.widows.width.will-change.word-break.word-spacing.word-wrap.writing-mode.x.y.z-index.zoom`.split(`.`).sort().reverse();function bP(e){let t=fP(e),n=vP,r=_P,i=`@[a-z-]+`,a={className:`variable`,begin:`(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b`,relevance:0};return{name:`SCSS`,case_insensitive:!0,illegal:`[=/|']`,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:`selector-id`,begin:`#[A-Za-z0-9_-]+`,relevance:0},{className:`selector-class`,begin:`\\.[A-Za-z0-9_-]+`,relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:`selector-tag`,begin:`\\b(`+hP.join(`|`)+`)\\b`,relevance:0},{className:`selector-pseudo`,begin:`:(`+r.join(`|`)+`)`},{className:`selector-pseudo`,begin:`:(:)?(`+n.join(`|`)+`)`},a,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:`attribute`,begin:`\\b(`+yP.join(`|`)+`)\\b`},{begin:`\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b`},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,a,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:`@(page|font-face)`,keywords:{$pattern:i,keyword:`@page @font-face`}},{begin:`@`,end:`[{;]`,returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:`and or not only`,attribute:gP.join(` `)},contains:[{begin:i,className:`keyword`},{begin:/[a-z-]+(?=:)/,className:`attribute`},a,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function xP(e){return{name:`Shell Session`,aliases:[`console`,`shellsession`],contains:[{className:`meta.prompt`,begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:`bash`}}]}}function ite(e){let t=e.regex,n=e.COMMENT(`--`,`$`),r={scope:`string`,variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},i={begin:/"/,end:/"/,contains:[{match:/""/}]},a=[`true`,`false`,`unknown`],o=[`double precision`,`large object`,`with timezone`,`without timezone`],s=`bigint.binary.blob.boolean.char.character.clob.date.dec.decfloat.decimal.float.int.integer.interval.nchar.nclob.national.numeric.real.row.smallint.time.timestamp.varchar.varying.varbinary`.split(`.`),c=[`add`,`asc`,`collation`,`desc`,`final`,`first`,`last`,`view`],l=`abs.acos.all.allocate.alter.and.any.are.array.array_agg.array_max_cardinality.as.asensitive.asin.asymmetric.at.atan.atomic.authorization.avg.begin.begin_frame.begin_partition.between.bigint.binary.blob.boolean.both.by.call.called.cardinality.cascaded.case.cast.ceil.ceiling.char.char_length.character.character_length.check.classifier.clob.close.coalesce.collate.collect.column.commit.condition.connect.constraint.contains.convert.copy.corr.corresponding.cos.cosh.count.covar_pop.covar_samp.create.cross.cube.cume_dist.current.current_catalog.current_date.current_default_transform_group.current_path.current_role.current_row.current_schema.current_time.current_timestamp.current_path.current_role.current_transform_group_for_type.current_user.cursor.cycle.date.day.deallocate.dec.decimal.decfloat.declare.default.define.delete.dense_rank.deref.describe.deterministic.disconnect.distinct.double.drop.dynamic.each.element.else.empty.end.end_frame.end_partition.end-exec.equals.escape.every.except.exec.execute.exists.exp.external.extract.false.fetch.filter.first_value.float.floor.for.foreign.frame_row.free.from.full.function.fusion.get.global.grant.group.grouping.groups.having.hold.hour.identity.in.indicator.initial.inner.inout.insensitive.insert.int.integer.intersect.intersection.interval.into.is.join.json_array.json_arrayagg.json_exists.json_object.json_objectagg.json_query.json_table.json_table_primitive.json_value.lag.language.large.last_value.lateral.lead.leading.left.like.like_regex.listagg.ln.local.localtime.localtimestamp.log.log10.lower.match.match_number.match_recognize.matches.max.member.merge.method.min.minute.mod.modifies.module.month.multiset.national.natural.nchar.nclob.new.no.none.normalize.not.nth_value.ntile.null.nullif.numeric.octet_length.occurrences_regex.of.offset.old.omit.on.one.only.open.or.order.out.outer.over.overlaps.overlay.parameter.partition.pattern.per.percent.percent_rank.percentile_cont.percentile_disc.period.portion.position.position_regex.power.precedes.precision.prepare.primary.procedure.ptf.range.rank.reads.real.recursive.ref.references.referencing.regr_avgx.regr_avgy.regr_count.regr_intercept.regr_r2.regr_slope.regr_sxx.regr_sxy.regr_syy.release.result.return.returns.revoke.right.rollback.rollup.row.row_number.rows.running.savepoint.scope.scroll.search.second.seek.select.sensitive.session_user.set.show.similar.sin.sinh.skip.smallint.some.specific.specifictype.sql.sqlexception.sqlstate.sqlwarning.sqrt.start.static.stddev_pop.stddev_samp.submultiset.subset.substring.substring_regex.succeeds.sum.symmetric.system.system_time.system_user.table.tablesample.tan.tanh.then.time.timestamp.timezone_hour.timezone_minute.to.trailing.translate.translate_regex.translation.treat.trigger.trim.trim_array.true.truncate.uescape.union.unique.unknown.unnest.update.upper.user.using.value.values.value_of.var_pop.var_samp.varbinary.varchar.varying.versioning.when.whenever.where.width_bucket.window.with.within.without.year`.split(`.`),u=`abs.acos.array_agg.asin.atan.avg.cast.ceil.ceiling.coalesce.corr.cos.cosh.count.covar_pop.covar_samp.cume_dist.dense_rank.deref.element.exp.extract.first_value.floor.json_array.json_arrayagg.json_exists.json_object.json_objectagg.json_query.json_table.json_table_primitive.json_value.lag.last_value.lead.listagg.ln.log.log10.lower.max.min.mod.nth_value.ntile.nullif.percent_rank.percentile_cont.percentile_disc.position.position_regex.power.rank.regr_avgx.regr_avgy.regr_count.regr_intercept.regr_r2.regr_slope.regr_sxx.regr_sxy.regr_syy.row_number.sin.sinh.sqrt.stddev_pop.stddev_samp.substring.substring_regex.sum.tan.tanh.translate.translate_regex.treat.trim.trim_array.unnest.upper.value_of.var_pop.var_samp.width_bucket`.split(`.`),d=[`current_catalog`,`current_date`,`current_default_transform_group`,`current_path`,`current_role`,`current_schema`,`current_transform_group_for_type`,`current_user`,`session_user`,`system_time`,`system_user`,`current_time`,`localtime`,`current_timestamp`,`localtimestamp`],f=[`create table`,`insert into`,`primary key`,`foreign key`,`not null`,`alter table`,`add constraint`,`grouping sets`,`on overflow`,`character set`,`respect nulls`,`ignore nulls`,`nulls first`,`nulls last`,`depth first`,`breadth first`],p=u,m=[...l,...c].filter(e=>!u.includes(e)),h={scope:`variable`,match:/@[a-z0-9][a-z0-9_]*/},g={scope:`operator`,match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},_={match:t.concat(/\b/,t.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function v(e){return t.concat(/\b/,t.either(...e.map(e=>e.replace(/\s+/,`\\s+`))),/\b/)}let y={scope:`keyword`,match:v(f),relevance:0};function b(e,{exceptions:t,when:n}={}){let r=n;return t||=[],e.map(e=>e.match(/\|\d+$/)||t.includes(e)?e:r(e)?`${e}|0`:e)}return{name:`SQL`,case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:b(m,{when:e=>e.length<3}),literal:a,type:s,built_in:d},contains:[{scope:`type`,match:v(o)},y,_,h,r,i,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,g]}}function SP(e){return e?typeof e==`string`?e:e.source:null}function CP(e){return wP(`(?=`,e,`)`)}function wP(...e){return e.map(e=>SP(e)).join(``)}function TP(e){let t=e[e.length-1];return typeof t==`object`&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function EP(...e){return`(`+(TP(e).capture?``:`?:`)+e.map(e=>SP(e)).join(`|`)+`)`}var DP=e=>wP(/\b/,e,/\w$/.test(e)?/\b/:/\B/),OP=[`Protocol`,`Type`].map(DP),kP=[`init`,`self`].map(DP),AP=[`Any`,`Self`],jP=[`actor`,`any`,`associatedtype`,`async`,`await`,/as\?/,/as!/,`as`,`borrowing`,`break`,`case`,`catch`,`class`,`consume`,`consuming`,`continue`,`convenience`,`copy`,`default`,`defer`,`deinit`,`didSet`,`distributed`,`do`,`dynamic`,`each`,`else`,`enum`,`extension`,`fallthrough`,/fileprivate\(set\)/,`fileprivate`,`final`,`for`,`func`,`get`,`guard`,`if`,`import`,`indirect`,`infix`,/init\?/,/init!/,`inout`,/internal\(set\)/,`internal`,`in`,`is`,`isolated`,`nonisolated`,`lazy`,`let`,`macro`,`mutating`,`nonmutating`,/open\(set\)/,`open`,`operator`,`optional`,`override`,`package`,`postfix`,`precedencegroup`,`prefix`,/private\(set\)/,`private`,`protocol`,/public\(set\)/,`public`,`repeat`,`required`,`rethrows`,`return`,`set`,`some`,`static`,`struct`,`subscript`,`super`,`switch`,`throws`,`throw`,/try\?/,/try!/,`try`,`typealias`,/unowned\(safe\)/,/unowned\(unsafe\)/,`unowned`,`var`,`weak`,`where`,`while`,`willSet`],MP=[`false`,`nil`,`true`],NP=[`assignment`,`associativity`,`higherThan`,`left`,`lowerThan`,`none`,`right`],PP=[`#colorLiteral`,`#column`,`#dsohandle`,`#else`,`#elseif`,`#endif`,`#error`,`#file`,`#fileID`,`#fileLiteral`,`#filePath`,`#function`,`#if`,`#imageLiteral`,`#keyPath`,`#line`,`#selector`,`#sourceLocation`,`#warning`],FP=`abs.all.any.assert.assertionFailure.debugPrint.dump.fatalError.getVaList.isKnownUniquelyReferenced.max.min.numericCast.pointwiseMax.pointwiseMin.precondition.preconditionFailure.print.readLine.repeatElement.sequence.stride.swap.swift_unboxFromSwiftValueWithType.transcode.type.unsafeBitCast.unsafeDowncast.withExtendedLifetime.withUnsafeMutablePointer.withUnsafePointer.withVaList.withoutActuallyEscaping.zip`.split(`.`),IP=EP(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),LP=EP(IP,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),RP=wP(IP,LP,`*`),zP=EP(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),BP=EP(zP,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),VP=wP(zP,BP,`*`),HP=wP(/[A-Z]/,BP,`*`),UP=[`attached`,`autoclosure`,wP(/convention\(/,EP(`swift`,`block`,`c`),/\)/),`discardableResult`,`dynamicCallable`,`dynamicMemberLookup`,`escaping`,`freestanding`,`frozen`,`GKInspectable`,`IBAction`,`IBDesignable`,`IBInspectable`,`IBOutlet`,`IBSegueAction`,`inlinable`,`main`,`nonobjc`,`NSApplicationMain`,`NSCopying`,`NSManaged`,wP(/objc\(/,VP,/\)/),`objc`,`objcMembers`,`propertyWrapper`,`requires_stored_property_inits`,`resultBuilder`,`Sendable`,`testable`,`UIApplicationMain`,`unchecked`,`unknown`,`usableFromInline`,`warn_unqualified_access`],WP=[`iOS`,`iOSApplicationExtension`,`macOS`,`macOSApplicationExtension`,`macCatalyst`,`macCatalystApplicationExtension`,`watchOS`,`watchOSApplicationExtension`,`tvOS`,`tvOSApplicationExtension`,`swift`];function GP(e){let t={match:/\s+/,relevance:0},n=e.COMMENT(`/\\*`,`\\*/`,{contains:[`self`]}),r=[e.C_LINE_COMMENT_MODE,n],i={match:[/\./,EP(...OP,...kP)],className:{2:`keyword`}},a={match:wP(/\./,EP(...jP)),relevance:0},o=jP.filter(e=>typeof e==`string`).concat([`_|0`]),s={variants:[{className:`keyword`,match:EP(...jP.filter(e=>typeof e!=`string`).concat(AP).map(DP),...kP)}]},c={$pattern:EP(/\b\w+/,/#\w+/),keyword:o.concat(PP),literal:MP},l=[i,a,s],u=[{match:wP(/\./,EP(...FP)),relevance:0},{className:`built_in`,match:wP(/\b/,EP(...FP),/(?=\()/)}],d={match:/->/,relevance:0},f=[d,{className:`operator`,relevance:0,variants:[{match:RP},{match:`\\.(\\.|${LP})+`}]}],p=`([0-9]_*)+`,m=`([0-9a-fA-F]_*)+`,h={className:`number`,relevance:0,variants:[{match:`\\b(${p})(\\.(${p}))?([eE][+-]?(${p}))?\\b`},{match:`\\b0x(${m})(\\.(${m}))?([pP][+-]?(${p}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},g=(e=``)=>({className:`subst`,variants:[{match:wP(/\\/,e,/[0\\tnr"']/)},{match:wP(/\\/,e,/u\{[0-9a-fA-F]{1,8}\}/)}]}),_=(e=``)=>({className:`subst`,match:wP(/\\/,e,/[\t ]*(?:[\r\n]|\r\n)/)}),v=(e=``)=>({className:`subst`,label:`interpol`,begin:wP(/\\/,e,/\(/),end:/\)/}),y=(e=``)=>({begin:wP(e,/"""/),end:wP(/"""/,e),contains:[g(e),_(e),v(e)]}),b=(e=``)=>({begin:wP(e,/"/),end:wP(/"/,e),contains:[g(e),v(e)]}),x={className:`string`,variants:[y(),y(`#`),y(`##`),y(`###`),b(),b(`#`),b(`##`),b(`###`)]},S=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],C={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:S},w=e=>{let t=wP(e,/\//),n=wP(/\//,e);return{begin:t,end:n,contains:[...S,{scope:`comment`,begin:`#(?!.*${n})`,end:/$/}]}},T={scope:`regexp`,variants:[w(`###`),w(`##`),w(`#`),C]},E={match:wP(/`/,VP,/`/)},D=[E,{className:`variable`,match:/\$\d+/},{className:`variable`,match:`\\$${BP}+`}],O=[{match:/(@|#(un)?)available/,scope:`keyword`,starts:{contains:[{begin:/\(/,end:/\)/,keywords:WP,contains:[...f,h,x]}]}},{scope:`keyword`,match:wP(/@/,EP(...UP),CP(EP(/\(/,/\s+/)))},{scope:`meta`,match:wP(/@/,VP)}],k={match:CP(/\b[A-Z]/),relevance:0,contains:[{className:`type`,match:wP(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,BP,`+`)},{className:`type`,match:HP,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:wP(/\s+&\s+/,CP(HP)),relevance:0}]},A={begin:/</,end:/>/,keywords:c,contains:[...r,...l,...O,d,k]};k.contains.push(A);let ee={begin:/\(/,end:/\)/,relevance:0,keywords:c,contains:[`self`,{match:wP(VP,/\s*:/),keywords:`_|0`,relevance:0},...r,T,...l,...u,...f,h,x,...D,...O,k]},j={begin:/</,end:/>/,keywords:`repeat each`,contains:[...r,k]},te={begin:/\(/,end:/\)/,keywords:c,contains:[{begin:EP(CP(wP(VP,/\s*:/)),CP(wP(VP,/\s+/,VP,/\s*:/))),end:/:/,relevance:0,contains:[{className:`keyword`,match:/\b_\b/},{className:`params`,match:VP}]},...r,...l,...f,h,x,...O,k,ee],endsParent:!0,illegal:/["']/},M={match:[/(func|macro)/,/\s+/,EP(E.match,VP,RP)],className:{1:`keyword`,3:`title.function`},contains:[j,te,t],illegal:[/\[/,/%/]},ne={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:`keyword`},contains:[j,te,t],illegal:/\[|%/},N={match:[/operator/,/\s+/,RP],className:{1:`keyword`,3:`title`}},re={begin:[/precedencegroup/,/\s+/,HP],className:{1:`keyword`,3:`title`},contains:[k],keywords:[...NP,...MP],end:/}/},ie={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:`keyword`,3:`keyword`,5:`title.function`}},ae={match:[/class\b/,/\s+/,/var\b/],scope:{1:`keyword`,3:`keyword`}},oe={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,VP,/\s*/],beginScope:{1:`keyword`,3:`title.class`},keywords:c,contains:[j,...l,{begin:/:/,end:/\{/,keywords:c,contains:[{scope:`title.class.inherited`,match:HP},...l],relevance:0}]};for(let e of x.variants){let t=e.contains.find(e=>e.label===`interpol`);t.keywords=c;let n=[...l,...u,...f,h,x,...D];t.contains=[...n,{begin:/\(/,end:/\)/,contains:[`self`,...n]}]}return{name:`Swift`,keywords:c,contains:[...r,M,ne,ie,ae,oe,N,re,{beginKeywords:`import`,end:/$/,contains:[...r],relevance:0},T,...l,...u,...f,h,x,...D,...O,k,ee]}}var KP=`[A-Za-z$_][0-9A-Za-z$_]*`,qP=`as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using`.split(`.`),JP=[`true`,`false`,`null`,`undefined`,`NaN`,`Infinity`],YP=`Object.Function.Boolean.Symbol.Math.Date.Number.BigInt.String.RegExp.Array.Float32Array.Float64Array.Int8Array.Uint8Array.Uint8ClampedArray.Int16Array.Int32Array.Uint16Array.Uint32Array.BigInt64Array.BigUint64Array.Set.Map.WeakSet.WeakMap.ArrayBuffer.SharedArrayBuffer.Atomics.DataView.JSON.Promise.Generator.GeneratorFunction.AsyncFunction.Reflect.Proxy.Intl.WebAssembly`.split(`.`),XP=[`Error`,`EvalError`,`InternalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],ZP=[`setInterval`,`setTimeout`,`clearInterval`,`clearTimeout`,`require`,`exports`,`eval`,`isFinite`,`isNaN`,`parseFloat`,`parseInt`,`decodeURI`,`decodeURIComponent`,`encodeURI`,`encodeURIComponent`,`escape`,`unescape`],QP=[`arguments`,`this`,`super`,`console`,`window`,`document`,`localStorage`,`sessionStorage`,`module`,`global`],$P=[].concat(ZP,YP,XP);function eF(e){let t=e.regex,n=(e,{after:t})=>{let n=`</`+e[0].slice(1);return e.input.indexOf(n,t)!==-1},r=KP,i={begin:`<>`,end:`</>`},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{let r=e[0].length+e.index,i=e.input[r];if(i===`<`||i===`,`){t.ignoreMatch();return}i===`>`&&(n(e,{after:r})||t.ignoreMatch());let a,o=e.input.substring(r);if(a=o.match(/^\s*=/)){t.ignoreMatch();return}if((a=o.match(/^\s+extends\s+/))&&a.index===0){t.ignoreMatch();return}}},s={$pattern:KP,keyword:qP,literal:JP,built_in:$P,"variable.language":QP},c=`[0-9](_?[0-9])*`,l=`\\.(${c})`,u=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,d={className:`number`,variants:[{begin:`(\\b(${u})((${l})|\\.)?|(${l}))[eE][+-]?(${c})\\b`},{begin:`\\b(${u})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:`\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b`},{begin:`\\b0[bB][0-1](_?[0-1])*n?\\b`},{begin:`\\b0[oO][0-7](_?[0-7])*n?\\b`},{begin:`\\b0[0-7]+n?\\b`}],relevance:0},f={className:`subst`,begin:`\\$\\{`,end:`\\}`,keywords:s,contains:[]},p={begin:".?html`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`xml`}},m={begin:".?css`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`css`}},h={begin:".?gql`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`graphql`}},g={className:`string`,begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},_={className:`comment`,variants:[e.COMMENT(/\/\*\*(?!\/)/,`\\*/`,{relevance:0,contains:[{begin:`(?=@[A-Za-z]+)`,relevance:0,contains:[{className:`doctag`,begin:`@[A-Za-z]+`},{className:`type`,begin:`\\{`,end:`\\}`,excludeEnd:!0,excludeBegin:!0,relevance:0},{className:`variable`,begin:r+`(?=\\s*(-)|$)`,endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,{match:/\$\d+/},d];f.contains=v.concat({begin:/\{/,end:/\}/,keywords:s,contains:[`self`].concat(v)});let y=[].concat(_,f.contains),b=y.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:[`self`].concat(y)}]),x={className:`params`,begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b},S={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,`(`,t.concat(/\./,r),`)*`)],scope:{1:`keyword`,3:`title.class`,5:`keyword`,7:`title.class.inherited`}},{match:[/class/,/\s+/,r],scope:{1:`keyword`,3:`title.class`}}]},C={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:`title.class`,keywords:{_:[...YP,...XP]}},w={label:`use_strict`,className:`meta`,relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},T={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:`keyword`,3:`title.function`},label:`func.def`,contains:[x],illegal:/%/},E={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:`variable.constant`};function D(e){return t.concat(`(?!`,e.join(`|`),`)`)}let O={match:t.concat(/\b/,D([...ZP,`super`,`import`].map(e=>`${e}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:`title.function`,relevance:0},k={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:`prototype`,className:`property`,relevance:0},A={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:`keyword`,3:`title.function`},contains:[{begin:/\(\)/},x]},ee=`(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|`+e.UNDERSCORE_IDENT_RE+`)\\s*=>`,j={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(ee)],keywords:`async`,className:{1:`keyword`,3:`title.function`},contains:[x]};return{name:`JavaScript`,aliases:[`js`,`jsx`,`mjs`,`cjs`],keywords:s,exports:{PARAMS_CONTAINS:b,CLASS_REFERENCE:C},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:`shebang`,binary:`node`,relevance:5}),w,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,_,{match:/\$\d+/},d,C,{scope:`attr`,match:r+t.lookahead(`:`),relevance:0},j,{begin:`(`+e.RE_STARTERS_RE+`|\\b(case|return|throw)\\b)\\s*`,keywords:`return throw case`,relevance:0,contains:[_,e.REGEXP_MODE,{className:`function`,begin:ee,returnBegin:!0,end:`\\s*=>`,contains:[{className:`params`,variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:`xml`,contains:[{begin:o.begin,end:o.end,skip:!0,contains:[`self`]}]}]},T,{beginKeywords:`while if switch catch for`},{begin:`\\b(?!function)`+e.UNDERSCORE_IDENT_RE+`\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{`,returnBegin:!0,label:`func.def`,contains:[x,e.inherit(e.TITLE_MODE,{begin:r,className:`title.function`})]},{match:/\.\.\./,relevance:0},k,{match:`\\$`+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:`title.function`},contains:[x]},O,E,S,A,{match:/\$[(.]/}]}}function tF(e){let t=e.regex,n=eF(e),r=KP,i=[`any`,`void`,`number`,`boolean`,`string`,`object`,`never`,`symbol`,`bigint`,`unknown`],a={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:`keyword`,3:`title.class`}},o={beginKeywords:`interface`,end:/\{/,excludeEnd:!0,keywords:{keyword:`interface extends`,built_in:i},contains:[n.exports.CLASS_REFERENCE]},s={className:`meta`,relevance:10,begin:/^\s*['"]use strict['"]/},c={$pattern:KP,keyword:qP.concat([`type`,`interface`,`public`,`private`,`protected`,`implements`,`declare`,`abstract`,`readonly`,`enum`,`override`,`satisfies`]),literal:JP,built_in:$P.concat(i),"variable.language":QP},l={className:`meta`,begin:`@`+r},u=(e,t,n)=>{let r=e.contains.findIndex(e=>e.label===t);if(r===-1)throw Error(`can not find mode to replace`);e.contains.splice(r,1,n)};Object.assign(n.keywords,c),n.exports.PARAMS_CONTAINS.push(l);let d=n.contains.find(e=>e.scope===`attr`),f=Object.assign({},d,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,d,f]),n.contains=n.contains.concat([l,a,o,f]),u(n,`shebang`,e.SHEBANG()),u(n,`use_strict`,s);let p=n.contains.find(e=>e.label===`func.def`);return p.relevance=0,Object.assign(n,{name:`TypeScript`,aliases:[`ts`,`tsx`,`mts`,`cts`]}),n}function nF(e){let t=e.regex,n={className:`string`,begin:/"(""|[^/n])"C\b/},r={className:`string`,begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},i=/\d{1,2}\/\d{1,2}\/\d{4}/,a=/\d{4}-\d{1,2}-\d{1,2}/,o=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,s=/\d{1,2}(:\d{1,2}){1,2}/,c={className:`literal`,variants:[{begin:t.concat(/# */,t.either(a,i),/ *#/)},{begin:t.concat(/# */,s,/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,t.either(a,i),/ +/,t.either(o,s),/ *#/)}]},l={className:`number`,relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},u={className:`label`,begin:/^\w+:/},d=e.COMMENT(/'''/,/$/,{contains:[{className:`doctag`,begin:/<\/?/,end:/>/}]}),f=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:`Visual Basic .NET`,aliases:[`vb`],case_insensitive:!0,classNameAliases:{label:`symbol`},keywords:{keyword:`addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield`,built_in:`addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort`,type:`boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort`,literal:`true false nothing`},illegal:`//|\\{|\\}|endif|gosub|variant|wend|^\\$ `,contains:[n,r,c,l,u,d,f,{className:`meta`,begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:`const disable else elseif enable end externalsource if region then`},contains:[f]}]}}function rF(e){e.regex;let t=e.COMMENT(/\(;/,/;\)/);return t.contains.push(`self`),{name:`WebAssembly`,keywords:{$pattern:/[\w.]+/,keyword:`anyfunc,block,br,br_if,br_table,call,call_indirect,data,drop,elem,else,end,export,func,global.get,global.set,local.get,local.set,local.tee,get_global,get_local,global,if,import,local,loop,memory,memory.grow,memory.size,module,mut,nop,offset,param,result,return,select,set_global,set_local,start,table,tee_local,then,type,unreachable`.split(`,`)},contains:[e.COMMENT(/;;/,/$/),t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:`keyword`,3:`operator`}},{className:`variable`,begin:/\$[\w_]+/},{match:/(\((?!;)|\))+/,className:`punctuation`,relevance:0},{begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:`keyword`,3:`title.function`}},e.QUOTE_STRING_MODE,{match:/(i32|i64|f32|f64)(?!\.)/,className:`type`},{className:`keyword`,match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/},{className:`number`,relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/}]}}function iF(e){let t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,i={className:`symbol`,begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\s/,contains:[{className:`keyword`,begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(a,{begin:/\(/,end:/\)/}),s=e.inherit(e.APOS_STRING_MODE,{className:`string`}),c=e.inherit(e.QUOTE_STRING_MODE,{className:`string`}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:`attr`,begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:`string`,endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:`HTML, XML`,aliases:[`html`,`xhtml`,`rss`,`atom`,`xjb`,`xsd`,`xsl`,`plist`,`wsf`,`svg`],case_insensitive:!0,unicodeRegex:!0,contains:[{className:`meta`,begin:/<![a-z]/,end:/>/,relevance:10,contains:[a,c,s,o,{begin:/\[/,end:/\]/,contains:[{className:`meta`,begin:/<![a-z]/,end:/>/,contains:[a,o,c,s]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:`meta`,end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[c]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:`tag`,begin:/<style(?=\s|>)/,end:/>/,keywords:{name:`style`},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:[`css`,`xml`]}},{className:`tag`,begin:/<script(?=\s|>)/,end:/>/,keywords:{name:`script`},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:[`javascript`,`handlebars`,`xml`]}},{className:`tag`,begin:/<>|<\/>/},{className:`tag`,begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:`name`,begin:n,relevance:0,starts:l}]},{className:`tag`,begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:`name`,begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function aF(e){let t=`true false yes no null`,n=`[\\w#;/?:@&=+$,.~*'()[\\]]+`,r={className:`attr`,variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:`template-variable`,variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},a={className:`string`,relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:`char.escape`,relevance:0}]},o={className:`string`,relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,i]},s=e.inherit(o,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),c={className:`number`,begin:`\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b`},l={end:`,`,endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},u={begin:/\{/,end:/\}/,contains:[l],illegal:`\\n`,relevance:0},d={begin:`\\[`,end:`\\]`,contains:[l],illegal:`\\n`,relevance:0},f=[r,{className:`meta`,begin:`^---\\s*$`,relevance:10},{className:`string`,begin:`[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*`},{begin:`<%[%=-]?`,end:`[%-]?%>`,subLanguage:`ruby`,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:`type`,begin:`!\\w+!`+n},{className:`type`,begin:`!<`+n+`>`},{className:`type`,begin:`!`+n},{className:`type`,begin:`!!`+n},{className:`meta`,begin:`&`+e.UNDERSCORE_IDENT_RE+`$`},{className:`meta`,begin:`\\*`+e.UNDERSCORE_IDENT_RE+`$`},{className:`bullet`,begin:`-(?=[ ]|$)`,relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},c,{className:`number`,begin:e.C_NUMBER_RE+`\\b`,relevance:0},u,d,a,o],p=[...f];return p.pop(),p.push(s),l.contains=p,{name:`YAML`,case_insensitive:!0,aliases:[`yml`],contains:f}}var oF={arduino:iN,bash:aN,c:oN,cpp:sN,csharp:cN,css:_N,diff:vN,go:yN,graphql:bN,ini:xN,java:DN,javascript:IN,json:LN,kotlin:HN,less:QN,lua:$N,makefile:eP,markdown:tP,objectivec:nP,perl:rP,php:iP,"php-template":aP,plaintext:oP,python:sP,"python-repl":cP,r:lP,ruby:uP,rust:dP,scss:bP,shell:xP,sql:ite,swift:GP,typescript:tF,vbnet:nF,wasm:rF,xml:iF,yaml:aF},sF={},cF=`hljs-`;function lF(e){let t=wT.newInstance();return e&&a(e),{highlight:n,highlightAuto:r,listLanguages:i,register:a,registerAlias:o,registered:s};function n(e,n,r){let i=r||sF,a=typeof i.prefix==`string`?i.prefix:cF;if(!t.getLanguage(e))throw Error("Unknown language: `"+e+"` is not registered");t.configure({__emitter:uF,classPrefix:a});let o=t.highlight(n,{ignoreIllegals:!0,language:e});if(o.errorRaised)throw Error("Could not highlight with `Highlight.js`",{cause:o.errorRaised});let s=o._emitter.root,c=s.data;return c.language=o.language,c.relevance=o.relevance,s}function r(e,r){let a=(r||sF).subset||i(),o=-1,s=0,c;for(;++o<a.length;){let i=a[o];if(!t.getLanguage(i))continue;let l=n(i,e,r);l.data&&l.data.relevance!==void 0&&l.data.relevance>s&&(s=l.data.relevance,c=l)}return c||{type:`root`,children:[],data:{language:void 0,relevance:s}}}function i(){return t.listLanguages()}function a(e,n){if(typeof e==`string`)t.registerLanguage(e,n);else{let n;for(n in e)Object.hasOwn(e,n)&&t.registerLanguage(n,e[n])}}function o(e,n){if(typeof e==`string`)t.registerAliases(typeof n==`string`?n:[...n],{languageName:e});else{let n;for(n in e)if(Object.hasOwn(e,n)){let r=e[n];t.registerAliases(typeof r==`string`?r:[...r],{languageName:n})}}}function s(e){return!!t.getLanguage(e)}}var uF=class{constructor(e){this.options=e,this.root={type:`root`,children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(e){if(e===``)return;let t=this.stack[this.stack.length-1],n=t.children[t.children.length-1];n&&n.type===`text`?n.value+=e:t.children.push({type:`text`,value:e})}startScope(e){this.openNode(String(e))}endScope(){this.closeNode()}__addSublanguage(e,t){let n=this.stack[this.stack.length-1],r=e.root.children;t?n.children.push({type:`element`,tagName:`span`,properties:{className:[t]},children:r}):n.children.push(...r)}openNode(e){let t=this,n=e.split(`.`).map(function(e,n){return n?e+`_`.repeat(n):t.options.classPrefix+e}),r=this.stack[this.stack.length-1],i={type:`element`,tagName:`span`,properties:{className:n},children:[]};r.children.push(i),this.stack.push(i)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return``}},dF=n(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|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,g={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(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var x=`$isDayjsObject`,S=function(e){return e instanceof E||!(!e||!e[x])},C=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<w(e)},_.$g=function(e,t,n){return T.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!T.u(t)||t,u=T.p(e),p=function(e,t){var i=T.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return T.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=T.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[T.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=T.p(u),h=function(e){var t=w(p);return T.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)return h(7);var g=(f={},f[a]=t,f[o]=n,f[i]=e,f)[m]||1,_=this.$d.getTime()+r*g;return T.w(_,this)},_.subtract=function(e,t){return this.add(-1*e,t)},_.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=T.z(this),a=this.$H,o=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},f=function(e){return T.s(a%12||12,e,`0`)},m=u||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(h,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return T.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return T.s(s+1,2,`0`);case`MMM`:return d(n.monthsShort,s,l,3);case`MMMM`:return d(l,s);case`D`:return t.$D;case`DD`:return T.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return d(n.weekdaysMin,t.$W,c,2);case`ddd`:return d(n.weekdaysShort,t.$W,c,3);case`dddd`:return c[t.$W];case`H`:return String(a);case`HH`:return T.s(a,2,`0`);case`h`:return f(1);case`hh`:return f(2);case`a`:return m(a,o,!0);case`A`:return m(a,o,!1);case`m`:return String(o);case`mm`:return T.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return T.s(t.$s,2,`0`);case`SSS`:return T.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(r,f,p){var m,h=this,g=T.p(f),_=w(r),v=(_.utcOffset()-this.utcOffset())*t,y=this-_,b=function(){return T.m(h,_)};switch(g){case d:m=b()/12;break;case l:m=b();break;case u:m=b()/3;break;case c:m=(y-v)/6048e5;break;case s:m=(y-v)/864e5;break;case o:m=y/n;break;case a:m=y/t;break;case i:m=y/e;break;default:m=y}return p?m:T.a(m)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return b[this.$L]},_.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=C(e,t,!0);return r&&(n.$L=r),n},_.clone=function(){return T.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),D=E.prototype;return w.prototype=D,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,l],[`$y`,d],[`$D`,f]].forEach((function(e){D[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||=(e(t,E,w),!0),w},w.locale=C,w.isDayjs=S,w.unix=function(e){return w(1e3*e)},w.en=b[y],w.Ls=b,w.p={},w}))})),fF=e(dF(),1),pF=Object.defineProperty,W=(e,t)=>pF(e,`name`,{value:t,configurable:!0}),mF=(e,t)=>{for(var n in t)pF(e,n,{get:t[n],enumerable:!0})},hF={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},G={trace:W((...e)=>{},`trace`),debug:W((...e)=>{},`debug`),info:W((...e)=>{},`info`),warn:W((...e)=>{},`warn`),error:W((...e)=>{},`error`),fatal:W((...e)=>{},`fatal`)},gF=W(function(e=`fatal`){let t=hF.fatal;typeof e==`string`?e.toLowerCase()in hF&&(t=hF[e]):typeof e==`number`&&(t=e),G.trace=()=>{},G.debug=()=>{},G.info=()=>{},G.warn=()=>{},G.error=()=>{},G.fatal=()=>{},t<=hF.fatal&&(G.fatal=console.error?console.error.bind(console,_F(`FATAL`),`color: orange`):console.log.bind(console,`\x1B[35m`,_F(`FATAL`))),t<=hF.error&&(G.error=console.error?console.error.bind(console,_F(`ERROR`),`color: orange`):console.log.bind(console,`\x1B[31m`,_F(`ERROR`))),t<=hF.warn&&(G.warn=console.warn?console.warn.bind(console,_F(`WARN`),`color: orange`):console.log.bind(console,`\x1B[33m`,_F(`WARN`))),t<=hF.info&&(G.info=console.info?console.info.bind(console,_F(`INFO`),`color: lightblue`):console.log.bind(console,`\x1B[34m`,_F(`INFO`))),t<=hF.debug&&(G.debug=console.debug?console.debug.bind(console,_F(`DEBUG`),`color: lightgreen`):console.log.bind(console,`\x1B[32m`,_F(`DEBUG`))),t<=hF.trace&&(G.trace=console.debug?console.debug.bind(console,_F(`TRACE`),`color: lightgreen`):console.log.bind(console,`\x1B[32m`,_F(`TRACE`)))},`setLogLevel`),_F=W(e=>`%c${(0,fF.default)().format(`ss.SSS`)} : ${e} : `,`format`),vF={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:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{let t=e/255;return e>.03928?((t+.055)/1.055)**2.4:t/12.92},hue2rgb:(e,t,n)=>(n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e),hsl2rgb:({h:e,s:t,l:n},r)=>{if(!t)return n*2.55;e/=360,t/=100,n/=100;let i=n<.5?n*(1+t):n+t-n*t,a=2*n-i;switch(r){case`r`:return vF.hue2rgb(a,i,e+1/3)*255;case`g`:return vF.hue2rgb(a,i,e)*255;case`b`:return vF.hue2rgb(a,i,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:n},r)=>{e/=255,t/=255,n/=255;let i=Math.max(e,t,n),a=Math.min(e,t,n),o=(i+a)/2;if(r===`l`)return o*100;if(i===a)return 0;let s=i-a,c=o>.5?s/(2-i-a):s/(i+a);if(r===`s`)return c*100;switch(i){case e:return((t-n)/s+(t<n?6:0))*60;case t:return((n-e)/s+2)*60;case n:return((e-t)/s+4)*60;default:return-1}}},yF={channel:vF,lang:{clamp:(e,t,n)=>t>n?Math.min(t,Math.max(n,e)):Math.min(n,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},unit:{dec2hex:e=>{let t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}}},bF={};for(let e=0;e<=255;e++)bF[e]=yF.unit.dec2hex(e);var xF={ALL:0,RGB:1,HSL:2},SF=class{constructor(){this.type=xF.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw Error(`Cannot change both RGB and HSL channels at the same time`);this.type=e}reset(){this.type=xF.ALL}is(e){return this.type===e}},CF=new class{constructor(e,t){this.color=t,this.changed=!1,this.data=e,this.type=new SF}set(e,t){return this.color=t,this.changed=!1,this.data=e,this.type.type=xF.ALL,this}_ensureHSL(){let e=this.data,{h:t,s:n,l:r}=e;t===void 0&&(e.h=yF.channel.rgb2hsl(e,`h`)),n===void 0&&(e.s=yF.channel.rgb2hsl(e,`s`)),r===void 0&&(e.l=yF.channel.rgb2hsl(e,`l`))}_ensureRGB(){let e=this.data,{r:t,g:n,b:r}=e;t===void 0&&(e.r=yF.channel.hsl2rgb(e,`r`)),n===void 0&&(e.g=yF.channel.hsl2rgb(e,`g`)),r===void 0&&(e.b=yF.channel.hsl2rgb(e,`b`))}get r(){let e=this.data,t=e.r;return!this.type.is(xF.HSL)&&t!==void 0?t:(this._ensureHSL(),yF.channel.hsl2rgb(e,`r`))}get g(){let e=this.data,t=e.g;return!this.type.is(xF.HSL)&&t!==void 0?t:(this._ensureHSL(),yF.channel.hsl2rgb(e,`g`))}get b(){let e=this.data,t=e.b;return!this.type.is(xF.HSL)&&t!==void 0?t:(this._ensureHSL(),yF.channel.hsl2rgb(e,`b`))}get h(){let e=this.data,t=e.h;return!this.type.is(xF.RGB)&&t!==void 0?t:(this._ensureRGB(),yF.channel.rgb2hsl(e,`h`))}get s(){let e=this.data,t=e.s;return!this.type.is(xF.RGB)&&t!==void 0?t:(this._ensureRGB(),yF.channel.rgb2hsl(e,`s`))}get l(){let e=this.data,t=e.l;return!this.type.is(xF.RGB)&&t!==void 0?t:(this._ensureRGB(),yF.channel.rgb2hsl(e,`l`))}get a(){return this.data.a}set r(e){this.type.set(xF.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(xF.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(xF.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(xF.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(xF.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(xF.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}({r:0,g:0,b:0,a:0},`transparent`),wF={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;let t=e.match(wF.re);if(!t)return;let n=t[1],r=parseInt(n,16),i=n.length,a=i%4==0,o=i>4,s=o?1:17,c=o?8:4,l=a?0:-1,u=o?255:15;return CF.set({r:(r>>c*(l+3)&u)*s,g:(r>>c*(l+2)&u)*s,b:(r>>c*(l+1)&u)*s,a:a?(r&u)*s/255:1},e)},stringify:e=>{let{r:t,g:n,b:r,a:i}=e;return i<1?`#${bF[Math.round(t)]}${bF[Math.round(n)]}${bF[Math.round(r)]}${bF[Math.round(i*255)]}`:`#${bF[Math.round(t)]}${bF[Math.round(n)]}${bF[Math.round(r)]}`}},TF={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:e=>{let t=e.match(TF.hueRe);if(t){let[,e,n]=t;switch(n){case`grad`:return yF.channel.clamp.h(parseFloat(e)*.9);case`rad`:return yF.channel.clamp.h(parseFloat(e)*180/Math.PI);case`turn`:return yF.channel.clamp.h(parseFloat(e)*360)}}return yF.channel.clamp.h(parseFloat(e))},parse:e=>{let t=e.charCodeAt(0);if(t!==104&&t!==72)return;let n=e.match(TF.re);if(!n)return;let[,r,i,a,o,s]=n;return CF.set({h:TF._hue2deg(r),s:yF.channel.clamp.s(parseFloat(i)),l:yF.channel.clamp.l(parseFloat(a)),a:o?yF.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{let{h:t,s:n,l:r,a:i}=e;return i<1?`hsla(${yF.lang.round(t)}, ${yF.lang.round(n)}%, ${yF.lang.round(r)}%, ${i})`:`hsl(${yF.lang.round(t)}, ${yF.lang.round(n)}%, ${yF.lang.round(r)}%)`}},EF={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:e=>{e=e.toLowerCase();let t=EF.colors[e];if(t)return wF.parse(t)},stringify:e=>{let t=wF.stringify(e);for(let e in EF.colors)if(EF.colors[e]===t)return e}},DF={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:e=>{let t=e.charCodeAt(0);if(t!==114&&t!==82)return;let n=e.match(DF.re);if(!n)return;let[,r,i,a,o,s,c,l,u]=n;return CF.set({r:yF.channel.clamp.r(i?parseFloat(r)*2.55:parseFloat(r)),g:yF.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:yF.channel.clamp.b(c?parseFloat(s)*2.55:parseFloat(s)),a:l?yF.channel.clamp.a(u?parseFloat(l)/100:parseFloat(l)):1},e)},stringify:e=>{let{r:t,g:n,b:r,a:i}=e;return i<1?`rgba(${yF.lang.round(t)}, ${yF.lang.round(n)}, ${yF.lang.round(r)}, ${yF.lang.round(i)})`:`rgb(${yF.lang.round(t)}, ${yF.lang.round(n)}, ${yF.lang.round(r)})`}},OF={format:{keyword:EF,hex:wF,rgb:DF,rgba:DF,hsl:TF,hsla:TF},parse:e=>{if(typeof e!=`string`)return e;let t=wF.parse(e)||DF.parse(e)||TF.parse(e)||EF.parse(e);if(t)return t;throw Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(xF.HSL)||e.data.r===void 0?TF.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?DF.stringify(e):wF.stringify(e)},kF=(e,t)=>{let n=OF.parse(e);for(let e in t)n[e]=yF.channel.clamp[e](t[e]);return OF.stringify(n)},AF=(e,t,n=0,r=1)=>{if(typeof e!=`number`)return kF(e,{a:t});let i=CF.set({r:yF.channel.clamp.r(e),g:yF.channel.clamp.g(t),b:yF.channel.clamp.b(n),a:yF.channel.clamp.a(r)});return OF.stringify(i)},jF=e=>{let{r:t,g:n,b:r}=OF.parse(e),i=.2126*yF.channel.toLinear(t)+.7152*yF.channel.toLinear(n)+.0722*yF.channel.toLinear(r);return yF.lang.round(i)},MF=e=>jF(e)>=.5,NF=e=>!MF(e),PF=(e,t,n)=>{let r=OF.parse(e),i=r[t],a=yF.channel.clamp[t](i+n);return i!==a&&(r[t]=a),OF.stringify(r)},K=(e,t)=>PF(e,`l`,t),q=(e,t)=>PF(e,`l`,-t),J=(e,t)=>{let n=OF.parse(e),r={};for(let e in t)t[e]&&(r[e]=n[e]+t[e]);return kF(e,r)},FF=(e,t,n=50)=>{let{r,g:i,b:a,a:o}=OF.parse(e),{r:s,g:c,b:l,a:u}=OF.parse(t),d=n/100,f=d*2-1,p=o-u,m=((f*p===-1?f:(f+p)/(1+f*p))+1)/2,h=1-m;return AF(r*m+s*h,i*m+c*h,a*m+l*h,o*d+u*(1-d))},Y=(e,t=100)=>{let n=OF.parse(e);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,FF(n,e,t)},{entries:IF,setPrototypeOf:LF,isFrozen:RF,getPrototypeOf:zF,getOwnPropertyDescriptor:BF}=Object,{freeze:VF,seal:HF,create:UF}=Object,{apply:WF,construct:GF}=typeof Reflect<`u`&&Reflect;VF||=function(e){return e},HF||=function(e){return e},WF||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},GF||=function(e){return new e(...[...arguments].slice(1))};var KF=fI(Array.prototype.forEach),qF=fI(Array.prototype.lastIndexOf),JF=fI(Array.prototype.pop),YF=fI(Array.prototype.push),XF=fI(Array.prototype.splice),ZF=Array.isArray,QF=fI(String.prototype.toLowerCase),$F=fI(String.prototype.toString),eI=fI(String.prototype.match),tI=fI(String.prototype.replace),nI=fI(String.prototype.indexOf),rI=fI(String.prototype.trim),iI=fI(Number.prototype.toString),aI=fI(Boolean.prototype.toString),oI=typeof BigInt>`u`?null:fI(BigInt.prototype.toString),sI=typeof Symbol>`u`?null:fI(Symbol.prototype.toString),cI=fI(Object.prototype.hasOwnProperty),lI=fI(Object.prototype.toString),uI=fI(RegExp.prototype.test),dI=pI(TypeError);function fI(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return WF(e,t,n)}}function pI(e){return function(){return GF(e,[...arguments])}}function mI(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:QF;if(LF&&LF(e,null),!ZF(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(RF(t)||(t[r]=e),i=e)}e[i]=!0}return e}function hI(e){for(let t=0;t<e.length;t++)cI(e,t)||(e[t]=null);return e}function gI(e){let t=UF(null);for(let[n,r]of IF(e))cI(e,n)&&(ZF(r)?t[n]=hI(r):r&&typeof r==`object`&&r.constructor===Object?t[n]=gI(r):t[n]=r);return t}function _I(e){switch(typeof e){case`string`:return e;case`number`:return iI(e);case`boolean`:return aI(e);case`bigint`:return oI?oI(e):`0`;case`symbol`:return sI?sI(e):`Symbol()`;case`undefined`:return lI(e);case`function`:case`object`:{if(e===null)return lI(e);let t=e,n=vI(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:lI(e)}return lI(e)}default:return lI(e)}}function vI(e,t){for(;e!==null;){let n=BF(e,t);if(n){if(n.get)return fI(n.get);if(typeof n.value==`function`)return fI(n.value)}e=zF(e)}function n(){return null}return n}function yI(e){try{return uI(e,``),!0}catch{return!1}}var bI=VF(`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`.split(`.`)),xI=VF(`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`.split(`.`)),SI=VF([`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`]),CI=VF([`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`]),wI=VF(`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`.split(`.`)),TI=VF([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),EI=VF([`#text`]),DI=VF(`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`.split(`.`)),OI=VF(`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`.split(`.`)),kI=VF(`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`.split(`.`)),AI=VF([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),jI=HF(/\{\{[\w\W]*|[\w\W]*\}\}/gm),MI=HF(/<%[\w\W]*|[\w\W]*%>/gm),NI=HF(/\$\{[\w\W]*/gm),PI=HF(/^data-[\-\w.\u00B7-\uFFFF]+$/),FI=HF(/^aria-[\-\w]+$/),II=HF(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),LI=HF(/^(?:\w+script|data):/i),RI=HF(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),zI=HF(/^html$/i),BI=HF(/^[a-z][.\w]*(-[.\w]+)+$/i),VI=Object.freeze({__proto__:null,ARIA_ATTR:FI,ATTR_WHITESPACE:RI,CUSTOM_ELEMENT:BI,DATA_ATTR:PI,DOCTYPE_NAME:zI,ERB_EXPR:MI,IS_ALLOWED_URI:II,IS_SCRIPT_OR_DATA:LI,MUSTACHE_EXPR:jI,TMPLIT_EXPR:NI}),HI={element:1,text:3,progressingInstruction:7,comment:8,document:9},UI=function(){return typeof window>`u`?null:window},WI=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},GI=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function KI(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:UI(),t=e=>KI(e);if(t.version=`3.4.1`,t.removed=[],!e||!e.document||e.document.nodeType!==HI.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,r=n,i=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:s,Element:c,NodeFilter:l,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=e,m=c.prototype,h=vI(m,`cloneNode`),g=vI(m,`remove`),_=vI(m,`nextSibling`),v=vI(m,`childNodes`),y=vI(m,`parentNode`);if(typeof o==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let b,x=``,{implementation:S,createNodeIterator:C,createDocumentFragment:w,getElementsByTagName:T}=n,{importNode:E}=r,D=GI();t.isSupported=typeof IF==`function`&&typeof y==`function`&&S&&S.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:O,ERB_EXPR:k,TMPLIT_EXPR:A,DATA_ATTR:ee,ARIA_ATTR:j,IS_SCRIPT_OR_DATA:te,ATTR_WHITESPACE:M,CUSTOM_ELEMENT:ne}=VI,{IS_ALLOWED_URI:N}=VI,re=null,ie=mI({},[...bI,...xI,...SI,...wI,...EI]),ae=null,oe=mI({},[...DI,...OI,...kI,...AI]),se=Object.seal(UF(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}})),ce=null,P=null,le=Object.seal(UF(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),F=!0,ue=!0,de=!1,fe=!0,pe=!1,me=!0,he=!1,ge=!1,_e=!1,ve=!1,ye=!1,be=!1,xe=!0,Se=!1,Ce=`user-content-`,we=!0,Te=!1,Ee={},De=null,Oe=mI({},[`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`]),ke=null,Ae=mI({},[`audio`,`video`,`img`,`source`,`image`,`track`]),je=null,Me=mI({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Ne=`http://www.w3.org/1998/Math/MathML`,Pe=`http://www.w3.org/2000/svg`,Fe=`http://www.w3.org/1999/xhtml`,Ie=Fe,Le=!1,Re=null,ze=mI({},[Ne,Pe,Fe],$F),Be=mI({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),Ve=mI({},[`annotation-xml`]),He=mI({},[`title`,`style`,`font`,`a`,`script`]),Ue=null,We=[`application/xhtml+xml`,`text/html`],Ge=null,Ke=null,qe=n.createElement(`form`),Je=function(e){return e instanceof RegExp||e instanceof Function},Ye=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Ke&&Ke===e)return;(!e||typeof e!=`object`)&&(e={}),e=gI(e),Ue=We.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,Ge=Ue===`application/xhtml+xml`?$F:QF,re=cI(e,`ALLOWED_TAGS`)&&ZF(e.ALLOWED_TAGS)?mI({},e.ALLOWED_TAGS,Ge):ie,ae=cI(e,`ALLOWED_ATTR`)&&ZF(e.ALLOWED_ATTR)?mI({},e.ALLOWED_ATTR,Ge):oe,Re=cI(e,`ALLOWED_NAMESPACES`)&&ZF(e.ALLOWED_NAMESPACES)?mI({},e.ALLOWED_NAMESPACES,$F):ze,je=cI(e,`ADD_URI_SAFE_ATTR`)&&ZF(e.ADD_URI_SAFE_ATTR)?mI(gI(Me),e.ADD_URI_SAFE_ATTR,Ge):Me,ke=cI(e,`ADD_DATA_URI_TAGS`)&&ZF(e.ADD_DATA_URI_TAGS)?mI(gI(Ae),e.ADD_DATA_URI_TAGS,Ge):Ae,De=cI(e,`FORBID_CONTENTS`)&&ZF(e.FORBID_CONTENTS)?mI({},e.FORBID_CONTENTS,Ge):Oe,ce=cI(e,`FORBID_TAGS`)&&ZF(e.FORBID_TAGS)?mI({},e.FORBID_TAGS,Ge):gI({}),P=cI(e,`FORBID_ATTR`)&&ZF(e.FORBID_ATTR)?mI({},e.FORBID_ATTR,Ge):gI({}),Ee=cI(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?gI(e.USE_PROFILES):e.USE_PROFILES:!1,F=e.ALLOW_ARIA_ATTR!==!1,ue=e.ALLOW_DATA_ATTR!==!1,de=e.ALLOW_UNKNOWN_PROTOCOLS||!1,fe=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,pe=e.SAFE_FOR_TEMPLATES||!1,me=e.SAFE_FOR_XML!==!1,he=e.WHOLE_DOCUMENT||!1,ve=e.RETURN_DOM||!1,ye=e.RETURN_DOM_FRAGMENT||!1,be=e.RETURN_TRUSTED_TYPE||!1,_e=e.FORCE_BODY||!1,xe=e.SANITIZE_DOM!==!1,Se=e.SANITIZE_NAMED_PROPS||!1,we=e.KEEP_CONTENT!==!1,Te=e.IN_PLACE||!1,N=yI(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:II,Ie=typeof e.NAMESPACE==`string`?e.NAMESPACE:Fe,Be=cI(e,`MATHML_TEXT_INTEGRATION_POINTS`)&&e.MATHML_TEXT_INTEGRATION_POINTS&&typeof e.MATHML_TEXT_INTEGRATION_POINTS==`object`?gI(e.MATHML_TEXT_INTEGRATION_POINTS):mI({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),Ve=cI(e,`HTML_INTEGRATION_POINTS`)&&e.HTML_INTEGRATION_POINTS&&typeof e.HTML_INTEGRATION_POINTS==`object`?gI(e.HTML_INTEGRATION_POINTS):mI({},[`annotation-xml`]);let t=cI(e,`CUSTOM_ELEMENT_HANDLING`)&&e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING==`object`?gI(e.CUSTOM_ELEMENT_HANDLING):UF(null);if(se=UF(null),cI(t,`tagNameCheck`)&&Je(t.tagNameCheck)&&(se.tagNameCheck=t.tagNameCheck),cI(t,`attributeNameCheck`)&&Je(t.attributeNameCheck)&&(se.attributeNameCheck=t.attributeNameCheck),cI(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(se.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),pe&&(ue=!1),ye&&(ve=!0),Ee&&(re=mI({},EI),ae=UF(null),Ee.html===!0&&(mI(re,bI),mI(ae,DI)),Ee.svg===!0&&(mI(re,xI),mI(ae,OI),mI(ae,AI)),Ee.svgFilters===!0&&(mI(re,SI),mI(ae,OI),mI(ae,AI)),Ee.mathMl===!0&&(mI(re,wI),mI(ae,kI),mI(ae,AI))),le.tagCheck=null,le.attributeCheck=null,cI(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?le.tagCheck=e.ADD_TAGS:ZF(e.ADD_TAGS)&&(re===ie&&(re=gI(re)),mI(re,e.ADD_TAGS,Ge))),cI(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?le.attributeCheck=e.ADD_ATTR:ZF(e.ADD_ATTR)&&(ae===oe&&(ae=gI(ae)),mI(ae,e.ADD_ATTR,Ge))),cI(e,`ADD_URI_SAFE_ATTR`)&&ZF(e.ADD_URI_SAFE_ATTR)&&mI(je,e.ADD_URI_SAFE_ATTR,Ge),cI(e,`FORBID_CONTENTS`)&&ZF(e.FORBID_CONTENTS)&&(De===Oe&&(De=gI(De)),mI(De,e.FORBID_CONTENTS,Ge)),cI(e,`ADD_FORBID_CONTENTS`)&&ZF(e.ADD_FORBID_CONTENTS)&&(De===Oe&&(De=gI(De)),mI(De,e.ADD_FORBID_CONTENTS,Ge)),we&&(re[`#text`]=!0),he&&mI(re,[`html`,`head`,`body`]),re.table&&(mI(re,[`tbody`]),delete ce.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw dI(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw dI(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);b=e.TRUSTED_TYPES_POLICY,x=b.createHTML(``)}else b===void 0&&(b=WI(p,i)),b!==null&&typeof x==`string`&&(x=b.createHTML(``));VF&&VF(e),Ke=e},Xe=mI({},[...xI,...SI,...CI]),Ze=mI({},[...wI,...TI]),Qe=function(e){let t=y(e);(!t||!t.tagName)&&(t={namespaceURI:Ie,tagName:`template`});let n=QF(e.tagName),r=QF(t.tagName);return Re[e.namespaceURI]?e.namespaceURI===Pe?t.namespaceURI===Fe?n===`svg`:t.namespaceURI===Ne?n===`svg`&&(r===`annotation-xml`||Be[r]):!!Xe[n]:e.namespaceURI===Ne?t.namespaceURI===Fe?n===`math`:t.namespaceURI===Pe?n===`math`&&Ve[r]:!!Ze[n]:e.namespaceURI===Fe?t.namespaceURI===Pe&&!Ve[r]||t.namespaceURI===Ne&&!Be[r]?!1:!Ze[n]&&(He[n]||!Xe[n]):!!(Ue===`application/xhtml+xml`&&Re[e.namespaceURI]):!1},$e=function(e){YF(t.removed,{element:e});try{y(e).removeChild(e)}catch{g(e)}},et=function(e,n){try{YF(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{YF(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(ve||ye)try{$e(n)}catch{}else try{n.setAttribute(e,``)}catch{}},tt=function(e){let t=null,r=null;if(_e)e=`<remove></remove>`+e;else{let t=eI(e,/^[\r\n\t ]+/);r=t&&t[0]}Ue===`application/xhtml+xml`&&Ie===Fe&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=b?b.createHTML(e):e;if(Ie===Fe)try{t=new f().parseFromString(i,Ue)}catch{}if(!t||!t.documentElement){t=S.createDocument(Ie,`template`,null);try{t.documentElement.innerHTML=Le?x:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Ie===Fe?T.call(t,he?`html`:`body`)[0]:he?t.documentElement:a},nt=function(e){return C.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},rt=function(e){return e instanceof d&&(typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||!(e.attributes instanceof u)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`)},it=function(e){return typeof s==`function`&&e instanceof s};function at(e,n,r){KF(e,e=>{e.call(t,n,r,Ke)})}let ot=function(e){let n=null;if(at(D.beforeSanitizeElements,e,null),rt(e))return $e(e),!0;let r=Ge(e.nodeName);if(at(D.uponSanitizeElement,e,{tagName:r,allowedTags:re}),me&&e.hasChildNodes()&&!it(e.firstElementChild)&&uI(/<[/\w!]/g,e.innerHTML)&&uI(/<[/\w!]/g,e.textContent)||me&&e.namespaceURI===Fe&&r===`style`&&it(e.firstElementChild)||e.nodeType===HI.progressingInstruction||me&&e.nodeType===HI.comment&&uI(/<[/\w]/g,e.data))return $e(e),!0;if(ce[r]||!(le.tagCheck instanceof Function&&le.tagCheck(r))&&!re[r]){if(!ce[r]&<(r)&&(se.tagNameCheck instanceof RegExp&&uI(se.tagNameCheck,r)||se.tagNameCheck instanceof Function&&se.tagNameCheck(r)))return!1;if(we&&!De[r]){let t=y(e)||e.parentNode,n=v(e)||e.childNodes;if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=h(n[i],!0);t.insertBefore(r,_(e))}}}return $e(e),!0}return e instanceof c&&!Qe(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&uI(/<\/no(script|embed|frames)/i,e.innerHTML)?($e(e),!0):(pe&&e.nodeType===HI.text&&(n=e.textContent,KF([O,k,A],e=>{n=tI(n,e,` `)}),e.textContent!==n&&(YF(t.removed,{element:e.cloneNode()}),e.textContent=n)),at(D.afterSanitizeElements,e,null),!1)},st=function(e,t,r){if(P[t]||xe&&(t===`id`||t===`name`)&&(r in n||r in qe))return!1;if(!(ue&&!P[t]&&uI(ee,t))&&!(F&&uI(j,t))&&!(le.attributeCheck instanceof Function&&le.attributeCheck(t,e))){if(!ae[t]||P[t]){if(!(lt(e)&&(se.tagNameCheck instanceof RegExp&&uI(se.tagNameCheck,e)||se.tagNameCheck instanceof Function&&se.tagNameCheck(e))&&(se.attributeNameCheck instanceof RegExp&&uI(se.attributeNameCheck,t)||se.attributeNameCheck instanceof Function&&se.attributeNameCheck(t,e))||t===`is`&&se.allowCustomizedBuiltInElements&&(se.tagNameCheck instanceof RegExp&&uI(se.tagNameCheck,r)||se.tagNameCheck instanceof Function&&se.tagNameCheck(r))))return!1}else if(!je[t]&&!uI(N,tI(r,M,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&nI(r,`data:`)===0&&ke[e])&&!(de&&!uI(te,tI(r,M,``)))&&r)return!1}return!0},ct=mI({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),lt=function(e){return!ct[QF(e)]&&uI(ne,e)},ut=function(e){at(D.beforeSanitizeAttributes,e,null);let{attributes:n}=e;if(!n||rt(e))return;let r={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:ae,forceKeepAttr:void 0},i=n.length;for(;i--;){let{name:a,namespaceURI:o,value:s}=n[i],c=Ge(a),l=s,u=a===`value`?l:rI(l);if(r.attrName=c,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,at(D.uponSanitizeAttribute,e,r),u=r.attrValue,Se&&(c===`id`||c===`name`)&&nI(u,Ce)!==0&&(et(a,e),u=Ce+u),me&&uI(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,u)){et(a,e);continue}if(c===`attributename`&&eI(u,`href`)){et(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){et(a,e);continue}if(!fe&&uI(/\/>/i,u)){et(a,e);continue}pe&&KF([O,k,A],e=>{u=tI(u,e,` `)});let d=Ge(e.nodeName);if(!st(d,c,u)){et(a,e);continue}if(b&&typeof p==`object`&&typeof p.getAttributeType==`function`&&!o)switch(p.getAttributeType(d,c)){case`TrustedHTML`:u=b.createHTML(u);break;case`TrustedScriptURL`:u=b.createScriptURL(u);break}if(u!==l)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),rt(e)?$e(e):JF(t.removed)}catch{et(a,e)}}at(D.afterSanitizeAttributes,e,null)},dt=function(e){let t=null,n=nt(e);for(at(D.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)at(D.uponSanitizeShadowNode,t,null),ot(t),ut(t),t.content instanceof a&&dt(t.content);at(D.afterSanitizeShadowDOM,e,null)};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,o=null,c=null,l=null;if(Le=!e,Le&&(e=`<!-->`),typeof e!=`string`&&!it(e)&&(e=_I(e),typeof e!=`string`))throw dI(`dirty is not a string, aborting`);if(!t.isSupported)return e;if(ge||Ye(n),t.removed=[],typeof e==`string`&&(Te=!1),Te){let t=e.nodeName;if(typeof t==`string`){let e=Ge(t);if(!re[e]||ce[e])throw dI(`root node is forbidden and cannot be sanitized in-place`)}}else if(e instanceof s)i=tt(`<!---->`),o=i.ownerDocument.importNode(e,!0),o.nodeType===HI.element&&o.nodeName===`BODY`||o.nodeName===`HTML`?i=o:i.appendChild(o);else{if(!ve&&!pe&&!he&&e.indexOf(`<`)===-1)return b&&be?b.createHTML(e):e;if(i=tt(e),!i)return ve?null:be?x:``}i&&_e&&$e(i.firstChild);let u=nt(Te?e:i);for(;c=u.nextNode();)ot(c),ut(c),c.content instanceof a&&dt(c.content);if(Te)return e;if(ve){if(pe){i.normalize();let e=i.innerHTML;KF([O,k,A],t=>{e=tI(e,t,` `)}),i.innerHTML=e}if(ye)for(l=w.call(i.ownerDocument);i.firstChild;)l.appendChild(i.firstChild);else l=i;return(ae.shadowroot||ae.shadowrootmode)&&(l=E.call(r,l,!0)),l}let d=he?i.outerHTML:i.innerHTML;return he&&re[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&uI(zI,i.ownerDocument.doctype.name)&&(d=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
238
|
+
`+d),pe&&KF([O,k,A],e=>{d=tI(d,e,` `)}),b&&be?b.createHTML(d):d},t.setConfig=function(){Ye(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),ge=!0},t.clearConfig=function(){Ke=null,ge=!1},t.isValidAttribute=function(e,t,n){return Ke||Ye({}),st(Ge(e),Ge(t),n)},t.addHook=function(e,t){typeof t==`function`&&YF(D[e],t)},t.removeHook=function(e,t){if(t!==void 0){let n=qF(D[e],t);return n===-1?void 0:XF(D[e],n,1)[0]}return JF(D[e])},t.removeHooks=function(e){D[e]=[]},t.removeAllHooks=function(){D=GI()},t}var qI=KI(),JI=`modulepreload`,YI=function(e){return`/`+e},XI={},ZI=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=YI(t,n),t in XI)return;XI[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:JI,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},QI=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,$I=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,eL=/\s*%%.*\n/gm,tL=class extends Error{static{W(this,`UnknownDiagramError`)}constructor(e){super(e),this.name=`UnknownDiagramError`}},nL={},rL=W(function(e,t){e=e.replace(QI,``).replace($I,``).replace(eL,`
|
|
239
|
+
`);for(let[n,{detector:r}]of Object.entries(nL))if(r(e,t))return n;throw new tL(`No diagram type detected matching given configuration for text: ${e}`)},`detectType`),iL=W((...e)=>{for(let{id:t,detector:n,loader:r}of e)aL(t,n,r)},`registerLazyLoadedDiagrams`),aL=W((e,t,n)=>{nL[e]&&G.warn(`Detector with key ${e} already exists. Overwriting.`),nL[e]={detector:t,loader:n},G.debug(`Detector with key ${e} added${n?` with loader`:``}`)},`addDetector`),oL=W(e=>nL[e].loader,`getDiagramLoader`),sL=W((e,t,{depth:n=2,clobber:r=!1}={})=>{let i={depth:n,clobber:r};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(t=>sL(e,t,i)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(t=>{e.includes(t)||e.push(t)}),e):e===void 0||n<=0?typeof e==`object`&&e&&typeof t==`object`?Object.assign(e,t):t:(t!==void 0&&typeof e==`object`&&typeof t==`object`&&Object.keys(t).forEach(i=>{typeof t[i]==`object`&&t[i]!==null&&(e[i]===void 0||typeof e[i]==`object`)?(e[i]===void 0&&(e[i]=Array.isArray(t[i])?[]:{}),e[i]=sL(e[i],t[i],{depth:n-1,clobber:r})):(r||typeof e[i]!=`object`&&typeof t[i]!=`object`)&&(e[i]=t[i])}),e)},`assignWithDepth`),cL=sL,lL=`#ffffff`,uL=`#f2f2f2`,dL=W((e,t)=>t?J(e,{s:-40,l:10}):J(e,{s:-40,l:-10}),`mkBorder`),fL=class{static{W(this,`Theme`)}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(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#333`),this.secondaryColor=this.secondaryColor||J(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||J(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||dL(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||dL(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||dL(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||dL(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||Y(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Y(this.tertiaryColor),this.lineColor=this.lineColor||Y(this.background),this.arrowheadColor=this.arrowheadColor||Y(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?q(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||q(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Y(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||K(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||q(this.mainBkg,5)||`#ffffff`,this.rowEven=this.rowEven||q(this.mainBkg,10)):(this.rowOdd=this.rowOdd||K(this.mainBkg,75)||`#ffffff`,this.rowEven=this.rowEven||K(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||J(this.primaryColor,{h:30}),this.cScale4=this.cScale4||J(this.primaryColor,{h:60}),this.cScale5=this.cScale5||J(this.primaryColor,{h:90}),this.cScale6=this.cScale6||J(this.primaryColor,{h:120}),this.cScale7=this.cScale7||J(this.primaryColor,{h:150}),this.cScale8=this.cScale8||J(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||J(this.primaryColor,{h:270}),this.cScale10=this.cScale10||J(this.primaryColor,{h:300}),this.cScale11=this.cScale11||J(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=q(this[`cScale`+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=q(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||Y(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||K(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||q(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;let e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this[`surface`+t]=this[`surface`+t]||J(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this[`surfacePeer`+t]=this[`surfacePeer`+t]||J(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||J(this.primaryColor,{h:64}),this.fillType3=this.fillType3||J(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||J(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||J(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||J(this.primaryColor,{h:128}),this.fillType7=this.fillType7||J(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||J(this.primaryColor,{l:-10}),this.pie5=this.pie5||J(this.secondaryColor,{l:-10}),this.pie6=this.pie6||J(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||J(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||J(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||J(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||J(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||J(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||J(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??J(this.primaryColor,{l:-30}),this.venn2=this.venn2??J(this.secondaryColor,{l:-30}),this.venn3=this.venn3??J(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??J(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??J(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??J(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??J(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??J(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||`#DEDEDE`,graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},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||J(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||J(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||J(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||J(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||J(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||J(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||NF(this.quadrant1Fill)?K(this.quadrant1Fill):q(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?q(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||J(this.primaryColor,{h:-30}),this.git4=this.git4||J(this.primaryColor,{h:-60}),this.git5=this.git5||J(this.primaryColor,{h:-90}),this.git6=this.git6||J(this.primaryColor,{h:60}),this.git7=this.git7||J(this.primaryColor,{h:120}),this.darkMode?(this.git0=K(this.git0,25),this.git1=K(this.git1,25),this.git2=K(this.git2,25),this.git3=K(this.git3,25),this.git4=K(this.git4,25),this.git5=K(this.git5,25),this.git6=K(this.git6,25),this.git7=K(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||Y(this.git0),this.gitInv1=this.gitInv1||Y(this.git1),this.gitInv2=this.gitInv2||Y(this.git2),this.gitInv3=this.gitInv3||Y(this.git3),this.gitInv4=this.gitInv4||Y(this.git4),this.gitInv5=this.gitInv5||Y(this.git5),this.gitInv6=this.gitInv6||Y(this.git6),this.gitInv7=this.gitInv7||Y(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||lL,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||uL,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},pL=W(e=>{let t=new fL;return t.calculate(e),t},`getThemeVariables`),mL=class{static{W(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=K(this.primaryColor,16),this.tertiaryColor=J(this.primaryColor,{h:-160}),this.primaryBorderColor=Y(this.background),this.secondaryBorderColor=dL(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=dL(this.tertiaryColor,this.darkMode),this.primaryTextColor=Y(this.primaryColor),this.secondaryTextColor=Y(this.secondaryColor),this.tertiaryTextColor=Y(this.tertiaryColor),this.lineColor=Y(this.background),this.textColor=Y(this.background),this.mainBkg=`#1f2020`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=K(Y(`#323D47`),10),this.lineColor=`calculated`,this.border1=`#ccc`,this.border2=AF(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=q(`#EAE8D9`,30),this.altSectionBkgColor=`calculated`,this.sectionBkgColor2=`#EAE8D9`,this.excludeBkgColor=q(this.sectionBkgColor,10),this.taskBorderColor=AF(255,255,255,70),this.taskBkgColor=`calculated`,this.taskTextColor=`calculated`,this.taskTextLightColor=`calculated`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=AF(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||K(this.mainBkg,5)||`#ffffff`,this.rowEven=this.rowEven||q(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(){this.secondBkg=K(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=K(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=K(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=Y(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=J(this.primaryColor,{h:64}),this.fillType3=J(this.secondaryColor,{h:64}),this.fillType4=J(this.primaryColor,{h:-64}),this.fillType5=J(this.secondaryColor,{h:-64}),this.fillType6=J(this.primaryColor,{h:128}),this.fillType7=J(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||J(this.primaryColor,{h:30}),this.cScale4=this.cScale4||J(this.primaryColor,{h:60}),this.cScale5=this.cScale5||J(this.primaryColor,{h:90}),this.cScale6=this.cScale6||J(this.primaryColor,{h:120}),this.cScale7=this.cScale7||J(this.primaryColor,{h:150}),this.cScale8=this.cScale8||J(this.primaryColor,{h:210}),this.cScale9=this.cScale9||J(this.primaryColor,{h:270}),this.cScale10=this.cScale10||J(this.primaryColor,{h:300}),this.cScale11=this.cScale11||J(this.primaryColor,{h:330});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||Y(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScalePeer`+e]=this[`cScalePeer`+e]||K(this[`cScale`+e],10);for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||J(this.mainBkg,{h:30,s:-30,l:-(-10+e*4)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||J(this.mainBkg,{h:30,s:-30,l:-(-7+e*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?`black`:this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`pie`+e]=this[`cScale`+e];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 e=0;e<8;e++)this[`venn`+(e+1)]=this[`venn`+(e+1)]??K(this[`cScale`+e],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||J(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||J(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||J(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||J(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||J(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||J(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||NF(this.quadrant1Fill)?K(this.quadrant1Fill):q(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||`#DEDEDE`,graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},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?q(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=K(this.secondaryColor,20),this.git1=K(this.pie2||this.secondaryColor,20),this.git2=K(this.pie3||this.tertiaryColor,20),this.git3=K(this.pie4||J(this.primaryColor,{h:-30}),20),this.git4=K(this.pie5||J(this.primaryColor,{h:-60}),20),this.git5=K(this.pie6||J(this.primaryColor,{h:-90}),10),this.git6=K(this.pie7||J(this.primaryColor,{h:60}),10),this.git7=K(this.pie8||J(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||Y(this.git0),this.gitInv1=this.gitInv1||Y(this.git1),this.gitInv2=this.gitInv2||Y(this.git2),this.gitInv3=this.gitInv3||Y(this.git3),this.gitInv4=this.gitInv4||Y(this.git4),this.gitInv5=this.gitInv5||Y(this.git5),this.gitInv6=this.gitInv6||Y(this.git6),this.gitInv7=this.gitInv7||Y(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Y(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Y(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||K(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||K(this.background,2),this.nodeBorder=this.nodeBorder||`#999`}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},hL=W(e=>{let t=new mL;return t.calculate(e),t},`getThemeVariables`),gL=class{static{W(this,`Theme`)}constructor(){this.background=`#f4f4f4`,this.primaryColor=`#ECECFF`,this.secondaryColor=J(this.primaryColor,{h:120}),this.secondaryColor=`#ffffde`,this.tertiaryColor=J(this.primaryColor,{h:-160}),this.primaryBorderColor=dL(this.primaryColor,this.darkMode),this.secondaryBorderColor=dL(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=dL(this.tertiaryColor,this.darkMode),this.primaryTextColor=Y(this.primaryColor),this.secondaryTextColor=Y(this.secondaryColor),this.tertiaryTextColor=Y(this.tertiaryColor),this.lineColor=Y(this.background),this.textColor=Y(this.background),this.background=`white`,this.mainBkg=`#ECECFF`,this.secondBkg=`#ffffde`,this.lineColor=`#333333`,this.border1=`#9370DB`,this.primaryBorderColor=dL(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=AF(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(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||J(this.primaryColor,{h:30}),this.cScale4=this.cScale4||J(this.primaryColor,{h:60}),this.cScale5=this.cScale5||J(this.primaryColor,{h:90}),this.cScale6=this.cScale6||J(this.primaryColor,{h:120}),this.cScale7=this.cScale7||J(this.primaryColor,{h:150}),this.cScale8=this.cScale8||J(this.primaryColor,{h:210}),this.cScale9=this.cScale9||J(this.primaryColor,{h:270}),this.cScale10=this.cScale10||J(this.primaryColor,{h:300}),this.cScale11=this.cScale11||J(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||q(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||q(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=q(this[`cScale`+e],10),this[`cScalePeer`+e]=this[`cScalePeer`+e]||q(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||J(this[`cScale`+e],{h:180});for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||J(this.mainBkg,{h:30,l:-(5+e*5)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||J(this.mainBkg,{h:30,l:-(7+e*5)});if(this.scaleLabelColor=this.scaleLabelColor!==`calculated`&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!==`calculated`){this.cScaleLabel0=this.cScaleLabel0||Y(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||Y(this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||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||K(this.primaryColor,75)||`#ffffff`,this.rowEven=this.rowEven||K(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=J(this.primaryColor,{h:64}),this.fillType3=J(this.secondaryColor,{h:64}),this.fillType4=J(this.primaryColor,{h:-64}),this.fillType5=J(this.secondaryColor,{h:-64}),this.fillType6=J(this.primaryColor,{h:128}),this.fillType7=J(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||J(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||J(this.primaryColor,{l:-10}),this.pie5=this.pie5||J(this.secondaryColor,{l:-30}),this.pie6=this.pie6||J(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||J(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||J(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||J(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||J(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||J(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||J(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??J(this.primaryColor,{l:-30}),this.venn2=this.venn2??J(this.secondaryColor,{l:-30}),this.venn3=this.venn3??J(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??J(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??J(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??J(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??J(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??J(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||J(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||J(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||J(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||J(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||J(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||J(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||NF(this.quadrant1Fill)?K(this.quadrant1Fill):q(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:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||`#DEDEDE`,graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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||J(this.primaryColor,{h:-30}),this.git4=this.git4||J(this.primaryColor,{h:-60}),this.git5=this.git5||J(this.primaryColor,{h:-90}),this.git6=this.git6||J(this.primaryColor,{h:60}),this.git7=this.git7||J(this.primaryColor,{h:120}),this.darkMode?(this.git0=K(this.git0,25),this.git1=K(this.git1,25),this.git2=K(this.git2,25),this.git3=K(this.git3,25),this.git4=K(this.git4,25),this.git5=K(this.git5,25),this.git6=K(this.git6,25),this.git7=K(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||q(Y(this.git0),25),this.gitInv1=this.gitInv1||Y(this.git1),this.gitInv2=this.gitInv2||Y(this.git2),this.gitInv3=this.gitInv3||Y(this.git3),this.gitInv4=this.gitInv4||Y(this.git4),this.gitInv5=this.gitInv5||Y(this.git5),this.gitInv6=this.gitInv6||Y(this.git6),this.gitInv7=this.gitInv7||Y(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Y(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Y(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||lL,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||uL}calculate(e){if(Object.keys(this).forEach(e=>{this[e]===`calculated`&&(this[e]=void 0)}),typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},_L=W(e=>{let t=new gL;return t.calculate(e),t},`getThemeVariables`),vL=class{static{W(this,`Theme`)}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=K(`#cde498`,10),this.primaryBorderColor=dL(this.primaryColor,this.darkMode),this.secondaryBorderColor=dL(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=dL(this.tertiaryColor,this.darkMode),this.primaryTextColor=Y(this.primaryColor),this.secondaryTextColor=Y(this.secondaryColor),this.tertiaryTextColor=Y(this.primaryColor),this.lineColor=Y(this.background),this.textColor=Y(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(){this.actorBorder=q(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||J(this.primaryColor,{h:30}),this.cScale4=this.cScale4||J(this.primaryColor,{h:60}),this.cScale5=this.cScale5||J(this.primaryColor,{h:90}),this.cScale6=this.cScale6||J(this.primaryColor,{h:120}),this.cScale7=this.cScale7||J(this.primaryColor,{h:150}),this.cScale8=this.cScale8||J(this.primaryColor,{h:210}),this.cScale9=this.cScale9||J(this.primaryColor,{h:270}),this.cScale10=this.cScale10||J(this.primaryColor,{h:300}),this.cScale11=this.cScale11||J(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||q(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||q(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=q(this[`cScale`+e],10),this[`cScalePeer`+e]=this[`cScalePeer`+e]||q(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||J(this[`cScale`+e],{h:180});this.scaleLabelColor=this.scaleLabelColor!==`calculated`&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||J(this.mainBkg,{h:30,s:-30,l:-(5+e*5)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||J(this.mainBkg,{h:30,s:-30,l:-(8+e*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||K(this.mainBkg,75)||`#ffffff`,this.rowEven=this.rowEven||K(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=J(this.primaryColor,{h:64}),this.fillType3=J(this.secondaryColor,{h:64}),this.fillType4=J(this.primaryColor,{h:-64}),this.fillType5=J(this.secondaryColor,{h:-64}),this.fillType6=J(this.primaryColor,{h:128}),this.fillType7=J(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||J(this.primaryColor,{l:-30}),this.pie5=this.pie5||J(this.secondaryColor,{l:-30}),this.pie6=this.pie6||J(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||J(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||J(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||J(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||J(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||J(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||J(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??J(this.primaryColor,{l:-30}),this.venn2=this.venn2??J(this.secondaryColor,{l:-30}),this.venn3=this.venn3??J(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??J(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??J(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??J(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??J(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??J(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||J(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||J(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||J(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||J(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||J(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||J(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||NF(this.quadrant1Fill)?K(this.quadrant1Fill):q(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:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||`#DEDEDE`,graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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||J(this.primaryColor,{h:-30}),this.git4=this.git4||J(this.primaryColor,{h:-60}),this.git5=this.git5||J(this.primaryColor,{h:-90}),this.git6=this.git6||J(this.primaryColor,{h:60}),this.git7=this.git7||J(this.primaryColor,{h:120}),this.darkMode?(this.git0=K(this.git0,25),this.git1=K(this.git1,25),this.git2=K(this.git2,25),this.git3=K(this.git3,25),this.git4=K(this.git4,25),this.git5=K(this.git5,25),this.git6=K(this.git6,25),this.git7=K(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||Y(this.git0),this.gitInv1=this.gitInv1||Y(this.git1),this.gitInv2=this.gitInv2||Y(this.git2),this.gitInv3=this.gitInv3||Y(this.git3),this.gitInv4=this.gitInv4||Y(this.git4),this.gitInv5=this.gitInv5||Y(this.git5),this.gitInv6=this.gitInv6||Y(this.git6),this.gitInv7=this.gitInv7||Y(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Y(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Y(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||lL,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||uL}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},yL=W(e=>{let t=new vL;return t.calculate(e),t},`getThemeVariables`),bL=class{static{W(this,`Theme`)}constructor(){this.primaryColor=`#eee`,this.contrast=`#707070`,this.secondaryColor=K(this.contrast,55),this.background=`#ffffff`,this.tertiaryColor=J(this.primaryColor,{h:-160}),this.primaryBorderColor=dL(this.primaryColor,this.darkMode),this.secondaryBorderColor=dL(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=dL(this.tertiaryColor,this.darkMode),this.primaryTextColor=Y(this.primaryColor),this.secondaryTextColor=Y(this.secondaryColor),this.tertiaryTextColor=Y(this.tertiaryColor),this.lineColor=Y(this.background),this.textColor=Y(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||K(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(){this.secondBkg=K(this.contrast,55),this.border2=this.contrast,this.actorBorder=K(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 e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||Y(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||K(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||q(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?`black`:this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||J(this.mainBkg,{l:-(5+e*5)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||J(this.mainBkg,{l:-(8+e*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=K(this.contrast,30),this.sectionBkgColor2=K(this.contrast,30),this.taskBorderColor=q(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=K(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=q(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=J(this.primaryColor,{h:64}),this.fillType3=J(this.secondaryColor,{h:64}),this.fillType4=J(this.primaryColor,{h:-64}),this.fillType5=J(this.secondaryColor,{h:-64}),this.fillType6=J(this.primaryColor,{h:128}),this.fillType7=J(this.secondaryColor,{h:128});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`pie`+e]=this[`cScale`+e];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 e=0;e<8;e++)this[`venn`+(e+1)]=this[`venn`+(e+1)]??this[`cScale`+e];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||J(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||J(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||J(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||J(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||J(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||J(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||NF(this.quadrant1Fill)?K(this.quadrant1Fill):q(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0`},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||`#DEDEDE`,graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},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=q(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||J(this.primaryColor,{h:-30}),this.git4=this.pie5||J(this.primaryColor,{h:-60}),this.git5=this.pie6||J(this.primaryColor,{h:-90}),this.git6=this.pie7||J(this.primaryColor,{h:60}),this.git7=this.pie8||J(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||Y(this.git0),this.gitInv1=this.gitInv1||Y(this.git1),this.gitInv2=this.gitInv2||Y(this.git2),this.gitInv3=this.gitInv3||Y(this.git3),this.gitInv4=this.gitInv4||Y(this.git4),this.gitInv5=this.gitInv5||Y(this.git5),this.gitInv6=this.gitInv6||Y(this.git6),this.gitInv7=this.gitInv7||Y(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||lL,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||uL}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},xL=W(e=>{let t=new bL;return t.calculate(e),t},`getThemeVariables`),SL=class{static{W(this,`Theme`)}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=dL(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(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#333`),this.secondaryColor=this.secondaryColor||J(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||J(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||dL(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||dL(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||dL(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||dL(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||Y(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Y(this.tertiaryColor),this.lineColor=this.lineColor||Y(this.background),this.arrowheadColor=this.arrowheadColor||Y(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?q(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||q(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Y(this.lineColor);let e=`#ECECFE`,t=`#E9E9F1`,n=J(e,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||t,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||K(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||t,this.cScale2=this.cScale2||n,this.cScale3=this.cScale3||J(e,{h:30}),this.cScale4=this.cScale4||J(e,{h:60}),this.cScale5=this.cScale5||J(e,{h:90}),this.cScale6=this.cScale6||J(e,{h:120}),this.cScale7=this.cScale7||J(e,{h:150}),this.cScale8=this.cScale8||J(e,{h:210,l:150}),this.cScale9=this.cScale9||J(e,{h:270}),this.cScale10=this.cScale10||J(e,{h:300}),this.cScale11=this.cScale11||J(e,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=q(this[`cScale`+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=q(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||Y(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||K(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||q(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||J(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||J(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||J(e,{h:64}),this.fillType3=this.fillType3||J(t,{h:64}),this.fillType4=this.fillType4||J(e,{h:-64}),this.fillType5=this.fillType5||J(t,{h:-64}),this.fillType6=this.fillType6||J(e,{h:128}),this.fillType7=this.fillType7||J(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||n,this.pie4=this.pie4||J(e,{l:-10}),this.pie5=this.pie5||J(t,{l:-10}),this.pie6=this.pie6||J(n,{l:-10}),this.pie7=this.pie7||J(e,{h:60,l:-10}),this.pie8=this.pie8||J(e,{h:-60,l:-10}),this.pie9=this.pie9||J(e,{h:120,l:0}),this.pie10=this.pie10||J(e,{h:60,l:-20}),this.pie11=this.pie11||J(e,{h:-60,l:-20}),this.pie12=this.pie12||J(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||J(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||J(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||J(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||J(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||J(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||J(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||NF(this.quadrant1Fill)?K(this.quadrant1Fill):q(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?q(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||n,this.git3=this.git3||J(e,{h:-30}),this.git4=this.git4||J(e,{h:-60}),this.git5=this.git5||J(e,{h:-90}),this.git6=this.git6||J(e,{h:60}),this.git7=this.git7||J(e,{h:120}),this.darkMode?(this.git0=K(this.git0,25),this.git1=K(this.git1,25),this.git2=K(this.git2,25),this.git3=K(this.git3,25),this.git4=K(this.git4,25),this.git5=K(this.git5,25),this.git6=K(this.git6,25),this.git7=K(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||Y(this.git0),this.gitInv1=this.gitInv1||Y(this.git1),this.gitInv2=this.gitInv2||Y(this.git2),this.gitInv3=this.gitInv3||Y(this.git3),this.gitInv4=this.gitInv4||Y(this.git4),this.gitInv5=this.gitInv5||Y(this.git5),this.gitInv6=this.gitInv6||Y(this.git6),this.gitInv7=this.gitInv7||Y(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||lL,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||uL}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},CL=W(e=>{let t=new SL;return t.calculate(e),t},`getThemeVariables`),wL=class{static{W(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=K(this.primaryColor,16),this.tertiaryColor=J(this.primaryColor,{h:-160}),this.primaryBorderColor=Y(this.background),this.secondaryBorderColor=dL(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=dL(this.tertiaryColor,this.darkMode),this.primaryTextColor=Y(this.primaryColor),this.secondaryTextColor=Y(this.secondaryColor),this.tertiaryTextColor=Y(this.tertiaryColor),this.mainBkg=`#2a2020`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=K(Y(`#323D47`),10),this.border1=`#ccc`,this.border2=AF(255,255,255,.25),this.arrowheadColor=Y(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(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#333`),this.secondaryColor=this.secondaryColor||J(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||J(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||dL(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||dL(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||dL(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||dL(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||Y(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Y(this.tertiaryColor),this.lineColor=this.lineColor||Y(this.background),this.arrowheadColor=this.arrowheadColor||Y(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?q(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||q(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Y(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||K(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||J(this.primaryColor,{h:30}),this.cScale4=this.cScale4||J(this.primaryColor,{h:60}),this.cScale5=this.cScale5||J(this.primaryColor,{h:90}),this.cScale6=this.cScale6||J(this.primaryColor,{h:120}),this.cScale7=this.cScale7||J(this.primaryColor,{h:150}),this.cScale8=this.cScale8||J(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||J(this.primaryColor,{h:270}),this.cScale10=this.cScale10||J(this.primaryColor,{h:300}),this.cScale11=this.cScale11||J(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=q(this[`cScale`+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=q(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||Y(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||K(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||q(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;let e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this[`surface`+t]=this[`surface`+t]||J(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this[`surfacePeer`+t]=this[`surfacePeer`+t]||J(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||J(this.primaryColor,{h:64}),this.fillType3=this.fillType3||J(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||J(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||J(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||J(this.primaryColor,{h:128}),this.fillType7=this.fillType7||J(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||J(this.primaryColor,{l:-10}),this.pie5=this.pie5||J(this.secondaryColor,{l:-10}),this.pie6=this.pie6||J(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||J(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||J(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||J(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||J(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||J(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||J(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||J(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||J(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||J(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||J(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||J(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||J(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||NF(this.quadrant1Fill)?K(this.quadrant1Fill):q(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?q(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=K(this.git0,25),this.git1=K(this.git1,25),this.git2=K(this.git2,25),this.git3=K(this.git3,25),this.git4=K(this.git4,25),this.git5=K(this.git5,25),this.git6=K(this.git6,25),this.git7=K(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||Y(this.git0),this.gitInv1=this.gitInv1||Y(this.git1),this.gitInv2=this.gitInv2||Y(this.git2),this.gitInv3=this.gitInv3||Y(this.git3),this.gitInv4=this.gitInv4||Y(this.git4),this.gitInv5=this.gitInv5||Y(this.git5),this.gitInv6=this.gitInv6||Y(this.git6),this.gitInv7=this.gitInv7||Y(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||lL,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||uL}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},TL=W(e=>{let t=new wL;return t.calculate(e),t},`getThemeVariables`),EL=class{static{W(this,`Theme`)}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=dL(`#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(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#28253D`),this.secondaryColor=this.secondaryColor||J(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||J(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||dL(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||dL(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||dL(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||dL(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#FEF9C3`,this.noteTextColor=this.noteTextColor||`#28253D`,this.secondaryTextColor=this.secondaryTextColor||Y(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Y(this.tertiaryColor),this.lineColor=this.lineColor||Y(this.background),this.arrowheadColor=this.arrowheadColor||Y(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?q(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||q(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Y(this.lineColor);let e=`#ECECFE`,t=`#E9E9F1`,n=J(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||t,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||K(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 e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=this.mainBkg;if(this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=q(this[`cScale`+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=q(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||Y(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||K(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||q(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||J(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||J(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||J(e,{h:64}),this.fillType3=this.fillType3||J(t,{h:64}),this.fillType4=this.fillType4||J(e,{h:-64}),this.fillType5=this.fillType5||J(t,{h:-64}),this.fillType6=this.fillType6||J(e,{h:128}),this.fillType7=this.fillType7||J(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||n,this.pie4=this.pie4||J(e,{l:-10}),this.pie5=this.pie5||J(t,{l:-10}),this.pie6=this.pie6||J(n,{l:-10}),this.pie7=this.pie7||J(e,{h:60,l:-10}),this.pie8=this.pie8||J(e,{h:-60,l:-10}),this.pie9=this.pie9||J(e,{h:120,l:0}),this.pie10=this.pie10||J(e,{h:60,l:-20}),this.pie11=this.pie11||J(e,{h:-60,l:-20}),this.pie12=this.pie12||J(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||J(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||J(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||J(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||J(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||J(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||J(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||NF(this.quadrant1Fill)?K(this.quadrant1Fill):q(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?q(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground=`#FFFFFF`,this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||n,this.git3=this.git3||J(e,{h:-30}),this.git4=this.git4||J(e,{h:-60}),this.git5=this.git5||J(e,{h:-90}),this.git6=this.git6||J(e,{h:60}),this.git7=this.git7||J(e,{h:120}),this.darkMode?(this.git0=K(this.git0,25),this.git1=K(this.git1,25),this.git2=K(this.git2,25),this.git3=K(this.git3,25),this.git4=K(this.git4,25),this.git5=K(this.git5,25),this.git6=K(this.git6,25),this.git7=K(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||Y(this.git0),this.gitInv1=this.gitInv1||Y(this.git1),this.gitInv2=this.gitInv2||Y(this.git2),this.gitInv3=this.gitInv3||Y(this.git3),this.gitInv4=this.gitInv4||Y(this.git4),this.gitInv5=this.gitInv5||Y(this.git5),this.gitInv6=this.gitInv6||Y(this.git6),this.gitInv7=this.gitInv7||Y(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||lL,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||uL}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},DL=W(e=>{let t=new EL;return t.calculate(e),t},`getThemeVariables`),OL=class{static{W(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=K(this.primaryColor,16),this.tertiaryColor=J(this.primaryColor,{h:-160}),this.primaryBorderColor=Y(this.background),this.secondaryBorderColor=dL(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=dL(this.tertiaryColor,this.darkMode),this.primaryTextColor=Y(this.primaryColor),this.secondaryTextColor=Y(this.secondaryColor),this.tertiaryTextColor=Y(this.tertiaryColor),this.mainBkg=`#111113`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=K(Y(`#323D47`),10),this.border1=`#ccc`,this.border2=AF(255,255,255,.25),this.arrowheadColor=Y(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(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#FFFFFF`),this.secondaryColor=this.secondaryColor||J(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||J(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||dL(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||dL(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||dL(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||dL(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#FFFFFF`,this.secondaryTextColor=this.secondaryTextColor||Y(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Y(this.tertiaryColor),this.lineColor=this.lineColor||Y(this.background),this.arrowheadColor=this.arrowheadColor||Y(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?q(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||q(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Y(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||K(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||J(this.primaryColor,{h:30}),this.cScale4=this.cScale4||J(this.primaryColor,{h:60}),this.cScale5=this.cScale5||J(this.primaryColor,{h:90}),this.cScale6=this.cScale6||J(this.primaryColor,{h:120}),this.cScale7=this.cScale7||J(this.primaryColor,{h:150}),this.cScale8=this.cScale8||J(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||J(this.primaryColor,{h:270}),this.cScale10=this.cScale10||J(this.primaryColor,{h:300}),this.cScale11=this.cScale11||J(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=q(this[`cScale`+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=q(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||Y(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||K(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||q(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;let e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this[`surface`+t]=this[`surface`+t]||J(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this[`surfacePeer`+t]=this[`surfacePeer`+t]||J(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||J(this.primaryColor,{h:64}),this.fillType3=this.fillType3||J(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||J(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||J(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||J(this.primaryColor,{h:128}),this.fillType7=this.fillType7||J(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||J(this.primaryColor,{l:-10}),this.pie5=this.pie5||J(this.secondaryColor,{l:-10}),this.pie6=this.pie6||J(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||J(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||J(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||J(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||J(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||J(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||J(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||J(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||J(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||J(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||J(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||J(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||J(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||NF(this.quadrant1Fill)?K(this.quadrant1Fill):q(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?q(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||J(this.primaryColor,{h:-30}),this.git4=this.git4||J(this.primaryColor,{h:-60}),this.git5=this.git5||J(this.primaryColor,{h:-90}),this.git6=this.git6||J(this.primaryColor,{h:60}),this.git7=this.git7||J(this.primaryColor,{h:120}),this.darkMode?(this.git0=K(this.git0,25),this.git1=K(this.git1,25),this.git2=K(this.git2,25),this.git3=K(this.git3,25),this.git4=K(this.git4,25),this.git5=K(this.git5,25),this.git6=K(this.git6,25),this.git7=K(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||Y(this.git0),this.gitInv1=this.gitInv1||Y(this.git1),this.gitInv2=this.gitInv2||Y(this.git2),this.gitInv3=this.gitInv3||Y(this.git3),this.gitInv4=this.gitInv4||Y(this.git4),this.gitInv5=this.gitInv5||Y(this.git5),this.gitInv6=this.gitInv6||Y(this.git6),this.gitInv7=this.gitInv7||Y(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||lL,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||uL}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},kL=W(e=>{let t=new OL;return t.calculate(e),t},`getThemeVariables`),AL=class{static{W(this,`Theme`)}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=dL(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(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#28253D`),this.secondaryColor=this.secondaryColor||J(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||J(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||dL(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||dL(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||dL(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||dL(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#28253D`,this.secondaryTextColor=this.secondaryTextColor||Y(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Y(this.tertiaryColor),this.lineColor=this.lineColor||Y(this.background),this.arrowheadColor=this.arrowheadColor||Y(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?q(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||q(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Y(this.lineColor);let e=`#ECECFE`,t=`#E9E9F1`,n=J(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||t,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||K(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 e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||Y(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||K(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||q(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||J(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||J(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||J(e,{h:64}),this.fillType3=this.fillType3||J(t,{h:64}),this.fillType4=this.fillType4||J(e,{h:-64}),this.fillType5=this.fillType5||J(t,{h:-64}),this.fillType6=this.fillType6||J(e,{h:128}),this.fillType7=this.fillType7||J(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||n,this.pie4=this.pie4||J(e,{l:-10}),this.pie5=this.pie5||J(t,{l:-10}),this.pie6=this.pie6||J(n,{l:-10}),this.pie7=this.pie7||J(e,{h:60,l:-10}),this.pie8=this.pie8||J(e,{h:-60,l:-10}),this.pie9=this.pie9||J(e,{h:120,l:0}),this.pie10=this.pie10||J(e,{h:60,l:-20}),this.pie11=this.pie11||J(e,{h:-60,l:-20}),this.pie12=this.pie12||J(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||J(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||J(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||J(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||J(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||J(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||J(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||NF(this.quadrant1Fill)?K(this.quadrant1Fill):q(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?q(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||n,this.git3=this.git3||J(e,{h:-30}),this.git4=this.git4||J(e,{h:-60}),this.git5=this.git5||J(e,{h:-90}),this.git6=this.git6||J(e,{h:60}),this.git7=this.git7||J(e,{h:120}),this.darkMode?(this.git0=K(this.git0,25),this.git1=K(this.git1,25),this.git2=K(this.git2,25),this.git3=K(this.git3,25),this.git4=K(this.git4,25),this.git5=K(this.git5,25),this.git6=K(this.git6,25),this.git7=K(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||Y(this.git0),this.gitInv1=this.gitInv1||Y(this.git1),this.gitInv2=this.gitInv2||Y(this.git2),this.gitInv3=this.gitInv3||Y(this.git3),this.gitInv4=this.gitInv4||Y(this.git4),this.gitInv5=this.gitInv5||Y(this.git5),this.gitInv6=this.gitInv6||Y(this.git6),this.gitInv7=this.gitInv7||Y(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||lL,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||uL}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},jL=W(e=>{let t=new AL;return t.calculate(e),t},`getThemeVariables`),ML=class{static{W(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=K(this.primaryColor,16),this.tertiaryColor=J(this.primaryColor,{h:-160}),this.primaryBorderColor=Y(this.background),this.secondaryBorderColor=dL(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=dL(this.tertiaryColor,this.darkMode),this.primaryTextColor=Y(this.primaryColor),this.secondaryTextColor=Y(this.secondaryColor),this.tertiaryTextColor=Y(this.tertiaryColor),this.mainBkg=`#111113`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=K(Y(`#323D47`),10),this.border1=`#ccc`,this.border2=AF(255,255,255,.25),this.arrowheadColor=Y(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(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#FFFFFF`),this.secondaryColor=this.secondaryColor||J(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||J(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||dL(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||dL(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||dL(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||dL(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#FFFFFF`,this.secondaryTextColor=this.secondaryTextColor||Y(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Y(this.tertiaryColor),this.lineColor=this.lineColor||Y(this.background),this.arrowheadColor=this.arrowheadColor||Y(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?q(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||q(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Y(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||K(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 e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||Y(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||K(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||q(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=q(this[`cScale`+e],75);let e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this[`surface`+t]=this[`surface`+t]||J(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this[`surfacePeer`+t]=this[`surfacePeer`+t]||J(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||J(this.primaryColor,{h:64}),this.fillType3=this.fillType3||J(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||J(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||J(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||J(this.primaryColor,{h:128}),this.fillType7=this.fillType7||J(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||J(this.primaryColor,{l:-10}),this.pie5=this.pie5||J(this.secondaryColor,{l:-10}),this.pie6=this.pie6||J(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||J(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||J(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||J(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||J(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||J(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||J(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||J(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||J(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||J(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||J(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||J(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||J(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||NF(this.quadrant1Fill)?K(this.quadrant1Fill):q(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?q(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||J(this.primaryColor,{h:-30}),this.git4=this.git4||J(this.primaryColor,{h:-60}),this.git5=this.git5||J(this.primaryColor,{h:-90}),this.git6=this.git6||J(this.primaryColor,{h:60}),this.git7=this.git7||J(this.primaryColor,{h:120}),this.darkMode?(this.git0=K(this.git0,25),this.git1=K(this.git1,25),this.git2=K(this.git2,25),this.git3=K(this.git3,25),this.git4=K(this.git4,25),this.git5=K(this.git5,25),this.git6=K(this.git6,25),this.git7=K(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||Y(this.git0),this.gitInv1=this.gitInv1||Y(this.git1),this.gitInv2=this.gitInv2||Y(this.git2),this.gitInv3=this.gitInv3||Y(this.git3),this.gitInv4=this.gitInv4||Y(this.git4),this.gitInv5=this.gitInv5||Y(this.git5),this.gitInv6=this.gitInv6||Y(this.git6),this.gitInv7=this.gitInv7||Y(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||lL,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||uL}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},NL={base:{getThemeVariables:pL},dark:{getThemeVariables:hL},default:{getThemeVariables:_L},forest:{getThemeVariables:yL},neutral:{getThemeVariables:xL},neo:{getThemeVariables:CL},"neo-dark":{getThemeVariables:TL},redux:{getThemeVariables:DL},"redux-dark":{getThemeVariables:kL},"redux-color":{getThemeVariables:jL},"redux-dark-color":{getThemeVariables:W(e=>{let t=new ML;return t.calculate(e),t},`getThemeVariables`)}},PL={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},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:``},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},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},FL={...PL,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:`BRANDES_KOEPF`,forceNodeModelOrder:!1,considerModelOrder:`NODES_AND_EDGES`},themeCSS:void 0,themeVariables:NL.default.getThemeVariables(),sequence:{...PL.sequence,messageFont:W(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},`messageFont`),noteFont:W(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},`noteFont`),actorFont:W(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},`actorFont`)},class:{hideEmptyMembersBox:!1},gantt:{...PL.gantt,tickInterval:void 0,useWidth:void 0},c4:{...PL.c4,useWidth:void 0,personFont:W(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},`personFont`),flowchart:{...PL.flowchart,inheritDir:!1},external_personFont:W(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},`external_personFont`),systemFont:W(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},`systemFont`),external_systemFont:W(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},`external_systemFont`),system_dbFont:W(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},`system_dbFont`),external_system_dbFont:W(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},`external_system_dbFont`),system_queueFont:W(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},`system_queueFont`),external_system_queueFont:W(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},`external_system_queueFont`),containerFont:W(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},`containerFont`),external_containerFont:W(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},`external_containerFont`),container_dbFont:W(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},`container_dbFont`),external_container_dbFont:W(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},`external_container_dbFont`),container_queueFont:W(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},`container_queueFont`),external_container_queueFont:W(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},`external_container_queueFont`),componentFont:W(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},`componentFont`),external_componentFont:W(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},`external_componentFont`),component_dbFont:W(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},`component_dbFont`),external_component_dbFont:W(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},`external_component_dbFont`),component_queueFont:W(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},`component_queueFont`),external_component_queueFont:W(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},`external_component_queueFont`),boundaryFont:W(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},`boundaryFont`),messageFont:W(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},`messageFont`)},pie:{...PL.pie,useWidth:984},xyChart:{...PL.xyChart,useWidth:void 0},requirement:{...PL.requirement,useWidth:void 0},packet:{...PL.packet},treeView:{...PL.treeView,useWidth:void 0},radar:{...PL.radar},ishikawa:{...PL.ishikawa},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:`,`},venn:{...PL.venn}},IL=W((e,t=``)=>Object.keys(e).reduce((n,r)=>Array.isArray(e[r])?n:typeof e[r]==`object`&&e[r]!==null?[...n,t+r,...IL(e[r],``)]:[...n,t+r],[]),`keyify`),LL=new Set(IL(FL,``)),RL=FL,zL=W(e=>{if(G.debug(`sanitizeDirective called with`,e),!(typeof e!=`object`||!e)){if(Array.isArray(e)){e.forEach(e=>zL(e));return}for(let t of Object.keys(e)){if(G.debug(`Checking key`,t),t.startsWith(`__`)||t.includes(`proto`)||t.includes(`constr`)||!LL.has(t)||e[t]==null){G.debug(`sanitize deleting key: `,t),delete e[t];continue}if(typeof e[t]==`object`){G.debug(`sanitizing object`,t),zL(e[t]);continue}for(let n of[`themeCSS`,`fontFamily`,`altFontFamily`])t.includes(n)&&(G.debug(`sanitizing css option`,t),e[t]=BL(e[t]))}if(e.themeVariables)for(let t of Object.keys(e.themeVariables)){let n=e.themeVariables[t];n?.match&&!n.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]=``)}G.debug(`After sanitization`,e)}},`sanitizeDirective`),BL=W(e=>{let t=0,n=0;for(let r of e){if(t<n)return`{ /* ERROR: Unbalanced CSS */ }`;r===`{`?t++:r===`}`&&n++}return t===n?e:`{ /* ERROR: Unbalanced CSS */ }`},`sanitizeCss`),VL=Object.freeze(RL),HL=W(e=>!(e===!1||[`false`,`null`,`0`].includes(String(e).trim().toLowerCase())),`evaluate`),UL=cL({},VL),WL,GL=[],KL=cL({},VL),qL=W((e,t)=>{let n=cL({},e),r={};for(let e of t)eR(e),r=cL(r,e);if(n=cL(n,r),r.theme&&r.theme in NL){let e=cL(cL({},WL).themeVariables||{},r.themeVariables);n.theme&&n.theme in NL&&(n.themeVariables=NL[n.theme].getThemeVariables(e))}return KL=n,oR(KL),KL},`updateCurrentConfig`),JL=W(e=>(UL=cL({},VL),UL=cL(UL,e),e.theme&&NL[e.theme]&&(UL.themeVariables=NL[e.theme].getThemeVariables(e.themeVariables)),qL(UL,GL),UL),`setSiteConfig`),YL=W(e=>{WL=cL({},e)},`saveConfigFromInitialize`),XL=W(e=>(UL=cL(UL,e),qL(UL,GL),UL),`updateSiteConfig`),ZL=W(()=>cL({},UL),`getSiteConfig`),QL=W(e=>(oR(e),cL(KL,e),$L()),`setConfig`),$L=W(()=>cL({},KL),`getConfig`),eR=W(e=>{e&&([`secure`,...UL.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(G.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith(`__`)&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]==`string`&&(e[t].includes(`<`)||e[t].includes(`>`)||e[t].includes(`url(data:`))&&delete e[t],typeof e[t]==`object`&&eR(e[t])}))},`sanitize`),tR=W(e=>{zL(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),GL.push(e),qL(UL,GL)},`addDirective`),nR=W((e=UL)=>{GL=[],qL(e,GL)},`reset`),rR={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.`},iR={},aR=W(e=>{iR[e]||(G.warn(rR[e]),iR[e]=!0)},`issueWarning`),oR=W(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&aR(`LAZY_LOAD_DEPRECATED`)},`checkConfig`),sR=W(()=>{let e={};WL&&(e=cL(e,WL));for(let t of GL)e=cL(e,t);return e},`getUserDefinedConfig`),cR=W(e=>(e.flowchart?.htmlLabels!=null&&aR(`FLOWCHART_HTML_LABELS_DEPRECATED`),HL(e.htmlLabels??e.flowchart?.htmlLabels??!0)),`getEffectiveHtmlLabels`),lR=/<br\s*\/?>/gi,uR=W(e=>e?yR(e).replace(/\\n/g,`#br#`).split(`#br#`):[``],`getRows`),dR=(()=>{let e=!1;return()=>{e||=(fR(),!0)}})();function fR(){let e=`data-temp-href-target`;qI.addHook(`beforeSanitizeAttributes`,t=>{t.tagName===`A`&&t.hasAttribute(`target`)&&t.setAttribute(e,t.getAttribute(`target`)??``)}),qI.addHook(`afterSanitizeAttributes`,t=>{t.tagName===`A`&&t.hasAttribute(e)&&(t.setAttribute(`target`,t.getAttribute(e)??``),t.removeAttribute(e),t.getAttribute(`target`)===`_blank`&&t.setAttribute(`rel`,`noopener`))})}W(fR,`setupDompurifyHooks`);var pR=W(e=>(dR(),qI.sanitize(e)),`removeScript`),mR=W((e,t)=>{if(cR(t)){let n=t.securityLevel;n===`antiscript`||n===`strict`||n===`sandbox`?e=pR(e):n!==`loose`&&(e=yR(e),e=e.replace(/</g,`<`).replace(/>/g,`>`),e=e.replace(/=/g,`=`),e=ate(e))}return e},`sanitizeMore`),hR=W((e,t)=>e&&(e=t.dompurifyConfig?qI.sanitize(mR(e,t),t.dompurifyConfig).toString():qI.sanitize(mR(e,t),{FORBID_TAGS:[`style`]}).toString(),e),`sanitizeText`),gR=W((e,t)=>typeof e==`string`?hR(e,t):e.flat().map(e=>hR(e,t)),`sanitizeTextOrArray`),_R=W(e=>lR.test(e),`hasBreaks`),vR=W(e=>e.split(lR),`splitBreaks`),ate=W(e=>e.replace(/#br#/g,`<br/>`),`placeholderToBreak`),yR=W(e=>e.replace(lR,`#br#`),`breakToPlaceholder`),bR=W(e=>{let t=``;return e&&(t=window.location.protocol+`//`+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},`getUrl`),ote=W(function(...e){let t=e.filter(e=>!isNaN(e));return Math.max(...t)},`getMax`),ste=W(function(...e){let t=e.filter(e=>!isNaN(e));return Math.min(...t)},`getMin`),xR=W(function(e){let t=e.split(/(,)/),n=[];for(let e=0;e<t.length;e++){let r=t[e];if(r===`,`&&e>0&&e+1<t.length){let i=t[e-1],a=t[e+1];cte(i,a)&&(r=i+`,`+a,e++,n.pop())}n.push(lte(r))}return n.join(``)},`parseGenericTypes`),SR=W((e,t)=>Math.max(0,e.split(t).length-1),`countOccurrence`),cte=W((e,t)=>{let n=SR(e,`~`),r=SR(t,`~`);return n===1&&r===1},`shouldCombineSets`),lte=W(e=>{let t=SR(e,`~`),n=!1;if(t<=1)return e;t%2!=0&&e.startsWith(`~`)&&(e=e.substring(1),n=!0);let r=[...e],i=r.indexOf(`~`),a=r.lastIndexOf(`~`);for(;i!==-1&&a!==-1&&i!==a;)r[i]=`<`,r[a]=`>`,i=r.indexOf(`~`),a=r.lastIndexOf(`~`);return n&&r.unshift(`~`),r.join(``)},`processSet`),CR=W(()=>window.MathMLElement!==void 0,`isMathMLSupported`),wR=/\$\$(.*)\$\$/g,TR=W(e=>(e.match(wR)?.length??0)>0,`hasKatex`),ute=W(async(e,t)=>{let n=document.createElement(`div`);n.innerHTML=await ER(e,t),n.id=`katex-temp`,n.style.visibility=`hidden`,n.style.position=`absolute`,n.style.top=`0`,document.querySelector(`body`)?.insertAdjacentElement(`beforeend`,n);let r={width:n.clientWidth,height:n.clientHeight};return n.remove(),r},`calculateMathMLDimensions`),dte=W(async(e,t)=>{if(!TR(e))return e;if(!(CR()||t.legacyMathML||t.forceLegacyMathML))return e.replace(wR,`MathML is unsupported in this environment.`);{let{default:n}=await ZI(async()=>{let{default:e}=await import(`./katex-HOUACuRw.js`);return{default:e}},[]),r=t.forceLegacyMathML||!CR()&&t.legacyMathML?`htmlAndMathml`:`mathml`;return e.split(lR).map(e=>TR(e)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${e}</div>`:`<div>${e}</div>`).join(``).replace(wR,(e,t)=>n.renderToString(t,{throwOnError:!0,displayMode:!0,output:r}).replace(/\n/g,` `).replace(/<annotation.*<\/annotation>/g,``))}return e.replace(wR,`Katex is not supported in @mermaid-js/tiny. Please use the full mermaid library.`)},`renderKatexUnsanitized`),ER=W(async(e,t)=>hR(await dte(e,t),t),`renderKatexSanitized`),DR={getRows:uR,sanitizeText:hR,sanitizeTextOrArray:gR,hasBreaks:_R,splitBreaks:vR,lineBreakRegex:lR,removeScript:pR,getUrl:bR,evaluate:HL,getMax:ote,getMin:ste},fte=W(function(e,t){for(let n of t)e.attr(n[0],n[1])},`d3Attrs`),pte=W(function(e,t,n){let r=new Map;return n?(r.set(`width`,`100%`),r.set(`style`,`max-width: ${t}px;`)):(r.set(`height`,e),r.set(`width`,t)),r},`calculateSvgSizeAttrs`),OR=W(function(e,t,n,r){fte(e,pte(t,n,r))},`configureSvgSize`),kR=W(function(e,t,n,r){let i=t.node().getBBox(),a=i.width,o=i.height;G.info(`SVG bounds: ${a}x${o}`,i);let s=0,c=0;G.info(`Graph bounds: ${s}x${c}`,e),s=a+n*2,c=o+n*2,G.info(`Calculated bounds: ${s}x${c}`),OR(t,c,s,r);let l=`${i.x-n} ${i.y-n} ${i.width+2*n} ${i.height+2*n}`;t.attr(`viewBox`,l)},`setupGraphViewbox`),AR={},mte=W((e,t,n,r)=>{let i=``;return e in AR&&AR[e]?i=AR[e]({...n,svgId:r}):G.warn(`No theme found for ${e}`),` & {
|
|
240
|
+
font-family: ${n.fontFamily};
|
|
241
|
+
font-size: ${n.fontSize};
|
|
242
|
+
fill: ${n.textColor}
|
|
243
|
+
}
|
|
244
|
+
@keyframes edge-animation-frame {
|
|
245
|
+
from {
|
|
246
|
+
stroke-dashoffset: 0;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
@keyframes dash {
|
|
250
|
+
to {
|
|
251
|
+
stroke-dashoffset: 0;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
& .edge-animation-slow {
|
|
255
|
+
stroke-dasharray: 9,5 !important;
|
|
256
|
+
stroke-dashoffset: 900;
|
|
257
|
+
animation: dash 50s linear infinite;
|
|
258
|
+
stroke-linecap: round;
|
|
259
|
+
}
|
|
260
|
+
& .edge-animation-fast {
|
|
261
|
+
stroke-dasharray: 9,5 !important;
|
|
262
|
+
stroke-dashoffset: 900;
|
|
263
|
+
animation: dash 20s linear infinite;
|
|
264
|
+
stroke-linecap: round;
|
|
265
|
+
}
|
|
266
|
+
/* Classes common for multiple diagrams */
|
|
267
|
+
|
|
268
|
+
& .error-icon {
|
|
269
|
+
fill: ${n.errorBkgColor};
|
|
270
|
+
}
|
|
271
|
+
& .error-text {
|
|
272
|
+
fill: ${n.errorTextColor};
|
|
273
|
+
stroke: ${n.errorTextColor};
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
& .edge-thickness-normal {
|
|
277
|
+
stroke-width: ${n.strokeWidth??1}px;
|
|
278
|
+
}
|
|
279
|
+
& .edge-thickness-thick {
|
|
280
|
+
stroke-width: 3.5px
|
|
281
|
+
}
|
|
282
|
+
& .edge-pattern-solid {
|
|
283
|
+
stroke-dasharray: 0;
|
|
284
|
+
}
|
|
285
|
+
& .edge-thickness-invisible {
|
|
286
|
+
stroke-width: 0;
|
|
287
|
+
fill: none;
|
|
288
|
+
}
|
|
289
|
+
& .edge-pattern-dashed{
|
|
290
|
+
stroke-dasharray: 3;
|
|
291
|
+
}
|
|
292
|
+
.edge-pattern-dotted {
|
|
293
|
+
stroke-dasharray: 2;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
& .marker {
|
|
297
|
+
fill: ${n.lineColor};
|
|
298
|
+
stroke: ${n.lineColor};
|
|
299
|
+
}
|
|
300
|
+
& .marker.cross {
|
|
301
|
+
stroke: ${n.lineColor};
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
& svg {
|
|
305
|
+
font-family: ${n.fontFamily};
|
|
306
|
+
font-size: ${n.fontSize};
|
|
307
|
+
}
|
|
308
|
+
& p {
|
|
309
|
+
margin: 0
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
${i}
|
|
313
|
+
.node .neo-node {
|
|
314
|
+
stroke: ${n.nodeBorder};
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
[data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
|
|
318
|
+
stroke: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder};
|
|
319
|
+
filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`};
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
[data-look="neo"].node path {
|
|
324
|
+
stroke: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder};
|
|
325
|
+
stroke-width: ${n.strokeWidth??1}px;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
[data-look="neo"].node .outer-path {
|
|
329
|
+
filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`};
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
[data-look="neo"].node .neo-line path {
|
|
333
|
+
stroke: ${n.nodeBorder};
|
|
334
|
+
filter: none;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
[data-look="neo"].node circle{
|
|
338
|
+
stroke: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder};
|
|
339
|
+
filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`};
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
[data-look="neo"].node circle .state-start{
|
|
343
|
+
fill: #000000;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
[data-look="neo"].icon-shape .icon {
|
|
347
|
+
fill: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder};
|
|
348
|
+
filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`};
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
[data-look="neo"].icon-shape .icon-neo path {
|
|
352
|
+
stroke: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder};
|
|
353
|
+
filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`};
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
${t}
|
|
357
|
+
`},`getStyles`),hte=W((e,t)=>{t!==void 0&&(AR[e]=t)},`addStylesForDiagram`),gte=mte,jR={};mF(jR,{clear:()=>IR,getAccDescription:()=>BR,getAccTitle:()=>RR,getDiagramTitle:()=>HR,setAccDescription:()=>zR,setAccTitle:()=>LR,setDiagramTitle:()=>VR});var MR=``,NR=``,PR=``,FR=W(e=>hR(e,$L()),`sanitizeText`),IR=W(()=>{MR=``,PR=``,NR=``},`clear`),LR=W(e=>{MR=FR(e).replace(/^\s+/g,``)},`setAccTitle`),RR=W(()=>MR,`getAccTitle`),zR=W(e=>{PR=FR(e).replace(/\n\s+/g,`
|
|
358
|
+
`)},`setAccDescription`),BR=W(()=>PR,`getAccDescription`),VR=W(e=>{NR=FR(e)},`setDiagramTitle`),HR=W(()=>NR,`getDiagramTitle`),UR=G,_te=gF,WR=$L,vte=QL,yte=VL,GR=W(e=>hR(e,WR()),`sanitizeText`),KR=kR,bte=W(()=>jR,`getCommonDb`),qR={},JR=W((e,t,n)=>{qR[e]&&UR.warn(`Diagram with id ${e} already registered. Overwriting.`),qR[e]=t,n&&aL(e,n),hte(e,t.styles),t.injectUtils?.(UR,_te,WR,GR,KR,bte(),()=>{})},`registerDiagram`),YR=W(e=>{if(e in qR)return qR[e];throw new xte(e)},`getDiagram`),xte=class extends Error{static{W(this,`DiagramNotFoundError`)}constructor(e){super(`Diagram ${e} not found.`)}},Ste={value:()=>{}};function XR(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+``)||r in n||/[\s.]/.test(r))throw Error(`illegal type: `+r);n[r]=[]}return new ZR(n)}function ZR(e){this._=e}function Cte(e,t){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}ZR.prototype=XR.prototype={constructor:ZR,on:function(e,t){var n=this._,r=Cte(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=wte(n[i],e.name)))return i;return}if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=QR(n[i],e.name,t);else if(t==null)for(i in n)n[i]=QR(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new ZR(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function wte(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function QR(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=Ste,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var $R={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function ez(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),$R.hasOwnProperty(t)?{space:$R[t],local:e}:e}function Tte(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===`http://www.w3.org/1999/xhtml`&&t.documentElement.namespaceURI===`http://www.w3.org/1999/xhtml`?t.createElement(e):t.createElementNS(n,e)}}function Ete(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function tz(e){var t=ez(e);return(t.local?Ete:Tte)(t)}function nz(){}function rz(e){return e==null?nz:function(){return this.querySelector(e)}}function iz(e){typeof e!=`function`&&(e=rz(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=Array(o),c,l,u=0;u<o;++u)(c=a[u])&&(l=e.call(c,c.__data__,u,a))&&(`__data__`in c&&(l.__data__=c.__data__),s[u]=l);return new KB(r,this._parents)}function az(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function oz(){return[]}function sz(e){return e==null?oz:function(){return this.querySelectorAll(e)}}function cz(e){return function(){return az(e.apply(this,arguments))}}function lz(e){e=typeof e==`function`?cz(e):sz(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(r.push(e.call(c,c.__data__,l,o)),i.push(c));return new KB(r,i)}function uz(e){return function(){return this.matches(e)}}function dz(e){return function(t){return t.matches(e)}}var fz=Array.prototype.find;function pz(e){return function(){return fz.call(this.children,e)}}function mz(){return this.firstElementChild}function hz(e){return this.select(e==null?mz:pz(typeof e==`function`?e:dz(e)))}var gz=Array.prototype.filter;function _z(){return Array.from(this.children)}function vz(e){return function(){return gz.call(this.children,e)}}function yz(e){return this.selectAll(e==null?_z:vz(typeof e==`function`?e:dz(e)))}function bz(e){typeof e!=`function`&&(e=uz(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new KB(r,this._parents)}function xz(e){return Array(e.length)}function Sz(){return new KB(this._enter||this._groups.map(xz),this._parents)}function Cz(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Cz.prototype={constructor:Cz,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function wz(e){return function(){return e}}function Tz(e,t,n,r,i,a){for(var o=0,s,c=t.length,l=a.length;o<l;++o)(s=t[o])?(s.__data__=a[o],r[o]=s):n[o]=new Cz(e,a[o]);for(;o<c;++o)(s=t[o])&&(i[o]=s)}function Ez(e,t,n,r,i,a,o){var s,c,l=new Map,u=t.length,d=a.length,f=Array(u),p;for(s=0;s<u;++s)(c=t[s])&&(f[s]=p=o.call(c,c.__data__,s,t)+``,l.has(p)?i[s]=c:l.set(p,c));for(s=0;s<d;++s)p=o.call(e,a[s],s,a)+``,(c=l.get(p))?(r[s]=c,c.__data__=a[s],l.delete(p)):n[s]=new Cz(e,a[s]);for(s=0;s<u;++s)(c=t[s])&&l.get(f[s])===c&&(i[s]=c)}function Dz(e){return e.__data__}function Oz(e,t){if(!arguments.length)return Array.from(this,Dz);var n=t?Ez:Tz,r=this._parents,i=this._groups;typeof e!=`function`&&(e=wz(e));for(var a=i.length,o=Array(a),s=Array(a),c=Array(a),l=0;l<a;++l){var u=r[l],d=i[l],f=d.length,p=kz(e.call(u,u&&u.__data__,l,r)),m=p.length,h=s[l]=Array(m),g=o[l]=Array(m);n(u,d,h,g,c[l]=Array(f),p,t);for(var _=0,v=0,y,b;_<m;++_)if(y=h[_]){for(_>=v&&(v=_+1);!(b=g[v])&&++v<m;);y._next=b||null}}return o=new KB(o,r),o._enter=s,o._exit=c,o}function kz(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function Az(){return new KB(this._exit||this._groups.map(xz),this._parents)}function jz(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e==`function`?(r=e(r),r&&=r.selection()):r=r.append(e+``),t!=null&&(i=t(i),i&&=i.selection()),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function Mz(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),c=0;c<o;++c)for(var l=n[c],u=r[c],d=l.length,f=s[c]=Array(d),p,m=0;m<d;++m)(p=l[m]||u[m])&&(f[m]=p);for(;c<i;++c)s[c]=n[c];return new KB(s,this._parents)}function Nz(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function Pz(e){e||=Fz;function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,c=i[a]=Array(s),l,u=0;u<s;++u)(l=o[u])&&(c[u]=l);c.sort(t)}return new KB(i,this._parents).order()}function Fz(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Iz(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Lz(){return Array.from(this)}function Rz(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function zz(){let e=0;for(let t of this)++e;return e}function Bz(){return!this.node()}function Vz(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&e.call(s,s.__data__,a,i);return this}function Hz(e){return function(){this.removeAttribute(e)}}function Uz(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Wz(e,t){return function(){this.setAttribute(e,t)}}function Gz(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Kz(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function qz(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Jz(e,t){var n=ez(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?Uz:Hz:typeof t==`function`?n.local?qz:Kz:n.local?Gz:Wz)(n,t))}function Yz(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Xz(e){return function(){this.style.removeProperty(e)}}function Zz(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Qz(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function $z(e,t,n){return arguments.length>1?this.each((t==null?Xz:typeof t==`function`?Qz:Zz)(e,t,n??``)):eB(this.node(),e)}function eB(e,t){return e.style.getPropertyValue(t)||Yz(e).getComputedStyle(e,null).getPropertyValue(t)}function tB(e){return function(){delete this[e]}}function nB(e,t){return function(){this[e]=t}}function rB(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function iB(e,t){return arguments.length>1?this.each((t==null?tB:typeof t==`function`?rB:nB)(e,t)):this.node()[e]}function aB(e){return e.trim().split(/^|\s+/)}function oB(e){return e.classList||new sB(e)}function sB(e){this._node=e,this._names=aB(e.getAttribute(`class`)||``)}sB.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute(`class`,this._names.join(` `)))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute(`class`,this._names.join(` `)))},contains:function(e){return this._names.indexOf(e)>=0}};function cB(e,t){for(var n=oB(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function lB(e,t){for(var n=oB(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function uB(e){return function(){cB(this,e)}}function dB(e){return function(){lB(this,e)}}function fB(e,t){return function(){(t.apply(this,arguments)?cB:lB)(this,e)}}function pB(e,t){var n=aB(e+``);if(arguments.length<2){for(var r=oB(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t==`function`?fB:t?uB:dB)(n,t))}function mB(){this.textContent=``}function hB(e){return function(){this.textContent=e}}function gB(e){return function(){var t=e.apply(this,arguments);this.textContent=t??``}}function _B(e){return arguments.length?this.each(e==null?mB:(typeof e==`function`?gB:hB)(e)):this.node().textContent}function vB(){this.innerHTML=``}function yB(e){return function(){this.innerHTML=e}}function bB(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??``}}function xB(e){return arguments.length?this.each(e==null?vB:(typeof e==`function`?bB:yB)(e)):this.node().innerHTML}function SB(){this.nextSibling&&this.parentNode.appendChild(this)}function CB(){return this.each(SB)}function wB(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function TB(){return this.each(wB)}function EB(e){var t=typeof e==`function`?e:tz(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function DB(){return null}function OB(e,t){var n=typeof e==`function`?e:tz(e),r=t==null?DB:typeof t==`function`?t:rz(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function kB(){var e=this.parentNode;e&&e.removeChild(this)}function AB(){return this.each(kB)}function jB(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function MB(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function NB(e){return this.select(e?MB:jB)}function PB(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}function FB(e){return function(t){e.call(this,t,this.__data__)}}function IB(e){return e.trim().split(/^|\s+/).map(function(e){var t=``,n=e.indexOf(`.`);return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function LB(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function RB(e,t,n){return function(){var r=this.__on,i,a=FB(t);if(r){for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function zB(e,t,n){var r=IB(e+``),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,u;c<l;++c)for(i=0,u=s[c];i<a;++i)if((o=r[i]).type===u.type&&o.name===u.name)return u.value}return}for(s=t?RB:LB,i=0;i<a;++i)this.each(s(r[i],t,n));return this}function BB(e,t,n){var r=Yz(e),i=r.CustomEvent;typeof i==`function`?i=new i(t,n):(i=r.document.createEvent(`Event`),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function VB(e,t){return function(){return BB(this,e,t)}}function HB(e,t){return function(){return BB(this,e,t.apply(this,arguments))}}function UB(e,t){return this.each((typeof t==`function`?HB:VB)(e,t))}function*WB(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var GB=[null];function KB(e,t){this._groups=e,this._parents=t}function qB(){return new KB([[document.documentElement]],GB)}function JB(){return this}KB.prototype=qB.prototype={constructor:KB,select:iz,selectAll:lz,selectChild:hz,selectChildren:yz,filter:bz,data:Oz,enter:Sz,exit:Az,join:jz,merge:Mz,selection:JB,order:Nz,sort:Pz,call:Iz,nodes:Lz,node:Rz,size:zz,empty:Bz,each:Vz,attr:Jz,style:$z,property:iB,classed:pB,text:_B,html:xB,raise:CB,lower:TB,append:EB,insert:OB,remove:AB,clone:NB,datum:PB,on:zB,dispatch:UB,[Symbol.iterator]:WB};function YB(e){return typeof e==`string`?new KB([[document.querySelector(e)]],[document.documentElement]):new KB([[e]],GB)}function XB(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ZB(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function QB(){}var $B=.7,eV=1/$B,tV=`\\s*([+-]?\\d+)\\s*`,nV=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,rV=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,iV=/^#([0-9a-f]{3,8})$/,aV=RegExp(`^rgb\\(${tV},${tV},${tV}\\)$`),oV=RegExp(`^rgb\\(${rV},${rV},${rV}\\)$`),sV=RegExp(`^rgba\\(${tV},${tV},${tV},${nV}\\)$`),cV=RegExp(`^rgba\\(${rV},${rV},${rV},${nV}\\)$`),lV=RegExp(`^hsl\\(${nV},${rV},${rV}\\)$`),uV=RegExp(`^hsla\\(${nV},${rV},${rV},${nV}\\)$`),dV={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};XB(QB,gV,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:fV,formatHex:fV,formatHex8:pV,formatHsl:mV,formatRgb:hV,toString:hV});function fV(){return this.rgb().formatHex()}function pV(){return this.rgb().formatHex8()}function mV(){return kV(this).formatHsl()}function hV(){return this.rgb().formatRgb()}function gV(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=iV.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?_V(t):n===3?new xV(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?vV(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?vV(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=aV.exec(e))?new xV(t[1],t[2],t[3],1):(t=oV.exec(e))?new xV(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=sV.exec(e))?vV(t[1],t[2],t[3],t[4]):(t=cV.exec(e))?vV(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=lV.exec(e))?OV(t[1],t[2]/100,t[3]/100,1):(t=uV.exec(e))?OV(t[1],t[2]/100,t[3]/100,t[4]):dV.hasOwnProperty(e)?_V(dV[e]):e===`transparent`?new xV(NaN,NaN,NaN,0):null}function _V(e){return new xV(e>>16&255,e>>8&255,e&255,1)}function vV(e,t,n,r){return r<=0&&(e=t=n=NaN),new xV(e,t,n,r)}function yV(e){return e instanceof QB||(e=gV(e)),e?(e=e.rgb(),new xV(e.r,e.g,e.b,e.opacity)):new xV}function bV(e,t,n,r){return arguments.length===1?yV(e):new xV(e,t,n,r??1)}function xV(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}XB(xV,bV,ZB(QB,{brighter(e){return e=e==null?eV:eV**+e,new xV(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?$B:$B**+e,new xV(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new xV(EV(this.r),EV(this.g),EV(this.b),TV(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:SV,formatHex:SV,formatHex8:CV,formatRgb:wV,toString:wV}));function SV(){return`#${DV(this.r)}${DV(this.g)}${DV(this.b)}`}function CV(){return`#${DV(this.r)}${DV(this.g)}${DV(this.b)}${DV((isNaN(this.opacity)?1:this.opacity)*255)}`}function wV(){let e=TV(this.opacity);return`${e===1?`rgb(`:`rgba(`}${EV(this.r)}, ${EV(this.g)}, ${EV(this.b)}${e===1?`)`:`, ${e})`}`}function TV(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function EV(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function DV(e){return e=EV(e),(e<16?`0`:``)+e.toString(16)}function OV(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new jV(e,t,n,r)}function kV(e){if(e instanceof jV)return new jV(e.h,e.s,e.l,e.opacity);if(e instanceof QB||(e=gV(e)),!e)return new jV;if(e instanceof jV)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new jV(o,s,c,e.opacity)}function AV(e,t,n,r){return arguments.length===1?kV(e):new jV(e,t,n,r??1)}function jV(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}XB(jV,AV,ZB(QB,{brighter(e){return e=e==null?eV:eV**+e,new jV(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?$B:$B**+e,new jV(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new xV(PV(e>=240?e-240:e+120,i,r),PV(e,i,r),PV(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new jV(MV(this.h),NV(this.s),NV(this.l),TV(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(){let e=TV(this.opacity);return`${e===1?`hsl(`:`hsla(`}${MV(this.h)}, ${NV(this.s)*100}%, ${NV(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function MV(e){return e=(e||0)%360,e<0?e+360:e}function NV(e){return Math.max(0,Math.min(1,e||0))}function PV(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var FV=e=>()=>e;function IV(e,t){return function(n){return e+n*t}}function LV(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function RV(e,t){var n=t-e;return n?IV(e,n>180||n<-180?n-360*Math.round(n/360):n):FV(isNaN(e)?t:e)}function zV(e){return(e=+e)==1?BV:function(t,n){return n-t?LV(t,n,e):FV(isNaN(t)?n:t)}}function BV(e,t){var n=t-e;return n?IV(e,n):FV(isNaN(e)?t:e)}var VV=(function e(t){var n=zV(t);function r(e,t){var r=n((e=bV(e)).r,(t=bV(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=BV(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function HV(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var UV=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,WV=new RegExp(UV.source,`g`);function GV(e){return function(){return e}}function KV(e){return function(t){return e(t)+``}}function qV(e,t){var n=UV.lastIndex=WV.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=UV.exec(e))&&(i=WV.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:HV(r,i)})),n=WV.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?KV(c[0].x):GV(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}var JV=180/Math.PI,YV={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function XV(e,t,n,r,i,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*JV,skewX:Math.atan(c)*JV,scaleX:o,scaleY:s}}var ZV;function QV(e){let t=new(typeof DOMMatrix==`function`?DOMMatrix:WebKitCSSMatrix)(e+``);return t.isIdentity?YV:XV(t.a,t.b,t.c,t.d,t.e,t.f)}function $V(e){return e==null||(ZV||=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),ZV.setAttribute(`transform`,e),!(e=ZV.transform.baseVal.consolidate()))?YV:(e=e.matrix,XV(e.a,e.b,e.c,e.d,e.e,e.f))}function eH(e,t,n,r){function i(e){return e.length?e.pop()+` `:``}function a(e,r,i,a,o,s){if(e!==i||r!==a){var c=o.push(`translate(`,null,t,null,n);s.push({i:c-4,x:HV(e,i)},{i:c-2,x:HV(r,a)})}else (i||a)&&o.push(`translate(`+i+t+a+n)}function o(e,t,n,a){e===t?t&&n.push(i(n)+`rotate(`+t+r):(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+`rotate(`,null,r)-2,x:HV(e,t)}))}function s(e,t,n,a){e===t?t&&n.push(i(n)+`skewX(`+t+r):a.push({i:n.push(i(n)+`skewX(`,null,r)-2,x:HV(e,t)})}function c(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+`scale(`,null,`,`,null,`)`);o.push({i:s-4,x:HV(e,n)},{i:s-2,x:HV(t,r)})}else (n!==1||r!==1)&&a.push(i(a)+`scale(`+n+`,`+r+`)`)}return function(t,n){var r=[],i=[];return t=e(t),n=e(n),a(t.translateX,t.translateY,n.translateX,n.translateY,r,i),o(t.rotate,n.rotate,r,i),s(t.skewX,n.skewX,r,i),c(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t<n;)r[(a=i[t]).i]=a.x(e);return r.join(``)}}}var tH=eH(QV,`px, `,`px)`,`deg)`),nH=eH($V,`, `,`)`,`)`),rH=0,iH=0,aH=0,oH=1e3,sH,cH,lH=0,uH=0,dH=0,fH=typeof performance==`object`&&performance.now?performance:Date,pH=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function mH(){return uH||=(pH(hH),fH.now()+dH)}function hH(){uH=0}function gH(){this._call=this._time=this._next=null}gH.prototype=_H.prototype={constructor:gH,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?mH():+n)+(t==null?0:+t),!this._next&&cH!==this&&(cH?cH._next=this:sH=this,cH=this),this._call=e,this._time=n,SH()},stop:function(){this._call&&(this._call=null,this._time=1/0,SH())}};function _H(e,t,n){var r=new gH;return r.restart(e,t,n),r}function vH(){mH(),++rH;for(var e=sH,t;e;)(t=uH-e._time)>=0&&e._call.call(void 0,t),e=e._next;--rH}function yH(){uH=(lH=fH.now())+dH,rH=iH=0;try{vH()}finally{rH=0,xH(),uH=0}}function bH(){var e=fH.now(),t=e-lH;t>oH&&(dH-=t,lH=e)}function xH(){for(var e,t=sH,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:sH=n);cH=e,SH(r)}function SH(e){rH||(iH&&=clearTimeout(iH),e-uH>24?(e<1/0&&(iH=setTimeout(yH,e-fH.now()-dH)),aH&&=clearInterval(aH)):(aH||=(lH=fH.now(),setInterval(bH,oH)),rH=1,pH(yH)))}function CH(e,t,n){var r=new gH;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var wH=XR(`start`,`end`,`cancel`,`interrupt`),TH=[];function EH(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;AH(e,n,{name:t,index:r,group:i,on:wH,tween:TH,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function DH(e,t){var n=kH(e,t);if(n.state>0)throw Error(`too late; already scheduled`);return n}function OH(e,t){var n=kH(e,t);if(n.state>3)throw Error(`too late; already running`);return n}function kH(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function AH(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=_H(a,0,n.time);function a(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var l,u,d,f;if(n.state!==1)return c();for(l in r)if(f=r[l],f.name===n.name){if(f.state===3)return CH(o);f.state===4?(f.state=6,f.timer.stop(),f.on.call(`interrupt`,e,e.__data__,f.index,f.group),delete r[l]):+l<t&&(f.state=6,f.timer.stop(),f.on.call(`cancel`,e,e.__data__,f.index,f.group),delete r[l])}if(CH(function(){n.state===3&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))}),n.state=2,n.on.call(`start`,e,e.__data__,n.index,n.group),n.state===2){for(n.state=3,i=Array(d=n.tween.length),l=0,u=-1;l<d;++l)(f=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(i[++u]=f);i.length=u+1}}function s(t){for(var r=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(c),n.state=5,1),a=-1,o=i.length;++a<o;)i[a].call(e,r);n.state===5&&(n.on.call(`end`,e,e.__data__,n.index,n.group),c())}function c(){for(var i in n.state=6,n.timer.stop(),delete r[t],r)return;delete e.__transition}}function jH(e,t){var n=e.__transition,r,i,a=!0,o;if(n){for(o in t=t==null?null:t+``,n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?`interrupt`:`cancel`,e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function MH(e){return this.each(function(){jH(this,e)})}function NH(e,t){var n,r;return function(){var i=OH(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function PH(e,t,n){var r,i;if(typeof n!=`function`)throw Error();return function(){var a=OH(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===t){i[c]=s;break}c===l&&i.push(s)}a.tween=i}}function FH(e,t){var n=this._id;if(e+=``,arguments.length<2){for(var r=kH(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?NH:PH)(n,e,t))}function IH(e,t,n){var r=e._id;return e.each(function(){var e=OH(this,r);(e.value||={})[t]=n.apply(this,arguments)}),function(e){return kH(e,r).value[t]}}function LH(e,t){var n;return(typeof t==`number`?HV:t instanceof gV?VV:(n=gV(t))?(t=n,VV):qV)(e,t)}function RH(e){return function(){this.removeAttribute(e)}}function zH(e){return function(){this.removeAttributeNS(e.space,e.local)}}function BH(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function VH(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function HH(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function UH(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function WH(e,t){var n=ez(e),r=n===`transform`?nH:LH;return this.attrTween(e,typeof t==`function`?(n.local?UH:HH)(n,r,IH(this,`attr.`+e,t)):t==null?(n.local?zH:RH)(n):(n.local?VH:BH)(n,r,t))}function GH(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function KH(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function qH(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&KH(e,i)),n}return i._value=t,i}function JH(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&GH(e,i)),n}return i._value=t,i}function YH(e,t){var n=`attr.`+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!=`function`)throw Error();var r=ez(e);return this.tween(n,(r.local?qH:JH)(r,t))}function XH(e,t){return function(){DH(this,e).delay=+t.apply(this,arguments)}}function ZH(e,t){return t=+t,function(){DH(this,e).delay=t}}function QH(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?XH:ZH)(t,e)):kH(this.node(),t).delay}function $H(e,t){return function(){OH(this,e).duration=+t.apply(this,arguments)}}function eU(e,t){return t=+t,function(){OH(this,e).duration=t}}function tU(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?$H:eU)(t,e)):kH(this.node(),t).duration}function nU(e,t){if(typeof t!=`function`)throw Error();return function(){OH(this,e).ease=t}}function rU(e){var t=this._id;return arguments.length?this.each(nU(t,e)):kH(this.node(),t).ease}function iU(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!=`function`)throw Error();OH(this,e).ease=n}}function aU(e){if(typeof e!=`function`)throw Error();return this.each(iU(this._id,e))}function oU(e){typeof e!=`function`&&(e=uz(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new FU(r,this._parents,this._name,this._id)}function sU(e){if(e._id!==this._id)throw Error();for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s<a;++s)for(var c=t[s],l=n[s],u=c.length,d=o[s]=Array(u),f,p=0;p<u;++p)(f=c[p]||l[p])&&(d[p]=f);for(;s<r;++s)o[s]=t[s];return new FU(o,this._parents,this._name,this._id)}function cU(e){return(e+``).trim().split(/^|\s+/).every(function(e){var t=e.indexOf(`.`);return t>=0&&(e=e.slice(0,t)),!e||e===`start`})}function lU(e,t,n){var r,i,a=cU(t)?DH:OH;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function uU(e,t){var n=this._id;return arguments.length<2?kH(this.node(),n).on.on(e):this.each(lU(n,e,t))}function dU(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function fU(){return this.on(`end.remove`,dU(this._id))}function pU(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=rz(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o)for(var s=r[o],c=s.length,l=a[o]=Array(c),u,d,f=0;f<c;++f)(u=s[f])&&(d=e.call(u,u.__data__,f,s))&&(`__data__`in u&&(d.__data__=u.__data__),l[f]=d,EH(l[f],t,n,f,l,kH(u,n)));return new FU(a,this._parents,t,n)}function mU(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=sz(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c=r[s],l=c.length,u,d=0;d<l;++d)if(u=c[d]){for(var f=e.call(u,u.__data__,d,c),p,m=kH(u,n),h=0,g=f.length;h<g;++h)(p=f[h])&&EH(p,t,n,h,f,m);a.push(f),o.push(u)}return new FU(a,o,t,n)}var hU=qB.prototype.constructor;function gU(){return new hU(this._groups,this._parents)}function _U(e,t){var n,r,i;return function(){var a=eB(this,e),o=(this.style.removeProperty(e),eB(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function vU(e){return function(){this.style.removeProperty(e)}}function yU(e,t,n){var r,i=n+``,a;return function(){var o=eB(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function bU(e,t,n){var r,i,a;return function(){var o=eB(this,e),s=n(this),c=s+``;return s??(c=s=(this.style.removeProperty(e),eB(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s))}}function xU(e,t){var n,r,i,a=`style.`+t,o=`end.`+a,s;return function(){var c=OH(this,e),l=c.on,u=c.value[a]==null?s||=vU(t):void 0;(l!==n||i!==u)&&(r=(n=l).copy()).on(o,i=u),c.on=r}}function SU(e,t,n){var r=(e+=``)==`transform`?tH:LH;return t==null?this.styleTween(e,_U(e,r)).on(`end.style.`+e,vU(e)):typeof t==`function`?this.styleTween(e,bU(e,r,IH(this,`style.`+e,t))).each(xU(this._id,e)):this.styleTween(e,yU(e,r,t),n).on(`end.style.`+e,null)}function CU(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function wU(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&CU(e,a,n)),r}return a._value=t,a}function TU(e,t,n){var r=`style.`+(e+=``);if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!=`function`)throw Error();return this.tween(r,wU(e,t,n??``))}function EU(e){return function(){this.textContent=e}}function DU(e){return function(){var t=e(this);this.textContent=t??``}}function OU(e){return this.tween(`text`,typeof e==`function`?DU(IH(this,`text`,e)):EU(e==null?``:e+``))}function kU(e){return function(t){this.textContent=e.call(this,t)}}function AU(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&kU(r)),t}return r._value=e,r}function jU(e){var t=`text`;if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!=`function`)throw Error();return this.tween(t,AU(e))}function MU(){for(var e=this._name,t=this._id,n=LU(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)if(c=o[l]){var u=kH(c,t);EH(c,e,n,l,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new FU(r,this._parents,e,n)}function NU(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var n=OH(this,r),i=n.on;i!==e&&(t=(e=i).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),n.on=t}),i===0&&a()})}var PU=0;function FU(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function IU(e){return qB().transition(e)}function LU(){return++PU}var RU=qB.prototype;FU.prototype=IU.prototype={constructor:FU,select:pU,selectAll:mU,selectChild:RU.selectChild,selectChildren:RU.selectChildren,filter:oU,merge:sU,selection:gU,transition:MU,call:RU.call,nodes:RU.nodes,node:RU.node,size:RU.size,empty:RU.empty,each:RU.each,on:uU,attr:WH,attrTween:YH,style:SU,styleTween:TU,text:OU,textTween:jU,remove:fU,tween:FH,delay:QH,duration:tU,ease:rU,easeVarying:aU,end:NU,[Symbol.iterator]:RU[Symbol.iterator]};function zU(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var BU={time:null,delay:0,duration:250,ease:zU};function VU(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}function HU(e){var t,n;e instanceof FU?(t=e._id,e=e._name):(t=LU(),(n=BU).time=mH(),e=e==null?null:e+``);for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&EH(c,e,t,l,o,n||VU(c,t));return new FU(r,this._parents,e,t)}qB.prototype.interrupt=MH,qB.prototype.transition=HU;var{abs:Dte,max:Ote,min:kte}=Math;[`w`,`e`].map(UU),[`n`,`s`].map(UU),[`n`,`w`,`e`,`s`,`nw`,`ne`,`sw`,`se`].map(UU);function UU(e){return{type:e}}var WU=Math.abs,GU=Math.atan2,KU=Math.cos,qU=Math.max,JU=Math.min,YU=Math.sin,XU=Math.sqrt,ZU=1e-12,QU=Math.PI,$U=QU/2,eW=2*QU;function tW(e){return e>1?0:e<-1?QU:Math.acos(e)}function nW(e){return e>=1?$U:e<=-1?-$U:Math.asin(e)}function rW(e){this._context=e}rW.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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function iW(e){return new rW(e)}function aW(e){return e[0]}function oW(e){return e[1]}function sW(e,t){var n=r(!0),o=null,s=iW,c=null,l=i(u);e=typeof e==`function`?e:e===void 0?aW:r(e),t=typeof t==`function`?t:t===void 0?oW:r(t);function u(r){var i,u=(r=a(r)).length,d,f=!1,p;for(o??(c=s(p=l())),i=0;i<=u;++i)!(i<u&&n(d=r[i],i,r))===f&&((f=!f)?c.lineStart():c.lineEnd()),f&&c.point(+e(d,i,r),+t(d,i,r));if(p)return c=null,p+``||null}return u.x=function(t){return arguments.length?(e=typeof t==`function`?t:r(+t),u):e},u.y=function(e){return arguments.length?(t=typeof e==`function`?e:r(+e),u):t},u.defined=function(e){return arguments.length?(n=typeof e==`function`?e:r(!!e),u):n},u.curve=function(e){return arguments.length?(s=e,o!=null&&(c=s(o)),u):s},u.context=function(e){return arguments.length?(e==null?o=c=null:c=s(o=e),u):o},u}var cW=class{constructor(e,t){this._context=e,this._x=t}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,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function lW(e){return new cW(e,!0)}function uW(e){return new cW(e,!1)}function dW(){}function fW(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function pW(e){this._context=e}pW.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:fW(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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);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:fW(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function mW(e){return new pW(e)}function hW(e){this._context=e}hW.prototype={areaStart:dW,areaEnd:dW,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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:fW(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function gW(e){return new hW(e)}function _W(e){this._context=e}_W.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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:fW(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function vW(e){return new _W(e)}function yW(e,t){this._basis=new pW(e),this._beta=t}yW.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,c;++s<=n;)c=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+c*a),this._beta*t[s]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var bW=(function e(t){function n(e){return t===1?new pW(e):new yW(e,t)}return n.beta=function(t){return e(+t)},n})(.85);function xW(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function SW(e,t){this._context=e,this._k=(1-t)/6}SW.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:xW(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:xW(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var CW=(function e(t){function n(e){return new SW(e,t)}return n.tension=function(t){return e(+t)},n})(0);function wW(e,t){this._context=e,this._k=(1-t)/6}wW.prototype={areaStart:dW,areaEnd:dW,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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:xW(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var TW=(function e(t){function n(e){return new wW(e,t)}return n.tension=function(t){return e(+t)},n})(0);function EW(e,t){this._context=e,this._k=(1-t)/6}EW.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(e,t){switch(e=+e,t=+t,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:xW(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var DW=(function e(t){function n(e){return new EW(e,t)}return n.tension=function(t){return e(+t)},n})(0);function OW(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>1e-12){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function kW(e,t){this._context=e,this._alpha=t}kW.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(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:OW(this,e,t);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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var AW=(function e(t){function n(e){return t?new kW(e,t):new SW(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function jW(e,t){this._context=e,this._alpha=t}jW.prototype={areaStart:dW,areaEnd:dW,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(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:OW(this,e,t);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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var MW=(function e(t){function n(e){return t?new jW(e,t):new wW(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function NW(e,t){this._context=e,this._alpha=t}NW.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(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+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:OW(this,e,t);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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var PW=(function e(t){function n(e){return t?new NW(e,t):new EW(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function FW(e){this._context=e}FW.prototype={areaStart:dW,areaEnd:dW,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function IW(e){return new FW(e)}function LW(e){return e<0?-1:1}function RW(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(LW(a)+LW(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function zW(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function BW(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function VW(e){this._context=e}VW.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:BW(this,this._t0,zW(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,BW(this,zW(this,n=RW(this,e,t)),n);break;default:BW(this,this._t0,n=RW(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function HW(e){this._context=new UW(e)}(HW.prototype=Object.create(VW.prototype)).point=function(e,t){VW.prototype.point.call(this,t,e)};function UW(e){this._context=e}UW.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function WW(e){return new VW(e)}function GW(e){return new HW(e)}function KW(e){this._context=e}KW.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=qW(e),i=qW(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function qW(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function JW(e){return new KW(e)}function YW(e,t){this._context=e,this._t=t}YW.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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}this._x=e,this._y=t}};function XW(e){return new YW(e,.5)}function ZW(e){return new YW(e,0)}function QW(e){return new YW(e,1)}function $W(e,t,n){this.k=e,this.x=t,this.y=n}$W.prototype={constructor:$W,scale:function(e){return e===1?this:new $W(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new $W(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return`translate(`+this.x+`,`+this.y+`) scale(`+this.k+`)`}};var eG=new $W(1,0,0);tG.prototype=$W.prototype;function tG(e){for(;!e.__zoom;)if(!(e=e.parentNode))return eG;return e.__zoom}var nG=W(e=>{let{securityLevel:t}=WR(),n=YB(`body`);return t===`sandbox`&&(n=YB((YB(`#i${e}`).node()?.contentDocument??document).body)),n.select(`#${e}`)},`selectSvgElement`);function rG(e){return e==null}W(rG,`isNothing`);function iG(e){return typeof e==`object`&&!!e}W(iG,`isObject`);function aG(e){return Array.isArray(e)?e:rG(e)?[]:[e]}W(aG,`toArray`);function oG(e,t){var n,r,i,a;if(t)for(a=Object.keys(t),n=0,r=a.length;n<r;n+=1)i=a[n],e[i]=t[i];return e}W(oG,`extend`);function sG(e,t){var n=``,r;for(r=0;r<t;r+=1)n+=e;return n}W(sG,`repeat`);function cG(e){return e===0&&1/e==-1/0}W(cG,`isNegativeZero`);var lG={isNothing:rG,isObject:iG,toArray:aG,repeat:sG,isNegativeZero:cG,extend:oG};function uG(e,t){var n=``,r=e.reason||`(unknown reason)`;return e.mark?(e.mark.name&&(n+=`in "`+e.mark.name+`" `),n+=`(`+(e.mark.line+1)+`:`+(e.mark.column+1)+`)`,!t&&e.mark.snippet&&(n+=`
|
|
359
|
+
|
|
360
|
+
`+e.mark.snippet),r+` `+n):r}W(uG,`formatError`);function dG(e,t){Error.call(this),this.name=`YAMLException`,this.reason=e,this.mark=t,this.message=uG(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack||``}W(dG,`YAMLException$1`),dG.prototype=Object.create(Error.prototype),dG.prototype.constructor=dG,dG.prototype.toString=W(function(e){return this.name+`: `+uG(this,e)},`toString`);var fG=dG;function pG(e,t,n,r,i){var a=``,o=``,s=Math.floor(i/2)-1;return r-t>s&&(a=` ... `,t=r-s+a.length),n-r>s&&(o=` ...`,n=r+s-o.length),{str:a+e.slice(t,n).replace(/\t/g,`→`)+o,pos:r-t+a.length}}W(pG,`getLine`);function mG(e,t){return lG.repeat(` `,t-e.length)+e}W(mG,`padStart`);function hG(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||=79,typeof t.indent!=`number`&&(t.indent=1),typeof t.linesBefore!=`number`&&(t.linesBefore=3),typeof t.linesAfter!=`number`&&(t.linesAfter=2);for(var n=/\r?\n|\r|\0/g,r=[0],i=[],a,o=-1;a=n.exec(e.buffer);)i.push(a.index),r.push(a.index+a[0].length),e.position<=a.index&&o<0&&(o=r.length-2);o<0&&(o=r.length-1);var s=``,c,l,u=Math.min(e.line+t.linesAfter,i.length).toString().length,d=t.maxLength-(t.indent+u+3);for(c=1;c<=t.linesBefore&&!(o-c<0);c++)l=pG(e.buffer,r[o-c],i[o-c],e.position-(r[o]-r[o-c]),d),s=lG.repeat(` `,t.indent)+mG((e.line-c+1).toString(),u)+` | `+l.str+`
|
|
361
|
+
`+s;for(l=pG(e.buffer,r[o],i[o],e.position,d),s+=lG.repeat(` `,t.indent)+mG((e.line+1).toString(),u)+` | `+l.str+`
|
|
362
|
+
`,s+=lG.repeat(`-`,t.indent+u+3+l.pos)+`^
|
|
363
|
+
`,c=1;c<=t.linesAfter&&!(o+c>=i.length);c++)l=pG(e.buffer,r[o+c],i[o+c],e.position-(r[o]-r[o+c]),d),s+=lG.repeat(` `,t.indent)+mG((e.line+c+1).toString(),u)+` | `+l.str+`
|
|
364
|
+
`;return s.replace(/\n$/,``)}W(hG,`makeSnippet`);var gG=hG,_G=[`kind`,`multi`,`resolve`,`construct`,`instanceOf`,`predicate`,`represent`,`representName`,`defaultStyle`,`styleAliases`],vG=[`scalar`,`sequence`,`mapping`];function yG(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(e){t[String(e)]=n})}),t}W(yG,`compileStyleAliases`);function bG(e,t){if(t||={},Object.keys(t).forEach(function(t){if(_G.indexOf(t)===-1)throw new fG(`Unknown option "`+t+`" is met in definition of "`+e+`" YAML type.`)}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=yG(t.styleAliases||null),vG.indexOf(this.kind)===-1)throw new fG(`Unknown kind "`+this.kind+`" is specified for "`+e+`" YAML type.`)}W(bG,`Type$1`);var xG=bG;function SG(e,t){var n=[];return e[t].forEach(function(e){var t=n.length;n.forEach(function(n,r){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=r)}),n[t]=e}),n}W(SG,`compileList`);function CG(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,n;function r(t){t.multi?(e.multi[t.kind].push(t),e.multi.fallback.push(t)):e[t.kind][t.tag]=e.fallback[t.tag]=t}for(W(r,`collectType`),t=0,n=arguments.length;t<n;t+=1)arguments[t].forEach(r);return e}W(CG,`compileMap`);function wG(e){return this.extend(e)}W(wG,`Schema$1`),wG.prototype.extend=W(function(e){var t=[],n=[];if(e instanceof xG)n.push(e);else if(Array.isArray(e))n=n.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit));else throw new fG(`Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })`);t.forEach(function(e){if(!(e instanceof xG))throw new fG(`Specified list of YAML types (or a single Type object) contains a non-Type object.`);if(e.loadKind&&e.loadKind!==`scalar`)throw new fG(`There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.`);if(e.multi)throw new fG(`There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.`)}),n.forEach(function(e){if(!(e instanceof xG))throw new fG(`Specified list of YAML types (or a single Type object) contains a non-Type object.`)});var r=Object.create(wG.prototype);return r.implicit=(this.implicit||[]).concat(t),r.explicit=(this.explicit||[]).concat(n),r.compiledImplicit=SG(r,`implicit`),r.compiledExplicit=SG(r,`explicit`),r.compiledTypeMap=CG(r.compiledImplicit,r.compiledExplicit),r},`extend`);var TG=new wG({explicit:[new xG(`tag:yaml.org,2002:str`,{kind:`scalar`,construct:W(function(e){return e===null?``:e},`construct`)}),new xG(`tag:yaml.org,2002:seq`,{kind:`sequence`,construct:W(function(e){return e===null?[]:e},`construct`)}),new xG(`tag:yaml.org,2002:map`,{kind:`mapping`,construct:W(function(e){return e===null?{}:e},`construct`)})]});function EG(e){if(e===null)return!0;var t=e.length;return t===1&&e===`~`||t===4&&(e===`null`||e===`Null`||e===`NULL`)}W(EG,`resolveYamlNull`);function DG(){return null}W(DG,`constructYamlNull`);function OG(e){return e===null}W(OG,`isNull`);var kG=new xG(`tag:yaml.org,2002:null`,{kind:`scalar`,resolve:EG,construct:DG,predicate:OG,represent:{canonical:W(function(){return`~`},`canonical`),lowercase:W(function(){return`null`},`lowercase`),uppercase:W(function(){return`NULL`},`uppercase`),camelcase:W(function(){return`Null`},`camelcase`),empty:W(function(){return``},`empty`)},defaultStyle:`lowercase`});function AG(e){if(e===null)return!1;var t=e.length;return t===4&&(e===`true`||e===`True`||e===`TRUE`)||t===5&&(e===`false`||e===`False`||e===`FALSE`)}W(AG,`resolveYamlBoolean`);function jG(e){return e===`true`||e===`True`||e===`TRUE`}W(jG,`constructYamlBoolean`);function MG(e){return Object.prototype.toString.call(e)===`[object Boolean]`}W(MG,`isBoolean`);var NG=new xG(`tag:yaml.org,2002:bool`,{kind:`scalar`,resolve:AG,construct:jG,predicate:MG,represent:{lowercase:W(function(e){return e?`true`:`false`},`lowercase`),uppercase:W(function(e){return e?`TRUE`:`FALSE`},`uppercase`),camelcase:W(function(e){return e?`True`:`False`},`camelcase`)},defaultStyle:`lowercase`});function PG(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}W(PG,`isHexCode`);function FG(e){return 48<=e&&e<=55}W(FG,`isOctCode`);function IG(e){return 48<=e&&e<=57}W(IG,`isDecCode`);function LG(e){if(e===null)return!1;var t=e.length,n=0,r=!1,i;if(!t)return!1;if(i=e[n],(i===`-`||i===`+`)&&(i=e[++n]),i===`0`){if(n+1===t)return!0;if(i=e[++n],i===`b`){for(n++;n<t;n++)if(i=e[n],i!==`_`){if(i!==`0`&&i!==`1`)return!1;r=!0}return r&&i!==`_`}if(i===`x`){for(n++;n<t;n++)if(i=e[n],i!==`_`){if(!PG(e.charCodeAt(n)))return!1;r=!0}return r&&i!==`_`}if(i===`o`){for(n++;n<t;n++)if(i=e[n],i!==`_`){if(!FG(e.charCodeAt(n)))return!1;r=!0}return r&&i!==`_`}}if(i===`_`)return!1;for(;n<t;n++)if(i=e[n],i!==`_`){if(!IG(e.charCodeAt(n)))return!1;r=!0}return!(!r||i===`_`)}W(LG,`resolveYamlInteger`);function RG(e){var t=e,n=1,r;if(t.indexOf(`_`)!==-1&&(t=t.replace(/_/g,``)),r=t[0],(r===`-`||r===`+`)&&(r===`-`&&(n=-1),t=t.slice(1),r=t[0]),t===`0`)return 0;if(r===`0`){if(t[1]===`b`)return n*parseInt(t.slice(2),2);if(t[1]===`x`)return n*parseInt(t.slice(2),16);if(t[1]===`o`)return n*parseInt(t.slice(2),8)}return n*parseInt(t,10)}W(RG,`constructYamlInteger`);function zG(e){return Object.prototype.toString.call(e)===`[object Number]`&&e%1==0&&!lG.isNegativeZero(e)}W(zG,`isInteger`);var BG=new xG(`tag:yaml.org,2002:int`,{kind:`scalar`,resolve:LG,construct:RG,predicate:zG,represent:{binary:W(function(e){return e>=0?`0b`+e.toString(2):`-0b`+e.toString(2).slice(1)},`binary`),octal:W(function(e){return e>=0?`0o`+e.toString(8):`-0o`+e.toString(8).slice(1)},`octal`),decimal:W(function(e){return e.toString(10)},`decimal`),hexadecimal:W(function(e){return e>=0?`0x`+e.toString(16).toUpperCase():`-0x`+e.toString(16).toUpperCase().slice(1)},`hexadecimal`)},defaultStyle:`decimal`,styleAliases:{binary:[2,`bin`],octal:[8,`oct`],decimal:[10,`dec`],hexadecimal:[16,`hex`]}}),VG=RegExp(`^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$`);function HG(e){return!(e===null||!VG.test(e)||e[e.length-1]===`_`)}W(HG,`resolveYamlFloat`);function UG(e){var t=e.replace(/_/g,``).toLowerCase(),n=t[0]===`-`?-1:1;return`+-`.indexOf(t[0])>=0&&(t=t.slice(1)),t===`.inf`?n===1?1/0:-1/0:t===`.nan`?NaN:n*parseFloat(t,10)}W(UG,`constructYamlFloat`);var WG=/^[-+]?[0-9]+e/;function GG(e,t){var n;if(isNaN(e))switch(t){case`lowercase`:return`.nan`;case`uppercase`:return`.NAN`;case`camelcase`:return`.NaN`}else if(e===1/0)switch(t){case`lowercase`:return`.inf`;case`uppercase`:return`.INF`;case`camelcase`:return`.Inf`}else if(e===-1/0)switch(t){case`lowercase`:return`-.inf`;case`uppercase`:return`-.INF`;case`camelcase`:return`-.Inf`}else if(lG.isNegativeZero(e))return`-0.0`;return n=e.toString(10),WG.test(n)?n.replace(`e`,`.e`):n}W(GG,`representYamlFloat`);function KG(e){return Object.prototype.toString.call(e)===`[object Number]`&&(e%1!=0||lG.isNegativeZero(e))}W(KG,`isFloat`);var qG=new xG(`tag:yaml.org,2002:float`,{kind:`scalar`,resolve:HG,construct:UG,predicate:KG,represent:GG,defaultStyle:`lowercase`}),JG=TG.extend({implicit:[kG,NG,BG,qG]}),YG=JG,XG=RegExp(`^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$`),ZG=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 QG(e){return e===null?!1:XG.exec(e)!==null||ZG.exec(e)!==null}W(QG,`resolveYamlTimestamp`);function $G(e){var t,n,r,i,a,o,s,c=0,l=null,u,d,f;if(t=XG.exec(e),t===null&&(t=ZG.exec(e)),t===null)throw Error(`Date resolve error`);if(n=+t[1],r=t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(a=+t[4],o=+t[5],s=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+=`0`;c=+c}return t[9]&&(u=+t[10],d=+(t[11]||0),l=(u*60+d)*6e4,t[9]===`-`&&(l=-l)),f=new Date(Date.UTC(n,r,i,a,o,s,c)),l&&f.setTime(f.getTime()-l),f}W($G,`constructYamlTimestamp`);function eK(e){return e.toISOString()}W(eK,`representYamlTimestamp`);var tK=new xG(`tag:yaml.org,2002:timestamp`,{kind:`scalar`,resolve:QG,construct:$G,instanceOf:Date,represent:eK});function nK(e){return e===`<<`||e===null}W(nK,`resolveYamlMerge`);var rK=new xG(`tag:yaml.org,2002:merge`,{kind:`scalar`,resolve:nK}),iK=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
365
|
+
\r`;function aK(e){if(e===null)return!1;var t,n,r=0,i=e.length,a=iK;for(n=0;n<i;n++)if(t=a.indexOf(e.charAt(n)),!(t>64)){if(t<0)return!1;r+=6}return r%8==0}W(aK,`resolveYamlBinary`);function oK(e){var t,n,r=e.replace(/[\r\n=]/g,``),i=r.length,a=iK,o=0,s=[];for(t=0;t<i;t++)t%4==0&&t&&(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)),o=o<<6|a.indexOf(r.charAt(t));return n=i%4*6,n===0?(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)):n===18?(s.push(o>>10&255),s.push(o>>2&255)):n===12&&s.push(o>>4&255),new Uint8Array(s)}W(oK,`constructYamlBinary`);function sK(e){var t=``,n=0,r,i,a=e.length,o=iK;for(r=0;r<a;r++)r%3==0&&r&&(t+=o[n>>18&63],t+=o[n>>12&63],t+=o[n>>6&63],t+=o[n&63]),n=(n<<8)+e[r];return i=a%3,i===0?(t+=o[n>>18&63],t+=o[n>>12&63],t+=o[n>>6&63],t+=o[n&63]):i===2?(t+=o[n>>10&63],t+=o[n>>4&63],t+=o[n<<2&63],t+=o[64]):i===1&&(t+=o[n>>2&63],t+=o[n<<4&63],t+=o[64],t+=o[64]),t}W(sK,`representYamlBinary`);function cK(e){return Object.prototype.toString.call(e)===`[object Uint8Array]`}W(cK,`isBinary`);var lK=new xG(`tag:yaml.org,2002:binary`,{kind:`scalar`,resolve:aK,construct:oK,predicate:cK,represent:sK}),uK=Object.prototype.hasOwnProperty,dK=Object.prototype.toString;function fK(e){if(e===null)return!0;var t=[],n,r,i,a,o,s=e;for(n=0,r=s.length;n<r;n+=1){if(i=s[n],o=!1,dK.call(i)!==`[object Object]`)return!1;for(a in i)if(uK.call(i,a))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}W(fK,`resolveYamlOmap`);function pK(e){return e===null?[]:e}W(pK,`constructYamlOmap`);var mK=new xG(`tag:yaml.org,2002:omap`,{kind:`sequence`,resolve:fK,construct:pK}),hK=Object.prototype.toString;function gK(e){if(e===null)return!0;var t,n,r,i,a,o=e;for(a=Array(o.length),t=0,n=o.length;t<n;t+=1){if(r=o[t],hK.call(r)!==`[object Object]`||(i=Object.keys(r),i.length!==1))return!1;a[t]=[i[0],r[i[0]]]}return!0}W(gK,`resolveYamlPairs`);function _K(e){if(e===null)return[];var t,n,r,i,a,o=e;for(a=Array(o.length),t=0,n=o.length;t<n;t+=1)r=o[t],i=Object.keys(r),a[t]=[i[0],r[i[0]]];return a}W(_K,`constructYamlPairs`);var vK=new xG(`tag:yaml.org,2002:pairs`,{kind:`sequence`,resolve:gK,construct:_K}),yK=Object.prototype.hasOwnProperty;function bK(e){if(e===null)return!0;var t,n=e;for(t in n)if(yK.call(n,t)&&n[t]!==null)return!1;return!0}W(bK,`resolveYamlSet`);function xK(e){return e===null?{}:e}W(xK,`constructYamlSet`);var SK=new xG(`tag:yaml.org,2002:set`,{kind:`mapping`,resolve:bK,construct:xK}),CK=YG.extend({implicit:[tK,rK],explicit:[lK,mK,vK,SK]}),wK=Object.prototype.hasOwnProperty,TK=1,EK=2,DK=3,OK=4,kK=1,AK=2,jK=3,MK=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,NK=/[\x85\u2028\u2029]/,PK=/[,\[\]\{\}]/,FK=/^(?:!|!!|![a-z\-]+!)$/i,IK=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function LK(e){return Object.prototype.toString.call(e)}W(LK,`_class`);function RK(e){return e===10||e===13}W(RK,`is_EOL`);function zK(e){return e===9||e===32}W(zK,`is_WHITE_SPACE`);function BK(e){return e===9||e===32||e===10||e===13}W(BK,`is_WS_OR_EOL`);function VK(e){return e===44||e===91||e===93||e===123||e===125}W(VK,`is_FLOW_INDICATOR`);function HK(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}W(HK,`fromHexCode`);function UK(e){return e===120?2:e===117?4:e===85?8:0}W(UK,`escapedHexLen`);function WK(e){return 48<=e&&e<=57?e-48:-1}W(WK,`fromDecimalCode`);function GK(e){return e===48?`\0`:e===97?`\x07`:e===98?`\b`:e===116||e===9?` `:e===110?`
|
|
366
|
+
`:e===118?`\v`:e===102?`\f`:e===114?`\r`:e===101?`\x1B`:e===32?` `:e===34?`"`:e===47?`/`:e===92?`\\`:e===78?`
`:e===95?`\xA0`:e===76?`\u2028`:e===80?`\u2029`:``}W(GK,`simpleEscapeSequence`);function KK(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}W(KK,`charFromCodepoint`);function qK(e,t,n){t===`__proto__`?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:n}):e[t]=n}W(qK,`setProperty`);var JK=Array(256),YK=Array(256);for(XK=0;XK<256;XK++)JK[XK]=+!!GK(XK),YK[XK]=GK(XK);var XK;function ZK(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||CK,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}W(ZK,`State$1`);function QK(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=gG(n),new fG(t,n)}W(QK,`generateError`);function $K(e,t){throw QK(e,t)}W($K,`throwError`);function eq(e,t){e.onWarning&&e.onWarning.call(null,QK(e,t))}W(eq,`throwWarning`);var tq={YAML:W(function(e,t,n){var r,i,a;e.version!==null&&$K(e,`duplication of %YAML directive`),n.length!==1&&$K(e,`YAML directive accepts exactly one argument`),r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),r===null&&$K(e,`ill-formed argument of the YAML directive`),i=parseInt(r[1],10),a=parseInt(r[2],10),i!==1&&$K(e,`unacceptable YAML version of the document`),e.version=n[0],e.checkLineBreaks=a<2,a!==1&&a!==2&&eq(e,`unsupported YAML version of the document`)},`handleYamlDirective`),TAG:W(function(e,t,n){var r,i;n.length!==2&&$K(e,`TAG directive accepts exactly two arguments`),r=n[0],i=n[1],FK.test(r)||$K(e,`ill-formed tag handle (first argument) of the TAG directive`),wK.call(e.tagMap,r)&&$K(e,`there is a previously declared suffix for "`+r+`" tag handle`),IK.test(i)||$K(e,`ill-formed tag prefix (second argument) of the TAG directive`);try{i=decodeURIComponent(i)}catch{$K(e,`tag prefix is malformed: `+i)}e.tagMap[r]=i},`handleTagDirective`)};function nq(e,t,n,r){var i,a,o,s;if(t<n){if(s=e.input.slice(t,n),r)for(i=0,a=s.length;i<a;i+=1)o=s.charCodeAt(i),o===9||32<=o&&o<=1114111||$K(e,`expected valid JSON character`);else MK.test(s)&&$K(e,`the stream contains non-printable characters`);e.result+=s}}W(nq,`captureSegment`);function rq(e,t,n,r){var i,a,o,s;for(lG.isObject(n)||$K(e,`cannot merge mappings; the provided source object is unacceptable`),i=Object.keys(n),o=0,s=i.length;o<s;o+=1)a=i[o],wK.call(t,a)||(qK(t,a,n[a]),r[a]=!0)}W(rq,`mergeMappings`);function iq(e,t,n,r,i,a,o,s,c){var l,u;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),l=0,u=i.length;l<u;l+=1)Array.isArray(i[l])&&$K(e,`nested arrays are not supported inside keys`),typeof i==`object`&&LK(i[l])===`[object Object]`&&(i[l]=`[object Object]`);if(typeof i==`object`&&LK(i)===`[object Object]`&&(i=`[object Object]`),i=String(i),t===null&&(t={}),r===`tag:yaml.org,2002:merge`)if(Array.isArray(a))for(l=0,u=a.length;l<u;l+=1)rq(e,t,a[l],n);else rq(e,t,a,n);else !e.json&&!wK.call(n,i)&&wK.call(t,i)&&(e.line=o||e.line,e.lineStart=s||e.lineStart,e.position=c||e.position,$K(e,`duplicated mapping key`)),qK(t,i,a),delete n[i];return t}W(iq,`storeMappingPair`);function aq(e){var t=e.input.charCodeAt(e.position);t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):$K(e,`a line break is expected`),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}W(aq,`readLineBreak`);function oq(e,t,n){for(var r=0,i=e.input.charCodeAt(e.position);i!==0;){for(;zK(i);)i===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&i===35)do i=e.input.charCodeAt(++e.position);while(i!==10&&i!==13&&i!==0);if(RK(i))for(aq(e),i=e.input.charCodeAt(e.position),r++,e.lineIndent=0;i===32;)e.lineIndent++,i=e.input.charCodeAt(++e.position);else break}return n!==-1&&r!==0&&e.lineIndent<n&&eq(e,`deficient indentation`),r}W(oq,`skipSeparationSpace`);function sq(e){var t=e.position,n=e.input.charCodeAt(t);return!!((n===45||n===46)&&n===e.input.charCodeAt(t+1)&&n===e.input.charCodeAt(t+2)&&(t+=3,n=e.input.charCodeAt(t),n===0||BK(n)))}W(sq,`testDocumentSeparator`);function cq(e,t){t===1?e.result+=` `:t>1&&(e.result+=lG.repeat(`
|
|
367
|
+
`,t-1))}W(cq,`writeFoldedLines`);function lq(e,t,n){var r,i,a,o,s,c,l,u,d=e.kind,f=e.result,p=e.input.charCodeAt(e.position);if(BK(p)||VK(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(i=e.input.charCodeAt(e.position+1),BK(i)||n&&VK(i)))return!1;for(e.kind=`scalar`,e.result=``,a=o=e.position,s=!1;p!==0;){if(p===58){if(i=e.input.charCodeAt(e.position+1),BK(i)||n&&VK(i))break}else if(p===35){if(r=e.input.charCodeAt(e.position-1),BK(r))break}else if(e.position===e.lineStart&&sq(e)||n&&VK(p))break;else if(RK(p))if(c=e.line,l=e.lineStart,u=e.lineIndent,oq(e,!1,-1),e.lineIndent>=t){s=!0,p=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=c,e.lineStart=l,e.lineIndent=u;break}s&&=(nq(e,a,o,!1),cq(e,e.line-c),a=o=e.position,!1),zK(p)||(o=e.position+1),p=e.input.charCodeAt(++e.position)}return nq(e,a,o,!1),e.result?!0:(e.kind=d,e.result=f,!1)}W(lq,`readPlainScalar`);function uq(e,t){var n=e.input.charCodeAt(e.position),r,i;if(n!==39)return!1;for(e.kind=`scalar`,e.result=``,e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;)if(n===39)if(nq(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),n===39)r=e.position,e.position++,i=e.position;else return!0;else RK(n)?(nq(e,r,i,!0),cq(e,oq(e,!1,t)),r=i=e.position):e.position===e.lineStart&&sq(e)?$K(e,`unexpected end of the document within a single quoted scalar`):(e.position++,i=e.position);$K(e,`unexpected end of the stream within a single quoted scalar`)}W(uq,`readSingleQuotedScalar`);function dq(e,t){var n,r,i,a,o,s=e.input.charCodeAt(e.position);if(s!==34)return!1;for(e.kind=`scalar`,e.result=``,e.position++,n=r=e.position;(s=e.input.charCodeAt(e.position))!==0;)if(s===34)return nq(e,n,e.position,!0),e.position++,!0;else if(s===92){if(nq(e,n,e.position,!0),s=e.input.charCodeAt(++e.position),RK(s))oq(e,!1,t);else if(s<256&&JK[s])e.result+=YK[s],e.position++;else if((o=UK(s))>0){for(i=o,a=0;i>0;i--)s=e.input.charCodeAt(++e.position),(o=HK(s))>=0?a=(a<<4)+o:$K(e,`expected hexadecimal character`);e.result+=KK(a),e.position++}else $K(e,`unknown escape sequence`);n=r=e.position}else RK(s)?(nq(e,n,r,!0),cq(e,oq(e,!1,t)),n=r=e.position):e.position===e.lineStart&&sq(e)?$K(e,`unexpected end of the document within a double quoted scalar`):(e.position++,r=e.position);$K(e,`unexpected end of the stream within a double quoted scalar`)}W(dq,`readDoubleQuotedScalar`);function fq(e,t){var n=!0,r,i,a,o=e.tag,s,c=e.anchor,l,u,d,f,p,m=Object.create(null),h,g,_,v=e.input.charCodeAt(e.position);if(v===91)u=93,p=!1,s=[];else if(v===123)u=125,p=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),v=e.input.charCodeAt(++e.position);v!==0;){if(oq(e,!0,t),v=e.input.charCodeAt(e.position),v===u)return e.position++,e.tag=o,e.anchor=c,e.kind=p?`mapping`:`sequence`,e.result=s,!0;n?v===44&&$K(e,`expected the node content, but found ','`):$K(e,`missed comma between flow collection entries`),g=h=_=null,d=f=!1,v===63&&(l=e.input.charCodeAt(e.position+1),BK(l)&&(d=f=!0,e.position++,oq(e,!0,t))),r=e.line,i=e.lineStart,a=e.position,yq(e,t,TK,!1,!0),g=e.tag,h=e.result,oq(e,!0,t),v=e.input.charCodeAt(e.position),(f||e.line===r)&&v===58&&(d=!0,v=e.input.charCodeAt(++e.position),oq(e,!0,t),yq(e,t,TK,!1,!0),_=e.result),p?iq(e,s,m,g,h,_,r,i,a):d?s.push(iq(e,null,m,g,h,_,r,i,a)):s.push(h),oq(e,!0,t),v=e.input.charCodeAt(e.position),v===44?(n=!0,v=e.input.charCodeAt(++e.position)):n=!1}$K(e,`unexpected end of the stream within a flow collection`)}W(fq,`readFlowCollection`);function pq(e,t){var n,r,i=kK,a=!1,o=!1,s=t,c=0,l=!1,u,d=e.input.charCodeAt(e.position);if(d===124)r=!1;else if(d===62)r=!0;else return!1;for(e.kind=`scalar`,e.result=``;d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)kK===i?i=d===43?jK:AK:$K(e,`repeat of a chomping mode identifier`);else if((u=WK(d))>=0)u===0?$K(e,`bad explicit indentation width of a block scalar; it cannot be less than one`):o?$K(e,`repeat of an indentation width identifier`):(s=t+u-1,o=!0);else break;if(zK(d)){do d=e.input.charCodeAt(++e.position);while(zK(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!RK(d)&&d!==0)}for(;d!==0;){for(aq(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!o||e.lineIndent<s)&&d===32;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>s&&(s=e.lineIndent),RK(d)){c++;continue}if(e.lineIndent<s){i===jK?e.result+=lG.repeat(`
|
|
368
|
+
`,a?1+c:c):i===kK&&a&&(e.result+=`
|
|
369
|
+
`);break}for(r?zK(d)?(l=!0,e.result+=lG.repeat(`
|
|
370
|
+
`,a?1+c:c)):l?(l=!1,e.result+=lG.repeat(`
|
|
371
|
+
`,c+1)):c===0?a&&(e.result+=` `):e.result+=lG.repeat(`
|
|
372
|
+
`,c):e.result+=lG.repeat(`
|
|
373
|
+
`,a?1+c:c),a=!0,o=!0,c=0,n=e.position;!RK(d)&&d!==0;)d=e.input.charCodeAt(++e.position);nq(e,n,e.position,!1)}return!0}W(pq,`readBlockScalar`);function mq(e,t){var n,r=e.tag,i=e.anchor,a=[],o,s=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,$K(e,`tab characters must not be used in indentation`)),!(c!==45||(o=e.input.charCodeAt(e.position+1),!BK(o))));){if(s=!0,e.position++,oq(e,!0,-1)&&e.lineIndent<=t){a.push(null),c=e.input.charCodeAt(e.position);continue}if(n=e.line,yq(e,t,DK,!1,!0),a.push(e.result),oq(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&c!==0)$K(e,`bad indentation of a sequence entry`);else if(e.lineIndent<t)break}return s?(e.tag=r,e.anchor=i,e.kind=`sequence`,e.result=a,!0):!1}W(mq,`readBlockSequence`);function hq(e,t,n){var r,i,a,o,s,c,l=e.tag,u=e.anchor,d={},f=Object.create(null),p=null,m=null,h=null,g=!1,_=!1,v;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),v=e.input.charCodeAt(e.position);v!==0;){if(!g&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,$K(e,`tab characters must not be used in indentation`)),r=e.input.charCodeAt(e.position+1),a=e.line,(v===63||v===58)&&BK(r))v===63?(g&&(iq(e,d,f,p,m,null,o,s,c),p=m=h=null),_=!0,g=!0,i=!0):g?(g=!1,i=!0):$K(e,`incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line`),e.position+=1,v=r;else{if(o=e.line,s=e.lineStart,c=e.position,!yq(e,n,EK,!1,!0))break;if(e.line===a){for(v=e.input.charCodeAt(e.position);zK(v);)v=e.input.charCodeAt(++e.position);if(v===58)v=e.input.charCodeAt(++e.position),BK(v)||$K(e,`a whitespace character is expected after the key-value separator within a block mapping`),g&&(iq(e,d,f,p,m,null,o,s,c),p=m=h=null),_=!0,g=!1,i=!1,p=e.tag,m=e.result;else if(_)$K(e,`can not read an implicit mapping pair; a colon is missed`);else return e.tag=l,e.anchor=u,!0}else if(_)$K(e,`can not read a block mapping entry; a multiline key may not be an implicit key`);else return e.tag=l,e.anchor=u,!0}if((e.line===a||e.lineIndent>t)&&(g&&(o=e.line,s=e.lineStart,c=e.position),yq(e,t,OK,!0,i)&&(g?m=e.result:h=e.result),g||(iq(e,d,f,p,m,h,o,s,c),p=m=h=null),oq(e,!0,-1),v=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&v!==0)$K(e,`bad indentation of a mapping entry`);else if(e.lineIndent<t)break}return g&&iq(e,d,f,p,m,null,o,s,c),_&&(e.tag=l,e.anchor=u,e.kind=`mapping`,e.result=d),_}W(hq,`readBlockMapping`);function gq(e){var t,n=!1,r=!1,i,a,o=e.input.charCodeAt(e.position);if(o!==33)return!1;if(e.tag!==null&&$K(e,`duplication of a tag property`),o=e.input.charCodeAt(++e.position),o===60?(n=!0,o=e.input.charCodeAt(++e.position)):o===33?(r=!0,i=`!!`,o=e.input.charCodeAt(++e.position)):i=`!`,t=e.position,n){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(a=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):$K(e,`unexpected end of the stream within a verbatim tag`)}else{for(;o!==0&&!BK(o);)o===33&&(r?$K(e,`tag suffix cannot contain exclamation marks`):(i=e.input.slice(t-1,e.position+1),FK.test(i)||$K(e,`named tag handle cannot contain such characters`),r=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),PK.test(a)&&$K(e,`tag suffix cannot contain flow indicator characters`)}a&&!IK.test(a)&&$K(e,`tag name cannot contain such characters: `+a);try{a=decodeURIComponent(a)}catch{$K(e,`tag name is malformed: `+a)}return n?e.tag=a:wK.call(e.tagMap,i)?e.tag=e.tagMap[i]+a:i===`!`?e.tag=`!`+a:i===`!!`?e.tag=`tag:yaml.org,2002:`+a:$K(e,`undeclared tag handle "`+i+`"`),!0}W(gq,`readTagProperty`);function _q(e){var t,n=e.input.charCodeAt(e.position);if(n!==38)return!1;for(e.anchor!==null&&$K(e,`duplication of an anchor property`),n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!BK(n)&&!VK(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&$K(e,`name of an anchor node must contain at least one character`),e.anchor=e.input.slice(t,e.position),!0}W(_q,`readAnchorProperty`);function vq(e){var t,n,r=e.input.charCodeAt(e.position);if(r!==42)return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!BK(r)&&!VK(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&$K(e,`name of an alias node must contain at least one character`),n=e.input.slice(t,e.position),wK.call(e.anchorMap,n)||$K(e,`unidentified alias "`+n+`"`),e.result=e.anchorMap[n],oq(e,!0,-1),!0}W(vq,`readAlias`);function yq(e,t,n,r,i){var a,o,s,c=1,l=!1,u=!1,d,f,p,m,h,g;if(e.listener!==null&&e.listener(`open`,e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=o=s=OK===n||DK===n,r&&oq(e,!0,-1)&&(l=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;gq(e)||_q(e);)oq(e,!0,-1)?(l=!0,s=a,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):s=!1;if(s&&=l||i,(c===1||OK===n)&&(h=TK===n||EK===n?t:t+1,g=e.position-e.lineStart,c===1?s&&(mq(e,g)||hq(e,g,h))||fq(e,h)?u=!0:(o&&pq(e,h)||uq(e,h)||dq(e,h)?u=!0:vq(e)?(u=!0,(e.tag!==null||e.anchor!==null)&&$K(e,`alias node should not have any properties`)):lq(e,h,TK===n)&&(u=!0,e.tag===null&&(e.tag=`?`)),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(u=s&&mq(e,g))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag===`?`){for(e.result!==null&&e.kind!==`scalar`&&$K(e,`unacceptable node kind for !<?> tag; it should be "scalar", not "`+e.kind+`"`),d=0,f=e.implicitTypes.length;d<f;d+=1)if(m=e.implicitTypes[d],m.resolve(e.result)){e.result=m.construct(e.result),e.tag=m.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!==`!`){if(wK.call(e.typeMap[e.kind||`fallback`],e.tag))m=e.typeMap[e.kind||`fallback`][e.tag];else for(m=null,p=e.typeMap.multi[e.kind||`fallback`],d=0,f=p.length;d<f;d+=1)if(e.tag.slice(0,p[d].tag.length)===p[d].tag){m=p[d];break}m||$K(e,`unknown tag !<`+e.tag+`>`),e.result!==null&&m.kind!==e.kind&&$K(e,`unacceptable node kind for !<`+e.tag+`> tag; it should be "`+m.kind+`", not "`+e.kind+`"`),m.resolve(e.result,e.tag)?(e.result=m.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):$K(e,`cannot resolve a node with !<`+e.tag+`> explicit tag`)}return e.listener!==null&&e.listener(`close`,e),e.tag!==null||e.anchor!==null||u}W(yq,`composeNode`);function bq(e){var t=e.position,n,r,i,a=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(oq(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(a=!0,o=e.input.charCodeAt(++e.position),n=e.position;o!==0&&!BK(o);)o=e.input.charCodeAt(++e.position);for(r=e.input.slice(n,e.position),i=[],r.length<1&&$K(e,`directive name must not be less than one character in length`);o!==0;){for(;zK(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!RK(o));break}if(RK(o))break;for(n=e.position;o!==0&&!BK(o);)o=e.input.charCodeAt(++e.position);i.push(e.input.slice(n,e.position))}o!==0&&aq(e),wK.call(tq,r)?tq[r](e,r,i):eq(e,`unknown document directive "`+r+`"`)}if(oq(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,oq(e,!0,-1)):a&&$K(e,`directives end mark is expected`),yq(e,e.lineIndent-1,OK,!1,!0),oq(e,!0,-1),e.checkLineBreaks&&NK.test(e.input.slice(t,e.position))&&eq(e,`non-ASCII line breaks are interpreted as content`),e.documents.push(e.result),e.position===e.lineStart&&sq(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,oq(e,!0,-1));return}if(e.position<e.length-1)$K(e,`end of the stream or a document separator is expected`);else return}W(bq,`readDocument`);function xq(e,t){e=String(e),t||={},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
374
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var n=new ZK(e,t),r=e.indexOf(`\0`);for(r!==-1&&(n.position=r,$K(n,`null byte is not allowed in input`)),n.input+=`\0`;n.input.charCodeAt(n.position)===32;)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)bq(n);return n.documents}W(xq,`loadDocuments`);function Sq(e,t,n){typeof t==`object`&&t&&n===void 0&&(n=t,t=null);var r=xq(e,n);if(typeof t!=`function`)return r;for(var i=0,a=r.length;i<a;i+=1)t(r[i])}W(Sq,`loadAll$1`);function Cq(e,t){var n=xq(e,t);if(n.length!==0){if(n.length===1)return n[0];throw new fG(`expected a single document in the stream, but found more`)}}W(Cq,`load$1`);var wq={loadAll:Sq,load:Cq},Tq=Object.prototype.toString,Eq=Object.prototype.hasOwnProperty,Dq=65279,Oq=9,kq=10,Aq=13,jq=32,Mq=33,Nq=34,Pq=35,Fq=37,Iq=38,Lq=39,Rq=42,zq=44,Bq=45,Vq=58,Hq=61,Uq=62,Wq=63,Gq=64,Kq=91,qq=93,Jq=96,Yq=123,Xq=124,Zq=125,Qq={};Qq[0]=`\\0`,Qq[7]=`\\a`,Qq[8]=`\\b`,Qq[9]=`\\t`,Qq[10]=`\\n`,Qq[11]=`\\v`,Qq[12]=`\\f`,Qq[13]=`\\r`,Qq[27]=`\\e`,Qq[34]=`\\"`,Qq[92]=`\\\\`,Qq[133]=`\\N`,Qq[160]=`\\_`,Qq[8232]=`\\L`,Qq[8233]=`\\P`;var $q=[`y`,`Y`,`yes`,`Yes`,`YES`,`on`,`On`,`ON`,`n`,`N`,`no`,`No`,`NO`,`off`,`Off`,`OFF`],eJ=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function tJ(e,t){var n,r,i,a,o,s,c;if(t===null)return{};for(n={},r=Object.keys(t),i=0,a=r.length;i<a;i+=1)o=r[i],s=String(t[o]),o.slice(0,2)===`!!`&&(o=`tag:yaml.org,2002:`+o.slice(2)),c=e.compiledTypeMap.fallback[o],c&&Eq.call(c.styleAliases,s)&&(s=c.styleAliases[s]),n[o]=s;return n}W(tJ,`compileStyleMap`);function nJ(e){var t=e.toString(16).toUpperCase(),n,r;if(e<=255)n=`x`,r=2;else if(e<=65535)n=`u`,r=4;else if(e<=4294967295)n=`U`,r=8;else throw new fG(`code point within a string may not be greater than 0xFFFFFFFF`);return`\\`+n+lG.repeat(`0`,r-t.length)+t}W(nJ,`encodeHex`);var rJ=1,iJ=2;function aJ(e){this.schema=e.schema||CK,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=lG.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=tJ(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType===`"`?iJ:rJ,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer==`function`?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result=``,this.duplicates=[],this.usedDuplicates=null}W(aJ,`State`);function oJ(e,t){for(var n=lG.repeat(` `,t),r=0,i=-1,a=``,o,s=e.length;r<s;)i=e.indexOf(`
|
|
375
|
+
`,r),i===-1?(o=e.slice(r),r=s):(o=e.slice(r,i+1),r=i+1),o.length&&o!==`
|
|
376
|
+
`&&(a+=n),a+=o;return a}W(oJ,`indentString`);function sJ(e,t){return`
|
|
377
|
+
`+lG.repeat(` `,e.indent*t)}W(sJ,`generateNextLine`);function cJ(e,t){var n,r,i;for(n=0,r=e.implicitTypes.length;n<r;n+=1)if(i=e.implicitTypes[n],i.resolve(t))return!0;return!1}W(cJ,`testImplicitResolving`);function lJ(e){return e===jq||e===Oq}W(lJ,`isWhitespace`);function uJ(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Dq||65536<=e&&e<=1114111}W(uJ,`isPrintable`);function dJ(e){return uJ(e)&&e!==Dq&&e!==Aq&&e!==kq}W(dJ,`isNsCharOrWhitespace`);function fJ(e,t,n){var r=dJ(e),i=r&&!lJ(e);return(n?r:r&&e!==zq&&e!==Kq&&e!==qq&&e!==Yq&&e!==Zq)&&e!==Pq&&!(t===Vq&&!i)||dJ(t)&&!lJ(t)&&e===Pq||t===Vq&&i}W(fJ,`isPlainSafe`);function pJ(e){return uJ(e)&&e!==Dq&&!lJ(e)&&e!==Bq&&e!==Wq&&e!==Vq&&e!==zq&&e!==Kq&&e!==qq&&e!==Yq&&e!==Zq&&e!==Pq&&e!==Iq&&e!==Rq&&e!==Mq&&e!==Xq&&e!==Hq&&e!==Uq&&e!==Lq&&e!==Nq&&e!==Fq&&e!==Gq&&e!==Jq}W(pJ,`isPlainSafeFirst`);function mJ(e){return!lJ(e)&&e!==Vq}W(mJ,`isPlainSafeLast`);function hJ(e,t){var n=e.charCodeAt(t),r;return n>=55296&&n<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1),r>=56320&&r<=57343)?(n-55296)*1024+r-56320+65536:n}W(hJ,`codePointAt`);function gJ(e){return/^\n* /.test(e)}W(gJ,`needIndentIndicator`);var _J=1,vJ=2,yJ=3,bJ=4,xJ=5;function SJ(e,t,n,r,i,a,o,s){var c,l=0,u=null,d=!1,f=!1,p=r!==-1,m=-1,h=pJ(hJ(e,0))&&mJ(hJ(e,e.length-1));if(t||o)for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=hJ(e,c),!uJ(l))return xJ;h&&=fJ(l,u,s),u=l}else{for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=hJ(e,c),l===kq)d=!0,p&&(f||=c-m-1>r&&e[m+1]!==` `,m=c);else if(!uJ(l))return xJ;h&&=fJ(l,u,s),u=l}f||=p&&c-m-1>r&&e[m+1]!==` `}return!d&&!f?h&&!o&&!i(e)?_J:a===iJ?xJ:vJ:n>9&&gJ(e)?xJ:o?a===iJ?xJ:vJ:f?bJ:yJ}W(SJ,`chooseScalarStyle`);function CJ(e,t,n,r,i){e.dump=(function(){if(t.length===0)return e.quotingType===iJ?`""`:`''`;if(!e.noCompatMode&&($q.indexOf(t)!==-1||eJ.test(t)))return e.quotingType===iJ?`"`+t+`"`:`'`+t+`'`;var a=e.indent*Math.max(1,n),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),s=r||e.flowLevel>-1&&n>=e.flowLevel;function c(t){return cJ(e,t)}switch(W(c,`testAmbiguity`),SJ(t,s,e.indent,o,c,e.quotingType,e.forceQuotes&&!r,i)){case _J:return t;case vJ:return`'`+t.replace(/'/g,`''`)+`'`;case yJ:return`|`+wJ(t,e.indent)+TJ(oJ(t,a));case bJ:return`>`+wJ(t,e.indent)+TJ(oJ(EJ(t,o),a));case xJ:return`"`+OJ(t)+`"`;default:throw new fG(`impossible error: invalid scalar style`)}})()}W(CJ,`writeScalar`);function wJ(e,t){var n=gJ(e)?String(t):``,r=e[e.length-1]===`
|
|
378
|
+
`;return n+(r&&(e[e.length-2]===`
|
|
379
|
+
`||e===`
|
|
380
|
+
`)?`+`:r?``:`-`)+`
|
|
381
|
+
`}W(wJ,`blockHeader`);function TJ(e){return e[e.length-1]===`
|
|
382
|
+
`?e.slice(0,-1):e}W(TJ,`dropEndingNewline`);function EJ(e,t){for(var n=/(\n+)([^\n]*)/g,r=(function(){var r=e.indexOf(`
|
|
383
|
+
`);return r=r===-1?e.length:r,n.lastIndex=r,DJ(e.slice(0,r),t)})(),i=e[0]===`
|
|
384
|
+
`||e[0]===` `,a,o;o=n.exec(e);){var s=o[1],c=o[2];a=c[0]===` `,r+=s+(!i&&!a&&c!==``?`
|
|
385
|
+
`:``)+DJ(c,t),i=a}return r}W(EJ,`foldString`);function DJ(e,t){if(e===``||e[0]===` `)return e;for(var n=/ [^ ]/g,r,i=0,a,o=0,s=0,c=``;r=n.exec(e);)s=r.index,s-i>t&&(a=o>i?o:s,c+=`
|
|
386
|
+
`+e.slice(i,a),i=a+1),o=s;return c+=`
|
|
387
|
+
`,e.length-i>t&&o>i?c+=e.slice(i,o)+`
|
|
388
|
+
`+e.slice(o+1):c+=e.slice(i),c.slice(1)}W(DJ,`foldLine`);function OJ(e){for(var t=``,n=0,r,i=0;i<e.length;n>=65536?i+=2:i++)n=hJ(e,i),r=Qq[n],!r&&uJ(n)?(t+=e[i],n>=65536&&(t+=e[i+1])):t+=r||nJ(n);return t}W(OJ,`escapeString`);function kJ(e,t,n){var r=``,i=e.tag,a,o,s;for(a=0,o=n.length;a<o;a+=1)s=n[a],e.replacer&&(s=e.replacer.call(n,String(a),s)),(PJ(e,t,s,!1,!1)||s===void 0&&PJ(e,t,null,!1,!1))&&(r!==``&&(r+=`,`+(e.condenseFlow?``:` `)),r+=e.dump);e.tag=i,e.dump=`[`+r+`]`}W(kJ,`writeFlowSequence`);function AJ(e,t,n,r){var i=``,a=e.tag,o,s,c;for(o=0,s=n.length;o<s;o+=1)c=n[o],e.replacer&&(c=e.replacer.call(n,String(o),c)),(PJ(e,t+1,c,!0,!0,!1,!0)||c===void 0&&PJ(e,t+1,null,!0,!0,!1,!0))&&((!r||i!==``)&&(i+=sJ(e,t)),e.dump&&kq===e.dump.charCodeAt(0)?i+=`-`:i+=`- `,i+=e.dump);e.tag=a,e.dump=i||`[]`}W(AJ,`writeBlockSequence`);function jJ(e,t,n){var r=``,i=e.tag,a=Object.keys(n),o,s,c,l,u;for(o=0,s=a.length;o<s;o+=1)u=``,r!==``&&(u+=`, `),e.condenseFlow&&(u+=`"`),c=a[o],l=n[c],e.replacer&&(l=e.replacer.call(n,c,l)),PJ(e,t,c,!1,!1)&&(e.dump.length>1024&&(u+=`? `),u+=e.dump+(e.condenseFlow?`"`:``)+`:`+(e.condenseFlow?``:` `),PJ(e,t,l,!1,!1)&&(u+=e.dump,r+=u));e.tag=i,e.dump=`{`+r+`}`}W(jJ,`writeFlowMapping`);function MJ(e,t,n,r){var i=``,a=e.tag,o=Object.keys(n),s,c,l,u,d,f;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys==`function`)o.sort(e.sortKeys);else if(e.sortKeys)throw new fG(`sortKeys must be a boolean or a function`);for(s=0,c=o.length;s<c;s+=1)f=``,(!r||i!==``)&&(f+=sJ(e,t)),l=o[s],u=n[l],e.replacer&&(u=e.replacer.call(n,l,u)),PJ(e,t+1,l,!0,!0,!0)&&(d=e.tag!==null&&e.tag!==`?`||e.dump&&e.dump.length>1024,d&&(e.dump&&kq===e.dump.charCodeAt(0)?f+=`?`:f+=`? `),f+=e.dump,d&&(f+=sJ(e,t)),PJ(e,t+1,u,!0,d)&&(e.dump&&kq===e.dump.charCodeAt(0)?f+=`:`:f+=`: `,f+=e.dump,i+=f));e.tag=a,e.dump=i||`{}`}W(MJ,`writeBlockMapping`);function NJ(e,t,n){var r,i=n?e.explicitTypes:e.implicitTypes,a,o,s,c;for(a=0,o=i.length;a<o;a+=1)if(s=i[a],(s.instanceOf||s.predicate)&&(!s.instanceOf||typeof t==`object`&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(n?s.multi&&s.representName?e.tag=s.representName(t):e.tag=s.tag:e.tag=`?`,s.represent){if(c=e.styleMap[s.tag]||s.defaultStyle,Tq.call(s.represent)===`[object Function]`)r=s.represent(t,c);else if(Eq.call(s.represent,c))r=s.represent[c](t,c);else throw new fG(`!<`+s.tag+`> tag resolver accepts not "`+c+`" style`);e.dump=r}return!0}return!1}W(NJ,`detectType`);function PJ(e,t,n,r,i,a,o){e.tag=null,e.dump=n,NJ(e,n,!1)||NJ(e,n,!0);var s=Tq.call(e.dump),c=r,l;r&&=e.flowLevel<0||e.flowLevel>t;var u=s===`[object Object]`||s===`[object Array]`,d,f;if(u&&(d=e.duplicates.indexOf(n),f=d!==-1),(e.tag!==null&&e.tag!==`?`||f||e.indent!==2&&t>0)&&(i=!1),f&&e.usedDuplicates[d])e.dump=`*ref_`+d;else{if(u&&f&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),s===`[object Object]`)r&&Object.keys(e.dump).length!==0?(MJ(e,t,e.dump,i),f&&(e.dump=`&ref_`+d+e.dump)):(jJ(e,t,e.dump),f&&(e.dump=`&ref_`+d+` `+e.dump));else if(s===`[object Array]`)r&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?AJ(e,t-1,e.dump,i):AJ(e,t,e.dump,i),f&&(e.dump=`&ref_`+d+e.dump)):(kJ(e,t,e.dump),f&&(e.dump=`&ref_`+d+` `+e.dump));else if(s===`[object String]`)e.tag!==`?`&&CJ(e,e.dump,t,a,c);else if(s===`[object Undefined]`)return!1;else{if(e.skipInvalid)return!1;throw new fG(`unacceptable kind of an object to dump `+s)}e.tag!==null&&e.tag!==`?`&&(l=encodeURI(e.tag[0]===`!`?e.tag.slice(1):e.tag).replace(/!/g,`%21`),l=e.tag[0]===`!`?`!`+l:l.slice(0,18)===`tag:yaml.org,2002:`?`!!`+l.slice(18):`!<`+l+`>`,e.dump=l+` `+e.dump)}return!0}W(PJ,`writeNode`);function FJ(e,t){var n=[],r=[],i,a;for(IJ(e,n,r),i=0,a=r.length;i<a;i+=1)t.duplicates.push(n[r[i]]);t.usedDuplicates=Array(a)}W(FJ,`getDuplicateReferences`);function IJ(e,t,n){var r,i,a;if(typeof e==`object`&&e)if(i=t.indexOf(e),i!==-1)n.indexOf(i)===-1&&n.push(i);else if(t.push(e),Array.isArray(e))for(i=0,a=e.length;i<a;i+=1)IJ(e[i],t,n);else for(r=Object.keys(e),i=0,a=r.length;i<a;i+=1)IJ(e[r[i]],t,n)}W(IJ,`inspectNode`);function LJ(e,t){t||={};var n=new aJ(t);n.noRefs||FJ(e,n);var r=e;return n.replacer&&(r=n.replacer.call({"":r},``,r)),PJ(n,0,r,!0,!0)?n.dump+`
|
|
389
|
+
`:``}W(LJ,`dump$1`);var RJ={dump:LJ};function zJ(e,t){return function(){throw Error(`Function yaml.`+e+` is removed in js-yaml 4. Use yaml.`+t+` instead, which is now safe by default.`)}}W(zJ,`renamed`);var BJ=JG,VJ=wq.load;wq.loadAll,RJ.dump;var HJ=W((e,t)=>{if(t)return`translate(`+-e.width/2+`, `+-e.height/2+`)`;let n=e.x??0,r=e.y??0;return`translate(`+-(n+e.width/2)+`, `+-(r+e.height/2)+`)`},`computeLabelTransform`),UJ={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},WJ={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function GJ(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=KJ(e),t=KJ(t);let[n,r]=[e.x,e.y],[i,a]=[t.x,t.y],o=i-n,s=a-r;return{angle:Math.atan(s/o),deltaX:o,deltaY:s}}W(GJ,`calculateDeltaAndAngle`);var KJ=W(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,`pointTransformer`),qJ=W(e=>({x:W(function(t,n,r){let i=0,a=KJ(r[0]).x<KJ(r[r.length-1]).x?`left`:`right`;if(n===0&&Object.hasOwn(UJ,e.arrowTypeStart)){let{angle:t,deltaX:n}=GJ(r[0],r[1]);i=UJ[e.arrowTypeStart]*Math.cos(t)*(n>=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(UJ,e.arrowTypeEnd)){let{angle:t,deltaX:n}=GJ(r[r.length-1],r[r.length-2]);i=UJ[e.arrowTypeEnd]*Math.cos(t)*(n>=0?1:-1)}let o=Math.abs(KJ(t).x-KJ(r[r.length-1]).x),s=Math.abs(KJ(t).y-KJ(r[r.length-1]).y),c=Math.abs(KJ(t).x-KJ(r[0]).x),l=Math.abs(KJ(t).y-KJ(r[0]).y),u=UJ[e.arrowTypeStart],d=UJ[e.arrowTypeEnd];if(o<d&&o>0&&s<d){let e=d+1-o;e*=a===`right`?-1:1,i-=e}if(c<u&&c>0&&l<u){let e=u+1-c;e*=a===`right`?-1:1,i+=e}return KJ(t).x+i},`x`),y:W(function(t,n,r){let i=0,a=KJ(r[0]).y<KJ(r[r.length-1]).y?`down`:`up`;if(n===0&&Object.hasOwn(UJ,e.arrowTypeStart)){let{angle:t,deltaY:n}=GJ(r[0],r[1]);i=UJ[e.arrowTypeStart]*Math.abs(Math.sin(t))*(n>=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(UJ,e.arrowTypeEnd)){let{angle:t,deltaY:n}=GJ(r[r.length-1],r[r.length-2]);i=UJ[e.arrowTypeEnd]*Math.abs(Math.sin(t))*(n>=0?1:-1)}let o=Math.abs(KJ(t).y-KJ(r[r.length-1]).y),s=Math.abs(KJ(t).x-KJ(r[r.length-1]).x),c=Math.abs(KJ(t).y-KJ(r[0]).y),l=Math.abs(KJ(t).x-KJ(r[0]).x),u=UJ[e.arrowTypeStart],d=UJ[e.arrowTypeEnd];if(o<d&&o>0&&s<d){let e=d+1-o;e*=a===`up`?-1:1,i-=e}if(c<u&&c>0&&l<u){let e=u+1-c;e*=a===`up`?-1:1,i+=e}return KJ(t).y+i},`y`)}),`getLineFunctionsWithOffset`),JJ=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0,e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,e.htmlCtrlEntityRegex=/&(newline|tab);/gi,e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,e.urlSchemeRegex=/^.+(:|:)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[`.`,`/`],e.BLANK_URL=`about:blank`})),YJ=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.sanitizeUrl=o;var t=JJ();function n(e){return t.relativeFirstCharacters.indexOf(e[0])>-1}function r(e){return e.replace(t.ctrlCharactersRegex,``).replace(t.htmlEntitiesRegex,function(e,t){return String.fromCharCode(t)})}function i(e){return URL.canParse(e)}function a(e){try{return decodeURIComponent(e)}catch{return e}}function o(e){if(!e)return t.BLANK_URL;var o,s=a(e.trim());do s=r(s).replace(t.htmlCtrlEntityRegex,``).replace(t.ctrlCharactersRegex,``).replace(t.whitespaceEscapeCharsRegex,``).trim(),s=a(s),o=s.match(t.ctrlCharactersRegex)||s.match(t.htmlEntitiesRegex)||s.match(t.htmlCtrlEntityRegex)||s.match(t.whitespaceEscapeCharsRegex);while(o&&o.length>0);var c=s;if(!c)return t.BLANK_URL;if(n(c))return c;var l=c.trimStart(),u=l.match(t.urlSchemeRegex);if(!u)return c;var d=u[0].toLowerCase().trim();if(t.invalidProtocolRegex.test(d))return t.BLANK_URL;var f=l.replace(/\\/g,`/`);if(d===`mailto:`||d.includes(`://`))return f;if(d===`http:`||d===`https:`){if(!i(f))return t.BLANK_URL;var p=new URL(f);return p.protocol=p.protocol.toLowerCase(),p.hostname=p.hostname.toLowerCase(),p.toString()}return f}})),XJ=YJ(),ZJ=function(){try{var e=l(Object,`defineProperty`);return e({},``,{}),e}catch{}}();function QJ(e,t,n){t==`__proto__`&&ZJ?ZJ(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function $J(e,t,n){(n!==void 0&&!O(e[t],n)||n===void 0&&!(t in e))&&QJ(e,t,n)}var eY=typeof exports==`object`&&exports&&!exports.nodeType&&exports,tY=eY&&typeof module==`object`&&module&&!module.nodeType&&module,nY=tY&&tY.exports===eY?c.Buffer:void 0,rY=nY?nY.allocUnsafe:void 0;function iY(e,t){if(t)return e.slice();var n=e.length,r=rY?rY(n):new e.constructor(n);return e.copy(r),r}function aY(e){var t=new e.constructor(e.byteLength);return new _(t).set(new _(e)),t}function oY(e,t){var n=t?aY(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function sY(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}var cY=Object.create,lY=function(){function e(){}return function(t){if(!u(t))return{};if(cY)return cY(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),uY=y(Object.getPrototypeOf,Object);function dY(e){return typeof e.constructor==`function`&&!x(e)?lY(uY(e)):{}}function fY(e){return h(e)&&p(e)}var pY=`[object Object]`,mY=Function.prototype,hY=Object.prototype,gY=mY.toString,_Y=hY.hasOwnProperty,vY=gY.call(Object);function yY(e){if(!h(e)||s(e)!=pY)return!1;var t=uY(e);if(t===null)return!0;var n=_Y.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&gY.call(n)==vY}function bY(e,t){if(!(t===`constructor`&&typeof e[t]==`function`)&&t!=`__proto__`)return e[t]}var xY=Object.prototype.hasOwnProperty;function SY(e,t,n){var r=e[t];(!(xY.call(e,t)&&O(r,n))||n===void 0&&!(t in e))&&QJ(e,t,n)}function CY(e,t,n,r){var i=!n;n||={};for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?QJ(n,s,c):SY(n,s,c)}return n}function wY(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var TY=Object.prototype.hasOwnProperty;function EY(e){if(!u(e))return wY(e);var t=x(e),n=[];for(var r in e)r==`constructor`&&(t||!TY.call(e,r))||n.push(r);return n}function DY(e){return p(e)?b(e,!0):EY(e)}function OY(e){return CY(e,DY(e))}function kY(e,t,n,r,i,a,o){var s=bY(e,n),c=bY(t,n),l=o.get(c);if(l){$J(e,n,l);return}var d=a?a(s,c,n+``,e,t,o):void 0,f=d===void 0;if(f){var p=T(c),h=!p&&C(c),g=!p&&!h&&v(c);d=c,p||h||g?T(s)?d=s:fY(s)?d=sY(s):h?(f=!1,d=iY(c,!0)):g?(f=!1,d=oY(c,!0)):d=[]:yY(c)||m(c)?(d=s,m(s)?d=OY(s):(!u(s)||D(s))&&(d=dY(c))):f=!1}f&&(o.set(c,d),i(d,c,r,a,o),o.delete(c)),$J(e,n,d)}function AY(e,t,n,r,i){e!==t&&g(t,function(a,o){if(i||=new d,u(a))kY(e,t,o,n,AY,r,i);else{var s=r?r(bY(e,o),a,o+``,e,t,i):void 0;s===void 0&&(s=a),$J(e,o,s)}},DY)}function jY(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var MY=Math.max;function NY(e,t,n){return t=MY(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=MY(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),jY(e,this,s)}}function PY(e){return function(){return e}}var FY=ZJ?function(e,t){return ZJ(e,`toString`,{configurable:!0,enumerable:!1,value:PY(t),writable:!0})}:w,IY=800,LY=16,RY=Date.now;function zY(e){var t=0,n=0;return function(){var r=RY(),i=LY-(r-n);if(n=r,i>0){if(++t>=IY)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var BY=zY(FY);function VY(e,t){return BY(NY(e,t,w),e+``)}function HY(e,t,n){if(!u(n))return!1;var r=typeof t;return(r==`number`?p(n)&&S(t,n.length):r==`string`&&t in n)?O(n[t],e):!1}function UY(e){return VY(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a==`function`?(i--,a):void 0,o&&HY(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}var WY=UY(function(e,t,n){AY(e,t,n)}),GY={curveBasis:mW,curveBasisClosed:gW,curveBasisOpen:vW,curveBumpX:lW,curveBumpY:uW,curveBundle:bW,curveCardinalClosed:TW,curveCardinalOpen:DW,curveCardinal:CW,curveCatmullRomClosed:MW,curveCatmullRomOpen:PW,curveCatmullRom:AW,curveLinear:iW,curveLinearClosed:IW,curveMonotoneX:WW,curveMonotoneY:GW,curveNatural:JW,curveStep:XW,curveStepAfter:QW,curveStepBefore:ZW},KY=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,qY=W(function(e,t){let n=JY(e,/(?:init\b)|(?:initialize\b)/),r={};if(Array.isArray(n)){let e=n.map(e=>e.args);zL(e),r=cL(r,[...e])}else r=n.args;if(!r)return;let i=rL(e,t),a=`config`;return r[a]!==void 0&&(i===`flowchart-v2`&&(i=`flowchart`),r[i]=r[a],delete r[a]),r},`detectInit`),JY=W(function(e,t=null){try{let n=RegExp(`[%]{2}(?![{]${KY.source})(?=[}][%]{2}).*
|
|
390
|
+
`,`ig`);e=e.trim().replace(n,``).replace(/'/gm,`"`),G.debug(`Detecting diagram directive${t===null?``:` type:`+t} based on the text:${e}`);let r,i=[];for(;(r=$I.exec(e))!==null;)if(r.index===$I.lastIndex&&$I.lastIndex++,r&&!t||t&&r[1]?.match(t)||t&&r[2]?.match(t)){let e=r[1]?r[1]:r[2],t=r[3]?r[3].trim():r[4]?JSON.parse(r[4].trim()):null;i.push({type:e,args:t})}return i.length===0?{type:e,args:null}:i.length===1?i[0]:i}catch(n){return G.error(`ERROR: ${n.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},`detectDirective`),YY=W(function(e){return e.replace($I,``)},`removeDirectives`),XY=W(function(e,t){for(let[n,r]of t.entries())if(r.match(e))return n;return-1},`isSubstringInArray`);function ZY(e,t){return e?GY[`curve${e.charAt(0).toUpperCase()+e.slice(1)}`]??t:t}W(ZY,`interpolateToCurve`);function QY(e,t){let n=e.trim();if(n)return t.securityLevel===`loose`?n:(0,XJ.sanitizeUrl)(n)}W(QY,`formatUrl`);var $Y=W((e,...t)=>{let n=e.split(`.`),r=n.length-1,i=n[r],a=window;for(let t=0;t<r;t++)if(a=a[n[t]],!a){G.error(`Function name: ${e} not found in window`);return}a[i](...t)},`runFunc`);function eX(e,t){return!e||!t?0:Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}W(eX,`distance`);function tX(e){let t,n=0;return e.forEach(e=>{n+=eX(e,t),t=e}),iX(e,n/2)}W(tX,`traverseEdge`);function nX(e){return e.length===1?e[0]:tX(e)}W(nX,`calcLabelPosition`);var rX=W((e,t=2)=>{let n=10**t;return Math.round(e*n)/n},`roundNumber`),iX=W((e,t)=>{let n,r=t;for(let t of e){if(n){let e=eX(t,n);if(e===0)return n;if(e<r)r-=e;else{let i=r/e;if(i<=0)return n;if(i>=1)return{x:t.x,y:t.y};if(i>0&&i<1)return{x:rX((1-i)*n.x+i*t.x,5),y:rX((1-i)*n.y+i*t.y,5)}}}n=t}throw Error(`Could not find a suitable point for the given distance`)},`calculatePoint`),aX=W((e,t,n)=>{G.info(`our points ${JSON.stringify(t)}`),t[0]!==n&&(t=t.reverse());let r=iX(t,25),i=e?10:5,a=Math.atan2(t[0].y-r.y,t[0].x-r.x),o={x:0,y:0};return o.x=Math.sin(a)*i+(t[0].x+r.x)/2,o.y=-Math.cos(a)*i+(t[0].y+r.y)/2,o},`calcCardinalityPosition`);function oX(e,t,n){let r=structuredClone(n);G.info(`our points`,r),t!==`start_left`&&t!==`start_right`&&r.reverse();let i=iX(r,25+e),a=10+e*.5,o=Math.atan2(r[0].y-i.y,r[0].x-i.x),s={x:0,y:0};return t===`start_left`?(s.x=Math.sin(o+Math.PI)*a+(r[0].x+i.x)/2,s.y=-Math.cos(o+Math.PI)*a+(r[0].y+i.y)/2):t===`end_right`?(s.x=Math.sin(o-Math.PI)*a+(r[0].x+i.x)/2-5,s.y=-Math.cos(o-Math.PI)*a+(r[0].y+i.y)/2-5):t===`end_left`?(s.x=Math.sin(o)*a+(r[0].x+i.x)/2-5,s.y=-Math.cos(o)*a+(r[0].y+i.y)/2-5):(s.x=Math.sin(o)*a+(r[0].x+i.x)/2,s.y=-Math.cos(o)*a+(r[0].y+i.y)/2),s}W(oX,`calcTerminalLabelPosition`);function sX(e){let t=``,n=``;for(let r of e)r!==void 0&&(r.startsWith(`color:`)||r.startsWith(`text-align:`)?n=n+r+`;`:t=t+r+`;`);return{style:t,labelStyle:n}}W(sX,`getStylesFromArray`);var cX=0,lX=W(()=>(cX++,`id-`+Math.random().toString(36).substr(2,12)+`-`+cX),`generateId`);function uX(e){let t=``;for(let n=0;n<e;n++)t+=`0123456789abcdef`.charAt(Math.floor(Math.random()*16));return t}W(uX,`makeRandomHex`);var dX=W(e=>uX(e.length),`random`),fX=W(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`),pX=W(function(e,t){let n=t.text.replace(DR.lineBreakRegex,` `),[,r]=wX(t.fontSize),i=e.append(`text`);i.attr(`x`,t.x),i.attr(`y`,t.y),i.style(`text-anchor`,t.anchor),i.style(`font-family`,t.fontFamily),i.style(`font-size`,r),i.style(`font-weight`,t.fontWeight),i.attr(`fill`,t.fill),t.class!==void 0&&i.attr(`class`,t.class);let a=i.append(`tspan`);return a.attr(`x`,t.x+t.textMargin*2),a.attr(`fill`,t.fill),a.text(n),i},`drawSimpleText`),mX=E((e,t,n)=>{if(!e||(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,joinWith:`<br/>`},n),DR.lineBreakRegex.test(e)))return e;let r=e.split(` `).filter(Boolean),i=[],a=``;return r.forEach((e,o)=>{let s=_X(`${e} `,n),c=_X(a,n);if(s>t){let{hyphenatedStrings:r,remainingWord:o}=hX(e,t,`-`,n);i.push(a,...r),a=o}else c+s>=t?(i.push(a),a=e):a=[a,e].filter(Boolean).join(` `);o+1===r.length&&i.push(a)}),i.filter(e=>e!==``).join(n.joinWith)},(e,t,n)=>`${e}${t}${n.fontSize}${n.fontWeight}${n.fontFamily}${n.joinWith}`),hX=E((e,t,n=`-`,r)=>{r=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,margin:0},r);let i=[...e],a=[],o=``;return i.forEach((e,s)=>{let c=`${o}${e}`;if(_X(c,r)>=t){let e=s+1,t=i.length===e,r=`${c}${n}`;a.push(t?c:r),o=``}else o=c}),{hyphenatedStrings:a,remainingWord:o}},(e,t,n=`-`,r)=>`${e}${t}${n}${r.fontSize}${r.fontWeight}${r.fontFamily}`);function gX(e,t){return vX(e,t).height}W(gX,`calculateTextHeight`);function _X(e,t){return vX(e,t).width}W(_X,`calculateTextWidth`);var vX=E((e,t)=>{let{fontSize:n=12,fontFamily:r=`Arial`,fontWeight:i=400}=t;if(!e)return{width:0,height:0};let[,a]=wX(n),o=[`sans-serif`,r],s=e.split(DR.lineBreakRegex),c=[],l=YB(`body`);if(!l.remove)return{width:0,height:0,lineHeight:0};let u=l.append(`svg`);for(let e of o){let t=0,n={width:0,height:0,lineHeight:0};for(let r of s){let o=fX();o.text=r||``;let s=pX(u,o).style(`font-size`,a).style(`font-weight`,i).style(`font-family`,e),c=(s._groups||s)[0][0].getBBox();if(c.width===0&&c.height===0)throw Error(`svg element not in render tree`);n.width=Math.round(Math.max(n.width,c.width)),t=Math.round(c.height),n.height+=t,n.lineHeight=Math.round(Math.max(n.lineHeight,t))}c.push(n)}return u.remove(),c[isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),yX=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{W(this,`InitIDGenerator`)}},bX,xX=W(function(e){return bX||=document.createElement(`div`),e=escape(e).replace(/%26/g,`&`).replace(/%23/g,`#`).replace(/%3B/g,`;`),bX.innerHTML=e,unescape(bX.textContent)},`entityDecode`);function SX(e){return`str`in e}W(SX,`isDetailedError`);var CX=W((e,t,n,r)=>{if(!r)return;let i=e.node()?.getBBox();i&&e.append(`text`).text(r).attr(`text-anchor`,`middle`).attr(`x`,i.x+i.width/2).attr(`y`,-n).attr(`class`,t)},`insertTitle`),wX=W(e=>{if(typeof e==`number`)return[e,e+`px`];let t=parseInt(e??``,10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+`px`]:[t,e]},`parseFontSize`);function TX(e,t){return WY({},e,t)}W(TX,`cleanAndMerge`);var EX={assignWithDepth:cL,wrapLabel:mX,calculateTextHeight:gX,calculateTextWidth:_X,calculateTextDimensions:vX,cleanAndMerge:TX,detectInit:qY,detectDirective:JY,isSubstringInArray:XY,interpolateToCurve:ZY,calcLabelPosition:nX,calcCardinalityPosition:aX,calcTerminalLabelPosition:oX,formatUrl:QY,getStylesFromArray:sX,generateId:lX,random:dX,runFunc:$Y,entityDecode:xX,insertTitle:CX,isLabelCoordinateInPath:jX,parseFontSize:wX,InitIDGenerator:yX},DX=W(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/#\w+;/g,function(e){let t=e.substring(1,e.length-1);return/^\+?\d+$/.test(t)?`fl°°`+t+`¶ß`:`fl°`+t+`¶ß`}),t},`encodeEntities`),OX=W(function(e){return e.replace(/fl°°/g,`&#`).replace(/fl°/g,`&`).replace(/¶ß/g,`;`)},`decodeEntities`),kX=W((e,t,{counter:n=0,prefix:r,suffix:i},a)=>a||`${r?`${r}_`:``}${e}_${t}_${n}${i?`_${i}`:``}`,`getEdgeId`);function AX(e){return e??null}W(AX,`handleUndefinedAttr`);function jX(e,t){let n=Math.round(e.x),r=Math.round(e.y),i=t.replace(/(\d+\.\d+)/g,e=>Math.round(parseFloat(e)).toString());return i.includes(n.toString())||i.includes(r.toString())}W(jX,`isLabelCoordinateInPath`);var MX=W(({flowchart:e})=>{let t=e?.subGraphTitleMargin?.top??0,n=e?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:n,subGraphTitleTotalMargin:t+n}},`getSubGraphTitleMargins`);async function NX(e,t){let n=e.getElementsByTagName(`img`);if(!n||n.length===0)return;let r=t.replace(/<img[^>]*>/g,``).trim()===``;await Promise.all([...n].map(e=>new Promise(t=>{function n(){if(e.style.display=`flex`,e.style.flexDirection=`column`,r){let[t=RL.fontSize]=wX(WR().fontSize?WR().fontSize:window.getComputedStyle(document.body).fontSize),n=t*5+`px`;e.style.minWidth=n,e.style.maxWidth=n}else e.style.width=`100%`;t(e)}W(n,`setupImage`),setTimeout(()=>{e.complete&&n()}),e.addEventListener(`error`,n),e.addEventListener(`load`,n)})))}W(NX,`configureLabelImages`);var PX=W(e=>{let{handDrawnSeed:t}=WR();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},`solidStateFill`),FX=W(e=>{let t=IX([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},`compileStyles`),IX=W(e=>{let t=new Map;return e.forEach(e=>{let[n,r]=e.split(`:`);t.set(n.trim(),r?.trim())}),t},`styles2Map`),LX=W(e=>e===`color`||e===`font-size`||e===`font-family`||e===`font-weight`||e===`font-style`||e===`text-decoration`||e===`text-align`||e===`text-transform`||e===`line-height`||e===`letter-spacing`||e===`word-spacing`||e===`text-shadow`||e===`text-overflow`||e===`white-space`||e===`word-wrap`||e===`word-break`||e===`overflow-wrap`||e===`hyphens`,`isLabelStyle`),X=W(e=>{let{stylesArray:t}=FX(e),n=[],r=[],i=[],a=[];return t.forEach(e=>{let t=e[0];LX(t)?n.push(e.join(`:`)+` !important`):(r.push(e.join(`:`)+` !important`),t.includes(`stroke`)&&i.push(e.join(`:`)+` !important`),t===`fill`&&a.push(e.join(`:`)+` !important`))}),{labelStyles:n.join(`;`),nodeStyles:r.join(`;`),stylesArray:t,borderStyles:i,backgroundStyles:a}},`styles2String`),Z=W((e,t)=>{let{themeVariables:n,handDrawnSeed:r}=WR(),{nodeBorder:i,mainBkg:a}=n,{stylesMap:o}=FX(e);return Object.assign({roughness:.7,fill:o.get(`fill`)||a,fillStyle:`hachure`,fillWeight:4,hachureGap:5.2,stroke:o.get(`stroke`)||i,seed:r,strokeWidth:o.get(`stroke-width`)?.replace(`px`,``)||1.3,fillLineDash:[0,0],strokeLineDash:RX(o.get(`stroke-dasharray`))},t)},`userNodeOverrides`),RX=W(e=>{if(!e)return[0,0];let t=e.trim().split(/\s+/).map(Number);if(t.length===1){let e=isNaN(t[0])?0:t[0];return[e,e]}return[isNaN(t[0])?0:t[0],isNaN(t[1])?0:t[1]]},`getStrokeDashArray`),zX=Object.freeze({left:0,top:0,width:16,height:16}),BX=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),VX=Object.freeze({...zX,...BX}),HX=Object.freeze({...VX,body:``,hidden:!1}),UX=Object.freeze({width:null,height:null}),WX=Object.freeze({...UX,...BX}),GX=(e,t,n,r=``)=>{let i=e.split(`:`);if(e.slice(0,1)===`@`){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!KX(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!KX(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!KX(e,n)?null:e}return null},KX=(e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1;function qX(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function JX(e,t){let n=qX(e,t);for(let r in HX)r in BX?r in e&&!(r in n)&&(n[r]=BX[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function YX(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function a(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&a(t);n&&(i[e]=[t].concat(n))}return i[e]}return(t||Object.keys(n).concat(Object.keys(r))).forEach(a),i}function XX(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=JX(r[e]||i[e],a)}return o(t),n.forEach(o),JX(e,a)}function ZX(e,t){if(e.icons[t])return XX(e,t,[]);let n=YX(e,[t])[t];return n?XX(e,t,n):null}var QX=/(-?[0-9.]*[0-9]+[0-9.]*)/g,$X=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function eZ(e,t,n){if(t===1)return e;if(n||=100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(QX);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=$X.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}function tZ(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(`</`+t);if(i===-1||a===-1)break;let o=e.indexOf(`>`,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}function nZ(e,t){return e?`<defs>`+e+`</defs>`+t:t}function rZ(e,t,n){let r=tZ(e);return nZ(r.defs,t+r.content+n)}var iZ=e=>e===`unset`||e===`undefined`||e===`none`;function aZ(e,t){let n={...VX,...e},r={...WX,...t},i={left:n.left,top:n.top,width:n.width,height:n.height},a=n.body;[n,r].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,o=e.rotate;n?r?o+=2:(t.push(`translate(`+(i.width+i.left).toString()+` `+(0-i.top).toString()+`)`),t.push(`scale(-1 1)`),i.top=i.left=0):r&&(t.push(`translate(`+(0-i.left).toString()+` `+(i.height+i.top).toString()+`)`),t.push(`scale(1 -1)`),i.top=i.left=0);let s;switch(o<0&&(o-=Math.floor(o/4)*4),o%=4,o){case 1:s=i.height/2+i.top,t.unshift(`rotate(90 `+s.toString()+` `+s.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(i.width/2+i.left).toString()+` `+(i.height/2+i.top).toString()+`)`);break;case 3:s=i.width/2+i.left,t.unshift(`rotate(-90 `+s.toString()+` `+s.toString()+`)`);break}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),t.length&&(a=rZ(a,`<g transform="`+t.join(` `)+`">`,`</g>`))});let o=r.width,s=r.height,c=i.width,l=i.height,u,d;o===null?(d=s===null?`1em`:s===`auto`?l:s,u=eZ(d,c/l)):(u=o===`auto`?c:o,d=s===null?eZ(u,l/c):s===`auto`?l:s);let f={},p=(e,t)=>{iZ(t)||(f[e]=t.toString())};p(`width`,u),p(`height`,d);let m=[i.left,i.top,c,l];return f.viewBox=m.join(` `),{attributes:f,viewBox:m,body:a}}var oZ=/\sid="(\S+)"/g,sZ=new Map;function cZ(e){e=e.replace(/[0-9]+$/,``)||`a`;let t=sZ.get(e)||0;return sZ.set(e,t+1),t?`${e}${t}`:e}function lZ(e){let t=[],n;for(;n=oZ.exec(e);)t.push(n[1]);if(!t.length)return e;let r=`suffix`+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(t=>{let n=cZ(t),i=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);e=e.replace(RegExp(`([#;"])(`+i+`)([")]|\\.[a-z])`,`g`),`$1`+n+r+`$3`)}),e=e.replace(new RegExp(r,`g`),``),e}function uZ(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return`<svg xmlns="http://www.w3.org/2000/svg"`+n+`>`+e+`</svg>`}function dZ(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var fZ=dZ();function pZ(e){fZ=e}var mZ={exec:()=>null};function hZ(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(_Z.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var gZ=(()=>{try{return!0}catch{return!1}})(),_Z={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+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`)},vZ=/^(?:[ \t]*(?:\n|$))+/,yZ=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,bZ=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,xZ=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,SZ=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,CZ=/(?:[*+-]|\d{1,9}[.)])/,wZ=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,TZ=hZ(wZ).replace(/bull/g,CZ).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(),EZ=hZ(wZ).replace(/bull/g,CZ).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(),DZ=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,OZ=/^[^\n]+/,kZ=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,AZ=hZ(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,kZ).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),jZ=hZ(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,CZ).getRegex(),MZ=`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`,NZ=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,PZ=hZ(`^ {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`,NZ).replace(`tag`,MZ).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),FZ=hZ(DZ).replace(`hr`,xZ).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`,MZ).getRegex(),IZ={blockquote:hZ(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,FZ).getRegex(),code:yZ,def:AZ,fences:bZ,heading:SZ,hr:xZ,html:PZ,lheading:TZ,list:jZ,newline:vZ,paragraph:FZ,table:mZ,text:OZ},LZ=hZ(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,xZ).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`,MZ).getRegex(),RZ={...IZ,lheading:EZ,table:LZ,paragraph:hZ(DZ).replace(`hr`,xZ).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,LZ).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`,MZ).getRegex()},zZ={...IZ,html:hZ(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,NZ).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:mZ,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:hZ(DZ).replace(`hr`,xZ).replace(`heading`,` *#{1,6} *[^
|
|
391
|
+
]`).replace(`lheading`,TZ).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},BZ=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,VZ=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,HZ=/^( {2,}|\\)\n(?!\s*$)/,UZ=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,WZ=/[\p{P}\p{S}]/u,GZ=/[\s\p{P}\p{S}]/u,KZ=/[^\s\p{P}\p{S}]/u,qZ=hZ(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,GZ).getRegex(),JZ=/(?!~)[\p{P}\p{S}]/u,YZ=/(?!~)[\s\p{P}\p{S}]/u,XZ=/(?:[^\s\p{P}\p{S}]|~)/u,ZZ=hZ(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,gZ?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),QZ=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,$Z=hZ(QZ,`u`).replace(/punct/g,WZ).getRegex(),eQ=hZ(QZ,`u`).replace(/punct/g,JZ).getRegex(),tQ=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,nQ=hZ(tQ,`gu`).replace(/notPunctSpace/g,KZ).replace(/punctSpace/g,GZ).replace(/punct/g,WZ).getRegex(),rQ=hZ(tQ,`gu`).replace(/notPunctSpace/g,XZ).replace(/punctSpace/g,YZ).replace(/punct/g,JZ).getRegex(),iQ=hZ(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,KZ).replace(/punctSpace/g,GZ).replace(/punct/g,WZ).getRegex(),aQ=hZ(/\\(punct)/,`gu`).replace(/punct/g,WZ).getRegex(),oQ=hZ(/^<(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(),sQ=hZ(NZ).replace(`(?:-->|$)`,`-->`).getRegex(),cQ=hZ(`^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`,sQ).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),lQ=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,uQ=hZ(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace(`label`,lQ).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),dQ=hZ(/^!?\[(label)\]\[(ref)\]/).replace(`label`,lQ).replace(`ref`,kZ).getRegex(),fQ=hZ(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,kZ).getRegex(),pQ=hZ(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,dQ).replace(`nolink`,fQ).getRegex(),mQ=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,hQ={_backpedal:mZ,anyPunctuation:aQ,autolink:oQ,blockSkip:ZZ,br:HZ,code:VZ,del:mZ,emStrongLDelim:$Z,emStrongRDelimAst:nQ,emStrongRDelimUnd:iQ,escape:BZ,link:uQ,nolink:fQ,punctuation:qZ,reflink:dQ,reflinkSearch:pQ,tag:cQ,text:UZ,url:mZ},gQ={...hQ,link:hZ(/^!?\[(label)\]\((.*?)\)/).replace(`label`,lQ).getRegex(),reflink:hZ(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,lQ).getRegex()},_Q={...hQ,emStrongRDelimAst:rQ,emStrongLDelim:eQ,url:hZ(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,mQ).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:hZ(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,mQ).getRegex()},vQ={..._Q,br:hZ(HZ).replace(`{2,}`,`*`).getRegex(),text:hZ(_Q.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},yQ={normal:IZ,gfm:RZ,pedantic:zZ},bQ={normal:hQ,gfm:_Q,breaks:vQ,pedantic:gQ},xQ={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},SQ=e=>xQ[e];function CQ(e,t){if(t){if(_Z.escapeTest.test(e))return e.replace(_Z.escapeReplace,SQ)}else if(_Z.escapeTestNoEncode.test(e))return e.replace(_Z.escapeReplaceNoEncode,SQ);return e}function wQ(e){try{e=encodeURI(e).replace(_Z.percentDecode,`%`)}catch{return null}return e}function TQ(e,t){let n=e.replace(_Z.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(_Z.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``);for(;r<n.length;r++)n[r]=n[r].trim().replace(_Z.slashPipe,`|`);return n}function EQ(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function DQ(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function OQ(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function kQ(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
392
|
+
`).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(`
|
|
393
|
+
`)}var AQ=class{options;rules;lexer;constructor(e){this.options=e||fZ}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,``);return{type:`code`,raw:t[0],codeBlockStyle:`indented`,text:this.options.pedantic?e:EQ(e,`
|
|
394
|
+
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=kQ(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=EQ(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:EQ(t[0],`
|
|
395
|
+
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=EQ(t[0],`
|
|
396
|
+
`).split(`
|
|
397
|
+
`),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o;for(o=0;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(!t)a.push(e[o]);else break;e=e.slice(o);let s=a.join(`
|
|
398
|
+
`),c=s.replace(this.rules.other.blockquoteSetextReplace,`
|
|
399
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,``);n=n?`${n}
|
|
400
|
+
${s}`:s,r=r?`${r}
|
|
401
|
+
${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=l,e.length===0)break;let u=i.at(-1);if(u?.type===`code`)break;if(u?.type===`blockquote`){let t=u,a=t.raw+`
|
|
402
|
+
`+e.join(`
|
|
403
|
+
`),o=this.blockquote(a);i[i.length-1]=o,n=n.substring(0,n.length-t.raw.length)+o.raw,r=r.substring(0,r.length-t.text.length)+o.text;break}else if(u?.type===`list`){let t=u,a=t.raw+`
|
|
404
|
+
`+e.join(`
|
|
405
|
+
`),o=this.list(a);i[i.length-1]=o,n=n.substring(0,n.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(i.at(-1).raw.length).split(`
|
|
406
|
+
`);continue}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=t[2].split(`
|
|
407
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,e=>` `.repeat(3*e.length)),l=e.split(`
|
|
408
|
+
`,1)[0],u=!c.trim(),d=0;if(this.options.pedantic?(d=2,s=c.trimStart()):u?d=t[1].length+1:(d=t[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=c.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(l)&&(r+=l+`
|
|
409
|
+
`,e=e.substring(l.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),i=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),o=this.rules.other.htmlBeginRegex(d);for(;e;){let f=e.split(`
|
|
410
|
+
`,1)[0],p;if(l=f,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting,` `),p=l):p=l.replace(this.rules.other.tabCharGlobal,` `),i.test(l)||a.test(l)||o.test(l)||t.test(l)||n.test(l))break;if(p.search(this.rules.other.nonSpaceChar)>=d||!l.trim())s+=`
|
|
411
|
+
`+p.slice(d);else{if(u||c.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(c)||a.test(c)||n.test(c))break;s+=`
|
|
412
|
+
`+l}!u&&!l.trim()&&(u=!0),r+=f+`
|
|
413
|
+
`,e=e.substring(f.length+1),c=p.slice(d)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0));let f=null,p;this.options.gfm&&(f=this.rules.other.listIsTask.exec(s),f&&(p=f[0]!==`[ ] `,s=s.replace(this.rules.other.listReplaceTask,``))),i.items.push({type:`list_item`,raw:r,task:!!f,checked:p,loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e=0;e<i.items.length;e++)if(this.lexer.state.top=!1,i.items[e].tokens=this.lexer.blockTokens(i.items[e].text,[]),!i.loose){let t=i.items[e].tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}if(i.loose)for(let e=0;e<i.items.length;e++)i.items[e].loose=!0;return i}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:`html`,block:!0,raw:t[0],pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:t[0],href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=TQ(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
|
|
414
|
+
`):[],a={type:`table`,raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(TQ(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:`heading`,raw:t[0],depth:t[2].charAt(0)===`=`?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
|
|
415
|
+
`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=EQ(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=DQ(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),OQ(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,`$1`),title:r&&r.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `).toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return OQ(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=0,c=r[0][0]===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);(r=c.exec(t))!=null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){o+=a;continue}else if((r[5]||r[6])&&n%3&&!((n+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);let t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){let e=c.slice(1,-1);return{type:`em`,raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}let l=c.slice(2,-2);return{type:`strong`,raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:`del`,raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},jQ=class e{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||fZ,this.options.tokenizer=this.options.tokenizer||new AQ,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 t={other:_Z,block:yQ.normal,inline:bQ.normal};this.options.pedantic?(t.block=yQ.pedantic,t.inline=bQ.pedantic):this.options.gfm&&(t.block=yQ.gfm,this.options.breaks?t.inline=bQ.breaks:t.inline=bQ.gfm),this.tokenizer.rules=t}static get rules(){return{block:yQ,inline:bQ}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(_Z.carriageReturn,`
|
|
416
|
+
`),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){for(this.options.pedantic&&(e=e.replace(_Z.tabCharGlobal,` `).replace(_Z.spaceLine,``));e;){let r;if(this.options.extensions?.block?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);r.raw.length===1&&n!==void 0?n.raw+=`
|
|
417
|
+
`:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
418
|
+
`)?``:`
|
|
419
|
+
`)+r.raw,n.text+=`
|
|
420
|
+
`+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
421
|
+
`)?``:`
|
|
422
|
+
`)+r.raw,n.text+=`
|
|
423
|
+
`+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},t.push(r));continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let a=t.at(-1);n&&a?.type===`paragraph`?(a.raw+=(a.raw.endsWith(`
|
|
424
|
+
`)?``:`
|
|
425
|
+
`)+r.raw,a.text+=`
|
|
426
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
427
|
+
`)?``:`
|
|
428
|
+
`)+r.raw,n.text+=`
|
|
429
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)e.includes(r[0].slice(r[0].lastIndexOf(`[`)+1,-1))&&(n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,r.index)+`++`+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)i=r[2]?r[2].length:0,n=n.slice(0,r.index+i)+`[`+`a`.repeat(r[0].length-i-2)+`]`+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let a=!1,o=``;for(;e;){a||(o=``),a=!1;let r;if(this.options.extensions?.inline?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);r.type===`text`&&n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(i)){e=e.substring(r.raw.length),r.raw.slice(-1)!==`_`&&(o=r.raw.slice(-1)),a=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return t}},MQ=class{options;parser;constructor(e){this.options=e||fZ}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(_Z.notSpaceStart)?.[0],i=e.replace(_Z.endingNewline,``)+`
|
|
430
|
+
`;return r?`<pre><code class="language-`+CQ(r)+`">`+(n?i:CQ(i,!0))+`</code></pre>
|
|
431
|
+
`:`<pre><code>`+(n?i:CQ(i,!0))+`</code></pre>
|
|
432
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
433
|
+
${this.parser.parse(e)}</blockquote>
|
|
434
|
+
`}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
435
|
+
`}hr(e){return`<hr>
|
|
436
|
+
`}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let i=t?`ol`:`ul`,a=t&&n!==1?` start="`+n+`"`:``;return`<`+i+a+`>
|
|
437
|
+
`+r+`</`+i+`>
|
|
438
|
+
`}listitem(e){let t=``;if(e.task){let n=this.checkbox({checked:!!e.checked});e.loose?e.tokens[0]?.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+` `+CQ(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:`text`,raw:n+` `,text:n+` `,escaped:!0}):t+=n+` `}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
|
|
439
|
+
`}checkbox({checked:e}){return`<input `+(e?`checked="" `:``)+`disabled="" type="checkbox">`}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
440
|
+
`}table(e){let t=``,n=``;for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r=``;for(let t=0;t<e.rows.length;t++){let i=e.rows[t];n=``;for(let e=0;e<i.length;e++)n+=this.tablecell(i[e]);r+=this.tablerow({text:n})}return r&&=`<tbody>${r}</tbody>`,`<table>
|
|
441
|
+
<thead>
|
|
442
|
+
`+t+`</thead>
|
|
443
|
+
`+r+`</table>
|
|
444
|
+
`}tablerow({text:e}){return`<tr>
|
|
445
|
+
${e}</tr>
|
|
446
|
+
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
447
|
+
`}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>${CQ(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=wQ(e);if(i===null)return r;e=i;let a=`<a href="`+e+`"`;return t&&(a+=` title="`+CQ(t)+`"`),a+=`>`+r+`</a>`,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=wQ(e);if(i===null)return CQ(n);e=i;let a=`<img src="${e}" alt="${n}"`;return t&&(a+=` title="${CQ(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:CQ(e.text)}},NQ=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``}},PQ=class e{options;renderer;textRenderer;constructor(e){this.options=e||fZ,this.options.renderer=this.options.renderer||new MQ,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new NQ}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e,t=!0){let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=i,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(t!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`html`,`def`,`paragraph`,`text`].includes(e.type)){n+=t||``;continue}}let a=i;switch(a.type){case`space`:n+=this.renderer.space(a);continue;case`hr`:n+=this.renderer.hr(a);continue;case`heading`:n+=this.renderer.heading(a);continue;case`code`:n+=this.renderer.code(a);continue;case`table`:n+=this.renderer.table(a);continue;case`blockquote`:n+=this.renderer.blockquote(a);continue;case`list`:n+=this.renderer.list(a);continue;case`html`:n+=this.renderer.html(a);continue;case`def`:n+=this.renderer.def(a);continue;case`paragraph`:n+=this.renderer.paragraph(a);continue;case`text`:{let i=a,o=this.renderer.text(i);for(;r+1<e.length&&e[r+1].type===`text`;)i=e[++r],o+=`
|
|
448
|
+
`+this.renderer.text(i);t?n+=this.renderer.paragraph({type:`paragraph`,raw:o,text:o,tokens:[{type:`text`,raw:o,text:o,escaped:!0}]}):n+=o;continue}default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}parseInline(e,t=this.renderer){let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},FQ=class{options;block;constructor(e){this.options=e||fZ}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?jQ.lex:jQ.lexInline}provideParser(){return this.block?PQ.parse:PQ.parseInline}},IQ=new class{defaults=dZ();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=PQ;Renderer=MQ;TextRenderer=NQ;Lexer=jQ;Tokenizer=AQ;Hooks=FQ;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new MQ(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new AQ(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new FQ;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];FQ.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async&&FQ.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:t[r]=(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return jQ.lex(e,t??this.defaults)}parser(e,t){return PQ.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(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 t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer():e?jQ.lex:jQ.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser():e?PQ.parse:PQ.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer():e?jQ.lex:jQ.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser():e?PQ.parse:PQ.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
|
|
449
|
+
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+CQ(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function LQ(e,t){return IQ.parse(e,t)}LQ.options=LQ.setOptions=function(e){return IQ.setOptions(e),LQ.defaults=IQ.defaults,pZ(LQ.defaults),LQ},LQ.getDefaults=dZ,LQ.defaults=fZ,LQ.use=function(...e){return IQ.use(...e),LQ.defaults=IQ.defaults,pZ(LQ.defaults),LQ},LQ.walkTokens=function(e,t){return IQ.walkTokens(e,t)},LQ.parseInline=IQ.parseInline,LQ.Parser=PQ,LQ.parser=PQ.parse,LQ.Renderer=MQ,LQ.TextRenderer=NQ,LQ.Lexer=jQ,LQ.lexer=jQ.lex,LQ.Tokenizer=AQ,LQ.Hooks=FQ,LQ.parse=LQ,LQ.options,LQ.setOptions,LQ.use,LQ.walkTokens,LQ.parseInline,PQ.parse,jQ.lex;function RQ(e){var t=[...arguments].slice(1),n=Array.from(typeof e==`string`?[e]:e);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,``);var r=n.reduce(function(e,t){var n=t.match(/\n([\t ]+|(?!\s).)/g);return n?e.concat(n.map(function(e){return e.match(/[\t ]/g)?.length??0})):e},[]);if(r.length){var i=RegExp(`
|
|
450
|
+
[ ]{`+Math.min.apply(Math,r)+`}`,`g`);n=n.map(function(e){return e.replace(i,`
|
|
451
|
+
`)})}n[0]=n[0].replace(/^\r?\n/,``);var a=n[0];return t.forEach(function(e,t){var r=a.match(/(?:^|\n)( *)$/),i=r?r[1]:``,o=e;typeof e==`string`&&e.includes(`
|
|
452
|
+
`)&&(o=String(e).split(`
|
|
453
|
+
`).map(function(e,t){return t===0?e:``+i+e}).join(`
|
|
454
|
+
`)),a+=o+n[t+1]}),a}var zQ={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},BQ=new Map,VQ=new Map,HQ=W(e=>{for(let t of e){if(!t.name)throw Error(`Invalid icon loader. Must have a "name" property with non-empty string value.`);if(G.debug(`Registering icon pack:`,t.name),`loader`in t)VQ.set(t.name,t.loader);else if(`icons`in t)BQ.set(t.name,t.icons);else throw G.error(`Invalid icon loader:`,t),Error(`Invalid icon loader. Must have either "icons" or "loader" property.`)}},`registerIconPacks`),UQ=W(async(e,t)=>{let n=GX(e,!0,t!==void 0);if(!n)throw Error(`Invalid icon name: ${e}`);let r=n.prefix||t;if(!r)throw Error(`Icon name must contain a prefix: ${e}`);let i=BQ.get(r);if(!i){let e=VQ.get(r);if(!e)throw Error(`Icon set not found: ${n.prefix}`);try{i={...await e(),prefix:r},BQ.set(r,i)}catch(e){throw G.error(e),Error(`Failed to load icon set: ${n.prefix}`)}}let a=ZX(i,n.name);if(!a)throw Error(`Icon not found: ${e}`);return a},`getRegisteredIconData`),WQ=W(async e=>{try{return await UQ(e),!0}catch{return!1}},`isIconAvailable`),GQ=W(async(e,t,n)=>{let r;try{r=await UQ(e,t?.fallbackPrefix)}catch(e){G.error(e),r=zQ}let i=aZ(r,t);return hR(uZ(lZ(i.body),{...i.attributes,...n}),$L())},`getIconSVG`);function KQ(e,{markdownAutoWrap:t}){return RQ(e.replace(/<br\/>/g,`
|
|
455
|
+
`).replace(/\n{2,}/g,`
|
|
456
|
+
`))}W(KQ,`preprocessMarkdown`);function qQ(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(e=>e.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(e=>({content:e,type:`normal`}))??[])}W(qQ,`nonMarkdownToLines`);function JQ(e,t={}){let n=KQ(e,t),r=LQ.lexer(n),i=[[]],a=0;function o(e,t=`normal`){e.type===`text`?e.text.split(`
|
|
457
|
+
`).forEach((e,n)=>{n!==0&&(a++,i.push([])),e.split(` `).forEach(e=>{e=e.replace(/'/g,`'`),e&&i[a].push({content:e,type:t})})}):e.type===`strong`||e.type===`em`?e.tokens.forEach(t=>{o(t,e.type)}):e.type===`html`&&i[a].push({content:e.text,type:`normal`})}return W(o,`processNode`),r.forEach(e=>{e.type===`paragraph`?e.tokens?.forEach(e=>{o(e)}):e.type===`html`?i[a].push({content:e.text,type:`normal`}):i[a].push({content:e.raw,type:`normal`})}),i}W(JQ,`markdownToLines`);function YQ(e){return e?`<p>${e.replace(/\\n|\n/g,`<br />`)}</p>`:``}W(YQ,`nonMarkdownToHTML`);function XQ(e,{markdownAutoWrap:t}={}){let n=LQ.lexer(e);function r(e){return e.type===`text`?t===!1?e.text.replace(/\n */g,`<br/>`).replace(/ /g,` `):e.text.replace(/\n */g,`<br/>`):e.type===`strong`?`<strong>${e.tokens?.map(r).join(``)}</strong>`:e.type===`em`?`<em>${e.tokens?.map(r).join(``)}</em>`:e.type===`paragraph`?`<p>${e.tokens?.map(r).join(``)}</p>`:e.type===`space`?``:e.type===`html`?`${e.text}`:e.type===`escape`?e.text:(G.warn(`Unsupported markdown: ${e.type}`),e.raw)}return W(r,`output`),n.map(r).join(``)}W(XQ,`markdownToHTML`);function ZQ(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(e=>e.segment):[...e]}W(ZQ,`splitTextToChars`);function QQ(e,t){return $Q(e,[],ZQ(t.content),t.type)}W(QQ,`splitWordToFitWidth`);function $Q(e,t,n,r){if(n.length===0)return[{content:t.join(``),type:r},{content:``,type:r}];let[i,...a]=n,o=[...t,i];return e([{content:o.join(``),type:r}])?$Q(e,o,a,r):(t.length===0&&i&&(t.push(i),n.shift()),[{content:t.join(``),type:r},{content:n.join(``),type:r}])}W($Q,`splitWordToFitWidthRecursion`);function e$(e,t){if(e.some(({content:e})=>e.includes(`
|
|
458
|
+
`)))throw Error(`splitLineToFitWidth does not support newlines in the line`);return t$(e,t)}W(e$,`splitLineToFitWidth`);function t$(e,t,n=[],r=[]){if(e.length===0)return r.length>0&&n.push(r),n.length>0?n:[];let i=``;e[0].content===` `&&(i=` `,e.shift());let a=e.shift()??{content:` `,type:`normal`},o=[...r];if(i!==``&&o.push({content:i,type:`normal`}),o.push(a),t(o))return t$(e,t,n,o);if(r.length>0)n.push(r),e.unshift(a);else if(a.content){let[r,i]=QQ(t,a);n.push([r]),i.content&&e.unshift(i)}return t$(e,t,n)}W(t$,`splitLineToFitWidthRecursion`);function n$(e,t){t&&e.attr(`style`,t)}W(n$,`applyStyle`);var r$=16384;async function i$(e,t,n,r,i=!1,a=$L()){let o=e.append(`foreignObject`);o.attr(`width`,`${Math.min(10*n,r$)}px`),o.attr(`height`,`${Math.min(10*n,r$)}px`);let s=o.append(`xhtml:div`),c=TR(t.label)?await ER(t.label.replace(DR.lineBreakRegex,`
|
|
459
|
+
`),a):hR(t.label,a),l=t.isNode?`nodeLabel`:`edgeLabel`,u=s.append(`span`);u.html(c),n$(u,t.labelStyle),u.attr(`class`,`${l} ${r}`),n$(s,t.labelStyle),s.style(`display`,`table-cell`),s.style(`white-space`,`nowrap`),s.style(`line-height`,`1.5`),n!==1/0&&(s.style(`max-width`,n+`px`),s.style(`text-align`,`center`)),s.attr(`xmlns`,`http://www.w3.org/1999/xhtml`),i&&s.attr(`class`,`labelBkg`);let d=s.node().getBoundingClientRect();return d.width===n&&(s.style(`display`,`table`),s.style(`white-space`,`break-spaces`),s.style(`width`,n+`px`),d=s.node().getBoundingClientRect()),o.node()}W(i$,`addHtmlSpan`);function a$(e,t,n,r=!1){let i=e.append(`tspan`).attr(`class`,`text-outer-tspan`).attr(`x`,0).attr(`y`,t*n-.1+`em`).attr(`dy`,n+`em`);return r&&i.attr(`text-anchor`,`middle`),i}W(a$,`createTspan`);function o$(e,t,n){let r=e.append(`text`),i=a$(r,1,t);u$(i,n);let a=i.node().getComputedTextLength();return r.remove(),a}W(o$,`computeWidthOfText`);function s$(e,t,n){let r=e.append(`text`),i=a$(r,1,t);u$(i,[{content:n,type:`normal`}]);let a=i.node()?.getBoundingClientRect();return a&&r.remove(),a}W(s$,`computeDimensionOfText`);function c$(e,t,n,r=!1,i=!1){let a=1.1,o=t.append(`g`),s=o.insert(`rect`).attr(`class`,`background`).attr(`style`,`stroke: none`),c=o.append(`text`).attr(`y`,`-10.1`);i&&c.attr(`text-anchor`,`middle`);let l=0;for(let t of n){let n=W(t=>o$(o,a,t)<=e,`checkWidth`),r=n(t)?[t]:e$(t,n);for(let e of r)u$(a$(c,l,a,i),e),l++}if(r){let e=c.node().getBBox();return s.attr(`x`,e.x-2).attr(`y`,e.y-2).attr(`width`,e.width+4).attr(`height`,e.height+4),o.node()}else return c.node()}W(c$,`createFormattedText`);function l$(e){return e.replace(/&(amp|lt|gt);/g,(e,t)=>{switch(t){case`amp`:return`&`;case`lt`:return`<`;case`gt`:return`>`;default:return e}})}W(l$,`decodeHTMLEntities`);function u$(e,t){e.text(``),t.forEach((t,n)=>{let r=e.append(`tspan`).attr(`font-style`,t.type===`em`?`italic`:`normal`).attr(`class`,`text-inner-tspan`).attr(`font-weight`,t.type===`strong`?`bold`:`normal`);n===0?r.text(l$(t.content)):r.text(` `+l$(t.content))})}W(u$,`updateTextContentAndStyles`);async function d$(e,t={}){let n=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(e,r,i)=>(n.push((async()=>{let n=`${r}:${i}`;return await WQ(n)?await GQ(n,void 0,{class:`label-icon`}):`<i class='${hR(e,t).replace(`:`,` `)}'></i>`})()),e));let r=await Promise.all(n);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>r.shift()??``)}W(d$,`replaceIconSubstring`);var f$=W(async(e,t=``,{style:n=``,isTitle:r=!1,classes:i=``,useHtmlLabels:a=!0,markdown:o=!0,isNode:s=!0,width:c=200,addSvgBackground:l=!1}={},u)=>{if(G.debug(`XYZ createText`,t,n,r,i,a,s,`addSvgBackground: `,l),a){let r=await d$(OX(o?XQ(t,u):YQ(t)),u),a=t.replace(/\\\\/g,`\\`);return await i$(e,{isNode:s,label:TR(t)?a:r,labelStyle:n.replace(`fill:`,`color:`)},c,i,l,u)}else{let i=OX(t.replace(/<br\s*\/?>/g,`<br/>`)),a=c$(c,e,o?JQ(i.replace(`<br>`,`<br/>`),u):qQ(i),t?l:!1,!s);if(s){/stroke:/.exec(n)&&(n=n.replace(`stroke:`,`lineColor:`));let e=n.replace(/stroke:[^;]+;?/g,``).replace(/stroke-width:[^;]+;?/g,``).replace(/fill:[^;]+;?/g,``).replace(/color:/g,`fill:`);YB(a).attr(`style`,e)}else{let e=n.replace(/stroke:[^;]+;?/g,``).replace(/stroke-width:[^;]+;?/g,``).replace(/fill:[^;]+;?/g,``).replace(/background:/g,`fill:`);YB(a).select(`rect`).attr(`style`,e.replace(/background:/g,`fill:`));let t=n.replace(/stroke:[^;]+;?/g,``).replace(/stroke-width:[^;]+;?/g,``).replace(/fill:[^;]+;?/g,``).replace(/color:/g,`fill:`);YB(a).select(`text`).attr(`style`,t)}return r?YB(a).selectAll(`tspan.text-outer-tspan`).classed(`title-row`,!0):YB(a).selectAll(`tspan.text-outer-tspan`).classed(`row`,!0),a}},`createText`),p$=W(async(e,t,n)=>{let r,i=t.useHtmlLabels||HL(WR()?.htmlLabels);r=n||`node default`;let a=e.insert(`g`).attr(`class`,r).attr(`id`,t.domId||t.id),o=a.insert(`g`).attr(`class`,`label`).attr(`style`,AX(t.labelStyle)),s;s=t.label===void 0?``:typeof t.label==`string`?t.label:t.label[0];let c=!!t.icon||!!t.img,l=t.labelType===`markdown`,u=await f$(o,hR(OX(s),WR()),{useHtmlLabels:i,width:t.width||WR().flowchart?.wrappingWidth,classes:l?`markdown-node-label`:``,style:t.labelStyle,addSvgBackground:c,markdown:l},WR()),d=u.getBBox(),f=(t?.padding??0)/2;if(i){let e=u.children[0],t=YB(u);await NX(e,s),d=e.getBoundingClientRect(),t.attr(`width`,d.width),t.attr(`height`,d.height)}return i?o.attr(`transform`,`translate(`+-d.width/2+`, `+-d.height/2+`)`):o.attr(`transform`,`translate(0, `+-d.height/2+`)`),t.centerLabel&&o.attr(`transform`,`translate(`+-d.width/2+`, `+-d.height/2+`)`),o.insert(`rect`,`:first-child`),{shapeSvg:a,bbox:d,halfPadding:f,label:o}},`labelHelper`),m$=W(async(e,t,n)=>{let r=n.useHtmlLabels??cR(WR()),i=e.insert(`g`).attr(`class`,`label`).attr(`style`,n.labelStyle||``),a=await f$(i,hR(OX(t),WR()),{useHtmlLabels:r,width:n.width||WR()?.flowchart?.wrappingWidth,style:n.labelStyle,addSvgBackground:!!n.icon||!!n.img}),o=a.getBBox(),s=n.padding/2;if(cR(WR())){let e=a.children[0],t=YB(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}return r?i.attr(`transform`,`translate(`+-o.width/2+`, `+-o.height/2+`)`):i.attr(`transform`,`translate(0, `+-o.height/2+`)`),n.centerLabel&&i.attr(`transform`,`translate(`+-o.width/2+`, `+-o.height/2+`)`),i.insert(`rect`,`:first-child`),{shapeSvg:e,bbox:o,halfPadding:s,label:i}},`insertLabel`),Q=W((e,t)=>{let n=t.node().getBBox();e.width=n.width,e.height=n.height},`updateNodeBounds`),h$=W((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`);function g$(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}W(g$,`createPathFromPoints`);function _$(e,t,n,r,i,a){let o=[],s=n-e,c=r-t,l=s/a,u=2*Math.PI/l,d=t+c/2;for(let t=0;t<=50;t++){let n=e+t/50*s,r=d+i*Math.sin(u*(n-e));o.push({x:n,y:r})}return o}W(_$,`generateFullSineWavePoints`);function v$(e,t,n,r,i,a){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}W(v$,`generateCirclePoints`);function y$(e){let t=Array.from(e.childNodes).filter(e=>e.tagName===`path`),n=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),r=t.map(e=>e.getAttribute(`d`)).filter(e=>e!==null).join(` `);n.setAttribute(`d`,r);let i=t.find(e=>e.getAttribute(`fill`)!==`none`),a=t.find(e=>e.getAttribute(`stroke`)!==`none`),o=W((e,t)=>e?.getAttribute(t)??void 0,`getAttr`);if(i){let e={fill:o(i,`fill`),"fill-opacity":o(i,`fill-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&n.setAttribute(e,t)})}if(a){let e={stroke:o(a,`stroke`),"stroke-width":o(a,`stroke-width`)??`1`,"stroke-opacity":o(a,`stroke-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&n.setAttribute(e,t)})}let s=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return s.appendChild(n),s}W(y$,`mergePaths`);var b$=W((e,t)=>{var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2,c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=a===0?0:s*i/a,l=s):(i<0&&(o=-o),c=o,l=i===0?0:o*a/i),{x:n+c,y:r+l}},`intersectRect`),x$=W(async(e,t,n,r=!1,i=!1)=>{let a=t||``;typeof a==`object`&&(a=a[0]);let o=WR(),s=cR(o);return await f$(e,a,{style:n,isTitle:r,useHtmlLabels:s,markdown:!1,isNode:i,width:1/0},o)},`createLabel`),S$=W((e,t,n,r,i)=>[`M`,e+i,t,`H`,e+n-i,`A`,i,i,0,0,1,e+n,t+i,`V`,t+r-i,`A`,i,i,0,0,1,e+n-i,t+r,`H`,e+i,`A`,i,i,0,0,1,e,t+r-i,`V`,t+i,`A`,i,i,0,0,1,e+i,t,`Z`].join(` `),`createRoundedRectPathD`),C$=W(async(e,t)=>{G.info(`Creating subgraph rect for `,t.id,t);let n=WR(),{themeVariables:r,handDrawnSeed:i}=n,{clusterBkg:a,clusterBorder:o}=r,{labelStyles:s,nodeStyles:c,borderStyles:l,backgroundStyles:u}=X(t),d=e.insert(`g`).attr(`class`,`cluster `+t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),f=cR(n),p=d.insert(`g`).attr(`class`,`cluster-label `),m;m=t.labelType===`markdown`?await f$(p,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width}):await x$(p,t.label,t.labelStyle||``,!1,!0);let h=m.getBBox();if(cR(n)){let e=m.children[0],t=YB(m);h=e.getBoundingClientRect(),t.attr(`width`,h.width),t.attr(`height`,h.height)}let g=t.width<=h.width+t.padding?h.width+t.padding:t.width;t.width<=h.width+t.padding?t.diff=(g-t.width)/2-t.padding:t.diff=-t.padding;let _=t.height,v=t.x-g/2,y=t.y-_/2;G.trace(`Data `,t,JSON.stringify(t));let b;if(t.look===`handDrawn`){let e=k.svg(d),n=Z(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:i}),r=e.path(S$(v,y,g,_,0),n);b=d.insert(()=>(G.debug(`Rough node insert CXC`,r),r),`:first-child`),b.select(`path:nth-child(2)`).attr(`style`,l.join(`;`)),b.select(`path`).attr(`style`,u.join(`;`).replace(`fill`,`stroke`))}else b=d.insert(`rect`,`:first-child`),b.attr(`style`,c).attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,v).attr(`y`,y).attr(`width`,g).attr(`height`,_);let{subGraphTitleTopMargin:x}=MX(n);if(p.attr(`transform`,`translate(${t.x-h.width/2}, ${t.y-t.height/2+x})`),s){let e=p.select(`span`);e&&e.attr(`style`,s)}let S=b.node().getBBox();return t.offsetX=0,t.width=S.width,t.height=S.height,t.offsetY=h.height-t.padding/2,t.intersect=function(e){return b$(t,e)},{cluster:d,labelBBox:h}},`rect`),w$={rect:C$,squareRect:C$,roundedWithTitle:W(async(e,t)=>{let n=WR(),{themeVariables:r,handDrawnSeed:i}=n,{altBackground:a,compositeBackground:o,compositeTitleBackground:s,nodeBorder:c}=r,l=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-id`,t.id).attr(`data-look`,t.look),u=l.insert(`g`,`:first-child`),d=l.insert(`g`).attr(`class`,`cluster-label`),f=l.append(`rect`),p=await x$(d,t.label,t.labelStyle,void 0,!0),m=p.getBBox();if(cR(n)){let e=p.children[0],t=YB(p);m=e.getBoundingClientRect(),t.attr(`width`,m.width),t.attr(`height`,m.height)}let h=0*t.padding,g=h/2,_=(t.width<=m.width+t.padding?m.width+t.padding:t.width)+h;t.width<=m.width+t.padding?t.diff=(_-t.width)/2-t.padding:t.diff=-t.padding;let v=t.height+h,y=t.height+h-m.height-6,b=t.x-_/2,x=t.y-v/2;t.width=_;let S=t.y-t.height/2-g+m.height+2,C;if(t.look===`handDrawn`){let e=t.cssClasses.includes(`statediagram-cluster-alt`),n=k.svg(l),r=t.rx||t.ry?n.path(S$(b,x,_,v,10),{roughness:.7,fill:s,fillStyle:`solid`,stroke:c,seed:i}):n.rectangle(b,x,_,v,{seed:i});C=l.insert(()=>r,`:first-child`);let u=n.rectangle(b,S,_,y,{fill:e?a:o,fillStyle:e?`hachure`:`solid`,stroke:c,seed:i});C=l.insert(()=>r,`:first-child`),f=l.insert(()=>u)}else C=u.insert(`rect`,`:first-child`),C.attr(`class`,`outer`).attr(`x`,b).attr(`y`,x).attr(`width`,_).attr(`height`,v).attr(`data-look`,t.look),f.attr(`class`,`inner`).attr(`x`,b).attr(`y`,S).attr(`width`,_).attr(`height`,y);return d.attr(`transform`,`translate(${t.x-m.width/2}, ${x+1-(cR(n)?0:3)})`),t.height=C.node().getBBox().height,t.offsetX=0,t.offsetY=m.height-t.padding/2,t.labelBBox=m,t.intersect=function(e){return b$(t,e)},{cluster:l,labelBBox:m}},`roundedWithTitle`),noteGroup:W((e,t)=>{let n=e.insert(`g`).attr(`class`,`note-cluster`).attr(`id`,t.domId),r=n.insert(`rect`,`:first-child`),i=0*t.padding,a=i/2;r.attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,t.x-t.width/2-a).attr(`y`,t.y-t.height/2-a).attr(`width`,t.width+i).attr(`height`,t.height+i).attr(`fill`,`none`);let o=r.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(e){return b$(t,e)},{cluster:n,labelBBox:{width:0,height:0}}},`noteGroup`),divider:W((e,t)=>{let{themeVariables:n,handDrawnSeed:r}=WR(),{nodeBorder:i}=n,a=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),o=a.insert(`g`,`:first-child`),s=0*t.padding,c=t.width+s;t.diff=-t.padding;let l=t.height+s,u=t.x-c/2,d=t.y-l/2;t.width=c;let f;if(t.look===`handDrawn`){let e=k.svg(a).rectangle(u,d,c,l,{fill:`lightgrey`,roughness:.5,strokeLineDash:[5],stroke:i,seed:r});f=a.insert(()=>e,`:first-child`)}else{f=o.insert(`rect`,`:first-child`);let e=`outer`;e=(t.look,`divider`),f.attr(`class`,e).attr(`x`,u).attr(`y`,d).attr(`width`,c).attr(`height`,l).attr(`data-look`,t.look)}return t.height=f.node().getBBox().height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return b$(t,e)},{cluster:a,labelBBox:{}}},`divider`),kanbanSection:W(async(e,t)=>{G.info(`Creating subgraph rect for `,t.id,t);let n=WR(),{themeVariables:r,handDrawnSeed:i}=n,{clusterBkg:a,clusterBorder:o}=r,{labelStyles:s,nodeStyles:c,borderStyles:l,backgroundStyles:u}=X(t),d=e.insert(`g`).attr(`class`,`cluster `+t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),f=cR(n),p=d.insert(`g`).attr(`class`,`cluster-label `),m=await f$(p,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width}),h=m.getBBox();if(cR(n)){let e=m.children[0],t=YB(m);h=e.getBoundingClientRect(),t.attr(`width`,h.width),t.attr(`height`,h.height)}let g=t.width<=h.width+t.padding?h.width+t.padding:t.width;t.width<=h.width+t.padding?t.diff=(g-t.width)/2-t.padding:t.diff=-t.padding;let _=t.height,v=t.x-g/2,y=t.y-_/2;G.trace(`Data `,t,JSON.stringify(t));let b;if(t.look===`handDrawn`){let e=k.svg(d),n=Z(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:i}),r=e.path(S$(v,y,g,_,t.rx),n);b=d.insert(()=>(G.debug(`Rough node insert CXC`,r),r),`:first-child`),b.select(`path:nth-child(2)`).attr(`style`,l.join(`;`)),b.select(`path`).attr(`style`,u.join(`;`).replace(`fill`,`stroke`))}else b=d.insert(`rect`,`:first-child`),b.attr(`style`,c).attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,v).attr(`y`,y).attr(`width`,g).attr(`height`,_);let{subGraphTitleTopMargin:x}=MX(n);if(p.attr(`transform`,`translate(${t.x-h.width/2}, ${t.y-t.height/2+x})`),s){let e=p.select(`span`);e&&e.attr(`style`,s)}let S=b.node().getBBox();return t.offsetX=0,t.width=S.width,t.height=S.height,t.offsetY=h.height-t.padding/2,t.intersect=function(e){return b$(t,e)},{cluster:d,labelBBox:h}},`kanbanSection`)},T$=new Map,E$=W(async(e,t)=>{let n=await w$[t.shape||`rect`](e,t);return T$.set(t.id,n),n},`insertCluster`),D$=W(()=>{T$=new Map},`clear`);function O$(e,t){return e.intersect(t)}W(O$,`intersectNode`);var k$=O$;function A$(e,t,n,r){var i=e.x,a=e.y,o=i-r.x,s=a-r.y,c=Math.sqrt(t*t*s*s+n*n*o*o),l=Math.abs(t*n*o/c);r.x<i&&(l=-l);var u=Math.abs(t*n*s/c);return r.y<a&&(u=-u),{x:i+l,y:a+u}}W(A$,`intersectEllipse`);var j$=A$;function M$(e,t,n){return j$(e,t,t,n)}W(M$,`intersectCircle`);var N$=M$;function P$(e,t,n,r){{let i=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,s=i*n.x+a*n.y+o,c=i*r.x+a*r.y+o,l=1e-6;if(s!==0&&c!==0&&F$(s,c))return;let u=r.y-n.y,d=n.x-r.x,f=r.x*n.y-n.x*r.y,p=u*e.x+d*e.y+f,m=u*t.x+d*t.y+f;if(Math.abs(p)<l&&Math.abs(m)<l&&F$(p,m))return;let h=i*d-u*a;if(h===0)return;let g=Math.abs(h/2),_=a*f-d*o,v=_<0?(_-g)/h:(_+g)/h;return _=u*o-i*f,{x:v,y:_<0?(_-g)/h:(_+g)/h}}}W(P$,`intersectLine`);function F$(e,t){return e*t>0}W(F$,`sameSign`);var I$=P$;function L$(e,t,n){let r=e.x,i=e.y,a=[],o=1/0,s=1/0;typeof t.forEach==`function`?t.forEach(function(e){o=Math.min(o,e.x),s=Math.min(s,e.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let c=r-e.width/2-o,l=i-e.height/2-s;for(let r=0;r<t.length;r++){let i=t[r],o=t[r<t.length-1?r+1:0],s=I$(e,n,{x:c+i.x,y:l+i.y},{x:c+o.x,y:l+o.y});s&&a.push(s)}return a.length?(a.length>1&&a.sort(function(e,t){let r=e.x-n.x,i=e.y-n.y,a=Math.sqrt(r*r+i*i),o=t.x-n.x,s=t.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1}),a[0]):e}W(L$,`intersectPolygon`);var $={node:k$,circle:N$,ellipse:j$,polygon:L$,rect:b$};function R$(e,t){let{labelStyles:n}=X(t);t.labelStyle=n;let r=h$(t),i=r;r||(i=`anchor`);let a=e.insert(`g`).attr(`class`,i).attr(`id`,t.domId||t.id),{cssStyles:o}=t,s=k.svg(a),c=Z(t,{fill:`black`,stroke:`none`,fillStyle:`solid`});t.look!==`handDrawn`&&(c.roughness=0);let l=s.circle(0,0,2,c),u=a.insert(()=>l,`:first-child`);return u.attr(`class`,`anchor`).attr(`style`,AX(o)),Q(t,u),t.intersect=function(e){return G.info(`Circle intersect`,t,1,e),$.circle(t,1,e)},a}W(R$,`anchor`);function z$(e,t,n,r,i,a,o){let s=(e+n)/2,c=(t+r)/2,l=Math.atan2(r-t,n-e),u=(n-e)/2,d=(r-t)/2,f=u/i,p=d/a,m=Math.sqrt(f**2+p**2);if(m>1)throw Error(`The given radii are too small to create an arc between the points.`);let h=Math.sqrt(1-m**2),g=s+h*a*Math.sin(l)*(o?-1:1),_=c-h*i*Math.cos(l)*(o?-1:1),v=Math.atan2((t-_)/a,(e-g)/i),y=Math.atan2((r-_)/a,(n-g)/i)-v;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);let b=[];for(let e=0;e<20;e++){let t=v+e/19*y,n=g+i*Math.cos(t),r=_+a*Math.sin(t);b.push({x:n,y:r})}return b}W(z$,`generateArcPoints`);function B$(e,t,n){let[r,i]=[t,n].sort((e,t)=>t-e);return i*(1-Math.sqrt(1-(e/r/2)**2))}W(B$,`calculateArcSagitta`);async function V$(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,s=W(e=>e+o,`calcTotalHeight`),c=W(e=>{let t=e/2;return[t/(2.5+e/50),t]},`calcEllipseRadius`),{shapeSvg:l,bbox:u}=await p$(e,t,h$(t)),d=s(t?.height?t?.height:u.height),[f,p]=c(d),m=B$(d,f,p),h=(t?.width?t?.width:u.width)+a*2+m-m,g=d,{cssStyles:_}=t,v=[{x:h/2,y:-g/2},{x:-h/2,y:-g/2},...z$(-h/2,-g/2,-h/2,g/2,f,p,!1),{x:h/2,y:g/2},...z$(h/2,g/2,h/2,-g/2,f,p,!0)],y=k.svg(l),b=Z(t,{});t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let x=g$(v),S=y.path(x,b),C=l.insert(()=>S,`:first-child`);return C.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,r),C.attr(`transform`,`translate(${f/2}, 0)`),Q(t,C),t.intersect=function(e){return $.polygon(t,v,e)},l}W(V$,`bowTieRect`);function H$(e,t,n,r){return e.insert(`polygon`,`:first-child`).attr(`points`,r.map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`label-container`).attr(`transform`,`translate(`+-t/2+`,`+n/2+`)`)}W(H$,`insertPolygonShape`);var U$=12;async function W$(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?28:i,o=t.look===`neo`?24:i,{shapeSvg:s,bbox:c}=await p$(e,t,h$(t)),l=(t?.width??c.width)+(t.look===`neo`?a*2:a+U$),u=(t?.height??c.height)+(t.look===`neo`?o*2:o),d=l,f=-u,p=[{x:0+U$,y:f},{x:d,y:f},{x:d,y:0},{x:0,y:0},{x:0,y:f+U$},{x:0+U$,y:f}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=k.svg(s),n=Z(t,{}),r=g$(p),i=e.path(r,n);m=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=H$(s,l,u,p);return r&&m.attr(`style`,r),Q(t,m),t.intersect=function(e){return $.polygon(t,p,e)},s}W(W$,`card`);function G$(e,t){let{nodeStyles:n}=X(t);t.label=``;let r=e.insert(`g`).attr(`class`,h$(t)).attr(`id`,t.domId??t.id),{cssStyles:i}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=k.svg(r),c=Z(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=g$(o),u=s.path(l,c),d=r.insert(()=>u,`:first-child`);return i&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,i),n&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,n),t.width=28,t.height=28,t.intersect=function(e){return $.polygon(t,o,e)},r}W(G$,`choice`);async function K$(e,t,n){let{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,halfPadding:s}=await p$(e,t,h$(t)),c=n?.padding??s,l=t.look===`neo`?o.width/2+32:o.width/2+c,u,{cssStyles:d}=t;if(t.look===`handDrawn`){let e=k.svg(a),n=Z(t,{}),r=e.circle(0,0,l*2,n);u=a.insert(()=>r,`:first-child`),u.attr(`class`,`basic label-container`).attr(`style`,AX(d))}else u=a.insert(`circle`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,i).attr(`r`,l).attr(`cx`,0).attr(`cy`,0);return Q(t,u),t.calcIntersect=function(e,t){let n=e.width/2;return $.circle(e,n,t)},t.intersect=function(e){return G.info(`Circle intersect`,t,l,e),$.circle(t,l,e)},a}W(K$,`circle`);function q$(e){let t=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),r=e*2,i={x:r/2*t,y:r/2*n},a={x:-(r/2)*t,y:r/2*n},o={x:-(r/2)*t,y:-(r/2)*n},s={x:r/2*t,y:-(r/2)*n};return`M ${a.x},${a.y} L ${s.x},${s.y}
|
|
460
|
+
M ${i.x},${i.y} L ${o.x},${o.y}`}W(q$,`createLine`);function J$(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n,t.label=``;let i=e.insert(`g`).attr(`class`,h$(t)).attr(`id`,t.domId??t.id),a=Math.max(30,t?.width??0),{cssStyles:o}=t,s=k.svg(i),c=Z(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=s.circle(0,0,a*2,c),u=q$(a),d=s.path(u,c),f=i.insert(()=>l,`:first-child`);return f.insert(()=>d),f.attr(`class`,`outer-path`),o&&t.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,o),r&&t.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,r),Q(t,f),t.intersect=function(e){return G.info(`crossedCircle intersect`,t,{radius:a,point:e}),$.circle(t,a,e)},i}W(J$,`crossedCircle`);function Y$(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}W(Y$,`generateCirclePoints`);async function X$(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await p$(e,t,h$(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+s,u=a.height+c,d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...Y$(l/2,-u/2,d,30,-90,0),{x:-l/2-d,y:d},...Y$(l/2+d*2,-d,d,20,-180,-270),...Y$(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:-u/2},...Y$(l/2,u/2,d,20,0,90)],m=[{x:l/2,y:-u/2-d},{x:-l/2,y:-u/2-d},...Y$(l/2,-u/2,d,20,-90,0),{x:-l/2-d,y:-d},...Y$(l/2+l*.1,-d,d,20,-180,-270),...Y$(l/2+l*.1,d,d,20,-90,-180),{x:-l/2-d,y:u/2},...Y$(l/2,u/2,d,20,0,90),{x:-l/2,y:u/2+d},{x:l/2,y:u/2+d}],h=k.svg(i),g=Z(t,{fill:`none`});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=g$(p).replace(`Z`,``),v=h.path(_,g),y=g$(m),b=h.path(y,{...g}),x=i.insert(`g`,`:first-child`);return x.insert(()=>b,`:first-child`).attr(`stroke-opacity`,0),x.insert(()=>v,`:first-child`),x.attr(`class`,`text`),f&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),x.attr(`transform`,`translate(${d}, 0)`),o.attr(`transform`,`translate(${-l/2+d-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Q(t,x),t.intersect=function(e){return $.polygon(t,m,e)},i}W(X$,`curlyBraceLeft`);function Z$(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:a,y:l})}return o}W(Z$,`generateCirclePoints`);async function Q$(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await p$(e,t,h$(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+(t.look===`neo`?s*2:s),u=a.height+(t.look===`neo`?c*2:c),d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...Z$(l/2,-u/2,d,20,-90,0),{x:l/2+d,y:-d},...Z$(l/2+d*2,-d,d,20,-180,-270),...Z$(l/2+d*2,d,d,20,-90,-180),{x:l/2+d,y:u/2},...Z$(l/2,u/2,d,20,0,90)],m=[{x:-l/2,y:-u/2-d},{x:l/2,y:-u/2-d},...Z$(l/2,-u/2,d,20,-90,0),{x:l/2+d,y:-d},...Z$(l/2+d*2,-d,d,20,-180,-270),...Z$(l/2+d*2,d,d,20,-90,-180),{x:l/2+d,y:u/2},...Z$(l/2,u/2,d,20,0,90),{x:l/2,y:u/2+d},{x:-l/2,y:u/2+d}],h=k.svg(i),g=Z(t,{fill:`none`});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=g$(p).replace(`Z`,``),v=h.path(_,g),y=g$(m),b=h.path(y,{...g}),x=i.insert(`g`,`:first-child`);return x.insert(()=>b,`:first-child`).attr(`stroke-opacity`,0),x.insert(()=>v,`:first-child`),x.attr(`class`,`text`),f&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),x.attr(`transform`,`translate(${-d}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Q(t,x),t.intersect=function(e){return $.polygon(t,m,e)},i}W(Q$,`curlyBraceRight`);function $$(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}W($$,`generateCirclePoints`);async function e1(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await p$(e,t,h$(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+(t.look===`neo`?s*2:s),u=a.height+(t.look===`neo`?c*2:c),d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...$$(l/2,-u/2,d,30,-90,0),{x:-l/2-d,y:d},...$$(l/2+d*2,-d,d,20,-180,-270),...$$(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:-u/2},...$$(l/2,u/2,d,20,0,90)],m=[...$$(-l/2+d+d/2,-u/2,d,20,-90,-180),{x:l/2-d/2,y:d},...$$(-l/2-d/2,-d,d,20,0,90),...$$(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...$$(-l/2+d+d/2,u/2,d,30,-180,-270)],h=[{x:l/2,y:-u/2-d},{x:-l/2,y:-u/2-d},...$$(l/2,-u/2,d,20,-90,0),{x:-l/2-d,y:-d},...$$(l/2+d*2,-d,d,20,-180,-270),...$$(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:u/2},...$$(l/2,u/2,d,20,0,90),{x:-l/2,y:u/2+d},{x:l/2-d-d/2,y:u/2+d},...$$(-l/2+d+d/2,-u/2,d,20,-90,-180),{x:l/2-d/2,y:d},...$$(-l/2-d/2,-d,d,20,0,90),...$$(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...$$(-l/2+d+d/2,u/2,d,30,-180,-270)],g=k.svg(i),_=Z(t,{fill:`none`});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let v=g$(p).replace(`Z`,``),y=g.path(v,_),b=g$(m).replace(`Z`,``),x=g.path(b,_),S=g$(h),C=g.path(S,{..._}),w=i.insert(`g`,`:first-child`);return w.insert(()=>C,`:first-child`).attr(`stroke-opacity`,0),w.insert(()=>y,`:first-child`),w.insert(()=>x,`:first-child`),w.attr(`class`,`text`),f&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),w.attr(`transform`,`translate(${d-d/4}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Q(t,w),t.intersect=function(e){return $.polygon(t,h,e)},i}W(e1,`curlyBraces`);async function t1(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await p$(e,t,h$(t)),l=Math.max(20,(c.width+a*2)*1.25,t?.width??0),u=Math.max(5,c.height+o*2,t?.height??0),d=u/2,{cssStyles:f}=t,p=k.svg(s),m=Z(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=l,g=u,_=h-d,v=g/4,y=[{x:_,y:0},{x:v,y:0},{x:0,y:g/2},{x:v,y:g},{x:_,y:g},...v$(-_,-g/2,d,50,270,90)],b=g$(y),x=p.path(b,m),S=s.insert(()=>x,`:first-child`);return S.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&S.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&S.selectChildren(`path`).attr(`style`,r),S.attr(`transform`,`translate(${-l/2}, ${-u/2})`),Q(t,S),t.intersect=function(e){return $.polygon(t,y,e)},s}W(t1,`curvedTrapezoid`);var n1=W((e,t,n,r,i,a)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createCylinderPathD`),r1=W((e,t,n,r,i,a)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createOuterCylinderPathD`),i1=W((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),a1=8,o1=8;async function s1(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?24:i,o=t.look===`neo`?24:i;if(t.width||t.height){let e=t.width??0;t.width=(t.width??0)-o,t.width<o1&&(t.width=o1);let n=e/2/(2.5+e/50);t.height=(t.height??0)-a-n*3,t.height<a1&&(t.height=a1)}let{shapeSvg:s,bbox:c,label:l}=await p$(e,t,h$(t)),u=(t.width?t.width:c.width)+o,d=u/2,f=d/(2.5+u/50),p=(t.height?t.height:c.height)+a+f,m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=k.svg(s),n=r1(0,0,u,p,d,f),r=i1(0,f,u,p,d,f),i=Z(t,{}),a=e.path(n,i),o=e.path(r,Z(t,{fill:`none`}));m=s.insert(()=>o,`:first-child`),m=s.insert(()=>a,`:first-child`),m.attr(`class`,`basic label-container`),h&&m.attr(`style`,h)}else{let e=n1(0,0,u,p,d,f);m=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,AX(h)).attr(`style`,r)}return m.attr(`label-offset-y`,f),m.attr(`transform`,`translate(${-u/2}, ${-(p/2+f)})`),Q(t,m),l.attr(`transform`,`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+(t.padding??0)/1.5-(c.y-(c.top??0))})`),t.intersect=function(e){let n=$.rect(t,e),r=n.x-(t.x??0);if(d!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-f)){let i=f*f*(1-r*r/(d*d));i>0&&(i=Math.sqrt(i)),i=f-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},s}W(s1,`cylinder`);async function c1(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?16:t.padding??0,{shapeSvg:o,bbox:s,label:c}=await p$(e,t,h$(t)),l=s.width+i,u=s.height+a,d=u*.2,f=-l/2,p=-u/2-d/2,{cssStyles:m}=t,h=k.svg(o),g=Z(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{x:f,y:p+d},{x:-f,y:p+d},{x:-f,y:-p},{x:f,y:-p},{x:f,y:p},{x:-f,y:p},{x:-f,y:p+d}],v=h.polygon(_.map(e=>[e.x,e.y]),g),y=o.insert(()=>v,`:first-child`);return y.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${f+(t.padding??0)/2-(s.x-(s.left??0))}, ${p+d+(t.padding??0)/2-(s.y-(s.top??0))})`),Q(t,y),t.intersect=function(e){return $.rect(t,e)},o}W(c1,`dividedRectangle`);async function l1(e,t){let{labelStyles:n,nodeStyles:r}=X(t),i=t.look===`neo`?12:5;t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?16:a,{shapeSvg:s,bbox:c}=await p$(e,t,h$(t)),l=(t?.width?t?.width/2:c.width/2)+(o??0),u=l-i,d,{cssStyles:f}=t;if(t.look===`handDrawn`){let e=k.svg(s),n=Z(t,{roughness:.2,strokeWidth:2.5}),r=Z(t,{roughness:.2,strokeWidth:1.5}),i=e.circle(0,0,l*2,n),a=e.circle(0,0,u*2,r);d=s.insert(`g`,`:first-child`),d.attr(`class`,AX(t.cssClasses)).attr(`style`,AX(f)),d.node()?.appendChild(i),d.node()?.appendChild(a)}else{d=s.insert(`g`,`:first-child`);let e=d.insert(`circle`,`:first-child`),t=d.insert(`circle`);d.attr(`class`,`basic label-container`).attr(`style`,r),e.attr(`class`,`outer-circle`).attr(`style`,r).attr(`r`,l).attr(`cx`,0).attr(`cy`,0),t.attr(`class`,`inner-circle`).attr(`style`,r).attr(`r`,u).attr(`cx`,0).attr(`cy`,0)}return Q(t,d),t.intersect=function(e){return G.info(`DoubleCircle intersect`,t,l,e),$.circle(t,l,e)},s}W(l1,`doublecircle`);function u1(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=X(t);t.label=``,t.labelStyle=r;let a=e.insert(`g`).attr(`class`,h$(t)).attr(`id`,t.domId??t.id),{cssStyles:o}=t,s=k.svg(a),{nodeBorder:c}=n,l=Z(t,{fillStyle:`solid`});t.look!==`handDrawn`&&(l.roughness=0);let u=s.circle(0,0,14,l),d=a.insert(()=>u,`:first-child`);return d.selectAll(`path`).attr(`style`,`fill: ${c} !important;`),o&&o.length>0&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,o),i&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,i),Q(t,d),t.intersect=function(e){return G.info(`filledCircle intersect`,t,{radius:7,point:e}),$.circle(t,7,e)},a}W(u1,`filledCircle`);var d1=10,f1=10;async function p1(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?i*2:i;(t.width||t.height)&&(t.height=t?.height??0,t.height<d1&&(t.height=d1),t.width=(t?.width??0)-a-a/2,t.width<f1&&(t.width=f1));let{shapeSvg:o,bbox:s,label:c}=await p$(e,t,h$(t)),l=(t?.width?t?.width:s.width)+(a??0),u=t?.height?t?.height:l+s.height,d=u,f=[{x:0,y:-u},{x:d,y:-u},{x:d/2,y:0}],{cssStyles:p}=t,m=k.svg(o),h=Z(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=g$(f),_=m.path(g,h),v=o.insert(()=>_,`:first-child`).attr(`transform`,`translate(${-u/2}, ${u/2})`).attr(`class`,`outer-path`);return p&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,r),t.width=l,t.height=u,Q(t,v),c.attr(`transform`,`translate(${-s.width/2-(s.x-(s.left??0))}, ${-u/2+(t.padding??0)/2+(s.y-(s.top??0))})`),t.intersect=function(e){return G.info(`Triangle intersect`,t,f,e),$.polygon(t,f,e)},o}W(p1,`flippedTriangle`);function m1(e,t,{dir:n,config:{state:r,themeVariables:i}}){let{nodeStyles:a}=X(t);t.label=``;let o=e.insert(`g`).attr(`class`,h$(t)).attr(`id`,t.domId??t.id),{cssStyles:s}=t,c=Math.max(70,t?.width??0),l=Math.max(10,t?.height??0);n===`LR`&&(c=Math.max(10,t?.width??0),l=Math.max(70,t?.height??0));let u=-1*c/2,d=-1*l/2,f=k.svg(o),p=Z(t,{stroke:i.lineColor,fill:i.lineColor});t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let m=f.rectangle(u,d,c,l,p),h=o.insert(()=>m,`:first-child`);s&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,s),a&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,a),Q(t,h);let g=r?.padding??0;return t.width&&t.height&&(t.width+=g/2||0,t.height+=g/2||0),t.intersect=function(e){return $.rect(t,e)},o}W(m1,`forkJoin`);async function h1(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-a*2,t.height<10&&(t.height=10),t.width=(t?.width??0)-i*2,t.width<15&&(t.width=15));let{shapeSvg:o,bbox:s}=await p$(e,t,h$(t)),c=(t?.width?t?.width:Math.max(15,s.width))+i*2,l=(t?.height?t?.height:Math.max(10,s.height))+a*2,u=l/2,{cssStyles:d}=t,f=k.svg(o),p=Z(t,{});t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let m=[{x:-c/2,y:-l/2},{x:c/2-u,y:-l/2},...v$(-c/2+u,0,u,50,90,270),{x:c/2-u,y:l/2},{x:-c/2,y:l/2}],h=g$(m),g=f.path(h,p),_=o.insert(()=>g,`:first-child`);return _.attr(`class`,`basic label-container outer-path`),d&&t.look!==`handDrawn`&&_.selectChildren(`path`).attr(`style`,d),r&&t.look!==`handDrawn`&&_.selectChildren(`path`).attr(`style`,r),Q(t,_),t.intersect=function(e){return G.info(`Pill intersect`,t,{radius:u,point:e}),$.polygon(t,m,e)},o}W(h1,`halfRoundedRectangle`);var g1=W((e,t,n,r,i)=>[`M${e+i},${t}`,`L${e+n-i},${t}`,`L${e+n},${t-r/2}`,`L${e+n-i},${t-r}`,`L${e+i},${t-r}`,`L${e},${t-r/2}`,`Z`].join(` `),`createHexagonPathD`);async function _1(e,t){let{labelStyles:n,nodeStyles:r}=X(t),i=t.look===`neo`?3.5:4;t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?70:a,s=t.look===`neo`?32:a;if(t.width||t.height){let e=(t.height??0)/i;t.width=(t?.width??0)-2*e-s,t.height=(t.height??0)-o}let{shapeSvg:c,bbox:l}=await p$(e,t,h$(t)),u=(t?.height?t?.height:l.height)+o,d=u/i,f=(t?.width?t?.width:l.width)+2*d+s,p=[{x:d,y:0},{x:f-d,y:0},{x:f,y:-u/2},{x:f-d,y:-u},{x:d,y:-u},{x:0,y:-u/2}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=k.svg(c),n=Z(t,{}),r=g1(0,0,f,u,d),i=e.path(r,n);m=c.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-f/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=H$(c,f,u,p);return r&&m.attr(`style`,r),t.width=f,t.height=u,Q(t,m),t.intersect=function(e){return $.polygon(t,p,e)},c}W(_1,`hexagon`);async function v1(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.label=``,t.labelStyle=n;let{shapeSvg:i}=await p$(e,t,h$(t)),a=Math.max(30,t?.width??0),o=Math.max(30,t?.height??0),{cssStyles:s}=t,c=k.svg(i),l=Z(t,{});t.look!==`handDrawn`&&(l.roughness=0,l.fillStyle=`solid`);let u=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],d=g$(u),f=c.path(d,l),p=i.insert(()=>f,`:first-child`);return p.attr(`class`,`basic label-container outer-path`),s&&t.look!==`handDrawn`&&p.selectChildren(`path`).attr(`style`,s),r&&t.look!==`handDrawn`&&p.selectChildren(`path`).attr(`style`,r),p.attr(`transform`,`translate(${-a/2}, ${-o/2})`),Q(t,p),t.intersect=function(e){return G.info(`Pill intersect`,t,{points:u}),$.polygon(t,u,e)},i}W(v1,`hourglass`);async function y1(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:i}=X(t);t.labelStyle=i;let a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),c=r?.wrappingWidth;t.width=Math.max(s,c??0);let{shapeSvg:l,bbox:u,label:d}=await p$(e,t,`icon-shape default`),f=t.pos===`t`,p=s,m=s,{nodeBorder:h}=n,{stylesMap:g}=FX(t),_=-m/2,v=-p/2,y=t.label?8:0,b=k.svg(l),x=Z(t,{stroke:`none`,fill:`none`});t.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let S=b.rectangle(_,v,m,p,x),C=Math.max(m,u.width),w=p+u.height+y,T=b.rectangle(-C/2,-w/2,C,w,{...x,fill:`transparent`,stroke:`none`}),E=l.insert(()=>S,`:first-child`),D=l.insert(()=>T);if(t.icon){let e=l.append(`g`);e.html(`<g>${await GQ(t.icon,{height:s,width:s,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${f?u.height/2+y/2-i/2-o:-u.height/2-y/2-i/2-o})`),e.attr(`style`,`color: ${g.get(`stroke`)??h};`)}return d.attr(`transform`,`translate(${-u.width/2-(u.x-(u.left??0))},${f?-w/2:w/2-u.height})`),E.attr(`transform`,`translate(0,${f?u.height/2+y/2:-u.height/2-y/2})`),Q(t,D),t.intersect=function(e){if(G.info(`iconSquare intersect`,t,e),!t.label)return $.rect(t,e);let n=t.x??0,r=t.y??0,i=t.height??0,a=[];return a=f?[{x:n-u.width/2,y:r-i/2},{x:n+u.width/2,y:r-i/2},{x:n+u.width/2,y:r-i/2+u.height+y},{x:n+m/2,y:r-i/2+u.height+y},{x:n+m/2,y:r+i/2},{x:n-m/2,y:r+i/2},{x:n-m/2,y:r-i/2+u.height+y},{x:n-u.width/2,y:r-i/2+u.height+y}]:[{x:n-m/2,y:r-i/2},{x:n+m/2,y:r-i/2},{x:n+m/2,y:r-i/2+p},{x:n+u.width/2,y:r-i/2+p},{x:n+u.width/2/2,y:r+i/2},{x:n-u.width/2,y:r+i/2},{x:n-u.width/2,y:r-i/2+p},{x:n-m/2,y:r-i/2+p}],$.polygon(t,a,e)},l}W(y1,`icon`);async function b1(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:i}=X(t);t.labelStyle=i;let a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),c=r?.wrappingWidth;t.width=Math.max(s,c??0);let{shapeSvg:l,bbox:u,label:d}=await p$(e,t,`icon-shape default`),f=t.label?8:0,p=t.pos===`t`,{nodeBorder:m,mainBkg:h}=n,{stylesMap:g}=FX(t),_=k.svg(l),v=Z(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`),v.stroke=g.get(`fill`)??h;let y=l.append(`g`);t.icon&&y.html(`<g>${await GQ(t.icon,{height:s,width:s,fallbackPrefix:``})}</g>`);let b=y.node().getBBox(),x=b.width,S=b.height,C=b.x,w=b.y,T=Math.max(x,S)*Math.SQRT2+40,E=_.circle(0,0,T,v),D=Math.max(T,u.width),O=T+u.height+f,A=_.rectangle(-D/2,-O/2,D,O,{...v,fill:`transparent`,stroke:`none`}),ee=l.insert(()=>E,`:first-child`),j=l.insert(()=>A);return y.attr(`transform`,`translate(${-x/2-C},${p?u.height/2+f/2-S/2-w:-u.height/2-f/2-S/2-w})`),y.attr(`style`,`color: ${g.get(`stroke`)??m};`),d.attr(`transform`,`translate(${-u.width/2-(u.x-(u.left??0))},${p?-O/2:O/2-u.height})`),ee.attr(`transform`,`translate(0,${p?u.height/2+f/2:-u.height/2-f/2})`),Q(t,j),t.intersect=function(e){return G.info(`iconSquare intersect`,t,e),$.rect(t,e)},l}W(b1,`iconCircle`);async function x1(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:i}=X(t);t.labelStyle=i;let a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),c=r?.wrappingWidth;t.width=Math.max(s,c??0);let{shapeSvg:l,bbox:u,halfPadding:d,label:f}=await p$(e,t,`icon-shape default`),p=t.pos===`t`,m=s+d*2,h=s+d*2,{nodeBorder:g,mainBkg:_}=n,{stylesMap:v}=FX(t),y=-h/2,b=-m/2,x=t.label?8:0,S=k.svg(l),C=Z(t,{});t.look!==`handDrawn`&&(C.roughness=0,C.fillStyle=`solid`),C.stroke=v.get(`fill`)??_;let w=S.path(S$(y,b,h,m,5),C),T=Math.max(h,u.width),E=m+u.height+x,D=S.rectangle(-T/2,-E/2,T,E,{...C,fill:`transparent`,stroke:`none`}),O=l.insert(()=>w,`:first-child`).attr(`class`,`icon-shape2`),A=l.insert(()=>D);if(t.icon){let e=l.append(`g`);e.html(`<g>${await GQ(t.icon,{height:s,width:s,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${p?u.height/2+x/2-i/2-o:-u.height/2-x/2-i/2-o})`),e.attr(`style`,`color: ${v.get(`stroke`)??g};`)}return f.attr(`transform`,`translate(${-u.width/2-(u.x-(u.left??0))},${p?-E/2:E/2-u.height})`),O.attr(`transform`,`translate(0,${p?u.height/2+x/2:-u.height/2-x/2})`),Q(t,A),t.intersect=function(e){if(G.info(`iconSquare intersect`,t,e),!t.label)return $.rect(t,e);let n=t.x??0,r=t.y??0,i=t.height??0,a=[];return a=p?[{x:n-u.width/2,y:r-i/2},{x:n+u.width/2,y:r-i/2},{x:n+u.width/2,y:r-i/2+u.height+x},{x:n+h/2,y:r-i/2+u.height+x},{x:n+h/2,y:r+i/2},{x:n-h/2,y:r+i/2},{x:n-h/2,y:r-i/2+u.height+x},{x:n-u.width/2,y:r-i/2+u.height+x}]:[{x:n-h/2,y:r-i/2},{x:n+h/2,y:r-i/2},{x:n+h/2,y:r-i/2+m},{x:n+u.width/2,y:r-i/2+m},{x:n+u.width/2/2,y:r+i/2},{x:n-u.width/2,y:r+i/2},{x:n-u.width/2,y:r-i/2+m},{x:n-h/2,y:r-i/2+m}],$.polygon(t,a,e)},l}W(x1,`iconRounded`);async function S1(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:i}=X(t);t.labelStyle=i;let a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),c=r?.wrappingWidth;t.width=Math.max(s,c??0);let{shapeSvg:l,bbox:u,halfPadding:d,label:f}=await p$(e,t,`icon-shape default`),p=t.pos===`t`,m=s+d*2,h=s+d*2,{nodeBorder:g,mainBkg:_}=n,{stylesMap:v}=FX(t),y=-h/2,b=-m/2,x=t.label?8:0,S=k.svg(l),C=Z(t,{});t.look!==`handDrawn`&&(C.roughness=0,C.fillStyle=`solid`),C.stroke=v.get(`fill`)??_;let w=S.path(S$(y,b,h,m,.1),C),T=Math.max(h,u.width),E=m+u.height+x,D=S.rectangle(-T/2,-E/2,T,E,{...C,fill:`transparent`,stroke:`none`}),O=l.insert(()=>w,`:first-child`),A=l.insert(()=>D);if(t.icon){let e=l.append(`g`);e.html(`<g>${await GQ(t.icon,{height:s,width:s,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${p?u.height/2+x/2-i/2-o:-u.height/2-x/2-i/2-o})`),e.attr(`style`,`color: ${v.get(`stroke`)??g};`)}return f.attr(`transform`,`translate(${-u.width/2-(u.x-(u.left??0))},${p?-E/2:E/2-u.height})`),O.attr(`transform`,`translate(0,${p?u.height/2+x/2:-u.height/2-x/2})`),Q(t,A),t.intersect=function(e){if(G.info(`iconSquare intersect`,t,e),!t.label)return $.rect(t,e);let n=t.x??0,r=t.y??0,i=t.height??0,a=[];return a=p?[{x:n-u.width/2,y:r-i/2},{x:n+u.width/2,y:r-i/2},{x:n+u.width/2,y:r-i/2+u.height+x},{x:n+h/2,y:r-i/2+u.height+x},{x:n+h/2,y:r+i/2},{x:n-h/2,y:r+i/2},{x:n-h/2,y:r-i/2+u.height+x},{x:n-u.width/2,y:r-i/2+u.height+x}]:[{x:n-h/2,y:r-i/2},{x:n+h/2,y:r-i/2},{x:n+h/2,y:r-i/2+m},{x:n+u.width/2,y:r-i/2+m},{x:n+u.width/2/2,y:r+i/2},{x:n-u.width/2,y:r+i/2},{x:n-u.width/2,y:r-i/2+m},{x:n-h/2,y:r-i/2+m}],$.polygon(t,a,e)},l}W(S1,`iconSquare`);async function C1(e,t,{config:{flowchart:n}}){let r=new Image;r.src=t?.img??``,await r.decode();let i=Number(r.naturalWidth.toString().replace(`px`,``)),a=Number(r.naturalHeight.toString().replace(`px`,``));t.imageAspectRatio=i/a;let{labelStyles:o}=X(t);t.labelStyle=o;let s=n?.wrappingWidth;t.defaultWidth=n?.wrappingWidth;let c=Math.max(t.label?s??0:0,t?.assetWidth??i),l=t.constraint===`on`&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:c,u=t.constraint===`on`?l/t.imageAspectRatio:t?.assetHeight??a;t.width=Math.max(l,s??0);let{shapeSvg:d,bbox:f,label:p}=await p$(e,t,`image-shape default`),m=t.pos===`t`,h=-l/2,g=-u/2,_=t.label?8:0,v=k.svg(d),y=Z(t,{});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let b=v.rectangle(h,g,l,u,y),x=Math.max(l,f.width),S=u+f.height+_,C=v.rectangle(-x/2,-S/2,x,S,{...y,fill:`none`,stroke:`none`}),w=d.insert(()=>b,`:first-child`),T=d.insert(()=>C);if(t.img){let e=d.append(`image`);e.attr(`href`,t.img),e.attr(`width`,l),e.attr(`height`,u),e.attr(`preserveAspectRatio`,`none`),e.attr(`transform`,`translate(${-l/2},${m?S/2-u:-S/2})`)}return p.attr(`transform`,`translate(${-f.width/2-(f.x-(f.left??0))},${m?-u/2-f.height/2-_/2:u/2-f.height/2+_/2})`),w.attr(`transform`,`translate(0,${m?f.height/2+_/2:-f.height/2-_/2})`),Q(t,T),t.intersect=function(e){if(G.info(`iconSquare intersect`,t,e),!t.label)return $.rect(t,e);let n=t.x??0,r=t.y??0,i=t.height??0,a=[];return a=m?[{x:n-f.width/2,y:r-i/2},{x:n+f.width/2,y:r-i/2},{x:n+f.width/2,y:r-i/2+f.height+_},{x:n+l/2,y:r-i/2+f.height+_},{x:n+l/2,y:r+i/2},{x:n-l/2,y:r+i/2},{x:n-l/2,y:r-i/2+f.height+_},{x:n-f.width/2,y:r-i/2+f.height+_}]:[{x:n-l/2,y:r-i/2},{x:n+l/2,y:r-i/2},{x:n+l/2,y:r-i/2+u},{x:n+f.width/2,y:r-i/2+u},{x:n+f.width/2/2,y:r+i/2},{x:n-f.width/2,y:r+i/2},{x:n-f.width/2,y:r-i/2+u},{x:n-l/2,y:r-i/2+u}],$.polygon(t,a,e)},d}W(C1,`imageSquare`);async function w1(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await p$(e,t,h$(t)),l=Math.max(c.width+(o??0)*2,t?.width??0),u=Math.max(c.height+(a??0)*2,t?.height??0),d=[{x:0,y:0},{x:l,y:0},{x:l+3*u/6,y:-u},{x:-3*u/6,y:-u}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=k.svg(s),n=Z(t,{}),r=g$(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),p&&f.attr(`style`,p)}else f=H$(s,l,u,d);return r&&f.attr(`style`,r),t.width=l,t.height=u,Q(t,f),t.intersect=function(e){return $.polygon(t,d,e)},s}W(w1,`inv_trapezoid`);async function T1(e,t,n){let{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;let{shapeSvg:a,bbox:o}=await p$(e,t,h$(t)),s=Math.max(o.width+n.labelPaddingX*2,t?.width||0),c=Math.max(o.height+n.labelPaddingY*2,t?.height||0),l=-s/2,u=-c/2,d,{rx:f,ry:p}=t,{cssStyles:m}=t;if(n?.rx&&n.ry&&(f=n.rx,p=n.ry),t.look===`handDrawn`){let e=k.svg(a),n=Z(t,{}),r=f||p?e.path(S$(l,u,s,c,f||0),n):e.rectangle(l,u,s,c,n);d=a.insert(()=>r,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,AX(m))}else d=a.insert(`rect`,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,i).attr(`rx`,AX(f)).attr(`ry`,AX(p)).attr(`x`,l).attr(`y`,u).attr(`width`,s).attr(`height`,c);return Q(t,d),t.calcIntersect=function(e,t){return $.rect(e,t)},t.intersect=function(e){return $.rect(t,e)},a}W(T1,`drawRect`);async function E1(e,t){let{shapeSvg:n,bbox:r,label:i}=await p$(e,t,`label`),a=n.insert(`rect`,`:first-child`);return a.attr(`width`,.1).attr(`height`,.1),n.attr(`class`,`label edgeLabel`),i.attr(`transform`,`translate(${-(r.width/2)-(r.x-(r.left??0))}, ${-(r.height/2)-(r.y-(r.top??0))})`),Q(t,a),t.intersect=function(e){return $.rect(t,e)},n}W(E1,`labelRect`);async function D1(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await p$(e,t,h$(t)),l=(t?.height??c.height)+a,u=(t?.width??c.width)+o,d=[{x:0,y:0},{x:u+3*l/6,y:0},{x:u,y:-l},{x:-(3*l)/6,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=k.svg(s),n=Z(t,{}),r=g$(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=H$(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,Q(t,f),t.intersect=function(e){return $.polygon(t,d,e)},s}W(D1,`lean_left`);async function O1(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await p$(e,t,h$(t)),l=(t?.height??c.height)+a,u=(t?.width??c.width)+o,d=[{x:-3*l/6,y:0},{x:u,y:0},{x:u+3*l/6,y:-l},{x:0,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=k.svg(s),n=Z(t,{}),r=g$(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=H$(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,Q(t,f),t.intersect=function(e){return $.polygon(t,d,e)},s}W(O1,`lean_right`);function k1(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.label=``,t.labelStyle=n;let i=e.insert(`g`).attr(`class`,h$(t)).attr(`id`,t.domId??t.id),{cssStyles:a}=t,o=Math.max(35,t?.width??0),s=Math.max(35,t?.height??0),c=[{x:o,y:0},{x:0,y:s+7/2},{x:o-14,y:s+7/2},{x:0,y:2*s},{x:o,y:s-7/2},{x:14,y:s-7/2}],l=k.svg(i),u=Z(t,{});t.look!==`handDrawn`&&(u.roughness=0,u.fillStyle=`solid`);let d=g$(c),f=l.path(d,u),p=i.insert(()=>f,`:first-child`);return p.attr(`class`,`outer-path`),a&&t.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,a),r&&t.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,r),p.attr(`transform`,`translate(-${o/2},${-s})`),Q(t,p),t.intersect=function(e){return G.info(`lightningBolt intersect`,t,e),$.polygon(t,c,e)},i}W(k1,`lightningBolt`);var A1=W((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createCylinderPathD`),j1=W((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createOuterCylinderPathD`),M1=W((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),N1=10,P1=10;async function F1(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?24:i;if(t.width||t.height){let e=t.width??0;t.width=(t.width??0)-a,t.width<P1&&(t.width=P1);let n=e/2/(2.5+e/50);t.height=(t.height??0)-o-n*3,t.height<N1&&(t.height=N1)}let{shapeSvg:s,bbox:c,label:l}=await p$(e,t,h$(t)),u=(t?.width?t?.width:c.width)+a*2,d=u/2,f=d/(2.5+u/50),p=(t?.height?t?.height:c.height)+f+o*2,m=p*.1,h,{cssStyles:g}=t;if(t.look===`handDrawn`){let e=k.svg(s),n=j1(0,0,u,p,d,f,m),r=M1(0,f,u,p,d,f),i=Z(t,{}),a=e.path(n,i),o=e.path(r,i);s.insert(()=>o,`:first-child`).attr(`class`,`line`),h=s.insert(()=>a,`:first-child`),h.attr(`class`,`basic label-container`),g&&h.attr(`style`,g)}else{let e=A1(0,0,u,p,d,f,m);h=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,AX(g)).attr(`style`,r)}return h.attr(`label-offset-y`,f),h.attr(`transform`,`translate(${-u/2}, ${-(p/2+f)})`),Q(t,h),l.attr(`transform`,`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+f-(c.y-(c.top??0))})`),t.intersect=function(e){let n=$.rect(t,e),r=n.x-(t.x??0);if(d!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-f)){let i=f*f*(1-r*r/(d*d));i>0&&(i=Math.sqrt(i)),i=f-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},s}W(F1,`linedCylinder`);async function I1(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=(t.width??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10));let{shapeSvg:s,bbox:c,label:l}=await p$(e,t,h$(t)),u=(t?.width?t?.width:c.width)+(a??0)*2,d=(t?.height?t?.height:c.height)+(o??0)*2,f=t.look===`neo`?d/4:d/8,p=d+f,{cssStyles:m}=t,h=k.svg(s),g=Z(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{x:-u/2-u/2*.1,y:-p/2},{x:-u/2-u/2*.1,y:p/2},..._$(-u/2-u/2*.1,p/2,u/2+u/2*.1,p/2,f,.8),{x:u/2+u/2*.1,y:-p/2},{x:-u/2-u/2*.1,y:-p/2},{x:-u/2,y:-p/2},{x:-u/2,y:p/2*1.1},{x:-u/2,y:-p/2}],v=h.polygon(_.map(e=>[e.x,e.y]),g),y=s.insert(()=>v,`:first-child`);return y.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,r),y.attr(`transform`,`translate(0,${-f/2})`),l.attr(`transform`,`translate(${-u/2+(t.padding??0)+u/2*.1/2-(c.x-(c.left??0))},${-d/2+(t.padding??0)-f/2-(c.y-(c.top??0))})`),Q(t,y),t.intersect=function(e){return $.polygon(t,_,e)},s}W(I1,`linedWaveEdgedRect`);async function L1(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,s=t.look===`neo`?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2-2*s,10),t.height=Math.max((t?.height??0)-o*2-2*s,10));let{shapeSvg:c,bbox:l,label:u}=await p$(e,t,h$(t)),d=(t?.width?t?.width:l.width)+a*2+2*s,f=(t?.height?t?.height:l.height)+o*2+2*s,p=d-2*s,m=f-2*s,h=-p/2,g=-m/2,{cssStyles:_}=t,v=k.svg(c),y=Z(t,{}),b=[{x:h-s,y:g+s},{x:h-s,y:g+m+s},{x:h+p-s,y:g+m+s},{x:h+p-s,y:g+m},{x:h+p,y:g+m},{x:h+p,y:g+m-s},{x:h+p+s,y:g+m-s},{x:h+p+s,y:g-s},{x:h+s,y:g-s},{x:h+s,y:g},{x:h,y:g},{x:h,y:g+s}],x=[{x:h,y:g+s},{x:h+p-s,y:g+s},{x:h+p-s,y:g+m},{x:h+p,y:g+m},{x:h+p,y:g},{x:h,y:g}];t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let S=g$(b),C=v.path(S,y),w=g$(x),T=v.path(w,y);t.look!==`handDrawn`&&(C=y$(C),T=y$(T));let E=c.insert(`g`,`:first-child`);return E.insert(()=>C),E.insert(()=>T),E.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&E.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&E.selectAll(`path`).attr(`style`,r),u.attr(`transform`,`translate(${-(l.width/2)-s-(l.x-(l.left??0))}, ${-(l.height/2)+s-(l.y-(l.top??0))})`),Q(t,E),t.intersect=function(e){return $.polygon(t,b,e)},c}W(L1,`multiRect`);async function R1(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await p$(e,t,h$(t)),s=t.padding??0,c=t.look===`neo`?16:s,l=t.look===`neo`?12:s,u=!0;(t.width||t.height)&&(u=!1,t.width=(t?.width??0)-c*2,t.height=(t?.height??0)-l*3);let d=Math.max(a.width,t?.width??0)+c*2,f=Math.max(a.height,t?.height??0)+l*3,p=t.look===`neo`?f/4:f/8,m=f+(u?p/2:-p/2),h=-d/2,g=-m/2,{cssStyles:_}=t,v=_$(h-10,g+m+10,h+d-10,g+m+10,p,.8),y=v?.[v.length-1],b=[{x:h-10,y:g+10},{x:h-10,y:g+m+10},...v,{x:h+d-10,y:y.y-10},{x:h+d,y:y.y-10},{x:h+d,y:y.y-20},{x:h+d+10,y:y.y-20},{x:h+d+10,y:g-10},{x:h+10,y:g-10},{x:h+10,y:g},{x:h,y:g},{x:h,y:g+10}],x=[{x:h,y:g+10},{x:h+d-10,y:g+10},{x:h+d-10,y:y.y-10},{x:h+d,y:y.y-10},{x:h+d,y:g},{x:h,y:g}],S=k.svg(i),C=Z(t,{});t.look!==`handDrawn`&&(C.roughness=0,C.fillStyle=`solid`);let w=g$(b),T=S.path(w,C),E=g$(x),D=S.path(E,C),O=i.insert(()=>T,`:first-child`);return O.insert(()=>D),O.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,r),O.attr(`transform`,`translate(0,${-p/2})`),o.attr(`transform`,`translate(${-(a.width/2)-10-(a.x-(a.left??0))}, ${-(a.height/2)+10-p/2-(a.y-(a.top??0))})`),Q(t,O),t.intersect=function(e){return $.polygon(t,b,e)},i}W(R1,`multiWaveEdgedRectangle`);async function z1(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r,t.useHtmlLabels||cR($L())||(t.centerLabel=!0);let{shapeSvg:a,bbox:o,label:s}=await p$(e,t,h$(t)),c=Math.max(o.width+(t.padding??0)*2,t?.width??0),l=Math.max(o.height+(t.padding??0)*2,t?.height??0),u=-c/2,d=-l/2,{cssStyles:f}=t,p=k.svg(a),m=Z(t,{fill:n.noteBkgColor,stroke:n.noteBorderColor});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=p.rectangle(u,d,c,l,m),g=a.insert(()=>h,`:first-child`);return g.attr(`class`,`basic label-container outer-path`),s.attr(`class`,`label noteLabel`),f&&t.look!==`handDrawn`&&g.selectAll(`path`).attr(`style`,f),i&&t.look!==`handDrawn`&&g.selectAll(`path`).attr(`style`,i),s.attr(`transform`,`translate(${-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),Q(t,g),t.intersect=function(e){return $.rect(t,e)},a}W(z1,`note`);var B1=W((e,t,n)=>[`M${e+n/2},${t}`,`L${e+n},${t-n/2}`,`L${e+n/2},${t-n}`,`L${e},${t-n/2}`,`Z`].join(` `),`createDecisionBoxPathD`);async function V1(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await p$(e,t,h$(t)),o=a.width+(t.padding??0)+(a.height+(t.padding??0)),s=.5,c=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}],l,{cssStyles:u}=t;if(t.look===`handDrawn`){let e=k.svg(i),n=Z(t,{}),r=B1(0,0,o),a=e.path(r,n);l=i.insert(()=>a,`:first-child`).attr(`transform`,`translate(${-o/2+s}, ${o/2})`),u&&l.attr(`style`,u)}else l=H$(i,o,o,c),l.attr(`transform`,`translate(${-o/2+s}, ${o/2})`);return r&&l.attr(`style`,r),Q(t,l),t.calcIntersect=function(e,t){let n=e.width,r=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}],i=$.polygon(e,r,t);return{x:i.x-.5,y:i.y-.5}},t.intersect=function(e){return this.calcIntersect(t,e)},i}W(V1,`question`);async function H1(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?21:i??0,o=t.look===`neo`?12:i??0,{shapeSvg:s,bbox:c,label:l}=await p$(e,t,h$(t)),u=(t?.width??c.width)+(t.look===`neo`?a*2:a),d=(t?.height??c.height)+(t.look===`neo`?o*2:o),f=-u/2,p=-d/2,m=p/2,h=[{x:f+m,y:p},{x:f,y:0},{x:f+m,y:-p},{x:-f,y:-p},{x:-f,y:p}],{cssStyles:g}=t,_=k.svg(s),v=Z(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=g$(h),b=_.path(y,v),x=s.insert(()=>b,`:first-child`);return x.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),x.attr(`transform`,`translate(${-m/2},0)`),l.attr(`transform`,`translate(${-m/2-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),Q(t,x),t.intersect=function(e){return $.polygon(t,h,e)},s}W(H1,`rect_left_inv_arrow`);async function U1(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let i;i=t.cssClasses?`node `+t.cssClasses:`node default`;let a=e.insert(`g`).attr(`class`,i).attr(`id`,t.domId||t.id),o=a.insert(`g`),s=a.insert(`g`).attr(`class`,`label`).attr(`style`,r),c=t.description,l=t.label,u=await x$(s,l,t.labelStyle,!0,!0),d={width:0,height:0};if(cR(WR())){let e=u.children[0],t=YB(u);d=e.getBoundingClientRect(),t.attr(`width`,d.width),t.attr(`height`,d.height)}G.info(`Text 2`,c);let f=c||[],p=u.getBBox(),m=await x$(s,Array.isArray(f)?f.join(`<br/>`):f,t.labelStyle,!0,!0),h=m.children[0],g=YB(m);d=h.getBoundingClientRect(),g.attr(`width`,d.width),g.attr(`height`,d.height);let _=(t.padding||0)/2;YB(m).attr(`transform`,`translate( `+(d.width>p.width?0:(p.width-d.width)/2)+`, `+(p.height+_+5)+`)`),YB(u).attr(`transform`,`translate( `+(d.width<p.width?0:-(p.width-d.width)/2)+`, 0)`),d=s.node().getBBox(),s.attr(`transform`,`translate(`+-d.width/2+`, `+(-d.height/2-_+3)+`)`);let v=d.width+(t.padding||0),y=d.height+(t.padding||0),b=-d.width/2-_,x=-d.height/2-_,S,C;if(t.look===`handDrawn`){let e=k.svg(a),n=Z(t,{}),r=e.path(S$(b,x,v,y,t.rx||0),n),i=e.line(-d.width/2-_,-d.height/2-_+p.height+_,d.width/2+_,-d.height/2-_+p.height+_,n);C=a.insert(()=>(G.debug(`Rough node insert CXC`,r),i),`:first-child`),S=a.insert(()=>(G.debug(`Rough node insert CXC`,r),r),`:first-child`)}else S=o.insert(`rect`,`:first-child`),C=o.insert(`line`),S.attr(`class`,`outer title-state`).attr(`style`,r).attr(`x`,-d.width/2-_).attr(`y`,-d.height/2-_).attr(`width`,d.width+(t.padding||0)).attr(`height`,d.height+(t.padding||0)),C.attr(`class`,`divider`).attr(`x1`,-d.width/2-_).attr(`x2`,d.width/2+_).attr(`y1`,-d.height/2-_+p.height+_).attr(`y2`,-d.height/2-_+p.height+_);return Q(t,S),t.intersect=function(e){return $.rect(t,e)},a}W(U1,`rectWithTitle`);async function W1(e,t,{config:{themeVariables:n}}){let r=n?.radius??5;return T1(e,t,{rx:r,ry:r,classes:``,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1})}W(W1,`roundedRect`);var G1=8;async function K1(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?12:t.padding??0,{shapeSvg:o,bbox:s,label:c}=await p$(e,t,h$(t)),l=(t?.width??s.width)+i*2+(t.look===`neo`?G1:G1*2),u=(t?.height??s.height)+a*2,d=l-G1,f=u,p=G1-l/2,m=-u/2,{cssStyles:h}=t,g=k.svg(o),_=Z(t,{});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let v=[{x:p,y:m},{x:p+d,y:m},{x:p+d,y:m+f},{x:p-G1,y:m+f},{x:p-G1,y:m},{x:p,y:m},{x:p,y:m+f}],y=g.polygon(v.map(e=>[e.x,e.y]),_),b=o.insert(()=>y,`:first-child`);return b.attr(`class`,`basic label-container outer-path`).attr(`style`,AX(h)),r&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,r),h&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${G1/2-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),Q(t,b),t.intersect=function(e){return $.rect(t,e)},o}W(K1,`shadedProcess`);async function q1(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2,10),t.height=Math.max((t?.height??0)/1.5-o*2,10));let{shapeSvg:s,bbox:c,label:l}=await p$(e,t,h$(t)),u=(t?.width?t?.width:c.width)+a*2,d=((t?.height?t?.height:c.height)+o*2)*1.5,f=u,p=d/1.5,m=-f/2,h=-p/2,{cssStyles:g}=t,_=k.svg(s),v=Z(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=[{x:m,y:h},{x:m,y:h+p},{x:m+f,y:h+p},{x:m+f,y:h-p/2}],b=g$(y),x=_.path(b,v),S=s.insert(()=>x,`:first-child`);return S.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&S.selectChildren(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&S.selectChildren(`path`).attr(`style`,r),S.attr(`transform`,`translate(0, ${p/4})`),l.attr(`transform`,`translate(${-f/2+(t.padding??0)-(c.x-(c.left??0))}, ${-p/4+(t.padding??0)-(c.y-(c.top??0))})`),Q(t,S),t.intersect=function(e){return $.polygon(t,y,e)},s}W(q1,`slopedRect`);async function J1(e,t){let n=t.padding??0,r=t.look===`neo`?16:n*2,i=t.look===`neo`?12:n;return T1(e,t,{rx:0,ry:0,classes:``,labelPaddingX:t.labelPaddingX??r,labelPaddingY:i})}W(J1,`squareRect`);async function Y1(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?20:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await p$(e,t,h$(t)),l=c.height+(t.look===`neo`?o*2:o),u=c.width+l/4+(t.look===`neo`?a*2:a),d=l/2,{cssStyles:f}=t,p=k.svg(s),m=Z(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-u/2+d,y:-l/2},{x:u/2-d,y:-l/2},...v$(-u/2+d,0,d,50,90,270),{x:u/2-d,y:l/2},...v$(u/2-d,0,d,50,270,450)],g=g$(h),_=p.path(g,m),v=s.insert(()=>_,`:first-child`);return v.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,r),Q(t,v),t.intersect=function(e){return $.polygon(t,h,e)},s}W(Y1,`stadium`);async function X1(e,t){return T1(e,t,{rx:t.look===`neo`?3:5,ry:t.look===`neo`?3:5,classes:`flowchart-node`})}W(X1,`state`);function Z1(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;let{cssStyles:a}=t,{lineColor:o,stateBorder:s,nodeBorder:c,nodeShadow:l}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let u=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId??t.id),d=k.svg(u),f=Z(t,{});t.look!==`handDrawn`&&(f.roughness=0,f.fillStyle=`solid`);let p=d.circle(0,0,t.width,{...f,stroke:o,strokeWidth:2}),m=s??c,h=(t.width??0)*5/14,g=d.circle(0,0,h,{...f,fill:m,stroke:m,strokeWidth:2,fillStyle:`solid`}),_=u.insert(()=>p,`:first-child`);if(_.insert(()=>g),t.look!==`handDrawn`&&_.attr(`class`,`outer-path`),a&&_.selectAll(`path`).attr(`style`,a),i&&_.selectAll(`path`).attr(`style`,i),t.width<25&&l&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;_.attr(`style`,`filter:url(#${n})`)}return Q(t,_),t.intersect=function(e){return $.circle(t,(t.width??0)/2,e)},u}W(Z1,`stateEnd`);function Q1(e,t,{config:{themeVariables:n}}){let{lineColor:r,nodeShadow:i}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let a=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),o;if(t.look===`handDrawn`){let e=k.svg(a).circle(0,0,t.width,PX(r));o=a.insert(()=>e),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14)}else o=a.insert(`circle`,`:first-child`),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14);if(t.width<25&&i&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;o.attr(`style`,`filter:url(#${n})`)}return Q(t,o),t.intersect=function(e){return $.circle(t,(t.width??7)/2,e)},a}W(Q1,`stateStart`);var $1=8;async function e0(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let i=t?.padding??8,a=t.look===`neo`?28:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await p$(e,t,h$(t)),l=(t?.width??c.width)+2*$1+a,u=(t?.height??c.height)+o,d=l-2*$1,f=u,p=-l/2,m=-u/2,h=[{x:0,y:0},{x:d,y:0},{x:d,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if(t.look===`handDrawn`){let e=k.svg(s),n=Z(t,{}),r=e.rectangle(p,m,d+16,f,n),i=e.line(p+$1,m,p+$1,m+f,n),a=e.line(p+$1+d,m,p+$1+d,m+f,n);s.insert(()=>i,`:first-child`),s.insert(()=>a,`:first-child`);let o=s.insert(()=>r,`:first-child`),{cssStyles:c}=t;o.attr(`class`,`basic label-container`).attr(`style`,AX(c)),Q(t,o)}else{let e=H$(s,d,f,h);r&&e.attr(`style`,r),Q(t,e)}return t.intersect=function(e){return $.polygon(t,h,e)},s}W(e0,`subroutine`);var t0=.2;async function n0(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-o*2,10),t.width=Math.max((t?.width??0)-a*2-t0*(t.height+o*2),10));let{shapeSvg:s,bbox:c}=await p$(e,t,h$(t)),l=(t?.height?t?.height:c.height)+o*2,u=t0*l,d=t0*l,f=(t?.width?t?.width:c.width)+a*2+u-u,p=l,m=-f/2,h=-p/2,{cssStyles:g}=t,_=k.svg(s),v=Z(t,{}),y=[{x:m-u/2,y:h},{x:m+f+u/2,y:h},{x:m+f+u/2,y:h+p},{x:m-u/2,y:h+p}],b=[{x:m+f-u/2,y:h+p},{x:m+f+u/2,y:h+p},{x:m+f+u/2,y:h+p-d}];t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let x=g$(y),S=_.path(x,v),C=g$(b),w=_.path(C,{...v,fillStyle:`solid`}),T=s.insert(()=>w,`:first-child`);return T.insert(()=>S,`:first-child`),T.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,r),Q(t,T),t.intersect=function(e){return $.polygon(t,y,e)},s}W(n0,`taggedRect`);async function r0(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await p$(e,t,h$(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=c/8,u=.2*s,d=.2*c,f=c+l,{cssStyles:p}=t,m=k.svg(i),h=Z(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=[{x:-s/2-s/2*.1,y:f/2},..._$(-s/2-s/2*.1,f/2,s/2+s/2*.1,f/2,l,.8),{x:s/2+s/2*.1,y:-f/2},{x:-s/2-s/2*.1,y:-f/2}],_=-s/2+s/2*.1,v=-f/2-d*.4,y=[{x:_+s-u,y:(v+c)*1.3},{x:_+s,y:v+c-d},{x:_+s,y:(v+c)*.9},..._$(_+s,(v+c)*1.25,_+s-u,(v+c)*1.3,-c*.02,.5)],b=g$(g),x=m.path(b,h),S=g$(y),C=m.path(S,{...h,fillStyle:`solid`}),w=i.insert(()=>C,`:first-child`);return w.insert(()=>x,`:first-child`),w.attr(`class`,`basic label-container outer-path`),p&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),w.attr(`transform`,`translate(0,${-l/2})`),o.attr(`transform`,`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-l/2-(a.y-(a.top??0))})`),Q(t,w),t.intersect=function(e){return $.polygon(t,g,e)},i}W(r0,`taggedWaveEdgedRectangle`);async function i0(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await p$(e,t,h$(t)),o=Math.max(a.width+(t.padding??0),t?.width||0),s=Math.max(a.height+(t.padding??0),t?.height||0),c=-o/2,l=-s/2,u=i.insert(`rect`,`:first-child`);return u.attr(`class`,`text`).attr(`style`,r).attr(`rx`,0).attr(`ry`,0).attr(`x`,c).attr(`y`,l).attr(`width`,o).attr(`height`,s),Q(t,u),t.intersect=function(e){return $.rect(t,e)},i}W(i0,`text`);var a0=W((e,t,n,r,i,a)=>`M${e},${t}
|
|
461
|
+
a${i},${a} 0,0,1 0,${-r}
|
|
462
|
+
l${n},0
|
|
463
|
+
a${i},${a} 0,0,1 0,${r}
|
|
464
|
+
M${n},${-r}
|
|
465
|
+
a${i},${a} 0,0,0 0,${r}
|
|
466
|
+
l${-n},0`,`createCylinderPathD`),o0=W((e,t,n,r,i,a)=>[`M${e},${t}`,`M${e+n},${t}`,`a${i},${a} 0,0,0 0,${-r}`,`l${-n},0`,`a${i},${a} 0,0,0 0,${r}`,`l${n},0`].join(` `),`createOuterCylinderPathD`),s0=W((e,t,n,r,i,a)=>[`M${e+n/2},${-r/2}`,`a${i},${a} 0,0,0 0,${r}`].join(` `),`createInnerCylinderPathD`),c0=5,l0=10;async function u0(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?12:i/2;if(t.width||t.height){let e=t.height??0;t.height=(t.height??0)-a,t.height<c0&&(t.height=c0);let n=e/2/(2.5+e/50);t.width=(t.width??0)-a-n*3,t.width<l0&&(t.width=l0)}let{shapeSvg:o,bbox:s,label:c}=await p$(e,t,h$(t)),l=(t.height?t.height:s.height)+a,u=l/2,d=u/(2.5+l/50),f=(t.width?t.width:s.width)+d+a,{cssStyles:p}=t,m;if(t.look===`handDrawn`){let e=k.svg(o),n=o0(0,0,f,l,d,u),r=s0(0,0,f,l,d,u),i=e.path(n,Z(t,{})),a=e.path(r,Z(t,{fill:`none`}));m=o.insert(()=>a,`:first-child`),m=o.insert(()=>i,`:first-child`),m.attr(`class`,`basic label-container`),p&&m.attr(`style`,p)}else{let e=a0(0,0,f,l,d,u);m=o.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container`).attr(`style`,AX(p)).attr(`style`,r),m.attr(`class`,`basic label-container outer-path`),p&&m.selectAll(`path`).attr(`style`,p),r&&m.selectAll(`path`).attr(`style`,r)}return m.attr(`label-offset-x`,d),m.attr(`transform`,`translate(${-f/2}, ${l/2} )`),c.attr(`transform`,`translate(${-(s.width/2)-d-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),Q(t,m),t.intersect=function(e){let n=$.rect(t,e),r=n.y-(t.y??0);if(u!=0&&(Math.abs(r)<(t.height??0)/2||Math.abs(r)==(t.height??0)/2&&Math.abs(n.x-(t.x??0))>(t.width??0)/2-d)){let i=d*d*(1-r*r/(u*u));i!=0&&(i=Math.sqrt(Math.abs(i))),i=d-i,e.x-(t.x??0)>0&&(i=-i),n.x+=i}return n},o}W(u0,`tiltedCylinder`);async function d0(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let i=t.padding??0,a=(t.look,i),o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await p$(e,t,h$(t)),l=(t?.height??c.height)+a,u=(t?.width??c.width)+o,d=[{x:-3*l/6,y:0},{x:u+3*l/6,y:0},{x:u,y:-l},{x:0,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=k.svg(s),n=Z(t,{}),r=g$(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=H$(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,Q(t,f),t.intersect=function(e){return $.polygon(t,d,e)},s}W(d0,`trapezoid`);async function f0(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.height=(t.height??0)-o*2,t.height<5&&(t.height=5),t.width=(t.width??0)-a*2,t.width<15&&(t.width=15));let{shapeSvg:s,bbox:c}=await p$(e,t,h$(t)),l=(t?.width?t?.width:c.width)+a*2,u=(t?.height?t?.height:c.height)+o*2,{cssStyles:d}=t,f=k.svg(s),p=Z(t,{});t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let m=[{x:-l/2*.8,y:-u/2},{x:l/2*.8,y:-u/2},{x:l/2,y:-u/2*.6},{x:l/2,y:u/2},{x:-l/2,y:u/2},{x:-l/2,y:-u/2*.6}],h=g$(m),g=f.path(h,p),_=s.insert(()=>g,`:first-child`);return _.attr(`class`,`basic label-container outer-path`),d&&t.look!==`handDrawn`&&_.selectChildren(`path`).attr(`style`,d),r&&t.look!==`handDrawn`&&_.selectChildren(`path`).attr(`style`,r),Q(t,_),t.intersect=function(e){return $.polygon(t,m,e)},s}W(f0,`trapezoidalPentagon`);var p0=10,m0=10;async function h0(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?i*2:i;(t.width||t.height)&&(t.width=((t?.width??0)-a)/2,t.width<m0&&(t.width=m0),t.height=t?.height??0,t.height<p0&&(t.height=p0));let{shapeSvg:o,bbox:s,label:c}=await p$(e,t,h$(t)),l=HL(WR().flowchart?.htmlLabels),u=(t?.width?t?.width:s.width)+a,d=t?.height?t?.height:u+s.height,f=d,p=[{x:0,y:0},{x:f,y:0},{x:f/2,y:-d}],{cssStyles:m}=t,h=k.svg(o),g=Z(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=g$(p),v=h.path(_,g),y=o.insert(()=>v,`:first-child`).attr(`transform`,`translate(${-d/2}, ${d/2})`).attr(`class`,`outer-path`);return m&&t.look!==`handDrawn`&&y.selectChildren(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&y.selectChildren(`path`).attr(`style`,r),t.width=u,t.height=d,Q(t,y),c.attr(`transform`,`translate(${-s.width/2-(s.x-(s.left??0))}, ${d/2-(s.height+(t.padding??0)/(l?2:1)-(s.y-(s.top??0)))})`),t.intersect=function(e){return G.info(`Triangle intersect`,t,p,e),$.polygon(t,p,e)},o}W(h0,`triangle`);async function g0(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,s=!0;(t.width||t.height)&&(s=!1,t.width=(t?.width??0)-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10));let{shapeSvg:c,bbox:l,label:u}=await p$(e,t,h$(t)),d=(t?.width?t?.width:l.width)+(a??0)*2,f=(t?.height?t?.height:l.height)+(o??0)*2,p=t.look===`neo`?f/4:f/8,m=f+(s?p:-p),{cssStyles:h}=t,g=14-d,_=g>0?g/2:0,v=k.svg(c),y=Z(t,{});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let b=[{x:-d/2-_,y:m/2},..._$(-d/2-_,m/2,d/2+_,m/2,p,.8),{x:d/2+_,y:-m/2},{x:-d/2-_,y:-m/2}],x=g$(b),S=v.path(x,y),C=c.insert(()=>S,`:first-child`);return C.attr(`class`,`basic label-container outer-path`),h&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,h),r&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,r),C.attr(`transform`,`translate(0,${-p/2})`),u.attr(`transform`,`translate(${-d/2+(t.padding??0)-(l.x-(l.left??0))},${-f/2+(t.padding??0)-p-(l.y-(l.top??0))})`),Q(t,C),t.intersect=function(e){return $.polygon(t,b,e)},c}W(g0,`waveEdgedRectangle`);async function _0(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?20:i;if(t.width||t.height){t.width=t?.width??0,t.width<20&&(t.width=20),t.height=t?.height??0,t.height<10&&(t.height=10);let e=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-o-20/9*e),t.width-=a*2}let{shapeSvg:s,bbox:c}=await p$(e,t,h$(t)),l=(t?.width?t?.width:c.width)+a*2,u=(t?.height?t?.height:c.height)+o,d=u/8,f=u+d*2,{cssStyles:p}=t,m=k.svg(s),h=Z(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=[{x:-l/2,y:f/2},..._$(-l/2,f/2,l/2,f/2,d,1),{x:l/2,y:-f/2},..._$(l/2,-f/2,-l/2,-f/2,d,-1)],_=g$(g),v=m.path(_,h),y=s.insert(()=>v,`:first-child`);return y.attr(`class`,`basic label-container`),p&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,r),Q(t,y),t.intersect=function(e){return $.polygon(t,g,e)},s}W(_0,`waveRectangle`);var v0=10;async function y0(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-i*2-v0,10),t.height=Math.max((t?.height??0)-a*2-v0,10));let{shapeSvg:o,bbox:s,label:c}=await p$(e,t,h$(t)),l=(t?.width?t?.width:s.width)+i*2+v0,u=(t?.height?t?.height:s.height)+a*2+v0,d=l-v0,f=u-v0,p=-d/2,m=-f/2,{cssStyles:h}=t,g=k.svg(o),_=Z(t,{}),v=[{x:p-v0,y:m-v0},{x:p-v0,y:m+f},{x:p+d,y:m+f},{x:p+d,y:m-v0}],y=`M${p-v0},${m-v0} L${p+d},${m-v0} L${p+d},${m+f} L${p-v0},${m+f} L${p-v0},${m-v0}
|
|
467
|
+
M${p-v0},${m} L${p+d},${m}
|
|
468
|
+
M${p},${m-v0} L${p},${m+f}`;t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let b=g.path(y,_),x=o.insert(()=>b,`:first-child`);return x.attr(`transform`,`translate(${v0/2}, ${v0/2})`),x.attr(`class`,`basic label-container outer-path`),h&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,h),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${-(s.width/2)+v0/2-(s.x-(s.left??0))}, ${-(s.height/2)+v0/2-(s.y-(s.top??0))})`),Q(t,x),t.intersect=function(e){return $.polygon(t,v,e)},o}W(y0,`windowPane`);var b0=new Set([`redux-color`,`redux-dark-color`]),x0=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]);async function S0(e,t){let n=t;n.alias&&(t.label=n.alias);let{theme:r,themeVariables:i}=$L(),{rowEven:a,rowOdd:o,nodeBorder:s,borderColorArray:c}=i;if(t.look===`handDrawn`){let{themeVariables:n}=$L(),{background:r}=n;await S0(e,{...t,id:t.id+`-background`,domId:(t.domId||t.id)+`-background`,look:`default`,cssStyles:[`stroke: none`,`fill: ${r}`]})}let l=$L();t.useHtmlLabels=l.htmlLabels;let u=l.er?.diagramPadding??10,d=l.er?.entityPadding??6,{cssStyles:f}=t,{labelStyles:p,nodeStyles:m}=X(t);if(n.attributes.length===0&&t.label){let i={rx:0,ry:0,labelPaddingX:u,labelPaddingY:u*1.5,classes:``};_X(t.label,l)+i.labelPaddingX*2<l.er.minEntityWidth&&(t.width=l.er.minEntityWidth);let a=await T1(e,t,i);if(r!=null&&b0.has(r)){let e=n.colorIndex??0;a.attr(`data-color-id`,`color-${e%c.length}`)}if(!HL(l.htmlLabels)){let e=a.select(`text`),t=e.node()?.getBBox();e.attr(`transform`,`translate(${-t.width/2}, 0)`)}return a}l.htmlLabels||(u*=1.25,d*=1.25);let h=h$(t);h||=`node default`;let g=e.insert(`g`).attr(`class`,h).attr(`id`,t.domId||t.id),_=await C0(g,t.label??``,l,0,0,[`name`],p);_.height+=d;let v=0,y=[],b=[],x=0,S=0,C=0,w=0,T=!0,E=!0;for(let e of n.attributes){let t=await C0(g,e.type,l,0,v,[`attribute-type`],p);x=Math.max(x,t.width+u);let n=await C0(g,e.name,l,0,v,[`attribute-name`],p);S=Math.max(S,n.width+u);let r=await C0(g,e.keys.join(),l,0,v,[`attribute-keys`],p);C=Math.max(C,r.width+u);let i=await C0(g,e.comment,l,0,v,[`attribute-comment`],p);w=Math.max(w,i.width+u);let a=Math.max(t.height,n.height,r.height,i.height)+d;b.push({yOffset:v,rowHeight:a}),v+=a}let D=4;C<=u&&(T=!1,C=0,D--),w<=u&&(E=!1,w=0,D--);let O=g.node().getBBox();if(_.width+u*2-(x+S+C+w)>0){let e=_.width+u*2-(x+S+C+w);x+=e/D,S+=e/D,C>0&&(C+=e/D),w>0&&(w+=e/D)}let A=x+S+C+w,ee=k.svg(g),j=Z(t,{});t.look!==`handDrawn`&&(j.roughness=0,j.fillStyle=`solid`);let te=0;b.length>0&&(te=b.reduce((e,t)=>e+(t?.rowHeight??0),0));let M=Math.max(O.width+u*2,t?.width||0,A),ne=Math.max((te??0)+_.height,t?.height||0),N=-M/2,re=-ne/2;if(g.selectAll(`g:not(:first-child)`).each((e,t,n)=>{let r=YB(n[t]),i=r.attr(`transform`),a=0,o=0;if(i){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);e&&(a=parseFloat(e[1]),o=parseFloat(e[2]),r.attr(`class`).includes(`attribute-name`)?a+=x:r.attr(`class`).includes(`attribute-keys`)?a+=x+S:r.attr(`class`).includes(`attribute-comment`)&&(a+=x+S+C))}r.attr(`transform`,`translate(${N+u/2+a}, ${o+re+_.height+d/2})`)}),g.select(`.name`).attr(`transform`,`translate(`+-_.width/2+`, `+(re+d/2)+`)`),r!=null&&b0.has(r)){let e=n.colorIndex??0;g.attr(`data-color-id`,`color-${e%c.length}`)}let ie=ee.rectangle(N,re,M,ne,j),ae=g.insert(()=>ie,`:first-child`).attr(`class`,`outer-path`).attr(`style`,f.join(``));y.push(0);for(let[e,t]of b.entries()){let n=(e+1)%2==0&&t.yOffset!==0,r=ee.rectangle(N,_.height+re+t?.yOffset,M,t?.rowHeight,{...j,fill:n?a:o,stroke:s});g.insert(()=>r,`g.label`).attr(`style`,f.join(``)).attr(`class`,`row-rect-${n?`even`:`odd`}`)}let oe=1e-4,se=w0(N,_.height+re,M+N,_.height+re,oe),ce=ee.polygon(se.map(e=>[e.x,e.y]),j);if(g.insert(()=>ce).attr(`class`,`divider`),se=w0(x+N,_.height+re,x+N,ne+re,oe),ce=ee.polygon(se.map(e=>[e.x,e.y]),j),g.insert(()=>ce).attr(`class`,`divider`),T){let e=x+S+N;se=w0(e,_.height+re,e,ne+re,oe),ce=ee.polygon(se.map(e=>[e.x,e.y]),j),g.insert(()=>ce).attr(`class`,`divider`)}if(E){let e=x+S+C+N;se=w0(e,_.height+re,e,ne+re,oe),ce=ee.polygon(se.map(e=>[e.x,e.y]),j),g.insert(()=>ce).attr(`class`,`divider`)}for(let e of y){let t=_.height+re+e;se=w0(N,t,M+N,t,oe),ce=ee.polygon(se.map(e=>[e.x,e.y]),j),g.insert(()=>ce).attr(`class`,`divider`)}if(Q(t,ae),m&&t.look!==`handDrawn`)if(r!=null&&x0.has(r))g.selectAll(`path`).attr(`style`,m);else{let e=m.split(`;`)?.filter(e=>e.includes(`stroke`))?.map(e=>`${e}`).join(`; `);g.selectAll(`path`).attr(`style`,e??``),g.selectAll(`.row-rect-even path`).attr(`style`,m)}return t.intersect=function(e){return $.rect(t,e)},g}W(S0,`erBox`);async function C0(e,t,n,r=0,i=0,a=[],o=``){let s=e.insert(`g`).attr(`class`,`label ${a.join(` `)}`).attr(`transform`,`translate(${r}, ${i})`).attr(`style`,o);t!==xR(t)&&(t=xR(t),t=t.replaceAll(`<`,`<`).replaceAll(`>`,`>`));let c=s.node().appendChild(await f$(s,t,{width:_X(t,n)+100,style:o,useHtmlLabels:n.htmlLabels},n));if(t.includes(`<`)||t.includes(`>`)){let e=c.children[0];for(e.textContent=e.textContent.replaceAll(`<`,`<`).replaceAll(`>`,`>`);e.childNodes[0];)e=e.childNodes[0],e.textContent=e.textContent.replaceAll(`<`,`<`).replaceAll(`>`,`>`)}let l=c.getBBox();if(HL(n.htmlLabels)){let e=c.children[0];e.style.textAlign=`start`;let t=YB(c);l=e.getBoundingClientRect(),t.attr(`width`,l.width),t.attr(`height`,l.height)}return l}W(C0,`addText`);function w0(e,t,n,r,i){return e===n?[{x:e-i/2,y:t},{x:e+i/2,y:t},{x:n+i/2,y:r},{x:n-i/2,y:r}]:[{x:e,y:t-i/2},{x:e,y:t+i/2},{x:n,y:r+i/2},{x:n,y:r-i/2}]}W(w0,`lineToPolygon`);async function T0(e,t,n,r,i=n.class.padding??12){let a=r?0:3,o=e.insert(`g`).attr(`class`,h$(t)).attr(`id`,t.domId||t.id),s=null,c=null,l=null,u=null,d=0,f=0,p=0;if(s=o.insert(`g`).attr(`class`,`annotation-group text`),t.annotations.length>0){let e=t.annotations[0];await E0(s,{text:`\xAB${e}\xBB`},0),d=s.node().getBBox().height}c=o.insert(`g`).attr(`class`,`label-group text`),await E0(c,t,0,[`font-weight: bolder`]);let m=c.node().getBBox();f=m.height,l=o.insert(`g`).attr(`class`,`members-group text`);let h=0;for(let e of t.members){let t=await E0(l,e,h,[e.parseClassifier()]);h+=t+a}p=l.node().getBBox().height,p<=0&&(p=i/2),u=o.insert(`g`).attr(`class`,`methods-group text`);let g=0;for(let e of t.methods){let t=await E0(u,e,g,[e.parseClassifier()]);g+=t+a}let _=o.node().getBBox();if(s!==null){let e=s.node().getBBox();s.attr(`transform`,`translate(${-e.width/2})`)}return c.attr(`transform`,`translate(${-m.width/2}, ${d})`),_=o.node().getBBox(),l.attr(`transform`,`translate(0, ${d+f+i*2})`),_=o.node().getBBox(),u.attr(`transform`,`translate(0, ${d+f+(p?p+i*4:i*2)})`),_=o.node().getBBox(),{shapeSvg:o,bbox:_}}W(T0,`textHelper`);async function E0(e,t,n,r=[]){let i=e.insert(`g`).attr(`class`,`label`).attr(`style`,r.join(`; `)),a=$L(),o=`useHtmlLabels`in t?t.useHtmlLabels:HL(a.htmlLabels)??!0,s=``;s=`text`in t?t.text:t.label,!o&&s.startsWith(`\\`)&&(s=s.substring(1)),TR(s)&&(o=!0);let c=await f$(i,GR(OX(s)),{width:_X(s,a)+50,classes:`markdown-node-label`,useHtmlLabels:o},a),l,u=1;if(o){let e=c.children[0],t=YB(c);u=e.innerHTML.split(`<br>`).length,e.innerHTML.includes(`</math>`)&&(u+=e.innerHTML.split(`<mrow>`).length-1);let n=e.getElementsByTagName(`img`);if(n){let e=s.replace(/<img[^>]*>/g,``).trim()===``;await Promise.all([...n].map(t=>new Promise(n=>{function r(){if(t.style.display=`flex`,t.style.flexDirection=`column`,e){let e=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,n=parseInt(e,10)*5+`px`;t.style.minWidth=n,t.style.maxWidth=n}else t.style.width=`100%`;n(t)}W(r,`setupImage`),setTimeout(()=>{t.complete&&r()}),t.addEventListener(`error`,r),t.addEventListener(`load`,r)})))}l=e.getBoundingClientRect(),t.attr(`width`,l.width),t.attr(`height`,l.height)}else{r.includes(`font-weight: bolder`)&&YB(c).selectAll(`tspan`).attr(`font-weight`,``),u=c.children.length;let e=c.children[0];(c.textContent===``||c.textContent.includes(`>`))&&(e.textContent=s[0]+s.substring(1).replaceAll(`>`,`>`).replaceAll(`<`,`<`).trim(),s[1]===` `&&(e.textContent=e.textContent[0]+` `+e.textContent.substring(1))),e.textContent===`undefined`&&(e.textContent=``),l=c.getBBox()}return i.attr(`transform`,`translate(0,`+(-l.height/(2*u)+n)+`)`),l.height}W(E0,`addText`);async function D0(e,t){let n=WR(),{themeVariables:r}=n,{useGradient:i}=r,a=n.class.padding??12,o=a,s=t.useHtmlLabels??HL(n.htmlLabels)??!0,c=t;c.annotations=c.annotations??[],c.members=c.members??[],c.methods=c.methods??[];let{shapeSvg:l,bbox:u}=await T0(e,t,n,s,o),{labelStyles:d,nodeStyles:f}=X(t);t.labelStyle=d,t.cssStyles=c.styles||``;let p=c.styles?.join(`;`)||f||``;t.cssStyles||=p.replaceAll(`!important`,``).split(`;`);let m=c.members.length===0&&c.methods.length===0&&!n.class?.hideEmptyMembersBox,h=k.svg(l),g=Z(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=Math.max(t.width??0,u.width),v=Math.max(t.height??0,u.height),y=(t.height??0)>u.height;c.members.length===0&&c.methods.length===0?v+=o:c.members.length>0&&c.methods.length===0&&(v+=o*2);let b=-_/2,x=-v/2,S=m?a*2:c.members.length===0&&c.methods.length===0?-a:0;y&&(S=a*2);let C=h.rectangle(b-a,x-a-(m?a:c.members.length===0&&c.methods.length===0?-a/2:0),_+2*a,v+2*a+S,g),w=l.insert(()=>C,`:first-child`);w.attr(`class`,`basic label-container outer-path`);let T=w.node().getBBox(),E=l.select(`.annotation-group`).node().getBBox().height-(m?a/2:0)||0,D=l.select(`.label-group`).node().getBBox().height-(m?a/2:0)||0,O=l.select(`.members-group`).node().getBBox().height-(m?a/2:0)||0,A=(E+D+x+a-(x-a-(m?a:c.members.length===0&&c.methods.length===0?-a/2:0)))/2;if(l.selectAll(`.text`).each((e,t,r)=>{let i=YB(r[t]),u=i.attr(`transform`),d=0;if(u){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(u);e&&(d=parseFloat(e[2]))}let f=d+x+a-(m?a:c.members.length===0&&c.methods.length===0?-a/2:0);if(i.attr(`class`).includes(`methods-group`)){let e=Math.max(O,o/2);f=y?Math.max(A,E+D+e+x+o*2+a)+o*2:E+D+e+x+o*4+a}c.members.length===0&&c.methods.length===0&&n.class?.hideEmptyMembersBox&&(f=c.annotations.length>0?d-o:d),s||(f-=4);let p=b;(i.attr(`class`).includes(`label-group`)||i.attr(`class`).includes(`annotation-group`))&&(p=-i.node()?.getBBox().width/2||0,l.selectAll(`text`).each(function(e,t,n){window.getComputedStyle(n[t]).textAnchor===`middle`&&(p=0)})),i.attr(`transform`,`translate(${p}, ${f})`)}),c.members.length>0||c.methods.length>0||m){let e=E+D+x+a,n=h.line(T.x,e,T.x+T.width,e+.001,g);l.insert(()=>n).attr(`class`,`divider${t.look===`neo`&&!i?` neo-line`:``}`).attr(`style`,p)}if(m||c.members.length>0||c.methods.length>0){let e=E+D+O+x+o*2+a,n=h.line(T.x,y?Math.max(A,e):e,T.x+T.width,(y?Math.max(A,e):e)+.001,g);l.insert(()=>n).attr(`class`,`divider${t.look===`neo`&&!i?` neo-line`:``}`).attr(`style`,p)}if(c.look!==`handDrawn`&&l.selectAll(`path`).attr(`style`,p),w.select(`:nth-child(2)`).attr(`style`,p),l.selectAll(`.divider`).select(`path`).attr(`style`,p),t.labelStyle?l.selectAll(`span`).attr(`style`,t.labelStyle):l.selectAll(`span`).attr(`style`,p),!s){let e=RegExp(/color\s*:\s*([^;]*)/),t=e.exec(p);if(t){let e=t[0].replace(`color`,`fill`);l.selectAll(`tspan`).attr(`style`,e)}else if(d){let t=e.exec(d);if(t){let e=t[0].replace(`color`,`fill`);l.selectAll(`tspan`).attr(`style`,e)}}}return Q(t,w),t.intersect=function(e){return $.rect(t,e)},l}W(D0,`classBox`);async function O0(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let i=t,a=t,o=`verifyMethod`in t,s=h$(t),{themeVariables:c}=WR(),{borderColorArray:l,requirementEdgeLabelBackground:u}=c,d=e.insert(`g`).attr(`class`,s).attr(`id`,t.domId??t.id),f;f=o?await k0(d,`<<${i.type}>>`,0,t.labelStyle):await k0(d,`<<Element>>`,0,t.labelStyle);let p=f,m=await k0(d,i.name,p,t.labelStyle+`; font-weight: bold;`);if(p+=m+20,o){let e=await k0(d,`${i.requirementId?`ID: ${i.requirementId}`:``}`,p,t.labelStyle);p+=e;let n=await k0(d,`${i.text?`Text: ${i.text}`:``}`,p,t.labelStyle);p+=n;let r=await k0(d,`${i.risk?`Risk: ${i.risk}`:``}`,p,t.labelStyle);p+=r,await k0(d,`${i.verifyMethod?`Verification: ${i.verifyMethod}`:``}`,p,t.labelStyle)}else{let e=await k0(d,`${a.type?`Type: ${a.type}`:``}`,p,t.labelStyle);p+=e,await k0(d,`${a.docRef?`Doc Ref: ${a.docRef}`:``}`,p,t.labelStyle)}let h=(d.node()?.getBBox().width??200)+20,g=(d.node()?.getBBox().height??200)+20,_=-h/2,v=-g/2,y=k.svg(d),b=Z(t,{});t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let x=y.rectangle(_,v,h,g,b),S=d.insert(()=>x,`:first-child`);if(S.attr(`class`,`basic label-container outer-path`).attr(`style`,r),l?.length){let e=t.colorIndex??0;d.attr(`data-color-id`,`color-${e%l.length}`)}if(d.selectAll(`.label`).each((e,t,n)=>{let r=YB(n[t]),i=r.attr(`transform`),a=0,o=0;if(i){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);e&&(a=parseFloat(e[1]),o=parseFloat(e[2]))}let s=o-g/2,c=_+20/2;(t===0||t===1)&&(c=a),r.attr(`transform`,`translate(${c}, ${s+20})`)}),p>f+m+20){let e=v+f+m+20,n;if(t.look===`neo`){let t=.001,r=[[_,e],[_+h,e],[_+h,e+t],[_,e+t]];n=y.polygon(r,b)}else n=y.line(_,e,_+h,e,b);d.insert(()=>n).attr(`class`,`divider`)}return Q(t,S),t.intersect=function(e){return $.rect(t,e)},r&&t.look!==`handDrawn`&&(u||l?.length)&&d.selectAll(`path`).attr(`style`,r),d}W(O0,`requirementBox`);async function k0(e,t,n,r=``){if(t===``)return 0;let i=e.insert(`g`).attr(`class`,`label`).attr(`style`,r),a=WR(),o=a.htmlLabels??!0,s=await f$(i,GR(OX(t)),{width:_X(t,a)+50,classes:`markdown-node-label`,useHtmlLabels:o,style:r},a),c;if(o){let e=s.children[0],t=YB(s);c=e.getBoundingClientRect(),t.attr(`width`,c.width),t.attr(`height`,c.height)}else{let e=s.children[0];for(let t of e.children)r&&t.setAttribute(`style`,r);c=s.getBBox(),c.height+=6}return i.attr(`transform`,`translate(${-c.width/2},${-c.height/2+n})`),c.height}W(k0,`addText`);var A0=W(e=>{switch(e){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 j0(e,t,{config:n}){let{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r||``;let a=t.width;t.width=(t.width??200)-10;let{shapeSvg:o,bbox:s,label:c}=await p$(e,t,h$(t)),l=t.padding||10,u=``,d;`ticket`in t&&t.ticket&&n?.kanban?.ticketBaseUrl&&(u=n?.kanban?.ticketBaseUrl.replace(`#TICKET#`,t.ticket),d=o.insert(`svg:a`,`:first-child`).attr(`class`,`kanban-ticket-link`).attr(`xlink:href`,u).attr(`target`,`_blank`));let f={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||``,width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1},p,m;d?{label:p,bbox:m}=await m$(d,`ticket`in t&&t.ticket||``,f):{label:p,bbox:m}=await m$(o,`ticket`in t&&t.ticket||``,f);let{label:h,bbox:g}=await m$(o,`assigned`in t&&t.assigned||``,f);t.width=a;let _=t?.width||0,v=Math.max(m.height,g.height)/2,y=Math.max(s.height+20,t?.height||0)+v,b=-_/2,x=-y/2;c.attr(`transform`,`translate(`+(l-_/2)+`, `+(-v-s.height/2)+`)`),p.attr(`transform`,`translate(`+(l-_/2)+`, `+(-v+s.height/2)+`)`),h.attr(`transform`,`translate(`+(l+_/2-g.width-20)+`, `+(-v+s.height/2)+`)`);let S,{rx:C,ry:w}=t,{cssStyles:T}=t;if(t.look===`handDrawn`){let e=k.svg(o),n=Z(t,{}),r=C||w?e.path(S$(b,x,_,y,C||0),n):e.rectangle(b,x,_,y,n);S=o.insert(()=>r,`:first-child`),S.attr(`class`,`basic label-container`).attr(`style`,T||null)}else{S=o.insert(`rect`,`:first-child`),S.attr(`class`,`basic label-container __APA__`).attr(`style`,i).attr(`rx`,C??5).attr(`ry`,w??5).attr(`x`,b).attr(`y`,x).attr(`width`,_).attr(`height`,y);let e=`priority`in t&&t.priority;if(e){let t=o.append(`line`),n=b+2,r=x+Math.floor((C??0)/2),i=x+y-Math.floor((C??0)/2);t.attr(`x1`,n).attr(`y1`,r).attr(`x2`,n).attr(`y2`,i).attr(`stroke-width`,`4`).attr(`stroke`,A0(e))}}return Q(t,S),t.height=y,t.intersect=function(e){return $.rect(t,e)},o}W(j0,`kanbanItem`);async function M0(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,halfPadding:o,label:s}=await p$(e,t,h$(t)),c=a.width+10*o,l=a.height+8*o,u=.15*c,{cssStyles:d}=t,f=a.width+20,p=a.height+20,m=Math.max(c,f),h=Math.max(l,p);s.attr(`transform`,`translate(${-a.width/2}, ${-a.height/2})`);let g,_=`M0 0
|
|
469
|
+
a${u},${u} 1 0,0 ${m*.25},${-1*h*.1}
|
|
470
|
+
a${u},${u} 1 0,0 ${m*.25},0
|
|
471
|
+
a${u},${u} 1 0,0 ${m*.25},0
|
|
472
|
+
a${u},${u} 1 0,0 ${m*.25},${h*.1}
|
|
473
|
+
|
|
474
|
+
a${u},${u} 1 0,0 ${m*.15},${h*.33}
|
|
475
|
+
a${u*.8},${u*.8} 1 0,0 0,${h*.34}
|
|
476
|
+
a${u},${u} 1 0,0 ${-1*m*.15},${h*.33}
|
|
477
|
+
|
|
478
|
+
a${u},${u} 1 0,0 ${-1*m*.25},${h*.15}
|
|
479
|
+
a${u},${u} 1 0,0 ${-1*m*.25},0
|
|
480
|
+
a${u},${u} 1 0,0 ${-1*m*.25},0
|
|
481
|
+
a${u},${u} 1 0,0 ${-1*m*.25},${-1*h*.15}
|
|
482
|
+
|
|
483
|
+
a${u},${u} 1 0,0 ${-1*m*.1},${-1*h*.33}
|
|
484
|
+
a${u*.8},${u*.8} 1 0,0 0,${-1*h*.34}
|
|
485
|
+
a${u},${u} 1 0,0 ${m*.1},${-1*h*.33}
|
|
486
|
+
H0 V0 Z`;if(t.look===`handDrawn`){let e=k.svg(i),n=Z(t,{}),r=e.path(_,n);g=i.insert(()=>r,`:first-child`),g.attr(`class`,`basic label-container`).attr(`style`,AX(d))}else g=i.insert(`path`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,r).attr(`d`,_);return g.attr(`transform`,`translate(${-m/2}, ${-h/2})`),Q(t,g),t.calcIntersect=function(e,t){return $.rect(e,t)},t.intersect=function(e){return G.info(`Bang intersect`,t,e),$.rect(t,e)},i}W(M0,`bang`);async function N0(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,halfPadding:o,label:s}=await p$(e,t,h$(t)),c=a.width+2*o,l=a.height+2*o,u=.15*c,d=.25*c,f=.35*c,p=.2*c,{cssStyles:m}=t,h,g=`M0 0
|
|
487
|
+
a${u},${u} 0 0,1 ${c*.25},${-1*c*.1}
|
|
488
|
+
a${f},${f} 1 0,1 ${c*.4},${-1*c*.1}
|
|
489
|
+
a${d},${d} 1 0,1 ${c*.35},${c*.2}
|
|
490
|
+
|
|
491
|
+
a${u},${u} 1 0,1 ${c*.15},${l*.35}
|
|
492
|
+
a${p},${p} 1 0,1 ${-1*c*.15},${l*.65}
|
|
493
|
+
|
|
494
|
+
a${d},${u} 1 0,1 ${-1*c*.25},${c*.15}
|
|
495
|
+
a${f},${f} 1 0,1 ${-1*c*.5},0
|
|
496
|
+
a${u},${u} 1 0,1 ${-1*c*.25},${-1*c*.15}
|
|
497
|
+
|
|
498
|
+
a${u},${u} 1 0,1 ${-1*c*.1},${-1*l*.35}
|
|
499
|
+
a${p},${p} 1 0,1 ${c*.1},${-1*l*.65}
|
|
500
|
+
H0 V0 Z`;if(t.look===`handDrawn`){let e=k.svg(i),n=Z(t,{}),r=e.path(g,n);h=i.insert(()=>r,`:first-child`),h.attr(`class`,`basic label-container`).attr(`style`,AX(m))}else h=i.insert(`path`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,r).attr(`d`,g);return s.attr(`transform`,`translate(${-a.width/2}, ${-a.height/2})`),h.attr(`transform`,`translate(${-c/2}, ${-l/2})`),Q(t,h),t.calcIntersect=function(e,t){return $.rect(e,t)},t.intersect=function(e){return G.info(`Cloud intersect`,t,e),$.rect(t,e)},i}W(N0,`cloud`);async function P0(e,t){let{labelStyles:n,nodeStyles:r}=X(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,halfPadding:o,label:s}=await p$(e,t,h$(t)),c=a.width+8*o,l=a.height+2*o,u=t.look===`neo`?`
|
|
501
|
+
M${-c/2} ${l/2-5}
|
|
502
|
+
v${-l+10}
|
|
503
|
+
q0,-5 5,-5
|
|
504
|
+
h${c-10}
|
|
505
|
+
q5,0 5,5
|
|
506
|
+
v${l-5}
|
|
507
|
+
H${-c/2}
|
|
508
|
+
Z
|
|
509
|
+
`:`
|
|
510
|
+
M${-c/2} ${l/2-5}
|
|
511
|
+
v${-l+10}
|
|
512
|
+
q0,-5 5,-5
|
|
513
|
+
h${c-10}
|
|
514
|
+
q5,0 5,5
|
|
515
|
+
v${l-10}
|
|
516
|
+
q0,5 -5,5
|
|
517
|
+
h${-(c-10)}
|
|
518
|
+
q-5,0 -5,-5
|
|
519
|
+
Z
|
|
520
|
+
`;if(!t.domId)throw Error(`defaultMindmapNode: node "${t.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);let d=i.append(`path`).attr(`id`,t.domId).attr(`class`,`node-bkg node-`+t.type).attr(`style`,r).attr(`d`,u);return i.append(`line`).attr(`class`,`node-line-`).attr(`x1`,-c/2).attr(`y1`,l/2).attr(`x2`,c/2).attr(`y2`,l/2),s.attr(`transform`,`translate(${-a.width/2}, ${-a.height/2})`),i.append(()=>s.node()),Q(t,d),t.calcIntersect=function(e,t){return $.rect(e,t)},t.intersect=function(e){return $.rect(t,e)},i}W(P0,`defaultMindmapNode`);async function F0(e,t){return K$(e,t,{padding:t.padding??0})}W(F0,`mindmapCircle`);var I0=[{semanticName:`Process`,name:`Rectangle`,shortName:`rect`,description:`Standard process shape`,aliases:[`proc`,`process`,`rectangle`],internalAliases:[`squareRect`],handler:J1},{semanticName:`Event`,name:`Rounded Rectangle`,shortName:`rounded`,description:`Represents an event`,aliases:[`event`],internalAliases:[`roundedRect`],handler:W1},{semanticName:`Terminal Point`,name:`Stadium`,shortName:`stadium`,description:`Terminal point`,aliases:[`terminal`,`pill`],handler:Y1},{semanticName:`Subprocess`,name:`Framed Rectangle`,shortName:`fr-rect`,description:`Subprocess`,aliases:[`subprocess`,`subproc`,`framed-rectangle`,`subroutine`],handler:e0},{semanticName:`Database`,name:`Cylinder`,shortName:`cyl`,description:`Database storage`,aliases:[`db`,`database`,`cylinder`],handler:s1},{semanticName:`Start`,name:`Circle`,shortName:`circle`,description:`Starting point`,aliases:[`circ`],handler:K$},{semanticName:`Bang`,name:`Bang`,shortName:`bang`,description:`Bang`,aliases:[`bang`],handler:M0},{semanticName:`Cloud`,name:`Cloud`,shortName:`cloud`,description:`cloud`,aliases:[`cloud`],handler:N0},{semanticName:`Decision`,name:`Diamond`,shortName:`diam`,description:`Decision-making step`,aliases:[`decision`,`diamond`,`question`],handler:V1},{semanticName:`Prepare Conditional`,name:`Hexagon`,shortName:`hex`,description:`Preparation or condition step`,aliases:[`hexagon`,`prepare`],handler:_1},{semanticName:`Data Input/Output`,name:`Lean Right`,shortName:`lean-r`,description:`Represents input or output`,aliases:[`lean-right`,`in-out`],internalAliases:[`lean_right`],handler:O1},{semanticName:`Data Input/Output`,name:`Lean Left`,shortName:`lean-l`,description:`Represents output or input`,aliases:[`lean-left`,`out-in`],internalAliases:[`lean_left`],handler:D1},{semanticName:`Priority Action`,name:`Trapezoid Base Bottom`,shortName:`trap-b`,description:`Priority action`,aliases:[`priority`,`trapezoid-bottom`,`trapezoid`],handler:d0},{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:w1},{semanticName:`Stop`,name:`Double Circle`,shortName:`dbl-circ`,description:`Represents a stop point`,aliases:[`double-circle`],internalAliases:[`doublecircle`],handler:l1},{semanticName:`Text Block`,name:`Text Block`,shortName:`text`,description:`Text block`,handler:i0},{semanticName:`Card`,name:`Notched Rectangle`,shortName:`notch-rect`,description:`Represents a card`,aliases:[`card`,`notched-rectangle`],handler:W$},{semanticName:`Lined/Shaded Process`,name:`Lined Rectangle`,shortName:`lin-rect`,description:`Lined process shape`,aliases:[`lined-rectangle`,`lined-process`,`lin-proc`,`shaded-process`],handler:K1},{semanticName:`Start`,name:`Small Circle`,shortName:`sm-circ`,description:`Small starting point`,aliases:[`start`,`small-circle`],internalAliases:[`stateStart`],handler:Q1},{semanticName:`Stop`,name:`Framed Circle`,shortName:`fr-circ`,description:`Stop point`,aliases:[`stop`,`framed-circle`],internalAliases:[`stateEnd`],handler:Z1},{semanticName:`Fork/Join`,name:`Filled Rectangle`,shortName:`fork`,description:`Fork or join in process flow`,aliases:[`join`],internalAliases:[`forkJoin`],handler:m1},{semanticName:`Collate`,name:`Hourglass`,shortName:`hourglass`,description:`Represents a collate operation`,aliases:[`hourglass`,`collate`],handler:v1},{semanticName:`Comment`,name:`Curly Brace`,shortName:`brace`,description:`Adds a comment`,aliases:[`comment`,`brace-l`],handler:X$},{semanticName:`Comment Right`,name:`Curly Brace`,shortName:`brace-r`,description:`Adds a comment`,handler:Q$},{semanticName:`Comment with braces on both sides`,name:`Curly Braces`,shortName:`braces`,description:`Adds a comment`,handler:e1},{semanticName:`Com Link`,name:`Lightning Bolt`,shortName:`bolt`,description:`Communication link`,aliases:[`com-link`,`lightning-bolt`],handler:k1},{semanticName:`Document`,name:`Document`,shortName:`doc`,description:`Represents a document`,aliases:[`doc`,`document`],handler:g0},{semanticName:`Delay`,name:`Half-Rounded Rectangle`,shortName:`delay`,description:`Represents a delay`,aliases:[`half-rounded-rectangle`],handler:h1},{semanticName:`Direct Access Storage`,name:`Horizontal Cylinder`,shortName:`h-cyl`,description:`Direct access storage`,aliases:[`das`,`horizontal-cylinder`],handler:u0},{semanticName:`Disk Storage`,name:`Lined Cylinder`,shortName:`lin-cyl`,description:`Disk storage`,aliases:[`disk`,`lined-cylinder`],handler:F1},{semanticName:`Display`,name:`Curved Trapezoid`,shortName:`curv-trap`,description:`Represents a display`,aliases:[`curved-trapezoid`,`display`],handler:t1},{semanticName:`Divided Process`,name:`Divided Rectangle`,shortName:`div-rect`,description:`Divided process shape`,aliases:[`div-proc`,`divided-rectangle`,`divided-process`],handler:c1},{semanticName:`Extract`,name:`Triangle`,shortName:`tri`,description:`Extraction process`,aliases:[`extract`,`triangle`],handler:h0},{semanticName:`Internal Storage`,name:`Window Pane`,shortName:`win-pane`,description:`Internal storage`,aliases:[`internal-storage`,`window-pane`],handler:y0},{semanticName:`Junction`,name:`Filled Circle`,shortName:`f-circ`,description:`Junction point`,aliases:[`junction`,`filled-circle`],handler:u1},{semanticName:`Loop Limit`,name:`Trapezoidal Pentagon`,shortName:`notch-pent`,description:`Loop limit step`,aliases:[`loop-limit`,`notched-pentagon`],handler:f0},{semanticName:`Manual File`,name:`Flipped Triangle`,shortName:`flip-tri`,description:`Manual file operation`,aliases:[`manual-file`,`flipped-triangle`],handler:p1},{semanticName:`Manual Input`,name:`Sloped Rectangle`,shortName:`sl-rect`,description:`Manual input step`,aliases:[`manual-input`,`sloped-rectangle`],handler:q1},{semanticName:`Multi-Document`,name:`Stacked Document`,shortName:`docs`,description:`Multiple documents`,aliases:[`documents`,`st-doc`,`stacked-document`],handler:R1},{semanticName:`Multi-Process`,name:`Stacked Rectangle`,shortName:`st-rect`,description:`Multiple processes`,aliases:[`procs`,`processes`,`stacked-rectangle`],handler:L1},{semanticName:`Stored Data`,name:`Bow Tie Rectangle`,shortName:`bow-rect`,description:`Stored data`,aliases:[`stored-data`,`bow-tie-rectangle`],handler:V$},{semanticName:`Summary`,name:`Crossed Circle`,shortName:`cross-circ`,description:`Summary`,aliases:[`summary`,`crossed-circle`],handler:J$},{semanticName:`Tagged Document`,name:`Tagged Document`,shortName:`tag-doc`,description:`Tagged document`,aliases:[`tag-doc`,`tagged-document`],handler:r0},{semanticName:`Tagged Process`,name:`Tagged Rectangle`,shortName:`tag-rect`,description:`Tagged process`,aliases:[`tagged-rectangle`,`tag-proc`,`tagged-process`],handler:n0},{semanticName:`Paper Tape`,name:`Flag`,shortName:`flag`,description:`Paper tape`,aliases:[`paper-tape`],handler:_0},{semanticName:`Odd`,name:`Odd`,shortName:`odd`,description:`Odd shape`,internalAliases:[`rect_left_inv_arrow`],handler:H1},{semanticName:`Lined Document`,name:`Lined Document`,shortName:`lin-doc`,description:`Lined document`,aliases:[`lined-document`],handler:I1}],L0=W(()=>{let e=[...Object.entries({state:X1,choice:G$,note:z1,rectWithTitle:U1,labelRect:E1,iconSquare:S1,iconCircle:b1,icon:y1,iconRounded:x1,imageSquare:C1,anchor:R$,kanbanItem:j0,mindmapCircle:F0,defaultMindmapNode:P0,classBox:D0,erBox:S0,requirementBox:O0}),...I0.flatMap(e=>[e.shortName,...`aliases`in e?e.aliases:[],...`internalAliases`in e?e.internalAliases:[]].map(t=>[t,e.handler]))];return Object.fromEntries(e)},`generateShapeMap`)();function R0(e){return e in L0}W(R0,`isValidShape`);var z0=new Map;async function B0(e,t,n){let r,i;t.shape===`rect`&&(t.rx&&t.ry?t.shape=`roundedRect`:t.shape=`squareRect`);let a=t.shape?L0[t.shape]:void 0;if(!a)throw Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;n.config.securityLevel===`sandbox`?o=`_top`:t.linkTarget&&(o=t.linkTarget||`_blank`),r=e.insert(`svg:a`).attr(`xlink:href`,t.link).attr(`target`,o??null),i=await a(r,t,n)}else i=await a(e,t,n),r=i;return r.attr(`data-look`,AX(t.look)),t.tooltip&&i.attr(`title`,t.tooltip),z0.set(t.id,r),t.haveCallback&&r.attr(`class`,r.attr(`class`)+` clickable`),r}W(B0,`insertNode`);var V0=W((e,t)=>{z0.set(t.id,e)},`setNodeElem`),H0=W(()=>{z0.clear()},`clear`),U0=W(e=>{let t=z0.get(e.id);G.trace(`Transforming node`,e.diff,e,`translate(`+(e.x-e.width/2-5)+`, `+e.width/2+`)`);let n=e.diff||0;return e.clusterNode?t.attr(`transform`,`translate(`+(e.x+n-e.width/2)+`, `+(e.y-e.height/2-8)+`)`):t.attr(`transform`,`translate(`+e.x+`, `+e.y+`)`),n},`positionNode`),W0=W((e,t,n,r,i,a=!1,o)=>{t.arrowTypeStart&&q0(e,`start`,t.arrowTypeStart,n,r,i,a,o),t.arrowTypeEnd&&q0(e,`end`,t.arrowTypeEnd,n,r,i,a,o)},`addEdgeMarkers`),G0={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}},K0=[`cross`,`point`,`circle`,`lollipop`,`aggregation`,`extension`,`composition`,`dependency`,`barb`],q0=W((e,t,n,r,i,a,o=!1,s)=>{let c=G0[n],l=c&&K0.includes(c.type);if(!c){G.warn(`Unknown arrow type: ${n}`);return}let u=`${i}_${a}-${c.type}${t===`start`?`Start`:`End`}${o&&l?`-margin`:``}`;if(s&&s.trim()!==``){let n=`${u}_${s.replace(/[^\dA-Za-z]/g,`_`)}`;if(!document.getElementById(n)){let e=document.getElementById(u);if(e){let t=e.cloneNode(!0);t.id=n,t.querySelectorAll(`path, circle, line`).forEach(e=>{e.setAttribute(`stroke`,s),c.fill&&e.setAttribute(`fill`,s)}),e.parentNode?.appendChild(t)}}e.attr(`marker-${t}`,`url(${r}#${n})`)}else e.attr(`marker-${t}`,`url(${r}#${u})`)},`addEdgeMarker`),J0=W(e=>typeof e==`string`?e:WR()?.flowchart?.curve,`resolveEdgeCurveType`),Y0=new Map,X0=new Map,Z0=W(()=>{Y0.clear(),X0.clear()},`clear`),Q0=W(e=>e?typeof e==`string`?e:e.reduce((e,t)=>e+`;`+t,``):``,`getLabelStyles`),$0=W(async(e,t)=>{let n=WR(),r=cR(n),{labelStyles:i}=X(t);t.labelStyle=i;let a=e.insert(`g`).attr(`class`,`edgeLabel`),o=a.insert(`g`).attr(`class`,`label`).attr(`data-id`,t.id),s=t.labelType===`markdown`,c=await f$(e,t.label,{style:Q0(t.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1,markdown:s,width:void 0},n);o.node().appendChild(c),G.info(`abc82`,t,t.labelType);let l=c.getBBox(),u=l;if(r){let e=c.children[0],t=YB(c);l=e.getBoundingClientRect(),u=l,t.attr(`width`,l.width),t.attr(`height`,l.height)}else{let e=YB(c).select(`text`).node();e&&typeof e.getBBox==`function`&&(u=e.getBBox())}o.attr(`transform`,HJ(u,r)),Y0.set(t.id,a),t.width=l.width,t.height=l.height;let d;if(t.startLabelLeft){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await x$(i,t.startLabelLeft,Q0(t.labelStyle)||``,!1,!1);d=a;let o=a.getBBox();if(r){let e=a.children[0],t=YB(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,HJ(o,r)),X0.get(t.id)||X0.set(t.id,{}),X0.get(t.id).startLeft=n,e2(d,t.startLabelLeft)}if(t.startLabelRight){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await x$(i,t.startLabelRight,Q0(t.labelStyle)||``,!1,!1);d=a,i.node().appendChild(a);let o=a.getBBox();if(r){let e=a.children[0],t=YB(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,HJ(o,r)),X0.get(t.id)||X0.set(t.id,{}),X0.get(t.id).startRight=n,e2(d,t.startLabelRight)}if(t.endLabelLeft){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await x$(i,t.endLabelLeft,Q0(t.labelStyle)||``,!1,!1);d=a;let o=a.getBBox();if(r){let e=a.children[0],t=YB(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,HJ(o,r)),n.node().appendChild(a),X0.get(t.id)||X0.set(t.id,{}),X0.get(t.id).endLeft=n,e2(d,t.endLabelLeft)}if(t.endLabelRight){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await x$(i,t.endLabelRight,Q0(t.labelStyle)||``,!1,!1);d=a;let o=a.getBBox();if(r){let e=a.children[0],t=YB(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,HJ(o,r)),n.node().appendChild(a),X0.get(t.id)||X0.set(t.id,{}),X0.get(t.id).endRight=n,e2(d,t.endLabelRight)}return c},`insertEdgeLabel`);function e2(e,t){cR(WR())&&e&&(e.style.width=t.length*9+`px`,e.style.height=`12px`)}W(e2,`setTerminalWidth`);var t2=W((e,t)=>{G.debug(`Moving label abc88 `,e.id,e.label,Y0.get(e.id),t);let n=t.updatedPath?t.updatedPath:t.originalPath,{subGraphTitleTotalMargin:r}=MX(WR());if(e.label){let i=Y0.get(e.id),a=e.x,o=e.y;if(n){let r=EX.calcLabelPosition(n);G.debug(`Moving label `+e.label+` from (`,a,`,`,o,`) to (`,r.x,`,`,r.y,`) abc88`),t.updatedPath&&(a=r.x,o=r.y)}i.attr(`transform`,`translate(${a}, ${o+r/2})`)}if(e.startLabelLeft){let t=X0.get(e.id).startLeft,r=e.x,i=e.y;if(n){let t=EX.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.startLabelRight){let t=X0.get(e.id).startRight,r=e.x,i=e.y;if(n){let t=EX.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.endLabelLeft){let t=X0.get(e.id).endLeft,r=e.x,i=e.y;if(n){let t=EX.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.endLabelRight){let t=X0.get(e.id).endRight,r=e.x,i=e.y;if(n){let t=EX.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}},`positionEdgeLabel`),n2=W((e,t)=>{let n=e.x,r=e.y,i=Math.abs(t.x-n),a=Math.abs(t.y-r),o=e.width/2,s=e.height/2;return i>=o||a>=s},`outsideNode`),r2=W((e,t,n)=>{G.debug(`intersection calc abc89:
|
|
521
|
+
outsidePoint: ${JSON.stringify(t)}
|
|
522
|
+
insidePoint : ${JSON.stringify(n)}
|
|
523
|
+
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);let r=e.x,i=e.y,a=Math.abs(r-n.x),o=e.width/2,s=n.x<t.x?o-a:o+a,c=e.height/2,l=Math.abs(t.y-n.y),u=Math.abs(t.x-n.x);if(Math.abs(i-t.y)*o>Math.abs(r-t.x)*c){let e=n.y<t.y?t.y-c-i:i-c-t.y;s=u*e/l;let r={x:n.x<t.x?n.x+s:n.x-u+s,y:n.y<t.y?n.y+l-e:n.y-l+e};return s===0&&(r.x=t.x,r.y=t.y),u===0&&(r.x=t.x),l===0&&(r.y=t.y),G.debug(`abc89 top/bottom calc, Q ${l}, q ${e}, R ${u}, r ${s}`,r),r}else{s=n.x<t.x?t.x-o-r:r-o-t.x;let e=l*s/u,i=n.x<t.x?n.x+u-s:n.x-u+s,a=n.y<t.y?n.y+e:n.y-e;return G.debug(`sides calc abc89, Q ${l}, q ${e}, R ${u}, r ${s}`,{_x:i,_y:a}),s===0&&(i=t.x,a=t.y),u===0&&(i=t.x),l===0&&(a=t.y),{x:i,y:a}}},`intersection`),i2=W((e,t)=>{G.warn(`abc88 cutPathAtIntersect`,e,t);let n=[],r=e[0],i=!1;return e.forEach(e=>{if(G.info(`abc88 checking point`,e,t),!n2(t,e)&&!i){let a=r2(t,r,e);G.debug(`abc88 inside`,e,r,a),G.debug(`abc88 intersection`,a,t);let o=!1;n.forEach(e=>{o||=e.x===a.x&&e.y===a.y}),n.some(e=>e.x===a.x&&e.y===a.y)?G.warn(`abc88 no intersect`,a,n):n.push(a),i=!0}else G.warn(`abc88 outside`,e,r),r=e,i||n.push(e)}),G.debug(`returning points`,n),n},`cutPathAtIntersect`);function a2(e){let t=[],n=[];for(let r=1;r<e.length-1;r++){let i=e[r-1],a=e[r],o=e[r+1];(i.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===o.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),n.push(r))}return{cornerPoints:t,cornerPointPositions:n}}W(a2,`extractCornerPoints`);var o2=W(function(e,t,n){let r=t.x-e.x,i=t.y-e.y,a=n/Math.sqrt(r*r+i*i);return{x:t.x-a*r,y:t.y-a*i}},`findAdjacentPoint`),s2=W(function(e){let{cornerPointPositions:t}=a2(e),n=[];for(let r=0;r<e.length;r++)if(t.includes(r)){let t=e[r-1],i=e[r+1],a=e[r],o=o2(t,a,5),s=o2(i,a,5),c=s.x-o.x,l=s.y-o.y;n.push(o);let u=Math.sqrt(2)*2,d={x:a.x,y:a.y};Math.abs(i.x-t.x)>10&&Math.abs(i.y-t.y)>=10?(G.debug(`Corner point fixing`,Math.abs(i.x-t.x),Math.abs(i.y-t.y)),d=a.x===o.x?{x:c<0?o.x-5+u:o.x+5-u,y:l<0?o.y-u:o.y+u}:{x:c<0?o.x-u:o.x+u,y:l<0?o.y-5+u:o.y+5-u}):G.debug(`Corner point skipping fixing`,Math.abs(i.x-t.x),Math.abs(i.y-t.y)),n.push(d,s)}else n.push(e[r]);return n},`fixCorners`),c2=W((e,t,n)=>{let r=e-t-n,i=Math.floor(r/4);return`0 ${t} ${Array(i).fill(`2 2`).join(` `)} ${n}`},`generateDashArray`),l2=W(function(e,t,n,r,i,a,o,s=!1){if(!o)throw Error(`insertEdge: missing diagramId for edge "${t.id}" \u2014 edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:c}=WR(),l=t.points,u=!1,d=i;var f=a;let p=[];for(let e in t.cssCompiledStyles)LX(e)||p.push(t.cssCompiledStyles[e]);G.debug(`UIO intersect check`,t.points,f.x,d.x),f.intersect&&d.intersect&&!s&&(l=l.slice(1,t.points.length-1),l.unshift(d.intersect(l[0])),G.debug(`Last point UIO`,t.start,`-->`,t.end,l[l.length-1],f,f.intersect(l[l.length-1])),l.push(f.intersect(l[l.length-1])));let m=btoa(JSON.stringify(l));t.toCluster&&(G.info(`to cluster abc88`,n.get(t.toCluster)),l=i2(t.points,n.get(t.toCluster).node),u=!0),t.fromCluster&&(G.debug(`from cluster abc88`,n.get(t.fromCluster),JSON.stringify(l,null,2)),l=i2(l.reverse(),n.get(t.fromCluster).node).reverse(),u=!0);let h=l.filter(e=>!Number.isNaN(e.y)),g=J0(t.curve);g!==`rounded`&&(h=s2(h));let _=iW;switch(g){case`linear`:_=iW;break;case`basis`:_=mW;break;case`cardinal`:_=CW;break;case`bumpX`:_=lW;break;case`bumpY`:_=uW;break;case`catmullRom`:_=AW;break;case`monotoneX`:_=WW;break;case`monotoneY`:_=GW;break;case`natural`:_=JW;break;case`step`:_=XW;break;case`stepAfter`:_=QW;break;case`stepBefore`:_=ZW;break;case`rounded`:_=iW;break;default:_=mW}let{x:v,y}=qJ(t),b=sW().x(v).y(y).curve(_),x;switch(t.thickness){case`normal`:x=`edge-thickness-normal`;break;case`thick`:x=`edge-thickness-thick`;break;case`invisible`:x=`edge-thickness-invisible`;break;default:x=`edge-thickness-normal`}switch(t.pattern){case`solid`:x+=` edge-pattern-solid`;break;case`dotted`:x+=` edge-pattern-dotted`;break;case`dashed`:x+=` edge-pattern-dashed`;break;default:x+=` edge-pattern-solid`}let S,C=g===`rounded`?u2(f2(h,t),5):b(h),w=Array.isArray(t.style)?t.style:[t.style],T=w.find(e=>e?.startsWith(`stroke:`)),E=``;t.animate&&(E=`edge-animation-fast`),t.animation&&(E=`edge-animation-`+t.animation);let D=!1;if(t.look===`handDrawn`){let n=k.svg(e);Object.assign([],h);let r=n.path(C,{roughness:.3,seed:c});x+=` transition`,S=YB(r).select(`path`).attr(`id`,`${o}-${t.id}`).attr(`class`,` `+x+(t.classes?` `+t.classes:``)+(E?` `+E:``)).attr(`style`,w?w.reduce((e,t)=>e+`;`+t,``):``);let i=S.attr(`d`);S.attr(`d`,i),e.node().appendChild(S.node())}else{let n=p.join(`;`),r=w?w.reduce((e,t)=>e+t+`;`,``):``,i=(n?n+`;`+r+`;`:r)+`;`+(w?w.reduce((e,t)=>e+`;`+t,``):``);S=e.append(`path`).attr(`d`,C).attr(`id`,`${o}-${t.id}`).attr(`class`,` `+x+(t.classes?` `+t.classes:``)+(E?` `+E:``)).attr(`style`,i),T=i.match(/stroke:([^;]+)/)?.[1],D=t.animate===!0||!!t.animation||n.includes(`animation`);let a=S.node(),s=typeof a.getTotalLength==`function`?a.getTotalLength():0,c=WJ[t.arrowTypeStart]||0,l=WJ[t.arrowTypeEnd]||0;if(t.look===`neo`&&!D){let e=`stroke-dasharray: ${t.pattern===`dotted`||t.pattern===`dashed`?c2(s,c,l):`0 ${c} ${s-c-l} ${l}`}; stroke-dashoffset: 0;`;S.attr(`style`,e+S.attr(`style`))}}S.attr(`data-edge`,!0),S.attr(`data-et`,`edge`),S.attr(`data-id`,t.id),S.attr(`data-points`,m),S.attr(`data-look`,AX(t.look)),t.showPoints&&h.forEach(t=>{e.append(`circle`).style(`stroke`,`red`).style(`fill`,`red`).attr(`r`,1).attr(`cx`,t.x).attr(`cy`,t.y)});let O=``;(WR().flowchart.arrowMarkerAbsolute||WR().state.arrowMarkerAbsolute)&&(O=window.location.protocol+`//`+window.location.host+window.location.pathname+window.location.search,O=O.replace(/\(/g,`\\(`).replace(/\)/g,`\\)`)),G.info(`arrowTypeStart`,t.arrowTypeStart),G.info(`arrowTypeEnd`,t.arrowTypeEnd);let A=!D&&t?.look===`neo`;W0(S,t,O,o,r,A,T);let ee=Math.floor(l.length/2),j=l[ee];EX.isLabelCoordinateInPath(j,S.attr(`d`))||(u=!0);let te={};return u&&(te.updatedPath=l),te.originalPath=t.points,te},`insertEdge`);function u2(e,t){if(e.length<2)return``;let n=``,r=e.length,i=1e-5;for(let a=0;a<r;a++){let o=e[a],s=e[a-1],c=e[a+1];if(a===0)n+=`M${o.x},${o.y}`;else if(a===r-1)n+=`L${o.x},${o.y}`;else{let e=o.x-s.x,r=o.y-s.y,a=c.x-o.x,l=c.y-o.y,u=Math.hypot(e,r),d=Math.hypot(a,l);if(u<i||d<i){n+=`L${o.x},${o.y}`;continue}let f=e/u,p=r/u,m=a/d,h=l/d,g=f*m+p*h,_=Math.acos(Math.max(-1,Math.min(1,g)));if(_<i||Math.abs(Math.PI-_)<i){n+=`L${o.x},${o.y}`;continue}let v=Math.min(t/Math.sin(_/2),u/2,d/2),y=o.x-f*v,b=o.y-p*v,x=o.x+m*v,S=o.y+h*v;n+=`L${y},${b}`,n+=`Q${o.x},${o.y} ${x},${S}`}}return n}W(u2,`generateRoundedPath`);function d2(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};let n=t.x-e.x,r=t.y-e.y;return{angle:Math.atan2(r,n),deltaX:n,deltaY:r}}W(d2,`calculateDeltaAndAngle`);function f2(e,t){let n=e.map(e=>({...e}));if(e.length>=2&&UJ[t.arrowTypeStart]){let r=UJ[t.arrowTypeStart],i=e[0],a=e[1],{angle:o}=d2(i,a),s=r*Math.cos(o),c=r*Math.sin(o);n[0].x=i.x+s,n[0].y=i.y+c}let r=e.length;if(r>=2&&UJ[t.arrowTypeEnd]){let i=UJ[t.arrowTypeEnd],a=e[r-1],o=e[r-2],{angle:s}=d2(o,a),c=i*Math.cos(s),l=i*Math.sin(s);n[r-1].x=a.x-c,n[r-1].y=a.y-l}return n}W(f2,`applyMarkerOffsetsToPoints`);var p2=W((e,t,n,r)=>{t.forEach(t=>{m2[t](e,n,r)})},`insertMarkers`),m2={extension:W((e,t,n)=>{G.trace(`Making markers for `,n),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-extensionStart`).attr(`class`,`marker extension `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 1,7 L18,13 V 1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-extensionEnd`).attr(`class`,`marker extension `+t).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`),e.append(`marker`).attr(`id`,n+`_`+t+`-extensionStart-margin`).attr(`class`,`marker extension `+t).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`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-extensionEnd-margin`).attr(`class`,`marker extension `+t).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`),composition:W((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionStart`).attr(`class`,`marker composition `+t).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`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionEnd`).attr(`class`,`marker composition `+t).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`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionStart-margin`).attr(`class`,`marker composition `+t).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`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionEnd-margin`).attr(`class`,`marker composition `+t).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`),aggregation:W((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationStart`).attr(`class`,`marker aggregation `+t).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`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationEnd`).attr(`class`,`marker aggregation `+t).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`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationStart-margin`).attr(`class`,`marker aggregation `+t).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`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationEnd-margin`).attr(`class`,`marker aggregation `+t).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`),dependency:W((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyStart`).attr(`class`,`marker dependency `+t).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`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyEnd`).attr(`class`,`marker dependency `+t).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`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyStart-margin`).attr(`class`,`marker dependency `+t).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`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyEnd-margin`).attr(`class`,`marker dependency `+t).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`),lollipop:W((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopStart`).attr(`class`,`marker lollipop `+t).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),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopEnd`).attr(`class`,`marker lollipop `+t).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),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopStart-margin`).attr(`class`,`marker lollipop `+t).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),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopEnd-margin`).attr(`class`,`marker lollipop `+t).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`),point:W((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-pointEnd`).attr(`class`,`marker `+t).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`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointStart`).attr(`class`,`marker `+t).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`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointEnd-margin`).attr(`class`,`marker `+t).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`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointStart-margin`).attr(`class`,`marker `+t).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`),circle:W((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-circleEnd`).attr(`class`,`marker `+t).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`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleStart`).attr(`class`,`marker `+t).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`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleEnd-margin`).attr(`class`,`marker `+t).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`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleStart-margin`).attr(`class`,`marker `+t).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`),cross:W((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-crossEnd`).attr(`class`,`marker cross `+t).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`),e.append(`marker`).attr(`id`,n+`_`+t+`-crossStart`).attr(`class`,`marker cross `+t).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`),e.append(`marker`).attr(`id`,n+`_`+t+`-crossEnd-margin`).attr(`class`,`marker cross `+t).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),e.append(`marker`).attr(`id`,n+`_`+t+`-crossStart-margin`).attr(`class`,`marker cross `+t).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`),barb:W((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-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`),barbNeo:W((e,t,n)=>{let{themeVariables:r}=$L(),{transitionColor:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-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`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-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`,`${i}`)},`barbNeo`),only_one:W((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneStart`).attr(`class`,`marker onlyOne `+t).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`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneEnd`).attr(`class`,`marker onlyOne `+t).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`),zero_or_one:W((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneStart`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`);r.append(`circle`).attr(`fill`,`white`).attr(`cx`,21).attr(`cy`,9).attr(`r`,6),r.append(`path`).attr(`d`,`M9,0 L9,18`);let i=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneEnd`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,30).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`);i.append(`circle`).attr(`fill`,`white`).attr(`cx`,9).attr(`cy`,9).attr(`r`,6),i.append(`path`).attr(`d`,`M21,0 L21,18`)},`zero_or_one`),one_or_more:W((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreStart`).attr(`class`,`marker oneOrMore `+t).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`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreEnd`).attr(`class`,`marker oneOrMore `+t).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`),zero_or_more:W((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreStart`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`);r.append(`circle`).attr(`fill`,`white`).attr(`cx`,48).attr(`cy`,18).attr(`r`,6),r.append(`path`).attr(`d`,`M0,18 Q18,0 36,18 Q18,36 0,18`);let i=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreEnd`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,39).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`);i.append(`circle`).attr(`fill`,`white`).attr(`cx`,9).attr(`cy`,18).attr(`r`,6),i.append(`path`).attr(`d`,`M21,18 Q39,0 57,18 Q39,36 21,18`)},`zero_or_more`),only_one_neo:W((e,t,n)=>{let{themeVariables:r}=$L(),{strokeWidth:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneStart`).attr(`class`,`marker onlyOne `+t).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`,`${i}`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneEnd`).attr(`class`,`marker onlyOne `+t).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`,`${i}`)},`only_one_neo`),zero_or_one_neo:W((e,t,n)=>{let{themeVariables:r}=$L(),{strokeWidth:i,mainBkg:a}=r,o=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneStart`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`);o.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,21).attr(`cy`,9).attr(`stroke-width`,`${i}`).attr(`r`,6),o.append(`path`).attr(`d`,`M9,0 L9,18`).attr(`stroke-width`,`${i}`);let s=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneEnd`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,30).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`);s.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,9).attr(`cy`,9).attr(`stroke-width`,`${i}`).attr(`r`,6),s.append(`path`).attr(`d`,`M21,0 L21,18`).attr(`stroke-width`,`${i}`)},`zero_or_one_neo`),one_or_more_neo:W((e,t,n)=>{let{themeVariables:r}=$L(),{strokeWidth:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreStart`).attr(`class`,`marker oneOrMore `+t).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`,`${i}`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreEnd`).attr(`class`,`marker oneOrMore `+t).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`,`${i}`)},`one_or_more_neo`),zero_or_more_neo:W((e,t,n)=>{let{themeVariables:r}=$L(),{strokeWidth:i,mainBkg:a}=r,o=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreStart`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`);o.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,45.5).attr(`cy`,18).attr(`r`,6).attr(`stroke-width`,`${i}`),o.append(`path`).attr(`d`,`M0,18 Q18,0 36,18 Q18,36 0,18`).attr(`stroke-width`,`${i}`);let s=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreEnd`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,39).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`);s.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,11).attr(`cy`,18).attr(`r`,6).attr(`stroke-width`,`${i}`),s.append(`path`).attr(`d`,`M21,18 Q39,0 57,18 Q39,36 21,18`).attr(`stroke-width`,`${i}`)},`zero_or_more_neo`),requirement_arrow:W((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_arrowEnd`).attr(`refX`,20).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).append(`path`).attr(`d`,`M0,0
|
|
524
|
+
L20,10
|
|
525
|
+
M20,10
|
|
526
|
+
L0,20`)},`requirement_arrow`),requirement_contains:W((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_containsStart`).attr(`refX`,0).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).append(`g`);r.append(`circle`).attr(`cx`,10).attr(`cy`,10).attr(`r`,9).attr(`fill`,`none`),r.append(`line`).attr(`x1`,1).attr(`x2`,19).attr(`y1`,10).attr(`y2`,10),r.append(`line`).attr(`y1`,1).attr(`y2`,19).attr(`x1`,10).attr(`x2`,10)},`requirement_contains`),requirement_arrow_neo:W((e,t,n)=>{let{themeVariables:r}=$L(),{strokeWidth:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_arrowEnd`).attr(`refX`,20).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).attr(`stroke-width`,`${i}`).attr(`viewBox`,`0 0 25 20`).append(`path`).attr(`d`,`M0,0
|
|
527
|
+
L20,10
|
|
528
|
+
M20,10
|
|
529
|
+
L0,20`).attr(`stroke-linejoin`,`miter`)},`requirement_arrow_neo`),requirement_contains_neo:W((e,t,n)=>{let{themeVariables:r}=$L(),{strokeWidth:i}=r,a=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_containsStart`).attr(`refX`,0).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`g`);a.append(`circle`).attr(`cx`,10).attr(`cy`,10).attr(`r`,9).attr(`fill`,`none`),a.append(`line`).attr(`x1`,1).attr(`x2`,19).attr(`y1`,10).attr(`y2`,10),a.append(`line`).attr(`y1`,1).attr(`y2`,19).attr(`x1`,10).attr(`x2`,10),a.selectAll(`*`).attr(`stroke-width`,`${i}`)},`requirement_contains_neo`)},h2=p2,g2={common:DR,getConfig:$L,insertCluster:E$,insertEdge:l2,insertEdgeLabel:$0,insertMarkers:h2,insertNode:B0,interpolateToCurve:ZY,labelHelper:p$,log:G,positionEdgeLabel:t2},_2={},v2=W(e=>{for(let t of e)_2[t.name]=t},`registerLayoutLoaders`);W(()=>{v2([{name:`dagre`,loader:W(async()=>await ZI(()=>import(`./dagre-KV5264BT-DvMqAy8J.js`),__vite__mapDeps([0,1,2,3,4,5,6])),`loader`)},...[{name:`cose-bilkent`,loader:W(async()=>await ZI(()=>import(`./cose-bilkent-S5V4N54A-YQtZwRYb.js`),__vite__mapDeps([7,8,9])),`loader`)}]])},`registerDefaultLayoutLoaders`)();var y2=W(async(e,t)=>{if(!(e.layoutAlgorithm in _2))throw Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let t of e.nodes){let n=t.domId||t.id;t.domId=`${e.diagramId}-${n}`}let n=_2[e.layoutAlgorithm],r=await n.loader(),{theme:i,themeVariables:a}=e.config,{useGradient:o,gradientStart:s,gradientStop:c}=a,l=t.attr(`id`);if(t.append(`defs`).append(`filter`).attr(`id`,`${l}-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`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),t.append(`defs`).append(`filter`).attr(`id`,`${l}-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`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),o){let e=t.append(`linearGradient`).attr(`id`,t.attr(`id`)+`-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);e.append(`svg:stop`).attr(`offset`,`0%`).attr(`stop-color`,s).attr(`stop-opacity`,1),e.append(`svg:stop`).attr(`offset`,`100%`).attr(`stop-color`,c).attr(`stop-opacity`,1)}return r.render(e,t,g2,{algorithm:n.algorithm})},`render`),b2=W((e=``,{fallback:t=`dagre`}={})=>{if(e in _2)return e;if(t in _2)return G.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw Error(`Both layout algorithms ${e} and ${t} are not registered.`)},`getRegisteredLayoutAlgorithm`),x2=`comm`,S2=`rule`,C2=`decl`,w2=`@import`,T2=`@namespace`,E2=`@keyframes`,D2=`@layer`,O2=Math.abs,k2=String.fromCharCode;function A2(e){return e.trim()}function j2(e,t,n){return e.replace(t,n)}function M2(e,t){return e.charCodeAt(t)|0}function N2(e,t,n){return e.slice(t,n)}function P2(e){return e.length}function F2(e){return e.length}function I2(e,t){return t.push(e),e}var L2=1,R2=1,z2=0,B2=0,V2=0,H2=``;function U2(e,t,n,r,i,a,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:L2,column:R2,length:o,return:``,siblings:s}}function W2(){return V2}function G2(){return V2=B2>0?M2(H2,--B2):0,R2--,V2===10&&(R2=1,L2--),V2}function K2(){return V2=B2<z2?M2(H2,B2++):0,R2++,V2===10&&(R2=1,L2++),V2}function q2(){return M2(H2,B2)}function J2(){return B2}function Y2(e,t){return N2(H2,e,t)}function X2(e){switch(e){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 Z2(e){return L2=R2=1,z2=P2(H2=e),B2=0,[]}function Q2(e){return H2=``,e}function $2(e){return A2(Y2(B2-1,n4(e===91?e+2:e===40?e+1:e)))}function e4(e){for(;(V2=q2())&&V2<33;)K2();return X2(e)>2||X2(V2)>3?``:` `}function t4(e,t){for(;--t&&K2()&&!(V2<48||V2>102||V2>57&&V2<65||V2>70&&V2<97););return Y2(e,J2()+(t<6&&q2()==32&&K2()==32))}function n4(e){for(;K2();)switch(V2){case e:return B2;case 34:case 39:e!==34&&e!==39&&n4(V2);break;case 40:e===41&&n4(e);break;case 92:K2();break}return B2}function r4(e,t){for(;K2()&&e+V2!==57&&!(e+V2===84&&q2()===47););return`/*`+Y2(t,B2-1)+`*`+k2(e===47?e:K2())}function i4(e){for(;!X2(q2());)K2();return Y2(e,B2)}function a4(e){return Q2(o4(``,null,null,null,[``],e=Z2(e),0,[0],e))}function o4(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=0,b=``,x=i,S=a,C=r,w=b;g;)switch(m=y,y=K2()){case 40:m!=108&&M2(w,d-1)==58?(v++,w+=`(`):w+=$2(y);break;case 41:v--,w+=`)`;break;case 34:case 39:case 91:w+=$2(y);break;case 9:case 10:case 13:case 32:if(v>0){w+=k2(y);break}w+=e4(m);break;case 92:w+=t4(J2()-1,7);continue;case 47:switch(q2()){case 42:case 47:I2(c4(r4(K2(),J2()),t,n,c),c),(X2(m||1)==5||X2(q2()||1)==5)&&P2(w)&&N2(w,-1,void 0)!==` `&&(w+=` `);break;default:w+=`/`}break;case 123*h:s[l++]=P2(w)*_;case 125*h:case 59:case 0:if(v>0&&y){w+=k2(y);break}switch(y){case 0:case 125:g=0;case 59+u:_==-1&&(w=j2(w,/\f/g,``)),p>0&&(P2(w)-d||h===0)&&I2(p>32?l4(w+`;`,r,n,d-1,c):l4(j2(w,` `,``)+`;`,r,n,d-2,c),c);break;case 59:w+=`;`;default:if(I2(C=s4(w,t,n,l,u,i,s,b,x=[],S=[],d,a),a),y===123)if(u===0)o4(w,t,C,C,x,a,d,s,S);else{switch(f){case 99:if(M2(w,3)===110)break;case 108:if(M2(w,2)===97)break;default:u=0;case 100:case 109:case 115:}u?o4(e,C,C,r&&I2(s4(e,C,C,0,0,i,s,b,i,x=[],d,S),S),i,S,d,s,r?x:S):o4(w,C,C,C,[``],S,0,s,S)}}l=u=p=0,h=_=1,b=w=``,d=o;break;case 58:d=1+P2(w),p=m;default:if(h<1){if(y==123)--h;else if(y==125&&h++==0&&G2()==125)continue}switch(w+=k2(y),y*h){case 38:_=u>0?1:(w+=`\f`,-1);break;case 44:if(v>0)break;s[l++]=(P2(w)-1)*_,_=1;break;case 64:q2()===45&&(w+=$2(K2())),f=q2(),u=d=P2(b=w+=i4(J2())),y++;break;case 45:m===45&&P2(w)==2&&(h=0)}}return a}function s4(e,t,n,r,i,a,o,s,c,l,u,d){for(var f=i-1,p=i===0?a:[``],m=F2(p),h=0,g=0,_=0;h<r;++h)for(var v=0,y=N2(e,f+1,f=O2(g=o[h])),b=e;v<m;++v)(b=A2(g>0?p[v]+` `+y:j2(y,/&\f/g,p[v])))&&(c[_++]=b);return U2(e,t,n,i===0?S2:s,c,l,u,d)}function c4(e,t,n,r){return U2(e,t,n,x2,k2(W2()),N2(e,2,-2),0,r)}function l4(e,t,n,r,i){return U2(e,t,n,C2,N2(e,0,r),N2(e,r+1,-1),r,i)}function u4(e,t){for(var n=``,r=0;r<e.length;r++)n+=t(e[r],r,e,t)||``;return n}function d4(e,t,n,r){switch(e.type){case D2:if(e.children.length)break;case w2:case T2:case C2:return e.return=e.return||e.value;case x2:return``;case E2:return e.return=e.value+`{`+u4(e.children,r)+`}`;case S2:if(!P2(e.value=e.props.join(`,`)))return``}return P2(n=u4(e.children,r))?e.return=e.value+`{`+n+`}`:``}var f4=y(Object.keys,Object),p4=Object.prototype.hasOwnProperty;function m4(e){if(!x(e))return f4(e);var t=[];for(var n in Object(e))p4.call(e,n)&&n!=`constructor`&&t.push(n);return t}var h4=l(c,`DataView`),g4=l(c,`Promise`),_4=l(c,`Set`),v4=l(c,`WeakMap`),y4=`[object Map]`,b4=`[object Object]`,x4=`[object Promise]`,S4=`[object Set]`,C4=`[object WeakMap]`,w4=`[object DataView]`,T4=o(h4),E4=o(f),D4=o(g4),O4=o(_4),k4=o(v4),A4=s;(h4&&A4(new h4(new ArrayBuffer(1)))!=w4||f&&A4(new f)!=y4||g4&&A4(g4.resolve())!=x4||_4&&A4(new _4)!=S4||v4&&A4(new v4)!=C4)&&(A4=function(e){var t=s(e),n=t==b4?e.constructor:void 0,r=n?o(n):``;if(r)switch(r){case T4:return w4;case E4:return y4;case D4:return x4;case O4:return S4;case k4:return C4}return t});var j4=A4,M4=`[object Map]`,N4=`[object Set]`,P4=Object.prototype.hasOwnProperty;function F4(e){if(e==null)return!0;if(p(e)&&(T(e)||typeof e==`string`||typeof e.splice==`function`||C(e)||v(e)||m(e)))return!e.length;var t=j4(e);if(t==M4||t==N4)return!e.size;if(x(e))return!m4(e).length;for(var n in e)if(P4.call(e,n))return!1;return!0}var I4=`c4`,L4={id:I4,detector:W(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await ZI(async()=>{let{diagram:e}=await import(`./c4Diagram-AHTNJAMY-BJWyymhT.js`);return{diagram:e}},__vite__mapDeps([10,11]));return{id:I4,diagram:e}},`loader`)},R4=`flowchart`,z4={id:R4,detector:W((e,t)=>t?.flowchart?.defaultRenderer===`dagre-wrapper`||t?.flowchart?.defaultRenderer===`elk`?!1:/^\s*graph/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await ZI(async()=>{let{diagram:e}=await import(`./flowDiagram-DWJPFMVM-CeIGHswO.js`);return{diagram:e}},__vite__mapDeps([12,13,14,15,16,11]));return{id:R4,diagram:e}},`loader`)},B4=`flowchart-v2`,V4={id:B4,detector:W((e,t)=>t?.flowchart?.defaultRenderer===`dagre-d3`?!1:(t?.flowchart?.defaultRenderer===`elk`&&(t.layout=`elk`),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer===`dagre-wrapper`?!0:/^\s*flowchart/.test(e)),`detector`),loader:W(async()=>{let{diagram:e}=await ZI(async()=>{let{diagram:e}=await import(`./flowDiagram-DWJPFMVM-CeIGHswO.js`);return{diagram:e}},__vite__mapDeps([12,13,14,15,16,11]));return{id:B4,diagram:e}},`loader`)},H4=`er`,U4={id:H4,detector:W(e=>/^\s*erDiagram/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await ZI(async()=>{let{diagram:e}=await import(`./erDiagram-SMLLAGMA-ZjZZH-zN.js`);return{diagram:e}},__vite__mapDeps([17,13,14,15]));return{id:H4,diagram:e}},`loader`)},W4=`gitGraph`,G4={id:W4,detector:W(e=>/^\s*gitGraph/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await ZI(async()=>{let{diagram:e}=await import(`./gitGraphDiagram-UUTBAWPF-2fnUKQRp.js`);return{diagram:e}},__vite__mapDeps([18,19,20,8,4,3,5,21,22,23,24,25,26,27,28,29,30,31]));return{id:W4,diagram:e}},`loader`)},K4=`gantt`,q4={id:K4,detector:W(e=>/^\s*gantt/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await ZI(async()=>{let{diagram:e}=await import(`./ganttDiagram-T4ZO3ILL-BeGMFmHq.js`);return{diagram:e}},__vite__mapDeps([32,8,33,34,35]));return{id:K4,diagram:e}},`loader`)},J4=`info`,Y4={id:J4,detector:W(e=>/^\s*info/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await ZI(async()=>{let{diagram:e}=await import(`./infoDiagram-42DDH7IO-KL_uq6JQ.js`);return{diagram:e}},__vite__mapDeps([36,19,20,8,4,3,5,21,22,23,24,25,26,27,28,29]));return{id:J4,diagram:e}},`loader`)},X4=`pie`,Z4={id:X4,detector:W(e=>/^\s*pie/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await ZI(async()=>{let{diagram:e}=await import(`./pieDiagram-DEJITSTG-DwmqzTu7.js`);return{diagram:e}},__vite__mapDeps([37,19,20,8,4,3,5,21,22,23,24,25,26,27,28,29,38,39,35,40,41,30]));return{id:X4,diagram:e}},`loader`)},Q4=`quadrantChart`,$4={id:Q4,detector:W(e=>/^\s*quadrantChart/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await ZI(async()=>{let{diagram:e}=await import(`./quadrantDiagram-34T5L4WZ-CdCBXbvb.js`);return{diagram:e}},__vite__mapDeps([42,33,34,35]));return{id:Q4,diagram:e}},`loader`)},e3=`xychart`,t3={id:e3,detector:W(e=>/^\s*xychart(-beta)?/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await ZI(async()=>{let{diagram:e}=await import(`./xychartDiagram-5P7HB3ND-Dh0MaaMp.js`);return{diagram:e}},__vite__mapDeps([43,33,34,35,39]));return{id:e3,diagram:e}},`loader`)},n3=`requirement`,r3={id:n3,detector:W(e=>/^\s*requirement(Diagram)?/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await ZI(async()=>{let{diagram:e}=await import(`./requirementDiagram-MS252O5E-32eCbPFl.js`);return{diagram:e}},__vite__mapDeps([44,14,15]));return{id:n3,diagram:e}},`loader`)},i3=`sequence`,a3={id:i3,detector:W(e=>/^\s*sequenceDiagram/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await ZI(async()=>{let{diagram:e}=await import(`./sequenceDiagram-FGHM5R23-Ck7ukfb7.js`);return{diagram:e}},__vite__mapDeps([45,31,11]));return{id:i3,diagram:e}},`loader`)},o3=`class`,s3={id:o3,detector:W((e,t)=>t?.class?.defaultRenderer===`dagre-wrapper`?!1:/^\s*classDiagram/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await ZI(async()=>{let{diagram:e}=await import(`./classDiagram-6PBFFD2Q-XeqY_hie.js`);return{diagram:e}},__vite__mapDeps([46,47,14,15,16,11]));return{id:o3,diagram:e}},`loader`)},c3=`classDiagram`,l3={id:c3,detector:W((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer===`dagre-wrapper`?!0:/^\s*classDiagram-v2/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await ZI(async()=>{let{diagram:e}=await import(`./classDiagram-v2-HSJHXN6E-D5yY32qd.js`);return{diagram:e}},__vite__mapDeps([48,47,14,15,16,11]));return{id:c3,diagram:e}},`loader`)},u3=`state`,d3={id:u3,detector:W((e,t)=>t?.state?.defaultRenderer===`dagre-wrapper`?!1:/^\s*stateDiagram/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await ZI(async()=>{let{diagram:e}=await import(`./stateDiagram-FHFEXIEX-BKJrixhp.js`);return{diagram:e}},__vite__mapDeps([49,1,2,3,4,5,14,15,50]));return{id:u3,diagram:e}},`loader`)},f3=`stateDiagram`,p3={id:f3,detector:W((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer===`dagre-wrapper`),`detector`),loader:W(async()=>{let{diagram:e}=await ZI(async()=>{let{diagram:e}=await import(`./stateDiagram-v2-QKLJ7IA2-Bio1QBYF.js`);return{diagram:e}},__vite__mapDeps([51,14,15,50]));return{id:f3,diagram:e}},`loader`)},m3=`journey`,h3={id:m3,detector:W(e=>/^\s*journey/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await ZI(async()=>{let{diagram:e}=await import(`./journeyDiagram-VCZTEJTY-DT7IVz7z.js`);return{diagram:e}},__vite__mapDeps([52,40,38,16,11]));return{id:m3,diagram:e}},`loader`)},g3={draw:W((e,t,n)=>{G.debug(`rendering svg for syntax error
|
|
530
|
+
`);let r=nG(t),i=r.append(`g`);r.attr(`viewBox`,`0 0 2412 512`),OR(r,100,512,!0),i.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`),i.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`),i.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`),i.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`),i.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`),i.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`),i.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`),i.append(`text`).attr(`class`,`error-text`).attr(`x`,1250).attr(`y`,400).attr(`font-size`,`100px`).style(`text-anchor`,`middle`).text(`mermaid version ${n}`)},`draw`)},_3=g3,v3={db:{},renderer:g3,parser:{parse:W(()=>{},`parse`)}},y3=`flowchart-elk`,b3={id:y3,detector:W((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer===`elk`?(t.layout=`elk`,!0):!1,`detector`),loader:W(async()=>{let{diagram:e}=await ZI(async()=>{let{diagram:e}=await import(`./flowDiagram-DWJPFMVM-CeIGHswO.js`);return{diagram:e}},__vite__mapDeps([12,13,14,15,16,11]));return{id:y3,diagram:e}},`loader`)},x3=`timeline`,S3={id:x3,detector:W(e=>/^\s*timeline/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await ZI(async()=>{let{diagram:e}=await import(`./timeline-definition-GMOUNBTQ-B_D-q7Kc.js`);return{diagram:e}},__vite__mapDeps([53,40,38]));return{id:x3,diagram:e}},`loader`)},C3=`mindmap`,w3={id:C3,detector:W(e=>/^\s*mindmap/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await ZI(async()=>{let{diagram:e}=await import(`./mindmap-definition-QFDTVHPH-Dov77gi8.js`);return{diagram:e}},__vite__mapDeps([54,14,15]));return{id:C3,diagram:e}},`loader`)},T3=`kanban`,E3={id:T3,detector:W(e=>/^\s*kanban/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await ZI(async()=>{let{diagram:e}=await import(`./kanban-definition-6JOO6SKY-CHPPLj8n.js`);return{diagram:e}},__vite__mapDeps([55,16]));return{id:T3,diagram:e}},`loader`)},D3=`sankey`,O3={id:D3,detector:W(e=>/^\s*sankey(-beta)?/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await ZI(async()=>{let{diagram:e}=await import(`./sankeyDiagram-XADWPNL6-BBDL_wPZ.js`);return{diagram:e}},__vite__mapDeps([56,39,35]));return{id:D3,diagram:e}},`loader`)},k3=`packet`,A3={id:k3,detector:W(e=>/^\s*packet(-beta)?/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await ZI(async()=>{let{diagram:e}=await import(`./diagram-TYMM5635-BujcYOHW.js`);return{diagram:e}},__vite__mapDeps([57,19,20,8,4,3,5,21,22,23,24,25,26,27,28,29,30]));return{id:k3,diagram:e}},`loader`)},j3=`radar`,M3={id:j3,detector:W(e=>/^\s*radar-beta/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await ZI(async()=>{let{diagram:e}=await import(`./diagram-MMDJMWI5-DNA312HK.js`);return{diagram:e}},__vite__mapDeps([58,19,20,8,4,3,5,21,22,23,24,25,26,27,28,29,30]));return{id:j3,diagram:e}},`loader`)},N3=`block`,P3={id:N3,detector:W(e=>/^\s*block(-beta)?/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await ZI(async()=>{let{diagram:e}=await import(`./blockDiagram-DXYQGD6D-ZqrNO8HM.js`);return{diagram:e}},__vite__mapDeps([59,2,3,4,13,6,16]));return{id:N3,diagram:e}},`loader`)},F3=`treeView`,I3={id:F3,detector:W(e=>/^\s*treeView-beta/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await ZI(async()=>{let{diagram:e}=await import(`./diagram-5BDNPKRD-BwrN8bUG.js`);return{diagram:e}},__vite__mapDeps([60,19,20,8,4,3,5,21,22,23,24,25,26,27,28,29,30,31]));return{id:F3,diagram:e}},`loader`)},L3=`architecture`,R3={id:L3,detector:W(e=>/^\s*architecture/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await ZI(async()=>{let{diagram:e}=await import(`./architectureDiagram-Q4EWVU46-BmLJotd1.js`);return{diagram:e}},__vite__mapDeps([61,8,19,20,4,3,5,21,22,23,24,25,26,27,28,29,9,30]));return{id:L3,diagram:e}},`loader`)},z3=`ishikawa`,B3={id:z3,detector:W(e=>/^\s*ishikawa(-beta)?\b/i.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await ZI(async()=>{let{diagram:e}=await import(`./ishikawaDiagram-UXIWVN3A-DYWG2VdA.js`);return{diagram:e}},__vite__mapDeps([62,63]));return{id:z3,diagram:e}},`loader`)},V3=`venn`,H3={id:V3,detector:W(e=>/^\s*venn-beta/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await ZI(async()=>{let{diagram:e}=await import(`./vennDiagram-DHZGUBPP-CvHqv3h2.js`);return{diagram:e}},__vite__mapDeps([64,63]));return{id:V3,diagram:e}},`loader`)},U3=`treemap`,W3={id:U3,detector:W(e=>/^\s*treemap/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await ZI(async()=>{let{diagram:e}=await import(`./diagram-G4DWMVQ6-Cqaj-jnn.js`);return{diagram:e}},__vite__mapDeps([65,19,20,8,4,3,5,21,22,23,24,25,26,27,28,29,34,39,35,30,15]));return{id:U3,diagram:e}},`loader`)},G3=`wardley-beta`,K3={id:G3,detector:W(e=>/^\s*wardley-beta/i.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await ZI(async()=>{let{diagram:e}=await import(`./wardleyDiagram-NUSXRM2D-CYRpN4xk.js`);return{diagram:e}},__vite__mapDeps([66,19,20,8,4,3,5,21,22,23,24,25,26,27,28,29,30]));return{id:G3,diagram:e}},`loader`)},q3=!1,J3=W(()=>{q3||(q3=!0,JR(`error`,v3,e=>e.toLowerCase().trim()===`error`),JR(`---`,{db:{clear:W(()=>{},`clear`)},styles:{},renderer:{draw:W(()=>{},`draw`)},parser:{parse:W(()=>{throw 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:W(()=>null,`init`)},e=>e.toLowerCase().trimStart().startsWith(`---`)),iL(b3,w3,R3),iL(L4,E3,l3,s3,U4,q4,Y4,Z4,r3,a3,V4,z4,S3,G4,p3,d3,h3,$4,O3,A3,t3,P3,I3,M3,B3,W3,H3,K3))},`addDiagrams`),Y3=W(async()=>{G.debug(`Loading registered diagrams`);let e=(await Promise.allSettled(Object.entries(nL).map(async([e,{detector:t,loader:n}])=>{if(n)try{YR(e)}catch{try{let{diagram:e,id:r}=await n();JR(r,e,t)}catch(t){throw G.error(`Failed to load external diagram with key ${e}. Removing from detectors.`),delete nL[e],t}}}))).filter(e=>e.status===`rejected`);if(e.length>0){G.error(`Failed to load ${e.length} external diagrams`);for(let t of e)G.error(t);throw Error(`Failed to load ${e.length} external diagrams`)}},`loadRegisteredDiagrams`),X3=`graphics-document document`;function Z3(e,t){e.attr(`role`,X3),t!==``&&e.attr(`aria-roledescription`,t)}W(Z3,`setA11yDiagramInfo`);function Q3(e,t,n,r){if(e.insert!==void 0){if(n){let t=`chart-desc-${r}`;e.attr(`aria-describedby`,t),e.insert(`desc`,`:first-child`).attr(`id`,t).text(n)}if(t){let n=`chart-title-${r}`;e.attr(`aria-labelledby`,n),e.insert(`title`,`:first-child`).attr(`id`,n).text(t)}}}W(Q3,`addSVGa11yTitleDescription`);var $3=class e{constructor(e,t,n,r,i){this.type=e,this.text=t,this.db=n,this.parser=r,this.renderer=i}static{W(this,`Diagram`)}static async fromText(t,n={}){let r=$L(),i=rL(t,r);t=DX(t)+`
|
|
531
|
+
`;try{YR(i)}catch{let e=oL(i);if(!e)throw new tL(`Diagram ${i} not found.`);let{id:t,diagram:n}=await e();JR(t,n)}let{db:a,parser:o,renderer:s,init:c}=YR(i);return o.parser&&(o.parser.yy=a),a.clear?.(),c?.(r),n.title&&a.setDiagramTitle?.(n.title),await o.parse(t),new e(i,t,a,o,s)}async render(e,t){await this.renderer.draw(this.text,e,t,this)}getParser(){return this.parser}getType(){return this.type}},e6=[],t6=W(()=>{e6.forEach(e=>{e()}),e6=[]},`attachFunctions`),n6=W(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,``).trimStart(),`cleanupComments`);function r6(e){let t=e.match(QI);if(!t)return{text:e,metadata:{}};let n=VJ(t[1],{schema:BJ})??{};n=typeof n==`object`&&!Array.isArray(n)?n:{};let r={};return n.displayMode&&(r.displayMode=n.displayMode.toString()),n.title&&(r.title=n.title.toString()),n.config&&(r.config=n.config),{text:e.slice(t[0].length),metadata:r}}W(r6,`extractFrontMatter`);var i6=W(e=>e.replace(/\r\n?/g,`
|
|
532
|
+
`).replace(/<(\w+)([^>]*)>/g,(e,t,n)=>`<`+t+n.replace(/="([^"]*)"/g,`='$1'`)+`>`),`cleanupText`),a6=W(e=>{let{text:t,metadata:n}=r6(e),{displayMode:r,title:i,config:a={}}=n;return r&&(a.gantt||={},a.gantt.displayMode=r),{title:i,config:a,text:t}},`processFrontmatter`),o6=W(e=>{let t=EX.detectInit(e)??{},n=EX.detectDirective(e,`wrap`);return Array.isArray(n)?t.wrap=n.some(({type:e})=>e===`wrap`):n?.type===`wrap`&&(t.wrap=!0),{text:YY(e),directive:t}},`processDirectives`);function s6(e){let t=a6(i6(e)),n=o6(t.text),r=TX(t.config,n.directive);return e=n6(n.text),{code:e,title:t.title,config:r}}W(s6,`preprocessDiagram`);function c6(e){let t=new TextEncoder().encode(e),n=Array.from(t,e=>String.fromCodePoint(e)).join(``);return btoa(n)}W(c6,`toBase64`);var l6=5e4,u6=`graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa`,d6=`sandbox`,f6=`loose`,p6=`http://www.w3.org/2000/svg`,m6=`http://www.w3.org/1999/xlink`,h6=`http://www.w3.org/1999/xhtml`,g6=`100%`,_6=`100%`,v6=`border:0;margin:0;`,y6=`margin:0`,b6=`allow-top-navigation-by-user-activation allow-popups`,x6=`The "iframe" tag is not supported by your browser.`,S6=[`foreignobject`],C6=[`dominant-baseline`];function w6(e){let t=s6(e);return nR(),tR(t.config??{}),t}W(w6,`processAndSetConfigs`);async function T6(e,t){J3();try{let{code:t,config:n}=w6(e);return{diagramType:(await I6(t)).type,config:n}}catch(e){if(t?.suppressErrors)return!1;throw e}}W(T6,`parse`);var E6=W((e,t,n=[])=>`
|
|
533
|
+
.${e} ${t} { ${n.join(` !important; `)} !important; }`,`cssImportantStyles`),D6=W((e,t=new Map)=>{let n=``;if(e.themeCSS!==void 0&&(n+=`
|
|
534
|
+
${e.themeCSS}`),e.fontFamily!==void 0&&(n+=`
|
|
535
|
+
:root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(n+=`
|
|
536
|
+
:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){let r=cR(e)?[`> *`,`span`]:[`rect`,`polygon`,`ellipse`,`circle`,`path`];t.forEach(e=>{F4(e.styles)||r.forEach(t=>{n+=E6(e.id,t,e.styles)}),F4(e.textStyles)||(n+=E6(e.id,`tspan`,(e?.textStyles||[]).map(e=>e.replace(`color`,`fill`))))})}return n},`createCssStyles`),O6=W((e,t,n,r)=>u4(a4(`${r}{${gte(t,D6(e,n),{...e.themeVariables,theme:e.theme,look:e.look},r)}}`),d4),`createUserStyles`),k6=W((e=``,t,n)=>{let r=e;return!n&&!t&&(r=r.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,`marker-end="url(#`)),r=OX(r),r=r.replace(/<br>/g,`<br/>`),r},`cleanUpSvgCode`),A6=W((e=``,t)=>`<iframe style="width:${g6};height:${t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+`px`:_6};${v6}" src="data:text/html;charset=UTF-8;base64,${c6(`<body style="${y6}">${e}</body>`)}" sandbox="${b6}">
|
|
537
|
+
${x6}
|
|
538
|
+
</iframe>`,`putIntoIFrame`),j6=W((e,t,n,r,i)=>{let a=e.append(`div`);a.attr(`id`,n),r&&a.attr(`style`,r);let o=a.append(`svg`).attr(`id`,t).attr(`width`,`100%`).attr(`xmlns`,p6);return i&&o.attr(`xmlns:xlink`,i),o.append(`g`),e},`appendDivSvgG`);function M6(e,t){return e.append(`iframe`).attr(`id`,t).attr(`style`,`width: 100%; height: 100%;`).attr(`sandbox`,``)}W(M6,`sandboxedIframe`);var N6=W((e,t,n,r)=>{e.getElementById(t)?.remove(),e.getElementById(n)?.remove(),e.getElementById(r)?.remove()},`removeExistingElements`),P6=W(async function(e,t,n){J3();let r=w6(t);t=r.code;let i=$L();G.debug(i),t.length>(i?.maxTextSize??l6)&&(t=u6);let a=`#`+e,o=`i`+e,s=`#`+o,c=`d`+e,l=`#`+c,u=W(()=>{let e=YB(f?s:l).node();e&&`remove`in e&&e.remove()},`removeTempElements`),d=YB(`body`),f=i.securityLevel===d6,p=i.securityLevel===f6,m=i.fontFamily;n===void 0?(N6(document,e,c,o),f?(d=YB(M6(YB(`body`),o).nodes()[0].contentDocument.body),d.node().style.margin=0):d=YB(`body`),j6(d,e,c)):(n&&(n.innerHTML=``),f?(d=YB(M6(YB(n),o).nodes()[0].contentDocument.body),d.node().style.margin=0):d=YB(n),j6(d,e,c,`font-family: ${m}`,m6));let h,g;try{h=await $3.fromText(t,{title:r.title})}catch(e){if(i.suppressErrorRendering)throw u(),e;h=await $3.fromText(`error`),g=e}let _=d.select(l).node(),v=h.type,y=_.firstChild,b=y.firstChild,x=h.renderer.getClasses?.(t,h),S=O6(i,v,x,a),C=document.createElement(`style`);C.innerHTML=S,y.insertBefore(C,b);try{await h.renderer.draw(t,e,`11.14.0`,h)}catch(n){throw i.suppressErrorRendering?u():_3.draw(t,e,`11.14.0`),n}let w=d.select(`${l} svg`),T=h.db.getAccTitle?.(),E=h.db.getAccDescription?.();L6(v,w,T,E),d.select(`[id="${e}"]`).selectAll(`foreignobject > *`).attr(`xmlns`,h6);let D=d.select(l).node().innerHTML;if(G.debug(`config.arrowMarkerAbsolute`,i.arrowMarkerAbsolute),D=k6(D,f,HL(i.arrowMarkerAbsolute)),f){let e=d.select(l+` svg`).node();D=A6(D,e)}else p||(D=qI.sanitize(D,{ADD_TAGS:S6,ADD_ATTR:C6,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(t6(),g)throw g;return u(),{diagramType:v,svg:D,bindFunctions:h.db.bindFunctions}},`render`);function F6(e={}){let t=cL({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||={},t.themeVariables.fontFamily=t.fontFamily),YL(t),t?.theme&&t.theme in NL?t.themeVariables=NL[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=NL.default.getThemeVariables(t.themeVariables)),gF((typeof t==`object`?JL(t):ZL()).logLevel),J3()}W(F6,`initialize`);var I6=W((e,t={})=>{let{code:n}=s6(e);return $3.fromText(n,t)},`getDiagramFromText`);function L6(e,t,n,r){Z3(t,e),Q3(t,n,r,t.attr(`id`))}W(L6,`addA11yInfo`);var R6=Object.freeze({render:P6,parse:T6,getDiagramFromText:I6,initialize:F6,getConfig:$L,setConfig:QL,getSiteConfig:ZL,updateSiteConfig:XL,reset:W(()=>{nR()},`reset`),globalReset:W(()=>{nR(VL)},`globalReset`),defaultConfig:VL});gF($L().logLevel),nR($L());var z6=W((e,t,n)=>{G.warn(e),SX(e)?(n&&n(e.str,e.hash),t.push({...e,message:e.str,error:e})):(n&&n(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},`handleError`),B6=W(async function(e={querySelector:`.mermaid`}){try{await V6(e)}catch(t){if(SX(t)&&G.error(t.str),Q6.parseError&&Q6.parseError(t),!e.suppressErrors)throw G.error(`Use the suppressErrors option to suppress these errors`),t}},`run`),V6=W(async function({postRenderCallback:e,querySelector:t,nodes:n}={querySelector:`.mermaid`}){let r=R6.getConfig();G.debug(`${e?``:`No `}Callback function found`);let i;if(n)i=n;else if(t)i=document.querySelectorAll(t);else throw Error(`Nodes and querySelector are both undefined`);G.debug(`Found ${i.length} diagrams`),r?.startOnLoad!==void 0&&(G.debug(`Start On Load: `+r?.startOnLoad),R6.updateSiteConfig({startOnLoad:r?.startOnLoad}));let a=new EX.InitIDGenerator(r.deterministicIds,r.deterministicIDSeed),o,s=[];for(let t of Array.from(i)){if(G.info(`Rendering diagram: `+t.id),t.getAttribute(`data-processed`))continue;t.setAttribute(`data-processed`,`true`);let n=`mermaid-${a.next()}`;o=t.innerHTML,o=RQ(EX.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,`<br/>`);let r=EX.detectInit(o);r&&G.debug(`Detected early reinit: `,r);try{let{svg:r,bindFunctions:i}=await Z6(n,o,t);t.innerHTML=r,e&&await e(n),i&&i(t)}catch(e){z6(e,s,Q6.parseError)}}if(s.length>0)throw s[0]},`runThrowsErrors`),H6=W(function(e){R6.initialize(e)},`initialize`),U6=W(async function(e,t,n){G.warn(`mermaid.init is deprecated. Please use run instead.`),e&&H6(e);let r={postRenderCallback:n,querySelector:`.mermaid`};typeof t==`string`?r.querySelector=t:t&&(t instanceof HTMLElement?r.nodes=[t]:r.nodes=t),await B6(r)},`init`),W6=W(async(e,{lazyLoad:t=!0}={})=>{J3(),iL(...e),t===!1&&await Y3()},`registerExternalDiagrams`),G6=W(function(){if(Q6.startOnLoad){let{startOnLoad:e}=R6.getConfig();e&&Q6.run().catch(e=>G.error(`Mermaid failed to initialize`,e))}},`contentLoaded`);typeof document<`u`&&window.addEventListener(`load`,G6,!1);var K6=W(function(e){Q6.parseError=e},`setParseErrorHandler`),q6=[],J6=!1,Y6=W(async()=>{if(!J6){for(J6=!0;q6.length>0;){let e=q6.shift();if(e)try{await e()}catch(e){G.error(`Error executing queue`,e)}}J6=!1}},`executeQueue`),X6=W(async(e,t)=>new Promise((n,r)=>{let i=W(()=>new Promise((i,a)=>{R6.parse(e,t).then(e=>{i(e),n(e)},e=>{G.error(`Error parsing`,e),Q6.parseError?.(e),a(e),r(e)})}),`performCall`);q6.push(i),Y6().catch(r)}),`parse`),Z6=W((e,t,n)=>new Promise((r,i)=>{let a=W(()=>new Promise((a,o)=>{R6.render(e,t,n).then(e=>{a(e),r(e)},e=>{G.error(`Error parsing`,e),Q6.parseError?.(e),o(e),i(e)})}),`performCall`);q6.push(a),Y6().catch(i)}),`render`),Q6={startOnLoad:!0,mermaidAPI:R6,parse:X6,render:Z6,init:U6,run:B6,registerExternalDiagrams:W6,registerLayoutLoaders:v2,initialize:H6,parseError:void 0,contentLoaded:G6,setParseErrorHandler:K6,detectType:rL,registerIconPacks:HQ,getRegisteredDiagramsMetadata:W(()=>Object.keys(nL).map(e=>({id:e})),`getRegisteredDiagramsMetadata`)},$6=Q6,e8=()=>document.documentElement.classList.contains(`dark`);$6.initialize({startOnLoad:!1,theme:e8()?`dark`:`default`,suppressErrorRendering:!0});var t8=(0,P.memo)(function({svgContent:e,error:t,isLoading:n}){return(0,z.jsx)(`div`,{className:`mermaid-fullscreen-chart`,children:t?(0,z.jsx)(`div`,{className:`mermaid-error`,children:t}):n?(0,z.jsx)(`div`,{className:`mermaid-loading`,children:`渲染中...`}):e?(0,z.jsx)(`div`,{className:`mermaid-fullscreen-svg-container`,dangerouslySetInnerHTML:{__html:e}}):null})});function n8({source:e,open:t,onOpenChange:n,onSourceChange:r}){let[i,a]=(0,P.useState)(!1),[o,s]=(0,P.useState)(``),[c,l]=(0,P.useState)(``),[u,d]=(0,P.useState)(!1),[f,p]=(0,P.useState)(0),[m,h]=(0,P.useState)(1),[g,_]=(0,P.useState)({x:0,y:0}),[v,y]=(0,P.useState)(!1),b=(0,P.useRef)({x:0,y:0,posX:0,posY:0}),[x,S]=(0,P.useState)(null),C=(0,P.useRef)(null),w=(0,P.useRef)(null),T=(0,P.useRef)(`mermaid-fullscreen-${Math.random().toString(36).substr(2,9)}`),E=(0,P.useRef)(null),D=(0,P.useRef)(i);D.current=i;let O=(0,P.useRef)(null);(0,P.useEffect)(()=>{let e=()=>{p(e=>e+1)};return window.addEventListener(`theme-change`,e),()=>window.removeEventListener(`theme-change`,e)},[]);let k=(0,P.useCallback)(()=>{O.current&&=(clearTimeout(O.current),null),d(!1)},[]);(0,P.useEffect)(()=>{if(!t)return;h(1),_({x:0,y:0}),d(!0),l(``);let n=e8()?`dark`:`default`;$6.initialize({startOnLoad:!1,theme:n,suppressErrorRendering:!0}),T.current=`mermaid-fullscreen-${Math.random().toString(36).substr(2,9)}`,$6.render(T.current,e).then(({svg:e})=>{s(e),d(!1)}).catch(e=>{l(e.message||`Mermaid render error`),d(!1)})},[t,f]),(0,P.useEffect)(()=>{if(i)return k(),O.current=setTimeout(()=>{let t=E.current?.value??e;d(!0),T.current=`mermaid-fullscreen-${Math.random().toString(36).substr(2,9)}`,$6.render(T.current,t).then(({svg:e})=>{s(e),d(!1)}).catch(e=>{l(e.message||`Mermaid render error`),d(!1)})},800),()=>k()},[i,e,k,f]);let A=e=>{let t=e[0].clientX-e[1].clientX,n=e[0].clientY-e[1].clientY;return Math.sqrt(t*t+n*n)},ee=(0,P.useCallback)(e=>{e.preventDefault();let t=e.deltaY>0?-.1:.1;h(e=>Math.min(Math.max(e+t,.5),5))},[]),j=(0,P.useCallback)(e=>{m<=1||(y(!0),b.current={x:e.clientX,y:e.clientY,posX:g.x,posY:g.y})},[m,g]),te=(0,P.useCallback)(e=>{if(!v)return;let t=e.clientX-b.current.x,n=e.clientY-b.current.y;_({x:b.current.posX+t,y:b.current.posY+n})},[v]),M=(0,P.useCallback)(()=>{y(!1)},[]),ne=(0,P.useCallback)(()=>{h(1),_({x:0,y:0})},[]),N=(0,P.useCallback)(e=>{e.touches.length===2?(e.preventDefault(),S({x:0,y:0,distance:A(e.touches)})):e.touches.length===1&&m>1&&(y(!0),C.current={x:e.touches[0].clientX,y:e.touches[0].clientY})},[m]),re=(0,P.useCallback)(e=>{if(e.touches.length===2&&x){e.preventDefault();let t=A(e.touches),n=(t-x.distance)/200;h(e=>Math.min(Math.max(e+n,.5),5)),S({x:0,y:0,distance:t})}else if(e.touches.length===1&&v&&C.current){let t=e.touches[0].clientX-C.current.x,n=e.touches[0].clientY-C.current.y;_(e=>({x:e.x+t,y:e.y+n})),C.current={x:e.touches[0].clientX,y:e.touches[0].clientY}}},[x,v]),ie=(0,P.useCallback)(e=>{e.touches.length<2&&S(null),e.touches.length===0&&(y(!1),C.current=null)},[]),ae=(0,P.useCallback)(()=>{h(e=>Math.min(e+.25,5))},[]),oe=(0,P.useCallback)(()=>{h(e=>Math.max(e-.25,.5))},[]),se=(0,P.useCallback)(()=>{h(1),_({x:0,y:0})},[]);return(0,z.jsx)(Fo,{open:t,onOpenChange:n,children:(0,z.jsxs)(Lo,{children:[(0,z.jsx)(Ro,{className:`fixed inset-0 z-50 bg-black/80 animate-fade-in`}),(0,z.jsxs)(zo,{className:`mermaid-fullscreen-dialog`,style:{position:`fixed`,left:0,top:0,right:0,bottom:0,width:`100vw`,height:`100vh`,maxWidth:`100vw`,maxHeight:`100vh`,transform:`none`,borderRadius:0,margin:0,padding:0,zIndex:51},children:[(0,z.jsx)(Bo,{className:`sr-only`,children:`Mermaid 图表全屏预览`}),(0,z.jsxs)(`div`,{className:`mermaid-fullscreen-header`,children:[(0,z.jsx)(`div`,{className:`mermaid-fullscreen-controls`,children:(0,z.jsxs)(`button`,{type:`button`,className:`flex items-center gap-2 px-3 py-2 rounded-md text-sm hover:bg-accent hover:text-accent-foreground transition-colors`,onClick:()=>{if(D.current){k();let t=E.current?.value??e;d(!0),l(``),T.current=`mermaid-fullscreen-${Math.random().toString(36).substr(2,9)}`;let n=e8()?`dark`:`default`;$6.initialize({startOnLoad:!1,theme:n,suppressErrorRendering:!0}),$6.render(T.current,t).then(({svg:n})=>{s(n),d(!1),t!==e&&r?.(t)}).catch(e=>{l(e.message||`Mermaid render error`),d(!1)}),a(!1)}else a(!0)},children:[i?(0,z.jsx)(Fe,{className:`size-4`}):(0,z.jsx)(Pe,{className:`size-4`}),i?`预览图表`:`查看源码`]})}),(0,z.jsxs)(Ho,{className:`rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground`,children:[(0,z.jsx)(Ke,{className:`size-4`}),(0,z.jsx)(`span`,{className:`sr-only`,children:`关闭`})]})]}),(0,z.jsxs)(`div`,{className:`mermaid-fullscreen-body`,children:[(0,z.jsxs)(`div`,{ref:w,className:`mermaid-fullscreen-content`,style:{cursor:m>1?v?`grabbing`:`grab`:`default`,width:`100%`,height:`100%`,touchAction:`none`},onWheel:ee,onMouseDown:j,onMouseMove:te,onMouseUp:M,onMouseLeave:M,onDoubleClick:ne,onTouchStart:N,onTouchMove:re,onTouchEnd:ie,children:[(0,z.jsx)(`div`,{style:{transform:`translate(${g.x}px, ${g.y}px) scale(${m})`,transformOrigin:`center center`,transition:v?`none`:`transform 0.1s ease-out`,width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,z.jsx)(t8,{svgContent:o,error:c,isLoading:u})}),(0,z.jsxs)(`div`,{className:`mermaid-fullscreen-zoom-controls`,children:[(0,z.jsx)(`button`,{onClick:ae,title:`放大`,children:(0,z.jsx)(Je,{className:`size-4`})}),(0,z.jsx)(`button`,{onClick:oe,title:`缩小`,children:(0,z.jsx)(Ye,{className:`size-4`})}),(0,z.jsx)(`button`,{onClick:se,title:`重置`,children:(0,z.jsx)(Ve,{className:`size-4`})})]})]}),i&&(0,z.jsx)(`div`,{className:`mermaid-fullscreen-source-panel source-edit-mode`,children:(0,z.jsx)(`textarea`,{ref:E,defaultValue:e,className:`mermaid-fullscreen-source-editor`,spellCheck:!1,onChange:()=>{k(),O.current=setTimeout(()=>{let e=E.current?.value??``;d(!0),T.current=`mermaid-fullscreen-${Math.random().toString(36).substr(2,9)}`,$6.render(T.current,e).then(({svg:e})=>{s(e),d(!1)}).catch(e=>{l(e.message||`Mermaid render error`),d(!1)})},800)}},e)})]})]})]})})}var r8=[{level:0,label:`正文`},{level:1,label:`H1`},{level:2,label:`H2`},{level:3,label:`H3`},{level:4,label:`H4`},{level:5,label:`H5`},{level:6,label:`H6`}];function i8({editor:e,variant:t=`desktop`}){let[n,r]=(0,P.useState)(!1),i=(0,P.useRef)(null),a=(()=>{for(let t=1;t<=6;t++)if(e.isActive(`heading`,{level:t}))return t;return 0})(),o=r8.find(e=>e.level===a)?.label||`正文`;(0,P.useEffect)(()=>{let e=e=>{i.current&&!i.current.contains(e.target)&&r(!1)};return n&&document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[n]);let s=t=>{t===0?e.chain().focus().setParagraph().run():e.chain().focus().toggleHeading({level:t}).run(),r(!1)};return(0,z.jsxs)(`div`,{className:`editor-toolbar-heading`,ref:i,children:[(0,z.jsxs)(`button`,{type:`button`,contentEditable:!1,className:`editor-toolbar-btn editor-toolbar-btn-heading ${n?`open`:``} ${a>0?`active`:``}`,onClick:()=>r(!n),title:`标题`,"aria-expanded":n,children:[(0,z.jsx)(`span`,{className:`editor-toolbar-btn-heading-label`,children:o}),(0,z.jsx)(me,{className:`size-3`})]}),n&&(0,z.jsx)(`div`,{className:`editor-toolbar-dropdown-menu ${t===`mobile`?`editor-toolbar-dropdown-menu-mobile`:``}`,children:r8.map(e=>(0,z.jsx)(`button`,{type:`button`,contentEditable:!1,className:`editor-toolbar-dropdown-item ${e.level===a?`active`:``}`,onClick:()=>s(e.level),children:(0,z.jsx)(`span`,{className:`heading-label heading-${e.level}`,children:e.label})},e.level))})]})}var a8=[{icon:fe,label:`粗体`,isActive:e=>e.isActive(`bold`),action:e=>e.chain().focus().toggleBold().run()},{icon:ke,label:`斜体`,isActive:e=>e.isActive(`italic`),action:e=>e.chain().focus().toggleItalic().run()},{icon:Me,label:`无序列表`,isActive:e=>e.isActive(`bulletList`),action:e=>e.chain().focus().toggleBulletList().run()},{icon:Ae,label:`有序列表`,isActive:e=>e.isActive(`orderedList`),action:e=>e.chain().focus().toggleOrderedList().run()},{icon:je,label:`任务列表`,isActive:e=>e.isActive(`taskList`),action:e=>e.chain().focus().toggleTaskList().run()},{icon:Be,label:`引用`,isActive:e=>e.isActive(`blockquote`),action:e=>e.chain().focus().toggleBlockquote().run()},{icon:ve,label:`代码块`,isActive:e=>e.isActive(`codeBlock`),action:e=>e.chain().focus().toggleCodeBlock().run()}];function o8({editor:e,variant:t=`mobile`}){if(!e)return null;let[n,r]=(0,P.useState)(!1),i=(0,P.useCallback)(async()=>{let{from:t,to:n}=e.state.selection,i=t===n?e.getText():e.state.doc.textBetween(t,n,`
|
|
539
|
+
`);if(navigator.clipboard?.writeText)await navigator.clipboard.writeText(i);else{let e=document.createElement(`textarea`);e.value=i,e.style.position=`fixed`,e.style.opacity=`0`,document.body.appendChild(e),e.select(),document.execCommand(`copy`),document.body.removeChild(e)}r(!0),setTimeout(()=>r(!1),1500)},[e]);return(0,z.jsxs)(`div`,{className:`editor-toolbar editor-toolbar-${t}`,children:[(0,z.jsx)(i8,{editor:e,variant:t}),a8.map(t=>{let n=t.icon,r=t.isActive(e);return(0,z.jsx)(`button`,{type:`button`,contentEditable:!1,className:`editor-toolbar-btn ${r?`active`:``}`,onClick:()=>t.action(e),title:t.label,"aria-label":t.label,"aria-pressed":r,children:(0,z.jsx)(n,{className:`size-5`})},t.label)}),(0,z.jsx)(`div`,{className:`editor-toolbar-separator`}),(0,z.jsx)(`button`,{type:`button`,contentEditable:!1,className:`editor-toolbar-btn ${n?`active`:``}`,onClick:i,title:`复制纯文本`,"aria-label":`复制纯文本`,children:(0,z.jsx)(ye,{className:`size-5`})})]})}function s8(e){return e==null}function c8(e){return typeof e==`object`&&!!e}function l8(e){return Array.isArray(e)?e:s8(e)?[]:[e]}function u8(e,t){var n,r,i,a;if(t)for(a=Object.keys(t),n=0,r=a.length;n<r;n+=1)i=a[n],e[i]=t[i];return e}function d8(e,t){var n=``,r;for(r=0;r<t;r+=1)n+=e;return n}function f8(e){return e===0&&1/e==-1/0}var p8={isNothing:s8,isObject:c8,toArray:l8,repeat:d8,isNegativeZero:f8,extend:u8};function m8(e,t){var n=``,r=e.reason||`(unknown reason)`;return e.mark?(e.mark.name&&(n+=`in "`+e.mark.name+`" `),n+=`(`+(e.mark.line+1)+`:`+(e.mark.column+1)+`)`,!t&&e.mark.snippet&&(n+=`
|
|
540
|
+
|
|
541
|
+
`+e.mark.snippet),r+` `+n):r}function h8(e,t){Error.call(this),this.name=`YAMLException`,this.reason=e,this.mark=t,this.message=m8(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack||``}h8.prototype=Object.create(Error.prototype),h8.prototype.constructor=h8,h8.prototype.toString=function(e){return this.name+`: `+m8(this,e)};var g8=h8;function _8(e,t,n,r,i){var a=``,o=``,s=Math.floor(i/2)-1;return r-t>s&&(a=` ... `,t=r-s+a.length),n-r>s&&(o=` ...`,n=r+s-o.length),{str:a+e.slice(t,n).replace(/\t/g,`→`)+o,pos:r-t+a.length}}function v8(e,t){return p8.repeat(` `,t-e.length)+e}function y8(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||=79,typeof t.indent!=`number`&&(t.indent=1),typeof t.linesBefore!=`number`&&(t.linesBefore=3),typeof t.linesAfter!=`number`&&(t.linesAfter=2);for(var n=/\r?\n|\r|\0/g,r=[0],i=[],a,o=-1;a=n.exec(e.buffer);)i.push(a.index),r.push(a.index+a[0].length),e.position<=a.index&&o<0&&(o=r.length-2);o<0&&(o=r.length-1);var s=``,c,l,u=Math.min(e.line+t.linesAfter,i.length).toString().length,d=t.maxLength-(t.indent+u+3);for(c=1;c<=t.linesBefore&&!(o-c<0);c++)l=_8(e.buffer,r[o-c],i[o-c],e.position-(r[o]-r[o-c]),d),s=p8.repeat(` `,t.indent)+v8((e.line-c+1).toString(),u)+` | `+l.str+`
|
|
542
|
+
`+s;for(l=_8(e.buffer,r[o],i[o],e.position,d),s+=p8.repeat(` `,t.indent)+v8((e.line+1).toString(),u)+` | `+l.str+`
|
|
543
|
+
`,s+=p8.repeat(`-`,t.indent+u+3+l.pos)+`^
|
|
544
|
+
`,c=1;c<=t.linesAfter&&!(o+c>=i.length);c++)l=_8(e.buffer,r[o+c],i[o+c],e.position-(r[o]-r[o+c]),d),s+=p8.repeat(` `,t.indent)+v8((e.line+c+1).toString(),u)+` | `+l.str+`
|
|
545
|
+
`;return s.replace(/\n$/,``)}var b8=y8,x8=[`kind`,`multi`,`resolve`,`construct`,`instanceOf`,`predicate`,`represent`,`representName`,`defaultStyle`,`styleAliases`],S8=[`scalar`,`sequence`,`mapping`];function C8(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(e){t[String(e)]=n})}),t}function w8(e,t){if(t||={},Object.keys(t).forEach(function(t){if(x8.indexOf(t)===-1)throw new g8(`Unknown option "`+t+`" is met in definition of "`+e+`" YAML type.`)}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=C8(t.styleAliases||null),S8.indexOf(this.kind)===-1)throw new g8(`Unknown kind "`+this.kind+`" is specified for "`+e+`" YAML type.`)}var T8=w8;function E8(e,t){var n=[];return e[t].forEach(function(e){var t=n.length;n.forEach(function(n,r){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=r)}),n[t]=e}),n}function D8(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,n;function r(t){t.multi?(e.multi[t.kind].push(t),e.multi.fallback.push(t)):e[t.kind][t.tag]=e.fallback[t.tag]=t}for(t=0,n=arguments.length;t<n;t+=1)arguments[t].forEach(r);return e}function O8(e){return this.extend(e)}O8.prototype.extend=function(e){var t=[],n=[];if(e instanceof T8)n.push(e);else if(Array.isArray(e))n=n.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit));else throw new g8(`Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })`);t.forEach(function(e){if(!(e instanceof T8))throw new g8(`Specified list of YAML types (or a single Type object) contains a non-Type object.`);if(e.loadKind&&e.loadKind!==`scalar`)throw new g8(`There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.`);if(e.multi)throw new g8(`There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.`)}),n.forEach(function(e){if(!(e instanceof T8))throw new g8(`Specified list of YAML types (or a single Type object) contains a non-Type object.`)});var r=Object.create(O8.prototype);return r.implicit=(this.implicit||[]).concat(t),r.explicit=(this.explicit||[]).concat(n),r.compiledImplicit=E8(r,`implicit`),r.compiledExplicit=E8(r,`explicit`),r.compiledTypeMap=D8(r.compiledImplicit,r.compiledExplicit),r};var k8=new O8({explicit:[new T8(`tag:yaml.org,2002:str`,{kind:`scalar`,construct:function(e){return e===null?``:e}}),new T8(`tag:yaml.org,2002:seq`,{kind:`sequence`,construct:function(e){return e===null?[]:e}}),new T8(`tag:yaml.org,2002:map`,{kind:`mapping`,construct:function(e){return e===null?{}:e}})]});function A8(e){if(e===null)return!0;var t=e.length;return t===1&&e===`~`||t===4&&(e===`null`||e===`Null`||e===`NULL`)}function j8(){return null}function M8(e){return e===null}var N8=new T8(`tag:yaml.org,2002:null`,{kind:`scalar`,resolve:A8,construct:j8,predicate:M8,represent:{canonical:function(){return`~`},lowercase:function(){return`null`},uppercase:function(){return`NULL`},camelcase:function(){return`Null`},empty:function(){return``}},defaultStyle:`lowercase`});function P8(e){if(e===null)return!1;var t=e.length;return t===4&&(e===`true`||e===`True`||e===`TRUE`)||t===5&&(e===`false`||e===`False`||e===`FALSE`)}function F8(e){return e===`true`||e===`True`||e===`TRUE`}function I8(e){return Object.prototype.toString.call(e)===`[object Boolean]`}var L8=new T8(`tag:yaml.org,2002:bool`,{kind:`scalar`,resolve:P8,construct:F8,predicate:I8,represent:{lowercase:function(e){return e?`true`:`false`},uppercase:function(e){return e?`TRUE`:`FALSE`},camelcase:function(e){return e?`True`:`False`}},defaultStyle:`lowercase`});function R8(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function z8(e){return 48<=e&&e<=55}function B8(e){return 48<=e&&e<=57}function V8(e){if(e===null)return!1;var t=e.length,n=0,r=!1,i;if(!t)return!1;if(i=e[n],(i===`-`||i===`+`)&&(i=e[++n]),i===`0`){if(n+1===t)return!0;if(i=e[++n],i===`b`){for(n++;n<t;n++)if(i=e[n],i!==`_`){if(i!==`0`&&i!==`1`)return!1;r=!0}return r&&i!==`_`}if(i===`x`){for(n++;n<t;n++)if(i=e[n],i!==`_`){if(!R8(e.charCodeAt(n)))return!1;r=!0}return r&&i!==`_`}if(i===`o`){for(n++;n<t;n++)if(i=e[n],i!==`_`){if(!z8(e.charCodeAt(n)))return!1;r=!0}return r&&i!==`_`}}if(i===`_`)return!1;for(;n<t;n++)if(i=e[n],i!==`_`){if(!B8(e.charCodeAt(n)))return!1;r=!0}return!(!r||i===`_`)}function H8(e){var t=e,n=1,r;if(t.indexOf(`_`)!==-1&&(t=t.replace(/_/g,``)),r=t[0],(r===`-`||r===`+`)&&(r===`-`&&(n=-1),t=t.slice(1),r=t[0]),t===`0`)return 0;if(r===`0`){if(t[1]===`b`)return n*parseInt(t.slice(2),2);if(t[1]===`x`)return n*parseInt(t.slice(2),16);if(t[1]===`o`)return n*parseInt(t.slice(2),8)}return n*parseInt(t,10)}function U8(e){return Object.prototype.toString.call(e)===`[object Number]`&&e%1==0&&!p8.isNegativeZero(e)}var W8=new T8(`tag:yaml.org,2002:int`,{kind:`scalar`,resolve:V8,construct:H8,predicate:U8,represent:{binary:function(e){return e>=0?`0b`+e.toString(2):`-0b`+e.toString(2).slice(1)},octal:function(e){return e>=0?`0o`+e.toString(8):`-0o`+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?`0x`+e.toString(16).toUpperCase():`-0x`+e.toString(16).toUpperCase().slice(1)}},defaultStyle:`decimal`,styleAliases:{binary:[2,`bin`],octal:[8,`oct`],decimal:[10,`dec`],hexadecimal:[16,`hex`]}}),G8=RegExp(`^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$`);function K8(e){return!(e===null||!G8.test(e)||e[e.length-1]===`_`)}function q8(e){var t=e.replace(/_/g,``).toLowerCase(),n=t[0]===`-`?-1:1;return`+-`.indexOf(t[0])>=0&&(t=t.slice(1)),t===`.inf`?n===1?1/0:-1/0:t===`.nan`?NaN:n*parseFloat(t,10)}var J8=/^[-+]?[0-9]+e/;function Y8(e,t){var n;if(isNaN(e))switch(t){case`lowercase`:return`.nan`;case`uppercase`:return`.NAN`;case`camelcase`:return`.NaN`}else if(e===1/0)switch(t){case`lowercase`:return`.inf`;case`uppercase`:return`.INF`;case`camelcase`:return`.Inf`}else if(e===-1/0)switch(t){case`lowercase`:return`-.inf`;case`uppercase`:return`-.INF`;case`camelcase`:return`-.Inf`}else if(p8.isNegativeZero(e))return`-0.0`;return n=e.toString(10),J8.test(n)?n.replace(`e`,`.e`):n}function X8(e){return Object.prototype.toString.call(e)===`[object Number]`&&(e%1!=0||p8.isNegativeZero(e))}var Z8=new T8(`tag:yaml.org,2002:float`,{kind:`scalar`,resolve:K8,construct:q8,predicate:X8,represent:Y8,defaultStyle:`lowercase`}),Q8=k8.extend({implicit:[N8,L8,W8,Z8]}),$8=RegExp(`^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$`),e5=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 t5(e){return e===null?!1:$8.exec(e)!==null||e5.exec(e)!==null}function n5(e){var t,n,r,i,a,o,s,c=0,l=null,u,d,f;if(t=$8.exec(e),t===null&&(t=e5.exec(e)),t===null)throw Error(`Date resolve error`);if(n=+t[1],r=t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(a=+t[4],o=+t[5],s=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+=`0`;c=+c}return t[9]&&(u=+t[10],d=+(t[11]||0),l=(u*60+d)*6e4,t[9]===`-`&&(l=-l)),f=new Date(Date.UTC(n,r,i,a,o,s,c)),l&&f.setTime(f.getTime()-l),f}function r5(e){return e.toISOString()}var i5=new T8(`tag:yaml.org,2002:timestamp`,{kind:`scalar`,resolve:t5,construct:n5,instanceOf:Date,represent:r5});function a5(e){return e===`<<`||e===null}var o5=new T8(`tag:yaml.org,2002:merge`,{kind:`scalar`,resolve:a5}),s5=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
546
|
+
\r`;function c5(e){if(e===null)return!1;var t,n,r=0,i=e.length,a=s5;for(n=0;n<i;n++)if(t=a.indexOf(e.charAt(n)),!(t>64)){if(t<0)return!1;r+=6}return r%8==0}function l5(e){var t,n,r=e.replace(/[\r\n=]/g,``),i=r.length,a=s5,o=0,s=[];for(t=0;t<i;t++)t%4==0&&t&&(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)),o=o<<6|a.indexOf(r.charAt(t));return n=i%4*6,n===0?(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)):n===18?(s.push(o>>10&255),s.push(o>>2&255)):n===12&&s.push(o>>4&255),new Uint8Array(s)}function u5(e){var t=``,n=0,r,i,a=e.length,o=s5;for(r=0;r<a;r++)r%3==0&&r&&(t+=o[n>>18&63],t+=o[n>>12&63],t+=o[n>>6&63],t+=o[n&63]),n=(n<<8)+e[r];return i=a%3,i===0?(t+=o[n>>18&63],t+=o[n>>12&63],t+=o[n>>6&63],t+=o[n&63]):i===2?(t+=o[n>>10&63],t+=o[n>>4&63],t+=o[n<<2&63],t+=o[64]):i===1&&(t+=o[n>>2&63],t+=o[n<<4&63],t+=o[64],t+=o[64]),t}function d5(e){return Object.prototype.toString.call(e)===`[object Uint8Array]`}var f5=new T8(`tag:yaml.org,2002:binary`,{kind:`scalar`,resolve:c5,construct:l5,predicate:d5,represent:u5}),p5=Object.prototype.hasOwnProperty,m5=Object.prototype.toString;function h5(e){if(e===null)return!0;var t=[],n,r,i,a,o,s=e;for(n=0,r=s.length;n<r;n+=1){if(i=s[n],o=!1,m5.call(i)!==`[object Object]`)return!1;for(a in i)if(p5.call(i,a))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}function g5(e){return e===null?[]:e}var _5=new T8(`tag:yaml.org,2002:omap`,{kind:`sequence`,resolve:h5,construct:g5}),v5=Object.prototype.toString;function y5(e){if(e===null)return!0;var t,n,r,i,a,o=e;for(a=Array(o.length),t=0,n=o.length;t<n;t+=1){if(r=o[t],v5.call(r)!==`[object Object]`||(i=Object.keys(r),i.length!==1))return!1;a[t]=[i[0],r[i[0]]]}return!0}function b5(e){if(e===null)return[];var t,n,r,i,a,o=e;for(a=Array(o.length),t=0,n=o.length;t<n;t+=1)r=o[t],i=Object.keys(r),a[t]=[i[0],r[i[0]]];return a}var x5=new T8(`tag:yaml.org,2002:pairs`,{kind:`sequence`,resolve:y5,construct:b5}),S5=Object.prototype.hasOwnProperty;function C5(e){if(e===null)return!0;var t,n=e;for(t in n)if(S5.call(n,t)&&n[t]!==null)return!1;return!0}function w5(e){return e===null?{}:e}var T5=new T8(`tag:yaml.org,2002:set`,{kind:`mapping`,resolve:C5,construct:w5}),E5=Q8.extend({implicit:[i5,o5],explicit:[f5,_5,x5,T5]}),D5=Object.prototype.hasOwnProperty,O5=1,k5=2,A5=3,j5=4,M5=1,N5=2,P5=3,F5=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,I5=/[\x85\u2028\u2029]/,L5=/[,\[\]\{\}]/,R5=/^(?:!|!!|![a-z\-]+!)$/i,z5=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function B5(e){return Object.prototype.toString.call(e)}function V5(e){return e===10||e===13}function H5(e){return e===9||e===32}function U5(e){return e===9||e===32||e===10||e===13}function W5(e){return e===44||e===91||e===93||e===123||e===125}function G5(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function K5(e){return e===120?2:e===117?4:e===85?8:0}function q5(e){return 48<=e&&e<=57?e-48:-1}function J5(e){return e===48?`\0`:e===97?`\x07`:e===98?`\b`:e===116||e===9?` `:e===110?`
|
|
547
|
+
`:e===118?`\v`:e===102?`\f`:e===114?`\r`:e===101?`\x1B`:e===32?` `:e===34?`"`:e===47?`/`:e===92?`\\`:e===78?`
`:e===95?`\xA0`:e===76?`\u2028`:e===80?`\u2029`:``}function Y5(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function X5(e,t,n){t===`__proto__`?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:n}):e[t]=n}for(var Z5=Array(256),Q5=Array(256),$5=0;$5<256;$5++)Z5[$5]=+!!J5($5),Q5[$5]=J5($5);function e7(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||E5,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function t7(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=b8(n),new g8(t,n)}function n7(e,t){throw t7(e,t)}function r7(e,t){e.onWarning&&e.onWarning.call(null,t7(e,t))}var i7={YAML:function(e,t,n){var r,i,a;e.version!==null&&n7(e,`duplication of %YAML directive`),n.length!==1&&n7(e,`YAML directive accepts exactly one argument`),r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),r===null&&n7(e,`ill-formed argument of the YAML directive`),i=parseInt(r[1],10),a=parseInt(r[2],10),i!==1&&n7(e,`unacceptable YAML version of the document`),e.version=n[0],e.checkLineBreaks=a<2,a!==1&&a!==2&&r7(e,`unsupported YAML version of the document`)},TAG:function(e,t,n){var r,i;n.length!==2&&n7(e,`TAG directive accepts exactly two arguments`),r=n[0],i=n[1],R5.test(r)||n7(e,`ill-formed tag handle (first argument) of the TAG directive`),D5.call(e.tagMap,r)&&n7(e,`there is a previously declared suffix for "`+r+`" tag handle`),z5.test(i)||n7(e,`ill-formed tag prefix (second argument) of the TAG directive`);try{i=decodeURIComponent(i)}catch{n7(e,`tag prefix is malformed: `+i)}e.tagMap[r]=i}};function a7(e,t,n,r){var i,a,o,s;if(t<n){if(s=e.input.slice(t,n),r)for(i=0,a=s.length;i<a;i+=1)o=s.charCodeAt(i),o===9||32<=o&&o<=1114111||n7(e,`expected valid JSON character`);else F5.test(s)&&n7(e,`the stream contains non-printable characters`);e.result+=s}}function o7(e,t,n,r){var i,a,o,s;for(p8.isObject(n)||n7(e,`cannot merge mappings; the provided source object is unacceptable`),i=Object.keys(n),o=0,s=i.length;o<s;o+=1)a=i[o],D5.call(t,a)||(X5(t,a,n[a]),r[a]=!0)}function s7(e,t,n,r,i,a,o,s,c){var l,u;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),l=0,u=i.length;l<u;l+=1)Array.isArray(i[l])&&n7(e,`nested arrays are not supported inside keys`),typeof i==`object`&&B5(i[l])===`[object Object]`&&(i[l]=`[object Object]`);if(typeof i==`object`&&B5(i)===`[object Object]`&&(i=`[object Object]`),i=String(i),t===null&&(t={}),r===`tag:yaml.org,2002:merge`)if(Array.isArray(a))for(l=0,u=a.length;l<u;l+=1)o7(e,t,a[l],n);else o7(e,t,a,n);else !e.json&&!D5.call(n,i)&&D5.call(t,i)&&(e.line=o||e.line,e.lineStart=s||e.lineStart,e.position=c||e.position,n7(e,`duplicated mapping key`)),X5(t,i,a),delete n[i];return t}function c7(e){var t=e.input.charCodeAt(e.position);t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):n7(e,`a line break is expected`),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function l7(e,t,n){for(var r=0,i=e.input.charCodeAt(e.position);i!==0;){for(;H5(i);)i===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&i===35)do i=e.input.charCodeAt(++e.position);while(i!==10&&i!==13&&i!==0);if(V5(i))for(c7(e),i=e.input.charCodeAt(e.position),r++,e.lineIndent=0;i===32;)e.lineIndent++,i=e.input.charCodeAt(++e.position);else break}return n!==-1&&r!==0&&e.lineIndent<n&&r7(e,`deficient indentation`),r}function u7(e){var t=e.position,n=e.input.charCodeAt(t);return!!((n===45||n===46)&&n===e.input.charCodeAt(t+1)&&n===e.input.charCodeAt(t+2)&&(t+=3,n=e.input.charCodeAt(t),n===0||U5(n)))}function d7(e,t){t===1?e.result+=` `:t>1&&(e.result+=p8.repeat(`
|
|
548
|
+
`,t-1))}function f7(e,t,n){var r,i,a,o,s,c,l,u,d=e.kind,f=e.result,p=e.input.charCodeAt(e.position);if(U5(p)||W5(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(i=e.input.charCodeAt(e.position+1),U5(i)||n&&W5(i)))return!1;for(e.kind=`scalar`,e.result=``,a=o=e.position,s=!1;p!==0;){if(p===58){if(i=e.input.charCodeAt(e.position+1),U5(i)||n&&W5(i))break}else if(p===35){if(r=e.input.charCodeAt(e.position-1),U5(r))break}else if(e.position===e.lineStart&&u7(e)||n&&W5(p))break;else if(V5(p))if(c=e.line,l=e.lineStart,u=e.lineIndent,l7(e,!1,-1),e.lineIndent>=t){s=!0,p=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=c,e.lineStart=l,e.lineIndent=u;break}s&&=(a7(e,a,o,!1),d7(e,e.line-c),a=o=e.position,!1),H5(p)||(o=e.position+1),p=e.input.charCodeAt(++e.position)}return a7(e,a,o,!1),e.result?!0:(e.kind=d,e.result=f,!1)}function p7(e,t){var n=e.input.charCodeAt(e.position),r,i;if(n!==39)return!1;for(e.kind=`scalar`,e.result=``,e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;)if(n===39)if(a7(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),n===39)r=e.position,e.position++,i=e.position;else return!0;else V5(n)?(a7(e,r,i,!0),d7(e,l7(e,!1,t)),r=i=e.position):e.position===e.lineStart&&u7(e)?n7(e,`unexpected end of the document within a single quoted scalar`):(e.position++,i=e.position);n7(e,`unexpected end of the stream within a single quoted scalar`)}function m7(e,t){var n,r,i,a,o,s=e.input.charCodeAt(e.position);if(s!==34)return!1;for(e.kind=`scalar`,e.result=``,e.position++,n=r=e.position;(s=e.input.charCodeAt(e.position))!==0;)if(s===34)return a7(e,n,e.position,!0),e.position++,!0;else if(s===92){if(a7(e,n,e.position,!0),s=e.input.charCodeAt(++e.position),V5(s))l7(e,!1,t);else if(s<256&&Z5[s])e.result+=Q5[s],e.position++;else if((o=K5(s))>0){for(i=o,a=0;i>0;i--)s=e.input.charCodeAt(++e.position),(o=G5(s))>=0?a=(a<<4)+o:n7(e,`expected hexadecimal character`);e.result+=Y5(a),e.position++}else n7(e,`unknown escape sequence`);n=r=e.position}else V5(s)?(a7(e,n,r,!0),d7(e,l7(e,!1,t)),n=r=e.position):e.position===e.lineStart&&u7(e)?n7(e,`unexpected end of the document within a double quoted scalar`):(e.position++,r=e.position);n7(e,`unexpected end of the stream within a double quoted scalar`)}function h7(e,t){var n=!0,r,i,a,o=e.tag,s,c=e.anchor,l,u,d,f,p,m=Object.create(null),h,g,_,v=e.input.charCodeAt(e.position);if(v===91)u=93,p=!1,s=[];else if(v===123)u=125,p=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),v=e.input.charCodeAt(++e.position);v!==0;){if(l7(e,!0,t),v=e.input.charCodeAt(e.position),v===u)return e.position++,e.tag=o,e.anchor=c,e.kind=p?`mapping`:`sequence`,e.result=s,!0;n?v===44&&n7(e,`expected the node content, but found ','`):n7(e,`missed comma between flow collection entries`),g=h=_=null,d=f=!1,v===63&&(l=e.input.charCodeAt(e.position+1),U5(l)&&(d=f=!0,e.position++,l7(e,!0,t))),r=e.line,i=e.lineStart,a=e.position,S7(e,t,O5,!1,!0),g=e.tag,h=e.result,l7(e,!0,t),v=e.input.charCodeAt(e.position),(f||e.line===r)&&v===58&&(d=!0,v=e.input.charCodeAt(++e.position),l7(e,!0,t),S7(e,t,O5,!1,!0),_=e.result),p?s7(e,s,m,g,h,_,r,i,a):d?s.push(s7(e,null,m,g,h,_,r,i,a)):s.push(h),l7(e,!0,t),v=e.input.charCodeAt(e.position),v===44?(n=!0,v=e.input.charCodeAt(++e.position)):n=!1}n7(e,`unexpected end of the stream within a flow collection`)}function g7(e,t){var n,r,i=M5,a=!1,o=!1,s=t,c=0,l=!1,u,d=e.input.charCodeAt(e.position);if(d===124)r=!1;else if(d===62)r=!0;else return!1;for(e.kind=`scalar`,e.result=``;d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)M5===i?i=d===43?P5:N5:n7(e,`repeat of a chomping mode identifier`);else if((u=q5(d))>=0)u===0?n7(e,`bad explicit indentation width of a block scalar; it cannot be less than one`):o?n7(e,`repeat of an indentation width identifier`):(s=t+u-1,o=!0);else break;if(H5(d)){do d=e.input.charCodeAt(++e.position);while(H5(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!V5(d)&&d!==0)}for(;d!==0;){for(c7(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!o||e.lineIndent<s)&&d===32;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>s&&(s=e.lineIndent),V5(d)){c++;continue}if(e.lineIndent<s){i===P5?e.result+=p8.repeat(`
|
|
549
|
+
`,a?1+c:c):i===M5&&a&&(e.result+=`
|
|
550
|
+
`);break}for(r?H5(d)?(l=!0,e.result+=p8.repeat(`
|
|
551
|
+
`,a?1+c:c)):l?(l=!1,e.result+=p8.repeat(`
|
|
552
|
+
`,c+1)):c===0?a&&(e.result+=` `):e.result+=p8.repeat(`
|
|
553
|
+
`,c):e.result+=p8.repeat(`
|
|
554
|
+
`,a?1+c:c),a=!0,o=!0,c=0,n=e.position;!V5(d)&&d!==0;)d=e.input.charCodeAt(++e.position);a7(e,n,e.position,!1)}return!0}function _7(e,t){var n,r=e.tag,i=e.anchor,a=[],o,s=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,n7(e,`tab characters must not be used in indentation`)),!(c!==45||(o=e.input.charCodeAt(e.position+1),!U5(o))));){if(s=!0,e.position++,l7(e,!0,-1)&&e.lineIndent<=t){a.push(null),c=e.input.charCodeAt(e.position);continue}if(n=e.line,S7(e,t,A5,!1,!0),a.push(e.result),l7(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&c!==0)n7(e,`bad indentation of a sequence entry`);else if(e.lineIndent<t)break}return s?(e.tag=r,e.anchor=i,e.kind=`sequence`,e.result=a,!0):!1}function v7(e,t,n){var r,i,a,o,s,c,l=e.tag,u=e.anchor,d={},f=Object.create(null),p=null,m=null,h=null,g=!1,_=!1,v;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),v=e.input.charCodeAt(e.position);v!==0;){if(!g&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,n7(e,`tab characters must not be used in indentation`)),r=e.input.charCodeAt(e.position+1),a=e.line,(v===63||v===58)&&U5(r))v===63?(g&&(s7(e,d,f,p,m,null,o,s,c),p=m=h=null),_=!0,g=!0,i=!0):g?(g=!1,i=!0):n7(e,`incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line`),e.position+=1,v=r;else{if(o=e.line,s=e.lineStart,c=e.position,!S7(e,n,k5,!1,!0))break;if(e.line===a){for(v=e.input.charCodeAt(e.position);H5(v);)v=e.input.charCodeAt(++e.position);if(v===58)v=e.input.charCodeAt(++e.position),U5(v)||n7(e,`a whitespace character is expected after the key-value separator within a block mapping`),g&&(s7(e,d,f,p,m,null,o,s,c),p=m=h=null),_=!0,g=!1,i=!1,p=e.tag,m=e.result;else if(_)n7(e,`can not read an implicit mapping pair; a colon is missed`);else return e.tag=l,e.anchor=u,!0}else if(_)n7(e,`can not read a block mapping entry; a multiline key may not be an implicit key`);else return e.tag=l,e.anchor=u,!0}if((e.line===a||e.lineIndent>t)&&(g&&(o=e.line,s=e.lineStart,c=e.position),S7(e,t,j5,!0,i)&&(g?m=e.result:h=e.result),g||(s7(e,d,f,p,m,h,o,s,c),p=m=h=null),l7(e,!0,-1),v=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&v!==0)n7(e,`bad indentation of a mapping entry`);else if(e.lineIndent<t)break}return g&&s7(e,d,f,p,m,null,o,s,c),_&&(e.tag=l,e.anchor=u,e.kind=`mapping`,e.result=d),_}function y7(e){var t,n=!1,r=!1,i,a,o=e.input.charCodeAt(e.position);if(o!==33)return!1;if(e.tag!==null&&n7(e,`duplication of a tag property`),o=e.input.charCodeAt(++e.position),o===60?(n=!0,o=e.input.charCodeAt(++e.position)):o===33?(r=!0,i=`!!`,o=e.input.charCodeAt(++e.position)):i=`!`,t=e.position,n){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(a=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):n7(e,`unexpected end of the stream within a verbatim tag`)}else{for(;o!==0&&!U5(o);)o===33&&(r?n7(e,`tag suffix cannot contain exclamation marks`):(i=e.input.slice(t-1,e.position+1),R5.test(i)||n7(e,`named tag handle cannot contain such characters`),r=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),L5.test(a)&&n7(e,`tag suffix cannot contain flow indicator characters`)}a&&!z5.test(a)&&n7(e,`tag name cannot contain such characters: `+a);try{a=decodeURIComponent(a)}catch{n7(e,`tag name is malformed: `+a)}return n?e.tag=a:D5.call(e.tagMap,i)?e.tag=e.tagMap[i]+a:i===`!`?e.tag=`!`+a:i===`!!`?e.tag=`tag:yaml.org,2002:`+a:n7(e,`undeclared tag handle "`+i+`"`),!0}function b7(e){var t,n=e.input.charCodeAt(e.position);if(n!==38)return!1;for(e.anchor!==null&&n7(e,`duplication of an anchor property`),n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!U5(n)&&!W5(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&n7(e,`name of an anchor node must contain at least one character`),e.anchor=e.input.slice(t,e.position),!0}function x7(e){var t,n,r=e.input.charCodeAt(e.position);if(r!==42)return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!U5(r)&&!W5(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&n7(e,`name of an alias node must contain at least one character`),n=e.input.slice(t,e.position),D5.call(e.anchorMap,n)||n7(e,`unidentified alias "`+n+`"`),e.result=e.anchorMap[n],l7(e,!0,-1),!0}function S7(e,t,n,r,i){var a,o,s,c=1,l=!1,u=!1,d,f,p,m,h,g;if(e.listener!==null&&e.listener(`open`,e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=o=s=j5===n||A5===n,r&&l7(e,!0,-1)&&(l=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;y7(e)||b7(e);)l7(e,!0,-1)?(l=!0,s=a,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):s=!1;if(s&&=l||i,(c===1||j5===n)&&(h=O5===n||k5===n?t:t+1,g=e.position-e.lineStart,c===1?s&&(_7(e,g)||v7(e,g,h))||h7(e,h)?u=!0:(o&&g7(e,h)||p7(e,h)||m7(e,h)?u=!0:x7(e)?(u=!0,(e.tag!==null||e.anchor!==null)&&n7(e,`alias node should not have any properties`)):f7(e,h,O5===n)&&(u=!0,e.tag===null&&(e.tag=`?`)),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(u=s&&_7(e,g))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag===`?`){for(e.result!==null&&e.kind!==`scalar`&&n7(e,`unacceptable node kind for !<?> tag; it should be "scalar", not "`+e.kind+`"`),d=0,f=e.implicitTypes.length;d<f;d+=1)if(m=e.implicitTypes[d],m.resolve(e.result)){e.result=m.construct(e.result),e.tag=m.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!==`!`){if(D5.call(e.typeMap[e.kind||`fallback`],e.tag))m=e.typeMap[e.kind||`fallback`][e.tag];else for(m=null,p=e.typeMap.multi[e.kind||`fallback`],d=0,f=p.length;d<f;d+=1)if(e.tag.slice(0,p[d].tag.length)===p[d].tag){m=p[d];break}m||n7(e,`unknown tag !<`+e.tag+`>`),e.result!==null&&m.kind!==e.kind&&n7(e,`unacceptable node kind for !<`+e.tag+`> tag; it should be "`+m.kind+`", not "`+e.kind+`"`),m.resolve(e.result,e.tag)?(e.result=m.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):n7(e,`cannot resolve a node with !<`+e.tag+`> explicit tag`)}return e.listener!==null&&e.listener(`close`,e),e.tag!==null||e.anchor!==null||u}function C7(e){var t=e.position,n,r,i,a=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(l7(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(a=!0,o=e.input.charCodeAt(++e.position),n=e.position;o!==0&&!U5(o);)o=e.input.charCodeAt(++e.position);for(r=e.input.slice(n,e.position),i=[],r.length<1&&n7(e,`directive name must not be less than one character in length`);o!==0;){for(;H5(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!V5(o));break}if(V5(o))break;for(n=e.position;o!==0&&!U5(o);)o=e.input.charCodeAt(++e.position);i.push(e.input.slice(n,e.position))}o!==0&&c7(e),D5.call(i7,r)?i7[r](e,r,i):r7(e,`unknown document directive "`+r+`"`)}if(l7(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,l7(e,!0,-1)):a&&n7(e,`directives end mark is expected`),S7(e,e.lineIndent-1,j5,!1,!0),l7(e,!0,-1),e.checkLineBreaks&&I5.test(e.input.slice(t,e.position))&&r7(e,`non-ASCII line breaks are interpreted as content`),e.documents.push(e.result),e.position===e.lineStart&&u7(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,l7(e,!0,-1));return}if(e.position<e.length-1)n7(e,`end of the stream or a document separator is expected`);else return}function w7(e,t){e=String(e),t||={},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
555
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var n=new e7(e,t),r=e.indexOf(`\0`);for(r!==-1&&(n.position=r,n7(n,`null byte is not allowed in input`)),n.input+=`\0`;n.input.charCodeAt(n.position)===32;)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)C7(n);return n.documents}function T7(e,t,n){typeof t==`object`&&t&&n===void 0&&(n=t,t=null);var r=w7(e,n);if(typeof t!=`function`)return r;for(var i=0,a=r.length;i<a;i+=1)t(r[i])}function E7(e,t){var n=w7(e,t);if(n.length!==0){if(n.length===1)return n[0];throw new g8(`expected a single document in the stream, but found more`)}}var D7={loadAll:T7,load:E7},O7=Object.prototype.toString,k7=Object.prototype.hasOwnProperty,A7=65279,Ate=9,j7=10,jte=13,Mte=32,Nte=33,Pte=34,M7=35,Fte=37,Ite=38,Lte=39,Rte=42,N7=44,zte=45,P7=58,Bte=61,Vte=62,Hte=63,Ute=64,F7=91,I7=93,Wte=96,L7=123,Gte=124,R7=125,z7={};z7[0]=`\\0`,z7[7]=`\\a`,z7[8]=`\\b`,z7[9]=`\\t`,z7[10]=`\\n`,z7[11]=`\\v`,z7[12]=`\\f`,z7[13]=`\\r`,z7[27]=`\\e`,z7[34]=`\\"`,z7[92]=`\\\\`,z7[133]=`\\N`,z7[160]=`\\_`,z7[8232]=`\\L`,z7[8233]=`\\P`;var Kte=[`y`,`Y`,`yes`,`Yes`,`YES`,`on`,`On`,`ON`,`n`,`N`,`no`,`No`,`NO`,`off`,`Off`,`OFF`],qte=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Jte(e,t){var n,r,i,a,o,s,c;if(t===null)return{};for(n={},r=Object.keys(t),i=0,a=r.length;i<a;i+=1)o=r[i],s=String(t[o]),o.slice(0,2)===`!!`&&(o=`tag:yaml.org,2002:`+o.slice(2)),c=e.compiledTypeMap.fallback[o],c&&k7.call(c.styleAliases,s)&&(s=c.styleAliases[s]),n[o]=s;return n}function Yte(e){var t=e.toString(16).toUpperCase(),n,r;if(e<=255)n=`x`,r=2;else if(e<=65535)n=`u`,r=4;else if(e<=4294967295)n=`U`,r=8;else throw new g8(`code point within a string may not be greater than 0xFFFFFFFF`);return`\\`+n+p8.repeat(`0`,r-t.length)+t}var Xte=1,B7=2;function Zte(e){this.schema=e.schema||E5,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=p8.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Jte(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType===`"`?B7:Xte,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer==`function`?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result=``,this.duplicates=[],this.usedDuplicates=null}function V7(e,t){for(var n=p8.repeat(` `,t),r=0,i=-1,a=``,o,s=e.length;r<s;)i=e.indexOf(`
|
|
556
|
+
`,r),i===-1?(o=e.slice(r),r=s):(o=e.slice(r,i+1),r=i+1),o.length&&o!==`
|
|
557
|
+
`&&(a+=n),a+=o;return a}function H7(e,t){return`
|
|
558
|
+
`+p8.repeat(` `,e.indent*t)}function U7(e,t){var n,r,i;for(n=0,r=e.implicitTypes.length;n<r;n+=1)if(i=e.implicitTypes[n],i.resolve(t))return!0;return!1}function W7(e){return e===Mte||e===Ate}function G7(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==A7||65536<=e&&e<=1114111}function K7(e){return G7(e)&&e!==A7&&e!==jte&&e!==j7}function q7(e,t,n){var r=K7(e),i=r&&!W7(e);return(n?r:r&&e!==N7&&e!==F7&&e!==I7&&e!==L7&&e!==R7)&&e!==M7&&!(t===P7&&!i)||K7(t)&&!W7(t)&&e===M7||t===P7&&i}function Qte(e){return G7(e)&&e!==A7&&!W7(e)&&e!==zte&&e!==Hte&&e!==P7&&e!==N7&&e!==F7&&e!==I7&&e!==L7&&e!==R7&&e!==M7&&e!==Ite&&e!==Rte&&e!==Nte&&e!==Gte&&e!==Bte&&e!==Vte&&e!==Lte&&e!==Pte&&e!==Fte&&e!==Ute&&e!==Wte}function $te(e){return!W7(e)&&e!==P7}function J7(e,t){var n=e.charCodeAt(t),r;return n>=55296&&n<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1),r>=56320&&r<=57343)?(n-55296)*1024+r-56320+65536:n}function Y7(e){return/^\n* /.test(e)}var X7=1,Z7=2,Q7=3,$7=4,e9=5;function ene(e,t,n,r,i,a,o,s){var c,l=0,u=null,d=!1,f=!1,p=r!==-1,m=-1,h=Qte(J7(e,0))&&$te(J7(e,e.length-1));if(t||o)for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=J7(e,c),!G7(l))return e9;h&&=q7(l,u,s),u=l}else{for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=J7(e,c),l===j7)d=!0,p&&(f||=c-m-1>r&&e[m+1]!==` `,m=c);else if(!G7(l))return e9;h&&=q7(l,u,s),u=l}f||=p&&c-m-1>r&&e[m+1]!==` `}return!d&&!f?h&&!o&&!i(e)?X7:a===B7?e9:Z7:n>9&&Y7(e)?e9:o?a===B7?e9:Z7:f?$7:Q7}function tne(e,t,n,r,i){e.dump=function(){if(t.length===0)return e.quotingType===B7?`""`:`''`;if(!e.noCompatMode&&(Kte.indexOf(t)!==-1||qte.test(t)))return e.quotingType===B7?`"`+t+`"`:`'`+t+`'`;var a=e.indent*Math.max(1,n),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),s=r||e.flowLevel>-1&&n>=e.flowLevel;function c(t){return U7(e,t)}switch(ene(t,s,e.indent,o,c,e.quotingType,e.forceQuotes&&!r,i)){case X7:return t;case Z7:return`'`+t.replace(/'/g,`''`)+`'`;case Q7:return`|`+t9(t,e.indent)+n9(V7(t,a));case $7:return`>`+t9(t,e.indent)+n9(V7(nne(t,o),a));case e9:return`"`+rne(t)+`"`;default:throw new g8(`impossible error: invalid scalar style`)}}()}function t9(e,t){var n=Y7(e)?String(t):``,r=e[e.length-1]===`
|
|
559
|
+
`;return n+(r&&(e[e.length-2]===`
|
|
560
|
+
`||e===`
|
|
561
|
+
`)?`+`:r?``:`-`)+`
|
|
562
|
+
`}function n9(e){return e[e.length-1]===`
|
|
563
|
+
`?e.slice(0,-1):e}function nne(e,t){for(var n=/(\n+)([^\n]*)/g,r=function(){var r=e.indexOf(`
|
|
564
|
+
`);return r=r===-1?e.length:r,n.lastIndex=r,r9(e.slice(0,r),t)}(),i=e[0]===`
|
|
565
|
+
`||e[0]===` `,a,o;o=n.exec(e);){var s=o[1],c=o[2];a=c[0]===` `,r+=s+(!i&&!a&&c!==``?`
|
|
566
|
+
`:``)+r9(c,t),i=a}return r}function r9(e,t){if(e===``||e[0]===` `)return e;for(var n=/ [^ ]/g,r,i=0,a,o=0,s=0,c=``;r=n.exec(e);)s=r.index,s-i>t&&(a=o>i?o:s,c+=`
|
|
567
|
+
`+e.slice(i,a),i=a+1),o=s;return c+=`
|
|
568
|
+
`,e.length-i>t&&o>i?c+=e.slice(i,o)+`
|
|
569
|
+
`+e.slice(o+1):c+=e.slice(i),c.slice(1)}function rne(e){for(var t=``,n=0,r,i=0;i<e.length;n>=65536?i+=2:i++)n=J7(e,i),r=z7[n],!r&&G7(n)?(t+=e[i],n>=65536&&(t+=e[i+1])):t+=r||Yte(n);return t}function ine(e,t,n){var r=``,i=e.tag,a,o,s;for(a=0,o=n.length;a<o;a+=1)s=n[a],e.replacer&&(s=e.replacer.call(n,String(a),s)),(o9(e,t,s,!1,!1)||s===void 0&&o9(e,t,null,!1,!1))&&(r!==``&&(r+=`,`+(e.condenseFlow?``:` `)),r+=e.dump);e.tag=i,e.dump=`[`+r+`]`}function i9(e,t,n,r){var i=``,a=e.tag,o,s,c;for(o=0,s=n.length;o<s;o+=1)c=n[o],e.replacer&&(c=e.replacer.call(n,String(o),c)),(o9(e,t+1,c,!0,!0,!1,!0)||c===void 0&&o9(e,t+1,null,!0,!0,!1,!0))&&((!r||i!==``)&&(i+=H7(e,t)),e.dump&&j7===e.dump.charCodeAt(0)?i+=`-`:i+=`- `,i+=e.dump);e.tag=a,e.dump=i||`[]`}function ane(e,t,n){var r=``,i=e.tag,a=Object.keys(n),o,s,c,l,u;for(o=0,s=a.length;o<s;o+=1)u=``,r!==``&&(u+=`, `),e.condenseFlow&&(u+=`"`),c=a[o],l=n[c],e.replacer&&(l=e.replacer.call(n,c,l)),o9(e,t,c,!1,!1)&&(e.dump.length>1024&&(u+=`? `),u+=e.dump+(e.condenseFlow?`"`:``)+`:`+(e.condenseFlow?``:` `),o9(e,t,l,!1,!1)&&(u+=e.dump,r+=u));e.tag=i,e.dump=`{`+r+`}`}function one(e,t,n,r){var i=``,a=e.tag,o=Object.keys(n),s,c,l,u,d,f;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys==`function`)o.sort(e.sortKeys);else if(e.sortKeys)throw new g8(`sortKeys must be a boolean or a function`);for(s=0,c=o.length;s<c;s+=1)f=``,(!r||i!==``)&&(f+=H7(e,t)),l=o[s],u=n[l],e.replacer&&(u=e.replacer.call(n,l,u)),o9(e,t+1,l,!0,!0,!0)&&(d=e.tag!==null&&e.tag!==`?`||e.dump&&e.dump.length>1024,d&&(e.dump&&j7===e.dump.charCodeAt(0)?f+=`?`:f+=`? `),f+=e.dump,d&&(f+=H7(e,t)),o9(e,t+1,u,!0,d)&&(e.dump&&j7===e.dump.charCodeAt(0)?f+=`:`:f+=`: `,f+=e.dump,i+=f));e.tag=a,e.dump=i||`{}`}function a9(e,t,n){var r,i=n?e.explicitTypes:e.implicitTypes,a,o,s,c;for(a=0,o=i.length;a<o;a+=1)if(s=i[a],(s.instanceOf||s.predicate)&&(!s.instanceOf||typeof t==`object`&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(n?s.multi&&s.representName?e.tag=s.representName(t):e.tag=s.tag:e.tag=`?`,s.represent){if(c=e.styleMap[s.tag]||s.defaultStyle,O7.call(s.represent)===`[object Function]`)r=s.represent(t,c);else if(k7.call(s.represent,c))r=s.represent[c](t,c);else throw new g8(`!<`+s.tag+`> tag resolver accepts not "`+c+`" style`);e.dump=r}return!0}return!1}function o9(e,t,n,r,i,a,o){e.tag=null,e.dump=n,a9(e,n,!1)||a9(e,n,!0);var s=O7.call(e.dump),c=r,l;r&&=e.flowLevel<0||e.flowLevel>t;var u=s===`[object Object]`||s===`[object Array]`,d,f;if(u&&(d=e.duplicates.indexOf(n),f=d!==-1),(e.tag!==null&&e.tag!==`?`||f||e.indent!==2&&t>0)&&(i=!1),f&&e.usedDuplicates[d])e.dump=`*ref_`+d;else{if(u&&f&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),s===`[object Object]`)r&&Object.keys(e.dump).length!==0?(one(e,t,e.dump,i),f&&(e.dump=`&ref_`+d+e.dump)):(ane(e,t,e.dump),f&&(e.dump=`&ref_`+d+` `+e.dump));else if(s===`[object Array]`)r&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?i9(e,t-1,e.dump,i):i9(e,t,e.dump,i),f&&(e.dump=`&ref_`+d+e.dump)):(ine(e,t,e.dump),f&&(e.dump=`&ref_`+d+` `+e.dump));else if(s===`[object String]`)e.tag!==`?`&&tne(e,e.dump,t,a,c);else if(s===`[object Undefined]`)return!1;else{if(e.skipInvalid)return!1;throw new g8(`unacceptable kind of an object to dump `+s)}e.tag!==null&&e.tag!==`?`&&(l=encodeURI(e.tag[0]===`!`?e.tag.slice(1):e.tag).replace(/!/g,`%21`),l=e.tag[0]===`!`?`!`+l:l.slice(0,18)===`tag:yaml.org,2002:`?`!!`+l.slice(18):`!<`+l+`>`,e.dump=l+` `+e.dump)}return!0}function sne(e,t){var n=[],r=[],i,a;for(s9(e,n,r),i=0,a=r.length;i<a;i+=1)t.duplicates.push(n[r[i]]);t.usedDuplicates=Array(a)}function s9(e,t,n){var r,i,a;if(typeof e==`object`&&e)if(i=t.indexOf(e),i!==-1)n.indexOf(i)===-1&&n.push(i);else if(t.push(e),Array.isArray(e))for(i=0,a=e.length;i<a;i+=1)s9(e[i],t,n);else for(r=Object.keys(e),i=0,a=r.length;i<a;i+=1)s9(e[r[i]],t,n)}function cne(e,t){t||={};var n=new Zte(t);n.noRefs||sne(e,n);var r=e;return n.replacer&&(r=n.replacer.call({"":r},``,r)),o9(n,0,r,!0,!0)?n.dump+`
|
|
570
|
+
`:``}var lne={dump:cne},une=D7.load;D7.loadAll;var dne=lne.dump;function fne(e){return Object.entries(e).map(([e,t])=>({key:e,value:t instanceof Date?t.toISOString().split(`T`)[0]:Array.isArray(t)?t.map(e=>String(e??``)).join(`, `):typeof t==`object`&&t?JSON.stringify(t):String(t??``)}))}function pne(e){let t={};for(let n of e)n.key&&(t[n.key]=n.value);return t}function mne(e){try{let t=une(e);if(typeof t==`object`&&t)return t}catch{}return{}}function hne({rawFrontmatter:e,onFrontmatterChange:t}){let[n,r]=(0,P.useState)([]);(0,P.useEffect)(()=>{if(!e){r([]);return}r(fne(mne(e)))},[e]);let i=(0,P.useCallback)(e=>{let n=pne(e);Object.keys(n).length>0?t(dne(n,{lineWidth:-1}).trim()):t(null)},[t]),a=(0,P.useCallback)((e,t)=>{r(n=>{let r=n.map((n,r)=>r===e?{...n,key:t}:n);return i(r),r})},[i]),o=(0,P.useCallback)((e,t)=>{r(n=>{let r=n.map((n,r)=>r===e?{...n,value:t}:n);return i(r),r})},[i]),s=(0,P.useCallback)(()=>{r(e=>{let t=[...e,{key:``,value:``}];return i(t),t})},[i]),c=(0,P.useCallback)(e=>{r(t=>{let n=t.filter((t,n)=>n!==e);return i(n),n})},[i]);return n.length===0?null:(0,z.jsxs)(`div`,{className:`frontmatter-panel`,children:[(0,z.jsx)(`div`,{className:`frontmatter-panel-header`,children:`Metadata`}),(0,z.jsx)(`div`,{className:`frontmatter-fields`,children:n.map((e,t)=>(0,z.jsxs)(`div`,{className:`frontmatter-field`,children:[(0,z.jsx)(`input`,{className:`frontmatter-key-input`,value:e.key,onChange:e=>a(t,e.target.value),placeholder:`key`}),(0,z.jsx)(`span`,{className:`frontmatter-separator`,children:`:`}),(0,z.jsx)(`input`,{className:`frontmatter-value-input`,value:e.value,onChange:e=>o(t,e.target.value),placeholder:`value`}),(0,z.jsx)(`button`,{className:`frontmatter-remove-btn`,onClick:()=>c(t),title:`删除字段`,children:(0,z.jsx)(Ke,{className:`size-3.5`})})]},t))}),(0,z.jsxs)(`button`,{className:`frontmatter-add-btn`,onClick:s,children:[(0,z.jsx)(ze,{className:`size-3.5`}),`添加字段`]})]})}var gne=/^---\r?\n([\s\S]*?)\r?\n---\r?\n?/;function c9(e){let t=e.match(gne);return t?{frontmatter:t[1].trim(),body:e.slice(t[0].length)}:{frontmatter:null,body:e}}var l9=class e{static instance=null;queue=[];running=new Set;cache=new Map;MAX_CONCURRENT=2;MAX_CACHE_SIZE=50;static getInstance(){return e.instance||=new e,e.instance}request(e,t,n,r){let i=this.getCacheKey(t,n),a=this.cache.get(i);if(a){r(a);return}this.cancel(e),this.queue.push({id:e,source:t,theme:n,callback:r}),this.processQueue()}cancel(e){let t=this.queue.findIndex(t=>t.id===e);t!==-1&&this.queue.splice(t,1),this.running.delete(e)}getCacheKey(e,t){return`${t}::${e}`}getFromCache(e,t){let n=this.getCacheKey(e,t),r=this.cache.get(n);return r?(this.cache.delete(n),this.cache.set(n,r),r):null}setCache(e,t,n){let r=this.getCacheKey(e,t);for(this.cache.has(r)&&this.cache.delete(r);this.cache.size>=this.MAX_CACHE_SIZE;){let e=this.cache.keys().next().value;e!==void 0&&this.cache.delete(e)}this.cache.set(r,n)}processQueue(){if(this.running.size>=this.MAX_CONCURRENT||this.queue.length===0)return;let e=this.queue.shift();e&&(this.running.add(e.id),this.runRender(e))}async runRender(e){let t=this.getFromCache(e.source,e.theme);if(t){this.running.has(e.id)&&(this.running.delete(e.id),e.callback(t)),this.processQueue();return}try{$6.initialize({startOnLoad:!1,theme:e.theme,suppressErrorRendering:!0});let t=`mermaid-queued-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,{svg:n}=await $6.render(t,e.source),r={svg:n,error:``};this.setCache(e.source,e.theme,r),this.running.has(e.id)&&(this.running.delete(e.id),e.callback(r))}catch(t){let n={svg:``,error:t.message||`Mermaid render error`};this.setCache(e.source,e.theme,n),this.running.has(e.id)&&(this.running.delete(e.id),e.callback(n))}finally{this.processQueue()}}}.getInstance(),_ne=lF(oF);function vne({node:e,updateAttributes:t,selected:n,editor:r,getPos:i}){let a=e.attrs.language===`mermaid`,[o,s]=(0,P.useState)(``),[c,l]=(0,P.useState)(``),[u,d]=(0,P.useState)(!1),[f,p]=(0,P.useState)(0),[m,h]=(0,P.useState)(!1),[g,_]=(0,P.useState)(!1),[v,y]=(0,P.useState)(!1),b=(0,P.useRef)(null),x=(0,P.useRef)(`mermaid-${Date.now()}-${Math.random().toString(36).substr(2,9)}`),S=(0,P.useCallback)(async()=>{let t=e.textContent;if(t){if(navigator.clipboard?.writeText)await navigator.clipboard.writeText(t);else{let e=document.createElement(`textarea`);e.value=t,e.style.position=`fixed`,e.style.opacity=`0`,document.body.appendChild(e),e.select(),document.execCommand(`copy`),document.body.removeChild(e)}h(!0),setTimeout(()=>h(!1),1500)}},[e.textContent]),C=e.textContent;return(0,P.useEffect)(()=>{let e=()=>{p(e=>e+1)};return window.addEventListener(`theme-change`,e),()=>window.removeEventListener(`theme-change`,e)},[]),(0,P.useEffect)(()=>{if(!a)return;let e=b.current;if(!e)return;let t=new IntersectionObserver(([e])=>{_(e.isIntersecting)},{rootMargin:`200px`});return t.observe(e),()=>t.disconnect()},[a]),(0,P.useEffect)(()=>{if(!a){s(``),l(``),y(!1);return}if(!C){s(``),l(``),y(!1);return}if(!g){o||y(!1);return}let e=document.documentElement.classList.contains(`dark`)?`dark`:`default`;return y(!0),x.current=`mermaid-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,l9.request(x.current,C,e,e=>{s(e.svg),l(e.error),y(!1)}),()=>{l9.cancel(x.current)}},[a,C,g,f]),(0,z.jsxs)(_x,{className:`code-block-wrapper ${n?`selected`:``}`,children:[(0,z.jsxs)(`div`,{className:`code-block-header`,children:[(0,z.jsxs)(`select`,{contentEditable:!1,value:e.attrs.language||``,onChange:e=>t({language:e.target.value}),children:[(0,z.jsx)(`option`,{value:``,children:`Plain Text`}),(0,z.jsx)(`option`,{value:`mermaid`,children:`Mermaid`}),(0,z.jsx)(`option`,{value:`javascript`,children:`JavaScript`}),(0,z.jsx)(`option`,{value:`typescript`,children:`TypeScript`}),(0,z.jsx)(`option`,{value:`html`,children:`HTML`}),(0,z.jsx)(`option`,{value:`css`,children:`CSS`}),(0,z.jsx)(`option`,{value:`python`,children:`Python`}),(0,z.jsx)(`option`,{value:`java`,children:`Java`}),(0,z.jsx)(`option`,{value:`cpp`,children:`C++`}),(0,z.jsx)(`option`,{value:`go`,children:`Go`}),(0,z.jsx)(`option`,{value:`rust`,children:`Rust`}),(0,z.jsx)(`option`,{value:`json`,children:`JSON`}),(0,z.jsx)(`option`,{value:`markdown`,children:`Markdown`}),(0,z.jsx)(`option`,{value:`bash`,children:`Bash`})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,z.jsx)(`button`,{className:`code-block-copy-btn`,contentEditable:!1,onClick:S,title:m?`已复制`:`复制代码`,children:m?(0,z.jsx)(pe,{className:`size-4`}):(0,z.jsx)(ye,{className:`size-4`})}),a&&(0,z.jsx)(`button`,{className:`mermaid-fullscreen-btn`,contentEditable:!1,onClick:()=>d(!0),title:`全屏预览`,children:(0,z.jsx)(Pe,{className:`size-4`})})]})]}),a?(0,z.jsx)(`div`,{ref:b,className:`mermaid-preview`,contentEditable:!1,children:c?(0,z.jsxs)(`div`,{className:`mermaid-error`,children:[`Mermaid Error: `,c]}):o?(0,z.jsx)(`div`,{className:`mermaid-svg-container`,dangerouslySetInnerHTML:{__html:o}}):v?(0,z.jsx)(`div`,{className:`mermaid-loading`,children:`渲染中...`}):(0,z.jsx)(`div`,{className:`mermaid-placeholder`,children:`滚动查看图表`})}):(0,z.jsx)(`pre`,{className:`code-block`,children:(0,z.jsx)(`code`,{children:(0,z.jsx)(gx,{})})}),a&&(0,z.jsx)(n8,{source:C,open:u,onOpenChange:e=>d(e),onSourceChange:e=>{let t=typeof i==`function`?i():i;t!=null&&r.commands.command(({tr:n})=>{let r=t+1,i=r+e.length;return n.replaceWith(r,i,n.doc.type.schema.text(e)),!0})}})]})}var yne=jT.extend({addNodeView(){return Tx(vne)}}).configure({lowlight:_ne});function bne({value:e,onChange:t,mode:n,placeholder:r,readOnly:i,path:a,scrollPosition:o,onLinkClick:s}){let c=(0,P.useRef)(!1),l=(0,P.useRef)(e),u=(0,P.useRef)(0),d=(0,P.useRef)(null),[f,p]=(0,P.useState)(()=>typeof window>`u`?!1:window.innerWidth<768),{frontmatter:m,body:h}=c9(e),[g,_]=(0,P.useState)(m);d.current=g;let v=(0,P.useRef)(null);(0,P.useEffect)(()=>{_(m)},[m]);let y=(0,P.useCallback)(e=>{_(e),d.current=e;let n=v.current;if(n)try{let r=n.storage.markdown,i=r&&typeof r.getMarkdown==`function`?r.getMarkdown():n.getText(),a=i;e&&(a=`---\n${e}\n---\n${i}`),a!==l.current&&(l.current=a,t(a))}catch(e){console.error(`Failed to rebuild content with frontmatter:`,e)}},[t]);(0,P.useEffect)(()=>{let e=()=>p(window.innerWidth<768);return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let b=fx({extensions:[Lee.configure({codeBlock:!1,link:!1,underline:!1}),yne,MT.configure({placeholder:r||`在这里输入 Markdown...`}),CA.configure({html:!0,transformPastedText:!0,transformCopiedText:!0}),OM.configure({resizable:!0}),hM,mM,pM,Ew,Tw.configure({nested:!0}),$C.configure({openOnClick:!1}),AM,NM.configure({multicolor:!0}),Pw,nN],content:h,editable:!i&&n===`wysiwyg`,onUpdate:({editor:e})=>{if(!c.current)try{let n=e.storage.markdown,r=n&&typeof n.getMarkdown==`function`?n.getMarkdown():e.getText(),i=d.current,a=r;i&&(a=`---\n${i}\n---\n${r}`),a!==l.current&&(l.current=a,t(a))}catch(n){console.error(`Failed to get markdown:`,n);let r=e.getText();r!==l.current&&(l.current=r,t(r))}}});return v.current=b,(0,P.useEffect)(()=>{if(!b||c.current)return;let{frontmatter:t,body:n}=c9(e);d.current=t;let r=``;try{let e=b.storage.markdown;r=e&&typeof e.getMarkdown==`function`?e.getMarkdown():b.getText()}catch{r=b.getText()}if(r===n){l.current=e;return}let{from:i,to:a}=b.state.selection;c.current=!0,b.commands.setContent(n),l.current=e,requestAnimationFrame(()=>{c.current=!1;try{let e=b.state.doc.content.size,t=Math.min(i,e),n=Math.min(a,e);t>=0&&n>=0&&b.commands.setTextSelection({from:t,to:n})}catch{b.commands.setTextSelection({from:0,to:0})}})},[b,e]),(0,P.useEffect)(()=>{b&&b.setEditable(!i&&n===`wysiwyg`)},[b,i,n]),(0,P.useEffect)(()=>{if(!a||!s)return;let e=e=>{let t=e.target.closest(`a`);if(!t)return;let n=document.querySelector(`.tiptap-editor`);if(!n||!n.contains(t))return;e.preventDefault(),e.stopPropagation();let r=t.getAttribute(`href`);if(!r)return;if(r.startsWith(`http://`)||r.startsWith(`https://`)||r.startsWith(`mailto:`)||r.startsWith(`#`)){window.open(r,`_blank`,`noopener,noreferrer`);return}let i=a.substring(0,a.lastIndexOf(`/`)),o=r;if(r.startsWith(`./`))o=i+r.slice(1);else if(r.startsWith(`../`)){let e=i,t=r.slice(3);for(;t.startsWith(`../`);){let n=e.lastIndexOf(`/`);if(n<=0)break;e=e.substring(0,n),t=t.slice(3)}o=t.startsWith(`../`)?r:e+`/`+t}else r.startsWith(`/`)||(o=i+`/`+r);o=decodeURIComponent(o),s(o)};return document.addEventListener(`click`,e,!0),()=>document.removeEventListener(`click`,e,!0)},[a,s]),(0,P.useEffect)(()=>{if(n===`source`){let e=document.querySelector(`.editor-textarea`);if(e){let t=u.current||o||0;t>0&&requestAnimationFrame(()=>{e.scrollTop=t})}}else if(n===`wysiwyg`){let e=document.querySelector(`.editor-textarea`);e&&(u.current=e.scrollTop);let t=u.current||o||0;if(t>0){let e=document.querySelector(`.tiptap-editor`);e&&requestAnimationFrame(()=>{e.scrollTop=t})}}},[n,o]),n===`source`?(0,z.jsx)(`textarea`,{className:`editor-textarea`,value:e,onChange:e=>t(e.target.value),placeholder:r||`在这里输入 Markdown...`,readOnly:i,spellCheck:!1}):(0,z.jsxs)(`div`,{className:`tiptap-editor-root tiptap-editor`,children:[(0,z.jsx)(`div`,{className:`tiptap-editor-toolbar-area`,children:n===`wysiwyg`&&!f&&(0,z.jsx)(o8,{editor:b,variant:`desktop`})}),(0,z.jsxs)(`div`,{className:`tiptap-editor-scroll-area`,children:[(0,z.jsx)(hne,{rawFrontmatter:g,onFrontmatterChange:y}),(0,z.jsx)(ix,{editor:b,className:`tiptap-editor-content`})]}),f&&n===`wysiwyg`&&(0,z.jsx)(o8,{editor:b,variant:`mobile`})]})}function xne(e,t){return e?t?.find(t=>t.path===e)?.name||e.split(`/`).pop()||e:``}var u9=[`#2563eb`,`#059669`,`#d97706`,`#7c3aed`,`#e11d48`,`#0891b2`];function Sne(e){return u9[e%u9.length]}var Cne=(0,P.memo)(function({tabOrder:e,tabs:t,activeTabKey:n,onActivate:r,onCloseRequest:i,isMobile:a,rightContent:o,dirs:s}){if(e.length===0)return null;let c=(0,P.useMemo)(()=>{let n=new Map;for(let r of e){let e=t.get(r);if(!e)continue;let i=e.rootPath;n.has(i)||n.set(i,[]),n.get(i).push(r)}return n},[e,t]),l=c.size>1,u=(0,P.useMemo)(()=>{let e=new Map,t=0;for(let[n]of c.entries())e.set(n,t++);return e},[c]);return(0,z.jsxs)(`div`,{className:`flex items-center bg-muted/20 border-b border-border shrink-0`,children:[(0,z.jsx)(`div`,{className:`flex items-center gap-1.5 px-3 py-2 overflow-x-auto overflow-y-hidden flex-1 tabbar-scroll-hide`,style:{WebkitOverflowScrolling:`touch`},children:Array.from(c.entries()).map(([e,o],c)=>{let d=Sne(u.get(e)??0);return(0,z.jsxs)(`div`,{className:`flex items-center gap-1.5 shrink-0`,children:[l&&c>0&&(0,z.jsx)(`div`,{className:`flex items-center self-stretch px-1 shrink-0`,children:(0,z.jsx)(`div`,{className:`w-[2px] h-5 rounded-full`,style:{backgroundColor:d}})}),l&&(0,z.jsx)(`span`,{className:`px-2 py-1 text-[10px] font-medium text-muted-foreground bg-muted/40 rounded shrink-0 select-none`,style:{color:d},children:xne(e,s)}),o.map(e=>{let o=t.get(e);if(!o)return null;let s=o.path.split(`/`).pop()||o.path,c=e===n,u=o.content!==o.lastSavedContent;return(0,z.jsxs)(`div`,{className:R(`group flex items-center gap-1.5 px-3 py-1.5 text-xs cursor-pointer rounded-lg border min-w-[100px] max-w-[200px] shrink-0 select-none transition-all duration-150`,c?`bg-background text-foreground border-border shadow-sm translate-y-[-1px]`:`bg-transparent text-muted-foreground border-transparent hover:bg-muted/50`),onClick:()=>r(e),children:[l&&(0,z.jsx)(`span`,{className:`size-1.5 rounded-full shrink-0`,style:{backgroundColor:d}}),u&&(0,z.jsx)(`span`,{className:`size-1.5 rounded-full bg-primary shrink-0`}),(0,z.jsx)(`span`,{className:`truncate flex-1`,children:s}),(0,z.jsx)(tr,{variant:`ghost`,size:`icon`,className:R(`size-5 min-w-5 min-h-5 shrink-0 rounded-sm`,a?`opacity-100`:`opacity-0 group-hover:opacity-100`,c?`hover:bg-muted`:`hover:bg-muted/50`),onClick:t=>{t.stopPropagation(),i(e)},title:`关闭标签`,children:(0,z.jsx)(Ke,{className:`size-3`})})]},e)})]},e??`null`)})}),o&&(0,z.jsx)(`div`,{className:`flex items-center gap-2 px-3 h-9 shrink-0 text-xs text-muted-foreground`,children:o})]})}),wne=(0,P.memo)(function({visible:e,onClose:t,onCreate:n,currentDir:r}){let[i,a]=(0,P.useState)(``),[o,s]=(0,P.useState)(!1);(0,P.useEffect)(()=>{e&&a(``)},[e]);let c=()=>{i.trim()&&(n(i.trim(),o,r),a(``),t())},l=e=>{e||t()},u=e=>{e.key===`Enter`&&c()},d=r?r.split(`/`).filter(Boolean).join(` / `):`目录`;return(0,z.jsx)(Uo,{open:e,onOpenChange:l,children:(0,z.jsxs)(Ko,{side:`bottom`,className:`rounded-t-2xl`,noClose:!0,children:[(0,z.jsxs)(qo,{className:`text-left`,children:[(0,z.jsx)(Yo,{children:`新建`}),(0,z.jsxs)(Xo,{children:[`位置: `,d]})]}),(0,z.jsxs)(`div`,{className:`space-y-4 mt-4`,children:[(0,z.jsxs)(`div`,{className:`flex gap-2`,children:[(0,z.jsxs)(tr,{variant:o?`outline`:`default`,onClick:()=>s(!1),className:`flex-1 h-11`,children:[(0,z.jsx)(Ce,{className:`size-4 mr-2`}),`Markdown`]}),(0,z.jsxs)(tr,{variant:o?`default`:`outline`,onClick:()=>s(!0),className:`flex-1 h-11`,children:[(0,z.jsx)(Oe,{className:`size-4 mr-2`}),`文件夹`]})]}),(0,z.jsx)(In,{placeholder:o?`文件夹名称`:`文件名称 (自动添加 .md)`,value:i,onChange:e=>a(e.target.value),onKeyDown:u,className:`h-11`,autoFocus:!0}),(0,z.jsxs)(`div`,{className:`flex gap-2 justify-end pt-2`,children:[(0,z.jsx)(tr,{variant:`outline`,onClick:t,children:`取消`}),(0,z.jsx)(tr,{onClick:c,children:`创建`})]})]})]})})});function Tne(e,t){return t||e.replace(/\\/g,`/`).split(`/`).filter(Boolean).pop()||e}function Ene({open:e,onOpenChange:t,onSelect:n,activeRoot:r,groups:i}){let[a,o]=(0,P.useState)(``),[s,c]=(0,P.useState)([]),[l,u]=(0,P.useState)(0),[d,f]=(0,P.useState)(!1),[p,m]=(0,P.useState)(!1),[h,g]=(0,P.useState)(`all`),_=(0,P.useRef)(null);(0,P.useEffect)(()=>{m(window.innerWidth<768)},[]),(0,P.useEffect)(()=>{e&&r?g(r):e&&g(`all`)},[e,r]),(0,P.useEffect)(()=>{e?setTimeout(()=>_.current?.focus(),100):(o(``),c([]),u(0))},[e]),(0,P.useEffect)(()=>{if(!a.trim()){c([]),u(0);return}let e=setTimeout(()=>{f(!0);let e=new URL(`/api/files/search`,window.location.origin);e.searchParams.set(`q`,a),e.searchParams.set(`limit`,`50`),h!==`all`&&e.searchParams.set(`root`,h),fetch(e.toString()).then(e=>e.json()).then(e=>{c(e.results||[]),u(0)}).catch(console.error).finally(()=>f(!1))},200);return()=>clearTimeout(e)},[a,h]);let v=(0,P.useCallback)((e,r)=>{n(e,r),t(!1)},[n,t]),y=(0,P.useCallback)(e=>{if(e.key===`ArrowDown`)e.preventDefault(),u(e=>Math.min(e+1,s.length-1));else if(e.key===`ArrowUp`)e.preventDefault(),u(e=>Math.max(e-1,0));else if(e.key===`Enter`&&s.length>0){e.preventDefault();let t=s[l];v(t.path,t.rootPath)}else e.key===`Escape`&&t(!1)},[s,l,v,t]);return(0,P.useEffect)(()=>{let n=n=>{n.key===`Escape`&&e&&t(!1)};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e,t]),e?(0,z.jsxs)(`div`,{className:`fixed inset-0 z-50 flex flex-col bg-background/95 backdrop-blur-sm`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2 px-4 py-3 border-b border-border`,children:[p&&(0,z.jsx)(tr,{variant:`ghost`,size:`icon`,onClick:()=>t(!1),children:(0,z.jsx)(ue,{className:`size-5`})}),(0,z.jsxs)(`div`,{className:`relative flex-1`,children:[(0,z.jsx)(He,{className:`absolute left-3 top-1/2 -translate-y-1/2 size-4 text-muted-foreground`}),(0,z.jsx)(In,{ref:_,type:`text`,placeholder:`搜索文件或内容...`,value:a,onChange:e=>o(e.target.value),onKeyDown:y,className:`pl-9 pr-20`}),!a&&(0,z.jsx)(`span`,{className:`absolute right-10 top-1/2 -translate-y-1/2 text-xs text-muted-foreground pointer-events-none`,children:`⌘K`}),a&&(0,z.jsx)(`button`,{onClick:()=>o(``),className:`absolute right-3 top-1/2 -translate-y-1/2`,children:(0,z.jsx)(Ke,{className:`size-4 text-muted-foreground hover:text-foreground`})})]}),(0,z.jsx)(tr,{variant:`ghost`,size:`icon`,onClick:()=>t(!1),children:(0,z.jsx)(Ke,{className:`size-5`})})]}),i&&i.length>0&&(0,z.jsxs)(`div`,{className:`flex items-center gap-1 px-4 py-2 border-b border-border overflow-x-auto`,children:[(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground shrink-0 mr-1`,children:`搜索范围:`}),(0,z.jsx)(tr,{variant:h===`all`?`default`:`ghost`,size:`sm`,className:`text-xs h-7 shrink-0`,onClick:()=>g(`all`),children:`全部`}),i.map(e=>(0,z.jsx)(tr,{variant:h===e.root.path?`default`:`ghost`,size:`sm`,className:`text-xs h-7 shrink-0`,onClick:()=>g(e.root.path),children:Tne(e.root.path,e.root.name)},e.root.path))]}),(0,z.jsxs)(`div`,{className:`flex-1 overflow-y-auto`,children:[d&&(0,z.jsxs)(`div`,{className:`flex items-center justify-center py-12 text-muted-foreground`,children:[(0,z.jsx)(Ne,{className:`size-5 mr-2 animate-spin`}),(0,z.jsx)(`span`,{className:`text-sm`,children:`搜索中...`})]}),!d&&a&&s.length===0&&(0,z.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-12 text-muted-foreground`,children:[(0,z.jsx)(He,{className:`size-10 mb-3 opacity-50`}),(0,z.jsx)(`span`,{className:`text-sm`,children:`未找到相关结果`})]}),!d&&!a&&(0,z.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-12 text-muted-foreground`,children:[(0,z.jsx)(He,{className:`size-10 mb-3 opacity-50`}),(0,z.jsx)(`span`,{className:`text-sm`,children:`输入关键词搜索文件名或内容`})]}),s.length>0&&(0,z.jsx)(`div`,{className:`py-2`,children:s.map((e,t)=>(0,z.jsxs)(`button`,{onClick:()=>v(e.path,e.rootPath),className:R(`w-full px-4 py-3 flex items-start gap-3 text-left hover:bg-accent transition-colors`,t===l&&`bg-accent`),children:[(0,z.jsx)(Ce,{className:`size-5 mt-0.5 text-muted-foreground shrink-0`}),(0,z.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,z.jsx)(`span`,{className:`font-medium truncate`,children:e.name}),e.rootName&&(0,z.jsx)(`span`,{className:`text-[10px] px-1.5 py-0.5 rounded bg-muted text-muted-foreground`,children:e.rootName})]}),e.matchedLine&&(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground mt-1 line-clamp-2`,children:e.matchedLine}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground mt-1 truncate`,children:e.path})]})]},`${e.rootPath}:${e.path}`))})]}),s.length>0&&(0,z.jsxs)(`div`,{className:`px-4 py-2 border-t border-border text-xs text-muted-foreground flex items-center justify-between`,children:[(0,z.jsxs)(`span`,{children:[s.length,` 个结果`]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(`span`,{className:`px-1.5 py-0.5 rounded bg-accent`,children:`↑↓`}),(0,z.jsx)(`span`,{children:`选择`}),(0,z.jsx)(`span`,{className:`px-1.5 py-0.5 rounded bg-accent`,children:`Enter`}),(0,z.jsx)(`span`,{children:`打开`})]})]})]}):null}var d9=Fo,Dne=Lo,f9=P.forwardRef(({className:e,...t},n)=>(0,z.jsx)(Ro,{ref:n,className:R(`fixed inset-0 z-50 bg-black/80 animate-fade-in`,e),...t}));f9.displayName=Ro.displayName;var p9=P.forwardRef(({className:e,children:t,...n},r)=>(0,z.jsxs)(Dne,{children:[(0,z.jsx)(f9,{}),(0,z.jsxs)(zo,{ref:r,className:R(`fixed left-[50%] top-[50%] z-50 grid w-[calc(100%-2rem)] max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 animate-zoom-in rounded-lg max-h-[calc(100vh-2rem)] overflow-y-auto`,e),...n,children:[t,(0,z.jsxs)(Ho,{className:`absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground`,children:[(0,z.jsx)(Ke,{className:`size-4`}),(0,z.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]}));p9.displayName=zo.displayName;var m9=({className:e,...t})=>(0,z.jsx)(`div`,{className:R(`flex flex-col space-y-1.5 text-center sm:text-left`,e),...t});m9.displayName=`DialogHeader`;var h9=({className:e,...t})=>(0,z.jsx)(`div`,{className:R(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,e),...t});h9.displayName=`DialogFooter`;var g9=P.forwardRef(({className:e,...t},n)=>(0,z.jsx)(Bo,{ref:n,className:R(`text-lg font-semibold leading-none tracking-tight`,e),...t}));g9.displayName=Bo.displayName;var _9=P.forwardRef(({className:e,...t},n)=>(0,z.jsx)(Vo,{ref:n,className:R(`text-sm text-muted-foreground`,e),...t}));_9.displayName=Vo.displayName;function One({open:e,onOpenChange:t,item:n,onRename:r}){let[i,a]=(0,P.useState)(``);(0,P.useEffect)(()=>{n&&a(n.type===`directory`?n.name:n.name.replace(/\.md$/,``))},[n]);let o=()=>{n&&i.trim()&&(r(n.path,i.trim(),n.rootPath),t(!1))};return n?(0,z.jsx)(d9,{open:e,onOpenChange:t,children:(0,z.jsxs)(p9,{className:`sm:max-w-[400px]`,children:[(0,z.jsxs)(m9,{children:[(0,z.jsx)(g9,{children:`重命名`}),(0,z.jsxs)(_9,{children:[`输入新的名称来重命名「`,n.name,`」`]})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2 py-2`,children:[n.type===`directory`?(0,z.jsx)(Oe,{className:`size-5 shrink-0 text-muted-foreground`}):(0,z.jsx)(we,{className:`size-5 shrink-0 text-muted-foreground`}),(0,z.jsx)(In,{value:i,onChange:e=>a(e.target.value),onKeyDown:e=>{e.key===`Enter`&&o()},autoFocus:!0})]}),(0,z.jsxs)(h9,{children:[(0,z.jsx)(tr,{variant:`outline`,onClick:()=>t(!1),children:`取消`}),(0,z.jsx)(tr,{onClick:o,disabled:!i.trim(),children:`确定`})]})]})}):null}var kne=P.createContext(void 0);function Ane(e){let t=P.useContext(kne);return e||t||`ltr`}function jne(e,[t,n]){return Math.min(n,Math.max(t,e))}function Mne(e,t){return P.useReducer((e,n)=>t[e][n]??e,e)}var v9=`ScrollArea`,[y9,Nne]=ir(v9),[Pne,b9]=y9(v9),x9=P.forwardRef((e,t)=>{let{__scopeScrollArea:n,type:r=`hover`,dir:i,scrollHideDelay:a=600,...o}=e,[s,c]=P.useState(null),[l,u]=P.useState(null),[d,f]=P.useState(null),[p,m]=P.useState(null),[h,g]=P.useState(null),[_,v]=P.useState(0),[y,b]=P.useState(0),[x,S]=P.useState(!1),[C,w]=P.useState(!1),T=zn(t,e=>c(e)),E=Ane(i);return(0,z.jsx)(Pne,{scope:n,type:r,dir:E,scrollHideDelay:a,scrollArea:s,viewport:l,onViewportChange:u,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:x,onScrollbarXEnabledChange:S,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:C,onScrollbarYEnabledChange:w,onCornerWidthChange:v,onCornerHeightChange:b,children:(0,z.jsx)(yr.div,{dir:E,...o,ref:T,style:{position:`relative`,"--radix-scroll-area-corner-width":_+`px`,"--radix-scroll-area-corner-height":y+`px`,...e.style}})})});x9.displayName=v9;var S9=`ScrollAreaViewport`,C9=P.forwardRef((e,t)=>{let{__scopeScrollArea:n,children:r,nonce:i,...a}=e,o=b9(S9,n),s=zn(t,P.useRef(null),o.onViewportChange);return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}`},nonce:i}),(0,z.jsx)(yr.div,{"data-radix-scroll-area-viewport":``,...a,ref:s,style:{overflowX:o.scrollbarXEnabled?`scroll`:`hidden`,overflowY:o.scrollbarYEnabled?`scroll`:`hidden`,...e.style},children:(0,z.jsx)(`div`,{ref:o.onContentChange,style:{minWidth:`100%`,display:`table`},children:r})})]})});C9.displayName=S9;var w9=`ScrollAreaScrollbar`,T9=P.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=b9(w9,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:o}=i,s=e.orientation===`horizontal`;return P.useEffect(()=>(s?a(!0):o(!0),()=>{s?a(!1):o(!1)}),[s,a,o]),i.type===`hover`?(0,z.jsx)(Fne,{...r,ref:t,forceMount:n}):i.type===`scroll`?(0,z.jsx)(Ine,{...r,ref:t,forceMount:n}):i.type===`auto`?(0,z.jsx)(E9,{...r,ref:t,forceMount:n}):i.type===`always`?(0,z.jsx)(D9,{...r,ref:t}):null});T9.displayName=w9;var Fne=P.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=b9(w9,e.__scopeScrollArea),[a,o]=P.useState(!1);return P.useEffect(()=>{let e=i.scrollArea,t=0;if(e){let n=()=>{window.clearTimeout(t),o(!0)},r=()=>{t=window.setTimeout(()=>o(!1),i.scrollHideDelay)};return e.addEventListener(`pointerenter`,n),e.addEventListener(`pointerleave`,r),()=>{window.clearTimeout(t),e.removeEventListener(`pointerenter`,n),e.removeEventListener(`pointerleave`,r)}}},[i.scrollArea,i.scrollHideDelay]),(0,z.jsx)(Sr,{present:n||a,children:(0,z.jsx)(E9,{"data-state":a?`visible`:`hidden`,...r,ref:t})})}),Ine=P.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=b9(w9,e.__scopeScrollArea),a=e.orientation===`horizontal`,o=B9(()=>c(`SCROLL_END`),100),[s,c]=Mne(`hidden`,{hidden:{SCROLL:`scrolling`},scrolling:{SCROLL_END:`idle`,POINTER_ENTER:`interacting`},interacting:{SCROLL:`interacting`,POINTER_LEAVE:`idle`},idle:{HIDE:`hidden`,SCROLL:`scrolling`,POINTER_ENTER:`interacting`}});return P.useEffect(()=>{if(s===`idle`){let e=window.setTimeout(()=>c(`HIDE`),i.scrollHideDelay);return()=>window.clearTimeout(e)}},[s,i.scrollHideDelay,c]),P.useEffect(()=>{let e=i.viewport,t=a?`scrollLeft`:`scrollTop`;if(e){let n=e[t],r=()=>{let r=e[t];n!==r&&(c(`SCROLL`),o()),n=r};return e.addEventListener(`scroll`,r),()=>e.removeEventListener(`scroll`,r)}},[i.viewport,a,c,o]),(0,z.jsx)(Sr,{present:n||s!==`hidden`,children:(0,z.jsx)(D9,{"data-state":s===`hidden`?`hidden`:`visible`,...r,ref:t,onPointerEnter:nr(e.onPointerEnter,()=>c(`POINTER_ENTER`)),onPointerLeave:nr(e.onPointerLeave,()=>c(`POINTER_LEAVE`))})})}),E9=P.forwardRef((e,t)=>{let n=b9(w9,e.__scopeScrollArea),{forceMount:r,...i}=e,[a,o]=P.useState(!1),s=e.orientation===`horizontal`,c=B9(()=>{if(n.viewport){let e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;o(s?e:t)}},10);return V9(n.viewport,c),V9(n.content,c),(0,z.jsx)(Sr,{present:r||a,children:(0,z.jsx)(D9,{"data-state":a?`visible`:`hidden`,...i,ref:t})})}),D9=P.forwardRef((e,t)=>{let{orientation:n=`vertical`,...r}=e,i=b9(w9,e.__scopeScrollArea),a=P.useRef(null),o=P.useRef(0),[s,c]=P.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=F9(s.viewport,s.content),u={...r,sizes:s,onSizesChange:c,hasThumb:l>0&&l<1,onThumbChange:e=>a.current=e,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:e=>o.current=e};function d(e,t){return Hne(e,o.current,s,t)}return n===`horizontal`?(0,z.jsx)(Lne,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollLeft,t=L9(e,s,i.dir);a.current.style.transform=`translate3d(${t}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=d(e,i.dir))}}):n===`vertical`?(0,z.jsx)(Rne,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollTop,t=L9(e,s);a.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=d(e))}}):null}),Lne=P.forwardRef((e,t)=>{let{sizes:n,onSizesChange:r,...i}=e,a=b9(w9,e.__scopeScrollArea),[o,s]=P.useState(),c=P.useRef(null),l=zn(t,c,a.onScrollbarXChange);return P.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),(0,z.jsx)(k9,{"data-orientation":`horizontal`,...i,ref:l,sizes:n,style:{bottom:0,left:a.dir===`rtl`?`var(--radix-scroll-area-corner-width)`:0,right:a.dir===`ltr`?`var(--radix-scroll-area-corner-width)`:0,"--radix-scroll-area-thumb-width":I9(n)+`px`,...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(a.viewport){let r=a.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),z9(r,n)&&t.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:P9(o.paddingLeft),paddingEnd:P9(o.paddingRight)}})}})}),Rne=P.forwardRef((e,t)=>{let{sizes:n,onSizesChange:r,...i}=e,a=b9(w9,e.__scopeScrollArea),[o,s]=P.useState(),c=P.useRef(null),l=zn(t,c,a.onScrollbarYChange);return P.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),(0,z.jsx)(k9,{"data-orientation":`vertical`,...i,ref:l,sizes:n,style:{top:0,right:a.dir===`ltr`?0:void 0,left:a.dir===`rtl`?0:void 0,bottom:`var(--radix-scroll-area-corner-height)`,"--radix-scroll-area-thumb-height":I9(n)+`px`,...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(a.viewport){let r=a.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),z9(r,n)&&t.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:P9(o.paddingTop),paddingEnd:P9(o.paddingBottom)}})}})}),[zne,O9]=y9(w9),k9=P.forwardRef((e,t)=>{let{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:a,onThumbPointerUp:o,onThumbPointerDown:s,onThumbPositionChange:c,onDragScroll:l,onWheelScroll:u,onResize:d,...f}=e,p=b9(w9,n),[m,h]=P.useState(null),g=zn(t,e=>h(e)),_=P.useRef(null),v=P.useRef(``),y=p.viewport,b=r.content-r.viewport,x=ei(u),S=ei(c),C=B9(d,10);function w(e){_.current&&l({x:e.clientX-_.current.left,y:e.clientY-_.current.top})}return P.useEffect(()=>{let e=e=>{let t=e.target;m?.contains(t)&&x(e,b)};return document.addEventListener(`wheel`,e,{passive:!1}),()=>document.removeEventListener(`wheel`,e,{passive:!1})},[y,m,b,x]),P.useEffect(S,[r,S]),V9(m,C),V9(p.content,C),(0,z.jsx)(zne,{scope:n,scrollbar:m,hasThumb:i,onThumbChange:ei(a),onThumbPointerUp:ei(o),onThumbPositionChange:S,onThumbPointerDown:ei(s),children:(0,z.jsx)(yr.div,{...f,ref:g,style:{position:`absolute`,...f.style},onPointerDown:nr(e.onPointerDown,e=>{e.button===0&&(e.target.setPointerCapture(e.pointerId),_.current=m.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect=`none`,p.viewport&&(p.viewport.style.scrollBehavior=`auto`),w(e))}),onPointerMove:nr(e.onPointerMove,w),onPointerUp:nr(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=v.current,p.viewport&&(p.viewport.style.scrollBehavior=``),_.current=null})})})}),A9=`ScrollAreaThumb`,j9=P.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=O9(A9,e.__scopeScrollArea);return(0,z.jsx)(Sr,{present:n||i.hasThumb,children:(0,z.jsx)(Bne,{ref:t,...r})})}),Bne=P.forwardRef((e,t)=>{let{__scopeScrollArea:n,style:r,...i}=e,a=b9(A9,n),o=O9(A9,n),{onThumbPositionChange:s}=o,c=zn(t,e=>o.onThumbChange(e)),l=P.useRef(void 0),u=B9(()=>{l.current&&=(l.current(),void 0)},100);return P.useEffect(()=>{let e=a.viewport;if(e){let t=()=>{u(),l.current||(l.current=Une(e,s),s())};return s(),e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)}},[a.viewport,u,s]),(0,z.jsx)(yr.div,{"data-state":o.hasThumb?`visible`:`hidden`,...i,ref:c,style:{width:`var(--radix-scroll-area-thumb-width)`,height:`var(--radix-scroll-area-thumb-height)`,...r},onPointerDownCapture:nr(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;o.onThumbPointerDown({x:n,y:r})}),onPointerUp:nr(e.onPointerUp,o.onThumbPointerUp)})});j9.displayName=A9;var M9=`ScrollAreaCorner`,N9=P.forwardRef((e,t)=>{let n=b9(M9,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!==`scroll`&&r?(0,z.jsx)(Vne,{...e,ref:t}):null});N9.displayName=M9;var Vne=P.forwardRef((e,t)=>{let{__scopeScrollArea:n,...r}=e,i=b9(M9,n),[a,o]=P.useState(0),[s,c]=P.useState(0),l=!!(a&&s);return V9(i.scrollbarX,()=>{let e=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(e),c(e)}),V9(i.scrollbarY,()=>{let e=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(e),o(e)}),l?(0,z.jsx)(yr.div,{...r,ref:t,style:{width:a,height:s,position:`absolute`,right:i.dir===`ltr`?0:void 0,left:i.dir===`rtl`?0:void 0,bottom:0,...e.style}}):null});function P9(e){return e?parseInt(e,10):0}function F9(e,t){let n=e/t;return isNaN(n)?0:n}function I9(e){let t=F9(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Hne(e,t,n,r=`ltr`){let i=I9(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r===`ltr`?[0,u]:[u*-1,0];return R9([c,l],d)(e)}function L9(e,t,n=`ltr`){let r=I9(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=jne(e,n===`ltr`?[0,o]:[o*-1,0]);return R9([0,o],[0,s])(c)}function R9(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function z9(e,t){return e>0&&e<t}var Une=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)};function B9(e,t){let n=ei(e),r=P.useRef(0);return P.useEffect(()=>()=>window.clearTimeout(r.current),[]),P.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function V9(e,t){let n=ei(t);or(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}var H9=x9,Wne=C9,Gne=N9,U9=P.forwardRef(({className:e,children:t,...n},r)=>(0,z.jsxs)(H9,{ref:r,className:R(`relative overflow-hidden`,e),...n,children:[(0,z.jsx)(Wne,{className:`h-full w-full rounded-[inherit]`,children:t}),(0,z.jsx)(W9,{}),(0,z.jsx)(Gne,{})]}));U9.displayName=H9.displayName;var W9=P.forwardRef(({className:e,orientation:t=`vertical`,...n},r)=>(0,z.jsx)(T9,{ref:r,orientation:t,className:R(`flex touch-none select-none transition-colors`,t===`vertical`&&`h-full w-2.5 border-l border-l-transparent p-[1px]`,t===`horizontal`&&`h-2.5 flex-col border-t border-t-transparent p-[1px]`,e),...n,children:(0,z.jsx)(j9,{className:`relative flex-1 rounded-full bg-border`})}));W9.displayName=T9.displayName;function G9({node:e,selectedPath:t,onSelect:n,expandedPaths:r,onToggleExpand:i,currentItemPath:a,rootPath:o}){if(e.type!==`directory`)return null;let s=r.has(e.path),c=t===e.path,l=e.path===a||a.startsWith(e.path+`/`),u=e.children&&e.children.length>0;return(0,z.jsxs)(`div`,{className:`select-none`,children:[(0,z.jsxs)(`div`,{className:R(`flex items-center gap-1 py-1.5 px-2 rounded-md cursor-pointer hover:bg-accent`,c&&`bg-accent`,l&&`opacity-50 pointer-events-none`),onClick:()=>!l&&n(e.path),children:[(0,z.jsx)(`button`,{onClick:t=>{t.stopPropagation(),u&&!l&&i(e.path)},className:R(`size-5 flex items-center justify-center rounded hover:bg-accent`,(!u||l)&&`invisible`),children:(0,z.jsx)(he,{className:R(`size-3.5 transition-transform`,s&&`rotate-90`)})}),s?(0,z.jsx)(Ee,{className:`size-4 shrink-0 text-muted-foreground`}):(0,z.jsx)(Oe,{className:`size-4 shrink-0 text-muted-foreground`}),(0,z.jsx)(`span`,{className:`text-sm truncate flex-1`,children:e.name}),c&&(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`移动到这里`})]}),s&&u&&(0,z.jsx)(`div`,{className:`ml-4`,children:e.children.map(e=>(0,z.jsx)(G9,{node:e,selectedPath:t,onSelect:n,expandedPaths:r,onToggleExpand:i,currentItemPath:a,rootPath:o},e.path))})]})}function Kne({open:e,onOpenChange:t,item:n,groups:r,onMove:i}){let[a,o]=(0,P.useState)(``),[s,c]=(0,P.useState)(null),[l,u]=(0,P.useState)(null),[d,f]=(0,P.useState)(new Set);(0,P.useEffect)(()=>{n&&e&&(o(n.path.substring(0,n.path.lastIndexOf(`/`))||`/`),c(n.rootPath),u(n.rootPath))},[n,e]);let p=e=>{f(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},m=()=>{if(n&&a!==null&&s!==null&&l!==null){let e=n.path.split(`/`).pop()||``,r=a===`/`?`/${e}`:`${a}/${e}`;(r!==n.path||l!==s)&&i(n.path,r,l,s),t(!1)}};if(!n)return null;let h=r.find(e=>e.root.path===s)?.files||[],g=a?a===`/`?`目录`:a.split(`/`).filter(Boolean).join(` / `):``;return(0,z.jsx)(d9,{open:e,onOpenChange:t,children:(0,z.jsxs)(p9,{className:`sm:max-w-[480px] max-h-[80vh] flex flex-col`,children:[(0,z.jsxs)(m9,{children:[(0,z.jsx)(g9,{children:`移动到`}),(0,z.jsxs)(_9,{children:[`选择要将「`,n.name,`」移动到的目标位置`]})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2 py-2 text-sm text-muted-foreground`,children:[(0,z.jsx)(Ce,{className:`size-4 shrink-0`}),(0,z.jsx)(`span`,{className:`truncate`,children:n.name})]}),r.length>1&&(0,z.jsxs)(`div`,{className:`mb-3`,children:[(0,z.jsx)(`label`,{className:`text-xs text-muted-foreground mb-1.5 block`,children:`目标目录`}),(0,z.jsx)(`select`,{value:s||``,onChange:e=>{c(e.target.value),o(`/`),f(new Set)},className:`w-full px-3 py-2 text-sm border rounded-md bg-background`,children:r.map(e=>(0,z.jsx)(`option`,{value:e.root.path,children:e.root.path.split(`/`).pop()||e.root.path},e.root.path))})]}),(0,z.jsx)(U9,{className:`flex-1 max-h-[300px] border rounded-md p-2`,children:(0,z.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,z.jsxs)(`div`,{className:R(`flex items-center gap-1 py-1.5 px-2 rounded-md cursor-pointer hover:bg-accent`,a===`/`&&`bg-accent`),onClick:()=>o(`/`),children:[(0,z.jsx)(Oe,{className:`size-4 shrink-0 text-muted-foreground`}),(0,z.jsx)(`span`,{className:`text-sm`,children:`目录`}),a===`/`&&(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground ml-auto`,children:`移动到这里`})]}),h.map(e=>(0,z.jsx)(G9,{node:e,selectedPath:a,onSelect:o,expandedPaths:d,onToggleExpand:p,currentItemPath:n.path,rootPath:s||``},e.path))]})}),(0,z.jsxs)(`div`,{className:`text-xs text-muted-foreground py-2`,children:[`目标位置: `,(0,z.jsx)(`span`,{className:`font-medium text-foreground`,children:g})]}),(0,z.jsxs)(h9,{children:[(0,z.jsx)(tr,{variant:`outline`,onClick:()=>t(!1),children:`取消`}),(0,z.jsx)(tr,{onClick:m,disabled:a===null,children:`移动`})]})]})})}function K9({node:e,selectedPath:t,onSelect:n,expandedPaths:r,onToggleExpand:i,currentItemPath:a,rootPath:o}){if(e.type!==`directory`)return null;let s=r.has(e.path),c=t===e.path,l=e.path===a||a.startsWith(e.path+`/`),u=e.children&&e.children.length>0;return(0,z.jsxs)(`div`,{className:`select-none`,children:[(0,z.jsxs)(`div`,{className:R(`flex items-center gap-1 py-1.5 px-2 rounded-md cursor-pointer hover:bg-accent`,c&&`bg-accent`,l&&`opacity-50 pointer-events-none`),onClick:()=>!l&&n(e.path),children:[(0,z.jsx)(`button`,{onClick:t=>{t.stopPropagation(),u&&!l&&i(e.path)},className:R(`size-5 flex items-center justify-center rounded hover:bg-accent`,(!u||l)&&`invisible`),children:(0,z.jsx)(he,{className:R(`size-3.5 transition-transform`,s&&`rotate-90`)})}),s?(0,z.jsx)(Ee,{className:`size-4 shrink-0 text-muted-foreground`}):(0,z.jsx)(Oe,{className:`size-4 shrink-0 text-muted-foreground`}),(0,z.jsx)(`span`,{className:`text-sm truncate flex-1`,children:e.name}),c&&(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`复制到这里`})]}),s&&u&&(0,z.jsx)(`div`,{className:`ml-4`,children:e.children.map(e=>(0,z.jsx)(K9,{node:e,selectedPath:t,onSelect:n,expandedPaths:r,onToggleExpand:i,currentItemPath:a,rootPath:o},e.path))})]})}function qne({open:e,onOpenChange:t,item:n,groups:r,onCopy:i}){let[a,o]=(0,P.useState)(``),[s,c]=(0,P.useState)(null),[l,u]=(0,P.useState)(null),[d,f]=(0,P.useState)(new Set);(0,P.useEffect)(()=>{n&&e&&(o(n.path.substring(0,n.path.lastIndexOf(`/`))||`/`),c(n.rootPath),u(n.rootPath))},[n,e]);let p=e=>{f(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},m=()=>{if(n&&a!==null&&s!==null&&l!==null){let e=n.path.split(`/`).pop()||``,r=a===`/`?`/${e}`:`${a}/${e}`;i(n.path,r,l,s),t(!1)}};if(!n)return null;let h=r.find(e=>e.root.path===s)?.files||[],g=a?a===`/`?`目录`:a.split(`/`).filter(Boolean).join(` / `):``;return(0,z.jsx)(d9,{open:e,onOpenChange:t,children:(0,z.jsxs)(p9,{className:`sm:max-w-[480px] max-h-[80vh] flex flex-col`,children:[(0,z.jsxs)(m9,{children:[(0,z.jsx)(g9,{children:`复制到`}),(0,z.jsxs)(_9,{children:[`选择要将「`,n.name,`」复制到的目标位置`]})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2 py-2 text-sm text-muted-foreground`,children:[(0,z.jsx)(Ce,{className:`size-4 shrink-0`}),(0,z.jsx)(`span`,{className:`truncate`,children:n.name})]}),r.length>1&&(0,z.jsxs)(`div`,{className:`mb-3`,children:[(0,z.jsx)(`label`,{className:`text-xs text-muted-foreground mb-1.5 block`,children:`目标目录`}),(0,z.jsx)(`select`,{value:s||``,onChange:e=>{c(e.target.value),o(`/`),f(new Set)},className:`w-full px-3 py-2 text-sm border rounded-md bg-background`,children:r.map(e=>(0,z.jsx)(`option`,{value:e.root.path,children:e.root.path.split(`/`).pop()||e.root.path},e.root.path))})]}),(0,z.jsx)(U9,{className:`flex-1 max-h-[300px] border rounded-md p-2`,children:(0,z.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,z.jsxs)(`div`,{className:R(`flex items-center gap-1 py-1.5 px-2 rounded-md cursor-pointer hover:bg-accent`,a===`/`&&`bg-accent`),onClick:()=>o(`/`),children:[(0,z.jsx)(Oe,{className:`size-4 shrink-0 text-muted-foreground`}),(0,z.jsx)(`span`,{className:`text-sm`,children:`目录`}),a===`/`&&(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground ml-auto`,children:`复制到这里`})]}),h.map(e=>(0,z.jsx)(K9,{node:e,selectedPath:a,onSelect:o,expandedPaths:d,onToggleExpand:p,currentItemPath:n.path,rootPath:s||``},e.path))]})}),(0,z.jsxs)(`div`,{className:`text-xs text-muted-foreground py-2`,children:[`目标位置: `,(0,z.jsx)(`span`,{className:`font-medium text-foreground`,children:g})]}),(0,z.jsxs)(h9,{children:[(0,z.jsx)(tr,{variant:`outline`,onClick:()=>t(!1),children:`取消`}),(0,z.jsx)(tr,{onClick:m,disabled:a===null,children:`复制`})]})]})})}var q9=P.forwardRef(({className:e,checked:t,onCheckedChange:n,onClick:r,...i},a)=>(0,z.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":t,"data-state":t?`checked`:`unchecked`,ref:a,onClick:e=>{r?.(e),n&&n(!t)},className:R(`peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50`,`data-[state=checked]:bg-primary data-[state=unchecked]:bg-input`,e),...i,children:(0,z.jsx)(`span`,{"data-state":t?`checked`:`unchecked`,className:R(`pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform`,`data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0`)})}));q9.displayName=`Switch`;function Jne({open:e,onOpenChange:t}){let[n,r]=P.useState({showHiddenFiles:!1,allowedExtensions:`.md,.markdown,.mdown,.mkdn,.mkd,.mdwn,.mkdown,.ron`,ignore:{patterns:``}}),[i,a]=P.useState(!1),[o,s]=P.useState(null),[c,l]=P.useState(()=>typeof window>`u`?!1:window.innerWidth<768);P.useEffect(()=>{let e=()=>l(window.innerWidth<768);return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),P.useEffect(()=>{e&&fetch(`/api/files/config`).then(e=>e.json()).then(e=>{r({showHiddenFiles:e.showHiddenFiles??!1,allowedExtensions:(e.allowedExtensions||[]).join(`,`),ignore:{patterns:(e.ignore?.patterns||[]).join(`
|
|
571
|
+
`)}}),s(null)}).catch(()=>{s(`Failed to load settings`)})},[e]);let u=P.useCallback(async()=>{a(!0),s(null);try{let e=n.allowedExtensions.split(`,`).map(e=>e.trim()).filter(e=>e.startsWith(`.`)),r=n.ignore.patterns.split(`
|
|
572
|
+
`).map(e=>e.trim()).filter(Boolean);if(!(await fetch(`/api/files/config`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({showHiddenFiles:n.showHiddenFiles,allowedExtensions:e,ignore:{patterns:r}})})).ok)throw Error(`Failed to save settings`);t(!1),window.dispatchEvent(new CustomEvent(`config-changed`))}catch{s(`Failed to save settings`)}finally{a(!1)}},[n,t]),d=(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`grid gap-6 py-4`,children:[(0,z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,z.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,z.jsx)(`label`,{htmlFor:`show-hidden`,className:`text-sm font-medium leading-none`,children:`显示隐藏文件`}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`显示以 . 开头的文件和文件夹`})]}),(0,z.jsx)(q9,{id:`show-hidden`,checked:n.showHiddenFiles,onCheckedChange:e=>r(t=>({...t,showHiddenFiles:e}))})]}),(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(`label`,{htmlFor:`extensions`,className:`text-sm font-medium leading-none`,children:`文件扩展名`}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`允许的文件扩展名,用逗号分隔`}),(0,z.jsx)(`textarea`,{id:`extensions`,value:n.allowedExtensions,onChange:e=>r(t=>({...t,allowedExtensions:e.target.value})),placeholder:`.md,.markdown,.mdown,.mkdn,.mkd,.mdwn,.mkdown,.ron`,rows:3,className:`flex w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50`})]}),(0,z.jsxs)(`div`,{className:`border-t border-border pt-4 space-y-4`,children:[(0,z.jsx)(`div`,{className:`text-sm font-medium`,children:`忽略设置`}),(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(`label`,{htmlFor:`ignore-patterns`,className:`text-sm font-medium leading-none`,children:`全局忽略模式`}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`每行一个模式,支持 glob 语法(如 node_modules/, *.log)`}),(0,z.jsx)(`textarea`,{id:`ignore-patterns`,value:n.ignore.patterns,onChange:e=>r(t=>({...t,ignore:{...t.ignore,patterns:e.target.value}})),placeholder:`node_modules/
|
|
573
|
+
dist/
|
|
574
|
+
*.log`,rows:4,className:`flex w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50`})]})]}),o&&(0,z.jsx)(`p`,{className:`text-sm text-destructive`,children:o})]}),(0,z.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,z.jsx)(tr,{variant:`outline`,onClick:()=>t(!1),children:`取消`}),(0,z.jsx)(tr,{onClick:u,disabled:i,children:i?`保存中...`:`保存`})]})]});return c?(0,z.jsx)(Uo,{open:e,onOpenChange:t,children:(0,z.jsxs)(Ko,{side:`bottom`,className:`h-[85vh] flex flex-col`,children:[(0,z.jsxs)(qo,{className:`flex-shrink-0`,children:[(0,z.jsxs)(Yo,{className:`flex items-center gap-2`,children:[(0,z.jsx)(Ue,{className:`size-5`}),`设置`]}),(0,z.jsx)(Xo,{children:`配置编辑器显示选项。修改后页面将刷新。`})]}),(0,z.jsx)(`div`,{className:`flex-1 overflow-y-auto`,children:d})]})}):(0,z.jsx)(d9,{open:e,onOpenChange:t,children:(0,z.jsxs)(p9,{className:`sm:max-w-[600px]`,children:[(0,z.jsxs)(m9,{children:[(0,z.jsxs)(g9,{className:`flex items-center gap-2`,children:[(0,z.jsx)(Ue,{className:`size-5`}),`设置`]}),(0,z.jsx)(_9,{children:`配置编辑器显示选项。修改后页面将刷新。`})]}),d]})})}function Yne(e){let t=e.trim();if(!t)return{mode:`fuzzy`,root:`~`,query:``};if(t.includes(`/`)){let e=t.lastIndexOf(`/`),n=t.slice(0,e),r=t.slice(e+1);return r?{mode:`prefix`,root:n||(t.startsWith(`/`)?`/`:``),query:r}:{mode:`browse`,root:n||`/`,query:``}}return t===`~`?{mode:`browse`,root:`~`,query:``}:t===`/`?{mode:`browse`,root:`/`,query:``}:{mode:`fuzzy`,root:`~`,query:t}}var J9=`colonynote-recent-dirs`,Y9=5,X9=null;function Z9(e){return X9&&e.startsWith(X9)?`~`+e.slice(X9.length):e}function Xne(e){return e===`~`?X9||`/`:e.startsWith(`~/`)&&X9?Zne(X9,e.slice(2)):e}function Zne(e,t){if(!e)return t;if(!t)return e;let n=e.includes(`\\`)?`\\`:`/`,r=e.endsWith(n)?e.slice(0,-1):e,i=t.startsWith(n)?t.slice(1):t;return r+n+i}function Qne({path:e,query:t}){if(!t.trim())return(0,z.jsx)(`span`,{className:`truncate`,children:e});let n=e.toLowerCase(),r=t.toLowerCase().trim(),i=new Set,a=n.indexOf(r);for(;a!==-1;){for(let e=a;e<a+r.length;e++)i.add(e);a=n.indexOf(r,a+r.length)}if(i.size===0)return(0,z.jsx)(`span`,{className:`truncate`,children:e});let o=[],s=``,c=!1;for(let t=0;t<e.length;t++){let n=i.has(t);n===c?s+=e[t]:(s&&o.push(c?(0,z.jsx)(`mark`,{className:`bg-transparent font-semibold text-primary`,children:s},t):(0,z.jsx)(`span`,{children:s},t)),s=e[t],c=n)}return s&&o.push(c?(0,z.jsx)(`mark`,{className:`bg-transparent font-semibold text-primary`,children:s},`last`):(0,z.jsx)(`span`,{children:s},`last`)),(0,z.jsx)(`span`,{className:`truncate`,children:o})}var $ne=new Set([`home`,`yuexiaoliang`,`users`,`usr`,`var`,`opt`,`tmp`]);function ere(e){let t=new Map;for(let n of e){let e=n.path.split(/[\\/]/).filter(Boolean);for(let n=1;n<e.length-1&&n<=4;n++){let r=e[n];r&&r.length>1&&!$ne.has(r.toLowerCase())&&t.set(r,(t.get(r)||0)+1)}}return Array.from(t.entries()).filter(([,e])=>e>=2).sort((e,t)=>t[1]-e[1]).slice(0,4).map(([e])=>e)}var tre=(0,P.memo)(function({open:e,onOpenChange:t}){let[n,r]=(0,P.useState)(()=>typeof window>`u`?!1:window.innerWidth<768),[i,a]=(0,P.useState)(``),[o,s]=(0,P.useState)([]),[c,l]=(0,P.useState)([]),[u,d]=(0,P.useState)([]),[f,p]=(0,P.useState)(null),[m,h]=(0,P.useState)(!1),[g,_]=(0,P.useState)(!1),[v,y]=(0,P.useState)(!1),[b,x]=(0,P.useState)(null),S=(0,P.useRef)(null),C=(0,P.useRef)(null);(0,P.useEffect)(()=>{let e=()=>r(window.innerWidth<768);return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),(0,P.useEffect)(()=>{if(e){try{let e=localStorage.getItem(J9);if(e){let t=JSON.parse(e);d(Array.isArray(t)?t.slice(0,Y9):[])}else d([])}catch{d([])}a(``),s([]),l([]),p(null),h(!1),y(!1),x(null)}},[e]),(0,P.useEffect)(()=>{if(e)return C.current&&window.clearTimeout(C.current),C.current=window.setTimeout(async()=>{let e=i.trim();_(!0);try{if(e){y(!0);let t=Yne(e),n=new URL(`/api/files/dirs/search`,window.location.origin);n.searchParams.set(`q`,t.query),t.root&&n.searchParams.set(`root`,t.root),n.searchParams.set(`mode`,t.mode),l((await(await fetch(n.toString())).json()).matches||[]),s([])}else{y(!1);let e=(await(await fetch(`/api/files/dirs/browse?path=~`)).json()).dirs||[];if(!X9&&e.length>0){let t=e[0],n=t.split(/[\\/]/).pop()||``;n&&(X9=t.slice(0,t.length-n.length-1))}s(e),l([])}}catch{s([]),l([])}finally{_(!1)}},150),()=>{C.current&&window.clearTimeout(C.current)}},[i,e]);let w=(0,P.useCallback)(e=>{try{let t=localStorage.getItem(J9),n=t?JSON.parse(t):[];n=n.filter(t=>t!==e),n.unshift(e),n.length>Y9&&(n=n.slice(0,Y9)),localStorage.setItem(J9,JSON.stringify(n))}catch{}},[]),T=(0,P.useCallback)(async e=>{let n=Xne(e);if(n.trim()){h(!0),p(null);try{let r=await fetch(`/api/files/dirs`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({path:n.trim()})}),i=await r.json();if(!r.ok){i.conflictWith?p(`${{child:`此目录是已添加目录的子目录`,parent:`此目录是已添加目录的父目录`,duplicate:`此目录已经添加`}[i.reason]||`路径冲突`}:${i.conflictWith}`):i.error===`Sensitive path not allowed`?p(`不允许添加敏感路径`):i.error===`Path does not exist`?p(`路径不存在`):i.error===`Path must be a directory`?p(`路径必须是目录`):p(`添加目录失败:${i.error||`未知错误`}`);return}w(e),t(!1),window.dispatchEvent(new CustomEvent(`config-changed`))}catch{p(`添加目录失败:网络错误`)}finally{h(!1)}}},[t,w]),E=(0,P.useCallback)(e=>{a(e),p(null)},[]),D=(0,P.useCallback)(()=>{a(``),p(null),S.current?.focus()},[]),O=o.map(e=>({fullPath:e,displayPath:Z9(e),name:e.split(/[\\/]/).pop()||e})),k=c.map(e=>({fullPath:e.path,displayPath:Z9(e.path),name:e.path.split(/[\\/]/).pop()||e.path})),A=u.map(e=>({fullPath:e,displayPath:e,name:e.split(/[\\/]/).pop()||e})),ee=(0,P.useMemo)(()=>ere(c),[c]),j=(0,P.useCallback)(e=>{let t=b===e?null:e;x(t),a(t?`${t}/${i.trim().replace(/^[\w-]+\//,``)}`:i.replace(/^[\w-]+\//,``)),S.current?.focus()},[b,i]),te=(0,z.jsx)(z.Fragment,{children:(0,z.jsxs)(`div`,{className:`space-y-2 py-4`,children:[(0,z.jsxs)(`div`,{className:`relative`,children:[(0,z.jsx)(He,{className:`absolute left-3 top-1/2 -translate-y-1/2 size-4 text-muted-foreground pointer-events-none`}),(0,z.jsx)(In,{ref:S,value:i,onChange:e=>E(e.target.value),placeholder:`输入路径或搜索目录...`,disabled:m,className:R(`pl-9 pr-8 rounded-xl`,n&&`h-12 text-base`)}),i&&(0,z.jsx)(`button`,{type:`button`,onClick:D,className:`absolute right-2 top-1/2 -translate-y-1/2 p-1 text-muted-foreground hover:text-foreground rounded`,disabled:m,children:(0,z.jsx)(Ke,{className:`size-3.5`})})]}),v&&ee.length>0&&(0,z.jsx)(`div`,{className:`flex gap-1.5 overflow-x-auto pb-1 scrollbar-none`,children:ee.map(e=>(0,z.jsx)(`button`,{type:`button`,onClick:()=>j(e),className:R(`shrink-0 px-3 py-1 rounded-full text-xs font-medium transition-colors`,b===e?`bg-primary text-primary-foreground`:`bg-muted text-muted-foreground hover:bg-muted/80`),children:e},e))}),f&&(0,z.jsx)(`p`,{className:`text-sm text-destructive px-1`,children:f}),(0,z.jsx)(U9,{className:R(`border rounded-xl bg-background`,n?`h-[45vh]`:`h-[320px]`),children:(0,z.jsxs)(`div`,{className:`p-2`,children:[A.length>0&&(0,z.jsxs)(`div`,{className:`mb-3`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-1.5 px-1 mb-1.5`,children:[(0,z.jsx)(_e,{className:`size-3 text-muted-foreground/50`}),(0,z.jsx)(`span`,{className:`text-[11px] font-medium text-muted-foreground/60 uppercase tracking-wider`,children:`最近项目`})]}),(0,z.jsx)(`div`,{className:`space-y-0.5`,children:A.map(e=>{let t=e.displayPath.slice(0,-e.name.length);return(0,z.jsxs)(`button`,{type:`button`,onClick:()=>T(e.fullPath),disabled:m,className:`w-full flex items-start gap-2 px-2 py-2.5 rounded-lg hover:bg-accent text-left transition-colors disabled:opacity-50`,children:[(0,z.jsx)(Ee,{className:`size-4 shrink-0 text-primary/60 mt-0.5`}),(0,z.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,z.jsx)(`p`,{className:`text-sm font-medium text-foreground truncate`,children:e.name}),t&&(0,z.jsx)(`p`,{className:`text-[10px] text-muted-foreground/50 truncate`,children:t})]})]},e.fullPath)})})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-1.5 px-1 mb-1.5`,children:[v?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(qe,{className:`size-3 text-muted-foreground/50`}),(0,z.jsx)(`span`,{className:`text-[11px] font-medium text-muted-foreground/60 uppercase tracking-wider`,children:`搜索结果`})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Oe,{className:`size-3 text-muted-foreground/50`}),(0,z.jsx)(`span`,{className:`text-[11px] font-medium text-muted-foreground/60 uppercase tracking-wider`,children:`打开项目`})]}),g&&(0,z.jsx)(`span`,{className:`text-[10px] text-muted-foreground/40 normal-case ml-auto`,children:`加载中...`})]}),v?k.length===0&&!g?(0,z.jsx)(`div`,{className:`px-2 py-6 text-center text-sm text-muted-foreground`,children:`未找到匹配的目录`}):(0,z.jsx)(`div`,{className:`space-y-0.5`,children:k.map(e=>{let t=e.displayPath.slice(0,-e.name.length);return(0,z.jsxs)(`button`,{type:`button`,onClick:()=>T(e.fullPath),disabled:m,className:`w-full flex items-start gap-2 px-2 py-2.5 rounded-lg hover:bg-accent text-left transition-colors disabled:opacity-50`,children:[(0,z.jsx)(Oe,{className:`size-4 shrink-0 text-muted-foreground/40 mt-0.5`}),(0,z.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,z.jsx)(`p`,{className:`text-sm truncate`,children:(0,z.jsx)(Qne,{path:e.name,query:i.replace(/^[\w-]+\//,``)})}),t&&(0,z.jsx)(`p`,{className:`text-[10px] text-muted-foreground/50 truncate`,children:t})]})]},e.fullPath)})}):O.length===0&&!g?(0,z.jsx)(`div`,{className:`px-2 py-6 text-center text-sm text-muted-foreground`,children:`该目录下没有子文件夹`}):(0,z.jsx)(`div`,{className:`space-y-0.5`,children:O.map(e=>{let t=e.displayPath.slice(0,-e.name.length);return(0,z.jsxs)(`button`,{type:`button`,onClick:()=>T(e.fullPath),disabled:m,className:`w-full flex items-start gap-2 px-2 py-2.5 rounded-lg hover:bg-accent text-left transition-colors disabled:opacity-50`,children:[(0,z.jsx)(Oe,{className:`size-4 shrink-0 text-muted-foreground/40 mt-0.5`}),(0,z.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,z.jsx)(`p`,{className:`text-sm font-medium text-foreground truncate`,children:e.name}),t&&(0,z.jsx)(`p`,{className:`text-[10px] text-muted-foreground/50 truncate`,children:t})]})]},e.fullPath)})})]})]})})]})});return n?(0,z.jsx)(Uo,{open:e,onOpenChange:t,children:(0,z.jsxs)(Ko,{side:`bottom`,className:`rounded-t-2xl h-[85vh] flex flex-col`,children:[(0,z.jsx)(qo,{className:`flex-shrink-0`,children:(0,z.jsx)(Yo,{children:`打开项目`})}),(0,z.jsx)(`div`,{className:`flex-1 overflow-y-auto`,children:te})]})}):(0,z.jsx)(d9,{open:e,onOpenChange:t,children:(0,z.jsxs)(p9,{className:`sm:max-w-[520px]`,children:[(0,z.jsx)(m9,{children:(0,z.jsx)(g9,{children:`打开项目`})}),te]})})}),nre=(0,P.memo)(function({open:e,onOpenChange:t,dirPath:n,isCli:r}){let[i,a]=(0,P.useState)(()=>typeof window>`u`?!1:window.innerWidth<768),[o,s]=(0,P.useState)(``),[c,l]=(0,P.useState)(null),[u,d]=(0,P.useState)(!1),[f,p]=(0,P.useState)(!1),[m,h]=(0,P.useState)(!1);(0,P.useEffect)(()=>{let e=()=>a(window.innerWidth<768);return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),(0,P.useEffect)(()=>{e&&n&&(s(n.split(`/`).pop()||n),l(null),d(!1),p(!1),h(!1))},[e,n]);let g=(0,P.useCallback)(async()=>{if(n){d(!0),l(null);try{let e=await fetch(`/api/files/dirs`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({path:n,name:o})}),r=await e.json();if(!e.ok){l(`保存失败:${r.error||`未知错误`}`);return}t(!1),window.dispatchEvent(new CustomEvent(`config-changed`))}catch{l(`保存失败:网络错误`)}finally{d(!1)}}},[n,o,t]),_=(0,P.useCallback)(async()=>{if(n){h(!0),l(null);try{let e=await fetch(`/api/files/dirs?path=${encodeURIComponent(n)}`,{method:`DELETE`}),r=await e.json();if(!e.ok){l(`删除失败:${r.error||`未知错误`}`),p(!1);return}p(!1),t(!1),window.dispatchEvent(new CustomEvent(`config-changed`))}catch{l(`删除失败:网络错误`),p(!1)}finally{h(!1)}}},[n,t]),v=(0,z.jsxs)(`div`,{className:`space-y-4`,children:[n&&(0,z.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 rounded-lg bg-muted/30 border border-border/40`,children:[(0,z.jsx)(`div`,{className:`size-2 rounded-full bg-emerald-500 shrink-0`}),(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground truncate`,children:n})]}),(0,z.jsx)(`div`,{className:`space-y-3`,children:(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`label`,{className:`text-xs font-medium text-foreground mb-1.5 block`,children:`显示名称`}),(0,z.jsx)(In,{value:o,onChange:e=>s(e.target.value),placeholder:n?n.split(`/`).pop()||n:`输入显示名称`,disabled:u}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground/60 mt-1.5`,children:`此名称将显示在目录切换器中`})]})}),c&&(0,z.jsx)(`p`,{className:`text-sm text-destructive`,children:c}),(0,z.jsx)(`div`,{className:`rounded-xl border border-destructive/15 bg-destructive/[0.03] p-3.5`,children:(0,z.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`p`,{className:`text-xs font-medium text-foreground mb-0.5`,children:`从列表中移除`}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground/70`,children:`文件不会被删除`})]}),(0,z.jsxs)(tr,{variant:`outline`,size:`sm`,onClick:()=>p(!0),disabled:u||m||r,title:r?`CLI启动的目录无法删除`:void 0,className:`shrink-0 border-destructive/30 text-destructive hover:bg-destructive/10 hover:text-destructive text-xs`,children:[(0,z.jsx)(Ge,{className:`size-3.5 mr-1`}),`移除`]})]})}),(0,z.jsxs)(`div`,{className:`flex gap-2 pt-1`,children:[(0,z.jsx)(tr,{variant:`outline`,className:`flex-1`,onClick:()=>t(!1),disabled:u,children:`取消`}),(0,z.jsx)(tr,{className:`flex-1`,onClick:g,disabled:u,children:u?`保存中...`:`保存`})]})]}),y=(0,z.jsx)(js,{open:f,onOpenChange:p,children:(0,z.jsxs)(Ps,{children:[(0,z.jsxs)(Fs,{children:[(0,z.jsx)(Ls,{children:`确定要移除目录吗?`}),(0,z.jsx)(Rs,{children:`文件不会被删除,只是从列表中移除。`})]}),(0,z.jsxs)(Is,{children:[(0,z.jsx)(Bs,{disabled:m,children:`取消`}),(0,z.jsx)(zs,{onClick:_,disabled:m,children:m?`删除中...`:`确认移除`})]})]})});return i?(0,z.jsx)(Uo,{open:e,onOpenChange:t,children:(0,z.jsxs)(Ko,{side:`bottom`,className:`rounded-t-2xl h-[85vh] flex flex-col`,children:[(0,z.jsxs)(qo,{className:`flex-shrink-0`,children:[(0,z.jsx)(Yo,{children:`目录设置`}),(0,z.jsx)(Xo,{children:`修改显示名称或删除目录`})]}),(0,z.jsx)(`div`,{className:`flex-1 overflow-y-auto py-4`,children:v}),y]})}):(0,z.jsx)(d9,{open:e,onOpenChange:t,children:(0,z.jsxs)(p9,{className:`sm:max-w-[425px]`,children:[(0,z.jsxs)(m9,{children:[(0,z.jsx)(g9,{children:`目录设置`}),(0,z.jsx)(_9,{children:`修改显示名称或删除目录`})]}),(0,z.jsx)(`div`,{className:`py-2`,children:v}),y]})})}),Q9=[`#2563eb`,`#059669`,`#d97706`,`#7c3aed`,`#e11d48`,`#0891b2`],$9=(0,P.memo)(function({groups:e,activePath:t,activeRoot:n,currentDir:r,expandedPaths:i,setExpandedPaths:a,onSelect:o,onDelete:s,onRenameRequest:c,onMoveRequest:l,onCopyRequest:u,onExpand:d,editingType:f,onEditingChange:p,onCreateSubmit:m,onCreateRequest:h,onSettingsOpen:g,onClose:_,onDirChange:v,onAddDir:y,onEditDir:b,onToggleTheme:x,themeMode:S}){let C=e.find(e=>e.root.path===n)?.files||[];return(0,z.jsxs)(`div`,{className:`flex flex-col h-full`,children:[(0,z.jsxs)(`div`,{className:`flex items-center justify-between px-4 py-3 border-b border-border shrink-0`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(`img`,{src:`/logo.png`,alt:`logo`,className:`size-8 shrink-0`}),(0,z.jsx)(`span`,{className:`font-semibold text-sm`,children:`ColonyNote`})]}),(0,z.jsxs)(`div`,{className:`flex gap-1`,children:[x&&(0,z.jsx)(tr,{variant:`ghost`,size:`icon`,onClick:x,title:S===`light`?`切换到深色主题`:S===`dark`?`切换到跟随系统`:`切换到浅色主题`,children:S===`dark`?(0,z.jsx)(We,{className:`size-4`}):S===`system`?(0,z.jsx)(Ie,{className:`size-4`}):(0,z.jsx)(Le,{className:`size-4`})}),_&&(0,z.jsx)(tr,{variant:`ghost`,size:`icon`,onClick:_,title:`关闭`,className:`md:hidden`,children:(0,z.jsx)(Ke,{className:`size-4`})}),!1,(0,z.jsx)(tr,{variant:`ghost`,size:`icon`,onClick:g,title:`设置`,children:(0,z.jsx)(Ue,{className:`size-4`})})]})]}),e.length===0?(0,z.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-8 px-4 text-center border-b border-border`,children:[(0,z.jsx)(Ee,{className:`size-12 mb-3 text-muted-foreground/50`}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground mb-4`,children:`暂无目录`}),(0,z.jsxs)(tr,{variant:`outline`,size:`sm`,onClick:()=>y?.(),children:[(0,z.jsx)(ze,{className:`size-4 mr-1`}),`添加目录`]})]}):(0,z.jsxs)(`div`,{className:`flex items-center gap-1.5 px-4 py-2 border-b border-border shrink-0 overflow-x-auto dir-tabs-scroll`,style:{WebkitOverflowScrolling:`touch`},children:[e.map((e,t)=>{let r=n===e.root.path,i=Q9[t%Q9.length];return(0,z.jsxs)(`button`,{onClick:()=>v?.(e.root.path),className:R(`relative group flex items-center gap-1.5 px-3 py-1.5 rounded-full text-xs font-medium transition-all duration-150 shrink-0`,r?`bg-primary text-primary-foreground shadow-sm`:`text-muted-foreground hover:bg-muted hover:text-foreground`,e.error&&!r&&`text-destructive/70 hover:text-destructive`),title:e.error||e.root.path,children:[(0,z.jsx)(`span`,{className:R(`size-1.5 rounded-full shrink-0`,r?`bg-primary-foreground/60`:``),style:{backgroundColor:r?void 0:i}}),e.error&&(0,z.jsx)(ge,{className:`size-3 text-destructive shrink-0`}),(0,z.jsx)(`span`,{className:`truncate max-w-[100px]`,children:e.root.name||e.root.path.split(`/`).pop()||e.root.path}),(0,z.jsx)(`span`,{className:`hidden md:block absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 bg-popover text-popover-foreground text-xs rounded shadow-lg opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap z-50`,children:e.error?`${e.root.path} (${e.error})`:e.root.path})]},e.root.path)}),(0,z.jsx)(`button`,{onClick:()=>y?.(),className:`flex items-center justify-center size-7 rounded-full border border-dashed border-border text-muted-foreground hover:text-foreground hover:border-foreground/30 transition-colors shrink-0`,title:`添加目录`,children:(0,z.jsx)(ze,{className:`size-3.5`})})]}),(0,z.jsx)(Ws,{files:C,activePath:t,activeRoot:n,currentDir:r,expandedPaths:i,setExpandedPaths:a,onSelect:o,onDelete:s,onRenameRequest:c,onMoveRequest:l,onCopyRequest:u,onExpand:d,editingType:f,onEditingChange:p,onCreateSubmit:m,onCreateRequest:h,onEditDir:b})]})});function rre(){let[e,t]=(0,P.useState)([]),[n,r]=(0,P.useState)(null),[i,a]=(0,P.useState)(!1),[o,s]=(0,P.useState)(!1),[c,l]=(0,P.useState)(!1),[u,d]=(0,P.useState)(!1),[f,p]=(0,P.useState)(!1),[m,h]=(0,P.useState)(!1),[g,_]=(0,P.useState)(null),[v,y]=(0,P.useState)(null),[b,x]=(0,P.useState)(null),[S,C]=(0,P.useState)(()=>typeof window>`u`?!1:window.innerWidth<768),[w,T]=(0,P.useState)(`wysiwyg`),[E,D]=(0,P.useState)(``),[O,k]=(0,P.useState)(new Set),A=(0,P.useRef)(new Map),[ee,j]=(0,P.useState)(null),[te,M]=(0,P.useState)(!1),[ne,N]=(0,P.useState)(!1),[re,ie]=(0,P.useState)(!1),[ae,oe]=(0,P.useState)(null),[se,ce]=(0,P.useState)(()=>{let e=localStorage.getItem(`colonynote-theme`);return e===`light`||e===`dark`||e===`system`?e:`system`}),[le,F]=(0,P.useState)(`editor`),[ue,de]=(0,P.useState)(null),[fe,pe]=(0,P.useState)(()=>{if(typeof window>`u`)return 260;let e=localStorage.getItem(`sidebar-width`);return e?parseInt(e,10):260}),me=(0,P.useRef)(!1),he=(0,P.useRef)(!1),ge=(0,P.useRef)(null),_e=(0,P.useRef)(0),{tabs:ye,tabOrder:be,activeTabPath:Se,openTab:we,closeTab:Te,updateTabContent:Ee,saveTab:De,saveAllTabs:Oe,isTabDirty:ke,getActiveTab:Ae,handleWsFileChange:je}=st({onSaveStart:()=>{},onSave:()=>{},onError:e=>console.error(e)});(0,P.useEffect)(()=>{},[]),(0,P.useEffect)(()=>{let e=()=>C(window.innerWidth<768);return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),(0,P.useEffect)(()=>{let e=e=>{let t=e===`dark`||e===`system`&&window.matchMedia(`(prefers-color-scheme: dark)`).matches;t!==document.documentElement.classList.contains(`dark`)&&(t?document.documentElement.classList.add(`dark`):document.documentElement.classList.remove(`dark`),window.dispatchEvent(new CustomEvent(`theme-change`))),localStorage.setItem(`colonynote-theme`,e)};e(se);let t=window.matchMedia(`(prefers-color-scheme: dark)`),n=()=>{se===`system`&&e(`system`)};t.addEventListener(`change`,n);let r=()=>{let e=localStorage.getItem(`colonynote-theme`);(e===`light`||e===`dark`||e===`system`)&&ce(e)};return window.addEventListener(`theme-change`,r),()=>{t.removeEventListener(`change`,n),window.removeEventListener(`theme-change`,r)}},[se]),(0,P.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key===`k`&&(e.preventDefault(),l(!0))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,P.useEffect)(()=>{let e=Ae();if(!e)return;let t=e.path.split(`/`).filter(Boolean),n=[];for(let e=0;e<t.length-1;e++)n.push(`/`+t.slice(0,e+1).join(`/`));n.length>0&&k(e=>{let t=new Set(e);return n.forEach(e=>t.add(e)),t})},[Se,Ae]);let Ne=(0,P.useCallback)(async()=>{if(!he.current){he.current=!0;try{let e=await(await fetch(`/api/files/`)).json();if(t(e.groups||[]),!n&&e.groups?.length>0){let t=decodeURIComponent(window.location.hash.slice(1)),n=t.indexOf(`:`),i=n>0?t.substring(0,n):null;r(i&&e.groups.some(e=>e.root.path===i)?i:e.groups[0].root.path)}}catch(e){console.error(`Failed to fetch files:`,e)}finally{he.current=!1}}},[n]);(0,P.useEffect)(()=>{Ne()},[Ne]),(0,P.useEffect)(()=>{let e=async()=>{try{let e=await(await fetch(`/api/files/`)).json();t(e.groups||[]),!e.groups?.some(e=>e.root.path===n)&&n?(be.forEach(e=>Te(e)),r(e.groups?.[0]?.root.path||null)):!n&&e.groups?.length>0&&r(e.groups[0].root.path)}catch(e){console.error(`Failed to fetch files on config change:`,e)}};return window.addEventListener(`config-changed`,e),()=>window.removeEventListener(`config-changed`,e)},[n,be,Te]),rt((0,P.useCallback)(e=>{if(e.type===`file:change`){let t=e.path,r=e.rootPath;if(!t||r&&n&&r!==n)return;je(t,r,Ne)}},[Ne,n,je]));let Pe=(0,P.useCallback)((e,t,r)=>{if(t===`file`){let t=e.split(`/`).filter(Boolean),i=[];for(let e=0;e<t.length-1;e++)i.push(`/`+t.slice(0,e+1).join(`/`));i.length>0&&k(e=>{let t=new Set(e);return i.forEach(e=>t.add(e)),t}),we(e,r||n),D(e.substring(0,e.lastIndexOf(`/`))),a(!1)}else D(e)},[we,n]),Fe=(0,P.useCallback)(e=>{D(e)},[]),Ie=(0,P.useCallback)(e=>{if(j(e),E){let e=E.split(`/`).filter(Boolean),t=new Set;for(let n=0;n<e.length;n++)t.add(`/`+e.slice(0,n+1).join(`/`));k(e=>{let n=new Set(e);return t.forEach(e=>n.add(e)),n})}},[E]),Le=(0,P.useCallback)(async(e,t)=>{try{let r=t?e:`${e}.md`;await fetch(`/api/files`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({type:`create`,parentPath:E,name:r,isDirectory:t,root:n})}),j(null),Ne()}catch(e){console.error(`Failed to create:`,e)}},[n,E,Ne]),Re=(0,P.useCallback)((e,t)=>{j(e?`directory`:`file`),D(t);let n=t.split(`/`).filter(Boolean),r=new Set;for(let e=0;e<n.length;e++)r.add(`/`+n.slice(0,e+1).join(`/`));k(e=>{let t=new Set(e);return r.forEach(e=>t.add(e)),t})},[]);(0,P.useEffect)(()=>{let e=()=>{let e=decodeURIComponent(window.location.hash.slice(1));if(e&&ge.current!==e){ge.current=e;let t=e.indexOf(`:`),n=null,i;if(t>0?(n=e.substring(0,t),i=e.substring(t+1)):i=e,!i||i===`/`){ge.current=null;return}we(i,n),n&&r(n),D(i.substring(0,i.lastIndexOf(`/`)));let a=[],o=i;for(;o.includes(`/`);)o=o.substring(0,o.lastIndexOf(`/`)),o&&a.push(o);k(e=>{let t=new Set(e);return a.forEach(e=>t.add(e)),t})}};return e(),window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[we]);let ze=(0,P.useCallback)(async(e,t)=>{try{let n=`/api/files${e}?root=${encodeURIComponent(t)}`;await fetch(n,{method:`DELETE`});for(let[n,r]of ye)r.path===e&&r.rootPath===t&&Te(n);Ne()}catch(e){console.error(`Failed to delete:`,e)}},[Ne,ye,Te]),Be=(0,P.useCallback)(async(e,t,n)=>{try{let r=e.substring(0,e.lastIndexOf(`/`)),i=e.split(`/`).pop()||``,a=e,o=!i.includes(`.`),s=o?t:`${t}.md`,c=r?`${r}/${s}`:`/${s}`;await fetch(`/api/files`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({oldPath:a,newPath:c,isDirectory:o,sourceRoot:n,targetRoot:n})});let l=(()=>{for(let[t,r]of ye)if(r.path===e&&r.rootPath===n)return t;return null})();if(l){let e=Se===l;Te(l),e&&we(c,n)}Ne()}catch(e){console.error(`Failed to rename:`,e)}},[ye,Se,Te,we,Ne]),Ve=(0,P.useCallback)(async(e,t,n,r)=>{try{let i=e.split(`/`).pop()||``;e.substring(0,e.lastIndexOf(`/`));let a=!i.includes(`.`);await fetch(`/api/files`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({oldPath:e,newPath:t,isDirectory:a,sourceRoot:n,targetRoot:r})});let o=(()=>{for(let[t,r]of ye)if(r.path===e&&r.rootPath===n)return t;return null})();if(o){let e=Se===o;Te(o),e&&we(t,r)}Ne()}catch(e){console.error(`Failed to move:`,e)}},[ye,Se,Te,we,Ne]),Ue=(0,P.useCallback)(async(e,t,n,r)=>{try{await fetch(`/api/files/copy`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({sourcePath:e,targetPath:t,sourceRoot:n,targetRoot:r})}),Ne()}catch(e){console.error(`Failed to copy:`,e)}},[Ne]),We=(0,P.useCallback)(async(e,t,r)=>{try{let i=t?e:`${e}.md`;await fetch(`/api/files`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({type:`create`,parentPath:r,name:i,isDirectory:t,root:n})}),Ne()}catch(e){console.error(`Failed to create:`,e)}},[n,Ne]);(0,P.useCallback)(()=>{Oe()},[Oe]);let Ge=(0,P.useCallback)(()=>{T(e=>{let t=document.querySelector(`.tiptap-editor, .editor-textarea`);return t&&(_e.current=t.scrollTop||0),e===`wysiwyg`?`source`:`wysiwyg`})},[]),Ke=(0,P.useCallback)(()=>{ce(e=>e===`light`?`dark`:e===`dark`?`system`:`light`)},[]),qe=(0,P.useCallback)(e=>{n&&A.current.set(n,new Set(O)),r(e),k(A.current.get(e)??new Set),D(``)},[n,O]),Je=(0,P.useCallback)(e=>{e.preventDefault(),me.current=!0,document.body.style.cursor=`col-resize`,document.body.style.userSelect=`none`},[]),Ye=(0,P.useCallback)(()=>{me.current&&(me.current=!1,document.body.style.cursor=``,document.body.style.userSelect=``,pe(e=>(localStorage.setItem(`sidebar-width`,e.toString()),e)))},[]);(0,P.useEffect)(()=>{let e=e=>{me.current&&pe(Math.max(200,Math.min(600,e.clientX)))};return window.addEventListener(`mousemove`,e),window.addEventListener(`mouseup`,Ye),()=>{window.removeEventListener(`mousemove`,e),window.removeEventListener(`mouseup`,Ye)}},[Ye]);let Xe=Ae(),Ze=Xe?Xe.path.split(`/`).pop():null;return e.flatMap(e=>e.files),(0,P.useEffect)(()=>{document.title=Ze?`${Ze} - ColonyNote`:`ColonyNote`},[Ze]),(0,P.useEffect)(()=>{let e=e=>{be.some(e=>ke(e))&&(e.preventDefault(),e.returnValue=``)};return window.addEventListener(`beforeunload`,e),()=>window.removeEventListener(`beforeunload`,e)},[be,ke]),(0,z.jsxs)(`div`,{className:`flex flex-col h-full`,children:[S&&(0,z.jsxs)(`header`,{className:`flex items-center px-4 py-3 border-b border-border bg-background md:hidden`,children:[(0,z.jsx)(tr,{variant:`ghost`,size:`icon`,onClick:()=>a(!0),className:`size-11 min-h-11 min-w-11`,children:(0,z.jsx)(Me,{className:`size-5`})}),(0,z.jsx)(`div`,{className:`flex-1 text-base font-semibold text-center truncate mx-4`,children:Ze||`ColonyNote`}),(0,z.jsx)(tr,{variant:`ghost`,size:`icon`,onClick:()=>l(!0),className:`size-11 min-h-11 min-w-11`,children:(0,z.jsx)(He,{className:`size-5`})}),(0,z.jsx)(tr,{variant:`ghost`,size:`icon`,onClick:Ge,title:w===`wysiwyg`?`源码模式`:`所见即所得`,className:`size-11 min-h-11 min-w-11`,children:w===`wysiwyg`?(0,z.jsx)(ve,{className:`size-5`}):(0,z.jsx)(xe,{className:`size-5`})})]}),(0,z.jsxs)(`div`,{className:`flex flex-1 overflow-hidden`,children:[S&&(0,z.jsxs)(z.Fragment,{children:[i&&(0,z.jsx)(`div`,{className:`fixed inset-0 z-50 bg-black/80 animate-fade-in`,onClick:()=>a(!1)}),(0,z.jsx)(`aside`,{className:R(`fixed z-50 inset-0 w-full bg-sidebar p-0 transition-transform duration-150`,i?`translate-x-0`:`-translate-x-full`),children:(0,z.jsx)($9,{groups:e,activePath:Xe?.path||null,activeRoot:n,currentDir:E,expandedPaths:O,setExpandedPaths:k,onSelect:Pe,onDelete:ze,onRenameRequest:e=>{_(e),d(!0)},onMoveRequest:e=>{y(e),p(!0)},onCopyRequest:e=>{x(e),h(!0)},onExpand:Fe,editingType:ee,onEditingChange:Ie,onCreateSubmit:Le,onCreateRequest:Re,onSettingsOpen:()=>M(!0),onClose:()=>a(!1),onDirChange:qe,onAddDir:()=>N(!0),onEditDir:()=>{oe(n),ie(!0)},onToggleTheme:Ke,themeMode:se})})]}),!S&&(0,z.jsxs)(`div`,{className:`hidden md:flex shrink-0`,children:[(0,z.jsx)(`aside`,{style:{width:fe},className:`flex flex-col border-r border-border bg-sidebar`,children:(0,z.jsx)($9,{groups:e,activePath:Xe?.path||null,activeRoot:n,currentDir:E,expandedPaths:O,setExpandedPaths:k,onSelect:Pe,onDelete:ze,onRenameRequest:e=>{_(e),d(!0)},onMoveRequest:e=>{y(e),p(!0)},onCopyRequest:e=>{x(e),h(!0)},onExpand:Fe,editingType:ee,onEditingChange:Ie,onCreateSubmit:Le,onCreateRequest:Re,onSettingsOpen:()=>M(!0),onDirChange:qe,onAddDir:()=>N(!0),onEditDir:()=>{oe(n),ie(!0)},onToggleTheme:Ke,themeMode:se})}),(0,z.jsx)(`div`,{onMouseDown:Je,className:`w-4 -ml-2 cursor-col-resize flex items-center justify-center group z-10`,title:`拖动调整侧边栏宽度`,children:(0,z.jsx)(`div`,{className:`w-1 h-8 rounded-full bg-border group-hover:bg-primary/50 transition-colors`})})]}),(0,z.jsxs)(`main`,{className:`flex-1 flex flex-col overflow-hidden`,children:[be.length>0&&(0,z.jsx)(Cne,{tabOrder:be,tabs:ye,activeTabKey:Se,onActivate:e=>{let t=ye.get(e);t&&we(t.path,t.rootPath)},onCloseRequest:e=>{ke(e)?de(e):Te(e)},isMobile:S,dirs:e.map(e=>e.root),rightContent:!S&&Se?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`span`,{className:R(`px-2 py-0.5 rounded`,Xe?.status===`saving`&&`text-muted-foreground bg-muted`,Xe?.status===`saved`&&`text-primary bg-primary/10`,Xe?.status===`error`&&`text-destructive bg-destructive/10`),children:Xe?.status===`saving`?`保存中...`:Xe?.status===`saved`?`已保存`:Xe?.status===`error`?`保存失败`:``}),(0,z.jsx)(tr,{variant:`ghost`,size:`icon`,className:`size-7 min-h-7 min-w-7`,onClick:()=>l(!0),title:`搜索`,children:(0,z.jsx)(He,{className:`size-3.5`})}),(0,z.jsx)(tr,{variant:`ghost`,size:`icon`,className:`size-7 min-h-7 min-w-7`,onClick:Ge,title:w===`wysiwyg`?`源码模式`:`所见即所得`,children:w===`wysiwyg`?(0,z.jsx)(ve,{className:`size-3.5`}):(0,z.jsx)(xe,{className:`size-3.5`})})]}):void 0}),(0,z.jsx)(`div`,{className:`flex flex-1 overflow-hidden`,children:Se?Xe&&(0,z.jsxs)(`div`,{className:`flex flex-col flex-1 min-w-0`,children:[S&&(0,z.jsxs)(`header`,{className:`flex items-center justify-between px-4 py-2 bg-muted/30 border-b border-border text-xs text-muted-foreground`,children:[(0,z.jsx)(`span`,{children:w===`wysiwyg`?`所见即所得`:`源码`}),(0,z.jsx)(`span`,{className:R(`px-2 py-0.5 rounded text-xs`,Xe.status===`saving`&&`text-muted-foreground bg-muted`,Xe.status===`saved`&&`text-primary bg-primary/10`),children:Xe.status===`saving`?`保存中...`:Xe.status===`saved`?`已保存`:``})]}),(0,z.jsx)(`div`,{className:`flex-1 overflow-hidden`,children:(0,z.jsx)(bne,{value:Xe.content,onChange:e=>Ee(Xe.key,e),mode:w,path:Xe.path,scrollPosition:_e.current,onLinkClick:e=>we(e,Xe.rootPath)},Xe.key)})]}):(0,z.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-full text-muted-foreground text-sm text-center p-6 flex-1`,children:[(0,z.jsx)(Ce,{className:`size-12 mb-4 opacity-50`}),(0,z.jsx)(`div`,{children:`选择一个文件开始编辑`})]})})]})]}),(0,z.jsx)(wne,{visible:o,onClose:()=>{s(!1),j(null)},onCreate:We,currentDir:E}),(0,z.jsx)(Ene,{open:c,onOpenChange:l,activeRoot:n,groups:e,onSelect:(e,t)=>{t&&n!==t&&r(t),Pe(e,`file`,t)}}),(0,z.jsx)(One,{open:u,onOpenChange:d,item:g,onRename:(e,t,n)=>{_(null),d(!1),Be(e,t,n)}}),(0,z.jsx)(Kne,{open:f,onOpenChange:p,item:v,groups:e,onMove:(e,t,n,r)=>{y(null),p(!1),Ve(e,t,n,r)}}),(0,z.jsx)(qne,{open:m,onOpenChange:h,item:b,groups:e,onCopy:(e,t,n,r)=>{x(null),h(!1),Ue(e,t,n,r)}}),(0,z.jsx)(js,{open:ue!==null,onOpenChange:e=>{e||de(null)},children:(0,z.jsxs)(Ps,{children:[(0,z.jsxs)(Fs,{children:[(0,z.jsx)(Ls,{children:`未保存的更改`}),(0,z.jsx)(Rs,{children:`此文件有未保存的更改。确定要关闭吗?`})]}),(0,z.jsxs)(Is,{children:[(0,z.jsx)(Bs,{onClick:()=>de(null),children:`取消`}),(0,z.jsx)(zs,{onClick:()=>{ue&&(Te(ue),de(null))},children:`直接关闭`}),(0,z.jsx)(zs,{onClick:()=>{ue&&(De(ue),setTimeout(()=>{Te(ue),de(null)},500))},children:`保存并关闭`})]})]})}),(0,z.jsx)(Jne,{open:te,onOpenChange:M}),(0,z.jsx)(tre,{open:ne,onOpenChange:N}),(0,z.jsx)(nre,{open:re,onOpenChange:ie,dirPath:ae,isCli:e.find(e=>e.root.path===ae)?.root.isCli})]})}Xe.createRoot(document.getElementById(`root`)).render((0,z.jsx)(P.StrictMode,{children:(0,z.jsx)(rre,{})}));export{oY as $,sR as $t,_X as A,QB as At,WY as B,jR as Bt,HQ as C,dF as Cn,eW as Ct,NX as D,RV as Dt,X as E,VV as Et,sX as F,ZB as Ft,NY as G,BR as Gt,VY as H,OR as Ht,wX as I,YB as It,SY as J,WR as Jt,DY as K,RR as Kt,dX as L,cL as Lt,OX as M,gV as Mt,lX as N,yV as Nt,MX as O,BV as Ot,kX as P,XB as Pt,sY as Q,bR as Qt,EX as R,ute as Rt,GQ as S,G as Sn,XU as St,LX as T,HV as Tt,BY as U,yte as Ut,HY as V,DR as Vt,PY as W,RL as Wt,dY as X,cR as Xt,fY as Y,HR as Yt,uY as Z,_L as Zt,U0 as _,AF as _n,$U as _t,b2 as a,zR as an,qJ as at,s$ as b,mF as bn,QU as bt,l2 as c,VR as cn,nG as ct,t2 as d,ZI as dn,WU as dt,TR as en,aY as et,D$ as f,qI as fn,tW as ft,R0 as g,NF as gn,ZU as gt,B0 as h,PF as hn,KU as ht,m4 as i,hR as in,HJ as it,TX as j,xV as jt,gX as k,FV as kt,$0 as l,kR as ln,mW as lt,E$ as m,K as mn,GU as mt,j4 as n,xR as nn,QJ as nt,y2 as o,LR as on,BJ as ot,H0 as p,q as pn,nW as pt,CY as q,$L as qt,_4 as r,ER as rn,YJ as rt,Z0 as s,vte as sn,VJ as st,F4 as t,lR as tn,iY as tt,h2 as u,KR as un,sW as ut,V0 as v,OF as vn,qU as vt,zQ as w,qV as wt,f$ as x,W as xn,YU as xt,Q as y,yF as yn,JU as yt,mX as z,IR as zt};
|