@ours.network/messenger-server 1.0.6 → 1.0.7
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/chunks/{chunk-WILWDPGY.js → chunk-OT5O4T5Z.js} +1 -1
- package/dist/chunks/{server-IGCRUNBZ.js → server-O777BQPR.js} +1 -1
- package/dist/cli.js +2 -2
- package/dist/web/assets/{abnfDiagram-N423BO3Z-Bllzhn6m.js → abnfDiagram-N423BO3Z-BOkNfPqh.js} +2 -2
- package/dist/web/assets/{abnfDiagram-N423BO3Z-Bllzhn6m.js.map → abnfDiagram-N423BO3Z-BOkNfPqh.js.map} +1 -1
- package/dist/web/assets/{arc-IWSpXzaC.js → arc-DWJW_5_j.js} +2 -2
- package/dist/web/assets/{arc-IWSpXzaC.js.map → arc-DWJW_5_j.js.map} +1 -1
- package/dist/web/assets/{architectureDiagram-T3A2C74G-C-N13EcA.js → architectureDiagram-T3A2C74G-BlGt_gjc.js} +2 -2
- package/dist/web/assets/{architectureDiagram-T3A2C74G-C-N13EcA.js.map → architectureDiagram-T3A2C74G-BlGt_gjc.js.map} +1 -1
- package/dist/web/assets/{blockDiagram-VBNYF7ZC-Dcl-dLn0.js → blockDiagram-VBNYF7ZC-BaFw3f19.js} +2 -2
- package/dist/web/assets/{blockDiagram-VBNYF7ZC-Dcl-dLn0.js.map → blockDiagram-VBNYF7ZC-BaFw3f19.js.map} +1 -1
- package/dist/web/assets/{browser-vohWR48c.js → browser-DGdhyi2S.js} +2 -2
- package/dist/web/assets/{browser-vohWR48c.js.map → browser-DGdhyi2S.js.map} +1 -1
- package/dist/web/assets/{c4Diagram-5PPSVZJV-CgxKZUxo.js → c4Diagram-5PPSVZJV-7whJMuuH.js} +2 -2
- package/dist/web/assets/{c4Diagram-5PPSVZJV-CgxKZUxo.js.map → c4Diagram-5PPSVZJV-7whJMuuH.js.map} +1 -1
- package/dist/web/assets/channel-S4TikcPh.js +2 -0
- package/dist/web/assets/{channel-COoSgXhF.js.map → channel-S4TikcPh.js.map} +1 -1
- package/dist/web/assets/{chunk-2GRJ4B5K-CWmwr5-8.js → chunk-2GRJ4B5K-DvOfJlD5.js} +2 -2
- package/dist/web/assets/{chunk-2GRJ4B5K-CWmwr5-8.js.map → chunk-2GRJ4B5K-DvOfJlD5.js.map} +1 -1
- package/dist/web/assets/{chunk-2Q5K7J3B-CG2Rx4eF.js → chunk-2Q5K7J3B-Dr1bUTG1.js} +2 -2
- package/dist/web/assets/{chunk-2Q5K7J3B-CG2Rx4eF.js.map → chunk-2Q5K7J3B-Dr1bUTG1.js.map} +1 -1
- package/dist/web/assets/{chunk-5RXB4S5H-D9oHujk2.js → chunk-5RXB4S5H-Bn4UBcQm.js} +2 -2
- package/dist/web/assets/{chunk-5RXB4S5H-D9oHujk2.js.map → chunk-5RXB4S5H-Bn4UBcQm.js.map} +1 -1
- package/dist/web/assets/{chunk-5VM5RSS4-DTMS1Ir3.js → chunk-5VM5RSS4-PVXgYunx.js} +2 -2
- package/dist/web/assets/{chunk-5VM5RSS4-DTMS1Ir3.js.map → chunk-5VM5RSS4-PVXgYunx.js.map} +1 -1
- package/dist/web/assets/{chunk-6Q2QTUOP-B51Dyq4o.js → chunk-6Q2QTUOP-BsVFmayU.js} +2 -2
- package/dist/web/assets/{chunk-6Q2QTUOP-B51Dyq4o.js.map → chunk-6Q2QTUOP-BsVFmayU.js.map} +1 -1
- package/dist/web/assets/{chunk-GF5L2VYU-BFbl-vVS.js → chunk-GF5L2VYU-C8YoDtfY.js} +2 -2
- package/dist/web/assets/{chunk-GF5L2VYU-BFbl-vVS.js.map → chunk-GF5L2VYU-C8YoDtfY.js.map} +1 -1
- package/dist/web/assets/{chunk-JWPE2WC7-Dna5Ng6F.js → chunk-JWPE2WC7-CFEqJZwb.js} +2 -2
- package/dist/web/assets/{chunk-JWPE2WC7-Dna5Ng6F.js.map → chunk-JWPE2WC7-CFEqJZwb.js.map} +1 -1
- package/dist/web/assets/{chunk-KBJHAD2P-D3W3AEPK.js → chunk-KBJHAD2P-DNWp0SmN.js} +2 -2
- package/dist/web/assets/{chunk-KBJHAD2P-D3W3AEPK.js.map → chunk-KBJHAD2P-DNWp0SmN.js.map} +1 -1
- package/dist/web/assets/{chunk-RYQCIY6F-COpZj9EK.js → chunk-RYQCIY6F-DXiksuP3.js} +2 -2
- package/dist/web/assets/{chunk-RYQCIY6F-COpZj9EK.js.map → chunk-RYQCIY6F-DXiksuP3.js.map} +1 -1
- package/dist/web/assets/{chunk-XXDRQBXY-ESXLoTQi.js → chunk-XXDRQBXY-DARsEql9.js} +2 -2
- package/dist/web/assets/{chunk-XXDRQBXY-ESXLoTQi.js.map → chunk-XXDRQBXY-DARsEql9.js.map} +1 -1
- package/dist/web/assets/classDiagram-JCYQIIEL-BI1nT_Qn.js +2 -0
- package/dist/web/assets/{classDiagram-JCYQIIEL-By3hyti-.js.map → classDiagram-JCYQIIEL-BI1nT_Qn.js.map} +1 -1
- package/dist/web/assets/classDiagram-v2-OCEON4UE-BI1nT_Qn.js +2 -0
- package/dist/web/assets/{classDiagram-v2-OCEON4UE-By3hyti-.js.map → classDiagram-v2-OCEON4UE-BI1nT_Qn.js.map} +1 -1
- package/dist/web/assets/{cose-bilkent-JH36ORCC-CHsMZpIy.js → cose-bilkent-JH36ORCC-CbY_Emxl.js} +2 -2
- package/dist/web/assets/{cose-bilkent-JH36ORCC-CHsMZpIy.js.map → cose-bilkent-JH36ORCC-CbY_Emxl.js.map} +1 -1
- package/dist/web/assets/{cynefin-VYW2F7L2-BveuC6FQ.js → cynefin-VYW2F7L2-U3ekT2gx.js} +2 -2
- package/dist/web/assets/{cynefin-VYW2F7L2-BveuC6FQ.js.map → cynefin-VYW2F7L2-U3ekT2gx.js.map} +1 -1
- package/dist/web/assets/{cynefinDiagram-MW4NZA55-BEvk24eG.js → cynefinDiagram-MW4NZA55-SBZsW88o.js} +2 -2
- package/dist/web/assets/{cynefinDiagram-MW4NZA55-BEvk24eG.js.map → cynefinDiagram-MW4NZA55-SBZsW88o.js.map} +1 -1
- package/dist/web/assets/{dagre-VZM6K2ZE-BNuEVxqv.js → dagre-VZM6K2ZE-BdBBBFDX.js} +2 -2
- package/dist/web/assets/{dagre-VZM6K2ZE-BNuEVxqv.js.map → dagre-VZM6K2ZE-BdBBBFDX.js.map} +1 -1
- package/dist/web/assets/{diagram-7IWD3JNH-CCpicab3.js → diagram-7IWD3JNH-CNMma2cs.js} +2 -2
- package/dist/web/assets/{diagram-7IWD3JNH-CCpicab3.js.map → diagram-7IWD3JNH-CNMma2cs.js.map} +1 -1
- package/dist/web/assets/{diagram-B4RE2ZJO-EdYQvXTC.js → diagram-B4RE2ZJO-CHBsZThC.js} +2 -2
- package/dist/web/assets/{diagram-B4RE2ZJO-EdYQvXTC.js.map → diagram-B4RE2ZJO-CHBsZThC.js.map} +1 -1
- package/dist/web/assets/{diagram-LBJQPF4R-DdrOqSdO.js → diagram-LBJQPF4R-Cf2amKeh.js} +2 -2
- package/dist/web/assets/{diagram-LBJQPF4R-DdrOqSdO.js.map → diagram-LBJQPF4R-Cf2amKeh.js.map} +1 -1
- package/dist/web/assets/{diagram-Q27KOJAE-DgSOsvKE.js → diagram-Q27KOJAE-qeQk6AE3.js} +2 -2
- package/dist/web/assets/{diagram-Q27KOJAE-DgSOsvKE.js.map → diagram-Q27KOJAE-qeQk6AE3.js.map} +1 -1
- package/dist/web/assets/{diagram-UB23O5K3-BNjqc8uQ.js → diagram-UB23O5K3-BHQxwwpr.js} +2 -2
- package/dist/web/assets/{diagram-UB23O5K3-BNjqc8uQ.js.map → diagram-UB23O5K3-BHQxwwpr.js.map} +1 -1
- package/dist/web/assets/{ebnfDiagram-BXEA7PRR-B3DyEi2y.js → ebnfDiagram-BXEA7PRR-CLUmbihv.js} +2 -2
- package/dist/web/assets/{ebnfDiagram-BXEA7PRR-B3DyEi2y.js.map → ebnfDiagram-BXEA7PRR-CLUmbihv.js.map} +1 -1
- package/dist/web/assets/{erDiagram-JOGREHBK-BQVjbW1Q.js → erDiagram-JOGREHBK-CIcc_L4O.js} +2 -2
- package/dist/web/assets/{erDiagram-JOGREHBK-BQVjbW1Q.js.map → erDiagram-JOGREHBK-CIcc_L4O.js.map} +1 -1
- package/dist/web/assets/{flowDiagram-UKHOOZJN-C8CsMQ8D.js → flowDiagram-UKHOOZJN-Dm515w9v.js} +2 -2
- package/dist/web/assets/{flowDiagram-UKHOOZJN-C8CsMQ8D.js.map → flowDiagram-UKHOOZJN-Dm515w9v.js.map} +1 -1
- package/dist/web/assets/{ganttDiagram-PKOTCBZU-cotKb0jY.js → ganttDiagram-PKOTCBZU-D9exeNt2.js} +2 -2
- package/dist/web/assets/{ganttDiagram-PKOTCBZU-cotKb0jY.js.map → ganttDiagram-PKOTCBZU-D9exeNt2.js.map} +1 -1
- package/dist/web/assets/{gitGraphDiagram-DS77QQ5N-C734mugo.js → gitGraphDiagram-DS77QQ5N-ByHEcpv2.js} +2 -2
- package/dist/web/assets/{gitGraphDiagram-DS77QQ5N-C734mugo.js.map → gitGraphDiagram-DS77QQ5N-ByHEcpv2.js.map} +1 -1
- package/dist/web/assets/{index-C5senJUF.css → index-B0fkLcr3.css} +1 -1
- package/dist/web/assets/index-BtlMz_WJ.js +322 -0
- package/dist/web/assets/index-BtlMz_WJ.js.map +1 -0
- package/dist/web/assets/{infoDiagram-6WML65LV-D-1AvDOC.js → infoDiagram-6WML65LV-03SKV0cB.js} +2 -2
- package/dist/web/assets/{infoDiagram-6WML65LV-D-1AvDOC.js.map → infoDiagram-6WML65LV-03SKV0cB.js.map} +1 -1
- package/dist/web/assets/{ishikawaDiagram-WSZJBQD7-Bzf04wUo.js → ishikawaDiagram-WSZJBQD7-DaYDUXEK.js} +2 -2
- package/dist/web/assets/{ishikawaDiagram-WSZJBQD7-Bzf04wUo.js.map → ishikawaDiagram-WSZJBQD7-DaYDUXEK.js.map} +1 -1
- package/dist/web/assets/{journeyDiagram-NVQOT4AX-ClRApsha.js → journeyDiagram-NVQOT4AX-DYfA1FN_.js} +2 -2
- package/dist/web/assets/{journeyDiagram-NVQOT4AX-ClRApsha.js.map → journeyDiagram-NVQOT4AX-DYfA1FN_.js.map} +1 -1
- package/dist/web/assets/{jsQR-DCYnED3H.js → jsQR-BmxRSd9_.js} +2 -2
- package/dist/web/assets/{jsQR-DCYnED3H.js.map → jsQR-BmxRSd9_.js.map} +1 -1
- package/dist/web/assets/{kanban-definition-27J2QSJJ-B3vpahkj.js → kanban-definition-27J2QSJJ-Cyzatq31.js} +2 -2
- package/dist/web/assets/{kanban-definition-27J2QSJJ-B3vpahkj.js.map → kanban-definition-27J2QSJJ-Cyzatq31.js.map} +1 -1
- package/dist/web/assets/{linear-CHObIfkP.js → linear-DfAWJY7i.js} +2 -2
- package/dist/web/assets/{linear-CHObIfkP.js.map → linear-DfAWJY7i.js.map} +1 -1
- package/dist/web/assets/{mermaid.core-bMY6NRgG.js → mermaid.core-DRwRVnqY.js} +5 -5
- package/dist/web/assets/{mermaid.core-bMY6NRgG.js.map → mermaid.core-DRwRVnqY.js.map} +1 -1
- package/dist/web/assets/{mindmap-definition-FAOFIHXS-ClBWqYpb.js → mindmap-definition-FAOFIHXS-Crjz0ueM.js} +2 -2
- package/dist/web/assets/{mindmap-definition-FAOFIHXS-ClBWqYpb.js.map → mindmap-definition-FAOFIHXS-Crjz0ueM.js.map} +1 -1
- package/dist/web/assets/{pegDiagram-VL7TDLO6-CUrFILSG.js → pegDiagram-VL7TDLO6-BqlgNkIE.js} +2 -2
- package/dist/web/assets/{pegDiagram-VL7TDLO6-CUrFILSG.js.map → pegDiagram-VL7TDLO6-BqlgNkIE.js.map} +1 -1
- package/dist/web/assets/{pieDiagram-7S7Q4E2Y-B74icddO.js → pieDiagram-7S7Q4E2Y-DVRVBBQ-.js} +2 -2
- package/dist/web/assets/{pieDiagram-7S7Q4E2Y-B74icddO.js.map → pieDiagram-7S7Q4E2Y-DVRVBBQ-.js.map} +1 -1
- package/dist/web/assets/{quadrantDiagram-CIZ2JOQS-BGSQj6Sl.js → quadrantDiagram-CIZ2JOQS-B2AVI8tL.js} +2 -2
- package/dist/web/assets/{quadrantDiagram-CIZ2JOQS-BGSQj6Sl.js.map → quadrantDiagram-CIZ2JOQS-B2AVI8tL.js.map} +1 -1
- package/dist/web/assets/{railroadDiagram-AXF67PYL-BXt6jk6X.js → railroadDiagram-AXF67PYL-d0fiWzFm.js} +2 -2
- package/dist/web/assets/{railroadDiagram-AXF67PYL-BXt6jk6X.js.map → railroadDiagram-AXF67PYL-d0fiWzFm.js.map} +1 -1
- package/dist/web/assets/{requirementDiagram-LRYGKXZP-BVFvZq_8.js → requirementDiagram-LRYGKXZP-3Oshgo7v.js} +2 -2
- package/dist/web/assets/{requirementDiagram-LRYGKXZP-BVFvZq_8.js.map → requirementDiagram-LRYGKXZP-3Oshgo7v.js.map} +1 -1
- package/dist/web/assets/{sankeyDiagram-W5VNT64P-B0PMoe14.js → sankeyDiagram-W5VNT64P-CKaFZz1o.js} +2 -2
- package/dist/web/assets/{sankeyDiagram-W5VNT64P-B0PMoe14.js.map → sankeyDiagram-W5VNT64P-CKaFZz1o.js.map} +1 -1
- package/dist/web/assets/{sequenceDiagram-SI44F4Z6-Dhc94MMQ.js → sequenceDiagram-SI44F4Z6-Blfb_SVL.js} +2 -2
- package/dist/web/assets/{sequenceDiagram-SI44F4Z6-Dhc94MMQ.js.map → sequenceDiagram-SI44F4Z6-Blfb_SVL.js.map} +1 -1
- package/dist/web/assets/{sizeCapture-X5ZJPWSS-CYnxwuSf.js → sizeCapture-X5ZJPWSS-DE_gsDrn.js} +2 -2
- package/dist/web/assets/{sizeCapture-X5ZJPWSS-CYnxwuSf.js.map → sizeCapture-X5ZJPWSS-DE_gsDrn.js.map} +1 -1
- package/dist/web/assets/{stateDiagram-OKZ733FA-rB0IH9os.js → stateDiagram-OKZ733FA-CMpJH5dn.js} +2 -2
- package/dist/web/assets/{stateDiagram-OKZ733FA-rB0IH9os.js.map → stateDiagram-OKZ733FA-CMpJH5dn.js.map} +1 -1
- package/dist/web/assets/stateDiagram-v2-UEYNNEHI-Dt-50l8x.js +2 -0
- package/dist/web/assets/{stateDiagram-v2-UEYNNEHI-MUvWiB7d.js.map → stateDiagram-v2-UEYNNEHI-Dt-50l8x.js.map} +1 -1
- package/dist/web/assets/{swimlanes-SLNWSIFB-X8id28J1.js → swimlanes-SLNWSIFB-DOBYNUPr.js} +3 -3
- package/dist/web/assets/{swimlanes-SLNWSIFB-X8id28J1.js.map → swimlanes-SLNWSIFB-DOBYNUPr.js.map} +1 -1
- package/dist/web/assets/swimlanesDiagram-ULZ7WXOC-aV_Cee-1.js +9 -0
- package/dist/web/assets/{swimlanesDiagram-ULZ7WXOC-CotU78PY.js.map → swimlanesDiagram-ULZ7WXOC-aV_Cee-1.js.map} +1 -1
- package/dist/web/assets/{timeline-definition-Z64GVDOM-BeQYAaES.js → timeline-definition-Z64GVDOM-Cc709uLM.js} +2 -2
- package/dist/web/assets/{timeline-definition-Z64GVDOM-BeQYAaES.js.map → timeline-definition-Z64GVDOM-Cc709uLM.js.map} +1 -1
- package/dist/web/assets/{vennDiagram-T6HMQDX7-DxOD-8bT.js → vennDiagram-T6HMQDX7-CkXpoMia.js} +2 -2
- package/dist/web/assets/{vennDiagram-T6HMQDX7-DxOD-8bT.js.map → vennDiagram-T6HMQDX7-CkXpoMia.js.map} +1 -1
- package/dist/web/assets/{wardleyDiagram-T6FBY63Y-Cvinhg0d.js → wardleyDiagram-T6FBY63Y-BInkDQt9.js} +2 -2
- package/dist/web/assets/{wardleyDiagram-T6FBY63Y-Cvinhg0d.js.map → wardleyDiagram-T6FBY63Y-BInkDQt9.js.map} +1 -1
- package/dist/web/assets/{xychartDiagram-ELKLHX3M-DPeexFVC.js → xychartDiagram-ELKLHX3M-BvbWSLAa.js} +2 -2
- package/dist/web/assets/{xychartDiagram-ELKLHX3M-DPeexFVC.js.map → xychartDiagram-ELKLHX3M-BvbWSLAa.js.map} +1 -1
- package/dist/web/index.html +2 -2
- package/dist/web/sw.js +1 -1
- package/dist/web/version.json +1 -1
- package/package.json +1 -1
- package/dist/web/assets/channel-COoSgXhF.js +0 -2
- package/dist/web/assets/classDiagram-JCYQIIEL-By3hyti-.js +0 -2
- package/dist/web/assets/classDiagram-v2-OCEON4UE-By3hyti-.js +0 -2
- package/dist/web/assets/index-Ds2T7P1J.js +0 -317
- package/dist/web/assets/index-Ds2T7P1J.js.map +0 -1
- package/dist/web/assets/stateDiagram-v2-UEYNNEHI-MUvWiB7d.js +0 -2
- package/dist/web/assets/swimlanesDiagram-ULZ7WXOC-CotU78PY.js +0 -9
|
@@ -1,317 +0,0 @@
|
|
|
1
|
-
function Hb(e,t){for(var n=0;n<t.length;n++){const i=t[n];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in e)){const l=Object.getOwnPropertyDescriptor(i,s);l&&Object.defineProperty(e,s,l.get?l:{enumerable:!0,get:()=>i[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const a of l.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function n(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(s){if(s.ep)return;s.ep=!0;const l=n(s);fetch(s.href,l)}})();function Od(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Oc={exports:{}},Qo={},Fc={exports:{}},ze={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Rg;function Kb(){if(Rg)return ze;Rg=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.iterator;function y(L){return L===null||typeof L!="object"?null:(L=p&&L[p]||L["@@iterator"],typeof L=="function"?L:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,E={};function T(L,G,M){this.props=L,this.context=G,this.refs=E,this.updater=M||w}T.prototype.isReactComponent={},T.prototype.setState=function(L,G){if(typeof L!="object"&&typeof L!="function"&&L!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,L,G,"setState")},T.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function C(){}C.prototype=T.prototype;function R(L,G,M){this.props=L,this.context=G,this.refs=E,this.updater=M||w}var A=R.prototype=new C;A.constructor=R,S(A,T.prototype),A.isPureReactComponent=!0;var D=Array.isArray,B=Object.prototype.hasOwnProperty,I={current:null},q={key:!0,ref:!0,__self:!0,__source:!0};function $(L,G,M){var J,he={},me=null,ve=null;if(G!=null)for(J in G.ref!==void 0&&(ve=G.ref),G.key!==void 0&&(me=""+G.key),G)B.call(G,J)&&!q.hasOwnProperty(J)&&(he[J]=G[J]);var Ee=arguments.length-2;if(Ee===1)he.children=M;else if(1<Ee){for(var Re=Array(Ee),Be=0;Be<Ee;Be++)Re[Be]=arguments[Be+2];he.children=Re}if(L&&L.defaultProps)for(J in Ee=L.defaultProps,Ee)he[J]===void 0&&(he[J]=Ee[J]);return{$$typeof:e,type:L,key:me,ref:ve,props:he,_owner:I.current}}function K(L,G){return{$$typeof:e,type:L.type,key:G,ref:L.ref,props:L.props,_owner:L._owner}}function j(L){return typeof L=="object"&&L!==null&&L.$$typeof===e}function Y(L){var G={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(M){return G[M]})}var W=/\/+/g;function ue(L,G){return typeof L=="object"&&L!==null&&L.key!=null?Y(""+L.key):G.toString(36)}function Z(L,G,M,J,he){var me=typeof L;(me==="undefined"||me==="boolean")&&(L=null);var ve=!1;if(L===null)ve=!0;else switch(me){case"string":case"number":ve=!0;break;case"object":switch(L.$$typeof){case e:case t:ve=!0}}if(ve)return ve=L,he=he(ve),L=J===""?"."+ue(ve,0):J,D(he)?(M="",L!=null&&(M=L.replace(W,"$&/")+"/"),Z(he,G,M,"",function(Be){return Be})):he!=null&&(j(he)&&(he=K(he,M+(!he.key||ve&&ve.key===he.key?"":(""+he.key).replace(W,"$&/")+"/")+L)),G.push(he)),1;if(ve=0,J=J===""?".":J+":",D(L))for(var Ee=0;Ee<L.length;Ee++){me=L[Ee];var Re=J+ue(me,Ee);ve+=Z(me,G,M,Re,he)}else if(Re=y(L),typeof Re=="function")for(L=Re.call(L),Ee=0;!(me=L.next()).done;)me=me.value,Re=J+ue(me,Ee++),ve+=Z(me,G,M,Re,he);else if(me==="object")throw G=String(L),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.");return ve}function ee(L,G,M){if(L==null)return L;var J=[],he=0;return Z(L,J,"","",function(me){return G.call(M,me,he++)}),J}function ge(L){if(L._status===-1){var G=L._result;G=G(),G.then(function(M){(L._status===0||L._status===-1)&&(L._status=1,L._result=M)},function(M){(L._status===0||L._status===-1)&&(L._status=2,L._result=M)}),L._status===-1&&(L._status=0,L._result=G)}if(L._status===1)return L._result.default;throw L._result}var Ce={current:null},X={transition:null},ce={ReactCurrentDispatcher:Ce,ReactCurrentBatchConfig:X,ReactCurrentOwner:I};function P(){throw Error("act(...) is not supported in production builds of React.")}return ze.Children={map:ee,forEach:function(L,G,M){ee(L,function(){G.apply(this,arguments)},M)},count:function(L){var G=0;return ee(L,function(){G++}),G},toArray:function(L){return ee(L,function(G){return G})||[]},only:function(L){if(!j(L))throw Error("React.Children.only expected to receive a single React element child.");return L}},ze.Component=T,ze.Fragment=n,ze.Profiler=s,ze.PureComponent=R,ze.StrictMode=i,ze.Suspense=d,ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ce,ze.act=P,ze.cloneElement=function(L,G,M){if(L==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+L+".");var J=S({},L.props),he=L.key,me=L.ref,ve=L._owner;if(G!=null){if(G.ref!==void 0&&(me=G.ref,ve=I.current),G.key!==void 0&&(he=""+G.key),L.type&&L.type.defaultProps)var Ee=L.type.defaultProps;for(Re in G)B.call(G,Re)&&!q.hasOwnProperty(Re)&&(J[Re]=G[Re]===void 0&&Ee!==void 0?Ee[Re]:G[Re])}var Re=arguments.length-2;if(Re===1)J.children=M;else if(1<Re){Ee=Array(Re);for(var Be=0;Be<Re;Be++)Ee[Be]=arguments[Be+2];J.children=Ee}return{$$typeof:e,type:L.type,key:he,ref:me,props:J,_owner:ve}},ze.createContext=function(L){return L={$$typeof:a,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},L.Provider={$$typeof:l,_context:L},L.Consumer=L},ze.createElement=$,ze.createFactory=function(L){var G=$.bind(null,L);return G.type=L,G},ze.createRef=function(){return{current:null}},ze.forwardRef=function(L){return{$$typeof:c,render:L}},ze.isValidElement=j,ze.lazy=function(L){return{$$typeof:m,_payload:{_status:-1,_result:L},_init:ge}},ze.memo=function(L,G){return{$$typeof:h,type:L,compare:G===void 0?null:G}},ze.startTransition=function(L){var G=X.transition;X.transition={};try{L()}finally{X.transition=G}},ze.unstable_act=P,ze.useCallback=function(L,G){return Ce.current.useCallback(L,G)},ze.useContext=function(L){return Ce.current.useContext(L)},ze.useDebugValue=function(){},ze.useDeferredValue=function(L){return Ce.current.useDeferredValue(L)},ze.useEffect=function(L,G){return Ce.current.useEffect(L,G)},ze.useId=function(){return Ce.current.useId()},ze.useImperativeHandle=function(L,G,M){return Ce.current.useImperativeHandle(L,G,M)},ze.useInsertionEffect=function(L,G){return Ce.current.useInsertionEffect(L,G)},ze.useLayoutEffect=function(L,G){return Ce.current.useLayoutEffect(L,G)},ze.useMemo=function(L,G){return Ce.current.useMemo(L,G)},ze.useReducer=function(L,G,M){return Ce.current.useReducer(L,G,M)},ze.useRef=function(L){return Ce.current.useRef(L)},ze.useState=function(L){return Ce.current.useState(L)},ze.useSyncExternalStore=function(L,G,M){return Ce.current.useSyncExternalStore(L,G,M)},ze.useTransition=function(){return Ce.current.useTransition()},ze.version="18.3.1",ze}var Ag;function Fd(){return Ag||(Ag=1,Fc.exports=Kb()),Fc.exports}/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.production.min.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Mg;function qb(){if(Mg)return Qo;Mg=1;var e=Fd(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function a(c,d,h){var m,p={},y=null,w=null;h!==void 0&&(y=""+h),d.key!==void 0&&(y=""+d.key),d.ref!==void 0&&(w=d.ref);for(m in d)i.call(d,m)&&!l.hasOwnProperty(m)&&(p[m]=d[m]);if(c&&c.defaultProps)for(m in d=c.defaultProps,d)p[m]===void 0&&(p[m]=d[m]);return{$$typeof:t,type:c,key:y,ref:w,props:p,_owner:s.current}}return Qo.Fragment=n,Qo.jsx=a,Qo.jsxs=a,Qo}var Ng;function Xb(){return Ng||(Ng=1,Oc.exports=qb()),Oc.exports}var v=Xb(),Ka={},zc={exports:{}},un={},Vc={exports:{}},Bc={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.min.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var jg;function Yb(){return jg||(jg=1,function(e){function t(X,ce){var P=X.length;X.push(ce);e:for(;0<P;){var L=P-1>>>1,G=X[L];if(0<s(G,ce))X[L]=ce,X[P]=G,P=L;else break e}}function n(X){return X.length===0?null:X[0]}function i(X){if(X.length===0)return null;var ce=X[0],P=X.pop();if(P!==ce){X[0]=P;e:for(var L=0,G=X.length,M=G>>>1;L<M;){var J=2*(L+1)-1,he=X[J],me=J+1,ve=X[me];if(0>s(he,P))me<G&&0>s(ve,he)?(X[L]=ve,X[me]=P,L=me):(X[L]=he,X[J]=P,L=J);else if(me<G&&0>s(ve,P))X[L]=ve,X[me]=P,L=me;else break e}}return ce}function s(X,ce){var P=X.sortIndex-ce.sortIndex;return P!==0?P:X.id-ce.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var a=Date,c=a.now();e.unstable_now=function(){return a.now()-c}}var d=[],h=[],m=1,p=null,y=3,w=!1,S=!1,E=!1,T=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(X){for(var ce=n(h);ce!==null;){if(ce.callback===null)i(h);else if(ce.startTime<=X)i(h),ce.sortIndex=ce.expirationTime,t(d,ce);else break;ce=n(h)}}function D(X){if(E=!1,A(X),!S)if(n(d)!==null)S=!0,ge(B);else{var ce=n(h);ce!==null&&Ce(D,ce.startTime-X)}}function B(X,ce){S=!1,E&&(E=!1,C($),$=-1),w=!0;var P=y;try{for(A(ce),p=n(d);p!==null&&(!(p.expirationTime>ce)||X&&!Y());){var L=p.callback;if(typeof L=="function"){p.callback=null,y=p.priorityLevel;var G=L(p.expirationTime<=ce);ce=e.unstable_now(),typeof G=="function"?p.callback=G:p===n(d)&&i(d),A(ce)}else i(d);p=n(d)}if(p!==null)var M=!0;else{var J=n(h);J!==null&&Ce(D,J.startTime-ce),M=!1}return M}finally{p=null,y=P,w=!1}}var I=!1,q=null,$=-1,K=5,j=-1;function Y(){return!(e.unstable_now()-j<K)}function W(){if(q!==null){var X=e.unstable_now();j=X;var ce=!0;try{ce=q(!0,X)}finally{ce?ue():(I=!1,q=null)}}else I=!1}var ue;if(typeof R=="function")ue=function(){R(W)};else if(typeof MessageChannel<"u"){var Z=new MessageChannel,ee=Z.port2;Z.port1.onmessage=W,ue=function(){ee.postMessage(null)}}else ue=function(){T(W,0)};function ge(X){q=X,I||(I=!0,ue())}function Ce(X,ce){$=T(function(){X(e.unstable_now())},ce)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(X){X.callback=null},e.unstable_continueExecution=function(){S||w||(S=!0,ge(B))},e.unstable_forceFrameRate=function(X){0>X||125<X?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):K=0<X?Math.floor(1e3/X):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(X){switch(y){case 1:case 2:case 3:var ce=3;break;default:ce=y}var P=y;y=ce;try{return X()}finally{y=P}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(X,ce){switch(X){case 1:case 2:case 3:case 4:case 5:break;default:X=3}var P=y;y=X;try{return ce()}finally{y=P}},e.unstable_scheduleCallback=function(X,ce,P){var L=e.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?L+P:L):P=L,X){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=P+G,X={id:m++,callback:ce,priorityLevel:X,startTime:P,expirationTime:G,sortIndex:-1},P>L?(X.sortIndex=P,t(h,X),n(d)===null&&X===n(h)&&(E?(C($),$=-1):E=!0,Ce(D,P-L))):(X.sortIndex=G,t(d,X),S||w||(S=!0,ge(B))),X},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(X){var ce=y;return function(){var P=y;y=ce;try{return X.apply(this,arguments)}finally{y=P}}}}(Bc)),Bc}var Ig;function Gb(){return Ig||(Ig=1,Vc.exports=Yb()),Vc.exports}/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.min.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var Dg;function Qb(){if(Dg)return un;Dg=1;var e=Fd(),t=Gb();function n(r){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+r,u=1;u<arguments.length;u++)o+="&args[]="+encodeURIComponent(arguments[u]);return"Minified React error #"+r+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,s={};function l(r,o){a(r,o),a(r+"Capture",o)}function a(r,o){for(s[r]=o,r=0;r<o.length;r++)i.add(o[r])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),d=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,m={},p={};function y(r){return d.call(p,r)?!0:d.call(m,r)?!1:h.test(r)?p[r]=!0:(m[r]=!0,!1)}function w(r,o,u,f){if(u!==null&&u.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return f?!1:u!==null?!u.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function S(r,o,u,f){if(o===null||typeof o>"u"||w(r,o,u,f))return!0;if(f)return!1;if(u!==null)switch(u.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function E(r,o,u,f,g,x,b){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=f,this.attributeNamespace=g,this.mustUseProperty=u,this.propertyName=r,this.type=o,this.sanitizeURL=x,this.removeEmptyString=b}var T={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){T[r]=new E(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var o=r[0];T[o]=new E(o,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){T[r]=new E(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){T[r]=new E(r,2,!1,r,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(r){T[r]=new E(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){T[r]=new E(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){T[r]=new E(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){T[r]=new E(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){T[r]=new E(r,5,!1,r.toLowerCase(),null,!1,!1)});var C=/[\-:]([a-z])/g;function R(r){return r[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(r){var o=r.replace(C,R);T[o]=new E(o,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var o=r.replace(C,R);T[o]=new E(o,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var o=r.replace(C,R);T[o]=new E(o,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){T[r]=new E(r,1,!1,r.toLowerCase(),null,!1,!1)}),T.xlinkHref=new E("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){T[r]=new E(r,1,!1,r.toLowerCase(),null,!0,!0)});function A(r,o,u,f){var g=T.hasOwnProperty(o)?T[o]:null;(g!==null?g.type!==0:f||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(S(o,u,g,f)&&(u=null),f||g===null?y(o)&&(u===null?r.removeAttribute(o):r.setAttribute(o,""+u)):g.mustUseProperty?r[g.propertyName]=u===null?g.type===3?!1:"":u:(o=g.attributeName,f=g.attributeNamespace,u===null?r.removeAttribute(o):(g=g.type,u=g===3||g===4&&u===!0?"":""+u,f?r.setAttributeNS(f,o,u):r.setAttribute(o,u))))}var D=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,B=Symbol.for("react.element"),I=Symbol.for("react.portal"),q=Symbol.for("react.fragment"),$=Symbol.for("react.strict_mode"),K=Symbol.for("react.profiler"),j=Symbol.for("react.provider"),Y=Symbol.for("react.context"),W=Symbol.for("react.forward_ref"),ue=Symbol.for("react.suspense"),Z=Symbol.for("react.suspense_list"),ee=Symbol.for("react.memo"),ge=Symbol.for("react.lazy"),Ce=Symbol.for("react.offscreen"),X=Symbol.iterator;function ce(r){return r===null||typeof r!="object"?null:(r=X&&r[X]||r["@@iterator"],typeof r=="function"?r:null)}var P=Object.assign,L;function G(r){if(L===void 0)try{throw Error()}catch(u){var o=u.stack.trim().match(/\n( *(at )?)/);L=o&&o[1]||""}return`
|
|
34
|
-
`+L+r}var M=!1;function J(r,o){if(!r||M)return"";M=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(H){var f=H}Reflect.construct(r,[],o)}else{try{o.call()}catch(H){f=H}r.call(o.prototype)}else{try{throw Error()}catch(H){f=H}r()}}catch(H){if(H&&f&&typeof H.stack=="string"){for(var g=H.stack.split(`
|
|
35
|
-
`),x=f.stack.split(`
|
|
36
|
-
`),b=g.length-1,N=x.length-1;1<=b&&0<=N&&g[b]!==x[N];)N--;for(;1<=b&&0<=N;b--,N--)if(g[b]!==x[N]){if(b!==1||N!==1)do if(b--,N--,0>N||g[b]!==x[N]){var _=`
|
|
37
|
-
`+g[b].replace(" at new "," at ");return r.displayName&&_.includes("<anonymous>")&&(_=_.replace("<anonymous>",r.displayName)),_}while(1<=b&&0<=N);break}}}finally{M=!1,Error.prepareStackTrace=u}return(r=r?r.displayName||r.name:"")?G(r):""}function he(r){switch(r.tag){case 5:return G(r.type);case 16:return G("Lazy");case 13:return G("Suspense");case 19:return G("SuspenseList");case 0:case 2:case 15:return r=J(r.type,!1),r;case 11:return r=J(r.type.render,!1),r;case 1:return r=J(r.type,!0),r;default:return""}}function me(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case q:return"Fragment";case I:return"Portal";case K:return"Profiler";case $:return"StrictMode";case ue:return"Suspense";case Z:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case Y:return(r.displayName||"Context")+".Consumer";case j:return(r._context.displayName||"Context")+".Provider";case W:var o=r.render;return r=r.displayName,r||(r=o.displayName||o.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case ee:return o=r.displayName||null,o!==null?o:me(r.type)||"Memo";case ge:o=r._payload,r=r._init;try{return me(r(o))}catch{}}return null}function ve(r){var o=r.type;switch(r.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=o.render,r=r.displayName||r.name||"",o.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return me(o);case 8:return o===$?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function Ee(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Re(r){var o=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function Be(r){var o=Re(r)?"checked":"value",u=Object.getOwnPropertyDescriptor(r.constructor.prototype,o),f=""+r[o];if(!r.hasOwnProperty(o)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var g=u.get,x=u.set;return Object.defineProperty(r,o,{configurable:!0,get:function(){return g.call(this)},set:function(b){f=""+b,x.call(this,b)}}),Object.defineProperty(r,o,{enumerable:u.enumerable}),{getValue:function(){return f},setValue:function(b){f=""+b},stopTracking:function(){r._valueTracker=null,delete r[o]}}}}function ft(r){r._valueTracker||(r._valueTracker=Be(r))}function qe(r){if(!r)return!1;var o=r._valueTracker;if(!o)return!0;var u=o.getValue(),f="";return r&&(f=Re(r)?r.checked?"true":"false":r.value),r=f,r!==u?(o.setValue(r),!0):!1}function lt(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function _e(r,o){var u=o.checked;return P({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:u??r._wrapperState.initialChecked})}function tn(r,o){var u=o.defaultValue==null?"":o.defaultValue,f=o.checked!=null?o.checked:o.defaultChecked;u=Ee(o.value!=null?o.value:u),r._wrapperState={initialChecked:f,initialValue:u,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function Rt(r,o){o=o.checked,o!=null&&A(r,"checked",o,!1)}function Xe(r,o){Rt(r,o);var u=Ee(o.value),f=o.type;if(u!=null)f==="number"?(u===0&&r.value===""||r.value!=u)&&(r.value=""+u):r.value!==""+u&&(r.value=""+u);else if(f==="submit"||f==="reset"){r.removeAttribute("value");return}o.hasOwnProperty("value")?dt(r,o.type,u):o.hasOwnProperty("defaultValue")&&dt(r,o.type,Ee(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(r.defaultChecked=!!o.defaultChecked)}function mt(r,o,u){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var f=o.type;if(!(f!=="submit"&&f!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+r._wrapperState.initialValue,u||o===r.value||(r.value=o),r.defaultValue=o}u=r.name,u!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,u!==""&&(r.name=u)}function dt(r,o,u){(o!=="number"||lt(r.ownerDocument)!==r)&&(u==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+u&&(r.defaultValue=""+u))}var He=Array.isArray;function Dt(r,o,u,f){if(r=r.options,o){o={};for(var g=0;g<u.length;g++)o["$"+u[g]]=!0;for(u=0;u<r.length;u++)g=o.hasOwnProperty("$"+r[u].value),r[u].selected!==g&&(r[u].selected=g),g&&f&&(r[u].defaultSelected=!0)}else{for(u=""+Ee(u),o=null,g=0;g<r.length;g++){if(r[g].value===u){r[g].selected=!0,f&&(r[g].defaultSelected=!0);return}o!==null||r[g].disabled||(o=r[g])}o!==null&&(o.selected=!0)}}function _t(r,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return P({},o,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function Un(r,o){var u=o.value;if(u==null){if(u=o.children,o=o.defaultValue,u!=null){if(o!=null)throw Error(n(92));if(He(u)){if(1<u.length)throw Error(n(93));u=u[0]}o=u}o==null&&(o=""),u=o}r._wrapperState={initialValue:Ee(u)}}function rr(r,o){var u=Ee(o.value),f=Ee(o.defaultValue);u!=null&&(u=""+u,u!==r.value&&(r.value=u),o.defaultValue==null&&r.defaultValue!==u&&(r.defaultValue=u)),f!=null&&(r.defaultValue=""+f)}function dn(r){var o=r.textContent;o===r._wrapperState.initialValue&&o!==""&&o!==null&&(r.value=o)}function Q(r){switch(r){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function le(r,o){return r==null||r==="http://www.w3.org/1999/xhtml"?Q(o):r==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var fe,Le=function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(o,u,f,g){MSApp.execUnsafeLocalFunction(function(){return r(o,u,f,g)})}:r}(function(r,o){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=o;else{for(fe=fe||document.createElement("div"),fe.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=fe.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;o.firstChild;)r.appendChild(o.firstChild)}});function Fe(r,o){if(o){var u=r.firstChild;if(u&&u===r.lastChild&&u.nodeType===3){u.nodeValue=o;return}}r.textContent=o}var gt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Lt=["Webkit","ms","Moz","O"];Object.keys(gt).forEach(function(r){Lt.forEach(function(o){o=o+r.charAt(0).toUpperCase()+r.substring(1),gt[o]=gt[r]})});function nt(r,o,u){return o==null||typeof o=="boolean"||o===""?"":u||typeof o!="number"||o===0||gt.hasOwnProperty(r)&>[r]?(""+o).trim():o+"px"}function nn(r,o){r=r.style;for(var u in o)if(o.hasOwnProperty(u)){var f=u.indexOf("--")===0,g=nt(u,o[u],f);u==="float"&&(u="cssFloat"),f?r.setProperty(u,g):r[u]=g}}var z=P({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function re(r,o){if(o){if(z[r]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(n(137,r));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(n(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(n(61))}if(o.style!=null&&typeof o.style!="object")throw Error(n(62))}}function O(r,o){if(r.indexOf("-")===-1)return typeof o.is=="string";switch(r){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var te=null;function de(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var je=null,Pe=null,pe=null;function Oe(r){if(r=Lo(r)){if(typeof je!="function")throw Error(n(280));var o=r.stateNode;o&&(o=aa(o),je(r.stateNode,r.type,o))}}function xt(r){Pe?pe?pe.push(r):pe=[r]:Pe=r}function Ye(){if(Pe){var r=Pe,o=pe;if(pe=Pe=null,Oe(r),o)for(r=0;r<o.length;r++)Oe(o[r])}}function wt(r,o){return r(o)}function At(){}var rt=!1;function Bt(r,o,u){if(rt)return r(o,u);rt=!0;try{return wt(r,o,u)}finally{rt=!1,(Pe!==null||pe!==null)&&(At(),Ye())}}function Ct(r,o){var u=r.stateNode;if(u===null)return null;var f=aa(u);if(f===null)return null;u=f[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(r=r.type,f=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!f;break e;default:r=!1}if(r)return null;if(u&&typeof u!="function")throw Error(n(231,o,typeof u));return u}var tu=!1;if(c)try{var go={};Object.defineProperty(go,"passive",{get:function(){tu=!0}}),window.addEventListener("test",go,go),window.removeEventListener("test",go,go)}catch{tu=!1}function Qk(r,o,u,f,g,x,b,N,_){var H=Array.prototype.slice.call(arguments,3);try{o.apply(u,H)}catch(ie){this.onError(ie)}}var yo=!1,zs=null,Vs=!1,nu=null,Zk={onError:function(r){yo=!0,zs=r}};function Jk(r,o,u,f,g,x,b,N,_){yo=!1,zs=null,Qk.apply(Zk,arguments)}function eS(r,o,u,f,g,x,b,N,_){if(Jk.apply(this,arguments),yo){if(yo){var H=zs;yo=!1,zs=null}else throw Error(n(198));Vs||(Vs=!0,nu=H)}}function Kr(r){var o=r,u=r;if(r.alternate)for(;o.return;)o=o.return;else{r=o;do o=r,(o.flags&4098)!==0&&(u=o.return),r=o.return;while(r)}return o.tag===3?u:null}function Qh(r){if(r.tag===13){var o=r.memoizedState;if(o===null&&(r=r.alternate,r!==null&&(o=r.memoizedState)),o!==null)return o.dehydrated}return null}function Zh(r){if(Kr(r)!==r)throw Error(n(188))}function tS(r){var o=r.alternate;if(!o){if(o=Kr(r),o===null)throw Error(n(188));return o!==r?null:r}for(var u=r,f=o;;){var g=u.return;if(g===null)break;var x=g.alternate;if(x===null){if(f=g.return,f!==null){u=f;continue}break}if(g.child===x.child){for(x=g.child;x;){if(x===u)return Zh(g),r;if(x===f)return Zh(g),o;x=x.sibling}throw Error(n(188))}if(u.return!==f.return)u=g,f=x;else{for(var b=!1,N=g.child;N;){if(N===u){b=!0,u=g,f=x;break}if(N===f){b=!0,f=g,u=x;break}N=N.sibling}if(!b){for(N=x.child;N;){if(N===u){b=!0,u=x,f=g;break}if(N===f){b=!0,f=x,u=g;break}N=N.sibling}if(!b)throw Error(n(189))}}if(u.alternate!==f)throw Error(n(190))}if(u.tag!==3)throw Error(n(188));return u.stateNode.current===u?r:o}function Jh(r){return r=tS(r),r!==null?ep(r):null}function ep(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var o=ep(r);if(o!==null)return o;r=r.sibling}return null}var tp=t.unstable_scheduleCallback,np=t.unstable_cancelCallback,nS=t.unstable_shouldYield,rS=t.unstable_requestPaint,yt=t.unstable_now,iS=t.unstable_getCurrentPriorityLevel,ru=t.unstable_ImmediatePriority,rp=t.unstable_UserBlockingPriority,Bs=t.unstable_NormalPriority,oS=t.unstable_LowPriority,ip=t.unstable_IdlePriority,$s=null,Wn=null;function sS(r){if(Wn&&typeof Wn.onCommitFiberRoot=="function")try{Wn.onCommitFiberRoot($s,r,void 0,(r.current.flags&128)===128)}catch{}}var Nn=Math.clz32?Math.clz32:uS,aS=Math.log,lS=Math.LN2;function uS(r){return r>>>=0,r===0?32:31-(aS(r)/lS|0)|0}var Us=64,Ws=4194304;function vo(r){switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function Hs(r,o){var u=r.pendingLanes;if(u===0)return 0;var f=0,g=r.suspendedLanes,x=r.pingedLanes,b=u&268435455;if(b!==0){var N=b&~g;N!==0?f=vo(N):(x&=b,x!==0&&(f=vo(x)))}else b=u&~g,b!==0?f=vo(b):x!==0&&(f=vo(x));if(f===0)return 0;if(o!==0&&o!==f&&(o&g)===0&&(g=f&-f,x=o&-o,g>=x||g===16&&(x&4194240)!==0))return o;if((f&4)!==0&&(f|=u&16),o=r.entangledLanes,o!==0)for(r=r.entanglements,o&=f;0<o;)u=31-Nn(o),g=1<<u,f|=r[u],o&=~g;return f}function cS(r,o){switch(r){case 1:case 2:case 4:return o+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function fS(r,o){for(var u=r.suspendedLanes,f=r.pingedLanes,g=r.expirationTimes,x=r.pendingLanes;0<x;){var b=31-Nn(x),N=1<<b,_=g[b];_===-1?((N&u)===0||(N&f)!==0)&&(g[b]=cS(N,o)):_<=o&&(r.expiredLanes|=N),x&=~N}}function iu(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function op(){var r=Us;return Us<<=1,(Us&4194240)===0&&(Us=64),r}function ou(r){for(var o=[],u=0;31>u;u++)o.push(r);return o}function xo(r,o,u){r.pendingLanes|=o,o!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,o=31-Nn(o),r[o]=u}function dS(r,o){var u=r.pendingLanes&~o;r.pendingLanes=o,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=o,r.mutableReadLanes&=o,r.entangledLanes&=o,o=r.entanglements;var f=r.eventTimes;for(r=r.expirationTimes;0<u;){var g=31-Nn(u),x=1<<g;o[g]=0,f[g]=-1,r[g]=-1,u&=~x}}function su(r,o){var u=r.entangledLanes|=o;for(r=r.entanglements;u;){var f=31-Nn(u),g=1<<f;g&o|r[f]&o&&(r[f]|=o),u&=~g}}var Ge=0;function sp(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var ap,au,lp,up,cp,lu=!1,Ks=[],gr=null,yr=null,vr=null,wo=new Map,ko=new Map,xr=[],hS="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function fp(r,o){switch(r){case"focusin":case"focusout":gr=null;break;case"dragenter":case"dragleave":yr=null;break;case"mouseover":case"mouseout":vr=null;break;case"pointerover":case"pointerout":wo.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":ko.delete(o.pointerId)}}function So(r,o,u,f,g,x){return r===null||r.nativeEvent!==x?(r={blockedOn:o,domEventName:u,eventSystemFlags:f,nativeEvent:x,targetContainers:[g]},o!==null&&(o=Lo(o),o!==null&&au(o)),r):(r.eventSystemFlags|=f,o=r.targetContainers,g!==null&&o.indexOf(g)===-1&&o.push(g),r)}function pS(r,o,u,f,g){switch(o){case"focusin":return gr=So(gr,r,o,u,f,g),!0;case"dragenter":return yr=So(yr,r,o,u,f,g),!0;case"mouseover":return vr=So(vr,r,o,u,f,g),!0;case"pointerover":var x=g.pointerId;return wo.set(x,So(wo.get(x)||null,r,o,u,f,g)),!0;case"gotpointercapture":return x=g.pointerId,ko.set(x,So(ko.get(x)||null,r,o,u,f,g)),!0}return!1}function dp(r){var o=qr(r.target);if(o!==null){var u=Kr(o);if(u!==null){if(o=u.tag,o===13){if(o=Qh(u),o!==null){r.blockedOn=o,cp(r.priority,function(){lp(u)});return}}else if(o===3&&u.stateNode.current.memoizedState.isDehydrated){r.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}r.blockedOn=null}function qs(r){if(r.blockedOn!==null)return!1;for(var o=r.targetContainers;0<o.length;){var u=cu(r.domEventName,r.eventSystemFlags,o[0],r.nativeEvent);if(u===null){u=r.nativeEvent;var f=new u.constructor(u.type,u);te=f,u.target.dispatchEvent(f),te=null}else return o=Lo(u),o!==null&&au(o),r.blockedOn=u,!1;o.shift()}return!0}function hp(r,o,u){qs(r)&&u.delete(o)}function mS(){lu=!1,gr!==null&&qs(gr)&&(gr=null),yr!==null&&qs(yr)&&(yr=null),vr!==null&&qs(vr)&&(vr=null),wo.forEach(hp),ko.forEach(hp)}function bo(r,o){r.blockedOn===o&&(r.blockedOn=null,lu||(lu=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,mS)))}function Co(r){function o(g){return bo(g,r)}if(0<Ks.length){bo(Ks[0],r);for(var u=1;u<Ks.length;u++){var f=Ks[u];f.blockedOn===r&&(f.blockedOn=null)}}for(gr!==null&&bo(gr,r),yr!==null&&bo(yr,r),vr!==null&&bo(vr,r),wo.forEach(o),ko.forEach(o),u=0;u<xr.length;u++)f=xr[u],f.blockedOn===r&&(f.blockedOn=null);for(;0<xr.length&&(u=xr[0],u.blockedOn===null);)dp(u),u.blockedOn===null&&xr.shift()}var ki=D.ReactCurrentBatchConfig,Xs=!0;function gS(r,o,u,f){var g=Ge,x=ki.transition;ki.transition=null;try{Ge=1,uu(r,o,u,f)}finally{Ge=g,ki.transition=x}}function yS(r,o,u,f){var g=Ge,x=ki.transition;ki.transition=null;try{Ge=4,uu(r,o,u,f)}finally{Ge=g,ki.transition=x}}function uu(r,o,u,f){if(Xs){var g=cu(r,o,u,f);if(g===null)Pu(r,o,f,Ys,u),fp(r,f);else if(pS(g,r,o,u,f))f.stopPropagation();else if(fp(r,f),o&4&&-1<hS.indexOf(r)){for(;g!==null;){var x=Lo(g);if(x!==null&&ap(x),x=cu(r,o,u,f),x===null&&Pu(r,o,f,Ys,u),x===g)break;g=x}g!==null&&f.stopPropagation()}else Pu(r,o,f,null,u)}}var Ys=null;function cu(r,o,u,f){if(Ys=null,r=de(f),r=qr(r),r!==null)if(o=Kr(r),o===null)r=null;else if(u=o.tag,u===13){if(r=Qh(o),r!==null)return r;r=null}else if(u===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;r=null}else o!==r&&(r=null);return Ys=r,null}function pp(r){switch(r){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(iS()){case ru:return 1;case rp:return 4;case Bs:case oS:return 16;case ip:return 536870912;default:return 16}default:return 16}}var wr=null,fu=null,Gs=null;function mp(){if(Gs)return Gs;var r,o=fu,u=o.length,f,g="value"in wr?wr.value:wr.textContent,x=g.length;for(r=0;r<u&&o[r]===g[r];r++);var b=u-r;for(f=1;f<=b&&o[u-f]===g[x-f];f++);return Gs=g.slice(r,1<f?1-f:void 0)}function Qs(r){var o=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&o===13&&(r=13)):r=o,r===10&&(r=13),32<=r||r===13?r:0}function Zs(){return!0}function gp(){return!1}function hn(r){function o(u,f,g,x,b){this._reactName=u,this._targetInst=g,this.type=f,this.nativeEvent=x,this.target=b,this.currentTarget=null;for(var N in r)r.hasOwnProperty(N)&&(u=r[N],this[N]=u?u(x):x[N]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?Zs:gp,this.isPropagationStopped=gp,this}return P(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Zs)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Zs)},persist:function(){},isPersistent:Zs}),o}var Si={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},du=hn(Si),Eo=P({},Si,{view:0,detail:0}),vS=hn(Eo),hu,pu,To,Js=P({},Eo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:gu,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==To&&(To&&r.type==="mousemove"?(hu=r.screenX-To.screenX,pu=r.screenY-To.screenY):pu=hu=0,To=r),hu)},movementY:function(r){return"movementY"in r?r.movementY:pu}}),yp=hn(Js),xS=P({},Js,{dataTransfer:0}),wS=hn(xS),kS=P({},Eo,{relatedTarget:0}),mu=hn(kS),SS=P({},Si,{animationName:0,elapsedTime:0,pseudoElement:0}),bS=hn(SS),CS=P({},Si,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),ES=hn(CS),TS=P({},Si,{data:0}),vp=hn(TS),PS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},RS={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},AS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function MS(r){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(r):(r=AS[r])?!!o[r]:!1}function gu(){return MS}var NS=P({},Eo,{key:function(r){if(r.key){var o=PS[r.key]||r.key;if(o!=="Unidentified")return o}return r.type==="keypress"?(r=Qs(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?RS[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:gu,charCode:function(r){return r.type==="keypress"?Qs(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Qs(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),jS=hn(NS),IS=P({},Js,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),xp=hn(IS),DS=P({},Eo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:gu}),_S=hn(DS),LS=P({},Si,{propertyName:0,elapsedTime:0,pseudoElement:0}),OS=hn(LS),FS=P({},Js,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),zS=hn(FS),VS=[9,13,27,32],yu=c&&"CompositionEvent"in window,Po=null;c&&"documentMode"in document&&(Po=document.documentMode);var BS=c&&"TextEvent"in window&&!Po,wp=c&&(!yu||Po&&8<Po&&11>=Po),kp=" ",Sp=!1;function bp(r,o){switch(r){case"keyup":return VS.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Cp(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var bi=!1;function $S(r,o){switch(r){case"compositionend":return Cp(o);case"keypress":return o.which!==32?null:(Sp=!0,kp);case"textInput":return r=o.data,r===kp&&Sp?null:r;default:return null}}function US(r,o){if(bi)return r==="compositionend"||!yu&&bp(r,o)?(r=mp(),Gs=fu=wr=null,bi=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return wp&&o.locale!=="ko"?null:o.data;default:return null}}var WS={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ep(r){var o=r&&r.nodeName&&r.nodeName.toLowerCase();return o==="input"?!!WS[r.type]:o==="textarea"}function Tp(r,o,u,f){xt(f),o=ia(o,"onChange"),0<o.length&&(u=new du("onChange","change",null,u,f),r.push({event:u,listeners:o}))}var Ro=null,Ao=null;function HS(r){Wp(r,0)}function ea(r){var o=Ri(r);if(qe(o))return r}function KS(r,o){if(r==="change")return o}var Pp=!1;if(c){var vu;if(c){var xu="oninput"in document;if(!xu){var Rp=document.createElement("div");Rp.setAttribute("oninput","return;"),xu=typeof Rp.oninput=="function"}vu=xu}else vu=!1;Pp=vu&&(!document.documentMode||9<document.documentMode)}function Ap(){Ro&&(Ro.detachEvent("onpropertychange",Mp),Ao=Ro=null)}function Mp(r){if(r.propertyName==="value"&&ea(Ao)){var o=[];Tp(o,Ao,r,de(r)),Bt(HS,o)}}function qS(r,o,u){r==="focusin"?(Ap(),Ro=o,Ao=u,Ro.attachEvent("onpropertychange",Mp)):r==="focusout"&&Ap()}function XS(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return ea(Ao)}function YS(r,o){if(r==="click")return ea(o)}function GS(r,o){if(r==="input"||r==="change")return ea(o)}function QS(r,o){return r===o&&(r!==0||1/r===1/o)||r!==r&&o!==o}var jn=typeof Object.is=="function"?Object.is:QS;function Mo(r,o){if(jn(r,o))return!0;if(typeof r!="object"||r===null||typeof o!="object"||o===null)return!1;var u=Object.keys(r),f=Object.keys(o);if(u.length!==f.length)return!1;for(f=0;f<u.length;f++){var g=u[f];if(!d.call(o,g)||!jn(r[g],o[g]))return!1}return!0}function Np(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function jp(r,o){var u=Np(r);r=0;for(var f;u;){if(u.nodeType===3){if(f=r+u.textContent.length,r<=o&&f>=o)return{node:u,offset:o-r};r=f}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=Np(u)}}function Ip(r,o){return r&&o?r===o?!0:r&&r.nodeType===3?!1:o&&o.nodeType===3?Ip(r,o.parentNode):"contains"in r?r.contains(o):r.compareDocumentPosition?!!(r.compareDocumentPosition(o)&16):!1:!1}function Dp(){for(var r=window,o=lt();o instanceof r.HTMLIFrameElement;){try{var u=typeof o.contentWindow.location.href=="string"}catch{u=!1}if(u)r=o.contentWindow;else break;o=lt(r.document)}return o}function wu(r){var o=r&&r.nodeName&&r.nodeName.toLowerCase();return o&&(o==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||o==="textarea"||r.contentEditable==="true")}function ZS(r){var o=Dp(),u=r.focusedElem,f=r.selectionRange;if(o!==u&&u&&u.ownerDocument&&Ip(u.ownerDocument.documentElement,u)){if(f!==null&&wu(u)){if(o=f.start,r=f.end,r===void 0&&(r=o),"selectionStart"in u)u.selectionStart=o,u.selectionEnd=Math.min(r,u.value.length);else if(r=(o=u.ownerDocument||document)&&o.defaultView||window,r.getSelection){r=r.getSelection();var g=u.textContent.length,x=Math.min(f.start,g);f=f.end===void 0?x:Math.min(f.end,g),!r.extend&&x>f&&(g=f,f=x,x=g),g=jp(u,x);var b=jp(u,f);g&&b&&(r.rangeCount!==1||r.anchorNode!==g.node||r.anchorOffset!==g.offset||r.focusNode!==b.node||r.focusOffset!==b.offset)&&(o=o.createRange(),o.setStart(g.node,g.offset),r.removeAllRanges(),x>f?(r.addRange(o),r.extend(b.node,b.offset)):(o.setEnd(b.node,b.offset),r.addRange(o)))}}for(o=[],r=u;r=r.parentNode;)r.nodeType===1&&o.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof u.focus=="function"&&u.focus(),u=0;u<o.length;u++)r=o[u],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var JS=c&&"documentMode"in document&&11>=document.documentMode,Ci=null,ku=null,No=null,Su=!1;function _p(r,o,u){var f=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Su||Ci==null||Ci!==lt(f)||(f=Ci,"selectionStart"in f&&wu(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),No&&Mo(No,f)||(No=f,f=ia(ku,"onSelect"),0<f.length&&(o=new du("onSelect","select",null,o,u),r.push({event:o,listeners:f}),o.target=Ci)))}function ta(r,o){var u={};return u[r.toLowerCase()]=o.toLowerCase(),u["Webkit"+r]="webkit"+o,u["Moz"+r]="moz"+o,u}var Ei={animationend:ta("Animation","AnimationEnd"),animationiteration:ta("Animation","AnimationIteration"),animationstart:ta("Animation","AnimationStart"),transitionend:ta("Transition","TransitionEnd")},bu={},Lp={};c&&(Lp=document.createElement("div").style,"AnimationEvent"in window||(delete Ei.animationend.animation,delete Ei.animationiteration.animation,delete Ei.animationstart.animation),"TransitionEvent"in window||delete Ei.transitionend.transition);function na(r){if(bu[r])return bu[r];if(!Ei[r])return r;var o=Ei[r],u;for(u in o)if(o.hasOwnProperty(u)&&u in Lp)return bu[r]=o[u];return r}var Op=na("animationend"),Fp=na("animationiteration"),zp=na("animationstart"),Vp=na("transitionend"),Bp=new Map,$p="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function kr(r,o){Bp.set(r,o),l(o,[r])}for(var Cu=0;Cu<$p.length;Cu++){var Eu=$p[Cu],eb=Eu.toLowerCase(),tb=Eu[0].toUpperCase()+Eu.slice(1);kr(eb,"on"+tb)}kr(Op,"onAnimationEnd"),kr(Fp,"onAnimationIteration"),kr(zp,"onAnimationStart"),kr("dblclick","onDoubleClick"),kr("focusin","onFocus"),kr("focusout","onBlur"),kr(Vp,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var jo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),nb=new Set("cancel close invalid load scroll toggle".split(" ").concat(jo));function Up(r,o,u){var f=r.type||"unknown-event";r.currentTarget=u,eS(f,o,void 0,r),r.currentTarget=null}function Wp(r,o){o=(o&4)!==0;for(var u=0;u<r.length;u++){var f=r[u],g=f.event;f=f.listeners;e:{var x=void 0;if(o)for(var b=f.length-1;0<=b;b--){var N=f[b],_=N.instance,H=N.currentTarget;if(N=N.listener,_!==x&&g.isPropagationStopped())break e;Up(g,N,H),x=_}else for(b=0;b<f.length;b++){if(N=f[b],_=N.instance,H=N.currentTarget,N=N.listener,_!==x&&g.isPropagationStopped())break e;Up(g,N,H),x=_}}}if(Vs)throw r=nu,Vs=!1,nu=null,r}function ot(r,o){var u=o[Iu];u===void 0&&(u=o[Iu]=new Set);var f=r+"__bubble";u.has(f)||(Hp(o,r,2,!1),u.add(f))}function Tu(r,o,u){var f=0;o&&(f|=4),Hp(u,r,f,o)}var ra="_reactListening"+Math.random().toString(36).slice(2);function Io(r){if(!r[ra]){r[ra]=!0,i.forEach(function(u){u!=="selectionchange"&&(nb.has(u)||Tu(u,!1,r),Tu(u,!0,r))});var o=r.nodeType===9?r:r.ownerDocument;o===null||o[ra]||(o[ra]=!0,Tu("selectionchange",!1,o))}}function Hp(r,o,u,f){switch(pp(o)){case 1:var g=gS;break;case 4:g=yS;break;default:g=uu}u=g.bind(null,o,u,r),g=void 0,!tu||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(g=!0),f?g!==void 0?r.addEventListener(o,u,{capture:!0,passive:g}):r.addEventListener(o,u,!0):g!==void 0?r.addEventListener(o,u,{passive:g}):r.addEventListener(o,u,!1)}function Pu(r,o,u,f,g){var x=f;if((o&1)===0&&(o&2)===0&&f!==null)e:for(;;){if(f===null)return;var b=f.tag;if(b===3||b===4){var N=f.stateNode.containerInfo;if(N===g||N.nodeType===8&&N.parentNode===g)break;if(b===4)for(b=f.return;b!==null;){var _=b.tag;if((_===3||_===4)&&(_=b.stateNode.containerInfo,_===g||_.nodeType===8&&_.parentNode===g))return;b=b.return}for(;N!==null;){if(b=qr(N),b===null)return;if(_=b.tag,_===5||_===6){f=x=b;continue e}N=N.parentNode}}f=f.return}Bt(function(){var H=x,ie=de(u),oe=[];e:{var ne=Bp.get(r);if(ne!==void 0){var ye=du,we=r;switch(r){case"keypress":if(Qs(u)===0)break e;case"keydown":case"keyup":ye=jS;break;case"focusin":we="focus",ye=mu;break;case"focusout":we="blur",ye=mu;break;case"beforeblur":case"afterblur":ye=mu;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ye=yp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ye=wS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ye=_S;break;case Op:case Fp:case zp:ye=bS;break;case Vp:ye=OS;break;case"scroll":ye=vS;break;case"wheel":ye=zS;break;case"copy":case"cut":case"paste":ye=ES;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ye=xp}var be=(o&4)!==0,vt=!be&&r==="scroll",V=be?ne!==null?ne+"Capture":null:ne;be=[];for(var F=H,U;F!==null;){U=F;var ae=U.stateNode;if(U.tag===5&&ae!==null&&(U=ae,V!==null&&(ae=Ct(F,V),ae!=null&&be.push(Do(F,ae,U)))),vt)break;F=F.return}0<be.length&&(ne=new ye(ne,we,null,u,ie),oe.push({event:ne,listeners:be}))}}if((o&7)===0){e:{if(ne=r==="mouseover"||r==="pointerover",ye=r==="mouseout"||r==="pointerout",ne&&u!==te&&(we=u.relatedTarget||u.fromElement)&&(qr(we)||we[ir]))break e;if((ye||ne)&&(ne=ie.window===ie?ie:(ne=ie.ownerDocument)?ne.defaultView||ne.parentWindow:window,ye?(we=u.relatedTarget||u.toElement,ye=H,we=we?qr(we):null,we!==null&&(vt=Kr(we),we!==vt||we.tag!==5&&we.tag!==6)&&(we=null)):(ye=null,we=H),ye!==we)){if(be=yp,ae="onMouseLeave",V="onMouseEnter",F="mouse",(r==="pointerout"||r==="pointerover")&&(be=xp,ae="onPointerLeave",V="onPointerEnter",F="pointer"),vt=ye==null?ne:Ri(ye),U=we==null?ne:Ri(we),ne=new be(ae,F+"leave",ye,u,ie),ne.target=vt,ne.relatedTarget=U,ae=null,qr(ie)===H&&(be=new be(V,F+"enter",we,u,ie),be.target=U,be.relatedTarget=vt,ae=be),vt=ae,ye&&we)t:{for(be=ye,V=we,F=0,U=be;U;U=Ti(U))F++;for(U=0,ae=V;ae;ae=Ti(ae))U++;for(;0<F-U;)be=Ti(be),F--;for(;0<U-F;)V=Ti(V),U--;for(;F--;){if(be===V||V!==null&&be===V.alternate)break t;be=Ti(be),V=Ti(V)}be=null}else be=null;ye!==null&&Kp(oe,ne,ye,be,!1),we!==null&&vt!==null&&Kp(oe,vt,we,be,!0)}}e:{if(ne=H?Ri(H):window,ye=ne.nodeName&&ne.nodeName.toLowerCase(),ye==="select"||ye==="input"&&ne.type==="file")var Te=KS;else if(Ep(ne))if(Pp)Te=GS;else{Te=XS;var Ae=qS}else(ye=ne.nodeName)&&ye.toLowerCase()==="input"&&(ne.type==="checkbox"||ne.type==="radio")&&(Te=YS);if(Te&&(Te=Te(r,H))){Tp(oe,Te,u,ie);break e}Ae&&Ae(r,ne,H),r==="focusout"&&(Ae=ne._wrapperState)&&Ae.controlled&&ne.type==="number"&&dt(ne,"number",ne.value)}switch(Ae=H?Ri(H):window,r){case"focusin":(Ep(Ae)||Ae.contentEditable==="true")&&(Ci=Ae,ku=H,No=null);break;case"focusout":No=ku=Ci=null;break;case"mousedown":Su=!0;break;case"contextmenu":case"mouseup":case"dragend":Su=!1,_p(oe,u,ie);break;case"selectionchange":if(JS)break;case"keydown":case"keyup":_p(oe,u,ie)}var Me;if(yu)e:{switch(r){case"compositionstart":var Ie="onCompositionStart";break e;case"compositionend":Ie="onCompositionEnd";break e;case"compositionupdate":Ie="onCompositionUpdate";break e}Ie=void 0}else bi?bp(r,u)&&(Ie="onCompositionEnd"):r==="keydown"&&u.keyCode===229&&(Ie="onCompositionStart");Ie&&(wp&&u.locale!=="ko"&&(bi||Ie!=="onCompositionStart"?Ie==="onCompositionEnd"&&bi&&(Me=mp()):(wr=ie,fu="value"in wr?wr.value:wr.textContent,bi=!0)),Ae=ia(H,Ie),0<Ae.length&&(Ie=new vp(Ie,r,null,u,ie),oe.push({event:Ie,listeners:Ae}),Me?Ie.data=Me:(Me=Cp(u),Me!==null&&(Ie.data=Me)))),(Me=BS?$S(r,u):US(r,u))&&(H=ia(H,"onBeforeInput"),0<H.length&&(ie=new vp("onBeforeInput","beforeinput",null,u,ie),oe.push({event:ie,listeners:H}),ie.data=Me))}Wp(oe,o)})}function Do(r,o,u){return{instance:r,listener:o,currentTarget:u}}function ia(r,o){for(var u=o+"Capture",f=[];r!==null;){var g=r,x=g.stateNode;g.tag===5&&x!==null&&(g=x,x=Ct(r,u),x!=null&&f.unshift(Do(r,x,g)),x=Ct(r,o),x!=null&&f.push(Do(r,x,g))),r=r.return}return f}function Ti(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function Kp(r,o,u,f,g){for(var x=o._reactName,b=[];u!==null&&u!==f;){var N=u,_=N.alternate,H=N.stateNode;if(_!==null&&_===f)break;N.tag===5&&H!==null&&(N=H,g?(_=Ct(u,x),_!=null&&b.unshift(Do(u,_,N))):g||(_=Ct(u,x),_!=null&&b.push(Do(u,_,N)))),u=u.return}b.length!==0&&r.push({event:o,listeners:b})}var rb=/\r\n?/g,ib=/\u0000|\uFFFD/g;function qp(r){return(typeof r=="string"?r:""+r).replace(rb,`
|
|
38
|
-
`).replace(ib,"")}function oa(r,o,u){if(o=qp(o),qp(r)!==o&&u)throw Error(n(425))}function sa(){}var Ru=null,Au=null;function Mu(r,o){return r==="textarea"||r==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var Nu=typeof setTimeout=="function"?setTimeout:void 0,ob=typeof clearTimeout=="function"?clearTimeout:void 0,Xp=typeof Promise=="function"?Promise:void 0,sb=typeof queueMicrotask=="function"?queueMicrotask:typeof Xp<"u"?function(r){return Xp.resolve(null).then(r).catch(ab)}:Nu;function ab(r){setTimeout(function(){throw r})}function ju(r,o){var u=o,f=0;do{var g=u.nextSibling;if(r.removeChild(u),g&&g.nodeType===8)if(u=g.data,u==="/$"){if(f===0){r.removeChild(g),Co(o);return}f--}else u!=="$"&&u!=="$?"&&u!=="$!"||f++;u=g}while(u);Co(o)}function Sr(r){for(;r!=null;r=r.nextSibling){var o=r.nodeType;if(o===1||o===3)break;if(o===8){if(o=r.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return r}function Yp(r){r=r.previousSibling;for(var o=0;r;){if(r.nodeType===8){var u=r.data;if(u==="$"||u==="$!"||u==="$?"){if(o===0)return r;o--}else u==="/$"&&o++}r=r.previousSibling}return null}var Pi=Math.random().toString(36).slice(2),Hn="__reactFiber$"+Pi,_o="__reactProps$"+Pi,ir="__reactContainer$"+Pi,Iu="__reactEvents$"+Pi,lb="__reactListeners$"+Pi,ub="__reactHandles$"+Pi;function qr(r){var o=r[Hn];if(o)return o;for(var u=r.parentNode;u;){if(o=u[ir]||u[Hn]){if(u=o.alternate,o.child!==null||u!==null&&u.child!==null)for(r=Yp(r);r!==null;){if(u=r[Hn])return u;r=Yp(r)}return o}r=u,u=r.parentNode}return null}function Lo(r){return r=r[Hn]||r[ir],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function Ri(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(n(33))}function aa(r){return r[_o]||null}var Du=[],Ai=-1;function br(r){return{current:r}}function st(r){0>Ai||(r.current=Du[Ai],Du[Ai]=null,Ai--)}function it(r,o){Ai++,Du[Ai]=r.current,r.current=o}var Cr={},$t=br(Cr),rn=br(!1),Xr=Cr;function Mi(r,o){var u=r.type.contextTypes;if(!u)return Cr;var f=r.stateNode;if(f&&f.__reactInternalMemoizedUnmaskedChildContext===o)return f.__reactInternalMemoizedMaskedChildContext;var g={},x;for(x in u)g[x]=o[x];return f&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=o,r.__reactInternalMemoizedMaskedChildContext=g),g}function on(r){return r=r.childContextTypes,r!=null}function la(){st(rn),st($t)}function Gp(r,o,u){if($t.current!==Cr)throw Error(n(168));it($t,o),it(rn,u)}function Qp(r,o,u){var f=r.stateNode;if(o=o.childContextTypes,typeof f.getChildContext!="function")return u;f=f.getChildContext();for(var g in f)if(!(g in o))throw Error(n(108,ve(r)||"Unknown",g));return P({},u,f)}function ua(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||Cr,Xr=$t.current,it($t,r),it(rn,rn.current),!0}function Zp(r,o,u){var f=r.stateNode;if(!f)throw Error(n(169));u?(r=Qp(r,o,Xr),f.__reactInternalMemoizedMergedChildContext=r,st(rn),st($t),it($t,r)):st(rn),it(rn,u)}var or=null,ca=!1,_u=!1;function Jp(r){or===null?or=[r]:or.push(r)}function cb(r){ca=!0,Jp(r)}function Er(){if(!_u&&or!==null){_u=!0;var r=0,o=Ge;try{var u=or;for(Ge=1;r<u.length;r++){var f=u[r];do f=f(!0);while(f!==null)}or=null,ca=!1}catch(g){throw or!==null&&(or=or.slice(r+1)),tp(ru,Er),g}finally{Ge=o,_u=!1}}return null}var Ni=[],ji=0,fa=null,da=0,wn=[],kn=0,Yr=null,sr=1,ar="";function Gr(r,o){Ni[ji++]=da,Ni[ji++]=fa,fa=r,da=o}function em(r,o,u){wn[kn++]=sr,wn[kn++]=ar,wn[kn++]=Yr,Yr=r;var f=sr;r=ar;var g=32-Nn(f)-1;f&=~(1<<g),u+=1;var x=32-Nn(o)+g;if(30<x){var b=g-g%5;x=(f&(1<<b)-1).toString(32),f>>=b,g-=b,sr=1<<32-Nn(o)+g|u<<g|f,ar=x+r}else sr=1<<x|u<<g|f,ar=r}function Lu(r){r.return!==null&&(Gr(r,1),em(r,1,0))}function Ou(r){for(;r===fa;)fa=Ni[--ji],Ni[ji]=null,da=Ni[--ji],Ni[ji]=null;for(;r===Yr;)Yr=wn[--kn],wn[kn]=null,ar=wn[--kn],wn[kn]=null,sr=wn[--kn],wn[kn]=null}var pn=null,mn=null,at=!1,In=null;function tm(r,o){var u=En(5,null,null,0);u.elementType="DELETED",u.stateNode=o,u.return=r,o=r.deletions,o===null?(r.deletions=[u],r.flags|=16):o.push(u)}function nm(r,o){switch(r.tag){case 5:var u=r.type;return o=o.nodeType!==1||u.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(r.stateNode=o,pn=r,mn=Sr(o.firstChild),!0):!1;case 6:return o=r.pendingProps===""||o.nodeType!==3?null:o,o!==null?(r.stateNode=o,pn=r,mn=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(u=Yr!==null?{id:sr,overflow:ar}:null,r.memoizedState={dehydrated:o,treeContext:u,retryLane:1073741824},u=En(18,null,null,0),u.stateNode=o,u.return=r,r.child=u,pn=r,mn=null,!0):!1;default:return!1}}function Fu(r){return(r.mode&1)!==0&&(r.flags&128)===0}function zu(r){if(at){var o=mn;if(o){var u=o;if(!nm(r,o)){if(Fu(r))throw Error(n(418));o=Sr(u.nextSibling);var f=pn;o&&nm(r,o)?tm(f,u):(r.flags=r.flags&-4097|2,at=!1,pn=r)}}else{if(Fu(r))throw Error(n(418));r.flags=r.flags&-4097|2,at=!1,pn=r}}}function rm(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;pn=r}function ha(r){if(r!==pn)return!1;if(!at)return rm(r),at=!0,!1;var o;if((o=r.tag!==3)&&!(o=r.tag!==5)&&(o=r.type,o=o!=="head"&&o!=="body"&&!Mu(r.type,r.memoizedProps)),o&&(o=mn)){if(Fu(r))throw im(),Error(n(418));for(;o;)tm(r,o),o=Sr(o.nextSibling)}if(rm(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(n(317));e:{for(r=r.nextSibling,o=0;r;){if(r.nodeType===8){var u=r.data;if(u==="/$"){if(o===0){mn=Sr(r.nextSibling);break e}o--}else u!=="$"&&u!=="$!"&&u!=="$?"||o++}r=r.nextSibling}mn=null}}else mn=pn?Sr(r.stateNode.nextSibling):null;return!0}function im(){for(var r=mn;r;)r=Sr(r.nextSibling)}function Ii(){mn=pn=null,at=!1}function Vu(r){In===null?In=[r]:In.push(r)}var fb=D.ReactCurrentBatchConfig;function Oo(r,o,u){if(r=u.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(u._owner){if(u=u._owner,u){if(u.tag!==1)throw Error(n(309));var f=u.stateNode}if(!f)throw Error(n(147,r));var g=f,x=""+r;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===x?o.ref:(o=function(b){var N=g.refs;b===null?delete N[x]:N[x]=b},o._stringRef=x,o)}if(typeof r!="string")throw Error(n(284));if(!u._owner)throw Error(n(290,r))}return r}function pa(r,o){throw r=Object.prototype.toString.call(o),Error(n(31,r==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":r))}function om(r){var o=r._init;return o(r._payload)}function sm(r){function o(V,F){if(r){var U=V.deletions;U===null?(V.deletions=[F],V.flags|=16):U.push(F)}}function u(V,F){if(!r)return null;for(;F!==null;)o(V,F),F=F.sibling;return null}function f(V,F){for(V=new Map;F!==null;)F.key!==null?V.set(F.key,F):V.set(F.index,F),F=F.sibling;return V}function g(V,F){return V=Ir(V,F),V.index=0,V.sibling=null,V}function x(V,F,U){return V.index=U,r?(U=V.alternate,U!==null?(U=U.index,U<F?(V.flags|=2,F):U):(V.flags|=2,F)):(V.flags|=1048576,F)}function b(V){return r&&V.alternate===null&&(V.flags|=2),V}function N(V,F,U,ae){return F===null||F.tag!==6?(F=Nc(U,V.mode,ae),F.return=V,F):(F=g(F,U),F.return=V,F)}function _(V,F,U,ae){var Te=U.type;return Te===q?ie(V,F,U.props.children,ae,U.key):F!==null&&(F.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===ge&&om(Te)===F.type)?(ae=g(F,U.props),ae.ref=Oo(V,F,U),ae.return=V,ae):(ae=Fa(U.type,U.key,U.props,null,V.mode,ae),ae.ref=Oo(V,F,U),ae.return=V,ae)}function H(V,F,U,ae){return F===null||F.tag!==4||F.stateNode.containerInfo!==U.containerInfo||F.stateNode.implementation!==U.implementation?(F=jc(U,V.mode,ae),F.return=V,F):(F=g(F,U.children||[]),F.return=V,F)}function ie(V,F,U,ae,Te){return F===null||F.tag!==7?(F=ii(U,V.mode,ae,Te),F.return=V,F):(F=g(F,U),F.return=V,F)}function oe(V,F,U){if(typeof F=="string"&&F!==""||typeof F=="number")return F=Nc(""+F,V.mode,U),F.return=V,F;if(typeof F=="object"&&F!==null){switch(F.$$typeof){case B:return U=Fa(F.type,F.key,F.props,null,V.mode,U),U.ref=Oo(V,null,F),U.return=V,U;case I:return F=jc(F,V.mode,U),F.return=V,F;case ge:var ae=F._init;return oe(V,ae(F._payload),U)}if(He(F)||ce(F))return F=ii(F,V.mode,U,null),F.return=V,F;pa(V,F)}return null}function ne(V,F,U,ae){var Te=F!==null?F.key:null;if(typeof U=="string"&&U!==""||typeof U=="number")return Te!==null?null:N(V,F,""+U,ae);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case B:return U.key===Te?_(V,F,U,ae):null;case I:return U.key===Te?H(V,F,U,ae):null;case ge:return Te=U._init,ne(V,F,Te(U._payload),ae)}if(He(U)||ce(U))return Te!==null?null:ie(V,F,U,ae,null);pa(V,U)}return null}function ye(V,F,U,ae,Te){if(typeof ae=="string"&&ae!==""||typeof ae=="number")return V=V.get(U)||null,N(F,V,""+ae,Te);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case B:return V=V.get(ae.key===null?U:ae.key)||null,_(F,V,ae,Te);case I:return V=V.get(ae.key===null?U:ae.key)||null,H(F,V,ae,Te);case ge:var Ae=ae._init;return ye(V,F,U,Ae(ae._payload),Te)}if(He(ae)||ce(ae))return V=V.get(U)||null,ie(F,V,ae,Te,null);pa(F,ae)}return null}function we(V,F,U,ae){for(var Te=null,Ae=null,Me=F,Ie=F=0,jt=null;Me!==null&&Ie<U.length;Ie++){Me.index>Ie?(jt=Me,Me=null):jt=Me.sibling;var Ke=ne(V,Me,U[Ie],ae);if(Ke===null){Me===null&&(Me=jt);break}r&&Me&&Ke.alternate===null&&o(V,Me),F=x(Ke,F,Ie),Ae===null?Te=Ke:Ae.sibling=Ke,Ae=Ke,Me=jt}if(Ie===U.length)return u(V,Me),at&&Gr(V,Ie),Te;if(Me===null){for(;Ie<U.length;Ie++)Me=oe(V,U[Ie],ae),Me!==null&&(F=x(Me,F,Ie),Ae===null?Te=Me:Ae.sibling=Me,Ae=Me);return at&&Gr(V,Ie),Te}for(Me=f(V,Me);Ie<U.length;Ie++)jt=ye(Me,V,Ie,U[Ie],ae),jt!==null&&(r&&jt.alternate!==null&&Me.delete(jt.key===null?Ie:jt.key),F=x(jt,F,Ie),Ae===null?Te=jt:Ae.sibling=jt,Ae=jt);return r&&Me.forEach(function(Dr){return o(V,Dr)}),at&&Gr(V,Ie),Te}function be(V,F,U,ae){var Te=ce(U);if(typeof Te!="function")throw Error(n(150));if(U=Te.call(U),U==null)throw Error(n(151));for(var Ae=Te=null,Me=F,Ie=F=0,jt=null,Ke=U.next();Me!==null&&!Ke.done;Ie++,Ke=U.next()){Me.index>Ie?(jt=Me,Me=null):jt=Me.sibling;var Dr=ne(V,Me,Ke.value,ae);if(Dr===null){Me===null&&(Me=jt);break}r&&Me&&Dr.alternate===null&&o(V,Me),F=x(Dr,F,Ie),Ae===null?Te=Dr:Ae.sibling=Dr,Ae=Dr,Me=jt}if(Ke.done)return u(V,Me),at&&Gr(V,Ie),Te;if(Me===null){for(;!Ke.done;Ie++,Ke=U.next())Ke=oe(V,Ke.value,ae),Ke!==null&&(F=x(Ke,F,Ie),Ae===null?Te=Ke:Ae.sibling=Ke,Ae=Ke);return at&&Gr(V,Ie),Te}for(Me=f(V,Me);!Ke.done;Ie++,Ke=U.next())Ke=ye(Me,V,Ie,Ke.value,ae),Ke!==null&&(r&&Ke.alternate!==null&&Me.delete(Ke.key===null?Ie:Ke.key),F=x(Ke,F,Ie),Ae===null?Te=Ke:Ae.sibling=Ke,Ae=Ke);return r&&Me.forEach(function(Wb){return o(V,Wb)}),at&&Gr(V,Ie),Te}function vt(V,F,U,ae){if(typeof U=="object"&&U!==null&&U.type===q&&U.key===null&&(U=U.props.children),typeof U=="object"&&U!==null){switch(U.$$typeof){case B:e:{for(var Te=U.key,Ae=F;Ae!==null;){if(Ae.key===Te){if(Te=U.type,Te===q){if(Ae.tag===7){u(V,Ae.sibling),F=g(Ae,U.props.children),F.return=V,V=F;break e}}else if(Ae.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===ge&&om(Te)===Ae.type){u(V,Ae.sibling),F=g(Ae,U.props),F.ref=Oo(V,Ae,U),F.return=V,V=F;break e}u(V,Ae);break}else o(V,Ae);Ae=Ae.sibling}U.type===q?(F=ii(U.props.children,V.mode,ae,U.key),F.return=V,V=F):(ae=Fa(U.type,U.key,U.props,null,V.mode,ae),ae.ref=Oo(V,F,U),ae.return=V,V=ae)}return b(V);case I:e:{for(Ae=U.key;F!==null;){if(F.key===Ae)if(F.tag===4&&F.stateNode.containerInfo===U.containerInfo&&F.stateNode.implementation===U.implementation){u(V,F.sibling),F=g(F,U.children||[]),F.return=V,V=F;break e}else{u(V,F);break}else o(V,F);F=F.sibling}F=jc(U,V.mode,ae),F.return=V,V=F}return b(V);case ge:return Ae=U._init,vt(V,F,Ae(U._payload),ae)}if(He(U))return we(V,F,U,ae);if(ce(U))return be(V,F,U,ae);pa(V,U)}return typeof U=="string"&&U!==""||typeof U=="number"?(U=""+U,F!==null&&F.tag===6?(u(V,F.sibling),F=g(F,U),F.return=V,V=F):(u(V,F),F=Nc(U,V.mode,ae),F.return=V,V=F),b(V)):u(V,F)}return vt}var Di=sm(!0),am=sm(!1),ma=br(null),ga=null,_i=null,Bu=null;function $u(){Bu=_i=ga=null}function Uu(r){var o=ma.current;st(ma),r._currentValue=o}function Wu(r,o,u){for(;r!==null;){var f=r.alternate;if((r.childLanes&o)!==o?(r.childLanes|=o,f!==null&&(f.childLanes|=o)):f!==null&&(f.childLanes&o)!==o&&(f.childLanes|=o),r===u)break;r=r.return}}function Li(r,o){ga=r,Bu=_i=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&o)!==0&&(sn=!0),r.firstContext=null)}function Sn(r){var o=r._currentValue;if(Bu!==r)if(r={context:r,memoizedValue:o,next:null},_i===null){if(ga===null)throw Error(n(308));_i=r,ga.dependencies={lanes:0,firstContext:r}}else _i=_i.next=r;return o}var Qr=null;function Hu(r){Qr===null?Qr=[r]:Qr.push(r)}function lm(r,o,u,f){var g=o.interleaved;return g===null?(u.next=u,Hu(o)):(u.next=g.next,g.next=u),o.interleaved=u,lr(r,f)}function lr(r,o){r.lanes|=o;var u=r.alternate;for(u!==null&&(u.lanes|=o),u=r,r=r.return;r!==null;)r.childLanes|=o,u=r.alternate,u!==null&&(u.childLanes|=o),u=r,r=r.return;return u.tag===3?u.stateNode:null}var Tr=!1;function Ku(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function um(r,o){r=r.updateQueue,o.updateQueue===r&&(o.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function ur(r,o){return{eventTime:r,lane:o,tag:0,payload:null,callback:null,next:null}}function Pr(r,o,u){var f=r.updateQueue;if(f===null)return null;if(f=f.shared,(We&2)!==0){var g=f.pending;return g===null?o.next=o:(o.next=g.next,g.next=o),f.pending=o,lr(r,u)}return g=f.interleaved,g===null?(o.next=o,Hu(f)):(o.next=g.next,g.next=o),f.interleaved=o,lr(r,u)}function ya(r,o,u){if(o=o.updateQueue,o!==null&&(o=o.shared,(u&4194240)!==0)){var f=o.lanes;f&=r.pendingLanes,u|=f,o.lanes=u,su(r,u)}}function cm(r,o){var u=r.updateQueue,f=r.alternate;if(f!==null&&(f=f.updateQueue,u===f)){var g=null,x=null;if(u=u.firstBaseUpdate,u!==null){do{var b={eventTime:u.eventTime,lane:u.lane,tag:u.tag,payload:u.payload,callback:u.callback,next:null};x===null?g=x=b:x=x.next=b,u=u.next}while(u!==null);x===null?g=x=o:x=x.next=o}else g=x=o;u={baseState:f.baseState,firstBaseUpdate:g,lastBaseUpdate:x,shared:f.shared,effects:f.effects},r.updateQueue=u;return}r=u.lastBaseUpdate,r===null?u.firstBaseUpdate=o:r.next=o,u.lastBaseUpdate=o}function va(r,o,u,f){var g=r.updateQueue;Tr=!1;var x=g.firstBaseUpdate,b=g.lastBaseUpdate,N=g.shared.pending;if(N!==null){g.shared.pending=null;var _=N,H=_.next;_.next=null,b===null?x=H:b.next=H,b=_;var ie=r.alternate;ie!==null&&(ie=ie.updateQueue,N=ie.lastBaseUpdate,N!==b&&(N===null?ie.firstBaseUpdate=H:N.next=H,ie.lastBaseUpdate=_))}if(x!==null){var oe=g.baseState;b=0,ie=H=_=null,N=x;do{var ne=N.lane,ye=N.eventTime;if((f&ne)===ne){ie!==null&&(ie=ie.next={eventTime:ye,lane:0,tag:N.tag,payload:N.payload,callback:N.callback,next:null});e:{var we=r,be=N;switch(ne=o,ye=u,be.tag){case 1:if(we=be.payload,typeof we=="function"){oe=we.call(ye,oe,ne);break e}oe=we;break e;case 3:we.flags=we.flags&-65537|128;case 0:if(we=be.payload,ne=typeof we=="function"?we.call(ye,oe,ne):we,ne==null)break e;oe=P({},oe,ne);break e;case 2:Tr=!0}}N.callback!==null&&N.lane!==0&&(r.flags|=64,ne=g.effects,ne===null?g.effects=[N]:ne.push(N))}else ye={eventTime:ye,lane:ne,tag:N.tag,payload:N.payload,callback:N.callback,next:null},ie===null?(H=ie=ye,_=oe):ie=ie.next=ye,b|=ne;if(N=N.next,N===null){if(N=g.shared.pending,N===null)break;ne=N,N=ne.next,ne.next=null,g.lastBaseUpdate=ne,g.shared.pending=null}}while(!0);if(ie===null&&(_=oe),g.baseState=_,g.firstBaseUpdate=H,g.lastBaseUpdate=ie,o=g.shared.interleaved,o!==null){g=o;do b|=g.lane,g=g.next;while(g!==o)}else x===null&&(g.shared.lanes=0);ei|=b,r.lanes=b,r.memoizedState=oe}}function fm(r,o,u){if(r=o.effects,o.effects=null,r!==null)for(o=0;o<r.length;o++){var f=r[o],g=f.callback;if(g!==null){if(f.callback=null,f=u,typeof g!="function")throw Error(n(191,g));g.call(f)}}}var Fo={},Kn=br(Fo),zo=br(Fo),Vo=br(Fo);function Zr(r){if(r===Fo)throw Error(n(174));return r}function qu(r,o){switch(it(Vo,o),it(zo,r),it(Kn,Fo),r=o.nodeType,r){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:le(null,"");break;default:r=r===8?o.parentNode:o,o=r.namespaceURI||null,r=r.tagName,o=le(o,r)}st(Kn),it(Kn,o)}function Oi(){st(Kn),st(zo),st(Vo)}function dm(r){Zr(Vo.current);var o=Zr(Kn.current),u=le(o,r.type);o!==u&&(it(zo,r),it(Kn,u))}function Xu(r){zo.current===r&&(st(Kn),st(zo))}var ut=br(0);function xa(r){for(var o=r;o!==null;){if(o.tag===13){var u=o.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||u.data==="$?"||u.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===r)break;for(;o.sibling===null;){if(o.return===null||o.return===r)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var Yu=[];function Gu(){for(var r=0;r<Yu.length;r++)Yu[r]._workInProgressVersionPrimary=null;Yu.length=0}var wa=D.ReactCurrentDispatcher,Qu=D.ReactCurrentBatchConfig,Jr=0,ct=null,Et=null,Mt=null,ka=!1,Bo=!1,$o=0,db=0;function Ut(){throw Error(n(321))}function Zu(r,o){if(o===null)return!1;for(var u=0;u<o.length&&u<r.length;u++)if(!jn(r[u],o[u]))return!1;return!0}function Ju(r,o,u,f,g,x){if(Jr=x,ct=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,wa.current=r===null||r.memoizedState===null?gb:yb,r=u(f,g),Bo){x=0;do{if(Bo=!1,$o=0,25<=x)throw Error(n(301));x+=1,Mt=Et=null,o.updateQueue=null,wa.current=vb,r=u(f,g)}while(Bo)}if(wa.current=Ca,o=Et!==null&&Et.next!==null,Jr=0,Mt=Et=ct=null,ka=!1,o)throw Error(n(300));return r}function ec(){var r=$o!==0;return $o=0,r}function qn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mt===null?ct.memoizedState=Mt=r:Mt=Mt.next=r,Mt}function bn(){if(Et===null){var r=ct.alternate;r=r!==null?r.memoizedState:null}else r=Et.next;var o=Mt===null?ct.memoizedState:Mt.next;if(o!==null)Mt=o,Et=r;else{if(r===null)throw Error(n(310));Et=r,r={memoizedState:Et.memoizedState,baseState:Et.baseState,baseQueue:Et.baseQueue,queue:Et.queue,next:null},Mt===null?ct.memoizedState=Mt=r:Mt=Mt.next=r}return Mt}function Uo(r,o){return typeof o=="function"?o(r):o}function tc(r){var o=bn(),u=o.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var f=Et,g=f.baseQueue,x=u.pending;if(x!==null){if(g!==null){var b=g.next;g.next=x.next,x.next=b}f.baseQueue=g=x,u.pending=null}if(g!==null){x=g.next,f=f.baseState;var N=b=null,_=null,H=x;do{var ie=H.lane;if((Jr&ie)===ie)_!==null&&(_=_.next={lane:0,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null}),f=H.hasEagerState?H.eagerState:r(f,H.action);else{var oe={lane:ie,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null};_===null?(N=_=oe,b=f):_=_.next=oe,ct.lanes|=ie,ei|=ie}H=H.next}while(H!==null&&H!==x);_===null?b=f:_.next=N,jn(f,o.memoizedState)||(sn=!0),o.memoizedState=f,o.baseState=b,o.baseQueue=_,u.lastRenderedState=f}if(r=u.interleaved,r!==null){g=r;do x=g.lane,ct.lanes|=x,ei|=x,g=g.next;while(g!==r)}else g===null&&(u.lanes=0);return[o.memoizedState,u.dispatch]}function nc(r){var o=bn(),u=o.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var f=u.dispatch,g=u.pending,x=o.memoizedState;if(g!==null){u.pending=null;var b=g=g.next;do x=r(x,b.action),b=b.next;while(b!==g);jn(x,o.memoizedState)||(sn=!0),o.memoizedState=x,o.baseQueue===null&&(o.baseState=x),u.lastRenderedState=x}return[x,f]}function hm(){}function pm(r,o){var u=ct,f=bn(),g=o(),x=!jn(f.memoizedState,g);if(x&&(f.memoizedState=g,sn=!0),f=f.queue,rc(ym.bind(null,u,f,r),[r]),f.getSnapshot!==o||x||Mt!==null&&Mt.memoizedState.tag&1){if(u.flags|=2048,Wo(9,gm.bind(null,u,f,g,o),void 0,null),Nt===null)throw Error(n(349));(Jr&30)!==0||mm(u,o,g)}return g}function mm(r,o,u){r.flags|=16384,r={getSnapshot:o,value:u},o=ct.updateQueue,o===null?(o={lastEffect:null,stores:null},ct.updateQueue=o,o.stores=[r]):(u=o.stores,u===null?o.stores=[r]:u.push(r))}function gm(r,o,u,f){o.value=u,o.getSnapshot=f,vm(o)&&xm(r)}function ym(r,o,u){return u(function(){vm(o)&&xm(r)})}function vm(r){var o=r.getSnapshot;r=r.value;try{var u=o();return!jn(r,u)}catch{return!0}}function xm(r){var o=lr(r,1);o!==null&&On(o,r,1,-1)}function wm(r){var o=qn();return typeof r=="function"&&(r=r()),o.memoizedState=o.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Uo,lastRenderedState:r},o.queue=r,r=r.dispatch=mb.bind(null,ct,r),[o.memoizedState,r]}function Wo(r,o,u,f){return r={tag:r,create:o,destroy:u,deps:f,next:null},o=ct.updateQueue,o===null?(o={lastEffect:null,stores:null},ct.updateQueue=o,o.lastEffect=r.next=r):(u=o.lastEffect,u===null?o.lastEffect=r.next=r:(f=u.next,u.next=r,r.next=f,o.lastEffect=r)),r}function km(){return bn().memoizedState}function Sa(r,o,u,f){var g=qn();ct.flags|=r,g.memoizedState=Wo(1|o,u,void 0,f===void 0?null:f)}function ba(r,o,u,f){var g=bn();f=f===void 0?null:f;var x=void 0;if(Et!==null){var b=Et.memoizedState;if(x=b.destroy,f!==null&&Zu(f,b.deps)){g.memoizedState=Wo(o,u,x,f);return}}ct.flags|=r,g.memoizedState=Wo(1|o,u,x,f)}function Sm(r,o){return Sa(8390656,8,r,o)}function rc(r,o){return ba(2048,8,r,o)}function bm(r,o){return ba(4,2,r,o)}function Cm(r,o){return ba(4,4,r,o)}function Em(r,o){if(typeof o=="function")return r=r(),o(r),function(){o(null)};if(o!=null)return r=r(),o.current=r,function(){o.current=null}}function Tm(r,o,u){return u=u!=null?u.concat([r]):null,ba(4,4,Em.bind(null,o,r),u)}function ic(){}function Pm(r,o){var u=bn();o=o===void 0?null:o;var f=u.memoizedState;return f!==null&&o!==null&&Zu(o,f[1])?f[0]:(u.memoizedState=[r,o],r)}function Rm(r,o){var u=bn();o=o===void 0?null:o;var f=u.memoizedState;return f!==null&&o!==null&&Zu(o,f[1])?f[0]:(r=r(),u.memoizedState=[r,o],r)}function Am(r,o,u){return(Jr&21)===0?(r.baseState&&(r.baseState=!1,sn=!0),r.memoizedState=u):(jn(u,o)||(u=op(),ct.lanes|=u,ei|=u,r.baseState=!0),o)}function hb(r,o){var u=Ge;Ge=u!==0&&4>u?u:4,r(!0);var f=Qu.transition;Qu.transition={};try{r(!1),o()}finally{Ge=u,Qu.transition=f}}function Mm(){return bn().memoizedState}function pb(r,o,u){var f=Nr(r);if(u={lane:f,action:u,hasEagerState:!1,eagerState:null,next:null},Nm(r))jm(o,u);else if(u=lm(r,o,u,f),u!==null){var g=Yt();On(u,r,f,g),Im(u,o,f)}}function mb(r,o,u){var f=Nr(r),g={lane:f,action:u,hasEagerState:!1,eagerState:null,next:null};if(Nm(r))jm(o,g);else{var x=r.alternate;if(r.lanes===0&&(x===null||x.lanes===0)&&(x=o.lastRenderedReducer,x!==null))try{var b=o.lastRenderedState,N=x(b,u);if(g.hasEagerState=!0,g.eagerState=N,jn(N,b)){var _=o.interleaved;_===null?(g.next=g,Hu(o)):(g.next=_.next,_.next=g),o.interleaved=g;return}}catch{}finally{}u=lm(r,o,g,f),u!==null&&(g=Yt(),On(u,r,f,g),Im(u,o,f))}}function Nm(r){var o=r.alternate;return r===ct||o!==null&&o===ct}function jm(r,o){Bo=ka=!0;var u=r.pending;u===null?o.next=o:(o.next=u.next,u.next=o),r.pending=o}function Im(r,o,u){if((u&4194240)!==0){var f=o.lanes;f&=r.pendingLanes,u|=f,o.lanes=u,su(r,u)}}var Ca={readContext:Sn,useCallback:Ut,useContext:Ut,useEffect:Ut,useImperativeHandle:Ut,useInsertionEffect:Ut,useLayoutEffect:Ut,useMemo:Ut,useReducer:Ut,useRef:Ut,useState:Ut,useDebugValue:Ut,useDeferredValue:Ut,useTransition:Ut,useMutableSource:Ut,useSyncExternalStore:Ut,useId:Ut,unstable_isNewReconciler:!1},gb={readContext:Sn,useCallback:function(r,o){return qn().memoizedState=[r,o===void 0?null:o],r},useContext:Sn,useEffect:Sm,useImperativeHandle:function(r,o,u){return u=u!=null?u.concat([r]):null,Sa(4194308,4,Em.bind(null,o,r),u)},useLayoutEffect:function(r,o){return Sa(4194308,4,r,o)},useInsertionEffect:function(r,o){return Sa(4,2,r,o)},useMemo:function(r,o){var u=qn();return o=o===void 0?null:o,r=r(),u.memoizedState=[r,o],r},useReducer:function(r,o,u){var f=qn();return o=u!==void 0?u(o):o,f.memoizedState=f.baseState=o,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:o},f.queue=r,r=r.dispatch=pb.bind(null,ct,r),[f.memoizedState,r]},useRef:function(r){var o=qn();return r={current:r},o.memoizedState=r},useState:wm,useDebugValue:ic,useDeferredValue:function(r){return qn().memoizedState=r},useTransition:function(){var r=wm(!1),o=r[0];return r=hb.bind(null,r[1]),qn().memoizedState=r,[o,r]},useMutableSource:function(){},useSyncExternalStore:function(r,o,u){var f=ct,g=qn();if(at){if(u===void 0)throw Error(n(407));u=u()}else{if(u=o(),Nt===null)throw Error(n(349));(Jr&30)!==0||mm(f,o,u)}g.memoizedState=u;var x={value:u,getSnapshot:o};return g.queue=x,Sm(ym.bind(null,f,x,r),[r]),f.flags|=2048,Wo(9,gm.bind(null,f,x,u,o),void 0,null),u},useId:function(){var r=qn(),o=Nt.identifierPrefix;if(at){var u=ar,f=sr;u=(f&~(1<<32-Nn(f)-1)).toString(32)+u,o=":"+o+"R"+u,u=$o++,0<u&&(o+="H"+u.toString(32)),o+=":"}else u=db++,o=":"+o+"r"+u.toString(32)+":";return r.memoizedState=o},unstable_isNewReconciler:!1},yb={readContext:Sn,useCallback:Pm,useContext:Sn,useEffect:rc,useImperativeHandle:Tm,useInsertionEffect:bm,useLayoutEffect:Cm,useMemo:Rm,useReducer:tc,useRef:km,useState:function(){return tc(Uo)},useDebugValue:ic,useDeferredValue:function(r){var o=bn();return Am(o,Et.memoizedState,r)},useTransition:function(){var r=tc(Uo)[0],o=bn().memoizedState;return[r,o]},useMutableSource:hm,useSyncExternalStore:pm,useId:Mm,unstable_isNewReconciler:!1},vb={readContext:Sn,useCallback:Pm,useContext:Sn,useEffect:rc,useImperativeHandle:Tm,useInsertionEffect:bm,useLayoutEffect:Cm,useMemo:Rm,useReducer:nc,useRef:km,useState:function(){return nc(Uo)},useDebugValue:ic,useDeferredValue:function(r){var o=bn();return Et===null?o.memoizedState=r:Am(o,Et.memoizedState,r)},useTransition:function(){var r=nc(Uo)[0],o=bn().memoizedState;return[r,o]},useMutableSource:hm,useSyncExternalStore:pm,useId:Mm,unstable_isNewReconciler:!1};function Dn(r,o){if(r&&r.defaultProps){o=P({},o),r=r.defaultProps;for(var u in r)o[u]===void 0&&(o[u]=r[u]);return o}return o}function oc(r,o,u,f){o=r.memoizedState,u=u(f,o),u=u==null?o:P({},o,u),r.memoizedState=u,r.lanes===0&&(r.updateQueue.baseState=u)}var Ea={isMounted:function(r){return(r=r._reactInternals)?Kr(r)===r:!1},enqueueSetState:function(r,o,u){r=r._reactInternals;var f=Yt(),g=Nr(r),x=ur(f,g);x.payload=o,u!=null&&(x.callback=u),o=Pr(r,x,g),o!==null&&(On(o,r,g,f),ya(o,r,g))},enqueueReplaceState:function(r,o,u){r=r._reactInternals;var f=Yt(),g=Nr(r),x=ur(f,g);x.tag=1,x.payload=o,u!=null&&(x.callback=u),o=Pr(r,x,g),o!==null&&(On(o,r,g,f),ya(o,r,g))},enqueueForceUpdate:function(r,o){r=r._reactInternals;var u=Yt(),f=Nr(r),g=ur(u,f);g.tag=2,o!=null&&(g.callback=o),o=Pr(r,g,f),o!==null&&(On(o,r,f,u),ya(o,r,f))}};function Dm(r,o,u,f,g,x,b){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(f,x,b):o.prototype&&o.prototype.isPureReactComponent?!Mo(u,f)||!Mo(g,x):!0}function _m(r,o,u){var f=!1,g=Cr,x=o.contextType;return typeof x=="object"&&x!==null?x=Sn(x):(g=on(o)?Xr:$t.current,f=o.contextTypes,x=(f=f!=null)?Mi(r,g):Cr),o=new o(u,x),r.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Ea,r.stateNode=o,o._reactInternals=r,f&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=g,r.__reactInternalMemoizedMaskedChildContext=x),o}function Lm(r,o,u,f){r=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(u,f),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(u,f),o.state!==r&&Ea.enqueueReplaceState(o,o.state,null)}function sc(r,o,u,f){var g=r.stateNode;g.props=u,g.state=r.memoizedState,g.refs={},Ku(r);var x=o.contextType;typeof x=="object"&&x!==null?g.context=Sn(x):(x=on(o)?Xr:$t.current,g.context=Mi(r,x)),g.state=r.memoizedState,x=o.getDerivedStateFromProps,typeof x=="function"&&(oc(r,o,x,u),g.state=r.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(o=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),o!==g.state&&Ea.enqueueReplaceState(g,g.state,null),va(r,u,g,f),g.state=r.memoizedState),typeof g.componentDidMount=="function"&&(r.flags|=4194308)}function Fi(r,o){try{var u="",f=o;do u+=he(f),f=f.return;while(f);var g=u}catch(x){g=`
|
|
39
|
-
Error generating stack: `+x.message+`
|
|
40
|
-
`+x.stack}return{value:r,source:o,stack:g,digest:null}}function ac(r,o,u){return{value:r,source:null,stack:u??null,digest:o??null}}function lc(r,o){try{console.error(o.value)}catch(u){setTimeout(function(){throw u})}}var xb=typeof WeakMap=="function"?WeakMap:Map;function Om(r,o,u){u=ur(-1,u),u.tag=3,u.payload={element:null};var f=o.value;return u.callback=function(){ja||(ja=!0,bc=f),lc(r,o)},u}function Fm(r,o,u){u=ur(-1,u),u.tag=3;var f=r.type.getDerivedStateFromError;if(typeof f=="function"){var g=o.value;u.payload=function(){return f(g)},u.callback=function(){lc(r,o)}}var x=r.stateNode;return x!==null&&typeof x.componentDidCatch=="function"&&(u.callback=function(){lc(r,o),typeof f!="function"&&(Ar===null?Ar=new Set([this]):Ar.add(this));var b=o.stack;this.componentDidCatch(o.value,{componentStack:b!==null?b:""})}),u}function zm(r,o,u){var f=r.pingCache;if(f===null){f=r.pingCache=new xb;var g=new Set;f.set(o,g)}else g=f.get(o),g===void 0&&(g=new Set,f.set(o,g));g.has(u)||(g.add(u),r=Ib.bind(null,r,o,u),o.then(r,r))}function Vm(r){do{var o;if((o=r.tag===13)&&(o=r.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return r;r=r.return}while(r!==null);return null}function Bm(r,o,u,f,g){return(r.mode&1)===0?(r===o?r.flags|=65536:(r.flags|=128,u.flags|=131072,u.flags&=-52805,u.tag===1&&(u.alternate===null?u.tag=17:(o=ur(-1,1),o.tag=2,Pr(u,o,1))),u.lanes|=1),r):(r.flags|=65536,r.lanes=g,r)}var wb=D.ReactCurrentOwner,sn=!1;function Xt(r,o,u,f){o.child=r===null?am(o,null,u,f):Di(o,r.child,u,f)}function $m(r,o,u,f,g){u=u.render;var x=o.ref;return Li(o,g),f=Ju(r,o,u,f,x,g),u=ec(),r!==null&&!sn?(o.updateQueue=r.updateQueue,o.flags&=-2053,r.lanes&=~g,cr(r,o,g)):(at&&u&&Lu(o),o.flags|=1,Xt(r,o,f,g),o.child)}function Um(r,o,u,f,g){if(r===null){var x=u.type;return typeof x=="function"&&!Mc(x)&&x.defaultProps===void 0&&u.compare===null&&u.defaultProps===void 0?(o.tag=15,o.type=x,Wm(r,o,x,f,g)):(r=Fa(u.type,null,f,o,o.mode,g),r.ref=o.ref,r.return=o,o.child=r)}if(x=r.child,(r.lanes&g)===0){var b=x.memoizedProps;if(u=u.compare,u=u!==null?u:Mo,u(b,f)&&r.ref===o.ref)return cr(r,o,g)}return o.flags|=1,r=Ir(x,f),r.ref=o.ref,r.return=o,o.child=r}function Wm(r,o,u,f,g){if(r!==null){var x=r.memoizedProps;if(Mo(x,f)&&r.ref===o.ref)if(sn=!1,o.pendingProps=f=x,(r.lanes&g)!==0)(r.flags&131072)!==0&&(sn=!0);else return o.lanes=r.lanes,cr(r,o,g)}return uc(r,o,u,f,g)}function Hm(r,o,u){var f=o.pendingProps,g=f.children,x=r!==null?r.memoizedState:null;if(f.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},it(Vi,gn),gn|=u;else{if((u&1073741824)===0)return r=x!==null?x.baseLanes|u:u,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:r,cachePool:null,transitions:null},o.updateQueue=null,it(Vi,gn),gn|=r,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=x!==null?x.baseLanes:u,it(Vi,gn),gn|=f}else x!==null?(f=x.baseLanes|u,o.memoizedState=null):f=u,it(Vi,gn),gn|=f;return Xt(r,o,g,u),o.child}function Km(r,o){var u=o.ref;(r===null&&u!==null||r!==null&&r.ref!==u)&&(o.flags|=512,o.flags|=2097152)}function uc(r,o,u,f,g){var x=on(u)?Xr:$t.current;return x=Mi(o,x),Li(o,g),u=Ju(r,o,u,f,x,g),f=ec(),r!==null&&!sn?(o.updateQueue=r.updateQueue,o.flags&=-2053,r.lanes&=~g,cr(r,o,g)):(at&&f&&Lu(o),o.flags|=1,Xt(r,o,u,g),o.child)}function qm(r,o,u,f,g){if(on(u)){var x=!0;ua(o)}else x=!1;if(Li(o,g),o.stateNode===null)Pa(r,o),_m(o,u,f),sc(o,u,f,g),f=!0;else if(r===null){var b=o.stateNode,N=o.memoizedProps;b.props=N;var _=b.context,H=u.contextType;typeof H=="object"&&H!==null?H=Sn(H):(H=on(u)?Xr:$t.current,H=Mi(o,H));var ie=u.getDerivedStateFromProps,oe=typeof ie=="function"||typeof b.getSnapshotBeforeUpdate=="function";oe||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(N!==f||_!==H)&&Lm(o,b,f,H),Tr=!1;var ne=o.memoizedState;b.state=ne,va(o,f,b,g),_=o.memoizedState,N!==f||ne!==_||rn.current||Tr?(typeof ie=="function"&&(oc(o,u,ie,f),_=o.memoizedState),(N=Tr||Dm(o,u,N,f,ne,_,H))?(oe||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(o.flags|=4194308)):(typeof b.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=f,o.memoizedState=_),b.props=f,b.state=_,b.context=H,f=N):(typeof b.componentDidMount=="function"&&(o.flags|=4194308),f=!1)}else{b=o.stateNode,um(r,o),N=o.memoizedProps,H=o.type===o.elementType?N:Dn(o.type,N),b.props=H,oe=o.pendingProps,ne=b.context,_=u.contextType,typeof _=="object"&&_!==null?_=Sn(_):(_=on(u)?Xr:$t.current,_=Mi(o,_));var ye=u.getDerivedStateFromProps;(ie=typeof ye=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(N!==oe||ne!==_)&&Lm(o,b,f,_),Tr=!1,ne=o.memoizedState,b.state=ne,va(o,f,b,g);var we=o.memoizedState;N!==oe||ne!==we||rn.current||Tr?(typeof ye=="function"&&(oc(o,u,ye,f),we=o.memoizedState),(H=Tr||Dm(o,u,H,f,ne,we,_)||!1)?(ie||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(f,we,_),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(f,we,_)),typeof b.componentDidUpdate=="function"&&(o.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof b.componentDidUpdate!="function"||N===r.memoizedProps&&ne===r.memoizedState||(o.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||N===r.memoizedProps&&ne===r.memoizedState||(o.flags|=1024),o.memoizedProps=f,o.memoizedState=we),b.props=f,b.state=we,b.context=_,f=H):(typeof b.componentDidUpdate!="function"||N===r.memoizedProps&&ne===r.memoizedState||(o.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||N===r.memoizedProps&&ne===r.memoizedState||(o.flags|=1024),f=!1)}return cc(r,o,u,f,x,g)}function cc(r,o,u,f,g,x){Km(r,o);var b=(o.flags&128)!==0;if(!f&&!b)return g&&Zp(o,u,!1),cr(r,o,x);f=o.stateNode,wb.current=o;var N=b&&typeof u.getDerivedStateFromError!="function"?null:f.render();return o.flags|=1,r!==null&&b?(o.child=Di(o,r.child,null,x),o.child=Di(o,null,N,x)):Xt(r,o,N,x),o.memoizedState=f.state,g&&Zp(o,u,!0),o.child}function Xm(r){var o=r.stateNode;o.pendingContext?Gp(r,o.pendingContext,o.pendingContext!==o.context):o.context&&Gp(r,o.context,!1),qu(r,o.containerInfo)}function Ym(r,o,u,f,g){return Ii(),Vu(g),o.flags|=256,Xt(r,o,u,f),o.child}var fc={dehydrated:null,treeContext:null,retryLane:0};function dc(r){return{baseLanes:r,cachePool:null,transitions:null}}function Gm(r,o,u){var f=o.pendingProps,g=ut.current,x=!1,b=(o.flags&128)!==0,N;if((N=b)||(N=r!==null&&r.memoizedState===null?!1:(g&2)!==0),N?(x=!0,o.flags&=-129):(r===null||r.memoizedState!==null)&&(g|=1),it(ut,g&1),r===null)return zu(o),r=o.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?((o.mode&1)===0?o.lanes=1:r.data==="$!"?o.lanes=8:o.lanes=1073741824,null):(b=f.children,r=f.fallback,x?(f=o.mode,x=o.child,b={mode:"hidden",children:b},(f&1)===0&&x!==null?(x.childLanes=0,x.pendingProps=b):x=za(b,f,0,null),r=ii(r,f,u,null),x.return=o,r.return=o,x.sibling=r,o.child=x,o.child.memoizedState=dc(u),o.memoizedState=fc,r):hc(o,b));if(g=r.memoizedState,g!==null&&(N=g.dehydrated,N!==null))return kb(r,o,b,f,N,g,u);if(x){x=f.fallback,b=o.mode,g=r.child,N=g.sibling;var _={mode:"hidden",children:f.children};return(b&1)===0&&o.child!==g?(f=o.child,f.childLanes=0,f.pendingProps=_,o.deletions=null):(f=Ir(g,_),f.subtreeFlags=g.subtreeFlags&14680064),N!==null?x=Ir(N,x):(x=ii(x,b,u,null),x.flags|=2),x.return=o,f.return=o,f.sibling=x,o.child=f,f=x,x=o.child,b=r.child.memoizedState,b=b===null?dc(u):{baseLanes:b.baseLanes|u,cachePool:null,transitions:b.transitions},x.memoizedState=b,x.childLanes=r.childLanes&~u,o.memoizedState=fc,f}return x=r.child,r=x.sibling,f=Ir(x,{mode:"visible",children:f.children}),(o.mode&1)===0&&(f.lanes=u),f.return=o,f.sibling=null,r!==null&&(u=o.deletions,u===null?(o.deletions=[r],o.flags|=16):u.push(r)),o.child=f,o.memoizedState=null,f}function hc(r,o){return o=za({mode:"visible",children:o},r.mode,0,null),o.return=r,r.child=o}function Ta(r,o,u,f){return f!==null&&Vu(f),Di(o,r.child,null,u),r=hc(o,o.pendingProps.children),r.flags|=2,o.memoizedState=null,r}function kb(r,o,u,f,g,x,b){if(u)return o.flags&256?(o.flags&=-257,f=ac(Error(n(422))),Ta(r,o,b,f)):o.memoizedState!==null?(o.child=r.child,o.flags|=128,null):(x=f.fallback,g=o.mode,f=za({mode:"visible",children:f.children},g,0,null),x=ii(x,g,b,null),x.flags|=2,f.return=o,x.return=o,f.sibling=x,o.child=f,(o.mode&1)!==0&&Di(o,r.child,null,b),o.child.memoizedState=dc(b),o.memoizedState=fc,x);if((o.mode&1)===0)return Ta(r,o,b,null);if(g.data==="$!"){if(f=g.nextSibling&&g.nextSibling.dataset,f)var N=f.dgst;return f=N,x=Error(n(419)),f=ac(x,f,void 0),Ta(r,o,b,f)}if(N=(b&r.childLanes)!==0,sn||N){if(f=Nt,f!==null){switch(b&-b){case 4:g=2;break;case 16:g=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:g=32;break;case 536870912:g=268435456;break;default:g=0}g=(g&(f.suspendedLanes|b))!==0?0:g,g!==0&&g!==x.retryLane&&(x.retryLane=g,lr(r,g),On(f,r,g,-1))}return Ac(),f=ac(Error(n(421))),Ta(r,o,b,f)}return g.data==="$?"?(o.flags|=128,o.child=r.child,o=Db.bind(null,r),g._reactRetry=o,null):(r=x.treeContext,mn=Sr(g.nextSibling),pn=o,at=!0,In=null,r!==null&&(wn[kn++]=sr,wn[kn++]=ar,wn[kn++]=Yr,sr=r.id,ar=r.overflow,Yr=o),o=hc(o,f.children),o.flags|=4096,o)}function Qm(r,o,u){r.lanes|=o;var f=r.alternate;f!==null&&(f.lanes|=o),Wu(r.return,o,u)}function pc(r,o,u,f,g){var x=r.memoizedState;x===null?r.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:f,tail:u,tailMode:g}:(x.isBackwards=o,x.rendering=null,x.renderingStartTime=0,x.last=f,x.tail=u,x.tailMode=g)}function Zm(r,o,u){var f=o.pendingProps,g=f.revealOrder,x=f.tail;if(Xt(r,o,f.children,u),f=ut.current,(f&2)!==0)f=f&1|2,o.flags|=128;else{if(r!==null&&(r.flags&128)!==0)e:for(r=o.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&Qm(r,u,o);else if(r.tag===19)Qm(r,u,o);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===o)break e;for(;r.sibling===null;){if(r.return===null||r.return===o)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}f&=1}if(it(ut,f),(o.mode&1)===0)o.memoizedState=null;else switch(g){case"forwards":for(u=o.child,g=null;u!==null;)r=u.alternate,r!==null&&xa(r)===null&&(g=u),u=u.sibling;u=g,u===null?(g=o.child,o.child=null):(g=u.sibling,u.sibling=null),pc(o,!1,g,u,x);break;case"backwards":for(u=null,g=o.child,o.child=null;g!==null;){if(r=g.alternate,r!==null&&xa(r)===null){o.child=g;break}r=g.sibling,g.sibling=u,u=g,g=r}pc(o,!0,u,null,x);break;case"together":pc(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function Pa(r,o){(o.mode&1)===0&&r!==null&&(r.alternate=null,o.alternate=null,o.flags|=2)}function cr(r,o,u){if(r!==null&&(o.dependencies=r.dependencies),ei|=o.lanes,(u&o.childLanes)===0)return null;if(r!==null&&o.child!==r.child)throw Error(n(153));if(o.child!==null){for(r=o.child,u=Ir(r,r.pendingProps),o.child=u,u.return=o;r.sibling!==null;)r=r.sibling,u=u.sibling=Ir(r,r.pendingProps),u.return=o;u.sibling=null}return o.child}function Sb(r,o,u){switch(o.tag){case 3:Xm(o),Ii();break;case 5:dm(o);break;case 1:on(o.type)&&ua(o);break;case 4:qu(o,o.stateNode.containerInfo);break;case 10:var f=o.type._context,g=o.memoizedProps.value;it(ma,f._currentValue),f._currentValue=g;break;case 13:if(f=o.memoizedState,f!==null)return f.dehydrated!==null?(it(ut,ut.current&1),o.flags|=128,null):(u&o.child.childLanes)!==0?Gm(r,o,u):(it(ut,ut.current&1),r=cr(r,o,u),r!==null?r.sibling:null);it(ut,ut.current&1);break;case 19:if(f=(u&o.childLanes)!==0,(r.flags&128)!==0){if(f)return Zm(r,o,u);o.flags|=128}if(g=o.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),it(ut,ut.current),f)break;return null;case 22:case 23:return o.lanes=0,Hm(r,o,u)}return cr(r,o,u)}var Jm,mc,eg,tg;Jm=function(r,o){for(var u=o.child;u!==null;){if(u.tag===5||u.tag===6)r.appendChild(u.stateNode);else if(u.tag!==4&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===o)break;for(;u.sibling===null;){if(u.return===null||u.return===o)return;u=u.return}u.sibling.return=u.return,u=u.sibling}},mc=function(){},eg=function(r,o,u,f){var g=r.memoizedProps;if(g!==f){r=o.stateNode,Zr(Kn.current);var x=null;switch(u){case"input":g=_e(r,g),f=_e(r,f),x=[];break;case"select":g=P({},g,{value:void 0}),f=P({},f,{value:void 0}),x=[];break;case"textarea":g=_t(r,g),f=_t(r,f),x=[];break;default:typeof g.onClick!="function"&&typeof f.onClick=="function"&&(r.onclick=sa)}re(u,f);var b;u=null;for(H in g)if(!f.hasOwnProperty(H)&&g.hasOwnProperty(H)&&g[H]!=null)if(H==="style"){var N=g[H];for(b in N)N.hasOwnProperty(b)&&(u||(u={}),u[b]="")}else H!=="dangerouslySetInnerHTML"&&H!=="children"&&H!=="suppressContentEditableWarning"&&H!=="suppressHydrationWarning"&&H!=="autoFocus"&&(s.hasOwnProperty(H)?x||(x=[]):(x=x||[]).push(H,null));for(H in f){var _=f[H];if(N=g?.[H],f.hasOwnProperty(H)&&_!==N&&(_!=null||N!=null))if(H==="style")if(N){for(b in N)!N.hasOwnProperty(b)||_&&_.hasOwnProperty(b)||(u||(u={}),u[b]="");for(b in _)_.hasOwnProperty(b)&&N[b]!==_[b]&&(u||(u={}),u[b]=_[b])}else u||(x||(x=[]),x.push(H,u)),u=_;else H==="dangerouslySetInnerHTML"?(_=_?_.__html:void 0,N=N?N.__html:void 0,_!=null&&N!==_&&(x=x||[]).push(H,_)):H==="children"?typeof _!="string"&&typeof _!="number"||(x=x||[]).push(H,""+_):H!=="suppressContentEditableWarning"&&H!=="suppressHydrationWarning"&&(s.hasOwnProperty(H)?(_!=null&&H==="onScroll"&&ot("scroll",r),x||N===_||(x=[])):(x=x||[]).push(H,_))}u&&(x=x||[]).push("style",u);var H=x;(o.updateQueue=H)&&(o.flags|=4)}},tg=function(r,o,u,f){u!==f&&(o.flags|=4)};function Ho(r,o){if(!at)switch(r.tailMode){case"hidden":o=r.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?r.tail=null:u.sibling=null;break;case"collapsed":u=r.tail;for(var f=null;u!==null;)u.alternate!==null&&(f=u),u=u.sibling;f===null?o||r.tail===null?r.tail=null:r.tail.sibling=null:f.sibling=null}}function Wt(r){var o=r.alternate!==null&&r.alternate.child===r.child,u=0,f=0;if(o)for(var g=r.child;g!==null;)u|=g.lanes|g.childLanes,f|=g.subtreeFlags&14680064,f|=g.flags&14680064,g.return=r,g=g.sibling;else for(g=r.child;g!==null;)u|=g.lanes|g.childLanes,f|=g.subtreeFlags,f|=g.flags,g.return=r,g=g.sibling;return r.subtreeFlags|=f,r.childLanes=u,o}function bb(r,o,u){var f=o.pendingProps;switch(Ou(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Wt(o),null;case 1:return on(o.type)&&la(),Wt(o),null;case 3:return f=o.stateNode,Oi(),st(rn),st($t),Gu(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(r===null||r.child===null)&&(ha(o)?o.flags|=4:r===null||r.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,In!==null&&(Tc(In),In=null))),mc(r,o),Wt(o),null;case 5:Xu(o);var g=Zr(Vo.current);if(u=o.type,r!==null&&o.stateNode!=null)eg(r,o,u,f,g),r.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!f){if(o.stateNode===null)throw Error(n(166));return Wt(o),null}if(r=Zr(Kn.current),ha(o)){f=o.stateNode,u=o.type;var x=o.memoizedProps;switch(f[Hn]=o,f[_o]=x,r=(o.mode&1)!==0,u){case"dialog":ot("cancel",f),ot("close",f);break;case"iframe":case"object":case"embed":ot("load",f);break;case"video":case"audio":for(g=0;g<jo.length;g++)ot(jo[g],f);break;case"source":ot("error",f);break;case"img":case"image":case"link":ot("error",f),ot("load",f);break;case"details":ot("toggle",f);break;case"input":tn(f,x),ot("invalid",f);break;case"select":f._wrapperState={wasMultiple:!!x.multiple},ot("invalid",f);break;case"textarea":Un(f,x),ot("invalid",f)}re(u,x),g=null;for(var b in x)if(x.hasOwnProperty(b)){var N=x[b];b==="children"?typeof N=="string"?f.textContent!==N&&(x.suppressHydrationWarning!==!0&&oa(f.textContent,N,r),g=["children",N]):typeof N=="number"&&f.textContent!==""+N&&(x.suppressHydrationWarning!==!0&&oa(f.textContent,N,r),g=["children",""+N]):s.hasOwnProperty(b)&&N!=null&&b==="onScroll"&&ot("scroll",f)}switch(u){case"input":ft(f),mt(f,x,!0);break;case"textarea":ft(f),dn(f);break;case"select":case"option":break;default:typeof x.onClick=="function"&&(f.onclick=sa)}f=g,o.updateQueue=f,f!==null&&(o.flags|=4)}else{b=g.nodeType===9?g:g.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=Q(u)),r==="http://www.w3.org/1999/xhtml"?u==="script"?(r=b.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof f.is=="string"?r=b.createElement(u,{is:f.is}):(r=b.createElement(u),u==="select"&&(b=r,f.multiple?b.multiple=!0:f.size&&(b.size=f.size))):r=b.createElementNS(r,u),r[Hn]=o,r[_o]=f,Jm(r,o,!1,!1),o.stateNode=r;e:{switch(b=O(u,f),u){case"dialog":ot("cancel",r),ot("close",r),g=f;break;case"iframe":case"object":case"embed":ot("load",r),g=f;break;case"video":case"audio":for(g=0;g<jo.length;g++)ot(jo[g],r);g=f;break;case"source":ot("error",r),g=f;break;case"img":case"image":case"link":ot("error",r),ot("load",r),g=f;break;case"details":ot("toggle",r),g=f;break;case"input":tn(r,f),g=_e(r,f),ot("invalid",r);break;case"option":g=f;break;case"select":r._wrapperState={wasMultiple:!!f.multiple},g=P({},f,{value:void 0}),ot("invalid",r);break;case"textarea":Un(r,f),g=_t(r,f),ot("invalid",r);break;default:g=f}re(u,g),N=g;for(x in N)if(N.hasOwnProperty(x)){var _=N[x];x==="style"?nn(r,_):x==="dangerouslySetInnerHTML"?(_=_?_.__html:void 0,_!=null&&Le(r,_)):x==="children"?typeof _=="string"?(u!=="textarea"||_!=="")&&Fe(r,_):typeof _=="number"&&Fe(r,""+_):x!=="suppressContentEditableWarning"&&x!=="suppressHydrationWarning"&&x!=="autoFocus"&&(s.hasOwnProperty(x)?_!=null&&x==="onScroll"&&ot("scroll",r):_!=null&&A(r,x,_,b))}switch(u){case"input":ft(r),mt(r,f,!1);break;case"textarea":ft(r),dn(r);break;case"option":f.value!=null&&r.setAttribute("value",""+Ee(f.value));break;case"select":r.multiple=!!f.multiple,x=f.value,x!=null?Dt(r,!!f.multiple,x,!1):f.defaultValue!=null&&Dt(r,!!f.multiple,f.defaultValue,!0);break;default:typeof g.onClick=="function"&&(r.onclick=sa)}switch(u){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}}f&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return Wt(o),null;case 6:if(r&&o.stateNode!=null)tg(r,o,r.memoizedProps,f);else{if(typeof f!="string"&&o.stateNode===null)throw Error(n(166));if(u=Zr(Vo.current),Zr(Kn.current),ha(o)){if(f=o.stateNode,u=o.memoizedProps,f[Hn]=o,(x=f.nodeValue!==u)&&(r=pn,r!==null))switch(r.tag){case 3:oa(f.nodeValue,u,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&oa(f.nodeValue,u,(r.mode&1)!==0)}x&&(o.flags|=4)}else f=(u.nodeType===9?u:u.ownerDocument).createTextNode(f),f[Hn]=o,o.stateNode=f}return Wt(o),null;case 13:if(st(ut),f=o.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(at&&mn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)im(),Ii(),o.flags|=98560,x=!1;else if(x=ha(o),f!==null&&f.dehydrated!==null){if(r===null){if(!x)throw Error(n(318));if(x=o.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(n(317));x[Hn]=o}else Ii(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Wt(o),x=!1}else In!==null&&(Tc(In),In=null),x=!0;if(!x)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=u,o):(f=f!==null,f!==(r!==null&&r.memoizedState!==null)&&f&&(o.child.flags|=8192,(o.mode&1)!==0&&(r===null||(ut.current&1)!==0?Tt===0&&(Tt=3):Ac())),o.updateQueue!==null&&(o.flags|=4),Wt(o),null);case 4:return Oi(),mc(r,o),r===null&&Io(o.stateNode.containerInfo),Wt(o),null;case 10:return Uu(o.type._context),Wt(o),null;case 17:return on(o.type)&&la(),Wt(o),null;case 19:if(st(ut),x=o.memoizedState,x===null)return Wt(o),null;if(f=(o.flags&128)!==0,b=x.rendering,b===null)if(f)Ho(x,!1);else{if(Tt!==0||r!==null&&(r.flags&128)!==0)for(r=o.child;r!==null;){if(b=xa(r),b!==null){for(o.flags|=128,Ho(x,!1),f=b.updateQueue,f!==null&&(o.updateQueue=f,o.flags|=4),o.subtreeFlags=0,f=u,u=o.child;u!==null;)x=u,r=f,x.flags&=14680066,b=x.alternate,b===null?(x.childLanes=0,x.lanes=r,x.child=null,x.subtreeFlags=0,x.memoizedProps=null,x.memoizedState=null,x.updateQueue=null,x.dependencies=null,x.stateNode=null):(x.childLanes=b.childLanes,x.lanes=b.lanes,x.child=b.child,x.subtreeFlags=0,x.deletions=null,x.memoizedProps=b.memoizedProps,x.memoizedState=b.memoizedState,x.updateQueue=b.updateQueue,x.type=b.type,r=b.dependencies,x.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),u=u.sibling;return it(ut,ut.current&1|2),o.child}r=r.sibling}x.tail!==null&&yt()>Bi&&(o.flags|=128,f=!0,Ho(x,!1),o.lanes=4194304)}else{if(!f)if(r=xa(b),r!==null){if(o.flags|=128,f=!0,u=r.updateQueue,u!==null&&(o.updateQueue=u,o.flags|=4),Ho(x,!0),x.tail===null&&x.tailMode==="hidden"&&!b.alternate&&!at)return Wt(o),null}else 2*yt()-x.renderingStartTime>Bi&&u!==1073741824&&(o.flags|=128,f=!0,Ho(x,!1),o.lanes=4194304);x.isBackwards?(b.sibling=o.child,o.child=b):(u=x.last,u!==null?u.sibling=b:o.child=b,x.last=b)}return x.tail!==null?(o=x.tail,x.rendering=o,x.tail=o.sibling,x.renderingStartTime=yt(),o.sibling=null,u=ut.current,it(ut,f?u&1|2:u&1),o):(Wt(o),null);case 22:case 23:return Rc(),f=o.memoizedState!==null,r!==null&&r.memoizedState!==null!==f&&(o.flags|=8192),f&&(o.mode&1)!==0?(gn&1073741824)!==0&&(Wt(o),o.subtreeFlags&6&&(o.flags|=8192)):Wt(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function Cb(r,o){switch(Ou(o),o.tag){case 1:return on(o.type)&&la(),r=o.flags,r&65536?(o.flags=r&-65537|128,o):null;case 3:return Oi(),st(rn),st($t),Gu(),r=o.flags,(r&65536)!==0&&(r&128)===0?(o.flags=r&-65537|128,o):null;case 5:return Xu(o),null;case 13:if(st(ut),r=o.memoizedState,r!==null&&r.dehydrated!==null){if(o.alternate===null)throw Error(n(340));Ii()}return r=o.flags,r&65536?(o.flags=r&-65537|128,o):null;case 19:return st(ut),null;case 4:return Oi(),null;case 10:return Uu(o.type._context),null;case 22:case 23:return Rc(),null;case 24:return null;default:return null}}var Ra=!1,Ht=!1,Eb=typeof WeakSet=="function"?WeakSet:Set,xe=null;function zi(r,o){var u=r.ref;if(u!==null)if(typeof u=="function")try{u(null)}catch(f){ht(r,o,f)}else u.current=null}function gc(r,o,u){try{u()}catch(f){ht(r,o,f)}}var ng=!1;function Tb(r,o){if(Ru=Xs,r=Dp(),wu(r)){if("selectionStart"in r)var u={start:r.selectionStart,end:r.selectionEnd};else e:{u=(u=r.ownerDocument)&&u.defaultView||window;var f=u.getSelection&&u.getSelection();if(f&&f.rangeCount!==0){u=f.anchorNode;var g=f.anchorOffset,x=f.focusNode;f=f.focusOffset;try{u.nodeType,x.nodeType}catch{u=null;break e}var b=0,N=-1,_=-1,H=0,ie=0,oe=r,ne=null;t:for(;;){for(var ye;oe!==u||g!==0&&oe.nodeType!==3||(N=b+g),oe!==x||f!==0&&oe.nodeType!==3||(_=b+f),oe.nodeType===3&&(b+=oe.nodeValue.length),(ye=oe.firstChild)!==null;)ne=oe,oe=ye;for(;;){if(oe===r)break t;if(ne===u&&++H===g&&(N=b),ne===x&&++ie===f&&(_=b),(ye=oe.nextSibling)!==null)break;oe=ne,ne=oe.parentNode}oe=ye}u=N===-1||_===-1?null:{start:N,end:_}}else u=null}u=u||{start:0,end:0}}else u=null;for(Au={focusedElem:r,selectionRange:u},Xs=!1,xe=o;xe!==null;)if(o=xe,r=o.child,(o.subtreeFlags&1028)!==0&&r!==null)r.return=o,xe=r;else for(;xe!==null;){o=xe;try{var we=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(we!==null){var be=we.memoizedProps,vt=we.memoizedState,V=o.stateNode,F=V.getSnapshotBeforeUpdate(o.elementType===o.type?be:Dn(o.type,be),vt);V.__reactInternalSnapshotBeforeUpdate=F}break;case 3:var U=o.stateNode.containerInfo;U.nodeType===1?U.textContent="":U.nodeType===9&&U.documentElement&&U.removeChild(U.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ae){ht(o,o.return,ae)}if(r=o.sibling,r!==null){r.return=o.return,xe=r;break}xe=o.return}return we=ng,ng=!1,we}function Ko(r,o,u){var f=o.updateQueue;if(f=f!==null?f.lastEffect:null,f!==null){var g=f=f.next;do{if((g.tag&r)===r){var x=g.destroy;g.destroy=void 0,x!==void 0&&gc(o,u,x)}g=g.next}while(g!==f)}}function Aa(r,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var u=o=o.next;do{if((u.tag&r)===r){var f=u.create;u.destroy=f()}u=u.next}while(u!==o)}}function yc(r){var o=r.ref;if(o!==null){var u=r.stateNode;switch(r.tag){case 5:r=u;break;default:r=u}typeof o=="function"?o(r):o.current=r}}function rg(r){var o=r.alternate;o!==null&&(r.alternate=null,rg(o)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(o=r.stateNode,o!==null&&(delete o[Hn],delete o[_o],delete o[Iu],delete o[lb],delete o[ub])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function ig(r){return r.tag===5||r.tag===3||r.tag===4}function og(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||ig(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function vc(r,o,u){var f=r.tag;if(f===5||f===6)r=r.stateNode,o?u.nodeType===8?u.parentNode.insertBefore(r,o):u.insertBefore(r,o):(u.nodeType===8?(o=u.parentNode,o.insertBefore(r,u)):(o=u,o.appendChild(r)),u=u._reactRootContainer,u!=null||o.onclick!==null||(o.onclick=sa));else if(f!==4&&(r=r.child,r!==null))for(vc(r,o,u),r=r.sibling;r!==null;)vc(r,o,u),r=r.sibling}function xc(r,o,u){var f=r.tag;if(f===5||f===6)r=r.stateNode,o?u.insertBefore(r,o):u.appendChild(r);else if(f!==4&&(r=r.child,r!==null))for(xc(r,o,u),r=r.sibling;r!==null;)xc(r,o,u),r=r.sibling}var Ot=null,_n=!1;function Rr(r,o,u){for(u=u.child;u!==null;)sg(r,o,u),u=u.sibling}function sg(r,o,u){if(Wn&&typeof Wn.onCommitFiberUnmount=="function")try{Wn.onCommitFiberUnmount($s,u)}catch{}switch(u.tag){case 5:Ht||zi(u,o);case 6:var f=Ot,g=_n;Ot=null,Rr(r,o,u),Ot=f,_n=g,Ot!==null&&(_n?(r=Ot,u=u.stateNode,r.nodeType===8?r.parentNode.removeChild(u):r.removeChild(u)):Ot.removeChild(u.stateNode));break;case 18:Ot!==null&&(_n?(r=Ot,u=u.stateNode,r.nodeType===8?ju(r.parentNode,u):r.nodeType===1&&ju(r,u),Co(r)):ju(Ot,u.stateNode));break;case 4:f=Ot,g=_n,Ot=u.stateNode.containerInfo,_n=!0,Rr(r,o,u),Ot=f,_n=g;break;case 0:case 11:case 14:case 15:if(!Ht&&(f=u.updateQueue,f!==null&&(f=f.lastEffect,f!==null))){g=f=f.next;do{var x=g,b=x.destroy;x=x.tag,b!==void 0&&((x&2)!==0||(x&4)!==0)&&gc(u,o,b),g=g.next}while(g!==f)}Rr(r,o,u);break;case 1:if(!Ht&&(zi(u,o),f=u.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=u.memoizedProps,f.state=u.memoizedState,f.componentWillUnmount()}catch(N){ht(u,o,N)}Rr(r,o,u);break;case 21:Rr(r,o,u);break;case 22:u.mode&1?(Ht=(f=Ht)||u.memoizedState!==null,Rr(r,o,u),Ht=f):Rr(r,o,u);break;default:Rr(r,o,u)}}function ag(r){var o=r.updateQueue;if(o!==null){r.updateQueue=null;var u=r.stateNode;u===null&&(u=r.stateNode=new Eb),o.forEach(function(f){var g=_b.bind(null,r,f);u.has(f)||(u.add(f),f.then(g,g))})}}function Ln(r,o){var u=o.deletions;if(u!==null)for(var f=0;f<u.length;f++){var g=u[f];try{var x=r,b=o,N=b;e:for(;N!==null;){switch(N.tag){case 5:Ot=N.stateNode,_n=!1;break e;case 3:Ot=N.stateNode.containerInfo,_n=!0;break e;case 4:Ot=N.stateNode.containerInfo,_n=!0;break e}N=N.return}if(Ot===null)throw Error(n(160));sg(x,b,g),Ot=null,_n=!1;var _=g.alternate;_!==null&&(_.return=null),g.return=null}catch(H){ht(g,o,H)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)lg(o,r),o=o.sibling}function lg(r,o){var u=r.alternate,f=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(Ln(o,r),Xn(r),f&4){try{Ko(3,r,r.return),Aa(3,r)}catch(be){ht(r,r.return,be)}try{Ko(5,r,r.return)}catch(be){ht(r,r.return,be)}}break;case 1:Ln(o,r),Xn(r),f&512&&u!==null&&zi(u,u.return);break;case 5:if(Ln(o,r),Xn(r),f&512&&u!==null&&zi(u,u.return),r.flags&32){var g=r.stateNode;try{Fe(g,"")}catch(be){ht(r,r.return,be)}}if(f&4&&(g=r.stateNode,g!=null)){var x=r.memoizedProps,b=u!==null?u.memoizedProps:x,N=r.type,_=r.updateQueue;if(r.updateQueue=null,_!==null)try{N==="input"&&x.type==="radio"&&x.name!=null&&Rt(g,x),O(N,b);var H=O(N,x);for(b=0;b<_.length;b+=2){var ie=_[b],oe=_[b+1];ie==="style"?nn(g,oe):ie==="dangerouslySetInnerHTML"?Le(g,oe):ie==="children"?Fe(g,oe):A(g,ie,oe,H)}switch(N){case"input":Xe(g,x);break;case"textarea":rr(g,x);break;case"select":var ne=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!x.multiple;var ye=x.value;ye!=null?Dt(g,!!x.multiple,ye,!1):ne!==!!x.multiple&&(x.defaultValue!=null?Dt(g,!!x.multiple,x.defaultValue,!0):Dt(g,!!x.multiple,x.multiple?[]:"",!1))}g[_o]=x}catch(be){ht(r,r.return,be)}}break;case 6:if(Ln(o,r),Xn(r),f&4){if(r.stateNode===null)throw Error(n(162));g=r.stateNode,x=r.memoizedProps;try{g.nodeValue=x}catch(be){ht(r,r.return,be)}}break;case 3:if(Ln(o,r),Xn(r),f&4&&u!==null&&u.memoizedState.isDehydrated)try{Co(o.containerInfo)}catch(be){ht(r,r.return,be)}break;case 4:Ln(o,r),Xn(r);break;case 13:Ln(o,r),Xn(r),g=r.child,g.flags&8192&&(x=g.memoizedState!==null,g.stateNode.isHidden=x,!x||g.alternate!==null&&g.alternate.memoizedState!==null||(Sc=yt())),f&4&&ag(r);break;case 22:if(ie=u!==null&&u.memoizedState!==null,r.mode&1?(Ht=(H=Ht)||ie,Ln(o,r),Ht=H):Ln(o,r),Xn(r),f&8192){if(H=r.memoizedState!==null,(r.stateNode.isHidden=H)&&!ie&&(r.mode&1)!==0)for(xe=r,ie=r.child;ie!==null;){for(oe=xe=ie;xe!==null;){switch(ne=xe,ye=ne.child,ne.tag){case 0:case 11:case 14:case 15:Ko(4,ne,ne.return);break;case 1:zi(ne,ne.return);var we=ne.stateNode;if(typeof we.componentWillUnmount=="function"){f=ne,u=ne.return;try{o=f,we.props=o.memoizedProps,we.state=o.memoizedState,we.componentWillUnmount()}catch(be){ht(f,u,be)}}break;case 5:zi(ne,ne.return);break;case 22:if(ne.memoizedState!==null){fg(oe);continue}}ye!==null?(ye.return=ne,xe=ye):fg(oe)}ie=ie.sibling}e:for(ie=null,oe=r;;){if(oe.tag===5){if(ie===null){ie=oe;try{g=oe.stateNode,H?(x=g.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none"):(N=oe.stateNode,_=oe.memoizedProps.style,b=_!=null&&_.hasOwnProperty("display")?_.display:null,N.style.display=nt("display",b))}catch(be){ht(r,r.return,be)}}}else if(oe.tag===6){if(ie===null)try{oe.stateNode.nodeValue=H?"":oe.memoizedProps}catch(be){ht(r,r.return,be)}}else if((oe.tag!==22&&oe.tag!==23||oe.memoizedState===null||oe===r)&&oe.child!==null){oe.child.return=oe,oe=oe.child;continue}if(oe===r)break e;for(;oe.sibling===null;){if(oe.return===null||oe.return===r)break e;ie===oe&&(ie=null),oe=oe.return}ie===oe&&(ie=null),oe.sibling.return=oe.return,oe=oe.sibling}}break;case 19:Ln(o,r),Xn(r),f&4&&ag(r);break;case 21:break;default:Ln(o,r),Xn(r)}}function Xn(r){var o=r.flags;if(o&2){try{e:{for(var u=r.return;u!==null;){if(ig(u)){var f=u;break e}u=u.return}throw Error(n(160))}switch(f.tag){case 5:var g=f.stateNode;f.flags&32&&(Fe(g,""),f.flags&=-33);var x=og(r);xc(r,x,g);break;case 3:case 4:var b=f.stateNode.containerInfo,N=og(r);vc(r,N,b);break;default:throw Error(n(161))}}catch(_){ht(r,r.return,_)}r.flags&=-3}o&4096&&(r.flags&=-4097)}function Pb(r,o,u){xe=r,ug(r)}function ug(r,o,u){for(var f=(r.mode&1)!==0;xe!==null;){var g=xe,x=g.child;if(g.tag===22&&f){var b=g.memoizedState!==null||Ra;if(!b){var N=g.alternate,_=N!==null&&N.memoizedState!==null||Ht;N=Ra;var H=Ht;if(Ra=b,(Ht=_)&&!H)for(xe=g;xe!==null;)b=xe,_=b.child,b.tag===22&&b.memoizedState!==null?dg(g):_!==null?(_.return=b,xe=_):dg(g);for(;x!==null;)xe=x,ug(x),x=x.sibling;xe=g,Ra=N,Ht=H}cg(r)}else(g.subtreeFlags&8772)!==0&&x!==null?(x.return=g,xe=x):cg(r)}}function cg(r){for(;xe!==null;){var o=xe;if((o.flags&8772)!==0){var u=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:Ht||Aa(5,o);break;case 1:var f=o.stateNode;if(o.flags&4&&!Ht)if(u===null)f.componentDidMount();else{var g=o.elementType===o.type?u.memoizedProps:Dn(o.type,u.memoizedProps);f.componentDidUpdate(g,u.memoizedState,f.__reactInternalSnapshotBeforeUpdate)}var x=o.updateQueue;x!==null&&fm(o,x,f);break;case 3:var b=o.updateQueue;if(b!==null){if(u=null,o.child!==null)switch(o.child.tag){case 5:u=o.child.stateNode;break;case 1:u=o.child.stateNode}fm(o,b,u)}break;case 5:var N=o.stateNode;if(u===null&&o.flags&4){u=N;var _=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":_.autoFocus&&u.focus();break;case"img":_.src&&(u.src=_.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var H=o.alternate;if(H!==null){var ie=H.memoizedState;if(ie!==null){var oe=ie.dehydrated;oe!==null&&Co(oe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Ht||o.flags&512&&yc(o)}catch(ne){ht(o,o.return,ne)}}if(o===r){xe=null;break}if(u=o.sibling,u!==null){u.return=o.return,xe=u;break}xe=o.return}}function fg(r){for(;xe!==null;){var o=xe;if(o===r){xe=null;break}var u=o.sibling;if(u!==null){u.return=o.return,xe=u;break}xe=o.return}}function dg(r){for(;xe!==null;){var o=xe;try{switch(o.tag){case 0:case 11:case 15:var u=o.return;try{Aa(4,o)}catch(_){ht(o,u,_)}break;case 1:var f=o.stateNode;if(typeof f.componentDidMount=="function"){var g=o.return;try{f.componentDidMount()}catch(_){ht(o,g,_)}}var x=o.return;try{yc(o)}catch(_){ht(o,x,_)}break;case 5:var b=o.return;try{yc(o)}catch(_){ht(o,b,_)}}}catch(_){ht(o,o.return,_)}if(o===r){xe=null;break}var N=o.sibling;if(N!==null){N.return=o.return,xe=N;break}xe=o.return}}var Rb=Math.ceil,Ma=D.ReactCurrentDispatcher,wc=D.ReactCurrentOwner,Cn=D.ReactCurrentBatchConfig,We=0,Nt=null,kt=null,Ft=0,gn=0,Vi=br(0),Tt=0,qo=null,ei=0,Na=0,kc=0,Xo=null,an=null,Sc=0,Bi=1/0,fr=null,ja=!1,bc=null,Ar=null,Ia=!1,Mr=null,Da=0,Yo=0,Cc=null,_a=-1,La=0;function Yt(){return(We&6)!==0?yt():_a!==-1?_a:_a=yt()}function Nr(r){return(r.mode&1)===0?1:(We&2)!==0&&Ft!==0?Ft&-Ft:fb.transition!==null?(La===0&&(La=op()),La):(r=Ge,r!==0||(r=window.event,r=r===void 0?16:pp(r.type)),r)}function On(r,o,u,f){if(50<Yo)throw Yo=0,Cc=null,Error(n(185));xo(r,u,f),((We&2)===0||r!==Nt)&&(r===Nt&&((We&2)===0&&(Na|=u),Tt===4&&jr(r,Ft)),ln(r,f),u===1&&We===0&&(o.mode&1)===0&&(Bi=yt()+500,ca&&Er()))}function ln(r,o){var u=r.callbackNode;fS(r,o);var f=Hs(r,r===Nt?Ft:0);if(f===0)u!==null&&np(u),r.callbackNode=null,r.callbackPriority=0;else if(o=f&-f,r.callbackPriority!==o){if(u!=null&&np(u),o===1)r.tag===0?cb(pg.bind(null,r)):Jp(pg.bind(null,r)),sb(function(){(We&6)===0&&Er()}),u=null;else{switch(sp(f)){case 1:u=ru;break;case 4:u=rp;break;case 16:u=Bs;break;case 536870912:u=ip;break;default:u=Bs}u=Sg(u,hg.bind(null,r))}r.callbackPriority=o,r.callbackNode=u}}function hg(r,o){if(_a=-1,La=0,(We&6)!==0)throw Error(n(327));var u=r.callbackNode;if($i()&&r.callbackNode!==u)return null;var f=Hs(r,r===Nt?Ft:0);if(f===0)return null;if((f&30)!==0||(f&r.expiredLanes)!==0||o)o=Oa(r,f);else{o=f;var g=We;We|=2;var x=gg();(Nt!==r||Ft!==o)&&(fr=null,Bi=yt()+500,ni(r,o));do try{Nb();break}catch(N){mg(r,N)}while(!0);$u(),Ma.current=x,We=g,kt!==null?o=0:(Nt=null,Ft=0,o=Tt)}if(o!==0){if(o===2&&(g=iu(r),g!==0&&(f=g,o=Ec(r,g))),o===1)throw u=qo,ni(r,0),jr(r,f),ln(r,yt()),u;if(o===6)jr(r,f);else{if(g=r.current.alternate,(f&30)===0&&!Ab(g)&&(o=Oa(r,f),o===2&&(x=iu(r),x!==0&&(f=x,o=Ec(r,x))),o===1))throw u=qo,ni(r,0),jr(r,f),ln(r,yt()),u;switch(r.finishedWork=g,r.finishedLanes=f,o){case 0:case 1:throw Error(n(345));case 2:ri(r,an,fr);break;case 3:if(jr(r,f),(f&130023424)===f&&(o=Sc+500-yt(),10<o)){if(Hs(r,0)!==0)break;if(g=r.suspendedLanes,(g&f)!==f){Yt(),r.pingedLanes|=r.suspendedLanes&g;break}r.timeoutHandle=Nu(ri.bind(null,r,an,fr),o);break}ri(r,an,fr);break;case 4:if(jr(r,f),(f&4194240)===f)break;for(o=r.eventTimes,g=-1;0<f;){var b=31-Nn(f);x=1<<b,b=o[b],b>g&&(g=b),f&=~x}if(f=g,f=yt()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*Rb(f/1960))-f,10<f){r.timeoutHandle=Nu(ri.bind(null,r,an,fr),f);break}ri(r,an,fr);break;case 5:ri(r,an,fr);break;default:throw Error(n(329))}}}return ln(r,yt()),r.callbackNode===u?hg.bind(null,r):null}function Ec(r,o){var u=Xo;return r.current.memoizedState.isDehydrated&&(ni(r,o).flags|=256),r=Oa(r,o),r!==2&&(o=an,an=u,o!==null&&Tc(o)),r}function Tc(r){an===null?an=r:an.push.apply(an,r)}function Ab(r){for(var o=r;;){if(o.flags&16384){var u=o.updateQueue;if(u!==null&&(u=u.stores,u!==null))for(var f=0;f<u.length;f++){var g=u[f],x=g.getSnapshot;g=g.value;try{if(!jn(x(),g))return!1}catch{return!1}}}if(u=o.child,o.subtreeFlags&16384&&u!==null)u.return=o,o=u;else{if(o===r)break;for(;o.sibling===null;){if(o.return===null||o.return===r)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function jr(r,o){for(o&=~kc,o&=~Na,r.suspendedLanes|=o,r.pingedLanes&=~o,r=r.expirationTimes;0<o;){var u=31-Nn(o),f=1<<u;r[u]=-1,o&=~f}}function pg(r){if((We&6)!==0)throw Error(n(327));$i();var o=Hs(r,0);if((o&1)===0)return ln(r,yt()),null;var u=Oa(r,o);if(r.tag!==0&&u===2){var f=iu(r);f!==0&&(o=f,u=Ec(r,f))}if(u===1)throw u=qo,ni(r,0),jr(r,o),ln(r,yt()),u;if(u===6)throw Error(n(345));return r.finishedWork=r.current.alternate,r.finishedLanes=o,ri(r,an,fr),ln(r,yt()),null}function Pc(r,o){var u=We;We|=1;try{return r(o)}finally{We=u,We===0&&(Bi=yt()+500,ca&&Er())}}function ti(r){Mr!==null&&Mr.tag===0&&(We&6)===0&&$i();var o=We;We|=1;var u=Cn.transition,f=Ge;try{if(Cn.transition=null,Ge=1,r)return r()}finally{Ge=f,Cn.transition=u,We=o,(We&6)===0&&Er()}}function Rc(){gn=Vi.current,st(Vi)}function ni(r,o){r.finishedWork=null,r.finishedLanes=0;var u=r.timeoutHandle;if(u!==-1&&(r.timeoutHandle=-1,ob(u)),kt!==null)for(u=kt.return;u!==null;){var f=u;switch(Ou(f),f.tag){case 1:f=f.type.childContextTypes,f!=null&&la();break;case 3:Oi(),st(rn),st($t),Gu();break;case 5:Xu(f);break;case 4:Oi();break;case 13:st(ut);break;case 19:st(ut);break;case 10:Uu(f.type._context);break;case 22:case 23:Rc()}u=u.return}if(Nt=r,kt=r=Ir(r.current,null),Ft=gn=o,Tt=0,qo=null,kc=Na=ei=0,an=Xo=null,Qr!==null){for(o=0;o<Qr.length;o++)if(u=Qr[o],f=u.interleaved,f!==null){u.interleaved=null;var g=f.next,x=u.pending;if(x!==null){var b=x.next;x.next=g,f.next=b}u.pending=f}Qr=null}return r}function mg(r,o){do{var u=kt;try{if($u(),wa.current=Ca,ka){for(var f=ct.memoizedState;f!==null;){var g=f.queue;g!==null&&(g.pending=null),f=f.next}ka=!1}if(Jr=0,Mt=Et=ct=null,Bo=!1,$o=0,wc.current=null,u===null||u.return===null){Tt=1,qo=o,kt=null;break}e:{var x=r,b=u.return,N=u,_=o;if(o=Ft,N.flags|=32768,_!==null&&typeof _=="object"&&typeof _.then=="function"){var H=_,ie=N,oe=ie.tag;if((ie.mode&1)===0&&(oe===0||oe===11||oe===15)){var ne=ie.alternate;ne?(ie.updateQueue=ne.updateQueue,ie.memoizedState=ne.memoizedState,ie.lanes=ne.lanes):(ie.updateQueue=null,ie.memoizedState=null)}var ye=Vm(b);if(ye!==null){ye.flags&=-257,Bm(ye,b,N,x,o),ye.mode&1&&zm(x,H,o),o=ye,_=H;var we=o.updateQueue;if(we===null){var be=new Set;be.add(_),o.updateQueue=be}else we.add(_);break e}else{if((o&1)===0){zm(x,H,o),Ac();break e}_=Error(n(426))}}else if(at&&N.mode&1){var vt=Vm(b);if(vt!==null){(vt.flags&65536)===0&&(vt.flags|=256),Bm(vt,b,N,x,o),Vu(Fi(_,N));break e}}x=_=Fi(_,N),Tt!==4&&(Tt=2),Xo===null?Xo=[x]:Xo.push(x),x=b;do{switch(x.tag){case 3:x.flags|=65536,o&=-o,x.lanes|=o;var V=Om(x,_,o);cm(x,V);break e;case 1:N=_;var F=x.type,U=x.stateNode;if((x.flags&128)===0&&(typeof F.getDerivedStateFromError=="function"||U!==null&&typeof U.componentDidCatch=="function"&&(Ar===null||!Ar.has(U)))){x.flags|=65536,o&=-o,x.lanes|=o;var ae=Fm(x,N,o);cm(x,ae);break e}}x=x.return}while(x!==null)}vg(u)}catch(Te){o=Te,kt===u&&u!==null&&(kt=u=u.return);continue}break}while(!0)}function gg(){var r=Ma.current;return Ma.current=Ca,r===null?Ca:r}function Ac(){(Tt===0||Tt===3||Tt===2)&&(Tt=4),Nt===null||(ei&268435455)===0&&(Na&268435455)===0||jr(Nt,Ft)}function Oa(r,o){var u=We;We|=2;var f=gg();(Nt!==r||Ft!==o)&&(fr=null,ni(r,o));do try{Mb();break}catch(g){mg(r,g)}while(!0);if($u(),We=u,Ma.current=f,kt!==null)throw Error(n(261));return Nt=null,Ft=0,Tt}function Mb(){for(;kt!==null;)yg(kt)}function Nb(){for(;kt!==null&&!nS();)yg(kt)}function yg(r){var o=kg(r.alternate,r,gn);r.memoizedProps=r.pendingProps,o===null?vg(r):kt=o,wc.current=null}function vg(r){var o=r;do{var u=o.alternate;if(r=o.return,(o.flags&32768)===0){if(u=bb(u,o,gn),u!==null){kt=u;return}}else{if(u=Cb(u,o),u!==null){u.flags&=32767,kt=u;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{Tt=6,kt=null;return}}if(o=o.sibling,o!==null){kt=o;return}kt=o=r}while(o!==null);Tt===0&&(Tt=5)}function ri(r,o,u){var f=Ge,g=Cn.transition;try{Cn.transition=null,Ge=1,jb(r,o,u,f)}finally{Cn.transition=g,Ge=f}return null}function jb(r,o,u,f){do $i();while(Mr!==null);if((We&6)!==0)throw Error(n(327));u=r.finishedWork;var g=r.finishedLanes;if(u===null)return null;if(r.finishedWork=null,r.finishedLanes=0,u===r.current)throw Error(n(177));r.callbackNode=null,r.callbackPriority=0;var x=u.lanes|u.childLanes;if(dS(r,x),r===Nt&&(kt=Nt=null,Ft=0),(u.subtreeFlags&2064)===0&&(u.flags&2064)===0||Ia||(Ia=!0,Sg(Bs,function(){return $i(),null})),x=(u.flags&15990)!==0,(u.subtreeFlags&15990)!==0||x){x=Cn.transition,Cn.transition=null;var b=Ge;Ge=1;var N=We;We|=4,wc.current=null,Tb(r,u),lg(u,r),ZS(Au),Xs=!!Ru,Au=Ru=null,r.current=u,Pb(u),rS(),We=N,Ge=b,Cn.transition=x}else r.current=u;if(Ia&&(Ia=!1,Mr=r,Da=g),x=r.pendingLanes,x===0&&(Ar=null),sS(u.stateNode),ln(r,yt()),o!==null)for(f=r.onRecoverableError,u=0;u<o.length;u++)g=o[u],f(g.value,{componentStack:g.stack,digest:g.digest});if(ja)throw ja=!1,r=bc,bc=null,r;return(Da&1)!==0&&r.tag!==0&&$i(),x=r.pendingLanes,(x&1)!==0?r===Cc?Yo++:(Yo=0,Cc=r):Yo=0,Er(),null}function $i(){if(Mr!==null){var r=sp(Da),o=Cn.transition,u=Ge;try{if(Cn.transition=null,Ge=16>r?16:r,Mr===null)var f=!1;else{if(r=Mr,Mr=null,Da=0,(We&6)!==0)throw Error(n(331));var g=We;for(We|=4,xe=r.current;xe!==null;){var x=xe,b=x.child;if((xe.flags&16)!==0){var N=x.deletions;if(N!==null){for(var _=0;_<N.length;_++){var H=N[_];for(xe=H;xe!==null;){var ie=xe;switch(ie.tag){case 0:case 11:case 15:Ko(8,ie,x)}var oe=ie.child;if(oe!==null)oe.return=ie,xe=oe;else for(;xe!==null;){ie=xe;var ne=ie.sibling,ye=ie.return;if(rg(ie),ie===H){xe=null;break}if(ne!==null){ne.return=ye,xe=ne;break}xe=ye}}}var we=x.alternate;if(we!==null){var be=we.child;if(be!==null){we.child=null;do{var vt=be.sibling;be.sibling=null,be=vt}while(be!==null)}}xe=x}}if((x.subtreeFlags&2064)!==0&&b!==null)b.return=x,xe=b;else e:for(;xe!==null;){if(x=xe,(x.flags&2048)!==0)switch(x.tag){case 0:case 11:case 15:Ko(9,x,x.return)}var V=x.sibling;if(V!==null){V.return=x.return,xe=V;break e}xe=x.return}}var F=r.current;for(xe=F;xe!==null;){b=xe;var U=b.child;if((b.subtreeFlags&2064)!==0&&U!==null)U.return=b,xe=U;else e:for(b=F;xe!==null;){if(N=xe,(N.flags&2048)!==0)try{switch(N.tag){case 0:case 11:case 15:Aa(9,N)}}catch(Te){ht(N,N.return,Te)}if(N===b){xe=null;break e}var ae=N.sibling;if(ae!==null){ae.return=N.return,xe=ae;break e}xe=N.return}}if(We=g,Er(),Wn&&typeof Wn.onPostCommitFiberRoot=="function")try{Wn.onPostCommitFiberRoot($s,r)}catch{}f=!0}return f}finally{Ge=u,Cn.transition=o}}return!1}function xg(r,o,u){o=Fi(u,o),o=Om(r,o,1),r=Pr(r,o,1),o=Yt(),r!==null&&(xo(r,1,o),ln(r,o))}function ht(r,o,u){if(r.tag===3)xg(r,r,u);else for(;o!==null;){if(o.tag===3){xg(o,r,u);break}else if(o.tag===1){var f=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(Ar===null||!Ar.has(f))){r=Fi(u,r),r=Fm(o,r,1),o=Pr(o,r,1),r=Yt(),o!==null&&(xo(o,1,r),ln(o,r));break}}o=o.return}}function Ib(r,o,u){var f=r.pingCache;f!==null&&f.delete(o),o=Yt(),r.pingedLanes|=r.suspendedLanes&u,Nt===r&&(Ft&u)===u&&(Tt===4||Tt===3&&(Ft&130023424)===Ft&&500>yt()-Sc?ni(r,0):kc|=u),ln(r,o)}function wg(r,o){o===0&&((r.mode&1)===0?o=1:(o=Ws,Ws<<=1,(Ws&130023424)===0&&(Ws=4194304)));var u=Yt();r=lr(r,o),r!==null&&(xo(r,o,u),ln(r,u))}function Db(r){var o=r.memoizedState,u=0;o!==null&&(u=o.retryLane),wg(r,u)}function _b(r,o){var u=0;switch(r.tag){case 13:var f=r.stateNode,g=r.memoizedState;g!==null&&(u=g.retryLane);break;case 19:f=r.stateNode;break;default:throw Error(n(314))}f!==null&&f.delete(o),wg(r,u)}var kg;kg=function(r,o,u){if(r!==null)if(r.memoizedProps!==o.pendingProps||rn.current)sn=!0;else{if((r.lanes&u)===0&&(o.flags&128)===0)return sn=!1,Sb(r,o,u);sn=(r.flags&131072)!==0}else sn=!1,at&&(o.flags&1048576)!==0&&em(o,da,o.index);switch(o.lanes=0,o.tag){case 2:var f=o.type;Pa(r,o),r=o.pendingProps;var g=Mi(o,$t.current);Li(o,u),g=Ju(null,o,f,r,g,u);var x=ec();return o.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,on(f)?(x=!0,ua(o)):x=!1,o.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,Ku(o),g.updater=Ea,o.stateNode=g,g._reactInternals=o,sc(o,f,r,u),o=cc(null,o,f,!0,x,u)):(o.tag=0,at&&x&&Lu(o),Xt(null,o,g,u),o=o.child),o;case 16:f=o.elementType;e:{switch(Pa(r,o),r=o.pendingProps,g=f._init,f=g(f._payload),o.type=f,g=o.tag=Ob(f),r=Dn(f,r),g){case 0:o=uc(null,o,f,r,u);break e;case 1:o=qm(null,o,f,r,u);break e;case 11:o=$m(null,o,f,r,u);break e;case 14:o=Um(null,o,f,Dn(f.type,r),u);break e}throw Error(n(306,f,""))}return o;case 0:return f=o.type,g=o.pendingProps,g=o.elementType===f?g:Dn(f,g),uc(r,o,f,g,u);case 1:return f=o.type,g=o.pendingProps,g=o.elementType===f?g:Dn(f,g),qm(r,o,f,g,u);case 3:e:{if(Xm(o),r===null)throw Error(n(387));f=o.pendingProps,x=o.memoizedState,g=x.element,um(r,o),va(o,f,null,u);var b=o.memoizedState;if(f=b.element,x.isDehydrated)if(x={element:f,isDehydrated:!1,cache:b.cache,pendingSuspenseBoundaries:b.pendingSuspenseBoundaries,transitions:b.transitions},o.updateQueue.baseState=x,o.memoizedState=x,o.flags&256){g=Fi(Error(n(423)),o),o=Ym(r,o,f,u,g);break e}else if(f!==g){g=Fi(Error(n(424)),o),o=Ym(r,o,f,u,g);break e}else for(mn=Sr(o.stateNode.containerInfo.firstChild),pn=o,at=!0,In=null,u=am(o,null,f,u),o.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(Ii(),f===g){o=cr(r,o,u);break e}Xt(r,o,f,u)}o=o.child}return o;case 5:return dm(o),r===null&&zu(o),f=o.type,g=o.pendingProps,x=r!==null?r.memoizedProps:null,b=g.children,Mu(f,g)?b=null:x!==null&&Mu(f,x)&&(o.flags|=32),Km(r,o),Xt(r,o,b,u),o.child;case 6:return r===null&&zu(o),null;case 13:return Gm(r,o,u);case 4:return qu(o,o.stateNode.containerInfo),f=o.pendingProps,r===null?o.child=Di(o,null,f,u):Xt(r,o,f,u),o.child;case 11:return f=o.type,g=o.pendingProps,g=o.elementType===f?g:Dn(f,g),$m(r,o,f,g,u);case 7:return Xt(r,o,o.pendingProps,u),o.child;case 8:return Xt(r,o,o.pendingProps.children,u),o.child;case 12:return Xt(r,o,o.pendingProps.children,u),o.child;case 10:e:{if(f=o.type._context,g=o.pendingProps,x=o.memoizedProps,b=g.value,it(ma,f._currentValue),f._currentValue=b,x!==null)if(jn(x.value,b)){if(x.children===g.children&&!rn.current){o=cr(r,o,u);break e}}else for(x=o.child,x!==null&&(x.return=o);x!==null;){var N=x.dependencies;if(N!==null){b=x.child;for(var _=N.firstContext;_!==null;){if(_.context===f){if(x.tag===1){_=ur(-1,u&-u),_.tag=2;var H=x.updateQueue;if(H!==null){H=H.shared;var ie=H.pending;ie===null?_.next=_:(_.next=ie.next,ie.next=_),H.pending=_}}x.lanes|=u,_=x.alternate,_!==null&&(_.lanes|=u),Wu(x.return,u,o),N.lanes|=u;break}_=_.next}}else if(x.tag===10)b=x.type===o.type?null:x.child;else if(x.tag===18){if(b=x.return,b===null)throw Error(n(341));b.lanes|=u,N=b.alternate,N!==null&&(N.lanes|=u),Wu(b,u,o),b=x.sibling}else b=x.child;if(b!==null)b.return=x;else for(b=x;b!==null;){if(b===o){b=null;break}if(x=b.sibling,x!==null){x.return=b.return,b=x;break}b=b.return}x=b}Xt(r,o,g.children,u),o=o.child}return o;case 9:return g=o.type,f=o.pendingProps.children,Li(o,u),g=Sn(g),f=f(g),o.flags|=1,Xt(r,o,f,u),o.child;case 14:return f=o.type,g=Dn(f,o.pendingProps),g=Dn(f.type,g),Um(r,o,f,g,u);case 15:return Wm(r,o,o.type,o.pendingProps,u);case 17:return f=o.type,g=o.pendingProps,g=o.elementType===f?g:Dn(f,g),Pa(r,o),o.tag=1,on(f)?(r=!0,ua(o)):r=!1,Li(o,u),_m(o,f,g),sc(o,f,g,u),cc(null,o,f,!0,r,u);case 19:return Zm(r,o,u);case 22:return Hm(r,o,u)}throw Error(n(156,o.tag))};function Sg(r,o){return tp(r,o)}function Lb(r,o,u,f){this.tag=r,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function En(r,o,u,f){return new Lb(r,o,u,f)}function Mc(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Ob(r){if(typeof r=="function")return Mc(r)?1:0;if(r!=null){if(r=r.$$typeof,r===W)return 11;if(r===ee)return 14}return 2}function Ir(r,o){var u=r.alternate;return u===null?(u=En(r.tag,o,r.key,r.mode),u.elementType=r.elementType,u.type=r.type,u.stateNode=r.stateNode,u.alternate=r,r.alternate=u):(u.pendingProps=o,u.type=r.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=r.flags&14680064,u.childLanes=r.childLanes,u.lanes=r.lanes,u.child=r.child,u.memoizedProps=r.memoizedProps,u.memoizedState=r.memoizedState,u.updateQueue=r.updateQueue,o=r.dependencies,u.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},u.sibling=r.sibling,u.index=r.index,u.ref=r.ref,u}function Fa(r,o,u,f,g,x){var b=2;if(f=r,typeof r=="function")Mc(r)&&(b=1);else if(typeof r=="string")b=5;else e:switch(r){case q:return ii(u.children,g,x,o);case $:b=8,g|=8;break;case K:return r=En(12,u,o,g|2),r.elementType=K,r.lanes=x,r;case ue:return r=En(13,u,o,g),r.elementType=ue,r.lanes=x,r;case Z:return r=En(19,u,o,g),r.elementType=Z,r.lanes=x,r;case Ce:return za(u,g,x,o);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case j:b=10;break e;case Y:b=9;break e;case W:b=11;break e;case ee:b=14;break e;case ge:b=16,f=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return o=En(b,u,o,g),o.elementType=r,o.type=f,o.lanes=x,o}function ii(r,o,u,f){return r=En(7,r,f,o),r.lanes=u,r}function za(r,o,u,f){return r=En(22,r,f,o),r.elementType=Ce,r.lanes=u,r.stateNode={isHidden:!1},r}function Nc(r,o,u){return r=En(6,r,null,o),r.lanes=u,r}function jc(r,o,u){return o=En(4,r.children!==null?r.children:[],r.key,o),o.lanes=u,o.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},o}function Fb(r,o,u,f,g){this.tag=o,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ou(0),this.expirationTimes=ou(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ou(0),this.identifierPrefix=f,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function Ic(r,o,u,f,g,x,b,N,_){return r=new Fb(r,o,u,N,_),o===1?(o=1,x===!0&&(o|=8)):o=0,x=En(3,null,null,o),r.current=x,x.stateNode=r,x.memoizedState={element:f,isDehydrated:u,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ku(x),r}function zb(r,o,u){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:I,key:f==null?null:""+f,children:r,containerInfo:o,implementation:u}}function bg(r){if(!r)return Cr;r=r._reactInternals;e:{if(Kr(r)!==r||r.tag!==1)throw Error(n(170));var o=r;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(on(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(n(171))}if(r.tag===1){var u=r.type;if(on(u))return Qp(r,u,o)}return o}function Cg(r,o,u,f,g,x,b,N,_){return r=Ic(u,f,!0,r,g,x,b,N,_),r.context=bg(null),u=r.current,f=Yt(),g=Nr(u),x=ur(f,g),x.callback=o??null,Pr(u,x,g),r.current.lanes=g,xo(r,g,f),ln(r,f),r}function Va(r,o,u,f){var g=o.current,x=Yt(),b=Nr(g);return u=bg(u),o.context===null?o.context=u:o.pendingContext=u,o=ur(x,b),o.payload={element:r},f=f===void 0?null:f,f!==null&&(o.callback=f),r=Pr(g,o,b),r!==null&&(On(r,g,b,x),ya(r,g,b)),b}function Ba(r){if(r=r.current,!r.child)return null;switch(r.child.tag){case 5:return r.child.stateNode;default:return r.child.stateNode}}function Eg(r,o){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var u=r.retryLane;r.retryLane=u!==0&&u<o?u:o}}function Dc(r,o){Eg(r,o),(r=r.alternate)&&Eg(r,o)}function Vb(){return null}var Tg=typeof reportError=="function"?reportError:function(r){console.error(r)};function _c(r){this._internalRoot=r}$a.prototype.render=_c.prototype.render=function(r){var o=this._internalRoot;if(o===null)throw Error(n(409));Va(r,o,null,null)},$a.prototype.unmount=_c.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var o=r.containerInfo;ti(function(){Va(null,r,null,null)}),o[ir]=null}};function $a(r){this._internalRoot=r}$a.prototype.unstable_scheduleHydration=function(r){if(r){var o=up();r={blockedOn:null,target:r,priority:o};for(var u=0;u<xr.length&&o!==0&&o<xr[u].priority;u++);xr.splice(u,0,r),u===0&&dp(r)}};function Lc(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function Ua(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function Pg(){}function Bb(r,o,u,f,g){if(g){if(typeof f=="function"){var x=f;f=function(){var H=Ba(b);x.call(H)}}var b=Cg(o,f,r,0,null,!1,!1,"",Pg);return r._reactRootContainer=b,r[ir]=b.current,Io(r.nodeType===8?r.parentNode:r),ti(),b}for(;g=r.lastChild;)r.removeChild(g);if(typeof f=="function"){var N=f;f=function(){var H=Ba(_);N.call(H)}}var _=Ic(r,0,!1,null,null,!1,!1,"",Pg);return r._reactRootContainer=_,r[ir]=_.current,Io(r.nodeType===8?r.parentNode:r),ti(function(){Va(o,_,u,f)}),_}function Wa(r,o,u,f,g){var x=u._reactRootContainer;if(x){var b=x;if(typeof g=="function"){var N=g;g=function(){var _=Ba(b);N.call(_)}}Va(o,b,r,g)}else b=Bb(u,o,r,g,f);return Ba(b)}ap=function(r){switch(r.tag){case 3:var o=r.stateNode;if(o.current.memoizedState.isDehydrated){var u=vo(o.pendingLanes);u!==0&&(su(o,u|1),ln(o,yt()),(We&6)===0&&(Bi=yt()+500,Er()))}break;case 13:ti(function(){var f=lr(r,1);if(f!==null){var g=Yt();On(f,r,1,g)}}),Dc(r,1)}},au=function(r){if(r.tag===13){var o=lr(r,134217728);if(o!==null){var u=Yt();On(o,r,134217728,u)}Dc(r,134217728)}},lp=function(r){if(r.tag===13){var o=Nr(r),u=lr(r,o);if(u!==null){var f=Yt();On(u,r,o,f)}Dc(r,o)}},up=function(){return Ge},cp=function(r,o){var u=Ge;try{return Ge=r,o()}finally{Ge=u}},je=function(r,o,u){switch(o){case"input":if(Xe(r,u),o=u.name,u.type==="radio"&&o!=null){for(u=r;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<u.length;o++){var f=u[o];if(f!==r&&f.form===r.form){var g=aa(f);if(!g)throw Error(n(90));qe(f),Xe(f,g)}}}break;case"textarea":rr(r,u);break;case"select":o=u.value,o!=null&&Dt(r,!!u.multiple,o,!1)}},wt=Pc,At=ti;var $b={usingClientEntryPoint:!1,Events:[Lo,Ri,aa,xt,Ye,Pc]},Go={findFiberByHostInstance:qr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Ub={bundleType:Go.bundleType,version:Go.version,rendererPackageName:Go.rendererPackageName,rendererConfig:Go.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:D.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=Jh(r),r===null?null:r.stateNode},findFiberByHostInstance:Go.findFiberByHostInstance||Vb,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ha=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ha.isDisabled&&Ha.supportsFiber)try{$s=Ha.inject(Ub),Wn=Ha}catch{}}return un.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=$b,un.createPortal=function(r,o){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Lc(o))throw Error(n(200));return zb(r,o,null,u)},un.createRoot=function(r,o){if(!Lc(r))throw Error(n(299));var u=!1,f="",g=Tg;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(f=o.identifierPrefix),o.onRecoverableError!==void 0&&(g=o.onRecoverableError)),o=Ic(r,1,!1,null,null,u,!1,f,g),r[ir]=o.current,Io(r.nodeType===8?r.parentNode:r),new _c(o)},un.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var o=r._reactInternals;if(o===void 0)throw typeof r.render=="function"?Error(n(188)):(r=Object.keys(r).join(","),Error(n(268,r)));return r=Jh(o),r=r===null?null:r.stateNode,r},un.flushSync=function(r){return ti(r)},un.hydrate=function(r,o,u){if(!Ua(o))throw Error(n(200));return Wa(null,r,o,!0,u)},un.hydrateRoot=function(r,o,u){if(!Lc(r))throw Error(n(405));var f=u!=null&&u.hydratedSources||null,g=!1,x="",b=Tg;if(u!=null&&(u.unstable_strictMode===!0&&(g=!0),u.identifierPrefix!==void 0&&(x=u.identifierPrefix),u.onRecoverableError!==void 0&&(b=u.onRecoverableError)),o=Cg(o,null,r,1,u??null,g,!1,x,b),r[ir]=o.current,Io(r),f)for(r=0;r<f.length;r++)u=f[r],g=u._getVersion,g=g(u._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[u,g]:o.mutableSourceEagerHydrationData.push(u,g);return new $a(o)},un.render=function(r,o,u){if(!Ua(o))throw Error(n(200));return Wa(null,r,o,!1,u)},un.unmountComponentAtNode=function(r){if(!Ua(r))throw Error(n(40));return r._reactRootContainer?(ti(function(){Wa(null,null,r,!1,function(){r._reactRootContainer=null,r[ir]=null})}),!0):!1},un.unstable_batchedUpdates=Pc,un.unstable_renderSubtreeIntoContainer=function(r,o,u,f){if(!Ua(u))throw Error(n(200));if(r==null||r._reactInternals===void 0)throw Error(n(38));return Wa(r,o,u,!1,f)},un.version="18.3.1-next-f1338f8080-20240426",un}var _g;function Mx(){if(_g)return zc.exports;_g=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),zc.exports=Qb(),zc.exports}var Lg;function Zb(){if(Lg)return Ka;Lg=1;var e=Mx();return Ka.createRoot=e.createRoot,Ka.hydrateRoot=e.hydrateRoot,Ka}var Jb=Zb(),k=Fd();const eC=Od(k),As=Hb({__proto__:null,default:eC},[k]),zd=k.createContext({});function Vl(e){const t=k.useRef(null);return t.current===null&&(t.current=e()),t.current}const tC=typeof window<"u",Vd=tC?k.useLayoutEffect:k.useEffect,Bl=k.createContext(null);function Bd(e,t){e.indexOf(t)===-1&&e.push(t)}function Sl(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const er=(e,t,n)=>n>t?t:n<e?e:n;let $l=()=>{};const Vr={},Nx=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),jx=e=>typeof e=="object"&&e!==null,Ix=e=>/^0[^.\s]+$/u.test(e);function Dx(e){let t;return()=>(t===void 0&&(t=e()),t)}const An=e=>e,Ms=(...e)=>e.reduce((t,n)=>i=>n(t(i))),gs=(e,t,n)=>{const i=t-e;return i?(n-e)/i:1};class $d{constructor(){this.subscriptions=[]}add(t){return Bd(this.subscriptions,t),()=>Sl(this.subscriptions,t)}notify(t,n,i){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,i);else for(let l=0;l<s;l++){const a=this.subscriptions[l];a&&a(t,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const vn=e=>e*1e3,Rn=e=>e/1e3,_x=(e,t)=>t?e*(1e3/t):0,Lx=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,nC=1e-7,rC=12;function iC(e,t,n,i,s){let l,a,c=0;do a=t+(n-t)/2,l=Lx(a,i,s)-e,l>0?n=a:t=a;while(Math.abs(l)>nC&&++c<rC);return a}function Ns(e,t,n,i){if(e===t&&n===i)return An;const s=l=>iC(l,0,1,e,n);return l=>l===0||l===1?l:Lx(s(l),t,i)}const Ox=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Fx=e=>t=>1-e(1-t),zx=Ns(.33,1.53,.69,.99),Ud=Fx(zx),Vx=Ox(Ud),Bx=e=>e>=1?1:(e*=2)<1?.5*Ud(e):.5*(2-Math.pow(2,-10*(e-1))),Wd=e=>1-Math.sin(Math.acos(e)),$x=Fx(Wd),Ux=Ox(Wd),oC=Ns(.42,0,1,1),sC=Ns(0,0,.58,1),Wx=Ns(.42,0,.58,1),aC=e=>Array.isArray(e)&&typeof e[0]!="number",Hx=e=>Array.isArray(e)&&typeof e[0]=="number",lC={linear:An,easeIn:oC,easeInOut:Wx,easeOut:sC,circIn:Wd,circInOut:Ux,circOut:$x,backIn:Ud,backInOut:Vx,backOut:zx,anticipate:Bx},uC=e=>typeof e=="string",Og=e=>{if(Hx(e)){$l(e.length===4);const[t,n,i,s]=e;return Ns(t,n,i,s)}else if(uC(e))return lC[e];return e},qa=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function cC(e){let t=new Set,n=new Set,i=!1,s=!1;const l=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function c(h){l.has(h)&&(d.schedule(h),e()),h(a)}const d={schedule:(h,m=!1,p=!1)=>{const w=p&&i?t:n;return m&&l.add(h),w.add(h),h},cancel:h=>{n.delete(h),l.delete(h)},process:h=>{if(a=h,i){s=!0;return}i=!0;const m=t;t=n,n=m,t.forEach(c),t.clear(),i=!1,s&&(s=!1,d.process(h))}};return d}const fC=40;function Kx(e,t){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},l=()=>n=!0,a=qa.reduce((A,D)=>(A[D]=cC(l),A),{}),{setup:c,read:d,resolveKeyframes:h,preUpdate:m,update:p,preRender:y,render:w,postRender:S}=a,E=()=>{const A=Vr.useManualTiming,D=A?s.timestamp:performance.now();n=!1,A||(s.delta=i?1e3/60:Math.max(Math.min(D-s.timestamp,fC),1)),s.timestamp=D,s.isProcessing=!0,c.process(s),d.process(s),h.process(s),m.process(s),p.process(s),y.process(s),w.process(s),S.process(s),s.isProcessing=!1,n&&t&&(i=!1,e(E))},T=()=>{n=!0,i=!0,s.isProcessing||e(E)};return{schedule:qa.reduce((A,D)=>{const B=a[D];return A[D]=(I,q=!1,$=!1)=>(n||T(),B.schedule(I,q,$)),A},{}),cancel:A=>{for(let D=0;D<qa.length;D++)a[qa[D]].cancel(A)},state:s,steps:a}}const{schedule:et,cancel:Br,state:zt,steps:$c}=Kx(typeof requestAnimationFrame<"u"?requestAnimationFrame:An,!0);let ll;function dC(){ll=void 0}const Zt={now:()=>(ll===void 0&&Zt.set(zt.isProcessing||Vr.useManualTiming?zt.timestamp:performance.now()),ll),set:e=>{ll=e,queueMicrotask(dC)}},qx=e=>t=>typeof t=="string"&&t.startsWith(e),Xx=qx("--"),hC=qx("var(--"),Hd=e=>hC(e)?pC.test(e.split("/*")[0].trim()):!1,pC=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Fg(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const ao={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ys={...ao,transform:e=>er(0,1,e)},Xa={...ao,default:1},as=e=>Math.round(e*1e5)/1e5,Kd=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function mC(e){return e==null}const gC=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,qd=(e,t)=>n=>!!(typeof n=="string"&&gC.test(n)&&n.startsWith(e)||t&&!mC(n)&&Object.prototype.hasOwnProperty.call(n,t)),Yx=(e,t,n)=>i=>{if(typeof i!="string")return i;const[s,l,a,c]=i.match(Kd);return{[e]:parseFloat(s),[t]:parseFloat(l),[n]:parseFloat(a),alpha:c!==void 0?parseFloat(c):1}},yC=e=>er(0,255,e),Uc={...ao,transform:e=>Math.round(yC(e))},di={test:qd("rgb","red"),parse:Yx("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+Uc.transform(e)+", "+Uc.transform(t)+", "+Uc.transform(n)+", "+as(ys.transform(i))+")"};function vC(e){let t="",n="",i="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,i+=i,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}}const Nf={test:qd("#"),parse:vC,transform:di.transform},js=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),dr=js("deg"),Jn=js("%"),ke=js("px"),xC=js("vh"),wC=js("vw"),zg={...Jn,parse:e=>Jn.parse(e)/100,transform:e=>Jn.transform(e*100)},Zi={test:qd("hsl","hue"),parse:Yx("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+Jn.transform(as(t))+", "+Jn.transform(as(n))+", "+as(ys.transform(i))+")"},bt={test:e=>di.test(e)||Nf.test(e)||Zi.test(e),parse:e=>di.test(e)?di.parse(e):Zi.test(e)?Zi.parse(e):Nf.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?di.transform(e):Zi.transform(e),getAnimatableNone:e=>{const t=bt.parse(e);return t.alpha=0,bt.transform(t)}},kC=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function SC(e){return isNaN(e)&&typeof e=="string"&&(e.match(Kd)?.length||0)+(e.match(kC)?.length||0)>0}const Gx="number",Qx="color",bC="var",CC="var(",Vg="${}",EC=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function no(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},s=[];let l=0;const c=t.replace(EC,d=>(bt.test(d)?(i.color.push(l),s.push(Qx),n.push(bt.parse(d))):d.startsWith(CC)?(i.var.push(l),s.push(bC),n.push(d)):(i.number.push(l),s.push(Gx),n.push(parseFloat(d))),++l,Vg)).split(Vg);return{values:n,split:c,indexes:i,types:s}}function TC(e){return no(e).values}function Zx({split:e,types:t}){const n=e.length;return i=>{let s="";for(let l=0;l<n;l++)if(s+=e[l],i[l]!==void 0){const a=t[l];a===Gx?s+=as(i[l]):a===Qx?s+=bt.transform(i[l]):s+=i[l]}return s}}function PC(e){return Zx(no(e))}const RC=e=>typeof e=="number"?0:bt.test(e)?bt.getAnimatableNone(e):e,AC=(e,t)=>typeof e=="number"?t?.trim().endsWith("/")?e:0:RC(e);function MC(e){const t=no(e);return Zx(t)(t.values.map((i,s)=>AC(i,t.split[s])))}const Vn={test:SC,parse:TC,createTransformer:PC,getAnimatableNone:MC};function Wc(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function NC({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,t/=100,n/=100;let s=0,l=0,a=0;if(!t)s=l=a=n;else{const c=n<.5?n*(1+t):n+t-n*t,d=2*n-c;s=Wc(d,c,e+1/3),l=Wc(d,c,e),a=Wc(d,c,e-1/3)}return{red:Math.round(s*255),green:Math.round(l*255),blue:Math.round(a*255),alpha:i}}function bl(e,t){return n=>n>0?t:e}const Je=(e,t,n)=>e+(t-e)*n,Hc=(e,t,n)=>{const i=e*e,s=n*(t*t-i)+i;return s<0?0:Math.sqrt(s)},jC=[Nf,di,Zi],IC=e=>jC.find(t=>t.test(e));function Bg(e){const t=IC(e);if(!t)return!1;let n=t.parse(e);return t===Zi&&(n=NC(n)),n}const $g=(e,t)=>{const n=Bg(e),i=Bg(t);if(!n||!i)return bl(e,t);const s={...n};return l=>(s.red=Hc(n.red,i.red,l),s.green=Hc(n.green,i.green,l),s.blue=Hc(n.blue,i.blue,l),s.alpha=Je(n.alpha,i.alpha,l),di.transform(s))},jf=new Set(["none","hidden"]);function DC(e,t){return jf.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function _C(e,t){return n=>Je(e,t,n)}function Xd(e){return typeof e=="number"?_C:typeof e=="string"?Hd(e)?bl:bt.test(e)?$g:FC:Array.isArray(e)?Jx:typeof e=="object"?bt.test(e)?$g:LC:bl}function Jx(e,t){const n=[...e],i=n.length,s=e.map((l,a)=>Xd(l)(l,t[a]));return l=>{for(let a=0;a<i;a++)n[a]=s[a](l);return n}}function LC(e,t){const n={...e,...t},i={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(i[s]=Xd(e[s])(e[s],t[s]));return s=>{for(const l in i)n[l]=i[l](s);return n}}function OC(e,t){const n=[],i={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const l=t.types[s],a=e.indexes[l][i[l]],c=e.values[a]??0;n[s]=c,i[l]++}return n}const FC=(e,t)=>{const n=Vn.createTransformer(t),i=no(e),s=no(t);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?jf.has(e)&&!s.values.length||jf.has(t)&&!i.values.length?DC(e,t):Ms(Jx(OC(i,s),s.values),n):bl(e,t)};function ew(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Je(e,t,n):Xd(e)(e,t)}const zC=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>et.update(t,n),stop:()=>Br(t),now:()=>zt.isProcessing?zt.timestamp:Zt.now()}},tw=(e,t,n=10)=>{let i="";const s=Math.max(Math.round(t/n),2);for(let l=0;l<s;l++)i+=Math.round(e(l/(s-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},Cl=2e4;function Yd(e){let t=0;const n=50;let i=e.next(t);for(;!i.done&&t<Cl;)t+=n,i=e.next(t);return t>=Cl?1/0:t}function VC(e,t=100,n){const i=n({...e,keyframes:[0,t]}),s=Math.min(Yd(i),Cl);return{type:"keyframes",ease:l=>i.next(s*l).value/t,duration:Rn(s)}}const pt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function If(e,t){return e*Math.sqrt(1-t*t)}const BC=12;function $C(e,t,n){let i=n;for(let s=1;s<BC;s++)i=i-e(i)/t(i);return i}const Kc=.001;function UC({duration:e=pt.duration,bounce:t=pt.bounce,velocity:n=pt.velocity,mass:i=pt.mass}){let s,l,a=1-t;a=er(pt.minDamping,pt.maxDamping,a),e=er(pt.minDuration,pt.maxDuration,Rn(e)),a<1?(s=h=>{const m=h*a,p=m*e,y=m-n,w=If(h,a),S=Math.exp(-p);return Kc-y/w*S},l=h=>{const p=h*a*e,y=p*n+n,w=Math.pow(a,2)*Math.pow(h,2)*e,S=Math.exp(-p),E=If(Math.pow(h,2),a);return(-s(h)+Kc>0?-1:1)*((y-w)*S)/E}):(s=h=>{const m=Math.exp(-h*e),p=(h-n)*e+1;return-Kc+m*p},l=h=>{const m=Math.exp(-h*e),p=(n-h)*(e*e);return m*p});const c=5/e,d=$C(s,l,c);if(e=vn(e),isNaN(d))return{stiffness:pt.stiffness,damping:pt.damping,duration:e};{const h=Math.pow(d,2)*i;return{stiffness:h,damping:a*2*Math.sqrt(i*h),duration:e}}}const WC=["duration","bounce"],HC=["stiffness","damping","mass"];function Ug(e,t){return t.some(n=>e[n]!==void 0)}function KC(e){let t={velocity:pt.velocity,stiffness:pt.stiffness,damping:pt.damping,mass:pt.mass,isResolvedFromDuration:!1,...e};if(!Ug(e,HC)&&Ug(e,WC))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,i=2*Math.PI/(n*1.2),s=i*i,l=2*er(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:pt.mass,stiffness:s,damping:l}}else{const n=UC({...e,velocity:0});t={...t,...n,mass:pt.mass},t.isResolvedFromDuration=!0}return t}function El(e=pt.visualDuration,t=pt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:s}=n;const l=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],c={done:!1,value:l},{stiffness:d,damping:h,mass:m,duration:p,velocity:y,isResolvedFromDuration:w}=KC({...n,velocity:-Rn(n.velocity||0)}),S=y||0,E=h/(2*Math.sqrt(d*m)),T=a-l,C=Rn(Math.sqrt(d/m)),R=Math.abs(T)<5;i||(i=R?pt.restSpeed.granular:pt.restSpeed.default),s||(s=R?pt.restDelta.granular:pt.restDelta.default);let A,D,B,I,q,$;if(E<1)B=If(C,E),I=(S+E*C*T)/B,A=j=>{const Y=Math.exp(-E*C*j);return a-Y*(I*Math.sin(B*j)+T*Math.cos(B*j))},q=E*C*I+T*B,$=E*C*T-I*B,D=j=>Math.exp(-E*C*j)*(q*Math.sin(B*j)+$*Math.cos(B*j));else if(E===1){A=Y=>a-Math.exp(-C*Y)*(T+(S+C*T)*Y);const j=S+C*T;D=Y=>Math.exp(-C*Y)*(C*j*Y-S)}else{const j=C*Math.sqrt(E*E-1);A=Z=>{const ee=Math.exp(-E*C*Z),ge=Math.min(j*Z,300);return a-ee*((S+E*C*T)*Math.sinh(ge)+j*T*Math.cosh(ge))/j};const Y=(S+E*C*T)/j,W=E*C*Y-T*j,ue=E*C*T-Y*j;D=Z=>{const ee=Math.exp(-E*C*Z),ge=Math.min(j*Z,300);return ee*(W*Math.sinh(ge)+ue*Math.cosh(ge))}}const K={calculatedDuration:w&&p||null,velocity:j=>vn(D(j)),next:j=>{if(!w&&E<1){const W=Math.exp(-E*C*j),ue=Math.sin(B*j),Z=Math.cos(B*j),ee=a-W*(I*ue+T*Z),ge=vn(W*(q*ue+$*Z));return c.done=Math.abs(ge)<=i&&Math.abs(a-ee)<=s,c.value=c.done?a:ee,c}const Y=A(j);if(w)c.done=j>=p;else{const W=vn(D(j));c.done=Math.abs(W)<=i&&Math.abs(a-Y)<=s}return c.value=c.done?a:Y,c},toString:()=>{const j=Math.min(Yd(K),Cl),Y=tw(W=>K.next(j*W).value,j,30);return j+"ms "+Y},toTransition:()=>{}};return K}El.applyToOptions=e=>{const t=VC(e,100,El);return e.ease=t.ease,e.duration=vn(t.duration),e.type="keyframes",e};const qC=5;function nw(e,t,n){const i=Math.max(t-qC,0);return _x(n-e(i),t-i)}function Df({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:l=500,modifyTarget:a,min:c,max:d,restDelta:h=.5,restSpeed:m}){const p=e[0],y={done:!1,value:p},w=$=>c!==void 0&&$<c||d!==void 0&&$>d,S=$=>c===void 0?d:d===void 0||Math.abs(c-$)<Math.abs(d-$)?c:d;let E=n*t;const T=p+E,C=a===void 0?T:a(T);C!==T&&(E=C-p);const R=$=>-E*Math.exp(-$/i),A=$=>C+R($),D=$=>{const K=R($),j=A($);y.done=Math.abs(K)<=h,y.value=y.done?C:j};let B,I;const q=$=>{w(y.value)&&(B=$,I=El({keyframes:[y.value,S(y.value)],velocity:nw(A,$,y.value),damping:s,stiffness:l,restDelta:h,restSpeed:m}))};return q(0),{calculatedDuration:null,next:$=>{let K=!1;return!I&&B===void 0&&(K=!0,D($),q($)),B!==void 0&&$>=B?I.next($-B):(!K&&D($),y)}}}function XC(e,t,n){const i=[],s=n||Vr.mix||ew,l=e.length-1;for(let a=0;a<l;a++){let c=s(e[a],e[a+1]);if(t){const d=Array.isArray(t)?t[a]||An:t;c=Ms(d,c)}i.push(c)}return i}function YC(e,t,{clamp:n=!0,ease:i,mixer:s}={}){const l=e.length;if($l(l===t.length),l===1)return()=>t[0];if(l===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),t=[...t].reverse());const c=XC(t,i,s),d=c.length,h=m=>{if(a&&m<e[0])return t[0];let p=0;if(d>1)for(;p<e.length-2&&!(m<e[p+1]);p++);const y=gs(e[p],e[p+1],m);return c[p](y)};return n?m=>h(er(e[0],e[l-1],m)):h}function GC(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const s=gs(0,t,i);e.push(Je(n,1,s))}}function QC(e){const t=[0];return GC(t,e.length-1),t}function ZC(e,t){return e.map(n=>n*t)}function JC(e,t){return e.map(()=>t||Wx).splice(0,e.length-1)}function ls({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const s=aC(i)?i.map(Og):Og(i),l={done:!1,value:t[0]},a=ZC(n&&n.length===t.length?n:QC(t),e),c=YC(a,t,{ease:Array.isArray(s)?s:JC(t,s)});return{calculatedDuration:e,next:d=>(l.value=c(d),l.done=d>=e,l)}}const eE=e=>e!==null;function Ul(e,{repeat:t,repeatType:n="loop"},i,s=1){const l=e.filter(eE),c=s<0||t&&n!=="loop"&&t%2===1?0:l.length-1;return!c||i===void 0?l[c]:i}const tE={decay:Df,inertia:Df,tween:ls,keyframes:ls,spring:El};function rw(e){typeof e.type=="string"&&(e.type=tE[e.type])}class Gd{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const nE=e=>e/100;class Tl extends Gd{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==Zt.now()&&this.tick(Zt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;rw(t);const{type:n=ls,repeat:i=0,repeatDelay:s=0,repeatType:l,velocity:a=0}=t;let{keyframes:c}=t;const d=n||ls;d!==ls&&typeof c[0]!="number"&&(this.mixKeyframes=Ms(nE,ew(c[0],c[1])),c=[0,100]);const h=d({...t,keyframes:c});l==="mirror"&&(this.mirroredGenerator=d({...t,keyframes:[...c].reverse(),velocity:-a})),h.calculatedDuration===null&&(h.calculatedDuration=Yd(h));const{calculatedDuration:m}=h;this.calculatedDuration=m,this.resolvedDuration=m+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=h}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:i,totalDuration:s,mixKeyframes:l,mirroredGenerator:a,resolvedDuration:c,calculatedDuration:d}=this;if(this.startTime===null)return i.next(0);const{delay:h=0,keyframes:m,repeat:p,repeatType:y,repeatDelay:w,type:S,onUpdate:E,finalKeyframe:T}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const C=this.currentTime-h*(this.playbackSpeed>=0?1:-1),R=this.playbackSpeed>=0?C<0:C>s;this.currentTime=Math.max(C,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let A=this.currentTime,D=i;if(p){const $=Math.min(this.currentTime,s)/c;let K=Math.floor($),j=$%1;!j&&$>=1&&(j=1),j===1&&K--,K=Math.min(K,p+1),!!(K%2)&&(y==="reverse"?(j=1-j,w&&(j-=w/c)):y==="mirror"&&(D=a)),A=er(0,1,j)*c}let B;R?(this.delayState.value=m[0],B=this.delayState):B=D.next(A),l&&!R&&(B.value=l(B.value));let{done:I}=B;!R&&d!==null&&(I=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const q=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return q&&S!==Df&&(B.value=Ul(m,this.options,T,this.speed)),E&&E(B.value),q&&this.finish(),B}then(t,n){return this.finished.then(t,n)}get duration(){return Rn(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Rn(t)}get time(){return Rn(this.currentTime)}set time(t){t=vn(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return nw(i=>this.generator.next(i).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(Zt.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=Rn(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=zC,startTime:n}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Zt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function rE(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const hi=e=>e*180/Math.PI,_f=e=>{const t=hi(Math.atan2(e[1],e[0]));return Lf(t)},iE={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:_f,rotateZ:_f,skewX:e=>hi(Math.atan(e[1])),skewY:e=>hi(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Lf=e=>(e=e%360,e<0&&(e+=360),e),Wg=_f,Hg=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Kg=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),oE={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Hg,scaleY:Kg,scale:e=>(Hg(e)+Kg(e))/2,rotateX:e=>Lf(hi(Math.atan2(e[6],e[5]))),rotateY:e=>Lf(hi(Math.atan2(-e[2],e[0]))),rotateZ:Wg,rotate:Wg,skewX:e=>hi(Math.atan(e[4])),skewY:e=>hi(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Of(e){return e.includes("scale")?1:0}function Ff(e,t){if(!e||e==="none")return Of(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=oE,s=n;else{const c=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=iE,s=c}if(!s)return Of(t);const l=i[t],a=s[1].split(",").map(aE);return typeof l=="function"?l(a):a[l]}const sE=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Ff(n,t)};function aE(e){return parseFloat(e.trim())}const lo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],uo=new Set([...lo,"pathRotation"]),qg=e=>e===ao||e===ke,lE=new Set(["x","y","z"]),uE=lo.filter(e=>!lE.has(e));function cE(e){const t=[];return uE.forEach(n=>{const i=e.getValue(n);i!==void 0&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),t}const Fr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:i})=>{const s=e.max-e.min;return i==="border-box"?s:s-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:i})=>{const s=e.max-e.min;return i==="border-box"?s:s-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Ff(t,"x"),y:(e,{transform:t})=>Ff(t,"y")};Fr.translateX=Fr.x;Fr.translateY=Fr.y;const pi=new Set;let zf=!1,Vf=!1,Bf=!1;function iw(){if(Vf){const e=Array.from(pi).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),n=new Map;t.forEach(i=>{const s=cE(i);s.length&&(n.set(i,s),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const s=n.get(i);s&&s.forEach(([l,a])=>{i.getValue(l)?.set(a)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}Vf=!1,zf=!1,pi.forEach(e=>e.complete(Bf)),pi.clear()}function ow(){pi.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Vf=!0)})}function fE(){Bf=!0,ow(),iw(),Bf=!1}class Qd{constructor(t,n,i,s,l,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=i,this.motionValue=s,this.element=l,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(pi.add(this),zf||(zf=!0,et.read(ow),et.resolveKeyframes(iw))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:i,motionValue:s}=this;if(t[0]===null){const l=s?.get(),a=t[t.length-1];if(l!==void 0)t[0]=l;else if(i&&n){const c=i.readValue(n,a);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=a),s&&l===void 0&&s.set(t[0])}rE(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),pi.delete(this)}cancel(){this.state==="scheduled"&&(pi.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const dE=e=>e.startsWith("--");function sw(e,t,n){dE(t)?e.style.setProperty(t,n):e.style[t]=n}const hE={};function aw(e,t){const n=Dx(e);return()=>hE[t]??n()}const pE=aw(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),lw=aw(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),os=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,Xg={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:os([0,.65,.55,1]),circOut:os([.55,0,1,.45]),backIn:os([.31,.01,.66,-.59]),backOut:os([.33,1.53,.69,.99])};function uw(e,t){if(e)return typeof e=="function"?lw()?tw(e,t):"ease-out":Hx(e)?os(e):Array.isArray(e)?e.map(n=>uw(n,t)||Xg.easeOut):Xg[e]}function mE(e,t,n,{delay:i=0,duration:s=300,repeat:l=0,repeatType:a="loop",ease:c="easeOut",times:d}={},h=void 0){const m={[t]:n};d&&(m.offset=d);const p=uw(c,s);Array.isArray(p)&&(m.easing=p);const y={delay:i,duration:s,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:l+1,direction:a==="reverse"?"alternate":"normal"};return h&&(y.pseudoElement=h),e.animate(m,y)}function cw(e){return typeof e=="function"&&"applyToOptions"in e}function gE({type:e,...t}){return cw(e)&&lw()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class fw extends Gd{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:i,keyframes:s,pseudoElement:l,allowFlatten:a=!1,finalKeyframe:c,onComplete:d}=t;this.isPseudoElement=!!l,this.allowFlatten=a,this.options=t,$l(typeof t.type!="string");const h=gE(t);this.animation=mE(n,i,s,h,l),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!l){const m=Ul(s,this.options,c,this.speed);this.updateMotionValue&&this.updateMotionValue(m),sw(n,i,m),this.animation.cancel()}d?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return Rn(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Rn(t)}get time(){return Rn(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=vn(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:i,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&pE()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),i&&(this.animation.rangeEnd=i),An):s(this)}}const dw={anticipate:Bx,backInOut:Vx,circInOut:Ux};function yE(e){return e in dw}function vE(e){typeof e.ease=="string"&&yE(e.ease)&&(e.ease=dw[e.ease])}const qc=10;class xE extends fw{constructor(t){vE(t),rw(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:i,onComplete:s,element:l,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const c=new Tl({...a,autoplay:!1}),d=Math.max(qc,Zt.now()-this.startTime),h=er(0,qc,d-qc),m=c.sample(d).value,{name:p}=this.options;l&&p&&sw(l,p,m),n.setWithVelocity(c.sample(Math.max(0,d-h)).value,m,h),c.stop()}}const Yg=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Vn.test(e)||e==="0")&&!e.startsWith("url("));function wE(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function kE(e,t,n,i){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const l=e[e.length-1],a=Yg(s,t),c=Yg(l,t);return!a||!c?!1:wE(e)||(n==="spring"||cw(n))&&i}function $f(e){e.duration=0,e.type="keyframes"}const hw=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),SE=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function bE(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&SE.test(e[t]))return!0;return!1}const CE=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),EE=Dx(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function TE(e){const{motionValue:t,name:n,repeatDelay:i,repeatType:s,damping:l,type:a,keyframes:c}=e,d=t?.owner?.current;if(!(d instanceof HTMLElement)&&!(d instanceof SVGElement))return!1;const{onUpdate:h,transformTemplate:m}=t.owner.getProps();return EE()&&n&&(hw.has(n)||CE.has(n)&&bE(c))&&(n!=="transform"||!m)&&!h&&!i&&s!=="mirror"&&l!==0&&a!=="inertia"}const PE=40;class RE extends Gd{constructor({autoplay:t=!0,delay:n=0,type:i="keyframes",repeat:s=0,repeatDelay:l=0,repeatType:a="loop",keyframes:c,name:d,motionValue:h,element:m,...p}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Zt.now();const y={autoplay:t,delay:n,type:i,repeat:s,repeatDelay:l,repeatType:a,name:d,motionValue:h,element:m,...p},w=m?.KeyframeResolver||Qd;this.keyframeResolver=new w(c,(S,E,T)=>this.onKeyframesResolved(S,E,y,!T),d,h,m),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,i,s){this.keyframeResolver=void 0;const{name:l,type:a,velocity:c,delay:d,isHandoff:h,onUpdate:m}=i;this.resolvedAt=Zt.now();let p=!0;kE(t,l,a,c)||(p=!1,(Vr.instantAnimations||!d)&&m?.(Ul(t,i,n)),t[0]=t[t.length-1],$f(i),i.repeat=0);const w={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>PE?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:t},S=p&&!h&&TE(w),E=w.motionValue?.owner?.current;let T;if(S)try{T=new xE({...w,element:E})}catch{T=new Tl(w)}else T=new Tl(w);T.finished.then(()=>{this.notifyFinished()}).catch(An),this.pendingTimeline&&(this.stopTimeline=T.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=T}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),fE()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function pw(e,t,n,i=0,s=1){const l=Array.from(e).sort((h,m)=>h.sortNodePosition(m)).indexOf(t),a=e.size,c=(a-1)*i;return typeof n=="function"?n(l,a):s===1?l*i:c-l*i}const Gg=30,AE=e=>!isNaN(parseFloat(e));class ME{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const s=Zt.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Zt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=AE(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new $d);const i=this.events[t].add(n);return t==="change"?()=>{i(),et.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Zt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Gg)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Gg);return _x(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ro(e,t){return new ME(e,t)}function Zd(e,t){if(e?.inherit&&t){const{inherit:n,...i}=e;return{...t,...i}}return e}function Jd(e,t){const n=e?.[t]??e?.default??e;return n!==e?Zd(n,e):n}const NE={type:"spring",stiffness:500,damping:25,restSpeed:10},jE=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),IE={type:"keyframes",duration:.8},DE={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},_E=(e,{keyframes:t})=>t.length>2?IE:uo.has(e)?e.startsWith("scale")?jE(t[1]):NE:DE,LE=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function OE(e){for(const t in e)if(!LE.has(t))return!0;return!1}const eh=(e,t,n,i={},s,l)=>a=>{const c=Jd(i,e)||{},d=c.delay||i.delay||0;let{elapsed:h=0}=i;h=h-vn(d);const m={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-h,onUpdate:y=>{t.set(y),c.onUpdate&&c.onUpdate(y)},onComplete:()=>{a(),c.onComplete&&c.onComplete()},name:e,motionValue:t,element:l?void 0:s};OE(c)||Object.assign(m,_E(e,m)),m.duration&&(m.duration=vn(m.duration)),m.repeatDelay&&(m.repeatDelay=vn(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let p=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&($f(m),m.delay===0&&(p=!0)),(Vr.instantAnimations||Vr.skipAnimations||s?.shouldSkipAnimations||c.skipAnimations)&&(p=!0,$f(m),m.delay=0),m.allowFlatten=!c.type&&!c.ease,p&&!l&&t.get()!==void 0){const y=Ul(m.keyframes,c);if(y!==void 0){et.update(()=>{m.onUpdate(y),m.onComplete()});return}}return c.isSync?new Tl(m):new RE(m)},FE=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function zE(e){const t=FE.exec(e);if(!t)return[,];const[,n,i,s]=t;return[`--${n??i}`,s]}function mw(e,t,n=1){const[i,s]=zE(e);if(!i)return;const l=window.getComputedStyle(t).getPropertyValue(i);if(l){const a=l.trim();return Nx(a)?parseFloat(a):a}return Hd(s)?mw(s,t,n+1):s}function Qg(e){const t=[{},{}];return e?.values.forEach((n,i)=>{t[0][i]=n.get(),t[1][i]=n.getVelocity()}),t}function th(e,t,n,i){if(typeof t=="function"){const[s,l]=Qg(i);t=t(n!==void 0?n:e.custom,s,l)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,l]=Qg(i);t=t(n!==void 0?n:e.custom,s,l)}return t}function mi(e,t,n){const i=e.getProps();return th(i,t,n!==void 0?n:i.custom,e)}const gw=new Set(["width","height","top","left","right","bottom",...lo]),Uf=e=>Array.isArray(e);function VE(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ro(n))}function BE(e){return Uf(e)?e[e.length-1]||0:e}function $E(e,t){const n=mi(e,t);let{transitionEnd:i={},transition:s={},...l}=n||{};l={...l,...i};for(const a in l){const c=BE(l[a]);VE(e,a,c)}}const Vt=e=>!!(e&&e.getVelocity);function UE(e){return!!(Vt(e)&&e.add)}function Wf(e,t){const n=e.getValue("willChange");if(UE(n))return n.add(t);if(!n&&Vr.WillChange){const i=new Vr.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function nh(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const WE="framerAppearId",yw="data-"+nh(WE);function vw(e){return e.props[yw]}function HE({protectedKeys:e,needsAnimating:t},n){const i=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,i}function xw(e,t,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:l,transitionEnd:a,...c}=t;const d=e.getDefaultTransition();l=l?Zd(l,d):d;const h=l?.reduceMotion,m=l?.skipAnimations;i&&(l=i);const p=[],y=s&&e.animationState&&e.animationState.getState()[s],w=l?.path;w&&w.animateVisualElement(e,c,l,n,p);for(const S in c){const E=e.getValue(S,e.latestValues[S]??null),T=c[S];if(T===void 0||y&&HE(y,S))continue;const C={delay:n,...Jd(l||{},S)};m&&(C.skipAnimations=!0);const R=E.get();if(R!==void 0&&!E.isAnimating()&&!Array.isArray(T)&&T===R&&!C.velocity){et.update(()=>E.set(T));continue}let A=!1;if(window.MotionHandoffAnimation){const I=vw(e);if(I){const q=window.MotionHandoffAnimation(I,S,et);q!==null&&(C.startTime=q,A=!0)}}Wf(e,S);const D=h??e.shouldReduceMotion;E.start(eh(S,E,T,D&&gw.has(S)?{type:!1}:C,e,A));const B=E.animation;B&&p.push(B)}if(a){const S=()=>et.update(()=>{a&&$E(e,a)});p.length?Promise.all(p).then(S):S()}return p}function Hf(e,t,n={}){const i=mi(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const l=i?()=>Promise.all(xw(e,i,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:h=0,staggerChildren:m,staggerDirection:p}=s;return KE(e,t,d,h,m,p,n)}:()=>Promise.resolve(),{when:c}=s;if(c){const[d,h]=c==="beforeChildren"?[l,a]:[a,l];return d().then(()=>h())}else return Promise.all([l(),a(n.delay)])}function KE(e,t,n=0,i=0,s=0,l=1,a){const c=[];for(const d of e.variantChildren)d.notify("AnimationStart",t),c.push(Hf(d,t,{...a,delay:n+(typeof i=="function"?0:i)+pw(e.variantChildren,d,i,s,l)}).then(()=>d.notify("AnimationComplete",t)));return Promise.all(c)}function qE(e,t,n={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const s=t.map(l=>Hf(e,l,n));i=Promise.all(s)}else if(typeof t=="string")i=Hf(e,t,n);else{const s=typeof t=="function"?mi(e,t,n.custom):t;i=Promise.all(xw(e,s,n))}return i.then(()=>{e.notify("AnimationComplete",t)})}const XE={test:e=>e==="auto",parse:e=>e},ww=e=>t=>t.test(e),kw=[ao,ke,Jn,dr,wC,xC,XE],Zg=e=>kw.find(ww(e));function YE(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Ix(e):!0}const GE=new Set(["brightness","contrast","saturate","opacity"]);function QE(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=n.match(Kd)||[];if(!i)return e;const s=n.replace(i,"");let l=GE.has(t)?1:0;return i!==n&&(l*=100),t+"("+l+s+")"}const ZE=/\b([a-z-]*)\(.*?\)/gu,Kf={...Vn,getAnimatableNone:e=>{const t=e.match(ZE);return t?t.map(QE).join(" "):e}},qf={...Vn,getAnimatableNone:e=>{const t=Vn.parse(e);return Vn.createTransformer(e)(t.map(i=>typeof i=="number"?0:typeof i=="object"?{...i,alpha:1}:i))}},Jg={...ao,transform:Math.round},JE={rotate:dr,pathRotation:dr,rotateX:dr,rotateY:dr,rotateZ:dr,scale:Xa,scaleX:Xa,scaleY:Xa,scaleZ:Xa,skew:dr,skewX:dr,skewY:dr,distance:ke,translateX:ke,translateY:ke,translateZ:ke,x:ke,y:ke,z:ke,perspective:ke,transformPerspective:ke,opacity:ys,originX:zg,originY:zg,originZ:ke},Pl={borderWidth:ke,borderTopWidth:ke,borderRightWidth:ke,borderBottomWidth:ke,borderLeftWidth:ke,borderRadius:ke,borderTopLeftRadius:ke,borderTopRightRadius:ke,borderBottomRightRadius:ke,borderBottomLeftRadius:ke,width:ke,maxWidth:ke,height:ke,maxHeight:ke,top:ke,right:ke,bottom:ke,left:ke,inset:ke,insetBlock:ke,insetBlockStart:ke,insetBlockEnd:ke,insetInline:ke,insetInlineStart:ke,insetInlineEnd:ke,padding:ke,paddingTop:ke,paddingRight:ke,paddingBottom:ke,paddingLeft:ke,paddingBlock:ke,paddingBlockStart:ke,paddingBlockEnd:ke,paddingInline:ke,paddingInlineStart:ke,paddingInlineEnd:ke,margin:ke,marginTop:ke,marginRight:ke,marginBottom:ke,marginLeft:ke,marginBlock:ke,marginBlockStart:ke,marginBlockEnd:ke,marginInline:ke,marginInlineStart:ke,marginInlineEnd:ke,fontSize:ke,backgroundPositionX:ke,backgroundPositionY:ke,...JE,zIndex:Jg,fillOpacity:ys,strokeOpacity:ys,numOctaves:Jg},eT={...Pl,color:bt,backgroundColor:bt,outlineColor:bt,fill:bt,stroke:bt,borderColor:bt,borderTopColor:bt,borderRightColor:bt,borderBottomColor:bt,borderLeftColor:bt,filter:Kf,WebkitFilter:Kf,mask:qf,WebkitMask:qf},Sw=e=>eT[e],tT=new Set([Kf,qf]);function bw(e,t){let n=Sw(e);return tT.has(n)||(n=Vn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const nT=new Set(["auto","none","0"]);function rT(e,t,n){let i=0,s;for(;i<e.length&&!s;){const l=e[i];typeof l=="string"&&!nT.has(l)&&no(l).values.length&&(s=e[i]),i++}if(s&&n)for(const l of t)e[l]=bw(n,s)}class iT extends Qd{constructor(t,n,i,s,l){super(t,n,i,s,l,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let m=0;m<t.length;m++){let p=t[m];if(typeof p=="string"&&(p=p.trim(),Hd(p))){const y=mw(p,n.current);y!==void 0&&(t[m]=y),m===t.length-1&&(this.finalKeyframe=p)}}if(this.resolveNoneKeyframes(),!gw.has(i)||t.length!==2)return;const[s,l]=t,a=Zg(s),c=Zg(l),d=Fg(s),h=Fg(l);if(d!==h&&Fr[i]){this.needsMeasurement=!0;return}if(a!==c)if(qg(a)&&qg(c))for(let m=0;m<t.length;m++){const p=t[m];typeof p=="string"&&(t[m]=parseFloat(p))}else Fr[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,i=[];for(let s=0;s<t.length;s++)(t[s]===null||YE(t[s]))&&i.push(s);i.length&&rT(t,i,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Fr[i](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(i,s).jump(s,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const l=i.length-1,a=i[l];i[l]=Fr[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([c,d])=>{t.getValue(c).set(d)}),this.resolveNoneKeyframes()}}const rh=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function Cw(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const s=n?.[e]??i.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(i=>i!=null)}const Xf=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function ul(e){return jx(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:ih}=Kx(queueMicrotask,!1),zn={x:!1,y:!1};function Ew(){return zn.x||zn.y}function oT(e){return e==="x"||e==="y"?zn[e]?null:(zn[e]=!0,()=>{zn[e]=!1}):zn.x||zn.y?null:(zn.x=zn.y=!0,()=>{zn.x=zn.y=!1})}function Tw(e,t){const n=Cw(e),i=new AbortController,s={passive:!0,...t,signal:i.signal};return[n,s,()=>i.abort()]}function sT(e){return!(e.pointerType==="touch"||Ew())}function aT(e,t,n={}){const[i,s,l]=Tw(e,n);return i.forEach(a=>{let c=!1,d=!1,h;const m=()=>{a.removeEventListener("pointerleave",S)},p=T=>{h&&(h(T),h=void 0),m()},y=T=>{c=!1,window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",y),d&&(d=!1,p(T))},w=()=>{c=!0,window.addEventListener("pointerup",y,s),window.addEventListener("pointercancel",y,s)},S=T=>{if(T.pointerType!=="touch"){if(c){d=!0;return}p(T)}},E=T=>{if(!sT(T))return;d=!1;const C=t(a,T);typeof C=="function"&&(h=C,a.addEventListener("pointerleave",S,s))};a.addEventListener("pointerenter",E,s),a.addEventListener("pointerdown",w,s)}),l}const Pw=(e,t)=>t?e===t?!0:Pw(e,t.parentElement):!1,oh=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,lT=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function uT(e){return lT.has(e.tagName)||e.isContentEditable===!0}const cT=new Set(["INPUT","SELECT","TEXTAREA"]);function fT(e){return cT.has(e.tagName)||e.isContentEditable===!0}const cl=new WeakSet;function ey(e){return t=>{t.key==="Enter"&&e(t)}}function Xc(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const dT=(e,t)=>{const n=e.currentTarget;if(!n)return;const i=ey(()=>{if(cl.has(n))return;Xc(n,"down");const s=ey(()=>{Xc(n,"up")}),l=()=>Xc(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",l,t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)};function ty(e){return oh(e)&&!Ew()}const ny=new WeakSet;function hT(e,t,n={}){const[i,s,l]=Tw(e,n),a=c=>{const d=c.currentTarget;if(!ty(c)||ny.has(c))return;cl.add(d),n.stopPropagation&&ny.add(c);const h=t(d,c),m={...s,capture:!0},p=(S,E)=>{window.removeEventListener("pointerup",y,m),window.removeEventListener("pointercancel",w,m),cl.has(d)&&cl.delete(d),ty(S)&&typeof h=="function"&&h(S,{success:E})},y=S=>{p(S,d===window||d===document||n.useGlobalTarget||Pw(d,S.target))},w=S=>{p(S,!1)};window.addEventListener("pointerup",y,m),window.addEventListener("pointercancel",w,m)};return i.forEach(c=>{(n.useGlobalTarget?window:c).addEventListener("pointerdown",a,s),ul(c)&&(c.addEventListener("focus",h=>dT(h,s)),!uT(c)&&!c.hasAttribute("tabindex")&&(c.tabIndex=0))}),l}function sh(e){return jx(e)&&"ownerSVGElement"in e}const fl=new WeakMap;let dl;const Rw=(e,t,n)=>(i,s)=>s&&s[0]?s[0][e+"Size"]:sh(i)&&"getBBox"in i?i.getBBox()[t]:i[n],pT=Rw("inline","width","offsetWidth"),mT=Rw("block","height","offsetHeight");function gT({target:e,borderBoxSize:t}){fl.get(e)?.forEach(n=>{n(e,{get width(){return pT(e,t)},get height(){return mT(e,t)}})})}function yT(e){e.forEach(gT)}function vT(){typeof ResizeObserver>"u"||(dl=new ResizeObserver(yT))}function xT(e,t){dl||vT();const n=Cw(e);return n.forEach(i=>{let s=fl.get(i);s||(s=new Set,fl.set(i,s)),s.add(t),dl?.observe(i)}),()=>{n.forEach(i=>{const s=fl.get(i);s?.delete(t),s?.size||dl?.unobserve(i)})}}const hl=new Set;let Ji;function wT(){Ji=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};hl.forEach(t=>t(e))},window.addEventListener("resize",Ji)}function kT(e){return hl.add(e),Ji||wT(),()=>{hl.delete(e),!hl.size&&typeof Ji=="function"&&(window.removeEventListener("resize",Ji),Ji=void 0)}}function ry(e,t){return typeof e=="function"?kT(e):xT(e,t)}function ST(e){return sh(e)&&e.tagName==="svg"}const bT=[...kw,bt,Vn],CT=e=>bT.find(ww(e)),iy=()=>({translate:0,scale:1,origin:0,originPoint:0}),eo=()=>({x:iy(),y:iy()}),oy=()=>({min:0,max:0}),Pt=()=>({x:oy(),y:oy()}),ET=new WeakMap;function Wl(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function vs(e){return typeof e=="string"||Array.isArray(e)}const ah=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],lh=["initial",...ah];function Hl(e){return Wl(e.animate)||lh.some(t=>vs(e[t]))}function Aw(e){return!!(Hl(e)||e.variants)}function TT(e,t,n){for(const i in t){const s=t[i],l=n[i];if(Vt(s))e.addValue(i,s);else if(Vt(l))e.addValue(i,ro(s,{owner:e}));else if(l!==s)if(e.hasValue(i)){const a=e.getValue(i);a.liveStyle===!0?a.jump(s):a.hasAnimated||a.set(s)}else{const a=e.getStaticValue(i);e.addValue(i,ro(a!==void 0?a:s,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const Yf={current:null},Mw={current:!1},PT=typeof window<"u";function RT(){if(Mw.current=!0,!!PT)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Yf.current=e.matches;e.addEventListener("change",t),t()}else Yf.current=!1}const sy=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Rl={};function Nw(e){Rl=e}function AT(){return Rl}class MT{scrapeMotionValuesFromProps(t,n,i){return{}}constructor({parent:t,props:n,presenceContext:i,reducedMotionConfig:s,skipAnimations:l,blockInitialAnimation:a,visualState:c},d={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Qd,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const w=Zt.now();this.renderScheduledAt<w&&(this.renderScheduledAt=w,et.render(this.render,!1,!0))};const{latestValues:h,renderState:m}=c;this.latestValues=h,this.baseTarget={...h},this.initialValues=n.initial?{...h}:{},this.renderState=m,this.parent=t,this.props=n,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=l,this.options=d,this.blockInitialAnimation=!!a,this.isControllingVariants=Hl(n),this.isVariantNode=Aw(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:p,...y}=this.scrapeMotionValuesFromProps(n,{},this);for(const w in y){const S=y[w];h[w]!==void 0&&Vt(S)&&S.set(h[w])}}mount(t){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=t,ET.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,i)=>this.bindToMotionValue(i,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Mw.current||RT(),this.shouldReduceMotion=Yf.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Br(this.notifyUpdate),Br(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&hw.has(t)&&this.current instanceof HTMLElement){const{factory:a,keyframes:c,times:d,ease:h,duration:m}=n.accelerate,p=new fw({element:this.current,name:t,keyframes:c,times:d,ease:h,duration:vn(m)}),y=a(p);this.valueSubscriptions.set(t,()=>{y(),p.cancel()});return}const i=uo.has(t);i&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&et.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let l;typeof window<"u"&&window.MotionCheckAppearSync&&(l=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),l&&l()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Rl){const n=Rl[t];if(!n)continue;const{isEnabled:i,Feature:s}=n;if(!this.features[t]&&s&&i(this.props)&&(this.features[t]=new s(this)),this.features[t]){const l=this.features[t];l.isMounted?l.update():(l.mount(),l.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Pt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;i<sy.length;i++){const s=sy[i];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const l="on"+s,a=t[l];a&&(this.propEventSubscriptions[s]=this.on(s,a))}this.prevMotionValues=TT(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const i=this.values.get(t);n!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return i===void 0&&n!==void 0&&(i=ro(n===null?void 0:n,{owner:this}),this.addValue(t,i)),i}readValue(t,n){let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(Nx(i)||Ix(i))?i=parseFloat(i):!CT(i)&&Vn.test(n)&&(i=bw(t,n)),this.setBaseTarget(t,Vt(i)?i.get():i)),Vt(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const l=th(this.props,n,this.presenceContext?.custom);l&&(i=l[t])}if(n&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Vt(s)?s:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new $d),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){ih.render(this.render)}}class jw extends MT{constructor(){super(...arguments),this.KeyframeResolver=iT}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const i=t.style;return i?i[n]:void 0}removeValueFromRenderState(t,{vars:n,style:i}){delete n[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Vt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Wr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Iw({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}function NT({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function jT(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function Yc(e){return e===void 0||e===1}function Gf({scale:e,scaleX:t,scaleY:n}){return!Yc(e)||!Yc(t)||!Yc(n)}function li(e){return Gf(e)||Dw(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Dw(e){return ay(e.x)||ay(e.y)}function ay(e){return e&&e!=="0%"}function Al(e,t,n){const i=e-n,s=t*i;return n+s}function ly(e,t,n,i,s){return s!==void 0&&(e=Al(e,s,i)),Al(e,n,i)+t}function Qf(e,t=0,n=1,i,s){e.min=ly(e.min,t,n,i,s),e.max=ly(e.max,t,n,i,s)}function _w(e,{x:t,y:n}){Qf(e.x,t.translate,t.scale,t.originPoint),Qf(e.y,n.translate,n.scale,n.originPoint)}const uy=.999999999999,cy=1.0000000000001;function IT(e,t,n,i=!1){const s=n.length;if(!s)return;t.x=t.y=1;let l,a;for(let c=0;c<s;c++){l=n[c],a=l.projectionDelta;const{visualElement:d}=l.options;d&&d.props.style&&d.props.style.display==="contents"||(i&&l.options.layoutScroll&&l.scroll&&l!==l.root&&(Qn(e.x,-l.scroll.offset.x),Qn(e.y,-l.scroll.offset.y)),a&&(t.x*=a.x.scale,t.y*=a.y.scale,_w(e,a)),i&&li(l.latestValues)&&pl(e,l.latestValues,l.layout?.layoutBox))}t.x<cy&&t.x>uy&&(t.x=1),t.y<cy&&t.y>uy&&(t.y=1)}function Qn(e,t){e.min+=t,e.max+=t}function fy(e,t,n,i,s=.5){const l=Je(e.min,e.max,s);Qf(e,t,n,l,i)}function dy(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function pl(e,t,n){const i=n??e;fy(e.x,dy(t.x,i.x),t.scaleX,t.scale,t.originX),fy(e.y,dy(t.y,i.y),t.scaleY,t.scale,t.originY)}function Lw(e,t){return Iw(jT(e.getBoundingClientRect(),t))}function DT(e,t,n){const i=Lw(e,n),{scroll:s}=t;return s&&(Qn(i.x,s.offset.x),Qn(i.y,s.offset.y)),i}const _T={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},LT=lo.length;function OT(e,t,n){let i="",s=!0;for(let a=0;a<LT;a++){const c=lo[a],d=e[c];if(d===void 0)continue;let h=!0;if(typeof d=="number")h=d===(c.startsWith("scale")?1:0);else{const m=parseFloat(d);h=c.startsWith("scale")?m===1:m===0}if(!h||n){const m=Xf(d,Pl[c]);if(!h){s=!1;const p=_T[c]||c;i+=`${p}(${m}) `}n&&(t[c]=m)}}const l=e.pathRotation;return l&&(s=!1,i+=`rotate(${Xf(l,Pl.pathRotation)}) `),i=i.trim(),n?i=n(t,s?"":i):s&&(i="none"),i}function uh(e,t,n){const{style:i,vars:s,transformOrigin:l}=e;let a=!1,c=!1;for(const d in t){const h=t[d];if(uo.has(d)){a=!0;continue}else if(Xx(d)){s[d]=h;continue}else{const m=Xf(h,Pl[d]);d.startsWith("origin")?(c=!0,l[d]=m):i[d]=m}}if(t.transform||(a||n?i.transform=OT(t,e.transform,n):i.transform&&(i.transform="none")),c){const{originX:d="50%",originY:h="50%",originZ:m=0}=l;i.transformOrigin=`${d} ${h} ${m}`}}function Ow(e,{style:t,vars:n},i,s){const l=e.style;let a;for(a in t)l[a]=t[a];s?.applyProjectionStyles(l,i);for(a in n)l.setProperty(a,n[a])}function hy(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Zo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ke.test(e))e=parseFloat(e);else return e;const n=hy(e,t.target.x),i=hy(e,t.target.y);return`${n}% ${i}%`}},FT={correct:(e,{treeScale:t,projectionDelta:n})=>{const i=e,s=Vn.parse(e);if(s.length>5)return i;const l=Vn.createTransformer(e),a=typeof s[0]!="number"?1:0,c=n.x.scale*t.x,d=n.y.scale*t.y;s[0+a]/=c,s[1+a]/=d;const h=Je(c,d,.5);return typeof s[2+a]=="number"&&(s[2+a]/=h),typeof s[3+a]=="number"&&(s[3+a]/=h),l(s)}},Zf={borderRadius:{...Zo,applyTo:[...rh]},borderTopLeftRadius:Zo,borderTopRightRadius:Zo,borderBottomLeftRadius:Zo,borderBottomRightRadius:Zo,boxShadow:FT};function Fw(e,{layout:t,layoutId:n}){return uo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Zf[e]||e==="opacity")}function ch(e,t,n){const i=e.style,s=t?.style,l={};if(!i)return l;for(const a in i)(Vt(i[a])||s&&Vt(s[a])||Fw(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(l[a]=i[a]);return l}function zT(e){return window.getComputedStyle(e)}class VT extends jw{constructor(){super(...arguments),this.type="html",this.renderInstance=Ow}mount(t){$l(!!t.style),super.mount(t)}readValueFromInstance(t,n){if(uo.has(n))return this.projection?.isProjecting?Of(n):sE(t,n);{const i=zT(t),s=(Xx(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Lw(t,n)}build(t,n,i){uh(t,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,n,i){return ch(t,n,i)}}const BT={offset:"stroke-dashoffset",array:"stroke-dasharray"},$T={offset:"strokeDashoffset",array:"strokeDasharray"};function UT(e,t,n=1,i=0,s=!0){e.pathLength=1;const l=s?BT:$T;e[l.offset]=`${-i}`,e[l.array]=`${t} ${n}`}const WT=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function zw(e,{attrX:t,attrY:n,attrScale:i,pathLength:s,pathSpacing:l=1,pathOffset:a=0,...c},d,h,m){if(uh(e,c,h),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:y}=e;p.transform&&(y.transform=p.transform,delete p.transform),(y.transform||p.transformOrigin)&&(y.transformOrigin=p.transformOrigin??"50% 50%",delete p.transformOrigin),y.transform&&(y.transformBox=m?.transformBox??"fill-box",delete p.transformBox);for(const w of WT)p[w]!==void 0&&(y[w]=p[w],delete p[w]);t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),i!==void 0&&(p.scale=i),s!==void 0&&UT(p,s,l,a,!1)}const Vw=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Bw=e=>typeof e=="string"&&e.toLowerCase()==="svg";function HT(e,t,n,i){Ow(e,t,void 0,i);for(const s in t.attrs)e.setAttribute(Vw.has(s)?s:nh(s),t.attrs[s])}function $w(e,t,n){const i=ch(e,t,n);for(const s in e)if(Vt(e[s])||Vt(t[s])){const l=lo.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;i[l]=e[s]}return i}class KT extends jw{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Pt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(uo.has(n)){const i=Sw(n);return i&&i.default||0}return n=Vw.has(n)?n:nh(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,i){return $w(t,n,i)}build(t,n,i){zw(t,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,n,i,s){HT(t,n,i,s)}mount(t){this.isSVGTag=Bw(t.tagName),super.mount(t)}}const qT=lh.length;function Uw(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Uw(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<qT;n++){const i=lh[n],s=e.props[i];(vs(s)||s===!1)&&(t[i]=s)}return t}function Ww(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}const XT=[...ah].reverse(),YT=ah.length;function GT(e){return t=>Promise.all(t.map(({animation:n,options:i})=>qE(e,n,i)))}function QT(e){let t=GT(e),n=py(),i=!0,s=!1;const l=h=>(m,p)=>{const y=mi(e,p,h==="exit"?e.presenceContext?.custom:void 0);if(y){const{transition:w,transitionEnd:S,...E}=y;m={...m,...E,...S}}return m};function a(h){t=h(e)}function c(h){const{props:m}=e,p=Uw(e.parent)||{},y=[],w=new Set;let S={},E=1/0;for(let C=0;C<YT;C++){const R=XT[C],A=n[R],D=m[R]!==void 0?m[R]:p[R],B=vs(D),I=R===h?A.isActive:null;I===!1&&(E=C);let q=D===p[R]&&D!==m[R]&&B;if(q&&(i||s)&&e.manuallyAnimateOnMount&&(q=!1),A.protectedKeys={...S},!A.isActive&&I===null||!D&&!A.prevProp||Wl(D)||typeof D=="boolean")continue;if(R==="exit"&&A.isActive&&I!==!0){A.prevResolvedValues&&(S={...S,...A.prevResolvedValues});continue}const $=ZT(A.prevProp,D);let K=$||R===h&&A.isActive&&!q&&B||C>E&&B,j=!1;const Y=Array.isArray(D)?D:[D];let W=Y.reduce(l(R),{});I===!1&&(W={});const{prevResolvedValues:ue={}}=A,Z={...ue,...W},ee=X=>{K=!0,w.has(X)&&(j=!0,w.delete(X)),A.needsAnimating[X]=!0;const ce=e.getValue(X);ce&&(ce.liveStyle=!1)};for(const X in Z){const ce=W[X],P=ue[X];if(S.hasOwnProperty(X))continue;let L=!1;Uf(ce)&&Uf(P)?L=!Ww(ce,P)||$:L=ce!==P,L?ce!=null?ee(X):w.add(X):ce!==void 0&&w.has(X)?ee(X):A.protectedKeys[X]=!0}A.prevProp=D,A.prevResolvedValues=W,A.isActive&&(S={...S,...W}),(i||s)&&e.blockInitialAnimation&&(K=!1);const ge=q&&$;K&&(!ge||j)&&y.push(...Y.map(X=>{const ce={type:R};if(typeof X=="string"&&(i||s)&&!ge&&e.manuallyAnimateOnMount&&e.parent){const{parent:P}=e,L=mi(P,X);if(P.enteringChildren&&L){const{delayChildren:G}=L.transition||{};ce.delay=pw(P.enteringChildren,e,G)}}return{animation:X,options:ce}}))}if(w.size){const C={};if(typeof m.initial!="boolean"){const R=mi(e,Array.isArray(m.initial)?m.initial[0]:m.initial);R&&R.transition&&(C.transition=R.transition)}w.forEach(R=>{const A=e.getBaseTarget(R),D=e.getValue(R);D&&(D.liveStyle=!0),C[R]=A??null}),y.push({animation:C})}let T=!!y.length;return i&&(m.initial===!1||m.initial===m.animate)&&!e.manuallyAnimateOnMount&&(T=!1),i=!1,s=!1,T?t(y):Promise.resolve()}function d(h,m){if(n[h].isActive===m)return Promise.resolve();e.variantChildren?.forEach(y=>y.animationState?.setActive(h,m)),n[h].isActive=m;const p=c(h);for(const y in n)n[y].protectedKeys={};return p}return{animateChanges:c,setActive:d,setAnimateFunction:a,getState:()=>n,reset:()=>{n=py(),s=!0}}}function ZT(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Ww(t,e):!1}function oi(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function py(){return{animate:oi(!0),whileInView:oi(),whileHover:oi(),whileTap:oi(),whileDrag:oi(),whileFocus:oi(),exit:oi()}}function Jf(e,t){e.min=t.min,e.max=t.max}function Fn(e,t){Jf(e.x,t.x),Jf(e.y,t.y)}function my(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const Hw=1e-4,JT=1-Hw,eP=1+Hw,Kw=.01,tP=0-Kw,nP=0+Kw;function Jt(e){return e.max-e.min}function rP(e,t,n){return Math.abs(e-t)<=n}function gy(e,t,n,i=.5){e.origin=i,e.originPoint=Je(t.min,t.max,e.origin),e.scale=Jt(n)/Jt(t),e.translate=Je(n.min,n.max,e.origin)-e.originPoint,(e.scale>=JT&&e.scale<=eP||isNaN(e.scale))&&(e.scale=1),(e.translate>=tP&&e.translate<=nP||isNaN(e.translate))&&(e.translate=0)}function us(e,t,n,i){gy(e.x,t.x,n.x,i?i.originX:void 0),gy(e.y,t.y,n.y,i?i.originY:void 0)}function yy(e,t,n,i=0){const s=i?Je(n.min,n.max,i):n.min;e.min=s+t.min,e.max=e.min+Jt(t)}function iP(e,t,n,i){yy(e.x,t.x,n.x,i?.x),yy(e.y,t.y,n.y,i?.y)}function vy(e,t,n,i=0){const s=i?Je(n.min,n.max,i):n.min;e.min=t.min-s,e.max=e.min+Jt(t)}function Ml(e,t,n,i){vy(e.x,t.x,n.x,i?.x),vy(e.y,t.y,n.y,i?.y)}function xy(e,t,n,i,s){return e-=t,e=Al(e,1/n,i),s!==void 0&&(e=Al(e,1/s,i)),e}function oP(e,t=0,n=1,i=.5,s,l=e,a=e){if(Jn.test(t)&&(t=parseFloat(t),t=Je(a.min,a.max,t/100)-a.min),typeof t!="number")return;let c=Je(l.min,l.max,i);e===l&&(c-=t),e.min=xy(e.min,t,n,c,s),e.max=xy(e.max,t,n,c,s)}function wy(e,t,[n,i,s],l,a){oP(e,t[n],t[i],t[s],t.scale,l,a)}const sP=["x","scaleX","originX"],aP=["y","scaleY","originY"];function ky(e,t,n,i){wy(e.x,t,sP,n?n.x:void 0,i?i.x:void 0),wy(e.y,t,aP,n?n.y:void 0,i?i.y:void 0)}function Sy(e){return e.translate===0&&e.scale===1}function qw(e){return Sy(e.x)&&Sy(e.y)}function by(e,t){return e.min===t.min&&e.max===t.max}function lP(e,t){return by(e.x,t.x)&&by(e.y,t.y)}function Cy(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Xw(e,t){return Cy(e.x,t.x)&&Cy(e.y,t.y)}function Ey(e){return Jt(e.x)/Jt(e.y)}function Ty(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Yn(e){return[e("x"),e("y")]}function uP(e,t,n){let i="";const s=e.x.translate/t.x,l=e.y.translate/t.y,a=n?.z||0;if((s||l||a)&&(i=`translate3d(${s}px, ${l}px, ${a}px) `),(t.x!==1||t.y!==1)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:h,rotate:m,pathRotation:p,rotateX:y,rotateY:w,skewX:S,skewY:E}=n;h&&(i=`perspective(${h}px) ${i}`),m&&(i+=`rotate(${m}deg) `),p&&(i+=`rotate(${p}deg) `),y&&(i+=`rotateX(${y}deg) `),w&&(i+=`rotateY(${w}deg) `),S&&(i+=`skewX(${S}deg) `),E&&(i+=`skewY(${E}deg) `)}const c=e.x.scale*t.x,d=e.y.scale*t.y;return(c!==1||d!==1)&&(i+=`scale(${c}, ${d})`),i||"none"}const cP=rh.length,Py=e=>typeof e=="string"?parseFloat(e):e,Ry=e=>typeof e=="number"||ke.test(e);function fP(e,t,n,i,s,l){s?(e.opacity=Je(0,n.opacity??1,dP(i)),e.opacityExit=Je(t.opacity??1,0,hP(i))):l&&(e.opacity=Je(t.opacity??1,n.opacity??1,i));for(let a=0;a<cP;a++){const c=rh[a];let d=Ay(t,c),h=Ay(n,c);if(d===void 0&&h===void 0)continue;d||(d=0),h||(h=0),d===0||h===0||Ry(d)===Ry(h)?(e[c]=Math.max(Je(Py(d),Py(h),i),0),(Jn.test(h)||Jn.test(d))&&(e[c]+="%")):e[c]=h}(t.rotate||n.rotate)&&(e.rotate=Je(t.rotate||0,n.rotate||0,i))}function Ay(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const dP=Yw(0,.5,$x),hP=Yw(.5,.95,An);function Yw(e,t,n){return i=>i<e?0:i>t?1:n(gs(e,t,i))}function pP(e,t,n){const i=Vt(e)?e:ro(e);return i.start(eh("",i,t,n)),i.animation}function xs(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}const mP=(e,t)=>e.depth-t.depth;class gP{constructor(){this.children=[],this.isDirty=!1}add(t){Bd(this.children,t),this.isDirty=!0}remove(t){Sl(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(mP),this.isDirty=!1,this.children.forEach(t)}}function yP(e,t){const n=Zt.now(),i=({timestamp:s})=>{const l=s-n;l>=t&&(Br(i),e(l-t))};return et.setup(i,!0),()=>Br(i)}function ml(e){return Vt(e)?e.get():e}class vP{constructor(){this.members=[]}add(t){Bd(this.members,t);for(let n=this.members.length-1;n>=0;n--){const i=this.members[n];if(i===t||i===this.lead||i===this.prevLead)continue;const s=i.instance;(!s||s.isConnected===!1)&&!i.snapshot&&(Sl(this.members,i),i.unmount())}t.scheduleRender()}remove(t){if(Sl(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){for(let n=this.members.indexOf(t)-1;n>=0;n--){const i=this.members[n];if(i.isPresent!==!1&&i.instance?.isConnected!==!1)return this.promote(i),!0}return!1}promote(t,n){const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.updateSnapshot(),t.scheduleRender();const{layoutDependency:s}=i.options,{layoutDependency:l}=t.options;(s===void 0||s!==l)&&(t.resumeFrom=i,n&&(i.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const gl={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Gc=["","X","Y","Z"],xP=1e3;let wP=0;function Qc(e,t,n,i){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),i&&(i[e]=0))}function Gw(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=vw(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:l}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",et,!(s||l))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&Gw(i)}function Qw({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(a={},c=t?.()){this.id=wP++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(bP),this.nodes.forEach(AP),this.nodes.forEach(MP),this.nodes.forEach(CP)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0;for(let d=0;d<this.path.length;d++)this.path[d].shouldResetTransform=!0;this.root===this&&(this.nodes=new gP)}addEventListener(a,c){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new $d),this.eventHandlers.get(a).add(c)}notifyListeners(a,...c){const d=this.eventHandlers.get(a);d&&d.notify(...c)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=sh(a)&&!ST(a),this.instance=a;const{layoutId:c,layout:d,visualElement:h}=this.options;if(h&&!h.current&&h.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(d||c)&&(this.isLayoutDirty=!0),e){let m,p=0;const y=()=>this.root.updateBlockedByResize=!1;et.read(()=>{p=window.innerWidth}),e(a,()=>{const w=window.innerWidth;w!==p&&(p=w,this.root.updateBlockedByResize=!0,m&&m(),m=yP(y,250),gl.hasAnimatedSinceResize&&(gl.hasAnimatedSinceResize=!1,this.nodes.forEach(jy)))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&h&&(c||d)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:p,hasRelativeLayoutChanged:y,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const S=this.options.transition||h.getDefaultTransition()||_P,{onLayoutAnimationStart:E,onLayoutAnimationComplete:T}=h.getProps(),C=!this.targetLayout||!Xw(this.targetLayout,w),R=!p&&y;if(this.options.layoutRoot||this.resumeFrom||R||p&&(C||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const A={...Jd(S,"layout"),onPlay:E,onComplete:T};(h.shouldReduceMotion||this.options.layoutRoot)&&(A.delay=0,A.type=!1),this.startAnimation(A),this.setAnimationOrigin(m,R,A.path)}else p||jy(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Br(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(NP),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Gw(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let m=0;m<this.path.length;m++){const p=this.path[m];p.shouldResetTransform=!0,(typeof p.latestValues.x=="string"||typeof p.latestValues.y=="string")&&(p.isLayoutDirty=!0),p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:c,layout:d}=this.options;if(c===void 0&&!d)return;const h=this.getTransformTemplate();this.prevTransformTemplateValue=h?h(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const d=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),d&&this.nodes.forEach(TP),this.nodes.forEach(My);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Ny);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(PP),this.nodes.forEach(RP),this.nodes.forEach(kP),this.nodes.forEach(SP)):this.nodes.forEach(Ny),this.clearAllSnapshots();const c=Zt.now();zt.delta=er(0,1e3/60,c-zt.timestamp),zt.timestamp=c,zt.isProcessing=!0,$c.update.process(zt),$c.preRender.process(zt),$c.render.process(zt),zt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ih.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(EP),this.sharedNodes.forEach(jP)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,et.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){et.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Jt(this.snapshot.measuredBox.x)&&!Jt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let d=0;d<this.path.length;d++)this.path[d].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Pt()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:c}=this.options;c&&c.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let c=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(c=!1),c&&this.instance){const d=i(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:d,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:d}}}resetTransform(){if(!s)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,c=this.projectionDelta&&!qw(this.projectionDelta),d=this.getTransformTemplate(),h=d?d(this.latestValues,""):void 0,m=h!==this.prevTransformTemplateValue;a&&this.instance&&(c||li(this.latestValues)||m)&&(s(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const c=this.measurePageBox();let d=this.removeElementScroll(c);return a&&(d=this.removeTransform(d)),LP(d),{animationId:this.root.animationId,measuredBox:c,layoutBox:d,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return Pt();const c=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(OP))){const{scroll:h}=this.root;h&&(Qn(c.x,h.offset.x),Qn(c.y,h.offset.y))}return c}removeElementScroll(a){const c=Pt();if(Fn(c,a),this.scroll?.wasRoot)return c;for(let d=0;d<this.path.length;d++){const h=this.path[d],{scroll:m,options:p}=h;h!==this.root&&m&&p.layoutScroll&&(m.wasRoot&&Fn(c,a),Qn(c.x,m.offset.x),Qn(c.y,m.offset.y))}return c}applyTransform(a,c=!1,d){const h=d||Pt();Fn(h,a);for(let m=0;m<this.path.length;m++){const p=this.path[m];!c&&p.options.layoutScroll&&p.scroll&&p!==p.root&&(Qn(h.x,-p.scroll.offset.x),Qn(h.y,-p.scroll.offset.y)),li(p.latestValues)&&pl(h,p.latestValues,p.layout?.layoutBox)}return li(this.latestValues)&&pl(h,this.latestValues,this.layout?.layoutBox),h}removeTransform(a){const c=Pt();Fn(c,a);for(let d=0;d<this.path.length;d++){const h=this.path[d];if(!li(h.latestValues))continue;let m;h.instance&&(Gf(h.latestValues)&&h.updateSnapshot(),m=Pt(),Fn(m,h.measurePageBox())),ky(c,h.latestValues,h.snapshot?.layoutBox,m)}return li(this.latestValues)&&ky(c,this.latestValues),c}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==zt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const d=!!this.resumingFrom||this!==c;if(!(a||d&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:m,layoutId:p}=this.options;if(!this.layout||!(m||p))return;this.resolvedRelativeTargetAt=zt.timestamp;const y=this.getClosestProjectingParent();y&&this.linkedParentVersion!==y.layoutVersion&&!y.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&y&&y.layout?this.createRelativeTarget(y,this.layout.layoutBox,y.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Pt(),this.targetWithTransforms=Pt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),iP(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Fn(this.target,this.layout.layoutBox),_w(this.target,this.targetDelta)):Fn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&y&&!!y.resumingFrom==!!this.resumingFrom&&!y.options.layoutScroll&&y.target&&this.animationProgress!==1?this.createRelativeTarget(y,this.target,y.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Gf(this.parent.latestValues)||Dw(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,c,d){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Pt(),this.relativeTargetOrigin=Pt(),Ml(this.relativeTargetOrigin,c,d,this.options.layoutAnchor||void 0),Fn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const a=this.getLead(),c=!!this.resumingFrom||this!==a;let d=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(d=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===zt.timestamp&&(d=!1),d)return;const{layout:h,layoutId:m}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||m))return;Fn(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,y=this.treeScale.y;IT(this.layoutCorrected,this.treeScale,this.path,c),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Pt());const{target:w}=a;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(my(this.prevProjectionDelta.x,this.projectionDelta.x),my(this.prevProjectionDelta.y,this.projectionDelta.y)),us(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==y||!Ty(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ty(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.visualElement?.scheduleRender(),a){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=eo(),this.projectionDelta=eo(),this.projectionDeltaWithTransform=eo()}setAnimationOrigin(a,c=!1,d){const h=this.snapshot,m=h?h.latestValues:{},p={...this.latestValues},y=eo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const w=Pt(),S=h?h.source:void 0,E=this.layout?this.layout.source:void 0,T=S!==E,C=this.getStack(),R=!C||C.members.length<=1,A=!!(T&&!R&&this.options.crossfade===!0&&!this.path.some(DP));this.animationProgress=0;let D;const B=d?.interpolateProjection(a);this.mixTargetDelta=I=>{const q=I/1e3,$=B?.(q);$?(y.x.translate=$.x,y.x.scale=Je(a.x.scale,1,q),y.x.origin=a.x.origin,y.x.originPoint=a.x.originPoint,y.y.translate=$.y,y.y.scale=Je(a.y.scale,1,q),y.y.origin=a.y.origin,y.y.originPoint=a.y.originPoint):(Iy(y.x,a.x,q),Iy(y.y,a.y,q)),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ml(w,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),IP(this.relativeTarget,this.relativeTargetOrigin,w,q),D&&lP(this.relativeTarget,D)&&(this.isProjectionDirty=!1),D||(D=Pt()),Fn(D,this.relativeTarget)),T&&(this.animationValues=p,fP(p,m,this.latestValues,q,A,R)),$&&$.rotate!==void 0&&(this.animationValues||(this.animationValues=p),this.animationValues.pathRotation=$.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=q},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Br(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=et.update(()=>{gl.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ro(0)),this.motionValue.jump(0,!1),this.currentAnimation=pP(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),a.onUpdate&&a.onUpdate(c)},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(xP),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:c,target:d,layout:h,latestValues:m}=a;if(!(!c||!d||!h)){if(this!==a&&this.layout&&h&&Zw(this.options.animationType,this.layout.layoutBox,h.layoutBox)){d=this.target||Pt();const p=Jt(this.layout.layoutBox.x);d.x.min=a.target.x.min,d.x.max=d.x.min+p;const y=Jt(this.layout.layoutBox.y);d.y.min=a.target.y.min,d.y.max=d.y.min+y}Fn(c,d),pl(c,m),us(this.projectionDeltaWithTransform,this.layoutCorrected,c,m)}}registerSharedNode(a,c){this.sharedNodes.has(a)||this.sharedNodes.set(a,new vP),this.sharedNodes.get(a).add(c);const h=c.options.initialPromotionConfig;c.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(c):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){const{layoutId:a}=this.options;return a?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:a}=this.options;return a?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:c,preserveFollowOpacity:d}={}){const h=this.getStack();h&&h.promote(this,d),a&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let c=!1;const{latestValues:d}=a;if((d.z||d.rotate||d.rotateX||d.rotateY||d.rotateZ||d.skewX||d.skewY)&&(c=!0),!c)return;const h={};d.z&&Qc("z",a,h,this.animationValues);for(let m=0;m<Gc.length;m++)Qc(`rotate${Gc[m]}`,a,h,this.animationValues),Qc(`skew${Gc[m]}`,a,h,this.animationValues);a.render();for(const m in h)a.setStaticValue(m,h[m]),this.animationValues&&(this.animationValues[m]=h[m]);a.scheduleRender()}applyProjectionStyles(a,c){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const d=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=ml(c?.pointerEvents)||"",a.transform=d?d(this.latestValues,""):"none";return}const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=ml(c?.pointerEvents)||""),this.hasProjected&&!li(this.latestValues)&&(a.transform=d?d({},""):"none",this.hasProjected=!1);return}a.visibility="";const m=h.animationValues||h.latestValues;this.applyTransformsToTarget();let p=uP(this.projectionDeltaWithTransform,this.treeScale,m);d&&(p=d(m,p)),a.transform=p;const{x:y,y:w}=this.projectionDelta;a.transformOrigin=`${y.origin*100}% ${w.origin*100}% 0`,h.animationValues?a.opacity=h===this?m.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:a.opacity=h===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const S in Zf){if(m[S]===void 0)continue;const{correct:E,applyTo:T,isCSSVariable:C}=Zf[S],R=p==="none"?m[S]:E(m[S],h);if(T){const A=T.length;for(let D=0;D<A;D++)a[T[D]]=R}else C?this.options.visualElement.renderState.vars[S]=R:a[S]=R}this.options.layoutId&&(a.pointerEvents=h===this?ml(c?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(My),this.root.sharedNodes.clear()}}}function kP(e){e.updateLayout()}function SP(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=e.layout,{animationType:s}=e.options,l=t.source!==e.layout.source;if(s==="size")Yn(m=>{const p=l?t.measuredBox[m]:t.layoutBox[m],y=Jt(p);p.min=n[m].min,p.max=p.min+y});else if(s==="x"||s==="y"){const m=s==="x"?"y":"x";Jf(l?t.measuredBox[m]:t.layoutBox[m],n[m])}else Zw(s,t.layoutBox,n)&&Yn(m=>{const p=l?t.measuredBox[m]:t.layoutBox[m],y=Jt(n[m]);p.max=p.min+y,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[m].max=e.relativeTarget[m].min+y)});const a=eo();us(a,n,t.layoutBox);const c=eo();l?us(c,e.applyTransform(i,!0),t.measuredBox):us(c,n,t.layoutBox);const d=!qw(a);let h=!1;if(!e.resumeFrom){const m=e.getClosestProjectingParent();if(m&&!m.resumeFrom){const{snapshot:p,layout:y}=m;if(p&&y){const w=e.options.layoutAnchor||void 0,S=Pt();Ml(S,t.layoutBox,p.layoutBox,w);const E=Pt();Ml(E,n,y.layoutBox,w),Xw(S,E)||(h=!0),m.options.layoutRoot&&(e.relativeTarget=E,e.relativeTargetOrigin=S,e.relativeParent=m)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:c,layoutDelta:a,hasLayoutChanged:d,hasRelativeLayoutChanged:h})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function bP(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function CP(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function EP(e){e.clearSnapshot()}function My(e){e.clearMeasurements()}function TP(e){e.isLayoutDirty=!0,e.updateLayout()}function Ny(e){e.isLayoutDirty=!1}function PP(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function RP(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function jy(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function AP(e){e.resolveTargetDelta()}function MP(e){e.calcProjection()}function NP(e){e.resetSkewAndRotation()}function jP(e){e.removeLeadSnapshot()}function Iy(e,t,n){e.translate=Je(t.translate,0,n),e.scale=Je(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Dy(e,t,n,i){e.min=Je(t.min,n.min,i),e.max=Je(t.max,n.max,i)}function IP(e,t,n,i){Dy(e.x,t.x,n.x,i),Dy(e.y,t.y,n.y,i)}function DP(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const _P={duration:.45,ease:[.4,0,.1,1]},_y=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ly=_y("applewebkit/")&&!_y("chrome/")?Math.round:An;function Oy(e){e.min=Ly(e.min),e.max=Ly(e.max)}function LP(e){Oy(e.x),Oy(e.y)}function Zw(e,t,n){return e==="position"||e==="preserve-aspect"&&!rP(Ey(t),Ey(n),.2)}function OP(e){return e!==e.root&&e.scroll?.wasRoot}const FP=Qw({attachResizeListener:(e,t)=>xs(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Zc={current:void 0},Jw=Qw({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Zc.current){const e=new FP({});e.mount(window),e.setOptions({layoutScroll:!0}),Zc.current=e}return Zc.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),ws=k.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Fy(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function zP(...e){return t=>{let n=!1;const i=e.map(s=>{const l=Fy(s,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let s=0;s<i.length;s++){const l=i[s];typeof l=="function"?l():Fy(e[s],null)}}}}function VP(...e){return k.useCallback(zP(...e),e)}class BP extends k.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(ul(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const i=n.offsetParent,s=ul(i)&&i.offsetWidth||0,l=ul(i)&&i.offsetHeight||0,a=getComputedStyle(n),c=this.props.sizeRef.current;c.height=parseFloat(a.height),c.width=parseFloat(a.width),c.top=n.offsetTop,c.left=n.offsetLeft,c.right=s-c.width-c.left,c.bottom=l-c.height-c.top,c.direction=a.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function $P({children:e,isPresent:t,anchorX:n,anchorY:i,root:s,pop:l}){const a=k.useId(),c=k.useRef(null),d=k.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:h}=k.useContext(ws),m=l!==!1?e.props?.ref??e?.ref:void 0,p=VP(c,m);return k.useInsertionEffect(()=>{const{width:y,height:w,top:S,left:E,right:T,bottom:C,direction:R}=d.current;if(t||l===!1||!c.current||!y||!w)return;const A=R==="rtl",D=n==="left"?A?`right: ${T}`:`left: ${E}`:A?`left: ${E}`:`right: ${T}`,B=i==="bottom"?`bottom: ${C}`:`top: ${S}`;c.current.dataset.motionPopId=a;const I=document.createElement("style");h&&(I.nonce=h);const q=s??document.head;return q.appendChild(I),I.sheet&&I.sheet.insertRule(`
|
|
41
|
-
[data-motion-pop-id="${a}"] {
|
|
42
|
-
position: absolute !important;
|
|
43
|
-
width: ${y}px !important;
|
|
44
|
-
height: ${w}px !important;
|
|
45
|
-
${D}px !important;
|
|
46
|
-
${B}px !important;
|
|
47
|
-
}
|
|
48
|
-
`),()=>{c.current?.removeAttribute("data-motion-pop-id"),q.contains(I)&&q.removeChild(I)}},[t]),v.jsx(BP,{isPresent:t,childRef:c,sizeRef:d,pop:l,children:l===!1?e:k.cloneElement(e,{ref:p})})}const UP=({children:e,initial:t,isPresent:n,onExitComplete:i,custom:s,presenceAffectsLayout:l,mode:a,anchorX:c,anchorY:d,root:h})=>{const m=Vl(WP),p=k.useId(),y=k.useRef(n),w=k.useRef(i);Vd(()=>{y.current=n,w.current=i});let S=!0,E=k.useMemo(()=>(S=!1,{id:p,initial:t,isPresent:n,custom:s,onExitComplete:T=>{m.set(T,!0);for(const C of m.values())if(!C)return;i&&i()},register:T=>(m.set(T,!1),()=>{m.delete(T),!y.current&&!m.size&&w.current?.()})}),[n,m,i]);return l&&S&&(E={...E}),k.useMemo(()=>{m.forEach((T,C)=>m.set(C,!1))},[n]),k.useEffect(()=>{!n&&!m.size&&i&&i()},[n]),e=v.jsx($P,{pop:a==="popLayout",isPresent:n,anchorX:c,anchorY:d,root:h,children:e}),v.jsx(Bl.Provider,{value:E,children:e})};function WP(){return new Map}function e0(e=!0){const t=k.useContext(Bl);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:s}=t,l=k.useId();k.useEffect(()=>{if(e)return s(l)},[e]);const a=k.useCallback(()=>e&&i&&i(l),[l,i,e]);return!n&&i?[!1,a]:[!0]}const Ya=e=>e.key||"";function zy(e){const t=[];return k.Children.forEach(e,n=>{k.isValidElement(n)&&t.push(n)}),t}const HP=({children:e,custom:t,initial:n=!0,onExitComplete:i,presenceAffectsLayout:s=!0,mode:l="sync",propagate:a=!1,anchorX:c="left",anchorY:d="top",root:h})=>{const[m,p]=e0(a),y=k.useMemo(()=>zy(e),[e]),w=a&&!m?[]:y.map(Ya),S=k.useRef(!0),E=k.useRef(y),T=Vl(()=>new Map),C=k.useRef(new Set),[R,A]=k.useState(y),[D,B]=k.useState(y);Vd(()=>{S.current=!1,E.current=y;for(let $=0;$<D.length;$++){const K=Ya(D[$]);w.includes(K)?(T.delete(K),C.current.delete(K)):T.get(K)!==!0&&T.set(K,!1)}},[D,w.length,w.join("-")]);const I=[];if(y!==R){let $=[...y];for(let K=0;K<D.length;K++){const j=D[K],Y=Ya(j);w.includes(Y)||($.splice(K,0,j),I.push(j))}return l==="wait"&&I.length&&($=I),B(zy($)),A(y),null}const{forceRender:q}=k.useContext(zd);return v.jsx(v.Fragment,{children:D.map($=>{const K=Ya($),j=a&&!m?!1:y===D||w.includes(K),Y=()=>{if(C.current.has(K))return;if(T.has(K))C.current.add(K),T.set(K,!0);else return;let W=!0;T.forEach(ue=>{ue||(W=!1)}),W&&(q?.(),B(E.current),a&&p?.(),i&&i())};return v.jsx(UP,{isPresent:j,initial:!S.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:l,root:h,onExitComplete:j?void 0:Y,anchorX:c,anchorY:d,children:$},K)})})},t0=k.createContext({strict:!1}),Vy={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let By=!1;function KP(){if(By)return;const e={};for(const t in Vy)e[t]={isEnabled:n=>Vy[t].some(i=>!!n[i])};Nw(e),By=!0}function n0(){return KP(),AT()}function qP(e){const t=n0();for(const n in e)t[n]={...t[n],...e[n]};Nw(t)}const XP=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Nl(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||XP.has(e)}let r0=e=>!Nl(e);function i0(e){typeof e=="function"&&(r0=t=>t.startsWith("on")?!Nl(t):e(t))}try{i0(require("@emotion/is-prop-valid").default)}catch{}function YP(e,t,n){const i={};for(const s in e)s==="values"&&typeof e.values=="object"||Vt(e[s])||(r0(s)||n===!0&&Nl(s)||!t&&!Nl(s)||e.draggable&&s.startsWith("onDrag"))&&(i[s]=e[s]);return i}function GP({children:e,isValidProp:t,...n}){t&&i0(t);const i=k.useContext(ws);n={...i,...n},n.transition=Zd(n.transition,i.transition),n.isStatic=Vl(()=>n.isStatic);const s=k.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion,n.skipAnimations]);return v.jsx(ws.Provider,{value:s,children:e})}const Kl=k.createContext({});function QP(e,t){if(Hl(e)){const{initial:n,animate:i}=e;return{initial:n===!1||vs(n)?n:void 0,animate:vs(i)?i:void 0}}return e.inherit!==!1?t:{}}function ZP(e){const{initial:t,animate:n}=QP(e,k.useContext(Kl));return k.useMemo(()=>({initial:t,animate:n}),[$y(t),$y(n)])}function $y(e){return Array.isArray(e)?e.join(" "):e}const fh=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function o0(e,t,n){for(const i in t)!Vt(t[i])&&!Fw(i,n)&&(e[i]=t[i])}function JP({transformTemplate:e},t){return k.useMemo(()=>{const n=fh();return uh(n,t,e),Object.assign({},n.vars,n.style)},[t])}function eR(e,t){const n=e.style||{},i={};return o0(i,n,e),Object.assign(i,JP(e,t)),i}function tR(e,t){const n={},i=eR(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=i,n}const s0=()=>({...fh(),attrs:{}});function nR(e,t,n,i){const s=k.useMemo(()=>{const l=s0();return zw(l,t,Bw(i),e.transformTemplate,e.style),{...l.attrs,style:{...l.style}}},[t]);if(e.style){const l={};o0(l,e.style,e),s.style={...l,...s.style}}return s}const rR=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function dh(e){return typeof e!="string"||e.includes("-")?!1:!!(rR.indexOf(e)>-1||/[A-Z]/u.test(e))}function iR(e,t,n,{latestValues:i},s,l=!1,a){const d=(a??dh(e)?nR:tR)(t,i,s,e),h=YP(t,typeof e=="string",l),m=e!==k.Fragment?{...h,...d,ref:n}:{},{children:p}=t,y=k.useMemo(()=>Vt(p)?p.get():p,[p]);return k.createElement(e,{...m,children:y})}function oR({scrapeMotionValuesFromProps:e,createRenderState:t},n,i,s){return{latestValues:sR(n,i,s,e),renderState:t()}}function sR(e,t,n,i){const s={},l=i(e,{});for(const y in l)s[y]=ml(l[y]);let{initial:a,animate:c}=e;const d=Hl(e),h=Aw(e);t&&h&&!d&&e.inherit!==!1&&(a===void 0&&(a=t.initial),c===void 0&&(c=t.animate));let m=n?n.initial===!1:!1;m=m||a===!1;const p=m?c:a;if(p&&typeof p!="boolean"&&!Wl(p)){const y=Array.isArray(p)?p:[p];for(let w=0;w<y.length;w++){const S=th(e,y[w]);if(S){const{transitionEnd:E,transition:T,...C}=S;for(const R in C){let A=C[R];if(Array.isArray(A)){const D=m?A.length-1:0;A=A[D]}A!==null&&(s[R]=A)}for(const R in E)s[R]=E[R]}}}return s}const a0=e=>(t,n)=>{const i=k.useContext(Kl),s=k.useContext(Bl),l=()=>oR(e,t,i,s);return n?l():Vl(l)},aR=a0({scrapeMotionValuesFromProps:ch,createRenderState:fh}),lR=a0({scrapeMotionValuesFromProps:$w,createRenderState:s0}),uR=Symbol.for("motionComponentSymbol");function cR(e,t,n){const i=k.useRef(n);k.useInsertionEffect(()=>{i.current=n});const s=k.useRef(null);return k.useCallback(l=>{l&&e.onMount?.(l),t&&(l?t.mount(l):t.unmount());const a=i.current;if(typeof a=="function")if(l){const c=a(l);typeof c=="function"&&(s.current=c)}else s.current?(s.current(),s.current=null):a(l);else a&&(a.current=l)},[t])}const l0=k.createContext({});function Yi(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function fR(e,t,n,i,s,l){const{visualElement:a}=k.useContext(Kl),c=k.useContext(t0),d=k.useContext(Bl),h=k.useContext(ws),m=h.reducedMotion,p=h.skipAnimations,y=k.useRef(null),w=k.useRef(!1);i=i||c.renderer,!y.current&&i&&(y.current=i(e,{visualState:t,parent:a,props:n,presenceContext:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:m,skipAnimations:p,isSVG:l}),w.current&&y.current&&(y.current.manuallyAnimateOnMount=!0));const S=y.current,E=k.useContext(l0);S&&!S.projection&&s&&(S.type==="html"||S.type==="svg")&&dR(y.current,n,s,E);const T=k.useRef(!1);k.useInsertionEffect(()=>{S&&T.current&&S.update(n,d)});const C=n[yw],R=k.useRef(!!C&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(C)&&window.MotionHasOptimisedAnimation?.(C));return Vd(()=>{w.current=!0,S&&(T.current=!0,window.MotionIsMounted=!0,S.updateFeatures(),S.scheduleRenderMicrotask(),R.current&&S.animationState&&S.animationState.animateChanges())}),k.useEffect(()=>{S&&(!R.current&&S.animationState&&S.animationState.animateChanges(),R.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(C)}),R.current=!1),S.enteringChildren=void 0)}),S}function dR(e,t,n,i){const{layoutId:s,layout:l,drag:a,dragConstraints:c,layoutScroll:d,layoutRoot:h,layoutAnchor:m,layoutCrossfade:p}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:u0(e.parent)),e.projection.setOptions({layoutId:s,layout:l,alwaysMeasureLayout:!!a||c&&Yi(c),visualElement:e,animationType:typeof l=="string"?l:"both",initialPromotionConfig:i,crossfade:p,layoutScroll:d,layoutRoot:h,layoutAnchor:m})}function u0(e){if(e)return e.options.allowProjection!==!1?e.projection:u0(e.parent)}function Jc(e,{forwardMotionProps:t=!1,type:n}={},i,s){i&&qP(i);const l=n?n==="svg":dh(e),a=l?lR:aR;function c(h,m){let p;const y={...k.useContext(ws),...h,layoutId:hR(h)},{isStatic:w}=y,S=ZP(h),E=a(h,w);if(!w&&typeof window<"u"){pR();const T=mR(y);p=T.MeasureLayout,S.visualElement=fR(e,E,y,s,T.ProjectionNode,l)}return v.jsxs(Kl.Provider,{value:S,children:[p&&S.visualElement?v.jsx(p,{visualElement:S.visualElement,...y}):null,iR(e,h,cR(E,S.visualElement,m),E,w,t,l)]})}c.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const d=k.forwardRef(c);return d[uR]=e,d}function hR({layoutId:e}){const t=k.useContext(zd).id;return t&&e!==void 0?t+"-"+e:e}function pR(e,t){k.useContext(t0).strict}function mR(e){const t=n0(),{drag:n,layout:i}=t;if(!n&&!i)return{};const s={...n,...i};return{MeasureLayout:n?.isEnabled(e)||i?.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function gR(e,t){if(typeof Proxy>"u")return Jc;const n=new Map,i=(l,a)=>Jc(l,a,e,t),s=(l,a)=>i(l,a);return new Proxy(s,{get:(l,a)=>a==="create"?i:(n.has(a)||n.set(a,Jc(a,void 0,e,t)),n.get(a))})}const yR=(e,t)=>t.isSVG??dh(e)?new KT(t):new VT(t,{allowProjection:e!==k.Fragment});class vR extends Wr{constructor(t){super(t),t.animationState||(t.animationState=QT(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Wl(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let xR=0;class wR extends Wr{constructor(){super(...arguments),this.id=xR++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;if(t&&i===!1){if(this.isExitComplete){const{initial:l,custom:a}=this.node.getProps();if(typeof l=="string"||typeof l=="object"&&l!==null&&!Array.isArray(l)){const c=mi(this.node,l,a);if(c){const{transition:d,transitionEnd:h,...m}=c;for(const p in m)this.node.getValue(p)?.jump(m[p])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const kR={animation:{Feature:vR},exit:{Feature:wR}};function Is(e){return{point:{x:e.pageX,y:e.pageY}}}const SR=e=>t=>oh(t)&&e(t,Is(t));function cs(e,t,n,i){return xs(e,t,SR(n),i)}const c0=({current:e})=>e?e.ownerDocument.defaultView:null,Uy=(e,t)=>Math.abs(e-t);function bR(e,t){const n=Uy(e.x,t.x),i=Uy(e.y,t.y);return Math.sqrt(n**2+i**2)}const Wy=new Set(["auto","scroll"]);class f0{constructor(t,n,{transformPagePoint:i,contextWindow:s=window,dragSnapToOrigin:l=!1,distanceThreshold:a=3,element:c}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=S=>{this.handleScroll(S.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Ga(this.lastRawMoveEventInfo,this.transformPagePoint));const S=ef(this.lastMoveEventInfo,this.history),E=this.startEvent!==null,T=bR(S.offset,{x:0,y:0})>=this.distanceThreshold;if(!E&&!T)return;const{point:C}=S,{timestamp:R}=zt;this.history.push({...C,timestamp:R});const{onStart:A,onMove:D}=this.handlers;E||(A&&A(this.lastMoveEvent,S),this.startEvent=this.lastMoveEvent),D&&D(this.lastMoveEvent,S)},this.handlePointerMove=(S,E)=>{this.lastMoveEvent=S,this.lastRawMoveEventInfo=E,this.lastMoveEventInfo=Ga(E,this.transformPagePoint),et.update(this.updatePoint,!0)},this.handlePointerUp=(S,E)=>{this.end();const{onEnd:T,onSessionEnd:C,resumeAnimation:R}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&R&&R(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const A=ef(S.type==="pointercancel"?this.lastMoveEventInfo:Ga(E,this.transformPagePoint),this.history);this.startEvent&&T&&T(S,A),C&&C(S,A)},!oh(t))return;this.dragSnapToOrigin=l,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=a,this.contextWindow=s||window;const d=Is(t),h=Ga(d,this.transformPagePoint),{point:m}=h,{timestamp:p}=zt;this.history=[{...m,timestamp:p}];const{onSessionStart:y}=n;y&&y(t,ef(h,this.history));const w={passive:!0,capture:!0};this.removeListeners=Ms(cs(this.contextWindow,"pointermove",this.handlePointerMove,w),cs(this.contextWindow,"pointerup",this.handlePointerUp,w),cs(this.contextWindow,"pointercancel",this.handlePointerUp,w)),c&&this.startScrollTracking(c)}startScrollTracking(t){let n=t.parentElement;for(;n;){const i=getComputedStyle(n);(Wy.has(i.overflowX)||Wy.has(i.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const i=t===window,s=i?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},l={x:s.x-n.x,y:s.y-n.y};l.x===0&&l.y===0||(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=l.x,this.lastMoveEventInfo.point.y+=l.y):this.history.length>0&&(this.history[0].x-=l.x,this.history[0].y-=l.y),this.scrollPositions.set(t,s),et.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Br(this.updatePoint)}}function Ga(e,t){return t?{point:t(e.point)}:e}function Hy(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ef({point:e},t){return{point:e,delta:Hy(e,d0(t)),offset:Hy(e,CR(t)),velocity:ER(t,.1)}}function CR(e){return e[0]}function d0(e){return e[e.length-1]}function ER(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const s=d0(e);for(;n>=0&&(i=e[n],!(s.timestamp-i.timestamp>vn(t)));)n--;if(!i)return{x:0,y:0};i===e[0]&&e.length>2&&s.timestamp-i.timestamp>vn(t)*2&&(i=e[1]);const l=Rn(s.timestamp-i.timestamp);if(l===0)return{x:0,y:0};const a={x:(s.x-i.x)/l,y:(s.y-i.y)/l};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function TR(e,{min:t,max:n},i){return t!==void 0&&e<t?e=i?Je(t,e,i.min):Math.max(e,t):n!==void 0&&e>n&&(e=i?Je(n,e,i.max):Math.min(e,n)),e}function Ky(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function PR(e,{top:t,left:n,bottom:i,right:s}){return{x:Ky(e.x,n,s),y:Ky(e.y,t,i)}}function qy(e,t){let n=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,i]=[i,n]),{min:n,max:i}}function RR(e,t){return{x:qy(e.x,t.x),y:qy(e.y,t.y)}}function AR(e,t){let n=.5;const i=Jt(e),s=Jt(t);return s>i?n=gs(t.min,t.max-i,e.min):i>s&&(n=gs(e.min,e.max-s,t.min)),er(0,1,n)}function MR(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const ed=.35;function NR(e=ed){return e===!1?e=0:e===!0&&(e=ed),{x:Xy(e,"left","right"),y:Xy(e,"top","bottom")}}function Xy(e,t,n){return{min:Yy(e,t),max:Yy(e,n)}}function Yy(e,t){return typeof e=="number"?e:e[t]||0}const jR=new WeakMap;class IR{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Pt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:i}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const l=p=>{n&&this.snapToCursor(Is(p).point),this.stopAnimation()},a=(p,y)=>{const{drag:w,dragPropagation:S,onDragStart:E}=this.getProps();if(w&&!S&&(this.openDragLock&&this.openDragLock(),this.openDragLock=oT(w),!this.openDragLock))return;this.latestPointerEvent=p,this.latestPanInfo=y,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Yn(C=>{let R=this.getAxisMotionValue(C).get()||0;if(Jn.test(R)){const{projection:A}=this.visualElement;if(A&&A.layout){const D=A.layout.layoutBox[C];D&&(R=Jt(D)*(parseFloat(R)/100))}}this.originPoint[C]=R}),E&&et.update(()=>E(p,y),!1,!0),Wf(this.visualElement,"transform");const{animationState:T}=this.visualElement;T&&T.setActive("whileDrag",!0)},c=(p,y)=>{this.latestPointerEvent=p,this.latestPanInfo=y;const{dragPropagation:w,dragDirectionLock:S,onDirectionLock:E,onDrag:T}=this.getProps();if(!w&&!this.openDragLock)return;const{offset:C}=y;if(S&&this.currentDirection===null){this.currentDirection=_R(C),this.currentDirection!==null&&E&&E(this.currentDirection);return}this.updateAxis("x",y.point,C),this.updateAxis("y",y.point,C),this.visualElement.render(),T&&et.update(()=>T(p,y),!1,!0)},d=(p,y)=>{this.latestPointerEvent=p,this.latestPanInfo=y,this.stop(p,y),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>{const{dragSnapToOrigin:p}=this.getProps();(p||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:m}=this.getProps();this.panSession=new f0(t,{onSessionStart:l,onStart:a,onMove:c,onSessionEnd:d,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:i,contextWindow:c0(this.visualElement),element:this.visualElement.current})}stop(t,n){const i=t||this.latestPointerEvent,s=n||this.latestPanInfo,l=this.isDragging;if(this.cancel(),!l||!s||!i)return;const{velocity:a}=s;this.startAnimation(a);const{onDragEnd:c}=this.getProps();c&&et.postRender(()=>c(i,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,i){const{drag:s}=this.getProps();if(!i||!Qa(t,s,this.currentDirection))return;const l=this.getAxisMotionValue(t);let a=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(a=TR(a,this.constraints[t],this.elastic[t])),l.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,s=this.constraints;t&&Yi(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=PR(i.layoutBox,t):this.constraints=!1,this.elastic=NR(n),s!==this.constraints&&!Yi(t)&&i&&this.constraints&&!this.hasMutatedConstraints&&Yn(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=MR(i.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Yi(t))return!1;const i=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;s.root&&(s.root.scroll=void 0,s.root.updateScroll());const l=DT(i,s.root,this.visualElement.getTransformPagePoint());let a=RR(s.layout.layoutBox,l);if(n){const c=n(NT(a));this.hasMutatedConstraints=!!c,c&&(a=Iw(c))}return a}startAnimation(t){const{drag:n,dragMomentum:i,dragElastic:s,dragTransition:l,dragSnapToOrigin:a,onDragTransitionEnd:c}=this.getProps(),d=this.constraints||{},h=Yn(m=>{if(!Qa(m,n,this.currentDirection))return;let p=d&&d[m]||{};(a===!0||a===m)&&(p={min:0,max:0});const y=s?200:1e6,w=s?40:1e7,S={type:"inertia",velocity:i?t[m]:0,bounceStiffness:y,bounceDamping:w,timeConstant:750,restDelta:1,restSpeed:10,...l,...p};return this.startAxisValueAnimation(m,S)});return Promise.all(h).then(c)}startAxisValueAnimation(t,n){const i=this.getAxisMotionValue(t);return Wf(this.visualElement,t),i.start(eh(t,i,0,n,this.visualElement,!1))}stopAnimation(){Yn(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps()[n];return s||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor(t){Yn(n=>{const{drag:i}=this.getProps();if(!Qa(n,i,this.currentDirection))return;const{projection:s}=this.visualElement,l=this.getAxisMotionValue(n);if(s&&s.layout){const{min:a,max:c}=s.layout.layoutBox[n],d=l.get()||0;l.set(t[n]-Je(a,c,.5)+d)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!Yi(n)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Yn(a=>{const c=this.getAxisMotionValue(a);if(c&&this.constraints!==!1){const d=c.get();s[a]=AR({min:d,max:d},this.constraints[a])}});const{transformTemplate:l}=this.visualElement.getProps();this.visualElement.current.style.transform=l?l({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),Yn(a=>{if(!Qa(a,t,null))return;const c=this.getAxisMotionValue(a),{min:d,max:h}=this.constraints[a];c.set(Je(d,h,s[a]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;jR.set(this.visualElement,this);const t=this.visualElement.current,n=cs(t,"pointerdown",h=>{const{drag:m,dragListener:p=!0}=this.getProps(),y=h.target,w=y!==t&&fT(y);m&&p&&!w&&this.start(h)});let i;const s=()=>{const{dragConstraints:h}=this.getProps();Yi(h)&&h.current&&(this.constraints=this.resolveRefConstraints(),i||(i=DR(t,h.current,()=>this.scalePositionWithinConstraints())))},{projection:l}=this.visualElement,a=l.addEventListener("measure",s);l&&!l.layout&&(l.root&&l.root.updateScroll(),l.updateLayout()),et.read(s);const c=xs(window,"resize",()=>this.scalePositionWithinConstraints()),d=l.addEventListener("didUpdate",({delta:h,hasLayoutChanged:m})=>{this.isDragging&&m&&(Yn(p=>{const y=this.getAxisMotionValue(p);y&&(this.originPoint[p]+=h[p].translate,y.set(y.get()+h[p].translate))}),this.visualElement.render())});return()=>{c(),n(),a(),d&&d(),i&&i()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:s=!1,dragConstraints:l=!1,dragElastic:a=ed,dragMomentum:c=!0}=t;return{...t,drag:n,dragDirectionLock:i,dragPropagation:s,dragConstraints:l,dragElastic:a,dragMomentum:c}}}function Gy(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function DR(e,t,n){const i=ry(e,Gy(n)),s=ry(t,Gy(n));return()=>{i(),s()}}function Qa(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function _R(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class LR extends Wr{constructor(t){super(t),this.removeGroupControls=An,this.removeListeners=An,this.controls=new IR(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||An}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const tf=e=>(t,n)=>{e&&et.update(()=>e(t,n),!1,!0)};class OR extends Wr{constructor(){super(...arguments),this.removePointerDownListener=An}onPointerDown(t){this.session=new f0(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:c0(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:i,onPanEnd:s}=this.node.getProps();return{onSessionStart:tf(t),onStart:tf(n),onMove:tf(i),onEnd:(l,a)=>{delete this.session,s&&et.postRender(()=>s(l,a))}}}mount(){this.removePointerDownListener=cs(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let nf=!1;class FR extends k.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i,layoutId:s}=this.props,{projection:l}=t;l&&(n.group&&n.group.add(l),i&&i.register&&s&&i.register(l),nf&&l.root.didUpdate(),l.addEventListener("animationComplete",()=>{this.safeToRemove()}),l.setOptions({...l.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),gl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:i,drag:s,isPresent:l}=this.props,{projection:a}=i;return a&&(a.isPresent=l,t.layoutDependency!==n&&a.setOptions({...a.options,layoutDependency:n}),nf=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==l?a.willUpdate():this.safeToRemove(),t.isPresent!==l&&(l?a.promote():a.relegate()||et.postRender(()=>{const c=a.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:i}=t;i&&(i.options.layoutAnchor=n,i.root.didUpdate(),ih.postRender(()=>{!i.currentAnimation&&i.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:s}=t;nf=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),i&&i.deregister&&i.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function h0(e){const[t,n]=e0(),i=k.useContext(zd);return v.jsx(FR,{...e,layoutGroup:i,switchLayoutGroup:k.useContext(l0),isPresent:t,safeToRemove:n})}const zR={pan:{Feature:OR},drag:{Feature:LR,ProjectionNode:Jw,MeasureLayout:h0}};function Qy(e,t,n){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,l=i[s];l&&et.postRender(()=>l(t,Is(t)))}class VR extends Wr{mount(){const{current:t}=this.node;t&&(this.unmount=aT(t,(n,i)=>(Qy(this.node,i,"Start"),s=>Qy(this.node,s,"End"))))}unmount(){}}class BR extends Wr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ms(xs(this.node.current,"focus",()=>this.onFocus()),xs(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Zy(e,t,n){const{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),l=i[s];l&&et.postRender(()=>l(t,Is(t)))}class $R extends Wr{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:i}=this.node.props;this.unmount=hT(t,(s,l)=>(Zy(this.node,l,"Start"),(a,{success:c})=>Zy(this.node,a,c?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:i?.tap===!1})}unmount(){}}const td=new WeakMap,rf=new WeakMap,UR=e=>{const t=td.get(e.target);t&&t(e)},WR=e=>{e.forEach(UR)};function HR({root:e,...t}){const n=e||document;rf.has(n)||rf.set(n,{});const i=rf.get(n),s=JSON.stringify(t);return i[s]||(i[s]=new IntersectionObserver(WR,{root:e,...t})),i[s]}function KR(e,t,n){const i=HR(t);return td.set(e,n),i.observe(e),()=>{td.delete(e),i.unobserve(e)}}const qR={some:0,all:1};class XR extends Wr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:t={}}=this.node.getProps(),{root:n,margin:i,amount:s="some",once:l}=t,a={root:n?n.current:void 0,rootMargin:i,threshold:typeof s=="number"?s:qR[s]},c=d=>{const{isIntersecting:h}=d;if(this.isInView===h||(this.isInView=h,l&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:m,onViewportLeave:p}=this.node.getProps(),y=h?m:p;y&&y(d)};this.stopObserver=KR(this.node.current,a,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(YR(t,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function YR({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const GR={inView:{Feature:XR},tap:{Feature:$R},focus:{Feature:BR},hover:{Feature:VR}},QR={layout:{ProjectionNode:Jw,MeasureLayout:h0}},ZR={...kR,...GR,...zR,...QR},fs=gR(ZR,yR);class nd extends Error{constructor(t,n){super(n),this.status=t}}function JR(e){let t="";for(let i=0;i<e.length;i+=32768)t+=String.fromCharCode(...e.subarray(i,i+32768));return btoa(t)}function eA(e=globalThis.fetch.bind(globalThis)){async function t(n,i){const s=(i?.method??"GET").toUpperCase(),a=await e(n,{...i,cache:"no-store",credentials:"same-origin",headers:s!=="GET"&&s!=="HEAD"?{"content-type":"application/json","X-Ours-Messenger-CSRF":"1",...i?.headers}:i?.headers}),c=await a.text();let d=null;if(c)try{d=JSON.parse(c)}catch{throw new nd(a.status,a.ok?"Server returned an invalid response":`HTTP ${a.status}`)}if(!a.ok){const h=d&&typeof d=="object"&&"error"in d&&d.error&&typeof d.error=="object"&&"message"in d.error&&typeof d.error.message=="string"?d.error.message:`HTTP ${a.status}`;throw new nd(a.status,h)}return d}return{identity:()=>t("/api/identity"),setBio:n=>t("/api/identity/bio",{method:"POST",body:JSON.stringify({bio:n})}),buildInfo:()=>t("/api/build-info"),identities:()=>t("/api/identities"),contacts:()=>t("/api/contacts"),invites:()=>t("/api/invites"),conversation:(n,i,s)=>t(`/api/conversations/${encodeURIComponent(n)}/page?limit=50${i?`&before=${encodeURIComponent(i)}`:""}`,{signal:s}),markRead:n=>t(`/api/conversations/${encodeURIComponent(n)}/read`,{method:"POST"}),send:(n,i,s,l)=>t("/api/messages/send",{method:"POST",signal:l,body:JSON.stringify({contact:n,text:i,...s?{reply_to_wire_id:s}:{}})}),sendFile:async(n,i,s,l,a)=>t("/api/messages/send-file",{method:"POST",body:JSON.stringify({contact:n,data_base64:JR(new Uint8Array(await i.arrayBuffer())),filename:s,mime:l,...a?{reply_to_wire_id:a}:{}})}),files:n=>t(`/api/conversations/${encodeURIComponent(n)}/files`),fetchFiles:n=>t("/api/files/fetch",{method:"POST",body:JSON.stringify({wire_ids:n})}),mediaUrl:n=>`/api/media/${encodeURIComponent(n)}`,createInvite:(n="one_time",i)=>t("/api/invites",{method:"POST",body:JSON.stringify({mode:n,...i?{name:i}:{}})}),addContact:(n,i)=>t("/api/contacts/add",{method:"POST",body:JSON.stringify({invite:n,...i?{name:i}:{}})}),renameContact:(n,i)=>t("/api/contacts/rename",{method:"POST",body:JSON.stringify({contact:n,name:i})}),removeContact:n=>t("/api/contacts/remove",{method:"POST",body:JSON.stringify({contact:n})}),revokeInvite:n=>t("/api/invites/revoke",{method:"POST",body:JSON.stringify({invite_id:n})}),respondToIntroduction:(n,i)=>t("/api/contacts/introductions",{method:"POST",body:JSON.stringify({contact:n,action:i})}),vapidPublicKey:()=>t("/api/push/vapid-public-key"),ensurePush:n=>t("/api/push/subscriptions/ensure",{method:"POST",body:JSON.stringify(n)}),deletePush:n=>t("/api/push/subscriptions/delete",{method:"POST",body:JSON.stringify({binding_id:n})})}}const Qe=eA(),rd="ours-messenger-live-event";function p0(e){window.dispatchEvent(new CustomEvent(rd,{detail:e}))}function tA(e){const t=n=>{const i=n.detail;i?.v===1&&e(i)};return window.addEventListener(rd,t),()=>window.removeEventListener(rd,t)}function nA(e,t){const n=new EventSource("/api/events");let i=!1;t("connecting"),n.onopen=()=>{i=!0,t("live")},n.onerror=()=>t(i?"retrying":"connecting");const s=l=>{n.addEventListener(l,a=>{try{const c=JSON.parse(a.data);c&&c.v===1&&e({...c,type:l})}catch{}})};return s("sync_required"),s("message_received"),s("receipt_received"),s("file_received"),()=>n.close()}function rA(e=window.location){return`${e.protocol==="https:"?"wss:":"ws:"}//${e.host}/api/presence`}function iA(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const t=e;if(t.type!=="event"||!t.event||typeof t.event!="object")return null;const n=t.event;return n.v===1?n:null}function oA(e){let t=!1,n=null,i,s=1e3,l=0;const a=()=>{i!==void 0&&clearTimeout(i),i=void 0;const m=n;n=null,m&&m.readyState<WebSocket.CLOSING&&m.close(1e3,"hidden")},c=()=>{if(t||document.visibilityState!=="visible")return;e.onState?.("retrying");const m=s;s=Math.min(3e4,s*2),i=setTimeout(()=>{i=void 0,d()},m)},d=async()=>{if(a(),t||document.visibilityState!=="visible")return;const m=++l;e.onState?.("connecting");try{const[p,y]=await Promise.all([e.identity(),e.registration.pushManager.getSubscription()]);if(t||m!==l||document.visibilityState!=="visible")return;const w=y?.toJSON(),S=y?.endpoint,E=w?.keys?.auth;if(!S||!E)return;const T=new WebSocket(rA());n=T,T.onopen=()=>T.send(JSON.stringify({identity:p.cid,endpoint:S,auth:E})),T.onmessage=C=>{let R;try{R=JSON.parse(String(C.data))}catch{return}if(R?.ok===!0){s=1e3,e.onState?.("live");return}const A=iA(R);A&&e.onEvent(A)},T.onclose=()=>{n===T&&(n=null),m===l&&c()},T.onerror=()=>T.close()}catch{m===l&&c()}},h=()=>{l++,document.visibilityState==="visible"?(s=1e3,d()):a()};return document.addEventListener("visibilitychange",h),window.addEventListener("pagehide",a),d(),()=>{t=!0,l++,document.removeEventListener("visibilitychange",h),window.removeEventListener("pagehide",a),a()}}function sA(e,t){return t.visibility==="visible"&&t.appRoute==="chats"&&t.selectedContactCid===e&&(t.desktopLayout||t.mobileDetailOpen)&&!t.conversationCoveringDialogOpen}class aA{#e=new Map;request(t,n){let i=this.#e.get(t);return i?.running?(i.rerun=!0,i.running):(i??={running:null,rerun:!1},this.#e.set(t,i),i.running=(async()=>{do i.rerun=!1,await n();while(i.rerun)})().finally(()=>{i.running=null,i.rerun||this.#e.delete(t)}),i.running)}}function Jy(e){if(e==="/"||e==="/chats"||e==="/chats/")return{name:"chats",contactCid:null};const t=/^\/chats\/([^/]+)\/?$/.exec(e);if(t)try{const n=decodeURIComponent(t[1]);if(n)return{name:"chats",contactCid:n}}catch{}return{name:"not_found",pathname:e}}function Jo(e){return e?`/chats/${encodeURIComponent(e)}`:"/chats"}const ev={read:2,delivered:1};function tv(e){return e&&Object.hasOwn(ev,e)?ev[e]:0}function id(e,t){return tv(t)>tv(e)?t:e}const lA=()=>({contacts:[],pending:[]});function uA(e){return{identity:null,contacts:lA(),route:e,pages:{},pendingSends:{},drafts:{},replies:{},connection:"connecting",search:"",mobileDetailOpen:e.name==="chats"&&e.contactCid!==null,coveringDialog:!1,dialogBusy:!1,generatedInvite:null,sendingDialog:null,error:null,loaded:!1}}function ui(e,t){return`${e}:${t}`}function si(e){return e.route.name==="chats"?e.route.contactCid:null}function ci(e,t){return e.identity?e.pages[ui(e.identity.cid,t)]??null:null}function cA(e,t){const n=id(e.receipt,t.receipt);return n===t.receipt?t:{...t,receipt:n}}function Ui(e,t){const n=[...e],i=new Map;n.forEach((s,l)=>{s.wire_id&&i.set(s.wire_id,l)});for(const s of t){const l=s.wire_id?i.get(s.wire_id):void 0;l===void 0?(s.wire_id&&i.set(s.wire_id,n.length),n.push(s)):n[l]=cA(n[l],s)}return n}function nv(e,t){switch(t.type){case"snapshot":{const n=e.identity!==null&&e.identity.cid!==t.identity.cid;return{...e,identity:t.identity,contacts:t.contacts,loaded:!0,error:null,...n?{pages:{},pendingSends:{},drafts:{},replies:{},sendingDialog:null,generatedInvite:null,coveringDialog:!1,dialogBusy:!1}:{}}}case"contacts":return{...e,contacts:t.contacts};case"page":{if(!e.identity)return e;const n=ui(e.identity.cid,t.contactCid),i=e.pages[n],s=e.pendingSends[n]??[],l=new Set(t.page.messages.map(y=>y.wire_id)),a=s.filter(y=>!l.has(y.wire_id)),c=new Map(i?.messages.map(y=>[y.wire_id,y.receipt])??[]),d=i?t.page.messages.map(y=>{const w=id(c.get(y.wire_id)??null,y.receipt);return w===y.receipt?y:{...y,receipt:w}}):t.page.messages,h=i&&i.messages.length>50?{...t.page,messages:Ui(i.messages,d),hasMore:i.hasMore,nextBefore:i.nextBefore}:{...t.page,messages:d},m=Ui(h.messages,a),p={...h,messages:m,total:Math.max(h.total+a.length,m.length)};return{...e,pages:{...e.pages,[n]:p},pendingSends:{...e.pendingSends,[n]:a.length?a:void 0}}}case"sent_message":{if(!e.identity)return e;const n=ui(e.identity.cid,t.contactCid),i=e.pages[n];if(i?.messages.some(a=>a.wire_id===t.message.wire_id))return e;const s=Ui(e.pendingSends[n]??[],[t.message]);if(!i)return{...e,pendingSends:{...e.pendingSends,[n]:s}};const l=Ui(i.messages,[t.message]);return{...e,pages:{...e.pages,[n]:{...i,messages:l,total:Math.max(i.total+1,l.length)}},pendingSends:{...e.pendingSends,[n]:s}}}case"receipt":{if(!e.identity)return e;const n=ui(e.identity.cid,t.contactCid),i=e.pages[n],s=e.pendingSends[n],l=new Set(t.wireIds),a=h=>{let m=!1;const p=h.map(y=>{if(!y.wire_id||!l.has(y.wire_id))return y;const w=id(y.receipt,t.kind);return w===y.receipt?y:(m=!0,{...y,receipt:w})});return m?p:h},c=i?a(i.messages):void 0,d=s?a(s):void 0;return c===i?.messages&&d===s?e:{...e,pages:i&&c?{...e.pages,[n]:{...i,messages:c}}:e.pages,pendingSends:s&&d?{...e.pendingSends,[n]:d}:e.pendingSends}}case"older_page":{if(!e.identity)return e;const n=ui(e.identity.cid,t.contactCid),i=e.pages[n];if(!i)return e;const s=Ui(Ui(t.page.messages,t.newer),i.messages),l={...t.page,preview:i.preview,total:Math.max(t.page.total,i.total,s.length),messages:s};return{...e,pages:{...e.pages,[n]:l}}}case"route":return{...e,route:t.route,mobileDetailOpen:t.mobileDetailOpen??(t.route.name==="chats"&&t.route.contactCid!==null)};case"connection":return{...e,connection:t.connection};case"search":return{...e,search:t.search};case"draft":return e.identity?{...e,drafts:{...e.drafts,[ui(e.identity.cid,t.contactCid)]:t.value}}:e;case"reply":return e.identity?{...e,replies:{...e.replies,[ui(e.identity.cid,t.contactCid)]:t.wireId??void 0}}:e;case"sending":return{...e,sendingDialog:t.dialog};case"dialog":return{...e,coveringDialog:t.open,dialogBusy:t.open?e.dialogBusy:!1,generatedInvite:t.open?e.generatedInvite:null,error:null};case"dialog_busy":return{...e,dialogBusy:t.busy};case"generated_invite":return{...e,generatedInvite:t.blob};case"error":return{...e,error:t.message}}}function fA(e,t,n){return!e||t?"ignore":n?"defer":"reload"}function Ds(){return{api:Qe,notification:globalThis.Notification,navigator}}function Or(e,t,n){return new Promise((i,s)=>{const l=setTimeout(()=>s(new Error(`${n} did not complete within ${t/1e3}s — try again`)),t);e.then(a=>{clearTimeout(l),i(a)},a=>{clearTimeout(l),s(a)})})}async function dA(e,t={}){let n=null,i=!1,s=!1;const l="serviceWorker"in navigator&&window.isSecureContext,a=()=>e({supported:l,offline:!navigator.onLine,updateAvailable:i,registration:n}),c=()=>a(),d=()=>a(),h=()=>{document.visibilityState==="visible"&&n?.update().catch(()=>{})},m=w=>{if(w.data?.type==="ours-push-repair-required"){window.dispatchEvent(new Event("ours-push-repair-required"));return}if(w.data?.type==="ours-push-foreground"){const S=w.data.contact_id,E=w.data.wire_id,T=w.data.kind;typeof S=="string"&&typeof E=="string"&&p0({v:1,type:T==="file"?"file_received":"message_received",contact_id:S,wire_id:E,date:new Date().toISOString()})}},p=l&&!!navigator.serviceWorker.controller,y=()=>{const w=fA(p,s,t.shouldDeferReload?.()??!1);if(w!=="ignore"){if(w==="defer"){i=!0,a();return}s=!0,(t.reload??(()=>location.reload()))()}};if(window.addEventListener("online",c),window.addEventListener("offline",d),document.addEventListener("visibilitychange",h),navigator.serviceWorker?.addEventListener("message",m),navigator.serviceWorker?.addEventListener("controllerchange",y),l){n=await navigator.serviceWorker.register("/sw.js",{scope:"/",updateViaCache:"none"}),await navigator.serviceWorker.ready;const w=S=>S?.addEventListener("statechange",()=>{S.state==="installed"&&navigator.serviceWorker.controller&&(i=!0,a())});w(n.installing),n.addEventListener("updatefound",()=>w(n?.installing??null)),n.update().catch(()=>{})}return a(),()=>{window.removeEventListener("online",c),window.removeEventListener("offline",d),document.removeEventListener("visibilitychange",h),navigator.serviceWorker?.removeEventListener("message",m),navigator.serviceWorker?.removeEventListener("controllerchange",y)}}async function rv(e,t=()=>location.reload(),n=navigator.serviceWorker){const i=e.waiting;if(!i){t();return}await Or(new Promise(s=>{let l=!1;const a=()=>{l||(l=!0,n.removeEventListener("controllerchange",a),t(),s())};n.addEventListener("controllerchange",a),i.postMessage({type:"SKIP_WAITING"})}),1e4,"service-worker update")}function hA(e){const t="=".repeat((4-e.length%4)%4),n=atob((e+t).replaceAll("-","+").replaceAll("_","/")),i=new Uint8Array(n.length);for(let s=0;s<n.length;s++)i[s]=n.charCodeAt(s);return i}function pA(e){return e?e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength):null}function iv(e,t){const n=pA(e);return!!n&&n.length===t.length&&n.every((i,s)=>i===t[s])}function od(e=navigator.userAgent){return/iP(?:hone|ad|od)/.test(e)}function sd(e=navigator,t=window){return od(e.userAgent)&&(e.standalone===!0||t.matchMedia("(display-mode: standalone)").matches)}function mA(){return od()&&!sd()?"On iPhone or iPad, tap Share → Add to Home Screen, then open messenger from its Home Screen icon (iOS 16.4 or later).":!("Notification"in window)||!window.PushManager||!("serviceWorker"in navigator)?"Notifications require a current secure browser with service-worker and Web Push support.":Notification.permission==="denied"?od()?"Allow messenger in iOS Settings → Notifications, then return and choose Repair.":"Allow notifications in this site’s browser settings, then return and choose Repair.":null}function gA(e={}){const t=e.notification??Ds().notification;if(!t)return Promise.reject(new Error("notification permission is unavailable"));const n=new Promise((i,s)=>{let l=!1;const a=c=>{if(l)return;const d=c??t.permission;d!=="granted"&&d!=="denied"&&d!=="default"||(l=!0,i(d))};try{const c=t.requestPermission(a);c&&typeof c.then=="function"&&c.then(a,s)}catch(c){s(c)}});return Or(n,e.timeoutMs??15e3,"notification permission")}function m0(e,t){return!!e&&!!e.pushManager&&!!t.notification&&!!t.navigator.serviceWorker}function gi(e,t={}){return{status:e,preview:"full",...t}}async function yA(e,t,n){let i=await Or(e.pushManager.getSubscription(),5e3,"push subscription lookup");if((n||i?.options.applicationServerKey&&!iv(i.options.applicationServerKey,t))&&(i&&await Or(i.unsubscribe(),5e3,"stale push unsubscribe"),i=null),i&&iv(i.options.applicationServerKey,t))return i;try{return await Or(e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:t}),15e3,"push subscribe")}catch(s){const l=await e.pushManager.getSubscription();if(!l)throw s;return await Or(l.unsubscribe(),5e3,"stale push unsubscribe"),Or(e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:t}),15e3,"push repair")}}async function g0(e,t,n,i){const s=await i.api.vapidPublicKey(),a=await Or(Promise.resolve(i.navigator.serviceWorker.ready),1e4,"service-worker readiness")??e,c=hA(s.publicKey),h=(await yA(a,c,n)).toJSON();if(!h.endpoint||!h.keys?.p256dh||!h.keys.auth)throw new Error("browser returned an incomplete push subscription");const m=await i.api.ensurePush({...h,label:i.navigator.userAgent.slice(0,160),...t===void 0?{}:{preview:t}});if(m.status!=="on"||m.fingerprint!==s.fingerprint||m.configEpoch!==s.configEpoch)throw new Error("server did not acknowledge the current Web Push configuration");return gi("on",{bindingId:m.binding_id,fingerprint:m.fingerprint,configEpoch:m.configEpoch,preview:m.preview})}async function ov(e,t=Ds()){return m0(e,t)?t.notification.permission!=="granted"?gi("needs-permission",{blocked:t.notification.permission==="denied"}):await e.pushManager.getSubscription()?g0(e,void 0,!1,t):gi("off"):gi("unsupported")}async function y0(e,t={},n=Ds()){if(!m0(e,n))return gi("unsupported");const i=await gA({notification:n.notification});return i!=="granted"?gi("needs-permission",{blocked:i==="denied"}):g0(e,t.preview??"full",t.forceFresh??!1,n)}const vA=(e,t,n=Ds())=>y0(e,{preview:t,forceFresh:!0},n);async function xA(e,t,n=Ds()){const i=await e.pushManager.getSubscription(),s=[];if(t.bindingId)try{await n.api.deletePush(t.bindingId)}catch(l){s.push(l)}if(i)try{await i.unsubscribe()}catch(l){s.push(l)}if(s.length)throw new Error("notification disable did not fully converge — choose Repair and try again");return gi("off",{preview:t.preview})}function wA(e=15e3){if(!("serviceWorker"in navigator))return()=>{};let t;const n=()=>{const l={type:"ours-visibility",state:document.visibilityState,ts:Date.now(),iosStandalone:sd()};navigator.serviceWorker.ready.then(a=>{(navigator.serviceWorker.controller??a.active)?.postMessage(l)}).catch(()=>{})},i=()=>{n(),t!==void 0&&clearInterval(t),t=document.visibilityState==="visible"?setInterval(n,e):void 0,document.visibilityState==="visible"&&v0()},s=l=>{l.data?.type!=="ours-visibility-query"||!l.ports?.[0]||l.ports[0].postMessage({type:"ours-visibility-reply",state:document.visibilityState,iosStandalone:sd()})};return document.addEventListener("visibilitychange",i),navigator.serviceWorker.addEventListener("message",s),i(),()=>{document.removeEventListener("visibilitychange",i),navigator.serviceWorker.removeEventListener("message",s),t!==void 0&&clearInterval(t)}}async function v0(){try{if(!("serviceWorker"in navigator))return;const t=await(await navigator.serviceWorker.getRegistration())?.getNotifications()??[];for(const n of t)n.close();"clearAppBadge"in navigator&&await navigator.clearAppBadge()}catch{}}/**
|
|
49
|
-
* @license lucide-react v0.468.0 - ISC
|
|
50
|
-
*
|
|
51
|
-
* This source code is licensed under the ISC license.
|
|
52
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
53
|
-
*/const kA=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),x0=(...e)=>e.filter((t,n,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===n).join(" ").trim();/**
|
|
54
|
-
* @license lucide-react v0.468.0 - ISC
|
|
55
|
-
*
|
|
56
|
-
* This source code is licensed under the ISC license.
|
|
57
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
58
|
-
*/var SA={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
59
|
-
* @license lucide-react v0.468.0 - ISC
|
|
60
|
-
*
|
|
61
|
-
* This source code is licensed under the ISC license.
|
|
62
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
63
|
-
*/const bA=k.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:s="",children:l,iconNode:a,...c},d)=>k.createElement("svg",{ref:d,...SA,width:t,height:t,stroke:e,strokeWidth:i?Number(n)*24/Number(t):n,className:x0("lucide",s),...c},[...a.map(([h,m])=>k.createElement(h,m)),...Array.isArray(l)?l:[l]]));/**
|
|
64
|
-
* @license lucide-react v0.468.0 - ISC
|
|
65
|
-
*
|
|
66
|
-
* This source code is licensed under the ISC license.
|
|
67
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
68
|
-
*/const Ue=(e,t)=>{const n=k.forwardRef(({className:i,...s},l)=>k.createElement(bA,{ref:l,iconNode:t,className:x0(`lucide-${kA(e)}`,i),...s}));return n.displayName=`${e}`,n};/**
|
|
69
|
-
* @license lucide-react v0.468.0 - ISC
|
|
70
|
-
*
|
|
71
|
-
* This source code is licensed under the ISC license.
|
|
72
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
73
|
-
*/const CA=Ue("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
74
|
-
* @license lucide-react v0.468.0 - ISC
|
|
75
|
-
*
|
|
76
|
-
* This source code is licensed under the ISC license.
|
|
77
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
78
|
-
*/const EA=Ue("Bolt",[["path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z",key:"yt0hxn"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]]);/**
|
|
79
|
-
* @license lucide-react v0.468.0 - ISC
|
|
80
|
-
*
|
|
81
|
-
* This source code is licensed under the ISC license.
|
|
82
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
83
|
-
*/const TA=Ue("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
|
|
84
|
-
* @license lucide-react v0.468.0 - ISC
|
|
85
|
-
*
|
|
86
|
-
* This source code is licensed under the ISC license.
|
|
87
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
88
|
-
*/const sv=Ue("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/**
|
|
89
|
-
* @license lucide-react v0.468.0 - ISC
|
|
90
|
-
*
|
|
91
|
-
* This source code is licensed under the ISC license.
|
|
92
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
93
|
-
*/const PA=Ue("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
94
|
-
* @license lucide-react v0.468.0 - ISC
|
|
95
|
-
*
|
|
96
|
-
* This source code is licensed under the ISC license.
|
|
97
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
98
|
-
*/const RA=Ue("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
99
|
-
* @license lucide-react v0.468.0 - ISC
|
|
100
|
-
*
|
|
101
|
-
* This source code is licensed under the ISC license.
|
|
102
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
103
|
-
*/const AA=Ue("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
104
|
-
* @license lucide-react v0.468.0 - ISC
|
|
105
|
-
*
|
|
106
|
-
* This source code is licensed under the ISC license.
|
|
107
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
108
|
-
*/const MA=Ue("CirclePause",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]]);/**
|
|
109
|
-
* @license lucide-react v0.468.0 - ISC
|
|
110
|
-
*
|
|
111
|
-
* This source code is licensed under the ISC license.
|
|
112
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
113
|
-
*/const NA=Ue("CirclePlay",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]);/**
|
|
114
|
-
* @license lucide-react v0.468.0 - ISC
|
|
115
|
-
*
|
|
116
|
-
* This source code is licensed under the ISC license.
|
|
117
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
118
|
-
*/const jA=Ue("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
119
|
-
* @license lucide-react v0.468.0 - ISC
|
|
120
|
-
*
|
|
121
|
-
* This source code is licensed under the ISC license.
|
|
122
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
123
|
-
*/const IA=Ue("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
124
|
-
* @license lucide-react v0.468.0 - ISC
|
|
125
|
-
*
|
|
126
|
-
* This source code is licensed under the ISC license.
|
|
127
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
128
|
-
*/const DA=Ue("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
|
|
129
|
-
* @license lucide-react v0.468.0 - ISC
|
|
130
|
-
*
|
|
131
|
-
* This source code is licensed under the ISC license.
|
|
132
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
133
|
-
*/const av=Ue("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
134
|
-
* @license lucide-react v0.468.0 - ISC
|
|
135
|
-
*
|
|
136
|
-
* This source code is licensed under the ISC license.
|
|
137
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
138
|
-
*/const _A=Ue("Grid2x2",[["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 12h18",key:"1i2n21"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}]]);/**
|
|
139
|
-
* @license lucide-react v0.468.0 - ISC
|
|
140
|
-
*
|
|
141
|
-
* This source code is licensed under the ISC license.
|
|
142
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
143
|
-
*/const LA=Ue("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);/**
|
|
144
|
-
* @license lucide-react v0.468.0 - ISC
|
|
145
|
-
*
|
|
146
|
-
* This source code is licensed under the ISC license.
|
|
147
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
148
|
-
*/const OA=Ue("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
|
|
149
|
-
* @license lucide-react v0.468.0 - ISC
|
|
150
|
-
*
|
|
151
|
-
* This source code is licensed under the ISC license.
|
|
152
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
153
|
-
*/const FA=Ue("LockKeyhole",[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]]);/**
|
|
154
|
-
* @license lucide-react v0.468.0 - ISC
|
|
155
|
-
*
|
|
156
|
-
* This source code is licensed under the ISC license.
|
|
157
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
158
|
-
*/const zA=Ue("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
|
|
159
|
-
* @license lucide-react v0.468.0 - ISC
|
|
160
|
-
*
|
|
161
|
-
* This source code is licensed under the ISC license.
|
|
162
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
163
|
-
*/const VA=Ue("MessageCircleReply",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}],["path",{d:"m10 15-3-3 3-3",key:"1pgupc"}],["path",{d:"M7 12h7a2 2 0 0 1 2 2v1",key:"1gheu4"}]]);/**
|
|
164
|
-
* @license lucide-react v0.468.0 - ISC
|
|
165
|
-
*
|
|
166
|
-
* This source code is licensed under the ISC license.
|
|
167
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
168
|
-
*/const BA=Ue("MessageSquareText",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M13 8H7",key:"14i4kc"}],["path",{d:"M17 12H7",key:"16if0g"}]]);/**
|
|
169
|
-
* @license lucide-react v0.468.0 - ISC
|
|
170
|
-
*
|
|
171
|
-
* This source code is licensed under the ISC license.
|
|
172
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
173
|
-
*/const $A=Ue("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/**
|
|
174
|
-
* @license lucide-react v0.468.0 - ISC
|
|
175
|
-
*
|
|
176
|
-
* This source code is licensed under the ISC license.
|
|
177
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
178
|
-
*/const UA=Ue("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
|
|
179
|
-
* @license lucide-react v0.468.0 - ISC
|
|
180
|
-
*
|
|
181
|
-
* This source code is licensed under the ISC license.
|
|
182
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
183
|
-
*/const WA=Ue("Paperclip",[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]]);/**
|
|
184
|
-
* @license lucide-react v0.468.0 - ISC
|
|
185
|
-
*
|
|
186
|
-
* This source code is licensed under the ISC license.
|
|
187
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
188
|
-
*/const HA=Ue("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
|
|
189
|
-
* @license lucide-react v0.468.0 - ISC
|
|
190
|
-
*
|
|
191
|
-
* This source code is licensed under the ISC license.
|
|
192
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
193
|
-
*/const KA=Ue("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
194
|
-
* @license lucide-react v0.468.0 - ISC
|
|
195
|
-
*
|
|
196
|
-
* This source code is licensed under the ISC license.
|
|
197
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
198
|
-
*/const qA=Ue("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
199
|
-
* @license lucide-react v0.468.0 - ISC
|
|
200
|
-
*
|
|
201
|
-
* This source code is licensed under the ISC license.
|
|
202
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
203
|
-
*/const XA=Ue("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
204
|
-
* @license lucide-react v0.468.0 - ISC
|
|
205
|
-
*
|
|
206
|
-
* This source code is licensed under the ISC license.
|
|
207
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
208
|
-
*/const YA=Ue("SendHorizontal",[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]]);/**
|
|
209
|
-
* @license lucide-react v0.468.0 - ISC
|
|
210
|
-
*
|
|
211
|
-
* This source code is licensed under the ISC license.
|
|
212
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
213
|
-
*/const GA=Ue("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/**
|
|
214
|
-
* @license lucide-react v0.468.0 - ISC
|
|
215
|
-
*
|
|
216
|
-
* This source code is licensed under the ISC license.
|
|
217
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
218
|
-
*/const QA=Ue("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
219
|
-
* @license lucide-react v0.468.0 - ISC
|
|
220
|
-
*
|
|
221
|
-
* This source code is licensed under the ISC license.
|
|
222
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
223
|
-
*/const ZA=Ue("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/**
|
|
224
|
-
* @license lucide-react v0.468.0 - ISC
|
|
225
|
-
*
|
|
226
|
-
* This source code is licensed under the ISC license.
|
|
227
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
228
|
-
*/const JA=Ue("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
229
|
-
* @license lucide-react v0.468.0 - ISC
|
|
230
|
-
*
|
|
231
|
-
* This source code is licensed under the ISC license.
|
|
232
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
233
|
-
*/const e2=Ue("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);/**
|
|
234
|
-
* @license lucide-react v0.468.0 - ISC
|
|
235
|
-
*
|
|
236
|
-
* This source code is licensed under the ISC license.
|
|
237
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
238
|
-
*/const t2=Ue("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),n2={app:_A,back:CA,bolt:EA,chat:BA,check:PA,chevron:AA,chevronDown:RA,close:t2,clusters:sv,copy:jA,download:IA,edit:HA,inbox:LA,link:OA,lock:FA,mic:$A,maximize:zA,minus:UA,monitor:av,monitorEye:av,more:DA,paperclip:WA,pause:MA,play:NA,plus:KA,refresh:qA,reply:VA,search:XA,send:YA,settings:GA,shield:QA,sliders:ZA,trash:JA,user:e2,agent:TA,network:sv};function Se(e){const{name:t,size:n=18,stroke:i=1.8,fill:s=!1,style:l,className:a}=e,c=n2[t];return c?v.jsx(c,{className:"ic "+(a||""),width:n,height:n,strokeWidth:i,fill:s?"currentColor":"none",style:l,"aria-hidden":"true"}):null}function w0(e){if(typeof e!="string")return null;const t=/^(\d{4})-(\d{2})-(\d{2})[ T](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?/.exec(e.trim());if(!t)return null;const n=t[7]?t[7].slice(0,3).padEnd(3,"0"):"000";return`${t[1]}-${t[2]}-${t[3]}T${t[4]}:${t[5]}:${t[6]}.${n}Z`}function jl(e){const t=w0(e);if(t){const i=Date.parse(t);if(!Number.isNaN(i))return i}const n=new Date(e).getTime();return Number.isNaN(n)?0:n}function r2(e){const t=w0(e);if(t){const i=new Date(t);if(!Number.isNaN(i.getTime()))return i}const n=new Date(e);return Number.isNaN(n.getTime())?null:n}const es="room",i2="room_",Il="ours-cowork-room:",lv="ours-cowork:",uv="ours-cowork-",cv="cowork-room-",ad=/^[0-7][0-9a-hjkmnp-tv-z]{25}$/,o2=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,s2=25,a2=64,l2=80,fv=1e3,ks=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Gt=e=>typeof e=="string"&&e.length>0;function u2(e,t){if(typeof e!="string")return null;const n=e.trim();if(!n.startsWith("{")||!n.endsWith("}"))return null;let i;try{i=JSON.parse(n)}catch{return null}return!ks(i)||i.version!==1||!Gt(i.kind)||!i.kind.startsWith(i2)||!Gt(i.room_id)||t&&!Gt(i.signature)?null:i}function c2(e){const t=ks(e.author)?e.author:{};return{name:Gt(t.display_name)?t.display_name:"",role:Gt(t.role)?t.role:""}}function of(e){const n=Array.from(String(e)).slice(0,l2).join("").replace(/^room_/,"").split("_").filter(Boolean);return n.length===0?"Room notice":n.join(" ").replace(/^./,i=>i.toUpperCase())}function f2(e){if(!ks(e))return null;const t=Gt(e.kind)?e.kind:"",n=c2(e),i=typeof e.text=="string"?e.text:"",s=Number.isSafeInteger(e.briefing_version)&&e.briefing_version>0?e.briefing_version:null,l={roomName:k0(e.room_name)??"",authoredAt:Gt(e.at)?e.at:""};switch(t){case"room_msg":return n.role===es?Lr(t,"Room message",i||"Room notice",{...l,authoredBy:n.name}):{variant:"chat",kind:t,author:n.name||"Unknown member",role:n.role,label:"",text:i,...l};case"room_briefing":return Lr(t,s===null?"Room briefing":`Room briefing · v${s}`,i||"The room briefing was updated.",{...l,authoredBy:n.name,presentation:"briefing"});case"room_role_briefing":{const a=Gt(e.briefing_role)?e.briefing_role:"",c=["Role briefing",a,s===null?"":`v${s}`].filter(Boolean).join(" · ");return Lr(t,c,i||"Your role briefing was updated.",{...l,authoredBy:n.name,presentation:"role",details:a?[`Role: ${a}`]:[]})}case"room_membership":{const a=ks(e.membership)?e.membership:{},c=[Gt(a.action)?`Status: ${p2(a.action)}`:"",Gt(a.alias)?`Member: ${a.alias}`:"",Gt(a.role)?`Role: ${a.role}`:"",Number.isSafeInteger(a.epoch)&&a.epoch>=0?`Epoch: ${a.epoch}`:""].filter(Boolean);return Lr(t,"Membership",i||v2(a),{...l,authoredBy:n.name,presentation:"membership",details:c})}case"room_file":{const a=Gt(e.filename)?e.filename:"Shared file",c=[Gt(e.mime)?`Type: ${e.mime}`:"",Number.isSafeInteger(e.size)&&e.size>=0?`Size: ${m2(e.size)}`:"",Gt(e.sha256)?`SHA-256: ${g2(e.sha256)}`:""].filter(Boolean);return Lr(t,"Room file",a,{...l,authoredBy:n.name,role:n.role,presentation:"file",details:c})}case"room_not_member":return Lr(t,"Room access","You are no longer a member of this room.",{...l,presentation:"lifecycle",details:["Status: Removed"]});default:return i?{variant:n.role&&n.role!==es?"chat":"system",kind:t,author:n.role&&n.role!==es?n.name||"Unknown member":"",role:n.role&&n.role!==es?n.role:"",label:n.role&&n.role!==es?"":of(t),text:y2(i),...l}:Lr(t,of(t),`${of(t)} from the room.`,l)}}function d2(e,t){if(!h2(e))return null;const n=mh(e)?.roomId??null,i=hh(e),s=ph(e),l=u2(t,n===null&&s===null);return l!==null&&n!==null&&l.room_id!==n||l!==null&&i!==null&&l.room_id!==i?dv("Room provenance mismatch"):f2(l)}function k0(e){if(typeof e!="string"||/[\p{Cc}\p{Cf}]/u.test(e))return null;const t=e.trim().normalize("NFC"),n=Array.from(t).length;return n>=1&&n<=a2?t:null}function hh(e){if(typeof e!="string"||!e.startsWith(cv))return null;const t=e.slice(cv.length);return ad.test(t)?t:null}function ph(e){return typeof e!="string"||!e.startsWith(lv)?null:k0(e.slice(lv.length))}function mh(e){if(typeof e!="string"||!e.startsWith(uv))return null;const t=e.slice(uv.length);if(ad.test(t))return{roomId:t,slug:null};const n=t.slice(-26),i=t.at(-27),s=t.slice(0,-27);return i!=="-"||!ad.test(n)||s.length<1||s.length>s2?null:o2.test(s)?{roomId:n,slug:s}:null}function h2(e){const t=String(e??"").trim();return t.startsWith(Il)&&t.slice(Il.length).trim().length>0||ph(e)!==null||mh(e)!==null||hh(e)!==null}function Lr(e,t,n,i={}){return{variant:"system",kind:e,author:"",role:"",label:t,text:n,...i}}function p2(e){return String(e).replace(/_/g," ").replace(/^./,t=>t.toUpperCase())}function m2(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KiB`:`${(e/(1024*1024)).toFixed(1)} MiB`}function g2(e){const t=String(e);return t.length<=20?t:`${t.slice(0,12)}…${t.slice(-6)}`}function y2(e){const t=Array.from(String(e));return t.length<=fv?t.join(""):`${t.slice(0,fv).join("")}…`}function dv(e){return Lr("room_invalid","Room notice","This room envelope could not be displayed safely.",{presentation:"lifecycle",details:[`Status: ${e}`]})}function v2(e){if(!ks(e))return"The room membership changed.";const t=Gt(e.alias)?e.alias:"A member";return e.action==="remove"?`${t} left the room.`:"The room membership changed."}function x2(e){if(!e)return"";const t=e.variant==="chat"?e.author:e.label,n=w2(e.text);return t?n?`${t} · ${n}`:t:n}function w2(e){return String(e??"").replace(/\s+/g," ").trim()}function k2(e){const t=String(e??"").trim();if(t.startsWith(Il))return t.slice(Il.length).trim()||null;const n=ph(e);if(n!==null)return n;const i=mh(e);if(i?.slug)return i.slug.replace(/-/g," ").replace(/[a-z]/,a=>a.toUpperCase());if(i)return`Room ${i.roomId.slice(0,8)}`;const s=hh(e);return s===null?null:`Room ${s.slice(0,8)}`}const gh=r2;function Ss(e){const t=e.trim().split(/\s+/).filter(Boolean);if(!t.length)return"?";const n=i=>Array.from(i).find(s=>/[\p{L}\p{N}]/u.test(s))??Array.from(i)[0]??"";if(t.length===1){const i=Array.from(t[0]),s=i.filter(l=>/[\p{L}\p{N}]/u.test(l));return(s.length?s.slice(0,2).join(""):i[0]??"?").toUpperCase()}return(n(t[0])+n(t.at(-1)??"")).toUpperCase()}function S2(e){const t=gh(e);if(!t)return"";const n=new Date;return t.toDateString()===n.toDateString()?t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):t.toLocaleDateString([],{month:"short",day:"numeric"})}function bs(e){const t=gh(e);return t?t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):""}function b2(e){const t=gh(e);return t?t.toLocaleString():e}function yh(e){return e.length<=14?e:`${e.slice(0,8)}…${e.slice(-4)}`}function C2(e){return/^[0-9A-Fa-f]{40,}$/.test(e.trim())}function E2(e,t,n){const i=(e??"").trim(),s=k2(i);return s||(i&&!C2(i)?i:i?yh(i):"Unnamed")}function Dl(e){return e.display_name?.trim()||E2(e.name)}const T2="x-ours-kind=voice-message",S0="voice-message-",ss=20*1024*1024;let Cs=null,ld=[];const vh=new Map;function P2(e){Cs=e;for(const t of ld)t(e);ld=[]}function hv(e){for(const t of e)vh.set(t.wire_id,{id:t.wire_id,dir:t.dir,filename:t.filename,mime:t.mime,size:t.size,date:t.date,available:t.available,logicalName:t.logical_name,version:t.version,transcription:t.transcription})}function R2(){vh.clear()}function b0(e){return vh.get(e)??null}function A2(e){return Cs?.url(e)??null}function M2(e){return`${e}; ${T2}`}function io(e,t){return/x-ours-kind\s*=\s*voice-message/i.test(e)||t.toLowerCase().startsWith(S0)&&e.toLowerCase().startsWith("audio/")}function N2(e,t){const n=e??"file",i=t??"";return io(i,n)?"🎤 Voice message":i.toLowerCase().startsWith("image/")?"🖼 Photo":`📎 ${n}`}async function ql(e){return(Cs??await new Promise(n=>ld.push(n))).bytes(e)}async function j2(e){if(!Cs)throw new Error("Media provider is not ready");await Cs.fetch(e)}function $r(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(0)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function I2(e,t=!1){return e==="read"?{state:"read",label:"read",glyph:"✓✓"}:e==="delivered"?{state:"delivered",label:"delivered",glyph:"✓✓"}:t?{state:"untracked",label:"sent, and cannot report delivery",glyph:"✓"}:{state:"sent",label:"sent",glyph:"✓"}}function C0({receipt:e,content:t="Message",receiptless:n=!1}){const i=I2(e,n);return v.jsx("span",{className:"ticks"+(i.state==="read"?" read":""),"data-receipt-status":i.state,role:"img","aria-label":`${t} ${i.label}`,title:i.label,children:i.glyph})}function pv(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let i=0,s=n.indexOf(t);for(;s!==-1;)i++,s=n.indexOf(t,s+t.length);return i}const Qt=Hr(/[A-Za-z]/),Kt=Hr(/[\dA-Za-z]/),D2=Hr(/[#-'*+\--9=?A-Z^-~]/);function _l(e){return e!==null&&(e<32||e===127)}const ud=Hr(/\d/),_2=Hr(/[\dA-Fa-f]/),L2=Hr(/[!-/:-@[-`{-~]/);function Ne(e){return e!==null&&e<-2}function tt(e){return e!==null&&(e<0||e===32)}function Ve(e){return e===-2||e===-1||e===32}const Xl=Hr(/\p{P}|\p{S}/u),vi=Hr(/\s/);function Hr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function O2(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const Yl=function(e){if(e==null)return B2;if(typeof e=="function")return Gl(e);if(typeof e=="object")return Array.isArray(e)?F2(e):z2(e);if(typeof e=="string")return V2(e);throw new Error("Expected function, string, or object as test")};function F2(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Yl(e[n]);return Gl(i);function i(...s){let l=-1;for(;++l<t.length;)if(t[l].apply(this,s))return!0;return!1}}function z2(e){const t=e;return Gl(n);function n(i){const s=i;let l;for(l in e)if(s[l]!==t[l])return!1;return!0}}function V2(e){return Gl(t);function t(n){return n&&n.type===e}}function Gl(e){return t;function t(n,i,s){return!!($2(n)&&e.call(this,n,typeof i=="number"?i:void 0,s||void 0))}}function B2(){return!0}function $2(e){return e!==null&&typeof e=="object"&&"type"in e}const E0=[],U2=!0,cd=!1,W2="skip";function T0(e,t,n,i){let s;typeof t=="function"&&typeof n!="function"?(i=n,n=t):s=t;const l=Yl(s),a=i?-1:1;c(e,void 0,[])();function c(d,h,m){const p=d&&typeof d=="object"?d:{};if(typeof p.type=="string"){const w=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(y,"name",{value:"node ("+(d.type+(w?"<"+w+">":""))+")"})}return y;function y(){let w=E0,S,E,T;if((!t||l(d,h,m[m.length-1]||void 0))&&(w=H2(n(d,m)),w[0]===cd))return w;if("children"in d&&d.children){const C=d;if(C.children&&w[0]!==W2)for(E=(i?C.children.length:-1)+a,T=m.concat(C);E>-1&&E<C.children.length;){const R=C.children[E];if(S=c(R,E,T)(),S[0]===cd)return S;E=typeof S[1]=="number"?S[1]:E+a}}return w}}}function H2(e){return Array.isArray(e)?e:typeof e=="number"?[U2,e]:e==null?E0:[e]}function K2(e,t,n){const s=Yl((n||{}).ignore||[]),l=q2(t);let a=-1;for(;++a<l.length;)T0(e,"text",c);function c(h,m){let p=-1,y;for(;++p<m.length;){const w=m[p],S=y?y.children:void 0;if(s(w,S?S.indexOf(w):void 0,y))return;y=w}if(y)return d(h,m)}function d(h,m){const p=m[m.length-1],y=l[a][0],w=l[a][1];let S=0;const T=p.children.indexOf(h);let C=!1,R=[];y.lastIndex=0;let A=y.exec(h.value);for(;A;){const D=A.index,B={index:A.index,input:A.input,stack:[...m,h]};let I=w(...A,B);if(typeof I=="string"&&(I=I.length>0?{type:"text",value:I}:void 0),I===!1?y.lastIndex=D+1:(S!==D&&R.push({type:"text",value:h.value.slice(S,D)}),Array.isArray(I)?R.push(...I):I&&R.push(I),S=D+A[0].length,C=!0),!y.global)break;A=y.exec(h.value)}return C?(S<h.value.length&&R.push({type:"text",value:h.value.slice(S)}),p.children.splice(T,1,...R)):R=[h],T+R.length}}function q2(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let i=-1;for(;++i<n.length;){const s=n[i];t.push([X2(s[0]),Y2(s[1])])}return t}function X2(e){return typeof e=="string"?new RegExp(O2(e),"g"):e}function Y2(e){return typeof e=="function"?e:function(){return e}}const sf="phrasing",af=["autolink","link","image","label"];function G2(){return{transforms:[rM],enter:{literalAutolink:Z2,literalAutolinkEmail:lf,literalAutolinkHttp:lf,literalAutolinkWww:lf},exit:{literalAutolink:nM,literalAutolinkEmail:tM,literalAutolinkHttp:J2,literalAutolinkWww:eM}}}function Q2(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:sf,notInConstruct:af},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:sf,notInConstruct:af},{character:":",before:"[ps]",after:"\\/",inConstruct:sf,notInConstruct:af}]}}function Z2(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function lf(e){this.config.enter.autolinkProtocol.call(this,e)}function J2(e){this.config.exit.autolinkProtocol.call(this,e)}function eM(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 tM(e){this.config.exit.autolinkEmail.call(this,e)}function nM(e){this.exit(e)}function rM(e){K2(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,iM],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,oM]],{ignore:["link","linkReference"]})}function iM(e,t,n,i,s){let l="";if(!P0(s)||(/^w/i.test(t)&&(n=t+n,t="",l="http://"),!sM(n)))return!1;const a=aM(n+i);if(!a[0])return!1;const c={type:"link",title:null,url:l+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[c,{type:"text",value:a[1]}]:c}function oM(e,t,n,i){return!P0(i,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function sM(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 aM(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],i=n.indexOf(")");const s=pv(e,"(");let l=pv(e,")");for(;i!==-1&&s>l;)e+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),l++;return[e,n]}function P0(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||vi(n)||Xl(n))&&(!t||n!==47)}function Bn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}R0.peek=gM;function lM(){this.buffer()}function uM(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function cM(){this.buffer()}function fM(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function dM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Bn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function hM(e){this.exit(e)}function pM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Bn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function mM(e){this.exit(e)}function gM(){return"["}function R0(e,t,n,i){const s=n.createTracker(i);let l=s.move("[^");const a=n.enter("footnoteReference"),c=n.enter("reference");return l+=s.move(n.safe(n.associationId(e),{after:"]",before:l})),c(),a(),l+=s.move("]"),l}function yM(){return{enter:{gfmFootnoteCallString:lM,gfmFootnoteCall:uM,gfmFootnoteDefinitionLabelString:cM,gfmFootnoteDefinition:fM},exit:{gfmFootnoteCallString:dM,gfmFootnoteCall:hM,gfmFootnoteDefinitionLabelString:pM,gfmFootnoteDefinition:mM}}}function vM(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:R0},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(i,s,l,a){const c=l.createTracker(a);let d=c.move("[^");const h=l.enter("footnoteDefinition"),m=l.enter("label");return d+=c.move(l.safe(l.associationId(i),{before:d,after:"]"})),m(),d+=c.move("]:"),i.children&&i.children.length>0&&(c.shift(4),d+=c.move((t?`
|
|
239
|
-
`:" ")+l.indentLines(l.containerFlow(i,c.current()),t?A0:xM))),h(),d}}function xM(e,t,n){return t===0?e:A0(e,t,n)}function A0(e,t,n){return(n?"":" ")+e}const wM=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];M0.peek=EM;function kM(){return{canContainEols:["delete"],enter:{strikethrough:bM},exit:{strikethrough:CM}}}function SM(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:wM}],handlers:{delete:M0}}}function bM(e){this.enter({type:"delete",children:[]},e)}function CM(e){this.exit(e)}function M0(e,t,n,i){const s=n.createTracker(i),l=n.enter("strikethrough");let a=s.move("~~");return a+=n.containerPhrasing(e,{...s.current(),before:a,after:"~"}),a+=s.move("~~"),l(),a}function EM(){return"~"}function TM(e){return e.length}function PM(e,t){const n=t||{},i=(n.align||[]).concat(),s=n.stringLength||TM,l=[],a=[],c=[],d=[];let h=0,m=-1;for(;++m<e.length;){const E=[],T=[];let C=-1;for(e[m].length>h&&(h=e[m].length);++C<e[m].length;){const R=RM(e[m][C]);if(n.alignDelimiters!==!1){const A=s(R);T[C]=A,(d[C]===void 0||A>d[C])&&(d[C]=A)}E.push(R)}a[m]=E,c[m]=T}let p=-1;if(typeof i=="object"&&"length"in i)for(;++p<h;)l[p]=mv(i[p]);else{const E=mv(i);for(;++p<h;)l[p]=E}p=-1;const y=[],w=[];for(;++p<h;){const E=l[p];let T="",C="";E===99?(T=":",C=":"):E===108?T=":":E===114&&(C=":");let R=n.alignDelimiters===!1?1:Math.max(1,d[p]-T.length-C.length);const A=T+"-".repeat(R)+C;n.alignDelimiters!==!1&&(R=T.length+R+C.length,R>d[p]&&(d[p]=R),w[p]=R),y[p]=A}a.splice(1,0,y),c.splice(1,0,w),m=-1;const S=[];for(;++m<a.length;){const E=a[m],T=c[m];p=-1;const C=[];for(;++p<h;){const R=E[p]||"";let A="",D="";if(n.alignDelimiters!==!1){const B=d[p]-(T[p]||0),I=l[p];I===114?A=" ".repeat(B):I===99?B%2?(A=" ".repeat(B/2+.5),D=" ".repeat(B/2-.5)):(A=" ".repeat(B/2),D=A):D=" ".repeat(B)}n.delimiterStart!==!1&&!p&&C.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&R==="")&&(n.delimiterStart!==!1||p)&&C.push(" "),n.alignDelimiters!==!1&&C.push(A),C.push(R),n.alignDelimiters!==!1&&C.push(D),n.padding!==!1&&C.push(" "),(n.delimiterEnd!==!1||p!==h-1)&&C.push("|")}S.push(n.delimiterEnd===!1?C.join("").replace(/ +$/,""):C.join(""))}return S.join(`
|
|
240
|
-
`)}function RM(e){return e==null?"":String(e)}function mv(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 AM(e,t,n,i){const s=n.enter("blockquote"),l=n.createTracker(i);l.move("> "),l.shift(2);const a=n.indentLines(n.containerFlow(e,l.current()),MM);return s(),a}function MM(e,t,n){return">"+(n?"":" ")+e}function NM(e,t){return gv(e,t.inConstruct,!0)&&!gv(e,t.notInConstruct,!1)}function gv(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let i=-1;for(;++i<t.length;)if(e.includes(t[i]))return!0;return!1}function yv(e,t,n,i){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
|
|
241
|
-
`&&NM(n.stack,n.unsafe[s]))return/[ \t]/.test(i.before)?"":" ";return`\\
|
|
242
|
-
`}function jM(e,t){const n=String(e);let i=n.indexOf(t),s=i,l=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===s?++l>a&&(a=l):l=1,s=i+t.length,i=n.indexOf(t,s);return a}function IM(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 DM(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 _M(e,t,n,i){const s=DM(n),l=e.value||"",a=s==="`"?"GraveAccent":"Tilde";if(IM(e,n)){const p=n.enter("codeIndented"),y=n.indentLines(l,LM);return p(),y}const c=n.createTracker(i),d=s.repeat(Math.max(jM(l,s)+1,3)),h=n.enter("codeFenced");let m=c.move(d);if(e.lang){const p=n.enter(`codeFencedLang${a}`);m+=c.move(n.safe(e.lang,{before:m,after:" ",encode:["`"],...c.current()})),p()}if(e.lang&&e.meta){const p=n.enter(`codeFencedMeta${a}`);m+=c.move(" "),m+=c.move(n.safe(e.meta,{before:m,after:`
|
|
243
|
-
`,encode:["`"],...c.current()})),p()}return m+=c.move(`
|
|
244
|
-
`),l&&(m+=c.move(l+`
|
|
245
|
-
`)),m+=c.move(d),h(),m}function LM(e,t,n){return(n?"":" ")+e}function xh(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 OM(e,t,n,i){const s=xh(n),l=s==='"'?"Quote":"Apostrophe",a=n.enter("definition");let c=n.enter("label");const d=n.createTracker(i);let h=d.move("[");return h+=d.move(n.safe(n.associationId(e),{before:h,after:"]",...d.current()})),h+=d.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(n.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(c=n.enter("destinationRaw"),h+=d.move(n.safe(e.url,{before:h,after:e.title?" ":`
|
|
246
|
-
`,...d.current()}))),c(),e.title&&(c=n.enter(`title${l}`),h+=d.move(" "+s),h+=d.move(n.safe(e.title,{before:h,after:s,...d.current()})),h+=d.move(s),c()),a(),h}function FM(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 Es(e){return"&#x"+e.toString(16).toUpperCase()+";"}function oo(e){if(e===null||tt(e)||vi(e))return 1;if(Xl(e))return 2}function Ll(e,t,n){const i=oo(e),s=oo(t);return i===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}N0.peek=zM;function N0(e,t,n,i){const s=FM(n),l=n.enter("emphasis"),a=n.createTracker(i),c=a.move(s);let d=a.move(n.containerPhrasing(e,{after:s,before:c,...a.current()}));const h=d.charCodeAt(0),m=Ll(i.before.charCodeAt(i.before.length-1),h,s);m.inside&&(d=Es(h)+d.slice(1));const p=d.charCodeAt(d.length-1),y=Ll(i.after.charCodeAt(0),p,s);y.inside&&(d=d.slice(0,-1)+Es(p));const w=a.move(s);return l(),n.attentionEncodeSurroundingInfo={after:y.outside,before:m.outside},c+d+w}function zM(e,t,n){return n.options.emphasis||"*"}function wh(e,t,n,i){let s,l,a;typeof t=="function"&&typeof n!="function"?(l=void 0,a=t,s=n):(l=t,a=n,s=i),T0(e,l,c,s);function c(d,h){const m=h[h.length-1],p=m?m.children.indexOf(d):void 0;return a(d,p,m)}}const VM={};function kh(e,t){const n=VM,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return j0(e,i,s)}function j0(e,t,n){if(BM(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return vv(e.children,t,n)}return Array.isArray(e)?vv(e,t,n):""}function vv(e,t,n){const i=[];let s=-1;for(;++s<e.length;)i[s]=j0(e[s],t,n);return i.join("")}function BM(e){return!!(e&&typeof e=="object")}function $M(e,t){let n=!1;return wh(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,cd}),!!((!e.depth||e.depth<3)&&kh(e)&&(t.options.setext||n))}function UM(e,t,n,i){const s=Math.max(Math.min(6,e.depth||1),1),l=n.createTracker(i);if($M(e,n)){const m=n.enter("headingSetext"),p=n.enter("phrasing"),y=n.containerPhrasing(e,{...l.current(),before:`
|
|
247
|
-
`,after:`
|
|
248
|
-
`});return p(),m(),y+`
|
|
249
|
-
`+(s===1?"=":"-").repeat(y.length-(Math.max(y.lastIndexOf("\r"),y.lastIndexOf(`
|
|
250
|
-
`))+1))}const a="#".repeat(s),c=n.enter("headingAtx"),d=n.enter("phrasing");l.move(a+" ");let h=n.containerPhrasing(e,{before:"# ",after:`
|
|
251
|
-
`,...l.current()});return/^[\t ]/.test(h)&&(h=Es(h.charCodeAt(0))+h.slice(1)),h=h?a+" "+h:a,n.options.closeAtx&&(h+=" "+a),d(),c(),h}I0.peek=WM;function I0(e){return e.value||""}function WM(){return"<"}D0.peek=HM;function D0(e,t,n,i){const s=xh(n),l=s==='"'?"Quote":"Apostrophe",a=n.enter("image");let c=n.enter("label");const d=n.createTracker(i);let h=d.move("![");return h+=d.move(n.safe(e.alt,{before:h,after:"]",...d.current()})),h+=d.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(n.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(c=n.enter("destinationRaw"),h+=d.move(n.safe(e.url,{before:h,after:e.title?" ":")",...d.current()}))),c(),e.title&&(c=n.enter(`title${l}`),h+=d.move(" "+s),h+=d.move(n.safe(e.title,{before:h,after:s,...d.current()})),h+=d.move(s),c()),h+=d.move(")"),a(),h}function HM(){return"!"}_0.peek=KM;function _0(e,t,n,i){const s=e.referenceType,l=n.enter("imageReference");let a=n.enter("label");const c=n.createTracker(i);let d=c.move("![");const h=n.safe(e.alt,{before:d,after:"]",...c.current()});d+=c.move(h+"]["),a();const m=n.stack;n.stack=[],a=n.enter("reference");const p=n.safe(n.associationId(e),{before:d,after:"]",...c.current()});return a(),n.stack=m,l(),s==="full"||!h||h!==p?d+=c.move(p+"]"):s==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function KM(){return"!"}L0.peek=qM;function L0(e,t,n){let i=e.value||"",s="`",l=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(i);)s+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++l<n.unsafe.length;){const a=n.unsafe[l],c=n.compilePattern(a);let d;if(a.atBreak)for(;d=c.exec(i);){let h=d.index;i.charCodeAt(h)===10&&i.charCodeAt(h-1)===13&&h--,i=i.slice(0,h)+" "+i.slice(d.index+1)}}return s+i+s}function qM(){return"`"}function O0(e,t){const n=kh(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}F0.peek=XM;function F0(e,t,n,i){const s=xh(n),l=s==='"'?"Quote":"Apostrophe",a=n.createTracker(i);let c,d;if(O0(e,n)){const m=n.stack;n.stack=[],c=n.enter("autolink");let p=a.move("<");return p+=a.move(n.containerPhrasing(e,{before:p,after:">",...a.current()})),p+=a.move(">"),c(),n.stack=m,p}c=n.enter("link"),d=n.enter("label");let h=a.move("[");return h+=a.move(n.containerPhrasing(e,{before:h,after:"](",...a.current()})),h+=a.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),h+=a.move("<"),h+=a.move(n.safe(e.url,{before:h,after:">",...a.current()})),h+=a.move(">")):(d=n.enter("destinationRaw"),h+=a.move(n.safe(e.url,{before:h,after:e.title?" ":")",...a.current()}))),d(),e.title&&(d=n.enter(`title${l}`),h+=a.move(" "+s),h+=a.move(n.safe(e.title,{before:h,after:s,...a.current()})),h+=a.move(s),d()),h+=a.move(")"),c(),h}function XM(e,t,n){return O0(e,n)?"<":"["}z0.peek=YM;function z0(e,t,n,i){const s=e.referenceType,l=n.enter("linkReference");let a=n.enter("label");const c=n.createTracker(i);let d=c.move("[");const h=n.containerPhrasing(e,{before:d,after:"]",...c.current()});d+=c.move(h+"]["),a();const m=n.stack;n.stack=[],a=n.enter("reference");const p=n.safe(n.associationId(e),{before:d,after:"]",...c.current()});return a(),n.stack=m,l(),s==="full"||!h||h!==p?d+=c.move(p+"]"):s==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function YM(){return"["}function Sh(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 GM(e){const t=Sh(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function QM(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 V0(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 ZM(e,t,n,i){const s=n.enter("list"),l=n.bulletCurrent;let a=e.ordered?QM(n):Sh(n);const c=e.ordered?a==="."?")":".":GM(n);let d=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&m&&(!m.children||!m.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(d=!0),V0(n)===a&&m){let p=-1;for(;++p<e.children.length;){const y=e.children[p];if(y&&y.type==="listItem"&&y.children&&y.children[0]&&y.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(a=c),n.bulletCurrent=a;const h=n.containerFlow(e,i);return n.bulletLastUsed=a,n.bulletCurrent=l,s(),h}function JM(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 eN(e,t,n,i){const s=JM(n);let l=n.bulletCurrent||Sh(n);t&&t.type==="list"&&t.ordered&&(l=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+l);let a=l.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const c=n.createTracker(i);c.move(l+" ".repeat(a-l.length)),c.shift(a);const d=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,c.current()),m);return d(),h;function m(p,y,w){return y?(w?"":" ".repeat(a))+p:(w?l:l+" ".repeat(a-l.length))+p}}function tN(e,t,n,i){const s=n.enter("paragraph"),l=n.enter("phrasing"),a=n.containerPhrasing(e,i);return l(),s(),a}const nN=Yl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function rN(e,t,n,i){return(e.children.some(function(a){return nN(a)})?n.containerPhrasing:n.containerFlow).call(n,e,i)}function iN(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}B0.peek=oN;function B0(e,t,n,i){const s=iN(n),l=n.enter("strong"),a=n.createTracker(i),c=a.move(s+s);let d=a.move(n.containerPhrasing(e,{after:s,before:c,...a.current()}));const h=d.charCodeAt(0),m=Ll(i.before.charCodeAt(i.before.length-1),h,s);m.inside&&(d=Es(h)+d.slice(1));const p=d.charCodeAt(d.length-1),y=Ll(i.after.charCodeAt(0),p,s);y.inside&&(d=d.slice(0,-1)+Es(p));const w=a.move(s+s);return l(),n.attentionEncodeSurroundingInfo={after:y.outside,before:m.outside},c+d+w}function oN(e,t,n){return n.options.strong||"*"}function sN(e,t,n,i){return n.safe(e.value,i)}function aN(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 lN(e,t,n){const i=(V0(n)+(n.options.ruleSpaces?" ":"")).repeat(aN(n));return n.options.ruleSpaces?i.slice(0,-1):i}const $0={blockquote:AM,break:yv,code:_M,definition:OM,emphasis:N0,hardBreak:yv,heading:UM,html:I0,image:D0,imageReference:_0,inlineCode:L0,link:F0,linkReference:z0,list:ZM,listItem:eN,paragraph:tN,root:rN,strong:B0,text:sN,thematicBreak:lN},xv=document.createElement("i");function bh(e){const t="&"+e+";";xv.innerHTML=t;const n=xv.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function U0(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}const uN=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function cN(e){return e.replace(uN,fN)}function fN(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),l=s===120||s===88;return U0(n.slice(l?2:1),l?16:10)}return bh(n)||e}function dN(){return{enter:{table:hN,tableData:wv,tableHeader:wv,tableRow:mN},exit:{codeText:gN,table:pN,tableData:uf,tableHeader:uf,tableRow:uf}}}function hN(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function pN(e){this.exit(e),this.data.inTable=void 0}function mN(e){this.enter({type:"tableRow",children:[]},e)}function uf(e){this.exit(e)}function wv(e){this.enter({type:"tableCell",children:[]},e)}function gN(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,yN));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function yN(e,t){return t==="|"?t:e}function vN(e){const t=e||{},n=t.tableCellPadding,i=t.tablePipeAlign,s=t.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
252
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:y,table:a,tableCell:d,tableRow:c}};function a(w,S,E,T){return h(m(w,E,T),w.align)}function c(w,S,E,T){const C=p(w,E,T),R=h([C]);return R.slice(0,R.indexOf(`
|
|
253
|
-
`))}function d(w,S,E,T){const C=E.enter("tableCell"),R=E.enter("phrasing"),A=E.containerPhrasing(w,{...T,before:l,after:l});return R(),C(),A}function h(w,S){return PM(w,{align:S,alignDelimiters:i,padding:n,stringLength:s})}function m(w,S,E){const T=w.children;let C=-1;const R=[],A=S.enter("table");for(;++C<T.length;)R[C]=p(T[C],S,E);return A(),R}function p(w,S,E){const T=w.children;let C=-1;const R=[],A=S.enter("tableRow");for(;++C<T.length;)R[C]=d(T[C],w,S,E);return A(),R}function y(w,S,E){let T=$0.inlineCode(w,S,E);return E.stack.includes("tableCell")&&(T=T.replace(/\|/g,"\\$&")),T}}function xN(){return{exit:{taskListCheckValueChecked:kv,taskListCheckValueUnchecked:kv,paragraph:kN}}}function wN(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:SN}}}function kv(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function kN(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const i=n.children[0];if(i&&i.type==="text"){const s=t.children;let l=-1,a;for(;++l<s.length;){const c=s[l];if(c.type==="paragraph"){a=c;break}}a===n&&(i.value=i.value.slice(1),i.value.length===0?n.children.shift():n.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,n.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function SN(e,t,n,i){const s=e.children[0],l=typeof e.checked=="boolean"&&s&&s.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",c=n.createTracker(i);l&&c.move(a);let d=$0.listItem(e,t,n,{...i,...c.current()});return l&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),d;function h(m){return m+a}}function W0(){return[G2(),yM(),kM(),dN(),xN()]}function bN(e){return{extensions:[Q2(),vM(e),SM(),vN(e),wN()]}}function xn(e,t,n,i){const s=e.length;let l=0,a;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,i.length<1e4)a=Array.from(i),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);l<i.length;)a=i.slice(l,l+1e4),a.unshift(t,0),e.splice(...a),l+=1e4,t+=1e4}function Tn(e,t){return e.length>0?(xn(e,e.length,0,t),e):t}const Sv={}.hasOwnProperty;function H0(e){const t={};let n=-1;for(;++n<e.length;)CN(t,e[n]);return t}function CN(e,t){let n;for(n in t){const s=(Sv.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let a;if(l)for(a in l){Sv.call(s,a)||(s[a]=[]);const c=l[a];EN(s[a],Array.isArray(c)?c:c?[c]:[])}}}function EN(e,t){let n=-1;const i=[];for(;++n<t.length;)(t[n].add==="after"?e:i).push(t[n]);xn(e,0,0,i)}function co(e){const t=[];let n=-1,i=0,s=0;for(;++n<e.length;){const l=e.charCodeAt(n);let a="";if(l===37&&Kt(e.charCodeAt(n+1))&&Kt(e.charCodeAt(n+2)))s=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(a=String.fromCharCode(l));else if(l>55295&&l<57344){const c=e.charCodeAt(n+1);l<56320&&c>56319&&c<57344?(a=String.fromCharCode(l,c),s=1):a="�"}else a=String.fromCharCode(l);a&&(t.push(e.slice(i,n),encodeURIComponent(a)),i=n+s+1,a=""),s&&(n+=s,s=0)}return t.join("")+e.slice(i)}function $e(e,t,n,i){const s=i?i-1:Number.POSITIVE_INFINITY;let l=0;return a;function a(d){return Ve(d)?(e.enter(n),c(d)):t(d)}function c(d){return Ve(d)&&l++<s?(e.consume(d),c):(e.exit(n),t(d))}}const TN={tokenize:PN};function PN(e){const t=e.attempt(this.parser.constructs.contentInitial,i,s);let n;return t;function i(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),$e(e,t,"linePrefix")}function s(c){return e.enter("paragraph"),l(c)}function l(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,a(c)}function a(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Ne(c)?(e.consume(c),e.exit("chunkText"),l):(e.consume(c),a)}}const RN={tokenize:AN},bv={tokenize:MN};function AN(e){const t=this,n=[];let i=0,s,l,a;return c;function c(A){if(i<n.length){const D=n[i];return t.containerState=D[1],e.attempt(D[0].continuation,d,h)(A)}return h(A)}function d(A){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&R();const D=t.events.length;let B=D,I;for(;B--;)if(t.events[B][0]==="exit"&&t.events[B][1].type==="chunkFlow"){I=t.events[B][1].end;break}C(i);let q=D;for(;q<t.events.length;)t.events[q][1].end={...I},q++;return xn(t.events,B+1,0,t.events.slice(D)),t.events.length=q,h(A)}return c(A)}function h(A){if(i===n.length){if(!s)return y(A);if(s.currentConstruct&&s.currentConstruct.concrete)return S(A);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(bv,m,p)(A)}function m(A){return s&&R(),C(i),y(A)}function p(A){return t.parser.lazy[t.now().line]=i!==n.length,a=t.now().offset,S(A)}function y(A){return t.containerState={},e.attempt(bv,w,S)(A)}function w(A){return i++,n.push([t.currentConstruct,t.containerState]),y(A)}function S(A){if(A===null){s&&R(),C(0),e.consume(A);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:l}),E(A)}function E(A){if(A===null){T(e.exit("chunkFlow"),!0),C(0),e.consume(A);return}return Ne(A)?(e.consume(A),T(e.exit("chunkFlow")),i=0,t.interrupt=void 0,c):(e.consume(A),E)}function T(A,D){const B=t.sliceStream(A);if(D&&B.push(null),A.previous=l,l&&(l.next=A),l=A,s.defineSkip(A.start),s.write(B),t.parser.lazy[A.start.line]){let I=s.events.length;for(;I--;)if(s.events[I][1].start.offset<a&&(!s.events[I][1].end||s.events[I][1].end.offset>a))return;const q=t.events.length;let $=q,K,j;for(;$--;)if(t.events[$][0]==="exit"&&t.events[$][1].type==="chunkFlow"){if(K){j=t.events[$][1].end;break}K=!0}for(C(i),I=q;I<t.events.length;)t.events[I][1].end={...j},I++;xn(t.events,$+1,0,t.events.slice(q)),t.events.length=I}}function C(A){let D=n.length;for(;D-- >A;){const B=n[D];t.containerState=B[1],B[0].exit.call(t,e)}n.length=A}function R(){s.write([null]),l=void 0,s=void 0,t.containerState._closeFlow=void 0}}function MN(e,t,n){return $e(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ql(e,t,n){const i=[];let s=-1;for(;++s<e.length;){const l=e[s].resolveAll;l&&!i.includes(l)&&(t=l(t,n),i.push(l))}return t}const fd={name:"attention",resolveAll:NN,tokenize:jN};function NN(e,t){let n=-1,i,s,l,a,c,d,h,m;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(i=n;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const p={...e[i][1].end},y={...e[n][1].start};Cv(p,-d),Cv(y,d),a={type:d>1?"strongSequence":"emphasisSequence",start:p,end:{...e[i][1].end}},c={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:y},l={type:d>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},s={type:d>1?"strong":"emphasis",start:{...a.start},end:{...c.end}},e[i][1].end={...a.start},e[n][1].start={...c.end},h=[],e[i][1].end.offset-e[i][1].start.offset&&(h=Tn(h,[["enter",e[i][1],t],["exit",e[i][1],t]])),h=Tn(h,[["enter",s,t],["enter",a,t],["exit",a,t],["enter",l,t]]),h=Tn(h,Ql(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),h=Tn(h,[["exit",l,t],["enter",c,t],["exit",c,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,h=Tn(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,xn(e,i-1,n-i+3,h),n=i+h.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function jN(e,t){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,s=oo(i);let l;return a;function a(d){return l=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===l)return e.consume(d),c;const h=e.exit("attentionSequence"),m=oo(d),p=!m||m===2&&s||n.includes(d),y=!s||s===2&&m||n.includes(i);return h._open=!!(l===42?p:p&&(s||!y)),h._close=!!(l===42?y:y&&(m||!p)),t(d)}}function Cv(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const IN={name:"autolink",tokenize:DN};function DN(e,t,n){let i=0;return s;function s(w){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(w){return Qt(w)?(e.consume(w),a):w===64?n(w):h(w)}function a(w){return w===43||w===45||w===46||Kt(w)?(i=1,c(w)):h(w)}function c(w){return w===58?(e.consume(w),i=0,d):(w===43||w===45||w===46||Kt(w))&&i++<32?(e.consume(w),c):(i=0,h(w))}function d(w){return w===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.exit("autolink"),t):w===null||w===32||w===60||_l(w)?n(w):(e.consume(w),d)}function h(w){return w===64?(e.consume(w),m):D2(w)?(e.consume(w),h):n(w)}function m(w){return Kt(w)?p(w):n(w)}function p(w){return w===46?(e.consume(w),i=0,m):w===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.exit("autolink"),t):y(w)}function y(w){if((w===45||Kt(w))&&i++<63){const S=w===45?y:p;return e.consume(w),S}return n(w)}}const _s={partial:!0,tokenize:_N};function _N(e,t,n){return i;function i(l){return Ve(l)?$e(e,s,"linePrefix")(l):s(l)}function s(l){return l===null||Ne(l)?t(l):n(l)}}const K0={continuation:{tokenize:ON},exit:FN,name:"blockQuote",tokenize:LN};function LN(e,t,n){const i=this;return s;function s(a){if(a===62){const c=i.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),l}return n(a)}function l(a){return Ve(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function ON(e,t,n){const i=this;return s;function s(a){return Ve(a)?$e(e,l,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):l(a)}function l(a){return e.attempt(K0,t,n)(a)}}function FN(e){e.exit("blockQuote")}const q0={name:"characterEscape",tokenize:zN};function zN(e,t,n){return i;function i(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),s}function s(l){return L2(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const X0={name:"characterReference",tokenize:VN};function VN(e,t,n){const i=this;let s=0,l,a;return c;function c(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),d}function d(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),l=31,a=Kt,m(p))}function h(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,a=_2,m):(e.enter("characterReferenceValue"),l=7,a=ud,m(p))}function m(p){if(p===59&&s){const y=e.exit("characterReferenceValue");return a===Kt&&!bh(i.sliceSerialize(y))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(p)&&s++<l?(e.consume(p),m):n(p)}}const Ev={partial:!0,tokenize:$N},Tv={concrete:!0,name:"codeFenced",tokenize:BN};function BN(e,t,n){const i=this,s={partial:!0,tokenize:B};let l=0,a=0,c;return d;function d(I){return h(I)}function h(I){const q=i.events[i.events.length-1];return l=q&&q[1].type==="linePrefix"?q[2].sliceSerialize(q[1],!0).length:0,c=I,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(I)}function m(I){return I===c?(a++,e.consume(I),m):a<3?n(I):(e.exit("codeFencedFenceSequence"),Ve(I)?$e(e,p,"whitespace")(I):p(I))}function p(I){return I===null||Ne(I)?(e.exit("codeFencedFence"),i.interrupt?t(I):e.check(Ev,E,D)(I)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),y(I))}function y(I){return I===null||Ne(I)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(I)):Ve(I)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),$e(e,w,"whitespace")(I)):I===96&&I===c?n(I):(e.consume(I),y)}function w(I){return I===null||Ne(I)?p(I):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(I))}function S(I){return I===null||Ne(I)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(I)):I===96&&I===c?n(I):(e.consume(I),S)}function E(I){return e.attempt(s,D,T)(I)}function T(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),C}function C(I){return l>0&&Ve(I)?$e(e,R,"linePrefix",l+1)(I):R(I)}function R(I){return I===null||Ne(I)?e.check(Ev,E,D)(I):(e.enter("codeFlowValue"),A(I))}function A(I){return I===null||Ne(I)?(e.exit("codeFlowValue"),R(I)):(e.consume(I),A)}function D(I){return e.exit("codeFenced"),t(I)}function B(I,q,$){let K=0;return j;function j(ee){return I.enter("lineEnding"),I.consume(ee),I.exit("lineEnding"),Y}function Y(ee){return I.enter("codeFencedFence"),Ve(ee)?$e(I,W,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ee):W(ee)}function W(ee){return ee===c?(I.enter("codeFencedFenceSequence"),ue(ee)):$(ee)}function ue(ee){return ee===c?(K++,I.consume(ee),ue):K>=a?(I.exit("codeFencedFenceSequence"),Ve(ee)?$e(I,Z,"whitespace")(ee):Z(ee)):$(ee)}function Z(ee){return ee===null||Ne(ee)?(I.exit("codeFencedFence"),q(ee)):$(ee)}}}function $N(e,t,n){const i=this;return s;function s(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),l)}function l(a){return i.parser.lazy[i.now().line]?n(a):t(a)}}const cf={name:"codeIndented",tokenize:WN},UN={partial:!0,tokenize:HN};function WN(e,t,n){const i=this;return s;function s(h){return e.enter("codeIndented"),$e(e,l,"linePrefix",5)(h)}function l(h){const m=i.events[i.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?a(h):n(h)}function a(h){return h===null?d(h):Ne(h)?e.attempt(UN,a,d)(h):(e.enter("codeFlowValue"),c(h))}function c(h){return h===null||Ne(h)?(e.exit("codeFlowValue"),a(h)):(e.consume(h),c)}function d(h){return e.exit("codeIndented"),t(h)}}function HN(e,t,n){const i=this;return s;function s(a){return i.parser.lazy[i.now().line]?n(a):Ne(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):$e(e,l,"linePrefix",5)(a)}function l(a){const c=i.events[i.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(a):Ne(a)?s(a):n(a)}}const KN={name:"codeText",previous:XN,resolve:qN,tokenize:YN};function qN(e){let t=e.length-4,n=3,i,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=n;++i<t;)if(e[i][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(i=n-1,t++;++i<=t;)s===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(s=i):(i===t||e[i][1].type==="lineEnding")&&(e[s][1].type="codeTextData",i!==s+2&&(e[s][1].end=e[i-1][1].end,e.splice(s+2,i-s-2),t-=i-s-2,i=s+2),s=void 0);return e}function XN(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function YN(e,t,n){let i=0,s,l;return a;function a(p){return e.enter("codeText"),e.enter("codeTextSequence"),c(p)}function c(p){return p===96?(e.consume(p),i++,c):(e.exit("codeTextSequence"),d(p))}function d(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),d):p===96?(l=e.enter("codeTextSequence"),s=0,m(p)):Ne(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(p))}function h(p){return p===null||p===32||p===96||Ne(p)?(e.exit("codeTextData"),d(p)):(e.consume(p),h)}function m(p){return p===96?(e.consume(p),s++,m):s===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(l.type="codeTextData",h(p))}}class GN{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,n){const i=n??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(t,i):t>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,n,i){const s=n||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return i&&ts(this.left,i),l.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),ts(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ts(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 n=this.left.splice(t,Number.POSITIVE_INFINITY);ts(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ts(this.left,n.reverse())}}}function ts(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Y0(e){const t={};let n=-1,i,s,l,a,c,d,h;const m=new GN(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(i=m.get(n),n&&i[1].type==="chunkFlow"&&m.get(n-1)[1].type==="listItemPrefix"&&(d=i[1]._tokenizer.events,l=0,l<d.length&&d[l][1].type==="lineEndingBlank"&&(l+=2),l<d.length&&d[l][1].type==="content"))for(;++l<d.length&&d[l][1].type!=="content";)d[l][1].type==="chunkText"&&(d[l][1]._isInFirstContentOfListItem=!0,l++);if(i[0]==="enter")i[1].contentType&&(Object.assign(t,QN(m,n)),n=t[n],h=!0);else if(i[1]._container){for(l=n,s=void 0;l--;)if(a=m.get(l),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(s&&(m.get(s)[1].type="lineEndingBlank"),a[1].type="lineEnding",s=l);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;s&&(i[1].end={...m.get(s)[1].start},c=m.slice(s,n),c.unshift(i),m.splice(s,n-s+1,c))}}return xn(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!h}function QN(e,t){const n=e.get(t)[1],i=e.get(t)[2];let s=t-1;const l=[];let a=n._tokenizer;a||(a=i.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const c=a.events,d=[],h={};let m,p,y=-1,w=n,S=0,E=0;const T=[E];for(;w;){for(;e.get(++s)[1]!==w;);l.push(s),w._tokenizer||(m=i.sliceStream(w),w.next||m.push(null),p&&a.defineSkip(w.start),w._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(m),w._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),p=w,w=w.next}for(w=n;++y<c.length;)c[y][0]==="exit"&&c[y-1][0]==="enter"&&c[y][1].type===c[y-1][1].type&&c[y][1].start.line!==c[y][1].end.line&&(E=y+1,T.push(E),w._tokenizer=void 0,w.previous=void 0,w=w.next);for(a.events=[],w?(w._tokenizer=void 0,w.previous=void 0):T.pop(),y=T.length;y--;){const C=c.slice(T[y],T[y+1]),R=l.pop();d.push([R,R+C.length-1]),e.splice(R,2,C)}for(d.reverse(),y=-1;++y<d.length;)h[S+d[y][0]]=S+d[y][1],S+=d[y][1]-d[y][0]-1;return h}const ZN={resolve:ej,tokenize:tj},JN={partial:!0,tokenize:nj};function ej(e){return Y0(e),e}function tj(e,t){let n;return i;function i(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(c)}function s(c){return c===null?l(c):Ne(c)?e.check(JN,a,l)(c):(e.consume(c),s)}function l(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function a(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function nj(e,t,n){const i=this;return s;function s(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),$e(e,l,"linePrefix")}function l(a){if(a===null||Ne(a))return n(a);const c=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(a):e.interrupt(i.parser.constructs.flow,n,t)(a)}}function G0(e,t,n,i,s,l,a,c,d){const h=d||Number.POSITIVE_INFINITY;let m=0;return p;function p(C){return C===60?(e.enter(i),e.enter(s),e.enter(l),e.consume(C),e.exit(l),y):C===null||C===32||C===41||_l(C)?n(C):(e.enter(i),e.enter(a),e.enter(c),e.enter("chunkString",{contentType:"string"}),E(C))}function y(C){return C===62?(e.enter(l),e.consume(C),e.exit(l),e.exit(s),e.exit(i),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),w(C))}function w(C){return C===62?(e.exit("chunkString"),e.exit(c),y(C)):C===null||C===60||Ne(C)?n(C):(e.consume(C),C===92?S:w)}function S(C){return C===60||C===62||C===92?(e.consume(C),w):w(C)}function E(C){return!m&&(C===null||C===41||tt(C))?(e.exit("chunkString"),e.exit(c),e.exit(a),e.exit(i),t(C)):m<h&&C===40?(e.consume(C),m++,E):C===41?(e.consume(C),m--,E):C===null||C===32||C===40||_l(C)?n(C):(e.consume(C),C===92?T:E)}function T(C){return C===40||C===41||C===92?(e.consume(C),E):E(C)}}function Q0(e,t,n,i,s,l){const a=this;let c=0,d;return h;function h(w){return e.enter(i),e.enter(s),e.consume(w),e.exit(s),e.enter(l),m}function m(w){return c>999||w===null||w===91||w===93&&!d||w===94&&!c&&"_hiddenFootnoteSupport"in a.parser.constructs?n(w):w===93?(e.exit(l),e.enter(s),e.consume(w),e.exit(s),e.exit(i),t):Ne(w)?(e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),p(w))}function p(w){return w===null||w===91||w===93||Ne(w)||c++>999?(e.exit("chunkString"),m(w)):(e.consume(w),d||(d=!Ve(w)),w===92?y:p)}function y(w){return w===91||w===92||w===93?(e.consume(w),c++,p):p(w)}}function Z0(e,t,n,i,s,l){let a;return c;function c(y){return y===34||y===39||y===40?(e.enter(i),e.enter(s),e.consume(y),e.exit(s),a=y===40?41:y,d):n(y)}function d(y){return y===a?(e.enter(s),e.consume(y),e.exit(s),e.exit(i),t):(e.enter(l),h(y))}function h(y){return y===a?(e.exit(l),d(a)):y===null?n(y):Ne(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),$e(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===a||y===null||Ne(y)?(e.exit("chunkString"),h(y)):(e.consume(y),y===92?p:m)}function p(y){return y===a||y===92?(e.consume(y),m):m(y)}}function ds(e,t){let n;return i;function i(s){return Ne(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,i):Ve(s)?$e(e,i,n?"linePrefix":"lineSuffix")(s):t(s)}}const rj={name:"definition",tokenize:oj},ij={partial:!0,tokenize:sj};function oj(e,t,n){const i=this;let s;return l;function l(w){return e.enter("definition"),a(w)}function a(w){return Q0.call(i,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(w)}function c(w){return s=Bn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),d):n(w)}function d(w){return tt(w)?ds(e,h)(w):h(w)}function h(w){return G0(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(w)}function m(w){return e.attempt(ij,p,p)(w)}function p(w){return Ve(w)?$e(e,y,"whitespace")(w):y(w)}function y(w){return w===null||Ne(w)?(e.exit("definition"),i.parser.defined.push(s),t(w)):n(w)}}function sj(e,t,n){return i;function i(c){return tt(c)?ds(e,s)(c):n(c)}function s(c){return Z0(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function l(c){return Ve(c)?$e(e,a,"whitespace")(c):a(c)}function a(c){return c===null||Ne(c)?t(c):n(c)}}const aj={name:"hardBreakEscape",tokenize:lj};function lj(e,t,n){return i;function i(l){return e.enter("hardBreakEscape"),e.consume(l),s}function s(l){return Ne(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const uj={name:"headingAtx",resolve:cj,tokenize:fj};function cj(e,t){let n=e.length-2,i=3,s,l;return e[i][1].type==="whitespace"&&(i+=2),n-2>i&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&e[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(s={type:"atxHeadingText",start:e[i][1].start,end:e[n][1].end},l={type:"chunkText",start:e[i][1].start,end:e[n][1].end,contentType:"text"},xn(e,i,n-i+1,[["enter",s,t],["enter",l,t],["exit",l,t],["exit",s,t]])),e}function fj(e,t,n){let i=0;return s;function s(m){return e.enter("atxHeading"),l(m)}function l(m){return e.enter("atxHeadingSequence"),a(m)}function a(m){return m===35&&i++<6?(e.consume(m),a):m===null||tt(m)?(e.exit("atxHeadingSequence"),c(m)):n(m)}function c(m){return m===35?(e.enter("atxHeadingSequence"),d(m)):m===null||Ne(m)?(e.exit("atxHeading"),t(m)):Ve(m)?$e(e,c,"whitespace")(m):(e.enter("atxHeadingText"),h(m))}function d(m){return m===35?(e.consume(m),d):(e.exit("atxHeadingSequence"),c(m))}function h(m){return m===null||m===35||tt(m)?(e.exit("atxHeadingText"),c(m)):(e.consume(m),h)}}const dj=["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"],Pv=["pre","script","style","textarea"],hj={concrete:!0,name:"htmlFlow",resolveTo:gj,tokenize:yj},pj={partial:!0,tokenize:xj},mj={partial:!0,tokenize:vj};function gj(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 yj(e,t,n){const i=this;let s,l,a,c,d;return h;function h(M){return m(M)}function m(M){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(M),p}function p(M){return M===33?(e.consume(M),y):M===47?(e.consume(M),l=!0,E):M===63?(e.consume(M),s=3,i.interrupt?t:P):Qt(M)?(e.consume(M),a=String.fromCharCode(M),T):n(M)}function y(M){return M===45?(e.consume(M),s=2,w):M===91?(e.consume(M),s=5,c=0,S):Qt(M)?(e.consume(M),s=4,i.interrupt?t:P):n(M)}function w(M){return M===45?(e.consume(M),i.interrupt?t:P):n(M)}function S(M){const J="CDATA[";return M===J.charCodeAt(c++)?(e.consume(M),c===J.length?i.interrupt?t:W:S):n(M)}function E(M){return Qt(M)?(e.consume(M),a=String.fromCharCode(M),T):n(M)}function T(M){if(M===null||M===47||M===62||tt(M)){const J=M===47,he=a.toLowerCase();return!J&&!l&&Pv.includes(he)?(s=1,i.interrupt?t(M):W(M)):dj.includes(a.toLowerCase())?(s=6,J?(e.consume(M),C):i.interrupt?t(M):W(M)):(s=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(M):l?R(M):A(M))}return M===45||Kt(M)?(e.consume(M),a+=String.fromCharCode(M),T):n(M)}function C(M){return M===62?(e.consume(M),i.interrupt?t:W):n(M)}function R(M){return Ve(M)?(e.consume(M),R):j(M)}function A(M){return M===47?(e.consume(M),j):M===58||M===95||Qt(M)?(e.consume(M),D):Ve(M)?(e.consume(M),A):j(M)}function D(M){return M===45||M===46||M===58||M===95||Kt(M)?(e.consume(M),D):B(M)}function B(M){return M===61?(e.consume(M),I):Ve(M)?(e.consume(M),B):A(M)}function I(M){return M===null||M===60||M===61||M===62||M===96?n(M):M===34||M===39?(e.consume(M),d=M,q):Ve(M)?(e.consume(M),I):$(M)}function q(M){return M===d?(e.consume(M),d=null,K):M===null||Ne(M)?n(M):(e.consume(M),q)}function $(M){return M===null||M===34||M===39||M===47||M===60||M===61||M===62||M===96||tt(M)?B(M):(e.consume(M),$)}function K(M){return M===47||M===62||Ve(M)?A(M):n(M)}function j(M){return M===62?(e.consume(M),Y):n(M)}function Y(M){return M===null||Ne(M)?W(M):Ve(M)?(e.consume(M),Y):n(M)}function W(M){return M===45&&s===2?(e.consume(M),ge):M===60&&s===1?(e.consume(M),Ce):M===62&&s===4?(e.consume(M),L):M===63&&s===3?(e.consume(M),P):M===93&&s===5?(e.consume(M),ce):Ne(M)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(pj,G,ue)(M)):M===null||Ne(M)?(e.exit("htmlFlowData"),ue(M)):(e.consume(M),W)}function ue(M){return e.check(mj,Z,G)(M)}function Z(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),ee}function ee(M){return M===null||Ne(M)?ue(M):(e.enter("htmlFlowData"),W(M))}function ge(M){return M===45?(e.consume(M),P):W(M)}function Ce(M){return M===47?(e.consume(M),a="",X):W(M)}function X(M){if(M===62){const J=a.toLowerCase();return Pv.includes(J)?(e.consume(M),L):W(M)}return Qt(M)&&a.length<8?(e.consume(M),a+=String.fromCharCode(M),X):W(M)}function ce(M){return M===93?(e.consume(M),P):W(M)}function P(M){return M===62?(e.consume(M),L):M===45&&s===2?(e.consume(M),P):W(M)}function L(M){return M===null||Ne(M)?(e.exit("htmlFlowData"),G(M)):(e.consume(M),L)}function G(M){return e.exit("htmlFlow"),t(M)}}function vj(e,t,n){const i=this;return s;function s(a){return Ne(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),l):n(a)}function l(a){return i.parser.lazy[i.now().line]?n(a):t(a)}}function xj(e,t,n){return i;function i(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(_s,t,n)}}const wj={name:"htmlText",tokenize:kj};function kj(e,t,n){const i=this;let s,l,a;return c;function c(P){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(P),d}function d(P){return P===33?(e.consume(P),h):P===47?(e.consume(P),B):P===63?(e.consume(P),A):Qt(P)?(e.consume(P),$):n(P)}function h(P){return P===45?(e.consume(P),m):P===91?(e.consume(P),l=0,S):Qt(P)?(e.consume(P),R):n(P)}function m(P){return P===45?(e.consume(P),w):n(P)}function p(P){return P===null?n(P):P===45?(e.consume(P),y):Ne(P)?(a=p,Ce(P)):(e.consume(P),p)}function y(P){return P===45?(e.consume(P),w):p(P)}function w(P){return P===62?ge(P):P===45?y(P):p(P)}function S(P){const L="CDATA[";return P===L.charCodeAt(l++)?(e.consume(P),l===L.length?E:S):n(P)}function E(P){return P===null?n(P):P===93?(e.consume(P),T):Ne(P)?(a=E,Ce(P)):(e.consume(P),E)}function T(P){return P===93?(e.consume(P),C):E(P)}function C(P){return P===62?ge(P):P===93?(e.consume(P),C):E(P)}function R(P){return P===null||P===62?ge(P):Ne(P)?(a=R,Ce(P)):(e.consume(P),R)}function A(P){return P===null?n(P):P===63?(e.consume(P),D):Ne(P)?(a=A,Ce(P)):(e.consume(P),A)}function D(P){return P===62?ge(P):A(P)}function B(P){return Qt(P)?(e.consume(P),I):n(P)}function I(P){return P===45||Kt(P)?(e.consume(P),I):q(P)}function q(P){return Ne(P)?(a=q,Ce(P)):Ve(P)?(e.consume(P),q):ge(P)}function $(P){return P===45||Kt(P)?(e.consume(P),$):P===47||P===62||tt(P)?K(P):n(P)}function K(P){return P===47?(e.consume(P),ge):P===58||P===95||Qt(P)?(e.consume(P),j):Ne(P)?(a=K,Ce(P)):Ve(P)?(e.consume(P),K):ge(P)}function j(P){return P===45||P===46||P===58||P===95||Kt(P)?(e.consume(P),j):Y(P)}function Y(P){return P===61?(e.consume(P),W):Ne(P)?(a=Y,Ce(P)):Ve(P)?(e.consume(P),Y):K(P)}function W(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),s=P,ue):Ne(P)?(a=W,Ce(P)):Ve(P)?(e.consume(P),W):(e.consume(P),Z)}function ue(P){return P===s?(e.consume(P),s=void 0,ee):P===null?n(P):Ne(P)?(a=ue,Ce(P)):(e.consume(P),ue)}function Z(P){return P===null||P===34||P===39||P===60||P===61||P===96?n(P):P===47||P===62||tt(P)?K(P):(e.consume(P),Z)}function ee(P){return P===47||P===62||tt(P)?K(P):n(P)}function ge(P){return P===62?(e.consume(P),e.exit("htmlTextData"),e.exit("htmlText"),t):n(P)}function Ce(P){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),X}function X(P){return Ve(P)?$e(e,ce,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):ce(P)}function ce(P){return e.enter("htmlTextData"),a(P)}}const Ch={name:"labelEnd",resolveAll:Ej,resolveTo:Tj,tokenize:Pj},Sj={tokenize:Rj},bj={tokenize:Aj},Cj={tokenize:Mj};function Ej(e){let t=-1;const n=[];for(;++t<e.length;){const i=e[t][1];if(n.push(e[t]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const s=i.type==="labelImage"?4:2;i.type="data",t+=s}}return e.length!==n.length&&xn(e,0,e.length,n),e}function Tj(e,t){let n=e.length,i=0,s,l,a,c;for(;n--;)if(s=e[n][1],l){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(l=n,s.type!=="labelLink")){i=2;break}}else s.type==="labelEnd"&&(a=n);const d={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[l][1].start},end:{...e[a][1].end}},m={type:"labelText",start:{...e[l+i+2][1].end},end:{...e[a-2][1].start}};return c=[["enter",d,t],["enter",h,t]],c=Tn(c,e.slice(l+1,l+i+3)),c=Tn(c,[["enter",m,t]]),c=Tn(c,Ql(t.parser.constructs.insideSpan.null,e.slice(l+i+4,a-3),t)),c=Tn(c,[["exit",m,t],e[a-2],e[a-1],["exit",h,t]]),c=Tn(c,e.slice(a+1)),c=Tn(c,[["exit",d,t]]),xn(e,l,e.length,c),e}function Pj(e,t,n){const i=this;let s=i.events.length,l,a;for(;s--;)if((i.events[s][1].type==="labelImage"||i.events[s][1].type==="labelLink")&&!i.events[s][1]._balanced){l=i.events[s][1];break}return c;function c(y){return l?l._inactive?p(y):(a=i.parser.defined.includes(Bn(i.sliceSerialize({start:l.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(y),e.exit("labelMarker"),e.exit("labelEnd"),d):n(y)}function d(y){return y===40?e.attempt(Sj,m,a?m:p)(y):y===91?e.attempt(bj,m,a?h:p)(y):a?m(y):p(y)}function h(y){return e.attempt(Cj,m,p)(y)}function m(y){return t(y)}function p(y){return l._balanced=!0,n(y)}}function Rj(e,t,n){return i;function i(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),s}function s(p){return tt(p)?ds(e,l)(p):l(p)}function l(p){return p===41?m(p):G0(e,a,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function a(p){return tt(p)?ds(e,d)(p):m(p)}function c(p){return n(p)}function d(p){return p===34||p===39||p===40?Z0(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):m(p)}function h(p){return tt(p)?ds(e,m)(p):m(p)}function m(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function Aj(e,t,n){const i=this;return s;function s(c){return Q0.call(i,e,l,a,"reference","referenceMarker","referenceString")(c)}function l(c){return i.parser.defined.includes(Bn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function a(c){return n(c)}}function Mj(e,t,n){return i;function i(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),s}function s(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const Nj={name:"labelStartImage",resolveAll:Ch.resolveAll,tokenize:jj};function jj(e,t,n){const i=this;return s;function s(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),l}function l(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),a):n(c)}function a(c){return c===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(c):t(c)}}const Ij={name:"labelStartLink",resolveAll:Ch.resolveAll,tokenize:Dj};function Dj(e,t,n){const i=this;return s;function s(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),l}function l(a){return a===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(a):t(a)}}const ff={name:"lineEnding",tokenize:_j};function _j(e,t){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),$e(e,t,"linePrefix")}}const yl={name:"thematicBreak",tokenize:Lj};function Lj(e,t,n){let i=0,s;return l;function l(h){return e.enter("thematicBreak"),a(h)}function a(h){return s=h,c(h)}function c(h){return h===s?(e.enter("thematicBreakSequence"),d(h)):i>=3&&(h===null||Ne(h))?(e.exit("thematicBreak"),t(h)):n(h)}function d(h){return h===s?(e.consume(h),i++,d):(e.exit("thematicBreakSequence"),Ve(h)?$e(e,c,"whitespace")(h):c(h))}}const cn={continuation:{tokenize:Vj},exit:$j,name:"list",tokenize:zj},Oj={partial:!0,tokenize:Uj},Fj={partial:!0,tokenize:Bj};function zj(e,t,n){const i=this,s=i.events[i.events.length-1];let l=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,a=0;return c;function c(w){const S=i.containerState.type||(w===42||w===43||w===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!i.containerState.marker||w===i.containerState.marker:ud(w)){if(i.containerState.type||(i.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),w===42||w===45?e.check(yl,n,h)(w):h(w);if(!i.interrupt||w===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(w)}return n(w)}function d(w){return ud(w)&&++a<10?(e.consume(w),d):(!i.interrupt||a<2)&&(i.containerState.marker?w===i.containerState.marker:w===41||w===46)?(e.exit("listItemValue"),h(w)):n(w)}function h(w){return e.enter("listItemMarker"),e.consume(w),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||w,e.check(_s,i.interrupt?n:m,e.attempt(Oj,y,p))}function m(w){return i.containerState.initialBlankLine=!0,l++,y(w)}function p(w){return Ve(w)?(e.enter("listItemPrefixWhitespace"),e.consume(w),e.exit("listItemPrefixWhitespace"),y):n(w)}function y(w){return i.containerState.size=l+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(w)}}function Vj(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(_s,s,l);function s(c){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,$e(e,t,"listItemIndent",i.containerState.size+1)(c)}function l(c){return i.containerState.furtherBlankLines||!Ve(c)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,a(c)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(Fj,t,a)(c))}function a(c){return i.containerState._closeFlow=!0,i.interrupt=void 0,$e(e,e.attempt(cn,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function Bj(e,t,n){const i=this;return $e(e,s,"listItemIndent",i.containerState.size+1);function s(l){const a=i.events[i.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===i.containerState.size?t(l):n(l)}}function $j(e){e.exit(this.containerState.type)}function Uj(e,t,n){const i=this;return $e(e,s,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(l){const a=i.events[i.events.length-1];return!Ve(l)&&a&&a[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const Rv={name:"setextUnderline",resolveTo:Wj,tokenize:Hj};function Wj(e,t){let n=e.length,i,s,l;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){i=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!l&&e[n][1].type==="definition"&&(l=n);const a={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",l?(e.splice(s,0,["enter",a,t]),e.splice(l+1,0,["exit",e[i][1],t]),e[i][1].end={...e[l][1].end}):e[i][1]=a,e.push(["exit",a,t]),e}function Hj(e,t,n){const i=this;let s;return l;function l(h){let m=i.events.length,p;for(;m--;)if(i.events[m][1].type!=="lineEnding"&&i.events[m][1].type!=="linePrefix"&&i.events[m][1].type!=="content"){p=i.events[m][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||p)?(e.enter("setextHeadingLine"),s=h,a(h)):n(h)}function a(h){return e.enter("setextHeadingLineSequence"),c(h)}function c(h){return h===s?(e.consume(h),c):(e.exit("setextHeadingLineSequence"),Ve(h)?$e(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||Ne(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const Kj={tokenize:qj};function qj(e){const t=this,n=e.attempt(_s,i,e.attempt(this.parser.constructs.flowInitial,s,$e(e,e.attempt(this.parser.constructs.flow,s,e.attempt(ZN,s)),"linePrefix")));return n;function i(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Xj={resolveAll:e1()},Yj=J0("string"),Gj=J0("text");function J0(e){return{resolveAll:e1(e==="text"?Qj:void 0),tokenize:t};function t(n){const i=this,s=this.parser.constructs[e],l=n.attempt(s,a,c);return a;function a(m){return h(m)?l(m):c(m)}function c(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),d}function d(m){return h(m)?(n.exit("data"),l(m)):(n.consume(m),d)}function h(m){if(m===null)return!0;const p=s[m];let y=-1;if(p)for(;++y<p.length;){const w=p[y];if(!w.previous||w.previous.call(i,i.previous))return!0}return!1}}}function e1(e){return t;function t(n,i){let s=-1,l;for(;++s<=n.length;)l===void 0?n[s]&&n[s][1].type==="data"&&(l=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==l+2&&(n[l][1].end=n[s-1][1].end,n.splice(l+2,s-l-2),s=l+2),l=void 0);return e?e(n,i):n}}function Qj(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const i=e[n-1][1],s=t.sliceStream(i);let l=s.length,a=-1,c=0,d;for(;l--;){const h=s[l];if(typeof h=="string"){for(a=h.length;h.charCodeAt(a-1)===32;)c++,a--;if(a)break;a=-1}else if(h===-2)d=!0,c++;else if(h!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const h={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?a:i.start._bufferIndex+a,_index:i.start._index+l,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...h.start},i.start.offset===i.end.offset?Object.assign(i,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const Zj={42:cn,43:cn,45:cn,48:cn,49:cn,50:cn,51:cn,52:cn,53:cn,54:cn,55:cn,56:cn,57:cn,62:K0},Jj={91:rj},eI={[-2]:cf,[-1]:cf,32:cf},tI={35:uj,42:yl,45:[Rv,yl],60:hj,61:Rv,95:yl,96:Tv,126:Tv},nI={38:X0,92:q0},rI={[-5]:ff,[-4]:ff,[-3]:ff,33:Nj,38:X0,42:fd,60:[IN,wj],91:Ij,92:[aj,q0],93:Ch,95:fd,96:KN},iI={null:[fd,Xj]},oI={null:[42,95]},sI={null:[]},aI=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:oI,contentInitial:Jj,disable:sI,document:Zj,flow:tI,flowInitial:eI,insideSpan:iI,string:nI,text:rI},Symbol.toStringTag,{value:"Module"}));function lI(e,t,n){let i={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},l=[];let a=[],c=[];const d={attempt:q(B),check:q(I),consume:R,enter:A,exit:D,interrupt:q(I,{interrupt:!0})},h={code:null,containerState:{},defineSkip:E,events:[],now:S,parser:e,previous:null,sliceSerialize:y,sliceStream:w,write:p};let m=t.tokenize.call(h,d);return t.resolveAll&&l.push(t),h;function p(Y){return a=Tn(a,Y),T(),a[a.length-1]!==null?[]:($(t,0),h.events=Ql(l,h.events,h),h.events)}function y(Y,W){return cI(w(Y),W)}function w(Y){return uI(a,Y)}function S(){const{_bufferIndex:Y,_index:W,line:ue,column:Z,offset:ee}=i;return{_bufferIndex:Y,_index:W,line:ue,column:Z,offset:ee}}function E(Y){s[Y.line]=Y.column,j()}function T(){let Y;for(;i._index<a.length;){const W=a[i._index];if(typeof W=="string")for(Y=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===Y&&i._bufferIndex<W.length;)C(W.charCodeAt(i._bufferIndex));else C(W)}}function C(Y){m=m(Y)}function R(Y){Ne(Y)?(i.line++,i.column=1,i.offset+=Y===-3?2:1,j()):Y!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===a[i._index].length&&(i._bufferIndex=-1,i._index++)),h.previous=Y}function A(Y,W){const ue=W||{};return ue.type=Y,ue.start=S(),h.events.push(["enter",ue,h]),c.push(ue),ue}function D(Y){const W=c.pop();return W.end=S(),h.events.push(["exit",W,h]),W}function B(Y,W){$(Y,W.from)}function I(Y,W){W.restore()}function q(Y,W){return ue;function ue(Z,ee,ge){let Ce,X,ce,P;return Array.isArray(Z)?G(Z):"tokenize"in Z?G([Z]):L(Z);function L(me){return ve;function ve(Ee){const Re=Ee!==null&&me[Ee],Be=Ee!==null&&me.null,ft=[...Array.isArray(Re)?Re:Re?[Re]:[],...Array.isArray(Be)?Be:Be?[Be]:[]];return G(ft)(Ee)}}function G(me){return Ce=me,X=0,me.length===0?ge:M(me[X])}function M(me){return ve;function ve(Ee){return P=K(),ce=me,me.partial||(h.currentConstruct=me),me.name&&h.parser.constructs.disable.null.includes(me.name)?he():me.tokenize.call(W?Object.assign(Object.create(h),W):h,d,J,he)(Ee)}}function J(me){return Y(ce,P),ee}function he(me){return P.restore(),++X<Ce.length?M(Ce[X]):ge}}}function $(Y,W){Y.resolveAll&&!l.includes(Y)&&l.push(Y),Y.resolve&&xn(h.events,W,h.events.length-W,Y.resolve(h.events.slice(W),h)),Y.resolveTo&&(h.events=Y.resolveTo(h.events,h))}function K(){const Y=S(),W=h.previous,ue=h.currentConstruct,Z=h.events.length,ee=Array.from(c);return{from:Z,restore:ge};function ge(){i=Y,h.previous=W,h.currentConstruct=ue,h.events.length=Z,c=ee,j()}}function j(){i.line in s&&i.column<2&&(i.column=s[i.line],i.offset+=s[i.line]-1)}}function uI(e,t){const n=t.start._index,i=t.start._bufferIndex,s=t.end._index,l=t.end._bufferIndex;let a;if(n===s)a=[e[n].slice(i,l)];else{if(a=e.slice(n,s),i>-1){const c=a[0];typeof c=="string"?a[0]=c.slice(i):a.shift()}l>0&&a.push(e[s].slice(0,l))}return a}function cI(e,t){let n=-1;const i=[];let s;for(;++n<e.length;){const l=e[n];let a;if(typeof l=="string")a=l;else switch(l){case-5:{a="\r";break}case-4:{a=`
|
|
254
|
-
`;break}case-3:{a=`\r
|
|
255
|
-
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&s)continue;a=" ";break}default:a=String.fromCharCode(l)}s=l===-2,i.push(a)}return i.join("")}function fI(e){const i={constructs:H0([aI,...(e||{}).extensions||[]]),content:s(TN),defined:[],document:s(RN),flow:s(Kj),lazy:{},string:s(Yj),text:s(Gj)};return i;function s(l){return a;function a(c){return lI(i,l,c)}}}function dI(e){for(;!Y0(e););return e}const Av=/[\0\t\n\r]/g;function hI(){let e=1,t="",n=!0,i;return s;function s(l,a,c){const d=[];let h,m,p,y,w;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(a||void 0).decode(l)),p=0,t="",n&&(l.charCodeAt(0)===65279&&p++,n=void 0);p<l.length;){if(Av.lastIndex=p,h=Av.exec(l),y=h&&h.index!==void 0?h.index:l.length,w=l.charCodeAt(y),!h){t=l.slice(p);break}if(w===10&&p===y&&i)d.push(-3),i=void 0;else switch(i&&(d.push(-5),i=void 0),p<y&&(d.push(l.slice(p,y)),e+=y-p),w){case 0:{d.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,d.push(-2);e++<m;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:i=!0,e=1}p=y+1}return c&&(i&&d.push(-5),t&&d.push(t),d.push(null)),d}}function hs(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Mv(e.position):"start"in e||"end"in e?Mv(e):"line"in e||"column"in e?dd(e):""}function dd(e){return Nv(e&&e.line)+":"+Nv(e&&e.column)}function Mv(e){return dd(e&&e.start)+"-"+dd(e&&e.end)}function Nv(e){return e&&typeof e=="number"?e:1}const t1={}.hasOwnProperty;function n1(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),pI(n)(dI(fI(n).document().write(hI()(e,t,!0))))}function pI(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(dt),autolinkProtocol:K,autolinkEmail:K,atxHeading:l(tn),blockQuote:l(Be),characterEscape:K,characterReference:K,codeFenced:l(ft),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:l(ft,a),codeText:l(qe,a),codeTextData:K,data:K,codeFlowValue:K,definition:l(lt),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:l(_e),hardBreakEscape:l(Rt),hardBreakTrailing:l(Rt),htmlFlow:l(Xe,a),htmlFlowData:K,htmlText:l(Xe,a),htmlTextData:K,image:l(mt),label:a,link:l(dt),listItem:l(Dt),listItemValue:y,listOrdered:l(He,p),listUnordered:l(He),paragraph:l(_t),reference:M,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:l(tn),strong:l(Un),thematicBreak:l(dn)},exit:{atxHeading:d(),atxHeadingSequence:B,autolink:d(),autolinkEmail:Re,autolinkProtocol:Ee,blockQuote:d(),characterEscapeValue:j,characterReferenceMarkerHexadecimal:he,characterReferenceMarkerNumeric:he,characterReferenceValue:me,characterReference:ve,codeFenced:d(T),codeFencedFence:E,codeFencedFenceInfo:w,codeFencedFenceMeta:S,codeFlowValue:j,codeIndented:d(C),codeText:d(ee),codeTextData:j,data:j,definition:d(),definitionDestinationString:D,definitionLabelString:R,definitionTitleString:A,emphasis:d(),hardBreakEscape:d(W),hardBreakTrailing:d(W),htmlFlow:d(ue),htmlFlowData:j,htmlText:d(Z),htmlTextData:j,image:d(Ce),label:ce,labelText:X,lineEnding:Y,link:d(ge),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:J,resourceDestinationString:P,resourceTitleString:L,resource:G,setextHeading:d($),setextHeadingLineSequence:q,setextHeadingText:I,strong:d(),thematicBreak:d()}};r1(t,(e||{}).mdastExtensions||[]);const n={};return i;function i(Q){let le={type:"root",children:[]};const fe={stack:[le],tokenStack:[],config:t,enter:c,exit:h,buffer:a,resume:m,data:n},Le=[];let Fe=-1;for(;++Fe<Q.length;)if(Q[Fe][1].type==="listOrdered"||Q[Fe][1].type==="listUnordered")if(Q[Fe][0]==="enter")Le.push(Fe);else{const gt=Le.pop();Fe=s(Q,gt,Fe)}for(Fe=-1;++Fe<Q.length;){const gt=t[Q[Fe][0]];t1.call(gt,Q[Fe][1].type)&>[Q[Fe][1].type].call(Object.assign({sliceSerialize:Q[Fe][2].sliceSerialize},fe),Q[Fe][1])}if(fe.tokenStack.length>0){const gt=fe.tokenStack[fe.tokenStack.length-1];(gt[1]||jv).call(fe,void 0,gt[0])}for(le.position={start:_r(Q.length>0?Q[0][1].start:{line:1,column:1,offset:0}),end:_r(Q.length>0?Q[Q.length-2][1].end:{line:1,column:1,offset:0})},Fe=-1;++Fe<t.transforms.length;)le=t.transforms[Fe](le)||le;return le}function s(Q,le,fe){let Le=le-1,Fe=-1,gt=!1,Lt,nt,nn,z;for(;++Le<=fe;){const re=Q[Le];switch(re[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{re[0]==="enter"?Fe++:Fe--,z=void 0;break}case"lineEndingBlank":{re[0]==="enter"&&(Lt&&!z&&!Fe&&!nn&&(nn=Le),z=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:z=void 0}if(!Fe&&re[0]==="enter"&&re[1].type==="listItemPrefix"||Fe===-1&&re[0]==="exit"&&(re[1].type==="listUnordered"||re[1].type==="listOrdered")){if(Lt){let O=Le;for(nt=void 0;O--;){const te=Q[O];if(te[1].type==="lineEnding"||te[1].type==="lineEndingBlank"){if(te[0]==="exit")continue;nt&&(Q[nt][1].type="lineEndingBlank",gt=!0),te[1].type="lineEnding",nt=O}else if(!(te[1].type==="linePrefix"||te[1].type==="blockQuotePrefix"||te[1].type==="blockQuotePrefixWhitespace"||te[1].type==="blockQuoteMarker"||te[1].type==="listItemIndent"))break}nn&&(!nt||nn<nt)&&(Lt._spread=!0),Lt.end=Object.assign({},nt?Q[nt][1].start:re[1].end),Q.splice(nt||Le,0,["exit",Lt,re[2]]),Le++,fe++}if(re[1].type==="listItemPrefix"){const O={type:"listItem",_spread:!1,start:Object.assign({},re[1].start),end:void 0};Lt=O,Q.splice(Le,0,["enter",O,re[2]]),Le++,fe++,nn=void 0,z=!0}}}return Q[le][1]._spread=gt,fe}function l(Q,le){return fe;function fe(Le){c.call(this,Q(Le),Le),le&&le.call(this,Le)}}function a(){this.stack.push({type:"fragment",children:[]})}function c(Q,le,fe){this.stack[this.stack.length-1].children.push(Q),this.stack.push(Q),this.tokenStack.push([le,fe||void 0]),Q.position={start:_r(le.start),end:void 0}}function d(Q){return le;function le(fe){Q&&Q.call(this,fe),h.call(this,fe)}}function h(Q,le){const fe=this.stack.pop(),Le=this.tokenStack.pop();if(Le)Le[0].type!==Q.type&&(le?le.call(this,Q,Le[0]):(Le[1]||jv).call(this,Q,Le[0]));else throw new Error("Cannot close `"+Q.type+"` ("+hs({start:Q.start,end:Q.end})+"): it’s not open");fe.position.end=_r(Q.end)}function m(){return kh(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function y(Q){if(this.data.expectingFirstListItemValue){const le=this.stack[this.stack.length-2];le.start=Number.parseInt(this.sliceSerialize(Q),10),this.data.expectingFirstListItemValue=void 0}}function w(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.lang=Q}function S(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.meta=Q}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function T(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.value=Q.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.value=Q.replace(/(\r?\n|\r)$/g,"")}function R(Q){const le=this.resume(),fe=this.stack[this.stack.length-1];fe.label=le,fe.identifier=Bn(this.sliceSerialize(Q)).toLowerCase()}function A(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.title=Q}function D(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.url=Q}function B(Q){const le=this.stack[this.stack.length-1];if(!le.depth){const fe=this.sliceSerialize(Q).length;le.depth=fe}}function I(){this.data.setextHeadingSlurpLineEnding=!0}function q(Q){const le=this.stack[this.stack.length-1];le.depth=this.sliceSerialize(Q).codePointAt(0)===61?1:2}function $(){this.data.setextHeadingSlurpLineEnding=void 0}function K(Q){const fe=this.stack[this.stack.length-1].children;let Le=fe[fe.length-1];(!Le||Le.type!=="text")&&(Le=rr(),Le.position={start:_r(Q.start),end:void 0},fe.push(Le)),this.stack.push(Le)}function j(Q){const le=this.stack.pop();le.value+=this.sliceSerialize(Q),le.position.end=_r(Q.end)}function Y(Q){const le=this.stack[this.stack.length-1];if(this.data.atHardBreak){const fe=le.children[le.children.length-1];fe.position.end=_r(Q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(le.type)&&(K.call(this,Q),j.call(this,Q))}function W(){this.data.atHardBreak=!0}function ue(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.value=Q}function Z(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.value=Q}function ee(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.value=Q}function ge(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const le=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=le,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function Ce(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const le=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=le,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function X(Q){const le=this.sliceSerialize(Q),fe=this.stack[this.stack.length-2];fe.label=cN(le),fe.identifier=Bn(le).toLowerCase()}function ce(){const Q=this.stack[this.stack.length-1],le=this.resume(),fe=this.stack[this.stack.length-1];if(this.data.inReference=!0,fe.type==="link"){const Le=Q.children;fe.children=Le}else fe.alt=le}function P(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.url=Q}function L(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.title=Q}function G(){this.data.inReference=void 0}function M(){this.data.referenceType="collapsed"}function J(Q){const le=this.resume(),fe=this.stack[this.stack.length-1];fe.label=le,fe.identifier=Bn(this.sliceSerialize(Q)).toLowerCase(),this.data.referenceType="full"}function he(Q){this.data.characterReferenceType=Q.type}function me(Q){const le=this.sliceSerialize(Q),fe=this.data.characterReferenceType;let Le;fe?(Le=U0(le,fe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Le=bh(le);const Fe=this.stack[this.stack.length-1];Fe.value+=Le}function ve(Q){const le=this.stack.pop();le.position.end=_r(Q.end)}function Ee(Q){j.call(this,Q);const le=this.stack[this.stack.length-1];le.url=this.sliceSerialize(Q)}function Re(Q){j.call(this,Q);const le=this.stack[this.stack.length-1];le.url="mailto:"+this.sliceSerialize(Q)}function Be(){return{type:"blockquote",children:[]}}function ft(){return{type:"code",lang:null,meta:null,value:""}}function qe(){return{type:"inlineCode",value:""}}function lt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function _e(){return{type:"emphasis",children:[]}}function tn(){return{type:"heading",depth:0,children:[]}}function Rt(){return{type:"break"}}function Xe(){return{type:"html",value:""}}function mt(){return{type:"image",title:null,url:"",alt:null}}function dt(){return{type:"link",title:null,url:"",children:[]}}function He(Q){return{type:"list",ordered:Q.type==="listOrdered",start:null,spread:Q._spread,children:[]}}function Dt(Q){return{type:"listItem",spread:Q._spread,checked:null,children:[]}}function _t(){return{type:"paragraph",children:[]}}function Un(){return{type:"strong",children:[]}}function rr(){return{type:"text",value:""}}function dn(){return{type:"thematicBreak"}}}function _r(e){return{line:e.line,column:e.column,offset:e.offset}}function r1(e,t){let n=-1;for(;++n<t.length;){const i=t[n];Array.isArray(i)?r1(e,i):mI(e,i)}}function mI(e,t){let n;for(n in t)if(t1.call(t,n))switch(n){case"canContainEols":{const i=t[n];i&&e[n].push(...i);break}case"transforms":{const i=t[n];i&&e[n].push(...i);break}case"enter":case"exit":{const i=t[n];i&&Object.assign(e[n],i);break}}}function jv(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+hs({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+hs({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+hs({start:t.start,end:t.end})+") is still open")}const gI={tokenize:SI,partial:!0},i1={tokenize:bI,partial:!0},o1={tokenize:CI,partial:!0},s1={tokenize:EI,partial:!0},yI={tokenize:TI,partial:!0},a1={name:"wwwAutolink",tokenize:wI,previous:u1},l1={name:"protocolAutolink",tokenize:kI,previous:c1},mr={name:"emailAutolink",tokenize:xI,previous:f1},tr={};function vI(){return{text:tr}}let ai=48;for(;ai<123;)tr[ai]=mr,ai++,ai===58?ai=65:ai===91&&(ai=97);tr[43]=mr;tr[45]=mr;tr[46]=mr;tr[95]=mr;tr[72]=[mr,l1];tr[104]=[mr,l1];tr[87]=[mr,a1];tr[119]=[mr,a1];function xI(e,t,n){const i=this;let s,l;return a;function a(p){return!hd(p)||!f1.call(i,i.previous)||Eh(i.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(p))}function c(p){return hd(p)?(e.consume(p),c):p===64?(e.consume(p),d):n(p)}function d(p){return p===46?e.check(yI,m,h)(p):p===45||p===95||Kt(p)?(l=!0,e.consume(p),d):m(p)}function h(p){return e.consume(p),s=!0,d}function m(p){return l&&s&&Qt(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function wI(e,t,n){const i=this;return s;function s(a){return a!==87&&a!==119||!u1.call(i,i.previous)||Eh(i.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(gI,e.attempt(i1,e.attempt(o1,l),n),n)(a))}function l(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function kI(e,t,n){const i=this;let s="",l=!1;return a;function a(p){return(p===72||p===104)&&c1.call(i,i.previous)&&!Eh(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(p),e.consume(p),c):n(p)}function c(p){if(Qt(p)&&s.length<5)return s+=String.fromCodePoint(p),e.consume(p),c;if(p===58){const y=s.toLowerCase();if(y==="http"||y==="https")return e.consume(p),d}return n(p)}function d(p){return p===47?(e.consume(p),l?h:(l=!0,d)):n(p)}function h(p){return p===null||_l(p)||tt(p)||vi(p)||Xl(p)?n(p):e.attempt(i1,e.attempt(o1,m),n)(p)}function m(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function SI(e,t,n){let i=0;return s;function s(a){return(a===87||a===119)&&i<3?(i++,e.consume(a),s):a===46&&i===3?(e.consume(a),l):n(a)}function l(a){return a===null?n(a):t(a)}}function bI(e,t,n){let i,s,l;return a;function a(h){return h===46||h===95?e.check(s1,d,c)(h):h===null||tt(h)||vi(h)||h!==45&&Xl(h)?d(h):(l=!0,e.consume(h),a)}function c(h){return h===95?i=!0:(s=i,i=void 0),e.consume(h),a}function d(h){return s||i||!l?n(h):t(h)}}function CI(e,t){let n=0,i=0;return s;function s(a){return a===40?(n++,e.consume(a),s):a===41&&i<n?l(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(s1,t,l)(a):a===null||tt(a)||vi(a)?t(a):(e.consume(a),s)}function l(a){return a===41&&i++,e.consume(a),s}}function EI(e,t,n){return i;function i(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),i):c===38?(e.consume(c),l):c===93?(e.consume(c),s):c===60||c===null||tt(c)||vi(c)?t(c):n(c)}function s(c){return c===null||c===40||c===91||tt(c)||vi(c)?t(c):i(c)}function l(c){return Qt(c)?a(c):n(c)}function a(c){return c===59?(e.consume(c),i):Qt(c)?(e.consume(c),a):n(c)}}function TI(e,t,n){return i;function i(l){return e.consume(l),s}function s(l){return Kt(l)?n(l):t(l)}}function u1(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||tt(e)}function c1(e){return!Qt(e)}function f1(e){return!(e===47||hd(e))}function hd(e){return e===43||e===45||e===46||e===95||Kt(e)}function Eh(e){let t=e.length,n=!1;for(;t--;){const i=e[t][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){n=!0;break}if(i._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const PI={tokenize:_I,partial:!0};function RI(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:jI,continuation:{tokenize:II},exit:DI}},text:{91:{name:"gfmFootnoteCall",tokenize:NI},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:AI,resolveTo:MI}}}}function AI(e,t,n){const i=this;let s=i.events.length;const l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a;for(;s--;){const d=i.events[s][1];if(d.type==="labelImage"){a=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!a||!a._balanced)return n(d);const h=Bn(i.sliceSerialize({start:a.end,end:i.now()}));return h.codePointAt(0)!==94||!l.includes(h.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function MI(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const l={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},c=[e[n+1],e[n+2],["enter",i,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",l,t],["enter",a,t],["exit",a,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(n,e.length-n+1,...c),e}function NI(e,t,n){const i=this,s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let l=0,a;return c;function c(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),d}function d(p){return p!==94?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(p){if(l>999||p===93&&!a||p===null||p===91||tt(p))return n(p);if(p===93){e.exit("chunkString");const y=e.exit("gfmFootnoteCallString");return s.includes(Bn(i.sliceSerialize(y)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return tt(p)||(a=!0),l++,e.consume(p),p===92?m:h}function m(p){return p===91||p===92||p===93?(e.consume(p),l++,h):h(p)}}function jI(e,t,n){const i=this,s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let l,a=0,c;return d;function d(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):n(S)}function m(S){if(a>999||S===93&&!c||S===null||S===91||tt(S))return n(S);if(S===93){e.exit("chunkString");const E=e.exit("gfmFootnoteDefinitionLabelString");return l=Bn(i.sliceSerialize(E)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),y}return tt(S)||(c=!0),a++,e.consume(S),S===92?p:m}function p(S){return S===91||S===92||S===93?(e.consume(S),a++,m):m(S)}function y(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),s.includes(l)||s.push(l),$e(e,w,"gfmFootnoteDefinitionWhitespace")):n(S)}function w(S){return t(S)}}function II(e,t,n){return e.check(_s,t,e.attempt(PI,t,n))}function DI(e){e.exit("gfmFootnoteDefinition")}function _I(e,t,n){const i=this;return $e(e,s,"gfmFootnoteDefinitionIndent",5);function s(l){const a=i.events[i.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(l):n(l)}}function LI(e){let n=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:l,resolveAll:s};return n==null&&(n=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function s(a,c){let d=-1;for(;++d<a.length;)if(a[d][0]==="enter"&&a[d][1].type==="strikethroughSequenceTemporary"&&a[d][1]._close){let h=d;for(;h--;)if(a[h][0]==="exit"&&a[h][1].type==="strikethroughSequenceTemporary"&&a[h][1]._open&&a[d][1].end.offset-a[d][1].start.offset===a[h][1].end.offset-a[h][1].start.offset){a[d][1].type="strikethroughSequence",a[h][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},a[h][1].start),end:Object.assign({},a[d][1].end)},p={type:"strikethroughText",start:Object.assign({},a[h][1].end),end:Object.assign({},a[d][1].start)},y=[["enter",m,c],["enter",a[h][1],c],["exit",a[h][1],c],["enter",p,c]],w=c.parser.constructs.insideSpan.null;w&&xn(y,y.length,0,Ql(w,a.slice(h+1,d),c)),xn(y,y.length,0,[["exit",p,c],["enter",a[d][1],c],["exit",a[d][1],c],["exit",m,c]]),xn(a,h-1,d-h+3,y),d=h+y.length-2;break}}for(d=-1;++d<a.length;)a[d][1].type==="strikethroughSequenceTemporary"&&(a[d][1].type="data");return a}function l(a,c,d){const h=this.previous,m=this.events;let p=0;return y;function y(S){return h===126&&m[m.length-1][1].type!=="characterEscape"?d(S):(a.enter("strikethroughSequenceTemporary"),w(S))}function w(S){const E=oo(h);if(S===126)return p>1?d(S):(a.consume(S),p++,w);if(p<2&&!n)return d(S);const T=a.exit("strikethroughSequenceTemporary"),C=oo(S);return T._open=!C||C===2&&!!E,T._close=!E||E===2&&!!C,c(S)}}}class OI{constructor(){this.map=[]}add(t,n,i){FI(this,t,n,i)}consume(t){if(this.map.sort(function(l,a){return l[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const i=[];for(;n>0;)n-=1,i.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];i.push(t.slice()),t.length=0;let s=i.pop();for(;s;){for(const l of s)t.push(l);s=i.pop()}this.map.length=0}}function FI(e,t,n,i){let s=0;if(!(n===0&&i.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...i);return}s+=1}e.map.push([t,n,i])}}function zI(e,t){let n=!1;const i=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&i.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const l=i.length-1;i[l]=i[l]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return i}function VI(){return{flow:{null:{name:"table",tokenize:BI,resolveAll:$I}}}}function BI(e,t,n){const i=this;let s=0,l=0,a;return c;function c(j){let Y=i.events.length-1;for(;Y>-1;){const Z=i.events[Y][1].type;if(Z==="lineEnding"||Z==="linePrefix")Y--;else break}const W=Y>-1?i.events[Y][1].type:null,ue=W==="tableHead"||W==="tableRow"?I:d;return ue===I&&i.parser.lazy[i.now().line]?n(j):ue(j)}function d(j){return e.enter("tableHead"),e.enter("tableRow"),h(j)}function h(j){return j===124||(a=!0,l+=1),m(j)}function m(j){return j===null?n(j):Ne(j)?l>1?(l=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),w):n(j):Ve(j)?$e(e,m,"whitespace")(j):(l+=1,a&&(a=!1,s+=1),j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),a=!0,m):(e.enter("data"),p(j)))}function p(j){return j===null||j===124||tt(j)?(e.exit("data"),m(j)):(e.consume(j),j===92?y:p)}function y(j){return j===92||j===124?(e.consume(j),p):p(j)}function w(j){return i.interrupt=!1,i.parser.lazy[i.now().line]?n(j):(e.enter("tableDelimiterRow"),a=!1,Ve(j)?$e(e,S,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):S(j))}function S(j){return j===45||j===58?T(j):j===124?(a=!0,e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),E):B(j)}function E(j){return Ve(j)?$e(e,T,"whitespace")(j):T(j)}function T(j){return j===58?(l+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),C):j===45?(l+=1,C(j)):j===null||Ne(j)?D(j):B(j)}function C(j){return j===45?(e.enter("tableDelimiterFiller"),R(j)):B(j)}function R(j){return j===45?(e.consume(j),R):j===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),A):(e.exit("tableDelimiterFiller"),A(j))}function A(j){return Ve(j)?$e(e,D,"whitespace")(j):D(j)}function D(j){return j===124?S(j):j===null||Ne(j)?!a||s!==l?B(j):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(j)):B(j)}function B(j){return n(j)}function I(j){return e.enter("tableRow"),q(j)}function q(j){return j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),q):j===null||Ne(j)?(e.exit("tableRow"),t(j)):Ve(j)?$e(e,q,"whitespace")(j):(e.enter("data"),$(j))}function $(j){return j===null||j===124||tt(j)?(e.exit("data"),q(j)):(e.consume(j),j===92?K:$)}function K(j){return j===92||j===124?(e.consume(j),$):$(j)}}function $I(e,t){let n=-1,i=!0,s=0,l=[0,0,0,0],a=[0,0,0,0],c=!1,d=0,h,m,p;const y=new OI;for(;++n<e.length;){const w=e[n],S=w[1];w[0]==="enter"?S.type==="tableHead"?(c=!1,d!==0&&(Iv(y,t,d,h,m),m=void 0,d=0),h={type:"table",start:Object.assign({},S.start),end:Object.assign({},S.end)},y.add(n,0,[["enter",h,t]])):S.type==="tableRow"||S.type==="tableDelimiterRow"?(i=!0,p=void 0,l=[0,0,0,0],a=[0,n+1,0,0],c&&(c=!1,m={type:"tableBody",start:Object.assign({},S.start),end:Object.assign({},S.end)},y.add(n,0,[["enter",m,t]])),s=S.type==="tableDelimiterRow"?2:m?3:1):s&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")?(i=!1,a[2]===0&&(l[1]!==0&&(a[0]=a[1],p=Za(y,t,l,s,void 0,p),l=[0,0,0,0]),a[2]=n)):S.type==="tableCellDivider"&&(i?i=!1:(l[1]!==0&&(a[0]=a[1],p=Za(y,t,l,s,void 0,p)),l=a,a=[l[1],n,0,0])):S.type==="tableHead"?(c=!0,d=n):S.type==="tableRow"||S.type==="tableDelimiterRow"?(d=n,l[1]!==0?(a[0]=a[1],p=Za(y,t,l,s,n,p)):a[1]!==0&&(p=Za(y,t,a,s,n,p)),s=0):s&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")&&(a[3]=n)}for(d!==0&&Iv(y,t,d,h,m),y.consume(t.events),n=-1;++n<t.events.length;){const w=t.events[n];w[0]==="enter"&&w[1].type==="table"&&(w[1]._align=zI(t.events,n))}return e}function Za(e,t,n,i,s,l){const a=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(l.end=Object.assign({},Gi(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));const d=Gi(t.events,n[1]);if(l={type:a,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){const h=Gi(t.events,n[2]),m=Gi(t.events,n[3]),p={type:c,start:Object.assign({},h),end:Object.assign({},m)};if(e.add(n[2],0,[["enter",p,t]]),i!==2){const y=t.events[n[2]],w=t.events[n[3]];if(y[1].end=Object.assign({},w[1].end),y[1].type="chunkText",y[1].contentType="text",n[3]>n[2]+1){const S=n[2]+1,E=n[3]-n[2]-1;e.add(S,E,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return s!==void 0&&(l.end=Object.assign({},Gi(t.events,s)),e.add(s,0,[["exit",l,t]]),l=void 0),l}function Iv(e,t,n,i,s){const l=[],a=Gi(t.events,n);s&&(s.end=Object.assign({},a),l.push(["exit",s,t])),i.end=Object.assign({},a),l.push(["exit",i,t]),e.add(n+1,0,l)}function Gi(e,t){const n=e[t],i=n[0]==="enter"?"start":"end";return n[1][i]}const UI={name:"tasklistCheck",tokenize:HI};function WI(){return{text:{91:UI}}}function HI(e,t,n){const i=this;return s;function s(d){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),l)}function l(d){return tt(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),a):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),a):n(d)}function a(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(d)}function c(d){return Ne(d)?t(d):Ve(d)?e.check({tokenize:KI},t,n)(d):n(d)}}function KI(e,t,n){return $e(e,i,"whitespace");function i(s){return s===null?n(s):t(s)}}function d1(e){return H0([vI(),RI(),LI(e),VI(),WI()])}function h1(e){return typeof e=="string"&&/\.md$/i.test(e.trim())}function qI(e,t){const n=String(e??"").trim().split(/\r?\n/).map(s=>`> ${s}`).join(`
|
|
256
|
-
`),i=String(t??"").trim();return n&&i?`${n}
|
|
257
|
-
|
|
258
|
-
${i}`:n||i}function XI(e){const t=String(e??""),n=t.lastIndexOf(".");return`${n>0?t.slice(0,n):t}_review.md`}function YI(e,t,n){const i=String(e??""),s=String(t??""),l=Math.max(0,Number(n)||0);if(!s)return 0;let a=0,c=0;for(;c<=i.length;){const d=i.indexOf(s,c);if(d<0||d>=l)return a;a+=1,c=d+Math.max(s.length,1)}return a}function GI(e){return(String(e??"").match(/https?:\/\/[^\s<>()\[\]{}"']+/gi)??[]).map(n=>n.replace(/[.,!?;:]+$/,""))}function pd(e){return e?.kind!=="file"?null:String(e.mime??"").toLowerCase().startsWith("image/")?"photo":"file"}function QI(e){const t=i=>{const s=Date.parse(String(i??""));return Number.isFinite(s)?s:0},n=new Map;for(const i of e??[]){const s=String(i?.message?.filename||"file"),l=n.get(s)??[];l.push(i),n.set(s,l)}return[...n.entries()].map(([i,s])=>({filename:i,versions:s.sort((l,a)=>t(a.message?.date)-t(l.message?.date))})).sort((i,s)=>t(s.versions[0]?.message?.date)-t(i.versions[0]?.message?.date))}const ZI=new Set(["delete","emphasis","inlineCode","link","linkReference","strong"]);function JI(e){const t=n1(e,{extensions:[d1()],mdastExtensions:[W0()]}),n=[],i=[],s=[],l=(c,d)=>{const h=String(c??""),m=d.position?.start?.offset,p=d.position?.end?.offset;if(!h||!Number.isInteger(m)||!Number.isInteger(p))return;const y=e.slice(m,p),w=y.indexOf(h);if(w>=0){for(let E=0;E<h.length;E+=1)n.push(h[E]),i.push(m+w+E+1);return}let S=0;for(const E of h){const T=y.indexOf(E,S),C=T>=0?T:Math.min(S,Math.max(y.length-1,0));n.push(E),i.push(m+C+1),S=C+1}},a=c=>{const d=n.length;if(c.type==="text"||c.type==="inlineCode"||c.type==="code")l(c.value,c);else for(const p of c.children??[])a(p);const h=n.length,m=c.position?.end?.offset;h>d&&ZI.has(c.type)&&Number.isInteger(m)&&s.push({visibleEnd:h,rawEnd:m})};return a(t),{text:n.join(""),rawEnds:i,trailingRanges:s}}function eD(e,t,n){let i=-1,s=0;for(let l=0;l<=n;l+=1){if(i=e.indexOf(t,s),i<0)return-1;s=i+Math.max(t.length,1)}return i}function tD(e,t){const n=String(e??""),i=JI(n),s=new Map,l=[];for(const[d,h]of(t??[]).entries()){const m=String(h?.selection??"").trim(),p=String(h?.comment??"").trim().replace(/\s+/g," ").replace(/\]\]/g,"] ]");if(!p)continue;const y=`[[REVIEW COMMENT ${d+1}: ${p}]]`,w=Number.isInteger(h?.occurrence)&&h.occurrence>=0?h.occurrence:0,S=m?eD(i.text,m,w):-1,E=S+m.length;let T=S>=0?i.rawEnds[E-1]:void 0;if(!Number.isInteger(T)){l.push(`[[REVIEW COMMENT ${d+1} — ANCHOR NOT FOUND: ${p}]]`);continue}for(const R of i.trailingRanges)R.visibleEnd===E&&(T=Math.max(T,R.rawEnd));const C=s.get(T)??[];C.push(y),s.set(T,C)}let a=n;const c=[...s.keys()].sort((d,h)=>h-d);for(const d of c)a=`${a.slice(0,d)} ${s.get(d).join(" ")}${a.slice(d)}`;return l.length>0&&(a=`${a.trimEnd()}
|
|
259
|
-
|
|
260
|
-
${l.join(`
|
|
261
|
-
`)}
|
|
262
|
-
`),a}const nD=["default-src 'none'","script-src 'none'","connect-src 'none'","frame-src 'none'","child-src 'none'","object-src 'none'","worker-src 'none'","manifest-src 'none'","form-action 'none'","base-uri 'none'","img-src data: blob:","media-src data: blob:","font-src data:","style-src 'unsafe-inline'"].join("; "),rD="",iD="application/octet-stream",oD=/\.([A-Za-z0-9]{1,12})$/;function p1(e){return String(e??"").split(";")[0].trim().toLowerCase()}function m1(e){const t=oD.exec(String(e??"").trim());return t?t[1].toLowerCase():""}function sD(e){const t=m1(e);return t==="html"||t==="htm"}function Zl(e,t){return sD(e)?!0:m1(e)?!1:p1(t)==="text/html"}function Th(e,t){const n=p1(e);return n==="text/html"||Zl(t,e)?iD:n}const aD=[":root{color-scheme:light}","html{background:#fff}","body{margin:0;padding:24px;color:#0f172a;font:15px/1.65 ui-sans-serif,system-ui,-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;overflow-wrap:break-word}","img,video,svg,canvas,iframe{max-width:100%;height:auto}","pre{overflow:auto}","table{max-width:100%}"].join("");function lD(e){return["<!doctype html>","<html>","<head>",`<meta http-equiv="Content-Security-Policy" content="${nD}">`,'<meta charset="utf-8">','<meta name="referrer" content="no-referrer">','<meta name="viewport" content="width=device-width, initial-scale=1">',`<style>${aD}</style>`,"</head>","<body>",String(e??""),"</body>","</html>"].join(`
|
|
263
|
-
`)}const md=48e3,uD=Object.freeze([{rec:"audio/webm;codecs=opus",base:"audio/webm",ext:"webm"},{rec:"audio/ogg;codecs=opus",base:"audio/ogg",ext:"ogg"},{rec:"audio/webm",base:"audio/webm",ext:"webm"},{rec:"audio/mp4",base:"audio/mp4",ext:"m4a"}]),g1="x-ours-duration",cD=4e3;function fD(e){return!Number.isFinite(e)||e<=0?null:String(Math.round(e*100)/100)}function dD(e,t){const n=t===null?null:fD(t);return n===null?e:`${e};${g1}=${n}`}function hD(e){if(!e)return null;const t=new RegExp(`${g1}\\s*=\\s*([0-9]*\\.?[0-9]+)`,"i").exec(e);if(!t)return null;const n=Number(t[1]);return Number.isFinite(n)&&n>0?n:null}function pD(e,t=cD){return typeof Audio!="function"||typeof URL?.createObjectURL!="function"?Promise.resolve(null):new Promise(n=>{const i=URL.createObjectURL(e),s=new Audio;let l=!1;const a=d=>{l||(l=!0,clearTimeout(c),s.removeAttribute("src"),s.load(),URL.revokeObjectURL(i),n(Number.isFinite(d)&&(d??0)>0?d:null))},c=setTimeout(()=>a(null),t);s.addEventListener("loadedmetadata",()=>{Number.isFinite(s.duration)&&s.duration>0?a(s.duration):s.currentTime=Number.MAX_SAFE_INTEGER},{once:!0}),s.addEventListener("durationchange",()=>{Number.isFinite(s.duration)&&s.duration>0&&a(s.duration)}),s.addEventListener("error",()=>a(null),{once:!0}),s.preload="metadata",s.src=i})}const y1=40,mD=44,v1=.14,gD=.5,yD=e=>e<0?0:e>1?1:e;function x1(e,{floor:t=v1,gamma:n=gD}={}){const i=Math.pow(yD(Number.isFinite(e)?e:0),n);return t+(1-t)*i}function vD(e,t=y1){const n=Math.max(1,Math.floor(t)),i=new Array(n).fill(0);if(!e||e.length===0)return i;const s=e.length/n;for(let l=0;l<n;l++){const a=Math.floor(l*s),c=Math.min(e.length,Math.max(a+1,Math.floor((l+1)*s)));let d=0;for(let h=a;h<c;h++)d+=e[h]*e[h];i[l]=Math.sqrt(d/(c-a))}return i}function xD(e,t={}){const{silenceFloor:n=1e-4}=t,i=e.reduce((s,l)=>l>s?l:s,0);return i>n?e.map(s=>x1(s/i,t)):e.map(()=>v1)}function wD({decay:e=.995,minReference:t=.02}={}){let n=t;return{push(i){const s=Number.isFinite(i)&&i>0?i:0;return n=Math.max(t,n*e,s),x1(s/n)},get reference(){return n}}}function w1(e){return Th(e.mime,e.filename)}function Ph(e){const[t,n]=k.useState({url:null,size:0,loaded:!1});return k.useEffect(()=>{let i=null,s=!1;n({url:null,size:0,loaded:!1});const l=e.available?A2(e.id):null;return l?(n({url:l,size:e.size,loaded:!0}),()=>{}):(ql(e.id).then(a=>{if(s)return;if(!a){n({url:null,size:0,loaded:!0});return}const c=URL.createObjectURL(new Blob([a],{type:w1(e)}));i=c,n({url:c,size:a.byteLength,loaded:!0})}),()=>{s=!0,i&&URL.revokeObjectURL(i)})},[e.id,e.available]),t}function Rh({label:e}){return v.jsxs("div",{className:"file-offdevice",children:[v.jsx("div",{className:"file-offdevice-ic",children:v.jsx(Se,{name:"inbox",size:16})}),v.jsxs("div",{className:"filecard-meta",children:[v.jsx("div",{className:"filecard-name",title:e,children:e}),v.jsx("div",{className:"filecard-sub",children:"Available on your original device"})]})]})}function kD(e){const t=new Date(e);return isNaN(t.getTime())?"":t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function Dv({rec:e}){if(!e.transcription)return null;const t=e.transcription.text?.trim();return v.jsx("div",{className:"voice-transcript",children:t||`Transcription ${e.transcription.status??"unavailable"}${e.transcription.error_category?` · ${e.transcription.error_category}`:""}`})}function SD({rec:e,receipt:t,receiptless:n,onPreview:i,onFetch:s}){const l=e.dir==="out",a=`bubble file-bubble${l?" me":""}`,c=io(e.mime,e.filename)?"Voice message":"File",d=v.jsxs("div",{className:"bubble-at",children:[kD(e.date),l&&v.jsx(C0,{receipt:t,content:c,receiptless:n})]});return e.mime.startsWith("image/")?v.jsx(bD,{rec:e,cls:a,footer:d,onFetch:s}):io(e.mime,e.filename)?v.jsx(CD,{rec:e,cls:a,footer:d,onFetch:s}):v.jsx(ED,{rec:e,cls:a,footer:d,onPreview:i,onFetch:s})}function Ah({rec:e,onFetch:t}){const[n,i]=k.useState(!1),[s,l]=k.useState(!1);return v.jsxs("div",{className:"file-offdevice",children:[v.jsx("div",{className:"file-offdevice-ic",children:v.jsx(Se,{name:"inbox",size:16})}),v.jsxs("div",{className:"filecard-meta",children:[v.jsx("div",{className:"filecard-name",title:e.filename,children:io(e.mime,e.filename)?"Voice message":e.filename}),v.jsx("div",{className:"filecard-sub",children:s?"Could not fetch media":"Available after explicit fetch"})]}),v.jsx("button",{className:"btn sm",disabled:n,onClick:()=>{i(!0),l(!1),(t?.(e.id)??j2(e.id)).catch(()=>l(!0)).finally(()=>i(!1))},children:n?"Fetching…":"Fetch"})]})}function bD({rec:e,cls:t,footer:n,onFetch:i}){const{url:s,loaded:l}=Ph(e);return l&&!s?v.jsxs("div",{className:t+" filecard-bubble file-offdevice-bubble",children:[e.available===!1?v.jsx(Ah,{rec:e,onFetch:i}):v.jsx(Rh,{label:e.filename&&e.filename!=="file"?e.filename:"Photo"}),n]}):v.jsxs("div",{className:t+" image-bubble",children:[s?v.jsx("a",{href:s,target:"_blank",rel:"noreferrer",title:e.filename,children:v.jsx("img",{src:s,alt:e.filename})}):v.jsx("div",{className:"file-loading",children:"loading…"}),n]})}function CD({rec:e,cls:t,footer:n,onFetch:i}){const{url:s,loaded:l}=Ph(e),a=k.useRef(null),c=k.useRef(null),[d,h]=k.useState(!1),[m,p]=k.useState(0),[y,w]=k.useState(()=>hD(e.mime)),[S,E]=k.useState(!1),[T,C]=k.useState(null);if(k.useEffect(()=>{if(!s)return;let $=!1;const K=typeof window>"u"?void 0:window.AudioContext||window.webkitAudioContext;if(!K)return;const j=new K,Y=()=>{try{j.close()?.catch?.(()=>{})}catch{}};return(async()=>{try{const W=await fetch(s).then(Z=>Z.arrayBuffer()),ue=await j.decodeAudioData(W);if($)return;C(xD(vD(ue.getChannelData(0),y1)))}catch{}finally{Y()}})(),()=>{$=!0,Y()}},[s]),l&&!s)return v.jsxs("div",{className:t+" filecard-bubble file-offdevice-bubble",children:[e.available===!1?v.jsx(Ah,{rec:e,onFetch:i}):v.jsx(Rh,{label:"Voice message"}),n,v.jsx(Dv,{rec:e})]});const R=()=>{const $=a.current;$&&(d?$.pause():$.play())},A=$=>{const K=c.current;if(!K)return 0;const j=K.getBoundingClientRect();return Math.max(0,Math.min(1,($-j.left)/j.width))},D=$=>{const K=a.current;p($),K&&y&&isFinite(y)&&(K.currentTime=$*y)},B=$=>{s&&($.currentTarget.setPointerCapture?.($.pointerId),E(!0),D(A($.clientX)))},I=$=>{S&&D(A($.clientX))},q=$=>{S&&($.currentTarget.releasePointerCapture?.($.pointerId),E(!1))};return v.jsxs("div",{className:t+" voice-bubble",children:[v.jsx("button",{className:"voice-play",onClick:R,disabled:!s,title:d?"Pause":"Play",children:v.jsx(Se,{name:d?"pause":"play",size:14})}),v.jsxs("div",{className:"voice-track"+(s?" seekable":"")+(S?" scrubbing":"")+(T?" has-wave":""),ref:c,onPointerDown:B,onPointerMove:I,onPointerUp:q,onPointerCancel:q,role:s?"slider":void 0,"aria-label":s?"Seek":void 0,"aria-valuenow":Math.round(m*100),children:[T?v.jsx("div",{className:"voice-wave","aria-hidden":!0,children:T.map(($,K)=>v.jsx("span",{className:"voice-wave-bar"+(K/T.length<m?" played":""),style:{height:`${Math.round($*100)}%`}},K))}):v.jsx("div",{className:"voice-track-fill",style:{width:`${m*100}%`}}),s&&v.jsx("span",{className:"voice-track-knob",style:{left:`${m*100}%`}})]}),v.jsx("span",{className:"voice-dur mono",children:y!==null?`${Math.floor(y/60)}:${String(Math.floor(y%60)).padStart(2,"0")}`:"·:··"}),s&&v.jsx("audio",{ref:a,src:s,onPlay:()=>h(!0),onPause:()=>h(!1),onEnded:()=>{h(!1),p(0)},onTimeUpdate:$=>{const K=$.currentTarget;!S&&K.duration>0&&isFinite(K.duration)&&p(K.currentTime/K.duration)},onLoadedMetadata:$=>{const K=$.currentTarget.duration;isFinite(K)&&K>0&&w(K)}}),n,v.jsx(Dv,{rec:e})]})}function ED({rec:e,cls:t,footer:n,onPreview:i,onFetch:s}){const{url:l,size:a,loaded:c}=Ph(e);return c&&!l?v.jsxs("div",{className:t+" filecard-bubble file-offdevice-bubble",children:[e.available===!1?v.jsx(Ah,{rec:e,onFetch:s}):v.jsx(Rh,{label:e.filename}),n]}):v.jsxs("div",{className:t+" filecard-bubble",children:[v.jsxs("div",{className:"filecard",children:[v.jsx("div",{className:"filecard-ic",children:v.jsx(Se,{name:"copy",size:18})}),v.jsxs("div",{className:"filecard-meta",children:[v.jsx("div",{className:"filecard-name",title:e.filename,children:e.filename}),v.jsx("div",{className:"filecard-sub",children:a?$r(a):e.size?$r(e.size):""})]}),h1(e.filename)&&l&&i&&v.jsx("button",{className:"icon-btn",onClick:()=>i(e),title:"Preview markdown",children:v.jsx(Se,{name:"monitor",size:16})}),Zl(e.filename,e.mime)&&l&&i&&v.jsx("button",{className:"icon-btn",onClick:()=>i(e),title:"Preview HTML",children:v.jsx(Se,{name:"monitor",size:16})}),v.jsx("a",{className:"icon-btn"+(l?"":" disabled"),href:l??void 0,download:e.filename,title:"Download",children:v.jsx(Se,{name:"download",size:16})})]}),n]})}function k1(e){const{att:t}=e,[n,i]=k.useState(null);return k.useEffect(()=>{const s=w1({mime:t.mime,filename:t.filename}),l=URL.createObjectURL(new Blob([t.bytes],{type:s}));return i(l),()=>URL.revokeObjectURL(l)},[t]),v.jsxs("div",{className:"attach-preview",children:[t.mime.startsWith("image/")&&n?v.jsx("img",{className:"attach-thumb",src:n,alt:t.filename}):t.voice&&n?v.jsx("audio",{className:"attach-audio",src:n,controls:!0}):v.jsx("div",{className:"filecard-ic",children:v.jsx(Se,{name:"copy",size:16})}),v.jsxs("div",{className:"filecard-meta",children:[v.jsx("div",{className:"filecard-name",title:t.filename,children:t.voice?"Voice message":t.filename}),v.jsxs("div",{className:"filecard-sub",children:[$r(t.bytes.length),t.originalSize&&t.originalSize>t.bytes.length?` · optimized from ${$r(t.originalSize)}`:""]})]}),v.jsx("button",{className:"btn primary sm",disabled:e.sending,onClick:e.onSend,children:e.sending?"Sending…":"Send"}),v.jsx("button",{className:"icon-btn",title:"Discard",disabled:e.sending,onClick:e.onDiscard,children:v.jsx(Se,{name:"close"})})]})}const TD={channelCount:1,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0},PD=e=>`${Math.floor(e/60)}:${String(Math.floor(e%60)).padStart(2,"0")}`,_v=84,Lv=120,RD=550,AD=Math.floor(ss/(md/8)),MD=Math.min(300,AD),ND=mD;function S1(e){const[t,n]=k.useState("idle"),[i,s]=k.useState(0),[l,a]=k.useState([]),[c,d]=k.useState(0),[h,m]=k.useState(0),p=k.useRef("idle"),y=k.useRef(null),w=k.useRef(null),S=k.useRef([]),E=k.useRef("webm"),T=k.useRef("audio/webm"),C=k.useRef(!1),R=k.useRef({x:0,y:0}),A=k.useRef(0),D=k.useRef(!1),B=k.useRef(null),I=k.useRef(null),q=k.useRef(null),$=k.useRef(e.onReady),K=k.useRef(e.onError),j=k.useRef(e.onActiveChange);$.current=e.onReady,K.current=e.onError,j.current=e.onActiveChange;const Y=J=>{p.current=J,n(J),j.current?.(J==="recording"||J==="locked"||J==="arming")},W=()=>{I.current!=null&&cancelAnimationFrame(I.current),I.current=null,q.current&&clearInterval(q.current),q.current=null,B.current?.close().catch(()=>{}),B.current=null,w.current?.getTracks().forEach(J=>J.stop()),w.current=null},ue=()=>{window.removeEventListener("pointermove",Ce),window.removeEventListener("pointerup",X),window.removeEventListener("pointercancel",X)},Z=J=>{C.current=J;const he=y.current;he&&he.state!=="inactive"?he.stop():ee(),ue()},ee=()=>{W(),Y("idle"),s(0),a([]),d(0),m(0)},ge=()=>{p.current==="recording"&&(ue(),m(0),Y("locked"))};function Ce(J){if(p.current!=="recording")return;const he=R.current.y-J.clientY,me=R.current.x-J.clientX,ve=Math.max(0,Math.min(1,he/_v)),Ee=Math.max(0,Math.min(1,me/Lv));d(ve),m(Ee),he>=_v?ge():me>=Lv&&Z(!0)}function X(){if(p.current==="arming"){D.current=!0,ue();return}if(p.current!=="recording")return;const J=Date.now()-A.current<RD;Z(J)}const ce=J=>{e.disabled||p.current!=="idle"||(J.preventDefault(),R.current={x:J.clientX,y:J.clientY},D.current=!1,C.current=!1,S.current=[],d(0),m(0),Y("arming"),window.addEventListener("pointermove",Ce),window.addEventListener("pointerup",X),window.addEventListener("pointercancel",X),P())};async function P(){let J;try{J=await navigator.mediaDevices.getUserMedia({audio:TD})}catch{K.current("Microphone unavailable — check the browser permission."),ue(),Y("idle");return}if(D.current||p.current==="idle"){J.getTracks().forEach(ve=>ve.stop()),Y("idle");return}w.current=J;const he=uD.find(ve=>typeof MediaRecorder<"u"&&MediaRecorder.isTypeSupported(ve.rec));E.current=he?.ext??"webm",T.current=he?.base??"audio/webm";const me=he?new MediaRecorder(J,{mimeType:he.rec,audioBitsPerSecond:md}):new MediaRecorder(J,{audioBitsPerSecond:md});y.current=me,me.ondataavailable=ve=>{ve.data.size>0&&S.current.push(ve.data)},me.onstop=()=>{if(C.current){ee();return}const Ee=new Blob(S.current,{type:T.current});Promise.all([Ee.arrayBuffer(),pD(Ee)]).then(([Re,Be])=>{if(ee(),Re.byteLength===0)return;const ft=new Date().toISOString().replace(/[-:]/g,"").replace(/\..+/,"").replace("T","-");$.current({filename:`${S0}${ft}.${E.current}`,mime:dD(M2(T.current),Be),bytes:new Uint8Array(Re),voice:!0})})},me.start(),A.current=Date.now(),Y("recording"),s(0),q.current=setInterval(()=>{s(ve=>{const Ee=ve+1;return Ee>=MD&&Z(!1),Ee})},1e3),L(J)}function L(J){try{const he=window.AudioContext||window.webkitAudioContext,me=new he;B.current=me;const ve=me.createMediaStreamSource(J),Ee=me.createAnalyser();Ee.fftSize=256,ve.connect(Ee);const Re=new Uint8Array(Ee.fftSize),Be=wD();let ft=0;const qe=lt=>{if(I.current=requestAnimationFrame(qe),lt-ft<80)return;ft=lt,Ee.getByteTimeDomainData(Re);let _e=0;for(let Xe=0;Xe<Re.length;Xe++){const mt=(Re[Xe]-128)/128;_e+=mt*mt}const tn=Math.sqrt(_e/Re.length),Rt=Be.push(tn);a(Xe=>{const mt=Xe.length>=ND?Xe.slice(1):Xe.slice();return mt.push(Rt),mt})};I.current=requestAnimationFrame(qe)}catch{}}k.useEffect(()=>()=>{C.current=!0,y.current?.stop(),ue(),W()},[]);const G=t==="recording"||t==="locked"||t==="arming",M=v.jsx("div",{className:"vr-wave","aria-hidden":!0,children:l.map((J,he)=>v.jsx("span",{className:"vr-bar",style:{height:`${Math.round(J*100)}%`}},he))});return v.jsxs(v.Fragment,{children:[v.jsx("button",{className:"icon-btn composer-tool vr-mic",title:"Hold to record a voice message",disabled:e.disabled,onPointerDown:ce,onContextMenu:J=>J.preventDefault(),children:v.jsx(Se,{name:"mic",size:18})}),G&&v.jsxs("div",{className:"voice-rec-overlay","data-mode":t,children:[t==="recording"&&v.jsxs("div",{className:"vr-lock",style:{"--p":c},"aria-hidden":!0,children:[v.jsx(Se,{name:"lock",size:13}),v.jsx(Se,{name:"chevronDown",size:12})]}),v.jsx("span",{className:"voice-rec-dot"}),v.jsx("span",{className:"vr-time mono",children:PD(i)}),t==="locked"?v.jsxs(v.Fragment,{children:[M,v.jsx("button",{className:"icon-btn vr-trash",title:"Cancel",onClick:()=>Z(!0),children:v.jsx(Se,{name:"trash",size:16})}),v.jsxs("button",{className:"btn primary sm vr-stop",onClick:()=>Z(!1),children:[v.jsx(Se,{name:"check",size:13}),"Stop"]})]}):v.jsxs("div",{className:"vr-slide",style:{opacity:1-h},children:[M,v.jsx("span",{className:"vr-hint",children:"‹ slide to cancel · slide up to lock"})]})]})]})}const jD="modulepreload",ID=function(e){return"/"+e},Ov={},Mh=function(t,n,i){let s=Promise.resolve();if(n&&n.length>0){let a=function(h){return Promise.all(h.map(m=>Promise.resolve(m).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),d=c?.nonce||c?.getAttribute("nonce");s=a(n.map(h=>{if(h=ID(h),h in Ov)return;Ov[h]=!0;const m=h.endsWith(".css"),p=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${p}`))return;const y=document.createElement("link");if(y.rel=m?"stylesheet":jD,m||(y.as="script"),y.crossOrigin="",y.href=h,d&&y.setAttribute("nonce",d),document.head.appendChild(y),m)return new Promise((w,S)=>{y.addEventListener("load",w),y.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${h}`)))})}))}function l(a){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=a,window.dispatchEvent(c),!c.defaultPrevented)throw a}return s.then(a=>{for(const c of a||[])c.status==="rejected"&&l(c.reason);return t().catch(l)})};var DD=Object.defineProperty,fo=(e,t)=>DD(e,"name",{value:t,configurable:!0}),b1=!!(typeof window<"u"&&window.document&&window.document.createElement);function zr(e,t,{checkForDefaultPrevented:n=!0}={}){return fo(function(s){if(e?.(s),n===!1||!s||!s.defaultPrevented)return t?.(s)},"handleEvent")}fo(zr,"composeEventHandlers");function _D(e){if(!b1)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}fo(_D,"getOwnerWindow");function gd(e){if(!b1)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}fo(gd,"getOwnerDocument");function C1(e,t=!1){const{activeElement:n}=gd(e);if(!n?.nodeName)return null;if(E1(n)&&n.contentDocument)return C1(n.contentDocument.body,t);if(t){const i=n.getAttribute("aria-activedescendant");if(i){const s=gd(n).getElementById(i);if(s)return s}}return n}fo(C1,"getActiveElement");function E1(e){return e.tagName==="IFRAME"}fo(E1,"isFrame");var LD=Object.defineProperty,Nh=(e,t)=>LD(e,"name",{value:t,configurable:!0});function yd(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}Nh(yd,"setRef");function T1(...e){return t=>{let n=!1;const i=e.map(s=>{const l=yd(s,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let s=0;s<i.length;s++){const l=i[s];typeof l=="function"?l():yd(e[s],null)}}}}Nh(T1,"composeRefs");function ho(...e){return k.useCallback(T1(...e),e)}Nh(ho,"useComposedRefs");var OD=Object.defineProperty,Pn=(e,t)=>OD(e,"name",{value:t,configurable:!0});function FD(e,t){const n=k.createContext(t);n.displayName=e+"Context";const i=Pn(l=>{const{children:a,...c}=l,d=k.useMemo(()=>c,Object.values(c));return v.jsx(n.Provider,{value:d,children:a})},"Provider");i.displayName=e+"Provider";function s(l,a={}){const{optional:c=!1}=a,d=k.useContext(n);if(d)return d;if(t!==void 0)return t;if(!c)throw new Error(`\`${l}\` must be used within \`${e}\``)}return Pn(s,"useContext"),[i,s]}Pn(FD,"createContext");function P1(e,t=[]){let n=[];function i(l,a){const c=k.createContext(a);c.displayName=l+"Context";const d=n.length;n=[...n,a];const h=Pn(p=>{const{scope:y,children:w,...S}=p,E=y?.[e]?.[d]||c,T=k.useMemo(()=>S,Object.values(S));return v.jsx(E.Provider,{value:T,children:w})},"Provider");h.displayName=l+"Provider";function m(p,y,w={}){const{optional:S=!1}=w,E=y?.[e]?.[d]||c,T=k.useContext(E);if(T)return T;if(a!==void 0)return a;if(!S)throw new Error(`\`${p}\` must be used within \`${l}\``)}return Pn(m,"useContext"),[h,m]}Pn(i,"createContext");const s=Pn(()=>{const l=n.map(a=>k.createContext(a));return Pn(function(c){const d=c?.[e]||l;return k.useMemo(()=>({[`__scope${e}`]:{...c,[e]:d}}),[c,d])},"useScope")},"createScope");return s.scopeName=e,[i,R1(s,...t)]}Pn(P1,"createContextScope");function R1(...e){const t=e[0];if(e.length===1)return t;const n=Pn(()=>{const i=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return Pn(function(l){const a=i.reduce((c,{useScope:d,scopeName:h})=>{const p=d(l)[`__scope${h}`];return{...c,...p}},{});return k.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}Pn(R1,"composeContextScopes");var Ur=globalThis?.document?k.useLayoutEffect:()=>{},zD=Object.defineProperty,VD=(e,t)=>zD(e,"name",{value:t,configurable:!0}),BD=As[" useId ".trim().toString()]||(()=>{}),$D=0;function vl(e){const[t,n]=k.useState(BD());return Ur(()=>{e||n(i=>i??String($D++))},[e]),e||(t?`radix-${t}`:"")}VD(vl,"useId");var UD=Object.defineProperty,WD=(e,t)=>UD(e,"name",{value:t,configurable:!0}),Fv=As[" useEffectEvent ".trim().toString()],zv=As[" useInsertionEffect ".trim().toString()];function A1(e){if(typeof Fv=="function")return Fv(e);const t=k.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof zv=="function"?zv(()=>{t.current=e}):Ur(()=>{t.current=e}),k.useMemo(()=>(...n)=>t.current?.(...n),[])}WD(A1,"useEffectEvent");var HD=Object.defineProperty,Ls=(e,t)=>HD(e,"name",{value:t,configurable:!0}),KD=As[" useInsertionEffect ".trim().toString()]||Ur;function M1({prop:e,defaultProp:t,onChange:n=Ls(()=>{},"onChange"),caller:i}){const[s,l,a]=N1({defaultProp:t,onChange:n}),c=e!==void 0,d=c?e:s,h=k.useCallback(m=>{if(c){const p=j1(m)?m(e):m;p!==e&&a.current?.(p)}else l(m)},[c,e,l,a]);return[d,h]}Ls(M1,"useControllableState");function N1({defaultProp:e,onChange:t}){const[n,i]=k.useState(e),s=k.useRef(n),l=k.useRef(t);return KD(()=>{l.current=t},[t]),k.useEffect(()=>{s.current!==n&&(l.current?.(n),s.current=n)},[n,s]),[n,i,l]}Ls(N1,"useUncontrolledState");function j1(e){return typeof e=="function"}Ls(j1,"isFunction");var Vv=Symbol("RADIX:SYNC_STATE");function qD(e,t,n,i){const{prop:s,defaultProp:l,onChange:a,caller:c}=t,d=s!==void 0,h=A1(a),m=[{...n,state:l}];i&&m.push(i);const[p,y]=k.useReducer((T,C)=>{if(C.type===Vv)return{...T,state:C.state};const R=e(T,C);return d&&!Object.is(R.state,T.state)&&h(R.state),R},...m),w=p.state,S=k.useRef(w);k.useEffect(()=>{S.current!==w&&(S.current=w,d||h(w))},[w,S,d]);const E=k.useMemo(()=>s!==void 0?{...p,state:s}:p,[p,s]);return k.useEffect(()=>{d&&!Object.is(s,p.state)&&y({type:Vv,state:s})},[s,p.state,d]),[E,y]}Ls(qD,"useControllableStateReducer");var I1=Mx(),XD=Object.defineProperty,$n=(e,t)=>XD(e,"name",{value:t,configurable:!0});function jh(e){const t=k.forwardRef((n,i)=>{let{children:s,...l}=n,a=null,c=!1;const d=[];vd(s)&&typeof Ja=="function"&&(s=Ja(s._payload)),k.Children.forEach(s,y=>{if(O1(y)){c=!0;const w=y;let S="child"in w.props?w.props.child:w.props.children;vd(S)&&typeof Ja=="function"&&(S=Ja(S._payload)),a=GD(w,S),d.push(a?.props?.children)}else d.push(y)}),a?a=k.cloneElement(a,void 0,d):!c&&k.Children.count(s)===1&&k.isValidElement(s)&&(a=s);const h=a?L1(a):void 0,m=ho(i,h);if(!a){if(s||s===0)throw new Error(c?JD(e):ZD(e));return s}const p=_1(l,a.props??{});return a.type!==k.Fragment&&(p.ref=i?m:h),k.cloneElement(a,p)});return t.displayName=`${e}.Slot`,t}$n(jh,"createSlot");var D1=Symbol.for("radix.slottable");function YD(e){const t=$n(n=>"child"in n?n.children(n.child):n.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=D1,t}$n(YD,"createSlottable");var GD=$n((e,t)=>{if("child"in e.props){const n=e.props.child;return k.isValidElement(n)?k.cloneElement(n,void 0,e.props.children(n.props.children)):null}return k.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function _1(e,t){const n={...t};for(const i in t){const s=e[i],l=t[i];/^on[A-Z]/.test(i)?s&&l?n[i]=(...c)=>{const d=l(...c);return s(...c),d}:s&&(n[i]=s):i==="style"?n[i]={...s,...l}:i==="className"&&(n[i]=[s,l].filter(Boolean).join(" "))}return{...e,...n}}$n(_1,"mergeProps");function L1(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}$n(L1,"getElementRef");function O1(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===D1}$n(O1,"isSlottable");var QD=Symbol.for("react.lazy");function vd(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===QD&&"_payload"in e&&F1(e._payload)}$n(vd,"isLazyComponent");function F1(e){return typeof e=="object"&&e!==null&&"then"in e}$n(F1,"isPromiseLike");var ZD=$n(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),JD=$n(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Ja=As[" use ".trim().toString()],e_=Object.defineProperty,t_=(e,t)=>e_(e,"name",{value:t,configurable:!0}),n_=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],xi=n_.reduce((e,t)=>{const n=jh(`Primitive.${t}`),i=k.forwardRef((s,l)=>{const{asChild:a,...c}=s,d=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(d,{...c,ref:l})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function z1(e,t){e&&I1.flushSync(()=>e.dispatchEvent(t))}t_(z1,"dispatchDiscreteCustomEvent");var r_=Object.defineProperty,i_=(e,t)=>r_(e,"name",{value:t,configurable:!0});function so(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...n)=>t.current?.(...n),[])}i_(so,"useCallbackRef");var o_=Object.defineProperty,It=(e,t)=>o_(e,"name",{value:t,configurable:!0}),xd="dismissableLayer.update",s_="dismissableLayer.pointerDownOutside",a_="dismissableLayer.focusOutside",Bv,V1=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),l_=k.forwardRef(It(function(t,n){const{disableOutsidePointerEvents:i=!1,deferPointerDownOutside:s=!1,onEscapeKeyDown:l,onPointerDownOutside:a,onFocusOutside:c,onInteractOutside:d,onDismiss:h,...m}=t,p=k.useContext(V1),[y,w]=k.useState(null),S=y?.ownerDocument??globalThis?.document,[,E]=k.useState({}),T=ho(n,w),C=Array.from(p.layers),[R]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),A=R?C.indexOf(R):-1,D=y?C.indexOf(y):-1,B=p.layersWithOutsidePointerEventsDisabled.size>0,I=D>=A,q=k.useRef(!1),$=$1(W=>{a?.(W),d?.(W),W.defaultPrevented||h?.()},{ownerDocument:S,deferPointerDownOutside:s,isDeferredPointerDownOutsideRef:q,dismissableSurfaces:p.dismissableSurfaces,shouldHandlePointerDownOutside:k.useCallback(W=>{if(!(W instanceof Node))return!1;const ue=[...p.branches].some(Z=>Z.contains(W));return I&&!ue},[p.branches,I])}),K=U1(W=>{if(s&&q.current)return;const ue=W.target;[...p.branches].some(ee=>ee.contains(ue))||(c?.(W),d?.(W),W.defaultPrevented||h?.())},S),j=y?D===C.length-1:!1,Y=so(W=>{W.key==="Escape"&&(l?.(W),!W.defaultPrevented&&h&&(W.preventDefault(),h()))});return k.useEffect(()=>{if(j)return S.addEventListener("keydown",Y,{capture:!0}),()=>S.removeEventListener("keydown",Y,{capture:!0})},[S,j,Y]),k.useEffect(()=>{if(y)return i&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(Bv=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(y)),p.layers.add(y),wd(),()=>{i&&(p.layersWithOutsidePointerEventsDisabled.delete(y),p.layersWithOutsidePointerEventsDisabled.size===0&&(S.body.style.pointerEvents=Bv))}},[y,S,i,p]),k.useEffect(()=>()=>{y&&(p.layers.delete(y),p.layersWithOutsidePointerEventsDisabled.delete(y),wd())},[y,p]),k.useEffect(()=>{const W=It(()=>E({}),"handleUpdate");return document.addEventListener(xd,W),()=>document.removeEventListener(xd,W)},[]),v.jsx(xi.div,{...m,ref:T,style:{pointerEvents:B?I?"auto":"none":void 0,...t.style},onFocusCapture:zr(t.onFocusCapture,K.onFocusCapture),onBlurCapture:zr(t.onBlurCapture,K.onBlurCapture),onPointerDownCapture:zr(t.onPointerDownCapture,$.onPointerDownCapture)})},"DismissableLayer"));function B1(){const e=k.useContext(V1),[t,n]=k.useState(null);return k.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}It(B1,"useDismissableLayerSurface");var u_=It(()=>!0,"IS_TRUE");function $1(e,t){const{ownerDocument:n=globalThis?.document,deferPointerDownOutside:i=!1,isDeferredPointerDownOutsideRef:s,dismissableSurfaces:l,shouldHandlePointerDownOutside:a=u_}=t,c=so(e),d=k.useRef(!1),h=k.useRef(!1),m=k.useRef(new Map),p=k.useRef(()=>{});return k.useEffect(()=>{function y(){h.current=!1,s.current=!1,m.current.clear()}It(y,"resetOutsideInteraction");function w(){return Array.from(m.current.values()).some(Boolean)}It(w,"isOutsideInteractionIntercepted");function S(A){if(!h.current)return;const D=A.target;D instanceof Node&&[...l].some(I=>I.contains(D))||m.current.set(A.type,!0),A.type==="click"&&window.setTimeout(()=>{h.current&&p.current()},0)}It(S,"handleInteractionCapture");function E(A){h.current&&m.current.set(A.type,!1)}It(E,"handleInteractionBubble");const T=It(A=>{if(A.target&&!d.current){let D=function(){n.removeEventListener("click",p.current);const I=w();y(),I||Ih(s_,c,B,{discrete:!0})};if(It(D,"handleAndDispatchPointerDownOutsideEvent"),!a(A.target)){n.removeEventListener("click",p.current),y(),d.current=!1;return}const B={originalEvent:A};h.current=!0,s.current=i&&A.button===0,m.current.clear(),!i||A.button!==0?D():(n.removeEventListener("click",p.current),p.current=D,n.addEventListener("click",p.current,{once:!0}))}else n.removeEventListener("click",p.current),y();d.current=!1},"handlePointerDown"),C=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const A of C)n.addEventListener(A,S,!0),n.addEventListener(A,E);const R=window.setTimeout(()=>{n.addEventListener("pointerdown",T)},0);return()=>{window.clearTimeout(R),n.removeEventListener("pointerdown",T),n.removeEventListener("click",p.current);for(const A of C)n.removeEventListener(A,S,!0),n.removeEventListener(A,E)}},[n,c,i,s,l,a]),{onPointerDownCapture:It(()=>d.current=!0,"onPointerDownCapture")}}It($1,"usePointerDownOutside");function U1(e,t=globalThis?.document){const n=so(e),i=k.useRef(!1);return k.useEffect(()=>{const s=It(l=>{l.target&&!i.current&&Ih(a_,n,{originalEvent:l},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:It(()=>i.current=!0,"onFocusCapture"),onBlurCapture:It(()=>i.current=!1,"onBlurCapture")}}It(U1,"useFocusOutside");function wd(){const e=new CustomEvent(xd);document.dispatchEvent(e)}It(wd,"dispatchUpdate");function Ih(e,t,n,{discrete:i}){const s=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),i?z1(s,l):s.dispatchEvent(l)}It(Ih,"handleAndDispatchCustomEvent");var c_=Object.defineProperty,en=(e,t)=>c_(e,"name",{value:t,configurable:!0}),df="focusScope.autoFocusOnMount",hf="focusScope.autoFocusOnUnmount",$v={bubbles:!1,cancelable:!0},f_=k.forwardRef(en(function(t,n){const{loop:i=!1,trapped:s=!1,onMountAutoFocus:l,onUnmountAutoFocus:a,...c}=t,[d,h]=k.useState(null),m=so(l),p=so(a),y=k.useRef(null),w=ho(n,h),S=k.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;k.useEffect(()=>{if(s){let T=function(D){if(S.paused||!d)return;const B=D.target;d.contains(B)?y.current=B:hr(y.current,{select:!0})},C=function(D){if(S.paused||!d)return;const B=D.relatedTarget;B!==null&&(d.contains(B)||hr(y.current,{select:!0}))},R=function(D){if(document.activeElement===document.body)for(const I of D)I.removedNodes.length>0&&hr(d)};en(T,"handleFocusIn"),en(C,"handleFocusOut"),en(R,"handleMutations"),document.addEventListener("focusin",T),document.addEventListener("focusout",C);const A=new MutationObserver(R);return d&&A.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",T),document.removeEventListener("focusout",C),A.disconnect()}}},[s,d,S.paused]),k.useEffect(()=>{if(d){Uv.add(S);const T=document.activeElement;if(!d.contains(T)){const R=new CustomEvent(df,$v);d.addEventListener(df,m),d.dispatchEvent(R),R.defaultPrevented||(W1(Y1(Dh(d)),{select:!0}),document.activeElement===T&&hr(d))}return()=>{d.removeEventListener(df,m),setTimeout(()=>{const R=new CustomEvent(hf,$v);d.addEventListener(hf,p),d.dispatchEvent(R),R.defaultPrevented||hr(T??document.body,{select:!0}),d.removeEventListener(hf,p),Uv.remove(S)},0)}}},[d,m,p,S]);const E=k.useCallback(T=>{if(!i&&!s||S.paused)return;const C=T.key==="Tab"&&!T.altKey&&!T.ctrlKey&&!T.metaKey,R=document.activeElement;if(C&&R){const A=T.currentTarget,[D,B]=H1(A);D&&B?!T.shiftKey&&R===B?(T.preventDefault(),i&&hr(D,{select:!0})):T.shiftKey&&R===D&&(T.preventDefault(),i&&hr(B,{select:!0})):R===A&&T.preventDefault()}},[i,s,S.paused]);return v.jsx(xi.div,{tabIndex:-1,...c,ref:w,onKeyDown:E})},"FocusScope"));function W1(e,{select:t=!1}={}){const n=document.activeElement;for(const i of e)if(hr(i,{select:t}),document.activeElement!==n)return}en(W1,"focusFirst");function H1(e){const t=Dh(e),n=kd(t,e),i=kd(t.reverse(),e);return[n,i]}en(H1,"getTabbableEdges");function Dh(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:en(i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)t.push(n.currentNode);return t}en(Dh,"getTabbableCandidates");function kd(e,t){const n=typeof t.checkVisibility=="function"&&t.checkVisibility({checkVisibilityCSS:!0});for(const i of e)if(!(n?!i.checkVisibility({checkVisibilityCSS:!0}):K1(i,{upTo:t})))return i}en(kd,"findVisible");function K1(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}en(K1,"isHidden");function q1(e){return e instanceof HTMLInputElement&&"select"in e}en(q1,"isSelectableInput");function hr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&q1(e)&&t&&e.select()}}en(hr,"focus");var Uv=X1();function X1(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Sd(e,t),e.unshift(t)},remove(t){e=Sd(e,t),e[0]?.resume()}}}en(X1,"createFocusScopesStack");function Sd(e,t){const n=[...e],i=n.indexOf(t);return i!==-1&&n.splice(i,1),n}en(Sd,"arrayRemove");function Y1(e){return e.filter(t=>t.tagName!=="A")}en(Y1,"removeLinks");var d_=Object.defineProperty,h_=(e,t)=>d_(e,"name",{value:t,configurable:!0}),p_=k.forwardRef(h_(function(t,n){const{container:i,...s}=t,[l,a]=k.useState(!1);Ur(()=>a(!0),[]);const c=i||l&&globalThis?.document?.body;return c?I1.createPortal(v.jsx(xi.div,{...s,ref:n}),c):null},"Portal")),m_=Object.defineProperty,pr=(e,t)=>m_(e,"name",{value:t,configurable:!0});function G1(e,t){return k.useReducer((n,i)=>t[n][i]??n,e)}pr(G1,"useStateMachine");var _h=pr(e=>{const{present:t,children:n}=e,i=Q1(t),s=typeof n=="function"?n({present:i.isPresent}):k.Children.only(n),l=Z1(i.ref,J1(s));return typeof n=="function"||i.isPresent?k.cloneElement(s,{ref:l}):null},"Presence");function Q1(e){const[t,n]=k.useState(),i=k.useRef(null),s=k.useRef(e),l=k.useRef("none"),a=k.useRef(void 0),c=e?"mounted":"unmounted",[d,h]=G1(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return k.useEffect(()=>{d==="mounted"?(l.current=a.current??Qi(i.current),a.current=void 0):l.current="none"},[d]),Ur(()=>{const m=i.current,p=s.current;if(p!==e){const w=l.current,S=Qi(m);e?(a.current=S,h("MOUNT")):S==="none"||m?.display==="none"?h("UNMOUNT"):h(p&&w!==S?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,h]),Ur(()=>{if(t){let m;const p=t.ownerDocument.defaultView??window,y=pr(S=>{const T=Qi(i.current).includes(CSS.escape(S.animationName));if(S.target===t&&T&&(h("ANIMATION_END"),!s.current)){const C=t.style.animationFillMode;t.style.animationFillMode="forwards",m=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=C)})}},"handleAnimationEnd"),w=pr(S=>{S.target===t&&(l.current=Qi(i.current))},"handleAnimationStart");return t.addEventListener("animationstart",w),t.addEventListener("animationcancel",y),t.addEventListener("animationend",y),()=>{p.clearTimeout(m),t.removeEventListener("animationstart",w),t.removeEventListener("animationcancel",y),t.removeEventListener("animationend",y)}}else h("ANIMATION_END")},[t,h]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:k.useCallback(m=>{if(m){const p=getComputedStyle(m);i.current=p,a.current=Qi(p)}else i.current=null;n(m)},[])}}pr(Q1,"usePresence");function bd(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}pr(bd,"setRef");function Z1(...e){const t=k.useRef(e);return t.current=e,k.useCallback(n=>{const i=t.current;let s=!1;const l=i.map(a=>{const c=bd(a,n);return!s&&typeof c=="function"&&(s=!0),c});if(s)return()=>{for(let a=0;a<l.length;a++){const c=l[a];typeof c=="function"?c():bd(i[a],null)}}},[])}pr(Z1,"useStableComposedRefs");function Qi(e){return e?.animationName||"none"}pr(Qi,"getAnimationName");function J1(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}pr(J1,"getElementRef");var g_=Object.defineProperty,Lh=(e,t)=>g_(e,"name",{value:t,configurable:!0}),el=0,Wi=null;function y_(e){return Oh(),e.children}Lh(y_,"FocusGuards");function Oh(){k.useEffect(()=>{Wi||(Wi={start:Cd(),end:Cd()});const{start:e,end:t}=Wi;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),el++,()=>{el===1&&(Wi?.start.remove(),Wi?.end.remove(),Wi=null),el=Math.max(0,el-1)}},[])}Lh(Oh,"useFocusGuards");function Cd(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}Lh(Cd,"createFocusGuard");var Zn=function(){return Zn=Object.assign||function(t){for(var n,i=1,s=arguments.length;i<s;i++){n=arguments[i];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(t[l]=n[l])}return t},Zn.apply(this,arguments)};function ek(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]]);return n}function v_(e,t,n){if(n||arguments.length===2)for(var i=0,s=t.length,l;i<s;i++)(l||!(i in t))&&(l||(l=Array.prototype.slice.call(t,0,i)),l[i]=t[i]);return e.concat(l||Array.prototype.slice.call(t))}var xl="right-scroll-bar-position",wl="width-before-scroll-bar",x_="with-scroll-bars-hidden",w_="--removed-body-scroll-bar-size";function pf(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function k_(e,t){var n=k.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(i){var s=n.value;s!==i&&(n.value=i,n.callback(i,s))}}}})[0];return n.callback=t,n.facade}var S_=typeof window<"u"?k.useLayoutEffect:k.useEffect,Wv=new WeakMap;function b_(e,t){var n=k_(null,function(i){return e.forEach(function(s){return pf(s,i)})});return S_(function(){var i=Wv.get(n);if(i){var s=new Set(i),l=new Set(e),a=n.current;s.forEach(function(c){l.has(c)||pf(c,null)}),l.forEach(function(c){s.has(c)||pf(c,a)})}Wv.set(n,e)},[e]),n}function C_(e){return e}function E_(e,t){t===void 0&&(t=C_);var n=[],i=!1,s={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(l){var a=t(l,i);return n.push(a),function(){n=n.filter(function(c){return c!==a})}},assignSyncMedium:function(l){for(i=!0;n.length;){var a=n;n=[],a.forEach(l)}n={push:function(c){return l(c)},filter:function(){return n}}},assignMedium:function(l){i=!0;var a=[];if(n.length){var c=n;n=[],c.forEach(l),a=n}var d=function(){var m=a;a=[],m.forEach(l)},h=function(){return Promise.resolve().then(d)};h(),n={push:function(m){a.push(m),h()},filter:function(m){return a=a.filter(m),n}}}};return s}function T_(e){e===void 0&&(e={});var t=E_(null);return t.options=Zn({async:!0,ssr:!1},e),t}var tk=function(e){var t=e.sideCar,n=ek(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=t.read();if(!i)throw new Error("Sidecar medium not found");return k.createElement(i,Zn({},n))};tk.isSideCarExport=!0;function P_(e,t){return e.useMedium(t),tk}var nk=T_(),mf=function(){},Jl=k.forwardRef(function(e,t){var n=k.useRef(null),i=k.useState({onScrollCapture:mf,onWheelCapture:mf,onTouchMoveCapture:mf}),s=i[0],l=i[1],a=e.forwardProps,c=e.children,d=e.className,h=e.removeScrollBar,m=e.enabled,p=e.shards,y=e.sideCar,w=e.noRelative,S=e.noIsolation,E=e.inert,T=e.allowPinchZoom,C=e.as,R=C===void 0?"div":C,A=e.gapMode,D=ek(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),B=y,I=b_([n,t]),q=Zn(Zn({},D),s);return k.createElement(k.Fragment,null,m&&k.createElement(B,{sideCar:nk,removeScrollBar:h,shards:p,noRelative:w,noIsolation:S,inert:E,setCallbacks:l,allowPinchZoom:!!T,lockRef:n,gapMode:A}),a?k.cloneElement(k.Children.only(c),Zn(Zn({},q),{ref:I})):k.createElement(R,Zn({},q,{className:d,ref:I}),c))});Jl.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Jl.classNames={fullWidth:wl,zeroRight:xl};var R_=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function A_(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=R_();return t&&e.setAttribute("nonce",t),e}function M_(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function N_(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var j_=function(){var e=0,t=null;return{add:function(n){e==0&&(t=A_())&&(M_(t,n),N_(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},I_=function(){var e=j_();return function(t,n){k.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},rk=function(){var e=I_(),t=function(n){var i=n.styles,s=n.dynamic;return e(i,s),null};return t},D_={left:0,top:0,right:0,gap:0},gf=function(e){return parseInt(e||"",10)||0},__=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],i=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[gf(n),gf(i),gf(s)]},L_=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return D_;var t=__(e),n=document.documentElement.clientWidth,i=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,i-n+t[2]-t[0])}},O_=rk(),to="data-scroll-locked",F_=function(e,t,n,i){var s=e.left,l=e.top,a=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
264
|
-
.`.concat(x_,` {
|
|
265
|
-
overflow: hidden `).concat(i,`;
|
|
266
|
-
padding-right: `).concat(c,"px ").concat(i,`;
|
|
267
|
-
}
|
|
268
|
-
body[`).concat(to,`] {
|
|
269
|
-
overflow: hidden `).concat(i,`;
|
|
270
|
-
overscroll-behavior: contain;
|
|
271
|
-
`).concat([t&&"position: relative ".concat(i,";"),n==="margin"&&`
|
|
272
|
-
padding-left: `.concat(s,`px;
|
|
273
|
-
padding-top: `).concat(l,`px;
|
|
274
|
-
padding-right: `).concat(a,`px;
|
|
275
|
-
margin-left:0;
|
|
276
|
-
margin-top:0;
|
|
277
|
-
margin-right: `).concat(c,"px ").concat(i,`;
|
|
278
|
-
`),n==="padding"&&"padding-right: ".concat(c,"px ").concat(i,";")].filter(Boolean).join(""),`
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
.`).concat(xl,` {
|
|
282
|
-
right: `).concat(c,"px ").concat(i,`;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
.`).concat(wl,` {
|
|
286
|
-
margin-right: `).concat(c,"px ").concat(i,`;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
.`).concat(xl," .").concat(xl,` {
|
|
290
|
-
right: 0 `).concat(i,`;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
.`).concat(wl," .").concat(wl,` {
|
|
294
|
-
margin-right: 0 `).concat(i,`;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
body[`).concat(to,`] {
|
|
298
|
-
`).concat(w_,": ").concat(c,`px;
|
|
299
|
-
}
|
|
300
|
-
`)},Hv=function(){var e=parseInt(document.body.getAttribute(to)||"0",10);return isFinite(e)?e:0},z_=function(){k.useEffect(function(){return document.body.setAttribute(to,(Hv()+1).toString()),function(){var e=Hv()-1;e<=0?document.body.removeAttribute(to):document.body.setAttribute(to,e.toString())}},[])},V_=function(e){var t=e.noRelative,n=e.noImportant,i=e.gapMode,s=i===void 0?"margin":i;z_();var l=k.useMemo(function(){return L_(s)},[s]);return k.createElement(O_,{styles:F_(l,!t,s,n?"":"!important")})},Ed=!1;if(typeof window<"u")try{var tl=Object.defineProperty({},"passive",{get:function(){return Ed=!0,!0}});window.addEventListener("test",tl,tl),window.removeEventListener("test",tl,tl)}catch{Ed=!1}var Hi=Ed?{passive:!1}:!1,B_=function(e){return e.tagName==="TEXTAREA"},ik=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!B_(e)&&n[t]==="visible")},$_=function(e){return ik(e,"overflowY")},U_=function(e){return ik(e,"overflowX")},Kv=function(e,t){var n=t.ownerDocument,i=t;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var s=ok(e,i);if(s){var l=sk(e,i),a=l[1],c=l[2];if(a>c)return!0}i=i.parentNode}while(i&&i!==n.body);return!1},W_=function(e){var t=e.scrollTop,n=e.scrollHeight,i=e.clientHeight;return[t,n,i]},H_=function(e){var t=e.scrollLeft,n=e.scrollWidth,i=e.clientWidth;return[t,n,i]},ok=function(e,t){return e==="v"?$_(t):U_(t)},sk=function(e,t){return e==="v"?W_(t):H_(t)},K_=function(e,t){return e==="h"&&t==="rtl"?-1:1},q_=function(e,t,n,i,s){var l=K_(e,window.getComputedStyle(t).direction),a=l*i,c=n.target,d=t.contains(c),h=!1,m=a>0,p=0,y=0;do{if(!c)break;var w=sk(e,c),S=w[0],E=w[1],T=w[2],C=E-T-l*S;(S||C)&&ok(e,c)&&(p+=C,y+=S);var R=c.parentNode;c=R&&R.nodeType===Node.DOCUMENT_FRAGMENT_NODE?R.host:R}while(!d&&c!==document.body||d&&(t.contains(c)||t===c));return(m&&Math.abs(p)<1||!m&&Math.abs(y)<1)&&(h=!0),h},nl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},qv=function(e){return[e.deltaX,e.deltaY]},Xv=function(e){return e&&"current"in e?e.current:e},X_=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Y_=function(e){return`
|
|
301
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
302
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
303
|
-
`)},G_=0,Ki=[];function Q_(e){var t=k.useRef([]),n=k.useRef([0,0]),i=k.useRef(),s=k.useState(G_++)[0],l=k.useState(rk)[0],a=k.useRef(e);k.useEffect(function(){a.current=e},[e]),k.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var E=v_([e.lockRef.current],(e.shards||[]).map(Xv),!0).filter(Boolean);return E.forEach(function(T){return T.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),E.forEach(function(T){return T.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var c=k.useCallback(function(E,T){if("touches"in E&&E.touches.length===2||E.type==="wheel"&&E.ctrlKey)return!a.current.allowPinchZoom;var C=nl(E),R=n.current,A="deltaX"in E?E.deltaX:R[0]-C[0],D="deltaY"in E?E.deltaY:R[1]-C[1],B,I=E.target,q=Math.abs(A)>Math.abs(D)?"h":"v";if("touches"in E&&q==="h"&&I.type==="range")return!1;var $=window.getSelection(),K=$&&$.anchorNode,j=K?K===I||K.contains(I):!1;if(j)return!1;var Y=Kv(q,I);if(!Y)return!0;if(Y?B=q:(B=q==="v"?"h":"v",Y=Kv(q,I)),!Y)return!1;if(!i.current&&"changedTouches"in E&&(A||D)&&(i.current=B),!B)return!0;var W=i.current||B;return q_(W,T,E,W==="h"?A:D)},[]),d=k.useCallback(function(E){var T=E;if(!(!Ki.length||Ki[Ki.length-1]!==l)){var C="deltaY"in T?qv(T):nl(T),R=t.current.filter(function(B){return B.name===T.type&&(B.target===T.target||T.target===B.shadowParent)&&X_(B.delta,C)})[0];if(R&&R.should){T.cancelable&&T.preventDefault();return}if(!R){var A=(a.current.shards||[]).map(Xv).filter(Boolean).filter(function(B){return B.contains(T.target)}),D=A.length>0?c(T,A[0]):!a.current.noIsolation;D&&T.cancelable&&T.preventDefault()}}},[]),h=k.useCallback(function(E,T,C,R){var A={name:E,delta:T,target:C,should:R,shadowParent:Z_(C)};t.current.push(A),setTimeout(function(){t.current=t.current.filter(function(D){return D!==A})},1)},[]),m=k.useCallback(function(E){n.current=nl(E),i.current=void 0},[]),p=k.useCallback(function(E){h(E.type,qv(E),E.target,c(E,e.lockRef.current))},[]),y=k.useCallback(function(E){h(E.type,nl(E),E.target,c(E,e.lockRef.current))},[]);k.useEffect(function(){return Ki.push(l),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:y}),document.addEventListener("wheel",d,Hi),document.addEventListener("touchmove",d,Hi),document.addEventListener("touchstart",m,Hi),function(){Ki=Ki.filter(function(E){return E!==l}),document.removeEventListener("wheel",d,Hi),document.removeEventListener("touchmove",d,Hi),document.removeEventListener("touchstart",m,Hi)}},[]);var w=e.removeScrollBar,S=e.inert;return k.createElement(k.Fragment,null,S?k.createElement(l,{styles:Y_(s)}):null,w?k.createElement(V_,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Z_(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const J_=P_(nk,Q_);var ak=k.forwardRef(function(e,t){return k.createElement(Jl,Zn({},e,{ref:t,sideCar:J_}))});ak.classNames=Jl.classNames;var eL=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},qi=new WeakMap,rl=new WeakMap,il={},yf=0,lk=function(e){return e&&(e.host||lk(e.parentNode))},tL=function(e,t){return t.map(function(n){if(e.contains(n))return n;var i=lk(n);return i&&e.contains(i)?i:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},nL=function(e,t,n,i){var s=tL(t,Array.isArray(e)?e:[e]);il[n]||(il[n]=new WeakMap);var l=il[n],a=[],c=new Set,d=new Set(s),h=function(p){!p||c.has(p)||(c.add(p),h(p.parentNode))};s.forEach(h);var m=function(p){!p||d.has(p)||Array.prototype.forEach.call(p.children,function(y){if(c.has(y))m(y);else try{var w=y.getAttribute(i),S=w!==null&&w!=="false",E=(qi.get(y)||0)+1,T=(l.get(y)||0)+1;qi.set(y,E),l.set(y,T),a.push(y),E===1&&S&&rl.set(y,!0),T===1&&y.setAttribute(n,"true"),S||y.setAttribute(i,"true")}catch(C){console.error("aria-hidden: cannot operate on ",y,C)}})};return m(t),c.clear(),yf++,function(){a.forEach(function(p){var y=qi.get(p)-1,w=l.get(p)-1;qi.set(p,y),l.set(p,w),y||(rl.has(p)||p.removeAttribute(i),rl.delete(p)),w||p.removeAttribute(n)}),yf--,yf||(qi=new WeakMap,qi=new WeakMap,rl=new WeakMap,il={})}},rL=function(e,t,n){n===void 0&&(n="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),s=eL(e);return s?(i.push.apply(i,Array.from(s.querySelectorAll("[aria-live], script"))),nL(i,s,n,"aria-hidden")):function(){return null}},iL=Object.defineProperty,Mn=(e,t)=>iL(e,"name",{value:t,configurable:!0}),Fh="Dialog",[uk,_z]=P1(Fh),[oL,nr]=uk(Fh),ck=Mn(e=>{const{__scopeDialog:t,children:n,open:i,defaultOpen:s,onOpenChange:l,modal:a=!0}=e,c=k.useRef(null),d=k.useRef(null),[h,m]=M1({prop:i,defaultProp:s??!1,onChange:l,caller:Fh}),[p,y]=k.useState(0),[w,S]=k.useState(0);return v.jsx(oL,{scope:t,triggerRef:c,contentRef:d,contentId:vl(),titleId:vl(),descriptionId:vl(),titlePresent:p>0,descriptionPresent:w>0,setTitleCount:y,setDescriptionCount:S,open:h,onOpenChange:m,onOpenToggle:k.useCallback(()=>m(E=>!E),[m]),modal:a,children:n})},"Dialog"),fk="DialogPortal",[sL,dk]=uk(fk,{forceMount:void 0}),hk=Mn(e=>{const{__scopeDialog:t,forceMount:n,children:i,container:s}=e,l=nr(fk,t);return v.jsx(sL,{scope:t,forceMount:n,children:k.Children.map(i,a=>v.jsx(_h,{present:n||l.open,children:v.jsx(p_,{asChild:!0,container:s,children:a})}))})},"DialogPortal"),Td="DialogOverlay",pk=k.forwardRef(Mn(function(t,n){const i=dk(Td,t.__scopeDialog),{forceMount:s=i.forceMount,...l}=t,a=nr(Td,t.__scopeDialog);return a.modal?v.jsx(_h,{present:s||a.open,children:v.jsx(lL,{...l,ref:n})}):null},"DialogOverlay")),aL=jh("DialogOverlay.RemoveScroll"),lL=k.forwardRef(Mn(function(t,n){const{__scopeDialog:i,...s}=t,l=nr(Td,i),a=B1(),c=ho(n,a);return v.jsx(ak,{as:aL,allowPinchZoom:!0,shards:[l.contentRef],children:v.jsx(xi.div,{"data-state":zh(l.open),...s,ref:c,style:{pointerEvents:"auto",...s.style}})})},"DialogOverlayImpl")),Ts="DialogContent",mk=k.forwardRef(Mn(function(t,n){const i=dk(Ts,t.__scopeDialog),{forceMount:s=i.forceMount,...l}=t,a=nr(Ts,t.__scopeDialog);return v.jsx(_h,{present:s||a.open,children:a.modal?v.jsx(uL,{...l,ref:n}):v.jsx(cL,{...l,ref:n})})},"DialogContent")),uL=k.forwardRef(Mn(function(t,n){const i=nr(Ts,t.__scopeDialog),s=k.useRef(null),l=ho(n,i.contentRef,s);return k.useEffect(()=>{const a=s.current;if(a)return rL(a)},[]),v.jsx(gk,{...t,ref:l,trapFocus:i.open,disableOutsidePointerEvents:i.open,onCloseAutoFocus:zr(t.onCloseAutoFocus,a=>{a.preventDefault(),i.triggerRef.current?.focus()}),onPointerDownOutside:zr(t.onPointerDownOutside,a=>{const c=a.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0;(c.button===2||d)&&a.preventDefault()}),onFocusOutside:zr(t.onFocusOutside,a=>a.preventDefault())})},"DialogContentModal")),cL=k.forwardRef(Mn(function(t,n){const i=nr(Ts,t.__scopeDialog),s=k.useRef(!1),l=k.useRef(!1);return v.jsx(gk,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{t.onCloseAutoFocus?.(a),a.defaultPrevented||(s.current||i.triggerRef.current?.focus(),a.preventDefault()),s.current=!1,l.current=!1},onInteractOutside:a=>{t.onInteractOutside?.(a),a.defaultPrevented||(s.current=!0,a.detail.originalEvent.type==="pointerdown"&&(l.current=!0));const c=a.target;i.triggerRef.current?.contains(c)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&l.current&&a.preventDefault()}})},"DialogContentNonModal")),gk=k.forwardRef(Mn(function(t,n){const{__scopeDialog:i,trapFocus:s,onOpenAutoFocus:l,onCloseAutoFocus:a,...c}=t,d=nr(Ts,i);return Oh(),v.jsx(v.Fragment,{children:v.jsx(f_,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:l,onUnmountAutoFocus:a,children:v.jsx(l_,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionPresent?d.descriptionId:void 0,"aria-labelledby":d.titlePresent?d.titleId:void 0,"data-state":zh(d.open),...c,ref:n,deferPointerDownOutside:!0,onDismiss:()=>d.onOpenChange(!1)})})})},"DialogContentImpl")),fL="DialogTitle",yk=k.forwardRef(Mn(function(t,n){const{__scopeDialog:i,...s}=t,l=nr(fL,i),{setTitleCount:a}=l;return Ur(()=>(a(c=>c+1),()=>a(c=>c-1)),[a]),v.jsx(xi.h2,{id:l.titleId,...s,ref:n})},"DialogTitle")),dL="DialogDescription",vk=k.forwardRef(Mn(function(t,n){const{__scopeDialog:i,...s}=t,l=nr(dL,i),{setDescriptionCount:a}=l;return Ur(()=>(a(c=>c+1),()=>a(c=>c-1)),[a]),v.jsx(xi.p,{id:l.descriptionId,...s,ref:n})},"DialogDescription")),hL="DialogClose",xk=k.forwardRef(Mn(function(t,n){const{__scopeDialog:i,...s}=t,l=nr(hL,i);return v.jsx(xi.button,{type:"button",...s,ref:n,onClick:zr(t.onClick,()=>l.onOpenChange(!1))})},"DialogClose"));function zh(e){return e?"open":"closed"}Mn(zh,"getState");function pL(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const mL=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,gL=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,yL={};function Yv(e,t){return(yL.jsx?gL:mL).test(e)}const vL=/[ \t\n\f\r]/g;function xL(e){return typeof e=="object"?e.type==="text"?Gv(e.value):!1:Gv(e)}function Gv(e){return e.replace(vL,"")===""}class Os{constructor(t,n,i){this.normal=n,this.property=t,i&&(this.space=i)}}Os.prototype.normal={};Os.prototype.property={};Os.prototype.space=void 0;function wk(e,t){const n={},i={};for(const s of e)Object.assign(n,s.property),Object.assign(i,s.normal);return new Os(n,i,t)}function Pd(e){return e.toLowerCase()}class fn{constructor(t,n){this.attribute=n,this.property=t}}fn.prototype.attribute="";fn.prototype.booleanish=!1;fn.prototype.boolean=!1;fn.prototype.commaOrSpaceSeparated=!1;fn.prototype.commaSeparated=!1;fn.prototype.defined=!1;fn.prototype.mustUseProperty=!1;fn.prototype.number=!1;fn.prototype.overloadedBoolean=!1;fn.prototype.property="";fn.prototype.spaceSeparated=!1;fn.prototype.space=void 0;let wL=0;const De=wi(),St=wi(),Rd=wi(),se=wi(),Ze=wi(),yi=wi(),yn=wi();function wi(){return 2**++wL}const Ad=Object.freeze(Object.defineProperty({__proto__:null,boolean:De,booleanish:St,commaOrSpaceSeparated:yn,commaSeparated:yi,number:se,overloadedBoolean:Rd,spaceSeparated:Ze},Symbol.toStringTag,{value:"Module"})),vf=Object.keys(Ad);class Vh extends fn{constructor(t,n,i,s){let l=-1;if(super(t,n),Qv(this,"space",s),typeof i=="number")for(;++l<vf.length;){const a=vf[l];Qv(this,vf[l],(i&Ad[a])===Ad[a])}}}Vh.prototype.defined=!0;function Qv(e,t,n){n&&(e[t]=n)}function po(e){const t={},n={};for(const[i,s]of Object.entries(e.properties)){const l=new Vh(i,e.transform(e.attributes||{},i),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(l.mustUseProperty=!0),t[i]=l,n[Pd(i)]=i,n[Pd(l.attribute)]=i}return new Os(t,n,e.space)}const kk=po({properties:{ariaActiveDescendant:null,ariaAtomic:St,ariaAutoComplete:null,ariaBusy:St,ariaChecked:St,ariaColCount:se,ariaColIndex:se,ariaColSpan:se,ariaControls:Ze,ariaCurrent:null,ariaDescribedBy:Ze,ariaDetails:null,ariaDisabled:St,ariaDropEffect:Ze,ariaErrorMessage:null,ariaExpanded:St,ariaFlowTo:Ze,ariaGrabbed:St,ariaHasPopup:null,ariaHidden:St,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ze,ariaLevel:se,ariaLive:null,ariaModal:St,ariaMultiLine:St,ariaMultiSelectable:St,ariaOrientation:null,ariaOwns:Ze,ariaPlaceholder:null,ariaPosInSet:se,ariaPressed:St,ariaReadOnly:St,ariaRelevant:null,ariaRequired:St,ariaRoleDescription:Ze,ariaRowCount:se,ariaRowIndex:se,ariaRowSpan:se,ariaSelected:St,ariaSetSize:se,ariaSort:null,ariaValueMax:se,ariaValueMin:se,ariaValueNow:se,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Sk(e,t){return t in e?e[t]:t}function bk(e,t){return Sk(e,t.toLowerCase())}const kL=po({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:yi,acceptCharset:Ze,accessKey:Ze,action:null,allow:null,allowFullScreen:De,allowPaymentRequest:De,allowUserMedia:De,alpha:De,alt:null,as:null,async:De,autoCapitalize:null,autoComplete:Ze,autoFocus:De,autoPlay:De,blocking:Ze,capture:null,charSet:null,checked:De,cite:null,className:Ze,closedBy:null,colorSpace:null,cols:se,colSpan:se,command:null,commandFor:null,content:null,contentEditable:St,controls:De,controlsList:Ze,coords:se|yi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:De,defer:De,dir:null,dirName:null,disabled:De,download:Rd,draggable:St,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:De,formTarget:null,headers:Ze,height:se,hidden:Rd,high:se,href:null,hrefLang:null,htmlFor:Ze,httpEquiv:Ze,id:null,imageSizes:null,imageSrcSet:null,inert:De,inputMode:null,integrity:null,is:null,isMap:De,itemId:null,itemProp:Ze,itemRef:Ze,itemScope:De,itemType:Ze,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:De,low:se,manifest:null,max:null,maxLength:se,media:null,method:null,min:null,minLength:se,multiple:De,muted:De,name:null,nonce:null,noModule:De,noValidate:De,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:De,optimum:se,pattern:null,ping:Ze,placeholder:null,playsInline:De,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:De,referrerPolicy:null,rel:Ze,required:De,reversed:De,rows:se,rowSpan:se,sandbox:Ze,scope:null,scoped:De,seamless:De,selected:De,shadowRootClonable:De,shadowRootCustomElementRegistry:De,shadowRootDelegatesFocus:De,shadowRootMode:null,shadowRootSerializable:De,shape:null,size:se,sizes:null,slot:null,span:se,spellCheck:St,src:null,srcDoc:null,srcLang:null,srcSet:null,start:se,step:null,style:null,tabIndex:se,target:null,title:null,translate:null,type:null,typeMustMatch:De,useMap:null,value:St,width:se,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ze,axis:null,background:null,bgColor:null,border:se,borderColor:null,bottomMargin:se,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:De,declare:De,event:null,face:null,frame:null,frameBorder:null,hSpace:se,leftMargin:se,link:null,longDesc:null,lowSrc:null,marginHeight:se,marginWidth:se,noResize:De,noHref:De,noShade:De,noWrap:De,object:null,profile:null,prompt:null,rev:null,rightMargin:se,rules:null,scheme:null,scrolling:St,standby:null,summary:null,text:null,topMargin:se,valueType:null,version:null,vAlign:null,vLink:null,vSpace:se,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:De,disablePictureInPicture:De,disableRemotePlayback:De,exportParts:yi,part:Ze,prefix:null,property:null,results:se,security:null,unselectable:null},space:"html",transform:bk}),SL=po({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:yn,accentHeight:se,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:se,amplitude:se,arabicForm:null,ascent:se,attributeName:null,attributeType:null,azimuth:se,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:se,by:null,calcMode:null,capHeight:se,className:Ze,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:se,diffuseConstant:se,direction:null,display:null,dur:null,divisor:se,dominantBaseline:null,download:De,dx:null,dy:null,edgeMode:null,editable:null,elevation:se,enableBackground:null,end:null,event:null,exponent:se,externalResourcesRequired:null,fill:null,fillOpacity:se,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:yi,g2:yi,glyphName:yi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:se,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:se,horizOriginX:se,horizOriginY:se,id:null,ideographic:se,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:se,k:se,k1:se,k2:se,k3:se,k4:se,kernelMatrix:yn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:se,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:se,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:se,overlineThickness:se,paintOrder:null,panose1:null,path:null,pathLength:se,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ze,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:se,pointsAtY:se,pointsAtZ:se,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:yn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:yn,rev:yn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:yn,requiredFeatures:yn,requiredFonts:yn,requiredFormats:yn,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:se,specularExponent:se,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:se,strikethroughThickness:se,string:null,stroke:null,strokeDashArray:yn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:se,strokeOpacity:se,strokeWidth:null,style:null,surfaceScale:se,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:yn,tabIndex:se,tableValues:null,target:null,targetX:se,targetY:se,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:yn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:se,underlineThickness:se,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:se,values:null,vAlphabetic:se,vMathematical:se,vectorEffect:null,vHanging:se,vIdeographic:se,version:null,vertAdvY:se,vertOriginX:se,vertOriginY:se,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:se,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Sk}),Ck=po({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()}}),Ek=po({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:bk}),Tk=po({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),bL={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"},CL=/[A-Z]/g,Zv=/-[a-z]/g,EL=/^data[-\w.:]+$/i;function TL(e,t){const n=Pd(t);let i=t,s=fn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&EL.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(Zv,RL);i="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!Zv.test(l)){let a=l.replace(CL,PL);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}s=Vh}return new s(i,t)}function PL(e){return"-"+e.toLowerCase()}function RL(e){return e.charAt(1).toUpperCase()}const AL=wk([kk,kL,Ck,Ek,Tk],"html"),Bh=wk([kk,SL,Ck,Ek,Tk],"svg");function ML(e){return e.join(" ").trim()}var Xi={},xf,Jv;function NL(){if(Jv)return xf;Jv=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
|
|
304
|
-
`,h="/",m="*",p="",y="comment",w="declaration";function S(T,C){if(typeof T!="string")throw new TypeError("First argument must be a string");if(!T)return[];C=C||{};var R=1,A=1;function D(Z){var ee=Z.match(t);ee&&(R+=ee.length);var ge=Z.lastIndexOf(d);A=~ge?Z.length-ge:A+Z.length}function B(){var Z={line:R,column:A};return function(ee){return ee.position=new I(Z),K(),ee}}function I(Z){this.start=Z,this.end={line:R,column:A},this.source=C.source}I.prototype.content=T;function q(Z){var ee=new Error(C.source+":"+R+":"+A+": "+Z);if(ee.reason=Z,ee.filename=C.source,ee.line=R,ee.column=A,ee.source=T,!C.silent)throw ee}function $(Z){var ee=Z.exec(T);if(ee){var ge=ee[0];return D(ge),T=T.slice(ge.length),ee}}function K(){$(n)}function j(Z){var ee;for(Z=Z||[];ee=Y();)ee!==!1&&Z.push(ee);return Z}function Y(){var Z=B();if(!(h!=T.charAt(0)||m!=T.charAt(1))){for(var ee=2;p!=T.charAt(ee)&&(m!=T.charAt(ee)||h!=T.charAt(ee+1));)++ee;if(ee+=2,p===T.charAt(ee-1))return q("End of comment missing");var ge=T.slice(2,ee-2);return A+=2,D(ge),T=T.slice(ee),A+=2,Z({type:y,comment:ge})}}function W(){var Z=B(),ee=$(i);if(ee){if(Y(),!$(s))return q("property missing ':'");var ge=$(l),Ce=Z({type:w,property:E(ee[0].replace(e,p)),value:ge?E(ge[0].replace(e,p)):p});return $(a),Ce}}function ue(){var Z=[];j(Z);for(var ee;ee=W();)ee!==!1&&(Z.push(ee),j(Z));return Z}return K(),ue()}function E(T){return T?T.replace(c,p):p}return xf=S,xf}var ex;function jL(){if(ex)return Xi;ex=1;var e=Xi&&Xi.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.default=n;const t=e(NL());function n(i,s){let l=null;if(!i||typeof i!="string")return l;const a=(0,t.default)(i),c=typeof s=="function";return a.forEach(d=>{if(d.type!=="declaration")return;const{property:h,value:m}=d;c?s(h,m,d):m&&(l=l||{},l[h]=m)}),l}return Xi}var ns={},tx;function IL(){if(tx)return ns;tx=1,Object.defineProperty(ns,"__esModule",{value:!0}),ns.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,l=function(h){return!h||n.test(h)||e.test(h)},a=function(h,m){return m.toUpperCase()},c=function(h,m){return"".concat(m,"-")},d=function(h,m){return m===void 0&&(m={}),l(h)?h:(h=h.toLowerCase(),m.reactCompat?h=h.replace(s,c):h=h.replace(i,c),h.replace(t,a))};return ns.camelCase=d,ns}var rs,nx;function DL(){if(nx)return rs;nx=1;var e=rs&&rs.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(jL()),n=IL();function i(s,l){var a={};return!s||typeof s!="string"||(0,t.default)(s,function(c,d){c&&d&&(a[(0,n.camelCase)(c,l)]=d)}),a}return i.default=i,rs=i,rs}var _L=DL();const LL=Od(_L),Pk=Rk("end"),$h=Rk("start");function Rk(e){return t;function t(n){const i=n&&n.position&&n.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function OL(e){const t=$h(e),n=Pk(e);if(t&&n)return{start:t,end:n}}class qt extends Error{constructor(t,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let s="",l={},a=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?s=t:!l.cause&&t&&(a=!0,s=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof i=="string"){const d=i.indexOf(":");d===-1?l.ruleId=i:(l.source=i.slice(0,d),l.ruleId=i.slice(d+1))}if(!l.place&&l.ancestors&&l.ancestors){const d=l.ancestors[l.ancestors.length-1];d&&(l.place=d.position)}const c=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=c?c.line:void 0,this.name=hs(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=a&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}qt.prototype.file="";qt.prototype.name="";qt.prototype.reason="";qt.prototype.message="";qt.prototype.stack="";qt.prototype.column=void 0;qt.prototype.line=void 0;qt.prototype.ancestors=void 0;qt.prototype.cause=void 0;qt.prototype.fatal=void 0;qt.prototype.place=void 0;qt.prototype.ruleId=void 0;qt.prototype.source=void 0;const Uh={}.hasOwnProperty,FL=new Map,zL=/[A-Z]/g,VL=new Set(["table","tbody","thead","tfoot","tr"]),BL=new Set(["td","th"]),Ak="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function $L(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let i;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=GL(n,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");i=YL(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Bh:AL,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=Mk(s,e,void 0);return l&&typeof l!="string"?l:s.create(e,s.Fragment,{children:l||void 0},void 0)}function Mk(e,t,n){if(t.type==="element")return UL(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return WL(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return KL(e,t,n);if(t.type==="mdxjsEsm")return HL(e,t);if(t.type==="root")return qL(e,t,n);if(t.type==="text")return XL(e,t)}function UL(e,t,n){const i=e.schema;let s=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(s=Bh,e.schema=s),e.ancestors.push(t);const l=jk(e,t.tagName,!1),a=QL(e,t);let c=Hh(e,t);return VL.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!xL(d):!0})),Nk(e,a,l,t),Wh(a,c),e.ancestors.pop(),e.schema=i,e.create(t,l,a,n)}function WL(e,t){if(t.data&&t.data.estree&&e.evaluater){const i=t.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}Ps(e,t.position)}function HL(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ps(e,t.position)}function KL(e,t,n){const i=e.schema;let s=i;t.name==="svg"&&i.space==="html"&&(s=Bh,e.schema=s),e.ancestors.push(t);const l=t.name===null?e.Fragment:jk(e,t.name,!0),a=ZL(e,t),c=Hh(e,t);return Nk(e,a,l,t),Wh(a,c),e.ancestors.pop(),e.schema=i,e.create(t,l,a,n)}function qL(e,t,n){const i={};return Wh(i,Hh(e,t)),e.create(t,e.Fragment,i,n)}function XL(e,t){return t.value}function Nk(e,t,n,i){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=i)}function Wh(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function YL(e,t,n){return i;function i(s,l,a,c){const h=Array.isArray(a.children)?n:t;return c?h(l,a,c):h(l,a)}}function GL(e,t){return n;function n(i,s,l,a){const c=Array.isArray(l.children),d=$h(i);return t(s,l,a,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function QL(e,t){const n={};let i,s;for(s in t.properties)if(s!=="children"&&Uh.call(t.properties,s)){const l=JL(e,s,t.properties[s]);if(l){const[a,c]=l;e.tableCellAlignToStyle&&a==="align"&&typeof c=="string"&&BL.has(t.tagName)?i=c:n[a]=c}}if(i){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function ZL(e,t){const n={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const l=i.data.estree.body[0];l.type;const a=l.expression;a.type;const c=a.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else Ps(e,t.position);else{const s=i.name;let l;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const c=i.value.data.estree.body[0];c.type,l=e.evaluater.evaluateExpression(c.expression)}else Ps(e,t.position);else l=i.value===null?!0:i.value;n[s]=l}return n}function Hh(e,t){const n=[];let i=-1;const s=e.passKeys?new Map:FL;for(;++i<t.children.length;){const l=t.children[i];let a;if(e.passKeys){const d=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(d){const h=s.get(d)||0;a=d+"-"+h,s.set(d,h+1)}}const c=Mk(e,l,a);c!==void 0&&n.push(c)}return n}function JL(e,t,n){const i=TL(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?pL(n):ML(n)),i.property==="style"){let s=typeof n=="object"?n:eO(e,String(n));return e.stylePropertyNameCase==="css"&&(s=tO(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&i.space?bL[i.property]||i.property:i.attribute,n]}}function eO(e,t){try{return LL(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const i=n,s=new qt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=Ak+"#cannot-parse-style-attribute",s}}function jk(e,t,n){let i;if(!n)i={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let l=-1,a;for(;++l<s.length;){const c=Yv(s[l])?{type:"Identifier",name:s[l]}:{type:"Literal",value:s[l]};a=a?{type:"MemberExpression",object:a,property:c,computed:!!(l&&c.type==="Literal"),optional:!1}:c}i=a}else i=Yv(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const s=i.value;return Uh.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(i);Ps(e)}function Ps(e,t){const n=new qt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Ak+"#cannot-handle-mdx-estrees-without-createevaluater",n}function tO(e){const t={};let n;for(n in e)Uh.call(e,n)&&(t[nO(n)]=e[n]);return t}function nO(e){let t=e.replace(zL,rO);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function rO(e){return"-"+e.toLowerCase()}const wf={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]};function iO(e){const t=this;t.parser=n;function n(i){return n1(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function oO(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function sO(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
305
|
-
`}]}function aO(e,t){const n=t.value?t.value+`
|
|
306
|
-
`:"",i={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(i.className=["language-"+s[0]]);let l={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function lO(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function uO(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function cO(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),s=co(i.toLowerCase()),l=e.footnoteOrder.indexOf(i);let a,c=e.footnoteCounts.get(i);c===void 0?(c=0,e.footnoteOrder.push(i),a=e.footnoteOrder.length):a=l+1,c+=1,e.footnoteCounts.set(i,c);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,d);const h={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,h),e.applyData(t,h)}function fO(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dO(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Ik(e,t){const n=t.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+i}];const s=e.all(t),l=s[0];l&&l.type==="text"?l.value="["+l.value:s.unshift({type:"text",value:"["});const a=s[s.length-1];return a&&a.type==="text"?a.value+=i:s.push({type:"text",value:i}),s}function hO(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return Ik(e,t);const s={src:co(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(s.title=i.title);const l={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,l),e.applyData(t,l)}function pO(e,t){const n={src:co(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,i),e.applyData(t,i)}function mO(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,i),e.applyData(t,i)}function gO(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return Ik(e,t);const s={href:co(i.url||"")};i.title!==null&&i.title!==void 0&&(s.title=i.title);const l={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function yO(e,t){const n={href:co(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function vO(e,t,n){const i=e.all(t),s=n?xO(n):Dk(t),l={},a=[];if(typeof t.checked=="boolean"){const m=i[0];let p;m&&m.type==="element"&&m.tagName==="p"?p=m:(p={type:"element",tagName:"p",properties:{},children:[]},i.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let c=-1;for(;++c<i.length;){const m=i[c];(s||c!==0||m.type!=="element"||m.tagName!=="p")&&a.push({type:"text",value:`
|
|
307
|
-
`}),m.type==="element"&&m.tagName==="p"&&!s?a.push(...m.children):a.push(m)}const d=i[i.length-1];d&&(s||d.type!=="element"||d.tagName!=="p")&&a.push({type:"text",value:`
|
|
308
|
-
`});const h={type:"element",tagName:"li",properties:l,children:a};return e.patch(t,h),e.applyData(t,h)}function xO(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let i=-1;for(;!t&&++i<n.length;)t=Dk(n[i])}return t}function Dk(e){const t=e.spread;return t??e.children.length>1}function wO(e,t){const n={},i=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<i.length;){const a=i[s];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)}function kO(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function SO(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function bO(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function CO(e,t){const n=e.all(t),i=n.shift(),s=[];if(i){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(t.children[0],a),s.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=$h(t.children[1]),d=Pk(t.children[t.children.length-1]);c&&d&&(a.position={start:c,end:d}),s.push(a)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,l),e.applyData(t,l)}function EO(e,t,n){const i=n?n.children:void 0,l=(i?i.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,c=a?a.length:t.children.length;let d=-1;const h=[];for(;++d<c;){const p=t.children[d],y={},w=a?a[d]:void 0;w&&(y.align=w);let S={type:"element",tagName:l,properties:y,children:[]};p&&(S.children=e.all(p),e.patch(p,S),S=e.applyData(p,S)),h.push(S)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,m),e.applyData(t,m)}function TO(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const rx=9,ix=32;function PO(e){const t=String(e),n=/\r?\n|\r/g;let i=n.exec(t),s=0;const l=[];for(;i;)l.push(ox(t.slice(s,i.index),s>0,!0),i[0]),s=i.index+i[0].length,i=n.exec(t);return l.push(ox(t.slice(s),s>0,!1)),l.join("")}function ox(e,t,n){let i=0,s=e.length;if(t){let l=e.codePointAt(i);for(;l===rx||l===ix;)i++,l=e.codePointAt(i)}if(n){let l=e.codePointAt(s-1);for(;l===rx||l===ix;)s--,l=e.codePointAt(s-1)}return s>i?e.slice(i,s):""}function RO(e,t){const n={type:"text",value:PO(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function AO(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const MO={blockquote:oO,break:sO,code:aO,delete:lO,emphasis:uO,footnoteReference:cO,heading:fO,html:dO,imageReference:hO,image:pO,inlineCode:mO,linkReference:gO,link:yO,listItem:vO,list:wO,paragraph:kO,root:SO,strong:bO,table:CO,tableCell:TO,tableRow:EO,text:RO,thematicBreak:AO,toml:ol,yaml:ol,definition:ol,footnoteDefinition:ol};function ol(){}const _k=-1,eu=0,ps=1,Ol=2,Kh=3,qh=4,Xh=5,Yh=6,Lk=7,Ok=8,Fk=typeof self=="object"?self:globalThis,sx=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new Fk[e](t)},NO=(e,t)=>{const n=(s,l)=>(e.set(l,s),s),i=s=>{if(e.has(s))return e.get(s);const[l,a]=t[s];switch(l){case eu:case _k:return n(a,s);case ps:{const c=n([],s);for(const d of a)c.push(i(d));return c}case Ol:{const c=n({},s);for(const[d,h]of a)c[i(d)]=i(h);return c}case Kh:return n(new Date(a),s);case qh:{const{source:c,flags:d}=a;return n(new RegExp(c,d),s)}case Xh:{const c=n(new Map,s);for(const[d,h]of a)c.set(i(d),i(h));return c}case Yh:{const c=n(new Set,s);for(const d of a)c.add(i(d));return c}case Lk:{const{name:c,message:d}=a;return n(typeof Fk[c]=="function"?sx(c,d):new Error(d),s)}case Ok:return n(BigInt(a),s);case"BigInt":return n(Object(BigInt(a)),s);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:c}=new Uint8Array(a);return n(new DataView(c),a)}}return n(sx(l,a),s)};return i},ax=e=>NO(new Map,e)(0),fi="",{toString:jO}={},{keys:IO}=Object,is=e=>{const t=typeof e;if(t!=="object"||!e)return[eu,t];const n=jO.call(e).slice(8,-1);switch(n){case"Array":return[ps,fi];case"Object":return[Ol,fi];case"Date":return[Kh,fi];case"RegExp":return[qh,fi];case"Map":return[Xh,fi];case"Set":return[Yh,fi];case"DataView":return[ps,n]}return n.includes("Array")?[ps,n]:e instanceof Error?[Lk,e.name||"Error"]:[Ol,n]},sl=([e,t])=>e===eu&&(t==="function"||t==="symbol"),DO=(e,t,n,i)=>{const s=(a,c)=>{const d=i.push(a)-1;return n.set(c,d),d},l=a=>{if(n.has(a))return n.get(a);let[c,d]=is(a);switch(c){case eu:{let m=a;switch(d){case"bigint":c=Ok,m=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);m=null;break;case"undefined":return s([_k],a)}return s([c,m],a)}case ps:{if(d){let y=a;return d==="DataView"?y=new Uint8Array(a.buffer):d==="ArrayBuffer"&&(y=new Uint8Array(a)),s([d,[...y]],a)}const m=[],p=s([c,m],a);for(const y of a)m.push(l(y));return p}case Ol:{if(d)switch(d){case"BigInt":return s([d,a.toString()],a);case"Boolean":case"Number":case"String":return s([d,a.valueOf()],a)}if(t&&"toJSON"in a)return l(a.toJSON());const m=[],p=s([c,m],a);for(const y of IO(a))(e||!sl(is(a[y])))&&m.push([l(y),l(a[y])]);return p}case Kh:return s([c,isNaN(a.getTime())?fi:a.toISOString()],a);case qh:{const{source:m,flags:p}=a;return s([c,{source:m,flags:p}],a)}case Xh:{const m=[],p=s([c,m],a);for(const[y,w]of a)(e||!(sl(is(y))||sl(is(w))))&&m.push([l(y),l(w)]);return p}case Yh:{const m=[],p=s([c,m],a);for(const y of a)(e||!sl(is(y)))&&m.push(l(y));return p}}const{message:h}=a;return s([c,{name:d,message:h}],a)};return l},lx=(e,{json:t,lossy:n}={})=>{const i=[];return DO(!(t||n),!!t,new Map,i)(e),i},Fl=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ax(lx(e,t)):structuredClone(e):(e,t)=>ax(lx(e,t));function _O(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function LO(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function OO(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||_O,i=e.options.footnoteBackLabel||LO,s=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let d=-1;for(;++d<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[d]);if(!h)continue;const m=e.all(h),p=String(h.identifier).toUpperCase(),y=co(p.toLowerCase());let w=0;const S=[],E=e.footnoteCounts.get(p);for(;E!==void 0&&++w<=E;){S.length>0&&S.push({type:"text",value:" "});let R=typeof n=="string"?n:n(d,w);typeof R=="string"&&(R={type:"text",value:R}),S.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+y+(w>1?"-"+w:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(d,w),className:["data-footnote-backref"]},children:Array.isArray(R)?R:[R]})}const T=m[m.length-1];if(T&&T.type==="element"&&T.tagName==="p"){const R=T.children[T.children.length-1];R&&R.type==="text"?R.value+=" ":T.children.push({type:"text",value:" "}),T.children.push(...S)}else m.push(...S);const C={type:"element",tagName:"li",properties:{id:t+"fn-"+y},children:e.wrap(m,!0)};e.patch(h,C),c.push(C)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...Fl(a),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
|
|
309
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
|
|
310
|
-
`}]}}const Md={}.hasOwnProperty,FO={};function zO(e,t){const n=t||FO,i=new Map,s=new Map,l=new Map,a={...MO,...n.handlers},c={all:h,applyData:BO,definitionById:i,footnoteById:s,footnoteCounts:l,footnoteOrder:[],handlers:a,one:d,options:n,patch:VO,wrap:UO};return wh(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const p=m.type==="definition"?i:s,y=String(m.identifier).toUpperCase();p.has(y)||p.set(y,m)}}),c;function d(m,p){const y=m.type,w=c.handlers[y];if(Md.call(c.handlers,y)&&w)return w(c,m,p);if(c.options.passThrough&&c.options.passThrough.includes(y)){if("children"in m){const{children:E,...T}=m,C=Fl(T);return C.children=c.all(m),C}return Fl(m)}return(c.options.unknownHandler||$O)(c,m,p)}function h(m){const p=[];if("children"in m){const y=m.children;let w=-1;for(;++w<y.length;){const S=c.one(y[w],m);if(S){if(w&&y[w-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=ux(S.value)),!Array.isArray(S)&&S.type==="element")){const E=S.children[0];E&&E.type==="text"&&(E.value=ux(E.value))}Array.isArray(S)?p.push(...S):p.push(S)}}}return p}}function VO(e,t){e.position&&(t.position=OL(e))}function BO(e,t){let n=t;if(e&&e.data){const i=e.data.hName,s=e.data.hChildren,l=e.data.hProperties;if(typeof i=="string")if(n.type==="element")n.tagName=i;else{const a="children"in n?n.children:[n];n={type:"element",tagName:i,properties:{},children:a}}n.type==="element"&&l&&Object.assign(n.properties,Fl(l)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function $O(e,t){const n=t.data||{},i="value"in t&&!(Md.call(n,"hProperties")||Md.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function UO(e,t){const n=[];let i=-1;for(t&&n.push({type:"text",value:`
|
|
311
|
-
`});++i<e.length;)i&&n.push({type:"text",value:`
|
|
312
|
-
`}),n.push(e[i]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
313
|
-
`}),n}function ux(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function cx(e,t){const n=zO(e,t),i=n.one(e,void 0),s=OO(n),l=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return s&&l.children.push({type:"text",value:`
|
|
314
|
-
`},s),l}function WO(e,t){return e&&"run"in e?async function(n,i){const s=cx(n,{file:i,...t});await e.run(s,i)}:function(n,i){return cx(n,{file:i,...e||t})}}function fx(e){if(e)throw e}var kf,dx;function HO(){if(dx)return kf;dx=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},l=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var m=e.call(h,"constructor"),p=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!m&&!p)return!1;var y;for(y in h);return typeof y>"u"||e.call(h,y)},a=function(h,m){n&&m.name==="__proto__"?n(h,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):h[m.name]=m.newValue},c=function(h,m){if(m==="__proto__")if(e.call(h,m)){if(i)return i(h,m).value}else return;return h[m]};return kf=function d(){var h,m,p,y,w,S,E=arguments[0],T=1,C=arguments.length,R=!1;for(typeof E=="boolean"&&(R=E,E=arguments[1]||{},T=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});T<C;++T)if(h=arguments[T],h!=null)for(m in h)p=c(E,m),y=c(h,m),E!==y&&(R&&y&&(l(y)||(w=s(y)))?(w?(w=!1,S=p&&s(p)?p:[]):S=p&&l(p)?p:{},a(E,{name:m,newValue:d(R,S,y)})):typeof y<"u"&&a(E,{name:m,newValue:y}));return E},kf}var KO=HO();const Sf=Od(KO);function Nd(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 qO(){const e=[],t={run:n,use:i};return t;function n(...s){let l=-1;const a=s.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);c(null,...s);function c(d,...h){const m=e[++l];let p=-1;if(d){a(d);return}for(;++p<s.length;)(h[p]===null||h[p]===void 0)&&(h[p]=s[p]);s=h,m?XO(m,c)(...h):a(null,...h)}}function i(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function XO(e,t){let n;return i;function i(...a){const c=e.length>a.length;let d;c&&a.push(s);try{d=e.apply(this,a)}catch(h){const m=h;if(c&&n)throw m;return s(m)}c||(d&&d.then&&typeof d.then=="function"?d.then(l,s):d instanceof Error?s(d):l(d))}function s(a,...c){n||(n=!0,t(a,...c))}function l(a){s(null,a)}}const Gn={basename:YO,dirname:GO,extname:QO,join:ZO,sep:"/"};function YO(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Fs(e);let n=0,i=-1,s=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(l){n=s+1;break}}else i<0&&(l=!0,i=s+1);return i<0?"":e.slice(n,i)}if(t===e)return"";let a=-1,c=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(l){n=s+1;break}}else a<0&&(l=!0,a=s+1),c>-1&&(e.codePointAt(s)===t.codePointAt(c--)?c<0&&(i=s):(c=-1,i=a));return n===i?i=a:i<0&&(i=e.length),e.slice(n,i)}function GO(e){if(Fs(e),e.length===0)return".";let t=-1,n=e.length,i;for(;--n;)if(e.codePointAt(n)===47){if(i){t=n;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function QO(e){Fs(e);let t=e.length,n=-1,i=0,s=-1,l=0,a;for(;t--;){const c=e.codePointAt(t);if(c===47){if(a){i=t+1;break}continue}n<0&&(a=!0,n=t+1),c===46?s<0?s=t:l!==1&&(l=1):s>-1&&(l=-1)}return s<0||n<0||l===0||l===1&&s===n-1&&s===i+1?"":e.slice(s,n)}function ZO(...e){let t=-1,n;for(;++t<e.length;)Fs(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":JO(n)}function JO(e){Fs(e);const t=e.codePointAt(0)===47;let n=eF(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function eF(e,t){let n="",i=0,s=-1,l=0,a=-1,c,d;for(;++a<=e.length;){if(a<e.length)c=e.codePointAt(a);else{if(c===47)break;c=47}if(c===47){if(!(s===a-1||l===1))if(s!==a-1&&l===2){if(n.length<2||i!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",i=0):(n=n.slice(0,d),i=n.length-1-n.lastIndexOf("/")),s=a,l=0;continue}}else if(n.length>0){n="",i=0,s=a,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+e.slice(s+1,a):n=e.slice(s+1,a),i=a-s-1;s=a,l=0}else c===46&&l>-1?l++:l=-1}return n}function Fs(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const tF={cwd:nF};function nF(){return"/"}function jd(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function rF(e){if(typeof e=="string")e=new URL(e);else if(!jd(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 iF(e)}function iF(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const i=t.codePointAt(n+2);if(i===70||i===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const bf=["history","path","basename","stem","extname","dirname"];class zk{constructor(t){let n;t?jd(t)?n={path:t}:typeof t=="string"||oF(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":tF.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<bf.length;){const l=bf[i];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let s;for(s in n)bf.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Gn.basename(this.path):void 0}set basename(t){Ef(t,"basename"),Cf(t,"basename"),this.path=Gn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Gn.dirname(this.path):void 0}set dirname(t){hx(this.basename,"dirname"),this.path=Gn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Gn.extname(this.path):void 0}set extname(t){if(Cf(t,"extname"),hx(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=Gn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){jd(t)&&(t=rF(t)),Ef(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Gn.basename(this.path,this.extname):void 0}set stem(t){Ef(t,"stem"),Cf(t,"stem"),this.path=Gn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,i){const s=this.message(t,n,i);throw s.fatal=!0,s}info(t,n,i){const s=this.message(t,n,i);return s.fatal=void 0,s}message(t,n,i){const s=new qt(t,n,i);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Cf(e,t){if(e&&e.includes(Gn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Gn.sep+"`")}function Ef(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function hx(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function oF(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const sF=function(e){const i=this.constructor.prototype,s=i[e],l=function(){return s.apply(l,arguments)};return Object.setPrototypeOf(l,i),l},aF={}.hasOwnProperty;class Gh extends sF{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=qO()}copy(){const t=new Gh;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];t.use(...i)}return t.data(Sf(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Rf("data",this.frozen),this.namespace[t]=n,this):aF.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Rf("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[n,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const s=n.call(t,...i);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=al(t),i=this.parser||this.Parser;return Tf("parse",i),i(String(n),n)}process(t,n){const i=this;return this.freeze(),Tf("process",this.parser||this.Parser),Pf("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(l,a){const c=al(t),d=i.parse(c);i.run(d,c,function(m,p,y){if(m||!p||!y)return h(m);const w=p,S=i.stringify(w,y);cF(S)?y.value=S:y.result=S,h(m,y)});function h(m,p){m||!p?a(m):l?l(p):n(void 0,p)}}}processSync(t){let n=!1,i;return this.freeze(),Tf("processSync",this.parser||this.Parser),Pf("processSync",this.compiler||this.Compiler),this.process(t,s),mx("processSync","process",n),i;function s(l,a){n=!0,fx(l),i=a}}run(t,n,i){px(t),this.freeze();const s=this.transformers;return!i&&typeof n=="function"&&(i=n,n=void 0),i?l(void 0,i):new Promise(l);function l(a,c){const d=al(n);s.run(t,d,h);function h(m,p,y){const w=p||t;m?c(m):a?a(w):i(void 0,w,y)}}}runSync(t,n){let i=!1,s;return this.run(t,n,l),mx("runSync","run",i),s;function l(a,c){fx(a),s=c,i=!0}}stringify(t,n){this.freeze();const i=al(n),s=this.compiler||this.Compiler;return Pf("stringify",s),px(t),s(t,i)}use(t,...n){const i=this.attachers,s=this.namespace;if(Rf("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[m,...p]=h;d(m,p)}else a(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function a(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(h.plugins),h.settings&&(s.settings=Sf(!0,s.settings,h.settings))}function c(h){let m=-1;if(h!=null)if(Array.isArray(h))for(;++m<h.length;){const p=h[m];l(p)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,m){let p=-1,y=-1;for(;++p<i.length;)if(i[p][0]===h){y=p;break}if(y===-1)i.push([h,...m]);else if(m.length>0){let[w,...S]=m;const E=i[y][1];Nd(E)&&Nd(w)&&(w=Sf(!0,E,w)),i[y]=[h,w,...S]}}}}const lF=new Gh().freeze();function Tf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Pf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Rf(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 px(e){if(!Nd(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function mx(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function al(e){return uF(e)?e:new zk(e)}function uF(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function cF(e){return typeof e=="string"||fF(e)}function fF(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const dF="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",gx=[],yx={allowDangerousHtml:!0},hF=/^(https?|ircs?|mailto|xmpp)$/i,pF=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Vk(e){const t=mF(e),n=gF(e);return yF(t.runSync(t.parse(n),n),e)}function mF(e){const t=e.rehypePlugins||gx,n=e.remarkPlugins||gx,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...yx}:yx;return lF().use(iO).use(n).use(WO,i).use(t)}function gF(e){const t=e.children||"",n=new zk;return typeof t=="string"&&(n.value=t),n}function yF(e,t){const n=t.allowedElements,i=t.allowElement,s=t.components,l=t.disallowedElements,a=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||vF;for(const m of pF)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+dF+m.id,void 0);return wh(e,h),$L(e,{Fragment:v.Fragment,components:s,ignoreInvalidStyle:!0,jsx:v.jsx,jsxs:v.jsxs,passKeys:!0,passNode:!0});function h(m,p,y){if(m.type==="raw"&&y&&typeof p=="number")return a?y.children.splice(p,1):y.children[p]={type:"text",value:m.value},p;if(m.type==="element"){let w;for(w in wf)if(Object.hasOwn(wf,w)&&Object.hasOwn(m.properties,w)){const S=m.properties[w],E=wf[w];(E===null||E.includes(m.tagName))&&(m.properties[w]=d(String(S||""),w,m))}}if(m.type==="element"){let w=n?!n.includes(m.tagName):l?l.includes(m.tagName):!1;if(!w&&i&&typeof p=="number"&&(w=!i(m,p,y)),w&&y&&typeof p=="number")return c&&m.children?y.children.splice(p,1,...m.children):y.children.splice(p,1),p}}}function vF(e){const t=e.indexOf(":"),n=e.indexOf("?"),i=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||i!==-1&&t>i||hF.test(e.slice(0,t))?e:""}const xF={};function Bk(e){const t=this,n=e||xF,i=t.data(),s=i.micromarkExtensions||(i.micromarkExtensions=[]),l=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),a=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);s.push(d1(n)),l.push(W0()),a.push(bN(n))}function mo(e){const t=k.useRef(null);return k.useEffect(()=>(t.current=document.activeElement instanceof HTMLElement?document.activeElement:null,()=>{const n=t.current;n?.isConnected&&requestAnimationFrame(()=>n.focus())}),[]),v.jsx(ck,{open:!0,onOpenChange:n=>{n||e.onClose()},children:v.jsxs(hk,{children:[v.jsx(pk,{className:"modal-backdrop"}),v.jsxs(mk,{id:e.contentId,className:"modal"+(e.wide?" modal-wide":"")+(e.className?` ${e.className}`:""),children:[v.jsxs("div",{className:"modal-head",children:[v.jsxs("div",{children:[v.jsx(yk,{asChild:!0,children:v.jsx("h3",{children:e.title})}),e.description&&v.jsx(vk,{className:"modal-description",children:e.description})]}),v.jsx(xk,{asChild:!0,children:v.jsx("button",{className:"icon-btn","aria-label":`Close ${e.title}`,children:v.jsx(Se,{name:"close"})})})]}),e.tabs,v.jsx("div",{className:"modal-body",children:e.children})]})]})})}const wF=.25,kF=8;let vx=Promise.resolve();function xx(){return document.documentElement.classList.contains("theme-dark")?"dark":"default"}function SF(){const[e,t]=k.useState(xx);return k.useEffect(()=>{const n=document.documentElement,i=()=>t(xx()),s=new MutationObserver(i);return s.observe(n,{attributes:!0,attributeFilter:["class"]}),i(),()=>s.disconnect()},[]),e}function bF(e,t,n){const i=vx.then(async()=>{const{default:s}=await Mh(async()=>{const{default:l}=await import("./mermaid.core-bMY6NRgG.js").then(a=>a.bp);return{default:l}},[]);return s.initialize({startOnLoad:!1,securityLevel:"strict",theme:n,fontFamily:"var(--sans)"}),s.render(e,t)});return vx=i.then(()=>{},()=>{}),i}function CF(e){return Math.min(kF,Math.max(wF,e))}function EF(e){const t=k.useRef(null),n=k.useRef(null),[i,s]=k.useState(1),[l,a]=k.useState({x:0,y:0}),[c,d]=k.useState(!1),h=()=>{s(1),a({x:0,y:0})},m=(p,y,w)=>{const S=CF(p);if(S===i)return;const E=t.current?.getBoundingClientRect();if(E){const T=(y??E.left+E.width/2)-E.left-E.width/2,C=(w??E.top+E.height/2)-E.top-E.height/2,R=S/i;a(A=>({x:T-R*(T-A.x),y:C-R*(C-A.y)}))}s(S)};return k.useEffect(()=>{const p=y=>{y.key==="+"||y.key==="="?(y.preventDefault(),m(i*1.25)):y.key==="-"?(y.preventDefault(),m(i/1.25)):y.key==="0"&&(y.preventDefault(),h())};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)}),v.jsx(ck,{open:!0,onOpenChange:p=>{p||e.onClose()},children:v.jsxs(hk,{children:[v.jsx(pk,{className:"mermaid-fullscreen-backdrop"}),v.jsxs(mk,{className:"mermaid-fullscreen","data-mermaid-theme":e.theme,"aria-describedby":"mermaid-fullscreen-help",children:[v.jsx(yk,{className:"mermaid-fullscreen-title",children:"Diagram viewer"}),v.jsxs("div",{className:"mermaid-fullscreen-tools",children:[v.jsx("button",{className:"icon-btn","aria-label":"Zoom out",title:"Zoom out (−)",onClick:()=>m(i/1.25),children:v.jsx(Se,{name:"minus"})}),v.jsxs("button",{className:"mermaid-zoom-value",onClick:h,title:"Reset zoom and position",children:[Math.round(i*100),"%"]}),v.jsx("button",{className:"icon-btn","aria-label":"Zoom in",title:"Zoom in (+)",onClick:()=>m(i*1.25),children:v.jsx(Se,{name:"plus"})}),v.jsx(xk,{asChild:!0,children:v.jsx("button",{className:"icon-btn","aria-label":"Close diagram viewer",title:"Close (Esc)",children:v.jsx(Se,{name:"close"})})})]}),v.jsx("div",{ref:t,className:"mermaid-fullscreen-viewport"+(c?" dragging":""),onWheel:p=>{p.preventDefault(),m(i*Math.exp(-p.deltaY*.0015),p.clientX,p.clientY)},onDoubleClick:p=>m(i*1.5,p.clientX,p.clientY),onPointerDown:p=>{p.button===0&&(n.current={pointerId:p.pointerId,startX:p.clientX,startY:p.clientY,panX:l.x,panY:l.y},p.currentTarget.setPointerCapture(p.pointerId),d(!0))},onPointerMove:p=>{const y=n.current;!y||y.pointerId!==p.pointerId||a({x:y.panX+p.clientX-y.startX,y:y.panY+p.clientY-y.startY})},onPointerUp:p=>{n.current?.pointerId===p.pointerId&&(n.current=null,d(!1),p.currentTarget.releasePointerCapture(p.pointerId))},onPointerCancel:()=>{n.current=null,d(!1)},children:v.jsx("div",{className:"mermaid-fullscreen-canvas",style:{transform:`translate(${l.x}px, ${l.y}px) scale(${i})`},dangerouslySetInnerHTML:{__html:e.svg}})}),v.jsx(vk,{id:"mermaid-fullscreen-help",className:"mermaid-fullscreen-help",children:"Scroll to zoom · drag to move · double-click to zoom in"})]})]})})}function TF({source:e}){const t=k.useId(),[n,i]=k.useState(""),[s,l]=k.useState(""),[a,c]=k.useState("default"),[d,h]=k.useState(!1),m=SF();return k.useEffect(()=>{let p=!0;const y=`mermaid-${t.replace(/[^a-zA-Z0-9_-]/g,"")}`;return i(""),l(""),bF(y,e,m).then(w=>{p&&(c(m),i(w.svg))}).catch(w=>{p&&l(w instanceof Error?w.message:String(w))}),()=>{p=!1,document.getElementById(`d${y}`)?.remove()}},[t,e,m]),s?v.jsxs("pre",{className:"markdown-mermaid-error",children:["Mermaid error: ",s]}):n?v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"markdown-mermaid","data-mermaid-theme":a,children:[v.jsx("button",{className:"icon-btn markdown-mermaid-expand","aria-label":"View diagram fullscreen",title:"View diagram fullscreen",onClick:()=>h(!0),children:v.jsx(Se,{name:"maximize"})}),v.jsx("div",{className:"markdown-mermaid-diagram",dangerouslySetInnerHTML:{__html:n}})]}),d&&v.jsx(EF,{svg:n,theme:a,onClose:()=>h(!1)})]}):v.jsx("div",{className:"markdown-mermaid-loading",children:"Rendering diagram…"})}const PF=k.memo(function(t){return v.jsx("article",{className:"markdown-body",ref:t.contentRef,children:v.jsx(Vk,{remarkPlugins:[Bk],components:{a:({children:n,...i})=>v.jsx("a",{...i,target:"_blank",rel:"noreferrer",children:n}),code:({className:n,children:i,...s})=>{const l=/language-([\w-]+)/.exec(n??"")?.[1],a=String(i).replace(/\n$/,"");return l==="mermaid"?v.jsx(TF,{source:a}):v.jsx("code",{className:n,...s,children:i})}},children:t.markdown})})});function RF(e){const{rec:t}=e,n=k.useRef(null),[i,s]=k.useState(""),[l,a]=k.useState(null),[c,d]=k.useState("loading"),[h,m]=k.useState(""),[p,y]=k.useState(0),[w,S]=k.useState(""),[E,T]=k.useState(0),[C,R]=k.useState(!1),[A,D]=k.useState(""),[B,I]=k.useState(!1),[q,$]=k.useState(!1),[K,j]=k.useState([]),[Y,W]=k.useState(!1),[ue,Z]=k.useState(null),[ee,ge]=k.useState(!1),[Ce,X]=k.useState("");k.useEffect(()=>{let M=!0,J=null;return d("loading"),ql(t.id).then(he=>{if(M){if(!he){d("missing");return}s(new TextDecoder("utf-8").decode(he)),J=URL.createObjectURL(new Blob([he],{type:"text/markdown;charset=utf-8"})),a(J),d("ready")}}).catch(()=>{M&&d("error")}),()=>{M=!1,J&&URL.revokeObjectURL(J)}},[t.id]),k.useEffect(()=>{const M=()=>{const J=window.getSelection(),he=n.current;if(!J||J.isCollapsed||!he){m(""),y(0);return}if(!he.contains(J.anchorNode)||!he.contains(J.focusNode)){m(""),y(0);return}const me=J.getRangeAt(0),ve=J.toString(),Ee=ve.length-ve.trimStart().length,Re=ve.trim().slice(0,4e3),Be=document.createRange();Be.selectNodeContents(he),Be.setEnd(me.startContainer,me.startOffset);const ft=Be.toString().length+Ee;m(Re),y(YI(he.textContent,Re,ft))};return document.addEventListener("selectionchange",M),()=>document.removeEventListener("selectionchange",M)},[]);const ce=()=>{h&&(S(h),T(p),R(!0),X(""))},P=async()=>{if(q){if(!w||!A.trim())return;j(J=>[...J,{selection:w,comment:A.trim(),occurrence:E}]),D(""),R(!1),X("Comment added to review");return}const M=qI(w,A);if(!(!M||!A.trim()||B)){I(!0),X("");try{await e.onSendText(M,t.id||void 0),D(""),R(!1),X("Feedback sent")}catch(J){X(`Send failed: ${String(J)}`)}finally{I(!1)}}},L=async()=>{if(K.length===0||Y)return;const M=tD(i,K);W(!0),X("");try{e.onSendFile?await e.onSendFile({filename:XI(t.filename),mime:"text/markdown",bytes:new TextEncoder().encode(M)},t.id||void 0):await e.onSendText(M,t.id||void 0),j([]),$(!1),X("Review submitted")}catch(J){X(`Review send failed: ${String(J)}`)}finally{W(!1)}},G=async()=>{if(!(!ue||!e.onSendFile||ee)){ge(!0),X("");try{await e.onSendFile(ue,t.id||void 0),Z(null),X("Voice feedback sent")}catch(M){X(`Voice send failed: ${String(M)}`)}finally{ge(!1)}}};return v.jsx(mo,{title:t.filename,description:"Markdown preview · select text to send precise feedback",onClose:e.onClose,wide:!0,className:"markdown-modal",children:v.jsxs("div",{className:"markdown-preview",children:[v.jsxs("div",{className:"markdown-review-toolbar",children:[v.jsxs("button",{className:"btn sm",disabled:!h,onMouseDown:M=>M.preventDefault(),onClick:ce,children:[v.jsx(Se,{name:"reply",size:14}),q?"Add review comment":"Quick message",h?` (${h.length})`:""]}),q?v.jsx("button",{className:"btn sm",onClick:()=>{$(!1),j([]),R(!1),X("Review discarded")},children:"Cancel review"}):v.jsxs("button",{className:"btn sm",onClick:()=>{$(!0),j([]),X("Review started — select passages to add comments")},children:[v.jsx(Se,{name:"edit",size:14}),"Start review"]}),l&&v.jsxs("a",{className:"btn sm",href:l,download:t.filename,children:[v.jsx(Se,{name:"download",size:14}),"Download"]}),e.onSendFile&&v.jsx(S1,{disabled:!!ue||ee,onReady:Z,onError:X}),v.jsx("span",{className:"markdown-review-hint",children:h?"Selection ready for feedback":"Highlight any passage to comment on it"})]}),C&&v.jsxs("div",{className:"markdown-feedback",children:[v.jsx("blockquote",{children:w}),v.jsx("textarea",{className:"field",rows:3,autoFocus:!0,placeholder:"What should change?",value:A,onChange:M=>D(M.target.value)}),v.jsxs("div",{className:"markdown-feedback-actions",children:[v.jsx("button",{className:"btn sm",onClick:()=>R(!1),children:"Cancel"}),v.jsxs("button",{className:"btn sm primary",disabled:!A.trim()||B,onClick:()=>void P(),children:[v.jsx(Se,{name:"send",size:14}),q?"Add to review":B?"Sending…":"Send feedback"]})]})]}),q&&v.jsxs("div",{className:"markdown-review-draft",children:[v.jsxs("div",{className:"markdown-review-draft-head",children:[v.jsxs("strong",{children:["Review · ",K.length," comment",K.length===1?"":"s"]}),v.jsxs("button",{className:"btn sm primary",disabled:K.length===0||Y,onClick:()=>void L(),children:[v.jsx(Se,{name:"send",size:14}),Y?"Submitting…":"Submit review"]})]}),K.map((M,J)=>v.jsxs("div",{className:"markdown-review-comment",children:[v.jsx("span",{children:J+1}),v.jsxs("div",{children:[v.jsx("blockquote",{children:M.selection}),v.jsx("p",{children:M.comment})]}),v.jsx("button",{className:"icon-btn",title:"Remove comment",onClick:()=>j(he=>he.filter((me,ve)=>ve!==J)),children:v.jsx(Se,{name:"close",size:14})})]},`${J}-${M.selection.slice(0,24)}`))]}),ue&&v.jsx(k1,{att:ue,sending:ee,onSend:()=>void G(),onDiscard:()=>Z(null)}),Ce&&v.jsx("div",{className:"markdown-review-status",role:"status",children:Ce}),v.jsxs("div",{className:"markdown-preview-scroll",children:[c==="loading"&&v.jsx("div",{className:"markdown-empty",children:"Loading preview…"}),c==="missing"&&v.jsx("div",{className:"markdown-empty",children:"This file is available on the original device only."}),c==="error"&&v.jsx("div",{className:"markdown-empty",children:"The file could not be opened."}),c==="ready"&&v.jsx(PF,{markdown:i,contentRef:n})]})]})})}function AF(e){const{rec:t}=e,[n,i]=k.useState(""),[s,l]=k.useState(null),[a,c]=k.useState(0),[d,h]=k.useState("loading");return k.useEffect(()=>{let m=!0,p=null;return h("loading"),ql(t.id).then(y=>{if(m){if(!y){h("missing");return}i(lD(new TextDecoder("utf-8").decode(y))),c(y.byteLength),p=URL.createObjectURL(new Blob([y],{type:Th(t.mime,t.filename)})),l(p),h("ready")}}).catch(()=>{m&&h("error")}),()=>{m=!1,p&&URL.revokeObjectURL(p)}},[t.id,t.mime,t.filename]),v.jsx(mo,{title:t.filename,description:"HTML preview · sandboxed, static rendering only",onClose:e.onClose,wide:!0,className:"markdown-modal html-modal",children:v.jsxs("div",{className:"html-preview",children:[v.jsxs("div",{className:"html-preview-toolbar",children:[v.jsxs("span",{className:"html-preview-shield",children:[v.jsx(Se,{name:"shield",size:14}),"Scripts, forms and network requests are blocked"]}),s&&v.jsxs("a",{className:"btn sm",href:s,download:t.filename,children:[v.jsx(Se,{name:"download",size:14}),"Download original",a?` · ${$r(a)}`:""]})]}),v.jsxs("div",{className:"html-preview-frame",children:[d==="loading"&&v.jsx("div",{className:"markdown-empty",children:"Loading preview…"}),d==="missing"&&v.jsx("div",{className:"markdown-empty",children:"This file is available on the original device only."}),d==="error"&&v.jsx("div",{className:"markdown-empty",children:"The file could not be opened."}),d==="ready"&&v.jsx("iframe",{className:"html-preview-iframe",title:`Sandboxed preview of ${t.filename}`,sandbox:rD,referrerPolicy:"no-referrer",srcDoc:n})]})]})})}function $k(e){const t=(n,i)=>{const{key:s}=n;if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(s))return;n.preventDefault();const l=e.options.length-1,a=s==="Home"?0:s==="End"?l:s==="ArrowLeft"||s==="ArrowUp"?(i-1+e.options.length)%e.options.length:(i+1)%e.options.length,c=e.options[a];c&&(e.onChange(c.id),document.getElementById(`${e.idPrefix}-${c.id}`)?.focus())};return v.jsx("div",{className:e.className,role:"tablist","aria-label":e.label,children:e.options.map((n,i)=>v.jsxs("button",{id:`${e.idPrefix}-${n.id}`,type:"button",role:"tab","aria-selected":e.value===n.id,"aria-controls":e.panelId,tabIndex:e.value===n.id?0:-1,className:"tab"+(e.value===n.id?" active":""),onClick:()=>e.onChange(n.id),onKeyDown:s=>t(s,i),children:[n.label,n.count===void 0?null:v.jsxs(v.Fragment,{children:[" ",v.jsx("span",{children:n.count})]})]},n.id))})}function Id(e){const{message:t}=e,[n,i]=k.useState(null),[s,l]=k.useState(0),a=b0(t.wireId)??{id:t.wireId,dir:t.dir,filename:t.filename??"file",mime:t.mime??"application/octet-stream",size:s,date:t.date};k.useEffect(()=>{let h=!0,m=null;if(t.wireId)return ql(t.wireId).then(p=>{!h||!p||(l(p.byteLength),m=URL.createObjectURL(new Blob([p],{type:Th(a.mime,a.filename)})),i(m))}).catch(()=>{}),()=>{h=!1,m&&URL.revokeObjectURL(m)}},[t.wireId,a.mime,a.filename]);const c=pd(t)==="photo",d=io(a.mime,a.filename);return v.jsxs("div",{className:"shared-media-item"+(c?" shared-photo-item":""),children:[v.jsxs("button",{className:"shared-media-jump",onClick:()=>e.onJump(e.messageKey),children:[c&&n?v.jsx("img",{src:n,alt:a.filename}):v.jsx("span",{className:"shared-media-icon",children:v.jsx(Se,{name:d?"mic":"copy",size:18})}),v.jsxs("span",{className:"shared-media-copy",children:[v.jsx("strong",{children:c?a.filename||"Photo":d?"Voice message":a.filename}),v.jsxs("span",{children:[e.versionLabel?`${e.versionLabel} · `:"",bs(a.date),s?` · ${$r(s)}`:""]})]})]}),v.jsxs("span",{className:"shared-media-actions",children:[h1(a.filename)&&n&&v.jsx("button",{className:"icon-btn",title:"Preview markdown",onClick:()=>e.onPreview(a),children:v.jsx(Se,{name:"monitor",size:16})}),Zl(a.filename,a.mime)&&n&&v.jsx("button",{className:"icon-btn",title:"Preview HTML",onClick:()=>e.onPreview(a),children:v.jsx(Se,{name:"monitor",size:16})}),v.jsx("a",{className:"icon-btn"+(n?"":" disabled"),href:n??void 0,download:a.filename,title:"Download",children:v.jsx(Se,{name:"download",size:16})})]})]})}function MF(e){const[t,n]=k.useState(!1);if(e.versions.length===1){const i=e.versions[0];return v.jsx(Id,{message:i.message,messageKey:i.key,onJump:e.onJump,onPreview:e.onPreview})}return v.jsxs("div",{className:"file-version-stack"+(t?" expanded":""),children:[v.jsxs("button",{className:"file-version-stack-head",onClick:()=>n(i=>!i),children:[v.jsx("span",{className:"shared-media-icon",children:v.jsx(Se,{name:"copy",size:18})}),v.jsxs("span",{className:"shared-media-copy",children:[v.jsx("strong",{children:e.filename}),v.jsxs("span",{children:[e.versions.length," versions · newest ",bs(e.versions[0].message.date)]})]}),v.jsx(Se,{name:t?"chevronDown":"chevron",size:16})]}),t&&v.jsx("div",{className:"file-version-stack-list",children:e.versions.map((i,s)=>v.jsx(Id,{message:i.message,messageKey:i.key,versionLabel:`Version ${e.versions.length-s}`,onJump:e.onJump,onPreview:e.onPreview},i.key))})]})}function NF(e){const[t,n]=k.useState("photo"),i=e.messages.map((h,m)=>({message:h,key:h.wireId||`${h.date}-${(e.indexOffset??0)+m}`})),s=i.filter(({message:h})=>pd(h)==="photo"),l=i.filter(({message:h})=>pd(h)==="file"),a=QI(l),c=i.flatMap(({message:h,key:m})=>h.kind==="file"?[]:GI(h.text).map(p=>({url:p,message:h,key:m}))),d=[{id:"photo",label:"Photos",count:s.length},{id:"file",label:"Files",count:l.length},{id:"link",label:"Links",count:c.length}];return v.jsx(mo,{title:"Shared media",description:"Photos, files, and links from this conversation",onClose:e.onClose,wide:!0,className:"shared-media-modal",tabs:v.jsx($k,{className:"shared-media-tabs",label:"Shared media type",options:d,value:t,onChange:n,idPrefix:"shared-media-tab",panelId:"shared-media-panel"}),children:v.jsxs("div",{id:"shared-media-panel",role:"tabpanel","aria-labelledby":`shared-media-tab-${t}`,className:"shared-media-list"+(t==="photo"?" photos":""),children:[t==="photo"&&s.map(h=>v.jsx(Id,{message:h.message,messageKey:h.key,onJump:e.onJump,onPreview:e.onPreview},h.key)),t==="file"&&a.map(h=>v.jsx(MF,{filename:h.filename,versions:h.versions,onJump:e.onJump,onPreview:e.onPreview},h.filename)),t==="link"&&c.map((h,m)=>v.jsxs("div",{className:"shared-media-item",children:[v.jsxs("a",{className:"shared-media-jump",href:h.url,target:"_blank",rel:"noreferrer",children:[v.jsx("span",{className:"shared-media-icon",children:v.jsx(Se,{name:"link",size:18})}),v.jsxs("span",{className:"shared-media-copy",children:[v.jsx("strong",{children:h.url}),v.jsx("span",{children:bs(h.message.date)})]})]}),v.jsx("button",{className:"icon-btn",title:"Jump to message",onClick:()=>e.onJump(h.key),children:v.jsx(Se,{name:"reply",size:16})})]},`${h.key}-${h.url}-${m}`)),(t==="photo"&&s.length===0||t==="file"&&l.length===0||t==="link"&&c.length===0)&&v.jsxs("div",{className:"markdown-empty",children:["No ",t==="photo"?"photos":`${t}s`," in this chat yet."]})]})})}const jF=Object.freeze(["image/avif","image/bmp","image/heic","image/heif","image/jpeg","image/jpg","image/png","image/webp"]),IF=/\.(avif|bmp|heic|heif|jpe?g|png|webp)$/i;function Uk(e,t=""){return jF.includes(String(e??"").toLowerCase())||IF.test(String(t??""))}function DF(e){return`${(String(e||"photo").trim()||"photo").replace(/\.[^./\\]+$/,"")||"photo"}.jpg`}function _F(e,t,n){const i=Math.max(1,Number(e)||1),s=Math.max(1,Number(t)||1),l=Math.max(1,Number(n)||1),a=Math.min(1,l/Math.max(i,s));return{width:Math.max(1,Math.round(i*a)),height:Math.max(1,Math.round(s*a))}}const LF=2048,OF=640,FF=.82,zF=[.84,.7,.56,.44],VF=.94;function BF(e){return new Promise((t,n)=>{const i=URL.createObjectURL(e),s=new Image,l=()=>URL.revokeObjectURL(i);s.onload=()=>t({image:s,release:l}),s.onerror=()=>{l(),n(new Error("This browser could not decode the selected image."))},s.src=i})}function $F(e,t){return new Promise((n,i)=>{e.toBlob(s=>s?n(s):i(new Error("This browser could not encode the optimized photo.")),"image/jpeg",t)})}async function UF(e,t){if(!Uk(e.type,e.name))throw new Error("This image format cannot be optimized safely in this browser.");const n=Math.max(1,Math.floor(t*VF)),{image:i,release:s}=await BF(e),l=document.createElement("canvas"),a=l.getContext("2d",{alpha:!1});if(!a)throw s(),new Error("Photo optimization is unavailable in this browser.");try{let c=Math.min(LF,Math.max(i.naturalWidth,i.naturalHeight));for(;c>=OF;){const d=_F(i.naturalWidth,i.naturalHeight,c);l.width=d.width,l.height=d.height,a.fillStyle="#fff",a.fillRect(0,0,l.width,l.height),a.drawImage(i,0,0,l.width,l.height);for(const h of zF){const m=await $F(l,h);if(m.size<=n)return{filename:DF(e.name),mime:"image/jpeg",bytes:new Uint8Array(await m.arrayBuffer()),width:l.width,height:l.height,originalSize:e.size}}c=Math.floor(c*FF)}}finally{s(),l.width=1,l.height=1}throw new Error("The photo is still too large after optimization.")}const WF=5e4,HF=new Set(["http:","https:","mailto:"]);function Wk(e){if(!(!e||e!==e.trim()||/[\u0000-\u001f\u007f]/u.test(e)))try{const t=new URL(e);return HF.has(t.protocol.toLowerCase())?e:void 0}catch{return}}function Hk(e){const t="language-";return e?.startsWith(t)&&e.slice(t.length)||void 0}function KF(e){return e.split(/(\n[ \t]*\n)/).map(t=>{if(/^\n[ \t]*\n$/.test(t))return t;const n=t.split(`
|
|
315
|
-
`),i=n.filter(a=>a.trim().length>0);if(i.length===0)return t;const s=i.map(a=>a.match(/^[ \t]+/)?.[0]??"");if(s.some(a=>a.length===0))return t;const l=Math.min(...s.map(a=>a.length));return n.map(a=>a.trim().length>0?a.slice(l):a).join(`
|
|
316
|
-
`)}).join("")}function qF({children:e}){const t=k.isValidElement(e)?e:null,n=Hk(t?.props.className);return v.jsxs("div",{className:"message-code-block","data-language":n||void 0,children:[n&&v.jsx("div",{className:"message-code-language",children:n}),v.jsx("pre",{children:e})]})}const XF=[Bk],YF={a:({node:e,children:t,href:n,...i})=>{const s=Wk(n);return s?v.jsx("a",{...i,href:s,target:"_blank",rel:"noopener noreferrer",children:t}):v.jsx("span",{className:"message-link-blocked",children:t})},img:({alt:e})=>v.jsxs("span",{className:"message-image-placeholder",children:["[image: ",e||"remote image blocked","]"]}),pre:qF,code:({node:e,className:t,children:n,...i})=>v.jsx("code",{className:t,"data-language":Hk(t),...i,children:n})},wx=k.memo(function({text:t,className:n="bubble-text message-markdown"}){return t.length>WF?v.jsx("div",{className:`${n} message-markdown-plaintext`,"data-render-mode":"plaintext",children:t}):v.jsx("div",{className:n,"data-render-mode":"markdown",children:v.jsx(Vk,{remarkPlugins:XF,components:YF,urlTransform:i=>Wk(i)??"",children:KF(t)})})}),kl={type:"spring",stiffness:430,damping:38,mass:.72},kx=10,Kk=56,GF=18,QF=650;function ZF(e,t){return Math.abs(e)<kx&&Math.abs(t)<kx?"pending":Math.abs(e)>Math.abs(t)&&e>0?"drag":"reject"}function JF(e){const t=e.at(-1),n=t?e.slice(0,-1).reverse().find(i=>i.x!==t.x&&t.time-i.time<=100):void 0;return n&&t&&t.time>n.time?(t.x-n.x)/(t.time-n.time)*1e3:0}function ez(e,t){const n=JF(t);return n>=0&&(e>=Kk||e>=GF&&n>=QF)}const Dd="ours.chats.listMode",ms="recent";function qk(){try{return globalThis.localStorage}catch{return}}function tz(e=qk()){try{return e?.getItem(Dd)==="identity"?"identity":ms}catch{return ms}}function nz(e,t=qk()){const n=e==="identity"?"identity":ms;try{return t?.setItem(Dd,n),t?.getItem(Dd)===n?n:ms}catch{return ms}}function Rs(e){return typeof e=="string"?e:""}function zl(e,t){const n=Rs(e),i=Rs(t),s=n.normalize().toLowerCase(),l=i.normalize().toLowerCase();return s<l?-1:s>l?1:n<i?-1:n>i?1:0}function rz(e,t){const n=jl(Rs(t.activityAt))-jl(Rs(e.activityAt));if(n!==0)return n;const i=zl(e.name,t.name);return i!==0?i:zl(e.id,t.id)}function _d(e){return[...e].sort(rz)}function Sx(e){return e.contacts.length>0?jl(Rs(e.contacts[0].activityAt)):0}function iz(e,t){const n=new Map,i=[];for(const l of e){const a=l.root||(t?.[l.id]?l.id:null);if(!a){i.push(l);continue}const c=t?.[a]||{label:a,note:""};let d=n.get(a);d||(d={id:`root:${a}`,rootId:a,label:c.label,note:c.note,contacts:[]},n.set(a,d)),d.contacts.push(l)}const s=[...n.values()].map(l=>({...l,contacts:_d(l.contacts)}));return i.length>0&&s.push({id:"rootless",rootId:null,label:"Independent identities",note:"People, agents and apps without a verified Human/root group",contacts:_d(i)}),s.sort((l,a)=>{const c=Sx(a)-Sx(l);if(c!==0)return c;const d=zl(l.label,a.label);return d!==0?d:zl(l.id,a.id)})}const oz=15e3;function Af(e){const{c:t,active:n,grouped:i}=e,[s,l]=k.useState(!1),a=async(h,m)=>{if(!(!h||s)){l(!0);try{const p=await h();requestAnimationFrame(()=>{p?document.getElementById("chat-list-title")?.focus():m.focus()})}finally{l(!1)}}},c=v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"contact-avatar","aria-hidden":!0,children:t.initials}),v.jsxs("span",{className:"contact-copy",children:[v.jsxs("span",{className:"contact-row-topline",children:[v.jsx("span",{className:"contact-name",children:t.name}),t.when&&v.jsx("span",{className:"contact-time",children:t.when})]}),v.jsxs("span",{className:"contact-row-bottomline",children:[v.jsx("span",{className:"contact-last",children:t.last}),t.status==="pending"&&v.jsx("span",{className:"chip",children:"pending approval"}),!!t.unread&&v.jsx("span",{className:"contact-unread",children:t.unread})]})]}),t.status==="pending"&&v.jsxs("span",{className:"pending-actions",role:"group","aria-label":`Decide whether to accept ${t.name}`,children:[v.jsx("button",{type:"button",className:"linkbtn",disabled:s,onClick:h=>void a(e.onApprove,h.currentTarget),children:"Approve"}),v.jsx("button",{type:"button",className:"linkbtn quiet",disabled:s,onClick:h=>void a(e.onReject,h.currentTarget),children:"Reject"})]}),n&&v.jsx(fs.span,{className:"contact-active-glow",layoutId:"active-contact",transition:kl})]}),d="contact-row"+(n?" active":"")+(i?" grouped":"")+(t.status==="pending"?" pending":"");return t.status==="pending"?v.jsx("div",{className:d,children:c}):v.jsx(fs.button,{type:"button",className:d,onClick:e.onClick,children:c})}function sz(e){const{contacts:t,roots:n,selected:i}=e,[s,l]=k.useState(""),[a,c]=k.useState(()=>tz()),d=C=>C.name.toLowerCase().includes(s.toLowerCase()),h=t.filter(C=>C.status!=="pending"&&d(C)),m=t.filter(C=>C.status==="pending"&&d(C)),p=_d(h),y=iz(h,n),w=h.length===0&&m.length===0,S=C=>{c(nz(C))},E=[{id:"recent",label:"Recent"},{id:"identity",label:"By identity"}],T=(C,R)=>{if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(C.key))return;C.preventDefault();const D=C.key==="Home"?"recent":C.key==="End"||R==="recent"?"identity":"recent";S(D),document.getElementById(`conversation-list-${D}`)?.focus()};return v.jsxs("div",{className:"listcol",children:[v.jsxs("div",{className:"listcol-head",children:[v.jsxs("div",{className:"listcol-titlebar",children:[v.jsx("h2",{id:"chat-list-title",className:"listcol-title",tabIndex:-1,children:"Chats"}),v.jsxs("div",{className:"listcol-actions",children:[v.jsxs("button",{className:"btn sm primary",onClick:e.onInvite,children:[v.jsx(Se,{name:"plus",size:15}),"Invite"]}),v.jsx("button",{className:"icon-btn",title:"Settings",onClick:e.onSettings,children:v.jsx(Se,{name:"settings"})})]})]}),v.jsxs("div",{className:"search",children:[v.jsx(Se,{name:"search"}),v.jsx("input",{className:"field",placeholder:"Search people, agents, apps…",value:s,onChange:C=>l(C.target.value)})]}),v.jsx("div",{className:"conversation-list-modes",role:"tablist","aria-label":"Conversation list layout",children:E.map(C=>v.jsx("button",{id:`conversation-list-${C.id}`,type:"button",role:"tab","aria-selected":a===C.id,"aria-controls":"conversation-list-panel",tabIndex:a===C.id?0:-1,className:a===C.id?"active":"",onClick:()=>S(C.id),onKeyDown:R=>T(R,C.id),children:C.label},C.id))})]}),v.jsxs("div",{id:"conversation-list-panel",className:"listcol-scroll",role:"tabpanel","aria-labelledby":`conversation-list-${a}`,children:[a==="recent"&&p.length>0&&v.jsx("div",{className:"conversation-group",children:p.map(C=>v.jsx(Af,{c:C,active:i===C.id,onClick:()=>e.onSelect(C.id)},C.id))}),a==="identity"&&y.map(C=>v.jsxs("div",{children:[v.jsxs("div",{className:"group-label",title:C.note,children:[C.rootId&&v.jsx(Se,{name:"clusters"}),v.jsx("span",{children:C.label}),C.note&&v.jsxs("span",{className:"gl-note",children:["· ",C.note]})]}),v.jsx("div",{className:"conversation-group",children:C.contacts.map(R=>v.jsx(Af,{c:R,grouped:C.rootId!==null,active:i===R.id,onClick:()=>e.onSelect(R.id)},R.id))})]},C.id)),m.length>0&&v.jsxs("div",{children:[v.jsx("div",{className:"group-label",children:v.jsx("span",{children:"Pending"})}),v.jsx("div",{className:"conversation-group",children:m.map(C=>v.jsx(Af,{c:C,active:!1,onClick:()=>{},onApprove:()=>e.onApprovePending(C.id.slice(8)),onReject:()=>e.onRejectPending(C.id.slice(8))},C.id))})]}),w&&v.jsx("p",{className:"muted",style:{padding:"14px 10px",fontSize:"0.85rem"},children:"No contacts yet — share an invite to start."})]})]})}const Mf=e=>`chat-message-${encodeURIComponent(e)}`,Ld=()=>typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;function bx(e){const{dir:t,canReply:n,onReply:i}=e,s=k.useRef(null),l=k.useRef(null),a=k.useRef(null),c=k.useRef(i);c.current=i;const d=1,h=Kk,m=84,p=()=>({id:-1,x0:0,y0:0,mode:"idle",armed:!1,distance:0,samples:[]}),y=k.useRef(p()),w=R=>{const A=l.current,D=a.current,B=Ld();if(A&&(A.style.transform=R&&!B?`translateX(${R}px)`:""),D){const I=Math.min(1,Math.abs(R)/h);D.style.opacity=String(I),D.style.transform=B?"scale(1)":`scale(${.5+.5*I})`}},S=(R,A)=>{const D=y.current;if(D.id!==R)return;const B=A&&D.mode==="drag"&&ez(D.distance,D.samples);y.current=p(),l.current?.classList.remove("swiping"),a.current?.classList.remove("armed"),w(0);const I=s.current;I?.hasPointerCapture?.(R)&&I.releasePointerCapture(R),B&&c.current()};k.useEffect(()=>{const R=s.current;if(!R)return;const A=D=>S(D.pointerId,!1);return R.addEventListener("lostpointercapture",A),()=>{R.removeEventListener("lostpointercapture",A);const D=y.current.id;D!==-1&&S(D,!1)}},[]);const E=R=>{const A=R.target,D=window.getSelection?.();!n||!R.isPrimary||R.pointerType==="mouse"||R.button!==0||y.current.id!==-1||D&&!D.isCollapsed||A.closest('a, button, input, textarea, select, [role="button"], audio, video, img, [draggable="true"], .filecard, .filecard-bubble, .image-bubble, .voice-bubble, .ours-message-file, .attachment')||(y.current={id:R.pointerId,x0:R.clientX,y0:R.clientY,mode:"maybe",armed:!1,distance:0,samples:[{x:R.clientX,time:R.timeStamp}]},w(0))},T=R=>{const A=y.current;if(A.id!==R.pointerId||A.mode==="idle")return;const D=R.clientX-A.x0,B=R.clientY-A.y0,I=window.getSelection?.();if(I&&!I.isCollapsed){S(R.pointerId,!1);return}if(A.mode==="maybe"){const Y=ZF(D,B);if(Y==="pending")return;if(Y==="drag"&&Math.sign(D)===d)A.mode="drag",R.currentTarget.setPointerCapture?.(R.pointerId),l.current?.classList.add("swiping");else{A.mode="idle";return}}R.preventDefault();const q=R.timeStamp;A.samples.push({x:R.clientX,time:q}),A.samples=A.samples.filter(Y=>q-Y.time<=120);let $=D*d;$<0&&($=0),$>h&&($=h+($-h)*.35),$=Math.min($,m),A.distance=$;const K=$*d,j=Math.abs(K)>=h;j!==A.armed&&(A.armed=j,a.current?.classList.toggle("armed",j),j&&navigator.vibrate?.(10)),w(K)},C=R=>{const A=y.current;A.id===R.pointerId&&A.mode==="drag"&&(A.samples.push({x:R.clientX,time:R.timeStamp}),A.distance=Math.max(0,R.clientX-A.x0),A.armed=A.distance>=h),S(R.pointerId,!0)};return v.jsxs("div",{ref:s,className:"msg-row "+(e.rowClass??t),style:n?{touchAction:"pan-y"}:void 0,onPointerDown:E,onPointerMove:T,onPointerUp:C,onPointerCancel:R=>S(R.pointerId,!1),onLostPointerCapture:R=>S(R.pointerId,!1),children:[n&&v.jsx("span",{className:"swipe-cue",ref:a,"aria-hidden":!0,children:v.jsx(Se,{name:"reply",size:16})}),v.jsx("div",{className:"bubble-wrap",ref:l,children:e.children}),e.after]})}function az(e){const{contact:t,messages:n}=e,[i,s]=k.useState(""),[l,a]=k.useState(!1),[c,d]=k.useState(null),[h,m]=k.useState(null),[p,y]=k.useState(null),[w,S]=k.useState(null),[E,T]=k.useState(null),[C,R]=k.useState(!1),A=k.useRef(null),D=k.useRef(null),[B,I]=k.useState(null),[q,$]=k.useState(!1),[K,j]=k.useState(!1),[Y,W]=k.useState(!1),[ue,Z]=k.useState(null),[ee,ge]=k.useState(!1),Ce=k.useRef(null),X=k.useRef(null),ce=k.useRef(!1),P=k.useRef(null),L=k.useRef(!1),[G,M]=k.useState(!1),[J,he]=k.useState(0),me=k.useRef(null),ve=k.useRef(!0),Ee=k.useRef(null),Re=k.useRef(0),Be=k.useRef(null),ft=k.useRef(new Map),qe=k.useRef(0),lt=k.useRef(null),_e=k.useRef(null),tn=k.useRef(0),Rt=k.useRef(null),Xe=typeof window<"u"&&window.matchMedia("(max-width: 860px)").matches,mt=(z=!1)=>{R(!1),z&&requestAnimationFrame(()=>A.current?.focus())};k.useEffect(()=>{if(!C||Xe)return;D.current?.querySelector(".idcard-close")?.focus();const z=re=>{re.key==="Escape"&&(re.preventDefault(),mt(!0))};return document.addEventListener("keydown",z),()=>document.removeEventListener("keydown",z)},[C,Xe]),k.useEffect(()=>{s(""),m(null),y(null),d(null),S(null),T(null),R(!1),I(null),$(!1),j(!1),W(!1),Re.current+=1,Z(null),ge(!1),ft.current.clear(),lt.current=null,_e.current=null},[t?.id]),k.useEffect(()=>{if(!p)return;const z=p.reply?.wireId;n.some(O=>O.kind!=="file"&&O.dir==="out"&&!!O.wireId&&!p.wireIds.has(O.wireId)&&O.text===p.text&&(O.replyTo?.wireId??void 0)===z)&&(y(null),m(null),s(O=>O===p.draft?"":O),S(O=>O===p.reply?null:O))},[n,p]);const dt=!!c?.wireId&&n.some(z=>z.wireId===c.wireId),He=k.useMemo(()=>c&&!dt?[...n,c.message]:n,[n,c,dt]);k.useEffect(()=>{dt&&d(null)},[dt]),k.useLayoutEffect(()=>{const z=X.current;if(!z)return;z.style.height="0px";const re=Math.max(44,Math.min(z.scrollHeight,132));z.style.height=`${re}px`,z.style.overflowY=z.scrollHeight>132?"auto":"hidden"},[i,t?.id]);const Dt=z=>{const re=P.current;if(!re)return;const O=Math.max(0,re.scrollHeight-re.clientHeight);if(Math.abs(re.scrollTop-O)<1){lt.current=null,_e.current=null;return}const te=z&&!Ld();lt.current=te?O:null,_e.current=te?re.scrollTop:null,te?re.scrollTo({top:O,behavior:"smooth"}):re.scrollTop=O},_t=()=>{me.current===null&&(me.current=requestAnimationFrame(()=>{me.current=null;const z=P.current;if(!z)return;const re=z.scrollHeight-z.clientHeight-z.scrollTop>48;M(re),re||he(0)}))};k.useLayoutEffect(()=>{if(!t){Ee.current=null,ve.current=!0,tn.current=0;return}const z=P.current;if(!z)return;const re=Ee.current!==t.id,O=tn.current,te=He.length!==O,de=He.at(-1),je=de?de.wireId||`${de.date}:${de.text}`:null,Pe=Rt.current;if(tn.current=He.length,Rt.current=je,!re&&!te&<.current===null&&(ve.current=z.scrollHeight-z.clientHeight-z.scrollTop<=48),re||ve.current)Dt(te&&!re&&Ee.current!==null),ve.current=!0;else if(te&&He.length>O&&je!==Pe){const pe=Pe===null?-1:He.findIndex(Oe=>(Oe.wireId||`${Oe.date}:${Oe.text}`)===Pe);he(Oe=>Oe+Math.max(1,He.length-Math.max(0,pe+1)))}Ee.current=t.id,_t()},[t,He.length]),k.useLayoutEffect(()=>{if(L.current||!e.unreadOpen||window.location.hash.startsWith("#chat-message-"))return;const z=P.current,re=document.getElementById(`unread-${Mf(e.unreadOpen.wireId)}`);!z||!re||(z.scrollTop=Math.max(0,re.offsetTop-16),ve.current=!1,L.current=!0,_t())},[e.unreadOpen,He.length]),k.useLayoutEffect(()=>{const z=window.location.hash;if(!z.startsWith("#chat-message-"))return;const re=document.getElementById(z.slice(1));re&&(re.scrollIntoView({block:"center"}),ve.current=!1)},[t?.id,He.length]),k.useLayoutEffect(()=>{const z=Be.current,re=P.current;if(z===null||!re)return;const O=requestAnimationFrame(()=>{Be.current===z&&(re.scrollTop=z.top+re.scrollHeight-z.height,Be.current=null)});return()=>cancelAnimationFrame(O)},[He.length]),k.useEffect(()=>{const z=P.current;if(!z||typeof ResizeObserver>"u")return;const re=z.firstElementChild;if(!re)return;const O=new ResizeObserver(()=>{ve.current&&Dt(lt.current!==null),_t()});return O.observe(re),O.observe(z),()=>{O.disconnect(),me.current!==null&&cancelAnimationFrame(me.current)}},[t?.id]);const Un=async z=>{const re=++Re.current;m(null),W(!0);try{if(z.size>ss&&Uk(z.type,z.name)){const te=await UF(z,ss);if(re!==Re.current)return;I({filename:te.filename,mime:te.mime,bytes:te.bytes,originalSize:te.originalSize});return}if(z.size>ss){m(`"${z.name}" is ${$r(z.size)} — files up to ${$r(ss)} can be sent.`);return}const O=await z.arrayBuffer();if(re!==Re.current)return;I({filename:z.name||"file",mime:z.type||"application/octet-stream",bytes:new Uint8Array(O)})}catch(O){re===Re.current&&m(`Photo optimization failed: ${O instanceof Error?O.message:String(O)}`)}finally{re===Re.current&&W(!1)}},rr=()=>{!B||!e.onSendFile||K||(j(!0),e.onSendFile(B,w?.wireId).then(()=>{I(null),S(null)}).catch(z=>m(`File send failed: ${String(z)} — it was not delivered.`)).finally(()=>j(!1)))},dn=e.onDraftChange;k.useEffect(()=>(dn?.(i.trim().length>0||l),()=>dn?.(!1)),[i,l,dn]);const Q=new Map;for(const z of He)z.wireId&&Q.set(z.wireId,z);const le=k.useMemo(()=>{const z=new Map;for(const re of He)z.set(re,re.kind==="file"?null:re.dir==="in"?d2(t?.announcedName??"",re.text):null);return z},[He,t?.announcedName]),fe=z=>le.get(z)??null,Le=z=>{if(z.dir==="out")return"You";const re=fe(z);return re&&re.variant==="chat"?re.author:t?.name??"Them"},Fe=z=>{if(z.kind==="file")return z.mime?.startsWith("image/")?"Photo":io(z.mime??"",z.filename??"")?"Voice message":z.filename||"File";const re=fe(z);return re?re.text||x2(re):z.text},gt=z=>{if(!z.replyTo)return null;const re=Q.get(z.replyTo.wireId);return re?{author:Le(re),text:Fe(re)}:{author:"",text:"Original message"}};if(!t)return e.emptyOverride?v.jsx(v.Fragment,{children:e.emptyOverride}):v.jsx("div",{className:"detail",children:v.jsxs("div",{className:"detail-empty",children:[v.jsx(Se,{name:"chat"}),v.jsxs("div",{children:[v.jsx("div",{style:{fontWeight:650,color:"var(--text-2)"},children:"Select a conversation"}),v.jsx("div",{style:{fontSize:"0.85rem"},children:"Chat with people, agents and apps across ours."})]})]})});const Lt=async()=>{const z=i,re=z.trim(),O=!!p&&z===p.draft&&(w?.wireId??void 0)===p.reply?.wireId;if(!re||ce.current||O)return;p&&y(null),ce.current=!0,a(!0),m(null);const te=w,de=te?.wireId,je=new AbortController;let Pe=!1,pe=0;s(""),S(null);const Oe=`optimistic-${++qe.current}`;d({key:Oe,wireId:null,message:{dir:"out",text:re,date:new Date().toISOString(),read:!0,wireId:"",replyTo:de?{wireId:de}:null}});try{const xt=await Promise.race([e.onSend(re,de,je.signal),new Promise((Ye,wt)=>{pe=window.setTimeout(()=>{Pe=!0,je.abort(),wt(new Error("send timeout"))},oz)})]);xt?(ft.current.set(xt,Oe),d(Ye=>Ye?.key===Oe?{...Ye,wireId:xt}:Ye)):d(Ye=>Ye?.key===Oe?null:Ye),y(null)}catch(xt){d(null),s(Ye=>Ye===""?z:Ye),S(Ye=>Ye===null?te:Ye),Pe||!(xt instanceof nd)?(y({draft:z,text:re,reply:te,wireIds:new Set(n.flatMap(Ye=>Ye.wireId?[Ye.wireId]:[]))}),m(`${Pe?"Send timed out":"Send connection was interrupted"} — delivery status is unknown. Check the conversation; edit the draft before sending again.`)):m(`Send failed: ${String(xt)} — the message was not delivered.`)}finally{window.clearTimeout(pe),ce.current=!1,a(!1)}},nt=!!p&&i===p.draft&&(w?.wireId??void 0)===p.reply?.wireId,nn=z=>{z.wireId&&S({wireId:z.wireId,author:Le(z),text:Fe(z)})};return v.jsxs("div",{className:"detail detail-chat",children:[v.jsxs("div",{className:"detail-head",children:[v.jsxs("div",{className:"conv-peer",children:[v.jsx("button",{className:"icon-btn detail-back",onClick:e.onBack,children:v.jsx(Se,{name:"back"})}),v.jsx("div",{className:"avatar accent",children:t.initials}),v.jsxs("div",{className:"conv-peer-meta",children:[E!==null?v.jsx("input",{className:"field name-edit",value:E,autoFocus:!0,placeholder:t.name,onChange:z=>T(z.target.value),onKeyDown:z=>{z.key==="Enter"?(e.onRename?.(E),T(null)):z.key==="Escape"&&T(null)},onBlur:()=>T(null)}):v.jsxs("div",{className:"conv-peer-name",children:[t.name,e.onRename&&v.jsx("button",{className:"icon-btn name-pencil",title:"Rename (only changes how they appear to you)",onClick:()=>T(t.name),children:v.jsx(Se,{name:"edit",size:13})})]}),e.syncing&&v.jsxs("div",{className:"conv-sync",role:"status","aria-live":"polite",children:[v.jsx("span",{className:"conv-sync-dot","aria-hidden":!0}),e.syncing==="connecting"?"Connecting…":"Updating…"]}),!e.syncing&&(t.roleId?v.jsxs("button",{ref:A,className:"idchip","aria-haspopup":"dialog","aria-expanded":C,"aria-controls":"identity-details",onClick:()=>R(!0),children:[v.jsx(Se,{name:"shield",size:11}),"verified role of ",t.rootName]}):t.status!=="pending"&&v.jsxs("button",{ref:A,className:"idchip quiet","aria-haspopup":"dialog","aria-expanded":C,"aria-controls":"identity-details",onClick:()=>R(!0),children:[v.jsx(Se,{name:"lock",size:11}),"verified identity"]}))]})]}),C&&(Xe?v.jsxs(mo,{title:"Verified identity",onClose:()=>mt(!0),className:"identity-details-modal",contentId:"identity-details",children:[t.roleId&&v.jsxs("p",{children:["This is the role ",v.jsxs("strong",{children:["“",t.roleId,"”"]})," of ",v.jsx("strong",{children:t.rootName})," — the link is cryptographically signed, not self-declared."]}),v.jsx("div",{className:"idcard-fp mono",children:t.id}),v.jsx("p",{className:"idcard-note",children:"This id is the fingerprint of their key. Names are what people show you; the fingerprint is what guarantees you're always talking to the same identity — no one can impersonate it. Renaming only changes how they appear to you."})]}):v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"pop-backdrop","aria-hidden":"true",onClick:()=>mt(!0)}),v.jsxs("div",{id:"identity-details",ref:D,className:"idcard anim-scale",role:"dialog","aria-modal":"false","aria-labelledby":"identity-details-title",children:[v.jsxs("div",{className:"idcard-head",children:[v.jsx("h4",{id:"identity-details-title",children:"Verified identity"}),v.jsx("button",{className:"icon-btn idcard-close","aria-label":"Close verified identity",onClick:()=>mt(!0),children:v.jsx(Se,{name:"close",size:16})})]}),t.roleId&&v.jsxs("p",{children:["This is the role ",v.jsxs("strong",{children:["“",t.roleId,"”"]})," of ",v.jsx("strong",{children:t.rootName})," — the link is cryptographically signed, not self-declared."]}),v.jsx("div",{className:"idcard-fp mono",children:t.id}),v.jsx("p",{className:"idcard-note",children:"This id is the fingerprint of their key. Names are what people show you; the fingerprint is what guarantees you're always talking to the same identity — no one can impersonate it. Renaming only changes how they appear to you."})]})]})),v.jsxs("div",{className:"conv-actions",children:[v.jsxs("button",{className:"btn sm",title:"Shared photos, files, and links",onClick:()=>ge(!0),children:[v.jsx(Se,{name:"paperclip",size:14}),"Media"]}),v.jsxs("button",{className:"btn sm danger",title:"Remove contact",onClick:e.onRemove,children:[v.jsx(Se,{name:"trash",size:14}),"Remove"]})]})]}),v.jsx("div",{className:"messages",ref:P,tabIndex:-1,"aria-label":"Conversation timeline",onScroll:z=>{const re=z.currentTarget,O=re.scrollHeight-re.clientHeight-re.scrollTop;if(lt.current!==null){const te=_e.current;if(te===null||re.scrollTop>=te-1){_e.current=re.scrollTop,O<=4&&(lt.current=null,_e.current=null);return}lt.current=null,_e.current=null}ve.current=O<=48,_t()},onPointerDown:()=>{lt.current=null,_e.current=null},onTouchStart:()=>{lt.current=null,_e.current=null},onWheel:()=>{lt.current=null,_e.current=null},onDragOver:z=>{e.onSendFile&&z.preventDefault()},onDrop:z=>{if(!e.onSendFile)return;z.preventDefault();const re=z.dataTransfer.files?.[0];re&&Un(re)},children:v.jsxs("div",{className:"messages-inner",children:[v.jsxs("div",{className:"e2e-note",children:[v.jsx(Se,{name:"lock"}),"End-to-end encrypted · the broker only sees ciphertext"]}),(e.hiddenEarlier??0)>0&&e.onLoadEarlier&&v.jsxs("button",{className:"btn sm chat-load-earlier",onClick:()=>{ve.current=!1;const z=P.current;Be.current=z?{height:z.scrollHeight,top:z.scrollTop}:null,e.onLoadEarlier?.()},children:["Load earlier messages (",e.hiddenEarlier," remaining)"]}),v.jsx(HP,{initial:!1,children:He.map((z,re)=>{const O=z===c?.message?c.key:z.wireId&&ft.current.get(z.wireId)||z.wireId||`${z.date}-${(e.hiddenEarlier??0)+re}`,te=Mf(z.wireId||O),de=He[re-1],je=He[re+1],Pe=fe(z),pe=Bt=>{if(!Bt)return null;const Ct=fe(Bt);return Ct?Ct.variant==="system"?"room:system":`room:chat:${Ct.author}${Ct.role}`:Bt.dir},Oe=pe(z),xt=!!de&&pe(de)===Oe&&Oe!=="room:system",Ye=!!je&&pe(je)===Oe&&Oe!=="room:system",wt=(z.dir==="out"?"out":"in")+(xt?" cont-top":"")+(Ye?" cont-bot":""),At=z.wireId?v.jsx("button",{className:"msg-reply",title:"Reply",onClick:()=>nn(z),children:v.jsx(Se,{name:"reply",size:15})}):null;if(Pe&&Pe.variant==="system"){const Bt=Pe.presentation??"system";return v.jsxs(fs.div,{className:"message-motion",id:te,initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0},transition:kl,children:[z.wireId===e.unreadOpen?.wireId&&v.jsx("div",{id:`unread-${te}`,className:"unread-divider",role:"separator",children:v.jsx("span",{children:"Unread messages"})}),v.jsxs("div",{className:`room-system room-${Bt}-card`,role:"note",children:[Pe.label&&v.jsx("span",{className:"room-system-label",children:Pe.label}),Pe.roomName&&v.jsx("strong",{className:"room-card-name",children:Pe.roomName}),v.jsx(wx,{text:Pe.text,className:"room-system-text message-markdown"}),!!Pe.details?.length&&v.jsx("ul",{className:"room-card-details","aria-label":"Room event details",children:Pe.details.map(Ct=>v.jsx("li",{children:Ct},Ct))}),v.jsxs("span",{className:"room-card-provenance",children:[Pe.authoredBy&&v.jsx("span",{className:"room-card-author",children:Pe.authoredBy}),v.jsx("span",{className:"room-system-at",children:bs(Pe.authoredAt||z.date)})]})]})]},O)}if(z.kind==="file"){const Bt=b0(z.wireId)??{id:z.wireId,dir:z.dir,filename:z.filename??"file",mime:z.mime??"application/octet-stream",size:0,date:z.date};return v.jsxs(fs.div,{className:"message-motion",id:te,initial:{opacity:0,y:12,scale:.985},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.98},transition:kl,children:[z.wireId===e.unreadOpen?.wireId&&v.jsx("div",{id:`unread-${te}`,className:"unread-divider",role:"separator",children:v.jsx("span",{children:"Unread messages"})}),v.jsx(bx,{dir:z.dir==="out"?"out":"in",rowClass:wt,canReply:!!z.wireId,onReply:()=>nn(z),after:At,children:v.jsx("div",{className:`ours-message ours-message-file ours-message--${z.dir}`,children:v.jsx(SD,{rec:Bt,receipt:z.receipt,receiptless:z.receiptless,onPreview:Z,onFetch:e.onFetchFile})})})]},O)}const rt=gt(z);return v.jsxs(fs.div,{className:"message-motion",id:te,initial:{opacity:0,y:12,scale:.985},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.98},transition:kl,children:[z.wireId===e.unreadOpen?.wireId&&v.jsx("div",{id:`unread-${te}`,className:"unread-divider",role:"separator",children:v.jsx("span",{children:"Unread messages"})}),v.jsx(bx,{dir:z.dir==="out"?"out":"in",rowClass:wt,canReply:!!z.wireId,onReply:()=>nn(z),after:At,children:v.jsxs("div",{className:`ours-message ours-message--${z.dir}`,children:[rt&&v.jsxs("div",{className:"quote",children:[rt.author&&v.jsx("span",{className:"quote-author",children:rt.author}),v.jsx("span",{className:"quote-text",children:rt.text})]}),Pe&&!xt&&v.jsxs(v.Fragment,{children:[Pe.roomName&&v.jsx("div",{className:"room-message-room",children:Pe.roomName}),v.jsxs("div",{className:"room-author",children:[v.jsx("span",{className:"room-author-name",children:Pe.author}),Pe.role&&v.jsx("span",{className:"room-author-role",children:Pe.role})]})]}),v.jsx(wx,{text:Pe?Pe.text:z.text}),v.jsxs("div",{className:"bubble-at",children:[bs(Pe?.authoredAt||z.date),z.dir==="out"&&v.jsx(C0,{receipt:z.receipt,receiptless:z.receiptless})]})]})})]},O)})}),v.jsx("div",{className:"thread-end","aria-hidden":!0})]})},t.id),G&&v.jsxs("button",{type:"button",className:"jump-latest btn sm","aria-label":J?`Jump to latest, ${J} new messages`:"Jump to latest",onClick:z=>{const re=z.currentTarget===document.activeElement;he(0),Dt(!0),re&&requestAnimationFrame(()=>P.current?.focus({preventScroll:!0}))},children:[v.jsx("span",{children:"Jump to latest"}),!!J&&v.jsx("span",{className:"jump-latest-count","aria-live":"polite",children:J})]}),h&&v.jsxs("div",{className:"banner error",role:"alert",children:[h,h.startsWith("Send failed:")&&v.jsx("span",{className:"banner-actions",children:v.jsx("button",{className:"linkbtn",onClick:()=>void Lt(),children:"retry"})})]}),v.jsxs("div",{className:"composer-wrap",children:[w&&v.jsxs("div",{className:"reply-bar",children:[v.jsx("div",{className:"reply-bar-line"}),v.jsxs("div",{className:"reply-bar-body",children:[v.jsxs("div",{className:"reply-bar-author",children:["Replying to ",w.author]}),v.jsx("div",{className:"reply-bar-text",children:w.text})]}),v.jsx("button",{className:"icon-btn",title:"Cancel reply",onClick:()=>S(null),children:v.jsx(Se,{name:"close",size:16})})]}),B&&v.jsx(k1,{att:B,sending:K,onSend:rr,onDiscard:()=>I(null)}),Y&&v.jsx("div",{className:"attachment-processing",role:"status",children:"Optimizing photo for secure delivery…"}),v.jsxs("div",{className:"composer"+(q?" recording":""),children:[e.onSendFile&&v.jsxs(v.Fragment,{children:[v.jsx("input",{ref:Ce,type:"file",style:{display:"none"},onChange:z=>{const re=z.target.files?.[0];re&&Un(re),z.target.value=""}}),v.jsx("button",{className:"icon-btn composer-tool",title:"Attach a file or photo",disabled:K||Y||q,onClick:()=>Ce.current?.click(),children:v.jsx(Se,{name:"paperclip",size:18})}),v.jsx(S1,{disabled:K||Y||!!B,onReady:z=>{$(!1),I(z)},onError:z=>{$(!1),m(z)},onActiveChange:$},t.id)]}),v.jsx("textarea",{ref:X,className:"field",rows:1,placeholder:(w?"Reply to "+w.author:"Message "+t.name)+"…",value:i,"aria-busy":l,onChange:z=>s(z.target.value),onKeyDown:z=>{z.key==="Enter"?!(window.matchMedia("(pointer: coarse)").matches||window.innerWidth<=860)&&!z.shiftKey&&(z.preventDefault(),Lt()):z.key==="Escape"&&S(null)}}),v.jsxs("button",{className:"btn primary","aria-label":"Send",onPointerDown:z=>{z.button===0&&document.activeElement===X.current&&z.preventDefault()},onClick:()=>void Lt(),disabled:l||nt||!i.trim(),title:nt?"Delivery status unknown — edit before sending again":void 0,children:[v.jsx(Se,{name:"send",size:16}),v.jsx("span",{className:"btn-label",children:"Send"})]})]})]}),ue&&(Zl(ue.filename,ue.mime)?v.jsx(AF,{rec:ue,onClose:()=>Z(null)}):v.jsx(RF,{rec:ue,onClose:()=>Z(null),onSendText:e.onSend,onSendFile:e.onSendFile})),ee&&v.jsx(NF,{messages:n,indexOffset:e.hiddenEarlier??0,onClose:()=>ge(!1),onPreview:z=>{ge(!1),Z(z)},onJump:z=>{document.getElementById(Mf(z))?.scrollIntoView({behavior:Ld()?"auto":"smooth",block:"center"}),ge(!1)}})]})}const Xk=3;function lz(e,t,n=Xk){return[t,...e.filter(i=>i.cid!==t.cid)].slice(0,n)}function uz(e,t){return e.filter(n=>n.id!==t)}const cz=6e3,fz=lz,dz=uz;function hz(){const[e,t]=k.useState([]),n=k.useRef(0),i=k.useCallback((a,c,d)=>{const h=Date.now(),m={id:`${a}:${h}:${n.current++}`,cid:a,name:c,preview:"",at:h};t(p=>fz(p,m,Xk))},[]),s=k.useCallback(a=>t(c=>dz(c,a)),[]),l=k.useCallback(a=>t(c=>c.filter(d=>d.cid!==a)),[]);return{toasts:e,push:i,dismiss:s,clear:l}}function pz(e){const{item:t,onOpen:n,onDismiss:i}=e,[s,l]=k.useState(!1),[a,c]=k.useState(!1),d=s||a;return k.useEffect(()=>{if(d)return;const h=setTimeout(()=>i(t.id),cz);return()=>clearTimeout(h)},[t.id,d,i]),v.jsxs("div",{className:"banner msg",role:"status",onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),onFocus:()=>c(!0),onBlur:h=>{h.currentTarget.contains(h.relatedTarget)||c(!1)},children:[v.jsxs("button",{className:"msg-open",title:`Open the conversation with ${t.name}`,onClick:()=>n(t.cid),children:[v.jsx("span",{className:"avatar sm accent","aria-hidden":"true",children:Ss(t.name)}),v.jsxs("span",{className:"msg-text",children:[v.jsx("strong",{className:"msg-name",children:t.name}),v.jsx("span",{className:"msg-preview",children:t.preview||"New message"})]})]}),v.jsx("button",{className:"icon-btn msg-close",title:"Dismiss","aria-label":`Dismiss the notification from ${t.name}`,onClick:()=>i(t.id),children:v.jsx(Se,{name:"close",size:15})})]})}function mz(e){return v.jsx(v.Fragment,{children:e.items.map(t=>v.jsx(pz,{item:t,onOpen:e.onOpen,onDismiss:e.onDismiss},t.id))})}function gz(e){const t=k.useRef(null),{text:n,size:i=240}=e;return k.useEffect(()=>{if(!t.current||!n)return;const s=t.current;Mh(()=>import("./browser-vohWR48c.js").then(l=>l.b),[]).then(l=>{l.toCanvas(s,n,{width:i,margin:2,errorCorrectionLevel:"M",color:{dark:"#000000",light:"#ffffff"}})})},[n,i]),v.jsx("div",{style:{display:"flex",justifyContent:"center",margin:"8px 0"},children:v.jsx("canvas",{ref:t,"data-testid":"qr-canvas","data-invite":n,width:i,height:i,style:{borderRadius:8,border:"1px solid var(--line)",imageRendering:"pixelated"}})})}function yz(e){const t=k.useRef(null),n=k.useRef(null),i=k.useRef(null),s=k.useRef(0),l=k.useRef(!0),[a,c]=k.useState("requesting"),[d,h]=k.useState(""),m=k.useCallback(()=>{s.current&&cancelAnimationFrame(s.current),i.current&&(i.current.getTracks().forEach(w=>w.stop()),i.current=null),t.current&&(t.current.srcObject=null)},[]),p=k.useCallback(w=>{i.current=w;const S=t.current;S.srcObject=w,S.setAttribute("playsinline","true"),S.play();const E=n.current,T=E.getContext("2d"),C=()=>{if(l.current)if(S.readyState>=S.HAVE_ENOUGH_DATA){const R=S.videoWidth||320,A=S.videoHeight||240;E.width=R,E.height=A,T.drawImage(S,0,0,R,A);const D=T.getImageData(0,0,R,A);Mh(()=>import("./jsQR-DCYnED3H.js").then(B=>B.j),[]).then(B=>{const I=B.default,q=I(D.data,D.width,D.height,{inversionAttempts:"dontInvert"});if(q&&q.data&&l.current){m(),e.onDecode(q.data);return}l.current&&(s.current=requestAnimationFrame(C))})}else s.current=requestAnimationFrame(C)};s.current=requestAnimationFrame(C)},[m,e]);k.useEffect(()=>{if(l.current=!0,!navigator.mediaDevices?.getUserMedia){c("nocamera");return}return navigator.mediaDevices.getUserMedia({video:{facingMode:"environment"}}).then(w=>{if(!l.current){w.getTracks().forEach(S=>S.stop());return}c("scanning"),p(w)}).catch(w=>{if(!l.current)return;const S=w.name??"";S==="NotAllowedError"||S==="PermissionDeniedError"?c("denied"):S==="NotFoundError"||S==="DevicesNotFoundError"?c("nocamera"):(c("error"),h(w.message??String(w)))}),()=>{l.current=!1,m()}},[]);const y=()=>{m(),e.onClose()};return v.jsxs("div",{"data-testid":"qr-scanner",style:{display:"flex",flexDirection:"column",gap:12,padding:"12px 0"},children:[(a==="requesting"||a==="scanning")&&v.jsxs(v.Fragment,{children:[v.jsx("p",{className:"muted",style:{margin:0,fontSize:"0.88rem"},children:a==="requesting"?"Requesting camera…":"Point your camera at the QR code."}),v.jsxs("div",{style:{position:"relative",borderRadius:8,overflow:"hidden",background:"#000",minHeight:200},children:[v.jsx("canvas",{ref:n,"data-testid":"scanner-canvas",style:{display:"none"}}),v.jsx("video",{ref:t,"data-testid":"scanner-video",muted:!0,playsInline:!0,style:{width:"100%",display:"block",borderRadius:8}}),a==="scanning"&&v.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx("div",{style:{width:160,height:160,borderRadius:12,border:"2px solid var(--accent)",boxShadow:"0 0 0 9999px rgba(0,0,0,0.4)"}})})]})]}),a==="denied"&&v.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,color:"var(--text-2)"},children:[v.jsx(Se,{name:"shield",size:16}),v.jsx("span",{style:{fontWeight:600,fontSize:"0.9rem"},children:"Camera access denied"})]}),v.jsx("p",{className:"muted",style:{margin:0,fontSize:"0.88rem"},children:"Camera permission was denied. To scan QR codes, allow camera access in your browser settings, then try again. Or paste the invite text below instead."})]}),a==="nocamera"&&v.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,color:"var(--text-2)"},children:[v.jsx(Se,{name:"close",size:16}),v.jsx("span",{style:{fontWeight:600,fontSize:"0.9rem"},children:"No camera available"})]}),v.jsx("p",{className:"muted",style:{margin:0,fontSize:"0.88rem"},children:"No camera was found on this device. Paste the invite text below instead."})]}),a==="error"&&v.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:v.jsxs("p",{style:{margin:0,fontSize:"0.85rem",color:"var(--danger, #e53)"},children:["Camera error: ",d||"unknown error",". Paste the invite text below instead."]})}),v.jsx("button",{className:"btn",style:{justifyContent:"center"},onClick:y,children:a==="scanning"?v.jsxs(v.Fragment,{children:[v.jsx(Se,{name:"close",size:14}),"Cancel scan"]}):v.jsxs(v.Fragment,{children:[v.jsx(Se,{name:"close",size:14}),"Close scanner"]})})]})}function vz(e){const[t,n]=k.useState("generate"),[i,s]=k.useState("one_time"),[l,a]=k.useState(""),[c,d]=k.useState(null),[h,m]=k.useState("one_time"),[p,y]=k.useState(""),[w,S]=k.useState(""),[E,T]=k.useState(!1),[C,R]=k.useState(null),[A,D]=k.useState(null),[B,I]=k.useState(!1),[q,$]=k.useState(null),K=k.useRef(!1),j=async()=>{if(!K.current){K.current=!0,T(!0),D(null),R(null);try{m(i),d(await e.onCreate(i,i==="one_time"&&l.trim()||void 0))}catch(W){D(W instanceof Error?W.message:String(W))}finally{K.current=!1,T(!1)}}},Y=v.jsx($k,{className:"modal-tabs",label:"Invite mode",options:[{id:"generate",label:"Generate invite"},{id:"accept",label:"Accept invite"}],value:t,onChange:n,idPrefix:"invite-tab",panelId:"invite-panel"});return v.jsx(mo,{title:t==="generate"?"Invite a contact":"Accept an invite",onClose:()=>{K.current||e.onClose()},tabs:Y,children:v.jsxs("div",{id:"invite-panel",role:"tabpanel","aria-labelledby":`invite-tab-${t}`,children:[t==="generate"&&!c&&v.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:13},children:[v.jsxs("p",{className:"muted","data-testid":"invite-identity",style:{margin:0,fontSize:"0.85rem"},children:["Creating as ",v.jsx("strong",{children:e.identity.name})," · ",v.jsxs("span",{className:"mono",children:["@",yh(e.identity.cid)]})]}),v.jsxs("div",{role:"radiogroup","aria-label":"Invite kind",style:{display:"flex",flexDirection:"column",gap:7},children:[v.jsxs("label",{children:[v.jsx("input",{type:"radio",name:"invite-kind",checked:i==="one_time",onChange:()=>s("one_time")})," One person (one time)"]}),v.jsxs("label",{children:[v.jsx("input",{type:"radio",name:"invite-kind",checked:i==="public",onChange:()=>s("public")})," Reusable public invite"]})]}),i==="one_time"?v.jsxs(v.Fragment,{children:[v.jsx("p",{className:"muted",style:{margin:0,fontSize:"0.9rem"},children:"Optionally name the person or agent this invite is for."}),v.jsx("input",{className:"field",value:l,onChange:W=>a(W.target.value),placeholder:"Their name (optional), e.g. Bob",maxLength:64})]}):v.jsx("p",{className:"onb-warning","data-testid":"public-invite-warning",style:{margin:0,fontSize:"0.9rem"},children:"Anyone with this invite can connect until you revoke it. It has no expiry and stays valid across server restarts."}),v.jsx("button",{className:"btn primary",style:{justifyContent:"center"},disabled:E,onClick:()=>void j(),children:E?"Generating…":i==="public"?"Create public invite":"Generate invite"}),i==="public"&&v.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[v.jsx("h4",{style:{margin:0,fontSize:"0.9rem"},children:"Active reusable invites"}),e.invites.filter(W=>W.mode==="public").length===0&&v.jsx("p",{className:"muted",style:{margin:0},children:"None right now."}),e.invites.filter(W=>W.mode==="public").map(W=>v.jsxs("div",{"data-testid":"public-invite-row",style:{padding:"8px 10px",background:"var(--inset)",borderRadius:7},children:[v.jsx("span",{className:"mono",children:W.invite_id}),v.jsxs("p",{className:"muted",children:["Created ",W.created?b2(W.created):"unknown"," · Active until revoked · No expiry"]}),q===W.invite_id?v.jsxs("span",{children:[v.jsx("button",{className:"btn sm danger",onClick:()=>void e.onRevoke(W.invite_id).then(()=>($(null),e.onRefresh())).catch(ue=>D(String(ue))),children:"Confirm revoke"})," ",v.jsx("button",{className:"btn sm",onClick:()=>$(null),children:"Keep it"})]}):v.jsx("button",{className:"btn sm",onClick:()=>$(W.invite_id),children:"Revoke"})]},W.invite_id))]}),C&&v.jsx("p",{className:"muted",children:C}),A&&v.jsx("p",{className:"onb-error",children:A})]}),t==="generate"&&c&&v.jsxs(v.Fragment,{children:[v.jsx("p",{className:"muted","data-testid":h==="public"?"public-result-note":void 0,children:h==="public"?"Shown only on this screen. Copy it now; the text cannot be recovered later. The invite stays active until revoked.":`Send this invite to ${l.trim()||"your contact"}. It can be redeemed once.`}),v.jsx("textarea",{className:"field mono","data-testid":"invite-result-text",readOnly:!0,rows:5,value:c,onFocus:W=>W.currentTarget.select()}),h==="one_time"&&v.jsx(gz,{text:c}),v.jsxs("button",{className:"btn primary",onClick:()=>void navigator.clipboard.writeText(c).then(()=>R("Copied to clipboard.")),children:[v.jsx(Se,{name:"copy",size:15}),"Copy invite"]}),h==="public"&&v.jsx("button",{className:"btn","data-testid":"done-hide-invite",onClick:()=>{d(null),a(""),e.onRefresh()},children:"Done — hide invite"}),C&&v.jsx("p",{className:"muted",children:C})]}),t==="accept"&&v.jsxs("form",{style:{display:"flex",flexDirection:"column",gap:13},onSubmit:W=>{W.preventDefault(),!(!p.trim()||E)&&(T(!0),D(null),e.onAccept(p.trim(),w.trim()||void 0).then(()=>{R("Invite accepted — the contact will appear once the sender verifies your identity."),y(""),S("")}).catch(ue=>D(String(ue))).finally(()=>T(!1)))},children:[v.jsx("p",{className:"muted",children:"Paste the invite you received, or scan a QR code."}),B?v.jsx(yz,{onDecode:W=>{y(W),I(!1)},onClose:()=>I(!1)}):v.jsxs("button",{type:"button",className:"btn",onClick:()=>I(!0),children:[v.jsx(Se,{name:"monitor",size:15}),"Scan QR code"]}),v.jsx("textarea",{className:"field mono","aria-label":"Invite",rows:5,value:p,onChange:W=>y(W.target.value),placeholder:"Paste invite text…"}),v.jsx("input",{className:"field",value:w,onChange:W=>S(W.target.value),placeholder:"Rename them (optional)",maxLength:64}),v.jsx("button",{className:"btn primary",type:"submit",disabled:E||!p.trim(),children:E?"Connecting…":"Add contact"}),C&&v.jsx("p",{className:"muted",children:C}),A&&v.jsx("p",{className:"onb-error",children:A})]})]})})}function xz(e){const[t,n]=k.useState(e.identity.bio??""),[i,s]=k.useState(!1),[l,a]=k.useState(null),[c,d]=k.useState(e.push.preview),h=mA(),m=!e.workerSupported||e.push.status==="unsupported"?h??"Unavailable — requires a secure browser with service-worker support.":e.push.status==="needs-permission"?h??"Needs permission — allow notifications, then choose Enable or Repair.":e.push.status==="on"?"On — this browser and the server agree on the current Web Push configuration.":e.push.status==="repairing"?"Repairing — checking the browser subscription and server acknowledgement…":e.push.status==="error"?"Repair needed — the browser and server could not confirm the same subscription.":"Off — enable notifications for this browser.";return v.jsxs(mo,{title:"Settings",onClose:e.onClose,wide:!0,children:[v.jsxs("div",{children:[v.jsx("span",{className:"lbl",children:"Display name"}),v.jsx("input",{className:"field",readOnly:!0,value:e.identity.name})]}),v.jsxs("div",{children:[v.jsx("span",{className:"lbl",children:"Your address"}),v.jsx("input",{className:"field mono",readOnly:!0,value:e.identity.cid,onFocus:p=>p.currentTarget.select()}),v.jsx("p",{className:"muted",children:"Your public address on ours. Share an invite to connect more easily."})]}),v.jsxs("div",{children:[v.jsx("span",{className:"lbl",children:"Public bio"}),v.jsx("textarea",{className:"field",rows:3,value:t,onChange:p=>{n(p.target.value),s(!1),a(null)}}),v.jsx("button",{className:"btn sm",onClick:()=>{a(null),e.onSaveBio(t).then(()=>s(!0)).catch(p=>a(String(p)))},children:i?"Saved":"Save bio"}),l&&v.jsx("p",{className:"onb-error",children:l})]}),v.jsxs("label",{style:{display:"flex",gap:9},children:[v.jsx("input",{type:"checkbox",checked:e.dark,onChange:e.onToggleDark})," Dark mode"]}),v.jsxs("div",{style:{borderTop:"1px solid var(--line)",paddingTop:16},children:[v.jsx("h4",{children:"Notifications"}),v.jsx("p",{className:e.push.status==="needs-permission"||e.push.status==="error"?"onb-error":"muted",children:m}),h&&h!==m&&v.jsx("p",{className:"muted","data-testid":"push-platform-guidance",children:h}),v.jsxs("fieldset",{style:{border:0,padding:0,margin:"12px 0"},children:[v.jsx("legend",{className:"lbl",children:"Lock-screen preview"}),v.jsxs("label",{style:{display:"block",marginTop:7},children:[v.jsx("input",{type:"radio",name:"push-preview",checked:c==="full",onChange:()=>d("full")})," Full — sender and message text or filename"]}),v.jsxs("label",{style:{display:"block",marginTop:7},children:[v.jsx("input",{type:"radio",name:"push-preview",checked:c==="private",onChange:()=>d("private")})," Private — generic content only"]})]}),v.jsx("p",{className:"muted",children:"Full previews can expose sender names, message text, and filenames on the lock screen. The push provider still sees delivery endpoint, timing, and payload size metadata in either mode."}),v.jsx("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:e.push.status==="on"?v.jsxs(v.Fragment,{children:[v.jsx("button",{className:"btn",disabled:e.busy,onClick:()=>void e.onPushAction("disable",c),children:"Disable notifications"}),v.jsx("button",{className:"btn",disabled:e.busy,onClick:()=>void e.onPushAction("repair",c),children:"Repair"}),c!==e.push.preview&&v.jsx("button",{className:"btn primary",disabled:e.busy,onClick:()=>void e.onPushAction("enable",c),children:"Save preview"})]}):v.jsx("button",{className:"btn primary",disabled:e.busy||!e.workerSupported||e.push.status==="unsupported",onClick:()=>void e.onPushAction(e.push.status==="error"||e.push.blocked?"repair":"enable",c),children:e.busy?"Repairing…":e.push.status==="error"||e.push.blocked?"Repair":"Enable notifications"})})]}),v.jsxs("div",{style:{borderTop:"1px solid var(--line)",paddingTop:16},children:[v.jsx("h4",{children:"App status"}),v.jsx("p",{className:"muted",children:e.offline?"Offline — reconnecting. Message and identity data are never cached.":"Online."}),e.updateAvailable&&v.jsx("button",{className:"btn primary",onClick:e.onReloadUpdate,children:"Reload to update"})]}),v.jsxs("div",{style:{borderTop:"1px solid var(--line)",paddingTop:16},children:[v.jsx("h4",{children:"Build"}),v.jsx("input",{className:"field mono",readOnly:!0,value:e.build?`${e.build.version} · ${e.build.sha}`:"Loading…"})]})]})}function wz(e,t,n,i,s=6e4){return!t||!t.sha?"current":t.sha===e?(n.remoteSha=null,n.firstMismatchAt=null,"current"):(n.remoteSha=t.sha,(n.firstMismatchAt===null||n.firstMismatchAt===void 0)&&(n.firstMismatchAt=i),n.controllerChanged?"newer-available":i-n.firstMismatchAt>=s?"stuck":"newer-available")}const kz="bfdaf62f987be43dd555ef9a8eaace0ef12e5845",Sz=15*6e4,bz=6e4,Cz=wz;async function Ez(){try{const e=await fetch("/version.json",{cache:"no-store"});return e.ok?await e.json():null}catch{return null}}function Tz(e){const t={remoteSha:null,firstMismatchAt:null,controllerChanged:!1},n=()=>{t.controllerChanged=!0};navigator.serviceWorker?.addEventListener("controllerchange",n);let i=!1;const s=async()=>{const d=await Ez(),h=Cz(kz,d,t,Date.now(),bz);h==="newer-available"?(e.onUpdateAvailable(),navigator.serviceWorker?.getRegistration().then(m=>m?.update())):h==="stuck"&&!i&&(i=!0,e.onStuck(d.sha))},l=setTimeout(()=>void s(),5e3),a=setInterval(()=>void s(),Sz),c=()=>{document.visibilityState==="visible"&&s()};return document.addEventListener("visibilitychange",c),()=>{clearTimeout(l),clearInterval(a),document.removeEventListener("visibilitychange",c),navigator.serviceWorker?.removeEventListener("controllerchange",n)}}async function Pz(e){try{const t=await navigator.serviceWorker.getRegistrations();await Promise.all(t.map(i=>i.unregister()));const n=await caches.keys();await Promise.all(n.map(i=>caches.delete(i)))}catch{}return location.replace(location.pathname+"?v="+encodeURIComponent(e)),new Promise(()=>{})}function Rz(){const e=new URL(location.href);e.searchParams.has("v")&&(e.searchParams.delete("v"),history.replaceState(null,"",e.pathname+e.search+e.hash))}const Cx=[0,100,400,1e3,3e3,6e3],Ex=e=>new Promise(t=>setTimeout(t,e)),Tx={delivered:1,read:2},Px="ours-dark-v3",Rx="#chat-message-",Ax=jl,Az=e=>e instanceof Error&&e.message?e.message:"The request could not be completed.";function Yk(e,t){const n=new Map,i=[];for(const s of e?.messages??[]){const l={dir:s.dir,text:s.text,date:s.date,read:s.read,wireId:s.wire_id,replyTo:s.reply_to?{wireId:s.reply_to.wire_id}:null,receipt:s.receipt??void 0,receiptless:s.dir==="out"&&!s.wire_id};s.wire_id?n.set(s.wire_id,l):i.push(l)}for(const s of t){const l=n.get(s.wire_id);n.set(s.wire_id,{dir:s.dir,text:"",date:s.date,read:l?.read??s.dir==="out",wireId:s.wire_id,replyTo:s.reply_to?{wireId:s.reply_to.wire_id}:l?.replyTo??null,kind:"file",filename:s.filename,mime:s.mime,receipt:l?.receipt})}return[...i,...n.values()].sort((s,l)=>{const a=Ax(s.date)-Ax(l.date);return a===0?s.wireId.localeCompare(l.wireId):a})}function Mz(e){const t={};for(const n of Object.values(e.roots??{}))t[n.root_cid]={label:n.root_name,note:"Verified identity"};return t}function Nz(e,t){return[...e.contacts.contacts.map(i=>{const s=e.contacts.roots?.[i.container_id],l=ci(e,i.container_id),c=Yk(l,t[i.container_id]??[]).at(-1),d=Dl(i);return{id:i.container_id,name:d,announcedName:i.name,initials:Ss(d),when:c?S2(c.date):"",activityAt:c?.date??"",last:c?.kind==="file"?N2(c.filename,c.mime):l?.preview??c?.text??"",unread:l?.unread??0,status:"active",root:s?.root_cid??null,sub:s?`role “${s.role_id}” of ${s.root_name}`:"",roleId:s?.role_id??null,rootName:s?.root_name??null,mine:!1,kind:s?"agent":"person"}}),...e.contacts.pending.map(i=>{const s=Dl(i);return{id:`pending:${i.container_id}`,name:s,announcedName:i.name,initials:Ss(s),when:"",activityAt:"",last:`${i.queued} queued · approval required`,unread:0,status:"pending",root:null,sub:"",roleId:null,rootName:null,mine:!1,kind:"person"}})]}function jz(){return v.jsx(Iz,{})}function Iz(){const e=k.useRef(uA(Jy(window.location.pathname))).current,[t,n]=k.useReducer(nv,e),[i,s]=k.useState(null),l=k.useRef(0),a=k.useRef(null),c=k.useRef(t),d=k.useRef(new aA),h=k.useRef(null),m=k.useRef(new Map),p=k.useRef(new Map),[y,w]=k.useState({}),S=k.useRef(y),[E,T]=k.useState(null),C=k.useRef(new Set),[R,A]=k.useState(null),D=k.useRef(R),B=k.useRef(!1),[I,q]=k.useState([]),[$,K]=k.useState(null),[j,Y]=k.useState(()=>localStorage.getItem(Px)!=="0"),[W,ue]=k.useState(null),[Z,ee]=k.useState({supported:!1,offline:!navigator.onLine,updateAvailable:!1,registration:null}),[ge,Ce]=k.useState({status:"unsupported",preview:"full"}),[X,ce]=k.useState(!1),[P,L]=k.useState(!1),G=k.useRef(null),M=k.useRef(null),[J,he]=k.useState(()=>window.location.hash.startsWith(Rx)),{toasts:me,push:ve,dismiss:Ee,clear:Re}=hz(),Be=k.useCallback((O=!1)=>{L(!1),O&&G.current?.focus()},[]);k.useEffect(()=>{P&&requestAnimationFrame(()=>M.current?.querySelector('[role="menuitem"]')?.focus())},[P]);const ft=O=>{const te=[...M.current?.querySelectorAll('[role="menuitem"]')??[]],de=te.indexOf(document.activeElement);if(O.key==="Escape"){O.preventDefault(),Be(!0);return}if(O.key==="Tab"){O.preventDefault();const Pe=O.shiftKey;L(!1),requestAnimationFrame(()=>{const pe=[...document.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]), textarea:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])')].filter(Ye=>Ye.offsetParent!==null&&!M.current?.contains(Ye)),Oe=G.current?pe.indexOf(G.current):-1;(Oe<0?G.current:pe[Oe+(Pe?-1:1)]??G.current)?.focus()});return}if(!["ArrowDown","ArrowUp","Home","End"].includes(O.key)||te.length===0)return;O.preventDefault();const je=O.key==="Home"?0:O.key==="End"?te.length-1:O.key==="ArrowUp"?(de-1+te.length)%te.length:(de+1)%te.length;te[je]?.focus()},qe=k.useCallback(O=>{c.current=nv(c.current,O),n(O)},[]),lt=k.useCallback(O=>{B.current=O},[]);k.useEffect(()=>{c.current=t},[t]),D.current=R,S.current=y,k.useMemo(()=>(hv(Object.values(y).flat()),null),[y]),k.useEffect(()=>(document.documentElement.classList.toggle("theme-dark",j),()=>document.documentElement.classList.remove("theme-dark")),[j]);const _e=k.useCallback(O=>qe({type:"error",message:Az(O)}),[qe]),tn=k.useCallback(()=>{const O=c.current;return{visibility:document.visibilityState,appRoute:O.route.name==="chats"?"chats":"other",selectedContactCid:si(O),desktopLayout:h.current?.matches??window.innerWidth>=861,mobileDetailOpen:O.mobileDetailOpen,conversationCoveringDialogOpen:D.current!==null}},[]),Rt=k.useCallback(async(O,te=!0)=>{try{const de=await Qe.conversation(O);return qe({type:"page",contactCid:O,page:de}),de}catch(de){return te&&_e(de),null}},[qe,_e]),Xe=k.useCallback(async(O,te=!0)=>{try{const de=await Qe.files(O);return hv(de.files),w(je=>({...je,[O]:de.files})),de.files}catch(de){return te&&_e(de),null}},[_e]);k.useEffect(()=>Tz({onUpdateAvailable:()=>ee(O=>({...O,updateAvailable:!0})),onStuck:O=>{Pz(O)}}),[]);const mt=k.useCallback(async()=>{const O=await Qe.contacts();return qe({type:"contacts",contacts:{...O,pending:O.pending??[]}}),O},[qe]),dt=k.useCallback(async()=>{try{const[O,te,de]=await Promise.all([Qe.identity(),Qe.contacts(),Qe.buildInfo()]),je={...te,pending:te.pending??[]};return c.current.identity&&c.current.identity.cid!==O.cid&&(R2(),S.current={},w({})),qe({type:"snapshot",identity:O,contacts:je}),K(de),await Promise.all(je.contacts.flatMap(Pe=>[Rt(Pe.container_id,!1),Xe(Pe.container_id,!1)])),si(c.current)}catch(O){return _e(O),null}},[qe,Xe,Rt,_e]),He=k.useCallback(async O=>{await d.current.request(O,async()=>{sA(O,tn())&&(await Qe.markRead(O),await Promise.all([Rt(O),mt()]))}).catch(_e)},[tn,mt,Rt,_e]),Dt=k.useCallback(async O=>{const te=++l.current;a.current?.abort();const de=new AbortController;a.current=de,s(null),Re(O),Xe(O,!1);let je;try{je=await Qe.conversation(O,void 0,de.signal)}catch(rt){de.signal.aborted||_e(rt);return}if(de.signal.aborted||te!==l.current)return;qe({type:"page",contactCid:O,page:je});const Pe=je.unread;let pe=[...je.messages],Oe=je.nextBefore;const xt=new Set,Ye=new Set(pe.map(rt=>rt.wire_id).filter(Boolean)),wt=()=>pe.filter(rt=>rt.dir==="in"&&!rt.read);for(;wt().length<Pe&&Oe&&!xt.has(Oe);){xt.add(Oe);let rt;try{rt=await Qe.conversation(O,Oe,de.signal)}catch{break}if(de.signal.aborted||te!==l.current)return;const Bt=rt.messages.filter(Ct=>!Ct.wire_id||!Ye.has(Ct.wire_id));if(!Bt.length&&rt.nextBefore===Oe)break;for(const Ct of Bt)Ct.wire_id&&Ye.add(Ct.wire_id);pe=[...Bt,...pe],qe({type:"older_page",contactCid:O,page:rt,newer:je.messages}),Oe=rt.nextBefore}const At=wt()[0];At?.wire_id&&te===l.current&&!de.signal.aborted&&s({contactCid:O,wireId:At.wire_id,count:Pe}),await He(O)},[Re,qe,He,Xe,_e]),_t=k.useCallback(async(O,te,de="page")=>{const je=`page:${O}:${de}`,Pe=(m.current.get(je)??0)+1;m.current.set(je,Pe);for(const pe of Cx){if(pe&&await Ex(pe),m.current.get(je)!==Pe)return;const Oe=await Rt(O,!1);if(Oe&&te(Oe))return}},[Rt]),Un=k.useCallback(async(O,te)=>{const de=`file:${O}`,je=(m.current.get(de)??0)+1;m.current.set(de,je);for(const Pe of Cx)if(Pe&&await Ex(Pe),m.current.get(de)!==je||(await Xe(O,!1))?.some(Oe=>Oe.wire_id===te))return},[Xe]),rr=k.useRef(!1);k.useEffect(()=>{if(!J||!t.loaded)return;const O=decodeURIComponent(window.location.hash.slice(Rx.length)),te=si(c.current);if(!O||!te){he(!1);return}if(ci(c.current,te)?.messages.some(de=>de.wire_id===O)){he(!1);return}rr.current||(rr.current=!0,_t(te,de=>de.messages.some(je=>je.wire_id===O),`anchor:${O}`).catch(()=>{}).finally(()=>he(!1)))},[J,_t,t.loaded,t.pages]),k.useMemo(()=>(P2({url:O=>Object.values(S.current).flat().find(de=>de.wire_id===O)?.available?Qe.mediaUrl(O):null,bytes:async O=>{if(!Object.values(S.current).flat().find(je=>je.wire_id===O)?.available)return null;const de=await fetch(Qe.mediaUrl(O),{cache:"no-store",credentials:"same-origin"});if(!de.ok)throw new Error(`Media request failed (HTTP ${de.status})`);return new Uint8Array(await de.arrayBuffer())},fetch:async O=>{const te=Object.values(S.current).flat().find(de=>de.wire_id===O);if(!te)throw new Error("Media record is unavailable");await Qe.fetchFiles([O]),await Xe(te.contact_id)}}),null),[Xe]),k.useEffect(()=>{let O;dA(de=>{ee(de),ov(de.registration).then(Ce).catch(()=>Ce(je=>({...je,status:"error"})))},{shouldDeferReload:()=>B.current||D.current!==null}).then(de=>{O=de}).catch(_e);const te=de=>{de.preventDefault(),ue(de)};return window.addEventListener("beforeinstallprompt",te),()=>{O?.(),window.removeEventListener("beforeinstallprompt",te)}},[_e]),k.useEffect(()=>wA(),[]),k.useEffect(()=>{if(!(!Z.registration||ge.status!=="on"))return oA({registration:Z.registration,identity:Qe.identity,onEvent:p0})},[ge.status,ge.bindingId,Z.registration]),k.useEffect(()=>{const O=()=>Ce(te=>({...te,status:"error"}));return window.addEventListener("ours-push-repair-required",O),()=>window.removeEventListener("ours-push-repair-required",O)},[]),k.useEffect(()=>{window.location.pathname==="/"&&window.history.replaceState(null,"",Jo()),h.current=window.matchMedia("(min-width: 861px)");const O=()=>{const pe=Jy(window.location.pathname);a.current?.abort(),l.current+=1,s(null),qe({type:"route",route:pe}),pe.name==="chats"&&pe.contactCid&&Dt(pe.contactCid)},te=()=>{if(document.visibilityState!=="visible")return;const pe=si(c.current);pe&&He(pe),v0(),Z.registration&&ov(Z.registration).then(Ce).catch(()=>Ce(Oe=>({...Oe,status:"error"})))};window.addEventListener("popstate",O),document.addEventListener("visibilitychange",te);const de=pe=>{const Oe=pe.type==="sync_required"?`${pe.type}:${pe.reason}`:pe.type==="receipt_received"?`${pe.type}:${pe.contact_id}:${pe.kind}:${pe.wire_ids.join(",")}`:`${pe.type}:${pe.contact_id}:${pe.wire_id}`,xt=Date.now(),Ye=p.current.get(Oe)??0;p.current.set(Oe,xt);for(const[wt,At]of p.current)xt-At>6e4&&p.current.delete(wt);xt-Ye<6e4||(async()=>{if(pe.type==="sync_required"){await dt();return}if(mt().catch(_e),pe.type==="file_received"){await Un(pe.contact_id,pe.wire_id);const wt=c.current.contacts.contacts.find(At=>At.container_id===pe.contact_id);si(c.current)!==pe.contact_id&&wt&&ve(pe.contact_id,Dl(wt),"New file");return}if(pe.type==="message_received"){const wt=c.current.contacts.contacts.find(At=>At.container_id===pe.contact_id);await _t(pe.contact_id,At=>At.messages.some(rt=>rt.wire_id===pe.wire_id),`message:${pe.wire_id}`),si(c.current)===pe.contact_id?await He(pe.contact_id):wt&&ve(pe.contact_id,Dl(wt),"New message");return}qe({type:"receipt",contactCid:pe.contact_id,kind:pe.kind,wireIds:pe.wire_ids}),await _t(pe.contact_id,wt=>pe.wire_ids.every(At=>{const rt=wt.messages.find(Bt=>Bt.wire_id===At);return!!rt?.receipt&&Tx[rt.receipt]>=Tx[pe.kind]}),`receipt:${pe.wire_ids.join(",")}`)})().catch(_e)},je=tA(de),Pe=nA(de,pe=>qe({type:"connection",connection:pe}));return dt().then(pe=>{pe&&Dt(pe)}),()=>{Pe(),je(),window.removeEventListener("popstate",O),document.removeEventListener("visibilitychange",te)}},[_t,Un,qe,He,Dt,ve,mt,dt,_e,Z.registration]);const dn=(O,te,de)=>{window.history.pushState(null,"",te),qe({type:"route",route:O,mobileDetailOpen:de})},Q=async O=>{dn({name:"chats",contactCid:O},Jo(O),!0),await Dt(O)},le=async O=>{const te=ci(c.current,O);if(!(!te?.nextBefore||C.current.has(O))){C.current.add(O),T(O);try{const de=await Qe.conversation(O,te.nextBefore);qe({type:"older_page",contactCid:O,page:de,newer:te.messages})}catch(de){_e(de)}finally{C.current.delete(O),T(null)}}},fe=si(t),Le=t.contacts.contacts.find(O=>O.container_id===fe),Fe=k.useMemo(()=>Nz(t,y),[t,y]),gt=Fe.find(O=>O.id===fe)??null,Lt=fe?Yk(ci(t,fe),y[fe]??[]):[],nt=t.identity,nn=t.loaded?fe&&!ci(t,fe)||J?"updating":t.connection!=="live"?"connecting":null:"connecting",z=async(O,te=ge.preview)=>{if(Z.registration){ce(!0),Ce(de=>({...de,status:"repairing",preview:te}));try{Ce(await(O==="enable"?y0(Z.registration,{preview:te}):O==="repair"?vA(Z.registration,te):xA(Z.registration,ge)))}catch(de){Ce(je=>({...je,status:"error"})),_e(de)}finally{ce(!1)}}},re=()=>{q([]),A("invite"),Qe.invites().then(q).catch(_e)};return t.route.name==="not_found"?v.jsxs("div",{className:"centered-screen",children:[v.jsx("h1",{children:"Page not found"}),v.jsx("button",{className:"btn primary",onClick:()=>dn({name:"chats",contactCid:null},Jo()),children:"Open chats"})]}):nt?v.jsx("div",{className:j?"theme-dark":"",style:{height:"100%"},children:v.jsxs("div",{className:"app signal-app",children:[v.jsxs("header",{className:"commandbar",children:[v.jsx("div",{className:"command-brand","aria-label":"ours network",children:v.jsx("span",{children:"Ours"})}),v.jsxs("div",{className:"command-copy",children:[v.jsx("span",{className:"command-kicker",children:"ours / encrypted network"}),v.jsx("strong",{children:"Chats"})]}),v.jsxs("div",{className:"command-actions",children:[W&&v.jsx("button",{className:"command-action",onClick:()=>void W.prompt().then(()=>ue(null)),children:"Install app"}),v.jsxs("button",{className:"command-action",onClick:re,children:[v.jsx(Se,{name:"plus"}),v.jsx("span",{children:"New chat"})]}),v.jsx("button",{className:"icon-btn command-settings",title:"Settings","aria-label":"Settings",onClick:()=>A("settings"),children:v.jsx(Se,{name:"settings"})}),v.jsxs("button",{ref:G,className:"rail-me command-me",title:nt.name,"aria-label":`${nt.name} account menu`,"aria-haspopup":"menu","aria-expanded":P,"aria-controls":"account-menu",onClick:()=>L(O=>!O),children:[Ss(nt.name),v.jsx("span",{className:"conn-dot "+(t.connection==="live"?"on":"off")})]})]})]}),v.jsxs("main",{className:"section signal-stage"+(t.mobileDetailOpen?" show-detail":""),children:[v.jsx(sz,{contacts:Fe,roots:Mz(t.contacts),selected:fe,onSelect:O=>{O.startsWith("pending:")||Q(O)},onInvite:re,onSettings:()=>A("settings"),onApprovePending:async O=>{try{return await Qe.respondToIntroduction(O,"approve"),await dt(),!0}catch(te){return _e(te),!1}},onRejectPending:async O=>{try{return await Qe.respondToIntroduction(O,"reject"),await dt(),!0}catch(te){return _e(te),!1}}}),v.jsx(az,{contact:gt,messages:Lt,syncing:nn,unreadOpen:i?.contactCid===fe?i:null,hiddenEarlier:ci(t,fe??"")?.hasMore?Math.max(1,(ci(t,fe??"")?.total??Lt.length)-Lt.length):0,onLoadEarlier:fe&&E!==fe?()=>void le(fe):void 0,onBack:()=>{a.current?.abort(),l.current+=1,s(null),dn({name:"chats",contactCid:null},Jo(),!1)},onDraftChange:lt,onSend:async(O,te,de)=>{if(!fe)return;const je=fe,Pe=await Qe.send(je,O,te,de);return qe({type:"sent_message",contactCid:je,message:{dir:"out",text:O,date:new Date().toISOString(),read:!0,wire_id:Pe.wire_id??"",receipt:null,reply_to:te?{wire_id:te}:null}}),Pe.wire_id?_t(je,pe=>pe.messages.some(Oe=>Oe.wire_id===Pe.wire_id),`send:${Pe.wire_id}`):mt().catch(_e),Pe.wire_id??void 0},onSendFile:async(O,te)=>{fe&&(await Qe.sendFile(fe,new Blob([O.bytes],{type:O.mime}),O.filename,O.mime,te),await Promise.all([Xe(fe),Rt(fe,!1)]))},onFetchFile:async O=>{await Qe.fetchFiles([O]),fe&&await Xe(fe)},onRename:O=>{fe&&Qe.renameContact(fe,O).then(dt).catch(_e)},onRemove:()=>{fe&&confirm(`Remove “${Le?.name??"contact"}”?`)&&Qe.removeContact(fe).then(()=>(dn({name:"chats",contactCid:null},Jo(),!1),dt())).catch(_e)}},fe??"no-conversation")]}),v.jsxs("div",{className:"app-banners",children:[Z.offline&&v.jsx("div",{className:"banner warn",role:"status","aria-live":"polite",children:"Offline — reconnecting to the network…"}),t.connection!=="live"&&v.jsx("div",{className:"banner warn",role:"status","aria-live":"polite",children:t.connection==="retrying"?"Live updates interrupted — reconnecting…":"Connecting to live updates…"}),Z.updateAvailable&&v.jsxs("div",{className:"banner info",children:[v.jsx("span",{role:"status","aria-live":"polite",children:"A new version is available."}),v.jsx("span",{className:"banner-actions",children:v.jsx("button",{className:"linkbtn",onClick:()=>{Z.registration&&rv(Z.registration)},children:"Restart now"})})]}),v.jsx(mz,{items:me,onDismiss:Ee,onOpen:O=>void Q(O)})]}),P&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"pop-backdrop","aria-hidden":"true",onClick:()=>Be(!0)}),v.jsxs("div",{id:"account-menu",ref:M,className:"menu command-menu",role:"menu","aria-label":`${nt.name} account`,onKeyDown:ft,children:[v.jsxs("div",{className:"menu-head",children:[v.jsx("div",{className:"avatar accent lg",children:Ss(nt.name)}),v.jsxs("div",{children:[v.jsx("strong",{children:nt.name}),v.jsxs("div",{className:"faint mono",children:["@",yh(nt.cid)]})]})]}),v.jsxs("button",{className:"menu-item",role:"menuitem",onClick:()=>{L(!1),re()},children:[v.jsx(Se,{name:"plus"}),"Invite a contact"]}),v.jsxs("button",{className:"menu-item",role:"menuitem",onClick:()=>{L(!1),A("settings")},children:[v.jsx(Se,{name:"settings"}),"Settings"]})]})]}),R==="invite"&&v.jsx(vz,{identity:nt,invites:I,onRefresh:async()=>q(await Qe.invites()),onCreate:async(O,te)=>(await Qe.createInvite(O,te)).blob,onAccept:async(O,te)=>{await Qe.addContact(O,te),await dt()},onRevoke:async O=>{await Qe.revokeInvite(O)},onClose:()=>{A(null),dt()}}),R==="settings"&&v.jsx(xz,{identity:nt,push:ge,workerSupported:Z.supported,busy:X,offline:Z.offline,updateAvailable:Z.updateAvailable,build:$,dark:j,onToggleDark:()=>Y(O=>(localStorage.setItem(Px,O?"0":"1"),!O)),onSaveBio:async O=>{await Qe.setBio(O),await dt()},onPushAction:z,onReloadUpdate:()=>{Z.registration&&rv(Z.registration)},onClose:()=>{D.current=null,A(null),fe&&He(fe)}}),t.error&&v.jsxs("div",{className:"banner error",role:"alert","aria-live":"assertive",children:[t.error,v.jsx("button",{className:"linkbtn",onClick:()=>qe({type:"error",message:null}),children:"dismiss"})]})]})}):v.jsx("div",{className:j?"theme-dark":"",style:{height:"100%"},children:v.jsx("div",{className:"centered-screen",children:v.jsx("p",{className:"muted",children:"Loading…"})})})}Rz();const Gk=document.getElementById("root");if(!Gk)throw new Error("missing #root");Jb.createRoot(Gk).render(v.jsx(GP,{reducedMotion:"user",children:v.jsx(jz,{})}));export{Mh as _,Od as g};
|
|
317
|
-
//# sourceMappingURL=index-Ds2T7P1J.js.map
|