@ashwin_droid/notion-stream 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{_baseUniq-DSwfPiGC.js → _baseUniq-D32sgNIc.js} +1 -1
- package/dist/{_baseUniq-CT-tc-CG.mjs → _baseUniq-DCnQIx8G.mjs} +51 -51
- package/dist/{arc-BBnIBs2j.js → arc-B0uBm0sN.js} +1 -1
- package/dist/{arc-DmoYXidQ.mjs → arc-OrNNmmBm.mjs} +1 -1
- package/dist/{architecture-U656AL7Q-C0ZB2O9M.js → architecture-U656AL7Q-CLYqYgyv.js} +1 -1
- package/dist/{architecture-U656AL7Q-CMPtJMZ-.mjs → architecture-U656AL7Q-seCMyeyz.mjs} +1 -1
- package/dist/architectureDiagram-VXUJARFQ-BGsDPmi_.js +36 -0
- package/dist/{architectureDiagram-VXUJARFQ-BYzpbF40.mjs → architectureDiagram-VXUJARFQ-BmPLNLcs.mjs} +1846 -1850
- package/dist/{blockDiagram-VD42YOAC-DPVTCHn5.mjs → blockDiagram-VD42YOAC-CXKvT-9-.mjs} +913 -922
- package/dist/blockDiagram-VD42YOAC-NQhzFvsO.js +122 -0
- package/dist/c4Diagram-YG6GDRKO-CMXx6pyB.js +10 -0
- package/dist/{c4Diagram-YG6GDRKO-C2Y4q08p.mjs → c4Diagram-YG6GDRKO-DAGMHESb.mjs} +169 -170
- package/dist/{channel-DVpqhnow.mjs → channel-BXGyzQA6.mjs} +1 -1
- package/dist/channel-Dw8BXC8D.js +1 -0
- package/dist/chunk-4BX2VUAB-MnK73C0-.js +1 -0
- package/dist/chunk-4BX2VUAB-ZaWvd3Xe.mjs +8 -0
- package/dist/{chunk-55IACEB6-P_FVKIbW.js → chunk-55IACEB6-B1EpdpVW.js} +1 -1
- package/dist/{chunk-55IACEB6-Du1Simcj.mjs → chunk-55IACEB6-iKbZBHA5.mjs} +1 -1
- package/dist/chunk-B4BG7PRW-Bo_sfBKL.js +165 -0
- package/dist/{chunk-B4BG7PRW-BUKsa2yH.mjs → chunk-B4BG7PRW-DgqSow4f.mjs} +251 -252
- package/dist/{chunk-DI55MBZ5-C9h0qLVI.mjs → chunk-DI55MBZ5-BAHL-2VJ.mjs} +444 -456
- package/dist/chunk-DI55MBZ5-BuuMLI1S.js +220 -0
- package/dist/{chunk-FMBD7UC4-C08-zA06.mjs → chunk-FMBD7UC4-BE8MbNLe.mjs} +1 -1
- package/dist/{chunk-FMBD7UC4-48-zdz-1.js → chunk-FMBD7UC4-Cs1BNv23.js} +1 -1
- package/dist/chunk-QN33PNHL-MX1ZMWu-.js +1 -0
- package/dist/chunk-QN33PNHL-ZaWv5vaA.mjs +19 -0
- package/dist/{chunk-QZHKN3VN-DbO6TJSK.mjs → chunk-QZHKN3VN-D2X7PBDi.mjs} +1 -1
- package/dist/{chunk-QZHKN3VN-Dy2264ui.js → chunk-QZHKN3VN-Db6mVb9M.js} +1 -1
- package/dist/{chunk-TZMSLE5B-BPmI9i6R.mjs → chunk-TZMSLE5B-AMFXF6mq.mjs} +20 -20
- package/dist/{chunk-TZMSLE5B-COENnLAZ.js → chunk-TZMSLE5B-CzjtACDr.js} +1 -1
- package/dist/{classDiagram-v2-WZHVMYZB-mzvV1Ifg.mjs → classDiagram-2ON5EDUG-CPwvtUDj.mjs} +2 -2
- package/dist/{classDiagram-2ON5EDUG-CFFwYK87.js → classDiagram-2ON5EDUG-UNrH9bQo.js} +1 -1
- package/dist/{classDiagram-2ON5EDUG-mzvV1Ifg.mjs → classDiagram-v2-WZHVMYZB-CPwvtUDj.mjs} +2 -2
- package/dist/{classDiagram-v2-WZHVMYZB-CFFwYK87.js → classDiagram-v2-WZHVMYZB-UNrH9bQo.js} +1 -1
- package/dist/{clone-KtLCwiKH.mjs → clone-CV4F8CSW.mjs} +1 -1
- package/dist/clone-HVsPHeK3.js +1 -0
- package/dist/{code-block-37QAKDTI-sxlq94xm.js → code-block-37QAKDTI-38K5Mxo2.js} +1 -1
- package/dist/{code-block-37QAKDTI-CmykMxjQ.mjs → code-block-37QAKDTI-Q-OOsw6q.mjs} +1 -1
- package/dist/cose-bilkent-S5V4N54A-1B77PywG.js +1 -0
- package/dist/{cose-bilkent-S5V4N54A-BXcldnso.mjs → cose-bilkent-S5V4N54A-greBbyuM.mjs} +592 -589
- package/dist/cytoscape.esm-CNUX3VTg.js +321 -0
- package/dist/{cytoscape.esm-ZmItrg9y.mjs → cytoscape.esm-Cvf3sx9F.mjs} +56 -83
- package/dist/dagre-6UL2VRFP-DEQXyXKh.js +4 -0
- package/dist/dagre-6UL2VRFP-DN5Inkgr.mjs +443 -0
- package/dist/diagram-PSM6KHXK-C7tjFZpr.js +24 -0
- package/dist/{diagram-PSM6KHXK-DIV3jw9d.mjs → diagram-PSM6KHXK-D-GS1fTc.mjs} +45 -48
- package/dist/{diagram-QEK2KX5R-Q0M2_YtR.mjs → diagram-QEK2KX5R-DJXBxeH4.mjs} +10 -14
- package/dist/diagram-QEK2KX5R-Doa8ooC_.js +43 -0
- package/dist/diagram-S2PKOQOG-BN04h93a.js +24 -0
- package/dist/{diagram-S2PKOQOG-_WGA6s2-.mjs → diagram-S2PKOQOG-BuPevKqw.mjs} +22 -23
- package/dist/erDiagram-Q2GNP2WA-AS2vnQKc.js +60 -0
- package/dist/{erDiagram-Q2GNP2WA-CW0D_QGb.mjs → erDiagram-Q2GNP2WA-DxOmvmqL.mjs} +77 -78
- package/dist/flowDiagram-NV44I4VS-BChiRwcp.js +162 -0
- package/dist/{flowDiagram-NV44I4VS-DVQ8Ntc4.mjs → flowDiagram-NV44I4VS-Cs_jC87H.mjs} +442 -449
- package/dist/{ganttDiagram-JELNMOA3-Bk-dX6qT.mjs → ganttDiagram-JELNMOA3-02b_-xyZ.mjs} +1049 -1041
- package/dist/ganttDiagram-JELNMOA3-BGy1b6TD.js +267 -0
- package/dist/{gitGraph-F6HP7TQM-CsdwxYUE.mjs → gitGraph-F6HP7TQM-BWm0SBV4.mjs} +1 -1
- package/dist/{gitGraph-F6HP7TQM-DvIgo2TM.js → gitGraph-F6HP7TQM-DVfckSNX.js} +1 -1
- package/dist/gitGraphDiagram-NY62KEGX-CfzoE07P.mjs +699 -0
- package/dist/gitGraphDiagram-NY62KEGX-Cm9ywQoW.js +65 -0
- package/dist/{graph-C_T4ZBuC.mjs → graph-DEu7-ZhH.mjs} +8 -8
- package/dist/{graph-BNpx6ebg.js → graph-Dw_87ii6.js} +1 -1
- package/dist/index-BwYOYPeK.js +670 -0
- package/dist/{index-oe4HpmeG.mjs → index-DH3CVXwD.mjs} +22541 -22646
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +3 -3
- package/dist/{info-NVLQJR56-BwFQRguW.js → info-NVLQJR56-BpKxONZx.js} +1 -1
- package/dist/info-NVLQJR56-MmJP3L6S.mjs +5 -0
- package/dist/{infoDiagram-WHAUD3N6-C-gzsm95.mjs → infoDiagram-WHAUD3N6-Bfsucvti.mjs} +2 -2
- package/dist/{infoDiagram-WHAUD3N6-CCb5k_S7.js → infoDiagram-WHAUD3N6-q-yX3_By.js} +1 -1
- package/dist/journeyDiagram-XKPGCS4Q-BqtyHvQF.js +139 -0
- package/dist/{journeyDiagram-XKPGCS4Q-DzkUL_YG.mjs → journeyDiagram-XKPGCS4Q-dFRLmnr-.mjs} +24 -26
- package/dist/kanban-definition-3W4ZIXB7-DeOl9Eme.mjs +719 -0
- package/dist/kanban-definition-3W4ZIXB7-DraMxv75.js +89 -0
- package/dist/{layout-CuWQnP5Y.js → layout-BKTUO8WZ.js} +1 -1
- package/dist/{layout-Cd98WJ7r.mjs → layout-CpL-hYTa.mjs} +22 -22
- package/dist/{linear-SU4e8MRt.mjs → linear-CLwIU3di.mjs} +20 -20
- package/dist/{linear-DFDw13y6.js → linear-DvM229Di.js} +1 -1
- package/dist/mermaid-4DMBBIKO-BpqXz0_U.mjs +4 -0
- package/dist/{mermaid-4DMBBIKO-BihEtyib.js → mermaid-4DMBBIKO-Cd15t2pT.js} +1 -1
- package/dist/mermaid-parser.core-BVlc9Lqd.js +128 -0
- package/dist/{mermaid-parser.core-C8Sxzqul.mjs → mermaid-parser.core-CLAapB2-.mjs} +3404 -3369
- package/dist/{min-C2k771MZ.mjs → min--ML-ONY_.mjs} +2 -2
- package/dist/{min-CppMRDFn.js → min-BQ4NUvNf.js} +1 -1
- package/dist/{mindmap-definition-VGOIOE7T-BUd354uH.mjs → mindmap-definition-VGOIOE7T-78K_EDCb.mjs} +170 -172
- package/dist/mindmap-definition-VGOIOE7T-ZHY70ZzV.js +68 -0
- package/dist/notion-stream.css +1 -0
- package/dist/{ordinal-C0oynhte.mjs → ordinal-B-KqvkJf.mjs} +1 -1
- package/dist/{packet-BFZMPI3H-Cz_A86d3.mjs → packet-BFZMPI3H-B34lFb6T.mjs} +1 -1
- package/dist/{packet-BFZMPI3H-CFx3kSkL.js → packet-BFZMPI3H-C9xcJQVN.js} +1 -1
- package/dist/{pie-7BOR55EZ-_1MqisBd.js → pie-7BOR55EZ-Bz_jfTd_.js} +1 -1
- package/dist/pie-7BOR55EZ-DW2Zgje5.mjs +5 -0
- package/dist/{pieDiagram-ADFJNKIX-Bg0_gu43.js → pieDiagram-ADFJNKIX-CKzchAXU.js} +2 -2
- package/dist/{pieDiagram-ADFJNKIX-lRs_rpwI.mjs → pieDiagram-ADFJNKIX-Ctp6QR7f.mjs} +21 -21
- package/dist/quadrantDiagram-AYHSOK5B-D2Rt32D2.js +7 -0
- package/dist/{quadrantDiagram-AYHSOK5B-D9kypJt6.mjs → quadrantDiagram-AYHSOK5B-D3U_Qicu.mjs} +230 -232
- package/dist/{radar-NHE76QYJ-B-PvZD0K.mjs → radar-NHE76QYJ-CO5ECFHq.mjs} +1 -1
- package/dist/{radar-NHE76QYJ-CdtC4C8F.js → radar-NHE76QYJ-DI4PJJjm.js} +1 -1
- package/dist/requirementDiagram-UZGBJVZJ-CSgb6U9N.js +64 -0
- package/dist/{requirementDiagram-UZGBJVZJ-B5ulaHjE.mjs → requirementDiagram-UZGBJVZJ-Da_yWSD1.mjs} +190 -192
- package/dist/sankeyDiagram-TZEHDZUN-C8jpBnM0.js +10 -0
- package/dist/{sankeyDiagram-TZEHDZUN-DprIPFbe.mjs → sankeyDiagram-TZEHDZUN-Dp3Eyl8Q.mjs} +189 -189
- package/dist/sequenceDiagram-WL72ISMW-BZJ7d_X4.js +145 -0
- package/dist/{sequenceDiagram-WL72ISMW-B4m4oag0.mjs → sequenceDiagram-WL72ISMW-yJKe02sV.mjs} +222 -229
- package/dist/{stateDiagram-FKZM4ZOC-BD4tnS-V.js → stateDiagram-FKZM4ZOC-Cfuygt_P.js} +1 -1
- package/dist/{stateDiagram-FKZM4ZOC-DjkdDbQ2.mjs → stateDiagram-FKZM4ZOC-z0IX85WL.mjs} +4 -4
- package/dist/{stateDiagram-v2-4FDKWEC3-AK86F3i6.mjs → stateDiagram-v2-4FDKWEC3-BDMFqSat.mjs} +2 -2
- package/dist/{stateDiagram-v2-4FDKWEC3-sybMoxOk.js → stateDiagram-v2-4FDKWEC3-BiriAQkj.js} +1 -1
- package/dist/{timeline-definition-IT6M3QCI-BFuQEeZP.mjs → timeline-definition-IT6M3QCI-BmEq-RM3.mjs} +217 -223
- package/dist/timeline-definition-IT6M3QCI-CBmpRgUM.js +61 -0
- package/dist/{treemap-KMMF4GRG-gtrnY16v.mjs → treemap-KMMF4GRG-IaHP18r_.mjs} +1 -1
- package/dist/{treemap-KMMF4GRG-DTnRa789.js → treemap-KMMF4GRG-qP0VzKwW.js} +1 -1
- package/dist/{xychartDiagram-PRI3JC2R-CjXiy6m0.mjs → xychartDiagram-PRI3JC2R-BSaI76KX.mjs} +7 -7
- package/dist/xychartDiagram-PRI3JC2R-CQgij0Fy.js +7 -0
- package/package.json +5 -5
- package/dist/architectureDiagram-VXUJARFQ-BPQoZmaM.js +0 -36
- package/dist/blockDiagram-VD42YOAC-Z3Fc3Bew.js +0 -122
- package/dist/c4Diagram-YG6GDRKO-LzDuCZ2V.js +0 -10
- package/dist/channel-6dUO0MQi.js +0 -1
- package/dist/chunk-4BX2VUAB-BwubFldI.js +0 -1
- package/dist/chunk-4BX2VUAB-DldMXCTt.mjs +0 -9
- package/dist/chunk-B4BG7PRW-CKX0VJ-S.js +0 -165
- package/dist/chunk-DI55MBZ5-CMq-O8k2.js +0 -220
- package/dist/chunk-QN33PNHL-B0sO38bZ.js +0 -1
- package/dist/chunk-QN33PNHL-B_PGnTkk.mjs +0 -20
- package/dist/clone-B0UaPT2Z.js +0 -1
- package/dist/cose-bilkent-S5V4N54A-BCaAPmuF.js +0 -1
- package/dist/cytoscape.esm-DkGgpG6d.js +0 -331
- package/dist/dagre-6UL2VRFP-By42zbLA.mjs +0 -446
- package/dist/dagre-6UL2VRFP-DCwfkcWi.js +0 -4
- package/dist/diagram-PSM6KHXK-hjXN9n1N.js +0 -24
- package/dist/diagram-QEK2KX5R-B04ODMim.js +0 -43
- package/dist/diagram-S2PKOQOG-BmCs4MZE.js +0 -24
- package/dist/erDiagram-Q2GNP2WA-4KtQUUuI.js +0 -60
- package/dist/flowDiagram-NV44I4VS-BwpfJE0U.js +0 -162
- package/dist/ganttDiagram-JELNMOA3-D7rI7u8B.js +0 -267
- package/dist/gitGraphDiagram-NY62KEGX-BDTsbSkO.mjs +0 -712
- package/dist/gitGraphDiagram-NY62KEGX-IQ8KriUw.js +0 -65
- package/dist/index-CkYZRBYn.js +0 -676
- package/dist/info-NVLQJR56-B5gDnSIT.mjs +0 -5
- package/dist/journeyDiagram-XKPGCS4Q-POnSekz9.js +0 -139
- package/dist/kanban-definition-3W4ZIXB7-BPr0_7wG.mjs +0 -720
- package/dist/kanban-definition-3W4ZIXB7-Bm064qrf.js +0 -89
- package/dist/mermaid-4DMBBIKO-DDxvQcE9.mjs +0 -4
- package/dist/mermaid-parser.core-BHAgLMGa.js +0 -128
- package/dist/mindmap-definition-VGOIOE7T-CV7bD4HY.js +0 -68
- package/dist/pie-7BOR55EZ-B0-atE_o.mjs +0 -5
- package/dist/quadrantDiagram-AYHSOK5B-B4gVakRV.js +0 -7
- package/dist/requirementDiagram-UZGBJVZJ-0zMPj-SD.js +0 -64
- package/dist/sankeyDiagram-TZEHDZUN-Cl8-L83T.js +0 -10
- package/dist/sequenceDiagram-WL72ISMW-DRQn7Fe4.js +0 -145
- package/dist/timeline-definition-IT6M3QCI-2X4dfyLj.js +0 -61
- package/dist/xychartDiagram-PRI3JC2R-BaFd1In8.js +0 -7
|
@@ -0,0 +1,670 @@
|
|
|
1
|
+
"use strict";const C=require("react/jsx-runtime"),P=require("react"),ME="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let Ni=(e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=ME[r[e]&63];return t};const lc=(function(e){if(e==null)return DE;if(typeof e=="function")return j0(e);if(typeof e=="object")return Array.isArray(e)?IE(e):RE(e);if(typeof e=="string")return BE(e);throw new Error("Expected function, string, or object as test")});function IE(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=lc(e[r]);return j0(n);function n(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function RE(e){const t=e;return j0(r);function r(n){const i=n;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function BE(e){return j0(t);function t(r){return r&&r.type===e}}function j0(e){return t;function t(r,n,i){return!!(OE(r)&&e.call(this,r,typeof n=="number"?n:void 0,i||void 0))}}function DE(){return!0}function OE(e){return e!==null&&typeof e=="object"&&"type"in e}const x4=[],rl=!0,yf=!1,Iu="skip";function hm(e,t,r,n){let i;typeof t=="function"&&typeof r!="function"?(n=r,r=t):i=t;const a=lc(i),s=n?-1:1;o(e,void 0,[])();function o(l,c,u){const h=l&&typeof l=="object"?l:{};if(typeof h.type=="string"){const f=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(d,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return d;function d(){let f=x4,p,m,b;if((!t||a(l,c,u[u.length-1]||void 0))&&(f=PE(r(l,u)),f[0]===yf))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==Iu)for(m=(n?y.children.length:-1)+s,b=u.concat(y);m>-1&&m<y.children.length;){const v=y.children[m];if(p=o(v,m,b)(),p[0]===yf)return p;m=typeof p[1]=="number"?p[1]:m+s}}return f}}}function PE(e){return Array.isArray(e)?e:typeof e=="number"?[rl,e]:e==null?x4:[e]}function Xs(e,t,r,n){let i,a,s;typeof t=="function"&&typeof r!="function"?(a=void 0,s=t,i=r):(a=t,s=r,i=n),hm(e,a,o,i);function o(l,c){const u=c[c.length-1],h=u?u.children.indexOf(l):void 0;return s(l,h,u)}}function FE({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:r=[],allowDataImages:n=!1,allowedProtocols:i=[],blockedImageClass:a="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:s="text-gray-500"}){const o=t.length&&!t.every(c=>c==="*"),l=r.length&&!r.every(c=>c==="*");if(!e&&(o||l))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return c=>{const u=qE(e,t,r,n,i,a,s);Xs(c,u)}}function Ug(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function $E(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const zE=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),HE=new Set(["javascript:","data:","file:","vbscript:"]);function Wg(e,t,r,n=!1,i=!1,a=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!i)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return i&&n&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const u=e.substring(5);if(u&&u.length>0&&u!=="invalid")return e}}catch{return null}return null}const s=Ug(e,r);if(!s||HE.has(s.protocol)||!(zE.has(s.protocol)||a.includes(s.protocol)||a.includes("*")))return null;if(s.protocol==="mailto:"||!s.protocol.match(/^https?:$/))return s.href;const l=$E(e);return s&&t.some(c=>{const u=Ug(c,r);return!u||u.origin!==s.origin?!1:s.href.startsWith(u.href)})?l?s.pathname+s.search+s.hash:s.href:t.includes("*")?s.protocol!=="https:"&&s.protocol!=="http:"?null:l?s.pathname+s.search+s.hash:s.href:null}const Zh=Symbol("node-seen"),qE=(e,t,r,n,i,a,s)=>{const o=(l,c,u)=>{if(l.type!=="element"||l[Zh])return rl;if(l.tagName==="a"){const h=Wg(l.properties.href,t,e,!1,!1,i);return h===null?(l[Zh]=!0,Xs(l,o),u&&typeof c=="number"&&(u.children[c]={type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(l.properties.href),class:s},children:[...l.children,{type:"text",value:" [blocked]"}]}),Iu):(l.properties.href=h,l.properties.target="_blank",l.properties.rel="noopener noreferrer",rl)}if(l.tagName==="img"){const h=Wg(l.properties.src,r,e,n,!0,i);return h===null?(l[Zh]=!0,Xs(l,o),u&&typeof c=="number"&&(u.children[c]={type:"element",tagName:"span",properties:{class:a},children:[{type:"text",value:"[Image blocked: "+String(l.properties.alt||"No description")+"]"}]}),Iu):(l.properties.src=h,rl)}return rl};return o},v4=-1,U0=0,bl=1,Ru=2,dm=3,fm=4,pm=5,mm=6,k4=7,w4=8,Gg=typeof self=="object"?self:globalThis,jE=(e,t)=>{const r=(i,a)=>(e.set(a,i),i),n=i=>{if(e.has(i))return e.get(i);const[a,s]=t[i];switch(a){case U0:case v4:return r(s,i);case bl:{const o=r([],i);for(const l of s)o.push(n(l));return o}case Ru:{const o=r({},i);for(const[l,c]of s)o[n(l)]=n(c);return o}case dm:return r(new Date(s),i);case fm:{const{source:o,flags:l}=s;return r(new RegExp(o,l),i)}case pm:{const o=r(new Map,i);for(const[l,c]of s)o.set(n(l),n(c));return o}case mm:{const o=r(new Set,i);for(const l of s)o.add(n(l));return o}case k4:{const{name:o,message:l}=s;return r(new Gg[o](l),i)}case w4:return r(BigInt(s),i);case"BigInt":return r(Object(BigInt(s)),i);case"ArrayBuffer":return r(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:o}=new Uint8Array(s);return r(new DataView(o),s)}}return r(new Gg[a](s),i)};return n},Yg=e=>jE(new Map,e)(0),ys="",{toString:UE}={},{keys:WE}=Object,Io=e=>{const t=typeof e;if(t!=="object"||!e)return[U0,t];const r=UE.call(e).slice(8,-1);switch(r){case"Array":return[bl,ys];case"Object":return[Ru,ys];case"Date":return[dm,ys];case"RegExp":return[fm,ys];case"Map":return[pm,ys];case"Set":return[mm,ys];case"DataView":return[bl,r]}return r.includes("Array")?[bl,r]:r.includes("Error")?[k4,r]:[Ru,r]},Lc=([e,t])=>e===U0&&(t==="function"||t==="symbol"),GE=(e,t,r,n)=>{const i=(s,o)=>{const l=n.push(s)-1;return r.set(o,l),l},a=s=>{if(r.has(s))return r.get(s);let[o,l]=Io(s);switch(o){case U0:{let u=s;switch(l){case"bigint":o=w4,u=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);u=null;break;case"undefined":return i([v4],s)}return i([o,u],s)}case bl:{if(l){let d=s;return l==="DataView"?d=new Uint8Array(s.buffer):l==="ArrayBuffer"&&(d=new Uint8Array(s)),i([l,[...d]],s)}const u=[],h=i([o,u],s);for(const d of s)u.push(a(d));return h}case Ru:{if(l)switch(l){case"BigInt":return i([l,s.toString()],s);case"Boolean":case"Number":case"String":return i([l,s.valueOf()],s)}if(t&&"toJSON"in s)return a(s.toJSON());const u=[],h=i([o,u],s);for(const d of WE(s))(e||!Lc(Io(s[d])))&&u.push([a(d),a(s[d])]);return h}case dm:return i([o,s.toISOString()],s);case fm:{const{source:u,flags:h}=s;return i([o,{source:u,flags:h}],s)}case pm:{const u=[],h=i([o,u],s);for(const[d,f]of s)(e||!(Lc(Io(d))||Lc(Io(f))))&&u.push([a(d),a(f)]);return h}case mm:{const u=[],h=i([o,u],s);for(const d of s)(e||!Lc(Io(d)))&&u.push(a(d));return h}}const{message:c}=s;return i([o,{name:l,message:c}],s)};return a},Vg=(e,{json:t,lossy:r}={})=>{const n=[];return GE(!(t||r),!!t,new Map,n)(e),n},Ya=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Yg(Vg(e,t)):structuredClone(e):(e,t)=>Yg(Vg(e,t));class cc{constructor(t,r,n){this.normal=r,this.property=t,n&&(this.space=n)}}cc.prototype.normal={};cc.prototype.property={};cc.prototype.space=void 0;function T4(e,t){const r={},n={};for(const i of e)Object.assign(r,i.property),Object.assign(n,i.normal);return new cc(r,n,t)}function Pl(e){return e.toLowerCase()}class an{constructor(t,r){this.attribute=r,this.property=t}}an.prototype.attribute="";an.prototype.booleanish=!1;an.prototype.boolean=!1;an.prototype.commaOrSpaceSeparated=!1;an.prototype.commaSeparated=!1;an.prototype.defined=!1;an.prototype.mustUseProperty=!1;an.prototype.number=!1;an.prototype.overloadedBoolean=!1;an.prototype.property="";an.prototype.spaceSeparated=!1;an.prototype.space=void 0;let YE=0;const mt=as(),tr=as(),xf=as(),Te=as(),Pt=as(),Rs=as(),un=as();function as(){return 2**++YE}const vf=Object.freeze(Object.defineProperty({__proto__:null,boolean:mt,booleanish:tr,commaOrSpaceSeparated:un,commaSeparated:Rs,number:Te,overloadedBoolean:xf,spaceSeparated:Pt},Symbol.toStringTag,{value:"Module"})),Jh=Object.keys(vf);class gm extends an{constructor(t,r,n,i){let a=-1;if(super(t,r),Xg(this,"space",i),typeof n=="number")for(;++a<Jh.length;){const s=Jh[a];Xg(this,Jh[a],(n&vf[s])===vf[s])}}}gm.prototype.defined=!0;function Xg(e,t,r){r&&(e[t]=r)}function uo(e){const t={},r={};for(const[n,i]of Object.entries(e.properties)){const a=new gm(n,e.transform(e.attributes||{},n),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(a.mustUseProperty=!0),t[n]=a,r[Pl(n)]=n,r[Pl(a.attribute)]=n}return new cc(t,r,e.space)}const C4=uo({properties:{ariaActiveDescendant:null,ariaAtomic:tr,ariaAutoComplete:null,ariaBusy:tr,ariaChecked:tr,ariaColCount:Te,ariaColIndex:Te,ariaColSpan:Te,ariaControls:Pt,ariaCurrent:null,ariaDescribedBy:Pt,ariaDetails:null,ariaDisabled:tr,ariaDropEffect:Pt,ariaErrorMessage:null,ariaExpanded:tr,ariaFlowTo:Pt,ariaGrabbed:tr,ariaHasPopup:null,ariaHidden:tr,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Pt,ariaLevel:Te,ariaLive:null,ariaModal:tr,ariaMultiLine:tr,ariaMultiSelectable:tr,ariaOrientation:null,ariaOwns:Pt,ariaPlaceholder:null,ariaPosInSet:Te,ariaPressed:tr,ariaReadOnly:tr,ariaRelevant:null,ariaRequired:tr,ariaRoleDescription:Pt,ariaRowCount:Te,ariaRowIndex:Te,ariaRowSpan:Te,ariaSelected:tr,ariaSetSize:Te,ariaSort:null,ariaValueMax:Te,ariaValueMin:Te,ariaValueNow:Te,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function S4(e,t){return t in e?e[t]:t}function E4(e,t){return S4(e,t.toLowerCase())}const VE=uo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Rs,acceptCharset:Pt,accessKey:Pt,action:null,allow:null,allowFullScreen:mt,allowPaymentRequest:mt,allowUserMedia:mt,alt:null,as:null,async:mt,autoCapitalize:null,autoComplete:Pt,autoFocus:mt,autoPlay:mt,blocking:Pt,capture:null,charSet:null,checked:mt,cite:null,className:Pt,cols:Te,colSpan:null,content:null,contentEditable:tr,controls:mt,controlsList:Pt,coords:Te|Rs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:mt,defer:mt,dir:null,dirName:null,disabled:mt,download:xf,draggable:tr,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:mt,formTarget:null,headers:Pt,height:Te,hidden:xf,high:Te,href:null,hrefLang:null,htmlFor:Pt,httpEquiv:Pt,id:null,imageSizes:null,imageSrcSet:null,inert:mt,inputMode:null,integrity:null,is:null,isMap:mt,itemId:null,itemProp:Pt,itemRef:Pt,itemScope:mt,itemType:Pt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:mt,low:Te,manifest:null,max:null,maxLength:Te,media:null,method:null,min:null,minLength:Te,multiple:mt,muted:mt,name:null,nonce:null,noModule:mt,noValidate:mt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:mt,optimum:Te,pattern:null,ping:Pt,placeholder:null,playsInline:mt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:mt,referrerPolicy:null,rel:Pt,required:mt,reversed:mt,rows:Te,rowSpan:Te,sandbox:Pt,scope:null,scoped:mt,seamless:mt,selected:mt,shadowRootClonable:mt,shadowRootDelegatesFocus:mt,shadowRootMode:null,shape:null,size:Te,sizes:null,slot:null,span:Te,spellCheck:tr,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Te,step:null,style:null,tabIndex:Te,target:null,title:null,translate:null,type:null,typeMustMatch:mt,useMap:null,value:tr,width:Te,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Pt,axis:null,background:null,bgColor:null,border:Te,borderColor:null,bottomMargin:Te,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:mt,declare:mt,event:null,face:null,frame:null,frameBorder:null,hSpace:Te,leftMargin:Te,link:null,longDesc:null,lowSrc:null,marginHeight:Te,marginWidth:Te,noResize:mt,noHref:mt,noShade:mt,noWrap:mt,object:null,profile:null,prompt:null,rev:null,rightMargin:Te,rules:null,scheme:null,scrolling:tr,standby:null,summary:null,text:null,topMargin:Te,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Te,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:mt,disableRemotePlayback:mt,prefix:null,property:null,results:Te,security:null,unselectable:null},space:"html",transform:E4}),XE=uo({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:un,accentHeight:Te,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Te,amplitude:Te,arabicForm:null,ascent:Te,attributeName:null,attributeType:null,azimuth:Te,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Te,by:null,calcMode:null,capHeight:Te,className:Pt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Te,diffuseConstant:Te,direction:null,display:null,dur:null,divisor:Te,dominantBaseline:null,download:mt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Te,enableBackground:null,end:null,event:null,exponent:Te,externalResourcesRequired:null,fill:null,fillOpacity:Te,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Rs,g2:Rs,glyphName:Rs,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Te,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Te,horizOriginX:Te,horizOriginY:Te,id:null,ideographic:Te,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Te,k:Te,k1:Te,k2:Te,k3:Te,k4:Te,kernelMatrix:un,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Te,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Te,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Te,overlineThickness:Te,paintOrder:null,panose1:null,path:null,pathLength:Te,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Pt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Te,pointsAtY:Te,pointsAtZ:Te,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:un,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:un,rev:un,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:un,requiredFeatures:un,requiredFonts:un,requiredFormats:un,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Te,specularExponent:Te,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Te,strikethroughThickness:Te,string:null,stroke:null,strokeDashArray:un,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Te,strokeOpacity:Te,strokeWidth:null,style:null,surfaceScale:Te,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:un,tabIndex:Te,tableValues:null,target:null,targetX:Te,targetY:Te,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:un,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Te,underlineThickness:Te,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Te,values:null,vAlphabetic:Te,vMathematical:Te,vectorEffect:null,vHanging:Te,vIdeographic:Te,version:null,vertAdvY:Te,vertOriginX:Te,vertOriginY:Te,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Te,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:S4}),_4=uo({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),A4=uo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:E4}),N4=uo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),KE={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},QE=/[A-Z]/g,Kg=/-[a-z]/g,ZE=/^data[-\w.:]+$/i;function uc(e,t){const r=Pl(t);let n=t,i=an;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&ZE.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Kg,e_);n="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Kg.test(a)){let s=a.replace(QE,JE);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=gm}return new i(n,t)}function JE(e){return"-"+e.toLowerCase()}function e_(e){return e.charAt(1).toUpperCase()}const ho=T4([C4,VE,_4,A4,N4],"html"),ui=T4([C4,XE,_4,A4,N4],"svg");function Qg(e){const t=[],r=String(e||"");let n=r.indexOf(","),i=0,a=!1;for(;!a;){n===-1&&(n=r.length,a=!0);const s=r.slice(i,n).trim();(s||!a)&&t.push(s),i=n+1,n=r.indexOf(",",i)}return t}function bm(e,t){const r=t||{};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const Zg=/[#.]/g;function t_(e,t){const r=e||"",n={};let i=0,a,s;for(;i<r.length;){Zg.lastIndex=i;const o=Zg.exec(r),l=r.slice(i,o?o.index:r.length);l&&(a?a==="#"?n.id=l:Array.isArray(n.className)?n.className.push(l):n.className=[l]:s=l,i+=l.length),o&&(a=o[0],i++)}return{type:"element",tagName:s||t||"div",properties:n,children:[]}}function Jg(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function ym(e){return e.join(" ").trim()}function L4(e,t,r){const n=r?a_(r):void 0;function i(a,s,...o){let l;if(a==null){l={type:"root",children:[]};const c=s;o.unshift(c)}else{l=t_(a,t);const c=l.tagName.toLowerCase(),u=n?n.get(c):void 0;if(l.tagName=u||c,r_(s))o.unshift(s);else for(const[h,d]of Object.entries(s))n_(e,l.properties,h,d)}for(const c of o)kf(l.children,c);return l.type==="element"&&l.tagName==="template"&&(l.content={type:"root",children:l.children},l.children=[]),l}return i}function r_(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,r=Object.keys(e);for(const n of r){const i=t[n];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const a=i;for(const s of a)if(typeof s!="number"&&typeof s!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function n_(e,t,r,n){const i=uc(e,r);let a;if(n!=null){if(typeof n=="number"){if(Number.isNaN(n))return;a=n}else typeof n=="boolean"?a=n:typeof n=="string"?i.spaceSeparated?a=Jg(n):i.commaSeparated?a=Qg(n):i.commaOrSpaceSeparated?a=Jg(Qg(n).join(" ")):a=e2(i,i.property,n):Array.isArray(n)?a=[...n]:a=i.property==="style"?i_(n):String(n);if(Array.isArray(a)){const s=[];for(const o of a)s.push(e2(i,i.property,o));a=s}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function kf(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const r of t)kf(e,r);else if(typeof t=="object"&&"type"in t)t.type==="root"?kf(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function e2(e,t,r){if(typeof r=="string"){if(e.number&&r&&!Number.isNaN(Number(r)))return Number(r);if((e.boolean||e.overloadedBoolean)&&(r===""||Pl(r)===Pl(t)))return!0}return r}function i_(e){const t=[];for(const[r,n]of Object.entries(e))t.push([r,n].join(": "));return t.join("; ")}function a_(e){const t=new Map;for(const r of e)t.set(r.toLowerCase(),r);return t}const s_=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","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","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],M4=L4(ho,"div"),I4=L4(ui,"g",s_);function o_(e){const t=String(e),r=[];return{toOffset:i,toPoint:n};function n(a){if(typeof a=="number"&&a>-1&&a<=t.length){let s=0;for(;;){let o=r[s];if(o===void 0){const l=t2(t,r[s-1]);o=l===-1?t.length+1:l+1,r[s]=o}if(o>a)return{line:s+1,column:a-(s>0?r[s-1]:0)+1,offset:a};s++}}}function i(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;r.length<a.line;){const o=r[r.length-1],l=t2(t,o),c=l===-1?t.length+1:l+1;if(o===c)break;r.push(c)}const s=(a.line>1?r[a.line-2]:0)+a.column-1;if(s<r[a.line-1])return s}}}function t2(e,t){const r=e.indexOf("\r",t),n=e.indexOf(`
|
|
2
|
+
`,t);return n===-1?r:r===-1||r+1===n?n:r<n?r:n}const ii={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},R4={}.hasOwnProperty,l_=Object.prototype;function c_(e,t){const r=t||{};return xm({file:r.file||void 0,location:!1,schema:r.space==="svg"?ui:ho,verbose:r.verbose||!1},e)}function xm(e,t){let r;switch(t.nodeName){case"#comment":{const n=t;return r={type:"comment",value:n.data},du(e,n,r),r}case"#document":case"#document-fragment":{const n=t,i="mode"in n?n.mode==="quirks"||n.mode==="limited-quirks":!1;if(r={type:"root",children:B4(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),s=o_(a),o=s.toPoint(0),l=s.toPoint(a.length);r.position={start:o,end:l}}return r}case"#documentType":{const n=t;return r={type:"doctype"},du(e,n,r),r}case"#text":{const n=t;return r={type:"text",value:n.value},du(e,n,r),r}default:return r=u_(e,t),r}}function B4(e,t){let r=-1;const n=[];for(;++r<t.length;){const i=xm(e,t[r]);n.push(i)}return n}function u_(e,t){const r=e.schema;e.schema=t.namespaceURI===ii.svg?ui:ho;let n=-1;const i={};for(;++n<t.attrs.length;){const o=t.attrs[n],l=(o.prefix?o.prefix+":":"")+o.name;R4.call(l_,l)||(i[l]=o.value)}const s=(e.schema.space==="svg"?I4:M4)(t.tagName,i,B4(e,t.childNodes));if(du(e,t,s),s.tagName==="template"){const o=t,l=o.sourceCodeLocation,c=l&&l.startTag&&Ls(l.startTag),u=l&&l.endTag&&Ls(l.endTag),h=xm(e,o.content);c&&u&&e.file&&(h.position={start:c.end,end:u.start}),s.content=h}return e.schema=r,s}function du(e,t,r){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const n=h_(e,r,t.sourceCodeLocation);n&&(e.location=!0,r.position=n)}}function h_(e,t,r){const n=Ls(r);if(t.type==="element"){const i=t.children[t.children.length-1];if(n&&!r.endTag&&i&&i.position&&i.position.end&&(n.end=Object.assign({},i.position.end)),e.verbose){const a={};let s;if(r.attrs)for(s in r.attrs)R4.call(r.attrs,s)&&(a[uc(e.schema,s).property]=Ls(r.attrs[s]));r.startTag;const o=Ls(r.startTag),l=r.endTag?Ls(r.endTag):void 0,c={opening:o};l&&(c.closing=l),c.properties=a,t.data={position:c}}}return n}function Ls(e){const t=r2({line:e.startLine,column:e.startCol,offset:e.startOffset}),r=r2({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||r?{start:t,end:r}:void 0}function r2(e){return e.line&&e.column?e:void 0}const n2={}.hasOwnProperty;function vm(e,t){const r=t||{};function n(i,...a){let s=n.invalid;const o=n.handlers;if(i&&n2.call(i,e)){const l=String(i[e]);s=n2.call(o,l)?o[l]:n.unknown}if(s)return s.call(this,i,...a)}return n.handlers=r.handlers||{},n.invalid=r.invalid,n.unknown=r.unknown,n}const d_={},f_={}.hasOwnProperty,D4=vm("type",{handlers:{root:m_,element:v_,text:y_,comment:x_,doctype:b_}});function p_(e,t){const n=(t||d_).space;return D4(e,n==="svg"?ui:ho)}function m_(e,t){const r={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return r.childNodes=km(e.children,r,t),fo(e,r),r}function g_(e,t){const r={nodeName:"#document-fragment",childNodes:[]};return r.childNodes=km(e.children,r,t),fo(e,r),r}function b_(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return fo(e,t),t}function y_(e){const t={nodeName:"#text",value:e.value,parentNode:null};return fo(e,t),t}function x_(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return fo(e,t),t}function v_(e,t){const r=t;let n=r;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&r.space==="html"&&(n=ui);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&f_.call(e.properties,a)){const l=k_(n,a,e.properties[a]);l&&i.push(l)}}const s=n.space,o={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:ii[s],childNodes:[],parentNode:null};return o.childNodes=km(e.children,o,n),fo(e,o),e.tagName==="template"&&e.content&&(o.content=g_(e.content,n)),o}function k_(e,t,r){const n=uc(e,t);if(r===!1||r===null||r===void 0||typeof r=="number"&&Number.isNaN(r)||!r&&n.boolean)return;Array.isArray(r)&&(r=n.commaSeparated?bm(r):ym(r));const i={name:n.attribute,value:r===!0?"":String(r)};if(n.space&&n.space!=="html"&&n.space!=="svg"){const a=i.name.indexOf(":");a<0?i.prefix="":(i.name=i.name.slice(a+1),i.prefix=n.attribute.slice(0,a)),i.namespace=ii[n.space]}return i}function km(e,t,r){let n=-1;const i=[];if(e)for(;++n<e.length;){const a=D4(e[n],r);a.parentNode=t,i.push(a)}return i}function fo(e,t){const r=e.position;r&&r.start&&r.end&&(r.start.offset,r.end.offset,t.sourceCodeLocation={startLine:r.start.line,startCol:r.start.column,startOffset:r.start.offset,endLine:r.end.line,endCol:r.end.column,endOffset:r.end.offset})}const O4=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],w_=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),jt="�";var B;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(B||(B={}));const Qr={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function P4(e){return e>=55296&&e<=57343}function T_(e){return e>=56320&&e<=57343}function C_(e,t){return(e-55296)*1024+9216+t}function F4(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function $4(e){return e>=64976&&e<=65007||w_.has(e)}var se;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(se||(se={}));const S_=65536;class E_{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=S_,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,r){const{line:n,col:i,offset:a}=this,s=i+r,o=a+r;return{code:t,startLine:n,endLine:n,startCol:s,endCol:s,startOffset:o,endOffset:o}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const r=this.html.charCodeAt(this.pos+1);if(T_(r))return this.pos++,this._addGap(),C_(t,r)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,B.EOF;return this._err(se.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,r){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=r}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,r){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(r)return this.html.startsWith(t,this.pos);for(let n=0;n<t.length;n++)if((this.html.charCodeAt(this.pos+n)|32)!==t.charCodeAt(n))return!1;return!0}peek(t){const r=this.pos+t;if(r>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,B.EOF;const n=this.html.charCodeAt(r);return n===B.CARRIAGE_RETURN?B.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,B.EOF;let t=this.html.charCodeAt(this.pos);return t===B.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,B.LINE_FEED):t===B.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,P4(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===B.LINE_FEED||t===B.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){F4(t)?this._err(se.controlCharacterInInputStream):$4(t)&&this._err(se.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var vt;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(vt||(vt={}));function z4(e,t){for(let r=e.attrs.length-1;r>=0;r--)if(e.attrs[r].name===t)return e.attrs[r].value;return null}const __=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肻 ଷ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))),A_=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]]);function N_(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=A_.get(e))!==null&&t!==void 0?t:e}var yr;(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"})(yr||(yr={}));const L_=32;var oa;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(oa||(oa={}));function wf(e){return e>=yr.ZERO&&e<=yr.NINE}function M_(e){return e>=yr.UPPER_A&&e<=yr.UPPER_F||e>=yr.LOWER_A&&e<=yr.LOWER_F}function I_(e){return e>=yr.UPPER_A&&e<=yr.UPPER_Z||e>=yr.LOWER_A&&e<=yr.LOWER_Z||wf(e)}function R_(e){return e===yr.EQUALS||I_(e)}var gr;(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"})(gr||(gr={}));var Ii;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ii||(Ii={}));class B_{constructor(t,r,n){this.decodeTree=t,this.emitCodePoint=r,this.errors=n,this.state=gr.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ii.Strict}startEntity(t){this.decodeMode=t,this.state=gr.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,r){switch(this.state){case gr.EntityStart:return t.charCodeAt(r)===yr.NUM?(this.state=gr.NumericStart,this.consumed+=1,this.stateNumericStart(t,r+1)):(this.state=gr.NamedEntity,this.stateNamedEntity(t,r));case gr.NumericStart:return this.stateNumericStart(t,r);case gr.NumericDecimal:return this.stateNumericDecimal(t,r);case gr.NumericHex:return this.stateNumericHex(t,r);case gr.NamedEntity:return this.stateNamedEntity(t,r)}}stateNumericStart(t,r){return r>=t.length?-1:(t.charCodeAt(r)|L_)===yr.LOWER_X?(this.state=gr.NumericHex,this.consumed+=1,this.stateNumericHex(t,r+1)):(this.state=gr.NumericDecimal,this.stateNumericDecimal(t,r))}addToNumericResult(t,r,n,i){if(r!==n){const a=n-r;this.result=this.result*Math.pow(i,a)+Number.parseInt(t.substr(r,a),i),this.consumed+=a}}stateNumericHex(t,r){const n=r;for(;r<t.length;){const i=t.charCodeAt(r);if(wf(i)||M_(i))r+=1;else return this.addToNumericResult(t,n,r,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,n,r,16),-1}stateNumericDecimal(t,r){const n=r;for(;r<t.length;){const i=t.charCodeAt(r);if(wf(i))r+=1;else return this.addToNumericResult(t,n,r,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,n,r,10),-1}emitNumericEntity(t,r){var n;if(this.consumed<=r)return(n=this.errors)===null||n===void 0||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===yr.SEMI)this.consumed+=1;else if(this.decodeMode===Ii.Strict)return 0;return this.emitCodePoint(N_(this.result),this.consumed),this.errors&&(t!==yr.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,r){const{decodeTree:n}=this;let i=n[this.treeIndex],a=(i&oa.VALUE_LENGTH)>>14;for(;r<t.length;r++,this.excess++){const s=t.charCodeAt(r);if(this.treeIndex=D_(n,i,this.treeIndex+Math.max(1,a),s),this.treeIndex<0)return this.result===0||this.decodeMode===Ii.Attribute&&(a===0||R_(s))?0:this.emitNotTerminatedNamedEntity();if(i=n[this.treeIndex],a=(i&oa.VALUE_LENGTH)>>14,a!==0){if(s===yr.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Ii.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:r,decodeTree:n}=this,i=(n[r]&oa.VALUE_LENGTH)>>14;return this.emitNamedEntityData(r,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,r,n){const{decodeTree:i}=this;return this.emitCodePoint(r===1?i[t]&~oa.VALUE_LENGTH:i[t+1],n),r===3&&this.emitCodePoint(i[t+2],n),n}end(){var t;switch(this.state){case gr.NamedEntity:return this.result!==0&&(this.decodeMode!==Ii.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case gr.NumericDecimal:return this.emitNumericEntity(0,2);case gr.NumericHex:return this.emitNumericEntity(0,3);case gr.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case gr.EntityStart:return 0}}}function D_(e,t,r,n){const i=(t&oa.BRANCH_LENGTH)>>7,a=t&oa.JUMP_TABLE;if(i===0)return a!==0&&n===a?r:-1;if(a){const l=n-a;return l<0||l>=i?-1:e[r+l]-1}let s=r,o=s+i-1;for(;s<=o;){const l=s+o>>>1,c=e[l];if(c<n)s=l+1;else if(c>n)o=l-1;else return e[l+i]}return-1}var me;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(me||(me={}));var Ua;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(Ua||(Ua={}));var Cn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Cn||(Cn={}));var re;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(re||(re={}));var g;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(g||(g={}));const O_=new Map([[re.A,g.A],[re.ADDRESS,g.ADDRESS],[re.ANNOTATION_XML,g.ANNOTATION_XML],[re.APPLET,g.APPLET],[re.AREA,g.AREA],[re.ARTICLE,g.ARTICLE],[re.ASIDE,g.ASIDE],[re.B,g.B],[re.BASE,g.BASE],[re.BASEFONT,g.BASEFONT],[re.BGSOUND,g.BGSOUND],[re.BIG,g.BIG],[re.BLOCKQUOTE,g.BLOCKQUOTE],[re.BODY,g.BODY],[re.BR,g.BR],[re.BUTTON,g.BUTTON],[re.CAPTION,g.CAPTION],[re.CENTER,g.CENTER],[re.CODE,g.CODE],[re.COL,g.COL],[re.COLGROUP,g.COLGROUP],[re.DD,g.DD],[re.DESC,g.DESC],[re.DETAILS,g.DETAILS],[re.DIALOG,g.DIALOG],[re.DIR,g.DIR],[re.DIV,g.DIV],[re.DL,g.DL],[re.DT,g.DT],[re.EM,g.EM],[re.EMBED,g.EMBED],[re.FIELDSET,g.FIELDSET],[re.FIGCAPTION,g.FIGCAPTION],[re.FIGURE,g.FIGURE],[re.FONT,g.FONT],[re.FOOTER,g.FOOTER],[re.FOREIGN_OBJECT,g.FOREIGN_OBJECT],[re.FORM,g.FORM],[re.FRAME,g.FRAME],[re.FRAMESET,g.FRAMESET],[re.H1,g.H1],[re.H2,g.H2],[re.H3,g.H3],[re.H4,g.H4],[re.H5,g.H5],[re.H6,g.H6],[re.HEAD,g.HEAD],[re.HEADER,g.HEADER],[re.HGROUP,g.HGROUP],[re.HR,g.HR],[re.HTML,g.HTML],[re.I,g.I],[re.IMG,g.IMG],[re.IMAGE,g.IMAGE],[re.INPUT,g.INPUT],[re.IFRAME,g.IFRAME],[re.KEYGEN,g.KEYGEN],[re.LABEL,g.LABEL],[re.LI,g.LI],[re.LINK,g.LINK],[re.LISTING,g.LISTING],[re.MAIN,g.MAIN],[re.MALIGNMARK,g.MALIGNMARK],[re.MARQUEE,g.MARQUEE],[re.MATH,g.MATH],[re.MENU,g.MENU],[re.META,g.META],[re.MGLYPH,g.MGLYPH],[re.MI,g.MI],[re.MO,g.MO],[re.MN,g.MN],[re.MS,g.MS],[re.MTEXT,g.MTEXT],[re.NAV,g.NAV],[re.NOBR,g.NOBR],[re.NOFRAMES,g.NOFRAMES],[re.NOEMBED,g.NOEMBED],[re.NOSCRIPT,g.NOSCRIPT],[re.OBJECT,g.OBJECT],[re.OL,g.OL],[re.OPTGROUP,g.OPTGROUP],[re.OPTION,g.OPTION],[re.P,g.P],[re.PARAM,g.PARAM],[re.PLAINTEXT,g.PLAINTEXT],[re.PRE,g.PRE],[re.RB,g.RB],[re.RP,g.RP],[re.RT,g.RT],[re.RTC,g.RTC],[re.RUBY,g.RUBY],[re.S,g.S],[re.SCRIPT,g.SCRIPT],[re.SEARCH,g.SEARCH],[re.SECTION,g.SECTION],[re.SELECT,g.SELECT],[re.SOURCE,g.SOURCE],[re.SMALL,g.SMALL],[re.SPAN,g.SPAN],[re.STRIKE,g.STRIKE],[re.STRONG,g.STRONG],[re.STYLE,g.STYLE],[re.SUB,g.SUB],[re.SUMMARY,g.SUMMARY],[re.SUP,g.SUP],[re.TABLE,g.TABLE],[re.TBODY,g.TBODY],[re.TEMPLATE,g.TEMPLATE],[re.TEXTAREA,g.TEXTAREA],[re.TFOOT,g.TFOOT],[re.TD,g.TD],[re.TH,g.TH],[re.THEAD,g.THEAD],[re.TITLE,g.TITLE],[re.TR,g.TR],[re.TRACK,g.TRACK],[re.TT,g.TT],[re.U,g.U],[re.UL,g.UL],[re.SVG,g.SVG],[re.VAR,g.VAR],[re.WBR,g.WBR],[re.XMP,g.XMP]]);function po(e){var t;return(t=O_.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const be=g,P_={[me.HTML]:new Set([be.ADDRESS,be.APPLET,be.AREA,be.ARTICLE,be.ASIDE,be.BASE,be.BASEFONT,be.BGSOUND,be.BLOCKQUOTE,be.BODY,be.BR,be.BUTTON,be.CAPTION,be.CENTER,be.COL,be.COLGROUP,be.DD,be.DETAILS,be.DIR,be.DIV,be.DL,be.DT,be.EMBED,be.FIELDSET,be.FIGCAPTION,be.FIGURE,be.FOOTER,be.FORM,be.FRAME,be.FRAMESET,be.H1,be.H2,be.H3,be.H4,be.H5,be.H6,be.HEAD,be.HEADER,be.HGROUP,be.HR,be.HTML,be.IFRAME,be.IMG,be.INPUT,be.LI,be.LINK,be.LISTING,be.MAIN,be.MARQUEE,be.MENU,be.META,be.NAV,be.NOEMBED,be.NOFRAMES,be.NOSCRIPT,be.OBJECT,be.OL,be.P,be.PARAM,be.PLAINTEXT,be.PRE,be.SCRIPT,be.SECTION,be.SELECT,be.SOURCE,be.STYLE,be.SUMMARY,be.TABLE,be.TBODY,be.TD,be.TEMPLATE,be.TEXTAREA,be.TFOOT,be.TH,be.THEAD,be.TITLE,be.TR,be.TRACK,be.UL,be.WBR,be.XMP]),[me.MATHML]:new Set([be.MI,be.MO,be.MN,be.MS,be.MTEXT,be.ANNOTATION_XML]),[me.SVG]:new Set([be.TITLE,be.FOREIGN_OBJECT,be.DESC]),[me.XLINK]:new Set,[me.XML]:new Set,[me.XMLNS]:new Set},Tf=new Set([be.H1,be.H2,be.H3,be.H4,be.H5,be.H6]);re.STYLE,re.SCRIPT,re.XMP,re.IFRAME,re.NOEMBED,re.NOFRAMES,re.PLAINTEXT;var O;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(O||(O={}));const Kt={DATA:O.DATA,RCDATA:O.RCDATA,RAWTEXT:O.RAWTEXT,SCRIPT_DATA:O.SCRIPT_DATA,PLAINTEXT:O.PLAINTEXT,CDATA_SECTION:O.CDATA_SECTION};function F_(e){return e>=B.DIGIT_0&&e<=B.DIGIT_9}function nl(e){return e>=B.LATIN_CAPITAL_A&&e<=B.LATIN_CAPITAL_Z}function $_(e){return e>=B.LATIN_SMALL_A&&e<=B.LATIN_SMALL_Z}function ra(e){return $_(e)||nl(e)}function i2(e){return ra(e)||F_(e)}function Mc(e){return e+32}function H4(e){return e===B.SPACE||e===B.LINE_FEED||e===B.TABULATION||e===B.FORM_FEED}function a2(e){return H4(e)||e===B.SOLIDUS||e===B.GREATER_THAN_SIGN}function z_(e){return e===B.NULL?se.nullCharacterReference:e>1114111?se.characterReferenceOutsideUnicodeRange:P4(e)?se.surrogateCharacterReference:$4(e)?se.noncharacterCharacterReference:F4(e)||e===B.CARRIAGE_RETURN?se.controlCharacterReference:null}class H_{constructor(t,r){this.options=t,this.handler=r,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=O.DATA,this.returnState=O.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new E_(r),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new B_(__,(n,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(n)},r.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(se.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:n=>{this._err(se.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+n)},validateNumericCharacterReference:n=>{const i=z_(n);i&&this._err(i,1)}}:void 0)}_err(t,r=0){var n,i;(i=(n=this.handler).onParseError)===null||i===void 0||i.call(n,this.preprocessor.getError(t,r))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,r,n){this.active=!0,this.preprocessor.write(t,r),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let r=0;r<t;r++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,r){return this.preprocessor.startsWith(t,r)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:vt.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:vt.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:vt.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:vt.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,r){this.currentCharacterToken={type:t,chars:r,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,r;const n=this.currentToken;if(z4(n,this.currentAttr.name)===null){if(n.attrs.push(this.currentAttr),n.location&&this.currentLocation){const i=(t=(r=n.location).attrs)!==null&&t!==void 0?t:r.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(se.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=po(t.tagName),t.type===vt.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(se.endTagWithAttributes),t.selfClosing&&this._err(se.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case vt.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case vt.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case vt.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:vt.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,r){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=r;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,r)}_emitCodePoint(t){const r=H4(t)?vt.WHITESPACE_CHARACTER:t===B.NULL?vt.NULL_CHARACTER:vt.CHARACTER;this._appendCharToCurrentCharacterToken(r,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(vt.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=O.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Ii.Attribute:Ii.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===O.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===O.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===O.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case O.DATA:{this._stateData(t);break}case O.RCDATA:{this._stateRcdata(t);break}case O.RAWTEXT:{this._stateRawtext(t);break}case O.SCRIPT_DATA:{this._stateScriptData(t);break}case O.PLAINTEXT:{this._statePlaintext(t);break}case O.TAG_OPEN:{this._stateTagOpen(t);break}case O.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case O.TAG_NAME:{this._stateTagName(t);break}case O.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case O.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case O.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case O.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case O.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case O.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case O.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case O.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case O.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case O.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case O.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case O.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case O.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case O.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case O.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case O.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case O.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case O.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case O.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case O.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case O.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case O.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case O.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case O.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case O.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case O.BOGUS_COMMENT:{this._stateBogusComment(t);break}case O.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case O.COMMENT_START:{this._stateCommentStart(t);break}case O.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case O.COMMENT:{this._stateComment(t);break}case O.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case O.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case O.COMMENT_END:{this._stateCommentEnd(t);break}case O.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case O.DOCTYPE:{this._stateDoctype(t);break}case O.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case O.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case O.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case O.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case O.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case O.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case O.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case O.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case O.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case O.CDATA_SECTION:{this._stateCdataSection(t);break}case O.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case O.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case O.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case O.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case B.LESS_THAN_SIGN:{this.state=O.TAG_OPEN;break}case B.AMPERSAND:{this._startCharacterReference();break}case B.NULL:{this._err(se.unexpectedNullCharacter),this._emitCodePoint(t);break}case B.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case B.AMPERSAND:{this._startCharacterReference();break}case B.LESS_THAN_SIGN:{this.state=O.RCDATA_LESS_THAN_SIGN;break}case B.NULL:{this._err(se.unexpectedNullCharacter),this._emitChars(jt);break}case B.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case B.LESS_THAN_SIGN:{this.state=O.RAWTEXT_LESS_THAN_SIGN;break}case B.NULL:{this._err(se.unexpectedNullCharacter),this._emitChars(jt);break}case B.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case B.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_LESS_THAN_SIGN;break}case B.NULL:{this._err(se.unexpectedNullCharacter),this._emitChars(jt);break}case B.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case B.NULL:{this._err(se.unexpectedNullCharacter),this._emitChars(jt);break}case B.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(ra(t))this._createStartTagToken(),this.state=O.TAG_NAME,this._stateTagName(t);else switch(t){case B.EXCLAMATION_MARK:{this.state=O.MARKUP_DECLARATION_OPEN;break}case B.SOLIDUS:{this.state=O.END_TAG_OPEN;break}case B.QUESTION_MARK:{this._err(se.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=O.BOGUS_COMMENT,this._stateBogusComment(t);break}case B.EOF:{this._err(se.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(se.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=O.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(ra(t))this._createEndTagToken(),this.state=O.TAG_NAME,this._stateTagName(t);else switch(t){case B.GREATER_THAN_SIGN:{this._err(se.missingEndTagName),this.state=O.DATA;break}case B.EOF:{this._err(se.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(se.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=O.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const r=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this.state=O.BEFORE_ATTRIBUTE_NAME;break}case B.SOLIDUS:{this.state=O.SELF_CLOSING_START_TAG;break}case B.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentTagToken();break}case B.NULL:{this._err(se.unexpectedNullCharacter),r.tagName+=jt;break}case B.EOF:{this._err(se.eofInTag),this._emitEOFToken();break}default:r.tagName+=String.fromCodePoint(nl(t)?Mc(t):t)}}_stateRcdataLessThanSign(t){t===B.SOLIDUS?this.state=O.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=O.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){ra(t)?(this.state=O.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=O.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const r=this.currentToken;switch(r.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=O.BEFORE_ATTRIBUTE_NAME,!1;case B.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=O.SELF_CLOSING_START_TAG,!1;case B.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=O.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===B.SOLIDUS?this.state=O.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){ra(t)?(this.state=O.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case B.SOLIDUS:{this.state=O.SCRIPT_DATA_END_TAG_OPEN;break}case B.EXCLAMATION_MARK:{this.state=O.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=O.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){ra(t)?(this.state=O.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===B.HYPHEN_MINUS?(this.state=O.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===B.HYPHEN_MINUS?(this.state=O.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case B.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case B.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case B.NULL:{this._err(se.unexpectedNullCharacter),this._emitChars(jt);break}case B.EOF:{this._err(se.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case B.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case B.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case B.NULL:{this._err(se.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_ESCAPED,this._emitChars(jt);break}case B.EOF:{this._err(se.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case B.HYPHEN_MINUS:{this._emitChars("-");break}case B.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case B.GREATER_THAN_SIGN:{this.state=O.SCRIPT_DATA,this._emitChars(">");break}case B.NULL:{this._err(se.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_ESCAPED,this._emitChars(jt);break}case B.EOF:{this._err(se.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===B.SOLIDUS?this.state=O.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:ra(t)?(this._emitChars("<"),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){ra(t)?(this.state=O.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Qr.SCRIPT,!1)&&a2(this.preprocessor.peek(Qr.SCRIPT.length))){this._emitCodePoint(t);for(let r=0;r<Qr.SCRIPT.length;r++)this._emitCodePoint(this._consume());this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case B.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case B.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case B.NULL:{this._err(se.unexpectedNullCharacter),this._emitChars(jt);break}case B.EOF:{this._err(se.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case B.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case B.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case B.NULL:{this._err(se.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(jt);break}case B.EOF:{this._err(se.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case B.HYPHEN_MINUS:{this._emitChars("-");break}case B.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case B.GREATER_THAN_SIGN:{this.state=O.SCRIPT_DATA,this._emitChars(">");break}case B.NULL:{this._err(se.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(jt);break}case B.EOF:{this._err(se.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===B.SOLIDUS?(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Qr.SCRIPT,!1)&&a2(this.preprocessor.peek(Qr.SCRIPT.length))){this._emitCodePoint(t);for(let r=0;r<Qr.SCRIPT.length;r++)this._emitCodePoint(this._consume());this.state=O.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.SOLIDUS:case B.GREATER_THAN_SIGN:case B.EOF:{this.state=O.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case B.EQUALS_SIGN:{this._err(se.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=O.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=O.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:case B.SOLIDUS:case B.GREATER_THAN_SIGN:case B.EOF:{this._leaveAttrName(),this.state=O.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case B.EQUALS_SIGN:{this._leaveAttrName(),this.state=O.BEFORE_ATTRIBUTE_VALUE;break}case B.QUOTATION_MARK:case B.APOSTROPHE:case B.LESS_THAN_SIGN:{this._err(se.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case B.NULL:{this._err(se.unexpectedNullCharacter),this.currentAttr.name+=jt;break}default:this.currentAttr.name+=String.fromCodePoint(nl(t)?Mc(t):t)}}_stateAfterAttributeName(t){switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.SOLIDUS:{this.state=O.SELF_CLOSING_START_TAG;break}case B.EQUALS_SIGN:{this.state=O.BEFORE_ATTRIBUTE_VALUE;break}case B.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentTagToken();break}case B.EOF:{this._err(se.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=O.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.QUOTATION_MARK:{this.state=O.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case B.APOSTROPHE:{this.state=O.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case B.GREATER_THAN_SIGN:{this._err(se.missingAttributeValue),this.state=O.DATA,this.emitCurrentTagToken();break}default:this.state=O.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case B.QUOTATION_MARK:{this.state=O.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case B.AMPERSAND:{this._startCharacterReference();break}case B.NULL:{this._err(se.unexpectedNullCharacter),this.currentAttr.value+=jt;break}case B.EOF:{this._err(se.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case B.APOSTROPHE:{this.state=O.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case B.AMPERSAND:{this._startCharacterReference();break}case B.NULL:{this._err(se.unexpectedNullCharacter),this.currentAttr.value+=jt;break}case B.EOF:{this._err(se.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this._leaveAttrValue(),this.state=O.BEFORE_ATTRIBUTE_NAME;break}case B.AMPERSAND:{this._startCharacterReference();break}case B.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=O.DATA,this.emitCurrentTagToken();break}case B.NULL:{this._err(se.unexpectedNullCharacter),this.currentAttr.value+=jt;break}case B.QUOTATION_MARK:case B.APOSTROPHE:case B.LESS_THAN_SIGN:case B.EQUALS_SIGN:case B.GRAVE_ACCENT:{this._err(se.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case B.EOF:{this._err(se.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this._leaveAttrValue(),this.state=O.BEFORE_ATTRIBUTE_NAME;break}case B.SOLIDUS:{this._leaveAttrValue(),this.state=O.SELF_CLOSING_START_TAG;break}case B.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=O.DATA,this.emitCurrentTagToken();break}case B.EOF:{this._err(se.eofInTag),this._emitEOFToken();break}default:this._err(se.missingWhitespaceBetweenAttributes),this.state=O.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case B.GREATER_THAN_SIGN:{const r=this.currentToken;r.selfClosing=!0,this.state=O.DATA,this.emitCurrentTagToken();break}case B.EOF:{this._err(se.eofInTag),this._emitEOFToken();break}default:this._err(se.unexpectedSolidusInTag),this.state=O.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const r=this.currentToken;switch(t){case B.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentComment(r);break}case B.EOF:{this.emitCurrentComment(r),this._emitEOFToken();break}case B.NULL:{this._err(se.unexpectedNullCharacter),r.data+=jt;break}default:r.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Qr.DASH_DASH,!0)?(this._createCommentToken(Qr.DASH_DASH.length+1),this.state=O.COMMENT_START):this._consumeSequenceIfMatch(Qr.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Qr.DOCTYPE.length+1),this.state=O.DOCTYPE):this._consumeSequenceIfMatch(Qr.CDATA_START,!0)?this.inForeignNode?this.state=O.CDATA_SECTION:(this._err(se.cdataInHtmlContent),this._createCommentToken(Qr.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=O.BOGUS_COMMENT):this._ensureHibernation()||(this._err(se.incorrectlyOpenedComment),this._createCommentToken(2),this.state=O.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case B.HYPHEN_MINUS:{this.state=O.COMMENT_START_DASH;break}case B.GREATER_THAN_SIGN:{this._err(se.abruptClosingOfEmptyComment),this.state=O.DATA;const r=this.currentToken;this.emitCurrentComment(r);break}default:this.state=O.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const r=this.currentToken;switch(t){case B.HYPHEN_MINUS:{this.state=O.COMMENT_END;break}case B.GREATER_THAN_SIGN:{this._err(se.abruptClosingOfEmptyComment),this.state=O.DATA,this.emitCurrentComment(r);break}case B.EOF:{this._err(se.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="-",this.state=O.COMMENT,this._stateComment(t)}}_stateComment(t){const r=this.currentToken;switch(t){case B.HYPHEN_MINUS:{this.state=O.COMMENT_END_DASH;break}case B.LESS_THAN_SIGN:{r.data+="<",this.state=O.COMMENT_LESS_THAN_SIGN;break}case B.NULL:{this._err(se.unexpectedNullCharacter),r.data+=jt;break}case B.EOF:{this._err(se.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const r=this.currentToken;switch(t){case B.EXCLAMATION_MARK:{r.data+="!",this.state=O.COMMENT_LESS_THAN_SIGN_BANG;break}case B.LESS_THAN_SIGN:{r.data+="<";break}default:this.state=O.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===B.HYPHEN_MINUS?this.state=O.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=O.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===B.HYPHEN_MINUS?this.state=O.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=O.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==B.GREATER_THAN_SIGN&&t!==B.EOF&&this._err(se.nestedComment),this.state=O.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const r=this.currentToken;switch(t){case B.HYPHEN_MINUS:{this.state=O.COMMENT_END;break}case B.EOF:{this._err(se.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="-",this.state=O.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const r=this.currentToken;switch(t){case B.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentComment(r);break}case B.EXCLAMATION_MARK:{this.state=O.COMMENT_END_BANG;break}case B.HYPHEN_MINUS:{r.data+="-";break}case B.EOF:{this._err(se.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="--",this.state=O.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const r=this.currentToken;switch(t){case B.HYPHEN_MINUS:{r.data+="--!",this.state=O.COMMENT_END_DASH;break}case B.GREATER_THAN_SIGN:{this._err(se.incorrectlyClosedComment),this.state=O.DATA,this.emitCurrentComment(r);break}case B.EOF:{this._err(se.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="--!",this.state=O.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this.state=O.BEFORE_DOCTYPE_NAME;break}case B.GREATER_THAN_SIGN:{this.state=O.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case B.EOF:{this._err(se.eofInDoctype),this._createDoctypeToken(null);const r=this.currentToken;r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(se.missingWhitespaceBeforeDoctypeName),this.state=O.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(nl(t))this._createDoctypeToken(String.fromCharCode(Mc(t))),this.state=O.DOCTYPE_NAME;else switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.NULL:{this._err(se.unexpectedNullCharacter),this._createDoctypeToken(jt),this.state=O.DOCTYPE_NAME;break}case B.GREATER_THAN_SIGN:{this._err(se.missingDoctypeName),this._createDoctypeToken(null);const r=this.currentToken;r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=O.DATA;break}case B.EOF:{this._err(se.eofInDoctype),this._createDoctypeToken(null);const r=this.currentToken;r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=O.DOCTYPE_NAME}}_stateDoctypeName(t){const r=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this.state=O.AFTER_DOCTYPE_NAME;break}case B.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(r);break}case B.NULL:{this._err(se.unexpectedNullCharacter),r.name+=jt;break}case B.EOF:{this._err(se.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.name+=String.fromCodePoint(nl(t)?Mc(t):t)}}_stateAfterDoctypeName(t){const r=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(r);break}case B.EOF:{this._err(se.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Qr.PUBLIC,!1)?this.state=O.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Qr.SYSTEM,!1)?this.state=O.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(se.invalidCharacterSequenceAfterDoctypeName),r.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const r=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this.state=O.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case B.QUOTATION_MARK:{this._err(se.missingWhitespaceAfterDoctypePublicKeyword),r.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case B.APOSTROPHE:{this._err(se.missingWhitespaceAfterDoctypePublicKeyword),r.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case B.GREATER_THAN_SIGN:{this._err(se.missingDoctypePublicIdentifier),r.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(r);break}case B.EOF:{this._err(se.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(se.missingQuoteBeforeDoctypePublicIdentifier),r.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const r=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.QUOTATION_MARK:{r.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case B.APOSTROPHE:{r.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case B.GREATER_THAN_SIGN:{this._err(se.missingDoctypePublicIdentifier),r.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(r);break}case B.EOF:{this._err(se.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(se.missingQuoteBeforeDoctypePublicIdentifier),r.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const r=this.currentToken;switch(t){case B.QUOTATION_MARK:{this.state=O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case B.NULL:{this._err(se.unexpectedNullCharacter),r.publicId+=jt;break}case B.GREATER_THAN_SIGN:{this._err(se.abruptDoctypePublicIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=O.DATA;break}case B.EOF:{this._err(se.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const r=this.currentToken;switch(t){case B.APOSTROPHE:{this.state=O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case B.NULL:{this._err(se.unexpectedNullCharacter),r.publicId+=jt;break}case B.GREATER_THAN_SIGN:{this._err(se.abruptDoctypePublicIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=O.DATA;break}case B.EOF:{this._err(se.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const r=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this.state=O.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case B.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(r);break}case B.QUOTATION_MARK:{this._err(se.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),r.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case B.APOSTROPHE:{this._err(se.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),r.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case B.EOF:{this._err(se.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(se.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const r=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.GREATER_THAN_SIGN:{this.emitCurrentDoctype(r),this.state=O.DATA;break}case B.QUOTATION_MARK:{r.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case B.APOSTROPHE:{r.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case B.EOF:{this._err(se.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(se.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const r=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this.state=O.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case B.QUOTATION_MARK:{this._err(se.missingWhitespaceAfterDoctypeSystemKeyword),r.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case B.APOSTROPHE:{this._err(se.missingWhitespaceAfterDoctypeSystemKeyword),r.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case B.GREATER_THAN_SIGN:{this._err(se.missingDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(r);break}case B.EOF:{this._err(se.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(se.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const r=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.QUOTATION_MARK:{r.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case B.APOSTROPHE:{r.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case B.GREATER_THAN_SIGN:{this._err(se.missingDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(r);break}case B.EOF:{this._err(se.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(se.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const r=this.currentToken;switch(t){case B.QUOTATION_MARK:{this.state=O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case B.NULL:{this._err(se.unexpectedNullCharacter),r.systemId+=jt;break}case B.GREATER_THAN_SIGN:{this._err(se.abruptDoctypeSystemIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=O.DATA;break}case B.EOF:{this._err(se.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const r=this.currentToken;switch(t){case B.APOSTROPHE:{this.state=O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case B.NULL:{this._err(se.unexpectedNullCharacter),r.systemId+=jt;break}case B.GREATER_THAN_SIGN:{this._err(se.abruptDoctypeSystemIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=O.DATA;break}case B.EOF:{this._err(se.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const r=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.GREATER_THAN_SIGN:{this.emitCurrentDoctype(r),this.state=O.DATA;break}case B.EOF:{this._err(se.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(se.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const r=this.currentToken;switch(t){case B.GREATER_THAN_SIGN:{this.emitCurrentDoctype(r),this.state=O.DATA;break}case B.NULL:{this._err(se.unexpectedNullCharacter);break}case B.EOF:{this.emitCurrentDoctype(r),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case B.RIGHT_SQUARE_BRACKET:{this.state=O.CDATA_SECTION_BRACKET;break}case B.EOF:{this._err(se.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===B.RIGHT_SQUARE_BRACKET?this.state=O.CDATA_SECTION_END:(this._emitChars("]"),this.state=O.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case B.GREATER_THAN_SIGN:{this.state=O.DATA;break}case B.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=O.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(B.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&i2(this.preprocessor.peek(1))?O.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){i2(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===B.SEMICOLON&&this._err(se.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const q4=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),s2=new Set([...q4,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),Bu=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),q_=new Set([...Bu,g.OL,g.UL]),j_=new Set([...Bu,g.BUTTON]),o2=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),l2=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),U_=new Set([g.TR,g.TEMPLATE,g.HTML]),W_=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),G_=new Set([g.TABLE,g.TEMPLATE,g.HTML]),Y_=new Set([g.TD,g.TH]);class V_{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,r,n){this.treeAdapter=r,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=g.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===g.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===me.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,r){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=r,this.currentTagId=r,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,r,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,r){const n=this._indexOf(t);this.items[n]=r,n===this.stackTop&&(this.current=r)}insertAfter(t,r,n){const i=this._indexOf(t)+1;this.items.splice(i,0,r),this.tagIDs.splice(i,0,n),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(t){let r=this.stackTop+1;do r=this.tagIDs.lastIndexOf(t,r-1);while(r>0&&this.treeAdapter.getNamespaceURI(this.items[r])!==me.HTML);this.shortenToLength(Math.max(r,0))}shortenToLength(t){for(;this.stackTop>=t;){const r=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(r,this.stackTop<t)}}popUntilElementPopped(t){const r=this._indexOf(t);this.shortenToLength(Math.max(r,0))}popUntilPopped(t,r){const n=this._indexOfTagNames(t,r);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Tf,me.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Y_,me.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,r){for(let n=this.stackTop;n>=0;n--)if(t.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===r)return n;return-1}clearBackTo(t,r){const n=this._indexOfTagNames(t,r);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(G_,me.HTML)}clearBackToTableBodyContext(){this.clearBackTo(W_,me.HTML)}clearBackToTableRowContext(){this.clearBackTo(U_,me.HTML)}remove(t){const r=this._indexOf(t);r>=0&&(r===this.stackTop?this.pop():(this.items.splice(r,1),this.tagIDs.splice(r,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===g.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const r=this._indexOf(t)-1;return r>=0?this.items[r]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===g.HTML}hasInDynamicScope(t,r){for(let n=this.stackTop;n>=0;n--){const i=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case me.HTML:{if(i===t)return!0;if(r.has(i))return!1;break}case me.SVG:{if(l2.has(i))return!1;break}case me.MATHML:{if(o2.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Bu)}hasInListItemScope(t){return this.hasInDynamicScope(t,q_)}hasInButtonScope(t){return this.hasInDynamicScope(t,j_)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const r=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case me.HTML:{if(Tf.has(r))return!0;if(Bu.has(r))return!1;break}case me.SVG:{if(l2.has(r))return!1;break}case me.MATHML:{if(o2.has(r))return!1;break}}}return!0}hasInTableScope(t){for(let r=this.stackTop;r>=0;r--)if(this.treeAdapter.getNamespaceURI(this.items[r])===me.HTML)switch(this.tagIDs[r]){case t:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===me.HTML)switch(this.tagIDs[t]){case g.TBODY:case g.THEAD:case g.TFOOT:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasInSelectScope(t){for(let r=this.stackTop;r>=0;r--)if(this.treeAdapter.getNamespaceURI(this.items[r])===me.HTML)switch(this.tagIDs[r]){case t:return!0;case g.OPTION:case g.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&q4.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&s2.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&s2.has(this.currentTagId);)this.pop()}}const ed=3;var ti;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(ti||(ti={}));const c2={type:ti.Marker};class X_{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,r){const n=[],i=r.length,a=this.treeAdapter.getTagName(t),s=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const l=this.entries[o];if(l.type===ti.Marker)break;const{element:c}=l;if(this.treeAdapter.getTagName(c)===a&&this.treeAdapter.getNamespaceURI(c)===s){const u=this.treeAdapter.getAttrList(c);u.length===i&&n.push({idx:o,attrs:u})}}return n}_ensureNoahArkCondition(t){if(this.entries.length<ed)return;const r=this.treeAdapter.getAttrList(t),n=this._getNoahArkConditionCandidates(t,r);if(n.length<ed)return;const i=new Map(r.map(s=>[s.name,s.value]));let a=0;for(let s=0;s<n.length;s++){const o=n[s];o.attrs.every(l=>i.get(l.name)===l.value)&&(a+=1,a>=ed&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(c2)}pushElement(t,r){this._ensureNoahArkCondition(t),this.entries.unshift({type:ti.Element,element:t,token:r})}insertElementAfterBookmark(t,r){const n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:ti.Element,element:t,token:r})}removeEntry(t){const r=this.entries.indexOf(t);r!==-1&&this.entries.splice(r,1)}clearToLastMarker(){const t=this.entries.indexOf(c2);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const r=this.entries.find(n=>n.type===ti.Marker||this.treeAdapter.getTagName(n.element)===t);return r&&r.type===ti.Element?r:null}getElementEntry(t){return this.entries.find(r=>r.type===ti.Element&&r.element===t)}}const na={createDocument(){return{nodeName:"#document",mode:Cn.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,r){return{nodeName:e,tagName:e,attrs:r,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,r){const n=e.childNodes.indexOf(r);e.childNodes.splice(n,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,r,n){const i=e.childNodes.find(a=>a.nodeName==="#documentType");if(i)i.name=t,i.publicId=r,i.systemId=n;else{const a={nodeName:"#documentType",name:t,publicId:r,systemId:n,parentNode:null};na.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const r=e.childNodes[e.childNodes.length-1];if(na.isTextNode(r)){r.value+=t;return}}na.appendChild(e,na.createTextNode(t))},insertTextBefore(e,t,r){const n=e.childNodes[e.childNodes.indexOf(r)-1];n&&na.isTextNode(n)?n.value+=t:na.insertBefore(e,na.createTextNode(t),r)},adoptAttributes(e,t){const r=new Set(e.attrs.map(n=>n.name));for(let n=0;n<t.length;n++)r.has(t[n].name)||e.attrs.push(t[n])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},j4="html",K_="about:legacy-compat",Q_="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",U4=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],Z_=[...U4,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],J_=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),W4=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],e9=[...W4,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function u2(e,t){return t.some(r=>e.startsWith(r))}function t9(e){return e.name===j4&&e.publicId===null&&(e.systemId===null||e.systemId===K_)}function r9(e){if(e.name!==j4)return Cn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===Q_)return Cn.QUIRKS;let{publicId:r}=e;if(r!==null){if(r=r.toLowerCase(),J_.has(r))return Cn.QUIRKS;let n=t===null?Z_:U4;if(u2(r,n))return Cn.QUIRKS;if(n=t===null?W4:e9,u2(r,n))return Cn.LIMITED_QUIRKS}return Cn.NO_QUIRKS}const h2={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},n9="definitionurl",i9="definitionURL",a9=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),s9=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:me.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:me.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:me.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:me.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:me.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:me.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:me.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:me.XML}],["xml:space",{prefix:"xml",name:"space",namespace:me.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:me.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:me.XMLNS}]]),o9=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),l9=new Set([g.B,g.BIG,g.BLOCKQUOTE,g.BODY,g.BR,g.CENTER,g.CODE,g.DD,g.DIV,g.DL,g.DT,g.EM,g.EMBED,g.H1,g.H2,g.H3,g.H4,g.H5,g.H6,g.HEAD,g.HR,g.I,g.IMG,g.LI,g.LISTING,g.MENU,g.META,g.NOBR,g.OL,g.P,g.PRE,g.RUBY,g.S,g.SMALL,g.SPAN,g.STRONG,g.STRIKE,g.SUB,g.SUP,g.TABLE,g.TT,g.U,g.UL,g.VAR]);function c9(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:n})=>n===Ua.COLOR||n===Ua.SIZE||n===Ua.FACE)||l9.has(t)}function G4(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===n9){e.attrs[t].name=i9;break}}function Y4(e){for(let t=0;t<e.attrs.length;t++){const r=a9.get(e.attrs[t].name);r!=null&&(e.attrs[t].name=r)}}function wm(e){for(let t=0;t<e.attrs.length;t++){const r=s9.get(e.attrs[t].name);r&&(e.attrs[t].prefix=r.prefix,e.attrs[t].name=r.name,e.attrs[t].namespace=r.namespace)}}function u9(e){const t=o9.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=po(e.tagName))}function h9(e,t){return t===me.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function d9(e,t,r){if(t===me.MATHML&&e===g.ANNOTATION_XML){for(let n=0;n<r.length;n++)if(r[n].name===Ua.ENCODING){const i=r[n].value.toLowerCase();return i===h2.TEXT_HTML||i===h2.APPLICATION_XML}}return t===me.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function f9(e,t,r,n){return(!n||n===me.HTML)&&d9(e,t,r)||(!n||n===me.MATHML)&&h9(e,t)}const p9="hidden",m9=8,g9=3;var U;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(U||(U={}));const b9={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},V4=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),d2={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:na,onParseError:null};let f2=class{constructor(t,r,n=null,i=null){this.fragmentContext=n,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=U.INITIAL,this.originalInsertionMode=U.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...d2,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=r??this.treeAdapter.createDocument(),this.tokenizer=new H_(this.options,this),this.activeFormattingElements=new X_(this.treeAdapter),this.fragmentContextID=n?po(this.treeAdapter.getTagName(n)):g.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new V_(this.document,this.treeAdapter,this)}static parse(t,r){const n=new this(r);return n.tokenizer.write(t,!0),n.document}static getFragmentParser(t,r){const n={...d2,...r};t??(t=n.treeAdapter.createElement(re.TEMPLATE,me.HTML,[]));const i=n.treeAdapter.createElement("documentmock",me.HTML,[]),a=new this(n,i,t);return a.fragmentContextID===g.TEMPLATE&&a.tmplInsertionModeStack.unshift(U.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),r=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,r),r}_err(t,r,n){var i;if(!this.onParseError)return;const a=(i=t.location)!==null&&i!==void 0?i:b9,s={code:r,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:n?a.startLine:a.endLine,endCol:n?a.startCol:a.endCol,endOffset:n?a.startOffset:a.endOffset};this.onParseError(s)}onItemPush(t,r,n){var i,a;(a=(i=this.treeAdapter).onItemPush)===null||a===void 0||a.call(i,t),n&&this.openElements.stackTop>0&&this._setContextModes(t,r)}onItemPop(t,r){var n,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(n=this.treeAdapter).onItemPop)===null||i===void 0||i.call(n,t,this.openElements.current),r){let a,s;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,s=this.fragmentContextID):{current:a,currentTagId:s}=this.openElements,this._setContextModes(a,s)}}_setContextModes(t,r){const n=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===me.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&t!==void 0&&r!==void 0&&!this._isIntegrationPoint(r,t)}_switchToTextParsing(t,r){this._insertElement(t,me.HTML),this.tokenizer.state=r,this.originalInsertionMode=this.insertionMode,this.insertionMode=U.TEXT}switchToPlaintextParsing(){this.insertionMode=U.TEXT,this.originalInsertionMode=U.IN_BODY,this.tokenizer.state=Kt.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===re.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==me.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=Kt.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=Kt.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=Kt.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=Kt.PLAINTEXT;break}}}_setDocumentType(t){const r=t.name||"",n=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,r,n,i),t.location){const s=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));s&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}}_attachElementToTree(t,r){if(this.options.sourceCodeLocationInfo){const n=r&&{...r,startTag:r};this.treeAdapter.setNodeSourceCodeLocation(t,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const n=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(n??this.document,t)}}_appendElement(t,r){const n=this.treeAdapter.createElement(t.tagName,r,t.attrs);this._attachElementToTree(n,t.location)}_insertElement(t,r){const n=this.treeAdapter.createElement(t.tagName,r,t.attrs);this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID)}_insertFakeElement(t,r){const n=this.treeAdapter.createElement(t,me.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,r)}_insertTemplate(t){const r=this.treeAdapter.createElement(t.tagName,me.HTML,t.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(r,n),this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(re.HTML,me.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,g.HTML)}_appendCommentNode(t,r){const n=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(r,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,t.location)}_insertCharacters(t){let r,n;if(this._shouldFosterParentOnInsertion()?({parent:r,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(r,t.chars,n):this.treeAdapter.insertText(r,t.chars)):(r=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(r,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(r),a=n?i.lastIndexOf(n):i.length,s=i[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:l,endCol:c,endOffset:u}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:l,endCol:c,endOffset:u})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}_adoptNodes(t,r){for(let n=this.treeAdapter.getFirstChild(t);n;n=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(r,n)}_setEndLocation(t,r){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&r.location){const n=r.location,i=this.treeAdapter.getTagName(t),a=r.type===vt.END_TAG&&i===r.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let r,n;return this.openElements.stackTop===0&&this.fragmentContext?(r=this.fragmentContext,n=this.fragmentContextID):{current:r,currentTagId:n}=this.openElements,t.tagID===g.SVG&&this.treeAdapter.getTagName(r)===re.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(r)===me.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,r,me.HTML)}_processToken(t){switch(t.type){case vt.CHARACTER:{this.onCharacter(t);break}case vt.NULL_CHARACTER:{this.onNullCharacter(t);break}case vt.COMMENT:{this.onComment(t);break}case vt.DOCTYPE:{this.onDoctype(t);break}case vt.START_TAG:{this._processStartTag(t);break}case vt.END_TAG:{this.onEndTag(t);break}case vt.EOF:{this.onEof(t);break}case vt.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,r,n){const i=this.treeAdapter.getNamespaceURI(r),a=this.treeAdapter.getAttrList(r);return f9(t,i,a,n)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const r=this.activeFormattingElements.entries.findIndex(i=>i.type===ti.Marker||this.openElements.contains(i.element)),n=r===-1?t-1:r-1;for(let i=n;i>=0;i--){const a=this.activeFormattingElements.entries[i];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=U.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(g.P),this.openElements.popUntilTagNamePopped(g.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case g.TR:{this.insertionMode=U.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=U.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=U.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=U.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=U.IN_TABLE;return}case g.BODY:{this.insertionMode=U.IN_BODY;return}case g.FRAMESET:{this.insertionMode=U.IN_FRAMESET;return}case g.SELECT:{this._resetInsertionModeForSelect(t);return}case g.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case g.HTML:{this.insertionMode=this.headElement?U.AFTER_HEAD:U.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=U.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=U.IN_HEAD;return}break}}this.insertionMode=U.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let r=t-1;r>0;r--){const n=this.openElements.tagIDs[r];if(n===g.TEMPLATE)break;if(n===g.TABLE){this.insertionMode=U.IN_SELECT_IN_TABLE;return}}this.insertionMode=U.IN_SELECT}_isElementCausesFosterParenting(t){return V4.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const r=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case g.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(r)===me.HTML)return{parent:this.treeAdapter.getTemplateContent(r),beforeElement:null};break}case g.TABLE:{const n=this.treeAdapter.getParentNode(r);return n?{parent:n,beforeElement:r}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const r=this._findFosterParentingLocation();r.beforeElement?this.treeAdapter.insertBefore(r.parent,t,r.beforeElement):this.treeAdapter.appendChild(r.parent,t)}_isSpecialElement(t,r){const n=this.treeAdapter.getNamespaceURI(t);return P_[n].has(r)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){YA(this,t);return}switch(this.insertionMode){case U.INITIAL:{Ro(this,t);break}case U.BEFORE_HTML:{yl(this,t);break}case U.BEFORE_HEAD:{xl(this,t);break}case U.IN_HEAD:{vl(this,t);break}case U.IN_HEAD_NO_SCRIPT:{kl(this,t);break}case U.AFTER_HEAD:{wl(this,t);break}case U.IN_BODY:case U.IN_CAPTION:case U.IN_CELL:case U.IN_TEMPLATE:{K4(this,t);break}case U.TEXT:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case U.IN_TABLE:case U.IN_TABLE_BODY:case U.IN_ROW:{td(this,t);break}case U.IN_TABLE_TEXT:{r3(this,t);break}case U.IN_COLUMN_GROUP:{Du(this,t);break}case U.AFTER_BODY:{Ou(this,t);break}case U.AFTER_AFTER_BODY:{fu(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){GA(this,t);return}switch(this.insertionMode){case U.INITIAL:{Ro(this,t);break}case U.BEFORE_HTML:{yl(this,t);break}case U.BEFORE_HEAD:{xl(this,t);break}case U.IN_HEAD:{vl(this,t);break}case U.IN_HEAD_NO_SCRIPT:{kl(this,t);break}case U.AFTER_HEAD:{wl(this,t);break}case U.TEXT:{this._insertCharacters(t);break}case U.IN_TABLE:case U.IN_TABLE_BODY:case U.IN_ROW:{td(this,t);break}case U.IN_COLUMN_GROUP:{Du(this,t);break}case U.AFTER_BODY:{Ou(this,t);break}case U.AFTER_AFTER_BODY:{fu(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Cf(this,t);return}switch(this.insertionMode){case U.INITIAL:case U.BEFORE_HTML:case U.BEFORE_HEAD:case U.IN_HEAD:case U.IN_HEAD_NO_SCRIPT:case U.AFTER_HEAD:case U.IN_BODY:case U.IN_TABLE:case U.IN_CAPTION:case U.IN_COLUMN_GROUP:case U.IN_TABLE_BODY:case U.IN_ROW:case U.IN_CELL:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:case U.IN_TEMPLATE:case U.IN_FRAMESET:case U.AFTER_FRAMESET:{Cf(this,t);break}case U.IN_TABLE_TEXT:{Bo(this,t);break}case U.AFTER_BODY:{C9(this,t);break}case U.AFTER_AFTER_BODY:case U.AFTER_AFTER_FRAMESET:{S9(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case U.INITIAL:{E9(this,t);break}case U.BEFORE_HEAD:case U.IN_HEAD:case U.IN_HEAD_NO_SCRIPT:case U.AFTER_HEAD:{this._err(t,se.misplacedDoctype);break}case U.IN_TABLE_TEXT:{Bo(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,se.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?VA(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case U.INITIAL:{Ro(this,t);break}case U.BEFORE_HTML:{_9(this,t);break}case U.BEFORE_HEAD:{N9(this,t);break}case U.IN_HEAD:{Un(this,t);break}case U.IN_HEAD_NO_SCRIPT:{I9(this,t);break}case U.AFTER_HEAD:{B9(this,t);break}case U.IN_BODY:{Dr(this,t);break}case U.IN_TABLE:{Ks(this,t);break}case U.IN_TABLE_TEXT:{Bo(this,t);break}case U.IN_CAPTION:{LA(this,t);break}case U.IN_COLUMN_GROUP:{Sm(this,t);break}case U.IN_TABLE_BODY:{Y0(this,t);break}case U.IN_ROW:{V0(this,t);break}case U.IN_CELL:{RA(this,t);break}case U.IN_SELECT:{a3(this,t);break}case U.IN_SELECT_IN_TABLE:{DA(this,t);break}case U.IN_TEMPLATE:{PA(this,t);break}case U.AFTER_BODY:{$A(this,t);break}case U.IN_FRAMESET:{zA(this,t);break}case U.AFTER_FRAMESET:{qA(this,t);break}case U.AFTER_AFTER_BODY:{UA(this,t);break}case U.AFTER_AFTER_FRAMESET:{WA(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?XA(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case U.INITIAL:{Ro(this,t);break}case U.BEFORE_HTML:{A9(this,t);break}case U.BEFORE_HEAD:{L9(this,t);break}case U.IN_HEAD:{M9(this,t);break}case U.IN_HEAD_NO_SCRIPT:{R9(this,t);break}case U.AFTER_HEAD:{D9(this,t);break}case U.IN_BODY:{G0(this,t);break}case U.TEXT:{vA(this,t);break}case U.IN_TABLE:{Fl(this,t);break}case U.IN_TABLE_TEXT:{Bo(this,t);break}case U.IN_CAPTION:{MA(this,t);break}case U.IN_COLUMN_GROUP:{IA(this,t);break}case U.IN_TABLE_BODY:{Sf(this,t);break}case U.IN_ROW:{i3(this,t);break}case U.IN_CELL:{BA(this,t);break}case U.IN_SELECT:{s3(this,t);break}case U.IN_SELECT_IN_TABLE:{OA(this,t);break}case U.IN_TEMPLATE:{FA(this,t);break}case U.AFTER_BODY:{l3(this,t);break}case U.IN_FRAMESET:{HA(this,t);break}case U.AFTER_FRAMESET:{jA(this,t);break}case U.AFTER_AFTER_BODY:{fu(this,t);break}}}onEof(t){switch(this.insertionMode){case U.INITIAL:{Ro(this,t);break}case U.BEFORE_HTML:{yl(this,t);break}case U.BEFORE_HEAD:{xl(this,t);break}case U.IN_HEAD:{vl(this,t);break}case U.IN_HEAD_NO_SCRIPT:{kl(this,t);break}case U.AFTER_HEAD:{wl(this,t);break}case U.IN_BODY:case U.IN_TABLE:case U.IN_CAPTION:case U.IN_COLUMN_GROUP:case U.IN_TABLE_BODY:case U.IN_ROW:case U.IN_CELL:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:{e3(this,t);break}case U.TEXT:{kA(this,t);break}case U.IN_TABLE_TEXT:{Bo(this,t);break}case U.IN_TEMPLATE:{o3(this,t);break}case U.AFTER_BODY:case U.IN_FRAMESET:case U.AFTER_FRAMESET:case U.AFTER_AFTER_BODY:case U.AFTER_AFTER_FRAMESET:{Cm(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===B.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case U.IN_HEAD:case U.IN_HEAD_NO_SCRIPT:case U.AFTER_HEAD:case U.TEXT:case U.IN_COLUMN_GROUP:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:case U.IN_FRAMESET:case U.AFTER_FRAMESET:{this._insertCharacters(t);break}case U.IN_BODY:case U.IN_CAPTION:case U.IN_CELL:case U.IN_TEMPLATE:case U.AFTER_BODY:case U.AFTER_AFTER_BODY:case U.AFTER_AFTER_FRAMESET:{X4(this,t);break}case U.IN_TABLE:case U.IN_TABLE_BODY:case U.IN_ROW:{td(this,t);break}case U.IN_TABLE_TEXT:{t3(this,t);break}}}};function y9(e,t){let r=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return r?e.openElements.contains(r.element)?e.openElements.hasInScope(t.tagID)||(r=null):(e.activeFormattingElements.removeEntry(r),r=null):J4(e,t),r}function x9(e,t){let r=null,n=e.openElements.stackTop;for(;n>=0;n--){const i=e.openElements.items[n];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[n])&&(r=i)}return r||(e.openElements.shortenToLength(Math.max(n,0)),e.activeFormattingElements.removeEntry(t)),r}function v9(e,t,r){let n=t,i=e.openElements.getCommonAncestor(t);for(let a=0,s=i;s!==r;a++,s=i){i=e.openElements.getCommonAncestor(s);const o=e.activeFormattingElements.getElementEntry(s),l=o&&a>=g9;!o||l?(l&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(s)):(s=k9(e,o),n===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(n),e.treeAdapter.appendChild(s,n),n=s)}return n}function k9(e,t){const r=e.treeAdapter.getNamespaceURI(t.element),n=e.treeAdapter.createElement(t.token.tagName,r,t.token.attrs);return e.openElements.replace(t.element,n),t.element=n,n}function w9(e,t,r){const n=e.treeAdapter.getTagName(t),i=po(n);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(r);else{const a=e.treeAdapter.getNamespaceURI(t);i===g.TEMPLATE&&a===me.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,r)}}function T9(e,t,r){const n=e.treeAdapter.getNamespaceURI(r.element),{token:i}=r,a=e.treeAdapter.createElement(i.tagName,n,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(r),e.openElements.remove(r.element),e.openElements.insertAfter(t,a,i.tagID)}function Tm(e,t){for(let r=0;r<m9;r++){const n=y9(e,t);if(!n)break;const i=x9(e,n);if(!i)break;e.activeFormattingElements.bookmark=n;const a=v9(e,i,n.element),s=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(a),s&&w9(e,s,a),T9(e,i,n)}}function Cf(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function C9(e,t){e._appendCommentNode(t,e.openElements.items[0])}function S9(e,t){e._appendCommentNode(t,e.document)}function Cm(e,t){if(e.stopped=!0,t.location){const r=e.fragmentContext?0:2;for(let n=e.openElements.stackTop;n>=r;n--)e._setEndLocation(e.openElements.items[n],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const n=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(n);if(i&&!i.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(a);s&&!s.endTag&&e._setEndLocation(a,t)}}}}function E9(e,t){e._setDocumentType(t);const r=t.forceQuirks?Cn.QUIRKS:r9(t);t9(t)||e._err(t,se.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,r),e.insertionMode=U.BEFORE_HTML}function Ro(e,t){e._err(t,se.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Cn.QUIRKS),e.insertionMode=U.BEFORE_HTML,e._processToken(t)}function _9(e,t){t.tagID===g.HTML?(e._insertElement(t,me.HTML),e.insertionMode=U.BEFORE_HEAD):yl(e,t)}function A9(e,t){const r=t.tagID;(r===g.HTML||r===g.HEAD||r===g.BODY||r===g.BR)&&yl(e,t)}function yl(e,t){e._insertFakeRootElement(),e.insertionMode=U.BEFORE_HEAD,e._processToken(t)}function N9(e,t){switch(t.tagID){case g.HTML:{Dr(e,t);break}case g.HEAD:{e._insertElement(t,me.HTML),e.headElement=e.openElements.current,e.insertionMode=U.IN_HEAD;break}default:xl(e,t)}}function L9(e,t){const r=t.tagID;r===g.HEAD||r===g.BODY||r===g.HTML||r===g.BR?xl(e,t):e._err(t,se.endTagWithoutMatchingOpenElement)}function xl(e,t){e._insertFakeElement(re.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=U.IN_HEAD,e._processToken(t)}function Un(e,t){switch(t.tagID){case g.HTML:{Dr(e,t);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{e._appendElement(t,me.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,Kt.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Kt.RAWTEXT):(e._insertElement(t,me.HTML),e.insertionMode=U.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,Kt.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,Kt.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=U.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(U.IN_TEMPLATE);break}case g.HEAD:{e._err(t,se.misplacedStartTagForHeadElement);break}default:vl(e,t)}}function M9(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=U.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{vl(e,t);break}case g.TEMPLATE:{ss(e,t);break}default:e._err(t,se.endTagWithoutMatchingOpenElement)}}function ss(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,se.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,se.endTagWithoutMatchingOpenElement)}function vl(e,t){e.openElements.pop(),e.insertionMode=U.AFTER_HEAD,e._processToken(t)}function I9(e,t){switch(t.tagID){case g.HTML:{Dr(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{Un(e,t);break}case g.NOSCRIPT:{e._err(t,se.nestedNoscriptInHead);break}default:kl(e,t)}}function R9(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=U.IN_HEAD;break}case g.BR:{kl(e,t);break}default:e._err(t,se.endTagWithoutMatchingOpenElement)}}function kl(e,t){const r=t.type===vt.EOF?se.openElementsLeftAfterEof:se.disallowedContentInNoscriptInHead;e._err(t,r),e.openElements.pop(),e.insertionMode=U.IN_HEAD,e._processToken(t)}function B9(e,t){switch(t.tagID){case g.HTML:{Dr(e,t);break}case g.BODY:{e._insertElement(t,me.HTML),e.framesetOk=!1,e.insertionMode=U.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,me.HTML),e.insertionMode=U.IN_FRAMESET;break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{e._err(t,se.abandonedHeadElementChild),e.openElements.push(e.headElement,g.HEAD),Un(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,se.misplacedStartTagForHeadElement);break}default:wl(e,t)}}function D9(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{wl(e,t);break}case g.TEMPLATE:{ss(e,t);break}default:e._err(t,se.endTagWithoutMatchingOpenElement)}}function wl(e,t){e._insertFakeElement(re.BODY,g.BODY),e.insertionMode=U.IN_BODY,W0(e,t)}function W0(e,t){switch(t.type){case vt.CHARACTER:{K4(e,t);break}case vt.WHITESPACE_CHARACTER:{X4(e,t);break}case vt.COMMENT:{Cf(e,t);break}case vt.START_TAG:{Dr(e,t);break}case vt.END_TAG:{G0(e,t);break}case vt.EOF:{e3(e,t);break}}}function X4(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function K4(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function O9(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function P9(e,t){const r=e.openElements.tryPeekProperlyNestedBodyElement();r&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(r,t.attrs))}function F9(e,t){const r=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&r&&(e.treeAdapter.detachNode(r),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,me.HTML),e.insertionMode=U.IN_FRAMESET)}function $9(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML)}function z9(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Tf.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,me.HTML)}function H9(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function q9(e,t){const r=e.openElements.tmplCount>0;(!e.formElement||r)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML),r||(e.formElement=e.openElements.current))}function j9(e,t){e.framesetOk=!1;const r=t.tagID;for(let n=e.openElements.stackTop;n>=0;n--){const i=e.openElements.tagIDs[n];if(r===g.LI&&i===g.LI||(r===g.DD||r===g.DT)&&(i===g.DD||i===g.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==g.ADDRESS&&i!==g.DIV&&i!==g.P&&e._isSpecialElement(e.openElements.items[n],i))break}e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML)}function U9(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML),e.tokenizer.state=Kt.PLAINTEXT}function W9(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.framesetOk=!1}function G9(e,t){const r=e.activeFormattingElements.getElementEntryInScopeWithTagName(re.A);r&&(Tm(e,t),e.openElements.remove(r.element),e.activeFormattingElements.removeEntry(r)),e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Y9(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function V9(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(Tm(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,me.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function X9(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function K9(e,t){e.treeAdapter.getDocumentMode(e.document)!==Cn.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML),e.framesetOk=!1,e.insertionMode=U.IN_TABLE}function Q4(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,me.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Z4(e){const t=z4(e,Ua.TYPE);return t!=null&&t.toLowerCase()===p9}function Q9(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,me.HTML),Z4(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Z9(e,t){e._appendElement(t,me.HTML),t.ackSelfClosing=!0}function J9(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,me.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function eA(e,t){t.tagName=re.IMG,t.tagID=g.IMG,Q4(e,t)}function tA(e,t){e._insertElement(t,me.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Kt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=U.TEXT}function rA(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Kt.RAWTEXT)}function nA(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Kt.RAWTEXT)}function p2(e,t){e._switchToTextParsing(t,Kt.RAWTEXT)}function iA(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===U.IN_TABLE||e.insertionMode===U.IN_CAPTION||e.insertionMode===U.IN_TABLE_BODY||e.insertionMode===U.IN_ROW||e.insertionMode===U.IN_CELL?U.IN_SELECT_IN_TABLE:U.IN_SELECT}function aA(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML)}function sA(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,me.HTML)}function oA(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,me.HTML)}function lA(e,t){e._reconstructActiveFormattingElements(),G4(t),wm(t),t.selfClosing?e._appendElement(t,me.MATHML):e._insertElement(t,me.MATHML),t.ackSelfClosing=!0}function cA(e,t){e._reconstructActiveFormattingElements(),Y4(t),wm(t),t.selfClosing?e._appendElement(t,me.SVG):e._insertElement(t,me.SVG),t.ackSelfClosing=!0}function m2(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML)}function Dr(e,t){switch(t.tagID){case g.I:case g.S:case g.B:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.SMALL:case g.STRIKE:case g.STRONG:{Y9(e,t);break}case g.A:{G9(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{z9(e,t);break}case g.P:case g.DL:case g.OL:case g.UL:case g.DIV:case g.DIR:case g.NAV:case g.MAIN:case g.MENU:case g.ASIDE:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.DETAILS:case g.ADDRESS:case g.ARTICLE:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{$9(e,t);break}case g.LI:case g.DD:case g.DT:{j9(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{Q4(e,t);break}case g.HR:{J9(e,t);break}case g.RB:case g.RTC:{sA(e,t);break}case g.RT:case g.RP:{oA(e,t);break}case g.PRE:case g.LISTING:{H9(e,t);break}case g.XMP:{rA(e,t);break}case g.SVG:{cA(e,t);break}case g.HTML:{O9(e,t);break}case g.BASE:case g.LINK:case g.META:case g.STYLE:case g.TITLE:case g.SCRIPT:case g.BGSOUND:case g.BASEFONT:case g.TEMPLATE:{Un(e,t);break}case g.BODY:{P9(e,t);break}case g.FORM:{q9(e,t);break}case g.NOBR:{V9(e,t);break}case g.MATH:{lA(e,t);break}case g.TABLE:{K9(e,t);break}case g.INPUT:{Q9(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{Z9(e,t);break}case g.IMAGE:{eA(e,t);break}case g.BUTTON:{W9(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{X9(e,t);break}case g.IFRAME:{nA(e,t);break}case g.SELECT:{iA(e,t);break}case g.OPTION:case g.OPTGROUP:{aA(e,t);break}case g.NOEMBED:case g.NOFRAMES:{p2(e,t);break}case g.FRAMESET:{F9(e,t);break}case g.TEXTAREA:{tA(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?p2(e,t):m2(e,t);break}case g.PLAINTEXT:{U9(e,t);break}case g.COL:case g.TH:case g.TD:case g.TR:case g.HEAD:case g.FRAME:case g.TBODY:case g.TFOOT:case g.THEAD:case g.CAPTION:case g.COLGROUP:break;default:m2(e,t)}}function uA(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=U.AFTER_BODY,e.options.sourceCodeLocationInfo)){const r=e.openElements.tryPeekProperlyNestedBodyElement();r&&e._setEndLocation(r,t)}}function hA(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=U.AFTER_BODY,l3(e,t))}function dA(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r))}function fA(e){const t=e.openElements.tmplCount>0,{formElement:r}=e;t||(e.formElement=null),(r||t)&&e.openElements.hasInScope(g.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(g.FORM):r&&e.openElements.remove(r))}function pA(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(re.P,g.P),e._closePElement()}function mA(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function gA(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r))}function bA(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function yA(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r),e.activeFormattingElements.clearToLastMarker())}function xA(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(re.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function J4(e,t){const r=t.tagName,n=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const a=e.openElements.items[i],s=e.openElements.tagIDs[i];if(n===s&&(n!==g.UNKNOWN||e.treeAdapter.getTagName(a)===r)){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(a,s))break}}function G0(e,t){switch(t.tagID){case g.A:case g.B:case g.I:case g.S:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.NOBR:case g.SMALL:case g.STRIKE:case g.STRONG:{Tm(e,t);break}case g.P:{pA(e);break}case g.DL:case g.UL:case g.OL:case g.DIR:case g.DIV:case g.NAV:case g.PRE:case g.MAIN:case g.MENU:case g.ASIDE:case g.BUTTON:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.ADDRESS:case g.ARTICLE:case g.DETAILS:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.LISTING:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{dA(e,t);break}case g.LI:{mA(e);break}case g.DD:case g.DT:{gA(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{bA(e);break}case g.BR:{xA(e);break}case g.BODY:{uA(e,t);break}case g.HTML:{hA(e,t);break}case g.FORM:{fA(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{yA(e,t);break}case g.TEMPLATE:{ss(e,t);break}default:J4(e,t)}}function e3(e,t){e.tmplInsertionModeStack.length>0?o3(e,t):Cm(e,t)}function vA(e,t){var r;t.tagID===g.SCRIPT&&((r=e.scriptHandler)===null||r===void 0||r.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function kA(e,t){e._err(t,se.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function td(e,t){if(e.openElements.currentTagId!==void 0&&V4.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=U.IN_TABLE_TEXT,t.type){case vt.CHARACTER:{r3(e,t);break}case vt.WHITESPACE_CHARACTER:{t3(e,t);break}}else hc(e,t)}function wA(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,me.HTML),e.insertionMode=U.IN_CAPTION}function TA(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,me.HTML),e.insertionMode=U.IN_COLUMN_GROUP}function CA(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(re.COLGROUP,g.COLGROUP),e.insertionMode=U.IN_COLUMN_GROUP,Sm(e,t)}function SA(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,me.HTML),e.insertionMode=U.IN_TABLE_BODY}function EA(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(re.TBODY,g.TBODY),e.insertionMode=U.IN_TABLE_BODY,Y0(e,t)}function _A(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function AA(e,t){Z4(t)?e._appendElement(t,me.HTML):hc(e,t),t.ackSelfClosing=!0}function NA(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,me.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Ks(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{EA(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{Un(e,t);break}case g.COL:{CA(e,t);break}case g.FORM:{NA(e,t);break}case g.TABLE:{_A(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{SA(e,t);break}case g.INPUT:{AA(e,t);break}case g.CAPTION:{wA(e,t);break}case g.COLGROUP:{TA(e,t);break}default:hc(e,t)}}function Fl(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{ss(e,t);break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:hc(e,t)}}function hc(e,t){const r=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,W0(e,t),e.fosterParentingEnabled=r}function t3(e,t){e.pendingCharacterTokens.push(t)}function r3(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Bo(e,t){let r=0;if(e.hasNonWhitespacePendingCharacterToken)for(;r<e.pendingCharacterTokens.length;r++)hc(e,e.pendingCharacterTokens[r]);else for(;r<e.pendingCharacterTokens.length;r++)e._insertCharacters(e.pendingCharacterTokens[r]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const n3=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function LA(e,t){const r=t.tagID;n3.has(r)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=U.IN_TABLE,Ks(e,t)):Dr(e,t)}function MA(e,t){const r=t.tagID;switch(r){case g.CAPTION:case g.TABLE:{e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=U.IN_TABLE,r===g.TABLE&&Fl(e,t));break}case g.BODY:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:G0(e,t)}}function Sm(e,t){switch(t.tagID){case g.HTML:{Dr(e,t);break}case g.COL:{e._appendElement(t,me.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{Un(e,t);break}default:Du(e,t)}}function IA(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=U.IN_TABLE);break}case g.TEMPLATE:{ss(e,t);break}case g.COL:break;default:Du(e,t)}}function Du(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=U.IN_TABLE,e._processToken(t))}function Y0(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,me.HTML),e.insertionMode=U.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(re.TR,g.TR),e.insertionMode=U.IN_ROW,V0(e,t);break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE,Ks(e,t));break}default:Ks(e,t)}}function Sf(e,t){const r=t.tagID;switch(t.tagID){case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasInTableScope(r)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE,Fl(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:case g.TR:break;default:Fl(e,t)}}function V0(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,me.HTML),e.insertionMode=U.IN_CELL,e.activeFormattingElements.insertMarker();break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY,Y0(e,t));break}default:Ks(e,t)}}function i3(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY,Sf(e,t));break}case g.TBODY:case g.TFOOT:case g.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(g.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY,Sf(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:break;default:Fl(e,t)}}function RA(e,t){const r=t.tagID;n3.has(r)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),V0(e,t)):Dr(e,t)}function BA(e,t){const r=t.tagID;switch(r){case g.TD:case g.TH:{e.openElements.hasInTableScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=U.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(r)&&(e._closeTableCell(),i3(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:G0(e,t)}}function a3(e,t){switch(t.tagID){case g.HTML:{Dr(e,t);break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._insertElement(t,me.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,me.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,me.HTML),t.ackSelfClosing=!0;break}case g.INPUT:case g.KEYGEN:case g.TEXTAREA:case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),t.tagID!==g.SELECT&&e._processStartTag(t));break}case g.SCRIPT:case g.TEMPLATE:{Un(e,t);break}}}function s3(e,t){switch(t.tagID){case g.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===g.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===g.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop();break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop();break}case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode());break}case g.TEMPLATE:{ss(e,t);break}}}function DA(e,t){const r=t.tagID;r===g.CAPTION||r===g.TABLE||r===g.TBODY||r===g.TFOOT||r===g.THEAD||r===g.TR||r===g.TD||r===g.TH?(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e._processStartTag(t)):a3(e,t)}function OA(e,t){const r=t.tagID;r===g.CAPTION||r===g.TABLE||r===g.TBODY||r===g.TFOOT||r===g.THEAD||r===g.TR||r===g.TD||r===g.TH?e.openElements.hasInTableScope(r)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e.onEndTag(t)):s3(e,t)}function PA(e,t){switch(t.tagID){case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{Un(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=U.IN_TABLE,e.insertionMode=U.IN_TABLE,Ks(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=U.IN_COLUMN_GROUP,e.insertionMode=U.IN_COLUMN_GROUP,Sm(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=U.IN_TABLE_BODY,e.insertionMode=U.IN_TABLE_BODY,Y0(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=U.IN_ROW,e.insertionMode=U.IN_ROW,V0(e,t);break}default:e.tmplInsertionModeStack[0]=U.IN_BODY,e.insertionMode=U.IN_BODY,Dr(e,t)}}function FA(e,t){t.tagID===g.TEMPLATE&&ss(e,t)}function o3(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Cm(e,t)}function $A(e,t){t.tagID===g.HTML?Dr(e,t):Ou(e,t)}function l3(e,t){var r;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=U.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===g.HTML){e._setEndLocation(e.openElements.items[0],t);const n=e.openElements.items[1];n&&!(!((r=e.treeAdapter.getNodeSourceCodeLocation(n))===null||r===void 0)&&r.endTag)&&e._setEndLocation(n,t)}}else Ou(e,t)}function Ou(e,t){e.insertionMode=U.IN_BODY,W0(e,t)}function zA(e,t){switch(t.tagID){case g.HTML:{Dr(e,t);break}case g.FRAMESET:{e._insertElement(t,me.HTML);break}case g.FRAME:{e._appendElement(t,me.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{Un(e,t);break}}}function HA(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=U.AFTER_FRAMESET))}function qA(e,t){switch(t.tagID){case g.HTML:{Dr(e,t);break}case g.NOFRAMES:{Un(e,t);break}}}function jA(e,t){t.tagID===g.HTML&&(e.insertionMode=U.AFTER_AFTER_FRAMESET)}function UA(e,t){t.tagID===g.HTML?Dr(e,t):fu(e,t)}function fu(e,t){e.insertionMode=U.IN_BODY,W0(e,t)}function WA(e,t){switch(t.tagID){case g.HTML:{Dr(e,t);break}case g.NOFRAMES:{Un(e,t);break}}}function GA(e,t){t.chars=jt,e._insertCharacters(t)}function YA(e,t){e._insertCharacters(t),e.framesetOk=!1}function c3(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==me.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function VA(e,t){if(c9(t))c3(e),e._startTagOutsideForeignContent(t);else{const r=e._getAdjustedCurrentElement(),n=e.treeAdapter.getNamespaceURI(r);n===me.MATHML?G4(t):n===me.SVG&&(u9(t),Y4(t)),wm(t),t.selfClosing?e._appendElement(t,n):e._insertElement(t,n),t.ackSelfClosing=!0}}function XA(e,t){if(t.tagID===g.P||t.tagID===g.BR){c3(e),e._endTagOutsideForeignContent(t);return}for(let r=e.openElements.stackTop;r>0;r--){const n=e.openElements.items[r];if(e.treeAdapter.getNamespaceURI(n)===me.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(n);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(r);break}}}re.AREA,re.BASE,re.BASEFONT,re.BGSOUND,re.BR,re.COL,re.EMBED,re.FRAME,re.HR,re.IMG,re.INPUT,re.KEYGEN,re.LINK,re.META,re.PARAM,re.SOURCE,re.TRACK,re.WBR;const X0=u3("end"),hi=u3("start");function u3(e){return t;function t(r){const n=r&&r.position&&r.position[e]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function h3(e){const t=hi(e),r=X0(e);if(t&&r)return{start:t,end:r}}const KA=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,QA=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),g2={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function d3(e,t){const r=oN(e),n=vm("type",{handlers:{root:ZA,element:JA,text:eN,comment:p3,doctype:tN,raw:nN},unknown:iN}),i={parser:r?new f2(g2):f2.getFragmentParser(void 0,g2),handle(o){n(o,i)},stitches:!1,options:t||{}};n(e,i),mo(i,hi());const a=r?i.parser.document:i.parser.getFragment(),s=c_(a,{file:i.options.file});return i.stitches&&Xs(s,"comment",function(o,l,c){const u=o;if(u.value.stitch&&c&&l!==void 0){const h=c.children;return h[l]=u.value.stitch,l}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function f3(e,t){let r=-1;if(e)for(;++r<e.length;)t.handle(e[r])}function ZA(e,t){f3(e.children,t)}function JA(e,t){aN(e,t),f3(e.children,t),sN(e,t)}function eN(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const r={type:vt.CHARACTER,chars:e.value,location:dc(e)};mo(t,hi(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function tN(e,t){const r={type:vt.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:dc(e)};mo(t,hi(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function rN(e,t){t.stitches=!0;const r=lN(e);if("children"in e&&"children"in r){const n=d3({type:"root",children:e.children},t.options);r.children=n.children}p3({type:"comment",value:{stitch:r}},t)}function p3(e,t){const r=e.value,n={type:vt.COMMENT,data:r,location:dc(e)};mo(t,hi(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function nN(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,m3(t,hi(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(KA,"<$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const r=t.parser.tokenizer._consume();t.parser.tokenizer._callState(r)}}function iN(e,t){const r=e;if(t.options.passThrough&&t.options.passThrough.includes(r.type))rN(r,t);else{let n="";throw QA.has(r.type)&&(n=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+r.type+"` node"+n)}}function mo(e,t){m3(e,t);const r=e.parser.tokenizer.currentCharacterToken;r&&r.location&&(r.location.endLine=e.parser.tokenizer.preprocessor.line,r.location.endCol=e.parser.tokenizer.preprocessor.col+1,r.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=r,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Kt.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function m3(e,t){if(t&&t.offset!==void 0){const r={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=r}}function aN(e,t){const r=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Kt.PLAINTEXT)return;mo(t,hi(e));const n=t.parser.openElements.current;let i="namespaceURI"in n?n.namespaceURI:ii.html;i===ii.html&&r==="svg"&&(i=ii.svg);const a=p_({...e,children:[]},{space:i===ii.svg?"svg":"html"}),s={type:vt.START_TAG,tagName:r,tagID:po(r),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:dc(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=r}function sN(e,t){const r=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&O4.includes(r)||t.parser.tokenizer.state===Kt.PLAINTEXT)return;mo(t,X0(e));const n={type:vt.END_TAG,tagName:r,tagID:po(r),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:dc(e)};t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken),r===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Kt.RCDATA||t.parser.tokenizer.state===Kt.RAWTEXT||t.parser.tokenizer.state===Kt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Kt.DATA)}function oN(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function dc(e){const t=hi(e)||{line:void 0,column:void 0,offset:void 0},r=X0(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:r.line,endCol:r.column,endOffset:r.offset}}function lN(e){return"children"in e?Ya({...e,children:[]}):Ya(e)}function cN(e){return function(t,r){return d3(t,{...e,file:r})}}const Aa=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],b2={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Aa,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Aa],h2:[["className","sr-only"]],img:[...Aa,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Aa,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Aa],table:[...Aa],ul:[...Aa,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},sa={}.hasOwnProperty;function uN(e,t){let r={type:"root",children:[]};const n={schema:t?{...b2,...t}:b2,stack:[]},i=g3(n,e);return i&&(Array.isArray(i)?i.length===1?r=i[0]:r.children=i:r=i),r}function g3(e,t){if(t&&typeof t=="object"){const r=t;switch(typeof r.type=="string"?r.type:""){case"comment":return hN(e,r);case"doctype":return dN(e,r);case"element":return fN(e,r);case"root":return pN(e,r);case"text":return mN(e,r)}}}function hN(e,t){if(e.schema.allowComments){const r=typeof t.value=="string"?t.value:"",n=r.indexOf("-->"),a={type:"comment",value:n<0?r:r.slice(0,n)};return fc(a,t),a}}function dN(e,t){if(e.schema.allowDoctypes){const r={type:"doctype"};return fc(r,t),r}}function fN(e,t){const r=typeof t.tagName=="string"?t.tagName:"";e.stack.push(r);const n=b3(e,t.children),i=gN(e,t.properties);e.stack.pop();let a=!1;if(r&&r!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(r))&&(a=!0,e.schema.ancestors&&sa.call(e.schema.ancestors,r))){const o=e.schema.ancestors[r];let l=-1;for(a=!1;++l<o.length;)e.stack.includes(o[l])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(r)?n:void 0;const s={type:"element",tagName:r,properties:i,children:n};return fc(s,t),s}function pN(e,t){const n={type:"root",children:b3(e,t.children)};return fc(n,t),n}function mN(e,t){const n={type:"text",value:typeof t.value=="string"?t.value:""};return fc(n,t),n}function b3(e,t){const r=[];if(Array.isArray(t)){const n=t;let i=-1;for(;++i<n.length;){const a=g3(e,n[i]);a&&(Array.isArray(a)?r.push(...a):r.push(a))}}return r}function gN(e,t){const r=e.stack[e.stack.length-1],n=e.schema.attributes,i=e.schema.required,a=n&&sa.call(n,r)?n[r]:void 0,s=n&&sa.call(n,"*")?n["*"]:void 0,o=t&&typeof t=="object"?t:{},l={};let c;for(c in o)if(sa.call(o,c)){const u=o[c];let h=y2(e,x2(a,c),c,u);h==null&&(h=y2(e,x2(s,c),c,u)),h!=null&&(l[c]=h)}if(i&&sa.call(i,r)){const u=i[r];for(c in u)sa.call(u,c)&&!sa.call(l,c)&&(l[c]=u[c])}return l}function y2(e,t,r,n){return t?Array.isArray(n)?bN(e,t,r,n):y3(e,t,r,n):void 0}function bN(e,t,r,n){let i=-1;const a=[];for(;++i<n.length;){const s=y3(e,t,r,n[i]);(typeof s=="number"||typeof s=="string")&&a.push(s)}return a}function y3(e,t,r,n){if(!(typeof n!="boolean"&&typeof n!="number"&&typeof n!="string")&&yN(e,r,n)){if(typeof t=="object"&&t.length>1){let i=!1,a=0;for(;++a<t.length;){const s=t[a];if(s&&typeof s=="object"&&"flags"in s){if(s.test(String(n))){i=!0;break}}else if(s===n){i=!0;break}}if(!i)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(r)?e.schema.clobberPrefix+n:n}}function yN(e,t,r){const n=e.schema.protocols&&sa.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!n||n.length===0)return!0;const i=String(r),a=i.indexOf(":"),s=i.indexOf("?"),o=i.indexOf("#"),l=i.indexOf("/");if(a<0||l>-1&&a>l||s>-1&&a>s||o>-1&&a>o)return!0;let c=-1;for(;++c<n.length;){const u=n[c];if(a===u.length&&i.slice(0,u.length)===u)return!0}return!1}function fc(e,t){const r=h3(t);t.data&&(e.data=Ya(t.data)),r&&(e.position=r)}function x2(e,t){let r,n=-1;if(e)for(;++n<e.length;){const i=e[n],a=typeof i=="string"?i:i[0];if(a===t)return i;a==="data*"&&(r=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return r}function xN(e){return function(t){return uN(t,e)}}function Pu(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let n=0,i=r.indexOf(t);for(;i!==-1;)n++,i=r.indexOf(t,i+t.length);return n}const zr=va(/[A-Za-z]/),Ir=va(/[\dA-Za-z]/),vN=va(/[#-'*+\--9=?A-Z^-~]/);function Fu(e){return e!==null&&(e<32||e===127)}const Ef=va(/\d/),kN=va(/[\dA-Fa-f]/),wN=va(/[!-/:-@[-`{-~]/);function Ge(e){return e!==null&&e<-2}function Dt(e){return e!==null&&(e<0||e===32)}function wt(e){return e===-2||e===-1||e===32}const K0=va(new RegExp("\\p{P}|\\p{S}","u")),Va=va(/\s/);function va(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function TN(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function CN(e,t,r){const i=lc((r||{}).ignore||[]),a=SN(t);let s=-1;for(;++s<a.length;)hm(e,"text",o);function o(c,u){let h=-1,d;for(;++h<u.length;){const f=u[h],p=d?d.children:void 0;if(i(f,p?p.indexOf(f):void 0,d))return;d=f}if(d)return l(c,u)}function l(c,u){const h=u[u.length-1],d=a[s][0],f=a[s][1];let p=0;const b=h.children.indexOf(c);let y=!1,v=[];d.lastIndex=0;let T=d.exec(c.value);for(;T;){const A=T.index,E={index:T.index,input:T.input,stack:[...u,c]};let S=f(...T,E);if(typeof S=="string"&&(S=S.length>0?{type:"text",value:S}:void 0),S===!1?d.lastIndex=A+1:(p!==A&&v.push({type:"text",value:c.value.slice(p,A)}),Array.isArray(S)?v.push(...S):S&&v.push(S),p=A+T[0].length,y=!0),!d.global)break;T=d.exec(c.value)}return y?(p<c.value.length&&v.push({type:"text",value:c.value.slice(p)}),h.children.splice(b,1,...v)):v=[c],b+v.length}}function SN(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let n=-1;for(;++n<r.length;){const i=r[n];t.push([EN(i[0]),_N(i[1])])}return t}function EN(e){return typeof e=="string"?new RegExp(TN(e),"g"):e}function _N(e){return typeof e=="function"?e:function(){return e}}const rd="phrasing",nd=["autolink","link","image","label"];function AN(){return{transforms:[DN],enter:{literalAutolink:LN,literalAutolinkEmail:id,literalAutolinkHttp:id,literalAutolinkWww:id},exit:{literalAutolink:BN,literalAutolinkEmail:RN,literalAutolinkHttp:MN,literalAutolinkWww:IN}}}function NN(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:rd,notInConstruct:nd},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:rd,notInConstruct:nd},{character:":",before:"[ps]",after:"\\/",inConstruct:rd,notInConstruct:nd}]}}function LN(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function id(e){this.config.enter.autolinkProtocol.call(this,e)}function MN(e){this.config.exit.autolinkProtocol.call(this,e)}function IN(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function RN(e){this.config.exit.autolinkEmail.call(this,e)}function BN(e){this.exit(e)}function DN(e){CN(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,ON],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),PN]],{ignore:["link","linkReference"]})}function ON(e,t,r,n,i){let a="";if(!x3(i)||(/^w/i.test(t)&&(r=t+r,t="",a="http://"),!FN(r)))return!1;const s=$N(r+n);if(!s[0])return!1;const o={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[o,{type:"text",value:s[1]}]:o}function PN(e,t,r,n){return!x3(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function FN(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function $N(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],n=r.indexOf(")");const i=Pu(e,"(");let a=Pu(e,")");for(;n!==-1&&i>a;)e+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),a++;return[e,r]}function x3(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||Va(r)||K0(r))&&(!t||r!==47)}function zn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}v3.peek=VN;function zN(){this.buffer()}function HN(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function qN(){this.buffer()}function jN(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function UN(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=zn(this.sliceSerialize(e)).toLowerCase(),r.label=t}function WN(e){this.exit(e)}function GN(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=zn(this.sliceSerialize(e)).toLowerCase(),r.label=t}function YN(e){this.exit(e)}function VN(){return"["}function v3(e,t,r,n){const i=r.createTracker(n);let a=i.move("[^");const s=r.enter("footnoteReference"),o=r.enter("reference");return a+=i.move(r.safe(r.associationId(e),{after:"]",before:a})),o(),s(),a+=i.move("]"),a}function XN(){return{enter:{gfmFootnoteCallString:zN,gfmFootnoteCall:HN,gfmFootnoteDefinitionLabelString:qN,gfmFootnoteDefinition:jN},exit:{gfmFootnoteCallString:UN,gfmFootnoteCall:WN,gfmFootnoteDefinitionLabelString:GN,gfmFootnoteDefinition:YN}}}function KN(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:v3},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(n,i,a,s){const o=a.createTracker(s);let l=o.move("[^");const c=a.enter("footnoteDefinition"),u=a.enter("label");return l+=o.move(a.safe(a.associationId(n),{before:l,after:"]"})),u(),l+=o.move("]:"),n.children&&n.children.length>0&&(o.shift(4),l+=o.move((t?`
|
|
3
|
+
`:" ")+a.indentLines(a.containerFlow(n,o.current()),t?k3:QN))),c(),l}}function QN(e,t,r){return t===0?e:k3(e,t,r)}function k3(e,t,r){return(r?"":" ")+e}const ZN=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];w3.peek=nL;function JN(){return{canContainEols:["delete"],enter:{strikethrough:tL},exit:{strikethrough:rL}}}function eL(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:ZN}],handlers:{delete:w3}}}function tL(e){this.enter({type:"delete",children:[]},e)}function rL(e){this.exit(e)}function w3(e,t,r,n){const i=r.createTracker(n),a=r.enter("strikethrough");let s=i.move("~~");return s+=r.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),a(),s}function nL(){return"~"}function iL(e){return e.length}function aL(e,t){const r=t||{},n=(r.align||[]).concat(),i=r.stringLength||iL,a=[],s=[],o=[],l=[];let c=0,u=-1;for(;++u<e.length;){const m=[],b=[];let y=-1;for(e[u].length>c&&(c=e[u].length);++y<e[u].length;){const v=sL(e[u][y]);if(r.alignDelimiters!==!1){const T=i(v);b[y]=T,(l[y]===void 0||T>l[y])&&(l[y]=T)}m.push(v)}s[u]=m,o[u]=b}let h=-1;if(typeof n=="object"&&"length"in n)for(;++h<c;)a[h]=v2(n[h]);else{const m=v2(n);for(;++h<c;)a[h]=m}h=-1;const d=[],f=[];for(;++h<c;){const m=a[h];let b="",y="";m===99?(b=":",y=":"):m===108?b=":":m===114&&(y=":");let v=r.alignDelimiters===!1?1:Math.max(1,l[h]-b.length-y.length);const T=b+"-".repeat(v)+y;r.alignDelimiters!==!1&&(v=b.length+v+y.length,v>l[h]&&(l[h]=v),f[h]=v),d[h]=T}s.splice(1,0,d),o.splice(1,0,f),u=-1;const p=[];for(;++u<s.length;){const m=s[u],b=o[u];h=-1;const y=[];for(;++h<c;){const v=m[h]||"";let T="",A="";if(r.alignDelimiters!==!1){const E=l[h]-(b[h]||0),S=a[h];S===114?T=" ".repeat(E):S===99?E%2?(T=" ".repeat(E/2+.5),A=" ".repeat(E/2-.5)):(T=" ".repeat(E/2),A=T):A=" ".repeat(E)}r.delimiterStart!==!1&&!h&&y.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&v==="")&&(r.delimiterStart!==!1||h)&&y.push(" "),r.alignDelimiters!==!1&&y.push(T),y.push(v),r.alignDelimiters!==!1&&y.push(A),r.padding!==!1&&y.push(" "),(r.delimiterEnd!==!1||h!==c-1)&&y.push("|")}p.push(r.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return p.join(`
|
|
4
|
+
`)}function sL(e){return e==null?"":String(e)}function v2(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function oL(e,t,r,n){const i=r.enter("blockquote"),a=r.createTracker(n);a.move("> "),a.shift(2);const s=r.indentLines(r.containerFlow(e,a.current()),lL);return i(),s}function lL(e,t,r){return">"+(r?"":" ")+e}function cL(e,t){return k2(e,t.inConstruct,!0)&&!k2(e,t.notInConstruct,!1)}function k2(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let n=-1;for(;++n<t.length;)if(e.includes(t[n]))return!0;return!1}function w2(e,t,r,n){let i=-1;for(;++i<r.unsafe.length;)if(r.unsafe[i].character===`
|
|
5
|
+
`&&cL(r.stack,r.unsafe[i]))return/[ \t]/.test(n.before)?"":" ";return`\\
|
|
6
|
+
`}function T3(e,t){const r=String(e);let n=r.indexOf(t),i=n,a=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;n!==-1;)n===i?++a>s&&(s=a):a=1,i=n+t.length,n=r.indexOf(t,i);return s}function uL(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function hL(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function dL(e,t,r,n){const i=hL(r),a=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(uL(e,r)){const h=r.enter("codeIndented"),d=r.indentLines(a,fL);return h(),d}const o=r.createTracker(n),l=i.repeat(Math.max(T3(a,i)+1,3)),c=r.enter("codeFenced");let u=o.move(l);if(e.lang){const h=r.enter(`codeFencedLang${s}`);u+=o.move(r.safe(e.lang,{before:u,after:" ",encode:["`"],...o.current()})),h()}if(e.lang&&e.meta){const h=r.enter(`codeFencedMeta${s}`);u+=o.move(" "),u+=o.move(r.safe(e.meta,{before:u,after:`
|
|
7
|
+
`,encode:["`"],...o.current()})),h()}return u+=o.move(`
|
|
8
|
+
`),a&&(u+=o.move(a+`
|
|
9
|
+
`)),u+=o.move(l),c(),u}function fL(e,t,r){return(r?"":" ")+e}function Em(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function pL(e,t,r,n){const i=Em(r),a=i==='"'?"Quote":"Apostrophe",s=r.enter("definition");let o=r.enter("label");const l=r.createTracker(n);let c=l.move("[");return c+=l.move(r.safe(r.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=r.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(r.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(o=r.enter("destinationRaw"),c+=l.move(r.safe(e.url,{before:c,after:e.title?" ":`
|
|
10
|
+
`,...l.current()}))),o(),e.title&&(o=r.enter(`title${a}`),c+=l.move(" "+i),c+=l.move(r.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),o()),s(),c}function mL(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function $l(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Qs(e){if(e===null||Dt(e)||Va(e))return 1;if(K0(e))return 2}function $u(e,t,r){const n=Qs(e),i=Qs(t);return n===void 0?i===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:n===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}C3.peek=gL;function C3(e,t,r,n){const i=mL(r),a=r.enter("emphasis"),s=r.createTracker(n),o=s.move(i);let l=s.move(r.containerPhrasing(e,{after:i,before:o,...s.current()}));const c=l.charCodeAt(0),u=$u(n.before.charCodeAt(n.before.length-1),c,i);u.inside&&(l=$l(c)+l.slice(1));const h=l.charCodeAt(l.length-1),d=$u(n.after.charCodeAt(0),h,i);d.inside&&(l=l.slice(0,-1)+$l(h));const f=s.move(i);return a(),r.attentionEncodeSurroundingInfo={after:d.outside,before:u.outside},o+l+f}function gL(e,t,r){return r.options.emphasis||"*"}const bL={};function _m(e,t){const r=bL,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,i=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return S3(e,n,i)}function S3(e,t,r){if(yL(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return T2(e.children,t,r)}return Array.isArray(e)?T2(e,t,r):""}function T2(e,t,r){const n=[];let i=-1;for(;++i<e.length;)n[i]=S3(e[i],t,r);return n.join("")}function yL(e){return!!(e&&typeof e=="object")}function xL(e,t){let r=!1;return Xs(e,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return r=!0,yf}),!!((!e.depth||e.depth<3)&&_m(e)&&(t.options.setext||r))}function vL(e,t,r,n){const i=Math.max(Math.min(6,e.depth||1),1),a=r.createTracker(n);if(xL(e,r)){const u=r.enter("headingSetext"),h=r.enter("phrasing"),d=r.containerPhrasing(e,{...a.current(),before:`
|
|
11
|
+
`,after:`
|
|
12
|
+
`});return h(),u(),d+`
|
|
13
|
+
`+(i===1?"=":"-").repeat(d.length-(Math.max(d.lastIndexOf("\r"),d.lastIndexOf(`
|
|
14
|
+
`))+1))}const s="#".repeat(i),o=r.enter("headingAtx"),l=r.enter("phrasing");a.move(s+" ");let c=r.containerPhrasing(e,{before:"# ",after:`
|
|
15
|
+
`,...a.current()});return/^[\t ]/.test(c)&&(c=$l(c.charCodeAt(0))+c.slice(1)),c=c?s+" "+c:s,r.options.closeAtx&&(c+=" "+s),l(),o(),c}E3.peek=kL;function E3(e){return e.value||""}function kL(){return"<"}_3.peek=wL;function _3(e,t,r,n){const i=Em(r),a=i==='"'?"Quote":"Apostrophe",s=r.enter("image");let o=r.enter("label");const l=r.createTracker(n);let c=l.move("![");return c+=l.move(r.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=r.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(r.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(o=r.enter("destinationRaw"),c+=l.move(r.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),o(),e.title&&(o=r.enter(`title${a}`),c+=l.move(" "+i),c+=l.move(r.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),o()),c+=l.move(")"),s(),c}function wL(){return"!"}A3.peek=TL;function A3(e,t,r,n){const i=e.referenceType,a=r.enter("imageReference");let s=r.enter("label");const o=r.createTracker(n);let l=o.move("![");const c=r.safe(e.alt,{before:l,after:"]",...o.current()});l+=o.move(c+"]["),s();const u=r.stack;r.stack=[],s=r.enter("reference");const h=r.safe(r.associationId(e),{before:l,after:"]",...o.current()});return s(),r.stack=u,a(),i==="full"||!c||c!==h?l+=o.move(h+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function TL(){return"!"}N3.peek=CL;function N3(e,t,r){let n=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(n);)i+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++a<r.unsafe.length;){const s=r.unsafe[a],o=r.compilePattern(s);let l;if(s.atBreak)for(;l=o.exec(n);){let c=l.index;n.charCodeAt(c)===10&&n.charCodeAt(c-1)===13&&c--,n=n.slice(0,c)+" "+n.slice(l.index+1)}}return i+n+i}function CL(){return"`"}function L3(e,t){const r=_m(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}M3.peek=SL;function M3(e,t,r,n){const i=Em(r),a=i==='"'?"Quote":"Apostrophe",s=r.createTracker(n);let o,l;if(L3(e,r)){const u=r.stack;r.stack=[],o=r.enter("autolink");let h=s.move("<");return h+=s.move(r.containerPhrasing(e,{before:h,after:">",...s.current()})),h+=s.move(">"),o(),r.stack=u,h}o=r.enter("link"),l=r.enter("label");let c=s.move("[");return c+=s.move(r.containerPhrasing(e,{before:c,after:"](",...s.current()})),c+=s.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=r.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(r.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(l=r.enter("destinationRaw"),c+=s.move(r.safe(e.url,{before:c,after:e.title?" ":")",...s.current()}))),l(),e.title&&(l=r.enter(`title${a}`),c+=s.move(" "+i),c+=s.move(r.safe(e.title,{before:c,after:i,...s.current()})),c+=s.move(i),l()),c+=s.move(")"),o(),c}function SL(e,t,r){return L3(e,r)?"<":"["}I3.peek=EL;function I3(e,t,r,n){const i=e.referenceType,a=r.enter("linkReference");let s=r.enter("label");const o=r.createTracker(n);let l=o.move("[");const c=r.containerPhrasing(e,{before:l,after:"]",...o.current()});l+=o.move(c+"]["),s();const u=r.stack;r.stack=[],s=r.enter("reference");const h=r.safe(r.associationId(e),{before:l,after:"]",...o.current()});return s(),r.stack=u,a(),i==="full"||!c||c!==h?l+=o.move(h+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function EL(){return"["}function Am(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function _L(e){const t=Am(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function AL(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function R3(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function NL(e,t,r,n){const i=r.enter("list"),a=r.bulletCurrent;let s=e.ordered?AL(r):Am(r);const o=e.ordered?s==="."?")":".":_L(r);let l=t&&r.bulletLastUsed?s===r.bulletLastUsed:!1;if(!e.ordered){const u=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&u&&(!u.children||!u.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(l=!0),R3(r)===s&&u){let h=-1;for(;++h<e.children.length;){const d=e.children[h];if(d&&d.type==="listItem"&&d.children&&d.children[0]&&d.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(s=o),r.bulletCurrent=s;const c=r.containerFlow(e,n);return r.bulletLastUsed=s,r.bulletCurrent=a,i(),c}function LL(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function ML(e,t,r,n){const i=LL(r);let a=r.bulletCurrent||Am(r);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let s=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const o=r.createTracker(n);o.move(a+" ".repeat(s-a.length)),o.shift(s);const l=r.enter("listItem"),c=r.indentLines(r.containerFlow(e,o.current()),u);return l(),c;function u(h,d,f){return d?(f?"":" ".repeat(s))+h:(f?a:a+" ".repeat(s-a.length))+h}}function IL(e,t,r,n){const i=r.enter("paragraph"),a=r.enter("phrasing"),s=r.containerPhrasing(e,n);return a(),i(),s}const RL=lc(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function BL(e,t,r,n){return(e.children.some(function(s){return RL(s)})?r.containerPhrasing:r.containerFlow).call(r,e,n)}function DL(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}B3.peek=OL;function B3(e,t,r,n){const i=DL(r),a=r.enter("strong"),s=r.createTracker(n),o=s.move(i+i);let l=s.move(r.containerPhrasing(e,{after:i,before:o,...s.current()}));const c=l.charCodeAt(0),u=$u(n.before.charCodeAt(n.before.length-1),c,i);u.inside&&(l=$l(c)+l.slice(1));const h=l.charCodeAt(l.length-1),d=$u(n.after.charCodeAt(0),h,i);d.inside&&(l=l.slice(0,-1)+$l(h));const f=s.move(i+i);return a(),r.attentionEncodeSurroundingInfo={after:d.outside,before:u.outside},o+l+f}function OL(e,t,r){return r.options.strong||"*"}function PL(e,t,r,n){return r.safe(e.value,n)}function FL(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function $L(e,t,r){const n=(R3(r)+(r.options.ruleSpaces?" ":"")).repeat(FL(r));return r.options.ruleSpaces?n.slice(0,-1):n}const D3={blockquote:oL,break:w2,code:dL,definition:pL,emphasis:C3,hardBreak:w2,heading:vL,html:E3,image:_3,imageReference:A3,inlineCode:N3,link:M3,linkReference:I3,list:NL,listItem:ML,paragraph:IL,root:BL,strong:B3,text:PL,thematicBreak:$L},C2=document.createElement("i");function Nm(e){const t="&"+e+";";C2.innerHTML=t;const r=C2.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function O3(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}const zL=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function HL(e){return e.replace(zL,qL)}function qL(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const i=r.charCodeAt(1),a=i===120||i===88;return O3(r.slice(a?2:1),a?16:10)}return Nm(r)||e}function jL(){return{enter:{table:UL,tableData:S2,tableHeader:S2,tableRow:GL},exit:{codeText:YL,table:WL,tableData:ad,tableHeader:ad,tableRow:ad}}}function UL(e){const t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function WL(e){this.exit(e),this.data.inTable=void 0}function GL(e){this.enter({type:"tableRow",children:[]},e)}function ad(e){this.exit(e)}function S2(e){this.enter({type:"tableCell",children:[]},e)}function YL(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,VL));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function VL(e,t){return t==="|"?t:e}function XL(e){const t=e||{},r=t.tableCellPadding,n=t.tablePipeAlign,i=t.stringLength,a=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
16
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:d,table:s,tableCell:l,tableRow:o}};function s(f,p,m,b){return c(u(f,m,b),f.align)}function o(f,p,m,b){const y=h(f,m,b),v=c([y]);return v.slice(0,v.indexOf(`
|
|
17
|
+
`))}function l(f,p,m,b){const y=m.enter("tableCell"),v=m.enter("phrasing"),T=m.containerPhrasing(f,{...b,before:a,after:a});return v(),y(),T}function c(f,p){return aL(f,{align:p,alignDelimiters:n,padding:r,stringLength:i})}function u(f,p,m){const b=f.children;let y=-1;const v=[],T=p.enter("table");for(;++y<b.length;)v[y]=h(b[y],p,m);return T(),v}function h(f,p,m){const b=f.children;let y=-1;const v=[],T=p.enter("tableRow");for(;++y<b.length;)v[y]=l(b[y],f,p,m);return T(),v}function d(f,p,m){let b=D3.inlineCode(f,p,m);return m.stack.includes("tableCell")&&(b=b.replace(/\|/g,"\\$&")),b}}function KL(){return{exit:{taskListCheckValueChecked:E2,taskListCheckValueUnchecked:E2,paragraph:ZL}}}function QL(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:JL}}}function E2(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function ZL(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const n=r.children[0];if(n&&n.type==="text"){const i=t.children;let a=-1,s;for(;++a<i.length;){const o=i[a];if(o.type==="paragraph"){s=o;break}}s===r&&(n.value=n.value.slice(1),n.value.length===0?r.children.shift():r.position&&n.position&&typeof n.position.start.offset=="number"&&(n.position.start.column++,n.position.start.offset++,r.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function JL(e,t,r,n){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",o=r.createTracker(n);a&&o.move(s);let l=D3.listItem(e,t,r,{...n,...o.current()});return a&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+s}}function eM(){return[AN(),XN(),JN(),jL(),KL()]}function tM(e){return{extensions:[NN(),KN(e),eL(),XL(e),QL()]}}function mn(e,t,r,n){const i=e.length;let a=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,r=r>0?r:0,n.length<1e4)s=Array.from(n),s.unshift(t,r),e.splice(...s);else for(r&&e.splice(t,r);a<n.length;)s=n.slice(a,a+1e4),s.unshift(t,0),e.splice(...s),a+=1e4,t+=1e4}function Sn(e,t){return e.length>0?(mn(e,e.length,0,t),e):t}const _2={}.hasOwnProperty;function P3(e){const t={};let r=-1;for(;++r<e.length;)rM(t,e[r]);return t}function rM(e,t){let r;for(r in t){const i=(_2.call(e,r)?e[r]:void 0)||(e[r]={}),a=t[r];let s;if(a)for(s in a){_2.call(i,s)||(i[s]=[]);const o=a[s];nM(i[s],Array.isArray(o)?o:o?[o]:[])}}}function nM(e,t){let r=-1;const n=[];for(;++r<t.length;)(t[r].add==="after"?e:n).push(t[r]);mn(e,0,0,n)}const iM={tokenize:uM,partial:!0},F3={tokenize:hM,partial:!0},$3={tokenize:dM,partial:!0},z3={tokenize:fM,partial:!0},aM={tokenize:pM,partial:!0},H3={name:"wwwAutolink",tokenize:lM,previous:j3},q3={name:"protocolAutolink",tokenize:cM,previous:U3},Wi={name:"emailAutolink",tokenize:oM,previous:W3},di={};function sM(){return{text:di}}let Na=48;for(;Na<123;)di[Na]=Wi,Na++,Na===58?Na=65:Na===91&&(Na=97);di[43]=Wi;di[45]=Wi;di[46]=Wi;di[95]=Wi;di[72]=[Wi,q3];di[104]=[Wi,q3];di[87]=[Wi,H3];di[119]=[Wi,H3];function oM(e,t,r){const n=this;let i,a;return s;function s(h){return!_f(h)||!W3.call(n,n.previous)||Lm(n.events)?r(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(h))}function o(h){return _f(h)?(e.consume(h),o):h===64?(e.consume(h),l):r(h)}function l(h){return h===46?e.check(aM,u,c)(h):h===45||h===95||Ir(h)?(a=!0,e.consume(h),l):u(h)}function c(h){return e.consume(h),i=!0,l}function u(h){return a&&i&&zr(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(h)):r(h)}}function lM(e,t,r){const n=this;return i;function i(s){return s!==87&&s!==119||!j3.call(n,n.previous)||Lm(n.events)?r(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(iM,e.attempt(F3,e.attempt($3,a),r),r)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function cM(e,t,r){const n=this;let i="",a=!1;return s;function s(h){return(h===72||h===104)&&U3.call(n,n.previous)&&!Lm(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(h),e.consume(h),o):r(h)}function o(h){if(zr(h)&&i.length<5)return i+=String.fromCodePoint(h),e.consume(h),o;if(h===58){const d=i.toLowerCase();if(d==="http"||d==="https")return e.consume(h),l}return r(h)}function l(h){return h===47?(e.consume(h),a?c:(a=!0,l)):r(h)}function c(h){return h===null||Fu(h)||Dt(h)||Va(h)||K0(h)?r(h):e.attempt(F3,e.attempt($3,u),r)(h)}function u(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(h)}}function uM(e,t,r){let n=0;return i;function i(s){return(s===87||s===119)&&n<3?(n++,e.consume(s),i):s===46&&n===3?(e.consume(s),a):r(s)}function a(s){return s===null?r(s):t(s)}}function hM(e,t,r){let n,i,a;return s;function s(c){return c===46||c===95?e.check(z3,l,o)(c):c===null||Dt(c)||Va(c)||c!==45&&K0(c)?l(c):(a=!0,e.consume(c),s)}function o(c){return c===95?n=!0:(i=n,n=void 0),e.consume(c),s}function l(c){return i||n||!a?r(c):t(c)}}function dM(e,t){let r=0,n=0;return i;function i(s){return s===40?(r++,e.consume(s),i):s===41&&n<r?a(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(z3,t,a)(s):s===null||Dt(s)||Va(s)?t(s):(e.consume(s),i)}function a(s){return s===41&&n++,e.consume(s),i}}function fM(e,t,r){return n;function n(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),n):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||Dt(o)||Va(o)?t(o):r(o)}function i(o){return o===null||o===40||o===91||Dt(o)||Va(o)?t(o):n(o)}function a(o){return zr(o)?s(o):r(o)}function s(o){return o===59?(e.consume(o),n):zr(o)?(e.consume(o),s):r(o)}}function pM(e,t,r){return n;function n(a){return e.consume(a),i}function i(a){return Ir(a)?r(a):t(a)}}function j3(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Dt(e)}function U3(e){return!zr(e)}function W3(e){return!(e===47||_f(e))}function _f(e){return e===43||e===45||e===46||e===95||Ir(e)}function Lm(e){let t=e.length,r=!1;for(;t--;){const n=e[t][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}function go(e){const t=[];let r=-1,n=0,i=0;for(;++r<e.length;){const a=e.charCodeAt(r);let s="";if(a===37&&Ir(e.charCodeAt(r+1))&&Ir(e.charCodeAt(r+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(s=String.fromCharCode(a));else if(a>55295&&a<57344){const o=e.charCodeAt(r+1);a<56320&&o>56319&&o<57344?(s=String.fromCharCode(a,o),i=1):s="�"}else s=String.fromCharCode(a);s&&(t.push(e.slice(n,r),encodeURIComponent(s)),n=r+i+1,s=""),i&&(r+=i,i=0)}return t.join("")+e.slice(n)}function Q0(e,t,r){const n=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!n.includes(a)&&(t=a(t,r),n.push(a))}return t}const Af={name:"attention",resolveAll:mM,tokenize:gM};function mM(e,t){let r=-1,n,i,a,s,o,l,c,u;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(n=r;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[n][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;l=e[n][1].end.offset-e[n][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const h={...e[n][1].end},d={...e[r][1].start};A2(h,-l),A2(d,l),s={type:l>1?"strongSequence":"emphasisSequence",start:h,end:{...e[n][1].end}},o={type:l>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:d},a={type:l>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[r][1].start}},i={type:l>1?"strong":"emphasis",start:{...s.start},end:{...o.end}},e[n][1].end={...s.start},e[r][1].start={...o.end},c=[],e[n][1].end.offset-e[n][1].start.offset&&(c=Sn(c,[["enter",e[n][1],t],["exit",e[n][1],t]])),c=Sn(c,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),c=Sn(c,Q0(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),c=Sn(c,[["exit",a,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[r][1].end.offset-e[r][1].start.offset?(u=2,c=Sn(c,[["enter",e[r][1],t],["exit",e[r][1],t]])):u=0,mn(e,n-1,r-n+3,c),r=n+c.length-u-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function gM(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=Qs(n);let a;return s;function s(l){return a=l,e.enter("attentionSequence"),o(l)}function o(l){if(l===a)return e.consume(l),o;const c=e.exit("attentionSequence"),u=Qs(l),h=!u||u===2&&i||r.includes(l),d=!i||i===2&&u||r.includes(n);return c._open=!!(a===42?h:h&&(i||!d)),c._close=!!(a===42?d:d&&(u||!h)),t(l)}}function A2(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const bM={name:"autolink",tokenize:yM};function yM(e,t,r){let n=0;return i;function i(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(f){return zr(f)?(e.consume(f),s):f===64?r(f):c(f)}function s(f){return f===43||f===45||f===46||Ir(f)?(n=1,o(f)):c(f)}function o(f){return f===58?(e.consume(f),n=0,l):(f===43||f===45||f===46||Ir(f))&&n++<32?(e.consume(f),o):(n=0,c(f))}function l(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):f===null||f===32||f===60||Fu(f)?r(f):(e.consume(f),l)}function c(f){return f===64?(e.consume(f),u):vN(f)?(e.consume(f),c):r(f)}function u(f){return Ir(f)?h(f):r(f)}function h(f){return f===46?(e.consume(f),n=0,u):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):d(f)}function d(f){if((f===45||Ir(f))&&n++<63){const p=f===45?d:h;return e.consume(f),p}return r(f)}}function kt(e,t,r,n){const i=n?n-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(l){return wt(l)?(e.enter(r),o(l)):t(l)}function o(l){return wt(l)&&a++<i?(e.consume(l),o):(e.exit(r),t(l))}}const pc={partial:!0,tokenize:xM};function xM(e,t,r){return n;function n(a){return wt(a)?kt(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||Ge(a)?t(a):r(a)}}const G3={continuation:{tokenize:kM},exit:wM,name:"blockQuote",tokenize:vM};function vM(e,t,r){const n=this;return i;function i(s){if(s===62){const o=n.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return r(s)}function a(s){return wt(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function kM(e,t,r){const n=this;return i;function i(s){return wt(s)?kt(e,a,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(G3,t,r)(s)}}function wM(e){e.exit("blockQuote")}const Y3={name:"characterEscape",tokenize:TM};function TM(e,t,r){return n;function n(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return wN(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(a)}}const V3={name:"characterReference",tokenize:CM};function CM(e,t,r){const n=this;let i=0,a,s;return o;function o(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),l}function l(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),a=31,s=Ir,u(h))}function c(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=kN,u):(e.enter("characterReferenceValue"),a=7,s=Ef,u(h))}function u(h){if(h===59&&i){const d=e.exit("characterReferenceValue");return s===Ir&&!Nm(n.sliceSerialize(d))?r(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(h)&&i++<a?(e.consume(h),u):r(h)}}const N2={partial:!0,tokenize:EM},L2={concrete:!0,name:"codeFenced",tokenize:SM};function SM(e,t,r){const n=this,i={partial:!0,tokenize:E};let a=0,s=0,o;return l;function l(S){return c(S)}function c(S){const I=n.events[n.events.length-1];return a=I&&I[1].type==="linePrefix"?I[2].sliceSerialize(I[1],!0).length:0,o=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(S)}function u(S){return S===o?(s++,e.consume(S),u):s<3?r(S):(e.exit("codeFencedFenceSequence"),wt(S)?kt(e,h,"whitespace")(S):h(S))}function h(S){return S===null||Ge(S)?(e.exit("codeFencedFence"),n.interrupt?t(S):e.check(N2,m,A)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(S))}function d(S){return S===null||Ge(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(S)):wt(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),kt(e,f,"whitespace")(S)):S===96&&S===o?r(S):(e.consume(S),d)}function f(S){return S===null||Ge(S)?h(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(S))}function p(S){return S===null||Ge(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(S)):S===96&&S===o?r(S):(e.consume(S),p)}function m(S){return e.attempt(i,A,b)(S)}function b(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),y}function y(S){return a>0&&wt(S)?kt(e,v,"linePrefix",a+1)(S):v(S)}function v(S){return S===null||Ge(S)?e.check(N2,m,A)(S):(e.enter("codeFlowValue"),T(S))}function T(S){return S===null||Ge(S)?(e.exit("codeFlowValue"),v(S)):(e.consume(S),T)}function A(S){return e.exit("codeFenced"),t(S)}function E(S,I,D){let H=0;return R;function R(q){return S.enter("lineEnding"),S.consume(q),S.exit("lineEnding"),F}function F(q){return S.enter("codeFencedFence"),wt(q)?kt(S,G,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(q):G(q)}function G(q){return q===o?(S.enter("codeFencedFenceSequence"),ee(q)):D(q)}function ee(q){return q===o?(H++,S.consume(q),ee):H>=s?(S.exit("codeFencedFenceSequence"),wt(q)?kt(S,$,"whitespace")(q):$(q)):D(q)}function $(q){return q===null||Ge(q)?(S.exit("codeFencedFence"),I(q)):D(q)}}}function EM(e,t,r){const n=this;return i;function i(s){return s===null?r(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a)}function a(s){return n.parser.lazy[n.now().line]?r(s):t(s)}}const sd={name:"codeIndented",tokenize:AM},_M={partial:!0,tokenize:NM};function AM(e,t,r){const n=this;return i;function i(c){return e.enter("codeIndented"),kt(e,a,"linePrefix",5)(c)}function a(c){const u=n.events[n.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?s(c):r(c)}function s(c){return c===null?l(c):Ge(c)?e.attempt(_M,s,l)(c):(e.enter("codeFlowValue"),o(c))}function o(c){return c===null||Ge(c)?(e.exit("codeFlowValue"),s(c)):(e.consume(c),o)}function l(c){return e.exit("codeIndented"),t(c)}}function NM(e,t,r){const n=this;return i;function i(s){return n.parser.lazy[n.now().line]?r(s):Ge(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):kt(e,a,"linePrefix",5)(s)}function a(s){const o=n.events[n.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):Ge(s)?i(s):r(s)}}const LM={name:"codeText",previous:IM,resolve:MM,tokenize:RM};function MM(e){let t=e.length-4,r=3,n,i;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n<t;)if(e[n][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)i===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(i=n):(n===t||e[n][1].type==="lineEnding")&&(e[i][1].type="codeTextData",n!==i+2&&(e[i][1].end=e[n-1][1].end,e.splice(i+2,n-i-2),t-=n-i-2,n=i+2),i=void 0);return e}function IM(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function RM(e,t,r){let n=0,i,a;return s;function s(h){return e.enter("codeText"),e.enter("codeTextSequence"),o(h)}function o(h){return h===96?(e.consume(h),n++,o):(e.exit("codeTextSequence"),l(h))}function l(h){return h===null?r(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),l):h===96?(a=e.enter("codeTextSequence"),i=0,u(h)):Ge(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(h))}function c(h){return h===null||h===32||h===96||Ge(h)?(e.exit("codeTextData"),l(h)):(e.consume(h),c)}function u(h){return h===96?(e.consume(h),i++,u):i===n?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(a.type="codeTextData",c(h))}}class BM{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){const n=r??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(t,n):t>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(t,r,n){const i=r||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return n&&Do(this.left,n),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Do(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Do(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const r=this.left.splice(t,Number.POSITIVE_INFINITY);Do(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Do(this.left,r.reverse())}}}function Do(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function X3(e){const t={};let r=-1,n,i,a,s,o,l,c;const u=new BM(e);for(;++r<u.length;){for(;r in t;)r=t[r];if(n=u.get(r),r&&n[1].type==="chunkFlow"&&u.get(r-1)[1].type==="listItemPrefix"&&(l=n[1]._tokenizer.events,a=0,a<l.length&&l[a][1].type==="lineEndingBlank"&&(a+=2),a<l.length&&l[a][1].type==="content"))for(;++a<l.length&&l[a][1].type!=="content";)l[a][1].type==="chunkText"&&(l[a][1]._isInFirstContentOfListItem=!0,a++);if(n[0]==="enter")n[1].contentType&&(Object.assign(t,DM(u,r)),r=t[r],c=!0);else if(n[1]._container){for(a=r,i=void 0;a--;)if(s=u.get(a),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(u.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=a);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(n[1].end={...u.get(i)[1].start},o=u.slice(i,r),o.unshift(n),u.splice(i,r-i+1,o))}}return mn(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function DM(e,t){const r=e.get(t)[1],n=e.get(t)[2];let i=t-1;const a=[];let s=r._tokenizer;s||(s=n.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const o=s.events,l=[],c={};let u,h,d=-1,f=r,p=0,m=0;const b=[m];for(;f;){for(;e.get(++i)[1]!==f;);a.push(i),f._tokenizer||(u=n.sliceStream(f),f.next||u.push(null),h&&s.defineSkip(f.start),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(u),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),h=f,f=f.next}for(f=r;++d<o.length;)o[d][0]==="exit"&&o[d-1][0]==="enter"&&o[d][1].type===o[d-1][1].type&&o[d][1].start.line!==o[d][1].end.line&&(m=d+1,b.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(s.events=[],f?(f._tokenizer=void 0,f.previous=void 0):b.pop(),d=b.length;d--;){const y=o.slice(b[d],b[d+1]),v=a.pop();l.push([v,v+y.length-1]),e.splice(v,2,y)}for(l.reverse(),d=-1;++d<l.length;)c[p+l[d][0]]=p+l[d][1],p+=l[d][1]-l[d][0]-1;return c}const OM={resolve:FM,tokenize:$M},PM={partial:!0,tokenize:zM};function FM(e){return X3(e),e}function $M(e,t){let r;return n;function n(o){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?a(o):Ge(o)?e.check(PM,s,a)(o):(e.consume(o),i)}function a(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function s(o){return e.consume(o),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,i}}function zM(e,t,r){const n=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),kt(e,a,"linePrefix")}function a(s){if(s===null||Ge(s))return r(s);const o=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):e.interrupt(n.parser.constructs.flow,r,t)(s)}}function K3(e,t,r,n,i,a,s,o,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return h;function h(y){return y===60?(e.enter(n),e.enter(i),e.enter(a),e.consume(y),e.exit(a),d):y===null||y===32||y===41||Fu(y)?r(y):(e.enter(n),e.enter(s),e.enter(o),e.enter("chunkString",{contentType:"string"}),m(y))}function d(y){return y===62?(e.enter(a),e.consume(y),e.exit(a),e.exit(i),e.exit(n),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),f(y))}function f(y){return y===62?(e.exit("chunkString"),e.exit(o),d(y)):y===null||y===60||Ge(y)?r(y):(e.consume(y),y===92?p:f)}function p(y){return y===60||y===62||y===92?(e.consume(y),f):f(y)}function m(y){return!u&&(y===null||y===41||Dt(y))?(e.exit("chunkString"),e.exit(o),e.exit(s),e.exit(n),t(y)):u<c&&y===40?(e.consume(y),u++,m):y===41?(e.consume(y),u--,m):y===null||y===32||y===40||Fu(y)?r(y):(e.consume(y),y===92?b:m)}function b(y){return y===40||y===41||y===92?(e.consume(y),m):m(y)}}function Q3(e,t,r,n,i,a){const s=this;let o=0,l;return c;function c(f){return e.enter(n),e.enter(i),e.consume(f),e.exit(i),e.enter(a),u}function u(f){return o>999||f===null||f===91||f===93&&!l||f===94&&!o&&"_hiddenFootnoteSupport"in s.parser.constructs?r(f):f===93?(e.exit(a),e.enter(i),e.consume(f),e.exit(i),e.exit(n),t):Ge(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),h(f))}function h(f){return f===null||f===91||f===93||Ge(f)||o++>999?(e.exit("chunkString"),u(f)):(e.consume(f),l||(l=!wt(f)),f===92?d:h)}function d(f){return f===91||f===92||f===93?(e.consume(f),o++,h):h(f)}}function Z3(e,t,r,n,i,a){let s;return o;function o(d){return d===34||d===39||d===40?(e.enter(n),e.enter(i),e.consume(d),e.exit(i),s=d===40?41:d,l):r(d)}function l(d){return d===s?(e.enter(i),e.consume(d),e.exit(i),e.exit(n),t):(e.enter(a),c(d))}function c(d){return d===s?(e.exit(a),l(s)):d===null?r(d):Ge(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),kt(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(d){return d===s||d===null||Ge(d)?(e.exit("chunkString"),c(d)):(e.consume(d),d===92?h:u)}function h(d){return d===s||d===92?(e.consume(d),u):u(d)}}function Tl(e,t){let r;return n;function n(i){return Ge(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r=!0,n):wt(i)?kt(e,n,r?"linePrefix":"lineSuffix")(i):t(i)}}const HM={name:"definition",tokenize:jM},qM={partial:!0,tokenize:UM};function jM(e,t,r){const n=this;let i;return a;function a(f){return e.enter("definition"),s(f)}function s(f){return Q3.call(n,e,o,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function o(f){return i=zn(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),l):r(f)}function l(f){return Dt(f)?Tl(e,c)(f):c(f)}function c(f){return K3(e,u,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function u(f){return e.attempt(qM,h,h)(f)}function h(f){return wt(f)?kt(e,d,"whitespace")(f):d(f)}function d(f){return f===null||Ge(f)?(e.exit("definition"),n.parser.defined.push(i),t(f)):r(f)}}function UM(e,t,r){return n;function n(o){return Dt(o)?Tl(e,i)(o):r(o)}function i(o){return Z3(e,a,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function a(o){return wt(o)?kt(e,s,"whitespace")(o):s(o)}function s(o){return o===null||Ge(o)?t(o):r(o)}}const WM={name:"hardBreakEscape",tokenize:GM};function GM(e,t,r){return n;function n(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return Ge(a)?(e.exit("hardBreakEscape"),t(a)):r(a)}}const YM={name:"headingAtx",resolve:VM,tokenize:XM};function VM(e,t){let r=e.length-2,n=3,i,a;return e[n][1].type==="whitespace"&&(n+=2),r-2>n&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(n===r-1||r-4>n&&e[r-2][1].type==="whitespace")&&(r-=n+1===r?2:4),r>n&&(i={type:"atxHeadingText",start:e[n][1].start,end:e[r][1].end},a={type:"chunkText",start:e[n][1].start,end:e[r][1].end,contentType:"text"},mn(e,n,r-n+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function XM(e,t,r){let n=0;return i;function i(u){return e.enter("atxHeading"),a(u)}function a(u){return e.enter("atxHeadingSequence"),s(u)}function s(u){return u===35&&n++<6?(e.consume(u),s):u===null||Dt(u)?(e.exit("atxHeadingSequence"),o(u)):r(u)}function o(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||Ge(u)?(e.exit("atxHeading"),t(u)):wt(u)?kt(e,o,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function l(u){return u===35?(e.consume(u),l):(e.exit("atxHeadingSequence"),o(u))}function c(u){return u===null||u===35||Dt(u)?(e.exit("atxHeadingText"),o(u)):(e.consume(u),c)}}const KM=["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"],M2=["pre","script","style","textarea"],QM={concrete:!0,name:"htmlFlow",resolveTo:eI,tokenize:tI},ZM={partial:!0,tokenize:nI},JM={partial:!0,tokenize:rI};function eI(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function tI(e,t,r){const n=this;let i,a,s,o,l;return c;function c(N){return u(N)}function u(N){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(N),h}function h(N){return N===33?(e.consume(N),d):N===47?(e.consume(N),a=!0,m):N===63?(e.consume(N),i=3,n.interrupt?t:L):zr(N)?(e.consume(N),s=String.fromCharCode(N),b):r(N)}function d(N){return N===45?(e.consume(N),i=2,f):N===91?(e.consume(N),i=5,o=0,p):zr(N)?(e.consume(N),i=4,n.interrupt?t:L):r(N)}function f(N){return N===45?(e.consume(N),n.interrupt?t:L):r(N)}function p(N){const ke="CDATA[";return N===ke.charCodeAt(o++)?(e.consume(N),o===ke.length?n.interrupt?t:G:p):r(N)}function m(N){return zr(N)?(e.consume(N),s=String.fromCharCode(N),b):r(N)}function b(N){if(N===null||N===47||N===62||Dt(N)){const ke=N===47,ge=s.toLowerCase();return!ke&&!a&&M2.includes(ge)?(i=1,n.interrupt?t(N):G(N)):KM.includes(s.toLowerCase())?(i=6,ke?(e.consume(N),y):n.interrupt?t(N):G(N)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(N):a?v(N):T(N))}return N===45||Ir(N)?(e.consume(N),s+=String.fromCharCode(N),b):r(N)}function y(N){return N===62?(e.consume(N),n.interrupt?t:G):r(N)}function v(N){return wt(N)?(e.consume(N),v):R(N)}function T(N){return N===47?(e.consume(N),R):N===58||N===95||zr(N)?(e.consume(N),A):wt(N)?(e.consume(N),T):R(N)}function A(N){return N===45||N===46||N===58||N===95||Ir(N)?(e.consume(N),A):E(N)}function E(N){return N===61?(e.consume(N),S):wt(N)?(e.consume(N),E):T(N)}function S(N){return N===null||N===60||N===61||N===62||N===96?r(N):N===34||N===39?(e.consume(N),l=N,I):wt(N)?(e.consume(N),S):D(N)}function I(N){return N===l?(e.consume(N),l=null,H):N===null||Ge(N)?r(N):(e.consume(N),I)}function D(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||Dt(N)?E(N):(e.consume(N),D)}function H(N){return N===47||N===62||wt(N)?T(N):r(N)}function R(N){return N===62?(e.consume(N),F):r(N)}function F(N){return N===null||Ge(N)?G(N):wt(N)?(e.consume(N),F):r(N)}function G(N){return N===45&&i===2?(e.consume(N),W):N===60&&i===1?(e.consume(N),Z):N===62&&i===4?(e.consume(N),ae):N===63&&i===3?(e.consume(N),L):N===93&&i===5?(e.consume(N),ve):Ge(N)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(ZM,ne,ee)(N)):N===null||Ge(N)?(e.exit("htmlFlowData"),ee(N)):(e.consume(N),G)}function ee(N){return e.check(JM,$,ne)(N)}function $(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),q}function q(N){return N===null||Ge(N)?ee(N):(e.enter("htmlFlowData"),G(N))}function W(N){return N===45?(e.consume(N),L):G(N)}function Z(N){return N===47?(e.consume(N),s="",V):G(N)}function V(N){if(N===62){const ke=s.toLowerCase();return M2.includes(ke)?(e.consume(N),ae):G(N)}return zr(N)&&s.length<8?(e.consume(N),s+=String.fromCharCode(N),V):G(N)}function ve(N){return N===93?(e.consume(N),L):G(N)}function L(N){return N===62?(e.consume(N),ae):N===45&&i===2?(e.consume(N),L):G(N)}function ae(N){return N===null||Ge(N)?(e.exit("htmlFlowData"),ne(N)):(e.consume(N),ae)}function ne(N){return e.exit("htmlFlow"),t(N)}}function rI(e,t,r){const n=this;return i;function i(s){return Ge(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):r(s)}function a(s){return n.parser.lazy[n.now().line]?r(s):t(s)}}function nI(e,t,r){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(pc,t,r)}}const iI={name:"htmlText",tokenize:aI};function aI(e,t,r){const n=this;let i,a,s;return o;function o(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),l}function l(L){return L===33?(e.consume(L),c):L===47?(e.consume(L),E):L===63?(e.consume(L),T):zr(L)?(e.consume(L),D):r(L)}function c(L){return L===45?(e.consume(L),u):L===91?(e.consume(L),a=0,p):zr(L)?(e.consume(L),v):r(L)}function u(L){return L===45?(e.consume(L),f):r(L)}function h(L){return L===null?r(L):L===45?(e.consume(L),d):Ge(L)?(s=h,Z(L)):(e.consume(L),h)}function d(L){return L===45?(e.consume(L),f):h(L)}function f(L){return L===62?W(L):L===45?d(L):h(L)}function p(L){const ae="CDATA[";return L===ae.charCodeAt(a++)?(e.consume(L),a===ae.length?m:p):r(L)}function m(L){return L===null?r(L):L===93?(e.consume(L),b):Ge(L)?(s=m,Z(L)):(e.consume(L),m)}function b(L){return L===93?(e.consume(L),y):m(L)}function y(L){return L===62?W(L):L===93?(e.consume(L),y):m(L)}function v(L){return L===null||L===62?W(L):Ge(L)?(s=v,Z(L)):(e.consume(L),v)}function T(L){return L===null?r(L):L===63?(e.consume(L),A):Ge(L)?(s=T,Z(L)):(e.consume(L),T)}function A(L){return L===62?W(L):T(L)}function E(L){return zr(L)?(e.consume(L),S):r(L)}function S(L){return L===45||Ir(L)?(e.consume(L),S):I(L)}function I(L){return Ge(L)?(s=I,Z(L)):wt(L)?(e.consume(L),I):W(L)}function D(L){return L===45||Ir(L)?(e.consume(L),D):L===47||L===62||Dt(L)?H(L):r(L)}function H(L){return L===47?(e.consume(L),W):L===58||L===95||zr(L)?(e.consume(L),R):Ge(L)?(s=H,Z(L)):wt(L)?(e.consume(L),H):W(L)}function R(L){return L===45||L===46||L===58||L===95||Ir(L)?(e.consume(L),R):F(L)}function F(L){return L===61?(e.consume(L),G):Ge(L)?(s=F,Z(L)):wt(L)?(e.consume(L),F):H(L)}function G(L){return L===null||L===60||L===61||L===62||L===96?r(L):L===34||L===39?(e.consume(L),i=L,ee):Ge(L)?(s=G,Z(L)):wt(L)?(e.consume(L),G):(e.consume(L),$)}function ee(L){return L===i?(e.consume(L),i=void 0,q):L===null?r(L):Ge(L)?(s=ee,Z(L)):(e.consume(L),ee)}function $(L){return L===null||L===34||L===39||L===60||L===61||L===96?r(L):L===47||L===62||Dt(L)?H(L):(e.consume(L),$)}function q(L){return L===47||L===62||Dt(L)?H(L):r(L)}function W(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),t):r(L)}function Z(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),V}function V(L){return wt(L)?kt(e,ve,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):ve(L)}function ve(L){return e.enter("htmlTextData"),s(L)}}const Mm={name:"labelEnd",resolveAll:cI,resolveTo:uI,tokenize:hI},sI={tokenize:dI},oI={tokenize:fI},lI={tokenize:pI};function cI(e){let t=-1;const r=[];for(;++t<e.length;){const n=e[t][1];if(r.push(e[t]),n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd"){const i=n.type==="labelImage"?4:2;n.type="data",t+=i}}return e.length!==r.length&&mn(e,0,e.length,r),e}function uI(e,t){let r=e.length,n=0,i,a,s,o;for(;r--;)if(i=e[r][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[r][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[r][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=r,i.type!=="labelLink")){n=2;break}}else i.type==="labelEnd"&&(s=r);const l={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[a][1].start},end:{...e[s][1].end}},u={type:"labelText",start:{...e[a+n+2][1].end},end:{...e[s-2][1].start}};return o=[["enter",l,t],["enter",c,t]],o=Sn(o,e.slice(a+1,a+n+3)),o=Sn(o,[["enter",u,t]]),o=Sn(o,Q0(t.parser.constructs.insideSpan.null,e.slice(a+n+4,s-3),t)),o=Sn(o,[["exit",u,t],e[s-2],e[s-1],["exit",c,t]]),o=Sn(o,e.slice(s+1)),o=Sn(o,[["exit",l,t]]),mn(e,a,e.length,o),e}function hI(e,t,r){const n=this;let i=n.events.length,a,s;for(;i--;)if((n.events[i][1].type==="labelImage"||n.events[i][1].type==="labelLink")&&!n.events[i][1]._balanced){a=n.events[i][1];break}return o;function o(d){return a?a._inactive?h(d):(s=n.parser.defined.includes(zn(n.sliceSerialize({start:a.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),l):r(d)}function l(d){return d===40?e.attempt(sI,u,s?u:h)(d):d===91?e.attempt(oI,u,s?c:h)(d):s?u(d):h(d)}function c(d){return e.attempt(lI,u,h)(d)}function u(d){return t(d)}function h(d){return a._balanced=!0,r(d)}}function dI(e,t,r){return n;function n(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),i}function i(h){return Dt(h)?Tl(e,a)(h):a(h)}function a(h){return h===41?u(h):K3(e,s,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function s(h){return Dt(h)?Tl(e,l)(h):u(h)}function o(h){return r(h)}function l(h){return h===34||h===39||h===40?Z3(e,c,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):u(h)}function c(h){return Dt(h)?Tl(e,u)(h):u(h)}function u(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):r(h)}}function fI(e,t,r){const n=this;return i;function i(o){return Q3.call(n,e,a,s,"reference","referenceMarker","referenceString")(o)}function a(o){return n.parser.defined.includes(zn(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(o):r(o)}function s(o){return r(o)}}function pI(e,t,r){return n;function n(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):r(a)}}const mI={name:"labelStartImage",resolveAll:Mm.resolveAll,tokenize:gI};function gI(e,t,r){const n=this;return i;function i(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),a}function a(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),s):r(o)}function s(o){return o===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(o):t(o)}}const bI={name:"labelStartLink",resolveAll:Mm.resolveAll,tokenize:yI};function yI(e,t,r){const n=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),a}function a(s){return s===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(s):t(s)}}const od={name:"lineEnding",tokenize:xI};function xI(e,t){return r;function r(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),kt(e,t,"linePrefix")}}const pu={name:"thematicBreak",tokenize:vI};function vI(e,t,r){let n=0,i;return a;function a(c){return e.enter("thematicBreak"),s(c)}function s(c){return i=c,o(c)}function o(c){return c===i?(e.enter("thematicBreakSequence"),l(c)):n>=3&&(c===null||Ge(c))?(e.exit("thematicBreak"),t(c)):r(c)}function l(c){return c===i?(e.consume(c),n++,l):(e.exit("thematicBreakSequence"),wt(c)?kt(e,o,"whitespace")(c):o(c))}}const Jr={continuation:{tokenize:CI},exit:EI,name:"list",tokenize:TI},kI={partial:!0,tokenize:_I},wI={partial:!0,tokenize:SI};function TI(e,t,r){const n=this,i=n.events[n.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return o;function o(f){const p=n.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!n.containerState.marker||f===n.containerState.marker:Ef(f)){if(n.containerState.type||(n.containerState.type=p,e.enter(p,{_container:!0})),p==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(pu,r,c)(f):c(f);if(!n.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(f)}return r(f)}function l(f){return Ef(f)&&++s<10?(e.consume(f),l):(!n.interrupt||s<2)&&(n.containerState.marker?f===n.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),c(f)):r(f)}function c(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||f,e.check(pc,n.interrupt?r:u,e.attempt(kI,d,h))}function u(f){return n.containerState.initialBlankLine=!0,a++,d(f)}function h(f){return wt(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),d):r(f)}function d(f){return n.containerState.size=a+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function CI(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(pc,i,a);function i(o){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,kt(e,t,"listItemIndent",n.containerState.size+1)(o)}function a(o){return n.containerState.furtherBlankLines||!wt(o)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,s(o)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(wI,t,s)(o))}function s(o){return n.containerState._closeFlow=!0,n.interrupt=void 0,kt(e,e.attempt(Jr,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function SI(e,t,r){const n=this;return kt(e,i,"listItemIndent",n.containerState.size+1);function i(a){const s=n.events[n.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===n.containerState.size?t(a):r(a)}}function EI(e){e.exit(this.containerState.type)}function _I(e,t,r){const n=this;return kt(e,i,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=n.events[n.events.length-1];return!wt(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):r(a)}}const I2={name:"setextUnderline",resolveTo:AI,tokenize:NI};function AI(e,t){let r=e.length,n,i,a;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){n=r;break}e[r][1].type==="paragraph"&&(i=r)}else e[r][1].type==="content"&&e.splice(r,1),!a&&e[r][1].type==="definition"&&(a=r);const s={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",s,t]),e.splice(a+1,0,["exit",e[n][1],t]),e[n][1].end={...e[a][1].end}):e[n][1]=s,e.push(["exit",s,t]),e}function NI(e,t,r){const n=this;let i;return a;function a(c){let u=n.events.length,h;for(;u--;)if(n.events[u][1].type!=="lineEnding"&&n.events[u][1].type!=="linePrefix"&&n.events[u][1].type!=="content"){h=n.events[u][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||h)?(e.enter("setextHeadingLine"),i=c,s(c)):r(c)}function s(c){return e.enter("setextHeadingLineSequence"),o(c)}function o(c){return c===i?(e.consume(c),o):(e.exit("setextHeadingLineSequence"),wt(c)?kt(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||Ge(c)?(e.exit("setextHeadingLine"),t(c)):r(c)}}const LI={tokenize:FI,partial:!0};function MI(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:DI,continuation:{tokenize:OI},exit:PI}},text:{91:{name:"gfmFootnoteCall",tokenize:BI},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:II,resolveTo:RI}}}}function II(e,t,r){const n=this;let i=n.events.length;const a=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let s;for(;i--;){const l=n.events[i][1];if(l.type==="labelImage"){s=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return o;function o(l){if(!s||!s._balanced)return r(l);const c=zn(n.sliceSerialize({start:s.end,end:n.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?r(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function RI(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},o=[e[r+1],e[r+2],["enter",n,t],e[r+3],e[r+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",n,t]];return e.splice(r,e.length-r+1,...o),e}function BI(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a=0,s;return o;function o(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),l}function l(h){return h!==94?r(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(h){if(a>999||h===93&&!s||h===null||h===91||Dt(h))return r(h);if(h===93){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return i.includes(zn(n.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(h)}return Dt(h)||(s=!0),a++,e.consume(h),h===92?u:c}function u(h){return h===91||h===92||h===93?(e.consume(h),a++,c):c(h)}}function DI(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a,s=0,o;return l;function l(p){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(p){return p===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):r(p)}function u(p){if(s>999||p===93&&!o||p===null||p===91||Dt(p))return r(p);if(p===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return a=zn(n.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return Dt(p)||(o=!0),s++,e.consume(p),p===92?h:u}function h(p){return p===91||p===92||p===93?(e.consume(p),s++,u):u(p)}function d(p){return p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),i.includes(a)||i.push(a),kt(e,f,"gfmFootnoteDefinitionWhitespace")):r(p)}function f(p){return t(p)}}function OI(e,t,r){return e.check(pc,t,e.attempt(LI,t,r))}function PI(e){e.exit("gfmFootnoteDefinition")}function FI(e,t,r){const n=this;return kt(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const s=n.events[n.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(a):r(a)}}function $I(e){let r=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:a,resolveAll:i};return r==null&&(r=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function i(s,o){let l=-1;for(;++l<s.length;)if(s[l][0]==="enter"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._close){let c=l;for(;c--;)if(s[c][0]==="exit"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._open&&s[l][1].end.offset-s[l][1].start.offset===s[c][1].end.offset-s[c][1].start.offset){s[l][1].type="strikethroughSequence",s[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},s[c][1].start),end:Object.assign({},s[l][1].end)},h={type:"strikethroughText",start:Object.assign({},s[c][1].end),end:Object.assign({},s[l][1].start)},d=[["enter",u,o],["enter",s[c][1],o],["exit",s[c][1],o],["enter",h,o]],f=o.parser.constructs.insideSpan.null;f&&mn(d,d.length,0,Q0(f,s.slice(c+1,l),o)),mn(d,d.length,0,[["exit",h,o],["enter",s[l][1],o],["exit",s[l][1],o],["exit",u,o]]),mn(s,c-1,l-c+3,d),l=c+d.length-2;break}}for(l=-1;++l<s.length;)s[l][1].type==="strikethroughSequenceTemporary"&&(s[l][1].type="data");return s}function a(s,o,l){const c=this.previous,u=this.events;let h=0;return d;function d(p){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(p):(s.enter("strikethroughSequenceTemporary"),f(p))}function f(p){const m=Qs(c);if(p===126)return h>1?l(p):(s.consume(p),h++,f);if(h<2&&!r)return l(p);const b=s.exit("strikethroughSequenceTemporary"),y=Qs(p);return b._open=!y||y===2&&!!m,b._close=!m||m===2&&!!y,o(p)}}}class zI{constructor(){this.map=[]}add(t,r,n){HI(this,t,r,n)}consume(t){if(this.map.sort(function(a,s){return a[0]-s[0]}),this.map.length===0)return;let r=this.map.length;const n=[];for(;r>0;)r-=1,n.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];n.push(t.slice()),t.length=0;let i=n.pop();for(;i;){for(const a of i)t.push(a);i=n.pop()}this.map.length=0}}function HI(e,t,r,n){let i=0;if(!(r===0&&n.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=r,e.map[i][2].push(...n);return}i+=1}e.map.push([t,r,n])}}function qI(e,t){let r=!1;const n=[];for(;t<e.length;){const i=e[t];if(r){if(i[0]==="enter")i[1].type==="tableContent"&&n.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=n.length-1;n[a]=n[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return n}function jI(){return{flow:{null:{name:"table",tokenize:UI,resolveAll:WI}}}}function UI(e,t,r){const n=this;let i=0,a=0,s;return o;function o(R){let F=n.events.length-1;for(;F>-1;){const $=n.events[F][1].type;if($==="lineEnding"||$==="linePrefix")F--;else break}const G=F>-1?n.events[F][1].type:null,ee=G==="tableHead"||G==="tableRow"?S:l;return ee===S&&n.parser.lazy[n.now().line]?r(R):ee(R)}function l(R){return e.enter("tableHead"),e.enter("tableRow"),c(R)}function c(R){return R===124||(s=!0,a+=1),u(R)}function u(R){return R===null?r(R):Ge(R)?a>1?(a=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),f):r(R):wt(R)?kt(e,u,"whitespace")(R):(a+=1,s&&(s=!1,i+=1),R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),s=!0,u):(e.enter("data"),h(R)))}function h(R){return R===null||R===124||Dt(R)?(e.exit("data"),u(R)):(e.consume(R),R===92?d:h)}function d(R){return R===92||R===124?(e.consume(R),h):h(R)}function f(R){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(R):(e.enter("tableDelimiterRow"),s=!1,wt(R)?kt(e,p,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):p(R))}function p(R){return R===45||R===58?b(R):R===124?(s=!0,e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),m):E(R)}function m(R){return wt(R)?kt(e,b,"whitespace")(R):b(R)}function b(R){return R===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),y):R===45?(a+=1,y(R)):R===null||Ge(R)?A(R):E(R)}function y(R){return R===45?(e.enter("tableDelimiterFiller"),v(R)):E(R)}function v(R){return R===45?(e.consume(R),v):R===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),T):(e.exit("tableDelimiterFiller"),T(R))}function T(R){return wt(R)?kt(e,A,"whitespace")(R):A(R)}function A(R){return R===124?p(R):R===null||Ge(R)?!s||i!==a?E(R):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(R)):E(R)}function E(R){return r(R)}function S(R){return e.enter("tableRow"),I(R)}function I(R){return R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),I):R===null||Ge(R)?(e.exit("tableRow"),t(R)):wt(R)?kt(e,I,"whitespace")(R):(e.enter("data"),D(R))}function D(R){return R===null||R===124||Dt(R)?(e.exit("data"),I(R)):(e.consume(R),R===92?H:D)}function H(R){return R===92||R===124?(e.consume(R),D):D(R)}}function WI(e,t){let r=-1,n=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],o=!1,l=0,c,u,h;const d=new zI;for(;++r<e.length;){const f=e[r],p=f[1];f[0]==="enter"?p.type==="tableHead"?(o=!1,l!==0&&(R2(d,t,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},d.add(r,0,[["enter",c,t]])):p.type==="tableRow"||p.type==="tableDelimiterRow"?(n=!0,h=void 0,a=[0,0,0,0],s=[0,r+1,0,0],o&&(o=!1,u={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},d.add(r,0,[["enter",u,t]])),i=p.type==="tableDelimiterRow"?2:u?3:1):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")?(n=!1,s[2]===0&&(a[1]!==0&&(s[0]=s[1],h=Ic(d,t,a,i,void 0,h),a=[0,0,0,0]),s[2]=r)):p.type==="tableCellDivider"&&(n?n=!1:(a[1]!==0&&(s[0]=s[1],h=Ic(d,t,a,i,void 0,h)),a=s,s=[a[1],r,0,0])):p.type==="tableHead"?(o=!0,l=r):p.type==="tableRow"||p.type==="tableDelimiterRow"?(l=r,a[1]!==0?(s[0]=s[1],h=Ic(d,t,a,i,r,h)):s[1]!==0&&(h=Ic(d,t,s,i,r,h)),i=0):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")&&(s[3]=r)}for(l!==0&&R2(d,t,l,c,u),d.consume(t.events),r=-1;++r<t.events.length;){const f=t.events[r];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=qI(t.events,r))}return e}function Ic(e,t,r,n,i,a){const s=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",o="tableContent";r[0]!==0&&(a.end=Object.assign({},Es(t.events,r[0])),e.add(r[0],0,[["exit",a,t]]));const l=Es(t.events,r[1]);if(a={type:s,start:Object.assign({},l),end:Object.assign({},l)},e.add(r[1],0,[["enter",a,t]]),r[2]!==0){const c=Es(t.events,r[2]),u=Es(t.events,r[3]),h={type:o,start:Object.assign({},c),end:Object.assign({},u)};if(e.add(r[2],0,[["enter",h,t]]),n!==2){const d=t.events[r[2]],f=t.events[r[3]];if(d[1].end=Object.assign({},f[1].end),d[1].type="chunkText",d[1].contentType="text",r[3]>r[2]+1){const p=r[2]+1,m=r[3]-r[2]-1;e.add(p,m,[])}}e.add(r[3]+1,0,[["exit",h,t]])}return i!==void 0&&(a.end=Object.assign({},Es(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function R2(e,t,r,n,i){const a=[],s=Es(t.events,r);i&&(i.end=Object.assign({},s),a.push(["exit",i,t])),n.end=Object.assign({},s),a.push(["exit",n,t]),e.add(r+1,0,a)}function Es(e,t){const r=e[t],n=r[0]==="enter"?"start":"end";return r[1][n]}const GI={name:"tasklistCheck",tokenize:VI};function YI(){return{text:{91:GI}}}function VI(e,t,r){const n=this;return i;function i(l){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?r(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),a)}function a(l){return Dt(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),s):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),s):r(l)}function s(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):r(l)}function o(l){return Ge(l)?t(l):wt(l)?e.check({tokenize:XI},t,r)(l):r(l)}}function XI(e,t,r){return kt(e,n,"whitespace");function n(i){return i===null?r(i):t(i)}}function KI(e){return P3([sM(),MI(),$I(e),jI(),YI()])}const QI={};function ZI(e){const t=this,r=e||QI,n=t.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),a=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),s=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(KI(r)),a.push(eM()),s.push(tM(r))}var JI=Object.defineProperty,eR=Object.defineProperties,tR=Object.getOwnPropertyDescriptors,B2=Object.getOwnPropertySymbols,rR=Object.prototype.hasOwnProperty,nR=Object.prototype.propertyIsEnumerable,D2=(e,t,r)=>t in e?JI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,J3=(e,t)=>{for(var r in t||(t={}))rR.call(t,r)&&D2(e,r,t[r]);if(B2)for(var r of B2(t))nR.call(t,r)&&D2(e,r,t[r]);return e},e6=(e,t)=>eR(e,tR(t)),iR=/(\*\*)([^*]*\*?)$/,aR=/(__)([^_]*?)$/,sR=/(\*\*\*)([^*]*?)$/,oR=/(\*)([^*]*?)$/,lR=/(_)([^_]*?)$/,cR=/(`)([^`]*?)$/,uR=/(~~)([^~]*?)$/,os=/^[\s_~*`]*$/,t6=/^[\s]*[-*+][\s]+$/,hR=/[\p{L}\p{N}_]/u,dR=/^```[^`\n]*```?$/,fR=/^\*{4,}$/,pR=/(__)([^_]+)_$/,mR=/(~~)([^~]+)~$/,gR=/__/g,O2=/~~/g,da=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:hR.test(e)},Zs=(e,t)=>{let r=!1;for(let n=0;n<t;n+=1)e[n]==="`"&&e[n+1]==="`"&&e[n+2]==="`"&&(r=!r,n+=2);return r},bR=(e,t)=>{let r=1;for(let n=t-1;n>=0;n-=1)if(e[n]==="]")r+=1;else if(e[n]==="["&&(r-=1,r===0))return n;return-1},r6=(e,t)=>{let r=1;for(let n=t+1;n<e.length;n+=1)if(e[n]==="[")r+=1;else if(e[n]==="]"&&(r-=1,r===0))return n;return-1},Z0=(e,t)=>{let r=!1,n=!1;for(let i=0;i<e.length&&i<t;i+=1){if(e[i]==="\\"&&e[i+1]==="$"){i+=1;continue}e[i]==="$"&&(e[i+1]==="$"?(n=!n,i+=1,r=!1):n||(r=!r))}return r||n},yR=(e,t)=>{for(let r=t;r<e.length;r+=1){if(e[r]===")")return!0;if(e[r]===`
|
|
18
|
+
`)return!1}return!1},n6=(e,t)=>{for(let r=t-1;r>=0;r-=1){if(e[r]===")")return!1;if(e[r]==="(")return r>0&&e[r-1]==="]"?yR(e,t):!1;if(e[r]===`
|
|
19
|
+
`)return!1}return!1},Im=(e,t,r)=>{let n=0;for(let l=t-1;l>=0;l-=1)if(e[l]===`
|
|
20
|
+
`){n=l+1;break}let i=e.length;for(let l=t;l<e.length;l+=1)if(e[l]===`
|
|
21
|
+
`){i=l;break}let a=e.substring(n,i),s=0,o=!1;for(let l of a)if(l===r)s+=1;else if(l!==" "&&l!==" "){o=!0;break}return s>=3&&!o},xR=(e,t,r)=>{if(r!==" "&&r!==" ")return!1;let n=0;for(let i=t-1;i>=0;i-=1)if(e[i]===`
|
|
22
|
+
`){n=i+1;break}for(let i=n;i<t;i+=1)if(e[i]!==" "&&e[i]!==" ")return!1;return!0},vR=(e,t,r,n)=>r==="\\"||e.includes("$")&&Z0(e,t)?!0:r!=="*"&&n==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(r==="*"||r&&n&&da(r)&&da(n)||xR(e,t,n)),i6=e=>{let t=0,r=e.length;for(let n=0;n<r;n+=1){if(e[n]!=="*")continue;let i=n>0?e[n-1]:"",a=n<r-1?e[n+1]:"";vR(e,n,i,a)||(t+=1)}return t},kR=(e,t,r,n)=>!!(r==="\\"||e.includes("$")&&Z0(e,t)||n6(e,t)||r==="_"||n==="_"||r&&n&&da(r)&&da(n)),wR=e=>{let t=0,r=e.length;for(let n=0;n<r;n+=1){if(e[n]!=="_")continue;let i=n>0?e[n-1]:"",a=n<r-1?e[n+1]:"";kR(e,n,i,a)||(t+=1)}return t},TR=e=>{let t=0,r=0;for(let n=0;n<e.length;n+=1)e[n]==="*"?r+=1:(r>=3&&(t+=Math.floor(r/3)),r=0);return r>=3&&(t+=Math.floor(r/3)),t},CR=(e,t,r)=>{if(!t||os.test(t))return!0;let n=e.substring(0,r).lastIndexOf(`
|
|
23
|
+
`),i=n===-1?0:n+1,a=e.substring(i,r);return t6.test(a)&&t.includes(`
|
|
24
|
+
`)?!0:Im(e,r,"*")},SR=e=>{let t=e.match(iR);if(!t)return e;let r=t[2],n=e.lastIndexOf(t[1]);return Zs(e,n)||CR(e,r,n)?e:(e.match(/\*\*/g)||[]).length%2===1?r.endsWith("*")?`${e}*`:`${e}**`:e},ER=(e,t,r)=>{if(!t||os.test(t))return!0;let n=e.substring(0,r).lastIndexOf(`
|
|
25
|
+
`),i=n===-1?0:n+1,a=e.substring(i,r);return t6.test(a)&&t.includes(`
|
|
26
|
+
`)?!0:Im(e,r,"_")},_R=e=>{let t=e.match(aR);if(!t){let i=e.match(pR);if(i){let a=e.lastIndexOf(i[1]);if(!Zs(e,a)&&(e.match(gR)||[]).length%2===1)return`${e}_`}return e}let r=t[2],n=e.lastIndexOf(t[1]);return Zs(e,n)||ER(e,r,n)?e:(e.match(/__/g)||[]).length%2===1?`${e}__`:e},AR=e=>{for(let t=0;t<e.length;t+=1)if(e[t]==="*"&&e[t-1]!=="*"&&e[t+1]!=="*"&&e[t-1]!=="\\"&&!Z0(e,t)){let r=t>0?e[t-1]:"",n=t<e.length-1?e[t+1]:"";if(r&&n&&da(r)&&da(n))continue;return t}return-1},NR=e=>{if(!e.match(oR))return e;let t=AR(e);if(t===-1||Zs(e,t))return e;let r=e.substring(t+1);return!r||os.test(r)?e:i6(e)%2===1?`${e}*`:e},a6=e=>{for(let t=0;t<e.length;t+=1)if(e[t]==="_"&&e[t-1]!=="_"&&e[t+1]!=="_"&&e[t-1]!=="\\"&&!Z0(e,t)&&!n6(e,t)){let r=t>0?e[t-1]:"",n=t<e.length-1?e[t+1]:"";if(r&&n&&da(r)&&da(n))continue;return t}return-1},LR=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
27
|
+
`;)t-=1;if(t<e.length){let r=e.slice(0,t),n=e.slice(t);return`${r}_${n}`}return`${e}_`},MR=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if((t.match(/\*\*/g)||[]).length%2!==1)return null;let r=t.indexOf("**"),n=a6(t);return r!==-1&&n!==-1&&r<n?`${t}_**`:null},IR=e=>{if(!e.match(lR))return e;let t=a6(e);if(t===-1||Zs(e,t))return e;let r=e.substring(t+1);if(!r||os.test(r))return e;if(wR(e)%2===1){let n=MR(e);return n!==null?n:LR(e)}return e},RR=e=>{let t=(e.match(/\*\*/g)||[]).length,r=i6(e);return t%2===0&&r%2===0},BR=(e,t,r)=>!t||os.test(t)||Zs(e,r)?!0:Im(e,r,"*"),DR=e=>{if(fR.test(e))return e;let t=e.match(sR);if(!t)return e;let r=t[2],n=e.lastIndexOf(t[1]);return BR(e,r,n)?e:TR(e)%2===1?RR(e)?e:`${e}***`:e},zu=(e,t)=>{let r=!1,n=!1;for(let i=0;i<t;i+=1){if(e.substring(i,i+3)==="```"){n=!n,i+=2;continue}!n&&e[i]==="`"&&(r=!r)}return r||n},OR=(e,t)=>{let r=e.substring(t,t+3)==="```",n=t>0&&e.substring(t-1,t+2)==="```",i=t>1&&e.substring(t-2,t+1)==="```";return r||n||i},PR=e=>{let t=0;for(let r=0;r<e.length;r+=1)e[r]==="`"&&!OR(e,r)&&(t+=1);return t},FR=e=>!e.match(dR)||e.includes(`
|
|
28
|
+
`)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,$R=e=>(e.match(/```/g)||[]).length%2===1,zR=e=>{let t=FR(e);if(t!==null)return t;let r=e.match(cR);if(r&&!$R(e)){let n=r[2];if(!n||os.test(n))return e;if(PR(e)%2===1)return`${e}\``}return e},HR=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",qR=e=>{let t=0,r=!1;for(let n=0;n<e.length-1;n+=1)e[n]==="`"&&!HR(e,n)&&(r=!r),!r&&e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},jR=e=>{let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
|
|
29
|
+
`,t)!==-1&&!e.endsWith(`
|
|
30
|
+
`)?`${e}
|
|
31
|
+
$$`:`${e}$$`},UR=e=>qR(e)%2===0?e:jR(e),WR=(e,t,r)=>{if(e.substring(t+2).includes(")"))return null;let n=bR(e,t);if(n===-1||zu(e,n))return null;let i=n>0&&e[n-1]==="!",a=i?n-1:n,s=e.substring(0,a);if(i)return s;let o=e.substring(n+1,t);return r==="text-only"?`${s}${o}`:`${s}[${o}](streamdown:incomplete-link)`},P2=(e,t)=>{for(let r=0;r<=t;r++)if(e[r]==="["&&!zu(e,r)){if(r>0&&e[r-1]==="!")continue;let n=r6(e,r);if(n===-1)return r;if(n+1<e.length&&e[n+1]==="("){let i=e.indexOf(")",n+2);i!==-1&&(r=i)}}return-1},GR=(e,t,r)=>{let n=t>0&&e[t-1]==="!",i=n?t-1:t,a=e.substring(t+1);if(!a.includes("]")){let s=e.substring(0,i);if(n)return s;if(r==="text-only"){let o=P2(e,t);return o!==-1?e.substring(0,o)+e.substring(o+1):`${s}${a}`}return`${e}](streamdown:incomplete-link)`}if(r6(e,t)===-1){let s=e.substring(0,i);if(n)return s;if(r==="text-only"){let o=P2(e,t);if(o!==-1)return e.substring(0,o)+e.substring(o+1);let l=e.substring(t+1);return`${s}${l}`}return`${e}](streamdown:incomplete-link)`}return null},s6=(e,t="protocol")=>{let r=e.lastIndexOf("](");if(r!==-1&&!zu(e,r)){let n=WR(e,r,t);if(n!==null)return n}for(let n=e.length-1;n>=0;n-=1)if(e[n]==="["&&!zu(e,n)){let i=GR(e,n,t);if(i!==null)return i}return e},YR=/^-{1,2}$/,VR=/^[\s]*-{1,2}[\s]+$/,XR=/^={1,2}$/,KR=/^[\s]*={1,2}[\s]+$/,QR=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
|
|
32
|
+
`);if(t===-1)return e;let r=e.substring(t+1),n=e.substring(0,t),i=r.trim();if(YR.test(i)&&!r.match(VR)){let a=n.split(`
|
|
33
|
+
`).at(-1);if(a&&a.trim().length>0)return`${e}`}if(XR.test(i)&&!r.match(KR)){let a=n.split(`
|
|
34
|
+
`).at(-1);if(a&&a.trim().length>0)return`${e}`}return e},ZR=e=>{let t=e.match(uR);if(t){let r=t[2];if(!r||os.test(r))return e;if((e.match(O2)||[]).length%2===1)return`${e}~~`}else if(e.match(mR)&&(e.match(O2)||[]).length%2===1)return`${e}~`;return e},ld=e=>e!==!1,hn={SETEXT_HEADINGS:0,LINKS:10,BOLD_ITALIC:20,BOLD:30,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,DEFAULT:100},JR=[{handler:{name:"setextHeadings",handle:QR,priority:hn.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:s6,priority:hn.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:DR,priority:hn.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:SR,priority:hn.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:_R,priority:hn.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:NR,priority:hn.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:IR,priority:hn.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:zR,priority:hn.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:ZR,priority:hn.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:UR,priority:hn.KATEX},optionKey:"katex"}],eB=e=>{var t;let r=(t=e?.linkMode)!=null?t:"protocol";return JR.filter(({handler:n,optionKey:i})=>n.name==="links"?ld(e?.links)||ld(e?.images):ld(e?.[i])).map(({handler:n,earlyReturn:i})=>n.name==="links"?{handler:e6(J3({},n),{handle:a=>s6(a,r)}),earlyReturn:r==="protocol"?i:void 0}:{handler:n,earlyReturn:i})},tB=(e,t)=>{var r;if(!e||typeof e!="string")return e;let n=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=eB(t),a=((r=t?.handlers)!=null?r:[]).map(o=>{var l;return{handler:e6(J3({},o),{priority:(l=o.priority)!=null?l:hn.DEFAULT}),earlyReturn:void 0}}),s=[...i,...a].sort((o,l)=>{var c,u;return((c=o.handler.priority)!=null?c:hn.DEFAULT)-((u=l.handler.priority)!=null?u:hn.DEFAULT)});for(let{handler:o,earlyReturn:l}of s)if(n=o.handle(n),l!=null&&l(n))return n;return n},rB=tB;function o6(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=o6(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function nB(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=o6(e))&&(n&&(n+=" "),n+=t);return n}const iB=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},aB=(e,t)=>({classGroupId:e,validator:t}),l6=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Hu="-",F2=[],sB="arbitrary..",oB=e=>{const t=cB(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return lB(s);const o=s.split(Hu),l=o[0]===""&&o.length>1?1:0;return c6(o,l,t)},getConflictingClassGroupIds:(s,o)=>{if(o){const l=n[s],c=r[s];return l?c?iB(c,l):l:c||F2}return r[s]||F2}}},c6=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const i=e[t],a=r.nextPart.get(i);if(a){const c=c6(e,t+1,a);if(c)return c}const s=r.validators;if(s===null)return;const o=t===0?e.join(Hu):e.slice(t).join(Hu),l=s.length;for(let c=0;c<l;c++){const u=s[c];if(u.validator(o))return u.classGroupId}},lB=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?sB+n:void 0})(),cB=e=>{const{theme:t,classGroups:r}=e;return uB(r,t)},uB=(e,t)=>{const r=l6();for(const n in e){const i=e[n];Rm(i,r,n,t)}return r},Rm=(e,t,r,n)=>{const i=e.length;for(let a=0;a<i;a++){const s=e[a];hB(s,t,r,n)}},hB=(e,t,r,n)=>{if(typeof e=="string"){dB(e,t,r);return}if(typeof e=="function"){fB(e,t,r,n);return}pB(e,t,r,n)},dB=(e,t,r)=>{const n=e===""?t:u6(t,e);n.classGroupId=r},fB=(e,t,r,n)=>{if(mB(e)){Rm(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(aB(r,e))},pB=(e,t,r,n)=>{const i=Object.entries(e),a=i.length;for(let s=0;s<a;s++){const[o,l]=i[s];Rm(l,u6(t,o),r,n)}},u6=(e,t)=>{let r=e;const n=t.split(Hu),i=n.length;for(let a=0;a<i;a++){const s=n[a];let o=r.nextPart.get(s);o||(o=l6(),r.nextPart.set(s,o)),r=o}return r},mB=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,gB=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const i=(a,s)=>{r[a]=s,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(a){let s=r[a];if(s!==void 0)return s;if((s=n[a])!==void 0)return i(a,s),s},set(a,s){a in r?r[a]=s:i(a,s)}}},Nf="!",$2=":",bB=[],z2=(e,t,r,n,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:i}),yB=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=i=>{const a=[];let s=0,o=0,l=0,c;const u=i.length;for(let m=0;m<u;m++){const b=i[m];if(s===0&&o===0){if(b===$2){a.push(i.slice(l,m)),l=m+1;continue}if(b==="/"){c=m;continue}}b==="["?s++:b==="]"?s--:b==="("?o++:b===")"&&o--}const h=a.length===0?i:i.slice(l);let d=h,f=!1;h.endsWith(Nf)?(d=h.slice(0,-1),f=!0):h.startsWith(Nf)&&(d=h.slice(1),f=!0);const p=c&&c>l?c-l:void 0;return z2(a,f,d,p)};if(t){const i=t+$2,a=n;n=s=>s.startsWith(i)?a(s.slice(i.length)):z2(bB,!1,s,void 0,!0)}if(r){const i=n;n=a=>r({className:a,parseClassName:i})}return n},xB=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let i=[];for(let a=0;a<r.length;a++){const s=r[a],o=s[0]==="[",l=t.has(s);o||l?(i.length>0&&(i.sort(),n.push(...i),i=[]),n.push(s)):i.push(s)}return i.length>0&&(i.sort(),n.push(...i)),n}},vB=e=>({cache:gB(e.cacheSize),parseClassName:yB(e),sortModifiers:xB(e),...oB(e)}),kB=/\s+/,wB=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:a}=t,s=[],o=e.trim().split(kB);let l="";for(let c=o.length-1;c>=0;c-=1){const u=o[c],{isExternal:h,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=r(u);if(h){l=u+(l.length>0?" "+l:l);continue}let b=!!m,y=n(b?p.substring(0,m):p);if(!y){if(!b){l=u+(l.length>0?" "+l:l);continue}if(y=n(p),!y){l=u+(l.length>0?" "+l:l);continue}b=!1}const v=d.length===0?"":d.length===1?d[0]:a(d).join(":"),T=f?v+Nf:v,A=T+y;if(s.indexOf(A)>-1)continue;s.push(A);const E=i(y,b);for(let S=0;S<E.length;++S){const I=E[S];s.push(T+I)}l=u+(l.length>0?" "+l:l)}return l},TB=(...e)=>{let t=0,r,n,i="";for(;t<e.length;)(r=e[t++])&&(n=h6(r))&&(i&&(i+=" "),i+=n);return i},h6=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=h6(e[n]))&&(r&&(r+=" "),r+=t);return r},CB=(e,...t)=>{let r,n,i,a;const s=l=>{const c=t.reduce((u,h)=>h(u),e());return r=vB(c),n=r.cache.get,i=r.cache.set,a=o,o(l)},o=l=>{const c=n(l);if(c)return c;const u=wB(l,r);return i(l,u),u};return a=s,(...l)=>a(TB(...l))},SB=[],cr=e=>{const t=r=>r[e]||SB;return t.isThemeGetter=!0,t},d6=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,f6=/^\((?:(\w[\w-]*):)?(.+)\)$/i,EB=/^\d+\/\d+$/,_B=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,AB=/\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$/,NB=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,LB=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,MB=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xs=e=>EB.test(e),yt=e=>!!e&&!Number.isNaN(Number(e)),Zi=e=>!!e&&Number.isInteger(Number(e)),cd=e=>e.endsWith("%")&&yt(e.slice(0,-1)),wi=e=>_B.test(e),IB=()=>!0,RB=e=>AB.test(e)&&!NB.test(e),p6=()=>!1,BB=e=>LB.test(e),DB=e=>MB.test(e),OB=e=>!De(e)&&!Oe(e),PB=e=>bo(e,b6,p6),De=e=>d6.test(e),La=e=>bo(e,y6,RB),ud=e=>bo(e,qB,yt),H2=e=>bo(e,m6,p6),FB=e=>bo(e,g6,DB),Rc=e=>bo(e,x6,BB),Oe=e=>f6.test(e),Oo=e=>yo(e,y6),$B=e=>yo(e,jB),q2=e=>yo(e,m6),zB=e=>yo(e,b6),HB=e=>yo(e,g6),Bc=e=>yo(e,x6,!0),bo=(e,t,r)=>{const n=d6.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},yo=(e,t,r=!1)=>{const n=f6.exec(e);return n?n[1]?t(n[1]):r:!1},m6=e=>e==="position"||e==="percentage",g6=e=>e==="image"||e==="url",b6=e=>e==="length"||e==="size"||e==="bg-size",y6=e=>e==="length",qB=e=>e==="number",jB=e=>e==="family-name",x6=e=>e==="shadow",UB=()=>{const e=cr("color"),t=cr("font"),r=cr("text"),n=cr("font-weight"),i=cr("tracking"),a=cr("leading"),s=cr("breakpoint"),o=cr("container"),l=cr("spacing"),c=cr("radius"),u=cr("shadow"),h=cr("inset-shadow"),d=cr("text-shadow"),f=cr("drop-shadow"),p=cr("blur"),m=cr("perspective"),b=cr("aspect"),y=cr("ease"),v=cr("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...A(),Oe,De],S=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],D=()=>[Oe,De,l],H=()=>[xs,"full","auto",...D()],R=()=>[Zi,"none","subgrid",Oe,De],F=()=>["auto",{span:["full",Zi,Oe,De]},Zi,Oe,De],G=()=>[Zi,"auto",Oe,De],ee=()=>["auto","min","max","fr",Oe,De],$=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],q=()=>["start","end","center","stretch","center-safe","end-safe"],W=()=>["auto",...D()],Z=()=>[xs,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],V=()=>[e,Oe,De],ve=()=>[...A(),q2,H2,{position:[Oe,De]}],L=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ae=()=>["auto","cover","contain",zB,PB,{size:[Oe,De]}],ne=()=>[cd,Oo,La],N=()=>["","none","full",c,Oe,De],ke=()=>["",yt,Oo,La],ge=()=>["solid","dashed","dotted","double"],Se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],_e=()=>[yt,cd,q2,H2],at=()=>["","none",p,Oe,De],Ue=()=>["none",yt,Oe,De],$e=()=>["none",yt,Oe,De],ht=()=>[yt,Oe,De],dt=()=>[xs,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[wi],breakpoint:[wi],color:[IB],container:[wi],"drop-shadow":[wi],ease:["in","out","in-out"],font:[OB],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[wi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[wi],shadow:[wi],spacing:["px",yt],text:[wi],"text-shadow":[wi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",xs,De,Oe,b]}],container:["container"],columns:[{columns:[yt,De,Oe,o]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"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:E()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:H()}],"inset-x":[{"inset-x":H()}],"inset-y":[{"inset-y":H()}],start:[{start:H()}],end:[{end:H()}],top:[{top:H()}],right:[{right:H()}],bottom:[{bottom:H()}],left:[{left:H()}],visibility:["visible","invisible","collapse"],z:[{z:[Zi,"auto",Oe,De]}],basis:[{basis:[xs,"full","auto",o,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[yt,xs,"auto","initial","none",De]}],grow:[{grow:["",yt,Oe,De]}],shrink:[{shrink:["",yt,Oe,De]}],order:[{order:[Zi,"first","last","none",Oe,De]}],"grid-cols":[{"grid-cols":R()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":R()}],"row-start-end":[{row:F()}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ee()}],"auto-rows":[{"auto-rows":ee()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...$(),"normal"]}],"justify-items":[{"justify-items":[...q(),"normal"]}],"justify-self":[{"justify-self":["auto",...q()]}],"align-content":[{content:["normal",...$()]}],"align-items":[{items:[...q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...q(),{baseline:["","last"]}]}],"place-content":[{"place-content":$()}],"place-items":[{"place-items":[...q(),"baseline"]}],"place-self":[{"place-self":["auto",...q()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:W()}],mx:[{mx:W()}],my:[{my:W()}],ms:[{ms:W()}],me:[{me:W()}],mt:[{mt:W()}],mr:[{mr:W()}],mb:[{mb:W()}],ml:[{ml:W()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],w:[{w:[o,"screen",...Z()]}],"min-w":[{"min-w":[o,"screen","none",...Z()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[s]},...Z()]}],h:[{h:["screen","lh",...Z()]}],"min-h":[{"min-h":["screen","lh","none",...Z()]}],"max-h":[{"max-h":["screen","lh",...Z()]}],"font-size":[{text:["base",r,Oo,La]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Oe,ud]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",cd,De]}],"font-family":[{font:[$B,De,t]}],"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,Oe,De]}],"line-clamp":[{"line-clamp":[yt,"none",Oe,ud]}],leading:[{leading:[a,...D()]}],"list-image":[{"list-image":["none",Oe,De]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Oe,De]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:V()}],"text-color":[{text:V()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ge(),"wavy"]}],"text-decoration-thickness":[{decoration:[yt,"from-font","auto",Oe,La]}],"text-decoration-color":[{decoration:V()}],"underline-offset":[{"underline-offset":[yt,"auto",Oe,De]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Oe,De]}],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",Oe,De]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ve()}],"bg-repeat":[{bg:L()}],"bg-size":[{bg:ae()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Zi,Oe,De],radial:["",Oe,De],conic:[Zi,Oe,De]},HB,FB]}],"bg-color":[{bg:V()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:V()}],"gradient-via":[{via:V()}],"gradient-to":[{to:V()}],rounded:[{rounded:N()}],"rounded-s":[{"rounded-s":N()}],"rounded-e":[{"rounded-e":N()}],"rounded-t":[{"rounded-t":N()}],"rounded-r":[{"rounded-r":N()}],"rounded-b":[{"rounded-b":N()}],"rounded-l":[{"rounded-l":N()}],"rounded-ss":[{"rounded-ss":N()}],"rounded-se":[{"rounded-se":N()}],"rounded-ee":[{"rounded-ee":N()}],"rounded-es":[{"rounded-es":N()}],"rounded-tl":[{"rounded-tl":N()}],"rounded-tr":[{"rounded-tr":N()}],"rounded-br":[{"rounded-br":N()}],"rounded-bl":[{"rounded-bl":N()}],"border-w":[{border:ke()}],"border-w-x":[{"border-x":ke()}],"border-w-y":[{"border-y":ke()}],"border-w-s":[{"border-s":ke()}],"border-w-e":[{"border-e":ke()}],"border-w-t":[{"border-t":ke()}],"border-w-r":[{"border-r":ke()}],"border-w-b":[{"border-b":ke()}],"border-w-l":[{"border-l":ke()}],"divide-x":[{"divide-x":ke()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ke()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ge(),"hidden","none"]}],"divide-style":[{divide:[...ge(),"hidden","none"]}],"border-color":[{border:V()}],"border-color-x":[{"border-x":V()}],"border-color-y":[{"border-y":V()}],"border-color-s":[{"border-s":V()}],"border-color-e":[{"border-e":V()}],"border-color-t":[{"border-t":V()}],"border-color-r":[{"border-r":V()}],"border-color-b":[{"border-b":V()}],"border-color-l":[{"border-l":V()}],"divide-color":[{divide:V()}],"outline-style":[{outline:[...ge(),"none","hidden"]}],"outline-offset":[{"outline-offset":[yt,Oe,De]}],"outline-w":[{outline:["",yt,Oo,La]}],"outline-color":[{outline:V()}],shadow:[{shadow:["","none",u,Bc,Rc]}],"shadow-color":[{shadow:V()}],"inset-shadow":[{"inset-shadow":["none",h,Bc,Rc]}],"inset-shadow-color":[{"inset-shadow":V()}],"ring-w":[{ring:ke()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:V()}],"ring-offset-w":[{"ring-offset":[yt,La]}],"ring-offset-color":[{"ring-offset":V()}],"inset-ring-w":[{"inset-ring":ke()}],"inset-ring-color":[{"inset-ring":V()}],"text-shadow":[{"text-shadow":["none",d,Bc,Rc]}],"text-shadow-color":[{"text-shadow":V()}],opacity:[{opacity:[yt,Oe,De]}],"mix-blend":[{"mix-blend":[...Se(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Se()}],"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":[yt]}],"mask-image-linear-from-pos":[{"mask-linear-from":_e()}],"mask-image-linear-to-pos":[{"mask-linear-to":_e()}],"mask-image-linear-from-color":[{"mask-linear-from":V()}],"mask-image-linear-to-color":[{"mask-linear-to":V()}],"mask-image-t-from-pos":[{"mask-t-from":_e()}],"mask-image-t-to-pos":[{"mask-t-to":_e()}],"mask-image-t-from-color":[{"mask-t-from":V()}],"mask-image-t-to-color":[{"mask-t-to":V()}],"mask-image-r-from-pos":[{"mask-r-from":_e()}],"mask-image-r-to-pos":[{"mask-r-to":_e()}],"mask-image-r-from-color":[{"mask-r-from":V()}],"mask-image-r-to-color":[{"mask-r-to":V()}],"mask-image-b-from-pos":[{"mask-b-from":_e()}],"mask-image-b-to-pos":[{"mask-b-to":_e()}],"mask-image-b-from-color":[{"mask-b-from":V()}],"mask-image-b-to-color":[{"mask-b-to":V()}],"mask-image-l-from-pos":[{"mask-l-from":_e()}],"mask-image-l-to-pos":[{"mask-l-to":_e()}],"mask-image-l-from-color":[{"mask-l-from":V()}],"mask-image-l-to-color":[{"mask-l-to":V()}],"mask-image-x-from-pos":[{"mask-x-from":_e()}],"mask-image-x-to-pos":[{"mask-x-to":_e()}],"mask-image-x-from-color":[{"mask-x-from":V()}],"mask-image-x-to-color":[{"mask-x-to":V()}],"mask-image-y-from-pos":[{"mask-y-from":_e()}],"mask-image-y-to-pos":[{"mask-y-to":_e()}],"mask-image-y-from-color":[{"mask-y-from":V()}],"mask-image-y-to-color":[{"mask-y-to":V()}],"mask-image-radial":[{"mask-radial":[Oe,De]}],"mask-image-radial-from-pos":[{"mask-radial-from":_e()}],"mask-image-radial-to-pos":[{"mask-radial-to":_e()}],"mask-image-radial-from-color":[{"mask-radial-from":V()}],"mask-image-radial-to-color":[{"mask-radial-to":V()}],"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":A()}],"mask-image-conic-pos":[{"mask-conic":[yt]}],"mask-image-conic-from-pos":[{"mask-conic-from":_e()}],"mask-image-conic-to-pos":[{"mask-conic-to":_e()}],"mask-image-conic-from-color":[{"mask-conic-from":V()}],"mask-image-conic-to-color":[{"mask-conic-to":V()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ve()}],"mask-repeat":[{mask:L()}],"mask-size":[{mask:ae()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Oe,De]}],filter:[{filter:["","none",Oe,De]}],blur:[{blur:at()}],brightness:[{brightness:[yt,Oe,De]}],contrast:[{contrast:[yt,Oe,De]}],"drop-shadow":[{"drop-shadow":["","none",f,Bc,Rc]}],"drop-shadow-color":[{"drop-shadow":V()}],grayscale:[{grayscale:["",yt,Oe,De]}],"hue-rotate":[{"hue-rotate":[yt,Oe,De]}],invert:[{invert:["",yt,Oe,De]}],saturate:[{saturate:[yt,Oe,De]}],sepia:[{sepia:["",yt,Oe,De]}],"backdrop-filter":[{"backdrop-filter":["","none",Oe,De]}],"backdrop-blur":[{"backdrop-blur":at()}],"backdrop-brightness":[{"backdrop-brightness":[yt,Oe,De]}],"backdrop-contrast":[{"backdrop-contrast":[yt,Oe,De]}],"backdrop-grayscale":[{"backdrop-grayscale":["",yt,Oe,De]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[yt,Oe,De]}],"backdrop-invert":[{"backdrop-invert":["",yt,Oe,De]}],"backdrop-opacity":[{"backdrop-opacity":[yt,Oe,De]}],"backdrop-saturate":[{"backdrop-saturate":[yt,Oe,De]}],"backdrop-sepia":[{"backdrop-sepia":["",yt,Oe,De]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Oe,De]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[yt,"initial",Oe,De]}],ease:[{ease:["linear","initial",y,Oe,De]}],delay:[{delay:[yt,Oe,De]}],animate:[{animate:["none",v,Oe,De]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,Oe,De]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:Ue()}],"rotate-x":[{"rotate-x":Ue()}],"rotate-y":[{"rotate-y":Ue()}],"rotate-z":[{"rotate-z":Ue()}],scale:[{scale:$e()}],"scale-x":[{"scale-x":$e()}],"scale-y":[{"scale-y":$e()}],"scale-z":[{"scale-z":$e()}],"scale-3d":["scale-3d"],skew:[{skew:ht()}],"skew-x":[{"skew-x":ht()}],"skew-y":[{"skew-y":ht()}],transform:[{transform:[Oe,De,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:dt()}],"translate-x":[{"translate-x":dt()}],"translate-y":[{"translate-y":dt()}],"translate-z":[{"translate-z":dt()}],"translate-none":["translate-none"],accent:[{accent:V()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:V()}],"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",Oe,De]}],"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":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"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",Oe,De]}],fill:[{fill:["none",...V()]}],"stroke-w":[{stroke:[yt,Oo,La,ud]}],stroke:[{stroke:["none",...V()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-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-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-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-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"]}},WB=CB(UB),GB=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,YB=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,VB={};function j2(e,t){return(VB.jsx?YB:GB).test(e)}const XB=/[ \t\n\f\r]/g;function J0(e){return typeof e=="object"?e.type==="text"?U2(e.value):!1:U2(e)}function U2(e){return e.replace(XB,"")===""}function eh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vs={},hd,W2;function KB(){if(W2)return hd;W2=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,n=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,o=/^\s+|\s+$/g,l=`
|
|
35
|
+
`,c="/",u="*",h="",d="comment",f="declaration";function p(b,y){if(typeof b!="string")throw new TypeError("First argument must be a string");if(!b)return[];y=y||{};var v=1,T=1;function A($){var q=$.match(t);q&&(v+=q.length);var W=$.lastIndexOf(l);T=~W?$.length-W:T+$.length}function E(){var $={line:v,column:T};return function(q){return q.position=new S($),H(),q}}function S($){this.start=$,this.end={line:v,column:T},this.source=y.source}S.prototype.content=b;function I($){var q=new Error(y.source+":"+v+":"+T+": "+$);if(q.reason=$,q.filename=y.source,q.line=v,q.column=T,q.source=b,!y.silent)throw q}function D($){var q=$.exec(b);if(q){var W=q[0];return A(W),b=b.slice(W.length),q}}function H(){D(r)}function R($){var q;for($=$||[];q=F();)q!==!1&&$.push(q);return $}function F(){var $=E();if(!(c!=b.charAt(0)||u!=b.charAt(1))){for(var q=2;h!=b.charAt(q)&&(u!=b.charAt(q)||c!=b.charAt(q+1));)++q;if(q+=2,h===b.charAt(q-1))return I("End of comment missing");var W=b.slice(2,q-2);return T+=2,A(W),b=b.slice(q),T+=2,$({type:d,comment:W})}}function G(){var $=E(),q=D(n);if(q){if(F(),!D(i))return I("property missing ':'");var W=D(a),Z=$({type:f,property:m(q[0].replace(e,h)),value:W?m(W[0].replace(e,h)):h});return D(s),Z}}function ee(){var $=[];R($);for(var q;q=G();)q!==!1&&($.push(q),R($));return $}return H(),ee()}function m(b){return b?b.replace(o,h):h}return hd=p,hd}var G2;function QB(){if(G2)return vs;G2=1;var e=vs&&vs.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(vs,"__esModule",{value:!0}),vs.default=r;const t=e(KB());function r(n,i){let a=null;if(!n||typeof n!="string")return a;const s=(0,t.default)(n),o=typeof i=="function";return s.forEach(l=>{if(l.type!=="declaration")return;const{property:c,value:u}=l;o?i(c,u,l):u&&(a=a||{},a[c]=u)}),a}return vs}var Po={},Y2;function ZB(){if(Y2)return Po;Y2=1,Object.defineProperty(Po,"__esModule",{value:!0}),Po.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,r=/^[^-]+$/,n=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(c){return!c||r.test(c)||e.test(c)},s=function(c,u){return u.toUpperCase()},o=function(c,u){return"".concat(u,"-")},l=function(c,u){return u===void 0&&(u={}),a(c)?c:(c=c.toLowerCase(),u.reactCompat?c=c.replace(i,o):c=c.replace(n,o),c.replace(t,s))};return Po.camelCase=l,Po}var Fo,V2;function JB(){if(V2)return Fo;V2=1;var e=Fo&&Fo.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(QB()),r=ZB();function n(i,a){var s={};return!i||typeof i!="string"||(0,t.default)(i,function(o,l){o&&l&&(s[(0,r.camelCase)(o,a)]=l)}),s}return n.default=n,Fo=n,Fo}var eD=JB();const tD=eh(eD);function Cl(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?X2(e.position):"start"in e||"end"in e?X2(e):"line"in e||"column"in e?Lf(e):""}function Lf(e){return K2(e&&e.line)+":"+K2(e&&e.column)}function X2(e){return Lf(e&&e.start)+"-"+Lf(e&&e.end)}function K2(e){return e&&typeof e=="number"?e:1}class Or extends Error{constructor(t,r,n){super(),typeof r=="string"&&(n=r,r=void 0);let i="",a={},s=!1;if(r&&("line"in r&&"column"in r?a={place:r}:"start"in r&&"end"in r?a={place:r}:"type"in r?a={ancestors:[r],place:r.position}:a={...r}),typeof t=="string"?i=t:!a.cause&&t&&(s=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof n=="string"){const l=n.indexOf(":");l===-1?a.ruleId=n:(a.source=n.slice(0,l),a.ruleId=n.slice(l+1))}if(!a.place&&a.ancestors&&a.ancestors){const l=a.ancestors[a.ancestors.length-1];l&&(a.place=l.position)}const o=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=o?o.line:void 0,this.name=Cl(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=s&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Or.prototype.file="";Or.prototype.name="";Or.prototype.reason="";Or.prototype.message="";Or.prototype.stack="";Or.prototype.column=void 0;Or.prototype.line=void 0;Or.prototype.ancestors=void 0;Or.prototype.cause=void 0;Or.prototype.fatal=void 0;Or.prototype.place=void 0;Or.prototype.ruleId=void 0;Or.prototype.source=void 0;const Bm={}.hasOwnProperty,rD=new Map,nD=/[A-Z]/g,iD=new Set(["table","tbody","thead","tfoot","tr"]),aD=new Set(["td","th"]),v6="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function sD(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let n;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=pD(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=fD(r,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:n,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?ui:ho,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=k6(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function k6(e,t,r){if(t.type==="element")return oD(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return lD(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return uD(e,t,r);if(t.type==="mdxjsEsm")return cD(e,t);if(t.type==="root")return hD(e,t,r);if(t.type==="text")return dD(e,t)}function oD(e,t,r){const n=e.schema;let i=n;t.tagName.toLowerCase()==="svg"&&n.space==="html"&&(i=ui,e.schema=i),e.ancestors.push(t);const a=T6(e,t.tagName,!1),s=mD(e,t);let o=Om(e,t);return iD.has(t.tagName)&&(o=o.filter(function(l){return typeof l=="string"?!J0(l):!0})),w6(e,s,a,t),Dm(s,o),e.ancestors.pop(),e.schema=n,e.create(t,a,s,r)}function lD(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}zl(e,t.position)}function cD(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);zl(e,t.position)}function uD(e,t,r){const n=e.schema;let i=n;t.name==="svg"&&n.space==="html"&&(i=ui,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:T6(e,t.name,!0),s=gD(e,t),o=Om(e,t);return w6(e,s,a,t),Dm(s,o),e.ancestors.pop(),e.schema=n,e.create(t,a,s,r)}function hD(e,t,r){const n={};return Dm(n,Om(e,t)),e.create(t,e.Fragment,n,r)}function dD(e,t){return t.value}function w6(e,t,r,n){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=n)}function Dm(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function fD(e,t,r){return n;function n(i,a,s,o){const c=Array.isArray(s.children)?r:t;return o?c(a,s,o):c(a,s)}}function pD(e,t){return r;function r(n,i,a,s){const o=Array.isArray(a.children),l=hi(n);return t(i,a,s,o,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function mD(e,t){const r={};let n,i;for(i in t.properties)if(i!=="children"&&Bm.call(t.properties,i)){const a=bD(e,i,t.properties[i]);if(a){const[s,o]=a;e.tableCellAlignToStyle&&s==="align"&&typeof o=="string"&&aD.has(t.tagName)?n=o:r[s]=o}}if(n){const a=r.style||(r.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return r}function gD(e,t){const r={};for(const n of t.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&e.evaluater){const a=n.data.estree.body[0];a.type;const s=a.expression;s.type;const o=s.properties[0];o.type,Object.assign(r,e.evaluater.evaluateExpression(o.argument))}else zl(e,t.position);else{const i=n.name;let a;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&e.evaluater){const o=n.value.data.estree.body[0];o.type,a=e.evaluater.evaluateExpression(o.expression)}else zl(e,t.position);else a=n.value===null?!0:n.value;r[i]=a}return r}function Om(e,t){const r=[];let n=-1;const i=e.passKeys?new Map:rD;for(;++n<t.children.length;){const a=t.children[n];let s;if(e.passKeys){const l=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(l){const c=i.get(l)||0;s=l+"-"+c,i.set(l,c+1)}}const o=k6(e,a,s);o!==void 0&&r.push(o)}return r}function bD(e,t,r){const n=uc(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=n.commaSeparated?bm(r):ym(r)),n.property==="style"){let i=typeof r=="object"?r:yD(e,String(r));return e.stylePropertyNameCase==="css"&&(i=xD(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&n.space?KE[n.property]||n.property:n.attribute,r]}}function yD(e,t){try{return tD(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const n=r,i=new Or("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=v6+"#cannot-parse-style-attribute",i}}function T6(e,t,r){let n;if(!r)n={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,s;for(;++a<i.length;){const o=j2(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:o,computed:!!(a&&o.type==="Literal"),optional:!1}:o}n=s}else n=j2(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(n.type==="Literal"){const i=n.value;return Bm.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(n);zl(e)}function zl(e,t){const r=new Or("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=v6+"#cannot-handle-mdx-estrees-without-createevaluater",r}function xD(e){const t={};let r;for(r in e)Bm.call(e,r)&&(t[vD(r)]=e[r]);return t}function vD(e){let t=e.replace(nD,kD);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function kD(e){return"-"+e.toLowerCase()}const wD={tokenize:TD};function TD(e){const t=e.attempt(this.parser.constructs.contentInitial,n,i);let r;return t;function n(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),kt(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),a(o)}function a(o){const l=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=l),r=l,s(o)}function s(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return Ge(o)?(e.consume(o),e.exit("chunkText"),a):(e.consume(o),s)}}const CD={tokenize:SD},Q2={tokenize:ED};function SD(e){const t=this,r=[];let n=0,i,a,s;return o;function o(T){if(n<r.length){const A=r[n];return t.containerState=A[1],e.attempt(A[0].continuation,l,c)(T)}return c(T)}function l(T){if(n++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();const A=t.events.length;let E=A,S;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){S=t.events[E][1].end;break}y(n);let I=A;for(;I<t.events.length;)t.events[I][1].end={...S},I++;return mn(t.events,E+1,0,t.events.slice(A)),t.events.length=I,c(T)}return o(T)}function c(T){if(n===r.length){if(!i)return d(T);if(i.currentConstruct&&i.currentConstruct.concrete)return p(T);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Q2,u,h)(T)}function u(T){return i&&v(),y(n),d(T)}function h(T){return t.parser.lazy[t.now().line]=n!==r.length,s=t.now().offset,p(T)}function d(T){return t.containerState={},e.attempt(Q2,f,p)(T)}function f(T){return n++,r.push([t.currentConstruct,t.containerState]),d(T)}function p(T){if(T===null){i&&v(),y(0),e.consume(T);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),m(T)}function m(T){if(T===null){b(e.exit("chunkFlow"),!0),y(0),e.consume(T);return}return Ge(T)?(e.consume(T),b(e.exit("chunkFlow")),n=0,t.interrupt=void 0,o):(e.consume(T),m)}function b(T,A){const E=t.sliceStream(T);if(A&&E.push(null),T.previous=a,a&&(a.next=T),a=T,i.defineSkip(T.start),i.write(E),t.parser.lazy[T.start.line]){let S=i.events.length;for(;S--;)if(i.events[S][1].start.offset<s&&(!i.events[S][1].end||i.events[S][1].end.offset>s))return;const I=t.events.length;let D=I,H,R;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){if(H){R=t.events[D][1].end;break}H=!0}for(y(n),S=I;S<t.events.length;)t.events[S][1].end={...R},S++;mn(t.events,D+1,0,t.events.slice(I)),t.events.length=S}}function y(T){let A=r.length;for(;A-- >T;){const E=r[A];t.containerState=E[1],E[0].exit.call(t,e)}r.length=T}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function ED(e,t,r){return kt(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const _D={tokenize:AD};function AD(e){const t=this,r=e.attempt(pc,n,e.attempt(this.parser.constructs.flowInitial,i,kt(e,e.attempt(this.parser.constructs.flow,i,e.attempt(OM,i)),"linePrefix")));return r;function n(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const ND={resolveAll:S6()},LD=C6("string"),MD=C6("text");function C6(e){return{resolveAll:S6(e==="text"?ID:void 0),tokenize:t};function t(r){const n=this,i=this.parser.constructs[e],a=r.attempt(i,s,o);return s;function s(u){return c(u)?a(u):o(u)}function o(u){if(u===null){r.consume(u);return}return r.enter("data"),r.consume(u),l}function l(u){return c(u)?(r.exit("data"),a(u)):(r.consume(u),l)}function c(u){if(u===null)return!0;const h=i[u];let d=-1;if(h)for(;++d<h.length;){const f=h[d];if(!f.previous||f.previous.call(n,n.previous))return!0}return!1}}}function S6(e){return t;function t(r,n){let i=-1,a;for(;++i<=r.length;)a===void 0?r[i]&&r[i][1].type==="data"&&(a=i,i++):(!r[i]||r[i][1].type!=="data")&&(i!==a+2&&(r[a][1].end=r[i-1][1].end,r.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(r,n):r}}function ID(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const n=e[r-1][1],i=t.sliceStream(n);let a=i.length,s=-1,o=0,l;for(;a--;){const c=i[a];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)o++,s--;if(s)break;s=-1}else if(c===-2)l=!0,o++;else if(c!==-1){a++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(o=0),o){const c={type:r===e.length||l||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:n.start._bufferIndex+s,_index:n.start._index+a,line:n.end.line,column:n.end.column-o,offset:n.end.offset-o},end:{...n.end}};n.end={...c.start},n.start.offset===n.end.offset?Object.assign(n,c):(e.splice(r,0,["enter",c,t],["exit",c,t]),r+=2)}r++}return e}const RD={42:Jr,43:Jr,45:Jr,48:Jr,49:Jr,50:Jr,51:Jr,52:Jr,53:Jr,54:Jr,55:Jr,56:Jr,57:Jr,62:G3},BD={91:HM},DD={[-2]:sd,[-1]:sd,32:sd},OD={35:YM,42:pu,45:[I2,pu],60:QM,61:I2,95:pu,96:L2,126:L2},PD={38:V3,92:Y3},FD={[-5]:od,[-4]:od,[-3]:od,33:mI,38:V3,42:Af,60:[bM,iI],91:bI,92:[WM,Y3],93:Mm,95:Af,96:LM},$D={null:[Af,ND]},zD={null:[42,95]},HD={null:[]},qD=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:zD,contentInitial:BD,disable:HD,document:RD,flow:OD,flowInitial:DD,insideSpan:$D,string:PD,text:FD},Symbol.toStringTag,{value:"Module"}));function jD(e,t,r){let n={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const i={},a=[];let s=[],o=[];const l={attempt:I(E),check:I(S),consume:v,enter:T,exit:A,interrupt:I(S,{interrupt:!0})},c={code:null,containerState:{},defineSkip:m,events:[],now:p,parser:e,previous:null,sliceSerialize:d,sliceStream:f,write:h};let u=t.tokenize.call(c,l);return t.resolveAll&&a.push(t),c;function h(F){return s=Sn(s,F),b(),s[s.length-1]!==null?[]:(D(t,0),c.events=Q0(a,c.events,c),c.events)}function d(F,G){return WD(f(F),G)}function f(F){return UD(s,F)}function p(){const{_bufferIndex:F,_index:G,line:ee,column:$,offset:q}=n;return{_bufferIndex:F,_index:G,line:ee,column:$,offset:q}}function m(F){i[F.line]=F.column,R()}function b(){let F;for(;n._index<s.length;){const G=s[n._index];if(typeof G=="string")for(F=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===F&&n._bufferIndex<G.length;)y(G.charCodeAt(n._bufferIndex));else y(G)}}function y(F){u=u(F)}function v(F){Ge(F)?(n.line++,n.column=1,n.offset+=F===-3?2:1,R()):F!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===s[n._index].length&&(n._bufferIndex=-1,n._index++)),c.previous=F}function T(F,G){const ee=G||{};return ee.type=F,ee.start=p(),c.events.push(["enter",ee,c]),o.push(ee),ee}function A(F){const G=o.pop();return G.end=p(),c.events.push(["exit",G,c]),G}function E(F,G){D(F,G.from)}function S(F,G){G.restore()}function I(F,G){return ee;function ee($,q,W){let Z,V,ve,L;return Array.isArray($)?ne($):"tokenize"in $?ne([$]):ae($);function ae(Se){return _e;function _e(at){const Ue=at!==null&&Se[at],$e=at!==null&&Se.null,ht=[...Array.isArray(Ue)?Ue:Ue?[Ue]:[],...Array.isArray($e)?$e:$e?[$e]:[]];return ne(ht)(at)}}function ne(Se){return Z=Se,V=0,Se.length===0?W:N(Se[V])}function N(Se){return _e;function _e(at){return L=H(),ve=Se,Se.partial||(c.currentConstruct=Se),Se.name&&c.parser.constructs.disable.null.includes(Se.name)?ge():Se.tokenize.call(G?Object.assign(Object.create(c),G):c,l,ke,ge)(at)}}function ke(Se){return F(ve,L),q}function ge(Se){return L.restore(),++V<Z.length?N(Z[V]):W}}}function D(F,G){F.resolveAll&&!a.includes(F)&&a.push(F),F.resolve&&mn(c.events,G,c.events.length-G,F.resolve(c.events.slice(G),c)),F.resolveTo&&(c.events=F.resolveTo(c.events,c))}function H(){const F=p(),G=c.previous,ee=c.currentConstruct,$=c.events.length,q=Array.from(o);return{from:$,restore:W};function W(){n=F,c.previous=G,c.currentConstruct=ee,c.events.length=$,o=q,R()}}function R(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}function UD(e,t){const r=t.start._index,n=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let s;if(r===i)s=[e[r].slice(n,a)];else{if(s=e.slice(r,i),n>-1){const o=s[0];typeof o=="string"?s[0]=o.slice(n):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function WD(e,t){let r=-1;const n=[];let i;for(;++r<e.length;){const a=e[r];let s;if(typeof a=="string")s=a;else switch(a){case-5:{s="\r";break}case-4:{s=`
|
|
36
|
+
`;break}case-3:{s=`\r
|
|
37
|
+
`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(a)}i=a===-2,n.push(s)}return n.join("")}function GD(e){const n={constructs:P3([qD,...(e||{}).extensions||[]]),content:i(wD),defined:[],document:i(CD),flow:i(_D),lazy:{},string:i(LD),text:i(MD)};return n;function i(a){return s;function s(o){return jD(n,a,o)}}}function YD(e){for(;!X3(e););return e}const Z2=/[\0\t\n\r]/g;function VD(){let e=1,t="",r=!0,n;return i;function i(a,s,o){const l=[];let c,u,h,d,f;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),h=0,t="",r&&(a.charCodeAt(0)===65279&&h++,r=void 0);h<a.length;){if(Z2.lastIndex=h,c=Z2.exec(a),d=c&&c.index!==void 0?c.index:a.length,f=a.charCodeAt(d),!c){t=a.slice(h);break}if(f===10&&h===d&&n)l.push(-3),n=void 0;else switch(n&&(l.push(-5),n=void 0),h<d&&(l.push(a.slice(h,d)),e+=d-h),f){case 0:{l.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,l.push(-2);e++<u;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:n=!0,e=1}h=d+1}return o&&(n&&l.push(-5),t&&l.push(t),l.push(null)),l}}const E6={}.hasOwnProperty;function XD(e,t,r){return typeof t!="string"&&(r=t,t=void 0),KD(r)(YD(GD(r).document().write(VD()(e,t,!0))))}function KD(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Jt),autolinkProtocol:H,autolinkEmail:H,atxHeading:a(ue),blockQuote:a($e),characterEscape:H,characterReference:H,codeFenced:a(ht),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(ht,s),codeText:a(dt,s),codeTextData:H,data:H,codeFlowValue:H,definition:a(Lt),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(Re),hardBreakEscape:a(de),hardBreakTrailing:a(de),htmlFlow:a(pt,s),htmlFlowData:H,htmlText:a(pt,s),htmlTextData:H,image:a(Bt),label:s,link:a(Jt),listItem:a(Ki),listItemValue:d,listOrdered:a(kn,h),listUnordered:a(kn),paragraph:a(Qi),reference:N,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(ue),strong:a(Mo),thematicBreak:a(yi)},exit:{atxHeading:l(),atxHeadingSequence:E,autolink:l(),autolinkEmail:Ue,autolinkProtocol:at,blockQuote:l(),characterEscapeValue:R,characterReferenceMarkerHexadecimal:ge,characterReferenceMarkerNumeric:ge,characterReferenceValue:Se,characterReference:_e,codeFenced:l(b),codeFencedFence:m,codeFencedFenceInfo:f,codeFencedFenceMeta:p,codeFlowValue:R,codeIndented:l(y),codeText:l(q),codeTextData:R,data:R,definition:l(),definitionDestinationString:A,definitionLabelString:v,definitionTitleString:T,emphasis:l(),hardBreakEscape:l(G),hardBreakTrailing:l(G),htmlFlow:l(ee),htmlFlowData:R,htmlText:l($),htmlTextData:R,image:l(Z),label:ve,labelText:V,lineEnding:F,link:l(W),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ke,resourceDestinationString:L,resourceTitleString:ae,resource:ne,setextHeading:l(D),setextHeadingLineSequence:I,setextHeadingText:S,strong:l(),thematicBreak:l()}};_6(t,(e||{}).mdastExtensions||[]);const r={};return n;function n(le){let we={type:"root",children:[]};const rt={stack:[we],tokenStack:[],config:t,enter:o,exit:c,buffer:s,resume:u,data:r},bt=[];let Et=-1;for(;++Et<le.length;)if(le[Et][1].type==="listOrdered"||le[Et][1].type==="listUnordered")if(le[Et][0]==="enter")bt.push(Et);else{const xr=bt.pop();Et=i(le,xr,Et)}for(Et=-1;++Et<le.length;){const xr=t[le[Et][0]];E6.call(xr,le[Et][1].type)&&xr[le[Et][1].type].call(Object.assign({sliceSerialize:le[Et][2].sliceSerialize},rt),le[Et][1])}if(rt.tokenStack.length>0){const xr=rt.tokenStack[rt.tokenStack.length-1];(xr[1]||J2).call(rt,void 0,xr[0])}for(we.position={start:Ji(le.length>0?le[0][1].start:{line:1,column:1,offset:0}),end:Ji(le.length>0?le[le.length-2][1].end:{line:1,column:1,offset:0})},Et=-1;++Et<t.transforms.length;)we=t.transforms[Et](we)||we;return we}function i(le,we,rt){let bt=we-1,Et=-1,xr=!1,on,J,Y,X;for(;++bt<=rt;){const oe=le[bt];switch(oe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{oe[0]==="enter"?Et++:Et--,X=void 0;break}case"lineEndingBlank":{oe[0]==="enter"&&(on&&!X&&!Et&&!Y&&(Y=bt),X=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:X=void 0}if(!Et&&oe[0]==="enter"&&oe[1].type==="listItemPrefix"||Et===-1&&oe[0]==="exit"&&(oe[1].type==="listUnordered"||oe[1].type==="listOrdered")){if(on){let ce=bt;for(J=void 0;ce--;){const fe=le[ce];if(fe[1].type==="lineEnding"||fe[1].type==="lineEndingBlank"){if(fe[0]==="exit")continue;J&&(le[J][1].type="lineEndingBlank",xr=!0),fe[1].type="lineEnding",J=ce}else if(!(fe[1].type==="linePrefix"||fe[1].type==="blockQuotePrefix"||fe[1].type==="blockQuotePrefixWhitespace"||fe[1].type==="blockQuoteMarker"||fe[1].type==="listItemIndent"))break}Y&&(!J||Y<J)&&(on._spread=!0),on.end=Object.assign({},J?le[J][1].start:oe[1].end),le.splice(J||bt,0,["exit",on,oe[2]]),bt++,rt++}if(oe[1].type==="listItemPrefix"){const ce={type:"listItem",_spread:!1,start:Object.assign({},oe[1].start),end:void 0};on=ce,le.splice(bt,0,["enter",ce,oe[2]]),bt++,rt++,Y=void 0,X=!0}}}return le[we][1]._spread=xr,rt}function a(le,we){return rt;function rt(bt){o.call(this,le(bt),bt),we&&we.call(this,bt)}}function s(){this.stack.push({type:"fragment",children:[]})}function o(le,we,rt){this.stack[this.stack.length-1].children.push(le),this.stack.push(le),this.tokenStack.push([we,rt||void 0]),le.position={start:Ji(we.start),end:void 0}}function l(le){return we;function we(rt){le&&le.call(this,rt),c.call(this,rt)}}function c(le,we){const rt=this.stack.pop(),bt=this.tokenStack.pop();if(bt)bt[0].type!==le.type&&(we?we.call(this,le,bt[0]):(bt[1]||J2).call(this,le,bt[0]));else throw new Error("Cannot close `"+le.type+"` ("+Cl({start:le.start,end:le.end})+"): it’s not open");rt.position.end=Ji(le.end)}function u(){return _m(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function d(le){if(this.data.expectingFirstListItemValue){const we=this.stack[this.stack.length-2];we.start=Number.parseInt(this.sliceSerialize(le),10),this.data.expectingFirstListItemValue=void 0}}function f(){const le=this.resume(),we=this.stack[this.stack.length-1];we.lang=le}function p(){const le=this.resume(),we=this.stack[this.stack.length-1];we.meta=le}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const le=this.resume(),we=this.stack[this.stack.length-1];we.value=le.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const le=this.resume(),we=this.stack[this.stack.length-1];we.value=le.replace(/(\r?\n|\r)$/g,"")}function v(le){const we=this.resume(),rt=this.stack[this.stack.length-1];rt.label=we,rt.identifier=zn(this.sliceSerialize(le)).toLowerCase()}function T(){const le=this.resume(),we=this.stack[this.stack.length-1];we.title=le}function A(){const le=this.resume(),we=this.stack[this.stack.length-1];we.url=le}function E(le){const we=this.stack[this.stack.length-1];if(!we.depth){const rt=this.sliceSerialize(le).length;we.depth=rt}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function I(le){const we=this.stack[this.stack.length-1];we.depth=this.sliceSerialize(le).codePointAt(0)===61?1:2}function D(){this.data.setextHeadingSlurpLineEnding=void 0}function H(le){const rt=this.stack[this.stack.length-1].children;let bt=rt[rt.length-1];(!bt||bt.type!=="text")&&(bt=Ea(),bt.position={start:Ji(le.start),end:void 0},rt.push(bt)),this.stack.push(bt)}function R(le){const we=this.stack.pop();we.value+=this.sliceSerialize(le),we.position.end=Ji(le.end)}function F(le){const we=this.stack[this.stack.length-1];if(this.data.atHardBreak){const rt=we.children[we.children.length-1];rt.position.end=Ji(le.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(we.type)&&(H.call(this,le),R.call(this,le))}function G(){this.data.atHardBreak=!0}function ee(){const le=this.resume(),we=this.stack[this.stack.length-1];we.value=le}function $(){const le=this.resume(),we=this.stack[this.stack.length-1];we.value=le}function q(){const le=this.resume(),we=this.stack[this.stack.length-1];we.value=le}function W(){const le=this.stack[this.stack.length-1];if(this.data.inReference){const we=this.data.referenceType||"shortcut";le.type+="Reference",le.referenceType=we,delete le.url,delete le.title}else delete le.identifier,delete le.label;this.data.referenceType=void 0}function Z(){const le=this.stack[this.stack.length-1];if(this.data.inReference){const we=this.data.referenceType||"shortcut";le.type+="Reference",le.referenceType=we,delete le.url,delete le.title}else delete le.identifier,delete le.label;this.data.referenceType=void 0}function V(le){const we=this.sliceSerialize(le),rt=this.stack[this.stack.length-2];rt.label=HL(we),rt.identifier=zn(we).toLowerCase()}function ve(){const le=this.stack[this.stack.length-1],we=this.resume(),rt=this.stack[this.stack.length-1];if(this.data.inReference=!0,rt.type==="link"){const bt=le.children;rt.children=bt}else rt.alt=we}function L(){const le=this.resume(),we=this.stack[this.stack.length-1];we.url=le}function ae(){const le=this.resume(),we=this.stack[this.stack.length-1];we.title=le}function ne(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function ke(le){const we=this.resume(),rt=this.stack[this.stack.length-1];rt.label=we,rt.identifier=zn(this.sliceSerialize(le)).toLowerCase(),this.data.referenceType="full"}function ge(le){this.data.characterReferenceType=le.type}function Se(le){const we=this.sliceSerialize(le),rt=this.data.characterReferenceType;let bt;rt?(bt=O3(we,rt==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):bt=Nm(we);const Et=this.stack[this.stack.length-1];Et.value+=bt}function _e(le){const we=this.stack.pop();we.position.end=Ji(le.end)}function at(le){R.call(this,le);const we=this.stack[this.stack.length-1];we.url=this.sliceSerialize(le)}function Ue(le){R.call(this,le);const we=this.stack[this.stack.length-1];we.url="mailto:"+this.sliceSerialize(le)}function $e(){return{type:"blockquote",children:[]}}function ht(){return{type:"code",lang:null,meta:null,value:""}}function dt(){return{type:"inlineCode",value:""}}function Lt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Re(){return{type:"emphasis",children:[]}}function ue(){return{type:"heading",depth:0,children:[]}}function de(){return{type:"break"}}function pt(){return{type:"html",value:""}}function Bt(){return{type:"image",title:null,url:"",alt:null}}function Jt(){return{type:"link",title:null,url:"",children:[]}}function kn(le){return{type:"list",ordered:le.type==="listOrdered",start:null,spread:le._spread,children:[]}}function Ki(le){return{type:"listItem",spread:le._spread,checked:null,children:[]}}function Qi(){return{type:"paragraph",children:[]}}function Mo(){return{type:"strong",children:[]}}function Ea(){return{type:"text",value:""}}function yi(){return{type:"thematicBreak"}}}function Ji(e){return{line:e.line,column:e.column,offset:e.offset}}function _6(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?_6(e,n):QD(e,n)}}function QD(e,t){let r;for(r in t)if(E6.call(t,r))switch(r){case"canContainEols":{const n=t[r];n&&e[r].push(...n);break}case"transforms":{const n=t[r];n&&e[r].push(...n);break}case"enter":case"exit":{const n=t[r];n&&Object.assign(e[r],n);break}}}function J2(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Cl({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Cl({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Cl({start:t.start,end:t.end})+") is still open")}function ZD(e){const t=this;t.parser=r;function r(n){return XD(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function JD(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function eO(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
|
|
38
|
+
`}]}function tO(e,t){const r=t.value?t.value+`
|
|
39
|
+
`:"",n={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(n.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:n,children:[{type:"text",value:r}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function rO(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function nO(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function iO(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=String(t.identifier).toUpperCase(),i=go(n.toLowerCase()),a=e.footnoteOrder.indexOf(n);let s,o=e.footnoteCounts.get(n);o===void 0?(o=0,e.footnoteOrder.push(n),s=e.footnoteOrder.length):s=a+1,o+=1,e.footnoteCounts.set(n,o);const l={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+i,id:r+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)}function aO(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function sO(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function A6(e,t){const r=t.referenceType;let n="]";if(r==="collapsed"?n+="[]":r==="full"&&(n+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+n}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=n:i.push({type:"text",value:n}),i}function oO(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return A6(e,t);const i={src:go(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(i.title=n.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function lO(e,t){const r={src:go(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,n),e.applyData(t,n)}function cO(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const n={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,n),e.applyData(t,n)}function uO(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return A6(e,t);const i={href:go(n.url||"")};n.title!==null&&n.title!==void 0&&(i.title=n.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function hO(e,t){const r={href:go(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dO(e,t,r){const n=e.all(t),i=r?fO(r):N6(t),a={},s=[];if(typeof t.checked=="boolean"){const u=n[0];let h;u&&u.type==="element"&&u.tagName==="p"?h=u:(h={type:"element",tagName:"p",properties:{},children:[]},n.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let o=-1;for(;++o<n.length;){const u=n[o];(i||o!==0||u.type!=="element"||u.tagName!=="p")&&s.push({type:"text",value:`
|
|
40
|
+
`}),u.type==="element"&&u.tagName==="p"&&!i?s.push(...u.children):s.push(u)}const l=n[n.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&s.push({type:"text",value:`
|
|
41
|
+
`});const c={type:"element",tagName:"li",properties:a,children:s};return e.patch(t,c),e.applyData(t,c)}function fO(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const r=e.children;let n=-1;for(;!t&&++n<r.length;)t=N6(r[n])}return t}function N6(e){const t=e.spread;return t??e.children.length>1}function pO(e,t){const r={},n=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++i<n.length;){const s=n[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(n,!0)};return e.patch(t,a),e.applyData(t,a)}function mO(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function gO(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function bO(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function yO(e,t){const r=e.all(t),n=r.shift(),i=[];if(n){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([n],!0)};e.patch(t.children[0],s),i.push(s)}if(r.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},o=hi(t.children[1]),l=X0(t.children[t.children.length-1]);o&&l&&(s.position={start:o,end:l}),i.push(s)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function xO(e,t,r){const n=r?r.children:void 0,a=(n?n.indexOf(t):1)===0?"th":"td",s=r&&r.type==="table"?r.align:void 0,o=s?s.length:t.children.length;let l=-1;const c=[];for(;++l<o;){const h=t.children[l],d={},f=s?s[l]:void 0;f&&(d.align=f);let p={type:"element",tagName:a,properties:d,children:[]};h&&(p.children=e.all(h),e.patch(h,p),p=e.applyData(h,p)),c.push(p)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,u),e.applyData(t,u)}function vO(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}const eb=9,tb=32;function kO(e){const t=String(e),r=/\r?\n|\r/g;let n=r.exec(t),i=0;const a=[];for(;n;)a.push(rb(t.slice(i,n.index),i>0,!0),n[0]),i=n.index+n[0].length,n=r.exec(t);return a.push(rb(t.slice(i),i>0,!1)),a.join("")}function rb(e,t,r){let n=0,i=e.length;if(t){let a=e.codePointAt(n);for(;a===eb||a===tb;)n++,a=e.codePointAt(n)}if(r){let a=e.codePointAt(i-1);for(;a===eb||a===tb;)i--,a=e.codePointAt(i-1)}return i>n?e.slice(n,i):""}function wO(e,t){const r={type:"text",value:kO(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function TO(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const CO={blockquote:JD,break:eO,code:tO,delete:rO,emphasis:nO,footnoteReference:iO,heading:aO,html:sO,imageReference:oO,image:lO,inlineCode:cO,linkReference:uO,link:hO,listItem:dO,list:pO,paragraph:mO,root:gO,strong:bO,table:yO,tableCell:vO,tableRow:xO,text:wO,thematicBreak:TO,toml:Dc,yaml:Dc,definition:Dc,footnoteDefinition:Dc};function Dc(){}function SO(e,t){const r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function EO(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function _O(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||SO,n=e.options.footnoteBackLabel||EO,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let l=-1;for(;++l<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[l]);if(!c)continue;const u=e.all(c),h=String(c.identifier).toUpperCase(),d=go(h.toLowerCase());let f=0;const p=[],m=e.footnoteCounts.get(h);for(;m!==void 0&&++f<=m;){p.length>0&&p.push({type:"text",value:" "});let v=typeof r=="string"?r:r(l,f);typeof v=="string"&&(v={type:"text",value:v}),p.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+d+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(l,f),className:["data-footnote-backref"]},children:Array.isArray(v)?v:[v]})}const b=u[u.length-1];if(b&&b.type==="element"&&b.tagName==="p"){const v=b.children[b.children.length-1];v&&v.type==="text"?v.value+=" ":b.children.push({type:"text",value:" "}),b.children.push(...p)}else u.push(...p);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+d},children:e.wrap(u,!0)};e.patch(c,y),o.push(y)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Ya(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
42
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
|
|
43
|
+
`}]}}const Mf={}.hasOwnProperty,AO={};function NO(e,t){const r=t||AO,n=new Map,i=new Map,a=new Map,s={...CO,...r.handlers},o={all:c,applyData:MO,definitionById:n,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:s,one:l,options:r,patch:LO,wrap:RO};return Xs(e,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const h=u.type==="definition"?n:i,d=String(u.identifier).toUpperCase();h.has(d)||h.set(d,u)}}),o;function l(u,h){const d=u.type,f=o.handlers[d];if(Mf.call(o.handlers,d)&&f)return f(o,u,h);if(o.options.passThrough&&o.options.passThrough.includes(d)){if("children"in u){const{children:m,...b}=u,y=Ya(b);return y.children=o.all(u),y}return Ya(u)}return(o.options.unknownHandler||IO)(o,u,h)}function c(u){const h=[];if("children"in u){const d=u.children;let f=-1;for(;++f<d.length;){const p=o.one(d[f],u);if(p){if(f&&d[f-1].type==="break"&&(!Array.isArray(p)&&p.type==="text"&&(p.value=nb(p.value)),!Array.isArray(p)&&p.type==="element")){const m=p.children[0];m&&m.type==="text"&&(m.value=nb(m.value))}Array.isArray(p)?h.push(...p):h.push(p)}}}return h}}function LO(e,t){e.position&&(t.position=h3(e))}function MO(e,t){let r=t;if(e&&e.data){const n=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof n=="string")if(r.type==="element")r.tagName=n;else{const s="children"in r?r.children:[r];r={type:"element",tagName:n,properties:{},children:s}}r.type==="element"&&a&&Object.assign(r.properties,Ya(a)),"children"in r&&r.children&&i!==null&&i!==void 0&&(r.children=i)}return r}function IO(e,t){const r=t.data||{},n="value"in t&&!(Mf.call(r,"hProperties")||Mf.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function RO(e,t){const r=[];let n=-1;for(t&&r.push({type:"text",value:`
|
|
44
|
+
`});++n<e.length;)n&&r.push({type:"text",value:`
|
|
45
|
+
`}),r.push(e[n]);return t&&e.length>0&&r.push({type:"text",value:`
|
|
46
|
+
`}),r}function nb(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function ib(e,t){const r=NO(e,t),n=r.one(e,void 0),i=_O(r),a=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
|
|
47
|
+
`},i),a}function BO(e,t){return e&&"run"in e?async function(r,n){const i=ib(r,{file:n,...t});await e.run(i,n)}:function(r,n){return ib(r,{file:n,...e||t})}}function ab(e){if(e)throw e}var dd,sb;function DO(){if(sb)return dd;sb=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,i=function(c){return typeof Array.isArray=="function"?Array.isArray(c):t.call(c)==="[object Array]"},a=function(c){if(!c||t.call(c)!=="[object Object]")return!1;var u=e.call(c,"constructor"),h=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!u&&!h)return!1;var d;for(d in c);return typeof d>"u"||e.call(c,d)},s=function(c,u){r&&u.name==="__proto__"?r(c,u.name,{enumerable:!0,configurable:!0,value:u.newValue,writable:!0}):c[u.name]=u.newValue},o=function(c,u){if(u==="__proto__")if(e.call(c,u)){if(n)return n(c,u).value}else return;return c[u]};return dd=function l(){var c,u,h,d,f,p,m=arguments[0],b=1,y=arguments.length,v=!1;for(typeof m=="boolean"&&(v=m,m=arguments[1]||{},b=2),(m==null||typeof m!="object"&&typeof m!="function")&&(m={});b<y;++b)if(c=arguments[b],c!=null)for(u in c)h=o(m,u),d=o(c,u),m!==d&&(v&&d&&(a(d)||(f=i(d)))?(f?(f=!1,p=h&&i(h)?h:[]):p=h&&a(h)?h:{},s(m,{name:u,newValue:l(v,p,d)})):typeof d<"u"&&s(m,{name:u,newValue:d}));return m},dd}var OO=DO();const fd=eh(OO);function If(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function PO(){const e=[],t={run:r,use:n};return t;function r(...i){let a=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);o(null,...i);function o(l,...c){const u=e[++a];let h=-1;if(l){s(l);return}for(;++h<i.length;)(c[h]===null||c[h]===void 0)&&(c[h]=i[h]);i=c,u?FO(u,o)(...c):s(null,...c)}}function n(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function FO(e,t){let r;return n;function n(...s){const o=e.length>s.length;let l;o&&s.push(i);try{l=e.apply(this,s)}catch(c){const u=c;if(o&&r)throw u;return i(u)}o||(l&&l.then&&typeof l.then=="function"?l.then(a,i):l instanceof Error?i(l):a(l))}function i(s,...o){r||(r=!0,t(s,...o))}function a(s){i(null,s)}}const Jn={basename:$O,dirname:zO,extname:HO,join:qO,sep:"/"};function $O(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');mc(e);let r=0,n=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){r=i+1;break}}else n<0&&(a=!0,n=i+1);return n<0?"":e.slice(r,n)}if(t===e)return"";let s=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){r=i+1;break}}else s<0&&(a=!0,s=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(n=i):(o=-1,n=s));return r===n?n=s:n<0&&(n=e.length),e.slice(r,n)}function zO(e){if(mc(e),e.length===0)return".";let t=-1,r=e.length,n;for(;--r;)if(e.codePointAt(r)===47){if(n){t=r;break}}else n||(n=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function HO(e){mc(e);let t=e.length,r=-1,n=0,i=-1,a=0,s;for(;t--;){const o=e.codePointAt(t);if(o===47){if(s){n=t+1;break}continue}r<0&&(s=!0,r=t+1),o===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||r<0||a===0||a===1&&i===r-1&&i===n+1?"":e.slice(i,r)}function qO(...e){let t=-1,r;for(;++t<e.length;)mc(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":jO(r)}function jO(e){mc(e);const t=e.codePointAt(0)===47;let r=UO(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function UO(e,t){let r="",n=0,i=-1,a=0,s=-1,o,l;for(;++s<=e.length;){if(s<e.length)o=e.codePointAt(s);else{if(o===47)break;o=47}if(o===47){if(!(i===s-1||a===1))if(i!==s-1&&a===2){if(r.length<2||n!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(l=r.lastIndexOf("/"),l!==r.length-1){l<0?(r="",n=0):(r=r.slice(0,l),n=r.length-1-r.lastIndexOf("/")),i=s,a=0;continue}}else if(r.length>0){r="",n=0,i=s,a=0;continue}}t&&(r=r.length>0?r+"/..":"..",n=2)}else r.length>0?r+="/"+e.slice(i+1,s):r=e.slice(i+1,s),n=s-i-1;i=s,a=0}else o===46&&a>-1?a++:a=-1}return r}function mc(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const WO={cwd:GO};function GO(){return"/"}function Rf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function YO(e){if(typeof e=="string")e=new URL(e);else if(!Rf(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return VO(e)}function VO(e){if(e.hostname!==""){const n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const n=t.codePointAt(r+2);if(n===70||n===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const pd=["history","path","basename","stem","extname","dirname"];class XO{constructor(t){let r;t?Rf(t)?r={path:t}:typeof t=="string"||KO(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":WO.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<pd.length;){const a=pd[n];a in r&&r[a]!==void 0&&r[a]!==null&&(this[a]=a==="history"?[...r[a]]:r[a])}let i;for(i in r)pd.includes(i)||(this[i]=r[i])}get basename(){return typeof this.path=="string"?Jn.basename(this.path):void 0}set basename(t){gd(t,"basename"),md(t,"basename"),this.path=Jn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Jn.dirname(this.path):void 0}set dirname(t){ob(this.basename,"dirname"),this.path=Jn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Jn.extname(this.path):void 0}set extname(t){if(md(t,"extname"),ob(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Jn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Rf(t)&&(t=YO(t)),gd(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Jn.basename(this.path,this.extname):void 0}set stem(t){gd(t,"stem"),md(t,"stem"),this.path=Jn.join(this.dirname||"",t+(this.extname||""))}fail(t,r,n){const i=this.message(t,r,n);throw i.fatal=!0,i}info(t,r,n){const i=this.message(t,r,n);return i.fatal=void 0,i}message(t,r,n){const i=new Or(t,r,n);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function md(e,t){if(e&&e.includes(Jn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Jn.sep+"`")}function gd(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ob(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function KO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const QO=(function(e){const n=this.constructor.prototype,i=n[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,n),a}),ZO={}.hasOwnProperty;class Pm extends QO{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=PO()}copy(){const t=new Pm;let r=-1;for(;++r<this.attachers.length;){const n=this.attachers[r];t.use(...n)}return t.data(fd(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(xd("data",this.frozen),this.namespace[t]=r,this):ZO.call(this.namespace,t)&&this.namespace[t]||void 0:t?(xd("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);const i=r.call(t,...n);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=Oc(t),n=this.parser||this.Parser;return bd("parse",n),n(String(r),r)}process(t,r){const n=this;return this.freeze(),bd("process",this.parser||this.Parser),yd("process",this.compiler||this.Compiler),r?i(void 0,r):new Promise(i);function i(a,s){const o=Oc(t),l=n.parse(o);n.run(l,o,function(u,h,d){if(u||!h||!d)return c(u);const f=h,p=n.stringify(f,d);tP(p)?d.value=p:d.result=p,c(u,d)});function c(u,h){u||!h?s(u):a?a(h):r(void 0,h)}}}processSync(t){let r=!1,n;return this.freeze(),bd("processSync",this.parser||this.Parser),yd("processSync",this.compiler||this.Compiler),this.process(t,i),cb("processSync","process",r),n;function i(a,s){r=!0,ab(a),n=s}}run(t,r,n){lb(t),this.freeze();const i=this.transformers;return!n&&typeof r=="function"&&(n=r,r=void 0),n?a(void 0,n):new Promise(a);function a(s,o){const l=Oc(r);i.run(t,l,c);function c(u,h,d){const f=h||t;u?o(u):s?s(f):n(void 0,f,d)}}}runSync(t,r){let n=!1,i;return this.run(t,r,a),cb("runSync","run",n),i;function a(s,o){ab(s),i=o,n=!0}}stringify(t,r){this.freeze();const n=Oc(r),i=this.compiler||this.Compiler;return yd("stringify",i),lb(t),i(t,n)}use(t,...r){const n=this.attachers,i=this.namespace;if(xd("use",this.frozen),t!=null)if(typeof t=="function")l(t,r);else if(typeof t=="object")Array.isArray(t)?o(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...h]=c;l(u,h)}else s(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function s(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(c.plugins),c.settings&&(i.settings=fd(!0,i.settings,c.settings))}function o(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const h=c[u];a(h)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let h=-1,d=-1;for(;++h<n.length;)if(n[h][0]===c){d=h;break}if(d===-1)n.push([c,...u]);else if(u.length>0){let[f,...p]=u;const m=n[d][1];If(m)&&If(f)&&(f=fd(!0,m,f)),n[d]=[c,f,...p]}}}}const JO=new Pm().freeze();function bd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function yd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function xd(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function lb(e){if(!If(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function cb(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Oc(e){return eP(e)?e:new XO(e)}function eP(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function tP(e){return typeof e=="string"||rP(e)}function rP(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function Fm(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ls=Fm();function L6(e){ls=e}var Sl={exec:()=>null};function At(e,t=""){let r=typeof e=="string"?e:e.source,n={replace:(i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(Hr.caret,"$1"),r=r.replace(i,s),n},getRegex:()=>new RegExp(r,t)};return n}var nP=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Hr={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]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},iP=/^(?:[ \t]*(?:\n|$))+/,aP=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,sP=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,gc=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,oP=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,$m=/(?:[*+-]|\d{1,9}[.)])/,M6=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,I6=At(M6).replace(/bull/g,$m).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(),lP=At(M6).replace(/bull/g,$m).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(),zm=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,cP=/^[^\n]+/,Hm=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,uP=At(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Hm).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),hP=At(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,$m).getRegex(),th="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",qm=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,dP=At("^ {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",qm).replace("tag",th).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),R6=At(zm).replace("hr",gc).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",th).getRegex(),fP=At(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",R6).getRegex(),jm={blockquote:fP,code:aP,def:uP,fences:sP,heading:oP,hr:gc,html:dP,lheading:I6,list:hP,newline:iP,paragraph:R6,table:Sl,text:cP},ub=At("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",gc).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",th).getRegex(),pP={...jm,lheading:lP,table:ub,paragraph:At(zm).replace("hr",gc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ub).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",th).getRegex()},mP={...jm,html:At(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",qm).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:Sl,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:At(zm).replace("hr",gc).replace("heading",` *#{1,6} *[^
|
|
48
|
+
]`).replace("lheading",I6).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},gP=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,bP=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,B6=/^( {2,}|\\)\n(?!\s*$)/,yP=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,rh=/[\p{P}\p{S}]/u,Um=/[\s\p{P}\p{S}]/u,D6=/[^\s\p{P}\p{S}]/u,xP=At(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Um).getRegex(),O6=/(?!~)[\p{P}\p{S}]/u,vP=/(?!~)[\s\p{P}\p{S}]/u,kP=/(?:[^\s\p{P}\p{S}]|~)/u,wP=At(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",nP?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),P6=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,TP=At(P6,"u").replace(/punct/g,rh).getRegex(),CP=At(P6,"u").replace(/punct/g,O6).getRegex(),F6="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",SP=At(F6,"gu").replace(/notPunctSpace/g,D6).replace(/punctSpace/g,Um).replace(/punct/g,rh).getRegex(),EP=At(F6,"gu").replace(/notPunctSpace/g,kP).replace(/punctSpace/g,vP).replace(/punct/g,O6).getRegex(),_P=At("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,D6).replace(/punctSpace/g,Um).replace(/punct/g,rh).getRegex(),AP=At(/\\(punct)/,"gu").replace(/punct/g,rh).getRegex(),NP=At(/^<(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(),LP=At(qm).replace("(?:-->|$)","-->").getRegex(),MP=At("^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",LP).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),qu=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,IP=At(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",qu).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),$6=At(/^!?\[(label)\]\[(ref)\]/).replace("label",qu).replace("ref",Hm).getRegex(),z6=At(/^!?\[(ref)\](?:\[\])?/).replace("ref",Hm).getRegex(),RP=At("reflink|nolink(?!\\()","g").replace("reflink",$6).replace("nolink",z6).getRegex(),hb=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Wm={_backpedal:Sl,anyPunctuation:AP,autolink:NP,blockSkip:wP,br:B6,code:bP,del:Sl,emStrongLDelim:TP,emStrongRDelimAst:SP,emStrongRDelimUnd:_P,escape:gP,link:IP,nolink:z6,punctuation:xP,reflink:$6,reflinkSearch:RP,tag:MP,text:yP,url:Sl},BP={...Wm,link:At(/^!?\[(label)\]\((.*?)\)/).replace("label",qu).getRegex(),reflink:At(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",qu).getRegex()},Bf={...Wm,emStrongRDelimAst:EP,emStrongLDelim:CP,url:At(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",hb).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:At(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",hb).getRegex()},DP={...Bf,br:At(B6).replace("{2,}","*").getRegex(),text:At(Bf.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Pc={normal:jm,gfm:pP,pedantic:mP},$o={normal:Wm,gfm:Bf,breaks:DP,pedantic:BP},OP={"&":"&","<":"<",">":">",'"':""","'":"'"},db=e=>OP[e];function Ei(e,t){if(t){if(Hr.escapeTest.test(e))return e.replace(Hr.escapeReplace,db)}else if(Hr.escapeTestNoEncode.test(e))return e.replace(Hr.escapeReplaceNoEncode,db);return e}function fb(e){try{e=encodeURI(e).replace(Hr.percentDecode,"%")}catch{return null}return e}function pb(e,t){let r=e.replace(Hr.findPipe,(a,s,o)=>{let l=!1,c=s;for(;--c>=0&&o[c]==="\\";)l=!l;return l?"|":" |"}),n=r.split(Hr.splitPipe),i=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(;i<n.length;i++)n[i]=n[i].trim().replace(Hr.slashPipe,"|");return n}function zo(e,t,r){let n=e.length;if(n===0)return"";let i=0;for(;i<n&&e.charAt(n-i-1)===t;)i++;return e.slice(0,n-i)}function PP(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let n=0;n<e.length;n++)if(e[n]==="\\")n++;else if(e[n]===t[0])r++;else if(e[n]===t[1]&&(r--,r<0))return n;return r>0?-2:-1}function mb(e,t,r,n,i){let a=t.href,s=t.title||null,o=e[1].replace(i.other.outputLinkReplace,"$1");n.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:s,text:o,tokens:n.inlineTokens(o)};return n.state.inLink=!1,l}function FP(e,t,r){let n=e.match(r.other.indentCodeCompensation);if(n===null)return t;let i=n[1];return t.split(`
|
|
49
|
+
`).map(a=>{let s=a.match(r.other.beginningSpace);if(s===null)return a;let[o]=s;return o.length>=i.length?a.slice(i.length):a}).join(`
|
|
50
|
+
`)}var ju=class{options;rules;lexer;constructor(t){this.options=t||ls}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let n=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?n:zo(n,`
|
|
51
|
+
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let n=r[0],i=FP(n,r[3]||"",this.rules);return{type:"code",raw:n,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:i}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let n=r[2].trim();if(this.rules.other.endingHash.test(n)){let i=zo(n,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(n=i.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:zo(r[0],`
|
|
52
|
+
`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let n=zo(r[0],`
|
|
53
|
+
`).split(`
|
|
54
|
+
`),i="",a="",s=[];for(;n.length>0;){let o=!1,l=[],c;for(c=0;c<n.length;c++)if(this.rules.other.blockquoteStart.test(n[c]))l.push(n[c]),o=!0;else if(!o)l.push(n[c]);else break;n=n.slice(c);let u=l.join(`
|
|
55
|
+
`),h=u.replace(this.rules.other.blockquoteSetextReplace,`
|
|
56
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
|
|
57
|
+
${u}`:u,a=a?`${a}
|
|
58
|
+
${h}`:h;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,s,!0),this.lexer.state.top=d,n.length===0)break;let f=s.at(-1);if(f?.type==="code")break;if(f?.type==="blockquote"){let p=f,m=p.raw+`
|
|
59
|
+
`+n.join(`
|
|
60
|
+
`),b=this.blockquote(m);s[s.length-1]=b,i=i.substring(0,i.length-p.raw.length)+b.raw,a=a.substring(0,a.length-p.text.length)+b.text;break}else if(f?.type==="list"){let p=f,m=p.raw+`
|
|
61
|
+
`+n.join(`
|
|
62
|
+
`),b=this.list(m);s[s.length-1]=b,i=i.substring(0,i.length-f.raw.length)+b.raw,a=a.substring(0,a.length-p.raw.length)+b.raw,n=m.substring(s.at(-1).raw.length).split(`
|
|
63
|
+
`);continue}}return{type:"blockquote",raw:i,tokens:s,text:a}}}list(t){let r=this.rules.block.list.exec(t);if(r){let n=r[1].trim(),i=n.length>1,a={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");let s=this.rules.other.listItemRegex(n),o=!1;for(;t;){let c=!1,u="",h="";if(!(r=s.exec(t))||this.rules.block.hr.test(t))break;u=r[0],t=t.substring(u.length);let d=r[2].split(`
|
|
64
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),f=t.split(`
|
|
65
|
+
`,1)[0],p=!d.trim(),m=0;if(this.options.pedantic?(m=2,h=d.trimStart()):p?m=r[1].length+1:(m=r[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,h=d.slice(m),m+=r[1].length),p&&this.rules.other.blankLine.test(f)&&(u+=f+`
|
|
66
|
+
`,t=t.substring(f.length+1),c=!0),!c){let b=this.rules.other.nextBulletRegex(m),y=this.rules.other.hrRegex(m),v=this.rules.other.fencesBeginRegex(m),T=this.rules.other.headingBeginRegex(m),A=this.rules.other.htmlBeginRegex(m);for(;t;){let E=t.split(`
|
|
67
|
+
`,1)[0],S;if(f=E,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),S=f):S=f.replace(this.rules.other.tabCharGlobal," "),v.test(f)||T.test(f)||A.test(f)||b.test(f)||y.test(f))break;if(S.search(this.rules.other.nonSpaceChar)>=m||!f.trim())h+=`
|
|
68
|
+
`+S.slice(m);else{if(p||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||v.test(d)||T.test(d)||y.test(d))break;h+=`
|
|
69
|
+
`+f}!p&&!f.trim()&&(p=!0),u+=E+`
|
|
70
|
+
`,t=t.substring(E.length+1),d=S.slice(m)}}a.loose||(o?a.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(o=!0)),a.items.push({type:"list_item",raw:u,task:!!this.options.gfm&&this.rules.other.listIsTask.test(h),loose:!1,text:h,tokens:[]}),a.raw+=u}let l=a.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let c of a.items){if(this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]),c.task){if(c.text=c.text.replace(this.rules.other.listReplaceTask,""),c.tokens[0]?.type==="text"||c.tokens[0]?.type==="paragraph"){c.tokens[0].raw=c.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),c.tokens[0].text=c.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let h=this.lexer.inlineQueue.length-1;h>=0;h--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[h].src)){this.lexer.inlineQueue[h].src=this.lexer.inlineQueue[h].src.replace(this.rules.other.listReplaceTask,"");break}}let u=this.rules.other.listTaskCheckbox.exec(c.raw);if(u){let h={type:"checkbox",raw:u[0]+" ",checked:u[0]!=="[ ]"};c.checked=h.checked,a.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=h.raw+c.tokens[0].raw,c.tokens[0].text=h.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(h)):c.tokens.unshift({type:"paragraph",raw:h.raw,text:h.raw,tokens:[h]}):c.tokens.unshift(h)}}if(!a.loose){let u=c.tokens.filter(d=>d.type==="space"),h=u.length>0&&u.some(d=>this.rules.other.anyLine.test(d.raw));a.loose=h}}if(a.loose)for(let c of a.items){c.loose=!0;for(let u of c.tokens)u.type==="text"&&(u.type="paragraph")}return a}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let n=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:n,raw:r[0],href:i,title:a}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let n=pb(r[1]),i=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
71
|
+
`):[],s={type:"table",raw:r[0],header:[],align:[],rows:[]};if(n.length===i.length){for(let o of i)this.rules.other.tableAlignRight.test(o)?s.align.push("right"):this.rules.other.tableAlignCenter.test(o)?s.align.push("center"):this.rules.other.tableAlignLeft.test(o)?s.align.push("left"):s.align.push(null);for(let o=0;o<n.length;o++)s.header.push({text:n[o],tokens:this.lexer.inline(n[o]),header:!0,align:s.align[o]});for(let o of a)s.rows.push(pb(o,s.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:s.align[c]})));return s}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let n=r[1].charAt(r[1].length-1)===`
|
|
72
|
+
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let n=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let s=zo(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{let s=PP(r[2],"()");if(s===-2)return;if(s>-1){let o=(r[0].indexOf("!")===0?5:4)+r[1].length+s;r[2]=r[2].substring(0,s),r[0]=r[0].substring(0,o).trim(),r[3]=""}}let i=r[2],a="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(i);s&&(i=s[1],a=s[3])}else a=r[3]?r[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?i=i.slice(1):i=i.slice(1,-1)),mb(r,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let i=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[i.toLowerCase()];if(!a){let s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return mb(n,a,n[0],this.lexer,this.rules)}}emStrong(t,r,n=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!(!i||i[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[2])||!n||this.rules.inline.punctuation.exec(n))){let a=[...i[0]].length-1,s,o,l=a,c=0,u=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,r=r.slice(-1*t.length+a);(i=u.exec(r))!=null;){if(s=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!s)continue;if(o=[...s].length,i[3]||i[4]){l+=o;continue}else if((i[5]||i[6])&&a%3&&!((a+o)%3)){c+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l+c);let h=[...i[0]][0].length,d=t.slice(0,a+i.index+h+o);if(Math.min(a,o)%2){let p=d.slice(1,-1);return{type:"em",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}let f=d.slice(2,-2);return{type:"strong",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let n=r[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(n),a=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return i&&a&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:r[0],text:n}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let n,i;return r[2]==="@"?(n=r[1],i="mailto:"+n):(n=r[1],i=n),{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let n,i;if(r[2]==="@")n=r[0],i="mailto:"+n;else{let a;do a=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(a!==r[0]);n=r[0],r[1]==="www."?i="http://"+r[0]:i=r[0]}return{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let n=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:n}}}},En=class Df{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ls,this.options.tokenizer=this.options.tokenizer||new ju,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:Hr,block:Pc.normal,inline:$o.normal};this.options.pedantic?(r.block=Pc.pedantic,r.inline=$o.pedantic):this.options.gfm&&(r.block=Pc.gfm,this.options.breaks?r.inline=$o.breaks:r.inline=$o.gfm),this.tokenizer.rules=r}static get rules(){return{block:Pc,inline:$o}}static lex(t,r){return new Df(r).lex(t)}static lexInline(t,r){return new Df(r).inlineTokens(t)}lex(t){t=t.replace(Hr.carriageReturn,`
|
|
73
|
+
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],n=!1){for(this.options.pedantic&&(t=t.replace(Hr.tabCharGlobal," ").replace(Hr.spaceLine,""));t;){let i;if(this.options.extensions?.block?.some(s=>(i=s.call({lexer:this},t,r))?(t=t.substring(i.raw.length),r.push(i),!0):!1))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let s=r.at(-1);i.raw.length===1&&s!==void 0?s.raw+=`
|
|
74
|
+
`:r.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
|
|
75
|
+
`)?"":`
|
|
76
|
+
`)+i.raw,s.text+=`
|
|
77
|
+
`+i.text,this.inlineQueue.at(-1).src=s.text):r.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
|
|
78
|
+
`)?"":`
|
|
79
|
+
`)+i.raw,s.text+=`
|
|
80
|
+
`+i.raw,this.inlineQueue.at(-1).src=s.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},r.push(i));continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),r.push(i);continue}let a=t;if(this.options.extensions?.startBlock){let s=1/0,o=t.slice(1),l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},o),typeof l=="number"&&l>=0&&(s=Math.min(s,l))}),s<1/0&&s>=0&&(a=t.substring(0,s+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){let s=r.at(-1);n&&s?.type==="paragraph"?(s.raw+=(s.raw.endsWith(`
|
|
81
|
+
`)?"":`
|
|
82
|
+
`)+i.raw,s.text+=`
|
|
83
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(i),n=a.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let s=r.at(-1);s?.type==="text"?(s.raw+=(s.raw.endsWith(`
|
|
84
|
+
`)?"":`
|
|
85
|
+
`)+i.raw,s.text+=`
|
|
86
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(i);continue}if(t){let s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let n=t,i=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)l.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,i.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)a=i[2]?i[2].length:0,n=n.slice(0,i.index+a)+"["+"a".repeat(i[0].length-a-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let s=!1,o="";for(;t;){s||(o=""),s=!1;let l;if(this.options.extensions?.inline?.some(u=>(l=u.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let u=r.at(-1);l.type==="text"&&u?.type==="text"?(u.raw+=l.raw,u.text+=l.text):r.push(l);continue}if(l=this.tokenizer.emStrong(t,n,o)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.del(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),r.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),r.push(l);continue}let c=t;if(this.options.extensions?.startInline){let u=1/0,h=t.slice(1),d;this.options.extensions.startInline.forEach(f=>{d=f.call({lexer:this},h),typeof d=="number"&&d>=0&&(u=Math.min(u,d))}),u<1/0&&u>=0&&(c=t.substring(0,u+1))}if(l=this.tokenizer.inlineText(c)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(o=l.raw.slice(-1)),s=!0;let u=r.at(-1);u?.type==="text"?(u.raw+=l.raw,u.text+=l.text):r.push(l);continue}if(t){let u="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return r}},Uu=class{options;parser;constructor(t){this.options=t||ls}space(t){return""}code({text:t,lang:r,escaped:n}){let i=(r||"").match(Hr.notSpaceStart)?.[0],a=t.replace(Hr.endingNewline,"")+`
|
|
87
|
+
`;return i?'<pre><code class="language-'+Ei(i)+'">'+(n?a:Ei(a,!0))+`</code></pre>
|
|
88
|
+
`:"<pre><code>"+(n?a:Ei(a,!0))+`</code></pre>
|
|
89
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
90
|
+
${this.parser.parse(t)}</blockquote>
|
|
91
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
|
|
92
|
+
`}hr(t){return`<hr>
|
|
93
|
+
`}list(t){let r=t.ordered,n=t.start,i="";for(let o=0;o<t.items.length;o++){let l=t.items[o];i+=this.listitem(l)}let a=r?"ol":"ul",s=r&&n!==1?' start="'+n+'"':"";return"<"+a+s+`>
|
|
94
|
+
`+i+"</"+a+`>
|
|
95
|
+
`}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
|
|
96
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
97
|
+
`}table(t){let r="",n="";for(let a=0;a<t.header.length;a++)n+=this.tablecell(t.header[a]);r+=this.tablerow({text:n});let i="";for(let a=0;a<t.rows.length;a++){let s=t.rows[a];n="";for(let o=0;o<s.length;o++)n+=this.tablecell(s[o]);i+=this.tablerow({text:n})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
|
|
98
|
+
<thead>
|
|
99
|
+
`+r+`</thead>
|
|
100
|
+
`+i+`</table>
|
|
101
|
+
`}tablerow({text:t}){return`<tr>
|
|
102
|
+
${t}</tr>
|
|
103
|
+
`}tablecell(t){let r=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+r+`</${n}>
|
|
104
|
+
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Ei(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:n}){let i=this.parser.parseInline(n),a=fb(t);if(a===null)return i;t=a;let s='<a href="'+t+'"';return r&&(s+=' title="'+Ei(r)+'"'),s+=">"+i+"</a>",s}image({href:t,title:r,text:n,tokens:i}){i&&(n=this.parser.parseInline(i,this.parser.textRenderer));let a=fb(t);if(a===null)return Ei(n);t=a;let s=`<img src="${t}" alt="${n}"`;return r&&(s+=` title="${Ei(r)}"`),s+=">",s}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Ei(t.text)}},Gm=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},On=class Of{options;renderer;textRenderer;constructor(t){this.options=t||ls,this.options.renderer=this.options.renderer||new Uu,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Gm}static parse(t,r){return new Of(r).parse(t)}static parseInline(t,r){return new Of(r).parseInline(t)}parse(t){let r="";for(let n=0;n<t.length;n++){let i=t[n];if(this.options.extensions?.renderers?.[i.type]){let s=i,o=this.options.extensions.renderers[s.type].call({parser:this},s);if(o!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(s.type)){r+=o||"";continue}}let a=i;switch(a.type){case"space":{r+=this.renderer.space(a);break}case"hr":{r+=this.renderer.hr(a);break}case"heading":{r+=this.renderer.heading(a);break}case"code":{r+=this.renderer.code(a);break}case"table":{r+=this.renderer.table(a);break}case"blockquote":{r+=this.renderer.blockquote(a);break}case"list":{r+=this.renderer.list(a);break}case"checkbox":{r+=this.renderer.checkbox(a);break}case"html":{r+=this.renderer.html(a);break}case"def":{r+=this.renderer.def(a);break}case"paragraph":{r+=this.renderer.paragraph(a);break}case"text":{r+=this.renderer.text(a);break}default:{let s='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return r}parseInline(t,r=this.renderer){let n="";for(let i=0;i<t.length;i++){let a=t[i];if(this.options.extensions?.renderers?.[a.type]){let o=this.options.extensions.renderers[a.type].call({parser:this},a);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){n+=o||"";continue}}let s=a;switch(s.type){case"escape":{n+=r.text(s);break}case"html":{n+=r.html(s);break}case"link":{n+=r.link(s);break}case"image":{n+=r.image(s);break}case"checkbox":{n+=r.checkbox(s);break}case"strong":{n+=r.strong(s);break}case"em":{n+=r.em(s);break}case"codespan":{n+=r.codespan(s);break}case"br":{n+=r.br(s);break}case"del":{n+=r.del(s);break}case"text":{n+=r.text(s);break}default:{let o='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return n}},il=class{options;block;constructor(t){this.options=t||ls}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?En.lex:En.lexInline}provideParser(){return this.block?On.parse:On.parseInline}},$P=class{defaults=Fm();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=On;Renderer=Uu;TextRenderer=Gm;Lexer=En;Tokenizer=ju;Hooks=il;constructor(...t){this.use(...t)}walkTokens(t,r){let n=[];for(let i of t)switch(n=n.concat(r.call(this,i)),i.type){case"table":{let a=i;for(let s of a.header)n=n.concat(this.walkTokens(s.tokens,r));for(let s of a.rows)for(let o of s)n=n.concat(this.walkTokens(o.tokens,r));break}case"list":{let a=i;n=n.concat(this.walkTokens(a.items,r));break}default:{let a=i;this.defaults.extensions?.childTokens?.[a.type]?this.defaults.extensions.childTokens[a.type].forEach(s=>{let o=a[s].flat(1/0);n=n.concat(this.walkTokens(o,r))}):a.tokens&&(n=n.concat(this.walkTokens(a.tokens,r)))}}return n}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let i={...n};if(i.async=this.defaults.async||i.async||!1,n.extensions&&(n.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let s=r.renderers[a.name];s?r.renderers[a.name]=function(...o){let l=a.renderer.apply(this,o);return l===!1&&(l=s.apply(this,o)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=r[a.level];s?s.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),i.extensions=r),n.renderer){let a=this.defaults.renderer||new Uu(this.defaults);for(let s in n.renderer){if(!(s in a))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let o=s,l=n.renderer[o],c=a[o];a[o]=(...u)=>{let h=l.apply(a,u);return h===!1&&(h=c.apply(a,u)),h||""}}i.renderer=a}if(n.tokenizer){let a=this.defaults.tokenizer||new ju(this.defaults);for(let s in n.tokenizer){if(!(s in a))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let o=s,l=n.tokenizer[o],c=a[o];a[o]=(...u)=>{let h=l.apply(a,u);return h===!1&&(h=c.apply(a,u)),h}}i.tokenizer=a}if(n.hooks){let a=this.defaults.hooks||new il;for(let s in n.hooks){if(!(s in a))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let o=s,l=n.hooks[o],c=a[o];il.passThroughHooks.has(s)?a[o]=u=>{if(this.defaults.async&&il.passThroughHooksRespectAsync.has(s))return(async()=>{let d=await l.call(a,u);return c.call(a,d)})();let h=l.call(a,u);return c.call(a,h)}:a[o]=(...u)=>{if(this.defaults.async)return(async()=>{let d=await l.apply(a,u);return d===!1&&(d=await c.apply(a,u)),d})();let h=l.apply(a,u);return h===!1&&(h=c.apply(a,u)),h}}i.hooks=a}if(n.walkTokens){let a=this.defaults.walkTokens,s=n.walkTokens;i.walkTokens=function(o){let l=[];return l.push(s.call(this,o)),a&&(l=l.concat(a.call(this,o))),l}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return En.lex(t,r??this.defaults)}parser(t,r){return On.parse(t,r??this.defaults)}parseMarkdown(t){return(r,n)=>{let i={...n},a={...this.defaults,...i},s=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&i.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let o=a.hooks?await a.hooks.preprocess(r):r,l=await(a.hooks?await a.hooks.provideLexer():t?En.lex:En.lexInline)(o,a),c=a.hooks?await a.hooks.processAllTokens(l):l;a.walkTokens&&await Promise.all(this.walkTokens(c,a.walkTokens));let u=await(a.hooks?await a.hooks.provideParser():t?On.parse:On.parseInline)(c,a);return a.hooks?await a.hooks.postprocess(u):u})().catch(s);try{a.hooks&&(r=a.hooks.preprocess(r));let o=(a.hooks?a.hooks.provideLexer():t?En.lex:En.lexInline)(r,a);a.hooks&&(o=a.hooks.processAllTokens(o)),a.walkTokens&&this.walkTokens(o,a.walkTokens);let l=(a.hooks?a.hooks.provideParser():t?On.parse:On.parseInline)(o,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(o){return s(o)}}}onError(t,r){return n=>{if(n.message+=`
|
|
105
|
+
Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+Ei(n.message+"",!0)+"</pre>";return r?Promise.resolve(i):i}if(r)return Promise.reject(n);throw n}}},Xa=new $P;function Rt(e,t){return Xa.parse(e,t)}Rt.options=Rt.setOptions=function(e){return Xa.setOptions(e),Rt.defaults=Xa.defaults,L6(Rt.defaults),Rt};Rt.getDefaults=Fm;Rt.defaults=ls;Rt.use=function(...e){return Xa.use(...e),Rt.defaults=Xa.defaults,L6(Rt.defaults),Rt};Rt.walkTokens=function(e,t){return Xa.walkTokens(e,t)};Rt.parseInline=Xa.parseInline;Rt.Parser=On;Rt.parser=On.parse;Rt.Renderer=Uu;Rt.TextRenderer=Gm;Rt.Lexer=En;Rt.lexer=En.lex;Rt.Tokenizer=ju;Rt.Hooks=il;Rt.parse=Rt;Rt.options;Rt.setOptions;Rt.use;Rt.walkTokens;Rt.parseInline;On.parse;En.lex;var zP=300,HP="300px",qP=500;function jP(e={}){let{immediate:t=!1,debounceDelay:r=zP,rootMargin:n=HP,idleTimeout:i=qP}=e,[a,s]=P.useState(!1),o=P.useRef(null),l=P.useRef(null),c=P.useRef(null),u=P.useMemo(()=>f=>{let p=Date.now();return window.setTimeout(()=>{f({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-p))})},1)},[]),h=P.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(f,p)=>window.requestIdleCallback(f,p):u,[u]),d=P.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?f=>window.cancelIdleCallback(f):f=>{clearTimeout(f)},[]);return P.useEffect(()=>{if(t){s(!0);return}let f=o.current;if(!f)return;l.current&&(clearTimeout(l.current),l.current=null),c.current&&(d(c.current),c.current=null);let p=()=>{l.current&&(clearTimeout(l.current),l.current=null),c.current&&(d(c.current),c.current=null)},m=T=>{c.current=h(A=>{A.timeRemaining()>0||A.didTimeout?(s(!0),T.disconnect()):c.current=h(()=>{s(!0),T.disconnect()},{timeout:i/2})},{timeout:i})},b=T=>{p(),l.current=window.setTimeout(()=>{var A,E;let S=T.takeRecords();(S.length===0||(E=(A=S.at(-1))==null?void 0:A.isIntersecting)!=null&&E)&&m(T)},r)},y=(T,A)=>{T.isIntersecting?b(A):p()},v=new IntersectionObserver(T=>{for(let A of T)y(A,v)},{rootMargin:n,threshold:0});return v.observe(f),()=>{l.current&&clearTimeout(l.current),c.current&&d(c.current),v.disconnect()}},[t,r,n,i,d,h]),{shouldRender:a,containerRef:o}}var Ym=e=>C.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:C.jsx("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),Vm=e=>C.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:C.jsx("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),nh=e=>C.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:C.jsx("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),UP=e=>C.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[C.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),C.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),C.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),C.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),C.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),C.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),C.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),C.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),C.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),C.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),WP=e=>C.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:C.jsx("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),GP=e=>C.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:C.jsx("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),H6=e=>C.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:C.jsx("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),gb=e=>C.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:C.jsx("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),YP=e=>C.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:C.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),VP=e=>C.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:C.jsx("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),ct=(...e)=>WB(nB(e)),Bs=(e,t,r)=>{let n=typeof t=="string"?new Blob([t],{type:r}):t,i=URL.createObjectURL(n),a=document.createElement("a");a.href=i,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(i)},q6=P.createContext({code:""}),j6=()=>P.useContext(q6),bb=({onCopy:e,onError:t,timeout:r=2e3,children:n,className:i,code:a,...s})=>{let[o,l]=P.useState(!1),c=P.useRef(0),{code:u}=j6(),{isAnimating:h}=P.useContext(bn),d=a??u,f=async()=>{var m;if(typeof window>"u"||!((m=navigator?.clipboard)!=null&&m.writeText)){t?.(new Error("Clipboard API not available"));return}try{o||(await navigator.clipboard.writeText(d),l(!0),e?.(),c.current=window.setTimeout(()=>l(!1),r))}catch(b){t?.(b)}};P.useEffect(()=>()=>{window.clearTimeout(c.current)},[]);let p=o?Ym:Vm;return C.jsx("button",{className:ct("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-copy-button",disabled:h,onClick:f,title:"Copy Code",type:"button",...s,children:n??C.jsx(p,{size:14})})},yb={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},XP=({onDownload:e,onError:t,language:r,children:n,className:i,code:a,...s})=>{let{code:o}=j6(),{isAnimating:l}=P.useContext(bn),c=a??o,u=`file.${r&&r in yb?yb[r]:"txt"}`,h="text/plain",d=()=>{try{Bs(u,c,h),e?.()}catch(f){t?.(f)}};return C.jsx("button",{className:ct("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-download-button",disabled:l,onClick:d,title:"Download file",type:"button",...s,children:n??C.jsx(nh,{size:14})})},xb=()=>C.jsxs("div",{className:"w-full divide-y divide-border overflow-hidden rounded-xl border border-border",children:[C.jsx("div",{className:"h-[46px] w-full bg-muted/80"}),C.jsx("div",{className:"flex w-full items-center justify-center p-4",children:C.jsx(UP,{className:"size-4 animate-spin"})})]}),KP=/\.[^/.]+$/,QP=({node:e,className:t,src:r,alt:n,...i})=>{let a=async()=>{if(r)try{let s=await(await fetch(r)).blob(),o=new URL(r,window.location.origin).pathname.split("/").pop()||"",l=o.split(".").pop(),c=o.includes(".")&&l!==void 0&&l.length<=4,u="";if(c)u=o;else{let h=s.type,d="png";h.includes("jpeg")||h.includes("jpg")?d="jpg":h.includes("png")?d="png":h.includes("svg")?d="svg":h.includes("gif")?d="gif":h.includes("webp")&&(d="webp"),u=`${(n||o||"image").replace(KP,"")}.${d}`}Bs(u,s,s.type)}catch{window.open(r,"_blank")}};return r?C.jsxs("div",{className:"group relative my-4 inline-block","data-streamdown":"image-wrapper",children:[C.jsx("img",{alt:n,className:ct("max-w-full rounded-lg",t),"data-streamdown":"image",src:r,...i}),C.jsx("div",{className:"pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"}),C.jsx("button",{className:ct("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:a,title:"Download image",type:"button",children:C.jsx(nh,{size:14})})]}):null},El=0,ZP=()=>{El+=1,El===1&&(document.body.style.overflow="hidden")},JP=()=>{El=Math.max(0,El-1),El===0&&(document.body.style.overflow="")},eF=({url:e,isOpen:t,onClose:r,onConfirm:n})=>{let[i,a]=P.useState(!1),s=P.useCallback(async()=>{try{await navigator.clipboard.writeText(e),a(!0),setTimeout(()=>a(!1),2e3)}catch{}},[e]),o=P.useCallback(()=>{n(),r()},[n,r]);return P.useEffect(()=>{if(t){ZP();let l=c=>{c.key==="Escape"&&r()};return document.addEventListener("keydown",l),()=>{document.removeEventListener("keydown",l),JP()}}},[t,r]),t?C.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm","data-streamdown":"link-safety-modal",onClick:r,onKeyDown:l=>{l.key==="Escape"&&r()},role:"button",tabIndex:0,children:C.jsxs("div",{className:"relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg",onClick:l=>l.stopPropagation(),onKeyDown:l=>l.stopPropagation(),role:"presentation",children:[C.jsx("button",{className:"absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:r,title:"Close",type:"button",children:C.jsx(H6,{size:16})}),C.jsxs("div",{className:"flex flex-col gap-2",children:[C.jsxs("div",{className:"flex items-center gap-2 font-semibold text-lg",children:[C.jsx(gb,{size:20}),C.jsx("span",{children:"Open external link?"})]}),C.jsx("p",{className:"text-muted-foreground text-sm",children:"You're about to visit an external website."})]}),C.jsx("div",{className:ct("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),C.jsxs("div",{className:"flex gap-2",children:[C.jsx("button",{className:"flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted",onClick:s,type:"button",children:i?C.jsxs(C.Fragment,{children:[C.jsx(Ym,{size:14}),C.jsx("span",{children:"Copied"})]}):C.jsxs(C.Fragment,{children:[C.jsx(Vm,{size:14}),C.jsx("span",{children:"Copy link"})]})}),C.jsxs("button",{className:"flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90",onClick:o,type:"button",children:[C.jsx(gb,{size:14}),C.jsx("span",{children:"Open link"})]})]})]})}):null},Pf=P.createContext(null),U6=()=>P.useContext(Pf),tF=()=>{var e;let t=U6();return(e=t?.code)!=null?e:null},Xm=()=>{var e;let t=U6();return(e=t?.mermaid)!=null?e:null},rF=(e,t)=>{var r;let n=(r=void 0)!=null?r:5;return new Promise((i,a)=>{let s="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),o=new Image;o.crossOrigin="anonymous",o.onload=()=>{let l=document.createElement("canvas"),c=o.width*n,u=o.height*n;l.width=c,l.height=u;let h=l.getContext("2d");if(!h){a(new Error("Failed to create 2D canvas context for PNG export"));return}h.drawImage(o,0,0,c,u),l.toBlob(d=>{if(!d){a(new Error("Failed to create PNG blob"));return}i(d)},"image/png")},o.onerror=()=>a(new Error("Failed to load SVG image")),o.src=s})},nF=({chart:e,children:t,className:r,onDownload:n,config:i,onError:a})=>{let[s,o]=P.useState(!1),l=P.useRef(null),{isAnimating:c}=P.useContext(bn),u=Xm(),h=async d=>{try{if(d==="mmd"){Bs("diagram.mmd",e,"text/plain"),o(!1),n?.(d);return}if(!u){a?.(new Error("Mermaid plugin not available"));return}let f=u.getMermaid(i),p=e.split("").reduce((y,v)=>(y<<5)-y+v.charCodeAt(0)|0,0),m=`mermaid-${Math.abs(p)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:b}=await f.render(m,e);if(!b){a?.(new Error("SVG not found. Please wait for the diagram to render."));return}if(d==="svg"){Bs("diagram.svg",b,"image/svg+xml"),o(!1),n?.(d);return}if(d==="png"){let y=await rF(b);Bs("diagram.png",y,"image/png"),n?.(d),o(!1);return}}catch(f){a?.(f)}};return P.useEffect(()=>{let d=f=>{let p=f.composedPath();l.current&&!p.includes(l.current)&&o(!1)};return document.addEventListener("mousedown",d),()=>{document.removeEventListener("mousedown",d)}},[]),C.jsxs("div",{className:"relative",ref:l,children:[C.jsx("button",{className:ct("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",r),disabled:c,onClick:()=>o(!s),title:"Download diagram",type:"button",children:t??C.jsx(nh,{size:14})}),s?C.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[C.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>h("svg"),title:"Download diagram as SVG",type:"button",children:"SVG"}),C.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>h("png"),title:"Download diagram as PNG",type:"button",children:"PNG"}),C.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>h("mmd"),title:"Download diagram as MMD",type:"button",children:"MMD"})]}):null]})},_l=0,iF=()=>{_l+=1,_l===1&&(document.body.style.overflow="hidden")},aF=()=>{_l=Math.max(0,_l-1),_l===0&&(document.body.style.overflow="")},sF=({chart:e,config:t,onFullscreen:r,onExit:n,className:i,...a})=>{let[s,o]=P.useState(!1),{isAnimating:l,controls:c}=P.useContext(bn),u=(()=>{if(typeof c=="boolean")return c;let d=c.mermaid;return d===!1?!1:d===!0||d===void 0?!0:d.panZoom!==!1})(),h=()=>{o(!s)};return P.useEffect(()=>{if(s){iF();let d=f=>{f.key==="Escape"&&o(!1)};return document.addEventListener("keydown",d),()=>{document.removeEventListener("keydown",d),aF()}}},[s]),P.useEffect(()=>{s?r?.():n&&n()},[s,r,n]),C.jsxs(C.Fragment,{children:[C.jsx("button",{className:ct("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:l,onClick:h,title:"View fullscreen",type:"button",...a,children:C.jsx(WP,{size:14})}),s?C.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm",onClick:h,onKeyDown:d=>{d.key==="Escape"&&h()},role:"button",tabIndex:0,children:[C.jsx("button",{className:"absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:h,title:"Exit fullscreen",type:"button",children:C.jsx(H6,{size:20})}),C.jsx("div",{className:"flex size-full items-center justify-center p-4",onClick:d=>d.stopPropagation(),onKeyDown:d=>d.stopPropagation(),role:"presentation",children:C.jsx(x5,{chart:e,className:"size-full [&_svg]:h-auto [&_svg]:w-auto",config:t,fullscreen:!0,showControls:u})})]}):null]})},W6=e=>{var t,r;let n=[],i=[],a=e.querySelectorAll("thead th");for(let o of a)n.push(((t=o.textContent)==null?void 0:t.trim())||"");let s=e.querySelectorAll("tbody tr");for(let o of s){let l=[],c=o.querySelectorAll("td");for(let u of c)l.push(((r=u.textContent)==null?void 0:r.trim())||"");i.push(l)}return{headers:n,rows:i}},G6=e=>{let{headers:t,rows:r}=e,n=o=>{let l=!1,c=!1;for(let u of o){if(u==='"'){l=!0,c=!0;break}(u===","||u===`
|
|
106
|
+
`)&&(l=!0)}return l?c?`"${o.replace(/"/g,'""')}"`:`"${o}"`:o},i=t.length>0?r.length+1:r.length,a=new Array(i),s=0;t.length>0&&(a[s]=t.map(n).join(","),s+=1);for(let o of r)a[s]=o.map(n).join(","),s+=1;return a.join(`
|
|
107
|
+
`)},oF=e=>{let{headers:t,rows:r}=e,n=o=>{let l=!1;for(let u of o)if(u===" "||u===`
|
|
108
|
+
`||u==="\r"){l=!0;break}if(!l)return o;let c=[];for(let u of o)u===" "?c.push("\\t"):u===`
|
|
109
|
+
`?c.push("\\n"):u==="\r"?c.push("\\r"):c.push(u);return c.join("")},i=t.length>0?r.length+1:r.length,a=new Array(i),s=0;t.length>0&&(a[s]=t.map(n).join(" "),s+=1);for(let o of r)a[s]=o.map(n).join(" "),s+=1;return a.join(`
|
|
110
|
+
`)},vd=e=>{let t=!1;for(let n of e)if(n==="\\"||n==="|"){t=!0;break}if(!t)return e;let r=[];for(let n of e)n==="\\"?r.push("\\\\"):n==="|"?r.push("\\|"):r.push(n);return r.join("")},lF=e=>{let{headers:t,rows:r}=e;if(t.length===0)return"";let n=new Array(r.length+2),i=0,a=t.map(o=>vd(o));n[i]=`| ${a.join(" | ")} |`,i+=1;let s=new Array(t.length);for(let o=0;o<t.length;o+=1)s[o]="---";n[i]=`| ${s.join(" | ")} |`,i+=1;for(let o of r)if(o.length<t.length){let l=new Array(t.length);for(let c=0;c<t.length;c+=1)l[c]=c<o.length?vd(o[c]):"";n[i]=`| ${l.join(" | ")} |`,i+=1}else{let l=o.map(c=>vd(c));n[i]=`| ${l.join(" | ")} |`,i+=1}return n.join(`
|
|
111
|
+
`)},cF=({children:e,className:t,onCopy:r,onError:n,timeout:i=2e3})=>{let[a,s]=P.useState(!1),[o,l]=P.useState(!1),c=P.useRef(null),u=P.useRef(0),{isAnimating:h}=P.useContext(bn),d=async p=>{var m,b;if(typeof window>"u"||!((m=navigator?.clipboard)!=null&&m.write)){n?.(new Error("Clipboard API not available"));return}try{let y=(b=c.current)==null?void 0:b.closest('[data-streamdown="table-wrapper"]'),v=y?.querySelector("table");if(!v){n?.(new Error("Table not found"));return}let T=W6(v),A=p==="csv"?G6(T):oF(T),E=new ClipboardItem({"text/plain":new Blob([A],{type:"text/plain"}),"text/html":new Blob([v.outerHTML],{type:"text/html"})});await navigator.clipboard.write([E]),l(!0),s(!1),r?.(p),u.current=window.setTimeout(()=>l(!1),i)}catch(y){n?.(y)}};P.useEffect(()=>{let p=m=>{let b=m.composedPath();c.current&&!b.includes(c.current)&&s(!1)};return document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p),window.clearTimeout(u.current)}},[]);let f=o?Ym:Vm;return C.jsxs("div",{className:"relative",ref:c,children:[C.jsx("button",{className:ct("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:h,onClick:()=>s(!a),title:"Copy table",type:"button",children:e??C.jsx(f,{size:14})}),a?C.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[C.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("csv"),title:"Copy table as CSV",type:"button",children:"CSV"}),C.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("tsv"),title:"Copy table as TSV",type:"button",children:"TSV"})]}):null]})},uF=({children:e,className:t,onDownload:r,onError:n})=>{let[i,a]=P.useState(!1),s=P.useRef(null),{isAnimating:o}=P.useContext(bn),l=c=>{var u;try{let h=(u=s.current)==null?void 0:u.closest('[data-streamdown="table-wrapper"]'),d=h?.querySelector("table");if(!d){n?.(new Error("Table not found"));return}let f=W6(d),p=c==="csv"?G6(f):lF(f);Bs(`table.${c==="csv"?"csv":"md"}`,p,c==="csv"?"text/csv":"text/markdown"),a(!1),r?.(c)}catch(h){n?.(h)}};return P.useEffect(()=>{let c=u=>{let h=u.composedPath();s.current&&!h.includes(s.current)&&a(!1)};return document.addEventListener("mousedown",c),()=>{document.removeEventListener("mousedown",c)}},[]),C.jsxs("div",{className:"relative",ref:s,children:[C.jsx("button",{className:ct("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:o,onClick:()=>a(!i),title:"Download table",type:"button",children:e??C.jsx(nh,{size:14})}),i?C.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[C.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>l("csv"),title:"Download table as CSV",type:"button",children:"CSV"}),C.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>l("markdown"),title:"Download table as Markdown",type:"button",children:"Markdown"})]}):null]})},hF=({children:e,className:t,showControls:r,...n})=>C.jsxs("div",{className:"my-4 flex flex-col space-y-2","data-streamdown":"table-wrapper",children:[r?C.jsxs("div",{className:"flex items-center justify-end gap-1",children:[C.jsx(cF,{}),C.jsx(uF,{})]}):null,C.jsx("div",{className:"overflow-x-auto",children:C.jsx("table",{className:ct("w-full border-collapse border border-border",t),"data-streamdown":"table",...n,children:e})})]}),dF=P.lazy(()=>Promise.resolve().then(()=>require("./code-block-37QAKDTI-38K5Mxo2.js")).then(e=>({default:e.CodeBlock}))),fF=P.lazy(()=>Promise.resolve().then(()=>require("./mermaid-4DMBBIKO-Cd15t2pT.js")).then(e=>({default:e.Mermaid}))),pF=/language-([^\s]+)/;function ih(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let r=e.position.start,n=t.position.start,i=e.position.end,a=t.position.end;return r?.line===n?.line&&r?.column===n?.column&&i?.line===a?.line&&i?.column===a?.column}function Xt(e,t){return e.className===t.className&&ih(e.node,t.node)}var Ff=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,Fc=(e,t)=>{if(typeof e=="boolean")return e;let r=e.mermaid;return r===!1?!1:r===!0||r===void 0?!0:r[t]!==!1},Km=P.memo(({children:e,className:t,node:r,...n})=>C.jsx("ol",{className:ct("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...n,children:e}),(e,t)=>Xt(e,t));Km.displayName="MarkdownOl";var Y6=P.memo(({children:e,className:t,node:r,...n})=>C.jsx("li",{className:ct("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...n,children:e}),(e,t)=>e.className===t.className&&ih(e.node,t.node));Y6.displayName="MarkdownLi";var V6=P.memo(({children:e,className:t,node:r,...n})=>C.jsx("ul",{className:ct("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...n,children:e}),(e,t)=>Xt(e,t));V6.displayName="MarkdownUl";var X6=P.memo(({className:e,node:t,...r})=>C.jsx("hr",{className:ct("my-6 border-border",e),"data-streamdown":"horizontal-rule",...r}),(e,t)=>Xt(e,t));X6.displayName="MarkdownHr";var K6=P.memo(({children:e,className:t,node:r,...n})=>C.jsx("span",{className:ct("font-semibold",t),"data-streamdown":"strong",...n,children:e}),(e,t)=>Xt(e,t));K6.displayName="MarkdownStrong";var mF=({children:e,className:t,href:r,node:n,...i})=>{let{linkSafety:a}=P.useContext(bn),[s,o]=P.useState(!1),l=r==="streamdown:incomplete-link",c=P.useCallback(async f=>{if(!(!(a!=null&&a.enabled&&r)||l)){if(f.preventDefault(),a.onLinkCheck&&await a.onLinkCheck(r)){window.open(r,"_blank","noreferrer");return}o(!0)}},[a,r,l]),u=P.useCallback(()=>{r&&window.open(r,"_blank","noreferrer")},[r]),h=P.useCallback(()=>{o(!1)},[]),d={url:r??"",isOpen:s,onClose:h,onConfirm:u};return a!=null&&a.enabled&&r?C.jsxs(C.Fragment,{children:[C.jsx("button",{className:ct("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":l,"data-streamdown":"link",onClick:c,type:"button",children:e}),a.renderModal?a.renderModal(d):C.jsx(eF,{...d})]}):C.jsx("a",{className:ct("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":l,"data-streamdown":"link",href:r,rel:"noreferrer",target:"_blank",...i,children:e})},Q6=P.memo(mF,(e,t)=>Xt(e,t)&&e.href===t.href);Q6.displayName="MarkdownA";var Z6=P.memo(({children:e,className:t,node:r,...n})=>C.jsx("h1",{className:ct("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...n,children:e}),(e,t)=>Xt(e,t));Z6.displayName="MarkdownH1";var J6=P.memo(({children:e,className:t,node:r,...n})=>C.jsx("h2",{className:ct("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...n,children:e}),(e,t)=>Xt(e,t));J6.displayName="MarkdownH2";var e5=P.memo(({children:e,className:t,node:r,...n})=>C.jsx("h3",{className:ct("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...n,children:e}),(e,t)=>Xt(e,t));e5.displayName="MarkdownH3";var t5=P.memo(({children:e,className:t,node:r,...n})=>C.jsx("h4",{className:ct("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...n,children:e}),(e,t)=>Xt(e,t));t5.displayName="MarkdownH4";var r5=P.memo(({children:e,className:t,node:r,...n})=>C.jsx("h5",{className:ct("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...n,children:e}),(e,t)=>Xt(e,t));r5.displayName="MarkdownH5";var n5=P.memo(({children:e,className:t,node:r,...n})=>C.jsx("h6",{className:ct("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...n,children:e}),(e,t)=>Xt(e,t));n5.displayName="MarkdownH6";var i5=P.memo(({children:e,className:t,node:r,...n})=>{let{controls:i}=P.useContext(bn),a=Ff(i,"table");return C.jsx(hF,{className:t,showControls:a,...n,children:e})},(e,t)=>Xt(e,t));i5.displayName="MarkdownTable";var a5=P.memo(({children:e,className:t,node:r,...n})=>C.jsx("thead",{className:ct("bg-muted/80",t),"data-streamdown":"table-header",...n,children:e}),(e,t)=>Xt(e,t));a5.displayName="MarkdownThead";var s5=P.memo(({children:e,className:t,node:r,...n})=>C.jsx("tbody",{className:ct("divide-y divide-border bg-muted/40",t),"data-streamdown":"table-body",...n,children:e}),(e,t)=>Xt(e,t));s5.displayName="MarkdownTbody";var o5=P.memo(({children:e,className:t,node:r,...n})=>C.jsx("tr",{className:ct("border-border border-b",t),"data-streamdown":"table-row",...n,children:e}),(e,t)=>Xt(e,t));o5.displayName="MarkdownTr";var l5=P.memo(({children:e,className:t,node:r,...n})=>C.jsx("th",{className:ct("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...n,children:e}),(e,t)=>Xt(e,t));l5.displayName="MarkdownTh";var c5=P.memo(({children:e,className:t,node:r,...n})=>C.jsx("td",{className:ct("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...n,children:e}),(e,t)=>Xt(e,t));c5.displayName="MarkdownTd";var u5=P.memo(({children:e,className:t,node:r,...n})=>C.jsx("blockquote",{className:ct("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...n,children:e}),(e,t)=>Xt(e,t));u5.displayName="MarkdownBlockquote";var h5=P.memo(({children:e,className:t,node:r,...n})=>C.jsx("sup",{className:ct("text-sm",t),"data-streamdown":"superscript",...n,children:e}),(e,t)=>Xt(e,t));h5.displayName="MarkdownSup";var d5=P.memo(({children:e,className:t,node:r,...n})=>C.jsx("sub",{className:ct("text-sm",t),"data-streamdown":"subscript",...n,children:e}),(e,t)=>Xt(e,t));d5.displayName="MarkdownSub";var f5=P.memo(({children:e,className:t,node:r,...n})=>{if("data-footnotes"in n){let i=s=>{var o,l;if(!P.isValidElement(s))return!1;let c=Array.isArray(s.props.children)?s.props.children:[s.props.children],u=!1,h=!1;for(let d of c)if(d){if(typeof d=="string")d.trim()!==""&&(u=!0);else if(P.isValidElement(d))if(((o=d.props)==null?void 0:o["data-footnote-backref"])!==void 0)h=!0;else{let f=Array.isArray(d.props.children)?d.props.children:[d.props.children];for(let p of f){if(typeof p=="string"&&p.trim()!==""){u=!0;break}if(P.isValidElement(p)&&((l=p.props)==null?void 0:l["data-footnote-backref"])===void 0){u=!0;break}}}}return h&&!u},a=Array.isArray(e)?e.map(s=>{if(!P.isValidElement(s))return s;if(s.type===Km){let o=(Array.isArray(s.props.children)?s.props.children:[s.props.children]).filter(l=>!i(l));return o.length===0?null:{...s,props:{...s.props,children:o}}}return s}):e;return(Array.isArray(a)?a.some(s=>s!==null):a!==null)?C.jsx("section",{className:t,...n,children:a}):null}return C.jsx("section",{className:t,...n,children:e})},(e,t)=>Xt(e,t));f5.displayName="MarkdownSection";var gF=({node:e,className:t,children:r,...n})=>{var i,a,s;let o=((i=e?.position)==null?void 0:i.start.line)===((a=e?.position)==null?void 0:a.end.line),{mermaid:l,controls:c}=P.useContext(bn),u=Xm();if(o)return C.jsx("code",{className:ct("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...n,children:r});let h=t?.match(pF),d=(s=h?.at(1))!=null?s:"",f="";if(P.isValidElement(r)&&r.props&&typeof r.props=="object"&&"children"in r.props&&typeof r.props.children=="string"?f=r.props.children:typeof r=="string"&&(f=r),d==="mermaid"&&u){let m=Ff(c,"mermaid"),b=Fc(c,"download"),y=Fc(c,"copy"),v=Fc(c,"fullscreen"),T=Fc(c,"panZoom"),A=m&&(b||y||v);return C.jsx(P.Suspense,{fallback:C.jsx(xb,{}),children:C.jsxs("div",{className:ct("group relative my-4 h-auto rounded-xl border p-4",t),"data-streamdown":"mermaid-block",children:[A?C.jsxs("div",{className:"flex items-center justify-end gap-2",children:[b?C.jsx(nF,{chart:f,config:l?.config}):null,y?C.jsx(bb,{code:f}):null,v?C.jsx(sF,{chart:f,config:l?.config}):null]}):null,C.jsx(fF,{chart:f,config:l?.config,showControls:T})]})})}let p=Ff(c,"code");return C.jsx(P.Suspense,{fallback:C.jsx(xb,{}),children:C.jsx(dF,{className:ct("overflow-x-auto border-border border-t",t),code:f,language:d,children:p?C.jsxs(C.Fragment,{children:[C.jsx(XP,{code:f,language:d}),C.jsx(bb,{})]}):null})})},p5=P.memo(gF,(e,t)=>e.className===t.className&&ih(e.node,t.node));p5.displayName="MarkdownCode";var m5=P.memo(QP,(e,t)=>e.className===t.className&&ih(e.node,t.node));m5.displayName="MarkdownImg";var g5=P.memo(({children:e,className:t,node:r,...n})=>{var i,a;let s=(Array.isArray(e)?e:[e]).filter(o=>o!=null&&o!=="");if(s.length===1&&P.isValidElement(s[0])){let o=s[0].props.node,l=o?.tagName;if(l==="img")return C.jsx(C.Fragment,{children:e});if(l==="code"&&((i=o?.position)==null?void 0:i.start.line)!==((a=o?.position)==null?void 0:a.end.line))return C.jsx(C.Fragment,{children:e})}return C.jsx("p",{className:t,...n,children:e})},(e,t)=>Xt(e,t));g5.displayName="MarkdownParagraph";var bF={ol:Km,li:Y6,ul:V6,hr:X6,strong:K6,a:Q6,h1:Z6,h2:J6,h3:e5,h4:t5,h5:r5,h6:n5,table:i5,thead:a5,tbody:s5,tr:o5,th:l5,td:c5,blockquote:u5,code:p5,img:m5,pre:({children:e})=>e,sup:h5,sub:d5,p:g5,section:f5},vb=[],kb={allowDangerousHtml:!0},$c=new WeakMap,yF=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(t){let r=this.keyCache.get(t);if(r)return r;let n=t.rehypePlugins,i=t.remarkPlugins,a=t.remarkRehypeOptions;if(!(n||i||a)){let h="default";return this.keyCache.set(t,h),h}let s=h=>{if(!h||h.length===0)return"";let d="";for(let f=0;f<h.length;f+=1){let p=h[f];if(f>0&&(d+=","),Array.isArray(p)){let[m,b]=p;if(typeof m=="function"){let y=$c.get(m);y||(y=m.name,$c.set(m,y)),d+=y}else d+=String(m);d+=":",d+=JSON.stringify(b)}else if(typeof p=="function"){let m=$c.get(p);m||(m=p.name,$c.set(p,m)),d+=m}else d+=String(p)}return d},o=s(n),l=s(i),c=a?JSON.stringify(a):"",u=`${l}::${o}::${c}`;return this.keyCache.set(t,u),u}get(t){let r=this.generateCacheKey(t),n=this.cache.get(r);return n&&(this.cache.delete(r),this.cache.set(r,n)),n}set(t,r){let n=this.generateCacheKey(t);if(this.cache.size>=this.maxSize){let i=this.cache.keys().next().value;i&&this.cache.delete(i)}this.cache.set(n,r)}clear(){this.cache.clear()}},wb=new yF,b5=e=>{let t=xF(e),r=e.children||"";return kF(t.runSync(t.parse(r),r),e)},xF=e=>{let t=wb.get(e);if(t)return t;let r=vF(e);return wb.set(e,r),r},vF=e=>{let t=e.rehypePlugins||vb,r=e.remarkPlugins||vb,n=e.remarkRehypeOptions?{...kb,...e.remarkRehypeOptions}:kb;return JO().use(ZD).use(r).use(BO,n).use(t)},kF=(e,t)=>sD(e,{Fragment:C.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:C.jsx,jsxs:C.jsxs,passKeys:!0,passNode:!0}),wF=/\[\^[^\]\s]{1,200}\](?!:)/,TF=/\[\^[^\]\s]{1,200}\]:/,CF=/<\/(\w+)>/,SF=/<(\w+)[\s>]/,kd=e=>{let t=0;for(;t<e.length&&(e[t]===" "||e[t]===" "||e[t]===`
|
|
112
|
+
`||e[t]==="\r");)t+=1;return t+1<e.length&&e[t]==="$"&&e[t+1]==="$"},EF=e=>{let t=e.length-1;for(;t>=0&&(e[t]===" "||e[t]===" "||e[t]===`
|
|
113
|
+
`||e[t]==="\r");)t-=1;return t>=1&&e[t]==="$"&&e[t-1]==="$"},wd=e=>{let t=0;for(let r=0;r<e.length-1;r+=1)e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},_F=e=>{let t=wF.test(e),r=TF.test(e);if(t||r)return[e];let n=En.lex(e,{gfm:!0}),i=[],a=[];for(let s of n){let o=s.raw,l=i.length;if(a.length>0){if(i[l-1]+=o,s.type==="html"){let c=o.match(CF);if(c){let u=c[1];a.at(-1)===u&&a.pop()}}continue}if(s.type==="html"&&s.block){let c=o.match(SF);if(c){let u=c[1];o.includes(`</${u}>`)||a.push(u)}}if(o.trim()==="$$"&&l>0){let c=i[l-1],u=kd(c),h=wd(c);if(u&&h%2===1){i[l-1]=c+o;continue}}if(l>0&&EF(o)){let c=i[l-1],u=kd(c),h=wd(c),d=wd(o);if(u&&h%2===1&&!kd(o)&&d===1){i[l-1]=c+o;continue}}i.push(o)}return i},AF={raw:cN,sanitize:[xN,{}],harden:[FE,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},NF={gfm:[ZI,{}]},LF=Object.values(AF),MF=Object.values(NF),IF={block:" ▋",circle:" ●"},RF={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},bn=P.createContext(RF),y5=P.memo(({content:e,shouldParseIncompleteMarkdown:t,index:r,...n})=>C.jsx(b5,{...n,children:e}),(e,t)=>{if(e.content!==t.content||e.index!==t.index)return!1;if(e.components!==t.components){let r=Object.keys(e.components||{}),n=Object.keys(t.components||{});if(r.length!==n.length||r.some(i=>{var a,s;return((a=e.components)==null?void 0:a[i])!==((s=t.components)==null?void 0:s[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});y5.displayName="Block";var BF=["github-light","github-dark"],Ka=P.memo(({children:e,mode:t="streaming",parseIncompleteMarkdown:r=!0,components:n,rehypePlugins:i=LF,remarkPlugins:a=MF,className:s,shikiTheme:o=BF,mermaid:l,controls:c=!0,isAnimating:u=!1,BlockComponent:h=y5,parseMarkdownIntoBlocksFn:d=_F,caret:f,plugins:p,remend:m,linkSafety:b={enabled:!0},...y})=>{let v=P.useId(),[T,A]=P.useTransition(),E=P.useMemo(()=>typeof e!="string"?"":t==="streaming"&&r?rB(e,m):e,[e,t,r,m]),S=P.useMemo(()=>d(E),[E,d]),[I,D]=P.useState(S);P.useEffect(()=>{t==="streaming"?A(()=>{D(S)}):D(S)},[S,t]);let H=t==="streaming"?I:S,R=P.useMemo(()=>H.map((W,Z)=>`${v}-${Z}`),[H.length,v]),F=P.useMemo(()=>{var W,Z;return{shikiTheme:(Z=(W=p?.code)==null?void 0:W.getThemes())!=null?Z:o,controls:c,isAnimating:u,mode:t,mermaid:l,linkSafety:b}},[o,c,u,t,l,b,p?.code]),G=P.useMemo(()=>({...bF,...n}),[n]),ee=P.useMemo(()=>{let W=[];return p!=null&&p.cjk&&(W=[...W,...p.cjk.remarkPluginsBefore]),W=[...W,...a],p!=null&&p.cjk&&(W=[...W,...p.cjk.remarkPluginsAfter]),p!=null&&p.math&&(W=[...W,p.math.remarkPlugin]),W},[a,p?.math,p?.cjk]),$=P.useMemo(()=>p!=null&&p.math?[...i,p.math.rehypePlugin]:i,[i,p?.math]),q=P.useMemo(()=>f&&u?{"--streamdown-caret":`"${IF[f]}"`}:void 0,[f,u]);return t==="static"?C.jsx(Pf.Provider,{value:p??null,children:C.jsx(bn.Provider,{value:F,children:C.jsx("div",{className:ct("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",s),children:C.jsx(b5,{components:G,rehypePlugins:$,remarkPlugins:ee,...y,children:e})})})}):C.jsx(Pf.Provider,{value:p??null,children:C.jsx(bn.Provider,{value:F,children:C.jsxs("div",{className:ct("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",f?"*:last:after:inline *:last:after:align-baseline *:last:after:content-(--streamdown-caret)":null,s),style:q,children:[H.length===0&&f&&u&&C.jsx("span",{}),H.map((W,Z)=>C.jsx(h,{components:G,content:W,index:Z,rehypePlugins:$,remarkPlugins:ee,shouldParseIncompleteMarkdown:r,...y},R[Z]))]})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety);Ka.displayName="Streamdown";var DF=({children:e,className:t,minZoom:r=.5,maxZoom:n=3,zoomStep:i=.1,showControls:a=!0,initialZoom:s=1,fullscreen:o=!1})=>{let l=P.useRef(null),c=P.useRef(null),[u,h]=P.useState(s),[d,f]=P.useState({x:0,y:0}),[p,m]=P.useState(!1),[b,y]=P.useState({x:0,y:0}),[v,T]=P.useState({x:0,y:0}),A=P.useCallback(G=>{h(ee=>Math.max(r,Math.min(n,ee+G)))},[r,n]),E=P.useCallback(()=>{A(i)},[A,i]),S=P.useCallback(()=>{A(-i)},[A,i]),I=P.useCallback(()=>{h(s),f({x:0,y:0})},[s]),D=P.useCallback(G=>{G.preventDefault();let ee=G.deltaY>0?-i:i;A(ee)},[A,i]),H=P.useCallback(G=>{if(G.button!==0||G.isPrimary===!1)return;m(!0),y({x:G.clientX,y:G.clientY}),T(d);let ee=G.currentTarget;ee instanceof HTMLElement&&ee.setPointerCapture(G.pointerId)},[d]),R=P.useCallback(G=>{if(!p)return;G.preventDefault();let ee=G.clientX-b.x,$=G.clientY-b.y;f({x:v.x+ee,y:v.y+$})},[p,b,v]),F=P.useCallback(G=>{m(!1);let ee=G.currentTarget;ee instanceof HTMLElement&&ee.releasePointerCapture(G.pointerId)},[]);return P.useEffect(()=>{let G=l.current;if(G)return G.addEventListener("wheel",D,{passive:!1}),()=>{G.removeEventListener("wheel",D)}},[D]),P.useEffect(()=>{let G=c.current;if(G&&p)return document.body.style.userSelect="none",G.addEventListener("pointermove",R,{passive:!1}),G.addEventListener("pointerup",F),G.addEventListener("pointercancel",F),()=>{document.body.style.userSelect="",G.removeEventListener("pointermove",R),G.removeEventListener("pointerup",F),G.removeEventListener("pointercancel",F)}},[p,R,F]),C.jsxs("div",{className:ct("relative flex flex-col",o?"h-full w-full":"min-h-28 w-full",t),ref:l,style:{cursor:p?"grabbing":"grab"},children:[a?C.jsxs("div",{className:ct("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/90 p-1 shadow-sm backdrop-blur-sm",o?"bottom-4 left-4":"bottom-2 left-2"),children:[C.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:u>=n,onClick:E,title:"Zoom in",type:"button",children:C.jsx(YP,{size:16})}),C.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:u<=r,onClick:S,title:"Zoom out",type:"button",children:C.jsx(VP,{size:16})}),C.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",onClick:I,title:"Reset zoom and pan",type:"button",children:C.jsx(GP,{size:16})})]}):null,C.jsx("div",{className:ct("flex-1 origin-center transition-transform duration-150 ease-out",o?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:H,ref:c,role:"application",style:{transform:`translate(${d.x}px, ${d.y}px) scale(${u})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},x5=({chart:e,className:t,config:r,fullscreen:n=!1,showControls:i=!0})=>{let[a,s]=P.useState(null),[o,l]=P.useState(!1),[c,u]=P.useState(""),[h,d]=P.useState(""),[f,p]=P.useState(0),{mermaid:m}=P.useContext(bn),b=Xm(),y=m?.errorComponent,{shouldRender:v,containerRef:T}=jP({immediate:n});if(P.useEffect(()=>{if(v){if(!b){s("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{s(null),l(!0);let E=b.getMermaid(r),S=e.split("").reduce((H,R)=>(H<<5)-H+R.charCodeAt(0)|0,0),I=`mermaid-${Math.abs(S)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:D}=await E.render(I,e);u(D),d(D)}catch(E){if(!(h||c)){let S=E instanceof Error?E.message:"Failed to render Mermaid chart";s(S)}}finally{l(!1)}})()}},[e,r,f,v,b]),!(v||c||h))return C.jsx("div",{className:ct("my-4 min-h-[200px]",t),ref:T});if(o&&!c&&!h)return C.jsx("div",{className:ct("my-4 flex justify-center p-4",t),ref:T,children:C.jsxs("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[C.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-current border-b-2"}),C.jsx("span",{className:"text-sm",children:"Loading diagram..."})]})});if(a&&!c&&!h){let E=()=>p(S=>S+1);return y?C.jsx("div",{ref:T,children:C.jsx(y,{chart:e,error:a,retry:E})}):C.jsxs("div",{className:ct("rounded-lg border border-red-200 bg-red-50 p-4",t),ref:T,children:[C.jsxs("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",a]}),C.jsxs("details",{className:"mt-2",children:[C.jsx("summary",{className:"cursor-pointer text-red-600 text-xs",children:"Show Code"}),C.jsx("pre",{className:"mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs",children:e})]})]})}let A=c||h;return C.jsx("div",{className:ct("size-full",t),"data-streamdown":"mermaid",ref:T,children:C.jsx(DF,{className:ct(n?"size-full overflow-hidden":"my-4 overflow-hidden",t),fullscreen:n,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:C.jsx("div",{"aria-label":"Mermaid chart",className:ct("flex justify-center",n?"size-full items-center":null),dangerouslySetInnerHTML:{__html:A},role:"img"})})})};let nr=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function OF(e){return Qm(e)}function Qm(e){return Array.isArray(e)?PF(e):e instanceof RegExp?e:typeof e=="object"?FF(e):e}function PF(e){let t=[];for(let r=0,n=e.length;r<n;r++)t[r]=Qm(e[r]);return t}function FF(e){let t={};for(let r in e)t[r]=Qm(e[r]);return t}function v5(e,...t){return t.forEach(r=>{for(let n in r)e[n]=r[n]}),e}function k5(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?k5(e.substring(0,e.length-1)):e.substr(~t+1)}var Td=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,zc=class{static hasCaptures(e){return e===null?!1:(Td.lastIndex=0,Td.test(e))}static replaceCaptures(e,t,r){return e.replace(Td,(n,i,a,s)=>{let o=r[parseInt(i||a,10)];if(o){let l=t.substring(o.start,o.end);for(;l[0]===".";)l=l.substring(1);switch(s){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return n})}};function w5(e,t){return e<t?-1:e>t?1:0}function T5(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let r=e.length,n=t.length;if(r===n){for(let i=0;i<r;i++){let a=w5(e[i],t[i]);if(a!==0)return a}return 0}return r-n}function Tb(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function C5(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var S5=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},Wu=class{constructor(t,r,n){this._colorMap=t,this._defaults=r,this._root=n}static createFromRawTheme(t,r){return this.createFromParsedTheme(HF(t),r)}static createFromParsedTheme(t,r){return jF(t,r)}_cachedMatchRoot=new S5(t=>this._root.match(t));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;const r=t.scopeName,i=this._cachedMatchRoot.get(r).find(a=>$F(t.parent,a.parentScopes));return i?new E5(i.fontStyle,i.foreground,i.background):null}},Cd=class mu{constructor(t,r){this.parent=t,this.scopeName=r}static push(t,r){for(const n of r)t=new mu(t,n);return t}static from(...t){let r=null;for(let n=0;n<t.length;n++)r=new mu(r,t[n]);return r}push(t){return new mu(this,t)}getSegments(){let t=this;const r=[];for(;t;)r.push(t.scopeName),t=t.parent;return r.reverse(),r}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const r=[];let n=this;for(;n&&n!==t;)r.push(n.scopeName),n=n.parent;return n===t?r.reverse():void 0}};function $F(e,t){if(t.length===0)return!0;for(let r=0;r<t.length;r++){let n=t[r],i=!1;if(n===">"){if(r===t.length-1)return!1;n=t[++r],i=!0}for(;e&&!zF(e.scopeName,n);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function zF(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var E5=class{constructor(e,t,r){this.fontStyle=e,this.foregroundId=t,this.backgroundId=r}};function HF(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,r=[],n=0;for(let i=0,a=t.length;i<a;i++){let s=t[i];if(!s.settings)continue;let o;if(typeof s.scope=="string"){let h=s.scope;h=h.replace(/^[,]+/,""),h=h.replace(/[,]+$/,""),o=h.split(",")}else Array.isArray(s.scope)?o=s.scope:o=[""];let l=-1;if(typeof s.settings.fontStyle=="string"){l=0;let h=s.settings.fontStyle.split(" ");for(let d=0,f=h.length;d<f;d++)switch(h[d]){case"italic":l=l|1;break;case"bold":l=l|2;break;case"underline":l=l|4;break;case"strikethrough":l=l|8;break}}let c=null;typeof s.settings.foreground=="string"&&Tb(s.settings.foreground)&&(c=s.settings.foreground);let u=null;typeof s.settings.background=="string"&&Tb(s.settings.background)&&(u=s.settings.background);for(let h=0,d=o.length;h<d;h++){let p=o[h].trim().split(" "),m=p[p.length-1],b=null;p.length>1&&(b=p.slice(0,p.length-1),b.reverse()),r[n++]=new qF(m,b,i,l,c,u)}}return r}var qF=class{constructor(e,t,r,n,i,a){this.scope=e,this.parentScopes=t,this.index=r,this.fontStyle=n,this.foreground=i,this.background=a}},Mr=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(Mr||{});function jF(e,t){e.sort((l,c)=>{let u=w5(l.scope,c.scope);return u!==0||(u=T5(l.parentScopes,c.parentScopes),u!==0)?u:l.index-c.index});let r=0,n="#000000",i="#ffffff";for(;e.length>=1&&e[0].scope==="";){let l=e.shift();l.fontStyle!==-1&&(r=l.fontStyle),l.foreground!==null&&(n=l.foreground),l.background!==null&&(i=l.background)}let a=new UF(t),s=new E5(r,a.getId(n),a.getId(i)),o=new GF(new $f(0,null,-1,0,0),[]);for(let l=0,c=e.length;l<c;l++){let u=e[l];o.insert(0,u.scope,u.parentScopes,u.fontStyle,a.getId(u.foreground),a.getId(u.background))}return new Wu(a,s,o)}var UF=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,r=e.length;t<r;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},WF=Object.freeze([]),$f=class _5{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,r,n,i,a){this.scopeDepth=t,this.parentScopes=r||WF,this.fontStyle=n,this.foreground=i,this.background=a}clone(){return new _5(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let r=[];for(let n=0,i=t.length;n<i;n++)r[n]=t[n].clone();return r}acceptOverwrite(t,r,n,i){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,r!==-1&&(this.fontStyle=r),n!==0&&(this.foreground=n),i!==0&&(this.background=i)}},GF=class zf{constructor(t,r=[],n={}){this._mainRule=t,this._children=n,this._rulesWithParentScopes=r}_rulesWithParentScopes;static _cmpBySpecificity(t,r){if(t.scopeDepth!==r.scopeDepth)return r.scopeDepth-t.scopeDepth;let n=0,i=0;for(;t.parentScopes[n]===">"&&n++,r.parentScopes[i]===">"&&i++,!(n>=t.parentScopes.length||i>=r.parentScopes.length);){const a=r.parentScopes[i].length-t.parentScopes[n].length;if(a!==0)return a;n++,i++}return r.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let n=t.indexOf("."),i,a;if(n===-1?(i=t,a=""):(i=t.substring(0,n),a=t.substring(n+1)),this._children.hasOwnProperty(i))return this._children[i].match(a)}const r=this._rulesWithParentScopes.concat(this._mainRule);return r.sort(zf._cmpBySpecificity),r}insert(t,r,n,i,a,s){if(r===""){this._doInsertHere(t,n,i,a,s);return}let o=r.indexOf("."),l,c;o===-1?(l=r,c=""):(l=r.substring(0,o),c=r.substring(o+1));let u;this._children.hasOwnProperty(l)?u=this._children[l]:(u=new zf(this._mainRule.clone(),$f.cloneArr(this._rulesWithParentScopes)),this._children[l]=u),u.insert(t+1,c,n,i,a,s)}_doInsertHere(t,r,n,i,a){if(r===null){this._mainRule.acceptOverwrite(t,n,i,a);return}for(let s=0,o=this._rulesWithParentScopes.length;s<o;s++){let l=this._rulesWithParentScopes[s];if(T5(l.parentScopes,r)===0){l.acceptOverwrite(t,n,i,a);return}}n===-1&&(n=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),a===0&&(a=this._mainRule.background),this._rulesWithParentScopes.push(new $f(t,r,n,i,a))}},Js=class Tn{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const r=Tn.getLanguageId(t),n=Tn.getTokenType(t),i=Tn.getFontStyle(t),a=Tn.getForeground(t),s=Tn.getBackground(t);console.log({languageId:r,tokenType:n,fontStyle:i,foreground:a,background:s})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,r,n,i,a,s,o){let l=Tn.getLanguageId(t),c=Tn.getTokenType(t),u=Tn.containsBalancedBrackets(t)?1:0,h=Tn.getFontStyle(t),d=Tn.getForeground(t),f=Tn.getBackground(t);return r!==0&&(l=r),n!==8&&(c=n),i!==null&&(u=i?1:0),a!==-1&&(h=a),s!==0&&(d=s),o!==0&&(f=o),(l<<0|c<<8|u<<10|h<<11|d<<15|f<<24)>>>0}};function Gu(e,t){const r=[],n=YF(e);let i=n.next();for(;i!==null;){let l=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=n.next()}let c=s();if(r.push({matcher:c,priority:l}),i!==",")break;i=n.next()}return r;function a(){if(i==="-"){i=n.next();const l=a();return c=>!!l&&!l(c)}if(i==="("){i=n.next();const l=o();return i===")"&&(i=n.next()),l}if(Cb(i)){const l=[];do l.push(i),i=n.next();while(Cb(i));return c=>t(l,c)}return null}function s(){const l=[];let c=a();for(;c;)l.push(c),c=a();return u=>l.every(h=>h(u))}function o(){const l=[];let c=s();for(;c&&(l.push(c),i==="|"||i===",");){do i=n.next();while(i==="|"||i===",");c=s()}return u=>l.some(h=>h(u))}}function Cb(e){return!!e&&!!e.match(/[\w\.:]+/)}function YF(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,r=t.exec(e);return{next:()=>{if(!r)return null;const n=r[0];return r=t.exec(e),n}}}function A5(e){typeof e.dispose=="function"&&e.dispose()}var Hl=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},VF=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},XF=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},KF=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Hl(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new XF;for(const r of e)QF(r,this.initialScopeName,this.repo,t);for(const r of t.references)if(r instanceof Hl){if(this.seenFullScopeRequests.has(r.scopeName))continue;this.seenFullScopeRequests.add(r.scopeName),this.Q.push(r)}else{if(this.seenFullScopeRequests.has(r.scopeName)||this.seenPartialScopeRequests.has(r.toKey()))continue;this.seenPartialScopeRequests.add(r.toKey()),this.Q.push(r)}}};function QF(e,t,r,n){const i=r.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const a=r.lookup(t);e instanceof Hl?gu({baseGrammar:a,selfGrammar:i},n):Hf(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},n);const s=r.injections(e.scopeName);if(s)for(const o of s)n.add(new Hl(o))}function Hf(e,t,r){if(t.repository&&t.repository[e]){const n=t.repository[e];Yu([n],t,r)}}function gu(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Yu(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Yu(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Yu(e,t,r){for(const n of e){if(r.visitedRule.has(n))continue;r.visitedRule.add(n);const i=n.repository?v5({},t.repository,n.repository):t.repository;Array.isArray(n.patterns)&&Yu(n.patterns,{...t,repository:i},r);const a=n.include;if(!a)continue;const s=N5(a);switch(s.kind){case 0:gu({...t,selfGrammar:t.baseGrammar},r);break;case 1:gu(t,r);break;case 2:Hf(s.ruleName,{...t,repository:i},r);break;case 3:case 4:const o=s.scopeName===t.selfGrammar.scopeName?t.selfGrammar:s.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(o){const l={baseGrammar:t.baseGrammar,selfGrammar:o,repository:i};s.kind===4?Hf(s.ruleName,l,r):gu(l,r)}else s.kind===4?r.add(new VF(s.scopeName,s.ruleName)):r.add(new Hl(s.scopeName));break}}}var ZF=class{kind=0},JF=class{kind=1},e$=class{constructor(e){this.ruleName=e}kind=2},t$=class{constructor(e){this.scopeName=e}kind=3},r$=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function N5(e){if(e==="$base")return new ZF;if(e==="$self")return new JF;const t=e.indexOf("#");if(t===-1)return new t$(e);if(t===0)return new e$(e.substring(1));{const r=e.substring(0,t),n=e.substring(t+1);return new r$(r,n)}}var n$=/\\(\d+)/,Sb=/\\(\d+)/g,i$=-1,L5=-2;var bc=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,r,n){this.$location=e,this.id=t,this._name=r||null,this._nameIsCapturing=zc.hasCaptures(this._name),this._contentName=n||null,this._contentNameIsCapturing=zc.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${k5(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:zc.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:zc.replaceCaptures(this._contentName,e,t)}},a$=class extends bc{retokenizeCapturedWithRuleId;constructor(e,t,r,n,i){super(e,t,r,n),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,r,n){throw new Error("Not supported!")}},s$=class extends bc{_match;captures;_cachedCompiledPatterns;constructor(e,t,r,n,i){super(e,t,r,null),this._match=new ql(n,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,n){return this._getCachedCompiledPatterns(e).compileAG(e,r,n)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new jl,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Eb=class extends bc{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,r,n,i){super(e,t,r,n),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const r of this.patterns)e.getRule(r).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,n){return this._getCachedCompiledPatterns(e).compileAG(e,r,n)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new jl,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},qf=class extends bc{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,r,n,i,a,s,o,l,c){super(e,t,r,n),this._begin=new ql(i,this.id),this.beginCaptures=a,this._end=new ql(s||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=o,this.applyEndPatternLast=l||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,r,n){return this._getCachedCompiledPatterns(e,t).compileAG(e,r,n)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new jl;for(const r of this.patterns)e.getRule(r).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Vu=class extends bc{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,r,n,i,a,s,o,l){super(e,t,r,n),this._begin=new ql(i,this.id),this.beginCaptures=a,this.whileCaptures=o,this._while=new ql(s,L5),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,n){return this._getCachedCompiledPatterns(e).compileAG(e,r,n)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new jl;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,r,n){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,r,n)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new jl,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}},M5=class Ar{static createCaptureRule(t,r,n,i,a){return t.registerRule(s=>new a$(r,s,n,i,a))}static getCompiledRuleId(t,r,n){return t.id||r.registerRule(i=>{if(t.id=i,t.match)return new s$(t.$vscodeTextmateLocation,t.id,t.name,t.match,Ar._compileCaptures(t.captures,r,n));if(typeof t.begin>"u"){t.repository&&(n=v5({},n,t.repository));let a=t.patterns;return typeof a>"u"&&t.include&&(a=[{include:t.include}]),new Eb(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,Ar._compilePatterns(a,r,n))}return t.while?new Vu(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Ar._compileCaptures(t.beginCaptures||t.captures,r,n),t.while,Ar._compileCaptures(t.whileCaptures||t.captures,r,n),Ar._compilePatterns(t.patterns,r,n)):new qf(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Ar._compileCaptures(t.beginCaptures||t.captures,r,n),t.end,Ar._compileCaptures(t.endCaptures||t.captures,r,n),t.applyEndPatternLast,Ar._compilePatterns(t.patterns,r,n))}),t.id}static _compileCaptures(t,r,n){let i=[];if(t){let a=0;for(const s in t){if(s==="$vscodeTextmateLocation")continue;const o=parseInt(s,10);o>a&&(a=o)}for(let s=0;s<=a;s++)i[s]=null;for(const s in t){if(s==="$vscodeTextmateLocation")continue;const o=parseInt(s,10);let l=0;t[s].patterns&&(l=Ar.getCompiledRuleId(t[s],r,n)),i[o]=Ar.createCaptureRule(r,t[s].$vscodeTextmateLocation,t[s].name,t[s].contentName,l)}}return i}static _compilePatterns(t,r,n){let i=[];if(t)for(let a=0,s=t.length;a<s;a++){const o=t[a];let l=-1;if(o.include){const c=N5(o.include);switch(c.kind){case 0:case 1:l=Ar.getCompiledRuleId(n[o.include],r,n);break;case 2:let u=n[c.ruleName];u&&(l=Ar.getCompiledRuleId(u,r,n));break;case 3:case 4:const h=c.scopeName,d=c.kind===4?c.ruleName:null,f=r.getExternalGrammar(h,n);if(f)if(d){let p=f.repository[d];p&&(l=Ar.getCompiledRuleId(p,r,f.repository))}else l=Ar.getCompiledRuleId(f.repository.$self,r,f.repository);break}}else l=Ar.getCompiledRuleId(o,r,n);if(l!==-1){const c=r.getRule(l);let u=!1;if((c instanceof Eb||c instanceof qf||c instanceof Vu)&&c.hasMissingPatterns&&c.patterns.length===0&&(u=!0),u)continue;i.push(l)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},ql=class I5{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,r){if(t&&typeof t=="string"){const n=t.length;let i=0,a=[],s=!1;for(let o=0;o<n;o++)if(t.charAt(o)==="\\"&&o+1<n){const c=t.charAt(o+1);c==="z"?(a.push(t.substring(i,o)),a.push("$(?!\\n)(?<!\\n)"),i=o+2):(c==="A"||c==="G")&&(s=!0),o++}this.hasAnchor=s,i===0?this.source=t:(a.push(t.substring(i,n)),this.source=a.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=r,typeof this.source=="string"?this.hasBackReferences=n$.test(this.source):this.hasBackReferences=!1}clone(){return new I5(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,r){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let n=r.map(i=>t.substring(i.start,i.end));return Sb.lastIndex=0,this.source.replace(Sb,(i,a)=>C5(n[parseInt(a,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],r=[],n=[],i=[],a,s,o,l;for(a=0,s=this.source.length;a<s;a++)o=this.source.charAt(a),t[a]=o,r[a]=o,n[a]=o,i[a]=o,o==="\\"&&a+1<s&&(l=this.source.charAt(a+1),l==="A"?(t[a+1]="",r[a+1]="",n[a+1]="A",i[a+1]="A"):l==="G"?(t[a+1]="",r[a+1]="G",n[a+1]="",i[a+1]="G"):(t[a+1]=l,r[a+1]=l,n[a+1]=l,i[a+1]=l),a++);return{A0_G0:t.join(""),A0_G1:r.join(""),A1_G0:n.join(""),A1_G1:i.join("")}}resolveAnchors(t,r){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?r?this._anchorCache.A1_G1:this._anchorCache.A1_G0:r?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},jl=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(r=>r.source);this._cached=new _b(e,t,this._items.map(r=>r.ruleId))}return this._cached}compileAG(e,t,r){return this._hasAnchors?t?r?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,r)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,r)),this._anchorCache.A1_G0):r?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,r)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,r)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,r){let n=this._items.map(i=>i.resolveAnchors(t,r));return new _b(e,n,this._items.map(i=>i.ruleId))}},_b=class{constructor(e,t,r){this.regExps=t,this.rules=r,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,r=this.rules.length;t<r;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
|
|
114
|
+
`)}findNextMatchSync(e,t,r){const n=this.scanner.findNextMatchSync(e,t,r);return n?{ruleId:this.rules[n.index],captureIndices:n.captureIndices}:null}},Sd=class{constructor(e,t){this.languageId=e,this.tokenType=t}},o$=class jf{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,r){this._defaultAttributes=new Sd(t,8),this._embeddedLanguagesMatcher=new l$(Object.entries(r||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?jf._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Sd(0,0);_getBasicScopeAttributes=new S5(t=>{const r=this._scopeToLanguage(t),n=this._toStandardTokenType(t);return new Sd(r,n)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const r=t.match(jf.STANDARD_TOKEN_TYPE_REGEXP);if(!r)return 8;switch(r[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},l$=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([r,n])=>C5(r));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<"u"&&process.env.VSCODE_TEXTMATE_DEBUG;var Ab=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function R5(e,t,r,n,i,a,s,o){const l=t.content.length;let c=!1,u=-1;if(s){const f=c$(e,t,r,n,i,a);i=f.stack,n=f.linePos,r=f.isFirstLine,u=f.anchorPosition}const h=Date.now();for(;!c;){if(o!==0&&Date.now()-h>o)return new Ab(i,!0);d()}return new Ab(i,!1);function d(){const f=u$(e,t,r,n,i,u);if(!f){a.produce(i,l),c=!0;return}const p=f.captureIndices,m=f.matchedRuleId,b=p&&p.length>0?p[0].end>n:!1;if(m===i$){const y=i.getRule(e);a.produce(i,p[0].start),i=i.withContentNameScopesList(i.nameScopesList),al(e,t,r,i,a,y.endCaptures,p),a.produce(i,p[0].end);const v=i;if(i=i.parent,u=v.getAnchorPos(),!b&&v.getEnterPos()===n){i=v,a.produce(i,l),c=!0;return}}else{const y=e.getRule(m);a.produce(i,p[0].start);const v=i,T=y.getName(t.content,p),A=i.contentNameScopesList.pushAttributed(T,e);if(i=i.push(m,n,u,p[0].end===l,null,A,A),y instanceof qf){const E=y;al(e,t,r,i,a,E.beginCaptures,p),a.produce(i,p[0].end),u=p[0].end;const S=E.getContentName(t.content,p),I=A.pushAttributed(S,e);if(i=i.withContentNameScopesList(I),E.endHasBackReferences&&(i=i.withEndRule(E.getEndWithResolvedBackReferences(t.content,p))),!b&&v.hasSameRuleAs(i)){i=i.pop(),a.produce(i,l),c=!0;return}}else if(y instanceof Vu){const E=y;al(e,t,r,i,a,E.beginCaptures,p),a.produce(i,p[0].end),u=p[0].end;const S=E.getContentName(t.content,p),I=A.pushAttributed(S,e);if(i=i.withContentNameScopesList(I),E.whileHasBackReferences&&(i=i.withEndRule(E.getWhileWithResolvedBackReferences(t.content,p))),!b&&v.hasSameRuleAs(i)){i=i.pop(),a.produce(i,l),c=!0;return}}else if(al(e,t,r,i,a,y.captures,p),a.produce(i,p[0].end),i=i.pop(),!b){i=i.safePop(),a.produce(i,l),c=!0;return}}p[0].end>n&&(n=p[0].end,r=!1)}}function c$(e,t,r,n,i,a){let s=i.beginRuleCapturedEOL?0:-1;const o=[];for(let l=i;l;l=l.pop()){const c=l.getRule(e);c instanceof Vu&&o.push({rule:c,stack:l})}for(let l=o.pop();l;l=o.pop()){const{ruleScanner:c,findOptions:u}=f$(l.rule,e,l.stack.endRule,r,n===s),h=c.findNextMatchSync(t,n,u);if(h){if(h.ruleId!==L5){i=l.stack.pop();break}h.captureIndices&&h.captureIndices.length&&(a.produce(l.stack,h.captureIndices[0].start),al(e,t,r,l.stack,a,l.rule.whileCaptures,h.captureIndices),a.produce(l.stack,h.captureIndices[0].end),s=h.captureIndices[0].end,h.captureIndices[0].end>n&&(n=h.captureIndices[0].end,r=!1))}else{i=l.stack.pop();break}}return{stack:i,linePos:n,anchorPosition:s,isFirstLine:r}}function u$(e,t,r,n,i,a){const s=h$(e,t,r,n,i,a),o=e.getInjections();if(o.length===0)return s;const l=d$(o,e,t,r,n,i,a);if(!l)return s;if(!s)return l;const c=s.captureIndices[0].start,u=l.captureIndices[0].start;return u<c||l.priorityMatch&&u===c?l:s}function h$(e,t,r,n,i,a){const s=i.getRule(e),{ruleScanner:o,findOptions:l}=B5(s,e,i.endRule,r,n===a),c=o.findNextMatchSync(t,n,l);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function d$(e,t,r,n,i,a,s){let o=Number.MAX_VALUE,l=null,c,u=0;const h=a.contentNameScopesList.getScopeNames();for(let d=0,f=e.length;d<f;d++){const p=e[d];if(!p.matcher(h))continue;const m=t.getRule(p.ruleId),{ruleScanner:b,findOptions:y}=B5(m,t,null,n,i===s),v=b.findNextMatchSync(r,i,y);if(!v)continue;const T=v.captureIndices[0].start;if(!(T>=o)&&(o=T,l=v.captureIndices,c=v.ruleId,u=p.priority,o===i))break}return l?{priorityMatch:u===-1,captureIndices:l,matchedRuleId:c}:null}function B5(e,t,r,n,i){return{ruleScanner:e.compileAG(t,r,n,i),findOptions:0}}function f$(e,t,r,n,i){return{ruleScanner:e.compileWhileAG(t,r,n,i),findOptions:0}}function al(e,t,r,n,i,a,s){if(a.length===0)return;const o=t.content,l=Math.min(a.length,s.length),c=[],u=s[0].end;for(let h=0;h<l;h++){const d=a[h];if(d===null)continue;const f=s[h];if(f.length===0)continue;if(f.start>u)break;for(;c.length>0&&c[c.length-1].endPos<=f.start;)i.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?i.produceFromScopes(c[c.length-1].scopes,f.start):i.produce(n,f.start),d.retokenizeCapturedWithRuleId){const m=d.getName(o,s),b=n.contentNameScopesList.pushAttributed(m,e),y=d.getContentName(o,s),v=b.pushAttributed(y,e),T=n.push(d.retokenizeCapturedWithRuleId,f.start,-1,!1,null,b,v),A=e.createOnigString(o.substring(0,f.end));R5(e,A,r&&f.start===0,f.start,T,i,!1,0),A5(A);continue}const p=d.getName(o,s);if(p!==null){const b=(c.length>0?c[c.length-1].scopes:n.contentNameScopesList).pushAttributed(p,e);c.push(new p$(b,f.end))}}for(;c.length>0;)i.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var p$=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function m$(e,t,r,n,i,a,s,o){return new b$(e,t,r,n,i,a,s,o)}function Nb(e,t,r,n,i){const a=Gu(t,Xu),s=M5.getCompiledRuleId(r,n,i.repository);for(const o of a)e.push({debugSelector:t,matcher:o.matcher,ruleId:s,grammar:i,priority:o.priority})}function Xu(e,t){if(t.length<e.length)return!1;let r=0;return e.every(n=>{for(let i=r;i<t.length;i++)if(g$(t[i],n))return r=i+1,!0;return!1})}function g$(e,t){if(!e)return!1;if(e===t)return!0;const r=t.length;return e.length>r&&e.substr(0,r)===t&&e[r]==="."}var b$=class{constructor(e,t,r,n,i,a,s,o){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=o,this._basicScopeAttributesProvider=new o$(r,n),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=Lb(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const l of Object.keys(i)){const c=Gu(l,Xu);for(const u of c)this._tokenTypeMatchers.push({matcher:u.matcher,type:i[l]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},t=[],r=this._rootScopeName,n=e.lookup(r);if(n){const i=n.injections;if(i)for(let s in i)Nb(t,s,i[s],this,n);const a=this._grammarRepository.injections(r);a&&a.forEach(s=>{const o=this.getExternalGrammar(s);if(o){const l=o.injectionSelector;l&&Nb(t,l,o,this,o)}})}return t.sort((i,a)=>i.priority-a.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,r=e(t);return this._ruleId2desc[t]=r,r}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const r=this._grammarRepository.lookup(e);if(r)return this._includedGrammars[e]=Lb(r,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,r=0){const n=this._tokenize(e,t,!1,r);return{tokens:n.lineTokens.getResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}tokenizeLine2(e,t,r=0){const n=this._tokenize(e,t,!0,r);return{tokens:n.lineTokens.getBinaryResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}_tokenize(e,t,r,n){this._rootId===-1&&(this._rootId=M5.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===Uf.NULL){i=!0;const c=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),h=Js.set(0,c.languageId,c.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),d=this.getRule(this._rootId).getName(null,null);let f;d?f=Al.createRootAndLookUpScopeName(d,h,this):f=Al.createRoot("unknown",h),t=new Uf(null,this._rootId,-1,-1,!1,null,f,f)}else i=!1,t.reset();e=e+`
|
|
115
|
+
`;const a=this.createOnigString(e),s=a.content.length,o=new x$(r,e,this._tokenTypeMatchers,this.balancedBracketSelectors),l=R5(this,a,i,0,t,o,!0,n);return A5(a),{lineLength:s,lineTokens:o,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function Lb(e,t){return e=OF(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Al=class Vn{constructor(t,r,n){this.parent=t,this.scopePath=r,this.tokenAttributes=n}static fromExtension(t,r){let n=t,i=t?.scopePath??null;for(const a of r)i=Cd.push(i,a.scopeNames),n=new Vn(n,i,a.encodedTokenAttributes);return n}static createRoot(t,r){return new Vn(null,new Cd(null,t),r)}static createRootAndLookUpScopeName(t,r,n){const i=n.getMetadataForScope(t),a=new Cd(null,t),s=n.themeProvider.themeMatch(a),o=Vn.mergeAttributes(r,i,s);return new Vn(null,a,o)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Vn.equals(this,t)}static equals(t,r){do{if(t===r||!t&&!r)return!0;if(!t||!r||t.scopeName!==r.scopeName||t.tokenAttributes!==r.tokenAttributes)return!1;t=t.parent,r=r.parent}while(!0)}static mergeAttributes(t,r,n){let i=-1,a=0,s=0;return n!==null&&(i=n.fontStyle,a=n.foregroundId,s=n.backgroundId),Js.set(t,r.languageId,r.tokenType,null,i,a,s)}pushAttributed(t,r){if(t===null)return this;if(t.indexOf(" ")===-1)return Vn._pushAttributed(this,t,r);const n=t.split(/ /g);let i=this;for(const a of n)i=Vn._pushAttributed(i,a,r);return i}static _pushAttributed(t,r,n){const i=n.getMetadataForScope(r),a=t.scopePath.push(r),s=n.themeProvider.themeMatch(a),o=Vn.mergeAttributes(t.tokenAttributes,i,s);return new Vn(t,a,o)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const r=[];let n=this;for(;n&&n!==t;)r.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===t?r.reverse():void 0}},Uf=class Ba{constructor(t,r,n,i,a,s,o,l){this.parent=t,this.ruleId=r,this.beginRuleCapturedEOL=a,this.endRule=s,this.nameScopesList=o,this.contentNameScopesList=l,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=i}_stackElementBrand=void 0;static NULL=new Ba(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:Ba._equals(this,t)}static _equals(t,r){return t===r?!0:this._structuralEquals(t,r)?Al.equals(t.contentNameScopesList,r.contentNameScopesList):!1}static _structuralEquals(t,r){do{if(t===r||!t&&!r)return!0;if(!t||!r||t.depth!==r.depth||t.ruleId!==r.ruleId||t.endRule!==r.endRule)return!1;t=t.parent,r=r.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){Ba._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,r,n,i,a,s,o){return new Ba(this,t,r,n,i,a,s,o)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,r){return this.parent&&(r=this.parent._writeString(t,r)),t[r++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,r}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new Ba(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let r=this;for(;r&&r._enterPos===t._enterPos;){if(r.ruleId===t.ruleId)return!0;r=r.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,r){const n=Al.fromExtension(t?.nameScopesList??null,r.nameScopesList);return new Ba(t,r.ruleId,r.enterPos??-1,r.anchorPos??-1,r.beginRuleCapturedEOL,r.endRule,n,Al.fromExtension(n,r.contentNameScopesList))}},y$=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(r=>r==="*"?(this.allowAny=!0,[]):Gu(r,Xu).map(n=>n.matcher)),this.unbalancedBracketScopes=t.flatMap(r=>Gu(r,Xu).map(n=>n.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},x$=class{constructor(e,t,r,n){this.balancedBracketSelectors=n,this._emitBinaryTokens=e,this._tokenTypeOverrides=r,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,i=!1;if(this.balancedBracketSelectors?.matchesAlways&&(i=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const a=e?.getScopeNames()??[];for(const s of this._tokenTypeOverrides)s.matcher(a)&&(n=Js.set(n,0,s.type,null,-1,0,0));this.balancedBracketSelectors&&(i=this.balancedBracketSelectors.match(a))}if(i&&(n=Js.set(n,0,8,i,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}const r=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:r}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const r=new Uint32Array(this._binaryTokens.length);for(let n=0,i=this._binaryTokens.length;n<i;n++)r[n]=this._binaryTokens[n];return r}},v$=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,r,n,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,m$(e,a,t,r,n,i,this,this._onigLib))}return this._grammars.get(e)}},k$=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new v$(Wu.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,r){this._syncRegistry.setTheme(Wu.createFromRawTheme(t,r))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,r,n){return this.loadGrammarWithConfiguration(t,r,{embeddedLanguages:n})}loadGrammarWithConfiguration(t,r,n){return this._loadGrammar(t,r,n.embeddedLanguages,n.tokenTypes,new y$(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,r,n,i,a){const s=new KF(this._syncRegistry,t);for(;s.Q.length>0;)s.Q.map(o=>this._loadSingleGrammar(o.scopeName)),s.processQueue();return this._grammarForScopeName(t,r,n,i,a)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const r=this._options.loadGrammar(t);if(r){const n=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(r,n)}}addGrammar(t,r=[],n=0,i=null){return this._syncRegistry.addGrammar(t,r),this._grammarForScopeName(t.scopeName,n,i)}_grammarForScopeName(t,r=0,n=null,i=null,a=null){return this._syncRegistry.grammarForScopeName(t,r,n,i,a)}},Wf=Uf.NULL;const w$=/["&'<>`]/g,T$=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,C$=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,S$=/[|\\{}()[\]^$+*?.]/g,Mb=new WeakMap;function E$(e,t){if(e=e.replace(t.subset?_$(t.subset):w$,n),t.subset||t.escapeOnly)return e;return e.replace(T$,r).replace(C$,n);function r(i,a,s){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,s.charCodeAt(a+2),t)}function n(i,a,s){return t.format(i.charCodeAt(0),s.charCodeAt(a+1),t)}}function _$(e){let t=Mb.get(e);return t||(t=A$(e),Mb.set(e,t)),t}function A$(e){const t=[];let r=-1;for(;++r<e.length;)t.push(e[r].replace(S$,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const N$=/[\dA-Fa-f]/;function L$(e,t,r){const n="&#x"+e.toString(16).toUpperCase();return r&&t&&!N$.test(String.fromCharCode(t))?n:n+";"}const M$=/\d/;function I$(e,t,r){const n="&#"+String(e);return r&&t&&!M$.test(String.fromCharCode(t))?n:n+";"}const R$=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Ed={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},B$=["cent","copy","divide","gt","lt","not","para","times"],D5={}.hasOwnProperty,Gf={};let Hc;for(Hc in Ed)D5.call(Ed,Hc)&&(Gf[Ed[Hc]]=Hc);const D$=/[^\dA-Za-z]/;function O$(e,t,r,n){const i=String.fromCharCode(e);if(D5.call(Gf,i)){const a=Gf[i],s="&"+a;return r&&R$.includes(a)&&!B$.includes(a)&&(!n||t&&t!==61&&D$.test(String.fromCharCode(t)))?s:s+";"}return""}function P$(e,t,r){let n=L$(e,t,r.omitOptionalSemicolons),i;if((r.useNamedReferences||r.useShortestReferences)&&(i=O$(e,t,r.omitOptionalSemicolons,r.attribute)),(r.useShortestReferences||!i)&&r.useShortestReferences){const a=I$(e,t,r.omitOptionalSemicolons);a.length<n.length&&(n=a)}return i&&(!r.useShortestReferences||i.length<n.length)?i:n}function Ds(e,t){return E$(e,Object.assign({format:P$},t))}const F$=/^>|^->|<!--|-->|--!>|<!-$/g,$$=[">"],z$=["<",">"];function H$(e,t,r,n){return n.settings.bogusComments?"<?"+Ds(e.value,Object.assign({},n.settings.characterReferences,{subset:$$}))+">":"<!--"+e.value.replace(F$,i)+"-->";function i(a){return Ds(a,Object.assign({},n.settings.characterReferences,{subset:z$}))}}function q$(e,t,r,n){return"<!"+(n.settings.upperDoctype?"DOCTYPE":"doctype")+(n.settings.tightDoctype?"":" ")+"html>"}const pr=P5(1),O5=P5(-1),j$=[];function P5(e){return t;function t(r,n,i){const a=r?r.children:j$;let s=(n||0)+e,o=a[s];if(!i)for(;o&&J0(o);)s+=e,o=a[s];return o}}const U$={}.hasOwnProperty;function F5(e){return t;function t(r,n,i){return U$.call(e,r.tagName)&&e[r.tagName](r,n,i)}}const Zm=F5({body:G$,caption:_d,colgroup:_d,dd:K$,dt:X$,head:_d,html:W$,li:V$,optgroup:Q$,option:Z$,p:Y$,rp:Ib,rt:Ib,tbody:ez,td:Rb,tfoot:tz,th:Rb,thead:J$,tr:rz});function _d(e,t,r){const n=pr(r,t,!0);return!n||n.type!=="comment"&&!(n.type==="text"&&J0(n.value.charAt(0)))}function W$(e,t,r){const n=pr(r,t);return!n||n.type!=="comment"}function G$(e,t,r){const n=pr(r,t);return!n||n.type!=="comment"}function Y$(e,t,r){const n=pr(r,t);return n?n.type==="element"&&(n.tagName==="address"||n.tagName==="article"||n.tagName==="aside"||n.tagName==="blockquote"||n.tagName==="details"||n.tagName==="div"||n.tagName==="dl"||n.tagName==="fieldset"||n.tagName==="figcaption"||n.tagName==="figure"||n.tagName==="footer"||n.tagName==="form"||n.tagName==="h1"||n.tagName==="h2"||n.tagName==="h3"||n.tagName==="h4"||n.tagName==="h5"||n.tagName==="h6"||n.tagName==="header"||n.tagName==="hgroup"||n.tagName==="hr"||n.tagName==="main"||n.tagName==="menu"||n.tagName==="nav"||n.tagName==="ol"||n.tagName==="p"||n.tagName==="pre"||n.tagName==="section"||n.tagName==="table"||n.tagName==="ul"):!r||!(r.type==="element"&&(r.tagName==="a"||r.tagName==="audio"||r.tagName==="del"||r.tagName==="ins"||r.tagName==="map"||r.tagName==="noscript"||r.tagName==="video"))}function V$(e,t,r){const n=pr(r,t);return!n||n.type==="element"&&n.tagName==="li"}function X$(e,t,r){const n=pr(r,t);return!!(n&&n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd"))}function K$(e,t,r){const n=pr(r,t);return!n||n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd")}function Ib(e,t,r){const n=pr(r,t);return!n||n.type==="element"&&(n.tagName==="rp"||n.tagName==="rt")}function Q$(e,t,r){const n=pr(r,t);return!n||n.type==="element"&&n.tagName==="optgroup"}function Z$(e,t,r){const n=pr(r,t);return!n||n.type==="element"&&(n.tagName==="option"||n.tagName==="optgroup")}function J$(e,t,r){const n=pr(r,t);return!!(n&&n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot"))}function ez(e,t,r){const n=pr(r,t);return!n||n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot")}function tz(e,t,r){return!pr(r,t)}function rz(e,t,r){const n=pr(r,t);return!n||n.type==="element"&&n.tagName==="tr"}function Rb(e,t,r){const n=pr(r,t);return!n||n.type==="element"&&(n.tagName==="td"||n.tagName==="th")}const nz=F5({body:sz,colgroup:oz,head:az,html:iz,tbody:lz});function iz(e){const t=pr(e,-1);return!t||t.type!=="comment"}function az(e){const t=new Set;for(const n of e.children)if(n.type==="element"&&(n.tagName==="base"||n.tagName==="title")){if(t.has(n.tagName))return!1;t.add(n.tagName)}const r=e.children[0];return!r||r.type==="element"}function sz(e){const t=pr(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&J0(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function oz(e,t,r){const n=O5(r,t),i=pr(e,-1,!0);return r&&n&&n.type==="element"&&n.tagName==="colgroup"&&Zm(n,r.children.indexOf(n),r)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function lz(e,t,r){const n=O5(r,t),i=pr(e,-1);return r&&n&&n.type==="element"&&(n.tagName==="thead"||n.tagName==="tbody")&&Zm(n,r.children.indexOf(n),r)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const qc={name:[[`
|
|
116
|
+
\f\r &/=>`.split(""),`
|
|
117
|
+
\f\r "&'/=>\``.split("")],[`\0
|
|
118
|
+
\f\r "&'/<=>`.split(""),`\0
|
|
119
|
+
\f\r "&'/<=>\``.split("")]],unquoted:[[`
|
|
120
|
+
\f\r &>`.split(""),`\0
|
|
121
|
+
\f\r "&'<=>\``.split("")],[`\0
|
|
122
|
+
\f\r "&'<=>\``.split(""),`\0
|
|
123
|
+
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function cz(e,t,r,n){const i=n.schema,a=i.space==="svg"?!1:n.settings.omitOptionalTags;let s=i.space==="svg"?n.settings.closeEmptyElements:n.settings.voids.includes(e.tagName.toLowerCase());const o=[];let l;i.space==="html"&&e.tagName==="svg"&&(n.schema=ui);const c=uz(n,e.properties),u=n.all(i.space==="html"&&e.tagName==="template"?e.content:e);return n.schema=i,u&&(s=!1),(c||!a||!nz(e,t,r))&&(o.push("<",e.tagName,c?" "+c:""),s&&(i.space==="svg"||n.settings.closeSelfClosing)&&(l=c.charAt(c.length-1),(!n.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&o.push(" "),o.push("/")),o.push(">")),o.push(u),!s&&(!a||!Zm(e,t,r))&&o.push("</"+e.tagName+">"),o.join("")}function uz(e,t){const r=[];let n=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){const a=hz(e,i,t[i]);a&&r.push(a)}}for(;++n<r.length;){const a=e.settings.tightAttributes?r[n].charAt(r[n].length-1):void 0;n!==r.length-1&&a!=='"'&&a!=="'"&&(r[n]+=" ")}return r.join("")}function hz(e,t,r){const n=uc(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,a=e.settings.allowDangerousCharacters?0:1;let s=e.quote,o;if(n.overloadedBoolean&&(r===n.attribute||r==="")?r=!0:(n.boolean||n.overloadedBoolean)&&(typeof r!="string"||r===n.attribute||r==="")&&(r=!!r),r==null||r===!1||typeof r=="number"&&Number.isNaN(r))return"";const l=Ds(n.attribute,Object.assign({},e.settings.characterReferences,{subset:qc.name[i][a]}));return r===!0||(r=Array.isArray(r)?(n.commaSeparated?bm:ym)(r,{padLeft:!e.settings.tightCommaSeparatedLists}):String(r),e.settings.collapseEmptyAttributes&&!r)?l:(e.settings.preferUnquoted&&(o=Ds(r,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:qc.unquoted[i][a]}))),o!==r&&(e.settings.quoteSmart&&Pu(r,s)>Pu(r,e.alternative)&&(s=e.alternative),o=s+Ds(r,Object.assign({},e.settings.characterReferences,{subset:(s==="'"?qc.single:qc.double)[i][a],attribute:!0}))+s),l+(o&&"="+o))}const dz=["<","&"];function $5(e,t,r,n){return r&&r.type==="element"&&(r.tagName==="script"||r.tagName==="style")?e.value:Ds(e.value,Object.assign({},n.settings.characterReferences,{subset:dz}))}function fz(e,t,r,n){return n.settings.allowDangerousHtml?e.value:$5(e,t,r,n)}function pz(e,t,r,n){return n.all(e)}const mz=vm("type",{invalid:gz,unknown:bz,handlers:{comment:H$,doctype:q$,element:cz,raw:fz,root:pz,text:$5}});function gz(e){throw new Error("Expected node, not `"+e+"`")}function bz(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const yz={},xz={},vz=[];function kz(e,t){const r=t||yz,n=r.quote||'"',i=n==='"'?"'":'"';if(n!=='"'&&n!=="'")throw new Error("Invalid quote `"+n+"`, expected `'` or `\"`");return{one:wz,all:Tz,settings:{omitOptionalTags:r.omitOptionalTags||!1,allowParseErrors:r.allowParseErrors||!1,allowDangerousCharacters:r.allowDangerousCharacters||!1,quoteSmart:r.quoteSmart||!1,preferUnquoted:r.preferUnquoted||!1,tightAttributes:r.tightAttributes||!1,upperDoctype:r.upperDoctype||!1,tightDoctype:r.tightDoctype||!1,bogusComments:r.bogusComments||!1,tightCommaSeparatedLists:r.tightCommaSeparatedLists||!1,tightSelfClosing:r.tightSelfClosing||!1,collapseEmptyAttributes:r.collapseEmptyAttributes||!1,allowDangerousHtml:r.allowDangerousHtml||!1,voids:r.voids||O4,characterReferences:r.characterReferences||xz,closeSelfClosing:r.closeSelfClosing||!1,closeEmptyElements:r.closeEmptyElements||!1},schema:r.space==="svg"?ui:ho,quote:n,alternative:i}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function wz(e,t,r){return mz(e,t,r,this)}function Tz(e){const t=[],r=e&&e.children||vz;let n=-1;for(;++n<r.length;)t[n]=this.one(r[n],n,e);return t.join("")}function Ku(e,t){const r=typeof e=="string"?{}:{...e.colorReplacements},n=typeof e=="string"?e:e.name;for(const[i,a]of Object.entries(t?.colorReplacements||{}))typeof a=="string"?r[i]=a:i===n&&Object.assign(r,a);return r}function ua(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Cz(e){return Array.isArray(e)?e:[e]}async function z5(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function Jm(e){return!e||["plaintext","txt","text","plain"].includes(e)}function H5(e){return e==="ansi"||Jm(e)}function e1(e){return e==="none"}function q5(e){return e1(e)}function j5(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const r=Array.isArray(t)?t:t.split(/\s+/g);for(const n of r)n&&!e.properties.class.includes(n)&&e.properties.class.push(n);return e}function ah(e,t=!1){if(e.length===0)return[["",0]];const r=e.split(/(\r?\n)/g);let n=0;const i=[];for(let a=0;a<r.length;a+=2){const s=t?r[a]+(r[a+1]||""):r[a];i.push([s,n]),n+=r[a].length,n+=r[a+1]?.length||0}return i}function Sz(e){const t=ah(e,!0).map(([i])=>i);function r(i){if(i===e.length)return{line:t.length-1,character:t[t.length-1].length};let a=i,s=0;for(const o of t){if(a<o.length)break;a-=o.length,s++}return{line:s,character:a}}function n(i,a){let s=0;for(let o=0;o<i;o++)s+=t[o].length;return s+=a,s}return{lines:t,indexToPos:r,posToIndex:n}}const t1="light-dark()",Ez=["color","background-color"];function _z(e,t){let r=0;const n=[];for(const i of t)i>r&&n.push({...e,content:e.content.slice(r,i),offset:e.offset+r}),r=i;return r<e.content.length&&n.push({...e,content:e.content.slice(r),offset:e.offset+r}),n}function Az(e,t){const r=Array.from(t instanceof Set?t:new Set(t)).sort((n,i)=>n-i);return r.length?e.map(n=>n.flatMap(i=>{const a=r.filter(s=>i.offset<s&&s<i.offset+i.content.length).map(s=>s-i.offset).sort((s,o)=>s-o);return a.length?_z(i,a):i})):e}function Nz(e,t,r,n,i="css-vars"){const a={content:e.content,explanation:e.explanation,offset:e.offset},s=t.map(u=>Qu(e.variants[u])),o=new Set(s.flatMap(u=>Object.keys(u))),l={},c=(u,h)=>{const d=h==="color"?"":h==="background-color"?"-bg":`-${h}`;return r+t[u]+(h==="color"?"":d)};return s.forEach((u,h)=>{for(const d of o){const f=u[d]||"inherit";if(h===0&&n&&Ez.includes(d))if(n===t1&&s.length>1){const p=t.findIndex(v=>v==="light"),m=t.findIndex(v=>v==="dark");if(p===-1||m===-1)throw new nr('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const b=s[p][d]||"inherit",y=s[m][d]||"inherit";l[d]=`light-dark(${b}, ${y})`,i==="css-vars"&&(l[c(h,d)]=f)}else l[d]=f;else i==="css-vars"&&(l[c(h,d)]=f)}}),a.htmlStyle=l,a}function Qu(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&Mr.Italic&&(t["font-style"]="italic"),e.fontStyle&Mr.Bold&&(t["font-weight"]="bold");const r=[];e.fontStyle&Mr.Underline&&r.push("underline"),e.fontStyle&Mr.Strikethrough&&r.push("line-through"),r.length&&(t["text-decoration"]=r.join(" "))}return t}function Yf(e){return typeof e=="string"?e:Object.entries(e).map(([t,r])=>`${t}:${r}`).join(";")}const U5=new WeakMap;function sh(e,t){U5.set(e,t)}function Ul(e){return U5.get(e)}class xo{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,r){return new xo(Object.fromEntries(Cz(r).map(n=>[n,Wf])),t)}constructor(...t){if(t.length===2){const[r,n]=t;this.lang=n,this._stacks=r}else{const[r,n,i]=t;this.lang=n,this._stacks={[i]:r}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return Lz(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function Lz(e){const t=[],r=new Set;function n(i){if(r.has(i))return;r.add(i);const a=i?.nameScopesList?.scopeName;a&&t.push(a),i.parent&&n(i.parent)}return n(e),t}function Mz(e,t){if(!(e instanceof xo))throw new nr("Invalid grammar state");return e.getInternalStack(t)}function Iz(){const e=new WeakMap;function t(r){if(!e.has(r.meta)){let n=function(s){if(typeof s=="number"){if(s<0||s>r.source.length)throw new nr(`Invalid decoration offset: ${s}. Code length: ${r.source.length}`);return{...i.indexToPos(s),offset:s}}else{const o=i.lines[s.line];if(o===void 0)throw new nr(`Invalid decoration position ${JSON.stringify(s)}. Lines length: ${i.lines.length}`);let l=s.character;if(l<0&&(l=o.length+l),l<0||l>o.length)throw new nr(`Invalid decoration position ${JSON.stringify(s)}. Line ${s.line} length: ${o.length}`);return{...s,character:l,offset:i.posToIndex(s.line,l)}}};const i=Sz(r.source),a=(r.options.decorations||[]).map(s=>({...s,start:n(s.start),end:n(s.end)}));Rz(a),e.set(r.meta,{decorations:a,converter:i,source:r.source})}return e.get(r.meta)}return{name:"shiki:decorations",tokens(r){if(!this.options.decorations?.length)return;const i=t(this).decorations.flatMap(s=>[s.start.offset,s.end.offset]);return Az(r,i)},code(r){if(!this.options.decorations?.length)return;const n=t(this),i=Array.from(r.children).filter(u=>u.type==="element"&&u.tagName==="span");if(i.length!==n.converter.lines.length)throw new nr(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function a(u,h,d,f){const p=i[u];let m="",b=-1,y=-1;if(h===0&&(b=0),d===0&&(y=0),d===Number.POSITIVE_INFINITY&&(y=p.children.length),b===-1||y===-1)for(let T=0;T<p.children.length;T++)m+=W5(p.children[T]),b===-1&&m.length===h&&(b=T+1),y===-1&&m.length===d&&(y=T+1);if(b===-1)throw new nr(`Failed to find start index for decoration ${JSON.stringify(f.start)}`);if(y===-1)throw new nr(`Failed to find end index for decoration ${JSON.stringify(f.end)}`);const v=p.children.slice(b,y);if(!f.alwaysWrap&&v.length===p.children.length)o(p,f,"line");else if(!f.alwaysWrap&&v.length===1&&v[0].type==="element")o(v[0],f,"token");else{const T={type:"element",tagName:"span",properties:{},children:v};o(T,f,"wrapper"),p.children.splice(b,v.length,T)}}function s(u,h){i[u]=o(i[u],h,"line")}function o(u,h,d){const f=h.properties||{},p=h.transform||(m=>m);return u.tagName=h.tagName||"span",u.properties={...u.properties,...f,class:u.properties.class},h.properties?.class&&j5(u,h.properties.class),u=p(u,d)||u,u}const l=[],c=n.decorations.sort((u,h)=>h.start.offset-u.start.offset||u.end.offset-h.end.offset);for(const u of c){const{start:h,end:d}=u;if(h.line===d.line)a(h.line,h.character,d.character,u);else if(h.line<d.line){a(h.line,h.character,Number.POSITIVE_INFINITY,u);for(let f=h.line+1;f<d.line;f++)l.unshift(()=>s(f,u));a(d.line,0,d.character,u)}}l.forEach(u=>u())}}}function Rz(e){for(let t=0;t<e.length;t++){const r=e[t];if(r.start.offset>r.end.offset)throw new nr(`Invalid decoration range: ${JSON.stringify(r.start)} - ${JSON.stringify(r.end)}`);for(let n=t+1;n<e.length;n++){const i=e[n],a=r.start.offset<=i.start.offset&&i.start.offset<r.end.offset,s=r.start.offset<i.end.offset&&i.end.offset<=r.end.offset,o=i.start.offset<=r.start.offset&&r.start.offset<i.end.offset,l=i.start.offset<r.end.offset&&r.end.offset<=i.end.offset;if(a||s||o||l){if(a&&s||o&&l||o&&r.start.offset===r.end.offset||s&&i.start.offset===i.end.offset)continue;throw new nr(`Decorations ${JSON.stringify(r.start)} and ${JSON.stringify(i.start)} intersect.`)}}}}function W5(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(W5).join(""):""}const Bz=[Iz()];function Zu(e){const t=Dz(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...Bz]}function Dz(e){const t=[],r=[],n=[];for(const i of e)switch(i.enforce){case"pre":t.push(i);break;case"post":r.push(i);break;default:n.push(i)}return{pre:t,post:r,normal:n}}var Fa=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Ad={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function Oz(e,t){const r=e.indexOf("\x1B",t);if(r!==-1&&e[r+1]==="["){const n=e.indexOf("m",r);if(n!==-1)return{sequence:e.substring(r+2,n).split(";"),startPosition:r,position:n+1}}return{position:e.length}}function Bb(e){const t=e.shift();if(t==="2"){const r=e.splice(0,3).map(n=>Number.parseInt(n));return r.length!==3||r.some(n=>Number.isNaN(n))?void 0:{type:"rgb",rgb:r}}else if(t==="5"){const r=e.shift();if(r)return{type:"table",index:Number(r)}}}function Pz(e){const t=[];for(;e.length>0;){const r=e.shift();if(!r)continue;const n=Number.parseInt(r);if(!Number.isNaN(n))if(n===0)t.push({type:"resetAll"});else if(n<=9)Ad[n]&&t.push({type:"setDecoration",value:Ad[n]});else if(n<=29){const i=Ad[n-20];i&&(t.push({type:"resetDecoration",value:i}),i==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(n<=37)t.push({type:"setForegroundColor",value:{type:"named",name:Fa[n-30]}});else if(n===38){const i=Bb(e);i&&t.push({type:"setForegroundColor",value:i})}else if(n===39)t.push({type:"resetForegroundColor"});else if(n<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:Fa[n-40]}});else if(n===48){const i=Bb(e);i&&t.push({type:"setBackgroundColor",value:i})}else n===49?t.push({type:"resetBackgroundColor"}):n===53?t.push({type:"setDecoration",value:"overline"}):n===55?t.push({type:"resetDecoration",value:"overline"}):n>=90&&n<=97?t.push({type:"setForegroundColor",value:{type:"named",name:Fa[n-90+8]}}):n>=100&&n<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Fa[n-100+8]}})}return t}function Fz(){let e=null,t=null,r=new Set;return{parse(n){const i=[];let a=0;do{const s=Oz(n,a),o=s.sequence?n.substring(a,s.startPosition):n.substring(a);if(o.length>0&&i.push({value:o,foreground:e,background:t,decorations:new Set(r)}),s.sequence){const l=Pz(s.sequence);for(const c of l)c.type==="resetAll"?(e=null,t=null,r.clear()):c.type==="resetForegroundColor"?e=null:c.type==="resetBackgroundColor"?t=null:c.type==="resetDecoration"&&r.delete(c.value);for(const c of l)c.type==="setForegroundColor"?e=c.value:c.type==="setBackgroundColor"?t=c.value:c.type==="setDecoration"&&r.add(c.value)}a=s.position}while(a<n.length);return i}}}var $z={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function zz(e=$z){function t(o){return e[o]}function r(o){return`#${o.map(l=>Math.max(0,Math.min(l,255)).toString(16).padStart(2,"0")).join("")}`}let n;function i(){if(n)return n;n=[];for(let c=0;c<Fa.length;c++)n.push(t(Fa[c]));let o=[0,95,135,175,215,255];for(let c=0;c<6;c++)for(let u=0;u<6;u++)for(let h=0;h<6;h++)n.push(r([o[c],o[u],o[h]]));let l=8;for(let c=0;c<24;c++,l+=10)n.push(r([l,l,l]));return n}function a(o){return i()[o]}function s(o){switch(o.type){case"named":return t(o.name);case"rgb":return r(o.rgb);case"table":return a(o.index)}}return{value:s}}const Hz={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function qz(e,t,r){const n=Ku(e,r),i=ah(t),a=Object.fromEntries(Fa.map(l=>{const c=`terminal.ansi${l[0].toUpperCase()}${l.substring(1)}`,u=e.colors?.[c];return[l,u||Hz[l]]})),s=zz(a),o=Fz();return i.map(l=>o.parse(l[0]).map(c=>{let u,h;c.decorations.has("reverse")?(u=c.background?s.value(c.background):e.bg,h=c.foreground?s.value(c.foreground):e.fg):(u=c.foreground?s.value(c.foreground):e.fg,h=c.background?s.value(c.background):void 0),u=ua(u,n),h=ua(h,n),c.decorations.has("dim")&&(u=jz(u));let d=Mr.None;return c.decorations.has("bold")&&(d|=Mr.Bold),c.decorations.has("italic")&&(d|=Mr.Italic),c.decorations.has("underline")&&(d|=Mr.Underline),c.decorations.has("strikethrough")&&(d|=Mr.Strikethrough),{content:c.value,offset:l[1],color:u,bgColor:h,fontStyle:d}}))}function jz(e){const t=e.match(/#([0-9a-f]{3,8})/i);if(t){const n=t[1];if(n.length===8){const i=Math.round(Number.parseInt(n.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${n.slice(0,6)}${i}`}else{if(n.length===6)return`#${n}80`;if(n.length===4){const i=n[0],a=n[1],s=n[2],o=n[3],l=Math.round(Number.parseInt(`${o}${o}`,16)/2).toString(16).padStart(2,"0");return`#${i}${i}${a}${a}${s}${s}${l}`}else if(n.length===3){const i=n[0],a=n[1],s=n[2];return`#${i}${i}${a}${a}${s}${s}80`}}}const r=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return r?`var(${r[1]}-dim)`:e}function r1(e,t,r={}){const{theme:n=e.getLoadedThemes()[0]}=r,i=e.resolveLangAlias(r.lang||"text");if(Jm(i)||e1(n))return ah(t).map(l=>[{content:l[0],offset:l[1]}]);const{theme:a,colorMap:s}=e.setTheme(n);if(i==="ansi")return qz(a,t,r);const o=e.getLanguage(r.lang||"text");if(r.grammarState){if(r.grammarState.lang!==o.name)throw new nr(`Grammar state language "${r.grammarState.lang}" does not match highlight language "${o.name}"`);if(!r.grammarState.themes.includes(a.name))throw new nr(`Grammar state themes "${r.grammarState.themes}" do not contain highlight theme "${a.name}"`)}return Wz(t,o,a,s,r)}function Uz(...e){if(e.length===2)return Ul(e[1]);const[t,r,n={}]=e,{lang:i="text",theme:a=t.getLoadedThemes()[0]}=n;if(Jm(i)||e1(a))throw new nr("Plain language does not have grammar state");if(i==="ansi")throw new nr("ANSI language does not have grammar state");const{theme:s,colorMap:o}=t.setTheme(a),l=t.getLanguage(i);return new xo(n1(r,l,s,o,n).stateStack,l.name,s.name)}function Wz(e,t,r,n,i){const a=n1(e,t,r,n,i),s=new xo(a.stateStack,t.name,r.name);return sh(a.tokens,s),a.tokens}function n1(e,t,r,n,i){const a=Ku(r,i),{tokenizeMaxLineLength:s=0,tokenizeTimeLimit:o=500}=i,l=ah(e);let c=i.grammarState?Mz(i.grammarState,r.name)??Wf:i.grammarContextCode!=null?n1(i.grammarContextCode,t,r,n,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:Wf,u=[];const h=[];for(let d=0,f=l.length;d<f;d++){const[p,m]=l[d];if(p===""){u=[],h.push([]);continue}if(s>0&&p.length>=s){u=[],h.push([{content:p,offset:m,color:"",fontStyle:0}]);continue}let b,y,v;i.includeExplanation&&(b=t.tokenizeLine(p,c,o),y=b.tokens,v=0);const T=t.tokenizeLine2(p,c,o),A=T.tokens.length/2;for(let E=0;E<A;E++){const S=T.tokens[2*E],I=E+1<A?T.tokens[2*E+2]:p.length;if(S===I)continue;const D=T.tokens[2*E+1],H=ua(n[Js.getForeground(D)],a),R=Js.getFontStyle(D),F={content:p.substring(S,I),offset:m+S,color:H,fontStyle:R};if(i.includeExplanation){const G=[];if(i.includeExplanation!=="scopeName")for(const $ of r.settings){let q;switch(typeof $.scope){case"string":q=$.scope.split(/,/).map(W=>W.trim());break;case"object":q=$.scope;break;default:continue}G.push({settings:$,selectors:q.map(W=>W.split(/ /))})}F.explanation=[];let ee=0;for(;S+ee<I;){const $=y[v],q=p.substring($.startIndex,$.endIndex);ee+=q.length,F.explanation.push({content:q,scopes:i.includeExplanation==="scopeName"?Gz($.scopes):Yz(G,$.scopes)}),v+=1}}u.push(F)}h.push(u),u=[],c=T.ruleStack}return{tokens:h,stateStack:c}}function Gz(e){return e.map(t=>({scopeName:t}))}function Yz(e,t){const r=[];for(let n=0,i=t.length;n<i;n++){const a=t[n];r[n]={scopeName:a,themeMatches:Xz(e,a,t.slice(0,n))}}return r}function Db(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function Vz(e,t,r){if(!Db(e[e.length-1],t))return!1;let n=e.length-2,i=r.length-1;for(;n>=0&&i>=0;)Db(e[n],r[i])&&(n-=1),i-=1;return n===-1}function Xz(e,t,r){const n=[];for(const{selectors:i,settings:a}of e)for(const s of i)if(Vz(s,t,r)){n.push(a);break}return n}function G5(e,t,r){const n=Object.entries(r.themes).filter(l=>l[1]).map(l=>({color:l[0],theme:l[1]})),i=n.map(l=>{const c=r1(e,t,{...r,theme:l.theme}),u=Ul(c),h=typeof l.theme=="string"?l.theme:l.theme.name;return{tokens:c,state:u,theme:h}}),a=Kz(...i.map(l=>l.tokens)),s=a[0].map((l,c)=>l.map((u,h)=>{const d={content:u.content,variants:{},offset:u.offset};return"includeExplanation"in r&&r.includeExplanation&&(d.explanation=u.explanation),a.forEach((f,p)=>{const{content:m,explanation:b,offset:y,...v}=f[c][h];d.variants[n[p].color]=v}),d})),o=i[0].state?new xo(Object.fromEntries(i.map(l=>[l.theme,l.state?.getInternalStack(l.theme)])),i[0].state.lang):void 0;return o&&sh(s,o),s}function Kz(...e){const t=e.map(()=>[]),r=e.length;for(let n=0;n<e[0].length;n++){const i=e.map(l=>l[n]),a=t.map(()=>[]);t.forEach((l,c)=>l.push(a[c]));const s=i.map(()=>0),o=i.map(l=>l[0]);for(;o.every(l=>l);){const l=Math.min(...o.map(c=>c.content.length));for(let c=0;c<r;c++){const u=o[c];u.content.length===l?(a[c].push(u),s[c]+=1,o[c]=i[c][s[c]]):(a[c].push({...u,content:u.content.slice(0,l)}),o[c]={...u,content:u.content.slice(l),offset:u.offset+l})}}}return t}function Ju(e,t,r){let n,i,a,s,o,l;if("themes"in r){const{defaultColor:c="light",cssVariablePrefix:u="--shiki-",colorsRendering:h="css-vars"}=r,d=Object.entries(r.themes).filter(y=>y[1]).map(y=>({color:y[0],theme:y[1]})).sort((y,v)=>y.color===c?-1:v.color===c?1:0);if(d.length===0)throw new nr("`themes` option must not be empty");const f=G5(e,t,r);if(l=Ul(f),c&&t1!==c&&!d.find(y=>y.color===c))throw new nr(`\`themes\` option must contain the defaultColor key \`${c}\``);const p=d.map(y=>e.getTheme(y.theme)),m=d.map(y=>y.color);a=f.map(y=>y.map(v=>Nz(v,m,u,c,h))),l&&sh(a,l);const b=d.map(y=>Ku(y.theme,r));i=Ob(d,p,b,u,c,"fg",h),n=Ob(d,p,b,u,c,"bg",h),s=`shiki-themes ${p.map(y=>y.name).join(" ")}`,o=c?void 0:[i,n].join(";")}else if("theme"in r){const c=Ku(r.theme,r);a=r1(e,t,r);const u=e.getTheme(r.theme);n=ua(u.bg,c),i=ua(u.fg,c),s=u.name,l=Ul(a)}else throw new nr("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:n,themeName:s,rootStyle:o,grammarState:l}}function Ob(e,t,r,n,i,a,s){return e.map((o,l)=>{const c=ua(t[l][a],r[l])||"inherit",u=`${n+o.color}${a==="bg"?"-bg":""}:${c}`;if(l===0&&i){if(i===t1&&e.length>1){const h=e.findIndex(m=>m.color==="light"),d=e.findIndex(m=>m.color==="dark");if(h===-1||d===-1)throw new nr('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const f=ua(t[h][a],r[h])||"inherit",p=ua(t[d][a],r[d])||"inherit";return`light-dark(${f}, ${p});${u}`}return c}return s==="css-vars"?u:null}).filter(o=>!!o).join(";")}function e0(e,t,r,n={meta:{},options:r,codeToHast:(i,a)=>e0(e,i,a),codeToTokens:(i,a)=>Ju(e,i,a)}){let i=t;for(const p of Zu(r))i=p.preprocess?.call(n,i,r)||i;let{tokens:a,fg:s,bg:o,themeName:l,rootStyle:c,grammarState:u}=Ju(e,i,r);const{mergeWhitespaces:h=!0,mergeSameStyleTokens:d=!1}=r;h===!0?a=Zz(a):h==="never"&&(a=Jz(a)),d&&(a=eH(a));const f={...n,get source(){return i}};for(const p of Zu(r))a=p.tokens?.call(f,a)||a;return Qz(a,{...r,fg:s,bg:o,themeName:l,rootStyle:r.rootStyle===!1?!1:r.rootStyle??c},f,u)}function Qz(e,t,r,n=Ul(e)){const i=Zu(t),a=[],s={type:"root",children:[]},{structure:o="classic",tabindex:l="0"}=t,c={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?c.style=t.rootStyle:c.style=`background-color:${t.bg};color:${t.fg}`),l!==!1&&l!=null&&(c.tabindex=l.toString());for(const[m,b]of Object.entries(t.meta||{}))m.startsWith("_")||(c[m]=b);let u={type:"element",tagName:"pre",properties:c,children:[],data:t.data},h={type:"element",tagName:"code",properties:{},children:a};const d=[],f={...r,structure:o,addClassToHast:j5,get source(){return r.source},get tokens(){return e},get options(){return t},get root(){return s},get pre(){return u},get code(){return h},get lines(){return d}};if(e.forEach((m,b)=>{b&&(o==="inline"?s.children.push({type:"element",tagName:"br",properties:{},children:[]}):o==="classic"&&a.push({type:"text",value:`
|
|
124
|
+
`}));let y={type:"element",tagName:"span",properties:{class:"line"},children:[]},v=0;for(const T of m){let A={type:"element",tagName:"span",properties:{...T.htmlAttrs},children:[{type:"text",value:T.content}]};const E=Yf(T.htmlStyle||Qu(T));E&&(A.properties.style=E);for(const S of i)A=S?.span?.call(f,A,b+1,v,y,T)||A;o==="inline"?s.children.push(A):o==="classic"&&y.children.push(A),v+=T.content.length}if(o==="classic"){for(const T of i)y=T?.line?.call(f,y,b+1)||y;d.push(y),a.push(y)}else o==="inline"&&d.push(y)}),o==="classic"){for(const m of i)h=m?.code?.call(f,h)||h;u.children.push(h);for(const m of i)u=m?.pre?.call(f,u)||u;s.children.push(u)}else if(o==="inline"){const m=[];let b={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const T of s.children)T.type==="element"&&T.tagName==="br"?(m.push(b),b={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(T.type==="element"||T.type==="text")&&b.children.push(T);m.push(b);let v={type:"element",tagName:"code",properties:{},children:m};for(const T of i)v=T?.code?.call(f,v)||v;s.children=[];for(let T=0;T<v.children.length;T++){T>0&&s.children.push({type:"element",tagName:"br",properties:{},children:[]});const A=v.children[T];A.type==="element"&&s.children.push(...A.children)}}let p=s;for(const m of i)p=m?.root?.call(f,p)||p;return n&&sh(p,n),p}function Zz(e){return e.map(t=>{const r=[];let n="",i;return t.forEach((a,s)=>{const l=!(a.fontStyle&&(a.fontStyle&Mr.Underline||a.fontStyle&Mr.Strikethrough));l&&a.content.match(/^\s+$/)&&t[s+1]?(i===void 0&&(i=a.offset),n+=a.content):n?(l?r.push({...a,offset:i,content:n+a.content}):r.push({content:n,offset:i},a),i=void 0,n=""):r.push(a)}),r})}function Jz(e){return e.map(t=>t.flatMap(r=>{if(r.content.match(/^\s+$/))return r;const n=r.content.match(/^(\s*)(.*?)(\s*)$/);if(!n)return r;const[,i,a,s]=n;if(!i&&!s)return r;const o=[{...r,offset:r.offset+i.length,content:a}];return i&&o.unshift({content:i,offset:r.offset}),s&&o.push({content:s,offset:r.offset+i.length+a.length}),o}))}function eH(e){return e.map(t=>{const r=[];for(const n of t){if(r.length===0){r.push({...n});continue}const i=r[r.length-1],a=Yf(i.htmlStyle||Qu(i)),s=Yf(n.htmlStyle||Qu(n)),o=i.fontStyle&&(i.fontStyle&Mr.Underline||i.fontStyle&Mr.Strikethrough),l=n.fontStyle&&(n.fontStyle&Mr.Underline||n.fontStyle&Mr.Strikethrough);!o&&!l&&a===s?i.content+=n.content:r.push({...n})}return r})}const tH=kz;function rH(e,t,r){const n={meta:{},options:r,codeToHast:(a,s)=>e0(e,a,s),codeToTokens:(a,s)=>Ju(e,a,s)};let i=tH(e0(e,t,r,n));for(const a of Zu(r))i=a.postprocess?.call(n,i,r)||i;return i}const Pb={light:"#333333",dark:"#bbbbbb"},Fb={light:"#fffffe",dark:"#1e1e1e"},$b="__shiki_resolved";function i1(e){if(e?.[$b])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:r,fg:n}=t;if(!r||!n){const o=t.settings?t.settings.find(l=>!l.name&&!l.scope):void 0;o?.settings?.foreground&&(n=o.settings.foreground),o?.settings?.background&&(r=o.settings.background),!n&&t?.colors?.["editor.foreground"]&&(n=t.colors["editor.foreground"]),!r&&t?.colors?.["editor.background"]&&(r=t.colors["editor.background"]),n||(n=t.type==="light"?Pb.light:Pb.dark),r||(r=t.type==="light"?Fb.light:Fb.dark),t.fg=n,t.bg=r}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0;const a=new Map;function s(o){if(a.has(o))return a.get(o);i+=1;const l=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${l}`]?s(o):(a.set(o,l),l)}t.settings=t.settings.map(o=>{const l=o.settings?.foreground&&!o.settings.foreground.startsWith("#"),c=o.settings?.background&&!o.settings.background.startsWith("#");if(!l&&!c)return o;const u={...o,settings:{...o.settings}};if(l){const h=s(o.settings.foreground);t.colorReplacements[h]=o.settings.foreground,u.settings.foreground=h}if(c){const h=s(o.settings.background);t.colorReplacements[h]=o.settings.background,u.settings.background=h}return u});for(const o of Object.keys(t.colors||{}))if((o==="editor.foreground"||o==="editor.background"||o.startsWith("terminal.ansi"))&&!t.colors[o]?.startsWith("#")){const l=s(t.colors[o]);t.colorReplacements[l]=t.colors[o],t.colors[o]=l}return Object.defineProperty(t,$b,{enumerable:!1,writable:!1,value:!0}),t}async function Y5(e){return Array.from(new Set((await Promise.all(e.filter(t=>!H5(t)).map(async t=>await z5(t).then(r=>Array.isArray(r)?r:[r])))).flat()))}async function V5(e){return(await Promise.all(e.map(async r=>q5(r)?null:i1(await z5(r))))).filter(r=>!!r)}let nH=3;function iH(e,t=3){t>nH||console.trace(`[SHIKI DEPRECATE]: ${e}`)}let Ms=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function X5(e,t){if(!t)return e;if(t[e]){const r=new Set([e]);for(;t[e];){if(e=t[e],r.has(e))throw new Ms(`Circular alias \`${Array.from(r).join(" -> ")} -> ${e}\``);r.add(e)}}return e}class aH extends k${constructor(t,r,n,i={}){super(t),this._resolver=t,this._themes=r,this._langs=n,this._alias=i,this._themes.map(a=>this.loadTheme(a)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const r=i1(t);return r.name&&(this._resolvedThemes.set(r.name,r),this._loadedThemesCache=null),r}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let r=this._textmateThemeCache.get(t);r||(r=Wu.createFromRawTheme(t),this._textmateThemeCache.set(t,r)),this._syncRegistry.setTheme(r)}getGrammar(t){return t=X5(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const r=new Set([...this._langMap.values()].filter(a=>a.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);const n={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const i=this.loadGrammarWithConfiguration(t.scopeName,1,n);if(i.name=t.name,this._resolvedGrammars.set(t.name,i),t.aliases&&t.aliases.forEach(a=>{this._alias[a]=t.name}),this._loadedLanguagesCache=null,r.size)for(const a of r)this._resolvedGrammars.delete(a.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(a.scopeName),this._syncRegistry?._grammars?.delete(a.scopeName),this.loadLanguage(this._langMap.get(a.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const i of t)this.resolveEmbeddedLanguages(i);const r=Array.from(this._langGraph.entries()),n=r.filter(([i,a])=>!a);if(n.length){const i=r.filter(([a,s])=>s?(s.embeddedLanguages||s.embeddedLangs)?.some(l=>n.map(([c])=>c).includes(l)):!1).filter(a=>!n.includes(a));throw new Ms(`Missing languages ${n.map(([a])=>`\`${a}\``).join(", ")}, required by ${i.map(([a])=>`\`${a}\``).join(", ")}`)}for(const[i,a]of r)this._resolver.addLanguage(a);for(const[i,a]of r)this.loadLanguage(a)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);const r=t.embeddedLanguages??t.embeddedLangs;if(r)for(const n of r)this._langGraph.set(n,this._langMap.get(n))}}class sH{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,r){this._onigLib={createOnigScanner:n=>t.createScanner(n),createOnigString:n=>t.createString(n)},r.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(r=>{this._langs.set(r,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(r=>{this._injections.get(r)||this._injections.set(r,[]),this._injections.get(r).push(t.scopeName)})}getInjections(t){const r=t.split(".");let n=[];for(let i=1;i<=r.length;i++){const a=r.slice(0,i).join(".");n=[...n,...this._injections.get(a)||[]]}return n}}let Ho=0;function oH(e){Ho+=1,e.warnings!==!1&&Ho>=10&&Ho%10===0&&console.warn(`[Shiki] ${Ho} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new Ms("`engine` option is required for synchronous mode");const r=(e.langs||[]).flat(1),n=(e.themes||[]).flat(1).map(i1),i=new sH(e.engine,r),a=new aH(i,n,r,e.langAlias);let s;function o(T){return X5(T,e.langAlias)}function l(T){y();const A=a.getGrammar(typeof T=="string"?T:T.name);if(!A)throw new Ms(`Language \`${T}\` not found, you may need to load it first`);return A}function c(T){if(T==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};y();const A=a.getTheme(T);if(!A)throw new Ms(`Theme \`${T}\` not found, you may need to load it first`);return A}function u(T){y();const A=c(T);s!==T&&(a.setTheme(A),s=T);const E=a.getColorMap();return{theme:A,colorMap:E}}function h(){return y(),a.getLoadedThemes()}function d(){return y(),a.getLoadedLanguages()}function f(...T){y(),a.loadLanguages(T.flat(1))}async function p(...T){return f(await Y5(T))}function m(...T){y();for(const A of T.flat(1))a.loadTheme(A)}async function b(...T){return y(),m(await V5(T))}function y(){if(t)throw new Ms("Shiki instance has been disposed")}function v(){t||(t=!0,a.dispose(),Ho-=1)}return{setTheme:u,getTheme:c,getLanguage:l,getLoadedThemes:h,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:b,loadThemeSync:m,dispose:v,[Symbol.dispose]:v}}async function lH(e){e.engine||iH("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,r,n]=await Promise.all([V5(e.themes||[]),Y5(e.langs||[]),e.engine]);return oH({...e,themes:t,langs:r,engine:n})}async function cH(e){const t=await lH(e);return{getLastGrammarState:(...r)=>Uz(t,...r),codeToTokensBase:(r,n)=>r1(t,r,n),codeToTokensWithThemes:(r,n)=>G5(t,r,n),codeToTokens:(r,n)=>Ju(t,r,n),codeToHast:(r,n)=>e0(t,r,n),codeToHtml:(r,n)=>rH(t,r,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function uH(e){const t=e.langs,r=e.themes,n=e.engine;async function i(a){function s(h){if(typeof h=="string"){if(h=a.langAlias?.[h]||h,H5(h))return[];const d=t[h];if(!d)throw new nr(`Language \`${h}\` is not included in this bundle. You may want to load it from external source.`);return d}return h}function o(h){if(q5(h))return"none";if(typeof h=="string"){const d=r[h];if(!d)throw new nr(`Theme \`${h}\` is not included in this bundle. You may want to load it from external source.`);return d}return h}const l=(a.themes??[]).map(h=>o(h)),c=(a.langs??[]).map(h=>s(h)),u=await cH({engine:a.engine??n(),...a,themes:l,langs:c});return{...u,loadLanguage(...h){return u.loadLanguage(...h.map(s))},loadTheme(...h){return u.loadTheme(...h.map(o))},getBundledLanguages(){return t},getBundledThemes(){return r}}}return i}const K5=[{id:"abap",name:"ABAP",import:(()=>Promise.resolve().then(()=>require("./abap-DV7Q1lGP.js")))},{id:"actionscript-3",name:"ActionScript",import:(()=>Promise.resolve().then(()=>require("./actionscript-3-DXOxkRa2.js")))},{id:"ada",name:"Ada",import:(()=>Promise.resolve().then(()=>require("./ada-D46EKCNf.js")))},{id:"angular-html",name:"Angular HTML",import:(()=>Promise.resolve().then(()=>require("./angular-html-JXV_E8IE.js")).then(e=>e.angularHtml))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>Promise.resolve().then(()=>require("./angular-ts-ul8EvQZm.js")))},{id:"apache",name:"Apache Conf",import:(()=>Promise.resolve().then(()=>require("./apache-DL1xuH1f.js")))},{id:"apex",name:"Apex",import:(()=>Promise.resolve().then(()=>require("./apex-6AM9YZbQ.js")))},{id:"apl",name:"APL",import:(()=>Promise.resolve().then(()=>require("./apl-BdW4yp7x.js")))},{id:"applescript",name:"AppleScript",import:(()=>Promise.resolve().then(()=>require("./applescript-COilsSrZ.js")))},{id:"ara",name:"Ara",import:(()=>Promise.resolve().then(()=>require("./ara-B6Lpq1YJ.js")))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>Promise.resolve().then(()=>require("./asciidoc-DcKqW72n.js")))},{id:"asm",name:"Assembly",import:(()=>Promise.resolve().then(()=>require("./asm-DYMFy-sD.js")))},{id:"astro",name:"Astro",import:(()=>Promise.resolve().then(()=>require("./astro-BAqad-WM.js")))},{id:"awk",name:"AWK",import:(()=>Promise.resolve().then(()=>require("./awk-IEszImW6.js")))},{id:"ballerina",name:"Ballerina",import:(()=>Promise.resolve().then(()=>require("./ballerina-Dr6dU4hP.js")))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>Promise.resolve().then(()=>require("./bat-DGkUhhn2.js")))},{id:"beancount",name:"Beancount",import:(()=>Promise.resolve().then(()=>require("./beancount-Bv1Sweoy.js")))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>Promise.resolve().then(()=>require("./berry-DEMs4LK_.js")))},{id:"bibtex",name:"BibTeX",import:(()=>Promise.resolve().then(()=>require("./bibtex-BgA36Z3k.js")))},{id:"bicep",name:"Bicep",import:(()=>Promise.resolve().then(()=>require("./bicep-DL0zb-7W.js")))},{id:"blade",name:"Blade",import:(()=>Promise.resolve().then(()=>require("./blade-CgjUlvXO.js")))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>Promise.resolve().then(()=>require("./bsl-MeEzPwnu.js")))},{id:"c",name:"C",import:(()=>Promise.resolve().then(()=>require("./c-CtlmKnPF.js")))},{id:"c3",name:"C3",import:(()=>Promise.resolve().then(()=>require("./c3-DtfRRWXN.js")))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>Promise.resolve().then(()=>require("./cadence-DcbmM5v3.js")))},{id:"cairo",name:"Cairo",import:(()=>Promise.resolve().then(()=>require("./cairo-Bl3vCTfQ.js")))},{id:"clarity",name:"Clarity",import:(()=>Promise.resolve().then(()=>require("./clarity-gPuvqtpF.js")))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>Promise.resolve().then(()=>require("./clojure-OUsr1SUl.js")))},{id:"cmake",name:"CMake",import:(()=>Promise.resolve().then(()=>require("./cmake-jM6P58qY.js")))},{id:"cobol",name:"COBOL",import:(()=>Promise.resolve().then(()=>require("./cobol-DReJOyN2.js")))},{id:"codeowners",name:"CODEOWNERS",import:(()=>Promise.resolve().then(()=>require("./codeowners-QhPK6lIJ.js")))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>Promise.resolve().then(()=>require("./codeql-D9-TdUN8.js")))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>Promise.resolve().then(()=>require("./coffee-CUyQUc3M.js")))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>Promise.resolve().then(()=>require("./common-lisp-C77gR-8i.js")))},{id:"coq",name:"Coq",import:(()=>Promise.resolve().then(()=>require("./coq-vlPdR5hP.js")))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>Promise.resolve().then(()=>require("./cpp-ChNdME6I.js")))},{id:"crystal",name:"Crystal",import:(()=>Promise.resolve().then(()=>require("./crystal-CVTji_sR.js")))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>Promise.resolve().then(()=>require("./csharp-BUkAIRXW.js")))},{id:"css",name:"CSS",import:(()=>Promise.resolve().then(()=>require("./css-Do0mp2lm.js")))},{id:"csv",name:"CSV",import:(()=>Promise.resolve().then(()=>require("./csv-DiEdJzSJ.js")))},{id:"cue",name:"CUE",import:(()=>Promise.resolve().then(()=>require("./cue-D1vJRJEx.js")))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>Promise.resolve().then(()=>require("./cypher-atSM3NsM.js")))},{id:"d",name:"D",import:(()=>Promise.resolve().then(()=>require("./d-2qe3NhmZ.js")))},{id:"dart",name:"Dart",import:(()=>Promise.resolve().then(()=>require("./dart-Ds0_0fwe.js")))},{id:"dax",name:"DAX",import:(()=>Promise.resolve().then(()=>require("./dax-DbkQa40E.js")))},{id:"desktop",name:"Desktop",import:(()=>Promise.resolve().then(()=>require("./desktop-tn3MFXCZ.js")))},{id:"diff",name:"Diff",import:(()=>Promise.resolve().then(()=>require("./diff-CA31fCOg.js")))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>Promise.resolve().then(()=>require("./docker-zJpMwmYa.js")))},{id:"dotenv",name:"dotEnv",import:(()=>Promise.resolve().then(()=>require("./dotenv-DpcNCNek.js")))},{id:"dream-maker",name:"Dream Maker",import:(()=>Promise.resolve().then(()=>require("./dream-maker-BkijXDkm.js")))},{id:"edge",name:"Edge",import:(()=>Promise.resolve().then(()=>require("./edge-B28yp_Zk.js")))},{id:"elixir",name:"Elixir",import:(()=>Promise.resolve().then(()=>require("./elixir-D7-1KNL2.js")))},{id:"elm",name:"Elm",import:(()=>Promise.resolve().then(()=>require("./elm-BkJa-nJb.js")))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>Promise.resolve().then(()=>require("./emacs-lisp-C1UCIjUO.js")))},{id:"erb",name:"ERB",import:(()=>Promise.resolve().then(()=>require("./erb-DJ1tHjRo.js")))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>Promise.resolve().then(()=>require("./erlang-DztDLzIS.js")))},{id:"fennel",name:"Fennel",import:(()=>Promise.resolve().then(()=>require("./fennel-Bz9-EMMc.js")))},{id:"fish",name:"Fish",import:(()=>Promise.resolve().then(()=>require("./fish-DwmQKRZi.js")))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>Promise.resolve().then(()=>require("./fluent-CJtpNuaO.js")))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>Promise.resolve().then(()=>require("./fortran-fixed-form-CM5372im.js")))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>Promise.resolve().then(()=>require("./fortran-free-form-Cs4ztolN.js")))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>Promise.resolve().then(()=>require("./fsharp-C8GKou_e.js")))},{id:"gdresource",name:"GDResource",import:(()=>Promise.resolve().then(()=>require("./gdresource-Bx-5U3z2.js")))},{id:"gdscript",name:"GDScript",import:(()=>Promise.resolve().then(()=>require("./gdscript-DSegQKMB.js")))},{id:"gdshader",name:"GDShader",import:(()=>Promise.resolve().then(()=>require("./gdshader-DsmqQl4t.js")))},{id:"genie",name:"Genie",import:(()=>Promise.resolve().then(()=>require("./genie-Dy2rU8CF.js")))},{id:"gherkin",name:"Gherkin",import:(()=>Promise.resolve().then(()=>require("./gherkin-BmiEVBJ1.js")))},{id:"git-commit",name:"Git Commit Message",import:(()=>Promise.resolve().then(()=>require("./git-commit-B0NDtut1.js")))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>Promise.resolve().then(()=>require("./git-rebase-lJEbayNx.js")))},{id:"gleam",name:"Gleam",import:(()=>Promise.resolve().then(()=>require("./gleam-DHVuTCr7.js")))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>Promise.resolve().then(()=>require("./glimmer-js-CxLlFUHs.js")))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>Promise.resolve().then(()=>require("./glimmer-ts-C8Spe63v.js")))},{id:"glsl",name:"GLSL",import:(()=>Promise.resolve().then(()=>require("./glsl-BcHRsW10.js")))},{id:"gn",name:"GN",import:(()=>Promise.resolve().then(()=>require("./gn-0WGnAyGi.js")))},{id:"gnuplot",name:"Gnuplot",import:(()=>Promise.resolve().then(()=>require("./gnuplot-CDPKvI9X.js")))},{id:"go",name:"Go",import:(()=>Promise.resolve().then(()=>require("./go-epHseFUa.js")))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>Promise.resolve().then(()=>require("./graphql-BO3Jc_L3.js")))},{id:"groovy",name:"Groovy",import:(()=>Promise.resolve().then(()=>require("./groovy-D7VuDBXz.js")))},{id:"hack",name:"Hack",import:(()=>Promise.resolve().then(()=>require("./hack-Dr4YFULU.js")))},{id:"haml",name:"Ruby Haml",import:(()=>Promise.resolve().then(()=>require("./haml-DjC-8E5i.js")))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>Promise.resolve().then(()=>require("./handlebars-vZrL3oRU.js")))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>Promise.resolve().then(()=>require("./haskell-BShesV2P.js")))},{id:"haxe",name:"Haxe",import:(()=>Promise.resolve().then(()=>require("./haxe-Bo5XuRS0.js")))},{id:"hcl",name:"HashiCorp HCL",import:(()=>Promise.resolve().then(()=>require("./hcl-CrZnvm-1.js")))},{id:"hjson",name:"Hjson",import:(()=>Promise.resolve().then(()=>require("./hjson-CEESwTUP.js")))},{id:"hlsl",name:"HLSL",import:(()=>Promise.resolve().then(()=>require("./hlsl-CyvYRIb9.js")))},{id:"html",name:"HTML",import:(()=>Promise.resolve().then(()=>require("./html-Cub4lUvx.js")))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>Promise.resolve().then(()=>require("./html-derivative-DbGZSkO4.js")))},{id:"http",name:"HTTP",import:(()=>Promise.resolve().then(()=>require("./http-J4eraUTU.js")))},{id:"hurl",name:"Hurl",import:(()=>Promise.resolve().then(()=>require("./hurl-1DL8OH_r.js")))},{id:"hxml",name:"HXML",import:(()=>Promise.resolve().then(()=>require("./hxml-DrnMPCCd.js")))},{id:"hy",name:"Hy",import:(()=>Promise.resolve().then(()=>require("./hy-a1E2Ed6P.js")))},{id:"imba",name:"Imba",import:(()=>Promise.resolve().then(()=>require("./imba-CR1Q6r17.js")))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>Promise.resolve().then(()=>require("./ini-Dpu3Xy2p.js")))},{id:"java",name:"Java",import:(()=>Promise.resolve().then(()=>require("./java--6gf61wy.js")))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>Promise.resolve().then(()=>require("./javascript-DgmXW4Ha.js")))},{id:"jinja",name:"Jinja",import:(()=>Promise.resolve().then(()=>require("./jinja-CJxRwHVK.js")))},{id:"jison",name:"Jison",import:(()=>Promise.resolve().then(()=>require("./jison-CH6PZfPk.js")))},{id:"json",name:"JSON",import:(()=>Promise.resolve().then(()=>require("./json-YkPizm35.js")))},{id:"json5",name:"JSON5",import:(()=>Promise.resolve().then(()=>require("./json5-CCgFZiQn.js")))},{id:"jsonc",name:"JSON with Comments",import:(()=>Promise.resolve().then(()=>require("./jsonc-CKPHIcXW.js")))},{id:"jsonl",name:"JSON Lines",import:(()=>Promise.resolve().then(()=>require("./jsonl-Dq56Hab-.js")))},{id:"jsonnet",name:"Jsonnet",import:(()=>Promise.resolve().then(()=>require("./jsonnet-Csh7E68F.js")))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>Promise.resolve().then(()=>require("./jssm-D0M9iZPY.js")))},{id:"jsx",name:"JSX",import:(()=>Promise.resolve().then(()=>require("./jsx-DLX6UGgg.js")))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>Promise.resolve().then(()=>require("./julia-DOO7NZhy.js")))},{id:"kdl",name:"KDL",import:(()=>Promise.resolve().then(()=>require("./kdl-CDG1p2Qi.js")))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>Promise.resolve().then(()=>require("./kotlin-BHZjvNqT.js")))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>Promise.resolve().then(()=>require("./kusto-C6kOQWT0.js")))},{id:"latex",name:"LaTeX",import:(()=>Promise.resolve().then(()=>require("./latex-BkUAME40.js")))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>Promise.resolve().then(()=>require("./lean-DvVQmxVK.js")))},{id:"less",name:"Less",import:(()=>Promise.resolve().then(()=>require("./less-Dtg8mm6P.js")))},{id:"liquid",name:"Liquid",import:(()=>Promise.resolve().then(()=>require("./liquid-D2h0MxA-.js")))},{id:"llvm",name:"LLVM IR",import:(()=>Promise.resolve().then(()=>require("./llvm-DcRvQ_r8.js")))},{id:"log",name:"Log file",import:(()=>Promise.resolve().then(()=>require("./log-CjTZ0gSB.js")))},{id:"logo",name:"Logo",import:(()=>Promise.resolve().then(()=>require("./logo-BAktp_5i.js")))},{id:"lua",name:"Lua",import:(()=>Promise.resolve().then(()=>require("./lua-7_7huFMq.js")))},{id:"luau",name:"Luau",import:(()=>Promise.resolve().then(()=>require("./luau-BMXmwtw0.js")))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>Promise.resolve().then(()=>require("./make-NcdIe21U.js")))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>Promise.resolve().then(()=>require("./markdown-Byu9Sdmq.js")))},{id:"marko",name:"Marko",import:(()=>Promise.resolve().then(()=>require("./marko-BUUK5Bjn.js")))},{id:"matlab",name:"MATLAB",import:(()=>Promise.resolve().then(()=>require("./matlab-CHTOL9Kx.js")))},{id:"mdc",name:"MDC",import:(()=>Promise.resolve().then(()=>require("./mdc-DYb1IR0A.js")))},{id:"mdx",name:"MDX",import:(()=>Promise.resolve().then(()=>require("./mdx-CjwI68TB.js")))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>Promise.resolve().then(()=>require("./mermaid-BXSwQYo5.js")))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>Promise.resolve().then(()=>require("./mipsasm-BSlRcFIy.js")))},{id:"mojo",name:"Mojo",import:(()=>Promise.resolve().then(()=>require("./mojo-D2tXKFxS.js")))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>Promise.resolve().then(()=>require("./moonbit-BweIWWUc.js")))},{id:"move",name:"Move",import:(()=>Promise.resolve().then(()=>require("./move-Bm1vlCWg.js")))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>Promise.resolve().then(()=>require("./narrat-CBeKHgTl.js")))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>Promise.resolve().then(()=>require("./nextflow-CM8Ed358.js")))},{id:"nginx",name:"Nginx",import:(()=>Promise.resolve().then(()=>require("./nginx-F8v4LkHE.js")))},{id:"nim",name:"Nim",import:(()=>Promise.resolve().then(()=>require("./nim-Bz82v_0I.js")))},{id:"nix",name:"Nix",import:(()=>Promise.resolve().then(()=>require("./nix-BOiBJUDf.js")))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>Promise.resolve().then(()=>require("./nushell-nGrB_wpI.js")))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>Promise.resolve().then(()=>require("./objective-c-RjkWwFge.js")))},{id:"objective-cpp",name:"Objective-C++",import:(()=>Promise.resolve().then(()=>require("./objective-cpp-HnfhWwRe.js")))},{id:"ocaml",name:"OCaml",import:(()=>Promise.resolve().then(()=>require("./ocaml-Cx8ewW_A.js")))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>Promise.resolve().then(()=>require("./openscad-D7eUrVPv.js")))},{id:"pascal",name:"Pascal",import:(()=>Promise.resolve().then(()=>require("./pascal-DBu9vQ2o.js")))},{id:"perl",name:"Perl",import:(()=>Promise.resolve().then(()=>require("./perl-BGWXz6Sf.js")))},{id:"php",name:"PHP",import:(()=>Promise.resolve().then(()=>require("./php-BMqBbP55.js")))},{id:"pkl",name:"Pkl",import:(()=>Promise.resolve().then(()=>require("./pkl-Dvyry4Rm.js")))},{id:"plsql",name:"PL/SQL",import:(()=>Promise.resolve().then(()=>require("./plsql-IJkoPJ9P.js")))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>Promise.resolve().then(()=>require("./po-Rhu6MvnX.js")))},{id:"polar",name:"Polar",import:(()=>Promise.resolve().then(()=>require("./polar-BtWqSUq2.js")))},{id:"postcss",name:"PostCSS",import:(()=>Promise.resolve().then(()=>require("./postcss-Dh97DcaJ.js")))},{id:"powerquery",name:"PowerQuery",import:(()=>Promise.resolve().then(()=>require("./powerquery-BGL6VIw7.js")))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>Promise.resolve().then(()=>require("./powershell-BiEPMjy-.js")))},{id:"prisma",name:"Prisma",import:(()=>Promise.resolve().then(()=>require("./prisma-Dp473sn0.js")))},{id:"prolog",name:"Prolog",import:(()=>Promise.resolve().then(()=>require("./prolog-N1U-3UeF.js")))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>Promise.resolve().then(()=>require("./proto-DMjUErYA.js")))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>Promise.resolve().then(()=>require("./pug-bTUJx3Z-.js")))},{id:"puppet",name:"Puppet",import:(()=>Promise.resolve().then(()=>require("./puppet-cDQP_ZC_.js")))},{id:"purescript",name:"PureScript",import:(()=>Promise.resolve().then(()=>require("./purescript-DMxb59gF.js")))},{id:"python",name:"Python",aliases:["py"],import:(()=>Promise.resolve().then(()=>require("./python-s9jfVbew.js")))},{id:"qml",name:"QML",import:(()=>Promise.resolve().then(()=>require("./qml-CDzfIfOz.js")))},{id:"qmldir",name:"QML Directory",import:(()=>Promise.resolve().then(()=>require("./qmldir-DNF9H2ir.js")))},{id:"qss",name:"Qt Style Sheets",import:(()=>Promise.resolve().then(()=>require("./qss-DwA_oiAM.js")))},{id:"r",name:"R",import:(()=>Promise.resolve().then(()=>require("./r-DAqIyZhh.js")))},{id:"racket",name:"Racket",import:(()=>Promise.resolve().then(()=>require("./racket-D4laxZit.js")))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>Promise.resolve().then(()=>require("./raku-DHySPsLw.js")))},{id:"razor",name:"ASP.NET Razor",import:(()=>Promise.resolve().then(()=>require("./razor-DqXh8oK-.js")))},{id:"reg",name:"Windows Registry Script",import:(()=>Promise.resolve().then(()=>require("./reg-CevkCKuZ.js")))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>Promise.resolve().then(()=>require("./regexp-DabTWNLE.js")))},{id:"rel",name:"Rel",import:(()=>Promise.resolve().then(()=>require("./rel-BS5APza7.js")))},{id:"riscv",name:"RISC-V",import:(()=>Promise.resolve().then(()=>require("./riscv-BnGFr6V7.js")))},{id:"rosmsg",name:"ROS Interface",import:(()=>Promise.resolve().then(()=>require("./rosmsg-C7VSFzUC.js")))},{id:"rst",name:"reStructuredText",import:(()=>Promise.resolve().then(()=>require("./rst-CmsHU1oq.js")))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>Promise.resolve().then(()=>require("./ruby-DZp7Kthb.js")))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>Promise.resolve().then(()=>require("./rust-CNeTMPbB.js")))},{id:"sas",name:"SAS",import:(()=>Promise.resolve().then(()=>require("./sas-Du-NqkIN.js")))},{id:"sass",name:"Sass",import:(()=>Promise.resolve().then(()=>require("./sass-vyo-bUwh.js")))},{id:"scala",name:"Scala",import:(()=>Promise.resolve().then(()=>require("./scala-ZSekD-8-.js")))},{id:"scheme",name:"Scheme",import:(()=>Promise.resolve().then(()=>require("./scheme-vM0LdD-_.js")))},{id:"scss",name:"SCSS",import:(()=>Promise.resolve().then(()=>require("./scss-C9Hu3bmX.js")))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>Promise.resolve().then(()=>require("./sdbl-DeWT5r4i.js")))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>Promise.resolve().then(()=>require("./shaderlab-DFNHwaQA.js")))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>Promise.resolve().then(()=>require("./shellscript-DYWjN7qW.js")))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>Promise.resolve().then(()=>require("./shellsession-5qZnCWz3.js")))},{id:"smalltalk",name:"Smalltalk",import:(()=>Promise.resolve().then(()=>require("./smalltalk-BNs6hxu4.js")))},{id:"solidity",name:"Solidity",import:(()=>Promise.resolve().then(()=>require("./solidity-uQuzgchP.js")))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>Promise.resolve().then(()=>require("./soy-BztBK6ie.js")))},{id:"sparql",name:"SPARQL",import:(()=>Promise.resolve().then(()=>require("./sparql-Ds57h-sT.js")))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>Promise.resolve().then(()=>require("./splunk-CWPivao_.js")))},{id:"sql",name:"SQL",import:(()=>Promise.resolve().then(()=>require("./sql-DhUUVgH1.js")))},{id:"ssh-config",name:"SSH Config",import:(()=>Promise.resolve().then(()=>require("./ssh-config-B93wBIBa.js")))},{id:"stata",name:"Stata",import:(()=>Promise.resolve().then(()=>require("./stata-B-erP_01.js")))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>Promise.resolve().then(()=>require("./stylus-B64Bt0D4.js")))},{id:"svelte",name:"Svelte",import:(()=>Promise.resolve().then(()=>require("./svelte-CPZ3YGr5.js")))},{id:"swift",name:"Swift",import:(()=>Promise.resolve().then(()=>require("./swift-BMbGdc3j.js")))},{id:"system-verilog",name:"SystemVerilog",import:(()=>Promise.resolve().then(()=>require("./system-verilog-BFclLo9e.js")))},{id:"systemd",name:"Systemd Units",import:(()=>Promise.resolve().then(()=>require("./systemd-Dtw7P4tb.js")))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>Promise.resolve().then(()=>require("./talonscript-D8SvZJVc.js")))},{id:"tasl",name:"Tasl",import:(()=>Promise.resolve().then(()=>require("./tasl--DC4oX-L.js")))},{id:"tcl",name:"Tcl",import:(()=>Promise.resolve().then(()=>require("./tcl-0Q0H86Yn.js")))},{id:"templ",name:"Templ",import:(()=>Promise.resolve().then(()=>require("./templ-DADdpFDY.js")))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>Promise.resolve().then(()=>require("./terraform-C0RDrmWi.js")))},{id:"tex",name:"TeX",import:(()=>Promise.resolve().then(()=>require("./tex-3QW4GAT7.js")))},{id:"toml",name:"TOML",import:(()=>Promise.resolve().then(()=>require("./toml-Q64DoSvG.js")))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>Promise.resolve().then(()=>require("./ts-tags-DW4c6MY1.js")))},{id:"tsv",name:"TSV",import:(()=>Promise.resolve().then(()=>require("./tsv-DqNGnuVj.js")))},{id:"tsx",name:"TSX",import:(()=>Promise.resolve().then(()=>require("./tsx-DIpfUf9u.js")))},{id:"turtle",name:"Turtle",import:(()=>Promise.resolve().then(()=>require("./turtle-DipIidr5.js")))},{id:"twig",name:"Twig",import:(()=>Promise.resolve().then(()=>require("./twig-DE2P6STQ.js")))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>Promise.resolve().then(()=>require("./typescript-b48wo4zk.js")))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>Promise.resolve().then(()=>require("./typespec-DqXOE4_L.js")))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>Promise.resolve().then(()=>require("./typst-Cqq4j4V-.js")))},{id:"v",name:"V",import:(()=>Promise.resolve().then(()=>require("./v-81C2s01-.js")))},{id:"vala",name:"Vala",import:(()=>Promise.resolve().then(()=>require("./vala-CsAYdCD2.js")))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>Promise.resolve().then(()=>require("./vb-AiTMb16X.js")))},{id:"verilog",name:"Verilog",import:(()=>Promise.resolve().then(()=>require("./verilog-AMohXZcN.js")))},{id:"vhdl",name:"VHDL",import:(()=>Promise.resolve().then(()=>require("./vhdl-DIdR1NA5.js")))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>Promise.resolve().then(()=>require("./viml-D01eKeA4.js")))},{id:"vue",name:"Vue",import:(()=>Promise.resolve().then(()=>require("./vue-BHXwUkEL.js")))},{id:"vue-html",name:"Vue HTML",import:(()=>Promise.resolve().then(()=>require("./vue-html-B4znhqmy.js")))},{id:"vue-vine",name:"Vue Vine",import:(()=>Promise.resolve().then(()=>require("./vue-vine-CHNjSzYC.js")))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>Promise.resolve().then(()=>require("./vyper-DTzyzn3a.js")))},{id:"wasm",name:"WebAssembly",import:(()=>Promise.resolve().then(()=>require("./wasm-Dp-QrJpp.js")))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>Promise.resolve().then(()=>require("./wenyan-CRNx8UP3.js")))},{id:"wgsl",name:"WGSL",import:(()=>Promise.resolve().then(()=>require("./wgsl-DF5qc9dd.js")))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>Promise.resolve().then(()=>require("./wikitext-D7uzEIfK.js")))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>Promise.resolve().then(()=>require("./wit-BjWgLsJj.js")))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>Promise.resolve().then(()=>require("./wolfram-BR4t3Ffc.js")))},{id:"xml",name:"XML",import:(()=>Promise.resolve().then(()=>require("./xml-Vhl3ZuN2.js")))},{id:"xsl",name:"XSL",import:(()=>Promise.resolve().then(()=>require("./xsl-B2ZJiKs2.js")))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>Promise.resolve().then(()=>require("./yaml-XVBmpKh-.js")))},{id:"zenscript",name:"ZenScript",import:(()=>Promise.resolve().then(()=>require("./zenscript-fNvwKexi.js")))},{id:"zig",name:"Zig",import:(()=>Promise.resolve().then(()=>require("./zig-BAyIAcWK.js")))}],hH=Object.fromEntries(K5.map(e=>[e.id,e.import])),dH=Object.fromEntries(K5.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),Q5={...hH,...dH},fH=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>Promise.resolve().then(()=>require("./andromeeda-DVDxRwp5.js")))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>Promise.resolve().then(()=>require("./aurora-x-C5IpmIOG.js")))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>Promise.resolve().then(()=>require("./ayu-dark-CDpQIJw4.js")))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>Promise.resolve().then(()=>require("./catppuccin-frappe-Bn4lgmUk.js")))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>Promise.resolve().then(()=>require("./catppuccin-latte-BPtsb8jD.js")))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>Promise.resolve().then(()=>require("./catppuccin-macchiato-BLfpQWhT.js")))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>Promise.resolve().then(()=>require("./catppuccin-mocha-COMta283.js")))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>Promise.resolve().then(()=>require("./dark-plus-Cd5emcYO.js")))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>Promise.resolve().then(()=>require("./dracula-BNgwAJ-d.js")))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>Promise.resolve().then(()=>require("./dracula-soft-BHZ7sHFu.js")))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>Promise.resolve().then(()=>require("./everforest-dark-_sBMomR1.js")))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>Promise.resolve().then(()=>require("./everforest-light-H0xoYxl0.js")))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>Promise.resolve().then(()=>require("./github-dark-BKL9xNgN.js")))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>Promise.resolve().then(()=>require("./github-dark-default-Dsv5MuSi.js")))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>Promise.resolve().then(()=>require("./github-dark-dimmed-CtB9hz8U.js")))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>Promise.resolve().then(()=>require("./github-dark-high-contrast-BqZVM-jF.js")))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>Promise.resolve().then(()=>require("./github-light-BFTOhCbz.js")))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>Promise.resolve().then(()=>require("./github-light-default-BZoWH9dH.js")))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>Promise.resolve().then(()=>require("./github-light-high-contrast-Ks3kPGJU.js")))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>Promise.resolve().then(()=>require("./gruvbox-dark-hard-CUGefKS6.js")))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>Promise.resolve().then(()=>require("./gruvbox-dark-medium-BoKPlKfz.js")))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>Promise.resolve().then(()=>require("./gruvbox-dark-soft-DSrhOWeL.js")))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>Promise.resolve().then(()=>require("./gruvbox-light-hard-De4IuseP.js")))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>Promise.resolve().then(()=>require("./gruvbox-light-medium-CzMY3IEJ.js")))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>Promise.resolve().then(()=>require("./gruvbox-light-soft-U4iAIpWZ.js")))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>Promise.resolve().then(()=>require("./houston-T57H3gQZ.js")))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>Promise.resolve().then(()=>require("./kanagawa-dragon-BJZF7xDr.js")))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>Promise.resolve().then(()=>require("./kanagawa-lotus-BhgzmRV4.js")))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>Promise.resolve().then(()=>require("./kanagawa-wave-BgJip59C.js")))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>Promise.resolve().then(()=>require("./laserwave--izBLY1I.js")))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>Promise.resolve().then(()=>require("./light-plus-B5D0le0o.js")))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>Promise.resolve().then(()=>require("./material-theme-Dj0-OyRN.js")))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>Promise.resolve().then(()=>require("./material-theme-darker-Dvfs29ir.js")))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>Promise.resolve().then(()=>require("./material-theme-lighter-EU3ZGl_r.js")))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>Promise.resolve().then(()=>require("./material-theme-ocean-px_3Pwqa.js")))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>Promise.resolve().then(()=>require("./material-theme-palenight-38jxvsGX.js")))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>Promise.resolve().then(()=>require("./min-dark-tt5o_I5e.js")))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>Promise.resolve().then(()=>require("./min-light-tmTHl_CQ.js")))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>Promise.resolve().then(()=>require("./monokai-DMIxv6MM.js")))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>Promise.resolve().then(()=>require("./night-owl-BN78kThQ.js")))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>Promise.resolve().then(()=>require("./nord-Ca5AGUWc.js")))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>Promise.resolve().then(()=>require("./one-dark-pro-C09VQHwB.js")))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>Promise.resolve().then(()=>require("./one-light-020-h_lv.js")))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>Promise.resolve().then(()=>require("./plastic-r5piqq-S.js")))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>Promise.resolve().then(()=>require("./poimandres-BLP3NNjc.js")))},{id:"red",displayName:"Red",type:"dark",import:(()=>Promise.resolve().then(()=>require("./red-BQGOv1D5.js")))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>Promise.resolve().then(()=>require("./rose-pine-CfBWm6WX.js")))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>Promise.resolve().then(()=>require("./rose-pine-dawn-CaZ5I2lt.js")))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>Promise.resolve().then(()=>require("./rose-pine-moon-Cql8LDLp.js")))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>Promise.resolve().then(()=>require("./slack-dark-akqwQ7ED.js")))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>Promise.resolve().then(()=>require("./slack-ochin-BoQQWmTv.js")))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>Promise.resolve().then(()=>require("./snazzy-light-D_IwRieF.js")))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>Promise.resolve().then(()=>require("./solarized-dark-gmm-WbDC.js")))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>Promise.resolve().then(()=>require("./solarized-light-DzcxRSZP.js")))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>Promise.resolve().then(()=>require("./synthwave-84-BBRLOmNT.js")))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>Promise.resolve().then(()=>require("./tokyo-night-GOhjzM5y.js")))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>Promise.resolve().then(()=>require("./vesper-B59Iw4gV.js")))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>Promise.resolve().then(()=>require("./vitesse-black-MF-1S1MG.js")))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>Promise.resolve().then(()=>require("./vitesse-dark-SIffJYSe.js")))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>Promise.resolve().then(()=>require("./vitesse-light-U63SkYGT.js")))}],pH=Object.fromEntries(fH.map(e=>[e.id,e.import]));class a1 extends Error{constructor(t){super(t),this.name="ShikiError"}}function mH(){return 2147483648}function gH(){return typeof performance<"u"?performance.now():Date.now()}const bH=(e,t)=>e+(t-e%t)%t;async function yH(e){let t,r;const n={};function i(f){r=f,n.HEAPU8=new Uint8Array(f),n.HEAPU32=new Uint32Array(f)}function a(f,p,m){n.HEAPU8.copyWithin(f,p,p+m)}function s(f){try{return t.grow(f-r.byteLength+65535>>>16),i(t.buffer),1}catch{}}function o(f){const p=n.HEAPU8.length;f=f>>>0;const m=mH();if(f>m)return!1;for(let b=1;b<=4;b*=2){let y=p*(1+.2/b);y=Math.min(y,f+100663296);const v=Math.min(m,bH(Math.max(f,y),65536));if(s(v))return!0}return!1}const l=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function c(f,p,m=1024){const b=p+m;let y=p;for(;f[y]&&!(y>=b);)++y;if(y-p>16&&f.buffer&&l)return l.decode(f.subarray(p,y));let v="";for(;p<y;){let T=f[p++];if(!(T&128)){v+=String.fromCharCode(T);continue}const A=f[p++]&63;if((T&224)===192){v+=String.fromCharCode((T&31)<<6|A);continue}const E=f[p++]&63;if((T&240)===224?T=(T&15)<<12|A<<6|E:T=(T&7)<<18|A<<12|E<<6|f[p++]&63,T<65536)v+=String.fromCharCode(T);else{const S=T-65536;v+=String.fromCharCode(55296|S>>10,56320|S&1023)}}return v}function u(f,p){return f?c(n.HEAPU8,f,p):""}const h={emscripten_get_now:gH,emscripten_memcpy_big:a,emscripten_resize_heap:o,fd_write:()=>0};async function d(){const p=await e({env:h,wasi_snapshot_preview1:h});t=p.memory,i(t.buffer),Object.assign(n,p),n.UTF8ToString=u}return await d(),n}var xH=Object.defineProperty,vH=(e,t,r)=>t in e?xH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,hr=(e,t,r)=>vH(e,typeof t!="symbol"?t+"":t,r);let br=null;function kH(e){throw new a1(e.UTF8ToString(e.getLastOnigError()))}class oh{constructor(t){hr(this,"utf16Length"),hr(this,"utf8Length"),hr(this,"utf16Value"),hr(this,"utf8Value"),hr(this,"utf16OffsetToUtf8"),hr(this,"utf8OffsetToUtf16");const r=t.length,n=oh._utf8ByteLength(t),i=n!==r,a=i?new Uint32Array(r+1):null;i&&(a[r]=n);const s=i?new Uint32Array(n+1):null;i&&(s[n]=r);const o=new Uint8Array(n);let l=0;for(let c=0;c<r;c++){const u=t.charCodeAt(c);let h=u,d=!1;if(u>=55296&&u<=56319&&c+1<r){const f=t.charCodeAt(c+1);f>=56320&&f<=57343&&(h=(u-55296<<10)+65536|f-56320,d=!0)}i&&(a[c]=l,d&&(a[c+1]=l),h<=127?s[l+0]=c:h<=2047?(s[l+0]=c,s[l+1]=c):h<=65535?(s[l+0]=c,s[l+1]=c,s[l+2]=c):(s[l+0]=c,s[l+1]=c,s[l+2]=c,s[l+3]=c)),h<=127?o[l++]=h:h<=2047?(o[l++]=192|(h&1984)>>>6,o[l++]=128|(h&63)>>>0):h<=65535?(o[l++]=224|(h&61440)>>>12,o[l++]=128|(h&4032)>>>6,o[l++]=128|(h&63)>>>0):(o[l++]=240|(h&1835008)>>>18,o[l++]=128|(h&258048)>>>12,o[l++]=128|(h&4032)>>>6,o[l++]=128|(h&63)>>>0),d&&c++}this.utf16Length=r,this.utf8Length=n,this.utf16Value=t,this.utf8Value=o,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=s}static _utf8ByteLength(t){let r=0;for(let n=0,i=t.length;n<i;n++){const a=t.charCodeAt(n);let s=a,o=!1;if(a>=55296&&a<=56319&&n+1<i){const l=t.charCodeAt(n+1);l>=56320&&l<=57343&&(s=(a-55296<<10)+65536|l-56320,o=!0)}s<=127?r+=1:s<=2047?r+=2:s<=65535?r+=3:r+=4,o&&n++}return r}createString(t){const r=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,r),r}}const lh=class Xn{constructor(t){if(hr(this,"id",++Xn.LAST_ID),hr(this,"_onigBinding"),hr(this,"content"),hr(this,"utf16Length"),hr(this,"utf8Length"),hr(this,"utf16OffsetToUtf8"),hr(this,"utf8OffsetToUtf16"),hr(this,"ptr"),!br)throw new a1("Must invoke loadWasm first.");this._onigBinding=br,this.content=t;const r=new oh(t);this.utf16Length=r.utf16Length,this.utf8Length=r.utf8Length,this.utf16OffsetToUtf8=r.utf16OffsetToUtf8,this.utf8OffsetToUtf16=r.utf8OffsetToUtf16,this.utf8Length<1e4&&!Xn._sharedPtrInUse?(Xn._sharedPtr||(Xn._sharedPtr=br.omalloc(1e4)),Xn._sharedPtrInUse=!0,br.HEAPU8.set(r.utf8Value,Xn._sharedPtr),this.ptr=Xn._sharedPtr):this.ptr=r.createString(br)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===Xn._sharedPtr?Xn._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};hr(lh,"LAST_ID",0);hr(lh,"_sharedPtr",0);hr(lh,"_sharedPtrInUse",!1);let Z5=lh;class wH{constructor(t){if(hr(this,"_onigBinding"),hr(this,"_ptr"),!br)throw new a1("Must invoke loadWasm first.");const r=[],n=[];for(let o=0,l=t.length;o<l;o++){const c=new oh(t[o]);r[o]=c.createString(br),n[o]=c.utf8Length}const i=br.omalloc(4*t.length);br.HEAPU32.set(r,i/4);const a=br.omalloc(4*t.length);br.HEAPU32.set(n,a/4);const s=br.createOnigScanner(i,a,t.length);for(let o=0,l=t.length;o<l;o++)br.ofree(r[o]);br.ofree(a),br.ofree(i),s===0&&kH(br),this._onigBinding=br,this._ptr=s}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,r,n){let i=0;if(typeof n=="number"&&(i=n),typeof t=="string"){t=new Z5(t);const a=this._findNextMatchSync(t,r,!1,i);return t.dispose(),a}return this._findNextMatchSync(t,r,!1,i)}_findNextMatchSync(t,r,n,i){const a=this._onigBinding,s=a.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(r),i);if(s===0)return null;const o=a.HEAPU32;let l=s/4;const c=o[l++],u=o[l++],h=[];for(let d=0;d<u;d++){const f=t.convertUtf8OffsetToUtf16(o[l++]),p=t.convertUtf8OffsetToUtf16(o[l++]);h[d]={start:f,end:p,length:p-f}}return{index:c,captureIndices:h}}}function TH(e){return typeof e.instantiator=="function"}function CH(e){return typeof e.default=="function"}function SH(e){return typeof e.data<"u"}function EH(e){return typeof Response<"u"&&e instanceof Response}function _H(e){return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let jc;function AH(e){if(jc)return jc;async function t(){br=await yH(async r=>{let n=e;return n=await n,typeof n=="function"&&(n=await n(r)),typeof n=="function"&&(n=await n(r)),TH(n)?n=await n.instantiator(r):CH(n)?n=await n.default(r):(SH(n)&&(n=n.data),EH(n)?typeof WebAssembly.instantiateStreaming=="function"?n=await NH(n)(r):n=await LH(n)(r):_H(n)?n=await Nd(n)(r):n instanceof WebAssembly.Module?n=await Nd(n)(r):"default"in n&&n.default instanceof WebAssembly.Module&&(n=await Nd(n.default)(r))),"instance"in n&&(n=n.instance),"exports"in n&&(n=n.exports),n})}return jc=t(),jc}function Nd(e){return t=>WebAssembly.instantiate(e,t)}function NH(e){return t=>WebAssembly.instantiateStreaming(e,t)}function LH(e){return async t=>{const r=await e.arrayBuffer();return WebAssembly.instantiate(r,t)}}async function MH(e){return e&&await AH(e),{createScanner(t){return new wH(t.map(r=>typeof r=="string"?r:r.source))},createString(t){return new Z5(t)}}}const IH=uH({langs:Q5,themes:pH,engine:()=>MH(Promise.resolve().then(()=>require("./wasm-Dw4u1m6u.js")))});var zb=new Set(Object.keys(Q5)),Ld=new Map,Md=new Map,ks=new Map,RH=(e,t)=>`${e}-${t[0]}-${t[1]}`,BH=(e,t,r)=>{let n=e.slice(0,100),i=e.length>100?e.slice(-100):"";return`${t}:${r[0]}:${r[1]}:${e.length}:${n}:${i}`},DH=(e,t)=>{let r=RH(e,t);if(Ld.has(r))return Ld.get(r);let n=IH({themes:t,langs:[e]});return Ld.set(r,n),n};function OH(e={}){var t;let r=(t=e.themes)!=null?t:["github-light","github-dark"];return{name:"shiki",type:"code-highlighter",supportsLanguage(n){return zb.has(n)},getSupportedLanguages(){return Array.from(zb)},getThemes(){return r},highlight({code:n,language:i,themes:a},s){let o=BH(n,i,a);return Md.has(o)?Md.get(o):(s&&(ks.has(o)||ks.set(o,new Set),ks.get(o).add(s)),DH(i,a).then(l=>{let c=l.getLoadedLanguages().includes(i)?i:"text",u=l.codeToTokens(n,{lang:c,themes:{light:a[0],dark:a[1]}});Md.set(o,u);let h=ks.get(o);if(h){for(let d of h)d(u);ks.delete(o)}}).catch(l=>{console.error("[Streamdown Code] Failed to highlight code:",l),ks.delete(o)}),null)}}}var J5=OH();function PH(e,t){return ev(e,{})||{type:"root",children:[]}}function ev(e,t){const r=FH(e,t);return r&&t.afterTransform&&t.afterTransform(e,r),r}function FH(e,t){switch(e.nodeType){case 1:return qH(e,t);case 3:return zH(e);case 8:return HH(e);case 9:return Hb(e,t);case 10:return $H();case 11:return Hb(e,t);default:return}}function Hb(e,t){return{type:"root",children:tv(e,t)}}function $H(){return{type:"doctype"}}function zH(e){return{type:"text",value:e.nodeValue||""}}function HH(e){return{type:"comment",value:e.nodeValue||""}}function qH(e,t){const r=e.namespaceURI,n=r===ii.svg?I4:M4,i=r===ii.html?e.tagName.toLowerCase():e.tagName,a=r===ii.html&&i==="template"?e.content:e,s=e.getAttributeNames(),o={};let l=-1;for(;++l<s.length;)o[s[l]]=e.getAttribute(s[l])||"";return n(i,o,tv(a,t))}function tv(e,t){const r=e.childNodes,n=[];let i=-1;for(;++i<r.length;){const a=ev(r[i],t);a!==void 0&&n.push(a)}return n}new DOMParser;function jH(e,t){const r=UH(e);return PH(r)}function UH(e){const t=document.createElement("template");return t.innerHTML=e,t.content}const qb=(function(e,t,r){const n=lc(r);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(n(e.children[t],t,e))return e.children[t]}),cs=(function(e){if(e==null)return YH;if(typeof e=="string")return GH(e);if(typeof e=="object")return WH(e);if(typeof e=="function")return s1(e);throw new Error("Expected function, string, or array as `test`")});function WH(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=cs(e[r]);return s1(n);function n(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function GH(e){return s1(t);function t(r){return r.tagName===e}}function s1(e){return t;function t(r,n,i){return!!(VH(r)&&e.call(this,r,typeof n=="number"?n:void 0,i||void 0))}}function YH(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function VH(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const jb=/\n/g,Ub=/[\t ]+/g,Vf=cs("br"),Wb=cs(rq),XH=cs("p"),Gb=cs("tr"),KH=cs(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",tq,nq]),rv=cs(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function QH(e,t){const r=t||{},n="children"in e?e.children:[],i=rv(e),a=av(e,{whitespace:r.whitespace||"normal"}),s=[];(e.type==="text"||e.type==="comment")&&s.push(...iv(e,{breakBefore:!0,breakAfter:!0}));let o=-1;for(;++o<n.length;)s.push(...nv(n[o],e,{whitespace:a,breakBefore:o?void 0:i,breakAfter:o<n.length-1?Vf(n[o+1]):i}));const l=[];let c;for(o=-1;++o<s.length;){const u=s[o];typeof u=="number"?c!==void 0&&u>c&&(c=u):u&&(c!==void 0&&c>-1&&l.push(`
|
|
125
|
+
`.repeat(c)||" "),c=-1,l.push(u))}return l.join("")}function nv(e,t,r){return e.type==="element"?ZH(e,t,r):e.type==="text"?r.whitespace==="normal"?iv(e,r):JH(e):[]}function ZH(e,t,r){const n=av(e,r),i=e.children||[];let a=-1,s=[];if(KH(e))return s;let o,l;for(Vf(e)||Gb(e)&&qb(t,e,Gb)?l=`
|
|
126
|
+
`:XH(e)?(o=2,l=2):rv(e)&&(o=1,l=1);++a<i.length;)s=s.concat(nv(i[a],e,{whitespace:n,breakBefore:a?void 0:o,breakAfter:a<i.length-1?Vf(i[a+1]):l}));return Wb(e)&&qb(t,e,Wb)&&s.push(" "),o&&s.unshift(o),l&&s.push(l),s}function iv(e,t){const r=String(e.value),n=[],i=[];let a=0;for(;a<=r.length;){jb.lastIndex=a;const l=jb.exec(r),c=l&&"index"in l?l.index:r.length;n.push(eq(r.slice(a,c).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),a===0?t.breakBefore:!0,c===r.length?t.breakAfter:!0)),a=c+1}let s=-1,o;for(;++s<n.length;)n[s].charCodeAt(n[s].length-1)===8203||s<n.length-1&&n[s+1].charCodeAt(0)===8203?(i.push(n[s]),o=void 0):n[s]?(typeof o=="number"&&i.push(o),i.push(n[s]),o=0):(s===0||s===n.length-1)&&i.push(0);return i}function JH(e){return[String(e.value)]}function eq(e,t,r){const n=[];let i=0,a;for(;i<e.length;){Ub.lastIndex=i;const s=Ub.exec(e);a=s?s.index:e.length,!i&&!a&&s&&!t&&n.push(""),i!==a&&n.push(e.slice(i,a)),i=s?a+s[0].length:a}return i!==a&&!r&&n.push(""),n.join(" ")}function av(e,t){if(e.type==="element"){const r=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return r.wrap?"pre-wrap":"pre";case"td":case"th":return r.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function tq(e){return!!(e.properties||{}).hidden}function rq(e){return e.tagName==="td"||e.tagName==="th"}function nq(e){return e.tagName==="dialog"&&!(e.properties||{}).open}class tn{constructor(t,r,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=t,this.start=r,this.end=n}static range(t,r){return r?!t||!t.loc||!r.loc||t.loc.lexer!==r.loc.lexer?null:new tn(t.loc.lexer,t.loc.start,r.loc.end):t&&t.loc}}class gn{constructor(t,r){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=t,this.loc=r}range(t,r){return new gn(r,tn.range(this,t))}}class xe{constructor(t,r){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var n="KaTeX parse error: "+t,i,a,s=r&&r.loc;if(s&&s.start<=s.end){var o=s.lexer.input;i=s.start,a=s.end,i===o.length?n+=" at end of input: ":n+=" at position "+(i+1)+": ";var l=o.slice(i,a).replace(/[^]/g,"$&̲"),c;i>15?c="…"+o.slice(i-15,i):c=o.slice(0,i);var u;a+15<o.length?u=o.slice(a,a+15)+"…":u=o.slice(a),n+=c+l+u}var h=new Error(n);return h.name="ParseError",h.__proto__=xe.prototype,h.position=i,i!=null&&a!=null&&(h.length=a-i),h.rawMessage=t,h}}xe.prototype.__proto__=Error.prototype;var iq=function(t,r){return t===void 0?r:t},aq=/([A-Z])/g,sq=function(t){return t.replace(aq,"-$1").toLowerCase()},oq={"&":"&",">":">","<":"<",'"':""","'":"'"},lq=/[&><"']/g;function cq(e){return String(e).replace(lq,t=>oq[t])}var sv=function e(t){return t.type==="ordgroup"||t.type==="color"?t.body.length===1?e(t.body[0]):t:t.type==="font"?e(t.body):t},uq=function(t){var r=sv(t);return r.type==="mathord"||r.type==="textord"||r.type==="atom"},hq=function(t){if(!t)throw new Error("Expected non-null, but got "+String(t));return t},dq=function(t){var r=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(t);return r?r[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(r[1])?null:r[1].toLowerCase():"_relative"},_t={deflt:iq,escape:cq,hyphenate:sq,getBaseElem:sv,isCharacterBox:uq,protocolFromUrl:dq},Nl={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>e==="Infinity"?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function fq(e){if(e.default)return e.default;var t=e.type,r=Array.isArray(t)?t[0]:t;if(typeof r!="string")return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class o1{constructor(t){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,t=t||{};for(var r in Nl)if(Nl.hasOwnProperty(r)){var n=Nl[r];this[r]=t[r]!==void 0?n.processor?n.processor(t[r]):t[r]:fq(n)}}reportNonstrict(t,r,n){var i=this.strict;if(typeof i=="function"&&(i=i(t,r,n)),!(!i||i==="ignore")){if(i===!0||i==="error")throw new xe("LaTeX-incompatible input and strict mode is set to 'error': "+(r+" ["+t+"]"),n);i==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+t+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+t+"]"))}}useStrictBehavior(t,r,n){var i=this.strict;if(typeof i=="function")try{i=i(t,r,n)}catch{i="error"}return!i||i==="ignore"?!1:i===!0||i==="error"?!0:i==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+t+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+t+"]")),!1)}isTrusted(t){if(t.url&&!t.protocol){var r=_t.protocolFromUrl(t.url);if(r==null)return!1;t.protocol=r}var n=typeof this.trust=="function"?this.trust(t):this.trust;return!!n}}class ea{constructor(t,r,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=r,this.cramped=n}sup(){return ri[pq[this.id]]}sub(){return ri[mq[this.id]]}fracNum(){return ri[gq[this.id]]}fracDen(){return ri[bq[this.id]]}cramp(){return ri[yq[this.id]]}text(){return ri[xq[this.id]]}isTight(){return this.size>=2}}var l1=0,t0=1,Os=2,Di=3,Wl=4,An=5,eo=6,qr=7,ri=[new ea(l1,0,!1),new ea(t0,0,!0),new ea(Os,1,!1),new ea(Di,1,!0),new ea(Wl,2,!1),new ea(An,2,!0),new ea(eo,3,!1),new ea(qr,3,!0)],pq=[Wl,An,Wl,An,eo,qr,eo,qr],mq=[An,An,An,An,qr,qr,qr,qr],gq=[Os,Di,Wl,An,eo,qr,eo,qr],bq=[Di,Di,An,An,qr,qr,qr,qr],yq=[t0,t0,Di,Di,An,An,qr,qr],xq=[l1,t0,Os,Di,Os,Di,Os,Di],tt={DISPLAY:ri[l1],TEXT:ri[Os],SCRIPT:ri[Wl],SCRIPTSCRIPT:ri[eo]},Xf=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function vq(e){for(var t=0;t<Xf.length;t++)for(var r=Xf[t],n=0;n<r.blocks.length;n++){var i=r.blocks[n];if(e>=i[0]&&e<=i[1])return r.name}return null}var bu=[];Xf.forEach(e=>e.blocks.forEach(t=>bu.push(...t)));function ov(e){for(var t=0;t<bu.length;t+=2)if(e>=bu[t]&&e<=bu[t+1])return!0;return!1}var ws=80,kq=function(t,r){return"M95,"+(622+t+r)+`
|
|
127
|
+
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
|
128
|
+
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
|
|
129
|
+
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
|
|
130
|
+
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
|
|
131
|
+
c69,-144,104.5,-217.7,106.5,-221
|
|
132
|
+
l`+t/2.075+" -"+t+`
|
|
133
|
+
c5.3,-9.3,12,-14,20,-14
|
|
134
|
+
H400000v`+(40+t)+`H845.2724
|
|
135
|
+
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
|
|
136
|
+
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
|
|
137
|
+
M`+(834+t)+" "+r+"h400000v"+(40+t)+"h-400000z"},wq=function(t,r){return"M263,"+(601+t+r)+`c0.7,0,18,39.7,52,119
|
|
138
|
+
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
|
|
139
|
+
c340,-704.7,510.7,-1060.3,512,-1067
|
|
140
|
+
l`+t/2.084+" -"+t+`
|
|
141
|
+
c4.7,-7.3,11,-11,19,-11
|
|
142
|
+
H40000v`+(40+t)+`H1012.3
|
|
143
|
+
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
|
|
144
|
+
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
|
|
145
|
+
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
|
|
146
|
+
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
|
|
147
|
+
M`+(1001+t)+" "+r+"h400000v"+(40+t)+"h-400000z"},Tq=function(t,r){return"M983 "+(10+t+r)+`
|
|
148
|
+
l`+t/3.13+" -"+t+`
|
|
149
|
+
c4,-6.7,10,-10,18,-10 H400000v`+(40+t)+`
|
|
150
|
+
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
|
|
151
|
+
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
|
|
152
|
+
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
|
|
153
|
+
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
|
|
154
|
+
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
|
|
155
|
+
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
|
|
156
|
+
M`+(1001+t)+" "+r+"h400000v"+(40+t)+"h-400000z"},Cq=function(t,r){return"M424,"+(2398+t+r)+`
|
|
157
|
+
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
|
|
158
|
+
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
|
|
159
|
+
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
|
|
160
|
+
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
|
|
161
|
+
l`+t/4.223+" -"+t+`c4,-6.7,10,-10,18,-10 H400000
|
|
162
|
+
v`+(40+t)+`H1014.6
|
|
163
|
+
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
|
|
164
|
+
c-2,6,-10,9,-24,9
|
|
165
|
+
c-8,0,-12,-0.7,-12,-2z M`+(1001+t)+" "+r+`
|
|
166
|
+
h400000v`+(40+t)+"h-400000z"},Sq=function(t,r){return"M473,"+(2713+t+r)+`
|
|
167
|
+
c339.3,-1799.3,509.3,-2700,510,-2702 l`+t/5.298+" -"+t+`
|
|
168
|
+
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+t)+`H1017.7
|
|
169
|
+
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
|
|
170
|
+
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
|
|
171
|
+
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
|
|
172
|
+
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
|
|
173
|
+
606zM`+(1001+t)+" "+r+"h400000v"+(40+t)+"H1017.7z"},Eq=function(t){var r=t/2;return"M400000 "+t+" H0 L"+r+" 0 l65 45 L145 "+(t-80)+" H400000z"},_q=function(t,r,n){var i=n-54-r-t;return"M702 "+(t+r)+"H400000"+(40+t)+`
|
|
174
|
+
H742v`+i+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
|
|
175
|
+
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
|
|
176
|
+
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
|
|
177
|
+
219 661 l218 661zM702 `+r+"H400000v"+(40+t)+"H742z"},Aq=function(t,r,n){r=1e3*r;var i="";switch(t){case"sqrtMain":i=kq(r,ws);break;case"sqrtSize1":i=wq(r,ws);break;case"sqrtSize2":i=Tq(r,ws);break;case"sqrtSize3":i=Cq(r,ws);break;case"sqrtSize4":i=Sq(r,ws);break;case"sqrtTall":i=_q(r,ws,n)}return i},Nq=function(t,r){switch(t){case"⎜":return"M291 0 H417 V"+r+" H291z M291 0 H417 V"+r+" H291z";case"∣":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z";case"∥":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z"+("M367 0 H410 V"+r+" H367z M367 0 H410 V"+r+" H367z");case"⎟":return"M457 0 H583 V"+r+" H457z M457 0 H583 V"+r+" H457z";case"⎢":return"M319 0 H403 V"+r+" H319z M319 0 H403 V"+r+" H319z";case"⎥":return"M263 0 H347 V"+r+" H263z M263 0 H347 V"+r+" H263z";case"⎪":return"M384 0 H504 V"+r+" H384z M384 0 H504 V"+r+" H384z";case"⏐":return"M312 0 H355 V"+r+" H312z M312 0 H355 V"+r+" H312z";case"‖":return"M257 0 H300 V"+r+" H257z M257 0 H300 V"+r+" H257z"+("M478 0 H521 V"+r+" H478z M478 0 H521 V"+r+" H478z");default:return""}},Yb={doubleleftarrow:`M262 157
|
|
178
|
+
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
|
|
179
|
+
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
|
|
180
|
+
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
|
|
181
|
+
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
|
|
182
|
+
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
|
|
183
|
+
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
|
|
184
|
+
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
|
|
185
|
+
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
|
|
186
|
+
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
|
|
187
|
+
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
|
|
188
|
+
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
|
|
189
|
+
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
|
|
190
|
+
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
|
|
191
|
+
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
|
|
192
|
+
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
|
|
193
|
+
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
|
|
194
|
+
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
|
|
195
|
+
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
|
|
196
|
+
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
|
|
197
|
+
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
|
|
198
|
+
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
|
|
199
|
+
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
|
|
200
|
+
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
|
|
201
|
+
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
|
|
202
|
+
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
|
|
203
|
+
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
|
|
204
|
+
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
|
|
205
|
+
435 0h399565z`,leftgroupunder:`M400000 262
|
|
206
|
+
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
|
|
207
|
+
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
|
|
208
|
+
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
|
|
209
|
+
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
|
|
210
|
+
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
|
|
211
|
+
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
|
|
212
|
+
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
|
|
213
|
+
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
|
|
214
|
+
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
|
|
215
|
+
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
|
|
216
|
+
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
|
|
217
|
+
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
|
|
218
|
+
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
|
|
219
|
+
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
|
|
220
|
+
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
|
|
221
|
+
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
|
|
222
|
+
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
|
|
223
|
+
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
|
|
224
|
+
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
|
|
225
|
+
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
|
|
226
|
+
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
|
|
227
|
+
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
|
|
228
|
+
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
|
|
229
|
+
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
|
|
230
|
+
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
|
|
231
|
+
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
|
|
232
|
+
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
|
|
233
|
+
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
|
|
234
|
+
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
|
|
235
|
+
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
|
|
236
|
+
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
|
|
237
|
+
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
|
|
238
|
+
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
|
|
239
|
+
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
|
|
240
|
+
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
|
|
241
|
+
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
|
|
242
|
+
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
|
|
243
|
+
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
|
|
244
|
+
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
|
|
245
|
+
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
|
|
246
|
+
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
|
|
247
|
+
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
|
|
248
|
+
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
|
|
249
|
+
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
|
|
250
|
+
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
|
|
251
|
+
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
|
|
252
|
+
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
|
|
253
|
+
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
254
|
+
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
255
|
+
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
|
|
256
|
+
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
|
|
257
|
+
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
|
|
258
|
+
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
|
|
259
|
+
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
|
|
260
|
+
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
|
|
261
|
+
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
|
|
262
|
+
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
|
|
263
|
+
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
|
|
264
|
+
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
|
|
265
|
+
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
|
|
266
|
+
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
|
|
267
|
+
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
|
|
268
|
+
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
|
|
269
|
+
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
|
|
270
|
+
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
|
|
271
|
+
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
|
|
272
|
+
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
|
|
273
|
+
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
|
|
274
|
+
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
|
|
275
|
+
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
|
|
276
|
+
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
|
|
277
|
+
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
|
|
278
|
+
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
|
|
279
|
+
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
|
|
280
|
+
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
|
|
281
|
+
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
|
|
282
|
+
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
|
|
283
|
+
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
|
|
284
|
+
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
|
|
285
|
+
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
|
|
286
|
+
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
|
|
287
|
+
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
|
|
288
|
+
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
|
|
289
|
+
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
|
|
290
|
+
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
|
|
291
|
+
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
|
|
292
|
+
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
|
|
293
|
+
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
|
|
294
|
+
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
|
|
295
|
+
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
|
|
296
|
+
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
|
|
297
|
+
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
|
|
298
|
+
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
|
|
299
|
+
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
|
|
300
|
+
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
|
|
301
|
+
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
|
|
302
|
+
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
|
|
303
|
+
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
|
|
304
|
+
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
|
|
305
|
+
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
|
|
306
|
+
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
|
|
307
|
+
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
|
|
308
|
+
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
|
|
309
|
+
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
|
|
310
|
+
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
|
|
311
|
+
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
|
|
312
|
+
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
|
|
313
|
+
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
|
|
314
|
+
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
|
|
315
|
+
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
316
|
+
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
317
|
+
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
318
|
+
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
|
|
319
|
+
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
320
|
+
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
321
|
+
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
322
|
+
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
|
|
323
|
+
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
|
|
324
|
+
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
|
|
325
|
+
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
|
|
326
|
+
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
|
|
327
|
+
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
|
|
328
|
+
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
|
|
329
|
+
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
|
|
330
|
+
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
|
|
331
|
+
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
|
|
332
|
+
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
|
|
333
|
+
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
334
|
+
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
335
|
+
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
336
|
+
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
|
|
337
|
+
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
|
|
338
|
+
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
|
|
339
|
+
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
|
|
340
|
+
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
|
|
341
|
+
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
342
|
+
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
343
|
+
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
344
|
+
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
345
|
+
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
|
|
346
|
+
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
|
|
347
|
+
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
|
|
348
|
+
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
|
|
349
|
+
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
350
|
+
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
351
|
+
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
352
|
+
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Lq=function(t,r){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v1759 h347 v-84
|
|
353
|
+
H403z M403 1759 V0 H319 V1759 v`+r+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v1759 H0 v84 H347z
|
|
354
|
+
M347 1759 V0 H263 V1759 v`+r+" v1759 h84z";case"vert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15
|
|
355
|
+
c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
356
|
+
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+" v585 h43z";case"doublevert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15
|
|
357
|
+
c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
358
|
+
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+` v585 h43z
|
|
359
|
+
M367 15 v585 v`+r+` v585 c2.667,10,9.667,15,21,15
|
|
360
|
+
c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
361
|
+
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+r+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+r+` v1715 h263 v84 H319z
|
|
362
|
+
MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+r+` v1799 H0 v-84 H319z
|
|
363
|
+
MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v602 h84z
|
|
364
|
+
M403 1759 V0 H319 V1759 v`+r+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v602 h84z
|
|
365
|
+
M347 1759 V0 h-84 V1759 v`+r+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
|
|
366
|
+
c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
|
|
367
|
+
-36,557 l0,`+(r+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
|
|
368
|
+
949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
|
|
369
|
+
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
|
|
370
|
+
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
|
|
371
|
+
l0,-`+(r+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
|
|
372
|
+
-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
|
|
373
|
+
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
|
|
374
|
+
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(r+9)+`
|
|
375
|
+
c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
|
|
376
|
+
c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
|
|
377
|
+
c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
|
|
378
|
+
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
|
|
379
|
+
l0,-`+(r+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
|
|
380
|
+
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};class yc{constructor(t){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(t){return this.classes.includes(t)}toNode(){for(var t=document.createDocumentFragment(),r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t}toMarkup(){for(var t="",r=0;r<this.children.length;r++)t+=this.children[r].toMarkup();return t}toText(){var t=r=>r.toText();return this.children.map(t).join("")}}var ai={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Uc={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},Vb={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function lv(e,t){ai[e]=t}function c1(e,t,r){if(!ai[t])throw new Error("Font metrics not found for font: "+t+".");var n=e.charCodeAt(0),i=ai[t][n];if(!i&&e[0]in Vb&&(n=Vb[e[0]].charCodeAt(0),i=ai[t][n]),!i&&r==="text"&&ov(n)&&(i=ai[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var Id={};function Mq(e){var t;if(e>=5?t=0:e>=3?t=1:t=2,!Id[t]){var r=Id[t]={cssEmPerMu:Uc.quad[t]/18};for(var n in Uc)Uc.hasOwnProperty(n)&&(r[n]=Uc[n][t])}return Id[t]}var Iq=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],Xb=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Kb=function(t,r){return r.size<2?t:Iq[t-1][r.size-1]};class Li{constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||Li.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=Xb[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var r={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);return new Li(r)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:Kb(this.textSize,t)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(t){return this.size===t&&this.textSize===t?this:this.extend({style:this.style.text(),size:t,textSize:t,sizeMultiplier:Xb[t-1]})}havingBaseStyle(t){t=t||this.style.text();var r=Kb(Li.BASESIZE,t);return this.size===r&&this.textSize===Li.BASESIZE&&this.style===t?this:this.extend({style:t,size:r})}havingBaseSizing(){var t;switch(this.style.id){case 4:case 5:t=3;break;case 6:case 7:t=1;break;default:t=6}return this.extend({style:this.style.text(),size:t})}withColor(t){return this.extend({color:t})}withPhantom(){return this.extend({phantom:!0})}withFont(t){return this.extend({font:t})}withTextFontFamily(t){return this.extend({fontFamily:t,font:""})}withTextFontWeight(t){return this.extend({fontWeight:t,font:""})}withTextFontShape(t){return this.extend({fontShape:t,font:""})}sizingClasses(t){return t.size!==this.size?["sizing","reset-size"+t.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==Li.BASESIZE?["sizing","reset-size"+this.size,"size"+Li.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Mq(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Li.BASESIZE=6;var Kf={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},Rq={ex:!0,em:!0,mu:!0},cv=function(t){return typeof t!="string"&&(t=t.unit),t in Kf||t in Rq||t==="ex"},Yt=function(t,r){var n;if(t.unit in Kf)n=Kf[t.unit]/r.fontMetrics().ptPerEm/r.sizeMultiplier;else if(t.unit==="mu")n=r.fontMetrics().cssEmPerMu;else{var i;if(r.style.isTight()?i=r.havingStyle(r.style.text()):i=r,t.unit==="ex")n=i.fontMetrics().xHeight;else if(t.unit==="em")n=i.fontMetrics().quad;else throw new xe("Invalid unit: '"+t.unit+"'");i!==r&&(n*=i.sizeMultiplier/r.sizeMultiplier)}return Math.min(t.number*n,r.maxSize)},Ee=function(t){return+t.toFixed(4)+"em"},fa=function(t){return t.filter(r=>r).join(" ")},uv=function(t,r,n){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},r){r.style.isTight()&&this.classes.push("mtight");var i=r.getColor();i&&(this.style.color=i)}},hv=function(t){var r=document.createElement(t);r.className=fa(this.classes);for(var n in this.style)this.style.hasOwnProperty(n)&&(r.style[n]=this.style[n]);for(var i in this.attributes)this.attributes.hasOwnProperty(i)&&r.setAttribute(i,this.attributes[i]);for(var a=0;a<this.children.length;a++)r.appendChild(this.children[a].toNode());return r},Bq=/[\s"'>/=\x00-\x1f]/,dv=function(t){var r="<"+t;this.classes.length&&(r+=' class="'+_t.escape(fa(this.classes))+'"');var n="";for(var i in this.style)this.style.hasOwnProperty(i)&&(n+=_t.hyphenate(i)+":"+this.style[i]+";");n&&(r+=' style="'+_t.escape(n)+'"');for(var a in this.attributes)if(this.attributes.hasOwnProperty(a)){if(Bq.test(a))throw new xe("Invalid attribute name '"+a+"'");r+=" "+a+'="'+_t.escape(this.attributes[a])+'"'}r+=">";for(var s=0;s<this.children.length;s++)r+=this.children[s].toMarkup();return r+="</"+t+">",r};class xc{constructor(t,r,n,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,uv.call(this,t,n,i),this.children=r||[]}setAttribute(t,r){this.attributes[t]=r}hasClass(t){return this.classes.includes(t)}toNode(){return hv.call(this,"span")}toMarkup(){return dv.call(this,"span")}}class u1{constructor(t,r,n,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,uv.call(this,r,i),this.children=n||[],this.setAttribute("href",t)}setAttribute(t,r){this.attributes[t]=r}hasClass(t){return this.classes.includes(t)}toNode(){return hv.call(this,"a")}toMarkup(){return dv.call(this,"a")}}class Dq{constructor(t,r,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=r,this.src=t,this.classes=["mord"],this.style=n}hasClass(t){return this.classes.includes(t)}toNode(){var t=document.createElement("img");t.src=this.src,t.alt=this.alt,t.className="mord";for(var r in this.style)this.style.hasOwnProperty(r)&&(t.style[r]=this.style[r]);return t}toMarkup(){var t='<img src="'+_t.escape(this.src)+'"'+(' alt="'+_t.escape(this.alt)+'"'),r="";for(var n in this.style)this.style.hasOwnProperty(n)&&(r+=_t.hyphenate(n)+":"+this.style[n]+";");return r&&(t+=' style="'+_t.escape(r)+'"'),t+="'/>",t}}var Oq={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class Nn{constructor(t,r,n,i,a,s,o,l){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=t,this.height=r||0,this.depth=n||0,this.italic=i||0,this.skew=a||0,this.width=s||0,this.classes=o||[],this.style=l||{},this.maxFontSize=0;var c=vq(this.text.charCodeAt(0));c&&this.classes.push(c+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=Oq[this.text])}hasClass(t){return this.classes.includes(t)}toNode(){var t=document.createTextNode(this.text),r=null;this.italic>0&&(r=document.createElement("span"),r.style.marginRight=Ee(this.italic)),this.classes.length>0&&(r=r||document.createElement("span"),r.className=fa(this.classes));for(var n in this.style)this.style.hasOwnProperty(n)&&(r=r||document.createElement("span"),r.style[n]=this.style[n]);return r?(r.appendChild(t),r):t}toMarkup(){var t=!1,r="<span";this.classes.length&&(t=!0,r+=' class="',r+=_t.escape(fa(this.classes)),r+='"');var n="";this.italic>0&&(n+="margin-right:"+this.italic+"em;");for(var i in this.style)this.style.hasOwnProperty(i)&&(n+=_t.hyphenate(i)+":"+this.style[i]+";");n&&(t=!0,r+=' style="'+_t.escape(n)+'"');var a=_t.escape(this.text);return t?(r+=">",r+=a,r+="</span>",r):a}}class $i{constructor(t,r){this.children=void 0,this.attributes=void 0,this.children=t||[],this.attributes=r||{}}toNode(){var t="http://www.w3.org/2000/svg",r=document.createElementNS(t,"svg");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&r.setAttribute(n,this.attributes[n]);for(var i=0;i<this.children.length;i++)r.appendChild(this.children[i].toNode());return r}toMarkup(){var t='<svg xmlns="http://www.w3.org/2000/svg"';for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&(t+=" "+r+'="'+_t.escape(this.attributes[r])+'"');t+=">";for(var n=0;n<this.children.length;n++)t+=this.children[n].toMarkup();return t+="</svg>",t}}class pa{constructor(t,r){this.pathName=void 0,this.alternate=void 0,this.pathName=t,this.alternate=r}toNode(){var t="http://www.w3.org/2000/svg",r=document.createElementNS(t,"path");return this.alternate?r.setAttribute("d",this.alternate):r.setAttribute("d",Yb[this.pathName]),r}toMarkup(){return this.alternate?'<path d="'+_t.escape(this.alternate)+'"/>':'<path d="'+_t.escape(Yb[this.pathName])+'"/>'}}class Qf{constructor(t){this.attributes=void 0,this.attributes=t||{}}toNode(){var t="http://www.w3.org/2000/svg",r=document.createElementNS(t,"line");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&r.setAttribute(n,this.attributes[n]);return r}toMarkup(){var t="<line";for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&(t+=" "+r+'="'+_t.escape(this.attributes[r])+'"');return t+="/>",t}}function Qb(e){if(e instanceof Nn)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}function Pq(e){if(e instanceof xc)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}var Fq={bin:1,close:1,inner:1,open:1,punct:1,rel:1},$q={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Ft={math:{},text:{}};function x(e,t,r,n,i,a){Ft[e][i]={font:t,group:r,replace:n},a&&n&&(Ft[e][n]=Ft[e][i])}var w="math",pe="text",_="main",z="ams",Wt="accent-token",Me="bin",Xr="close",vo="inner",et="mathord",or="op-token",vn="open",ch="punct",j="rel",Gi="spacing",Q="textord";x(w,_,j,"≡","\\equiv",!0);x(w,_,j,"≺","\\prec",!0);x(w,_,j,"≻","\\succ",!0);x(w,_,j,"∼","\\sim",!0);x(w,_,j,"⊥","\\perp");x(w,_,j,"⪯","\\preceq",!0);x(w,_,j,"⪰","\\succeq",!0);x(w,_,j,"≃","\\simeq",!0);x(w,_,j,"∣","\\mid",!0);x(w,_,j,"≪","\\ll",!0);x(w,_,j,"≫","\\gg",!0);x(w,_,j,"≍","\\asymp",!0);x(w,_,j,"∥","\\parallel");x(w,_,j,"⋈","\\bowtie",!0);x(w,_,j,"⌣","\\smile",!0);x(w,_,j,"⊑","\\sqsubseteq",!0);x(w,_,j,"⊒","\\sqsupseteq",!0);x(w,_,j,"≐","\\doteq",!0);x(w,_,j,"⌢","\\frown",!0);x(w,_,j,"∋","\\ni",!0);x(w,_,j,"∝","\\propto",!0);x(w,_,j,"⊢","\\vdash",!0);x(w,_,j,"⊣","\\dashv",!0);x(w,_,j,"∋","\\owns");x(w,_,ch,".","\\ldotp");x(w,_,ch,"⋅","\\cdotp");x(w,_,Q,"#","\\#");x(pe,_,Q,"#","\\#");x(w,_,Q,"&","\\&");x(pe,_,Q,"&","\\&");x(w,_,Q,"ℵ","\\aleph",!0);x(w,_,Q,"∀","\\forall",!0);x(w,_,Q,"ℏ","\\hbar",!0);x(w,_,Q,"∃","\\exists",!0);x(w,_,Q,"∇","\\nabla",!0);x(w,_,Q,"♭","\\flat",!0);x(w,_,Q,"ℓ","\\ell",!0);x(w,_,Q,"♮","\\natural",!0);x(w,_,Q,"♣","\\clubsuit",!0);x(w,_,Q,"℘","\\wp",!0);x(w,_,Q,"♯","\\sharp",!0);x(w,_,Q,"♢","\\diamondsuit",!0);x(w,_,Q,"ℜ","\\Re",!0);x(w,_,Q,"♡","\\heartsuit",!0);x(w,_,Q,"ℑ","\\Im",!0);x(w,_,Q,"♠","\\spadesuit",!0);x(w,_,Q,"§","\\S",!0);x(pe,_,Q,"§","\\S");x(w,_,Q,"¶","\\P",!0);x(pe,_,Q,"¶","\\P");x(w,_,Q,"†","\\dag");x(pe,_,Q,"†","\\dag");x(pe,_,Q,"†","\\textdagger");x(w,_,Q,"‡","\\ddag");x(pe,_,Q,"‡","\\ddag");x(pe,_,Q,"‡","\\textdaggerdbl");x(w,_,Xr,"⎱","\\rmoustache",!0);x(w,_,vn,"⎰","\\lmoustache",!0);x(w,_,Xr,"⟯","\\rgroup",!0);x(w,_,vn,"⟮","\\lgroup",!0);x(w,_,Me,"∓","\\mp",!0);x(w,_,Me,"⊖","\\ominus",!0);x(w,_,Me,"⊎","\\uplus",!0);x(w,_,Me,"⊓","\\sqcap",!0);x(w,_,Me,"∗","\\ast");x(w,_,Me,"⊔","\\sqcup",!0);x(w,_,Me,"◯","\\bigcirc",!0);x(w,_,Me,"∙","\\bullet",!0);x(w,_,Me,"‡","\\ddagger");x(w,_,Me,"≀","\\wr",!0);x(w,_,Me,"⨿","\\amalg");x(w,_,Me,"&","\\And");x(w,_,j,"⟵","\\longleftarrow",!0);x(w,_,j,"⇐","\\Leftarrow",!0);x(w,_,j,"⟸","\\Longleftarrow",!0);x(w,_,j,"⟶","\\longrightarrow",!0);x(w,_,j,"⇒","\\Rightarrow",!0);x(w,_,j,"⟹","\\Longrightarrow",!0);x(w,_,j,"↔","\\leftrightarrow",!0);x(w,_,j,"⟷","\\longleftrightarrow",!0);x(w,_,j,"⇔","\\Leftrightarrow",!0);x(w,_,j,"⟺","\\Longleftrightarrow",!0);x(w,_,j,"↦","\\mapsto",!0);x(w,_,j,"⟼","\\longmapsto",!0);x(w,_,j,"↗","\\nearrow",!0);x(w,_,j,"↩","\\hookleftarrow",!0);x(w,_,j,"↪","\\hookrightarrow",!0);x(w,_,j,"↘","\\searrow",!0);x(w,_,j,"↼","\\leftharpoonup",!0);x(w,_,j,"⇀","\\rightharpoonup",!0);x(w,_,j,"↙","\\swarrow",!0);x(w,_,j,"↽","\\leftharpoondown",!0);x(w,_,j,"⇁","\\rightharpoondown",!0);x(w,_,j,"↖","\\nwarrow",!0);x(w,_,j,"⇌","\\rightleftharpoons",!0);x(w,z,j,"≮","\\nless",!0);x(w,z,j,"","\\@nleqslant");x(w,z,j,"","\\@nleqq");x(w,z,j,"⪇","\\lneq",!0);x(w,z,j,"≨","\\lneqq",!0);x(w,z,j,"","\\@lvertneqq");x(w,z,j,"⋦","\\lnsim",!0);x(w,z,j,"⪉","\\lnapprox",!0);x(w,z,j,"⊀","\\nprec",!0);x(w,z,j,"⋠","\\npreceq",!0);x(w,z,j,"⋨","\\precnsim",!0);x(w,z,j,"⪹","\\precnapprox",!0);x(w,z,j,"≁","\\nsim",!0);x(w,z,j,"","\\@nshortmid");x(w,z,j,"∤","\\nmid",!0);x(w,z,j,"⊬","\\nvdash",!0);x(w,z,j,"⊭","\\nvDash",!0);x(w,z,j,"⋪","\\ntriangleleft");x(w,z,j,"⋬","\\ntrianglelefteq",!0);x(w,z,j,"⊊","\\subsetneq",!0);x(w,z,j,"","\\@varsubsetneq");x(w,z,j,"⫋","\\subsetneqq",!0);x(w,z,j,"","\\@varsubsetneqq");x(w,z,j,"≯","\\ngtr",!0);x(w,z,j,"","\\@ngeqslant");x(w,z,j,"","\\@ngeqq");x(w,z,j,"⪈","\\gneq",!0);x(w,z,j,"≩","\\gneqq",!0);x(w,z,j,"","\\@gvertneqq");x(w,z,j,"⋧","\\gnsim",!0);x(w,z,j,"⪊","\\gnapprox",!0);x(w,z,j,"⊁","\\nsucc",!0);x(w,z,j,"⋡","\\nsucceq",!0);x(w,z,j,"⋩","\\succnsim",!0);x(w,z,j,"⪺","\\succnapprox",!0);x(w,z,j,"≆","\\ncong",!0);x(w,z,j,"","\\@nshortparallel");x(w,z,j,"∦","\\nparallel",!0);x(w,z,j,"⊯","\\nVDash",!0);x(w,z,j,"⋫","\\ntriangleright");x(w,z,j,"⋭","\\ntrianglerighteq",!0);x(w,z,j,"","\\@nsupseteqq");x(w,z,j,"⊋","\\supsetneq",!0);x(w,z,j,"","\\@varsupsetneq");x(w,z,j,"⫌","\\supsetneqq",!0);x(w,z,j,"","\\@varsupsetneqq");x(w,z,j,"⊮","\\nVdash",!0);x(w,z,j,"⪵","\\precneqq",!0);x(w,z,j,"⪶","\\succneqq",!0);x(w,z,j,"","\\@nsubseteqq");x(w,z,Me,"⊴","\\unlhd");x(w,z,Me,"⊵","\\unrhd");x(w,z,j,"↚","\\nleftarrow",!0);x(w,z,j,"↛","\\nrightarrow",!0);x(w,z,j,"⇍","\\nLeftarrow",!0);x(w,z,j,"⇏","\\nRightarrow",!0);x(w,z,j,"↮","\\nleftrightarrow",!0);x(w,z,j,"⇎","\\nLeftrightarrow",!0);x(w,z,j,"△","\\vartriangle");x(w,z,Q,"ℏ","\\hslash");x(w,z,Q,"▽","\\triangledown");x(w,z,Q,"◊","\\lozenge");x(w,z,Q,"Ⓢ","\\circledS");x(w,z,Q,"®","\\circledR");x(pe,z,Q,"®","\\circledR");x(w,z,Q,"∡","\\measuredangle",!0);x(w,z,Q,"∄","\\nexists");x(w,z,Q,"℧","\\mho");x(w,z,Q,"Ⅎ","\\Finv",!0);x(w,z,Q,"⅁","\\Game",!0);x(w,z,Q,"‵","\\backprime");x(w,z,Q,"▲","\\blacktriangle");x(w,z,Q,"▼","\\blacktriangledown");x(w,z,Q,"■","\\blacksquare");x(w,z,Q,"⧫","\\blacklozenge");x(w,z,Q,"★","\\bigstar");x(w,z,Q,"∢","\\sphericalangle",!0);x(w,z,Q,"∁","\\complement",!0);x(w,z,Q,"ð","\\eth",!0);x(pe,_,Q,"ð","ð");x(w,z,Q,"╱","\\diagup");x(w,z,Q,"╲","\\diagdown");x(w,z,Q,"□","\\square");x(w,z,Q,"□","\\Box");x(w,z,Q,"◊","\\Diamond");x(w,z,Q,"¥","\\yen",!0);x(pe,z,Q,"¥","\\yen",!0);x(w,z,Q,"✓","\\checkmark",!0);x(pe,z,Q,"✓","\\checkmark");x(w,z,Q,"ℶ","\\beth",!0);x(w,z,Q,"ℸ","\\daleth",!0);x(w,z,Q,"ℷ","\\gimel",!0);x(w,z,Q,"ϝ","\\digamma",!0);x(w,z,Q,"ϰ","\\varkappa");x(w,z,vn,"┌","\\@ulcorner",!0);x(w,z,Xr,"┐","\\@urcorner",!0);x(w,z,vn,"└","\\@llcorner",!0);x(w,z,Xr,"┘","\\@lrcorner",!0);x(w,z,j,"≦","\\leqq",!0);x(w,z,j,"⩽","\\leqslant",!0);x(w,z,j,"⪕","\\eqslantless",!0);x(w,z,j,"≲","\\lesssim",!0);x(w,z,j,"⪅","\\lessapprox",!0);x(w,z,j,"≊","\\approxeq",!0);x(w,z,Me,"⋖","\\lessdot");x(w,z,j,"⋘","\\lll",!0);x(w,z,j,"≶","\\lessgtr",!0);x(w,z,j,"⋚","\\lesseqgtr",!0);x(w,z,j,"⪋","\\lesseqqgtr",!0);x(w,z,j,"≑","\\doteqdot");x(w,z,j,"≓","\\risingdotseq",!0);x(w,z,j,"≒","\\fallingdotseq",!0);x(w,z,j,"∽","\\backsim",!0);x(w,z,j,"⋍","\\backsimeq",!0);x(w,z,j,"⫅","\\subseteqq",!0);x(w,z,j,"⋐","\\Subset",!0);x(w,z,j,"⊏","\\sqsubset",!0);x(w,z,j,"≼","\\preccurlyeq",!0);x(w,z,j,"⋞","\\curlyeqprec",!0);x(w,z,j,"≾","\\precsim",!0);x(w,z,j,"⪷","\\precapprox",!0);x(w,z,j,"⊲","\\vartriangleleft");x(w,z,j,"⊴","\\trianglelefteq");x(w,z,j,"⊨","\\vDash",!0);x(w,z,j,"⊪","\\Vvdash",!0);x(w,z,j,"⌣","\\smallsmile");x(w,z,j,"⌢","\\smallfrown");x(w,z,j,"≏","\\bumpeq",!0);x(w,z,j,"≎","\\Bumpeq",!0);x(w,z,j,"≧","\\geqq",!0);x(w,z,j,"⩾","\\geqslant",!0);x(w,z,j,"⪖","\\eqslantgtr",!0);x(w,z,j,"≳","\\gtrsim",!0);x(w,z,j,"⪆","\\gtrapprox",!0);x(w,z,Me,"⋗","\\gtrdot");x(w,z,j,"⋙","\\ggg",!0);x(w,z,j,"≷","\\gtrless",!0);x(w,z,j,"⋛","\\gtreqless",!0);x(w,z,j,"⪌","\\gtreqqless",!0);x(w,z,j,"≖","\\eqcirc",!0);x(w,z,j,"≗","\\circeq",!0);x(w,z,j,"≜","\\triangleq",!0);x(w,z,j,"∼","\\thicksim");x(w,z,j,"≈","\\thickapprox");x(w,z,j,"⫆","\\supseteqq",!0);x(w,z,j,"⋑","\\Supset",!0);x(w,z,j,"⊐","\\sqsupset",!0);x(w,z,j,"≽","\\succcurlyeq",!0);x(w,z,j,"⋟","\\curlyeqsucc",!0);x(w,z,j,"≿","\\succsim",!0);x(w,z,j,"⪸","\\succapprox",!0);x(w,z,j,"⊳","\\vartriangleright");x(w,z,j,"⊵","\\trianglerighteq");x(w,z,j,"⊩","\\Vdash",!0);x(w,z,j,"∣","\\shortmid");x(w,z,j,"∥","\\shortparallel");x(w,z,j,"≬","\\between",!0);x(w,z,j,"⋔","\\pitchfork",!0);x(w,z,j,"∝","\\varpropto");x(w,z,j,"◀","\\blacktriangleleft");x(w,z,j,"∴","\\therefore",!0);x(w,z,j,"∍","\\backepsilon");x(w,z,j,"▶","\\blacktriangleright");x(w,z,j,"∵","\\because",!0);x(w,z,j,"⋘","\\llless");x(w,z,j,"⋙","\\gggtr");x(w,z,Me,"⊲","\\lhd");x(w,z,Me,"⊳","\\rhd");x(w,z,j,"≂","\\eqsim",!0);x(w,_,j,"⋈","\\Join");x(w,z,j,"≑","\\Doteq",!0);x(w,z,Me,"∔","\\dotplus",!0);x(w,z,Me,"∖","\\smallsetminus");x(w,z,Me,"⋒","\\Cap",!0);x(w,z,Me,"⋓","\\Cup",!0);x(w,z,Me,"⩞","\\doublebarwedge",!0);x(w,z,Me,"⊟","\\boxminus",!0);x(w,z,Me,"⊞","\\boxplus",!0);x(w,z,Me,"⋇","\\divideontimes",!0);x(w,z,Me,"⋉","\\ltimes",!0);x(w,z,Me,"⋊","\\rtimes",!0);x(w,z,Me,"⋋","\\leftthreetimes",!0);x(w,z,Me,"⋌","\\rightthreetimes",!0);x(w,z,Me,"⋏","\\curlywedge",!0);x(w,z,Me,"⋎","\\curlyvee",!0);x(w,z,Me,"⊝","\\circleddash",!0);x(w,z,Me,"⊛","\\circledast",!0);x(w,z,Me,"⋅","\\centerdot");x(w,z,Me,"⊺","\\intercal",!0);x(w,z,Me,"⋒","\\doublecap");x(w,z,Me,"⋓","\\doublecup");x(w,z,Me,"⊠","\\boxtimes",!0);x(w,z,j,"⇢","\\dashrightarrow",!0);x(w,z,j,"⇠","\\dashleftarrow",!0);x(w,z,j,"⇇","\\leftleftarrows",!0);x(w,z,j,"⇆","\\leftrightarrows",!0);x(w,z,j,"⇚","\\Lleftarrow",!0);x(w,z,j,"↞","\\twoheadleftarrow",!0);x(w,z,j,"↢","\\leftarrowtail",!0);x(w,z,j,"↫","\\looparrowleft",!0);x(w,z,j,"⇋","\\leftrightharpoons",!0);x(w,z,j,"↶","\\curvearrowleft",!0);x(w,z,j,"↺","\\circlearrowleft",!0);x(w,z,j,"↰","\\Lsh",!0);x(w,z,j,"⇈","\\upuparrows",!0);x(w,z,j,"↿","\\upharpoonleft",!0);x(w,z,j,"⇃","\\downharpoonleft",!0);x(w,_,j,"⊶","\\origof",!0);x(w,_,j,"⊷","\\imageof",!0);x(w,z,j,"⊸","\\multimap",!0);x(w,z,j,"↭","\\leftrightsquigarrow",!0);x(w,z,j,"⇉","\\rightrightarrows",!0);x(w,z,j,"⇄","\\rightleftarrows",!0);x(w,z,j,"↠","\\twoheadrightarrow",!0);x(w,z,j,"↣","\\rightarrowtail",!0);x(w,z,j,"↬","\\looparrowright",!0);x(w,z,j,"↷","\\curvearrowright",!0);x(w,z,j,"↻","\\circlearrowright",!0);x(w,z,j,"↱","\\Rsh",!0);x(w,z,j,"⇊","\\downdownarrows",!0);x(w,z,j,"↾","\\upharpoonright",!0);x(w,z,j,"⇂","\\downharpoonright",!0);x(w,z,j,"⇝","\\rightsquigarrow",!0);x(w,z,j,"⇝","\\leadsto");x(w,z,j,"⇛","\\Rrightarrow",!0);x(w,z,j,"↾","\\restriction");x(w,_,Q,"‘","`");x(w,_,Q,"$","\\$");x(pe,_,Q,"$","\\$");x(pe,_,Q,"$","\\textdollar");x(w,_,Q,"%","\\%");x(pe,_,Q,"%","\\%");x(w,_,Q,"_","\\_");x(pe,_,Q,"_","\\_");x(pe,_,Q,"_","\\textunderscore");x(w,_,Q,"∠","\\angle",!0);x(w,_,Q,"∞","\\infty",!0);x(w,_,Q,"′","\\prime");x(w,_,Q,"△","\\triangle");x(w,_,Q,"Γ","\\Gamma",!0);x(w,_,Q,"Δ","\\Delta",!0);x(w,_,Q,"Θ","\\Theta",!0);x(w,_,Q,"Λ","\\Lambda",!0);x(w,_,Q,"Ξ","\\Xi",!0);x(w,_,Q,"Π","\\Pi",!0);x(w,_,Q,"Σ","\\Sigma",!0);x(w,_,Q,"Υ","\\Upsilon",!0);x(w,_,Q,"Φ","\\Phi",!0);x(w,_,Q,"Ψ","\\Psi",!0);x(w,_,Q,"Ω","\\Omega",!0);x(w,_,Q,"A","Α");x(w,_,Q,"B","Β");x(w,_,Q,"E","Ε");x(w,_,Q,"Z","Ζ");x(w,_,Q,"H","Η");x(w,_,Q,"I","Ι");x(w,_,Q,"K","Κ");x(w,_,Q,"M","Μ");x(w,_,Q,"N","Ν");x(w,_,Q,"O","Ο");x(w,_,Q,"P","Ρ");x(w,_,Q,"T","Τ");x(w,_,Q,"X","Χ");x(w,_,Q,"¬","\\neg",!0);x(w,_,Q,"¬","\\lnot");x(w,_,Q,"⊤","\\top");x(w,_,Q,"⊥","\\bot");x(w,_,Q,"∅","\\emptyset");x(w,z,Q,"∅","\\varnothing");x(w,_,et,"α","\\alpha",!0);x(w,_,et,"β","\\beta",!0);x(w,_,et,"γ","\\gamma",!0);x(w,_,et,"δ","\\delta",!0);x(w,_,et,"ϵ","\\epsilon",!0);x(w,_,et,"ζ","\\zeta",!0);x(w,_,et,"η","\\eta",!0);x(w,_,et,"θ","\\theta",!0);x(w,_,et,"ι","\\iota",!0);x(w,_,et,"κ","\\kappa",!0);x(w,_,et,"λ","\\lambda",!0);x(w,_,et,"μ","\\mu",!0);x(w,_,et,"ν","\\nu",!0);x(w,_,et,"ξ","\\xi",!0);x(w,_,et,"ο","\\omicron",!0);x(w,_,et,"π","\\pi",!0);x(w,_,et,"ρ","\\rho",!0);x(w,_,et,"σ","\\sigma",!0);x(w,_,et,"τ","\\tau",!0);x(w,_,et,"υ","\\upsilon",!0);x(w,_,et,"ϕ","\\phi",!0);x(w,_,et,"χ","\\chi",!0);x(w,_,et,"ψ","\\psi",!0);x(w,_,et,"ω","\\omega",!0);x(w,_,et,"ε","\\varepsilon",!0);x(w,_,et,"ϑ","\\vartheta",!0);x(w,_,et,"ϖ","\\varpi",!0);x(w,_,et,"ϱ","\\varrho",!0);x(w,_,et,"ς","\\varsigma",!0);x(w,_,et,"φ","\\varphi",!0);x(w,_,Me,"∗","*",!0);x(w,_,Me,"+","+");x(w,_,Me,"−","-",!0);x(w,_,Me,"⋅","\\cdot",!0);x(w,_,Me,"∘","\\circ",!0);x(w,_,Me,"÷","\\div",!0);x(w,_,Me,"±","\\pm",!0);x(w,_,Me,"×","\\times",!0);x(w,_,Me,"∩","\\cap",!0);x(w,_,Me,"∪","\\cup",!0);x(w,_,Me,"∖","\\setminus",!0);x(w,_,Me,"∧","\\land");x(w,_,Me,"∨","\\lor");x(w,_,Me,"∧","\\wedge",!0);x(w,_,Me,"∨","\\vee",!0);x(w,_,Q,"√","\\surd");x(w,_,vn,"⟨","\\langle",!0);x(w,_,vn,"∣","\\lvert");x(w,_,vn,"∥","\\lVert");x(w,_,Xr,"?","?");x(w,_,Xr,"!","!");x(w,_,Xr,"⟩","\\rangle",!0);x(w,_,Xr,"∣","\\rvert");x(w,_,Xr,"∥","\\rVert");x(w,_,j,"=","=");x(w,_,j,":",":");x(w,_,j,"≈","\\approx",!0);x(w,_,j,"≅","\\cong",!0);x(w,_,j,"≥","\\ge");x(w,_,j,"≥","\\geq",!0);x(w,_,j,"←","\\gets");x(w,_,j,">","\\gt",!0);x(w,_,j,"∈","\\in",!0);x(w,_,j,"","\\@not");x(w,_,j,"⊂","\\subset",!0);x(w,_,j,"⊃","\\supset",!0);x(w,_,j,"⊆","\\subseteq",!0);x(w,_,j,"⊇","\\supseteq",!0);x(w,z,j,"⊈","\\nsubseteq",!0);x(w,z,j,"⊉","\\nsupseteq",!0);x(w,_,j,"⊨","\\models");x(w,_,j,"←","\\leftarrow",!0);x(w,_,j,"≤","\\le");x(w,_,j,"≤","\\leq",!0);x(w,_,j,"<","\\lt",!0);x(w,_,j,"→","\\rightarrow",!0);x(w,_,j,"→","\\to");x(w,z,j,"≱","\\ngeq",!0);x(w,z,j,"≰","\\nleq",!0);x(w,_,Gi," ","\\ ");x(w,_,Gi," ","\\space");x(w,_,Gi," ","\\nobreakspace");x(pe,_,Gi," ","\\ ");x(pe,_,Gi," "," ");x(pe,_,Gi," ","\\space");x(pe,_,Gi," ","\\nobreakspace");x(w,_,Gi,null,"\\nobreak");x(w,_,Gi,null,"\\allowbreak");x(w,_,ch,",",",");x(w,_,ch,";",";");x(w,z,Me,"⊼","\\barwedge",!0);x(w,z,Me,"⊻","\\veebar",!0);x(w,_,Me,"⊙","\\odot",!0);x(w,_,Me,"⊕","\\oplus",!0);x(w,_,Me,"⊗","\\otimes",!0);x(w,_,Q,"∂","\\partial",!0);x(w,_,Me,"⊘","\\oslash",!0);x(w,z,Me,"⊚","\\circledcirc",!0);x(w,z,Me,"⊡","\\boxdot",!0);x(w,_,Me,"△","\\bigtriangleup");x(w,_,Me,"▽","\\bigtriangledown");x(w,_,Me,"†","\\dagger");x(w,_,Me,"⋄","\\diamond");x(w,_,Me,"⋆","\\star");x(w,_,Me,"◃","\\triangleleft");x(w,_,Me,"▹","\\triangleright");x(w,_,vn,"{","\\{");x(pe,_,Q,"{","\\{");x(pe,_,Q,"{","\\textbraceleft");x(w,_,Xr,"}","\\}");x(pe,_,Q,"}","\\}");x(pe,_,Q,"}","\\textbraceright");x(w,_,vn,"{","\\lbrace");x(w,_,Xr,"}","\\rbrace");x(w,_,vn,"[","\\lbrack",!0);x(pe,_,Q,"[","\\lbrack",!0);x(w,_,Xr,"]","\\rbrack",!0);x(pe,_,Q,"]","\\rbrack",!0);x(w,_,vn,"(","\\lparen",!0);x(w,_,Xr,")","\\rparen",!0);x(pe,_,Q,"<","\\textless",!0);x(pe,_,Q,">","\\textgreater",!0);x(w,_,vn,"⌊","\\lfloor",!0);x(w,_,Xr,"⌋","\\rfloor",!0);x(w,_,vn,"⌈","\\lceil",!0);x(w,_,Xr,"⌉","\\rceil",!0);x(w,_,Q,"\\","\\backslash");x(w,_,Q,"∣","|");x(w,_,Q,"∣","\\vert");x(pe,_,Q,"|","\\textbar",!0);x(w,_,Q,"∥","\\|");x(w,_,Q,"∥","\\Vert");x(pe,_,Q,"∥","\\textbardbl");x(pe,_,Q,"~","\\textasciitilde");x(pe,_,Q,"\\","\\textbackslash");x(pe,_,Q,"^","\\textasciicircum");x(w,_,j,"↑","\\uparrow",!0);x(w,_,j,"⇑","\\Uparrow",!0);x(w,_,j,"↓","\\downarrow",!0);x(w,_,j,"⇓","\\Downarrow",!0);x(w,_,j,"↕","\\updownarrow",!0);x(w,_,j,"⇕","\\Updownarrow",!0);x(w,_,or,"∐","\\coprod");x(w,_,or,"⋁","\\bigvee");x(w,_,or,"⋀","\\bigwedge");x(w,_,or,"⨄","\\biguplus");x(w,_,or,"⋂","\\bigcap");x(w,_,or,"⋃","\\bigcup");x(w,_,or,"∫","\\int");x(w,_,or,"∫","\\intop");x(w,_,or,"∬","\\iint");x(w,_,or,"∭","\\iiint");x(w,_,or,"∏","\\prod");x(w,_,or,"∑","\\sum");x(w,_,or,"⨂","\\bigotimes");x(w,_,or,"⨁","\\bigoplus");x(w,_,or,"⨀","\\bigodot");x(w,_,or,"∮","\\oint");x(w,_,or,"∯","\\oiint");x(w,_,or,"∰","\\oiiint");x(w,_,or,"⨆","\\bigsqcup");x(w,_,or,"∫","\\smallint");x(pe,_,vo,"…","\\textellipsis");x(w,_,vo,"…","\\mathellipsis");x(pe,_,vo,"…","\\ldots",!0);x(w,_,vo,"…","\\ldots",!0);x(w,_,vo,"⋯","\\@cdots",!0);x(w,_,vo,"⋱","\\ddots",!0);x(w,_,Q,"⋮","\\varvdots");x(pe,_,Q,"⋮","\\varvdots");x(w,_,Wt,"ˊ","\\acute");x(w,_,Wt,"ˋ","\\grave");x(w,_,Wt,"¨","\\ddot");x(w,_,Wt,"~","\\tilde");x(w,_,Wt,"ˉ","\\bar");x(w,_,Wt,"˘","\\breve");x(w,_,Wt,"ˇ","\\check");x(w,_,Wt,"^","\\hat");x(w,_,Wt,"⃗","\\vec");x(w,_,Wt,"˙","\\dot");x(w,_,Wt,"˚","\\mathring");x(w,_,et,"","\\@imath");x(w,_,et,"","\\@jmath");x(w,_,Q,"ı","ı");x(w,_,Q,"ȷ","ȷ");x(pe,_,Q,"ı","\\i",!0);x(pe,_,Q,"ȷ","\\j",!0);x(pe,_,Q,"ß","\\ss",!0);x(pe,_,Q,"æ","\\ae",!0);x(pe,_,Q,"œ","\\oe",!0);x(pe,_,Q,"ø","\\o",!0);x(pe,_,Q,"Æ","\\AE",!0);x(pe,_,Q,"Œ","\\OE",!0);x(pe,_,Q,"Ø","\\O",!0);x(pe,_,Wt,"ˊ","\\'");x(pe,_,Wt,"ˋ","\\`");x(pe,_,Wt,"ˆ","\\^");x(pe,_,Wt,"˜","\\~");x(pe,_,Wt,"ˉ","\\=");x(pe,_,Wt,"˘","\\u");x(pe,_,Wt,"˙","\\.");x(pe,_,Wt,"¸","\\c");x(pe,_,Wt,"˚","\\r");x(pe,_,Wt,"ˇ","\\v");x(pe,_,Wt,"¨",'\\"');x(pe,_,Wt,"˝","\\H");x(pe,_,Wt,"◯","\\textcircled");var fv={"--":!0,"---":!0,"``":!0,"''":!0};x(pe,_,Q,"–","--",!0);x(pe,_,Q,"–","\\textendash");x(pe,_,Q,"—","---",!0);x(pe,_,Q,"—","\\textemdash");x(pe,_,Q,"‘","`",!0);x(pe,_,Q,"‘","\\textquoteleft");x(pe,_,Q,"’","'",!0);x(pe,_,Q,"’","\\textquoteright");x(pe,_,Q,"“","``",!0);x(pe,_,Q,"“","\\textquotedblleft");x(pe,_,Q,"”","''",!0);x(pe,_,Q,"”","\\textquotedblright");x(w,_,Q,"°","\\degree",!0);x(pe,_,Q,"°","\\degree");x(pe,_,Q,"°","\\textdegree",!0);x(w,_,Q,"£","\\pounds");x(w,_,Q,"£","\\mathsterling",!0);x(pe,_,Q,"£","\\pounds");x(pe,_,Q,"£","\\textsterling",!0);x(w,z,Q,"✠","\\maltese");x(pe,z,Q,"✠","\\maltese");var Zb='0123456789/@."';for(var Rd=0;Rd<Zb.length;Rd++){var Jb=Zb.charAt(Rd);x(w,_,Q,Jb,Jb)}var ey='0123456789!@*()-=+";:?/.,';for(var Bd=0;Bd<ey.length;Bd++){var ty=ey.charAt(Bd);x(pe,_,Q,ty,ty)}var r0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(var Dd=0;Dd<r0.length;Dd++){var Wc=r0.charAt(Dd);x(w,_,et,Wc,Wc),x(pe,_,Q,Wc,Wc)}x(w,z,Q,"C","ℂ");x(pe,z,Q,"C","ℂ");x(w,z,Q,"H","ℍ");x(pe,z,Q,"H","ℍ");x(w,z,Q,"N","ℕ");x(pe,z,Q,"N","ℕ");x(w,z,Q,"P","ℙ");x(pe,z,Q,"P","ℙ");x(w,z,Q,"Q","ℚ");x(pe,z,Q,"Q","ℚ");x(w,z,Q,"R","ℝ");x(pe,z,Q,"R","ℝ");x(w,z,Q,"Z","ℤ");x(pe,z,Q,"Z","ℤ");x(w,_,et,"h","ℎ");x(pe,_,et,"h","ℎ");var ot="";for(var Fr=0;Fr<r0.length;Fr++){var Vt=r0.charAt(Fr);ot=String.fromCharCode(55349,56320+Fr),x(w,_,et,Vt,ot),x(pe,_,Q,Vt,ot),ot=String.fromCharCode(55349,56372+Fr),x(w,_,et,Vt,ot),x(pe,_,Q,Vt,ot),ot=String.fromCharCode(55349,56424+Fr),x(w,_,et,Vt,ot),x(pe,_,Q,Vt,ot),ot=String.fromCharCode(55349,56580+Fr),x(w,_,et,Vt,ot),x(pe,_,Q,Vt,ot),ot=String.fromCharCode(55349,56684+Fr),x(w,_,et,Vt,ot),x(pe,_,Q,Vt,ot),ot=String.fromCharCode(55349,56736+Fr),x(w,_,et,Vt,ot),x(pe,_,Q,Vt,ot),ot=String.fromCharCode(55349,56788+Fr),x(w,_,et,Vt,ot),x(pe,_,Q,Vt,ot),ot=String.fromCharCode(55349,56840+Fr),x(w,_,et,Vt,ot),x(pe,_,Q,Vt,ot),ot=String.fromCharCode(55349,56944+Fr),x(w,_,et,Vt,ot),x(pe,_,Q,Vt,ot),Fr<26&&(ot=String.fromCharCode(55349,56632+Fr),x(w,_,et,Vt,ot),x(pe,_,Q,Vt,ot),ot=String.fromCharCode(55349,56476+Fr),x(w,_,et,Vt,ot),x(pe,_,Q,Vt,ot))}ot="𝕜";x(w,_,et,"k",ot);x(pe,_,Q,"k",ot);for(var Ma=0;Ma<10;Ma++){var ta=Ma.toString();ot=String.fromCharCode(55349,57294+Ma),x(w,_,et,ta,ot),x(pe,_,Q,ta,ot),ot=String.fromCharCode(55349,57314+Ma),x(w,_,et,ta,ot),x(pe,_,Q,ta,ot),ot=String.fromCharCode(55349,57324+Ma),x(w,_,et,ta,ot),x(pe,_,Q,ta,ot),ot=String.fromCharCode(55349,57334+Ma),x(w,_,et,ta,ot),x(pe,_,Q,ta,ot)}var Zf="ÐÞþ";for(var Od=0;Od<Zf.length;Od++){var Gc=Zf.charAt(Od);x(w,_,et,Gc,Gc),x(pe,_,Q,Gc,Gc)}var Yc=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],ry=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],zq=function(t,r){var n=t.charCodeAt(0),i=t.charCodeAt(1),a=(n-55296)*1024+(i-56320)+65536,s=r==="math"?0:1;if(119808<=a&&a<120484){var o=Math.floor((a-119808)/26);return[Yc[o][2],Yc[o][s]]}else if(120782<=a&&a<=120831){var l=Math.floor((a-120782)/10);return[ry[l][2],ry[l][s]]}else{if(a===120485||a===120486)return[Yc[0][2],Yc[0][s]];if(120486<a&&a<120782)return["",""];throw new xe("Unsupported character: "+t)}},uh=function(t,r,n){return Ft[n][t]&&Ft[n][t].replace&&(t=Ft[n][t].replace),{value:t,metrics:c1(t,r,n)}},Dn=function(t,r,n,i,a){var s=uh(t,r,n),o=s.metrics;t=s.value;var l;if(o){var c=o.italic;(n==="text"||i&&i.font==="mathit")&&(c=0),l=new Nn(t,o.height,o.depth,c,o.skew,o.width,a)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+t+"' in style '"+r+"' and mode '"+n+"'")),l=new Nn(t,0,0,0,0,0,a);if(i){l.maxFontSize=i.sizeMultiplier,i.style.isTight()&&l.classes.push("mtight");var u=i.getColor();u&&(l.style.color=u)}return l},Hq=function(t,r,n,i){return i===void 0&&(i=[]),n.font==="boldsymbol"&&uh(t,"Main-Bold",r).metrics?Dn(t,"Main-Bold",r,n,i.concat(["mathbf"])):t==="\\"||Ft[r][t].font==="main"?Dn(t,"Main-Regular",r,n,i):Dn(t,"AMS-Regular",r,n,i.concat(["amsrm"]))},qq=function(t,r,n,i,a){return a!=="textord"&&uh(t,"Math-BoldItalic",r).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},jq=function(t,r,n){var i=t.mode,a=t.text,s=["mord"],o=i==="math"||i==="text"&&r.font,l=o?r.font:r.fontFamily,c="",u="";if(a.charCodeAt(0)===55349&&([c,u]=zq(a,i)),c.length>0)return Dn(a,c,i,r,s.concat(u));if(l){var h,d;if(l==="boldsymbol"){var f=qq(a,i,r,s,n);h=f.fontName,d=[f.fontClass]}else o?(h=gv[l].fontName,d=[l]):(h=Vc(l,r.fontWeight,r.fontShape),d=[l,r.fontWeight,r.fontShape]);if(uh(a,h,i).metrics)return Dn(a,h,i,r,s.concat(d));if(fv.hasOwnProperty(a)&&h.slice(0,10)==="Typewriter"){for(var p=[],m=0;m<a.length;m++)p.push(Dn(a[m],h,i,r,s.concat(d)));return mv(p)}}if(n==="mathord")return Dn(a,"Math-Italic",i,r,s.concat(["mathnormal"]));if(n==="textord"){var b=Ft[i][a]&&Ft[i][a].font;if(b==="ams"){var y=Vc("amsrm",r.fontWeight,r.fontShape);return Dn(a,y,i,r,s.concat("amsrm",r.fontWeight,r.fontShape))}else if(b==="main"||!b){var v=Vc("textrm",r.fontWeight,r.fontShape);return Dn(a,v,i,r,s.concat(r.fontWeight,r.fontShape))}else{var T=Vc(b,r.fontWeight,r.fontShape);return Dn(a,T,i,r,s.concat(T,r.fontWeight,r.fontShape))}}else throw new Error("unexpected type: "+n+" in makeOrd")},Uq=(e,t)=>{if(fa(e.classes)!==fa(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(e.classes.length===1){var r=e.classes[0];if(r==="mbin"||r==="mord")return!1}for(var n in e.style)if(e.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;for(var i in t.style)if(t.style.hasOwnProperty(i)&&e.style[i]!==t.style[i])return!1;return!0},Wq=e=>{for(var t=0;t<e.length-1;t++){var r=e[t],n=e[t+1];r instanceof Nn&&n instanceof Nn&&Uq(r,n)&&(r.text+=n.text,r.height=Math.max(r.height,n.height),r.depth=Math.max(r.depth,n.depth),r.italic=n.italic,e.splice(t+1,1),t--)}return e},h1=function(t){for(var r=0,n=0,i=0,a=0;a<t.children.length;a++){var s=t.children[a];s.height>r&&(r=s.height),s.depth>n&&(n=s.depth),s.maxFontSize>i&&(i=s.maxFontSize)}t.height=r,t.depth=n,t.maxFontSize=i},en=function(t,r,n,i){var a=new xc(t,r,n,i);return h1(a),a},pv=(e,t,r,n)=>new xc(e,t,r,n),Gq=function(t,r,n){var i=en([t],[],r);return i.height=Math.max(n||r.fontMetrics().defaultRuleThickness,r.minRuleThickness),i.style.borderBottomWidth=Ee(i.height),i.maxFontSize=1,i},Yq=function(t,r,n,i){var a=new u1(t,r,n,i);return h1(a),a},mv=function(t){var r=new yc(t);return h1(r),r},Vq=function(t,r){return t instanceof yc?en([],[t],r):t},Xq=function(t){if(t.positionType==="individualShift"){for(var r=t.children,n=[r[0]],i=-r[0].shift-r[0].elem.depth,a=i,s=1;s<r.length;s++){var o=-r[s].shift-a-r[s].elem.depth,l=o-(r[s-1].elem.height+r[s-1].elem.depth);a=a+o,n.push({type:"kern",size:l}),n.push(r[s])}return{children:n,depth:i}}var c;if(t.positionType==="top"){for(var u=t.positionData,h=0;h<t.children.length;h++){var d=t.children[h];u-=d.type==="kern"?d.size:d.elem.height+d.elem.depth}c=u}else if(t.positionType==="bottom")c=-t.positionData;else{var f=t.children[0];if(f.type!=="elem")throw new Error('First child must have type "elem".');if(t.positionType==="shift")c=-f.elem.depth-t.positionData;else if(t.positionType==="firstBaseline")c=-f.elem.depth;else throw new Error("Invalid positionType "+t.positionType+".")}return{children:t.children,depth:c}},Kq=function(t,r){for(var{children:n,depth:i}=Xq(t),a=0,s=0;s<n.length;s++){var o=n[s];if(o.type==="elem"){var l=o.elem;a=Math.max(a,l.maxFontSize,l.height)}}a+=2;var c=en(["pstrut"],[]);c.style.height=Ee(a);for(var u=[],h=i,d=i,f=i,p=0;p<n.length;p++){var m=n[p];if(m.type==="kern")f+=m.size;else{var b=m.elem,y=m.wrapperClasses||[],v=m.wrapperStyle||{},T=en(y,[c,b],void 0,v);T.style.top=Ee(-a-f-b.depth),m.marginLeft&&(T.style.marginLeft=m.marginLeft),m.marginRight&&(T.style.marginRight=m.marginRight),u.push(T),f+=b.height+b.depth}h=Math.min(h,f),d=Math.max(d,f)}var A=en(["vlist"],u);A.style.height=Ee(d);var E;if(h<0){var S=en([],[]),I=en(["vlist"],[S]);I.style.height=Ee(-h);var D=en(["vlist-s"],[new Nn("")]);E=[en(["vlist-r"],[A,D]),en(["vlist-r"],[I])]}else E=[en(["vlist-r"],[A])];var H=en(["vlist-t"],E);return E.length===2&&H.classes.push("vlist-t2"),H.height=d,H.depth=-h,H},Qq=(e,t)=>{var r=en(["mspace"],[],t),n=Yt(e,t);return r.style.marginRight=Ee(n),r},Vc=function(t,r,n){var i="";switch(t){case"amsrm":i="AMS";break;case"textrm":i="Main";break;case"textsf":i="SansSerif";break;case"texttt":i="Typewriter";break;default:i=t}var a;return r==="textbf"&&n==="textit"?a="BoldItalic":r==="textbf"?a="Bold":r==="textit"?a="Italic":a="Regular",i+"-"+a},gv={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},bv={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Zq=function(t,r){var[n,i,a]=bv[t],s=new pa(n),o=new $i([s],{width:Ee(i),height:Ee(a),style:"width:"+Ee(i),viewBox:"0 0 "+1e3*i+" "+1e3*a,preserveAspectRatio:"xMinYMin"}),l=pv(["overlay"],[o],r);return l.height=a,l.style.height=Ee(a),l.style.width=Ee(i),l},ie={fontMap:gv,makeSymbol:Dn,mathsym:Hq,makeSpan:en,makeSvgSpan:pv,makeLineSpan:Gq,makeAnchor:Yq,makeFragment:mv,wrapFragment:Vq,makeVList:Kq,makeOrd:jq,makeGlue:Qq,staticSvg:Zq,svgData:bv,tryCombineChars:Wq},Gt={number:3,unit:"mu"},Ia={number:4,unit:"mu"},Ti={number:5,unit:"mu"},Jq={mord:{mop:Gt,mbin:Ia,mrel:Ti,minner:Gt},mop:{mord:Gt,mop:Gt,mrel:Ti,minner:Gt},mbin:{mord:Ia,mop:Ia,mopen:Ia,minner:Ia},mrel:{mord:Ti,mop:Ti,mopen:Ti,minner:Ti},mopen:{},mclose:{mop:Gt,mbin:Ia,mrel:Ti,minner:Gt},mpunct:{mord:Gt,mop:Gt,mrel:Ti,mopen:Gt,mclose:Gt,mpunct:Gt,minner:Gt},minner:{mord:Gt,mop:Gt,mbin:Ia,mrel:Ti,mopen:Gt,mpunct:Gt,minner:Gt}},ej={mord:{mop:Gt},mop:{mord:Gt,mop:Gt},mbin:{},mrel:{},mopen:{},mclose:{mop:Gt},mpunct:{},minner:{mop:Gt}},yv={},n0={},i0={};function Ne(e){for(var{type:t,names:r,props:n,handler:i,htmlBuilder:a,mathmlBuilder:s}=e,o={type:t,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:n.allowedInMath===void 0?!0:n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:i},l=0;l<r.length;++l)yv[r[l]]=o;t&&(a&&(n0[t]=a),s&&(i0[t]=s))}function us(e){var{type:t,htmlBuilder:r,mathmlBuilder:n}=e;Ne({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:r,mathmlBuilder:n})}var a0=function(t){return t.type==="ordgroup"&&t.body.length===1?t.body[0]:t},Zt=function(t){return t.type==="ordgroup"?t.body:[t]},zi=ie.makeSpan,tj=["leftmost","mbin","mopen","mrel","mop","mpunct"],rj=["rightmost","mrel","mclose","mpunct"],nj={display:tt.DISPLAY,text:tt.TEXT,script:tt.SCRIPT,scriptscript:tt.SCRIPTSCRIPT},ij={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},fr=function(t,r,n,i){i===void 0&&(i=[null,null]);for(var a=[],s=0;s<t.length;s++){var o=St(t[s],r);if(o instanceof yc){var l=o.children;a.push(...l)}else a.push(o)}if(ie.tryCombineChars(a),!n)return a;var c=r;if(t.length===1){var u=t[0];u.type==="sizing"?c=r.havingSize(u.size):u.type==="styling"&&(c=r.havingStyle(nj[u.style]))}var h=zi([i[0]||"leftmost"],[],r),d=zi([i[1]||"rightmost"],[],r),f=n==="root";return ny(a,(p,m)=>{var b=m.classes[0],y=p.classes[0];b==="mbin"&&rj.includes(y)?m.classes[0]="mord":y==="mbin"&&tj.includes(b)&&(p.classes[0]="mord")},{node:h},d,f),ny(a,(p,m)=>{var b=Jf(m),y=Jf(p),v=b&&y?p.hasClass("mtight")?ej[b][y]:Jq[b][y]:null;if(v)return ie.makeGlue(v,c)},{node:h},d,f),a},ny=function e(t,r,n,i,a){i&&t.push(i);for(var s=0;s<t.length;s++){var o=t[s],l=xv(o);if(l){e(l.children,r,n,null,a);continue}var c=!o.hasClass("mspace");if(c){var u=r(o,n.node);u&&(n.insertAfter?n.insertAfter(u):(t.unshift(u),s++))}c?n.node=o:a&&o.hasClass("newline")&&(n.node=zi(["leftmost"])),n.insertAfter=(h=>d=>{t.splice(h+1,0,d),s++})(s)}i&&t.pop()},xv=function(t){return t instanceof yc||t instanceof u1||t instanceof xc&&t.hasClass("enclosing")?t:null},aj=function e(t,r){var n=xv(t);if(n){var i=n.children;if(i.length){if(r==="right")return e(i[i.length-1],"right");if(r==="left")return e(i[0],"left")}}return t},Jf=function(t,r){return t?(r&&(t=aj(t,r)),ij[t.classes[0]]||null):null},Gl=function(t,r){var n=["nulldelimiter"].concat(t.baseSizingClasses());return zi(r.concat(n))},St=function(t,r,n){if(!t)return zi();if(n0[t.type]){var i=n0[t.type](t,r);if(n&&r.size!==n.size){i=zi(r.sizingClasses(n),[i],r);var a=r.sizeMultiplier/n.sizeMultiplier;i.height*=a,i.depth*=a}return i}else throw new xe("Got group of unknown type: '"+t.type+"'")};function Xc(e,t){var r=zi(["base"],e,t),n=zi(["strut"]);return n.style.height=Ee(r.height+r.depth),r.depth&&(n.style.verticalAlign=Ee(-r.depth)),r.children.unshift(n),r}function ep(e,t){var r=null;e.length===1&&e[0].type==="tag"&&(r=e[0].tag,e=e[0].body);var n=fr(e,t,"root"),i;n.length===2&&n[1].hasClass("tag")&&(i=n.pop());for(var a=[],s=[],o=0;o<n.length;o++)if(s.push(n[o]),n[o].hasClass("mbin")||n[o].hasClass("mrel")||n[o].hasClass("allowbreak")){for(var l=!1;o<n.length-1&&n[o+1].hasClass("mspace")&&!n[o+1].hasClass("newline");)o++,s.push(n[o]),n[o].hasClass("nobreak")&&(l=!0);l||(a.push(Xc(s,t)),s=[])}else n[o].hasClass("newline")&&(s.pop(),s.length>0&&(a.push(Xc(s,t)),s=[]),a.push(n[o]));s.length>0&&a.push(Xc(s,t));var c;r?(c=Xc(fr(r,t,!0)),c.classes=["tag"],a.push(c)):i&&a.push(i);var u=zi(["katex-html"],a);if(u.setAttribute("aria-hidden","true"),c){var h=c.children[0];h.style.height=Ee(u.height+u.depth),u.depth&&(h.style.verticalAlign=Ee(-u.depth))}return u}function vv(e){return new yc(e)}class fn{constructor(t,r,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=t,this.attributes={},this.children=r||[],this.classes=n||[]}setAttribute(t,r){this.attributes[t]=r}getAttribute(t){return this.attributes[t]}toNode(){var t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&t.setAttribute(r,this.attributes[r]);this.classes.length>0&&(t.className=fa(this.classes));for(var n=0;n<this.children.length;n++)if(this.children[n]instanceof si&&this.children[n+1]instanceof si){for(var i=this.children[n].toText()+this.children[++n].toText();this.children[n+1]instanceof si;)i+=this.children[++n].toText();t.appendChild(new si(i).toNode())}else t.appendChild(this.children[n].toNode());return t}toMarkup(){var t="<"+this.type;for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&(t+=" "+r+'="',t+=_t.escape(this.attributes[r]),t+='"');this.classes.length>0&&(t+=' class ="'+_t.escape(fa(this.classes))+'"'),t+=">";for(var n=0;n<this.children.length;n++)t+=this.children[n].toMarkup();return t+="</"+this.type+">",t}toText(){return this.children.map(t=>t.toText()).join("")}}class si{constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return _t.escape(this.toText())}toText(){return this.text}}class sj{constructor(t){this.width=void 0,this.character=void 0,this.width=t,t>=.05555&&t<=.05556?this.character=" ":t>=.1666&&t<=.1667?this.character=" ":t>=.2222&&t<=.2223?this.character=" ":t>=.2777&&t<=.2778?this.character=" ":t>=-.05556&&t<=-.05555?this.character=" ":t>=-.1667&&t<=-.1666?this.character=" ":t>=-.2223&&t<=-.2222?this.character=" ":t>=-.2778&&t<=-.2777?this.character=" ":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var t=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return t.setAttribute("width",Ee(this.width)),t}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+Ee(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var ye={MathNode:fn,TextNode:si,SpaceNode:sj,newDocumentFragment:vv},Ln=function(t,r,n){return Ft[r][t]&&Ft[r][t].replace&&t.charCodeAt(0)!==55349&&!(fv.hasOwnProperty(t)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(t=Ft[r][t].replace),new ye.TextNode(t)},d1=function(t){return t.length===1?t[0]:new ye.MathNode("mrow",t)},f1=function(t,r){if(r.fontFamily==="texttt")return"monospace";if(r.fontFamily==="textsf")return r.fontShape==="textit"&&r.fontWeight==="textbf"?"sans-serif-bold-italic":r.fontShape==="textit"?"sans-serif-italic":r.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(r.fontShape==="textit"&&r.fontWeight==="textbf")return"bold-italic";if(r.fontShape==="textit")return"italic";if(r.fontWeight==="textbf")return"bold";var n=r.font;if(!n||n==="mathnormal")return null;var i=t.mode;if(n==="mathit")return"italic";if(n==="boldsymbol")return t.type==="textord"?"bold":"bold-italic";if(n==="mathbf")return"bold";if(n==="mathbb")return"double-struck";if(n==="mathsfit")return"sans-serif-italic";if(n==="mathfrak")return"fraktur";if(n==="mathscr"||n==="mathcal")return"script";if(n==="mathsf")return"sans-serif";if(n==="mathtt")return"monospace";var a=t.text;if(["\\imath","\\jmath"].includes(a))return null;Ft[i][a]&&Ft[i][a].replace&&(a=Ft[i][a].replace);var s=ie.fontMap[n].fontName;return c1(a,s,i)?ie.fontMap[n].variant:null};function Pd(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var t=e.children[0];return t instanceof si&&t.text==="."}else if(e.type==="mo"&&e.children.length===1&&e.getAttribute("separator")==="true"&&e.getAttribute("lspace")==="0em"&&e.getAttribute("rspace")==="0em"){var r=e.children[0];return r instanceof si&&r.text===","}else return!1}var sn=function(t,r,n){if(t.length===1){var i=Ot(t[0],r);return n&&i instanceof fn&&i.type==="mo"&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i]}for(var a=[],s,o=0;o<t.length;o++){var l=Ot(t[o],r);if(l instanceof fn&&s instanceof fn){if(l.type==="mtext"&&s.type==="mtext"&&l.getAttribute("mathvariant")===s.getAttribute("mathvariant")){s.children.push(...l.children);continue}else if(l.type==="mn"&&s.type==="mn"){s.children.push(...l.children);continue}else if(Pd(l)&&s.type==="mn"){s.children.push(...l.children);continue}else if(l.type==="mn"&&Pd(s))l.children=[...s.children,...l.children],a.pop();else if((l.type==="msup"||l.type==="msub")&&l.children.length>=1&&(s.type==="mn"||Pd(s))){var c=l.children[0];c instanceof fn&&c.type==="mn"&&(c.children=[...s.children,...c.children],a.pop())}else if(s.type==="mi"&&s.children.length===1){var u=s.children[0];if(u instanceof si&&u.text==="̸"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var h=l.children[0];h instanceof si&&h.text.length>0&&(h.text=h.text.slice(0,1)+"̸"+h.text.slice(1),a.pop())}}}a.push(l),s=l}return a},ma=function(t,r,n){return d1(sn(t,r,n))},Ot=function(t,r){if(!t)return new ye.MathNode("mrow");if(i0[t.type]){var n=i0[t.type](t,r);return n}else throw new xe("Got group of unknown type: '"+t.type+"'")};function iy(e,t,r,n,i){var a=sn(e,r),s;a.length===1&&a[0]instanceof fn&&["mrow","mtable"].includes(a[0].type)?s=a[0]:s=new ye.MathNode("mrow",a);var o=new ye.MathNode("annotation",[new ye.TextNode(t)]);o.setAttribute("encoding","application/x-tex");var l=new ye.MathNode("semantics",[s,o]),c=new ye.MathNode("math",[l]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&c.setAttribute("display","block");var u=i?"katex":"katex-mathml";return ie.makeSpan([u],[c])}var kv=function(t){return new Li({style:t.displayMode?tt.DISPLAY:tt.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},wv=function(t,r){if(r.displayMode){var n=["katex-display"];r.leqno&&n.push("leqno"),r.fleqn&&n.push("fleqn"),t=ie.makeSpan(n,[t])}return t},oj=function(t,r,n){var i=kv(n),a;if(n.output==="mathml")return iy(t,r,i,n.displayMode,!0);if(n.output==="html"){var s=ep(t,i);a=ie.makeSpan(["katex"],[s])}else{var o=iy(t,r,i,n.displayMode,!1),l=ep(t,i);a=ie.makeSpan(["katex"],[o,l])}return wv(a,n)},lj=function(t,r,n){var i=kv(n),a=ep(t,i),s=ie.makeSpan(["katex"],[a]);return wv(s,n)},cj={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},uj=function(t){var r=new ye.MathNode("mo",[new ye.TextNode(cj[t.replace(/^\\/,"")])]);return r.setAttribute("stretchy","true"),r},hj={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},dj=function(t){return t.type==="ordgroup"?t.body.length:1},fj=function(t,r){function n(){var o=4e5,l=t.label.slice(1);if(["widehat","widecheck","widetilde","utilde"].includes(l)){var c=t,u=dj(c.base),h,d,f;if(u>5)l==="widehat"||l==="widecheck"?(h=420,o=2364,f=.42,d=l+"4"):(h=312,o=2340,f=.34,d="tilde4");else{var p=[1,1,2,2,3,3][u];l==="widehat"||l==="widecheck"?(o=[0,1062,2364,2364,2364][p],h=[0,239,300,360,420][p],f=[0,.24,.3,.3,.36,.42][p],d=l+p):(o=[0,600,1033,2339,2340][p],h=[0,260,286,306,312][p],f=[0,.26,.286,.3,.306,.34][p],d="tilde"+p)}var m=new pa(d),b=new $i([m],{width:"100%",height:Ee(f),viewBox:"0 0 "+o+" "+h,preserveAspectRatio:"none"});return{span:ie.makeSvgSpan([],[b],r),minWidth:0,height:f}}else{var y=[],v=hj[l],[T,A,E]=v,S=E/1e3,I=T.length,D,H;if(I===1){var R=v[3];D=["hide-tail"],H=[R]}else if(I===2)D=["halfarrow-left","halfarrow-right"],H=["xMinYMin","xMaxYMin"];else if(I===3)D=["brace-left","brace-center","brace-right"],H=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
|
|
381
|
+
`+I+" children.");for(var F=0;F<I;F++){var G=new pa(T[F]),ee=new $i([G],{width:"400em",height:Ee(S),viewBox:"0 0 "+o+" "+E,preserveAspectRatio:H[F]+" slice"}),$=ie.makeSvgSpan([D[F]],[ee],r);if(I===1)return{span:$,minWidth:A,height:S};$.style.height=Ee(S),y.push($)}return{span:ie.makeSpan(["stretchy"],y,r),minWidth:A,height:S}}}var{span:i,minWidth:a,height:s}=n();return i.height=s,i.style.height=Ee(s),a>0&&(i.style.minWidth=Ee(a)),i},pj=function(t,r,n,i,a){var s,o=t.height+t.depth+n+i;if(/fbox|color|angl/.test(r)){if(s=ie.makeSpan(["stretchy",r],[],a),r==="fbox"){var l=a.color&&a.getColor();l&&(s.style.borderColor=l)}}else{var c=[];/^[bx]cancel$/.test(r)&&c.push(new Qf({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(r)&&c.push(new Qf({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var u=new $i(c,{width:"100%",height:Ee(o)});s=ie.makeSvgSpan([],[u],a)}return s.height=o,s.style.height=Ee(o),s},Hi={encloseSpan:pj,mathMLnode:uj,svgSpan:fj};function gt(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function p1(e){var t=hh(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function hh(e){return e&&(e.type==="atom"||$q.hasOwnProperty(e.type))?e:null}var m1=(e,t)=>{var r,n,i;e&&e.type==="supsub"?(n=gt(e.base,"accent"),r=n.base,e.base=r,i=Pq(St(e,t)),e.base=n):(n=gt(e,"accent"),r=n.base);var a=St(r,t.havingCrampedStyle()),s=n.isShifty&&_t.isCharacterBox(r),o=0;if(s){var l=_t.getBaseElem(r),c=St(l,t.havingCrampedStyle());o=Qb(c).skew}var u=n.label==="\\c",h=u?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight),d;if(n.isStretchy)d=Hi.svgSpan(n,t),d=ie.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:d,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+Ee(2*o)+")",marginLeft:Ee(2*o)}:void 0}]},t);else{var f,p;n.label==="\\vec"?(f=ie.staticSvg("vec",t),p=ie.svgData.vec[1]):(f=ie.makeOrd({mode:n.mode,text:n.label},t,"textord"),f=Qb(f),f.italic=0,p=f.width,u&&(h+=f.depth)),d=ie.makeSpan(["accent-body"],[f]);var m=n.label==="\\textcircled";m&&(d.classes.push("accent-full"),h=a.height);var b=o;m||(b-=p/2),d.style.left=Ee(b),n.label==="\\textcircled"&&(d.style.top=".2em"),d=ie.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-h},{type:"elem",elem:d}]},t)}var y=ie.makeSpan(["mord","accent"],[d],t);return i?(i.children[0]=y,i.height=Math.max(y.height,i.height),i.classes[0]="mord",i):y},Tv=(e,t)=>{var r=e.isStretchy?Hi.mathMLnode(e.label):new ye.MathNode("mo",[Ln(e.label,e.mode)]),n=new ye.MathNode("mover",[Ot(e.base,t),r]);return n.setAttribute("accent","true"),n},mj=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));Ne({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var r=a0(t[0]),n=!mj.test(e.funcName),i=!n||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,isShifty:i,base:r}},htmlBuilder:m1,mathmlBuilder:Tv});Ne({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var r=t[0],n=e.parser.mode;return n==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:e.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:m1,mathmlBuilder:Tv});Ne({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0];return{type:"accentUnder",mode:r.mode,label:n,base:i}},htmlBuilder:(e,t)=>{var r=St(e.base,t),n=Hi.svgSpan(e,t),i=e.label==="\\utilde"?.12:0,a=ie.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:r}]},t);return ie.makeSpan(["mord","accentunder"],[a],t)},mathmlBuilder:(e,t)=>{var r=Hi.mathMLnode(e.label),n=new ye.MathNode("munder",[Ot(e.base,t),r]);return n.setAttribute("accentunder","true"),n}});var Kc=e=>{var t=new ye.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};Ne({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:n,funcName:i}=e;return{type:"xArrow",mode:n.mode,label:i,body:t[0],below:r[0]}},htmlBuilder(e,t){var r=t.style,n=t.havingStyle(r.sup()),i=ie.wrapFragment(St(e.body,n,t),t),a=e.label.slice(0,2)==="\\x"?"x":"cd";i.classes.push(a+"-arrow-pad");var s;e.below&&(n=t.havingStyle(r.sub()),s=ie.wrapFragment(St(e.below,n,t),t),s.classes.push(a+"-arrow-pad"));var o=Hi.svgSpan(e,t),l=-t.fontMetrics().axisHeight+.5*o.height,c=-t.fontMetrics().axisHeight-.5*o.height-.111;(i.depth>.25||e.label==="\\xleftequilibrium")&&(c-=i.depth);var u;if(s){var h=-t.fontMetrics().axisHeight+s.height+.5*o.height+.111;u=ie.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:c},{type:"elem",elem:o,shift:l},{type:"elem",elem:s,shift:h}]},t)}else u=ie.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:c},{type:"elem",elem:o,shift:l}]},t);return u.children[0].children[0].children[1].classes.push("svg-align"),ie.makeSpan(["mrel","x-arrow"],[u],t)},mathmlBuilder(e,t){var r=Hi.mathMLnode(e.label);r.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(e.body){var i=Kc(Ot(e.body,t));if(e.below){var a=Kc(Ot(e.below,t));n=new ye.MathNode("munderover",[r,a,i])}else n=new ye.MathNode("mover",[r,i])}else if(e.below){var s=Kc(Ot(e.below,t));n=new ye.MathNode("munder",[r,s])}else n=Kc(),n=new ye.MathNode("mover",[r,n]);return n}});var gj=ie.makeSpan;function Cv(e,t){var r=fr(e.body,t,!0);return gj([e.mclass],r,t)}function Sv(e,t){var r,n=sn(e.body,t);return e.mclass==="minner"?r=new ye.MathNode("mpadded",n):e.mclass==="mord"?e.isCharacterBox?(r=n[0],r.type="mi"):r=new ye.MathNode("mi",n):(e.isCharacterBox?(r=n[0],r.type="mo"):r=new ye.MathNode("mo",n),e.mclass==="mbin"?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):e.mclass==="mpunct"?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(r.attributes.lspace="0em",r.attributes.rspace="0em"):e.mclass==="minner"&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}Ne({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:r,funcName:n}=e,i=t[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:Zt(i),isCharacterBox:_t.isCharacterBox(i)}},htmlBuilder:Cv,mathmlBuilder:Sv});var dh=e=>{var t=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return t.type==="atom"&&(t.family==="bin"||t.family==="rel")?"m"+t.family:"mord"};Ne({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:r}=e;return{type:"mclass",mode:r.mode,mclass:dh(t[0]),body:Zt(t[1]),isCharacterBox:_t.isCharacterBox(t[1])}}});Ne({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:r,funcName:n}=e,i=t[1],a=t[0],s;n!=="\\stackrel"?s=dh(i):s="mrel";var o={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:Zt(i)},l={type:"supsub",mode:a.mode,base:o,sup:n==="\\underset"?null:a,sub:n==="\\underset"?a:null};return{type:"mclass",mode:r.mode,mclass:s,body:[l],isCharacterBox:_t.isCharacterBox(l)}},htmlBuilder:Cv,mathmlBuilder:Sv});Ne({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"pmb",mode:r.mode,mclass:dh(t[0]),body:Zt(t[0])}},htmlBuilder(e,t){var r=fr(e.body,t,!0),n=ie.makeSpan([e.mclass],r,t);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(e,t){var r=sn(e.body,t),n=new ye.MathNode("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var bj={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},ay=()=>({type:"styling",body:[],mode:"math",style:"display"}),sy=e=>e.type==="textord"&&e.text==="@",yj=(e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t;function xj(e,t,r){var n=bj[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{var i=r.callFunction("\\\\cdleft",[t[0]],[]),a={type:"atom",text:n,mode:"math",family:"rel"},s=r.callFunction("\\Big",[a],[]),o=r.callFunction("\\\\cdright",[t[1]],[]),l={type:"ordgroup",mode:"math",body:[i,s,o]};return r.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var c={type:"textord",text:"\\Vert",mode:"math"};return r.callFunction("\\Big",[c],[])}default:return{type:"textord",text:" ",mode:"math"}}}function vj(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var r=e.fetch().text;if(r==="&"||r==="\\\\")e.consume();else if(r==="\\end"){t[t.length-1].length===0&&t.pop();break}else throw new xe("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var n=[],i=[n],a=0;a<t.length;a++){for(var s=t[a],o=ay(),l=0;l<s.length;l++)if(!sy(s[l]))o.body.push(s[l]);else{n.push(o),l+=1;var c=p1(s[l]).text,u=new Array(2);if(u[0]={type:"ordgroup",mode:"math",body:[]},u[1]={type:"ordgroup",mode:"math",body:[]},!("=|.".indexOf(c)>-1))if("<>AV".indexOf(c)>-1)for(var h=0;h<2;h++){for(var d=!0,f=l+1;f<s.length;f++){if(yj(s[f],c)){d=!1,l=f;break}if(sy(s[f]))throw new xe("Missing a "+c+" character to complete a CD arrow.",s[f]);u[h].body.push(s[f])}if(d)throw new xe("Missing a "+c+" character to complete a CD arrow.",s[l])}else throw new xe('Expected one of "<>AV=|." after @',s[l]);var p=xj(c,u,e),m={type:"styling",body:[p],mode:"math",style:"display"};n.push(m),o=ay()}a%2===0?n.push(o):n.shift(),n=[],i.push(n)}e.gullet.endGroup(),e.gullet.endGroup();var b=new Array(i[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:b,colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}Ne({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:t[0]}},htmlBuilder(e,t){var r=t.havingStyle(t.style.sup()),n=ie.wrapFragment(St(e.label,r,t),t);return n.classes.push("cd-label-"+e.side),n.style.bottom=Ee(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(e,t){var r=new ye.MathNode("mrow",[Ot(e.label,t)]);return r=new ye.MathNode("mpadded",[r]),r.setAttribute("width","0"),e.side==="left"&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),r=new ye.MathNode("mstyle",[r]),r.setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}});Ne({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:r}=e;return{type:"cdlabelparent",mode:r.mode,fragment:t[0]}},htmlBuilder(e,t){var r=ie.wrapFragment(St(e.fragment,t),t);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder(e,t){return new ye.MathNode("mrow",[Ot(e.fragment,t)])}});Ne({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:r}=e,n=gt(t[0],"ordgroup"),i=n.body,a="",s=0;s<i.length;s++){var o=gt(i[s],"textord");a+=o.text}var l=parseInt(a),c;if(isNaN(l))throw new xe("\\@char has non-numeric argument "+a);if(l<0||l>=1114111)throw new xe("\\@char with invalid code point "+a);return l<=65535?c=String.fromCharCode(l):(l-=65536,c=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:r.mode,text:c}}});var Ev=(e,t)=>{var r=fr(e.body,t.withColor(e.color),!1);return ie.makeFragment(r)},_v=(e,t)=>{var r=sn(e.body,t.withColor(e.color)),n=new ye.MathNode("mstyle",r);return n.setAttribute("mathcolor",e.color),n};Ne({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:r}=e,n=gt(t[0],"color-token").color,i=t[1];return{type:"color",mode:r.mode,color:n,body:Zt(i)}},htmlBuilder:Ev,mathmlBuilder:_v});Ne({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:r,breakOnTokenText:n}=e,i=gt(t[0],"color-token").color;r.gullet.macros.set("\\current@color",i);var a=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:i,body:a}},htmlBuilder:Ev,mathmlBuilder:_v});Ne({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){var{parser:n}=e,i=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,a=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:a,size:i&>(i,"size").value}},htmlBuilder(e,t){var r=ie.makeSpan(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size&&(r.style.marginTop=Ee(Yt(e.size,t)))),r},mathmlBuilder(e,t){var r=new ye.MathNode("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size&&r.setAttribute("height",Ee(Yt(e.size,t)))),r}});var tp={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Av=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new xe("Expected a control sequence",e);return t},kj=e=>{var t=e.gullet.popToken();return t.text==="="&&(t=e.gullet.popToken(),t.text===" "&&(t=e.gullet.popToken())),t},Nv=(e,t,r,n)=>{var i=e.gullet.macros.get(r.text);i==null&&(r.noexpand=!0,i={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,i,n)};Ne({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:r}=e;t.consumeSpaces();var n=t.fetch();if(tp[n.text])return(r==="\\global"||r==="\\\\globallong")&&(n.text=tp[n.text]),gt(t.parseFunction(),"internal");throw new xe("Invalid token after macro prefix",n)}});Ne({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=t.gullet.popToken(),i=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new xe("Expected a control sequence",n);for(var a=0,s,o=[[]];t.gullet.future().text!=="{";)if(n=t.gullet.popToken(),n.text==="#"){if(t.gullet.future().text==="{"){s=t.gullet.future(),o[a].push("{");break}if(n=t.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new xe('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==a+1)throw new xe('Argument number "'+n.text+'" out of order');a++,o.push([])}else{if(n.text==="EOF")throw new xe("Expected a macro definition");o[a].push(n.text)}var{tokens:l}=t.gullet.consumeArg();return s&&l.unshift(s),(r==="\\edef"||r==="\\xdef")&&(l=t.gullet.expandTokens(l),l.reverse()),t.gullet.macros.set(i,{tokens:l,numArgs:a,delimiters:o},r===tp[r]),{type:"internal",mode:t.mode}}});Ne({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=Av(t.gullet.popToken());t.gullet.consumeSpaces();var i=kj(t);return Nv(t,n,i,r==="\\\\globallet"),{type:"internal",mode:t.mode}}});Ne({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=Av(t.gullet.popToken()),i=t.gullet.popToken(),a=t.gullet.popToken();return Nv(t,n,a,r==="\\\\globalfuture"),t.gullet.pushToken(a),t.gullet.pushToken(i),{type:"internal",mode:t.mode}}});var sl=function(t,r,n){var i=Ft.math[t]&&Ft.math[t].replace,a=c1(i||t,r,n);if(!a)throw new Error("Unsupported symbol "+t+" and font size "+r+".");return a},g1=function(t,r,n,i){var a=n.havingBaseStyle(r),s=ie.makeSpan(i.concat(a.sizingClasses(n)),[t],n),o=a.sizeMultiplier/n.sizeMultiplier;return s.height*=o,s.depth*=o,s.maxFontSize=a.sizeMultiplier,s},Lv=function(t,r,n){var i=r.havingBaseStyle(n),a=(1-r.sizeMultiplier/i.sizeMultiplier)*r.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=Ee(a),t.height-=a,t.depth+=a},wj=function(t,r,n,i,a,s){var o=ie.makeSymbol(t,"Main-Regular",a,i),l=g1(o,r,i,s);return n&&Lv(l,i,r),l},Tj=function(t,r,n,i){return ie.makeSymbol(t,"Size"+r+"-Regular",n,i)},Mv=function(t,r,n,i,a,s){var o=Tj(t,r,a,i),l=g1(ie.makeSpan(["delimsizing","size"+r],[o],i),tt.TEXT,i,s);return n&&Lv(l,i,tt.TEXT),l},Fd=function(t,r,n){var i;r==="Size1-Regular"?i="delim-size1":i="delim-size4";var a=ie.makeSpan(["delimsizinginner",i],[ie.makeSpan([],[ie.makeSymbol(t,r,n)])]);return{type:"elem",elem:a}},$d=function(t,r,n){var i=ai["Size4-Regular"][t.charCodeAt(0)]?ai["Size4-Regular"][t.charCodeAt(0)][4]:ai["Size1-Regular"][t.charCodeAt(0)][4],a=new pa("inner",Nq(t,Math.round(1e3*r))),s=new $i([a],{width:Ee(i),height:Ee(r),style:"width:"+Ee(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*r),preserveAspectRatio:"xMinYMin"}),o=ie.makeSvgSpan([],[s],n);return o.height=r,o.style.height=Ee(r),o.style.width=Ee(i),{type:"elem",elem:o}},rp=.008,Qc={type:"kern",size:-1*rp},Cj=["|","\\lvert","\\rvert","\\vert"],Sj=["\\|","\\lVert","\\rVert","\\Vert"],Iv=function(t,r,n,i,a,s){var o,l,c,u,h="",d=0;o=c=u=t,l=null;var f="Size1-Regular";t==="\\uparrow"?c=u="⏐":t==="\\Uparrow"?c=u="‖":t==="\\downarrow"?o=c="⏐":t==="\\Downarrow"?o=c="‖":t==="\\updownarrow"?(o="\\uparrow",c="⏐",u="\\downarrow"):t==="\\Updownarrow"?(o="\\Uparrow",c="‖",u="\\Downarrow"):Cj.includes(t)?(c="∣",h="vert",d=333):Sj.includes(t)?(c="∥",h="doublevert",d=556):t==="["||t==="\\lbrack"?(o="⎡",c="⎢",u="⎣",f="Size4-Regular",h="lbrack",d=667):t==="]"||t==="\\rbrack"?(o="⎤",c="⎥",u="⎦",f="Size4-Regular",h="rbrack",d=667):t==="\\lfloor"||t==="⌊"?(c=o="⎢",u="⎣",f="Size4-Regular",h="lfloor",d=667):t==="\\lceil"||t==="⌈"?(o="⎡",c=u="⎢",f="Size4-Regular",h="lceil",d=667):t==="\\rfloor"||t==="⌋"?(c=o="⎥",u="⎦",f="Size4-Regular",h="rfloor",d=667):t==="\\rceil"||t==="⌉"?(o="⎤",c=u="⎥",f="Size4-Regular",h="rceil",d=667):t==="("||t==="\\lparen"?(o="⎛",c="⎜",u="⎝",f="Size4-Regular",h="lparen",d=875):t===")"||t==="\\rparen"?(o="⎞",c="⎟",u="⎠",f="Size4-Regular",h="rparen",d=875):t==="\\{"||t==="\\lbrace"?(o="⎧",l="⎨",u="⎩",c="⎪",f="Size4-Regular"):t==="\\}"||t==="\\rbrace"?(o="⎫",l="⎬",u="⎭",c="⎪",f="Size4-Regular"):t==="\\lgroup"||t==="⟮"?(o="⎧",u="⎩",c="⎪",f="Size4-Regular"):t==="\\rgroup"||t==="⟯"?(o="⎫",u="⎭",c="⎪",f="Size4-Regular"):t==="\\lmoustache"||t==="⎰"?(o="⎧",u="⎭",c="⎪",f="Size4-Regular"):(t==="\\rmoustache"||t==="⎱")&&(o="⎫",u="⎩",c="⎪",f="Size4-Regular");var p=sl(o,f,a),m=p.height+p.depth,b=sl(c,f,a),y=b.height+b.depth,v=sl(u,f,a),T=v.height+v.depth,A=0,E=1;if(l!==null){var S=sl(l,f,a);A=S.height+S.depth,E=2}var I=m+T+A,D=Math.max(0,Math.ceil((r-I)/(E*y))),H=I+D*E*y,R=i.fontMetrics().axisHeight;n&&(R*=i.sizeMultiplier);var F=H/2-R,G=[];if(h.length>0){var ee=H-m-T,$=Math.round(H*1e3),q=Lq(h,Math.round(ee*1e3)),W=new pa(h,q),Z=(d/1e3).toFixed(3)+"em",V=($/1e3).toFixed(3)+"em",ve=new $i([W],{width:Z,height:V,viewBox:"0 0 "+d+" "+$}),L=ie.makeSvgSpan([],[ve],i);L.height=$/1e3,L.style.width=Z,L.style.height=V,G.push({type:"elem",elem:L})}else{if(G.push(Fd(u,f,a)),G.push(Qc),l===null){var ae=H-m-T+2*rp;G.push($d(c,ae,i))}else{var ne=(H-m-T-A)/2+2*rp;G.push($d(c,ne,i)),G.push(Qc),G.push(Fd(l,f,a)),G.push(Qc),G.push($d(c,ne,i))}G.push(Qc),G.push(Fd(o,f,a))}var N=i.havingBaseStyle(tt.TEXT),ke=ie.makeVList({positionType:"bottom",positionData:F,children:G},N);return g1(ie.makeSpan(["delimsizing","mult"],[ke],N),tt.TEXT,i,s)},zd=80,Hd=.08,qd=function(t,r,n,i,a){var s=Aq(t,i,n),o=new pa(t,s),l=new $i([o],{width:"400em",height:Ee(r),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return ie.makeSvgSpan(["hide-tail"],[l],a)},Ej=function(t,r){var n=r.havingBaseSizing(),i=Ov("\\surd",t*n.sizeMultiplier,Dv,n),a=n.sizeMultiplier,s=Math.max(0,r.minRuleThickness-r.fontMetrics().sqrtRuleThickness),o,l=0,c=0,u=0,h;return i.type==="small"?(u=1e3+1e3*s+zd,t<1?a=1:t<1.4&&(a=.7),l=(1+s+Hd)/a,c=(1+s)/a,o=qd("sqrtMain",l,u,s,r),o.style.minWidth="0.853em",h=.833/a):i.type==="large"?(u=(1e3+zd)*Ll[i.size],c=(Ll[i.size]+s)/a,l=(Ll[i.size]+s+Hd)/a,o=qd("sqrtSize"+i.size,l,u,s,r),o.style.minWidth="1.02em",h=1/a):(l=t+s+Hd,c=t+s,u=Math.floor(1e3*t+s)+zd,o=qd("sqrtTall",l,u,s,r),o.style.minWidth="0.742em",h=1.056),o.height=c,o.style.height=Ee(l),{span:o,advanceWidth:h,ruleWidth:(r.fontMetrics().sqrtRuleThickness+s)*a}},Rv=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],_j=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],Bv=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Ll=[0,1.2,1.8,2.4,3],Aj=function(t,r,n,i,a){if(t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle"),Rv.includes(t)||Bv.includes(t))return Mv(t,r,!1,n,i,a);if(_j.includes(t))return Iv(t,Ll[r],!1,n,i,a);throw new xe("Illegal delimiter: '"+t+"'")},Nj=[{type:"small",style:tt.SCRIPTSCRIPT},{type:"small",style:tt.SCRIPT},{type:"small",style:tt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Lj=[{type:"small",style:tt.SCRIPTSCRIPT},{type:"small",style:tt.SCRIPT},{type:"small",style:tt.TEXT},{type:"stack"}],Dv=[{type:"small",style:tt.SCRIPTSCRIPT},{type:"small",style:tt.SCRIPT},{type:"small",style:tt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Mj=function(t){if(t.type==="small")return"Main-Regular";if(t.type==="large")return"Size"+t.size+"-Regular";if(t.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+t.type+"' here.")},Ov=function(t,r,n,i){for(var a=Math.min(2,3-i.style.size),s=a;s<n.length&&n[s].type!=="stack";s++){var o=sl(t,Mj(n[s]),"math"),l=o.height+o.depth;if(n[s].type==="small"){var c=i.havingBaseStyle(n[s].style);l*=c.sizeMultiplier}if(l>r)return n[s]}return n[n.length-1]},Pv=function(t,r,n,i,a,s){t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle");var o;Bv.includes(t)?o=Nj:Rv.includes(t)?o=Dv:o=Lj;var l=Ov(t,r,o,i);return l.type==="small"?wj(t,l.style,n,i,a,s):l.type==="large"?Mv(t,l.size,n,i,a,s):Iv(t,r,n,i,a,s)},Ij=function(t,r,n,i,a,s){var o=i.fontMetrics().axisHeight*i.sizeMultiplier,l=901,c=5/i.fontMetrics().ptPerEm,u=Math.max(r-o,n+o),h=Math.max(u/500*l,2*u-c);return Pv(t,h,!0,i,a,s)},Oi={sqrtImage:Ej,sizedDelim:Aj,sizeToMaxHeight:Ll,customSizedDelim:Pv,leftRightDelim:Ij},oy={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Rj=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function fh(e,t){var r=hh(e);if(r&&Rj.includes(r.text))return r;throw r?new xe("Invalid delimiter '"+r.text+"' after '"+t.funcName+"'",e):new xe("Invalid delimiter type '"+e.type+"'",e)}Ne({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var r=fh(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:oy[e.funcName].size,mclass:oy[e.funcName].mclass,delim:r.text}},htmlBuilder:(e,t)=>e.delim==="."?ie.makeSpan([e.mclass]):Oi.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!=="."&&t.push(Ln(e.delim,e.mode));var r=new ye.MathNode("mo",t);e.mclass==="mopen"||e.mclass==="mclose"?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=Ee(Oi.sizeToMaxHeight[e.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}});function ly(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Ne({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=e.parser.gullet.macros.get("\\current@color");if(r&&typeof r!="string")throw new xe("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:fh(t[0],e).text,color:r}}});Ne({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=fh(t[0],e),n=e.parser;++n.leftrightDepth;var i=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var a=gt(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:i,left:r.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{ly(e);for(var r=fr(e.body,t,!0,["mopen","mclose"]),n=0,i=0,a=!1,s=0;s<r.length;s++)r[s].isMiddle?a=!0:(n=Math.max(r[s].height,n),i=Math.max(r[s].depth,i));n*=t.sizeMultiplier,i*=t.sizeMultiplier;var o;if(e.left==="."?o=Gl(t,["mopen"]):o=Oi.leftRightDelim(e.left,n,i,t,e.mode,["mopen"]),r.unshift(o),a)for(var l=1;l<r.length;l++){var c=r[l],u=c.isMiddle;u&&(r[l]=Oi.leftRightDelim(u.delim,n,i,u.options,e.mode,[]))}var h;if(e.right===".")h=Gl(t,["mclose"]);else{var d=e.rightColor?t.withColor(e.rightColor):t;h=Oi.leftRightDelim(e.right,n,i,d,e.mode,["mclose"])}return r.push(h),ie.makeSpan(["minner"],r,t)},mathmlBuilder:(e,t)=>{ly(e);var r=sn(e.body,t);if(e.left!=="."){var n=new ye.MathNode("mo",[Ln(e.left,e.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if(e.right!=="."){var i=new ye.MathNode("mo",[Ln(e.right,e.mode)]);i.setAttribute("fence","true"),e.rightColor&&i.setAttribute("mathcolor",e.rightColor),r.push(i)}return d1(r)}});Ne({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=fh(t[0],e);if(!e.parser.leftrightDepth)throw new xe("\\middle without preceding \\left",r);return{type:"middle",mode:e.parser.mode,delim:r.text}},htmlBuilder:(e,t)=>{var r;if(e.delim===".")r=Gl(t,[]);else{r=Oi.sizedDelim(e.delim,1,t,e.mode,[]);var n={delim:e.delim,options:t};r.isMiddle=n}return r},mathmlBuilder:(e,t)=>{var r=e.delim==="\\vert"||e.delim==="|"?Ln("|","text"):Ln(e.delim,e.mode),n=new ye.MathNode("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var b1=(e,t)=>{var r=ie.wrapFragment(St(e.body,t),t),n=e.label.slice(1),i=t.sizeMultiplier,a,s=0,o=_t.isCharacterBox(e.body);if(n==="sout")a=ie.makeSpan(["stretchy","sout"]),a.height=t.fontMetrics().defaultRuleThickness/i,s=-.5*t.fontMetrics().xHeight;else if(n==="phase"){var l=Yt({number:.6,unit:"pt"},t),c=Yt({number:.35,unit:"ex"},t),u=t.havingBaseSizing();i=i/u.sizeMultiplier;var h=r.height+r.depth+l+c;r.style.paddingLeft=Ee(h/2+l);var d=Math.floor(1e3*h*i),f=Eq(d),p=new $i([new pa("phase",f)],{width:"400em",height:Ee(d/1e3),viewBox:"0 0 400000 "+d,preserveAspectRatio:"xMinYMin slice"});a=ie.makeSvgSpan(["hide-tail"],[p],t),a.style.height=Ee(h),s=r.depth+l+c}else{/cancel/.test(n)?o||r.classes.push("cancel-pad"):n==="angl"?r.classes.push("anglpad"):r.classes.push("boxpad");var m=0,b=0,y=0;/box/.test(n)?(y=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),m=t.fontMetrics().fboxsep+(n==="colorbox"?0:y),b=m):n==="angl"?(y=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),m=4*y,b=Math.max(0,.25-r.depth)):(m=o?.2:0,b=m),a=Hi.encloseSpan(r,n,m,b,t),/fbox|boxed|fcolorbox/.test(n)?(a.style.borderStyle="solid",a.style.borderWidth=Ee(y)):n==="angl"&&y!==.049&&(a.style.borderTopWidth=Ee(y),a.style.borderRightWidth=Ee(y)),s=r.depth+b,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var v;if(e.backgroundColor)v=ie.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:s},{type:"elem",elem:r,shift:0}]},t);else{var T=/cancel|phase/.test(n)?["svg-align"]:[];v=ie.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:a,shift:s,wrapperClasses:T}]},t)}return/cancel/.test(n)&&(v.height=r.height,v.depth=r.depth),/cancel/.test(n)&&!o?ie.makeSpan(["mord","cancel-lap"],[v],t):ie.makeSpan(["mord"],[v],t)},y1=(e,t)=>{var r=0,n=new ye.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Ot(e.body,t)]);switch(e.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),e.label==="\\fcolorbox"){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);n.setAttribute("style","border: "+i+"em solid "+String(e.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n};Ne({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,r){var{parser:n,funcName:i}=e,a=gt(t[0],"color-token").color,s=t[1];return{type:"enclose",mode:n.mode,label:i,backgroundColor:a,body:s}},htmlBuilder:b1,mathmlBuilder:y1});Ne({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,r){var{parser:n,funcName:i}=e,a=gt(t[0],"color-token").color,s=gt(t[1],"color-token").color,o=t[2];return{type:"enclose",mode:n.mode,label:i,backgroundColor:s,borderColor:a,body:o}},htmlBuilder:b1,mathmlBuilder:y1});Ne({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\fbox",body:t[0]}}});Ne({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e,i=t[0];return{type:"enclose",mode:r.mode,label:n,body:i}},htmlBuilder:b1,mathmlBuilder:y1});Ne({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\angl",body:t[0]}}});var Fv={};function fi(e){for(var{type:t,names:r,props:n,handler:i,htmlBuilder:a,mathmlBuilder:s}=e,o={type:t,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},l=0;l<r.length;++l)Fv[r[l]]=o;a&&(n0[t]=a),s&&(i0[t]=s)}var $v={};function M(e,t){$v[e]=t}function cy(e){var t=[];e.consumeSpaces();var r=e.fetch().text;for(r==="\\relax"&&(e.consume(),e.consumeSpaces(),r=e.fetch().text);r==="\\hline"||r==="\\hdashline";)e.consume(),t.push(r==="\\hdashline"),e.consumeSpaces(),r=e.fetch().text;return t}var ph=e=>{var t=e.parser.settings;if(!t.displayMode)throw new xe("{"+e.envName+"} can be used only in display mode.")};function x1(e){if(e.indexOf("ed")===-1)return e.indexOf("*")===-1}function ka(e,t,r){var{hskipBeforeAndAfter:n,addJot:i,cols:a,arraystretch:s,colSeparationType:o,autoTag:l,singleRow:c,emptySingleRow:u,maxNumCols:h,leqno:d}=t;if(e.gullet.beginGroup(),c||e.gullet.macros.set("\\cr","\\\\\\relax"),!s){var f=e.gullet.expandMacroAsText("\\arraystretch");if(f==null)s=1;else if(s=parseFloat(f),!s||s<0)throw new xe("Invalid \\arraystretch: "+f)}e.gullet.beginGroup();var p=[],m=[p],b=[],y=[],v=l!=null?[]:void 0;function T(){l&&e.gullet.macros.set("\\@eqnsw","1",!0)}function A(){v&&(e.gullet.macros.get("\\df@tag")?(v.push(e.subparse([new gn("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):v.push(!!l&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(T(),y.push(cy(e));;){var E=e.parseExpression(!1,c?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),E={type:"ordgroup",mode:e.mode,body:E},r&&(E={type:"styling",mode:e.mode,style:r,body:[E]}),p.push(E);var S=e.fetch().text;if(S==="&"){if(h&&p.length===h){if(c||o)throw new xe("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(S==="\\end"){A(),p.length===1&&E.type==="styling"&&E.body[0].body.length===0&&(m.length>1||!u)&&m.pop(),y.length<m.length+1&&y.push([]);break}else if(S==="\\\\"){e.consume();var I=void 0;e.gullet.future().text!==" "&&(I=e.parseSizeGroup(!0)),b.push(I?I.value:null),A(),y.push(cy(e)),p=[],m.push(p),T()}else throw new xe("Expected & or \\\\ or \\cr or \\end",e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:i,arraystretch:s,body:m,cols:a,rowGaps:b,hskipBeforeAndAfter:n,hLinesBeforeRow:y,colSeparationType:o,tags:v,leqno:d}}function v1(e){return e.slice(0,1)==="d"?"display":"text"}var pi=function(t,r){var n,i,a=t.body.length,s=t.hLinesBeforeRow,o=0,l=new Array(a),c=[],u=Math.max(r.fontMetrics().arrayRuleWidth,r.minRuleThickness),h=1/r.fontMetrics().ptPerEm,d=5*h;if(t.colSeparationType&&t.colSeparationType==="small"){var f=r.havingStyle(tt.SCRIPT).sizeMultiplier;d=.2778*(f/r.sizeMultiplier)}var p=t.colSeparationType==="CD"?Yt({number:3,unit:"ex"},r):12*h,m=3*h,b=t.arraystretch*p,y=.7*b,v=.3*b,T=0;function A(Bt){for(var Jt=0;Jt<Bt.length;++Jt)Jt>0&&(T+=.25),c.push({pos:T,isDashed:Bt[Jt]})}for(A(s[0]),n=0;n<t.body.length;++n){var E=t.body[n],S=y,I=v;o<E.length&&(o=E.length);var D=new Array(E.length);for(i=0;i<E.length;++i){var H=St(E[i],r);I<H.depth&&(I=H.depth),S<H.height&&(S=H.height),D[i]=H}var R=t.rowGaps[n],F=0;R&&(F=Yt(R,r),F>0&&(F+=v,I<F&&(I=F),F=0)),t.addJot&&(I+=m),D.height=S,D.depth=I,T+=S,D.pos=T,T+=I+F,l[n]=D,A(s[n+1])}var G=T/2+r.fontMetrics().axisHeight,ee=t.cols||[],$=[],q,W,Z=[];if(t.tags&&t.tags.some(Bt=>Bt))for(n=0;n<a;++n){var V=l[n],ve=V.pos-G,L=t.tags[n],ae=void 0;L===!0?ae=ie.makeSpan(["eqn-num"],[],r):L===!1?ae=ie.makeSpan([],[],r):ae=ie.makeSpan([],fr(L,r,!0),r),ae.depth=V.depth,ae.height=V.height,Z.push({type:"elem",elem:ae,shift:ve})}for(i=0,W=0;i<o||W<ee.length;++i,++W){for(var ne=ee[W]||{},N=!0;ne.type==="separator";){if(N||(q=ie.makeSpan(["arraycolsep"],[]),q.style.width=Ee(r.fontMetrics().doubleRuleSep),$.push(q)),ne.separator==="|"||ne.separator===":"){var ke=ne.separator==="|"?"solid":"dashed",ge=ie.makeSpan(["vertical-separator"],[],r);ge.style.height=Ee(T),ge.style.borderRightWidth=Ee(u),ge.style.borderRightStyle=ke,ge.style.margin="0 "+Ee(-u/2);var Se=T-G;Se&&(ge.style.verticalAlign=Ee(-Se)),$.push(ge)}else throw new xe("Invalid separator type: "+ne.separator);W++,ne=ee[W]||{},N=!1}if(!(i>=o)){var _e=void 0;(i>0||t.hskipBeforeAndAfter)&&(_e=_t.deflt(ne.pregap,d),_e!==0&&(q=ie.makeSpan(["arraycolsep"],[]),q.style.width=Ee(_e),$.push(q)));var at=[];for(n=0;n<a;++n){var Ue=l[n],$e=Ue[i];if($e){var ht=Ue.pos-G;$e.depth=Ue.depth,$e.height=Ue.height,at.push({type:"elem",elem:$e,shift:ht})}}at=ie.makeVList({positionType:"individualShift",children:at},r),at=ie.makeSpan(["col-align-"+(ne.align||"c")],[at]),$.push(at),(i<o-1||t.hskipBeforeAndAfter)&&(_e=_t.deflt(ne.postgap,d),_e!==0&&(q=ie.makeSpan(["arraycolsep"],[]),q.style.width=Ee(_e),$.push(q)))}}if(l=ie.makeSpan(["mtable"],$),c.length>0){for(var dt=ie.makeLineSpan("hline",r,u),Lt=ie.makeLineSpan("hdashline",r,u),Re=[{type:"elem",elem:l,shift:0}];c.length>0;){var ue=c.pop(),de=ue.pos-G;ue.isDashed?Re.push({type:"elem",elem:Lt,shift:de}):Re.push({type:"elem",elem:dt,shift:de})}l=ie.makeVList({positionType:"individualShift",children:Re},r)}if(Z.length===0)return ie.makeSpan(["mord"],[l],r);var pt=ie.makeVList({positionType:"individualShift",children:Z},r);return pt=ie.makeSpan(["tag"],[pt],r),ie.makeFragment([l,pt])},Bj={c:"center ",l:"left ",r:"right "},mi=function(t,r){for(var n=[],i=new ye.MathNode("mtd",[],["mtr-glue"]),a=new ye.MathNode("mtd",[],["mml-eqn-num"]),s=0;s<t.body.length;s++){for(var o=t.body[s],l=[],c=0;c<o.length;c++)l.push(new ye.MathNode("mtd",[Ot(o[c],r)]));t.tags&&t.tags[s]&&(l.unshift(i),l.push(i),t.leqno?l.unshift(a):l.push(a)),n.push(new ye.MathNode("mtr",l))}var u=new ye.MathNode("mtable",n),h=t.arraystretch===.5?.1:.16+t.arraystretch-1+(t.addJot?.09:0);u.setAttribute("rowspacing",Ee(h));var d="",f="";if(t.cols&&t.cols.length>0){var p=t.cols,m="",b=!1,y=0,v=p.length;p[0].type==="separator"&&(d+="top ",y=1),p[p.length-1].type==="separator"&&(d+="bottom ",v-=1);for(var T=y;T<v;T++)p[T].type==="align"?(f+=Bj[p[T].align],b&&(m+="none "),b=!0):p[T].type==="separator"&&b&&(m+=p[T].separator==="|"?"solid ":"dashed ",b=!1);u.setAttribute("columnalign",f.trim()),/[sd]/.test(m)&&u.setAttribute("columnlines",m.trim())}if(t.colSeparationType==="align"){for(var A=t.cols||[],E="",S=1;S<A.length;S++)E+=S%2?"0em ":"1em ";u.setAttribute("columnspacing",E.trim())}else t.colSeparationType==="alignat"||t.colSeparationType==="gather"?u.setAttribute("columnspacing","0em"):t.colSeparationType==="small"?u.setAttribute("columnspacing","0.2778em"):t.colSeparationType==="CD"?u.setAttribute("columnspacing","0.5em"):u.setAttribute("columnspacing","1em");var I="",D=t.hLinesBeforeRow;d+=D[0].length>0?"left ":"",d+=D[D.length-1].length>0?"right ":"";for(var H=1;H<D.length-1;H++)I+=D[H].length===0?"none ":D[H][0]?"dashed ":"solid ";return/[sd]/.test(I)&&u.setAttribute("rowlines",I.trim()),d!==""&&(u=new ye.MathNode("menclose",[u]),u.setAttribute("notation",d.trim())),t.arraystretch&&t.arraystretch<1&&(u=new ye.MathNode("mstyle",[u]),u.setAttribute("scriptlevel","1")),u},zv=function(t,r){t.envName.indexOf("ed")===-1&&ph(t);var n=[],i=t.envName.indexOf("at")>-1?"alignat":"align",a=t.envName==="split",s=ka(t.parser,{cols:n,addJot:!0,autoTag:a?void 0:x1(t.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:a?2:void 0,leqno:t.parser.settings.leqno},"display"),o,l=0,c={type:"ordgroup",mode:t.mode,body:[]};if(r[0]&&r[0].type==="ordgroup"){for(var u="",h=0;h<r[0].body.length;h++){var d=gt(r[0].body[h],"textord");u+=d.text}o=Number(u),l=o*2}var f=!l;s.body.forEach(function(y){for(var v=1;v<y.length;v+=2){var T=gt(y[v],"styling"),A=gt(T.body[0],"ordgroup");A.body.unshift(c)}if(f)l<y.length&&(l=y.length);else{var E=y.length/2;if(o<E)throw new xe("Too many math in a row: "+("expected "+o+", but got "+E),y[0])}});for(var p=0;p<l;++p){var m="r",b=0;p%2===1?m="l":p>0&&f&&(b=1),n[p]={type:"align",align:m,pregap:b,postgap:0}}return s.colSeparationType=f?"align":"alignat",s};fi({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var r=hh(t[0]),n=r?[t[0]]:gt(t[0],"ordgroup").body,i=n.map(function(s){var o=p1(s),l=o.text;if("lcr".indexOf(l)!==-1)return{type:"align",align:l};if(l==="|")return{type:"separator",separator:"|"};if(l===":")return{type:"separator",separator:":"};throw new xe("Unknown column alignment: "+l,s)}),a={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return ka(e.parser,a,v1(e.envName))},htmlBuilder:pi,mathmlBuilder:mi});fi({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if(e.envName.charAt(e.envName.length-1)==="*"){var i=e.parser;if(i.consumeSpaces(),i.fetch().text==="["){if(i.consume(),i.consumeSpaces(),r=i.fetch().text,"lcr".indexOf(r)===-1)throw new xe("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),n.cols=[{type:"align",align:r}]}}var a=ka(e.parser,n,v1(e.envName)),s=Math.max(0,...a.body.map(o=>o.length));return a.cols=new Array(s).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:pi,mathmlBuilder:mi});fi({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:.5},r=ka(e.parser,t,"script");return r.colSeparationType="small",r},htmlBuilder:pi,mathmlBuilder:mi});fi({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var r=hh(t[0]),n=r?[t[0]]:gt(t[0],"ordgroup").body,i=n.map(function(s){var o=p1(s),l=o.text;if("lc".indexOf(l)!==-1)return{type:"align",align:l};throw new xe("Unknown column alignment: "+l,s)});if(i.length>1)throw new xe("{subarray} can contain only one column");var a={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5};if(a=ka(e.parser,a,"script"),a.body.length>0&&a.body[0].length>1)throw new xe("{subarray} can contain only one column");return a},htmlBuilder:pi,mathmlBuilder:mi});fi({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},r=ka(e.parser,t,v1(e.envName));return{type:"leftright",mode:e.mode,body:[r],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:pi,mathmlBuilder:mi});fi({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:zv,htmlBuilder:pi,mathmlBuilder:mi});fi({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){["gather","gather*"].includes(e.envName)&&ph(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:x1(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return ka(e.parser,t,"display")},htmlBuilder:pi,mathmlBuilder:mi});fi({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:zv,htmlBuilder:pi,mathmlBuilder:mi});fi({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){ph(e);var t={autoTag:x1(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return ka(e.parser,t,"display")},htmlBuilder:pi,mathmlBuilder:mi});fi({type:"array",names:["CD"],props:{numArgs:0},handler(e){return ph(e),vj(e.parser)},htmlBuilder:pi,mathmlBuilder:mi});M("\\nonumber","\\gdef\\@eqnsw{0}");M("\\notag","\\nonumber");Ne({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new xe(e.funcName+" valid only within array environment")}});var uy=Fv;Ne({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:r,funcName:n}=e,i=t[0];if(i.type!=="ordgroup")throw new xe("Invalid environment name",i);for(var a="",s=0;s<i.body.length;++s)a+=gt(i.body[s],"textord").text;if(n==="\\begin"){if(!uy.hasOwnProperty(a))throw new xe("No such environment: "+a,i);var o=uy[a],{args:l,optArgs:c}=r.parseArguments("\\begin{"+a+"}",o),u={mode:r.mode,envName:a,parser:r},h=o.handler(u,l,c);r.expect("\\end",!1);var d=r.nextToken,f=gt(r.parseFunction(),"environment");if(f.name!==a)throw new xe("Mismatch: \\begin{"+a+"} matched by \\end{"+f.name+"}",d);return h}return{type:"environment",mode:r.mode,name:a,nameGroup:i}}});var Hv=(e,t)=>{var r=e.font,n=t.withFont(r);return St(e.body,n)},qv=(e,t)=>{var r=e.font,n=t.withFont(r);return Ot(e.body,n)},hy={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};Ne({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=a0(t[0]),a=n;return a in hy&&(a=hy[a]),{type:"font",mode:r.mode,font:a.slice(1),body:i}},htmlBuilder:Hv,mathmlBuilder:qv});Ne({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:r}=e,n=t[0],i=_t.isCharacterBox(n);return{type:"mclass",mode:r.mode,mclass:dh(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:i}}});Ne({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n,breakOnTokenText:i}=e,{mode:a}=r,s=r.parseExpression(!0,i),o="math"+n.slice(1);return{type:"font",mode:a,font:o,body:{type:"ordgroup",mode:r.mode,body:s}}},htmlBuilder:Hv,mathmlBuilder:qv});var jv=(e,t)=>{var r=t;return e==="display"?r=r.id>=tt.SCRIPT.id?r.text():tt.DISPLAY:e==="text"&&r.size===tt.DISPLAY.size?r=tt.TEXT:e==="script"?r=tt.SCRIPT:e==="scriptscript"&&(r=tt.SCRIPTSCRIPT),r},k1=(e,t)=>{var r=jv(e.size,t.style),n=r.fracNum(),i=r.fracDen(),a;a=t.havingStyle(n);var s=St(e.numer,a,t);if(e.continued){var o=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;s.height=s.height<o?o:s.height,s.depth=s.depth<l?l:s.depth}a=t.havingStyle(i);var c=St(e.denom,a,t),u,h,d;e.hasBarLine?(e.barSize?(h=Yt(e.barSize,t),u=ie.makeLineSpan("frac-line",t,h)):u=ie.makeLineSpan("frac-line",t),h=u.height,d=u.height):(u=null,h=0,d=t.fontMetrics().defaultRuleThickness);var f,p,m;r.size===tt.DISPLAY.size||e.size==="display"?(f=t.fontMetrics().num1,h>0?p=3*d:p=7*d,m=t.fontMetrics().denom1):(h>0?(f=t.fontMetrics().num2,p=d):(f=t.fontMetrics().num3,p=3*d),m=t.fontMetrics().denom2);var b;if(u){var v=t.fontMetrics().axisHeight;f-s.depth-(v+.5*h)<p&&(f+=p-(f-s.depth-(v+.5*h))),v-.5*h-(c.height-m)<p&&(m+=p-(v-.5*h-(c.height-m)));var T=-(v-.5*h);b=ie.makeVList({positionType:"individualShift",children:[{type:"elem",elem:c,shift:m},{type:"elem",elem:u,shift:T},{type:"elem",elem:s,shift:-f}]},t)}else{var y=f-s.depth-(c.height-m);y<p&&(f+=.5*(p-y),m+=.5*(p-y)),b=ie.makeVList({positionType:"individualShift",children:[{type:"elem",elem:c,shift:m},{type:"elem",elem:s,shift:-f}]},t)}a=t.havingStyle(r),b.height*=a.sizeMultiplier/t.sizeMultiplier,b.depth*=a.sizeMultiplier/t.sizeMultiplier;var A;r.size===tt.DISPLAY.size?A=t.fontMetrics().delim1:r.size===tt.SCRIPTSCRIPT.size?A=t.havingStyle(tt.SCRIPT).fontMetrics().delim2:A=t.fontMetrics().delim2;var E,S;return e.leftDelim==null?E=Gl(t,["mopen"]):E=Oi.customSizedDelim(e.leftDelim,A,!0,t.havingStyle(r),e.mode,["mopen"]),e.continued?S=ie.makeSpan([]):e.rightDelim==null?S=Gl(t,["mclose"]):S=Oi.customSizedDelim(e.rightDelim,A,!0,t.havingStyle(r),e.mode,["mclose"]),ie.makeSpan(["mord"].concat(a.sizingClasses(t)),[E,ie.makeSpan(["mfrac"],[b]),S],t)},w1=(e,t)=>{var r=new ye.MathNode("mfrac",[Ot(e.numer,t),Ot(e.denom,t)]);if(!e.hasBarLine)r.setAttribute("linethickness","0px");else if(e.barSize){var n=Yt(e.barSize,t);r.setAttribute("linethickness",Ee(n))}var i=jv(e.size,t.style);if(i.size!==t.style.size){r=new ye.MathNode("mstyle",[r]);var a=i.size===tt.DISPLAY.size?"true":"false";r.setAttribute("displaystyle",a),r.setAttribute("scriptlevel","0")}if(e.leftDelim!=null||e.rightDelim!=null){var s=[];if(e.leftDelim!=null){var o=new ye.MathNode("mo",[new ye.TextNode(e.leftDelim.replace("\\",""))]);o.setAttribute("fence","true"),s.push(o)}if(s.push(r),e.rightDelim!=null){var l=new ye.MathNode("mo",[new ye.TextNode(e.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),s.push(l)}return d1(s)}return r};Ne({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0],a=t[1],s,o=null,l=null,c="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":s=!0;break;case"\\\\atopfrac":s=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":s=!1,o="(",l=")";break;case"\\\\bracefrac":s=!1,o="\\{",l="\\}";break;case"\\\\brackfrac":s=!1,o="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":c="display";break;case"\\tfrac":case"\\tbinom":c="text";break}return{type:"genfrac",mode:r.mode,continued:!1,numer:i,denom:a,hasBarLine:s,leftDelim:o,rightDelim:l,size:c,barSize:null}},htmlBuilder:k1,mathmlBuilder:w1});Ne({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0],a=t[1];return{type:"genfrac",mode:r.mode,continued:!0,numer:i,denom:a,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});Ne({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:r,token:n}=e,i;switch(r){case"\\over":i="\\frac";break;case"\\choose":i="\\binom";break;case"\\atop":i="\\\\atopfrac";break;case"\\brace":i="\\\\bracefrac";break;case"\\brack":i="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:i,token:n}}});var dy=["display","text","script","scriptscript"],fy=function(t){var r=null;return t.length>0&&(r=t,r=r==="."?null:r),r};Ne({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var{parser:r}=e,n=t[4],i=t[5],a=a0(t[0]),s=a.type==="atom"&&a.family==="open"?fy(a.text):null,o=a0(t[1]),l=o.type==="atom"&&o.family==="close"?fy(o.text):null,c=gt(t[2],"size"),u,h=null;c.isBlank?u=!0:(h=c.value,u=h.number>0);var d="auto",f=t[3];if(f.type==="ordgroup"){if(f.body.length>0){var p=gt(f.body[0],"textord");d=dy[Number(p.text)]}}else f=gt(f,"textord"),d=dy[Number(f.text)];return{type:"genfrac",mode:r.mode,numer:n,denom:i,continued:!1,hasBarLine:u,barSize:h,leftDelim:s,rightDelim:l,size:d}},htmlBuilder:k1,mathmlBuilder:w1});Ne({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:r,funcName:n,token:i}=e;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:gt(t[0],"size").value,token:i}}});Ne({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0],a=hq(gt(t[1],"infix").size),s=t[2],o=a.number>0;return{type:"genfrac",mode:r.mode,numer:i,denom:s,continued:!1,hasBarLine:o,barSize:a,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:k1,mathmlBuilder:w1});var Uv=(e,t)=>{var r=t.style,n,i;e.type==="supsub"?(n=e.sup?St(e.sup,t.havingStyle(r.sup()),t):St(e.sub,t.havingStyle(r.sub()),t),i=gt(e.base,"horizBrace")):i=gt(e,"horizBrace");var a=St(i.base,t.havingBaseStyle(tt.DISPLAY)),s=Hi.svgSpan(i,t),o;if(i.isOver?(o=ie.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:s}]},t),o.children[0].children[0].children[1].classes.push("svg-align")):(o=ie.makeVList({positionType:"bottom",positionData:a.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:a}]},t),o.children[0].children[0].children[0].classes.push("svg-align")),n){var l=ie.makeSpan(["mord",i.isOver?"mover":"munder"],[o],t);i.isOver?o=ie.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]},t):o=ie.makeVList({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]},t)}return ie.makeSpan(["mord",i.isOver?"mover":"munder"],[o],t)},Dj=(e,t)=>{var r=Hi.mathMLnode(e.label);return new ye.MathNode(e.isOver?"mover":"munder",[Ot(e.base,t),r])};Ne({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e;return{type:"horizBrace",mode:r.mode,label:n,isOver:/^\\over/.test(n),base:t[0]}},htmlBuilder:Uv,mathmlBuilder:Dj});Ne({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[1],i=gt(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:r.mode,href:i,body:Zt(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var r=fr(e.body,t,!1);return ie.makeAnchor(e.href,[],r,t)},mathmlBuilder:(e,t)=>{var r=ma(e.body,t);return r instanceof fn||(r=new fn("mrow",[r])),r.setAttribute("href",e.href),r}});Ne({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=gt(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var i=[],a=0;a<n.length;a++){var s=n[a];s==="~"&&(s="\\textasciitilde"),i.push({type:"textord",mode:"text",text:s})}var o={type:"text",mode:r.mode,font:"\\texttt",body:i};return{type:"href",mode:r.mode,href:n,body:Zt(o)}}});Ne({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){var{parser:r}=e;return{type:"hbox",mode:r.mode,body:Zt(t[0])}},htmlBuilder(e,t){var r=fr(e.body,t,!1);return ie.makeFragment(r)},mathmlBuilder(e,t){return new ye.MathNode("mrow",sn(e.body,t))}});Ne({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n,token:i}=e,a=gt(t[0],"raw").string,s=t[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o,l={};switch(n){case"\\htmlClass":l.class=a,o={command:"\\htmlClass",class:a};break;case"\\htmlId":l.id=a,o={command:"\\htmlId",id:a};break;case"\\htmlStyle":l.style=a,o={command:"\\htmlStyle",style:a};break;case"\\htmlData":{for(var c=a.split(","),u=0;u<c.length;u++){var h=c[u],d=h.indexOf("=");if(d<0)throw new xe("\\htmlData key/value '"+h+"' missing equals sign");var f=h.slice(0,d),p=h.slice(d+1);l["data-"+f.trim()]=p}o={command:"\\htmlData",attributes:l};break}default:throw new Error("Unrecognized html command")}return r.settings.isTrusted(o)?{type:"html",mode:r.mode,attributes:l,body:Zt(s)}:r.formatUnsupportedCmd(n)},htmlBuilder:(e,t)=>{var r=fr(e.body,t,!1),n=["enclosing"];e.attributes.class&&n.push(...e.attributes.class.trim().split(/\s+/));var i=ie.makeSpan(n,r,t);for(var a in e.attributes)a!=="class"&&e.attributes.hasOwnProperty(a)&&i.setAttribute(a,e.attributes[a]);return i},mathmlBuilder:(e,t)=>ma(e.body,t)});Ne({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"htmlmathml",mode:r.mode,html:Zt(t[0]),mathml:Zt(t[1])}},htmlBuilder:(e,t)=>{var r=fr(e.html,t,!1);return ie.makeFragment(r)},mathmlBuilder:(e,t)=>ma(e.mathml,t)});var jd=function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!r)throw new xe("Invalid size: '"+t+"' in \\includegraphics");var n={number:+(r[1]+r[2]),unit:r[3]};if(!cv(n))throw new xe("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};Ne({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,r)=>{var{parser:n}=e,i={number:0,unit:"em"},a={number:.9,unit:"em"},s={number:0,unit:"em"},o="";if(r[0])for(var l=gt(r[0],"raw").string,c=l.split(","),u=0;u<c.length;u++){var h=c[u].split("=");if(h.length===2){var d=h[1].trim();switch(h[0].trim()){case"alt":o=d;break;case"width":i=jd(d);break;case"height":a=jd(d);break;case"totalheight":s=jd(d);break;default:throw new xe("Invalid key: '"+h[0]+"' in \\includegraphics.")}}}var f=gt(t[0],"url").url;return o===""&&(o=f,o=o.replace(/^.*[\\/]/,""),o=o.substring(0,o.lastIndexOf("."))),n.settings.isTrusted({command:"\\includegraphics",url:f})?{type:"includegraphics",mode:n.mode,alt:o,width:i,height:a,totalheight:s,src:f}:n.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var r=Yt(e.height,t),n=0;e.totalheight.number>0&&(n=Yt(e.totalheight,t)-r);var i=0;e.width.number>0&&(i=Yt(e.width,t));var a={height:Ee(r+n)};i>0&&(a.width=Ee(i)),n>0&&(a.verticalAlign=Ee(-n));var s=new Dq(e.src,e.alt,a);return s.height=r,s.depth=n,s},mathmlBuilder:(e,t)=>{var r=new ye.MathNode("mglyph",[]);r.setAttribute("alt",e.alt);var n=Yt(e.height,t),i=0;if(e.totalheight.number>0&&(i=Yt(e.totalheight,t)-n,r.setAttribute("valign",Ee(-i))),r.setAttribute("height",Ee(n+i)),e.width.number>0){var a=Yt(e.width,t);r.setAttribute("width",Ee(a))}return r.setAttribute("src",e.src),r}});Ne({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:n}=e,i=gt(t[0],"size");if(r.settings.strict){var a=n[1]==="m",s=i.value.unit==="mu";a?(s||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+i.value.unit+" units")),r.mode!=="math"&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):s&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:i.value}},htmlBuilder(e,t){return ie.makeGlue(e.dimension,t)},mathmlBuilder(e,t){var r=Yt(e.dimension,t);return new ye.SpaceNode(r)}});Ne({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:i}},htmlBuilder:(e,t)=>{var r;e.alignment==="clap"?(r=ie.makeSpan([],[St(e.body,t)]),r=ie.makeSpan(["inner"],[r],t)):r=ie.makeSpan(["inner"],[St(e.body,t)]);var n=ie.makeSpan(["fix"],[]),i=ie.makeSpan([e.alignment],[r,n],t),a=ie.makeSpan(["strut"]);return a.style.height=Ee(i.height+i.depth),i.depth&&(a.style.verticalAlign=Ee(-i.depth)),i.children.unshift(a),i=ie.makeSpan(["thinbox"],[i],t),ie.makeSpan(["mord","vbox"],[i],t)},mathmlBuilder:(e,t)=>{var r=new ye.MathNode("mpadded",[Ot(e.body,t)]);if(e.alignment!=="rlap"){var n=e.alignment==="llap"?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r}});Ne({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:r,parser:n}=e,i=n.mode;n.switchMode("math");var a=r==="\\("?"\\)":"$",s=n.parseExpression(!1,a);return n.expect(a),n.switchMode(i),{type:"styling",mode:n.mode,style:"text",body:s}}});Ne({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new xe("Mismatched "+e.funcName)}});var py=(e,t)=>{switch(t.style.size){case tt.DISPLAY.size:return e.display;case tt.TEXT.size:return e.text;case tt.SCRIPT.size:return e.script;case tt.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};Ne({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"mathchoice",mode:r.mode,display:Zt(t[0]),text:Zt(t[1]),script:Zt(t[2]),scriptscript:Zt(t[3])}},htmlBuilder:(e,t)=>{var r=py(e,t),n=fr(r,t,!1);return ie.makeFragment(n)},mathmlBuilder:(e,t)=>{var r=py(e,t);return ma(r,t)}});var Wv=(e,t,r,n,i,a,s)=>{e=ie.makeSpan([],[e]);var o=r&&_t.isCharacterBox(r),l,c;if(t){var u=St(t,n.havingStyle(i.sup()),n);c={elem:u,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-u.depth)}}if(r){var h=St(r,n.havingStyle(i.sub()),n);l={elem:h,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-h.height)}}var d;if(c&&l){var f=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+s;d=ie.makeVList({positionType:"bottom",positionData:f,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:Ee(-a)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:Ee(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(l){var p=e.height-s;d=ie.makeVList({positionType:"top",positionData:p,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:Ee(-a)},{type:"kern",size:l.kern},{type:"elem",elem:e}]},n)}else if(c){var m=e.depth+s;d=ie.makeVList({positionType:"bottom",positionData:m,children:[{type:"elem",elem:e},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:Ee(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else return e;var b=[d];if(l&&a!==0&&!o){var y=ie.makeSpan(["mspace"],[],n);y.style.marginRight=Ee(a),b.unshift(y)}return ie.makeSpan(["mop","op-limits"],b,n)},Gv=["\\smallint"],ko=(e,t)=>{var r,n,i=!1,a;e.type==="supsub"?(r=e.sup,n=e.sub,a=gt(e.base,"op"),i=!0):a=gt(e,"op");var s=t.style,o=!1;s.size===tt.DISPLAY.size&&a.symbol&&!Gv.includes(a.name)&&(o=!0);var l;if(a.symbol){var c=o?"Size2-Regular":"Size1-Regular",u="";if((a.name==="\\oiint"||a.name==="\\oiiint")&&(u=a.name.slice(1),a.name=u==="oiint"?"\\iint":"\\iiint"),l=ie.makeSymbol(a.name,c,"math",t,["mop","op-symbol",o?"large-op":"small-op"]),u.length>0){var h=l.italic,d=ie.staticSvg(u+"Size"+(o?"2":"1"),t);l=ie.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:d,shift:o?.08:0}]},t),a.name="\\"+u,l.classes.unshift("mop"),l.italic=h}}else if(a.body){var f=fr(a.body,t,!0);f.length===1&&f[0]instanceof Nn?(l=f[0],l.classes[0]="mop"):l=ie.makeSpan(["mop"],f,t)}else{for(var p=[],m=1;m<a.name.length;m++)p.push(ie.mathsym(a.name[m],a.mode,t));l=ie.makeSpan(["mop"],p,t)}var b=0,y=0;return(l instanceof Nn||a.name==="\\oiint"||a.name==="\\oiiint")&&!a.suppressBaseShift&&(b=(l.height-l.depth)/2-t.fontMetrics().axisHeight,y=l.italic),i?Wv(l,r,n,t,s,y,b):(b&&(l.style.position="relative",l.style.top=Ee(b)),l)},vc=(e,t)=>{var r;if(e.symbol)r=new fn("mo",[Ln(e.name,e.mode)]),Gv.includes(e.name)&&r.setAttribute("largeop","false");else if(e.body)r=new fn("mo",sn(e.body,t));else{r=new fn("mi",[new si(e.name.slice(1))]);var n=new fn("mo",[Ln("","text")]);e.parentIsSupSub?r=new fn("mrow",[r,n]):r=vv([r,n])}return r},Oj={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};Ne({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=n;return i.length===1&&(i=Oj[i]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:ko,mathmlBuilder:vc});Ne({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Zt(n)}},htmlBuilder:ko,mathmlBuilder:vc});var Pj={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};Ne({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:ko,mathmlBuilder:vc});Ne({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:ko,mathmlBuilder:vc});Ne({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:r}=e,n=r;return n.length===1&&(n=Pj[n]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:ko,mathmlBuilder:vc});var Yv=(e,t)=>{var r,n,i=!1,a;e.type==="supsub"?(r=e.sup,n=e.sub,a=gt(e.base,"operatorname"),i=!0):a=gt(e,"operatorname");var s;if(a.body.length>0){for(var o=a.body.map(h=>{var d=h.text;return typeof d=="string"?{type:"textord",mode:h.mode,text:d}:h}),l=fr(o,t.withFont("mathrm"),!0),c=0;c<l.length;c++){var u=l[c];u instanceof Nn&&(u.text=u.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}s=ie.makeSpan(["mop"],l,t)}else s=ie.makeSpan(["mop"],[],t);return i?Wv(s,r,n,t,t.style,0,0):s},Fj=(e,t)=>{for(var r=sn(e.body,t.withFont("mathrm")),n=!0,i=0;i<r.length;i++){var a=r[i];if(!(a instanceof ye.SpaceNode))if(a instanceof ye.MathNode)switch(a.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{var s=a.children[0];a.children.length===1&&s instanceof ye.TextNode?s.text=s.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break}default:n=!1}else n=!1}if(n){var o=r.map(u=>u.toText()).join("");r=[new ye.TextNode(o)]}var l=new ye.MathNode("mi",r);l.setAttribute("mathvariant","normal");var c=new ye.MathNode("mo",[Ln("","text")]);return e.parentIsSupSub?new ye.MathNode("mrow",[l,c]):ye.newDocumentFragment([l,c])};Ne({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0];return{type:"operatorname",mode:r.mode,body:Zt(i),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:Yv,mathmlBuilder:Fj});M("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");us({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?ie.makeFragment(fr(e.body,t,!1)):ie.makeSpan(["mord"],fr(e.body,t,!0),t)},mathmlBuilder(e,t){return ma(e.body,t,!0)}});Ne({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:r}=e,n=t[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(e,t){var r=St(e.body,t.havingCrampedStyle()),n=ie.makeLineSpan("overline-line",t),i=t.fontMetrics().defaultRuleThickness,a=ie.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n},{type:"kern",size:i}]},t);return ie.makeSpan(["mord","overline"],[a],t)},mathmlBuilder(e,t){var r=new ye.MathNode("mo",[new ye.TextNode("‾")]);r.setAttribute("stretchy","true");var n=new ye.MathNode("mover",[Ot(e.body,t),r]);return n.setAttribute("accent","true"),n}});Ne({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"phantom",mode:r.mode,body:Zt(n)}},htmlBuilder:(e,t)=>{var r=fr(e.body,t.withPhantom(),!1);return ie.makeFragment(r)},mathmlBuilder:(e,t)=>{var r=sn(e.body,t);return new ye.MathNode("mphantom",r)}});Ne({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"hphantom",mode:r.mode,body:n}},htmlBuilder:(e,t)=>{var r=ie.makeSpan([],[St(e.body,t.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var n=0;n<r.children.length;n++)r.children[n].height=0,r.children[n].depth=0;return r=ie.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},t),ie.makeSpan(["mord"],[r],t)},mathmlBuilder:(e,t)=>{var r=sn(Zt(e.body),t),n=new ye.MathNode("mphantom",r),i=new ye.MathNode("mpadded",[n]);return i.setAttribute("height","0px"),i.setAttribute("depth","0px"),i}});Ne({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"vphantom",mode:r.mode,body:n}},htmlBuilder:(e,t)=>{var r=ie.makeSpan(["inner"],[St(e.body,t.withPhantom())]),n=ie.makeSpan(["fix"],[]);return ie.makeSpan(["mord","rlap"],[r,n],t)},mathmlBuilder:(e,t)=>{var r=sn(Zt(e.body),t),n=new ye.MathNode("mphantom",r),i=new ye.MathNode("mpadded",[n]);return i.setAttribute("width","0px"),i}});Ne({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e,n=gt(t[0],"size").value,i=t[1];return{type:"raisebox",mode:r.mode,dy:n,body:i}},htmlBuilder(e,t){var r=St(e.body,t),n=Yt(e.dy,t);return ie.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]},t)},mathmlBuilder(e,t){var r=new ye.MathNode("mpadded",[Ot(e.body,t)]),n=e.dy.number+e.dy.unit;return r.setAttribute("voffset",n),r}});Ne({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}});Ne({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,r){var{parser:n}=e,i=r[0],a=gt(t[0],"size"),s=gt(t[1],"size");return{type:"rule",mode:n.mode,shift:i&>(i,"size").value,width:a.value,height:s.value}},htmlBuilder(e,t){var r=ie.makeSpan(["mord","rule"],[],t),n=Yt(e.width,t),i=Yt(e.height,t),a=e.shift?Yt(e.shift,t):0;return r.style.borderRightWidth=Ee(n),r.style.borderTopWidth=Ee(i),r.style.bottom=Ee(a),r.width=n,r.height=i+a,r.depth=-a,r.maxFontSize=i*1.125*t.sizeMultiplier,r},mathmlBuilder(e,t){var r=Yt(e.width,t),n=Yt(e.height,t),i=e.shift?Yt(e.shift,t):0,a=t.color&&t.getColor()||"black",s=new ye.MathNode("mspace");s.setAttribute("mathbackground",a),s.setAttribute("width",Ee(r)),s.setAttribute("height",Ee(n));var o=new ye.MathNode("mpadded",[s]);return i>=0?o.setAttribute("height",Ee(i)):(o.setAttribute("height",Ee(i)),o.setAttribute("depth",Ee(-i))),o.setAttribute("voffset",Ee(i)),o}});function Vv(e,t,r){for(var n=fr(e,t,!1),i=t.sizeMultiplier/r.sizeMultiplier,a=0;a<n.length;a++){var s=n[a].classes.indexOf("sizing");s<0?Array.prototype.push.apply(n[a].classes,t.sizingClasses(r)):n[a].classes[s+1]==="reset-size"+t.size&&(n[a].classes[s+1]="reset-size"+r.size),n[a].height*=i,n[a].depth*=i}return ie.makeFragment(n)}var my=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],$j=(e,t)=>{var r=t.havingSize(e.size);return Vv(e.body,r,t)};Ne({type:"sizing",names:my,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:r,funcName:n,parser:i}=e,a=i.parseExpression(!1,r);return{type:"sizing",mode:i.mode,size:my.indexOf(n)+1,body:a}},htmlBuilder:$j,mathmlBuilder:(e,t)=>{var r=t.havingSize(e.size),n=sn(e.body,r),i=new ye.MathNode("mstyle",n);return i.setAttribute("mathsize",Ee(r.sizeMultiplier)),i}});Ne({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,r)=>{var{parser:n}=e,i=!1,a=!1,s=r[0]&>(r[0],"ordgroup");if(s)for(var o="",l=0;l<s.body.length;++l){var c=s.body[l];if(o=c.text,o==="t")i=!0;else if(o==="b")a=!0;else{i=!1,a=!1;break}}else i=!0,a=!0;var u=t[0];return{type:"smash",mode:n.mode,body:u,smashHeight:i,smashDepth:a}},htmlBuilder:(e,t)=>{var r=ie.makeSpan([],[St(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0,r.children))for(var n=0;n<r.children.length;n++)r.children[n].height=0;if(e.smashDepth&&(r.depth=0,r.children))for(var i=0;i<r.children.length;i++)r.children[i].depth=0;var a=ie.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},t);return ie.makeSpan(["mord"],[a],t)},mathmlBuilder:(e,t)=>{var r=new ye.MathNode("mpadded",[Ot(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r}});Ne({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:n}=e,i=r[0],a=t[0];return{type:"sqrt",mode:n.mode,body:a,index:i}},htmlBuilder(e,t){var r=St(e.body,t.havingCrampedStyle());r.height===0&&(r.height=t.fontMetrics().xHeight),r=ie.wrapFragment(r,t);var n=t.fontMetrics(),i=n.defaultRuleThickness,a=i;t.style.id<tt.TEXT.id&&(a=t.fontMetrics().xHeight);var s=i+a/4,o=r.height+r.depth+s+i,{span:l,ruleWidth:c,advanceWidth:u}=Oi.sqrtImage(o,t),h=l.height-c;h>r.height+r.depth+s&&(s=(s+h-r.height-r.depth)/2);var d=l.height-r.height-s-c;r.style.paddingLeft=Ee(u);var f=ie.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+d)},{type:"elem",elem:l},{type:"kern",size:c}]},t);if(e.index){var p=t.havingStyle(tt.SCRIPTSCRIPT),m=St(e.index,p,t),b=.6*(f.height-f.depth),y=ie.makeVList({positionType:"shift",positionData:-b,children:[{type:"elem",elem:m}]},t),v=ie.makeSpan(["root"],[y]);return ie.makeSpan(["mord","sqrt"],[v,f],t)}else return ie.makeSpan(["mord","sqrt"],[f],t)},mathmlBuilder(e,t){var{body:r,index:n}=e;return n?new ye.MathNode("mroot",[Ot(r,t),Ot(n,t)]):new ye.MathNode("msqrt",[Ot(r,t)])}});var gy={display:tt.DISPLAY,text:tt.TEXT,script:tt.SCRIPT,scriptscript:tt.SCRIPTSCRIPT};Ne({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:r,funcName:n,parser:i}=e,a=i.parseExpression(!0,r),s=n.slice(1,n.length-5);return{type:"styling",mode:i.mode,style:s,body:a}},htmlBuilder(e,t){var r=gy[e.style],n=t.havingStyle(r).withFont("");return Vv(e.body,n,t)},mathmlBuilder(e,t){var r=gy[e.style],n=t.havingStyle(r),i=sn(e.body,n),a=new ye.MathNode("mstyle",i),s={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},o=s[e.style];return a.setAttribute("scriptlevel",o[0]),a.setAttribute("displaystyle",o[1]),a}});var zj=function(t,r){var n=t.base;if(n)if(n.type==="op"){var i=n.limits&&(r.style.size===tt.DISPLAY.size||n.alwaysHandleSupSub);return i?ko:null}else if(n.type==="operatorname"){var a=n.alwaysHandleSupSub&&(r.style.size===tt.DISPLAY.size||n.limits);return a?Yv:null}else{if(n.type==="accent")return _t.isCharacterBox(n.base)?m1:null;if(n.type==="horizBrace"){var s=!t.sub;return s===n.isOver?Uv:null}else return null}else return null};us({type:"supsub",htmlBuilder(e,t){var r=zj(e,t);if(r)return r(e,t);var{base:n,sup:i,sub:a}=e,s=St(n,t),o,l,c=t.fontMetrics(),u=0,h=0,d=n&&_t.isCharacterBox(n);if(i){var f=t.havingStyle(t.style.sup());o=St(i,f,t),d||(u=s.height-f.fontMetrics().supDrop*f.sizeMultiplier/t.sizeMultiplier)}if(a){var p=t.havingStyle(t.style.sub());l=St(a,p,t),d||(h=s.depth+p.fontMetrics().subDrop*p.sizeMultiplier/t.sizeMultiplier)}var m;t.style===tt.DISPLAY?m=c.sup1:t.style.cramped?m=c.sup3:m=c.sup2;var b=t.sizeMultiplier,y=Ee(.5/c.ptPerEm/b),v=null;if(l){var T=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");(s instanceof Nn||T)&&(v=Ee(-s.italic))}var A;if(o&&l){u=Math.max(u,m,o.depth+.25*c.xHeight),h=Math.max(h,c.sub2);var E=c.defaultRuleThickness,S=4*E;if(u-o.depth-(l.height-h)<S){h=S-(u-o.depth)+l.height;var I=.8*c.xHeight-(u-o.depth);I>0&&(u+=I,h-=I)}var D=[{type:"elem",elem:l,shift:h,marginRight:y,marginLeft:v},{type:"elem",elem:o,shift:-u,marginRight:y}];A=ie.makeVList({positionType:"individualShift",children:D},t)}else if(l){h=Math.max(h,c.sub1,l.height-.8*c.xHeight);var H=[{type:"elem",elem:l,marginLeft:v,marginRight:y}];A=ie.makeVList({positionType:"shift",positionData:h,children:H},t)}else if(o)u=Math.max(u,m,o.depth+.25*c.xHeight),A=ie.makeVList({positionType:"shift",positionData:-u,children:[{type:"elem",elem:o,marginRight:y}]},t);else throw new Error("supsub must have either sup or sub.");var R=Jf(s,"right")||"mord";return ie.makeSpan([R],[s,ie.makeSpan(["msupsub"],[A])],t)},mathmlBuilder(e,t){var r=!1,n,i;e.base&&e.base.type==="horizBrace"&&(i=!!e.sup,i===e.base.isOver&&(r=!0,n=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var a=[Ot(e.base,t)];e.sub&&a.push(Ot(e.sub,t)),e.sup&&a.push(Ot(e.sup,t));var s;if(r)s=n?"mover":"munder";else if(e.sub)if(e.sup){var c=e.base;c&&c.type==="op"&&c.limits&&t.style===tt.DISPLAY||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(t.style===tt.DISPLAY||c.limits)?s="munderover":s="msubsup"}else{var l=e.base;l&&l.type==="op"&&l.limits&&(t.style===tt.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||t.style===tt.DISPLAY)?s="munder":s="msub"}else{var o=e.base;o&&o.type==="op"&&o.limits&&(t.style===tt.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||t.style===tt.DISPLAY)?s="mover":s="msup"}return new ye.MathNode(s,a)}});us({type:"atom",htmlBuilder(e,t){return ie.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var r=new ye.MathNode("mo",[Ln(e.text,e.mode)]);if(e.family==="bin"){var n=f1(e,t);n==="bold-italic"&&r.setAttribute("mathvariant",n)}else e.family==="punct"?r.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&r.setAttribute("stretchy","false");return r}});var Xv={mi:"italic",mn:"normal",mtext:"normal"};us({type:"mathord",htmlBuilder(e,t){return ie.makeOrd(e,t,"mathord")},mathmlBuilder(e,t){var r=new ye.MathNode("mi",[Ln(e.text,e.mode,t)]),n=f1(e,t)||"italic";return n!==Xv[r.type]&&r.setAttribute("mathvariant",n),r}});us({type:"textord",htmlBuilder(e,t){return ie.makeOrd(e,t,"textord")},mathmlBuilder(e,t){var r=Ln(e.text,e.mode,t),n=f1(e,t)||"normal",i;return e.mode==="text"?i=new ye.MathNode("mtext",[r]):/[0-9]/.test(e.text)?i=new ye.MathNode("mn",[r]):e.text==="\\prime"?i=new ye.MathNode("mo",[r]):i=new ye.MathNode("mi",[r]),n!==Xv[i.type]&&i.setAttribute("mathvariant",n),i}});var Ud={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Wd={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};us({type:"spacing",htmlBuilder(e,t){if(Wd.hasOwnProperty(e.text)){var r=Wd[e.text].className||"";if(e.mode==="text"){var n=ie.makeOrd(e,t,"textord");return n.classes.push(r),n}else return ie.makeSpan(["mspace",r],[ie.mathsym(e.text,e.mode,t)],t)}else{if(Ud.hasOwnProperty(e.text))return ie.makeSpan(["mspace",Ud[e.text]],[],t);throw new xe('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,t){var r;if(Wd.hasOwnProperty(e.text))r=new ye.MathNode("mtext",[new ye.TextNode(" ")]);else{if(Ud.hasOwnProperty(e.text))return new ye.MathNode("mspace");throw new xe('Unknown type of space "'+e.text+'"')}return r}});var by=()=>{var e=new ye.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};us({type:"tag",mathmlBuilder(e,t){var r=new ye.MathNode("mtable",[new ye.MathNode("mtr",[by(),new ye.MathNode("mtd",[ma(e.body,t)]),by(),new ye.MathNode("mtd",[ma(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});var yy={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},xy={"\\textbf":"textbf","\\textmd":"textmd"},Hj={"\\textit":"textit","\\textup":"textup"},vy=(e,t)=>{var r=e.font;if(r){if(yy[r])return t.withTextFontFamily(yy[r]);if(xy[r])return t.withTextFontWeight(xy[r]);if(r==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit")}else return t;return t.withTextFontShape(Hj[r])};Ne({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:n}=e,i=t[0];return{type:"text",mode:r.mode,body:Zt(i),font:n}},htmlBuilder(e,t){var r=vy(e,t),n=fr(e.body,r,!0);return ie.makeSpan(["mord","text"],n,r)},mathmlBuilder(e,t){var r=vy(e,t);return ma(e.body,r)}});Ne({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"underline",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=St(e.body,t),n=ie.makeLineSpan("underline-line",t),i=t.fontMetrics().defaultRuleThickness,a=ie.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:i},{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r}]},t);return ie.makeSpan(["mord","underline"],[a],t)},mathmlBuilder(e,t){var r=new ye.MathNode("mo",[new ye.TextNode("‾")]);r.setAttribute("stretchy","true");var n=new ye.MathNode("munder",[Ot(e.body,t),r]);return n.setAttribute("accentunder","true"),n}});Ne({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"vcenter",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=St(e.body,t),n=t.fontMetrics().axisHeight,i=.5*(r.height-n-(r.depth+n));return ie.makeVList({positionType:"shift",positionData:i,children:[{type:"elem",elem:r}]},t)},mathmlBuilder(e,t){return new ye.MathNode("mpadded",[Ot(e.body,t)],["vcenter"])}});Ne({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new xe("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var r=ky(e),n=[],i=t.havingStyle(t.style.text()),a=0;a<r.length;a++){var s=r[a];s==="~"&&(s="\\textasciitilde"),n.push(ie.makeSymbol(s,"Typewriter-Regular",e.mode,i,["mord","texttt"]))}return ie.makeSpan(["mord","text"].concat(i.sizingClasses(t)),ie.tryCombineChars(n),i)},mathmlBuilder(e,t){var r=new ye.TextNode(ky(e)),n=new ye.MathNode("mtext",[r]);return n.setAttribute("mathvariant","monospace"),n}});var ky=e=>e.body.replace(/ /g,e.star?"␣":" "),la=yv,Kv=`[ \r
|
|
382
|
+
]`,qj="\\\\[a-zA-Z@]+",jj="\\\\[^\uD800-\uDFFF]",Uj="("+qj+")"+Kv+"*",Wj=`\\\\(
|
|
383
|
+
|[ \r ]+
|
|
384
|
+
?)[ \r ]*`,np="[̀-ͯ]",Gj=new RegExp(np+"+$"),Yj="("+Kv+"+)|"+(Wj+"|")+"([!-\\[\\]-‧-豈-]"+(np+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(np+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+Uj)+("|"+jj+")");class wy{constructor(t,r){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=t,this.settings=r,this.tokenRegex=new RegExp(Yj,"g"),this.catcodes={"%":14,"~":13}}setCatcode(t,r){this.catcodes[t]=r}lex(){var t=this.input,r=this.tokenRegex.lastIndex;if(r===t.length)return new gn("EOF",new tn(this,r,r));var n=this.tokenRegex.exec(t);if(n===null||n.index!==r)throw new xe("Unexpected character: '"+t[r]+"'",new gn(t[r],new tn(this,r,r+1)));var i=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[i]===14){var a=t.indexOf(`
|
|
385
|
+
`,this.tokenRegex.lastIndex);return a===-1?(this.tokenRegex.lastIndex=t.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=a+1,this.lex()}return new gn(i,new tn(this,r,this.tokenRegex.lastIndex))}}class Vj{constructor(t,r){t===void 0&&(t={}),r===void 0&&(r={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=r,this.builtins=t,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new xe("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var t=this.undefStack.pop();for(var r in t)t.hasOwnProperty(r)&&(t[r]==null?delete this.current[r]:this.current[r]=t[r])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(t){return this.current.hasOwnProperty(t)||this.builtins.hasOwnProperty(t)}get(t){return this.current.hasOwnProperty(t)?this.current[t]:this.builtins[t]}set(t,r,n){if(n===void 0&&(n=!1),n){for(var i=0;i<this.undefStack.length;i++)delete this.undefStack[i][t];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][t]=r)}else{var a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(t)&&(a[t]=this.current[t])}r==null?delete this.current[t]:this.current[t]=r}}var Xj=$v;M("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}});M("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}});M("\\@firstoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}});M("\\@secondoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}});M("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var r=e.future();return t[0].length===1&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}});M("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");M("\\TextOrMath",function(e){var t=e.consumeArgs(2);return e.mode==="text"?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var Ty={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};M("\\char",function(e){var t=e.popToken(),r,n="";if(t.text==="'")r=8,t=e.popToken();else if(t.text==='"')r=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]==="\\")n=t.text.charCodeAt(1);else{if(t.text==="EOF")throw new xe("\\char` missing argument");n=t.text.charCodeAt(0)}else r=10;if(r){if(n=Ty[t.text],n==null||n>=r)throw new xe("Invalid base-"+r+" digit "+t.text);for(var i;(i=Ty[e.future().text])!=null&&i<r;)n*=r,n+=i,e.popToken()}return"\\@char{"+n+"}"});var T1=(e,t,r,n)=>{var i=e.consumeArg().tokens;if(i.length!==1)throw new xe("\\newcommand's first argument must be a macro name");var a=i[0].text,s=e.isDefined(a);if(s&&!t)throw new xe("\\newcommand{"+a+"} attempting to redefine "+(a+"; use \\renewcommand"));if(!s&&!r)throw new xe("\\renewcommand{"+a+"} when command "+a+" does not yet exist; use \\newcommand");var o=0;if(i=e.consumeArg().tokens,i.length===1&&i[0].text==="["){for(var l="",c=e.expandNextToken();c.text!=="]"&&c.text!=="EOF";)l+=c.text,c=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new xe("Invalid number of arguments: "+l);o=parseInt(l),i=e.consumeArg().tokens}return s&&n||e.macros.set(a,{tokens:i,numArgs:o}),""};M("\\newcommand",e=>T1(e,!1,!0,!1));M("\\renewcommand",e=>T1(e,!0,!1,!1));M("\\providecommand",e=>T1(e,!0,!0,!0));M("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(r=>r.text).join("")),""});M("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(r=>r.text).join("")),""});M("\\show",e=>{var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),la[r],Ft.math[r],Ft.text[r]),""});M("\\bgroup","{");M("\\egroup","}");M("~","\\nobreakspace");M("\\lq","`");M("\\rq","'");M("\\aa","\\r a");M("\\AA","\\r A");M("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");M("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");M("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");M("ℬ","\\mathscr{B}");M("ℰ","\\mathscr{E}");M("ℱ","\\mathscr{F}");M("ℋ","\\mathscr{H}");M("ℐ","\\mathscr{I}");M("ℒ","\\mathscr{L}");M("ℳ","\\mathscr{M}");M("ℛ","\\mathscr{R}");M("ℭ","\\mathfrak{C}");M("ℌ","\\mathfrak{H}");M("ℨ","\\mathfrak{Z}");M("\\Bbbk","\\Bbb{k}");M("·","\\cdotp");M("\\llap","\\mathllap{\\textrm{#1}}");M("\\rlap","\\mathrlap{\\textrm{#1}}");M("\\clap","\\mathclap{\\textrm{#1}}");M("\\mathstrut","\\vphantom{(}");M("\\underbar","\\underline{\\text{#1}}");M("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');M("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");M("\\ne","\\neq");M("≠","\\neq");M("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");M("∉","\\notin");M("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");M("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");M("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");M("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");M("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");M("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");M("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");M("⟂","\\perp");M("‼","\\mathclose{!\\mkern-0.8mu!}");M("∌","\\notni");M("⌜","\\ulcorner");M("⌝","\\urcorner");M("⌞","\\llcorner");M("⌟","\\lrcorner");M("©","\\copyright");M("®","\\textregistered");M("️","\\textregistered");M("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');M("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');M("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');M("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');M("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");M("⋮","\\vdots");M("\\varGamma","\\mathit{\\Gamma}");M("\\varDelta","\\mathit{\\Delta}");M("\\varTheta","\\mathit{\\Theta}");M("\\varLambda","\\mathit{\\Lambda}");M("\\varXi","\\mathit{\\Xi}");M("\\varPi","\\mathit{\\Pi}");M("\\varSigma","\\mathit{\\Sigma}");M("\\varUpsilon","\\mathit{\\Upsilon}");M("\\varPhi","\\mathit{\\Phi}");M("\\varPsi","\\mathit{\\Psi}");M("\\varOmega","\\mathit{\\Omega}");M("\\substack","\\begin{subarray}{c}#1\\end{subarray}");M("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");M("\\boxed","\\fbox{$\\displaystyle{#1}$}");M("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");M("\\implies","\\DOTSB\\;\\Longrightarrow\\;");M("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");M("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");M("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var Cy={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};M("\\dots",function(e){var t="\\dotso",r=e.expandAfterFuture().text;return r in Cy?t=Cy[r]:(r.slice(0,4)==="\\not"||r in Ft.math&&["bin","rel"].includes(Ft.math[r].group))&&(t="\\dotsb"),t});var C1={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};M("\\dotso",function(e){var t=e.future().text;return t in C1?"\\ldots\\,":"\\ldots"});M("\\dotsc",function(e){var t=e.future().text;return t in C1&&t!==","?"\\ldots\\,":"\\ldots"});M("\\cdots",function(e){var t=e.future().text;return t in C1?"\\@cdots\\,":"\\@cdots"});M("\\dotsb","\\cdots");M("\\dotsm","\\cdots");M("\\dotsi","\\!\\cdots");M("\\dotsx","\\ldots\\,");M("\\DOTSI","\\relax");M("\\DOTSB","\\relax");M("\\DOTSX","\\relax");M("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");M("\\,","\\tmspace+{3mu}{.1667em}");M("\\thinspace","\\,");M("\\>","\\mskip{4mu}");M("\\:","\\tmspace+{4mu}{.2222em}");M("\\medspace","\\:");M("\\;","\\tmspace+{5mu}{.2777em}");M("\\thickspace","\\;");M("\\!","\\tmspace-{3mu}{.1667em}");M("\\negthinspace","\\!");M("\\negmedspace","\\tmspace-{4mu}{.2222em}");M("\\negthickspace","\\tmspace-{5mu}{.277em}");M("\\enspace","\\kern.5em ");M("\\enskip","\\hskip.5em\\relax");M("\\quad","\\hskip1em\\relax");M("\\qquad","\\hskip2em\\relax");M("\\tag","\\@ifstar\\tag@literal\\tag@paren");M("\\tag@paren","\\tag@literal{({#1})}");M("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new xe("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});M("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");M("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");M("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");M("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");M("\\newline","\\\\\\relax");M("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Qv=Ee(ai["Main-Regular"][84][1]-.7*ai["Main-Regular"][65][1]);M("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+Qv+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");M("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+Qv+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");M("\\hspace","\\@ifstar\\@hspacer\\@hspace");M("\\@hspace","\\hskip #1\\relax");M("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");M("\\ordinarycolon",":");M("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");M("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');M("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');M("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');M("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');M("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');M("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');M("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');M("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');M("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');M("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');M("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');M("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');M("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');M("∷","\\dblcolon");M("∹","\\eqcolon");M("≔","\\coloneqq");M("≕","\\eqqcolon");M("⩴","\\Coloneqq");M("\\ratio","\\vcentcolon");M("\\coloncolon","\\dblcolon");M("\\colonequals","\\coloneqq");M("\\coloncolonequals","\\Coloneqq");M("\\equalscolon","\\eqqcolon");M("\\equalscoloncolon","\\Eqqcolon");M("\\colonminus","\\coloneq");M("\\coloncolonminus","\\Coloneq");M("\\minuscolon","\\eqcolon");M("\\minuscoloncolon","\\Eqcolon");M("\\coloncolonapprox","\\Colonapprox");M("\\coloncolonsim","\\Colonsim");M("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");M("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");M("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");M("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");M("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");M("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");M("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");M("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");M("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");M("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");M("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");M("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");M("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");M("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");M("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");M("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");M("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");M("\\nleqq","\\html@mathml{\\@nleqq}{≰}");M("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");M("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");M("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");M("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");M("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");M("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");M("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");M("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");M("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");M("\\imath","\\html@mathml{\\@imath}{ı}");M("\\jmath","\\html@mathml{\\@jmath}{ȷ}");M("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");M("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");M("⟦","\\llbracket");M("⟧","\\rrbracket");M("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");M("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");M("⦃","\\lBrace");M("⦄","\\rBrace");M("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");M("⦵","\\minuso");M("\\darr","\\downarrow");M("\\dArr","\\Downarrow");M("\\Darr","\\Downarrow");M("\\lang","\\langle");M("\\rang","\\rangle");M("\\uarr","\\uparrow");M("\\uArr","\\Uparrow");M("\\Uarr","\\Uparrow");M("\\N","\\mathbb{N}");M("\\R","\\mathbb{R}");M("\\Z","\\mathbb{Z}");M("\\alef","\\aleph");M("\\alefsym","\\aleph");M("\\Alpha","\\mathrm{A}");M("\\Beta","\\mathrm{B}");M("\\bull","\\bullet");M("\\Chi","\\mathrm{X}");M("\\clubs","\\clubsuit");M("\\cnums","\\mathbb{C}");M("\\Complex","\\mathbb{C}");M("\\Dagger","\\ddagger");M("\\diamonds","\\diamondsuit");M("\\empty","\\emptyset");M("\\Epsilon","\\mathrm{E}");M("\\Eta","\\mathrm{H}");M("\\exist","\\exists");M("\\harr","\\leftrightarrow");M("\\hArr","\\Leftrightarrow");M("\\Harr","\\Leftrightarrow");M("\\hearts","\\heartsuit");M("\\image","\\Im");M("\\infin","\\infty");M("\\Iota","\\mathrm{I}");M("\\isin","\\in");M("\\Kappa","\\mathrm{K}");M("\\larr","\\leftarrow");M("\\lArr","\\Leftarrow");M("\\Larr","\\Leftarrow");M("\\lrarr","\\leftrightarrow");M("\\lrArr","\\Leftrightarrow");M("\\Lrarr","\\Leftrightarrow");M("\\Mu","\\mathrm{M}");M("\\natnums","\\mathbb{N}");M("\\Nu","\\mathrm{N}");M("\\Omicron","\\mathrm{O}");M("\\plusmn","\\pm");M("\\rarr","\\rightarrow");M("\\rArr","\\Rightarrow");M("\\Rarr","\\Rightarrow");M("\\real","\\Re");M("\\reals","\\mathbb{R}");M("\\Reals","\\mathbb{R}");M("\\Rho","\\mathrm{P}");M("\\sdot","\\cdot");M("\\sect","\\S");M("\\spades","\\spadesuit");M("\\sub","\\subset");M("\\sube","\\subseteq");M("\\supe","\\supseteq");M("\\Tau","\\mathrm{T}");M("\\thetasym","\\vartheta");M("\\weierp","\\wp");M("\\Zeta","\\mathrm{Z}");M("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");M("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");M("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");M("\\bra","\\mathinner{\\langle{#1}|}");M("\\ket","\\mathinner{|{#1}\\rangle}");M("\\braket","\\mathinner{\\langle{#1}\\rangle}");M("\\Bra","\\left\\langle#1\\right|");M("\\Ket","\\left|#1\\right\\rangle");var Zv=e=>t=>{var r=t.consumeArg().tokens,n=t.consumeArg().tokens,i=t.consumeArg().tokens,a=t.consumeArg().tokens,s=t.macros.get("|"),o=t.macros.get("\\|");t.macros.beginGroup();var l=h=>d=>{e&&(d.macros.set("|",s),i.length&&d.macros.set("\\|",o));var f=h;if(!h&&i.length){var p=d.future();p.text==="|"&&(d.popToken(),f=!0)}return{tokens:f?i:n,numArgs:0}};t.macros.set("|",l(!1)),i.length&&t.macros.set("\\|",l(!0));var c=t.consumeArg().tokens,u=t.expandTokens([...a,...c,...r]);return t.macros.endGroup(),{tokens:u.reverse(),numArgs:0}};M("\\bra@ket",Zv(!1));M("\\bra@set",Zv(!0));M("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");M("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");M("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");M("\\angln","{\\angl n}");M("\\blue","\\textcolor{##6495ed}{#1}");M("\\orange","\\textcolor{##ffa500}{#1}");M("\\pink","\\textcolor{##ff00af}{#1}");M("\\red","\\textcolor{##df0030}{#1}");M("\\green","\\textcolor{##28ae7b}{#1}");M("\\gray","\\textcolor{gray}{#1}");M("\\purple","\\textcolor{##9d38bd}{#1}");M("\\blueA","\\textcolor{##ccfaff}{#1}");M("\\blueB","\\textcolor{##80f6ff}{#1}");M("\\blueC","\\textcolor{##63d9ea}{#1}");M("\\blueD","\\textcolor{##11accd}{#1}");M("\\blueE","\\textcolor{##0c7f99}{#1}");M("\\tealA","\\textcolor{##94fff5}{#1}");M("\\tealB","\\textcolor{##26edd5}{#1}");M("\\tealC","\\textcolor{##01d1c1}{#1}");M("\\tealD","\\textcolor{##01a995}{#1}");M("\\tealE","\\textcolor{##208170}{#1}");M("\\greenA","\\textcolor{##b6ffb0}{#1}");M("\\greenB","\\textcolor{##8af281}{#1}");M("\\greenC","\\textcolor{##74cf70}{#1}");M("\\greenD","\\textcolor{##1fab54}{#1}");M("\\greenE","\\textcolor{##0d923f}{#1}");M("\\goldA","\\textcolor{##ffd0a9}{#1}");M("\\goldB","\\textcolor{##ffbb71}{#1}");M("\\goldC","\\textcolor{##ff9c39}{#1}");M("\\goldD","\\textcolor{##e07d10}{#1}");M("\\goldE","\\textcolor{##a75a05}{#1}");M("\\redA","\\textcolor{##fca9a9}{#1}");M("\\redB","\\textcolor{##ff8482}{#1}");M("\\redC","\\textcolor{##f9685d}{#1}");M("\\redD","\\textcolor{##e84d39}{#1}");M("\\redE","\\textcolor{##bc2612}{#1}");M("\\maroonA","\\textcolor{##ffbde0}{#1}");M("\\maroonB","\\textcolor{##ff92c6}{#1}");M("\\maroonC","\\textcolor{##ed5fa6}{#1}");M("\\maroonD","\\textcolor{##ca337c}{#1}");M("\\maroonE","\\textcolor{##9e034e}{#1}");M("\\purpleA","\\textcolor{##ddd7ff}{#1}");M("\\purpleB","\\textcolor{##c6b9fc}{#1}");M("\\purpleC","\\textcolor{##aa87ff}{#1}");M("\\purpleD","\\textcolor{##7854ab}{#1}");M("\\purpleE","\\textcolor{##543b78}{#1}");M("\\mintA","\\textcolor{##f5f9e8}{#1}");M("\\mintB","\\textcolor{##edf2df}{#1}");M("\\mintC","\\textcolor{##e0e5cc}{#1}");M("\\grayA","\\textcolor{##f6f7f7}{#1}");M("\\grayB","\\textcolor{##f0f1f2}{#1}");M("\\grayC","\\textcolor{##e3e5e6}{#1}");M("\\grayD","\\textcolor{##d6d8da}{#1}");M("\\grayE","\\textcolor{##babec2}{#1}");M("\\grayF","\\textcolor{##888d93}{#1}");M("\\grayG","\\textcolor{##626569}{#1}");M("\\grayH","\\textcolor{##3b3e40}{#1}");M("\\grayI","\\textcolor{##21242c}{#1}");M("\\kaBlue","\\textcolor{##314453}{#1}");M("\\kaGreen","\\textcolor{##71B307}{#1}");var Jv={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class Kj{constructor(t,r,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=r,this.expansionCount=0,this.feed(t),this.macros=new Vj(Xj,r.macros),this.mode=n,this.stack=[]}feed(t){this.lexer=new wy(t,this.settings)}switchMode(t){this.mode=t}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(t){this.stack.push(t)}pushTokens(t){this.stack.push(...t)}scanArgument(t){var r,n,i;if(t){if(this.consumeSpaces(),this.future().text!=="[")return null;r=this.popToken(),{tokens:i,end:n}=this.consumeArg(["]"])}else({tokens:i,start:r,end:n}=this.consumeArg());return this.pushToken(new gn("EOF",n.loc)),this.pushTokens(i),new gn("",tn.range(r,n))}consumeSpaces(){for(;;){var t=this.future();if(t.text===" ")this.stack.pop();else break}}consumeArg(t){var r=[],n=t&&t.length>0;n||this.consumeSpaces();var i=this.future(),a,s=0,o=0;do{if(a=this.popToken(),r.push(a),a.text==="{")++s;else if(a.text==="}"){if(--s,s===-1)throw new xe("Extra }",a)}else if(a.text==="EOF")throw new xe("Unexpected end of input in a macro argument, expected '"+(t&&n?t[o]:"}")+"'",a);if(t&&n)if((s===0||s===1&&t[o]==="{")&&a.text===t[o]){if(++o,o===t.length){r.splice(-o,o);break}}else o=0}while(s!==0||n);return i.text==="{"&&r[r.length-1].text==="}"&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:i,end:a}}consumeArgs(t,r){if(r){if(r.length!==t+1)throw new xe("The length of delimiters doesn't match the number of args!");for(var n=r[0],i=0;i<n.length;i++){var a=this.popToken();if(n[i]!==a.text)throw new xe("Use of the macro doesn't match its definition",a)}}for(var s=[],o=0;o<t;o++)s.push(this.consumeArg(r&&r[o+1]).tokens);return s}countExpansion(t){if(this.expansionCount+=t,this.expansionCount>this.settings.maxExpand)throw new xe("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(t){var r=this.popToken(),n=r.text,i=r.noexpand?null:this._getExpansion(n);if(i==null||t&&i.unexpandable){if(t&&i==null&&n[0]==="\\"&&!this.isDefined(n))throw new xe("Undefined control sequence: "+n);return this.pushToken(r),!1}this.countExpansion(1);var a=i.tokens,s=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs){a=a.slice();for(var o=a.length-1;o>=0;--o){var l=a[o];if(l.text==="#"){if(o===0)throw new xe("Incomplete placeholder at end of macro body",l);if(l=a[--o],l.text==="#")a.splice(o+1,1);else if(/^[1-9]$/.test(l.text))a.splice(o,2,...s[+l.text-1]);else throw new xe("Not a valid argument number",l)}}}return this.pushTokens(a),a.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var t=this.stack.pop();return t.treatAsRelax&&(t.text="\\relax"),t}throw new Error}expandMacro(t){return this.macros.has(t)?this.expandTokens([new gn(t)]):void 0}expandTokens(t){var r=[],n=this.stack.length;for(this.pushTokens(t);this.stack.length>n;)if(this.expandOnce(!0)===!1){var i=this.stack.pop();i.treatAsRelax&&(i.noexpand=!1,i.treatAsRelax=!1),r.push(i)}return this.countExpansion(r.length),r}expandMacroAsText(t){var r=this.expandMacro(t);return r&&r.map(n=>n.text).join("")}_getExpansion(t){var r=this.macros.get(t);if(r==null)return r;if(t.length===1){var n=this.lexer.catcodes[t];if(n!=null&&n!==13)return}var i=typeof r=="function"?r(this):r;if(typeof i=="string"){var a=0;if(i.indexOf("#")!==-1)for(var s=i.replace(/##/g,"");s.indexOf("#"+(a+1))!==-1;)++a;for(var o=new wy(i,this.settings),l=[],c=o.lex();c.text!=="EOF";)l.push(c),c=o.lex();l.reverse();var u={tokens:l,numArgs:a};return u}return i}isDefined(t){return this.macros.has(t)||la.hasOwnProperty(t)||Ft.math.hasOwnProperty(t)||Ft.text.hasOwnProperty(t)||Jv.hasOwnProperty(t)}isExpandable(t){var r=this.macros.get(t);return r!=null?typeof r=="string"||typeof r=="function"||!r.unexpandable:la.hasOwnProperty(t)&&!la[t].primitive}}var Sy=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Zc=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Gd={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},Ey={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class mh{constructor(t,r){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Kj(t,r,this.mode),this.settings=r,this.leftrightDepth=0}expect(t,r){if(r===void 0&&(r=!0),this.fetch().text!==t)throw new xe("Expected '"+t+"', got '"+this.fetch().text+"'",this.fetch());r&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(t){this.mode=t,this.gullet.switchMode(t)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var t=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),t}finally{this.gullet.endGroups()}}subparse(t){var r=this.nextToken;this.consume(),this.gullet.pushToken(new gn("}")),this.gullet.pushTokens(t);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=r,n}parseExpression(t,r){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var i=this.fetch();if(mh.endOfExpression.indexOf(i.text)!==-1||r&&i.text===r||t&&la[i.text]&&la[i.text].infix)break;var a=this.parseAtom(r);if(a){if(a.type==="internal")continue}else break;n.push(a)}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(t){for(var r=-1,n,i=0;i<t.length;i++)if(t[i].type==="infix"){if(r!==-1)throw new xe("only one infix operator per group",t[i].token);r=i,n=t[i].replaceWith}if(r!==-1&&n){var a,s,o=t.slice(0,r),l=t.slice(r+1);o.length===1&&o[0].type==="ordgroup"?a=o[0]:a={type:"ordgroup",mode:this.mode,body:o},l.length===1&&l[0].type==="ordgroup"?s=l[0]:s={type:"ordgroup",mode:this.mode,body:l};var c;return n==="\\\\abovefrac"?c=this.callFunction(n,[a,t[r],s],[]):c=this.callFunction(n,[a,s],[]),[c]}else return t}handleSupSubscript(t){var r=this.fetch(),n=r.text;this.consume(),this.consumeSpaces();var i;do{var a;i=this.parseGroup(t)}while(((a=i)==null?void 0:a.type)==="internal");if(!i)throw new xe("Expected group after '"+n+"'",r);return i}formatUnsupportedCmd(t){for(var r=[],n=0;n<t.length;n++)r.push({type:"textord",mode:"text",text:t[n]});var i={type:"text",mode:this.mode,body:r},a={type:"color",mode:this.mode,color:this.settings.errorColor,body:[i]};return a}parseAtom(t){var r=this.parseGroup("atom",t);if(r?.type==="internal"||this.mode==="text")return r;for(var n,i;;){this.consumeSpaces();var a=this.fetch();if(a.text==="\\limits"||a.text==="\\nolimits"){if(r&&r.type==="op"){var s=a.text==="\\limits";r.limits=s,r.alwaysHandleSupSub=!0}else if(r&&r.type==="operatorname")r.alwaysHandleSupSub&&(r.limits=a.text==="\\limits");else throw new xe("Limit controls must follow a math operator",a);this.consume()}else if(a.text==="^"){if(n)throw new xe("Double superscript",a);n=this.handleSupSubscript("superscript")}else if(a.text==="_"){if(i)throw new xe("Double subscript",a);i=this.handleSupSubscript("subscript")}else if(a.text==="'"){if(n)throw new xe("Double superscript",a);var o={type:"textord",mode:this.mode,text:"\\prime"},l=[o];for(this.consume();this.fetch().text==="'";)l.push(o),this.consume();this.fetch().text==="^"&&l.push(this.handleSupSubscript("superscript")),n={type:"ordgroup",mode:this.mode,body:l}}else if(Zc[a.text]){var c=Sy.test(a.text),u=[];for(u.push(new gn(Zc[a.text])),this.consume();;){var h=this.fetch().text;if(!Zc[h]||Sy.test(h)!==c)break;u.unshift(new gn(Zc[h])),this.consume()}var d=this.subparse(u);c?i={type:"ordgroup",mode:"math",body:d}:n={type:"ordgroup",mode:"math",body:d}}else break}return n||i?{type:"supsub",mode:this.mode,base:r,sup:n,sub:i}:r}parseFunction(t,r){var n=this.fetch(),i=n.text,a=la[i];if(!a)return null;if(this.consume(),r&&r!=="atom"&&!a.allowedInArgument)throw new xe("Got function '"+i+"' with no arguments"+(r?" as "+r:""),n);if(this.mode==="text"&&!a.allowedInText)throw new xe("Can't use function '"+i+"' in text mode",n);if(this.mode==="math"&&a.allowedInMath===!1)throw new xe("Can't use function '"+i+"' in math mode",n);var{args:s,optArgs:o}=this.parseArguments(i,a);return this.callFunction(i,s,o,n,t)}callFunction(t,r,n,i,a){var s={funcName:t,parser:this,token:i,breakOnTokenText:a},o=la[t];if(o&&o.handler)return o.handler(s,r,n);throw new xe("No function handler for "+t)}parseArguments(t,r){var n=r.numArgs+r.numOptionalArgs;if(n===0)return{args:[],optArgs:[]};for(var i=[],a=[],s=0;s<n;s++){var o=r.argTypes&&r.argTypes[s],l=s<r.numOptionalArgs;(r.primitive&&o==null||r.type==="sqrt"&&s===1&&a[0]==null)&&(o="primitive");var c=this.parseGroupOfType("argument to '"+t+"'",o,l);if(l)a.push(c);else if(c!=null)i.push(c);else throw new xe("Null argument, please report this as a bug")}return{args:i,optArgs:a}}parseGroupOfType(t,r,n){switch(r){case"color":return this.parseColorGroup(n);case"size":return this.parseSizeGroup(n);case"url":return this.parseUrlGroup(n);case"math":case"text":return this.parseArgumentGroup(n,r);case"hbox":{var i=this.parseArgumentGroup(n,"text");return i!=null?{type:"styling",mode:i.mode,body:[i],style:"text"}:null}case"raw":{var a=this.parseStringGroup("raw",n);return a!=null?{type:"raw",mode:"text",string:a.text}:null}case"primitive":{if(n)throw new xe("A primitive argument cannot be optional");var s=this.parseGroup(t);if(s==null)throw new xe("Expected group as "+t,this.fetch());return s}case"original":case null:case void 0:return this.parseArgumentGroup(n);default:throw new xe("Unknown group type as "+t,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(t,r){var n=this.gullet.scanArgument(r);if(n==null)return null;for(var i="",a;(a=this.fetch()).text!=="EOF";)i+=a.text,this.consume();return this.consume(),n.text=i,n}parseRegexGroup(t,r){for(var n=this.fetch(),i=n,a="",s;(s=this.fetch()).text!=="EOF"&&t.test(a+s.text);)i=s,a+=i.text,this.consume();if(a==="")throw new xe("Invalid "+r+": '"+n.text+"'",n);return n.range(i,a)}parseColorGroup(t){var r=this.parseStringGroup("color",t);if(r==null)return null;var n=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(r.text);if(!n)throw new xe("Invalid color: '"+r.text+"'",r);var i=n[0];return/^[0-9a-f]{6}$/i.test(i)&&(i="#"+i),{type:"color-token",mode:this.mode,color:i}}parseSizeGroup(t){var r,n=!1;if(this.gullet.consumeSpaces(),!t&&this.gullet.future().text!=="{"?r=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):r=this.parseStringGroup("size",t),!r)return null;!t&&r.text.length===0&&(r.text="0pt",n=!0);var i=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(r.text);if(!i)throw new xe("Invalid size: '"+r.text+"'",r);var a={number:+(i[1]+i[2]),unit:i[3]};if(!cv(a))throw new xe("Invalid unit: '"+a.unit+"'",r);return{type:"size",mode:this.mode,value:a,isBlank:n}}parseUrlGroup(t){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var r=this.parseStringGroup("url",t);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),r==null)return null;var n=r.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:n}}parseArgumentGroup(t,r){var n=this.gullet.scanArgument(t);if(n==null)return null;var i=this.mode;r&&this.switchMode(r),this.gullet.beginGroup();var a=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var s={type:"ordgroup",mode:this.mode,loc:n.loc,body:a};return r&&this.switchMode(i),s}parseGroup(t,r){var n=this.fetch(),i=n.text,a;if(i==="{"||i==="\\begingroup"){this.consume();var s=i==="{"?"}":"\\endgroup";this.gullet.beginGroup();var o=this.parseExpression(!1,s),l=this.fetch();this.expect(s),this.gullet.endGroup(),a={type:"ordgroup",mode:this.mode,loc:tn.range(n,l),body:o,semisimple:i==="\\begingroup"||void 0}}else if(a=this.parseFunction(r,t)||this.parseSymbol(),a==null&&i[0]==="\\"&&!Jv.hasOwnProperty(i)){if(this.settings.throwOnError)throw new xe("Undefined control sequence: "+i,n);a=this.formatUnsupportedCmd(i),this.consume()}return a}formLigatures(t){for(var r=t.length-1,n=0;n<r;++n){var i=t[n],a=i.text;a==="-"&&t[n+1].text==="-"&&(n+1<r&&t[n+2].text==="-"?(t.splice(n,3,{type:"textord",mode:"text",loc:tn.range(i,t[n+2]),text:"---"}),r-=2):(t.splice(n,2,{type:"textord",mode:"text",loc:tn.range(i,t[n+1]),text:"--"}),r-=1)),(a==="'"||a==="`")&&t[n+1].text===a&&(t.splice(n,2,{type:"textord",mode:"text",loc:tn.range(i,t[n+1]),text:a+a}),r-=1)}}parseSymbol(){var t=this.fetch(),r=t.text;if(/^\\verb[^a-zA-Z]/.test(r)){this.consume();var n=r.slice(5),i=n.charAt(0)==="*";if(i&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new xe(`\\verb assertion failed --
|
|
386
|
+
please report what input caused this bug`);return n=n.slice(1,-1),{type:"verb",mode:"text",body:n,star:i}}Ey.hasOwnProperty(r[0])&&!Ft[this.mode][r[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+r[0]+'" used in math mode',t),r=Ey[r[0]]+r.slice(1));var a=Gj.exec(r);a&&(r=r.substring(0,a.index),r==="i"?r="ı":r==="j"&&(r="ȷ"));var s;if(Ft[this.mode][r]){this.settings.strict&&this.mode==="math"&&Zf.indexOf(r)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+r[0]+'" used in math mode',t);var o=Ft[this.mode][r].group,l=tn.range(t),c;if(Fq.hasOwnProperty(o)){var u=o;c={type:"atom",mode:this.mode,family:u,loc:l,text:r}}else c={type:o,mode:this.mode,loc:l,text:r};s=c}else if(r.charCodeAt(0)>=128)this.settings.strict&&(ov(r.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'"'+(" ("+r.charCodeAt(0)+")"),t)),s={type:"textord",mode:"text",loc:tn.range(t),text:r};else return null;if(this.consume(),a)for(var h=0;h<a[0].length;h++){var d=a[0][h];if(!Gd[d])throw new xe("Unknown accent ' "+d+"'",t);var f=Gd[d][this.mode]||Gd[d].text;if(!f)throw new xe("Accent "+d+" unsupported in "+this.mode+" mode",t);s={type:"accent",mode:this.mode,loc:tn.range(t),label:f,isStretchy:!1,isShifty:!0,base:s}}return s}}mh.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var S1=function(t,r){if(!(typeof t=="string"||t instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new mh(t,r);delete n.gullet.macros.current["\\df@tag"];var i=n.parse();if(delete n.gullet.macros.current["\\current@color"],delete n.gullet.macros.current["\\color"],n.gullet.macros.get("\\df@tag")){if(!r.displayMode)throw new xe("\\tag works only in display equations");i=[{type:"tag",mode:"text",body:i,tag:n.subparse([new gn("\\df@tag")])}]}return i},E1=function(t,r,n){r.textContent="";var i=gh(t,n).toNode();r.appendChild(i)};typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),E1=function(){throw new xe("KaTeX doesn't work in quirks mode.")});var ek=function(t,r){var n=gh(t,r).toMarkup();return n},tk=function(t,r){var n=new o1(r);return S1(t,n)},rk=function(t,r,n){if(n.throwOnError||!(t instanceof xe))throw t;var i=ie.makeSpan(["katex-error"],[new Nn(r)]);return i.setAttribute("title",t.toString()),i.setAttribute("style","color:"+n.errorColor),i},gh=function(t,r){var n=new o1(r);try{var i=S1(t,n);return oj(i,t,n)}catch(a){return rk(a,t,n)}},nk=function(t,r){var n=new o1(r);try{var i=S1(t,n);return lj(i,t,n)}catch(a){return rk(a,t,n)}},ik="0.16.28",ak={Span:xc,Anchor:u1,SymbolNode:Nn,SvgNode:$i,PathNode:pa,LineNode:Qf},ip={version:ik,render:E1,renderToString:ek,ParseError:xe,SETTINGS_SCHEMA:Nl,__parse:tk,__renderToDomTree:gh,__renderToHTMLTree:nk,__setFontMetrics:lv,__defineSymbol:x,__defineFunction:Ne,__defineMacro:M,__domTree:ak};const Qj=Object.freeze(Object.defineProperty({__proto__:null,ParseError:xe,SETTINGS_SCHEMA:Nl,__defineFunction:Ne,__defineMacro:M,__defineSymbol:x,__domTree:ak,__parse:tk,__renderToDomTree:gh,__renderToHTMLTree:nk,__setFontMetrics:lv,default:ip,get render(){return E1},renderToString:ek,version:ik},Symbol.toStringTag,{value:"Module"})),Zj={},Jj=[];function eU(e){const t=e||Zj;return function(r,n){hm(r,"element",function(i,a){const s=Array.isArray(i.properties.className)?i.properties.className:Jj,o=s.includes("language-math"),l=s.includes("math-display"),c=s.includes("math-inline");let u=l;if(!o&&!l&&!c)return;let h=a[a.length-1],d=i;if(i.tagName==="code"&&o&&h&&h.type==="element"&&h.tagName==="pre"&&(d=h,h=a[a.length-2],u=!0),!h)return;const f=QH(d,{whitespace:"pre"});let p;try{p=ip.renderToString(f,{...t,displayMode:u,throwOnError:!0})}catch(b){const y=b,v=y.name.toLowerCase();n.message("Could not render math with KaTeX",{ancestors:[...a,i],cause:y,place:i.position,ruleId:v,source:"rehype-katex"});try{p=ip.renderToString(f,{...t,displayMode:u,strict:"ignore",throwOnError:!1})}catch{p=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(t.errorColor||"#cc0000"),title:String(b)},children:[{type:"text",value:f}]}]}}typeof p=="string"&&(p=jH(p).children);const m=h.children.indexOf(d);return h.children.splice(m,1,...p),Iu})}}function tU(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:a},exit:{mathFlow:i,mathFlowFence:n,mathFlowFenceMeta:r,mathFlowValue:o,mathText:s,mathTextData:o}};function e(l){const c={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[c]}},l)}function t(){this.buffer()}function r(){const l=this.resume(),c=this.stack[this.stack.length-1];c.type,c.meta=l}function n(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(l){const c=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),u=this.stack[this.stack.length-1];u.type,this.exit(l),u.value=c;const h=u.data.hChildren[0];h.type,h.tagName,h.children.push({type:"text",value:c}),this.data.mathFlowInside=void 0}function a(l){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},l),this.buffer()}function s(l){const c=this.resume(),u=this.stack[this.stack.length-1];u.type,this.exit(l),u.value=c,u.data.hChildren.push({type:"text",value:c})}function o(l){this.config.enter.data.call(this,l),this.config.exit.data.call(this,l)}}function rU(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),n.peek=i,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:`
|
|
387
|
+
`,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:r,inlineMath:n}};function r(a,s,o,l){const c=a.value||"",u=o.createTracker(l),h="$".repeat(Math.max(T3(c,"$")+1,2)),d=o.enter("mathFlow");let f=u.move(h);if(a.meta){const p=o.enter("mathFlowMeta");f+=u.move(o.safe(a.meta,{after:`
|
|
388
|
+
`,before:f,encode:["$"],...u.current()})),p()}return f+=u.move(`
|
|
389
|
+
`),c&&(f+=u.move(c+`
|
|
390
|
+
`)),f+=u.move(h),d(),f}function n(a,s,o){let l=a.value||"",c=1;for(t||c++;new RegExp("(^|[^$])"+"\\$".repeat(c)+"([^$]|$)").test(l);)c++;const u="$".repeat(c);/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^\$|\$$/.test(l))&&(l=" "+l+" ");let h=-1;for(;++h<o.unsafe.length;){const d=o.unsafe[h];if(!d.atBreak)continue;const f=o.compilePattern(d);let p;for(;p=f.exec(l);){let m=p.index;l.codePointAt(m)===10&&l.codePointAt(m-1)===13&&m--,l=l.slice(0,m)+" "+l.slice(p.index+1)}}return u+l+u}function i(){return"$"}}const nU={tokenize:iU,concrete:!0,name:"mathFlow"},_y={tokenize:aU,partial:!0};function iU(e,t,r){const n=this,i=n.events[n.events.length-1],a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0;let s=0;return o;function o(v){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),l(v)}function l(v){return v===36?(e.consume(v),s++,l):s<2?r(v):(e.exit("mathFlowFenceSequence"),kt(e,c,"whitespace")(v))}function c(v){return v===null||Ge(v)?h(v):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),u(v))}function u(v){return v===null||Ge(v)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),h(v)):v===36?r(v):(e.consume(v),u)}function h(v){return e.exit("mathFlowFence"),n.interrupt?t(v):e.attempt(_y,d,b)(v)}function d(v){return e.attempt({tokenize:y,partial:!0},b,f)(v)}function f(v){return(a?kt(e,p,"linePrefix",a+1):p)(v)}function p(v){return v===null?b(v):Ge(v)?e.attempt(_y,d,b)(v):(e.enter("mathFlowValue"),m(v))}function m(v){return v===null||Ge(v)?(e.exit("mathFlowValue"),p(v)):(e.consume(v),m)}function b(v){return e.exit("mathFlow"),t(v)}function y(v,T,A){let E=0;return kt(v,S,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function S(H){return v.enter("mathFlowFence"),v.enter("mathFlowFenceSequence"),I(H)}function I(H){return H===36?(E++,v.consume(H),I):E<s?A(H):(v.exit("mathFlowFenceSequence"),kt(v,D,"whitespace")(H))}function D(H){return H===null||Ge(H)?(v.exit("mathFlowFence"),T(H)):A(H)}}}function aU(e,t,r){const n=this;return i;function i(s){return s===null?t(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a)}function a(s){return n.parser.lazy[n.now().line]?r(s):t(s)}}function sU(e){let r=(e||{}).singleDollarTextMath;return r==null&&(r=!0),{tokenize:n,resolve:oU,previous:lU,name:"mathText"};function n(i,a,s){let o=0,l,c;return u;function u(m){return i.enter("mathText"),i.enter("mathTextSequence"),h(m)}function h(m){return m===36?(i.consume(m),o++,h):o<2&&!r?s(m):(i.exit("mathTextSequence"),d(m))}function d(m){return m===null?s(m):m===36?(c=i.enter("mathTextSequence"),l=0,p(m)):m===32?(i.enter("space"),i.consume(m),i.exit("space"),d):Ge(m)?(i.enter("lineEnding"),i.consume(m),i.exit("lineEnding"),d):(i.enter("mathTextData"),f(m))}function f(m){return m===null||m===32||m===36||Ge(m)?(i.exit("mathTextData"),d(m)):(i.consume(m),f)}function p(m){return m===36?(i.consume(m),l++,p):l===o?(i.exit("mathTextSequence"),i.exit("mathText"),a(m)):(c.type="mathTextData",f(m))}}}function oU(e){let t=e.length-4,r=3,n,i;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n<t;)if(e[n][1].type==="mathTextData"){e[t][1].type="mathTextPadding",e[r][1].type="mathTextPadding",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)i===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(i=n):(n===t||e[n][1].type==="lineEnding")&&(e[i][1].type="mathTextData",n!==i+2&&(e[i][1].end=e[n-1][1].end,e.splice(i+2,n-i-2),t-=n-i-2,n=i+2),i=void 0);return e}function lU(e){return e!==36||this.events[this.events.length-1][1].type==="characterEscape"}function cU(e){return{flow:{36:nU},text:{36:sU(e)}}}const uU={};function hU(e){const t=this,r=e||uU,n=t.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),a=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),s=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(cU(r)),a.push(tU()),s.push(rU(r))}function dU(e={}){var t,r;let n=[hU,{singleDollarTextMath:(t=e.singleDollarTextMath)!=null?t:!1}],i=[eU,{errorColor:(r=e.errorColor)!=null?r:"var(--color-muted-foreground)"}];return{name:"katex",type:"math",remarkPlugin:n,rehypePlugin:i,getStyles(){return"katex/dist/katex.min.css"}}}var s0=dU(),ap={name:"mermaid",version:"11.12.2",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.1.1","@iconify/utils":"^3.0.1","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.13",dayjs:"^1.11.18",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^16.2.1",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.5","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.2",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.1.0",jison:"^0.4.18","js-base64":"^3.7.8",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.3",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.13","type-fest":"^4.35.0",typedoc:"^0.28.12","typedoc-plugin-markdown":"^4.8.1",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.6.4","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}},yu={exports:{}},fU=yu.exports,Ay;function pU(){return Ay||(Ay=1,(function(e,t){(function(r,n){e.exports=n()})(fU,(function(){var r=1e3,n=6e4,i=36e5,a="millisecond",s="second",o="minute",l="hour",c="day",u="week",h="month",d="quarter",f="year",p="date",m="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|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,v={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($){var q=["th","st","nd","rd"],W=$%100;return"["+$+(q[(W-20)%10]||q[W]||q[0])+"]"}},T=function($,q,W){var Z=String($);return!Z||Z.length>=q?$:""+Array(q+1-Z.length).join(W)+$},A={s:T,z:function($){var q=-$.utcOffset(),W=Math.abs(q),Z=Math.floor(W/60),V=W%60;return(q<=0?"+":"-")+T(Z,2,"0")+":"+T(V,2,"0")},m:function $(q,W){if(q.date()<W.date())return-$(W,q);var Z=12*(W.year()-q.year())+(W.month()-q.month()),V=q.clone().add(Z,h),ve=W-V<0,L=q.clone().add(Z+(ve?-1:1),h);return+(-(Z+(W-V)/(ve?V-L:L-V))||0)},a:function($){return $<0?Math.ceil($)||0:Math.floor($)},p:function($){return{M:h,y:f,w:u,d:c,D:p,h:l,m:o,s,ms:a,Q:d}[$]||String($||"").toLowerCase().replace(/s$/,"")},u:function($){return $===void 0}},E="en",S={};S[E]=v;var I="$isDayjsObject",D=function($){return $ instanceof G||!(!$||!$[I])},H=function $(q,W,Z){var V;if(!q)return E;if(typeof q=="string"){var ve=q.toLowerCase();S[ve]&&(V=ve),W&&(S[ve]=W,V=ve);var L=q.split("-");if(!V&&L.length>1)return $(L[0])}else{var ae=q.name;S[ae]=q,V=ae}return!Z&&V&&(E=V),V||!Z&&E},R=function($,q){if(D($))return $.clone();var W=typeof q=="object"?q:{};return W.date=$,W.args=arguments,new G(W)},F=A;F.l=H,F.i=D,F.w=function($,q){return R($,{locale:q.$L,utc:q.$u,x:q.$x,$offset:q.$offset})};var G=(function(){function $(W){this.$L=H(W.locale,null,!0),this.parse(W),this.$x=this.$x||W.x||{},this[I]=!0}var q=$.prototype;return q.parse=function(W){this.$d=(function(Z){var V=Z.date,ve=Z.utc;if(V===null)return new Date(NaN);if(F.u(V))return new Date;if(V instanceof Date)return new Date(V);if(typeof V=="string"&&!/Z$/i.test(V)){var L=V.match(b);if(L){var ae=L[2]-1||0,ne=(L[7]||"0").substring(0,3);return ve?new Date(Date.UTC(L[1],ae,L[3]||1,L[4]||0,L[5]||0,L[6]||0,ne)):new Date(L[1],ae,L[3]||1,L[4]||0,L[5]||0,L[6]||0,ne)}}return new Date(V)})(W),this.init()},q.init=function(){var W=this.$d;this.$y=W.getFullYear(),this.$M=W.getMonth(),this.$D=W.getDate(),this.$W=W.getDay(),this.$H=W.getHours(),this.$m=W.getMinutes(),this.$s=W.getSeconds(),this.$ms=W.getMilliseconds()},q.$utils=function(){return F},q.isValid=function(){return this.$d.toString()!==m},q.isSame=function(W,Z){var V=R(W);return this.startOf(Z)<=V&&V<=this.endOf(Z)},q.isAfter=function(W,Z){return R(W)<this.startOf(Z)},q.isBefore=function(W,Z){return this.endOf(Z)<R(W)},q.$g=function(W,Z,V){return F.u(W)?this[Z]:this.set(V,W)},q.unix=function(){return Math.floor(this.valueOf()/1e3)},q.valueOf=function(){return this.$d.getTime()},q.startOf=function(W,Z){var V=this,ve=!!F.u(Z)||Z,L=F.p(W),ae=function(Ue,$e){var ht=F.w(V.$u?Date.UTC(V.$y,$e,Ue):new Date(V.$y,$e,Ue),V);return ve?ht:ht.endOf(c)},ne=function(Ue,$e){return F.w(V.toDate()[Ue].apply(V.toDate("s"),(ve?[0,0,0,0]:[23,59,59,999]).slice($e)),V)},N=this.$W,ke=this.$M,ge=this.$D,Se="set"+(this.$u?"UTC":"");switch(L){case f:return ve?ae(1,0):ae(31,11);case h:return ve?ae(1,ke):ae(0,ke+1);case u:var _e=this.$locale().weekStart||0,at=(N<_e?N+7:N)-_e;return ae(ve?ge-at:ge+(6-at),ke);case c:case p:return ne(Se+"Hours",0);case l:return ne(Se+"Minutes",1);case o:return ne(Se+"Seconds",2);case s:return ne(Se+"Milliseconds",3);default:return this.clone()}},q.endOf=function(W){return this.startOf(W,!1)},q.$set=function(W,Z){var V,ve=F.p(W),L="set"+(this.$u?"UTC":""),ae=(V={},V[c]=L+"Date",V[p]=L+"Date",V[h]=L+"Month",V[f]=L+"FullYear",V[l]=L+"Hours",V[o]=L+"Minutes",V[s]=L+"Seconds",V[a]=L+"Milliseconds",V)[ve],ne=ve===c?this.$D+(Z-this.$W):Z;if(ve===h||ve===f){var N=this.clone().set(p,1);N.$d[ae](ne),N.init(),this.$d=N.set(p,Math.min(this.$D,N.daysInMonth())).$d}else ae&&this.$d[ae](ne);return this.init(),this},q.set=function(W,Z){return this.clone().$set(W,Z)},q.get=function(W){return this[F.p(W)]()},q.add=function(W,Z){var V,ve=this;W=Number(W);var L=F.p(Z),ae=function(ke){var ge=R(ve);return F.w(ge.date(ge.date()+Math.round(ke*W)),ve)};if(L===h)return this.set(h,this.$M+W);if(L===f)return this.set(f,this.$y+W);if(L===c)return ae(1);if(L===u)return ae(7);var ne=(V={},V[o]=n,V[l]=i,V[s]=r,V)[L]||1,N=this.$d.getTime()+W*ne;return F.w(N,this)},q.subtract=function(W,Z){return this.add(-1*W,Z)},q.format=function(W){var Z=this,V=this.$locale();if(!this.isValid())return V.invalidDate||m;var ve=W||"YYYY-MM-DDTHH:mm:ssZ",L=F.z(this),ae=this.$H,ne=this.$m,N=this.$M,ke=V.weekdays,ge=V.months,Se=V.meridiem,_e=function($e,ht,dt,Lt){return $e&&($e[ht]||$e(Z,ve))||dt[ht].slice(0,Lt)},at=function($e){return F.s(ae%12||12,$e,"0")},Ue=Se||function($e,ht,dt){var Lt=$e<12?"AM":"PM";return dt?Lt.toLowerCase():Lt};return ve.replace(y,(function($e,ht){return ht||(function(dt){switch(dt){case"YY":return String(Z.$y).slice(-2);case"YYYY":return F.s(Z.$y,4,"0");case"M":return N+1;case"MM":return F.s(N+1,2,"0");case"MMM":return _e(V.monthsShort,N,ge,3);case"MMMM":return _e(ge,N);case"D":return Z.$D;case"DD":return F.s(Z.$D,2,"0");case"d":return String(Z.$W);case"dd":return _e(V.weekdaysMin,Z.$W,ke,2);case"ddd":return _e(V.weekdaysShort,Z.$W,ke,3);case"dddd":return ke[Z.$W];case"H":return String(ae);case"HH":return F.s(ae,2,"0");case"h":return at(1);case"hh":return at(2);case"a":return Ue(ae,ne,!0);case"A":return Ue(ae,ne,!1);case"m":return String(ne);case"mm":return F.s(ne,2,"0");case"s":return String(Z.$s);case"ss":return F.s(Z.$s,2,"0");case"SSS":return F.s(Z.$ms,3,"0");case"Z":return L}return null})($e)||L.replace(":","")}))},q.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},q.diff=function(W,Z,V){var ve,L=this,ae=F.p(Z),ne=R(W),N=(ne.utcOffset()-this.utcOffset())*n,ke=this-ne,ge=function(){return F.m(L,ne)};switch(ae){case f:ve=ge()/12;break;case h:ve=ge();break;case d:ve=ge()/3;break;case u:ve=(ke-N)/6048e5;break;case c:ve=(ke-N)/864e5;break;case l:ve=ke/i;break;case o:ve=ke/n;break;case s:ve=ke/r;break;default:ve=ke}return V?ve:F.a(ve)},q.daysInMonth=function(){return this.endOf(h).$D},q.$locale=function(){return S[this.$L]},q.locale=function(W,Z){if(!W)return this.$L;var V=this.clone(),ve=H(W,Z,!0);return ve&&(V.$L=ve),V},q.clone=function(){return F.w(this.$d,this)},q.toDate=function(){return new Date(this.valueOf())},q.toJSON=function(){return this.isValid()?this.toISOString():null},q.toISOString=function(){return this.$d.toISOString()},q.toString=function(){return this.$d.toUTCString()},$})(),ee=G.prototype;return R.prototype=ee,[["$ms",a],["$s",s],["$m",o],["$H",l],["$W",c],["$M",h],["$y",f],["$D",p]].forEach((function($){ee[$[1]]=function(q){return this.$g(q,$[0],$[1])}})),R.extend=function($,q){return $.$i||($(q,G,R),$.$i=!0),R},R.locale=H,R.isDayjs=D,R.unix=function($){return R(1e3*$)},R.en=S[E],R.Ls=S,R.p={},R}))})(yu)),yu.exports}var mU=pU();const sk=eh(mU);var ok=Object.defineProperty,k=(e,t)=>ok(e,"name",{value:t,configurable:!0}),lk=(e,t)=>{for(var r in t)ok(e,r,{get:t[r],enumerable:!0})},Ci={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},he={trace:k((...e)=>{},"trace"),debug:k((...e)=>{},"debug"),info:k((...e)=>{},"info"),warn:k((...e)=>{},"warn"),error:k((...e)=>{},"error"),fatal:k((...e)=>{},"fatal")},_1=k(function(e="fatal"){let t=Ci.fatal;typeof e=="string"?e.toLowerCase()in Ci&&(t=Ci[e]):typeof e=="number"&&(t=e),he.trace=()=>{},he.debug=()=>{},he.info=()=>{},he.warn=()=>{},he.error=()=>{},he.fatal=()=>{},t<=Ci.fatal&&(he.fatal=console.error?console.error.bind(console,wn("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",wn("FATAL"))),t<=Ci.error&&(he.error=console.error?console.error.bind(console,wn("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",wn("ERROR"))),t<=Ci.warn&&(he.warn=console.warn?console.warn.bind(console,wn("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",wn("WARN"))),t<=Ci.info&&(he.info=console.info?console.info.bind(console,wn("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",wn("INFO"))),t<=Ci.debug&&(he.debug=console.debug?console.debug.bind(console,wn("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",wn("DEBUG"))),t<=Ci.trace&&(he.trace=console.debug?console.debug.bind(console,wn("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",wn("TRACE")))},"setLogLevel"),wn=k(e=>`%c${sk().format("ss.SSS")} : ${e} : `,"format");const xu={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=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},n)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const i=r<.5?r*(1+t):r+t-r*t,a=2*r-i;switch(n){case"r":return xu.hue2rgb(a,i,e+1/3)*255;case"g":return xu.hue2rgb(a,i,e)*255;case"b":return xu.hue2rgb(a,i,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},n)=>{e/=255,t/=255,r/=255;const i=Math.max(e,t,r),a=Math.min(e,t,r),s=(i+a)/2;if(n==="l")return s*100;if(i===a)return 0;const o=i-a,l=s>.5?o/(2-i-a):o/(i+a);if(n==="s")return l*100;switch(i){case e:return((t-r)/o+(t<r?6:0))*60;case t:return((r-e)/o+2)*60;case r:return((e-t)/o+4)*60;default:return-1}}},gU={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},bU={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},lt={channel:xu,lang:gU,unit:bU},ia={};for(let e=0;e<=255;e++)ia[e]=lt.unit.dec2hex(e);const Nr={ALL:0,RGB:1,HSL:2};class yU{constructor(){this.type=Nr.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=Nr.ALL}is(t){return this.type===t}}class xU{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new yU}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Nr.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:n,l:i}=t;r===void 0&&(t.h=lt.channel.rgb2hsl(t,"h")),n===void 0&&(t.s=lt.channel.rgb2hsl(t,"s")),i===void 0&&(t.l=lt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:n,b:i}=t;r===void 0&&(t.r=lt.channel.hsl2rgb(t,"r")),n===void 0&&(t.g=lt.channel.hsl2rgb(t,"g")),i===void 0&&(t.b=lt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Nr.HSL)&&r!==void 0?r:(this._ensureHSL(),lt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Nr.HSL)&&r!==void 0?r:(this._ensureHSL(),lt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Nr.HSL)&&r!==void 0?r:(this._ensureHSL(),lt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Nr.RGB)&&r!==void 0?r:(this._ensureRGB(),lt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Nr.RGB)&&r!==void 0?r:(this._ensureRGB(),lt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Nr.RGB)&&r!==void 0?r:(this._ensureRGB(),lt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Nr.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Nr.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Nr.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Nr.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Nr.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Nr.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const bh=new xU({r:0,g:0,b:0,a:0},"transparent"),Ps={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Ps.re);if(!t)return;const r=t[1],n=parseInt(r,16),i=r.length,a=i%4===0,s=i>4,o=s?1:17,l=s?8:4,c=a?0:-1,u=s?255:15;return bh.set({r:(n>>l*(c+3)&u)*o,g:(n>>l*(c+2)&u)*o,b:(n>>l*(c+1)&u)*o,a:a?(n&u)*o/255:1},e)},stringify:e=>{const{r:t,g:r,b:n,a:i}=e;return i<1?`#${ia[Math.round(t)]}${ia[Math.round(r)]}${ia[Math.round(n)]}${ia[Math.round(i*255)]}`:`#${ia[Math.round(t)]}${ia[Math.round(r)]}${ia[Math.round(n)]}`}},$a={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=>{const t=e.match($a.hueRe);if(t){const[,r,n]=t;switch(n){case"grad":return lt.channel.clamp.h(parseFloat(r)*.9);case"rad":return lt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return lt.channel.clamp.h(parseFloat(r)*360)}}return lt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match($a.re);if(!r)return;const[,n,i,a,s,o]=r;return bh.set({h:$a._hue2deg(n),s:lt.channel.clamp.s(parseFloat(i)),l:lt.channel.clamp.l(parseFloat(a)),a:s?lt.channel.clamp.a(o?parseFloat(s)/100:parseFloat(s)):1},e)},stringify:e=>{const{h:t,s:r,l:n,a:i}=e;return i<1?`hsla(${lt.lang.round(t)}, ${lt.lang.round(r)}%, ${lt.lang.round(n)}%, ${i})`:`hsl(${lt.lang.round(t)}, ${lt.lang.round(r)}%, ${lt.lang.round(n)}%)`}},Ml={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();const t=Ml.colors[e];if(t)return Ps.parse(t)},stringify:e=>{const t=Ps.stringify(e);for(const r in Ml.colors)if(Ml.colors[r]===t)return r}},ol={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=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(ol.re);if(!r)return;const[,n,i,a,s,o,l,c,u]=r;return bh.set({r:lt.channel.clamp.r(i?parseFloat(n)*2.55:parseFloat(n)),g:lt.channel.clamp.g(s?parseFloat(a)*2.55:parseFloat(a)),b:lt.channel.clamp.b(l?parseFloat(o)*2.55:parseFloat(o)),a:c?lt.channel.clamp.a(u?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:n,a:i}=e;return i<1?`rgba(${lt.lang.round(t)}, ${lt.lang.round(r)}, ${lt.lang.round(n)}, ${lt.lang.round(i)})`:`rgb(${lt.lang.round(t)}, ${lt.lang.round(r)}, ${lt.lang.round(n)})`}},jn={format:{keyword:Ml,hex:Ps,rgb:ol,rgba:ol,hsl:$a,hsla:$a},parse:e=>{if(typeof e!="string")return e;const t=Ps.parse(e)||ol.parse(e)||$a.parse(e)||Ml.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Nr.HSL)||e.data.r===void 0?$a.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?ol.stringify(e):Ps.stringify(e)},ck=(e,t)=>{const r=jn.parse(e);for(const n in t)r[n]=lt.channel.clamp[n](t[n]);return jn.stringify(r)},Fs=(e,t,r=0,n=1)=>{if(typeof e!="number")return ck(e,{a:t});const i=bh.set({r:lt.channel.clamp.r(e),g:lt.channel.clamp.g(t),b:lt.channel.clamp.b(r),a:lt.channel.clamp.a(n)});return jn.stringify(i)},vU=e=>{const{r:t,g:r,b:n}=jn.parse(e),i=.2126*lt.channel.toLinear(t)+.7152*lt.channel.toLinear(r)+.0722*lt.channel.toLinear(n);return lt.lang.round(i)},kU=e=>vU(e)>=.5,wo=e=>!kU(e),uk=(e,t,r)=>{const n=jn.parse(e),i=n[t],a=lt.channel.clamp[t](i+r);return i!==a&&(n[t]=a),jn.stringify(n)},Be=(e,t)=>uk(e,"l",t),Ke=(e,t)=>uk(e,"l",-t),te=(e,t)=>{const r=jn.parse(e),n={};for(const i in t)t[i]&&(n[i]=r[i]+t[i]);return ck(e,n)},wU=(e,t,r=50)=>{const{r:n,g:i,b:a,a:s}=jn.parse(e),{r:o,g:l,b:c,a:u}=jn.parse(t),h=r/100,d=h*2-1,f=s-u,m=((d*f===-1?d:(d+f)/(1+d*f))+1)/2,b=1-m,y=n*m+o*b,v=i*m+l*b,T=a*m+c*b,A=s*h+u*(1-h);return Fs(y,v,T,A)},Ae=(e,t=100)=>{const r=jn.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,wU(r,e,t)};const{entries:hk,setPrototypeOf:Ny,isFrozen:TU,getPrototypeOf:CU,getOwnPropertyDescriptor:SU}=Object;let{freeze:Yr,seal:Mn,create:sp}=Object,{apply:op,construct:lp}=typeof Reflect<"u"&&Reflect;Yr||(Yr=function(t){return t});Mn||(Mn=function(t){return t});op||(op=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a];return t.apply(r,i)});lp||(lp=function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return new t(...n)});const Jc=Vr(Array.prototype.forEach),EU=Vr(Array.prototype.lastIndexOf),Ly=Vr(Array.prototype.pop),qo=Vr(Array.prototype.push),_U=Vr(Array.prototype.splice),vu=Vr(String.prototype.toLowerCase),Yd=Vr(String.prototype.toString),Vd=Vr(String.prototype.match),jo=Vr(String.prototype.replace),AU=Vr(String.prototype.indexOf),NU=Vr(String.prototype.trim),Bn=Vr(Object.prototype.hasOwnProperty),$r=Vr(RegExp.prototype.test),Uo=LU(TypeError);function Vr(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return op(e,t,n)}}function LU(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return lp(e,r)}}function xt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:vu;Ny&&Ny(e,null);let n=t.length;for(;n--;){let i=t[n];if(typeof i=="string"){const a=r(i);a!==i&&(TU(t)||(t[n]=a),i=a)}e[i]=!0}return e}function MU(e){for(let t=0;t<e.length;t++)Bn(e,t)||(e[t]=null);return e}function Kn(e){const t=sp(null);for(const[r,n]of hk(e))Bn(e,r)&&(Array.isArray(n)?t[r]=MU(n):n&&typeof n=="object"&&n.constructor===Object?t[r]=Kn(n):t[r]=n);return t}function Wo(e,t){for(;e!==null;){const n=SU(e,t);if(n){if(n.get)return Vr(n.get);if(typeof n.value=="function")return Vr(n.value)}e=CU(e)}function r(){return null}return r}const My=Yr(["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"]),Xd=Yr(["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"]),Kd=Yr(["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"]),IU=Yr(["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"]),Qd=Yr(["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"]),RU=Yr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Iy=Yr(["#text"]),Ry=Yr(["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","slot"]),Zd=Yr(["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"]),By=Yr(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","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"]),eu=Yr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),BU=Mn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),DU=Mn(/<%[\w\W]*|[\w\W]*%>/gm),OU=Mn(/\$\{[\w\W]*/gm),PU=Mn(/^data-[\-\w.\u00B7-\uFFFF]+$/),FU=Mn(/^aria-[\-\w]+$/),dk=Mn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$U=Mn(/^(?:\w+script|data):/i),zU=Mn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),fk=Mn(/^html$/i),HU=Mn(/^[a-z][.\w]*(-[.\w]+)+$/i);var Dy=Object.freeze({__proto__:null,ARIA_ATTR:FU,ATTR_WHITESPACE:zU,CUSTOM_ELEMENT:HU,DATA_ATTR:PU,DOCTYPE_NAME:fk,ERB_EXPR:DU,IS_ALLOWED_URI:dk,IS_SCRIPT_OR_DATA:$U,MUSTACHE_EXPR:BU,TMPLIT_EXPR:OU});const Go={element:1,text:3,progressingInstruction:7,comment:8,document:9},qU=function(){return typeof window>"u"?null:window},jU=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;const i="data-tt-policy-suffix";r&&r.hasAttribute(i)&&(n=r.getAttribute(i));const a="dompurify"+(n?"#"+n:"");try{return t.createPolicy(a,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},Oy=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function pk(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:qU();const t=Ze=>pk(Ze);if(t.version="3.3.1",t.removed=[],!e||!e.document||e.document.nodeType!==Go.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const n=r,i=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:o,Element:l,NodeFilter:c,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:h,DOMParser:d,trustedTypes:f}=e,p=l.prototype,m=Wo(p,"cloneNode"),b=Wo(p,"remove"),y=Wo(p,"nextSibling"),v=Wo(p,"childNodes"),T=Wo(p,"parentNode");if(typeof s=="function"){const Ze=r.createElement("template");Ze.content&&Ze.content.ownerDocument&&(r=Ze.content.ownerDocument)}let A,E="";const{implementation:S,createNodeIterator:I,createDocumentFragment:D,getElementsByTagName:H}=r,{importNode:R}=n;let F=Oy();t.isSupported=typeof hk=="function"&&typeof T=="function"&&S&&S.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:G,ERB_EXPR:ee,TMPLIT_EXPR:$,DATA_ATTR:q,ARIA_ATTR:W,IS_SCRIPT_OR_DATA:Z,ATTR_WHITESPACE:V,CUSTOM_ELEMENT:ve}=Dy;let{IS_ALLOWED_URI:L}=Dy,ae=null;const ne=xt({},[...My,...Xd,...Kd,...Qd,...Iy]);let N=null;const ke=xt({},[...Ry,...Zd,...By,...eu]);let ge=Object.seal(sp(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}})),Se=null,_e=null;const at=Object.seal(sp(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ue=!0,$e=!0,ht=!1,dt=!0,Lt=!1,Re=!0,ue=!1,de=!1,pt=!1,Bt=!1,Jt=!1,kn=!1,Ki=!0,Qi=!1;const Mo="user-content-";let Ea=!0,yi=!1,le={},we=null;const rt=xt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let bt=null;const Et=xt({},["audio","video","img","source","image","track"]);let xr=null;const on=xt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),J="http://www.w3.org/1998/Math/MathML",Y="http://www.w3.org/2000/svg",X="http://www.w3.org/1999/xhtml";let oe=X,ce=!1,fe=null;const Ve=xt({},[J,Y,X],Yd);let Ye=xt({},["mi","mo","mn","ms","mtext"]),We=xt({},["annotation-xml"]);const Ie=xt({},["title","style","font","a","script"]);let je=null;const ut=["application/xhtml+xml","text/html"],nt="text/html";let ft=null,mr=null;const $t=r.createElement("form"),Sr=function(K){return K instanceof RegExp||K instanceof Function},Er=function(){let K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(mr&&mr===K)){if((!K||typeof K!="object")&&(K={}),K=Kn(K),je=ut.indexOf(K.PARSER_MEDIA_TYPE)===-1?nt:K.PARSER_MEDIA_TYPE,ft=je==="application/xhtml+xml"?Yd:vu,ae=Bn(K,"ALLOWED_TAGS")?xt({},K.ALLOWED_TAGS,ft):ne,N=Bn(K,"ALLOWED_ATTR")?xt({},K.ALLOWED_ATTR,ft):ke,fe=Bn(K,"ALLOWED_NAMESPACES")?xt({},K.ALLOWED_NAMESPACES,Yd):Ve,xr=Bn(K,"ADD_URI_SAFE_ATTR")?xt(Kn(on),K.ADD_URI_SAFE_ATTR,ft):on,bt=Bn(K,"ADD_DATA_URI_TAGS")?xt(Kn(Et),K.ADD_DATA_URI_TAGS,ft):Et,we=Bn(K,"FORBID_CONTENTS")?xt({},K.FORBID_CONTENTS,ft):rt,Se=Bn(K,"FORBID_TAGS")?xt({},K.FORBID_TAGS,ft):Kn({}),_e=Bn(K,"FORBID_ATTR")?xt({},K.FORBID_ATTR,ft):Kn({}),le=Bn(K,"USE_PROFILES")?K.USE_PROFILES:!1,Ue=K.ALLOW_ARIA_ATTR!==!1,$e=K.ALLOW_DATA_ATTR!==!1,ht=K.ALLOW_UNKNOWN_PROTOCOLS||!1,dt=K.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Lt=K.SAFE_FOR_TEMPLATES||!1,Re=K.SAFE_FOR_XML!==!1,ue=K.WHOLE_DOCUMENT||!1,Bt=K.RETURN_DOM||!1,Jt=K.RETURN_DOM_FRAGMENT||!1,kn=K.RETURN_TRUSTED_TYPE||!1,pt=K.FORCE_BODY||!1,Ki=K.SANITIZE_DOM!==!1,Qi=K.SANITIZE_NAMED_PROPS||!1,Ea=K.KEEP_CONTENT!==!1,yi=K.IN_PLACE||!1,L=K.ALLOWED_URI_REGEXP||dk,oe=K.NAMESPACE||X,Ye=K.MATHML_TEXT_INTEGRATION_POINTS||Ye,We=K.HTML_INTEGRATION_POINTS||We,ge=K.CUSTOM_ELEMENT_HANDLING||{},K.CUSTOM_ELEMENT_HANDLING&&Sr(K.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ge.tagNameCheck=K.CUSTOM_ELEMENT_HANDLING.tagNameCheck),K.CUSTOM_ELEMENT_HANDLING&&Sr(K.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ge.attributeNameCheck=K.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),K.CUSTOM_ELEMENT_HANDLING&&typeof K.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ge.allowCustomizedBuiltInElements=K.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Lt&&($e=!1),Jt&&(Bt=!0),le&&(ae=xt({},Iy),N=[],le.html===!0&&(xt(ae,My),xt(N,Ry)),le.svg===!0&&(xt(ae,Xd),xt(N,Zd),xt(N,eu)),le.svgFilters===!0&&(xt(ae,Kd),xt(N,Zd),xt(N,eu)),le.mathMl===!0&&(xt(ae,Qd),xt(N,By),xt(N,eu))),K.ADD_TAGS&&(typeof K.ADD_TAGS=="function"?at.tagCheck=K.ADD_TAGS:(ae===ne&&(ae=Kn(ae)),xt(ae,K.ADD_TAGS,ft))),K.ADD_ATTR&&(typeof K.ADD_ATTR=="function"?at.attributeCheck=K.ADD_ATTR:(N===ke&&(N=Kn(N)),xt(N,K.ADD_ATTR,ft))),K.ADD_URI_SAFE_ATTR&&xt(xr,K.ADD_URI_SAFE_ATTR,ft),K.FORBID_CONTENTS&&(we===rt&&(we=Kn(we)),xt(we,K.FORBID_CONTENTS,ft)),K.ADD_FORBID_CONTENTS&&(we===rt&&(we=Kn(we)),xt(we,K.ADD_FORBID_CONTENTS,ft)),Ea&&(ae["#text"]=!0),ue&&xt(ae,["html","head","body"]),ae.table&&(xt(ae,["tbody"]),delete Se.tbody),K.TRUSTED_TYPES_POLICY){if(typeof K.TRUSTED_TYPES_POLICY.createHTML!="function")throw Uo('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof K.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Uo('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');A=K.TRUSTED_TYPES_POLICY,E=A.createHTML("")}else A===void 0&&(A=jU(f,i)),A!==null&&typeof E=="string"&&(E=A.createHTML(""));Yr&&Yr(K),mr=K}},Gn=xt({},[...Xd,...Kd,...IU]),Qe=xt({},[...Qd,...RU]),vr=function(K){let Ce=T(K);(!Ce||!Ce.tagName)&&(Ce={namespaceURI:oe,tagName:"template"});const qe=vu(K.tagName),qt=vu(Ce.tagName);return fe[K.namespaceURI]?K.namespaceURI===Y?Ce.namespaceURI===X?qe==="svg":Ce.namespaceURI===J?qe==="svg"&&(qt==="annotation-xml"||Ye[qt]):!!Gn[qe]:K.namespaceURI===J?Ce.namespaceURI===X?qe==="math":Ce.namespaceURI===Y?qe==="math"&&We[qt]:!!Qe[qe]:K.namespaceURI===X?Ce.namespaceURI===Y&&!We[qt]||Ce.namespaceURI===J&&!Ye[qt]?!1:!Qe[qe]&&(Ie[qe]||!Gn[qe]):!!(je==="application/xhtml+xml"&&fe[K.namespaceURI]):!1},zt=function(K){qo(t.removed,{element:K});try{T(K).removeChild(K)}catch{b(K)}},lr=function(K,Ce){try{qo(t.removed,{attribute:Ce.getAttributeNode(K),from:Ce})}catch{qo(t.removed,{attribute:null,from:Ce})}if(Ce.removeAttribute(K),K==="is")if(Bt||Jt)try{zt(Ce)}catch{}else try{Ce.setAttribute(K,"")}catch{}},Rn=function(K){let Ce=null,qe=null;if(pt)K="<remove></remove>"+K;else{const er=Vd(K,/^[\r\n\t ]+/);qe=er&&er[0]}je==="application/xhtml+xml"&&oe===X&&(K='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+K+"</body></html>");const qt=A?A.createHTML(K):K;if(oe===X)try{Ce=new d().parseFromString(qt,je)}catch{}if(!Ce||!Ce.documentElement){Ce=S.createDocument(oe,"template",null);try{Ce.documentElement.innerHTML=ce?E:qt}catch{}}const _r=Ce.body||Ce.documentElement;return K&&qe&&_r.insertBefore(r.createTextNode(qe),_r.childNodes[0]||null),oe===X?H.call(Ce,ue?"html":"body")[0]:ue?Ce.documentElement:_r},_a=function(K){return I.call(K.ownerDocument||K,K,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},xi=function(K){return K instanceof h&&(typeof K.nodeName!="string"||typeof K.textContent!="string"||typeof K.removeChild!="function"||!(K.attributes instanceof u)||typeof K.removeAttribute!="function"||typeof K.setAttribute!="function"||typeof K.namespaceURI!="string"||typeof K.insertBefore!="function"||typeof K.hasChildNodes!="function")},Nc=function(K){return typeof o=="function"&&K instanceof o};function vi(Ze,K,Ce){Jc(Ze,qe=>{qe.call(t,K,Ce,mr)})}const Fg=function(K){let Ce=null;if(vi(F.beforeSanitizeElements,K,null),xi(K))return zt(K),!0;const qe=ft(K.nodeName);if(vi(F.uponSanitizeElement,K,{tagName:qe,allowedTags:ae}),Re&&K.hasChildNodes()&&!Nc(K.firstElementChild)&&$r(/<[/\w!]/g,K.innerHTML)&&$r(/<[/\w!]/g,K.textContent)||K.nodeType===Go.progressingInstruction||Re&&K.nodeType===Go.comment&&$r(/<[/\w]/g,K.data))return zt(K),!0;if(!(at.tagCheck instanceof Function&&at.tagCheck(qe))&&(!ae[qe]||Se[qe])){if(!Se[qe]&&zg(qe)&&(ge.tagNameCheck instanceof RegExp&&$r(ge.tagNameCheck,qe)||ge.tagNameCheck instanceof Function&&ge.tagNameCheck(qe)))return!1;if(Ea&&!we[qe]){const qt=T(K)||K.parentNode,_r=v(K)||K.childNodes;if(_r&&qt){const er=_r.length;for(let Kr=er-1;Kr>=0;--Kr){const ki=m(_r[Kr],!0);ki.__removalCount=(K.__removalCount||0)+1,qt.insertBefore(ki,y(K))}}}return zt(K),!0}return K instanceof l&&!vr(K)||(qe==="noscript"||qe==="noembed"||qe==="noframes")&&$r(/<\/no(script|embed|frames)/i,K.innerHTML)?(zt(K),!0):(Lt&&K.nodeType===Go.text&&(Ce=K.textContent,Jc([G,ee,$],qt=>{Ce=jo(Ce,qt," ")}),K.textContent!==Ce&&(qo(t.removed,{element:K.cloneNode()}),K.textContent=Ce)),vi(F.afterSanitizeElements,K,null),!1)},$g=function(K,Ce,qe){if(Ki&&(Ce==="id"||Ce==="name")&&(qe in r||qe in $t))return!1;if(!($e&&!_e[Ce]&&$r(q,Ce))){if(!(Ue&&$r(W,Ce))){if(!(at.attributeCheck instanceof Function&&at.attributeCheck(Ce,K))){if(!N[Ce]||_e[Ce]){if(!(zg(K)&&(ge.tagNameCheck instanceof RegExp&&$r(ge.tagNameCheck,K)||ge.tagNameCheck instanceof Function&&ge.tagNameCheck(K))&&(ge.attributeNameCheck instanceof RegExp&&$r(ge.attributeNameCheck,Ce)||ge.attributeNameCheck instanceof Function&&ge.attributeNameCheck(Ce,K))||Ce==="is"&&ge.allowCustomizedBuiltInElements&&(ge.tagNameCheck instanceof RegExp&&$r(ge.tagNameCheck,qe)||ge.tagNameCheck instanceof Function&&ge.tagNameCheck(qe))))return!1}else if(!xr[Ce]){if(!$r(L,jo(qe,V,""))){if(!((Ce==="src"||Ce==="xlink:href"||Ce==="href")&&K!=="script"&&AU(qe,"data:")===0&&bt[K])){if(!(ht&&!$r(Z,jo(qe,V,"")))){if(qe)return!1}}}}}}}return!0},zg=function(K){return K!=="annotation-xml"&&Vd(K,ve)},Hg=function(K){vi(F.beforeSanitizeAttributes,K,null);const{attributes:Ce}=K;if(!Ce||xi(K))return;const qe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:N,forceKeepAttr:void 0};let qt=Ce.length;for(;qt--;){const _r=Ce[qt],{name:er,namespaceURI:Kr,value:ki}=_r,bs=ft(er),Qh=ki;let kr=er==="value"?Qh:NU(Qh);if(qe.attrName=bs,qe.attrValue=kr,qe.keepAttr=!0,qe.forceKeepAttr=void 0,vi(F.uponSanitizeAttribute,K,qe),kr=qe.attrValue,Qi&&(bs==="id"||bs==="name")&&(lr(er,K),kr=Mo+kr),Re&&$r(/((--!?|])>)|<\/(style|title|textarea)/i,kr)){lr(er,K);continue}if(bs==="attributename"&&Vd(kr,"href")){lr(er,K);continue}if(qe.forceKeepAttr)continue;if(!qe.keepAttr){lr(er,K);continue}if(!dt&&$r(/\/>/i,kr)){lr(er,K);continue}Lt&&Jc([G,ee,$],jg=>{kr=jo(kr,jg," ")});const qg=ft(K.nodeName);if(!$g(qg,bs,kr)){lr(er,K);continue}if(A&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!Kr)switch(f.getAttributeType(qg,bs)){case"TrustedHTML":{kr=A.createHTML(kr);break}case"TrustedScriptURL":{kr=A.createScriptURL(kr);break}}if(kr!==Qh)try{Kr?K.setAttributeNS(Kr,er,kr):K.setAttribute(er,kr),xi(K)?zt(K):Ly(t.removed)}catch{lr(er,K)}}vi(F.afterSanitizeAttributes,K,null)},LE=function Ze(K){let Ce=null;const qe=_a(K);for(vi(F.beforeSanitizeShadowDOM,K,null);Ce=qe.nextNode();)vi(F.uponSanitizeShadowNode,Ce,null),Fg(Ce),Hg(Ce),Ce.content instanceof a&&Ze(Ce.content);vi(F.afterSanitizeShadowDOM,K,null)};return t.sanitize=function(Ze){let K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ce=null,qe=null,qt=null,_r=null;if(ce=!Ze,ce&&(Ze="<!-->"),typeof Ze!="string"&&!Nc(Ze))if(typeof Ze.toString=="function"){if(Ze=Ze.toString(),typeof Ze!="string")throw Uo("dirty is not a string, aborting")}else throw Uo("toString is not a function");if(!t.isSupported)return Ze;if(de||Er(K),t.removed=[],typeof Ze=="string"&&(yi=!1),yi){if(Ze.nodeName){const ki=ft(Ze.nodeName);if(!ae[ki]||Se[ki])throw Uo("root node is forbidden and cannot be sanitized in-place")}}else if(Ze instanceof o)Ce=Rn("<!---->"),qe=Ce.ownerDocument.importNode(Ze,!0),qe.nodeType===Go.element&&qe.nodeName==="BODY"||qe.nodeName==="HTML"?Ce=qe:Ce.appendChild(qe);else{if(!Bt&&!Lt&&!ue&&Ze.indexOf("<")===-1)return A&&kn?A.createHTML(Ze):Ze;if(Ce=Rn(Ze),!Ce)return Bt?null:kn?E:""}Ce&&pt&&zt(Ce.firstChild);const er=_a(yi?Ze:Ce);for(;qt=er.nextNode();)Fg(qt),Hg(qt),qt.content instanceof a&&LE(qt.content);if(yi)return Ze;if(Bt){if(Jt)for(_r=D.call(Ce.ownerDocument);Ce.firstChild;)_r.appendChild(Ce.firstChild);else _r=Ce;return(N.shadowroot||N.shadowrootmode)&&(_r=R.call(n,_r,!0)),_r}let Kr=ue?Ce.outerHTML:Ce.innerHTML;return ue&&ae["!doctype"]&&Ce.ownerDocument&&Ce.ownerDocument.doctype&&Ce.ownerDocument.doctype.name&&$r(fk,Ce.ownerDocument.doctype.name)&&(Kr="<!DOCTYPE "+Ce.ownerDocument.doctype.name+`>
|
|
391
|
+
`+Kr),Lt&&Jc([G,ee,$],ki=>{Kr=jo(Kr,ki," ")}),A&&kn?A.createHTML(Kr):Kr},t.setConfig=function(){let Ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Er(Ze),de=!0},t.clearConfig=function(){mr=null,de=!1},t.isValidAttribute=function(Ze,K,Ce){mr||Er({});const qe=ft(Ze),qt=ft(K);return $g(qe,qt,Ce)},t.addHook=function(Ze,K){typeof K=="function"&&qo(F[Ze],K)},t.removeHook=function(Ze,K){if(K!==void 0){const Ce=EU(F[Ze],K);return Ce===-1?void 0:_U(F[Ze],Ce,1)[0]}return Ly(F[Ze])},t.removeHooks=function(Ze){F[Ze]=[]},t.removeAllHooks=function(){F=Oy()},t}var to=pk(),mk=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Il=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,UU=/\s*%%.*\n/gm,Hs,gk=(Hs=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},k(Hs,"UnknownDiagramError"),Hs),Qa={},A1=k(function(e,t){e=e.replace(mk,"").replace(Il,"").replace(UU,`
|
|
392
|
+
`);for(const[r,{detector:n}]of Object.entries(Qa))if(n(e,t))return r;throw new gk(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),cp=k((...e)=>{for(const{id:t,detector:r,loader:n}of e)bk(t,r,n)},"registerLazyLoadedDiagrams"),bk=k((e,t,r)=>{Qa[e]&&he.warn(`Detector with key ${e} already exists. Overwriting.`),Qa[e]={detector:t,loader:r},he.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),WU=k(e=>Qa[e].loader,"getDiagramLoader"),up=k((e,t,{depth:r=2,clobber:n=!1}={})=>{const i={depth:r,clobber:n};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(a=>up(e,a,i)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(a=>{e.includes(a)||e.push(a)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(a=>{typeof t[a]=="object"&&(e[a]===void 0||typeof e[a]=="object")?(e[a]===void 0&&(e[a]=Array.isArray(t[a])?[]:{}),e[a]=up(e[a],t[a],{depth:r-1,clobber:n})):(n||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),ar=up,yh="#ffffff",xh="#f2f2f2",jr=k((e,t)=>t?te(e,{s:-40,l:10}):te(e,{s:-40,l:-10}),"mkBorder"),qs,GU=(qs=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||te(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||te(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||jr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||jr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||jr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||jr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Ae(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Ae(this.tertiaryColor),this.lineColor=this.lineColor||Ae(this.background),this.arrowheadColor=this.arrowheadColor||Ae(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?Ke(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||Ke(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Ae(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||Be(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.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||Ke(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Ke(this.mainBkg,10)):(this.rowOdd=this.rowOdd||Be(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||Be(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||te(this.primaryColor,{h:30}),this.cScale4=this.cScale4||te(this.primaryColor,{h:60}),this.cScale5=this.cScale5||te(this.primaryColor,{h:90}),this.cScale6=this.cScale6||te(this.primaryColor,{h:120}),this.cScale7=this.cScale7||te(this.primaryColor,{h:150}),this.cScale8=this.cScale8||te(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||te(this.primaryColor,{h:270}),this.cScale10=this.cScale10||te(this.primaryColor,{h:300}),this.cScale11=this.cScale11||te(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=Ke(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=Ke(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||Ae(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||Be(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||Ke(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||te(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||te(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||te(this.primaryColor,{h:64}),this.fillType3=this.fillType3||te(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||te(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||te(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||te(this.primaryColor,{h:128}),this.fillType7=this.fillType7||te(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||te(this.primaryColor,{l:-10}),this.pie5=this.pie5||te(this.secondaryColor,{l:-10}),this.pie6=this.pie6||te(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||te(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||te(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||te(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||te(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||te(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||te(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.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||te(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||te(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||te(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||te(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||te(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||te(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||wo(this.quadrant1Fill)?Be(this.quadrant1Fill):Ke(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?Ke(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||te(this.primaryColor,{h:-30}),this.git4=this.git4||te(this.primaryColor,{h:-60}),this.git5=this.git5||te(this.primaryColor,{h:-90}),this.git6=this.git6||te(this.primaryColor,{h:60}),this.git7=this.git7||te(this.primaryColor,{h:120}),this.darkMode?(this.git0=Be(this.git0,25),this.git1=Be(this.git1,25),this.git2=Be(this.git2,25),this.git3=Be(this.git3,25),this.git4=Be(this.git4,25),this.git5=Be(this.git5,25),this.git6=Be(this.git6,25),this.git7=Be(this.git7,25)):(this.git0=Ke(this.git0,25),this.git1=Ke(this.git1,25),this.git2=Ke(this.git2,25),this.git3=Ke(this.git3,25),this.git4=Ke(this.git4,25),this.git5=Ke(this.git5,25),this.git6=Ke(this.git6,25),this.git7=Ke(this.git7,25)),this.gitInv0=this.gitInv0||Ae(this.git0),this.gitInv1=this.gitInv1||Ae(this.git1),this.gitInv2=this.gitInv2||Ae(this.git2),this.gitInv3=this.gitInv3||Ae(this.git3),this.gitInv4=this.gitInv4||Ae(this.git4),this.gitInv5=this.gitInv5||Ae(this.git5),this.gitInv6=this.gitInv6||Ae(this.git6),this.gitInv7=this.gitInv7||Ae(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||yh,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||xh}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(n=>{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=t[n]})}},k(qs,"Theme"),qs),YU=k(e=>{const t=new GU;return t.calculate(e),t},"getThemeVariables"),js,VU=(js=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Be(this.primaryColor,16),this.tertiaryColor=te(this.primaryColor,{h:-160}),this.primaryBorderColor=Ae(this.background),this.secondaryBorderColor=jr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=jr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Ae(this.primaryColor),this.secondaryTextColor=Ae(this.secondaryColor),this.tertiaryTextColor=Ae(this.tertiaryColor),this.lineColor=Ae(this.background),this.textColor=Ae(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Be(Ae("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Fs(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.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.sectionBkgColor=Ke("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=Ke(this.sectionBkgColor,10),this.taskBorderColor=Fs(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Fs(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||Be(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Ke(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=Be(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=Be(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=Be(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=this.darkTextColor,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=te(this.primaryColor,{h:64}),this.fillType3=te(this.secondaryColor,{h:64}),this.fillType4=te(this.primaryColor,{h:-64}),this.fillType5=te(this.secondaryColor,{h:-64}),this.fillType6=te(this.primaryColor,{h:128}),this.fillType7=te(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||te(this.primaryColor,{h:30}),this.cScale4=this.cScale4||te(this.primaryColor,{h:60}),this.cScale5=this.cScale5||te(this.primaryColor,{h:90}),this.cScale6=this.cScale6||te(this.primaryColor,{h:120}),this.cScale7=this.cScale7||te(this.primaryColor,{h:150}),this.cScale8=this.cScale8||te(this.primaryColor,{h:210}),this.cScale9=this.cScale9||te(this.primaryColor,{h:270}),this.cScale10=this.cScale10||te(this.primaryColor,{h:300}),this.cScale11=this.cScale11||te(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||Ae(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||Be(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||te(this.mainBkg,{h:30,s:-30,l:-(-10+t*4)}),this["surfacePeer"+t]=this["surfacePeer"+t]||te(this.mainBkg,{h:30,s:-30,l:-(-7+t*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||te(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||te(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||te(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||te(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||te(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||te(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||wo(this.quadrant1Fill)?Be(this.quadrant1Fill):Ke(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||"#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?Ke(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=Be(this.secondaryColor,20),this.git1=Be(this.pie2||this.secondaryColor,20),this.git2=Be(this.pie3||this.tertiaryColor,20),this.git3=Be(this.pie4||te(this.primaryColor,{h:-30}),20),this.git4=Be(this.pie5||te(this.primaryColor,{h:-60}),20),this.git5=Be(this.pie6||te(this.primaryColor,{h:-90}),10),this.git6=Be(this.pie7||te(this.primaryColor,{h:60}),10),this.git7=Be(this.pie8||te(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||Ae(this.git0),this.gitInv1=this.gitInv1||Ae(this.git1),this.gitInv2=this.gitInv2||Ae(this.git2),this.gitInv3=this.gitInv3||Ae(this.git3),this.gitInv4=this.gitInv4||Ae(this.git4),this.gitInv5=this.gitInv5||Ae(this.git5),this.gitInv6=this.gitInv6||Ae(this.git6),this.gitInv7=this.gitInv7||Ae(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Ae(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Ae(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||Be(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Be(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(n=>{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=t[n]})}},k(js,"Theme"),js),XU=k(e=>{const t=new VU;return t.calculate(e),t},"getThemeVariables"),Us,KU=(Us=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=te(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=te(this.primaryColor,{h:-160}),this.primaryBorderColor=jr(this.primaryColor,this.darkMode),this.secondaryBorderColor=jr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=jr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Ae(this.primaryColor),this.secondaryTextColor=Ae(this.secondaryColor),this.tertiaryTextColor=Ae(this.tertiaryColor),this.lineColor=Ae(this.background),this.textColor=Ae(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",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.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.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=Fs(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.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.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||te(this.primaryColor,{h:30}),this.cScale4=this.cScale4||te(this.primaryColor,{h:60}),this.cScale5=this.cScale5||te(this.primaryColor,{h:90}),this.cScale6=this.cScale6||te(this.primaryColor,{h:120}),this.cScale7=this.cScale7||te(this.primaryColor,{h:150}),this.cScale8=this.cScale8||te(this.primaryColor,{h:210}),this.cScale9=this.cScale9||te(this.primaryColor,{h:270}),this.cScale10=this.cScale10||te(this.primaryColor,{h:300}),this.cScale11=this.cScale11||te(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Ke(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Ke(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=Ke(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||Ke(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||te(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||te(this.mainBkg,{h:30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||te(this.mainBkg,{h:30,l:-(7+t*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||Ae(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||Ae(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||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=Be(this.border1,23),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||Be(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||Be(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=te(this.primaryColor,{h:64}),this.fillType3=te(this.secondaryColor,{h:64}),this.fillType4=te(this.primaryColor,{h:-64}),this.fillType5=te(this.secondaryColor,{h:-64}),this.fillType6=te(this.primaryColor,{h:128}),this.fillType7=te(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||te(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||te(this.primaryColor,{l:-10}),this.pie5=this.pie5||te(this.secondaryColor,{l:-30}),this.pie6=this.pie6||te(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||te(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||te(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||te(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||te(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||te(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||te(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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||te(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||te(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||te(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||te(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||te(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||te(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||wo(this.quadrant1Fill)?Be(this.quadrant1Fill):Ke(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,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||te(this.primaryColor,{h:-30}),this.git4=this.git4||te(this.primaryColor,{h:-60}),this.git5=this.git5||te(this.primaryColor,{h:-90}),this.git6=this.git6||te(this.primaryColor,{h:60}),this.git7=this.git7||te(this.primaryColor,{h:120}),this.darkMode?(this.git0=Be(this.git0,25),this.git1=Be(this.git1,25),this.git2=Be(this.git2,25),this.git3=Be(this.git3,25),this.git4=Be(this.git4,25),this.git5=Be(this.git5,25),this.git6=Be(this.git6,25),this.git7=Be(this.git7,25)):(this.git0=Ke(this.git0,25),this.git1=Ke(this.git1,25),this.git2=Ke(this.git2,25),this.git3=Ke(this.git3,25),this.git4=Ke(this.git4,25),this.git5=Ke(this.git5,25),this.git6=Ke(this.git6,25),this.git7=Ke(this.git7,25)),this.gitInv0=this.gitInv0||Ke(Ae(this.git0),25),this.gitInv1=this.gitInv1||Ae(this.git1),this.gitInv2=this.gitInv2||Ae(this.git2),this.gitInv3=this.gitInv3||Ae(this.git3),this.gitInv4=this.gitInv4||Ae(this.git4),this.gitInv5=this.gitInv5||Ae(this.git5),this.gitInv6=this.gitInv6||Ae(this.git6),this.gitInv7=this.gitInv7||Ae(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Ae(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Ae(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||yh,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||xh}calculate(t){if(Object.keys(this).forEach(n=>{this[n]==="calculated"&&(this[n]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(n=>{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=t[n]})}},k(Us,"Theme"),Us),yk=k(e=>{const t=new KU;return t.calculate(e),t},"getThemeVariables"),Ws,QU=(Ws=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=Be("#cde498",10),this.primaryBorderColor=jr(this.primaryColor,this.darkMode),this.secondaryBorderColor=jr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=jr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Ae(this.primaryColor),this.secondaryTextColor=Ae(this.secondaryColor),this.tertiaryTextColor=Ae(this.primaryColor),this.lineColor=Ae(this.background),this.textColor=Ae(this.background),this.THEME_COLOR_LIMIT=12,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.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=Ke(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||te(this.primaryColor,{h:30}),this.cScale4=this.cScale4||te(this.primaryColor,{h:60}),this.cScale5=this.cScale5||te(this.primaryColor,{h:90}),this.cScale6=this.cScale6||te(this.primaryColor,{h:120}),this.cScale7=this.cScale7||te(this.primaryColor,{h:150}),this.cScale8=this.cScale8||te(this.primaryColor,{h:210}),this.cScale9=this.cScale9||te(this.primaryColor,{h:270}),this.cScale10=this.cScale10||te(this.primaryColor,{h:300}),this.cScale11=this.cScale11||te(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Ke(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Ke(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=Ke(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||Ke(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||te(this["cScale"+t],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||te(this.mainBkg,{h:30,s:-30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||te(this.mainBkg,{h:30,s:-30,l:-(8+t*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||Be(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||Be(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=te(this.primaryColor,{h:64}),this.fillType3=te(this.secondaryColor,{h:64}),this.fillType4=te(this.primaryColor,{h:-64}),this.fillType5=te(this.secondaryColor,{h:-64}),this.fillType6=te(this.primaryColor,{h:128}),this.fillType7=te(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||te(this.primaryColor,{l:-30}),this.pie5=this.pie5||te(this.secondaryColor,{l:-30}),this.pie6=this.pie6||te(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||te(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||te(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||te(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||te(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||te(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||te(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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||te(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||te(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||te(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||te(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||te(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||te(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||wo(this.quadrant1Fill)?Be(this.quadrant1Fill):Ke(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,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||te(this.primaryColor,{h:-30}),this.git4=this.git4||te(this.primaryColor,{h:-60}),this.git5=this.git5||te(this.primaryColor,{h:-90}),this.git6=this.git6||te(this.primaryColor,{h:60}),this.git7=this.git7||te(this.primaryColor,{h:120}),this.darkMode?(this.git0=Be(this.git0,25),this.git1=Be(this.git1,25),this.git2=Be(this.git2,25),this.git3=Be(this.git3,25),this.git4=Be(this.git4,25),this.git5=Be(this.git5,25),this.git6=Be(this.git6,25),this.git7=Be(this.git7,25)):(this.git0=Ke(this.git0,25),this.git1=Ke(this.git1,25),this.git2=Ke(this.git2,25),this.git3=Ke(this.git3,25),this.git4=Ke(this.git4,25),this.git5=Ke(this.git5,25),this.git6=Ke(this.git6,25),this.git7=Ke(this.git7,25)),this.gitInv0=this.gitInv0||Ae(this.git0),this.gitInv1=this.gitInv1||Ae(this.git1),this.gitInv2=this.gitInv2||Ae(this.git2),this.gitInv3=this.gitInv3||Ae(this.git3),this.gitInv4=this.gitInv4||Ae(this.git4),this.gitInv5=this.gitInv5||Ae(this.git5),this.gitInv6=this.gitInv6||Ae(this.git6),this.gitInv7=this.gitInv7||Ae(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Ae(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Ae(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||yh,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||xh}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(n=>{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=t[n]})}},k(Ws,"Theme"),Ws),ZU=k(e=>{const t=new QU;return t.calculate(e),t},"getThemeVariables"),Gs,JU=(Gs=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=Be(this.contrast,55),this.background="#ffffff",this.tertiaryColor=te(this.primaryColor,{h:-160}),this.primaryBorderColor=jr(this.primaryColor,this.darkMode),this.secondaryBorderColor=jr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=jr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Ae(this.primaryColor),this.secondaryTextColor=Ae(this.secondaryColor),this.tertiaryTextColor=Ae(this.tertiaryColor),this.lineColor=Ae(this.background),this.textColor=Ae(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.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.rowOdd=this.rowOdd||Be(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=Be(this.contrast,55),this.border2=this.contrast,this.actorBorder=Be(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 t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||Ae(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||Be(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||Ke(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||te(this.mainBkg,{l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||te(this.mainBkg,{l:-(8+t*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=Be(this.contrast,30),this.sectionBkgColor2=Be(this.contrast,30),this.taskBorderColor=Ke(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=Be(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=Ke(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=te(this.primaryColor,{h:64}),this.fillType3=te(this.secondaryColor,{h:64}),this.fillType4=te(this.primaryColor,{h:-64}),this.fillType5=te(this.secondaryColor,{h:-64}),this.fillType6=te(this.primaryColor,{h:128}),this.fillType7=te(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];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",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||te(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||te(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||te(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||te(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||te(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||te(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||wo(this.quadrant1Fill)?Be(this.quadrant1Fill):Ke(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||"#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=Ke(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||te(this.primaryColor,{h:-30}),this.git4=this.pie5||te(this.primaryColor,{h:-60}),this.git5=this.pie6||te(this.primaryColor,{h:-90}),this.git6=this.pie7||te(this.primaryColor,{h:60}),this.git7=this.pie8||te(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||Ae(this.git0),this.gitInv1=this.gitInv1||Ae(this.git1),this.gitInv2=this.gitInv2||Ae(this.git2),this.gitInv3=this.gitInv3||Ae(this.git3),this.gitInv4=this.gitInv4||Ae(this.git4),this.gitInv5=this.gitInv5||Ae(this.git5),this.gitInv6=this.gitInv6||Ae(this.git6),this.gitInv7=this.gitInv7||Ae(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||yh,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||xh}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(n=>{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=t[n]})}},k(Gs,"Theme"),Gs),eW=k(e=>{const t=new JU;return t.calculate(e),t},"getThemeVariables"),Pi={base:{getThemeVariables:YU},dark:{getThemeVariables:XU},default:{getThemeVariables:yk},forest:{getThemeVariables:ZU},neutral:{getThemeVariables:eW}},Yn={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,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,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"},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},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},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},xk={...Yn,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Pi.default.getThemeVariables(),sequence:{...Yn.sequence,messageFont:k(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:k(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:k(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...Yn.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Yn.c4,useWidth:void 0,personFont:k(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Yn.flowchart,inheritDir:!1},external_personFont:k(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:k(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:k(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:k(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:k(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:k(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:k(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:k(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:k(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:k(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:k(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:k(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:k(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:k(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:k(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:k(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:k(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:k(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:k(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:k(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:k(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Yn.pie,useWidth:984},xyChart:{...Yn.xyChart,useWidth:void 0},requirement:{...Yn.requirement,useWidth:void 0},packet:{...Yn.packet},radar:{...Yn.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},vk=k((e,t="")=>Object.keys(e).reduce((r,n)=>Array.isArray(e[n])?r:typeof e[n]=="object"&&e[n]!==null?[...r,t+n,...vk(e[n],"")]:[...r,t+n],[]),"keyify"),tW=new Set(vk(xk,"")),N1=xk,o0=k(e=>{if(he.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>o0(t));return}for(const t of Object.keys(e)){if(he.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!tW.has(t)||e[t]==null){he.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){he.debug("sanitizing object",t),o0(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const n of r)t.includes(n)&&(he.debug("sanitizing css option",t),e[t]=rW(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}he.debug("After sanitization",e)}},"sanitizeDirective"),rW=k(e=>{let t=0,r=0;for(const n of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";n==="{"?t++:n==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),ro=Object.freeze(N1),rn=ar({},ro),l0,Za=[],Rl=ar({},ro),vh=k((e,t)=>{let r=ar({},e),n={};for(const i of t)Tk(i),n=ar(n,i);if(r=ar(r,n),n.theme&&n.theme in Pi){const i=ar({},l0),a=ar(i.themeVariables||{},n.themeVariables);r.theme&&r.theme in Pi&&(r.themeVariables=Pi[r.theme].getThemeVariables(a))}return Rl=r,Ck(Rl),Rl},"updateCurrentConfig"),nW=k(e=>(rn=ar({},ro),rn=ar(rn,e),e.theme&&Pi[e.theme]&&(rn.themeVariables=Pi[e.theme].getThemeVariables(e.themeVariables)),vh(rn,Za),rn),"setSiteConfig"),iW=k(e=>{l0=ar({},e)},"saveConfigFromInitialize"),aW=k(e=>(rn=ar(rn,e),vh(rn,Za),rn),"updateSiteConfig"),kk=k(()=>ar({},rn),"getSiteConfig"),wk=k(e=>(Ck(e),ar(Rl,e),Cr()),"setConfig"),Cr=k(()=>ar({},Rl),"getConfig"),Tk=k(e=>{e&&(["secure",...rn.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(he.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"&&Tk(e[t])}))},"sanitize"),sW=k(e=>{o0(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Za.push(e),vh(rn,Za)},"addDirective"),c0=k((e=rn)=>{Za=[],vh(e,Za)},"reset"),oW={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Py={},lW=k(e=>{Py[e]||(he.warn(oW[e]),Py[e]=!0)},"issueWarning"),Ck=k(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&lW("LAZY_LOAD_DEPRECATED")},"checkConfig"),cW=k(()=>{let e={};l0&&(e=ar(e,l0));for(const t of Za)e=ar(e,t);return e},"getUserDefinedConfig"),To=/<br\s*\/?>/gi,uW=k(e=>e?_k(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),hW=(()=>{let e=!1;return()=>{e||(Sk(),e=!0)}})();function Sk(){const e="data-temp-href-target";to.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),to.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"))})}k(Sk,"setupDompurifyHooks");var Ek=k(e=>(hW(),to.sanitize(e)),"removeScript"),Fy=k((e,t)=>{if(t.flowchart?.htmlLabels!==!1){const r=t.securityLevel;r==="antiscript"||r==="strict"?e=Ek(e):r!=="loose"&&(e=_k(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=mW(e))}return e},"sanitizeMore"),yn=k((e,t)=>e&&(t.dompurifyConfig?e=to.sanitize(Fy(e,t),t.dompurifyConfig).toString():e=to.sanitize(Fy(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),dW=k((e,t)=>typeof e=="string"?yn(e,t):e.flat().map(r=>yn(r,t)),"sanitizeTextOrArray"),fW=k(e=>To.test(e),"hasBreaks"),pW=k(e=>e.split(To),"splitBreaks"),mW=k(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),_k=k(e=>e.replace(To,"#br#"),"breakToPlaceholder"),Ak=k(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),sr=k(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),gW=k(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),bW=k(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),hp=k(function(e){const t=e.split(/(,)/),r=[];for(let n=0;n<t.length;n++){let i=t[n];if(i===","&&n>0&&n+1<t.length){const a=t[n-1],s=t[n+1];yW(a,s)&&(i=a+","+s,n++,r.pop())}r.push(xW(i))}return r.join("")},"parseGenericTypes"),dp=k((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),yW=k((e,t)=>{const r=dp(e,"~"),n=dp(t,"~");return r===1&&n===1},"shouldCombineSets"),xW=k(e=>{const t=dp(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const n=[...e];let i=n.indexOf("~"),a=n.lastIndexOf("~");for(;i!==-1&&a!==-1&&i!==a;)n[i]="<",n[a]=">",i=n.indexOf("~"),a=n.lastIndexOf("~");return r&&n.unshift("~"),n.join("")},"processSet"),$y=k(()=>window.MathMLElement!==void 0,"isMathMLSupported"),fp=/\$\$(.*)\$\$/g,Ja=k(e=>(e.match(fp)?.length??0)>0,"hasKatex"),vW=k(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await kh(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);const i={width:r.clientWidth,height:r.clientHeight};return r.remove(),i},"calculateMathMLDimensions"),kW=k(async(e,t)=>{if(!Ja(e))return e;if(!($y()||t.legacyMathML||t.forceLegacyMathML))return e.replace(fp,"MathML is unsupported in this environment.");{const{default:r}=await Promise.resolve().then(()=>Qj),n=t.forceLegacyMathML||!$y()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(To).map(i=>Ja(i)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${i}</div>`:`<div>${i}</div>`).join("").replace(fp,(i,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),kh=k(async(e,t)=>yn(await kW(e,t),t),"renderKatexSanitized"),hs={getRows:uW,sanitizeText:yn,sanitizeTextOrArray:dW,hasBreaks:fW,splitBreaks:pW,lineBreakRegex:To,removeScript:Ek,getUrl:Ak,evaluate:sr,getMax:gW,getMin:bW},wW=k(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),TW=k(function(e,t,r){let n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${t}px;`)):(n.set("height",e),n.set("width",t)),n},"calculateSvgSizeAttrs"),L1=k(function(e,t,r,n){const i=TW(t,r,n);wW(e,i)},"configureSvgSize"),Nk=k(function(e,t,r,n){const i=t.node().getBBox(),a=i.width,s=i.height;he.info(`SVG bounds: ${a}x${s}`,i);let o=0,l=0;he.info(`Graph bounds: ${o}x${l}`,e),o=a+r*2,l=s+r*2,he.info(`Calculated bounds: ${o}x${l}`),L1(t,l,o,n);const c=`${i.x-r} ${i.y-r} ${i.width+2*r} ${i.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),ku={},CW=k((e,t,r)=>{let n="";return e in ku&&ku[e]?n=ku[e](r):he.warn(`No theme found for ${e}`),` & {
|
|
393
|
+
font-family: ${r.fontFamily};
|
|
394
|
+
font-size: ${r.fontSize};
|
|
395
|
+
fill: ${r.textColor}
|
|
396
|
+
}
|
|
397
|
+
@keyframes edge-animation-frame {
|
|
398
|
+
from {
|
|
399
|
+
stroke-dashoffset: 0;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
@keyframes dash {
|
|
403
|
+
to {
|
|
404
|
+
stroke-dashoffset: 0;
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
& .edge-animation-slow {
|
|
408
|
+
stroke-dasharray: 9,5 !important;
|
|
409
|
+
stroke-dashoffset: 900;
|
|
410
|
+
animation: dash 50s linear infinite;
|
|
411
|
+
stroke-linecap: round;
|
|
412
|
+
}
|
|
413
|
+
& .edge-animation-fast {
|
|
414
|
+
stroke-dasharray: 9,5 !important;
|
|
415
|
+
stroke-dashoffset: 900;
|
|
416
|
+
animation: dash 20s linear infinite;
|
|
417
|
+
stroke-linecap: round;
|
|
418
|
+
}
|
|
419
|
+
/* Classes common for multiple diagrams */
|
|
420
|
+
|
|
421
|
+
& .error-icon {
|
|
422
|
+
fill: ${r.errorBkgColor};
|
|
423
|
+
}
|
|
424
|
+
& .error-text {
|
|
425
|
+
fill: ${r.errorTextColor};
|
|
426
|
+
stroke: ${r.errorTextColor};
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
& .edge-thickness-normal {
|
|
430
|
+
stroke-width: 1px;
|
|
431
|
+
}
|
|
432
|
+
& .edge-thickness-thick {
|
|
433
|
+
stroke-width: 3.5px
|
|
434
|
+
}
|
|
435
|
+
& .edge-pattern-solid {
|
|
436
|
+
stroke-dasharray: 0;
|
|
437
|
+
}
|
|
438
|
+
& .edge-thickness-invisible {
|
|
439
|
+
stroke-width: 0;
|
|
440
|
+
fill: none;
|
|
441
|
+
}
|
|
442
|
+
& .edge-pattern-dashed{
|
|
443
|
+
stroke-dasharray: 3;
|
|
444
|
+
}
|
|
445
|
+
.edge-pattern-dotted {
|
|
446
|
+
stroke-dasharray: 2;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
& .marker {
|
|
450
|
+
fill: ${r.lineColor};
|
|
451
|
+
stroke: ${r.lineColor};
|
|
452
|
+
}
|
|
453
|
+
& .marker.cross {
|
|
454
|
+
stroke: ${r.lineColor};
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
& svg {
|
|
458
|
+
font-family: ${r.fontFamily};
|
|
459
|
+
font-size: ${r.fontSize};
|
|
460
|
+
}
|
|
461
|
+
& p {
|
|
462
|
+
margin: 0
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
${n}
|
|
466
|
+
|
|
467
|
+
${t}
|
|
468
|
+
`},"getStyles"),SW=k((e,t)=>{t!==void 0&&(ku[e]=t)},"addStylesForDiagram"),EW=CW,M1={};lk(M1,{clear:()=>Lk,getAccDescription:()=>Bk,getAccTitle:()=>Ik,getDiagramTitle:()=>Ok,setAccDescription:()=>Rk,setAccTitle:()=>Mk,setDiagramTitle:()=>Dk});var I1="",R1="",B1="",D1=k(e=>yn(e,Cr()),"sanitizeText"),Lk=k(()=>{I1="",B1="",R1=""},"clear"),Mk=k(e=>{I1=D1(e).replace(/^\s+/g,"")},"setAccTitle"),Ik=k(()=>I1,"getAccTitle"),Rk=k(e=>{B1=D1(e).replace(/\n\s+/g,`
|
|
469
|
+
`)},"setAccDescription"),Bk=k(()=>B1,"getAccDescription"),Dk=k(e=>{R1=D1(e)},"setDiagramTitle"),Ok=k(()=>R1,"getDiagramTitle"),zy=he,_W=_1,Mt=Cr,AW=wk,NW=ro,O1=k(e=>yn(e,Mt()),"sanitizeText"),Pk=Nk,LW=k(()=>M1,"getCommonDb"),u0={},h0=k((e,t,r)=>{u0[e]&&zy.warn(`Diagram with id ${e} already registered. Overwriting.`),u0[e]=t,r&&bk(e,r),SW(e,t.styles),t.injectUtils?.(zy,_W,Mt,O1,Pk,LW(),()=>{})},"registerDiagram"),pp=k(e=>{if(e in u0)return u0[e];throw new MW(e)},"getDiagram"),Ys,MW=(Ys=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},k(Ys,"DiagramNotFoundError"),Ys),IW={value:()=>{}};function Fk(){for(var e=0,t=arguments.length,r={},n;e<t;++e){if(!(n=arguments[e]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new wu(r)}function wu(e){this._=e}function RW(e,t){return e.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}wu.prototype=Fk.prototype={constructor:wu,on:function(e,t){var r=this._,n=RW(e+"",r),i,a=-1,s=n.length;if(arguments.length<2){for(;++a<s;)if((i=(e=n[a]).type)&&(i=BW(r[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<s;)if(i=(e=n[a]).type)r[i]=Hy(r[i],e.name,t);else if(t==null)for(i in r)r[i]=Hy(r[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new wu(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,a;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],n=0,i=a.length;n<i;++n)a[n].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],i=0,a=n.length;i<a;++i)n[i].value.apply(t,r)}};function BW(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function Hy(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=IW,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var mp="http://www.w3.org/1999/xhtml";const qy={svg:"http://www.w3.org/2000/svg",xhtml:mp,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function wh(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),qy.hasOwnProperty(t)?{space:qy[t],local:e}:e}function DW(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===mp&&t.documentElement.namespaceURI===mp?t.createElement(e):t.createElementNS(r,e)}}function OW(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function $k(e){var t=wh(e);return(t.local?OW:DW)(t)}function PW(){}function P1(e){return e==null?PW:function(){return this.querySelector(e)}}function FW(e){typeof e!="function"&&(e=P1(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var a=t[i],s=a.length,o=n[i]=new Array(s),l,c,u=0;u<s;++u)(l=a[u])&&(c=e.call(l,l.__data__,u,a))&&("__data__"in l&&(c.__data__=l.__data__),o[u]=c);return new xn(n,this._parents)}function $W(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function zW(){return[]}function zk(e){return e==null?zW:function(){return this.querySelectorAll(e)}}function HW(e){return function(){return $W(e.apply(this,arguments))}}function qW(e){typeof e=="function"?e=HW(e):e=zk(e);for(var t=this._groups,r=t.length,n=[],i=[],a=0;a<r;++a)for(var s=t[a],o=s.length,l,c=0;c<o;++c)(l=s[c])&&(n.push(e.call(l,l.__data__,c,s)),i.push(l));return new xn(n,i)}function Hk(e){return function(){return this.matches(e)}}function qk(e){return function(t){return t.matches(e)}}var jW=Array.prototype.find;function UW(e){return function(){return jW.call(this.children,e)}}function WW(){return this.firstElementChild}function GW(e){return this.select(e==null?WW:UW(typeof e=="function"?e:qk(e)))}var YW=Array.prototype.filter;function VW(){return Array.from(this.children)}function XW(e){return function(){return YW.call(this.children,e)}}function KW(e){return this.selectAll(e==null?VW:XW(typeof e=="function"?e:qk(e)))}function QW(e){typeof e!="function"&&(e=Hk(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var a=t[i],s=a.length,o=n[i]=[],l,c=0;c<s;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&o.push(l);return new xn(n,this._parents)}function jk(e){return new Array(e.length)}function ZW(){return new xn(this._enter||this._groups.map(jk),this._parents)}function d0(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}d0.prototype={constructor:d0,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 JW(e){return function(){return e}}function eG(e,t,r,n,i,a){for(var s=0,o,l=t.length,c=a.length;s<c;++s)(o=t[s])?(o.__data__=a[s],n[s]=o):r[s]=new d0(e,a[s]);for(;s<l;++s)(o=t[s])&&(i[s]=o)}function tG(e,t,r,n,i,a,s){var o,l,c=new Map,u=t.length,h=a.length,d=new Array(u),f;for(o=0;o<u;++o)(l=t[o])&&(d[o]=f=s.call(l,l.__data__,o,t)+"",c.has(f)?i[o]=l:c.set(f,l));for(o=0;o<h;++o)f=s.call(e,a[o],o,a)+"",(l=c.get(f))?(n[o]=l,l.__data__=a[o],c.delete(f)):r[o]=new d0(e,a[o]);for(o=0;o<u;++o)(l=t[o])&&c.get(d[o])===l&&(i[o]=l)}function rG(e){return e.__data__}function nG(e,t){if(!arguments.length)return Array.from(this,rG);var r=t?tG:eG,n=this._parents,i=this._groups;typeof e!="function"&&(e=JW(e));for(var a=i.length,s=new Array(a),o=new Array(a),l=new Array(a),c=0;c<a;++c){var u=n[c],h=i[c],d=h.length,f=iG(e.call(u,u&&u.__data__,c,n)),p=f.length,m=o[c]=new Array(p),b=s[c]=new Array(p),y=l[c]=new Array(d);r(u,h,m,b,y,f,t);for(var v=0,T=0,A,E;v<p;++v)if(A=m[v]){for(v>=T&&(T=v+1);!(E=b[T])&&++T<p;);A._next=E||null}}return s=new xn(s,n),s._enter=o,s._exit=l,s}function iG(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function aG(){return new xn(this._exit||this._groups.map(jk),this._parents)}function sG(e,t,r){var n=this.enter(),i=this,a=this.exit();return typeof e=="function"?(n=e(n),n&&(n=n.selection())):n=n.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),r==null?a.remove():r(a),n&&i?n.merge(i).order():i}function oG(e){for(var t=e.selection?e.selection():e,r=this._groups,n=t._groups,i=r.length,a=n.length,s=Math.min(i,a),o=new Array(i),l=0;l<s;++l)for(var c=r[l],u=n[l],h=c.length,d=o[l]=new Array(h),f,p=0;p<h;++p)(f=c[p]||u[p])&&(d[p]=f);for(;l<i;++l)o[l]=r[l];return new xn(o,this._parents)}function lG(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var n=e[t],i=n.length-1,a=n[i],s;--i>=0;)(s=n[i])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}function cG(e){e||(e=uG);function t(h,d){return h&&d?e(h.__data__,d.__data__):!h-!d}for(var r=this._groups,n=r.length,i=new Array(n),a=0;a<n;++a){for(var s=r[a],o=s.length,l=i[a]=new Array(o),c,u=0;u<o;++u)(c=s[u])&&(l[u]=c);l.sort(t)}return new xn(i,this._parents).order()}function uG(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function hG(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function dG(){return Array.from(this)}function fG(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,a=n.length;i<a;++i){var s=n[i];if(s)return s}return null}function pG(){let e=0;for(const t of this)++e;return e}function mG(){return!this.node()}function gG(e){for(var t=this._groups,r=0,n=t.length;r<n;++r)for(var i=t[r],a=0,s=i.length,o;a<s;++a)(o=i[a])&&e.call(o,o.__data__,a,i);return this}function bG(e){return function(){this.removeAttribute(e)}}function yG(e){return function(){this.removeAttributeNS(e.space,e.local)}}function xG(e,t){return function(){this.setAttribute(e,t)}}function vG(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function kG(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function wG(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function TG(e,t){var r=wh(e);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((t==null?r.local?yG:bG:typeof t=="function"?r.local?wG:kG:r.local?vG:xG)(r,t))}function Uk(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function CG(e){return function(){this.style.removeProperty(e)}}function SG(e,t,r){return function(){this.style.setProperty(e,t,r)}}function EG(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function _G(e,t,r){return arguments.length>1?this.each((t==null?CG:typeof t=="function"?EG:SG)(e,t,r??"")):no(this.node(),e)}function no(e,t){return e.style.getPropertyValue(t)||Uk(e).getComputedStyle(e,null).getPropertyValue(t)}function AG(e){return function(){delete this[e]}}function NG(e,t){return function(){this[e]=t}}function LG(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function MG(e,t){return arguments.length>1?this.each((t==null?AG:typeof t=="function"?LG:NG)(e,t)):this.node()[e]}function Wk(e){return e.trim().split(/^|\s+/)}function F1(e){return e.classList||new Gk(e)}function Gk(e){this._node=e,this._names=Wk(e.getAttribute("class")||"")}Gk.prototype={add:function(e){var t=this._names.indexOf(e);t<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 Yk(e,t){for(var r=F1(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function Vk(e,t){for(var r=F1(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function IG(e){return function(){Yk(this,e)}}function RG(e){return function(){Vk(this,e)}}function BG(e,t){return function(){(t.apply(this,arguments)?Yk:Vk)(this,e)}}function DG(e,t){var r=Wk(e+"");if(arguments.length<2){for(var n=F1(this.node()),i=-1,a=r.length;++i<a;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?BG:t?IG:RG)(r,t))}function OG(){this.textContent=""}function PG(e){return function(){this.textContent=e}}function FG(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function $G(e){return arguments.length?this.each(e==null?OG:(typeof e=="function"?FG:PG)(e)):this.node().textContent}function zG(){this.innerHTML=""}function HG(e){return function(){this.innerHTML=e}}function qG(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function jG(e){return arguments.length?this.each(e==null?zG:(typeof e=="function"?qG:HG)(e)):this.node().innerHTML}function UG(){this.nextSibling&&this.parentNode.appendChild(this)}function WG(){return this.each(UG)}function GG(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function YG(){return this.each(GG)}function VG(e){var t=typeof e=="function"?e:$k(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function XG(){return null}function KG(e,t){var r=typeof e=="function"?e:$k(e),n=t==null?XG:typeof t=="function"?t:P1(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function QG(){var e=this.parentNode;e&&e.removeChild(this)}function ZG(){return this.each(QG)}function JG(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function eY(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function tY(e){return this.select(e?eY:JG)}function rY(e){return arguments.length?this.property("__data__",e):this.node().__data__}function nY(e){return function(t){e.call(this,t,this.__data__)}}function iY(e){return e.trim().split(/^|\s+/).map(function(t){var r="",n=t.indexOf(".");return n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function aY(e){return function(){var t=this.__on;if(t){for(var r=0,n=-1,i=t.length,a;r<i;++r)a=t[r],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++n]=a;++n?t.length=n:delete this.__on}}}function sY(e,t,r){return function(){var n=this.__on,i,a=nY(t);if(n){for(var s=0,o=n.length;s<o;++s)if((i=n[s]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=r),i.value=t;return}}this.addEventListener(e.type,a,r),i={type:e.type,name:e.name,value:t,listener:a,options:r},n?n.push(i):this.__on=[i]}}function oY(e,t,r){var n=iY(e+""),i,a=n.length,s;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,c=o.length,u;l<c;++l)for(i=0,u=o[l];i<a;++i)if((s=n[i]).type===u.type&&s.name===u.name)return u.value}return}for(o=t?sY:aY,i=0;i<a;++i)this.each(o(n[i],t,r));return this}function Xk(e,t,r){var n=Uk(e),i=n.CustomEvent;typeof i=="function"?i=new i(t,r):(i=n.document.createEvent("Event"),r?(i.initEvent(t,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function lY(e,t){return function(){return Xk(this,e,t)}}function cY(e,t){return function(){return Xk(this,e,t.apply(this,arguments))}}function uY(e,t){return this.each((typeof t=="function"?cY:lY)(e,t))}function*hY(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,a=n.length,s;i<a;++i)(s=n[i])&&(yield s)}var Kk=[null];function xn(e,t){this._groups=e,this._parents=t}function kc(){return new xn([[document.documentElement]],Kk)}function dY(){return this}xn.prototype=kc.prototype={constructor:xn,select:FW,selectAll:qW,selectChild:GW,selectChildren:KW,filter:QW,data:nG,enter:ZW,exit:aG,join:sG,merge:oG,selection:dY,order:lG,sort:cG,call:hG,nodes:dG,node:fG,size:pG,empty:mG,each:gG,attr:TG,style:_G,property:MG,classed:DG,text:$G,html:jG,raise:WG,lower:YG,append:VG,insert:KG,remove:ZG,clone:tY,datum:rY,on:oY,dispatch:uY,[Symbol.iterator]:hY};function Ct(e){return typeof e=="string"?new xn([[document.querySelector(e)]],[document.documentElement]):new xn([[e]],Kk)}function Th(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function $1(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Co(){}var Yl=.7,f0=1/Yl,$s="\\s*([+-]?\\d+)\\s*",Vl="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",oi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",fY=/^#([0-9a-f]{3,8})$/,pY=new RegExp(`^rgb\\(${$s},${$s},${$s}\\)$`),mY=new RegExp(`^rgb\\(${oi},${oi},${oi}\\)$`),gY=new RegExp(`^rgba\\(${$s},${$s},${$s},${Vl}\\)$`),bY=new RegExp(`^rgba\\(${oi},${oi},${oi},${Vl}\\)$`),yY=new RegExp(`^hsl\\(${Vl},${oi},${oi}\\)$`),xY=new RegExp(`^hsla\\(${Vl},${oi},${oi},${Vl}\\)$`),jy={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};Th(Co,io,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Uy,formatHex:Uy,formatHex8:vY,formatHsl:kY,formatRgb:Wy,toString:Wy});function Uy(){return this.rgb().formatHex()}function vY(){return this.rgb().formatHex8()}function kY(){return Zk(this).formatHsl()}function Wy(){return this.rgb().formatRgb()}function io(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=fY.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Gy(t):r===3?new Ur(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?tu(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?tu(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=pY.exec(e))?new Ur(t[1],t[2],t[3],1):(t=mY.exec(e))?new Ur(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=gY.exec(e))?tu(t[1],t[2],t[3],t[4]):(t=bY.exec(e))?tu(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=yY.exec(e))?Xy(t[1],t[2]/100,t[3]/100,1):(t=xY.exec(e))?Xy(t[1],t[2]/100,t[3]/100,t[4]):jy.hasOwnProperty(e)?Gy(jy[e]):e==="transparent"?new Ur(NaN,NaN,NaN,0):null}function Gy(e){return new Ur(e>>16&255,e>>8&255,e&255,1)}function tu(e,t,r,n){return n<=0&&(e=t=r=NaN),new Ur(e,t,r,n)}function Qk(e){return e instanceof Co||(e=io(e)),e?(e=e.rgb(),new Ur(e.r,e.g,e.b,e.opacity)):new Ur}function gp(e,t,r,n){return arguments.length===1?Qk(e):new Ur(e,t,r,n??1)}function Ur(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Th(Ur,gp,$1(Co,{brighter(e){return e=e==null?f0:Math.pow(f0,e),new Ur(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Yl:Math.pow(Yl,e),new Ur(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ur(Wa(this.r),Wa(this.g),Wa(this.b),p0(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:Yy,formatHex:Yy,formatHex8:wY,formatRgb:Vy,toString:Vy}));function Yy(){return`#${za(this.r)}${za(this.g)}${za(this.b)}`}function wY(){return`#${za(this.r)}${za(this.g)}${za(this.b)}${za((isNaN(this.opacity)?1:this.opacity)*255)}`}function Vy(){const e=p0(this.opacity);return`${e===1?"rgb(":"rgba("}${Wa(this.r)}, ${Wa(this.g)}, ${Wa(this.b)}${e===1?")":`, ${e})`}`}function p0(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Wa(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function za(e){return e=Wa(e),(e<16?"0":"")+e.toString(16)}function Xy(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new $n(e,t,r,n)}function Zk(e){if(e instanceof $n)return new $n(e.h,e.s,e.l,e.opacity);if(e instanceof Co||(e=io(e)),!e)return new $n;if(e instanceof $n)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),s=NaN,o=a-i,l=(a+i)/2;return o?(t===a?s=(r-n)/o+(r<n)*6:r===a?s=(n-t)/o+2:s=(t-r)/o+4,o/=l<.5?a+i:2-a-i,s*=60):o=l>0&&l<1?0:s,new $n(s,o,l,e.opacity)}function TY(e,t,r,n){return arguments.length===1?Zk(e):new $n(e,t,r,n??1)}function $n(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Th($n,TY,$1(Co,{brighter(e){return e=e==null?f0:Math.pow(f0,e),new $n(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Yl:Math.pow(Yl,e),new $n(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,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Ur(Jd(e>=240?e-240:e+120,i,n),Jd(e,i,n),Jd(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new $n(Ky(this.h),ru(this.s),ru(this.l),p0(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=p0(this.opacity);return`${e===1?"hsl(":"hsla("}${Ky(this.h)}, ${ru(this.s)*100}%, ${ru(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Ky(e){return e=(e||0)%360,e<0?e+360:e}function ru(e){return Math.max(0,Math.min(1,e||0))}function Jd(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Ch=e=>()=>e;function Jk(e,t){return function(r){return e+r*t}}function CY(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function SY(e,t){var r=t-e;return r?Jk(e,r>180||r<-180?r-360*Math.round(r/360):r):Ch(isNaN(e)?t:e)}function EY(e){return(e=+e)==1?z1:function(t,r){return r-t?CY(t,r,e):Ch(isNaN(t)?r:t)}}function z1(e,t){var r=t-e;return r?Jk(e,r):Ch(isNaN(e)?t:e)}const bp=(function e(t){var r=EY(t);function n(i,a){var s=r((i=gp(i)).r,(a=gp(a)).r),o=r(i.g,a.g),l=r(i.b,a.b),c=z1(i.opacity,a.opacity);return function(u){return i.r=s(u),i.g=o(u),i.b=l(u),i.opacity=c(u),i+""}}return n.gamma=e,n})(1);function Mi(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var yp=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ef=new RegExp(yp.source,"g");function _Y(e){return function(){return e}}function AY(e){return function(t){return e(t)+""}}function ew(e,t){var r=yp.lastIndex=ef.lastIndex=0,n,i,a,s=-1,o=[],l=[];for(e=e+"",t=t+"";(n=yp.exec(e))&&(i=ef.exec(t));)(a=i.index)>r&&(a=t.slice(r,a),o[s]?o[s]+=a:o[++s]=a),(n=n[0])===(i=i[0])?o[s]?o[s]+=i:o[++s]=i:(o[++s]=null,l.push({i:s,x:Mi(n,i)})),r=ef.lastIndex;return r<t.length&&(a=t.slice(r),o[s]?o[s]+=a:o[++s]=a),o.length<2?l[0]?AY(l[0].x):_Y(t):(t=l.length,function(c){for(var u=0,h;u<t;++u)o[(h=l[u]).i]=h.x(c);return o.join("")})}var Qy=180/Math.PI,xp={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function tw(e,t,r,n,i,a){var s,o,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*r+t*n)&&(r-=e*l,n-=t*l),(o=Math.sqrt(r*r+n*n))&&(r/=o,n/=o,l/=o),e*n<t*r&&(e=-e,t=-t,l=-l,s=-s),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*Qy,skewX:Math.atan(l)*Qy,scaleX:s,scaleY:o}}var nu;function NY(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?xp:tw(t.a,t.b,t.c,t.d,t.e,t.f)}function LY(e){return e==null||(nu||(nu=document.createElementNS("http://www.w3.org/2000/svg","g")),nu.setAttribute("transform",e),!(e=nu.transform.baseVal.consolidate()))?xp:(e=e.matrix,tw(e.a,e.b,e.c,e.d,e.e,e.f))}function rw(e,t,r,n){function i(c){return c.length?c.pop()+" ":""}function a(c,u,h,d,f,p){if(c!==h||u!==d){var m=f.push("translate(",null,t,null,r);p.push({i:m-4,x:Mi(c,h)},{i:m-2,x:Mi(u,d)})}else(h||d)&&f.push("translate("+h+t+d+r)}function s(c,u,h,d){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),d.push({i:h.push(i(h)+"rotate(",null,n)-2,x:Mi(c,u)})):u&&h.push(i(h)+"rotate("+u+n)}function o(c,u,h,d){c!==u?d.push({i:h.push(i(h)+"skewX(",null,n)-2,x:Mi(c,u)}):u&&h.push(i(h)+"skewX("+u+n)}function l(c,u,h,d,f,p){if(c!==h||u!==d){var m=f.push(i(f)+"scale(",null,",",null,")");p.push({i:m-4,x:Mi(c,h)},{i:m-2,x:Mi(u,d)})}else(h!==1||d!==1)&&f.push(i(f)+"scale("+h+","+d+")")}return function(c,u){var h=[],d=[];return c=e(c),u=e(u),a(c.translateX,c.translateY,u.translateX,u.translateY,h,d),s(c.rotate,u.rotate,h,d),o(c.skewX,u.skewX,h,d),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,h,d),c=u=null,function(f){for(var p=-1,m=d.length,b;++p<m;)h[(b=d[p]).i]=b.x(f);return h.join("")}}}var MY=rw(NY,"px, ","px)","deg)"),IY=rw(LY,", ",")",")"),ao=0,ll=0,Yo=0,nw=1e3,m0,cl,g0=0,es=0,Sh=0,Xl=typeof performance=="object"&&performance.now?performance:Date,iw=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function H1(){return es||(iw(RY),es=Xl.now()+Sh)}function RY(){es=0}function b0(){this._call=this._time=this._next=null}b0.prototype=aw.prototype={constructor:b0,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?H1():+r)+(t==null?0:+t),!this._next&&cl!==this&&(cl?cl._next=this:m0=this,cl=this),this._call=e,this._time=r,vp()},stop:function(){this._call&&(this._call=null,this._time=1/0,vp())}};function aw(e,t,r){var n=new b0;return n.restart(e,t,r),n}function BY(){H1(),++ao;for(var e=m0,t;e;)(t=es-e._time)>=0&&e._call.call(void 0,t),e=e._next;--ao}function Zy(){es=(g0=Xl.now())+Sh,ao=ll=0;try{BY()}finally{ao=0,OY(),es=0}}function DY(){var e=Xl.now(),t=e-g0;t>nw&&(Sh-=t,g0=e)}function OY(){for(var e,t=m0,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:m0=r);cl=e,vp(n)}function vp(e){if(!ao){ll&&(ll=clearTimeout(ll));var t=e-es;t>24?(e<1/0&&(ll=setTimeout(Zy,e-Xl.now()-Sh)),Yo&&(Yo=clearInterval(Yo))):(Yo||(g0=Xl.now(),Yo=setInterval(DY,nw)),ao=1,iw(Zy))}}function Jy(e,t,r){var n=new b0;return t=t==null?0:+t,n.restart(i=>{n.stop(),e(i+t)},t,r),n}var PY=Fk("start","end","cancel","interrupt"),FY=[],sw=0,ex=1,kp=2,Tu=3,tx=4,wp=5,Cu=6;function Eh(e,t,r,n,i,a){var s=e.__transition;if(!s)e.__transition={};else if(r in s)return;$Y(e,r,{name:t,index:n,group:i,on:PY,tween:FY,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:sw})}function q1(e,t){var r=Wn(e,t);if(r.state>sw)throw new Error("too late; already scheduled");return r}function gi(e,t){var r=Wn(e,t);if(r.state>Tu)throw new Error("too late; already running");return r}function Wn(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function $Y(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=aw(a,0,r.time);function a(c){r.state=ex,r.timer.restart(s,r.delay,r.time),r.delay<=c&&s(c-r.delay)}function s(c){var u,h,d,f;if(r.state!==ex)return l();for(u in n)if(f=n[u],f.name===r.name){if(f.state===Tu)return Jy(s);f.state===tx?(f.state=Cu,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete n[u]):+u<t&&(f.state=Cu,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete n[u])}if(Jy(function(){r.state===Tu&&(r.state=tx,r.timer.restart(o,r.delay,r.time),o(c))}),r.state=kp,r.on.call("start",e,e.__data__,r.index,r.group),r.state===kp){for(r.state=Tu,i=new Array(d=r.tween.length),u=0,h=-1;u<d;++u)(f=r.tween[u].value.call(e,e.__data__,r.index,r.group))&&(i[++h]=f);i.length=h+1}}function o(c){for(var u=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=wp,1),h=-1,d=i.length;++h<d;)i[h].call(e,u);r.state===wp&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=Cu,r.timer.stop(),delete n[t];for(var c in n)return;delete e.__transition}}function zY(e,t){var r=e.__transition,n,i,a=!0,s;if(r){t=t==null?null:t+"";for(s in r){if((n=r[s]).name!==t){a=!1;continue}i=n.state>kp&&n.state<wp,n.state=Cu,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[s]}a&&delete e.__transition}}function HY(e){return this.each(function(){zY(this,e)})}function qY(e,t){var r,n;return function(){var i=gi(this,e),a=i.tween;if(a!==r){n=r=a;for(var s=0,o=n.length;s<o;++s)if(n[s].name===t){n=n.slice(),n.splice(s,1);break}}i.tween=n}}function jY(e,t,r){var n,i;if(typeof r!="function")throw new Error;return function(){var a=gi(this,e),s=a.tween;if(s!==n){i=(n=s).slice();for(var o={name:t,value:r},l=0,c=i.length;l<c;++l)if(i[l].name===t){i[l]=o;break}l===c&&i.push(o)}a.tween=i}}function UY(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n=Wn(this.node(),r).tween,i=0,a=n.length,s;i<a;++i)if((s=n[i]).name===e)return s.value;return null}return this.each((t==null?qY:jY)(r,e,t))}function j1(e,t,r){var n=e._id;return e.each(function(){var i=gi(this,n);(i.value||(i.value={}))[t]=r.apply(this,arguments)}),function(i){return Wn(i,n).value[t]}}function ow(e,t){var r;return(typeof t=="number"?Mi:t instanceof io?bp:(r=io(t))?(t=r,bp):ew)(e,t)}function WY(e){return function(){this.removeAttribute(e)}}function GY(e){return function(){this.removeAttributeNS(e.space,e.local)}}function YY(e,t,r){var n,i=r+"",a;return function(){var s=this.getAttribute(e);return s===i?null:s===n?a:a=t(n=s,r)}}function VY(e,t,r){var n,i=r+"",a;return function(){var s=this.getAttributeNS(e.space,e.local);return s===i?null:s===n?a:a=t(n=s,r)}}function XY(e,t,r){var n,i,a;return function(){var s,o=r(this),l;return o==null?void this.removeAttribute(e):(s=this.getAttribute(e),l=o+"",s===l?null:s===n&&l===i?a:(i=l,a=t(n=s,o)))}}function KY(e,t,r){var n,i,a;return function(){var s,o=r(this),l;return o==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),l=o+"",s===l?null:s===n&&l===i?a:(i=l,a=t(n=s,o)))}}function QY(e,t){var r=wh(e),n=r==="transform"?IY:ow;return this.attrTween(e,typeof t=="function"?(r.local?KY:XY)(r,n,j1(this,"attr."+e,t)):t==null?(r.local?GY:WY)(r):(r.local?VY:YY)(r,n,t))}function ZY(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function JY(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function eV(e,t){var r,n;function i(){var a=t.apply(this,arguments);return a!==n&&(r=(n=a)&&JY(e,a)),r}return i._value=t,i}function tV(e,t){var r,n;function i(){var a=t.apply(this,arguments);return a!==n&&(r=(n=a)&&ZY(e,a)),r}return i._value=t,i}function rV(e,t){var r="attr."+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 new Error;var n=wh(e);return this.tween(r,(n.local?eV:tV)(n,t))}function nV(e,t){return function(){q1(this,e).delay=+t.apply(this,arguments)}}function iV(e,t){return t=+t,function(){q1(this,e).delay=t}}function aV(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?nV:iV)(t,e)):Wn(this.node(),t).delay}function sV(e,t){return function(){gi(this,e).duration=+t.apply(this,arguments)}}function oV(e,t){return t=+t,function(){gi(this,e).duration=t}}function lV(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?sV:oV)(t,e)):Wn(this.node(),t).duration}function cV(e,t){if(typeof t!="function")throw new Error;return function(){gi(this,e).ease=t}}function uV(e){var t=this._id;return arguments.length?this.each(cV(t,e)):Wn(this.node(),t).ease}function hV(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;gi(this,e).ease=r}}function dV(e){if(typeof e!="function")throw new Error;return this.each(hV(this._id,e))}function fV(e){typeof e!="function"&&(e=Hk(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var a=t[i],s=a.length,o=n[i]=[],l,c=0;c<s;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&o.push(l);return new qi(n,this._parents,this._name,this._id)}function pV(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,n=t.length,i=r.length,a=Math.min(n,i),s=new Array(n),o=0;o<a;++o)for(var l=t[o],c=r[o],u=l.length,h=s[o]=new Array(u),d,f=0;f<u;++f)(d=l[f]||c[f])&&(h[f]=d);for(;o<n;++o)s[o]=t[o];return new qi(s,this._parents,this._name,this._id)}function mV(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function gV(e,t,r){var n,i,a=mV(t)?q1:gi;return function(){var s=a(this,e),o=s.on;o!==n&&(i=(n=o).copy()).on(t,r),s.on=i}}function bV(e,t){var r=this._id;return arguments.length<2?Wn(this.node(),r).on.on(e):this.each(gV(r,e,t))}function yV(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function xV(){return this.on("end.remove",yV(this._id))}function vV(e){var t=this._name,r=this._id;typeof e!="function"&&(e=P1(e));for(var n=this._groups,i=n.length,a=new Array(i),s=0;s<i;++s)for(var o=n[s],l=o.length,c=a[s]=new Array(l),u,h,d=0;d<l;++d)(u=o[d])&&(h=e.call(u,u.__data__,d,o))&&("__data__"in u&&(h.__data__=u.__data__),c[d]=h,Eh(c[d],t,r,d,c,Wn(u,r)));return new qi(a,this._parents,t,r)}function kV(e){var t=this._name,r=this._id;typeof e!="function"&&(e=zk(e));for(var n=this._groups,i=n.length,a=[],s=[],o=0;o<i;++o)for(var l=n[o],c=l.length,u,h=0;h<c;++h)if(u=l[h]){for(var d=e.call(u,u.__data__,h,l),f,p=Wn(u,r),m=0,b=d.length;m<b;++m)(f=d[m])&&Eh(f,t,r,m,d,p);a.push(d),s.push(u)}return new qi(a,s,t,r)}var wV=kc.prototype.constructor;function TV(){return new wV(this._groups,this._parents)}function CV(e,t){var r,n,i;return function(){var a=no(this,e),s=(this.style.removeProperty(e),no(this,e));return a===s?null:a===r&&s===n?i:i=t(r=a,n=s)}}function lw(e){return function(){this.style.removeProperty(e)}}function SV(e,t,r){var n,i=r+"",a;return function(){var s=no(this,e);return s===i?null:s===n?a:a=t(n=s,r)}}function EV(e,t,r){var n,i,a;return function(){var s=no(this,e),o=r(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(e),no(this,e))),s===l?null:s===n&&l===i?a:(i=l,a=t(n=s,o))}}function _V(e,t){var r,n,i,a="style."+t,s="end."+a,o;return function(){var l=gi(this,e),c=l.on,u=l.value[a]==null?o||(o=lw(t)):void 0;(c!==r||i!==u)&&(n=(r=c).copy()).on(s,i=u),l.on=n}}function AV(e,t,r){var n=(e+="")=="transform"?MY:ow;return t==null?this.styleTween(e,CV(e,n)).on("end.style."+e,lw(e)):typeof t=="function"?this.styleTween(e,EV(e,n,j1(this,"style."+e,t))).each(_V(this._id,e)):this.styleTween(e,SV(e,n,t),r).on("end.style."+e,null)}function NV(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function LV(e,t,r){var n,i;function a(){var s=t.apply(this,arguments);return s!==i&&(n=(i=s)&&NV(e,s,r)),n}return a._value=t,a}function MV(e,t,r){var n="style."+(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 new Error;return this.tween(n,LV(e,t,r??""))}function IV(e){return function(){this.textContent=e}}function RV(e){return function(){var t=e(this);this.textContent=t??""}}function BV(e){return this.tween("text",typeof e=="function"?RV(j1(this,"text",e)):IV(e==null?"":e+""))}function DV(e){return function(t){this.textContent=e.call(this,t)}}function OV(e){var t,r;function n(){var i=e.apply(this,arguments);return i!==r&&(t=(r=i)&&DV(i)),t}return n._value=e,n}function PV(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 new Error;return this.tween(t,OV(e))}function FV(){for(var e=this._name,t=this._id,r=cw(),n=this._groups,i=n.length,a=0;a<i;++a)for(var s=n[a],o=s.length,l,c=0;c<o;++c)if(l=s[c]){var u=Wn(l,t);Eh(l,e,r,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new qi(n,this._parents,e,r)}function $V(){var e,t,r=this,n=r._id,i=r.size();return new Promise(function(a,s){var o={value:s},l={value:function(){--i===0&&a()}};r.each(function(){var c=gi(this,n),u=c.on;u!==e&&(t=(e=u).copy(),t._.cancel.push(o),t._.interrupt.push(o),t._.end.push(l)),c.on=t}),i===0&&a()})}var zV=0;function qi(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function cw(){return++zV}var Si=kc.prototype;qi.prototype={constructor:qi,select:vV,selectAll:kV,selectChild:Si.selectChild,selectChildren:Si.selectChildren,filter:fV,merge:pV,selection:TV,transition:FV,call:Si.call,nodes:Si.nodes,node:Si.node,size:Si.size,empty:Si.empty,each:Si.each,on:bV,attr:QY,attrTween:rV,style:AV,styleTween:MV,text:BV,textTween:PV,remove:xV,tween:UY,delay:aV,duration:lV,ease:uV,easeVarying:dV,end:$V,[Symbol.iterator]:Si[Symbol.iterator]};function HV(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var qV={time:null,delay:0,duration:250,ease:HV};function jV(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function UV(e){var t,r;e instanceof qi?(t=e._id,e=e._name):(t=cw(),(r=qV).time=H1(),e=e==null?null:e+"");for(var n=this._groups,i=n.length,a=0;a<i;++a)for(var s=n[a],o=s.length,l,c=0;c<o;++c)(l=s[c])&&Eh(l,e,t,c,s,r||jV(l,t));return new qi(n,this._parents,e,t)}kc.prototype.interrupt=HY;kc.prototype.transition=UV;const Tp=Math.PI,Cp=2*Tp,Da=1e-6,WV=Cp-Da;function uw(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function GV(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return uw;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class YV{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?uw:GV(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,a,s){this._append`C${+t},${+r},${+n},${+i},${this._x1=+a},${this._y1=+s}`}arcTo(t,r,n,i,a){if(t=+t,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let s=this._x1,o=this._y1,l=n-t,c=i-r,u=s-t,h=o-r,d=u*u+h*h;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>Da)if(!(Math.abs(h*l-c*u)>Da)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let f=n-s,p=i-o,m=l*l+c*c,b=f*f+p*p,y=Math.sqrt(m),v=Math.sqrt(d),T=a*Math.tan((Tp-Math.acos((m+d-b)/(2*y*v)))/2),A=T/v,E=T/y;Math.abs(A-1)>Da&&this._append`L${t+A*u},${r+A*h}`,this._append`A${a},${a},0,0,${+(h*f>u*p)},${this._x1=t+E*l},${this._y1=r+E*c}`}}arc(t,r,n,i,a,s){if(t=+t,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let o=n*Math.cos(i),l=n*Math.sin(i),c=t+o,u=r+l,h=1^s,d=s?i-a:a-i;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>Da||Math.abs(this._y1-u)>Da)&&this._append`L${c},${u}`,n&&(d<0&&(d=d%Cp+Cp),d>WV?this._append`A${n},${n},0,1,${h},${t-o},${r-l}A${n},${n},0,1,${h},${this._x1=c},${this._y1=u}`:d>Da&&this._append`A${n},${n},0,${+(d>=Tp)},${h},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function Oa(e){return function(){return e}}const VV=Math.abs,XV=Math.atan2,KV=Math.cos,QV=Math.max,ZV=Math.min,JV=Math.sin,eX=Math.sqrt,Sp=1e-12,_h=Math.PI,Ep=_h/2,tX=2*_h;function rX(e){return e>1?0:e<-1?_h:Math.acos(e)}function nX(e){return e>=1?Ep:e<=-1?-Ep:Math.asin(e)}function hw(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new YV(t)}function dw(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function fw(e){this._context=e}fw.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 y0(e){return new fw(e)}function iX(e){return e[0]}function aX(e){return e[1]}function pw(e,t){var r=Oa(!0),n=null,i=y0,a=null,s=hw(o);e=typeof e=="function"?e:e===void 0?iX:Oa(e),t=typeof t=="function"?t:t===void 0?aX:Oa(t);function o(l){var c,u=(l=dw(l)).length,h,d=!1,f;for(n==null&&(a=i(f=s())),c=0;c<=u;++c)!(c<u&&r(h=l[c],c,l))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(h,c,l),+t(h,c,l));if(f)return a=null,f+""||null}return o.x=function(l){return arguments.length?(e=typeof l=="function"?l:Oa(+l),o):e},o.y=function(l){return arguments.length?(t=typeof l=="function"?l:Oa(+l),o):t},o.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Oa(!!l),o):r},o.curve=function(l){return arguments.length?(i=l,n!=null&&(a=i(n)),o):i},o.context=function(l){return arguments.length?(l==null?n=a=null:a=i(n=l),o):n},o}class mw{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function gw(e){return new mw(e,!0)}function bw(e){return new mw(e,!1)}function ga(){}function x0(e,t,r){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+r)/6)}function Ah(e){this._context=e}Ah.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:x0(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:x0(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Bl(e){return new Ah(e)}function yw(e){this._context=e}yw.prototype={areaStart:ga,areaEnd:ga,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:x0(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function sX(e){return new yw(e)}function xw(e){this._context=e}xw.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 r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:x0(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function oX(e){return new xw(e)}function vw(e,t){this._basis=new Ah(e),this._beta=t}vw.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var n=e[0],i=t[0],a=e[r]-n,s=t[r]-i,o=-1,l;++o<=r;)l=o/r,this._basis.point(this._beta*e[o]+(1-this._beta)*(n+l*a),this._beta*t[o]+(1-this._beta)*(i+l*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const lX=(function e(t){function r(n){return t===1?new Ah(n):new vw(n,t)}return r.beta=function(n){return e(+n)},r})(.85);function v0(e,t,r){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-r),e._x2,e._y2)}function U1(e,t){this._context=e,this._k=(1-t)/6}U1.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:v0(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:v0(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}};const kw=(function e(t){function r(n){return new U1(n,t)}return r.tension=function(n){return e(+n)},r})(0);function W1(e,t){this._context=e,this._k=(1-t)/6}W1.prototype={areaStart:ga,areaEnd:ga,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:v0(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}};const cX=(function e(t){function r(n){return new W1(n,t)}return r.tension=function(n){return e(+n)},r})(0);function G1(e,t){this._context=e,this._k=(1-t)/6}G1.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:v0(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}};const uX=(function e(t){function r(n){return new G1(n,t)}return r.tension=function(n){return e(+n)},r})(0);function Y1(e,t,r){var n=e._x1,i=e._y1,a=e._x2,s=e._y2;if(e._l01_a>Sp){var o=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);n=(n*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Sp){var c=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*c+e._x1*e._l23_2a-t*e._l12_2a)/u,s=(s*c+e._y1*e._l23_2a-r*e._l12_2a)/u}e._context.bezierCurveTo(n,i,a,s,e._x2,e._y2)}function ww(e,t){this._context=e,this._alpha=t}ww.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._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 r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:Y1(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}};const Tw=(function e(t){function r(n){return t?new ww(n,t):new U1(n,0)}return r.alpha=function(n){return e(+n)},r})(.5);function Cw(e,t){this._context=e,this._alpha=t}Cw.prototype={areaStart:ga,areaEnd:ga,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 r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:Y1(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}};const hX=(function e(t){function r(n){return t?new Cw(n,t):new W1(n,0)}return r.alpha=function(n){return e(+n)},r})(.5);function Sw(e,t){this._context=e,this._alpha=t}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._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 r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:Y1(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}};const dX=(function e(t){function r(n){return t?new Sw(n,t):new G1(n,0)}return r.alpha=function(n){return e(+n)},r})(.5);function Ew(e){this._context=e}Ew.prototype={areaStart:ga,areaEnd:ga,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 fX(e){return new Ew(e)}function rx(e){return e<0?-1:1}function nx(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),s=(r-e._y1)/(i||n<0&&-0),o=(a*i+s*n)/(n+i);return(rx(a)+rx(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(o))||0}function ix(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function tf(e,t,r){var n=e._x0,i=e._y0,a=e._x1,s=e._y1,o=(a-n)/3;e._context.bezierCurveTo(n+o,i+o*t,a-o,s-o*r,a,s)}function k0(e){this._context=e}k0.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:tf(this,this._t0,ix(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 r=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,tf(this,ix(this,r=nx(this,e,t)),r);break;default:tf(this,this._t0,r=nx(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function _w(e){this._context=new Aw(e)}(_w.prototype=Object.create(k0.prototype)).point=function(e,t){k0.prototype.point.call(this,t,e)};function Aw(e){this._context=e}Aw.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,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function Nw(e){return new k0(e)}function Lw(e){return new _w(e)}function Mw(e){this._context=e}Mw.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,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=ax(e),i=ax(t),a=0,s=1;s<r;++a,++s)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],e[s],t[s]);(this._line||this._line!==0&&r===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 ax(e){var t,r=e.length-1,n,i=new Array(r),a=new Array(r),s=new Array(r);for(i[0]=0,a[0]=2,s[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,a[t]=4,s[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,a[r-1]=7,s[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/a[t-1],a[t]-=n,s[t]-=n*s[t-1];for(i[r-1]=s[r-1]/a[r-1],t=r-2;t>=0;--t)i[t]=(s[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Iw(e){return new Mw(e)}function Nh(e,t){this._context=e,this._t=t}Nh.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 r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function Rw(e){return new Nh(e,.5)}function Bw(e){return new Nh(e,0)}function Dw(e){return new Nh(e,1)}function ul(e,t,r){this.k=e,this.x=t,this.y=r}ul.prototype={constructor:ul,scale:function(e){return e===1?this:new ul(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new ul(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+")"}};ul.prototype;var Ow=k(e=>{const{securityLevel:t}=Mt();let r=Ct("body");if(t==="sandbox"){const a=Ct(`#i${e}`).node()?.contentDocument??document;r=Ct(a.body)}return r.select(`#${e}`)},"selectSvgElement");function V1(e){return typeof e>"u"||e===null}k(V1,"isNothing");function Pw(e){return typeof e=="object"&&e!==null}k(Pw,"isObject");function Fw(e){return Array.isArray(e)?e:V1(e)?[]:[e]}k(Fw,"toArray");function $w(e,t){var r,n,i,a;if(t)for(a=Object.keys(t),r=0,n=a.length;r<n;r+=1)i=a[r],e[i]=t[i];return e}k($w,"extend");function zw(e,t){var r="",n;for(n=0;n<t;n+=1)r+=e;return r}k(zw,"repeat");function Hw(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}k(Hw,"isNegativeZero");var pX=V1,mX=Pw,gX=Fw,bX=zw,yX=Hw,xX=$w,dr={isNothing:pX,isObject:mX,toArray:gX,repeat:bX,isNegativeZero:yX,extend:xX};function X1(e,t){var r="",n=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
|
|
470
|
+
|
|
471
|
+
`+e.mark.snippet),n+" "+r):n}k(X1,"formatError");function so(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=X1(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}k(so,"YAMLException$1");so.prototype=Object.create(Error.prototype);so.prototype.constructor=so;so.prototype.toString=k(function(t){return this.name+": "+X1(this,t)},"toString");var nn=so;function Su(e,t,r,n,i){var a="",s="",o=Math.floor(i/2)-1;return n-t>o&&(a=" ... ",t=n-o+a.length),r-n>o&&(s=" ...",r=n+o-s.length),{str:a+e.slice(t,r).replace(/\t/g,"→")+s,pos:n-t+a.length}}k(Su,"getLine");function Eu(e,t){return dr.repeat(" ",t-e.length)+e}k(Eu,"padStart");function qw(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(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 r=/\r?\n|\r|\0/g,n=[0],i=[],a,s=-1;a=r.exec(e.buffer);)i.push(a.index),n.push(a.index+a[0].length),e.position<=a.index&&s<0&&(s=n.length-2);s<0&&(s=n.length-1);var o="",l,c,u=Math.min(e.line+t.linesAfter,i.length).toString().length,h=t.maxLength-(t.indent+u+3);for(l=1;l<=t.linesBefore&&!(s-l<0);l++)c=Su(e.buffer,n[s-l],i[s-l],e.position-(n[s]-n[s-l]),h),o=dr.repeat(" ",t.indent)+Eu((e.line-l+1).toString(),u)+" | "+c.str+`
|
|
472
|
+
`+o;for(c=Su(e.buffer,n[s],i[s],e.position,h),o+=dr.repeat(" ",t.indent)+Eu((e.line+1).toString(),u)+" | "+c.str+`
|
|
473
|
+
`,o+=dr.repeat("-",t.indent+u+3+c.pos)+`^
|
|
474
|
+
`,l=1;l<=t.linesAfter&&!(s+l>=i.length);l++)c=Su(e.buffer,n[s+l],i[s+l],e.position-(n[s]-n[s+l]),h),o+=dr.repeat(" ",t.indent)+Eu((e.line+l+1).toString(),u)+" | "+c.str+`
|
|
475
|
+
`;return o.replace(/\n$/,"")}k(qw,"makeSnippet");var vX=qw,kX=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],wX=["scalar","sequence","mapping"];function jw(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(n){t[String(n)]=r})}),t}k(jw,"compileStyleAliases");function Uw(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(kX.indexOf(r)===-1)throw new nn('Unknown option "'+r+'" 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(r){return r},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=jw(t.styleAliases||null),wX.indexOf(this.kind)===-1)throw new nn('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}k(Uw,"Type$1");var Rr=Uw;function _p(e,t){var r=[];return e[t].forEach(function(n){var i=r.length;r.forEach(function(a,s){a.tag===n.tag&&a.kind===n.kind&&a.multi===n.multi&&(i=s)}),r[i]=n}),r}k(_p,"compileList");function Ww(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function n(i){i.multi?(e.multi[i.kind].push(i),e.multi.fallback.push(i)):e[i.kind][i.tag]=e.fallback[i.tag]=i}for(k(n,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(n);return e}k(Ww,"compileMap");function w0(e){return this.extend(e)}k(w0,"Schema$1");w0.prototype.extend=k(function(t){var r=[],n=[];if(t instanceof Rr)n.push(t);else if(Array.isArray(t))n=n.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit));else throw new nn("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof Rr))throw new nn("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new nn("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new nn("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(a){if(!(a instanceof Rr))throw new nn("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(w0.prototype);return i.implicit=(this.implicit||[]).concat(r),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=_p(i,"implicit"),i.compiledExplicit=_p(i,"explicit"),i.compiledTypeMap=Ww(i.compiledImplicit,i.compiledExplicit),i},"extend");var TX=w0,CX=new Rr("tag:yaml.org,2002:str",{kind:"scalar",construct:k(function(e){return e!==null?e:""},"construct")}),SX=new Rr("tag:yaml.org,2002:seq",{kind:"sequence",construct:k(function(e){return e!==null?e:[]},"construct")}),EX=new Rr("tag:yaml.org,2002:map",{kind:"mapping",construct:k(function(e){return e!==null?e:{}},"construct")}),_X=new TX({explicit:[CX,SX,EX]});function Gw(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}k(Gw,"resolveYamlNull");function Yw(){return null}k(Yw,"constructYamlNull");function Vw(e){return e===null}k(Vw,"isNull");var AX=new Rr("tag:yaml.org,2002:null",{kind:"scalar",resolve:Gw,construct:Yw,predicate:Vw,represent:{canonical:k(function(){return"~"},"canonical"),lowercase:k(function(){return"null"},"lowercase"),uppercase:k(function(){return"NULL"},"uppercase"),camelcase:k(function(){return"Null"},"camelcase"),empty:k(function(){return""},"empty")},defaultStyle:"lowercase"});function Xw(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")}k(Xw,"resolveYamlBoolean");function Kw(e){return e==="true"||e==="True"||e==="TRUE"}k(Kw,"constructYamlBoolean");function Qw(e){return Object.prototype.toString.call(e)==="[object Boolean]"}k(Qw,"isBoolean");var NX=new Rr("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Xw,construct:Kw,predicate:Qw,represent:{lowercase:k(function(e){return e?"true":"false"},"lowercase"),uppercase:k(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:k(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function Zw(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}k(Zw,"isHexCode");function Jw(e){return 48<=e&&e<=55}k(Jw,"isOctCode");function eT(e){return 48<=e&&e<=57}k(eT,"isDecCode");function tT(e){if(e===null)return!1;var t=e.length,r=0,n=!1,i;if(!t)return!1;if(i=e[r],(i==="-"||i==="+")&&(i=e[++r]),i==="0"){if(r+1===t)return!0;if(i=e[++r],i==="b"){for(r++;r<t;r++)if(i=e[r],i!=="_"){if(i!=="0"&&i!=="1")return!1;n=!0}return n&&i!=="_"}if(i==="x"){for(r++;r<t;r++)if(i=e[r],i!=="_"){if(!Zw(e.charCodeAt(r)))return!1;n=!0}return n&&i!=="_"}if(i==="o"){for(r++;r<t;r++)if(i=e[r],i!=="_"){if(!Jw(e.charCodeAt(r)))return!1;n=!0}return n&&i!=="_"}}if(i==="_")return!1;for(;r<t;r++)if(i=e[r],i!=="_"){if(!eT(e.charCodeAt(r)))return!1;n=!0}return!(!n||i==="_")}k(tT,"resolveYamlInteger");function rT(e){var t=e,r=1,n;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),n=t[0],(n==="-"||n==="+")&&(n==="-"&&(r=-1),t=t.slice(1),n=t[0]),t==="0")return 0;if(n==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}k(rT,"constructYamlInteger");function nT(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!dr.isNegativeZero(e)}k(nT,"isInteger");var LX=new Rr("tag:yaml.org,2002:int",{kind:"scalar",resolve:tT,construct:rT,predicate:nT,represent:{binary:k(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:k(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:k(function(e){return e.toString(10)},"decimal"),hexadecimal:k(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"]}}),MX=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function iT(e){return!(e===null||!MX.test(e)||e[e.length-1]==="_")}k(iT,"resolveYamlFloat");function aT(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}k(aT,"constructYamlFloat");var IX=/^[-+]?[0-9]+e/;function sT(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(dr.isNegativeZero(e))return"-0.0";return r=e.toString(10),IX.test(r)?r.replace("e",".e"):r}k(sT,"representYamlFloat");function oT(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||dr.isNegativeZero(e))}k(oT,"isFloat");var RX=new Rr("tag:yaml.org,2002:float",{kind:"scalar",resolve:iT,construct:aT,predicate:oT,represent:sT,defaultStyle:"lowercase"}),lT=_X.extend({implicit:[AX,NX,LX,RX]}),BX=lT,cT=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),uT=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function hT(e){return e===null?!1:cT.exec(e)!==null||uT.exec(e)!==null}k(hT,"resolveYamlTimestamp");function dT(e){var t,r,n,i,a,s,o,l=0,c=null,u,h,d;if(t=cT.exec(e),t===null&&(t=uT.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],n=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(r,n,i));if(a=+t[4],s=+t[5],o=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(u=+t[10],h=+(t[11]||0),c=(u*60+h)*6e4,t[9]==="-"&&(c=-c)),d=new Date(Date.UTC(r,n,i,a,s,o,l)),c&&d.setTime(d.getTime()-c),d}k(dT,"constructYamlTimestamp");function fT(e){return e.toISOString()}k(fT,"representYamlTimestamp");var DX=new Rr("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:hT,construct:dT,instanceOf:Date,represent:fT});function pT(e){return e==="<<"||e===null}k(pT,"resolveYamlMerge");var OX=new Rr("tag:yaml.org,2002:merge",{kind:"scalar",resolve:pT}),K1=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
476
|
+
\r`;function mT(e){if(e===null)return!1;var t,r,n=0,i=e.length,a=K1;for(r=0;r<i;r++)if(t=a.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;n+=6}return n%8===0}k(mT,"resolveYamlBinary");function gT(e){var t,r,n=e.replace(/[\r\n=]/g,""),i=n.length,a=K1,s=0,o=[];for(t=0;t<i;t++)t%4===0&&t&&(o.push(s>>16&255),o.push(s>>8&255),o.push(s&255)),s=s<<6|a.indexOf(n.charAt(t));return r=i%4*6,r===0?(o.push(s>>16&255),o.push(s>>8&255),o.push(s&255)):r===18?(o.push(s>>10&255),o.push(s>>2&255)):r===12&&o.push(s>>4&255),new Uint8Array(o)}k(gT,"constructYamlBinary");function bT(e){var t="",r=0,n,i,a=e.length,s=K1;for(n=0;n<a;n++)n%3===0&&n&&(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]),r=(r<<8)+e[n];return i=a%3,i===0?(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]):i===2?(t+=s[r>>10&63],t+=s[r>>4&63],t+=s[r<<2&63],t+=s[64]):i===1&&(t+=s[r>>2&63],t+=s[r<<4&63],t+=s[64],t+=s[64]),t}k(bT,"representYamlBinary");function yT(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}k(yT,"isBinary");var PX=new Rr("tag:yaml.org,2002:binary",{kind:"scalar",resolve:mT,construct:gT,predicate:yT,represent:bT}),FX=Object.prototype.hasOwnProperty,$X=Object.prototype.toString;function xT(e){if(e===null)return!0;var t=[],r,n,i,a,s,o=e;for(r=0,n=o.length;r<n;r+=1){if(i=o[r],s=!1,$X.call(i)!=="[object Object]")return!1;for(a in i)if(FX.call(i,a))if(!s)s=!0;else return!1;if(!s)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}k(xT,"resolveYamlOmap");function vT(e){return e!==null?e:[]}k(vT,"constructYamlOmap");var zX=new Rr("tag:yaml.org,2002:omap",{kind:"sequence",resolve:xT,construct:vT}),HX=Object.prototype.toString;function kT(e){if(e===null)return!0;var t,r,n,i,a,s=e;for(a=new Array(s.length),t=0,r=s.length;t<r;t+=1){if(n=s[t],HX.call(n)!=="[object Object]"||(i=Object.keys(n),i.length!==1))return!1;a[t]=[i[0],n[i[0]]]}return!0}k(kT,"resolveYamlPairs");function wT(e){if(e===null)return[];var t,r,n,i,a,s=e;for(a=new Array(s.length),t=0,r=s.length;t<r;t+=1)n=s[t],i=Object.keys(n),a[t]=[i[0],n[i[0]]];return a}k(wT,"constructYamlPairs");var qX=new Rr("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:kT,construct:wT}),jX=Object.prototype.hasOwnProperty;function TT(e){if(e===null)return!0;var t,r=e;for(t in r)if(jX.call(r,t)&&r[t]!==null)return!1;return!0}k(TT,"resolveYamlSet");function CT(e){return e!==null?e:{}}k(CT,"constructYamlSet");var UX=new Rr("tag:yaml.org,2002:set",{kind:"mapping",resolve:TT,construct:CT}),ST=BX.extend({implicit:[DX,OX],explicit:[PX,zX,qX,UX]}),ba=Object.prototype.hasOwnProperty,T0=1,ET=2,_T=3,C0=4,rf=1,WX=2,sx=3,GX=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,YX=/[\x85\u2028\u2029]/,VX=/[,\[\]\{\}]/,AT=/^(?:!|!!|![a-z\-]+!)$/i,NT=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Ap(e){return Object.prototype.toString.call(e)}k(Ap,"_class");function Hn(e){return e===10||e===13}k(Hn,"is_EOL");function ha(e){return e===9||e===32}k(ha,"is_WHITE_SPACE");function Wr(e){return e===9||e===32||e===10||e===13}k(Wr,"is_WS_OR_EOL");function Ha(e){return e===44||e===91||e===93||e===123||e===125}k(Ha,"is_FLOW_INDICATOR");function LT(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}k(LT,"fromHexCode");function MT(e){return e===120?2:e===117?4:e===85?8:0}k(MT,"escapedHexLen");function IT(e){return 48<=e&&e<=57?e-48:-1}k(IT,"fromDecimalCode");function Np(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
477
|
+
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"
":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}k(Np,"simpleEscapeSequence");function RT(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}k(RT,"charFromCodepoint");var BT=new Array(256),DT=new Array(256);for(Ra=0;Ra<256;Ra++)BT[Ra]=Np(Ra)?1:0,DT[Ra]=Np(Ra);var Ra;function OT(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||ST,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=[]}k(OT,"State$1");function Q1(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=vX(r),new nn(t,r)}k(Q1,"generateError");function Xe(e,t){throw Q1(e,t)}k(Xe,"throwError");function Kl(e,t){e.onWarning&&e.onWarning.call(null,Q1(e,t))}k(Kl,"throwWarning");var ox={YAML:k(function(t,r,n){var i,a,s;t.version!==null&&Xe(t,"duplication of %YAML directive"),n.length!==1&&Xe(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),i===null&&Xe(t,"ill-formed argument of the YAML directive"),a=parseInt(i[1],10),s=parseInt(i[2],10),a!==1&&Xe(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&Kl(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:k(function(t,r,n){var i,a;n.length!==2&&Xe(t,"TAG directive accepts exactly two arguments"),i=n[0],a=n[1],AT.test(i)||Xe(t,"ill-formed tag handle (first argument) of the TAG directive"),ba.call(t.tagMap,i)&&Xe(t,'there is a previously declared suffix for "'+i+'" tag handle'),NT.test(a)||Xe(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{Xe(t,"tag prefix is malformed: "+a)}t.tagMap[i]=a},"handleTagDirective")};function Fi(e,t,r,n){var i,a,s,o;if(t<r){if(o=e.input.slice(t,r),n)for(i=0,a=o.length;i<a;i+=1)s=o.charCodeAt(i),s===9||32<=s&&s<=1114111||Xe(e,"expected valid JSON character");else GX.test(o)&&Xe(e,"the stream contains non-printable characters");e.result+=o}}k(Fi,"captureSegment");function Lp(e,t,r,n){var i,a,s,o;for(dr.isObject(r)||Xe(e,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(r),s=0,o=i.length;s<o;s+=1)a=i[s],ba.call(t,a)||(t[a]=r[a],n[a]=!0)}k(Lp,"mergeMappings");function qa(e,t,r,n,i,a,s,o,l){var c,u;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),c=0,u=i.length;c<u;c+=1)Array.isArray(i[c])&&Xe(e,"nested arrays are not supported inside keys"),typeof i=="object"&&Ap(i[c])==="[object Object]"&&(i[c]="[object Object]");if(typeof i=="object"&&Ap(i)==="[object Object]"&&(i="[object Object]"),i=String(i),t===null&&(t={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(c=0,u=a.length;c<u;c+=1)Lp(e,t,a[c],r);else Lp(e,t,a,r);else!e.json&&!ba.call(r,i)&&ba.call(t,i)&&(e.line=s||e.line,e.lineStart=o||e.lineStart,e.position=l||e.position,Xe(e,"duplicated mapping key")),i==="__proto__"?Object.defineProperty(t,i,{configurable:!0,enumerable:!0,writable:!0,value:a}):t[i]=a,delete r[i];return t}k(qa,"storeMappingPair");function Lh(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):Xe(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}k(Lh,"readLineBreak");function Qt(e,t,r){for(var n=0,i=e.input.charCodeAt(e.position);i!==0;){for(;ha(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(Hn(i))for(Lh(e),i=e.input.charCodeAt(e.position),n++,e.lineIndent=0;i===32;)e.lineIndent++,i=e.input.charCodeAt(++e.position);else break}return r!==-1&&n!==0&&e.lineIndent<r&&Kl(e,"deficient indentation"),n}k(Qt,"skipSeparationSpace");function wc(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||Wr(r)))}k(wc,"testDocumentSeparator");function Mh(e,t){t===1?e.result+=" ":t>1&&(e.result+=dr.repeat(`
|
|
478
|
+
`,t-1))}k(Mh,"writeFoldedLines");function PT(e,t,r){var n,i,a,s,o,l,c,u,h=e.kind,d=e.result,f;if(f=e.input.charCodeAt(e.position),Wr(f)||Ha(f)||f===35||f===38||f===42||f===33||f===124||f===62||f===39||f===34||f===37||f===64||f===96||(f===63||f===45)&&(i=e.input.charCodeAt(e.position+1),Wr(i)||r&&Ha(i)))return!1;for(e.kind="scalar",e.result="",a=s=e.position,o=!1;f!==0;){if(f===58){if(i=e.input.charCodeAt(e.position+1),Wr(i)||r&&Ha(i))break}else if(f===35){if(n=e.input.charCodeAt(e.position-1),Wr(n))break}else{if(e.position===e.lineStart&&wc(e)||r&&Ha(f))break;if(Hn(f))if(l=e.line,c=e.lineStart,u=e.lineIndent,Qt(e,!1,-1),e.lineIndent>=t){o=!0,f=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=l,e.lineStart=c,e.lineIndent=u;break}}o&&(Fi(e,a,s,!1),Mh(e,e.line-l),a=s=e.position,o=!1),ha(f)||(s=e.position+1),f=e.input.charCodeAt(++e.position)}return Fi(e,a,s,!1),e.result?!0:(e.kind=h,e.result=d,!1)}k(PT,"readPlainScalar");function FT(e,t){var r,n,i;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Fi(e,n,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)n=e.position,e.position++,i=e.position;else return!0;else Hn(r)?(Fi(e,n,i,!0),Mh(e,Qt(e,!1,t)),n=i=e.position):e.position===e.lineStart&&wc(e)?Xe(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);Xe(e,"unexpected end of the stream within a single quoted scalar")}k(FT,"readSingleQuotedScalar");function $T(e,t){var r,n,i,a,s,o;if(o=e.input.charCodeAt(e.position),o!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;(o=e.input.charCodeAt(e.position))!==0;){if(o===34)return Fi(e,r,e.position,!0),e.position++,!0;if(o===92){if(Fi(e,r,e.position,!0),o=e.input.charCodeAt(++e.position),Hn(o))Qt(e,!1,t);else if(o<256&&BT[o])e.result+=DT[o],e.position++;else if((s=MT(o))>0){for(i=s,a=0;i>0;i--)o=e.input.charCodeAt(++e.position),(s=LT(o))>=0?a=(a<<4)+s:Xe(e,"expected hexadecimal character");e.result+=RT(a),e.position++}else Xe(e,"unknown escape sequence");r=n=e.position}else Hn(o)?(Fi(e,r,n,!0),Mh(e,Qt(e,!1,t)),r=n=e.position):e.position===e.lineStart&&wc(e)?Xe(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}Xe(e,"unexpected end of the stream within a double quoted scalar")}k($T,"readDoubleQuotedScalar");function zT(e,t){var r=!0,n,i,a,s=e.tag,o,l=e.anchor,c,u,h,d,f,p=Object.create(null),m,b,y,v;if(v=e.input.charCodeAt(e.position),v===91)u=93,f=!1,o=[];else if(v===123)u=125,f=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),v=e.input.charCodeAt(++e.position);v!==0;){if(Qt(e,!0,t),v=e.input.charCodeAt(e.position),v===u)return e.position++,e.tag=s,e.anchor=l,e.kind=f?"mapping":"sequence",e.result=o,!0;r?v===44&&Xe(e,"expected the node content, but found ','"):Xe(e,"missed comma between flow collection entries"),b=m=y=null,h=d=!1,v===63&&(c=e.input.charCodeAt(e.position+1),Wr(c)&&(h=d=!0,e.position++,Qt(e,!0,t))),n=e.line,i=e.lineStart,a=e.position,ts(e,t,T0,!1,!0),b=e.tag,m=e.result,Qt(e,!0,t),v=e.input.charCodeAt(e.position),(d||e.line===n)&&v===58&&(h=!0,v=e.input.charCodeAt(++e.position),Qt(e,!0,t),ts(e,t,T0,!1,!0),y=e.result),f?qa(e,o,p,b,m,y,n,i,a):h?o.push(qa(e,null,p,b,m,y,n,i,a)):o.push(m),Qt(e,!0,t),v=e.input.charCodeAt(e.position),v===44?(r=!0,v=e.input.charCodeAt(++e.position)):r=!1}Xe(e,"unexpected end of the stream within a flow collection")}k(zT,"readFlowCollection");function HT(e,t){var r,n,i=rf,a=!1,s=!1,o=t,l=0,c=!1,u,h;if(h=e.input.charCodeAt(e.position),h===124)n=!1;else if(h===62)n=!0;else return!1;for(e.kind="scalar",e.result="";h!==0;)if(h=e.input.charCodeAt(++e.position),h===43||h===45)rf===i?i=h===43?sx:WX:Xe(e,"repeat of a chomping mode identifier");else if((u=IT(h))>=0)u===0?Xe(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?Xe(e,"repeat of an indentation width identifier"):(o=t+u-1,s=!0);else break;if(ha(h)){do h=e.input.charCodeAt(++e.position);while(ha(h));if(h===35)do h=e.input.charCodeAt(++e.position);while(!Hn(h)&&h!==0)}for(;h!==0;){for(Lh(e),e.lineIndent=0,h=e.input.charCodeAt(e.position);(!s||e.lineIndent<o)&&h===32;)e.lineIndent++,h=e.input.charCodeAt(++e.position);if(!s&&e.lineIndent>o&&(o=e.lineIndent),Hn(h)){l++;continue}if(e.lineIndent<o){i===sx?e.result+=dr.repeat(`
|
|
479
|
+
`,a?1+l:l):i===rf&&a&&(e.result+=`
|
|
480
|
+
`);break}for(n?ha(h)?(c=!0,e.result+=dr.repeat(`
|
|
481
|
+
`,a?1+l:l)):c?(c=!1,e.result+=dr.repeat(`
|
|
482
|
+
`,l+1)):l===0?a&&(e.result+=" "):e.result+=dr.repeat(`
|
|
483
|
+
`,l):e.result+=dr.repeat(`
|
|
484
|
+
`,a?1+l:l),a=!0,s=!0,l=0,r=e.position;!Hn(h)&&h!==0;)h=e.input.charCodeAt(++e.position);Fi(e,r,e.position,!1)}return!0}k(HT,"readBlockScalar");function Mp(e,t){var r,n=e.tag,i=e.anchor,a=[],s,o=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Xe(e,"tab characters must not be used in indentation")),!(l!==45||(s=e.input.charCodeAt(e.position+1),!Wr(s))));){if(o=!0,e.position++,Qt(e,!0,-1)&&e.lineIndent<=t){a.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,ts(e,t,_T,!1,!0),a.push(e.result),Qt(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)Xe(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return o?(e.tag=n,e.anchor=i,e.kind="sequence",e.result=a,!0):!1}k(Mp,"readBlockSequence");function qT(e,t,r){var n,i,a,s,o,l,c=e.tag,u=e.anchor,h={},d=Object.create(null),f=null,p=null,m=null,b=!1,y=!1,v;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=h),v=e.input.charCodeAt(e.position);v!==0;){if(!b&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Xe(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),a=e.line,(v===63||v===58)&&Wr(n))v===63?(b&&(qa(e,h,d,f,p,null,s,o,l),f=p=m=null),y=!0,b=!0,i=!0):b?(b=!1,i=!0):Xe(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,v=n;else{if(s=e.line,o=e.lineStart,l=e.position,!ts(e,r,ET,!1,!0))break;if(e.line===a){for(v=e.input.charCodeAt(e.position);ha(v);)v=e.input.charCodeAt(++e.position);if(v===58)v=e.input.charCodeAt(++e.position),Wr(v)||Xe(e,"a whitespace character is expected after the key-value separator within a block mapping"),b&&(qa(e,h,d,f,p,null,s,o,l),f=p=m=null),y=!0,b=!1,i=!1,f=e.tag,p=e.result;else if(y)Xe(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=u,!0}else if(y)Xe(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=u,!0}if((e.line===a||e.lineIndent>t)&&(b&&(s=e.line,o=e.lineStart,l=e.position),ts(e,t,C0,!0,i)&&(b?p=e.result:m=e.result),b||(qa(e,h,d,f,p,m,s,o,l),f=p=m=null),Qt(e,!0,-1),v=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&v!==0)Xe(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return b&&qa(e,h,d,f,p,null,s,o,l),y&&(e.tag=c,e.anchor=u,e.kind="mapping",e.result=h),y}k(qT,"readBlockMapping");function jT(e){var t,r=!1,n=!1,i,a,s;if(s=e.input.charCodeAt(e.position),s!==33)return!1;if(e.tag!==null&&Xe(e,"duplication of a tag property"),s=e.input.charCodeAt(++e.position),s===60?(r=!0,s=e.input.charCodeAt(++e.position)):s===33?(n=!0,i="!!",s=e.input.charCodeAt(++e.position)):i="!",t=e.position,r){do s=e.input.charCodeAt(++e.position);while(s!==0&&s!==62);e.position<e.length?(a=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):Xe(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!Wr(s);)s===33&&(n?Xe(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(t-1,e.position+1),AT.test(i)||Xe(e,"named tag handle cannot contain such characters"),n=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),VX.test(a)&&Xe(e,"tag suffix cannot contain flow indicator characters")}a&&!NT.test(a)&&Xe(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{Xe(e,"tag name is malformed: "+a)}return r?e.tag=a:ba.call(e.tagMap,i)?e.tag=e.tagMap[i]+a:i==="!"?e.tag="!"+a:i==="!!"?e.tag="tag:yaml.org,2002:"+a:Xe(e,'undeclared tag handle "'+i+'"'),!0}k(jT,"readTagProperty");function UT(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&Xe(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Wr(r)&&!Ha(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&Xe(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}k(UT,"readAnchorProperty");function WT(e){var t,r,n;if(n=e.input.charCodeAt(e.position),n!==42)return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!Wr(n)&&!Ha(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&Xe(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),ba.call(e.anchorMap,r)||Xe(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Qt(e,!0,-1),!0}k(WT,"readAlias");function ts(e,t,r,n,i){var a,s,o,l=1,c=!1,u=!1,h,d,f,p,m,b;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=s=o=C0===r||_T===r,n&&Qt(e,!0,-1)&&(c=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;jT(e)||UT(e);)Qt(e,!0,-1)?(c=!0,o=a,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):o=!1;if(o&&(o=c||i),(l===1||C0===r)&&(T0===r||ET===r?m=t:m=t+1,b=e.position-e.lineStart,l===1?o&&(Mp(e,b)||qT(e,b,m))||zT(e,m)?u=!0:(s&&HT(e,m)||FT(e,m)||$T(e,m)?u=!0:WT(e)?(u=!0,(e.tag!==null||e.anchor!==null)&&Xe(e,"alias node should not have any properties")):PT(e,m,T0===r)&&(u=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(u=o&&Mp(e,b))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&Xe(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),h=0,d=e.implicitTypes.length;h<d;h+=1)if(p=e.implicitTypes[h],p.resolve(e.result)){e.result=p.construct(e.result),e.tag=p.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(ba.call(e.typeMap[e.kind||"fallback"],e.tag))p=e.typeMap[e.kind||"fallback"][e.tag];else for(p=null,f=e.typeMap.multi[e.kind||"fallback"],h=0,d=f.length;h<d;h+=1)if(e.tag.slice(0,f[h].tag.length)===f[h].tag){p=f[h];break}p||Xe(e,"unknown tag !<"+e.tag+">"),e.result!==null&&p.kind!==e.kind&&Xe(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+p.kind+'", not "'+e.kind+'"'),p.resolve(e.result,e.tag)?(e.result=p.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):Xe(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}k(ts,"composeNode");function GT(e){var t=e.position,r,n,i,a=!1,s;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(s=e.input.charCodeAt(e.position))!==0&&(Qt(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||s!==37));){for(a=!0,s=e.input.charCodeAt(++e.position),r=e.position;s!==0&&!Wr(s);)s=e.input.charCodeAt(++e.position);for(n=e.input.slice(r,e.position),i=[],n.length<1&&Xe(e,"directive name must not be less than one character in length");s!==0;){for(;ha(s);)s=e.input.charCodeAt(++e.position);if(s===35){do s=e.input.charCodeAt(++e.position);while(s!==0&&!Hn(s));break}if(Hn(s))break;for(r=e.position;s!==0&&!Wr(s);)s=e.input.charCodeAt(++e.position);i.push(e.input.slice(r,e.position))}s!==0&&Lh(e),ba.call(ox,n)?ox[n](e,n,i):Kl(e,'unknown document directive "'+n+'"')}if(Qt(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,Qt(e,!0,-1)):a&&Xe(e,"directives end mark is expected"),ts(e,e.lineIndent-1,C0,!1,!0),Qt(e,!0,-1),e.checkLineBreaks&&YX.test(e.input.slice(t,e.position))&&Kl(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&wc(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Qt(e,!0,-1));return}if(e.position<e.length-1)Xe(e,"end of the stream or a document separator is expected");else return}k(GT,"readDocument");function Z1(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
485
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new OT(e,t),n=e.indexOf("\0");for(n!==-1&&(r.position=n,Xe(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)GT(r);return r.documents}k(Z1,"loadDocuments");function XX(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var n=Z1(e,r);if(typeof t!="function")return n;for(var i=0,a=n.length;i<a;i+=1)t(n[i])}k(XX,"loadAll$1");function YT(e,t){var r=Z1(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new nn("expected a single document in the stream, but found more")}}k(YT,"load$1");var KX=YT,QX={load:KX},VT=Object.prototype.toString,XT=Object.prototype.hasOwnProperty,J1=65279,ZX=9,Ql=10,JX=13,eK=32,tK=33,rK=34,Ip=35,nK=37,iK=38,aK=39,sK=42,KT=44,oK=45,S0=58,lK=61,cK=62,uK=63,hK=64,QT=91,ZT=93,dK=96,JT=123,fK=124,e8=125,Pr={};Pr[0]="\\0";Pr[7]="\\a";Pr[8]="\\b";Pr[9]="\\t";Pr[10]="\\n";Pr[11]="\\v";Pr[12]="\\f";Pr[13]="\\r";Pr[27]="\\e";Pr[34]='\\"';Pr[92]="\\\\";Pr[133]="\\N";Pr[160]="\\_";Pr[8232]="\\L";Pr[8233]="\\P";var pK=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],mK=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function t8(e,t){var r,n,i,a,s,o,l;if(t===null)return{};for(r={},n=Object.keys(t),i=0,a=n.length;i<a;i+=1)s=n[i],o=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),l=e.compiledTypeMap.fallback[s],l&&XT.call(l.styleAliases,o)&&(o=l.styleAliases[o]),r[s]=o;return r}k(t8,"compileStyleMap");function r8(e){var t,r,n;if(t=e.toString(16).toUpperCase(),e<=255)r="x",n=2;else if(e<=65535)r="u",n=4;else if(e<=4294967295)r="U",n=8;else throw new nn("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+dr.repeat("0",n-t.length)+t}k(r8,"encodeHex");var gK=1,Zl=2;function n8(e){this.schema=e.schema||ST,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=dr.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=t8(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==='"'?Zl:gK,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}k(n8,"State");function Rp(e,t){for(var r=dr.repeat(" ",t),n=0,i=-1,a="",s,o=e.length;n<o;)i=e.indexOf(`
|
|
486
|
+
`,n),i===-1?(s=e.slice(n),n=o):(s=e.slice(n,i+1),n=i+1),s.length&&s!==`
|
|
487
|
+
`&&(a+=r),a+=s;return a}k(Rp,"indentString");function E0(e,t){return`
|
|
488
|
+
`+dr.repeat(" ",e.indent*t)}k(E0,"generateNextLine");function i8(e,t){var r,n,i;for(r=0,n=e.implicitTypes.length;r<n;r+=1)if(i=e.implicitTypes[r],i.resolve(t))return!0;return!1}k(i8,"testImplicitResolving");function Jl(e){return e===eK||e===ZX}k(Jl,"isWhitespace");function oo(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==J1||65536<=e&&e<=1114111}k(oo,"isPrintable");function Bp(e){return oo(e)&&e!==J1&&e!==JX&&e!==Ql}k(Bp,"isNsCharOrWhitespace");function Dp(e,t,r){var n=Bp(e),i=n&&!Jl(e);return(r?n:n&&e!==KT&&e!==QT&&e!==ZT&&e!==JT&&e!==e8)&&e!==Ip&&!(t===S0&&!i)||Bp(t)&&!Jl(t)&&e===Ip||t===S0&&i}k(Dp,"isPlainSafe");function a8(e){return oo(e)&&e!==J1&&!Jl(e)&&e!==oK&&e!==uK&&e!==S0&&e!==KT&&e!==QT&&e!==ZT&&e!==JT&&e!==e8&&e!==Ip&&e!==iK&&e!==sK&&e!==tK&&e!==fK&&e!==lK&&e!==cK&&e!==aK&&e!==rK&&e!==nK&&e!==hK&&e!==dK}k(a8,"isPlainSafeFirst");function s8(e){return!Jl(e)&&e!==S0}k(s8,"isPlainSafeLast");function Is(e,t){var r=e.charCodeAt(t),n;return r>=55296&&r<=56319&&t+1<e.length&&(n=e.charCodeAt(t+1),n>=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}k(Is,"codePointAt");function eg(e){var t=/^\n* /;return t.test(e)}k(eg,"needIndentIndicator");var o8=1,Op=2,l8=3,c8=4,_s=5;function u8(e,t,r,n,i,a,s,o){var l,c=0,u=null,h=!1,d=!1,f=n!==-1,p=-1,m=a8(Is(e,0))&&s8(Is(e,e.length-1));if(t||s)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Is(e,l),!oo(c))return _s;m=m&&Dp(c,u,o),u=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Is(e,l),c===Ql)h=!0,f&&(d=d||l-p-1>n&&e[p+1]!==" ",p=l);else if(!oo(c))return _s;m=m&&Dp(c,u,o),u=c}d=d||f&&l-p-1>n&&e[p+1]!==" "}return!h&&!d?m&&!s&&!i(e)?o8:a===Zl?_s:Op:r>9&&eg(e)?_s:s?a===Zl?_s:Op:d?c8:l8}k(u8,"chooseScalarStyle");function h8(e,t,r,n,i){e.dump=(function(){if(t.length===0)return e.quotingType===Zl?'""':"''";if(!e.noCompatMode&&(pK.indexOf(t)!==-1||mK.test(t)))return e.quotingType===Zl?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),o=n||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return i8(e,c)}switch(k(l,"testAmbiguity"),u8(t,o,e.indent,s,l,e.quotingType,e.forceQuotes&&!n,i)){case o8:return t;case Op:return"'"+t.replace(/'/g,"''")+"'";case l8:return"|"+Pp(t,e.indent)+Fp(Rp(t,a));case c8:return">"+Pp(t,e.indent)+Fp(Rp(d8(t,s),a));case _s:return'"'+f8(t)+'"';default:throw new nn("impossible error: invalid scalar style")}})()}k(h8,"writeScalar");function Pp(e,t){var r=eg(e)?String(t):"",n=e[e.length-1]===`
|
|
489
|
+
`,i=n&&(e[e.length-2]===`
|
|
490
|
+
`||e===`
|
|
491
|
+
`),a=i?"+":n?"":"-";return r+a+`
|
|
492
|
+
`}k(Pp,"blockHeader");function Fp(e){return e[e.length-1]===`
|
|
493
|
+
`?e.slice(0,-1):e}k(Fp,"dropEndingNewline");function d8(e,t){for(var r=/(\n+)([^\n]*)/g,n=(function(){var c=e.indexOf(`
|
|
494
|
+
`);return c=c!==-1?c:e.length,r.lastIndex=c,$p(e.slice(0,c),t)})(),i=e[0]===`
|
|
495
|
+
`||e[0]===" ",a,s;s=r.exec(e);){var o=s[1],l=s[2];a=l[0]===" ",n+=o+(!i&&!a&&l!==""?`
|
|
496
|
+
`:"")+$p(l,t),i=a}return n}k(d8,"foldString");function $p(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,n,i=0,a,s=0,o=0,l="";n=r.exec(e);)o=n.index,o-i>t&&(a=s>i?s:o,l+=`
|
|
497
|
+
`+e.slice(i,a),i=a+1),s=o;return l+=`
|
|
498
|
+
`,e.length-i>t&&s>i?l+=e.slice(i,s)+`
|
|
499
|
+
`+e.slice(s+1):l+=e.slice(i),l.slice(1)}k($p,"foldLine");function f8(e){for(var t="",r=0,n,i=0;i<e.length;r>=65536?i+=2:i++)r=Is(e,i),n=Pr[r],!n&&oo(r)?(t+=e[i],r>=65536&&(t+=e[i+1])):t+=n||r8(r);return t}k(f8,"escapeString");function p8(e,t,r){var n="",i=e.tag,a,s,o;for(a=0,s=r.length;a<s;a+=1)o=r[a],e.replacer&&(o=e.replacer.call(r,String(a),o)),(li(e,t,o,!1,!1)||typeof o>"u"&&li(e,t,null,!1,!1))&&(n!==""&&(n+=","+(e.condenseFlow?"":" ")),n+=e.dump);e.tag=i,e.dump="["+n+"]"}k(p8,"writeFlowSequence");function zp(e,t,r,n){var i="",a=e.tag,s,o,l;for(s=0,o=r.length;s<o;s+=1)l=r[s],e.replacer&&(l=e.replacer.call(r,String(s),l)),(li(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&li(e,t+1,null,!0,!0,!1,!0))&&((!n||i!=="")&&(i+=E0(e,t)),e.dump&&Ql===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=a,e.dump=i||"[]"}k(zp,"writeBlockSequence");function m8(e,t,r){var n="",i=e.tag,a=Object.keys(r),s,o,l,c,u;for(s=0,o=a.length;s<o;s+=1)u="",n!==""&&(u+=", "),e.condenseFlow&&(u+='"'),l=a[s],c=r[l],e.replacer&&(c=e.replacer.call(r,l,c)),li(e,t,l,!1,!1)&&(e.dump.length>1024&&(u+="? "),u+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),li(e,t,c,!1,!1)&&(u+=e.dump,n+=u));e.tag=i,e.dump="{"+n+"}"}k(m8,"writeFlowMapping");function g8(e,t,r,n){var i="",a=e.tag,s=Object.keys(r),o,l,c,u,h,d;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new nn("sortKeys must be a boolean or a function");for(o=0,l=s.length;o<l;o+=1)d="",(!n||i!=="")&&(d+=E0(e,t)),c=s[o],u=r[c],e.replacer&&(u=e.replacer.call(r,c,u)),li(e,t+1,c,!0,!0,!0)&&(h=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,h&&(e.dump&&Ql===e.dump.charCodeAt(0)?d+="?":d+="? "),d+=e.dump,h&&(d+=E0(e,t)),li(e,t+1,u,!0,h)&&(e.dump&&Ql===e.dump.charCodeAt(0)?d+=":":d+=": ",d+=e.dump,i+=d));e.tag=a,e.dump=i||"{}"}k(g8,"writeBlockMapping");function Hp(e,t,r){var n,i,a,s,o,l;for(i=r?e.explicitTypes:e.implicitTypes,a=0,s=i.length;a<s;a+=1)if(o=i[a],(o.instanceOf||o.predicate)&&(!o.instanceOf||typeof t=="object"&&t instanceof o.instanceOf)&&(!o.predicate||o.predicate(t))){if(r?o.multi&&o.representName?e.tag=o.representName(t):e.tag=o.tag:e.tag="?",o.represent){if(l=e.styleMap[o.tag]||o.defaultStyle,VT.call(o.represent)==="[object Function]")n=o.represent(t,l);else if(XT.call(o.represent,l))n=o.represent[l](t,l);else throw new nn("!<"+o.tag+'> tag resolver accepts not "'+l+'" style');e.dump=n}return!0}return!1}k(Hp,"detectType");function li(e,t,r,n,i,a,s){e.tag=null,e.dump=r,Hp(e,r,!1)||Hp(e,r,!0);var o=VT.call(e.dump),l=n,c;n&&(n=e.flowLevel<0||e.flowLevel>t);var u=o==="[object Object]"||o==="[object Array]",h,d;if(u&&(h=e.duplicates.indexOf(r),d=h!==-1),(e.tag!==null&&e.tag!=="?"||d||e.indent!==2&&t>0)&&(i=!1),d&&e.usedDuplicates[h])e.dump="*ref_"+h;else{if(u&&d&&!e.usedDuplicates[h]&&(e.usedDuplicates[h]=!0),o==="[object Object]")n&&Object.keys(e.dump).length!==0?(g8(e,t,e.dump,i),d&&(e.dump="&ref_"+h+e.dump)):(m8(e,t,e.dump),d&&(e.dump="&ref_"+h+" "+e.dump));else if(o==="[object Array]")n&&e.dump.length!==0?(e.noArrayIndent&&!s&&t>0?zp(e,t-1,e.dump,i):zp(e,t,e.dump,i),d&&(e.dump="&ref_"+h+e.dump)):(p8(e,t,e.dump),d&&(e.dump="&ref_"+h+" "+e.dump));else if(o==="[object String]")e.tag!=="?"&&h8(e,e.dump,t,a,l);else{if(o==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new nn("unacceptable kind of an object to dump "+o)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}k(li,"writeNode");function b8(e,t){var r=[],n=[],i,a;for(_0(e,r,n),i=0,a=n.length;i<a;i+=1)t.duplicates.push(r[n[i]]);t.usedDuplicates=new Array(a)}k(b8,"getDuplicateReferences");function _0(e,t,r){var n,i,a;if(e!==null&&typeof e=="object")if(i=t.indexOf(e),i!==-1)r.indexOf(i)===-1&&r.push(i);else if(t.push(e),Array.isArray(e))for(i=0,a=e.length;i<a;i+=1)_0(e[i],t,r);else for(n=Object.keys(e),i=0,a=n.length;i<a;i+=1)_0(e[n[i]],t,r)}k(_0,"inspectNode");function bK(e,t){t=t||{};var r=new n8(t);r.noRefs||b8(e,r);var n=e;return r.replacer&&(n=r.replacer.call({"":n},"",n)),li(r,0,n,!0,!0)?r.dump+`
|
|
500
|
+
`:""}k(bK,"dump$1");function yK(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}k(yK,"renamed");var y8=lT,x8=QX.load;var Lr={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},lx={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function hl(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Ut(e),t=Ut(t);const[r,n]=[e.x,e.y],[i,a]=[t.x,t.y],s=i-r,o=a-n;return{angle:Math.atan(o/s),deltaX:s,deltaY:o}}k(hl,"calculateDeltaAndAngle");var Ut=k(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),v8=k(e=>({x:k(function(t,r,n){let i=0;const a=Ut(n[0]).x<Ut(n[n.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Lr,e.arrowTypeStart)){const{angle:f,deltaX:p}=hl(n[0],n[1]);i=Lr[e.arrowTypeStart]*Math.cos(f)*(p>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(Lr,e.arrowTypeEnd)){const{angle:f,deltaX:p}=hl(n[n.length-1],n[n.length-2]);i=Lr[e.arrowTypeEnd]*Math.cos(f)*(p>=0?1:-1)}const s=Math.abs(Ut(t).x-Ut(n[n.length-1]).x),o=Math.abs(Ut(t).y-Ut(n[n.length-1]).y),l=Math.abs(Ut(t).x-Ut(n[0]).x),c=Math.abs(Ut(t).y-Ut(n[0]).y),u=Lr[e.arrowTypeStart],h=Lr[e.arrowTypeEnd],d=1;if(s<h&&s>0&&o<h){let f=h+d-s;f*=a==="right"?-1:1,i-=f}if(l<u&&l>0&&c<u){let f=u+d-l;f*=a==="right"?-1:1,i+=f}return Ut(t).x+i},"x"),y:k(function(t,r,n){let i=0;const a=Ut(n[0]).y<Ut(n[n.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Lr,e.arrowTypeStart)){const{angle:f,deltaY:p}=hl(n[0],n[1]);i=Lr[e.arrowTypeStart]*Math.abs(Math.sin(f))*(p>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(Lr,e.arrowTypeEnd)){const{angle:f,deltaY:p}=hl(n[n.length-1],n[n.length-2]);i=Lr[e.arrowTypeEnd]*Math.abs(Math.sin(f))*(p>=0?1:-1)}const s=Math.abs(Ut(t).y-Ut(n[n.length-1]).y),o=Math.abs(Ut(t).x-Ut(n[n.length-1]).x),l=Math.abs(Ut(t).y-Ut(n[0]).y),c=Math.abs(Ut(t).x-Ut(n[0]).x),u=Lr[e.arrowTypeStart],h=Lr[e.arrowTypeEnd],d=1;if(s<h&&s>0&&o<h){let f=h+d-s;f*=a==="up"?-1:1,i-=f}if(l<u&&l>0&&c<u){let f=u+d-l;f*=a==="up"?-1:1,i+=f}return Ut(t).y+i},"y")}),"getLineFunctionsWithOffset"),Ih=k(({flowchart:e})=>{const t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,n=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:n}},"getSubGraphTitleMargins"),xK=k(e=>{const{handDrawnSeed:t}=Mt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),So=k(e=>{const t=vK([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),vK=k(e=>{const t=new Map;return e.forEach(r=>{const[n,i]=r.split(":");t.set(n.trim(),i?.trim())}),t},"styles2Map"),tg=k(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"),Pe=k(e=>{const{stylesArray:t}=So(e),r=[],n=[],i=[],a=[];return t.forEach(s=>{const o=s[0];tg(o)?r.push(s.join(":")+" !important"):(n.push(s.join(":")+" !important"),o.includes("stroke")&&i.push(s.join(":")+" !important"),o==="fill"&&a.push(s.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:t,borderStyles:i,backgroundStyles:a}},"styles2String"),ze=k((e,t)=>{const{themeVariables:r,handDrawnSeed:n}=Mt(),{nodeBorder:i,mainBkg:a}=r,{stylesMap:s}=So(e);return Object.assign({roughness:.7,fill:s.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||i,seed:n,strokeWidth:s.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:kK(s.get("stroke-dasharray"))},t)},"userNodeOverrides"),kK=k(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const i=isNaN(t[0])?0:t[0];return[i,i]}const r=isNaN(t[0])?0:t[0],n=isNaN(t[1])?0:t[1];return[r,n]},"getStrokeDashArray"),Vo={},ur={},cx;function wK(){return cx||(cx=1,Object.defineProperty(ur,"__esModule",{value:!0}),ur.BLANK_URL=ur.relativeFirstCharacters=ur.whitespaceEscapeCharsRegex=ur.urlSchemeRegex=ur.ctrlCharactersRegex=ur.htmlCtrlEntityRegex=ur.htmlEntitiesRegex=ur.invalidProtocolRegex=void 0,ur.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,ur.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,ur.htmlCtrlEntityRegex=/&(newline|tab);/gi,ur.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,ur.urlSchemeRegex=/^.+(:|:)/gim,ur.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,ur.relativeFirstCharacters=[".","/"],ur.BLANK_URL="about:blank"),ur}var ux;function TK(){if(ux)return Vo;ux=1,Object.defineProperty(Vo,"__esModule",{value:!0}),Vo.sanitizeUrl=void 0;var e=wK();function t(s){return e.relativeFirstCharacters.indexOf(s[0])>-1}function r(s){var o=s.replace(e.ctrlCharactersRegex,"");return o.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function n(s){return URL.canParse(s)}function i(s){try{return decodeURIComponent(s)}catch{return s}}function a(s){if(!s)return e.BLANK_URL;var o,l=i(s.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=i(l),o=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(o&&o.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var u=c.trimStart(),h=u.match(e.urlSchemeRegex);if(!h)return c;var d=h[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(d))return e.BLANK_URL;var f=u.replace(/\\/g,"/");if(d==="mailto:"||d.includes("://"))return f;if(d==="http:"||d==="https:"){if(!n(f))return e.BLANK_URL;var p=new URL(f);return p.protocol=p.protocol.toLowerCase(),p.hostname=p.hostname.toLowerCase(),p.toString()}return f}return Vo.sanitizeUrl=a,Vo}var k8=TK(),w8=typeof global=="object"&&global&&global.Object===Object&&global,CK=typeof self=="object"&&self&&self.Object===Object&&self,bi=w8||CK||Function("return this")(),ec=bi.Symbol,T8=Object.prototype,SK=T8.hasOwnProperty,EK=T8.toString,Xo=ec?ec.toStringTag:void 0;function _K(e){var t=SK.call(e,Xo),r=e[Xo];try{e[Xo]=void 0;var n=!0}catch{}var i=EK.call(e);return n&&(t?e[Xo]=r:delete e[Xo]),i}var AK=Object.prototype,NK=AK.toString;function LK(e){return NK.call(e)}var MK="[object Null]",IK="[object Undefined]",hx=ec?ec.toStringTag:void 0;function ds(e){return e==null?e===void 0?IK:MK:hx&&hx in Object(e)?_K(e):LK(e)}function wa(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var RK="[object AsyncFunction]",BK="[object Function]",DK="[object GeneratorFunction]",OK="[object Proxy]";function Rh(e){if(!wa(e))return!1;var t=ds(e);return t==BK||t==DK||t==RK||t==OK}var nf=bi["__core-js_shared__"],dx=(function(){var e=/[^.]+$/.exec(nf&&nf.keys&&nf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function PK(e){return!!dx&&dx in e}var FK=Function.prototype,$K=FK.toString;function fs(e){if(e!=null){try{return $K.call(e)}catch{}try{return e+""}catch{}}return""}var zK=/[\\^$.*+?()[\]{}|]/g,HK=/^\[object .+?Constructor\]$/,qK=Function.prototype,jK=Object.prototype,UK=qK.toString,WK=jK.hasOwnProperty,GK=RegExp("^"+UK.call(WK).replace(zK,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function YK(e){if(!wa(e)||PK(e))return!1;var t=Rh(e)?GK:HK;return t.test(fs(e))}function VK(e,t){return e?.[t]}function ps(e,t){var r=VK(e,t);return YK(r)?r:void 0}var tc=ps(Object,"create");function XK(){this.__data__=tc?tc(null):{},this.size=0}function KK(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var QK="__lodash_hash_undefined__",ZK=Object.prototype,JK=ZK.hasOwnProperty;function eQ(e){var t=this.__data__;if(tc){var r=t[e];return r===QK?void 0:r}return JK.call(t,e)?t[e]:void 0}var tQ=Object.prototype,rQ=tQ.hasOwnProperty;function nQ(e){var t=this.__data__;return tc?t[e]!==void 0:rQ.call(t,e)}var iQ="__lodash_hash_undefined__";function aQ(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=tc&&t===void 0?iQ:t,this}function rs(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}rs.prototype.clear=XK;rs.prototype.delete=KK;rs.prototype.get=eQ;rs.prototype.has=nQ;rs.prototype.set=aQ;function sQ(){this.__data__=[],this.size=0}function Tc(e,t){return e===t||e!==e&&t!==t}function Bh(e,t){for(var r=e.length;r--;)if(Tc(e[r][0],t))return r;return-1}var oQ=Array.prototype,lQ=oQ.splice;function cQ(e){var t=this.__data__,r=Bh(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():lQ.call(t,r,1),--this.size,!0}function uQ(e){var t=this.__data__,r=Bh(t,e);return r<0?void 0:t[r][1]}function hQ(e){return Bh(this.__data__,e)>-1}function dQ(e,t){var r=this.__data__,n=Bh(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Yi(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Yi.prototype.clear=sQ;Yi.prototype.delete=cQ;Yi.prototype.get=uQ;Yi.prototype.has=hQ;Yi.prototype.set=dQ;var rc=ps(bi,"Map");function fQ(){this.size=0,this.__data__={hash:new rs,map:new(rc||Yi),string:new rs}}function pQ(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Dh(e,t){var r=e.__data__;return pQ(t)?r[typeof t=="string"?"string":"hash"]:r.map}function mQ(e){var t=Dh(this,e).delete(e);return this.size-=t?1:0,t}function gQ(e){return Dh(this,e).get(e)}function bQ(e){return Dh(this,e).has(e)}function yQ(e,t){var r=Dh(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function Vi(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Vi.prototype.clear=fQ;Vi.prototype.delete=mQ;Vi.prototype.get=gQ;Vi.prototype.has=bQ;Vi.prototype.set=yQ;var xQ="Expected a function";function Eo(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(xQ);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var s=e.apply(this,n);return r.cache=a.set(i,s)||a,s};return r.cache=new(Eo.Cache||Vi),r}Eo.Cache=Vi;function vQ(){this.__data__=new Yi,this.size=0}function kQ(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function wQ(e){return this.__data__.get(e)}function TQ(e){return this.__data__.has(e)}var CQ=200;function SQ(e,t){var r=this.__data__;if(r instanceof Yi){var n=r.__data__;if(!rc||n.length<CQ-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Vi(n)}return r.set(e,t),this.size=r.size,this}function ms(e){var t=this.__data__=new Yi(e);this.size=t.size}ms.prototype.clear=vQ;ms.prototype.delete=kQ;ms.prototype.get=wQ;ms.prototype.has=TQ;ms.prototype.set=SQ;var A0=(function(){try{var e=ps(Object,"defineProperty");return e({},"",{}),e}catch{}})();function Oh(e,t,r){t=="__proto__"&&A0?A0(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function qp(e,t,r){(r!==void 0&&!Tc(e[t],r)||r===void 0&&!(t in e))&&Oh(e,t,r)}function EQ(e){return function(t,r,n){for(var i=-1,a=Object(t),s=n(t),o=s.length;o--;){var l=s[++i];if(r(a[l],l,a)===!1)break}return t}}var C8=EQ(),S8=typeof exports=="object"&&exports&&!exports.nodeType&&exports,fx=S8&&typeof module=="object"&&module&&!module.nodeType&&module,_Q=fx&&fx.exports===S8,px=_Q?bi.Buffer:void 0,mx=px?px.allocUnsafe:void 0;function E8(e,t){if(t)return e.slice();var r=e.length,n=mx?mx(r):new e.constructor(r);return e.copy(n),n}var jp=bi.Uint8Array;function _8(e){var t=new e.constructor(e.byteLength);return new jp(t).set(new jp(e)),t}function A8(e,t){var r=t?_8(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function N8(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var gx=Object.create,AQ=(function(){function e(){}return function(t){if(!wa(t))return{};if(gx)return gx(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();function L8(e,t){return function(r){return e(t(r))}}var rg=L8(Object.getPrototypeOf,Object),NQ=Object.prototype;function Ph(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||NQ;return e===r}function M8(e){return typeof e.constructor=="function"&&!Ph(e)?AQ(rg(e)):{}}function _o(e){return e!=null&&typeof e=="object"}var LQ="[object Arguments]";function bx(e){return _o(e)&&ds(e)==LQ}var I8=Object.prototype,MQ=I8.hasOwnProperty,IQ=I8.propertyIsEnumerable,nc=bx((function(){return arguments})())?bx:function(e){return _o(e)&&MQ.call(e,"callee")&&!IQ.call(e,"callee")},ic=Array.isArray,RQ=9007199254740991;function ng(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=RQ}function Cc(e){return e!=null&&ng(e.length)&&!Rh(e)}function R8(e){return _o(e)&&Cc(e)}function BQ(){return!1}var B8=typeof exports=="object"&&exports&&!exports.nodeType&&exports,yx=B8&&typeof module=="object"&&module&&!module.nodeType&&module,DQ=yx&&yx.exports===B8,xx=DQ?bi.Buffer:void 0,OQ=xx?xx.isBuffer:void 0,Fh=OQ||BQ,PQ="[object Object]",FQ=Function.prototype,$Q=Object.prototype,D8=FQ.toString,zQ=$Q.hasOwnProperty,HQ=D8.call(Object);function qQ(e){if(!_o(e)||ds(e)!=PQ)return!1;var t=rg(e);if(t===null)return!0;var r=zQ.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&D8.call(r)==HQ}var jQ="[object Arguments]",UQ="[object Array]",WQ="[object Boolean]",GQ="[object Date]",YQ="[object Error]",VQ="[object Function]",XQ="[object Map]",KQ="[object Number]",QQ="[object Object]",ZQ="[object RegExp]",JQ="[object Set]",eZ="[object String]",tZ="[object WeakMap]",rZ="[object ArrayBuffer]",nZ="[object DataView]",iZ="[object Float32Array]",aZ="[object Float64Array]",sZ="[object Int8Array]",oZ="[object Int16Array]",lZ="[object Int32Array]",cZ="[object Uint8Array]",uZ="[object Uint8ClampedArray]",hZ="[object Uint16Array]",dZ="[object Uint32Array]",Ht={};Ht[iZ]=Ht[aZ]=Ht[sZ]=Ht[oZ]=Ht[lZ]=Ht[cZ]=Ht[uZ]=Ht[hZ]=Ht[dZ]=!0;Ht[jQ]=Ht[UQ]=Ht[rZ]=Ht[WQ]=Ht[nZ]=Ht[GQ]=Ht[YQ]=Ht[VQ]=Ht[XQ]=Ht[KQ]=Ht[QQ]=Ht[ZQ]=Ht[JQ]=Ht[eZ]=Ht[tZ]=!1;function fZ(e){return _o(e)&&ng(e.length)&&!!Ht[ds(e)]}function O8(e){return function(t){return e(t)}}var P8=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Dl=P8&&typeof module=="object"&&module&&!module.nodeType&&module,pZ=Dl&&Dl.exports===P8,af=pZ&&w8.process,Up=(function(){try{var e=Dl&&Dl.require&&Dl.require("util").types;return e||af&&af.binding&&af.binding("util")}catch{}})(),vx=Up&&Up.isTypedArray,$h=vx?O8(vx):fZ;function Wp(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var mZ=Object.prototype,gZ=mZ.hasOwnProperty;function F8(e,t,r){var n=e[t];(!(gZ.call(e,t)&&Tc(n,r))||r===void 0&&!(t in e))&&Oh(e,t,r)}function $8(e,t,r,n){var i=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var o=t[a],l=void 0;l===void 0&&(l=e[o]),i?Oh(r,o,l):F8(r,o,l)}return r}function bZ(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var yZ=9007199254740991,xZ=/^(?:0|[1-9]\d*)$/;function ig(e,t){var r=typeof e;return t=t??yZ,!!t&&(r=="number"||r!="symbol"&&xZ.test(e))&&e>-1&&e%1==0&&e<t}var vZ=Object.prototype,kZ=vZ.hasOwnProperty;function z8(e,t){var r=ic(e),n=!r&&nc(e),i=!r&&!n&&Fh(e),a=!r&&!n&&!i&&$h(e),s=r||n||i||a,o=s?bZ(e.length,String):[],l=o.length;for(var c in e)(t||kZ.call(e,c))&&!(s&&(c=="length"||i&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||ig(c,l)))&&o.push(c);return o}function wZ(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var TZ=Object.prototype,CZ=TZ.hasOwnProperty;function SZ(e){if(!wa(e))return wZ(e);var t=Ph(e),r=[];for(var n in e)n=="constructor"&&(t||!CZ.call(e,n))||r.push(n);return r}function ag(e){return Cc(e)?z8(e,!0):SZ(e)}function EZ(e){return $8(e,ag(e))}function _Z(e,t,r,n,i,a,s){var o=Wp(e,r),l=Wp(t,r),c=s.get(l);if(c){qp(e,r,c);return}var u=a?a(o,l,r+"",e,t,s):void 0,h=u===void 0;if(h){var d=ic(l),f=!d&&Fh(l),p=!d&&!f&&$h(l);u=l,d||f||p?ic(o)?u=o:R8(o)?u=N8(o):f?(h=!1,u=E8(l,!0)):p?(h=!1,u=A8(l,!0)):u=[]:qQ(l)||nc(l)?(u=o,nc(o)?u=EZ(o):(!wa(o)||Rh(o))&&(u=M8(l))):h=!1}h&&(s.set(l,u),i(u,l,n,a,s),s.delete(l)),qp(e,r,u)}function H8(e,t,r,n,i){e!==t&&C8(t,function(a,s){if(i||(i=new ms),wa(a))_Z(e,t,s,r,H8,n,i);else{var o=n?n(Wp(e,s),a,s+"",e,t,i):void 0;o===void 0&&(o=a),qp(e,s,o)}},ag)}function sg(e){return e}function AZ(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var kx=Math.max;function q8(e,t,r){return t=kx(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=kx(n.length-t,0),s=Array(a);++i<a;)s[i]=n[t+i];i=-1;for(var o=Array(t+1);++i<t;)o[i]=n[i];return o[t]=r(s),AZ(e,this,o)}}function j8(e){return function(){return e}}var NZ=A0?function(e,t){return A0(e,"toString",{configurable:!0,enumerable:!1,value:j8(t),writable:!0})}:sg,LZ=800,MZ=16,IZ=Date.now;function RZ(e){var t=0,r=0;return function(){var n=IZ(),i=MZ-(n-r);if(r=n,i>0){if(++t>=LZ)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var U8=RZ(NZ);function W8(e,t){return U8(q8(e,t,sg),e+"")}function G8(e,t,r){if(!wa(r))return!1;var n=typeof t;return(n=="number"?Cc(r)&&ig(t,r.length):n=="string"&&t in r)?Tc(r[t],e):!1}function BZ(e){return W8(function(t,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,s&&G8(r[0],r[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++n<i;){var o=r[n];o&&e(t,o,n,a)}return t})}var Y8=BZ(function(e,t,r){H8(e,t,r)}),V8="",DZ={curveBasis:Bl,curveBasisClosed:sX,curveBasisOpen:oX,curveBumpX:gw,curveBumpY:bw,curveBundle:lX,curveCardinalClosed:cX,curveCardinalOpen:uX,curveCardinal:kw,curveCatmullRomClosed:hX,curveCatmullRomOpen:dX,curveCatmullRom:Tw,curveLinear:y0,curveLinearClosed:fX,curveMonotoneX:Nw,curveMonotoneY:Lw,curveNatural:Iw,curveStep:Rw,curveStepAfter:Dw,curveStepBefore:Bw},OZ=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,PZ=k(function(e,t){const r=X8(e,/(?:init\b)|(?:initialize\b)/);let n={};if(Array.isArray(r)){const s=r.map(o=>o.args);o0(s),n=ar(n,[...s])}else n=r.args;if(!n)return;let i=A1(e,t);const a="config";return n[a]!==void 0&&(i==="flowchart-v2"&&(i="flowchart"),n[i]=n[a],delete n[a]),n},"detectInit"),X8=k(function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${OZ.source})(?=[}][%]{2}).*
|
|
501
|
+
`,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),he.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let n;const i=[];for(;(n=Il.exec(e))!==null;)if(n.index===Il.lastIndex&&Il.lastIndex++,n&&!t||t&&n[1]?.match(t)||t&&n[2]?.match(t)){const a=n[1]?n[1]:n[2],s=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;i.push({type:a,args:s})}return i.length===0?{type:e,args:null}:i.length===1?i[0]:i}catch(r){return he.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),FZ=k(function(e){return e.replace(Il,"")},"removeDirectives"),$Z=k(function(e,t){for(const[r,n]of t.entries())if(n.match(e))return r;return-1},"isSubstringInArray");function og(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return DZ[r]??t}k(og,"interpolateToCurve");function K8(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?k8.sanitizeUrl(r):r}k(K8,"formatUrl");var zZ=k((e,...t)=>{const r=e.split("."),n=r.length-1,i=r[n];let a=window;for(let s=0;s<n;s++)if(a=a[r[s]],!a){he.error(`Function name: ${e} not found in window`);return}a[i](...t)},"runFunc");function lg(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}k(lg,"distance");function Q8(e){let t,r=0;e.forEach(i=>{r+=lg(i,t),t=i});const n=r/2;return cg(e,n)}k(Q8,"traverseEdge");function Z8(e){return e.length===1?e[0]:Q8(e)}k(Z8,"calcLabelPosition");var wx=k((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),cg=k((e,t)=>{let r,n=t;for(const i of e){if(r){const a=lg(i,r);if(a===0)return r;if(a<n)n-=a;else{const s=n/a;if(s<=0)return r;if(s>=1)return{x:i.x,y:i.y};if(s>0&&s<1)return{x:wx((1-s)*r.x+s*i.x,5),y:wx((1-s)*r.y+s*i.y,5)}}}r=i}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),HZ=k((e,t,r)=>{he.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const i=cg(t,25),a=e?10:5,s=Math.atan2(t[0].y-i.y,t[0].x-i.x),o={x:0,y:0};return o.x=Math.sin(s)*a+(t[0].x+i.x)/2,o.y=-Math.cos(s)*a+(t[0].y+i.y)/2,o},"calcCardinalityPosition");function J8(e,t,r){const n=structuredClone(r);he.info("our points",n),t!=="start_left"&&t!=="start_right"&&n.reverse();const i=25+e,a=cg(n,i),s=10+e*.5,o=Math.atan2(n[0].y-a.y,n[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(o+Math.PI)*s+(n[0].x+a.x)/2,l.y=-Math.cos(o+Math.PI)*s+(n[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(o-Math.PI)*s+(n[0].x+a.x)/2-5,l.y=-Math.cos(o-Math.PI)*s+(n[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(o)*s+(n[0].x+a.x)/2-5,l.y=-Math.cos(o)*s+(n[0].y+a.y)/2-5):(l.x=Math.sin(o)*s+(n[0].x+a.x)/2,l.y=-Math.cos(o)*s+(n[0].y+a.y)/2),l}k(J8,"calcTerminalLabelPosition");function ug(e){let t="",r="";for(const n of e)n!==void 0&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":t=t+n+";");return{style:t,labelStyle:r}}k(ug,"getStylesFromArray");var Tx=0,e7=k(()=>(Tx++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Tx),"generateId");function t7(e){let t="";const r="0123456789abcdef",n=r.length;for(let i=0;i<e;i++)t+=r.charAt(Math.floor(Math.random()*n));return t}k(t7,"makeRandomHex");var r7=k(e=>t7(e.length),"random"),qZ=k(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"),jZ=k(function(e,t){const r=t.text.replace(hs.lineBreakRegex," "),[,n]=Sc(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",n),i.style("font-weight",t.fontWeight),i.attr("fill",t.fill),t.class!==void 0&&i.attr("class",t.class);const a=i.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),i},"drawSimpleText"),n7=Eo((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),hs.lineBreakRegex.test(e)))return e;const n=e.split(" ").filter(Boolean),i=[];let a="";return n.forEach((s,o)=>{const l=ci(`${s} `,r),c=ci(a,r);if(l>t){const{hyphenatedStrings:d,remainingWord:f}=UZ(s,t,"-",r);i.push(a,...d),a=f}else c+l>=t?(i.push(a),a=s):a=[a,s].filter(Boolean).join(" ");o+1===n.length&&i.push(a)}),i.filter(s=>s!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),UZ=Eo((e,t,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);const i=[...e],a=[];let s="";return i.forEach((o,l)=>{const c=`${s}${o}`;if(ci(c,n)>=t){const h=l+1,d=i.length===h,f=`${c}${r}`;a.push(d?c:f),s=""}else s=c}),{hyphenatedStrings:a,remainingWord:s}},(e,t,r="-",n)=>`${e}${t}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`);function hg(e,t){return dg(e,t).height}k(hg,"calculateTextHeight");function ci(e,t){return dg(e,t).width}k(ci,"calculateTextWidth");var dg=Eo((e,t)=>{const{fontSize:r=12,fontFamily:n="Arial",fontWeight:i=400}=t;if(!e)return{width:0,height:0};const[,a]=Sc(r),s=["sans-serif",n],o=e.split(hs.lineBreakRegex),l=[],c=Ct("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const u=c.append("svg");for(const d of s){let f=0;const p={width:0,height:0,lineHeight:0};for(const m of o){const b=qZ();b.text=m||V8;const y=jZ(u,b).style("font-size",a).style("font-weight",i).style("font-family",d),v=(y._groups||y)[0][0].getBBox();if(v.width===0&&v.height===0)throw new Error("svg element not in render tree");p.width=Math.round(Math.max(p.width,v.width)),f=Math.round(v.height),p.height+=f,p.lineHeight=Math.round(Math.max(p.lineHeight,f))}l.push(p)}u.remove();const h=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[h]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Vs,WZ=(Vs=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},k(Vs,"InitIDGenerator"),Vs),iu,GZ=k(function(e){return iu=iu||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),iu.innerHTML=e,unescape(iu.textContent)},"entityDecode");function fg(e){return"str"in e}k(fg,"isDetailedError");var YZ=k((e,t,r,n)=>{if(!n)return;const i=e.node()?.getBBox();i&&e.append("text").text(n).attr("text-anchor","middle").attr("x",i.x+i.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Sc=k(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function zh(e,t){return Y8({},e,t)}k(zh,"cleanAndMerge");var _n={assignWithDepth:ar,wrapLabel:n7,calculateTextHeight:hg,calculateTextWidth:ci,calculateTextDimensions:dg,cleanAndMerge:zh,detectInit:PZ,detectDirective:X8,isSubstringInArray:$Z,interpolateToCurve:og,calcLabelPosition:Z8,calcCardinalityPosition:HZ,calcTerminalLabelPosition:J8,formatUrl:K8,getStylesFromArray:ug,generateId:e7,random:r7,runFunc:zZ,entityDecode:GZ,insertTitle:YZ,isLabelCoordinateInPath:i7,parseFontSize:Sc,InitIDGenerator:WZ},VZ=k(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const n=r.substring(1,r.length-1);return/^\+?\d+$/.test(n)?"fl°°"+n+"¶ß":"fl°"+n+"¶ß"}),t},"encodeEntities"),Ta=k(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),XZ=k((e,t,{counter:r=0,prefix:n,suffix:i},a)=>a||`${n?`${n}_`:""}${e}_${t}_${r}${i?`_${i}`:""}`,"getEdgeId");function Br(e){return e??null}k(Br,"handleUndefinedAttr");function i7(e,t){const r=Math.round(e.x),n=Math.round(e.y),i=t.replace(/(\d+\.\d+)/g,a=>Math.round(parseFloat(a)).toString());return i.includes(r.toString())||i.includes(n.toString())}k(i7,"isLabelCoordinateInPath");const KZ=Object.freeze({left:0,top:0,width:16,height:16}),N0=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),a7=Object.freeze({...KZ,...N0}),QZ=Object.freeze({...a7,body:"",hidden:!1}),ZZ=Object.freeze({width:null,height:null}),JZ=Object.freeze({...ZZ,...N0}),eJ=(e,t,r,n="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;n=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const o=i.pop(),l=i.pop(),c={provider:i.length>0?i[0]:n,prefix:l,name:o};return sf(c)?c:null}const a=i[0],s=a.split("-");if(s.length>1){const o={provider:n,prefix:s.shift(),name:s.join("-")};return sf(o)?o:null}if(r&&n===""){const o={provider:n,prefix:"",name:a};return sf(o,r)?o:null}return null},sf=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function tJ(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const n=((e.rotate||0)+(t.rotate||0))%4;return n&&(r.rotate=n),r}function Cx(e,t){const r=tJ(e,t);for(const n in QZ)n in N0?n in e&&!(n in r)&&(r[n]=N0[n]):n in t?r[n]=t[n]:n in e&&(r[n]=e[n]);return r}function rJ(e,t){const r=e.icons,n=e.aliases||Object.create(null),i=Object.create(null);function a(s){if(r[s])return i[s]=[];if(!(s in i)){i[s]=null;const o=n[s]&&n[s].parent,l=o&&a(o);l&&(i[s]=[o].concat(l))}return i[s]}return(t||Object.keys(r).concat(Object.keys(n))).forEach(a),i}function Sx(e,t,r){const n=e.icons,i=e.aliases||Object.create(null);let a={};function s(o){a=Cx(n[o]||i[o],a)}return s(t),r.forEach(s),Cx(e,a)}function nJ(e,t){if(e.icons[t])return Sx(e,t,[]);const r=rJ(e,[t])[t];return r?Sx(e,t,r):null}const iJ=/(-?[0-9.]*[0-9]+[0-9.]*)/g,aJ=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Ex(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const n=e.split(iJ);if(n===null||!n.length)return e;const i=[];let a=n.shift(),s=aJ.test(a);for(;;){if(s){const o=parseFloat(a);isNaN(o)?i.push(a):i.push(Math.ceil(o*t*r)/r)}else i.push(a);if(a=n.shift(),a===void 0)return i.join("");s=!s}}function sJ(e,t="defs"){let r="";const n=e.indexOf("<"+t);for(;n>=0;){const i=e.indexOf(">",n),a=e.indexOf("</"+t);if(i===-1||a===-1)break;const s=e.indexOf(">",a);if(s===-1)break;r+=e.slice(i+1,a).trim(),e=e.slice(0,n).trim()+e.slice(s+1)}return{defs:r,content:e}}function oJ(e,t){return e?"<defs>"+e+"</defs>"+t:t}function lJ(e,t,r){const n=sJ(e);return oJ(n.defs,t+n.content+r)}const cJ=e=>e==="unset"||e==="undefined"||e==="none";function uJ(e,t){const r={...a7,...e},n={...JZ,...t},i={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,n].forEach(m=>{const b=[],y=m.hFlip,v=m.vFlip;let T=m.rotate;y?v?T+=2:(b.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),b.push("scale(-1 1)"),i.top=i.left=0):v&&(b.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),b.push("scale(1 -1)"),i.top=i.left=0);let A;switch(T<0&&(T-=Math.floor(T/4)*4),T=T%4,T){case 1:A=i.height/2+i.top,b.unshift("rotate(90 "+A.toString()+" "+A.toString()+")");break;case 2:b.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:A=i.width/2+i.left,b.unshift("rotate(-90 "+A.toString()+" "+A.toString()+")");break}T%2===1&&(i.left!==i.top&&(A=i.left,i.left=i.top,i.top=A),i.width!==i.height&&(A=i.width,i.width=i.height,i.height=A)),b.length&&(a=lJ(a,'<g transform="'+b.join(" ")+'">',"</g>"))});const s=n.width,o=n.height,l=i.width,c=i.height;let u,h;s===null?(h=o===null?"1em":o==="auto"?c:o,u=Ex(h,l/c)):(u=s==="auto"?l:s,h=o===null?Ex(u,c/l):o==="auto"?c:o);const d={},f=(m,b)=>{cJ(b)||(d[m]=b.toString())};f("width",u),f("height",h);const p=[i.left,i.top,l,c];return d.viewBox=p.join(" "),{attributes:d,viewBox:p,body:a}}const hJ=/\sid="(\S+)"/g,_x=new Map;function dJ(e){e=e.replace(/[0-9]+$/,"")||"a";const t=_x.get(e)||0;return _x.set(e,t+1),t?`${e}${t}`:e}function fJ(e){const t=[];let r;for(;r=hJ.exec(e);)t.push(r[1]);if(!t.length)return e;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(i=>{const a=dJ(i),s=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+a+n+"$3")}),e=e.replace(new RegExp(n,"g"),""),e}function pJ(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in t)r+=" "+n+'="'+t[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}function pg(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var gs=pg();function s7(e){gs=e}var Ol={exec:()=>null};function Nt(e,t=""){let r=typeof e=="string"?e:e.source,n={replace:(i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(Gr.caret,"$1"),r=r.replace(i,s),n},getRegex:()=>new RegExp(r,t)};return n}var mJ=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Gr={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},gJ=/^(?:[ \t]*(?:\n|$))+/,bJ=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,yJ=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ec=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,xJ=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,mg=/(?:[*+-]|\d{1,9}[.)])/,o7=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,l7=Nt(o7).replace(/bull/g,mg).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(),vJ=Nt(o7).replace(/bull/g,mg).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(),gg=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,kJ=/^[^\n]+/,bg=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,wJ=Nt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",bg).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),TJ=Nt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,mg).getRegex(),Hh="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",yg=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,CJ=Nt("^ {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",yg).replace("tag",Hh).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),c7=Nt(gg).replace("hr",Ec).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",Hh).getRegex(),SJ=Nt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",c7).getRegex(),xg={blockquote:SJ,code:bJ,def:wJ,fences:yJ,heading:xJ,hr:Ec,html:CJ,lheading:l7,list:TJ,newline:gJ,paragraph:c7,table:Ol,text:kJ},Ax=Nt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ec).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",Hh).getRegex(),EJ={...xg,lheading:vJ,table:Ax,paragraph:Nt(gg).replace("hr",Ec).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ax).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",Hh).getRegex()},_J={...xg,html:Nt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",yg).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:Ol,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Nt(gg).replace("hr",Ec).replace("heading",` *#{1,6} *[^
|
|
502
|
+
]`).replace("lheading",l7).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},AJ=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,NJ=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,u7=/^( {2,}|\\)\n(?!\s*$)/,LJ=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,qh=/[\p{P}\p{S}]/u,vg=/[\s\p{P}\p{S}]/u,h7=/[^\s\p{P}\p{S}]/u,MJ=Nt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,vg).getRegex(),d7=/(?!~)[\p{P}\p{S}]/u,IJ=/(?!~)[\s\p{P}\p{S}]/u,RJ=/(?:[^\s\p{P}\p{S}]|~)/u,BJ=Nt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",mJ?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),f7=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,DJ=Nt(f7,"u").replace(/punct/g,qh).getRegex(),OJ=Nt(f7,"u").replace(/punct/g,d7).getRegex(),p7="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",PJ=Nt(p7,"gu").replace(/notPunctSpace/g,h7).replace(/punctSpace/g,vg).replace(/punct/g,qh).getRegex(),FJ=Nt(p7,"gu").replace(/notPunctSpace/g,RJ).replace(/punctSpace/g,IJ).replace(/punct/g,d7).getRegex(),$J=Nt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,h7).replace(/punctSpace/g,vg).replace(/punct/g,qh).getRegex(),zJ=Nt(/\\(punct)/,"gu").replace(/punct/g,qh).getRegex(),HJ=Nt(/^<(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(),qJ=Nt(yg).replace("(?:-->|$)","-->").getRegex(),jJ=Nt("^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",qJ).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),L0=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,UJ=Nt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",L0).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),m7=Nt(/^!?\[(label)\]\[(ref)\]/).replace("label",L0).replace("ref",bg).getRegex(),g7=Nt(/^!?\[(ref)\](?:\[\])?/).replace("ref",bg).getRegex(),WJ=Nt("reflink|nolink(?!\\()","g").replace("reflink",m7).replace("nolink",g7).getRegex(),Nx=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,kg={_backpedal:Ol,anyPunctuation:zJ,autolink:HJ,blockSkip:BJ,br:u7,code:NJ,del:Ol,emStrongLDelim:DJ,emStrongRDelimAst:PJ,emStrongRDelimUnd:$J,escape:AJ,link:UJ,nolink:g7,punctuation:MJ,reflink:m7,reflinkSearch:WJ,tag:jJ,text:LJ,url:Ol},GJ={...kg,link:Nt(/^!?\[(label)\]\((.*?)\)/).replace("label",L0).getRegex(),reflink:Nt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",L0).getRegex()},Gp={...kg,emStrongRDelimAst:FJ,emStrongLDelim:OJ,url:Nt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Nx).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:Nt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Nx).getRegex()},YJ={...Gp,br:Nt(u7).replace("{2,}","*").getRegex(),text:Nt(Gp.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},au={normal:xg,gfm:EJ,pedantic:_J},Ko={normal:kg,gfm:Gp,breaks:YJ,pedantic:GJ},VJ={"&":"&","<":"<",">":">",'"':""","'":"'"},Lx=e=>VJ[e];function Qn(e,t){if(t){if(Gr.escapeTest.test(e))return e.replace(Gr.escapeReplace,Lx)}else if(Gr.escapeTestNoEncode.test(e))return e.replace(Gr.escapeReplaceNoEncode,Lx);return e}function Mx(e){try{e=encodeURI(e).replace(Gr.percentDecode,"%")}catch{return null}return e}function Ix(e,t){let r=e.replace(Gr.findPipe,(a,s,o)=>{let l=!1,c=s;for(;--c>=0&&o[c]==="\\";)l=!l;return l?"|":" |"}),n=r.split(Gr.splitPipe),i=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(;i<n.length;i++)n[i]=n[i].trim().replace(Gr.slashPipe,"|");return n}function Qo(e,t,r){let n=e.length;if(n===0)return"";let i=0;for(;i<n&&e.charAt(n-i-1)===t;)i++;return e.slice(0,n-i)}function XJ(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let n=0;n<e.length;n++)if(e[n]==="\\")n++;else if(e[n]===t[0])r++;else if(e[n]===t[1]&&(r--,r<0))return n;return r>0?-2:-1}function Rx(e,t,r,n,i){let a=t.href,s=t.title||null,o=e[1].replace(i.other.outputLinkReplace,"$1");n.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:s,text:o,tokens:n.inlineTokens(o)};return n.state.inLink=!1,l}function KJ(e,t,r){let n=e.match(r.other.indentCodeCompensation);if(n===null)return t;let i=n[1];return t.split(`
|
|
503
|
+
`).map(a=>{let s=a.match(r.other.beginningSpace);if(s===null)return a;let[o]=s;return o.length>=i.length?a.slice(i.length):a}).join(`
|
|
504
|
+
`)}var M0=class{options;rules;lexer;constructor(t){this.options=t||gs}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let n=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Qo(n,`
|
|
505
|
+
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let n=r[0],i=KJ(n,r[3]||"",this.rules);return{type:"code",raw:n,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:i}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let n=r[2].trim();if(this.rules.other.endingHash.test(n)){let i=Qo(n,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(n=i.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:Qo(r[0],`
|
|
506
|
+
`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let n=Qo(r[0],`
|
|
507
|
+
`).split(`
|
|
508
|
+
`),i="",a="",s=[];for(;n.length>0;){let o=!1,l=[],c;for(c=0;c<n.length;c++)if(this.rules.other.blockquoteStart.test(n[c]))l.push(n[c]),o=!0;else if(!o)l.push(n[c]);else break;n=n.slice(c);let u=l.join(`
|
|
509
|
+
`),h=u.replace(this.rules.other.blockquoteSetextReplace,`
|
|
510
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
|
|
511
|
+
${u}`:u,a=a?`${a}
|
|
512
|
+
${h}`:h;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,s,!0),this.lexer.state.top=d,n.length===0)break;let f=s.at(-1);if(f?.type==="code")break;if(f?.type==="blockquote"){let p=f,m=p.raw+`
|
|
513
|
+
`+n.join(`
|
|
514
|
+
`),b=this.blockquote(m);s[s.length-1]=b,i=i.substring(0,i.length-p.raw.length)+b.raw,a=a.substring(0,a.length-p.text.length)+b.text;break}else if(f?.type==="list"){let p=f,m=p.raw+`
|
|
515
|
+
`+n.join(`
|
|
516
|
+
`),b=this.list(m);s[s.length-1]=b,i=i.substring(0,i.length-f.raw.length)+b.raw,a=a.substring(0,a.length-p.raw.length)+b.raw,n=m.substring(s.at(-1).raw.length).split(`
|
|
517
|
+
`);continue}}return{type:"blockquote",raw:i,tokens:s,text:a}}}list(t){let r=this.rules.block.list.exec(t);if(r){let n=r[1].trim(),i=n.length>1,a={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");let s=this.rules.other.listItemRegex(n),o=!1;for(;t;){let c=!1,u="",h="";if(!(r=s.exec(t))||this.rules.block.hr.test(t))break;u=r[0],t=t.substring(u.length);let d=r[2].split(`
|
|
518
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,v=>" ".repeat(3*v.length)),f=t.split(`
|
|
519
|
+
`,1)[0],p=!d.trim(),m=0;if(this.options.pedantic?(m=2,h=d.trimStart()):p?m=r[1].length+1:(m=r[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,h=d.slice(m),m+=r[1].length),p&&this.rules.other.blankLine.test(f)&&(u+=f+`
|
|
520
|
+
`,t=t.substring(f.length+1),c=!0),!c){let v=this.rules.other.nextBulletRegex(m),T=this.rules.other.hrRegex(m),A=this.rules.other.fencesBeginRegex(m),E=this.rules.other.headingBeginRegex(m),S=this.rules.other.htmlBeginRegex(m);for(;t;){let I=t.split(`
|
|
521
|
+
`,1)[0],D;if(f=I,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),D=f):D=f.replace(this.rules.other.tabCharGlobal," "),A.test(f)||E.test(f)||S.test(f)||v.test(f)||T.test(f))break;if(D.search(this.rules.other.nonSpaceChar)>=m||!f.trim())h+=`
|
|
522
|
+
`+D.slice(m);else{if(p||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||A.test(d)||E.test(d)||T.test(d))break;h+=`
|
|
523
|
+
`+f}!p&&!f.trim()&&(p=!0),u+=I+`
|
|
524
|
+
`,t=t.substring(I.length+1),d=D.slice(m)}}a.loose||(o?a.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(o=!0));let b=null,y;this.options.gfm&&(b=this.rules.other.listIsTask.exec(h),b&&(y=b[0]!=="[ ] ",h=h.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:u,task:!!b,checked:y,loose:!1,text:h,tokens:[]}),a.raw+=u}let l=a.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let c=0;c<a.items.length;c++)if(this.lexer.state.top=!1,a.items[c].tokens=this.lexer.blockTokens(a.items[c].text,[]),!a.loose){let u=a.items[c].tokens.filter(d=>d.type==="space"),h=u.length>0&&u.some(d=>this.rules.other.anyLine.test(d.raw));a.loose=h}if(a.loose)for(let c=0;c<a.items.length;c++)a.items[c].loose=!0;return a}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let n=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:n,raw:r[0],href:i,title:a}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let n=Ix(r[1]),i=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
525
|
+
`):[],s={type:"table",raw:r[0],header:[],align:[],rows:[]};if(n.length===i.length){for(let o of i)this.rules.other.tableAlignRight.test(o)?s.align.push("right"):this.rules.other.tableAlignCenter.test(o)?s.align.push("center"):this.rules.other.tableAlignLeft.test(o)?s.align.push("left"):s.align.push(null);for(let o=0;o<n.length;o++)s.header.push({text:n[o],tokens:this.lexer.inline(n[o]),header:!0,align:s.align[o]});for(let o of a)s.rows.push(Ix(o,s.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:s.align[c]})));return s}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let n=r[1].charAt(r[1].length-1)===`
|
|
526
|
+
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let n=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let s=Qo(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{let s=XJ(r[2],"()");if(s===-2)return;if(s>-1){let o=(r[0].indexOf("!")===0?5:4)+r[1].length+s;r[2]=r[2].substring(0,s),r[0]=r[0].substring(0,o).trim(),r[3]=""}}let i=r[2],a="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(i);s&&(i=s[1],a=s[3])}else a=r[3]?r[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?i=i.slice(1):i=i.slice(1,-1)),Rx(r,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let i=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[i.toLowerCase()];if(!a){let s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return Rx(n,a,n[0],this.lexer,this.rules)}}emStrong(t,r,n=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!(!i||i[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[2])||!n||this.rules.inline.punctuation.exec(n))){let a=[...i[0]].length-1,s,o,l=a,c=0,u=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,r=r.slice(-1*t.length+a);(i=u.exec(r))!=null;){if(s=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!s)continue;if(o=[...s].length,i[3]||i[4]){l+=o;continue}else if((i[5]||i[6])&&a%3&&!((a+o)%3)){c+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l+c);let h=[...i[0]][0].length,d=t.slice(0,a+i.index+h+o);if(Math.min(a,o)%2){let p=d.slice(1,-1);return{type:"em",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}let f=d.slice(2,-2);return{type:"strong",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let n=r[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(n),a=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return i&&a&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:r[0],text:n}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let n,i;return r[2]==="@"?(n=r[1],i="mailto:"+n):(n=r[1],i=n),{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let n,i;if(r[2]==="@")n=r[0],i="mailto:"+n;else{let a;do a=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(a!==r[0]);n=r[0],r[1]==="www."?i="http://"+r[0]:i=r[0]}return{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let n=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:n}}}},Pn=class Yp{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||gs,this.options.tokenizer=this.options.tokenizer||new M0,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:Gr,block:au.normal,inline:Ko.normal};this.options.pedantic?(r.block=au.pedantic,r.inline=Ko.pedantic):this.options.gfm&&(r.block=au.gfm,this.options.breaks?r.inline=Ko.breaks:r.inline=Ko.gfm),this.tokenizer.rules=r}static get rules(){return{block:au,inline:Ko}}static lex(t,r){return new Yp(r).lex(t)}static lexInline(t,r){return new Yp(r).inlineTokens(t)}lex(t){t=t.replace(Gr.carriageReturn,`
|
|
527
|
+
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],n=!1){for(this.options.pedantic&&(t=t.replace(Gr.tabCharGlobal," ").replace(Gr.spaceLine,""));t;){let i;if(this.options.extensions?.block?.some(s=>(i=s.call({lexer:this},t,r))?(t=t.substring(i.raw.length),r.push(i),!0):!1))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let s=r.at(-1);i.raw.length===1&&s!==void 0?s.raw+=`
|
|
528
|
+
`:r.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
|
|
529
|
+
`)?"":`
|
|
530
|
+
`)+i.raw,s.text+=`
|
|
531
|
+
`+i.text,this.inlineQueue.at(-1).src=s.text):r.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
|
|
532
|
+
`)?"":`
|
|
533
|
+
`)+i.raw,s.text+=`
|
|
534
|
+
`+i.raw,this.inlineQueue.at(-1).src=s.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},r.push(i));continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),r.push(i);continue}let a=t;if(this.options.extensions?.startBlock){let s=1/0,o=t.slice(1),l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},o),typeof l=="number"&&l>=0&&(s=Math.min(s,l))}),s<1/0&&s>=0&&(a=t.substring(0,s+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){let s=r.at(-1);n&&s?.type==="paragraph"?(s.raw+=(s.raw.endsWith(`
|
|
535
|
+
`)?"":`
|
|
536
|
+
`)+i.raw,s.text+=`
|
|
537
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(i),n=a.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let s=r.at(-1);s?.type==="text"?(s.raw+=(s.raw.endsWith(`
|
|
538
|
+
`)?"":`
|
|
539
|
+
`)+i.raw,s.text+=`
|
|
540
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(i);continue}if(t){let s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let n=t,i=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)l.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,i.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)a=i[2]?i[2].length:0,n=n.slice(0,i.index+a)+"["+"a".repeat(i[0].length-a-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let s=!1,o="";for(;t;){s||(o=""),s=!1;let l;if(this.options.extensions?.inline?.some(u=>(l=u.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let u=r.at(-1);l.type==="text"&&u?.type==="text"?(u.raw+=l.raw,u.text+=l.text):r.push(l);continue}if(l=this.tokenizer.emStrong(t,n,o)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.del(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),r.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),r.push(l);continue}let c=t;if(this.options.extensions?.startInline){let u=1/0,h=t.slice(1),d;this.options.extensions.startInline.forEach(f=>{d=f.call({lexer:this},h),typeof d=="number"&&d>=0&&(u=Math.min(u,d))}),u<1/0&&u>=0&&(c=t.substring(0,u+1))}if(l=this.tokenizer.inlineText(c)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(o=l.raw.slice(-1)),s=!0;let u=r.at(-1);u?.type==="text"?(u.raw+=l.raw,u.text+=l.text):r.push(l);continue}if(t){let u="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return r}},I0=class{options;parser;constructor(t){this.options=t||gs}space(t){return""}code({text:t,lang:r,escaped:n}){let i=(r||"").match(Gr.notSpaceStart)?.[0],a=t.replace(Gr.endingNewline,"")+`
|
|
541
|
+
`;return i?'<pre><code class="language-'+Qn(i)+'">'+(n?a:Qn(a,!0))+`</code></pre>
|
|
542
|
+
`:"<pre><code>"+(n?a:Qn(a,!0))+`</code></pre>
|
|
543
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
544
|
+
${this.parser.parse(t)}</blockquote>
|
|
545
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
|
|
546
|
+
`}hr(t){return`<hr>
|
|
547
|
+
`}list(t){let r=t.ordered,n=t.start,i="";for(let o=0;o<t.items.length;o++){let l=t.items[o];i+=this.listitem(l)}let a=r?"ol":"ul",s=r&&n!==1?' start="'+n+'"':"";return"<"+a+s+`>
|
|
548
|
+
`+i+"</"+a+`>
|
|
549
|
+
`}listitem(t){let r="";if(t.task){let n=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=n+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=n+" "+Qn(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):r+=n+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
|
|
550
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
551
|
+
`}table(t){let r="",n="";for(let a=0;a<t.header.length;a++)n+=this.tablecell(t.header[a]);r+=this.tablerow({text:n});let i="";for(let a=0;a<t.rows.length;a++){let s=t.rows[a];n="";for(let o=0;o<s.length;o++)n+=this.tablecell(s[o]);i+=this.tablerow({text:n})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
|
|
552
|
+
<thead>
|
|
553
|
+
`+r+`</thead>
|
|
554
|
+
`+i+`</table>
|
|
555
|
+
`}tablerow({text:t}){return`<tr>
|
|
556
|
+
${t}</tr>
|
|
557
|
+
`}tablecell(t){let r=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+r+`</${n}>
|
|
558
|
+
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Qn(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:n}){let i=this.parser.parseInline(n),a=Mx(t);if(a===null)return i;t=a;let s='<a href="'+t+'"';return r&&(s+=' title="'+Qn(r)+'"'),s+=">"+i+"</a>",s}image({href:t,title:r,text:n,tokens:i}){i&&(n=this.parser.parseInline(i,this.parser.textRenderer));let a=Mx(t);if(a===null)return Qn(n);t=a;let s=`<img src="${t}" alt="${n}"`;return r&&(s+=` title="${Qn(r)}"`),s+=">",s}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Qn(t.text)}},wg=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Fn=class Vp{options;renderer;textRenderer;constructor(t){this.options=t||gs,this.options.renderer=this.options.renderer||new I0,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new wg}static parse(t,r){return new Vp(r).parse(t)}static parseInline(t,r){return new Vp(r).parseInline(t)}parse(t,r=!0){let n="";for(let i=0;i<t.length;i++){let a=t[i];if(this.options.extensions?.renderers?.[a.type]){let o=a,l=this.options.extensions.renderers[o.type].call({parser:this},o);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(o.type)){n+=l||"";continue}}let s=a;switch(s.type){case"space":{n+=this.renderer.space(s);continue}case"hr":{n+=this.renderer.hr(s);continue}case"heading":{n+=this.renderer.heading(s);continue}case"code":{n+=this.renderer.code(s);continue}case"table":{n+=this.renderer.table(s);continue}case"blockquote":{n+=this.renderer.blockquote(s);continue}case"list":{n+=this.renderer.list(s);continue}case"html":{n+=this.renderer.html(s);continue}case"def":{n+=this.renderer.def(s);continue}case"paragraph":{n+=this.renderer.paragraph(s);continue}case"text":{let o=s,l=this.renderer.text(o);for(;i+1<t.length&&t[i+1].type==="text";)o=t[++i],l+=`
|
|
559
|
+
`+this.renderer.text(o);r?n+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):n+=l;continue}default:{let o='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return n}parseInline(t,r=this.renderer){let n="";for(let i=0;i<t.length;i++){let a=t[i];if(this.options.extensions?.renderers?.[a.type]){let o=this.options.extensions.renderers[a.type].call({parser:this},a);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){n+=o||"";continue}}let s=a;switch(s.type){case"escape":{n+=r.text(s);break}case"html":{n+=r.html(s);break}case"link":{n+=r.link(s);break}case"image":{n+=r.image(s);break}case"strong":{n+=r.strong(s);break}case"em":{n+=r.em(s);break}case"codespan":{n+=r.codespan(s);break}case"br":{n+=r.br(s);break}case"del":{n+=r.del(s);break}case"text":{n+=r.text(s);break}default:{let o='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return n}},dl=class{options;block;constructor(t){this.options=t||gs}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?Pn.lex:Pn.lexInline}provideParser(){return this.block?Fn.parse:Fn.parseInline}},QJ=class{defaults=pg();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Fn;Renderer=I0;TextRenderer=wg;Lexer=Pn;Tokenizer=M0;Hooks=dl;constructor(...t){this.use(...t)}walkTokens(t,r){let n=[];for(let i of t)switch(n=n.concat(r.call(this,i)),i.type){case"table":{let a=i;for(let s of a.header)n=n.concat(this.walkTokens(s.tokens,r));for(let s of a.rows)for(let o of s)n=n.concat(this.walkTokens(o.tokens,r));break}case"list":{let a=i;n=n.concat(this.walkTokens(a.items,r));break}default:{let a=i;this.defaults.extensions?.childTokens?.[a.type]?this.defaults.extensions.childTokens[a.type].forEach(s=>{let o=a[s].flat(1/0);n=n.concat(this.walkTokens(o,r))}):a.tokens&&(n=n.concat(this.walkTokens(a.tokens,r)))}}return n}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let i={...n};if(i.async=this.defaults.async||i.async||!1,n.extensions&&(n.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let s=r.renderers[a.name];s?r.renderers[a.name]=function(...o){let l=a.renderer.apply(this,o);return l===!1&&(l=s.apply(this,o)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=r[a.level];s?s.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),i.extensions=r),n.renderer){let a=this.defaults.renderer||new I0(this.defaults);for(let s in n.renderer){if(!(s in a))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let o=s,l=n.renderer[o],c=a[o];a[o]=(...u)=>{let h=l.apply(a,u);return h===!1&&(h=c.apply(a,u)),h||""}}i.renderer=a}if(n.tokenizer){let a=this.defaults.tokenizer||new M0(this.defaults);for(let s in n.tokenizer){if(!(s in a))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let o=s,l=n.tokenizer[o],c=a[o];a[o]=(...u)=>{let h=l.apply(a,u);return h===!1&&(h=c.apply(a,u)),h}}i.tokenizer=a}if(n.hooks){let a=this.defaults.hooks||new dl;for(let s in n.hooks){if(!(s in a))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let o=s,l=n.hooks[o],c=a[o];dl.passThroughHooks.has(s)?a[o]=u=>{if(this.defaults.async&&dl.passThroughHooksRespectAsync.has(s))return(async()=>{let d=await l.call(a,u);return c.call(a,d)})();let h=l.call(a,u);return c.call(a,h)}:a[o]=(...u)=>{if(this.defaults.async)return(async()=>{let d=await l.apply(a,u);return d===!1&&(d=await c.apply(a,u)),d})();let h=l.apply(a,u);return h===!1&&(h=c.apply(a,u)),h}}i.hooks=a}if(n.walkTokens){let a=this.defaults.walkTokens,s=n.walkTokens;i.walkTokens=function(o){let l=[];return l.push(s.call(this,o)),a&&(l=l.concat(a.call(this,o))),l}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return Pn.lex(t,r??this.defaults)}parser(t,r){return Fn.parse(t,r??this.defaults)}parseMarkdown(t){return(r,n)=>{let i={...n},a={...this.defaults,...i},s=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&i.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let o=a.hooks?await a.hooks.preprocess(r):r,l=await(a.hooks?await a.hooks.provideLexer():t?Pn.lex:Pn.lexInline)(o,a),c=a.hooks?await a.hooks.processAllTokens(l):l;a.walkTokens&&await Promise.all(this.walkTokens(c,a.walkTokens));let u=await(a.hooks?await a.hooks.provideParser():t?Fn.parse:Fn.parseInline)(c,a);return a.hooks?await a.hooks.postprocess(u):u})().catch(s);try{a.hooks&&(r=a.hooks.preprocess(r));let o=(a.hooks?a.hooks.provideLexer():t?Pn.lex:Pn.lexInline)(r,a);a.hooks&&(o=a.hooks.processAllTokens(o)),a.walkTokens&&this.walkTokens(o,a.walkTokens);let l=(a.hooks?a.hooks.provideParser():t?Fn.parse:Fn.parseInline)(o,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(o){return s(o)}}}onError(t,r){return n=>{if(n.message+=`
|
|
560
|
+
Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+Qn(n.message+"",!0)+"</pre>";return r?Promise.resolve(i):i}if(r)return Promise.reject(n);throw n}}},ns=new QJ;function It(e,t){return ns.parse(e,t)}It.options=It.setOptions=function(e){return ns.setOptions(e),It.defaults=ns.defaults,s7(It.defaults),It};It.getDefaults=pg;It.defaults=gs;It.use=function(...e){return ns.use(...e),It.defaults=ns.defaults,s7(It.defaults),It};It.walkTokens=function(e,t){return ns.walkTokens(e,t)};It.parseInline=ns.parseInline;It.Parser=Fn;It.parser=Fn.parse;It.Renderer=I0;It.TextRenderer=wg;It.Lexer=Pn;It.lexer=Pn.lex;It.Tokenizer=M0;It.Hooks=dl;It.parse=It;It.options;It.setOptions;It.use;It.walkTokens;It.parseInline;Fn.parse;Pn.lex;function b7(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=Array.from(typeof e=="string"?[e]:e);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,"");var i=n.reduce(function(o,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?o.concat(c.map(function(u){var h,d;return(d=(h=u.match(/[\t ]/g))===null||h===void 0?void 0:h.length)!==null&&d!==void 0?d:0})):o},[]);if(i.length){var a=new RegExp(`
|
|
561
|
+
[ ]{`+Math.min.apply(Math,i)+"}","g");n=n.map(function(o){return o.replace(a,`
|
|
562
|
+
`)})}n[0]=n[0].replace(/^\r?\n/,"");var s=n[0];return t.forEach(function(o,l){var c=s.match(/(?:^|\n)( *)$/),u=c?c[1]:"",h=o;typeof o=="string"&&o.includes(`
|
|
563
|
+
`)&&(h=String(o).split(`
|
|
564
|
+
`).map(function(d,f){return f===0?d:""+u+d}).join(`
|
|
565
|
+
`)),s+=h+n[l+1]}),s}var y7={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},Xp=new Map,x7=new Map,v7=k(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(he.debug("Registering icon pack:",t.name),"loader"in t)x7.set(t.name,t.loader);else if("icons"in t)Xp.set(t.name,t.icons);else throw he.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),k7=k(async(e,t)=>{const r=eJ(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const n=r.prefix||t;if(!n)throw new Error(`Icon name must contain a prefix: ${e}`);let i=Xp.get(n);if(!i){const s=x7.get(n);if(!s)throw new Error(`Icon set not found: ${r.prefix}`);try{i={...await s(),prefix:n},Xp.set(n,i)}catch(o){throw he.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=nJ(i,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),ZJ=k(async e=>{try{return await k7(e),!0}catch{return!1}},"isIconAvailable"),Ao=k(async(e,t,r)=>{let n;try{n=await k7(e,t?.fallbackPrefix)}catch(s){he.error(s),n=y7}const i=uJ(n,t),a=pJ(fJ(i.body),{...i.attributes,...r});return yn(a,Cr())},"getIconSVG");function w7(e,{markdownAutoWrap:t}){const n=e.replace(/<br\/>/g,`
|
|
566
|
+
`).replace(/\n{2,}/g,`
|
|
567
|
+
`),i=b7(n);return t===!1?i.replace(/ /g," "):i}k(w7,"preprocessMarkdown");function T7(e,t={}){const r=w7(e,t),n=It.lexer(r),i=[[]];let a=0;function s(o,l="normal"){o.type==="text"?o.text.split(`
|
|
568
|
+
`).forEach((u,h)=>{h!==0&&(a++,i.push([])),u.split(" ").forEach(d=>{d=d.replace(/'/g,"'"),d&&i[a].push({content:d,type:l})})}):o.type==="strong"||o.type==="em"?o.tokens.forEach(c=>{s(c,o.type)}):o.type==="html"&&i[a].push({content:o.text,type:"normal"})}return k(s,"processNode"),n.forEach(o=>{o.type==="paragraph"?o.tokens?.forEach(l=>{s(l)}):o.type==="html"?i[a].push({content:o.text,type:"normal"}):i[a].push({content:o.raw,type:"normal"})}),i}k(T7,"markdownToLines");function C7(e,{markdownAutoWrap:t}={}){const r=It.lexer(e);function n(i){return i.type==="text"?t===!1?i.text.replace(/\n */g,"<br/>").replace(/ /g," "):i.text.replace(/\n */g,"<br/>"):i.type==="strong"?`<strong>${i.tokens?.map(n).join("")}</strong>`:i.type==="em"?`<em>${i.tokens?.map(n).join("")}</em>`:i.type==="paragraph"?`<p>${i.tokens?.map(n).join("")}</p>`:i.type==="space"?"":i.type==="html"?`${i.text}`:i.type==="escape"?i.text:(he.warn(`Unsupported markdown: ${i.type}`),i.raw)}return k(n,"output"),r.map(n).join("")}k(C7,"markdownToHTML");function S7(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}k(S7,"splitTextToChars");function E7(e,t){const r=S7(t.content);return Tg(e,[],r,t.type)}k(E7,"splitWordToFitWidth");function Tg(e,t,r,n){if(r.length===0)return[{content:t.join(""),type:n},{content:"",type:n}];const[i,...a]=r,s=[...t,i];return e([{content:s.join(""),type:n}])?Tg(e,s,a,n):(t.length===0&&i&&(t.push(i),r.shift()),[{content:t.join(""),type:n},{content:r.join(""),type:n}])}k(Tg,"splitWordToFitWidthRecursion");function _7(e,t){if(e.some(({content:r})=>r.includes(`
|
|
569
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return R0(e,t)}k(_7,"splitLineToFitWidth");function R0(e,t,r=[],n=[]){if(e.length===0)return n.length>0&&r.push(n),r.length>0?r:[];let i="";e[0].content===" "&&(i=" ",e.shift());const a=e.shift()??{content:" ",type:"normal"},s=[...n];if(i!==""&&s.push({content:i,type:"normal"}),s.push(a),t(s))return R0(e,t,r,s);if(n.length>0)r.push(n),e.unshift(a);else if(a.content){const[o,l]=E7(t,a);r.push([o]),l.content&&e.unshift(l)}return R0(e,t,r)}k(R0,"splitLineToFitWidthRecursion");function Kp(e,t){t&&e.attr("style",t)}k(Kp,"applyStyle");async function A7(e,t,r,n,i=!1,a=Cr()){const s=e.append("foreignObject");s.attr("width",`${10*r}px`),s.attr("height",`${10*r}px`);const o=s.append("xhtml:div"),l=Ja(t.label)?await kh(t.label.replace(hs.lineBreakRegex,`
|
|
570
|
+
`),a):yn(t.label,a),c=t.isNode?"nodeLabel":"edgeLabel",u=o.append("span");u.html(l),Kp(u,t.labelStyle),u.attr("class",`${c} ${n}`),Kp(o,t.labelStyle),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("line-height","1.5"),o.style("max-width",r+"px"),o.style("text-align","center"),o.attr("xmlns","http://www.w3.org/1999/xhtml"),i&&o.attr("class","labelBkg");let h=o.node().getBoundingClientRect();return h.width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px"),h=o.node().getBoundingClientRect()),s.node()}k(A7,"addHtmlSpan");function jh(e,t,r){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em")}k(jh,"createTspan");function N7(e,t,r){const n=e.append("text"),i=jh(n,1,t);Uh(i,r);const a=i.node().getComputedTextLength();return n.remove(),a}k(N7,"computeWidthOfText");function L7(e,t,r){const n=e.append("text"),i=jh(n,1,t);Uh(i,[{content:r,type:"normal"}]);const a=i.node()?.getBoundingClientRect();return a&&n.remove(),a}k(L7,"computeDimensionOfText");function M7(e,t,r,n=!1){const a=t.append("g"),s=a.insert("rect").attr("class","background").attr("style","stroke: none"),o=a.append("text").attr("y","-10.1");let l=0;for(const c of r){const u=k(d=>N7(a,1.1,d)<=e,"checkWidth"),h=u(c)?[c]:_7(c,u);for(const d of h){const f=jh(o,l,1.1);Uh(f,d),l++}}if(n){const c=o.node().getBBox(),u=2;return s.attr("x",c.x-u).attr("y",c.y-u).attr("width",c.width+2*u).attr("height",c.height+2*u),a.node()}else return o.node()}k(M7,"createFormattedText");function Uh(e,t){e.text(""),t.forEach((r,n)=>{const i=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");n===0?i.text(r.content):i.text(" "+r.content)})}k(Uh,"updateTextContentAndStyles");async function Cg(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(i,a,s)=>(r.push((async()=>{const o=`${a}:${s}`;return await ZJ(o)?await Ao(o,void 0,{class:"label-icon"}):`<i class='${yn(i,t).replace(":"," ")}'></i>`})()),i));const n=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>n.shift()??"")}k(Cg,"replaceIconSubstring");var Xi=k(async(e,t="",{style:r="",isTitle:n=!1,classes:i="",useHtmlLabels:a=!0,isNode:s=!0,width:o=200,addSvgBackground:l=!1}={},c)=>{if(he.debug("XYZ createText",t,r,n,i,a,s,"addSvgBackground: ",l),a){const u=C7(t,c),h=await Cg(Ta(u),c),d=t.replace(/\\\\/g,"\\"),f={isNode:s,label:Ja(t)?d:h,labelStyle:r.replace("fill:","color:")};return await A7(e,f,o,i,l,c)}else{const u=t.replace(/<br\s*\/?>/g,"<br/>"),h=T7(u.replace("<br>","<br/>"),c),d=M7(o,e,h,t?l:!1);if(s){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const f=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Ct(d).attr("style",f)}else{const f=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Ct(d).select("rect").attr("style",f.replace(/background:/g,"fill:"));const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Ct(d).select("text").attr("style",p)}return d}},"createText");function of(e,t,r){if(e&&e.length){const[n,i]=t,a=Math.PI/180*r,s=Math.cos(a),o=Math.sin(a);for(const l of e){const[c,u]=l;l[0]=(c-n)*s-(u-i)*o+n,l[1]=(c-n)*o+(u-i)*s+i}}}function JJ(e,t){return e[0]===t[0]&&e[1]===t[1]}function eee(e,t,r,n=1){const i=r,a=Math.max(t,.1),s=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,o=[0,0];if(i)for(const c of s)of(c,o,i);const l=(function(c,u,h){const d=[];for(const v of c){const T=[...v];JJ(T[0],T[T.length-1])||T.push([T[0][0],T[0][1]]),T.length>2&&d.push(T)}const f=[];u=Math.max(u,.1);const p=[];for(const v of d)for(let T=0;T<v.length-1;T++){const A=v[T],E=v[T+1];if(A[1]!==E[1]){const S=Math.min(A[1],E[1]);p.push({ymin:S,ymax:Math.max(A[1],E[1]),x:S===A[1]?A[0]:E[0],islope:(E[0]-A[0])/(E[1]-A[1])})}}if(p.sort(((v,T)=>v.ymin<T.ymin?-1:v.ymin>T.ymin?1:v.x<T.x?-1:v.x>T.x?1:v.ymax===T.ymax?0:(v.ymax-T.ymax)/Math.abs(v.ymax-T.ymax))),!p.length)return f;let m=[],b=p[0].ymin,y=0;for(;m.length||p.length;){if(p.length){let v=-1;for(let T=0;T<p.length&&!(p[T].ymin>b);T++)v=T;p.splice(0,v+1).forEach((T=>{m.push({s:b,edge:T})}))}if(m=m.filter((v=>!(v.edge.ymax<=b))),m.sort(((v,T)=>v.edge.x===T.edge.x?0:(v.edge.x-T.edge.x)/Math.abs(v.edge.x-T.edge.x))),(h!==1||y%u==0)&&m.length>1)for(let v=0;v<m.length;v+=2){const T=v+1;if(T>=m.length)break;const A=m[v].edge,E=m[T].edge;f.push([[Math.round(A.x),b],[Math.round(E.x),b]])}b+=h,m.forEach((v=>{v.edge.x=v.edge.x+h*v.edge.islope})),y++}return f})(s,a,n);if(i){for(const c of s)of(c,o,-i);(function(c,u,h){const d=[];c.forEach((f=>d.push(...f))),of(d,u,h)})(l,o,-i)}return l}function _c(e,t){var r;const n=t.hachureAngle+90;let i=t.hachureGap;i<0&&(i=4*t.strokeWidth),i=Math.round(Math.max(i,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=i),eee(e,i,n,a||1)}let Sg=class{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const n=_c(t,r);return{type:"fillSketch",ops:this.renderLines(n,r)}}renderLines(t,r){const n=[];for(const i of t)n.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],r));return n}};function Wh(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class tee extends Sg{fillPolygons(t,r){let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);const i=_c(t,Object.assign({},r,{hachureGap:n})),a=Math.PI/180*r.hachureAngle,s=[],o=.5*n*Math.cos(a),l=.5*n*Math.sin(a);for(const[c,u]of i)Wh([c,u])&&s.push([[c[0]-o,c[1]+l],[...u]],[[c[0]+o,c[1]-l],[...u]]);return{type:"fillSketch",ops:this.renderLines(s,r)}}}class ree extends Sg{fillPolygons(t,r){const n=this._fillPolygons(t,r),i=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,i);return n.ops=n.ops.concat(a.ops),n}}class nee{constructor(t){this.helper=t}fillPolygons(t,r){const n=_c(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(n,r)}dotsOnLines(t,r){const n=[];let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const s=i/4;for(const o of t){const l=Wh(o),c=l/i,u=Math.ceil(c)-1,h=l-u*i,d=(o[0][0]+o[1][0])/2-i/4,f=Math.min(o[0][1],o[1][1]);for(let p=0;p<u;p++){const m=f+h+p*i,b=d-s+2*Math.random()*s,y=m-s+2*Math.random()*s,v=this.helper.ellipse(b,y,a,a,r);n.push(...v.ops)}}return{type:"fillSketch",ops:n}}}class iee{constructor(t){this.helper=t}fillPolygons(t,r){const n=_c(t,r);return{type:"fillSketch",ops:this.dashedLine(n,r)}}dashedLine(t,r){const n=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,i=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return t.forEach((s=>{const o=Wh(s),l=Math.floor(o/(n+i)),c=(o+i-l*(n+i))/2;let u=s[0],h=s[1];u[0]>h[0]&&(u=s[1],h=s[0]);const d=Math.atan((h[1]-u[1])/(h[0]-u[0]));for(let f=0;f<l;f++){const p=f*(n+i),m=p+n,b=[u[0]+p*Math.cos(d)+c*Math.cos(d),u[1]+p*Math.sin(d)+c*Math.sin(d)],y=[u[0]+m*Math.cos(d)+c*Math.cos(d),u[1]+m*Math.sin(d)+c*Math.sin(d)];a.push(...this.helper.doubleLineOps(b[0],b[1],y[0],y[1],r))}})),a}}class aee{constructor(t){this.helper=t}fillPolygons(t,r){const n=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,i=r.zigzagOffset<0?n:r.zigzagOffset,a=_c(t,r=Object.assign({},r,{hachureGap:n+i}));return{type:"fillSketch",ops:this.zigzagLines(a,i,r)}}zigzagLines(t,r,n){const i=[];return t.forEach((a=>{const s=Wh(a),o=Math.round(s/(2*r));let l=a[0],c=a[1];l[0]>c[0]&&(l=a[1],c=a[0]);const u=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let h=0;h<o;h++){const d=2*h*r,f=2*(h+1)*r,p=Math.sqrt(2*Math.pow(r,2)),m=[l[0]+d*Math.cos(u),l[1]+d*Math.sin(u)],b=[l[0]+f*Math.cos(u),l[1]+f*Math.sin(u)],y=[m[0]+p*Math.cos(u+Math.PI/4),m[1]+p*Math.sin(u+Math.PI/4)];i.push(...this.helper.doubleLineOps(m[0],m[1],y[0],y[1],n),...this.helper.doubleLineOps(y[0],y[1],b[0],b[1],n))}})),i}}const Zr={};class see{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const oee=0,lf=1,Bx=2,su={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function cf(e,t){return e.type===t}function Eg(e){const t=[],r=(function(s){const o=new Array;for(;s!=="";)if(s.match(/^([ \t\r\n,]+)/))s=s.substr(RegExp.$1.length);else if(s.match(/^([aAcChHlLmMqQsStTvVzZ])/))o[o.length]={type:oee,text:RegExp.$1},s=s.substr(RegExp.$1.length);else{if(!s.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];o[o.length]={type:lf,text:`${parseFloat(RegExp.$1)}`},s=s.substr(RegExp.$1.length)}return o[o.length]={type:Bx,text:""},o})(e);let n="BOD",i=0,a=r[i];for(;!cf(a,Bx);){let s=0;const o=[];if(n==="BOD"){if(a.text!=="M"&&a.text!=="m")return Eg("M0,0"+e);i++,s=su[a.text],n=a.text}else cf(a,lf)?s=su[n]:(i++,s=su[a.text],n=a.text);if(!(i+s<r.length))throw new Error("Path data ended short");for(let l=i;l<i+s;l++){const c=r[l];if(!cf(c,lf))throw new Error("Param not a number: "+n+","+c.text);o[o.length]=+c.text}if(typeof su[n]!="number")throw new Error("Bad segment: "+n);{const l={key:n,data:o};t.push(l),i+=s,a=r[i],n==="M"&&(n="L"),n==="m"&&(n="l")}}return t}function I7(e){let t=0,r=0,n=0,i=0;const a=[];for(const{key:s,data:o}of e)switch(s){case"M":a.push({key:"M",data:[...o]}),[t,r]=o,[n,i]=o;break;case"m":t+=o[0],r+=o[1],a.push({key:"M",data:[t,r]}),n=t,i=r;break;case"L":a.push({key:"L",data:[...o]}),[t,r]=o;break;case"l":t+=o[0],r+=o[1],a.push({key:"L",data:[t,r]});break;case"C":a.push({key:"C",data:[...o]}),t=o[4],r=o[5];break;case"c":{const l=o.map(((c,u)=>u%2?c+r:c+t));a.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...o]}),t=o[2],r=o[3];break;case"q":{const l=o.map(((c,u)=>u%2?c+r:c+t));a.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...o]}),t=o[5],r=o[6];break;case"a":t+=o[5],r+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],t,r]});break;case"H":a.push({key:"H",data:[...o]}),t=o[0];break;case"h":t+=o[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...o]}),r=o[0];break;case"v":r+=o[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...o]}),t=o[2],r=o[3];break;case"s":{const l=o.map(((c,u)=>u%2?c+r:c+t));a.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...o]}),t=o[0],r=o[1];break;case"t":t+=o[0],r+=o[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=n,r=i}return a}function R7(e){const t=[];let r="",n=0,i=0,a=0,s=0,o=0,l=0;for(const{key:c,data:u}of e){switch(c){case"M":t.push({key:"M",data:[...u]}),[n,i]=u,[a,s]=u;break;case"C":t.push({key:"C",data:[...u]}),n=u[4],i=u[5],o=u[2],l=u[3];break;case"L":t.push({key:"L",data:[...u]}),[n,i]=u;break;case"H":n=u[0],t.push({key:"L",data:[n,i]});break;case"V":i=u[0],t.push({key:"L",data:[n,i]});break;case"S":{let h=0,d=0;r==="C"||r==="S"?(h=n+(n-o),d=i+(i-l)):(h=n,d=i),t.push({key:"C",data:[h,d,...u]}),o=u[0],l=u[1],n=u[2],i=u[3];break}case"T":{const[h,d]=u;let f=0,p=0;r==="Q"||r==="T"?(f=n+(n-o),p=i+(i-l)):(f=n,p=i);const m=n+2*(f-n)/3,b=i+2*(p-i)/3,y=h+2*(f-h)/3,v=d+2*(p-d)/3;t.push({key:"C",data:[m,b,y,v,h,d]}),o=f,l=p,n=h,i=d;break}case"Q":{const[h,d,f,p]=u,m=n+2*(h-n)/3,b=i+2*(d-i)/3,y=f+2*(h-f)/3,v=p+2*(d-p)/3;t.push({key:"C",data:[m,b,y,v,f,p]}),o=h,l=d,n=f,i=p;break}case"A":{const h=Math.abs(u[0]),d=Math.abs(u[1]),f=u[2],p=u[3],m=u[4],b=u[5],y=u[6];h===0||d===0?(t.push({key:"C",data:[n,i,b,y,b,y]}),n=b,i=y):(n!==b||i!==y)&&(B7(n,i,b,y,h,d,f,p,m).forEach((function(v){t.push({key:"C",data:v})})),n=b,i=y);break}case"Z":t.push({key:"Z",data:[]}),n=a,i=s}r=c}return t}function Zo(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function B7(e,t,r,n,i,a,s,o,l,c){const u=(h=s,Math.PI*h/180);var h;let d=[],f=0,p=0,m=0,b=0;if(c)[f,p,m,b]=c;else{[e,t]=Zo(e,t,-u),[r,n]=Zo(r,n,-u);const ee=(e-r)/2,$=(t-n)/2;let q=ee*ee/(i*i)+$*$/(a*a);q>1&&(q=Math.sqrt(q),i*=q,a*=q);const W=i*i,Z=a*a,V=W*Z-W*$*$-Z*ee*ee,ve=W*$*$+Z*ee*ee,L=(o===l?-1:1)*Math.sqrt(Math.abs(V/ve));m=L*i*$/a+(e+r)/2,b=L*-a*ee/i+(t+n)/2,f=Math.asin(parseFloat(((t-b)/a).toFixed(9))),p=Math.asin(parseFloat(((n-b)/a).toFixed(9))),e<m&&(f=Math.PI-f),r<m&&(p=Math.PI-p),f<0&&(f=2*Math.PI+f),p<0&&(p=2*Math.PI+p),l&&f>p&&(f-=2*Math.PI),!l&&p>f&&(p-=2*Math.PI)}let y=p-f;if(Math.abs(y)>120*Math.PI/180){const ee=p,$=r,q=n;p=l&&p>f?f+120*Math.PI/180*1:f+120*Math.PI/180*-1,d=B7(r=m+i*Math.cos(p),n=b+a*Math.sin(p),$,q,i,a,s,0,l,[p,ee,m,b])}y=p-f;const v=Math.cos(f),T=Math.sin(f),A=Math.cos(p),E=Math.sin(p),S=Math.tan(y/4),I=4/3*i*S,D=4/3*a*S,H=[e,t],R=[e+I*T,t-D*v],F=[r+I*E,n-D*A],G=[r,n];if(R[0]=2*H[0]-R[0],R[1]=2*H[1]-R[1],c)return[R,F,G].concat(d);{d=[R,F,G].concat(d);const ee=[];for(let $=0;$<d.length;$+=3){const q=Zo(d[$][0],d[$][1],u),W=Zo(d[$+1][0],d[$+1][1],u),Z=Zo(d[$+2][0],d[$+2][1],u);ee.push([q[0],q[1],W[0],W[1],Z[0],Z[1]])}return ee}}const lee={randOffset:function(e,t){return st(e,t)},randOffsetWithRange:function(e,t,r){return B0(e,t,r)},ellipse:function(e,t,r,n,i){const a=O7(r,n,i);return Qp(e,t,i,a).opset},doubleLineOps:function(e,t,r,n,i){return ya(e,t,r,n,i,!0)}};function D7(e,t,r,n,i){return{type:"path",ops:ya(e,t,r,n,i)}}function _u(e,t,r){const n=(e||[]).length;if(n>2){const i=[];for(let a=0;a<n-1;a++)i.push(...ya(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&i.push(...ya(e[n-1][0],e[n-1][1],e[0][0],e[0][1],r)),{type:"path",ops:i}}return n===2?D7(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function cee(e,t,r,n,i){return(function(a,s){return _u(a,!0,s)})([[e,t],[e+r,t],[e+r,t+n],[e,t+n]],i)}function Dx(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,n=ou(r[0],1*(1+.2*t.roughness),t),i=t.disableMultiStroke?[]:ou(r[0],1.5*(1+.22*t.roughness),Fx(t));for(let a=1;a<r.length;a++){const s=r[a];if(s.length){const o=ou(s,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:ou(s,1.5*(1+.22*t.roughness),Fx(t));for(const c of o)c.op!=="move"&&n.push(c);for(const c of l)c.op!=="move"&&i.push(c)}}return{type:"path",ops:n.concat(i)}}return{type:"path",ops:[]}}function O7(e,t,r){const n=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),i=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*n)),a=2*Math.PI/i;let s=Math.abs(e/2),o=Math.abs(t/2);const l=1-r.curveFitting;return s+=st(s*l,r),o+=st(o*l,r),{increment:a,rx:s,ry:o}}function Qp(e,t,r,n){const[i,a]=$x(n.increment,e,t,n.rx,n.ry,1,n.increment*B0(.1,B0(.4,1,r),r),r);let s=D0(i,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[o]=$x(n.increment,e,t,n.rx,n.ry,1.5,0,r),l=D0(o,null,r);s=s.concat(l)}return{estimatedPoints:a,opset:{type:"path",ops:s}}}function Ox(e,t,r,n,i,a,s,o,l){const c=e,u=t;let h=Math.abs(r/2),d=Math.abs(n/2);h+=st(.01*h,l),d+=st(.01*d,l);let f=i,p=a;for(;f<0;)f+=2*Math.PI,p+=2*Math.PI;p-f>2*Math.PI&&(f=0,p=2*Math.PI);const m=2*Math.PI/l.curveStepCount,b=Math.min(m/2,(p-f)/2),y=zx(b,c,u,h,d,f,p,1,l);if(!l.disableMultiStroke){const v=zx(b,c,u,h,d,f,p,1.5,l);y.push(...v)}return s&&(o?y.push(...ya(c,u,c+h*Math.cos(f),u+d*Math.sin(f),l),...ya(c,u,c+h*Math.cos(p),u+d*Math.sin(p),l)):y.push({op:"lineTo",data:[c,u]},{op:"lineTo",data:[c+h*Math.cos(f),u+d*Math.sin(f)]})),{type:"path",ops:y}}function Px(e,t){const r=R7(I7(Eg(e))),n=[];let i=[0,0],a=[0,0];for(const{key:s,data:o}of r)switch(s){case"M":a=[o[0],o[1]],i=[o[0],o[1]];break;case"L":n.push(...ya(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case"C":{const[l,c,u,h,d,f]=o;n.push(...uee(l,c,u,h,d,f,a,t)),a=[d,f];break}case"Z":n.push(...ya(a[0],a[1],i[0],i[1],t)),a=[i[0],i[1]]}return{type:"path",ops:n}}function uf(e,t){const r=[];for(const n of e)if(n.length){const i=t.maxRandomnessOffset||0,a=n.length;if(a>2){r.push({op:"move",data:[n[0][0]+st(i,t),n[0][1]+st(i,t)]});for(let s=1;s<a;s++)r.push({op:"lineTo",data:[n[s][0]+st(i,t),n[s][1]+st(i,t)]})}}return{type:"fillPath",ops:r}}function Ts(e,t){return(function(r,n){let i=r.fillStyle||"hachure";if(!Zr[i])switch(i){case"zigzag":Zr[i]||(Zr[i]=new tee(n));break;case"cross-hatch":Zr[i]||(Zr[i]=new ree(n));break;case"dots":Zr[i]||(Zr[i]=new nee(n));break;case"dashed":Zr[i]||(Zr[i]=new iee(n));break;case"zigzag-line":Zr[i]||(Zr[i]=new aee(n));break;default:i="hachure",Zr[i]||(Zr[i]=new Sg(n))}return Zr[i]})(t,lee).fillPolygons(e,t)}function Fx(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function P7(e){return e.randomizer||(e.randomizer=new see(e.seed||0)),e.randomizer.next()}function B0(e,t,r,n=1){return r.roughness*n*(P7(r)*(t-e)+e)}function st(e,t,r=1){return B0(-e,e,t,r)}function ya(e,t,r,n,i,a=!1){const s=a?i.disableMultiStrokeFill:i.disableMultiStroke,o=Zp(e,t,r,n,i,!0,!1);if(s)return o;const l=Zp(e,t,r,n,i,!0,!0);return o.concat(l)}function Zp(e,t,r,n,i,a,s){const o=Math.pow(e-r,2)+Math.pow(t-n,2),l=Math.sqrt(o);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let u=i.maxRandomnessOffset||0;u*u*100>o&&(u=l/10);const h=u/2,d=.2+.2*P7(i);let f=i.bowing*i.maxRandomnessOffset*(n-t)/200,p=i.bowing*i.maxRandomnessOffset*(e-r)/200;f=st(f,i,c),p=st(p,i,c);const m=[],b=()=>st(h,i,c),y=()=>st(u,i,c),v=i.preserveVertices;return s?m.push({op:"move",data:[e+(v?0:b()),t+(v?0:b())]}):m.push({op:"move",data:[e+(v?0:st(u,i,c)),t+(v?0:st(u,i,c))]}),s?m.push({op:"bcurveTo",data:[f+e+(r-e)*d+b(),p+t+(n-t)*d+b(),f+e+2*(r-e)*d+b(),p+t+2*(n-t)*d+b(),r+(v?0:b()),n+(v?0:b())]}):m.push({op:"bcurveTo",data:[f+e+(r-e)*d+y(),p+t+(n-t)*d+y(),f+e+2*(r-e)*d+y(),p+t+2*(n-t)*d+y(),r+(v?0:y()),n+(v?0:y())]}),m}function ou(e,t,r){if(!e.length)return[];const n=[];n.push([e[0][0]+st(t,r),e[0][1]+st(t,r)]),n.push([e[0][0]+st(t,r),e[0][1]+st(t,r)]);for(let i=1;i<e.length;i++)n.push([e[i][0]+st(t,r),e[i][1]+st(t,r)]),i===e.length-1&&n.push([e[i][0]+st(t,r),e[i][1]+st(t,r)]);return D0(n,null,r)}function D0(e,t,r){const n=e.length,i=[];if(n>3){const a=[],s=1-r.curveTightness;i.push({op:"move",data:[e[1][0],e[1][1]]});for(let o=1;o+2<n;o++){const l=e[o];a[0]=[l[0],l[1]],a[1]=[l[0]+(s*e[o+1][0]-s*e[o-1][0])/6,l[1]+(s*e[o+1][1]-s*e[o-1][1])/6],a[2]=[e[o+1][0]+(s*e[o][0]-s*e[o+2][0])/6,e[o+1][1]+(s*e[o][1]-s*e[o+2][1])/6],a[3]=[e[o+1][0],e[o+1][1]],i.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}}else n===3?(i.push({op:"move",data:[e[1][0],e[1][1]]}),i.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):n===2&&i.push(...Zp(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return i}function $x(e,t,r,n,i,a,s,o){const l=[],c=[];if(o.roughness===0){e/=4,c.push([t+n*Math.cos(-e),r+i*Math.sin(-e)]);for(let u=0;u<=2*Math.PI;u+=e){const h=[t+n*Math.cos(u),r+i*Math.sin(u)];l.push(h),c.push(h)}c.push([t+n*Math.cos(0),r+i*Math.sin(0)]),c.push([t+n*Math.cos(e),r+i*Math.sin(e)])}else{const u=st(.5,o)-Math.PI/2;c.push([st(a,o)+t+.9*n*Math.cos(u-e),st(a,o)+r+.9*i*Math.sin(u-e)]);const h=2*Math.PI+u-.01;for(let d=u;d<h;d+=e){const f=[st(a,o)+t+n*Math.cos(d),st(a,o)+r+i*Math.sin(d)];l.push(f),c.push(f)}c.push([st(a,o)+t+n*Math.cos(u+2*Math.PI+.5*s),st(a,o)+r+i*Math.sin(u+2*Math.PI+.5*s)]),c.push([st(a,o)+t+.98*n*Math.cos(u+s),st(a,o)+r+.98*i*Math.sin(u+s)]),c.push([st(a,o)+t+.9*n*Math.cos(u+.5*s),st(a,o)+r+.9*i*Math.sin(u+.5*s)])}return[c,l]}function zx(e,t,r,n,i,a,s,o,l){const c=a+st(.1,l),u=[];u.push([st(o,l)+t+.9*n*Math.cos(c-e),st(o,l)+r+.9*i*Math.sin(c-e)]);for(let h=c;h<=s;h+=e)u.push([st(o,l)+t+n*Math.cos(h),st(o,l)+r+i*Math.sin(h)]);return u.push([t+n*Math.cos(s),r+i*Math.sin(s)]),u.push([t+n*Math.cos(s),r+i*Math.sin(s)]),D0(u,null,l)}function uee(e,t,r,n,i,a,s,o){const l=[],c=[o.maxRandomnessOffset||1,(o.maxRandomnessOffset||1)+.3];let u=[0,0];const h=o.disableMultiStroke?1:2,d=o.preserveVertices;for(let f=0;f<h;f++)f===0?l.push({op:"move",data:[s[0],s[1]]}):l.push({op:"move",data:[s[0]+(d?0:st(c[0],o)),s[1]+(d?0:st(c[0],o))]}),u=d?[i,a]:[i+st(c[f],o),a+st(c[f],o)],l.push({op:"bcurveTo",data:[e+st(c[f],o),t+st(c[f],o),r+st(c[f],o),n+st(c[f],o),u[0],u[1]]});return l}function Jo(e){return[...e]}function Hx(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const n=[];if(r===3)n.push(Jo(e[0]),Jo(e[1]),Jo(e[2]),Jo(e[2]));else{const i=[];i.push(e[0],e[0]);for(let o=1;o<e.length;o++)i.push(e[o]),o===e.length-1&&i.push(e[o]);const a=[],s=1-t;n.push(Jo(i[0]));for(let o=1;o+2<i.length;o++){const l=i[o];a[0]=[l[0],l[1]],a[1]=[l[0]+(s*i[o+1][0]-s*i[o-1][0])/6,l[1]+(s*i[o+1][1]-s*i[o-1][1])/6],a[2]=[i[o+1][0]+(s*i[o][0]-s*i[o+2][0])/6,i[o+1][1]+(s*i[o][1]-s*i[o+2][1])/6],a[3]=[i[o+1][0],i[o+1][1]],n.push(a[1],a[2],a[3])}}return n}function Au(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function hee(e,t,r){const n=Au(t,r);if(n===0)return Au(e,t);let i=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/n;return i=Math.max(0,Math.min(1,i)),Au(e,Pa(t,r,i))}function Pa(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Jp(e,t,r,n){const i=n||[];if((function(o,l){const c=o[l+0],u=o[l+1],h=o[l+2],d=o[l+3];let f=3*u[0]-2*c[0]-d[0];f*=f;let p=3*u[1]-2*c[1]-d[1];p*=p;let m=3*h[0]-2*d[0]-c[0];m*=m;let b=3*h[1]-2*d[1]-c[1];return b*=b,f<m&&(f=m),p<b&&(p=b),f+p})(e,t)<r){const o=e[t+0];i.length?(a=i[i.length-1],s=o,Math.sqrt(Au(a,s))>1&&i.push(o)):i.push(o),i.push(e[t+3])}else{const l=e[t+0],c=e[t+1],u=e[t+2],h=e[t+3],d=Pa(l,c,.5),f=Pa(c,u,.5),p=Pa(u,h,.5),m=Pa(d,f,.5),b=Pa(f,p,.5),y=Pa(m,b,.5);Jp([l,d,m,y],0,r,i),Jp([y,b,p,h],0,r,i)}var a,s;return i}function dee(e,t){return O0(e,0,e.length,t)}function O0(e,t,r,n,i){const a=i||[],s=e[t],o=e[r-1];let l=0,c=1;for(let u=t+1;u<r-1;++u){const h=hee(e[u],s,o);h>l&&(l=h,c=u)}return Math.sqrt(l)>n?(O0(e,t,c+1,n,a),O0(e,c,r,n,a)):(a.length||a.push(s),a.push(o)),a}function hf(e,t=.15,r){const n=[],i=(e.length-1)/3;for(let a=0;a<i;a++)Jp(e,3*a,t,n);return r&&r>0?O0(n,0,n.length,r):n}const ln="none";class P0{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,n){return{shape:t,sets:r||[],options:n||this.defaultOptions}}line(t,r,n,i,a){const s=this._o(a);return this._d("line",[D7(t,r,n,i,s)],s)}rectangle(t,r,n,i,a){const s=this._o(a),o=[],l=cee(t,r,n,i,s);if(s.fill){const c=[[t,r],[t+n,r],[t+n,r+i],[t,r+i]];s.fillStyle==="solid"?o.push(uf([c],s)):o.push(Ts([c],s))}return s.stroke!==ln&&o.push(l),this._d("rectangle",o,s)}ellipse(t,r,n,i,a){const s=this._o(a),o=[],l=O7(n,i,s),c=Qp(t,r,s,l);if(s.fill)if(s.fillStyle==="solid"){const u=Qp(t,r,s,l).opset;u.type="fillPath",o.push(u)}else o.push(Ts([c.estimatedPoints],s));return s.stroke!==ln&&o.push(c.opset),this._d("ellipse",o,s)}circle(t,r,n,i){const a=this.ellipse(t,r,n,n,i);return a.shape="circle",a}linearPath(t,r){const n=this._o(r);return this._d("linearPath",[_u(t,!1,n)],n)}arc(t,r,n,i,a,s,o=!1,l){const c=this._o(l),u=[],h=Ox(t,r,n,i,a,s,o,!0,c);if(o&&c.fill)if(c.fillStyle==="solid"){const d=Object.assign({},c);d.disableMultiStroke=!0;const f=Ox(t,r,n,i,a,s,!0,!1,d);f.type="fillPath",u.push(f)}else u.push((function(d,f,p,m,b,y,v){const T=d,A=f;let E=Math.abs(p/2),S=Math.abs(m/2);E+=st(.01*E,v),S+=st(.01*S,v);let I=b,D=y;for(;I<0;)I+=2*Math.PI,D+=2*Math.PI;D-I>2*Math.PI&&(I=0,D=2*Math.PI);const H=(D-I)/v.curveStepCount,R=[];for(let F=I;F<=D;F+=H)R.push([T+E*Math.cos(F),A+S*Math.sin(F)]);return R.push([T+E*Math.cos(D),A+S*Math.sin(D)]),R.push([T,A]),Ts([R],v)})(t,r,n,i,a,s,c));return c.stroke!==ln&&u.push(h),this._d("arc",u,c)}curve(t,r){const n=this._o(r),i=[],a=Dx(t,n);if(n.fill&&n.fill!==ln)if(n.fillStyle==="solid"){const s=Dx(t,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(s.ops)})}else{const s=[],o=t;if(o.length){const l=typeof o[0][0]=="number"?[o]:o;for(const c of l)c.length<3?s.push(...c):c.length===3?s.push(...hf(Hx([c[0],c[0],c[1],c[2]]),10,(1+n.roughness)/2)):s.push(...hf(Hx(c),10,(1+n.roughness)/2))}s.length&&i.push(Ts([s],n))}return n.stroke!==ln&&i.push(a),this._d("curve",i,n)}polygon(t,r){const n=this._o(r),i=[],a=_u(t,!0,n);return n.fill&&(n.fillStyle==="solid"?i.push(uf([t],n)):i.push(Ts([t],n))),n.stroke!==ln&&i.push(a),this._d("polygon",i,n)}path(t,r){const n=this._o(r),i=[];if(!t)return this._d("path",i,n);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=n.fill&&n.fill!=="transparent"&&n.fill!==ln,s=n.stroke!==ln,o=!!(n.simplification&&n.simplification<1),l=(function(u,h,d){const f=R7(I7(Eg(u))),p=[];let m=[],b=[0,0],y=[];const v=()=>{y.length>=4&&m.push(...hf(y,h)),y=[]},T=()=>{v(),m.length&&(p.push(m),m=[])};for(const{key:E,data:S}of f)switch(E){case"M":T(),b=[S[0],S[1]],m.push(b);break;case"L":v(),m.push([S[0],S[1]]);break;case"C":if(!y.length){const I=m.length?m[m.length-1]:b;y.push([I[0],I[1]])}y.push([S[0],S[1]]),y.push([S[2],S[3]]),y.push([S[4],S[5]]);break;case"Z":v(),m.push([b[0],b[1]])}if(T(),!d)return p;const A=[];for(const E of p){const S=dee(E,d);S.length&&A.push(S)}return A})(t,1,o?4-4*(n.simplification||1):(1+n.roughness)/2),c=Px(t,n);if(a)if(n.fillStyle==="solid")if(l.length===1){const u=Px(t,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(u.ops)})}else i.push(uf(l,n));else i.push(Ts(l,n));return s&&(o?l.forEach((u=>{i.push(_u(u,!1,n))})):i.push(c)),this._d("path",i,n)}opsToPath(t,r){let n="";for(const i of t.ops){const a=typeof r=="number"&&r>=0?i.data.map((s=>+s.toFixed(r))):i.data;switch(i.op){case"move":n+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":n+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":n+=`L${a[0]} ${a[1]} `}}return n.trim()}toPaths(t){const r=t.sets||[],n=t.options||this.defaultOptions,i=[];for(const a of r){let s=null;switch(a.type){case"path":s={d:this.opsToPath(a),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:ln};break;case"fillPath":s={d:this.opsToPath(a),stroke:ln,strokeWidth:0,fill:n.fill||ln};break;case"fillSketch":s=this.fillSketch(a,n)}s&&i.push(s)}return i}fillSketch(t,r){let n=r.fillWeight;return n<0&&(n=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||ln,strokeWidth:n,fill:ln}}_mergedShape(t){return t.filter(((r,n)=>n===0||r.op!=="move"))}}class fee{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new P0(r)}draw(t){const r=t.sets||[],n=t.options||this.getDefaultOptions(),i=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const s of r)switch(s.type){case"path":i.save(),i.strokeStyle=n.stroke==="none"?"transparent":n.stroke,i.lineWidth=n.strokeWidth,n.strokeLineDash&&i.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(i.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(i,s,a),i.restore();break;case"fillPath":{i.save(),i.fillStyle=n.fill||"";const o=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(i,s,a,o),i.restore();break}case"fillSketch":this.fillSketch(i,s,n)}}fillSketch(t,r,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2),t.save(),n.fillLineDash&&t.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(t.lineDashOffset=n.fillLineDashOffset),t.strokeStyle=n.fill||"",t.lineWidth=i,this._drawToContext(t,r,n.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,n,i="nonzero"){t.beginPath();for(const a of r.ops){const s=typeof n=="number"&&n>=0?a.data.map((o=>+o.toFixed(n))):a.data;switch(a.op){case"move":t.moveTo(s[0],s[1]);break;case"bcurveTo":t.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case"lineTo":t.lineTo(s[0],s[1])}}r.type==="fillPath"?t.fill(i):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,n,i,a){const s=this.gen.line(t,r,n,i,a);return this.draw(s),s}rectangle(t,r,n,i,a){const s=this.gen.rectangle(t,r,n,i,a);return this.draw(s),s}ellipse(t,r,n,i,a){const s=this.gen.ellipse(t,r,n,i,a);return this.draw(s),s}circle(t,r,n,i){const a=this.gen.circle(t,r,n,i);return this.draw(a),a}linearPath(t,r){const n=this.gen.linearPath(t,r);return this.draw(n),n}polygon(t,r){const n=this.gen.polygon(t,r);return this.draw(n),n}arc(t,r,n,i,a,s,o=!1,l){const c=this.gen.arc(t,r,n,i,a,s,o,l);return this.draw(c),c}curve(t,r){const n=this.gen.curve(t,r);return this.draw(n),n}path(t,r){const n=this.gen.path(t,r);return this.draw(n),n}}const lu="http://www.w3.org/2000/svg";class pee{constructor(t,r){this.svg=t,this.gen=new P0(r)}draw(t){const r=t.sets||[],n=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,a=i.createElementNS(lu,"g"),s=t.options.fixedDecimalPlaceDigits;for(const o of r){let l=null;switch(o.type){case"path":l=i.createElementNS(lu,"path"),l.setAttribute("d",this.opsToPath(o,s)),l.setAttribute("stroke",n.stroke),l.setAttribute("stroke-width",n.strokeWidth+""),l.setAttribute("fill","none"),n.strokeLineDash&&l.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${n.strokeLineDashOffset}`);break;case"fillPath":l=i.createElementNS(lu,"path"),l.setAttribute("d",this.opsToPath(o,s)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",n.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(i,o,n)}l&&a.appendChild(l)}return a}fillSketch(t,r,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2);const a=t.createElementNS(lu,"path");return a.setAttribute("d",this.opsToPath(r,n.fixedDecimalPlaceDigits)),a.setAttribute("stroke",n.fill||""),a.setAttribute("stroke-width",i+""),a.setAttribute("fill","none"),n.fillLineDash&&a.setAttribute("stroke-dasharray",n.fillLineDash.join(" ").trim()),n.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${n.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,n,i,a){const s=this.gen.line(t,r,n,i,a);return this.draw(s)}rectangle(t,r,n,i,a){const s=this.gen.rectangle(t,r,n,i,a);return this.draw(s)}ellipse(t,r,n,i,a){const s=this.gen.ellipse(t,r,n,i,a);return this.draw(s)}circle(t,r,n,i){const a=this.gen.circle(t,r,n,i);return this.draw(a)}linearPath(t,r){const n=this.gen.linearPath(t,r);return this.draw(n)}polygon(t,r){const n=this.gen.polygon(t,r);return this.draw(n)}arc(t,r,n,i,a,s,o=!1,l){const c=this.gen.arc(t,r,n,i,a,s,o,l);return this.draw(c)}curve(t,r){const n=this.gen.curve(t,r);return this.draw(n)}path(t,r){const n=this.gen.path(t,r);return this.draw(n)}}var Fe={canvas:(e,t)=>new fee(e,t),svg:(e,t)=>new pee(e,t),generator:e=>new P0(e),newSeed:()=>P0.newSeed()},it=k(async(e,t,r)=>{let n;const i=t.useHtmlLabels||sr(Mt()?.htmlLabels);r?n=r:n="node default";const a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),s=a.insert("g").attr("class","label").attr("style",Br(t.labelStyle));let o;t.label===void 0?o="":o=typeof t.label=="string"?t.label:t.label[0];const l=await Xi(s,yn(Ta(o),Mt()),{useHtmlLabels:i,width:t.width||Mt().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:t.labelStyle,addSvgBackground:!!t.icon||!!t.img});let c=l.getBBox();const u=(t?.padding??0)/2;if(i){const h=l.children[0],d=Ct(l),f=h.getElementsByTagName("img");if(f){const p=o.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...f].map(m=>new Promise(b=>{function y(){if(m.style.display="flex",m.style.flexDirection="column",p){const v=Mt().fontSize?Mt().fontSize:window.getComputedStyle(document.body).fontSize,T=5,[A=N1.fontSize]=Sc(v),E=A*T+"px";m.style.minWidth=E,m.style.maxWidth=E}else m.style.width="100%";b(m)}k(y,"setupImage"),setTimeout(()=>{m.complete&&y()}),m.addEventListener("error",y),m.addEventListener("load",y)})))}c=h.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}return i?s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):s.attr("transform","translate(0, "+-c.height/2+")"),t.centerLabel&&s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:c,halfPadding:u,label:s}},"labelHelper"),df=k(async(e,t,r)=>{const n=r.useHtmlLabels||sr(Mt()?.flowchart?.htmlLabels),i=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await Xi(i,yn(Ta(t),Mt()),{useHtmlLabels:n,width:r.width||Mt()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let s=a.getBBox();const o=r.padding/2;if(sr(Mt()?.flowchart?.htmlLabels)){const l=a.children[0],c=Ct(a);s=l.getBoundingClientRect(),c.attr("width",s.width),c.attr("height",s.height)}return n?i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):i.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:e,bbox:s,halfPadding:o,label:i}},"insertLabel"),He=k((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),Je=k((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function Tt(e){const t=e.map((r,n)=>`${n===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}k(Tt,"createPathFromPoints");function xa(e,t,r,n,i,a){const s=[],l=r-e,c=n-t,u=l/a,h=2*Math.PI/u,d=t+c/2;for(let f=0;f<=50;f++){const p=f/50,m=e+p*l,b=d+i*Math.sin(h*(m-e));s.push({x:m,y:b})}return s}k(xa,"generateFullSineWavePoints");function ac(e,t,r,n,i,a){const s=[],o=i*Math.PI/180,u=(a*Math.PI/180-o)/(n-1);for(let h=0;h<n;h++){const d=o+h*u,f=e+r*Math.cos(d),p=t+r*Math.sin(d);s.push({x:-f,y:-p})}return s}k(ac,"generateCirclePoints");var mee=k((e,t)=>{var r=e.x,n=e.y,i=t.x-r,a=t.y-n,s=e.width/2,o=e.height/2,l,c;return Math.abs(a)*s>Math.abs(i)*o?(a<0&&(o=-o),l=a===0?0:o*i/a,c=o):(i<0&&(s=-s),l=s,c=i===0?0:s*a/i),{x:r+l,y:n+c}},"intersectRect"),No=mee;function F7(e,t){t&&e.attr("style",t)}k(F7,"applyStyle");async function $7(e){const t=Ct(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),n=Mt();let i=e.label;e.label&&Ja(e.label)&&(i=await kh(e.label.replace(hs.lineBreakRegex,`
|
|
571
|
+
`),n));const s='<span class="'+(e.isNode?"nodeLabel":"edgeLabel")+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+i+"</span>";return r.html(yn(s,n)),F7(r,e.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}k($7,"addHtmlLabel");var gee=k(async(e,t,r,n)=>{let i=e||"";if(typeof i=="object"&&(i=i[0]),sr(Mt().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"<br />"),he.info("vertexText"+i);const a={isNode:n,label:Ta(i).replace(/fa[blrs]?:fa-[\w-]+/g,o=>`<i class='${o.replace(":"," ")}'></i>`),labelStyle:t&&t.replace("fill:","color:")};return await $7(a)}else{const a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",t.replace("color:","fill:"));let s=[];typeof i=="string"?s=i.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(i)?s=i:s=[];for(const o of s){const l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=o.trim(),a.appendChild(l)}return a}},"createLabel"),ja=gee,Ca=k((e,t,r,n,i)=>["M",e+i,t,"H",e+r-i,"A",i,i,0,0,1,e+r,t+i,"V",t+n-i,"A",i,i,0,0,1,e+r-i,t+n,"H",e+i,"A",i,i,0,0,1,e,t+n-i,"V",t+i,"A",i,i,0,0,1,e+i,t,"Z"].join(" "),"createRoundedRectPathD"),z7=k(async(e,t)=>{he.info("Creating subgraph rect for ",t.id,t);const r=Mt(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:a,clusterBorder:s}=n,{labelStyles:o,nodeStyles:l,borderStyles:c,backgroundStyles:u}=Pe(t),h=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),d=sr(r.flowchart.htmlLabels),f=h.insert("g").attr("class","cluster-label "),p=await Xi(f,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0});let m=p.getBBox();if(sr(r.flowchart.htmlLabels)){const I=p.children[0],D=Ct(p);m=I.getBoundingClientRect(),D.attr("width",m.width),D.attr("height",m.height)}const b=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(b-t.width)/2-t.padding:t.diff=-t.padding;const y=t.height,v=t.x-b/2,T=t.y-y/2;he.trace("Data ",t,JSON.stringify(t));let A;if(t.look==="handDrawn"){const I=Fe.svg(h),D=ze(t,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:i}),H=I.path(Ca(v,T,b,y,0),D);A=h.insert(()=>(he.debug("Rough node insert CXC",H),H),":first-child"),A.select("path:nth-child(2)").attr("style",c.join(";")),A.select("path").attr("style",u.join(";").replace("fill","stroke"))}else A=h.insert("rect",":first-child"),A.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",v).attr("y",T).attr("width",b).attr("height",y);const{subGraphTitleTopMargin:E}=Ih(r);if(f.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+E})`),o){const I=f.select("span");I&&I.attr("style",o)}const S=A.node().getBBox();return t.offsetX=0,t.width=S.width,t.height=S.height,t.offsetY=m.height-t.padding/2,t.intersect=function(I){return No(t,I)},{cluster:h,labelBBox:m}},"rect"),bee=k((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),n=r.insert("rect",":first-child"),i=0*t.padding,a=i/2;n.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");const s=n.node().getBBox();return t.width=s.width,t.height=s.height,t.intersect=function(o){return No(t,o)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),yee=k(async(e,t)=>{const r=Mt(),{themeVariables:n,handDrawnSeed:i}=r,{altBackground:a,compositeBackground:s,compositeTitleBackground:o,nodeBorder:l}=n,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.look),u=c.insert("g",":first-child"),h=c.insert("g").attr("class","cluster-label");let d=c.append("rect");const f=h.node().appendChild(await ja(t.label,t.labelStyle,void 0,!0));let p=f.getBBox();if(sr(r.flowchart.htmlLabels)){const H=f.children[0],R=Ct(f);p=H.getBoundingClientRect(),R.attr("width",p.width),R.attr("height",p.height)}const m=0*t.padding,b=m/2,y=(t.width<=p.width+t.padding?p.width+t.padding:t.width)+m;t.width<=p.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const v=t.height+m,T=t.height+m-p.height-6,A=t.x-y/2,E=t.y-v/2;t.width=y;const S=t.y-t.height/2-b+p.height+2;let I;if(t.look==="handDrawn"){const H=t.cssClasses.includes("statediagram-cluster-alt"),R=Fe.svg(c),F=t.rx||t.ry?R.path(Ca(A,E,y,v,10),{roughness:.7,fill:o,fillStyle:"solid",stroke:l,seed:i}):R.rectangle(A,E,y,v,{seed:i});I=c.insert(()=>F,":first-child");const G=R.rectangle(A,S,y,T,{fill:H?a:s,fillStyle:H?"hachure":"solid",stroke:l,seed:i});I=c.insert(()=>F,":first-child"),d=c.insert(()=>G)}else I=u.insert("rect",":first-child"),I.attr("class","outer").attr("x",A).attr("y",E).attr("width",y).attr("height",v).attr("data-look",t.look),d.attr("class","inner").attr("x",A).attr("y",S).attr("width",y).attr("height",T);h.attr("transform",`translate(${t.x-p.width/2}, ${E+1-(sr(r.flowchart.htmlLabels)?0:3)})`);const D=I.node().getBBox();return t.height=D.height,t.offsetX=0,t.offsetY=p.height-t.padding/2,t.labelBBox=p,t.intersect=function(H){return No(t,H)},{cluster:c,labelBBox:p}},"roundedWithTitle"),xee=k(async(e,t)=>{he.info("Creating subgraph rect for ",t.id,t);const r=Mt(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:a,clusterBorder:s}=n,{labelStyles:o,nodeStyles:l,borderStyles:c,backgroundStyles:u}=Pe(t),h=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),d=sr(r.flowchart.htmlLabels),f=h.insert("g").attr("class","cluster-label "),p=await Xi(f,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width});let m=p.getBBox();if(sr(r.flowchart.htmlLabels)){const I=p.children[0],D=Ct(p);m=I.getBoundingClientRect(),D.attr("width",m.width),D.attr("height",m.height)}const b=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(b-t.width)/2-t.padding:t.diff=-t.padding;const y=t.height,v=t.x-b/2,T=t.y-y/2;he.trace("Data ",t,JSON.stringify(t));let A;if(t.look==="handDrawn"){const I=Fe.svg(h),D=ze(t,{roughness:.7,fill:a,stroke:s,fillWeight:4,seed:i}),H=I.path(Ca(v,T,b,y,t.rx),D);A=h.insert(()=>(he.debug("Rough node insert CXC",H),H),":first-child"),A.select("path:nth-child(2)").attr("style",c.join(";")),A.select("path").attr("style",u.join(";").replace("fill","stroke"))}else A=h.insert("rect",":first-child"),A.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",v).attr("y",T).attr("width",b).attr("height",y);const{subGraphTitleTopMargin:E}=Ih(r);if(f.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+E})`),o){const I=f.select("span");I&&I.attr("style",o)}const S=A.node().getBBox();return t.offsetX=0,t.width=S.width,t.height=S.height,t.offsetY=m.height-t.padding/2,t.intersect=function(I){return No(t,I)},{cluster:h,labelBBox:m}},"kanbanSection"),vee=k((e,t)=>{const r=Mt(),{themeVariables:n,handDrawnSeed:i}=r,{nodeBorder:a}=n,s=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),o=s.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const u=t.height+l,h=t.x-c/2,d=t.y-u/2;t.width=c;let f;if(t.look==="handDrawn"){const b=Fe.svg(s).rectangle(h,d,c,u,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:i});f=s.insert(()=>b,":first-child")}else f=o.insert("rect",":first-child"),f.attr("class","divider").attr("x",h).attr("y",d).attr("width",c).attr("height",u).attr("data-look",t.look);const p=f.node().getBBox();return t.height=p.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return No(t,m)},{cluster:s,labelBBox:{}}},"divider"),kee=z7,wee={rect:z7,squareRect:kee,roundedWithTitle:yee,noteGroup:bee,divider:vee,kanbanSection:xee},H7=new Map,q7=k(async(e,t)=>{const r=t.shape||"rect",n=await wee[r](e,t);return H7.set(t.id,n),n},"insertCluster"),Tee=k(()=>{H7=new Map},"clear");function j7(e,t){return e.intersect(t)}k(j7,"intersectNode");var Cee=j7;function U7(e,t,r,n){var i=e.x,a=e.y,s=i-n.x,o=a-n.y,l=Math.sqrt(t*t*o*o+r*r*s*s),c=Math.abs(t*r*s/l);n.x<i&&(c=-c);var u=Math.abs(t*r*o/l);return n.y<a&&(u=-u),{x:i+c,y:a+u}}k(U7,"intersectEllipse");var W7=U7;function G7(e,t,r){return W7(e,t,t,r)}k(G7,"intersectCircle");var See=G7;function Y7(e,t,r,n){{const i=t.y-e.y,a=e.x-t.x,s=t.x*e.y-e.x*t.y,o=i*r.x+a*r.y+s,l=i*n.x+a*n.y+s,c=1e-6;if(o!==0&&l!==0&&em(o,l))return;const u=n.y-r.y,h=r.x-n.x,d=n.x*r.y-r.x*n.y,f=u*e.x+h*e.y+d,p=u*t.x+h*t.y+d;if(Math.abs(f)<c&&Math.abs(p)<c&&em(f,p))return;const m=i*h-u*a;if(m===0)return;const b=Math.abs(m/2);let y=a*d-h*s;const v=y<0?(y-b)/m:(y+b)/m;y=u*s-i*d;const T=y<0?(y-b)/m:(y+b)/m;return{x:v,y:T}}}k(Y7,"intersectLine");function em(e,t){return e*t>0}k(em,"sameSign");var Eee=Y7;function V7(e,t,r){let n=e.x,i=e.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(u){s=Math.min(s,u.x),o=Math.min(o,u.y)}):(s=Math.min(s,t.x),o=Math.min(o,t.y));let l=n-e.width/2-s,c=i-e.height/2-o;for(let u=0;u<t.length;u++){let h=t[u],d=t[u<t.length-1?u+1:0],f=Eee(e,r,{x:l+h.x,y:c+h.y},{x:l+d.x,y:c+d.y});f&&a.push(f)}return a.length?(a.length>1&&a.sort(function(u,h){let d=u.x-r.x,f=u.y-r.y,p=Math.sqrt(d*d+f*f),m=h.x-r.x,b=h.y-r.y,y=Math.sqrt(m*m+b*b);return p<y?-1:p===y?0:1}),a[0]):e}k(V7,"intersectPolygon");var _ee=V7,Le={node:Cee,circle:See,ellipse:W7,polygon:_ee,rect:No};function X7(e,t){const{labelStyles:r}=Pe(t);t.labelStyle=r;const n=Je(t);let i=n;n||(i="anchor");const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),s=1,{cssStyles:o}=t,l=Fe.svg(a),c=ze(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const u=l.circle(0,0,s*2,c),h=a.insert(()=>u,":first-child");return h.attr("class","anchor").attr("style",Br(o)),He(t,h),t.intersect=function(d){return he.info("Circle intersect",t,s,d),Le.circle(t,s,d)},a}k(X7,"anchor");function tm(e,t,r,n,i,a,s){const l=(e+r)/2,c=(t+n)/2,u=Math.atan2(n-t,r-e),h=(r-e)/2,d=(n-t)/2,f=h/i,p=d/a,m=Math.sqrt(f**2+p**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const b=Math.sqrt(1-m**2),y=l+b*a*Math.sin(u)*(s?-1:1),v=c-b*i*Math.cos(u)*(s?-1:1),T=Math.atan2((t-v)/a,(e-y)/i);let E=Math.atan2((n-v)/a,(r-y)/i)-T;s&&E<0&&(E+=2*Math.PI),!s&&E>0&&(E-=2*Math.PI);const S=[];for(let I=0;I<20;I++){const D=I/19,H=T+D*E,R=y+i*Math.cos(H),F=v+a*Math.sin(H);S.push({x:R,y:F})}return S}k(tm,"generateArcPoints");async function K7(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a}=await it(e,t,Je(t)),s=a.width+t.padding+20,o=a.height+t.padding,l=o/2,c=l/(2.5+o/50),{cssStyles:u}=t,h=[{x:s/2,y:-o/2},{x:-s/2,y:-o/2},...tm(-s/2,-o/2,-s/2,o/2,c,l,!1),{x:s/2,y:o/2},...tm(s/2,o/2,s/2,-o/2,c,l,!0)],d=Fe.svg(i),f=ze(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const p=Tt(h),m=d.path(p,f),b=i.insert(()=>m,":first-child");return b.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",u),n&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",n),b.attr("transform",`translate(${c/2}, 0)`),He(t,b),t.intersect=function(y){return Le.polygon(t,h,y)},i}k(K7,"bowTieRect");function Sa(e,t,r,n){return e.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}k(Sa,"insertPolygonShape");async function Q7(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a}=await it(e,t,Je(t)),s=a.height+t.padding,o=12,l=a.width+t.padding+o,c=0,u=l,h=-s,d=0,f=[{x:c+o,y:h},{x:u,y:h},{x:u,y:d},{x:c,y:d},{x:c,y:h+o},{x:c+o,y:h}];let p;const{cssStyles:m}=t;if(t.look==="handDrawn"){const b=Fe.svg(i),y=ze(t,{}),v=Tt(f),T=b.path(v,y);p=i.insert(()=>T,":first-child").attr("transform",`translate(${-l/2}, ${s/2})`),m&&p.attr("style",m)}else p=Sa(i,l,s,f);return n&&p.attr("style",n),He(t,p),t.intersect=function(b){return Le.polygon(t,f,b)},i}k(Q7,"card");function Z7(e,t){const{nodeStyles:r}=Pe(t);t.label="";const n=e.insert("g").attr("class",Je(t)).attr("id",t.domId??t.id),{cssStyles:i}=t,a=Math.max(28,t.width??0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],o=Fe.svg(n),l=ze(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=Tt(s),u=o.path(c,l),h=n.insert(()=>u,":first-child");return i&&t.look!=="handDrawn"&&h.selectAll("path").attr("style",i),r&&t.look!=="handDrawn"&&h.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(d){return Le.polygon(t,s,d)},n}k(Z7,"choice");async function _g(e,t,r){const{labelStyles:n,nodeStyles:i}=Pe(t);t.labelStyle=n;const{shapeSvg:a,bbox:s,halfPadding:o}=await it(e,t,Je(t)),l=r?.padding??o,c=s.width/2+l;let u;const{cssStyles:h}=t;if(t.look==="handDrawn"){const d=Fe.svg(a),f=ze(t,{}),p=d.circle(0,0,c*2,f);u=a.insert(()=>p,":first-child"),u.attr("class","basic label-container").attr("style",Br(h))}else u=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0);return He(t,u),t.calcIntersect=function(d,f){const p=d.width/2;return Le.circle(d,p,f)},t.intersect=function(d){return he.info("Circle intersect",t,c,d),Le.circle(t,c,d)},a}k(_g,"circle");function J7(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),n=e*2,i={x:n/2*t,y:n/2*r},a={x:-(n/2)*t,y:n/2*r},s={x:-(n/2)*t,y:-(n/2)*r},o={x:n/2*t,y:-(n/2)*r};return`M ${a.x},${a.y} L ${o.x},${o.y}
|
|
572
|
+
M ${i.x},${i.y} L ${s.x},${s.y}`}k(J7,"createLine");function eC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r,t.label="";const i=e.insert("g").attr("class",Je(t)).attr("id",t.domId??t.id),a=Math.max(30,t?.width??0),{cssStyles:s}=t,o=Fe.svg(i),l=ze(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=o.circle(0,0,a*2,l),u=J7(a),h=o.path(u,l),d=i.insert(()=>c,":first-child");return d.insert(()=>h),s&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",s),n&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",n),He(t,d),t.intersect=function(f){return he.info("crossedCircle intersect",t,{radius:a,point:f}),Le.circle(t,a,f)},i}k(eC,"crossedCircle");function _i(e,t,r,n=100,i=0,a=180){const s=[],o=i*Math.PI/180,u=(a*Math.PI/180-o)/(n-1);for(let h=0;h<n;h++){const d=o+h*u,f=e+r*Math.cos(d),p=t+r*Math.sin(d);s.push({x:-f,y:-p})}return s}k(_i,"generateCirclePoints");async function tC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await it(e,t,Je(t)),o=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:u}=t,h=[..._i(o/2,-l/2,c,30,-90,0),{x:-o/2-c,y:c},..._i(o/2+c*2,-c,c,20,-180,-270),..._i(o/2+c*2,c,c,20,-90,-180),{x:-o/2-c,y:-l/2},..._i(o/2,l/2,c,20,0,90)],d=[{x:o/2,y:-l/2-c},{x:-o/2,y:-l/2-c},..._i(o/2,-l/2,c,20,-90,0),{x:-o/2-c,y:-c},..._i(o/2+o*.1,-c,c,20,-180,-270),..._i(o/2+o*.1,c,c,20,-90,-180),{x:-o/2-c,y:l/2},..._i(o/2,l/2,c,20,0,90),{x:-o/2,y:l/2+c},{x:o/2,y:l/2+c}],f=Fe.svg(i),p=ze(t,{fill:"none"});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const b=Tt(h).replace("Z",""),y=f.path(b,p),v=Tt(d),T=f.path(v,{...p}),A=i.insert("g",":first-child");return A.insert(()=>T,":first-child").attr("stroke-opacity",0),A.insert(()=>y,":first-child"),A.attr("class","text"),u&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",u),n&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",n),A.attr("transform",`translate(${c}, 0)`),s.attr("transform",`translate(${-o/2+c-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),He(t,A),t.intersect=function(E){return Le.polygon(t,d,E)},i}k(tC,"curlyBraceLeft");function Ai(e,t,r,n=100,i=0,a=180){const s=[],o=i*Math.PI/180,u=(a*Math.PI/180-o)/(n-1);for(let h=0;h<n;h++){const d=o+h*u,f=e+r*Math.cos(d),p=t+r*Math.sin(d);s.push({x:f,y:p})}return s}k(Ai,"generateCirclePoints");async function rC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await it(e,t,Je(t)),o=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:u}=t,h=[...Ai(o/2,-l/2,c,20,-90,0),{x:o/2+c,y:-c},...Ai(o/2+c*2,-c,c,20,-180,-270),...Ai(o/2+c*2,c,c,20,-90,-180),{x:o/2+c,y:l/2},...Ai(o/2,l/2,c,20,0,90)],d=[{x:-o/2,y:-l/2-c},{x:o/2,y:-l/2-c},...Ai(o/2,-l/2,c,20,-90,0),{x:o/2+c,y:-c},...Ai(o/2+c*2,-c,c,20,-180,-270),...Ai(o/2+c*2,c,c,20,-90,-180),{x:o/2+c,y:l/2},...Ai(o/2,l/2,c,20,0,90),{x:o/2,y:l/2+c},{x:-o/2,y:l/2+c}],f=Fe.svg(i),p=ze(t,{fill:"none"});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const b=Tt(h).replace("Z",""),y=f.path(b,p),v=Tt(d),T=f.path(v,{...p}),A=i.insert("g",":first-child");return A.insert(()=>T,":first-child").attr("stroke-opacity",0),A.insert(()=>y,":first-child"),A.attr("class","text"),u&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",u),n&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",n),A.attr("transform",`translate(${-c}, 0)`),s.attr("transform",`translate(${-o/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),He(t,A),t.intersect=function(E){return Le.polygon(t,d,E)},i}k(rC,"curlyBraceRight");function wr(e,t,r,n=100,i=0,a=180){const s=[],o=i*Math.PI/180,u=(a*Math.PI/180-o)/(n-1);for(let h=0;h<n;h++){const d=o+h*u,f=e+r*Math.cos(d),p=t+r*Math.sin(d);s.push({x:-f,y:-p})}return s}k(wr,"generateCirclePoints");async function nC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await it(e,t,Je(t)),o=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:u}=t,h=[...wr(o/2,-l/2,c,30,-90,0),{x:-o/2-c,y:c},...wr(o/2+c*2,-c,c,20,-180,-270),...wr(o/2+c*2,c,c,20,-90,-180),{x:-o/2-c,y:-l/2},...wr(o/2,l/2,c,20,0,90)],d=[...wr(-o/2+c+c/2,-l/2,c,20,-90,-180),{x:o/2-c/2,y:c},...wr(-o/2-c/2,-c,c,20,0,90),...wr(-o/2-c/2,c,c,20,-90,0),{x:o/2-c/2,y:-c},...wr(-o/2+c+c/2,l/2,c,30,-180,-270)],f=[{x:o/2,y:-l/2-c},{x:-o/2,y:-l/2-c},...wr(o/2,-l/2,c,20,-90,0),{x:-o/2-c,y:-c},...wr(o/2+c*2,-c,c,20,-180,-270),...wr(o/2+c*2,c,c,20,-90,-180),{x:-o/2-c,y:l/2},...wr(o/2,l/2,c,20,0,90),{x:-o/2,y:l/2+c},{x:o/2-c-c/2,y:l/2+c},...wr(-o/2+c+c/2,-l/2,c,20,-90,-180),{x:o/2-c/2,y:c},...wr(-o/2-c/2,-c,c,20,0,90),...wr(-o/2-c/2,c,c,20,-90,0),{x:o/2-c/2,y:-c},...wr(-o/2+c+c/2,l/2,c,30,-180,-270)],p=Fe.svg(i),m=ze(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=Tt(h).replace("Z",""),v=p.path(y,m),A=Tt(d).replace("Z",""),E=p.path(A,m),S=Tt(f),I=p.path(S,{...m}),D=i.insert("g",":first-child");return D.insert(()=>I,":first-child").attr("stroke-opacity",0),D.insert(()=>v,":first-child"),D.insert(()=>E,":first-child"),D.attr("class","text"),u&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",u),n&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",n),D.attr("transform",`translate(${c-c/4}, 0)`),s.attr("transform",`translate(${-o/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),He(t,D),t.intersect=function(H){return Le.polygon(t,f,H)},i}k(nC,"curlyBraces");async function iC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a}=await it(e,t,Je(t)),s=80,o=20,l=Math.max(s,(a.width+(t.padding??0)*2)*1.25,t?.width??0),c=Math.max(o,a.height+(t.padding??0)*2,t?.height??0),u=c/2,{cssStyles:h}=t,d=Fe.svg(i),f=ze(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const p=l,m=c,b=p-u,y=m/4,v=[{x:b,y:0},{x:y,y:0},{x:0,y:m/2},{x:y,y:m},{x:b,y:m},...ac(-b,-m/2,u,50,270,90)],T=Tt(v),A=d.path(T,f),E=i.insert(()=>A,":first-child");return E.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&E.selectChildren("path").attr("style",h),n&&t.look!=="handDrawn"&&E.selectChildren("path").attr("style",n),E.attr("transform",`translate(${-l/2}, ${-c/2})`),He(t,E),t.intersect=function(S){return Le.polygon(t,v,S)},i}k(iC,"curvedTrapezoid");var Aee=k((e,t,r,n,i,a)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createCylinderPathD"),Nee=k((e,t,r,n,i,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createOuterCylinderPathD"),Lee=k((e,t,r,n,i,a)=>[`M${e-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function aC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await it(e,t,Je(t)),o=Math.max(a.width+t.padding,t.width??0),l=o/2,c=l/(2.5+o/50),u=Math.max(a.height+c+t.padding,t.height??0);let h;const{cssStyles:d}=t;if(t.look==="handDrawn"){const f=Fe.svg(i),p=Nee(0,0,o,u,l,c),m=Lee(0,c,o,u,l,c),b=f.path(p,ze(t,{})),y=f.path(m,ze(t,{fill:"none"}));h=i.insert(()=>y,":first-child"),h=i.insert(()=>b,":first-child"),h.attr("class","basic label-container"),d&&h.attr("style",d)}else{const f=Aee(0,0,o,u,l,c);h=i.insert("path",":first-child").attr("d",f).attr("class","basic label-container").attr("style",Br(d)).attr("style",n)}return h.attr("label-offset-y",c),h.attr("transform",`translate(${-o/2}, ${-(u/2+c)})`),He(t,h),s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+(t.padding??0)/1.5-(a.y-(a.top??0))})`),t.intersect=function(f){const p=Le.rect(t,f),m=p.x-(t.x??0);if(l!=0&&(Math.abs(m)<(t.width??0)/2||Math.abs(m)==(t.width??0)/2&&Math.abs(p.y-(t.y??0))>(t.height??0)/2-c)){let b=c*c*(1-m*m/(l*l));b>0&&(b=Math.sqrt(b)),b=c-b,f.y-(t.y??0)>0&&(b=-b),p.y+=b}return p},i}k(aC,"cylinder");async function sC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await it(e,t,Je(t)),o=a.width+t.padding,l=a.height+t.padding,c=l*.2,u=-o/2,h=-l/2-c/2,{cssStyles:d}=t,f=Fe.svg(i),p=ze(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const m=[{x:u,y:h+c},{x:-u,y:h+c},{x:-u,y:-h},{x:u,y:-h},{x:u,y:h},{x:-u,y:h},{x:-u,y:h+c}],b=f.polygon(m.map(v=>[v.x,v.y]),p),y=i.insert(()=>b,":first-child");return y.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",d),n&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",n),s.attr("transform",`translate(${u+(t.padding??0)/2-(a.x-(a.left??0))}, ${h+c+(t.padding??0)/2-(a.y-(a.top??0))})`),He(t,y),t.intersect=function(v){return Le.rect(t,v)},i}k(sC,"dividedRectangle");async function oC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a,halfPadding:s}=await it(e,t,Je(t)),l=a.width/2+s+5,c=a.width/2+s;let u;const{cssStyles:h}=t;if(t.look==="handDrawn"){const d=Fe.svg(i),f=ze(t,{roughness:.2,strokeWidth:2.5}),p=ze(t,{roughness:.2,strokeWidth:1.5}),m=d.circle(0,0,l*2,f),b=d.circle(0,0,c*2,p);u=i.insert("g",":first-child"),u.attr("class",Br(t.cssClasses)).attr("style",Br(h)),u.node()?.appendChild(m),u.node()?.appendChild(b)}else{u=i.insert("g",":first-child");const d=u.insert("circle",":first-child"),f=u.insert("circle");u.attr("class","basic label-container").attr("style",n),d.attr("class","outer-circle").attr("style",n).attr("r",l).attr("cx",0).attr("cy",0),f.attr("class","inner-circle").attr("style",n).attr("r",c).attr("cx",0).attr("cy",0)}return He(t,u),t.intersect=function(d){return he.info("DoubleCircle intersect",t,l,d),Le.circle(t,l,d)},i}k(oC,"doublecircle");function lC(e,t,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:i}=Pe(t);t.label="",t.labelStyle=n;const a=e.insert("g").attr("class",Je(t)).attr("id",t.domId??t.id),s=7,{cssStyles:o}=t,l=Fe.svg(a),{nodeBorder:c}=r,u=ze(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(u.roughness=0);const h=l.circle(0,0,s*2,u),d=a.insert(()=>h,":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),He(t,d),t.intersect=function(f){return he.info("filledCircle intersect",t,{radius:s,point:f}),Le.circle(t,s,f)},a}k(lC,"filledCircle");async function cC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await it(e,t,Je(t)),o=a.width+(t.padding??0),l=o+a.height,c=o+a.height,u=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],{cssStyles:h}=t,d=Fe.svg(i),f=ze(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const p=Tt(u),m=d.path(p,f),b=i.insert(()=>m,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return h&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",h),n&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",n),t.width=o,t.height=l,He(t,b),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-l/2+(t.padding??0)/2+(a.y-(a.top??0))})`),t.intersect=function(y){return he.info("Triangle intersect",t,u,y),Le.polygon(t,u,y)},i}k(cC,"flippedTriangle");function uC(e,t,{dir:r,config:{state:n,themeVariables:i}}){const{nodeStyles:a}=Pe(t);t.label="";const s=e.insert("g").attr("class",Je(t)).attr("id",t.domId??t.id),{cssStyles:o}=t;let l=Math.max(70,t?.width??0),c=Math.max(10,t?.height??0);r==="LR"&&(l=Math.max(10,t?.width??0),c=Math.max(70,t?.height??0));const u=-1*l/2,h=-1*c/2,d=Fe.svg(s),f=ze(t,{stroke:i.lineColor,fill:i.lineColor});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const p=d.rectangle(u,h,l,c,f),m=s.insert(()=>p,":first-child");o&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",o),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),He(t,m);const b=n?.padding??0;return t.width&&t.height&&(t.width+=b/2||0,t.height+=b/2||0),t.intersect=function(y){return Le.rect(t,y)},s}k(uC,"forkJoin");async function hC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const i=80,a=50,{shapeSvg:s,bbox:o}=await it(e,t,Je(t)),l=Math.max(i,o.width+(t.padding??0)*2,t?.width??0),c=Math.max(a,o.height+(t.padding??0)*2,t?.height??0),u=c/2,{cssStyles:h}=t,d=Fe.svg(s),f=ze(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const p=[{x:-l/2,y:-c/2},{x:l/2-u,y:-c/2},...ac(-l/2+u,0,u,50,90,270),{x:l/2-u,y:c/2},{x:-l/2,y:c/2}],m=Tt(p),b=d.path(m,f),y=s.insert(()=>b,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),n&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",n),He(t,y),t.intersect=function(v){return he.info("Pill intersect",t,{radius:u,point:v}),Le.polygon(t,p,v)},s}k(hC,"halfRoundedRectangle");async function dC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a}=await it(e,t,Je(t)),s=a.height+(t.padding??0),o=a.width+(t.padding??0)*2.5,{cssStyles:l}=t,c=Fe.svg(i),u=ze(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let h=o/2;const d=h/6;h=h+d;const f=s/2,p=f/2,m=h-p,b=[{x:-m,y:-f},{x:0,y:-f},{x:m,y:-f},{x:h,y:0},{x:m,y:f},{x:0,y:f},{x:-m,y:f},{x:-h,y:0}],y=Tt(b),v=c.path(y,u),T=i.insert(()=>v,":first-child");return T.attr("class","basic label-container"),l&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",l),n&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",n),t.width=o,t.height=s,He(t,T),t.intersect=function(A){return Le.polygon(t,b,A)},i}k(dC,"hexagon");async function fC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.label="",t.labelStyle=r;const{shapeSvg:i}=await it(e,t,Je(t)),a=Math.max(30,t?.width??0),s=Math.max(30,t?.height??0),{cssStyles:o}=t,l=Fe.svg(i),c=ze(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const u=[{x:0,y:0},{x:a,y:0},{x:0,y:s},{x:a,y:s}],h=Tt(u),d=l.path(h,c),f=i.insert(()=>d,":first-child");return f.attr("class","basic label-container"),o&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",o),n&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",n),f.attr("transform",`translate(${-a/2}, ${-s/2})`),He(t,f),t.intersect=function(p){return he.info("Pill intersect",t,{points:u}),Le.polygon(t,u,p)},i}k(fC,"hourglass");async function pC(e,t,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=Pe(t);t.labelStyle=i;const a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=n?.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:u,label:h}=await it(e,t,"icon-shape default"),d=t.pos==="t",f=o,p=o,{nodeBorder:m}=r,{stylesMap:b}=So(t),y=-p/2,v=-f/2,T=t.label?8:0,A=Fe.svg(c),E=ze(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const S=A.rectangle(y,v,p,f,E),I=Math.max(p,u.width),D=f+u.height+T,H=A.rectangle(-I/2,-D/2,I,D,{...E,fill:"transparent",stroke:"none"}),R=c.insert(()=>S,":first-child"),F=c.insert(()=>H);if(t.icon){const G=c.append("g");G.html(`<g>${await Ao(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const ee=G.node().getBBox(),$=ee.width,q=ee.height,W=ee.x,Z=ee.y;G.attr("transform",`translate(${-$/2-W},${d?u.height/2+T/2-q/2-Z:-u.height/2-T/2-q/2-Z})`),G.attr("style",`color: ${b.get("stroke")??m};`)}return h.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${d?-D/2:D/2-u.height})`),R.attr("transform",`translate(0,${d?u.height/2+T/2:-u.height/2-T/2})`),He(t,F),t.intersect=function(G){if(he.info("iconSquare intersect",t,G),!t.label)return Le.rect(t,G);const ee=t.x??0,$=t.y??0,q=t.height??0;let W=[];return d?W=[{x:ee-u.width/2,y:$-q/2},{x:ee+u.width/2,y:$-q/2},{x:ee+u.width/2,y:$-q/2+u.height+T},{x:ee+p/2,y:$-q/2+u.height+T},{x:ee+p/2,y:$+q/2},{x:ee-p/2,y:$+q/2},{x:ee-p/2,y:$-q/2+u.height+T},{x:ee-u.width/2,y:$-q/2+u.height+T}]:W=[{x:ee-p/2,y:$-q/2},{x:ee+p/2,y:$-q/2},{x:ee+p/2,y:$-q/2+f},{x:ee+u.width/2,y:$-q/2+f},{x:ee+u.width/2/2,y:$+q/2},{x:ee-u.width/2,y:$+q/2},{x:ee-u.width/2,y:$-q/2+f},{x:ee-p/2,y:$-q/2+f}],Le.polygon(t,W,G)},c}k(pC,"icon");async function mC(e,t,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=Pe(t);t.labelStyle=i;const a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=n?.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:u,label:h}=await it(e,t,"icon-shape default"),d=20,f=t.label?8:0,p=t.pos==="t",{nodeBorder:m,mainBkg:b}=r,{stylesMap:y}=So(t),v=Fe.svg(c),T=ze(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const A=y.get("fill");T.stroke=A??b;const E=c.append("g");t.icon&&E.html(`<g>${await Ao(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const S=E.node().getBBox(),I=S.width,D=S.height,H=S.x,R=S.y,F=Math.max(I,D)*Math.SQRT2+d*2,G=v.circle(0,0,F,T),ee=Math.max(F,u.width),$=F+u.height+f,q=v.rectangle(-ee/2,-$/2,ee,$,{...T,fill:"transparent",stroke:"none"}),W=c.insert(()=>G,":first-child"),Z=c.insert(()=>q);return E.attr("transform",`translate(${-I/2-H},${p?u.height/2+f/2-D/2-R:-u.height/2-f/2-D/2-R})`),E.attr("style",`color: ${y.get("stroke")??m};`),h.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${p?-$/2:$/2-u.height})`),W.attr("transform",`translate(0,${p?u.height/2+f/2:-u.height/2-f/2})`),He(t,Z),t.intersect=function(V){return he.info("iconSquare intersect",t,V),Le.rect(t,V)},c}k(mC,"iconCircle");async function gC(e,t,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=Pe(t);t.labelStyle=i;const a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=n?.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:u,halfPadding:h,label:d}=await it(e,t,"icon-shape default"),f=t.pos==="t",p=o+h*2,m=o+h*2,{nodeBorder:b,mainBkg:y}=r,{stylesMap:v}=So(t),T=-m/2,A=-p/2,E=t.label?8:0,S=Fe.svg(c),I=ze(t,{});t.look!=="handDrawn"&&(I.roughness=0,I.fillStyle="solid");const D=v.get("fill");I.stroke=D??y;const H=S.path(Ca(T,A,m,p,5),I),R=Math.max(m,u.width),F=p+u.height+E,G=S.rectangle(-R/2,-F/2,R,F,{...I,fill:"transparent",stroke:"none"}),ee=c.insert(()=>H,":first-child").attr("class","icon-shape2"),$=c.insert(()=>G);if(t.icon){const q=c.append("g");q.html(`<g>${await Ao(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const W=q.node().getBBox(),Z=W.width,V=W.height,ve=W.x,L=W.y;q.attr("transform",`translate(${-Z/2-ve},${f?u.height/2+E/2-V/2-L:-u.height/2-E/2-V/2-L})`),q.attr("style",`color: ${v.get("stroke")??b};`)}return d.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${f?-F/2:F/2-u.height})`),ee.attr("transform",`translate(0,${f?u.height/2+E/2:-u.height/2-E/2})`),He(t,$),t.intersect=function(q){if(he.info("iconSquare intersect",t,q),!t.label)return Le.rect(t,q);const W=t.x??0,Z=t.y??0,V=t.height??0;let ve=[];return f?ve=[{x:W-u.width/2,y:Z-V/2},{x:W+u.width/2,y:Z-V/2},{x:W+u.width/2,y:Z-V/2+u.height+E},{x:W+m/2,y:Z-V/2+u.height+E},{x:W+m/2,y:Z+V/2},{x:W-m/2,y:Z+V/2},{x:W-m/2,y:Z-V/2+u.height+E},{x:W-u.width/2,y:Z-V/2+u.height+E}]:ve=[{x:W-m/2,y:Z-V/2},{x:W+m/2,y:Z-V/2},{x:W+m/2,y:Z-V/2+p},{x:W+u.width/2,y:Z-V/2+p},{x:W+u.width/2/2,y:Z+V/2},{x:W-u.width/2,y:Z+V/2},{x:W-u.width/2,y:Z-V/2+p},{x:W-m/2,y:Z-V/2+p}],Le.polygon(t,ve,q)},c}k(gC,"iconRounded");async function bC(e,t,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=Pe(t);t.labelStyle=i;const a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=n?.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:u,halfPadding:h,label:d}=await it(e,t,"icon-shape default"),f=t.pos==="t",p=o+h*2,m=o+h*2,{nodeBorder:b,mainBkg:y}=r,{stylesMap:v}=So(t),T=-m/2,A=-p/2,E=t.label?8:0,S=Fe.svg(c),I=ze(t,{});t.look!=="handDrawn"&&(I.roughness=0,I.fillStyle="solid");const D=v.get("fill");I.stroke=D??y;const H=S.path(Ca(T,A,m,p,.1),I),R=Math.max(m,u.width),F=p+u.height+E,G=S.rectangle(-R/2,-F/2,R,F,{...I,fill:"transparent",stroke:"none"}),ee=c.insert(()=>H,":first-child"),$=c.insert(()=>G);if(t.icon){const q=c.append("g");q.html(`<g>${await Ao(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const W=q.node().getBBox(),Z=W.width,V=W.height,ve=W.x,L=W.y;q.attr("transform",`translate(${-Z/2-ve},${f?u.height/2+E/2-V/2-L:-u.height/2-E/2-V/2-L})`),q.attr("style",`color: ${v.get("stroke")??b};`)}return d.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${f?-F/2:F/2-u.height})`),ee.attr("transform",`translate(0,${f?u.height/2+E/2:-u.height/2-E/2})`),He(t,$),t.intersect=function(q){if(he.info("iconSquare intersect",t,q),!t.label)return Le.rect(t,q);const W=t.x??0,Z=t.y??0,V=t.height??0;let ve=[];return f?ve=[{x:W-u.width/2,y:Z-V/2},{x:W+u.width/2,y:Z-V/2},{x:W+u.width/2,y:Z-V/2+u.height+E},{x:W+m/2,y:Z-V/2+u.height+E},{x:W+m/2,y:Z+V/2},{x:W-m/2,y:Z+V/2},{x:W-m/2,y:Z-V/2+u.height+E},{x:W-u.width/2,y:Z-V/2+u.height+E}]:ve=[{x:W-m/2,y:Z-V/2},{x:W+m/2,y:Z-V/2},{x:W+m/2,y:Z-V/2+p},{x:W+u.width/2,y:Z-V/2+p},{x:W+u.width/2/2,y:Z+V/2},{x:W-u.width/2,y:Z+V/2},{x:W-u.width/2,y:Z-V/2+p},{x:W-m/2,y:Z-V/2+p}],Le.polygon(t,ve,q)},c}k(bC,"iconSquare");async function yC(e,t,{config:{flowchart:r}}){const n=new Image;n.src=t?.img??"",await n.decode();const i=Number(n.naturalWidth.toString().replace("px","")),a=Number(n.naturalHeight.toString().replace("px",""));t.imageAspectRatio=i/a;const{labelStyles:s}=Pe(t);t.labelStyle=s;const o=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;const l=Math.max(t.label?o??0:0,t?.assetWidth??i),c=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,u=t.constraint==="on"?c/t.imageAspectRatio:t?.assetHeight??a;t.width=Math.max(c,o??0);const{shapeSvg:h,bbox:d,label:f}=await it(e,t,"image-shape default"),p=t.pos==="t",m=-c/2,b=-u/2,y=t.label?8:0,v=Fe.svg(h),T=ze(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const A=v.rectangle(m,b,c,u,T),E=Math.max(c,d.width),S=u+d.height+y,I=v.rectangle(-E/2,-S/2,E,S,{...T,fill:"none",stroke:"none"}),D=h.insert(()=>A,":first-child"),H=h.insert(()=>I);if(t.img){const R=h.append("image");R.attr("href",t.img),R.attr("width",c),R.attr("height",u),R.attr("preserveAspectRatio","none"),R.attr("transform",`translate(${-c/2},${p?S/2-u:-S/2})`)}return f.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${p?-u/2-d.height/2-y/2:u/2-d.height/2+y/2})`),D.attr("transform",`translate(0,${p?d.height/2+y/2:-d.height/2-y/2})`),He(t,H),t.intersect=function(R){if(he.info("iconSquare intersect",t,R),!t.label)return Le.rect(t,R);const F=t.x??0,G=t.y??0,ee=t.height??0;let $=[];return p?$=[{x:F-d.width/2,y:G-ee/2},{x:F+d.width/2,y:G-ee/2},{x:F+d.width/2,y:G-ee/2+d.height+y},{x:F+c/2,y:G-ee/2+d.height+y},{x:F+c/2,y:G+ee/2},{x:F-c/2,y:G+ee/2},{x:F-c/2,y:G-ee/2+d.height+y},{x:F-d.width/2,y:G-ee/2+d.height+y}]:$=[{x:F-c/2,y:G-ee/2},{x:F+c/2,y:G-ee/2},{x:F+c/2,y:G-ee/2+u},{x:F+d.width/2,y:G-ee/2+u},{x:F+d.width/2/2,y:G+ee/2},{x:F-d.width/2,y:G+ee/2},{x:F-d.width/2,y:G-ee/2+u},{x:F-c/2,y:G-ee/2+u}],Le.polygon(t,$,R)},h}k(yC,"imageSquare");async function xC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a}=await it(e,t,Je(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),o=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=[{x:0,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:-3*o/6,y:-o}];let c;const{cssStyles:u}=t;if(t.look==="handDrawn"){const h=Fe.svg(i),d=ze(t,{}),f=Tt(l),p=h.path(f,d);c=i.insert(()=>p,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),u&&c.attr("style",u)}else c=Sa(i,s,o,l);return n&&c.attr("style",n),t.width=s,t.height=o,He(t,c),t.intersect=function(h){return Le.polygon(t,l,h)},i}k(xC,"inv_trapezoid");async function Gh(e,t,r){const{labelStyles:n,nodeStyles:i}=Pe(t);t.labelStyle=n;const{shapeSvg:a,bbox:s}=await it(e,t,Je(t)),o=Math.max(s.width+r.labelPaddingX*2,t?.width||0),l=Math.max(s.height+r.labelPaddingY*2,t?.height||0),c=-o/2,u=-l/2;let h,{rx:d,ry:f}=t;const{cssStyles:p}=t;if(r?.rx&&r.ry&&(d=r.rx,f=r.ry),t.look==="handDrawn"){const m=Fe.svg(a),b=ze(t,{}),y=d||f?m.path(Ca(c,u,o,l,d||0),b):m.rectangle(c,u,o,l,b);h=a.insert(()=>y,":first-child"),h.attr("class","basic label-container").attr("style",Br(p))}else h=a.insert("rect",":first-child"),h.attr("class","basic label-container").attr("style",i).attr("rx",Br(d)).attr("ry",Br(f)).attr("x",c).attr("y",u).attr("width",o).attr("height",l);return He(t,h),t.calcIntersect=function(m,b){return Le.rect(m,b)},t.intersect=function(m){return Le.rect(t,m)},a}k(Gh,"drawRect");async function vC(e,t){const{shapeSvg:r,bbox:n,label:i}=await it(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),i.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),He(t,a),t.intersect=function(l){return Le.rect(t,l)},r}k(vC,"labelRect");async function kC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a}=await it(e,t,Je(t)),s=Math.max(a.width+(t.padding??0),t?.width??0),o=Math.max(a.height+(t.padding??0),t?.height??0),l=[{x:0,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:-(3*o)/6,y:-o}];let c;const{cssStyles:u}=t;if(t.look==="handDrawn"){const h=Fe.svg(i),d=ze(t,{}),f=Tt(l),p=h.path(f,d);c=i.insert(()=>p,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),u&&c.attr("style",u)}else c=Sa(i,s,o,l);return n&&c.attr("style",n),t.width=s,t.height=o,He(t,c),t.intersect=function(h){return Le.polygon(t,l,h)},i}k(kC,"lean_left");async function wC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a}=await it(e,t,Je(t)),s=Math.max(a.width+(t.padding??0),t?.width??0),o=Math.max(a.height+(t.padding??0),t?.height??0),l=[{x:-3*o/6,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:0,y:-o}];let c;const{cssStyles:u}=t;if(t.look==="handDrawn"){const h=Fe.svg(i),d=ze(t,{}),f=Tt(l),p=h.path(f,d);c=i.insert(()=>p,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),u&&c.attr("style",u)}else c=Sa(i,s,o,l);return n&&c.attr("style",n),t.width=s,t.height=o,He(t,c),t.intersect=function(h){return Le.polygon(t,l,h)},i}k(wC,"lean_right");function TC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.label="",t.labelStyle=r;const i=e.insert("g").attr("class",Je(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,s=Math.max(35,t?.width??0),o=Math.max(35,t?.height??0),l=7,c=[{x:s,y:0},{x:0,y:o+l/2},{x:s-2*l,y:o+l/2},{x:0,y:2*o},{x:s,y:o-l/2},{x:2*l,y:o-l/2}],u=Fe.svg(i),h=ze(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const d=Tt(c),f=u.path(d,h),p=i.insert(()=>f,":first-child");return a&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",a),n&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",n),p.attr("transform",`translate(-${s/2},${-o})`),He(t,p),t.intersect=function(m){return he.info("lightningBolt intersect",t,m),Le.polygon(t,c,m)},i}k(TC,"lightningBolt");var Mee=k((e,t,r,n,i,a,s)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`,`M${e},${t+a+s}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),Iee=k((e,t,r,n,i,a,s)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`,`M${e},${t+a+s}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),Ree=k((e,t,r,n,i,a)=>[`M${e-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function CC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await it(e,t,Je(t)),o=Math.max(a.width+(t.padding??0),t.width??0),l=o/2,c=l/(2.5+o/50),u=Math.max(a.height+c+(t.padding??0),t.height??0),h=u*.1;let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const p=Fe.svg(i),m=Iee(0,0,o,u,l,c,h),b=Ree(0,c,o,u,l,c),y=ze(t,{}),v=p.path(m,y),T=p.path(b,y);i.insert(()=>T,":first-child").attr("class","line"),d=i.insert(()=>v,":first-child"),d.attr("class","basic label-container"),f&&d.attr("style",f)}else{const p=Mee(0,0,o,u,l,c,h);d=i.insert("path",":first-child").attr("d",p).attr("class","basic label-container").attr("style",Br(f)).attr("style",n)}return d.attr("label-offset-y",c),d.attr("transform",`translate(${-o/2}, ${-(u/2+c)})`),He(t,d),s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+c-(a.y-(a.top??0))})`),t.intersect=function(p){const m=Le.rect(t,p),b=m.x-(t.x??0);if(l!=0&&(Math.abs(b)<(t.width??0)/2||Math.abs(b)==(t.width??0)/2&&Math.abs(m.y-(t.y??0))>(t.height??0)/2-c)){let y=c*c*(1-b*b/(l*l));y>0&&(y=Math.sqrt(y)),y=c-y,p.y-(t.y??0)>0&&(y=-y),m.y+=y}return m},i}k(CC,"linedCylinder");async function SC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await it(e,t,Je(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/4,u=l+c,{cssStyles:h}=t,d=Fe.svg(i),f=ze(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const p=[{x:-o/2-o/2*.1,y:-u/2},{x:-o/2-o/2*.1,y:u/2},...xa(-o/2-o/2*.1,u/2,o/2+o/2*.1,u/2,c,.8),{x:o/2+o/2*.1,y:-u/2},{x:-o/2-o/2*.1,y:-u/2},{x:-o/2,y:-u/2},{x:-o/2,y:u/2*1.1},{x:-o/2,y:-u/2}],m=d.polygon(p.map(y=>[y.x,y.y]),f),b=i.insert(()=>m,":first-child");return b.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",h),n&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",n),b.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-o/2+(t.padding??0)+o/2*.1/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c/2-(a.y-(a.top??0))})`),He(t,b),t.intersect=function(y){return Le.polygon(t,p,y)},i}k(SC,"linedWaveEdgedRect");async function EC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await it(e,t,Je(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=5,u=-o/2,h=-l/2,{cssStyles:d}=t,f=Fe.svg(i),p=ze(t,{}),m=[{x:u-c,y:h+c},{x:u-c,y:h+l+c},{x:u+o-c,y:h+l+c},{x:u+o-c,y:h+l},{x:u+o,y:h+l},{x:u+o,y:h+l-c},{x:u+o+c,y:h+l-c},{x:u+o+c,y:h-c},{x:u+c,y:h-c},{x:u+c,y:h},{x:u,y:h},{x:u,y:h+c}],b=[{x:u,y:h+c},{x:u+o-c,y:h+c},{x:u+o-c,y:h+l},{x:u+o,y:h+l},{x:u+o,y:h},{x:u,y:h}];t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const y=Tt(m),v=f.path(y,p),T=Tt(b),A=f.path(T,{...p,fill:"none"}),E=i.insert(()=>A,":first-child");return E.insert(()=>v,":first-child"),E.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",d),n&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",n),s.attr("transform",`translate(${-(a.width/2)-c-(a.x-(a.left??0))}, ${-(a.height/2)+c-(a.y-(a.top??0))})`),He(t,E),t.intersect=function(S){return Le.polygon(t,m,S)},i}k(EC,"multiRect");async function _C(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await it(e,t,Je(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/4,u=l+c,h=-o/2,d=-u/2,f=5,{cssStyles:p}=t,m=xa(h-f,d+u+f,h+o-f,d+u+f,c,.8),b=m?.[m.length-1],y=[{x:h-f,y:d+f},{x:h-f,y:d+u+f},...m,{x:h+o-f,y:b.y-f},{x:h+o,y:b.y-f},{x:h+o,y:b.y-2*f},{x:h+o+f,y:b.y-2*f},{x:h+o+f,y:d-f},{x:h+f,y:d-f},{x:h+f,y:d},{x:h,y:d},{x:h,y:d+f}],v=[{x:h,y:d+f},{x:h+o-f,y:d+f},{x:h+o-f,y:b.y-f},{x:h+o,y:b.y-f},{x:h+o,y:d},{x:h,y:d}],T=Fe.svg(i),A=ze(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const E=Tt(y),S=T.path(E,A),I=Tt(v),D=T.path(I,A),H=i.insert(()=>S,":first-child");return H.insert(()=>D),H.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&H.selectAll("path").attr("style",p),n&&t.look!=="handDrawn"&&H.selectAll("path").attr("style",n),H.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-(a.width/2)-f-(a.x-(a.left??0))}, ${-(a.height/2)+f-c/2-(a.y-(a.top??0))})`),He(t,H),t.intersect=function(R){return Le.polygon(t,y,R)},i}k(_C,"multiWaveEdgedRectangle");async function AC(e,t,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:i}=Pe(t);t.labelStyle=n,t.useHtmlLabels||Cr().flowchart?.htmlLabels!==!1||(t.centerLabel=!0);const{shapeSvg:s,bbox:o,label:l}=await it(e,t,Je(t)),c=Math.max(o.width+(t.padding??0)*2,t?.width??0),u=Math.max(o.height+(t.padding??0)*2,t?.height??0),h=-c/2,d=-u/2,{cssStyles:f}=t,p=Fe.svg(s),m=ze(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=p.rectangle(h,d,c,u,m),y=s.insert(()=>b,":first-child");return y.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),He(t,y),t.intersect=function(v){return Le.rect(t,v)},s}k(AC,"note");var Bee=k((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function NC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a}=await it(e,t,Je(t)),s=a.width+t.padding,o=a.height+t.padding,l=s+o,c=.5,u=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let h;const{cssStyles:d}=t;if(t.look==="handDrawn"){const f=Fe.svg(i),p=ze(t,{}),m=Bee(0,0,l),b=f.path(m,p);h=i.insert(()=>b,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),d&&h.attr("style",d)}else h=Sa(i,l,l,u),h.attr("transform",`translate(${-l/2+c}, ${l/2})`);return n&&h.attr("style",n),He(t,h),t.calcIntersect=function(f,p){const m=f.width,b=[{x:m/2,y:0},{x:m,y:-m/2},{x:m/2,y:-m},{x:0,y:-m/2}],y=Le.polygon(f,b,p);return{x:y.x-.5,y:y.y-.5}},t.intersect=function(f){return this.calcIntersect(t,f)},i}k(NC,"question");async function LC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await it(e,t,Je(t)),o=Math.max(a.width+(t.padding??0),t?.width??0),l=Math.max(a.height+(t.padding??0),t?.height??0),c=-o/2,u=-l/2,h=u/2,d=[{x:c+h,y:u},{x:c,y:0},{x:c+h,y:-u},{x:-c,y:-u},{x:-c,y:u}],{cssStyles:f}=t,p=Fe.svg(i),m=ze(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=Tt(d),y=p.path(b,m),v=i.insert(()=>y,":first-child");return v.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",f),n&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",n),v.attr("transform",`translate(${-h/2},0)`),s.attr("transform",`translate(${-h/2-a.width/2-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),He(t,v),t.intersect=function(T){return Le.polygon(t,d,T)},i}k(LC,"rect_left_inv_arrow");async function MC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;let i;t.cssClasses?i="node "+t.cssClasses:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),s=a.insert("g"),o=a.insert("g").attr("class","label").attr("style",n),l=t.description,c=t.label,u=o.node().appendChild(await ja(c,t.labelStyle,!0,!0));let h={width:0,height:0};if(sr(Mt()?.flowchart?.htmlLabels)){const D=u.children[0],H=Ct(u);h=D.getBoundingClientRect(),H.attr("width",h.width),H.attr("height",h.height)}he.info("Text 2",l);const d=l||[],f=u.getBBox(),p=o.node().appendChild(await ja(d.join?d.join("<br/>"):d,t.labelStyle,!0,!0)),m=p.children[0],b=Ct(p);h=m.getBoundingClientRect(),b.attr("width",h.width),b.attr("height",h.height);const y=(t.padding||0)/2;Ct(p).attr("transform","translate( "+(h.width>f.width?0:(f.width-h.width)/2)+", "+(f.height+y+5)+")"),Ct(u).attr("transform","translate( "+(h.width<f.width?0:-(f.width-h.width)/2)+", 0)"),h=o.node().getBBox(),o.attr("transform","translate("+-h.width/2+", "+(-h.height/2-y+3)+")");const v=h.width+(t.padding||0),T=h.height+(t.padding||0),A=-h.width/2-y,E=-h.height/2-y;let S,I;if(t.look==="handDrawn"){const D=Fe.svg(a),H=ze(t,{}),R=D.path(Ca(A,E,v,T,t.rx||0),H),F=D.line(-h.width/2-y,-h.height/2-y+f.height+y,h.width/2+y,-h.height/2-y+f.height+y,H);I=a.insert(()=>(he.debug("Rough node insert CXC",R),F),":first-child"),S=a.insert(()=>(he.debug("Rough node insert CXC",R),R),":first-child")}else S=s.insert("rect",":first-child"),I=s.insert("line"),S.attr("class","outer title-state").attr("style",n).attr("x",-h.width/2-y).attr("y",-h.height/2-y).attr("width",h.width+(t.padding||0)).attr("height",h.height+(t.padding||0)),I.attr("class","divider").attr("x1",-h.width/2-y).attr("x2",h.width/2+y).attr("y1",-h.height/2-y+f.height+y).attr("y2",-h.height/2-y+f.height+y);return He(t,S),t.intersect=function(D){return Le.rect(t,D)},a}k(MC,"rectWithTitle");function fl(e,t,r,n,i,a,s){const l=(e+r)/2,c=(t+n)/2,u=Math.atan2(n-t,r-e),h=(r-e)/2,d=(n-t)/2,f=h/i,p=d/a,m=Math.sqrt(f**2+p**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const b=Math.sqrt(1-m**2),y=l+b*a*Math.sin(u)*(s?-1:1),v=c-b*i*Math.cos(u)*(s?-1:1),T=Math.atan2((t-v)/a,(e-y)/i);let E=Math.atan2((n-v)/a,(r-y)/i)-T;s&&E<0&&(E+=2*Math.PI),!s&&E>0&&(E-=2*Math.PI);const S=[];for(let I=0;I<20;I++){const D=I/19,H=T+D*E,R=y+i*Math.cos(H),F=v+a*Math.sin(H);S.push({x:R,y:F})}return S}k(fl,"generateArcPoints");async function IC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a}=await it(e,t,Je(t)),s=t?.padding??0,o=t?.padding??0,l=(t?.width?t?.width:a.width)+s*2,c=(t?.height?t?.height:a.height)+o*2,u=t.radius||5,h=t.taper||5,{cssStyles:d}=t,f=Fe.svg(i),p=ze(t,{});t.stroke&&(p.stroke=t.stroke),t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const m=[{x:-l/2+h,y:-c/2},{x:l/2-h,y:-c/2},...fl(l/2-h,-c/2,l/2,-c/2+h,u,u,!0),{x:l/2,y:-c/2+h},{x:l/2,y:c/2-h},...fl(l/2,c/2-h,l/2-h,c/2,u,u,!0),{x:l/2-h,y:c/2},{x:-l/2+h,y:c/2},...fl(-l/2+h,c/2,-l/2,c/2-h,u,u,!0),{x:-l/2,y:c/2-h},{x:-l/2,y:-c/2+h},...fl(-l/2,-c/2+h,-l/2+h,-c/2,u,u,!0)],b=Tt(m),y=f.path(b,p),v=i.insert(()=>y,":first-child");return v.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",d),n&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",n),He(t,v),t.intersect=function(T){return Le.polygon(t,m,T)},i}k(IC,"roundedRect");async function RC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await it(e,t,Je(t)),o=t?.padding??0,l=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),u=-a.width/2-o,h=-a.height/2-o,{cssStyles:d}=t,f=Fe.svg(i),p=ze(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const m=[{x:u,y:h},{x:u+l+8,y:h},{x:u+l+8,y:h+c},{x:u-8,y:h+c},{x:u-8,y:h},{x:u,y:h},{x:u,y:h+c}],b=f.polygon(m.map(v=>[v.x,v.y]),p),y=i.insert(()=>b,":first-child");return y.attr("class","basic label-container").attr("style",Br(d)),n&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",n),d&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",n),s.attr("transform",`translate(${-l/2+4+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-(a.y-(a.top??0))})`),He(t,y),t.intersect=function(v){return Le.rect(t,v)},i}k(RC,"shadedProcess");async function BC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await it(e,t,Je(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=-o/2,u=-l/2,{cssStyles:h}=t,d=Fe.svg(i),f=ze(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const p=[{x:c,y:u},{x:c,y:u+l},{x:c+o,y:u+l},{x:c+o,y:u-l/2}],m=Tt(p),b=d.path(m,f),y=i.insert(()=>b,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),n&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",n),y.attr("transform",`translate(0, ${l/4})`),s.attr("transform",`translate(${-o/2+(t.padding??0)-(a.x-(a.left??0))}, ${-l/4+(t.padding??0)-(a.y-(a.top??0))})`),He(t,y),t.intersect=function(v){return Le.polygon(t,p,v)},i}k(BC,"slopedRect");async function DC(e,t){const r={rx:0,ry:0,labelPaddingX:t.labelPaddingX??(t?.padding||0)*2,labelPaddingY:(t?.padding||0)*1};return Gh(e,t,r)}k(DC,"squareRect");async function OC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a}=await it(e,t,Je(t)),s=a.height+t.padding,o=a.width+s/4+t.padding,l=s/2,{cssStyles:c}=t,u=Fe.svg(i),h=ze(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const d=[{x:-o/2+l,y:-s/2},{x:o/2-l,y:-s/2},...ac(-o/2+l,0,l,50,90,270),{x:o/2-l,y:s/2},...ac(o/2-l,0,l,50,270,450)],f=Tt(d),p=u.path(f,h),m=i.insert(()=>p,":first-child");return m.attr("class","basic label-container outer-path"),c&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",c),n&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",n),He(t,m),t.intersect=function(b){return Le.polygon(t,d,b)},i}k(OC,"stadium");async function PC(e,t){return Gh(e,t,{rx:5,ry:5})}k(PC,"state");function FC(e,t,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:i}=Pe(t);t.labelStyle=n;const{cssStyles:a}=t,{lineColor:s,stateBorder:o,nodeBorder:l}=r,c=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),u=Fe.svg(c),h=ze(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const d=u.circle(0,0,14,{...h,stroke:s,strokeWidth:2}),f=o??l,p=u.circle(0,0,5,{...h,fill:f,stroke:f,strokeWidth:2,fillStyle:"solid"}),m=c.insert(()=>d,":first-child");return m.insert(()=>p),a&&m.selectAll("path").attr("style",a),i&&m.selectAll("path").attr("style",i),He(t,m),t.intersect=function(b){return Le.circle(t,7,b)},c}k(FC,"stateEnd");function $C(e,t,{config:{themeVariables:r}}){const{lineColor:n}=r,i=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const o=Fe.svg(i).circle(0,0,14,xK(n));a=i.insert(()=>o),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else a=i.insert("circle",":first-child"),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return He(t,a),t.intersect=function(s){return Le.circle(t,7,s)},i}k($C,"stateStart");async function zC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a}=await it(e,t,Je(t)),s=(t?.padding||0)/2,o=a.width+t.padding,l=a.height+t.padding,c=-a.width/2-s,u=-a.height/2-s,h=[{x:0,y:0},{x:o,y:0},{x:o,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:o+8,y:0},{x:o+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if(t.look==="handDrawn"){const d=Fe.svg(i),f=ze(t,{}),p=d.rectangle(c-8,u,o+16,l,f),m=d.line(c,u,c,u+l,f),b=d.line(c+o,u,c+o,u+l,f);i.insert(()=>m,":first-child"),i.insert(()=>b,":first-child");const y=i.insert(()=>p,":first-child"),{cssStyles:v}=t;y.attr("class","basic label-container").attr("style",Br(v)),He(t,y)}else{const d=Sa(i,o,l,h);n&&d.attr("style",n),He(t,d)}return t.intersect=function(d){return Le.polygon(t,h,d)},i}k(zC,"subroutine");async function HC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a}=await it(e,t,Je(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),o=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=-s/2,c=-o/2,u=.2*o,h=.2*o,{cssStyles:d}=t,f=Fe.svg(i),p=ze(t,{}),m=[{x:l-u/2,y:c},{x:l+s+u/2,y:c},{x:l+s+u/2,y:c+o},{x:l-u/2,y:c+o}],b=[{x:l+s-u/2,y:c+o},{x:l+s+u/2,y:c+o},{x:l+s+u/2,y:c+o-h}];t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const y=Tt(m),v=f.path(y,p),T=Tt(b),A=f.path(T,{...p,fillStyle:"solid"}),E=i.insert(()=>A,":first-child");return E.insert(()=>v,":first-child"),E.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",d),n&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",n),He(t,E),t.intersect=function(S){return Le.polygon(t,m,S)},i}k(HC,"taggedRect");async function qC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await it(e,t,Je(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/4,u=.2*o,h=.2*l,d=l+c,{cssStyles:f}=t,p=Fe.svg(i),m=ze(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=[{x:-o/2-o/2*.1,y:d/2},...xa(-o/2-o/2*.1,d/2,o/2+o/2*.1,d/2,c,.8),{x:o/2+o/2*.1,y:-d/2},{x:-o/2-o/2*.1,y:-d/2}],y=-o/2+o/2*.1,v=-d/2-h*.4,T=[{x:y+o-u,y:(v+l)*1.4},{x:y+o,y:v+l-h},{x:y+o,y:(v+l)*.9},...xa(y+o,(v+l)*1.3,y+o-u,(v+l)*1.5,-l*.03,.5)],A=Tt(b),E=p.path(A,m),S=Tt(T),I=p.path(S,{...m,fillStyle:"solid"}),D=i.insert(()=>I,":first-child");return D.insert(()=>E,":first-child"),D.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",f),n&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",n),D.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-o/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c/2-(a.y-(a.top??0))})`),He(t,D),t.intersect=function(H){return Le.polygon(t,b,H)},i}k(qC,"taggedWaveEdgedRectangle");async function jC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a}=await it(e,t,Je(t)),s=Math.max(a.width+t.padding,t?.width||0),o=Math.max(a.height+t.padding,t?.height||0),l=-s/2,c=-o/2,u=i.insert("rect",":first-child");return u.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",s).attr("height",o),He(t,u),t.intersect=function(h){return Le.rect(t,h)},i}k(jC,"text");var Dee=k((e,t,r,n,i,a)=>`M${e},${t}
|
|
573
|
+
a${i},${a} 0,0,1 0,${-n}
|
|
574
|
+
l${r},0
|
|
575
|
+
a${i},${a} 0,0,1 0,${n}
|
|
576
|
+
M${r},${-n}
|
|
577
|
+
a${i},${a} 0,0,0 0,${n}
|
|
578
|
+
l${-r},0`,"createCylinderPathD"),Oee=k((e,t,r,n,i,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${i},${a} 0,0,0 0,${-n}`,`l${-r},0`,`a${i},${a} 0,0,0 0,${n}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),Pee=k((e,t,r,n,i,a)=>[`M${e+r/2},${-n/2}`,`a${i},${a} 0,0,0 0,${n}`].join(" "),"createInnerCylinderPathD");async function UC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a,label:s,halfPadding:o}=await it(e,t,Je(t)),l=t.look==="neo"?o*2:o,c=a.height+l,u=c/2,h=u/(2.5+c/50),d=a.width+h+l,{cssStyles:f}=t;let p;if(t.look==="handDrawn"){const m=Fe.svg(i),b=Oee(0,0,d,c,h,u),y=Pee(0,0,d,c,h,u),v=m.path(b,ze(t,{})),T=m.path(y,ze(t,{fill:"none"}));p=i.insert(()=>T,":first-child"),p=i.insert(()=>v,":first-child"),p.attr("class","basic label-container"),f&&p.attr("style",f)}else{const m=Dee(0,0,d,c,h,u);p=i.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",Br(f)).attr("style",n),p.attr("class","basic label-container"),f&&p.selectAll("path").attr("style",f),n&&p.selectAll("path").attr("style",n)}return p.attr("label-offset-x",h),p.attr("transform",`translate(${-d/2}, ${c/2} )`),s.attr("transform",`translate(${-(a.width/2)-h-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),He(t,p),t.intersect=function(m){const b=Le.rect(t,m),y=b.y-(t.y??0);if(u!=0&&(Math.abs(y)<(t.height??0)/2||Math.abs(y)==(t.height??0)/2&&Math.abs(b.x-(t.x??0))>(t.width??0)/2-h)){let v=h*h*(1-y*y/(u*u));v!=0&&(v=Math.sqrt(Math.abs(v))),v=h-v,m.x-(t.x??0)>0&&(v=-v),b.x+=v}return b},i}k(UC,"tiltedCylinder");async function WC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a}=await it(e,t,Je(t)),s=a.width+t.padding,o=a.height+t.padding,l=[{x:-3*o/6,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:0,y:-o}];let c;const{cssStyles:u}=t;if(t.look==="handDrawn"){const h=Fe.svg(i),d=ze(t,{}),f=Tt(l),p=h.path(f,d);c=i.insert(()=>p,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),u&&c.attr("style",u)}else c=Sa(i,s,o,l);return n&&c.attr("style",n),t.width=s,t.height=o,He(t,c),t.intersect=function(h){return Le.polygon(t,l,h)},i}k(WC,"trapezoid");async function GC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a}=await it(e,t,Je(t)),s=60,o=20,l=Math.max(s,a.width+(t.padding??0)*2,t?.width??0),c=Math.max(o,a.height+(t.padding??0)*2,t?.height??0),{cssStyles:u}=t,h=Fe.svg(i),d=ze(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const f=[{x:-l/2*.8,y:-c/2},{x:l/2*.8,y:-c/2},{x:l/2,y:-c/2*.6},{x:l/2,y:c/2},{x:-l/2,y:c/2},{x:-l/2,y:-c/2*.6}],p=Tt(f),m=h.path(p,d),b=i.insert(()=>m,":first-child");return b.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",u),n&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",n),He(t,b),t.intersect=function(y){return Le.polygon(t,f,y)},i}k(GC,"trapezoidalPentagon");async function YC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await it(e,t,Je(t)),o=sr(Mt().flowchart?.htmlLabels),l=a.width+(t.padding??0),c=l+a.height,u=l+a.height,h=[{x:0,y:0},{x:u,y:0},{x:u/2,y:-c}],{cssStyles:d}=t,f=Fe.svg(i),p=ze(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const m=Tt(h),b=f.path(m,p),y=i.insert(()=>b,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return d&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",d),n&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",n),t.width=l,t.height=c,He(t,y),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${c/2-(a.height+(t.padding??0)/(o?2:1)-(a.y-(a.top??0)))})`),t.intersect=function(v){return he.info("Triangle intersect",t,h,v),Le.polygon(t,h,v)},i}k(YC,"triangle");async function VC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await it(e,t,Je(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/8,u=l+c,{cssStyles:h}=t,f=70-o,p=f>0?f/2:0,m=Fe.svg(i),b=ze(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const y=[{x:-o/2-p,y:u/2},...xa(-o/2-p,u/2,o/2+p,u/2,c,.8),{x:o/2+p,y:-u/2},{x:-o/2-p,y:-u/2}],v=Tt(y),T=m.path(v,b),A=i.insert(()=>T,":first-child");return A.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",h),n&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",n),A.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-o/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c-(a.y-(a.top??0))})`),He(t,A),t.intersect=function(E){return Le.polygon(t,y,E)},i}k(VC,"waveEdgedRectangle");async function XC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a}=await it(e,t,Je(t)),s=100,o=50,l=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),u=l/c;let h=l,d=c;h>d*u?d=h/u:h=d*u,h=Math.max(h,s),d=Math.max(d,o);const f=Math.min(d*.2,d/4),p=d+f*2,{cssStyles:m}=t,b=Fe.svg(i),y=ze(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const v=[{x:-h/2,y:p/2},...xa(-h/2,p/2,h/2,p/2,f,1),{x:h/2,y:-p/2},...xa(h/2,-p/2,-h/2,-p/2,f,-1)],T=Tt(v),A=b.path(T,y),E=i.insert(()=>A,":first-child");return E.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",m),n&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",n),He(t,E),t.intersect=function(S){return Le.polygon(t,v,S)},i}k(XC,"waveRectangle");async function KC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await it(e,t,Je(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=5,u=-o/2,h=-l/2,{cssStyles:d}=t,f=Fe.svg(i),p=ze(t,{}),m=[{x:u-c,y:h-c},{x:u-c,y:h+l},{x:u+o,y:h+l},{x:u+o,y:h-c}],b=`M${u-c},${h-c} L${u+o},${h-c} L${u+o},${h+l} L${u-c},${h+l} L${u-c},${h-c}
|
|
579
|
+
M${u-c},${h} L${u+o},${h}
|
|
580
|
+
M${u},${h-c} L${u},${h+l}`;t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const y=f.path(b,p),v=i.insert(()=>y,":first-child");return v.attr("transform",`translate(${c/2}, ${c/2})`),v.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",d),n&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",n),s.attr("transform",`translate(${-(a.width/2)+c/2-(a.x-(a.left??0))}, ${-(a.height/2)+c/2-(a.y-(a.top??0))})`),He(t,v),t.intersect=function(T){return Le.polygon(t,m,T)},i}k(KC,"windowPane");async function Ag(e,t){const r=t;if(r.alias&&(t.label=r.alias),t.look==="handDrawn"){const{themeVariables:ne}=Cr(),{background:N}=ne,ke={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${N}`]};await Ag(e,ke)}const n=Cr();t.useHtmlLabels=n.htmlLabels;let i=n.er?.diagramPadding??10,a=n.er?.entityPadding??6;const{cssStyles:s}=t,{labelStyles:o,nodeStyles:l}=Pe(t);if(r.attributes.length===0&&t.label){const ne={rx:0,ry:0,labelPaddingX:i,labelPaddingY:i*1.5};ci(t.label,n)+ne.labelPaddingX*2<n.er.minEntityWidth&&(t.width=n.er.minEntityWidth);const N=await Gh(e,t,ne);if(!sr(n.htmlLabels)){const ke=N.select("text"),ge=ke.node()?.getBBox();ke.attr("transform",`translate(${-ge.width/2}, 0)`)}return N}n.htmlLabels||(i*=1.25,a*=1.25);let c=Je(t);c||(c="node default");const u=e.insert("g").attr("class",c).attr("id",t.domId||t.id),h=await As(u,t.label??"",n,0,0,["name"],o);h.height+=a;let d=0;const f=[],p=[];let m=0,b=0,y=0,v=0,T=!0,A=!0;for(const ne of r.attributes){const N=await As(u,ne.type,n,0,d,["attribute-type"],o);m=Math.max(m,N.width+i);const ke=await As(u,ne.name,n,0,d,["attribute-name"],o);b=Math.max(b,ke.width+i);const ge=await As(u,ne.keys.join(),n,0,d,["attribute-keys"],o);y=Math.max(y,ge.width+i);const Se=await As(u,ne.comment,n,0,d,["attribute-comment"],o);v=Math.max(v,Se.width+i);const _e=Math.max(N.height,ke.height,ge.height,Se.height)+a;p.push({yOffset:d,rowHeight:_e}),d+=_e}let E=4;y<=i&&(T=!1,y=0,E--),v<=i&&(A=!1,v=0,E--);const S=u.node().getBBox();if(h.width+i*2-(m+b+y+v)>0){const ne=h.width+i*2-(m+b+y+v);m+=ne/E,b+=ne/E,y>0&&(y+=ne/E),v>0&&(v+=ne/E)}const I=m+b+y+v,D=Fe.svg(u),H=ze(t,{});t.look!=="handDrawn"&&(H.roughness=0,H.fillStyle="solid");let R=0;p.length>0&&(R=p.reduce((ne,N)=>ne+(N?.rowHeight??0),0));const F=Math.max(S.width+i*2,t?.width||0,I),G=Math.max((R??0)+h.height,t?.height||0),ee=-F/2,$=-G/2;u.selectAll("g:not(:first-child)").each((ne,N,ke)=>{const ge=Ct(ke[N]),Se=ge.attr("transform");let _e=0,at=0;if(Se){const $e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Se);$e&&(_e=parseFloat($e[1]),at=parseFloat($e[2]),ge.attr("class").includes("attribute-name")?_e+=m:ge.attr("class").includes("attribute-keys")?_e+=m+b:ge.attr("class").includes("attribute-comment")&&(_e+=m+b+y))}ge.attr("transform",`translate(${ee+i/2+_e}, ${at+$+h.height+a/2})`)}),u.select(".name").attr("transform","translate("+-h.width/2+", "+($+a/2)+")");const q=D.rectangle(ee,$,F,G,H),W=u.insert(()=>q,":first-child").attr("style",s.join("")),{themeVariables:Z}=Cr(),{rowEven:V,rowOdd:ve,nodeBorder:L}=Z;f.push(0);for(const[ne,N]of p.entries()){const ge=(ne+1)%2===0&&N.yOffset!==0,Se=D.rectangle(ee,h.height+$+N?.yOffset,F,N?.rowHeight,{...H,fill:ge?V:ve,stroke:L});u.insert(()=>Se,"g.label").attr("style",s.join("")).attr("class",`row-rect-${ge?"even":"odd"}`)}let ae=D.line(ee,h.height+$,F+ee,h.height+$,H);u.insert(()=>ae).attr("class","divider"),ae=D.line(m+ee,h.height+$,m+ee,G+$,H),u.insert(()=>ae).attr("class","divider"),T&&(ae=D.line(m+b+ee,h.height+$,m+b+ee,G+$,H),u.insert(()=>ae).attr("class","divider")),A&&(ae=D.line(m+b+y+ee,h.height+$,m+b+y+ee,G+$,H),u.insert(()=>ae).attr("class","divider"));for(const ne of f)ae=D.line(ee,h.height+$+ne,F+ee,h.height+$+ne,H),u.insert(()=>ae).attr("class","divider");if(He(t,W),l&&t.look!=="handDrawn"){const N=l.split(";")?.filter(ke=>ke.includes("stroke"))?.map(ke=>`${ke}`).join("; ");u.selectAll("path").attr("style",N??""),u.selectAll(".row-rect-even path").attr("style",l)}return t.intersect=function(ne){return Le.rect(t,ne)},u}k(Ag,"erBox");async function As(e,t,r,n=0,i=0,a=[],s=""){const o=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${n}, ${i})`).attr("style",s);t!==hp(t)&&(t=hp(t),t=t.replaceAll("<","<").replaceAll(">",">"));const l=o.node().appendChild(await Xi(o,t,{width:ci(t,r)+100,style:s,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let u=l.children[0];for(u.textContent=u.textContent.replaceAll("<","<").replaceAll(">",">");u.childNodes[0];)u=u.childNodes[0],u.textContent=u.textContent.replaceAll("<","<").replaceAll(">",">")}let c=l.getBBox();if(sr(r.htmlLabels)){const u=l.children[0];u.style.textAlign="start";const h=Ct(l);c=u.getBoundingClientRect(),h.attr("width",c.width),h.attr("height",c.height)}return c}k(As,"addText");async function QC(e,t,r,n,i=r.class.padding??12){const a=n?0:3,s=e.insert("g").attr("class",Je(t)).attr("id",t.domId||t.id);let o=null,l=null,c=null,u=null,h=0,d=0,f=0;if(o=s.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const v=t.annotations[0];await pl(o,{text:`«${v}»`},0),h=o.node().getBBox().height}l=s.insert("g").attr("class","label-group text"),await pl(l,t,0,["font-weight: bolder"]);const p=l.node().getBBox();d=p.height,c=s.insert("g").attr("class","members-group text");let m=0;for(const v of t.members){const T=await pl(c,v,m,[v.parseClassifier()]);m+=T+a}f=c.node().getBBox().height,f<=0&&(f=i/2),u=s.insert("g").attr("class","methods-group text");let b=0;for(const v of t.methods){const T=await pl(u,v,b,[v.parseClassifier()]);b+=T+a}let y=s.node().getBBox();if(o!==null){const v=o.node().getBBox();o.attr("transform",`translate(${-v.width/2})`)}return l.attr("transform",`translate(${-p.width/2}, ${h})`),y=s.node().getBBox(),c.attr("transform",`translate(0, ${h+d+i*2})`),y=s.node().getBBox(),u.attr("transform",`translate(0, ${h+d+(f?f+i*4:i*2)})`),y=s.node().getBBox(),{shapeSvg:s,bbox:y}}k(QC,"textHelper");async function pl(e,t,r,n=[]){const i=e.insert("g").attr("class","label").attr("style",n.join("; ")),a=Cr();let s="useHtmlLabels"in t?t.useHtmlLabels:sr(a.htmlLabels)??!0,o="";"text"in t?o=t.text:o=t.label,!s&&o.startsWith("\\")&&(o=o.substring(1)),Ja(o)&&(s=!0);const l=await Xi(i,O1(Ta(o)),{width:ci(o,a)+50,classes:"markdown-node-label",useHtmlLabels:s},a);let c,u=1;if(s){const h=l.children[0],d=Ct(l);u=h.innerHTML.split("<br>").length,h.innerHTML.includes("</math>")&&(u+=h.innerHTML.split("<mrow>").length-1);const f=h.getElementsByTagName("img");if(f){const p=o.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...f].map(m=>new Promise(b=>{function y(){if(m.style.display="flex",m.style.flexDirection="column",p){const v=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,A=parseInt(v,10)*5+"px";m.style.minWidth=A,m.style.maxWidth=A}else m.style.width="100%";b(m)}k(y,"setupImage"),setTimeout(()=>{m.complete&&y()}),m.addEventListener("error",y),m.addEventListener("load",y)})))}c=h.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}else{n.includes("font-weight: bolder")&&Ct(l).selectAll("tspan").attr("font-weight",""),u=l.children.length;const h=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(h.textContent=o[0]+o.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),o[1]===" "&&(h.textContent=h.textContent[0]+" "+h.textContent.substring(1))),h.textContent==="undefined"&&(h.textContent=""),c=l.getBBox()}return i.attr("transform","translate(0,"+(-c.height/(2*u)+r)+")"),c.height}k(pl,"addText");async function ZC(e,t){const r=Mt(),n=r.class.padding??12,i=n,a=t.useHtmlLabels??sr(r.htmlLabels)??!0,s=t;s.annotations=s.annotations??[],s.members=s.members??[],s.methods=s.methods??[];const{shapeSvg:o,bbox:l}=await QC(e,t,r,a,i),{labelStyles:c,nodeStyles:u}=Pe(t);t.labelStyle=c,t.cssStyles=s.styles||"";const h=s.styles?.join(";")||u||"";t.cssStyles||(t.cssStyles=h.replaceAll("!important","").split(";"));const d=s.members.length===0&&s.methods.length===0&&!r.class?.hideEmptyMembersBox,f=Fe.svg(o),p=ze(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const m=l.width;let b=l.height;s.members.length===0&&s.methods.length===0?b+=i:s.members.length>0&&s.methods.length===0&&(b+=i*2);const y=-m/2,v=-b/2,T=f.rectangle(y-n,v-n-(d?n:s.members.length===0&&s.methods.length===0?-n/2:0),m+2*n,b+2*n+(d?n*2:s.members.length===0&&s.methods.length===0?-n:0),p),A=o.insert(()=>T,":first-child");A.attr("class","basic label-container");const E=A.node().getBBox();o.selectAll(".text").each((H,R,F)=>{const G=Ct(F[R]),ee=G.attr("transform");let $=0;if(ee){const V=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(ee);V&&($=parseFloat(V[2]))}let q=$+v+n-(d?n:s.members.length===0&&s.methods.length===0?-n/2:0);a||(q-=4);let W=y;(G.attr("class").includes("label-group")||G.attr("class").includes("annotation-group"))&&(W=-G.node()?.getBBox().width/2||0,o.selectAll("text").each(function(Z,V,ve){window.getComputedStyle(ve[V]).textAnchor==="middle"&&(W=0)})),G.attr("transform",`translate(${W}, ${q})`)});const S=o.select(".annotation-group").node().getBBox().height-(d?n/2:0)||0,I=o.select(".label-group").node().getBBox().height-(d?n/2:0)||0,D=o.select(".members-group").node().getBBox().height-(d?n/2:0)||0;if(s.members.length>0||s.methods.length>0||d){const H=f.line(E.x,S+I+v+n,E.x+E.width,S+I+v+n,p);o.insert(()=>H).attr("class","divider").attr("style",h)}if(d||s.members.length>0||s.methods.length>0){const H=f.line(E.x,S+I+D+v+i*2+n,E.x+E.width,S+I+D+v+n+i*2,p);o.insert(()=>H).attr("class","divider").attr("style",h)}if(s.look!=="handDrawn"&&o.selectAll("path").attr("style",h),A.select(":nth-child(2)").attr("style",h),o.selectAll(".divider").select("path").attr("style",h),t.labelStyle?o.selectAll("span").attr("style",t.labelStyle):o.selectAll("span").attr("style",h),!a){const H=RegExp(/color\s*:\s*([^;]*)/),R=H.exec(h);if(R){const F=R[0].replace("color","fill");o.selectAll("tspan").attr("style",F)}else if(c){const F=H.exec(c);if(F){const G=F[0].replace("color","fill");o.selectAll("tspan").attr("style",G)}}}return He(t,A),t.intersect=function(H){return Le.rect(t,H)},o}k(ZC,"classBox");async function JC(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const i=t,a=t,s=20,o=20,l="verifyMethod"in t,c=Je(t),u=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let h;l?h=await Zn(u,`<<${i.type}>>`,0,t.labelStyle):h=await Zn(u,"<<Element>>",0,t.labelStyle);let d=h;const f=await Zn(u,i.name,d,t.labelStyle+"; font-weight: bold;");if(d+=f+o,l){const S=await Zn(u,`${i.requirementId?`ID: ${i.requirementId}`:""}`,d,t.labelStyle);d+=S;const I=await Zn(u,`${i.text?`Text: ${i.text}`:""}`,d,t.labelStyle);d+=I;const D=await Zn(u,`${i.risk?`Risk: ${i.risk}`:""}`,d,t.labelStyle);d+=D,await Zn(u,`${i.verifyMethod?`Verification: ${i.verifyMethod}`:""}`,d,t.labelStyle)}else{const S=await Zn(u,`${a.type?`Type: ${a.type}`:""}`,d,t.labelStyle);d+=S,await Zn(u,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,d,t.labelStyle)}const p=(u.node()?.getBBox().width??200)+s,m=(u.node()?.getBBox().height??200)+s,b=-p/2,y=-m/2,v=Fe.svg(u),T=ze(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const A=v.rectangle(b,y,p,m,T),E=u.insert(()=>A,":first-child");if(E.attr("class","basic label-container").attr("style",n),u.selectAll(".label").each((S,I,D)=>{const H=Ct(D[I]),R=H.attr("transform");let F=0,G=0;if(R){const W=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(R);W&&(F=parseFloat(W[1]),G=parseFloat(W[2]))}const ee=G-m/2;let $=b+s/2;(I===0||I===1)&&($=F),H.attr("transform",`translate(${$}, ${ee+s})`)}),d>h+f+o){const S=v.line(b,y+h+f+o,b+p,y+h+f+o,T);u.insert(()=>S).attr("style",n)}return He(t,E),t.intersect=function(S){return Le.rect(t,S)},u}k(JC,"requirementBox");async function Zn(e,t,r,n=""){if(t==="")return 0;const i=e.insert("g").attr("class","label").attr("style",n),a=Mt(),s=a.htmlLabels??!0,o=await Xi(i,O1(Ta(t)),{width:ci(t,a)+50,classes:"markdown-node-label",useHtmlLabels:s,style:n},a);let l;if(s){const c=o.children[0],u=Ct(o);l=c.getBoundingClientRect(),u.attr("width",l.width),u.attr("height",l.height)}else{const c=o.children[0];for(const u of c.children)u.textContent=u.textContent.replaceAll(">",">").replaceAll("<","<"),n&&u.setAttribute("style",n);l=o.getBBox(),l.height+=6}return i.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}k(Zn,"addText");var Fee=k(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 eS(e,t,{config:r}){const{labelStyles:n,nodeStyles:i}=Pe(t);t.labelStyle=n||"";const a=10,s=t.width;t.width=(t.width??200)-10;const{shapeSvg:o,bbox:l,label:c}=await it(e,t,Je(t)),u=t.padding||10;let h="",d;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(h=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),d=o.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",h).attr("target","_blank"));const f={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let p,m;d?{label:p,bbox:m}=await df(d,"ticket"in t&&t.ticket||"",f):{label:p,bbox:m}=await df(o,"ticket"in t&&t.ticket||"",f);const{label:b,bbox:y}=await df(o,"assigned"in t&&t.assigned||"",f);t.width=s;const v=10,T=t?.width||0,A=Math.max(m.height,y.height)/2,E=Math.max(l.height+v*2,t?.height||0)+A,S=-T/2,I=-E/2;c.attr("transform","translate("+(u-T/2)+", "+(-A-l.height/2)+")"),p.attr("transform","translate("+(u-T/2)+", "+(-A+l.height/2)+")"),b.attr("transform","translate("+(u+T/2-y.width-2*a)+", "+(-A+l.height/2)+")");let D;const{rx:H,ry:R}=t,{cssStyles:F}=t;if(t.look==="handDrawn"){const G=Fe.svg(o),ee=ze(t,{}),$=H||R?G.path(Ca(S,I,T,E,H||0),ee):G.rectangle(S,I,T,E,ee);D=o.insert(()=>$,":first-child"),D.attr("class","basic label-container").attr("style",F||null)}else{D=o.insert("rect",":first-child"),D.attr("class","basic label-container __APA__").attr("style",i).attr("rx",H??5).attr("ry",R??5).attr("x",S).attr("y",I).attr("width",T).attr("height",E);const G="priority"in t&&t.priority;if(G){const ee=o.append("line"),$=S+2,q=I+Math.floor((H??0)/2),W=I+E-Math.floor((H??0)/2);ee.attr("x1",$).attr("y1",q).attr("x2",$).attr("y2",W).attr("stroke-width","4").attr("stroke",Fee(G))}}return He(t,D),t.height=E,t.intersect=function(G){return Le.rect(t,G)},o}k(eS,"kanbanItem");async function tS(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a,halfPadding:s,label:o}=await it(e,t,Je(t)),l=a.width+10*s,c=a.height+8*s,u=.15*l,{cssStyles:h}=t,d=a.width+20,f=a.height+20,p=Math.max(l,d),m=Math.max(c,f);o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let b;const y=`M0 0
|
|
581
|
+
a${u},${u} 1 0,0 ${p*.25},${-1*m*.1}
|
|
582
|
+
a${u},${u} 1 0,0 ${p*.25},0
|
|
583
|
+
a${u},${u} 1 0,0 ${p*.25},0
|
|
584
|
+
a${u},${u} 1 0,0 ${p*.25},${m*.1}
|
|
585
|
+
|
|
586
|
+
a${u},${u} 1 0,0 ${p*.15},${m*.33}
|
|
587
|
+
a${u*.8},${u*.8} 1 0,0 0,${m*.34}
|
|
588
|
+
a${u},${u} 1 0,0 ${-1*p*.15},${m*.33}
|
|
589
|
+
|
|
590
|
+
a${u},${u} 1 0,0 ${-1*p*.25},${m*.15}
|
|
591
|
+
a${u},${u} 1 0,0 ${-1*p*.25},0
|
|
592
|
+
a${u},${u} 1 0,0 ${-1*p*.25},0
|
|
593
|
+
a${u},${u} 1 0,0 ${-1*p*.25},${-1*m*.15}
|
|
594
|
+
|
|
595
|
+
a${u},${u} 1 0,0 ${-1*p*.1},${-1*m*.33}
|
|
596
|
+
a${u*.8},${u*.8} 1 0,0 0,${-1*m*.34}
|
|
597
|
+
a${u},${u} 1 0,0 ${p*.1},${-1*m*.33}
|
|
598
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const v=Fe.svg(i),T=ze(t,{}),A=v.path(y,T);b=i.insert(()=>A,":first-child"),b.attr("class","basic label-container").attr("style",Br(h))}else b=i.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",y);return b.attr("transform",`translate(${-p/2}, ${-m/2})`),He(t,b),t.calcIntersect=function(v,T){return Le.rect(v,T)},t.intersect=function(v){return he.info("Bang intersect",t,v),Le.rect(t,v)},i}k(tS,"bang");async function rS(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a,halfPadding:s,label:o}=await it(e,t,Je(t)),l=a.width+2*s,c=a.height+2*s,u=.15*l,h=.25*l,d=.35*l,f=.2*l,{cssStyles:p}=t;let m;const b=`M0 0
|
|
599
|
+
a${u},${u} 0 0,1 ${l*.25},${-1*l*.1}
|
|
600
|
+
a${d},${d} 1 0,1 ${l*.4},${-1*l*.1}
|
|
601
|
+
a${h},${h} 1 0,1 ${l*.35},${l*.2}
|
|
602
|
+
|
|
603
|
+
a${u},${u} 1 0,1 ${l*.15},${c*.35}
|
|
604
|
+
a${f},${f} 1 0,1 ${-1*l*.15},${c*.65}
|
|
605
|
+
|
|
606
|
+
a${h},${u} 1 0,1 ${-1*l*.25},${l*.15}
|
|
607
|
+
a${d},${d} 1 0,1 ${-1*l*.5},0
|
|
608
|
+
a${u},${u} 1 0,1 ${-1*l*.25},${-1*l*.15}
|
|
609
|
+
|
|
610
|
+
a${u},${u} 1 0,1 ${-1*l*.1},${-1*c*.35}
|
|
611
|
+
a${f},${f} 1 0,1 ${l*.1},${-1*c*.65}
|
|
612
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const y=Fe.svg(i),v=ze(t,{}),T=y.path(b,v);m=i.insert(()=>T,":first-child"),m.attr("class","basic label-container").attr("style",Br(p))}else m=i.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",b);return o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),m.attr("transform",`translate(${-l/2}, ${-c/2})`),He(t,m),t.calcIntersect=function(y,v){return Le.rect(y,v)},t.intersect=function(y){return he.info("Cloud intersect",t,y),Le.rect(t,y)},i}k(rS,"cloud");async function nS(e,t){const{labelStyles:r,nodeStyles:n}=Pe(t);t.labelStyle=r;const{shapeSvg:i,bbox:a,halfPadding:s,label:o}=await it(e,t,Je(t)),l=a.width+8*s,c=a.height+2*s,u=5,h=`
|
|
613
|
+
M${-l/2} ${c/2-u}
|
|
614
|
+
v${-c+2*u}
|
|
615
|
+
q0,-${u} ${u},-${u}
|
|
616
|
+
h${l-2*u}
|
|
617
|
+
q${u},0 ${u},${u}
|
|
618
|
+
v${c-2*u}
|
|
619
|
+
q0,${u} -${u},${u}
|
|
620
|
+
h${-l+2*u}
|
|
621
|
+
q-${u},0 -${u},-${u}
|
|
622
|
+
Z
|
|
623
|
+
`,d=i.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("style",n).attr("d",h);return i.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),i.append(()=>o.node()),He(t,d),t.calcIntersect=function(f,p){return Le.rect(f,p)},t.intersect=function(f){return Le.rect(t,f)},i}k(nS,"defaultMindmapNode");async function iS(e,t){const r={padding:t.padding??0};return _g(e,t,r)}k(iS,"mindmapCircle");var $ee=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:DC},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:IC},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:OC},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:zC},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:aC},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:_g},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:tS},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:rS},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:NC},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:dC},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:wC},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:kC},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:WC},{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:xC},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:oC},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:jC},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Q7},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:RC},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:$C},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:FC},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:uC},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:fC},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:tC},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:rC},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:nC},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:TC},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:VC},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:hC},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:UC},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:CC},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:iC},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:sC},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:YC},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:KC},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:lC},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:GC},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:cC},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:BC},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:_C},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:EC},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:K7},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:eC},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:qC},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:HC},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:XC},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:LC},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:SC}],zee=k(()=>{const t=[...Object.entries({state:PC,choice:Z7,note:AC,rectWithTitle:MC,labelRect:vC,iconSquare:bC,iconCircle:mC,icon:pC,iconRounded:gC,imageSquare:yC,anchor:X7,kanbanItem:eS,mindmapCircle:iS,defaultMindmapNode:nS,classBox:ZC,erBox:Ag,requirementBox:JC}),...$ee.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(i=>[i,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),aS=zee();function sS(e){return e in aS}k(sS,"isValidShape");var Yh=new Map;async function Ng(e,t,r){let n,i;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?aS[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let s;r.config.securityLevel==="sandbox"?s="_top":t.linkTarget&&(s=t.linkTarget||"_blank"),n=e.insert("svg:a").attr("xlink:href",t.link).attr("target",s??null),i=await a(n,t,r)}else i=await a(e,t,r),n=i;return t.tooltip&&i.attr("title",t.tooltip),Yh.set(t.id,n),t.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}k(Ng,"insertNode");var Hee=k((e,t)=>{Yh.set(t.id,e)},"setNodeElem"),qee=k(()=>{Yh.clear()},"clear"),jee=k(e=>{const t=Yh.get(e.id);he.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,n=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+n-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),n},"positionNode"),Uee=k((e,t,r,n,i,a)=>{t.arrowTypeStart&&qx(e,"start",t.arrowTypeStart,r,n,i,a),t.arrowTypeEnd&&qx(e,"end",t.arrowTypeEnd,r,n,i,a)},"addEdgeMarkers"),Wee={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{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}},qx=k((e,t,r,n,i,a,s)=>{const o=Wee[r];if(!o){he.warn(`Unknown arrow type: ${r}`);return}const l=o.type,u=`${i}_${a}-${l}${t==="start"?"Start":"End"}`;if(s&&s.trim()!==""){const h=s.replace(/[^\dA-Za-z]/g,"_"),d=`${u}_${h}`;if(!document.getElementById(d)){const f=document.getElementById(u);if(f){const p=f.cloneNode(!0);p.id=d,p.querySelectorAll("path, circle, line").forEach(b=>{b.setAttribute("stroke",s),o.fill&&b.setAttribute("fill",s)}),f.parentNode?.appendChild(p)}}e.attr(`marker-${t}`,`url(${n}#${d})`)}else e.attr(`marker-${t}`,`url(${n}#${u})`)},"addEdgeMarker"),F0=new Map,Tr=new Map,Gee=k(()=>{F0.clear(),Tr.clear()},"clear"),cu=k(e=>e?e.reduce((r,n)=>r+";"+n,""):"","getLabelStyles"),oS=k(async(e,t)=>{let r=sr(Mt().flowchart.htmlLabels);const{labelStyles:n}=Pe(t);t.labelStyle=n;const i=await Xi(e,t.label,{style:t.labelStyle,useHtmlLabels:r,addSvgBackground:!0,isNode:!1});he.info("abc82",t,t.labelType);const a=e.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label").attr("data-id",t.id);s.node().appendChild(i);let o=i.getBBox();if(r){const c=i.children[0],u=Ct(i);o=c.getBoundingClientRect(),u.attr("width",o.width),u.attr("height",o.height)}s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),F0.set(t.id,a),t.width=o.width,t.height=o.height;let l;if(t.startLabelLeft){const c=await ja(t.startLabelLeft,cu(t.labelStyle)),u=e.insert("g").attr("class","edgeTerminals"),h=u.insert("g").attr("class","inner");l=h.node().appendChild(c);const d=c.getBBox();h.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),Tr.get(t.id)||Tr.set(t.id,{}),Tr.get(t.id).startLeft=u,ml(l,t.startLabelLeft)}if(t.startLabelRight){const c=await ja(t.startLabelRight,cu(t.labelStyle)),u=e.insert("g").attr("class","edgeTerminals"),h=u.insert("g").attr("class","inner");l=u.node().appendChild(c),h.node().appendChild(c);const d=c.getBBox();h.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),Tr.get(t.id)||Tr.set(t.id,{}),Tr.get(t.id).startRight=u,ml(l,t.startLabelRight)}if(t.endLabelLeft){const c=await ja(t.endLabelLeft,cu(t.labelStyle)),u=e.insert("g").attr("class","edgeTerminals"),h=u.insert("g").attr("class","inner");l=h.node().appendChild(c);const d=c.getBBox();h.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),u.node().appendChild(c),Tr.get(t.id)||Tr.set(t.id,{}),Tr.get(t.id).endLeft=u,ml(l,t.endLabelLeft)}if(t.endLabelRight){const c=await ja(t.endLabelRight,cu(t.labelStyle)),u=e.insert("g").attr("class","edgeTerminals"),h=u.insert("g").attr("class","inner");l=h.node().appendChild(c);const d=c.getBBox();h.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),u.node().appendChild(c),Tr.get(t.id)||Tr.set(t.id,{}),Tr.get(t.id).endRight=u,ml(l,t.endLabelRight)}return i},"insertEdgeLabel");function ml(e,t){Mt().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}k(ml,"setTerminalWidth");var lS=k((e,t)=>{he.debug("Moving label abc88 ",e.id,e.label,F0.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const n=Mt(),{subGraphTitleTotalMargin:i}=Ih(n);if(e.label){const a=F0.get(e.id);let s=e.x,o=e.y;if(r){const l=_n.calcLabelPosition(r);he.debug("Moving label "+e.label+" from (",s,",",o,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(s=l.x,o=l.y)}a.attr("transform",`translate(${s}, ${o+i/2})`)}if(e.startLabelLeft){const a=Tr.get(e.id).startLeft;let s=e.x,o=e.y;if(r){const l=_n.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(e.startLabelRight){const a=Tr.get(e.id).startRight;let s=e.x,o=e.y;if(r){const l=_n.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(e.endLabelLeft){const a=Tr.get(e.id).endLeft;let s=e.x,o=e.y;if(r){const l=_n.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(e.endLabelRight){const a=Tr.get(e.id).endRight;let s=e.x,o=e.y;if(r){const l=_n.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}},"positionEdgeLabel"),Yee=k((e,t)=>{const r=e.x,n=e.y,i=Math.abs(t.x-r),a=Math.abs(t.y-n),s=e.width/2,o=e.height/2;return i>=s||a>=o},"outsideNode"),Vee=k((e,t,r)=>{he.debug(`intersection calc abc89:
|
|
624
|
+
outsidePoint: ${JSON.stringify(t)}
|
|
625
|
+
insidePoint : ${JSON.stringify(r)}
|
|
626
|
+
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const n=e.x,i=e.y,a=Math.abs(n-r.x),s=e.width/2;let o=r.x<t.x?s-a:s+a;const l=e.height/2,c=Math.abs(t.y-r.y),u=Math.abs(t.x-r.x);if(Math.abs(i-t.y)*s>Math.abs(n-t.x)*l){let h=r.y<t.y?t.y-l-i:i-l-t.y;o=u*h/c;const d={x:r.x<t.x?r.x+o:r.x-u+o,y:r.y<t.y?r.y+c-h:r.y-c+h};return o===0&&(d.x=t.x,d.y=t.y),u===0&&(d.x=t.x),c===0&&(d.y=t.y),he.debug(`abc89 top/bottom calc, Q ${c}, q ${h}, R ${u}, r ${o}`,d),d}else{r.x<t.x?o=t.x-s-n:o=n-s-t.x;let h=c*o/u,d=r.x<t.x?r.x+u-o:r.x-u+o,f=r.y<t.y?r.y+h:r.y-h;return he.debug(`sides calc abc89, Q ${c}, q ${h}, R ${u}, r ${o}`,{_x:d,_y:f}),o===0&&(d=t.x,f=t.y),u===0&&(d=t.x),c===0&&(f=t.y),{x:d,y:f}}},"intersection"),jx=k((e,t)=>{he.warn("abc88 cutPathAtIntersect",e,t);let r=[],n=e[0],i=!1;return e.forEach(a=>{if(he.info("abc88 checking point",a,t),!Yee(t,a)&&!i){const s=Vee(t,n,a);he.debug("abc88 inside",a,n,s),he.debug("abc88 intersection",s,t);let o=!1;r.forEach(l=>{o=o||l.x===s.x&&l.y===s.y}),r.some(l=>l.x===s.x&&l.y===s.y)?he.warn("abc88 no intersect",s,r):r.push(s),i=!0}else he.warn("abc88 outside",a,n),n=a,i||r.push(a)}),he.debug("returning points",r),r},"cutPathAtIntersect");function cS(e){const t=[],r=[];for(let n=1;n<e.length-1;n++){const i=e[n-1],a=e[n],s=e[n+1];(i.x===a.x&&a.y===s.y&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===s.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-s.y)>5)&&(t.push(a),r.push(n))}return{cornerPoints:t,cornerPointPositions:r}}k(cS,"extractCornerPoints");var Ux=k(function(e,t,r){const n=t.x-e.x,i=t.y-e.y,a=Math.sqrt(n*n+i*i),s=r/a;return{x:t.x-s*n,y:t.y-s*i}},"findAdjacentPoint"),Xee=k(function(e){const{cornerPointPositions:t}=cS(e),r=[];for(let n=0;n<e.length;n++)if(t.includes(n)){const i=e[n-1],a=e[n+1],s=e[n],o=Ux(i,s,5),l=Ux(a,s,5),c=l.x-o.x,u=l.y-o.y;r.push(o);const h=Math.sqrt(2)*2;let d={x:s.x,y:s.y};if(Math.abs(a.x-i.x)>10&&Math.abs(a.y-i.y)>=10){he.debug("Corner point fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));const f=5;s.x===o.x?d={x:c<0?o.x-f+h:o.x+f-h,y:u<0?o.y-h:o.y+h}:d={x:c<0?o.x-h:o.x+h,y:u<0?o.y-f+h:o.y+f-h}}else he.debug("Corner point skipping fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));r.push(d,l)}else r.push(e[n]);return r},"fixCorners"),Kee=k((e,t,r)=>{const n=e-t-r,i=2,a=2,s=i+a,o=Math.floor(n/s),l=Array(o).fill(`${i} ${a}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),uS=k(function(e,t,r,n,i,a,s,o=!1){const{handDrawnSeed:l}=Mt();let c=t.points,u=!1;const h=i;var d=a;const f=[];for(const $ in t.cssCompiledStyles)tg($)||f.push(t.cssCompiledStyles[$]);he.debug("UIO intersect check",t.points,d.x,h.x),d.intersect&&h.intersect&&!o&&(c=c.slice(1,t.points.length-1),c.unshift(h.intersect(c[0])),he.debug("Last point UIO",t.start,"-->",t.end,c[c.length-1],d,d.intersect(c[c.length-1])),c.push(d.intersect(c[c.length-1])));const p=btoa(JSON.stringify(c));t.toCluster&&(he.info("to cluster abc88",r.get(t.toCluster)),c=jx(t.points,r.get(t.toCluster).node),u=!0),t.fromCluster&&(he.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(c,null,2)),c=jx(c.reverse(),r.get(t.fromCluster).node).reverse(),u=!0);let m=c.filter($=>!Number.isNaN($.y));m=Xee(m);let b=Bl;switch(b=y0,t.curve){case"linear":b=y0;break;case"basis":b=Bl;break;case"cardinal":b=kw;break;case"bumpX":b=gw;break;case"bumpY":b=bw;break;case"catmullRom":b=Tw;break;case"monotoneX":b=Nw;break;case"monotoneY":b=Lw;break;case"natural":b=Iw;break;case"step":b=Rw;break;case"stepAfter":b=Dw;break;case"stepBefore":b=Bw;break;default:b=Bl}const{x:y,y:v}=v8(t),T=pw().x(y).y(v).curve(b);let A;switch(t.thickness){case"normal":A="edge-thickness-normal";break;case"thick":A="edge-thickness-thick";break;case"invisible":A="edge-thickness-invisible";break;default:A="edge-thickness-normal"}switch(t.pattern){case"solid":A+=" edge-pattern-solid";break;case"dotted":A+=" edge-pattern-dotted";break;case"dashed":A+=" edge-pattern-dashed";break;default:A+=" edge-pattern-solid"}let E,S=t.curve==="rounded"?hS(dS(m,t),5):T(m);const I=Array.isArray(t.style)?t.style:[t.style];let D=I.find($=>$?.startsWith("stroke:")),H=!1;if(t.look==="handDrawn"){const $=Fe.svg(e);Object.assign([],m);const q=$.path(S,{roughness:.3,seed:l});A+=" transition",E=Ct(q).select("path").attr("id",t.id).attr("class"," "+A+(t.classes?" "+t.classes:"")).attr("style",I?I.reduce((Z,V)=>Z+";"+V,""):"");let W=E.attr("d");E.attr("d",W),e.node().appendChild(E.node())}else{const $=f.join(";"),q=I?I.reduce((ne,N)=>ne+N+";",""):"";let W="";t.animate&&(W=" edge-animation-fast"),t.animation&&(W=" edge-animation-"+t.animation);const Z=($?$+";"+q+";":q)+";"+(I?I.reduce((ne,N)=>ne+";"+N,""):"");E=e.append("path").attr("d",S).attr("id",t.id).attr("class"," "+A+(t.classes?" "+t.classes:"")+(W??"")).attr("style",Z),D=Z.match(/stroke:([^;]+)/)?.[1],H=t.animate===!0||!!t.animation||$.includes("animation");const V=E.node(),ve=typeof V.getTotalLength=="function"?V.getTotalLength():0,L=lx[t.arrowTypeStart]||0,ae=lx[t.arrowTypeEnd]||0;if(t.look==="neo"&&!H){const N=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?Kee(ve,L,ae):`0 ${L} ${ve-L-ae} ${ae}`}; stroke-dashoffset: 0;`;E.attr("style",N+E.attr("style"))}}E.attr("data-edge",!0),E.attr("data-et","edge"),E.attr("data-id",t.id),E.attr("data-points",p),t.showPoints&&m.forEach($=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",$.x).attr("cy",$.y)});let R="";(Mt().flowchart.arrowMarkerAbsolute||Mt().state.arrowMarkerAbsolute)&&(R=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,R=R.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),he.info("arrowTypeStart",t.arrowTypeStart),he.info("arrowTypeEnd",t.arrowTypeEnd),Uee(E,t,R,s,n,D);const F=Math.floor(c.length/2),G=c[F];_n.isLabelCoordinateInPath(G,E.attr("d"))||(u=!0);let ee={};return u&&(ee.updatedPath=c),ee.originalPath=t.points,ee},"insertEdge");function hS(e,t){if(e.length<2)return"";let r="";const n=e.length,i=1e-5;for(let a=0;a<n;a++){const s=e[a],o=e[a-1],l=e[a+1];if(a===0)r+=`M${s.x},${s.y}`;else if(a===n-1)r+=`L${s.x},${s.y}`;else{const c=s.x-o.x,u=s.y-o.y,h=l.x-s.x,d=l.y-s.y,f=Math.hypot(c,u),p=Math.hypot(h,d);if(f<i||p<i){r+=`L${s.x},${s.y}`;continue}const m=c/f,b=u/f,y=h/p,v=d/p,T=m*y+b*v,A=Math.max(-1,Math.min(1,T)),E=Math.acos(A);if(E<i||Math.abs(Math.PI-E)<i){r+=`L${s.x},${s.y}`;continue}const S=Math.min(t/Math.sin(E/2),f/2,p/2),I=s.x-m*S,D=s.y-b*S,H=s.x+y*S,R=s.y+v*S;r+=`L${I},${D}`,r+=`Q${s.x},${s.y} ${H},${R}`}}return r}k(hS,"generateRoundedPath");function rm(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,n=t.y-e.y;return{angle:Math.atan2(n,r),deltaX:r,deltaY:n}}k(rm,"calculateDeltaAndAngle");function dS(e,t){const r=e.map(i=>({...i}));if(e.length>=2&&Lr[t.arrowTypeStart]){const i=Lr[t.arrowTypeStart],a=e[0],s=e[1],{angle:o}=rm(a,s),l=i*Math.cos(o),c=i*Math.sin(o);r[0].x=a.x+l,r[0].y=a.y+c}const n=e.length;if(n>=2&&Lr[t.arrowTypeEnd]){const i=Lr[t.arrowTypeEnd],a=e[n-1],s=e[n-2],{angle:o}=rm(s,a),l=i*Math.cos(o),c=i*Math.sin(o);r[n-1].x=a.x-l,r[n-1].y=a.y-c}return r}k(dS,"applyMarkerOffsetsToPoints");var Qee=k((e,t,r,n)=>{t.forEach(i=>{fte[i](e,r,n)})},"insertMarkers"),Zee=k((e,t,r)=>{he.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+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")},"extension"),Jee=k((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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")},"composition"),ete=k((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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")},"aggregation"),tte=k((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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")},"dependency"),rte=k((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+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("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+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("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),nte=k((e,t,r)=>{e.append("marker").attr("id",r+"_"+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",r+"_"+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")},"point"),ite=k((e,t,r)=>{e.append("marker").attr("id",r+"_"+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",r+"_"+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")},"circle"),ate=k((e,t,r)=>{e.append("marker").attr("id",r+"_"+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",r+"_"+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")},"cross"),ste=k((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+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"),ote=k((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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"),lte=k((e,t,r)=>{const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("d","M9,0 L9,18");const i=e.append("defs").append("marker").attr("id",r+"_"+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"),cte=k((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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"),ute=k((e,t,r)=>{const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const i=e.append("defs").append("marker").attr("id",r+"_"+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"),hte=k((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
|
627
|
+
L20,10
|
|
628
|
+
M20,10
|
|
629
|
+
L0,20`)},"requirement_arrow"),dte=k((e,t,r)=>{const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),fte={extension:Zee,composition:Jee,aggregation:ete,dependency:tte,lollipop:rte,point:nte,circle:ite,cross:ate,barb:ste,only_one:ote,zero_or_one:lte,one_or_more:cte,zero_or_more:ute,requirement_arrow:hte,requirement_contains:dte},fS=Qee,pte={common:hs,getConfig:Cr,insertCluster:q7,insertEdge:uS,insertEdgeLabel:oS,insertMarkers:fS,insertNode:Ng,interpolateToCurve:og,labelHelper:it,log:he,positionEdgeLabel:lS},sc={},pS=k(e=>{for(const t of e)sc[t.name]=t},"registerLayoutLoaders"),mte=k(()=>{pS([{name:"dagre",loader:k(async()=>await Promise.resolve().then(()=>require("./dagre-6UL2VRFP-DEQXyXKh.js")),"loader")},{name:"cose-bilkent",loader:k(async()=>await Promise.resolve().then(()=>require("./cose-bilkent-S5V4N54A-1B77PywG.js")),"loader")}])},"registerDefaultLayoutLoaders");mte();var gte=k(async(e,t)=>{if(!(e.layoutAlgorithm in sc))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=sc[e.layoutAlgorithm];return(await r.loader()).render(e,t,pte,{algorithm:r.algorithm})},"render"),bte=k((e="",{fallback:t="dagre"}={})=>{if(e in sc)return e;if(t in sc)return he.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),mS="comm",gS="rule",bS="decl",yte="@import",xte="@namespace",vte="@keyframes",kte="@layer",yS=Math.abs,Lg=String.fromCharCode;function xS(e){return e.trim()}function Nu(e,t,r){return e.replace(t,r)}function wte(e,t,r){return e.indexOf(t,r)}function zs(e,t){return e.charCodeAt(t)|0}function lo(e,t,r){return e.slice(t,r)}function ei(e){return e.length}function Tte(e){return e.length}function uu(e,t){return t.push(e),e}var Vh=1,co=1,vS=0,In=0,ir=0,Lo="";function Mg(e,t,r,n,i,a,s,o){return{value:e,root:t,parent:r,type:n,props:i,children:a,line:Vh,column:co,length:s,return:"",siblings:o}}function Cte(){return ir}function Ste(){return ir=In>0?zs(Lo,--In):0,co--,ir===10&&(co=1,Vh--),ir}function qn(){return ir=In<vS?zs(Lo,In++):0,co++,ir===10&&(co=1,Vh++),ir}function ca(){return zs(Lo,In)}function Lu(){return In}function Xh(e,t){return lo(Lo,e,t)}function oc(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 Ete(e){return Vh=co=1,vS=ei(Lo=e),In=0,[]}function _te(e){return Lo="",e}function ff(e){return xS(Xh(In-1,nm(e===91?e+2:e===40?e+1:e)))}function Ate(e){for(;(ir=ca())&&ir<33;)qn();return oc(e)>2||oc(ir)>3?"":" "}function Nte(e,t){for(;--t&&qn()&&!(ir<48||ir>102||ir>57&&ir<65||ir>70&&ir<97););return Xh(e,Lu()+(t<6&&ca()==32&&qn()==32))}function nm(e){for(;qn();)switch(ir){case e:return In;case 34:case 39:e!==34&&e!==39&&nm(ir);break;case 40:e===41&&nm(e);break;case 92:qn();break}return In}function Lte(e,t){for(;qn()&&e+ir!==57;)if(e+ir===84&&ca()===47)break;return"/*"+Xh(t,In-1)+"*"+Lg(e===47?e:qn())}function Mte(e){for(;!oc(ca());)qn();return Xh(e,In)}function Ite(e){return _te(Mu("",null,null,null,[""],e=Ete(e),0,[0],e))}function Mu(e,t,r,n,i,a,s,o,l){for(var c=0,u=0,h=s,d=0,f=0,p=0,m=1,b=1,y=1,v=0,T="",A=i,E=a,S=n,I=T;b;)switch(p=v,v=qn()){case 40:if(p!=108&&zs(I,h-1)==58){wte(I+=Nu(ff(v),"&","&\f"),"&\f",yS(c?o[c-1]:0))!=-1&&(y=-1);break}case 34:case 39:case 91:I+=ff(v);break;case 9:case 10:case 13:case 32:I+=Ate(p);break;case 92:I+=Nte(Lu()-1,7);continue;case 47:switch(ca()){case 42:case 47:uu(Rte(Lte(qn(),Lu()),t,r,l),l),(oc(p||1)==5||oc(ca()||1)==5)&&ei(I)&&lo(I,-1,void 0)!==" "&&(I+=" ");break;default:I+="/"}break;case 123*m:o[c++]=ei(I)*y;case 125*m:case 59:case 0:switch(v){case 0:case 125:b=0;case 59+u:y==-1&&(I=Nu(I,/\f/g,"")),f>0&&(ei(I)-h||m===0&&p===47)&&uu(f>32?Gx(I+";",n,r,h-1,l):Gx(Nu(I," ","")+";",n,r,h-2,l),l);break;case 59:I+=";";default:if(uu(S=Wx(I,t,r,c,u,i,o,T,A=[],E=[],h,a),a),v===123)if(u===0)Mu(I,t,S,S,A,a,h,o,E);else{switch(d){case 99:if(zs(I,3)===110)break;case 108:if(zs(I,2)===97)break;default:u=0;case 100:case 109:case 115:}u?Mu(e,S,S,n&&uu(Wx(e,S,S,0,0,i,o,T,i,A=[],h,E),E),i,E,h,o,n?A:E):Mu(I,S,S,S,[""],E,0,o,E)}}c=u=f=0,m=y=1,T=I="",h=s;break;case 58:h=1+ei(I),f=p;default:if(m<1){if(v==123)--m;else if(v==125&&m++==0&&Ste()==125)continue}switch(I+=Lg(v),v*m){case 38:y=u>0?1:(I+="\f",-1);break;case 44:o[c++]=(ei(I)-1)*y,y=1;break;case 64:ca()===45&&(I+=ff(qn())),d=ca(),u=h=ei(T=I+=Mte(Lu())),v++;break;case 45:p===45&&ei(I)==2&&(m=0)}}return a}function Wx(e,t,r,n,i,a,s,o,l,c,u,h){for(var d=i-1,f=i===0?a:[""],p=Tte(f),m=0,b=0,y=0;m<n;++m)for(var v=0,T=lo(e,d+1,d=yS(b=s[m])),A=e;v<p;++v)(A=xS(b>0?f[v]+" "+T:Nu(T,/&\f/g,f[v])))&&(l[y++]=A);return Mg(e,t,r,i===0?gS:o,l,c,u,h)}function Rte(e,t,r,n){return Mg(e,t,r,mS,Lg(Cte()),lo(e,2,-2),0,n)}function Gx(e,t,r,n,i){return Mg(e,t,r,bS,lo(e,0,n),lo(e,n+1,-1),n,i)}function im(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function Bte(e,t,r,n){switch(e.type){case kte:if(e.children.length)break;case yte:case xte:case bS:return e.return=e.return||e.value;case mS:return"";case vte:return e.return=e.value+"{"+im(e.children,n)+"}";case gS:if(!ei(e.value=e.props.join(",")))return""}return ei(r=im(e.children,n))?e.return=e.value+"{"+r+"}":""}var Dte=L8(Object.keys,Object),Ote=Object.prototype,Pte=Ote.hasOwnProperty;function kS(e){if(!Ph(e))return Dte(e);var t=[];for(var r in Object(e))Pte.call(e,r)&&r!="constructor"&&t.push(r);return t}var am=ps(bi,"DataView"),sm=ps(bi,"Promise"),$0=ps(bi,"Set"),om=ps(bi,"WeakMap"),Yx="[object Map]",Fte="[object Object]",Vx="[object Promise]",Xx="[object Set]",Kx="[object WeakMap]",Qx="[object DataView]",$te=fs(am),zte=fs(rc),Hte=fs(sm),qte=fs($0),jte=fs(om);exports.getTag=ds;(am&&exports.getTag(new am(new ArrayBuffer(1)))!=Qx||rc&&exports.getTag(new rc)!=Yx||sm&&exports.getTag(sm.resolve())!=Vx||$0&&exports.getTag(new $0)!=Xx||om&&exports.getTag(new om)!=Kx)&&(exports.getTag=function(e){var t=ds(e),r=t==Fte?e.constructor:void 0,n=r?fs(r):"";if(n)switch(n){case $te:return Qx;case zte:return Yx;case Hte:return Vx;case qte:return Xx;case jte:return Kx}return t});var Ute="[object Map]",Wte="[object Set]",Gte=Object.prototype,Yte=Gte.hasOwnProperty;function lm(e){if(e==null)return!0;if(Cc(e)&&(ic(e)||typeof e=="string"||typeof e.splice=="function"||Fh(e)||$h(e)||nc(e)))return!e.length;var t=exports.getTag(e);if(t==Ute||t==Wte)return!e.size;if(Ph(e))return!kS(e).length;for(var r in e)if(Yte.call(e,r))return!1;return!0}var wS="c4",Vte=k(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),Xte=k(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./c4Diagram-YG6GDRKO-CMXx6pyB.js"));return{id:wS,diagram:e}},"loader"),Kte={id:wS,detector:Vte,loader:Xte},Qte=Kte,TS="flowchart",Zte=k((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),Jte=k(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-BChiRwcp.js"));return{id:TS,diagram:e}},"loader"),ere={id:TS,detector:Zte,loader:Jte},tre=ere,CS="flowchart-v2",rre=k((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"),nre=k(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-BChiRwcp.js"));return{id:CS,diagram:e}},"loader"),ire={id:CS,detector:rre,loader:nre},are=ire,SS="er",sre=k(e=>/^\s*erDiagram/.test(e),"detector"),ore=k(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./erDiagram-Q2GNP2WA-AS2vnQKc.js"));return{id:SS,diagram:e}},"loader"),lre={id:SS,detector:sre,loader:ore},cre=lre,ES="gitGraph",ure=k(e=>/^\s*gitGraph/.test(e),"detector"),hre=k(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./gitGraphDiagram-NY62KEGX-Cm9ywQoW.js"));return{id:ES,diagram:e}},"loader"),dre={id:ES,detector:ure,loader:hre},fre=dre,_S="gantt",pre=k(e=>/^\s*gantt/.test(e),"detector"),mre=k(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./ganttDiagram-JELNMOA3-BGy1b6TD.js"));return{id:_S,diagram:e}},"loader"),gre={id:_S,detector:pre,loader:mre},bre=gre,AS="info",yre=k(e=>/^\s*info/.test(e),"detector"),xre=k(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./infoDiagram-WHAUD3N6-q-yX3_By.js"));return{id:AS,diagram:e}},"loader"),vre={id:AS,detector:yre,loader:xre},NS="pie",kre=k(e=>/^\s*pie/.test(e),"detector"),wre=k(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./pieDiagram-ADFJNKIX-CKzchAXU.js"));return{id:NS,diagram:e}},"loader"),Tre={id:NS,detector:kre,loader:wre},LS="quadrantChart",Cre=k(e=>/^\s*quadrantChart/.test(e),"detector"),Sre=k(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./quadrantDiagram-AYHSOK5B-D2Rt32D2.js"));return{id:LS,diagram:e}},"loader"),Ere={id:LS,detector:Cre,loader:Sre},_re=Ere,MS="xychart",Are=k(e=>/^\s*xychart(-beta)?/.test(e),"detector"),Nre=k(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./xychartDiagram-PRI3JC2R-CQgij0Fy.js"));return{id:MS,diagram:e}},"loader"),Lre={id:MS,detector:Are,loader:Nre},Mre=Lre,IS="requirement",Ire=k(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),Rre=k(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./requirementDiagram-UZGBJVZJ-CSgb6U9N.js"));return{id:IS,diagram:e}},"loader"),Bre={id:IS,detector:Ire,loader:Rre},Dre=Bre,RS="sequence",Ore=k(e=>/^\s*sequenceDiagram/.test(e),"detector"),Pre=k(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sequenceDiagram-WL72ISMW-BZJ7d_X4.js"));return{id:RS,diagram:e}},"loader"),Fre={id:RS,detector:Ore,loader:Pre},$re=Fre,BS="class",zre=k((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),Hre=k(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-2ON5EDUG-UNrH9bQo.js"));return{id:BS,diagram:e}},"loader"),qre={id:BS,detector:zre,loader:Hre},jre=qre,DS="classDiagram",Ure=k((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),Wre=k(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-v2-WZHVMYZB-UNrH9bQo.js"));return{id:DS,diagram:e}},"loader"),Gre={id:DS,detector:Ure,loader:Wre},Yre=Gre,OS="state",Vre=k((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),Xre=k(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-FKZM4ZOC-Cfuygt_P.js"));return{id:OS,diagram:e}},"loader"),Kre={id:OS,detector:Vre,loader:Xre},Qre=Kre,PS="stateDiagram",Zre=k((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),Jre=k(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-v2-4FDKWEC3-BiriAQkj.js"));return{id:PS,diagram:e}},"loader"),ene={id:PS,detector:Zre,loader:Jre},tne=ene,FS="journey",rne=k(e=>/^\s*journey/.test(e),"detector"),nne=k(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./journeyDiagram-XKPGCS4Q-BqtyHvQF.js"));return{id:FS,diagram:e}},"loader"),ine={id:FS,detector:rne,loader:nne},ane=ine,sne=k((e,t,r)=>{he.debug(`rendering svg for syntax error
|
|
630
|
+
`);const n=Ow(t),i=n.append("g");n.attr("viewBox","0 0 2412 512"),L1(n,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 ${r}`)},"draw"),$S={draw:sne},one=$S,lne={db:{},renderer:$S,parser:{parse:k(()=>{},"parse")}},cne=lne,zS="flowchart-elk",une=k((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),hne=k(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-BChiRwcp.js"));return{id:zS,diagram:e}},"loader"),dne={id:zS,detector:une,loader:hne},fne=dne,HS="timeline",pne=k(e=>/^\s*timeline/.test(e),"detector"),mne=k(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./timeline-definition-IT6M3QCI-CBmpRgUM.js"));return{id:HS,diagram:e}},"loader"),gne={id:HS,detector:pne,loader:mne},bne=gne,qS="mindmap",yne=k(e=>/^\s*mindmap/.test(e),"detector"),xne=k(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./mindmap-definition-VGOIOE7T-ZHY70ZzV.js"));return{id:qS,diagram:e}},"loader"),vne={id:qS,detector:yne,loader:xne},kne=vne,jS="kanban",wne=k(e=>/^\s*kanban/.test(e),"detector"),Tne=k(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./kanban-definition-3W4ZIXB7-DraMxv75.js"));return{id:jS,diagram:e}},"loader"),Cne={id:jS,detector:wne,loader:Tne},Sne=Cne,US="sankey",Ene=k(e=>/^\s*sankey(-beta)?/.test(e),"detector"),_ne=k(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sankeyDiagram-TZEHDZUN-C8jpBnM0.js"));return{id:US,diagram:e}},"loader"),Ane={id:US,detector:Ene,loader:_ne},Nne=Ane,WS="packet",Lne=k(e=>/^\s*packet(-beta)?/.test(e),"detector"),Mne=k(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-S2PKOQOG-BN04h93a.js"));return{id:WS,diagram:e}},"loader"),Ine={id:WS,detector:Lne,loader:Mne},GS="radar",Rne=k(e=>/^\s*radar-beta/.test(e),"detector"),Bne=k(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-QEK2KX5R-Doa8ooC_.js"));return{id:GS,diagram:e}},"loader"),Dne={id:GS,detector:Rne,loader:Bne},YS="block",One=k(e=>/^\s*block(-beta)?/.test(e),"detector"),Pne=k(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./blockDiagram-VD42YOAC-NQhzFvsO.js"));return{id:YS,diagram:e}},"loader"),Fne={id:YS,detector:One,loader:Pne},$ne=Fne,VS="architecture",zne=k(e=>/^\s*architecture/.test(e),"detector"),Hne=k(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./architectureDiagram-VXUJARFQ-BGsDPmi_.js"));return{id:VS,diagram:e}},"loader"),qne={id:VS,detector:zne,loader:Hne},jne=qne,XS="treemap",Une=k(e=>/^\s*treemap/.test(e),"detector"),Wne=k(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-PSM6KHXK-C7tjFZpr.js"));return{id:XS,diagram:e}},"loader"),Gne={id:XS,detector:Une,loader:Wne},Zx=!1,Kh=k(()=>{Zx||(Zx=!0,h0("error",cne,e=>e.toLowerCase().trim()==="error"),h0("---",{db:{clear:k(()=>{},"clear")},styles:{},renderer:{draw:k(()=>{},"draw")},parser:{parse:k(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:k(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),cp(fne,kne,jne),cp(Qte,Sne,Yre,jre,cre,bre,vre,Tre,Dre,$re,are,tre,bne,fre,tne,Qre,ane,_re,Nne,Ine,Mre,$ne,Dne,Gne))},"addDiagrams"),Yne=k(async()=>{he.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Qa).map(async([r,{detector:n,loader:i}])=>{if(i)try{pp(r)}catch{try{const{diagram:a,id:s}=await i();h0(s,a,n)}catch(a){throw he.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Qa[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){he.error(`Failed to load ${t.length} external diagrams`);for(const r of t)he.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),Vne="graphics-document document";function KS(e,t){e.attr("role",Vne),t!==""&&e.attr("aria-roledescription",t)}k(KS,"setA11yDiagramInfo");function QS(e,t,r,n){if(e.insert!==void 0){if(r){const i=`chart-desc-${n}`;e.attr("aria-describedby",i),e.insert("desc",":first-child").attr("id",i).text(r)}if(t){const i=`chart-title-${n}`;e.attr("aria-labelledby",i),e.insert("title",":first-child").attr("id",i).text(t)}}}k(QS,"addSVGa11yTitleDescription");var Ga,cm=(Ga=class{constructor(t,r,n,i,a){this.type=t,this.text=r,this.db=n,this.parser=i,this.renderer=a}static async fromText(t,r={}){const n=Cr(),i=A1(t,n);t=VZ(t)+`
|
|
631
|
+
`;try{pp(i)}catch{const c=WU(i);if(!c)throw new gk(`Diagram ${i} not found.`);const{id:u,diagram:h}=await c();h0(u,h)}const{db:a,parser:s,renderer:o,init:l}=pp(i);return s.parser&&(s.parser.yy=a),a.clear?.(),l?.(n),r.title&&a.setDiagramTitle?.(r.title),await s.parse(t),new Ga(i,t,a,s,o)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},k(Ga,"Diagram"),Ga),Jx=[],Xne=k(()=>{Jx.forEach(e=>{e()}),Jx=[]},"attachFunctions"),Kne=k(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function ZS(e){const t=e.match(mk);if(!t)return{text:e,metadata:{}};let r=x8(t[1],{schema:y8})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const n={};return r.displayMode&&(n.displayMode=r.displayMode.toString()),r.title&&(n.title=r.title.toString()),r.config&&(n.config=r.config),{text:e.slice(t[0].length),metadata:n}}k(ZS,"extractFrontMatter");var Qne=k(e=>e.replace(/\r\n?/g,`
|
|
632
|
+
`).replace(/<(\w+)([^>]*)>/g,(t,r,n)=>"<"+r+n.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Zne=k(e=>{const{text:t,metadata:r}=ZS(e),{displayMode:n,title:i,config:a={}}=r;return n&&(a.gantt||(a.gantt={}),a.gantt.displayMode=n),{title:i,config:a,text:t}},"processFrontmatter"),Jne=k(e=>{const t=_n.detectInit(e)??{},r=_n.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:n})=>n==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:FZ(e),directive:t}},"processDirectives");function Ig(e){const t=Qne(e),r=Zne(t),n=Jne(r.text),i=zh(r.config,n.directive);return e=Kne(n.text),{code:e,title:r.title,config:i}}k(Ig,"preprocessDiagram");function JS(e){const t=new TextEncoder().encode(e),r=Array.from(t,n=>String.fromCodePoint(n)).join("");return btoa(r)}k(JS,"toBase64");var eie=5e4,tie="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",rie="sandbox",nie="loose",iie="http://www.w3.org/2000/svg",aie="http://www.w3.org/1999/xlink",sie="http://www.w3.org/1999/xhtml",oie="100%",lie="100%",cie="border:0;margin:0;",uie="margin:0",hie="allow-top-navigation-by-user-activation allow-popups",die='The "iframe" tag is not supported by your browser.',fie=["foreignobject"],pie=["dominant-baseline"];function Rg(e){const t=Ig(e);return c0(),sW(t.config??{}),t}k(Rg,"processAndSetConfigs");async function eE(e,t){Kh();try{const{code:r,config:n}=Rg(e);return{diagramType:(await rE(r)).type,config:n}}catch(r){if(t?.suppressErrors)return!1;throw r}}k(eE,"parse");var e4=k((e,t,r=[])=>`
|
|
633
|
+
.${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),mie=k((e,t=new Map)=>{let r="";if(e.themeCSS!==void 0&&(r+=`
|
|
634
|
+
${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
|
|
635
|
+
:root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=`
|
|
636
|
+
:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const s=e.htmlLabels??e.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(o=>{lm(o.styles)||s.forEach(l=>{r+=e4(o.id,l,o.styles)}),lm(o.textStyles)||(r+=e4(o.id,"tspan",(o?.textStyles||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),gie=k((e,t,r,n)=>{const i=mie(e,r),a=EW(t,i,e.themeVariables);return im(Ite(`${n}{${a}}`),Bte)},"createUserStyles"),bie=k((e="",t,r)=>{let n=e;return!r&&!t&&(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=Ta(n),n=n.replace(/<br>/g,"<br/>"),n},"cleanUpSvgCode"),yie=k((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":lie,n=JS(`<body style="${uie}">${e}</body>`);return`<iframe style="width:${oie};height:${r};${cie}" src="data:text/html;charset=UTF-8;base64,${n}" sandbox="${hie}">
|
|
637
|
+
${die}
|
|
638
|
+
</iframe>`},"putIntoIFrame"),t4=k((e,t,r,n,i)=>{const a=e.append("div");a.attr("id",r),n&&a.attr("style",n);const s=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",iie);return i&&s.attr("xmlns:xlink",i),s.append("g"),e},"appendDivSvgG");function um(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}k(um,"sandboxedIframe");var xie=k((e,t,r,n)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(n)?.remove()},"removeExistingElements"),vie=k(async function(e,t,r){Kh();const n=Rg(t);t=n.code;const i=Cr();he.debug(i),t.length>(i?.maxTextSize??eie)&&(t=tie);const a="#"+e,s="i"+e,o="#"+s,l="d"+e,c="#"+l,u=k(()=>{const ee=Ct(d?o:c).node();ee&&"remove"in ee&&ee.remove()},"removeTempElements");let h=Ct("body");const d=i.securityLevel===rie,f=i.securityLevel===nie,p=i.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),d){const G=um(Ct(r),s);h=Ct(G.nodes()[0].contentDocument.body),h.node().style.margin=0}else h=Ct(r);t4(h,e,l,`font-family: ${p}`,aie)}else{if(xie(document,e,l,s),d){const G=um(Ct("body"),s);h=Ct(G.nodes()[0].contentDocument.body),h.node().style.margin=0}else h=Ct("body");t4(h,e,l)}let m,b;try{m=await cm.fromText(t,{title:n.title})}catch(G){if(i.suppressErrorRendering)throw u(),G;m=await cm.fromText("error"),b=G}const y=h.select(c).node(),v=m.type,T=y.firstChild,A=T.firstChild,E=m.renderer.getClasses?.(t,m),S=gie(i,v,E,a),I=document.createElement("style");I.innerHTML=S,T.insertBefore(I,A);try{await m.renderer.draw(t,e,ap.version,m)}catch(G){throw i.suppressErrorRendering?u():one.draw(t,e,ap.version),G}const D=h.select(`${c} svg`),H=m.db.getAccTitle?.(),R=m.db.getAccDescription?.();nE(v,D,H,R),h.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",sie);let F=h.select(c).node().innerHTML;if(he.debug("config.arrowMarkerAbsolute",i.arrowMarkerAbsolute),F=bie(F,d,sr(i.arrowMarkerAbsolute)),d){const G=h.select(c+" svg").node();F=yie(F,G)}else f||(F=to.sanitize(F,{ADD_TAGS:fie,ADD_ATTR:pie,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(Xne(),b)throw b;return u(),{diagramType:v,svg:F,bindFunctions:m.db.bindFunctions}},"render");function tE(e={}){const t=ar({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),iW(t),t?.theme&&t.theme in Pi?t.themeVariables=Pi[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Pi.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?nW(t):kk();_1(r.logLevel),Kh()}k(tE,"initialize");var rE=k((e,t={})=>{const{code:r}=Ig(e);return cm.fromText(r,t)},"getDiagramFromText");function nE(e,t,r,n){KS(t,e),QS(t,r,n,t.attr("id"))}k(nE,"addA11yInfo");var is=Object.freeze({render:vie,parse:eE,getDiagramFromText:rE,initialize:tE,getConfig:Cr,setConfig:wk,getSiteConfig:kk,updateSiteConfig:aW,reset:k(()=>{c0()},"reset"),globalReset:k(()=>{c0(ro)},"globalReset"),defaultConfig:ro});_1(Cr().logLevel);c0(Cr());var kie=k((e,t,r)=>{he.warn(e),fg(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),iE=k(async function(e={querySelector:".mermaid"}){try{await wie(e)}catch(t){if(fg(t)&&he.error(t.str),ji.parseError&&ji.parseError(t),!e.suppressErrors)throw he.error("Use the suppressErrors option to suppress these errors"),t}},"run"),wie=k(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const n=is.getConfig();he.debug(`${e?"":"No "}Callback function found`);let i;if(r)i=r;else if(t)i=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");he.debug(`Found ${i.length} diagrams`),n?.startOnLoad!==void 0&&(he.debug("Start On Load: "+n?.startOnLoad),is.updateSiteConfig({startOnLoad:n?.startOnLoad}));const a=new _n.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed);let s;const o=[];for(const l of Array.from(i)){if(he.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${a.next()}`;s=l.innerHTML,s=b7(_n.entityDecode(s)).trim().replace(/<br\s*\/?>/gi,"<br/>");const u=_n.detectInit(s);u&&he.debug("Detected early reinit: ",u);try{const{svg:h,bindFunctions:d}=await lE(c,s,l);l.innerHTML=h,e&&await e(c),d&&d(l)}catch(h){kie(h,o,ji.parseError)}}if(o.length>0)throw o[0]},"runThrowsErrors"),aE=k(function(e){is.initialize(e)},"initialize"),Tie=k(async function(e,t,r){he.warn("mermaid.init is deprecated. Please use run instead."),e&&aE(e);const n={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?n.querySelector=t:t&&(t instanceof HTMLElement?n.nodes=[t]:n.nodes=t),await iE(n)},"init"),Cie=k(async(e,{lazyLoad:t=!0}={})=>{Kh(),cp(...e),t===!1&&await Yne()},"registerExternalDiagrams"),sE=k(function(){if(ji.startOnLoad){const{startOnLoad:e}=is.getConfig();e&&ji.run().catch(t=>he.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",sE,!1);var Sie=k(function(e){ji.parseError=e},"setParseErrorHandler"),z0=[],pf=!1,oE=k(async()=>{if(!pf){for(pf=!0;z0.length>0;){const e=z0.shift();if(e)try{await e()}catch(t){he.error("Error executing queue",t)}}pf=!1}},"executeQueue"),Eie=k(async(e,t)=>new Promise((r,n)=>{const i=k(()=>new Promise((a,s)=>{is.parse(e,t).then(o=>{a(o),r(o)},o=>{he.error("Error parsing",o),ji.parseError?.(o),s(o),n(o)})}),"performCall");z0.push(i),oE().catch(n)}),"parse"),lE=k((e,t,r)=>new Promise((n,i)=>{const a=k(()=>new Promise((s,o)=>{is.render(e,t,r).then(l=>{s(l),n(l)},l=>{he.error("Error parsing",l),ji.parseError?.(l),o(l),i(l)})}),"performCall");z0.push(a),oE().catch(i)}),"render"),_ie=k(()=>Object.keys(Qa).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),ji={startOnLoad:!0,mermaidAPI:is,parse:Eie,render:lE,init:Tie,run:iE,registerExternalDiagrams:Cie,registerLayoutLoaders:pS,initialize:aE,parseError:void 0,contentLoaded:sE,setParseErrorHandler:Sie,detectType:A1,registerIconPacks:v7,getRegisteredDiagramsMetadata:_ie},mf=ji;var r4={startOnLoad:!1,theme:"default",securityLevel:"strict",fontFamily:"monospace",suppressErrorRendering:!0};function Aie(e={}){let t=!1,r={...r4,...e.config},n={initialize(i){r={...r4,...e.config,...i},mf.initialize(r),t=!0},async render(i,a){return t||(mf.initialize(r),t=!0),await mf.render(i,a)}};return{name:"mermaid",type:"diagram",language:"mermaid",getMermaid(i){return i&&n.initialize(i),n}}}var cE=Aie();function Bg(e){const{bold:t,italic:r,strike:n}=e;return t&&r&&n?"boldItalicStrikethrough":t&&r?"boldItalic":t&&n?"boldStrikethrough":r&&n?"italicStrikethrough":t?"bold":r?"italic":n?"strikethrough":"plain"}function uE(e){switch(e){case"bold":return{bold:!0,italic:!1,strike:!1};case"italic":return{bold:!1,italic:!0,strike:!1};case"strikethrough":return{bold:!1,italic:!1,strike:!0};case"boldItalic":return{bold:!0,italic:!0,strike:!1};case"boldStrikethrough":return{bold:!0,italic:!1,strike:!0};case"italicStrikethrough":return{bold:!1,italic:!0,strike:!0};case"boldItalicStrikethrough":return{bold:!0,italic:!0,strike:!0};default:return{bold:!1,italic:!1,strike:!1}}}function Bi(e){const t=[];for(const r of e){if(!r.text)continue;const n=t[t.length-1];if(n&&n.style===r.style&&(n.style!=="link"||n.href===r.href)){n.text+=r.text;continue}t.push({...r})}return t}function hE(e,t){let r=0;for(let n=t-1;n>=0&&e[n]==="\\";n--)r++;return r%2===1}function hu(e,t,r){let n=r;for(;n<=e.length-t.length;){const i=e.indexOf(t,n);if(i===-1)return-1;if(!hE(e,i))return i;n=i+1}return-1}function dE(e,t){const r=[];let n=0,i="";const a=()=>{i&&(r.push({text:i,style:Bg(t)}),i="")};for(;n<e.length;){if(e[n]==="\\"&&n+1<e.length){i+=e[n+1],n+=2;continue}if(e[n]==="["){const l=hu(e,"]",n+1);if(l!==-1&&e[l+1]==="("){const c=hu(e,")",l+2);if(c!==-1){a();const u=e.slice(n+1,l),h=e.slice(l+2,c);r.push({text:u,style:"link",href:h}),n=c+1;continue}}}if(e[n]==="`"){const l=hu(e,"`",n+1);if(l!==-1){a(),r.push({text:e.slice(n+1,l),style:"code"}),n=l+1;continue}}if(e[n]==="$"&&e[n+1]!=="$"){const l=(()=>{for(let c=n+1;c<e.length;c++)if(e[c]==="$"&&!hE(e,c)&&e[c-1]!=="$")return c;return-1})();if(l!==-1){a(),r.push({text:e.slice(n+1,l),style:"math"}),n=l+1;continue}}const s=[{marker:"***",apply:l=>({...l,bold:!0,italic:!0})},{marker:"**",apply:l=>({...l,bold:!0})},{marker:"*",apply:l=>({...l,italic:!0})},{marker:"~~",apply:l=>({...l,strike:!0})}];let o=!1;for(const{marker:l,apply:c}of s)if(e.startsWith(l,n)){const u=hu(e,l,n+l.length);if(u!==-1){a();const h=e.slice(n+l.length,u);r.push(...dE(h,c(t))),n=u+l.length,o=!0}break}o||(i+=e[n],n++)}return a(),r}function ni(e){return Bi(dE(e,{bold:!1,italic:!1,strike:!1}))}function gf(e){return e.map(t=>t.text).join("")}function Nie(e,t){if(e==="code"||e==="link"||e==="math")return e;const r=uE(e),n={...r};return t==="bold"&&(n.bold=!r.bold),t==="italic"&&(n.italic=!r.italic),t==="strikethrough"&&(n.strike=!r.strike),Bg(n)}function Lie(e){return e==="plain"?{open:"",close:""}:e==="italic"?{open:"*",close:"*"}:e==="bold"?{open:"**",close:"**"}:e==="strikethrough"?{open:"~~",close:"~~"}:e==="boldItalic"?{open:"***",close:"***"}:e==="boldStrikethrough"?{open:"~~**",close:"**~~"}:e==="italicStrikethrough"?{open:"~~*",close:"*~~"}:e==="boldItalicStrikethrough"?{open:"~~***",close:"***~~"}:{open:"",close:""}}function n4(e){return e.replace(/\\/g,"\\\\").replace(/\n/g,"\\n")}function Mie(e){let t=0,r=0;for(let n=0;n<e.length;n++)e[n]==="`"?(r++,t=Math.max(t,r)):r=0;return"`".repeat(Math.max(1,t+1))}function pn(e,t={}){const{forParsing:r=!1}=t;return e.map(n=>{if(n.style==="code"){const o=Mie(n.text);return o+n.text+o}if(n.style==="math")return`$${r?n.text:n.text.replace(/\$/g,"\\$")}$`;if(n.style==="link"){const o=r?n.text:n4(n.text),l=n.href||"";return`[${o}](${l})`}const{open:i,close:a}=Lie(n.style),s=r?n.text:n4(n.text);return i+s+a}).join("")}function Dg(e){if(!e.length)return null;let t=0;return e.map((r,n)=>{const i=t,a=r.text.length;t+=a;const s=`${n}-${r.style}`,o=i,l=a,c=r.style;switch(r.style){case"bold":return C.jsx("span",{"data-span-start":o,"data-span-len":l,"data-span-style":c,children:C.jsx("strong",{className:"font-semibold",children:r.text})},s);case"italic":return C.jsx("span",{"data-span-start":o,"data-span-len":l,"data-span-style":c,children:C.jsx("em",{className:"italic",children:r.text})},s);case"strikethrough":return C.jsx("span",{"data-span-start":o,"data-span-len":l,"data-span-style":c,children:C.jsx("s",{className:"line-through",children:r.text})},s);case"boldItalic":return C.jsx("span",{"data-span-start":o,"data-span-len":l,"data-span-style":c,children:C.jsx("strong",{className:"font-semibold",children:C.jsx("em",{className:"italic",children:r.text})})},s);case"boldStrikethrough":return C.jsx("span",{"data-span-start":o,"data-span-len":l,"data-span-style":c,children:C.jsx("strong",{className:"font-semibold",children:C.jsx("s",{className:"line-through",children:r.text})})},s);case"italicStrikethrough":return C.jsx("span",{"data-span-start":o,"data-span-len":l,"data-span-style":c,children:C.jsx("em",{className:"italic",children:C.jsx("s",{className:"line-through",children:r.text})})},s);case"boldItalicStrikethrough":return C.jsx("span",{"data-span-start":o,"data-span-len":l,"data-span-style":c,children:C.jsx("strong",{className:"font-semibold",children:C.jsx("em",{className:"italic",children:C.jsx("s",{className:"line-through",children:r.text})})})},s);case"code":return C.jsx("span",{"data-span-start":o,"data-span-len":l,"data-span-style":c,children:C.jsx("code",{className:"px-1.5 py-0.5 bg-notion-code-bg text-red-600 rounded text-sm font-mono",children:r.text})},s);case"link":return C.jsx("span",{"data-span-start":o,"data-span-len":l,"data-span-style":c,children:C.jsx("a",{href:r.href,className:"text-blue-600 underline hover:text-blue-800",target:"_blank",rel:"noopener noreferrer",children:r.text})},s);case"math":return C.jsx("span",{"data-span-start":o,"data-span-len":l,"data-span-style":c,"data-math":"1",className:"inline-block align-middle [&_.katex-display]:!m-0 [&_.katex-display]:!inline",children:C.jsx(Ka,{plugins:{math:s0},isAnimating:!1,children:`$$${r.text}$$`})},s);default:return C.jsx("span",{"data-span-start":o,"data-span-len":l,"data-span-style":c,children:r.text},s)}})}function i4(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Ns(e,t){return e.map(r=>{const n=i4(r.text);switch(r.style){case"bold":return`<strong class="font-semibold">${n}</strong>`;case"italic":return`<em class="italic">${n}</em>`;case"strikethrough":return`<s class="line-through">${n}</s>`;case"boldItalic":return`<strong class="font-semibold"><em class="italic">${n}</em></strong>`;case"boldStrikethrough":return`<strong class="font-semibold"><s class="line-through">${n}</s></strong>`;case"italicStrikethrough":return`<em class="italic"><s class="line-through">${n}</s></em>`;case"boldItalicStrikethrough":return`<strong class="font-semibold"><em class="italic"><s class="line-through">${n}</s></em></strong>`;case"code":return`<code class="px-1.5 py-0.5 bg-notion-code-bg text-red-600 rounded text-sm font-mono">${n}</code>`;case"link":return`<a href="${i4(r.href||"")}" class="text-blue-600 underline hover:text-blue-800" target="_blank" rel="noopener noreferrer">${n}</a>`;case"math":return`<span data-math="1" class="font-mono text-notion-text bg-notion-code-bg px-1 rounded border border-notion-border"><span data-math-delim="1" class="text-notion-text-secondary select-none" contenteditable="false">$</span>${n}<span data-math-delim="1" class="text-notion-text-secondary select-none" contenteditable="false">$</span></span>`;default:return n}}).join("")}function a4(e,t){return[{...e,text:e.text.slice(0,t)},{...e,text:e.text.slice(t)}]}function fE(e,t){return t==="bold"?e==="bold"||e==="boldItalic"||e==="boldStrikethrough"||e==="boldItalicStrikethrough":t==="italic"?e==="italic"||e==="boldItalic"||e==="italicStrikethrough"||e==="boldItalicStrikethrough":t==="strikethrough"?e==="strikethrough"||e==="boldStrikethrough"||e==="italicStrikethrough"||e==="boldItalicStrikethrough":t==="code"?e==="code":t==="link"?e==="link":t==="math"?e==="math":!1}function pE(e,t,r){const n=[];let i=0;for(const a of e){const s=i,o=i+a.text.length;o>t&&s<r&&n.push(a),i=o}return n}function Iie(e,t,r,n){const i=pE(e,t,r);return i.length===0?!1:i.every(a=>fE(a.style,n))}function Rie(e,t,r,n){return pE(e,t,r).some(a=>fE(a.style,n))}function gl(e,t,r,n,i={}){const a=Math.max(0,Math.min(t,r)),s=Math.max(0,Math.max(t,r));if(a===s)return e;const o=n==="math"?Rie(e,a,s,n):Iie(e,a,s,n);if(n==="math"&&o){const u=[];let h=0;for(const d of e){const f=h,p=h+d.text.length;p>a&&f<s&&d.style==="math"?u.push({...d,style:"plain"}):u.push({...d}),h=p}return Bi(u)}const l=[];let c=0;for(const u of e){const h=c,d=c+u.text.length;if(d<=a||h>=s){l.push({...u}),c=d;continue}const f=Math.max(0,a-h),p=Math.min(u.text.length,s-h);if(f>0){const[m,b]=a4(u,f);l.push(m),u.text=b.text}if(p-f<u.text.length){const[m,b]=a4(u,p-f),y=s4(m,n,o,i);l.push(y),l.push(b)}else{const m=s4(u,n,o,i);l.push(m)}c=d}return Bi(l)}function s4(e,t,r,n){return t==="bold"||t==="italic"||t==="strikethrough"?{...e,style:Bie(e.style,t,!r)}:t==="code"?r?{...e,style:"plain"}:{...e,style:"code",href:void 0}:t==="link"?r?{...e,style:"plain",href:void 0}:{...e,style:"link",href:n.href||""}:t==="math"?r?{...e,style:"plain"}:{...e,style:"math"}:e}function Bie(e,t,r){if(e==="code"||e==="link"||e==="math")return e;const n=uE(e);return t==="bold"&&(n.bold=r),t==="italic"&&(n.italic=r),t==="strikethrough"&&(n.strike=r),Bg(n)}const Die=()=>({inCodeBlock:!1,codeBlockLanguage:"",codeBlockContent:"",inMathBlock:!1,mathBlockContent:"",inMermaidBlock:!1,mermaidContent:""}),Oie=/^```(\w*)?$/,Pie=/^```$/,Fie=/^\$\$$/,$ie=/^\$\$$/,zie=/^(#{1,6})\s+(.*)$/,Hie=/^(\s*)[-*]\s+(.*)$/,qie=/^(\s*)(\d+)\.\s+(.*)$/,jie=/^>\s?(.*)$/,Uie=/^(?:---|\*\*\*|___)$/,Wie=/^!\[([^\]]*)\]\(([^)]+)\)$/;function Gie(e){const t=e.trim();return t?/^:?-{3,}:?$/.test(t):!1}function Yie(e){const t=e.trim(),r=t.startsWith(":"),n=t.endsWith(":");return r&&n?"center":n?"right":"left"}function bf(e){const t=[];let r="",n=!1;for(let i=0;i<e.length;i++){const a=e[i];if(n){r+=a,n=!1;continue}if(a==="\\"){n=!0,r+=a;continue}if(a==="|"){t.push(r),r="";continue}r+=a}return t.push(r),e.trimStart().startsWith("|")&&t.shift(),e.trimEnd().endsWith("|")&&t.pop(),t.map(i=>i.trim())}function o4(e){return e.replace(/<br\s*\/?>/gi,`
|
|
639
|
+
`).replace(/\\\|/g,"|")}function Vie(e){return e.replace(/\n/g,"<br>").replace(/\|/g,"\\|")}function Xie(e){const t=pn(e,{forParsing:!0});return Vie(t)}function l4(e){let t=0,r=0;for(let n=0;n<e.length;n++)e[n]==="`"?(r++,r>t&&(t=r)):r=0;return"`".repeat(Math.max(3,t+1))}function Kie(e){if(Uie.test(e))return{type:"divider",content:"",isComplete:!0};const t=e.match(zie);if(t)return{type:"heading",content:t[2],level:t[1].length,isComplete:!0};const r=e.match(Wie);if(r)return{type:"image",content:r[2],isComplete:!0};const n=e.match(Hie);if(n)return{type:"list",content:n[2],listType:"unordered",depth:n[1].replace(/\t/g," ").length,isComplete:!0};const i=e.match(qie);if(i)return{type:"list",content:i[3],listType:"ordered",depth:i[1].replace(/\t/g," ").length,isComplete:!0};const a=e.match(jie);return a?{type:"blockquote",content:a[1],isComplete:!0}:null}function Ui(e,t=!1,r=[]){const n=e.split(`
|
|
640
|
+
`),i=[],a=Die();let s=[],o=0;const l=(c,u,h={})=>{const d=r[o],f=d&&d.type===c?d.id:Ni(10);if(o++,c==="paragraph"||c==="heading"||c==="list"||c==="blockquote")return{id:f,type:c,spans:ni(u),level:h.level,listType:h.listType,depth:h.depth,isStreaming:h.isStreaming??!1,metadata:{dirty:!1}};if(c==="divider")return{id:f,type:c,isStreaming:h.isStreaming??!1,metadata:{dirty:!1}};if(c==="table"){const p=h.table;return{id:f,type:"table",header:(p?.header||[]).map(m=>m),rows:(p?.rows||[]).map(m=>m.map(b=>b)),align:p?.align,isStreaming:h.isStreaming??!1,metadata:{dirty:!1}}}return{id:f,type:c,content:u,level:h.level,language:h.language,listType:h.listType,isStreaming:h.isStreaming??!1,metadata:{dirty:!1}}};for(let c=0;c<n.length;c++){const u=n[c],h=c===n.length-1;if(a.inCodeBlock){Pie.test(u)&&a.codeBlockContent.length>0?(a.codeBlockLanguage.toLowerCase()==="mermaid"?i.push(l("mermaid",a.codeBlockContent.trimEnd(),{isStreaming:!1})):i.push(l("code",a.codeBlockContent.trimEnd(),{language:a.codeBlockLanguage||"text",isStreaming:!1})),a.inCodeBlock=!1,a.codeBlockLanguage="",a.codeBlockContent=""):(a.codeBlockContent+=(a.codeBlockContent?`
|
|
641
|
+
`:"")+u,t&&h&&(a.codeBlockLanguage.toLowerCase()==="mermaid"?i.push(l("mermaid",a.codeBlockContent,{isStreaming:!0})):i.push(l("code",a.codeBlockContent,{language:a.codeBlockLanguage||"text",isStreaming:!0}))));continue}if(a.inMathBlock){$ie.test(u)&&a.mathBlockContent.length>0?(i.push(l("math",a.mathBlockContent.trimEnd(),{isStreaming:!1})),a.inMathBlock=!1,a.mathBlockContent=""):(a.mathBlockContent+=(a.mathBlockContent?`
|
|
642
|
+
`:"")+u,t&&h&&i.push(l("math",a.mathBlockContent,{isStreaming:!0})));continue}const d=u.match(Oie);if(d){a.inCodeBlock=!0,a.codeBlockLanguage=d[1]||"",a.codeBlockContent="";continue}if(Fie.test(u)){a.inMathBlock=!0,a.mathBlockContent="";continue}if(u.trim()===""){s=[];continue}const p=u.trim().startsWith("|");if(c+1<n.length){const b=bf(u),y=bf(n[c+1]),v=b.length>=1&&b.some(A=>A.length>0),T=y.length===b.length&&y.length>=1&&y.every(A=>Gie(A));if(v&&T){s=[];const A=y.map(Yie),E=b.map(H=>ni(o4(H))),S=[];let I=c+2;for(;I<n.length;I++){const H=n[I];if(H.trim()===""||!H.includes("|"))break;const R=bf(H);if(R.length!==b.length)break;S.push(R.map(F=>ni(o4(F))))}const D=t;i.push(l("table","",{table:{header:E,rows:S,align:A},isStreaming:D})),c=I-1;continue}if(t&&p&&v){const E=n[c+1].trim(),S=E.startsWith("|");if(S&&(E.includes("-")||E==="|"||c+1===n.length-1)||S&&c+1>=n.length-2){s=[];let D=c;const H=[];for(;D<n.length;D++){const R=n[D].trim();if(R===""&&D>c+1||!R.startsWith("|")&&R!=="")break;H.push(n[D])}i.push(l("paragraph",H.join(`
|
|
643
|
+
`),{isStreaming:!0})),c=D-1;continue}}}if(t&&h&&p){s=[],i.push(l("paragraph",u,{isStreaming:!0}));continue}const m=Kie(u);if(m){if(m.type==="list"){const b=m.depth??0;if(s.length===0)s=[b],m.depth=0;else{let y=-1;for(let v=s.length-1;v>=0;v--)if(s[v]<=b){y=v;break}y===-1?(s=[b],m.depth=0):s[y]===b?(s=s.slice(0,y+1),m.depth=y):(s=s.slice(0,y+1),s.push(b),m.depth=y+1)}}else s=[];i.push(l(m.type,m.content,{level:m.level,listType:m.listType,depth:m.depth,isStreaming:t&&h}))}else s=[],i.push(l("paragraph",u,{isStreaming:t&&h}))}return i}function rr(e){const t=[];let r=[];const n=()=>{r=[]},i=s=>{const o=!!s.metadata?.dirty;switch(s.type){case"heading":return n(),"#".repeat(s.level||1)+" "+pn(s.spans);case"code":if(n(),o){const l=l4(s.content),c=s.language||"";return l+c+`
|
|
644
|
+
`+s.content+`
|
|
645
|
+
`+l}return"```"+(s.language||"")+`
|
|
646
|
+
`+s.content+"\n```";case"mermaid":if(n(),o){const l=l4(s.content);return l+`mermaid
|
|
647
|
+
`+s.content+`
|
|
648
|
+
`+l}return"```mermaid\n"+s.content+"\n```";case"math":return n(),`$$
|
|
649
|
+
`+s.content+`
|
|
650
|
+
$$`;case"image":return n(),"";case"table":{n();const l=s.header||[],c=s.rows||[],u=Math.max(l.length,...c.map(b=>b.length)),h=(s.align||[]).slice(0,u),d=b=>b?Xie(b):"",f="| "+Array.from({length:u},(b,y)=>d(l[y])).join(" | ")+" |",p="| "+Array.from({length:u},(b,y)=>{const v=h[y]||"left";return v==="center"?":---:":v==="right"?"---:":"---"}).join(" | ")+" |",m=c.map(b=>"| "+Array.from({length:u},(y,v)=>d(b[v])).join(" | ")+" |");return[f,p,...m].join(`
|
|
651
|
+
`)}case"list":{const l=s.depth||0,c=" ".repeat(l),u=pn(s.spans);if(s.listType==="ordered"){for(;r.length<=l;)r.push(0);r[l]=(r[l]||0)+1;for(let h=l+1;h<r.length;h++)r[h]=0;return`${c}${r[l]}. ${u}`}return`${c}- ${u}`}case"blockquote":return n(),`> ${pn(s.spans)}`;case"divider":return n(),"---";case"paragraph":return n(),pn(s.spans);default:return n(),s.content??""}};let a=null;for(const s of e){const o=i(s);if(t.length>0){const l=a==="list"&&s.type==="list"?`
|
|
652
|
+
`:`
|
|
653
|
+
|
|
654
|
+
`;t.push(l)}t.push(o),a=s.type}return t.join("")}function mE({markdown:e,isStreaming:t}){const r=P.useRef([]);return{blocks:P.useMemo(()=>{const i=Ui(e,t,r.current);return r.current=i,i},[e,t])}}const Qie={"# ":1,"## ":2,"### ":3,"#### ":4,"##### ":5,"###### ":6},Zie={"- ":"unordered","* ":"unordered","1. ":"ordered"},c4={"\\* ":"* ","\\- ":"- ","\\> ":"> "};function gE({onBlockTypeChange:e}={}){const t=P.useCallback(i=>{for(const[a,s]of Object.entries(c4))if(i===a)return s;return null},[]),r=P.useCallback(i=>{for(const s of Object.keys(c4))if(i===s)return null;for(const[s,o]of Object.entries(Qie))if(i.startsWith(s))return{newType:"heading",newContent:i.slice(s.length),level:o};for(const[s,o]of Object.entries(Zie))if(i.startsWith(s))return{newType:"list",newContent:i.slice(s.length),listType:o};if(i.startsWith("> "))return{newType:"blockquote",newContent:i.slice(2)};if(i==="---"||i==="***"||i==="___")return{newType:"divider",newContent:""};const a=i.match(/^```([\w-]*)\s$/);return a?{newType:"code",newContent:"",language:a[1]||"text"}:null},[]),n=P.useCallback((i,a,s,o)=>{if(i.key===" "&&o===s.length){const l=s+" ";if(t(l)&&a.type==="paragraph")return!1;const u=r(l);if(u&&a.type==="paragraph")return i.preventDefault(),e?.(a.id,u.newType,u.newContent,{level:u.level,listType:u.listType,language:u.language}),!0;if(u&&u.newType==="list"&&a.type==="list"&&u.listType!==a.listType)return i.preventDefault(),e?.(a.id,"list",u.newContent,{listType:u.listType,depth:a.depth??0}),!0}if(i.key==="Enter"&&o===s.length){const l=s+" ",c=r(l);if(c?.newType==="code"&&a.type==="paragraph")return i.preventDefault(),e?.(a.id,c.newType,c.newContent,{language:c.language}),!0}return i.key==="Backspace"&&o===0&&a.type!=="paragraph"&&s===""?(i.preventDefault(),e?.(a.id,"paragraph",""),!0):(i.key==="Enter"&&a.type==="code",!1)},[r,t,e]);return{detectShortcut:r,detectEscape:t,handleKeyDown:n}}function Jie(e){const{bold:t,italic:r,strike:n}=e;return t&&r&&n?"boldItalicStrikethrough":t&&r?"boldItalic":t&&n?"boldStrikethrough":r&&n?"italicStrikethrough":t?"bold":r?"italic":n?"strikethrough":"plain"}function eae(e){const t={bold:!1,italic:!1,strike:!1};let r,n=!1,i=!1,a=!1,s=e.parentNode;for(;s&&s.nodeType===Node.ELEMENT_NODE;){const o=s,l=o.tagName.toLowerCase();l==="code"&&(n=!0),l==="a"&&(i=!0,r=o.getAttribute("href")||""),(l==="strong"||l==="b")&&(t.bold=!0),(l==="em"||l==="i")&&(t.italic=!0),(l==="s"||l==="del"||l==="strike")&&(t.strike=!0),l==="span"&&o.getAttribute("data-math")==="1"&&(a=!0),s=s.parentNode}return n?{style:"code"}:a?{style:"math"}:i?{style:"link",href:r}:{style:Jie(t)}}function Og(e){let t=e.parentNode;for(;t&&t.nodeType===Node.ELEMENT_NODE;){if(t.getAttribute("data-math-delim")==="1")return!0;t=t.parentNode}return!1}function bE(e,t){let r=e.nodeType===Node.ELEMENT_NODE?e:e.parentElement;for(;r&&r!==t;){if(r.getAttribute("data-math")==="1")return r;r=r.parentElement}return null}function tae(e){const t=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null);let r=null,n;for(;n=t.nextNode();)Og(n)||(r=n);return r}function rae(e,t,r){if(t.nodeType===Node.ELEMENT_NODE){const i=t;if(r>0)return i.childNodes[r-1]||null}if(t.nodeType===Node.TEXT_NODE&&r>0)return null;let n=t;for(;n&&n!==e;){if(n.previousSibling)return n.previousSibling;n=n.parentNode}return null}function u4(e,t,r){const n=bE(t,e);if(n){if(t.nodeType===Node.ELEMENT_NODE&&t===n){const a=n.childNodes.length;if(r>=a)return"afterMath"}return"insideMath"}const i=rae(e,t,r);if(i&&i.nodeType===Node.ELEMENT_NODE&&i.getAttribute("data-math")==="1")return"afterMath"}function aa(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null);let n;for(;n=r.nextNode();){const i=n.textContent||"";if(!i||Og(n))continue;const a=eae(n);if(a.style==="link"){t.push({text:i,style:"link",href:a.href});continue}if(a.style==="math"){t.push({text:i,style:"math"});continue}t.push({text:i,style:a.style})}return Bi(t)}function dn(e){const t=window.getSelection();if(!t||t.rangeCount===0)return null;const r=t.getRangeAt(0);if(!e.contains(r.startContainer)||!e.contains(r.endContainer))return null;const n=h4(e,r.startContainer,r.startOffset),i=h4(e,r.endContainer,r.endOffset);return n===null||i===null?null:{start:n,end:i,startAffinity:u4(e,r.startContainer,r.startOffset),endAffinity:u4(e,r.endContainer,r.endOffset)}}function h4(e,t,r){const n=document.createRange();try{n.selectNodeContents(e),n.setEnd(t,r)}catch{return null}const i=n.cloneContents();return i.querySelectorAll?.('[data-math-delim="1"]').forEach(a=>a.remove()),i.textContent?.length??0}function Ri(e,t,r,n={}){const i=d4(e,t,n.startAffinity),a=d4(e,r,n.endAffinity);if(!i||!a)return;const s=document.createRange();s.setStart(i.node,i.offset),s.setEnd(a.node,a.offset);const o=window.getSelection();o?.removeAllRanges(),o?.addRange(s)}function d4(e,t,r){const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null);let i=0,a;for(;a=n.nextNode();){if(Og(a))continue;const s=a.textContent?.length||0;if(i+s>t)return{node:a,offset:Math.max(0,t-i)};if(i+s===t){const o=bE(a,e);if(o){const l=tae(o);if(l&&l===a&&r==="afterMath"){const c=o.parentNode;if(c){const u=Array.prototype.indexOf.call(c.childNodes,o);if(u!==-1)return{node:c,offset:u+1}}}}return{node:a,offset:s}}i+=s}return{node:e,offset:e.childNodes.length}}const nae=220,f4=8;function iae({containerRef:e,onFormat:t,isMathSelection:r}){const[n,i]=P.useState(!1),[a,s]=P.useState({top:0,left:0}),[o,l]=P.useState(!1),c=P.useRef(null),u=P.useCallback(()=>{const d=window.getSelection();if(!d||d.isCollapsed||!d.rangeCount){i(!1),l(!1);return}const f=d.getRangeAt(0);if(!e.current?.contains(f.commonAncestorContainer)){i(!1),l(!1);return}l(!!r?.(f));const p=f.getBoundingClientRect(),b=(c.current?.offsetWidth||nae)/2,y=p.left+p.width/2,v=b+f4,T=window.innerWidth-b-f4,A=Math.max(v,Math.min(T,y));s({top:p.top-45,left:A}),i(!0)},[e,r]);P.useEffect(()=>{const d=()=>{requestAnimationFrame(u)},f=()=>{i(!1)};return document.addEventListener("selectionchange",d),window.addEventListener("blur",f),()=>{document.removeEventListener("selectionchange",d),window.removeEventListener("blur",f)}},[u]),P.useEffect(()=>{const d=f=>{const p=f.target;!p.closest(".floating-toolbar")&&!e.current?.contains(p)&&i(!1)};return document.addEventListener("mousedown",d),()=>{document.removeEventListener("mousedown",d)}},[e]);const h=P.useCallback(d=>{o&&d!=="math"||t(d)},[t,o]);return n?C.jsxs("div",{ref:c,className:"floating-toolbar fixed z-[100] flex items-center gap-1 px-2 py-1.5 bg-notion-bg-elevated rounded-lg shadow-lg border border-notion-border",style:{top:a.top,left:a.left,transform:"translateX(-50%)"},onMouseDown:d=>d.preventDefault(),children:[C.jsx(Cs,{onClick:()=>h("bold"),title:"Bold (⌘B)",disabled:o,children:C.jsx(aae,{})}),C.jsx(Cs,{onClick:()=>h("italic"),title:"Italic (⌘I)",disabled:o,children:C.jsx(sae,{})}),C.jsx(Cs,{onClick:()=>h("strikethrough"),title:"Strikethrough",disabled:o,children:C.jsx(oae,{})}),C.jsx(Cs,{onClick:()=>h("code"),title:"Code (⌘E)",disabled:o,children:C.jsx(lae,{})}),C.jsx(Cs,{onClick:()=>h("math"),title:"Math (LaTeX) (⌘M)",disabled:!1,children:C.jsx(uae,{})}),C.jsx("div",{className:"w-px h-5 bg-notion-border mx-1"}),C.jsx(Cs,{onClick:()=>h("link"),title:"Link (⌘K)",disabled:o,children:C.jsx(cae,{})})]}):null}function Cs({children:e,onClick:t,title:r,disabled:n}){return C.jsx("button",{type:"button",onClick:t,title:r,disabled:n,className:`p-1.5 rounded text-notion-text-secondary transition-colors ${n?"opacity-40 cursor-not-allowed":"hover:bg-notion-bg-hover hover:text-notion-text"}`,children:e})}function aae(){return C.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[C.jsx("path",{d:"M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"}),C.jsx("path",{d:"M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"})]})}function sae(){return C.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[C.jsx("line",{x1:"19",y1:"4",x2:"10",y2:"4"}),C.jsx("line",{x1:"14",y1:"20",x2:"5",y2:"20"}),C.jsx("line",{x1:"15",y1:"4",x2:"9",y2:"20"})]})}function oae(){return C.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[C.jsx("path",{d:"M16 4H9a3 3 0 0 0-3 3v1a3 3 0 0 0 3 3h6a3 3 0 0 1 3 3v1a3 3 0 0 1-3 3H8"}),C.jsx("line",{x1:"4",y1:"12",x2:"20",y2:"12"})]})}function lae(){return C.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[C.jsx("polyline",{points:"16 18 22 12 16 6"}),C.jsx("polyline",{points:"8 6 2 12 8 18"})]})}function cae(){return C.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[C.jsx("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),C.jsx("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})]})}function uae(){return C.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[C.jsx("path",{d:"M4 4h6l4 16h6"}),C.jsx("path",{d:"M4 12h16"})]})}function hae({isOpen:e,onSubmit:t,onCancel:r,initialHref:n=""}){const[i,a]=P.useState(n),s=P.useRef(null),o=P.useRef(null);P.useEffect(()=>{e&&(a(n),requestAnimationFrame(()=>{s.current?.focus(),s.current?.select()}))},[e,n]);const l=P.useCallback(u=>{u.preventDefault();const h=i.trim();if(h){const d=h.match(/^https?:\/\//)?h:`https://${h}`;t(d)}},[i,t]),c=P.useCallback(u=>{u.key==="Escape"&&(u.preventDefault(),u.stopPropagation(),r())},[r]);return e?C.jsxs("div",{className:"link-modal fixed inset-0 z-[100] flex items-center justify-center",onKeyDown:c,children:[C.jsx("div",{className:"absolute inset-0 bg-black/20 backdrop-blur-[1px]",onClick:r}),C.jsxs("div",{ref:o,className:"relative bg-notion-bg-elevated rounded-xl shadow-2xl border border-notion-border/60 w-full max-w-md mx-4 overflow-hidden animate-in fade-in zoom-in-95 duration-150",style:{boxShadow:"0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05)"},children:[C.jsx("div",{className:"px-5 pt-5 pb-3",children:C.jsxs("div",{className:"flex items-center gap-3",children:[C.jsx("div",{className:"w-9 h-9 rounded-lg bg-gradient-to-br from-blue-500 to-blue-600 flex items-center justify-center shadow-sm",children:C.jsx(dae,{className:"w-4.5 h-4.5 text-white"})}),C.jsxs("div",{children:[C.jsx("h3",{className:"text-[15px] font-semibold text-notion-text tracking-[-0.01em]",children:"Insert link"}),C.jsx("p",{className:"text-xs text-notion-text-secondary mt-0.5",children:"Enter a URL for the selected text"})]})]})}),C.jsxs("form",{onSubmit:l,className:"px-5 pb-5",children:[C.jsxs("div",{className:"relative",children:[C.jsx("div",{className:"absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none",children:C.jsx(fae,{className:"w-4 h-4 text-notion-text-secondary"})}),C.jsx("input",{ref:s,type:"text",value:i,onChange:u=>a(u.target.value),placeholder:"https://example.com",className:"w-full pl-10 pr-4 py-2.5 text-sm bg-notion-hover/50 border border-notion-border/60 rounded-lg text-notion-text placeholder:text-notion-text-secondary/60 focus:outline-none focus:ring-2 focus:ring-blue-500/30 focus:border-blue-500/50 transition-all duration-150",autoComplete:"url",spellCheck:!1})]}),C.jsxs("div",{className:"flex items-center justify-end gap-2 mt-4",children:[C.jsx("button",{type:"button",onClick:r,className:"px-3.5 py-1.5 text-sm font-medium text-notion-text-secondary hover:text-notion-text hover:bg-notion-hover rounded-lg transition-colors duration-150",children:"Cancel"}),C.jsx("button",{type:"submit",disabled:!i.trim(),className:"px-4 py-1.5 text-sm font-medium text-white bg-blue-500 hover:bg-blue-600 disabled:opacity-40 disabled:cursor-not-allowed rounded-lg shadow-sm transition-all duration-150 hover:shadow",children:"Apply"})]})]}),C.jsx("div",{className:"px-5 py-2.5 bg-notion-hover/30 border-t border-notion-border/40",children:C.jsxs("div",{className:"flex items-center justify-between text-[11px] text-notion-text-secondary",children:[C.jsxs("span",{className:"flex items-center gap-1.5",children:[C.jsx("kbd",{className:"px-1.5 py-0.5 bg-notion-bg-elevated rounded border border-notion-border/60 font-mono text-[10px] shadow-sm",children:"Enter"}),C.jsx("span",{children:"to apply"})]}),C.jsxs("span",{className:"flex items-center gap-1.5",children:[C.jsx("kbd",{className:"px-1.5 py-0.5 bg-notion-bg-elevated rounded border border-notion-border/60 font-mono text-[10px] shadow-sm",children:"Esc"}),C.jsx("span",{children:"to cancel"})]})]})})]})]}):null}function dae({className:e}){return C.jsxs("svg",{className:e,width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[C.jsx("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),C.jsx("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})]})}function fae({className:e}){return C.jsxs("svg",{className:e,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[C.jsx("circle",{cx:"12",cy:"12",r:"10"}),C.jsx("path",{d:"M2 12h20"}),C.jsx("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]})}const pae=400;function Ac({block:e,isEditing:t,onContentChange:r,onStartEdit:n,onEndEdit:i,onKeyDown:a,className:s="",editingClassName:o="",viewClassName:l="",placeholder:c="Type something...",renderWrapper:u,readonly:h=!1}){const d=P.useRef(null),f=P.useRef(null),p=P.useRef(null),m=P.useRef(e.spans),b=P.useRef(null),[y,v]=P.useState(!1),T=P.useRef(null),A=P.useRef(null),E=P.useCallback(()=>t?d.current:f.current,[t]);P.useEffect(()=>()=>{b.current&&clearTimeout(b.current)},[]),P.useEffect(()=>{if(t&&d.current){d.current.innerHTML=Ns(e.spans),m.current=e.spans,d.current.focus();const L=A.current;if(A.current=null,L)Ri(d.current,L.start,L.end,{startAffinity:L.startAffinity,endAffinity:L.endAffinity});else{const ae=document.createRange(),ne=window.getSelection();ae.selectNodeContents(d.current),ae.collapse(!1),ne?.removeAllRanges(),ne?.addRange(ae)}}},[t]),P.useEffect(()=>{if(!t||!d.current)return;const L=d.current,ae=Ns(e.spans),ne=L.innerHTML;if(ae===ne)return;const N=dn(L);L.innerHTML=ae,N&&Ri(L,N.start,N.end,{startAffinity:N.startAffinity,endAffinity:N.endAffinity}),m.current=e.spans},[e.spans,t]);const S=P.useCallback(()=>{if(!d.current)return;const L=dn(d.current),ae=aa(d.current);m.current=ae,r(ae);const N=Array.from(d.current.querySelectorAll('[data-math="1"]')).every(ge=>ge.querySelectorAll('[data-math-delim="1"]').length===2);b.current&&clearTimeout(b.current);const ke=()=>{if(!d.current)return;const ge=aa(d.current),Se=Ns(ge),_e=d.current.innerHTML;Se!==_e&&(d.current.innerHTML=Se,L&&Ri(d.current,L.start,L.end,{startAffinity:L.startAffinity,endAffinity:L.endAffinity}))};N?b.current=setTimeout(ke,pae):ke()},[r]),I=P.useCallback(L=>{if(!L.relatedTarget?.closest(".floating-toolbar")&&!L.relatedTarget?.closest(".link-modal")){if(d.current){const ae=aa(d.current);r(ae)}i()}},[r,i]),D=P.useCallback(()=>{!t&&!h&&n()},[t,n,h]),H=P.useCallback(()=>{if(!f.current)return;const L=f.current,ae=window.getSelection();if(!ae||ae.rangeCount===0)return;const ne=ae.getRangeAt(0);if(!L.contains(ne.startContainer)||!L.contains(ne.endContainer))return;const N=Ue=>(Ue.nodeType===Node.ELEMENT_NODE?Ue:Ue.parentElement)?.closest("[data-span-start]"),ke=(Ue,$e,ht)=>{if(Ue.nodeType!==Node.ELEMENT_NODE)return null;const dt=Ue,Lt=dt.childNodes[$e]||null,Re=$e>0&&dt.childNodes[$e-1]||null,ue=de=>de&&de.nodeType===Node.ELEMENT_NODE?de.closest("[data-span-start]"):null;return ht==="start"?ue(Lt)||ue(Re):ue(Re)||ue(Lt)},ge=(Ue,$e,ht)=>{let dt=N(Ue);if(dt||(dt=ke(Ue,$e,ht)),!dt)return null;const Lt=dt.getAttribute("data-span-start"),Re=dt.getAttribute("data-span-len");if(!Lt||!Re)return null;const ue=Number(Lt),de=Number(Re);if(dt.getAttribute("data-span-style")==="math")return{pos:ht==="start"?ue:ue+de,affinity:"insideMath"};try{const Bt=document.createRange();Bt.selectNodeContents(dt),Bt.setEnd(Ue,$e);const Jt=Bt.toString().length;return{pos:ue+Jt}}catch{return{pos:ht==="start"?ue:ue+de}}},Se=N(ne.startContainer)||ke(ne.startContainer,ne.startOffset,"start");if(ne.collapsed&&Se?.getAttribute("data-span-style")==="math"){const Ue=Number(Se.getAttribute("data-span-start")||"0");A.current={start:Ue,end:Ue,startAffinity:"insideMath",endAffinity:"insideMath"};return}const _e=ge(ne.startContainer,ne.startOffset,"start"),at=ge(ne.endContainer,ne.endOffset,"end");!_e||!at||(A.current={start:_e.pos,end:at.pos,startAffinity:_e.affinity,endAffinity:at.affinity})},[]),R=P.useCallback((L,ae)=>{const ne=E();if(!ne)return;const N=dn(ne);if(!(!N||N.start===N.end))if(t&&d.current){const ke=aa(d.current),ge=gl(ke,N.start,N.end,L,ae);d.current.innerHTML=Ns(ge),Ri(d.current,N.start,N.end,{startAffinity:N.startAffinity,endAffinity:N.endAffinity}),m.current=ge,r(ge)}else{const ke=gl(e.spans,N.start,N.end,L,ae);r(ke),window.getSelection()?.removeAllRanges()}},[t,e.spans,r,E]),F=P.useCallback(L=>{if((L.key==="ArrowRight"||L.key==="ArrowLeft")&&d.current){const ae=d.current,ne=window.getSelection();if(ne&&ne.rangeCount>0){const N=ne.getRangeAt(0);if(N.collapsed&&ae.contains(N.startContainer)){const ke=Re=>{let ue=Re.nodeType===Node.ELEMENT_NODE?Re:Re.parentElement;for(;ue&&ue!==ae;){if(ue.getAttribute("data-math")==="1")return ue;ue=ue.parentElement}return null},ge=Re=>{let ue=Re.parentNode;for(;ue&&ue.nodeType===Node.ELEMENT_NODE;){if(ue.getAttribute("data-math-delim")==="1")return!0;ue=ue.parentNode}return!1},Se=Re=>{const ue=document.createTreeWalker(Re,NodeFilter.SHOW_TEXT,null);let de;for(;de=ue.nextNode();)if(!ge(de))return de;return null},_e=Re=>{const ue=document.createTreeWalker(Re,NodeFilter.SHOW_TEXT,null);let de=null,pt;for(;pt=ue.nextNode();)ge(pt)||(de=pt);return de},at=Re=>{const ue=Re.parentNode;if(!ue)return;const de=Array.prototype.indexOf.call(ue.childNodes,Re);if(de===-1)return;const pt=document.createRange();pt.setStart(ue,de+1),pt.collapse(!0),ne.removeAllRanges(),ne.addRange(pt)},Ue=Re=>{const ue=Re.parentNode;if(!ue)return;const de=Array.prototype.indexOf.call(ue.childNodes,Re);if(de===-1)return;const pt=document.createRange();pt.setStart(ue,de),pt.collapse(!0),ne.removeAllRanges(),ne.addRange(pt)},$e=Re=>{const ue=Se(Re),de=document.createRange();ue?de.setStart(ue,0):de.setStart(Re,1),de.collapse(!0),ne.removeAllRanges(),ne.addRange(de)},ht=Re=>{const ue=_e(Re),de=document.createRange();ue?de.setStart(ue,ue.textContent?.length??0):de.setStart(Re,1),de.collapse(!0),ne.removeAllRanges(),ne.addRange(de)},dt=()=>{const Re=N.startContainer,ue=N.startOffset;if(Re.nodeType===Node.ELEMENT_NODE){const pt=Re;if(ue>0)return pt.childNodes[ue-1]||null}if(Re.nodeType===Node.TEXT_NODE&&ue>0)return null;let de=Re;for(;de&&de!==ae;){if(de.previousSibling)return de.previousSibling;de=de.parentNode}return null},Lt=()=>{const Re=N.startContainer,ue=N.startOffset;if(Re.nodeType===Node.ELEMENT_NODE)return Re.childNodes[ue]||null;if(Re.nodeType===Node.TEXT_NODE){const pt=Re.textContent||"";if(ue<pt.length)return null}let de=Re;for(;de&&de!==ae;){if(de.nextSibling)return de.nextSibling;de=de.parentNode}return null};if(L.key==="ArrowRight"){const Re=ke(N.startContainer);if(Re){const de=_e(Re);if(de&&N.startContainer===de&&N.startOffset===(de.textContent?.length??0)){L.preventDefault(),at(Re);return}}const ue=Lt();if(ue&&ue.nodeType===Node.ELEMENT_NODE){const de=ue;if(de.getAttribute("data-math")==="1"){L.preventDefault(),$e(de);return}}}if(L.key==="ArrowLeft"){const Re=dt();if(Re&&Re.nodeType===Node.ELEMENT_NODE){const de=Re;if(de.getAttribute("data-math")==="1"){L.preventDefault(),ht(de);return}}const ue=ke(N.startContainer);if(ue){const de=Se(ue);if(de&&N.startContainer===de&&N.startOffset===0){L.preventDefault(),Ue(ue);return}}}}}}if((L.metaKey||L.ctrlKey)&&d.current)switch(L.key.toLowerCase()){case"b":L.preventDefault(),R("bold");return;case"i":L.preventDefault(),R("italic");return;case"e":L.preventDefault(),R("code");return;case"m":L.preventDefault(),R("math");return;case"k":L.preventDefault();const ae=dn(d.current);ae&&ae.start!==ae.end&&(T.current=ae,v(!0));return}if(L.key==="Escape"){if(d.current){const ae=aa(d.current);r(ae)}i();return}a(L)},[R,r,i,a]),G=P.useCallback(L=>{const ae=E();if(ae){if(L==="link"){const ne=dn(ae);ne&&ne.start!==ne.end&&(T.current=ne,v(!0));return}R(L)}},[R,E]),ee=P.useCallback(L=>{if(v(!1),!T.current)return;const ae=T.current;if(T.current=null,t&&d.current){const ne=aa(d.current),N=gl(ne,ae.start,ae.end,"link",{href:L});d.current.innerHTML=Ns(N),Ri(d.current,ae.start,ae.end,{startAffinity:ae.startAffinity,endAffinity:ae.endAffinity}),m.current=N,r(N),d.current.focus()}else{const ne=gl(e.spans,ae.start,ae.end,"link",{href:L});r(ne),window.getSelection()?.removeAllRanges()}},[t,e.spans,r]),$=P.useCallback(()=>{v(!1),T.current=null,t&&d.current?.focus()},[t]),q=P.useCallback(L=>{if(t&&d.current){const ae=dn(d.current);if(!ae||ae.start===ae.end)return!1;const ne=aa(d.current);let N=0;for(const ke of ne){const ge=N,Se=N+ke.text.length;if(Se>ae.start&&ge<ae.end&&ke.style==="math")return!0;N=Se}return!1}if(!t&&f.current){const ae=f.current,ne=Array.from(ae.querySelectorAll('[data-span-style="math"]'));for(const N of ne)try{if(L.intersectsNode(N))return!0}catch{}}return!1},[t]),W=P.useCallback(L=>{const ne=L.nativeEvent.inputType,N=ne==="deleteContentBackward"||ne==="deleteContentForward",ke=ne==="insertText"||ne==="insertCompositionText"||ne==="insertFromPaste";if(!N&&!ke)return;const ge=d.current;if(!ge)return;const Se=window.getSelection();if(!Se||Se.rangeCount===0)return;const _e=Se.getRangeAt(0),at=ue=>{let de=ue.nodeType===Node.ELEMENT_NODE?ue:ue.parentElement;for(;de&&de!==ge;){if(de.getAttribute("data-math")==="1")return de;de=de.parentElement}return null},Ue=ue=>{const de=ue.parentNode;if(!de)return;const pt=Array.prototype.indexOf.call(de.childNodes,ue);if(pt===-1)return;const Bt=document.createRange();Bt.setStart(de,pt+1),Bt.collapse(!0),Se.removeAllRanges(),Se.addRange(Bt)},$e=ue=>{if(!ue)return!1;if(ue.nodeType===Node.ELEMENT_NODE){const pt=ue;return pt.getAttribute("data-math-delim")==="1"?!0:!!pt.querySelector('[data-math-delim="1"]')}const de=ue.parentElement;return!!de&&de.getAttribute("data-math-delim")==="1"},ht=ue=>{let de=ue;for(;de&&de!==ge;){if(de.previousSibling)return de.previousSibling;de=de.parentNode}return null},dt=ue=>{let de=ue;for(;de&&de!==ge;){if(de.nextSibling)return de.nextSibling;de=de.parentNode}return null},Lt=(ue,de)=>{if(ue.nodeType===Node.ELEMENT_NODE){const pt=ue;return de>0?pt.childNodes[de-1]||null:ht(ue)}return ue.nodeType===Node.TEXT_NODE&&de>0?null:ht(ue)},Re=(ue,de)=>{if(ue.nodeType===Node.ELEMENT_NODE)return ue.childNodes[de]||dt(ue);if(ue.nodeType===Node.TEXT_NODE){const pt=ue.textContent||"";return de<pt.length?null:dt(ue)}return dt(ue)};if(!_e.collapsed){_e.cloneContents().querySelector?.('[data-math-delim="1"]')&&N&&L.preventDefault();return}if(ke){const ue=at(_e.startContainer);if(ue&&_e.startContainer===ue&&_e.startOffset>=ue.childNodes.length){Ue(ue);return}}if(N){const ue=ne==="deleteContentBackward"?Lt(_e.startContainer,_e.startOffset):Re(_e.startContainer,_e.startOffset);$e(ue)&&L.preventDefault()}},[]),Z=C.jsx("div",{ref:d,className:`outline-none cursor-text ${s} ${o}`,contentEditable:!0,suppressContentEditableWarning:!0,onMouseDown:L=>{const ne=L.target.closest?.('[data-math-delim="1"]');if(!ne||!d.current)return;const N=ne.closest?.('[data-math="1"]');if(!N)return;L.preventDefault();const ke=window.getSelection();if(!ke)return;const ge=N.firstElementChild===ne,Se=document.createTreeWalker(N,NodeFilter.SHOW_TEXT,null);let _e=null,at=null,Ue;for(;Ue=Se.nextNode();)Ue.parentElement?.getAttribute("data-math-delim")!=="1"&&(_e||(_e=Ue),at=Ue);const $e=document.createRange();ge?_e?$e.setStart(_e,0):$e.setStart(N,1):at?$e.setStart(at,at.textContent?.length??0):$e.setStart(N,1),$e.collapse(!0),ke.removeAllRanges(),ke.addRange($e)},onBeforeInput:W,onInput:S,onBlur:I,onKeyDown:F},"editing"),V=C.jsxs("div",{ref:f,className:`outline-none ${h?"cursor-default":"cursor-text"} ${s} ${l}`,onMouseUp:h?void 0:H,onClick:h?void 0:D,children:[e.spans.length>0?Dg(e.spans):!h&&C.jsx("span",{className:"text-notion-text-secondary",children:c}),e.isStreaming&&C.jsx("span",{className:"inline-block w-0.5 h-4 bg-notion-text animate-pulse ml-0.5"})]},"viewing"),ve=t?u?u(Z,!0):Z:u?u(V,!1):V;return C.jsxs("div",{ref:p,className:"relative",children:[!h&&C.jsxs(C.Fragment,{children:[C.jsx(iae,{containerRef:p,onFormat:G,isMathSelection:q}),C.jsx(hae,{isOpen:y,onSubmit:ee,onCancel:$})]}),ve]})}function yE({block:e,isEditing:t,onContentChange:r,onStartEdit:n,onEndEdit:i,onKeyDown:a,readonly:s=!1}){return C.jsx(Ac,{block:e,isEditing:t,onContentChange:r,onStartEdit:n,onEndEdit:i,onKeyDown:a,className:"notion-paragraph text-notion-text leading-relaxed min-h-[1.5em]",placeholder:"Type something...",readonly:s})}const p4={1:"text-3xl font-bold",2:"text-2xl font-bold",3:"text-xl font-semibold",4:"text-lg font-semibold",5:"text-base font-semibold",6:"text-sm font-semibold"};function xE({block:e,isEditing:t,onContentChange:r,onStartEdit:n,onEndEdit:i,onKeyDown:a,readonly:s=!1}){const o=e.level||1,l=p4[o]||p4[1];return C.jsx(Ac,{block:e,isEditing:t,onContentChange:r,onStartEdit:n,onEndEdit:i,onKeyDown:a,className:`notion-heading ${l} text-notion-text`,placeholder:`Heading ${o}`,readonly:s,renderWrapper:(c,u)=>C.jsx("div",{role:"heading","aria-level":o,children:c})})}function vE(e){const{block:t,isEditing:r,onContentChange:n,onStartEdit:i,onEndEdit:a,onKeyDown:s,readonly:o=!1}=e,l=P.useRef(null);P.useEffect(()=>{r&&l.current&&(l.current.focus(),l.current.selectionStart=l.current.value.length,l.current.selectionEnd=l.current.value.length)},[r]);const c=f=>{n(f.target.value)},u=()=>{a()},h=f=>{if(f.key==="Tab"){f.preventDefault();const p=f.currentTarget,m=p.selectionStart,b=p.selectionEnd,y=p.value,v=y.substring(0,m)+" "+y.substring(b);n(v),setTimeout(()=>{p.selectionStart=p.selectionEnd=m+2},0);return}if(f.key==="Escape"){a();return}s(f)},d="```"+(t.language||"")+`
|
|
655
|
+
`+t.content+"\n```";return r?C.jsxs("div",{className:"notion-code-block rounded-md bg-notion-code-bg border border-notion-border overflow-hidden",children:[C.jsx("div",{className:"flex items-center justify-between px-3 py-1.5 border-b border-notion-border bg-notion-hover",children:C.jsx("span",{className:"text-xs text-notion-text-secondary font-mono",children:t.language||"text"})}),C.jsx("textarea",{ref:l,className:"w-full p-3 font-mono text-sm bg-transparent text-notion-text outline-none resize-none",value:t.content,onChange:c,onBlur:u,onKeyDown:h,rows:Math.max(3,t.content.split(`
|
|
656
|
+
`).length),spellCheck:!1})]}):C.jsxs("div",{className:`notion-code-block ${o?"cursor-default":"cursor-text"}`,onClick:o?void 0:i,children:[C.jsx(Ka,{plugins:{code:J5},shikiTheme:["min-light","min-dark"],isAnimating:t.isStreaming,children:d}),t.isStreaming&&C.jsx("div",{className:"flex justify-end px-3 py-1",children:C.jsx("span",{className:"inline-block w-0.5 h-4 bg-notion-text animate-pulse"})})]})}function kE({block:e,isEditing:t,onContentChange:r,onStartEdit:n,onEndEdit:i,readonly:a=!1}){const[s,o]=P.useState(!1),[l,c]=P.useState(!0),u=()=>{c(!1),o(!1)},h=()=>{c(!1),o(!0)},d=f=>{r(f.target.value),o(!1),c(!0)};return t?C.jsxs("div",{className:"notion-image-block space-y-2",children:[C.jsx("input",{type:"text",className:"w-full px-3 py-2 text-sm border border-notion-border rounded bg-notion-bg-elevated text-notion-text outline-none focus:border-blue-500",value:e.content,onChange:d,onBlur:i,placeholder:"Enter image URL...",autoFocus:!0}),e.content&&!s&&C.jsx("img",{src:e.content,alt:"Preview",className:"max-w-full h-auto rounded",onLoad:u,onError:h})]}):e.content?s?C.jsxs("div",{className:`notion-image-block border border-red-200 bg-red-50 rounded-lg p-4 ${a?"cursor-default":"cursor-pointer"}`,onClick:a?void 0:n,children:[C.jsx("p",{className:"text-sm text-red-600",children:"Failed to load image"}),C.jsx("p",{className:"text-xs text-red-400 truncate",children:e.content})]}):C.jsxs("div",{className:`notion-image-block relative group ${a?"":"cursor-pointer"}`,onClick:a?void 0:n,children:[l&&C.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-notion-hover rounded",children:C.jsx("div",{className:"w-6 h-6 border-2 border-notion-text-secondary border-t-transparent rounded-full animate-spin"})}),C.jsx("img",{src:e.content,alt:"Image",className:`max-w-full h-auto rounded ${a?"cursor-default":"cursor-pointer"} transition-opacity ${l?"opacity-0":"opacity-100"}`,onLoad:u,onError:h}),e.isStreaming&&C.jsx("div",{className:"absolute bottom-2 right-2 px-2 py-1 bg-black/50 text-white text-xs rounded",children:"Loading..."})]}):a?null:C.jsx("div",{className:"notion-image-block border-2 border-dashed border-notion-border rounded-lg p-8 text-center cursor-pointer hover:bg-notion-hover transition-colors",onClick:n,children:C.jsxs("div",{className:"text-notion-text-secondary",children:[C.jsx("svg",{className:"w-12 h-12 mx-auto mb-2 opacity-50",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),C.jsx("p",{className:"text-sm",children:"Click to add image URL"})]})})}function wE(e){const{block:t,isEditing:r,onContentChange:n,onStartEdit:i,onEndEdit:a,onKeyDown:s,readonly:o=!1}=e,l=P.useRef(null);P.useEffect(()=>{r&&l.current&&(l.current.focus(),l.current.selectionStart=l.current.value.length,l.current.selectionEnd=l.current.value.length)},[r]);const c=f=>{n(f.target.value)},u=()=>{a()},h=f=>{if(f.key==="Escape"){a();return}s(f)},d=`$$
|
|
657
|
+
${t.content}
|
|
658
|
+
$$`;return r?C.jsxs("div",{className:"notion-math-block space-y-2",children:[C.jsx("div",{className:"text-xs text-notion-text-secondary mb-1",children:"LaTeX"}),C.jsx("textarea",{ref:l,className:"w-full px-3 py-2 font-mono text-sm border border-notion-border rounded bg-notion-code-bg text-notion-text outline-none focus:border-blue-500 resize-none",value:t.content,onChange:c,onBlur:u,onKeyDown:h,rows:Math.max(2,t.content.split(`
|
|
659
|
+
`).length),placeholder:"Enter LaTeX...",spellCheck:!1}),t.content&&C.jsxs("div",{className:"p-3 bg-notion-bg-elevated border border-notion-border rounded text-notion-text",children:[C.jsx("div",{className:"text-xs text-notion-text-secondary mb-1",children:"Preview"}),C.jsx("div",{className:"text-center",children:C.jsx(Ka,{plugins:{math:s0},isAnimating:!1,children:d})})]})]}):t.content?C.jsxs("div",{className:`notion-math-block py-4 px-6 bg-notion-code-bg rounded-lg ${o?"cursor-default":"cursor-pointer hover:bg-notion-hover"} transition-colors`,onClick:o?void 0:i,children:[C.jsx("div",{className:"text-center",children:C.jsx(Ka,{plugins:{math:s0},isAnimating:t.isStreaming,children:d})}),t.isStreaming&&C.jsx("div",{className:"flex justify-center mt-2",children:C.jsx("span",{className:"inline-block w-0.5 h-4 bg-notion-text animate-pulse"})})]}):o?null:C.jsx("div",{className:"notion-math-block border-2 border-dashed border-notion-border rounded-lg p-6 text-center cursor-pointer hover:bg-notion-hover transition-colors",onClick:i,children:C.jsxs("div",{className:"text-notion-text-secondary",children:[C.jsx("span",{className:"text-2xl mb-2 block",children:"∑"}),C.jsx("p",{className:"text-sm",children:"Click to add LaTeX equation"})]})})}function TE({block:e,isEditing:t,onContentChange:r,onStartEdit:n,onEndEdit:i,onKeyDown:a,theme:s="light",readonly:o=!1}){const l=s==="dark",c=P.useRef(null);P.useEffect(()=>{t&&c.current&&(c.current.focus(),c.current.selectionStart=c.current.value.length,c.current.selectionEnd=c.current.value.length)},[t]);const u=m=>{r(m.target.value)},h=()=>{i()},d=m=>{if(m.key==="Escape"){i();return}if(m.key==="Tab"){m.preventDefault();const b=m.currentTarget,y=b.selectionStart,v=b.selectionEnd,T=b.value,A=T.substring(0,y)+" "+T.substring(v);r(A),setTimeout(()=>{b.selectionStart=b.selectionEnd=y+2},0);return}a(m)},f="```mermaid\n"+e.content+"\n```";if(t)return C.jsxs("div",{className:"notion-mermaid-block space-y-2",children:[C.jsx("div",{className:"text-xs text-notion-text-secondary mb-1",children:"Mermaid Diagram"}),C.jsx("textarea",{ref:c,className:"w-full px-3 py-2 font-mono text-sm border border-notion-border rounded bg-notion-code-bg text-notion-text outline-none focus:border-blue-500 resize-none",value:e.content,onChange:u,onBlur:h,onKeyDown:d,rows:Math.max(5,e.content.split(`
|
|
660
|
+
`).length),placeholder:"Enter Mermaid diagram code...",spellCheck:!1})]});if(!e.content)return o?null:C.jsx("div",{className:"notion-mermaid-block border-2 border-dashed border-notion-border rounded-lg p-6 text-center cursor-pointer hover:bg-notion-hover transition-colors",onClick:n,children:C.jsxs("div",{className:"text-notion-text-secondary",children:[C.jsx("svg",{className:"w-12 h-12 mx-auto mb-2 opacity-50",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 21a4 4 0 01-4-4V5a2 2 0 012-2h4a2 2 0 012 2v12a4 4 0 01-4 4zm0 0h12a2 2 0 002-2v-4a2 2 0 00-2-2h-2.343M11 7.343l1.657-1.657a2 2 0 012.828 0l2.829 2.829a2 2 0 010 2.828l-8.486 8.485M7 17h.01"})}),C.jsx("p",{className:"text-sm",children:"Click to add Mermaid diagram"})]})});if(e.isStreaming)return C.jsxs("div",{className:"notion-mermaid-block p-6 bg-notion-code-bg rounded-lg",children:[C.jsxs("div",{className:"flex items-center justify-center space-x-2 text-notion-text-secondary",children:[C.jsx("div",{className:"w-4 h-4 border-2 border-notion-text-secondary border-t-transparent rounded-full animate-spin"}),C.jsx("span",{className:"text-sm",children:"Receiving diagram..."})]}),C.jsx("pre",{className:"mt-3 text-xs text-notion-text-secondary font-mono whitespace-pre-wrap",children:e.content})]});const p=m=>{if(o)return;const b=m.target;b&&(b.closest("button")||b.closest("a")||n())};return C.jsx("div",{className:`notion-mermaid-block ${o?"cursor-default":"cursor-pointer"}`,onClick:p,children:C.jsx(Ka,{plugins:{mermaid:cE},controls:{mermaid:{fullscreen:!1,download:!0,copy:!0}},mermaid:{config:{theme:l?"dark":"default",themeVariables:{background:"transparent"}}},isAnimating:!1,children:f},l?"dark":"light")})}function mae(e,t){return`${e}:${t}`}function gae(e){return e.reduce((t,r)=>t+r.text.length,0)}function bae(e){return e.replace(/\n/g,"<br>").replace(/\|/g,"\\|")}function m4(e){return!e||e.length===0?"":bae(pn(e,{forParsing:!0}))}function yae(e,t){const r=Math.max(e.length,...t.map(a=>a.length),1),n=Array.from({length:r},(a,s)=>e[s]??[]),i=t.map(a=>Array.from({length:r},(s,o)=>a[o]??[]));return{header:n,rows:i,cols:r}}function xae({block:e,isEditing:t,onContentChange:r,onStartEdit:n,onEndEdit:i,onExitTable:a,readonly:s=!1}){const o=P.useRef(null),[l,c]=P.useState(null),[u,h]=P.useState(null);P.useEffect(()=>{t&&(l||c({r:0,c:0}))},[l,t]);const d=P.useMemo(()=>yae(e.header||[],e.rows||[]),[e.header,e.rows]),f=P.useMemo(()=>{const E=d.cols;return Array.from({length:E},(I,D)=>e.align?.[D]||"left")},[e.align,d.cols]),p=P.useCallback((E,S,I)=>{const D=d.header.map((F,G)=>G===S&&E===0?I:F),H=d.rows.map((F,G)=>F.map((ee,$)=>G===E-1&&$===S?I:ee)),R={...e,header:D,rows:H,align:f};r(cn(R))},[f,e,d.header,d.rows,r]),m=P.useCallback(()=>{try{if(document.execCommand("insertText",!1,`
|
|
661
|
+
`))return}catch{}const E=window.getSelection();if(!E||E.rangeCount===0)return;const S=E.getRangeAt(0);S.deleteContents();const I=document.createTextNode(`
|
|
662
|
+
`);S.insertNode(I),S.setStartAfter(I),S.setEndAfter(I),E.removeAllRanges(),E.addRange(S)},[]),b=P.useCallback((E,S,I,D)=>{const H=d.cols,R=d.rows.length;let F=E+I,G=S+D;if(D!==0&&(G<0&&(G=H-1,F-=1),G>=H&&(G=0,F+=1)),F<0){c({r:0,c:0});return}if(F>R){a?.(e.id);return}c({r:F,c:G})},[e.id,d.cols,d.rows.length,a]),y=P.useCallback((E,S,I)=>{if(I.stopPropagation(),I.key==="Enter"&&I.shiftKey){I.preventDefault(),m();return}if(I.key==="Enter"&&!I.shiftKey){I.preventDefault();const D=d.rows.length,H=d.cols,R=E===D,F=S===H-1;if(R&&F){a?.(e.id);return}c({r:Math.min(E+1,D),c:S});return}if(I.key==="Tab"){I.preventDefault(),b(E,S,0,I.shiftKey?-1:1);return}if(I.key==="ArrowLeft"){const D=I.currentTarget,H=dn(D);H&&H.start===0&&H.end===0&&(I.preventDefault(),b(E,S,0,-1));return}if(I.key==="ArrowRight"){const D=I.currentTarget,H=E===0?d.header[S]:d.rows[E-1][S],R=gae(H),F=dn(D);F&&F.start===R&&F.end===R&&(I.preventDefault(),b(E,S,0,1));return}},[e.id,dn,d.cols,d.header,d.rows,m,b,a]),v=(E,S,I,D)=>{const H=mae(E,S),R=!!(!s&&t&&l?.r===E&&l?.c===S),F=f[S]||"left",G=`px-3 py-2 min-w-[140px] border border-notion-border/70 whitespace-pre-wrap break-words align-top ${D?"bg-notion-hover font-semibold":"bg-notion-bg"} ${R?"ring-2 ring-blue-200 ring-inset":!s&&t?"hover:bg-notion-hover/50":""} ${s?"cursor-default":"cursor-text"}`,ee={textAlign:F,verticalAlign:"top"},$=D?"th":"td";if(!R)return C.jsx($,{"data-cell-rc":H,className:G,style:ee,scope:D?"col":void 0,onMouseDown:s?void 0:W=>{W.preventDefault(),t||n(),c({r:E,c:S})},children:I.length?Dg(I):C.jsx("span",{className:"text-notion-text-secondary",children:" "})},H);const q={id:`${e.id}:${H}`,type:"paragraph",spans:I,isStreaming:!1};return C.jsx($,{"data-cell-rc":H,className:G,style:ee,scope:D?"col":void 0,children:C.jsx(Ac,{block:q,isEditing:!0,onContentChange:W=>p(E,S,W),onStartEdit:()=>{},onEndEdit:()=>{},onKeyDown:W=>y(E,S,W),className:"w-full whitespace-pre-wrap break-words",placeholder:"",readonly:s})},H)};P.useEffect(()=>{if(!u)return;const E=()=>h(null);return window.addEventListener("mousedown",E,!0),window.addEventListener("scroll",E,!0),()=>{window.removeEventListener("mousedown",E,!0),window.removeEventListener("scroll",E,!0)}},[u]);const T=C.jsx("thead",{children:C.jsx("tr",{children:d.header.map((E,S)=>v(0,S,E,!0))})}),A=C.jsx("tbody",{children:d.rows.length?d.rows.map((E,S)=>C.jsx("tr",{children:E.map((I,D)=>v(S+1,D,I,!1))},`row-${S+1}`)):C.jsx("tr",{children:C.jsx("td",{colSpan:d.cols,className:"px-3 py-4 text-sm text-notion-text-secondary border border-notion-border/70",children:"No rows yet"})})});return C.jsxs("div",{ref:o,className:`notion-table-block relative ${!s&&t?"w-full":"inline-block max-w-full"}`,onClick:s?void 0:()=>{t||n()},onContextMenu:s?void 0:E=>{if(!t)return;const I=E.target?.closest?.("[data-cell-rc]");if(!I)return;E.preventDefault();const D=I.getAttribute("data-cell-rc")||"",[H,R]=D.split(":"),F=Number(H),G=Number(R);if(!Number.isFinite(F)||!Number.isFinite(G))return;const ee=o.current?.getBoundingClientRect(),$=ee?E.clientX-ee.left:E.clientX,q=ee?E.clientY-ee.top:E.clientY;h({x:$,y:q,r:F,c:G})},children:[!s&&t&&u&&C.jsx("div",{className:"absolute z-[70]",style:{top:u.y,left:u.x},onMouseDown:E=>E.preventDefault(),children:C.jsxs("div",{className:"rounded-xl border border-notion-border bg-notion-bg-elevated shadow-[0_16px_40px_rgba(15,23,42,0.14)] overflow-hidden w-[220px]",children:[C.jsx("div",{className:"px-3 py-2 border-b border-notion-border bg-gradient-to-b from-notion-hover/70 to-transparent",children:C.jsx("div",{className:"text-[11px] uppercase tracking-[0.12em] text-notion-text-secondary select-none",children:"Table"})}),C.jsxs("div",{className:"p-1",children:[[{id:"row-above",label:"Add row above",run:()=>{const E=u.r,S=Math.max(0,E===0?0:E-1),I=Array.from({length:d.cols},()=>[]),D=d.rows.slice(0,S).concat([I],d.rows.slice(S));r(cn({...e,header:d.header,rows:D,align:f})),c({r:Math.max(1,S+1),c:u.c})}},{id:"row-below",label:"Add row below",run:()=>{const E=Math.max(1,u.r),S=Math.min(d.rows.length,E),I=Array.from({length:d.cols},()=>[]),D=d.rows.slice(0,S).concat([I],d.rows.slice(S));r(cn({...e,header:d.header,rows:D,align:f})),c({r:S+1,c:u.c})}},{id:"col-left",label:"Add column left",run:()=>{const E=u.c,S=d.header.slice();S.splice(E,0,[]);const I=d.rows.map(H=>{const R=H.slice();return R.splice(E,0,[]),R}),D=f.slice();D.splice(E,0,"left"),r(cn({...e,header:S,rows:I,align:D})),c({r:u.r,c:E})}},{id:"col-right",label:"Add column right",run:()=>{const S=u.c+1,I=d.header.slice();I.splice(S,0,[]);const D=d.rows.map(R=>{const F=R.slice();return F.splice(S,0,[]),F}),H=f.slice();H.splice(S,0,"left"),r(cn({...e,header:I,rows:D,align:H})),c({r:u.r,c:S})}}].map(E=>C.jsx("button",{type:"button",className:"w-full text-left px-2 py-2 rounded-md hover:bg-notion-hover text-sm",onClick:()=>{E.run(),h(null)},children:E.label},E.id)),C.jsx("div",{className:"my-1 h-px bg-notion-border/70"}),C.jsx("button",{type:"button",className:`w-full text-left px-2 py-2 rounded-md text-sm ${u.r===0||d.rows.length===0?"opacity-50 cursor-not-allowed":"hover:bg-notion-hover"}`,disabled:u.r===0||d.rows.length===0,onClick:()=>{const E=u.r;if(E===0)return;const S=E-1;if(S<0||S>=d.rows.length)return;const I=d.rows.slice(0,S).concat(d.rows.slice(S+1));r(cn({...e,header:d.header,rows:I,align:f})),h(null)},children:"Delete row"}),C.jsx("button",{type:"button",className:`w-full text-left px-2 py-2 rounded-md text-sm ${d.cols<=1?"opacity-50 cursor-not-allowed":"hover:bg-notion-hover"}`,disabled:d.cols<=1,onClick:()=>{if(d.cols<=1)return;const E=u.c,S=d.header.slice(0,E).concat(d.header.slice(E+1)),I=d.rows.map(H=>H.slice(0,E).concat(H.slice(E+1))),D=f.slice(0,E).concat(f.slice(E+1));r(cn({...e,header:S,rows:I,align:D})),h(null)},children:"Delete column"})]})]})}),C.jsxs("div",{className:`rounded-xl border border-notion-border bg-notion-bg overflow-hidden ${!s&&t?"w-full":"inline-block max-w-full"}`,children:[!s&&t&&C.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-notion-border bg-notion-hover/40",children:[C.jsx("div",{className:"text-xs text-notion-text-secondary uppercase tracking-[0.12em]",children:"Table"}),C.jsxs("div",{className:"flex items-center gap-2",children:[C.jsx("button",{type:"button",className:"text-xs px-2 py-1 rounded-md border border-notion-border bg-notion-bg hover:bg-notion-hover",onMouseDown:E=>E.preventDefault(),onClick:()=>{const E=Math.max(1,l?.r??1),S=Math.max(0,E-1),I=Array.from({length:d.cols},()=>[]),D=d.rows.slice(0,S).concat([I],d.rows.slice(S));r(cn({...e,header:d.header,rows:D,align:f})),c({r:E,c:l?.c??0})},children:"+ Row Above"}),C.jsx("button",{type:"button",className:"text-xs px-2 py-1 rounded-md border border-notion-border bg-notion-bg hover:bg-notion-hover",onMouseDown:E=>E.preventDefault(),onClick:()=>{const E=Math.max(1,l?.r??1),S=Math.max(1,E),I=Array.from({length:d.cols},()=>[]),D=d.rows.slice(0,S-1).concat([I],d.rows.slice(S-1));r(cn({...e,header:d.header,rows:D,align:f})),c({r:S,c:l?.c??0})},children:"+ Row Below"}),C.jsx("button",{type:"button",className:"text-xs px-2 py-1 rounded-md border border-notion-border bg-notion-bg hover:bg-notion-hover",onMouseDown:E=>E.preventDefault(),disabled:(l?.r??1)===0||d.rows.length===0,onClick:()=>{const E=l?.r??1;if(E===0)return;const S=E-1;if(S<0||S>=d.rows.length)return;const I=d.rows.slice(0,S).concat(d.rows.slice(S+1));r(cn({...e,header:d.header,rows:I,align:f}));const D=Math.min(E,I.length);c({r:Math.max(1,D),c:l?.c??0})},children:"- Row"}),C.jsx("div",{className:"w-px h-6 bg-notion-border/70 mx-0.5"}),C.jsx("button",{type:"button",className:"text-xs px-2 py-1 rounded-md border border-notion-border bg-notion-bg hover:bg-notion-hover",onMouseDown:E=>E.preventDefault(),onClick:()=>{const E=Math.max(0,l?.c??0),S=Math.min(d.cols,E),I=d.header.slice();I.splice(S,0,[]);const D=d.rows.map(R=>{const F=R.slice();return F.splice(S,0,[]),F}),H=f.slice();H.splice(S,0,"left"),r(cn({...e,header:I,rows:D,align:H})),c({r:l?.r??0,c:S})},children:"+ Col Left"}),C.jsx("button",{type:"button",className:"text-xs px-2 py-1 rounded-md border border-notion-border bg-notion-bg hover:bg-notion-hover",onMouseDown:E=>E.preventDefault(),onClick:()=>{const E=l?.c??d.cols,S=Math.min(d.cols,Math.max(0,E+1)),I=d.header.slice();I.splice(S,0,[]);const D=d.rows.map(R=>{const F=R.slice();return F.splice(S,0,[]),F}),H=f.slice();H.splice(S,0,"left"),r(cn({...e,header:I,rows:D,align:H})),c({r:l?.r??0,c:S})},children:"+ Col Right"}),C.jsx("button",{type:"button",className:"text-xs px-2 py-1 rounded-md border border-notion-border bg-notion-bg hover:bg-notion-hover",onMouseDown:E=>E.preventDefault(),disabled:d.cols<=1,onClick:()=>{const E=Math.max(0,Math.min(d.cols-1,l?.c??0));if(d.cols<=1)return;const S=d.header.slice(0,E).concat(d.header.slice(E+1)),I=d.rows.map(R=>R.slice(0,E).concat(R.slice(E+1))),D=f.slice(0,E).concat(f.slice(E+1));r(cn({...e,header:S,rows:I,align:D}));const H=Math.max(0,Math.min(E,S.length-1));c({r:l?.r??0,c:H})},children:"- Col"}),C.jsx("button",{type:"button",className:"text-xs px-2 py-1 rounded-md border border-notion-border bg-notion-bg hover:bg-notion-hover",onMouseDown:E=>E.preventDefault(),onClick:()=>i(),children:"Done"})]})]}),C.jsx("div",{className:"overflow-x-auto max-w-full",children:C.jsxs("table",{className:"min-w-max border-collapse",children:[T,A]})})]})]})}function cn(e){const t=e.header||[],r=e.rows||[],n=Math.max(t.length,...r.map(l=>l.length),1),i=Array.from({length:n},(l,c)=>e.align?.[c]||"left"),a="| "+Array.from({length:n},(l,c)=>m4(t[c])).join(" | ")+" |",s="| "+Array.from({length:n},(l,c)=>{const u=i[c];return u==="center"?":---:":u==="right"?"---:":"---"}).join(" | ")+" |",o=r.map(l=>"| "+Array.from({length:n},(c,u)=>m4(l[u])).join(" | ")+" |");return[a,s,...o].join(`
|
|
663
|
+
`)}function CE({block:e,isEditing:t,onContentChange:r,onStartEdit:n,onEndEdit:i,onKeyDown:a,readonly:s=!1}){const o=e.listType==="ordered",l=e.depth??0,c=e.metadata?.displayNumber,u=o?`${c??1}.`:"•";return C.jsx(Ac,{block:e,isEditing:t,onContentChange:r,onStartEdit:n,onEndEdit:i,onKeyDown:a,className:"flex-1",placeholder:"Empty item",readonly:s,renderWrapper:(h,d)=>C.jsxs("div",{className:`notion-list-block flex items-start gap-2 py-0.5 ${s?"cursor-default":"cursor-text"}`,style:{paddingLeft:l*24},children:[C.jsx("span",{className:"text-notion-text select-none flex-shrink-0 w-5",children:u}),h]})})}function SE({block:e,isEditing:t,onContentChange:r,onStartEdit:n,onEndEdit:i,onKeyDown:a,readonly:s=!1}){return C.jsx(Ac,{block:e,isEditing:t,onContentChange:r,onStartEdit:n,onEndEdit:i,onKeyDown:a,className:"text-notion-text italic leading-relaxed",placeholder:"Empty quote",readonly:s,renderWrapper:(o,l)=>C.jsx("div",{className:`notion-blockquote border-l-4 border-notion-quote-border pl-4 py-0.5 ${s?"cursor-default":"cursor-text"}`,children:o})})}function EE({block:e}){return C.jsxs("div",{className:"notion-divider py-3",children:[C.jsx("hr",{className:"border-t border-notion-border"}),e.isStreaming&&C.jsx("div",{className:"flex justify-center mt-1",children:C.jsx("span",{className:"inline-block w-0.5 h-2 bg-notion-text animate-pulse"})})]})}function vae({block:e,isEditing:t,onStartEdit:r,onEndEdit:n,onContentChange:i,onKeyDown:a,hooks:s,onExitTable:o,theme:l="light",readonly:c=!1}){const u=()=>{if(e.type==="paragraph"||e.type==="heading"||e.type==="list"||e.type==="blockquote"){const p={block:e,isEditing:t,onStartEdit:r,onEndEdit:n,onContentChange:i,onKeyDown:a,readonly:c};switch(e.type){case"paragraph":return C.jsx(yE,{...p});case"heading":return C.jsx(xE,{...p});case"list":return C.jsx(CE,{...p});case"blockquote":return C.jsx(SE,{...p})}}if(e.type==="table")return C.jsx(xae,{block:e,isEditing:t,onStartEdit:r,onEndEdit:n,onContentChange:i,onKeyDown:a,onExitTable:o,readonly:c});const d={block:e,isEditing:t,onStartEdit:r,onEndEdit:n,onContentChange:i,onKeyDown:a,readonly:c};switch(e.type){case"code":return C.jsx(vE,{...d,theme:l});case"image":return C.jsx(kE,{...d});case"math":return C.jsx(wE,{...d,theme:l});case"mermaid":return C.jsx(TE,{...d,theme:l});case"divider":return C.jsx(EE,{...d});default:return null}},h=`notion-block relative py-1 px-1 -mx-1 rounded ${c?"":"hover:bg-notion-hover/50"} transition-colors`;if(s?.renderBlock){const d=s.renderBlock(e,u);if(d!==null)return C.jsx("div",{className:h,"data-block-id":e.id,"data-block-type":e.type,children:d})}return C.jsx("div",{className:h,"data-block-id":e.id,"data-block-type":e.type,children:u()})}function kae(e,t,r){return Math.max(t,Math.min(r,e))}function wae({isOpen:e,position:t,query:r,commands:n,activeIndex:i,onClose:a,onSelect:s,onHoverIndex:o}){const l=P.useRef(null);P.useEffect(()=>{if(!e)return;const u=h=>{const d=l.current;d&&(d.contains(h.target)||a())};return document.addEventListener("mousedown",u,!0),()=>document.removeEventListener("mousedown",u,!0)},[e,a]);const c=P.useMemo(()=>n.length?kae(i,0,n.length-1):0,[i,n.length]);return e?C.jsx("div",{ref:l,className:"notion-slash-menu absolute z-[60] w-[360px] max-w-[calc(100vw-24px)] overflow-x-hidden",style:{top:t.top,left:t.left},role:"dialog","aria-label":"Slash commands",children:C.jsxs("div",{className:"rounded-xl border border-notion-border bg-notion-bg-elevated shadow-[0_16px_40px_rgba(15,23,42,0.14)] overflow-hidden",children:[C.jsxs("div",{className:"px-3 py-2 border-b border-notion-border bg-gradient-to-b from-notion-hover/70 to-transparent",children:[C.jsxs("div",{className:"flex items-center gap-2",children:[C.jsx("span",{className:"text-[11px] uppercase tracking-[0.12em] text-notion-text-secondary select-none",children:"Insert"}),C.jsxs("span",{className:"text-xs font-mono text-notion-text-secondary",children:["/",r||""]})]}),C.jsx("div",{className:"mt-1 text-xs text-notion-text-secondary",children:n.length?"Type to filter, Enter to apply, Esc to close":"No matches"})]}),C.jsx("div",{className:"max-h-[320px] overflow-y-auto overflow-x-hidden py-1 px-1",children:n.map((u,h)=>{const d=h===c;return C.jsxs("button",{type:"button",onMouseEnter:()=>o?.(h),onMouseDown:f=>f.preventDefault(),onClick:()=>s(u),className:`w-full text-left px-2 py-2 rounded-md transition-colors flex items-start gap-2 ${d?"bg-notion-hover text-notion-text":"hover:bg-notion-hover/70 text-notion-text"}`,children:[C.jsx("div",{className:"mt-0.5 w-8 h-8 rounded-lg border border-notion-border bg-notion-bg flex items-center justify-center flex-shrink-0",children:u.icon?C.jsx("div",{className:"text-notion-text-secondary",children:u.icon}):C.jsx("div",{className:"text-notion-text-secondary text-xs font-mono",children:u.title.slice(0,2)})}),C.jsxs("div",{className:"min-w-0 flex-1",children:[C.jsxs("div",{className:"flex items-baseline gap-2",children:[C.jsx("div",{className:"font-medium text-sm truncate",children:u.title}),u.group?C.jsx("div",{className:"text-[11px] text-notion-text-secondary truncate",children:u.group}):null]}),u.description?C.jsx("div",{className:"text-xs text-notion-text-secondary mt-0.5 whitespace-normal break-words",children:u.description}):null]})]},u.id)})})]})}):null}function g4(e,t,r){return Math.max(t,Math.min(r,e))}function Ss(e){const t=new Set;let r=!1;const n=e.map(i=>{if(!t.has(i.id))return t.add(i.id),i;r=!0;let a=Ni(10);for(;t.has(a);)a=Ni(10);return t.add(a),{...i,id:a}});return r?n:e}const Tae=360,Cae=P.forwardRef(function({markdown:t,isStreaming:r=!1,hooks:n,onMarkdownChange:i,className:a="",theme:s,readonly:o=!1},l){const c=()=>{if(typeof window>"u")return"light";const J=document.documentElement,Y=document.body;return J&&J.classList.contains("dark")||Y&&Y.classList.contains("dark")||window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"},[u,h]=P.useState(()=>s==="dark"||s==="light"?s:s==="system"?typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":c());P.useEffect(()=>{if(s==="dark"||s==="light"){h(s);return}if(typeof window>"u"){h("light");return}const J=()=>{if(s==="system"){if(!window.matchMedia){h("light");return}h(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light");return}h(c())};J();const Y=[];if(s!=="system"&&typeof MutationObserver<"u"){const ce=fe=>{if(!fe)return;const Ve=new MutationObserver(()=>J());Ve.observe(fe,{attributes:!0,attributeFilter:["class"]}),Y.push(Ve)};ce(document.documentElement),ce(document.body)}const X=window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):null,oe=()=>J();return X&&X.addEventListener("change",oe),()=>{for(const ce of Y)ce.disconnect();X&&X.removeEventListener("change",oe)}},[s]);const d=P.useRef(null),{blocks:f}=mE({markdown:t,isStreaming:r}),[p,m]=P.useState(f),[b,y]=P.useState([]),[v,T]=P.useState(null),[A,E]=P.useState(null),S=P.useRef(p);P.useEffect(()=>{S.current=p},[p]);const I=P.useRef([]);P.useEffect(()=>{I.current=b},[b]);const D=P.useCallback(J=>{I.current=J,y(J)},[]),H=P.useRef(null),R=P.useRef(!1),F=P.useRef(!1),G=P.useRef(0),ee=P.useRef([]),$=P.useRef(new Set),q=P.useRef(null),W=P.useCallback(J=>S.current.find(Y=>Y.id===J)||null,[]),Z=P.useCallback(J=>({...J,metadata:{...J.metadata||{},dirty:!0}}),[]),V=P.useCallback(J=>({...J,metadata:{...J.metadata||{},dirty:!1}}),[]),ve=P.useCallback(()=>{E(null)},[]),L=P.useCallback(J=>{const Y=d.current;if(!Y)return;let X=0,oe=0;const ce=document.querySelector(`[data-block-id="${J}"]`),fe=Y.getBoundingClientRect(),Ve=window.getSelection(),Ye=Ve&&Ve.rangeCount>0?Ve.getRangeAt(0):null,We=Ye?Ye.getBoundingClientRect():null;if(We&&We.width+We.height>0)X=We.bottom-fe.top+8,oe=We.left-fe.left;else if(ce){const ut=ce.getBoundingClientRect();X=ut.top-fe.top+28,oe=ut.left-fe.left+28}const Ie=8,je=Math.max(Ie,fe.width-Tae-8);oe=g4(oe,Ie,je),E({blockId:J,query:"",activeIndex:0,position:{top:X,left:oe}})},[]);P.useEffect(()=>{const J=F.current;if(F.current=r,!R.current&&!r){$.current.clear();const X=Ss(f);S.current=X,m(X),D([]),G.current=0,ee.current=[],R.current=!0;return}if(r){if(R.current=!0,J||(G.current=0,ee.current=[],D([]),t.trim()===""&&($.current.clear(),m([]))),f.length===0){D([]);return}let X=f.length;for(let Ye=f.length-1;Ye>=0&&f[Ye].isStreaming;Ye--)X=Ye;const oe=f.slice(0,X),ce=f.slice(X),fe=$.current,Ve=G.current;if(fe.size===0){const Ye=oe.map(je=>V({...je,isStreaming:!1})),We=S.current,Ie=Ye.length!==We.length||Ye.some((je,ut)=>{const nt=We[ut];return!nt||je.type!==nt.type||je.id!==nt.id});if(Ie){const je=Ss(Ye);S.current=je,m(je)}ee.current=(Ie?S.current:We).map(je=>je.id),G.current=oe.length}else{const Ye=oe.length,We=Qe=>{if(Qe.type==="paragraph"||Qe.type==="heading"||Qe.type==="list"||Qe.type==="blockquote"){const vr=Qe.level??"",zt=Qe.listType??"",lr=Qe.depth??"";return`${Qe.type}|${vr}|${zt}|${lr}|${pn(Qe.spans||[],{forParsing:!0})}`}return Qe.type==="table"?`table|${rr([Qe])}`:Qe.type==="code"?`code|${Qe.language||""}|${Qe.content||""}`:Qe.type==="mermaid"?`mermaid|${Qe.content||""}`:Qe.type==="math"?`math|${Qe.content||""}`:Qe.type==="image"?`image|${Qe.content||""}`:Qe.type==="divider"?"divider":`${Qe.type}|${Qe.content||""}`},Ie=Qe=>!!Qe?.metadata?.dirty||fe.has(Qe.id),je=S.current;let ut=je.slice(),nt=!1;const ft=je.slice(0,Ve).map(Qe=>Qe.id);let $t=ee.current.length>0?ee.current.slice(0,Ve):ft;if(Ye<Ve){const Qe=$t.slice(Ye,Ve);if(Qe.length>0){const vr=new Set(Qe),zt=ut.filter(lr=>vr.has(lr.id)?Ie(lr):!0);zt.length!==ut.length&&(ut=zt,nt=!0)}$t=$t.slice(0,Ye)}const Sr=Math.min(Ye,$t.length),Gn=Math.max(0,Sr-64);for(let Qe=Gn;Qe<Sr;Qe++){const vr=$t[Qe];if(!vr)continue;const zt=ut.findIndex(_a=>_a.id===vr);if(zt===-1)continue;const lr=ut[zt];if(Ie(lr))continue;const Rn=V({...oe[Qe],isStreaming:!1});We(lr)!==We(Rn)&&(ut[zt]=Rn,$t[Qe]=Rn.id,nt=!0)}if(Ye>Ve){const Qe=oe.slice(Ve).map(vr=>V({...vr,isStreaming:!1}));ut=ut.concat(Qe),$t=$t.concat(Qe.map(vr=>vr.id)),nt=!0}if(G.current=Ye,ee.current=$t,nt){const Qe=Ss(ut);S.current=Qe,m(Qe)}}ce.length===0&&(G.current=oe.length),D(ce.map(Ye=>V({...Ye,isStreaming:!0})));return}if(J&&!r){m(X=>{const oe=X.slice(),ce=I.current;for(const Ve of ce)oe.push(V({...Ve,isStreaming:!1}));const fe=Ss(oe.length>0?oe:[{id:Ni(10),type:"paragraph",spans:[],isStreaming:!1}]);return S.current=fe,fe}),D([]),G.current=0,ee.current=[];return}if(H.current!==null&&t===H.current)return;$.current.clear();const Y=Ss(f.map(X=>V(X)));S.current=Y,m(Y),D([]),G.current=0,ee.current=[]},[t,r,f,V]);const ae=P.useCallback(J=>{const Y=b.length>0?J.concat(b.map(oe=>({...oe,isStreaming:!1}))):J,X=rr(Y);H.current=X,i?.(X)},[i,b]),ne=P.useCallback(J=>{const Y=Ss(J);S.current=Y,m(Y),ae(Y)},[ae]),N=J=>J.type==="paragraph"||J.type==="heading"||J.type==="list"||J.type==="blockquote",ke=J=>{if(N(J))return J.spans.every(Y=>Y.text.trim()==="");if(J.type==="divider")return!1;if(J.type==="table"){const Y=J.header||[],X=J.rows||[],oe=ce=>!!gf(ce||[]).trim();return!(Y.some(oe)||X.some(ce=>ce.some(oe)))}return J.content?.trim?.()===""},ge=P.useCallback(J=>{const Y=n?.getBlockPolicy?.(J);return Y||(N(J)?{atomic:!1,mergeable:!0,deleteOnBlurWhenEmpty:!1,enterBehavior:"newBlock"}:J.type==="table"?{atomic:!0,mergeable:!1,deleteOnBlurWhenEmpty:!1,enterBehavior:"stayInBlock"}:J.type==="image"?{atomic:!0,mergeable:!1,deleteOnBlurWhenEmpty:!0,enterBehavior:"ignore"}:{atomic:!0,mergeable:!1,deleteOnBlurWhenEmpty:!0,enterBehavior:"stayInBlock"})},[n]),Se=P.useCallback((J,Y,X)=>{q.current={blockId:J,start:Y,end:X},T(J)},[]);P.useEffect(()=>{const J=q.current;if(!J)return;q.current=null;const{blockId:Y,start:X,end:oe}=J;requestAnimationFrame(()=>{const ce=document.querySelector(`[data-block-id="${Y}"]`);if(!ce)return;const fe=ce.querySelector('[contenteditable="true"]');if(fe){fe.focus(),Ri(fe,X,oe);return}const Ve=ce.querySelector("textarea");Ve&&(Ve.focus(),Ve.setSelectionRange(X,oe))})},[p,v]);const _e=P.useCallback((J,Y,X,oe)=>{$.current.add(J),ne(S.current.map(fe=>fe.id!==J?fe:Y==="paragraph"?Z({id:fe.id,type:"paragraph",spans:ni(X),isStreaming:!1}):Y==="heading"?Z({id:fe.id,type:"heading",spans:ni(X),level:oe?.level??1,isStreaming:!1}):Y==="blockquote"?Z({id:fe.id,type:"blockquote",spans:ni(X),isStreaming:!1}):Y==="list"?Z({id:fe.id,type:"list",spans:ni(X),listType:oe?.listType??"unordered",depth:oe?.depth??0,isStreaming:!1}):Y==="code"?Z({id:fe.id,type:"code",content:"",language:oe?.language||"text",isStreaming:!1}):Y==="divider"?Z({id:fe.id,type:"divider",isStreaming:!1}):fe));const ce=W(J);ce&&n?.onBlockChange&&n.onBlockChange(J,X,ce)},[ne,n,W,Z]),{handleKeyDown:at}=gE({onBlockTypeChange:_e}),Ue=P.useCallback((J,Y)=>{$.current.add(J);const X=S.current.map(ce=>{if(ce.id!==J)return ce;if(N(ce)){const fe=typeof Y=="string"?ni(Y):Y;return Z({...ce,spans:fe})}if(ce.type==="table"){if(typeof Y!="string")return ce;const fe=Ui(Y,!1,[ce]).find(Ve=>Ve.type==="table");return!fe||fe.type!=="table"?ce:Z({...fe,isStreaming:!1})}return"content"in ce?Z({...ce,content:typeof Y=="string"?Y:pn(Y)}):ce});ne(X);const oe=X.find(ce=>ce.id===J);oe&&n?.onBlockChange&&n.onBlockChange(J,Y,oe)},[n,ne,Z]),$e=P.useCallback((J,Y)=>{const X=Ni(10);$.current.add(X);const oe=Z((()=>{switch(Y.type){case"paragraph":return{id:X,type:"paragraph",spans:Y.spans??[],isStreaming:!1};case"heading":return{id:X,type:"heading",spans:Y.spans??[],level:Y.level??1,isStreaming:!1};case"blockquote":return{id:X,type:"blockquote",spans:Y.spans??[],isStreaming:!1};case"list":return{id:X,type:"list",spans:Y.spans??[],listType:Y.listType??"unordered",depth:Y.depth??0,isStreaming:!1};case"code":return{id:X,type:"code",content:Y.content??"",language:Y.language??"text",isStreaming:!1};case"math":return{id:X,type:"math",content:Y.content??"",isStreaming:!1};case"mermaid":return{id:X,type:"mermaid",content:Y.content??"",isStreaming:!1};case"image":return{id:X,type:"image",content:Y.content??"",isStreaming:!1};case"table":{const We=Math.max(1,Y.cols??3),Ie=Math.max(0,Y.rows??2);return{id:X,type:"table",header:Array.from({length:We},()=>[]),rows:Array.from({length:Ie},()=>Array.from({length:We},()=>[])),align:Array.from({length:We},()=>"left"),isStreaming:!1}}case"divider":return{id:X,type:"divider",isStreaming:!1}}})()),ce=S.current,fe=J?ce.findIndex(We=>We.id===J):ce.length-1,Ve=fe===-1?ce.length:fe+1,Ye=ce.slice(0,Ve).concat([oe],ce.slice(Ve));return ne(Ye),X},[ne,Z]),ht=P.useCallback(J=>{$.current.delete(J);const Y=S.current,X=Y.findIndex(We=>We.id===J);if(X===-1)return;const oe=Y.slice(0,X).concat(Y.slice(X+1)),ce=oe.length===0?[{id:Ni(10),type:"paragraph",spans:[],isStreaming:!1}]:oe;ne(ce);const fe=Math.max(0,Math.min(X-1,ce.length-1)),Ve=ce[fe],Ye=N(Ve)?Ve.spans.reduce((We,Ie)=>We+Ie.text.length,0):Ve.content?.length??0;Se(Ve.id,Ye,Ye)},[ne,Se]),dt=P.useCallback((J,Y,X)=>{$.current.add(J);const oe=S.current,ce=oe.find(Ye=>Ye.id===J);if(!ce)return;const fe=N(ce)?ce.spans:[],Ve=(()=>{if(Y==="paragraph")return{id:ce.id,type:"paragraph",spans:fe,isStreaming:!1};if(Y==="heading")return{id:ce.id,type:"heading",spans:fe,level:X?.level??1,isStreaming:!1};if(Y==="blockquote")return{id:ce.id,type:"blockquote",spans:fe,isStreaming:!1};if(Y==="list")return{id:ce.id,type:"list",spans:fe,listType:X?.listType??"unordered",depth:X?.depth??0,isStreaming:!1};if(Y==="table"){const Ie=Array.from({length:3},(je,ut)=>ut===0?fe:[]);return{id:ce.id,type:"table",header:Ie,rows:Array.from({length:2},()=>Array.from({length:3},()=>[])),align:Array.from({length:3},()=>"left"),isStreaming:!1}}return ce})();ne(oe.map(Ye=>Ye.id===J?Z(Ve):Ye))},[ne,Z]),Lt=P.useCallback((J,Y=!1)=>{$.current.add(J);const X=S.current,oe=X.findIndex(je=>je.id===J),ce=X[oe],fe=oe>0?X[oe-1]:null;if(!ce||ce.type!=="list"||!fe||fe.type!=="list")return;const Ve=ce.depth??0,Ye=(fe.depth??0)+1,We=Math.min(Ve+1,Ye);if(We===Ve)return;const Ie=Y?ce.listType:fe.listType;ne(X.map(je=>je.id===J?Z({...ce,depth:We,listType:Ie}):je))},[ne,Z]),Re=P.useCallback((J,Y=!1)=>{$.current.add(J);const X=S.current,oe=X.findIndex(Ve=>Ve.id===J),ce=X[oe];if(!ce||ce.type!=="list")return;const fe=ce.depth??0;if(fe>0){const Ve=fe-1;let Ye=ce.listType;if(!Y)for(let We=oe-1;We>=0;We--){const Ie=X[We];if(Ie.type!=="list")break;if((Ie.depth??0)===Ve){Ye=Ie.listType;break}}ne(X.map(We=>We.id===J?Z({...ce,depth:Ve,listType:Ye}):We))}else dt(J,"paragraph")},[ne,dt,Z]),ue=P.useMemo(()=>{const J=b.length>0?S.current.concat(b):S.current;return{updateBlock:(Y,X)=>Ue(Y,X),getBlock:Y=>W(Y),getAllBlocks:()=>J,getMarkdown:()=>rr(J),insertBlockAfter:(Y,X)=>$e(Y,X),deleteBlock:Y=>ht(Y),setBlockType:(Y,X,oe)=>dt(Y,X,oe),indentListItem:Y=>Lt(Y),outdentListItem:Y=>Re(Y)}},[Ue,W,p,b,$e,ht,dt,Lt,Re]),de=P.useMemo(()=>{const J=C.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[C.jsx("path",{d:"M4 6h16"}),C.jsx("path",{d:"M4 12h10"}),C.jsx("path",{d:"M4 18h16"})]}),Y=C.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[C.jsx("path",{d:"M6 4v16"}),C.jsx("path",{d:"M18 4v16"}),C.jsx("path",{d:"M6 12h12"})]}),X=C.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[C.jsx("path",{d:"M8 6h13"}),C.jsx("path",{d:"M8 12h13"}),C.jsx("path",{d:"M8 18h13"}),C.jsx("path",{d:"M3 6h.01"}),C.jsx("path",{d:"M3 12h.01"}),C.jsx("path",{d:"M3 18h.01"})]}),oe=C.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[C.jsx("path",{d:"M10 6h11"}),C.jsx("path",{d:"M10 12h11"}),C.jsx("path",{d:"M10 18h11"}),C.jsx("path",{d:"M3 7h1"}),C.jsx("path",{d:"M3 12h1"}),C.jsx("path",{d:"M3 18h1"})]}),ce=C.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[C.jsx("path",{d:"M10 11H6c-1.1 0-2 .9-2 2v5h6v-7z"}),C.jsx("path",{d:"M20 11h-4c-1.1 0-2 .9-2 2v5h6v-7z"}),C.jsx("path",{d:"M4 11V9a5 5 0 0 1 5-5"}),C.jsx("path",{d:"M14 11V9a5 5 0 0 1 5-5"})]}),fe=C.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[C.jsx("path",{d:"M16 18l6-6-6-6"}),C.jsx("path",{d:"M8 6l-6 6 6 6"})]}),Ve=C.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[C.jsx("path",{d:"M7 7h10"}),C.jsx("path",{d:"M7 17h10"}),C.jsx("path",{d:"M7 7v10"}),C.jsx("path",{d:"M17 7v10"})]}),Ye=C.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[C.jsx("path",{d:"M4 4h6l4 16h6"}),C.jsx("path",{d:"M4 12h16"})]}),We=C.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[C.jsx("path",{d:"M3 12h18"}),C.jsx("path",{d:"M8 8h.01"}),C.jsx("path",{d:"M8 16h.01"}),C.jsx("path",{d:"M16 8h.01"}),C.jsx("path",{d:"M16 16h.01"})]}),Ie=C.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[C.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),C.jsx("path",{d:"M3 16l5-5a2 2 0 0 1 3 0l5 5"}),C.jsx("path",{d:"M14 14l2-2a2 2 0 0 1 3 0l2 2"}),C.jsx("path",{d:"M8 8h.01"})]}),je=C.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[C.jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),C.jsx("path",{d:"M3 10h18"}),C.jsx("path",{d:"M9 4v16"}),C.jsx("path",{d:"M15 4v16"})]}),ut=nt=>({id:`heading-${nt}`,title:`Heading ${nt}`,description:`Section heading (H${nt})`,group:"Text",aliases:[`h${nt}`],keywords:["heading","title",`h${nt}`],icon:Y,block:{type:"heading",level:nt,spans:[]}});return[{id:"paragraph",title:"Text",description:"Plain paragraph",group:"Text",aliases:["p","text"],keywords:["paragraph"],icon:J,block:{type:"paragraph",spans:[]}},ut(1),ut(2),ut(3),{id:"blockquote",title:"Quote",description:"Blockquote",group:"Text",aliases:["quote","bq"],keywords:["blockquote"],icon:ce,block:{type:"blockquote",spans:[]}},{id:"bulleted-list",title:"Bulleted list",description:"Unordered list item",group:"Lists",aliases:["ul","bullet","list"],keywords:["unordered"],icon:X,block:{type:"list",listType:"unordered",depth:0,spans:[]}},{id:"numbered-list",title:"Numbered list",description:"Ordered list item",group:"Lists",aliases:["ol","number","ordered"],keywords:["ordered"],icon:oe,block:{type:"list",listType:"ordered",depth:0,spans:[]}},{id:"code",title:"Code",description:"Fenced code block",group:"Media",aliases:["codeblock","```"],keywords:["snippet"],icon:fe,block:{type:"code",language:"text",content:""}},{id:"mermaid",title:"Mermaid",description:"Mermaid diagram block",group:"Media",aliases:["diagram","flow"],keywords:["graph","sequence"],icon:Ve,block:{type:"mermaid",content:""}},{id:"math",title:"Math (block)",description:"LaTeX block equation",group:"Media",aliases:["latex","equation"],keywords:["katex"],icon:Ye,block:{type:"math",content:""}},{id:"image",title:"Image",description:"Image block (URL)",group:"Media",aliases:["img","photo","picture"],keywords:["media"],icon:Ie,block:{type:"image",content:""}},{id:"table",title:"Table",description:"Spreadsheet-style table",group:"Layout",aliases:["tbl","grid"],keywords:["rows","columns","sheet"],icon:je,block:{type:"table",rows:2,cols:3}},{id:"divider",title:"Divider",description:"Horizontal divider",group:"Layout",aliases:["hr","line","---"],keywords:["separator"],icon:We,block:{type:"divider"},insertParagraphAfter:!0}]},[]),pt=P.useCallback(J=>{const Y=S.current,X=Y.findIndex(fe=>fe.id===J);if(X===-1)return;const oe=X+1<Y.length?Y[X+1]:null;if(oe&&oe.type==="paragraph"&&gf(oe.spans).trim()===""&&!oe.isStreaming){Se(oe.id,0,0);return}const ce=$e(J,{type:"paragraph",spans:[]});Se(ce,0,0)},[$e,Se]),Bt=P.useCallback(J=>{const Y=n?.getSlashCommands?n.getSlashCommands({block:J}):[];return de.concat(Y||[])},[de,n]),Jt=P.useCallback((J,Y)=>{const X=Y.trim().toLowerCase();return X?J.map(oe=>{const ce=[oe.title,...oe.aliases||[],...oe.keywords||[]].join(" ").toLowerCase(),fe=(oe.aliases||[]).some(We=>We.toLowerCase().startsWith(X))||oe.title.toLowerCase().startsWith(X),Ve=ce.includes(X);return{cmd:oe,score:fe?3:Ve?1:0}}).filter(oe=>oe.score>0).sort((oe,ce)=>ce.score-oe.score||oe.cmd.title.localeCompare(ce.cmd.title)).map(oe=>oe.cmd):J},[]),kn=P.useMemo(()=>{if(!A)return[];const J=S.current.find(Y=>Y.id===A.blockId);return J?Jt(Bt(J),A.query):[]},[A,Jt,Bt]),Ki=P.useCallback((J,Y)=>{switch(Y.type){case"paragraph":return{id:J,type:"paragraph",spans:Y.spans??[],isStreaming:!1};case"heading":return{id:J,type:"heading",spans:Y.spans??[],level:Y.level??1,isStreaming:!1};case"blockquote":return{id:J,type:"blockquote",spans:Y.spans??[],isStreaming:!1};case"list":return{id:J,type:"list",spans:Y.spans??[],listType:Y.listType??"unordered",depth:Y.depth??0,isStreaming:!1};case"code":return{id:J,type:"code",content:Y.content??"",language:Y.language??"text",isStreaming:!1};case"math":return{id:J,type:"math",content:Y.content??"",isStreaming:!1};case"mermaid":return{id:J,type:"mermaid",content:Y.content??"",isStreaming:!1};case"image":return{id:J,type:"image",content:Y.content??"",isStreaming:!1};case"table":{const X=Math.max(1,Y.cols??3),oe=Math.max(0,Y.rows??2);return{id:J,type:"table",header:Array.from({length:X},()=>[]),rows:Array.from({length:oe},()=>Array.from({length:X},()=>[])),align:Array.from({length:X},()=>"left"),isStreaming:!1}}case"divider":return{id:J,type:"divider",isStreaming:!1}}},[]),Qi=P.useCallback((J,Y,X)=>{const oe=S.current.find(Ie=>Ie.id===J);if(!oe)return;if(Y.execute){Y.execute(ue,{blockId:J,block:oe,query:X});return}if(!Y.block)return;const ce=S.current,fe=ce.findIndex(Ie=>Ie.id===J);if(fe===-1)return;let Ve=Y.block;Y.block.type==="list"&&oe.type==="list"&&(Ve={...Y.block,depth:oe.depth??0}),$.current.add(J);const Ye=Z(Ki(J,Ve));let We=ce.slice(0,fe).concat([Ye],ce.slice(fe+1));if(Y.insertParagraphAfter){const Ie=Ni(10);$.current.add(Ie);const je=Z(Ki(Ie,{type:"paragraph",spans:[]}));We=We.slice(0,fe+1).concat([je],We.slice(fe+1)),ne(We),Se(Ie,0,0);return}ne(We),Se(J,0,0)},[ue,Z,Ki,ne,Se]);P.useImperativeHandle(l,()=>ue,[ue]),P.useEffect(()=>{n?.ref&&"current"in n.ref&&(n.ref.current=ue)},[n?.ref,ue]);const Mo=P.useCallback(J=>{S.current.find(X=>X.id===J)?.isStreaming||T(J)},[]),Ea=P.useCallback(J=>{const Y=S.current.find(oe=>oe.id===J);if(!Y){T(null);return}if(ge(Y).deleteOnBlurWhenEmpty&&ke(Y)){ht(J);return}T(null)},[ht,ge]),yi=P.useCallback((J,Y)=>{Ue(J,Y)},[Ue]),le=(J,Y)=>{const X=[],oe=[];let ce=0;for(const fe of J){const Ve=ce,Ye=ce+fe.text.length;if(Ye<=Y)X.push({...fe});else if(Ve>=Y)oe.push({...fe});else{const We=Y-Ve;We>0&&X.push({...fe,text:fe.text.slice(0,We)}),We<fe.text.length&&oe.push({...fe,text:fe.text.slice(We)})}ce=Ye}return[Bi(X),Bi(oe)]},we=(J,Y,X)=>{if(Y===X)return J;const oe=Math.min(Y,X),ce=Math.max(Y,X),fe=[];let Ve=0;for(const Ye of J){const We=Ve,Ie=Ve+Ye.text.length;if(Ie<=oe||We>=ce)fe.push({...Ye});else{const je=Math.max(0,oe-We),ut=Math.max(0,ce-We);je>0&&fe.push({...Ye,text:Ye.text.slice(0,je)}),ut<Ye.text.length&&fe.push({...Ye,text:Ye.text.slice(ut)})}Ve=Ie}return Bi(fe)},rt=(J,Y)=>{if(J.length===0)return Y;if(Y.length===0)return J;const X=J[J.length-1],oe=Y[0],fe=X.text.length>0&&oe.text.length>0&&!/\s$/.test(X.text)&&!/^\s/.test(oe.text)?J.concat([{text:" ",style:"plain"}],Y):J.concat(Y);return Bi(fe)},bt=P.useCallback((J,Y)=>{const X=S.current.find(Ie=>Ie.id===J);if(!X)return;const oe=Ie=>{if(!(X.type==="paragraph"||X.type==="heading"||X.type==="list"||X.type==="blockquote"))return;Ue(J,Ie?[{text:Ie,style:"plain"}]:[]);const ut=document.querySelector(`[data-block-id="${J}"]`)?.querySelector('[contenteditable="true"]');if(ut){ut.textContent=Ie;const nt=Ie.length;Ri(ut,nt,nt);return}Se(J,Ie.length,Ie.length)};if(A&&A.blockId===J){Y.preventDefault();const Ie=A.query,je=Y.key;if(je==="Escape"){ve();const nt="/"+Ie;oe(nt);return}const ut=Math.max(0,kn.length-1);if(je==="ArrowDown"||je==="Tab"){E({...A,activeIndex:Math.min(A.activeIndex+1,ut)});return}if(je==="ArrowUp"){E({...A,activeIndex:Math.max(A.activeIndex-1,0)});return}if(je==="Backspace"){if(Ie.length===0){ve(),oe("");return}const nt=Ie.slice(0,-1),ft=Jt(Bt(X),nt);E({...A,query:nt,activeIndex:0}),oe("/"+nt),ft.length===0&&ve();return}if(je==="Enter"){const nt=kn[g4(A.activeIndex,0,ut)];ve(),nt&&Qi(J,nt,Ie);return}if(je.length===1&&!Y.metaKey&&!Y.ctrlKey&&!Y.altKey){const nt=Ie+je,ft=Jt(Bt(X),nt);E({...A,query:nt,activeIndex:0}),oe("/"+nt),ft.length===0&&ve();return}return}if((Y.key==="Backspace"||Y.key==="Delete")&&Y.target?.isContentEditable){const Ie=window.getSelection();if(Ie&&Ie.rangeCount>0){const je=Ie.getRangeAt(0);if(!je.collapsed){const ut=je.startContainer.parentElement?.closest?.("[data-block-id]"),nt=je.endContainer.parentElement?.closest?.("[data-block-id]"),ft=ut?.getAttribute("data-block-id"),mr=nt?.getAttribute("data-block-id");if(ft&&mr&&ft!==mr){Y.preventDefault();const $t=S.current.findIndex(xi=>xi.id===ft),Sr=S.current.findIndex(xi=>xi.id===mr);if($t===-1||Sr===-1)return;const Er=Math.min($t,Sr),Gn=Math.max($t,Sr),Qe=S.current,vr=Qe.slice(0,Er).concat(Qe.slice(Gn+1)),zt=vr.length===0?[{id:Ni(10),type:"paragraph",spans:[],isStreaming:!1}]:vr;ne(zt);const lr=Math.max(0,Math.min(Er-1,zt.length-1)),Rn=zt[lr],_a=N(Rn)?Rn.spans.reduce((xi,Nc)=>xi+Nc.text.length,0):Rn.content?.length??0;Se(Rn.id,_a,_a);return}}}}const ce=Y.currentTarget;let fe=0;if(ce instanceof HTMLTextAreaElement)fe=ce.selectionStart;else if(ce?.isContentEditable){const Ie=dn(ce);Ie&&(fe=Ie.start)}const Ve="spans"in X?pn(X.spans):"content"in X?X.content:"";if(at(Y,X,Ve,fe))return;if(Y.key==="/"&&fe===0){const Ie=!!X.metadata?.dirty,je=X.type==="paragraph"||X.type==="heading"||X.type==="list"||X.type==="blockquote"?gf(X.spans).trim()==="":X.type==="divider"?!1:X.content?.trim?.()==="";if(Ie&&je&&!X.isStreaming){Y.preventDefault(),L(J),Ue(J,[{text:"/",style:"plain"}]);const nt=document.querySelector(`[data-block-id="${J}"]`)?.querySelector('[contenteditable="true"]');nt?(nt.textContent="/",Ri(nt,1,1)):Se(J,1,1);return}}const We=ge(X);if(Y.key==="Enter"&&We.enterBehavior==="newBlock"&&N(X)&&ce?.isContentEditable){Y.preventDefault();const Ie=dn(ce),je=Ie?.start??0,ut=Ie?.end??je;if(X.type==="list"&&ke(X)){dt(X.id,"paragraph"),Se(X.id,0,0);return}const nt=we(X.spans,je,ut),[ft,mr]=le(nt,je),$t=S.current,Sr=$t.findIndex(lr=>lr.id===X.id),Er=Ni(10);$.current.add(X.id),$.current.add(Er);let Gn=X.type,Qe;(X.type==="heading"||X.type==="blockquote")&&(Gn="paragraph"),X.type==="list"&&(Gn="list");const vr=Z({...X,spans:ft});Gn==="list"&&X.type==="list"?Qe={id:Er,type:"list",spans:mr,listType:X.listType,depth:X.depth??0,isStreaming:!1}:Qe={id:Er,type:"paragraph",spans:mr,isStreaming:!1},Qe=Z(Qe);const zt=$t.slice(0,Sr).concat([vr,Qe],$t.slice(Sr+1));ne(zt),Se(Er,0,0);return}if(Y.key==="Tab"&&N(X)&&X.type==="list"&&ce?.isContentEditable){Y.preventDefault(),Y.shiftKey?Re(X.id):Lt(X.id);return}if(Y.altKey&&(Y.key==="]"||Y.key==="[")&&N(X)&&X.type==="list"&&ce?.isContentEditable){Y.preventDefault(),Y.key==="["?Re(X.id,!0):Lt(X.id,!0);return}if(Y.key==="Backspace"){if(N(X)&&ce?.isContentEditable){const Ie=dn(ce);if(!Ie||Ie.start!==Ie.end)return;if(Ie.start===0){if(X.type==="heading"){Y.preventDefault(),dt(X.id,"paragraph"),Se(X.id,0,0);return}if(X.type==="list"){if(Y.preventDefault(),(X.depth??0)>0){Re(X.id),Se(X.id,0,0);return}dt(X.id,"paragraph"),Se(X.id,0,0);return}if(ke(X)){Y.preventDefault(),ht(X.id);return}Y.preventDefault();const je=S.current,ut=je.findIndex(ft=>ft.id===X.id),nt=ut>0?je[ut-1]:null;if(nt&&nt.type==="list"&&(X.type==="paragraph"||X.type==="blockquote")){const ft={...nt,spans:rt(nt.spans,X.spans)},mr=je.slice(0,ut-1).concat([Z(ft)],je.slice(ut+1));ne(mr);const $t=ft.spans.reduce((Sr,Er)=>Sr+Er.text.length,0);Se(ft.id,$t,$t);return}if(nt&&N(nt)&&N(X)&&nt.type!=="list"){const ft={...nt,spans:rt(nt.spans,X.spans)},mr=je.slice(0,ut-1).concat([Z(ft)],je.slice(ut+1));ne(mr);const $t=ft.spans.reduce((Sr,Er)=>Sr+Er.text.length,0);Se(ft.id,$t,$t);return}}return}if(ce instanceof HTMLTextAreaElement&&fe===0&&ke(X)){Y.preventDefault(),ht(X.id);return}}},[at,A,ve,E,kn,Qi,L,Ue,Jt,Bt,ge,ke,ht,ne,Se,le,we,rt,dt,Lt,Re]),Et=P.useMemo(()=>{const J=[],Y=[];for(const X of p)if(X.type==="list"&&X.listType==="ordered"){const oe=X.depth??0;for(;Y.length<=oe;)Y.push(0);Y[oe]=(Y[oe]||0)+1;for(let ce=oe+1;ce<Y.length;ce++)Y[ce]=0;J.push({...X,metadata:{...X.metadata||{},displayNumber:Y[oe]}})}else X.type==="list"||(Y.length=0),J.push(X);return J},[p]),xr=P.useMemo(()=>{if(b.length===0)return"";const J=b[b.length-1],Y=b.slice(0,-1),X=Y.length>0?rr(Y)+`
|
|
664
|
+
|
|
665
|
+
`:"";if(J.type==="code"){const ce="```"+(J.language||"")+`
|
|
666
|
+
`,fe=J.content||"";return X+ce+fe}if(J.type==="mermaid"){const oe="```mermaid\n",ce=J.content||"";return X+oe+ce}if(J.type==="math"){const ce=J.content||"";return X+`$$
|
|
667
|
+
`+ce}return rr(b)},[b]),on=u==="dark";return C.jsxs("div",{ref:d,className:`notion-stream ${on?"dark":""} ${a} relative overflow-x-hidden bg-notion-bg text-notion-text`,children:[C.jsx(wae,{isOpen:!!A,position:A?.position||{top:0,left:0},query:A?.query||"",commands:kn,activeIndex:A?.activeIndex||0,onClose:ve,onHoverIndex:J=>{A&&E({...A,activeIndex:J})},onSelect:J=>{A&&(ve(),Qi(A.blockId,J,A.query))}}),C.jsxs("div",{className:"notion-stream-content space-y-1 relative overflow-x-hidden",children:[Et.map(J=>C.jsx("div",{"data-block-id":J.id,className:"relative",children:C.jsx(vae,{block:J,isEditing:!o&&v===J.id,onStartEdit:()=>Mo(J.id),onEndEdit:()=>Ea(J.id),onContentChange:Y=>yi(J.id,Y),onKeyDown:Y=>bt(J.id,Y),hooks:n,onExitTable:pt,theme:u,readonly:o})},J.id)),r&&b.length>0&&C.jsx("div",{className:"relative notion-stream-virtual-block",children:C.jsx(Ka,{plugins:{code:J5,math:s0,mermaid:cE},shikiTheme:["min-light","min-dark"],mermaid:{config:{theme:on?"dark":"default",themeVariables:{background:"transparent"}}},isAnimating:!0,controls:!1,children:xr})})]}),p.length===0&&!r&&C.jsx("div",{className:"text-notion-text-secondary text-center py-8",children:"No content yet"}),p.length===0&&r&&C.jsxs("div",{className:"flex items-center space-x-2 text-notion-text-secondary py-4",children:[C.jsx("span",{className:"inline-block w-0.5 h-4 bg-notion-text animate-pulse"}),C.jsx("span",{className:"text-sm",children:"Receiving content..."})]})]})});function el(e,t){if(e.type==="paragraph"||e.type==="heading"||e.type==="list"||e.type==="blockquote"){const r=typeof t=="string"?ni(t):t;return{...e,spans:r}}if("content"in e){const r=typeof t=="string"?t:rr([{...e,...e,spans:t}]);return{...e,content:r}}return e}function Sae({blocks:e,onMarkdownChange:t}){const[r,n]=P.useState(null),[i,a]=P.useState(new Map),s=P.useRef(e);s.current=e;const o=P.useMemo(()=>e.map(u=>{const h=i.get(u.id);return h===void 0?u:el(u,h)}),[e,i]),l=P.useCallback((u,h)=>{if(a(d=>{const f=new Map(d);return f.set(u,h),f}),t){const d=s.current.map(f=>{const p=f.id===u?h:i.get(f.id);return p===void 0?f:el(f,p)});t(rr(d))}},[t,i]),c=P.useCallback(()=>({updateBlock:(u,h)=>{l(u,h)},getBlock:u=>{const h=s.current.find(f=>f.id===u);if(!h)return null;const d=i.get(u);return d===void 0?h:el(h,d)},getAllBlocks:()=>s.current.map(u=>{const h=i.get(u.id);return h===void 0?u:el(u,h)}),getMarkdown:()=>{const u=s.current.map(h=>{const d=i.get(h.id);return d===void 0?h:el(h,d)});return rr(u)},insertBlockAfter:()=>{throw new Error("insertBlockAfter is only available on NotionStream ref")},deleteBlock:()=>{throw new Error("deleteBlock is only available on NotionStream ref")},setBlockType:()=>{throw new Error("setBlockType is only available on NotionStream ref")},indentListItem:()=>{throw new Error("indentListItem is only available on NotionStream ref")},outdentListItem:()=>{throw new Error("outdentListItem is only available on NotionStream ref")}}),[l,i]);return{mergedBlocks:o,editingBlockId:r,setEditingBlockId:n,updateBlockValue:l,getRef:c}}function _E(e,t){const r=Ui(e,!1),n=Ui(t,!1),i=Pg(r,n);if(i.length===0)return[];const a=[];let s=[],o=[],l=0;const c=p=>p.type==="code",u=()=>{if(!(s.length===0&&o.length===0)){if(s.length===1&&o.length===1&&c(s[0])&&c(o[0])){const p=[...s],m=[...o];a.push({id:tl(l,"modified",p,m),type:"modified",beforeBlocks:p,afterBlocks:m,beforeMarkdown:rr(p),afterMarkdown:rr(m),codeDiff:{language:(o[0].language||s[0].language||"text").toString(),lines:H0(s[0].content||"",o[0].content||"")}})}else if(s.length>0&&o.length>0){const p=[...s],m=[...o];a.push({id:tl(l,"modified",p,m),type:"modified",beforeBlocks:p,afterBlocks:m,beforeMarkdown:rr(p),afterMarkdown:rr(m)})}else if(s.length>0){const p=[...s],m=rr(p);m.trim()&&a.push({id:tl(l,"removed",p,[]),type:"removed",blocks:p,markdown:m})}else if(o.length>0){const p=[...o],m=rr(p);m.trim()&&a.push({id:tl(l,"added",p,[]),type:"added",blocks:p,markdown:m})}s=[],o=[]}};let h=[],d=0;const f=()=>{if(h.length===0)return;const p=rr(h);p.trim()&&a.push({id:tl(d,"unchanged",[...h],[]),type:"unchanged",blocks:[...h],markdown:p}),h=[]};for(let p=0;p<i.length;p++){const m=i[p];m.type==="unchanged"?(u(),h.length===0&&(d=p),h.push(m.block)):m.type==="removed"?(f(),s.length===0&&o.length===0&&(l=p),s.push(m.block)):m.type==="added"&&(f(),s.length===0&&o.length===0&&(l=p),o.push(m.block))}return f(),u(),a}function AE(e,t,r={}){const n=r.defaultDecision??"reject",i=[];for(const a of e){if(a.type==="unchanged"){i.push(...a.blocks);continue}const s=t[a.id]??n,o=s==="unset"?n:s;if(a.type==="added"){o==="accept"&&i.push(...a.blocks);continue}if(a.type==="removed"){o==="reject"&&i.push(...a.blocks);continue}if(a.type==="modified")if(o==="accept"){const l=a.afterBlocks?.length?a.afterBlocks:a.beforeBlocks;i.push(...l)}else i.push(...a.beforeBlocks)}return rr(i)}function NE(e,t){const r=b4(e),n=b4(t);if(r.length===0&&n.length===0)return[];if(r.length===0)return n.map(u=>({text:u,type:"added"}));if(n.length===0)return r.map(u=>({text:u,type:"removed"}));const i=r.length,a=n.length,s=Array(i+1).fill(null).map(()=>Array(a+1).fill(0));for(let u=1;u<=i;u++)for(let h=1;h<=a;h++)r[u-1]===n[h-1]?s[u][h]=s[u-1][h-1]+1:s[u][h]=Math.max(s[u-1][h],s[u][h-1]);const o=[];let l=i,c=a;for(;l>0||c>0;)l>0&&c>0&&r[l-1]===n[c-1]?(o.unshift({text:r[l-1],type:"unchanged"}),l--,c--):c>0&&(l===0||s[l][c-1]>=s[l-1][c])?(o.unshift({text:n[c-1],type:"added"}),c--):(o.unshift({text:r[l-1],type:"removed"}),l--);return Lae(o)}function Eae(e,t,r={}){const{mergeAdjacent:n=!0}=r,i=Ui(e,!1),a=Ui(t,!1),s=Pg(i,a);if(s.length===0)return[];const l=(n?Nae(s):s.map(c=>({type:c.type,blocks:[c.block]}))).map(c=>({type:c.type,markdown:rr(c.blocks)})).filter(c=>c.markdown.trim()!=="");return n?Mae(l):l}function _ae(e,t){const r=Ui(e,!1),n=Ui(t,!1),i=Pg(r,n);if(i.length===0)return[];const a=[];let s=null,o=[];const l=()=>{if(!s||o.length===0)return;const u=rr(o);u.trim()&&a.push({type:s,markdown:u}),s=null,o=[]},c=u=>u.type==="code";for(let u=0;u<i.length;u++){const h=i[u],d=i[u+1];if(h.type==="removed"&&d?.type==="added"&&c(h.block)&&c(d.block)){l(),a.push({type:"modified",codeDiff:{language:(d.block.language||h.block.language||"text").toString(),lines:H0(h.block.content||"",d.block.content||"")}}),u++;continue}if(h.type==="added"&&d?.type==="removed"&&c(h.block)&&c(d.block)){l(),a.push({type:"modified",codeDiff:{language:(h.block.language||d.block.language||"text").toString(),lines:H0(d.block.content||"",h.block.content||"")}}),u++;continue}s===h.type?o.push(h.block):(l(),s=h.type,o=[h.block])}return l(),a}function H0(e,t){const r=y4(e),n=y4(t),i=r.length,a=n.length,s=Array(i+1).fill(null).map(()=>Array(a+1).fill(0));for(let u=1;u<=i;u++)for(let h=1;h<=a;h++)r[u-1]===n[h-1]?s[u][h]=s[u-1][h-1]+1:s[u][h]=Math.max(s[u-1][h],s[u][h-1]);const o=[];let l=i,c=a;for(;l>0||c>0;)l>0&&c>0&&r[l-1]===n[c-1]?(o.unshift({type:"unchanged",text:r[l-1]}),l--,c--):c>0&&(l===0||s[l][c-1]>=s[l-1][c])?(o.unshift({type:"added",text:n[c-1]}),c--):(o.unshift({type:"removed",text:r[l-1]}),l--);for(let u=0;u<o.length-1;u++){const h=o[u],d=o[u+1];if(h.type==="removed"&&d.type==="added"){const f=NE(h.text,d.text);h.inline=f.filter(p=>p.type!=="added"),d.inline=f.filter(p=>p.type!=="removed"),u++}}return o}function b4(e){const t=[];let r="",n=!1;for(const i of e){const a=/\s/.test(i);a!==n&&r&&(t.push(r),r=""),r+=i,n=a}return r&&t.push(r),t}function y4(e){return e.split(`
|
|
668
|
+
`)}function tl(e,t,r,n){const i=r.map(q0).join("||"),a=n.map(q0).join("||");return"d_"+Aae(`${e}|${t}|${i}|->|${a}`).toString(36)}function Aae(e){let t=2166136261;for(let r=0;r<e.length;r++)t^=e.charCodeAt(r),t=t+((t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24))>>>0;return t>>>0}function q0(e){return e.type==="paragraph"||e.type==="blockquote"?`${e.type}|${pn(e.spans,{forParsing:!0})}`:e.type==="heading"?`heading|${e.level||1}|${pn(e.spans,{forParsing:!0})}`:e.type==="list"?`list|${e.listType||"unordered"}|${e.depth||0}|${pn(e.spans,{forParsing:!0})}`:e.type==="table"?`table|${rr([e])}`:e.type==="code"?`code|${e.language||""}|${e.content||""}`:e.type==="mermaid"?`mermaid|${e.content||""}`:e.type==="math"?`math|${e.content||""}`:e.type==="image"?`image|${e.content||""}`:e.type==="divider"?"divider":`${e.type}|${e.content||""}`}function Pg(e,t){if(e.length===0&&t.length===0)return[];const r=e.map(q0),n=t.map(q0),i=r.length,a=n.length,s=Array(i+1).fill(null).map(()=>Array(a+1).fill(0));for(let u=1;u<=i;u++)for(let h=1;h<=a;h++)r[u-1]===n[h-1]?s[u][h]=s[u-1][h-1]+1:s[u][h]=Math.max(s[u-1][h],s[u][h-1]);const o=[];let l=i,c=a;for(;l>0||c>0;)l>0&&c>0&&r[l-1]===n[c-1]?(o.unshift({type:"unchanged",block:e[l-1]}),l--,c--):c>0&&(l===0||s[l][c-1]>=s[l-1][c])?(o.unshift({type:"added",block:t[c-1]}),c--):(o.unshift({type:"removed",block:e[l-1]}),l--);return o}function Nae(e){if(e.length===0)return[];const t=[];let r=e[0].type,n=[e[0].block];for(let i=1;i<e.length;i++){const a=e[i];a.type===r?n.push(a.block):(t.push({type:r,blocks:n}),r=a.type,n=[a.block])}return t.push({type:r,blocks:n}),t}function Lae(e){if(e.length===0)return[];const t=[];let r={...e[0]};for(let n=1;n<e.length;n++)e[n].type===r.type?r.text+=e[n].text:(t.push(r),r={...e[n]});return t.push(r),t}function Mae(e){if(e.length===0)return[];const t=[];let r={...e[0]};for(let n=1;n<e.length;n++)e[n].type===r.type?r.markdown+=`
|
|
669
|
+
|
|
670
|
+
`+e[n].markdown:(t.push(r),r={...e[n]});return t.push(r),t}function Iae(e){const{baseMarkdown:t,nextMarkdown:r,defaultDecision:n="unset",applyFallback:i="reject"}=e,a=P.useMemo(()=>_E(t,r),[t,r]),s=P.useMemo(()=>a.map(m=>m.id).join("|"),[a]),[o,l]=P.useState({});P.useEffect(()=>{l(m=>{const b={};for(const y of a)y.type!=="unchanged"&&(b[y.id]=m[y.id]??n);return b})},[s,n,a]);const c=P.useCallback(m=>{l(b=>({...b,[m]:"accept"}))},[]),u=P.useCallback(m=>{l(b=>({...b,[m]:"reject"}))},[]),h=P.useCallback(m=>{l(b=>({...b,[m]:"unset"}))},[]),d=P.useCallback(()=>{l(()=>{const m={};for(const b of a)b.type!=="unchanged"&&(m[b.id]=n);return m})},[a,n]),f=P.useMemo(()=>AE(a,o,{defaultDecision:i}),[a,o,i]),p=P.useMemo(()=>{let m=0,b=0,y=0,v=0,T=0,A=0,E=0;for(const S of a){if(S.type==="unchanged"){m++;continue}S.type==="added"?b++:S.type==="removed"?y++:S.type==="modified"&&v++;const I=o[S.id]??n;I==="unset"?E++:I==="accept"?T++:A++}return{unchangedItems:m,addedItems:b,removedItems:y,modifiedItems:v,totalChangeItems:b+y+v,accepted:T,rejected:A,pending:E}},[a,o,n]);return{items:a,decisions:o,accept:c,reject:u,unset:h,resetAll:d,resultMarkdown:f,stats:p}}exports.BlockquoteBlock=SE;exports.CodeBlock=vE;exports.Color=jn;exports.Color$1=Co;exports.DividerBlock=EE;exports.HeadingBlock=xE;exports.ImageBlock=kE;exports.JSON_SCHEMA=y8;exports.ListBlock=CE;exports.MapCache=Vi;exports.MathBlock=wE;exports.MermaidBlock=TE;exports.N=bn;exports.NotionStream=Cae;exports.ParagraphBlock=yE;exports.Rgb=Ur;exports.Set=$0;exports.Stack=ms;exports.Symbol=ec;exports.Uint8Array=jp;exports.Utils=lt;exports.ZERO_WIDTH_SPACE=V8;exports.__export=lk;exports.__name=k;exports.abs=VV;exports.acos=rX;exports.ao=q6;exports.applyMarkdownDiffReview=AE;exports.applyStyleToRange=gl;exports.array=dw;exports.arrayLikeKeys=z8;exports.asin=nX;exports.assignValue=F8;exports.assignWithDepth_default=ar;exports.atan2=XV;exports.b=ct;exports.baseAssignValue=Oh;exports.baseFor=C8;exports.baseGetTag=ds;exports.baseKeys=kS;exports.baseRest=W8;exports.baseUnary=O8;exports.blocksToMarkdown=rr;exports.calculateMathMLDimensions=vW;exports.calculateTextHeight=hg;exports.calculateTextWidth=ci;exports.cleanAndMerge=zh;exports.clear=Lk;exports.clear$1=Gee;exports.clear$2=Tee;exports.clear2=qee;exports.cloneArrayBuffer=_8;exports.cloneBuffer=E8;exports.cloneTypedArray=A8;exports.color=io;exports.commonDb_exports=M1;exports.common_default=hs;exports.computeCodeDiff=H0;exports.computeDiff=NE;exports.computeDimensionOfText=L7;exports.computeMarkdownBlockDiff=Eae;exports.computeMarkdownDiffReviewItems=_E;exports.computeMarkdownRenderDiff=_ae;exports.configureSvgSize=L1;exports.constant=Oa;exports.constant$1=Ch;exports.constant$2=j8;exports.copyArray=N8;exports.copyObject=$8;exports.cos=KV;exports.cr=tF;exports.createText=Xi;exports.curveBasis=Bl;exports.darken=Ke;exports.dayjs2=sk;exports.decodeEntities=Ta;exports.defaultConfig2=NW;exports.defaultConfig_default=N1;exports.define=Th;exports.distExports=k8;exports.domToSpans=aa;exports.epsilon=Sp;exports.eq=Tc;exports.evaluate=sr;exports.extend=$1;exports.generateId=e7;exports.getAccDescription=Bk;exports.getAccTitle=Ik;exports.getConfig=Cr;exports.getConfig2=Mt;exports.getDefaultExportFromCjs=eh;exports.getDiagramTitle=Ok;exports.getEdgeId=XZ;exports.getIconSVG=Ao;exports.getLineFunctionsWithOffset=v8;exports.getPrototype=rg;exports.getRegisteredLayoutAlgorithm=bte;exports.getSelectionTextOffsets=dn;exports.getStylesFromArray=ug;exports.getSubGraphTitleMargins=Ih;exports.getThemeVariables3=yk;exports.getUrl=Ak;exports.getUserDefinedConfig=cW;exports.halfPi=Ep;exports.hasKatex=Ja;exports.hue=SY;exports.identity=sg;exports.initCloneObject=M8;exports.insertCluster=q7;exports.insertEdge=uS;exports.insertEdgeLabel=oS;exports.insertNode=Ng;exports.interpolateNumber=Mi;exports.interpolateRgb=bp;exports.interpolateString=ew;exports.isArguments=nc;exports.isArray=ic;exports.isArrayLike=Cc;exports.isArrayLikeObject=R8;exports.isBuffer=Fh;exports.isDark=wo;exports.isEmpty=lm;exports.isFunction=Rh;exports.isIndex=ig;exports.isIterateeCall=G8;exports.isLabelStyle=tg;exports.isLength=ng;exports.isObject=wa;exports.isObjectLike=_o;exports.isTypedArray=$h;exports.isValidShape=sS;exports.keysIn=ag;exports.lighten=Be;exports.line=pw;exports.lineBreakRegex=To;exports.load=x8;exports.log=he;exports.markers_default=fS;exports.max=QV;exports.memoize=Eo;exports.merge=Y8;exports.mergeAdjacentSpans=Bi;exports.min=ZV;exports.nodeUtil=Up;exports.nogamma=z1;exports.overRest=q8;exports.package_default=ap;exports.parseFontSize=Sc;exports.parseGenericTypes=hp;exports.parseMarkdown=Ui;exports.parseMarkdownToSpans=ni;exports.pi=_h;exports.positionEdgeLabel=lS;exports.positionNode=jee;exports.random=r7;exports.registerIconPacks=v7;exports.render=gte;exports.renderKatexSanitized=kh;exports.renderSpans=Dg;exports.replaceIconSubstring=Cg;exports.rgbConvert=Qk;exports.rgba=Fs;exports.sanitizeText=yn;exports.select=Ct;exports.selectSvgElement=Ow;exports.setAccDescription=Rk;exports.setAccTitle=Mk;exports.setConfig2=AW;exports.setDiagramTitle=Dk;exports.setNodeElem=Hee;exports.setSelectionTextOffsets=Ri;exports.setToString=U8;exports.setupGraphViewbox=Nk;exports.setupGraphViewbox2=Pk;exports.sin=JV;exports.spansToHtml=Ns;exports.spansToMarkdown=pn;exports.sqrt=eX;exports.styles2String=Pe;exports.tau=tX;exports.toggleStyle=Nie;exports.tt=x5;exports.unknownIcon=y7;exports.updateNodeBounds=He;exports.useBlockState=Sae;exports.useDiffReview=Iae;exports.useMarkdownShortcuts=gE;exports.useStreamParser=mE;exports.utils_default=_n;exports.withPath=hw;exports.wrapLabel=n7;
|