const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_astro/dagre-OKDRZEBW.n0GD6mJQ.js","_astro/graph.BxUDermb.js","_astro/_baseUniq.DelHWdcf.js","_astro/layout.D5ixP3mD.js","_astro/_basePickBy.CNlQmn9F.js","_astro/clone.BrVhlEok.js","_astro/preload-helper.BlTxHScW.js","_astro/c4Diagram-VJAJSXHY.HfIXWbbn.js","_astro/chunk-D6G4REZN.nBzof2sD.js","_astro/flowDiagram-4HSFHLVR.BYsXUEo3.js","_astro/chunk-RZ5BOZE2.Cc65KoDt.js","_astro/channel.BuLGeYxs.js","_astro/erDiagram-Q7BY3M3F.CVq1HoPi.js","_astro/gitGraphDiagram-7IBYFJ6S.DZFfiRM9.js","_astro/chunk-4BMEZGHF.CzqZwy5s.js","_astro/chunk-XZIHB7SX.Dmi-aRZN.js","_astro/radar-MK3ICKWK.CU-TRBnY.js","_astro/ganttDiagram-APWFNJXF.DzCKXu02.js","_astro/linear.BqgbsWO1.js","_astro/init.Gi6I4Gst.js","_astro/infoDiagram-PH2N3AL5.C5cS-mOr.js","_astro/pieDiagram-IB7DONF6.DAadi3FS.js","_astro/arc.-aVkdzUI.js","_astro/ordinal.BYWQX77i.js","_astro/quadrantDiagram-7GDLP6J5.Dg6Nc_oX.js","_astro/xychartDiagram-VJFVF3MP.WJ6Q5xR7.js","_astro/requirementDiagram-KVF5MWMF.CuMjwiDG.js","_astro/sequenceDiagram-X6HHIX6F.D4ndW3Qa.js","_astro/classDiagram-GIVACNV2.CCHJ_KyO.js","_astro/chunk-A2AXSNBT.CzaQbKiI.js","_astro/classDiagram-v2-COTLJTTW.CCHJ_KyO.js","_astro/stateDiagram-DGXRK772.C6hfgVJs.js","_astro/chunk-AEK57VVT.BUkbKDGx.js","_astro/stateDiagram-v2-YXO3MK2T.S07XgPCl.js","_astro/journeyDiagram-U35MCT3I.VrxBSzj_.js","_astro/timeline-definition-BDJGKUSR.DInY-q9l.js","_astro/mindmap-definition-ALO5MXBD.D1TaqU1z.js","_astro/cytoscape.esm.Cp5tPnx1.js","_astro/kanban-definition-NDS4AKOZ.NwIMVBfz.js","_astro/sankeyDiagram-QLVOVGJD.BH7o7Nnt.js","_astro/diagram-VNBRO52H.BMqQ-HFX.js","_astro/diagram-SSKATNLV.-3U0Dvpt.js","_astro/blockDiagram-JOT3LUYC.H0Ofc1JD.js","_astro/architectureDiagram-IEHRJDOE.DdV1huC8.js","_astro/sd-dtcg-convert.ByTrpQOW.js"])))=>i.map(i=>d[i]); import{_ as Ne}from"./preload-helper.BlTxHScW.js";const X4=(e,t,r)=>{const n=e[t];return n?typeof n=="function"?n():Promise.resolve(n):new Promise((i,s)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(s.bind(null,new Error("Unknown variable dynamic import: "+t+(t.split("/").length!==r?". Note that variables only represent file names one level deep.":""))))})},J4=`:host, .sl-theme-dark { color-scheme: dark; --sl-color-gray-50: hsl(240 5.1% 15%); --sl-color-gray-100: hsl(240 5.7% 18.2%); --sl-color-gray-200: hsl(240 4.6% 22%); --sl-color-gray-300: hsl(240 5% 27.6%); --sl-color-gray-400: hsl(240 5% 35.5%); --sl-color-gray-500: hsl(240 3.7% 44%); --sl-color-gray-600: hsl(240 5.3% 58%); --sl-color-gray-700: hsl(240 5.6% 73%); --sl-color-gray-800: hsl(240 7.3% 84%); --sl-color-gray-900: hsl(240 9.1% 91.8%); --sl-color-gray-950: hsl(0 0% 95%); --sl-color-red-50: hsl(0 56% 23.9%); --sl-color-red-100: hsl(0.6 60% 33.9%); --sl-color-red-200: hsl(0.9 67.2% 37.1%); --sl-color-red-300: hsl(1.1 71.3% 43.7%); --sl-color-red-400: hsl(1 76% 52.5%); --sl-color-red-500: hsl(0.7 89.6% 57.2%); --sl-color-red-600: hsl(0 98.6% 67.9%); --sl-color-red-700: hsl(0 100% 72.3%); --sl-color-red-800: hsl(0 100% 85.6%); --sl-color-red-900: hsl(0 100% 90.3%); --sl-color-red-950: hsl(0 100% 95.9%); --sl-color-orange-50: hsl(15 64.2% 23.3%); --sl-color-orange-100: hsl(15.1 70.9% 31.1%); --sl-color-orange-200: hsl(15.3 75.7% 35.5%); --sl-color-orange-300: hsl(17.1 83.5% 42.7%); --sl-color-orange-400: hsl(20.1 88% 50.8%); --sl-color-orange-500: hsl(24.3 100% 50.5%); --sl-color-orange-600: hsl(27.2 100% 57.7%); --sl-color-orange-700: hsl(31.3 100% 68.7%); --sl-color-orange-800: hsl(33.8 100% 79.3%); --sl-color-orange-900: hsl(38.9 100% 87.7%); --sl-color-orange-950: hsl(46.2 100% 95%); --sl-color-amber-50: hsl(21.9 66.3% 21.1%); --sl-color-amber-100: hsl(21.5 73.6% 29.7%); --sl-color-amber-200: hsl(22.3 77.6% 33.3%); --sl-color-amber-300: hsl(25.4 84.2% 39.6%); --sl-color-amber-400: hsl(31.4 87.4% 46.7%); --sl-color-amber-500: hsl(37 96.6% 48.3%); --sl-color-amber-600: hsl(43.3 100% 53.4%); --sl-color-amber-700: hsl(46.5 100% 61.1%); --sl-color-amber-800: hsl(49.3 100% 73%); --sl-color-amber-900: hsl(51.8 100% 85%); --sl-color-amber-950: hsl(60 100% 94.6%); --sl-color-yellow-50: hsl(32.5 60% 18.2%); --sl-color-yellow-100: hsl(28.1 68.6% 29%); --sl-color-yellow-200: hsl(31.3 75.8% 30.8%); --sl-color-yellow-300: hsl(34.7 84.4% 35.3%); --sl-color-yellow-400: hsl(40.1 87.3% 43.3%); --sl-color-yellow-500: hsl(44.7 88% 46%); --sl-color-yellow-600: hsl(47.7 100% 50.9%); --sl-color-yellow-700: hsl(51.3 100% 59.9%); --sl-color-yellow-800: hsl(54.6 100% 73%); --sl-color-yellow-900: hsl(58.9 100% 84.2%); --sl-color-yellow-950: hsl(60 100% 94%); --sl-color-lime-50: hsl(86.5 54.4% 18%); --sl-color-lime-100: hsl(87.6 56.8% 23.3%); --sl-color-lime-200: hsl(85.8 63.2% 24.5%); --sl-color-lime-300: hsl(86.1 72% 29.4%); --sl-color-lime-400: hsl(85.5 76.8% 37.3%); --sl-color-lime-500: hsl(84.3 74.2% 42.1%); --sl-color-lime-600: hsl(82.8 81.5% 52.6%); --sl-color-lime-700: hsl(82 89.9% 64%); --sl-color-lime-800: hsl(80.9 97.9% 76.6%); --sl-color-lime-900: hsl(77.9 100% 85.8%); --sl-color-lime-950: hsl(69.5 100% 93.8%); --sl-color-green-50: hsl(144.3 53.6% 16%); --sl-color-green-100: hsl(143.2 55.4% 23.5%); --sl-color-green-200: hsl(141.5 58.2% 26.3%); --sl-color-green-300: hsl(140.8 64.2% 31.8%); --sl-color-green-400: hsl(140.3 68% 39.2%); --sl-color-green-500: hsl(141.1 64.9% 43%); --sl-color-green-600: hsl(141.6 72.4% 55.2%); --sl-color-green-700: hsl(141.7 82.7% 70.1%); --sl-color-green-800: hsl(141 90.9% 82.1%); --sl-color-green-900: hsl(142 100% 89.1%); --sl-color-green-950: hsl(144 100% 95.5%); --sl-color-emerald-50: hsl(164.3 75% 13.5%); --sl-color-emerald-100: hsl(163.5 72.6% 20.1%); --sl-color-emerald-200: hsl(162.1 73.7% 22.4%); --sl-color-emerald-300: hsl(161.3 77.3% 27.6%); --sl-color-emerald-400: hsl(159.6 77.1% 34.3%); --sl-color-emerald-500: hsl(159.1 73.5% 37.9%); --sl-color-emerald-600: hsl(157.8 66.8% 48.9%); --sl-color-emerald-700: hsl(156.2 76.1% 63.8%); --sl-color-emerald-800: hsl(152.4 84.4% 77.4%); --sl-color-emerald-900: hsl(149.3 100% 87%); --sl-color-emerald-950: hsl(158.6 100% 94.8%); --sl-color-teal-50: hsl(176.5 51.5% 15.4%); --sl-color-teal-100: hsl(175.9 54.7% 22.3%); --sl-color-teal-200: hsl(175.9 60.7% 23.9%); --sl-color-teal-300: hsl(174.5 67.3% 28.8%); --sl-color-teal-400: hsl(174.4 71.9% 34.9%); --sl-color-teal-500: hsl(173.1 71% 38.3%); --sl-color-teal-600: hsl(172.3 68.2% 48.1%); --sl-color-teal-700: hsl(170.5 81.3% 61.5%); --sl-color-teal-800: hsl(168.4 92.1% 75.2%); --sl-color-teal-900: hsl(168.3 100% 86%); --sl-color-teal-950: hsl(180 100% 95.5%); --sl-color-cyan-50: hsl(197.1 53.8% 20.3%); --sl-color-cyan-100: hsl(196.8 57.3% 27.2%); --sl-color-cyan-200: hsl(195.3 62.7% 29.4%); --sl-color-cyan-300: hsl(193.5 71.3% 34.1%); --sl-color-cyan-400: hsl(192.5 76.8% 40.6%); --sl-color-cyan-500: hsl(189.4 78.6% 42.6%); --sl-color-cyan-600: hsl(188.2 89.1% 51.7%); --sl-color-cyan-700: hsl(187 98.6% 66.2%); --sl-color-cyan-800: hsl(184.9 100% 78.3%); --sl-color-cyan-900: hsl(180 100% 86.6%); --sl-color-cyan-950: hsl(180 100% 94.8%); --sl-color-sky-50: hsl(203 63.8% 20.9%); --sl-color-sky-100: hsl(203.4 70.4% 28%); --sl-color-sky-200: hsl(202.7 75.8% 30.8%); --sl-color-sky-300: hsl(203.1 80.4% 36.1%); --sl-color-sky-400: hsl(202.1 80.5% 44.3%); --sl-color-sky-500: hsl(199.7 85.9% 47.7%); --sl-color-sky-600: hsl(198.7 97.9% 57.2%); --sl-color-sky-700: hsl(198.7 100% 70.5%); --sl-color-sky-800: hsl(198.8 100% 82.5%); --sl-color-sky-900: hsl(198.5 100% 89.9%); --sl-color-sky-950: hsl(186 100% 95.5%); --sl-color-blue-50: hsl(227.1 49.5% 22.7%); --sl-color-blue-100: hsl(225.8 58.9% 36.8%); --sl-color-blue-200: hsl(227.7 64.4% 42.9%); --sl-color-blue-300: hsl(226.1 72.7% 51.2%); --sl-color-blue-400: hsl(222.6 86.5% 56.3%); --sl-color-blue-500: hsl(217.8 95.8% 57.4%); --sl-color-blue-600: hsl(213.3 100% 65%); --sl-color-blue-700: hsl(210.9 100% 74.8%); --sl-color-blue-800: hsl(211.5 100% 83.4%); --sl-color-blue-900: hsl(211 100% 88.9%); --sl-color-blue-950: hsl(201.8 100% 95.3%); --sl-color-indigo-50: hsl(243.5 40.8% 27%); --sl-color-indigo-100: hsl(242.9 45.7% 37.6%); --sl-color-indigo-200: hsl(244.7 52.7% 43.1%); --sl-color-indigo-300: hsl(245.3 60.5% 52.4%); --sl-color-indigo-400: hsl(244.1 79.2% 60.4%); --sl-color-indigo-500: hsl(239.6 88.7% 63.8%); --sl-color-indigo-600: hsl(234.5 96.7% 70.9%); --sl-color-indigo-700: hsl(229.4 100% 78.3%); --sl-color-indigo-800: hsl(227.1 100% 85%); --sl-color-indigo-900: hsl(223.8 100% 89.9%); --sl-color-indigo-950: hsl(220 100% 95.1%); --sl-color-violet-50: hsl(265.1 57.3% 25.4%); --sl-color-violet-100: hsl(263.5 63.8% 39.4%); --sl-color-violet-200: hsl(263.4 66.2% 44.1%); --sl-color-violet-300: hsl(263.7 72.8% 52.4%); --sl-color-violet-400: hsl(262.5 87.3% 59.8%); --sl-color-violet-500: hsl(258.3 95.1% 63.2%); --sl-color-violet-600: hsl(255.1 100% 67.2%); --sl-color-violet-700: hsl(253 100% 81.5%); --sl-color-violet-800: hsl(251.7 100% 87.9%); --sl-color-violet-900: hsl(254.1 100% 91.7%); --sl-color-violet-950: hsl(257.1 100% 96.1%); --sl-color-purple-50: hsl(276 54.3% 20.5%); --sl-color-purple-100: hsl(273.6 61.8% 35.4%); --sl-color-purple-200: hsl(272.9 64% 41.4%); --sl-color-purple-300: hsl(271.9 68.1% 49.2%); --sl-color-purple-400: hsl(271.5 85.1% 57.8%); --sl-color-purple-500: hsl(270.7 96.4% 62.1%); --sl-color-purple-600: hsl(270.5 100% 71.9%); --sl-color-purple-700: hsl(270.9 100% 81.3%); --sl-color-purple-800: hsl(272.4 100% 87.7%); --sl-color-purple-900: hsl(276.7 100% 91.5%); --sl-color-purple-950: hsl(300 100% 96.5%); --sl-color-fuchsia-50: hsl(297.1 51.2% 18.6%); --sl-color-fuchsia-100: hsl(296.7 59.5% 31.5%); --sl-color-fuchsia-200: hsl(295.4 65.4% 35.1%); --sl-color-fuchsia-300: hsl(294.6 67.4% 42.2%); --sl-color-fuchsia-400: hsl(293.3 68.7% 51.2%); --sl-color-fuchsia-500: hsl(292.1 88.4% 57.7%); --sl-color-fuchsia-600: hsl(292 98.5% 59.5%); --sl-color-fuchsia-700: hsl(292.4 100% 79.5%); --sl-color-fuchsia-800: hsl(292.9 100% 86.8%); --sl-color-fuchsia-900: hsl(300 100% 91.5%); --sl-color-fuchsia-950: hsl(300 100% 96.3%); --sl-color-pink-50: hsl(336.2 59.6% 20%); --sl-color-pink-100: hsl(336.8 63.9% 34%); --sl-color-pink-200: hsl(336.8 68.7% 37.6%); --sl-color-pink-300: hsl(336.1 71.8% 44.5%); --sl-color-pink-400: hsl(333.9 74.9% 53.1%); --sl-color-pink-500: hsl(330.7 86.3% 57.7%); --sl-color-pink-600: hsl(328.6 91.5% 67.2%); --sl-color-pink-700: hsl(327.4 97.6% 78.7%); --sl-color-pink-800: hsl(325.1 100% 86.6%); --sl-color-pink-900: hsl(322.1 100% 91.3%); --sl-color-pink-950: hsl(315 100% 95.9%); --sl-color-rose-50: hsl(342.3 62.9% 21.5%); --sl-color-rose-100: hsl(342.8 68.9% 34.2%); --sl-color-rose-200: hsl(344.8 72.6% 37.3%); --sl-color-rose-300: hsl(346.9 75.8% 43.7%); --sl-color-rose-400: hsl(348.2 80.1% 52.7%); --sl-color-rose-500: hsl(350.4 94.8% 57.5%); --sl-color-rose-600: hsl(351.2 100% 58.1%); --sl-color-rose-700: hsl(352.3 100% 78.1%); --sl-color-rose-800: hsl(352 100% 86.2%); --sl-color-rose-900: hsl(354.5 100% 90.7%); --sl-color-rose-950: hsl(353.3 100% 95.7%); --sl-color-primary-50: var(--sl-color-sky-50); --sl-color-primary-100: var(--sl-color-sky-100); --sl-color-primary-200: var(--sl-color-sky-200); --sl-color-primary-300: var(--sl-color-sky-300); --sl-color-primary-400: var(--sl-color-sky-400); --sl-color-primary-500: var(--sl-color-sky-500); --sl-color-primary-600: var(--sl-color-sky-600); --sl-color-primary-700: var(--sl-color-sky-700); --sl-color-primary-800: var(--sl-color-sky-800); --sl-color-primary-900: var(--sl-color-sky-900); --sl-color-primary-950: var(--sl-color-sky-950); --sl-color-success-50: var(--sl-color-green-50); --sl-color-success-100: var(--sl-color-green-100); --sl-color-success-200: var(--sl-color-green-200); --sl-color-success-300: var(--sl-color-green-300); --sl-color-success-400: var(--sl-color-green-400); --sl-color-success-500: var(--sl-color-green-500); --sl-color-success-600: var(--sl-color-green-600); --sl-color-success-700: var(--sl-color-green-700); --sl-color-success-800: var(--sl-color-green-800); --sl-color-success-900: var(--sl-color-green-900); --sl-color-success-950: var(--sl-color-green-950); --sl-color-warning-50: var(--sl-color-amber-50); --sl-color-warning-100: var(--sl-color-amber-100); --sl-color-warning-200: var(--sl-color-amber-200); --sl-color-warning-300: var(--sl-color-amber-300); --sl-color-warning-400: var(--sl-color-amber-400); --sl-color-warning-500: var(--sl-color-amber-500); --sl-color-warning-600: var(--sl-color-amber-600); --sl-color-warning-700: var(--sl-color-amber-700); --sl-color-warning-800: var(--sl-color-amber-800); --sl-color-warning-900: var(--sl-color-amber-900); --sl-color-warning-950: var(--sl-color-amber-950); --sl-color-danger-50: var(--sl-color-red-50); --sl-color-danger-100: var(--sl-color-red-100); --sl-color-danger-200: var(--sl-color-red-200); --sl-color-danger-300: var(--sl-color-red-300); --sl-color-danger-400: var(--sl-color-red-400); --sl-color-danger-500: var(--sl-color-red-500); --sl-color-danger-600: var(--sl-color-red-600); --sl-color-danger-700: var(--sl-color-red-700); --sl-color-danger-800: var(--sl-color-red-800); --sl-color-danger-900: var(--sl-color-red-900); --sl-color-danger-950: var(--sl-color-red-950); --sl-color-neutral-50: var(--sl-color-gray-50); --sl-color-neutral-100: var(--sl-color-gray-100); --sl-color-neutral-200: var(--sl-color-gray-200); --sl-color-neutral-300: var(--sl-color-gray-300); --sl-color-neutral-400: var(--sl-color-gray-400); --sl-color-neutral-500: var(--sl-color-gray-500); --sl-color-neutral-600: var(--sl-color-gray-600); --sl-color-neutral-700: var(--sl-color-gray-700); --sl-color-neutral-800: var(--sl-color-gray-800); --sl-color-neutral-900: var(--sl-color-gray-900); --sl-color-neutral-950: var(--sl-color-gray-950); --sl-color-neutral-0: hsl(240, 5.9%, 11%); --sl-color-neutral-1000: hsl(0, 0%, 100%); --sl-border-radius-small: 0.1875rem; --sl-border-radius-medium: 0.25rem; --sl-border-radius-large: 0.5rem; --sl-border-radius-x-large: 1rem; --sl-border-radius-circle: 50%; --sl-border-radius-pill: 9999px; --sl-shadow-x-small: 0 1px 2px rgb(0 0 0 / 18%); --sl-shadow-small: 0 1px 2px rgb(0 0 0 / 24%); --sl-shadow-medium: 0 2px 4px rgb(0 0 0 / 24%); --sl-shadow-large: 0 2px 8px rgb(0 0 0 / 24%); --sl-shadow-x-large: 0 4px 16px rgb(0 0 0 / 24%); --sl-spacing-3x-small: 0.125rem; --sl-spacing-2x-small: 0.25rem; --sl-spacing-x-small: 0.5rem; --sl-spacing-small: 0.75rem; --sl-spacing-medium: 1rem; --sl-spacing-large: 1.25rem; --sl-spacing-x-large: 1.75rem; --sl-spacing-2x-large: 2.25rem; --sl-spacing-3x-large: 3rem; --sl-spacing-4x-large: 4.5rem; --sl-transition-x-slow: 1000ms; --sl-transition-slow: 500ms; --sl-transition-medium: 250ms; --sl-transition-fast: 150ms; --sl-transition-x-fast: 50ms; --sl-font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; --sl-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; --sl-font-serif: Georgia, "Times New Roman", serif; --sl-font-size-2x-small: 0.625rem; --sl-font-size-x-small: 0.75rem; --sl-font-size-small: 0.875rem; --sl-font-size-medium: 1rem; --sl-font-size-large: 1.25rem; --sl-font-size-x-large: 1.5rem; --sl-font-size-2x-large: 2.25rem; --sl-font-size-3x-large: 3rem; --sl-font-size-4x-large: 4.5rem; --sl-font-weight-light: 300; --sl-font-weight-normal: 400; --sl-font-weight-semibold: 500; --sl-font-weight-bold: 700; --sl-letter-spacing-denser: -0.03em; --sl-letter-spacing-dense: -0.015em; --sl-letter-spacing-normal: normal; --sl-letter-spacing-loose: 0.075em; --sl-letter-spacing-looser: 0.15em; --sl-line-height-denser: 1; --sl-line-height-dense: 1.4; --sl-line-height-normal: 1.8; --sl-line-height-loose: 2.2; --sl-line-height-looser: 2.6; --sl-focus-ring-color: var(--sl-color-primary-700); --sl-focus-ring-style: solid; --sl-focus-ring-width: 3px; --sl-focus-ring: var(--sl-focus-ring-style) var(--sl-focus-ring-width) var(--sl-focus-ring-color); --sl-focus-ring-offset: 1px; --sl-button-font-size-small: var(--sl-font-size-x-small); --sl-button-font-size-medium: var(--sl-font-size-small); --sl-button-font-size-large: var(--sl-font-size-medium); --sl-input-height-small: 1.875rem; --sl-input-height-medium: 2.5rem; --sl-input-height-large: 3.125rem; --sl-input-background-color: var(--sl-color-neutral-0); --sl-input-background-color-hover: var(--sl-input-background-color); --sl-input-background-color-focus: var(--sl-input-background-color); --sl-input-background-color-disabled: var(--sl-color-neutral-100); --sl-input-border-color: var(--sl-color-neutral-400); --sl-input-border-color-hover: var(--sl-color-neutral-500); --sl-input-border-color-focus: var(--sl-color-primary-600); --sl-input-border-color-disabled: var(--sl-color-neutral-400); --sl-input-border-width: 1px; --sl-input-required-content: "*"; --sl-input-required-content-offset: -2px; --sl-input-required-content-color: var(--sl-input-label-color); --sl-input-border-radius-small: var(--sl-border-radius-medium); --sl-input-border-radius-medium: var(--sl-border-radius-medium); --sl-input-border-radius-large: var(--sl-border-radius-medium); --sl-input-font-family: var(--sl-font-sans); --sl-input-font-weight: var(--sl-font-weight-normal); --sl-input-font-size-small: var(--sl-font-size-small); --sl-input-font-size-medium: var(--sl-font-size-medium); --sl-input-font-size-large: var(--sl-font-size-large); --sl-input-letter-spacing: var(--sl-letter-spacing-normal); --sl-input-color: var(--sl-color-neutral-700); --sl-input-color-hover: var(--sl-color-neutral-700); --sl-input-color-focus: var(--sl-color-neutral-700); --sl-input-color-disabled: var(--sl-color-neutral-900); --sl-input-icon-color: var(--sl-color-neutral-500); --sl-input-icon-color-hover: var(--sl-color-neutral-600); --sl-input-icon-color-focus: var(--sl-color-neutral-600); --sl-input-placeholder-color: var(--sl-color-neutral-500); --sl-input-placeholder-color-disabled: var(--sl-color-neutral-600); --sl-input-spacing-small: var(--sl-spacing-small); --sl-input-spacing-medium: var(--sl-spacing-medium); --sl-input-spacing-large: var(--sl-spacing-large); --sl-input-focus-ring-color: hsl(198.6 88.7% 48.4% / 40%); --sl-input-focus-ring-offset: 0; --sl-input-filled-background-color: var(--sl-color-neutral-100); --sl-input-filled-background-color-hover: var(--sl-color-neutral-100); --sl-input-filled-background-color-focus: var(--sl-color-neutral-100); --sl-input-filled-background-color-disabled: var(--sl-color-neutral-100); --sl-input-filled-color: var(--sl-color-neutral-800); --sl-input-filled-color-hover: var(--sl-color-neutral-800); --sl-input-filled-color-focus: var(--sl-color-neutral-700); --sl-input-filled-color-disabled: var(--sl-color-neutral-800); --sl-input-label-font-size-small: var(--sl-font-size-small); --sl-input-label-font-size-medium: var(--sl-font-size-medium); --sl-input-label-font-size-large: var(--sl-font-size-large); --sl-input-label-color: inherit; --sl-input-help-text-font-size-small: var(--sl-font-size-x-small); --sl-input-help-text-font-size-medium: var(--sl-font-size-small); --sl-input-help-text-font-size-large: var(--sl-font-size-medium); --sl-input-help-text-color: var(--sl-color-neutral-600); --sl-toggle-size-small: 0.875rem; --sl-toggle-size-medium: 1.125rem; --sl-toggle-size-large: 1.375rem; --sl-overlay-background-color: hsl(0 0% 0% / 43%); --sl-panel-background-color: var(--sl-color-neutral-50); --sl-panel-border-color: var(--sl-color-neutral-200); --sl-panel-border-width: 1px; --sl-tooltip-border-radius: var(--sl-border-radius-medium); --sl-tooltip-background-color: var(--sl-color-neutral-800); --sl-tooltip-color: var(--sl-color-neutral-0); --sl-tooltip-font-family: var(--sl-font-sans); --sl-tooltip-font-weight: var(--sl-font-weight-normal); --sl-tooltip-font-size: var(--sl-font-size-small); --sl-tooltip-line-height: var(--sl-line-height-dense); --sl-tooltip-padding: var(--sl-spacing-2x-small) var(--sl-spacing-x-small); --sl-tooltip-arrow-size: 6px; --sl-z-index-drawer: 700; --sl-z-index-dialog: 800; --sl-z-index-dropdown: 900; --sl-z-index-toast: 950; --sl-z-index-tooltip: 1000; } @supports (scrollbar-gutter: stable) { .sl-scroll-lock { scrollbar-gutter: var(--sl-scroll-lock-gutter) !important; } .sl-scroll-lock body { overflow: hidden !important; } } @supports not (scrollbar-gutter: stable) { .sl-scroll-lock body { padding-right: var(--sl-scroll-lock-size) !important; overflow: hidden !important; } } .sl-toast-stack { position: fixed; top: 0; inset-inline-end: 0; z-index: var(--sl-z-index-toast); width: 28rem; max-width: 100%; max-height: 100%; overflow: auto; } .sl-toast-stack sl-alert { margin: var(--sl-spacing-medium); } .sl-toast-stack sl-alert::part(base) { box-shadow: var(--sl-shadow-large); } `,Z4=`:root, :host, .sl-theme-light { color-scheme: light; --sl-color-gray-50: hsl(0 0% 97.5%); --sl-color-gray-100: hsl(240 4.8% 95.9%); --sl-color-gray-200: hsl(240 5.9% 90%); --sl-color-gray-300: hsl(240 4.9% 83.9%); --sl-color-gray-400: hsl(240 5% 64.9%); --sl-color-gray-500: hsl(240 3.8% 46.1%); --sl-color-gray-600: hsl(240 5.2% 33.9%); --sl-color-gray-700: hsl(240 5.3% 26.1%); --sl-color-gray-800: hsl(240 3.7% 15.9%); --sl-color-gray-900: hsl(240 5.9% 10%); --sl-color-gray-950: hsl(240 7.3% 8%); --sl-color-red-50: hsl(0 85.7% 97.3%); --sl-color-red-100: hsl(0 93.3% 94.1%); --sl-color-red-200: hsl(0 96.3% 89.4%); --sl-color-red-300: hsl(0 93.5% 81.8%); --sl-color-red-400: hsl(0 90.6% 70.8%); --sl-color-red-500: hsl(0 84.2% 60.2%); --sl-color-red-600: hsl(0 72.2% 50.6%); --sl-color-red-700: hsl(0 73.7% 41.8%); --sl-color-red-800: hsl(0 70% 35.3%); --sl-color-red-900: hsl(0 62.8% 30.6%); --sl-color-red-950: hsl(0 60% 19.6%); --sl-color-orange-50: hsl(33.3 100% 96.5%); --sl-color-orange-100: hsl(34.3 100% 91.8%); --sl-color-orange-200: hsl(32.1 97.7% 83.1%); --sl-color-orange-300: hsl(30.7 97.2% 72.4%); --sl-color-orange-400: hsl(27 96% 61%); --sl-color-orange-500: hsl(24.6 95% 53.1%); --sl-color-orange-600: hsl(20.5 90.2% 48.2%); --sl-color-orange-700: hsl(17.5 88.3% 40.4%); --sl-color-orange-800: hsl(15 79.1% 33.7%); --sl-color-orange-900: hsl(15.3 74.6% 27.8%); --sl-color-orange-950: hsl(15.2 69.1% 19%); --sl-color-amber-50: hsl(48 100% 96.1%); --sl-color-amber-100: hsl(48 96.5% 88.8%); --sl-color-amber-200: hsl(48 96.6% 76.7%); --sl-color-amber-300: hsl(45.9 96.7% 64.5%); --sl-color-amber-400: hsl(43.3 96.4% 56.3%); --sl-color-amber-500: hsl(37.7 92.1% 50.2%); --sl-color-amber-600: hsl(32.1 94.6% 43.7%); --sl-color-amber-700: hsl(26 90.5% 37.1%); --sl-color-amber-800: hsl(22.7 82.5% 31.4%); --sl-color-amber-900: hsl(21.7 77.8% 26.5%); --sl-color-amber-950: hsl(22.9 74.1% 16.7%); --sl-color-yellow-50: hsl(54.5 91.7% 95.3%); --sl-color-yellow-100: hsl(54.9 96.7% 88%); --sl-color-yellow-200: hsl(52.8 98.3% 76.9%); --sl-color-yellow-300: hsl(50.4 97.8% 63.5%); --sl-color-yellow-400: hsl(47.9 95.8% 53.1%); --sl-color-yellow-500: hsl(45.4 93.4% 47.5%); --sl-color-yellow-600: hsl(40.6 96.1% 40.4%); --sl-color-yellow-700: hsl(35.5 91.7% 32.9%); --sl-color-yellow-800: hsl(31.8 81% 28.8%); --sl-color-yellow-900: hsl(28.4 72.5% 25.7%); --sl-color-yellow-950: hsl(33.1 69% 13.9%); --sl-color-lime-50: hsl(78.3 92% 95.1%); --sl-color-lime-100: hsl(79.6 89.1% 89.2%); --sl-color-lime-200: hsl(80.9 88.5% 79.6%); --sl-color-lime-300: hsl(82 84.5% 67.1%); --sl-color-lime-400: hsl(82.7 78% 55.5%); --sl-color-lime-500: hsl(83.7 80.5% 44.3%); --sl-color-lime-600: hsl(84.8 85.2% 34.5%); --sl-color-lime-700: hsl(85.9 78.4% 27.3%); --sl-color-lime-800: hsl(86.3 69% 22.7%); --sl-color-lime-900: hsl(87.6 61.2% 20.2%); --sl-color-lime-950: hsl(86.5 60.6% 13.9%); --sl-color-green-50: hsl(138.5 76.5% 96.7%); --sl-color-green-100: hsl(140.6 84.2% 92.5%); --sl-color-green-200: hsl(141 78.9% 85.1%); --sl-color-green-300: hsl(141.7 76.6% 73.1%); --sl-color-green-400: hsl(141.9 69.2% 58%); --sl-color-green-500: hsl(142.1 70.6% 45.3%); --sl-color-green-600: hsl(142.1 76.2% 36.3%); --sl-color-green-700: hsl(142.4 71.8% 29.2%); --sl-color-green-800: hsl(142.8 64.2% 24.1%); --sl-color-green-900: hsl(143.8 61.2% 20.2%); --sl-color-green-950: hsl(144.3 60.7% 12%); --sl-color-emerald-50: hsl(151.8 81% 95.9%); --sl-color-emerald-100: hsl(149.3 80.4% 90%); --sl-color-emerald-200: hsl(152.4 76% 80.4%); --sl-color-emerald-300: hsl(156.2 71.6% 66.9%); --sl-color-emerald-400: hsl(158.1 64.4% 51.6%); --sl-color-emerald-500: hsl(160.1 84.1% 39.4%); --sl-color-emerald-600: hsl(161.4 93.5% 30.4%); --sl-color-emerald-700: hsl(162.9 93.5% 24.3%); --sl-color-emerald-800: hsl(163.1 88.1% 19.8%); --sl-color-emerald-900: hsl(164.2 85.7% 16.5%); --sl-color-emerald-950: hsl(164.3 87.5% 9.4%); --sl-color-teal-50: hsl(166.2 76.5% 96.7%); --sl-color-teal-100: hsl(167.2 85.5% 89.2%); --sl-color-teal-200: hsl(168.4 83.8% 78.2%); --sl-color-teal-300: hsl(170.6 76.9% 64.3%); --sl-color-teal-400: hsl(172.5 66% 50.4%); --sl-color-teal-500: hsl(173.4 80.4% 40%); --sl-color-teal-600: hsl(174.7 83.9% 31.6%); --sl-color-teal-700: hsl(175.3 77.4% 26.1%); --sl-color-teal-800: hsl(176.1 69.4% 21.8%); --sl-color-teal-900: hsl(175.9 60.8% 19%); --sl-color-teal-950: hsl(176.5 58.6% 11.4%); --sl-color-cyan-50: hsl(183.2 100% 96.3%); --sl-color-cyan-100: hsl(185.1 95.9% 90.4%); --sl-color-cyan-200: hsl(186.2 93.5% 81.8%); --sl-color-cyan-300: hsl(187 92.4% 69%); --sl-color-cyan-400: hsl(187.9 85.7% 53.3%); --sl-color-cyan-500: hsl(188.7 94.5% 42.7%); --sl-color-cyan-600: hsl(191.6 91.4% 36.5%); --sl-color-cyan-700: hsl(192.9 82.3% 31%); --sl-color-cyan-800: hsl(194.4 69.6% 27.1%); --sl-color-cyan-900: hsl(196.4 63.6% 23.7%); --sl-color-cyan-950: hsl(196.8 61% 16.1%); --sl-color-sky-50: hsl(204 100% 97.1%); --sl-color-sky-100: hsl(204 93.8% 93.7%); --sl-color-sky-200: hsl(200.6 94.4% 86.1%); --sl-color-sky-300: hsl(199.4 95.5% 73.9%); --sl-color-sky-400: hsl(198.4 93.2% 59.6%); --sl-color-sky-500: hsl(198.6 88.7% 48.4%); --sl-color-sky-600: hsl(200.4 98% 39.4%); --sl-color-sky-700: hsl(201.3 96.3% 32.2%); --sl-color-sky-800: hsl(201 90% 27.5%); --sl-color-sky-900: hsl(202 80.3% 23.9%); --sl-color-sky-950: hsl(202.3 73.8% 16.5%); --sl-color-blue-50: hsl(213.8 100% 96.9%); --sl-color-blue-100: hsl(214.3 94.6% 92.7%); --sl-color-blue-200: hsl(213.3 96.9% 87.3%); --sl-color-blue-300: hsl(211.7 96.4% 78.4%); --sl-color-blue-400: hsl(213.1 93.9% 67.8%); --sl-color-blue-500: hsl(217.2 91.2% 59.8%); --sl-color-blue-600: hsl(221.2 83.2% 53.3%); --sl-color-blue-700: hsl(224.3 76.3% 48%); --sl-color-blue-800: hsl(225.9 70.7% 40.2%); --sl-color-blue-900: hsl(224.4 64.3% 32.9%); --sl-color-blue-950: hsl(226.2 55.3% 18.4%); --sl-color-indigo-50: hsl(225.9 100% 96.7%); --sl-color-indigo-100: hsl(226.5 100% 93.9%); --sl-color-indigo-200: hsl(228 96.5% 88.8%); --sl-color-indigo-300: hsl(229.7 93.5% 81.8%); --sl-color-indigo-400: hsl(234.5 89.5% 73.9%); --sl-color-indigo-500: hsl(238.7 83.5% 66.7%); --sl-color-indigo-600: hsl(243.4 75.4% 58.6%); --sl-color-indigo-700: hsl(244.5 57.9% 50.6%); --sl-color-indigo-800: hsl(243.7 54.5% 41.4%); --sl-color-indigo-900: hsl(242.2 47.4% 34.3%); --sl-color-indigo-950: hsl(243.5 43.6% 22.9%); --sl-color-violet-50: hsl(250 100% 97.6%); --sl-color-violet-100: hsl(251.4 91.3% 95.5%); --sl-color-violet-200: hsl(250.5 95.2% 91.8%); --sl-color-violet-300: hsl(252.5 94.7% 85.1%); --sl-color-violet-400: hsl(255.1 91.7% 76.3%); --sl-color-violet-500: hsl(258.3 89.5% 66.3%); --sl-color-violet-600: hsl(262.1 83.3% 57.8%); --sl-color-violet-700: hsl(263.4 70% 50.4%); --sl-color-violet-800: hsl(263.4 69.3% 42.2%); --sl-color-violet-900: hsl(263.5 67.4% 34.9%); --sl-color-violet-950: hsl(265.1 61.5% 21.4%); --sl-color-purple-50: hsl(270 100% 98%); --sl-color-purple-100: hsl(268.7 100% 95.5%); --sl-color-purple-200: hsl(268.6 100% 91.8%); --sl-color-purple-300: hsl(269.2 97.4% 85.1%); --sl-color-purple-400: hsl(270 95.2% 75.3%); --sl-color-purple-500: hsl(270.7 91% 65.1%); --sl-color-purple-600: hsl(271.5 81.3% 55.9%); --sl-color-purple-700: hsl(272.1 71.7% 47.1%); --sl-color-purple-800: hsl(272.9 67.2% 39.4%); --sl-color-purple-900: hsl(273.6 65.6% 32%); --sl-color-purple-950: hsl(276 59.5% 16.5%); --sl-color-fuchsia-50: hsl(289.1 100% 97.8%); --sl-color-fuchsia-100: hsl(287 100% 95.5%); --sl-color-fuchsia-200: hsl(288.3 95.8% 90.6%); --sl-color-fuchsia-300: hsl(291.1 93.1% 82.9%); --sl-color-fuchsia-400: hsl(292 91.4% 72.5%); --sl-color-fuchsia-500: hsl(292.2 84.1% 60.6%); --sl-color-fuchsia-600: hsl(293.4 69.5% 48.8%); --sl-color-fuchsia-700: hsl(294.7 72.4% 39.8%); --sl-color-fuchsia-800: hsl(295.4 70.2% 32.9%); --sl-color-fuchsia-900: hsl(296.7 63.6% 28%); --sl-color-fuchsia-950: hsl(297.1 56.8% 14.5%); --sl-color-pink-50: hsl(327.3 73.3% 97.1%); --sl-color-pink-100: hsl(325.7 77.8% 94.7%); --sl-color-pink-200: hsl(325.9 84.6% 89.8%); --sl-color-pink-300: hsl(327.4 87.1% 81.8%); --sl-color-pink-400: hsl(328.6 85.5% 70.2%); --sl-color-pink-500: hsl(330.4 81.2% 60.4%); --sl-color-pink-600: hsl(333.3 71.4% 50.6%); --sl-color-pink-700: hsl(335.1 77.6% 42%); --sl-color-pink-800: hsl(335.8 74.4% 35.3%); --sl-color-pink-900: hsl(335.9 69% 30.4%); --sl-color-pink-950: hsl(336.2 65.4% 15.9%); --sl-color-rose-50: hsl(355.7 100% 97.3%); --sl-color-rose-100: hsl(355.6 100% 94.7%); --sl-color-rose-200: hsl(352.7 96.1% 90%); --sl-color-rose-300: hsl(352.6 95.7% 81.8%); --sl-color-rose-400: hsl(351.3 94.5% 71.4%); --sl-color-rose-500: hsl(349.7 89.2% 60.2%); --sl-color-rose-600: hsl(346.8 77.2% 49.8%); --sl-color-rose-700: hsl(345.3 82.7% 40.8%); --sl-color-rose-800: hsl(343.4 79.7% 34.7%); --sl-color-rose-900: hsl(341.5 75.5% 30.4%); --sl-color-rose-950: hsl(341.3 70.1% 17.1%); --sl-color-primary-50: var(--sl-color-sky-50); --sl-color-primary-100: var(--sl-color-sky-100); --sl-color-primary-200: var(--sl-color-sky-200); --sl-color-primary-300: var(--sl-color-sky-300); --sl-color-primary-400: var(--sl-color-sky-400); --sl-color-primary-500: var(--sl-color-sky-500); --sl-color-primary-600: var(--sl-color-sky-600); --sl-color-primary-700: var(--sl-color-sky-700); --sl-color-primary-800: var(--sl-color-sky-800); --sl-color-primary-900: var(--sl-color-sky-900); --sl-color-primary-950: var(--sl-color-sky-950); --sl-color-success-50: var(--sl-color-green-50); --sl-color-success-100: var(--sl-color-green-100); --sl-color-success-200: var(--sl-color-green-200); --sl-color-success-300: var(--sl-color-green-300); --sl-color-success-400: var(--sl-color-green-400); --sl-color-success-500: var(--sl-color-green-500); --sl-color-success-600: var(--sl-color-green-600); --sl-color-success-700: var(--sl-color-green-700); --sl-color-success-800: var(--sl-color-green-800); --sl-color-success-900: var(--sl-color-green-900); --sl-color-success-950: var(--sl-color-green-950); --sl-color-warning-50: var(--sl-color-amber-50); --sl-color-warning-100: var(--sl-color-amber-100); --sl-color-warning-200: var(--sl-color-amber-200); --sl-color-warning-300: var(--sl-color-amber-300); --sl-color-warning-400: var(--sl-color-amber-400); --sl-color-warning-500: var(--sl-color-amber-500); --sl-color-warning-600: var(--sl-color-amber-600); --sl-color-warning-700: var(--sl-color-amber-700); --sl-color-warning-800: var(--sl-color-amber-800); --sl-color-warning-900: var(--sl-color-amber-900); --sl-color-warning-950: var(--sl-color-amber-950); --sl-color-danger-50: var(--sl-color-red-50); --sl-color-danger-100: var(--sl-color-red-100); --sl-color-danger-200: var(--sl-color-red-200); --sl-color-danger-300: var(--sl-color-red-300); --sl-color-danger-400: var(--sl-color-red-400); --sl-color-danger-500: var(--sl-color-red-500); --sl-color-danger-600: var(--sl-color-red-600); --sl-color-danger-700: var(--sl-color-red-700); --sl-color-danger-800: var(--sl-color-red-800); --sl-color-danger-900: var(--sl-color-red-900); --sl-color-danger-950: var(--sl-color-red-950); --sl-color-neutral-50: var(--sl-color-gray-50); --sl-color-neutral-100: var(--sl-color-gray-100); --sl-color-neutral-200: var(--sl-color-gray-200); --sl-color-neutral-300: var(--sl-color-gray-300); --sl-color-neutral-400: var(--sl-color-gray-400); --sl-color-neutral-500: var(--sl-color-gray-500); --sl-color-neutral-600: var(--sl-color-gray-600); --sl-color-neutral-700: var(--sl-color-gray-700); --sl-color-neutral-800: var(--sl-color-gray-800); --sl-color-neutral-900: var(--sl-color-gray-900); --sl-color-neutral-950: var(--sl-color-gray-950); --sl-color-neutral-0: hsl(0, 0%, 100%); --sl-color-neutral-1000: hsl(0, 0%, 0%); --sl-border-radius-small: 0.1875rem; --sl-border-radius-medium: 0.25rem; --sl-border-radius-large: 0.5rem; --sl-border-radius-x-large: 1rem; --sl-border-radius-circle: 50%; --sl-border-radius-pill: 9999px; --sl-shadow-x-small: 0 1px 2px hsl(240 3.8% 46.1% / 6%); --sl-shadow-small: 0 1px 2px hsl(240 3.8% 46.1% / 12%); --sl-shadow-medium: 0 2px 4px hsl(240 3.8% 46.1% / 12%); --sl-shadow-large: 0 2px 8px hsl(240 3.8% 46.1% / 12%); --sl-shadow-x-large: 0 4px 16px hsl(240 3.8% 46.1% / 12%); --sl-spacing-3x-small: 0.125rem; --sl-spacing-2x-small: 0.25rem; --sl-spacing-x-small: 0.5rem; --sl-spacing-small: 0.75rem; --sl-spacing-medium: 1rem; --sl-spacing-large: 1.25rem; --sl-spacing-x-large: 1.75rem; --sl-spacing-2x-large: 2.25rem; --sl-spacing-3x-large: 3rem; --sl-spacing-4x-large: 4.5rem; --sl-transition-x-slow: 1000ms; --sl-transition-slow: 500ms; --sl-transition-medium: 250ms; --sl-transition-fast: 150ms; --sl-transition-x-fast: 50ms; --sl-font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; --sl-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; --sl-font-serif: Georgia, "Times New Roman", serif; --sl-font-size-2x-small: 0.625rem; --sl-font-size-x-small: 0.75rem; --sl-font-size-small: 0.875rem; --sl-font-size-medium: 1rem; --sl-font-size-large: 1.25rem; --sl-font-size-x-large: 1.5rem; --sl-font-size-2x-large: 2.25rem; --sl-font-size-3x-large: 3rem; --sl-font-size-4x-large: 4.5rem; --sl-font-weight-light: 300; --sl-font-weight-normal: 400; --sl-font-weight-semibold: 500; --sl-font-weight-bold: 700; --sl-letter-spacing-denser: -0.03em; --sl-letter-spacing-dense: -0.015em; --sl-letter-spacing-normal: normal; --sl-letter-spacing-loose: 0.075em; --sl-letter-spacing-looser: 0.15em; --sl-line-height-denser: 1; --sl-line-height-dense: 1.4; --sl-line-height-normal: 1.8; --sl-line-height-loose: 2.2; --sl-line-height-looser: 2.6; --sl-focus-ring-color: var(--sl-color-primary-600); --sl-focus-ring-style: solid; --sl-focus-ring-width: 3px; --sl-focus-ring: var(--sl-focus-ring-style) var(--sl-focus-ring-width) var(--sl-focus-ring-color); --sl-focus-ring-offset: 1px; --sl-button-font-size-small: var(--sl-font-size-x-small); --sl-button-font-size-medium: var(--sl-font-size-small); --sl-button-font-size-large: var(--sl-font-size-medium); --sl-input-height-small: 1.875rem; --sl-input-height-medium: 2.5rem; --sl-input-height-large: 3.125rem; --sl-input-background-color: var(--sl-color-neutral-0); --sl-input-background-color-hover: var(--sl-input-background-color); --sl-input-background-color-focus: var(--sl-input-background-color); --sl-input-background-color-disabled: var(--sl-color-neutral-100); --sl-input-border-color: var(--sl-color-neutral-300); --sl-input-border-color-hover: var(--sl-color-neutral-400); --sl-input-border-color-focus: var(--sl-color-primary-500); --sl-input-border-color-disabled: var(--sl-color-neutral-300); --sl-input-border-width: 1px; --sl-input-required-content: "*"; --sl-input-required-content-offset: -2px; --sl-input-required-content-color: var(--sl-input-label-color); --sl-input-border-radius-small: var(--sl-border-radius-medium); --sl-input-border-radius-medium: var(--sl-border-radius-medium); --sl-input-border-radius-large: var(--sl-border-radius-medium); --sl-input-font-family: var(--sl-font-sans); --sl-input-font-weight: var(--sl-font-weight-normal); --sl-input-font-size-small: var(--sl-font-size-small); --sl-input-font-size-medium: var(--sl-font-size-medium); --sl-input-font-size-large: var(--sl-font-size-large); --sl-input-letter-spacing: var(--sl-letter-spacing-normal); --sl-input-color: var(--sl-color-neutral-700); --sl-input-color-hover: var(--sl-color-neutral-700); --sl-input-color-focus: var(--sl-color-neutral-700); --sl-input-color-disabled: var(--sl-color-neutral-900); --sl-input-icon-color: var(--sl-color-neutral-500); --sl-input-icon-color-hover: var(--sl-color-neutral-600); --sl-input-icon-color-focus: var(--sl-color-neutral-600); --sl-input-placeholder-color: var(--sl-color-neutral-500); --sl-input-placeholder-color-disabled: var(--sl-color-neutral-600); --sl-input-spacing-small: var(--sl-spacing-small); --sl-input-spacing-medium: var(--sl-spacing-medium); --sl-input-spacing-large: var(--sl-spacing-large); --sl-input-focus-ring-color: hsl(198.6 88.7% 48.4% / 40%); --sl-input-focus-ring-offset: 0; --sl-input-filled-background-color: var(--sl-color-neutral-100); --sl-input-filled-background-color-hover: var(--sl-color-neutral-100); --sl-input-filled-background-color-focus: var(--sl-color-neutral-100); --sl-input-filled-background-color-disabled: var(--sl-color-neutral-100); --sl-input-filled-color: var(--sl-color-neutral-800); --sl-input-filled-color-hover: var(--sl-color-neutral-800); --sl-input-filled-color-focus: var(--sl-color-neutral-700); --sl-input-filled-color-disabled: var(--sl-color-neutral-800); --sl-input-label-font-size-small: var(--sl-font-size-small); --sl-input-label-font-size-medium: var(--sl-font-size-medium); --sl-input-label-font-size-large: var(--sl-font-size-large); --sl-input-label-color: inherit; --sl-input-help-text-font-size-small: var(--sl-font-size-x-small); --sl-input-help-text-font-size-medium: var(--sl-font-size-small); --sl-input-help-text-font-size-large: var(--sl-font-size-medium); --sl-input-help-text-color: var(--sl-color-neutral-500); --sl-toggle-size-small: 0.875rem; --sl-toggle-size-medium: 1.125rem; --sl-toggle-size-large: 1.375rem; --sl-overlay-background-color: hsl(240 3.8% 46.1% / 33%); --sl-panel-background-color: var(--sl-color-neutral-0); --sl-panel-border-color: var(--sl-color-neutral-200); --sl-panel-border-width: 1px; --sl-tooltip-border-radius: var(--sl-border-radius-medium); --sl-tooltip-background-color: var(--sl-color-neutral-800); --sl-tooltip-color: var(--sl-color-neutral-0); --sl-tooltip-font-family: var(--sl-font-sans); --sl-tooltip-font-weight: var(--sl-font-weight-normal); --sl-tooltip-font-size: var(--sl-font-size-small); --sl-tooltip-line-height: var(--sl-line-height-dense); --sl-tooltip-padding: var(--sl-spacing-2x-small) var(--sl-spacing-x-small); --sl-tooltip-arrow-size: 6px; --sl-z-index-drawer: 700; --sl-z-index-dialog: 800; --sl-z-index-dropdown: 900; --sl-z-index-toast: 950; --sl-z-index-tooltip: 1000; } @supports (scrollbar-gutter: stable) { .sl-scroll-lock { scrollbar-gutter: var(--sl-scroll-lock-gutter) !important; } .sl-scroll-lock body { overflow: hidden !important; } } @supports not (scrollbar-gutter: stable) { .sl-scroll-lock body { padding-right: var(--sl-scroll-lock-size) !important; overflow: hidden !important; } } .sl-toast-stack { position: fixed; top: 0; inset-inline-end: 0; z-index: var(--sl-z-index-toast); width: 28rem; max-width: 100%; max-height: 100%; overflow: auto; } .sl-toast-stack sl-alert { margin: var(--sl-spacing-medium); } .sl-toast-stack sl-alert::part(base) { box-shadow: var(--sl-shadow-large); } `;var Q4=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function tN(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var yp={exports:{}},eN=yp.exports,F_;function rN(){return F_||(F_=1,function(e,t){(function(r,n){e.exports=n()})(eN,function(){var r=1e3,n=6e4,i=36e5,s="millisecond",o="second",a="minute",l="hour",c="day",u="week",h="month",d="quarter",g="year",y="date",f="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(H){var G=["th","st","nd","rd"],Y=H%100;return"["+H+(G[(Y-20)%10]||G[Y]||G[0])+"]"}},w=function(H,G,Y){var F=String(H);return!F||F.length>=G?H:""+Array(G+1-F.length).join(Y)+H},x={s:w,z:function(H){var G=-H.utcOffset(),Y=Math.abs(G),F=Math.floor(Y/60),T=Y%60;return(G<=0?"+":"-")+w(F,2,"0")+":"+w(T,2,"0")},m:function H(G,Y){if(G.date()1)return H(U[0])}else{var J=G.name;S[J]=G,T=J}return!F&&T&&(E=T),T||!F&&E},O=function(H,G){if(A(H))return H.clone();var Y=typeof G=="object"?G:{};return Y.date=H,Y.args=arguments,new M(Y)},I=x;I.l=$,I.i=A,I.w=function(H,G){return O(H,{locale:G.$L,utc:G.$u,x:G.$x,$offset:G.$offset})};var M=function(){function H(Y){this.$L=$(Y.locale,null,!0),this.parse(Y),this.$x=this.$x||Y.x||{},this[C]=!0}var G=H.prototype;return G.parse=function(Y){this.$d=function(F){var T=F.date,N=F.utc;if(T===null)return new Date(NaN);if(I.u(T))return new Date;if(T instanceof Date)return new Date(T);if(typeof T=="string"&&!/Z$/i.test(T)){var U=T.match(p);if(U){var J=U[2]-1||0,W=(U[7]||"0").substring(0,3);return N?new Date(Date.UTC(U[1],J,U[3]||1,U[4]||0,U[5]||0,U[6]||0,W)):new Date(U[1],J,U[3]||1,U[4]||0,U[5]||0,U[6]||0,W)}}return new Date(T)}(Y),this.init()},G.init=function(){var Y=this.$d;this.$y=Y.getFullYear(),this.$M=Y.getMonth(),this.$D=Y.getDate(),this.$W=Y.getDay(),this.$H=Y.getHours(),this.$m=Y.getMinutes(),this.$s=Y.getSeconds(),this.$ms=Y.getMilliseconds()},G.$utils=function(){return I},G.isValid=function(){return this.$d.toString()!==f},G.isSame=function(Y,F){var T=O(Y);return this.startOf(F)<=T&&T<=this.endOf(F)},G.isAfter=function(Y,F){return O(Y)e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},n)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const i=r<.5?r*(1+t):r+t-r*t,s=2*r-i;switch(n){case"r":return bp.hue2rgb(s,i,e+1/3)*255;case"g":return bp.hue2rgb(s,i,e)*255;case"b":return bp.hue2rgb(s,i,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},n)=>{e/=255,t/=255,r/=255;const i=Math.max(e,t,r),s=Math.min(e,t,r),o=(i+s)/2;if(n==="l")return o*100;if(i===s)return 0;const a=i-s,l=o>.5?a/(2-i-s):a/(i+s);if(n==="s")return l*100;switch(i){case e:return((t-r)/a+(tt>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},oN={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},he={channel:bp,lang:sN,unit:oN},Uo={};for(let e=0;e<=255;e++)Uo[e]=he.unit.dec2hex(e);const un={ALL:0,RGB:1,HSL:2};class aN{constructor(){this.type=un.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=un.ALL}is(t){return this.type===t}}class lN{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new aN}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=un.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:n,l:i}=t;r===void 0&&(t.h=he.channel.rgb2hsl(t,"h")),n===void 0&&(t.s=he.channel.rgb2hsl(t,"s")),i===void 0&&(t.l=he.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:n,b:i}=t;r===void 0&&(t.r=he.channel.hsl2rgb(t,"r")),n===void 0&&(t.g=he.channel.hsl2rgb(t,"g")),i===void 0&&(t.b=he.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(un.HSL)&&r!==void 0?r:(this._ensureHSL(),he.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(un.HSL)&&r!==void 0?r:(this._ensureHSL(),he.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(un.HSL)&&r!==void 0?r:(this._ensureHSL(),he.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(un.RGB)&&r!==void 0?r:(this._ensureRGB(),he.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(un.RGB)&&r!==void 0?r:(this._ensureRGB(),he.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(un.RGB)&&r!==void 0?r:(this._ensureRGB(),he.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(un.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(un.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(un.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(un.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(un.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(un.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Xg=new lN({r:0,g:0,b:0,a:0},"transparent"),Pc={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Pc.re);if(!t)return;const r=t[1],n=parseInt(r,16),i=r.length,s=i%4===0,o=i>4,a=o?1:17,l=o?8:4,c=s?0:-1,u=o?255:15;return Xg.set({r:(n>>l*(c+3)&u)*a,g:(n>>l*(c+2)&u)*a,b:(n>>l*(c+1)&u)*a,a:s?(n&u)*a/255:1},e)},stringify:e=>{const{r:t,g:r,b:n,a:i}=e;return i<1?`#${Uo[Math.round(t)]}${Uo[Math.round(r)]}${Uo[Math.round(n)]}${Uo[Math.round(i*255)]}`:`#${Uo[Math.round(t)]}${Uo[Math.round(r)]}${Uo[Math.round(n)]}`}},Ha={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(Ha.hueRe);if(t){const[,r,n]=t;switch(n){case"grad":return he.channel.clamp.h(parseFloat(r)*.9);case"rad":return he.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return he.channel.clamp.h(parseFloat(r)*360)}}return he.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Ha.re);if(!r)return;const[,n,i,s,o,a]=r;return Xg.set({h:Ha._hue2deg(n),s:he.channel.clamp.s(parseFloat(i)),l:he.channel.clamp.l(parseFloat(s)),a:o?he.channel.clamp.a(a?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:n,a:i}=e;return i<1?`hsla(${he.lang.round(t)}, ${he.lang.round(r)}%, ${he.lang.round(n)}%, ${i})`:`hsl(${he.lang.round(t)}, ${he.lang.round(r)}%, ${he.lang.round(n)}%)`}},Rh={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=Rh.colors[e];if(t)return Pc.parse(t)},stringify:e=>{const t=Pc.stringify(e);for(const r in Rh.colors)if(Rh.colors[r]===t)return r}},wh={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(wh.re);if(!r)return;const[,n,i,s,o,a,l,c,u]=r;return Xg.set({r:he.channel.clamp.r(i?parseFloat(n)*2.55:parseFloat(n)),g:he.channel.clamp.g(o?parseFloat(s)*2.55:parseFloat(s)),b:he.channel.clamp.b(l?parseFloat(a)*2.55:parseFloat(a)),a:c?he.channel.clamp.a(u?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:n,a:i}=e;return i<1?`rgba(${he.lang.round(t)}, ${he.lang.round(r)}, ${he.lang.round(n)}, ${he.lang.round(i)})`:`rgb(${he.lang.round(t)}, ${he.lang.round(r)}, ${he.lang.round(n)})`}},Is={format:{keyword:Rh,hex:Pc,rgb:wh,rgba:wh,hsl:Ha,hsla:Ha},parse:e=>{if(typeof e!="string")return e;const t=Pc.parse(e)||wh.parse(e)||Ha.parse(e)||Rh.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(un.HSL)||e.data.r===void 0?Ha.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?wh.stringify(e):Pc.stringify(e)},LD=(e,t)=>{const r=Is.parse(e);for(const n in t)r[n]=he.channel.clamp[n](t[n]);return Is.stringify(r)},Nh=(e,t,r=0,n=1)=>{if(typeof e!="number")return LD(e,{a:t});const i=Xg.set({r:he.channel.clamp.r(e),g:he.channel.clamp.g(t),b:he.channel.clamp.b(r),a:he.channel.clamp.a(n)});return Is.stringify(i)},cN=e=>{const{r:t,g:r,b:n}=Is.parse(e),i=.2126*he.channel.toLinear(t)+.7152*he.channel.toLinear(r)+.0722*he.channel.toLinear(n);return he.lang.round(i)},uN=e=>cN(e)>=.5,Vf=e=>!uN(e),MD=(e,t,r)=>{const n=Is.parse(e),i=n[t],s=he.channel.clamp[t](i+r);return i!==s&&(n[t]=s),Is.stringify(n)},Ut=(e,t)=>MD(e,"l",t),ne=(e,t)=>MD(e,"l",-t),ft=(e,t)=>{const r=Is.parse(e),n={};for(const i in t)t[i]&&(n[i]=r[i]+t[i]);return LD(e,n)},hN=(e,t,r=50)=>{const{r:n,g:i,b:s,a:o}=Is.parse(e),{r:a,g:l,b:c,a:u}=Is.parse(t),h=r/100,d=h*2-1,g=o-u,f=((d*g===-1?d:(d+g)/(1+d*g))+1)/2,p=1-f,m=n*f+a*p,b=i*f+l*p,w=s*f+c*p,x=o*h+u*(1-h);return Nh(m,b,w,x)},$t=(e,t=100)=>{const r=Is.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,hN(r,e,t)};/*! @license DOMPurify 3.2.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.5/LICENSE */const{entries:jD,setPrototypeOf:O_,isFrozen:fN,getPrototypeOf:dN,getOwnPropertyDescriptor:pN}=Object;let{freeze:An,seal:Ti,create:zD}=Object,{apply:u1,construct:h1}=typeof Reflect<"u"&&Reflect;An||(An=function(t){return t});Ti||(Ti=function(t){return t});u1||(u1=function(t,r,n){return t.apply(r,n)});h1||(h1=function(t,r){return new t(...r)});const wd=kn(Array.prototype.forEach),mN=kn(Array.prototype.lastIndexOf),I_=kn(Array.prototype.pop),Mu=kn(Array.prototype.push),gN=kn(Array.prototype.splice),vp=kn(String.prototype.toLowerCase),vy=kn(String.prototype.toString),$_=kn(String.prototype.match),ju=kn(String.prototype.replace),yN=kn(String.prototype.indexOf),bN=kn(String.prototype.trim),Gi=kn(Object.prototype.hasOwnProperty),gn=kn(RegExp.prototype.test),zu=vN(TypeError);function kn(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i2&&arguments[2]!==void 0?arguments[2]:vp;O_&&O_(e,null);let n=t.length;for(;n--;){let i=t[n];if(typeof i=="string"){const s=r(i);s!==i&&(fN(t)||(t[n]=s),i=s)}e[i]=!0}return e}function wN(e){for(let t=0;t/gm),CN=Ti(/\$\{[\w\W]*/gm),AN=Ti(/^data-[\-\w.\u00B7-\uFFFF]+$/),kN=Ti(/^aria-[\-\w]+$/),UD=Ti(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),DN=Ti(/^(?:\w+script|data):/i),TN=Ti(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),VD=Ti(/^html$/i),PN=Ti(/^[a-z][.\w]*(-[.\w]+)+$/i);var M_=Object.freeze({__proto__:null,ARIA_ATTR:kN,ATTR_WHITESPACE:TN,CUSTOM_ELEMENT:PN,DATA_ATTR:AN,DOCTYPE_NAME:VD,ERB_EXPR:EN,IS_ALLOWED_URI:UD,IS_SCRIPT_OR_DATA:DN,MUSTACHE_EXPR:SN,TMPLIT_EXPR:CN});const Vu={element:1,text:3,progressingInstruction:7,comment:8,document:9},FN=function(){return typeof window>"u"?null:window},ON=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;const i="data-tt-policy-suffix";r&&r.hasAttribute(i)&&(n=r.getAttribute(i));const s="dompurify"+(n?"#"+n:"");try{return t.createPolicy(s,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},j_=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function WD(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:FN();const t=Ht=>WD(Ht);if(t.version="3.2.5",t.removed=[],!e||!e.document||e.document.nodeType!==Vu.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const n=r,i=n.currentScript,{DocumentFragment:s,HTMLTemplateElement:o,Node:a,Element:l,NodeFilter:c,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:h,DOMParser:d,trustedTypes:g}=e,y=l.prototype,f=Uu(y,"cloneNode"),p=Uu(y,"remove"),m=Uu(y,"nextSibling"),b=Uu(y,"childNodes"),w=Uu(y,"parentNode");if(typeof o=="function"){const Ht=r.createElement("template");Ht.content&&Ht.content.ownerDocument&&(r=Ht.content.ownerDocument)}let x,E="";const{implementation:S,createNodeIterator:C,createDocumentFragment:A,getElementsByTagName:$}=r,{importNode:O}=n;let I=j_();t.isSupported=typeof jD=="function"&&typeof w=="function"&&S&&S.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:M,ERB_EXPR:q,TMPLIT_EXPR:H,DATA_ATTR:G,ARIA_ATTR:Y,IS_SCRIPT_OR_DATA:F,ATTR_WHITESPACE:T,CUSTOM_ELEMENT:N}=M_;let{IS_ALLOWED_URI:U}=M_,J=null;const W=Ce({},[...B_,...wy,...xy,..._y,...R_]);let z=null;const V=Ce({},[...N_,...Sy,...L_,...xd]);let Z=Object.seal(zD(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),nt=null,et=null,it=!0,lt=!0,ht=!1,pt=!0,vt=!1,Ct=!0,Dt=!1,Rt=!1,Ot=!1,Tt=!1,ve=!1,mt=!1,Kt=!0,Jt=!1;const re="user-content-";let Me=!0,ut=!1,dt={},kt=null;const k=Ce({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let v=null;const _=Ce({},["audio","video","img","source","image","track"]);let B=null;const K=Ce({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),tt="http://www.w3.org/1998/Math/MathML",ot="http://www.w3.org/2000/svg",rt="http://www.w3.org/1999/xhtml";let D=rt,P=!1,j=null;const X=Ce({},[tt,ot,rt],vy);let st=Ce({},["mi","mo","mn","ms","mtext"]),at=Ce({},["annotation-xml"]);const gt=Ce({},["title","style","font","a","script"]);let Et=null;const Mt=["application/xhtml+xml","text/html"],ce="text/html";let be=null,wr=null;const Te=r.createElement("form"),On=function(ct){return ct instanceof RegExp||ct instanceof Function},Vs=function(){let ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(wr&&wr===ct)){if((!ct||typeof ct!="object")&&(ct={}),ct=Oa(ct),Et=Mt.indexOf(ct.PARSER_MEDIA_TYPE)===-1?ce:ct.PARSER_MEDIA_TYPE,be=Et==="application/xhtml+xml"?vy:vp,J=Gi(ct,"ALLOWED_TAGS")?Ce({},ct.ALLOWED_TAGS,be):W,z=Gi(ct,"ALLOWED_ATTR")?Ce({},ct.ALLOWED_ATTR,be):V,j=Gi(ct,"ALLOWED_NAMESPACES")?Ce({},ct.ALLOWED_NAMESPACES,vy):X,B=Gi(ct,"ADD_URI_SAFE_ATTR")?Ce(Oa(K),ct.ADD_URI_SAFE_ATTR,be):K,v=Gi(ct,"ADD_DATA_URI_TAGS")?Ce(Oa(_),ct.ADD_DATA_URI_TAGS,be):_,kt=Gi(ct,"FORBID_CONTENTS")?Ce({},ct.FORBID_CONTENTS,be):k,nt=Gi(ct,"FORBID_TAGS")?Ce({},ct.FORBID_TAGS,be):{},et=Gi(ct,"FORBID_ATTR")?Ce({},ct.FORBID_ATTR,be):{},dt=Gi(ct,"USE_PROFILES")?ct.USE_PROFILES:!1,it=ct.ALLOW_ARIA_ATTR!==!1,lt=ct.ALLOW_DATA_ATTR!==!1,ht=ct.ALLOW_UNKNOWN_PROTOCOLS||!1,pt=ct.ALLOW_SELF_CLOSE_IN_ATTR!==!1,vt=ct.SAFE_FOR_TEMPLATES||!1,Ct=ct.SAFE_FOR_XML!==!1,Dt=ct.WHOLE_DOCUMENT||!1,Tt=ct.RETURN_DOM||!1,ve=ct.RETURN_DOM_FRAGMENT||!1,mt=ct.RETURN_TRUSTED_TYPE||!1,Ot=ct.FORCE_BODY||!1,Kt=ct.SANITIZE_DOM!==!1,Jt=ct.SANITIZE_NAMED_PROPS||!1,Me=ct.KEEP_CONTENT!==!1,ut=ct.IN_PLACE||!1,U=ct.ALLOWED_URI_REGEXP||UD,D=ct.NAMESPACE||rt,st=ct.MATHML_TEXT_INTEGRATION_POINTS||st,at=ct.HTML_INTEGRATION_POINTS||at,Z=ct.CUSTOM_ELEMENT_HANDLING||{},ct.CUSTOM_ELEMENT_HANDLING&&On(ct.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Z.tagNameCheck=ct.CUSTOM_ELEMENT_HANDLING.tagNameCheck),ct.CUSTOM_ELEMENT_HANDLING&&On(ct.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Z.attributeNameCheck=ct.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),ct.CUSTOM_ELEMENT_HANDLING&&typeof ct.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Z.allowCustomizedBuiltInElements=ct.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),vt&&(lt=!1),ve&&(Tt=!0),dt&&(J=Ce({},R_),z=[],dt.html===!0&&(Ce(J,B_),Ce(z,N_)),dt.svg===!0&&(Ce(J,wy),Ce(z,Sy),Ce(z,xd)),dt.svgFilters===!0&&(Ce(J,xy),Ce(z,Sy),Ce(z,xd)),dt.mathMl===!0&&(Ce(J,_y),Ce(z,L_),Ce(z,xd))),ct.ADD_TAGS&&(J===W&&(J=Oa(J)),Ce(J,ct.ADD_TAGS,be)),ct.ADD_ATTR&&(z===V&&(z=Oa(z)),Ce(z,ct.ADD_ATTR,be)),ct.ADD_URI_SAFE_ATTR&&Ce(B,ct.ADD_URI_SAFE_ATTR,be),ct.FORBID_CONTENTS&&(kt===k&&(kt=Oa(kt)),Ce(kt,ct.FORBID_CONTENTS,be)),Me&&(J["#text"]=!0),Dt&&Ce(J,["html","head","body"]),J.table&&(Ce(J,["tbody"]),delete nt.tbody),ct.TRUSTED_TYPES_POLICY){if(typeof ct.TRUSTED_TYPES_POLICY.createHTML!="function")throw zu('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof ct.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw zu('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=ct.TRUSTED_TYPES_POLICY,E=x.createHTML("")}else x===void 0&&(x=ON(g,i)),x!==null&&typeof E=="string"&&(E=x.createHTML(""));An&&An(ct),wr=ct}},Io=Ce({},[...wy,...xy,...xN]),Bi=Ce({},[..._y,..._N]),fs=function(ct){let At=w(ct);(!At||!At.tagName)&&(At={namespaceURI:D,tagName:"template"});const Gt=vp(ct.tagName),ur=vp(At.tagName);return j[ct.namespaceURI]?ct.namespaceURI===ot?At.namespaceURI===rt?Gt==="svg":At.namespaceURI===tt?Gt==="svg"&&(ur==="annotation-xml"||st[ur]):!!Io[Gt]:ct.namespaceURI===tt?At.namespaceURI===rt?Gt==="math":At.namespaceURI===ot?Gt==="math"&&at[ur]:!!Bi[Gt]:ct.namespaceURI===rt?At.namespaceURI===ot&&!at[ur]||At.namespaceURI===tt&&!st[ur]?!1:!Bi[Gt]&&(gt[Gt]||!Io[Gt]):!!(Et==="application/xhtml+xml"&&j[ct.namespaceURI]):!1},zr=function(ct){Mu(t.removed,{element:ct});try{w(ct).removeChild(ct)}catch{p(ct)}},$o=function(ct,At){try{Mu(t.removed,{attribute:At.getAttributeNode(ct),from:At})}catch{Mu(t.removed,{attribute:null,from:At})}if(At.removeAttribute(ct),ct==="is")if(Tt||ve)try{zr(At)}catch{}else try{At.setAttribute(ct,"")}catch{}},Ul=function(ct){let At=null,Gt=null;if(Ot)ct=""+ct;else{const Xr=$_(ct,/^[\r\n\t ]+/);Gt=Xr&&Xr[0]}Et==="application/xhtml+xml"&&D===rt&&(ct=''+ct+"");const ur=x?x.createHTML(ct):ct;if(D===rt)try{At=new d().parseFromString(ur,Et)}catch{}if(!At||!At.documentElement){At=S.createDocument(D,"template",null);try{At.documentElement.innerHTML=P?E:ur}catch{}}const ln=At.body||At.documentElement;return ct&&Gt&&ln.insertBefore(r.createTextNode(Gt),ln.childNodes[0]||null),D===rt?$.call(At,Dt?"html":"body")[0]:Dt?At.documentElement:ln},Ru=function(ct){return C.call(ct.ownerDocument||ct,ct,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Vl=function(ct){return ct instanceof h&&(typeof ct.nodeName!="string"||typeof ct.textContent!="string"||typeof ct.removeChild!="function"||!(ct.attributes instanceof u)||typeof ct.removeAttribute!="function"||typeof ct.setAttribute!="function"||typeof ct.namespaceURI!="string"||typeof ct.insertBefore!="function"||typeof ct.hasChildNodes!="function")},Wl=function(ct){return typeof a=="function"&&ct instanceof a};function pi(Ht,ct,At){wd(Ht,Gt=>{Gt.call(t,ct,At,wr)})}const ql=function(ct){let At=null;if(pi(I.beforeSanitizeElements,ct,null),Vl(ct))return zr(ct),!0;const Gt=be(ct.nodeName);if(pi(I.uponSanitizeElement,ct,{tagName:Gt,allowedTags:J}),ct.hasChildNodes()&&!Wl(ct.firstElementChild)&&gn(/<[/\w!]/g,ct.innerHTML)&&gn(/<[/\w!]/g,ct.textContent)||ct.nodeType===Vu.progressingInstruction||Ct&&ct.nodeType===Vu.comment&&gn(/<[/\w]/g,ct.data))return zr(ct),!0;if(!J[Gt]||nt[Gt]){if(!nt[Gt]&&vd(Gt)&&(Z.tagNameCheck instanceof RegExp&&gn(Z.tagNameCheck,Gt)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(Gt)))return!1;if(Me&&!kt[Gt]){const ur=w(ct)||ct.parentNode,ln=b(ct)||ct.childNodes;if(ln&&ur){const Xr=ln.length;for(let In=Xr-1;In>=0;--In){const ds=f(ln[In],!0);ds.__removalCount=(ct.__removalCount||0)+1,ur.insertBefore(ds,m(ct))}}}return zr(ct),!0}return ct instanceof l&&!fs(ct)||(Gt==="noscript"||Gt==="noembed"||Gt==="noframes")&&gn(/<\/no(script|embed|frames)/i,ct.innerHTML)?(zr(ct),!0):(vt&&ct.nodeType===Vu.text&&(At=ct.textContent,wd([M,q,H],ur=>{At=ju(At,ur," ")}),ct.textContent!==At&&(Mu(t.removed,{element:ct.cloneNode()}),ct.textContent=At)),pi(I.afterSanitizeElements,ct,null),!1)},Nu=function(ct,At,Gt){if(Kt&&(At==="id"||At==="name")&&(Gt in r||Gt in Te))return!1;if(!(lt&&!et[At]&&gn(G,At))){if(!(it&&gn(Y,At))){if(!z[At]||et[At]){if(!(vd(ct)&&(Z.tagNameCheck instanceof RegExp&&gn(Z.tagNameCheck,ct)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(ct))&&(Z.attributeNameCheck instanceof RegExp&&gn(Z.attributeNameCheck,At)||Z.attributeNameCheck instanceof Function&&Z.attributeNameCheck(At))||At==="is"&&Z.allowCustomizedBuiltInElements&&(Z.tagNameCheck instanceof RegExp&&gn(Z.tagNameCheck,Gt)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(Gt))))return!1}else if(!B[At]){if(!gn(U,ju(Gt,T,""))){if(!((At==="src"||At==="xlink:href"||At==="href")&&ct!=="script"&&yN(Gt,"data:")===0&&v[ct])){if(!(ht&&!gn(F,ju(Gt,T,"")))){if(Gt)return!1}}}}}}return!0},vd=function(ct){return ct!=="annotation-xml"&&$_(ct,N)},Hl=function(ct){pi(I.beforeSanitizeAttributes,ct,null);const{attributes:At}=ct;if(!At||Vl(ct))return;const Gt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:z,forceKeepAttr:void 0};let ur=At.length;for(;ur--;){const ln=At[ur],{name:Xr,namespaceURI:In,value:ds}=ln,Lu=be(Xr);let mn=Xr==="value"?ds:bN(ds);if(Gt.attrName=Lu,Gt.attrValue=mn,Gt.keepAttr=!0,Gt.forceKeepAttr=void 0,pi(I.uponSanitizeAttribute,ct,Gt),mn=Gt.attrValue,Jt&&(Lu==="id"||Lu==="name")&&($o(Xr,ct),mn=re+mn),Ct&&gn(/((--!?|])>)|<\/(style|title)/i,mn)){$o(Xr,ct);continue}if(Gt.forceKeepAttr||($o(Xr,ct),!Gt.keepAttr))continue;if(!pt&&gn(/\/>/i,mn)){$o(Xr,ct);continue}vt&&wd([M,q,H],P_=>{mn=ju(mn,P_," ")});const T_=be(ct.nodeName);if(Nu(T_,Lu,mn)){if(x&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!In)switch(g.getAttributeType(T_,Lu)){case"TrustedHTML":{mn=x.createHTML(mn);break}case"TrustedScriptURL":{mn=x.createScriptURL(mn);break}}try{In?ct.setAttributeNS(In,Xr,mn):ct.setAttribute(Xr,mn),Vl(ct)?zr(ct):I_(t.removed)}catch{}}}pi(I.afterSanitizeAttributes,ct,null)},Bo=function Ht(ct){let At=null;const Gt=Ru(ct);for(pi(I.beforeSanitizeShadowDOM,ct,null);At=Gt.nextNode();)pi(I.uponSanitizeShadowNode,At,null),ql(At),Hl(At),At.content instanceof s&&Ht(At.content);pi(I.afterSanitizeShadowDOM,ct,null)};return t.sanitize=function(Ht){let ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},At=null,Gt=null,ur=null,ln=null;if(P=!Ht,P&&(Ht=""),typeof Ht!="string"&&!Wl(Ht))if(typeof Ht.toString=="function"){if(Ht=Ht.toString(),typeof Ht!="string")throw zu("dirty is not a string, aborting")}else throw zu("toString is not a function");if(!t.isSupported)return Ht;if(Rt||Vs(ct),t.removed=[],typeof Ht=="string"&&(ut=!1),ut){if(Ht.nodeName){const ds=be(Ht.nodeName);if(!J[ds]||nt[ds])throw zu("root node is forbidden and cannot be sanitized in-place")}}else if(Ht instanceof a)At=Ul(""),Gt=At.ownerDocument.importNode(Ht,!0),Gt.nodeType===Vu.element&&Gt.nodeName==="BODY"||Gt.nodeName==="HTML"?At=Gt:At.appendChild(Gt);else{if(!Tt&&!vt&&!Dt&&Ht.indexOf("<")===-1)return x&&mt?x.createHTML(Ht):Ht;if(At=Ul(Ht),!At)return Tt?null:mt?E:""}At&&Ot&&zr(At.firstChild);const Xr=Ru(ut?Ht:At);for(;ur=Xr.nextNode();)ql(ur),Hl(ur),ur.content instanceof s&&Bo(ur.content);if(ut)return Ht;if(Tt){if(ve)for(ln=A.call(At.ownerDocument);At.firstChild;)ln.appendChild(At.firstChild);else ln=At;return(z.shadowroot||z.shadowrootmode)&&(ln=O.call(n,ln,!0)),ln}let In=Dt?At.outerHTML:At.innerHTML;return Dt&&J["!doctype"]&&At.ownerDocument&&At.ownerDocument.doctype&&At.ownerDocument.doctype.name&&gn(VD,At.ownerDocument.doctype.name)&&(In=" `+In),vt&&wd([M,q,H],ds=>{In=ju(In,ds," ")}),x&&mt?x.createHTML(In):In},t.setConfig=function(){let Ht=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Vs(Ht),Rt=!0},t.clearConfig=function(){wr=null,Rt=!1},t.isValidAttribute=function(Ht,ct,At){wr||Vs({});const Gt=be(Ht),ur=be(ct);return Nu(Gt,ur,At)},t.addHook=function(Ht,ct){typeof ct=="function"&&Mu(I[Ht],ct)},t.removeHook=function(Ht,ct){if(ct!==void 0){const At=mN(I[Ht],ct);return At===-1?void 0:gN(I[Ht],At,1)[0]}return I_(I[Ht])},t.removeHooks=function(Ht){I[Ht]=[]},t.removeAllHooks=function(){I=j_()},t}var qc=WD(),qD=Object.defineProperty,R=(e,t)=>qD(e,"name",{value:t,configurable:!0}),IN=(e,t)=>{for(var r in t)qD(e,r,{get:t[r],enumerable:!0})},Ws={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},St={trace:R((...e)=>{},"trace"),debug:R((...e)=>{},"debug"),info:R((...e)=>{},"info"),warn:R((...e)=>{},"warn"),error:R((...e)=>{},"error"),fatal:R((...e)=>{},"fatal")},yw=R(function(e="fatal"){let t=Ws.fatal;typeof e=="string"?e.toLowerCase()in Ws&&(t=Ws[e]):typeof e=="number"&&(t=e),St.trace=()=>{},St.debug=()=>{},St.info=()=>{},St.warn=()=>{},St.error=()=>{},St.fatal=()=>{},t<=Ws.fatal&&(St.fatal=console.error?console.error.bind(console,mi("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",mi("FATAL"))),t<=Ws.error&&(St.error=console.error?console.error.bind(console,mi("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",mi("ERROR"))),t<=Ws.warn&&(St.warn=console.warn?console.warn.bind(console,mi("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",mi("WARN"))),t<=Ws.info&&(St.info=console.info?console.info.bind(console,mi("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",mi("INFO"))),t<=Ws.debug&&(St.debug=console.debug?console.debug.bind(console,mi("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",mi("DEBUG"))),t<=Ws.trace&&(St.trace=console.debug?console.debug.bind(console,mi("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",mi("TRACE")))},"setLogLevel"),mi=R(e=>`%c${iN().format("ss.SSS")} : ${e} : `,"format"),HD=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Lh=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,$N=/\s*%%.*\n/gm,GD=class extends Error{static{R(this,"UnknownDiagramError")}constructor(e){super(e),this.name="UnknownDiagramError"}},Hc={},bw=R(function(e,t){e=e.replace(HD,"").replace(Lh,"").replace($N,` `);for(const[r,{detector:n}]of Object.entries(Hc))if(n(e,t))return r;throw new GD(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),YD=R((...e)=>{for(const{id:t,detector:r,loader:n}of e)KD(t,r,n)},"registerLazyLoadedDiagrams"),KD=R((e,t,r)=>{Hc[e]&&St.warn(`Detector with key ${e} already exists. Overwriting.`),Hc[e]={detector:t,loader:r},St.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),BN=R(e=>Hc[e].loader,"getDiagramLoader"),f1=R((e,t,{depth:r=2,clobber:n=!1}={})=>{const i={depth:r,clobber:n};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(s=>f1(e,s,i)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(s=>{e.includes(s)||e.push(s)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(s=>{typeof t[s]=="object"&&(e[s]===void 0||typeof e[s]=="object")?(e[s]===void 0&&(e[s]=Array.isArray(t[s])?[]:{}),e[s]=f1(e[s],t[s],{depth:r-1,clobber:n})):(n||typeof e[s]!="object"&&typeof t[s]!="object")&&(e[s]=t[s])}),e)},"assignWithDepth"),sn=f1,Jg="#ffffff",Zg="#f2f2f2",_n=R((e,t)=>t?ft(e,{s:-40,l:10}):ft(e,{s:-40,l:-10}),"mkBorder"),RN=class{static{R(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||ft(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ft(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||_n(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||_n(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||_n(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||_n(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||$t(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||$t(this.tertiaryColor),this.lineColor=this.lineColor||$t(this.background),this.arrowheadColor=this.arrowheadColor||$t(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?ne(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ne(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||$t(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Ut(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||ne(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||ne(this.mainBkg,10)):(this.rowOdd=this.rowOdd||Ut(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||Ut(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||ft(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ft(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ft(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ft(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ft(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ft(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||ft(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ft(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ft(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},NN=R(e=>{const t=new RN;return t.calculate(e),t},"getThemeVariables"),LN=class{static{R(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Ut(this.primaryColor,16),this.tertiaryColor=ft(this.primaryColor,{h:-160}),this.primaryBorderColor=$t(this.background),this.secondaryBorderColor=_n(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=_n(this.tertiaryColor,this.darkMode),this.primaryTextColor=$t(this.primaryColor),this.secondaryTextColor=$t(this.secondaryColor),this.tertiaryTextColor=$t(this.tertiaryColor),this.lineColor=$t(this.background),this.textColor=$t(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Ut($t("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Nh(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=ne("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=ne(this.sectionBkgColor,10),this.taskBorderColor=Nh(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Nh(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||Ut(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||ne(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=Ut(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=Ut(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=Ut(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=ft(this.primaryColor,{h:64}),this.fillType3=ft(this.secondaryColor,{h:64}),this.fillType4=ft(this.primaryColor,{h:-64}),this.fillType5=ft(this.secondaryColor,{h:-64}),this.fillType6=ft(this.primaryColor,{h:128}),this.fillType7=ft(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||ft(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ft(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ft(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ft(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ft(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ft(this.primaryColor,{h:210}),this.cScale9=this.cScale9||ft(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ft(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ft(this.primaryColor,{h:330});for(let e=0;e{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},MN=R(e=>{const t=new LN;return t.calculate(e),t},"getThemeVariables"),jN=class{static{R(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=ft(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=ft(this.primaryColor,{h:-160}),this.primaryBorderColor=_n(this.primaryColor,this.darkMode),this.secondaryBorderColor=_n(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=_n(this.tertiaryColor,this.darkMode),this.primaryTextColor=$t(this.primaryColor),this.secondaryTextColor=$t(this.secondaryColor),this.tertiaryTextColor=$t(this.tertiaryColor),this.lineColor=$t(this.background),this.textColor=$t(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=Nh(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||ft(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ft(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ft(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ft(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ft(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ft(this.primaryColor,{h:210}),this.cScale9=this.cScale9||ft(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ft(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ft(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||ne(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||ne(this.tertiaryColor,40);for(let e=0;e{this[r]==="calculated"&&(this[r]=void 0)}),typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},zN=R(e=>{const t=new jN;return t.calculate(e),t},"getThemeVariables"),UN=class{static{R(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=Ut("#cde498",10),this.primaryBorderColor=_n(this.primaryColor,this.darkMode),this.secondaryBorderColor=_n(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=_n(this.tertiaryColor,this.darkMode),this.primaryTextColor=$t(this.primaryColor),this.secondaryTextColor=$t(this.secondaryColor),this.tertiaryTextColor=$t(this.primaryColor),this.lineColor=$t(this.background),this.textColor=$t(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=ne(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||ft(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ft(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ft(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ft(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ft(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ft(this.primaryColor,{h:210}),this.cScale9=this.cScale9||ft(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ft(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ft(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||ne(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||ne(this.tertiaryColor,40);for(let e=0;e{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},VN=R(e=>{const t=new UN;return t.calculate(e),t},"getThemeVariables"),WN=class{static{R(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=Ut(this.contrast,55),this.background="#ffffff",this.tertiaryColor=ft(this.primaryColor,{h:-160}),this.primaryBorderColor=_n(this.primaryColor,this.darkMode),this.secondaryBorderColor=_n(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=_n(this.tertiaryColor,this.darkMode),this.primaryTextColor=$t(this.primaryColor),this.secondaryTextColor=$t(this.secondaryColor),this.tertiaryTextColor=$t(this.tertiaryColor),this.lineColor=$t(this.background),this.textColor=$t(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||Ut(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=Ut(this.contrast,55),this.border2=this.contrast,this.actorBorder=Ut(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let e=0;e{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},qN=R(e=>{const t=new WN;return t.calculate(e),t},"getThemeVariables"),ao={base:{getThemeVariables:NN},dark:{getThemeVariables:MN},default:{getThemeVariables:zN},forest:{getThemeVariables:VN},neutral:{getThemeVariables:qN}},qs={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},XD={...qs,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:ao.default.getThemeVariables(),sequence:{...qs.sequence,messageFont:R(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:R(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:R(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...qs.gantt,tickInterval:void 0,useWidth:void 0},c4:{...qs.c4,useWidth:void 0,personFont:R(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),external_personFont:R(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:R(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:R(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:R(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:R(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:R(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:R(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:R(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:R(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:R(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:R(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:R(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:R(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:R(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:R(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:R(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:R(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:R(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:R(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:R(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:R(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...qs.pie,useWidth:984},xyChart:{...qs.xyChart,useWidth:void 0},requirement:{...qs.requirement,useWidth:void 0},packet:{...qs.packet},radar:{...qs.radar}},JD=R((e,t="")=>Object.keys(e).reduce((r,n)=>Array.isArray(e[n])?r:typeof e[n]=="object"&&e[n]!==null?[...r,t+n,...JD(e[n],"")]:[...r,t+n],[]),"keyify"),HN=new Set(JD(XD,"")),ZD=XD,sm=R(e=>{if(St.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>sm(t));return}for(const t of Object.keys(e)){if(St.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!HN.has(t)||e[t]==null){St.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){St.debug("sanitizing object",t),sm(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const n of r)t.includes(n)&&(St.debug("sanitizing css option",t),e[t]=GN(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}St.debug("After sanitization",e)}},"sanitizeDirective"),GN=R(e=>{let t=0,r=0;for(const n of e){if(t{let r=sn({},e),n={};for(const i of t)rT(i),n=sn(n,i);if(r=sn(r,n),n.theme&&n.theme in ao){const i=sn({},QD),s=sn(i.themeVariables||{},n.themeVariables);r.theme&&r.theme in ao&&(r.themeVariables=ao[r.theme].getThemeVariables(s))}return Mh=r,nT(Mh),Mh},"updateCurrentConfig"),YN=R(e=>(Vn=sn({},Gc),Vn=sn(Vn,e),e.theme&&ao[e.theme]&&(Vn.themeVariables=ao[e.theme].getThemeVariables(e.themeVariables)),Qg(Vn,Yc),Vn),"setSiteConfig"),KN=R(e=>{QD=sn({},e)},"saveConfigFromInitialize"),XN=R(e=>(Vn=sn(Vn,e),Qg(Vn,Yc),Vn),"updateSiteConfig"),tT=R(()=>sn({},Vn),"getSiteConfig"),eT=R(e=>(nT(e),sn(Mh,e),Kn()),"setConfig"),Kn=R(()=>sn({},Mh),"getConfig"),rT=R(e=>{e&&(["secure",...Vn.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(St.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&rT(e[t])}))},"sanitize"),JN=R(e=>{sm(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Yc.push(e),Qg(Vn,Yc)},"addDirective"),om=R((e=Vn)=>{Yc=[],Qg(e,Yc)},"reset"),ZN={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},z_={},QN=R(e=>{z_[e]||(St.warn(ZN[e]),z_[e]=!0)},"issueWarning"),nT=R(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&QN("LAZY_LOAD_DEPRECATED")},"checkConfig"),Wf=//gi,tL=R(e=>e?oT(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),eL=(()=>{let e=!1;return()=>{e||(iT(),e=!0)}})();function iT(){const e="data-temp-href-target";qc.addHook("beforeSanitizeAttributes",t=>{t instanceof Element&&t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),qc.addHook("afterSanitizeAttributes",t=>{t instanceof Element&&t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}R(iT,"setupDompurifyHooks");var sT=R(e=>(eL(),qc.sanitize(e)),"removeScript"),U_=R((e,t)=>{if(t.flowchart?.htmlLabels!==!1){const r=t.securityLevel;r==="antiscript"||r==="strict"?e=sT(e):r!=="loose"&&(e=oT(e),e=e.replace(//g,">"),e=e.replace(/=/g,"="),e=sL(e))}return e},"sanitizeMore"),ll=R((e,t)=>e&&(t.dompurifyConfig?e=qc.sanitize(U_(e,t),t.dompurifyConfig).toString():e=qc.sanitize(U_(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),rL=R((e,t)=>typeof e=="string"?ll(e,t):e.flat().map(r=>ll(r,t)),"sanitizeTextOrArray"),nL=R(e=>Wf.test(e),"hasBreaks"),iL=R(e=>e.split(Wf),"splitBreaks"),sL=R(e=>e.replace(/#br#/g,"
"),"placeholderToBreak"),oT=R(e=>e.replace(Wf,"#br#"),"breakToPlaceholder"),oL=R(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=t.replaceAll(/\(/g,"\\("),t=t.replaceAll(/\)/g,"\\)")),t},"getUrl"),Lr=R(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),aL=R(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),lL=R(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),V_=R(function(e){const t=e.split(/(,)/),r=[];for(let n=0;n0&&n+1Math.max(0,e.split(t).length-1),"countOccurrence"),cL=R((e,t)=>{const r=d1(e,"~"),n=d1(t,"~");return r===1&&n===1},"shouldCombineSets"),uL=R(e=>{const t=d1(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const n=[...e];let i=n.indexOf("~"),s=n.lastIndexOf("~");for(;i!==-1&&s!==-1&&i!==s;)n[i]="<",n[s]=">",i=n.indexOf("~"),s=n.lastIndexOf("~");return r&&n.unshift("~"),n.join("")},"processSet"),W_=R(()=>window.MathMLElement!==void 0,"isMathMLSupported"),p1=/\$\$(.*)\$\$/g,Kc=R(e=>(e.match(p1)?.length??0)>0,"hasKatex"),Qht=R(async(e,t)=>{e=await vw(e,t);const r=document.createElement("div");r.innerHTML=e,r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);const i={width:r.clientWidth,height:r.clientHeight};return r.remove(),i},"calculateMathMLDimensions"),vw=R(async(e,t)=>{if(!Kc(e))return e;if(!(W_()||t.legacyMathML||t.forceLegacyMathML))return e.replace(p1,"MathML is unsupported in this environment.");const{default:r}=await Ne(async()=>{const{default:i}=await import("./katex.CfZphoad.js");return{default:i}},[]),n=t.forceLegacyMathML||!W_()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Wf).map(i=>Kc(i)?`
${i}
`:`
${i}
`).join("").replace(p1,(i,s)=>r.renderToString(s,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(//g,""))},"renderKatex"),gu={getRows:tL,sanitizeText:ll,sanitizeTextOrArray:rL,hasBreaks:nL,splitBreaks:iL,lineBreakRegex:Wf,removeScript:sT,getUrl:oL,evaluate:Lr,getMax:aL,getMin:lL},hL=R(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),fL=R(function(e,t,r){let n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${t}px;`)):(n.set("height",e),n.set("width",t)),n},"calculateSvgSizeAttrs"),aT=R(function(e,t,r,n){const i=fL(t,r,n);hL(e,i)},"configureSvgSize"),dL=R(function(e,t,r,n){const i=t.node().getBBox(),s=i.width,o=i.height;St.info(`SVG bounds: ${s}x${o}`,i);let a=0,l=0;St.info(`Graph bounds: ${a}x${l}`,e),a=s+r*2,l=o+r*2,St.info(`Calculated bounds: ${a}x${l}`),aT(t,l,a,n);const c=`${i.x-r} ${i.y-r} ${i.width+2*r} ${i.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),wp={},pL=R((e,t,r)=>{let n="";return e in wp&&wp[e]?n=wp[e](r):St.warn(`No theme found for ${e}`),` & { font-family: ${r.fontFamily}; font-size: ${r.fontSize}; fill: ${r.textColor} } @keyframes edge-animation-frame { from { stroke-dashoffset: 0; } } @keyframes dash { to { stroke-dashoffset: 0; } } & .edge-animation-slow { stroke-dasharray: 9,5 !important; stroke-dashoffset: 900; animation: dash 50s linear infinite; stroke-linecap: round; } & .edge-animation-fast { stroke-dasharray: 9,5 !important; stroke-dashoffset: 900; animation: dash 20s linear infinite; stroke-linecap: round; } /* Classes common for multiple diagrams */ & .error-icon { fill: ${r.errorBkgColor}; } & .error-text { fill: ${r.errorTextColor}; stroke: ${r.errorTextColor}; } & .edge-thickness-normal { stroke-width: 1px; } & .edge-thickness-thick { stroke-width: 3.5px } & .edge-pattern-solid { stroke-dasharray: 0; } & .edge-thickness-invisible { stroke-width: 0; fill: none; } & .edge-pattern-dashed{ stroke-dasharray: 3; } .edge-pattern-dotted { stroke-dasharray: 2; } & .marker { fill: ${r.lineColor}; stroke: ${r.lineColor}; } & .marker.cross { stroke: ${r.lineColor}; } & svg { font-family: ${r.fontFamily}; font-size: ${r.fontSize}; } & p { margin: 0 } ${n} ${t} `},"getStyles"),mL=R((e,t)=>{t!==void 0&&(wp[e]=t)},"addStylesForDiagram"),gL=pL,lT={};IN(lT,{clear:()=>yL,getAccDescription:()=>xL,getAccTitle:()=>vL,getDiagramTitle:()=>SL,setAccDescription:()=>wL,setAccTitle:()=>bL,setDiagramTitle:()=>_L});var ww="",xw="",_w="",Sw=R(e=>ll(e,Kn()),"sanitizeText"),yL=R(()=>{ww="",_w="",xw=""},"clear"),bL=R(e=>{ww=Sw(e).replace(/^\s+/g,"")},"setAccTitle"),vL=R(()=>ww,"getAccTitle"),wL=R(e=>{_w=Sw(e).replace(/\n\s+/g,` `)},"setAccDescription"),xL=R(()=>_w,"getAccDescription"),_L=R(e=>{xw=Sw(e)},"setDiagramTitle"),SL=R(()=>xw,"getDiagramTitle"),q_=St,EL=yw,He=Kn,tft=eT,eft=Gc,Ew=R(e=>ll(e,He()),"sanitizeText"),CL=dL,AL=R(()=>lT,"getCommonDb"),am={},lm=R((e,t,r)=>{am[e]&&q_.warn(`Diagram with id ${e} already registered. Overwriting.`),am[e]=t,r&&KD(e,r),mL(e,t.styles),t.injectUtils?.(q_,EL,He,Ew,CL,AL(),()=>{})},"registerDiagram"),m1=R(e=>{if(e in am)return am[e];throw new kL(e)},"getDiagram"),kL=class extends Error{static{R(this,"DiagramNotFoundError")}constructor(e){super(`Diagram ${e} not found.`)}};function Cw(e){return typeof e>"u"||e===null}R(Cw,"isNothing");function cT(e){return typeof e=="object"&&e!==null}R(cT,"isObject");function uT(e){return Array.isArray(e)?e:Cw(e)?[]:[e]}R(uT,"toArray");function hT(e,t){var r,n,i,s;if(t)for(s=Object.keys(t),r=0,n=s.length;ra&&(s=" ... ",t=n-a+s.length),r-n>a&&(o=" ...",r=n+a-o.length),{str:s+e.slice(t,r).replace(/\t/g,"→")+o,pos:n-t+s.length}}R(xp,"getLine");function _p(e,t){return Rr.repeat(" ",t-e.length)+e}R(_p,"padStart");function pT(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,n=[0],i=[],s,o=-1;s=r.exec(e.buffer);)i.push(s.index),n.push(s.index+s[0].length),e.position<=s.index&&o<0&&(o=n.length-2);o<0&&(o=n.length-1);var a="",l,c,u=Math.min(e.line+t.linesAfter,i.length).toString().length,h=t.maxLength-(t.indent+u+3);for(l=1;l<=t.linesBefore&&!(o-l<0);l++)c=xp(e.buffer,n[o-l],i[o-l],e.position-(n[o]-n[o-l]),h),a=Rr.repeat(" ",t.indent)+_p((e.line-l+1).toString(),u)+" | "+c.str+` `+a;for(c=xp(e.buffer,n[o],i[o],e.position,h),a+=Rr.repeat(" ",t.indent)+_p((e.line+1).toString(),u)+" | "+c.str+` `,a+=Rr.repeat("-",t.indent+u+3+c.pos)+`^ `,l=1;l<=t.linesAfter&&!(o+l>=i.length);l++)c=xp(e.buffer,n[o+l],i[o+l],e.position-(n[o]-n[o+l]),h),a+=Rr.repeat(" ",t.indent)+_p((e.line+l+1).toString(),u)+" | "+c.str+` `;return a.replace(/\n$/,"")}R(pT,"makeSnippet");var $L=pT,BL=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],RL=["scalar","sequence","mapping"];function mT(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(n){t[String(n)]=r})}),t}R(mT,"compileStyleAliases");function gT(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(BL.indexOf(r)===-1)throw new Gn('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=mT(t.styleAliases||null),RL.indexOf(this.kind)===-1)throw new Gn('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}R(gT,"Type$1");var fn=gT;function g1(e,t){var r=[];return e[t].forEach(function(n){var i=r.length;r.forEach(function(s,o){s.tag===n.tag&&s.kind===n.kind&&s.multi===n.multi&&(i=o)}),r[i]=n}),r}R(g1,"compileList");function yT(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function n(i){i.multi?(e.multi[i.kind].push(i),e.multi.fallback.push(i)):e[i.kind][i.tag]=e.fallback[i.tag]=i}for(R(n,"collectType"),t=0,r=arguments.length;t=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:R(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:R(function(e){return e.toString(10)},"decimal"),hexadecimal:R(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),qL=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function PT(e){return!(e===null||!qL.test(e)||e[e.length-1]==="_")}R(PT,"resolveYamlFloat");function FT(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}R(FT,"constructYamlFloat");var HL=/^[-+]?[0-9]+e/;function OT(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Rr.isNegativeZero(e))return"-0.0";return r=e.toString(10),HL.test(r)?r.replace("e",".e"):r}R(OT,"representYamlFloat");function IT(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Rr.isNegativeZero(e))}R(IT,"isFloat");var GL=new fn("tag:yaml.org,2002:float",{kind:"scalar",resolve:PT,construct:FT,predicate:IT,represent:OT,defaultStyle:"lowercase"}),$T=zL.extend({implicit:[UL,VL,WL,GL]}),YL=$T,BT=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),RT=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function NT(e){return e===null?!1:BT.exec(e)!==null||RT.exec(e)!==null}R(NT,"resolveYamlTimestamp");function LT(e){var t,r,n,i,s,o,a,l=0,c=null,u,h,d;if(t=BT.exec(e),t===null&&(t=RT.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],n=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(r,n,i));if(s=+t[4],o=+t[5],a=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(u=+t[10],h=+(t[11]||0),c=(u*60+h)*6e4,t[9]==="-"&&(c=-c)),d=new Date(Date.UTC(r,n,i,s,o,a,l)),c&&d.setTime(d.getTime()-c),d}R(LT,"constructYamlTimestamp");function MT(e){return e.toISOString()}R(MT,"representYamlTimestamp");var KL=new fn("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:NT,construct:LT,instanceOf:Date,represent:MT});function jT(e){return e==="<<"||e===null}R(jT,"resolveYamlMerge");var XL=new fn("tag:yaml.org,2002:merge",{kind:"scalar",resolve:jT}),kw=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= \r`;function zT(e){if(e===null)return!1;var t,r,n=0,i=e.length,s=kw;for(r=0;r64)){if(t<0)return!1;n+=6}return n%8===0}R(zT,"resolveYamlBinary");function UT(e){var t,r,n=e.replace(/[\r\n=]/g,""),i=n.length,s=kw,o=0,a=[];for(t=0;t>16&255),a.push(o>>8&255),a.push(o&255)),o=o<<6|s.indexOf(n.charAt(t));return r=i%4*6,r===0?(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)):r===18?(a.push(o>>10&255),a.push(o>>2&255)):r===12&&a.push(o>>4&255),new Uint8Array(a)}R(UT,"constructYamlBinary");function VT(e){var t="",r=0,n,i,s=e.length,o=kw;for(n=0;n>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]),r=(r<<8)+e[n];return i=s%3,i===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):i===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):i===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}R(VT,"representYamlBinary");function WT(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}R(WT,"isBinary");var JL=new fn("tag:yaml.org,2002:binary",{kind:"scalar",resolve:zT,construct:UT,predicate:WT,represent:VT}),ZL=Object.prototype.hasOwnProperty,QL=Object.prototype.toString;function qT(e){if(e===null)return!0;var t=[],r,n,i,s,o,a=e;for(r=0,n=a.length;r>10)+55296,(e-65536&1023)+56320)}R(s3,"charFromCodepoint");var o3=new Array(256),a3=new Array(256);for(Sa=0;Sa<256;Sa++)o3[Sa]=b1(Sa)?1:0,a3[Sa]=b1(Sa);var Sa;function l3(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||JT,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}R(l3,"State$1");function Dw(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=$L(r),new Gn(t,r)}R(Dw,"generateError");function ee(e,t){throw Dw(e,t)}R(ee,"throwError");function sf(e,t){e.onWarning&&e.onWarning.call(null,Dw(e,t))}R(sf,"throwWarning");var G_={YAML:R(function(t,r,n){var i,s,o;t.version!==null&&ee(t,"duplication of %YAML directive"),n.length!==1&&ee(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),i===null&&ee(t,"ill-formed argument of the YAML directive"),s=parseInt(i[1],10),o=parseInt(i[2],10),s!==1&&ee(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&sf(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:R(function(t,r,n){var i,s;n.length!==2&&ee(t,"TAG directive accepts exactly two arguments"),i=n[0],s=n[1],t3.test(i)||ee(t,"ill-formed tag handle (first argument) of the TAG directive"),na.call(t.tagMap,i)&&ee(t,'there is a previously declared suffix for "'+i+'" tag handle'),e3.test(s)||ee(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{ee(t,"tag prefix is malformed: "+s)}t.tagMap[i]=s},"handleTagDirective")};function lo(e,t,r,n){var i,s,o,a;if(t1&&(e.result+=Rr.repeat(` `,t-1))}R(e0,"writeFoldedLines");function c3(e,t,r){var n,i,s,o,a,l,c,u,h=e.kind,d=e.result,g;if(g=e.input.charCodeAt(e.position),Sn(g)||Ga(g)||g===35||g===38||g===42||g===33||g===124||g===62||g===39||g===34||g===37||g===64||g===96||(g===63||g===45)&&(i=e.input.charCodeAt(e.position+1),Sn(i)||r&&Ga(i)))return!1;for(e.kind="scalar",e.result="",s=o=e.position,a=!1;g!==0;){if(g===58){if(i=e.input.charCodeAt(e.position+1),Sn(i)||r&&Ga(i))break}else if(g===35){if(n=e.input.charCodeAt(e.position-1),Sn(n))break}else{if(e.position===e.lineStart&&qf(e)||r&&Ga(g))break;if(Qi(g))if(l=e.line,c=e.lineStart,u=e.lineIndent,Cr(e,!1,-1),e.lineIndent>=t){a=!0,g=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=l,e.lineStart=c,e.lineIndent=u;break}}a&&(lo(e,s,o,!1),e0(e,e.line-l),s=o=e.position,a=!1),Zo(g)||(o=e.position+1),g=e.input.charCodeAt(++e.position)}return lo(e,s,o,!1),e.result?!0:(e.kind=h,e.result=d,!1)}R(c3,"readPlainScalar");function u3(e,t){var r,n,i;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(lo(e,n,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)n=e.position,e.position++,i=e.position;else return!0;else Qi(r)?(lo(e,n,i,!0),e0(e,Cr(e,!1,t)),n=i=e.position):e.position===e.lineStart&&qf(e)?ee(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);ee(e,"unexpected end of the stream within a single quoted scalar")}R(u3,"readSingleQuotedScalar");function h3(e,t){var r,n,i,s,o,a;if(a=e.input.charCodeAt(e.position),a!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;(a=e.input.charCodeAt(e.position))!==0;){if(a===34)return lo(e,r,e.position,!0),e.position++,!0;if(a===92){if(lo(e,r,e.position,!0),a=e.input.charCodeAt(++e.position),Qi(a))Cr(e,!1,t);else if(a<256&&o3[a])e.result+=a3[a],e.position++;else if((o=n3(a))>0){for(i=o,s=0;i>0;i--)a=e.input.charCodeAt(++e.position),(o=r3(a))>=0?s=(s<<4)+o:ee(e,"expected hexadecimal character");e.result+=s3(s),e.position++}else ee(e,"unknown escape sequence");r=n=e.position}else Qi(a)?(lo(e,r,n,!0),e0(e,Cr(e,!1,t)),r=n=e.position):e.position===e.lineStart&&qf(e)?ee(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}ee(e,"unexpected end of the stream within a double quoted scalar")}R(h3,"readDoubleQuotedScalar");function f3(e,t){var r=!0,n,i,s,o=e.tag,a,l=e.anchor,c,u,h,d,g,y=Object.create(null),f,p,m,b;if(b=e.input.charCodeAt(e.position),b===91)u=93,g=!1,a=[];else if(b===123)u=125,g=!0,a={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),b=e.input.charCodeAt(++e.position);b!==0;){if(Cr(e,!0,t),b=e.input.charCodeAt(e.position),b===u)return e.position++,e.tag=o,e.anchor=l,e.kind=g?"mapping":"sequence",e.result=a,!0;r?b===44&&ee(e,"expected the node content, but found ','"):ee(e,"missed comma between flow collection entries"),p=f=m=null,h=d=!1,b===63&&(c=e.input.charCodeAt(e.position+1),Sn(c)&&(h=d=!0,e.position++,Cr(e,!0,t))),n=e.line,i=e.lineStart,s=e.position,cl(e,t,um,!1,!0),p=e.tag,f=e.result,Cr(e,!0,t),b=e.input.charCodeAt(e.position),(d||e.line===n)&&b===58&&(h=!0,b=e.input.charCodeAt(++e.position),Cr(e,!0,t),cl(e,t,um,!1,!0),m=e.result),g?Ya(e,a,y,p,f,m,n,i,s):h?a.push(Ya(e,null,y,p,f,m,n,i,s)):a.push(f),Cr(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}ee(e,"unexpected end of the stream within a flow collection")}R(f3,"readFlowCollection");function d3(e,t){var r,n,i=Ey,s=!1,o=!1,a=t,l=0,c=!1,u,h;if(h=e.input.charCodeAt(e.position),h===124)n=!1;else if(h===62)n=!0;else return!1;for(e.kind="scalar",e.result="";h!==0;)if(h=e.input.charCodeAt(++e.position),h===43||h===45)Ey===i?i=h===43?H_:sM:ee(e,"repeat of a chomping mode identifier");else if((u=i3(h))>=0)u===0?ee(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?ee(e,"repeat of an indentation width identifier"):(a=t+u-1,o=!0);else break;if(Zo(h)){do h=e.input.charCodeAt(++e.position);while(Zo(h));if(h===35)do h=e.input.charCodeAt(++e.position);while(!Qi(h)&&h!==0)}for(;h!==0;){for(t0(e),e.lineIndent=0,h=e.input.charCodeAt(e.position);(!o||e.lineIndenta&&(a=e.lineIndent),Qi(h)){l++;continue}if(e.lineIndentt)&&l!==0)ee(e,"bad indentation of a sequence entry");else if(e.lineIndentt)&&(p&&(o=e.line,a=e.lineStart,l=e.position),cl(e,t,hm,!0,i)&&(p?y=e.result:f=e.result),p||(Ya(e,h,d,g,y,f,o,a,l),g=y=f=null),Cr(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&b!==0)ee(e,"bad indentation of a mapping entry");else if(e.lineIndentt?l=1:e.lineIndent===t?l=0:e.lineIndentt?l=1:e.lineIndent===t?l=0:e.lineIndent tag; it should be "scalar", not "'+e.kind+'"'),h=0,d=e.implicitTypes.length;h"),e.result!==null&&y.kind!==e.kind&&ee(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+y.kind+'", not "'+e.kind+'"'),y.resolve(e.result,e.tag)?(e.result=y.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):ee(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||u}R(cl,"composeNode");function b3(e){var t=e.position,r,n,i,s=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(Cr(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(s=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!Sn(o);)o=e.input.charCodeAt(++e.position);for(n=e.input.slice(r,e.position),i=[],n.length<1&&ee(e,"directive name must not be less than one character in length");o!==0;){for(;Zo(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!Qi(o));break}if(Qi(o))break;for(r=e.position;o!==0&&!Sn(o);)o=e.input.charCodeAt(++e.position);i.push(e.input.slice(r,e.position))}o!==0&&t0(e),na.call(G_,n)?G_[n](e,n,i):sf(e,'unknown document directive "'+n+'"')}if(Cr(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Cr(e,!0,-1)):s&&ee(e,"directives end mark is expected"),cl(e,e.lineIndent-1,hm,!1,!0),Cr(e,!0,-1),e.checkLineBreaks&&aM.test(e.input.slice(t,e.position))&&sf(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&qf(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Cr(e,!0,-1));return}if(e.position"u"&&(r=t,t=null);var n=Tw(e,r);if(typeof t!="function")return n;for(var i=0,s=n.length;i=55296&&r<=56319&&t+1=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}R(Sc,"codePointAt");function Fw(e){var t=/^\n* /;return t.test(e)}R(Fw,"needIndentIndicator");var I3=1,C1=2,$3=3,B3=4,hc=5;function R3(e,t,r,n,i,s,o,a){var l,c=0,u=null,h=!1,d=!1,g=n!==-1,y=-1,f=F3(Sc(e,0))&&O3(Sc(e,e.length-1));if(t||o)for(l=0;l=65536?l+=2:l++){if(c=Sc(e,l),!Jc(c))return hc;f=f&&E1(c,u,a),u=c}else{for(l=0;l=65536?l+=2:l++){if(c=Sc(e,l),c===of)h=!0,g&&(d=d||l-y-1>n&&e[y+1]!==" ",y=l);else if(!Jc(c))return hc;f=f&&E1(c,u,a),u=c}d=d||g&&l-y-1>n&&e[y+1]!==" "}return!h&&!d?f&&!o&&!i(e)?I3:s===af?hc:C1:r>9&&Fw(e)?hc:o?s===af?hc:C1:d?B3:$3}R(R3,"chooseScalarStyle");function N3(e,t,r,n,i){e.dump=function(){if(t.length===0)return e.quotingType===af?'""':"''";if(!e.noCompatMode&&(DM.indexOf(t)!==-1||TM.test(t)))return e.quotingType===af?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),a=n||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return P3(e,c)}switch(R(l,"testAmbiguity"),R3(t,a,e.indent,o,l,e.quotingType,e.forceQuotes&&!n,i)){case I3:return t;case C1:return"'"+t.replace(/'/g,"''")+"'";case $3:return"|"+A1(t,e.indent)+k1(_1(t,s));case B3:return">"+A1(t,e.indent)+k1(_1(L3(t,o),s));case hc:return'"'+M3(t)+'"';default:throw new Gn("impossible error: invalid scalar style")}}()}R(N3,"writeScalar");function A1(e,t){var r=Fw(e)?String(t):"",n=e[e.length-1]===` `,i=n&&(e[e.length-2]===` `||e===` `),s=i?"+":n?"":"-";return r+s+` `}R(A1,"blockHeader");function k1(e){return e[e.length-1]===` `?e.slice(0,-1):e}R(k1,"dropEndingNewline");function L3(e,t){for(var r=/(\n+)([^\n]*)/g,n=function(){var c=e.indexOf(` `);return c=c!==-1?c:e.length,r.lastIndex=c,D1(e.slice(0,c),t)}(),i=e[0]===` `||e[0]===" ",s,o;o=r.exec(e);){var a=o[1],l=o[2];s=l[0]===" ",n+=a+(!i&&!s&&l!==""?` `:"")+D1(l,t),i=s}return n}R(L3,"foldString");function D1(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,n,i=0,s,o=0,a=0,l="";n=r.exec(e);)a=n.index,a-i>t&&(s=o>i?o:a,l+=` `+e.slice(i,s),i=s+1),o=a;return l+=` `,e.length-i>t&&o>i?l+=e.slice(i,o)+` `+e.slice(o+1):l+=e.slice(i),l.slice(1)}R(D1,"foldLine");function M3(e){for(var t="",r=0,n,i=0;i=65536?i+=2:i++)r=Sc(e,i),n=dn[r],!n&&Jc(r)?(t+=e[i],r>=65536&&(t+=e[i+1])):t+=n||D3(r);return t}R(M3,"escapeString");function j3(e,t,r){var n="",i=e.tag,s,o,a;for(s=0,o=r.length;s"u"&&$s(e,t,null,!1,!1))&&(n!==""&&(n+=","+(e.condenseFlow?"":" ")),n+=e.dump);e.tag=i,e.dump="["+n+"]"}R(j3,"writeFlowSequence");function T1(e,t,r,n){var i="",s=e.tag,o,a,l;for(o=0,a=r.length;o"u"&&$s(e,t+1,null,!0,!0,!1,!0))&&((!n||i!=="")&&(i+=dm(e,t)),e.dump&&of===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=s,e.dump=i||"[]"}R(T1,"writeBlockSequence");function z3(e,t,r){var n="",i=e.tag,s=Object.keys(r),o,a,l,c,u;for(o=0,a=s.length;o1024&&(u+="? "),u+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),$s(e,t,c,!1,!1)&&(u+=e.dump,n+=u));e.tag=i,e.dump="{"+n+"}"}R(z3,"writeFlowMapping");function U3(e,t,r,n){var i="",s=e.tag,o=Object.keys(r),a,l,c,u,h,d;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new Gn("sortKeys must be a boolean or a function");for(a=0,l=o.length;a1024,h&&(e.dump&&of===e.dump.charCodeAt(0)?d+="?":d+="? "),d+=e.dump,h&&(d+=dm(e,t)),$s(e,t+1,u,!0,h)&&(e.dump&&of===e.dump.charCodeAt(0)?d+=":":d+=": ",d+=e.dump,i+=d));e.tag=s,e.dump=i||"{}"}R(U3,"writeBlockMapping");function P1(e,t,r){var n,i,s,o,a,l;for(i=r?e.explicitTypes:e.implicitTypes,s=0,o=i.length;s tag resolver accepts not "'+l+'" style');e.dump=n}return!0}return!1}R(P1,"detectType");function $s(e,t,r,n,i,s,o){e.tag=null,e.dump=r,P1(e,r,!1)||P1(e,r,!0);var a=w3.call(e.dump),l=n,c;n&&(n=e.flowLevel<0||e.flowLevel>t);var u=a==="[object Object]"||a==="[object Array]",h,d;if(u&&(h=e.duplicates.indexOf(r),d=h!==-1),(e.tag!==null&&e.tag!=="?"||d||e.indent!==2&&t>0)&&(i=!1),d&&e.usedDuplicates[h])e.dump="*ref_"+h;else{if(u&&d&&!e.usedDuplicates[h]&&(e.usedDuplicates[h]=!0),a==="[object Object]")n&&Object.keys(e.dump).length!==0?(U3(e,t,e.dump,i),d&&(e.dump="&ref_"+h+e.dump)):(z3(e,t,e.dump),d&&(e.dump="&ref_"+h+" "+e.dump));else if(a==="[object Array]")n&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?T1(e,t-1,e.dump,i):T1(e,t,e.dump,i),d&&(e.dump="&ref_"+h+e.dump)):(j3(e,t,e.dump),d&&(e.dump="&ref_"+h+" "+e.dump));else if(a==="[object String]")e.tag!=="?"&&N3(e,e.dump,t,s,l);else{if(a==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Gn("unacceptable kind of an object to dump "+a)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}R($s,"writeNode");function V3(e,t){var r=[],n=[],i,s;for(pm(e,r,n),i=0,s=n.length;iArray.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),BM=R(e=>({x:R(function(t,r,n){let i=0;const s=fr(n[0]).x=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(gi,e.arrowTypeEnd)){const{angle:g,deltaX:y}=xh(n[n.length-1],n[n.length-2]);i=gi[e.arrowTypeEnd]*Math.cos(g)*(y>=0?1:-1)}const o=Math.abs(fr(t).x-fr(n[n.length-1]).x),a=Math.abs(fr(t).y-fr(n[n.length-1]).y),l=Math.abs(fr(t).x-fr(n[0]).x),c=Math.abs(fr(t).y-fr(n[0]).y),u=gi[e.arrowTypeStart],h=gi[e.arrowTypeEnd],d=1;if(o0&&a0&&c=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(gi,e.arrowTypeEnd)){const{angle:g,deltaY:y}=xh(n[n.length-1],n[n.length-2]);i=gi[e.arrowTypeEnd]*Math.abs(Math.sin(g))*(y>=0?1:-1)}const o=Math.abs(fr(t).y-fr(n[n.length-1]).y),a=Math.abs(fr(t).x-fr(n[n.length-1]).x),l=Math.abs(fr(t).y-fr(n[0]).y),c=Math.abs(fr(t).x-fr(n[0]).x),u=gi[e.arrowTypeStart],h=gi[e.arrowTypeEnd],d=1;if(o0&&a0&&c{const t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,n=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:n}},"getSubGraphTitleMargins");const RM=Object.freeze({left:0,top:0,width:16,height:16}),mm=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),W3=Object.freeze({...RM,...mm}),NM=Object.freeze({...W3,body:"",hidden:!1}),LM=Object.freeze({width:null,height:null}),MM=Object.freeze({...LM,...mm}),jM=(e,t,r,n="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;n=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const a=i.pop(),l=i.pop(),c={provider:i.length>0?i[0]:n,prefix:l,name:a};return Cy(c)?c:null}const s=i[0],o=s.split("-");if(o.length>1){const a={provider:n,prefix:o.shift(),name:o.join("-")};return Cy(a)?a:null}if(r&&n===""){const a={provider:n,prefix:"",name:s};return Cy(a,r)?a:null}return null},Cy=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function zM(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const n=((e.rotate||0)+(t.rotate||0))%4;return n&&(r.rotate=n),r}function Y_(e,t){const r=zM(e,t);for(const n in NM)n in mm?n in e&&!(n in r)&&(r[n]=mm[n]):n in t?r[n]=t[n]:n in e&&(r[n]=e[n]);return r}function UM(e,t){const r=e.icons,n=e.aliases||Object.create(null),i=Object.create(null);function s(o){if(r[o])return i[o]=[];if(!(o in i)){i[o]=null;const a=n[o]&&n[o].parent,l=a&&s(a);l&&(i[o]=[a].concat(l))}return i[o]}return(t||Object.keys(r).concat(Object.keys(n))).forEach(s),i}function K_(e,t,r){const n=e.icons,i=e.aliases||Object.create(null);let s={};function o(a){s=Y_(n[a]||i[a],s)}return o(t),r.forEach(o),Y_(e,s)}function VM(e,t){if(e.icons[t])return K_(e,t,[]);const r=UM(e,[t])[t];return r?K_(e,t,r):null}const WM=/(-?[0-9.]*[0-9]+[0-9.]*)/g,qM=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function X_(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const n=e.split(WM);if(n===null||!n.length)return e;const i=[];let s=n.shift(),o=qM.test(s);for(;;){if(o){const a=parseFloat(s);isNaN(a)?i.push(s):i.push(Math.ceil(a*t*r)/r)}else i.push(s);if(s=n.shift(),s===void 0)return i.join("");o=!o}}function HM(e,t="defs"){let r="";const n=e.indexOf("<"+t);for(;n>=0;){const i=e.indexOf(">",n),s=e.indexOf("",s);if(o===-1)break;r+=e.slice(i+1,s).trim(),e=e.slice(0,n).trim()+e.slice(o+1)}return{defs:r,content:e}}function GM(e,t){return e?""+e+""+t:t}function YM(e,t,r){const n=HM(e);return GM(n.defs,t+n.content+r)}const KM=e=>e==="unset"||e==="undefined"||e==="none";function XM(e,t){const r={...W3,...e},n={...MM,...t},i={left:r.left,top:r.top,width:r.width,height:r.height};let s=r.body;[r,n].forEach(f=>{const p=[],m=f.hFlip,b=f.vFlip;let w=f.rotate;m?b?w+=2:(p.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),p.push("scale(-1 1)"),i.top=i.left=0):b&&(p.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),p.push("scale(1 -1)"),i.top=i.left=0);let x;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:x=i.height/2+i.top,p.unshift("rotate(90 "+x.toString()+" "+x.toString()+")");break;case 2:p.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:x=i.width/2+i.left,p.unshift("rotate(-90 "+x.toString()+" "+x.toString()+")");break}w%2===1&&(i.left!==i.top&&(x=i.left,i.left=i.top,i.top=x),i.width!==i.height&&(x=i.width,i.width=i.height,i.height=x)),p.length&&(s=YM(s,'',""))});const o=n.width,a=n.height,l=i.width,c=i.height;let u,h;o===null?(h=a===null?"1em":a==="auto"?c:a,u=X_(h,l/c)):(u=o==="auto"?l:o,h=a===null?X_(u,c/l):a==="auto"?c:a);const d={},g=(f,p)=>{KM(p)||(d[f]=p.toString())};g("width",u),g("height",h);const y=[i.left,i.top,l,c];return d.viewBox=y.join(" "),{attributes:d,viewBox:y,body:s}}const JM=/\sid="(\S+)"/g,ZM="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let QM=0;function t9(e,t=ZM){const r=[];let n;for(;n=JM.exec(e);)r.push(n[1]);if(!r.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(s=>{const o=typeof t=="function"?t(s):t+(QM++).toString(),a=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+o+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function e9(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in t)r+=" "+n+'="'+t[n]+'"';return'"+e+""}var r9={body:'?',height:80,width:80},F1=new Map,q3=new Map,n9=R(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(St.debug("Registering icon pack:",t.name),"loader"in t)q3.set(t.name,t.loader);else if("icons"in t)F1.set(t.name,t.icons);else throw St.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),i9=R(async(e,t)=>{const r=jM(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const n=r.prefix||t;if(!n)throw new Error(`Icon name must contain a prefix: ${e}`);let i=F1.get(n);if(!i){const o=q3.get(n);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{i={...await o(),prefix:n},F1.set(n,i)}catch(a){throw St.error(a),new Error(`Failed to load icon set: ${r.prefix}`)}}const s=VM(i,r.name);if(!s)throw new Error(`Icon not found: ${e}`);return s},"getRegisteredIconData"),r0=R(async(e,t)=>{let r;try{r=await i9(e,t?.fallbackPrefix)}catch(s){St.error(s),r=r9}const n=XM(r,t);return e9(t9(n.body),n.attributes)},"getIconSVG"),Wu={},$r={},J_;function s9(){return J_||(J_=1,Object.defineProperty($r,"__esModule",{value:!0}),$r.BLANK_URL=$r.relativeFirstCharacters=$r.whitespaceEscapeCharsRegex=$r.urlSchemeRegex=$r.ctrlCharactersRegex=$r.htmlCtrlEntityRegex=$r.htmlEntitiesRegex=$r.invalidProtocolRegex=void 0,$r.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,$r.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,$r.htmlCtrlEntityRegex=/&(newline|tab);/gi,$r.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,$r.urlSchemeRegex=/^.+(:|:)/gim,$r.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,$r.relativeFirstCharacters=[".","/"],$r.BLANK_URL="about:blank"),$r}var Z_;function o9(){if(Z_)return Wu;Z_=1,Object.defineProperty(Wu,"__esModule",{value:!0}),Wu.sanitizeUrl=void 0;var e=s9();function t(o){return e.relativeFirstCharacters.indexOf(o[0])>-1}function r(o){var a=o.replace(e.ctrlCharactersRegex,"");return a.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function n(o){return URL.canParse(o)}function i(o){try{return decodeURIComponent(o)}catch{return o}}function s(o){if(!o)return e.BLANK_URL;var a,l=i(o.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=i(l),a=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(a&&a.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var u=c.trimStart(),h=u.match(e.urlSchemeRegex);if(!h)return c;var d=h[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(d))return e.BLANK_URL;var g=u.replace(/\\/g,"/");if(d==="mailto:"||d.includes("://"))return g;if(d==="http:"||d==="https:"){if(!n(g))return e.BLANK_URL;var y=new URL(g);return y.protocol=y.protocol.toLowerCase(),y.hostname=y.hostname.toLowerCase(),y.toString()}return g}return Wu.sanitizeUrl=s,Wu}var a9=o9(),l9={value:()=>{}};function H3(){for(var e=0,t=arguments.length,r={},n;e=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}Sp.prototype=H3.prototype={constructor:Sp,on:function(e,t){var r=this._,n=c9(e+"",r),i,s=-1,o=n.length;if(arguments.length<2){for(;++s0)for(var r=new Array(i),n=0,i,s;n=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),tS.hasOwnProperty(t)?{space:tS[t],local:e}:e}function h9(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===O1&&t.documentElement.namespaceURI===O1?t.createElement(e):t.createElementNS(r,e)}}function f9(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function G3(e){var t=n0(e);return(t.local?f9:h9)(t)}function d9(){}function Iw(e){return e==null?d9:function(){return this.querySelector(e)}}function p9(e){typeof e!="function"&&(e=Iw(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i=w&&(w=b+1);!(E=p[w])&&++w=0;)(o=n[i])&&(s&&o.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(o,s),s=o);return this}function M9(e){e||(e=j9);function t(h,d){return h&&d?e(h.__data__,d.__data__):!h-!d}for(var r=this._groups,n=r.length,i=new Array(n),s=0;st?1:e>=t?0:NaN}function z9(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function U9(){return Array.from(this)}function V9(){for(var e=this._groups,t=0,r=e.length;t1?this.each((t==null?t7:typeof t=="function"?r7:e7)(e,t,r??"")):Zc(this.node(),e)}function Zc(e,t){return e.style.getPropertyValue(t)||Z3(e).getComputedStyle(e,null).getPropertyValue(t)}function i7(e){return function(){delete this[e]}}function s7(e,t){return function(){this[e]=t}}function o7(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function a7(e,t){return arguments.length>1?this.each((t==null?i7:typeof t=="function"?o7:s7)(e,t)):this.node()[e]}function Q3(e){return e.trim().split(/^|\s+/)}function $w(e){return e.classList||new t8(e)}function t8(e){this._node=e,this._names=Q3(e.getAttribute("class")||"")}t8.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function e8(e,t){for(var r=$w(e),n=-1,i=t.length;++n=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function B7(e){return function(){var t=this.__on;if(t){for(var r=0,n=-1,i=t.length,s;r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?_d(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?_d(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=W7.exec(e))?new Yn(t[1],t[2],t[3],1):(t=q7.exec(e))?new Yn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=H7.exec(e))?_d(t[1],t[2],t[3],t[4]):(t=G7.exec(e))?_d(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Y7.exec(e))?aS(t[1],t[2]/100,t[3]/100,1):(t=K7.exec(e))?aS(t[1],t[2]/100,t[3]/100,t[4]):eS.hasOwnProperty(e)?iS(eS[e]):e==="transparent"?new Yn(NaN,NaN,NaN,0):null}function iS(e){return new Yn(e>>16&255,e>>8&255,e&255,1)}function _d(e,t,r,n){return n<=0&&(e=t=r=NaN),new Yn(e,t,r,n)}function Z7(e){return e instanceof Gf||(e=hf(e)),e?(e=e.rgb(),new Yn(e.r,e.g,e.b,e.opacity)):new Yn}function I1(e,t,r,n){return arguments.length===1?Z7(e):new Yn(e,t,r,n??1)}function Yn(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Bw(Yn,I1,s8(Gf,{brighter(e){return e=e==null?ym:Math.pow(ym,e),new Yn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?cf:Math.pow(cf,e),new Yn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Yn(tl(this.r),tl(this.g),tl(this.b),bm(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:sS,formatHex:sS,formatHex8:Q7,formatRgb:oS,toString:oS}));function sS(){return`#${Ka(this.r)}${Ka(this.g)}${Ka(this.b)}`}function Q7(){return`#${Ka(this.r)}${Ka(this.g)}${Ka(this.b)}${Ka((isNaN(this.opacity)?1:this.opacity)*255)}`}function oS(){const e=bm(this.opacity);return`${e===1?"rgb(":"rgba("}${tl(this.r)}, ${tl(this.g)}, ${tl(this.b)}${e===1?")":`, ${e})`}`}function bm(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function tl(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ka(e){return e=tl(e),(e<16?"0":"")+e.toString(16)}function aS(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Ji(e,t,r,n)}function o8(e){if(e instanceof Ji)return new Ji(e.h,e.s,e.l,e.opacity);if(e instanceof Gf||(e=hf(e)),!e)return new Ji;if(e instanceof Ji)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),s=Math.max(t,r,n),o=NaN,a=s-i,l=(s+i)/2;return a?(t===s?o=(r-n)/a+(r0&&l<1?0:o,new Ji(o,a,l,e.opacity)}function tj(e,t,r,n){return arguments.length===1?o8(e):new Ji(e,t,r,n??1)}function Ji(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Bw(Ji,tj,s8(Gf,{brighter(e){return e=e==null?ym:Math.pow(ym,e),new Ji(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?cf:Math.pow(cf,e),new Ji(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Yn(Ay(e>=240?e-240:e+120,i,n),Ay(e,i,n),Ay(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Ji(lS(this.h),Sd(this.s),Sd(this.l),bm(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=bm(this.opacity);return`${e===1?"hsl(":"hsla("}${lS(this.h)}, ${Sd(this.s)*100}%, ${Sd(this.l)*100}%${e===1?")":`, ${e})`}`}}));function lS(e){return e=(e||0)%360,e<0?e+360:e}function Sd(e){return Math.max(0,Math.min(1,e||0))}function Ay(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Rw=e=>()=>e;function a8(e,t){return function(r){return e+r*t}}function ej(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function rft(e,t){var r=t-e;return r?a8(e,r>180||r<-180?r-360*Math.round(r/360):r):Rw(isNaN(e)?t:e)}function rj(e){return(e=+e)==1?l8:function(t,r){return r-t?ej(t,r,e):Rw(isNaN(t)?r:t)}}function l8(e,t){var r=t-e;return r?a8(e,r):Rw(isNaN(e)?t:e)}const cS=function e(t){var r=rj(t);function n(i,s){var o=r((i=I1(i)).r,(s=I1(s)).r),a=r(i.g,s.g),l=r(i.b,s.b),c=l8(i.opacity,s.opacity);return function(u){return i.r=o(u),i.g=a(u),i.b=l(u),i.opacity=c(u),i+""}}return n.gamma=e,n}(1);function qo(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var $1=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ky=new RegExp($1.source,"g");function nj(e){return function(){return e}}function ij(e){return function(t){return e(t)+""}}function sj(e,t){var r=$1.lastIndex=ky.lastIndex=0,n,i,s,o=-1,a=[],l=[];for(e=e+"",t=t+"";(n=$1.exec(e))&&(i=ky.exec(t));)(s=i.index)>r&&(s=t.slice(r,s),a[o]?a[o]+=s:a[++o]=s),(n=n[0])===(i=i[0])?a[o]?a[o]+=i:a[++o]=i:(a[++o]=null,l.push({i:o,x:qo(n,i)})),r=ky.lastIndex;return r180?u+=360:u-c>180&&(c+=360),d.push({i:h.push(i(h)+"rotate(",null,n)-2,x:qo(c,u)})):u&&h.push(i(h)+"rotate("+u+n)}function a(c,u,h,d){c!==u?d.push({i:h.push(i(h)+"skewX(",null,n)-2,x:qo(c,u)}):u&&h.push(i(h)+"skewX("+u+n)}function l(c,u,h,d,g,y){if(c!==h||u!==d){var f=g.push(i(g)+"scale(",null,",",null,")");y.push({i:f-4,x:qo(c,h)},{i:f-2,x:qo(u,d)})}else(h!==1||d!==1)&&g.push(i(g)+"scale("+h+","+d+")")}return function(c,u){var h=[],d=[];return c=e(c),u=e(u),s(c.translateX,c.translateY,u.translateX,u.translateY,h,d),o(c.rotate,u.rotate,h,d),a(c.skewX,u.skewX,h,d),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,h,d),c=u=null,function(g){for(var y=-1,f=d.length,p;++y=0&&e._call.call(void 0,t),e=e._next;--Qc}function hS(){ul=(wm=ff.now())+i0,Qc=_h=0;try{hj()}finally{Qc=0,dj(),ul=0}}function fj(){var e=ff.now(),t=e-wm;t>h8&&(i0-=t,wm=e)}function dj(){for(var e,t=vm,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:vm=r);Sh=e,R1(n)}function R1(e){if(!Qc){_h&&(_h=clearTimeout(_h));var t=e-ul;t>24?(e<1/0&&(_h=setTimeout(hS,e-ff.now()-i0)),qu&&(qu=clearInterval(qu))):(qu||(wm=ff.now(),qu=setInterval(fj,h8)),Qc=1,f8(hS))}}function fS(e,t,r){var n=new xm;return t=t==null?0:+t,n.restart(i=>{n.stop(),e(i+t)},t,r),n}var pj=H3("start","end","cancel","interrupt"),mj=[],p8=0,dS=1,N1=2,Ep=3,pS=4,L1=5,Cp=6;function s0(e,t,r,n,i,s){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;gj(e,r,{name:t,index:n,group:i,on:pj,tween:mj,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:p8})}function Lw(e,t){var r=ls(e,t);if(r.state>p8)throw new Error("too late; already scheduled");return r}function Ls(e,t){var r=ls(e,t);if(r.state>Ep)throw new Error("too late; already running");return r}function ls(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function gj(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=d8(s,0,r.time);function s(c){r.state=dS,r.timer.restart(o,r.delay,r.time),r.delay<=c&&o(c-r.delay)}function o(c){var u,h,d,g;if(r.state!==dS)return l();for(u in n)if(g=n[u],g.name===r.name){if(g.state===Ep)return fS(o);g.state===pS?(g.state=Cp,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete n[u]):+uN1&&n.state=0&&(t=t.slice(0,r)),!t||t==="start"})}function Gj(e,t,r){var n,i,s=Hj(t)?Lw:Ls;return function(){var o=s(this,e),a=o.on;a!==n&&(i=(n=a).copy()).on(t,r),o.on=i}}function Yj(e,t){var r=this._id;return arguments.length<2?ls(this.node(),r).on.on(e):this.each(Gj(r,e,t))}function Kj(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function Xj(){return this.on("end.remove",Kj(this._id))}function Jj(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Iw(e));for(var n=this._groups,i=n.length,s=new Array(i),o=0;o=0))throw new Error(`invalid digits: ${e}`);if(t>15)return b8;const r=10**t;return function(n){this._+=n[0];for(let i=1,s=n.length;iIa)if(!(Math.abs(h*l-c*u)>Ia)||!s)this._append`L${this._x1=t},${this._y1=r}`;else{let g=n-o,y=i-a,f=l*l+c*c,p=g*g+y*y,m=Math.sqrt(f),b=Math.sqrt(d),w=s*Math.tan((M1-Math.acos((f+d-p)/(2*m*b)))/2),x=w/b,E=w/m;Math.abs(x-1)>Ia&&this._append`L${t+x*u},${r+x*h}`,this._append`A${s},${s},0,0,${+(h*g>u*y)},${this._x1=t+E*l},${this._y1=r+E*c}`}}arc(t,r,n,i,s,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let a=n*Math.cos(i),l=n*Math.sin(i),c=t+a,u=r+l,h=1^o,d=o?i-s:s-i;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>Ia||Math.abs(this._y1-u)>Ia)&&this._append`L${c},${u}`,n&&(d<0&&(d=d%j1+j1),d>_z?this._append`A${n},${n},0,1,${h},${t-a},${r-l}A${n},${n},0,1,${h},${this._x1=c},${this._y1=u}`:d>Ia&&this._append`A${n},${n},0,${+(d>=M1)},${h},${this._x1=t+n*Math.cos(s)},${this._y1=r+n*Math.sin(s)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function Gl(e){return function(){return e}}const nft=Math.abs,ift=Math.atan2,sft=Math.cos,oft=Math.max,aft=Math.min,lft=Math.sin,cft=Math.sqrt,mS=1e-12,jw=Math.PI,gS=jw/2,uft=2*jw;function hft(e){return e>1?0:e<-1?jw:Math.acos(e)}function fft(e){return e>=1?gS:e<=-1?-gS:Math.asin(e)}function Cz(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new Ez(t)}function Az(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function v8(e){this._context=e}v8.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function _m(e){return new v8(e)}function kz(e){return e[0]}function Dz(e){return e[1]}function Tz(e,t){var r=Gl(!0),n=null,i=_m,s=null,o=Cz(a);e=typeof e=="function"?e:e===void 0?kz:Gl(e),t=typeof t=="function"?t:t===void 0?Dz:Gl(t);function a(l){var c,u=(l=Az(l)).length,h,d=!1,g;for(n==null&&(s=i(g=o())),c=0;c<=u;++c)!(c0)for(var n=e[0],i=t[0],s=e[r]-n,o=t[r]-i,a=-1,l;++a<=r;)l=a/r,this._basis.point(this._beta*e[a]+(1-this._beta)*(n+l*s),this._beta*t[a]+(1-this._beta)*(i+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const Oz=function e(t){function r(n){return t===1?new o0(n):new C8(n,t)}return r.beta=function(n){return e(+n)},r}(.85);function Em(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function zw(e,t){this._context=e,this._k=(1-t)/6}zw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Em(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Em(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const A8=function e(t){function r(n){return new zw(n,t)}return r.tension=function(n){return e(+n)},r}(0);function Uw(e,t){this._context=e,this._k=(1-t)/6}Uw.prototype={areaStart:ia,areaEnd:ia,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Em(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Iz=function e(t){function r(n){return new Uw(n,t)}return r.tension=function(n){return e(+n)},r}(0);function Vw(e,t){this._context=e,this._k=(1-t)/6}Vw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Em(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const $z=function e(t){function r(n){return new Vw(n,t)}return r.tension=function(n){return e(+n)},r}(0);function Ww(e,t,r){var n=e._x1,i=e._y1,s=e._x2,o=e._y2;if(e._l01_a>mS){var a=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);n=(n*a-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*a-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>mS){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);s=(s*c+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*c+e._y1*e._l23_2a-r*e._l12_2a)/u}e._context.bezierCurveTo(n,i,s,o,e._x2,e._y2)}function k8(e,t){this._context=e,this._alpha=t}k8.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Ww(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const D8=function e(t){function r(n){return t?new k8(n,t):new zw(n,0)}return r.alpha=function(n){return e(+n)},r}(.5);function T8(e,t){this._context=e,this._alpha=t}T8.prototype={areaStart:ia,areaEnd:ia,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Ww(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Bz=function e(t){function r(n){return t?new T8(n,t):new Uw(n,0)}return r.alpha=function(n){return e(+n)},r}(.5);function P8(e,t){this._context=e,this._alpha=t}P8.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ww(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Rz=function e(t){function r(n){return t?new P8(n,t):new Vw(n,0)}return r.alpha=function(n){return e(+n)},r}(.5);function F8(e){this._context=e}F8.prototype={areaStart:ia,areaEnd:ia,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Nz(e){return new F8(e)}function yS(e){return e<0?-1:1}function bS(e,t,r){var n=e._x1-e._x0,i=t-e._x1,s=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),a=(s*i+o*n)/(n+i);return(yS(s)+yS(o))*Math.min(Math.abs(s),Math.abs(o),.5*Math.abs(a))||0}function vS(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Dy(e,t,r){var n=e._x0,i=e._y0,s=e._x1,o=e._y1,a=(s-n)/3;e._context.bezierCurveTo(n+a,i+a*t,s-a,o-a*r,s,o)}function Cm(e){this._context=e}Cm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Dy(this,this._t0,vS(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Dy(this,vS(this,r=bS(this,e,t)),r);break;default:Dy(this,this._t0,r=bS(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function O8(e){this._context=new I8(e)}(O8.prototype=Object.create(Cm.prototype)).point=function(e,t){Cm.prototype.point.call(this,t,e)};function I8(e){this._context=e}I8.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,s){this._context.bezierCurveTo(t,e,n,r,s,i)}};function $8(e){return new Cm(e)}function B8(e){return new O8(e)}function R8(e){this._context=e}R8.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=wS(e),i=wS(t),s=0,o=1;o=0;--t)i[t]=(o[t]-i[t+1])/s[t];for(s[r-1]=(e[r]+i[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function L8(e){return new a0(e,.5)}function M8(e){return new a0(e,0)}function j8(e){return new a0(e,1)}function Eh(e,t,r){this.k=e,this.x=t,this.y=r}Eh.prototype={constructor:Eh,scale:function(e){return e===1?this:new Eh(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Eh(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};Eh.prototype;var z8=typeof global=="object"&&global&&global.Object===Object&&global,Lz=typeof self=="object"&&self&&self.Object===Object&&self,Ms=z8||Lz||Function("return this")(),Am=Ms.Symbol,U8=Object.prototype,Mz=U8.hasOwnProperty,jz=U8.toString,Hu=Am?Am.toStringTag:void 0;function zz(e){var t=Mz.call(e,Hu),r=e[Hu];try{e[Hu]=void 0;var n=!0}catch{}var i=jz.call(e);return n&&(t?e[Hu]=r:delete e[Hu]),i}var Uz=Object.prototype,Vz=Uz.toString;function Wz(e){return Vz.call(e)}var qz="[object Null]",Hz="[object Undefined]",xS=Am?Am.toStringTag:void 0;function yu(e){return e==null?e===void 0?Hz:qz:xS&&xS in Object(e)?zz(e):Wz(e)}function kl(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Gz="[object AsyncFunction]",Yz="[object Function]",Kz="[object GeneratorFunction]",Xz="[object Proxy]";function qw(e){if(!kl(e))return!1;var t=yu(e);return t==Yz||t==Kz||t==Gz||t==Xz}var Ty=Ms["__core-js_shared__"],_S=function(){var e=/[^.]+$/.exec(Ty&&Ty.keys&&Ty.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Jz(e){return!!_S&&_S in e}var Zz=Function.prototype,Qz=Zz.toString;function Dl(e){if(e!=null){try{return Qz.call(e)}catch{}try{return e+""}catch{}}return""}var tU=/[\\^$.*+?()[\]{}|]/g,eU=/^\[object .+?Constructor\]$/,rU=Function.prototype,nU=Object.prototype,iU=rU.toString,sU=nU.hasOwnProperty,oU=RegExp("^"+iU.call(sU).replace(tU,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function aU(e){if(!kl(e)||Jz(e))return!1;var t=qw(e)?oU:eU;return t.test(Dl(e))}function lU(e,t){return e?.[t]}function Tl(e,t){var r=lU(e,t);return aU(r)?r:void 0}var df=Tl(Object,"create");function cU(){this.__data__=df?df(null):{},this.size=0}function uU(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var hU="__lodash_hash_undefined__",fU=Object.prototype,dU=fU.hasOwnProperty;function pU(e){var t=this.__data__;if(df){var r=t[e];return r===hU?void 0:r}return dU.call(t,e)?t[e]:void 0}var mU=Object.prototype,gU=mU.hasOwnProperty;function yU(e){var t=this.__data__;return df?t[e]!==void 0:gU.call(t,e)}var bU="__lodash_hash_undefined__";function vU(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=df&&t===void 0?bU:t,this}function hl(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t-1}function AU(e,t){var r=this.__data__,n=c0(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function ko(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=QU}function f0(e){return e!=null&&G8(e.length)&&!qw(e)}function tV(e){return Kf(e)&&f0(e)}function eV(){return!1}var Y8=typeof exports=="object"&&exports&&!exports.nodeType&&exports,TS=Y8&&typeof module=="object"&&module&&!module.nodeType&&module,rV=TS&&TS.exports===Y8,PS=rV?Ms.Buffer:void 0,nV=PS?PS.isBuffer:void 0,Gw=nV||eV,iV="[object Object]",sV=Function.prototype,oV=Object.prototype,K8=sV.toString,aV=oV.hasOwnProperty,lV=K8.call(Object);function cV(e){if(!Kf(e)||yu(e)!=iV)return!1;var t=q8(e);if(t===null)return!0;var r=aV.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&K8.call(r)==lV}var uV="[object Arguments]",hV="[object Array]",fV="[object Boolean]",dV="[object Date]",pV="[object Error]",mV="[object Function]",gV="[object Map]",yV="[object Number]",bV="[object Object]",vV="[object RegExp]",wV="[object Set]",xV="[object String]",_V="[object WeakMap]",SV="[object ArrayBuffer]",EV="[object DataView]",CV="[object Float32Array]",AV="[object Float64Array]",kV="[object Int8Array]",DV="[object Int16Array]",TV="[object Int32Array]",PV="[object Uint8Array]",FV="[object Uint8ClampedArray]",OV="[object Uint16Array]",IV="[object Uint32Array]",sr={};sr[CV]=sr[AV]=sr[kV]=sr[DV]=sr[TV]=sr[PV]=sr[FV]=sr[OV]=sr[IV]=!0;sr[uV]=sr[hV]=sr[SV]=sr[fV]=sr[EV]=sr[dV]=sr[pV]=sr[mV]=sr[gV]=sr[yV]=sr[bV]=sr[vV]=sr[wV]=sr[xV]=sr[_V]=!1;function $V(e){return Kf(e)&&G8(e.length)&&!!sr[yu(e)]}function BV(e){return function(t){return e(t)}}var X8=typeof exports=="object"&&exports&&!exports.nodeType&&exports,jh=X8&&typeof module=="object"&&module&&!module.nodeType&&module,RV=jh&&jh.exports===X8,Py=RV&&z8.process,FS=function(){try{var e=jh&&jh.require&&jh.require("util").types;return e||Py&&Py.binding&&Py.binding("util")}catch{}}(),OS=FS&&FS.isTypedArray,Yw=OS?BV(OS):$V;function U1(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var NV=Object.prototype,LV=NV.hasOwnProperty;function MV(e,t,r){var n=e[t];(!(LV.call(e,t)&&l0(n,r))||r===void 0&&!(t in e))&&Hw(e,t,r)}function jV(e,t,r,n){var i=!r;r||(r={});for(var s=-1,o=t.length;++s-1&&e%1==0&&e0){if(++t>=nW)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var aW=oW(rW);function lW(e,t){return aW(tW(e,t,t5),e+"")}function cW(e,t,r){if(!kl(r))return!1;var n=typeof t;return(n=="number"?f0(r)&&J8(t,r.length):n=="string"&&t in r)?l0(r[t],e):!1}function uW(e){return lW(function(t,r){var n=-1,i=r.length,s=i>1?r[i-1]:void 0,o=i>2?r[2]:void 0;for(s=e.length>3&&typeof s=="function"?(i--,s):void 0,o&&cW(r[0],r[1],o)&&(s=i<3?void 0:s,i=1),t=Object(t);++na.args);sm(o),n=sn(n,[...o])}else n=r.args;if(!n)return;let i=bw(e,t);const s="config";return n[s]!==void 0&&(i==="flowchart-v2"&&(i="flowchart"),n[i]=n[s],delete n[s]),n},"detectInit"),e5=R(function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${pW.source})(?=[}][%]{2}).* `,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),St.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let n;const i=[];for(;(n=Lh.exec(e))!==null;)if(n.index===Lh.lastIndex&&Lh.lastIndex++,n&&!t||t&&n[1]?.match(t)||t&&n[2]?.match(t)){const s=n[1]?n[1]:n[2],o=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;i.push({type:s,args:o})}return i.length===0?{type:e,args:null}:i.length===1?i[0]:i}catch(r){return St.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),gW=R(function(e){return e.replace(Lh,"")},"removeDirectives"),yW=R(function(e,t){for(const[r,n]of t.entries())if(n.match(e))return r;return-1},"isSubstringInArray");function Kw(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return dW[r]??t}R(Kw,"interpolateToCurve");function r5(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?a9.sanitizeUrl(r):r}R(r5,"formatUrl");var bW=R((e,...t)=>{const r=e.split("."),n=r.length-1,i=r[n];let s=window;for(let o=0;o{r+=Xw(i,t),t=i});const n=r/2;return Jw(e,n)}R(n5,"traverseEdge");function i5(e){return e.length===1?e[0]:n5(e)}R(i5,"calcLabelPosition");var $S=R((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Jw=R((e,t)=>{let r,n=t;for(const i of e){if(r){const s=Xw(i,r);if(s===0)return r;if(s=1)return{x:i.x,y:i.y};if(o>0&&o<1)return{x:$S((1-o)*r.x+o*i.x,5),y:$S((1-o)*r.y+o*i.y,5)}}}r=i}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),vW=R((e,t,r)=>{St.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const i=Jw(t,25),s=e?10:5,o=Math.atan2(t[0].y-i.y,t[0].x-i.x),a={x:0,y:0};return a.x=Math.sin(o)*s+(t[0].x+i.x)/2,a.y=-Math.cos(o)*s+(t[0].y+i.y)/2,a},"calcCardinalityPosition");function s5(e,t,r){const n=structuredClone(r);St.info("our points",n),t!=="start_left"&&t!=="start_right"&&n.reverse();const i=25+e,s=Jw(n,i),o=10+e*.5,a=Math.atan2(n[0].y-s.y,n[0].x-s.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(a+Math.PI)*o+(n[0].x+s.x)/2,l.y=-Math.cos(a+Math.PI)*o+(n[0].y+s.y)/2):t==="end_right"?(l.x=Math.sin(a-Math.PI)*o+(n[0].x+s.x)/2-5,l.y=-Math.cos(a-Math.PI)*o+(n[0].y+s.y)/2-5):t==="end_left"?(l.x=Math.sin(a)*o+(n[0].x+s.x)/2-5,l.y=-Math.cos(a)*o+(n[0].y+s.y)/2-5):(l.x=Math.sin(a)*o+(n[0].x+s.x)/2,l.y=-Math.cos(a)*o+(n[0].y+s.y)/2),l}R(s5,"calcTerminalLabelPosition");function o5(e){let t="",r="";for(const n of e)n!==void 0&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":t=t+n+";");return{style:t,labelStyle:r}}R(o5,"getStylesFromArray");var BS=0,wW=R(()=>(BS++,"id-"+Math.random().toString(36).substr(2,12)+"-"+BS),"generateId");function a5(e){let t="";const r="0123456789abcdef",n=r.length;for(let i=0;ia5(e.length),"random"),_W=R(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),SW=R(function(e,t){const r=t.text.replace(gu.lineBreakRegex," "),[,n]=d0(t.fontSize),i=e.append("text");i.attr("x",t.x),i.attr("y",t.y),i.style("text-anchor",t.anchor),i.style("font-family",t.fontFamily),i.style("font-size",n),i.style("font-weight",t.fontWeight),i.attr("fill",t.fill),t.class!==void 0&&i.attr("class",t.class);const s=i.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.attr("fill",t.fill),s.text(r),i},"drawSimpleText"),EW=Yf((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},r),gu.lineBreakRegex.test(e)))return e;const n=e.split(" ").filter(Boolean),i=[];let s="";return n.forEach((o,a)=>{const l=go(`${o} `,r),c=go(s,r);if(l>t){const{hyphenatedStrings:d,remainingWord:g}=CW(o,t,"-",r);i.push(s,...d),s=g}else c+l>=t?(i.push(s),s=o):s=[s,o].filter(Boolean).join(" ");a+1===n.length&&i.push(s)}),i.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),CW=Yf((e,t,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);const i=[...e],s=[];let o="";return i.forEach((a,l)=>{const c=`${o}${a}`;if(go(c,n)>=t){const h=l+1,d=i.length===h,g=`${c}${r}`;s.push(d?c:g),o=""}else o=c}),{hyphenatedStrings:s,remainingWord:o}},(e,t,r="-",n)=>`${e}${t}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`);function l5(e,t){return Zw(e,t).height}R(l5,"calculateTextHeight");function go(e,t){return Zw(e,t).width}R(go,"calculateTextWidth");var Zw=Yf((e,t)=>{const{fontSize:r=12,fontFamily:n="Arial",fontWeight:i=400}=t;if(!e)return{width:0,height:0};const[,s]=d0(r),o=["sans-serif",n],a=e.split(gu.lineBreakRegex),l=[],c=Re("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const u=c.append("svg");for(const d of o){let g=0;const y={width:0,height:0,lineHeight:0};for(const f of a){const p=_W();p.text=f||fW;const m=SW(u,p).style("font-size",s).style("font-weight",i).style("font-family",d),b=(m._groups||m)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");y.width=Math.round(Math.max(y.width,b.width)),g=Math.round(b.height),y.height+=g,y.lineHeight=Math.round(Math.max(y.lineHeight,g))}l.push(y)}u.remove();const h=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[h]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),AW=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{R(this,"InitIDGenerator")}},Cd,kW=R(function(e){return Cd=Cd||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Cd.innerHTML=e,unescape(Cd.textContent)},"entityDecode");function Qw(e){return"str"in e}R(Qw,"isDetailedError");var DW=R((e,t,r,n)=>{if(!n)return;const i=e.node()?.getBBox();i&&e.append("text").text(n).attr("text-anchor","middle").attr("x",i.x+i.width/2).attr("y",-r).attr("class",t)},"insertTitle"),d0=R(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function tx(e,t){return hW({},e,t)}R(tx,"cleanAndMerge");var Es={assignWithDepth:sn,wrapLabel:EW,calculateTextHeight:l5,calculateTextWidth:go,calculateTextDimensions:Zw,cleanAndMerge:tx,detectInit:mW,detectDirective:e5,isSubstringInArray:yW,interpolateToCurve:Kw,calcLabelPosition:i5,calcCardinalityPosition:vW,calcTerminalLabelPosition:s5,formatUrl:r5,getStylesFromArray:o5,generateId:wW,random:xW,runFunc:bW,entityDecode:kW,insertTitle:DW,parseFontSize:d0,InitIDGenerator:AW},TW=R(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const n=r.substring(1,r.length-1);return/^\+?\d+$/.test(n)?"fl°°"+n+"¶ß":"fl°"+n+"¶ß"}),t},"encodeEntities"),Pl=R(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),dft=R((e,t,{counter:r=0,prefix:n,suffix:i},s)=>s||`${n?`${n}_`:""}${e}_${t}_${r}${i?`_${i}`:""}`,"getEdgeId");function Cn(e){return e??null}R(Cn,"handleUndefinedAttr");function ex(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Fl=ex();function c5(e){Fl=e}const zh={exec:()=>null};function Ze(e,t=""){let r=typeof e=="string"?e:e.source;const n={replace:(i,s)=>{let o=typeof s=="string"?s:s.source;return o=o.replace(En.caret,"$1"),r=r.replace(i,o),n},getRegex:()=>new RegExp(r,t)};return n}const En={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},PW=/^(?:[ \t]*(?:\n|$))+/,FW=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,OW=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Xf=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,IW=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,rx=/(?:[*+-]|\d{1,9}[.)])/,u5=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,h5=Ze(u5).replace(/bull/g,rx).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),$W=Ze(u5).replace(/bull/g,rx).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),nx=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,BW=/^[^\n]+/,ix=/(?!\s*\])(?:\\.|[^\[\]\\])+/,RW=Ze(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ix).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),NW=Ze(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,rx).getRegex(),p0="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",sx=/|$))/,LW=Ze("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",sx).replace("tag",p0).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),f5=Ze(nx).replace("hr",Xf).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",p0).getRegex(),MW=Ze(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",f5).getRegex(),ox={blockquote:MW,code:FW,def:RW,fences:OW,heading:IW,hr:Xf,html:LW,lheading:h5,list:NW,newline:PW,paragraph:f5,table:zh,text:BW},RS=Ze("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Xf).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",p0).getRegex(),jW={...ox,lheading:$W,table:RS,paragraph:Ze(nx).replace("hr",Xf).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",RS).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",p0).getRegex()},zW={...ox,html:Ze(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",sx).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:zh,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ze(nx).replace("hr",Xf).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",h5).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},UW=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,VW=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,d5=/^( {2,}|\\)\n(?!\s*$)/,WW=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,g5=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,KW=Ze(g5,"u").replace(/punct/g,m0).getRegex(),XW=Ze(g5,"u").replace(/punct/g,m5).getRegex(),y5="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",JW=Ze(y5,"gu").replace(/notPunctSpace/g,p5).replace(/punctSpace/g,ax).replace(/punct/g,m0).getRegex(),ZW=Ze(y5,"gu").replace(/notPunctSpace/g,GW).replace(/punctSpace/g,HW).replace(/punct/g,m5).getRegex(),QW=Ze("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,p5).replace(/punctSpace/g,ax).replace(/punct/g,m0).getRegex(),tq=Ze(/\\(punct)/,"gu").replace(/punct/g,m0).getRegex(),eq=Ze(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),rq=Ze(sx).replace("(?:-->|$)","-->").getRegex(),nq=Ze("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",rq).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Pm=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,iq=Ze(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Pm).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),b5=Ze(/^!?\[(label)\]\[(ref)\]/).replace("label",Pm).replace("ref",ix).getRegex(),v5=Ze(/^!?\[(ref)\](?:\[\])?/).replace("ref",ix).getRegex(),sq=Ze("reflink|nolink(?!\\()","g").replace("reflink",b5).replace("nolink",v5).getRegex(),lx={_backpedal:zh,anyPunctuation:tq,autolink:eq,blockSkip:YW,br:d5,code:VW,del:zh,emStrongLDelim:KW,emStrongRDelimAst:JW,emStrongRDelimUnd:QW,escape:UW,link:iq,nolink:v5,punctuation:qW,reflink:b5,reflinkSearch:sq,tag:nq,text:WW,url:zh},oq={...lx,link:Ze(/^!?\[(label)\]\((.*?)\)/).replace("label",Pm).getRegex(),reflink:Ze(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Pm).getRegex()},V1={...lx,emStrongRDelimAst:ZW,emStrongLDelim:XW,url:Ze(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},NS=e=>lq[e];function gs(e,t){if(t){if(En.escapeTest.test(e))return e.replace(En.escapeReplace,NS)}else if(En.escapeTestNoEncode.test(e))return e.replace(En.escapeReplaceNoEncode,NS);return e}function LS(e){try{e=encodeURI(e).replace(En.percentDecode,"%")}catch{return null}return e}function MS(e,t){const r=e.replace(En.findPipe,(s,o,a)=>{let l=!1,c=o;for(;--c>=0&&a[c]==="\\";)l=!l;return l?"|":" |"}),n=r.split(En.splitPipe);let i=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length{const o=s.match(r.other.beginningSpace);if(o===null)return s;const[a]=o;return a.length>=i.length?s.slice(i.length):s}).join(` `)}class Fm{options;rules;lexer;constructor(t){this.options=t||Fl}space(t){const r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){const r=this.rules.block.code.exec(t);if(r){const n=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Yu(n,` `)}}}fences(t){const r=this.rules.block.fences.exec(t);if(r){const n=r[0],i=uq(n,r[3]||"",this.rules);return{type:"code",raw:n,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:i}}}heading(t){const r=this.rules.block.heading.exec(t);if(r){let n=r[2].trim();if(this.rules.other.endingHash.test(n)){const i=Yu(n,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(n=i.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){const r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:Yu(r[0],` `)}}blockquote(t){const r=this.rules.block.blockquote.exec(t);if(r){let n=Yu(r[0],` `).split(` `),i="",s="";const o=[];for(;n.length>0;){let a=!1;const l=[];let c;for(c=0;c1,s={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");const o=this.rules.other.listItemRegex(n);let a=!1;for(;t;){let c=!1,u="",h="";if(!(r=o.exec(t))||this.rules.block.hr.test(t))break;u=r[0],t=t.substring(u.length);let d=r[2].split(` `,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),g=t.split(` `,1)[0],y=!d.trim(),f=0;if(this.options.pedantic?(f=2,h=d.trimStart()):y?f=r[1].length+1:(f=r[2].search(this.rules.other.nonSpaceChar),f=f>4?1:f,h=d.slice(f),f+=r[1].length),y&&this.rules.other.blankLine.test(g)&&(u+=g+` `,t=t.substring(g.length+1),c=!0),!c){const b=this.rules.other.nextBulletRegex(f),w=this.rules.other.hrRegex(f),x=this.rules.other.fencesBeginRegex(f),E=this.rules.other.headingBeginRegex(f),S=this.rules.other.htmlBeginRegex(f);for(;t;){const C=t.split(` `,1)[0];let A;if(g=C,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),A=g):A=g.replace(this.rules.other.tabCharGlobal," "),x.test(g)||E.test(g)||S.test(g)||b.test(g)||w.test(g))break;if(A.search(this.rules.other.nonSpaceChar)>=f||!g.trim())h+=` `+A.slice(f);else{if(y||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||x.test(d)||E.test(d)||w.test(d))break;h+=` `+g}!y&&!g.trim()&&(y=!0),u+=C+` `,t=t.substring(C.length+1),d=A.slice(f)}}s.loose||(a?s.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(a=!0));let p=null,m;this.options.gfm&&(p=this.rules.other.listIsTask.exec(h),p&&(m=p[0]!=="[ ] ",h=h.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:u,task:!!p,checked:m,loose:!1,text:h,tokens:[]}),s.raw+=u}const l=s.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let c=0;cd.type==="space"),h=u.length>0&&u.some(d=>this.rules.other.anyLine.test(d.raw));s.loose=h}if(s.loose)for(let c=0;c({text:l,tokens:this.lexer.inline(l),header:!1,align:o.align[c]})));return o}}lheading(t){const r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){const r=this.rules.block.paragraph.exec(t);if(r){const n=r[1].charAt(r[1].length-1)===` `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:n,tokens:this.lexer.inline(n)}}}text(t){const r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){const r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){const r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){const r=this.rules.inline.link.exec(t);if(r){const n=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;const o=Yu(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{const o=cq(r[2],"()");if(o>-1){const l=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,l).trim(),r[3]=""}}let i=r[2],s="";if(this.options.pedantic){const o=this.rules.other.pedanticHrefTitle.exec(i);o&&(i=o[1],s=o[3])}else s=r[3]?r[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?i=i.slice(1):i=i.slice(1,-1)),jS(r,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){const i=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=r[i.toLowerCase()];if(!s){const o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return jS(n,s,n[0],this.lexer,this.rules)}}emStrong(t,r,n=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!i||i[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(i[1]||i[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const o=[...i[0]].length-1;let a,l,c=o,u=0;const h=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+o);(i=h.exec(r))!=null;){if(a=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!a)continue;if(l=[...a].length,i[3]||i[4]){c+=l;continue}else if((i[5]||i[6])&&o%3&&!((o+l)%3)){u+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c+u);const d=[...i[0]][0].length,g=t.slice(0,o+i.index+d+l);if(Math.min(o,l)%2){const f=g.slice(1,-1);return{type:"em",raw:g,text:f,tokens:this.lexer.inlineTokens(f)}}const y=g.slice(2,-2);return{type:"strong",raw:g,text:y,tokens:this.lexer.inlineTokens(y)}}}}codespan(t){const r=this.rules.inline.code.exec(t);if(r){let n=r[2].replace(this.rules.other.newLineCharGlobal," ");const i=this.rules.other.nonSpaceChar.test(n),s=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return i&&s&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:r[0],text:n}}}br(t){const r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){const r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){const r=this.rules.inline.autolink.exec(t);if(r){let n,i;return r[2]==="@"?(n=r[1],i="mailto:"+n):(n=r[1],i=n),{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let n,i;if(r[2]==="@")n=r[0],i="mailto:"+n;else{let s;do s=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(s!==r[0]);n=r[0],r[1]==="www."?i="http://"+r[0]:i=r[0]}return{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){const r=this.rules.inline.text.exec(t);if(r){const n=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:n}}}}class ki{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Fl,this.options.tokenizer=this.options.tokenizer||new Fm,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const r={other:En,block:Ad.normal,inline:Gu.normal};this.options.pedantic?(r.block=Ad.pedantic,r.inline=Gu.pedantic):this.options.gfm&&(r.block=Ad.gfm,this.options.breaks?r.inline=Gu.breaks:r.inline=Gu.gfm),this.tokenizer.rules=r}static get rules(){return{block:Ad,inline:Gu}}static lex(t,r){return new ki(r).lex(t)}static lexInline(t,r){return new ki(r).inlineTokens(t)}lex(t){t=t.replace(En.carriageReturn,` `),this.blockTokens(t,this.tokens);for(let r=0;r(i=o.call({lexer:this},t,r))?(t=t.substring(i.raw.length),r.push(i),!0):!1))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);const o=r.at(-1);i.raw.length===1&&o!==void 0?o.raw+=` `:r.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);const o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=` `+i.raw,o.text+=` `+i.text,this.inlineQueue.at(-1).src=o.text):r.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);const o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=` `+i.raw,o.text+=` `+i.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title});continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),r.push(i);continue}let s=t;if(this.options.extensions?.startBlock){let o=1/0;const a=t.slice(1);let l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},a),typeof l=="number"&&l>=0&&(o=Math.min(o,l))}),o<1/0&&o>=0&&(s=t.substring(0,o+1))}if(this.state.top&&(i=this.tokenizer.paragraph(s))){const o=r.at(-1);n&&o?.type==="paragraph"?(o.raw+=` `+i.raw,o.text+=` `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(i),n=s.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);const o=r.at(-1);o?.type==="text"?(o.raw+=` `+i.raw,o.text+=` `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(i);continue}if(t){const o="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let n=t,i=null;if(this.tokens.links){const a=Object.keys(this.tokens.links);if(a.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)a.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,i.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(i=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let s=!1,o="";for(;t;){s||(o=""),s=!1;let a;if(this.options.extensions?.inline?.some(c=>(a=c.call({lexer:this},t,r))?(t=t.substring(a.raw.length),r.push(a),!0):!1))continue;if(a=this.tokenizer.escape(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.tag(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.link(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(a.raw.length);const c=r.at(-1);a.type==="text"&&c?.type==="text"?(c.raw+=a.raw,c.text+=a.text):r.push(a);continue}if(a=this.tokenizer.emStrong(t,n,o)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.codespan(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.br(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.del(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.autolink(t)){t=t.substring(a.raw.length),r.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(t))){t=t.substring(a.raw.length),r.push(a);continue}let l=t;if(this.options.extensions?.startInline){let c=1/0;const u=t.slice(1);let h;this.options.extensions.startInline.forEach(d=>{h=d.call({lexer:this},u),typeof h=="number"&&h>=0&&(c=Math.min(c,h))}),c<1/0&&c>=0&&(l=t.substring(0,c+1))}if(a=this.tokenizer.inlineText(l)){t=t.substring(a.raw.length),a.raw.slice(-1)!=="_"&&(o=a.raw.slice(-1)),s=!0;const c=r.at(-1);c?.type==="text"?(c.raw+=a.raw,c.text+=a.text):r.push(a);continue}if(t){const c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return r}}class Om{options;parser;constructor(t){this.options=t||Fl}space(t){return""}code({text:t,lang:r,escaped:n}){const i=(r||"").match(En.notSpaceStart)?.[0],s=t.replace(En.endingNewline,"")+` `;return i?'
'+(n?s:gs(s,!0))+`
`:"
"+(n?s:gs(s,!0))+`
`}blockquote({tokens:t}){return`
${this.parser.parse(t)}
`}html({text:t}){return t}heading({tokens:t,depth:r}){return`${this.parser.parseInline(t)} `}hr(t){return`
`}list(t){const r=t.ordered,n=t.start;let i="";for(let a=0;a `+i+" `}listitem(t){let r="";if(t.task){const n=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=n+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=n+" "+gs(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):r+=n+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`
  • ${r}
  • `}checkbox({checked:t}){return"'}paragraph({tokens:t}){return`

    ${this.parser.parseInline(t)}

    `}table(t){let r="",n="";for(let s=0;s${i}`),` `+r+` `+i+`
    `}tablerow({text:t}){return` ${t} `}tablecell(t){const r=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+r+` `}strong({tokens:t}){return`${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${gs(t,!0)}`}br(t){return"
    "}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:r,tokens:n}){const i=this.parser.parseInline(n),s=LS(t);if(s===null)return i;t=s;let o='
    ",o}image({href:t,title:r,text:n}){const i=LS(t);if(i===null)return gs(n);t=i;let s=`${n}{const a=s[o].flat(1/0);n=n.concat(this.walkTokens(a,r))}):s.tokens&&(n=n.concat(this.walkTokens(s.tokens,r)))}}return n}use(...t){const r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{const i={...n};if(i.async=this.defaults.async||i.async||!1,n.extensions&&(n.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){const o=r.renderers[s.name];o?r.renderers[s.name]=function(...a){let l=s.renderer.apply(this,a);return l===!1&&(l=o.apply(this,a)),l}:r.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const o=r[s.level];o?o.unshift(s.tokenizer):r[s.level]=[s.tokenizer],s.start&&(s.level==="block"?r.startBlock?r.startBlock.push(s.start):r.startBlock=[s.start]:s.level==="inline"&&(r.startInline?r.startInline.push(s.start):r.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(r.childTokens[s.name]=s.childTokens)}),i.extensions=r),n.renderer){const s=this.defaults.renderer||new Om(this.defaults);for(const o in n.renderer){if(!(o in s))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;const a=o,l=n.renderer[a],c=s[a];s[a]=(...u)=>{let h=l.apply(s,u);return h===!1&&(h=c.apply(s,u)),h||""}}i.renderer=s}if(n.tokenizer){const s=this.defaults.tokenizer||new Fm(this.defaults);for(const o in n.tokenizer){if(!(o in s))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;const a=o,l=n.tokenizer[a],c=s[a];s[a]=(...u)=>{let h=l.apply(s,u);return h===!1&&(h=c.apply(s,u)),h}}i.tokenizer=s}if(n.hooks){const s=this.defaults.hooks||new kp;for(const o in n.hooks){if(!(o in s))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;const a=o,l=n.hooks[a],c=s[a];kp.passThroughHooks.has(o)?s[a]=u=>{if(this.defaults.async)return Promise.resolve(l.call(s,u)).then(d=>c.call(s,d));const h=l.call(s,u);return c.call(s,h)}:s[a]=(...u)=>{let h=l.apply(s,u);return h===!1&&(h=c.apply(s,u)),h}}i.hooks=s}if(n.walkTokens){const s=this.defaults.walkTokens,o=n.walkTokens;i.walkTokens=function(a){let l=[];return l.push(o.call(this,a)),s&&(l=l.concat(s.call(this,a))),l}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return ki.lex(t,r??this.defaults)}parser(t,r){return Di.parse(t,r??this.defaults)}parseMarkdown(t){return(n,i)=>{const s={...i},o={...this.defaults,...s},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&s.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=t);const l=o.hooks?o.hooks.provideLexer():t?ki.lex:ki.lexInline,c=o.hooks?o.hooks.provideParser():t?Di.parse:Di.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(n):n).then(u=>l(u,o)).then(u=>o.hooks?o.hooks.processAllTokens(u):u).then(u=>o.walkTokens?Promise.all(this.walkTokens(u,o.walkTokens)).then(()=>u):u).then(u=>c(u,o)).then(u=>o.hooks?o.hooks.postprocess(u):u).catch(a);try{o.hooks&&(n=o.hooks.preprocess(n));let u=l(n,o);o.hooks&&(u=o.hooks.processAllTokens(u)),o.walkTokens&&this.walkTokens(u,o.walkTokens);let h=c(u,o);return o.hooks&&(h=o.hooks.postprocess(h)),h}catch(u){return a(u)}}}onError(t,r){return n=>{if(n.message+=` Please report this to https://github.com/markedjs/marked.`,t){const i="

    An error occurred:

    "+gs(n.message+"",!0)+"
    ";return r?Promise.resolve(i):i}if(r)return Promise.reject(n);throw n}}}const fl=new hq;function Je(e,t){return fl.parse(e,t)}Je.options=Je.setOptions=function(e){return fl.setOptions(e),Je.defaults=fl.defaults,c5(Je.defaults),Je};Je.getDefaults=ex;Je.defaults=Fl;Je.use=function(...e){return fl.use(...e),Je.defaults=fl.defaults,c5(Je.defaults),Je};Je.walkTokens=function(e,t){return fl.walkTokens(e,t)};Je.parseInline=fl.parseInline;Je.Parser=Di;Je.parser=Di.parse;Je.Renderer=Om;Je.TextRenderer=cx;Je.Lexer=ki;Je.lexer=ki.lex;Je.Tokenizer=Fm;Je.Hooks=kp;Je.parse=Je;Je.options;Je.setOptions;Je.use;Je.walkTokens;Je.parseInline;Di.parse;ki.lex;function w5(e){for(var t=[],r=1;r/g,` `).replace(/\n{2,}/g,` `),i=w5(n);return t===!1?i.replace(/ /g," "):i}R(x5,"preprocessMarkdown");function _5(e,t={}){const r=x5(e,t),n=Je.lexer(r),i=[[]];let s=0;function o(a,l="normal"){a.type==="text"?a.text.split(` `).forEach((u,h)=>{h!==0&&(s++,i.push([])),u.split(" ").forEach(d=>{d=d.replace(/'/g,"'"),d&&i[s].push({content:d,type:l})})}):a.type==="strong"||a.type==="em"?a.tokens.forEach(c=>{o(c,a.type)}):a.type==="html"&&i[s].push({content:a.text,type:"normal"})}return R(o,"processNode"),n.forEach(a=>{a.type==="paragraph"?a.tokens?.forEach(l=>{o(l)}):a.type==="html"&&i[s].push({content:a.text,type:"normal"})}),i}R(_5,"markdownToLines");function S5(e,{markdownAutoWrap:t}={}){const r=Je.lexer(e);function n(i){return i.type==="text"?t===!1?i.text.replace(/\n */g,"
    ").replace(/ /g," "):i.text.replace(/\n */g,"
    "):i.type==="strong"?`${i.tokens?.map(n).join("")}`:i.type==="em"?`${i.tokens?.map(n).join("")}`:i.type==="paragraph"?`

    ${i.tokens?.map(n).join("")}

    `:i.type==="space"?"":i.type==="html"?`${i.text}`:i.type==="escape"?i.text:`Unsupported markdown: ${i.type}`}return R(n,"output"),r.map(n).join("")}R(S5,"markdownToHTML");function E5(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}R(E5,"splitTextToChars");function C5(e,t){const r=E5(t.content);return ux(e,[],r,t.type)}R(C5,"splitWordToFitWidth");function ux(e,t,r,n){if(r.length===0)return[{content:t.join(""),type:n},{content:"",type:n}];const[i,...s]=r,o=[...t,i];return e([{content:o.join(""),type:n}])?ux(e,o,s,n):(t.length===0&&i&&(t.push(i),r.shift()),[{content:t.join(""),type:n},{content:r.join(""),type:n}])}R(ux,"splitWordToFitWidthRecursion");function A5(e,t){if(e.some(({content:r})=>r.includes(` `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Im(e,t)}R(A5,"splitLineToFitWidth");function Im(e,t,r=[],n=[]){if(e.length===0)return n.length>0&&r.push(n),r.length>0?r:[];let i="";e[0].content===" "&&(i=" ",e.shift());const s=e.shift()??{content:" ",type:"normal"},o=[...n];if(i!==""&&o.push({content:i,type:"normal"}),o.push(s),t(o))return Im(e,t,r,o);if(n.length>0)r.push(n),e.unshift(s);else if(s.content){const[a,l]=C5(t,s);r.push([a]),l.content&&e.unshift(l)}return Im(e,t,r)}R(Im,"splitLineToFitWidthRecursion");function W1(e,t){t&&e.attr("style",t)}R(W1,"applyStyle");async function k5(e,t,r,n,i=!1){const s=e.append("foreignObject");s.attr("width",`${10*r}px`),s.attr("height",`${10*r}px`);const o=s.append("xhtml:div");let a=t.label;t.label&&Kc(t.label)&&(a=await vw(t.label.replace(gu.lineBreakRegex,` `),He()));const l=t.isNode?"nodeLabel":"edgeLabel",c=o.append("span");c.html(a),W1(c,t.labelStyle),c.attr("class",`${l} ${n}`),W1(o,t.labelStyle),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("line-height","1.5"),o.style("max-width",r+"px"),o.style("text-align","center"),o.attr("xmlns","http://www.w3.org/1999/xhtml"),i&&o.attr("class","labelBkg");let u=o.node().getBoundingClientRect();return u.width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px"),u=o.node().getBoundingClientRect()),s.node()}R(k5,"addHtmlSpan");function g0(e,t,r){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em")}R(g0,"createTspan");function D5(e,t,r){const n=e.append("text"),i=g0(n,1,t);y0(i,r);const s=i.node().getComputedTextLength();return n.remove(),s}R(D5,"computeWidthOfText");function fq(e,t,r){const n=e.append("text"),i=g0(n,1,t);y0(i,[{content:r,type:"normal"}]);const s=i.node()?.getBoundingClientRect();return s&&n.remove(),s}R(fq,"computeDimensionOfText");function T5(e,t,r,n=!1){const s=t.append("g"),o=s.insert("rect").attr("class","background").attr("style","stroke: none"),a=s.append("text").attr("y","-10.1");let l=0;for(const c of r){const u=R(d=>D5(s,1.1,d)<=e,"checkWidth"),h=u(c)?[c]:A5(c,u);for(const d of h){const g=g0(a,l,1.1);y0(g,d),l++}}if(n){const c=a.node().getBBox(),u=2;return o.attr("x",c.x-u).attr("y",c.y-u).attr("width",c.width+2*u).attr("height",c.height+2*u),s.node()}else return a.node()}R(T5,"createFormattedText");function y0(e,t){e.text(""),t.forEach((r,n)=>{const i=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");n===0?i.text(r.content):i.text(" "+r.content)})}R(y0,"updateTextContentAndStyles");function P5(e){return e.replace(/fa[bklrs]?:fa-[\w-]+/g,t=>``)}R(P5,"replaceIconSubstring");var xa=R(async(e,t="",{style:r="",isTitle:n=!1,classes:i="",useHtmlLabels:s=!0,isNode:o=!0,width:a=200,addSvgBackground:l=!1}={},c)=>{if(St.debug("XYZ createText",t,r,n,i,s,o,"addSvgBackground: ",l),s){const u=S5(t,c),h=P5(Pl(u)),d=t.replace(/\\\\/g,"\\"),g={isNode:o,label:Kc(t)?d:h,labelStyle:r.replace("fill:","color:")};return await k5(e,g,a,i,l)}else{const u=t.replace(//g,"
    "),h=_5(u.replace("
    ","
    "),c),d=T5(a,e,h,t?l:!1);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Re(d).attr("style",g)}else{const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Re(d).select("rect").attr("style",g.replace(/background:/g,"fill:"));const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Re(d).select("text").attr("style",y)}return d}},"createText");function Fy(e,t,r){if(e&&e.length){const[n,i]=t,s=Math.PI/180*r,o=Math.cos(s),a=Math.sin(s);for(const l of e){const[c,u]=l;l[0]=(c-n)*o-(u-i)*a+n,l[1]=(c-n)*a+(u-i)*o+i}}}function dq(e,t){return e[0]===t[0]&&e[1]===t[1]}function pq(e,t,r,n=1){const i=r,s=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,a=[0,0];if(i)for(const c of o)Fy(c,a,i);const l=function(c,u,h){const d=[];for(const b of c){const w=[...b];dq(w[0],w[w.length-1])||w.push([w[0][0],w[0][1]]),w.length>2&&d.push(w)}const g=[];u=Math.max(u,.1);const y=[];for(const b of d)for(let w=0;wb.yminw.ymin?1:b.xw.x?1:b.ymax===w.ymax?0:(b.ymax-w.ymax)/Math.abs(b.ymax-w.ymax)),!y.length)return g;let f=[],p=y[0].ymin,m=0;for(;f.length||y.length;){if(y.length){let b=-1;for(let w=0;wp);w++)b=w;y.splice(0,b+1).forEach(w=>{f.push({s:p,edge:w})})}if(f=f.filter(b=>!(b.edge.ymax<=p)),f.sort((b,w)=>b.edge.x===w.edge.x?0:(b.edge.x-w.edge.x)/Math.abs(b.edge.x-w.edge.x)),(h!==1||m%u==0)&&f.length>1)for(let b=0;b=f.length)break;const x=f[b].edge,E=f[w].edge;g.push([[Math.round(x.x),p],[Math.round(E.x),p]])}p+=h,f.forEach(b=>{b.edge.x=b.edge.x+h*b.edge.islope}),m++}return g}(o,s,n);if(i){for(const c of o)Fy(c,a,-i);(function(c,u,h){const d=[];c.forEach(g=>d.push(...g)),Fy(d,u,h)})(l,a,-i)}return l}function Jf(e,t){var r;const n=t.hachureAngle+90;let i=t.hachureGap;i<0&&(i=4*t.strokeWidth),i=Math.round(Math.max(i,.1));let s=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(s=i),pq(e,i,n,s||1)}let hx=class{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const n=Jf(t,r);return{type:"fillSketch",ops:this.renderLines(n,r)}}renderLines(t,r){const n=[];for(const i of t)n.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],r));return n}};function b0(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}let mq=class extends hx{fillPolygons(t,r){let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);const i=Jf(t,Object.assign({},r,{hachureGap:n})),s=Math.PI/180*r.hachureAngle,o=[],a=.5*n*Math.cos(s),l=.5*n*Math.sin(s);for(const[c,u]of i)b0([c,u])&&o.push([[c[0]-a,c[1]+l],[...u]],[[c[0]+a,c[1]-l],[...u]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}},gq=class extends hx{fillPolygons(t,r){const n=this._fillPolygons(t,r),i=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),s=this._fillPolygons(t,i);return n.ops=n.ops.concat(s.ops),n}},yq=class{constructor(t){this.helper=t}fillPolygons(t,r){const n=Jf(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(n,r)}dotsOnLines(t,r){const n=[];let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);let s=r.fillWeight;s<0&&(s=r.strokeWidth/2);const o=i/4;for(const a of t){const l=b0(a),c=l/i,u=Math.ceil(c)-1,h=l-u*i,d=(a[0][0]+a[1][0])/2-i/4,g=Math.min(a[0][1],a[1][1]);for(let y=0;y{const a=b0(o),l=Math.floor(a/(n+i)),c=(a+i-l*(n+i))/2;let u=o[0],h=o[1];u[0]>h[0]&&(u=o[1],h=o[0]);const d=Math.atan((h[1]-u[1])/(h[0]-u[0]));for(let g=0;g{const o=b0(s),a=Math.round(o/(2*r));let l=s[0],c=s[1];l[0]>c[0]&&(l=s[1],c=s[0]);const u=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let h=0;hu%2?c+r:c+t);s.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":s.push({key:"Q",data:[...a]}),t=a[2],r=a[3];break;case"q":{const l=a.map((c,u)=>u%2?c+r:c+t);s.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":s.push({key:"A",data:[...a]}),t=a[5],r=a[6];break;case"a":t+=a[5],r+=a[6],s.push({key:"A",data:[a[0],a[1],a[2],a[3],a[4],t,r]});break;case"H":s.push({key:"H",data:[...a]}),t=a[0];break;case"h":t+=a[0],s.push({key:"H",data:[t]});break;case"V":s.push({key:"V",data:[...a]}),r=a[0];break;case"v":r+=a[0],s.push({key:"V",data:[r]});break;case"S":s.push({key:"S",data:[...a]}),t=a[2],r=a[3];break;case"s":{const l=a.map((c,u)=>u%2?c+r:c+t);s.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":s.push({key:"T",data:[...a]}),t=a[0],r=a[1];break;case"t":t+=a[0],r+=a[1],s.push({key:"T",data:[t,r]});break;case"Z":case"z":s.push({key:"Z",data:[]}),t=n,r=i}return s}function O5(e){const t=[];let r="",n=0,i=0,s=0,o=0,a=0,l=0;for(const{key:c,data:u}of e){switch(c){case"M":t.push({key:"M",data:[...u]}),[n,i]=u,[s,o]=u;break;case"C":t.push({key:"C",data:[...u]}),n=u[4],i=u[5],a=u[2],l=u[3];break;case"L":t.push({key:"L",data:[...u]}),[n,i]=u;break;case"H":n=u[0],t.push({key:"L",data:[n,i]});break;case"V":i=u[0],t.push({key:"L",data:[n,i]});break;case"S":{let h=0,d=0;r==="C"||r==="S"?(h=n+(n-a),d=i+(i-l)):(h=n,d=i),t.push({key:"C",data:[h,d,...u]}),a=u[0],l=u[1],n=u[2],i=u[3];break}case"T":{const[h,d]=u;let g=0,y=0;r==="Q"||r==="T"?(g=n+(n-a),y=i+(i-l)):(g=n,y=i);const f=n+2*(g-n)/3,p=i+2*(y-i)/3,m=h+2*(g-h)/3,b=d+2*(y-d)/3;t.push({key:"C",data:[f,p,m,b,h,d]}),a=g,l=y,n=h,i=d;break}case"Q":{const[h,d,g,y]=u,f=n+2*(h-n)/3,p=i+2*(d-i)/3,m=g+2*(h-g)/3,b=y+2*(d-y)/3;t.push({key:"C",data:[f,p,m,b,g,y]}),a=h,l=d,n=g,i=y;break}case"A":{const h=Math.abs(u[0]),d=Math.abs(u[1]),g=u[2],y=u[3],f=u[4],p=u[5],m=u[6];h===0||d===0?(t.push({key:"C",data:[n,i,p,m,p,m]}),n=p,i=m):(n!==p||i!==m)&&(I5(n,i,p,m,h,d,g,y,f).forEach(function(b){t.push({key:"C",data:b})}),n=p,i=m);break}case"Z":t.push({key:"Z",data:[]}),n=s,i=o}r=c}return t}function Ku(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function I5(e,t,r,n,i,s,o,a,l,c){const u=(h=o,Math.PI*h/180);var h;let d=[],g=0,y=0,f=0,p=0;if(c)[g,y,f,p]=c;else{[e,t]=Ku(e,t,-u),[r,n]=Ku(r,n,-u);const q=(e-r)/2,H=(t-n)/2;let G=q*q/(i*i)+H*H/(s*s);G>1&&(G=Math.sqrt(G),i*=G,s*=G);const Y=i*i,F=s*s,T=Y*F-Y*H*H-F*q*q,N=Y*H*H+F*q*q,U=(a===l?-1:1)*Math.sqrt(Math.abs(T/N));f=U*i*H/s+(e+r)/2,p=U*-s*q/i+(t+n)/2,g=Math.asin(parseFloat(((t-p)/s).toFixed(9))),y=Math.asin(parseFloat(((n-p)/s).toFixed(9))),ey&&(g-=2*Math.PI),!l&&y>g&&(y-=2*Math.PI)}let m=y-g;if(Math.abs(m)>120*Math.PI/180){const q=y,H=r,G=n;y=l&&y>g?g+120*Math.PI/180*1:g+120*Math.PI/180*-1,d=I5(r=f+i*Math.cos(y),n=p+s*Math.sin(y),H,G,i,s,o,0,l,[y,q,f,p])}m=y-g;const b=Math.cos(g),w=Math.sin(g),x=Math.cos(y),E=Math.sin(y),S=Math.tan(m/4),C=4/3*i*S,A=4/3*s*S,$=[e,t],O=[e+C*w,t-A*b],I=[r+C*E,n-A*x],M=[r,n];if(O[0]=2*$[0]-O[0],O[1]=2*$[1]-O[1],c)return[O,I,M].concat(d);{d=[O,I,M].concat(d);const q=[];for(let H=0;H2){const i=[];for(let s=0;s2*Math.PI&&(g=0,y=2*Math.PI);const f=2*Math.PI/l.curveStepCount,p=Math.min(f/2,(y-g)/2),m=GS(p,c,u,h,d,g,y,1,l);if(!l.disableMultiStroke){const b=GS(p,c,u,h,d,g,y,1.5,l);m.push(...b)}return o&&(a?m.push(...sa(c,u,c+h*Math.cos(g),u+d*Math.sin(g),l),...sa(c,u,c+h*Math.cos(y),u+d*Math.sin(y),l)):m.push({op:"lineTo",data:[c,u]},{op:"lineTo",data:[c+h*Math.cos(g),u+d*Math.sin(g)]})),{type:"path",ops:m}}function WS(e,t){const r=O5(F5(fx(e))),n=[];let i=[0,0],s=[0,0];for(const{key:o,data:a}of r)switch(o){case"M":s=[a[0],a[1]],i=[a[0],a[1]];break;case"L":n.push(...sa(s[0],s[1],a[0],a[1],t)),s=[a[0],a[1]];break;case"C":{const[l,c,u,h,d,g]=a;n.push(...Eq(l,c,u,h,d,g,s,t)),s=[d,g];break}case"Z":n.push(...sa(s[0],s[1],i[0],i[1],t)),s=[i[0],i[1]]}return{type:"path",ops:n}}function $y(e,t){const r=[];for(const n of e)if(n.length){const i=t.maxRandomnessOffset||0,s=n.length;if(s>2){r.push({op:"move",data:[n[0][0]+se(i,t),n[0][1]+se(i,t)]});for(let o=1;o500?.4:-.0016668*l+1.233334;let u=i.maxRandomnessOffset||0;u*u*100>a&&(u=l/10);const h=u/2,d=.2+.2*R5(i);let g=i.bowing*i.maxRandomnessOffset*(n-t)/200,y=i.bowing*i.maxRandomnessOffset*(e-r)/200;g=se(g,i,c),y=se(y,i,c);const f=[],p=()=>se(h,i,c),m=()=>se(u,i,c),b=i.preserveVertices;return o?f.push({op:"move",data:[e+(b?0:p()),t+(b?0:p())]}):f.push({op:"move",data:[e+(b?0:se(u,i,c)),t+(b?0:se(u,i,c))]}),o?f.push({op:"bcurveTo",data:[g+e+(r-e)*d+p(),y+t+(n-t)*d+p(),g+e+2*(r-e)*d+p(),y+t+2*(n-t)*d+p(),r+(b?0:p()),n+(b?0:p())]}):f.push({op:"bcurveTo",data:[g+e+(r-e)*d+m(),y+t+(n-t)*d+m(),g+e+2*(r-e)*d+m(),y+t+2*(n-t)*d+m(),r+(b?0:m()),n+(b?0:m())]}),f}function Dd(e,t,r){if(!e.length)return[];const n=[];n.push([e[0][0]+se(t,r),e[0][1]+se(t,r)]),n.push([e[0][0]+se(t,r),e[0][1]+se(t,r)]);for(let i=1;i3){const s=[],o=1-r.curveTightness;i.push({op:"move",data:[e[1][0],e[1][1]]});for(let a=1;a+21&&i.push(a)):i.push(a),i.push(e[t+3])}else{const l=e[t+0],c=e[t+1],u=e[t+2],h=e[t+3],d=$a(l,c,.5),g=$a(c,u,.5),y=$a(u,h,.5),f=$a(d,g,.5),p=$a(g,y,.5),m=$a(f,p,.5);G1([l,d,f,m],0,r,i),G1([m,p,y,h],0,r,i)}var s,o;return i}function Aq(e,t){return Rm(e,0,e.length,t)}function Rm(e,t,r,n,i){const s=i||[],o=e[t],a=e[r-1];let l=0,c=1;for(let u=t+1;ul&&(l=h,c=u)}return Math.sqrt(l)>n?(Rm(e,t,c+1,n,s),Rm(e,c,r,n,s)):(s.length||s.push(o),s.push(a)),s}function By(e,t=.15,r){const n=[],i=(e.length-1)/3;for(let s=0;s0?Rm(n,0,n.length,r):n}const Zn="none";let Nm=class{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,n){return{shape:t,sets:r||[],options:n||this.defaultOptions}}line(t,r,n,i,s){const o=this._o(s);return this._d("line",[$5(t,r,n,i,o)],o)}rectangle(t,r,n,i,s){const o=this._o(s),a=[],l=Sq(t,r,n,i,o);if(o.fill){const c=[[t,r],[t+n,r],[t+n,r+i],[t,r+i]];o.fillStyle==="solid"?a.push($y([c],o)):a.push(Yl([c],o))}return o.stroke!==Zn&&a.push(l),this._d("rectangle",a,o)}ellipse(t,r,n,i,s){const o=this._o(s),a=[],l=B5(n,i,o),c=q1(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const u=q1(t,r,o,l).opset;u.type="fillPath",a.push(u)}else a.push(Yl([c.estimatedPoints],o));return o.stroke!==Zn&&a.push(c.opset),this._d("ellipse",a,o)}circle(t,r,n,i){const s=this.ellipse(t,r,n,n,i);return s.shape="circle",s}linearPath(t,r){const n=this._o(r);return this._d("linearPath",[Dp(t,!1,n)],n)}arc(t,r,n,i,s,o,a=!1,l){const c=this._o(l),u=[],h=VS(t,r,n,i,s,o,a,!0,c);if(a&&c.fill)if(c.fillStyle==="solid"){const d=Object.assign({},c);d.disableMultiStroke=!0;const g=VS(t,r,n,i,s,o,!0,!1,d);g.type="fillPath",u.push(g)}else u.push(function(d,g,y,f,p,m,b){const w=d,x=g;let E=Math.abs(y/2),S=Math.abs(f/2);E+=se(.01*E,b),S+=se(.01*S,b);let C=p,A=m;for(;C<0;)C+=2*Math.PI,A+=2*Math.PI;A-C>2*Math.PI&&(C=0,A=2*Math.PI);const $=(A-C)/b.curveStepCount,O=[];for(let I=C;I<=A;I+=$)O.push([w+E*Math.cos(I),x+S*Math.sin(I)]);return O.push([w+E*Math.cos(A),x+S*Math.sin(A)]),O.push([w,x]),Yl([O],b)}(t,r,n,i,s,o,c));return c.stroke!==Zn&&u.push(h),this._d("arc",u,c)}curve(t,r){const n=this._o(r),i=[],s=US(t,n);if(n.fill&&n.fill!==Zn)if(n.fillStyle==="solid"){const o=US(t,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],a=t;if(a.length){const l=typeof a[0][0]=="number"?[a]:a;for(const c of l)c.length<3?o.push(...c):c.length===3?o.push(...By(YS([c[0],c[0],c[1],c[2]]),10,(1+n.roughness)/2)):o.push(...By(YS(c),10,(1+n.roughness)/2))}o.length&&i.push(Yl([o],n))}return n.stroke!==Zn&&i.push(s),this._d("curve",i,n)}polygon(t,r){const n=this._o(r),i=[],s=Dp(t,!0,n);return n.fill&&(n.fillStyle==="solid"?i.push($y([t],n)):i.push(Yl([t],n))),n.stroke!==Zn&&i.push(s),this._d("polygon",i,n)}path(t,r){const n=this._o(r),i=[];if(!t)return this._d("path",i,n);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const s=n.fill&&n.fill!=="transparent"&&n.fill!==Zn,o=n.stroke!==Zn,a=!!(n.simplification&&n.simplification<1),l=function(u,h,d){const g=O5(F5(fx(u))),y=[];let f=[],p=[0,0],m=[];const b=()=>{m.length>=4&&f.push(...By(m,h)),m=[]},w=()=>{b(),f.length&&(y.push(f),f=[])};for(const{key:E,data:S}of g)switch(E){case"M":w(),p=[S[0],S[1]],f.push(p);break;case"L":b(),f.push([S[0],S[1]]);break;case"C":if(!m.length){const C=f.length?f[f.length-1]:p;m.push([C[0],C[1]])}m.push([S[0],S[1]]),m.push([S[2],S[3]]),m.push([S[4],S[5]]);break;case"Z":b(),f.push([p[0],p[1]])}if(w(),!d)return y;const x=[];for(const E of y){const S=Aq(E,d);S.length&&x.push(S)}return x}(t,1,a?4-4*(n.simplification||1):(1+n.roughness)/2),c=WS(t,n);if(s)if(n.fillStyle==="solid")if(l.length===1){const u=WS(t,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(u.ops)})}else i.push($y(l,n));else i.push(Yl(l,n));return o&&(a?l.forEach(u=>{i.push(Dp(u,!1,n))}):i.push(c)),this._d("path",i,n)}opsToPath(t,r){let n="";for(const i of t.ops){const s=typeof r=="number"&&r>=0?i.data.map(o=>+o.toFixed(r)):i.data;switch(i.op){case"move":n+=`M${s[0]} ${s[1]} `;break;case"bcurveTo":n+=`C${s[0]} ${s[1]}, ${s[2]} ${s[3]}, ${s[4]} ${s[5]} `;break;case"lineTo":n+=`L${s[0]} ${s[1]} `}}return n.trim()}toPaths(t){const r=t.sets||[],n=t.options||this.defaultOptions,i=[];for(const s of r){let o=null;switch(s.type){case"path":o={d:this.opsToPath(s),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:Zn};break;case"fillPath":o={d:this.opsToPath(s),stroke:Zn,strokeWidth:0,fill:n.fill||Zn};break;case"fillSketch":o=this.fillSketch(s,n)}o&&i.push(o)}return i}fillSketch(t,r){let n=r.fillWeight;return n<0&&(n=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Zn,strokeWidth:n,fill:Zn}}_mergedShape(t){return t.filter((r,n)=>n===0||r.op!=="move")}},kq=class{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Nm(r)}draw(t){const r=t.sets||[],n=t.options||this.getDefaultOptions(),i=this.ctx,s=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":i.save(),i.strokeStyle=n.stroke==="none"?"transparent":n.stroke,i.lineWidth=n.strokeWidth,n.strokeLineDash&&i.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(i.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(i,o,s),i.restore();break;case"fillPath":{i.save(),i.fillStyle=n.fill||"";const a=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(i,o,s,a),i.restore();break}case"fillSketch":this.fillSketch(i,o,n)}}fillSketch(t,r,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2),t.save(),n.fillLineDash&&t.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(t.lineDashOffset=n.fillLineDashOffset),t.strokeStyle=n.fill||"",t.lineWidth=i,this._drawToContext(t,r,n.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,n,i="nonzero"){t.beginPath();for(const s of r.ops){const o=typeof n=="number"&&n>=0?s.data.map(a=>+a.toFixed(n)):s.data;switch(s.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(i):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,n,i,s){const o=this.gen.line(t,r,n,i,s);return this.draw(o),o}rectangle(t,r,n,i,s){const o=this.gen.rectangle(t,r,n,i,s);return this.draw(o),o}ellipse(t,r,n,i,s){const o=this.gen.ellipse(t,r,n,i,s);return this.draw(o),o}circle(t,r,n,i){const s=this.gen.circle(t,r,n,i);return this.draw(s),s}linearPath(t,r){const n=this.gen.linearPath(t,r);return this.draw(n),n}polygon(t,r){const n=this.gen.polygon(t,r);return this.draw(n),n}arc(t,r,n,i,s,o,a=!1,l){const c=this.gen.arc(t,r,n,i,s,o,a,l);return this.draw(c),c}curve(t,r){const n=this.gen.curve(t,r);return this.draw(n),n}path(t,r){const n=this.gen.path(t,r);return this.draw(n),n}};const Td="http://www.w3.org/2000/svg";let Dq=class{constructor(t,r){this.svg=t,this.gen=new Nm(r)}draw(t){const r=t.sets||[],n=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,s=i.createElementNS(Td,"g"),o=t.options.fixedDecimalPlaceDigits;for(const a of r){let l=null;switch(a.type){case"path":l=i.createElementNS(Td,"path"),l.setAttribute("d",this.opsToPath(a,o)),l.setAttribute("stroke",n.stroke),l.setAttribute("stroke-width",n.strokeWidth+""),l.setAttribute("fill","none"),n.strokeLineDash&&l.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${n.strokeLineDashOffset}`);break;case"fillPath":l=i.createElementNS(Td,"path"),l.setAttribute("d",this.opsToPath(a,o)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",n.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(i,a,n)}l&&s.appendChild(l)}return s}fillSketch(t,r,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2);const s=t.createElementNS(Td,"path");return s.setAttribute("d",this.opsToPath(r,n.fixedDecimalPlaceDigits)),s.setAttribute("stroke",n.fill||""),s.setAttribute("stroke-width",i+""),s.setAttribute("fill","none"),n.fillLineDash&&s.setAttribute("stroke-dasharray",n.fillLineDash.join(" ").trim()),n.fillLineDashOffset&&s.setAttribute("stroke-dashoffset",`${n.fillLineDashOffset}`),s}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,n,i,s){const o=this.gen.line(t,r,n,i,s);return this.draw(o)}rectangle(t,r,n,i,s){const o=this.gen.rectangle(t,r,n,i,s);return this.draw(o)}ellipse(t,r,n,i,s){const o=this.gen.ellipse(t,r,n,i,s);return this.draw(o)}circle(t,r,n,i){const s=this.gen.circle(t,r,n,i);return this.draw(s)}linearPath(t,r){const n=this.gen.linearPath(t,r);return this.draw(n)}polygon(t,r){const n=this.gen.polygon(t,r);return this.draw(n)}arc(t,r,n,i,s,o,a=!1,l){const c=this.gen.arc(t,r,n,i,s,o,a,l);return this.draw(c)}curve(t,r){const n=this.gen.curve(t,r);return this.draw(n)}path(t,r){const n=this.gen.path(t,r);return this.draw(n)}};var qt={canvas:(e,t)=>new kq(e,t),svg:(e,t)=>new Dq(e,t),generator:e=>new Nm(e),newSeed:()=>Nm.newSeed()},fe=R(async(e,t,r)=>{let n;const i=t.useHtmlLabels||Lr(He()?.htmlLabels);r?n=r:n="node default";const s=e.insert("g").attr("class",n).attr("id",t.domId||t.id),o=s.insert("g").attr("class","label").attr("style",Cn(t.labelStyle));let a;t.label===void 0?a="":a=typeof t.label=="string"?t.label:t.label[0];const l=await xa(o,ll(Pl(a),He()),{useHtmlLabels:i,width:t.width||He().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:t.labelStyle,addSvgBackground:!!t.icon||!!t.img});let c=l.getBBox();const u=(t?.padding??0)/2;if(i){const h=l.children[0],d=Re(l),g=h.getElementsByTagName("img");if(g){const y=a.replace(/]*>/g,"").trim()==="";await Promise.all([...g].map(f=>new Promise(p=>{function m(){if(f.style.display="flex",f.style.flexDirection="column",y){const b=He().fontSize?He().fontSize:window.getComputedStyle(document.body).fontSize,w=5,[x=ZD.fontSize]=d0(b),E=x*w+"px";f.style.minWidth=E,f.style.maxWidth=E}else f.style.width="100%";p(f)}R(m,"setupImage"),setTimeout(()=>{f.complete&&m()}),f.addEventListener("error",m),f.addEventListener("load",m)})))}c=h.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}return i?o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):o.attr("transform","translate(0, "+-c.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:s,bbox:c,halfPadding:u,label:o}},"labelHelper"),Ry=R(async(e,t,r)=>{const n=r.useHtmlLabels||Lr(He()?.flowchart?.htmlLabels),i=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),s=await xa(i,ll(Pl(t),He()),{useHtmlLabels:n,width:r.width||He()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=s.getBBox();const a=r.padding/2;if(Lr(He()?.flowchart?.htmlLabels)){const l=s.children[0],c=Re(s);o=l.getBoundingClientRect(),c.attr("width",o.width),c.attr("height",o.height)}return n?i.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):i.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&i.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:a,label:i}},"insertLabel"),Zt=R((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),ae=R((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function Le(e){const t=e.map((r,n)=>`${n===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}R(Le,"createPathFromPoints");function oa(e,t,r,n,i,s){const o=[],l=r-e,c=n-t,u=l/s,h=2*Math.PI/u,d=t+c/2;for(let g=0;g<=50;g++){const y=g/50,f=e+y*l,p=d+i*Math.sin(h*(f-e));o.push({x:f,y:p})}return o}R(oa,"generateFullSineWavePoints");function dx(e,t,r,n,i,s){const o=[],a=i*Math.PI/180,u=(s*Math.PI/180-a)/(n-1);for(let h=0;h{var r=e.x,n=e.y,i=t.x-r,s=t.y-n,o=e.width/2,a=e.height/2,l,c;return Math.abs(s)*o>Math.abs(i)*a?(s<0&&(a=-a),l=s===0?0:a*i/s,c=a):(i<0&&(o=-o),l=o,c=i===0?0:o*s/i),{x:r+l,y:n+c}},"intersectRect"),vu=Tq;function N5(e,t){t&&e.attr("style",t)}R(N5,"applyStyle");async function L5(e){const t=Re(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div");let n=e.label;e.label&&Kc(e.label)&&(n=await vw(e.label.replace(gu.lineBreakRegex,` `),He()));const i=e.isNode?"nodeLabel":"edgeLabel";return r.html('"+n+""),N5(r,e.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}R(L5,"addHtmlLabel");var Pq=R(async(e,t,r,n)=>{let i=e||"";if(typeof i=="object"&&(i=i[0]),Lr(He().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"
    "),St.info("vertexText"+i);const s={isNode:n,label:Pl(i).replace(/fa[blrs]?:fa-[\w-]+/g,a=>``),labelStyle:t&&t.replace("fill:","color:")};return await L5(s)}else{const s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",t.replace("color:","fill:"));let o=[];typeof i=="string"?o=i.split(/\\n|\n|/gi):Array.isArray(i)?o=i:o=[];for(const a of o){const l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=a.trim(),s.appendChild(l)}return s}},"createLabel"),Xa=Pq,Do=R((e,t,r,n,i)=>["M",e+i,t,"H",e+r-i,"A",i,i,0,0,1,e+r,t+i,"V",t+n-i,"A",i,i,0,0,1,e+r-i,t+n,"H",e+i,"A",i,i,0,0,1,e,t+n-i,"V",t+i,"A",i,i,0,0,1,e+i,t,"Z"].join(" "),"createRoundedRectPathD"),Fq=R(e=>{const{handDrawnSeed:t}=He();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),wu=R(e=>{const t=Oq([...e.cssCompiledStyles||[],...e.cssStyles||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),Oq=R(e=>{const t=new Map;return e.forEach(r=>{const[n,i]=r.split(":");t.set(n.trim(),i?.trim())}),t},"styles2Map"),M5=R(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),Qt=R(e=>{const{stylesArray:t}=wu(e),r=[],n=[],i=[],s=[];return t.forEach(o=>{const a=o[0];M5(a)?r.push(o.join(":")+" !important"):(n.push(o.join(":")+" !important"),a.includes("stroke")&&i.push(o.join(":")+" !important"),a==="fill"&&s.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:t,borderStyles:i,backgroundStyles:s}},"styles2String"),Yt=R((e,t)=>{const{themeVariables:r,handDrawnSeed:n}=He(),{nodeBorder:i,mainBkg:s}=r,{stylesMap:o}=wu(e);return Object.assign({roughness:.7,fill:o.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||i,seed:n,strokeWidth:o.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0]},t)},"userNodeOverrides"),j5=R(async(e,t)=>{St.info("Creating subgraph rect for ",t.id,t);const r=He(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:s,clusterBorder:o}=n,{labelStyles:a,nodeStyles:l,borderStyles:c,backgroundStyles:u}=Qt(t),h=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),d=Lr(r.flowchart.htmlLabels),g=h.insert("g").attr("class","cluster-label "),y=await xa(g,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0});let f=y.getBBox();if(Lr(r.flowchart.htmlLabels)){const C=y.children[0],A=Re(y);f=C.getBoundingClientRect(),A.attr("width",f.width),A.attr("height",f.height)}const p=t.width<=f.width+t.padding?f.width+t.padding:t.width;t.width<=f.width+t.padding?t.diff=(p-t.width)/2-t.padding:t.diff=-t.padding;const m=t.height,b=t.x-p/2,w=t.y-m/2;St.trace("Data ",t,JSON.stringify(t));let x;if(t.look==="handDrawn"){const C=qt.svg(h),A=Yt(t,{roughness:.7,fill:s,stroke:o,fillWeight:3,seed:i}),$=C.path(Do(b,w,p,m,0),A);x=h.insert(()=>(St.debug("Rough node insert CXC",$),$),":first-child"),x.select("path:nth-child(2)").attr("style",c.join(";")),x.select("path").attr("style",u.join(";").replace("fill","stroke"))}else x=h.insert("rect",":first-child"),x.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",w).attr("width",p).attr("height",m);const{subGraphTitleTopMargin:E}=Ow(r);if(g.attr("transform",`translate(${t.x-f.width/2}, ${t.y-t.height/2+E})`),a){const C=g.select("span");C&&C.attr("style",a)}const S=x.node().getBBox();return t.offsetX=0,t.width=S.width,t.height=S.height,t.offsetY=f.height-t.padding/2,t.intersect=function(C){return vu(t,C)},{cluster:h,labelBBox:f}},"rect"),Iq=R((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),n=r.insert("rect",":first-child"),i=0*t.padding,s=i/2;n.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-s).attr("y",t.y-t.height/2-s).attr("width",t.width+i).attr("height",t.height+i).attr("fill","none");const o=n.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(a){return vu(t,a)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),$q=R(async(e,t)=>{const r=He(),{themeVariables:n,handDrawnSeed:i}=r,{altBackground:s,compositeBackground:o,compositeTitleBackground:a,nodeBorder:l}=n,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.look),u=c.insert("g",":first-child"),h=c.insert("g").attr("class","cluster-label");let d=c.append("rect");const g=h.node().appendChild(await Xa(t.label,t.labelStyle,void 0,!0));let y=g.getBBox();if(Lr(r.flowchart.htmlLabels)){const $=g.children[0],O=Re(g);y=$.getBoundingClientRect(),O.attr("width",y.width),O.attr("height",y.height)}const f=0*t.padding,p=f/2,m=(t.width<=y.width+t.padding?y.width+t.padding:t.width)+f;t.width<=y.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+f,w=t.height+f-y.height-6,x=t.x-m/2,E=t.y-b/2;t.width=m;const S=t.y-t.height/2-p+y.height+2;let C;if(t.look==="handDrawn"){const $=t.cssClasses.includes("statediagram-cluster-alt"),O=qt.svg(c),I=t.rx||t.ry?O.path(Do(x,E,m,b,10),{roughness:.7,fill:a,fillStyle:"solid",stroke:l,seed:i}):O.rectangle(x,E,m,b,{seed:i});C=c.insert(()=>I,":first-child");const M=O.rectangle(x,S,m,w,{fill:$?s:o,fillStyle:$?"hachure":"solid",stroke:l,seed:i});C=c.insert(()=>I,":first-child"),d=c.insert(()=>M)}else C=u.insert("rect",":first-child"),C.attr("class","outer").attr("x",x).attr("y",E).attr("width",m).attr("height",b).attr("data-look",t.look),d.attr("class","inner").attr("x",x).attr("y",S).attr("width",m).attr("height",w);h.attr("transform",`translate(${t.x-y.width/2}, ${E+1-(Lr(r.flowchart.htmlLabels)?0:3)})`);const A=C.node().getBBox();return t.height=A.height,t.offsetX=0,t.offsetY=y.height-t.padding/2,t.labelBBox=y,t.intersect=function($){return vu(t,$)},{cluster:c,labelBBox:y}},"roundedWithTitle"),Bq=R(async(e,t)=>{St.info("Creating subgraph rect for ",t.id,t);const r=He(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:s,clusterBorder:o}=n,{labelStyles:a,nodeStyles:l,borderStyles:c,backgroundStyles:u}=Qt(t),h=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),d=Lr(r.flowchart.htmlLabels),g=h.insert("g").attr("class","cluster-label "),y=await xa(g,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width});let f=y.getBBox();if(Lr(r.flowchart.htmlLabels)){const C=y.children[0],A=Re(y);f=C.getBoundingClientRect(),A.attr("width",f.width),A.attr("height",f.height)}const p=t.width<=f.width+t.padding?f.width+t.padding:t.width;t.width<=f.width+t.padding?t.diff=(p-t.width)/2-t.padding:t.diff=-t.padding;const m=t.height,b=t.x-p/2,w=t.y-m/2;St.trace("Data ",t,JSON.stringify(t));let x;if(t.look==="handDrawn"){const C=qt.svg(h),A=Yt(t,{roughness:.7,fill:s,stroke:o,fillWeight:4,seed:i}),$=C.path(Do(b,w,p,m,t.rx),A);x=h.insert(()=>(St.debug("Rough node insert CXC",$),$),":first-child"),x.select("path:nth-child(2)").attr("style",c.join(";")),x.select("path").attr("style",u.join(";").replace("fill","stroke"))}else x=h.insert("rect",":first-child"),x.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",w).attr("width",p).attr("height",m);const{subGraphTitleTopMargin:E}=Ow(r);if(g.attr("transform",`translate(${t.x-f.width/2}, ${t.y-t.height/2+E})`),a){const C=g.select("span");C&&C.attr("style",a)}const S=x.node().getBBox();return t.offsetX=0,t.width=S.width,t.height=S.height,t.offsetY=f.height-t.padding/2,t.intersect=function(C){return vu(t,C)},{cluster:h,labelBBox:f}},"kanbanSection"),Rq=R((e,t)=>{const r=He(),{themeVariables:n,handDrawnSeed:i}=r,{nodeBorder:s}=n,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),a=o.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const u=t.height+l,h=t.x-c/2,d=t.y-u/2;t.width=c;let g;if(t.look==="handDrawn"){const p=qt.svg(o).rectangle(h,d,c,u,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:s,seed:i});g=o.insert(()=>p,":first-child")}else g=a.insert("rect",":first-child"),g.attr("class","divider").attr("x",h).attr("y",d).attr("width",c).attr("height",u).attr("data-look",t.look);const y=g.node().getBBox();return t.height=y.height,t.offsetX=0,t.offsetY=0,t.intersect=function(f){return vu(t,f)},{cluster:o,labelBBox:{}}},"divider"),Nq=j5,Lq={rect:j5,squareRect:Nq,roundedWithTitle:$q,noteGroup:Iq,divider:Rq,kanbanSection:Bq},z5=new Map,Mq=R(async(e,t)=>{const r=t.shape||"rect",n=await Lq[r](e,t);return z5.set(t.id,n),n},"insertCluster"),Eft=R(()=>{z5=new Map},"clear");function U5(e,t){return e.intersect(t)}R(U5,"intersectNode");var jq=U5;function V5(e,t,r,n){var i=e.x,s=e.y,o=i-n.x,a=s-n.y,l=Math.sqrt(t*t*a*a+r*r*o*o),c=Math.abs(t*r*o/l);n.x0}R(Y1,"sameSign");var Uq=H5;function G5(e,t,r){let n=e.x,i=e.y,s=[],o=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(u){o=Math.min(o,u.x),a=Math.min(a,u.y)}):(o=Math.min(o,t.x),a=Math.min(a,t.y));let l=n-e.width/2-o,c=i-e.height/2-a;for(let u=0;u1&&s.sort(function(u,h){let d=u.x-r.x,g=u.y-r.y,y=Math.sqrt(d*d+g*g),f=h.x-r.x,p=h.y-r.y,m=Math.sqrt(f*f+p*p);return yu,":first-child");return h.attr("class","anchor").attr("style",Cn(a)),Zt(t,h),t.intersect=function(d){return St.info("Circle intersect",t,o,d),Wt.circle(t,o,d)},s}R(Y5,"anchor");function K1(e,t,r,n,i,s,o){const l=(e+r)/2,c=(t+n)/2,u=Math.atan2(n-t,r-e),h=(r-e)/2,d=(n-t)/2,g=h/i,y=d/s,f=Math.sqrt(g**2+y**2);if(f>1)throw new Error("The given radii are too small to create an arc between the points.");const p=Math.sqrt(1-f**2),m=l+p*s*Math.sin(u)*(o?-1:1),b=c-p*i*Math.cos(u)*(o?-1:1),w=Math.atan2((t-b)/s,(e-m)/i);let E=Math.atan2((n-b)/s,(r-m)/i)-w;o&&E<0&&(E+=2*Math.PI),!o&&E>0&&(E-=2*Math.PI);const S=[];for(let C=0;C<20;C++){const A=C/19,$=w+A*E,O=m+i*Math.cos($),I=b+s*Math.sin($);S.push({x:O,y:I})}return S}R(K1,"generateArcPoints");async function K5(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.labelStyle=r;const{shapeSvg:i,bbox:s}=await fe(e,t,ae(t)),o=s.width+t.padding+20,a=s.height+t.padding,l=a/2,c=l/(2.5+a/50),{cssStyles:u}=t,h=[{x:o/2,y:-a/2},{x:-o/2,y:-a/2},...K1(-o/2,-a/2,-o/2,a/2,c,l,!1),{x:o/2,y:a/2},...K1(o/2,a/2,o/2,-a/2,c,l,!0)],d=qt.svg(i),g=Yt(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=Le(h),f=d.path(y,g),p=i.insert(()=>f,":first-child");return p.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",u),n&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",n),p.attr("transform",`translate(${c/2}, 0)`),Zt(t,p),t.intersect=function(m){return Wt.polygon(t,h,m)},i}R(K5,"bowTieRect");function To(e,t,r,n){return e.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}R(To,"insertPolygonShape");async function X5(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.labelStyle=r;const{shapeSvg:i,bbox:s}=await fe(e,t,ae(t)),o=s.height+t.padding,a=12,l=s.width+t.padding+a,c=0,u=l,h=-o,d=0,g=[{x:c+a,y:h},{x:u,y:h},{x:u,y:d},{x:c,y:d},{x:c,y:h+a},{x:c+a,y:h}];let y;const{cssStyles:f}=t;if(t.look==="handDrawn"){const p=qt.svg(i),m=Yt(t,{}),b=Le(g),w=p.path(b,m);y=i.insert(()=>w,":first-child").attr("transform",`translate(${-l/2}, ${o/2})`),f&&y.attr("style",f)}else y=To(i,l,o,g);return n&&y.attr("style",n),Zt(t,y),t.intersect=function(p){return Wt.polygon(t,g,p)},i}R(X5,"card");function J5(e,t){const{nodeStyles:r}=Qt(t);t.label="";const n=e.insert("g").attr("class",ae(t)).attr("id",t.domId??t.id),{cssStyles:i}=t,s=Math.max(28,t.width??0),o=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}],a=qt.svg(n),l=Yt(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=Le(o),u=a.path(c,l),h=n.insert(()=>u,":first-child");return i&&t.look!=="handDrawn"&&h.selectAll("path").attr("style",i),r&&t.look!=="handDrawn"&&h.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(d){return Wt.polygon(t,o,d)},n}R(J5,"choice");async function Z5(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.labelStyle=r;const{shapeSvg:i,bbox:s,halfPadding:o}=await fe(e,t,ae(t)),a=s.width/2+o;let l;const{cssStyles:c}=t;if(t.look==="handDrawn"){const u=qt.svg(i),h=Yt(t,{}),d=u.circle(0,0,a*2,h);l=i.insert(()=>d,":first-child"),l.attr("class","basic label-container").attr("style",Cn(c))}else l=i.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",a).attr("cx",0).attr("cy",0);return Zt(t,l),t.intersect=function(u){return St.info("Circle intersect",t,a,u),Wt.circle(t,a,u)},i}R(Z5,"circle");function Q5(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),n=e*2,i={x:n/2*t,y:n/2*r},s={x:-(n/2)*t,y:n/2*r},o={x:-(n/2)*t,y:-(n/2)*r},a={x:n/2*t,y:-(n/2)*r};return`M ${s.x},${s.y} L ${a.x},${a.y} M ${i.x},${i.y} L ${o.x},${o.y}`}R(Q5,"createLine");function tP(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.labelStyle=r,t.label="";const i=e.insert("g").attr("class",ae(t)).attr("id",t.domId??t.id),s=Math.max(30,t?.width??0),{cssStyles:o}=t,a=qt.svg(i),l=Yt(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=a.circle(0,0,s*2,l),u=Q5(s),h=a.path(u,l),d=i.insert(()=>c,":first-child");return d.insert(()=>h),o&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",o),n&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",n),Zt(t,d),t.intersect=function(g){return St.info("crossedCircle intersect",t,{radius:s,point:g}),Wt.circle(t,s,g)},i}R(tP,"crossedCircle");function Zs(e,t,r,n=100,i=0,s=180){const o=[],a=i*Math.PI/180,u=(s*Math.PI/180-a)/(n-1);for(let h=0;hw,":first-child").attr("stroke-opacity",0),x.insert(()=>m,":first-child"),x.attr("class","text"),u&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",u),n&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",n),x.attr("transform",`translate(${c}, 0)`),o.attr("transform",`translate(${-a/2+c-(s.x-(s.left??0))},${-l/2+(t.padding??0)/2-(s.y-(s.top??0))})`),Zt(t,x),t.intersect=function(E){return Wt.polygon(t,d,E)},i}R(eP,"curlyBraceLeft");function Qs(e,t,r,n=100,i=0,s=180){const o=[],a=i*Math.PI/180,u=(s*Math.PI/180-a)/(n-1);for(let h=0;hw,":first-child").attr("stroke-opacity",0),x.insert(()=>m,":first-child"),x.attr("class","text"),u&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",u),n&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",n),x.attr("transform",`translate(${-c}, 0)`),o.attr("transform",`translate(${-a/2+(t.padding??0)/2-(s.x-(s.left??0))},${-l/2+(t.padding??0)/2-(s.y-(s.top??0))})`),Zt(t,x),t.intersect=function(E){return Wt.polygon(t,d,E)},i}R(rP,"curlyBraceRight");function Jr(e,t,r,n=100,i=0,s=180){const o=[],a=i*Math.PI/180,u=(s*Math.PI/180-a)/(n-1);for(let h=0;hC,":first-child").attr("stroke-opacity",0),A.insert(()=>b,":first-child"),A.insert(()=>E,":first-child"),A.attr("class","text"),u&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",u),n&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",n),A.attr("transform",`translate(${c-c/4}, 0)`),o.attr("transform",`translate(${-a/2+(t.padding??0)/2-(s.x-(s.left??0))},${-l/2+(t.padding??0)/2-(s.y-(s.top??0))})`),Zt(t,A),t.intersect=function($){return Wt.polygon(t,g,$)},i}R(nP,"curlyBraces");async function iP(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.labelStyle=r;const{shapeSvg:i,bbox:s}=await fe(e,t,ae(t)),o=80,a=20,l=Math.max(o,(s.width+(t.padding??0)*2)*1.25,t?.width??0),c=Math.max(a,s.height+(t.padding??0)*2,t?.height??0),u=c/2,{cssStyles:h}=t,d=qt.svg(i),g=Yt(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=l,f=c,p=y-u,m=f/4,b=[{x:p,y:0},{x:m,y:0},{x:0,y:f/2},{x:m,y:f},{x:p,y:f},...dx(-p,-f/2,u,50,270,90)],w=Le(b),x=d.path(w,g),E=i.insert(()=>x,":first-child");return E.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&E.selectChildren("path").attr("style",h),n&&t.look!=="handDrawn"&&E.selectChildren("path").attr("style",n),E.attr("transform",`translate(${-l/2}, ${-c/2})`),Zt(t,E),t.intersect=function(S){return Wt.polygon(t,b,S)},i}R(iP,"curvedTrapezoid");var Wq=R((e,t,r,n,i,s)=>[`M${e},${t+s}`,`a${i},${s} 0,0,0 ${r},0`,`a${i},${s} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${s} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createCylinderPathD"),qq=R((e,t,r,n,i,s)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${i},${s} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${s} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createOuterCylinderPathD"),Hq=R((e,t,r,n,i,s)=>[`M${e-r/2},${-n/2}`,`a${i},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function sP(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.labelStyle=r;const{shapeSvg:i,bbox:s,label:o}=await fe(e,t,ae(t)),a=Math.max(s.width+t.padding,t.width??0),l=a/2,c=l/(2.5+a/50),u=Math.max(s.height+c+t.padding,t.height??0);let h;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=qt.svg(i),y=qq(0,0,a,u,l,c),f=Hq(0,c,a,u,l,c),p=g.path(y,Yt(t,{})),m=g.path(f,Yt(t,{fill:"none"}));h=i.insert(()=>m,":first-child"),h=i.insert(()=>p,":first-child"),h.attr("class","basic label-container"),d&&h.attr("style",d)}else{const g=Wq(0,0,a,u,l,c);h=i.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",Cn(d)).attr("style",n)}return h.attr("label-offset-y",c),h.attr("transform",`translate(${-a/2}, ${-(u/2+c)})`),Zt(t,h),o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${-(s.height/2)+(t.padding??0)/1.5-(s.y-(s.top??0))})`),t.intersect=function(g){const y=Wt.rect(t,g),f=y.x-(t.x??0);if(l!=0&&(Math.abs(f)<(t.width??0)/2||Math.abs(f)==(t.width??0)/2&&Math.abs(y.y-(t.y??0))>(t.height??0)/2-c)){let p=c*c*(1-f*f/(l*l));p>0&&(p=Math.sqrt(p)),p=c-p,g.y-(t.y??0)>0&&(p=-p),y.y+=p}return y},i}R(sP,"cylinder");async function oP(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.labelStyle=r;const{shapeSvg:i,bbox:s,label:o}=await fe(e,t,ae(t)),a=s.width+t.padding,l=s.height+t.padding,c=l*.2,u=-a/2,h=-l/2-c/2,{cssStyles:d}=t,g=qt.svg(i),y=Yt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const f=[{x:u,y:h+c},{x:-u,y:h+c},{x:-u,y:-h},{x:u,y:-h},{x:u,y:h},{x:-u,y:h},{x:-u,y:h+c}],p=g.polygon(f.map(b=>[b.x,b.y]),y),m=i.insert(()=>p,":first-child");return m.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",d),n&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",n),o.attr("transform",`translate(${u+(t.padding??0)/2-(s.x-(s.left??0))}, ${h+c+(t.padding??0)/2-(s.y-(s.top??0))})`),Zt(t,m),t.intersect=function(b){return Wt.rect(t,b)},i}R(oP,"dividedRectangle");async function aP(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.labelStyle=r;const{shapeSvg:i,bbox:s,halfPadding:o}=await fe(e,t,ae(t)),l=s.width/2+o+5,c=s.width/2+o;let u;const{cssStyles:h}=t;if(t.look==="handDrawn"){const d=qt.svg(i),g=Yt(t,{roughness:.2,strokeWidth:2.5}),y=Yt(t,{roughness:.2,strokeWidth:1.5}),f=d.circle(0,0,l*2,g),p=d.circle(0,0,c*2,y);u=i.insert("g",":first-child"),u.attr("class",Cn(t.cssClasses)).attr("style",Cn(h)),u.node()?.appendChild(f),u.node()?.appendChild(p)}else{u=i.insert("g",":first-child");const d=u.insert("circle",":first-child"),g=u.insert("circle");u.attr("class","basic label-container").attr("style",n),d.attr("class","outer-circle").attr("style",n).attr("r",l).attr("cx",0).attr("cy",0),g.attr("class","inner-circle").attr("style",n).attr("r",c).attr("cx",0).attr("cy",0)}return Zt(t,u),t.intersect=function(d){return St.info("DoubleCircle intersect",t,l,d),Wt.circle(t,l,d)},i}R(aP,"doublecircle");function lP(e,t,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:i}=Qt(t);t.label="",t.labelStyle=n;const s=e.insert("g").attr("class",ae(t)).attr("id",t.domId??t.id),o=7,{cssStyles:a}=t,l=qt.svg(s),{nodeBorder:c}=r,u=Yt(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(u.roughness=0);const h=l.circle(0,0,o*2,u),d=s.insert(()=>h,":first-child");return d.selectAll("path").attr("style",`fill: ${c} !important;`),a&&a.length>0&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",i),Zt(t,d),t.intersect=function(g){return St.info("filledCircle intersect",t,{radius:o,point:g}),Wt.circle(t,o,g)},s}R(lP,"filledCircle");async function cP(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.labelStyle=r;const{shapeSvg:i,bbox:s,label:o}=await fe(e,t,ae(t)),a=s.width+(t.padding??0),l=a+s.height,c=a+s.height,u=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],{cssStyles:h}=t,d=qt.svg(i),g=Yt(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=Le(u),f=d.path(y,g),p=i.insert(()=>f,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return h&&t.look!=="handDrawn"&&p.selectChildren("path").attr("style",h),n&&t.look!=="handDrawn"&&p.selectChildren("path").attr("style",n),t.width=a,t.height=l,Zt(t,p),o.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-l/2+(t.padding??0)/2+(s.y-(s.top??0))})`),t.intersect=function(m){return St.info("Triangle intersect",t,u,m),Wt.polygon(t,u,m)},i}R(cP,"flippedTriangle");function uP(e,t,{dir:r,config:{state:n,themeVariables:i}}){const{nodeStyles:s}=Qt(t);t.label="";const o=e.insert("g").attr("class",ae(t)).attr("id",t.domId??t.id),{cssStyles:a}=t;let l=Math.max(70,t?.width??0),c=Math.max(10,t?.height??0);r==="LR"&&(l=Math.max(10,t?.width??0),c=Math.max(70,t?.height??0));const u=-1*l/2,h=-1*c/2,d=qt.svg(o),g=Yt(t,{stroke:i.lineColor,fill:i.lineColor});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=d.rectangle(u,h,l,c,g),f=o.insert(()=>y,":first-child");a&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",a),s&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",s),Zt(t,f);const p=n?.padding??0;return t.width&&t.height&&(t.width+=p/2||0,t.height+=p/2||0),t.intersect=function(m){return Wt.rect(t,m)},o}R(uP,"forkJoin");async function hP(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.labelStyle=r;const i=80,s=50,{shapeSvg:o,bbox:a}=await fe(e,t,ae(t)),l=Math.max(i,a.width+(t.padding??0)*2,t?.width??0),c=Math.max(s,a.height+(t.padding??0)*2,t?.height??0),u=c/2,{cssStyles:h}=t,d=qt.svg(o),g=Yt(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=[{x:-l/2,y:-c/2},{x:l/2-u,y:-c/2},...dx(-l/2+u,0,u,50,90,270),{x:l/2-u,y:c/2},{x:-l/2,y:c/2}],f=Le(y),p=d.path(f,g),m=o.insert(()=>p,":first-child");return m.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",h),n&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",n),Zt(t,m),t.intersect=function(b){return St.info("Pill intersect",t,{radius:u,point:b}),Wt.polygon(t,y,b)},o}R(hP,"halfRoundedRectangle");var Gq=R((e,t,r,n,i)=>[`M${e+i},${t}`,`L${e+r-i},${t}`,`L${e+r},${t-n/2}`,`L${e+r-i},${t-n}`,`L${e+i},${t-n}`,`L${e},${t-n/2}`,"Z"].join(" "),"createHexagonPathD");async function fP(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.labelStyle=r;const{shapeSvg:i,bbox:s}=await fe(e,t,ae(t)),o=4,a=s.height+t.padding,l=a/o,c=s.width+2*l+t.padding,u=[{x:l,y:0},{x:c-l,y:0},{x:c,y:-a/2},{x:c-l,y:-a},{x:l,y:-a},{x:0,y:-a/2}];let h;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=qt.svg(i),y=Yt(t,{}),f=Gq(0,0,c,a,l),p=g.path(f,y);h=i.insert(()=>p,":first-child").attr("transform",`translate(${-c/2}, ${a/2})`),d&&h.attr("style",d)}else h=To(i,c,a,u);return n&&h.attr("style",n),t.width=c,t.height=a,Zt(t,h),t.intersect=function(g){return Wt.polygon(t,u,g)},i}R(fP,"hexagon");async function dP(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.label="",t.labelStyle=r;const{shapeSvg:i}=await fe(e,t,ae(t)),s=Math.max(30,t?.width??0),o=Math.max(30,t?.height??0),{cssStyles:a}=t,l=qt.svg(i),c=Yt(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const u=[{x:0,y:0},{x:s,y:0},{x:0,y:o},{x:s,y:o}],h=Le(u),d=l.path(h,c),g=i.insert(()=>d,":first-child");return g.attr("class","basic label-container"),a&&t.look!=="handDrawn"&&g.selectChildren("path").attr("style",a),n&&t.look!=="handDrawn"&&g.selectChildren("path").attr("style",n),g.attr("transform",`translate(${-s/2}, ${-o/2})`),Zt(t,g),t.intersect=function(y){return St.info("Pill intersect",t,{points:u}),Wt.polygon(t,u,y)},i}R(dP,"hourglass");async function pP(e,t,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=Qt(t);t.labelStyle=i;const s=t.assetHeight??48,o=t.assetWidth??48,a=Math.max(s,o),l=n?.wrappingWidth;t.width=Math.max(a,l??0);const{shapeSvg:c,bbox:u,label:h}=await fe(e,t,"icon-shape default"),d=t.pos==="t",g=a,y=a,{nodeBorder:f}=r,{stylesMap:p}=wu(t),m=-y/2,b=-g/2,w=t.label?8:0,x=qt.svg(c),E=Yt(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const S=x.rectangle(m,b,y,g,E),C=Math.max(y,u.width),A=g+u.height+w,$=x.rectangle(-C/2,-A/2,C,A,{...E,fill:"transparent",stroke:"none"}),O=c.insert(()=>S,":first-child"),I=c.insert(()=>$);if(t.icon){const M=c.append("g");M.html(`${await r0(t.icon,{height:a,width:a,fallbackPrefix:""})}`);const q=M.node().getBBox(),H=q.width,G=q.height,Y=q.x,F=q.y;M.attr("transform",`translate(${-H/2-Y},${d?u.height/2+w/2-G/2-F:-u.height/2-w/2-G/2-F})`),M.attr("style",`color: ${p.get("stroke")??f};`)}return h.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${d?-A/2:A/2-u.height})`),O.attr("transform",`translate(0,${d?u.height/2+w/2:-u.height/2-w/2})`),Zt(t,I),t.intersect=function(M){if(St.info("iconSquare intersect",t,M),!t.label)return Wt.rect(t,M);const q=t.x??0,H=t.y??0,G=t.height??0;let Y=[];return d?Y=[{x:q-u.width/2,y:H-G/2},{x:q+u.width/2,y:H-G/2},{x:q+u.width/2,y:H-G/2+u.height+w},{x:q+y/2,y:H-G/2+u.height+w},{x:q+y/2,y:H+G/2},{x:q-y/2,y:H+G/2},{x:q-y/2,y:H-G/2+u.height+w},{x:q-u.width/2,y:H-G/2+u.height+w}]:Y=[{x:q-y/2,y:H-G/2},{x:q+y/2,y:H-G/2},{x:q+y/2,y:H-G/2+g},{x:q+u.width/2,y:H-G/2+g},{x:q+u.width/2/2,y:H+G/2},{x:q-u.width/2,y:H+G/2},{x:q-u.width/2,y:H-G/2+g},{x:q-y/2,y:H-G/2+g}],Wt.polygon(t,Y,M)},c}R(pP,"icon");async function mP(e,t,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=Qt(t);t.labelStyle=i;const s=t.assetHeight??48,o=t.assetWidth??48,a=Math.max(s,o),l=n?.wrappingWidth;t.width=Math.max(a,l??0);const{shapeSvg:c,bbox:u,label:h}=await fe(e,t,"icon-shape default"),d=20,g=t.label?8:0,y=t.pos==="t",{nodeBorder:f,mainBkg:p}=r,{stylesMap:m}=wu(t),b=qt.svg(c),w=Yt(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const x=m.get("fill");w.stroke=x??p;const E=c.append("g");t.icon&&E.html(`${await r0(t.icon,{height:a,width:a,fallbackPrefix:""})}`);const S=E.node().getBBox(),C=S.width,A=S.height,$=S.x,O=S.y,I=Math.max(C,A)*Math.SQRT2+d*2,M=b.circle(0,0,I,w),q=Math.max(I,u.width),H=I+u.height+g,G=b.rectangle(-q/2,-H/2,q,H,{...w,fill:"transparent",stroke:"none"}),Y=c.insert(()=>M,":first-child"),F=c.insert(()=>G);return E.attr("transform",`translate(${-C/2-$},${y?u.height/2+g/2-A/2-O:-u.height/2-g/2-A/2-O})`),E.attr("style",`color: ${m.get("stroke")??f};`),h.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${y?-H/2:H/2-u.height})`),Y.attr("transform",`translate(0,${y?u.height/2+g/2:-u.height/2-g/2})`),Zt(t,F),t.intersect=function(T){return St.info("iconSquare intersect",t,T),Wt.rect(t,T)},c}R(mP,"iconCircle");async function gP(e,t,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=Qt(t);t.labelStyle=i;const s=t.assetHeight??48,o=t.assetWidth??48,a=Math.max(s,o),l=n?.wrappingWidth;t.width=Math.max(a,l??0);const{shapeSvg:c,bbox:u,halfPadding:h,label:d}=await fe(e,t,"icon-shape default"),g=t.pos==="t",y=a+h*2,f=a+h*2,{nodeBorder:p,mainBkg:m}=r,{stylesMap:b}=wu(t),w=-f/2,x=-y/2,E=t.label?8:0,S=qt.svg(c),C=Yt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const A=b.get("fill");C.stroke=A??m;const $=S.path(Do(w,x,f,y,5),C),O=Math.max(f,u.width),I=y+u.height+E,M=S.rectangle(-O/2,-I/2,O,I,{...C,fill:"transparent",stroke:"none"}),q=c.insert(()=>$,":first-child").attr("class","icon-shape2"),H=c.insert(()=>M);if(t.icon){const G=c.append("g");G.html(`${await r0(t.icon,{height:a,width:a,fallbackPrefix:""})}`);const Y=G.node().getBBox(),F=Y.width,T=Y.height,N=Y.x,U=Y.y;G.attr("transform",`translate(${-F/2-N},${g?u.height/2+E/2-T/2-U:-u.height/2-E/2-T/2-U})`),G.attr("style",`color: ${b.get("stroke")??p};`)}return d.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${g?-I/2:I/2-u.height})`),q.attr("transform",`translate(0,${g?u.height/2+E/2:-u.height/2-E/2})`),Zt(t,H),t.intersect=function(G){if(St.info("iconSquare intersect",t,G),!t.label)return Wt.rect(t,G);const Y=t.x??0,F=t.y??0,T=t.height??0;let N=[];return g?N=[{x:Y-u.width/2,y:F-T/2},{x:Y+u.width/2,y:F-T/2},{x:Y+u.width/2,y:F-T/2+u.height+E},{x:Y+f/2,y:F-T/2+u.height+E},{x:Y+f/2,y:F+T/2},{x:Y-f/2,y:F+T/2},{x:Y-f/2,y:F-T/2+u.height+E},{x:Y-u.width/2,y:F-T/2+u.height+E}]:N=[{x:Y-f/2,y:F-T/2},{x:Y+f/2,y:F-T/2},{x:Y+f/2,y:F-T/2+y},{x:Y+u.width/2,y:F-T/2+y},{x:Y+u.width/2/2,y:F+T/2},{x:Y-u.width/2,y:F+T/2},{x:Y-u.width/2,y:F-T/2+y},{x:Y-f/2,y:F-T/2+y}],Wt.polygon(t,N,G)},c}R(gP,"iconRounded");async function yP(e,t,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=Qt(t);t.labelStyle=i;const s=t.assetHeight??48,o=t.assetWidth??48,a=Math.max(s,o),l=n?.wrappingWidth;t.width=Math.max(a,l??0);const{shapeSvg:c,bbox:u,halfPadding:h,label:d}=await fe(e,t,"icon-shape default"),g=t.pos==="t",y=a+h*2,f=a+h*2,{nodeBorder:p,mainBkg:m}=r,{stylesMap:b}=wu(t),w=-f/2,x=-y/2,E=t.label?8:0,S=qt.svg(c),C=Yt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const A=b.get("fill");C.stroke=A??m;const $=S.path(Do(w,x,f,y,.1),C),O=Math.max(f,u.width),I=y+u.height+E,M=S.rectangle(-O/2,-I/2,O,I,{...C,fill:"transparent",stroke:"none"}),q=c.insert(()=>$,":first-child"),H=c.insert(()=>M);if(t.icon){const G=c.append("g");G.html(`${await r0(t.icon,{height:a,width:a,fallbackPrefix:""})}`);const Y=G.node().getBBox(),F=Y.width,T=Y.height,N=Y.x,U=Y.y;G.attr("transform",`translate(${-F/2-N},${g?u.height/2+E/2-T/2-U:-u.height/2-E/2-T/2-U})`),G.attr("style",`color: ${b.get("stroke")??p};`)}return d.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${g?-I/2:I/2-u.height})`),q.attr("transform",`translate(0,${g?u.height/2+E/2:-u.height/2-E/2})`),Zt(t,H),t.intersect=function(G){if(St.info("iconSquare intersect",t,G),!t.label)return Wt.rect(t,G);const Y=t.x??0,F=t.y??0,T=t.height??0;let N=[];return g?N=[{x:Y-u.width/2,y:F-T/2},{x:Y+u.width/2,y:F-T/2},{x:Y+u.width/2,y:F-T/2+u.height+E},{x:Y+f/2,y:F-T/2+u.height+E},{x:Y+f/2,y:F+T/2},{x:Y-f/2,y:F+T/2},{x:Y-f/2,y:F-T/2+u.height+E},{x:Y-u.width/2,y:F-T/2+u.height+E}]:N=[{x:Y-f/2,y:F-T/2},{x:Y+f/2,y:F-T/2},{x:Y+f/2,y:F-T/2+y},{x:Y+u.width/2,y:F-T/2+y},{x:Y+u.width/2/2,y:F+T/2},{x:Y-u.width/2,y:F+T/2},{x:Y-u.width/2,y:F-T/2+y},{x:Y-f/2,y:F-T/2+y}],Wt.polygon(t,N,G)},c}R(yP,"iconSquare");async function bP(e,t,{config:{flowchart:r}}){const n=new Image;n.src=t?.img??"",await n.decode();const i=Number(n.naturalWidth.toString().replace("px","")),s=Number(n.naturalHeight.toString().replace("px",""));t.imageAspectRatio=i/s;const{labelStyles:o}=Qt(t);t.labelStyle=o;const a=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;const l=Math.max(t.label?a??0:0,t?.assetWidth??i),c=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,u=t.constraint==="on"?c/t.imageAspectRatio:t?.assetHeight??s;t.width=Math.max(c,a??0);const{shapeSvg:h,bbox:d,label:g}=await fe(e,t,"image-shape default"),y=t.pos==="t",f=-c/2,p=-u/2,m=t.label?8:0,b=qt.svg(h),w=Yt(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const x=b.rectangle(f,p,c,u,w),E=Math.max(c,d.width),S=u+d.height+m,C=b.rectangle(-E/2,-S/2,E,S,{...w,fill:"none",stroke:"none"}),A=h.insert(()=>x,":first-child"),$=h.insert(()=>C);if(t.img){const O=h.append("image");O.attr("href",t.img),O.attr("width",c),O.attr("height",u),O.attr("preserveAspectRatio","none"),O.attr("transform",`translate(${-c/2},${y?S/2-u:-S/2})`)}return g.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${y?-u/2-d.height/2-m/2:u/2-d.height/2+m/2})`),A.attr("transform",`translate(0,${y?d.height/2+m/2:-d.height/2-m/2})`),Zt(t,$),t.intersect=function(O){if(St.info("iconSquare intersect",t,O),!t.label)return Wt.rect(t,O);const I=t.x??0,M=t.y??0,q=t.height??0;let H=[];return y?H=[{x:I-d.width/2,y:M-q/2},{x:I+d.width/2,y:M-q/2},{x:I+d.width/2,y:M-q/2+d.height+m},{x:I+c/2,y:M-q/2+d.height+m},{x:I+c/2,y:M+q/2},{x:I-c/2,y:M+q/2},{x:I-c/2,y:M-q/2+d.height+m},{x:I-d.width/2,y:M-q/2+d.height+m}]:H=[{x:I-c/2,y:M-q/2},{x:I+c/2,y:M-q/2},{x:I+c/2,y:M-q/2+u},{x:I+d.width/2,y:M-q/2+u},{x:I+d.width/2/2,y:M+q/2},{x:I-d.width/2,y:M+q/2},{x:I-d.width/2,y:M-q/2+u},{x:I-c/2,y:M-q/2+u}],Wt.polygon(t,H,O)},h}R(bP,"imageSquare");async function vP(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.labelStyle=r;const{shapeSvg:i,bbox:s}=await fe(e,t,ae(t)),o=Math.max(s.width+(t.padding??0)*2,t?.width??0),a=Math.max(s.height+(t.padding??0)*2,t?.height??0),l=[{x:0,y:0},{x:o,y:0},{x:o+3*a/6,y:-a},{x:-3*a/6,y:-a}];let c;const{cssStyles:u}=t;if(t.look==="handDrawn"){const h=qt.svg(i),d=Yt(t,{}),g=Le(l),y=h.path(g,d);c=i.insert(()=>y,":first-child").attr("transform",`translate(${-o/2}, ${a/2})`),u&&c.attr("style",u)}else c=To(i,o,a,l);return n&&c.attr("style",n),t.width=o,t.height=a,Zt(t,c),t.intersect=function(h){return Wt.polygon(t,l,h)},i}R(vP,"inv_trapezoid");async function Zf(e,t,r){const{labelStyles:n,nodeStyles:i}=Qt(t);t.labelStyle=n;const{shapeSvg:s,bbox:o}=await fe(e,t,ae(t)),a=Math.max(o.width+r.labelPaddingX*2,t?.width||0),l=Math.max(o.height+r.labelPaddingY*2,t?.height||0),c=-a/2,u=-l/2;let h,{rx:d,ry:g}=t;const{cssStyles:y}=t;if(r?.rx&&r.ry&&(d=r.rx,g=r.ry),t.look==="handDrawn"){const f=qt.svg(s),p=Yt(t,{}),m=d||g?f.path(Do(c,u,a,l,d||0),p):f.rectangle(c,u,a,l,p);h=s.insert(()=>m,":first-child"),h.attr("class","basic label-container").attr("style",Cn(y))}else h=s.insert("rect",":first-child"),h.attr("class","basic label-container").attr("style",i).attr("rx",Cn(d)).attr("ry",Cn(g)).attr("x",c).attr("y",u).attr("width",a).attr("height",l);return Zt(t,h),t.intersect=function(f){return Wt.rect(t,f)},s}R(Zf,"drawRect");async function wP(e,t){const{shapeSvg:r,bbox:n,label:i}=await fe(e,t,"label"),s=r.insert("rect",":first-child");return s.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),i.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Zt(t,s),t.intersect=function(l){return Wt.rect(t,l)},r}R(wP,"labelRect");async function xP(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.labelStyle=r;const{shapeSvg:i,bbox:s}=await fe(e,t,ae(t)),o=Math.max(s.width+(t.padding??0),t?.width??0),a=Math.max(s.height+(t.padding??0),t?.height??0),l=[{x:0,y:0},{x:o+3*a/6,y:0},{x:o,y:-a},{x:-(3*a)/6,y:-a}];let c;const{cssStyles:u}=t;if(t.look==="handDrawn"){const h=qt.svg(i),d=Yt(t,{}),g=Le(l),y=h.path(g,d);c=i.insert(()=>y,":first-child").attr("transform",`translate(${-o/2}, ${a/2})`),u&&c.attr("style",u)}else c=To(i,o,a,l);return n&&c.attr("style",n),t.width=o,t.height=a,Zt(t,c),t.intersect=function(h){return Wt.polygon(t,l,h)},i}R(xP,"lean_left");async function _P(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.labelStyle=r;const{shapeSvg:i,bbox:s}=await fe(e,t,ae(t)),o=Math.max(s.width+(t.padding??0),t?.width??0),a=Math.max(s.height+(t.padding??0),t?.height??0),l=[{x:-3*a/6,y:0},{x:o,y:0},{x:o+3*a/6,y:-a},{x:0,y:-a}];let c;const{cssStyles:u}=t;if(t.look==="handDrawn"){const h=qt.svg(i),d=Yt(t,{}),g=Le(l),y=h.path(g,d);c=i.insert(()=>y,":first-child").attr("transform",`translate(${-o/2}, ${a/2})`),u&&c.attr("style",u)}else c=To(i,o,a,l);return n&&c.attr("style",n),t.width=o,t.height=a,Zt(t,c),t.intersect=function(h){return Wt.polygon(t,l,h)},i}R(_P,"lean_right");function SP(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.label="",t.labelStyle=r;const i=e.insert("g").attr("class",ae(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,o=Math.max(35,t?.width??0),a=Math.max(35,t?.height??0),l=7,c=[{x:o,y:0},{x:0,y:a+l/2},{x:o-2*l,y:a+l/2},{x:0,y:2*a},{x:o,y:a-l/2},{x:2*l,y:a-l/2}],u=qt.svg(i),h=Yt(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const d=Le(c),g=u.path(d,h),y=i.insert(()=>g,":first-child");return s&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",s),n&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",n),y.attr("transform",`translate(-${o/2},${-a})`),Zt(t,y),t.intersect=function(f){return St.info("lightningBolt intersect",t,f),Wt.polygon(t,c,f)},i}R(SP,"lightningBolt");var Yq=R((e,t,r,n,i,s,o)=>[`M${e},${t+s}`,`a${i},${s} 0,0,0 ${r},0`,`a${i},${s} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${s} 0,0,0 ${r},0`,`l0,${-n}`,`M${e},${t+s+o}`,`a${i},${s} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),Kq=R((e,t,r,n,i,s,o)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${i},${s} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${s} 0,0,0 ${r},0`,`l0,${-n}`,`M${e},${t+s+o}`,`a${i},${s} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),Xq=R((e,t,r,n,i,s)=>[`M${e-r/2},${-n/2}`,`a${i},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function EP(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.labelStyle=r;const{shapeSvg:i,bbox:s,label:o}=await fe(e,t,ae(t)),a=Math.max(s.width+(t.padding??0),t.width??0),l=a/2,c=l/(2.5+a/50),u=Math.max(s.height+c+(t.padding??0),t.height??0),h=u*.1;let d;const{cssStyles:g}=t;if(t.look==="handDrawn"){const y=qt.svg(i),f=Kq(0,0,a,u,l,c,h),p=Xq(0,c,a,u,l,c),m=Yt(t,{}),b=y.path(f,m),w=y.path(p,m);i.insert(()=>w,":first-child").attr("class","line"),d=i.insert(()=>b,":first-child"),d.attr("class","basic label-container"),g&&d.attr("style",g)}else{const y=Yq(0,0,a,u,l,c,h);d=i.insert("path",":first-child").attr("d",y).attr("class","basic label-container").attr("style",Cn(g)).attr("style",n)}return d.attr("label-offset-y",c),d.attr("transform",`translate(${-a/2}, ${-(u/2+c)})`),Zt(t,d),o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${-(s.height/2)+c-(s.y-(s.top??0))})`),t.intersect=function(y){const f=Wt.rect(t,y),p=f.x-(t.x??0);if(l!=0&&(Math.abs(p)<(t.width??0)/2||Math.abs(p)==(t.width??0)/2&&Math.abs(f.y-(t.y??0))>(t.height??0)/2-c)){let m=c*c*(1-p*p/(l*l));m>0&&(m=Math.sqrt(m)),m=c-m,y.y-(t.y??0)>0&&(m=-m),f.y+=m}return f},i}R(EP,"linedCylinder");async function CP(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.labelStyle=r;const{shapeSvg:i,bbox:s,label:o}=await fe(e,t,ae(t)),a=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=l/4,u=l+c,{cssStyles:h}=t,d=qt.svg(i),g=Yt(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=[{x:-a/2-a/2*.1,y:-u/2},{x:-a/2-a/2*.1,y:u/2},...oa(-a/2-a/2*.1,u/2,a/2+a/2*.1,u/2,c,.8),{x:a/2+a/2*.1,y:-u/2},{x:-a/2-a/2*.1,y:-u/2},{x:-a/2,y:-u/2},{x:-a/2,y:u/2*1.1},{x:-a/2,y:-u/2}],f=d.polygon(y.map(m=>[m.x,m.y]),g),p=i.insert(()=>f,":first-child");return p.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",h),n&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",n),p.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-a/2+(t.padding??0)+a/2*.1/2-(s.x-(s.left??0))},${-l/2+(t.padding??0)-c/2-(s.y-(s.top??0))})`),Zt(t,p),t.intersect=function(m){return Wt.polygon(t,y,m)},i}R(CP,"linedWaveEdgedRect");async function AP(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.labelStyle=r;const{shapeSvg:i,bbox:s,label:o}=await fe(e,t,ae(t)),a=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=5,u=-a/2,h=-l/2,{cssStyles:d}=t,g=qt.svg(i),y=Yt(t,{}),f=[{x:u-c,y:h+c},{x:u-c,y:h+l+c},{x:u+a-c,y:h+l+c},{x:u+a-c,y:h+l},{x:u+a,y:h+l},{x:u+a,y:h+l-c},{x:u+a+c,y:h+l-c},{x:u+a+c,y:h-c},{x:u+c,y:h-c},{x:u+c,y:h},{x:u,y:h},{x:u,y:h+c}],p=[{x:u,y:h+c},{x:u+a-c,y:h+c},{x:u+a-c,y:h+l},{x:u+a,y:h+l},{x:u+a,y:h},{x:u,y:h}];t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const m=Le(f),b=g.path(m,y),w=Le(p),x=g.path(w,{...y,fill:"none"}),E=i.insert(()=>x,":first-child");return E.insert(()=>b,":first-child"),E.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",d),n&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",n),o.attr("transform",`translate(${-(s.width/2)-c-(s.x-(s.left??0))}, ${-(s.height/2)+c-(s.y-(s.top??0))})`),Zt(t,E),t.intersect=function(S){return Wt.polygon(t,f,S)},i}R(AP,"multiRect");async function kP(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.labelStyle=r;const{shapeSvg:i,bbox:s,label:o}=await fe(e,t,ae(t)),a=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=l/4,u=l+c,h=-a/2,d=-u/2,g=5,{cssStyles:y}=t,f=oa(h-g,d+u+g,h+a-g,d+u+g,c,.8),p=f?.[f.length-1],m=[{x:h-g,y:d+g},{x:h-g,y:d+u+g},...f,{x:h+a-g,y:p.y-g},{x:h+a,y:p.y-g},{x:h+a,y:p.y-2*g},{x:h+a+g,y:p.y-2*g},{x:h+a+g,y:d-g},{x:h+g,y:d-g},{x:h+g,y:d},{x:h,y:d},{x:h,y:d+g}],b=[{x:h,y:d+g},{x:h+a-g,y:d+g},{x:h+a-g,y:p.y-g},{x:h+a,y:p.y-g},{x:h+a,y:d},{x:h,y:d}],w=qt.svg(i),x=Yt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const E=Le(m),S=w.path(E,x),C=Le(b),A=w.path(C,x),$=i.insert(()=>S,":first-child");return $.insert(()=>A),$.attr("class","basic label-container"),y&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",y),n&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",n),$.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-(s.width/2)-g-(s.x-(s.left??0))}, ${-(s.height/2)+g-c/2-(s.y-(s.top??0))})`),Zt(t,$),t.intersect=function(O){return Wt.polygon(t,m,O)},i}R(kP,"multiWaveEdgedRectangle");async function DP(e,t,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:i}=Qt(t);t.labelStyle=n,t.useHtmlLabels||Kn().flowchart?.htmlLabels!==!1||(t.centerLabel=!0);const{shapeSvg:o,bbox:a}=await fe(e,t,ae(t)),l=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),u=-l/2,h=-c/2,{cssStyles:d}=t,g=qt.svg(o),y=Yt(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const f=g.rectangle(u,h,l,c,y),p=o.insert(()=>f,":first-child");return p.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),Zt(t,p),t.intersect=function(m){return Wt.rect(t,m)},o}R(DP,"note");var Jq=R((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function TP(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.labelStyle=r;const{shapeSvg:i,bbox:s}=await fe(e,t,ae(t)),o=s.width+t.padding,a=s.height+t.padding,l=o+a,c=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let u;const{cssStyles:h}=t;if(t.look==="handDrawn"){const d=qt.svg(i),g=Yt(t,{}),y=Jq(0,0,l),f=d.path(y,g);u=i.insert(()=>f,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`),h&&u.attr("style",h)}else u=To(i,l,l,c);return n&&u.attr("style",n),Zt(t,u),t.intersect=function(d){return St.debug(`APA12 Intersect called SPLIT point:`,d,` node: `,t,` res:`,Wt.polygon(t,c,d)),Wt.polygon(t,c,d)},i}R(TP,"question");async function PP(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.labelStyle=r;const{shapeSvg:i,bbox:s,label:o}=await fe(e,t,ae(t)),a=Math.max(s.width+(t.padding??0),t?.width??0),l=Math.max(s.height+(t.padding??0),t?.height??0),c=-a/2,u=-l/2,h=u/2,d=[{x:c+h,y:u},{x:c,y:0},{x:c+h,y:-u},{x:-c,y:-u},{x:-c,y:u}],{cssStyles:g}=t,y=qt.svg(i),f=Yt(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const p=Le(d),m=y.path(p,f),b=i.insert(()=>m,":first-child");return b.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",g),n&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",n),b.attr("transform",`translate(${-h/2},0)`),o.attr("transform",`translate(${-h/2-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),Zt(t,b),t.intersect=function(w){return Wt.polygon(t,d,w)},i}R(PP,"rect_left_inv_arrow");async function FP(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.labelStyle=r;let i;t.cssClasses?i="node "+t.cssClasses:i="node default";const s=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=s.insert("g"),a=s.insert("g").attr("class","label").attr("style",n),l=t.description,c=t.label,u=a.node().appendChild(await Xa(c,t.labelStyle,!0,!0));let h={width:0,height:0};if(Lr(He()?.flowchart?.htmlLabels)){const A=u.children[0],$=Re(u);h=A.getBoundingClientRect(),$.attr("width",h.width),$.attr("height",h.height)}St.info("Text 2",l);const d=l||[],g=u.getBBox(),y=a.node().appendChild(await Xa(d.join?d.join("
    "):d,t.labelStyle,!0,!0)),f=y.children[0],p=Re(y);h=f.getBoundingClientRect(),p.attr("width",h.width),p.attr("height",h.height);const m=(t.padding||0)/2;Re(y).attr("transform","translate( "+(h.width>g.width?0:(g.width-h.width)/2)+", "+(g.height+m+5)+")"),Re(u).attr("transform","translate( "+(h.width(St.debug("Rough node insert CXC",O),I),":first-child"),S=s.insert(()=>(St.debug("Rough node insert CXC",O),O),":first-child")}else S=o.insert("rect",":first-child"),C=o.insert("line"),S.attr("class","outer title-state").attr("style",n).attr("x",-h.width/2-m).attr("y",-h.height/2-m).attr("width",h.width+(t.padding||0)).attr("height",h.height+(t.padding||0)),C.attr("class","divider").attr("x1",-h.width/2-m).attr("x2",h.width/2+m).attr("y1",-h.height/2-m+g.height+m).attr("y2",-h.height/2-m+g.height+m);return Zt(t,S),t.intersect=function(A){return Wt.rect(t,A)},s}R(FP,"rectWithTitle");async function OP(e,t){const r={rx:5,ry:5,labelPaddingX:(t?.padding||0)*1,labelPaddingY:(t?.padding||0)*1};return Zf(e,t,r)}R(OP,"roundedRect");async function IP(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.labelStyle=r;const{shapeSvg:i,bbox:s,label:o}=await fe(e,t,ae(t)),a=t?.padding??0,l=Math.max(s.width+(t.padding??0)*2,t?.width??0),c=Math.max(s.height+(t.padding??0)*2,t?.height??0),u=-s.width/2-a,h=-s.height/2-a,{cssStyles:d}=t,g=qt.svg(i),y=Yt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const f=[{x:u,y:h},{x:u+l+8,y:h},{x:u+l+8,y:h+c},{x:u-8,y:h+c},{x:u-8,y:h},{x:u,y:h},{x:u,y:h+c}],p=g.polygon(f.map(b=>[b.x,b.y]),y),m=i.insert(()=>p,":first-child");return m.attr("class","basic label-container").attr("style",Cn(d)),n&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",n),d&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",n),o.attr("transform",`translate(${-l/2+4+(t.padding??0)-(s.x-(s.left??0))},${-c/2+(t.padding??0)-(s.y-(s.top??0))})`),Zt(t,m),t.intersect=function(b){return Wt.rect(t,b)},i}R(IP,"shadedProcess");async function $P(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.labelStyle=r;const{shapeSvg:i,bbox:s,label:o}=await fe(e,t,ae(t)),a=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=-a/2,u=-l/2,{cssStyles:h}=t,d=qt.svg(i),g=Yt(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=[{x:c,y:u},{x:c,y:u+l},{x:c+a,y:u+l},{x:c+a,y:u-l/2}],f=Le(y),p=d.path(f,g),m=i.insert(()=>p,":first-child");return m.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",h),n&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",n),m.attr("transform",`translate(0, ${l/4})`),o.attr("transform",`translate(${-a/2+(t.padding??0)-(s.x-(s.left??0))}, ${-l/4+(t.padding??0)-(s.y-(s.top??0))})`),Zt(t,m),t.intersect=function(b){return Wt.polygon(t,y,b)},i}R($P,"slopedRect");async function BP(e,t){const r={rx:0,ry:0,labelPaddingX:(t?.padding||0)*2,labelPaddingY:(t?.padding||0)*1};return Zf(e,t,r)}R(BP,"squareRect");async function RP(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.labelStyle=r;const{shapeSvg:i,bbox:s}=await fe(e,t,ae(t)),o=s.height+t.padding,a=s.width+o/4+t.padding;let l;const{cssStyles:c}=t;if(t.look==="handDrawn"){const u=qt.svg(i),h=Yt(t,{}),d=Do(-a/2,-o/2,a,o,o/2),g=u.path(d,h);l=i.insert(()=>g,":first-child"),l.attr("class","basic label-container").attr("style",Cn(c))}else l=i.insert("rect",":first-child"),l.attr("class","basic label-container").attr("style",n).attr("rx",o/2).attr("ry",o/2).attr("x",-a/2).attr("y",-o/2).attr("width",a).attr("height",o);return Zt(t,l),t.intersect=function(u){return Wt.rect(t,u)},i}R(RP,"stadium");async function NP(e,t){return Zf(e,t,{rx:5,ry:5})}R(NP,"state");function LP(e,t,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:i}=Qt(t);t.labelStyle=n;const{cssStyles:s}=t,{lineColor:o,stateBorder:a,nodeBorder:l}=r,c=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),u=qt.svg(c),h=Yt(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const d=u.circle(0,0,14,{...h,stroke:o,strokeWidth:2}),g=a??l,y=u.circle(0,0,5,{...h,fill:g,stroke:g,strokeWidth:2,fillStyle:"solid"}),f=c.insert(()=>d,":first-child");return f.insert(()=>y),s&&f.selectAll("path").attr("style",s),i&&f.selectAll("path").attr("style",i),Zt(t,f),t.intersect=function(p){return Wt.circle(t,7,p)},c}R(LP,"stateEnd");function MP(e,t,{config:{themeVariables:r}}){const{lineColor:n}=r,i=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let s;if(t.look==="handDrawn"){const a=qt.svg(i).circle(0,0,14,Fq(n));s=i.insert(()=>a),s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else s=i.insert("circle",":first-child"),s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return Zt(t,s),t.intersect=function(o){return Wt.circle(t,7,o)},i}R(MP,"stateStart");async function jP(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.labelStyle=r;const{shapeSvg:i,bbox:s}=await fe(e,t,ae(t)),o=(t?.padding||0)/2,a=s.width+t.padding,l=s.height+t.padding,c=-s.width/2-o,u=-s.height/2-o,h=[{x:0,y:0},{x:a,y:0},{x:a,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:a+8,y:0},{x:a+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if(t.look==="handDrawn"){const d=qt.svg(i),g=Yt(t,{}),y=d.rectangle(c-8,u,a+16,l,g),f=d.line(c,u,c,u+l,g),p=d.line(c+a,u,c+a,u+l,g);i.insert(()=>f,":first-child"),i.insert(()=>p,":first-child");const m=i.insert(()=>y,":first-child"),{cssStyles:b}=t;m.attr("class","basic label-container").attr("style",Cn(b)),Zt(t,m)}else{const d=To(i,a,l,h);n&&d.attr("style",n),Zt(t,d)}return t.intersect=function(d){return Wt.polygon(t,h,d)},i}R(jP,"subroutine");async function zP(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.labelStyle=r;const{shapeSvg:i,bbox:s}=await fe(e,t,ae(t)),o=Math.max(s.width+(t.padding??0)*2,t?.width??0),a=Math.max(s.height+(t.padding??0)*2,t?.height??0),l=-o/2,c=-a/2,u=.2*a,h=.2*a,{cssStyles:d}=t,g=qt.svg(i),y=Yt(t,{}),f=[{x:l-u/2,y:c},{x:l+o+u/2,y:c},{x:l+o+u/2,y:c+a},{x:l-u/2,y:c+a}],p=[{x:l+o-u/2,y:c+a},{x:l+o+u/2,y:c+a},{x:l+o+u/2,y:c+a-h}];t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const m=Le(f),b=g.path(m,y),w=Le(p),x=g.path(w,{...y,fillStyle:"solid"}),E=i.insert(()=>x,":first-child");return E.insert(()=>b,":first-child"),E.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",d),n&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",n),Zt(t,E),t.intersect=function(S){return Wt.polygon(t,f,S)},i}R(zP,"taggedRect");async function UP(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.labelStyle=r;const{shapeSvg:i,bbox:s,label:o}=await fe(e,t,ae(t)),a=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=l/4,u=.2*a,h=.2*l,d=l+c,{cssStyles:g}=t,y=qt.svg(i),f=Yt(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const p=[{x:-a/2-a/2*.1,y:d/2},...oa(-a/2-a/2*.1,d/2,a/2+a/2*.1,d/2,c,.8),{x:a/2+a/2*.1,y:-d/2},{x:-a/2-a/2*.1,y:-d/2}],m=-a/2+a/2*.1,b=-d/2-h*.4,w=[{x:m+a-u,y:(b+l)*1.4},{x:m+a,y:b+l-h},{x:m+a,y:(b+l)*.9},...oa(m+a,(b+l)*1.3,m+a-u,(b+l)*1.5,-l*.03,.5)],x=Le(p),E=y.path(x,f),S=Le(w),C=y.path(S,{...f,fillStyle:"solid"}),A=i.insert(()=>C,":first-child");return A.insert(()=>E,":first-child"),A.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",g),n&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",n),A.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-a/2+(t.padding??0)-(s.x-(s.left??0))},${-l/2+(t.padding??0)-c/2-(s.y-(s.top??0))})`),Zt(t,A),t.intersect=function($){return Wt.polygon(t,p,$)},i}R(UP,"taggedWaveEdgedRectangle");async function VP(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.labelStyle=r;const{shapeSvg:i,bbox:s}=await fe(e,t,ae(t)),o=Math.max(s.width+t.padding,t?.width||0),a=Math.max(s.height+t.padding,t?.height||0),l=-o/2,c=-a/2,u=i.insert("rect",":first-child");return u.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",o).attr("height",a),Zt(t,u),t.intersect=function(h){return Wt.rect(t,h)},i}R(VP,"text");var Zq=R((e,t,r,n,i,s)=>`M${e},${t} a${i},${s} 0,0,1 0,${-n} l${r},0 a${i},${s} 0,0,1 0,${n} M${r},${-n} a${i},${s} 0,0,0 0,${n} l${-r},0`,"createCylinderPathD"),Qq=R((e,t,r,n,i,s)=>[`M${e},${t}`,`M${e+r},${t}`,`a${i},${s} 0,0,0 0,${-n}`,`l${-r},0`,`a${i},${s} 0,0,0 0,${n}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),tH=R((e,t,r,n,i,s)=>[`M${e+r/2},${-n/2}`,`a${i},${s} 0,0,0 0,${n}`].join(" "),"createInnerCylinderPathD");async function WP(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.labelStyle=r;const{shapeSvg:i,bbox:s,label:o,halfPadding:a}=await fe(e,t,ae(t)),l=t.look==="neo"?a*2:a,c=s.height+l,u=c/2,h=u/(2.5+c/50),d=s.width+h+l,{cssStyles:g}=t;let y;if(t.look==="handDrawn"){const f=qt.svg(i),p=Qq(0,0,d,c,h,u),m=tH(0,0,d,c,h,u),b=f.path(p,Yt(t,{})),w=f.path(m,Yt(t,{fill:"none"}));y=i.insert(()=>w,":first-child"),y=i.insert(()=>b,":first-child"),y.attr("class","basic label-container"),g&&y.attr("style",g)}else{const f=Zq(0,0,d,c,h,u);y=i.insert("path",":first-child").attr("d",f).attr("class","basic label-container").attr("style",Cn(g)).attr("style",n),y.attr("class","basic label-container"),g&&y.selectAll("path").attr("style",g),n&&y.selectAll("path").attr("style",n)}return y.attr("label-offset-x",h),y.attr("transform",`translate(${-d/2}, ${c/2} )`),o.attr("transform",`translate(${-(s.width/2)-h-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),Zt(t,y),t.intersect=function(f){const p=Wt.rect(t,f),m=p.y-(t.y??0);if(u!=0&&(Math.abs(m)<(t.height??0)/2||Math.abs(m)==(t.height??0)/2&&Math.abs(p.x-(t.x??0))>(t.width??0)/2-h)){let b=h*h*(1-m*m/(u*u));b!=0&&(b=Math.sqrt(Math.abs(b))),b=h-b,f.x-(t.x??0)>0&&(b=-b),p.x+=b}return p},i}R(WP,"tiltedCylinder");async function qP(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.labelStyle=r;const{shapeSvg:i,bbox:s}=await fe(e,t,ae(t)),o=s.width+t.padding,a=s.height+t.padding,l=[{x:-3*a/6,y:0},{x:o+3*a/6,y:0},{x:o,y:-a},{x:0,y:-a}];let c;const{cssStyles:u}=t;if(t.look==="handDrawn"){const h=qt.svg(i),d=Yt(t,{}),g=Le(l),y=h.path(g,d);c=i.insert(()=>y,":first-child").attr("transform",`translate(${-o/2}, ${a/2})`),u&&c.attr("style",u)}else c=To(i,o,a,l);return n&&c.attr("style",n),t.width=o,t.height=a,Zt(t,c),t.intersect=function(h){return Wt.polygon(t,l,h)},i}R(qP,"trapezoid");async function HP(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.labelStyle=r;const{shapeSvg:i,bbox:s}=await fe(e,t,ae(t)),o=60,a=20,l=Math.max(o,s.width+(t.padding??0)*2,t?.width??0),c=Math.max(a,s.height+(t.padding??0)*2,t?.height??0),{cssStyles:u}=t,h=qt.svg(i),d=Yt(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=[{x:-l/2*.8,y:-c/2},{x:l/2*.8,y:-c/2},{x:l/2,y:-c/2*.6},{x:l/2,y:c/2},{x:-l/2,y:c/2},{x:-l/2,y:-c/2*.6}],y=Le(g),f=h.path(y,d),p=i.insert(()=>f,":first-child");return p.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&p.selectChildren("path").attr("style",u),n&&t.look!=="handDrawn"&&p.selectChildren("path").attr("style",n),Zt(t,p),t.intersect=function(m){return Wt.polygon(t,g,m)},i}R(HP,"trapezoidalPentagon");async function GP(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.labelStyle=r;const{shapeSvg:i,bbox:s,label:o}=await fe(e,t,ae(t)),a=Lr(He().flowchart?.htmlLabels),l=s.width+(t.padding??0),c=l+s.height,u=l+s.height,h=[{x:0,y:0},{x:u,y:0},{x:u/2,y:-c}],{cssStyles:d}=t,g=qt.svg(i),y=Yt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const f=Le(h),p=g.path(f,y),m=i.insert(()=>p,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return d&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",d),n&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",n),t.width=l,t.height=c,Zt(t,m),o.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${c/2-(s.height+(t.padding??0)/(a?2:1)-(s.y-(s.top??0)))})`),t.intersect=function(b){return St.info("Triangle intersect",t,h,b),Wt.polygon(t,h,b)},i}R(GP,"triangle");async function YP(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.labelStyle=r;const{shapeSvg:i,bbox:s,label:o}=await fe(e,t,ae(t)),a=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=l/8,u=l+c,{cssStyles:h}=t,g=70-a,y=g>0?g/2:0,f=qt.svg(i),p=Yt(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const m=[{x:-a/2-y,y:u/2},...oa(-a/2-y,u/2,a/2+y,u/2,c,.8),{x:a/2+y,y:-u/2},{x:-a/2-y,y:-u/2}],b=Le(m),w=f.path(b,p),x=i.insert(()=>w,":first-child");return x.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",h),n&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",n),x.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-a/2+(t.padding??0)-(s.x-(s.left??0))},${-l/2+(t.padding??0)-c-(s.y-(s.top??0))})`),Zt(t,x),t.intersect=function(E){return Wt.polygon(t,m,E)},i}R(YP,"waveEdgedRectangle");async function KP(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.labelStyle=r;const{shapeSvg:i,bbox:s}=await fe(e,t,ae(t)),o=100,a=50,l=Math.max(s.width+(t.padding??0)*2,t?.width??0),c=Math.max(s.height+(t.padding??0)*2,t?.height??0),u=l/c;let h=l,d=c;h>d*u?d=h/u:h=d*u,h=Math.max(h,o),d=Math.max(d,a);const g=Math.min(d*.2,d/4),y=d+g*2,{cssStyles:f}=t,p=qt.svg(i),m=Yt(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=[{x:-h/2,y:y/2},...oa(-h/2,y/2,h/2,y/2,g,1),{x:h/2,y:-y/2},...oa(h/2,-y/2,-h/2,-y/2,g,-1)],w=Le(b),x=p.path(w,m),E=i.insert(()=>x,":first-child");return E.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",f),n&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",n),Zt(t,E),t.intersect=function(S){return Wt.polygon(t,b,S)},i}R(KP,"waveRectangle");async function XP(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.labelStyle=r;const{shapeSvg:i,bbox:s,label:o}=await fe(e,t,ae(t)),a=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=5,u=-a/2,h=-l/2,{cssStyles:d}=t,g=qt.svg(i),y=Yt(t,{}),f=[{x:u-c,y:h-c},{x:u-c,y:h+l},{x:u+a,y:h+l},{x:u+a,y:h-c}],p=`M${u-c},${h-c} L${u+a},${h-c} L${u+a},${h+l} L${u-c},${h+l} L${u-c},${h-c} M${u-c},${h} L${u+a},${h} M${u},${h-c} L${u},${h+l}`;t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const m=g.path(p,y),b=i.insert(()=>m,":first-child");return b.attr("transform",`translate(${c/2}, ${c/2})`),b.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",d),n&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",n),o.attr("transform",`translate(${-(s.width/2)+c/2-(s.x-(s.left??0))}, ${-(s.height/2)+c/2-(s.y-(s.top??0))})`),Zt(t,b),t.intersect=function(w){return Wt.polygon(t,f,w)},i}R(XP,"windowPane");async function px(e,t){const r=t;if(r.alias&&(t.label=r.alias),t.look==="handDrawn"){const{themeVariables:N}=Kn(),{background:U}=N,J={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${U}`]};await px(e,J)}const n=Kn();t.useHtmlLabels=n.htmlLabels;let i=n.er?.diagramPadding??10,s=n.er?.entityPadding??6;const{cssStyles:o}=t,{labelStyles:a}=Qt(t);if(r.attributes.length===0&&t.label){const N={rx:0,ry:0,labelPaddingX:i,labelPaddingY:i*1.5};go(t.label,n)+N.labelPaddingX*20){const N=u.width+i*2-(g+y+f+p);g+=N/w,y+=N/w,f>0&&(f+=N/w),p>0&&(p+=N/w)}const E=g+y+f+p,S=qt.svg(c),C=Yt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const A=Math.max(x.width+i*2,t?.width||0,E),$=Math.max(x.height+(d[0]||h)+s,t?.height||0),O=-A/2,I=-$/2;c.selectAll("g:not(:first-child)").each((N,U,J)=>{const W=Re(J[U]),z=W.attr("transform");let V=0,Z=0;if(z){const et=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(z);et&&(V=parseFloat(et[1]),Z=parseFloat(et[2]),W.attr("class").includes("attribute-name")?V+=g:W.attr("class").includes("attribute-keys")?V+=g+y:W.attr("class").includes("attribute-comment")&&(V+=g+y+f))}W.attr("transform",`translate(${O+i/2+V}, ${Z+I+u.height+s/2})`)}),c.select(".name").attr("transform","translate("+-u.width/2+", "+(I+s/2)+")");const M=S.rectangle(O,I,A,$,C),q=c.insert(()=>M,":first-child").attr("style",o.join("")),{themeVariables:H}=Kn(),{rowEven:G,rowOdd:Y,nodeBorder:F}=H;d.push(0);for(const[N,U]of d.entries()){if(N===0&&d.length>1)continue;const J=N%2===0&&U!==0,W=S.rectangle(O,u.height+I+U,A,u.height,{...C,fill:J?G:Y,stroke:F});c.insert(()=>W,"g.label").attr("style",o.join("")).attr("class",`row-rect-${N%2===0?"even":"odd"}`)}let T=S.line(O,u.height+I,A+O,u.height+I,C);c.insert(()=>T).attr("class","divider"),T=S.line(g+O,u.height+I,g+O,$+I,C),c.insert(()=>T).attr("class","divider"),m&&(T=S.line(g+y+O,u.height+I,g+y+O,$+I,C),c.insert(()=>T).attr("class","divider")),b&&(T=S.line(g+y+f+O,u.height+I,g+y+f+O,$+I,C),c.insert(()=>T).attr("class","divider"));for(const N of d)T=S.line(O,u.height+I+N,A+O,u.height+I+N,C),c.insert(()=>T).attr("class","divider");return Zt(t,q),t.intersect=function(N){return Wt.rect(t,N)},c}R(px,"erBox");async function fc(e,t,r,n=0,i=0,s=[],o=""){const a=e.insert("g").attr("class",`label ${s.join(" ")}`).attr("transform",`translate(${n}, ${i})`).attr("style",o);t!==V_(t)&&(t=V_(t),t=t.replaceAll("<","<").replaceAll(">",">"));const l=a.node().appendChild(await xa(a,t,{width:go(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let u=l.children[0];for(u.textContent=u.textContent.replaceAll("<","<").replaceAll(">",">");u.childNodes[0];)u=u.childNodes[0],u.textContent=u.textContent.replaceAll("<","<").replaceAll(">",">")}let c=l.getBBox();if(Lr(r.htmlLabels)){const u=l.children[0];u.style.textAlign="start";const h=Re(l);c=u.getBoundingClientRect(),h.attr("width",c.width),h.attr("height",c.height)}return c}R(fc,"addText");async function JP(e,t,r,n,i=r.class.padding??12){const s=n?0:3,o=e.insert("g").attr("class",ae(t)).attr("id",t.domId||t.id);let a=null,l=null,c=null,u=null,h=0,d=0,g=0;if(a=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await Ch(a,{text:`«${b}»`},0),h=a.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await Ch(l,t,0,["font-weight: bolder"]);const y=l.node().getBBox();d=y.height,c=o.insert("g").attr("class","members-group text");let f=0;for(const b of t.members){const w=await Ch(c,b,f,[b.parseClassifier()]);f+=w+s}g=c.node().getBBox().height,g<=0&&(g=i/2),u=o.insert("g").attr("class","methods-group text");let p=0;for(const b of t.methods){const w=await Ch(u,b,p,[b.parseClassifier()]);p+=w+s}let m=o.node().getBBox();if(a!==null){const b=a.node().getBBox();a.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-y.width/2}, ${h})`),m=o.node().getBBox(),c.attr("transform",`translate(0, ${h+d+i*2})`),m=o.node().getBBox(),u.attr("transform",`translate(0, ${h+d+(g?g+i*4:i*2)})`),m=o.node().getBBox(),{shapeSvg:o,bbox:m}}R(JP,"textHelper");async function Ch(e,t,r,n=[]){const i=e.insert("g").attr("class","label").attr("style",n.join("; ")),s=Kn();let o="useHtmlLabels"in t?t.useHtmlLabels:Lr(s.htmlLabels)??!0,a="";"text"in t?a=t.text:a=t.label,!o&&a.startsWith("\\")&&(a=a.substring(1)),Kc(a)&&(o=!0);const l=await xa(i,Ew(Pl(a)),{width:go(a,s)+50,classes:"markdown-node-label",useHtmlLabels:o},s);let c,u=1;if(o){const h=l.children[0],d=Re(l);u=h.innerHTML.split("
    ").length,h.innerHTML.includes("")&&(u+=h.innerHTML.split("").length-1);const g=h.getElementsByTagName("img");if(g){const y=a.replace(/]*>/g,"").trim()==="";await Promise.all([...g].map(f=>new Promise(p=>{function m(){if(f.style.display="flex",f.style.flexDirection="column",y){const b=s.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,x=parseInt(b,10)*5+"px";f.style.minWidth=x,f.style.maxWidth=x}else f.style.width="100%";p(f)}R(m,"setupImage"),setTimeout(()=>{f.complete&&m()}),f.addEventListener("error",m),f.addEventListener("load",m)})))}c=h.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}else{n.includes("font-weight: bolder")&&Re(l).selectAll("tspan").attr("font-weight",""),u=l.children.length;const h=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(h.textContent=a[0]+a.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),a[1]===" "&&(h.textContent=h.textContent[0]+" "+h.textContent.substring(1))),h.textContent==="undefined"&&(h.textContent=""),c=l.getBBox()}return i.attr("transform","translate(0,"+(-c.height/(2*u)+r)+")"),c.height}R(Ch,"addText");async function ZP(e,t){const r=He(),n=r.class.padding??12,i=n,s=t.useHtmlLabels??Lr(r.htmlLabels)??!0,o=t;o.annotations=o.annotations??[],o.members=o.members??[],o.methods=o.methods??[];const{shapeSvg:a,bbox:l}=await JP(e,t,r,s,i),{labelStyles:c,nodeStyles:u}=Qt(t);t.labelStyle=c,t.cssStyles=o.styles||"";const h=o.styles?.join(";")||u||"";t.cssStyles||(t.cssStyles=h.replaceAll("!important","").split(";"));const d=o.members.length===0&&o.methods.length===0&&!r.class?.hideEmptyMembersBox,g=qt.svg(a),y=Yt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const f=l.width;let p=l.height;o.members.length===0&&o.methods.length===0?p+=i:o.members.length>0&&o.methods.length===0&&(p+=i*2);const m=-f/2,b=-p/2,w=g.rectangle(m-n,b-n-(d?n:o.members.length===0&&o.methods.length===0?-n/2:0),f+2*n,p+2*n+(d?n*2:o.members.length===0&&o.methods.length===0?-n:0),y),x=a.insert(()=>w,":first-child");x.attr("class","basic label-container");const E=x.node().getBBox();a.selectAll(".text").each(($,O,I)=>{const M=Re(I[O]),q=M.attr("transform");let H=0;if(q){const T=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(q);T&&(H=parseFloat(T[2]))}let G=H+b+n-(d?n:o.members.length===0&&o.methods.length===0?-n/2:0);s||(G-=4);let Y=m;(M.attr("class").includes("label-group")||M.attr("class").includes("annotation-group"))&&(Y=-M.node()?.getBBox().width/2||0,a.selectAll("text").each(function(F,T,N){window.getComputedStyle(N[T]).textAnchor==="middle"&&(Y=0)})),M.attr("transform",`translate(${Y}, ${G})`)});const S=a.select(".annotation-group").node().getBBox().height-(d?n/2:0)||0,C=a.select(".label-group").node().getBBox().height-(d?n/2:0)||0,A=a.select(".members-group").node().getBBox().height-(d?n/2:0)||0;if(o.members.length>0||o.methods.length>0||d){const $=g.line(E.x,S+C+b+n,E.x+E.width,S+C+b+n,y);a.insert(()=>$).attr("class","divider").attr("style",h)}if(d||o.members.length>0||o.methods.length>0){const $=g.line(E.x,S+C+A+b+i*2+n,E.x+E.width,S+C+A+b+n+i*2,y);a.insert(()=>$).attr("class","divider").attr("style",h)}if(o.look!=="handDrawn"&&a.selectAll("path").attr("style",h),x.select(":nth-child(2)").attr("style",h),a.selectAll(".divider").select("path").attr("style",h),t.labelStyle?a.selectAll("span").attr("style",t.labelStyle):a.selectAll("span").attr("style",h),!s){const $=RegExp(/color\s*:\s*([^;]*)/),O=$.exec(h);if(O){const I=O[0].replace("color","fill");a.selectAll("tspan").attr("style",I)}else if(c){const I=$.exec(c);if(I){const M=I[0].replace("color","fill");a.selectAll("tspan").attr("style",M)}}}return Zt(t,x),t.intersect=function($){return Wt.rect(t,$)},a}R(ZP,"classBox");async function QP(e,t){const{labelStyles:r,nodeStyles:n}=Qt(t);t.labelStyle=r;const i=t,s=t,o=20,a=20,l="verifyMethod"in t,c=ae(t),u=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let h;l?h=await ys(u,`<<${i.type}>>`,0,t.labelStyle):h=await ys(u,"<<Element>>",0,t.labelStyle);let d=h;const g=await ys(u,i.name,d,t.labelStyle+"; font-weight: bold;");if(d+=g+a,l){const S=await ys(u,`${i.requirementId?`Id: ${i.requirementId}`:""}`,d,t.labelStyle);d+=S;const C=await ys(u,`${i.text?`Text: ${i.text}`:""}`,d,t.labelStyle);d+=C;const A=await ys(u,`${i.risk?`Risk: ${i.risk}`:""}`,d,t.labelStyle);d+=A,await ys(u,`${i.verifyMethod?`Verification: ${i.verifyMethod}`:""}`,d,t.labelStyle)}else{const S=await ys(u,`${s.type?`Type: ${s.type}`:""}`,d,t.labelStyle);d+=S,await ys(u,`${s.docRef?`Doc Ref: ${s.docRef}`:""}`,d,t.labelStyle)}const y=(u.node()?.getBBox().width??200)+o,f=(u.node()?.getBBox().height??200)+o,p=-y/2,m=-f/2,b=qt.svg(u),w=Yt(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const x=b.rectangle(p,m,y,f,w),E=u.insert(()=>x,":first-child");if(E.attr("class","basic label-container").attr("style",n),u.selectAll(".label").each((S,C,A)=>{const $=Re(A[C]),O=$.attr("transform");let I=0,M=0;if(O){const Y=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(O);Y&&(I=parseFloat(Y[1]),M=parseFloat(Y[2]))}const q=M-f/2;let H=p+o/2;(C===0||C===1)&&(H=I),$.attr("transform",`translate(${H}, ${q+o})`)}),d>h+g+a){const S=b.line(p,m+h+g+a,p+y,m+h+g+a,w);u.insert(()=>S).attr("style",n)}return Zt(t,E),t.intersect=function(S){return Wt.rect(t,S)},u}R(QP,"requirementBox");async function ys(e,t,r,n=""){if(t==="")return 0;const i=e.insert("g").attr("class","label").attr("style",n),s=He(),o=s.htmlLabels??!0,a=await xa(i,Ew(Pl(t)),{width:go(t,s)+50,classes:"markdown-node-label",useHtmlLabels:o,style:n},s);let l;if(o){const c=a.children[0],u=Re(a);l=c.getBoundingClientRect(),u.attr("width",l.width),u.attr("height",l.height)}else{const c=a.children[0];for(const u of c.children)u.textContent=u.textContent.replaceAll(">",">").replaceAll("<","<"),n&&u.setAttribute("style",n);l=a.getBBox(),l.height+=6}return i.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}R(ys,"addText");var eH=R(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function tF(e,t,{config:r}){const{labelStyles:n,nodeStyles:i}=Qt(t);t.labelStyle=n||"";const s=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:a,bbox:l,label:c}=await fe(e,t,ae(t)),u=t.padding||10;let h="",d;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(h=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),d=a.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",h).attr("target","_blank"));const g={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let y,f;d?{label:y,bbox:f}=await Ry(d,"ticket"in t&&t.ticket||"",g):{label:y,bbox:f}=await Ry(a,"ticket"in t&&t.ticket||"",g);const{label:p,bbox:m}=await Ry(a,"assigned"in t&&t.assigned||"",g);t.width=o;const b=10,w=t?.width||0,x=Math.max(f.height,m.height)/2,E=Math.max(l.height+b*2,t?.height||0)+x,S=-w/2,C=-E/2;c.attr("transform","translate("+(u-w/2)+", "+(-x-l.height/2)+")"),y.attr("transform","translate("+(u-w/2)+", "+(-x+l.height/2)+")"),p.attr("transform","translate("+(u+w/2-m.width-2*s)+", "+(-x+l.height/2)+")");let A;const{rx:$,ry:O}=t,{cssStyles:I}=t;if(t.look==="handDrawn"){const M=qt.svg(a),q=Yt(t,{}),H=$||O?M.path(Do(S,C,w,E,$||0),q):M.rectangle(S,C,w,E,q);A=a.insert(()=>H,":first-child"),A.attr("class","basic label-container").attr("style",I||null)}else{A=a.insert("rect",":first-child"),A.attr("class","basic label-container __APA__").attr("style",i).attr("rx",$??5).attr("ry",O??5).attr("x",S).attr("y",C).attr("width",w).attr("height",E);const M="priority"in t&&t.priority;if(M){const q=a.append("line"),H=S+2,G=C+Math.floor(($??0)/2),Y=C+E-Math.floor(($??0)/2);q.attr("x1",H).attr("y1",G).attr("x2",H).attr("y2",Y).attr("stroke-width","4").attr("stroke",eH(M))}}return Zt(t,A),t.height=E,t.intersect=function(M){return Wt.rect(t,M)},a}R(tF,"kanbanItem");var rH=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:BP},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:OP},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:RP},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:jP},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:sP},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Z5},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:TP},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:fP},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:_P},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:xP},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:qP},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:vP},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:aP},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:VP},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:X5},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:IP},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:MP},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:LP},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:uP},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:dP},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:eP},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:rP},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:nP},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:SP},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:YP},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:hP},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:WP},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:EP},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:iP},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:oP},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:GP},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:XP},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:lP},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:HP},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:cP},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:$P},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:kP},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:AP},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:K5},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:tP},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:UP},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:zP},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:KP},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:PP},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:CP}],nH=R(()=>{const t=[...Object.entries({state:NP,choice:J5,note:DP,rectWithTitle:FP,labelRect:wP,iconSquare:yP,iconCircle:mP,icon:pP,iconRounded:gP,imageSquare:bP,anchor:Y5,kanbanItem:tF,classBox:ZP,erBox:px,requirementBox:QP}),...rH.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(i=>[i,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),eF=nH();function iH(e){return e in eF}R(iH,"isValidShape");var v0=new Map;async function rF(e,t,r){let n,i;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const s=t.shape?eF[t.shape]:void 0;if(!s)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),n=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),i=await s(n,t,r)}else i=await s(e,t,r),n=i;return t.tooltip&&i.attr("title",t.tooltip),v0.set(t.id,n),t.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}R(rF,"insertNode");var Cft=R((e,t)=>{v0.set(t.id,e)},"setNodeElem"),Aft=R(()=>{v0.clear()},"clear"),kft=R(e=>{const t=v0.get(e.id);St.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,n=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+n-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),n},"positionNode"),sH=R((e,t,r,n,i,s)=>{t.arrowTypeStart&&KS(e,"start",t.arrowTypeStart,r,n,i,s),t.arrowTypeEnd&&KS(e,"end",t.arrowTypeEnd,r,n,i,s)},"addEdgeMarkers"),oH={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},KS=R((e,t,r,n,i,s,o)=>{const a=oH[r];if(!a){St.warn(`Unknown arrow type: ${r}`);return}const l=a.type,u=`${i}_${s}-${l}${t==="start"?"Start":"End"}`;if(o&&o.trim()!==""){const h=o.replace(/[^\dA-Za-z]/g,"_"),d=`${u}_${h}`;if(!document.getElementById(d)){const g=document.getElementById(u);if(g){const y=g.cloneNode(!0);y.id=d,y.querySelectorAll("path, circle, line").forEach(p=>{p.setAttribute("stroke",o),a.fill&&p.setAttribute("fill",o)}),g.parentNode?.appendChild(y)}}e.attr(`marker-${t}`,`url(${n}#${d})`)}else e.attr(`marker-${t}`,`url(${n}#${u})`)},"addEdgeMarker"),Lm=new Map,tn=new Map,Dft=R(()=>{Lm.clear(),tn.clear()},"clear"),Ju=R(e=>e?e.reduce((r,n)=>r+";"+n,""):"","getLabelStyles"),aH=R(async(e,t)=>{let r=Lr(He().flowchart.htmlLabels);const n=await xa(e,t.label,{style:Ju(t.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});St.info("abc82",t,t.labelType);const i=e.insert("g").attr("class","edgeLabel"),s=i.insert("g").attr("class","label");s.node().appendChild(n);let o=n.getBBox();if(r){const l=n.children[0],c=Re(n);o=l.getBoundingClientRect(),c.attr("width",o.width),c.attr("height",o.height)}s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),Lm.set(t.id,i),t.width=o.width,t.height=o.height;let a;if(t.startLabelLeft){const l=await Xa(t.startLabelLeft,Ju(t.labelStyle)),c=e.insert("g").attr("class","edgeTerminals"),u=c.insert("g").attr("class","inner");a=u.node().appendChild(l);const h=l.getBBox();u.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),tn.get(t.id)||tn.set(t.id,{}),tn.get(t.id).startLeft=c,Ah(a,t.startLabelLeft)}if(t.startLabelRight){const l=await Xa(t.startLabelRight,Ju(t.labelStyle)),c=e.insert("g").attr("class","edgeTerminals"),u=c.insert("g").attr("class","inner");a=c.node().appendChild(l),u.node().appendChild(l);const h=l.getBBox();u.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),tn.get(t.id)||tn.set(t.id,{}),tn.get(t.id).startRight=c,Ah(a,t.startLabelRight)}if(t.endLabelLeft){const l=await Xa(t.endLabelLeft,Ju(t.labelStyle)),c=e.insert("g").attr("class","edgeTerminals"),u=c.insert("g").attr("class","inner");a=u.node().appendChild(l);const h=l.getBBox();u.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),c.node().appendChild(l),tn.get(t.id)||tn.set(t.id,{}),tn.get(t.id).endLeft=c,Ah(a,t.endLabelLeft)}if(t.endLabelRight){const l=await Xa(t.endLabelRight,Ju(t.labelStyle)),c=e.insert("g").attr("class","edgeTerminals"),u=c.insert("g").attr("class","inner");a=u.node().appendChild(l);const h=l.getBBox();u.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),c.node().appendChild(l),tn.get(t.id)||tn.set(t.id,{}),tn.get(t.id).endRight=c,Ah(a,t.endLabelRight)}return n},"insertEdgeLabel");function Ah(e,t){He().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}R(Ah,"setTerminalWidth");var lH=R((e,t)=>{St.debug("Moving label abc88 ",e.id,e.label,Lm.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const n=He(),{subGraphTitleTotalMargin:i}=Ow(n);if(e.label){const s=Lm.get(e.id);let o=e.x,a=e.y;if(r){const l=Es.calcLabelPosition(r);St.debug("Moving label "+e.label+" from (",o,",",a,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(o=l.x,a=l.y)}s.attr("transform",`translate(${o}, ${a+i/2})`)}if(e.startLabelLeft){const s=tn.get(e.id).startLeft;let o=e.x,a=e.y;if(r){const l=Es.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,a=l.y}s.attr("transform",`translate(${o}, ${a})`)}if(e.startLabelRight){const s=tn.get(e.id).startRight;let o=e.x,a=e.y;if(r){const l=Es.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,a=l.y}s.attr("transform",`translate(${o}, ${a})`)}if(e.endLabelLeft){const s=tn.get(e.id).endLeft;let o=e.x,a=e.y;if(r){const l=Es.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,a=l.y}s.attr("transform",`translate(${o}, ${a})`)}if(e.endLabelRight){const s=tn.get(e.id).endRight;let o=e.x,a=e.y;if(r){const l=Es.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,a=l.y}s.attr("transform",`translate(${o}, ${a})`)}},"positionEdgeLabel"),cH=R((e,t)=>{const r=e.x,n=e.y,i=Math.abs(t.x-r),s=Math.abs(t.y-n),o=e.width/2,a=e.height/2;return i>=o||s>=a},"outsideNode"),uH=R((e,t,r)=>{St.debug(`intersection calc abc89: outsidePoint: ${JSON.stringify(t)} insidePoint : ${JSON.stringify(r)} node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const n=e.x,i=e.y,s=Math.abs(n-r.x),o=e.width/2;let a=r.xMath.abs(n-t.x)*l){let h=r.y{St.warn("abc88 cutPathAtIntersect",e,t);let r=[],n=e[0],i=!1;return e.forEach(s=>{if(St.info("abc88 checking point",s,t),!cH(t,s)&&!i){const o=uH(t,n,s);St.debug("abc88 inside",s,n,o),St.debug("abc88 intersection",o,t);let a=!1;r.forEach(l=>{a=a||l.x===o.x&&l.y===o.y}),r.some(l=>l.x===o.x&&l.y===o.y)?St.warn("abc88 no intersect",o,r):r.push(o),i=!0}else St.warn("abc88 outside",s,n),n=s,i||r.push(s)}),St.debug("returning points",r),r},"cutPathAtIntersect");function nF(e){const t=[],r=[];for(let n=1;n5&&Math.abs(s.y-i.y)>5||i.y===s.y&&s.x===o.x&&Math.abs(s.x-i.x)>5&&Math.abs(s.y-o.y)>5)&&(t.push(s),r.push(n))}return{cornerPoints:t,cornerPointPositions:r}}R(nF,"extractCornerPoints");var JS=R(function(e,t,r){const n=t.x-e.x,i=t.y-e.y,s=Math.sqrt(n*n+i*i),o=r/s;return{x:t.x-o*n,y:t.y-o*i}},"findAdjacentPoint"),hH=R(function(e){const{cornerPointPositions:t}=nF(e),r=[];for(let n=0;n10&&Math.abs(s.y-i.y)>=10){St.debug("Corner point fixing",Math.abs(s.x-i.x),Math.abs(s.y-i.y));const g=5;o.x===a.x?d={x:c<0?a.x-g+h:a.x+g-h,y:u<0?a.y-h:a.y+h}:d={x:c<0?a.x-h:a.x+h,y:u<0?a.y-g+h:a.y+g-h}}else St.debug("Corner point skipping fixing",Math.abs(s.x-i.x),Math.abs(s.y-i.y));r.push(d,l)}else r.push(e[n]);return r},"fixCorners"),fH=R(function(e,t,r,n,i,s,o){const{handDrawnSeed:a}=He();let l=t.points,c=!1;const u=i;var h=s;const d=[];for(const $ in t.cssCompiledStyles)M5($)||d.push(t.cssCompiledStyles[$]);h.intersect&&u.intersect&&(l=l.slice(1,t.points.length-1),l.unshift(u.intersect(l[0])),St.debug("Last point APA12",t.start,"-->",t.end,l[l.length-1],h,h.intersect(l[l.length-1])),l.push(h.intersect(l[l.length-1]))),t.toCluster&&(St.info("to cluster abc88",r.get(t.toCluster)),l=XS(t.points,r.get(t.toCluster).node),c=!0),t.fromCluster&&(St.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(l,null,2)),l=XS(l.reverse(),r.get(t.fromCluster).node).reverse(),c=!0);let g=l.filter($=>!Number.isNaN($.y));g=hH(g);let y=Ap;switch(y=_m,t.curve){case"linear":y=_m;break;case"basis":y=Ap;break;case"cardinal":y=A8;break;case"bumpX":y=x8;break;case"bumpY":y=_8;break;case"catmullRom":y=D8;break;case"monotoneX":y=$8;break;case"monotoneY":y=B8;break;case"natural":y=N8;break;case"step":y=L8;break;case"stepAfter":y=j8;break;case"stepBefore":y=M8;break;default:y=Ap}const{x:f,y:p}=BM(t),m=Tz().x(f).y(p).curve(y);let b;switch(t.thickness){case"normal":b="edge-thickness-normal";break;case"thick":b="edge-thickness-thick";break;case"invisible":b="edge-thickness-invisible";break;default:b="edge-thickness-normal"}switch(t.pattern){case"solid":b+=" edge-pattern-solid";break;case"dotted":b+=" edge-pattern-dotted";break;case"dashed":b+=" edge-pattern-dashed";break;default:b+=" edge-pattern-solid"}let w,x=m(g);const E=Array.isArray(t.style)?t.style:[t.style];let S=E.find($=>$?.startsWith("stroke:"));if(t.look==="handDrawn"){const $=qt.svg(e);Object.assign([],g);const O=$.path(x,{roughness:.3,seed:a});b+=" transition",w=Re(O).select("path").attr("id",t.id).attr("class"," "+b+(t.classes?" "+t.classes:"")).attr("style",E?E.reduce((M,q)=>M+";"+q,""):"");let I=w.attr("d");w.attr("d",I),e.node().appendChild(w.node())}else{const $=d.join(";"),O=E?E.reduce((q,H)=>q+H+";",""):"";let I="";t.animate&&(I=" edge-animation-fast"),t.animation&&(I=" edge-animation-"+t.animation);const M=$?$+";"+O+";":O;w=e.append("path").attr("d",x).attr("id",t.id).attr("class"," "+b+(t.classes?" "+t.classes:"")+(I??"")).attr("style",M),S=M.match(/stroke:([^;]+)/)?.[1]}let C="";(He().flowchart.arrowMarkerAbsolute||He().state.arrowMarkerAbsolute)&&(C=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,C=C.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),St.info("arrowTypeStart",t.arrowTypeStart),St.info("arrowTypeEnd",t.arrowTypeEnd),sH(w,t,C,o,n,S);let A={};return c&&(A.updatedPath=l),A.originalPath=t.points,A},"insertEdge"),dH=R((e,t,r,n)=>{t.forEach(i=>{TH[i](e,r,n)})},"insertMarkers"),pH=R((e,t,r)=>{St.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),mH=R((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),gH=R((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),yH=R((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),bH=R((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),vH=R((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),wH=R((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),xH=R((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),_H=R((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),SH=R((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),EH=R((e,t,r)=>{const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("d","M9,0 L9,18");const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),i.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),CH=R((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),AH=R((e,t,r)=>{const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),i.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),kH=R((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0 L20,10 M20,10 L0,20`)},"requirement_arrow"),DH=R((e,t,r)=>{const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),TH={extension:pH,composition:mH,aggregation:gH,dependency:yH,lollipop:bH,point:vH,circle:wH,cross:xH,barb:_H,only_one:SH,zero_or_one:EH,one_or_more:CH,zero_or_more:AH,requirement_arrow:kH,requirement_contains:DH},PH=dH,FH={common:gu,getConfig:Kn,insertCluster:Mq,insertEdge:fH,insertEdgeLabel:aH,insertMarkers:PH,insertNode:rF,interpolateToCurve:Kw,labelHelper:fe,log:St,positionEdgeLabel:lH},mf={},iF=R(e=>{for(const t of e)mf[t.name]=t},"registerLayoutLoaders"),OH=R(()=>{iF([{name:"dagre",loader:R(async()=>await Ne(()=>import("./dagre-OKDRZEBW.n0GD6mJQ.js"),__vite__mapDeps([0,1,2,3,4,5,6])),"loader")}])},"registerDefaultLayoutLoaders");OH();var Tft=R(async(e,t)=>{if(!(e.layoutAlgorithm in mf))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=mf[e.layoutAlgorithm];return(await r.loader()).render(e,t,FH,{algorithm:r.algorithm})},"render"),Pft=R((e="",{fallback:t="dagre"}={})=>{if(e in mf)return e;if(t in mf)return St.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),ZS={name:"mermaid",version:"11.6.0",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.0.4","@iconify/utils":"^2.1.33","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.11",dayjs:"^1.11.13",dompurify:"^3.2.4",katex:"^0.16.9",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^15.0.7",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.2","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",chokidar:"^4.0.3",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.0.2",jison:"^0.4.18","js-base64":"^3.7.7",jsdom:"^26.0.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.2",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.10","type-fest":"^4.35.0",typedoc:"^0.27.8","typedoc-plugin-markdown":"^4.4.2",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.0.2","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}},IH=R(e=>{const{securityLevel:t}=He();let r=Re("body");if(t==="sandbox"){const s=Re(`#i${e}`).node()?.contentDocument??document;r=Re(s.body)}return r.select(`#${e}`)},"selectSvgElement"),sF="comm",oF="rule",aF="decl",$H="@import",BH="@namespace",RH="@keyframes",NH="@layer",lF=Math.abs,mx=String.fromCharCode;function cF(e){return e.trim()}function Pp(e,t,r){return e.replace(t,r)}function LH(e,t,r){return e.indexOf(t,r)}function Oc(e,t){return e.charCodeAt(t)|0}function tu(e,t,r){return e.slice(t,r)}function bs(e){return e.length}function MH(e){return e.length}function Pd(e,t){return t.push(e),e}var w0=1,eu=1,uF=0,Pi=0,Or=0,xu="";function gx(e,t,r,n,i,s,o,a){return{value:e,root:t,parent:r,type:n,props:i,children:s,line:w0,column:eu,length:o,return:"",siblings:a}}function jH(){return Or}function zH(){return Or=Pi>0?Oc(xu,--Pi):0,eu--,Or===10&&(eu=1,w0--),Or}function ts(){return Or=Pi2||gf(Or)>3?"":" "}function qH(e,t){for(;--t&&ts()&&!(Or<48||Or>102||Or>57&&Or<65||Or>70&&Or<97););return x0(e,Fp()+(t<6&&Ko()==32&&ts()==32))}function X1(e){for(;ts();)switch(Or){case e:return Pi;case 34:case 39:e!==34&&e!==39&&X1(Or);break;case 40:e===41&&X1(e);break;case 92:ts();break}return Pi}function HH(e,t){for(;ts()&&e+Or!==57;)if(e+Or===84&&Ko()===47)break;return"/*"+x0(t,Pi-1)+"*"+mx(e===47?e:ts())}function GH(e){for(;!gf(Ko());)ts();return x0(e,Pi)}function YH(e){return VH(Op("",null,null,null,[""],e=UH(e),0,[0],e))}function Op(e,t,r,n,i,s,o,a,l){for(var c=0,u=0,h=o,d=0,g=0,y=0,f=1,p=1,m=1,b=0,w="",x=i,E=s,S=n,C=w;p;)switch(y=b,b=ts()){case 40:if(y!=108&&Oc(C,h-1)==58){LH(C+=Pp(Ny(b),"&","&\f"),"&\f",lF(c?a[c-1]:0))!=-1&&(m=-1);break}case 34:case 39:case 91:C+=Ny(b);break;case 9:case 10:case 13:case 32:C+=WH(y);break;case 92:C+=qH(Fp()-1,7);continue;case 47:switch(Ko()){case 42:case 47:Pd(KH(HH(ts(),Fp()),t,r,l),l),(gf(y||1)==5||gf(Ko()||1)==5)&&bs(C)&&tu(C,-1,void 0)!==" "&&(C+=" ");break;default:C+="/"}break;case 123*f:a[c++]=bs(C)*m;case 125*f:case 59:case 0:switch(b){case 0:case 125:p=0;case 59+u:m==-1&&(C=Pp(C,/\f/g,"")),g>0&&(bs(C)-h||f===0&&y===47)&&Pd(g>32?tE(C+";",n,r,h-1,l):tE(Pp(C," ","")+";",n,r,h-2,l),l);break;case 59:C+=";";default:if(Pd(S=QS(C,t,r,c,u,i,a,w,x=[],E=[],h,s),s),b===123)if(u===0)Op(C,t,S,S,x,s,h,a,E);else{switch(d){case 99:if(Oc(C,3)===110)break;case 108:if(Oc(C,2)===97)break;default:u=0;case 100:case 109:case 115:}u?Op(e,S,S,n&&Pd(QS(e,S,S,0,0,i,a,w,i,x=[],h,E),E),i,E,h,a,n?x:E):Op(C,S,S,S,[""],E,0,a,E)}}c=u=g=0,f=m=1,w=C="",h=o;break;case 58:h=1+bs(C),g=y;default:if(f<1){if(b==123)--f;else if(b==125&&f++==0&&zH()==125)continue}switch(C+=mx(b),b*f){case 38:m=u>0?1:(C+="\f",-1);break;case 44:a[c++]=(bs(C)-1)*m,m=1;break;case 64:Ko()===45&&(C+=Ny(ts())),d=Ko(),u=h=bs(w=C+=GH(Fp())),b++;break;case 45:y===45&&bs(C)==2&&(f=0)}}return s}function QS(e,t,r,n,i,s,o,a,l,c,u,h){for(var d=i-1,g=i===0?s:[""],y=MH(g),f=0,p=0,m=0;f0?g[b]+" "+w:Pp(w,/&\f/g,g[b])))&&(l[m++]=x);return gx(e,t,r,i===0?oF:a,l,c,u,h)}function KH(e,t,r,n){return gx(e,t,r,sF,mx(jH()),tu(e,2,-2),0,n)}function tE(e,t,r,n,i){return gx(e,t,r,aF,tu(e,0,n),tu(e,n+1,-1),n,i)}function J1(e,t){for(var r="",n=0;n/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),fG=R(async()=>{const{diagram:e}=await Ne(async()=>{const{diagram:t}=await import("./c4Diagram-VJAJSXHY.HfIXWbbn.js");return{diagram:t}},__vite__mapDeps([7,8,6]));return{id:hF,diagram:e}},"loader"),dG={id:hF,detector:hG,loader:fG},pG=dG,fF="flowchart",mG=R((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),gG=R(async()=>{const{diagram:e}=await Ne(async()=>{const{diagram:t}=await import("./flowDiagram-4HSFHLVR.BYsXUEo3.js");return{diagram:t}},__vite__mapDeps([9,10,11,6]));return{id:fF,diagram:e}},"loader"),yG={id:fF,detector:mG,loader:gG},bG=yG,dF="flowchart-v2",vG=R((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),wG=R(async()=>{const{diagram:e}=await Ne(async()=>{const{diagram:t}=await import("./flowDiagram-4HSFHLVR.BYsXUEo3.js");return{diagram:t}},__vite__mapDeps([9,10,11,6]));return{id:dF,diagram:e}},"loader"),xG={id:dF,detector:vG,loader:wG},_G=xG,pF="er",SG=R(e=>/^\s*erDiagram/.test(e),"detector"),EG=R(async()=>{const{diagram:e}=await Ne(async()=>{const{diagram:t}=await import("./erDiagram-Q7BY3M3F.CVq1HoPi.js");return{diagram:t}},__vite__mapDeps([12,10,11,6]));return{id:pF,diagram:e}},"loader"),CG={id:pF,detector:SG,loader:EG},AG=CG,mF="gitGraph",kG=R(e=>/^\s*gitGraph/.test(e),"detector"),DG=R(async()=>{const{diagram:e}=await Ne(async()=>{const{diagram:t}=await import("./gitGraphDiagram-7IBYFJ6S.DZFfiRM9.js");return{diagram:t}},__vite__mapDeps([13,14,15,16,6,2,4,5]));return{id:mF,diagram:e}},"loader"),TG={id:mF,detector:kG,loader:DG},PG=TG,gF="gantt",FG=R(e=>/^\s*gantt/.test(e),"detector"),OG=R(async()=>{const{diagram:e}=await Ne(async()=>{const{diagram:t}=await import("./ganttDiagram-APWFNJXF.DzCKXu02.js");return{diagram:t}},__vite__mapDeps([17,18,19,6]));return{id:gF,diagram:e}},"loader"),IG={id:gF,detector:FG,loader:OG},$G=IG,yF="info",BG=R(e=>/^\s*info/.test(e),"detector"),RG=R(async()=>{const{diagram:e}=await Ne(async()=>{const{diagram:t}=await import("./infoDiagram-PH2N3AL5.C5cS-mOr.js");return{diagram:t}},__vite__mapDeps([20,16,6,2,4,5]));return{id:yF,diagram:e}},"loader"),NG={id:yF,detector:BG,loader:RG},bF="pie",LG=R(e=>/^\s*pie/.test(e),"detector"),MG=R(async()=>{const{diagram:e}=await Ne(async()=>{const{diagram:t}=await import("./pieDiagram-IB7DONF6.DAadi3FS.js");return{diagram:t}},__vite__mapDeps([21,14,16,6,2,4,5,22,23,19]));return{id:bF,diagram:e}},"loader"),jG={id:bF,detector:LG,loader:MG},vF="quadrantChart",zG=R(e=>/^\s*quadrantChart/.test(e),"detector"),UG=R(async()=>{const{diagram:e}=await Ne(async()=>{const{diagram:t}=await import("./quadrantDiagram-7GDLP6J5.Dg6Nc_oX.js");return{diagram:t}},__vite__mapDeps([24,18,19,6]));return{id:vF,diagram:e}},"loader"),VG={id:vF,detector:zG,loader:UG},WG=VG,wF="xychart",qG=R(e=>/^\s*xychart-beta/.test(e),"detector"),HG=R(async()=>{const{diagram:e}=await Ne(async()=>{const{diagram:t}=await import("./xychartDiagram-VJFVF3MP.WJ6Q5xR7.js");return{diagram:t}},__vite__mapDeps([25,19,23,18,6]));return{id:wF,diagram:e}},"loader"),GG={id:wF,detector:qG,loader:HG},YG=GG,xF="requirement",KG=R(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),XG=R(async()=>{const{diagram:e}=await Ne(async()=>{const{diagram:t}=await import("./requirementDiagram-KVF5MWMF.CuMjwiDG.js");return{diagram:t}},__vite__mapDeps([26,10,6]));return{id:xF,diagram:e}},"loader"),JG={id:xF,detector:KG,loader:XG},ZG=JG,_F="sequence",QG=R(e=>/^\s*sequenceDiagram/.test(e),"detector"),tY=R(async()=>{const{diagram:e}=await Ne(async()=>{const{diagram:t}=await import("./sequenceDiagram-X6HHIX6F.D4ndW3Qa.js");return{diagram:t}},__vite__mapDeps([27,8,15,6]));return{id:_F,diagram:e}},"loader"),eY={id:_F,detector:QG,loader:tY},rY=eY,SF="class",nY=R((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),iY=R(async()=>{const{diagram:e}=await Ne(async()=>{const{diagram:t}=await import("./classDiagram-GIVACNV2.CCHJ_KyO.js");return{diagram:t}},__vite__mapDeps([28,29,10,6]));return{id:SF,diagram:e}},"loader"),sY={id:SF,detector:nY,loader:iY},oY=sY,EF="classDiagram",aY=R((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),lY=R(async()=>{const{diagram:e}=await Ne(async()=>{const{diagram:t}=await import("./classDiagram-v2-COTLJTTW.CCHJ_KyO.js");return{diagram:t}},__vite__mapDeps([30,29,10,6]));return{id:EF,diagram:e}},"loader"),cY={id:EF,detector:aY,loader:lY},uY=cY,CF="state",hY=R((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),fY=R(async()=>{const{diagram:e}=await Ne(async()=>{const{diagram:t}=await import("./stateDiagram-DGXRK772.C6hfgVJs.js");return{diagram:t}},__vite__mapDeps([31,32,10,1,2,3,4,6]));return{id:CF,diagram:e}},"loader"),dY={id:CF,detector:hY,loader:fY},pY=dY,AF="stateDiagram",mY=R((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),gY=R(async()=>{const{diagram:e}=await Ne(async()=>{const{diagram:t}=await import("./stateDiagram-v2-YXO3MK2T.S07XgPCl.js");return{diagram:t}},__vite__mapDeps([33,32,10,6]));return{id:AF,diagram:e}},"loader"),yY={id:AF,detector:mY,loader:gY},bY=yY,kF="journey",vY=R(e=>/^\s*journey/.test(e),"detector"),wY=R(async()=>{const{diagram:e}=await Ne(async()=>{const{diagram:t}=await import("./journeyDiagram-U35MCT3I.VrxBSzj_.js");return{diagram:t}},__vite__mapDeps([34,8,22,6]));return{id:kF,diagram:e}},"loader"),xY={id:kF,detector:vY,loader:wY},_Y=xY,SY=R((e,t,r)=>{St.debug(`rendering svg for syntax error `);const n=IH(t),i=n.append("g");n.attr("viewBox","0 0 2412 512"),aT(n,100,512,!0),i.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),i.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),i.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),i.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),i.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),i.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),i.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),i.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),DF={draw:SY},EY=DF,CY={db:{},renderer:DF,parser:{parse:R(()=>{},"parse")}},AY=CY,TF="flowchart-elk",kY=R((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*flowchart|graph/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),DY=R(async()=>{const{diagram:e}=await Ne(async()=>{const{diagram:t}=await import("./flowDiagram-4HSFHLVR.BYsXUEo3.js");return{diagram:t}},__vite__mapDeps([9,10,11,6]));return{id:TF,diagram:e}},"loader"),TY={id:TF,detector:kY,loader:DY},PY=TY,PF="timeline",FY=R(e=>/^\s*timeline/.test(e),"detector"),OY=R(async()=>{const{diagram:e}=await Ne(async()=>{const{diagram:t}=await import("./timeline-definition-BDJGKUSR.DInY-q9l.js");return{diagram:t}},__vite__mapDeps([35,22,6]));return{id:PF,diagram:e}},"loader"),IY={id:PF,detector:FY,loader:OY},$Y=IY,FF="mindmap",BY=R(e=>/^\s*mindmap/.test(e),"detector"),RY=R(async()=>{const{diagram:e}=await Ne(async()=>{const{diagram:t}=await import("./mindmap-definition-ALO5MXBD.D1TaqU1z.js");return{diagram:t}},__vite__mapDeps([36,37,6]));return{id:FF,diagram:e}},"loader"),NY={id:FF,detector:BY,loader:RY},LY=NY,OF="kanban",MY=R(e=>/^\s*kanban/.test(e),"detector"),jY=R(async()=>{const{diagram:e}=await Ne(async()=>{const{diagram:t}=await import("./kanban-definition-NDS4AKOZ.NwIMVBfz.js");return{diagram:t}},__vite__mapDeps([38,6]));return{id:OF,diagram:e}},"loader"),zY={id:OF,detector:MY,loader:jY},UY=zY,IF="sankey",VY=R(e=>/^\s*sankey-beta/.test(e),"detector"),WY=R(async()=>{const{diagram:e}=await Ne(async()=>{const{diagram:t}=await import("./sankeyDiagram-QLVOVGJD.BH7o7Nnt.js");return{diagram:t}},__vite__mapDeps([39,23,19,6]));return{id:IF,diagram:e}},"loader"),qY={id:IF,detector:VY,loader:WY},HY=qY,$F="packet",GY=R(e=>/^\s*packet-beta/.test(e),"detector"),YY=R(async()=>{const{diagram:e}=await Ne(async()=>{const{diagram:t}=await import("./diagram-VNBRO52H.BMqQ-HFX.js");return{diagram:t}},__vite__mapDeps([40,14,16,6,2,4,5]));return{id:$F,diagram:e}},"loader"),KY={id:$F,detector:GY,loader:YY},BF="radar",XY=R(e=>/^\s*radar-beta/.test(e),"detector"),JY=R(async()=>{const{diagram:e}=await Ne(async()=>{const{diagram:t}=await import("./diagram-SSKATNLV.-3U0Dvpt.js");return{diagram:t}},__vite__mapDeps([41,14,16,6,2,4,5]));return{id:BF,diagram:e}},"loader"),ZY={id:BF,detector:XY,loader:JY},RF="block",QY=R(e=>/^\s*block-beta/.test(e),"detector"),tK=R(async()=>{const{diagram:e}=await Ne(async()=>{const{diagram:t}=await import("./blockDiagram-JOT3LUYC.H0Ofc1JD.js");return{diagram:t}},__vite__mapDeps([42,5,2,1,11,6]));return{id:RF,diagram:e}},"loader"),eK={id:RF,detector:QY,loader:tK},rK=eK,NF="architecture",nK=R(e=>/^\s*architecture/.test(e),"detector"),iK=R(async()=>{const{diagram:e}=await Ne(async()=>{const{diagram:t}=await import("./architectureDiagram-IEHRJDOE.DdV1huC8.js");return{diagram:t}},__vite__mapDeps([43,14,15,16,6,2,4,5,37]));return{id:NF,diagram:e}},"loader"),sK={id:NF,detector:nK,loader:iK},oK=sK,aE=!1,_0=R(()=>{aE||(aE=!0,lm("error",AY,e=>e.toLowerCase().trim()==="error"),lm("---",{db:{clear:R(()=>{},"clear")},styles:{},renderer:{draw:R(()=>{},"draw")},parser:{parse:R(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:R(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),YD(pG,UY,uY,oY,AG,$G,NG,jG,ZG,rY,PY,_G,bG,LY,$Y,PG,bY,pY,_Y,WG,HY,KY,YG,rK,oK,ZY))},"addDiagrams"),aK=R(async()=>{St.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Hc).map(async([r,{detector:n,loader:i}])=>{if(i)try{m1(r)}catch{try{const{diagram:s,id:o}=await i();lm(o,s,n)}catch(s){throw St.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Hc[r],s}}}))).filter(r=>r.status==="rejected");if(t.length>0){St.error(`Failed to load ${t.length} external diagrams`);for(const r of t)St.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),lK="graphics-document document";function LF(e,t){e.attr("role",lK),t!==""&&e.attr("aria-roledescription",t)}R(LF,"setA11yDiagramInfo");function MF(e,t,r,n){if(e.insert!==void 0){if(r){const i=`chart-desc-${n}`;e.attr("aria-describedby",i),e.insert("desc",":first-child").attr("id",i).text(r)}if(t){const i=`chart-title-${n}`;e.attr("aria-labelledby",i),e.insert("title",":first-child").attr("id",i).text(t)}}}R(MF,"addSVGa11yTitleDescription");var rv=class jF{constructor(t,r,n,i,s){this.type=t,this.text=r,this.db=n,this.parser=i,this.renderer=s}static{R(this,"Diagram")}static async fromText(t,r={}){const n=Kn(),i=bw(t,n);t=TW(t)+` `;try{m1(i)}catch{const c=BN(i);if(!c)throw new GD(`Diagram ${i} not found.`);const{id:u,diagram:h}=await c();lm(u,h)}const{db:s,parser:o,renderer:a,init:l}=m1(i);return o.parser&&(o.parser.yy=s),s.clear?.(),l?.(n),r.title&&s.setDiagramTitle?.(r.title),await o.parse(t),new jF(i,t,s,o,a)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},lE=[],cK=R(()=>{lE.forEach(e=>{e()}),lE=[]},"attachFunctions"),uK=R(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function zF(e){const t=e.match(HD);if(!t)return{text:e,metadata:{}};let r=$M(t[1],{schema:IM})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const n={};return r.displayMode&&(n.displayMode=r.displayMode.toString()),r.title&&(n.title=r.title.toString()),r.config&&(n.config=r.config),{text:e.slice(t[0].length),metadata:n}}R(zF,"extractFrontMatter");var hK=R(e=>e.replace(/\r\n?/g,` `).replace(/<(\w+)([^>]*)>/g,(t,r,n)=>"<"+r+n.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),fK=R(e=>{const{text:t,metadata:r}=zF(e),{displayMode:n,title:i,config:s={}}=r;return n&&(s.gantt||(s.gantt={}),s.gantt.displayMode=n),{title:i,config:s,text:t}},"processFrontmatter"),dK=R(e=>{const t=Es.detectInit(e)??{},r=Es.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:n})=>n==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:gW(e),directive:t}},"processDirectives");function yx(e){const t=hK(e),r=fK(t),n=dK(r.text),i=tx(r.config,n.directive);return e=uK(n.text),{code:e,title:r.title,config:i}}R(yx,"preprocessDiagram");function UF(e){const t=new TextEncoder().encode(e),r=Array.from(t,n=>String.fromCodePoint(n)).join("");return btoa(r)}R(UF,"toBase64");var pK=5e4,mK="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",gK="sandbox",yK="loose",bK="http://www.w3.org/2000/svg",vK="http://www.w3.org/1999/xlink",wK="http://www.w3.org/1999/xhtml",xK="100%",_K="100%",SK="border:0;margin:0;",EK="margin:0",CK="allow-top-navigation-by-user-activation allow-popups",AK='The "iframe" tag is not supported by your browser.',kK=["foreignobject"],DK=["dominant-baseline"];function bx(e){const t=yx(e);return om(),JN(t.config??{}),t}R(bx,"processAndSetConfigs");async function VF(e,t){_0();try{const{code:r,config:n}=bx(e);return{diagramType:(await qF(r)).type,config:n}}catch(r){if(t?.suppressErrors)return!1;throw r}}R(VF,"parse");var cE=R((e,t,r=[])=>` .${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),TK=R((e,t=new Map)=>{let r="";if(e.themeCSS!==void 0&&(r+=` ${e.themeCSS}`),e.fontFamily!==void 0&&(r+=` :root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=` :root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const o=e.htmlLabels??e.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(a=>{oE(a.styles)||o.forEach(l=>{r+=cE(a.id,l,a.styles)}),oE(a.textStyles)||(r+=cE(a.id,"tspan",(a?.textStyles||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),PK=R((e,t,r,n)=>{const i=TK(e,r),s=gL(t,i,e.themeVariables);return J1(YH(`${n}{${s}}`),XH)},"createUserStyles"),FK=R((e="",t,r)=>{let n=e;return!r&&!t&&(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=Pl(n),n=n.replace(/
    /g,"
    "),n},"cleanUpSvgCode"),OK=R((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":_K,n=UF(`${e}`);return``},"putIntoIFrame"),uE=R((e,t,r,n,i)=>{const s=e.append("div");s.attr("id",r),n&&s.attr("style",n);const o=s.append("svg").attr("id",t).attr("width","100%").attr("xmlns",bK);return i&&o.attr("xmlns:xlink",i),o.append("g"),e},"appendDivSvgG");function nv(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}R(nv,"sandboxedIframe");var IK=R((e,t,r,n)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(n)?.remove()},"removeExistingElements"),$K=R(async function(e,t,r){_0();const n=bx(t);t=n.code;const i=Kn();St.debug(i),t.length>(i?.maxTextSize??pK)&&(t=mK);const s="#"+e,o="i"+e,a="#"+o,l="d"+e,c="#"+l,u=R(()=>{const q=Re(d?a:c).node();q&&"remove"in q&&q.remove()},"removeTempElements");let h=Re("body");const d=i.securityLevel===gK,g=i.securityLevel===yK,y=i.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),d){const M=nv(Re(r),o);h=Re(M.nodes()[0].contentDocument.body),h.node().style.margin=0}else h=Re(r);uE(h,e,l,`font-family: ${y}`,vK)}else{if(IK(document,e,l,o),d){const M=nv(Re("body"),o);h=Re(M.nodes()[0].contentDocument.body),h.node().style.margin=0}else h=Re("body");uE(h,e,l)}let f,p;try{f=await rv.fromText(t,{title:n.title})}catch(M){if(i.suppressErrorRendering)throw u(),M;f=await rv.fromText("error"),p=M}const m=h.select(c).node(),b=f.type,w=m.firstChild,x=w.firstChild,E=f.renderer.getClasses?.(t,f),S=PK(i,b,E,s),C=document.createElement("style");C.innerHTML=S,w.insertBefore(C,x);try{await f.renderer.draw(t,e,ZS.version,f)}catch(M){throw i.suppressErrorRendering?u():EY.draw(t,e,ZS.version),M}const A=h.select(`${c} svg`),$=f.db.getAccTitle?.(),O=f.db.getAccDescription?.();HF(b,A,$,O),h.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",wK);let I=h.select(c).node().innerHTML;if(St.debug("config.arrowMarkerAbsolute",i.arrowMarkerAbsolute),I=FK(I,d,Lr(i.arrowMarkerAbsolute)),d){const M=h.select(c+" svg").node();I=OK(I,M)}else g||(I=qc.sanitize(I,{ADD_TAGS:kK,ADD_ATTR:DK,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(cK(),p)throw p;return u(),{diagramType:b,svg:I,bindFunctions:f.db.bindFunctions}},"render");function WF(e={}){const t=sn({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),KN(t),t?.theme&&t.theme in ao?t.themeVariables=ao[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=ao.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?YN(t):tT();yw(r.logLevel),_0()}R(WF,"initialize");var qF=R((e,t={})=>{const{code:r}=yx(e);return rv.fromText(r,t)},"getDiagramFromText");function HF(e,t,r,n){LF(t,e),MF(t,r,n,t.attr("id"))}R(HF,"addA11yInfo");var dl=Object.freeze({render:$K,parse:VF,getDiagramFromText:qF,initialize:WF,getConfig:Kn,setConfig:eT,getSiteConfig:tT,updateSiteConfig:XN,reset:R(()=>{om()},"reset"),globalReset:R(()=>{om(Gc)},"globalReset"),defaultConfig:Gc});yw(Kn().logLevel);om(Kn());var BK=R((e,t,r)=>{St.warn(e),Qw(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),GF=R(async function(e={querySelector:".mermaid"}){try{await RK(e)}catch(t){if(Qw(t)&&St.error(t.str),yo.parseError&&yo.parseError(t),!e.suppressErrors)throw St.error("Use the suppressErrors option to suppress these errors"),t}},"run"),RK=R(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const n=dl.getConfig();St.debug(`${e?"":"No "}Callback function found`);let i;if(r)i=r;else if(t)i=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");St.debug(`Found ${i.length} diagrams`),n?.startOnLoad!==void 0&&(St.debug("Start On Load: "+n?.startOnLoad),dl.updateSiteConfig({startOnLoad:n?.startOnLoad}));const s=new Es.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed);let o;const a=[];for(const l of Array.from(i)){if(St.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${s.next()}`;o=l.innerHTML,o=w5(Es.entityDecode(o)).trim().replace(//gi,"
    ");const u=Es.detectInit(o);u&&St.debug("Detected early reinit: ",u);try{const{svg:h,bindFunctions:d}=await JF(c,o,l);l.innerHTML=h,e&&await e(c),d&&d(l)}catch(h){BK(h,a,yo.parseError)}}if(a.length>0)throw a[0]},"runThrowsErrors"),YF=R(function(e){dl.initialize(e)},"initialize"),NK=R(async function(e,t,r){St.warn("mermaid.init is deprecated. Please use run instead."),e&&YF(e);const n={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?n.querySelector=t:t&&(t instanceof HTMLElement?n.nodes=[t]:n.nodes=t),await GF(n)},"init"),LK=R(async(e,{lazyLoad:t=!0}={})=>{_0(),YD(...e),t===!1&&await aK()},"registerExternalDiagrams"),KF=R(function(){if(yo.startOnLoad){const{startOnLoad:e}=dl.getConfig();e&&yo.run().catch(t=>St.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",KF,!1);var MK=R(function(e){yo.parseError=e},"setParseErrorHandler"),Mm=[],Ly=!1,XF=R(async()=>{if(!Ly){for(Ly=!0;Mm.length>0;){const e=Mm.shift();if(e)try{await e()}catch(t){St.error("Error executing queue",t)}}Ly=!1}},"executeQueue"),jK=R(async(e,t)=>new Promise((r,n)=>{const i=R(()=>new Promise((s,o)=>{dl.parse(e,t).then(a=>{s(a),r(a)},a=>{St.error("Error parsing",a),yo.parseError?.(a),o(a),n(a)})}),"performCall");Mm.push(i),XF().catch(n)}),"parse"),JF=R((e,t,r)=>new Promise((n,i)=>{const s=R(()=>new Promise((o,a)=>{dl.render(e,t,r).then(l=>{o(l),n(l)},l=>{St.error("Error parsing",l),yo.parseError?.(l),a(l),i(l)})}),"performCall");Mm.push(s),XF().catch(i)}),"render"),yo={startOnLoad:!0,mermaidAPI:dl,parse:jK,render:JF,init:NK,run:GF,registerExternalDiagrams:LK,registerLayoutLoaders:iF,initialize:YF,parseError:void 0,contentLoaded:KF,setParseErrorHandler:MK,detectType:bw,registerIconPacks:n9},hE=yo;/*! Check if previously processed *//*! * Wait for document loaded before starting the execution */var ie={},vs,ws;function iv(){throw new Error("setTimeout has not been defined")}function sv(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?vs=setTimeout:vs=iv}catch{vs=iv}try{typeof clearTimeout=="function"?ws=clearTimeout:ws=sv}catch{ws=sv}})();function ZF(e){if(vs===setTimeout)return setTimeout(e,0);if((vs===iv||!vs)&&setTimeout)return vs=setTimeout,setTimeout(e,0);try{return vs(e,0)}catch{try{return vs.call(null,e,0)}catch{return vs.call(this,e,0)}}}function zK(e){if(ws===clearTimeout)return clearTimeout(e);if((ws===sv||!ws)&&clearTimeout)return ws=clearTimeout,clearTimeout(e);try{return ws(e)}catch{try{return ws.call(null,e)}catch{return ws.call(this,e)}}}var oo=[],Ic=!1,Ja,Ip=-1;function UK(){!Ic||!Ja||(Ic=!1,Ja.length?oo=Ja.concat(oo):Ip=-1,oo.length&&QF())}function QF(){if(!Ic){var e=ZF(UK);Ic=!0;for(var t=oo.length;t;){for(Ja=oo,oo=[];++Ip1)for(var r=1;rtypeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),YK=(e,t)=>function(){return e&&(t=(0,e[vx(e)[0]])(e=0)),t},Lt=(e,t)=>function(){return t||(0,e[vx(e)[0]])((t={exports:{}}).exports,t),t.exports},KK=(e,t)=>{for(var r in t)S0(e,r,{get:t[r],enumerable:!0})},eO=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of vx(t))!HK.call(e,i)&&i!==r&&S0(e,i,{get:()=>t[i],enumerable:!(n=WK(t,i))||n.enumerable});return e},XK=(e,t,r)=>(r=e!=null?VK(qK(e)):{},eO(S0(r,"default",{value:e,enumerable:!0}),e)),JK=e=>eO(S0({},"__esModule",{value:!0}),e),Ol=Lt({"node_modules/memfs/lib/constants.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.constants=void 0,e.constants={O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:64,O_EXCL:128,O_NOCTTY:256,O_TRUNC:512,O_APPEND:1024,O_DIRECTORY:65536,O_NOATIME:262144,O_NOFOLLOW:131072,O_SYNC:1052672,O_SYMLINK:2097152,O_DIRECT:16384,O_NONBLOCK:2048,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_FS_SYMLINK_DIR:1,UV_FS_SYMLINK_JUNCTION:2,UV_FS_COPYFILE_EXCL:1,UV_FS_COPYFILE_FICLONE:2,UV_FS_COPYFILE_FICLONE_FORCE:4,COPYFILE_EXCL:1,COPYFILE_FICLONE:2,COPYFILE_FICLONE_FORCE:4}}}),wx=Lt({"node_modules/memfs/lib/Stats.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Stats=void 0;var t=Ol(),{S_IFMT:r,S_IFDIR:n,S_IFREG:i,S_IFBLK:s,S_IFCHR:o,S_IFLNK:a,S_IFIFO:l,S_IFSOCK:c}=t.constants,u=class rO{static build(d,g=!1){const y=new rO,{uid:f,gid:p,atime:m,mtime:b,ctime:w}=d,x=g?S=>BigInt(S):S=>S;y.uid=x(f),y.gid=x(p),y.rdev=x(0),y.blksize=x(4096),y.ino=x(d.ino),y.size=x(d.getSize()),y.blocks=x(1),y.atime=m,y.mtime=b,y.ctime=w,y.birthtime=w,y.atimeMs=x(m.getTime()),y.mtimeMs=x(b.getTime());const E=x(w.getTime());if(y.ctimeMs=E,y.birthtimeMs=E,g){y.atimeNs=BigInt(m.getTime())*BigInt(1e6),y.mtimeNs=BigInt(b.getTime())*BigInt(1e6);const S=BigInt(w.getTime())*BigInt(1e6);y.ctimeNs=S,y.birthtimeNs=S}return y.dev=x(0),y.mode=x(d.mode),y.nlink=x(d.nlink),y}_checkModeProperty(d){return(Number(this.mode)&r)===d}isDirectory(){return this._checkModeProperty(n)}isFile(){return this._checkModeProperty(i)}isBlockDevice(){return this._checkModeProperty(s)}isCharacterDevice(){return this._checkModeProperty(o)}isSymbolicLink(){return this._checkModeProperty(a)}isFIFO(){return this._checkModeProperty(l)}isSocket(){return this._checkModeProperty(c)}};e.Stats=u,e.default=u}}),ZK=Lt({"node_modules/base64-js/index.js"(e){e.byteLength=l,e.toByteArray=u,e.fromByteArray=g;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(s=0,o=i.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var p=y.indexOf("=");p===-1&&(p=f);var m=p===f?0:4-p%4;return[p,m]}function l(y){var f=a(y),p=f[0],m=f[1];return(p+m)*3/4-m}function c(y,f,p){return(f+p)*3/4-p}function u(y){var f,p=a(y),m=p[0],b=p[1],w=new n(c(y,m,b)),x=0,E=b>0?m-4:m,S;for(S=0;S>16&255,w[x++]=f>>8&255,w[x++]=f&255;return b===2&&(f=r[y.charCodeAt(S)]<<2|r[y.charCodeAt(S+1)]>>4,w[x++]=f&255),b===1&&(f=r[y.charCodeAt(S)]<<10|r[y.charCodeAt(S+1)]<<4|r[y.charCodeAt(S+2)]>>2,w[x++]=f>>8&255,w[x++]=f&255),w}function h(y){return t[y>>18&63]+t[y>>12&63]+t[y>>6&63]+t[y&63]}function d(y,f,p){for(var m,b=[],w=f;wE?E:x+w));return m===1?(f=y[p-1],b.push(t[f>>2]+t[f<<4&63]+"==")):m===2&&(f=(y[p-2]<<8)+y[p-1],b.push(t[f>>10]+t[f>>4&63]+t[f<<2&63]+"=")),b.join("")}}}),QK=Lt({"node_modules/ieee754/index.js"(e){e.read=function(t,r,n,i,s){var o,a,l=s*8-i-1,c=(1<>1,h=-7,d=n?s-1:0,g=n?-1:1,y=t[r+d];for(d+=g,o=y&(1<<-h)-1,y>>=-h,h+=l;h>0;o=o*256+t[r+d],d+=g,h-=8);for(a=o&(1<<-h)-1,o>>=-h,h+=i;h>0;a=a*256+t[r+d],d+=g,h-=8);if(o===0)o=1-u;else{if(o===c)return a?NaN:(y?-1:1)*(1/0);a=a+Math.pow(2,i),o=o-u}return(y?-1:1)*a*Math.pow(2,o-i)},e.write=function(t,r,n,i,s,o){var a,l,c,u=o*8-s-1,h=(1<>1,g=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=i?0:o-1,f=i?1:-1,p=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(c=Math.pow(2,-a))<1&&(a--,c*=2),a+d>=1?r+=g/c:r+=g*Math.pow(2,1-d),r*c>=2&&(a++,c/=2),a+d>=h?(l=0,a=h):a+d>=1?(l=(r*c-1)*Math.pow(2,s),a=a+d):(l=r*Math.pow(2,d-1)*Math.pow(2,s),a=0));s>=8;t[n+y]=l&255,y+=f,l/=256,s-=8);for(a=a<0;t[n+y]=a&255,y+=f,a/=256,u-=8);t[n+y-f]|=p*128}}}),tX=Lt({"node_modules/buffer/index.js"(e){var t=ZK(),r=QK(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=b,e.INSPECT_MAX_BYTES=50;var i=2147483647;e.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=s(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function s(){try{const k=new Uint8Array(1),v={foo:function(){return 42}};return Object.setPrototypeOf(v,Uint8Array.prototype),Object.setPrototypeOf(k,v),k.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function o(k){if(k>i)throw new RangeError('The value "'+k+'" is invalid for option "size"');const v=new Uint8Array(k);return Object.setPrototypeOf(v,a.prototype),v}function a(k,v,_){if(typeof k=="number"){if(typeof v=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return h(k)}return l(k,v,_)}a.poolSize=8192;function l(k,v,_){if(typeof k=="string")return d(k,v);if(ArrayBuffer.isView(k))return y(k);if(k==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k);if(re(k,ArrayBuffer)||k&&re(k.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(re(k,SharedArrayBuffer)||k&&re(k.buffer,SharedArrayBuffer)))return f(k,v,_);if(typeof k=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const B=k.valueOf&&k.valueOf();if(B!=null&&B!==k)return a.from(B,v,_);const K=p(k);if(K)return K;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof k[Symbol.toPrimitive]=="function")return a.from(k[Symbol.toPrimitive]("string"),v,_);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k)}a.from=function(k,v,_){return l(k,v,_)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function c(k){if(typeof k!="number")throw new TypeError('"size" argument must be of type number');if(k<0)throw new RangeError('The value "'+k+'" is invalid for option "size"')}function u(k,v,_){return c(k),k<=0?o(k):v!==void 0?typeof _=="string"?o(k).fill(v,_):o(k).fill(v):o(k)}a.alloc=function(k,v,_){return u(k,v,_)};function h(k){return c(k),o(k<0?0:m(k)|0)}a.allocUnsafe=function(k){return h(k)},a.allocUnsafeSlow=function(k){return h(k)};function d(k,v){if((typeof v!="string"||v==="")&&(v="utf8"),!a.isEncoding(v))throw new TypeError("Unknown encoding: "+v);const _=w(k,v)|0;let B=o(_);const K=B.write(k,v);return K!==_&&(B=B.slice(0,K)),B}function g(k){const v=k.length<0?0:m(k.length)|0,_=o(v);for(let B=0;B=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return k|0}function b(k){return+k!=k&&(k=0),a.alloc(+k)}a.isBuffer=function(v){return v!=null&&v._isBuffer===!0&&v!==a.prototype},a.compare=function(v,_){if(re(v,Uint8Array)&&(v=a.from(v,v.offset,v.byteLength)),re(_,Uint8Array)&&(_=a.from(_,_.offset,_.byteLength)),!a.isBuffer(v)||!a.isBuffer(_))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(v===_)return 0;let B=v.length,K=_.length;for(let tt=0,ot=Math.min(B,K);ttK.length?(a.isBuffer(ot)||(ot=a.from(ot)),ot.copy(K,tt)):Uint8Array.prototype.set.call(K,ot,tt);else if(a.isBuffer(ot))ot.copy(K,tt);else throw new TypeError('"list" argument must be an Array of Buffers');tt+=ot.length}return K};function w(k,v){if(a.isBuffer(k))return k.length;if(ArrayBuffer.isView(k)||re(k,ArrayBuffer))return k.byteLength;if(typeof k!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof k);const _=k.length,B=arguments.length>2&&arguments[2]===!0;if(!B&&_===0)return 0;let K=!1;for(;;)switch(v){case"ascii":case"latin1":case"binary":return _;case"utf8":case"utf-8":return Tt(k).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _*2;case"hex":return _>>>1;case"base64":return Kt(k).length;default:if(K)return B?-1:Tt(k).length;v=(""+v).toLowerCase(),K=!0}}a.byteLength=w;function x(k,v,_){let B=!1;if((v===void 0||v<0)&&(v=0),v>this.length||((_===void 0||_>this.length)&&(_=this.length),_<=0)||(_>>>=0,v>>>=0,_<=v))return"";for(k||(k="utf8");;)switch(k){case"hex":return N(this,v,_);case"utf8":case"utf-8":return H(this,v,_);case"ascii":return F(this,v,_);case"latin1":case"binary":return T(this,v,_);case"base64":return q(this,v,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,v,_);default:if(B)throw new TypeError("Unknown encoding: "+k);k=(k+"").toLowerCase(),B=!0}}a.prototype._isBuffer=!0;function E(k,v,_){const B=k[v];k[v]=k[_],k[_]=B}a.prototype.swap16=function(){const v=this.length;if(v%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let _=0;__&&(v+=" ... "),""},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(v,_,B,K,tt){if(re(v,Uint8Array)&&(v=a.from(v,v.offset,v.byteLength)),!a.isBuffer(v))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof v);if(_===void 0&&(_=0),B===void 0&&(B=v?v.length:0),K===void 0&&(K=0),tt===void 0&&(tt=this.length),_<0||B>v.length||K<0||tt>this.length)throw new RangeError("out of range index");if(K>=tt&&_>=B)return 0;if(K>=tt)return-1;if(_>=B)return 1;if(_>>>=0,B>>>=0,K>>>=0,tt>>>=0,this===v)return 0;let ot=tt-K,rt=B-_;const D=Math.min(ot,rt),P=this.slice(K,tt),j=v.slice(_,B);for(let X=0;X2147483647?_=2147483647:_<-2147483648&&(_=-2147483648),_=+_,Me(_)&&(_=K?0:k.length-1),_<0&&(_=k.length+_),_>=k.length){if(K)return-1;_=k.length-1}else if(_<0)if(K)_=0;else return-1;if(typeof v=="string"&&(v=a.from(v,B)),a.isBuffer(v))return v.length===0?-1:C(k,v,_,B,K);if(typeof v=="number")return v=v&255,typeof Uint8Array.prototype.indexOf=="function"?K?Uint8Array.prototype.indexOf.call(k,v,_):Uint8Array.prototype.lastIndexOf.call(k,v,_):C(k,[v],_,B,K);throw new TypeError("val must be string, number or Buffer")}function C(k,v,_,B,K){let tt=1,ot=k.length,rt=v.length;if(B!==void 0&&(B=String(B).toLowerCase(),B==="ucs2"||B==="ucs-2"||B==="utf16le"||B==="utf-16le")){if(k.length<2||v.length<2)return-1;tt=2,ot/=2,rt/=2,_/=2}function D(j,X){return tt===1?j[X]:j.readUInt16BE(X*tt)}let P;if(K){let j=-1;for(P=_;Pot&&(_=ot-rt),P=_;P>=0;P--){let j=!0;for(let X=0;XK&&(B=K)):B=K;const tt=v.length;B>tt/2&&(B=tt/2);let ot;for(ot=0;ot>>0,isFinite(B)?(B=B>>>0,K===void 0&&(K="utf8")):(K=B,B=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const tt=this.length-_;if((B===void 0||B>tt)&&(B=tt),v.length>0&&(B<0||_<0)||_>this.length)throw new RangeError("Attempt to write outside buffer bounds");K||(K="utf8");let ot=!1;for(;;)switch(K){case"hex":return A(this,v,_,B);case"utf8":case"utf-8":return $(this,v,_,B);case"ascii":case"latin1":case"binary":return O(this,v,_,B);case"base64":return I(this,v,_,B);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,v,_,B);default:if(ot)throw new TypeError("Unknown encoding: "+K);K=(""+K).toLowerCase(),ot=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function q(k,v,_){return v===0&&_===k.length?t.fromByteArray(k):t.fromByteArray(k.slice(v,_))}function H(k,v,_){_=Math.min(k.length,_);const B=[];let K=v;for(;K<_;){const tt=k[K];let ot=null,rt=tt>239?4:tt>223?3:tt>191?2:1;if(K+rt<=_){let D,P,j,X;switch(rt){case 1:tt<128&&(ot=tt);break;case 2:D=k[K+1],(D&192)===128&&(X=(tt&31)<<6|D&63,X>127&&(ot=X));break;case 3:D=k[K+1],P=k[K+2],(D&192)===128&&(P&192)===128&&(X=(tt&15)<<12|(D&63)<<6|P&63,X>2047&&(X<55296||X>57343)&&(ot=X));break;case 4:D=k[K+1],P=k[K+2],j=k[K+3],(D&192)===128&&(P&192)===128&&(j&192)===128&&(X=(tt&15)<<18|(D&63)<<12|(P&63)<<6|j&63,X>65535&&X<1114112&&(ot=X))}}ot===null?(ot=65533,rt=1):ot>65535&&(ot-=65536,B.push(ot>>>10&1023|55296),ot=56320|ot&1023),B.push(ot),K+=rt}return Y(B)}var G=4096;function Y(k){const v=k.length;if(v<=G)return String.fromCharCode.apply(String,k);let _="",B=0;for(;BB)&&(_=B);let K="";for(let tt=v;tt<_;++tt)K+=ut[k[tt]];return K}function U(k,v,_){const B=k.slice(v,_);let K="";for(let tt=0;ttB&&(v=B),_<0?(_+=B,_<0&&(_=0)):_>B&&(_=B),__)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(v,_,B){v=v>>>0,_=_>>>0,B||J(v,_,this.length);let K=this[v],tt=1,ot=0;for(;++ot<_&&(tt*=256);)K+=this[v+ot]*tt;return K},a.prototype.readUintBE=a.prototype.readUIntBE=function(v,_,B){v=v>>>0,_=_>>>0,B||J(v,_,this.length);let K=this[v+--_],tt=1;for(;_>0&&(tt*=256);)K+=this[v+--_]*tt;return K},a.prototype.readUint8=a.prototype.readUInt8=function(v,_){return v=v>>>0,_||J(v,1,this.length),this[v]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(v,_){return v=v>>>0,_||J(v,2,this.length),this[v]|this[v+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(v,_){return v=v>>>0,_||J(v,2,this.length),this[v]<<8|this[v+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(v,_){return v=v>>>0,_||J(v,4,this.length),(this[v]|this[v+1]<<8|this[v+2]<<16)+this[v+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(v,_){return v=v>>>0,_||J(v,4,this.length),this[v]*16777216+(this[v+1]<<16|this[v+2]<<8|this[v+3])},a.prototype.readBigUInt64LE=dt(function(v){v=v>>>0,Ct(v,"offset");const _=this[v],B=this[v+7];(_===void 0||B===void 0)&&Dt(v,this.length-8);const K=_+this[++v]*2**8+this[++v]*2**16+this[++v]*2**24,tt=this[++v]+this[++v]*2**8+this[++v]*2**16+B*2**24;return BigInt(K)+(BigInt(tt)<>>0,Ct(v,"offset");const _=this[v],B=this[v+7];(_===void 0||B===void 0)&&Dt(v,this.length-8);const K=_*2**24+this[++v]*2**16+this[++v]*2**8+this[++v],tt=this[++v]*2**24+this[++v]*2**16+this[++v]*2**8+B;return(BigInt(K)<>>0,_=_>>>0,B||J(v,_,this.length);let K=this[v],tt=1,ot=0;for(;++ot<_&&(tt*=256);)K+=this[v+ot]*tt;return tt*=128,K>=tt&&(K-=Math.pow(2,8*_)),K},a.prototype.readIntBE=function(v,_,B){v=v>>>0,_=_>>>0,B||J(v,_,this.length);let K=_,tt=1,ot=this[v+--K];for(;K>0&&(tt*=256);)ot+=this[v+--K]*tt;return tt*=128,ot>=tt&&(ot-=Math.pow(2,8*_)),ot},a.prototype.readInt8=function(v,_){return v=v>>>0,_||J(v,1,this.length),this[v]&128?(255-this[v]+1)*-1:this[v]},a.prototype.readInt16LE=function(v,_){v=v>>>0,_||J(v,2,this.length);const B=this[v]|this[v+1]<<8;return B&32768?B|4294901760:B},a.prototype.readInt16BE=function(v,_){v=v>>>0,_||J(v,2,this.length);const B=this[v+1]|this[v]<<8;return B&32768?B|4294901760:B},a.prototype.readInt32LE=function(v,_){return v=v>>>0,_||J(v,4,this.length),this[v]|this[v+1]<<8|this[v+2]<<16|this[v+3]<<24},a.prototype.readInt32BE=function(v,_){return v=v>>>0,_||J(v,4,this.length),this[v]<<24|this[v+1]<<16|this[v+2]<<8|this[v+3]},a.prototype.readBigInt64LE=dt(function(v){v=v>>>0,Ct(v,"offset");const _=this[v],B=this[v+7];(_===void 0||B===void 0)&&Dt(v,this.length-8);const K=this[v+4]+this[v+5]*2**8+this[v+6]*2**16+(B<<24);return(BigInt(K)<>>0,Ct(v,"offset");const _=this[v],B=this[v+7];(_===void 0||B===void 0)&&Dt(v,this.length-8);const K=(_<<24)+this[++v]*2**16+this[++v]*2**8+this[++v];return(BigInt(K)<>>0,_||J(v,4,this.length),r.read(this,v,!0,23,4)},a.prototype.readFloatBE=function(v,_){return v=v>>>0,_||J(v,4,this.length),r.read(this,v,!1,23,4)},a.prototype.readDoubleLE=function(v,_){return v=v>>>0,_||J(v,8,this.length),r.read(this,v,!0,52,8)},a.prototype.readDoubleBE=function(v,_){return v=v>>>0,_||J(v,8,this.length),r.read(this,v,!1,52,8)};function W(k,v,_,B,K,tt){if(!a.isBuffer(k))throw new TypeError('"buffer" argument must be a Buffer instance');if(v>K||vk.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(v,_,B,K){if(v=+v,_=_>>>0,B=B>>>0,!K){const rt=Math.pow(2,8*B)-1;W(this,v,_,B,rt,0)}let tt=1,ot=0;for(this[_]=v&255;++ot>>0,B=B>>>0,!K){const rt=Math.pow(2,8*B)-1;W(this,v,_,B,rt,0)}let tt=B-1,ot=1;for(this[_+tt]=v&255;--tt>=0&&(ot*=256);)this[_+tt]=v/ot&255;return _+B},a.prototype.writeUint8=a.prototype.writeUInt8=function(v,_,B){return v=+v,_=_>>>0,B||W(this,v,_,1,255,0),this[_]=v&255,_+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(v,_,B){return v=+v,_=_>>>0,B||W(this,v,_,2,65535,0),this[_]=v&255,this[_+1]=v>>>8,_+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(v,_,B){return v=+v,_=_>>>0,B||W(this,v,_,2,65535,0),this[_]=v>>>8,this[_+1]=v&255,_+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(v,_,B){return v=+v,_=_>>>0,B||W(this,v,_,4,4294967295,0),this[_+3]=v>>>24,this[_+2]=v>>>16,this[_+1]=v>>>8,this[_]=v&255,_+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(v,_,B){return v=+v,_=_>>>0,B||W(this,v,_,4,4294967295,0),this[_]=v>>>24,this[_+1]=v>>>16,this[_+2]=v>>>8,this[_+3]=v&255,_+4};function z(k,v,_,B,K){vt(v,B,K,k,_,7);let tt=Number(v&BigInt(4294967295));k[_++]=tt,tt=tt>>8,k[_++]=tt,tt=tt>>8,k[_++]=tt,tt=tt>>8,k[_++]=tt;let ot=Number(v>>BigInt(32)&BigInt(4294967295));return k[_++]=ot,ot=ot>>8,k[_++]=ot,ot=ot>>8,k[_++]=ot,ot=ot>>8,k[_++]=ot,_}function V(k,v,_,B,K){vt(v,B,K,k,_,7);let tt=Number(v&BigInt(4294967295));k[_+7]=tt,tt=tt>>8,k[_+6]=tt,tt=tt>>8,k[_+5]=tt,tt=tt>>8,k[_+4]=tt;let ot=Number(v>>BigInt(32)&BigInt(4294967295));return k[_+3]=ot,ot=ot>>8,k[_+2]=ot,ot=ot>>8,k[_+1]=ot,ot=ot>>8,k[_]=ot,_+8}a.prototype.writeBigUInt64LE=dt(function(v,_=0){return z(this,v,_,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=dt(function(v,_=0){return V(this,v,_,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(v,_,B,K){if(v=+v,_=_>>>0,!K){const D=Math.pow(2,8*B-1);W(this,v,_,B,D-1,-D)}let tt=0,ot=1,rt=0;for(this[_]=v&255;++tt>0)-rt&255;return _+B},a.prototype.writeIntBE=function(v,_,B,K){if(v=+v,_=_>>>0,!K){const D=Math.pow(2,8*B-1);W(this,v,_,B,D-1,-D)}let tt=B-1,ot=1,rt=0;for(this[_+tt]=v&255;--tt>=0&&(ot*=256);)v<0&&rt===0&&this[_+tt+1]!==0&&(rt=1),this[_+tt]=(v/ot>>0)-rt&255;return _+B},a.prototype.writeInt8=function(v,_,B){return v=+v,_=_>>>0,B||W(this,v,_,1,127,-128),v<0&&(v=255+v+1),this[_]=v&255,_+1},a.prototype.writeInt16LE=function(v,_,B){return v=+v,_=_>>>0,B||W(this,v,_,2,32767,-32768),this[_]=v&255,this[_+1]=v>>>8,_+2},a.prototype.writeInt16BE=function(v,_,B){return v=+v,_=_>>>0,B||W(this,v,_,2,32767,-32768),this[_]=v>>>8,this[_+1]=v&255,_+2},a.prototype.writeInt32LE=function(v,_,B){return v=+v,_=_>>>0,B||W(this,v,_,4,2147483647,-2147483648),this[_]=v&255,this[_+1]=v>>>8,this[_+2]=v>>>16,this[_+3]=v>>>24,_+4},a.prototype.writeInt32BE=function(v,_,B){return v=+v,_=_>>>0,B||W(this,v,_,4,2147483647,-2147483648),v<0&&(v=4294967295+v+1),this[_]=v>>>24,this[_+1]=v>>>16,this[_+2]=v>>>8,this[_+3]=v&255,_+4},a.prototype.writeBigInt64LE=dt(function(v,_=0){return z(this,v,_,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=dt(function(v,_=0){return V(this,v,_,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Z(k,v,_,B,K,tt){if(_+B>k.length)throw new RangeError("Index out of range");if(_<0)throw new RangeError("Index out of range")}function nt(k,v,_,B,K){return v=+v,_=_>>>0,K||Z(k,v,_,4),r.write(k,v,_,B,23,4),_+4}a.prototype.writeFloatLE=function(v,_,B){return nt(this,v,_,!0,B)},a.prototype.writeFloatBE=function(v,_,B){return nt(this,v,_,!1,B)};function et(k,v,_,B,K){return v=+v,_=_>>>0,K||Z(k,v,_,8),r.write(k,v,_,B,52,8),_+8}a.prototype.writeDoubleLE=function(v,_,B){return et(this,v,_,!0,B)},a.prototype.writeDoubleBE=function(v,_,B){return et(this,v,_,!1,B)},a.prototype.copy=function(v,_,B,K){if(!a.isBuffer(v))throw new TypeError("argument should be a Buffer");if(B||(B=0),!K&&K!==0&&(K=this.length),_>=v.length&&(_=v.length),_||(_=0),K>0&&K=this.length)throw new RangeError("Index out of range");if(K<0)throw new RangeError("sourceEnd out of bounds");K>this.length&&(K=this.length),v.length-_>>0,B=B===void 0?this.length:B>>>0,v||(v=0);let tt;if(typeof v=="number")for(tt=_;tt2**32?K=ht(String(_)):typeof _=="bigint"&&(K=String(_),(_>BigInt(2)**BigInt(32)||_<-(BigInt(2)**BigInt(32)))&&(K=ht(K)),K+="n"),B+=` It must be ${v}. Received ${K}`,B},RangeError);function ht(k){let v="",_=k.length;const B=k[0]==="-"?1:0;for(;_>=B+4;_-=3)v=`_${k.slice(_-3,_)}${v}`;return`${k.slice(0,_)}${v}`}function pt(k,v,_){Ct(v,"offset"),(k[v]===void 0||k[v+_]===void 0)&&Dt(v,k.length-(_+1))}function vt(k,v,_,B,K,tt){if(k>_||k= 0${ot} and < 2${ot} ** ${(tt+1)*8}${ot}`:rt=`>= -(2${ot} ** ${(tt+1)*8-1}${ot}) and < 2 ** ${(tt+1)*8-1}${ot}`,new it.ERR_OUT_OF_RANGE("value",rt,k)}pt(B,K,tt)}function Ct(k,v){if(typeof k!="number")throw new it.ERR_INVALID_ARG_TYPE(v,"number",k)}function Dt(k,v,_){throw Math.floor(k)!==k?(Ct(k,_),new it.ERR_OUT_OF_RANGE("offset","an integer",k)):v<0?new it.ERR_BUFFER_OUT_OF_BOUNDS:new it.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${v}`,k)}var Rt=/[^+/0-9A-Za-z-_]/g;function Ot(k){if(k=k.split("=")[0],k=k.trim().replace(Rt,""),k.length<2)return"";for(;k.length%4!==0;)k=k+"=";return k}function Tt(k,v){v=v||1/0;let _;const B=k.length;let K=null;const tt=[];for(let ot=0;ot55295&&_<57344){if(!K){if(_>56319){(v-=3)>-1&&tt.push(239,191,189);continue}else if(ot+1===B){(v-=3)>-1&&tt.push(239,191,189);continue}K=_;continue}if(_<56320){(v-=3)>-1&&tt.push(239,191,189),K=_;continue}_=(K-55296<<10|_-56320)+65536}else K&&(v-=3)>-1&&tt.push(239,191,189);if(K=null,_<128){if((v-=1)<0)break;tt.push(_)}else if(_<2048){if((v-=2)<0)break;tt.push(_>>6|192,_&63|128)}else if(_<65536){if((v-=3)<0)break;tt.push(_>>12|224,_>>6&63|128,_&63|128)}else if(_<1114112){if((v-=4)<0)break;tt.push(_>>18|240,_>>12&63|128,_>>6&63|128,_&63|128)}else throw new Error("Invalid code point")}return tt}function ve(k){const v=[];for(let _=0;_>8,K=_%256,tt.push(K),tt.push(B);return tt}function Kt(k){return t.toByteArray(Ot(k))}function Jt(k,v,_,B){let K;for(K=0;K=v.length||K>=k.length);++K)v[K+_]=k[K];return K}function re(k,v){return k instanceof v||k!=null&&k.constructor!=null&&k.constructor.name!=null&&k.constructor.name===v.name}function Me(k){return k!==k}var ut=function(){const k="0123456789abcdef",v=new Array(256);for(let _=0;_<16;++_){const B=_*16;for(let K=0;K<16;++K)v[B+K]=k[_]+k[K]}return v}();function dt(k){return typeof BigInt>"u"?kt:k}function kt(){throw new Error("BigInt not supported")}}}),yf=Lt({"node_modules/memfs/lib/internal/buffer.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.bufferFrom=e.bufferAllocUnsafe=e.Buffer=void 0;var t=tX();Object.defineProperty(e,"Buffer",{enumerable:!0,get:function(){return t.Buffer}});function r(s,...o){return new t.Buffer(s,...o)}var n=t.Buffer.allocUnsafe||r;e.bufferAllocUnsafe=n;var i=t.Buffer.from||r;e.bufferFrom=i}}),nO=Lt({"node_modules/has-symbols/shams.js"(e,t){t.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var n={},i=Symbol("test"),s=Object(i);if(typeof i=="string"||Object.prototype.toString.call(i)!=="[object Symbol]"||Object.prototype.toString.call(s)!=="[object Symbol]")return!1;var o=42;n[i]=o;for(i in n)return!1;if(typeof Object.keys=="function"&&Object.keys(n).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(n).length!==0)return!1;var a=Object.getOwnPropertySymbols(n);if(a.length!==1||a[0]!==i||!Object.prototype.propertyIsEnumerable.call(n,i))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(n,i);if(l.value!==o||l.enumerable!==!0)return!1}return!0}}}),xx=Lt({"node_modules/has-tostringtag/shams.js"(e,t){var r=nO();t.exports=function(){return r()&&!!Symbol.toStringTag}}}),eX=Lt({"node_modules/has-symbols/index.js"(e,t){var r=typeof Symbol<"u"&&Symbol,n=nO();t.exports=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:n()}}}),rX=Lt({"node_modules/has-proto/index.js"(e,t){var r={foo:{}},n=Object;t.exports=function(){return{__proto__:r}.foo===r.foo&&!({__proto__:null}instanceof n)}}}),nX=Lt({"node_modules/function-bind/implementation.js"(e,t){var r="Function.prototype.bind called on incompatible ",n=Array.prototype.slice,i=Object.prototype.toString,s="[object Function]";t.exports=function(a){var l=this;if(typeof l!="function"||i.call(l)!==s)throw new TypeError(r+l);for(var c=n.call(arguments,1),u,h=function(){if(this instanceof u){var p=l.apply(this,c.concat(n.call(arguments)));return Object(p)===p?p:this}else return l.apply(a,c.concat(n.call(arguments)))},d=Math.max(0,l.length-c.length),g=[],y=0;y"u"||!d?r:d(Uint8Array),f={"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":u&&d?d([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":g,"%AsyncGenerator%":g,"%AsyncGeneratorFunction%":g,"%AsyncIteratorPrototype%":g,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":g,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":u&&d?d(d([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!u||!d?r:d(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!u||!d?r:d(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":u&&d?d(""[Symbol.iterator]()):r,"%Symbol%":u?Symbol:r,"%SyntaxError%":n,"%ThrowTypeError%":c,"%TypedArray%":y,"%TypeError%":s,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet};if(d)try{null.error}catch(H){p=d(d(H)),f["%Error.prototype%"]=p}var p,m=function H(G){var Y;if(G==="%AsyncFunction%")Y=o("async function () {}");else if(G==="%GeneratorFunction%")Y=o("function* () {}");else if(G==="%AsyncGeneratorFunction%")Y=o("async function* () {}");else if(G==="%AsyncGenerator%"){var F=H("%AsyncGeneratorFunction%");F&&(Y=F.prototype)}else if(G==="%AsyncIteratorPrototype%"){var T=H("%AsyncGenerator%");T&&d&&(Y=d(T.prototype))}return f[G]=Y,Y},b={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},w=_x(),x=iX(),E=w.call(Function.call,Array.prototype.concat),S=w.call(Function.apply,Array.prototype.splice),C=w.call(Function.call,String.prototype.replace),A=w.call(Function.call,String.prototype.slice),$=w.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,I=/\\(\\)?/g,M=function(G){var Y=A(G,0,1),F=A(G,-1);if(Y==="%"&&F!=="%")throw new n("invalid intrinsic syntax, expected closing `%`");if(F==="%"&&Y!=="%")throw new n("invalid intrinsic syntax, expected opening `%`");var T=[];return C(G,O,function(N,U,J,W){T[T.length]=J?C(W,I,"$1"):U||N}),T},q=function(G,Y){var F=G,T;if(x(b,F)&&(T=b[F],F="%"+T[0]+"%"),x(f,F)){var N=f[F];if(N===g&&(N=m(F)),typeof N>"u"&&!Y)throw new s("intrinsic "+G+" exists, but is not available. Please file an issue!");return{alias:T,name:F,value:N}}throw new n("intrinsic "+G+" does not exist!")};t.exports=function(G,Y){if(typeof G!="string"||G.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Y!="boolean")throw new s('"allowMissing" argument must be a boolean');if($(/^%?[^%]*%?$/,G)===null)throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var F=M(G),T=F.length>0?F[0]:"",N=q("%"+T+"%",Y),U=N.name,J=N.value,W=!1,z=N.alias;z&&(T=z[0],S(F,E([0,1],z)));for(var V=1,Z=!0;V=F.length){var lt=a(J,nt);Z=!!lt,Z&&"get"in lt&&!("originalValue"in lt.get)?J=lt.get:J=J[nt]}else Z=x(J,nt),J=J[nt];Z&&!W&&(f[U]=J)}}return J}}}),C0=Lt({"node_modules/call-bind/index.js"(e,t){var r=_x(),n=E0(),i=n("%Function.prototype.apply%"),s=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||r.call(s,i),a=n("%Object.getOwnPropertyDescriptor%",!0),l=n("%Object.defineProperty%",!0),c=n("%Math.max%");if(l)try{l({},"a",{value:1})}catch{l=null}t.exports=function(d){var g=o(r,s,arguments);if(a&&l){var y=a(g,"length");y.configurable&&l(g,"length",{value:1+c(0,d.length-(arguments.length-1))})}return g};var u=function(){return o(r,i,arguments)};l?l(t.exports,"apply",{value:u}):t.exports.apply=u}}),iO=Lt({"node_modules/call-bind/callBound.js"(e,t){var r=E0(),n=C0(),i=n(r("String.prototype.indexOf"));t.exports=function(o,a){var l=r(o,!!a);return typeof l=="function"&&i(o,".prototype.")>-1?n(l):l}}}),sX=Lt({"node_modules/is-arguments/index.js"(e,t){var r=xx()(),n=iO(),i=n("Object.prototype.toString"),s=function(c){return r&&c&&typeof c=="object"&&Symbol.toStringTag in c?!1:i(c)==="[object Arguments]"},o=function(c){return s(c)?!0:c!==null&&typeof c=="object"&&typeof c.length=="number"&&c.length>=0&&i(c)!=="[object Array]"&&i(c.callee)==="[object Function]"},a=function(){return s(arguments)}();s.isLegacyArguments=o,t.exports=a?s:o}}),oX=Lt({"node_modules/is-generator-function/index.js"(e,t){var r=Object.prototype.toString,n=Function.prototype.toString,i=/^\s*(?:function)?\*/,s=xx()(),o=Object.getPrototypeOf,a=function(){if(!s)return!1;try{return Function("return function*() {}")()}catch{}},l;t.exports=function(u){if(typeof u!="function")return!1;if(i.test(n.call(u)))return!0;if(!s){var h=r.call(u);return h==="[object GeneratorFunction]"}if(!o)return!1;if(typeof l>"u"){var d=a();l=d?o(d):!1}return o(u)===l}}}),aX=Lt({"node_modules/is-callable/index.js"(e,t){var r=Function.prototype.toString,n=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,i,s;if(typeof n=="function"&&typeof Object.defineProperty=="function")try{i=Object.defineProperty({},"length",{get:function(){throw s}}),s={},n(function(){throw 42},null,i)}catch(x){x!==s&&(n=null)}else n=null;var o=/^\s*class\b/,a=function(E){try{var S=r.call(E);return o.test(S)}catch{return!1}},l=function(E){try{return a(E)?!1:(r.call(E),!0)}catch{return!1}},c=Object.prototype.toString,u="[object Object]",h="[object Function]",d="[object GeneratorFunction]",g="[object HTMLAllCollection]",y="[object HTML document.all class]",f="[object HTMLCollection]",p=typeof Symbol=="function"&&!!Symbol.toStringTag,m=!(0 in[,]),b=function(){return!1};typeof document=="object"&&(w=document.all,c.call(w)===c.call(document.all)&&(b=function(E){if((m||!E)&&(typeof E>"u"||typeof E=="object"))try{var S=c.call(E);return(S===g||S===y||S===f||S===u)&&E("")==null}catch{}return!1}));var w;t.exports=n?function(E){if(b(E))return!0;if(!E||typeof E!="function"&&typeof E!="object")return!1;try{n(E,null,i)}catch(S){if(S!==s)return!1}return!a(E)&&l(E)}:function(E){if(b(E))return!0;if(!E||typeof E!="function"&&typeof E!="object")return!1;if(p)return l(E);if(a(E))return!1;var S=c.call(E);return S!==h&&S!==d&&!/^\[object HTML/.test(S)?!1:l(E)}}}),lX=Lt({"node_modules/for-each/index.js"(e,t){var r=aX(),n=Object.prototype.toString,i=Object.prototype.hasOwnProperty,s=function(u,h,d){for(var g=0,y=u.length;g=3&&(g=d),n.call(u)==="[object Array]"?s(u,h,g):typeof u=="string"?o(u,h,g):a(u,h,g)};t.exports=l}}),cX=Lt({"node_modules/available-typed-arrays/index.js"(e,t){var r=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],n=typeof globalThis>"u"?global:globalThis;t.exports=function(){for(var s=[],o=0;o"u"?global:globalThis,u=n(),h=s("String.prototype.slice"),d=Object.getPrototypeOf,g=s("Array.prototype.indexOf",!0)||function(b,w){for(var x=0;x-1?w:w!=="Object"?!1:p(b)}return o?f(b):null}}}),hX=Lt({"node_modules/is-typed-array/index.js"(e,t){var r=sO();t.exports=function(i){return!!r(i)}}}),fX=Lt({"node_modules/util/support/types.js"(e){var t=sX(),r=oX(),n=sO(),i=hX();function s(mt){return mt.call.bind(mt)}var o=typeof BigInt<"u",a=typeof Symbol<"u",l=s(Object.prototype.toString),c=s(Number.prototype.valueOf),u=s(String.prototype.valueOf),h=s(Boolean.prototype.valueOf);o&&(d=s(BigInt.prototype.valueOf));var d;a&&(g=s(Symbol.prototype.valueOf));var g;function y(mt,Kt){if(typeof mt!="object")return!1;try{return Kt(mt),!0}catch{return!1}}e.isArgumentsObject=t,e.isGeneratorFunction=r,e.isTypedArray=i;function f(mt){return typeof Promise<"u"&&mt instanceof Promise||mt!==null&&typeof mt=="object"&&typeof mt.then=="function"&&typeof mt.catch=="function"}e.isPromise=f;function p(mt){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(mt):i(mt)||z(mt)}e.isArrayBufferView=p;function m(mt){return n(mt)==="Uint8Array"}e.isUint8Array=m;function b(mt){return n(mt)==="Uint8ClampedArray"}e.isUint8ClampedArray=b;function w(mt){return n(mt)==="Uint16Array"}e.isUint16Array=w;function x(mt){return n(mt)==="Uint32Array"}e.isUint32Array=x;function E(mt){return n(mt)==="Int8Array"}e.isInt8Array=E;function S(mt){return n(mt)==="Int16Array"}e.isInt16Array=S;function C(mt){return n(mt)==="Int32Array"}e.isInt32Array=C;function A(mt){return n(mt)==="Float32Array"}e.isFloat32Array=A;function $(mt){return n(mt)==="Float64Array"}e.isFloat64Array=$;function O(mt){return n(mt)==="BigInt64Array"}e.isBigInt64Array=O;function I(mt){return n(mt)==="BigUint64Array"}e.isBigUint64Array=I;function M(mt){return l(mt)==="[object Map]"}M.working=typeof Map<"u"&&M(new Map);function q(mt){return typeof Map>"u"?!1:M.working?M(mt):mt instanceof Map}e.isMap=q;function H(mt){return l(mt)==="[object Set]"}H.working=typeof Set<"u"&&H(new Set);function G(mt){return typeof Set>"u"?!1:H.working?H(mt):mt instanceof Set}e.isSet=G;function Y(mt){return l(mt)==="[object WeakMap]"}Y.working=typeof WeakMap<"u"&&Y(new WeakMap);function F(mt){return typeof WeakMap>"u"?!1:Y.working?Y(mt):mt instanceof WeakMap}e.isWeakMap=F;function T(mt){return l(mt)==="[object WeakSet]"}T.working=typeof WeakSet<"u"&&T(new WeakSet);function N(mt){return T(mt)}e.isWeakSet=N;function U(mt){return l(mt)==="[object ArrayBuffer]"}U.working=typeof ArrayBuffer<"u"&&U(new ArrayBuffer);function J(mt){return typeof ArrayBuffer>"u"?!1:U.working?U(mt):mt instanceof ArrayBuffer}e.isArrayBuffer=J;function W(mt){return l(mt)==="[object DataView]"}W.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&W(new DataView(new ArrayBuffer(1),0,1));function z(mt){return typeof DataView>"u"?!1:W.working?W(mt):mt instanceof DataView}e.isDataView=z;var V=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function Z(mt){return l(mt)==="[object SharedArrayBuffer]"}function nt(mt){return typeof V>"u"?!1:(typeof Z.working>"u"&&(Z.working=Z(new V)),Z.working?Z(mt):mt instanceof V)}e.isSharedArrayBuffer=nt;function et(mt){return l(mt)==="[object AsyncFunction]"}e.isAsyncFunction=et;function it(mt){return l(mt)==="[object Map Iterator]"}e.isMapIterator=it;function lt(mt){return l(mt)==="[object Set Iterator]"}e.isSetIterator=lt;function ht(mt){return l(mt)==="[object Generator]"}e.isGeneratorObject=ht;function pt(mt){return l(mt)==="[object WebAssembly.Module]"}e.isWebAssemblyCompiledModule=pt;function vt(mt){return y(mt,c)}e.isNumberObject=vt;function Ct(mt){return y(mt,u)}e.isStringObject=Ct;function Dt(mt){return y(mt,h)}e.isBooleanObject=Dt;function Rt(mt){return o&&y(mt,d)}e.isBigIntObject=Rt;function Ot(mt){return a&&y(mt,g)}e.isSymbolObject=Ot;function Tt(mt){return vt(mt)||Ct(mt)||Dt(mt)||Rt(mt)||Ot(mt)}e.isBoxedPrimitive=Tt;function ve(mt){return typeof Uint8Array<"u"&&(J(mt)||nt(mt))}e.isAnyArrayBuffer=ve,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(mt){Object.defineProperty(e,mt,{enumerable:!1,value:function(){throw new Error(mt+" is not supported in userland")}})})}}),dX=Lt({"node_modules/util/support/isBufferBrowser.js"(e,t){t.exports=function(n){return n&&typeof n=="object"&&typeof n.copy=="function"&&typeof n.fill=="function"&&typeof n.readUInt8=="function"}}}),pX=Lt({"node_modules/inherits/inherits_browser.js"(e,t){typeof Object.create=="function"?t.exports=function(n,i){i&&(n.super_=i,n.prototype=Object.create(i.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(n,i){if(i){n.super_=i;var s=function(){};s.prototype=i.prototype,n.prototype=new s,n.prototype.constructor=n}}}}),pl=Lt({"node_modules/util/util.js"(e){var t=Object.getOwnPropertyDescriptors||function(z){for(var V=Object.keys(z),Z={},nt=0;nt=nt)return lt;switch(lt){case"%s":return String(Z[V++]);case"%d":return Number(Z[V++]);case"%j":try{return JSON.stringify(Z[V++])}catch{return"[Circular]"}default:return lt}}),it=Z[V];V"u")return function(){return e.deprecate(W,z).apply(this,arguments)};var V=!1;function Z(){if(!V){if(ie.throwDeprecation)throw new Error(z);ie.traceDeprecation?console.trace(z):console.error(z),V=!0}return W.apply(this,arguments)}return Z};var n={},i=/^$/;ie.env.NODE_DEBUG&&(s=ie.env.NODE_DEBUG,s=s.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),i=new RegExp("^"+s+"$","i"));var s;e.debuglog=function(W){if(W=W.toUpperCase(),!n[W])if(i.test(W)){var z=ie.pid;n[W]=function(){var V=e.format.apply(e,arguments);console.error("%s %d: %s",W,z,V)}}else n[W]=function(){};return n[W]};function o(W,z){var V={seen:[],stylize:l};return arguments.length>=3&&(V.depth=arguments[2]),arguments.length>=4&&(V.colors=arguments[3]),m(z)?V.showHidden=z:z&&e._extend(V,z),C(V.showHidden)&&(V.showHidden=!1),C(V.depth)&&(V.depth=2),C(V.colors)&&(V.colors=!1),C(V.customInspect)&&(V.customInspect=!0),V.colors&&(V.stylize=a),u(V,W,V.depth)}e.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function a(W,z){var V=o.styles[z];return V?"\x1B["+o.colors[V][0]+"m"+W+"\x1B["+o.colors[V][1]+"m":W}function l(W,z){return W}function c(W){var z={};return W.forEach(function(V,Z){z[V]=!0}),z}function u(W,z,V){if(W.customInspect&&z&&M(z.inspect)&&z.inspect!==e.inspect&&!(z.constructor&&z.constructor.prototype===z)){var Z=z.inspect(V,W);return E(Z)||(Z=u(W,Z,V)),Z}var nt=h(W,z);if(nt)return nt;var et=Object.keys(z),it=c(et);if(W.showHidden&&(et=Object.getOwnPropertyNames(z)),I(z)&&(et.indexOf("message")>=0||et.indexOf("description")>=0))return d(z);if(et.length===0){if(M(z)){var lt=z.name?": "+z.name:"";return W.stylize("[Function"+lt+"]","special")}if(A(z))return W.stylize(RegExp.prototype.toString.call(z),"regexp");if(O(z))return W.stylize(Date.prototype.toString.call(z),"date");if(I(z))return d(z)}var ht="",pt=!1,vt=["{","}"];if(p(z)&&(pt=!0,vt=["[","]"]),M(z)){var Ct=z.name?": "+z.name:"";ht=" [Function"+Ct+"]"}if(A(z)&&(ht=" "+RegExp.prototype.toString.call(z)),O(z)&&(ht=" "+Date.prototype.toUTCString.call(z)),I(z)&&(ht=" "+d(z)),et.length===0&&(!pt||z.length==0))return vt[0]+ht+vt[1];if(V<0)return A(z)?W.stylize(RegExp.prototype.toString.call(z),"regexp"):W.stylize("[Object]","special");W.seen.push(z);var Dt;return pt?Dt=g(W,z,V,it,et):Dt=et.map(function(Rt){return y(W,z,V,it,Rt,pt)}),W.seen.pop(),f(Dt,ht,vt)}function h(W,z){if(C(z))return W.stylize("undefined","undefined");if(E(z)){var V="'"+JSON.stringify(z).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return W.stylize(V,"string")}if(x(z))return W.stylize(""+z,"number");if(m(z))return W.stylize(""+z,"boolean");if(b(z))return W.stylize("null","null")}function d(W){return"["+Error.prototype.toString.call(W)+"]"}function g(W,z,V,Z,nt){for(var et=[],it=0,lt=z.length;it-1&&(et?lt=lt.split(` `).map(function(pt){return" "+pt}).join(` `).slice(2):lt=` `+lt.split(` `).map(function(pt){return" "+pt}).join(` `))):lt=W.stylize("[Circular]","special")),C(it)){if(et&&nt.match(/^\d+$/))return lt;it=JSON.stringify(""+nt),it.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(it=it.slice(1,-1),it=W.stylize(it,"name")):(it=it.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),it=W.stylize(it,"string"))}return it+": "+lt}function f(W,z,V){var Z=W.reduce(function(nt,et){return et.indexOf(` `)>=0,nt+et.replace(/\u001b\[\d\d?m/g,"").length+1},0);return Z>60?V[0]+(z===""?"":z+` `)+" "+W.join(`, `)+" "+V[1]:V[0]+z+" "+W.join(", ")+" "+V[1]}e.types=fX();function p(W){return Array.isArray(W)}e.isArray=p;function m(W){return typeof W=="boolean"}e.isBoolean=m;function b(W){return W===null}e.isNull=b;function w(W){return W==null}e.isNullOrUndefined=w;function x(W){return typeof W=="number"}e.isNumber=x;function E(W){return typeof W=="string"}e.isString=E;function S(W){return typeof W=="symbol"}e.isSymbol=S;function C(W){return W===void 0}e.isUndefined=C;function A(W){return $(W)&&H(W)==="[object RegExp]"}e.isRegExp=A,e.types.isRegExp=A;function $(W){return typeof W=="object"&&W!==null}e.isObject=$;function O(W){return $(W)&&H(W)==="[object Date]"}e.isDate=O,e.types.isDate=O;function I(W){return $(W)&&(H(W)==="[object Error]"||W instanceof Error)}e.isError=I,e.types.isNativeError=I;function M(W){return typeof W=="function"}e.isFunction=M;function q(W){return W===null||typeof W=="boolean"||typeof W=="number"||typeof W=="string"||typeof W=="symbol"||typeof W>"u"}e.isPrimitive=q,e.isBuffer=dX();function H(W){return Object.prototype.toString.call(W)}function G(W){return W<10?"0"+W.toString(10):W.toString(10)}var Y=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function F(){var W=new Date,z=[G(W.getHours()),G(W.getMinutes()),G(W.getSeconds())].join(":");return[W.getDate(),Y[W.getMonth()],z].join(" ")}e.log=function(){console.log("%s - %s",F(),e.format.apply(e,arguments))},e.inherits=pX(),e._extend=function(W,z){if(!z||!$(z))return W;for(var V=Object.keys(z),Z=V.length;Z--;)W[V[Z]]=z[V[Z]];return W};function T(W,z){return Object.prototype.hasOwnProperty.call(W,z)}var N=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;e.promisify=function(z){if(typeof z!="function")throw new TypeError('The "original" argument must be of type Function');if(N&&z[N]){var V=z[N];if(typeof V!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(V,N,{value:V,enumerable:!1,writable:!1,configurable:!0}),V}function V(){for(var Z,nt,et=new Promise(function(ht,pt){Z=ht,nt=pt}),it=[],lt=0;lt2?"one of ".concat(b," ").concat(m.slice(0,w-1).join(", "),", or ")+m[w-1]:w===2?"one of ".concat(b," ").concat(m[0]," or ").concat(m[1]):"of ".concat(b," ").concat(m[0])}else return"of ".concat(b," ").concat(String(m))}function y(m,b,w){return m.substr(0,b.length)===b}function f(m,b,w){return(w===void 0||w>m.length)&&(w=m.length),m.substring(w-b.length,w)===b}function p(m,b,w){return typeof w!="number"&&(w=0),w+b.length>m.length?!1:m.indexOf(b,w)!==-1}d("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),d("ERR_INVALID_ARG_TYPE",function(m,b,w){u===void 0&&(u=ov()),u(typeof m=="string","'name' must be a string");var x;typeof b=="string"&&y(b,"not ")?(x="must not be",b=b.replace(/^not /,"")):x="must be";var E;if(f(m," argument"))E="The ".concat(m," ").concat(x," ").concat(g(b,"type"));else{var S=p(m,".")?"property":"argument";E='The "'.concat(m,'" ').concat(S," ").concat(x," ").concat(g(b,"type"))}return E+=". Received type ".concat(r(w)),E},TypeError),d("ERR_INVALID_ARG_VALUE",function(m,b){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";h===void 0&&(h=pl());var x=h.inspect(b);return x.length>128&&(x="".concat(x.slice(0,128),"...")),"The argument '".concat(m,"' ").concat(w,". Received ").concat(x)},TypeError),d("ERR_INVALID_RETURN_VALUE",function(m,b,w){var x;return w&&w.constructor&&w.constructor.name?x="instance of ".concat(w.constructor.name):x="type ".concat(r(w)),"Expected ".concat(m,' to be returned from the "').concat(b,'"')+" function but got ".concat(x,".")},TypeError),d("ERR_MISSING_ARGS",function(){for(var m=arguments.length,b=new Array(m),w=0;w0,"At least one arg needs to be specified");var x="The ",E=b.length;switch(b=b.map(function(S){return'"'.concat(S,'"')}),E){case 1:x+="".concat(b[0]," argument");break;case 2:x+="".concat(b[0]," and ").concat(b[1]," arguments");break;default:x+=b.slice(0,E-1).join(", "),x+=", and ".concat(b[E-1]," arguments");break}return"".concat(x," must be specified")},TypeError),t.exports.codes=c}}),mX=Lt({"node_modules/assert/build/internal/assert/assertion_error.js"(e,t){function r(F){for(var T=1;T"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function d(F,T,N){return h()?d=Reflect.construct:d=function(J,W,z){var V=[null];V.push.apply(V,W);var Z=Function.bind.apply(J,V),nt=new Z;return z&&y(nt,z.prototype),nt},d.apply(null,arguments)}function g(F){return Function.toString.call(F).indexOf("[native code]")!==-1}function y(F,T){return y=Object.setPrototypeOf||function(U,J){return U.__proto__=J,U},y(F,T)}function f(F){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(N){return N.__proto__||Object.getPrototypeOf(N)},f(F)}function p(F){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?p=function(N){return typeof N}:p=function(N){return N&&typeof Symbol=="function"&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N},p(F)}var m=pl(),b=m.inspect,w=oO(),x=w.codes.ERR_INVALID_ARG_TYPE;function E(F,T,N){return(N===void 0||N>F.length)&&(N=F.length),F.substring(N-T.length,N)===T}function S(F,T){if(T=Math.floor(T),F.length==0||T==0)return"";var N=F.length*T;for(T=Math.floor(Math.log(T)/Math.log(2));T;)F+=F,T--;return F+=F.substring(0,N-F.length),F}var C="",A="",$="",O="",I={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},M=10;function q(F){var T=Object.keys(F),N=Object.create(Object.getPrototypeOf(F));return T.forEach(function(U){N[U]=F[U]}),Object.defineProperty(N,"message",{value:F.message}),N}function H(F){return b(F,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function G(F,T,N){var U="",J="",W=0,z="",V=!1,Z=H(F),nt=Z.split(` `),et=H(T).split(` `),it=0,lt="";if(N==="strictEqual"&&p(F)==="object"&&p(T)==="object"&&F!==null&&T!==null&&(N="strictEqualObject"),nt.length===1&&et.length===1&&nt[0]!==et[0]){var ht=nt[0].length+et[0].length;if(ht<=M){if((p(F)!=="object"||F===null)&&(p(T)!=="object"||T===null)&&(F!==0||T!==0))return"".concat(I[N],` `)+"".concat(nt[0]," !== ").concat(et[0],` `)}else if(N!=="strictEqualObject"){var pt=ie.stderr&&ie.stderr.isTTY?ie.stderr.columns:80;if(ht2&&(lt=` `.concat(S(" ",it),"^"),it=0)}}}for(var vt=nt[nt.length-1],Ct=et[et.length-1];vt===Ct&&(it++<2?z=` `.concat(vt).concat(z):U=vt,nt.pop(),et.pop(),!(nt.length===0||et.length===0));)vt=nt[nt.length-1],Ct=et[et.length-1];var Dt=Math.max(nt.length,et.length);if(Dt===0){var Rt=Z.split(` `);if(Rt.length>30)for(Rt[26]="".concat(C,"...").concat(O);Rt.length>27;)Rt.pop();return"".concat(I.notIdentical,` `).concat(Rt.join(` `),` `)}it>3&&(z=` `.concat(C,"...").concat(O).concat(z),V=!0),U!==""&&(z=` `.concat(U).concat(z),U="");var Ot=0,Tt=I[N]+` `.concat(A,"+ actual").concat(O," ").concat($,"- expected").concat(O),ve=" ".concat(C,"...").concat(O," Lines skipped");for(it=0;it1&&it>2&&(mt>4?(J+=` `.concat(C,"...").concat(O),V=!0):mt>3&&(J+=` `.concat(et[it-2]),Ot++),J+=` `.concat(et[it-1]),Ot++),W=it,U+=` `.concat($,"-").concat(O," ").concat(et[it]),Ot++;else if(et.length1&&it>2&&(mt>4?(J+=` `.concat(C,"...").concat(O),V=!0):mt>3&&(J+=` `.concat(nt[it-2]),Ot++),J+=` `.concat(nt[it-1]),Ot++),W=it,J+=` `.concat(A,"+").concat(O," ").concat(nt[it]),Ot++;else{var Kt=et[it],Jt=nt[it],re=Jt!==Kt&&(!E(Jt,",")||Jt.slice(0,-1)!==Kt);re&&E(Kt,",")&&Kt.slice(0,-1)===Jt&&(re=!1,Jt+=","),re?(mt>1&&it>2&&(mt>4?(J+=` `.concat(C,"...").concat(O),V=!0):mt>3&&(J+=` `.concat(nt[it-2]),Ot++),J+=` `.concat(nt[it-1]),Ot++),W=it,J+=` `.concat(A,"+").concat(O," ").concat(Jt),U+=` `.concat($,"-").concat(O," ").concat(Kt),Ot+=2):(J+=U,U="",(mt===1||it===0)&&(J+=` `.concat(Jt),Ot++))}if(Ot>20&&it30)for(it[26]="".concat(C,"...").concat(O);it.length>27;)it.pop();it.length===1?U=a(this,f(T).call(this,"".concat(et," ").concat(it[0]))):U=a(this,f(T).call(this,"".concat(et,` `).concat(it.join(` `),` `)))}else{var lt=H(V),ht="",pt=I[W];W==="notDeepEqual"||W==="notEqual"?(lt="".concat(I[W],` `).concat(lt),lt.length>1024&&(lt="".concat(lt.slice(0,1021),"..."))):(ht="".concat(H(Z)),lt.length>512&&(lt="".concat(lt.slice(0,509),"...")),ht.length>512&&(ht="".concat(ht.slice(0,509),"...")),W==="deepEqual"||W==="equal"?lt="".concat(pt,` `).concat(lt,` should equal `):ht=" ".concat(W," ").concat(ht)),U=a(this,f(T).call(this,"".concat(lt).concat(ht)))}return Error.stackTraceLimit=nt,U.generatedMessage=!J,Object.defineProperty(l(U),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),U.code="ERR_ASSERTION",U.actual=V,U.expected=Z,U.operator=W,Error.captureStackTrace&&Error.captureStackTrace(l(U),z),U.stack,U.name="AssertionError",a(U)}return o(T,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:b.custom,value:function(U,J){return b(this,r({},J,{customInspect:!1,depth:0}))}}]),T}(u(Error));t.exports=Y}}),gX=Lt({"node_modules/es6-object-assign/index.js"(e,t){function r(i,s){if(i==null)throw new TypeError("Cannot convert first argument to object");for(var o=Object(i),a=1;a=0&&r.call(i.callee)==="[object Function]"),o}}}),yX=Lt({"node_modules/object-keys/implementation.js"(e,t){var r;Object.keys||(n=Object.prototype.hasOwnProperty,i=Object.prototype.toString,s=aO(),o=Object.prototype.propertyIsEnumerable,a=!o.call({toString:null},"toString"),l=o.call(function(){},"prototype"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(y){var f=y.constructor;return f&&f.prototype===y},h={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},d=function(){if(typeof window>"u")return!1;for(var y in window)try{if(!h["$"+y]&&n.call(window,y)&&window[y]!==null&&typeof window[y]=="object")try{u(window[y])}catch{return!0}}catch{return!0}return!1}(),g=function(y){if(typeof window>"u"||!d)return u(y);try{return u(y)}catch{return!1}},r=function(f){var p=f!==null&&typeof f=="object",m=i.call(f)==="[object Function]",b=s(f),w=p&&i.call(f)==="[object String]",x=[];if(!p&&!m&&!b)throw new TypeError("Object.keys called on a non-object");var E=l&&m;if(w&&f.length>0&&!n.call(f,0))for(var S=0;S0)for(var C=0;C2?arguments[2]:{},f=r(g);n&&(f=s.call(f,Object.getOwnPropertySymbols(g)));for(var p=0;p10)return!0;for(var dt=0;dt57)return!0}return ut.length===10&&ut>=Math.pow(2,32)}function T(ut){return Object.keys(ut).filter(F).concat(h(ut).filter(Object.prototype.propertyIsEnumerable.bind(ut)))}function N(ut,dt){if(ut===dt)return 0;for(var kt=ut.length,k=dt.length,v=0,_=Math.min(kt,k);v<_;++v)if(ut[v]!==dt[v]){kt=ut[v],k=dt[v];break}return kt1?Z-1:0),et=1;et1?Z-1:0),et=1;et1?Z-1:0),et=1;et1?Z-1:0),et=1;et"u"?"_kCode":Symbol("code"),i={};function s(y){return class extends y{constructor(p,...m){super(l(p,m)),this.code=p,this[n]=p,this.name=`${super.name} [${this[n]}]`}}}var o=typeof globalThis<"u"?globalThis:global,a=class extends o.Error{constructor(y){if(typeof y!="object"||y===null)throw new e.TypeError("ERR_INVALID_ARG_TYPE","options","object");y.message?super(y.message):super(`${r.inspect(y.actual).slice(0,128)} ${y.operator} ${r.inspect(y.expected).slice(0,128)}`),this.generatedMessage=!y.message,this.name="AssertionError [ERR_ASSERTION]",this.code="ERR_ASSERTION",this.actual=y.actual,this.expected=y.expected,this.operator=y.operator,e.Error.captureStackTrace(this,y.stackStartFunction)}};e.AssertionError=a;function l(y,f){t.strictEqual(typeof y,"string");const p=i[y];t(p,`An invalid error message key was used: ${y}.`);let m;if(typeof p=="function")m=p;else{if(m=r.format,f===void 0||f.length===0)return p;f.unshift(p)}return String(m.apply(null,f))}e.message=l;function c(y,f){i[y]=typeof f=="function"?f:String(f)}e.E=c,e.Error=s(o.Error),e.TypeError=s(o.TypeError),e.RangeError=s(o.RangeError),c("ERR_ARG_NOT_ITERABLE","%s must be iterable"),c("ERR_ASSERTION","%s"),c("ERR_BUFFER_OUT_OF_BOUNDS",g),c("ERR_CHILD_CLOSED_BEFORE_REPLY","Child closed before reply received"),c("ERR_CONSOLE_WRITABLE_STREAM","Console expects a writable stream instance for %s"),c("ERR_CPU_USAGE","Unable to obtain cpu usage %s"),c("ERR_DNS_SET_SERVERS_FAILED",(y,f)=>`c-ares failed to set servers: "${y}" [${f}]`),c("ERR_FALSY_VALUE_REJECTION","Promise was rejected with falsy value"),c("ERR_ENCODING_NOT_SUPPORTED",y=>`The "${y}" encoding is not supported`),c("ERR_ENCODING_INVALID_ENCODED_DATA",y=>`The encoded data was not valid for encoding ${y}`),c("ERR_HTTP_HEADERS_SENT","Cannot render headers after they are sent to the client"),c("ERR_HTTP_INVALID_STATUS_CODE","Invalid status code: %s"),c("ERR_HTTP_TRAILER_INVALID","Trailers are invalid with this transfer encoding"),c("ERR_INDEX_OUT_OF_RANGE","Index out of range"),c("ERR_INVALID_ARG_TYPE",u),c("ERR_INVALID_ARRAY_LENGTH",(y,f,p)=>(t.strictEqual(typeof p,"number"),`The array "${y}" (length ${p}) must be of length ${f}.`)),c("ERR_INVALID_BUFFER_SIZE","Buffer size must be a multiple of %s"),c("ERR_INVALID_CALLBACK","Callback must be a function"),c("ERR_INVALID_CHAR","Invalid character in %s"),c("ERR_INVALID_CURSOR_POS","Cannot set cursor row without setting its column"),c("ERR_INVALID_FD",'"fd" must be a positive integer: %s'),c("ERR_INVALID_FILE_URL_HOST",'File URL host must be "localhost" or empty on %s'),c("ERR_INVALID_FILE_URL_PATH","File URL path %s"),c("ERR_INVALID_HANDLE_TYPE","This handle type cannot be sent"),c("ERR_INVALID_IP_ADDRESS","Invalid IP address: %s"),c("ERR_INVALID_OPT_VALUE",(y,f)=>`The value "${String(f)}" is invalid for option "${y}"`),c("ERR_INVALID_OPT_VALUE_ENCODING",y=>`The value "${String(y)}" is invalid for option "encoding"`),c("ERR_INVALID_REPL_EVAL_CONFIG",'Cannot specify both "breakEvalOnSigint" and "eval" for REPL'),c("ERR_INVALID_SYNC_FORK_INPUT","Asynchronous forks do not support Buffer, Uint8Array or string input: %s"),c("ERR_INVALID_THIS",'Value of "this" must be of type %s'),c("ERR_INVALID_TUPLE","%s must be an iterable %s tuple"),c("ERR_INVALID_URL","Invalid URL: %s"),c("ERR_INVALID_URL_SCHEME",y=>`The URL must be ${d(y,"scheme")}`),c("ERR_IPC_CHANNEL_CLOSED","Channel closed"),c("ERR_IPC_DISCONNECTED","IPC channel is already disconnected"),c("ERR_IPC_ONE_PIPE","Child process can have only one IPC pipe"),c("ERR_IPC_SYNC_FORK","IPC cannot be used with synchronous forks"),c("ERR_MISSING_ARGS",h),c("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),c("ERR_NAPI_CONS_FUNCTION","Constructor must be a function"),c("ERR_NAPI_CONS_PROTOTYPE_OBJECT","Constructor.prototype must be an object"),c("ERR_NO_CRYPTO","Node.js is not compiled with OpenSSL crypto support"),c("ERR_NO_LONGER_SUPPORTED","%s is no longer supported"),c("ERR_PARSE_HISTORY_DATA","Could not parse history data in %s"),c("ERR_SOCKET_ALREADY_BOUND","Socket is already bound"),c("ERR_SOCKET_BAD_PORT","Port should be > 0 and < 65536"),c("ERR_SOCKET_BAD_TYPE","Bad socket type specified. Valid types are: udp4, udp6"),c("ERR_SOCKET_CANNOT_SEND","Unable to send data"),c("ERR_SOCKET_CLOSED","Socket is closed"),c("ERR_SOCKET_DGRAM_NOT_RUNNING","Not running"),c("ERR_STDERR_CLOSE","process.stderr cannot be closed"),c("ERR_STDOUT_CLOSE","process.stdout cannot be closed"),c("ERR_STREAM_WRAP","Stream has StringDecoder set or is in objectMode"),c("ERR_TLS_CERT_ALTNAME_INVALID","Hostname/IP does not match certificate's altnames: %s"),c("ERR_TLS_DH_PARAM_SIZE",y=>`DH parameter size ${y} is less than 2048`),c("ERR_TLS_HANDSHAKE_TIMEOUT","TLS handshake timeout"),c("ERR_TLS_RENEGOTIATION_FAILED","Failed to renegotiate"),c("ERR_TLS_REQUIRED_SERVER_NAME",'"servername" is required parameter for Server.addContext'),c("ERR_TLS_SESSION_ATTACK","TSL session renegotiation attack detected"),c("ERR_TRANSFORM_ALREADY_TRANSFORMING","Calling transform done when still transforming"),c("ERR_TRANSFORM_WITH_LENGTH_0","Calling transform done when writableState.length != 0"),c("ERR_UNKNOWN_ENCODING","Unknown encoding: %s"),c("ERR_UNKNOWN_SIGNAL","Unknown signal: %s"),c("ERR_UNKNOWN_STDIN_TYPE","Unknown stdin file type"),c("ERR_UNKNOWN_STREAM_TYPE","Unknown stream file type"),c("ERR_V8BREAKITERATOR","Full ICU data not installed. See https://github.com/nodejs/node/wiki/Intl");function u(y,f,p){t(y,"name is required");let m;f.includes("not ")?(m="must not be",f=f.split("not ")[1]):m="must be";let b;if(Array.isArray(y))b=`The ${y.map(x=>`"${x}"`).join(", ")} arguments ${m} ${d(f,"type")}`;else if(y.includes(" argument"))b=`The ${y} ${m} ${d(f,"type")}`;else{const w=y.includes(".")?"property":"argument";b=`The "${y}" ${w} ${m} ${d(f,"type")}`}return arguments.length>=3&&(b+=`. Received type ${p!==null?typeof p:"null"}`),b}function h(...y){t(y.length>0,"At least one arg needs to be specified");let f="The ";const p=y.length;switch(y=y.map(m=>`"${m}"`),p){case 1:f+=`${y[0]} argument`;break;case 2:f+=`${y[0]} and ${y[1]} arguments`;break;default:f+=y.slice(0,p-1).join(", "),f+=`, and ${y[p-1]} arguments`;break}return`${f} must be specified`}function d(y,f){if(t(y,"expected is required"),t(typeof f=="string","thing is required"),Array.isArray(y)){const p=y.length;return t(p>0,"At least one expected value needs to be specified"),y=y.map(m=>String(m)),p>2?`one of ${f} ${y.slice(0,p-1).join(", ")}, or `+y[p-1]:p===2?`one of ${f} ${y[0]} or ${y[1]}`:`of ${f} ${y[0]}`}else return`of ${f} ${String(y)}`}function g(y,f){return f?"Attempt to write outside buffer bounds":`"${y}" is outside of buffer bounds`}}}),k0=Lt({"node_modules/memfs/lib/encoding.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.strToEncoding=e.assertEncoding=e.ENCODING_UTF8=void 0;var t=yf(),r=dO();e.ENCODING_UTF8="utf8";function n(s){if(s&&!t.Buffer.isEncoding(s))throw new r.TypeError("ERR_INVALID_OPT_VALUE_ENCODING",s)}e.assertEncoding=n;function i(s,o){return!o||o===e.ENCODING_UTF8?s:o==="buffer"?new t.Buffer(s):new t.Buffer(s).toString(o)}e.strToEncoding=i}}),pO=Lt({"node_modules/memfs/lib/Dirent.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Dirent=void 0;var t=Ol(),r=k0(),{S_IFMT:n,S_IFDIR:i,S_IFREG:s,S_IFBLK:o,S_IFCHR:a,S_IFLNK:l,S_IFIFO:c,S_IFSOCK:u}=t.constants,h=class mO{constructor(){this.name="",this.path="",this.mode=0}static build(g,y){const f=new mO,{mode:p}=g.getNode();return f.name=(0,r.strToEncoding)(g.getName(),y),f.mode=p,f.path=g.getParentPath(),f}_checkModeProperty(g){return(this.mode&n)===g}isDirectory(){return this._checkModeProperty(i)}isFile(){return this._checkModeProperty(s)}isBlockDevice(){return this._checkModeProperty(o)}isCharacterDevice(){return this._checkModeProperty(a)}isSymbolicLink(){return this._checkModeProperty(l)}isFIFO(){return this._checkModeProperty(c)}isSocket(){return this._checkModeProperty(u)}};e.Dirent=h,e.default=h}}),EX=Lt({"node_modules/path/node_modules/util/support/isBufferBrowser.js"(e,t){t.exports=function(n){return n&&typeof n=="object"&&typeof n.copy=="function"&&typeof n.fill=="function"&&typeof n.readUInt8=="function"}}}),CX=Lt({"node_modules/path/node_modules/inherits/inherits_browser.js"(e,t){typeof Object.create=="function"?t.exports=function(n,i){n.super_=i,n.prototype=Object.create(i.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(n,i){n.super_=i;var s=function(){};s.prototype=i.prototype,n.prototype=new s,n.prototype.constructor=n}}}),AX=Lt({"node_modules/path/node_modules/util/util.js"(e){var t=/%[sdj%]/g;e.format=function(F){if(!w(F)){for(var T=[],N=0;N=J)return V;switch(V){case"%s":return String(U[N++]);case"%d":return Number(U[N++]);case"%j":try{return JSON.stringify(U[N++])}catch{return"[Circular]"}default:return V}}),z=U[N];N=3&&(N.depth=arguments[2]),arguments.length>=4&&(N.colors=arguments[3]),f(T)?N.showHidden=T:T&&e._extend(N,T),E(N.showHidden)&&(N.showHidden=!1),E(N.depth)&&(N.depth=2),E(N.colors)&&(N.colors=!1),E(N.customInspect)&&(N.customInspect=!0),N.colors&&(N.stylize=s),l(N,F,N.depth)}e.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function s(F,T){var N=i.styles[T];return N?"\x1B["+i.colors[N][0]+"m"+F+"\x1B["+i.colors[N][1]+"m":F}function o(F,T){return F}function a(F){var T={};return F.forEach(function(N,U){T[N]=!0}),T}function l(F,T,N){if(F.customInspect&&T&&O(T.inspect)&&T.inspect!==e.inspect&&!(T.constructor&&T.constructor.prototype===T)){var U=T.inspect(N,F);return w(U)||(U=l(F,U,N)),U}var J=c(F,T);if(J)return J;var W=Object.keys(T),z=a(W);if(F.showHidden&&(W=Object.getOwnPropertyNames(T)),$(T)&&(W.indexOf("message")>=0||W.indexOf("description")>=0))return u(T);if(W.length===0){if(O(T)){var V=T.name?": "+T.name:"";return F.stylize("[Function"+V+"]","special")}if(S(T))return F.stylize(RegExp.prototype.toString.call(T),"regexp");if(A(T))return F.stylize(Date.prototype.toString.call(T),"date");if($(T))return u(T)}var Z="",nt=!1,et=["{","}"];if(y(T)&&(nt=!0,et=["[","]"]),O(T)){var it=T.name?": "+T.name:"";Z=" [Function"+it+"]"}if(S(T)&&(Z=" "+RegExp.prototype.toString.call(T)),A(T)&&(Z=" "+Date.prototype.toUTCString.call(T)),$(T)&&(Z=" "+u(T)),W.length===0&&(!nt||T.length==0))return et[0]+Z+et[1];if(N<0)return S(T)?F.stylize(RegExp.prototype.toString.call(T),"regexp"):F.stylize("[Object]","special");F.seen.push(T);var lt;return nt?lt=h(F,T,N,z,W):lt=W.map(function(ht){return d(F,T,N,z,ht,nt)}),F.seen.pop(),g(lt,Z,et)}function c(F,T){if(E(T))return F.stylize("undefined","undefined");if(w(T)){var N="'"+JSON.stringify(T).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return F.stylize(N,"string")}if(b(T))return F.stylize(""+T,"number");if(f(T))return F.stylize(""+T,"boolean");if(p(T))return F.stylize("null","null")}function u(F){return"["+Error.prototype.toString.call(F)+"]"}function h(F,T,N,U,J){for(var W=[],z=0,V=T.length;z-1&&(W?V=V.split(` `).map(function(nt){return" "+nt}).join(` `).substr(2):V=` `+V.split(` `).map(function(nt){return" "+nt}).join(` `))):V=F.stylize("[Circular]","special")),E(z)){if(W&&J.match(/^\d+$/))return V;z=JSON.stringify(""+J),z.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(z=z.substr(1,z.length-2),z=F.stylize(z,"name")):(z=z.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),z=F.stylize(z,"string"))}return z+": "+V}function g(F,T,N){var U=F.reduce(function(J,W){return W.indexOf(` `)>=0,J+W.replace(/\u001b\[\d\d?m/g,"").length+1},0);return U>60?N[0]+(T===""?"":T+` `)+" "+F.join(`, `)+" "+N[1]:N[0]+T+" "+F.join(", ")+" "+N[1]}function y(F){return Array.isArray(F)}e.isArray=y;function f(F){return typeof F=="boolean"}e.isBoolean=f;function p(F){return F===null}e.isNull=p;function m(F){return F==null}e.isNullOrUndefined=m;function b(F){return typeof F=="number"}e.isNumber=b;function w(F){return typeof F=="string"}e.isString=w;function x(F){return typeof F=="symbol"}e.isSymbol=x;function E(F){return F===void 0}e.isUndefined=E;function S(F){return C(F)&&M(F)==="[object RegExp]"}e.isRegExp=S;function C(F){return typeof F=="object"&&F!==null}e.isObject=C;function A(F){return C(F)&&M(F)==="[object Date]"}e.isDate=A;function $(F){return C(F)&&(M(F)==="[object Error]"||F instanceof Error)}e.isError=$;function O(F){return typeof F=="function"}e.isFunction=O;function I(F){return F===null||typeof F=="boolean"||typeof F=="number"||typeof F=="string"||typeof F=="symbol"||typeof F>"u"}e.isPrimitive=I,e.isBuffer=EX();function M(F){return Object.prototype.toString.call(F)}function q(F){return F<10?"0"+F.toString(10):F.toString(10)}var H=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function G(){var F=new Date,T=[q(F.getHours()),q(F.getMinutes()),q(F.getSeconds())].join(":");return[F.getDate(),H[F.getMonth()],T].join(" ")}e.log=function(){console.log("%s - %s",G(),e.format.apply(e,arguments))},e.inherits=CX(),e._extend=function(F,T){if(!T||!C(T))return F;for(var N=Object.keys(T),U=N.length;U--;)F[N[U]]=T[N[U]];return F};function Y(F,T){return Object.prototype.hasOwnProperty.call(F,T)}}}),kX=Lt({"node_modules/path/path.js"(e,t){var r=ie.platform==="win32",n=AX();function i(f,p){for(var m=[],b=0;b=0&&!f[b];b--);return m===0&&b===p?f:m>b?[]:f.slice(m,b+1)}var o=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,a=/^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/,l={};function c(f){var p=o.exec(f),m=(p[1]||"")+(p[2]||""),b=p[3]||"",w=a.exec(b),x=w[1],E=w[2],S=w[3];return[m,x,E,S]}function u(f){var p=o.exec(f),m=p[1]||"",b=!!m&&m[1]!==":";return{device:m,isUnc:b,isAbsolute:b||!!p[2],tail:p[3]}}function h(f){return"\\\\"+f.replace(/^[\\\/]+/,"").replace(/[\\\/]+/g,"\\")}l.resolve=function(){for(var f="",p="",m=!1,b=arguments.length-1;b>=-1;b--){var w;if(b>=0?w=arguments[b]:f?(w=ie.env["="+f],(!w||w.substr(0,3).toLowerCase()!==f.toLowerCase()+"\\")&&(w=f+"\\")):w=ie.cwd(),n.isString(w)){if(!w)continue}else throw new TypeError("Arguments to path.resolve must be strings");var x=u(w),E=x.device,S=x.isUnc,C=x.isAbsolute,A=x.tail;if(!(E&&f&&E.toLowerCase()!==f.toLowerCase())&&(f||(f=E),m||(p=A+"\\"+p,m=C),f&&m))break}return S&&(f=h(f)),p=i(p.split(/[\\\/]+/),!m).join("\\"),f+(m?"\\":"")+p||"."},l.normalize=function(f){var p=u(f),m=p.device,b=p.isUnc,w=p.isAbsolute,x=p.tail,E=/[\\\/]$/.test(x);return x=i(x.split(/[\\\/]+/),!w).join("\\"),!x&&!w&&(x="."),x&&E&&(x+="\\"),b&&(m=h(m)),m+(w?"\\":"")+x},l.isAbsolute=function(f){return u(f).isAbsolute},l.join=function(){for(var f=[],p=0;p=-1&&!p;m--){var b=m>=0?arguments[m]:ie.cwd();if(n.isString(b)){if(!b)continue}else throw new TypeError("Arguments to path.resolve must be strings");f=b+"/"+f,p=b[0]==="/"}return f=i(f.split("/"),!p).join("/"),(p?"/":"")+f||"."},g.normalize=function(f){var p=g.isAbsolute(f),m=f&&f[f.length-1]==="/";return f=i(f.split("/"),!p).join("/"),!f&&!p&&(f="."),f&&m&&(f+="/"),(p?"/":"")+f},g.isAbsolute=function(f){return f.charAt(0)==="/"},g.join=function(){for(var f="",p=0;p1)for(var w=1;w{if(typeof ie<"u")return ie;try{return DX()}catch{return}};function r(){const n=t()||{};return n.cwd||(n.cwd=()=>"/"),n.emitWarning||(n.emitWarning=(i,s)=>{console.warn(`${s}${s?": ":""}${i}`)}),n.env||(n.env={}),n}e.createProcess=r,e.default=r()}}),yO=Lt({"node_modules/events/events.js"(e,t){var r=typeof Reflect=="object"?Reflect:null,n=r&&typeof r.apply=="function"?r.apply:function(C,A,$){return Function.prototype.apply.call(C,A,$)},i;r&&typeof r.ownKeys=="function"?i=r.ownKeys:Object.getOwnPropertySymbols?i=function(C){return Object.getOwnPropertyNames(C).concat(Object.getOwnPropertySymbols(C))}:i=function(C){return Object.getOwnPropertyNames(C)};function s(S){console&&console.warn&&console.warn(S)}var o=Number.isNaN||function(C){return C!==C};function a(){a.init.call(this)}t.exports=a,t.exports.once=w,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var l=10;function c(S){if(typeof S!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof S)}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(S){if(typeof S!="number"||S<0||o(S))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+S+".");l=S}}),a.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(C){if(typeof C!="number"||C<0||o(C))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+C+".");return this._maxListeners=C,this};function u(S){return S._maxListeners===void 0?a.defaultMaxListeners:S._maxListeners}a.prototype.getMaxListeners=function(){return u(this)},a.prototype.emit=function(C){for(var A=[],$=1;$0&&(M=A[0]),M instanceof Error)throw M;var q=new Error("Unhandled error."+(M?" ("+M.message+")":""));throw q.context=M,q}var H=I[C];if(H===void 0)return!1;if(typeof H=="function")n(H,this,A);else for(var G=H.length,Y=p(H,G),$=0;$0&&M.length>O&&!M.warned){M.warned=!0;var q=new Error("Possible EventEmitter memory leak detected. "+M.length+" "+String(C)+" listeners added. Use emitter.setMaxListeners() to increase limit");q.name="MaxListenersExceededWarning",q.emitter=S,q.type=C,q.count=M.length,s(q)}return S}a.prototype.addListener=function(C,A){return h(this,C,A,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(C,A){return h(this,C,A,!0)};function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function g(S,C,A){var $={fired:!1,wrapFn:void 0,target:S,type:C,listener:A},O=d.bind($);return O.listener=A,$.wrapFn=O,O}a.prototype.once=function(C,A){return c(A),this.on(C,g(this,C,A)),this},a.prototype.prependOnceListener=function(C,A){return c(A),this.prependListener(C,g(this,C,A)),this},a.prototype.removeListener=function(C,A){var $,O,I,M,q;if(c(A),O=this._events,O===void 0)return this;if($=O[C],$===void 0)return this;if($===A||$.listener===A)--this._eventsCount===0?this._events=Object.create(null):(delete O[C],O.removeListener&&this.emit("removeListener",C,$.listener||A));else if(typeof $!="function"){for(I=-1,M=$.length-1;M>=0;M--)if($[M]===A||$[M].listener===A){q=$[M].listener,I=M;break}if(I<0)return this;I===0?$.shift():m($,I),$.length===1&&(O[C]=$[0]),O.removeListener!==void 0&&this.emit("removeListener",C,q||A)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(C){var A,$,O;if($=this._events,$===void 0)return this;if($.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):$[C]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete $[C]),this;if(arguments.length===0){var I=Object.keys($),M;for(O=0;O=0;O--)this.removeListener(C,A[O]);return this};function y(S,C,A){var $=S._events;if($===void 0)return[];var O=$[C];return O===void 0?[]:typeof O=="function"?A?[O.listener||O]:[O]:A?b(O):p(O,O.length)}a.prototype.listeners=function(C){return y(this,C,!0)},a.prototype.rawListeners=function(C){return y(this,C,!1)},a.listenerCount=function(S,C){return typeof S.listenerCount=="function"?S.listenerCount(C):f.call(S,C)},a.prototype.listenerCount=f;function f(S){var C=this._events;if(C!==void 0){var A=C[S];if(typeof A=="function")return 1;if(A!==void 0)return A.length}return 0}a.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]};function p(S,C){for(var A=new Array(C),$=0;${var p,m;return(m=(p=t.default.getuid)===null||p===void 0?void 0:p.call(t.default))!==null&&m!==void 0?m:0},d=()=>{var p,m;return(m=(p=t.default.getgid)===null||p===void 0?void 0:p.call(t.default))!==null&&m!==void 0?m:0};e.SEP="/";var g=class extends i.EventEmitter{constructor(p,m=438){super(),this._uid=h(),this._gid=d(),this._atime=new Date,this._mtime=new Date,this._ctime=new Date,this._perm=438,this.mode=l,this._nlink=1,this._perm=m,this.mode|=m,this.ino=p}set ctime(p){this._ctime=p}get ctime(){return this._ctime}set uid(p){this._uid=p,this.ctime=new Date}get uid(){return this._uid}set gid(p){this._gid=p,this.ctime=new Date}get gid(){return this._gid}set atime(p){this._atime=p,this.ctime=new Date}get atime(){return this._atime}set mtime(p){this._mtime=p,this.ctime=new Date}get mtime(){return this._mtime}set perm(p){this._perm=p,this.ctime=new Date}get perm(){return this._perm}set nlink(p){this._nlink=p,this.ctime=new Date}get nlink(){return this._nlink}getString(p="utf8"){return this.atime=new Date,this.getBuffer().toString(p)}setString(p){this.buf=(0,r.bufferFrom)(p,"utf8"),this.touch()}getBuffer(){return this.atime=new Date,this.buf||this.setBuffer((0,r.bufferAllocUnsafe)(0)),(0,r.bufferFrom)(this.buf)}setBuffer(p){this.buf=(0,r.bufferFrom)(p),this.touch()}getSize(){return this.buf?this.buf.length:0}setModeProperty(p){this.mode=this.mode&~o|p}setIsFile(){this.setModeProperty(l)}setIsDirectory(){this.setModeProperty(a)}setIsSymlink(){this.setModeProperty(c)}isFile(){return(this.mode&o)===l}isDirectory(){return(this.mode&o)===a}isSymlink(){return(this.mode&o)===c}makeSymlink(p){this.symlink=p,this.setIsSymlink()}write(p,m=0,b=p.length,w=0){if(this.buf||(this.buf=(0,r.bufferAllocUnsafe)(0)),w+b>this.buf.length){const x=(0,r.bufferAllocUnsafe)(w+b);this.buf.copy(x,0,0,this.buf.length),this.buf=x}return p.copy(this.buf,w,m,m+b),this.touch(),b}read(p,m=0,b=p.byteLength,w=0){this.atime=new Date,this.buf||(this.buf=(0,r.bufferAllocUnsafe)(0));let x=b;x>p.byteLength&&(x=p.byteLength),x+w>this.buf.length&&(x=this.buf.length-w);const E=p instanceof r.Buffer?p:r.Buffer.from(p.buffer);return this.buf.copy(E,m,w,w+x),x}truncate(p=0){if(!p)this.buf=(0,r.bufferAllocUnsafe)(0);else if(this.buf||(this.buf=(0,r.bufferAllocUnsafe)(0)),p<=this.buf.length)this.buf=this.buf.slice(0,p);else{const m=(0,r.bufferAllocUnsafe)(p);this.buf.copy(m),m.fill(0,this.buf.length),this.buf=m}this.touch()}chmod(p){this.perm=p,this.mode=this.mode&-512|p,this.touch()}chown(p,m){this.uid=p,this.gid=m,this.touch()}touch(){this.mtime=new Date,this.emit("change",this)}canRead(p=h(),m=d()){return!!(this.perm&4||m===this.gid&&this.perm&32||p===this.uid&&this.perm&256)}canWrite(p=h(),m=d()){return!!(this.perm&2||m===this.gid&&this.perm&16||p===this.uid&&this.perm&128)}del(){this.emit("delete",this)}toJSON(){return{ino:this.ino,uid:this.uid,gid:this.gid,atime:this.atime.getTime(),mtime:this.mtime.getTime(),ctime:this.ctime.getTime(),perm:this.perm,mode:this.mode,nlink:this.nlink,symlink:this.symlink,data:this.getString()}}};e.Node=g;var y=class av extends i.EventEmitter{get steps(){return this._steps}set steps(m){this._steps=m;for(const[b,w]of this.children.entries())b==="."||b===".."||w?.syncSteps()}constructor(m,b,w){super(),this.children=new Map,this._steps=[],this.ino=0,this.length=0,this.vol=m,this.parent=b,this.name=w,this.syncSteps()}setNode(m){this.node=m,this.ino=m.ino}getNode(){return this.node}createChild(m,b=this.vol.createNode()){const w=new av(this.vol,this,m);return w.setNode(b),b.isDirectory()&&(w.children.set(".",w),w.getNode().nlink++),this.setChild(m,w),w}setChild(m,b=new av(this.vol,this,m)){return this.children.set(m,b),b.parent=this,this.length++,b.getNode().isDirectory()&&(b.children.set("..",this),this.getNode().nlink++),this.getNode().mtime=new Date,this.emit("child:add",b,this),b}deleteChild(m){m.getNode().isDirectory()&&(m.children.delete(".."),this.getNode().nlink--),this.children.delete(m.getName()),this.length--,this.getNode().mtime=new Date,this.emit("child:delete",m,this)}getChild(m){return this.getNode().mtime=new Date,this.children.get(m)}getPath(){return this.steps.join(e.SEP)}getParentPath(){return this.steps.slice(0,-1).join(e.SEP)}getName(){return this.steps[this.steps.length-1]}walk(m,b=m.length,w=0){if(w>=m.length)return this;if(w>=b)return this;const x=m[w],E=this.getChild(x);return E?E.walk(m,b,w+1):null}toJSON(){return{steps:this.steps,ino:this.ino,children:Array.from(this.children.keys())}}syncSteps(){this.steps=this.parent?this.parent.steps.concat([this.name]):[this.name]}};e.Link=y;var f=class{constructor(p,m,b,w){this.link=p,this.node=m,this.flags=b,this.fd=w,this.position=0,this.flags&u&&(this.position=this.getSize())}getString(p="utf8"){return this.node.getString()}setString(p){this.node.setString(p)}getBuffer(){return this.node.getBuffer()}setBuffer(p){this.node.setBuffer(p)}getSize(){return this.node.getSize()}truncate(p){this.node.truncate(p)}seekTo(p){this.position=p}stats(){return s.default.build(this.node)}write(p,m=0,b=p.length,w){typeof w!="number"&&(w=this.position);const x=this.node.write(p,m,b,w);return this.position=w+x,x}read(p,m=0,b=p.byteLength,w){typeof w!="number"&&(w=this.position);const x=this.node.read(p,m,b,w);return this.position=w+x,x}chmod(p){this.node.chmod(p)}chown(p,m){this.node.chown(p,m)}};e.File=f}}),PX=Lt({"node_modules/memfs/lib/setImmediate.js"(e){Object.defineProperty(e,"__esModule",{value:!0});var t;typeof setImmediate=="function"?t=setImmediate.bind(typeof globalThis<"u"?globalThis:global):t=setTimeout.bind(typeof globalThis<"u"?globalThis:global),e.default=t}}),bO=Lt({"node_modules/memfs/lib/queueMicrotask.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=typeof queueMicrotask=="function"?queueMicrotask:t=>Promise.resolve().then(()=>t()).catch(()=>{})}}),FX=Lt({"node_modules/memfs/lib/setTimeoutUnref.js"(e){Object.defineProperty(e,"__esModule",{value:!0});function t(r,n,i){const s=setTimeout.apply(typeof globalThis<"u"?globalThis:global,arguments);return s&&typeof s=="object"&&typeof s.unref=="function"&&s.unref(),s}e.default=t}}),OX=Lt({"node_modules/component-emitter/index.js"(e,t){function r(i){if(i)return n(i);this._callbacks=new Map}function n(i){return Object.assign(i,r.prototype),i._callbacks=new Map,i}r.prototype.on=function(i,s){const o=this._callbacks.get(i)??[];return o.push(s),this._callbacks.set(i,o),this},r.prototype.once=function(i,s){const o=(...a)=>{this.off(i,o),s.apply(this,a)};return o.fn=s,this.on(i,o),this},r.prototype.off=function(i,s){if(i===void 0&&s===void 0)return this._callbacks.clear(),this;if(s===void 0)return this._callbacks.delete(i),this;const o=this._callbacks.get(i);if(o){for(const[a,l]of o.entries())if(l===s||l.fn===s){o.splice(a,1);break}o.length===0?this._callbacks.delete(i):this._callbacks.set(i,o)}return this},r.prototype.emit=function(i,...s){const o=this._callbacks.get(i);if(o){const a=[...o];for(const l of a)l.apply(this,s)}return this},r.prototype.listeners=function(i){return this._callbacks.get(i)??[]},r.prototype.listenerCount=function(i){if(i)return this.listeners(i).length;let s=0;for(const o of this._callbacks.values())s+=o.length;return s},r.prototype.hasListeners=function(i){return this.listenerCount(i)>0},r.prototype.addEventListener=r.prototype.on,r.prototype.removeListener=r.prototype.off,r.prototype.removeEventListener=r.prototype.off,r.prototype.removeAllListeners=r.prototype.off,typeof t<"u"&&(t.exports=r)}}),IX=Lt({"node_modules/stream/index.js"(e,t){var r=OX();function n(){r.call(this)}n.prototype=new r,t.exports=n,n.Stream=n,n.prototype.pipe=function(i,s){var o=this;function a(y){i.writable&&i.write(y)===!1&&o.pause&&o.pause()}o.on("data",a);function l(){o.readable&&o.resume&&o.resume()}i.on("drain",l),!i._isStdio&&(!s||s.end!==!1)&&(o.on("end",u),o.on("close",h));var c=!1;function u(){c||(c=!0,i.end())}function h(){c||(c=!0,typeof i.destroy=="function"&&i.destroy())}function d(y){if(g(),!this.hasListeners("error"))throw y}o.on("error",d),i.on("error",d);function g(){o.off("data",a),i.off("drain",l),o.off("end",u),o.off("close",h),o.off("error",d),i.off("error",d),o.off("end",g),o.off("close",g),i.off("end",g),i.off("close",g)}return o.on("end",g),o.on("close",g),i.on("end",g),i.on("close",g),i.emit("pipe",o),i}}}),Sx=Lt({"node_modules/memfs/lib/node/constants.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FLAGS=e.ERRSTR=void 0;var t=Ol();e.ERRSTR={PATH_STR:"path must be a string or Buffer",FD:"fd must be a file descriptor",MODE_INT:"mode must be an int",CB:"callback must be a function",UID:"uid must be an unsigned int",GID:"gid must be an unsigned int",LEN:"len must be an integer",ATIME:"atime must be an integer",MTIME:"mtime must be an integer",PREFIX:"filename prefix is required",BUFFER:"buffer must be an instance of Buffer or StaticBuffer",OFFSET:"offset must be an integer",LENGTH:"length must be an integer",POSITION:"position must be an integer"};var{O_RDONLY:r,O_WRONLY:n,O_RDWR:i,O_CREAT:s,O_EXCL:o,O_TRUNC:a,O_APPEND:l,O_SYNC:c}=t.constants,u;(function(h){h[h.r=r]="r",h[h["r+"]=i]="r+",h[h.rs=r|c]="rs",h[h.sr=h.rs]="sr",h[h["rs+"]=i|c]="rs+",h[h["sr+"]=h["rs+"]]="sr+",h[h.w=n|s|a]="w",h[h.wx=n|s|a|o]="wx",h[h.xw=h.wx]="xw",h[h["w+"]=i|s|a]="w+",h[h["wx+"]=i|s|a|o]="wx+",h[h["xw+"]=h["wx+"]]="xw+",h[h.a=n|l|s]="a",h[h.ax=n|l|s|o]="ax",h[h.xa=h.ax]="xa",h[h["a+"]=i|l|s]="a+",h[h["ax+"]=i|l|s|o]="ax+",h[h["xa+"]=h["ax+"]]="xa+"})(u||(e.FLAGS=u={}))}}),D0=Lt({"node_modules/memfs/lib/node/util.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.unixify=e.bufferToEncoding=e.getWriteSyncArgs=e.getWriteArgs=e.bufToUint8=e.dataToBuffer=e.validateFd=e.isFd=e.flagsToNumber=e.genRndStr6=e.createError=e.pathToFilename=e.nullCheck=e.modeToNumber=e.validateCallback=e.promisify=e.isWin=void 0;var t=Sx(),r=dO(),n=yf(),i=k0(),s=yf(),o=bO();e.isWin=ie.platform==="win32";function a(et,it,lt=ht=>ht){return(...ht)=>new Promise((pt,vt)=>{et[it].bind(et)(...ht,(Ct,Dt)=>Ct?vt(Ct):pt(lt(Dt)))})}e.promisify=a;function l(et){if(typeof et!="function")throw TypeError(t.ERRSTR.CB);return et}e.validateCallback=l;function c(et,it){if(typeof et=="number")return et;if(typeof et=="string")return parseInt(et,8);if(it)return u(it)}function u(et,it){const lt=c(et,it);if(typeof lt!="number"||isNaN(lt))throw new TypeError(t.ERRSTR.MODE_INT);return lt}e.modeToNumber=u;function h(et,it){if((""+et).indexOf("\0")!==-1){const lt=new Error("Path must be a string without null bytes");if(lt.code="ENOENT",typeof it!="function")throw lt;return(0,o.default)(()=>{it(lt)}),!1}return!0}e.nullCheck=h;function d(et){if(et.hostname!=="")throw new r.TypeError("ERR_INVALID_FILE_URL_HOST",ie.platform);const it=et.pathname;for(let lt=0;lt '${ht}'`),et){case y:return`ENOENT: no such file or directory, ${it}${pt}`;case f:return`EBADF: bad file descriptor, ${it}${pt}`;case p:return`EINVAL: invalid argument, ${it}${pt}`;case m:return`EPERM: operation not permitted, ${it}${pt}`;case b:return`EPROTO: protocol error, ${it}${pt}`;case w:return`EEXIST: file already exists, ${it}${pt}`;case x:return`ENOTDIR: not a directory, ${it}${pt}`;case C:return`EISDIR: illegal operation on a directory, ${it}${pt}`;case S:return`EACCES: permission denied, ${it}${pt}`;case A:return`ENOTEMPTY: directory not empty, ${it}${pt}`;case E:return`EMFILE: too many open files, ${it}${pt}`;case $:return`ENOSYS: function not implemented, ${it}${pt}`;case O:return`[ERR_FS_EISDIR]: Path is a directory: ${it} returned EISDIR (is a directory) ${lt}`;case I:return`[ERR_OUT_OF_RANGE]: value out of range, ${it}${pt}`;default:return`${et}: error occurred, ${it}${pt}`}}function q(et,it="",lt="",ht="",pt=Error){const vt=new pt(M(et,it,lt,ht));return vt.code=et,lt&&(vt.path=lt),vt}e.createError=q;function H(){const et=(Math.random()+1).toString(36).substring(2,8);return et.length===6?et:H()}e.genRndStr6=H;function G(et){if(typeof et=="number")return et;if(typeof et=="string"){const it=t.FLAGS[et];if(typeof it<"u")return it}throw new r.TypeError("ERR_INVALID_OPT_VALUE","flags",et)}e.flagsToNumber=G;function Y(et){return et>>>0===et}e.isFd=Y;function F(et){if(!Y(et))throw TypeError(t.ERRSTR.FD)}e.validateFd=F;function T(et,it=i.ENCODING_UTF8){return n.Buffer.isBuffer(et)?et:et instanceof Uint8Array?(0,s.bufferFrom)(et):(0,s.bufferFrom)(String(et),it)}e.dataToBuffer=T;var N=et=>new Uint8Array(et.buffer,et.byteOffset,et.byteLength);e.bufToUint8=N;var U=(et,it,lt,ht,pt,vt)=>{F(et);let Ct=0,Dt,Rt=null,Ot,Tt;const ve=typeof it,mt=typeof lt,Kt=typeof ht,Jt=typeof pt;ve!=="string"?mt==="function"?Tt=lt:Kt==="function"?(Ct=lt|0,Tt=ht):Jt==="function"?(Ct=lt|0,Dt=ht,Tt=pt):(Ct=lt|0,Dt=ht,Rt=pt,Tt=vt):mt==="function"?Tt=lt:Kt==="function"?(Rt=lt,Tt=ht):Jt==="function"&&(Rt=lt,Ot=ht,Tt=pt);const re=T(it,Ot);ve!=="string"?typeof Dt>"u"&&(Dt=re.length):(Ct=0,Dt=re.length);const Me=l(Tt);return[et,ve==="string",re,Ct,Dt,Rt,Me]};e.getWriteArgs=U;var J=(et,it,lt,ht,pt)=>{F(et);let vt,Ct,Dt,Rt;const Ot=typeof it!="string";Ot?(Ct=(lt||0)|0,Dt=ht,Rt=pt):(Rt=lt,vt=ht);const Tt=T(it,vt);return Ot?typeof Dt>"u"&&(Dt=Tt.length):(Ct=0,Dt=Tt.length),[et,Tt,Ct||0,Dt,Rt]};e.getWriteSyncArgs=J;function W(et,it){return!it||it==="buffer"?et:et.toString(it)}e.bufferToEncoding=W;var z=(et,it)=>{let lt=et[it];return it>0&&(lt==="/"||e.isWin&<==="\\")},V=et=>{let it=et.length-1;if(it<2)return et;for(;z(et,it);)it--;return et.substr(0,it+1)},Z=(et,it)=>{if(typeof et!="string")throw new TypeError("expected a string");return et=et.replace(/[\\\/]+/g,"/"),it!==!1&&(et=V(et)),et},nt=(et,it=!0)=>e.isWin?(et=Z(et,it),et.replace(/^([a-zA-Z]+:|\.\/)/,"")):et;e.unixify=nt}}),$X=Lt({"node_modules/memfs/lib/node/FileHandle.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FileHandle=void 0;var t=D0(),r=class{constructor(n,i){this.fs=n,this.fd=i}appendFile(n,i){return(0,t.promisify)(this.fs,"appendFile")(this.fd,n,i)}chmod(n){return(0,t.promisify)(this.fs,"fchmod")(this.fd,n)}chown(n,i){return(0,t.promisify)(this.fs,"fchown")(this.fd,n,i)}close(){return(0,t.promisify)(this.fs,"close")(this.fd)}datasync(){return(0,t.promisify)(this.fs,"fdatasync")(this.fd)}read(n,i,s,o){return(0,t.promisify)(this.fs,"read",a=>({bytesRead:a,buffer:n}))(this.fd,n,i,s,o)}readv(n,i){return(0,t.promisify)(this.fs,"readv",s=>({bytesRead:s,buffers:n}))(this.fd,n,i)}readFile(n){return(0,t.promisify)(this.fs,"readFile")(this.fd,n)}stat(n){return(0,t.promisify)(this.fs,"fstat")(this.fd,n)}sync(){return(0,t.promisify)(this.fs,"fsync")(this.fd)}truncate(n){return(0,t.promisify)(this.fs,"ftruncate")(this.fd,n)}utimes(n,i){return(0,t.promisify)(this.fs,"futimes")(this.fd,n,i)}write(n,i,s,o){return(0,t.promisify)(this.fs,"write",a=>({bytesWritten:a,buffer:n}))(this.fd,n,i,s,o)}writev(n,i){return(0,t.promisify)(this.fs,"writev",s=>({bytesWritten:s,buffers:n}))(this.fd,n,i)}writeFile(n,i){return(0,t.promisify)(this.fs,"writeFile")(this.fd,n,i)}};e.FileHandle=r}}),BX=Lt({"node_modules/memfs/lib/node/FsPromises.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FsPromises=void 0;var t=D0(),r=Ol(),n=class{constructor(i,s){this.fs=i,this.FileHandle=s,this.constants=r.constants,this.cp=(0,t.promisify)(this.fs,"cp"),this.opendir=(0,t.promisify)(this.fs,"opendir"),this.statfs=(0,t.promisify)(this.fs,"statfs"),this.lutimes=(0,t.promisify)(this.fs,"lutimes"),this.access=(0,t.promisify)(this.fs,"access"),this.chmod=(0,t.promisify)(this.fs,"chmod"),this.chown=(0,t.promisify)(this.fs,"chown"),this.copyFile=(0,t.promisify)(this.fs,"copyFile"),this.lchmod=(0,t.promisify)(this.fs,"lchmod"),this.lchown=(0,t.promisify)(this.fs,"lchown"),this.link=(0,t.promisify)(this.fs,"link"),this.lstat=(0,t.promisify)(this.fs,"lstat"),this.mkdir=(0,t.promisify)(this.fs,"mkdir"),this.mkdtemp=(0,t.promisify)(this.fs,"mkdtemp"),this.readdir=(0,t.promisify)(this.fs,"readdir"),this.readlink=(0,t.promisify)(this.fs,"readlink"),this.realpath=(0,t.promisify)(this.fs,"realpath"),this.rename=(0,t.promisify)(this.fs,"rename"),this.rmdir=(0,t.promisify)(this.fs,"rmdir"),this.rm=(0,t.promisify)(this.fs,"rm"),this.stat=(0,t.promisify)(this.fs,"stat"),this.symlink=(0,t.promisify)(this.fs,"symlink"),this.truncate=(0,t.promisify)(this.fs,"truncate"),this.unlink=(0,t.promisify)(this.fs,"unlink"),this.utimes=(0,t.promisify)(this.fs,"utimes"),this.readFile=(o,a)=>(0,t.promisify)(this.fs,"readFile")(o instanceof this.FileHandle?o.fd:o,a),this.appendFile=(o,a,l)=>(0,t.promisify)(this.fs,"appendFile")(o instanceof this.FileHandle?o.fd:o,a,l),this.open=(o,a="r",l)=>(0,t.promisify)(this.fs,"open",c=>new this.FileHandle(this.fs,c))(o,a,l),this.writeFile=(o,a,l)=>(0,t.promisify)(this.fs,"writeFile")(o instanceof this.FileHandle?o.fd:o,a,l),this.watch=()=>{throw new Error("Not implemented")}}};e.FsPromises=n}}),vO={};KK(vO,{__addDisposableResource:()=>jO,__assign:()=>kh,__asyncDelegator:()=>OO,__asyncGenerator:()=>FO,__asyncValues:()=>IO,__await:()=>ru,__awaiter:()=>CO,__classPrivateFieldGet:()=>NO,__classPrivateFieldIn:()=>MO,__classPrivateFieldSet:()=>LO,__createBinding:()=>bf,__decorate:()=>_O,__disposeResources:()=>zO,__esDecorate:()=>RX,__exportStar:()=>kO,__extends:()=>wO,__generator:()=>AO,__importDefault:()=>RO,__importStar:()=>BO,__makeTemplateObject:()=>$O,__metadata:()=>EO,__param:()=>SO,__propKey:()=>LX,__read:()=>Ex,__rest:()=>xO,__runInitializers:()=>NX,__setFunctionName:()=>MX,__spread:()=>DO,__spreadArray:()=>PO,__spreadArrays:()=>TO,__values:()=>jm,default:()=>WO});function wO(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");$p(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function xO(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}function SO(e,t){return function(r,n){t(r,n,e)}}function RX(e,t,r,n,i,s){function o(m){if(m!==void 0&&typeof m!="function")throw new TypeError("Function expected");return m}for(var a=n.kind,l=a==="getter"?"get":a==="setter"?"set":"value",c=!t&&e?n.static?e:e.prototype:null,u=t||(c?Object.getOwnPropertyDescriptor(c,n.name):{}),h,d=!1,g=r.length-1;g>=0;g--){var y={};for(var f in n)y[f]=f==="access"?{}:n[f];for(var f in n.access)y.access[f]=n.access[f];y.addInitializer=function(m){if(d)throw new TypeError("Cannot add initializers after decoration has completed");s.push(o(m||null))};var p=(0,r[g])(a==="accessor"?{get:u.get,set:u.set}:u[l],y);if(a==="accessor"){if(p===void 0)continue;if(p===null||typeof p!="object")throw new TypeError("Object expected");(h=o(p.get))&&(u.get=h),(h=o(p.set))&&(u.set=h),(h=o(p.init))&&i.unshift(h)}else(h=o(p))&&(a==="field"?i.unshift(h):u[l]=h)}c&&Object.defineProperty(c,n.name,u),d=!0}function NX(e,t,r){for(var n=arguments.length>2,i=0;i0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ex(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s}function DO(){for(var e=[],t=0;t1||a(d,g)})})}function a(d,g){try{l(n[d](g))}catch(y){h(s[0][3],y)}}function l(d){d.value instanceof ru?Promise.resolve(d.value.v).then(c,u):h(s[0][2],d)}function c(d){a("next",d)}function u(d){a("throw",d)}function h(d,g){d(g),s.shift(),s.length&&a(s[0][0],s[0][1])}}function OO(e){var t,r;return t={},n("next"),n("throw",function(i){throw i}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(i,s){t[i]=e[i]?function(o){return(r=!r)?{value:ru(e[i](o)),done:!1}:s?s(o):o}:s}}function IO(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof jm=="function"?jm(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=e[s]&&function(o){return new Promise(function(a,l){o=e[s](o),i(a,l,o.done,o.value)})}}function i(s,o,a,l){Promise.resolve(l).then(function(c){s({value:c,done:a})},o)}}function $O(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function BO(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&bf(t,e,r);return UO(t,e),t}function RO(e){return e&&e.__esModule?e:{default:e}}function NO(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function LO(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r}function MO(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function jO(e,t,r){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var n;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose]}if(typeof n!="function")throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}function zO(e){function t(n){e.error=e.hasError?new VO(n,e.error,"An error was suppressed during disposal."):n,e.hasError=!0}function r(){for(;e.stack.length;){var n=e.stack.pop();try{var i=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(i).then(r,function(s){return t(s),r()})}catch(s){t(s)}}if(e.hasError)throw e.error}return r()}var $p,kh,bf,UO,VO,WO,jX=YK({"node_modules/tslib/tslib.es6.mjs"(){$p=function(e,t){return $p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},$p(e,t)},kh=function(){return kh=Object.assign||function(t){for(var r,n=1,i=arguments.length;n{let i="",s=n.length-1;for(;s>=0&&!n[s];s--);for(let o=0;o<=s;o++){const a=n[o];if(!a)continue;const l=o===s,c=a(r+(l?" ":"│")+" "),u=c?l?"└─":"├─":"│";i+=` `+r+u+(c?" "+c:"")}return i};e.printTree=t}}),UX=Lt({"node_modules/tree-dump/lib/printBinary.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.printBinary=void 0;var t=(r="",n)=>{const i=n[0],s=n[1];let o="";return i&&(o+=` `+r+"← "+i(r+" ")),s&&(o+=` `+r+"→ "+s(r+" ")),o};e.printBinary=t}}),VX=Lt({"node_modules/tree-dump/lib/index.js"(e){Object.defineProperty(e,"__esModule",{value:!0});var t=(jX(),JK(vO));t.__exportStar(zX(),e),t.__exportStar(UX(),e)}}),WX=Lt({"node_modules/memfs/lib/node-to-fsa/util.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.newNotAllowedError=e.newTypeMismatchError=e.newNotFoundError=e.assertCanWrite=e.assertName=e.basename=e.ctx=void 0;var t=(c={})=>Object.assign({separator:"/",syncHandleAllowed:!1,mode:"read"},c);e.ctx=t;var r=(c,u)=>{c[c.length-1]===u&&(c=c.slice(0,-1));const h=c.lastIndexOf(u);return h===-1?c:c.slice(h+1)};e.basename=r;var n=/^(\.{1,2})$|^(.*([\/\\]).*)$/,i=(c,u,h)=>{if(!c||n.test(c))throw new TypeError(`Failed to execute '${u}' on '${h}': Name is not allowed.`)};e.assertName=i;var s=c=>{if(c!=="readwrite")throw new DOMException("The request is not allowed by the user agent or the platform in the current context.","NotAllowedError")};e.assertCanWrite=s;var o=()=>new DOMException("A requested file or directory could not be found at the time an operation was processed.","NotFoundError");e.newNotFoundError=o;var a=()=>new DOMException("The path supplied exists, but was not an entry of requested type.","TypeMismatchError");e.newTypeMismatchError=a;var l=()=>new DOMException("Permission not granted.","NotAllowedError");e.newNotAllowedError=l}}),qX=Lt({"node_modules/memfs/lib/print/index.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toTreeSync=void 0;var t=VX(),r=WX(),n=(i,s={})=>{var o;const a=s.separator||"/";let l=s.dir||a;l[l.length-1]!==a&&(l+=a);const c=s.tab||"",u=(o=s.depth)!==null&&o!==void 0?o:10;let h=" (...)";if(u>0){const g=i.readdirSync(l,{withFileTypes:!0});h=(0,t.printTree)(c,g.map(y=>f=>y.isDirectory()?(0,e.toTreeSync)(i,{dir:l+y.name,depth:u-1,tab:f}):y.isSymbolicLink()?""+y.name+" → "+i.readlinkSync(l+y.name):""+y.name))}return(0,r.basename)(l,a)+a+h};e.toTreeSync=n}}),HX=Lt({"node_modules/memfs/lib/node/options.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getWriteFileOptions=e.writeFileDefaults=e.getRealpathOptsAndCb=e.getRealpathOptions=e.getStatOptsAndCb=e.getStatOptions=e.getAppendFileOptsAndCb=e.getAppendFileOpts=e.getReaddirOptsAndCb=e.getReaddirOptions=e.getReadFileOptions=e.getRmOptsAndCb=e.getRmdirOptions=e.getDefaultOptsAndCb=e.getDefaultOpts=e.optsDefaults=e.optsAndCbGenerator=e.optsGenerator=e.getOptions=e.getMkdirOptions=void 0;var t=Sx(),r=k0(),n=D0(),i={mode:511,recursive:!1},s=x=>typeof x=="number"?Object.assign({},i,{mode:x}):Object.assign({},i,x);e.getMkdirOptions=s;var o=x=>`Expected options to be either an object or a string, but got ${x} instead`;function a(x,E){let S;if(E){const C=typeof E;switch(C){case"string":S=Object.assign({},x,{encoding:E});break;case"object":S=Object.assign({},x,E);break;default:throw TypeError(o(C))}}else return x;return S.encoding!=="buffer"&&(0,r.assertEncoding)(S.encoding),S}e.getOptions=a;function l(x){return E=>a(x,E)}e.optsGenerator=l;function c(x){return(E,S)=>typeof E=="function"?[x(),E]:[x(E),(0,n.validateCallback)(S)]}e.optsAndCbGenerator=c,e.optsDefaults={encoding:"utf8"},e.getDefaultOpts=l(e.optsDefaults),e.getDefaultOptsAndCb=c(e.getDefaultOpts);var u={recursive:!1},h=x=>Object.assign({},u,x);e.getRmdirOptions=h;var d=l(e.optsDefaults);e.getRmOptsAndCb=c(d);var g={flag:"r"};e.getReadFileOptions=l(g);var y={encoding:"utf8",recursive:!1,withFileTypes:!1};e.getReaddirOptions=l(y),e.getReaddirOptsAndCb=c(e.getReaddirOptions);var f={encoding:"utf8",mode:438,flag:t.FLAGS[t.FLAGS.a]};e.getAppendFileOpts=l(f),e.getAppendFileOptsAndCb=c(e.getAppendFileOpts);var p={bigint:!1},m=(x={})=>Object.assign({},p,x);e.getStatOptions=m;var b=(x,E)=>typeof x=="function"?[(0,e.getStatOptions)(),x]:[(0,e.getStatOptions)(x),(0,n.validateCallback)(E)];e.getStatOptsAndCb=b;var w=e.optsDefaults;e.getRealpathOptions=l(w),e.getRealpathOptsAndCb=c(e.getRealpathOptions),e.writeFileDefaults={encoding:"utf8",mode:438,flag:t.FLAGS[t.FLAGS.w]},e.getWriteFileOptions=l(e.writeFileDefaults)}}),GX=Lt({"node_modules/memfs/lib/volume.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FSWatcher=e.StatWatcher=e.Volume=e.toUnixTimestamp=e.dataToStr=e.pathToSteps=e.filenameToSteps=void 0;var t=kX(),r=TX(),n=wx(),i=pO(),s=yf(),o=PX(),a=bO(),l=gO(),c=FX(),u=IX(),h=Ol(),d=yO(),g=k0(),y=$X(),f=pl(),p=BX(),m=qX(),b=Sx(),w=HX(),x=D0(),E=t.resolve,{O_RDONLY:S,O_WRONLY:C,O_RDWR:A,O_CREAT:$,O_EXCL:O,O_TRUNC:I,O_APPEND:M,O_DIRECTORY:q,O_SYMLINK:H,F_OK:G,COPYFILE_EXCL:Y,COPYFILE_FICLONE_FORCE:F}=h.constants,{sep:T,relative:N,join:U,dirname:J}=t.posix?t.posix:t,W=128,z="EPERM",V="ENOENT",Z="EBADF",nt="EINVAL",et="EEXIST",it="ENOTDIR",lt="EMFILE",ht="EACCES",pt="EISDIR",vt="ENOTEMPTY",Ct="ENOSYS",Dt="ERR_FS_EISDIR",Rt="ERR_OUT_OF_RANGE",Ot=(rt,D=l.default.cwd())=>E(D,rt);if(x.isWin){const rt=Ot;Ot=(D,P)=>(0,x.unixify)(rt(D,P))}function Tt(rt,D){const j=Ot(rt,D).substring(1);return j?j.split(T):[]}e.filenameToSteps=Tt;function ve(rt){return Tt((0,x.pathToFilename)(rt))}e.pathToSteps=ve;function mt(rt,D=g.ENCODING_UTF8){return s.Buffer.isBuffer(rt)?rt.toString(D):rt instanceof Uint8Array?(0,s.bufferFrom)(rt).toString(D):String(rt)}e.dataToStr=mt;function Kt(rt){if(typeof rt=="string"&&+rt==rt)return+rt;if(rt instanceof Date)return rt.getTime()/1e3;if(isFinite(rt))return rt<0?Date.now()/1e3:rt;throw new Error("Cannot parse time: "+rt)}e.toUnixTimestamp=Kt;function Jt(rt){if(typeof rt!="number")throw TypeError(b.ERRSTR.UID)}function re(rt){if(typeof rt!="number")throw TypeError(b.ERRSTR.GID)}function Me(rt){const D={};function P(j,X){for(const st in X){const at=X[st],gt=U(j,st);typeof at=="string"||at instanceof s.Buffer?D[gt]=at:typeof at=="object"&&at!==null&&Object.keys(at).length>0?P(gt,at):D[gt]=null}}return P("",rt),D}var ut=()=>{throw new Error("Not implemented")},dt=class Bp{static fromJSON(D,P){const j=new Bp;return j.fromJSON(D,P),j}static fromNestedJSON(D,P){const j=new Bp;return j.fromNestedJSON(D,P),j}get promises(){if(this.promisesApi===null)throw new Error("Promise is not supported in this environment.");return this.promisesApi}constructor(D={}){this.ino=0,this.inodes={},this.releasedInos=[],this.fds={},this.releasedFds=[],this.maxFiles=1e4,this.openFiles=0,this.promisesApi=new p.FsPromises(this,y.FileHandle),this.statWatchers={},this.cpSync=ut,this.lutimesSync=ut,this.statfsSync=ut,this.opendirSync=ut,this.cp=ut,this.lutimes=ut,this.statfs=ut,this.openAsBlob=ut,this.opendir=ut,this.props=Object.assign({Node:r.Node,Link:r.Link,File:r.File},D);const P=this.createLink();P.setNode(this.createNode(!0));const j=this;this.StatWatcher=class extends k{constructor(){super(j)}};const X=B;this.ReadStream=class extends X{constructor(...at){super(j,...at)}};const st=tt;this.WriteStream=class extends st{constructor(...at){super(j,...at)}},this.FSWatcher=class extends ot{constructor(){super(j)}},P.setChild(".",P),P.getNode().nlink++,P.setChild("..",P),P.getNode().nlink++,this.root=P}createLink(D,P,j=!1,X){if(!D)return new this.props.Link(this,null,"");if(!P)throw new Error("createLink: name cannot be empty");return D.createChild(P,this.createNode(j,X))}deleteLink(D){const P=D.parent;return P?(P.deleteChild(D),!0):!1}newInoNumber(){const D=this.releasedInos.pop();return D||(this.ino=(this.ino+1)%4294967295,this.ino)}newFdNumber(){const D=this.releasedFds.pop();return typeof D=="number"?D:Bp.fd--}createNode(D=!1,P){const j=new this.props.Node(this.newInoNumber(),P);return D&&j.setIsDirectory(),this.inodes[j.ino]=j,j}deleteNode(D){D.del(),delete this.inodes[D.ino],this.releasedInos.push(D.ino)}getLink(D){return this.root.walk(D)}getLinkOrThrow(D,P){const j=Tt(D),X=this.getLink(j);if(!X)throw(0,x.createError)(V,P,D);return X}getResolvedLink(D){let P=typeof D=="string"?Tt(D):D,j=this.root,X=0;for(;X{let X;try{X=D.apply(this,P)}catch(st){j(st);return}j(null,X)})}_toJSON(D=this.root,P={},j,X){let st=!0,at=D.children;D.getNode().isFile()&&(at=new Map([[D.getName(),D.parent.getChild(D.getName())]]),D=D.parent);for(const Et of at.keys()){if(Et==="."||Et==="..")continue;st=!1;const Mt=D.getChild(Et);if(!Mt)throw new Error("_toJSON: unexpected undefined");const ce=Mt.getNode();if(ce.isFile()){let be=Mt.getPath();j&&(be=N(j,be)),P[be]=X?ce.getBuffer():ce.getString()}else ce.isDirectory()&&this._toJSON(Mt,P,j)}let gt=D.getPath();return j&&(gt=N(j,gt)),gt&&st&&(P[gt]=null),P}toJSON(D,P={},j=!1,X=!1){const st=[];if(D){Array.isArray(D)||(D=[D]);for(const at of D){const gt=(0,x.pathToFilename)(at),Et=this.getResolvedLink(gt);Et&&st.push(Et)}}else st.push(this.root);if(!st.length)return P;for(const at of st)this._toJSON(at,P,j?at.getPath():"",X);return P}fromJSON(D,P=l.default.cwd()){for(let j in D){const X=D[j];if(j=Ot(j,P),typeof X=="string"||X instanceof s.Buffer){const st=J(j);this.mkdirpBase(st,511),this.writeFileSync(j,X)}else this.mkdirpBase(j,511)}}fromNestedJSON(D,P){this.fromJSON(Me(D),P)}toTree(D={separator:T}){return(0,m.toTreeSync)(this,D)}reset(){this.ino=0,this.inodes={},this.releasedInos=[],this.fds={},this.releasedFds=[],this.openFiles=0,this.root=this.createLink(),this.root.setNode(this.createNode(!0))}mountSync(D,P){this.fromJSON(P,D)}openLink(D,P,j=!0){if(this.openFiles>=this.maxFiles)throw(0,x.createError)(lt,"open",D.getPath());let X=D;if(j&&(X=this.resolveSymlinks(D)),!X)throw(0,x.createError)(V,"open",D.getPath());const st=X.getNode();if(st.isDirectory()){if((P&(S|A|C))!==S)throw(0,x.createError)(pt,"open",D.getPath())}else if(P&q)throw(0,x.createError)(it,"open",D.getPath());if(!(P&C)&&!st.canRead())throw(0,x.createError)(ht,"open",D.getPath());const at=new this.props.File(D,st,P,this.newFdNumber());return this.fds[at.fd]=at,this.openFiles++,P&I&&at.truncate(),at}openFile(D,P,j,X=!0){const st=Tt(D);let at=X?this.getResolvedLink(st):this.getLink(st);if(at&&P&O)throw(0,x.createError)(et,"open",D);if(!at&&P&$){const gt=this.getResolvedLink(st.slice(0,st.length-1));if(!gt)throw(0,x.createError)(V,"open",T+st.join(T));P&$&&typeof j=="number"&&(at=this.createLink(gt,st[st.length-1],!1,j))}if(at)return this.openLink(at,P,X);throw(0,x.createError)(V,"open",D)}openBase(D,P,j,X=!0){const st=this.openFile(D,P,j,X);if(!st)throw(0,x.createError)(V,"open",D);return st.fd}openSync(D,P,j=438){const X=(0,x.modeToNumber)(j),st=(0,x.pathToFilename)(D),at=(0,x.flagsToNumber)(P);return this.openBase(st,at,X,!(at&H))}open(D,P,j,X){let st=j,at=X;typeof j=="function"&&(st=438,at=j),st=st||438;const gt=(0,x.modeToNumber)(st),Et=(0,x.pathToFilename)(D),Mt=(0,x.flagsToNumber)(P);this.wrapAsync(this.openBase,[Et,Mt,gt,!(Mt&H)],at)}closeFile(D){this.fds[D.fd]&&(this.openFiles--,delete this.fds[D.fd],this.releasedFds.push(D.fd))}closeSync(D){(0,x.validateFd)(D);const P=this.getFileByFdOrThrow(D,"close");this.closeFile(P)}close(D,P){(0,x.validateFd)(D),this.wrapAsync(this.closeSync,[D],P)}openFileOrGetById(D,P,j){if(typeof D=="number"){const X=this.fds[D];if(!X)throw(0,x.createError)(V);return X}else return this.openFile((0,x.pathToFilename)(D),P,j)}readBase(D,P,j,X,st){if(P.byteLength{at&&at(null,0,P)});(0,o.default)(()=>{try{const gt=this.readBase(D,P,j,X,st);at(null,gt,P)}catch(gt){at(gt)}})}readvBase(D,P,j){const X=this.getFileByFdOrThrow(D);let st=j??void 0;st===-1&&(st=void 0);let at=0;for(const gt of P){const Et=X.read(gt,0,gt.byteLength,st);if(st=void 0,at+=Et,Et{try{const gt=this.readvBase(D,P,st);at(null,gt,P)}catch(gt){at(gt)}})}readvSync(D,P,j){return(0,x.validateFd)(D),this.readvBase(D,P,j)}readFileBase(D,P,j){let X;const at=typeof D=="number"&&(0,x.isFd)(D);let gt;if(at)gt=D;else{const Et=(0,x.pathToFilename)(D),Mt=Tt(Et),ce=this.getResolvedLink(Mt);if(ce&&ce.getNode().isDirectory())throw(0,x.createError)(pt,"open",ce.getPath());gt=this.openSync(D,P)}try{X=(0,x.bufferToEncoding)(this.getFileByFdOrThrow(gt).getBuffer(),j)}finally{at||this.closeSync(gt)}return X}readFileSync(D,P){const j=(0,w.getReadFileOptions)(P),X=(0,x.flagsToNumber)(j.flag);return this.readFileBase(D,X,j.encoding)}readFile(D,P,j){const[X,st]=(0,w.optsAndCbGenerator)(w.getReadFileOptions)(P,j),at=(0,x.flagsToNumber)(X.flag);this.wrapAsync(this.readFileBase,[D,at,X.encoding],st)}writeBase(D,P,j,X,st){const at=this.getFileByFdOrThrow(D,"write");if(at.node.isSymlink())throw(0,x.createError)(Z,"write",at.link.getPath());return at.write(P,j,X,st===-1||typeof st!="number"?void 0:st)}writeSync(D,P,j,X,st){const[,at,gt,Et,Mt]=(0,x.getWriteSyncArgs)(D,P,j,X,st);return this.writeBase(D,at,gt,Et,Mt)}write(D,P,j,X,st,at){const[,gt,Et,Mt,ce,be,wr]=(0,x.getWriteArgs)(D,P,j,X,st,at);(0,o.default)(()=>{try{const Te=this.writeBase(D,Et,Mt,ce,be);gt?wr(null,Te,P):wr(null,Te,Et)}catch(Te){wr(Te)}})}writevBase(D,P,j){const X=this.getFileByFdOrThrow(D);let st=j??void 0;st===-1&&(st=void 0);let at=0;for(const gt of P){const Et=s.Buffer.from(gt.buffer,gt.byteOffset,gt.byteLength),Mt=X.write(Et,0,Et.byteLength,st);if(st=void 0,at+=Mt,Mt{try{const gt=this.writevBase(D,P,st);at(null,gt,P)}catch(gt){at(gt)}})}writevSync(D,P,j){return(0,x.validateFd)(D),this.writevBase(D,P,j)}writeFileBase(D,P,j,X){const st=typeof D=="number";let at;st?at=D:at=this.openBase((0,x.pathToFilename)(D),j,X);let gt=0,Et=P.length,Mt=j&M?void 0:0;try{for(;Et>0;){const ce=this.writeSync(at,P,gt,Et,Mt);gt+=ce,Et-=ce,Mt!==void 0&&(Mt+=ce)}}finally{st||this.closeSync(at)}}writeFileSync(D,P,j){const X=(0,w.getWriteFileOptions)(j),st=(0,x.flagsToNumber)(X.flag),at=(0,x.modeToNumber)(X.mode),gt=(0,x.dataToBuffer)(P,X.encoding);this.writeFileBase(D,gt,st,at)}writeFile(D,P,j,X){let st=j,at=X;typeof j=="function"&&(st=w.writeFileDefaults,at=j);const gt=(0,x.validateCallback)(at),Et=(0,w.getWriteFileOptions)(st),Mt=(0,x.flagsToNumber)(Et.flag),ce=(0,x.modeToNumber)(Et.mode),be=(0,x.dataToBuffer)(P,Et.encoding);this.wrapAsync(this.writeFileBase,[D,be,Mt,ce],gt)}linkBase(D,P){const j=Tt(D),X=this.getLink(j);if(!X)throw(0,x.createError)(V,"link",D,P);const st=Tt(P),at=this.getLinkParent(st);if(!at)throw(0,x.createError)(V,"link",D,P);const gt=st[st.length-1];if(at.getChild(gt))throw(0,x.createError)(et,"link",D,P);const Et=X.getNode();Et.nlink++,at.createChild(gt,Et)}copyFileBase(D,P,j){const X=this.readFileSync(D);if(j&Y&&this.existsSync(P))throw(0,x.createError)(et,"copyFile",D,P);if(j&F)throw(0,x.createError)(Ct,"copyFile",D,P);this.writeFileBase(P,X,b.FLAGS.w,438)}copyFileSync(D,P,j){const X=(0,x.pathToFilename)(D),st=(0,x.pathToFilename)(P);return this.copyFileBase(X,st,(j||0)|0)}copyFile(D,P,j,X){const st=(0,x.pathToFilename)(D),at=(0,x.pathToFilename)(P);let gt,Et;typeof j=="function"?(gt=0,Et=j):(gt=j,Et=X),(0,x.validateCallback)(Et),this.wrapAsync(this.copyFileBase,[st,at,gt],Et)}linkSync(D,P){const j=(0,x.pathToFilename)(D),X=(0,x.pathToFilename)(P);this.linkBase(j,X)}link(D,P,j){const X=(0,x.pathToFilename)(D),st=(0,x.pathToFilename)(P);this.wrapAsync(this.linkBase,[X,st],j)}unlinkBase(D){const P=Tt(D),j=this.getLink(P);if(!j)throw(0,x.createError)(V,"unlink",D);if(j.length)throw Error("Dir not empty...");this.deleteLink(j);const X=j.getNode();X.nlink--,X.nlink<=0&&this.deleteNode(X)}unlinkSync(D){const P=(0,x.pathToFilename)(D);this.unlinkBase(P)}unlink(D,P){const j=(0,x.pathToFilename)(D);this.wrapAsync(this.unlinkBase,[j],P)}symlinkBase(D,P){const j=Tt(P),X=this.getLinkParent(j);if(!X)throw(0,x.createError)(V,"symlink",D,P);const st=j[j.length-1];if(X.getChild(st))throw(0,x.createError)(et,"symlink",D,P);const at=X.createChild(st);return at.getNode().makeSymlink(Tt(D)),at}symlinkSync(D,P,j){const X=(0,x.pathToFilename)(D),st=(0,x.pathToFilename)(P);this.symlinkBase(X,st)}symlink(D,P,j,X){const st=(0,x.validateCallback)(typeof j=="function"?j:X),at=(0,x.pathToFilename)(D),gt=(0,x.pathToFilename)(P);this.wrapAsync(this.symlinkBase,[at,gt],st)}realpathBase(D,P){const j=Tt(D),X=this.getResolvedLink(j);if(!X)throw(0,x.createError)(V,"realpath",D);return(0,g.strToEncoding)(X.getPath()||"/",P)}realpathSync(D,P){return this.realpathBase((0,x.pathToFilename)(D),(0,w.getRealpathOptions)(P).encoding)}realpath(D,P,j){const[X,st]=(0,w.getRealpathOptsAndCb)(P,j),at=(0,x.pathToFilename)(D);this.wrapAsync(this.realpathBase,[at,X.encoding],st)}lstatBase(D,P=!1,j=!1){const X=this.getLink(Tt(D));if(X)return n.default.build(X.getNode(),P);if(j)throw(0,x.createError)(V,"lstat",D)}lstatSync(D,P){const{throwIfNoEntry:j=!0,bigint:X=!1}=(0,w.getStatOptions)(P);return this.lstatBase((0,x.pathToFilename)(D),X,j)}lstat(D,P,j){const[{throwIfNoEntry:X=!0,bigint:st=!1},at]=(0,w.getStatOptsAndCb)(P,j);this.wrapAsync(this.lstatBase,[(0,x.pathToFilename)(D),st,X],at)}statBase(D,P=!1,j=!0){const X=this.getResolvedLink(Tt(D));if(X)return n.default.build(X.getNode(),P);if(j)throw(0,x.createError)(V,"stat",D)}statSync(D,P){const{bigint:j=!0,throwIfNoEntry:X=!0}=(0,w.getStatOptions)(P);return this.statBase((0,x.pathToFilename)(D),j,X)}stat(D,P,j){const[{bigint:X=!1,throwIfNoEntry:st=!0},at]=(0,w.getStatOptsAndCb)(P,j);this.wrapAsync(this.statBase,[(0,x.pathToFilename)(D),X,st],at)}fstatBase(D,P=!1){const j=this.getFileByFd(D);if(!j)throw(0,x.createError)(Z,"fstat");return n.default.build(j.node,P)}fstatSync(D,P){return this.fstatBase(D,(0,w.getStatOptions)(P).bigint)}fstat(D,P,j){const[X,st]=(0,w.getStatOptsAndCb)(P,j);this.wrapAsync(this.fstatBase,[D,X.bigint],st)}renameBase(D,P){const j=this.getLink(Tt(D));if(!j)throw(0,x.createError)(V,"rename",D,P);const X=Tt(P),st=this.getLinkParent(X);if(!st)throw(0,x.createError)(V,"rename",D,P);const at=j.parent;at&&at.deleteChild(j);const gt=X[X.length-1];j.name=gt,j.steps=[...st.steps,gt],st.setChild(j.getName(),j)}renameSync(D,P){const j=(0,x.pathToFilename)(D),X=(0,x.pathToFilename)(P);this.renameBase(j,X)}rename(D,P,j){const X=(0,x.pathToFilename)(D),st=(0,x.pathToFilename)(P);this.wrapAsync(this.renameBase,[X,st],j)}existsBase(D){return!!this.statBase(D)}existsSync(D){try{return this.existsBase((0,x.pathToFilename)(D))}catch{return!1}}exists(D,P){const j=(0,x.pathToFilename)(D);if(typeof P!="function")throw Error(b.ERRSTR.CB);(0,o.default)(()=>{try{P(this.existsBase(j))}catch{P(!1)}})}accessBase(D,P){this.getLinkOrThrow(D,"access")}accessSync(D,P=G){const j=(0,x.pathToFilename)(D);P=P|0,this.accessBase(j,P)}access(D,P,j){let X=G,st;typeof P!="function"?(X=P|0,st=(0,x.validateCallback)(j)):st=P;const at=(0,x.pathToFilename)(D);this.wrapAsync(this.accessBase,[at,X],st)}appendFileSync(D,P,j){const X=(0,w.getAppendFileOpts)(j);(!X.flag||(0,x.isFd)(D))&&(X.flag="a"),this.writeFileSync(D,P,X)}appendFile(D,P,j,X){const[st,at]=(0,w.getAppendFileOptsAndCb)(j,X);(!st.flag||(0,x.isFd)(D))&&(st.flag="a"),this.writeFile(D,P,st,at)}readdirBase(D,P){const j=Tt(D),X=this.getResolvedLink(j);if(!X)throw(0,x.createError)(V,"readdir",D);if(!X.getNode().isDirectory())throw(0,x.createError)(it,"scandir",D);const at=[];for(const Et of X.children.keys()){const Mt=X.getChild(Et);if(!(!Mt||Et==="."||Et==="..")&&(at.push(i.default.build(Mt,P.encoding)),P.recursive&&Mt.children.size)){const ce=Object.assign(Object.assign({},P),{recursive:!0,withFileTypes:!0}),be=this.readdirBase(Mt.getPath(),ce);at.push(...be)}}if(!x.isWin&&P.encoding!=="buffer"&&at.sort((Et,Mt)=>Et.nameMt.name?1:0),P.withFileTypes)return at;let gt=D;return x.isWin&&(gt=gt.replace(/\\/g,"/")),at.map(Et=>{if(P.recursive){let Mt=t.join(Et.path,Et.name.toString());return x.isWin&&(Mt=Mt.replace(/\\/g,"/")),Mt.replace(gt+t.posix.sep,"")}return Et.name})}readdirSync(D,P){const j=(0,w.getReaddirOptions)(P),X=(0,x.pathToFilename)(D);return this.readdirBase(X,j)}readdir(D,P,j){const[X,st]=(0,w.getReaddirOptsAndCb)(P,j),at=(0,x.pathToFilename)(D);this.wrapAsync(this.readdirBase,[at,X],st)}readlinkBase(D,P){const X=this.getLinkOrThrow(D,"readlink").getNode();if(!X.isSymlink())throw(0,x.createError)(nt,"readlink",D);const st=T+X.symlink.join(T);return(0,g.strToEncoding)(st,P)}readlinkSync(D,P){const j=(0,w.getDefaultOpts)(P),X=(0,x.pathToFilename)(D);return this.readlinkBase(X,j.encoding)}readlink(D,P,j){const[X,st]=(0,w.getDefaultOptsAndCb)(P,j),at=(0,x.pathToFilename)(D);this.wrapAsync(this.readlinkBase,[at,X.encoding],st)}fsyncBase(D){this.getFileByFdOrThrow(D,"fsync")}fsyncSync(D){this.fsyncBase(D)}fsync(D,P){this.wrapAsync(this.fsyncBase,[D],P)}fdatasyncBase(D){this.getFileByFdOrThrow(D,"fdatasync")}fdatasyncSync(D){this.fdatasyncBase(D)}fdatasync(D,P){this.wrapAsync(this.fdatasyncBase,[D],P)}ftruncateBase(D,P){this.getFileByFdOrThrow(D,"ftruncate").truncate(P)}ftruncateSync(D,P){this.ftruncateBase(D,P)}ftruncate(D,P,j){const X=typeof P=="number"?P:0,st=(0,x.validateCallback)(typeof P=="number"?j:P);this.wrapAsync(this.ftruncateBase,[D,X],st)}truncateBase(D,P){const j=this.openSync(D,"r+");try{this.ftruncateSync(j,P)}finally{this.closeSync(j)}}truncateSync(D,P){if((0,x.isFd)(D))return this.ftruncateSync(D,P);this.truncateBase(D,P)}truncate(D,P,j){const X=typeof P=="number"?P:0,st=(0,x.validateCallback)(typeof P=="number"?j:P);if((0,x.isFd)(D))return this.ftruncate(D,X,st);this.wrapAsync(this.truncateBase,[D,X],st)}futimesBase(D,P,j){const st=this.getFileByFdOrThrow(D,"futimes").node;st.atime=new Date(P*1e3),st.mtime=new Date(j*1e3)}futimesSync(D,P,j){this.futimesBase(D,Kt(P),Kt(j))}futimes(D,P,j,X){this.wrapAsync(this.futimesBase,[D,Kt(P),Kt(j)],X)}utimesBase(D,P,j){const X=this.openSync(D,"r");try{this.futimesBase(X,P,j)}finally{this.closeSync(X)}}utimesSync(D,P,j){this.utimesBase((0,x.pathToFilename)(D),Kt(P),Kt(j))}utimes(D,P,j,X){this.wrapAsync(this.utimesBase,[(0,x.pathToFilename)(D),Kt(P),Kt(j)],X)}mkdirBase(D,P){const j=Tt(D);if(!j.length)throw(0,x.createError)(et,"mkdir",D);const X=this.getLinkParentAsDirOrThrow(D,"mkdir"),st=j[j.length-1];if(X.getChild(st))throw(0,x.createError)(et,"mkdir",D);X.createChild(st,this.createNode(!0,P))}mkdirpBase(D,P){const j=Ot(D),X=j.substring(1),st=X?X.split(T):[];let at=this.root,gt=!1;for(let Et=0;Et1)return this.mkdtempBase(D,P,j-1);throw Error("Could not create temp dir.")}else throw st}}mkdtempSync(D,P){const{encoding:j}=(0,w.getDefaultOpts)(P);if(!D||typeof D!="string")throw new TypeError("filename prefix is required");return(0,x.nullCheck)(D),this.mkdtempBase(D,j)}mkdtemp(D,P,j){const[{encoding:X},st]=(0,w.getDefaultOptsAndCb)(P,j);if(!D||typeof D!="string")throw new TypeError("filename prefix is required");(0,x.nullCheck)(D)&&this.wrapAsync(this.mkdtempBase,[D,X],st)}rmdirBase(D,P){const j=(0,w.getRmdirOptions)(P),X=this.getLinkAsDirOrThrow(D,"rmdir");if(X.length&&!j.recursive)throw(0,x.createError)(vt,"rmdir",D);this.deleteLink(X)}rmdirSync(D,P){this.rmdirBase((0,x.pathToFilename)(D),P)}rmdir(D,P,j){const X=(0,w.getRmdirOptions)(P),st=(0,x.validateCallback)(typeof P=="function"?P:j);this.wrapAsync(this.rmdirBase,[(0,x.pathToFilename)(D),X],st)}rmBase(D,P={}){const j=this.getResolvedLink(D);if(!j){if(!P.force)throw(0,x.createError)(V,"stat",D);return}if(j.getNode().isDirectory()&&!P.recursive)throw(0,x.createError)(Dt,"rm",D);this.deleteLink(j)}rmSync(D,P){this.rmBase((0,x.pathToFilename)(D),P)}rm(D,P,j){const[X,st]=(0,w.getRmOptsAndCb)(P,j);this.wrapAsync(this.rmBase,[(0,x.pathToFilename)(D),X],st)}fchmodBase(D,P){this.getFileByFdOrThrow(D,"fchmod").chmod(P)}fchmodSync(D,P){this.fchmodBase(D,(0,x.modeToNumber)(P))}fchmod(D,P,j){this.wrapAsync(this.fchmodBase,[D,(0,x.modeToNumber)(P)],j)}chmodBase(D,P){const j=this.openSync(D,"r");try{this.fchmodBase(j,P)}finally{this.closeSync(j)}}chmodSync(D,P){const j=(0,x.modeToNumber)(P),X=(0,x.pathToFilename)(D);this.chmodBase(X,j)}chmod(D,P,j){const X=(0,x.modeToNumber)(P),st=(0,x.pathToFilename)(D);this.wrapAsync(this.chmodBase,[st,X],j)}lchmodBase(D,P){const j=this.openBase(D,A,0,!1);try{this.fchmodBase(j,P)}finally{this.closeSync(j)}}lchmodSync(D,P){const j=(0,x.modeToNumber)(P),X=(0,x.pathToFilename)(D);this.lchmodBase(X,j)}lchmod(D,P,j){const X=(0,x.modeToNumber)(P),st=(0,x.pathToFilename)(D);this.wrapAsync(this.lchmodBase,[st,X],j)}fchownBase(D,P,j){this.getFileByFdOrThrow(D,"fchown").chown(P,j)}fchownSync(D,P,j){Jt(P),re(j),this.fchownBase(D,P,j)}fchown(D,P,j,X){Jt(P),re(j),this.wrapAsync(this.fchownBase,[D,P,j],X)}chownBase(D,P,j){this.getResolvedLinkOrThrow(D,"chown").getNode().chown(P,j)}chownSync(D,P,j){Jt(P),re(j),this.chownBase((0,x.pathToFilename)(D),P,j)}chown(D,P,j,X){Jt(P),re(j),this.wrapAsync(this.chownBase,[(0,x.pathToFilename)(D),P,j],X)}lchownBase(D,P,j){this.getLinkOrThrow(D,"lchown").getNode().chown(P,j)}lchownSync(D,P,j){Jt(P),re(j),this.lchownBase((0,x.pathToFilename)(D),P,j)}lchown(D,P,j,X){Jt(P),re(j),this.wrapAsync(this.lchownBase,[(0,x.pathToFilename)(D),P,j],X)}watchFile(D,P,j){const X=(0,x.pathToFilename)(D);let st=P,at=j;if(typeof st=="function"&&(at=P,st=null),typeof at!="function")throw Error('"watchFile()" requires a listener function');let gt=5007,Et=!0;st&&typeof st=="object"&&(typeof st.interval=="number"&&(gt=st.interval),typeof st.persistent=="boolean"&&(Et=st.persistent));let Mt=this.statWatchers[X];return Mt||(Mt=new this.StatWatcher,Mt.start(X,Et,gt),this.statWatchers[X]=Mt),Mt.addListener("change",at),Mt}unwatchFile(D,P){const j=(0,x.pathToFilename)(D),X=this.statWatchers[j];X&&(typeof P=="function"?X.removeListener("change",P):X.removeAllListeners("change"),X.listenerCount("change")===0&&(X.stop(),delete this.statWatchers[j]))}createReadStream(D,P){return new this.ReadStream(D,P)}createWriteStream(D,P){return new this.WriteStream(D,P)}watch(D,P,j){const X=(0,x.pathToFilename)(D);let st=P;typeof P=="function"&&(j=P,st=null);let{persistent:at,recursive:gt,encoding:Et}=(0,w.getDefaultOpts)(st);at===void 0&&(at=!0),gt===void 0&&(gt=!1);const Mt=new this.FSWatcher;return Mt.start(X,at,gt,Et),j&&Mt.addListener("change",j),Mt}};e.Volume=dt,dt.fd=2147483647;function kt(rt){rt.emit("stop")}var k=class extends d.EventEmitter{constructor(rt){super(),this.onInterval=()=>{try{const D=this.vol.statSync(this.filename);this.hasChanged(D)&&(this.emit("change",D,this.prev),this.prev=D)}finally{this.loop()}},this.vol=rt}loop(){this.timeoutRef=this.setTimeout(this.onInterval,this.interval)}hasChanged(rt){return rt.mtimeMs>this.prev.mtimeMs||rt.nlink!==this.prev.nlink}start(rt,D=!0,P=5007){this.filename=(0,x.pathToFilename)(rt),this.setTimeout=D?setTimeout.bind(typeof globalThis<"u"?globalThis:global):c.default,this.interval=P,this.prev=this.vol.statSync(this.filename),this.loop()}stop(){clearTimeout(this.timeoutRef),(0,a.default)(()=>{kt.call(this,this)})}};e.StatWatcher=k;var v;function _(rt){v=(0,s.bufferAllocUnsafe)(rt),v.used=0}f.inherits(B,u.Readable),e.ReadStream=B;function B(rt,D,P){if(!(this instanceof B))return new B(rt,D,P);if(this._vol=rt,P=Object.assign({},(0,w.getOptions)(P,{})),P.highWaterMark===void 0&&(P.highWaterMark=64*1024),u.Readable.call(this,P),this.path=(0,x.pathToFilename)(D),this.fd=P.fd===void 0?null:P.fd,this.flags=P.flags===void 0?"r":P.flags,this.mode=P.mode===void 0?438:P.mode,this.start=P.start,this.end=P.end,this.autoClose=P.autoClose===void 0?!0:P.autoClose,this.pos=void 0,this.bytesRead=0,this.start!==void 0){if(typeof this.start!="number")throw new TypeError('"start" option must be a Number');if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw new TypeError('"end" option must be a Number');if(this.start>this.end)throw new Error('"start" option must be <= "end" option');this.pos=this.start}typeof this.fd!="number"&&this.open(),this.on("end",function(){this.autoClose&&this.destroy&&this.destroy()})}B.prototype.open=function(){var rt=this;this._vol.open(this.path,this.flags,this.mode,(D,P)=>{if(D){rt.autoClose&&rt.destroy&&rt.destroy(),rt.emit("error",D);return}rt.fd=P,rt.emit("open",P),rt.read()})},B.prototype._read=function(rt){if(typeof this.fd!="number")return this.once("open",function(){this._read(rt)});if(this.destroyed)return;(!v||v.length-v.used0&&(X.bytesRead+=gt,Et=D.slice(j,j+gt)),X.push(Et)}}},B.prototype._destroy=function(rt,D){this.close(P=>{D(rt||P)})},B.prototype.close=function(rt){var D;if(rt&&this.once("close",rt),this.closed||typeof this.fd!="number"){if(typeof this.fd!="number"){this.once("open",K);return}return(0,a.default)(()=>this.emit("close"))}typeof((D=this._readableState)===null||D===void 0?void 0:D.closed)=="boolean"?this._readableState.closed=!0:this.closed=!0,this._vol.close(this.fd,P=>{P?this.emit("error",P):this.emit("close")}),this.fd=null};function K(rt){this.close()}f.inherits(tt,u.Writable),e.WriteStream=tt;function tt(rt,D,P){if(!(this instanceof tt))return new tt(rt,D,P);if(this._vol=rt,P=Object.assign({},(0,w.getOptions)(P,{})),u.Writable.call(this,P),this.path=(0,x.pathToFilename)(D),this.fd=P.fd===void 0?null:P.fd,this.flags=P.flags===void 0?"w":P.flags,this.mode=P.mode===void 0?438:P.mode,this.start=P.start,this.autoClose=P.autoClose===void 0?!0:!!P.autoClose,this.pos=void 0,this.bytesWritten=0,this.pending=!0,this.start!==void 0){if(typeof this.start!="number")throw new TypeError('"start" option must be a Number');if(this.start<0)throw new Error('"start" must be >= zero');this.pos=this.start}P.encoding&&this.setDefaultEncoding(P.encoding),typeof this.fd!="number"&&this.open(),this.once("finish",function(){this.autoClose&&this.close()})}tt.prototype.open=function(){this._vol.open(this.path,this.flags,this.mode,function(rt,D){if(rt){this.autoClose&&this.destroy&&this.destroy(),this.emit("error",rt);return}this.fd=D,this.pending=!1,this.emit("open",D)}.bind(this))},tt.prototype._write=function(rt,D,P){if(!(rt instanceof s.Buffer||rt instanceof Uint8Array))return this.emit("error",new Error("Invalid data"));if(typeof this.fd!="number")return this.once("open",function(){this._write(rt,D,P)});var j=this;this._vol.write(this.fd,rt,0,rt.length,this.pos,(X,st)=>{if(X)return j.autoClose&&j.destroy&&j.destroy(),P(X);j.bytesWritten+=st,P()}),this.pos!==void 0&&(this.pos+=rt.length)},tt.prototype._writev=function(rt,D){if(typeof this.fd!="number")return this.once("open",function(){this._writev(rt,D)});const P=this,j=rt.length,X=new Array(j);for(var st=0,at=0;at{if(Mt)return P.destroy&&P.destroy(),D(Mt);P.bytesWritten+=ce,D()}),this.pos!==void 0&&(this.pos+=st)},tt.prototype.close=function(rt){var D;if(rt&&this.once("close",rt),this.closed||typeof this.fd!="number"){if(typeof this.fd!="number"){this.once("open",K);return}return(0,a.default)(()=>this.emit("close"))}typeof((D=this._writableState)===null||D===void 0?void 0:D.closed)=="boolean"?this._writableState.closed=!0:this.closed=!0,this._vol.close(this.fd,P=>{P?this.emit("error",P):this.emit("close")}),this.fd=null},tt.prototype._destroy=B.prototype._destroy,tt.prototype.destroySoon=tt.prototype.end;var ot=class extends d.EventEmitter{constructor(rt){super(),this._filename="",this._filenameEncoded="",this._recursive=!1,this._encoding=g.ENCODING_UTF8,this._listenerRemovers=new Map,this._onParentChild=D=>{D.getName()===this._getName()&&this._emit("rename")},this._emit=D=>{this.emit("change",D,this._filenameEncoded)},this._persist=()=>{this._timer=setTimeout(this._persist,1e6)},this._vol=rt}_getName(){return this._steps[this._steps.length-1]}start(rt,D=!0,P=!1,j=g.ENCODING_UTF8){this._filename=(0,x.pathToFilename)(rt),this._steps=Tt(this._filename),this._filenameEncoded=(0,g.strToEncoding)(this._filename),this._recursive=P,this._encoding=j;try{this._link=this._vol.getLinkOrThrow(this._filename,"FSWatcher")}catch(gt){const Et=new Error(`watch ${this._filename} ${gt.code}`);throw Et.code=gt.code,Et.errno=gt.code,Et}const X=gt=>{var Et;const Mt=gt.getPath(),ce=gt.getNode(),be=()=>{let Te=N(this._filename,Mt);return Te||(Te=this._getName()),this.emit("change","change",Te)};ce.on("change",be);const wr=(Et=this._listenerRemovers.get(ce.ino))!==null&&Et!==void 0?Et:[];wr.push(()=>ce.removeListener("change",be)),this._listenerRemovers.set(ce.ino,wr)},st=gt=>{var Et;const Mt=gt.getNode(),ce=Te=>{this.emit("change","rename",N(this._filename,Te.getPath())),setTimeout(()=>{X(Te),st(Te)})},be=Te=>{const On=Vs=>{const Io=Vs.getNode().ino,Bi=this._listenerRemovers.get(Io);Bi&&(Bi.forEach(fs=>fs()),this._listenerRemovers.delete(Io));for(const[fs,zr]of Vs.children.entries())zr&&fs!=="."&&fs!==".."&&On(zr)};On(Te),this.emit("change","rename",N(this._filename,Te.getPath()))};for(const[Te,On]of gt.children.entries())On&&Te!=="."&&Te!==".."&&X(On);if(gt.on("child:add",ce),gt.on("child:delete",be),((Et=this._listenerRemovers.get(Mt.ino))!==null&&Et!==void 0?Et:[]).push(()=>{gt.removeListener("child:add",ce),gt.removeListener("child:delete",be)}),P)for(const[Te,On]of gt.children.entries())On&&Te!=="."&&Te!==".."&&st(On)};X(this._link),st(this._link);const at=this._link.parent;at&&(at.setMaxListeners(at.getMaxListeners()+1),at.on("child:delete",this._onParentChild)),D&&this._persist()}close(){clearTimeout(this._timer),this._listenerRemovers.forEach(D=>{D.forEach(P=>P())}),this._listenerRemovers.clear();const rt=this._link.parent;rt&&rt.removeListener("child:delete",this._onParentChild)}};e.FSWatcher=ot}}),YX=Lt({"node_modules/memfs/lib/node/lists/fsSynchronousApiList.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.fsSynchronousApiList=void 0,e.fsSynchronousApiList=["accessSync","appendFileSync","chmodSync","chownSync","closeSync","copyFileSync","existsSync","fchmodSync","fchownSync","fdatasyncSync","fstatSync","fsyncSync","ftruncateSync","futimesSync","lchmodSync","lchownSync","linkSync","lstatSync","mkdirSync","mkdtempSync","openSync","readdirSync","readFileSync","readlinkSync","readSync","readvSync","realpathSync","renameSync","rmdirSync","rmSync","statSync","symlinkSync","truncateSync","unlinkSync","utimesSync","writeFileSync","writeSync","writevSync"]}}),KX=Lt({"node_modules/memfs/lib/node/lists/fsCallbackApiList.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.fsCallbackApiList=void 0,e.fsCallbackApiList=["access","appendFile","chmod","chown","close","copyFile","createReadStream","createWriteStream","exists","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","read","readv","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","unwatchFile","utimes","watch","watchFile","write","writev","writeFile"]}}),XX=Lt({"node_modules/memfs/lib/index.js"(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.memfs=e.fs=e.createFsFromVolume=e.vol=e.Volume=void 0;var r=wx(),n=pO(),i=GX(),s=Ol(),o=YX(),a=KX(),{F_OK:l,R_OK:c,W_OK:u,X_OK:h}=s.constants;e.Volume=i.Volume,e.vol=new i.Volume;function d(y){const f={F_OK:l,R_OK:c,W_OK:u,X_OK:h,constants:s.constants,Stats:r.default,Dirent:n.default};for(const p of o.fsSynchronousApiList)typeof y[p]=="function"&&(f[p]=y[p].bind(y));for(const p of a.fsCallbackApiList)typeof y[p]=="function"&&(f[p]=y[p].bind(y));return f.StatWatcher=y.StatWatcher,f.FSWatcher=y.FSWatcher,f.WriteStream=y.WriteStream,f.ReadStream=y.ReadStream,f.promises=y.promises,f._toUnixTimestamp=i.toUnixTimestamp,f.__vol=y,f}e.createFsFromVolume=d,e.fs=d(e.vol);var g=(y={},f="/")=>{const p=e.Volume.fromNestedJSON(y,f);return{fs:d(p),vol:p}};e.memfs=g,t.exports=Object.assign(Object.assign({},t.exports),e.fs),t.exports.semantic=!0}}),_u=XK(XX());_u.default;_u.memfs;var JX=_u.fs;_u.createFsFromVolume;_u.vol;var ZX=_u.Volume;/*! Bundled license information: ieee754/index.js: (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh *) buffer/index.js: (*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT *) assert/build/internal/util/comparisons.js: (*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT *) */let on=JX;const QX=(e,t=!1)=>{on=e,t||(on.__custom_fs__=!0)},tJ=Object.freeze(Object.defineProperty({__proto__:null,get fs(){return on},setFs:QX},Symbol.toStringTag,{value:"Module"})),My=10,fE=(e=0)=>t=>`\x1B[${t+e}m`,dE=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,pE=(e=0)=>(t,r,n)=>`\x1B[${38+e};2;${t};${r};${n}m`,dr={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(dr.modifier);const eJ=Object.keys(dr.color),rJ=Object.keys(dr.bgColor);[...eJ,...rJ];function nJ(){const e=new Map;for(const[t,r]of Object.entries(dr)){for(const[n,i]of Object.entries(r))dr[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=dr[n],e.set(i[0],i[1]);Object.defineProperty(dr,t,{value:r,enumerable:!1})}return Object.defineProperty(dr,"codes",{value:e,enumerable:!1}),dr.color.close="\x1B[39m",dr.bgColor.close="\x1B[49m",dr.color.ansi=fE(),dr.color.ansi256=dE(),dr.color.ansi16m=pE(),dr.bgColor.ansi=fE(My),dr.bgColor.ansi256=dE(My),dr.bgColor.ansi16m=pE(My),Object.defineProperties(dr,{rgbToAnsi256:{value(t,r,n){return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(t){const r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(s=>s+s).join(""));const i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:t=>dr.rgbToAnsi256(...dr.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,n,i;if(t>=232)r=((t-232)*10+8)/255,n=r,i=r;else{t-=16;const a=t%36;r=Math.floor(t/36)/5,n=Math.floor(a/6)/5,i=a%6/5}const s=Math.max(r,n,i)*2;if(s===0)return 30;let o=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(r));return s===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(t,r,n)=>dr.ansi256ToAnsi(dr.rgbToAnsi256(t,r,n)),enumerable:!1},hexToAnsi:{value:t=>dr.ansi256ToAnsi(dr.hexToAnsi256(t)),enumerable:!1}}),dr}const xs=nJ(),mE=(()=>{if(!("navigator"in globalThis))return 0;if(globalThis.navigator.userAgentData){const e=navigator.userAgentData.brands.find(({brand:t})=>t==="Chromium");if(e&&e.version>93)return 3}return/\b(Chrome|Chromium)\//.test(globalThis.navigator.userAgent)?1:0})(),gE=mE!==0&&{level:mE},iJ={stdout:gE,stderr:gE};function sJ(e,t,r){let n=e.indexOf(t);if(n===-1)return e;const i=t.length;let s=0,o="";do o+=e.slice(s,n)+t+r,s=n+i,n=e.indexOf(t,s);while(n!==-1);return o+=e.slice(s),o}function oJ(e,t,r,n){let i=0,s="";do{const o=e[n-1]==="\r";s+=e.slice(i,o?n-1:n)+t+(o?`\r `:` `)+r,i=n+1,n=e.indexOf(` `,i)}while(n!==-1);return s+=e.slice(i),s}const{stdout:yE,stderr:bE}=iJ,lv=Symbol("GENERATOR"),nu=Symbol("STYLER"),vf=Symbol("IS_EMPTY"),vE=["ansi","ansi","ansi256","ansi16m"],iu=Object.create(null),aJ=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const r=yE?yE.level:0;e.level=t.level===void 0?r:t.level},lJ=e=>{const t=(...r)=>r.join(" ");return aJ(t,e),Object.setPrototypeOf(t,Qf.prototype),t};function Qf(e){return lJ(e)}Object.setPrototypeOf(Qf.prototype,Function.prototype);for(const[e,t]of Object.entries(xs))iu[e]={get(){const r=zm(this,uv(t.open,t.close,this[nu]),this[vf]);return Object.defineProperty(this,e,{value:r}),r}};iu.visible={get(){const e=zm(this,this[nu],!0);return Object.defineProperty(this,"visible",{value:e}),e}};const cv=(e,t,r,...n)=>e==="rgb"?t==="ansi16m"?xs[r].ansi16m(...n):t==="ansi256"?xs[r].ansi256(xs.rgbToAnsi256(...n)):xs[r].ansi(xs.rgbToAnsi(...n)):e==="hex"?cv("rgb",t,r,...xs.hexToRgb(...n)):xs[r][e](...n),cJ=["rgb","hex","ansi256"];for(const e of cJ){iu[e]={get(){const{level:r}=this;return function(...n){const i=uv(cv(e,vE[r],"color",...n),xs.color.close,this[nu]);return zm(this,i,this[vf])}}};const t="bg"+e[0].toUpperCase()+e.slice(1);iu[t]={get(){const{level:r}=this;return function(...n){const i=uv(cv(e,vE[r],"bgColor",...n),xs.bgColor.close,this[nu]);return zm(this,i,this[vf])}}}}const uJ=Object.defineProperties(()=>{},{...iu,level:{enumerable:!0,get(){return this[lv].level},set(e){this[lv].level=e}}}),uv=(e,t,r)=>{let n,i;return r===void 0?(n=e,i=t):(n=r.openAll+e,i=t+r.closeAll),{open:e,close:t,openAll:n,closeAll:i,parent:r}},zm=(e,t,r)=>{const n=(...i)=>hJ(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,uJ),n[lv]=e,n[nu]=t,n[vf]=r,n},hJ=(e,t)=>{if(e.level<=0||!t)return e[vf]?"":t;let r=e[nu];if(r===void 0)return t;const{openAll:n,closeAll:i}=r;if(t.includes("\x1B"))for(;r!==void 0;)t=sJ(t,r.close,r.open),r=r.parent;const s=t.indexOf(` `);return s!==-1&&(t=oJ(t,i,n,s)),n+t+i};Object.defineProperties(Qf.prototype,iu);const Br=Qf();Qf({level:bE?bE.level:0});const qO=()=>typeof window=="object"?window.navigator.userAgentData?.platform==="Windows"||window.navigator.userAgent.includes("Windows"):process?.platform==="win32",fJ=65,dJ=97,pJ=90,mJ=122,Rp=46,bo=47,HO=92,gJ=58;qO();function jy(e,t="and"){switch(e.length){case 0:return"";case 1:return`${e[0]}`;case 2:return`${e[0]} ${t} ${e[1]}`;case 3:return`${e[0]}, ${e[1]}, ${t} ${e[2]}`;default:return`${e.slice(0,-1).join(", ")}, ${t} ${e[e.length-1]}`}}const yJ=["string","function","number","object","Function","Object","boolean","bigint","symbol"],bJ=/^[A-Z][a-zA-Z0-9]*$/;function vJ(e,t,r){Array.isArray(t)||(t=[t]);let n="The ";if(e.endsWith(" argument"))n+=`${e} `;else{const a=e.includes(".")?"property":"argument";n+=`"${e}" ${a} `}n+="must be ";const i=[],s=[],o=[];for(const a of t)yJ.includes(a)?i.push(a.toLowerCase()):bJ.exec(a)!==null?s.push(a):o.push(a);if(s.length>0){const a=i.indexOf("object");a!==-1&&(i.splice(a,1),s.push("Object"))}return i.length>0&&(n+=`${i.length>1?"one of type":"of type"} ${jy(i,"or")}`,(s.length>0||o.length>0)&&(n+=" or ")),s.length>0&&(n+=`an instance of ${jy(s,"or")}`,o.length>0&&(n+=" or ")),o.length>0&&(o.length>1?n+=`one of ${jy(o,"or")}`:(o[0].toLowerCase()!==o[0]&&(n+="an "),n+=`${o[0]}`)),n+=`. Received ${typeof r}`,n}class dc extends Error{constructor(t,r,n){const i=vJ(t,r,n);super(i),this.name="ERR_INVALID_ARG_TYPE"}}const wE=0,wJ=1,xJ=2,_J=4,SJ=(e,t,r=wE)=>{if(r===wE){if(e===null||Array.isArray(e))throw new dc(t,"Object",e);if(typeof e!="object")throw new dc(t,"Object",e)}else{if((wJ&r)===0&&e===null)throw new dc(t,"Object",e);if((xJ&r)===0&&Array.isArray(e))throw new dc(t,"Object",e);const s=(_J&r)===0,o=typeof e;if(o!=="object"&&(s||o!=="function"))throw new dc(t,"Object",e)}},Su=(e,t)=>{if(typeof e!="string")throw new dc(t,"string",e)};typeof window=="object"&&(window.process||(window.process={}),window.process.cwd=()=>"/");const EJ=qO();function Ro(e){return e===bo||e===HO}function GO(e){return e===bo}function CJ(e){return e>=fJ&&e<=pJ||e>=dJ&&e<=mJ}function Cx(e,t,r,n){let i="",s=0,o=-1,a=0,l=0;for(let c=0;c<=e.length;++c){if(c2){const u=i.lastIndexOf(r);u===-1?(i="",s=0):(i=i.slice(0,u),s=i.length-1-i.lastIndexOf(r)),o=c,a=0;continue}else if(i.length!==0){i="",s=0,o=c,a=0;continue}}t&&(i+=i.length>0?`${r}..`:"..",s=2)}else i.length>0?i+=`${r}${e.slice(o+1,c)}`:i=e.slice(o+1,c),s=c-o-1;o=c,a=0}else l===Rp&&a!==-1?++a:a=-1}return i}function AJ(e){return e?`${e[0]==="."?"":"."}${e}`:""}function YO(e,t){SJ(t,"pathObject");const r=t.dir||t.root,n=t.base||`${t.name||""}${AJ(t.ext)}`;return r?r===t.root?`${r}${n}`:`${r}${e}${n}`:n}function kJ(...e){let t="",r="",n=!1;for(let i=e.length-1;i>=-1;i--){let s;if(i>=0){if(s=e[i],Su(s,`paths[${i}]`),s.length===0)continue}else t.length===0?s=process.cwd():(s=process?.env[`=${t}`]||process.cwd(),(s===void 0||s.slice(0,2).toLowerCase()!==t.toLowerCase()&&s.charCodeAt(2)===HO)&&(s=`${t}\\`));const o=s.length;let a=0,l="",c=!1;const u=s.charCodeAt(0);if(o===1)Ro(u)&&(a=1,c=!0);else if(Ro(u))if(c=!0,Ro(s.charCodeAt(1))){let h=2,d=h;for(;h2&&Ro(s.charCodeAt(2))&&(c=!0,a=3));if(l.length>0)if(t.length>0){if(l.toLowerCase()!==t.toLowerCase())continue}else t=l;if(n){if(t.length>0)break}else if(r=`${s.slice(a)}\\${r}`,n=c,c&&t.length>0)break}return r=Cx(r,!n,"\\",Ro),n?`${t}\\${r}`:`${t}${r}`||"."}YO.bind(null,"\\");const DJ=(()=>{if(EJ){const e=/\\/g;return()=>{const t=process.cwd().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>process.cwd()})();function TJ(...e){let t="",r=!1;for(let n=e.length-1;n>=-1&&!r;n--){const i=n>=0?e[n]:DJ();Su(i,`paths[${n}]`),i.length!==0&&(t=`${i}/${t}`,r=i.charCodeAt(0)===bo)}return t=Cx(t,!r,"/",GO),r?`/${t}`:t.length>0?t:"."}function PJ(e){if(Su(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===bo,r=e.charCodeAt(e.length-1)===bo;return e=Cx(e,!t,"/",GO),e.length===0?t?"/":r?"./":".":(r&&(e+="/"),t?`/${e}`:e)}function FJ(...e){if(e.length===0)return".";let t;for(let r=0;r0&&(t===void 0?t=n:t+=`/${n}`)}return t===void 0?".":PJ(t)}function OJ(e){if(Su(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===bo;let r=-1,n=!0;for(let i=e.length-1;i>=1;--i)if(e.charCodeAt(i)===bo){if(!n){r=i;break}}else n=!1;return r===-1?t?"/":".":t&&r===1?"//":e.slice(0,r)}function IJ(e){Su(e,"path");let t=-1,r=0,n=-1,i=!0,s=0;for(let o=e.length-1;o>=0;--o){const a=e.charCodeAt(o);if(a===bo){if(!i){r=o+1;break}continue}n===-1&&(i=!1,n=o+1),a===Rp?t===-1?t=o:s!==1&&(s=1):t!==-1&&(s=-1)}return t===-1||n===-1||s===0||s===1&&t===n-1&&t===r+1?"":e.slice(t,n)}YO.bind(null,"/");const $J=TJ,vo=FJ,KO=OJ,Np=IJ;var Uh={};typeof window=="object"&&(window.process={cwd:()=>"/"});var BJ=Object.create,XO=Object.defineProperty,RJ=Object.getOwnPropertyDescriptor,JO=Object.getOwnPropertyNames,NJ=Object.getPrototypeOf,LJ=Object.prototype.hasOwnProperty,ge=(e,t)=>function(){return t||(0,e[JO(e)[0]])((t={exports:{}}).exports,t),t.exports},MJ=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of JO(t))!LJ.call(e,i)&&i!==r&&XO(e,i,{get:()=>t[i],enumerable:!(n=RJ(t,i))||n.enumerable});return e},Il=(e,t,r)=>(r=e!=null?BJ(NJ(e)):{},MJ(XO(r,"default",{value:e,enumerable:!0}),e)),jJ=ge({"node_modules/balanced-match/index.js"(e,t){t.exports=r;function r(s,o,a){s instanceof RegExp&&(s=n(s,a)),o instanceof RegExp&&(o=n(o,a));var l=i(s,o,a);return l&&{start:l[0],end:l[1],pre:a.slice(0,l[0]),body:a.slice(l[0]+s.length,l[1]),post:a.slice(l[1]+o.length)}}function n(s,o){var a=o.match(s);return a?a[0]:null}r.range=i;function i(s,o,a){var l,c,u,h,d,g=a.indexOf(s),y=a.indexOf(o,g+1),f=g;if(g>=0&&y>0){if(s===o)return[g,y];for(l=[],u=a.length;f>=0&&!d;)f==g?(l.push(f),g=a.indexOf(s,f+1)):l.length==1?d=[l.pop(),y]:(c=l.pop(),c=0?g:y;l.length&&(d=[u,h])}return d}}}),zJ=ge({"node_modules/brace-expansion/index.js"(e,t){var r=jJ();t.exports=d;var n="\0SLASH"+Math.random()+"\0",i="\0OPEN"+Math.random()+"\0",s="\0CLOSE"+Math.random()+"\0",o="\0COMMA"+Math.random()+"\0",a="\0PERIOD"+Math.random()+"\0";function l(b){return parseInt(b,10)==b?parseInt(b,10):b.charCodeAt(0)}function c(b){return b.split("\\\\").join(n).split("\\{").join(i).split("\\}").join(s).split("\\,").join(o).split("\\.").join(a)}function u(b){return b.split(n).join("\\").split(i).join("{").split(s).join("}").split(o).join(",").split(a).join(".")}function h(b){if(!b)return[""];var w=[],x=r("{","}",b);if(!x)return b.split(",");var E=x.pre,S=x.body,C=x.post,A=E.split(",");A[A.length-1]+="{"+S+"}";var $=h(C);return C.length&&(A[A.length-1]+=$.shift(),A.push.apply(A,$)),w.push.apply(w,A),w}function d(b){return b?(b.substr(0,2)==="{}"&&(b="\\{\\}"+b.substr(2)),m(c(b),!0).map(u)):[]}function g(b){return"{"+b+"}"}function y(b){return/^-?0\d/.test(b)}function f(b,w){return b<=w}function p(b,w){return b>=w}function m(b,w){var x=[],E=r("{","}",b);if(!E)return[b];var S=E.pre,C=E.post.length?m(E.post,!1):[""];if(/\$$/.test(E.pre))for(var A=0;A=0;if(!M&&!q)return E.post.match(/,.*\}/)?(b=E.pre+"{"+E.body+s+E.post,m(b)):[b];var H;if(M)H=E.body.split(/\.\./);else if(H=h(E.body),H.length===1&&(H=m(H[0],!1).map(g),H.length===1))return C.map(function(it){return E.pre+H[0]+it});var G;if(M){var Y=l(H[0]),F=l(H[1]),T=Math.max(H[0].length,H[1].length),N=H.length==3?Math.abs(l(H[2])):1,U=f,J=F0){var nt=new Array(Z+1).join("0");z<0?V="-"+nt+V.slice(1):V=nt+V}}G.push(V)}}else{G=[];for(var et=0;et= 0x80 (not a basic code point)","invalid-input":"Invalid input"},x=l-c,E=Math.floor,S=String.fromCharCode,C;function A(U){throw new RangeError(w[U])}function $(U,J){for(var W=U.length,z=[];W--;)z[W]=J(U[W]);return z}function O(U,J){var W=U.split("@"),z="";W.length>1&&(z=W[0]+"@",U=W[1]),U=U.replace(b,".");var V=U.split("."),Z=$(V,J).join(".");return z+Z}function I(U){for(var J=[],W=0,z=U.length,V,Z;W=55296&&V<=56319&&W65535&&(J-=65536,W+=S(J>>>10&1023|55296),J=56320|J&1023),W+=S(J),W}).join("")}function q(U){return U-48<10?U-22:U-65<26?U-65:U-97<26?U-97:l}function H(U,J){return U+22+75*(U<26)-((J!=0)<<5)}function G(U,J,W){var z=0;for(U=W?E(U/d):U>>1,U+=E(U/J);U>x*u>>1;z+=l)U=E(U/x);return E(z+(x+1)*U/(U+h))}function Y(U){var J=[],W=U.length,z,V=0,Z=y,nt=g,et,it,lt,ht,pt,vt,Ct,Dt,Rt;for(et=U.lastIndexOf(f),et<0&&(et=0),it=0;it=128&&A("not-basic"),J.push(U.charCodeAt(it));for(lt=et>0?et+1:0;lt=W&&A("invalid-input"),Ct=q(U.charCodeAt(lt++)),(Ct>=l||Ct>E((a-V)/pt))&&A("overflow"),V+=Ct*pt,Dt=vt<=nt?c:vt>=nt+u?u:vt-nt,!(CtE(a/Rt)&&A("overflow"),pt*=Rt;z=J.length+1,nt=G(V-ht,z,ht==0),E(V/z)>a-Z&&A("overflow"),Z+=E(V/z),V%=z,J.splice(V++,0,Z)}return M(J)}function F(U){var J,W,z,V,Z,nt,et,it,lt,ht,pt,vt=[],Ct,Dt,Rt,Ot;for(U=I(U),Ct=U.length,J=y,W=0,Z=g,nt=0;nt=J&&ptE((a-W)/Dt)&&A("overflow"),W+=(et-J)*Dt,J=et,nt=0;nta&&A("overflow"),pt==J){for(it=W,lt=l;ht=lt<=Z?c:lt>=Z+u?u:lt-Z,!(it"u"||!m?r:m(Uint8Array),x={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":f&&m?m([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":b,"%AsyncGenerator%":b,"%AsyncGeneratorFunction%":b,"%AsyncIteratorPrototype%":b,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":i,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":u,"%GeneratorFunction%":b,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f&&m?m(m([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!f||!m?r:m(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":s,"%ReferenceError%":o,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!f||!m?r:m(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f&&m?m(""[Symbol.iterator]()):r,"%Symbol%":f?Symbol:r,"%SyntaxError%":a,"%ThrowTypeError%":y,"%TypedArray%":w,"%TypeError%":l,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":c,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet};if(m)try{null.error}catch(N){E=m(m(N)),x["%Error.prototype%"]=E}var E,S=function N(U){var J;if(U==="%AsyncFunction%")J=h("async function () {}");else if(U==="%GeneratorFunction%")J=h("function* () {}");else if(U==="%AsyncGeneratorFunction%")J=h("async function* () {}");else if(U==="%AsyncGenerator%"){var W=N("%AsyncGeneratorFunction%");W&&(J=W.prototype)}else if(U==="%AsyncIteratorPrototype%"){var z=N("%AsyncGenerator%");z&&m&&(J=m(z.prototype))}return x[U]=J,J},C={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},A=Ax(),$=ZJ(),O=A.call(Function.call,Array.prototype.concat),I=A.call(Function.apply,Array.prototype.splice),M=A.call(Function.call,String.prototype.replace),q=A.call(Function.call,String.prototype.slice),H=A.call(Function.call,RegExp.prototype.exec),G=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Y=/\\(\\)?/g,F=function(U){var J=q(U,0,1),W=q(U,-1);if(J==="%"&&W!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(W==="%"&&J!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var z=[];return M(U,G,function(V,Z,nt,et){z[z.length]=nt?M(et,Y,"$1"):Z||V}),z},T=function(U,J){var W=U,z;if($(C,W)&&(z=C[W],W="%"+z[0]+"%"),$(x,W)){var V=x[W];if(V===b&&(V=S(W)),typeof V>"u"&&!J)throw new l("intrinsic "+U+" exists, but is not available. Please file an issue!");return{alias:z,name:W,value:V}}throw new a("intrinsic "+U+" does not exist!")};t.exports=function(U,J){if(typeof U!="string"||U.length===0)throw new l("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof J!="boolean")throw new l('"allowMissing" argument must be a boolean');if(H(/^%?[^%]*%?$/,U)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var W=F(U),z=W.length>0?W[0]:"",V=T("%"+z+"%",J),Z=V.name,nt=V.value,et=!1,it=V.alias;it&&(z=it[0],I(W,O([0,1],it)));for(var lt=1,ht=!0;lt=W.length){var Dt=d(nt,pt);ht=!!Dt,ht&&"get"in Dt&&!("originalValue"in Dt.get)?nt=Dt.get:nt=nt[pt]}else ht=$(nt,pt),nt=nt[pt];ht&&!et&&(x[Z]=nt)}}return nt}}}),kx=ge({"node_modules/es-define-property/index.js"(e,t){var r=Eu(),n=r("%Object.defineProperty%",!0)||!1;if(n)try{n({},"a",{value:1})}catch{n=!1}t.exports=n}}),QO=ge({"node_modules/gopd/index.js"(e,t){var r=Eu(),n=r("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch{n=null}t.exports=n}}),QJ=ge({"node_modules/define-data-property/index.js"(e,t){var r=kx(),n=ZO(),i=td(),s=QO();t.exports=function(a,l,c){if(!a||typeof a!="object"&&typeof a!="function")throw new i("`obj` must be an object or a function`");if(typeof l!="string"&&typeof l!="symbol")throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new i("`loose`, if provided, must be a boolean");var u=arguments.length>3?arguments[3]:null,h=arguments.length>4?arguments[4]:null,d=arguments.length>5?arguments[5]:null,g=arguments.length>6?arguments[6]:!1,y=!!s&&s(a,l);if(r)r(a,l,{configurable:d===null&&y?y.configurable:!d,enumerable:u===null&&y?y.enumerable:!u,value:c,writable:h===null&&y?y.writable:!h});else if(g||!u&&!h&&!d)a[l]=c;else throw new n("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}}),tZ=ge({"node_modules/has-property-descriptors/index.js"(e,t){var r=kx(),n=function(){return!!r};n.hasArrayLengthDefineBug=function(){if(!r)return null;try{return r([],"length",{value:1}).length!==1}catch{return!0}},t.exports=n}}),eZ=ge({"node_modules/set-function-length/index.js"(e,t){var r=Eu(),n=QJ(),i=tZ()(),s=QO(),o=td(),a=r("%Math.floor%");t.exports=function(c,u){if(typeof c!="function")throw new o("`fn` is not a function");if(typeof u!="number"||u<0||u>4294967295||a(u)!==u)throw new o("`length` must be a positive 32-bit integer");var h=arguments.length>2&&!!arguments[2],d=!0,g=!0;if("length"in c&&s){var y=s(c,"length");y&&!y.configurable&&(d=!1),y&&!y.writable&&(g=!1)}return(d||g||!h)&&(i?n(c,"length",u,!0,!0):n(c,"length",u)),c}}}),rZ=ge({"node_modules/call-bind/index.js"(e,t){var r=Ax(),n=Eu(),i=eZ(),s=td(),o=n("%Function.prototype.apply%"),a=n("%Function.prototype.call%"),l=n("%Reflect.apply%",!0)||r.call(a,o),c=kx(),u=n("%Math.max%");t.exports=function(g){if(typeof g!="function")throw new s("a function is required");var y=l(r,a,arguments);return i(y,1+u(0,g.length-(arguments.length-1)),!0)};var h=function(){return l(r,o,arguments)};c?c(t.exports,"apply",{value:h}):t.exports.apply=h}}),nZ=ge({"node_modules/call-bind/callBound.js"(e,t){var r=Eu(),n=rZ(),i=n(r("String.prototype.indexOf"));t.exports=function(o,a){var l=r(o,!!a);return typeof l=="function"&&i(o,".prototype.")>-1?n(l):l}}}),iZ=ge({"(disabled):node_modules/object-inspect/util.inspect"(){}}),sZ=ge({"node_modules/object-inspect/index.js"(e,t){var r=typeof Map=="function"&&Map.prototype,n=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=r&&n&&typeof n.get=="function"?n.get:null,s=r&&Map.prototype.forEach,o=typeof Set=="function"&&Set.prototype,a=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,l=o&&a&&typeof a.get=="function"?a.get:null,c=o&&Set.prototype.forEach,u=typeof WeakMap=="function"&&WeakMap.prototype,h=u?WeakMap.prototype.has:null,d=typeof WeakSet=="function"&&WeakSet.prototype,g=d?WeakSet.prototype.has:null,y=typeof WeakRef=="function"&&WeakRef.prototype,f=y?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,m=Object.prototype.toString,b=Function.prototype.toString,w=String.prototype.match,x=String.prototype.slice,E=String.prototype.replace,S=String.prototype.toUpperCase,C=String.prototype.toLowerCase,A=RegExp.prototype.test,$=Array.prototype.concat,O=Array.prototype.join,I=Array.prototype.slice,M=Math.floor,q=typeof BigInt=="function"?BigInt.prototype.valueOf:null,H=Object.getOwnPropertySymbols,G=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Y=typeof Symbol=="function"&&typeof Symbol.iterator=="object",F=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Y||!0)?Symbol.toStringTag:null,T=Object.prototype.propertyIsEnumerable,N=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(D){return D.__proto__}:null);function U(D,P){if(D===1/0||D===-1/0||D!==D||D&&D>-1e3&&D<1e3||A.call(/e/,P))return P;var j=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof D=="number"){var X=D<0?-M(-D):M(D);if(X!==D){var st=String(X),at=x.call(P,st.length+1);return E.call(st,j,"$&_")+"."+E.call(E.call(at,/([0-9]{3})/g,"$&_"),/_$/,"")}}return E.call(P,j,"$&_")}var J=iZ(),W=J.custom,z=Ct(W)?W:null;t.exports=function D(P,j,X,st){var at=j||{};if(Ot(at,"quoteStyle")&&at.quoteStyle!=="single"&&at.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ot(at,"maxStringLength")&&(typeof at.maxStringLength=="number"?at.maxStringLength<0&&at.maxStringLength!==1/0:at.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var gt=Ot(at,"customInspect")?at.customInspect:!0;if(typeof gt!="boolean"&>!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ot(at,"indent")&&at.indent!==null&&at.indent!==" "&&!(parseInt(at.indent,10)===at.indent&&at.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ot(at,"numericSeparator")&&typeof at.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Et=at.numericSeparator;if(typeof P>"u")return"undefined";if(P===null)return"null";if(typeof P=="boolean")return P?"true":"false";if(typeof P=="string")return kt(P,at);if(typeof P=="number"){if(P===0)return 1/0/P>0?"0":"-0";var Mt=String(P);return Et?U(P,Mt):Mt}if(typeof P=="bigint"){var ce=String(P)+"n";return Et?U(P,ce):ce}var be=typeof at.depth>"u"?5:at.depth;if(typeof X>"u"&&(X=0),X>=be&&be>0&&typeof P=="object")return nt(P)?"[Array]":"[Object]";var wr=tt(at,X);if(typeof st>"u")st=[];else if(mt(st,P)>=0)return"[Circular]";function Te(Bo,Ht,ct){if(Ht&&(st=I.call(st),st.push(Ht)),ct){var At={depth:at.depth};return Ot(at,"quoteStyle")&&(At.quoteStyle=at.quoteStyle),D(Bo,At,X+1,st)}return D(Bo,at,X+1,st)}if(typeof P=="function"&&!it(P)){var On=ve(P),Vs=rt(P,Te);return"[Function"+(On?": "+On:" (anonymous)")+"]"+(Vs.length>0?" { "+O.call(Vs,", ")+" }":"")}if(Ct(P)){var Io=Y?E.call(String(P),/^(Symbol\(.*\))_[^)]*$/,"$1"):G.call(P);return typeof P=="object"&&!Y?v(Io):Io}if(dt(P)){for(var Bi="<"+C.call(String(P.nodeName)),fs=P.attributes||[],zr=0;zr",Bi}if(nt(P)){if(P.length===0)return"[]";var $o=rt(P,Te);return wr&&!K($o)?"["+ot($o,wr)+"]":"[ "+O.call($o,", ")+" ]"}if(lt(P)){var Ul=rt(P,Te);return!("cause"in Error.prototype)&&"cause"in P&&!T.call(P,"cause")?"{ ["+String(P)+"] "+O.call($.call("[cause]: "+Te(P.cause),Ul),", ")+" }":Ul.length===0?"["+String(P)+"]":"{ ["+String(P)+"] "+O.call(Ul,", ")+" }"}if(typeof P=="object"&>){if(z&&typeof P[z]=="function"&&J)return J(P,{depth:be-X});if(gt!=="symbol"&&typeof P.inspect=="function")return P.inspect()}if(Kt(P)){var Ru=[];return s&&s.call(P,function(Bo,Ht){Ru.push(Te(Ht,P,!0)+" => "+Te(Bo,P))}),B("Map",i.call(P),Ru,wr)}if(Me(P)){var Vl=[];return c&&c.call(P,function(Bo){Vl.push(Te(Bo,P))}),B("Set",l.call(P),Vl,wr)}if(Jt(P))return _("WeakMap");if(ut(P))return _("WeakSet");if(re(P))return _("WeakRef");if(pt(P))return v(Te(Number(P)));if(Dt(P))return v(Te(q.call(P)));if(vt(P))return v(p.call(P));if(ht(P))return v(Te(String(P)));if(typeof window<"u"&&P===window)return"{ [object Window] }";if(typeof globalThis<"u"&&P===globalThis||typeof global<"u"&&P===global)return"{ [object globalThis] }";if(!et(P)&&!it(P)){var Wl=rt(P,Te),pi=N?N(P)===Object.prototype:P instanceof Object||P.constructor===Object,ql=P instanceof Object?"":"null prototype",Nu=!pi&&F&&Object(P)===P&&F in P?x.call(Tt(P),8,-1):ql?"Object":"",vd=pi||typeof P.constructor!="function"?"":P.constructor.name?P.constructor.name+" ":"",Hl=vd+(Nu||ql?"["+O.call($.call([],Nu||[],ql||[]),": ")+"] ":"");return Wl.length===0?Hl+"{}":wr?Hl+"{"+ot(Wl,wr)+"}":Hl+"{ "+O.call(Wl,", ")+" }"}return String(P)};function V(D,P,j){var X=(j.quoteStyle||P)==="double"?'"':"'";return X+D+X}function Z(D){return E.call(String(D),/"/g,""")}function nt(D){return Tt(D)==="[object Array]"&&(!F||!(typeof D=="object"&&F in D))}function et(D){return Tt(D)==="[object Date]"&&(!F||!(typeof D=="object"&&F in D))}function it(D){return Tt(D)==="[object RegExp]"&&(!F||!(typeof D=="object"&&F in D))}function lt(D){return Tt(D)==="[object Error]"&&(!F||!(typeof D=="object"&&F in D))}function ht(D){return Tt(D)==="[object String]"&&(!F||!(typeof D=="object"&&F in D))}function pt(D){return Tt(D)==="[object Number]"&&(!F||!(typeof D=="object"&&F in D))}function vt(D){return Tt(D)==="[object Boolean]"&&(!F||!(typeof D=="object"&&F in D))}function Ct(D){if(Y)return D&&typeof D=="object"&&D instanceof Symbol;if(typeof D=="symbol")return!0;if(!D||typeof D!="object"||!G)return!1;try{return G.call(D),!0}catch{}return!1}function Dt(D){if(!D||typeof D!="object"||!q)return!1;try{return q.call(D),!0}catch{}return!1}var Rt=Object.prototype.hasOwnProperty||function(D){return D in this};function Ot(D,P){return Rt.call(D,P)}function Tt(D){return m.call(D)}function ve(D){if(D.name)return D.name;var P=w.call(b.call(D),/^function\s*([\w$]+)/);return P?P[1]:null}function mt(D,P){if(D.indexOf)return D.indexOf(P);for(var j=0,X=D.length;jP.maxStringLength){var j=D.length-P.maxStringLength,X="... "+j+" more character"+(j>1?"s":"");return kt(x.call(D,0,P.maxStringLength),P)+X}var st=E.call(E.call(D,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,k);return V(st,"single",P)}function k(D){var P=D.charCodeAt(0),j={8:"b",9:"t",10:"n",12:"f",13:"r"}[P];return j?"\\"+j:"\\x"+(P<16?"0":"")+S.call(P.toString(16))}function v(D){return"Object("+D+")"}function _(D){return D+" { ? }"}function B(D,P,j,X){var st=X?ot(j,X):O.call(j,", ");return D+" ("+P+") {"+st+"}"}function K(D){for(var P=0;P=0)return!1;return!0}function tt(D,P){var j;if(D.indent===" ")j=" ";else if(typeof D.indent=="number"&&D.indent>0)j=O.call(Array(D.indent+1)," ");else return null;return{base:j,prev:O.call(Array(P+1),j)}}function ot(D,P){if(D.length===0)return"";var j=` `+P.prev+P.base;return j+O.call(D,","+j)+` `+P.prev}function rt(D,P){var j=nt(D),X=[];if(j){X.length=D.length;for(var st=0;st1;){var x=w.pop(),E=x.obj[x.prop];if(i(E)){for(var S=[],C=0;C=h?A.slice(O,O+h):A,M=[],q=0;q=48&&H<=57||H>=65&&H<=90||H>=97&&H<=122||C===r.RFC1738&&(H===40||H===41)){M[M.length]=I.charAt(q);continue}if(H<128){M[M.length]=s[H];continue}if(H<2048){M[M.length]=s[192|H>>6]+s[128|H&63];continue}if(H<55296||H>=57344){M[M.length]=s[224|H>>12]+s[128|H>>6&63]+s[128|H&63];continue}q+=1,H=65536+((H&1023)<<10|I.charCodeAt(q)&1023),M[M.length]=s[240|H>>18]+s[128|H>>12&63]+s[128|H>>6&63]+s[128|H&63]}$+=M.join("")}return $},g=function(w){for(var x=[{obj:{o:w},prop:"o"}],E=[],S=0;S"u"&&(W=0)}if(typeof I=="function"?U=I(w,U):U instanceof Date?U=H(U):x==="comma"&&a(U)&&(U=n.maybeMap(U,function(Tt){return Tt instanceof Date?H(Tt):Tt})),U===null){if(C)return O&&!F?O(w,d.encoder,T,"key",G):w;U=""}if(g(U)||n.isBuffer(U)){if(O){var Z=F?w:O(w,d.encoder,T,"key",G);return[Y(Z)+"="+Y(O(U,d.encoder,T,"value",G))]}return[Y(w)+"="+Y(String(U))]}var nt=[];if(typeof U>"u")return nt;var et;if(x==="comma"&&a(U))F&&O&&(U=n.maybeMap(U,O)),et=[{value:U.length>0?U.join(",")||null:void 0}];else if(a(I))et=I;else{var it=Object.keys(U);et=M?it.sort(M):it}var lt=$?w.replace(/\./g,"%2E"):w,ht=E&&a(U)&&U.length===1?lt+"[]":lt;if(S&&a(U)&&U.length===0)return ht+"[]";for(var pt=0;pt"u"?b.encodeDotInKeys===!0?!0:d.allowDots:!!b.allowDots;return{addQueryPrefix:typeof b.addQueryPrefix=="boolean"?b.addQueryPrefix:d.addQueryPrefix,allowDots:A,allowEmptyArrays:typeof b.allowEmptyArrays=="boolean"?!!b.allowEmptyArrays:d.allowEmptyArrays,arrayFormat:C,charset:w,charsetSentinel:typeof b.charsetSentinel=="boolean"?b.charsetSentinel:d.charsetSentinel,commaRoundTrip:b.commaRoundTrip,delimiter:typeof b.delimiter>"u"?d.delimiter:b.delimiter,encode:typeof b.encode=="boolean"?b.encode:d.encode,encodeDotInKeys:typeof b.encodeDotInKeys=="boolean"?b.encodeDotInKeys:d.encodeDotInKeys,encoder:typeof b.encoder=="function"?b.encoder:d.encoder,encodeValuesOnly:typeof b.encodeValuesOnly=="boolean"?b.encodeValuesOnly:d.encodeValuesOnly,filter:S,format:x,formatter:E,serializeDate:typeof b.serializeDate=="function"?b.serializeDate:d.serializeDate,skipNulls:typeof b.skipNulls=="boolean"?b.skipNulls:d.skipNulls,sort:typeof b.sort=="function"?b.sort:null,strictNullHandling:typeof b.strictNullHandling=="boolean"?b.strictNullHandling:d.strictNullHandling}};t.exports=function(m,b){var w=m,x=p(b),E,S;typeof x.filter=="function"?(S=x.filter,w=S("",w)):a(x.filter)&&(S=x.filter,E=S);var C=[];if(typeof w!="object"||w===null)return"";var A=o[x.arrayFormat],$=A==="comma"&&x.commaRoundTrip;E||(E=Object.keys(w)),x.sort&&E.sort(x.sort);for(var O=r(),I=0;I0?H+q:""}}}),lZ=ge({"node_modules/qs/lib/parse.js"(e,t){var r=tI(),n=Object.prototype.hasOwnProperty,i=Array.isArray,s={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:r.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},o=function(y){return y.replace(/&#(\d+);/g,function(f,p){return String.fromCharCode(parseInt(p,10))})},a=function(y,f){return y&&typeof y=="string"&&f.comma&&y.indexOf(",")>-1?y.split(","):y},l="utf8=%26%2310003%3B",c="utf8=%E2%9C%93",u=function(f,p){var m={__proto__:null},b=p.ignoreQueryPrefix?f.replace(/^\?/,""):f,w=p.parameterLimit===1/0?void 0:p.parameterLimit,x=b.split(p.delimiter,w),E=-1,S,C=p.charset;if(p.charsetSentinel)for(S=0;S-1&&(M=i(M)?[M]:M);var q=n.call(m,I);q&&p.duplicates==="combine"?m[I]=r.combine(m[I],M):(!q||p.duplicates==="last")&&(m[I]=M)}return m},h=function(y,f,p,m){for(var b=m?f:a(f,p),w=y.length-1;w>=0;--w){var x,E=y[w];if(E==="[]"&&p.parseArrays)x=p.allowEmptyArrays&&b===""?[]:[].concat(b);else{x=p.plainObjects?Object.create(null):{};var S=E.charAt(0)==="["&&E.charAt(E.length-1)==="]"?E.slice(1,-1):E,C=p.decodeDotInKeys?S.replace(/%2E/g,"."):S,A=parseInt(C,10);!p.parseArrays&&C===""?x={0:b}:!isNaN(A)&&E!==C&&String(A)===C&&A>=0&&p.parseArrays&&A<=p.arrayLimit?(x=[],x[A]=b):C!=="__proto__"&&(x[C]=b)}b=x}return b},d=function(f,p,m,b){if(f){var w=m.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,x=/(\[[^[\]]*])/,E=/(\[[^[\]]*])/g,S=m.depth>0&&x.exec(w),C=S?w.slice(0,S.index):w,A=[];if(C){if(!m.plainObjects&&n.call(Object.prototype,C)&&!m.allowPrototypes)return;A.push(C)}for(var $=0;m.depth>0&&(S=E.exec(w))!==null&&$"u"?s.charset:f.charset,m=typeof f.duplicates>"u"?s.duplicates:f.duplicates;if(m!=="combine"&&m!=="first"&&m!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var b=typeof f.allowDots>"u"?f.decodeDotInKeys===!0?!0:s.allowDots:!!f.allowDots;return{allowDots:b,allowEmptyArrays:typeof f.allowEmptyArrays=="boolean"?!!f.allowEmptyArrays:s.allowEmptyArrays,allowPrototypes:typeof f.allowPrototypes=="boolean"?f.allowPrototypes:s.allowPrototypes,allowSparse:typeof f.allowSparse=="boolean"?f.allowSparse:s.allowSparse,arrayLimit:typeof f.arrayLimit=="number"?f.arrayLimit:s.arrayLimit,charset:p,charsetSentinel:typeof f.charsetSentinel=="boolean"?f.charsetSentinel:s.charsetSentinel,comma:typeof f.comma=="boolean"?f.comma:s.comma,decodeDotInKeys:typeof f.decodeDotInKeys=="boolean"?f.decodeDotInKeys:s.decodeDotInKeys,decoder:typeof f.decoder=="function"?f.decoder:s.decoder,delimiter:typeof f.delimiter=="string"||r.isRegExp(f.delimiter)?f.delimiter:s.delimiter,depth:typeof f.depth=="number"||f.depth===!1?+f.depth:s.depth,duplicates:m,ignoreQueryPrefix:f.ignoreQueryPrefix===!0,interpretNumericEntities:typeof f.interpretNumericEntities=="boolean"?f.interpretNumericEntities:s.interpretNumericEntities,parameterLimit:typeof f.parameterLimit=="number"?f.parameterLimit:s.parameterLimit,parseArrays:f.parseArrays!==!1,plainObjects:typeof f.plainObjects=="boolean"?f.plainObjects:s.plainObjects,strictNullHandling:typeof f.strictNullHandling=="boolean"?f.strictNullHandling:s.strictNullHandling}};t.exports=function(y,f){var p=g(f);if(y===""||y===null||typeof y>"u")return p.plainObjects?Object.create(null):{};for(var m=typeof y=="string"?u(y,p):y,b=p.plainObjects?Object.create(null):{},w=Object.keys(m),x=0;x",'"',"`"," ","\r",` `," "],a=["{","}","|","\\","^","`"].concat(o),l=["'"].concat(a),c=["%","/","?",";","#"].concat(l),u=["/","?","#"],h=255,d=/^[+a-z0-9A-Z_-]{0,63}$/,g=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,y={javascript:!0,"javascript:":!0},f={javascript:!0,"javascript:":!0},p={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=cZ();function b(S,C,A){if(S&&typeof S=="object"&&S instanceof r)return S;var $=new r;return $.parse(S,C,A),$}r.prototype.parse=function(S,C,A){if(typeof S!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof S);var $=S.indexOf("?"),O=$!==-1&&$127?et+="x":et+=nt[it];if(!et.match(d)){var ht=V.slice(0,N),pt=V.slice(N+1),vt=nt.match(g);vt&&(ht.push(vt[1]),pt.unshift(vt[2])),pt.length&&(q="/"+pt.join(".")+q),this.hostname=ht.join(".");break}}}this.hostname.length>h?this.hostname="":this.hostname=this.hostname.toLowerCase(),z||(this.hostname=t.toASCII(this.hostname));var Ct=this.port?":"+this.port:"",Dt=this.hostname||"";this.host=Dt+Ct,this.href+=this.host,z&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),q[0]!=="/"&&(q="/"+q))}if(!y[Y])for(var N=0,Z=l.length;N0?A.host.split("@"):!1;et&&(A.auth=et.shift(),A.hostname=et.shift(),A.host=A.hostname)}return A.search=S.search,A.query=S.query,(A.pathname!==null||A.search!==null)&&(A.path=(A.pathname?A.pathname:"")+(A.search?A.search:"")),A.href=A.format(),A}if(!V.length)return A.pathname=null,A.search?A.path="/"+A.search:A.path=null,A.href=A.format(),A;for(var it=V.slice(-1)[0],lt=(A.host||S.host||V.length>1)&&(it==="."||it==="..")||it==="",ht=0,pt=V.length;pt>=0;pt--)it=V[pt],it==="."?V.splice(pt,1):it===".."?(V.splice(pt,1),ht++):ht&&(V.splice(pt,1),ht--);if(!W&&!z)for(;ht--;ht)V.unshift("..");W&&V[0]!==""&&(!V[0]||V[0].charAt(0)!=="/")&&V.unshift(""),lt&&V.join("/").substr(-1)!=="/"&&V.push("");var vt=V[0]===""||V[0]&&V[0].charAt(0)==="/";if(nt){A.hostname=vt?"":V.length?V.shift():"",A.host=A.hostname;var et=A.host&&A.host.indexOf("@")>0?A.host.split("@"):!1;et&&(A.auth=et.shift(),A.hostname=et.shift(),A.host=A.hostname)}return W=W||A.host&&V.length,W&&!vt&&V.unshift(""),V.length>0?A.pathname=V.join("/"):(A.pathname=null,A.path=null),(A.pathname!==null||A.search!==null)&&(A.path=(A.pathname?A.pathname:"")+(A.search?A.search:"")),A.auth=S.auth||A.auth,A.slashes=A.slashes||S.slashes,A.href=A.format(),A},r.prototype.parseHost=function(){var S=this.host,C=i.exec(S);C&&(C=C[0],C!==":"&&(this.port=C.substr(1)),S=S.substr(0,S.length-C.length)),S&&(this.hostname=S)},e.parse=b,e.resolve=x,e.resolveObject=E,e.format=w,e.Url=r}}),uZ=ge({"node_modules/path/node_modules/util/support/isBufferBrowser.js"(e,t){t.exports=function(n){return n&&typeof n=="object"&&typeof n.copy=="function"&&typeof n.fill=="function"&&typeof n.readUInt8=="function"}}}),hZ=ge({"node_modules/path/node_modules/inherits/inherits_browser.js"(e,t){typeof Object.create=="function"?t.exports=function(n,i){n.super_=i,n.prototype=Object.create(i.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(n,i){n.super_=i;var s=function(){};s.prototype=i.prototype,n.prototype=new s,n.prototype.constructor=n}}}),fZ=ge({"node_modules/path/node_modules/util/util.js"(e){var t=/%[sdj%]/g;e.format=function(F){if(!w(F)){for(var T=[],N=0;N=J)return V;switch(V){case"%s":return String(U[N++]);case"%d":return Number(U[N++]);case"%j":try{return JSON.stringify(U[N++])}catch{return"[Circular]"}default:return V}}),z=U[N];N=3&&(N.depth=arguments[2]),arguments.length>=4&&(N.colors=arguments[3]),f(T)?N.showHidden=T:T&&e._extend(N,T),E(N.showHidden)&&(N.showHidden=!1),E(N.depth)&&(N.depth=2),E(N.colors)&&(N.colors=!1),E(N.customInspect)&&(N.customInspect=!0),N.colors&&(N.stylize=s),l(N,F,N.depth)}e.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function s(F,T){var N=i.styles[T];return N?"\x1B["+i.colors[N][0]+"m"+F+"\x1B["+i.colors[N][1]+"m":F}function o(F,T){return F}function a(F){var T={};return F.forEach(function(N,U){T[N]=!0}),T}function l(F,T,N){if(F.customInspect&&T&&O(T.inspect)&&T.inspect!==e.inspect&&!(T.constructor&&T.constructor.prototype===T)){var U=T.inspect(N,F);return w(U)||(U=l(F,U,N)),U}var J=c(F,T);if(J)return J;var W=Object.keys(T),z=a(W);if(F.showHidden&&(W=Object.getOwnPropertyNames(T)),$(T)&&(W.indexOf("message")>=0||W.indexOf("description")>=0))return u(T);if(W.length===0){if(O(T)){var V=T.name?": "+T.name:"";return F.stylize("[Function"+V+"]","special")}if(S(T))return F.stylize(RegExp.prototype.toString.call(T),"regexp");if(A(T))return F.stylize(Date.prototype.toString.call(T),"date");if($(T))return u(T)}var Z="",nt=!1,et=["{","}"];if(y(T)&&(nt=!0,et=["[","]"]),O(T)){var it=T.name?": "+T.name:"";Z=" [Function"+it+"]"}if(S(T)&&(Z=" "+RegExp.prototype.toString.call(T)),A(T)&&(Z=" "+Date.prototype.toUTCString.call(T)),$(T)&&(Z=" "+u(T)),W.length===0&&(!nt||T.length==0))return et[0]+Z+et[1];if(N<0)return S(T)?F.stylize(RegExp.prototype.toString.call(T),"regexp"):F.stylize("[Object]","special");F.seen.push(T);var lt;return nt?lt=h(F,T,N,z,W):lt=W.map(function(ht){return d(F,T,N,z,ht,nt)}),F.seen.pop(),g(lt,Z,et)}function c(F,T){if(E(T))return F.stylize("undefined","undefined");if(w(T)){var N="'"+JSON.stringify(T).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return F.stylize(N,"string")}if(b(T))return F.stylize(""+T,"number");if(f(T))return F.stylize(""+T,"boolean");if(p(T))return F.stylize("null","null")}function u(F){return"["+Error.prototype.toString.call(F)+"]"}function h(F,T,N,U,J){for(var W=[],z=0,V=T.length;z-1&&(W?V=V.split(` `).map(function(nt){return" "+nt}).join(` `).substr(2):V=` `+V.split(` `).map(function(nt){return" "+nt}).join(` `))):V=F.stylize("[Circular]","special")),E(z)){if(W&&J.match(/^\d+$/))return V;z=JSON.stringify(""+J),z.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(z=z.substr(1,z.length-2),z=F.stylize(z,"name")):(z=z.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),z=F.stylize(z,"string"))}return z+": "+V}function g(F,T,N){var U=F.reduce(function(J,W){return W.indexOf(` `)>=0,J+W.replace(/\u001b\[\d\d?m/g,"").length+1},0);return U>60?N[0]+(T===""?"":T+` `)+" "+F.join(`, `)+" "+N[1]:N[0]+T+" "+F.join(", ")+" "+N[1]}function y(F){return Array.isArray(F)}e.isArray=y;function f(F){return typeof F=="boolean"}e.isBoolean=f;function p(F){return F===null}e.isNull=p;function m(F){return F==null}e.isNullOrUndefined=m;function b(F){return typeof F=="number"}e.isNumber=b;function w(F){return typeof F=="string"}e.isString=w;function x(F){return typeof F=="symbol"}e.isSymbol=x;function E(F){return F===void 0}e.isUndefined=E;function S(F){return C(F)&&M(F)==="[object RegExp]"}e.isRegExp=S;function C(F){return typeof F=="object"&&F!==null}e.isObject=C;function A(F){return C(F)&&M(F)==="[object Date]"}e.isDate=A;function $(F){return C(F)&&(M(F)==="[object Error]"||F instanceof Error)}e.isError=$;function O(F){return typeof F=="function"}e.isFunction=O;function I(F){return F===null||typeof F=="boolean"||typeof F=="number"||typeof F=="string"||typeof F=="symbol"||typeof F>"u"}e.isPrimitive=I,e.isBuffer=uZ();function M(F){return Object.prototype.toString.call(F)}function q(F){return F<10?"0"+F.toString(10):F.toString(10)}var H=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function G(){var F=new Date,T=[q(F.getHours()),q(F.getMinutes()),q(F.getSeconds())].join(":");return[F.getDate(),H[F.getMonth()],T].join(" ")}e.log=function(){console.log("%s - %s",G(),e.format.apply(e,arguments))},e.inherits=hZ(),e._extend=function(F,T){if(!T||!C(T))return F;for(var N=Object.keys(T),U=N.length;U--;)F[N[U]]=T[N[U]];return F};function Y(F,T){return Object.prototype.hasOwnProperty.call(F,T)}}}),dZ=ge({"node_modules/path/path.js"(e,t){var r=process.platform==="win32",n=fZ();function i(f,p){for(var m=[],b=0;b=0&&!f[b];b--);return m===0&&b===p?f:m>b?[]:f.slice(m,b+1)}var o=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,a=/^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/,l={};function c(f){var p=o.exec(f),m=(p[1]||"")+(p[2]||""),b=p[3]||"",w=a.exec(b),x=w[1],E=w[2],S=w[3];return[m,x,E,S]}function u(f){var p=o.exec(f),m=p[1]||"",b=!!m&&m[1]!==":";return{device:m,isUnc:b,isAbsolute:b||!!p[2],tail:p[3]}}function h(f){return"\\\\"+f.replace(/^[\\\/]+/,"").replace(/[\\\/]+/g,"\\")}l.resolve=function(){for(var f="",p="",m=!1,b=arguments.length-1;b>=-1;b--){var w;if(b>=0?w=arguments[b]:f?(w=Uh["="+f],(!w||w.substr(0,3).toLowerCase()!==f.toLowerCase()+"\\")&&(w=f+"\\")):w=process.cwd(),n.isString(w)){if(!w)continue}else throw new TypeError("Arguments to path.resolve must be strings");var x=u(w),E=x.device,S=x.isUnc,C=x.isAbsolute,A=x.tail;if(!(E&&f&&E.toLowerCase()!==f.toLowerCase())&&(f||(f=E),m||(p=A+"\\"+p,m=C),f&&m))break}return S&&(f=h(f)),p=i(p.split(/[\\\/]+/),!m).join("\\"),f+(m?"\\":"")+p||"."},l.normalize=function(f){var p=u(f),m=p.device,b=p.isUnc,w=p.isAbsolute,x=p.tail,E=/[\\\/]$/.test(x);return x=i(x.split(/[\\\/]+/),!w).join("\\"),!x&&!w&&(x="."),x&&E&&(x+="\\"),b&&(m=h(m)),m+(w?"\\":"")+x},l.isAbsolute=function(f){return u(f).isAbsolute},l.join=function(){for(var f=[],p=0;p=-1&&!p;m--){var b=m>=0?arguments[m]:process.cwd();if(n.isString(b)){if(!b)continue}else throw new TypeError("Arguments to path.resolve must be strings");f=b+"/"+f,p=b[0]==="/"}return f=i(f.split("/"),!p).join("/"),(p?"/":"")+f||"."},g.normalize=function(f){var p=g.isAbsolute(f),m=f&&f[f.length-1]==="/";return f=i(f.split("/"),!p).join("/"),!f&&!p&&(f="."),f&&m&&(f+="/"),(p?"/":"")+f},g.isAbsolute=function(f){return f.charAt(0)==="/"},g.join=function(){for(var f="",p=0;p0&&(M=A[0]),M instanceof Error)throw M;var q=new Error("Unhandled error."+(M?" ("+M.message+")":""));throw q.context=M,q}var H=I[C];if(H===void 0)return!1;if(typeof H=="function")n(H,this,A);else for(var G=H.length,Y=p(H,G),$=0;$0&&M.length>O&&!M.warned){M.warned=!0;var q=new Error("Possible EventEmitter memory leak detected. "+M.length+" "+String(C)+" listeners added. Use emitter.setMaxListeners() to increase limit");q.name="MaxListenersExceededWarning",q.emitter=S,q.type=C,q.count=M.length,s(q)}return S}a.prototype.addListener=function(C,A){return h(this,C,A,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(C,A){return h(this,C,A,!0)};function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function g(S,C,A){var $={fired:!1,wrapFn:void 0,target:S,type:C,listener:A},O=d.bind($);return O.listener=A,$.wrapFn=O,O}a.prototype.once=function(C,A){return c(A),this.on(C,g(this,C,A)),this},a.prototype.prependOnceListener=function(C,A){return c(A),this.prependListener(C,g(this,C,A)),this},a.prototype.removeListener=function(C,A){var $,O,I,M,q;if(c(A),O=this._events,O===void 0)return this;if($=O[C],$===void 0)return this;if($===A||$.listener===A)--this._eventsCount===0?this._events=Object.create(null):(delete O[C],O.removeListener&&this.emit("removeListener",C,$.listener||A));else if(typeof $!="function"){for(I=-1,M=$.length-1;M>=0;M--)if($[M]===A||$[M].listener===A){q=$[M].listener,I=M;break}if(I<0)return this;I===0?$.shift():m($,I),$.length===1&&(O[C]=$[0]),O.removeListener!==void 0&&this.emit("removeListener",C,q||A)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(C){var A,$,O;if($=this._events,$===void 0)return this;if($.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):$[C]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete $[C]),this;if(arguments.length===0){var I=Object.keys($),M;for(O=0;O=0;O--)this.removeListener(C,A[O]);return this};function y(S,C,A){var $=S._events;if($===void 0)return[];var O=$[C];return O===void 0?[]:typeof O=="function"?A?[O.listener||O]:[O]:A?b(O):p(O,O.length)}a.prototype.listeners=function(C){return y(this,C,!0)},a.prototype.rawListeners=function(C){return y(this,C,!1)},a.listenerCount=function(S,C){return typeof S.listenerCount=="function"?S.listenerCount(C):f.call(S,C)},a.prototype.listenerCount=f;function f(S){var C=this._events;if(C!==void 0){var A=C[S];if(typeof A=="function")return 1;if(A!==void 0)return A.length}return 0}a.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]};function p(S,C){for(var A=new Array(C),$=0;${this.off(i,o),s.apply(this,a)};return o.fn=s,this.on(i,o),this},r.prototype.off=function(i,s){if(i===void 0&&s===void 0)return this._callbacks.clear(),this;if(s===void 0)return this._callbacks.delete(i),this;const o=this._callbacks.get(i);if(o){for(const[a,l]of o.entries())if(l===s||l.fn===s){o.splice(a,1);break}o.length===0?this._callbacks.delete(i):this._callbacks.set(i,o)}return this},r.prototype.emit=function(i,...s){const o=this._callbacks.get(i);if(o){const a=[...o];for(const l of a)l.apply(this,s)}return this},r.prototype.listeners=function(i){return this._callbacks.get(i)??[]},r.prototype.listenerCount=function(i){if(i)return this.listeners(i).length;let s=0;for(const o of this._callbacks.values())s+=o.length;return s},r.prototype.hasListeners=function(i){return this.listenerCount(i)>0},r.prototype.addEventListener=r.prototype.on,r.prototype.removeListener=r.prototype.off,r.prototype.removeEventListener=r.prototype.off,r.prototype.removeAllListeners=r.prototype.off,typeof t<"u"&&(t.exports=r)}}),gZ=ge({"node_modules/stream/index.js"(e,t){var r=mZ();function n(){r.call(this)}n.prototype=new r,t.exports=n,n.Stream=n,n.prototype.pipe=function(i,s){var o=this;function a(y){i.writable&&i.write(y)===!1&&o.pause&&o.pause()}o.on("data",a);function l(){o.readable&&o.resume&&o.resume()}i.on("drain",l),!i._isStdio&&(!s||s.end!==!1)&&(o.on("end",u),o.on("close",h));var c=!1;function u(){c||(c=!0,i.end())}function h(){c||(c=!0,typeof i.destroy=="function"&&i.destroy())}function d(y){if(g(),!this.hasListeners("error"))throw y}o.on("error",d),i.on("error",d);function g(){o.off("data",a),i.off("drain",l),o.off("end",u),o.off("close",h),o.off("error",d),i.off("error",d),o.off("end",g),o.off("close",g),i.off("end",g),i.off("close",g)}return o.on("end",g),o.on("close",g),i.on("end",g),i.on("close",g),i.emit("pipe",o),i}}}),yZ=ge({"node_modules/base64-js/index.js"(e){e.byteLength=l,e.toByteArray=u,e.fromByteArray=g;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(s=0,o=i.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var p=y.indexOf("=");p===-1&&(p=f);var m=p===f?0:4-p%4;return[p,m]}function l(y){var f=a(y),p=f[0],m=f[1];return(p+m)*3/4-m}function c(y,f,p){return(f+p)*3/4-p}function u(y){var f,p=a(y),m=p[0],b=p[1],w=new n(c(y,m,b)),x=0,E=b>0?m-4:m,S;for(S=0;S>16&255,w[x++]=f>>8&255,w[x++]=f&255;return b===2&&(f=r[y.charCodeAt(S)]<<2|r[y.charCodeAt(S+1)]>>4,w[x++]=f&255),b===1&&(f=r[y.charCodeAt(S)]<<10|r[y.charCodeAt(S+1)]<<4|r[y.charCodeAt(S+2)]>>2,w[x++]=f>>8&255,w[x++]=f&255),w}function h(y){return t[y>>18&63]+t[y>>12&63]+t[y>>6&63]+t[y&63]}function d(y,f,p){for(var m,b=[],w=f;wE?E:x+w));return m===1?(f=y[p-1],b.push(t[f>>2]+t[f<<4&63]+"==")):m===2&&(f=(y[p-2]<<8)+y[p-1],b.push(t[f>>10]+t[f>>4&63]+t[f<<2&63]+"=")),b.join("")}}}),bZ=ge({"node_modules/ieee754/index.js"(e){e.read=function(t,r,n,i,s){var o,a,l=s*8-i-1,c=(1<>1,h=-7,d=n?s-1:0,g=n?-1:1,y=t[r+d];for(d+=g,o=y&(1<<-h)-1,y>>=-h,h+=l;h>0;o=o*256+t[r+d],d+=g,h-=8);for(a=o&(1<<-h)-1,o>>=-h,h+=i;h>0;a=a*256+t[r+d],d+=g,h-=8);if(o===0)o=1-u;else{if(o===c)return a?NaN:(y?-1:1)*(1/0);a=a+Math.pow(2,i),o=o-u}return(y?-1:1)*a*Math.pow(2,o-i)},e.write=function(t,r,n,i,s,o){var a,l,c,u=o*8-s-1,h=(1<>1,g=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=i?0:o-1,f=i?1:-1,p=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(c=Math.pow(2,-a))<1&&(a--,c*=2),a+d>=1?r+=g/c:r+=g*Math.pow(2,1-d),r*c>=2&&(a++,c/=2),a+d>=h?(l=0,a=h):a+d>=1?(l=(r*c-1)*Math.pow(2,s),a=a+d):(l=r*Math.pow(2,d-1)*Math.pow(2,s),a=0));s>=8;t[n+y]=l&255,y+=f,l/=256,s-=8);for(a=a<0;t[n+y]=a&255,y+=f,a/=256,u-=8);t[n+y-f]|=p*128}}}),vZ=ge({"node_modules/buffer/index.js"(e){var t=yZ(),r=bZ(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=b,e.INSPECT_MAX_BYTES=50;var i=2147483647;e.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=s(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function s(){try{const k=new Uint8Array(1),v={foo:function(){return 42}};return Object.setPrototypeOf(v,Uint8Array.prototype),Object.setPrototypeOf(k,v),k.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function o(k){if(k>i)throw new RangeError('The value "'+k+'" is invalid for option "size"');const v=new Uint8Array(k);return Object.setPrototypeOf(v,a.prototype),v}function a(k,v,_){if(typeof k=="number"){if(typeof v=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return h(k)}return l(k,v,_)}a.poolSize=8192;function l(k,v,_){if(typeof k=="string")return d(k,v);if(ArrayBuffer.isView(k))return y(k);if(k==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k);if(re(k,ArrayBuffer)||k&&re(k.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(re(k,SharedArrayBuffer)||k&&re(k.buffer,SharedArrayBuffer)))return f(k,v,_);if(typeof k=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const B=k.valueOf&&k.valueOf();if(B!=null&&B!==k)return a.from(B,v,_);const K=p(k);if(K)return K;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof k[Symbol.toPrimitive]=="function")return a.from(k[Symbol.toPrimitive]("string"),v,_);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k)}a.from=function(k,v,_){return l(k,v,_)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function c(k){if(typeof k!="number")throw new TypeError('"size" argument must be of type number');if(k<0)throw new RangeError('The value "'+k+'" is invalid for option "size"')}function u(k,v,_){return c(k),k<=0?o(k):v!==void 0?typeof _=="string"?o(k).fill(v,_):o(k).fill(v):o(k)}a.alloc=function(k,v,_){return u(k,v,_)};function h(k){return c(k),o(k<0?0:m(k)|0)}a.allocUnsafe=function(k){return h(k)},a.allocUnsafeSlow=function(k){return h(k)};function d(k,v){if((typeof v!="string"||v==="")&&(v="utf8"),!a.isEncoding(v))throw new TypeError("Unknown encoding: "+v);const _=w(k,v)|0;let B=o(_);const K=B.write(k,v);return K!==_&&(B=B.slice(0,K)),B}function g(k){const v=k.length<0?0:m(k.length)|0,_=o(v);for(let B=0;B=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return k|0}function b(k){return+k!=k&&(k=0),a.alloc(+k)}a.isBuffer=function(v){return v!=null&&v._isBuffer===!0&&v!==a.prototype},a.compare=function(v,_){if(re(v,Uint8Array)&&(v=a.from(v,v.offset,v.byteLength)),re(_,Uint8Array)&&(_=a.from(_,_.offset,_.byteLength)),!a.isBuffer(v)||!a.isBuffer(_))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(v===_)return 0;let B=v.length,K=_.length;for(let tt=0,ot=Math.min(B,K);ttK.length?(a.isBuffer(ot)||(ot=a.from(ot)),ot.copy(K,tt)):Uint8Array.prototype.set.call(K,ot,tt);else if(a.isBuffer(ot))ot.copy(K,tt);else throw new TypeError('"list" argument must be an Array of Buffers');tt+=ot.length}return K};function w(k,v){if(a.isBuffer(k))return k.length;if(ArrayBuffer.isView(k)||re(k,ArrayBuffer))return k.byteLength;if(typeof k!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof k);const _=k.length,B=arguments.length>2&&arguments[2]===!0;if(!B&&_===0)return 0;let K=!1;for(;;)switch(v){case"ascii":case"latin1":case"binary":return _;case"utf8":case"utf-8":return Tt(k).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _*2;case"hex":return _>>>1;case"base64":return Kt(k).length;default:if(K)return B?-1:Tt(k).length;v=(""+v).toLowerCase(),K=!0}}a.byteLength=w;function x(k,v,_){let B=!1;if((v===void 0||v<0)&&(v=0),v>this.length||((_===void 0||_>this.length)&&(_=this.length),_<=0)||(_>>>=0,v>>>=0,_<=v))return"";for(k||(k="utf8");;)switch(k){case"hex":return N(this,v,_);case"utf8":case"utf-8":return H(this,v,_);case"ascii":return F(this,v,_);case"latin1":case"binary":return T(this,v,_);case"base64":return q(this,v,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,v,_);default:if(B)throw new TypeError("Unknown encoding: "+k);k=(k+"").toLowerCase(),B=!0}}a.prototype._isBuffer=!0;function E(k,v,_){const B=k[v];k[v]=k[_],k[_]=B}a.prototype.swap16=function(){const v=this.length;if(v%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let _=0;__&&(v+=" ... "),""},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(v,_,B,K,tt){if(re(v,Uint8Array)&&(v=a.from(v,v.offset,v.byteLength)),!a.isBuffer(v))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof v);if(_===void 0&&(_=0),B===void 0&&(B=v?v.length:0),K===void 0&&(K=0),tt===void 0&&(tt=this.length),_<0||B>v.length||K<0||tt>this.length)throw new RangeError("out of range index");if(K>=tt&&_>=B)return 0;if(K>=tt)return-1;if(_>=B)return 1;if(_>>>=0,B>>>=0,K>>>=0,tt>>>=0,this===v)return 0;let ot=tt-K,rt=B-_;const D=Math.min(ot,rt),P=this.slice(K,tt),j=v.slice(_,B);for(let X=0;X2147483647?_=2147483647:_<-2147483648&&(_=-2147483648),_=+_,Me(_)&&(_=K?0:k.length-1),_<0&&(_=k.length+_),_>=k.length){if(K)return-1;_=k.length-1}else if(_<0)if(K)_=0;else return-1;if(typeof v=="string"&&(v=a.from(v,B)),a.isBuffer(v))return v.length===0?-1:C(k,v,_,B,K);if(typeof v=="number")return v=v&255,typeof Uint8Array.prototype.indexOf=="function"?K?Uint8Array.prototype.indexOf.call(k,v,_):Uint8Array.prototype.lastIndexOf.call(k,v,_):C(k,[v],_,B,K);throw new TypeError("val must be string, number or Buffer")}function C(k,v,_,B,K){let tt=1,ot=k.length,rt=v.length;if(B!==void 0&&(B=String(B).toLowerCase(),B==="ucs2"||B==="ucs-2"||B==="utf16le"||B==="utf-16le")){if(k.length<2||v.length<2)return-1;tt=2,ot/=2,rt/=2,_/=2}function D(j,X){return tt===1?j[X]:j.readUInt16BE(X*tt)}let P;if(K){let j=-1;for(P=_;Pot&&(_=ot-rt),P=_;P>=0;P--){let j=!0;for(let X=0;XK&&(B=K)):B=K;const tt=v.length;B>tt/2&&(B=tt/2);let ot;for(ot=0;ot>>0,isFinite(B)?(B=B>>>0,K===void 0&&(K="utf8")):(K=B,B=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const tt=this.length-_;if((B===void 0||B>tt)&&(B=tt),v.length>0&&(B<0||_<0)||_>this.length)throw new RangeError("Attempt to write outside buffer bounds");K||(K="utf8");let ot=!1;for(;;)switch(K){case"hex":return A(this,v,_,B);case"utf8":case"utf-8":return $(this,v,_,B);case"ascii":case"latin1":case"binary":return O(this,v,_,B);case"base64":return I(this,v,_,B);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,v,_,B);default:if(ot)throw new TypeError("Unknown encoding: "+K);K=(""+K).toLowerCase(),ot=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function q(k,v,_){return v===0&&_===k.length?t.fromByteArray(k):t.fromByteArray(k.slice(v,_))}function H(k,v,_){_=Math.min(k.length,_);const B=[];let K=v;for(;K<_;){const tt=k[K];let ot=null,rt=tt>239?4:tt>223?3:tt>191?2:1;if(K+rt<=_){let D,P,j,X;switch(rt){case 1:tt<128&&(ot=tt);break;case 2:D=k[K+1],(D&192)===128&&(X=(tt&31)<<6|D&63,X>127&&(ot=X));break;case 3:D=k[K+1],P=k[K+2],(D&192)===128&&(P&192)===128&&(X=(tt&15)<<12|(D&63)<<6|P&63,X>2047&&(X<55296||X>57343)&&(ot=X));break;case 4:D=k[K+1],P=k[K+2],j=k[K+3],(D&192)===128&&(P&192)===128&&(j&192)===128&&(X=(tt&15)<<18|(D&63)<<12|(P&63)<<6|j&63,X>65535&&X<1114112&&(ot=X))}}ot===null?(ot=65533,rt=1):ot>65535&&(ot-=65536,B.push(ot>>>10&1023|55296),ot=56320|ot&1023),B.push(ot),K+=rt}return Y(B)}var G=4096;function Y(k){const v=k.length;if(v<=G)return String.fromCharCode.apply(String,k);let _="",B=0;for(;BB)&&(_=B);let K="";for(let tt=v;tt<_;++tt)K+=ut[k[tt]];return K}function U(k,v,_){const B=k.slice(v,_);let K="";for(let tt=0;ttB&&(v=B),_<0?(_+=B,_<0&&(_=0)):_>B&&(_=B),__)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(v,_,B){v=v>>>0,_=_>>>0,B||J(v,_,this.length);let K=this[v],tt=1,ot=0;for(;++ot<_&&(tt*=256);)K+=this[v+ot]*tt;return K},a.prototype.readUintBE=a.prototype.readUIntBE=function(v,_,B){v=v>>>0,_=_>>>0,B||J(v,_,this.length);let K=this[v+--_],tt=1;for(;_>0&&(tt*=256);)K+=this[v+--_]*tt;return K},a.prototype.readUint8=a.prototype.readUInt8=function(v,_){return v=v>>>0,_||J(v,1,this.length),this[v]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(v,_){return v=v>>>0,_||J(v,2,this.length),this[v]|this[v+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(v,_){return v=v>>>0,_||J(v,2,this.length),this[v]<<8|this[v+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(v,_){return v=v>>>0,_||J(v,4,this.length),(this[v]|this[v+1]<<8|this[v+2]<<16)+this[v+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(v,_){return v=v>>>0,_||J(v,4,this.length),this[v]*16777216+(this[v+1]<<16|this[v+2]<<8|this[v+3])},a.prototype.readBigUInt64LE=dt(function(v){v=v>>>0,Ct(v,"offset");const _=this[v],B=this[v+7];(_===void 0||B===void 0)&&Dt(v,this.length-8);const K=_+this[++v]*2**8+this[++v]*2**16+this[++v]*2**24,tt=this[++v]+this[++v]*2**8+this[++v]*2**16+B*2**24;return BigInt(K)+(BigInt(tt)<>>0,Ct(v,"offset");const _=this[v],B=this[v+7];(_===void 0||B===void 0)&&Dt(v,this.length-8);const K=_*2**24+this[++v]*2**16+this[++v]*2**8+this[++v],tt=this[++v]*2**24+this[++v]*2**16+this[++v]*2**8+B;return(BigInt(K)<>>0,_=_>>>0,B||J(v,_,this.length);let K=this[v],tt=1,ot=0;for(;++ot<_&&(tt*=256);)K+=this[v+ot]*tt;return tt*=128,K>=tt&&(K-=Math.pow(2,8*_)),K},a.prototype.readIntBE=function(v,_,B){v=v>>>0,_=_>>>0,B||J(v,_,this.length);let K=_,tt=1,ot=this[v+--K];for(;K>0&&(tt*=256);)ot+=this[v+--K]*tt;return tt*=128,ot>=tt&&(ot-=Math.pow(2,8*_)),ot},a.prototype.readInt8=function(v,_){return v=v>>>0,_||J(v,1,this.length),this[v]&128?(255-this[v]+1)*-1:this[v]},a.prototype.readInt16LE=function(v,_){v=v>>>0,_||J(v,2,this.length);const B=this[v]|this[v+1]<<8;return B&32768?B|4294901760:B},a.prototype.readInt16BE=function(v,_){v=v>>>0,_||J(v,2,this.length);const B=this[v+1]|this[v]<<8;return B&32768?B|4294901760:B},a.prototype.readInt32LE=function(v,_){return v=v>>>0,_||J(v,4,this.length),this[v]|this[v+1]<<8|this[v+2]<<16|this[v+3]<<24},a.prototype.readInt32BE=function(v,_){return v=v>>>0,_||J(v,4,this.length),this[v]<<24|this[v+1]<<16|this[v+2]<<8|this[v+3]},a.prototype.readBigInt64LE=dt(function(v){v=v>>>0,Ct(v,"offset");const _=this[v],B=this[v+7];(_===void 0||B===void 0)&&Dt(v,this.length-8);const K=this[v+4]+this[v+5]*2**8+this[v+6]*2**16+(B<<24);return(BigInt(K)<>>0,Ct(v,"offset");const _=this[v],B=this[v+7];(_===void 0||B===void 0)&&Dt(v,this.length-8);const K=(_<<24)+this[++v]*2**16+this[++v]*2**8+this[++v];return(BigInt(K)<>>0,_||J(v,4,this.length),r.read(this,v,!0,23,4)},a.prototype.readFloatBE=function(v,_){return v=v>>>0,_||J(v,4,this.length),r.read(this,v,!1,23,4)},a.prototype.readDoubleLE=function(v,_){return v=v>>>0,_||J(v,8,this.length),r.read(this,v,!0,52,8)},a.prototype.readDoubleBE=function(v,_){return v=v>>>0,_||J(v,8,this.length),r.read(this,v,!1,52,8)};function W(k,v,_,B,K,tt){if(!a.isBuffer(k))throw new TypeError('"buffer" argument must be a Buffer instance');if(v>K||vk.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(v,_,B,K){if(v=+v,_=_>>>0,B=B>>>0,!K){const rt=Math.pow(2,8*B)-1;W(this,v,_,B,rt,0)}let tt=1,ot=0;for(this[_]=v&255;++ot>>0,B=B>>>0,!K){const rt=Math.pow(2,8*B)-1;W(this,v,_,B,rt,0)}let tt=B-1,ot=1;for(this[_+tt]=v&255;--tt>=0&&(ot*=256);)this[_+tt]=v/ot&255;return _+B},a.prototype.writeUint8=a.prototype.writeUInt8=function(v,_,B){return v=+v,_=_>>>0,B||W(this,v,_,1,255,0),this[_]=v&255,_+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(v,_,B){return v=+v,_=_>>>0,B||W(this,v,_,2,65535,0),this[_]=v&255,this[_+1]=v>>>8,_+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(v,_,B){return v=+v,_=_>>>0,B||W(this,v,_,2,65535,0),this[_]=v>>>8,this[_+1]=v&255,_+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(v,_,B){return v=+v,_=_>>>0,B||W(this,v,_,4,4294967295,0),this[_+3]=v>>>24,this[_+2]=v>>>16,this[_+1]=v>>>8,this[_]=v&255,_+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(v,_,B){return v=+v,_=_>>>0,B||W(this,v,_,4,4294967295,0),this[_]=v>>>24,this[_+1]=v>>>16,this[_+2]=v>>>8,this[_+3]=v&255,_+4};function z(k,v,_,B,K){vt(v,B,K,k,_,7);let tt=Number(v&BigInt(4294967295));k[_++]=tt,tt=tt>>8,k[_++]=tt,tt=tt>>8,k[_++]=tt,tt=tt>>8,k[_++]=tt;let ot=Number(v>>BigInt(32)&BigInt(4294967295));return k[_++]=ot,ot=ot>>8,k[_++]=ot,ot=ot>>8,k[_++]=ot,ot=ot>>8,k[_++]=ot,_}function V(k,v,_,B,K){vt(v,B,K,k,_,7);let tt=Number(v&BigInt(4294967295));k[_+7]=tt,tt=tt>>8,k[_+6]=tt,tt=tt>>8,k[_+5]=tt,tt=tt>>8,k[_+4]=tt;let ot=Number(v>>BigInt(32)&BigInt(4294967295));return k[_+3]=ot,ot=ot>>8,k[_+2]=ot,ot=ot>>8,k[_+1]=ot,ot=ot>>8,k[_]=ot,_+8}a.prototype.writeBigUInt64LE=dt(function(v,_=0){return z(this,v,_,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=dt(function(v,_=0){return V(this,v,_,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(v,_,B,K){if(v=+v,_=_>>>0,!K){const D=Math.pow(2,8*B-1);W(this,v,_,B,D-1,-D)}let tt=0,ot=1,rt=0;for(this[_]=v&255;++tt>0)-rt&255;return _+B},a.prototype.writeIntBE=function(v,_,B,K){if(v=+v,_=_>>>0,!K){const D=Math.pow(2,8*B-1);W(this,v,_,B,D-1,-D)}let tt=B-1,ot=1,rt=0;for(this[_+tt]=v&255;--tt>=0&&(ot*=256);)v<0&&rt===0&&this[_+tt+1]!==0&&(rt=1),this[_+tt]=(v/ot>>0)-rt&255;return _+B},a.prototype.writeInt8=function(v,_,B){return v=+v,_=_>>>0,B||W(this,v,_,1,127,-128),v<0&&(v=255+v+1),this[_]=v&255,_+1},a.prototype.writeInt16LE=function(v,_,B){return v=+v,_=_>>>0,B||W(this,v,_,2,32767,-32768),this[_]=v&255,this[_+1]=v>>>8,_+2},a.prototype.writeInt16BE=function(v,_,B){return v=+v,_=_>>>0,B||W(this,v,_,2,32767,-32768),this[_]=v>>>8,this[_+1]=v&255,_+2},a.prototype.writeInt32LE=function(v,_,B){return v=+v,_=_>>>0,B||W(this,v,_,4,2147483647,-2147483648),this[_]=v&255,this[_+1]=v>>>8,this[_+2]=v>>>16,this[_+3]=v>>>24,_+4},a.prototype.writeInt32BE=function(v,_,B){return v=+v,_=_>>>0,B||W(this,v,_,4,2147483647,-2147483648),v<0&&(v=4294967295+v+1),this[_]=v>>>24,this[_+1]=v>>>16,this[_+2]=v>>>8,this[_+3]=v&255,_+4},a.prototype.writeBigInt64LE=dt(function(v,_=0){return z(this,v,_,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=dt(function(v,_=0){return V(this,v,_,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Z(k,v,_,B,K,tt){if(_+B>k.length)throw new RangeError("Index out of range");if(_<0)throw new RangeError("Index out of range")}function nt(k,v,_,B,K){return v=+v,_=_>>>0,K||Z(k,v,_,4),r.write(k,v,_,B,23,4),_+4}a.prototype.writeFloatLE=function(v,_,B){return nt(this,v,_,!0,B)},a.prototype.writeFloatBE=function(v,_,B){return nt(this,v,_,!1,B)};function et(k,v,_,B,K){return v=+v,_=_>>>0,K||Z(k,v,_,8),r.write(k,v,_,B,52,8),_+8}a.prototype.writeDoubleLE=function(v,_,B){return et(this,v,_,!0,B)},a.prototype.writeDoubleBE=function(v,_,B){return et(this,v,_,!1,B)},a.prototype.copy=function(v,_,B,K){if(!a.isBuffer(v))throw new TypeError("argument should be a Buffer");if(B||(B=0),!K&&K!==0&&(K=this.length),_>=v.length&&(_=v.length),_||(_=0),K>0&&K=this.length)throw new RangeError("Index out of range");if(K<0)throw new RangeError("sourceEnd out of bounds");K>this.length&&(K=this.length),v.length-_>>0,B=B===void 0?this.length:B>>>0,v||(v=0);let tt;if(typeof v=="number")for(tt=_;tt2**32?K=ht(String(_)):typeof _=="bigint"&&(K=String(_),(_>BigInt(2)**BigInt(32)||_<-(BigInt(2)**BigInt(32)))&&(K=ht(K)),K+="n"),B+=` It must be ${v}. Received ${K}`,B},RangeError);function ht(k){let v="",_=k.length;const B=k[0]==="-"?1:0;for(;_>=B+4;_-=3)v=`_${k.slice(_-3,_)}${v}`;return`${k.slice(0,_)}${v}`}function pt(k,v,_){Ct(v,"offset"),(k[v]===void 0||k[v+_]===void 0)&&Dt(v,k.length-(_+1))}function vt(k,v,_,B,K,tt){if(k>_||k= 0${ot} and < 2${ot} ** ${(tt+1)*8}${ot}`:rt=`>= -(2${ot} ** ${(tt+1)*8-1}${ot}) and < 2 ** ${(tt+1)*8-1}${ot}`,new it.ERR_OUT_OF_RANGE("value",rt,k)}pt(B,K,tt)}function Ct(k,v){if(typeof k!="number")throw new it.ERR_INVALID_ARG_TYPE(v,"number",k)}function Dt(k,v,_){throw Math.floor(k)!==k?(Ct(k,_),new it.ERR_OUT_OF_RANGE("offset","an integer",k)):v<0?new it.ERR_BUFFER_OUT_OF_BOUNDS:new it.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${v}`,k)}var Rt=/[^+/0-9A-Za-z-_]/g;function Ot(k){if(k=k.split("=")[0],k=k.trim().replace(Rt,""),k.length<2)return"";for(;k.length%4!==0;)k=k+"=";return k}function Tt(k,v){v=v||1/0;let _;const B=k.length;let K=null;const tt=[];for(let ot=0;ot55295&&_<57344){if(!K){if(_>56319){(v-=3)>-1&&tt.push(239,191,189);continue}else if(ot+1===B){(v-=3)>-1&&tt.push(239,191,189);continue}K=_;continue}if(_<56320){(v-=3)>-1&&tt.push(239,191,189),K=_;continue}_=(K-55296<<10|_-56320)+65536}else K&&(v-=3)>-1&&tt.push(239,191,189);if(K=null,_<128){if((v-=1)<0)break;tt.push(_)}else if(_<2048){if((v-=2)<0)break;tt.push(_>>6|192,_&63|128)}else if(_<65536){if((v-=3)<0)break;tt.push(_>>12|224,_>>6&63|128,_&63|128)}else if(_<1114112){if((v-=4)<0)break;tt.push(_>>18|240,_>>12&63|128,_>>6&63|128,_&63|128)}else throw new Error("Invalid code point")}return tt}function ve(k){const v=[];for(let _=0;_>8,K=_%256,tt.push(K),tt.push(B);return tt}function Kt(k){return t.toByteArray(Ot(k))}function Jt(k,v,_,B){let K;for(K=0;K=v.length||K>=k.length);++K)v[K+_]=k[K];return K}function re(k,v){return k instanceof v||k!=null&&k.constructor!=null&&k.constructor.name!=null&&k.constructor.name===v.name}function Me(k){return k!==k}var ut=function(){const k="0123456789abcdef",v=new Array(256);for(let _=0;_<16;++_){const B=_*16;for(let K=0;K<16;++K)v[B+K]=k[_]+k[K]}return v}();function dt(k){return typeof BigInt>"u"?kt:k}function kt(){throw new Error("BigInt not supported")}}}),wZ=ge({"node_modules/safe-buffer/index.js"(e,t){var r=vZ(),n=r.Buffer;function i(o,a){for(var l in o)a[l]=o[l]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(i(r,e),e.Buffer=s);function s(o,a,l){return n(o,a,l)}s.prototype=Object.create(n.prototype),i(n,s),s.from=function(o,a,l){if(typeof o=="number")throw new TypeError("Argument must not be a number");return n(o,a,l)},s.alloc=function(o,a,l){if(typeof o!="number")throw new TypeError("Argument must be a number");var c=n(o);return a!==void 0?typeof l=="string"?c.fill(a,l):c.fill(a):c.fill(0),c},s.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return n(o)},s.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(o)}}}),xZ=ge({"node_modules/string_decoder/lib/string_decoder.js"(e){var t=wZ().Buffer,r=t.isEncoding||function(b){switch(b=""+b,b&&b.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function n(b){if(!b)return"utf8";for(var w;;)switch(b){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return b;default:if(w)return;b=(""+b).toLowerCase(),w=!0}}function i(b){var w=n(b);if(typeof w!="string"&&(t.isEncoding===r||!r(b)))throw new Error("Unknown encoding: "+b);return w||b}e.StringDecoder=s;function s(b){this.encoding=i(b);var w;switch(this.encoding){case"utf16le":this.text=d,this.end=g,w=4;break;case"utf8":this.fillLast=c,w=4;break;case"base64":this.text=y,this.end=f,w=3;break;default:this.write=p,this.end=m;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(w)}s.prototype.write=function(b){if(b.length===0)return"";var w,x;if(this.lastNeed){if(w=this.fillLast(b),w===void 0)return"";x=this.lastNeed,this.lastNeed=0}else x=0;return x>5===6?2:b>>4===14?3:b>>3===30?4:b>>6===2?-1:-2}function a(b,w,x){var E=w.length-1;if(E=0?(S>0&&(b.lastNeed=S-1),S):--E=0?(S>0&&(b.lastNeed=S-2),S):--E=0?(S>0&&(S===2?S=0:b.lastNeed=S-3),S):0))}function l(b,w,x){if((w[0]&192)!==128)return b.lastNeed=0,"�";if(b.lastNeed>1&&w.length>1){if((w[1]&192)!==128)return b.lastNeed=1,"�";if(b.lastNeed>2&&w.length>2&&(w[2]&192)!==128)return b.lastNeed=2,"�"}}function c(b){var w=this.lastTotal-this.lastNeed,x=l(this,b);if(x!==void 0)return x;if(this.lastNeed<=b.length)return b.copy(this.lastChar,w,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);b.copy(this.lastChar,w,0,b.length),this.lastNeed-=b.length}function u(b,w){var x=a(this,b,w);if(!this.lastNeed)return b.toString("utf8",w);this.lastTotal=x;var E=b.length-(x-this.lastNeed);return b.copy(this.lastChar,0,E),b.toString("utf8",w,E)}function h(b){var w=b&&b.length?this.write(b):"";return this.lastNeed?w+"�":w}function d(b,w){if((b.length-w)%2===0){var x=b.toString("utf16le",w);if(x){var E=x.charCodeAt(x.length-1);if(E>=55296&&E<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=b[b.length-2],this.lastChar[1]=b[b.length-1],x.slice(0,-1)}return x}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=b[b.length-1],b.toString("utf16le",w,b.length-1)}function g(b){var w=b&&b.length?this.write(b):"";if(this.lastNeed){var x=this.lastTotal-this.lastNeed;return w+this.lastChar.toString("utf16le",0,x)}return w}function y(b,w){var x=(b.length-w)%3;return x===0?b.toString("base64",w):(this.lastNeed=3-x,this.lastTotal=3,x===1?this.lastChar[0]=b[b.length-1]:(this.lastChar[0]=b[b.length-2],this.lastChar[1]=b[b.length-1]),b.toString("base64",w,b.length-x))}function f(b){var w=b&&b.length?this.write(b):"";return this.lastNeed?w+this.lastChar.toString("base64",0,3-this.lastNeed):w}function p(b){return b.toString(this.encoding)}function m(b){return b&&b.length?this.write(b):""}}}),_Z=Il(zJ()),SZ=1024*64,Um=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>SZ)throw new TypeError("pattern is too long")},EZ={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},Zu=e=>e.replace(/[[\]\\-]/g,"\\$&"),CZ=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),xE=e=>e.join(""),AZ=(e,t)=>{const r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");const n=[],i=[];let s=r+1,o=!1,a=!1,l=!1,c=!1,u=r,h="";t:for(;sh?n.push(Zu(h)+"-"+Zu(f)):f===h&&n.push(Zu(f)),h="",s++;continue}if(e.startsWith("-]",s+1)){n.push(Zu(f+"-")),s+=2;continue}if(e.startsWith("-",s+1)){h=f,s+=2;continue}n.push(Zu(f)),s++}if(ut?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),kZ=new Set(["!","?","+","*","@"]),_E=e=>kZ.has(e),DZ="(?!(?:^|/)\\.\\.?(?:$|/))",zy="(?!\\.)",TZ=new Set(["[","."]),PZ=new Set(["..","."]),FZ=new Set("().*{}+?[]^$\\!"),OZ=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Tx="[^/]",SE=Tx+"*?",EE=Tx+"+?",rI=class ei{type;#t;#e;#s=!1;#n=[];#o;#w;#c;#h=!1;#a;#l;#i=!1;constructor(t,r,n={}){this.type=t,t&&(this.#e=!0),this.#o=r,this.#t=this.#o?this.#o.#t:this,this.#a=this.#t===this?n:this.#t.#a,this.#c=this.#t===this?[]:this.#t.#c,t==="!"&&!this.#t.#h&&this.#c.push(this),this.#w=this.#o?this.#o.#n.length:0}get hasMagic(){if(this.#e!==void 0)return this.#e;for(const t of this.#n)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#e=!0;return this.#e}toString(){return this.#l!==void 0?this.#l:this.type?this.#l=this.type+"("+this.#n.map(t=>String(t)).join("|")+")":this.#l=this.#n.map(t=>String(t)).join("")}#g(){if(this!==this.#t)throw new Error("should only call on root");if(this.#h)return this;this.toString(),this.#h=!0;let t;for(;t=this.#c.pop();){if(t.type!=="!")continue;let r=t,n=r.#o;for(;n;){for(let i=r.#w+1;!n.type&&itypeof r=="string"?r:r.toJSON()):[this.type,...this.#n.map(r=>r.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#h&&this.#o?.type==="!")&&t.push({}),t}isStart(){if(this.#t===this)return!0;if(!this.#o?.isStart())return!1;if(this.#w===0)return!0;const t=this.#o;for(let r=0;r{const[y,f,p,m]=typeof g=="string"?ei.#f(g,this.#e,l):g.toRegExpSource(t);return this.#e=this.#e||p,this.#s=this.#s||m,y}).join("");let u="";if(this.isStart()&&typeof this.#n[0]=="string"&&!(this.#n.length===1&&PZ.has(this.#n[0]))){const y=TZ,f=r&&y.has(c.charAt(0))||c.startsWith("\\.")&&y.has(c.charAt(2))||c.startsWith("\\.\\.")&&y.has(c.charAt(4)),p=!r&&!t&&y.has(c.charAt(0));u=f?DZ:p?zy:""}let h="";return this.isEnd()&&this.#t.#h&&this.#o?.type==="!"&&(h="(?:$|\\/)"),[u+c+h,Ec(c),this.#e=!!this.#e,this.#s]}const n=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:";let s=this.#d(r);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){const l=this.toString();return this.#n=[l],this.type=null,this.#e=void 0,[l,Ec(this.toString()),!1,!1]}let o=!n||t||r?"":this.#d(!0);o===s&&(o=""),o&&(s=`(?:${s})(?:${o})*?`);let a="";if(this.type==="!"&&this.#i)a=(this.isStart()&&!r?zy:"")+EE;else{const l=this.type==="!"?"))"+(this.isStart()&&!r&&!t?zy:"")+SE+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;a=i+s+l}return[a,Ec(s),this.#e=!!this.#e,this.#s]}#d(t){return this.#n.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");const[n,i,s,o]=r.toRegExpSource(t);return this.#s=this.#s||o,n}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#f(t,r,n=!1){let i=!1,s="",o=!1;for(let a=0;at?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&"),Dn=(e,t,r={})=>(Um(t),!r.nocomment&&t.charAt(0)==="#"?!1:new aa(t,r).match(e)),IZ=/^\*+([^+@!?\*\[\(]*)$/,$Z=e=>t=>!t.startsWith(".")&&t.endsWith(e),BZ=e=>t=>t.endsWith(e),RZ=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),NZ=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),LZ=/^\*+\.\*+$/,MZ=e=>!e.startsWith(".")&&e.includes("."),jZ=e=>e!=="."&&e!==".."&&e.includes("."),zZ=/^\.\*+$/,UZ=e=>e!=="."&&e!==".."&&e.startsWith("."),VZ=/^\*+$/,WZ=e=>e.length!==0&&!e.startsWith("."),qZ=e=>e.length!==0&&e!=="."&&e!=="..",HZ=/^\?+([^+@!?\*\[\(]*)?$/,GZ=([e,t=""])=>{const r=iI([e]);return t?(t=t.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(t)):r},YZ=([e,t=""])=>{const r=sI([e]);return t?(t=t.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(t)):r},KZ=([e,t=""])=>{const r=sI([e]);return t?n=>r(n)&&n.endsWith(t):r},XZ=([e,t=""])=>{const r=iI([e]);return t?n=>r(n)&&n.endsWith(t):r},iI=([e])=>{const t=e.length;return r=>r.length===t&&!r.startsWith(".")},sI=([e])=>{const t=e.length;return r=>r.length===t&&r!=="."&&r!==".."},oI=typeof process=="object"&&process?typeof Uh=="object"&&Uh&&Uh.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",CE={win32:{sep:"\\"},posix:{sep:"/"}},JZ=oI==="win32"?CE.win32.sep:CE.posix.sep;Dn.sep=JZ;var bn=Symbol("globstar **");Dn.GLOBSTAR=bn;var ZZ="[^/]",QZ=ZZ+"*?",tQ="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",eQ="(?:(?!(?:\\/|^)\\.).)*?",rQ=(e,t={})=>r=>Dn(r,e,t);Dn.filter=rQ;var yi=(e,t={})=>Object.assign({},e,t),nQ=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return Dn;const t=Dn;return Object.assign((n,i,s={})=>t(n,i,yi(e,s)),{Minimatch:class extends t.Minimatch{constructor(i,s={}){super(i,yi(e,s))}static defaults(i){return t.defaults(yi(e,i)).Minimatch}},AST:class extends t.AST{constructor(i,s,o={}){super(i,s,yi(e,o))}static fromGlob(i,s={}){return t.AST.fromGlob(i,yi(e,s))}},unescape:(n,i={})=>t.unescape(n,yi(e,i)),escape:(n,i={})=>t.escape(n,yi(e,i)),filter:(n,i={})=>t.filter(n,yi(e,i)),defaults:n=>t.defaults(yi(e,n)),makeRe:(n,i={})=>t.makeRe(n,yi(e,i)),braceExpand:(n,i={})=>t.braceExpand(n,yi(e,i)),match:(n,i,s={})=>t.match(n,i,yi(e,s)),sep:t.sep,GLOBSTAR:bn})};Dn.defaults=nQ;var aI=(e,t={})=>(Um(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,_Z.default)(e));Dn.braceExpand=aI;var iQ=(e,t={})=>new aa(e,t).makeRe();Dn.makeRe=iQ;var sQ=(e,t,r={})=>{const n=new aa(t,r);return e=e.filter(i=>n.match(i)),n.options.nonull&&!e.length&&e.push(t),e};Dn.match=sQ;var AE=/[?*]|[+@!]\(.*?\)|\[|\]/,oQ=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),aa=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,t={}){Um(e),t=t||{},this.options=t,this.pattern=e,this.platform=t.platform||oI,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot!==void 0?t.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const e of this.set)for(const t of e)if(typeof t!="string")return!0;return!1}debug(...e){}make(){const e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...i)=>console.error(...i)),this.debug(this.pattern,this.globSet);const r=this.globSet.map(i=>this.slashSplit(i));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let n=this.globParts.map((i,s,o)=>{if(this.isWindows&&this.windowsNoMagicRoot){const a=i[0]===""&&i[1]===""&&(i[2]==="?"||!AE.test(i[2]))&&!AE.test(i[3]),l=/^[a-z]:/i.test(i[0]);if(a)return[...i.slice(0,4),...i.slice(4).map(c=>this.parse(c))];if(l)return[i[0],...i.slice(1).map(c=>this.parse(c))]}return i.map(a=>this.parse(a))});if(this.debug(this.pattern,n),this.set=n.filter(i=>i.indexOf(!1)===-1),this.isWindows)for(let i=0;i=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):t>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(t=>{let r=-1;for(;(r=t.indexOf("**",r+1))!==-1;){let n=r;for(;t[n+1]==="**";)n++;n!==r&&t.splice(r,n-r)}return t})}levelOneOptimize(e){return e.map(t=>(t=t.reduce((r,n)=>{const i=r[r.length-1];return n==="**"&&i==="**"?r:n===".."&&i&&i!==".."&&i!=="."&&i!=="**"?(r.pop(),r):(r.push(n),r)},[]),t.length===0?[""]:t))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let n=1;nn&&r.splice(n+1,s-n);let o=r[n+1];const a=r[n+2],l=r[n+3];if(o!==".."||!a||a==="."||a===".."||!l||l==="."||l==="..")continue;t=!0,r.splice(n,1);const c=r.slice(0);c[n]="**",e.push(c),n--}if(!this.preserveMultipleSlashes){for(let s=1;st.length)}partsMatch(e,t,r=!1){let n=0,i=0,s=[],o="";for(;nb?t=t.slice(w):b>w&&(e=e.slice(b)))}}const{optimizationLevel:i=1}=this.options;i>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var s=0,o=0,a=e.length,l=t.length;s>> no match, partial?`,e,h,t,d),h===a))}let y;if(typeof c=="string"?(y=u===c,this.debug("string match",c,u,y)):(y=c.test(u),this.debug("pattern match",c,u,y)),!y)return!1}if(s===a&&o===l)return!0;if(s===a)return r;if(o===l)return s===a-1&&e[s]==="";throw new Error("wtf?")}braceExpand(){return aI(this.pattern,this.options)}parse(e){Um(e);const t=this.options;if(e==="**")return bn;if(e==="")return"";let r,n=null;(r=e.match(VZ))?n=t.dot?qZ:WZ:(r=e.match(IZ))?n=(t.nocase?t.dot?NZ:RZ:t.dot?BZ:$Z)(r[1]):(r=e.match(HZ))?n=(t.nocase?t.dot?YZ:GZ:t.dot?KZ:XZ)(r):(r=e.match(LZ))?n=t.dot?jZ:MZ:(r=e.match(zZ))&&(n=UZ);const i=rI.fromGlob(e,this.options).toMMPattern();return n&&typeof i=="object"&&Reflect.defineProperty(i,"test",{value:n}),i}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const e=this.set;if(!e.length)return this.regexp=!1,this.regexp;const t=this.options,r=t.noglobstar?QZ:t.dot?tQ:eQ,n=new Set(t.nocase?["i"]:[]);let i=e.map(a=>{const l=a.map(c=>{if(c instanceof RegExp)for(const u of c.flags.split(""))n.add(u);return typeof c=="string"?oQ(c):c===bn?bn:c._src});return l.forEach((c,u)=>{const h=l[u+1],d=l[u-1];c!==bn||d===bn||(d===void 0?h!==void 0&&h!==bn?l[u+1]="(?:\\/|"+r+"\\/)?"+h:l[u]=r:h===void 0?l[u-1]=d+"(?:\\/|"+r+")?":h!==bn&&(l[u-1]=d+"(?:\\/|\\/"+r+"\\/)"+h,l[u+1]=bn))}),l.filter(c=>c!==bn).join("/")}).join("|");const[s,o]=e.length>1?["(?:",")"]:["",""];i="^"+s+i+o+"$",this.negate&&(i="^(?!"+i+").+$");try{this.regexp=new RegExp(i,[...n].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;const r=this.options;this.isWindows&&(e=e.split("\\").join("/"));const n=this.slashSplit(e);this.debug(this.pattern,"split",n);const i=this.set;this.debug(this.pattern,"set",i);let s=n[n.length-1];if(!s)for(let o=n.length-2;!s&&o>=0;o--)s=n[o];for(let o=0;o{typeof hv.emitWarning=="function"?hv.emitWarning(e,t,r,n):console.error(`[${r}] ${t}: ${e}`)},Vm=globalThis.AbortController,kE=globalThis.AbortSignal;if(typeof Vm>"u"){kE=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(n,i){this._onabort.push(i)}},Vm=class{constructor(){t()}signal=new kE;abort(n){if(!this.signal.aborted){this.signal.reason=n,this.signal.aborted=!0;for(const i of this.signal._onabort)i(n);this.signal.onabort?.(n)}}};let e=hv.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1";const t=()=>{e&&(e=!1,cI("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var lQ=e=>!lI.has(e),Vo=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),uI=e=>Vo(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?Lp:null:null,Lp=class extends Array{constructor(e){super(e),this.fill(0)}},cQ=class Dh{heap;length;static#t=!1;static create(t){const r=uI(t);if(!r)return[];Dh.#t=!0;const n=new Dh(t,r);return Dh.#t=!1,n}constructor(t,r){if(!Dh.#t)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},hI=class fI{#t;#e;#s;#n;#o;#w;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#c;#h;#a;#l;#i;#g;#y;#d;#f;#S;#m;#E;#C;#v;#x;#_;#p;static unsafeExposeInternals(t){return{starts:t.#C,ttls:t.#v,sizes:t.#E,keyMap:t.#a,keyList:t.#l,valList:t.#i,next:t.#g,prev:t.#y,get head(){return t.#d},get tail(){return t.#f},free:t.#S,isBackgroundFetch:r=>t.#u(r),backgroundFetch:(r,n,i,s)=>t.#L(r,n,i,s),moveToTail:r=>t.#j(r),indexes:r=>t.#k(r),rindexes:r=>t.#D(r),isStale:r=>t.#b(r)}}get max(){return this.#t}get maxSize(){return this.#e}get calculatedSize(){return this.#h}get size(){return this.#c}get fetchMethod(){return this.#o}get memoMethod(){return this.#w}get dispose(){return this.#s}get disposeAfter(){return this.#n}constructor(t){const{max:r=0,ttl:n,ttlResolution:i=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:l,dispose:c,disposeAfter:u,noDisposeOnSet:h,noUpdateTTL:d,maxSize:g=0,maxEntrySize:y=0,sizeCalculation:f,fetchMethod:p,memoMethod:m,noDeleteOnFetchRejection:b,noDeleteOnStaleGet:w,allowStaleOnFetchRejection:x,allowStaleOnFetchAbort:E,ignoreFetchAbort:S}=t;if(r!==0&&!Vo(r))throw new TypeError("max option must be a nonnegative integer");const C=r?uI(r):Array;if(!C)throw new Error("invalid max value: "+r);if(this.#t=r,this.#e=g,this.maxEntrySize=y||this.#e,this.sizeCalculation=f,this.sizeCalculation){if(!this.#e&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(m!==void 0&&typeof m!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#w=m,p!==void 0&&typeof p!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#o=p,this.#_=!!p,this.#a=new Map,this.#l=new Array(r).fill(void 0),this.#i=new Array(r).fill(void 0),this.#g=new C(r),this.#y=new C(r),this.#d=0,this.#f=0,this.#S=cQ.create(r),this.#c=0,this.#h=0,typeof c=="function"&&(this.#s=c),typeof u=="function"?(this.#n=u,this.#m=[]):(this.#n=void 0,this.#m=void 0),this.#x=!!this.#s,this.#p=!!this.#n,this.noDisposeOnSet=!!h,this.noUpdateTTL=!!d,this.noDeleteOnFetchRejection=!!b,this.allowStaleOnFetchRejection=!!x,this.allowStaleOnFetchAbort=!!E,this.ignoreFetchAbort=!!S,this.maxEntrySize!==0){if(this.#e!==0&&!Vo(this.#e))throw new TypeError("maxSize must be a positive integer if specified");if(!Vo(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#P()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!w,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=Vo(i)||i===0?i:1,this.ttlAutopurge=!!s,this.ttl=n||0,this.ttl){if(!Vo(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#T()}if(this.#t===0&&this.ttl===0&&this.#e===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#t&&!this.#e){const A="LRU_CACHE_UNBOUNDED";lQ(A)&&(lI.add(A),cI("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",A,fI))}}getRemainingTTL(t){return this.#a.has(t)?1/0:0}#T(){const t=new Lp(this.#t),r=new Lp(this.#t);this.#v=t,this.#C=r,this.#O=(s,o,a=Kl.now())=>{if(r[s]=o!==0?a:0,t[s]=o,o!==0&&this.ttlAutopurge){const l=setTimeout(()=>{this.#b(s)&&this.#F(this.#l[s],"expire")},o+1);l.unref&&l.unref()}},this.#A=s=>{r[s]=t[s]!==0?Kl.now():0},this.#r=(s,o)=>{if(t[o]){const a=t[o],l=r[o];if(!a||!l)return;s.ttl=a,s.start=l,s.now=n||i();const c=s.now-l;s.remainingTTL=a-c}};let n=0;const i=()=>{const s=Kl.now();if(this.ttlResolution>0){n=s;const o=setTimeout(()=>n=0,this.ttlResolution);o.unref&&o.unref()}return s};this.getRemainingTTL=s=>{const o=this.#a.get(s);if(o===void 0)return 0;const a=t[o],l=r[o];if(!a||!l)return 1/0;const c=(n||i())-l;return a-c},this.#b=s=>{const o=r[s],a=t[s];return!!a&&!!o&&(n||i())-o>a}}#A=()=>{};#r=()=>{};#O=()=>{};#b=()=>!1;#P(){const t=new Lp(this.#t);this.#h=0,this.#E=t,this.#I=r=>{this.#h-=t[r],t[r]=0},this.#B=(r,n,i,s)=>{if(this.#u(n))return 0;if(!Vo(i))if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(i=s(n,r),!Vo(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i},this.#$=(r,n,i)=>{if(t[r]=n,this.#e){const s=this.#e-t[r];for(;this.#h>s;)this.#N(!0)}this.#h+=t[r],i&&(i.entrySize=n,i.totalCalculatedSize=this.#h)}}#I=t=>{};#$=(t,r,n)=>{};#B=(t,r,n,i)=>{if(n||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#k({allowStale:t=this.allowStale}={}){if(this.#c)for(let r=this.#f;!(!this.#R(r)||((t||!this.#b(r))&&(yield r),r===this.#d));)r=this.#y[r]}*#D({allowStale:t=this.allowStale}={}){if(this.#c)for(let r=this.#d;!(!this.#R(r)||((t||!this.#b(r))&&(yield r),r===this.#f));)r=this.#g[r]}#R(t){return t!==void 0&&this.#a.get(this.#l[t])===t}*entries(){for(const t of this.#k())this.#i[t]!==void 0&&this.#l[t]!==void 0&&!this.#u(this.#i[t])&&(yield[this.#l[t],this.#i[t]])}*rentries(){for(const t of this.#D())this.#i[t]!==void 0&&this.#l[t]!==void 0&&!this.#u(this.#i[t])&&(yield[this.#l[t],this.#i[t]])}*keys(){for(const t of this.#k()){const r=this.#l[t];r!==void 0&&!this.#u(this.#i[t])&&(yield r)}}*rkeys(){for(const t of this.#D()){const r=this.#l[t];r!==void 0&&!this.#u(this.#i[t])&&(yield r)}}*values(){for(const t of this.#k())this.#i[t]!==void 0&&!this.#u(this.#i[t])&&(yield this.#i[t])}*rvalues(){for(const t of this.#D())this.#i[t]!==void 0&&!this.#u(this.#i[t])&&(yield this.#i[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,r={}){for(const n of this.#k()){const i=this.#i[n],s=this.#u(i)?i.__staleWhileFetching:i;if(s!==void 0&&t(s,this.#l[n],this))return this.get(this.#l[n],r)}}forEach(t,r=this){for(const n of this.#k()){const i=this.#i[n],s=this.#u(i)?i.__staleWhileFetching:i;s!==void 0&&t.call(r,s,this.#l[n],this)}}rforEach(t,r=this){for(const n of this.#D()){const i=this.#i[n],s=this.#u(i)?i.__staleWhileFetching:i;s!==void 0&&t.call(r,s,this.#l[n],this)}}purgeStale(){let t=!1;for(const r of this.#D({allowStale:!0}))this.#b(r)&&(this.#F(this.#l[r],"expire"),t=!0);return t}info(t){const r=this.#a.get(t);if(r===void 0)return;const n=this.#i[r],i=this.#u(n)?n.__staleWhileFetching:n;if(i===void 0)return;const s={value:i};if(this.#v&&this.#C){const o=this.#v[r],a=this.#C[r];if(o&&a){const l=o-(Kl.now()-a);s.ttl=l,s.start=Date.now()}}return this.#E&&(s.size=this.#E[r]),s}dump(){const t=[];for(const r of this.#k({allowStale:!0})){const n=this.#l[r],i=this.#i[r],s=this.#u(i)?i.__staleWhileFetching:i;if(s===void 0||n===void 0)continue;const o={value:s};if(this.#v&&this.#C){o.ttl=this.#v[r];const a=Kl.now()-this.#C[r];o.start=Math.floor(Date.now()-a)}this.#E&&(o.size=this.#E[r]),t.unshift([n,o])}return t}load(t){this.clear();for(const[r,n]of t){if(n.start){const i=Date.now()-n.start;n.start=Kl.now()-i}this.set(r,n.value,n)}}set(t,r,n={}){if(r===void 0)return this.delete(t),this;const{ttl:i=this.ttl,start:s,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:l}=n;let{noUpdateTTL:c=this.noUpdateTTL}=n;const u=this.#B(t,r,n.size||0,a);if(this.maxEntrySize&&u>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.#F(t,"set"),this;let h=this.#c===0?void 0:this.#a.get(t);if(h===void 0)h=this.#c===0?this.#f:this.#S.length!==0?this.#S.pop():this.#c===this.#t?this.#N(!1):this.#c,this.#l[h]=t,this.#i[h]=r,this.#a.set(t,h),this.#g[this.#f]=h,this.#y[h]=this.#f,this.#f=h,this.#c++,this.#$(h,u,l),l&&(l.set="add"),c=!1;else{this.#j(h);const d=this.#i[h];if(r!==d){if(this.#_&&this.#u(d)){d.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:g}=d;g!==void 0&&!o&&(this.#x&&this.#s?.(g,t,"set"),this.#p&&this.#m?.push([g,t,"set"]))}else o||(this.#x&&this.#s?.(d,t,"set"),this.#p&&this.#m?.push([d,t,"set"]));if(this.#I(h),this.#$(h,u,l),this.#i[h]=r,l){l.set="replace";const g=d&&this.#u(d)?d.__staleWhileFetching:d;g!==void 0&&(l.oldValue=g)}}else l&&(l.set="update")}if(i!==0&&!this.#v&&this.#T(),this.#v&&(c||this.#O(h,i,s),l&&this.#r(l,h)),!o&&this.#p&&this.#m){const d=this.#m;let g;for(;g=d?.shift();)this.#n?.(...g)}return this}pop(){try{for(;this.#c;){const t=this.#i[this.#d];if(this.#N(!0),this.#u(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#p&&this.#m){const t=this.#m;let r;for(;r=t?.shift();)this.#n?.(...r)}}}#N(t){const r=this.#d,n=this.#l[r],i=this.#i[r];return this.#_&&this.#u(i)?i.__abortController.abort(new Error("evicted")):(this.#x||this.#p)&&(this.#x&&this.#s?.(i,n,"evict"),this.#p&&this.#m?.push([i,n,"evict"])),this.#I(r),t&&(this.#l[r]=void 0,this.#i[r]=void 0,this.#S.push(r)),this.#c===1?(this.#d=this.#f=0,this.#S.length=0):this.#d=this.#g[r],this.#a.delete(n),this.#c--,r}has(t,r={}){const{updateAgeOnHas:n=this.updateAgeOnHas,status:i}=r,s=this.#a.get(t);if(s!==void 0){const o=this.#i[s];if(this.#u(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#b(s))i&&(i.has="stale",this.#r(i,s));else return n&&this.#A(s),i&&(i.has="hit",this.#r(i,s)),!0}else i&&(i.has="miss");return!1}peek(t,r={}){const{allowStale:n=this.allowStale}=r,i=this.#a.get(t);if(i===void 0||!n&&this.#b(i))return;const s=this.#i[i];return this.#u(s)?s.__staleWhileFetching:s}#L(t,r,n,i){const s=r===void 0?void 0:this.#i[r];if(this.#u(s))return s;const o=new Vm,{signal:a}=n;a?.addEventListener("abort",()=>o.abort(a.reason),{signal:o.signal});const l={signal:o.signal,options:n,context:i},c=(f,p=!1)=>{const{aborted:m}=o.signal,b=n.ignoreFetchAbort&&f!==void 0;if(n.status&&(m&&!p?(n.status.fetchAborted=!0,n.status.fetchError=o.signal.reason,b&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),m&&!b&&!p)return h(o.signal.reason);const w=g;return this.#i[r]===g&&(f===void 0?w.__staleWhileFetching?this.#i[r]=w.__staleWhileFetching:this.#F(t,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.set(t,f,l.options))),f},u=f=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=f),h(f)),h=f=>{const{aborted:p}=o.signal,m=p&&n.allowStaleOnFetchAbort,b=m||n.allowStaleOnFetchRejection,w=b||n.noDeleteOnFetchRejection,x=g;if(this.#i[r]===g&&(!w||x.__staleWhileFetching===void 0?this.#F(t,"fetch"):m||(this.#i[r]=x.__staleWhileFetching)),b)return n.status&&x.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),x.__staleWhileFetching;if(x.__returned===x)throw f},d=(f,p)=>{const m=this.#o?.(t,s,l);m&&m instanceof Promise&&m.then(b=>f(b===void 0?void 0:b),p),o.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(f(void 0),n.allowStaleOnFetchAbort&&(f=b=>c(b,!0)))})};n.status&&(n.status.fetchDispatched=!0);const g=new Promise(d).then(c,u),y=Object.assign(g,{__abortController:o,__staleWhileFetching:s,__returned:void 0});return r===void 0?(this.set(t,y,{...l.options,status:void 0}),r=this.#a.get(t)):this.#i[r]=y,y}#u(t){if(!this.#_)return!1;const r=t;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof Vm}async fetch(t,r={}){const{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:l=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:h=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:g=this.ignoreFetchAbort,allowStaleOnFetchAbort:y=this.allowStaleOnFetchAbort,context:f,forceRefresh:p=!1,status:m,signal:b}=r;if(!this.#_)return m&&(m.fetch="get"),this.get(t,{allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:s,status:m});const w={allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:s,ttl:o,noDisposeOnSet:a,size:l,sizeCalculation:c,noUpdateTTL:u,noDeleteOnFetchRejection:h,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:y,ignoreFetchAbort:g,status:m,signal:b};let x=this.#a.get(t);if(x===void 0){m&&(m.fetch="miss");const E=this.#L(t,x,w,f);return E.__returned=E}else{const E=this.#i[x];if(this.#u(E)){const O=n&&E.__staleWhileFetching!==void 0;return m&&(m.fetch="inflight",O&&(m.returnedStale=!0)),O?E.__staleWhileFetching:E.__returned=E}const S=this.#b(x);if(!p&&!S)return m&&(m.fetch="hit"),this.#j(x),i&&this.#A(x),m&&this.#r(m,x),E;const C=this.#L(t,x,w,f),$=C.__staleWhileFetching!==void 0&&n;return m&&(m.fetch=S?"stale":"refresh",$&&S&&(m.returnedStale=!0)),$?C.__staleWhileFetching:C.__returned=C}}async forceFetch(t,r={}){const n=await this.fetch(t,r);if(n===void 0)throw new Error("fetch() returned undefined");return n}memo(t,r={}){const n=this.#w;if(!n)throw new Error("no memoMethod provided to constructor");const{context:i,forceRefresh:s,...o}=r,a=this.get(t,o);if(!s&&a!==void 0)return a;const l=n(t,a,{options:o,context:i});return this.set(t,l,o),l}get(t,r={}){const{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:o}=r,a=this.#a.get(t);if(a!==void 0){const l=this.#i[a],c=this.#u(l);return o&&this.#r(o,a),this.#b(a)?(o&&(o.get="stale"),c?(o&&n&&l.__staleWhileFetching!==void 0&&(o.returnedStale=!0),n?l.__staleWhileFetching:void 0):(s||this.#F(t,"expire"),o&&n&&(o.returnedStale=!0),n?l:void 0)):(o&&(o.get="hit"),c?l.__staleWhileFetching:(this.#j(a),i&&this.#A(a),l))}else o&&(o.get="miss")}#M(t,r){this.#y[r]=t,this.#g[t]=r}#j(t){t!==this.#f&&(t===this.#d?this.#d=this.#g[t]:this.#M(this.#y[t],this.#g[t]),this.#M(this.#f,t),this.#f=t)}delete(t){return this.#F(t,"delete")}#F(t,r){let n=!1;if(this.#c!==0){const i=this.#a.get(t);if(i!==void 0)if(n=!0,this.#c===1)this.#z(r);else{this.#I(i);const s=this.#i[i];if(this.#u(s)?s.__abortController.abort(new Error("deleted")):(this.#x||this.#p)&&(this.#x&&this.#s?.(s,t,r),this.#p&&this.#m?.push([s,t,r])),this.#a.delete(t),this.#l[i]=void 0,this.#i[i]=void 0,i===this.#f)this.#f=this.#y[i];else if(i===this.#d)this.#d=this.#g[i];else{const o=this.#y[i];this.#g[o]=this.#g[i];const a=this.#g[i];this.#y[a]=this.#y[i]}this.#c--,this.#S.push(i)}}if(this.#p&&this.#m?.length){const i=this.#m;let s;for(;s=i?.shift();)this.#n?.(...s)}return n}clear(){return this.#z("delete")}#z(t){for(const r of this.#D({allowStale:!0})){const n=this.#i[r];if(this.#u(n))n.__abortController.abort(new Error("deleted"));else{const i=this.#l[r];this.#x&&this.#s?.(n,i,t),this.#p&&this.#m?.push([n,i,t])}}if(this.#a.clear(),this.#i.fill(void 0),this.#l.fill(void 0),this.#v&&this.#C&&(this.#v.fill(0),this.#C.fill(0)),this.#E&&this.#E.fill(0),this.#d=0,this.#f=0,this.#S.length=0,this.#h=0,this.#c=0,this.#p&&this.#m){const r=this.#m;let n;for(;n=r?.shift();)this.#n?.(...n)}}},Wm=Il(dZ()),uQ=Il(eI()),Px=Il(pZ()),dI=Il(gZ()),hQ=Il(xZ()),DE=typeof process=="object"&&process?process:{stdout:null,stderr:null},fQ=e=>!!e&&typeof e=="object"&&(e instanceof qm||e instanceof dI.default||dQ(e)||pQ(e)),dQ=e=>!!e&&typeof e=="object"&&e instanceof Px.EventEmitter&&typeof e.pipe=="function"&&e.pipe!==dI.default.Writable.prototype.pipe,pQ=e=>!!e&&typeof e=="object"&&e instanceof Px.EventEmitter&&typeof e.write=="function"&&typeof e.end=="function",Gs=Symbol("EOF"),Ys=Symbol("maybeEmitEnd"),No=Symbol("emittedEnd"),Fd=Symbol("emittingEnd"),Qu=Symbol("emittedError"),Od=Symbol("closed"),TE=Symbol("read"),Id=Symbol("flush"),PE=Symbol("flushChunk"),Ri=Symbol("encoding"),Xl=Symbol("decoder"),Ur=Symbol("flowing"),th=Symbol("paused"),pc=Symbol("resume"),Vr=Symbol("buffer"),yn=Symbol("pipes"),Wr=Symbol("bufferLength"),Uy=Symbol("bufferPush"),$d=Symbol("bufferShift"),cn=Symbol("objectMode"),xr=Symbol("destroyed"),Vy=Symbol("error"),Wy=Symbol("emitData"),FE=Symbol("emitEnd"),qy=Symbol("emitEnd2"),ps=Symbol("async"),Hy=Symbol("abort"),Bd=Symbol("aborted"),eh=Symbol("signal"),Ea=Symbol("dataListeners"),Qn=Symbol("discarded"),rh=e=>Promise.resolve().then(e),mQ=e=>e(),gQ=e=>e==="end"||e==="finish"||e==="prefinish",yQ=e=>e instanceof ArrayBuffer||!!e&&typeof e=="object"&&e.constructor&&e.constructor.name==="ArrayBuffer"&&e.byteLength>=0,bQ=e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e),pI=class{src;dest;opts;ondrain;constructor(e,t,r){this.src=e,this.dest=t,this.opts=r,this.ondrain=()=>e[pc](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},vQ=class extends pI{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,r){super(e,t,r),this.proxyErrors=n=>t.emit("error",n),e.on("error",this.proxyErrors)}},wQ=e=>!!e.objectMode,xQ=e=>!e.objectMode&&!!e.encoding&&e.encoding!=="buffer",qm=class extends Px.EventEmitter{[Ur]=!1;[th]=!1;[yn]=[];[Vr]=[];[cn];[Ri];[ps];[Xl];[Gs]=!1;[No]=!1;[Fd]=!1;[Od]=!1;[Qu]=null;[Wr]=0;[xr]=!1;[eh];[Bd]=!1;[Ea]=0;[Qn]=!1;writable=!0;readable=!0;constructor(...e){const t=e[0]||{};if(super(),t.objectMode&&typeof t.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");wQ(t)?(this[cn]=!0,this[Ri]=null):xQ(t)?(this[Ri]=t.encoding,this[cn]=!1):(this[cn]=!1,this[Ri]=null),this[ps]=!!t.async,this[Xl]=this[Ri]?new hQ.StringDecoder(this[Ri]):null,t&&t.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[Vr]}),t&&t.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[yn]});const{signal:r}=t;r&&(this[eh]=r,r.aborted?this[Hy]():r.addEventListener("abort",()=>this[Hy]()))}get bufferLength(){return this[Wr]}get encoding(){return this[Ri]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[cn]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[ps]}set async(e){this[ps]=this[ps]||!!e}[Hy](){this[Bd]=!0,this.emit("abort",this[eh]?.reason),this.destroy(this[eh]?.reason)}get aborted(){return this[Bd]}set aborted(e){}write(e,t,r){if(this[Bd])return!1;if(this[Gs])throw new Error("write after end");if(this[xr])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof t=="function"&&(r=t,t="utf8"),t||(t="utf8");const n=this[ps]?rh:mQ;if(!this[cn]&&!Buffer.isBuffer(e)){if(bQ(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(yQ(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[cn]?(this[Ur]&&this[Wr]!==0&&this[Id](!0),this[Ur]?this.emit("data",e):this[Uy](e),this[Wr]!==0&&this.emit("readable"),r&&n(r),this[Ur]):e.length?(typeof e=="string"&&!(t===this[Ri]&&!this[Xl]?.lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[Ri]&&(e=this[Xl].write(e)),this[Ur]&&this[Wr]!==0&&this[Id](!0),this[Ur]?this.emit("data",e):this[Uy](e),this[Wr]!==0&&this.emit("readable"),r&&n(r),this[Ur]):(this[Wr]!==0&&this.emit("readable"),r&&n(r),this[Ur])}read(e){if(this[xr])return null;if(this[Qn]=!1,this[Wr]===0||e===0||e&&e>this[Wr])return this[Ys](),null;this[cn]&&(e=null),this[Vr].length>1&&!this[cn]&&(this[Vr]=[this[Ri]?this[Vr].join(""):Buffer.concat(this[Vr],this[Wr])]);const t=this[TE](e||null,this[Vr][0]);return this[Ys](),t}[TE](e,t){if(this[cn])this[$d]();else{const r=t;e===r.length||e===null?this[$d]():typeof r=="string"?(this[Vr][0]=r.slice(e),t=r.slice(0,e),this[Wr]-=e):(this[Vr][0]=r.subarray(e),t=r.subarray(0,e),this[Wr]-=e)}return this.emit("data",t),!this[Vr].length&&!this[Gs]&&this.emit("drain"),t}end(e,t,r){return typeof e=="function"&&(r=e,e=void 0),typeof t=="function"&&(r=t,t="utf8"),e!==void 0&&this.write(e,t),r&&this.once("end",r),this[Gs]=!0,this.writable=!1,(this[Ur]||!this[th])&&this[Ys](),this}[pc](){this[xr]||(!this[Ea]&&!this[yn].length&&(this[Qn]=!0),this[th]=!1,this[Ur]=!0,this.emit("resume"),this[Vr].length?this[Id]():this[Gs]?this[Ys]():this.emit("drain"))}resume(){return this[pc]()}pause(){this[Ur]=!1,this[th]=!0,this[Qn]=!1}get destroyed(){return this[xr]}get flowing(){return this[Ur]}get paused(){return this[th]}[Uy](e){this[cn]?this[Wr]+=1:this[Wr]+=e.length,this[Vr].push(e)}[$d](){return this[cn]?this[Wr]-=1:this[Wr]-=this[Vr][0].length,this[Vr].shift()}[Id](e=!1){do;while(this[PE](this[$d]())&&this[Vr].length);!e&&!this[Vr].length&&!this[Gs]&&this.emit("drain")}[PE](e){return this.emit("data",e),this[Ur]}pipe(e,t){if(this[xr])return e;this[Qn]=!1;const r=this[No];return t=t||{},e===DE.stdout||e===DE.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,r?t.end&&e.end():(this[yn].push(t.proxyErrors?new vQ(this,e,t):new pI(this,e,t)),this[ps]?rh(()=>this[pc]()):this[pc]()),e}unpipe(e){const t=this[yn].find(r=>r.dest===e);t&&(this[yn].length===1?(this[Ur]&&this[Ea]===0&&(this[Ur]=!1),this[yn]=[]):this[yn].splice(this[yn].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){const r=super.on(e,t);if(e==="data")this[Qn]=!1,this[Ea]++,!this[yn].length&&!this[Ur]&&this[pc]();else if(e==="readable"&&this[Wr]!==0)super.emit("readable");else if(gQ(e)&&this[No])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[Qu]){const n=t;this[ps]?rh(()=>n.call(this,this[Qu])):n.call(this,this[Qu])}return r}removeListener(e,t){return this.off(e,t)}off(e,t){const r=super.off(e,t);return e==="data"&&(this[Ea]=this.listeners("data").length,this[Ea]===0&&!this[Qn]&&!this[yn].length&&(this[Ur]=!1)),r}removeAllListeners(e){const t=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[Ea]=0,!this[Qn]&&!this[yn].length&&(this[Ur]=!1)),t}get emittedEnd(){return this[No]}[Ys](){!this[Fd]&&!this[No]&&!this[xr]&&this[Vr].length===0&&this[Gs]&&(this[Fd]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Od]&&this.emit("close"),this[Fd]=!1)}emit(e,...t){const r=t[0];if(e!=="error"&&e!=="close"&&e!==xr&&this[xr])return!1;if(e==="data")return!this[cn]&&!r?!1:this[ps]?(rh(()=>this[Wy](r)),!0):this[Wy](r);if(e==="end")return this[FE]();if(e==="close"){if(this[Od]=!0,!this[No]&&!this[xr])return!1;const i=super.emit("close");return this.removeAllListeners("close"),i}else if(e==="error"){this[Qu]=r,super.emit(Vy,r);const i=!this[eh]||this.listeners("error").length?super.emit("error",r):!1;return this[Ys](),i}else if(e==="resume"){const i=super.emit("resume");return this[Ys](),i}else if(e==="finish"||e==="prefinish"){const i=super.emit(e);return this.removeAllListeners(e),i}const n=super.emit(e,...t);return this[Ys](),n}[Wy](e){for(const r of this[yn])r.dest.write(e)===!1&&this.pause();const t=this[Qn]?!1:super.emit("data",e);return this[Ys](),t}[FE](){return this[No]?!1:(this[No]=!0,this.readable=!1,this[ps]?(rh(()=>this[qy]()),!0):this[qy]())}[qy](){if(this[Xl]){const t=this[Xl].end();if(t){for(const r of this[yn])r.dest.write(t);this[Qn]||super.emit("data",t)}}for(const t of this[yn])t.end();const e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){const e=Object.assign([],{dataLength:0});this[cn]||(e.dataLength=0);const t=this.promise();return this.on("data",r=>{e.push(r),this[cn]||(e.dataLength+=r.length)}),await t,e}async concat(){if(this[cn])throw new Error("cannot concat in objectMode");const e=await this.collect();return this[Ri]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(xr,()=>t(new Error("stream destroyed"))),this.on("error",r=>t(r)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[Qn]=!1;let e=!1;const t=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return t();const n=this.read();if(n!==null)return Promise.resolve({done:!1,value:n});if(this[Gs])return t();let i,s;const o=u=>{this.off("data",a),this.off("end",l),this.off(xr,c),t(),s(u)},a=u=>{this.off("error",o),this.off("end",l),this.off(xr,c),this.pause(),i({value:u,done:!!this[Gs]})},l=()=>{this.off("error",o),this.off("data",a),this.off(xr,c),t(),i({done:!0,value:void 0})},c=()=>o(new Error("stream destroyed"));return new Promise((u,h)=>{s=h,i=u,this.once(xr,c),this.once("error",o),this.once("end",l),this.once("data",a)})},throw:t,return:t,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[Qn]=!1;let e=!1;const t=()=>(this.pause(),this.off(Vy,t),this.off(xr,t),this.off("end",t),e=!0,{done:!0,value:void 0}),r=()=>{if(e)return t();const n=this.read();return n===null?t():{done:!1,value:n}};return this.once("end",t),this.once(Vy,t),this.once(xr,t),{next:r,throw:t,return:t,[Symbol.iterator](){return this}}}destroy(e){if(this[xr])return e?this.emit("error",e):this.emit(xr),this;this[xr]=!0,this[Qn]=!0,this[Vr].length=0,this[Wr]=0;const t=this;return typeof t.close=="function"&&!this[Od]&&t.close(),e?this.emit("error",e):this.emit(xr),this}static get isStream(){return fQ}},mI=e=>e,gI=/^\\\\\?\\([a-z]:)\\?$/i,_Q=e=>e.replace(/\//g,"\\").replace(gI,"$1\\"),SQ=/[\\\/]/,_i=0,yI=1,bI=2,_s=4,vI=6,wI=8,Ra=10,xI=12,Ni=15,nh=-16,OE=16,IE=32,Th=64,Ui=128,Rd=256,Mp=512,$E=Th|Ui|Mp,EQ=1023,Gy=e=>e.isFile()?wI:e.isDirectory()?_s:e.isSymbolicLink()?Ra:e.isCharacterDevice()?bI:e.isBlockDevice()?vI:e.isSocket()?xI:e.isFIFO()?yI:_i,BE=new Map,Ph=e=>{const t=BE.get(e);if(t)return t;const r=e.normalize("NFKD");return BE.set(e,r),r},RE=new Map,Nd=e=>{const t=RE.get(e);if(t)return t;const r=Ph(e.toLowerCase());return RE.set(e,r),r},NE=class extends hI{constructor(){super({max:256})}},CQ=class extends hI{constructor(e=16*1024){super({maxSize:e,sizeCalculation:t=>t.length+1})}},_I=Symbol("PathScurry setAsCwd"),jn=class{name;root;roots;parent;nocase;isCWD=!1;#t;#e;get dev(){return this.#e}#s;get mode(){return this.#s}#n;get nlink(){return this.#n}#o;get uid(){return this.#o}#w;get gid(){return this.#w}#c;get rdev(){return this.#c}#h;get blksize(){return this.#h}#a;get ino(){return this.#a}#l;get size(){return this.#l}#i;get blocks(){return this.#i}#g;get atimeMs(){return this.#g}#y;get mtimeMs(){return this.#y}#d;get ctimeMs(){return this.#d}#f;get birthtimeMs(){return this.#f}#S;get atime(){return this.#S}#m;get mtime(){return this.#m}#E;get ctime(){return this.#E}#C;get birthtime(){return this.#C}#v;#x;#_;#p;#T;#A;#r;#O;#b;#P;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=_i,r,n,i,s,o){this.name=e,this.#v=i?Nd(e):Ph(e),this.#r=t&EQ,this.nocase=i,this.roots=n,this.root=r||this,this.#O=s,this.#_=o.fullpath,this.#T=o.relative,this.#A=o.relativePosix,this.parent=o.parent,this.parent?this.#t=this.parent.#t:this.#t=mI(o.fs)}depth(){return this.#x!==void 0?this.#x:this.parent?this.#x=this.parent.depth()+1:this.#x=0}childrenCache(){return this.#O}resolve(e){if(!e)return this;const t=this.getRootString(e),n=e.substring(t.length).split(this.splitSep);return t?this.getRoot(t).#I(n):this.#I(n)}#I(e){let t=this;for(const r of e)t=t.child(r);return t}children(){const e=this.#O.get(this);if(e)return e;const t=Object.assign([],{provisional:0});return this.#O.set(this,t),this.#r&=-17,t}child(e,t){if(e===""||e===".")return this;if(e==="..")return this.parent||this;const r=this.children(),n=this.nocase?Nd(e):Ph(e);for(const a of r)if(a.#v===n)return a;const i=this.parent?this.sep:"",s=this.#_?this.#_+i+e:void 0,o=this.newChild(e,_i,{...t,parent:this,fullpath:s});return this.canReaddir()||(o.#r|=Ui),r.push(o),o}relative(){if(this.isCWD)return"";if(this.#T!==void 0)return this.#T;const e=this.name,t=this.parent;if(!t)return this.#T=this.name;const r=t.relative();return r+(!r||!t.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#A!==void 0)return this.#A;const e=this.name,t=this.parent;if(!t)return this.#A=this.fullpathPosix();const r=t.relativePosix();return r+(!r||!t.parent?"":"/")+e}fullpath(){if(this.#_!==void 0)return this.#_;const e=this.name,t=this.parent;if(!t)return this.#_=this.name;const n=t.fullpath()+(t.parent?this.sep:"")+e;return this.#_=n}fullpathPosix(){if(this.#p!==void 0)return this.#p;if(this.sep==="/")return this.#p=this.fullpath();if(!this.parent){const n=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(n)?this.#p=`//?/${n}`:this.#p=n}const e=this.parent,t=e.fullpathPosix(),r=t+(!t||!e.parent?"":"/")+this.name;return this.#p=r}isUnknown(){return(this.#r&Ni)===_i}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#r&Ni)===wI}isDirectory(){return(this.#r&Ni)===_s}isCharacterDevice(){return(this.#r&Ni)===bI}isBlockDevice(){return(this.#r&Ni)===vI}isFIFO(){return(this.#r&Ni)===yI}isSocket(){return(this.#r&Ni)===xI}isSymbolicLink(){return(this.#r&Ra)===Ra}lstatCached(){return this.#r&IE?this:void 0}readlinkCached(){return this.#b}realpathCached(){return this.#P}readdirCached(){const e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#b)return!0;if(!this.parent)return!1;const e=this.#r&Ni;return!(e!==_i&&e!==Ra||this.#r&Rd||this.#r&Ui)}calledReaddir(){return!!(this.#r&OE)}isENOENT(){return!!(this.#r&Ui)}isNamed(e){return this.nocase?this.#v===Nd(e):this.#v===Ph(e)}async readlink(){const e=this.#b;if(e)return e;if(this.canReadlink()&&this.parent)try{const t=await this.#t.promises.readlink(this.fullpath()),r=(await this.parent.realpath())?.resolve(t);if(r)return this.#b=r}catch(t){this.#u(t.code);return}}readlinkSync(){const e=this.#b;if(e)return e;if(this.canReadlink()&&this.parent)try{const t=this.#t.readlinkSync(this.fullpath()),r=this.parent.realpathSync()?.resolve(t);if(r)return this.#b=r}catch(t){this.#u(t.code);return}}#$(e){this.#r|=OE;for(let t=e.provisional;tr(null,e))}readdirCB(e,t=!1){if(!this.canReaddir()){t?e(null,[]):queueMicrotask(()=>e(null,[]));return}const r=this.children();if(this.calledReaddir()){const i=r.slice(0,r.provisional);t?e(null,i):queueMicrotask(()=>e(null,i));return}if(this.#V.push(e),this.#W)return;this.#W=!0;const n=this.fullpath();this.#t.readdir(n,{withFileTypes:!0},(i,s)=>{if(i)this.#N(i.code),r.provisional=0;else{for(const o of s)this.#M(o,r);this.#$(r)}this.#H(r.slice(0,r.provisional))})}#U;async readdir(){if(!this.canReaddir())return[];const e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);const t=this.fullpath();if(this.#U)await this.#U;else{let r=()=>{};this.#U=new Promise(n=>r=n);try{for(const n of await this.#t.promises.readdir(t,{withFileTypes:!0}))this.#M(n,e);this.#$(e)}catch(n){this.#N(n.code),e.provisional=0}this.#U=void 0,r()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];const e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);const t=this.fullpath();try{for(const r of this.#t.readdirSync(t,{withFileTypes:!0}))this.#M(r,e);this.#$(e)}catch(r){this.#N(r.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#r&$E)return!1;const e=Ni&this.#r;return e===_i||e===_s||e===Ra}shouldWalk(e,t){return(this.#r&_s)===_s&&!(this.#r&$E)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#P)return this.#P;if(!((Mp|Rd|Ui)&this.#r))try{const e=await this.#t.promises.realpath(this.fullpath());return this.#P=this.resolve(e)}catch{this.#D()}}realpathSync(){if(this.#P)return this.#P;if(!((Mp|Rd|Ui)&this.#r))try{const e=this.#t.realpathSync(this.fullpath());return this.#P=this.resolve(e)}catch{this.#D()}}[_I](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;const t=new Set([]);let r=[],n=this;for(;n&&n.parent;)t.add(n),n.#T=r.join(this.sep),n.#A=r.join("/"),n=n.parent,r.push("..");for(n=e;n&&n.parent&&!t.has(n);)n.#T=void 0,n.#A=void 0,n=n.parent}},SI=class EI extends jn{sep="\\";splitSep=SQ;constructor(t,r=_i,n,i,s,o,a){super(t,r,n,i,s,o,a)}newChild(t,r=_i,n={}){return new EI(t,r,this.root,this.roots,this.nocase,this.childrenCache(),n)}getRootString(t){return Wm.win32.parse(t).root}getRoot(t){if(t=_Q(t.toUpperCase()),t===this.root.name)return this.root;for(const[r,n]of Object.entries(this.roots))if(this.sameRoot(t,r))return this.roots[t]=n;return this.roots[t]=new Fx(t,this).root}sameRoot(t,r=this.root.name){return t=t.toUpperCase().replace(/\//g,"\\").replace(gI,"$1\\"),t===r}},CI=class AI extends jn{splitSep="/";sep="/";constructor(t,r=_i,n,i,s,o,a){super(t,r,n,i,s,o,a)}getRootString(t){return t.startsWith("/")?"/":""}getRoot(t){return this.root}newChild(t,r=_i,n={}){return new AI(t,r,this.root,this.roots,this.nocase,this.childrenCache(),n)}},kI=class{root;rootPath;roots;cwd;#t;#e;#s;nocase;#n;constructor(e=process.cwd(),t,r,{nocase:n,childrenCacheSize:i=16*1024,fs:s=defaultFS}={}){this.#n=mI(s),(e instanceof URL||e.startsWith("file://"))&&(e=(0,uQ.fileURLToPath)(e));const o=t.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(o),this.#t=new NE,this.#e=new NE,this.#s=new CQ(i);const a=o.substring(this.rootPath.length).split(r);if(a.length===1&&!a[0]&&a.pop(),n===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=n,this.root=this.newRoot(this.#n),this.roots[this.rootPath]=this.root;let l=this.root,c=a.length-1;const u=t.sep;let h=this.rootPath,d=!1;for(const g of a){const y=c--;l=l.child(g,{relative:new Array(y).fill("..").join(u),relativePosix:new Array(y).fill("..").join("/"),fullpath:h+=(d?"":u)+g}),d=!0}this.cwd=l}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#s}resolve(...e){let t="";for(let i=e.length-1;i>=0;i--){const s=e[i];if(!(!s||s===".")&&(t=t?`${s}/${t}`:s,this.isAbsolute(s)))break}const r=this.#t.get(t);if(r!==void 0)return r;const n=this.cwd.resolve(t).fullpath();return this.#t.set(t,n),n}resolvePosix(...e){let t="";for(let i=e.length-1;i>=0;i--){const s=e[i];if(!(!s||s===".")&&(t=t?`${s}/${t}`:s,this.isAbsolute(s)))break}const r=this.#e.get(t);if(r!==void 0)return r;const n=this.cwd.resolve(t).fullpathPosix();return this.#e.set(t,n),n}relative(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof jn||(t=e,e=this.cwd);const{withFileTypes:r}=t;if(e.canReaddir()){const n=await e.readdir();return r?n:n.map(i=>i.name)}else return[]}readdirSync(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof jn||(t=e,e=this.cwd);const{withFileTypes:r=!0}=t;return e.canReaddir()?r?e.readdirSync():e.readdirSync().map(n=>n.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof jn||(t=e.withFileTypes,e=this.cwd);const r=await e.readlink();return t?r:r?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof jn||(t=e.withFileTypes,e=this.cwd);const r=e.readlinkSync();return t?r:r?.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof jn||(t=e.withFileTypes,e=this.cwd);const r=await e.realpath();return t?r:r?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof jn||(t=e.withFileTypes,e=this.cwd);const r=e.realpathSync();return t?r:r?.fullpath()}async walk(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof jn||(t=e,e=this.cwd);const{withFileTypes:r=!0,follow:n=!1,filter:i,walkFilter:s}=t,o=[];(!i||i(e))&&o.push(r?e:e.fullpath());const a=new Set,l=(u,h)=>{a.add(u),u.readdirCB((d,g)=>{if(d)return h(d);let y=g.length;if(!y)return h();const f=()=>{--y===0&&h()};for(const p of g)(!i||i(p))&&o.push(r?p:p.fullpath()),n&&p.isSymbolicLink()?p.realpath().then(m=>m?.isUnknown()?m.lstat():m).then(m=>m?.shouldWalk(a,s)?l(m,f):f()):p.shouldWalk(a,s)?l(p,f):f()},!0)},c=e;return new Promise((u,h)=>{l(c,d=>{if(d)return h(d);u(o)})})}walkSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof jn||(t=e,e=this.cwd);const{withFileTypes:r=!0,follow:n=!1,filter:i,walkFilter:s}=t,o=[];(!i||i(e))&&o.push(r?e:e.fullpath());const a=new Set([e]);for(const l of a){const c=l.readdirSync();for(const u of c){(!i||i(u))&&o.push(r?u:u.fullpath());let h=u;if(u.isSymbolicLink()){if(!(n&&(h=u.realpathSync())))continue;h.isUnknown()&&h.lstatSync()}h.shouldWalk(a,s)&&a.add(h)}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof jn||(t=e,e=this.cwd),this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof jn||(t=e,e=this.cwd);const{withFileTypes:r=!0,follow:n=!1,filter:i,walkFilter:s}=t;(!i||i(e))&&(yield r?e:e.fullpath());const o=new Set([e]);for(const a of o){const l=a.readdirSync();for(const c of l){(!i||i(c))&&(yield r?c:c.fullpath());let u=c;if(c.isSymbolicLink()){if(!(n&&(u=c.realpathSync())))continue;u.isUnknown()&&u.lstatSync()}u.shouldWalk(o,s)&&o.add(u)}}}stream(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof jn||(t=e,e=this.cwd);const{withFileTypes:r=!0,follow:n=!1,filter:i,walkFilter:s}=t,o=new qm({objectMode:!0});(!i||i(e))&&o.write(r?e:e.fullpath());const a=new Set,l=[e];let c=0;const u=()=>{let h=!1;for(;!h;){const d=l.shift();if(!d){c===0&&o.end();return}c++,a.add(d);const g=(f,p,m=!1)=>{if(f)return o.emit("error",f);if(n&&!m){const b=[];for(const w of p)w.isSymbolicLink()&&b.push(w.realpath().then(x=>x?.isUnknown()?x.lstat():x));if(b.length){Promise.all(b).then(()=>g(null,p,!0));return}}for(const b of p)b&&(!i||i(b))&&(o.write(r?b:b.fullpath())||(h=!0));c--;for(const b of p){const w=b.realpathCached()||b;w.shouldWalk(a,s)&&l.push(w)}h&&!o.flowing?o.once("drain",u):y||u()};let y=!0;d.readdirCB(g,!0),y=!1}};return u(),o}streamSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof jn||(t=e,e=this.cwd);const{withFileTypes:r=!0,follow:n=!1,filter:i,walkFilter:s}=t,o=new qm({objectMode:!0}),a=new Set;(!i||i(e))&&o.write(r?e:e.fullpath());const l=[e];let c=0;const u=()=>{let h=!1;for(;!h;){const d=l.shift();if(!d){c===0&&o.end();return}c++,a.add(d);const g=d.readdirSync();for(const y of g)(!i||i(y))&&(o.write(r?y:y.fullpath())||(h=!0));c--;for(const y of g){let f=y;if(y.isSymbolicLink()){if(!(n&&(f=y.realpathSync())))continue;f.isUnknown()&&f.lstatSync()}f.shouldWalk(a,s)&&l.push(f)}}h&&!o.flowing&&o.once("drain",u)};return u(),o}chdir(e=this.cwd){const t=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[_I](t)}},Fx=class extends kI{sep="\\";constructor(e=process.cwd(),t={}){const{nocase:r=!0}=t;super(e,Wm.win32,"\\",{...t,nocase:r}),this.nocase=r;for(let n=this.cwd;n;n=n.parent)n.nocase=this.nocase}parseRootPath(e){return Wm.win32.parse(e).root.toUpperCase()}newRoot(e){return new SI(this.rootPath,_s,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},Ox=class extends kI{sep="/";constructor(e=process.cwd(),t={}){const{nocase:r=!1}=t;super(e,Wm.posix,"/",{...t,nocase:r}),this.nocase=r}parseRootPath(e){return"/"}newRoot(e){return new CI(this.rootPath,_s,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},DI=class extends Ox{constructor(e=process.cwd(),t={}){const{nocase:r=!0}=t;super(e,{...t,nocase:r})}};process.platform;var AQ=process.platform==="win32"?Fx:process.platform==="darwin"?DI:Ox,kQ=e=>e.length>=1,DQ=e=>e.length>=1,TI=class PI{#t;#e;#s;length;#n;#o;#w;#c;#h;#a;#l=!0;constructor(t,r,n,i){if(!kQ(t))throw new TypeError("empty pattern list");if(!DQ(r))throw new TypeError("empty glob list");if(r.length!==t.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=t.length,n<0||n>=this.length)throw new TypeError("index out of range");if(this.#t=t,this.#e=r,this.#s=n,this.#n=i,this.#s===0){if(this.isUNC()){const[s,o,a,l,...c]=this.#t,[u,h,d,g,...y]=this.#e;c[0]===""&&(c.shift(),y.shift());const f=[s,o,a,l,""].join("/"),p=[u,h,d,g,""].join("/");this.#t=[f,...c],this.#e=[p,...y],this.length=this.#t.length}else if(this.isDrive()||this.isAbsolute()){const[s,...o]=this.#t,[a,...l]=this.#e;o[0]===""&&(o.shift(),l.shift());const c=s+"/",u=a+"/";this.#t=[c,...o],this.#e=[u,...l],this.length=this.#t.length}}}pattern(){return this.#t[this.#s]}isString(){return typeof this.#t[this.#s]=="string"}isGlobstar(){return this.#t[this.#s]===bn}isRegExp(){return this.#t[this.#s]instanceof RegExp}globString(){return this.#w=this.#w||(this.#s===0?this.isAbsolute()?this.#e[0]+this.#e.slice(1).join("/"):this.#e.join("/"):this.#e.slice(this.#s).join("/"))}hasMore(){return this.length>this.#s+1}rest(){return this.#o!==void 0?this.#o:this.hasMore()?(this.#o=new PI(this.#t,this.#e,this.#s+1,this.#n),this.#o.#a=this.#a,this.#o.#h=this.#h,this.#o.#c=this.#c,this.#o):this.#o=null}isUNC(){const t=this.#t;return this.#h!==void 0?this.#h:this.#h=this.#n==="win32"&&this.#s===0&&t[0]===""&&t[1]===""&&typeof t[2]=="string"&&!!t[2]&&typeof t[3]=="string"&&!!t[3]}isDrive(){const t=this.#t;return this.#c!==void 0?this.#c:this.#c=this.#n==="win32"&&this.#s===0&&this.length>1&&typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0])}isAbsolute(){const t=this.#t;return this.#a!==void 0?this.#a:this.#a=t[0]===""&&t.length>1||this.isDrive()||this.isUNC()}root(){const t=this.#t[0];return typeof t=="string"&&this.isAbsolute()&&this.#s===0?t:""}checkFollowGlobstar(){return!(this.#s===0||!this.isGlobstar()||!this.#l)}markFollowGlobstar(){return this.#s===0||!this.isGlobstar()||!this.#l?!1:(this.#l=!1,!0)}},TQ=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",LE=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:r,noext:n,noglobstar:i,platform:s=TQ}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=s,this.mmopts={dot:!0,nobrace:t,nocase:r,noext:n,noglobstar:i,optimizationLevel:2,platform:s,nocomment:!0,nonegate:!0};for(const o of e)this.add(o)}add(e){const t=new aa(e,this.mmopts);for(let r=0;r[e,!!(t&2),!!(t&1)])}},OQ=class{store=new Map;add(e,t){if(!e.canReaddir())return;const r=this.store.get(e);r?r.find(n=>n.globString()===t.globString())||r.push(t):this.store.set(e,[t])}get(e){const t=this.store.get(e);if(!t)throw new Error("attempting to walk unknown path");return t}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}},ME=class OI{hasWalkedCache;matches=new FQ;subwalks=new OQ;patterns;follow;dot;opts;constructor(t,r){this.opts=t,this.follow=!!t.follow,this.dot=!!t.dot,this.hasWalkedCache=r?r.copy():new PQ}processPatterns(t,r){this.patterns=r;const n=r.map(i=>[t,i]);for(let[i,s]of n){this.hasWalkedCache.storeWalked(i,s);const o=s.root(),a=s.isAbsolute()&&this.opts.absolute!==!1;if(o){i=i.resolve(o==="/"&&this.opts.root!==void 0?this.opts.root:o);const h=s.rest();if(h)s=h;else{this.matches.add(i,!0,!1);continue}}if(i.isENOENT())continue;let l,c,u=!1;for(;typeof(l=s.pattern())=="string"&&(c=s.rest());)i=i.resolve(l),s=c,u=!0;if(l=s.pattern(),c=s.rest(),u){if(this.hasWalkedCache.hasWalked(i,s))continue;this.hasWalkedCache.storeWalked(i,s)}if(typeof l=="string"){const h=l===".."||l===""||l===".";this.matches.add(i.resolve(l),a,h);continue}else if(l===bn){(!i.isSymbolicLink()||this.follow||s.checkFollowGlobstar())&&this.subwalks.add(i,s);const h=c?.pattern(),d=c?.rest();if(!c||(h===""||h===".")&&!d)this.matches.add(i,a,h===""||h===".");else if(h===".."){const g=i.parent||i;d?this.hasWalkedCache.hasWalked(g,d)||this.subwalks.add(g,d):this.matches.add(g,a,!0)}}else l instanceof RegExp&&this.subwalks.add(i,s)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new OI(this.opts,this.hasWalkedCache)}filterEntries(t,r){const n=this.subwalks.get(t),i=this.child();for(const s of r)for(const o of n){const a=o.isAbsolute(),l=o.pattern(),c=o.rest();l===bn?i.testGlobstar(s,o,c,a):l instanceof RegExp?i.testRegExp(s,l,c,a):i.testString(s,l,c,a)}return i}testGlobstar(t,r,n,i){if((this.dot||!t.name.startsWith("."))&&(r.hasMore()||this.matches.add(t,i,!1),t.canReaddir()&&(this.follow||!t.isSymbolicLink()?this.subwalks.add(t,r):t.isSymbolicLink()&&(n&&r.checkFollowGlobstar()?this.subwalks.add(t,n):r.markFollowGlobstar()&&this.subwalks.add(t,r)))),n){const s=n.pattern();if(typeof s=="string"&&s!==".."&&s!==""&&s!==".")this.testString(t,s,n.rest(),i);else if(s===".."){const o=t.parent||t;this.subwalks.add(o,n)}else s instanceof RegExp&&this.testRegExp(t,s,n.rest(),i)}}testRegExp(t,r,n,i){r.test(t.name)&&(n?this.subwalks.add(t,n):this.matches.add(t,i,!1))}testString(t,r,n,i){t.isNamed(r)&&(n?this.subwalks.add(t,n):this.matches.add(t,i,!1))}},IQ=(e,t)=>typeof e=="string"?new LE([e],t):Array.isArray(e)?new LE(e,t):e,II=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#t=[];#e;#s;signal;maxDepth;includeChildMatches;constructor(e,t,r){if(this.patterns=e,this.path=t,this.opts=r,this.#s=!r.posix&&r.platform==="win32"?"\\":"/",this.includeChildMatches=r.includeChildMatches!==!1,(r.ignore||!this.includeChildMatches)&&(this.#e=IQ(r.ignore??[],r),!this.includeChildMatches&&typeof this.#e.add!="function")){const n="cannot ignore child matches, ignore lacks add() method.";throw new Error(n)}this.maxDepth=r.maxDepth||1/0,r.signal&&(this.signal=r.signal,this.signal.addEventListener("abort",()=>{this.#t.length=0}))}#n(e){return this.seen.has(e)||!!this.#e?.ignored?.(e)}#o(e){return!!this.#e?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#t.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#t.push(e):e())}async matchCheck(e,t){if(t&&this.opts.nodir)return;let r;if(this.opts.realpath){if(r=e.realpathCached()||await e.realpath(),!r)return;e=r}const i=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&i?.isSymbolicLink()){const s=await i.realpath();s&&(s.isUnknown()||this.opts.stat)&&await s.lstat()}return this.matchCheckTest(i,t)}matchCheckTest(e,t){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!t||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#n(e)?e:void 0}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let r;if(this.opts.realpath){if(r=e.realpathCached()||e.realpathSync(),!r)return;e=r}const i=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&i?.isSymbolicLink()){const s=i.realpathSync();s&&(s?.isUnknown()||this.opts.stat)&&s.lstatSync()}return this.matchCheckTest(i,t)}matchFinish(e,t){if(this.#n(e))return;if(!this.includeChildMatches&&this.#e?.add){const i=`${e.relativePosix()}/**`;this.#e.add(i)}const r=this.opts.absolute===void 0?t:this.opts.absolute;this.seen.add(e);const n=this.opts.mark&&e.isDirectory()?this.#s:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(r){const i=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(i+n)}else{const i=this.opts.posix?e.relativePosix():e.relative(),s=this.opts.dotRelative&&!i.startsWith(".."+this.#s)?"."+this.#s:"";this.matchEmit(i?s+i+n:"."+n)}}async match(e,t,r){const n=await this.matchCheck(e,r);n&&this.matchFinish(n,t)}matchSync(e,t,r){const n=this.matchCheckSync(e,r);n&&this.matchFinish(n,t)}walkCB(e,t,r){this.signal?.aborted&&r(),this.walkCB2(e,t,new ME(this.opts),r)}walkCB2(e,t,r,n){if(this.#o(e))return n();if(this.signal?.aborted&&n(),this.paused){this.onResume(()=>this.walkCB2(e,t,r,n));return}r.processPatterns(e,t);let i=1;const s=()=>{--i===0&&n()};for(const[o,a,l]of r.matches.entries())this.#n(o)||(i++,this.match(o,a,l).then(()=>s()));for(const o of r.subwalkTargets()){if(this.maxDepth!==1/0&&o.depth()>=this.maxDepth)continue;i++;const a=o.readdirCached();o.calledReaddir()?this.walkCB3(o,a,r,s):o.readdirCB((l,c)=>this.walkCB3(o,c,r,s),!0)}s()}walkCB3(e,t,r,n){r=r.filterEntries(e,t);let i=1;const s=()=>{--i===0&&n()};for(const[o,a,l]of r.matches.entries())this.#n(o)||(i++,this.match(o,a,l).then(()=>s()));for(const[o,a]of r.subwalks.entries())i++,this.walkCB2(o,a,r.child(),s);s()}walkCBSync(e,t,r){this.signal?.aborted&&r(),this.walkCB2Sync(e,t,new ME(this.opts),r)}walkCB2Sync(e,t,r,n){if(this.#o(e))return n();if(this.signal?.aborted&&n(),this.paused){this.onResume(()=>this.walkCB2Sync(e,t,r,n));return}r.processPatterns(e,t);let i=1;const s=()=>{--i===0&&n()};for(const[o,a,l]of r.matches.entries())this.#n(o)||this.matchSync(o,a,l);for(const o of r.subwalkTargets()){if(this.maxDepth!==1/0&&o.depth()>=this.maxDepth)continue;i++;const a=o.readdirSync();this.walkCB3Sync(o,a,r,s)}s()}walkCB3Sync(e,t,r,n){r=r.filterEntries(e,t);let i=1;const s=()=>{--i===0&&n()};for(const[o,a,l]of r.matches.entries())this.#n(o)||this.matchSync(o,a,l);for(const[o,a]of r.subwalks.entries())i++,this.walkCB2Sync(o,a,r.child(),s);s()}},jE=class extends II{matches=new Set;constructor(e,t,r){super(e,t,r)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,t)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?t(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},zE=class extends II{results;constructor(e,t,r){super(e,t,r),this.results=new qm({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){const e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}},$Q=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",$l=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,t){if(!t)throw new TypeError("glob options required");if(this.withFileTypes=!!t.withFileTypes,this.signal=t.signal,this.follow=!!t.follow,this.dot=!!t.dot,this.dotRelative=!!t.dotRelative,this.nodir=!!t.nodir,this.mark=!!t.mark,t.cwd?(t.cwd instanceof URL||t.cwd.startsWith("file://"))&&(t.cwd=(0,aQ.fileURLToPath)(t.cwd)):this.cwd="",this.cwd=t.cwd||"",this.root=t.root,this.magicalBraces=!!t.magicalBraces,this.nobrace=!!t.nobrace,this.noext=!!t.noext,this.realpath=!!t.realpath,this.absolute=t.absolute,this.includeChildMatches=t.includeChildMatches!==!1,this.noglobstar=!!t.noglobstar,this.matchBase=!!t.matchBase,this.maxDepth=typeof t.maxDepth=="number"?t.maxDepth:1/0,this.stat=!!t.stat,this.ignore=t.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(a=>a.replace(/\\/g,"/"))),this.matchBase){if(t.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(a=>a.includes("/")?a:`./**/${a}`)}if(this.pattern=e,this.platform=t.platform||$Q,this.opts={...t,platform:this.platform},t.scurry){if(this.scurry=t.scurry,t.nocase!==void 0&&t.nocase!==t.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{const a=t.platform==="win32"?Fx:t.platform==="darwin"?DI:t.platform?Ox:AQ;this.scurry=new a(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;const r=this.platform==="darwin"||this.platform==="win32",n={...t,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:r,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},i=this.pattern.map(a=>new aa(a,n)),[s,o]=i.reduce((a,l)=>(a[0].push(...l.set),a[1].push(...l.globParts),a),[[],[]]);this.patterns=s.map((a,l)=>{const c=o[l];if(!c)throw new Error("invalid pattern object");return new TI(a,c,0,this.platform)})}async walk(){return[...await new jE(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new jE(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new zE(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new zE(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}},BQ=(e,t={})=>{Array.isArray(e)||(e=[e]);for(const r of e)if(new aa(r,t).hasMagic())return!0;return!1};function T0(e,t={}){return new $l(e,t).streamSync()}function $I(e,t={}){return new $l(e,t).stream()}function Ix(e,t={}){return new $l(e,t).walkSync()}async function UE(e,t={}){return new $l(e,t).walk()}function P0(e,t={}){return new $l(e,t).iterateSync()}function BI(e,t={}){return new $l(e,t).iterate()}var RQ=T0,NQ=Object.assign($I,{sync:T0}),LQ=P0,MQ=Object.assign(BI,{sync:P0}),jQ=Object.assign(Ix,{stream:T0,iterate:P0}),VE=Object.assign(UE,{glob:UE,globSync:Ix,sync:jQ,globStream:$I,stream:NQ,globStreamSync:T0,streamSync:RQ,globIterate:BI,iterate:MQ,globIterateSync:P0,iterateSync:LQ,Glob:$l,hasMagic:BQ,escape:nI,unescape:Ec});VE.glob=VE;/*! Bundled license information: punycode/punycode.js: (*! https://mths.be/punycode v1.4.1 by @mathias *) ieee754/index.js: (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh *) buffer/index.js: (*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT *) safe-buffer/index.js: (*! safe-buffer. MIT License. Feross Aboukhadijeh *) */const zQ=kJ,F0=typeof window>"u",Hm=(e,t=!1)=>t?e:F0&&process?.platform==="win32"?zQ(e):$J(e);function Tn(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 su(e,t={},r){const{collision:n,overrideKeys:i}=t,s={};if(e==null)return s;let o=e[0]||{};r=r||[],typeof o!="object"&&(o=s);for(let a=1;a{Object.keys(n).forEach(i=>{if(["$value","$type"].includes(i)){t=!0;return}const s=n[i];Tn(s)&&r(s)})};return r(e),t}var UQ=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,VQ=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,WQ=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,Yy={Space_Separator:UQ,ID_Start:VQ,ID_Continue:WQ},_r={isSpaceSeparator(e){return typeof e=="string"&&Yy.Space_Separator.test(e)},isIdStartChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||Yy.ID_Start.test(e))},isIdContinueChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="$"||e==="_"||e==="‌"||e==="‍"||Yy.ID_Continue.test(e))},isDigit(e){return typeof e=="string"&&/[0-9]/.test(e)},isHexDigit(e){return typeof e=="string"&&/[0-9A-Fa-f]/.test(e)}};let fv,xn,io,Gm,la,es,qr,$x,Vh;var qQ=function(t,r){fv=String(t),xn="start",io=[],Gm=0,la=1,es=0,qr=void 0,$x=void 0,Vh=void 0;do qr=HQ(),KQ[xn]();while(qr.type!=="eof");return typeof r=="function"?dv({"":Vh},"",r):Vh};function dv(e,t,r){const n=e[t];if(n!=null&&typeof n=="object")if(Array.isArray(n))for(let i=0;i0;){const r=co();if(!_r.isHexDigit(r))throw ir(_t());e+=_t()}return String.fromCodePoint(parseInt(e,16))}const KQ={start(){if(qr.type==="eof")throw Aa();Ky()},beforePropertyName(){switch(qr.type){case"identifier":case"string":$x=qr.value,xn="afterPropertyName";return;case"punctuator":Ld();return;case"eof":throw Aa()}},afterPropertyName(){if(qr.type==="eof")throw Aa();xn="beforePropertyValue"},beforePropertyValue(){if(qr.type==="eof")throw Aa();Ky()},beforeArrayValue(){if(qr.type==="eof")throw Aa();if(qr.type==="punctuator"&&qr.value==="]"){Ld();return}Ky()},afterPropertyValue(){if(qr.type==="eof")throw Aa();switch(qr.value){case",":xn="beforePropertyName";return;case"}":Ld()}},afterArrayValue(){if(qr.type==="eof")throw Aa();switch(qr.value){case",":xn="beforeArrayValue";return;case"]":Ld()}},end(){}};function Ky(){let e;switch(qr.type){case"punctuator":switch(qr.value){case"{":e={};break;case"[":e=[];break}break;case"null":case"boolean":case"numeric":case"string":e=qr.value;break}if(Vh===void 0)Vh=e;else{const t=io[io.length-1];Array.isArray(t)?t.push(e):Object.defineProperty(t,$x,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(e!==null&&typeof e=="object")io.push(e),Array.isArray(e)?xn="beforeArrayValue":xn="beforePropertyName";else{const t=io[io.length-1];t==null?xn="end":Array.isArray(t)?xn="afterArrayValue":xn="afterPropertyValue"}}function Ld(){io.pop();const e=io[io.length-1];e==null?xn="end":Array.isArray(e)?xn="afterArrayValue":xn="afterPropertyValue"}function ir(e){return Ym(e===void 0?`JSON5: invalid end of input at ${la}:${es}`:`JSON5: invalid character '${LI(e)}' at ${la}:${es}`)}function Aa(){return Ym(`JSON5: invalid end of input at ${la}:${es}`)}function WE(){return es-=5,Ym(`JSON5: invalid identifier character at ${la}:${es}`)}function XQ(e){console.warn(`JSON5: '${LI(e)}' in strings is not valid ECMAScript; consider escaping`)}function LI(e){const t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(t[e])return t[e];if(e<" "){const r=e.charCodeAt(0).toString(16);return"\\x"+("00"+r).substring(r.length)}return e}function Ym(e){const t=new SyntaxError(e);return t.lineNumber=la,t.columnNumber=es,t}var JQ=function(t,r,n){const i=[];let s="",o,a,l="",c;if(r!=null&&typeof r=="object"&&!Array.isArray(r)&&(n=r.space,c=r.quote,r=r.replacer),typeof r=="function")a=r;else if(Array.isArray(r)){o=[];for(const f of r){let p;typeof f=="string"?p=f:(typeof f=="number"||f instanceof String||f instanceof Number)&&(p=String(f)),p!==void 0&&o.indexOf(p)<0&&o.push(p)}}return n instanceof Number?n=Number(n):n instanceof String&&(n=String(n)),typeof n=="number"?n>0&&(n=Math.min(10,Math.floor(n)),l=" ".substr(0,n)):typeof n=="string"&&(l=n.substr(0,10)),u("",{"":t});function u(f,p){let m=p[f];switch(m!=null&&(typeof m.toJSON5=="function"?m=m.toJSON5(f):typeof m.toJSON=="function"&&(m=m.toJSON(f))),a&&(m=a.call(p,f,m)),m instanceof Number?m=Number(m):m instanceof String?m=String(m):m instanceof Boolean&&(m=m.valueOf()),m){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof m=="string")return h(m);if(typeof m=="number")return String(m);if(typeof m=="object")return Array.isArray(m)?y(m):d(m)}function h(f){const p={"'":.1,'"':.2},m={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let b="";for(let x=0;xp[x]=0)throw TypeError("Converting circular structure to JSON5");i.push(f);let p=s;s=s+l;let m=o||Object.keys(f),b=[];for(const x of m){const E=u(x,f);if(E!==void 0){let S=g(x)+":";l!==""&&(S+=" "),S+=E,b.push(S)}}let w;if(b.length===0)w="{}";else{let x;if(l==="")x=b.join(","),w="{"+x+"}";else{let E=`, `+s;x=b.join(E),w=`{ `+s+x+`, `+p+"}"}}return i.pop(),s=p,w}function g(f){if(f.length===0)return h(f);const p=String.fromCodePoint(f.codePointAt(0));if(!_r.isIdStartChar(p))return h(f);for(let m=p.length;m=0)throw TypeError("Converting circular structure to JSON5");i.push(f);let p=s;s=s+l;let m=[];for(let w=0;w= 22.6.0 with '--experimental-strip-types' flag - Deno - Bun If you are not able to satisfy the above requirements, consider transpiling the TypeScript file to plain JavaScript before running the Style Dictionary build process.`:s=o.message),new Error(`${s}`)}break}case".json":case".jsonc":case".json5":{try{i=qE.parse(r.readFileSync(n,"utf-8"))}catch(o){throw o instanceof Error&&(s+=o.message),new Error(s)}break}default:console.warn(`Unrecognized file extension: ${Np(e)}. Using JSON5 parser as a default. Alternatively, create a custom parser to handle this filetype https://styledictionary.com/reference/hooks/parsers/`),i=qE.parse(r.readFileSync(n,"utf-8"))}return i}function jI(e,t){for(let r in e){const n=e[r];n!=null&&(t.apply(null,[e,r,n]),typeof n=="object"&&jI(n,t))}}async function HE(e,t=!1,r,n=!0,i={},s,o){const a=o??on,l={};let c=[];for(let u=0;uu.replace(/^\//,"")));for(let u=0;u{Object.hasOwn(y,`${s?"$":""}value`)&&!y.filePath&&(y.filePath=h,y.isSource=n)}),t?su([l,g],{collision:r,overrideKeys:[s?"$value":"value"]}):Object.assign(l,g))}return{tokens:l,usesDtcg:s}}const Jl=`Use log.verbosity "verbose" or use CLI option --verbose for more details. Refer to: https://styledictionary.com/reference/logging/`;class QQ{constructor(){this.groupedMessages={},this.GROUP={PropertyReferenceWarnings:"Property Reference Errors",PropertyValueCollisions:"Property Value Collisions",TemplateDeprecationWarnings:"Template Deprecation Warnings",RegisterTemplateDeprecationWarnings:"Register Template Deprecation Warnings",SassMapFormatDeprecationWarnings:"Sass Map Format Deprecation Warnings",MissingRegisterTransformErrors:"Missing Register Transform Errors",PropertyNameCollisionWarnings:"Property Name Collision Warnings",FilteredOutputReferences:"Filtered Output Reference Warnings",UnknownCSSFontProperties:"Unknown CSS Font Shorthand Properties",TransformErrors:"Transform Errors"}}flush(t){const r=this.fetchMessages(t);return this.clear(t),r}add(t,r){t&&(this.groupedMessages[t]||(this.groupedMessages[t]=[]),this.groupedMessages[t].indexOf(r)===-1&&this.groupedMessages[t].push(r))}remove(t,r){if(t&&this.groupedMessages[t]?.length>0){const n=this.groupedMessages[t].indexOf(r);n!==-1&&this.groupedMessages[t].splice(n,1)}}count(t){return this.groupedMessages[t]?this.groupedMessages[t].length:0}fetchMessages(t){return t&&this.groupedMessages[t]||[]}clear(t){t&&this.groupedMessages[t]&&delete this.groupedMessages[t]}}const _e=new QQ;async function GE(e,t=[],r={},n={}){let i=e;if(Object.entries(r).length>0)for(const o of t){const a=r[o];a&&(i=await a(i,n))}return i}function zI(e){const t=structuredClone(e),r=(n,i)=>{let s=i;const o=Object.keys(n);!o.includes("$type")&&s&&o.includes("$value")&&(n.$type=s),n.$type&&(s=n.$type,n.$value===void 0&&delete n.$type),Object.values(n).forEach(a=>{Tn(a)&&r(a,s)})};return r(t),t}function ttt({dictionary:e,platform:t,options:r,file:n}){const{allTokens:i,tokens:s}=e,{options:o}=t;return n=su([{},{options:o},n]),{dictionary:e,allTokens:i,tokens:s,platform:t,file:n,options:{...r,...n.options||{},usesDtcg:r?.usesDtcg??!1}}}var ett=Object.create,UI=Object.defineProperty,rtt=Object.getOwnPropertyDescriptor,VI=Object.getOwnPropertyNames,ntt=Object.getPrototypeOf,itt=Object.prototype.hasOwnProperty,stt=(e,t)=>function(){return t||(0,e[VI(e)[0]])((t={exports:{}}).exports,t),t.exports},ott=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of VI(t))!itt.call(e,i)&&i!==r&&UI(e,i,{get:()=>t[i],enumerable:!(n=rtt(t,i))||n.enumerable});return e},att=(e,t,r)=>(r=e!=null?ett(ntt(e)):{},ott(UI(r,"default",{value:e,enumerable:!0}),e)),ltt=stt({"node_modules/deepmerge/dist/cjs.js"(e,t){var r=function(x){return n(x)&&!i(x)};function n(w){return!!w&&typeof w=="object"}function i(w){var x=Object.prototype.toString.call(w);return x==="[object RegExp]"||x==="[object Date]"||a(w)}var s=typeof Symbol=="function"&&Symbol.for,o=s?Symbol.for("react.element"):60103;function a(w){return w.$$typeof===o}function l(w){return Array.isArray(w)?[]:{}}function c(w,x){return x.clone!==!1&&x.isMergeableObject(w)?m(l(w),w,x):w}function u(w,x,E){return w.concat(x).map(function(S){return c(S,E)})}function h(w,x){if(!x.customMerge)return m;var E=x.customMerge(w);return typeof E=="function"?E:m}function d(w){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(w).filter(function(x){return Object.propertyIsEnumerable.call(w,x)}):[]}function g(w){return Object.keys(w).concat(d(w))}function y(w,x){try{return x in w}catch{return!1}}function f(w,x){return y(w,x)&&!(Object.hasOwnProperty.call(w,x)&&Object.propertyIsEnumerable.call(w,x))}function p(w,x,E){var S={};return E.isMergeableObject(w)&&g(w).forEach(function(C){S[C]=c(w[C],E)}),g(x).forEach(function(C){f(w,C)||(y(w,C)&&E.isMergeableObject(x[C])?S[C]=h(C,E)(w[C],x[C],E):S[C]=c(x[C],E))}),S}function m(w,x,E){E=E||{},E.arrayMerge=E.arrayMerge||u,E.isMergeableObject=E.isMergeableObject||r,E.cloneUnlessOtherwiseSpecified=c;var S=Array.isArray(x),C=Array.isArray(w),A=S===C;return A?S?E.arrayMerge(w,x,E):p(w,x,E):c(x,E)}m.all=function(x,E){if(!Array.isArray(x))throw new Error("first argument should be an array");return x.reduce(function(S,C){return m(S,C,E)},{})};var b=m;t.exports=b}}),ctt=att(ltt()),utt=ctt.default;const ii=(e,t,r=!0)=>utt(e,t,{isMergeableObject:n=>Array.isArray(n)||Tn(n),arrayMerge:(n,i)=>r&&n.length>0&&i.length>0?Array.from(new Set([...n,...i])):[...n,...i]});function mv(e){if(!Array.isArray(e))throw new Error("Getting name for path failed. Token path must be an array of strings");return e.join(".")}const Bx=WI(),htt=WI(!0);function WI(e=!1){return new RegExp(`${e?"(":""}\\{${e?"":"("}[^}]+${e?"":")"}\\}${e?")":""}`,"g")}function Fi(e){const t=Bx;if(typeof e=="string")return!!e.match(t);if(typeof e=="object"){let r=!1;for(const n in e)if(Object.hasOwn(e,n)){const i=e[n];if(Fi(i)){r=!0;break}}return r}return!1}const YE=_e.GROUP.PropertyReferenceWarnings;function ftt(e,t,r){return Rx(e,t,r)}function Rx(e,t,{usesDtcg:r=!1,warnImmediately:n=!0,ignorePaths:i=new Set,current_context:s="",stack:o=[],foundCirc:a={},firstIteration:l=!0,objectsOnly:c=!1}={}){let u=e;const h=r?"$value":"value",d=htt;return l&&s&&o.push(mv([s])),e.replace(d,g=>{let y=`{${g.slice(1,g.length-1).trim()}}`;if(i.has(g))return"";o.push(g);const f=t.get(y)?.[h],p=m=>c&&typeof m!="object"?u:g===u?m:`${u}`.replace(g,`${m}`);if(typeof f<"u")if(typeof f=="string"&&Fi(f)){if(!Object.hasOwn(a,f))if(o.indexOf(f)!==-1){const m=o.indexOf(f),b=o.slice(m);b.forEach(function(x){a[x]=!0}),b.push(f);const w=`Circular definition cycle for ${s??""} => ${b.join(", ")}`;if(n)throw new Error(w);_e.add(YE,w)}else{const m=Rx(f,t,{ignorePaths:i,usesDtcg:r,warnImmediately:n,current_context:s,stack:o,foundCirc:a,firstIteration:!1});u=p(m)}}else u=p(f);else{const m=`${s?`${s} `:""}tries to reference ${e}, which is not defined.`;if(n)throw new Error(m);_e.add(YE,m)}return o.pop(),g}),u}const KE={ignoreKeys:new Set(["original","key","path","attributes"]),warnImmediately:!1};function gv(e,t){const r={};let{ignoreKeys:n}=KE;t&&t.ignoreKeys instanceof Set&&(n=n.union(t.ignoreKeys));const i={...KE,...t,ignoreKeys:n},s="";for(const[o,a]of Array.from(e)){const l=qI(a,e,i,s,r);e.set(o,l)}}function qI(e,t,r,n,i){for(const s in e){const o=e[s];if(!(r.ignoreKeys&&r.ignoreKeys.has(s))){if(n=e.key,typeof o=="object")qI(o,t,r,n,i);else if(typeof o=="string"&&Fi(o)&&!(r.objectsOnly&&!o.match(/^{[^{}]+?}$/g))){const a=Rx(o,t,{...r,current_context:n,foundCirc:i});a!==void 0&&(e[s]=a)}n=""}}return e}const dtt={border:{style:"strokeStyle",width:"dimension"},transition:{delay:"duration",timingFunction:"cubicBezier"},shadow:{offsetX:"dimension",offsetY:"dimension",blur:"dimension",spread:"dimension"},gradient:{position:"number"},typography:{fontSize:"dimension",letterSpacing:"dimension",lineHeight:"number"},strokeStyle:{dashArray:"dimension"}};function ptt(e,t,r={}){const n=ii(dtt,r),i=n[t],s=n[e];return typeof i=="object"&&i[e]?i[e]:typeof s=="string"?s:e}function mtt(e,t,r){const n=r?.expand??t.expand??!1;let i=!1,s=!1;if(typeof n=="function"||typeof n=="boolean")i=n;else{const a=t.usesDtcg?e.$type:e.type;if(n.include===void 0&&n.exclude===void 0&&(i=!0),n.include&&(i=typeof n.include=="function"?n.include:n.include.includes(a)),n.exclude){if(n.include)throw Error("expand.include should not be combined with expand.exclude, use one or the other.");i=typeof n.exclude=="function"?n.exclude:n.exclude.includes(a),s=!0}}let o=i;return typeof i=="function"&&(o=i(e,t,r)),s?!o:o}function HI(e,t,r,n){const i=r.usesDtcg,s={};Object.keys(e).filter(h=>!["$value","value","$type","type"].filter(d=>i?d.startsWith("$"):!d.startsWith("$")).includes(h)).forEach(h=>{s[h]=e[h]});const o=i?e.$value:e.value,a=i?e.$type:e.type;let l={};const c=n?.expand??r.expand;typeof c=="object"&&(l=c.typesMap??{}),(Array.isArray(o)?o:[o]).forEach((h,d,g)=>{let y=e.key;g.length>1&&(y=y.replace("}",`.${d+1}}`)),Object.entries(h).forEach(([f,p])=>{const m=y.replace("}",`.${f}}`),b={...s,[`${i?"$":""}value`]:p,[`${i?"$":""}type`]:ptt(f,a,l),key:m};Tn(p)?HI(b,t,r,n):(Array.isArray(b.path)&&(g.length>1&&(b.path=[...b.path,`${d+1}`]),b.path=[...b.path,f]),t.set(m,b))})}),t.delete(e.key)}function XE(e,t,r){const n=t.usesDtcg,i=structuredClone(e),s=structuredClone(e);try{gv(s,{usesDtcg:n,objectsOnly:!0})}catch(o){console.error(o)}return Array.from(s).forEach(([,o])=>{let a=n?o.$value:o.value;(Tn(a)||Array.isArray(a)&&a.every(l=>Tn(l)))&&mtt(o,t,r)&&HI(o,i,t,r)}),i}function GI(e,t,r=[],n=[]){for(let i in e)Object.hasOwn(e,i)&&(Tn(e[i])&&Object.hasOwn(e[i],`${t?"$":""}value`)?r.push({...e[i],key:`{${[...n,i].join(".")}}`}):Tn(e[i])&&GI(e[i],t,r,n.concat(i)));return r}function yv(e,t=!1){return GI(e,t)}function JE(e){return new Map(e.map(t=>[t.key,t]))}function ZE(e){const t={};return e.forEach(r=>{const{key:n}=r,i=n.replace("{","").replace("}","").split(".");let s=t;i.forEach((o,a,l)=>{s[o]===void 0&&(s[o]={}),a===l.length-1&&(s[o]=r),s=s[o]})}),t}function eo(e,t){const{usesDtcg:r,output:n}=t,i=Array.isArray(e)?"array":e instanceof Map?"map":"object";switch(n){case"array":{if(i==="object")return yv(e,r);if(i==="map")return Array.from(e).map(([s,o])=>({key:s,...o}));break}case"map":{if(i==="object"){const s=yv(e,r);return JE(s)}else if(i==="array")return JE(e);break}case"object":{if(i==="map"){const s=Array.from(e.values());return ZE(s)}else if(i==="array")return ZE(e);break}}return e}function Km(e){"@babel/helpers - typeof";return Km=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Km(e)}var gtt=/^\s+/,ytt=/\s+$/;function zt(e,t){if(e=e||"",t=t||{},e instanceof zt)return e;if(!(this instanceof zt))return new zt(e,t);var r=btt(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}zt.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),r,n,i,s,o,a;return r=t.r/255,n=t.g/255,i=t.b/255,r<=.03928?s=r/12.92:s=Math.pow((r+.055)/1.055,2.4),n<=.03928?o=n/12.92:o=Math.pow((n+.055)/1.055,2.4),i<=.03928?a=i/12.92:a=Math.pow((i+.055)/1.055,2.4),.2126*s+.7152*o+.0722*a},setAlpha:function(t){return this._a=YI(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=tC(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=tC(this._r,this._g,this._b),r=Math.round(t.h*360),n=Math.round(t.s*100),i=Math.round(t.v*100);return this._a==1?"hsv("+r+", "+n+"%, "+i+"%)":"hsva("+r+", "+n+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=QE(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=QE(this._r,this._g,this._b),r=Math.round(t.h*360),n=Math.round(t.s*100),i=Math.round(t.l*100);return this._a==1?"hsl("+r+", "+n+"%, "+i+"%)":"hsla("+r+", "+n+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return eC(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return _tt(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(pr(this._r,255)*100)+"%",g:Math.round(pr(this._g,255)*100)+"%",b:Math.round(pr(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(pr(this._r,255)*100)+"%, "+Math.round(pr(this._g,255)*100)+"%, "+Math.round(pr(this._b,255)*100)+"%)":"rgba("+Math.round(pr(this._r,255)*100)+"%, "+Math.round(pr(this._g,255)*100)+"%, "+Math.round(pr(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:$tt[eC(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var r="#"+rC(this._r,this._g,this._b,this._a),n=r,i=this._gradientType?"GradientType = 1, ":"";if(t){var s=zt(t);n="#"+rC(s._r,s._g,s._b,s._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+r+",endColorstr="+n+")"},toString:function(t){var r=!!t;t=t||this._format;var n=!1,i=this._a<1&&this._a>=0,s=!r&&i&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return s?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(n=this.toRgbString()),t==="prgb"&&(n=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(n=this.toHexString()),t==="hex3"&&(n=this.toHexString(!0)),t==="hex4"&&(n=this.toHex8String(!0)),t==="hex8"&&(n=this.toHex8String()),t==="name"&&(n=this.toName()),t==="hsl"&&(n=this.toHslString()),t==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return zt(this.toString())},_applyModification:function(t,r){var n=t.apply(null,[this].concat([].slice.call(r)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(Att,arguments)},brighten:function(){return this._applyModification(ktt,arguments)},darken:function(){return this._applyModification(Dtt,arguments)},desaturate:function(){return this._applyModification(Stt,arguments)},saturate:function(){return this._applyModification(Ett,arguments)},greyscale:function(){return this._applyModification(Ctt,arguments)},spin:function(){return this._applyModification(Ttt,arguments)},_applyCombination:function(t,r){return t.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(Ott,arguments)},complement:function(){return this._applyCombination(Ptt,arguments)},monochromatic:function(){return this._applyCombination(Itt,arguments)},splitcomplement:function(){return this._applyCombination(Ftt,arguments)},triad:function(){return this._applyCombination(nC,[3])},tetrad:function(){return this._applyCombination(nC,[4])}};zt.fromRatio=function(e,t){if(Km(e)=="object"){var r={};for(var n in e)e.hasOwnProperty(n)&&(n==="a"?r[n]=e[n]:r[n]=Oh(e[n]));e=r}return zt(e,t)};function btt(e){var t={r:0,g:0,b:0},r=1,n=null,i=null,s=null,o=!1,a=!1;return typeof e=="string"&&(e=Ltt(e)),Km(e)=="object"&&(Ks(e.r)&&Ks(e.g)&&Ks(e.b)?(t=vtt(e.r,e.g,e.b),o=!0,a=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Ks(e.h)&&Ks(e.s)&&Ks(e.v)?(n=Oh(e.s),i=Oh(e.v),t=xtt(e.h,n,i),o=!0,a="hsv"):Ks(e.h)&&Ks(e.s)&&Ks(e.l)&&(n=Oh(e.s),s=Oh(e.l),t=wtt(e.h,n,s),o=!0,a="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=YI(r),{ok:o,format:e.format||a,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}function vtt(e,t,r){return{r:pr(e,255)*255,g:pr(t,255)*255,b:pr(r,255)*255}}function QE(e,t,r){e=pr(e,255),t=pr(t,255),r=pr(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),s,o,a=(n+i)/2;if(n==i)s=o=0;else{var l=n-i;switch(o=a>.5?l/(2-n-i):l/(n+i),n){case e:s=(t-r)/l+(t1&&(h-=1),h<1/6?c+(u-c)*6*h:h<1/2?u:h<2/3?c+(u-c)*(2/3-h)*6:c}if(t===0)n=i=s=r;else{var a=r<.5?r*(1+t):r+t-r*t,l=2*r-a;n=o(l,a,e+1/3),i=o(l,a,e),s=o(l,a,e-1/3)}return{r:n*255,g:i*255,b:s*255}}function tC(e,t,r){e=pr(e,255),t=pr(t,255),r=pr(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),s,o,a=n,l=n-i;if(o=n===0?0:l/n,n==i)s=0;else{switch(n){case e:s=(t-r)/l+(t>1)+720)%360;--t;)n.h=(n.h+i)%360,s.push(zt(n));return s}function Itt(e,t){t=t||6;for(var r=zt(e).toHsv(),n=r.h,i=r.s,s=r.v,o=[],a=1/t;t--;)o.push(zt({h:n,s:i,v:s})),s=(s+a)%1;return o}zt.mix=function(e,t,r){r=r===0?0:r||50;var n=zt(e).toRgb(),i=zt(t).toRgb(),s=r/100,o={r:(i.r-n.r)*s+n.r,g:(i.g-n.g)*s+n.g,b:(i.b-n.b)*s+n.b,a:(i.a-n.a)*s+n.a};return zt(o)};zt.readability=function(e,t){var r=zt(e),n=zt(t);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)};zt.isReadable=function(e,t,r){var n=zt.readability(e,t),i,s;switch(s=!1,i=Mtt(r),i.level+i.size){case"AAsmall":case"AAAlarge":s=n>=4.5;break;case"AAlarge":s=n>=3;break;case"AAAsmall":s=n>=7;break}return s};zt.mostReadable=function(e,t,r){var n=null,i=0,s,o,a,l;r=r||{},o=r.includeFallbackColors,a=r.level,l=r.size;for(var c=0;ci&&(i=s,n=zt(t[c]));return zt.isReadable(e,n,{level:a,size:l})||!o?n:(r.includeFallbackColors=!1,zt.mostReadable(e,["#fff","#000"],r))};var bv=zt.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},$tt=zt.hexNames=Btt(bv);function Btt(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function YI(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function pr(e,t){Rtt(e)&&(e="100%");var r=Ntt(e);return e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function O0(e){return Math.min(1,Math.max(0,e))}function ri(e){return parseInt(e,16)}function Rtt(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function Ntt(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Zi(e){return e.length==1?"0"+e:""+e}function Oh(e){return e<=1&&(e=e*100+"%"),e}function KI(e){return Math.round(parseFloat(e)*255).toString(16)}function iC(e){return ri(e)/255}var Vi=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",r="(?:"+t+")|(?:"+e+")",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",i="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Ks(e){return!!Vi.CSS_UNIT.exec(e)}function Ltt(e){e=e.replace(gtt,"").replace(ytt,"").toLowerCase();var t=!1;if(bv[e])e=bv[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=Vi.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=Vi.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=Vi.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=Vi.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=Vi.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=Vi.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=Vi.hex8.exec(e))?{r:ri(r[1]),g:ri(r[2]),b:ri(r[3]),a:iC(r[4]),format:t?"name":"hex8"}:(r=Vi.hex6.exec(e))?{r:ri(r[1]),g:ri(r[2]),b:ri(r[3]),format:t?"name":"hex"}:(r=Vi.hex4.exec(e))?{r:ri(r[1]+""+r[1]),g:ri(r[2]+""+r[2]),b:ri(r[3]+""+r[3]),a:iC(r[4]+""+r[4]),format:t?"name":"hex8"}:(r=Vi.hex3.exec(e))?{r:ri(r[1]+""+r[1]),g:ri(r[2]+""+r[2]),b:ri(r[3]+""+r[3]),format:t?"name":"hex"}:!1}function Mtt(e){var t,r;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:t,size:r}}const jtt=/([\p{Ll}\d])(\p{Lu})/gu,ztt=/(\p{Lu})([\p{Lu}][\p{Ll}])/gu,Utt=/(\d)\p{Ll}|(\p{L})\d/u,Vtt=/[^\p{L}\d]+/giu,sC="$1\0$2",oC="";function XI(e){let t=e.trim();t=t.replace(jtt,sC).replace(ztt,sC),t=t.replace(Vtt,"\0");let r=0,n=t.length;for(;t.charAt(r)==="\0";)r++;if(r===n)return[];for(;t.charAt(n-1)==="\0";)n--;return t.slice(r,n).split(/\0/g)}function Wtt(e){const t=XI(e);for(let r=0;rc===0?s(l):a(l,c)).join(t?.delimiter??"")+i}function qtt(e,t){return JI(e,{delimiter:"-",...t})}function lC(e,t){return JI(e,{delimiter:"_",...t})}function ZI(e){return e===!1?t=>t.toLowerCase():t=>t.toLocaleLowerCase(e)}function Htt(e){return e===!1?t=>t.toUpperCase():t=>t.toLocaleUpperCase(e)}function Gtt(e,t){return r=>`${t(r[0])}${e(r.slice(1))}`}function QI(e,t={}){const r=t.split??(t.separateNumbers?Wtt:XI),n=t.prefixCharacters??oC,i=t.suffixCharacters??oC;let s=0,o=e.length;for(;ss;){const a=o-1,l=e.charAt(a);if(!i.includes(l))break;o=a}return[e.slice(0,s),r(e.slice(s,o)),e.slice(o)]}function Ytt(e){return F0?e.toString("base64"):new Promise((t,r)=>{const n=new Blob([e],{type:"application/octet-stream"}),i=new FileReader;i.onloadend=()=>{const s=i.result.split(",")[1];t(s)},i.onerror=r,i.readAsDataURL(n)})}async function Ktt(e,t=on){if(typeof e!="string")throw new Error("Token filePath name must be a string");const r=t.readFileSync(Hm(e,t.__custom_fs__));return Ytt(r)}const t$={androidCopyImages:"android/copyImages",copyAssets:"copy_assets"},Nx={warn:"warn",error:"error",disabled:"disabled"},Cu={default:"default",silent:"silent",verbose:"verbose"},e$={throw:"throw",console:"console"},ou={short:"short",long:"long",none:"none"},I0={above:"above",inline:"inline"},r$={short:"short",long:"long",xml:"xml"},Lx={androidColors:"android/colors",androidDimens:"android/dimens",androidFontDimens:"android/fontDimens",androidIntegers:"android/integers",androidResources:"android/resources",androidStrings:"android/strings",composeObject:"compose/object",cssVariables:"css/variables",cssFonts:"css/fonts.css",flutterClassDart:"flutter/class.dart",iosColorsH:"ios/colors.h",iosColorsM:"ios/colors.m",iosMacros:"ios/macros",iosPlist:"ios/plist",iosSingletonH:"ios/singleton.h",iosSingletonM:"ios/singleton.m",iosStaticH:"ios/static.h",iosStaticM:"ios/static.m",iosStringsH:"ios/strings.h",iosStringsM:"ios/strings.m",iosSwiftAnySwift:"ios-swift/any.swift",iosSwiftClassSwift:"ios-swift/class.swift",iosSwiftEnumSwift:"ios-swift/enum.swift",javascriptEs6:"javascript/es6",javascriptEsm:"javascript/esm",javascriptModule:"javascript/module",javascriptModuleFlat:"javascript/module-flat",javascriptObject:"javascript/object",javascriptUmd:"javascript/umd",json:"json",jsonAsset:"json/asset",jsonNested:"json/nested",jsonFlat:"json/flat",sketchPalette:"sketchPalette",sketchPaletteV2:"sketch/palette/v2",lessIcons:"less/icons",lessVariables:"less/variables",scssIcons:"scss/icons",scssMapDeep:"scss/map-deep",scssMapFlat:"scss/map-flat",scssVariables:"scss/variables",stylusVariables:"stylus/variables",typescriptEs6Declarations:"typescript/es6-declarations",typescriptModuleDeclarations:"typescript/module-declarations"},Qr={web:"web",js:"js",scss:"scss",css:"css",less:"less",html:"html",android:"android",compose:"compose",ios:"ios",iosSwift:"ios-swift",iosSwiftSeparate:"ios-swift-separate",assets:"assets",flutter:"flutter",flutterSeparate:"flutter-separate",reactNative:"react-native"},te={attributeCti:"attribute/cti",attributeColor:"attribute/color",nameHuman:"name/human",nameCamel:"name/camel",nameKebab:"name/kebab",nameSnake:"name/snake",nameConstant:"name/constant",namePascal:"name/pascal",colorRgb:"color/rgb",colorHsl:"color/hsl",colorHsl4:"color/hsl-4",colorHex:"color/hex",colorHex8android:"color/hex8android",colorComposeColor:"color/composeColor",colorUIColor:"color/UIColor",colorUIColorSwift:"color/UIColorSwift",colorColorSwiftUI:"color/ColorSwiftUI",colorCss:"color/css",colorSketch:"color/sketch",sizeSp:"size/sp",sizeDp:"size/dp",sizeObject:"size/object",sizeRemToSp:"size/remToSp",sizeRemToDp:"size/remToDp",sizePx:"size/px",sizeRem:"size/rem",sizeRemToPt:"size/remToPt",sizeComposeRemToSp:"size/compose/remToSp",sizeComposeRemToDp:"size/compose/remToDp",sizeComposeEm:"size/compose/em",sizeSwiftRemToCGFloat:"size/swift/remToCGFloat",sizeRemToPx:"size/remToPx",sizePxToRem:"size/pxToRem",htmlIcon:"html/icon",contentQuote:"content/quote",contentObjCLiteral:"content/objC/literal",contentSwiftLiteral:"content/swift/literal",timeSeconds:"time/seconds",fontFamilyCss:"fontFamily/css",cubicBezierCss:"cubicBezier/css",strokeStyleCssShorthand:"strokeStyle/css/shorthand",borderCssShorthand:"border/css/shorthand",typographyCssShorthand:"typography/css/shorthand",transitionCssShorthand:"transition/css/shorthand",shadowCssShorthand:"shadow/css/shorthand",assetUrl:"asset/url",assetBase64:"asset/base64",assetPath:"asset/path",assetObjCLiteral:"asset/objC/literal",assetSwiftLiteral:"asset/swift/literal",colorHex8flutter:"color/hex8flutter",contentFlutterLiteral:"content/flutter/literal",assetFlutterLiteral:"asset/flutter/literal",sizeFlutterRemToDouble:"size/flutter/remToDouble",colorHex8:"color/hex8"},$0={attribute:"attribute",name:"name",value:"value"},Mx={css:"css",sass:"sass",less:"less",stylus:"stylus"},Xtt=Object.freeze(Object.defineProperty({__proto__:null,actions:t$,commentPositions:I0,commentStyles:ou,fileHeaderCommentStyles:r$,formats:Lx,logBrokenReferenceLevels:e$,logVerbosityLevels:Cu,logWarningLevels:Nx,propertyFormatNames:Mx,transformGroups:Qr,transformTypes:$0,transforms:te},Symbol.toStringTag,{value:"Module"})),Jtt=_e.GROUP.UnknownCSSFontProperties,{value:ue,name:Zl,attribute:cC}=$0,Ztt=/&#x([^;]+);/g,uC={};function Bn(e,t){const r=t.usesDtcg?e.$value:e.value;return(t.usesDtcg?e.$type:e.type)==="color"&&zt(r).isValid()&&["linear","radial","conic"].map(i=>`${i}-gradient`).every(i=>!`${r}`.startsWith(i)&&!`${r}`.startsWith(`repeating-${i}`))}function Li(e,t){return(t.usesDtcg?e.$type:e.type)==="dimension"}function bi(e,t){return(t.usesDtcg?e.$type:e.type)==="fontSize"}function Ql(e,t){return(t.usesDtcg?e.$type:e.type)==="asset"}function Md(e,t){return(t.usesDtcg?e.$type:e.type)==="content"}function n$(e,t,r){return`${e}${r.usesDtcg?t.$value:t.value}${e}`}function tc(e,t){return n$('"',e,t)}function Rn(e,t,r){throw`Invalid Number: '${e}: ${t}' is not a valid number, cannot transform to '${r}' `}function Mi(e){return e&&e.basePxFontSize||16}function hC(e){let t=e.trim();const r=t.startsWith("'")&&t.endsWith("'");return r||(t=t.replace(/'/g,"\\'")),new RegExp("\\s+").test(t)&&!r?`'${t}'`:t}function Qtt(e,t){const r=t.usesDtcg?e.$value:e.value,n=t.usesDtcg?e.$type:e.type,i=s=>{let o=s;return typeof o=="string"&&o.includes(",")&&(o=o.split(",").map(a=>a.trim())),Array.isArray(o)?o.map(a=>hC(a)).join(", "):hC(o)};return n==="typography"?r.fontFamily?{...r,fontFamily:i(r.fontFamily)}:r:i(r)}function tet(e,t){const r=t.usesDtcg?e.$value:e.value,n=t.usesDtcg?e.$type:e.type,i=s=>Array.isArray(s)?`cubic-bezier(${s.join(", ")})`:s;return n==="transition"?r.timingFunction?{...r,timingFunction:i(r.timingFunction)}:r:i(r)}const eet={[te.attributeCti]:{type:cC,transform:function(e){const t=["category","type","item","subitem","state"],r=e.attributes||{},n={};for(let i=0;iLi(e,t)||bi(e,t),transform:function(e,t,r){const n=r.usesDtcg?e.$value:e.value,i=parseFloat(n);return isNaN(i)&&Rn(e.name,n,"object"),{original:n,number:i,decimal:i/100,scale:i*Mi(t)}}},[te.sizeRemToSp]:{type:ue,filter:bi,transform:function(e,t,r){const n=r.usesDtcg?e.$value:e.value,i=parseFloat(n),s=Mi(t);return isNaN(i)&&Rn(e.name,n,"sp"),(i*s).toFixed(2)+"sp"}},[te.sizeRemToDp]:{type:ue,filter:Li,transform:function(e,t,r){const n=r.usesDtcg?e.$value:e.value,i=parseFloat(n),s=Mi(t);return isNaN(i)&&Rn(e.name,n,"dp"),(i*s).toFixed(2)+"dp"}},[te.sizePx]:{type:ue,filter:(e,t)=>Li(e,t)||bi(e,t),transform:function(e,t,r){const n=r.usesDtcg?e.$value:e.value,i=parseFloat(n);return isNaN(i)&&Rn(e.name,n,"px"),i+"px"}},[te.sizeRem]:{type:ue,filter:(e,t)=>Li(e,t)||bi(e,t),transform:function(e,t,r){const n=r.usesDtcg?e.$value:e.value;if(`${n}`.match(/[^0-9.-]+$/))return n;const i=parseFloat(n);return isNaN(i)&&Rn(e.name,n,"rem"),i===0?Number.isInteger(n)?0:"0":i+"rem"}},[te.sizeRemToPt]:{type:ue,filter:(e,t)=>Li(e,t)||bi(e,t),transform:function(e,t,r){const n=r.usesDtcg?e.$value:e.value,i=parseFloat(n),s=Mi(t);return isNaN(i)&&Rn(e.name,n,"pt"),(i*s).toFixed(2)+"f"}},[te.sizeComposeRemToSp]:{type:ue,filter:bi,transform:function(e,t,r){const n=r.usesDtcg?e.$value:e.value,i=parseFloat(n),s=Mi(t);return isNaN(i)&&Rn(e.name,n,"sp"),(i*s).toFixed(2)+".sp"}},[te.sizeComposeRemToDp]:{type:ue,filter:Li,transform:function(e,t,r){const n=r.usesDtcg?e.$value:e.value,i=parseFloat(n),s=Mi(t);return isNaN(i)&&Rn(e.name,n,"dp"),(i*s).toFixed(2)+".dp"}},[te.sizeComposeEm]:{type:ue,filter:bi,transform:function(e,t,r){const n=r.usesDtcg?e.$value:e.value,i=parseFloat(n);return isNaN(i)&&Rn(e.name,n,"em"),i+".em"}},[te.sizeSwiftRemToCGFloat]:{type:ue,filter:(e,t)=>Li(e,t)||bi(e,t),transform:function(e,t,r){const n=r.usesDtcg?e.$value:e.value,i=parseFloat(n),s=Mi(t);return isNaN(i)&&Rn(e.name,n,"CGFloat"),`CGFloat(${(i*s).toFixed(2)})`}},[te.sizeRemToPx]:{type:ue,filter:(e,t)=>Li(e,t)||bi(e,t),transform:function(e,t,r){const n=r.usesDtcg?e.$value:e.value,i=parseFloat(n),s=Mi(t);return isNaN(i)&&Rn(e.name,n,"px"),(i*s).toFixed(0)+"px"}},[te.sizePxToRem]:{type:ue,filter:(e,t)=>Li(e,t)||bi(e,t),transform:(e,t,r)=>{const n=r.usesDtcg?e.$value:e.value,i=parseFloat(n),s=Mi(t);return isNaN(i)&&Rn(e.name,n,"rem"),i===0?"0":`${i/s}rem`}},[te.htmlIcon]:{type:ue,filter:function(e,t){return(t.usesDtcg?e.$type:e.type)==="html"},transform:function(e,t,r){return(r.usesDtcg?e.$value:e.value).replace(Ztt,function(n,i){return"'\\"+i+"'"})}},[te.contentQuote]:{type:ue,filter:Md,transform:function(e,t,r){return n$("'",e,r)}},[te.contentObjCLiteral]:{type:ue,filter:Md,transform:function(e,t,r){return"@"+tc(e,r)}},[te.contentSwiftLiteral]:{type:ue,filter:Md,transform:(e,t,r)=>tc(e,r)},[te.timeSeconds]:{type:ue,filter:function(e,t){return(t.usesDtcg?e.$type:e.type)==="time"},transform:function(e,t,r){return(parseFloat(r.usesDtcg?e.$value:e.value)/1e3).toFixed(2)+"s"}},[te.fontFamilyCss]:{type:ue,transitive:!0,filter:(e,t)=>{const r=t.usesDtcg?e.$type:e.type;return!!r&&["fontFamily","typography"].includes(r)},transform:(e,t,r)=>Qtt(e,r)},[te.cubicBezierCss]:{type:ue,transitive:!0,filter:(e,t)=>{const r=t.usesDtcg?e.$type:e.type;return!!r&&["cubicBezier","transition"].includes(r)},transform:(e,t,r)=>tet(e,r)},[te.strokeStyleCssShorthand]:{type:ue,transitive:!0,filter:(e,t)=>(t.usesDtcg?e.$type:e.type)==="strokeStyle",transform:(e,t,r)=>{const n=r.usesDtcg?e.$value:e.value;return typeof n!="object"?n:"dashed"}},[te.borderCssShorthand]:{type:ue,transitive:!0,filter:(e,t)=>(t.usesDtcg?e.$type:e.type)==="border",transform:(e,t,r)=>{const n=r.usesDtcg?e.$value:e.value;if(typeof n!="object")return n;const{color:i,width:s}=n;let{style:o}=n;return typeof o=="object"&&(o="dashed"),`${s?`${s} `:""}${o?`${o}`:"none"}${i?` ${i}`:""}`}},[te.typographyCssShorthand]:{type:ue,transitive:!0,filter:(e,t)=>(t.usesDtcg?e.$type:e.type)==="typography",transform:(e,t,r)=>{const n=r.usesDtcg?e.$value:e.value;if(typeof n!="object")return n;let{fontFamily:i}=n;const{fontWeight:s,fontVariant:o,fontWidth:a,fontSize:l,fontStyle:c,lineHeight:u}=n,h=["fontStyle","fontVariant","fontWeight","fontWidth","fontSize","lineHeight","fontFamily"],d=Object.keys(n).filter(g=>!h.includes(g));return d.length>0&&_e.add(Jtt,`${d.join(", ")} for token at ${e.path.join(".")}${e.filePath?` in ${e.filePath}`:""}`),i=i??"sans-serif",`${c?`${c} `:""}${o?`${o} `:""}${s?`${s} `:""}${a?`${a} `:""}${l?`${l}`:`${Mi(t)}px`}${u?`/${u} `:" "}${i}`}},[te.transitionCssShorthand]:{type:ue,transitive:!0,filter:(e,t)=>(t.usesDtcg?e.$type:e.type)==="transition",transform:(e,t,r)=>{const n=r.usesDtcg?e.$value:e.value;if(typeof n!="object")return n;const{duration:i,delay:s,timingFunction:o}=n;return`${i} ${o} ${s}`}},[te.shadowCssShorthand]:{type:ue,transitive:!0,filter:(e,t)=>(t.usesDtcg?e.$type:e.type)==="shadow",transform:(e,t,r)=>{const n=r.usesDtcg?e.$value:e.value;if(typeof n!="object")return n;const i=s=>{if(typeof s!="object")return s;const{type:o,color:a,offsetX:l,offsetY:c,blur:u,spread:h}=s;return`${o?`${o} `:""}${l??0} ${c??0} ${u??0} ${h?`${h} `:""}${a??"#000000"}`};return Array.isArray(n)?n.map(i).join(", "):i(n)}},[te.assetUrl]:{type:ue,filter:Ql,transform:function(e,t,r){return`url("${(r.usesDtcg?e.$value:e.value).replace(/"/g,'\\"')}")`}},[te.assetBase64]:{type:ue,filter:Ql,transform:function(e,t,r,n){return Ktt(r.usesDtcg?e.$value:e.value,n)}},[te.assetPath]:{type:ue,filter:Ql,transform:function(e,t,r){return vo(process?.cwd()??"/",r.usesDtcg?e.$value:e.value)}},[te.assetObjCLiteral]:{type:ue,filter:Ql,transform:function(e,t,r){return"@"+tc(e,r)}},[te.assetSwiftLiteral]:{type:ue,filter:Ql,transform:(e,t,r)=>tc(e,r)},[te.colorHex8flutter]:{type:ue,filter:Bn,transform:function(e,t,r){const n=zt(r.usesDtcg?e.$value:e.value).toHex8().toUpperCase();return`Color(0x${n.slice(6)}${n.slice(0,6)})`}},[te.contentFlutterLiteral]:{type:ue,filter:Md,transform:(e,t,r)=>tc(e,r)},[te.assetFlutterLiteral]:{type:ue,filter:Ql,transform:(e,t,r)=>tc(e,r)},[te.sizeFlutterRemToDouble]:{type:ue,filter:(e,t)=>Li(e,t)||bi(e,t),transform:function(e,t,r){const n=Mi(t);return(parseFloat(r.usesDtcg?e.$value:e.value)*n).toFixed(2)}}},{attributeCti:Nn,attributeColor:ret,nameHuman:net,nameCamel:ec,nameKebab:jd,nameSnake:iet,namePascal:fC,colorHex:dC,colorHex8android:set,colorComposeColor:oet,colorUIColor:aet,colorUIColorSwift:pC,colorCss:zd,sizeObject:cet,sizeRemToSp:uet,sizeRemToDp:het,sizePx:fet,sizeRem:Ud,sizeRemToPt:det,sizeComposeRemToSp:pet,sizeComposeRemToDp:met,sizeComposeEm:get,sizeSwiftRemToCGFloat:mC,htmlIcon:Xy,contentObjCLiteral:yet,contentSwiftLiteral:gC,timeSeconds:Jy,fontFamilyCss:Zy,cubicBezierCss:Qy,strokeStyleCssShorthand:tb,borderCssShorthand:eb,typographyCssShorthand:rb,transitionCssShorthand:nb,shadowCssShorthand:ib,assetUrl:sb,assetObjCLiteral:bet,assetSwiftLiteral:yC,colorHex8flutter:bC,contentFlutterLiteral:vC,assetFlutterLiteral:wC,sizeFlutterRemToDouble:xC}=te,vet={[Qr.web]:[Nn,jd,fet,zd],[Qr.js]:[Nn,fC,Ud,dC],[Qr.scss]:[Nn,jd,Jy,Xy,Ud,zd,sb,Zy,Qy,tb,eb,rb,nb,ib],[Qr.css]:[Nn,jd,Jy,Xy,Ud,zd,sb,Zy,Qy,tb,eb,rb,nb,ib],[Qr.less]:[Nn,jd,Jy,Xy,Ud,dC,sb,Zy,Qy,tb,eb,rb,nb,ib],[Qr.html]:[Nn,ret,net],[Qr.android]:[Nn,iet,set,uet,het],[Qr.compose]:[Nn,ec,oet,get,pet,met],[Qr.ios]:[Nn,fC,aet,yet,bet,det],[Qr.iosSwift]:[Nn,ec,pC,gC,yC,mC],[Qr.iosSwiftSeparate]:[Nn,ec,pC,gC,yC,mC],[Qr.assets]:[Nn],[Qr.flutter]:[Nn,ec,bC,xC,vC,wC],[Qr.flutterSeparate]:[Nn,ec,bC,xC,vC,wC],[Qr.reactNative]:[ec,zd,cet]};function i$(e){if(typeof e!="string")throw new Error("Getting path from name failed. Token name must be a string");return e.split(".")}function vv(e,t){if(t instanceof Map)return t.get(`{${e.join(".")}}`);let r=t;if(Array.isArray(e)){for(let n=0;n1&&(s=ob);let a;switch(n){case jp:s===o$?a=`// ${t}`:(a=o.reduce((l,c)=>`${l}${i}// ${c} `,""),a=a.replace(/\n$/g,""));break;case s$:o.length>1?(a=o.reduce((l,c)=>`${l}${i} * ${c} `,`${i}/** `),a+=`${i} */`):a=`${s===ob?i:""}/** ${t} */`;break}return s===ob?e=`${a} ${e}`:e=`${e} ${a}`,e}function za({outputReferences:e=!1,outputReferenceFallbacks:t=!1,dictionary:r,format:n,formatting:i={},themeable:s=!1,usesDtcg:o=!1}){const a={};switch(n){case _C:a.prefix="--",a.indentation=" ",a.separator=":";break;case SC:a.prefix="$",a.commentStyle=jp,a.indentation="",a.separator=":";break;case _et:a.prefix="@",a.commentStyle=jp,a.indentation="",a.separator=":";break;case Eet:a.prefix="$",a.commentStyle=jp,a.indentation="",a.separator="=";break}const l={...Cet,...a,...i};let{prefix:c,commentStyle:u,indentation:h,separator:d,suffix:g}=l;const{tokens:y,unfilteredTokens:f}=r;return function(p){let m=`${h}${c}${p.name}${d} `,b=o?p.$value:p.value;const w=o?p.original.$value:p.original.value;if(Fi(w)&&(typeof e=="function"?e(p,{dictionary:r,usesDtcg:o}):e)){const C=ml(w,y,{unfilteredTokens:f,warnImmediately:!1},[]),A=typeof w=="object"&&w!==null;A||(b=w),C.forEach($=>{if(Object.hasOwn($,`${o?"$":""}value`)&&Object.hasOwn($,"name")){const O=o?$.$value:$.value,I=function(){return n===_C?t?`var(${c}${$.name}, ${O})`:`var(${c}${$.name})`:`${c}${$.name}`};b=`${b}`.replace(A?O:new RegExp(`{${$.path.join("\\.")}(\\.\\$?value)?}`,"g"),I)}})}m+=b;const E=typeof p.themeable=="boolean"?p.themeable:s;n===SC&&E&&(m+=" !default"),m+=g;const S=p.$description??p.comment;return S&&u!==xet&&(m=Xm(m,S,l)),m}}const ih=` `,Aet={lineSeparator:ih,prefix:" * ",header:`/**${ih}`,footer:`${ih} */${ih}${ih}`,fileHeaderTimestamp:!1};async function Ee({file:e,commentStyle:t,formatting:r={},options:n={}}){let i=!0;if(typeof e?.options?.showFileHeader<"u"&&(i=e.options.showFileHeader),!i)return"";let s=g=>g??[];e?.options?.fileHeader&&typeof e?.options?.fileHeader!="string"&&(s=e.options.fileHeader);let{prefix:o,lineSeparator:a,header:l,footer:c,fileHeaderTimestamp:u}=Object.assign({},Aet,r);const h=["Do not edit directly, this file was auto-generated.",...u?[`Generated on ${new Date().toUTCString()}`]:[]];t===ou.short?(o="// ",l=`${a}`,c=`${a}${a}`):t==="xml"&&(o=" ",l=``);const d=await s(h,n);return`${l}${d.map(g=>`${o}${g}`).join(a)}${c}`}const ab=-1,lb=1;function Ua(e,{unfilteredTokens:t,usesDtcg:r}={}){const n=r?"$value":"value";function i(s,o){if(typeof s>"u")return ab;if(typeof o>"u")return lb;const a=s.original&&Fi(s.original[n]),l=o.original&&Fi(o.original[n]);if(a&&l){const c=ml(s.original[n],e,{unfilteredTokens:t,warnImmediately:!1}),u=ml(o.original[n],e,{unfilteredTokens:t,warnImmediately:!1});return c.some(h=>h.name===o.name)?lb:u.some(h=>h.name===s.name)?ab:i(c[0],u[0])}return a?lb:l?ab:0}return i}const ket={lineSeparator:` `};function mc({format:e,dictionary:t,outputReferences:r=!1,outputReferenceFallbacks:n,formatting:i={},themeable:s=!1,usesDtcg:o=!1}){let a=t.allTokens;const l=t.tokens;let{lineSeparator:c}=Object.assign({},ket,i);return r&&(a=[...a].sort(Ua(l,{unfilteredTokens:t.unfilteredTokens,usesDtcg:o}))),a.map(za({outputReferences:r,outputReferenceFallbacks:n,dictionary:t,format:e,formatting:i,themeable:s,usesDtcg:o})).filter(function(u){return!!u}).join(c)}function $c(e,t){const{outputStringLiterals:r=!1}=t??{};return Array.isArray(e)?Tet(e):typeof e=="object"?Det(e):r&&typeof e=="string"?`"${e.replace(/"/g,'\\"')}"`:["string","number","boolean"].includes(typeof e)?typeof e:"any"}function Det(e){const t=Object.entries(e);return`{ ${t.map(([r,n],i)=>{const s=t.length===i+1;return`${r}: ${$c(n)}${s?"":", "}`}).join("")} }`}function Tet(e){if(e.length>0){const t=$c(e[0]);return e.every(r=>$c(r)===t)?t+"[]":`(${Array.from(new Set(e.map((r,n)=>{const i=e.length===n+1;return`${$c(r)}${i?"":" | "}`}))).join("")})[]`}return"any[]"}function wv(e,t,r,n){return t.filter(function(i){return i.type==="icon"}).map(function(i){const s=e+i.name+": "+(r.usesDtcg?i.$value:i.value)+";",o="."+n.prefix+"-icon."+i.attributes?.item+":before ",a="{ content: "+e+i.name+"; }";return s+` `+o+a}).join(` `)}function gc(e,t){return t.name>e.name?-1:1}function Jm(e,t=!1){if(typeof e!="object"||Array.isArray(e))return e;const r={};if(Object.hasOwn(e,`${t?"$":""}value`))return t?e.$value:e.value;for(const n in e)Object.hasOwn(e,n)&&(r[n]=Jm(e[n],t));return r}function zp(e,t,r){return e.objectType==null&&(typeof t>"u"?e.objectType="class":e.objectType=t),typeof e.import>"u"?typeof r>"u"?e.import=["UIKit"]:["ios-swift","ios-swift-separate"].includes(r)?e.import=["UIKit"]:e.import=["SwiftUI"]:typeof e.import=="string"&&(e.import=[e.import]),typeof e.accessControl>"u"?e.accessControl="public":e.accessControl!==""&&(e.accessControl=`${e.accessControl}`),e}function a$(e={}){return typeof e.import>"u"?e.import=["androidx.compose.ui.graphics.Color","androidx.compose.ui.unit.*"]:typeof e.import=="string"&&(e.import=[e.import]),e}function l$(e,t){const{strip:r,keep:n,usesDtcg:i}=t;return Object.keys(e).forEach(s=>{Object.hasOwn(e,i?"$value":"value")&&(r&&r.includes(s)&&delete e[s],n&&!n.includes(s)&&delete e[s]),typeof e[s]=="object"&&e[s]!==null&&!Array.isArray(e[s])&&l$(e[s],t)}),e}function c$(e,t){const r=structuredClone(e);return l$(r,t)}const Pet=({dictionary:e,options:t,header:r})=>` ${r} ${e.allTokens.filter(n=>(t.usesDtcg?n.$type:n.type)==="color").map(n=>` ${t.usesDtcg?n.$value:n.value}${n.comment?``:""}`).join(` `)} `,Fet=({dictionary:e,options:t,header:r})=>` ${r} ${e.allTokens.filter(n=>(t.usesDtcg?n.$type:n.type)==="dimension").map(n=>` ${t.usesDtcg?n.$value:n.value}${n.comment?``:""}`).join(` `)} `,Oet=({dictionary:e,options:t,header:r})=>` ${r} ${e.allTokens.filter(n=>(t.usesDtcg?n.$type:n.type)==="fontSize").map(n=>` ${t.usesDtcg?n.$value:n.value}${n.comment?``:""}`).join(` `)} `,Iet=({dictionary:e,options:t,header:r})=>` ${r} ${e.allTokens.filter(n=>(t.usesDtcg?n.$type:n.type)==="time").map(n=>` ${t.usesDtcg?n.$value:n.value}${n.comment?``:""}`).join(` `)} `,EC=_e.GROUP.PropertyReferenceWarnings;function u$(e,t,r){return t instanceof Map?ftt(e,t,r):h$(e,t,r)}function h$(e,t,{usesDtcg:r=!1,warnImmediately:n=!0,ignorePaths:i=[],current_context:s=[],stack:o=[],foundCirc:a={},firstIteration:l=!0}={}){const c=Bx;let u=e,h;const d=r?"$value":"value";return l&&s.length>0&&o.push(mv(s)),e.replace(c,(g,y)=>{y=y.trim();const f=i$(y),p=d===f[f.length-1];if(p&&i.indexOf(y)!==-1)return"";if(!p&&i.indexOf(`${y}.${d}`)!==-1)return"";if(o.push(y),h=vv(f,t),!p&&h&&Object.hasOwn(h,d)&&(h=h[d]),typeof h<"u")if(typeof h=="string"||typeof h=="number"){if(u=e.replace(g,`${h}`),Fi(u)){const m=u.slice(1,-1);if(!Object.hasOwn(a,m))if(o.indexOf(m)!==-1){const b=o.indexOf(m),w=o.slice(b);w.forEach(function(E){a[E]=!0}),w.push(m);const x=`Circular definition cycle: ${w.join(", ")}`;if(n)throw new Error(x);_e.add(EC,"Circular definition cycle: "+w.join(", "))}else u=h$(u,t,{ignorePaths:i,usesDtcg:r,warnImmediately:n,current_context:s,stack:o,foundCirc:a,firstIteration:!1})}typeof h=="number"&&h.toString()===u&&(u=h)}else u=h;else{const m=mv(s),b=`${m?`${m} `:""}tries to reference ${y}, which is not defined.`;if(n)throw new Error(b);_e.add(EC,b),u=h}return o.pop(),""}),u}const $et=_e.GROUP.FilteredOutputReferences;function Bet(e,{dictionary:t,usesDtcg:r}){const n=r?e.original.$value:e.original.value;return ml(n,t.tokens,{unfilteredTokens:t.unfilteredTokens,usesDtcg:r,warnImmediately:!1}).every(s=>{const o=t.allTokens.find(a=>a.name===s.name);return o||_e.remove($et,s.path.join(".")),!!o})}function Ret(e,{dictionary:t,usesDtcg:r}){const n=r?e.original.$value:e.original.value,i=r?e.$value:e.value;return typeof n=="string"?i===u$(n,t.unfilteredTokens??t.tokens,{usesDtcg:r,warnImmediately:!1}):!1}const wf=15,xv=30,_v=19,Net=29,Zm=256,jx=Zm+1+Net,CC=2*jx+1,sh=256,Let=7,AC=16,kC=17,DC=18,cb=8*2,Qm=-1,Met=1,Vd=2,jet=0,yc=0,TC=1,zet=3,Mn=4,Yi=0,f$=1,Wd=2,Ki=-2,Uet=-3,rc=-5;function B0(e){return R0(e.map(([t,r])=>new Array(t).fill(r,0,t)))}function R0(e){return e.reduce((t,r)=>t.concat(Array.isArray(r)?R0(r):r),[])}const PC=[0,1,2,3].concat(...B0([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function or(){const e=this;function t(i){const s=e.dyn_tree,o=e.stat_desc.static_tree,a=e.stat_desc.extra_bits,l=e.stat_desc.extra_base,c=e.stat_desc.max_length;let u,h,d,g,y,f,p=0;for(g=0;g<=wf;g++)i.bl_count[g]=0;for(s[i.heap[i.heap_max]*2+1]=0,u=i.heap_max+1;uc&&(g=c,p++),s[h*2+1]=g,!(h>e.max_code)&&(i.bl_count[g]++,y=0,h>=l&&(y=a[h-l]),f=s[h*2],i.opt_len+=f*(g+y),o&&(i.static_len+=f*(o[h*2+1]+y)));if(p!==0){do{for(g=c-1;i.bl_count[g]===0;)g--;i.bl_count[g]--,i.bl_count[g+1]+=2,i.bl_count[c]--,p-=2}while(p>0);for(g=c;g!==0;g--)for(h=i.bl_count[g];h!==0;)d=i.heap[--u],!(d>e.max_code)&&(s[d*2+1]!=g&&(i.opt_len+=(g-s[d*2+1])*s[d*2],s[d*2+1]=g),h--)}}function r(i,s){let o=0;do o|=i&1,i>>>=1,o<<=1;while(--s>0);return o>>>1}function n(i,s,o){const a=[];let l=0,c,u,h;for(c=1;c<=wf;c++)a[c]=l=l+o[c-1]<<1;for(u=0;u<=s;u++)h=i[u*2+1],h!==0&&(i[u*2]=r(a[h]++,h))}e.build_tree=function(i){const s=e.dyn_tree,o=e.stat_desc.static_tree,a=e.stat_desc.elems;let l,c,u=-1,h;for(i.heap_len=0,i.heap_max=CC,l=0;l=1;l--)i.pqdownheap(s,l);h=a;do l=i.heap[1],i.heap[1]=i.heap[i.heap_len--],i.pqdownheap(s,1),c=i.heap[1],i.heap[--i.heap_max]=l,i.heap[--i.heap_max]=c,s[h*2]=s[l*2]+s[c*2],i.depth[h]=Math.max(i.depth[l],i.depth[c])+1,s[l*2+1]=s[c*2+1]=h,i.heap[1]=h++,i.pqdownheap(s,1);while(i.heap_len>=2);i.heap[--i.heap_max]=i.heap[1],t(i),n(s,e.max_code,i.bl_count)}}or._length_code=[0,1,2,3,4,5,6,7].concat(...B0([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]]));or.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0];or.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576];or.d_code=function(e){return e<256?PC[e]:PC[256+(e>>>7)]};or.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];or.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];or.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];or.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function rn(e,t,r,n,i){const s=this;s.static_tree=e,s.extra_bits=t,s.extra_base=r,s.elems=n,s.max_length=i}const Vet=[12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227],Wet=B0([[144,8],[112,9],[24,7],[8,8]]);rn.static_ltree=R0(Vet.map((e,t)=>[e,Wet[t]]));const qet=[0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23],Het=B0([[30,5]]);rn.static_dtree=R0(qet.map((e,t)=>[e,Het[t]]));rn.static_l_desc=new rn(rn.static_ltree,or.extra_lbits,Zm+1,jx,wf);rn.static_d_desc=new rn(rn.static_dtree,or.extra_dbits,0,xv,wf);rn.static_bl_desc=new rn(null,or.extra_blbits,0,_v,Let);const Get=9,Yet=8;function ms(e,t,r,n,i){const s=this;s.good_length=e,s.max_lazy=t,s.nice_length=r,s.max_chain=n,s.func=i}const d$=0,Up=1,Na=2,ji=[new ms(0,0,0,0,d$),new ms(4,4,8,4,Up),new ms(4,5,16,8,Up),new ms(4,6,32,32,Up),new ms(4,4,16,16,Na),new ms(8,16,32,32,Na),new ms(8,16,128,128,Na),new ms(8,32,128,256,Na),new ms(32,128,258,1024,Na),new ms(32,258,258,4096,Na)],qd=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],vi=0,Hd=1,oh=2,Gd=3,Ket=32,ub=42,Yd=113,ah=666,hb=8,Xet=0,fb=1,Jet=2,hr=3,Vp=258,ti=Vp+hr+1;function FC(e,t,r,n){const i=e[t*2],s=e[r*2];return i=3&&F[or.bl_order[rt]*2+1]===0;rt--);return e.opt_len+=3*(rt+1)+5+5+4,rt}function vt(rt){e.pending_buf[e.pending++]=rt}function Ct(rt){vt(rt&255),vt(rt>>>8&255)}function Dt(rt){vt(rt>>8&255),vt(rt&255&255)}function Rt(rt,D){let P;const j=D;nt>cb-j?(P=rt,Z|=P<>>cb-nt,nt+=j-cb):(Z|=rt<=8&&(vt(Z&255),Z>>>=8,nt-=8)}function Kt(){Rt(fb<<1,3),Ot(sh,rn.static_ltree),mt(),1+V+10-nt<9&&(Rt(fb<<1,3),Ot(sh,rn.static_ltree),mt()),V=7}function Jt(rt,D){let P,j,X;if(e.dist_buf[W]=rt,e.lc_buf[W]=D&255,W++,rt===0?G[D*2]++:(z++,rt--,G[(or._length_code[D]+Zm+1)*2]++,Y[or.d_code(rt)*2]++),(W&8191)===0&&I>2){for(P=W*8,j=E-m,X=0;X>>=3,z8?Ct(Z):nt>0&&vt(Z&255),Z=0,nt=0}function ut(rt,D,P){Me(),V=8,Ct(D),Ct(~D),e.pending_buf.set(l.subarray(rt,rt+D),e.pending),e.pending+=D}function dt(rt,D,P){Rt((Xet<<1)+(P?1:0),3),ut(rt,D)}function kt(rt,D,P){let j,X,st=0;I>0?(T.build_tree(e),N.build_tree(e),st=pt(),j=e.opt_len+3+7>>>3,X=e.static_len+3+7>>>3,X<=j&&(j=X)):j=X=D+5,D+4<=j&&rt!=-1?dt(rt,D,P):X==j?(Rt((fb<<1)+(P?1:0),3),re(rn.static_ltree,rn.static_dtree)):(Rt((Jet<<1)+(P?1:0),3),ve(T.max_code+1,N.max_code+1,st+1),re(G,Y)),it(),P&&Me()}function k(rt){kt(m>=0?m:-1,E-m,rt),m=E,t.flush_pending()}function v(){let rt,D,P,j;do{if(j=c-C-E,j===0&&E===0&&C===0)j=s;else if(j==-1)j--;else if(E>=s+s-ti){l.set(l.subarray(s,s+s),0),S-=s,E-=s,m-=s,rt=g,P=rt;do D=h[--P]&65535,h[P]=D>=s?D-s:0;while(--rt!==0);rt=s,P=rt;do D=u[--P]&65535,u[P]=D>=s?D-s:0;while(--rt!==0);j+=s}if(t.avail_in===0)return;rt=t.read_buf(l,E+C,j),C+=rt,C>=hr&&(d=l[E]&255,d=(d<n-5&&(D=n-5);;){if(C<=1){if(v(),C===0&&rt==yc)return vi;if(C===0)break}if(E+=C,C=0,P=m+D,(E===0||E>=P)&&(C=E-P,E=P,k(!1),t.avail_out===0)||E-m>=s-ti&&(k(!1),t.avail_out===0))return vi}return k(rt==Mn),t.avail_out===0?rt==Mn?oh:vi:rt==Mn?Gd:Hd}function B(rt){let D=$,P=E,j,X,st=A;const at=E>s-ti?E-(s-ti):0;let gt=H;const Et=a,Mt=E+Vp;let ce=l[P+st-1],be=l[P+st];A>=q&&(D>>=2),gt>C&&(gt=C);do if(j=rt,!(l[j+st]!=be||l[j+st-1]!=ce||l[j]!=l[P]||l[++j]!=l[P+1])){P+=2,j++;do;while(l[++P]==l[++j]&&l[++P]==l[++j]&&l[++P]==l[++j]&&l[++P]==l[++j]&&l[++P]==l[++j]&&l[++P]==l[++j]&&l[++P]==l[++j]&&l[++P]==l[++j]&&Pst){if(S=rt,st=X,X>=gt)break;ce=l[P+st-1],be=l[P+st]}}while((rt=u[rt&Et]&65535)>at&&--D!==0);return st<=C?st:C}function K(rt){let D=0,P;for(;;){if(C=hr&&(d=(d<=hr)if(P=Jt(E-S,b-hr),C-=b,b<=O&&C>=hr){b--;do E++,d=(d<=hr&&(d=(d<4096)&&(b=hr-1)),A>=hr&&b<=A){j=E+C-hr,P=Jt(E-1-w,A-hr),C-=A-1,A-=2;do++E<=j&&(d=(d<Get||j!=hb||P<9||P>15||D<0||D>9||st<0||st>Vd?Ki:(rt.dstate=e,o=P,s=1<9||P<0||P>Vd?Ki:(ji[I].func!=ji[D].func&&rt.total_in!==0&&(j=rt.deflate(TC)),I!=D&&(I=D,O=ji[I].max_lazy,q=ji[I].good_length,H=ji[I].nice_length,$=ji[I].max_chain),M=P,j)},e.deflateSetDictionary=function(rt,D,P){let j=P,X,st=0;if(!D||r!=ub)return Ki;if(js-ti&&(j=s-ti,st=P-j),l.set(D.subarray(st,st+j),0),E=j,m=j,d=l[0]&255,d=(d<Mn||D<0)return Ki;if(!rt.next_out||!rt.next_in&&rt.avail_in!==0||r==ah&&D!=Mn)return rt.msg=qd[Wd-Ki],Ki;if(rt.avail_out===0)return rt.msg=qd[Wd-rc],rc;if(t=rt,st=i,i=D,r==ub&&(j=hb+(o-8<<4)<<8,X=(I-1&255)>>1,X>3&&(X=3),j|=X<<6,E!==0&&(j|=Ket),j+=31-j%31,r=Yd,Dt(j)),e.pending!==0){if(t.flush_pending(),t.avail_out===0)return i=-1,Yi}else if(t.avail_in===0&&D<=st&&D!=Mn)return t.msg=qd[Wd-rc],rc;if(r==ah&&t.avail_in!==0)return rt.msg=qd[Wd-rc],rc;if(t.avail_in!==0||C!==0||D!=yc&&r!=ah){switch(at=-1,ji[I].func){case d$:at=_(D);break;case Up:at=K(D);break;case Na:at=tt(D);break}if((at==oh||at==Gd)&&(r=ah),at==vi||at==oh)return t.avail_out===0&&(i=-1),Yi;if(at==Hd){if(D==TC)Kt();else if(dt(0,0,!1),D==zet)for(P=0;Pr&&(i=r),i===0?0:(n.avail_in-=i,e.set(n.next_in.subarray(n.next_in_index,n.next_in_index+i),t),n.next_in_index+=i,n.total_in+=i,i)},flush_pending(){const e=this;let t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+t),e.next_out_index),e.next_out_index+=t,e.dstate.pending_out+=t,e.total_out+=t,e.avail_out-=t,e.dstate.pending-=t,e.dstate.pending===0&&(e.dstate.pending_out=0))}};function Qet(e){const t=this,r=new p$,n=trt(e&&e.chunkSize?e.chunkSize:64*1024),i=yc,s=new Uint8Array(n);let o=e?e.level:Qm;typeof o>"u"&&(o=Qm),r.deflateInit(o),r.next_out=s,t.append=function(a,l){let c,u,h=0,d=0,g=0;const y=[];if(a.length){r.next_in_index=0,r.next_in=a,r.avail_in=a.length;do{if(r.next_out_index=0,r.avail_out=n,c=r.deflate(i),c!=Yi)throw new Error("deflating: "+r.msg);r.next_out_index&&(r.next_out_index==n?y.push(new Uint8Array(s)):y.push(s.subarray(0,r.next_out_index))),g+=r.next_out_index,l&&r.next_in_index>0&&r.next_in_index!=h&&(l(r.next_in_index),h=r.next_in_index)}while(r.avail_in>0||r.avail_out===0);return y.length>1?(u=new Uint8Array(g),y.forEach(function(f){u.set(f,d),d+=f.length})):u=y[0]?new Uint8Array(y[0]):new Uint8Array,u}},t.flush=function(){let a,l,c=0,u=0;const h=[];do{if(r.next_out_index=0,r.avail_out=n,a=r.deflate(Mn),a!=f$&&a!=Yi)throw new Error("deflating: "+r.msg);n-r.avail_out>0&&h.push(s.slice(0,r.next_out_index)),u+=r.next_out_index}while(r.avail_in>0||r.avail_out===0);return r.deflateEnd(),l=new Uint8Array(u),h.forEach(function(d){l.set(d,c),c+=d.length}),l}}function trt(e){return e+5*(Math.floor(e/16383)+1)}const ert=15,Ue=0,uo=1,rrt=2,zn=-2,ar=-3,OC=-4,ho=-5,ni=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],m$=1440,nrt=0,irt=4,srt=9,ort=5,art=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],lrt=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],crt=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],urt=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],hrt=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],frt=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Lo=15;function Sv(){const e=this;let t,r,n,i,s,o;function a(c,u,h,d,g,y,f,p,m,b,w){let x,E,S,C,A,$,O,I,M,q,H,G,Y,F,T;q=0,A=h;do n[c[u+q]]++,q++,A--;while(A!==0);if(n[0]==h)return f[0]=-1,p[0]=0,Ue;for(I=p[0],$=1;$<=Lo&&n[$]===0;$++);for(O=$,I<$&&(I=$),A=Lo;A!==0&&n[A]===0;A--);for(S=A,I>A&&(I=A),p[0]=I,F=1<<$;$G+I;){if(C++,G+=I,T=S-G,T=T>I?I:T,(E=1<<($=O-G))>x+1&&(E-=x+1,Y=O,$m$)return ar;s[C]=H=b[0],b[0]+=T,C!==0?(o[C]=A,i[0]=$,i[1]=I,$=A>>>G-I,i[2]=H-s[C-1]-$,m.set(i,(s[C-1]+$)*3)):f[0]=H}for(i[1]=O-G,q>=h?i[0]=192:w[q]>>G;$>>=1)A^=$;for(A^=$,M=(1<257?(b==ar?m.msg="oversubscribed distance tree":b==ho?(m.msg="incomplete distance tree",b=ar):b!=OC&&(m.msg="empty distance tree with lengths",b=ar),b):Ue)}}Sv.inflate_trees_fixed=function(e,t,r,n){return e[0]=srt,t[0]=ort,r[0]=art,n[0]=lrt,Ue};const Kd=0,IC=1,$C=2,BC=3,RC=4,NC=5,LC=6,db=7,MC=8,Xd=9;function drt(){const e=this;let t,r=0,n,i=0,s=0,o=0,a=0,l=0,c=0,u=0,h,d=0,g,y=0;function f(p,m,b,w,x,E,S,C){let A,$,O,I,M,q,H,G,Y,F,T,N,U,J,W,z;H=C.next_in_index,G=C.avail_in,M=S.bitb,q=S.bitk,Y=S.write,F=Y>=$[z+1],q-=$[z+1],S.win[Y++]=$[z+2],F--;continue}do{if(M>>=$[z+1],q-=$[z+1],(I&16)!==0){for(I&=15,U=$[z+2]+(M&ni[I]),M>>=I,q-=I;q<15;)G--,M|=(C.read_byte(H++)&255)<>=$[z+1],q-=$[z+1],(I&16)!==0){for(I&=15;q>=I,q-=I,F-=U,Y>=J)W=Y-J,Y-W>0&&2>Y-W?(S.win[Y++]=S.win[W++],S.win[Y++]=S.win[W++],U-=2):(S.win.set(S.win.subarray(W,W+2),Y),Y+=2,W+=2,U-=2);else{W=Y-J;do W+=S.end;while(W<0);if(I=S.end-W,U>I){if(U-=I,Y-W>0&&I>Y-W)do S.win[Y++]=S.win[W++];while(--I!==0);else S.win.set(S.win.subarray(W,W+I),Y),Y+=I,W+=I,I=0;W=0}}if(Y-W>0&&U>Y-W)do S.win[Y++]=S.win[W++];while(--U!==0);else S.win.set(S.win.subarray(W,W+U),Y),Y+=U,W+=U,U=0;break}else if((I&64)===0)A+=$[z+2],A+=M&ni[I],z=(O+A)*3,I=$[z];else return C.msg="invalid distance code",U=C.avail_in-G,U=q>>3>3:U,G+=U,H-=U,q-=U<<3,S.bitb=M,S.bitk=q,C.avail_in=G,C.total_in+=H-C.next_in_index,C.next_in_index=H,S.write=Y,ar;while(!0);break}if((I&64)===0){if(A+=$[z+2],A+=M&ni[I],z=(O+A)*3,(I=$[z])===0){M>>=$[z+1],q-=$[z+1],S.win[Y++]=$[z+2],F--;break}}else return(I&32)!==0?(U=C.avail_in-G,U=q>>3>3:U,G+=U,H-=U,q-=U<<3,S.bitb=M,S.bitk=q,C.avail_in=G,C.total_in+=H-C.next_in_index,C.next_in_index=H,S.write=Y,uo):(C.msg="invalid literal/length code",U=C.avail_in-G,U=q>>3>3:U,G+=U,H-=U,q-=U<<3,S.bitb=M,S.bitk=q,C.avail_in=G,C.total_in+=H-C.next_in_index,C.next_in_index=H,S.write=Y,ar)}while(!0)}while(F>=258&&G>=10);return U=C.avail_in-G,U=q>>3>3:U,G+=U,H-=U,q-=U<<3,S.bitb=M,S.bitk=q,C.avail_in=G,C.total_in+=H-C.next_in_index,C.next_in_index=H,S.write=Y,Ue}e.init=function(p,m,b,w,x,E){t=Kd,c=p,u=m,h=b,d=w,g=x,y=E,n=null},e.proc=function(p,m,b){let w,x,E,S=0,C=0,A=0,$,O,I,M;for(A=m.next_in_index,$=m.avail_in,S=p.bitb,C=p.bitk,O=p.write,I=O=258&&$>=10&&(p.bitb=S,p.bitk=C,m.avail_in=$,m.total_in+=A-m.next_in_index,m.next_in_index=A,p.write=O,b=f(c,u,h,d,g,y,p,m),A=m.next_in_index,$=m.avail_in,S=p.bitb,C=p.bitk,O=p.write,I=O>>=n[x+1],C-=n[x+1],E=n[x],E===0){o=n[x+2],t=LC;break}if((E&16)!==0){a=E&15,r=n[x+2],t=$C;break}if((E&64)===0){s=E,i=x/3+n[x+2];break}if((E&32)!==0){t=db;break}return t=Xd,m.msg="invalid literal/length code",b=ar,p.bitb=S,p.bitk=C,m.avail_in=$,m.total_in+=A-m.next_in_index,m.next_in_index=A,p.write=O,p.inflate_flush(m,b);case $C:for(w=a;C>=w,C-=w,s=u,n=g,i=y,t=BC;case BC:for(w=s;C>=n[x+1],C-=n[x+1],E=n[x],(E&16)!==0){a=E&15,l=n[x+2],t=RC;break}if((E&64)===0){s=E,i=x/3+n[x+2];break}return t=Xd,m.msg="invalid distance code",b=ar,p.bitb=S,p.bitk=C,m.avail_in=$,m.total_in+=A-m.next_in_index,m.next_in_index=A,p.write=O,p.inflate_flush(m,b);case RC:for(w=a;C>=w,C-=w,t=NC;case NC:for(M=O-l;M<0;)M+=p.end;for(;r!==0;){if(I===0&&(O==p.end&&p.read!==0&&(O=0,I=O7&&(C-=8,$++,A--),p.write=O,b=p.inflate_flush(m,b),O=p.write,I=Of.avail_out&&(m=f.avail_out),m!==0&&p==ho&&(p=Ue),f.avail_out-=m,f.total_out+=m,f.next_out.set(r.win.subarray(w,w+m),b),b+=m,w+=m,w==r.end&&(w=0,r.write==r.end&&(r.write=0),m=r.write-w,m>f.avail_out&&(m=f.avail_out),m!==0&&p==ho&&(p=Ue),f.avail_out-=m,f.total_out+=m,f.next_out.set(r.win.subarray(w,w+m),b),b+=m,w+=m),f.next_out_index=b,r.read=w,p},r.proc=function(f,p){let m,b,w,x,E,S,C,A;for(x=f.next_in_index,E=f.avail_in,b=r.bitb,w=r.bitk,S=r.write,C=S>>1){case 0:b>>>=3,w-=3,m=w&7,b>>>=m,w-=m,n=pb;break;case 1:$=[],O=[],I=[[]],M=[[]],Sv.inflate_trees_fixed($,O,I,M),u.init($[0],O[0],I[0],0,M[0],0),b>>>=3,w-=3,n=Jd;break;case 2:b>>>=3,w-=3,n=UC;break;case 3:return b>>>=3,w-=3,n=ka,f.msg="invalid block type",p=ar,r.bitb=b,r.bitk=w,f.avail_in=E,f.total_in+=x-f.next_in_index,f.next_in_index=x,r.write=S,r.inflate_flush(f,p)}break;case pb:for(;w<32;){if(E!==0)p=Ue;else return r.bitb=b,r.bitk=w,f.avail_in=E,f.total_in+=x-f.next_in_index,f.next_in_index=x,r.write=S,r.inflate_flush(f,p);E--,b|=(f.read_byte(x++)&255)<>>16&65535)!=(b&65535))return n=ka,f.msg="invalid stored block lengths",p=ar,r.bitb=b,r.bitk=w,f.avail_in=E,f.total_in+=x-f.next_in_index,f.next_in_index=x,r.write=S,r.inflate_flush(f,p);i=b&65535,b=w=0,n=i!==0?zC:h!==0?Zd:nc;break;case zC:if(E===0||C===0&&(S==r.end&&r.read!==0&&(S=0,C=SE&&(m=E),m>C&&(m=C),r.win.set(f.read_buf(x,m),S),x+=m,E-=m,S+=m,C-=m,(i-=m)!==0)break;n=h!==0?Zd:nc;break;case UC:for(;w<14;){if(E!==0)p=Ue;else return r.bitb=b,r.bitk=w,f.avail_in=E,f.total_in+=x-f.next_in_index,f.next_in_index=x,r.write=S,r.inflate_flush(f,p);E--,b|=(f.read_byte(x++)&255)<29||(m>>5&31)>29)return n=ka,f.msg="too many length or distance symbols",p=ar,r.bitb=b,r.bitk=w,f.avail_in=E,f.total_in+=x-f.next_in_index,f.next_in_index=x,r.write=S,r.inflate_flush(f,p);if(m=258+(m&31)+(m>>5&31),!a||a.length>>=14,w-=14,o=0,n=VC;case VC:for(;o<4+(s>>>10);){for(;w<3;){if(E!==0)p=Ue;else return r.bitb=b,r.bitk=w,f.avail_in=E,f.total_in+=x-f.next_in_index,f.next_in_index=x,r.write=S,r.inflate_flush(f,p);E--,b|=(f.read_byte(x++)&255)<>>=3,w-=3}for(;o<19;)a[jC[o++]]=0;if(l[0]=7,m=y.inflate_trees_bits(a,l,c,d,f),m!=Ue)return p=m,p==ar&&(a=null,n=ka),r.bitb=b,r.bitk=w,f.avail_in=E,f.total_in+=x-f.next_in_index,f.next_in_index=x,r.write=S,r.inflate_flush(f,p);o=0,n=WC;case WC:for(;m=s,!(o>=258+(m&31)+(m>>5&31));){let F,T;for(m=l[0];w>>=m,w-=m,a[o++]=T;else{for(A=T==18?7:T-14,F=T==18?11:3;w>>=m,w-=m,F+=b&ni[A],b>>>=A,w-=A,A=o,m=s,A+F>258+(m&31)+(m>>5&31)||T==16&&A<1)return a=null,n=ka,f.msg="invalid bit length repeat",p=ar,r.bitb=b,r.bitk=w,f.avail_in=E,f.total_in+=x-f.next_in_index,f.next_in_index=x,r.write=S,r.inflate_flush(f,p);T=T==16?a[A-1]:0;do a[A++]=T;while(--F!==0);o=A}}if(c[0]=-1,q=[],H=[],G=[],Y=[],q[0]=9,H[0]=6,m=s,m=y.inflate_trees_dynamic(257+(m&31),1+(m>>5&31),a,q,H,G,Y,d,f),m!=Ue)return m==ar&&(a=null,n=ka),p=m,r.bitb=b,r.bitk=w,f.avail_in=E,f.total_in+=x-f.next_in_index,f.next_in_index=x,r.write=S,r.inflate_flush(f,p);u.init(q[0],H[0],d,G[0],d,Y[0]),n=Jd;case Jd:if(r.bitb=b,r.bitk=w,f.avail_in=E,f.total_in+=x-f.next_in_index,f.next_in_index=x,r.write=S,(p=u.proc(r,f,p))!=uo)return r.inflate_flush(f,p);if(p=Ue,u.free(f),x=f.next_in_index,E=f.avail_in,b=r.bitb,w=r.bitk,S=r.write,C=S15?(e.inflateEnd(r),zn):(e.wbits=n,r.istate.blocks=new prt(r,1<>4)+8>o.wbits){o.mode=Mo,r.msg="invalid win size",o.marker=5;break}o.mode=HC;case HC:if(r.avail_in===0)return i;if(i=n,r.avail_in--,r.total_in++,s=r.read_byte(r.next_in_index++)&255,((o.method<<8)+s)%31!==0){o.mode=Mo,r.msg="incorrect header check",o.marker=5;break}if((s&mrt)===0){o.mode=lh;break}o.mode=GC;case GC:if(r.avail_in===0)return i;i=n,r.avail_in--,r.total_in++,o.need=(r.read_byte(r.next_in_index++)&255)<<24&4278190080,o.mode=YC;case YC:if(r.avail_in===0)return i;i=n,r.avail_in--,r.total_in++,o.need+=(r.read_byte(r.next_in_index++)&255)<<16&16711680,o.mode=KC;case KC:if(r.avail_in===0)return i;i=n,r.avail_in--,r.total_in++,o.need+=(r.read_byte(r.next_in_index++)&255)<<8&65280,o.mode=XC;case XC:return r.avail_in===0?i:(i=n,r.avail_in--,r.total_in++,o.need+=r.read_byte(r.next_in_index++)&255,o.mode=mb,rrt);case mb:return o.mode=Mo,r.msg="need dictionary",o.marker=0,zn;case lh:if(i=o.blocks.proc(r,i),i==ar){o.mode=Mo,o.marker=0;break}if(i==Ue&&(i=n),i!=uo)return i;i=n,o.blocks.reset(r,o.was),o.mode=JC;case JC:return r.avail_in=0,uo;case Mo:return ar;default:return zn}},e.inflateSetDictionary=function(r,n,i){let s=0,o=i;if(!r||!r.istate||r.istate.mode!=mb)return zn;const a=r.istate;return o>=1<0&&r.next_in_index!=d&&(l(r.next_in_index),d=r.next_in_index)}while(r.avail_in>0||r.avail_out===0);return c.length>1?(h=new Uint8Array(y),c.forEach(function(f){h.set(f,g),g+=f.length})):h=c[0]?new Uint8Array(c[0]):new Uint8Array,h}},t.flush=function(){r.inflateEnd()}}const Ar=4294967295,yr=65535,Ev=8,y$=0,b$=99,v$=67324752,zx=134695760,xrt=zx,Cv=33639248,w$=101010256,Av=101075792,x$=117853008,no=22,Wh=20,qh=56,_rt=no+Wh+qh,_$=1,S$=39169,E$=10,C$=1,Ux=21589,Srt=28789,Ert=25461,A$=6534,kv=1,Crt=6,Dv=8,Tv=2048,Pv=16,Fv=16384,Ov=73,ZC=420,Art=20,QC=45,tA=51,Hh="/",eA=new Date(2107,11,31),rA=new Date(1980,0,1),We=void 0,ca="undefined",ed="function";class nA{constructor(t){return class extends TransformStream{constructor(r,n){const i=new t(n);super({transform(s,o){o.enqueue(i.append(s))},flush(s){const o=i.flush();o&&s.enqueue(o)}})}}}}const krt=64;let k$=2;try{typeof navigator!=ca&&navigator.hardwareConcurrency&&(k$=navigator.hardwareConcurrency)}catch{}const Drt={chunkSize:512*1024,maxWorkers:k$,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:We,CompressionStreamNative:typeof CompressionStream!=ca&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=ca&&DecompressionStream},Ho=Object.assign({},Drt);function D$(){return Ho}function T$(e){return Math.max(e.chunkSize,krt)}function Vx(e){const{baseURL:t,chunkSize:r,maxWorkers:n,terminateWorkerTimeout:i,useCompressionStream:s,useWebWorkers:o,Deflate:a,Inflate:l,CompressionStream:c,DecompressionStream:u,workerScripts:h}=e;if(jo("baseURL",t),jo("chunkSize",r),jo("maxWorkers",n),jo("terminateWorkerTimeout",i),jo("useCompressionStream",s),jo("useWebWorkers",o),a&&(Ho.CompressionStream=new nA(a)),l&&(Ho.DecompressionStream=new nA(l)),jo("CompressionStream",c),jo("DecompressionStream",u),h!==We){const{deflate:d,inflate:g}=h;if((d||g)&&(Ho.workerScripts||(Ho.workerScripts={})),d){if(!Array.isArray(d))throw new Error("workerScripts.deflate must be an array");Ho.workerScripts.deflate=d}if(g){if(!Array.isArray(g))throw new Error("workerScripts.inflate must be an array");Ho.workerScripts.inflate=g}}}function jo(e,t){t!==We&&(Ho[e]=t)}const gb={application:{"andrew-inset":"ez",annodex:"anx","atom+xml":"atom","atomcat+xml":"atomcat","atomserv+xml":"atomsrv",bbolin:"lin","cu-seeme":"cu","davmount+xml":"davmount",dsptype:"tsp",ecmascript:["es","ecma"],futuresplash:"spl",hta:"hta","java-archive":"jar","java-serialized-object":"ser","java-vm":"class",m3g:"m3g","mac-binhex40":"hqx",mathematica:["nb","ma","mb"],msaccess:"mdb",msword:["doc","dot","wiz"],mxf:"mxf",oda:"oda",ogg:"ogx",pdf:"pdf","pgp-keys":"key","pgp-signature":["asc","sig"],"pics-rules":"prf",postscript:["ps","ai","eps","epsi","epsf","eps2","eps3"],rar:"rar","rdf+xml":"rdf","rss+xml":"rss",rtf:"rtf","xhtml+xml":["xhtml","xht"],xml:["xml","xsl","xsd","xpdl"],"xspf+xml":"xspf",zip:"zip","vnd.android.package-archive":"apk","vnd.cinderella":"cdy","vnd.google-earth.kml+xml":"kml","vnd.google-earth.kmz":"kmz","vnd.mozilla.xul+xml":"xul","vnd.ms-excel":["xls","xlb","xlt","xlm","xla","xlc","xlw"],"vnd.ms-pki.seccat":"cat","vnd.ms-pki.stl":"stl","vnd.ms-powerpoint":["ppt","pps","pot","ppa","pwz"],"vnd.oasis.opendocument.chart":"odc","vnd.oasis.opendocument.database":"odb","vnd.oasis.opendocument.formula":"odf","vnd.oasis.opendocument.graphics":"odg","vnd.oasis.opendocument.graphics-template":"otg","vnd.oasis.opendocument.image":"odi","vnd.oasis.opendocument.presentation":"odp","vnd.oasis.opendocument.presentation-template":"otp","vnd.oasis.opendocument.spreadsheet":"ods","vnd.oasis.opendocument.spreadsheet-template":"ots","vnd.oasis.opendocument.text":"odt","vnd.oasis.opendocument.text-master":["odm","otm"],"vnd.oasis.opendocument.text-template":"ott","vnd.oasis.opendocument.text-web":"oth","vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","vnd.openxmlformats-officedocument.spreadsheetml.template":"xltx","vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","vnd.openxmlformats-officedocument.presentationml.slideshow":"ppsx","vnd.openxmlformats-officedocument.presentationml.template":"potx","vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","vnd.openxmlformats-officedocument.wordprocessingml.template":"dotx","vnd.smaf":"mmf","vnd.stardivision.calc":"sdc","vnd.stardivision.chart":"sds","vnd.stardivision.draw":"sda","vnd.stardivision.impress":"sdd","vnd.stardivision.math":["sdf","smf"],"vnd.stardivision.writer":["sdw","vor"],"vnd.stardivision.writer-global":"sgl","vnd.sun.xml.calc":"sxc","vnd.sun.xml.calc.template":"stc","vnd.sun.xml.draw":"sxd","vnd.sun.xml.draw.template":"std","vnd.sun.xml.impress":"sxi","vnd.sun.xml.impress.template":"sti","vnd.sun.xml.math":"sxm","vnd.sun.xml.writer":"sxw","vnd.sun.xml.writer.global":"sxg","vnd.sun.xml.writer.template":"stw","vnd.symbian.install":["sis","sisx"],"vnd.visio":["vsd","vst","vss","vsw","vsdx","vssx","vstx","vssm","vstm"],"vnd.wap.wbxml":"wbxml","vnd.wap.wmlc":"wmlc","vnd.wap.wmlscriptc":"wmlsc","vnd.wordperfect":"wpd","vnd.wordperfect5.1":"wp5","x-123":"wk","x-7z-compressed":"7z","x-abiword":"abw","x-apple-diskimage":"dmg","x-bcpio":"bcpio","x-bittorrent":"torrent","x-cbr":["cbr","cba","cbt","cb7"],"x-cbz":"cbz","x-cdf":["cdf","cda"],"x-cdlink":"vcd","x-chess-pgn":"pgn","x-cpio":"cpio","x-csh":"csh","x-director":["dir","dxr","cst","cct","cxt","w3d","fgd","swa"],"x-dms":"dms","x-doom":"wad","x-dvi":"dvi","x-httpd-eruby":"rhtml","x-font":"pcf.Z","x-freemind":"mm","x-gnumeric":"gnumeric","x-go-sgf":"sgf","x-graphing-calculator":"gcf","x-gtar":["gtar","taz"],"x-hdf":"hdf","x-httpd-php":["phtml","pht","php"],"x-httpd-php-source":"phps","x-httpd-php3":"php3","x-httpd-php3-preprocessed":"php3p","x-httpd-php4":"php4","x-httpd-php5":"php5","x-ica":"ica","x-info":"info","x-internet-signup":["ins","isp"],"x-iphone":"iii","x-iso9660-image":"iso","x-java-jnlp-file":"jnlp","x-jmol":"jmz","x-killustrator":"kil","x-latex":"latex","x-lyx":"lyx","x-lzx":"lzx","x-maker":["frm","fb","fbdoc"],"x-ms-wmd":"wmd","x-msdos-program":["com","exe","bat","dll"],"x-netcdf":["nc"],"x-ns-proxy-autoconfig":["pac","dat"],"x-nwc":"nwc","x-object":"o","x-oz-application":"oza","x-pkcs7-certreqresp":"p7r","x-python-code":["pyc","pyo"],"x-qgis":["qgs","shp","shx"],"x-quicktimeplayer":"qtl","x-redhat-package-manager":["rpm","rpa"],"x-ruby":"rb","x-sh":"sh","x-shar":"shar","x-shockwave-flash":["swf","swfl"],"x-silverlight":"scr","x-stuffit":"sit","x-sv4cpio":"sv4cpio","x-sv4crc":"sv4crc","x-tar":"tar","x-tex-gf":"gf","x-tex-pk":"pk","x-texinfo":["texinfo","texi"],"x-trash":["~","%","bak","old","sik"],"x-ustar":"ustar","x-wais-source":"src","x-wingz":"wz","x-x509-ca-cert":["crt","der","cer"],"x-xcf":"xcf","x-xfig":"fig","x-xpinstall":"xpi",applixware:"aw","atomsvc+xml":"atomsvc","ccxml+xml":"ccxml","cdmi-capability":"cdmia","cdmi-container":"cdmic","cdmi-domain":"cdmid","cdmi-object":"cdmio","cdmi-queue":"cdmiq","docbook+xml":"dbk","dssc+der":"dssc","dssc+xml":"xdssc","emma+xml":"emma","epub+zip":"epub",exi:"exi","font-tdpfr":"pfr","gml+xml":"gml","gpx+xml":"gpx",gxf:"gxf",hyperstudio:"stk","inkml+xml":["ink","inkml"],ipfix:"ipfix","jsonml+json":"jsonml","lost+xml":"lostxml","mads+xml":"mads",marc:"mrc","marcxml+xml":"mrcx","mathml+xml":["mathml","mml"],mbox:"mbox","mediaservercontrol+xml":"mscml","metalink+xml":"metalink","metalink4+xml":"meta4","mets+xml":"mets","mods+xml":"mods",mp21:["m21","mp21"],mp4:"mp4s","oebps-package+xml":"opf","omdoc+xml":"omdoc",onenote:["onetoc","onetoc2","onetmp","onepkg"],oxps:"oxps","patch-ops-error+xml":"xer","pgp-encrypted":"pgp",pkcs10:"p10","pkcs7-mime":["p7m","p7c"],"pkcs7-signature":"p7s",pkcs8:"p8","pkix-attr-cert":"ac","pkix-crl":"crl","pkix-pkipath":"pkipath",pkixcmp:"pki","pls+xml":"pls","prs.cww":"cww","pskc+xml":"pskcxml","reginfo+xml":"rif","relax-ng-compact-syntax":"rnc","resource-lists+xml":"rl","resource-lists-diff+xml":"rld","rls-services+xml":"rs","rpki-ghostbusters":"gbr","rpki-manifest":"mft","rpki-roa":"roa","rsd+xml":"rsd","sbml+xml":"sbml","scvp-cv-request":"scq","scvp-cv-response":"scs","scvp-vp-request":"spq","scvp-vp-response":"spp",sdp:"sdp","set-payment-initiation":"setpay","set-registration-initiation":"setreg","shf+xml":"shf","sparql-query":"rq","sparql-results+xml":"srx",srgs:"gram","srgs+xml":"grxml","sru+xml":"sru","ssdl+xml":"ssdl","ssml+xml":"ssml","tei+xml":["tei","teicorpus"],"thraud+xml":"tfi","timestamped-data":"tsd","vnd.3gpp.pic-bw-large":"plb","vnd.3gpp.pic-bw-small":"psb","vnd.3gpp.pic-bw-var":"pvb","vnd.3gpp2.tcap":"tcap","vnd.3m.post-it-notes":"pwn","vnd.accpac.simply.aso":"aso","vnd.accpac.simply.imp":"imp","vnd.acucobol":"acu","vnd.acucorp":["atc","acutc"],"vnd.adobe.air-application-installer-package+zip":"air","vnd.adobe.formscentral.fcdt":"fcdt","vnd.adobe.fxp":["fxp","fxpl"],"vnd.adobe.xdp+xml":"xdp","vnd.adobe.xfdf":"xfdf","vnd.ahead.space":"ahead","vnd.airzip.filesecure.azf":"azf","vnd.airzip.filesecure.azs":"azs","vnd.amazon.ebook":"azw","vnd.americandynamics.acc":"acc","vnd.amiga.ami":"ami","vnd.anser-web-certificate-issue-initiation":"cii","vnd.anser-web-funds-transfer-initiation":"fti","vnd.antix.game-component":"atx","vnd.apple.installer+xml":"mpkg","vnd.apple.mpegurl":"m3u8","vnd.aristanetworks.swi":"swi","vnd.astraea-software.iota":"iota","vnd.audiograph":"aep","vnd.blueice.multipass":"mpm","vnd.bmi":"bmi","vnd.businessobjects":"rep","vnd.chemdraw+xml":"cdxml","vnd.chipnuts.karaoke-mmd":"mmd","vnd.claymore":"cla","vnd.cloanto.rp9":"rp9","vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"vnd.cluetrust.cartomobile-config":"c11amc","vnd.cluetrust.cartomobile-config-pkg":"c11amz","vnd.commonspace":"csp","vnd.contact.cmsg":"cdbcmsg","vnd.cosmocaller":"cmc","vnd.crick.clicker":"clkx","vnd.crick.clicker.keyboard":"clkk","vnd.crick.clicker.palette":"clkp","vnd.crick.clicker.template":"clkt","vnd.crick.clicker.wordbank":"clkw","vnd.criticaltools.wbs+xml":"wbs","vnd.ctc-posml":"pml","vnd.cups-ppd":"ppd","vnd.curl.car":"car","vnd.curl.pcurl":"pcurl","vnd.dart":"dart","vnd.data-vision.rdz":"rdz","vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"vnd.dece.ttml+xml":["uvt","uvvt"],"vnd.dece.unspecified":["uvx","uvvx"],"vnd.dece.zip":["uvz","uvvz"],"vnd.denovo.fcselayout-link":"fe_launch","vnd.dna":"dna","vnd.dolby.mlp":"mlp","vnd.dpgraph":"dpg","vnd.dreamfactory":"dfac","vnd.ds-keypoint":"kpxx","vnd.dvb.ait":"ait","vnd.dvb.service":"svc","vnd.dynageo":"geo","vnd.ecowin.chart":"mag","vnd.enliven":"nml","vnd.epson.esf":"esf","vnd.epson.msf":"msf","vnd.epson.quickanime":"qam","vnd.epson.salt":"slt","vnd.epson.ssf":"ssf","vnd.eszigno3+xml":["es3","et3"],"vnd.ezpix-album":"ez2","vnd.ezpix-package":"ez3","vnd.fdf":"fdf","vnd.fdsn.mseed":"mseed","vnd.fdsn.seed":["seed","dataless"],"vnd.flographit":"gph","vnd.fluxtime.clip":"ftc","vnd.framemaker":["fm","frame","maker","book"],"vnd.frogans.fnc":"fnc","vnd.frogans.ltf":"ltf","vnd.fsc.weblaunch":"fsc","vnd.fujitsu.oasys":"oas","vnd.fujitsu.oasys2":"oa2","vnd.fujitsu.oasys3":"oa3","vnd.fujitsu.oasysgp":"fg5","vnd.fujitsu.oasysprs":"bh2","vnd.fujixerox.ddd":"ddd","vnd.fujixerox.docuworks":"xdw","vnd.fujixerox.docuworks.binder":"xbd","vnd.fuzzysheet":"fzs","vnd.genomatix.tuxedo":"txd","vnd.geogebra.file":"ggb","vnd.geogebra.tool":"ggt","vnd.geometry-explorer":["gex","gre"],"vnd.geonext":"gxt","vnd.geoplan":"g2w","vnd.geospace":"g3w","vnd.gmx":"gmx","vnd.grafeq":["gqf","gqs"],"vnd.groove-account":"gac","vnd.groove-help":"ghf","vnd.groove-identity-message":"gim","vnd.groove-injector":"grv","vnd.groove-tool-message":"gtm","vnd.groove-tool-template":"tpl","vnd.groove-vcard":"vcg","vnd.hal+xml":"hal","vnd.handheld-entertainment+xml":"zmm","vnd.hbci":"hbci","vnd.hhe.lesson-player":"les","vnd.hp-hpgl":"hpgl","vnd.hp-hpid":"hpid","vnd.hp-hps":"hps","vnd.hp-jlyt":"jlt","vnd.hp-pcl":"pcl","vnd.hp-pclxl":"pclxl","vnd.hydrostatix.sof-data":"sfd-hdstx","vnd.ibm.minipay":"mpy","vnd.ibm.modcap":["afp","listafp","list3820"],"vnd.ibm.rights-management":"irm","vnd.ibm.secure-container":"sc","vnd.iccprofile":["icc","icm"],"vnd.igloader":"igl","vnd.immervision-ivp":"ivp","vnd.immervision-ivu":"ivu","vnd.insors.igm":"igm","vnd.intercon.formnet":["xpw","xpx"],"vnd.intergeo":"i2g","vnd.intu.qbo":"qbo","vnd.intu.qfx":"qfx","vnd.ipunplugged.rcprofile":"rcprofile","vnd.irepository.package+xml":"irp","vnd.is-xpr":"xpr","vnd.isac.fcs":"fcs","vnd.jam":"jam","vnd.jcp.javame.midlet-rms":"rms","vnd.jisp":"jisp","vnd.joost.joda-archive":"joda","vnd.kahootz":["ktz","ktr"],"vnd.kde.karbon":"karbon","vnd.kde.kchart":"chrt","vnd.kde.kformula":"kfo","vnd.kde.kivio":"flw","vnd.kde.kontour":"kon","vnd.kde.kpresenter":["kpr","kpt"],"vnd.kde.kspread":"ksp","vnd.kde.kword":["kwd","kwt"],"vnd.kenameaapp":"htke","vnd.kidspiration":"kia","vnd.kinar":["kne","knp"],"vnd.koan":["skp","skd","skt","skm"],"vnd.kodak-descriptor":"sse","vnd.las.las+xml":"lasxml","vnd.llamagraphics.life-balance.desktop":"lbd","vnd.llamagraphics.life-balance.exchange+xml":"lbe","vnd.lotus-1-2-3":"123","vnd.lotus-approach":"apr","vnd.lotus-freelance":"pre","vnd.lotus-notes":"nsf","vnd.lotus-organizer":"org","vnd.lotus-screencam":"scm","vnd.lotus-wordpro":"lwp","vnd.macports.portpkg":"portpkg","vnd.mcd":"mcd","vnd.medcalcdata":"mc1","vnd.mediastation.cdkey":"cdkey","vnd.mfer":"mwf","vnd.mfmp":"mfm","vnd.micrografx.flo":"flo","vnd.micrografx.igx":"igx","vnd.mif":"mif","vnd.mobius.daf":"daf","vnd.mobius.dis":"dis","vnd.mobius.mbk":"mbk","vnd.mobius.mqy":"mqy","vnd.mobius.msl":"msl","vnd.mobius.plc":"plc","vnd.mobius.txf":"txf","vnd.mophun.application":"mpn","vnd.mophun.certificate":"mpc","vnd.ms-artgalry":"cil","vnd.ms-cab-compressed":"cab","vnd.ms-excel.addin.macroenabled.12":"xlam","vnd.ms-excel.sheet.binary.macroenabled.12":"xlsb","vnd.ms-excel.sheet.macroenabled.12":"xlsm","vnd.ms-excel.template.macroenabled.12":"xltm","vnd.ms-fontobject":"eot","vnd.ms-htmlhelp":"chm","vnd.ms-ims":"ims","vnd.ms-lrm":"lrm","vnd.ms-officetheme":"thmx","vnd.ms-powerpoint.addin.macroenabled.12":"ppam","vnd.ms-powerpoint.presentation.macroenabled.12":"pptm","vnd.ms-powerpoint.slide.macroenabled.12":"sldm","vnd.ms-powerpoint.slideshow.macroenabled.12":"ppsm","vnd.ms-powerpoint.template.macroenabled.12":"potm","vnd.ms-project":["mpp","mpt"],"vnd.ms-word.document.macroenabled.12":"docm","vnd.ms-word.template.macroenabled.12":"dotm","vnd.ms-works":["wps","wks","wcm","wdb"],"vnd.ms-wpl":"wpl","vnd.ms-xpsdocument":"xps","vnd.mseq":"mseq","vnd.musician":"mus","vnd.muvee.style":"msty","vnd.mynfc":"taglet","vnd.neurolanguage.nlu":"nlu","vnd.nitf":["ntf","nitf"],"vnd.noblenet-directory":"nnd","vnd.noblenet-sealer":"nns","vnd.noblenet-web":"nnw","vnd.nokia.n-gage.data":"ngdat","vnd.nokia.n-gage.symbian.install":"n-gage","vnd.nokia.radio-preset":"rpst","vnd.nokia.radio-presets":"rpss","vnd.novadigm.edm":"edm","vnd.novadigm.edx":"edx","vnd.novadigm.ext":"ext","vnd.oasis.opendocument.chart-template":"otc","vnd.oasis.opendocument.formula-template":"odft","vnd.oasis.opendocument.image-template":"oti","vnd.olpc-sugar":"xo","vnd.oma.dd2+xml":"dd2","vnd.openofficeorg.extension":"oxt","vnd.openxmlformats-officedocument.presentationml.slide":"sldx","vnd.osgeo.mapguide.package":"mgp","vnd.osgi.dp":"dp","vnd.osgi.subsystem":"esa","vnd.palm":["pdb","pqa","oprc"],"vnd.pawaafile":"paw","vnd.pg.format":"str","vnd.pg.osasli":"ei6","vnd.picsel":"efif","vnd.pmi.widget":"wg","vnd.pocketlearn":"plf","vnd.powerbuilder6":"pbd","vnd.previewsystems.box":"box","vnd.proteus.magazine":"mgz","vnd.publishare-delta-tree":"qps","vnd.pvi.ptid1":"ptid","vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"vnd.realvnc.bed":"bed","vnd.recordare.musicxml":"mxl","vnd.recordare.musicxml+xml":"musicxml","vnd.rig.cryptonote":"cryptonote","vnd.rn-realmedia":"rm","vnd.rn-realmedia-vbr":"rmvb","vnd.route66.link66+xml":"link66","vnd.sailingtracker.track":"st","vnd.seemail":"see","vnd.sema":"sema","vnd.semd":"semd","vnd.semf":"semf","vnd.shana.informed.formdata":"ifm","vnd.shana.informed.formtemplate":"itp","vnd.shana.informed.interchange":"iif","vnd.shana.informed.package":"ipk","vnd.simtech-mindmapper":["twd","twds"],"vnd.smart.teacher":"teacher","vnd.solent.sdkm+xml":["sdkm","sdkd"],"vnd.spotfire.dxp":"dxp","vnd.spotfire.sfs":"sfs","vnd.stepmania.package":"smzip","vnd.stepmania.stepchart":"sm","vnd.sus-calendar":["sus","susp"],"vnd.svd":"svd","vnd.syncml+xml":"xsm","vnd.syncml.dm+wbxml":"bdm","vnd.syncml.dm+xml":"xdm","vnd.tao.intent-module-archive":"tao","vnd.tcpdump.pcap":["pcap","cap","dmp"],"vnd.tmobile-livetv":"tmo","vnd.trid.tpt":"tpt","vnd.triscape.mxs":"mxs","vnd.trueapp":"tra","vnd.ufdl":["ufd","ufdl"],"vnd.uiq.theme":"utz","vnd.umajin":"umj","vnd.unity":"unityweb","vnd.uoml+xml":"uoml","vnd.vcx":"vcx","vnd.visionary":"vis","vnd.vsf":"vsf","vnd.webturbo":"wtb","vnd.wolfram.player":"nbp","vnd.wqd":"wqd","vnd.wt.stf":"stf","vnd.xara":"xar","vnd.xfdl":"xfdl","vnd.yamaha.hv-dic":"hvd","vnd.yamaha.hv-script":"hvs","vnd.yamaha.hv-voice":"hvp","vnd.yamaha.openscoreformat":"osf","vnd.yamaha.openscoreformat.osfpvg+xml":"osfpvg","vnd.yamaha.smaf-audio":"saf","vnd.yamaha.smaf-phrase":"spf","vnd.yellowriver-custom-menu":"cmp","vnd.zul":["zir","zirz"],"vnd.zzazz.deck+xml":"zaz","voicexml+xml":"vxml",widget:"wgt",winhlp:"hlp","wsdl+xml":"wsdl","wspolicy+xml":"wspolicy","x-ace-compressed":"ace","x-authorware-bin":["aab","x32","u32","vox"],"x-authorware-map":"aam","x-authorware-seg":"aas","x-blorb":["blb","blorb"],"x-bzip":"bz","x-bzip2":["bz2","boz"],"x-cfs-compressed":"cfs","x-chat":"chat","x-conference":"nsc","x-dgc-compressed":"dgc","x-dtbncx+xml":"ncx","x-dtbook+xml":"dtb","x-dtbresource+xml":"res","x-eva":"eva","x-font-bdf":"bdf","x-font-ghostscript":"gsf","x-font-linux-psf":"psf","x-font-pcf":"pcf","x-font-snf":"snf","x-font-ttf":["ttf","ttc"],"x-font-type1":["pfa","pfb","pfm","afm"],"x-freearc":"arc","x-gca-compressed":"gca","x-glulx":"ulx","x-gramps-xml":"gramps","x-install-instructions":"install","x-lzh-compressed":["lzh","lha"],"x-mie":"mie","x-mobipocket-ebook":["prc","mobi"],"x-ms-application":"application","x-ms-shortcut":"lnk","x-ms-xbap":"xbap","x-msbinder":"obd","x-mscardfile":"crd","x-msclip":"clp","application/x-ms-installer":"msi","x-msmediaview":["mvb","m13","m14"],"x-msmetafile":["wmf","wmz","emf","emz"],"x-msmoney":"mny","x-mspublisher":"pub","x-msschedule":"scd","x-msterminal":"trm","x-mswrite":"wri","x-nzb":"nzb","x-pkcs12":["p12","pfx"],"x-pkcs7-certificates":["p7b","spc"],"x-research-info-systems":"ris","x-silverlight-app":"xap","x-sql":"sql","x-stuffitx":"sitx","x-subrip":"srt","x-t3vm-image":"t3","x-tex-tfm":"tfm","x-tgif":"obj","x-xliff+xml":"xlf","x-xz":"xz","x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"xaml+xml":"xaml","xcap-diff+xml":"xdf","xenc+xml":"xenc","xml-dtd":"dtd","xop+xml":"xop","xproc+xml":"xpl","xslt+xml":"xslt","xv+xml":["mxml","xhvml","xvml","xvm"],yang:"yang","yin+xml":"yin",envoy:"evy",fractals:"fif","internet-property-stream":"acx",olescript:"axs","vnd.ms-outlook":"msg","vnd.ms-pkicertstore":"sst","x-compress":"z","x-perfmon":["pma","pmc","pmr","pmw"],"ynd.ms-pkipko":"pko",gzip:["gz","tgz"],"smil+xml":["smi","smil"],"vnd.debian.binary-package":["deb","udeb"],"vnd.hzn-3d-crossword":"x3d","vnd.sqlite3":["db","sqlite","sqlite3","db-wal","sqlite-wal","db-shm","sqlite-shm"],"vnd.wap.sic":"sic","vnd.wap.slc":"slc","x-krita":["kra","krz"],"x-perl":["pm","pl"],yaml:["yaml","yml"]},audio:{amr:"amr","amr-wb":"awb",annodex:"axa",basic:["au","snd"],flac:"flac",midi:["mid","midi","kar","rmi"],mpeg:["mpga","mpega","mp3","m4a","mp2a","m2a","m3a"],mpegurl:"m3u",ogg:["oga","ogg","spx"],"prs.sid":"sid","x-aiff":"aifc","x-gsm":"gsm","x-ms-wma":"wma","x-ms-wax":"wax","x-pn-realaudio":"ram","x-realaudio":"ra","x-sd2":"sd2",adpcm:"adp",mp4:"mp4a",s3m:"s3m",silk:"sil","vnd.dece.audio":["uva","uvva"],"vnd.digital-winds":"eol","vnd.dra":"dra","vnd.dts":"dts","vnd.dts.hd":"dtshd","vnd.lucent.voice":"lvp","vnd.ms-playready.media.pya":"pya","vnd.nuera.ecelp4800":"ecelp4800","vnd.nuera.ecelp7470":"ecelp7470","vnd.nuera.ecelp9600":"ecelp9600","vnd.rip":"rip",webm:"weba","x-caf":"caf","x-matroska":"mka","x-pn-realaudio-plugin":"rmp",xm:"xm",aac:"aac",aiff:["aiff","aif","aff"],opus:"opus",wav:"wav"},chemical:{"x-alchemy":"alc","x-cache":["cac","cache"],"x-cache-csf":"csf","x-cactvs-binary":["cbin","cascii","ctab"],"x-cdx":"cdx","x-chem3d":"c3d","x-cif":"cif","x-cmdf":"cmdf","x-cml":"cml","x-compass":"cpa","x-crossfire":"bsd","x-csml":["csml","csm"],"x-ctx":"ctx","x-cxf":["cxf","cef"],"x-embl-dl-nucleotide":["emb","embl"],"x-gamess-input":["inp","gam","gamin"],"x-gaussian-checkpoint":["fch","fchk"],"x-gaussian-cube":"cub","x-gaussian-input":["gau","gjc","gjf"],"x-gaussian-log":"gal","x-gcg8-sequence":"gcg","x-genbank":"gen","x-hin":"hin","x-isostar":["istr","ist"],"x-jcamp-dx":["jdx","dx"],"x-kinemage":"kin","x-macmolecule":"mcm","x-macromodel-input":"mmod","x-mdl-molfile":"mol","x-mdl-rdfile":"rd","x-mdl-rxnfile":"rxn","x-mdl-sdfile":"sd","x-mdl-tgf":"tgf","x-mmcif":"mcif","x-mol2":"mol2","x-molconn-Z":"b","x-mopac-graph":"gpt","x-mopac-input":["mop","mopcrt","zmt"],"x-mopac-out":"moo","x-ncbi-asn1":"asn","x-ncbi-asn1-ascii":["prt","ent"],"x-ncbi-asn1-binary":"val","x-rosdal":"ros","x-swissprot":"sw","x-vamas-iso14976":"vms","x-vmd":"vmd","x-xtel":"xtel","x-xyz":"xyz"},font:{otf:"otf",woff:"woff",woff2:"woff2"},image:{gif:"gif",ief:"ief",jpeg:["jpeg","jpg","jpe","jfif","jfif-tbnl","jif"],pcx:"pcx",png:"png","svg+xml":["svg","svgz"],tiff:["tiff","tif"],"vnd.djvu":["djvu","djv"],"vnd.wap.wbmp":"wbmp","x-canon-cr2":"cr2","x-canon-crw":"crw","x-cmu-raster":"ras","x-coreldraw":"cdr","x-coreldrawpattern":"pat","x-coreldrawtemplate":"cdt","x-corelphotopaint":"cpt","x-epson-erf":"erf","x-icon":"ico","x-jg":"art","x-jng":"jng","x-nikon-nef":"nef","x-olympus-orf":"orf","x-portable-anymap":"pnm","x-portable-bitmap":"pbm","x-portable-graymap":"pgm","x-portable-pixmap":"ppm","x-rgb":"rgb","x-xbitmap":"xbm","x-xpixmap":"xpm","x-xwindowdump":"xwd",bmp:"bmp",cgm:"cgm",g3fax:"g3",ktx:"ktx","prs.btif":"btif",sgi:"sgi","vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"vnd.dwg":"dwg","vnd.dxf":"dxf","vnd.fastbidsheet":"fbs","vnd.fpx":"fpx","vnd.fst":"fst","vnd.fujixerox.edmics-mmr":"mmr","vnd.fujixerox.edmics-rlc":"rlc","vnd.ms-modi":"mdi","vnd.ms-photo":"wdp","vnd.net-fpx":"npx","vnd.xiff":"xif",webp:"webp","x-3ds":"3ds","x-cmx":"cmx","x-freehand":["fh","fhc","fh4","fh5","fh7"],"x-pict":["pic","pct"],"x-tga":"tga","cis-cod":"cod",avif:"avifs",heic:["heif","heic"],pjpeg:["pjpg"],"vnd.adobe.photoshop":"psd","x-adobe-dng":"dng","x-fuji-raf":"raf","x-icns":"icns","x-kodak-dcr":"dcr","x-kodak-k25":"k25","x-kodak-kdc":"kdc","x-minolta-mrw":"mrw","x-panasonic-raw":["raw","rw2","rwl"],"x-pentax-pef":["pef","ptx"],"x-sigma-x3f":"x3f","x-sony-arw":"arw","x-sony-sr2":"sr2","x-sony-srf":"srf"},message:{rfc822:["eml","mime","mht","mhtml","nws"]},model:{iges:["igs","iges"],mesh:["msh","mesh","silo"],vrml:["wrl","vrml"],"x3d+vrml":["x3dv","x3dvz"],"x3d+xml":"x3dz","x3d+binary":["x3db","x3dbz"],"vnd.collada+xml":"dae","vnd.dwf":"dwf","vnd.gdl":"gdl","vnd.gtw":"gtw","vnd.mts":"mts","vnd.usdz+zip":"usdz","vnd.vtu":"vtu"},text:{"cache-manifest":["manifest","appcache"],calendar:["ics","icz","ifb"],css:"css",csv:"csv",h323:"323",html:["html","htm","shtml","stm"],iuls:"uls",plain:["txt","text","brf","conf","def","list","log","in","bas","diff","ksh"],richtext:"rtx",scriptlet:["sct","wsc"],texmacs:"tm","tab-separated-values":"tsv","vnd.sun.j2me.app-descriptor":"jad","vnd.wap.wml":"wml","vnd.wap.wmlscript":"wmls","x-bibtex":"bib","x-boo":"boo","x-c++hdr":["h++","hpp","hxx","hh"],"x-c++src":["c++","cpp","cxx","cc"],"x-component":"htc","x-dsrc":"d","x-diff":"patch","x-haskell":"hs","x-java":"java","x-literate-haskell":"lhs","x-moc":"moc","x-pascal":["p","pas","pp","inc"],"x-pcs-gcd":"gcd","x-python":"py","x-scala":"scala","x-setext":"etx","x-tcl":["tcl","tk"],"x-tex":["tex","ltx","sty","cls"],"x-vcalendar":"vcs","x-vcard":"vcf",n3:"n3","prs.lines.tag":"dsc",sgml:["sgml","sgm"],troff:["t","tr","roff","man","me","ms"],turtle:"ttl","uri-list":["uri","uris","urls"],vcard:"vcard","vnd.curl":"curl","vnd.curl.dcurl":"dcurl","vnd.curl.scurl":"scurl","vnd.curl.mcurl":"mcurl","vnd.dvb.subtitle":"sub","vnd.fly":"fly","vnd.fmi.flexstor":"flx","vnd.graphviz":"gv","vnd.in3d.3dml":"3dml","vnd.in3d.spot":"spot","x-asm":["s","asm"],"x-c":["c","h","dic"],"x-fortran":["f","for","f77","f90"],"x-opml":"opml","x-nfo":"nfo","x-sfv":"sfv","x-uuencode":"uu",webviewhtml:"htt",javascript:"js",json:"json",markdown:["md","markdown","mdown","markdn"],"vnd.wap.si":"si","vnd.wap.sl":"sl"},video:{avif:"avif","3gpp":"3gp",annodex:"axv",dl:"dl",dv:["dif","dv"],fli:"fli",gl:"gl",mpeg:["mpeg","mpg","mpe","m1v","m2v","mp2","mpa","mpv2"],mp4:["mp4","mp4v","mpg4"],quicktime:["qt","mov"],ogg:"ogv","vnd.mpegurl":["mxu","m4u"],"x-flv":"flv","x-la-asf":["lsf","lsx"],"x-mng":"mng","x-ms-asf":["asf","asx","asr"],"x-ms-wm":"wm","x-ms-wmv":"wmv","x-ms-wmx":"wmx","x-ms-wvx":"wvx","x-msvideo":"avi","x-sgi-movie":"movie","x-matroska":["mpv","mkv","mk3d","mks"],"3gpp2":"3g2",h261:"h261",h263:"h263",h264:"h264",jpeg:"jpgv",jpm:["jpm","jpgm"],mj2:["mj2","mjp2"],"vnd.dece.hd":["uvh","uvvh"],"vnd.dece.mobile":["uvm","uvvm"],"vnd.dece.pd":["uvp","uvvp"],"vnd.dece.sd":["uvs","uvvs"],"vnd.dece.video":["uvv","uvvv"],"vnd.dvb.file":"dvb","vnd.fvt":"fvt","vnd.ms-playready.media.pyv":"pyv","vnd.uvvu.mp4":["uvu","uvvu"],"vnd.vivo":"viv",webm:"webm","x-f4v":"f4v","x-m4v":"m4v","x-ms-vob":"vob","x-smv":"smv",mp2t:"ts"},"x-conference":{"x-cooltalk":"ice"},"x-world":{"x-vrml":["vrm","flr","wrz","xaf","xof"]}};(()=>{const e={};for(const t of Object.keys(gb))for(const r of Object.keys(gb[t])){const n=gb[t][r];if(typeof n=="string")e[n]=t+"/"+r;else for(let i=0;i>>1^3988292384:t=t>>>1;P$[e]=t}class tg{constructor(t){this.crc=t||-1}append(t){let r=this.crc|0;for(let n=0,i=t.length|0;n>>8^P$[(r^t[n])&255];this.crc=r}get(){return~this.crc}}class F$ extends TransformStream{constructor(){let t;const r=new tg;super({transform(n,i){r.append(n),i.enqueue(n)},flush(){const n=new Uint8Array(4);new DataView(n.buffer).setUint32(0,r.get()),t.value=n}}),t=this}}function Wp(e){if(typeof TextEncoder==ca){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let r=0;r0&&t&&(e[r-1]=wn.partial(t,e[r-1]&2147483648>>t-1,1)),e},partial(e,t,r){return e===32?t:(r?t|0:t<<32-e)+e*1099511627776},getPartial(e){return Math.round(e/1099511627776)||32},_shiftRight(e,t,r,n){for(n===void 0&&(n=[]);t>=32;t-=32)n.push(r),r=0;if(t===0)return n.concat(e);for(let o=0;o>>t),r=e[o]<<32-t;const i=e.length?e[e.length-1]:0,s=wn.getPartial(i);return n.push(wn.partial(t+s&31,t+s>32?r:n.pop(),1)),n}},eg={bytes:{fromBits(e){const r=wn.bitLength(e)/8,n=new Uint8Array(r);let i;for(let s=0;s>>24,i<<=8;return n},toBits(e){const t=[];let r,n=0;for(r=0;r9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const s=new Uint32Array(r);let o=0;for(let a=t.blockSize+n-(t.blockSize+n&t.blockSize-1);a<=i;a+=t.blockSize)t._block(s.subarray(16*o,16*(o+1))),o+=1;return r.splice(0,16*o),t}finalize(){const e=this;let t=e._buffer;const r=e._h;t=wn.concat(t,[wn.partial(1,1)]);for(let n=t.length+2;n&15;n++)t.push(0);for(t.push(Math.floor(e._length/4294967296)),t.push(e._length|0);t.length;)e._block(t.splice(0,16));return e.reset(),r}_f(e,t,r,n){if(e<=19)return t&r|~t&n;if(e<=39)return t^r^n;if(e<=59)return t&r|t&n|r&n;if(e<=79)return t^r^n}_S(e,t){return t<>>32-e}_block(e){const t=this,r=t._h,n=Array(80);for(let c=0;c<16;c++)n[c]=e[c];let i=r[0],s=r[1],o=r[2],a=r[3],l=r[4];for(let c=0;c<=79;c++){c>=16&&(n[c]=t._S(1,n[c-3]^n[c-8]^n[c-14]^n[c-16]));const u=t._S(5,i)+t._f(c,s,o,a)+l+n[c]+t._key[Math.floor(c/20)]|0;l=a,a=o,o=t._S(30,s),s=i,i=u}r[0]=r[0]+i|0,r[1]=r[1]+s|0,r[2]=r[2]+o|0,r[3]=r[3]+a|0,r[4]=r[4]+l|0}};const I$={};I$.aes=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const r=t._tables[0][4],n=t._tables[1],i=e.length;let s,o,a,l=1;if(i!==4&&i!==6&&i!==8)throw new Error("invalid aes key size");for(t._key=[o=e.slice(0),a=[]],s=i;s<4*i+28;s++){let c=o[s-1];(s%i===0||i===8&&s%i===4)&&(c=r[c>>>24]<<24^r[c>>16&255]<<16^r[c>>8&255]<<8^r[c&255],s%i===0&&(c=c<<8^c>>>24^l<<24,l=l<<1^(l>>7)*283)),o[s]=o[s-i]^c}for(let c=0;s;c++,s--){const u=o[c&3?s:s-4];s<=4||c<4?a[c]=u:a[c]=n[0][r[u>>>24]]^n[1][r[u>>16&255]]^n[2][r[u>>8&255]]^n[3][r[u&255]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],r=e[4],n=t[4],i=[],s=[];let o,a,l,c;for(let u=0;u<256;u++)s[(i[u]=u<<1^(u>>7)*283)^u]=u;for(let u=o=0;!r[u];u^=a||1,o=s[o]||1){let h=o^o<<1^o<<2^o<<3^o<<4;h=h>>8^h&255^99,r[u]=h,n[h]=u,c=i[l=i[a=i[u]]];let d=c*16843009^l*65537^a*257^u*16843008,g=i[h]*257^h*16843008;for(let y=0;y<4;y++)e[y][u]=g=g<<24^g>>>8,t[y][h]=d=d<<24^d>>>8}for(let u=0;u<5;u++)e[u]=e[u].slice(0),t[u]=t[u].slice(0)}_crypt(e,t){if(e.length!==4)throw new Error("invalid aes block size");const r=this._key[t],n=r.length/4-2,i=[0,0,0,0],s=this._tables[t],o=s[0],a=s[1],l=s[2],c=s[3],u=s[4];let h=e[0]^r[0],d=e[t?3:1]^r[1],g=e[2]^r[2],y=e[t?1:3]^r[3],f=4,p,m,b;for(let w=0;w>>24]^a[d>>16&255]^l[g>>8&255]^c[y&255]^r[f],m=o[d>>>24]^a[g>>16&255]^l[y>>8&255]^c[h&255]^r[f+1],b=o[g>>>24]^a[y>>16&255]^l[h>>8&255]^c[d&255]^r[f+2],y=o[y>>>24]^a[h>>16&255]^l[d>>8&255]^c[g&255]^r[f+3],f+=4,h=p,d=m,g=b;for(let w=0;w<4;w++)i[t?3&-w:w]=u[h>>>24]<<24^u[d>>16&255]<<16^u[g>>8&255]<<8^u[y&255]^r[f++],p=h,h=d,d=g,g=y,y=p;return i}};const Trt={getRandomValues(e){const t=new Uint32Array(e.buffer),r=n=>{let i=987654321;const s=4294967295;return function(){return i=36969*(i&65535)+(i>>16)&s,n=18e3*(n&65535)+(n>>16)&s,(((i<<16)+n&s)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let n=0,i;n>24&255)===255){let t=e>>16&255,r=e>>8&255,n=e&255;t===255?(t=0,r===255?(r=0,n===255?n=0:++n):++r):++t,e=0,e+=t<<16,e+=r<<8,e+=n}else e+=1<<24;return e}incCounter(e){(e[0]=this.incWord(e[0]))===0&&(e[1]=this.incWord(e[1]))}calculate(e,t,r){let n;if(!(n=t.length))return[];const i=wn.bitLength(t);for(let s=0;s>5)+1<<2;let s,o,a,l,c;const u=new ArrayBuffer(i),h=new DataView(u);let d=0;const g=wn;for(t=eg.bytes.toBits(t),c=1;d<(i||1);c++){for(s=o=e.encrypt(g.concat(t,[c])),a=1;ai&&(e=new r().update(e).finalize());for(let s=0;sthis.resolveReady=o),password:U$(t,r),signed:n,strength:i-1,pending:new Uint8Array})},async transform(o,a){const l=this,{password:c,strength:u,resolveReady:h,ready:d}=l;c?(await Urt(l,u,c,Ci(o,0,xf[u]+2)),o=Ci(o,xf[u]+2),s?a.error(new Error(Wx)):h()):await d;const g=new Uint8Array(o.length-Wo-(o.length-Wo)%Cc);a.enqueue(j$(l,o,g,0,Wo,!0))},async flush(o){const{signed:a,ctr:l,hmac:c,pending:u,ready:h}=this;if(c&&l){await h;const d=Ci(u,0,u.length-Wo),g=Ci(u,u.length-Wo);let y=new Uint8Array;if(d.length){const f=Sf(Ds,d);c.update(f);const p=l.update(f);y=_f(Ds,p)}if(a){const f=Ci(_f(Ds,c.digest()),0,Wo);for(let p=0;pthis.resolveReady=s),password:U$(t,r),strength:n-1,pending:new Uint8Array})},async transform(s,o){const a=this,{password:l,strength:c,resolveReady:u,ready:h}=a;let d=new Uint8Array;l?(d=await Vrt(a,c,l),u()):await h;const g=new Uint8Array(d.length+s.length-s.length%Cc);g.set(d,0),o.enqueue(j$(a,s,g,d.length,0))},async flush(s){const{ctr:o,hmac:a,pending:l,ready:c}=this;if(a&&o){await c;let u=new Uint8Array;if(l.length){const h=o.update(Sf(Ds,l));a.update(h),u=_f(Ds,h)}i.signature=_f(Ds,a.digest()).slice(0,Wo),s.enqueue(qx(u,i.signature))}}}),i=this}}function j$(e,t,r,n,i,s){const{ctr:o,hmac:a,pending:l}=e,c=t.length-i;l.length&&(t=qx(l,t),r=Hrt(r,c-c%Cc));let u;for(u=0;u<=c-Cc;u+=Cc){const h=Sf(Ds,Ci(t,u,u+Cc));s&&a.update(h);const d=o.update(h);s||a.update(d),r.set(_f(Ds,d),u+n)}return e.pending=Ci(t,u),r}async function Urt(e,t,r,n){const i=await z$(e,t,r,Ci(n,0,xf[t])),s=Ci(n,xf[t]);if(i[0]!=s[0]||i[1]!=s[1])throw new Error(B$)}async function Vrt(e,t,r){const n=N$(new Uint8Array(xf[t])),i=await z$(e,t,r,n);return qx(n,i)}async function z$(e,t,r,n){e.password=null;const i=await Wrt(Frt,r,$rt,!1,Brt),s=await qrt(Object.assign({salt:n},Iv),i,8*(ch[t]*2+2)),o=new Uint8Array(s),a=Sf(Ds,Ci(o,0,ch[t])),l=Sf(Ds,Ci(o,ch[t],ch[t]*2)),c=Ci(o,ch[t]*2);return Object.assign(e,{keys:{key:a,authentication:l,passwordVerification:c},ctr:new Lrt(new Nrt(a),Array.from(Rrt)),hmac:new Mrt(l)}),c}async function Wrt(e,t,r,n,i){if(iA)try{return await rd.importKey(e,t,r,n,i)}catch{return iA=!1,gl.importKey(t)}else return gl.importKey(t)}async function qrt(e,t,r){if(sA)try{return await rd.deriveBits(e,t,r)}catch{return sA=!1,gl.pbkdf2(t,e.salt,Iv.iterations,r)}else return gl.pbkdf2(t,e.salt,Iv.iterations,r)}function U$(e,t){return t===We?Wp(e):t}function qx(e,t){let r=e;return e.length+t.length&&(r=new Uint8Array(e.length+t.length),r.set(e,0),r.set(t,e.length)),r}function Hrt(e,t){if(t&&t>e.length){const r=e;e=new Uint8Array(t),e.set(r,0)}return e}function Ci(e,t,r){return e.subarray(t,r)}function _f(e,t){return e.fromBits(t)}function Sf(e,t){return e.toBits(t)}const Bc=12;class Grt extends TransformStream{constructor({password:t,passwordVerification:r,checkPasswordOnly:n}){super({start(){Object.assign(this,{password:t,passwordVerification:r}),V$(this,t)},transform(i,s){const o=this;if(o.password){const a=oA(o,i.subarray(0,Bc));if(o.password=null,a[Bc-1]!=o.passwordVerification)throw new Error(B$);i=i.subarray(Bc)}n?s.error(new Error(Wx)):s.enqueue(oA(o,i))}})}}class Yrt extends TransformStream{constructor({password:t,passwordVerification:r}){super({start(){Object.assign(this,{password:t,passwordVerification:r}),V$(this,t)},transform(n,i){const s=this;let o,a;if(s.password){s.password=null;const l=N$(new Uint8Array(Bc));l[Bc-1]=s.passwordVerification,o=new Uint8Array(n.length+l.length),o.set(aA(s,l),0),a=Bc}else o=new Uint8Array(n.length),a=0;o.set(aA(s,n),a),i.enqueue(o)}})}}function oA(e,t){const r=new Uint8Array(t.length);for(let n=0;n>>24]),i=~e.crcKey2.get(),e.keys=[r,n,i]}function W$(e){const t=e.keys[2]|2;return q$(Math.imul(t,t^1)>>>8)}function q$(e){return e&255}function lA(e){return e&4294967295}const cA="deflate-raw";class Krt extends TransformStream{constructor(t,{chunkSize:r,CompressionStream:n,CompressionStreamNative:i}){super({});const{compressed:s,encrypted:o,useCompressionStream:a,zipCrypto:l,signed:c,level:u}=t,h=this;let d,g,y=H$(super.readable);(!o||l)&&c&&(d=new F$,y=Ts(y,d)),s&&(y=Y$(y,a,{level:u,chunkSize:r},i,n)),o&&(l?y=Ts(y,new Yrt(t)):(g=new zrt(t),y=Ts(y,g))),G$(h,y,()=>{let f;o&&!l&&(f=g.signature),(!o||l)&&c&&(f=new DataView(d.value.buffer).getUint32(0)),h.signature=f})}}class Xrt extends TransformStream{constructor(t,{chunkSize:r,DecompressionStream:n,DecompressionStreamNative:i}){super({});const{zipCrypto:s,encrypted:o,signed:a,signature:l,compressed:c,useCompressionStream:u}=t;let h,d,g=H$(super.readable);o&&(s?g=Ts(g,new Grt(t)):(d=new jrt(t),g=Ts(g,d))),c&&(g=Y$(g,u,{chunkSize:r},i,n)),(!o||s)&&a&&(h=new F$,g=Ts(g,h)),G$(this,g,()=>{if((!o||s)&&a){const y=new DataView(h.value.buffer);if(l!=y.getUint32(0,!1))throw new Error(R$)}})}}function H$(e){return Ts(e,new TransformStream({transform(t,r){t&&t.length&&r.enqueue(t)}}))}function G$(e,t,r){t=Ts(t,new TransformStream({flush:r})),Object.defineProperty(e,"readable",{get(){return t}})}function Y$(e,t,r,n,i){try{const s=t&&n?n:i;e=Ts(e,new s(cA,r))}catch{if(t)try{e=Ts(e,new i(cA,r))}catch{return e}else return e}return e}function Ts(e,t){return e.pipeThrough(t)}const Jrt="message",Zrt="start",Qrt="pull",uA="data",tnt="ack",hA="close",K$="deflate",X$="inflate";class ent extends TransformStream{constructor(t,r){super({});const n=this,{codecType:i}=t;let s;i.startsWith(K$)?s=Krt:i.startsWith(X$)&&(s=Xrt);let o=0,a=0;const l=new s(t,r),c=super.readable,u=new TransformStream({transform(d,g){d&&d.length&&(a+=d.length,g.enqueue(d))},flush(){Object.assign(n,{inputSize:a})}}),h=new TransformStream({transform(d,g){d&&d.length&&(o+=d.length,g.enqueue(d))},flush(){const{signature:d}=l;Object.assign(n,{signature:d,outputSize:o,inputSize:a})}});Object.defineProperty(n,"readable",{get(){return c.pipeThrough(u).pipeThrough(l).pipeThrough(h)}})}}class rnt extends TransformStream{constructor(t){let r;super({transform:n,flush(i){r&&r.length&&i.enqueue(r)}});function n(i,s){if(r){const o=new Uint8Array(r.length+i.length);o.set(r),o.set(i,r.length),i=o,r=null}i.length>t?(s.enqueue(i.slice(0,t)),n(i.slice(t),s)):r=i}}}let J$=typeof Worker!=ca;class yb{constructor(t,{readable:r,writable:n},{options:i,config:s,streamOptions:o,useWebWorkers:a,transferStreams:l,scripts:c},u){const{signal:h}=o;return Object.assign(t,{busy:!0,readable:r.pipeThrough(new rnt(s.chunkSize)).pipeThrough(new nnt(r,o),{signal:h}),writable:n,options:Object.assign({},i),scripts:c,transferStreams:l,terminate(){return new Promise(d=>{const{worker:g,busy:y}=t;g?(y?t.resolveTerminated=d:(g.terminate(),d()),t.interface=null):d()})},onTaskFinished(){const{resolveTerminated:d}=t;d&&(t.resolveTerminated=null,t.terminated=!0,t.worker.terminate(),d()),t.busy=!1,u(t)}}),(a&&J$?int:Z$)(t,s)}}class nnt extends TransformStream{constructor(t,{onstart:r,onprogress:n,size:i,onend:s}){let o=0;super({async start(){r&&await bb(r,i)},async transform(a,l){o+=a.length,n&&await bb(n,o,i),l.enqueue(a)},async flush(){t.size=o,s&&await bb(s,o)}})}}async function bb(e,...t){try{await e(...t)}catch{}}function Z$(e,t){return{run:()=>snt(e,t)}}function int(e,t){const{baseURL:r,chunkSize:n}=t;if(!e.interface){let i;try{i=lnt(e.scripts[0],r,e)}catch{return J$=!1,Z$(e,t)}Object.assign(e,{worker:i,interface:{run:()=>ont(e,{chunkSize:n})}})}return e.interface}async function snt({options:e,readable:t,writable:r,onTaskFinished:n},i){try{const s=new ent(e,i);await t.pipeThrough(s).pipeTo(r,{preventClose:!0,preventAbort:!0});const{signature:o,inputSize:a,outputSize:l}=s;return{signature:o,inputSize:a,outputSize:l}}finally{n()}}async function ont(e,t){let r,n;const i=new Promise((d,g)=>{r=d,n=g});Object.assign(e,{reader:null,writer:null,resolveResult:r,rejectResult:n,result:i});const{readable:s,options:o,scripts:a}=e,{writable:l,closed:c}=ant(e.writable),u=qp({type:Zrt,scripts:a.slice(1),options:o,config:t,readable:s,writable:l},e);u||Object.assign(e,{reader:s.getReader(),writer:l.getWriter()});const h=await i;return u||await l.getWriter().close(),await c,h}function ant(e){let t;const r=new Promise(i=>t=i);return{writable:new WritableStream({async write(i){const s=e.getWriter();await s.ready,await s.write(i),s.releaseLock()},close(){t()},abort(i){return e.getWriter().abort(i)}}),closed:r}}let fA=!0,dA=!0;function lnt(e,t,r){const n={type:"module"};let i,s;typeof e==ed&&(e=e());try{i=new URL(e,t)}catch{i=e}if(fA)try{s=new Worker(i)}catch{fA=!1,s=new Worker(i,n)}else s=new Worker(i,n);return s.addEventListener(Jrt,o=>cnt(o,r)),s}function qp(e,{worker:t,writer:r,onTaskFinished:n,transferStreams:i}){try{const{value:s,readable:o,writable:a}=e,l=[];if(s&&(s.byteLength!m.busy);if(p)return mA(p),new yb(p,e,t,f);if(Va.lengthvb.push({resolve:m,stream:e,workerOptions:t}))}function f(p){if(vb.length){const[{resolve:m,stream:b,workerOptions:w}]=vb.splice(0,1);m(new yb(p,b,w,f))}else p.worker?(mA(p),unt(p,t)):Va=Va.filter(m=>m!=p)}}function unt(e,t){const{config:r}=t,{terminateWorkerTimeout:n}=r;Number.isFinite(n)&&n>=0&&(e.terminated?e.terminated=!1:e.terminateTimeout=setTimeout(async()=>{Va=Va.filter(i=>i!=e);try{await e.terminate()}catch{}},n))}function mA(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}function hnt(e,t={}){const r=`const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self,k=void 0,v="undefined",S="function";class z{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const C=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;C[e]=t}class x{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^C[255&(t^e[n])];this.t=t}get(){return~this.t}}class A extends p{constructor(){let e;const t=new x;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new i(4);new l(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},I={bytes:{p(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)3&s||(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},m(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.I(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t}P(){const e=this;let t=e.C;const n=e.S;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e.A/4294967296)),t.push(0|e.A);t.length;)e.I(t.splice(0,16));return e.reset(),n}D(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}V(e,t){return t<>>32-e}I(t){const n=this,s=n.S,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.V(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.V(5,o)+n.D(e,c,f,a)+l+i[e]+n.v[r.floor(e/20)]|0;l=a,a=f,f=n.V(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}},D={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew V.R(I.bytes.m(e)),B(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=I.bytes.m(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=(new n).update(e).P());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.K=new n(t.U[0])}reset(){const e=this;e.K=new e.M(e.U[0]),e.N=!1}update(e){this.N=!0,this.K.update(e)}digest(){const e=this,t=e.K.P(),n=new e.M(e.U[1]).update(t).P();return e.reset(),n}encrypt(e){if(this.N)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},R=typeof h!=v&&typeof h.getRandomValues==S,B="Invalid password",E="Invalid signature",M="zipjs-abort-check-password";function U(e){return R?h.getRandomValues(e):D.getRandomValues(e)}const K=16,N={name:"PBKDF2"},O=t.assign({hash:{name:"HMAC"}},N),T=t.assign({iterations:1e3,hash:{name:"SHA-1"}},N),W=["deriveBits"],j=[8,12,16],H=[16,24,32],L=10,F=[0,0,0,0],q=typeof h!=v,G=q&&h.subtle,J=q&&typeof G!=v,Q=I.bytes,X=class{constructor(e){const t=this;t.O=[[[],[],[],[],[]],[[],[],[],[],[]]],t.O[0][0][0]||t.T();const n=t.O[0][4],r=t.O[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.v=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.W(e,0)}decrypt(e){return this.W(e,1)}T(){const e=this.O[0],t=this.O[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}W(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.v[t],r=n.length/4-2,i=[0,0,0,0],o=this.O[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},Y=class{constructor(e,t){this.j=e,this.H=t,this.L=t}reset(){this.L=this.H}update(e){return this.F(this.j,e,this.L)}q(e){if(255&~(e>>24))e+=1<<24;else{let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}return e}G(e){0===(e[0]=this.q(e[0]))&&(e[1]=this.q(e[1]))}F(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.G(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},Z=V.R;let $=q&&J&&typeof G.importKey==S,ee=q&&J&&typeof G.deriveBits==S;class te extends p{constructor({password:e,rawPassword:n,signed:r,encryptionStrength:o,checkPasswordOnly:c}){super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:ie(e,n),signed:r,X:o-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:o,J:f,ready:a}=n;r?(await(async(e,t,n,r)=>{const i=await se(e,t,n,ce(r,0,j[t])),o=ce(r,j[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(B)})(n,o,r,ce(e,0,j[o]+2)),e=ce(e,j[o]+2),c?t.error(new s(M)):f()):await a;const l=new i(e.length-L-(e.length-L)%K);t.enqueue(re(n,e,l,0,L,!0))},async flush(e){const{signed:t,Y:n,Z:r,pending:o,ready:c}=this;if(r&&n){await c;const f=ce(o,0,o.length-L),a=ce(o,o.length-L);let l=new i;if(f.length){const e=ae(Q,f);r.update(e);const t=n.update(e);l=fe(Q,t)}if(t){const e=ce(fe(Q,r.digest()),0,L);for(let t=0;L>t;t++)if(e[t]!=a[t])throw new s(E)}e.enqueue(l)}}})}}class ne extends p{constructor({password:e,rawPassword:n,encryptionStrength:r}){let s;super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:ie(e,n),X:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:s,J:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=U(new i(j[t]));return oe(r,await se(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%K);a.set(f,0),t.enqueue(re(n,e,a,f.length,0))},async flush(e){const{Y:t,Z:n,pending:r,ready:o}=this;if(n&&t){await o;let c=new i;if(r.length){const e=t.update(ae(Q,r));n.update(e),c=fe(Q,e)}s.signature=fe(Q,n.digest()).slice(0,L),e.enqueue(oe(c,s.signature))}}}),s=this}}function re(e,t,n,r,s,o){const{Y:c,Z:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=oe(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%K)),u=0;l-K>=u;u+=K){const e=ae(Q,ce(t,u,u+K));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set(fe(Q,s),u+r)}return e.pending=ce(t,u),n}async function se(n,r,s,o){n.password=null;const c=await(async(e,t,n,r,s)=>{if(!$)return V.importKey(t);try{return await G.importKey("raw",t,n,!1,s)}catch(e){return $=!1,V.importKey(t)}})(0,s,O,0,W),f=await(async(e,t,n)=>{if(!ee)return V.B(t,e.salt,T.iterations,n);try{return await G.deriveBits(e,t,n)}catch(r){return ee=!1,V.B(t,e.salt,T.iterations,n)}})(t.assign({salt:o},T),c,8*(2*H[r]+2)),a=new i(f),l=ae(Q,ce(a,0,H[r])),u=ae(Q,ce(a,H[r],2*H[r])),w=ce(a,2*H[r]);return t.assign(n,{keys:{key:l,$:u,passwordVerification:w},Y:new Y(new X(l),e.from(F)),Z:new Z(u)}),w}function ie(e,t){return t===k?(e=>{if(typeof w==v){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;n>>24]),i=~e.te.get(),e.keys=[n,s,i]}function ye(e){const t=2|e.keys[2];return me(r.imul(t,1^t)>>>8)}function me(e){return 255&e}function be(e){return 4294967295&e}const ge="deflate-raw";class ke extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=Se(super.readable);i&&!c||!f||(w=new A,d=xe(d,w)),s&&(d=Ce(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=xe(d,new ue(e)):(h=new ne(e),d=xe(d,h))),ze(u,d,(()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=new l(w.value.buffer).getUint32(0)),u.signature=e}))}}class ve extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=Se(super.readable);o&&(i?d=xe(d,new le(e)):(h=new te(e),d=xe(d,h))),a&&(d=Ce(d,u,{chunkSize:t},r,n)),o&&!i||!c||(w=new A,d=xe(d,w)),ze(this,d,(()=>{if((!o||i)&&c){const e=new l(w.value.buffer);if(f!=e.getUint32(0,!1))throw new s(E)}}))}}function Se(e){return xe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ze(e,n,r){n=xe(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function Ce(e,t,n,r,s){try{e=xe(e,new(t&&r?r:s)(ge,n))}catch(r){if(!t)return e;try{e=xe(e,new s(ge,n))}catch(t){return e}}return e}function xe(e,t){return e.pipeThrough(t)}const Ae="data",_e="close";class Ie extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=ke:s.startsWith("inflate")&&(i=ve);let o=0,c=0;const f=new i(e,n),a=super.readable,l=new p({transform(e,t){e&&e.length&&(c+=e.length,t.enqueue(e))},flush(){t.assign(r,{inputSize:c})}}),u=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=f;t.assign(r,{signature:e,outputSize:o,inputSize:c})}});t.defineProperty(r,"readable",{get:()=>a.pipeThrough(l).pipeThrough(f).pipeThrough(u)})}}class Pe extends p{constructor(e){let t;super({transform:function n(r,s){if(t){const e=new i(t.length+r.length);e.set(t),e.set(r,t.length),r=e,t=null}r.length>e?(s.enqueue(r.slice(0,e)),n(r.slice(e),s)):t=r},flush(e){t&&t.length&&e.enqueue(t)}})}}const De=new a,Ve=new a;let Re,Be=0,Ee=!0;async function Me(e){try{const{options:t,scripts:r,config:s}=e;if(r&&r.length)try{Ee?importScripts.apply(k,r):await Ue(r)}catch(e){Ee=!1,await Ue(r)}self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new z(self.Deflate)),self.Inflate&&(s.DecompressionStream=new z(self.Inflate));const i={highWaterMark:1},o=e.readable||new y({async pull(e){const t=new u((e=>De.set(Be,e)));Ke({type:"pull",messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));Ve.set(Be,t),Ke({type:Ae,value:e,messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new Ie(t,s);Re=new AbortController;const{signal:a}=Re;await o.pipeThrough(f).pipeThrough(new Pe(s.chunkSize)).pipeTo(c,{signal:a,preventClose:!0,preventAbort:!0}),await c.getWriter().close();const{signature:l,inputSize:w,outputSize:h}=f;Ke({type:_e,result:{signature:l,inputSize:w,outputSize:h}})}catch(e){Ne(e)}}async function Ue(e){for(const t of e)await import(t)}function Ke(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Ne(e=new s("Unknown error")){const{message:t,stack:n,code:r,name:i}=e;d({error:{message:t,stack:n,code:r,name:i}})}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&Me(e),t==Ae){const e=De.get(n);De.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=Ve.get(n);Ve.delete(n),e()}t==_e&&Re.abort()}catch(e){Ne(e)}}));const Oe=-2;function Te(t){return We(t.map((([t,n])=>new e(t).fill(n,0,t))))}function We(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?We(n):n)),[])}const je=[0,1,2,3].concat(...Te([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function He(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.ne=n=>{const s=e.re,i=e.ie.se,o=e.ie.oe;let c,f,a,l=-1;for(n.ce=0,n.fe=573,c=0;o>c;c++)0!==s[2*c]?(n.ae[++n.ce]=l=c,n.le[c]=0):s[2*c+1]=0;for(;2>n.ce;)a=n.ae[++n.ce]=2>l?++l:0,s[2*a]=1,n.le[a]=0,n.ue--,i&&(n.we-=i[2*a+1]);for(e.he=l,c=r.floor(n.ce/2);c>=1;c--)n.de(s,c);a=o;do{c=n.ae[1],n.ae[1]=n.ae[n.ce--],n.de(s,1),f=n.ae[1],n.ae[--n.fe]=c,n.ae[--n.fe]=f,s[2*a]=s[2*c]+s[2*f],n.le[a]=r.max(n.le[c],n.le[f])+1,s[2*c+1]=s[2*f+1]=a,n.ae[1]=a++,n.de(s,1)}while(n.ce>=2);n.ae[--n.fe]=n.ae[1],(t=>{const n=e.re,r=e.ie.se,s=e.ie.pe,i=e.ie.ye,o=e.ie.me;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.be[l]=0;for(n[2*t.ae[t.fe]+1]=0,c=t.fe+1;573>c;c++)f=t.ae[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.he||(t.be[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.ue+=w*(l+u),r&&(t.we+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.be[l];)l--;t.be[l]--,t.be[l+1]+=2,t.be[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.be[l];0!==f;)a=t.ae[--c],a>e.he||(n[2*a+1]!=l&&(t.ue+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.he,n.be)}}function Le(e,t,n,r,s){const i=this;i.se=e,i.pe=t,i.ye=n,i.oe=r,i.me=s}He.ge=[0,1,2,3,4,5,6,7].concat(...Te([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),He.ke=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],He.ve=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],He.Se=e=>256>e?je[e]:je[256+(e>>>7)],He.ze=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],He.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],He.xe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],He.Ae=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Fe=Te([[144,8],[112,9],[24,7],[8,8]]);Le._e=We([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Fe[t]])));const qe=Te([[30,5]]);function Ge(e,t,n,r,s){const i=this;i.Ie=e,i.Pe=t,i.De=n,i.Ve=r,i.Re=s}Le.Be=We([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,qe[t]]))),Le.Ee=new Le(Le._e,He.ze,257,286,15),Le.Me=new Le(Le.Be,He.Ce,0,30,15),Le.Ue=new Le(null,He.xe,0,19,7);const Je=[new Ge(0,0,0,0,0),new Ge(4,4,8,4,1),new Ge(4,5,16,8,1),new Ge(4,6,32,32,1),new Ge(4,4,16,16,2),new Ge(8,16,32,32,2),new Ge(8,16,128,128,2),new Ge(8,32,128,256,2),new Ge(32,128,258,1024,2),new Ge(32,258,258,4096,2)],Qe=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Xe=113,Ye=666,Ze=262;function $e(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function et(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,C,x,A,_,I,P,D,V,R,B,E,M,U;const K=new He,N=new He,O=new He;let T,W,j,H,L,F;function q(){let t;for(t=0;286>t;t++)E[2*t]=0;for(t=0;30>t;t++)M[2*t]=0;for(t=0;19>t;t++)U[2*t]=0;E[512]=1,e.ue=e.we=0,W=j=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?U[2*n]+=i:0!==n?(n!=r&&U[2*n]++,U[32]++):i>10?U[36]++:U[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ke[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;F>16-r?(n=e,L|=n<>>16-F,F+=r-16):(L|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,U)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,U),o--),Y(16,U),X(o-3,2)):o>10?(Y(18,U),X(o-11,7)):(Y(17,U),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==F?(Q(L),L=0,F=0):8>F||(J(255&L),L>>>=8,F-=8)}function ee(t,n){let s,i,o;if(e.Ne[W]=t,e.Oe[W]=255&n,W++,0===t?E[2*n]++:(j++,t--,E[2*(He.ge[n]+256+1)]++,M[2*He.Se(t)]++),!(8191&W)&&D>2){for(s=8*W,i=C-k,o=0;30>o;o++)s+=M[2*o]*(5+He.Ce[o]);if(s>>>=3,jc);Y(256,t),H=t[513]}function ne(){F>8?Q(L):F>0&&J(255&L),L=0,F=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),H=8,Q(n),Q(~n),e.Ke.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;D>0?(K.ne(e),N.ne(e),o=(()=>{let t;for(G(E,K.he),G(M,N.he),O.ne(e),t=18;t>=3&&0===U[2*He.Ae[t]+1];t--);return e.ue+=14+3*(t+1),t})(),s=e.ue+3+7>>>3,i=e.we+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(Le._e,Le.Be)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(U[2*He.Ae[r]+1],3);Z(E,e-1),Z(M,t-1)})(K.he+1,N.he+1,o+1),te(E,M)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,C-k,n),k=C,t.Te()}function ie(){let e,n,r,s;do{if(s=w-A-C,0===s&&0===C&&0===A)s=f;else if(-1==s)s--;else if(C>=f+f-Ze){u.set(u.subarray(f,f+f),0),x-=f,C-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.We)return;e=t.je(u,C+A,s),A+=e,3>A||(p=255&u[C],p=(p<A&&0!==t.We)}function oe(e){let t,n,r=I,s=C,i=_;const o=C>f-Ze?C-(f-Ze):0;let c=B;const a=l,w=C+258;let d=u[s+i-1],p=u[s+i];R>_||(r>>=2),c>A&&(c=A);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(x=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>A?A:i}e.le=[],e.be=[],e.ae=[],E=[],M=[],U=[],e.de=(t,n)=>{const r=e.ae,s=r[n];let i=n<<1;for(;i<=e.ce&&(i(W||(W=8),j||(j=8),G||(G=0),t.Le=null,-1==S&&(S=6),1>j||j>9||8!=W||9>x||x>15||0>S||S>9||0>G||G>2?Oe:(t.Fe=e,a=x,f=1<(t.qe=t.Ge=0,t.Le=null,e.pending=0,e.Je=0,n=Xe,c=0,K.re=E,K.ie=Le.Ee,N.re=M,N.ie=Le.Me,O.re=U,O.ie=Le.Ue,L=0,F=0,H=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;P=Je[D].Pe,R=Je[D].Ie,B=Je[D].De,I=Je[D].Ve,C=0,k=0,A=0,v=_=2,z=0,p=0})(),0))(t))),e.Qe=()=>42!=n&&n!=Xe&&n!=Ye?Oe:(e.Oe=null,e.Ne=null,e.Ke=null,d=null,h=null,u=null,e.Fe=null,n==Xe?-3:0),e.Xe=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?Oe:(Je[D].Re!=Je[t].Re&&0!==e.qe&&(r=e.Ye(1)),D!=t&&(D=t,P=Je[D].Pe,R=Je[D].Ie,B=Je[D].De,I=Je[D].Ve),V=n,r)},e.Ze=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return Oe;if(3>i)return 0;for(i>f-Ze&&(i=f-Ze,o=r-i),u.set(t.subarray(o,o+i),0),C=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,I,R;if(i>4||0>i)return Oe;if(!r.$e||!r.et&&0!==r.We||n==Ye&&4!=i)return r.Le=Qe[4],Oe;if(0===r.tt)return r.Le=Qe[7],-5;var B;if(t=r,I=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(D-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==C&&(w|=32),w+=31-w%31,n=Xe,J((B=w)>>8&255),J(255&B)),0!==e.pending){if(t.Te(),0===t.tt)return c=-1,0}else if(0===t.We&&I>=i&&4!=i)return t.Le=Qe[7],-5;if(n==Ye&&0!==t.We)return r.Le=Qe[7],-5;if(0!==t.We||0!==A||0!=i&&n!=Ye){switch(R=-1,Je[D].Re){case 0:R=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=A){if(ie(),0===A&&0==e)return 0;if(0===A)break}if(C+=A,A=0,n=k+r,(0===C||C>=n)&&(A=C-n,C=n,se(!1),0===t.tt))return 0;if(C-k>=f-Ze&&(se(!1),0===t.tt))return 0}return se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i);break;case 1:R=(e=>{let n,r=0;for(;;){if(Ze>A){if(ie(),Ze>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<f-Ze||2!=V&&(v=oe(r)),3>v)n=ee(0,255&u[C]),A--,C++;else if(n=ee(C-x,v-3),A-=v,v>P||3>A)C+=v,v=0,p=255&u[C],p=(p<{let n,r,s=0;for(;;){if(Ze>A){if(ie(),Ze>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<_&&f-Ze>=(C-s&65535)&&(2!=V&&(v=oe(s)),5>=v&&(1==V||3==v&&C-x>4096)&&(v=2)),3>_||v>_)if(0!==z){if(n=ee(0,255&u[C-1]),n&&se(!1),C++,A--,0===t.tt)return 0}else z=1,C++,A--;else{r=C+A-3,n=ee(C-1-S,_-3),A-=_-1,_-=2;do{++C>r||(p=(p<1+H+10-F&&(X(2,3),Y(256,Le._e),$()),H=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.Te(),0===t.tt)return c=-1,0}}return 4!=i?0:1}}function tt(){const e=this;e.nt=0,e.rt=0,e.We=0,e.qe=0,e.tt=0,e.Ge=0}function nt(e){const t=new tt,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.He(f),t.$e=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,o=t.Ye(0),0!=o)throw new s("deflating: "+t.Le);t.rt&&(t.rt==n?w.push(new i(c)):w.push(c.subarray(0,t.rt))),u+=t.rt,r&&t.nt>0&&t.nt!=a&&(r(t.nt),a=t.nt)}while(t.We>0||0===t.tt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]?new i(w[0]):new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.rt=0,t.tt=n,e=t.Ye(4),1!=e&&0!=e)throw new s("deflating: "+t.Le);n-t.tt>0&&a.push(c.slice(0,t.rt)),f+=t.rt}while(t.We>0||0===t.tt);return t.Qe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}tt.prototype={He(e,t){const n=this;return n.Fe=new et,t||(t=15),n.Fe.He(n,e,t)},Ye(e){const t=this;return t.Fe?t.Fe.Ye(t,e):Oe},Qe(){const e=this;if(!e.Fe)return Oe;const t=e.Fe.Qe();return e.Fe=null,t},Xe(e,t){const n=this;return n.Fe?n.Fe.Xe(n,e,t):Oe},Ze(e,t){const n=this;return n.Fe?n.Fe.Ze(n,e,t):Oe},je(e,t,n){const r=this;let s=r.We;return s>n&&(s=n),0===s?0:(r.We-=s,e.set(r.et.subarray(r.nt,r.nt+s),t),r.nt+=s,r.qe+=s,s)},Te(){const e=this;let t=e.Fe.pending;t>e.tt&&(t=e.tt),0!==t&&(e.$e.set(e.Fe.Ke.subarray(e.Fe.Je,e.Fe.Je+t),e.rt),e.rt+=t,e.Fe.Je+=t,e.Ge+=t,e.tt-=t,e.Fe.pending-=t,0===e.Fe.pending&&(e.Fe.Je=0))}};const rt=-2,st=-3,it=-5,ot=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],ct=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],ft=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],at=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],lt=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],ut=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],wt=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function ht(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,C,x,A,_,I,P;C=0,g=o;do{n[e[t+C]]++,C++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,I=1<k;k++,I<<=1)if(0>(I-=n[k]))return st;if(0>(I-=n[g]))return st;for(n[g]+=I,i[1]=k=0,C=1,_=2;0!=--g;)i[_]=k+=n[C],_++,C++;g=0,C=0;do{0!==(k=e[t+C])&&(d[i[k]++]=g),C++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>A+S;){if(b++,A+=S,P=m-A,P=P>S?S:P,(y=1<<(k=v-A))>p+1&&(y-=p+1,_=v,P>k))for(;++kn[++_];)y-=n[_];if(P=1<1440)return st;s[b]=x=h[0],h[0]+=P,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>A-S,r[2]=x-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=x}for(r[1]=v-A,o>C?d[C]d[C]?0:96,r[2]=d[C++]):(r[0]=a[d[C]-c]+16+64,r[2]=f[d[C++]-c]):r[0]=192,y=1<>>A;P>k;k+=y)w.set(r,3*(x+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.st=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),a==st?f.Le="oversubscribed dynamic bit lengths tree":a!=it&&0!==r[0]||(f.Le="incomplete dynamic bit lengths tree",a=st),a},this.it=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,at,lt,a,i,u,e,t),0!=h||0===i[0]?(h==st?w.Le="oversubscribed literal/length tree":-4!=h&&(w.Le="incomplete literal/length tree",h=st),h):(c(288),h=o(s,n,r,0,ut,wt,l,f,u,e,t),0!=h||0===f[0]&&n>257?(h==st?w.Le="oversubscribed distance tree":h==it?(w.Le="incomplete distance tree",h=st):-4!=h&&(w.Le="empty distance tree with lengths",h=st),h):0)}}function dt(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.nt,p=c.We,w=o.ot,h=o.ct,y=o.write,m=yh;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],16&u){for(u&=15,k=a[z+2]+(w&ot[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],16&u){for(u&=15;u>h;)p--,w|=(255&c.ft(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--u);else o.lt.set(o.lt.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.lt[y++]=o.lt[S++],o.lt[y++]=o.lt[S++],k-=2):(o.lt.set(o.lt.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--k);else o.lt.set(o.lt.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(64&u)return c.Le="invalid distance code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,st;f+=a[z+2],f+=w&ot[u],z=3*(l+f),u=a[z]}break}if(64&u)return 32&u?(k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,1):(c.Le="invalid literal/length code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,st);if(f+=a[z+2],f+=w&ot[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.ut=(e,y,m)=>{let b,g,k,v,S,z,C,x=0,A=0,_=0;for(_=y.nt,v=y.We,x=e.ot,A=e.ct,S=e.write,z=S=258&&v>=10&&(e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,m=p(u,w,r,h,s,d,e,y),_=y.nt,v=y.We,x=e.ot,A=e.ct,S=e.write,z=SA;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<>>=n[g+1],A-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(16&k){a=15&k,i=n[g+2],t=2;break}if(!(64&k)){c=k,o=g/3+n[g+2];break}if(32&k){t=7;break}return t=9,y.Le="invalid literal/length code",m=st,e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);case 2:for(b=a;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<>=b,A-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<>=n[g+1],A-=n[g+1],k=n[g],16&k){a=15&k,l=n[g+2],t=4;break}if(!(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Le="invalid distance code",m=st,e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);case 4:for(b=a;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<>=b,A-=b,t=5;case 5:for(C=S-l;0>C;)C+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(A-=8,v++,_--),e.write=S,m=e.wt(y,m),S=e.write,z=S{}}ht.dt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=ct,r[0]=ft,0);const pt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function yt(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new dt;let h=0,d=new f(4320);const p=new ht;n.ct=0,n.ot=0,n.lt=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.ht(e),s=0,n.ct=0,n.ot=0,n.read=n.write=0},n.reset(e,null),n.wt=(e,t)=>{let r,s,i;return s=e.rt,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.tt&&(r=e.tt),0!==r&&t==it&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.tt&&(r=e.tt),0!==r&&t==it&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r),e.rt=s,n.read=i,t},n.ut=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=gy;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],C=[[]],x=[[]],ht.dt(S,z,C,x),w.init(S[0],z[0],C[0],0,x[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Le="invalid block type",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>16&65535)!=(65535&f))return s=9,e.Le="invalid stored block lengths",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.lt.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<29||(i>>5&31)>29)return s=9,e.Le="too many length or distance symbols",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=3,y-=3}for(;19>a;)r[pt[a++]]=0;if(l[0]=7,i=p.st(r,l,u,d,e),0!=i)return(t=i)==st&&(r=null,s=9),n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=i,y-=i,o+=f&ot[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Le="invalid bit length repeat",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,A=[],_=[],I=[],P=[],A[0]=9,_[0]=6,i=c,i=p.it(257+(31&i),1+(i>>5&31),r,A,_,I,P,d,e),0!=i)return i==st&&(r=null,s=9),t=i,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w.init(A[0],_[0],d,I[0],d,P[0]),s=6;case 6:if(n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,1!=(t=w.ut(n,e,t)))return n.wt(e,t);if(t=0,w.ht(e),m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=g{n.reset(e,null),n.lt=null,d=null},n.yt=(e,t,r)=>{n.lt.set(e.subarray(t,t+r),0),n.read=n.write=r},n.bt=()=>1==s?1:0}const mt=13,bt=[0,0,255,255];function gt(){const e=this;function t(e){return e&&e.gt?(e.qe=e.Ge=0,e.Le=null,e.gt.mode=7,e.gt.kt.reset(e,null),0):rt}e.mode=0,e.method=0,e.vt=[0],e.St=0,e.marker=0,e.zt=0,e.Ct=t=>(e.kt&&e.kt.ht(t),e.kt=null,0),e.xt=(n,r)=>(n.Le=null,e.kt=null,8>r||r>15?(e.Ct(n),rt):(e.zt=r,n.gt.kt=new yt(n,1<{let n,r;if(!e||!e.gt||!e.et)return rt;const s=e.gt;for(t=4==t?it:0,n=it;;)switch(s.mode){case 0:if(0===e.We)return n;if(n=t,e.We--,e.qe++,8!=(15&(s.method=e.ft(e.nt++)))){s.mode=mt,e.Le="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s.zt){s.mode=mt,e.Le="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.We)return n;if(n=t,e.We--,e.qe++,r=255&e.ft(e.nt++),((s.method<<8)+r)%31!=0){s.mode=mt,e.Le="incorrect header check",s.marker=5;break}if(!(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St=(255&e.ft(e.nt++))<<24&4278190080,s.mode=3;case 3:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<16&16711680,s.mode=4;case 4:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<8&65280,s.mode=5;case 5:return 0===e.We?n:(n=t,e.We--,e.qe++,s.St+=255&e.ft(e.nt++),s.mode=6,2);case 6:return s.mode=mt,e.Le="need dictionary",s.marker=0,rt;case 7:if(n=s.kt.ut(e,n),n==st){s.mode=mt,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.kt.reset(e,s.vt),s.mode=12;case 12:return e.We=0,1;case mt:return st;default:return rt}},e._t=(e,t,n)=>{let r=0,s=n;if(!e||!e.gt||6!=e.gt.mode)return rt;const i=e.gt;return s<1<{let n,r,s,i,o;if(!e||!e.gt)return rt;const c=e.gt;if(c.mode!=mt&&(c.mode=mt,c.marker=0),0===(n=e.We))return it;for(r=e.nt,s=c.marker;0!==n&&4>s;)e.ft(r)==bt[s]?s++:s=0!==e.ft(r)?0:4-s,r++,n--;return e.qe+=r-e.nt,e.nt=r,e.We=n,c.marker=s,4!=s?st:(i=e.qe,o=e.Ge,t(e),e.qe=i,e.Ge=o,c.mode=7,0)},e.Pt=e=>e&&e.gt&&e.gt.kt?e.gt.kt.bt():rt}function kt(){}function vt(e){const t=new kt,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.xt(),t.$e=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,0!==t.We||c||(t.nt=0,c=!0),a=t.At(0),c&&a===it){if(0!==t.We)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Le);if((c||1===a)&&t.We===e.length)throw new s("inflating: bad input");t.rt&&(t.rt===n?f.push(new i(o)):f.push(o.subarray(0,t.rt))),h+=t.rt,r&&t.nt>0&&t.nt!=u&&(r(t.nt),u=t.nt)}while(t.We>0||0===t.tt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]?new i(f[0]):new i,l}},this.flush=()=>{t.Ct()}}kt.prototype={xt(e){const t=this;return t.gt=new gt,e||(e=15),t.gt.xt(t,e)},At(e){const t=this;return t.gt?t.gt.At(t,e):rt},Ct(){const e=this;if(!e.gt)return rt;const t=e.gt.Ct(e);return e.gt=null,t},It(){const e=this;return e.gt?e.gt.It(e):rt},_t(e,t){const n=this;return n.gt?n.gt._t(n,e,t):rt},ft(e){return this.et[e]},je(e,t){return this.et.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=nt,self.Inflate=vt}; `,n=()=>t.useDataURI?"data:text/javascript,"+encodeURIComponent(r):URL.createObjectURL(new Blob([r],{type:"text/javascript"}));e({workerScripts:{inflate:[n],deflate:[n]}})}const fnt="Writer iterator completed too soon",dnt="text/plain",pnt="Content-Type",mnt=64*1024,t6="writable";class Gx{constructor(){this.size=0}init(){this.initialized=!0}}class e6 extends Gx{get readable(){const t=this,{chunkSize:r=mnt}=t,n=new ReadableStream({start(){this.chunkOffset=0},async pull(i){const{offset:s=0,size:o,diskNumberStart:a}=n,{chunkOffset:l}=this;i.enqueue(await hn(t,s+l,Math.min(r,o-l),a)),l+r>o?i.close():this.chunkOffset+=r}});return n}}class Yx extends e6{constructor(t){super(),Object.assign(this,{blob:t,size:t.size})}async readUint8Array(t,r){const n=this,i=t+r;let o=await(t||ir&&(o=o.slice(t,i)),new Uint8Array(o)}}class Kx extends Gx{constructor(t){super();const r=this,n=new TransformStream,i=[];t&&i.push([pnt,t]),Object.defineProperty(r,t6,{get(){return n.writable}}),r.blob=new Response(n.readable,{headers:i}).blob()}getData(){return this.blob}}class r6 extends Yx{constructor(t){super(new Blob([t],{type:dnt}))}}class gnt extends Kx{constructor(t){super(t),Object.assign(this,{encoding:t,utf8:!t||t.toLowerCase()=="utf-8"})}async getData(){const{encoding:t,utf8:r}=this,n=await super.getData();if(n.text&&r)return n.text();{const i=new FileReader;return new Promise((s,o)=>{Object.assign(i,{onload:({target:a})=>s(a.result),onerror:()=>o(i.error)}),i.readAsText(n,t)})}}}class ynt extends e6{constructor(t){super(),this.readers=t}async init(){const t=this,{readers:r}=t;t.lastDiskNumber=0,t.lastDiskOffset=0,await Promise.all(r.map(async(n,i)=>{await n.init(),i!=r.length-1&&(t.lastDiskOffset+=n.size),t.size+=n.size})),super.init()}async readUint8Array(t,r,n=0){const i=this,{readers:s}=this;let o,a=n;a==-1&&(a=s.length-1);let l=t;for(;l>=s[a].size;)l-=s[a].size,a++;const c=s[a],u=c.size;if(l+r<=u)o=await hn(c,l,r);else{const h=u-l;o=new Uint8Array(r),o.set(await hn(c,l,h)),o.set(await i.readUint8Array(t+h,r-h,n),h)}return i.lastDiskNumber=Math.max(a,i.lastDiskNumber),o}}class gA extends Gx{constructor(t,r=4294967295){super();const n=this;Object.assign(n,{diskNumber:0,diskOffset:0,size:0,maxSize:r,availableSize:r});let i,s,o;const a=new WritableStream({async write(u){const{availableSize:h}=n;if(o)u.length>=h?(await l(u.slice(0,h)),await c(),n.diskOffset+=i.size,n.diskNumber++,o=null,await this.write(u.slice(h))):await l(u);else{const{value:d,done:g}=await t.next();if(g&&!d)throw new Error(fnt);i=d,i.size=0,i.maxSize&&(n.maxSize=i.maxSize),n.availableSize=n.maxSize,await ua(i),s=d.writable,o=s.getWriter(),await this.write(u)}},async close(){await o.ready,await c()}});Object.defineProperty(n,t6,{get(){return a}});async function l(u){const h=u.length;h&&(await o.ready,await o.write(u),i.size+=h,n.size+=h,n.availableSize-=h)}async function c(){s.size=i.size,await o.close()}}}async function ua(e,t){if(e.init&&!e.initialized)await e.init(t);else return Promise.resolve()}function n6(e){return Array.isArray(e)&&(e=new ynt(e)),e instanceof ReadableStream&&(e={readable:e}),e}function i6(e){e.writable===We&&typeof e.next==ed&&(e=new gA(e)),e instanceof WritableStream&&(e={writable:e});const{writable:t}=e;return t.size===We&&(t.size=0),e instanceof gA||Object.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}function hn(e,t,r,n){return e.readUint8Array(t,r,n)}const s6="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split(""),bnt=s6.length==256;function vnt(e){if(bnt){let t="";for(let r=0;rthis[r]=t[r])}}const wb="File format is not recognized",Snt="End of central directory not found",Ent="End of Zip64 central directory locator not found",Cnt="Central directory header not found",Ant="Local file header not found",knt="Zip64 extra field not found",Dnt="File contains encrypted entry",Tnt="Encryption method not supported",yA="Compression method not supported",bA="Split zip file",vA="utf-8",wA="cp437",Pnt=[[u6,Ar],[h6,Ar],[f6,Ar],[$v,yr]],Fnt={[yr]:{getValue:Sr,bytes:4},[Ar]:{getValue:Gp,bytes:8}};class Ont{constructor(t,r={}){Object.assign(this,{reader:n6(t),options:r,config:D$()})}async*getEntriesGenerator(t={}){const r=this;let{reader:n}=r;const{config:i}=r;if(await ua(n),(n.size===We||!n.readUint8Array)&&(n=new Yx(await new Response(n.readable).blob()),await ua(n)),n.size=n.size&&(p=n.size-l-a-no,l=n.size-a-no),g!=d)throw new Error(bA);if(l<0)throw new Error(wb);let b=0,w=await hn(n,l,a,y),x=Gr(w);if(a){const O=s.offset-a;if(Sr(x,b)!=Cv&&l!=O){const I=l;l=O,p+=l-I,w=await hn(n,l,a,y),x=Gr(w)}}const E=s.offset-l-(n.lastDiskOffset||0);if(a!=E&&E>=0&&(a=E,w=await hn(n,l,a,y),x=Gr(w)),l<0||l>=n.size)throw new Error(wb);const S=vn(r,t,"filenameEncoding"),C=vn(r,t,"commentEncoding");for(let O=0;O>8==0,T=Y>>8==3,N=w.subarray(q,H),U=Hr(x,b+32),J=G+U,W=w.subarray(G,J),z=M,V=M,Z=Sr(x,b+38),nt=F&&(Rc(x,b+38)&Pv)==Pv||T&&(Z>>16&Fv)==Fv||N.length&&N[N.length-1]==Hh.charCodeAt(0),et=T&&(Z>>16&Ov)==Ov,it=Sr(x,b+42)+p;Object.assign(I,{versionMadeBy:Y,msDosCompatible:F,compressedSize:0,uncompressedSize:0,commentLength:U,directory:nt,offset:it,diskNumberStart:Hr(x,b+34),internalFileAttributes:Hr(x,b+36),externalFileAttributes:Z,rawFilename:N,filenameUTF8:z,commentUTF8:V,rawExtraField:w.subarray(H,G),executable:et}),I.internalFileAttribute=I.internalFileAttributes,I.externalFileAttribute=I.externalFileAttributes;const lt=vn(r,t,"decodeText")||Hp,ht=z?vA:S||wA,pt=V?vA:C||wA;let vt=lt(N,ht);vt===We&&(vt=Hp(N,ht));let Ct=lt(W,pt);Ct===We&&(Ct=Hp(W,pt)),Object.assign(I,{rawComment:W,filename:vt,comment:Ct,directory:nt||vt.endsWith(Hh)}),m=Math.max(it,m),C6(I,I,x,b+6),I.zipCrypto=I.encrypted&&!I.extraFieldAES;const Dt=new ng(I);Dt.getData=(Ot,Tt)=>I.getData(Ot,Dt,Tt),b=J;const{onprogress:Rt}=t;if(Rt)try{await Rt(O+1,f,new ng(I))}catch{}yield Dt}const A=vn(r,t,"extractPrependedData"),$=vn(r,t,"extractAppendedData");return A&&(r.prependedData=m>0?await hn(n,0,m):new Uint8Array),r.comment=u?await hn(n,c+no,u):new Uint8Array,$&&(r.appendedData=h>>8&255:d>>>24&255),signature:d,compressed:c!=0&&!E,encrypted:i.encrypted&&!E,useWebWorkers:vn(i,n,"useWebWorkers"),useCompressionStream:vn(i,n,"useCompressionStream"),transferStreams:vn(i,n,"transferStreams"),checkPasswordOnly:M},config:u,streamOptions:{signal:I,size:$,onstart:H,onprogress:G,onend:Y}};let T=0;try{({outputSize:T}=await Q$({readable:O,writable:q},F))}catch(N){if(!M||N.message!=Wx)throw N}finally{const N=vn(i,n,"preventClose");q.size+=T,!N&&!q.locked&&await q.getWriter().close()}return M?We:t.getData?t.getData():q}}function E6(e,t,r){const n=e.rawBitFlag=Hr(t,r+2),i=(n&kv)==kv,s=Sr(t,r+6);Object.assign(e,{encrypted:i,version:Hr(t,r),bitFlag:{level:(n&Crt)>>1,dataDescriptor:(n&Dv)==Dv,languageEncodingFlag:(n&Tv)==Tv},rawLastModDate:s,lastModDate:Mnt(s),filenameLength:Hr(t,r+22),extraFieldLength:Hr(t,r+24)})}function C6(e,t,r,n,i){const{rawExtraField:s}=t,o=t.extraField=new Map,a=Gr(new Uint8Array(s));let l=0;try{for(;lt[i]==s);for(let i=0,s=0;i=5&&(s.push(rg),o.push(Bv));let a=1;s.forEach((l,c)=>{if(e.data.length>=a+4){const u=Sr(n,a);t[l]=e[l]=new Date(u*1e3);const h=o[c];e[h]=u}a+=4})}async function Lnt(e,t,r,n,i){const s=new Uint8Array(4),o=Gr(s);jnt(o,0,t);const a=n+i;return await l(n)||await l(Math.min(a,r));async function l(c){const u=r-c,h=await hn(e,u,c);for(let d=h.length-n;d>=0;d--)if(h[d]==s[0]&&h[d+1]==s[1]&&h[d+2]==s[2]&&h[d+3]==s[3])return{offset:u+d,buffer:h.slice(d,d+n).buffer}}}function vn(e,t,r){return t[r]===We?e.options[r]:t[r]}function Mnt(e){const t=(e&4294901760)>>16,r=e&65535;try{return new Date(1980+((t&65024)>>9),((t&480)>>5)-1,t&31,(r&63488)>>11,(r&2016)>>5,(r&31)*2,0)}catch{}}function xb(e){return new Date(Number(e/BigInt(1e4)-BigInt(116444736e5)))}function Rc(e,t){return e.getUint8(t)}function Hr(e,t){return e.getUint16(t,!0)}function Sr(e,t){return e.getUint32(t,!0)}function Gp(e,t){return Number(e.getBigUint64(t,!0))}function jnt(e,t,r){e.setUint32(t,r,!0)}function Gr(e){return new DataView(e.buffer)}const znt="File already exists",Unt="Zip file comment exceeds 64KB",Vnt="File entry comment exceeds 64KB",Wnt="File entry name exceeds 64KB",_A="Version exceeds 65535",qnt="The strength must equal 1, 2, or 3",Hnt="Extra field type exceeds 65535",Gnt="Extra field data exceeds 64KB",Qx="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",Ynt="Undefined uncompressed size",SA=new Uint8Array([7,0,2,0,65,69,3,0,0]);let _b=0;const EA=[];class A6{constructor(t,r={}){t=i6(t);const n=t.availableSize!==We&&t.availableSize>0&&t.availableSize!==1/0&&t.maxSize!==We&&t.maxSize>0&&t.maxSize!==1/0;Object.assign(this,{writer:t,addSplitZipSignature:n,options:r,config:D$(),files:new Map,filenames:new Set,offset:r.offset===We?t.writable.size:r.offset,pendingEntriesSize:0,pendingAddFileCalls:new Set,bufferedWrites:0})}async add(t="",r,n={}){const i=this,{pendingAddFileCalls:s,config:o}=i;_bEA.push(l));let a;try{if(t=t.trim(),i.filenames.has(t))throw new Error(znt);return i.filenames.add(t),a=Knt(i,t,r,n),s.add(a),await a}catch(l){throw i.filenames.delete(t),l}finally{s.delete(a);const l=EA.shift();l?l():_b--}}async close(t=new Uint8Array,r={}){const n=this,{pendingAddFileCalls:i,writer:s}=this,{writable:o}=s;for(;i.size;)await Promise.allSettled(Array.from(i));return await iit(this,t,r),Fe(n,r,"preventClose")||await o.getWriter().close(),s.getData?s.getData():o}}async function Knt(e,t,r,n){t=t.trim();const i=Fe(e,n,y6),s=Fe(e,n,w6,i?20:768),o=Fe(e,n,S6);if(s>yr)throw new Error(_A);let a=Fe(e,n,g6,0);a===0&&(a=Fe(e,n,m6,0)),!n.directory&&t.endsWith(Hh)&&(n.directory=!0),Fe(e,n,_6)?(t.endsWith(Hh)||(t+=Hh),a===0&&(i?a=Pv:a=Fv<<16)):!i&&a===0&&(o?a=(Ov|ZC)<<16:a=ZC<<16);const c=Fe(e,n,"encodeText",Wp);let u=c(t);if(u===We&&(u=Wp(t)),Ie(u)>yr)throw new Error(Wnt);const h=n.comment||"";let d=c(h);if(d===We&&(d=Wp(h)),Ie(d)>yr)throw new Error(Vnt);const g=Fe(e,n,v6,Art);if(g>yr)throw new Error(_A);const y=Fe(e,n,rg,new Date),f=Fe(e,n,Xx),p=Fe(e,n,Jx);let m=Fe(e,n,p6,0);m===0&&(m=Fe(e,n,d6,0));const b=Fe(e,n,"passThrough");let w,x;b||(w=Fe(e,n,"password"),x=Fe(e,n,"rawPassword"));const E=Fe(e,n,"encryptionStrength",3),S=Fe(e,n,x6),C=Fe(e,n,"extendedTimestamp",!0),A=Fe(e,n,"keepOrder",!0),$=Fe(e,n,"level"),O=Fe(e,n,"useWebWorkers"),I=Fe(e,n,"bufferedWrite"),M=Fe(e,n,"dataDescriptorSignature",!1),q=Fe(e,n,"signal"),H=Fe(e,n,"useUnicodeFileNames",!0),G=Fe(e,n,"useCompressionStream"),Y=Fe(e,n,"compressionMethod");let F=Fe(e,n,"dataDescriptor",!0),T=Fe(e,n,Zx);if(!S&&(w!==We||x!==We)&&!(E>=1&&E<=3))throw new Error(qnt);let N=new Uint8Array;const{extraField:U}=n;if(U){let mt=0,Kt=0;U.forEach(Jt=>mt+=4+Ie(Jt)),N=new Uint8Array(mt),U.forEach((Jt,re)=>{if(re>yr)throw new Error(Hnt);if(Ie(Jt)>yr)throw new Error(Gnt);Fr(N,new Uint16Array([re]),Kt),Fr(N,new Uint16Array([Ie(Jt)]),Kt+2),Fr(N,Jt,Kt+4),Kt+=4+Ie(Jt)})}let J=0,W=0,z=0;if(b&&({uncompressedSize:z}=n,z===We))throw new Error(Ynt);const V=T===!0;r&&(r=n6(r),await ua(r),b?J=CA(z):r.size===We?(F=!0,(T||T===We)&&(T=!0,z=J=Ar+1)):(z=r.size,J=CA(z)));const{diskOffset:Z,diskNumber:nt,maxSize:et}=e.writer,it=V||z>Ar,lt=V||J>Ar,ht=V||e.offset+e.pendingEntriesSize-Z>Ar,vt=Fe(e,n,"supportZip64SplitFile",!0)&&V||nt+Math.ceil(e.pendingEntriesSize/et)>yr;if(ht||it||lt||vt){if(T===!1||!A)throw new Error(Qx);T=!0}T=T||!1;const Ct=Fe(e,n,b6),{signature:Dt}=n;n=Object.assign({},n,{rawFilename:u,rawComment:d,version:g,versionMadeBy:s,lastModDate:y,lastAccessDate:f,creationDate:p,rawExtraField:N,zip64:T,zip64UncompressedSize:it,zip64CompressedSize:lt,zip64Offset:ht,zip64DiskNumberStart:vt,password:w,rawPassword:x,level:!G&&e.config.CompressionStream===We&&e.config.CompressionStreamNative===We?0:$,useWebWorkers:O,encryptionStrength:E,extendedTimestamp:C,zipCrypto:S,bufferedWrite:I,keepOrder:A,useUnicodeFileNames:H,dataDescriptor:F,dataDescriptorSignature:M,signal:q,msDosCompatible:i,internalFileAttribute:m,internalFileAttributes:m,externalFileAttribute:a,externalFileAttributes:a,useCompressionStream:G,passThrough:b,encrypted:!!(w&&Ie(w)||x&&Ie(x))||b&&Ct,signature:Dt,compressionMethod:Y});const Rt=Znt(n),Ot=tit(n),Tt=Ie(Rt.localHeaderArray,Ot.dataDescriptorArray);W=Tt+J,e.options.usdz&&(W+=W+64),e.pendingEntriesSize+=W;let ve;try{ve=await Xnt(e,t,r,{headerInfo:Rt,dataDescriptorInfo:Ot,metadataSize:Tt},n)}finally{e.pendingEntriesSize-=W}return Object.assign(ve,{name:t,comment:h,extraField:U}),new ng(ve)}async function Xnt(e,t,r,n,i){const{files:s,writer:o}=e,{keepOrder:a,dataDescriptor:l,signal:c}=i,{headerInfo:u}=n,{usdz:h}=e.options,d=Array.from(s.values()).pop();let g={},y,f,p,m,b,w,x;s.set(t,g);try{let A;a&&(A=d&&d.lock,E()),(i.bufferedWrite||e.writerLocked||e.bufferedWrites&&a||!l)&&!h?(w=new TransformStream,x=new Response(w.readable).blob(),w.writable.size=0,y=!0,e.bufferedWrites++,await ua(o)):(w=o,await S()),await ua(w);const{writable:$}=o;let{diskOffset:O}=o;if(e.addSplitZipSignature){delete e.addSplitZipSignature;const M=new Uint8Array(4),q=nn(M);Oe(q,0,zx),await Cs($,M),e.offset+=4}h&&Qnt(n,e.offset-O),y||(await A,await C($));const{diskNumber:I}=o;if(b=!0,g.diskNumberStart=I,g=await Jnt(r,w,g,n,e.config,i),b=!1,s.set(t,g),g.filename=t,y){await w.writable.getWriter().close();let M=await x;await A,await S(),m=!0,l||(M=await rit(g,M,$,i)),await C($),g.diskNumberStart=o.diskNumber,O=o.diskOffset,await M.stream().pipeTo($,{preventClose:!0,preventAbort:!0,signal:c}),$.size+=M.size,m=!1}if(g.offset=e.offset-O,g.zip64)nit(g,i);else if(g.offset>Ar)throw new Error(Qx);return e.offset+=g.size,g}catch(A){if(y&&m||!y&&b){if(e.hasCorruptedEntries=!0,A)try{A.corruptedEntry=!0}catch{}y?e.offset+=w.writable.size:e.offset=w.writable.size}throw s.delete(t),A}finally{y&&e.bufferedWrites--,p&&p(),f&&f()}function E(){g.lock=new Promise(A=>p=A)}async function S(){e.writerLocked=!0;const{lockWriter:A}=e;e.lockWriter=new Promise($=>f=()=>{e.writerLocked=!1,$()}),await A}async function C(A){Ie(u.localHeaderArray)>o.availableSize&&(o.availableSize=0,await Cs(A,new Uint8Array))}}async function Jnt(e,t,{diskNumberStart:r,lock:n},i,s,o){const{headerInfo:a,dataDescriptorInfo:l,metadataSize:c}=i,{localHeaderArray:u,headerArray:h,lastModDate:d,rawLastModDate:g,encrypted:y,compressed:f,version:p,compressionMethod:m,rawExtraFieldExtendedTimestamp:b,extraFieldExtendedTimestampFlag:w,rawExtraFieldNTFS:x,rawExtraFieldAES:E}=a,{dataDescriptorArray:S}=l,{rawFilename:C,lastAccessDate:A,creationDate:$,password:O,rawPassword:I,level:M,zip64:q,zip64UncompressedSize:H,zip64CompressedSize:G,zip64Offset:Y,zip64DiskNumberStart:F,zipCrypto:T,dataDescriptor:N,directory:U,executable:J,versionMadeBy:W,rawComment:z,rawExtraField:V,useWebWorkers:Z,onstart:nt,onprogress:et,onend:it,signal:lt,encryptionStrength:ht,extendedTimestamp:pt,msDosCompatible:vt,internalFileAttributes:Ct,externalFileAttributes:Dt,useCompressionStream:Rt,passThrough:Ot}=o,Tt={lock:n,versionMadeBy:W,zip64:q,directory:!!U,executable:!!J,filenameUTF8:!0,rawFilename:C,commentUTF8:!0,rawComment:z,rawExtraFieldExtendedTimestamp:b,rawExtraFieldNTFS:x,rawExtraFieldAES:E,rawExtraField:V,extendedTimestamp:pt,msDosCompatible:vt,internalFileAttributes:Ct,externalFileAttributes:Dt,diskNumberStart:r};let{signature:ve,uncompressedSize:mt}=o,Kt=0;Ot||(mt=0);const{writable:Jt}=t;if(e){e.chunkSize=T$(s),await Cs(Jt,u);const Me=e.readable,ut=Me.size=e.size,dt={options:{codecType:K$,level:M,rawPassword:I,password:O,encryptionStrength:ht,zipCrypto:y&&T,passwordVerification:y&&T&&g>>8&255,signed:!Ot,compressed:f&&!Ot,encrypted:y&&!Ot,useWebWorkers:Z,useCompressionStream:Rt,transferStreams:!1},config:s,streamOptions:{signal:lt,size:ut,onstart:nt,onprogress:et,onend:it}},kt=await Q$({readable:Me,writable:Jt},dt);Kt=kt.outputSize,Ot||(mt=kt.inputSize,ve=kt.signature),Jt.size+=mt}else await Cs(Jt,u);let re;if(q){let Me=4;H&&(Me+=8),G&&(Me+=8),Y&&(Me+=8),F&&(Me+=4),re=new Uint8Array(Me)}else re=new Uint8Array;return eit({signature:ve,rawExtraFieldZip64:re,compressedSize:Kt,uncompressedSize:mt,headerInfo:a,dataDescriptorInfo:l},o),N&&await Cs(Jt,S),Object.assign(Tt,{uncompressedSize:mt,compressedSize:Kt,lastModDate:d,rawLastModDate:g,creationDate:$,lastAccessDate:A,encrypted:y,zipCrypto:T,size:c+Kt,compressionMethod:m,version:p,headerArray:h,signature:ve,rawExtraFieldZip64:re,extraFieldExtendedTimestampFlag:w,zip64UncompressedSize:H,zip64CompressedSize:G,zip64Offset:Y,zip64DiskNumberStart:F}),Tt}function Znt(e){const{rawFilename:t,lastModDate:r,lastAccessDate:n,creationDate:i,level:s,zip64:o,zipCrypto:a,useUnicodeFileNames:l,dataDescriptor:c,directory:u,rawExtraField:h,encryptionStrength:d,extendedTimestamp:g,encrypted:y}=e;let{version:f,compressionMethod:p}=e;const m=!u&&(s>0||s===We&&p!==0);let b;if(y&&!a){b=new Uint8Array(Ie(SA)+2);const Y=nn(b);ze(Y,0,S$),Fr(b,SA,2),Rv(Y,8,d)}else b=new Uint8Array;let w,x,E;if(g){x=new Uint8Array(9+(n?4:0)+(i?4:0));const Y=nn(x);ze(Y,0,Ux),ze(Y,2,Ie(x)-4),E=1+(n?2:0)+(i?4:0),Rv(Y,4,E);let F=5;Oe(Y,F,Math.floor(r.getTime()/1e3)),F+=4,n&&(Oe(Y,F,Math.floor(n.getTime()/1e3)),F+=4),i&&Oe(Y,F,Math.floor(i.getTime()/1e3));try{w=new Uint8Array(36);const T=nn(w),N=Sb(r);ze(T,0,E$),ze(T,2,32),ze(T,8,C$),ze(T,10,24),Wn(T,12,N),Wn(T,20,Sb(n)||N),Wn(T,28,Sb(i)||N)}catch{w=new Uint8Array}}else w=x=new Uint8Array;let S=0;l&&(S=S|Tv),c&&(S=S|Dv),p===We&&(p=m?Ev:y$),p==Ev&&(s>=1&&s<3&&(S=S|6),s>=3&&s<5&&(S=S|1),s===9&&(S=S|2)),o&&(f=f>QC?f:QC),y&&(S=S|kv,a||(f=f>tA?f:tA,b[9]=p,p=b$));const C=new Uint8Array(26),A=nn(C);ze(A,0,f),ze(A,2,S),ze(A,4,p);const $=new Uint32Array(1),O=nn($);let I;reA?I=eA:I=r,ze(O,0,(I.getHours()<<6|I.getMinutes())<<5|I.getSeconds()/2),ze(O,2,(I.getFullYear()-1980<<4|I.getMonth()+1)<<5|I.getDate());const M=$[0];Oe(A,6,M),ze(A,22,Ie(t));const q=Ie(b,x,w,h);ze(A,24,q);const H=new Uint8Array(30+Ie(t)+q),G=nn(H);return Oe(G,0,v$),Fr(H,C,4),Fr(H,t,30),Fr(H,b,30+Ie(t)),Fr(H,x,30+Ie(t,b)),Fr(H,w,30+Ie(t,b,x)),Fr(H,h,30+Ie(t,b,x,w)),{localHeaderArray:H,headerArray:C,headerView:A,lastModDate:r,rawLastModDate:M,encrypted:y,compressed:m,version:f,compressionMethod:p,extraFieldExtendedTimestampFlag:E,rawExtraFieldExtendedTimestamp:x,rawExtraFieldNTFS:w,rawExtraFieldAES:b,extraFieldLength:q}}function Qnt(e,t){const{headerInfo:r}=e;let{localHeaderArray:n,extraFieldLength:i}=r,s=nn(n),o=64-(t+Ie(n))%64;o<4&&(o+=64);const a=new Uint8Array(o),l=nn(a);ze(l,0,A$),ze(l,2,o-2);const c=n;r.localHeaderArray=n=new Uint8Array(Ie(c)+o),Fr(n,c),Fr(n,a,Ie(c)),s=nn(n),ze(s,28,i+o),e.metadataSize+=o}function tit(e){const{zip64:t,dataDescriptor:r,dataDescriptorSignature:n}=e;let i=new Uint8Array,s,o=0;return r&&(i=new Uint8Array(t?n?24:20:n?16:12),s=nn(i),n&&(o=4,Oe(s,0,xrt))),{dataDescriptorArray:i,dataDescriptorView:s,dataDescriptorOffset:o}}function eit(e,t){const{signature:r,rawExtraFieldZip64:n,compressedSize:i,uncompressedSize:s,headerInfo:o,dataDescriptorInfo:a}=e,{headerView:l,encrypted:c}=o,{dataDescriptorView:u,dataDescriptorOffset:h}=a,{zip64:d,zip64UncompressedSize:g,zip64CompressedSize:y,zipCrypto:f,dataDescriptor:p}=t;if((!c||f)&&r!==We&&(Oe(l,10,r),p&&Oe(u,h,r)),d){const m=nn(n);ze(m,0,_$),ze(m,2,Ie(n)-4);let b=4;g&&(Oe(l,18,Ar),Wn(m,b,BigInt(s)),b+=8),y&&(Oe(l,14,Ar),Wn(m,b,BigInt(i))),p&&(Wn(u,h+4,BigInt(i)),Wn(u,h+12,BigInt(s)))}else Oe(l,14,i),Oe(l,18,s),p&&(Oe(u,h+4,i),Oe(u,h+8,s))}async function rit(e,t,r,{zipCrypto:n}){let i;i=await t.slice(0,26).arrayBuffer(),i.byteLength!=26&&(i=i.slice(0,26));const s=new DataView(i);return(!e.encrypted||n)&&Oe(s,14,e.signature),e.zip64?(Oe(s,18,Ar),Oe(s,22,Ar)):(Oe(s,18,e.compressedSize),Oe(s,22,e.uncompressedSize)),await Cs(r,new Uint8Array(i)),t.slice(i.byteLength)}function nit(e,t){const{rawExtraFieldZip64:r,offset:n,diskNumberStart:i}=e,{zip64UncompressedSize:s,zip64CompressedSize:o,zip64Offset:a,zip64DiskNumberStart:l}=t,c=nn(r);let u=4;s&&(u+=8),o&&(u+=8),a&&(Wn(c,u,BigInt(n)),u+=8),l&&Oe(c,u,i)}async function iit(e,t,r){const{files:n,writer:i}=e,{diskOffset:s,writable:o}=i;let{diskNumber:a}=i,l=0,c=0,u=e.offset-s,h=n.size;for(const[,E]of n){const{rawFilename:S,rawExtraFieldZip64:C,rawExtraFieldAES:A,rawComment:$,rawExtraFieldNTFS:O,rawExtraField:I,extendedTimestamp:M,extraFieldExtendedTimestampFlag:q,lastModDate:H}=E;let G;if(M){G=new Uint8Array(9);const Y=nn(G);ze(Y,0,Ux),ze(Y,2,5),Rv(Y,4,q),Oe(Y,5,Math.floor(H.getTime()/1e3))}else G=new Uint8Array;E.rawExtraFieldCDExtendedTimestamp=G,c+=46+Ie(S,$,C,A,O,G,I)}const d=new Uint8Array(c),g=nn(d);await ua(i);let y=0;for(const[E,S]of Array.from(n.values()).entries()){const{offset:C,rawFilename:A,rawExtraFieldZip64:$,rawExtraFieldAES:O,rawExtraFieldCDExtendedTimestamp:I,rawExtraFieldNTFS:M,rawExtraField:q,rawComment:H,versionMadeBy:G,headerArray:Y,zip64:F,zip64UncompressedSize:T,zip64CompressedSize:N,zip64DiskNumberStart:U,zip64Offset:J,internalFileAttributes:W,externalFileAttributes:z,diskNumberStart:V,uncompressedSize:Z,compressedSize:nt}=S,et=Ie($,O,I,M,q);Oe(g,l,Cv),ze(g,l+4,G);const it=nn(Y);T||Oe(it,18,Z),N||Oe(it,14,nt),Fr(d,Y,l+6),ze(g,l+30,et),ze(g,l+32,Ie(H)),ze(g,l+34,F&&U?yr:V),ze(g,l+36,W),z&&Oe(g,l+38,z),Oe(g,l+42,F&&J?Ar:C),Fr(d,A,l+46),Fr(d,$,l+46+Ie(A)),Fr(d,O,l+46+Ie(A,$)),Fr(d,I,l+46+Ie(A,$,O)),Fr(d,M,l+46+Ie(A,$,O,I)),Fr(d,q,l+46+Ie(A,$,O,I,M)),Fr(d,H,l+46+Ie(A)+et);const lt=46+Ie(A,H)+et;if(l-y>i.availableSize&&(i.availableSize=0,await Cs(o,d.slice(y,l)),y=l),l+=lt,r.onprogress)try{await r.onprogress(E+1,n.size,new ng(S))}catch{}}await Cs(o,y?d.slice(y):d);let f=i.diskNumber;const{availableSize:p}=i;pAr||c>Ar||h>yr||f>yr){if(m===!1)throw new Error(Qx);m=!0}const b=new Uint8Array(m?_rt:no),w=nn(b);l=0,m&&(Oe(w,0,Av),Wn(w,4,BigInt(44)),ze(w,12,45),ze(w,14,45),Oe(w,16,f),Oe(w,20,a),Wn(w,24,BigInt(h)),Wn(w,32,BigInt(h)),Wn(w,40,BigInt(c)),Wn(w,48,BigInt(u)),Oe(w,56,x$),Wn(w,64,BigInt(u)+BigInt(c)),Oe(w,72,f+1),Fe(e,r,"supportZip64SplitFile",!0)&&(f=yr,a=yr),h=yr,u=Ar,c=Ar,l+=qh+Wh),Oe(w,l,w$),ze(w,l+4,f),ze(w,l+6,a),ze(w,l+8,h),ze(w,l+10,h),Oe(w,l+12,c),Oe(w,l+16,u);const x=Ie(t);if(x)if(x<=yr)ze(w,l+20,x);else throw new Error(Unt);await Cs(o,b),x&&await Cs(o,t)}async function Cs(e,t){const r=e.getWriter();try{await r.ready,e.size+=Ie(t),await r.write(t)}finally{r.releaseLock()}}function Sb(e){if(e)return(BigInt(e.getTime())+BigInt(116444736e5))*BigInt(1e4)}function Fe(e,t,r,n){const i=t[r]===We?e.options[r]:t[r];return i===We?n:i}function CA(e){return e+5*(Math.floor(e/16383)+1)}function Rv(e,t,r){e.setUint8(t,r)}function ze(e,t,r){e.setUint16(t,r,!0)}function Oe(e,t,r){e.setUint32(t,r,!0)}function Wn(e,t,r){e.setBigUint64(t,r,!0)}function Fr(e,t,r){e.set(t,r)}function nn(e){return new DataView(e.buffer)}function Ie(...e){let t=0;return e.forEach(r=>r&&(t+=r.length)),t}let k6;try{k6=import.meta.url}catch{}Vx({baseURL:k6});hnt(Vx);Vx({Deflate:Qet,Inflate:wrt});function D6(e,t){let r=new Set;if(Object.hasOwn(e,"value")||Object.hasOwn(e,"$value")){const n=e;return Object.keys(n).forEach(i=>{["type","$type"].includes(i)&&r.add(n[i]),["type","description","value"].includes(i)&&(n[`$${i}`]=n[i],delete n[i])}),r}else if(Object.keys(e).forEach(n=>{const i=e[n];Tn(i)&&(r=new Set([...r,...D6(i,t)]))}),r.size===1&&t?.applyTypesToGroup!==!1){const n=[...r][0],i=Object.entries(e).map(([s,o])=>(Tn(o)&&delete o.$type,[s,o]));Object.keys(e).forEach(s=>{delete e[s]}),e.$type=n,i.forEach(([s,o])=>{s!=="$type"&&(e[s]=o)})}return r}function t2(e,t){const r=structuredClone(e);return D6(r,t),r}async function sit(e){let t;return e.getData&&(t=await e.getData(new gnt("utf-8"))),[e.filename,t]}async function oit(e){const r=await new Ont(new Yx(e)).getEntries({filenameEncoding:"utf-8"}),n=(await Promise.all(r.filter(i=>!i.directory).map(i=>sit(i)))).filter(i=>!!i[1]);return Object.fromEntries(n)}async function ait(e){const t=new A6(new Kx("application/zip"));return await Promise.all(Object.entries(e).map(([r,n])=>t.add(r,new r6(n)))),t.close()}async function T6(e,t){if(typeof e=="string"){const r=await on.promises.readFile(e);return new Blob([r],{type:t})}return e}function P6(e,t,r){if(!e.type.includes(t))throw new Error(`File ${r??"(Blob)"} is of type ${e.type}, but a ${t} type blob was expected.`)}async function lit(e,t){const r=await T6(e,"application/json");P6(r,"json",typeof e=="string"?e:void 0);const n=await r.text(),i=JSON.stringify(t2(JSON.parse(n),t),null,2);return new Blob([i],{type:"application/json"})}async function cit(e,t){const r=await T6(e,"application/zip");P6(r,"zip",typeof e=="string"?e:void 0);const n=await oit(r),i=Object.fromEntries(Object.entries(n).map(([o,a])=>[o,JSON.stringify(t2(JSON.parse(a),t),null,2)]));return await ait(i)}const uit=Object.freeze(Object.defineProperty({__proto__:null,convertJSONToDTCG:lit,convertToDTCG:t2,convertTokenData:eo,convertZIPToDTCG:cit,createPropertyFormatter:za,fileHeader:Ee,flattenTokens:yv,formattedVariables:mc,getReferences:ml,getTypeScriptType:$c,iconsWithPrefix:wv,minifyDictionary:Jm,outputReferencesFilter:Bet,outputReferencesTransformed:Ret,resolveReferences:u$,setComposeObjectProperties:a$,setSwiftFileProperties:zp,sortByName:gc,sortByReference:Ua,stripMeta:c$,typeDtcgDelegate:zI,usesReferences:Fi},Symbol.toStringTag,{value:"Module"})),hit=e=>{const{file:t,header:r,dictionary:n,options:i}=e,s=t?.options?.resourceType||null,o=t?.options?.resourceMap||{dimension:"dimen",fontSize:"dimen",color:"color",string:"string",content:"string",time:"integer",number:"integer"};function a(c,u){const h=u.usesDtcg?c.$type:c.type;return s||(h&&o[h]?o[h]:"string")}function l(c,u,h){let d=h.usesDtcg?c.original.$value:c.original.value;return t?.options&&t.options.outputReferences&&Fi(d)?`@${a(c,h)}/${ml(d,u,{usesDtcg:h.usesDtcg,warnImmediately:!1})[0].name}`:h.usesDtcg?c.$value:c.value}return` ${r} ${n.allTokens.map(c=>`<${a(c,i)} name="${c.name}">${l(c,n.tokens,i)}${c.comment?``:""}`).join(` `)} `},fit=({dictionary:e,options:t,header:r})=>` ${r} ${e.allTokens.filter(n=>(t.usesDtcg?n.$type:n.type)==="content").map(n=>` ${t.usesDtcg?n.$value:n.value}${n.comment?``:""}`).join(` `)} `,dit=({allTokens:e,formatProperty:t,options:r,header:n})=>` ${n} package ${r.packageName??""} ${r.import.map(i=>`import ${i}`).join(` `)} ${r.accessControl?`${r.accessControl} `:""}${r.objectType?`${r.objectType} `:""}object ${r.className?`${r.className} `:""}{ ${e.map(i=>` ${i.comment?`/** ${i.comment} */ `:""}${r.accessControl?`${r.accessControl} `:""}val ${t(i)}`).join(` `)} } `,pit=e=>`${Object.values(e&&e.asset&&e.asset.font||{}).map(t=>{let r=[];return t.eot&&r.push("url('../"+t.eot.value+`'); src: url('../`+t.eot.value+"?#iefix') format('embedded-opentype')"),t.otf&&r.push("url('../"+t.otf.value+"') format('otf')"),t.ttf&&r.push("url('../"+t.ttf.value+"') format('truetype')"),t.svg&&r.push("url('../"+t.svg.value+"#"+t.name.value.replace(/ /g,"%20")+"') format('svg')"),t.woff&&r.push("url('../"+t.woff.value+"') format('woff')"),t.woff2&&r.push("url('../"+t.woff2.value+"') format('woff2')"),`@font-face { font-family: "${t.name.value}"; src: ${r.join(`, `)}; ${t.style?` font-style: ${t.style.value}; `:""}${t.weight?` font-weight: ${t.weight.value}; `:""}}`})}`,mit=({allTokens:e,file:t,options:r,formatProperty:n,header:i})=>` // // ${t.destination} // ${i} import 'dart:ui'; class ${r.className?`${r.className} `:""}{ ${r.className??""}._(); ${e.map(s=>`static const ${n(s)}`).join(` `)} }`,git=({dictionary:e,options:t,file:r,header:n})=>` // // ${r.destination??""} // ${n} #import typedef NS_ENUM(NSInteger, ${t.type??""}) { ${e.allTokens.map(i=>`${i.name}`).join(`, `)} }; @interface ${t.className?`${t.className} `:""}: NSObject + (NSArray *)values; + (UIColor *)color:(${t.type??""})color; @end`,yit=({dictionary:e,file:t,options:r,header:n})=>` // // ${t.destination??""} // ${n} #import "${r.className??""}.h" @implementation ${r.className??""} + (UIColor *)color:(${r.type??""})colorEnum{ return [[self values] objectAtIndex:colorEnum]; } + (NSArray *)values { static NSArray* colorArray; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ colorArray = @[ ${e.allTokens.map(i=>r.usesDtcg?i.$value:i.value).join(`, `)} ]; }); return colorArray; } @end`,bit=({file:e,options:t,header:r})=>` // // ${e.destination??""} // ${r} #import #import @interface ${t.className?`${t.className} `:""}: NSObject + (NSDictionary *)properties; + (NSDictionary *)getProperty:(NSString *)keyPath; + (nonnull)getValue:(NSString *)keyPath; @end`;function F6(e,t,r){r=r||" ";let n=`@{ `;if(Object.hasOwn(e,`${t.usesDtcg?"$":""}value`)){const i=e;let s=t.usesDtcg?i.$value:i.value;const o=t.usesDtcg?i.$type:i.type;(o==="dimension"||o==="fontSize"||o==="time")&&(s="@"+s),n+=r+'@"value": '+s+`, `,n+=r+'@"name": @"'+i.name+`", `;for(const a in i.attributes)i.attributes[a]&&(n+=r+'@"'+a+'": @"'+i.attributes[a]+`", `);return n.slice(0,-2)+` `+r+"}"}else{for(const i in e)n+=r+'@"'+i+'": '+F6(e[i],t,r+" ")+`, `;return n.slice(0,-2)+` `+r+"}"}}const vit=({dictionary:e,options:t,file:r,header:n})=>` // // ${r.destination??""} // ${n} #import "${t.className??""}.h" @implementation ${t.className??""} + (NSDictionary *)getProperty:(NSString *)keyPath { return [[self properties] valueForKeyPath:keyPath]; } + (nonnull)getValue:(NSString *)keyPath { return [[self properties] valueForKeyPath:[NSString stringWithFormat:@"%@.value", keyPath]]; } + (NSDictionary *)properties { static NSDictionary * dictionary; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ dictionary = ${F6(e.tokens,t)}; }); return dictionary; } @end `,wit=({dictionary:e,file:t,options:r,header:n})=>` // ${t.destination??""} // ${n} #import ${e.allTokens.map(i=>`extern ${r.type?`${r.type} `:""}const ${i.name};`).join(` `)}`,xit=({dictionary:e,file:t,options:r,header:n})=>` // // ${t.destination??""} // ${n} #import "${r.className??""}.h" ${e.allTokens.map(i=>`${r.type?`${r.type} `:""}const ${i.name} = ${r.usesDtcg?i.$value:i.value};`).join(` `)}`,_it=({dictionary:e,file:t,options:r,header:n})=>` // // ${t.destination??""} // ${n} #import ${e.allTokens.map(i=>`extern NSString * const ${i.name};`).join(` `)} @interface ${r.className??""} : NSObject + (NSArray *)values; @end`;function Sit(e,t){let r=`@{ `;r+=' @"value": '+(t.usesDtcg?e.$value:e.value)+`, `,r+=' @"name": @"'+e.name+`", `;for(const n in e.attributes)e.attributes[n]&&(r+=' @"'+n+'": @"'+e.attributes[n]+`", `);return r.slice(0,-2)+` }`}const Eit=({dictionary:e,file:t,options:r,header:n})=>` // // ${t.destination??""} // ${n} #import "${r.className??""}.h" ${e.allTokens.map(i=>`NSString * const ${i.name} = ${r.usesDtcg?i.$value:i.value};`).join(` `)} @implementation ${r.className??""} + (NSArray *)values { static NSArray* array; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ array = @[ ${e.allTokens.map(i=>Sit(i,r)).join(`, `)} ]; }); return array; } @end `,Eb=({allTokens:e,file:t,formatProperty:r,options:n,header:i})=>` // // ${t.destination} // ${i} ${n.import.map(s=>`import ${s}`).join(` `)} ${n.accessControl?`${n.accessControl} `:""}${n.objectType?`${n.objectType} `:""}${n.className?`${n.className} `:""}{ ${e.map(s=>`${n.accessControl?`${n.accessControl} `:""}static let ${r(s)}`).join(` `)} }`;function O6(e,t,r=0){const n=t.formatting?.indentation??" ";let i="";return e===null?i+="''":typeof e=="string"?i+=`'${e}'`:Object.hasOwn(e,`${t.usesDtcg?"$":""}value`)?i+=`$${e.name}`:(i+=`( `,i+=Object.keys(e).map(function(s){const o=e[s];return`${n.repeat(r+1)}'${s}': ${O6(o,t,r+1)}`}).join(`, `),i+=` `+n.repeat(r)+")"),i}const Cit=({dictionary:e,options:t})=>` $${t.mapName??"tokens"}: ${O6(e.tokens,t)}; `,Ait=({allTokens:e,options:t,header:r})=>{const n=t.formatting??{},i={...n,indentation:n.indentation??" ",commentStyle:n.commentStyle??ou.short,commentPosition:n.commentPosition??I0.above};return` ${r}$${t.mapName??"tokens"}: ( ${e.map((s,o,a)=>{const l=`${i.indentation}'${s.name}': ${t.usesDtcg?s.$value:s.value}${o!==a.length-1?",":""}`;return s.comment&&i.commentStyle!==ou.none?Xm(l,s.comment,i):l}).join(` `)} );`},kit=({dictionary:e,options:t,file:r,header:n})=>` // // ${r.destination??""} // ${n} #import #import ${e.allTokens.map(i=>`#define ${i.name} ${t.usesDtcg?i.$value:i.value}`).join(` `)} `,Dit=(e,t)=>{const r=t.usesDtcg?e.$value:e.value,n=t.usesDtcg?e.$type:e.type;let i=` ${e.name} `;return n==="color"?i+=` r ${r[0]/255} g ${r[1]/255} b ${r[2]/255} a 1 `:n==="dimension"?i+=`${r}`:i+=`${r}`,e.comment&&(i+=` `),i},Tit=({dictionary:e,options:t,header:r})=>` ${r} ${e.allTokens.filter(n=>{const i=t.usesDtcg?n.$type:n.type;return i!=="asset"&&i!=="border"&&i!=="shadow"&&i!=="transition"}).map(n=>Dit(n,t)).join(` `)} `,{above:Pit}=I0,{none:Fit}=ou,{long:Cb,short:Pr,xml:Da}=r$,{css:Oit,sass:AA,less:Iit,stylus:$it}=Mx,{cssVariables:Bit,cssFonts:Rit,scssMapFlat:Nit,scssMapDeep:Lit,scssVariables:Mit,scssIcons:jit,lessVariables:zit,lessIcons:Uit,stylusVariables:Vit,javascriptEs6:Wit,javascriptEsm:I6,javascriptModule:$6,javascriptModuleFlat:qit,javascriptObject:B6,javascriptUmd:Hit,typescriptEs6Declarations:Git,typescriptModuleDeclarations:Yit,androidResources:Kit,androidColors:Xit,androidDimens:Jit,androidFontDimens:Zit,androidIntegers:Qit,androidStrings:tst,composeObject:est,iosMacros:rst,iosPlist:nst,iosSingletonM:ist,iosSingletonH:sst,iosStaticH:ost,iosStaticM:ast,iosColorsH:lst,iosColorsM:cst,iosStringsH:ust,iosStringsM:hst,iosSwiftClassSwift:fst,iosSwiftEnumSwift:dst,iosSwiftAnySwift:pst,json:mst,jsonAsset:gst,jsonNested:R6,jsonFlat:yst,sketchPalette:bst,sketchPaletteV2:vst,flutterClassDart:wst}=Lx;function kA(e,t){const r=["attributes","filePath","name","path","comment"],{stripMeta:n,usesDtcg:i}=t;let s={usesDtcg:i};return n&&(n===!0?s.strip=r:s={usesDtcg:i??!1,...n},e=c$(e,s)),e}async function zo(e,t=!1){const r=await Ne(()=>import("./standalone.o5oKee7W.js"),[]),n=await Ne(()=>import("./babel.nAzM5Yej.js"),[]),i=await Ne(()=>import("./estree.8AGGRNDi.js"),[]),s=await Ne(()=>import("./typescript.ZqzFLvOA.js"),[]);return r.format(e,{parser:t?"typescript":"babel",plugins:[n,i,s]})}function Ae(e){const t=structuredClone(e)??{};return delete t.prefix,t}const nd={[Bit]:async function({dictionary:e,options:t={},file:r}){const n=Array.isArray(t.selector)?t.selector:t.selector?[t.selector]:[":root"],{outputReferences:i,outputReferenceFallbacks:s,usesDtcg:o,formatting:a}=t,l=await Ee({file:r,formatting:Ae(a),options:t}),c=a?.indentation||" ",u=(d,g,y)=>`${y}${g} { `+d+` ${y}}`,h=mc({format:Oit,dictionary:e,outputReferences:i,outputReferenceFallbacks:s,formatting:{...a,indentation:c.repeat(n.length)},usesDtcg:o});return l+n.reverse().reduce((d,g,y)=>u(d,g,c.repeat(n.length-1-y)),h)+` `},[Nit]:async function({dictionary:e,options:t,file:r}){const{allTokens:n}=e,{formatting:i}=t,s=await Ee({file:r,commentStyle:Cb,formatting:Ae(i),options:t});return Ait({allTokens:n,options:t,header:s})},[Lit]:async function({dictionary:e,options:t,file:r}){const{outputReferences:n,themeable:i=!0,formatting:s,usesDtcg:o}=t;return` `+await Ee({file:r,commentStyle:Cb,formatting:Ae(s),options:t})+mc({format:AA,dictionary:e,outputReferences:n,themeable:i,formatting:s,usesDtcg:o})+` `+Cit({dictionary:e,options:t})},[Mit]:async function({dictionary:e,options:t,file:r}){const{outputReferences:n,themeable:i=!1,formatting:s,usesDtcg:o}=t;return await Ee({file:r,commentStyle:Pr,formatting:Ae(s),options:t})+mc({format:AA,dictionary:e,outputReferences:n,themeable:i,formatting:s,usesDtcg:o})+` `},[jit]:async function({dictionary:e,options:t,file:r,platform:n}){const{formatting:i}=t;return await Ee({file:r,commentStyle:Pr,formatting:Ae(i),options:t})+wv("$",e.allTokens,t,n)},[zit]:async function({dictionary:e,options:t,file:r}){const{outputReferences:n,formatting:i,usesDtcg:s}=t;return await Ee({file:r,commentStyle:Pr,formatting:Ae(i),options:t})+mc({format:Iit,dictionary:e,outputReferences:n,formatting:i,usesDtcg:s})+` `},[Uit]:async function({dictionary:e,options:t,file:r,platform:n}){const{formatting:i}=t;return await Ee({file:r,commentStyle:Pr,formatting:Ae(i),options:t})+wv("@",e.allTokens,t,n)},[Vit]:async function({dictionary:e,options:t,file:r,platform:n}){const{formatting:i,usesDtcg:s}=t,o=!!n.options?.outputReferences;return await Ee({file:r,commentStyle:Pr,formatting:Ae(i),options:t})+mc({format:$it,dictionary:e,outputReferences:o,formatting:i,usesDtcg:s})+` `},[$6]:async function({dictionary:e,file:t,options:r}){const{formatting:n}=r,s=await Ee({file:t,formatting:Ae(n),options:r})+"module.exports = "+JSON.stringify(e.tokens,null,2)+`; `;return zo(s)},[qit]:async function({dictionary:e,file:t,options:r}){const{formatting:n}=r,s=await Ee({file:t,formatting:Ae(n),options:r})+`module.exports = { `+e.allTokens.map(function(o){return` "${o.name}": ${JSON.stringify(r.usesDtcg?o.$value:o.value)}`}).join(`, `)+` }; `;return zo(s)},[B6]:async function({dictionary:e,file:t,options:r}){const{formatting:n}=r,s=await Ee({file:t,formatting:Ae(n),options:r})+"var "+(t.options?.name||"_styleDictionary")+" = "+JSON.stringify(e.tokens,null,2)+`; `;return zo(s)},[Hit]:async function({dictionary:e,file:t,options:r}){const n=t.options?.name||"_styleDictionary",{formatting:i}=r,o=await Ee({file:t,formatting:Ae(i),options:r})+`(function(root, factory) { if (typeof module === "object" && module.exports) { module.exports = factory(); } else if (typeof exports === "object") { exports["`+n+`"] = factory(); } else if (typeof define === "function" && define.amd) { define([], factory); } else { root["`+n+`"] = factory(); } }(this, function() { return `+JSON.stringify(e.tokens,null,2)+`; })) `;return zo(o)},[Wit]:async function({dictionary:e,file:t,options:r}){const{formatting:n}=r,s=[await Ee({file:t,formatting:Ae(n),options:r}),e.allTokens.map(o=>{const a=JSON.stringify(r.usesDtcg?o.$value:o.value),l=r.usesDtcg?o.$description:o.comment,c=`export const ${o.name} = ${a};`,u={commentStyle:Pr,indentation:"",...n};return l?Xm(c,l,u):c})].flat().join(` `);return zo(s)},[I6]:async function({dictionary:e,file:t,options:r}){const{formatting:n,minify:i=!1,flat:s=!1}=r;let{tokens:o}=e;o=kA(o,r);const a=await Ee({file:t,formatting:Ae(n),options:r});let l;s?l=JSON.stringify(Object.fromEntries(e.allTokens.map(u=>[u.name,r.usesDtcg?u.$value:u.value])),null,2):l=JSON.stringify(i?Jm(o,r.usesDtcg):o,null,2);const c=`${a}export default ${l}; `;return zo(c)},[Git]:async function({dictionary:e,file:t,options:r}){const{formatting:n}=r,s=[await Ee({file:t,formatting:Ae(n),options:r}),e.allTokens.map(o=>{const a=$c(r.usesDtcg?o.$value:o.value,r),l=r.usesDtcg?o.$description:o.comment,c=`export const ${o.name} : ${a};`,u={commentPosition:Pit,commentStyle:Cb,indentation:"",...n};return l?Xm(c,l,u):c})].flat().join(` `);return zo(s,!0)},[Yit]:async function({dictionary:e,file:t,options:r}){const{moduleName:n="tokens"}=r;function i(u){let h=Object.create(null);const d=r.usesDtcg?"$value":"value";if(Object.hasOwn(u,d))h="DesignToken";else for(let g in u)if(Object.hasOwn(u,g))switch(typeof u[g]){case"object":h[g]=i(u[g])}return h}const s=`interface DesignToken { ${r.usesDtcg?"$":""}value?: any; ${r.usesDtcg?"$":""}type?: string; ${r.usesDtcg?"$description?: string;":"comment?: string;"} name?: string; themeable?: boolean; attributes?: Record; [key: string]: any; }`,{formatting:o}=r,c=(await Ee({file:t,formatting:Ae(o),options:r})+`export default ${n}; declare ${s} declare const ${n}: ${JSON.stringify(i(e.tokens),null,2)}`).replace(/"DesignToken"/g,"DesignToken")+` `;return zo(c,!0)},[Kit]:async function({dictionary:e,file:t,options:r}){const{formatting:n}=r,i=await Ee({file:t,commentStyle:Da,formatting:Ae(n),options:r});return hit({dictionary:e,file:t,header:i,options:r})},[Xit]:async function({dictionary:e,options:t,file:r}){const{formatting:n}=t,i=await Ee({file:r,commentStyle:Da,formatting:Ae(n),options:t});return Pet({dictionary:e,options:t,header:i})},[Jit]:async function({dictionary:e,options:t,file:r}){const{formatting:n}=t,i=await Ee({file:r,commentStyle:Da,formatting:Ae(n),options:t});return Fet({dictionary:e,options:t,header:i})},[Zit]:async function({dictionary:e,options:t,file:r}){const{formatting:n}=t,i=await Ee({file:r,commentStyle:Da,formatting:Ae(n),options:t});return Oet({dictionary:e,options:t,header:i})},[Qit]:async function({dictionary:e,options:t,file:r}){const{formatting:n}=t,i=await Ee({file:r,commentStyle:Da,formatting:Ae(n),options:t});return Iet({dictionary:e,options:t,header:i})},[tst]:async function({dictionary:e,options:t,file:r}){const{formatting:n}=t,i=await Ee({file:r,commentStyle:Da,formatting:Ae(n),options:t});return fit({dictionary:e,options:t,header:i})},[est]:async function({dictionary:e,options:t,file:r}){const{allTokens:n,tokens:i,unfilteredTokens:s}=e,{outputReferences:o,formatting:a,usesDtcg:l}=t,c=za({outputReferences:o,dictionary:e,formatting:{suffix:"",commentStyle:Fit,...a},usesDtcg:l});let u;o?u=[...n].sort(Ua(i,{unfilteredTokens:s})):u=[...n].sort(gc),t=a$(t);const h=await Ee({file:r,commentStyle:Pr,formatting:Ae(a),options:t});return dit({allTokens:u,options:t,formatProperty:c,header:h})},[rst]:async function({dictionary:e,options:t,file:r}){const{formatting:n}=t,i=await Ee({file:r,commentStyle:Pr,formatting:Ae(n),options:t});return kit({dictionary:e,options:t,file:r,header:i})},[nst]:async function({dictionary:e,options:t,file:r}){const{formatting:n}=t,i=await Ee({file:r,commentStyle:Da,formatting:Ae(n),options:t});return Tit({dictionary:e,options:t,header:i})},[ist]:async function({dictionary:e,options:t,file:r}){const{formatting:n}=t,i=await Ee({file:r,commentStyle:Pr,formatting:Ae(n),options:t});return vit({dictionary:e,options:t,file:r,header:i})},[sst]:async function({file:e,options:t}){const{formatting:r}=t,n=await Ee({file:e,commentStyle:Pr,formatting:Ae(r),options:t});return bit({file:e,options:t,header:n})},[ost]:async function({dictionary:e,file:t,options:r}){const{formatting:n}=r,i=await Ee({file:t,commentStyle:Pr,formatting:Ae(n),options:r});return wit({dictionary:e,file:t,options:r,header:i})},[ast]:async function({dictionary:e,options:t,file:r}){const{formatting:n}=t,i=await Ee({file:r,commentStyle:Pr,formatting:Ae(n),options:t});return xit({dictionary:e,options:t,file:r,header:i})},[lst]:async function({dictionary:e,options:t,file:r}){const{formatting:n}=t,i=await Ee({file:r,commentStyle:Pr,formatting:Ae(n),options:t});return git({dictionary:e,file:r,options:t,header:i})},[cst]:async function({dictionary:e,options:t,file:r}){const{formatting:n}=t,i=await Ee({file:r,commentStyle:Pr,formatting:Ae(n),options:t});return yit({dictionary:e,options:t,file:r,header:i})},[ust]:async function({dictionary:e,file:t,options:r}){const{formatting:n}=r,i=await Ee({file:t,commentStyle:Pr,formatting:Ae(n),options:r});return _it({dictionary:e,file:t,options:r,header:i})},[hst]:async function({dictionary:e,options:t,file:r}){const{formatting:n}=t,i=await Ee({file:r,commentStyle:Pr,formatting:Ae(n),options:t});return Eit({dictionary:e,options:t,file:r,header:i})},[fst]:async function({dictionary:e,options:t,file:r,platform:n}){const{allTokens:i,tokens:s,unfilteredTokens:o}=e,{outputReferences:a,formatting:l,usesDtcg:c}=t;t=zp(t,"class",n.transformGroup);const u=za({outputReferences:a,dictionary:e,formatting:{suffix:"",...l},usesDtcg:c});let h;a?h=[...i].sort(Ua(s,{unfilteredTokens:o,usesDtcg:c})):h=[...i].sort(gc);const d=await Ee({file:r,commentStyle:Pr,formatting:Ae(l),options:t});return Eb({allTokens:h,file:r,options:t,formatProperty:u,header:d})},[dst]:async function({dictionary:e,options:t,file:r,platform:n}){const{allTokens:i,tokens:s,unfilteredTokens:o}=e,{outputReferences:a,formatting:l,usesDtcg:c}=t;t=zp(t,"enum",n.transformGroup);const u=za({outputReferences:a,dictionary:e,formatting:{suffix:"",...l},usesDtcg:c});let h;a?h=[...i].sort(Ua(s,{unfilteredTokens:o,usesDtcg:c})):h=[...i].sort(gc);const d=await Ee({file:r,commentStyle:Pr,formatting:Ae(l),options:t});return Eb({allTokens:h,file:r,options:t,formatProperty:u,header:d})},[pst]:async function({dictionary:e,options:t,file:r,platform:n}){const{allTokens:i,tokens:s,unfilteredTokens:o}=e,{outputReferences:a,formatting:l,usesDtcg:c}=t;t=zp(t,t.objectType,n.transformGroup);const u=za({outputReferences:a,dictionary:e,formatting:{suffix:"",...l},usesDtcg:c});let h;a?h=[...i].sort(Ua(s,{unfilteredTokens:o,usesDtcg:c})):h=[...i].sort(gc);const d=await Ee({file:r,commentStyle:Pr,formatting:Ae(l),options:t});return Eb({allTokens:h,file:r,options:t,formatProperty:u,header:d})},[Rit]:({dictionary:e})=>pit(e.tokens),[mst]:function({dictionary:e,options:t}){let{tokens:r}=e;return r=kA(r,t),JSON.stringify(r,null,2)+` `},[gst]:function({dictionary:e}){return JSON.stringify({asset:e.tokens.asset},null,2)},[R6]:function({dictionary:e,options:t}){return JSON.stringify(Jm(e.tokens,t.usesDtcg),null,2)+` `},[yst]:function({dictionary:e,options:t}){return`{ `+e.allTokens.map(function(r){return` "${r.name}": ${JSON.stringify(t.usesDtcg?r.$value:r.value)}`}).join(`, `)+` } `},[bst]:function({dictionary:e,options:t}){const r={compatibleVersion:"1.0",pluginVersion:"1.1",colors:[]};return r.colors=e.allTokens.filter(function(n){return n.type==="color"}).map(function(n){return t.usesDtcg?n.$value:n.value}),JSON.stringify(r,null,2)+` `},[vst]:function({dictionary:e,options:t}){const r={compatibleVersion:"2.0",pluginVersion:"2.2",colors:e.allTokens.map(function(n){return Object.assign({name:n.name},t.usesDtcg?n.$value:n.value)})};return JSON.stringify(r,null,2)+` `},[wst]:async function({dictionary:e,options:t,file:r}){const{allTokens:n,tokens:i,unfilteredTokens:s}=e,{outputReferences:o,formatting:a,usesDtcg:l}=t,c=za({outputReferences:o,dictionary:e,formatting:a,usesDtcg:l});let u;o?u=[...n].sort(Ua(i,{unfilteredTokens:s,usesDtcg:l})):u=[...n].sort(gc);const h=await Ee({file:r,commentStyle:Pr,formatting:Ae(a),options:t});return mit({allTokens:u,file:r,options:t,formatProperty:c,header:h})}};nd[R6].nested=!0;nd[$6].nested=!0;nd[B6].nested=!0;nd[I6].nested=!0;const{androidCopyImages:xst,copyAssets:_st}=t$,{silent:DA}=Cu;function TA(e){return vo(e.buildPath??"","android/main/res/drawable-").replace(/\\/g,"/")}function PA(e,t){const r=e.path.slice(2,4).join("_"),n=`${t}${e.attributes?.state}`;return{file:vo(n,`${r}.png`),dir:n}}const Sst={[xst]:{do:async function(e,t,r,n=on){const i=TA(t);await Promise.all(e.allTokens.map(s=>{if(s.type==="asset"){const{file:o,dir:a}=PA(s,i);return n.promises.mkdir(a,{recursive:!0}).then(()=>n.promises.copyFile(r.usesDtcg?s.$value:s.value,o))}}))},undo:async function(e,t,r,n=on){const i=TA(t);await Promise.all(e.allTokens.map(s=>{if(s.type==="asset"){const{file:o}=PA(s,i);return n.promises.unlink(o)}}))}},[_st]:{do:async function(e,t,r,n=on){const i=vo(t.buildPath??"","assets");return t.log?.verbosity!==DA&&console.log(`Copying assets directory to ${i}`),n.promises.cp("assets",i,{recursive:!0})},undo:async function(e,t,r,n=on){const i=vo(t.buildPath??"","assets");return t.log?.verbosity!==DA&&console.log(`Removing assets directory from ${i}`),n.promises.rmdir(i,{recursive:!0})}}},Est={removePrivate:function(e){return!(e&&e.private)}},{value:Cst,name:Ast,attribute:kst}=$0;function Dst(){return{parsers:{},preprocessors:{},transformGroups:{...vet},transforms:{...eet},formats:{...nd},fileHeaders:{},filters:{...Est},actions:{...Sst}}}class e2{static hooks=Dst();constructor(){this.hooks=e2.hooks}get hooks(){const t=this.constructor;return ii(t.hooks,this._hooks??{})}set hooks(t){this._hooks=t}static deleteExistingHook(t,r,n){t.hooks[r][n]&&delete t.hooks[r][n]}static registerTransform(t){this.__registerTransform(t,this)}registerTransform(t){this.constructor.__registerTransform(t,this)}static __registerTransform(t,r){const n=[Ast,Cst,kst],{type:i,name:s,filter:o,transitive:a,transform:l}=t;if(typeof i!="string")throw new Error("type must be a string");if(n.indexOf(i)<0)throw new Error(i+" type is not one of: "+n.join(", "));if(typeof s!="string")throw new Error("name must be a string");if(o&&typeof o!="function")throw new Error("filter must be a function");if(typeof l!="function")throw new Error("transform must be a function");return this.deleteExistingHook(r,"transforms",s),r.hooks=ii(r.hooks,{transforms:{[s]:{type:i,filter:o,transitive:!!a,transform:l}}}),this}static registerTransformGroup(t){this.__registerTransformGroup(t,this)}registerTransformGroup(t){this.constructor.__registerTransformGroup(t,this)}static __registerTransformGroup(t,r){const{name:n,transforms:i}=t;if(typeof n!="string")throw new Error("transform name must be a string");if(!Array.isArray(i))throw new Error("transforms must be an array of registered value transforms");return i.forEach(s=>{if(!r.hooks.transforms||!(s in r.hooks.transforms))throw new Error("transforms must be an array of registered value transforms")}),this.deleteExistingHook(r,"transformGroups",n),r.hooks=ii(r.hooks,{transformGroups:{[n]:i}}),r}static registerFormat(t){this.__registerFormat(t,this)}registerFormat(t){this.constructor.__registerFormat(t,this)}static __registerFormat(t,r){const{name:n,format:i}=t;if(typeof n!="string")throw new Error("Can't register format; format.name must be a string");if(typeof i!="function")throw new Error("Can't register format; format.format must be a function");return this.deleteExistingHook(r,"formats",n),r.hooks=ii(r.hooks,{formats:{[n]:i}}),r}static registerAction(t){this.__registerAction(t,this)}registerAction(t){this.constructor.__registerAction(t,this)}static __registerAction(t,r){const{name:n,do:i,undo:s}=t;if(typeof n!="string")throw new Error("name must be a string");if(typeof i!="function")throw new Error("do must be a function");return this.deleteExistingHook(r,"actions",n),r.hooks=ii(r.hooks,{actions:{[n]:{do:i,undo:s}}}),r}static registerFilter(t){this.__registerFilter(t,this)}registerFilter(t){this.constructor.__registerFilter(t,this)}static __registerFilter(t,r){const{name:n,filter:i}=t;if(typeof n!="string")throw new Error("Can't register filter; filter.name must be a string");if(typeof i!="function")throw new Error("Can't register filter; filter.filter must be a function");return this.deleteExistingHook(r,"filters",n),r.hooks=ii(r.hooks,{filters:{[n]:i}}),r}static registerParser(t){this.__registerParser(t,this)}registerParser(t){this.constructor.__registerParser(t,this)}static __registerParser(t,r){const{name:n,pattern:i,parser:s}=t;if(typeof n!="string")throw new Error("Can't register parser; parser.name must be a string");if(!(i instanceof RegExp))throw new Error("Can't register parser; parser.pattern must be a regular expression");if(typeof s!="function")throw new Error("Can't register parser; parser.parser must be a function");return this.deleteExistingHook(r,"parsers",n),r.hooks=ii(r.hooks,{parsers:{[n]:{pattern:i,parser:s}}}),r}static registerPreprocessor(t){this.__registerPreprocessor(t,this)}registerPreprocessor(t){this.constructor.__registerPreprocessor(t,this)}static __registerPreprocessor(t,r){const{name:n,preprocessor:i}=t,s="Cannot register preprocessor;";if(typeof n!="string")throw new Error(`${s} Preprocessor.name must be a string`);if(!(i instanceof Function))throw new Error(`${s} Preprocessor.preprocessor must be a function`);return this.deleteExistingHook(r,"preprocessors",n),r.hooks=ii(r.hooks,{preprocessors:{[n]:i}}),r}static registerFileHeader(t){this.__registerFileHeader(t,this)}registerFileHeader(t){this.constructor.__registerFileHeader(t,this)}static __registerFileHeader(t,r){const{name:n,fileHeader:i}=t;if(typeof n!="string")throw new Error("Can't register file header; options.name must be a string");if(typeof i!="function")throw new Error("Can't register file header; options.fileHeader must be a function");return this.deleteExistingHook(r,"fileHeaders",n),r.hooks=ii(r.hooks,{fileHeaders:{[n]:i}}),r}}const Ab=_e.GROUP.MissingRegisterTransformErrors;function Tst(e,t,r){const n={...e};n.log=ii(t.log??{},e.log??{});let i=[];if(n.transformGroup)if(t.hooks.transformGroups?.[n.transformGroup])i=t.hooks.transformGroups[n.transformGroup];else{let a=` Unknown transformGroup "${n.transformGroup}" found in platform "${r}": "${n.transformGroup}" does not match the name of a registered transformGroup. `;throw new Error(a)}n.transforms&&(i=i.concat(n.transforms)),n.transforms=i.map(function(a){const l=t.hooks.transforms?.[a];return l||_e.add(Ab,`"${a}"`),{...l,name:a}});let s=_e.count(Ab);if(s>0){const a=_e.flush(Ab).join(", ");let l;throw s==1?l=` Unknown transform ${a} found in platform "${r}": ${a} does not match the name of a registered transform. `:l=` Unknown transforms ${a} found in platform "${r}": None of ${a} match the name of a registered transform. `,new Error(l)}if(n.options?.fileHeader){const a=n.options.fileHeader;if(typeof a=="string")if(t.hooks.fileHeaders?.[a])n.options.fileHeader=t.hooks.fileHeaders[a];else throw new Error(`Can't find fileHeader: ${a}`);else{if(typeof a!="function")throw new Error("fileHeader must be a string or a function");n.options.fileHeader=a}}n.files&&(n.files=n.files.map(function(a){const l={options:{}};if(a.options&&a.options.fileHeader&&l.options){const u=a.options.fileHeader;if(typeof u=="string")if(t.hooks.fileHeaders?.[u])l.options.fileHeader=t.hooks.fileHeaders[u];else throw new Error(`Can't find fileHeader: ${u}`);else{if(typeof u!="function")throw new Error("fileHeader must be a string or a function");l.options.fileHeader=u}}if(a.filter)if(typeof a.filter=="string")if(t.hooks.filters?.[a.filter])l.filter=t.hooks.filters[a.filter];else throw new Error("Can't find filter: "+a.filter);else if(typeof a.filter=="object"){const u=function(d,g){return Tn(g)?Object.keys(g).every(y=>u(d[y],g[y])):d==g},h=function(d){let g={...d};return f=>u(f,g)};l.filter=h(a.filter)}else if(typeof a.filter=="function")l.filter=a.filter;else throw new Error("Filter format not valid: "+typeof a.filter);if(a.format){const u=a.format;if(t.hooks.formats[u])l.format=t.hooks.formats[u];else throw new Error("Can't find format: "+u)}else throw new Error("Please supply a format for file: "+JSON.stringify(a));return su([{destination:""},a,l])}));const o=n.actions||[];return n.actions=o.map(function(a){if(typeof t.hooks.actions?.[a].undo!="function"){const l=`${a} action does not have a clean function!`;if(n.log?.warnings===Nx.error)throw new Error(l);n.log?.verbosity!==Cu.silent&&console.log(Br.rgb(255,140,0).bold(l))}return t.hooks.actions?.[a]}),n}function Pst(e,t,r){if(!e&&!Tn(e))throw new Error('Token object must be of type "object"');if(!t||typeof t!="string")throw new Error("Token name must be a string");if(!r||!Array.isArray(r))throw new Error("Token path must be an array");let n=e;if(!e.original){let i=structuredClone(e);delete i.filePath,delete i.isSource,n.original=i,n.name=n.name||t||"",n.attributes=n.attributes||{},n.path=structuredClone(r)}return n}const Fst=_e.GROUP.TransformErrors,{value:Ost,name:Ist,attribute:$st}=$0;function Bst(e,t,r,n){const{path:i,filePath:s}=e,o=n?e.$value:e.value;return`Transform Error: token "${i.join(".")}"${s?` (${s})`:""} with value: \`${JSON.stringify(o,null,2)}\` (type: ${typeof o}) could not be transformed by "${r}" transform. Threw the following error: ${t?` ${t.message} ${t.stack}`:""}`}async function kb(e,t,r,n,i){let s;try{s=await e.transform(t,r,n,i)}catch(o){if(o instanceof Error){const a=Bst(t,o,e.name,!!n?.usesDtcg);switch(_e.add(Fst,a),e.type){case"attribute":return t.attributes;case"name":return t.name;case"value":return n.usesDtcg?t.$value:t.value}}}return s}async function Rst(e,t,r,n){const i=structuredClone(e),s=t.transforms||[];for(let o=0;o{i.has(u)||i.add(u)},a=[],l=async(u,h)=>{const d=await Rst(u,t,r,s);return d===void 0&&o(h),{token:d,key:h}};for(const[u,h]of Array.from(e)){if(n.has(u))continue;const g=u.slice(1,u.length-1).split("."),y=Pst(h,g[g.length-1],g);if(Fi(r.usesDtcg?y.$value:y.value)){o(u);continue}a.push(l(y,u))}const c=(await Promise.all(a)).filter(u=>u.token!==void 0);for(const{token:u,key:h}of c)u&&e.set(h,u),i.delete(h),n.add(h);return e}async function Lst(e,t,r,n=on){if(t.actions)return Promise.all(t.actions.map(i=>{if(typeof i!="string"&&typeof i.do=="function")return i.do(e,t,r,n)}))}async function N6(e,t,r){return Promise.all(e.map(n=>t(n,r))).then(n=>e.filter((i,s)=>n[s]))}async function L6(e,t,r){return await Object.entries(e??[]).reduce(async(i,[s,o])=>{const a=await i;if(Tn(o))if(typeof(r.usesDtcg?o.$value:o.value)>"u"){const c=await L6(o,t,r);return Object.entries(c||{}).length<1?a:{...a,[s]:c}}else return(await N6([o],t,r)).length===0?a:{...a,[s]:o};else return a},{})}async function Mst(e,t,r={}){if(t){if(typeof t!="function")throw new Error("filter is not a function");{const n=await N6(e.allTokens??[],t,r),i=await L6(e.tokens,t,r),s=eo(n,{output:"map"});return{allTokens:n,tokens:i,tokenMap:s}}}else return e}const{silent:FA}=Cu;async function jst(e,t={},r=on){const n={warning:[],success:[]};let{destination:i}=e;if(typeof i!="string")throw new Error("Please enter a valid destination");return t.buildPath&&(i=vo(t.buildPath,i)),i=i.replace(/\\/g,"/"),!r.existsSync(i)&&t?.log?.verbosity!==FA?(n.success.push(Br.bold.red("!")+" "+i+", does not exist"),n):(r.unlinkSync(i),t?.log?.verbosity!==FA&&n.success.push(Br.bold.red("-")+" "+i),n)}async function zst(e,t){if(e.files)return Promise.all(e.files.map(r=>{if(r.format)return jst(r,e,t);throw new Error("Please supply a format")}))}async function Ust(e,t={},r=on){let{destination:n}=e;if(typeof n!="string")throw new Error("Please enter a valid destination");t.buildPath&&(n=vo(t.buildPath,n));let i=KO(n.replace(/\\/g,"/"));for(;i;){if(r.existsSync(i))if(r.readdirSync(i,"buffer").length===0)t.log?.verbosity!==Cu.silent&&console.log(Br.bold.red("-")+" "+i),r.rmSync(i,{recursive:!0});else break;const s=i.split("/");s.pop(),i=s.join("/")}}async function Vst(e,t){if(e.files)return Promise.all(e.files?.map(r=>{if(r.format)return Ust(r,e,t);throw new Error("Please supply a format")}))}async function Wst(e,t,r,n=on){if(t.actions)return Promise.all(t.actions.map(i=>{if(typeof i!="string"&&typeof i.undo=="function")return i.undo(e,t,r,n)}))}const Db=_e.GROUP.PropertyValueCollisions,OA=_e.GROUP.PropertyReferenceWarnings,IA=_e.GROUP.TransformErrors,$A=_e.GROUP.UnknownCSSFontProperties,BA=_e.GROUP.FilteredOutputReferences,{throw:RA}=e$,{default:qst,silent:zi,verbose:ic}=Cu,{error:sc,warn:Hst,disabled:Ta}=Nx;class L0 extends e2{static VERSION="";get options(){return ii({hooks:this.hooks},this._options??{})}set options(t){this._options=t}constructor(t={},{init:r=!0,verbosity:n,warnings:i,volume:s}={}){super(),this.config=t,this.options={},this.tokens={},this.allTokens=[],this.tokenMap=new Map,this.usesDtcg=void 0,this.log={warnings:Hst,verbosity:qst,errors:{brokenReferences:RA}},this.source=[],this.include=[],this.expand=void 0,this.platforms={},this.parsers=[],this.preprocessors=[],s&&(s.__custom_fs__=!0),this.volume=s??on,this.unfilteredTokens={},this.unfilteredAllTokens=[],this.hasInitialized=new Promise(o=>{this.hasInitializedResolve=o}),this._dictionaries={},this._platformConfigs={},r&&this.init({verbosity:n,warnings:i})}async init(t){return this.extend(void 0,{...t,mutateOriginal:!0})}async extend(t=this.config,r={}){if(!r.mutateOriginal)return new L0(ii(this.options,t),{init:!1,verbosity:r.verbosity,warnings:r.warnings,volume:r.volume}).init(r);let n,i={},s={},o={};typeof t=="string"?n=await MI(t,this.volume):n=t,this.log={...this.log,...n.log,verbosity:r.verbosity??n.log?.verbosity??this.log.verbosity,warnings:r.warnings??n.log?.warnings??this.log.warnings},this.options={...n,log:this.log},Object.entries(this.options).forEach(([c,u])=>{const h=c;this[h]=u}),Object.entries(this.tokens).length>0&&this.usesDtcg===void 0&&(this.usesDtcg=RI(this.tokens));const a=Object.fromEntries(Object.entries(this.hooks.parsers??{}).filter(([c])=>this.parsers.includes(c)));if(i=su([{},this.tokens||{}]),this.include){if(!Array.isArray(this.include))throw new Error("include must be an array");const c=await HE(this.include,!0,void 0,!1,a,this.usesDtcg,this.volume);s=c.tokens,this.usesDtcg===void 0&&(this.usesDtcg=c.usesDtcg)}if(this.source){if(!Array.isArray(this.source))throw new Error("source must be an array");const c=await HE(this.source,!0,function(d){_e.add(Db,`Collision detected at: ${d.path.join(".")}! Original value: ${d.target[d.key]}, New value: ${d.copy[d.key]}`)},!0,a,this.usesDtcg,this.volume);o=c.tokens,this.usesDtcg===void 0&&(this.usesDtcg=c.usesDtcg);const u=_e.count(Db);if(u>0){const h=_e.flush(Db).join(` `);let d=` Token collisions detected (${u}): `;if(this.log.verbosity===ic?d+=` ${h} `:d+=Jl,this.log?.warnings===sc)throw new Error(d);this.log?.verbosity!==zi&&this.log.warnings!==Ta&&console.log(Br.rgb(255,140,0).bold(d))}}this.options={...this.options,usesDtcg:this.usesDtcg};let l=su([{},i,s,o]);return l=await GE(l,this.preprocessors,this.hooks.preprocessors,this.options),this.usesDtcg&&(l=zI(l)),this.tokens=l,this.allTokens=eo(this.tokens,{output:"array",usesDtcg:this.usesDtcg}),this.tokenMap=eo(this.allTokens,{output:"map",usesDtcg:this.usesDtcg}),this.shouldRunExpansion(this.expand)&&(this.tokenMap=XE(this.tokenMap,this.options),this.allTokens=eo(this.tokenMap,{output:"array",usesDtcg:this.usesDtcg}),this.tokens=eo(this.tokenMap,{output:"object",usesDtcg:this.usesDtcg})),this.hasInitializedResolve(null),this}shouldRunExpansion(t){return t!==void 0&&!(typeof t=="boolean"&&t===!1||typeof t=="object"&&Object.values(t).every(r=>r===!1))}getPlatformConfig(t,r){if(!t||!this.platforms?.[t])throw new Error(`Please supply a valid platform, "${t}" does not exist`);return(!this._platformConfigs[t]||r?.cache===!1)&&(this._platformConfigs[t]=Tst(this.platforms[t],this,t)),this._platformConfigs[t]}async getPlatformTokens(t,r){if(!this._dictionaries[t]||r?.cache===!1){const n=await this._exportPlatform(t);this._dictionaries[t]=n}return this._dictionaries[t]}async exportPlatform(t,r){return(await this.getPlatformTokens(t,r)).tokens}async _exportPlatform(t){await this.hasInitialized;const r=this.getPlatformConfig(t);let n=structuredClone(this.tokens),i=structuredClone(this.tokenMap),s=structuredClone(this.allTokens);const o=this.usesDtcg,a=this.options;r.preprocessors&&r.preprocessors.length>0&&(n=await GE(n,r.preprocessors,this.hooks.preprocessors,r),i=eo(n,{output:"map",usesDtcg:o})),this.shouldRunExpansion(r.expand)&&(i=XE(i,a,r));const l=new Set,c=new Set,u={transformedPropRefs:l,deferredPropValueTransforms:c};let h=0,d=!1;for(;!d;){await Nst(i,r,a,u),gv(i,{ignorePaths:c,usesDtcg:o});const p=c.size;p===0?d=!0:h===p?(gv(i,{usesDtcg:o}),d=!0):h=p}const g=_e.count(OA);if(g>0){const p=_e.flush(OA).join(` `);let m=` Reference Errors: Some token references (${g}) could not be found. `;if(this.log.verbosity===ic?m+=` ${p} `:m+=`${Jl} `,this.log.errors?.brokenReferences===RA)throw new Error(m);this.log.verbosity!==zi&&console.error(m)}const y=_e.count(IA);if(y>0){const p=_e.flush(IA).join(` `);let m=` Some token transformations (${y}) could not be applied correctly. `;if(this.log.verbosity===ic?m+=` ${p} `:m+=`${Jl} `,this.log.warnings==="error")throw new Error(m);this.log.warnings!==Ta&&this.log.verbosity!==zi&&console.log(Br.rgb(255,140,0).bold(m))}const f=_e.count($A);if(f>0){const p=_e.flush($A).join(` `);let m=` Unknown CSS Font Shorthand properties found for ${f} tokens, CSS output for Font values will be missing some typography token properties as a result: `;if(this.log.verbosity===ic?m+=` ${p} `:m+=`${Jl} `,this.log.warnings===sc)throw new Error(m);this.log.warnings!==Ta&&this.log.verbosity!==zi&&console.log(Br.rgb(255,140,0).bold(m))}return s=eo(i,{output:"array",usesDtcg:o}),n=eo(s,{output:"object",usesDtcg:o}),{tokenMap:i,allTokens:s,tokens:n}}async getPlatform(t,r){await this.hasInitialized;const n=this.getPlatformConfig(t,r);return{dictionary:await this.getPlatformTokens(t,r),platformConfig:n}}async formatFile(t,r,n){await this.hasInitialized;const i={warning:[],success:[]},{destination:s}=t||{},o=t.filter;let{format:a}=t||{};if(typeof a!="function")throw new Error("Please enter a valid file format");if(s!==void 0&&typeof s!="string")throw new Error("Please enter a valid destination");const l=a.nested;a=a.bind(t);let c=s;r.buildPath&&c&&(c=vo(r.buildPath,c)),c=c?.replace(/\\/g,"/");const u=await Mst(n,o,this.options),h={tokens:u.tokens,allTokens:u.allTokens,tokenMap:u.tokenMap,unfilteredTokens:n.tokens,unfilteredAllTokens:n.allTokens,unfilteredTokenMap:n.tokenMap};if(Object.hasOwn(u,"tokens")&&Object.keys(u.tokens).length===0&&u.tokens.constructor===Object){let m=`No tokens for ${s}. File not created.`;if(r.log?.warnings===sc)throw new Error(m);return r.log?.verbosity!==zi&&r.log?.warnings!==Ta&&i.warning.push(Br.rgb(255,140,0)(m)),{logs:i,destination:c,output:void 0}}const d={};u.allTokens&&u.allTokens.forEach(m=>{let b=m.name;d[b]||(d[b]=[]),d[b].push(m)});const g=_e.GROUP.PropertyNameCollisionWarnings+":"+s;_e.clear(g),Object.keys(d).forEach(m=>{if(d[m].length>1){let b=d[m].map(w=>{let x=Br.rgb(255,69,0)(w.path.join(".")),E=Br.rgb(255,140,0)(this.usesDtcg?w.$value:w.value);return x+" "+E}).join(` `);_e.add(g,`Output name ${Br.rgb(255,69,0).bold(m)} was generated by: ${b}`)}});const y=_e.count(g),f=await a(ttt({dictionary:h,platform:r,options:this.options,file:t})),p=_e.count(BA);if((l||y===0)&&p===0&&r.log?.verbosity!==zi)i.success.push(Br.bold.green(`✔︎ ${c}`));else{const m=`⚠️ ${c}`;if(y>0){const b=_e.fetchMessages(g).join(` `),w=`While building ${Br.rgb(255,69,0).bold(s)}, token collisions were found; output may be unexpected. Ignore this warning if intentional.`,x=Br.rgb(255,165,0)(["This many-to-one issue is usually caused by some combination of:","* conflicting or similar paths/names in token definitions","* platform transforms/transformGroups affecting names, especially when removing specificity","* overly inclusive file filters"].join(` `)),E=r.log?.verbosity===ic?`${m} ${w} ${b} ${x}`:`${m} ${w} ${Jl}`;if(r?.log?.warnings===sc)throw new Error(E);r.log?.verbosity!==zi&&r.log?.warnings!==Ta&&i.warning.push(Br.rgb(255,140,0).bold(E))}if(p>0){const b=_e.flush(BA).join(` `),w=`While building ${Br.rgb(255,69,0).bold(s)}, filtered out token references were found; output may be unexpected. Ignore this warning if intentional.`,x=Br.rgb(255,165,0)(["This is caused when combining a filter and `outputReferences`."].join(` `)),E=r.log?.verbosity===ic?`${m} ${w} Here are the references that are used but not defined in the file: ${b} ${x}`:`${m} ${w} ${Jl}`;if(r?.log?.warnings===sc)throw new Error(E);r.log?.verbosity!==zi&&r.log?.warnings!==Ta&&i.warning.push(Br.rgb(255,140,0).bold(E))}}return{logs:i,output:f,destination:c}}async formatPlatform(t,r){await this.hasInitialized;const n=this.getPlatformConfig(t,r),i=await this.getPlatformTokens(t,r);if(!n.files)throw new Error(`Cannot format platform ${t} due to missing "files" property`);const s=await Promise.all(n.files.map(a=>{if(a.format)return this.formatFile(a,n,i);throw new Error("Please supply a format")})),o=s.map(a=>a.logs);if(o){this.log?.verbosity!==zi&&console.log(` `+t);for(let a of o)a.success.forEach(l=>{console.log(l)}),a.warning.forEach(l=>{console.log(l)})}return s.map(({output:a,destination:l})=>({output:a,destination:l}))}async formatAllPlatforms(t){if(await this.hasInitialized,!this.platforms)throw new Error('Cannot format platforms due to missing property "platforms" on config');const r=async i=>{const s=await this.formatPlatform(i,t);return{platform:i,outputs:s}};return(await Promise.all(Object.keys(this.platforms).map(r))).reduce((i,s)=>({...i,[s.platform]:s.outputs}),{})}async buildPlatform(t,r){await this.hasInitialized;const n=this.getPlatformConfig(t,r),i=await this.getPlatformTokens(t,r),s=async(a,l)=>{const c=KO(a);try{await this.volume.promises.access(c)}catch{await this.volume.promises.mkdir(c,{recursive:!0})}return this.volume.promises.writeFile(a,l)},o=await this.formatPlatform(t,r);return o&&await Promise.all(o.map(({destination:a,output:l})=>{if(l&&a){if(typeof l!="string"){if(this.log.verbosity!==zi&&this.log.warnings!==Ta){const c=`Content type of ${a} is not a string, so no file was created.`;if(this.log.warnings===sc)throw new Error(c);console.log(Br.rgb(255,140,0).bold(c))}return}return s(a,l)}})),await Lst(i,n,this.options,this.volume),this}async buildAllPlatforms(t){return await this.hasInitialized,this.platforms&&await Promise.all(Object.keys(this.platforms).map(r=>this.buildPlatform(r,t))),this}async cleanPlatform(t,r){const n=this.getPlatformConfig(t,r),i=await this.getPlatformTokens(t,r),s=await zst(n,this.volume);if(s){this.log?.verbosity!==zi&&console.log(` `+t);for(let o of s){for(let a of o.success)console.log(a);for(let a of o.warning)console.log(a)}}return await Wst(i,n,this.options,this.volume),await Vst(n,this.volume),this}async cleanAllPlatforms(t){return await this.hasInitialized,this.platforms&&await Promise.all(Object.keys(this.platforms).map(r=>this.cleanPlatform(r,t))),this}}/** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const Yp=globalThis,r2=Yp.ShadowRoot&&(Yp.ShadyCSS===void 0||Yp.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,n2=Symbol(),NA=new WeakMap;let M6=class{constructor(t,r,n){if(this._$cssResult$=!0,n!==n2)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=r}get styleSheet(){let t=this.o;const r=this.t;if(r2&&t===void 0){const n=r!==void 0&&r.length===1;n&&(t=NA.get(r)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&NA.set(r,t))}return t}toString(){return this.cssText}};const Gst=e=>new M6(typeof e=="string"?e:e+"",void 0,n2),ui=(e,...t)=>{const r=e.length===1?e[0]:t.reduce((n,i,s)=>n+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+e[s+1],e[0]);return new M6(r,e,n2)},Yst=(e,t)=>{if(r2)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(const r of t){const n=document.createElement("style"),i=Yp.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,e.appendChild(n)}},LA=r2?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let r="";for(const n of t.cssRules)r+=n.cssText;return Gst(r)})(e):e;/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const{is:Kst,defineProperty:Xst,getOwnPropertyDescriptor:Jst,getOwnPropertyNames:Zst,getOwnPropertySymbols:Qst,getPrototypeOf:tot}=Object,M0=globalThis,MA=M0.trustedTypes,eot=MA?MA.emptyScript:"",rot=M0.reactiveElementPolyfillSupport,Gh=(e,t)=>e,ig={toAttribute(e,t){switch(t){case Boolean:e=e?eot:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=e!==null;break;case Number:r=e===null?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch{r=null}}return r}},i2=(e,t)=>!Kst(e,t),jA={attribute:!0,type:String,converter:ig,reflect:!1,hasChanged:i2};Symbol.metadata??=Symbol("metadata"),M0.litPropertyMetadata??=new WeakMap;let bc=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,r=jA){if(r.state&&(r.attribute=!1),this._$Ei(),this.elementProperties.set(t,r),!r.noAccessor){const n=Symbol(),i=this.getPropertyDescriptor(t,n,r);i!==void 0&&Xst(this.prototype,t,i)}}static getPropertyDescriptor(t,r,n){const{get:i,set:s}=Jst(this.prototype,t)??{get(){return this[r]},set(o){this[r]=o}};return{get(){return i?.call(this)},set(o){const a=i?.call(this);s.call(this,o),this.requestUpdate(t,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??jA}static _$Ei(){if(this.hasOwnProperty(Gh("elementProperties")))return;const t=tot(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Gh("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Gh("properties"))){const r=this.properties,n=[...Zst(r),...Qst(r)];for(const i of n)this.createProperty(i,r[i])}const t=this[Symbol.metadata];if(t!==null){const r=litPropertyMetadata.get(t);if(r!==void 0)for(const[n,i]of r)this.elementProperties.set(n,i)}this._$Eh=new Map;for(const[r,n]of this.elementProperties){const i=this._$Eu(r,n);i!==void 0&&this._$Eh.set(i,r)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const r=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const i of n)r.unshift(LA(i))}else t!==void 0&&r.push(LA(t));return r}static _$Eu(t,r){const n=r.attribute;return n===!1?void 0:typeof n=="string"?n:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,r=this.constructor.elementProperties;for(const n of r.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Yst(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,r,n){this._$AK(t,n)}_$EC(t,r){const n=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,n);if(i!==void 0&&n.reflect===!0){const s=(n.converter?.toAttribute!==void 0?n.converter:ig).toAttribute(r,n.type);this._$Em=t,s==null?this.removeAttribute(i):this.setAttribute(i,s),this._$Em=null}}_$AK(t,r){const n=this.constructor,i=n._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const s=n.getPropertyOptions(i),o=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:ig;this._$Em=i,this[i]=o.fromAttribute(r,s.type),this._$Em=null}}requestUpdate(t,r,n){if(t!==void 0){if(n??=this.constructor.getPropertyOptions(t),!(n.hasChanged??i2)(this[t],r))return;this.P(t,r,n)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,r,n){this._$AL.has(t)||this._$AL.set(t,r),n.reflect===!0&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(r){Promise.reject(r)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[i,s]of this._$Ep)this[i]=s;this._$Ep=void 0}const n=this.constructor.elementProperties;if(n.size>0)for(const[i,s]of n)s.wrapped!==!0||this._$AL.has(i)||this[i]===void 0||this.P(i,this[i],s)}let t=!1;const r=this._$AL;try{t=this.shouldUpdate(r),t?(this.willUpdate(r),this._$EO?.forEach(n=>n.hostUpdate?.()),this.update(r)):this._$EU()}catch(n){throw t=!1,this._$EU(),n}t&&this._$AE(r)}willUpdate(t){}_$AE(t){this._$EO?.forEach(r=>r.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach(r=>this._$EC(r,this[r])),this._$EU()}updated(t){}firstUpdated(t){}};bc.elementStyles=[],bc.shadowRootOptions={mode:"open"},bc[Gh("elementProperties")]=new Map,bc[Gh("finalized")]=new Map,rot?.({ReactiveElement:bc}),(M0.reactiveElementVersions??=[]).push("2.0.4");/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const s2=globalThis,sg=s2.trustedTypes,zA=sg?sg.createPolicy("lit-html",{createHTML:e=>e}):void 0,j6="$lit$",Yo=`lit$${Math.random().toFixed(9).slice(2)}$`,z6="?"+Yo,not=`<${z6}>`,yl=document,Ef=()=>yl.createComment(""),Cf=e=>e===null||typeof e!="object"&&typeof e!="function",o2=Array.isArray,iot=e=>o2(e)||typeof e?.[Symbol.iterator]=="function",Tb=`[ \f\r]`,uh=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,UA=/-->/g,VA=/>/g,Pa=RegExp(`>|${Tb}(?:([^\\s"'>=/]+)(${Tb}*=${Tb}*(?:[^ \f\r"'\`<>=]|("|')|))|$)`,"g"),WA=/'/g,qA=/"/g,U6=/^(?:script|style|textarea|title)$/i,sot=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),gr=sot(1),ha=Symbol.for("lit-noChange"),Er=Symbol.for("lit-nothing"),HA=new WeakMap,Za=yl.createTreeWalker(yl,129);function V6(e,t){if(!o2(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return zA!==void 0?zA.createHTML(t):t}const oot=(e,t)=>{const r=e.length-1,n=[];let i,s=t===2?"":t===3?"":"",o=uh;for(let a=0;a"?(o=i??uh,h=-1):u[1]===void 0?h=-2:(h=o.lastIndex-u[2].length,c=u[1],o=u[3]===void 0?Pa:u[3]==='"'?qA:WA):o===qA||o===WA?o=Pa:o===UA||o===VA?o=uh:(o=Pa,i=void 0);const g=o===Pa&&e[a+1].startsWith("/>")?" ":"";s+=o===uh?l+not:h>=0?(n.push(c),l.slice(0,h)+j6+l.slice(h)+Yo+g):l+Yo+(h===-2?a:g)}return[V6(e,s+(e[r]||"")+(t===2?"":t===3?"":"")),n]};let Nv=class W6{constructor({strings:t,_$litType$:r},n){let i;this.parts=[];let s=0,o=0;const a=t.length-1,l=this.parts,[c,u]=oot(t,r);if(this.el=W6.createElement(c,n),Za.currentNode=this.el.content,r===2||r===3){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(i=Za.nextNode())!==null&&l.length0){i.textContent=sg?sg.emptyScript:"";for(let g=0;g2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=Er}_$AI(t,r=this,n,i){const s=this.strings;let o=!1;if(s===void 0)t=au(this,t,r,0),o=!Cf(t)||t!==this._$AH&&t!==ha,o&&(this._$AH=t);else{const a=t;let l,c;for(t=s[0],l=0;l{const n=r?.renderBefore??t;let i=n._$litPart$;if(i===void 0){const s=r?.renderBefore??null;n._$litPart$=i=new a2(t.insertBefore(Ef(),s),s,void 0,r??{})}return i._$AI(e),i};/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */let Nc=class extends bc{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=dot(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return ha}};Nc._$litElement$=!0,Nc.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:Nc});const pot=globalThis.litElementPolyfillSupport;pot?.({LitElement:Nc});(globalThis.litElementVersions??=[]).push("4.1.1");var mot=ui` :host { display: inline-block; position: relative; width: auto; cursor: pointer; } .button { display: inline-flex; align-items: stretch; justify-content: center; width: 100%; border-style: solid; border-width: var(--sl-input-border-width); font-family: var(--sl-input-font-family); font-weight: var(--sl-font-weight-semibold); text-decoration: none; user-select: none; -webkit-user-select: none; white-space: nowrap; vertical-align: middle; padding: 0; transition: var(--sl-transition-x-fast) background-color, var(--sl-transition-x-fast) color, var(--sl-transition-x-fast) border, var(--sl-transition-x-fast) box-shadow; cursor: inherit; } .button::-moz-focus-inner { border: 0; } .button:focus { outline: none; } .button:focus-visible { outline: var(--sl-focus-ring); outline-offset: var(--sl-focus-ring-offset); } .button--disabled { opacity: 0.5; cursor: not-allowed; } /* When disabled, prevent mouse events from bubbling up from children */ .button--disabled * { pointer-events: none; } .button__prefix, .button__suffix { flex: 0 0 auto; display: flex; align-items: center; pointer-events: none; } .button__label { display: inline-block; } .button__label::slotted(sl-icon) { vertical-align: -2px; } /* * Standard buttons */ /* Default */ .button--standard.button--default { background-color: var(--sl-color-neutral-0); border-color: var(--sl-input-border-color); color: var(--sl-color-neutral-700); } .button--standard.button--default:hover:not(.button--disabled) { background-color: var(--sl-color-primary-50); border-color: var(--sl-color-primary-300); color: var(--sl-color-primary-700); } .button--standard.button--default:active:not(.button--disabled) { background-color: var(--sl-color-primary-100); border-color: var(--sl-color-primary-400); color: var(--sl-color-primary-700); } /* Primary */ .button--standard.button--primary { background-color: var(--sl-color-primary-600); border-color: var(--sl-color-primary-600); color: var(--sl-color-neutral-0); } .button--standard.button--primary:hover:not(.button--disabled) { background-color: var(--sl-color-primary-500); border-color: var(--sl-color-primary-500); color: var(--sl-color-neutral-0); } .button--standard.button--primary:active:not(.button--disabled) { background-color: var(--sl-color-primary-600); border-color: var(--sl-color-primary-600); color: var(--sl-color-neutral-0); } /* Success */ .button--standard.button--success { background-color: var(--sl-color-success-600); border-color: var(--sl-color-success-600); color: var(--sl-color-neutral-0); } .button--standard.button--success:hover:not(.button--disabled) { background-color: var(--sl-color-success-500); border-color: var(--sl-color-success-500); color: var(--sl-color-neutral-0); } .button--standard.button--success:active:not(.button--disabled) { background-color: var(--sl-color-success-600); border-color: var(--sl-color-success-600); color: var(--sl-color-neutral-0); } /* Neutral */ .button--standard.button--neutral { background-color: var(--sl-color-neutral-600); border-color: var(--sl-color-neutral-600); color: var(--sl-color-neutral-0); } .button--standard.button--neutral:hover:not(.button--disabled) { background-color: var(--sl-color-neutral-500); border-color: var(--sl-color-neutral-500); color: var(--sl-color-neutral-0); } .button--standard.button--neutral:active:not(.button--disabled) { background-color: var(--sl-color-neutral-600); border-color: var(--sl-color-neutral-600); color: var(--sl-color-neutral-0); } /* Warning */ .button--standard.button--warning { background-color: var(--sl-color-warning-600); border-color: var(--sl-color-warning-600); color: var(--sl-color-neutral-0); } .button--standard.button--warning:hover:not(.button--disabled) { background-color: var(--sl-color-warning-500); border-color: var(--sl-color-warning-500); color: var(--sl-color-neutral-0); } .button--standard.button--warning:active:not(.button--disabled) { background-color: var(--sl-color-warning-600); border-color: var(--sl-color-warning-600); color: var(--sl-color-neutral-0); } /* Danger */ .button--standard.button--danger { background-color: var(--sl-color-danger-600); border-color: var(--sl-color-danger-600); color: var(--sl-color-neutral-0); } .button--standard.button--danger:hover:not(.button--disabled) { background-color: var(--sl-color-danger-500); border-color: var(--sl-color-danger-500); color: var(--sl-color-neutral-0); } .button--standard.button--danger:active:not(.button--disabled) { background-color: var(--sl-color-danger-600); border-color: var(--sl-color-danger-600); color: var(--sl-color-neutral-0); } /* * Outline buttons */ .button--outline { background: none; border: solid 1px; } /* Default */ .button--outline.button--default { border-color: var(--sl-input-border-color); color: var(--sl-color-neutral-700); } .button--outline.button--default:hover:not(.button--disabled), .button--outline.button--default.button--checked:not(.button--disabled) { border-color: var(--sl-color-primary-600); background-color: var(--sl-color-primary-600); color: var(--sl-color-neutral-0); } .button--outline.button--default:active:not(.button--disabled) { border-color: var(--sl-color-primary-700); background-color: var(--sl-color-primary-700); color: var(--sl-color-neutral-0); } /* Primary */ .button--outline.button--primary { border-color: var(--sl-color-primary-600); color: var(--sl-color-primary-600); } .button--outline.button--primary:hover:not(.button--disabled), .button--outline.button--primary.button--checked:not(.button--disabled) { background-color: var(--sl-color-primary-600); color: var(--sl-color-neutral-0); } .button--outline.button--primary:active:not(.button--disabled) { border-color: var(--sl-color-primary-700); background-color: var(--sl-color-primary-700); color: var(--sl-color-neutral-0); } /* Success */ .button--outline.button--success { border-color: var(--sl-color-success-600); color: var(--sl-color-success-600); } .button--outline.button--success:hover:not(.button--disabled), .button--outline.button--success.button--checked:not(.button--disabled) { background-color: var(--sl-color-success-600); color: var(--sl-color-neutral-0); } .button--outline.button--success:active:not(.button--disabled) { border-color: var(--sl-color-success-700); background-color: var(--sl-color-success-700); color: var(--sl-color-neutral-0); } /* Neutral */ .button--outline.button--neutral { border-color: var(--sl-color-neutral-600); color: var(--sl-color-neutral-600); } .button--outline.button--neutral:hover:not(.button--disabled), .button--outline.button--neutral.button--checked:not(.button--disabled) { background-color: var(--sl-color-neutral-600); color: var(--sl-color-neutral-0); } .button--outline.button--neutral:active:not(.button--disabled) { border-color: var(--sl-color-neutral-700); background-color: var(--sl-color-neutral-700); color: var(--sl-color-neutral-0); } /* Warning */ .button--outline.button--warning { border-color: var(--sl-color-warning-600); color: var(--sl-color-warning-600); } .button--outline.button--warning:hover:not(.button--disabled), .button--outline.button--warning.button--checked:not(.button--disabled) { background-color: var(--sl-color-warning-600); color: var(--sl-color-neutral-0); } .button--outline.button--warning:active:not(.button--disabled) { border-color: var(--sl-color-warning-700); background-color: var(--sl-color-warning-700); color: var(--sl-color-neutral-0); } /* Danger */ .button--outline.button--danger { border-color: var(--sl-color-danger-600); color: var(--sl-color-danger-600); } .button--outline.button--danger:hover:not(.button--disabled), .button--outline.button--danger.button--checked:not(.button--disabled) { background-color: var(--sl-color-danger-600); color: var(--sl-color-neutral-0); } .button--outline.button--danger:active:not(.button--disabled) { border-color: var(--sl-color-danger-700); background-color: var(--sl-color-danger-700); color: var(--sl-color-neutral-0); } @media (forced-colors: active) { .button.button--outline.button--checked:not(.button--disabled) { outline: solid 2px transparent; } } /* * Text buttons */ .button--text { background-color: transparent; border-color: transparent; color: var(--sl-color-primary-600); } .button--text:hover:not(.button--disabled) { background-color: transparent; border-color: transparent; color: var(--sl-color-primary-500); } .button--text:focus-visible:not(.button--disabled) { background-color: transparent; border-color: transparent; color: var(--sl-color-primary-500); } .button--text:active:not(.button--disabled) { background-color: transparent; border-color: transparent; color: var(--sl-color-primary-700); } /* * Size modifiers */ .button--small { height: auto; min-height: var(--sl-input-height-small); font-size: var(--sl-button-font-size-small); line-height: calc(var(--sl-input-height-small) - var(--sl-input-border-width) * 2); border-radius: var(--sl-input-border-radius-small); } .button--medium { height: auto; min-height: var(--sl-input-height-medium); font-size: var(--sl-button-font-size-medium); line-height: calc(var(--sl-input-height-medium) - var(--sl-input-border-width) * 2); border-radius: var(--sl-input-border-radius-medium); } .button--large { height: auto; min-height: var(--sl-input-height-large); font-size: var(--sl-button-font-size-large); line-height: calc(var(--sl-input-height-large) - var(--sl-input-border-width) * 2); border-radius: var(--sl-input-border-radius-large); } /* * Pill modifier */ .button--pill.button--small { border-radius: var(--sl-input-height-small); } .button--pill.button--medium { border-radius: var(--sl-input-height-medium); } .button--pill.button--large { border-radius: var(--sl-input-height-large); } /* * Circle modifier */ .button--circle { padding-left: 0; padding-right: 0; } .button--circle.button--small { width: var(--sl-input-height-small); border-radius: 50%; } .button--circle.button--medium { width: var(--sl-input-height-medium); border-radius: 50%; } .button--circle.button--large { width: var(--sl-input-height-large); border-radius: 50%; } .button--circle .button__prefix, .button--circle .button__suffix, .button--circle .button__caret { display: none; } /* * Caret modifier */ .button--caret .button__suffix { display: none; } .button--caret .button__caret { height: auto; } /* * Loading modifier */ .button--loading { position: relative; cursor: wait; } .button--loading .button__prefix, .button--loading .button__label, .button--loading .button__suffix, .button--loading .button__caret { visibility: hidden; } .button--loading sl-spinner { --indicator-color: currentColor; position: absolute; font-size: 1em; height: 1em; width: 1em; top: calc(50% - 0.5em); left: calc(50% - 0.5em); } /* * Badges */ .button ::slotted(sl-badge) { position: absolute; top: 0; right: 0; translate: 50% -50%; pointer-events: none; } .button--rtl ::slotted(sl-badge) { right: auto; left: 0; translate: -50% -50%; } /* * Button spacing */ .button--has-label.button--small .button__label { padding: 0 var(--sl-spacing-small); } .button--has-label.button--medium .button__label { padding: 0 var(--sl-spacing-medium); } .button--has-label.button--large .button__label { padding: 0 var(--sl-spacing-large); } .button--has-prefix.button--small { padding-inline-start: var(--sl-spacing-x-small); } .button--has-prefix.button--small .button__label { padding-inline-start: var(--sl-spacing-x-small); } .button--has-prefix.button--medium { padding-inline-start: var(--sl-spacing-small); } .button--has-prefix.button--medium .button__label { padding-inline-start: var(--sl-spacing-small); } .button--has-prefix.button--large { padding-inline-start: var(--sl-spacing-small); } .button--has-prefix.button--large .button__label { padding-inline-start: var(--sl-spacing-small); } .button--has-suffix.button--small, .button--caret.button--small { padding-inline-end: var(--sl-spacing-x-small); } .button--has-suffix.button--small .button__label, .button--caret.button--small .button__label { padding-inline-end: var(--sl-spacing-x-small); } .button--has-suffix.button--medium, .button--caret.button--medium { padding-inline-end: var(--sl-spacing-small); } .button--has-suffix.button--medium .button__label, .button--caret.button--medium .button__label { padding-inline-end: var(--sl-spacing-small); } .button--has-suffix.button--large, .button--caret.button--large { padding-inline-end: var(--sl-spacing-small); } .button--has-suffix.button--large .button__label, .button--caret.button--large .button__label { padding-inline-end: var(--sl-spacing-small); } /* * Button groups support a variety of button types (e.g. buttons with tooltips, buttons as dropdown triggers, etc.). * This means buttons aren't always direct descendants of the button group, thus we can't target them with the * ::slotted selector. To work around this, the button group component does some magic to add these special classes to * buttons and we style them here instead. */ :host([data-sl-button-group__button--first]:not([data-sl-button-group__button--last])) .button { border-start-end-radius: 0; border-end-end-radius: 0; } :host([data-sl-button-group__button--inner]) .button { border-radius: 0; } :host([data-sl-button-group__button--last]:not([data-sl-button-group__button--first])) .button { border-start-start-radius: 0; border-end-start-radius: 0; } /* All except the first */ :host([data-sl-button-group__button]:not([data-sl-button-group__button--first])) { margin-inline-start: calc(-1 * var(--sl-input-border-width)); } /* Add a visual separator between solid buttons */ :host( [data-sl-button-group__button]:not( [data-sl-button-group__button--first], [data-sl-button-group__button--radio], [variant='default'] ):not(:hover) ) .button:after { content: ''; position: absolute; top: 0; inset-inline-start: 0; bottom: 0; border-left: solid 1px rgb(128 128 128 / 33%); mix-blend-mode: multiply; } /* Bump hovered, focused, and checked buttons up so their focus ring isn't clipped */ :host([data-sl-button-group__button--hover]) { z-index: 1; } /* Focus and checked are always on top */ :host([data-sl-button-group__button--focus]), :host([data-sl-button-group__button][checked]) { z-index: 2; } `,got=ui` ${mot} .button__prefix, .button__suffix, .button__label { display: inline-flex; position: relative; align-items: center; } /* We use a hidden input so constraint validation errors work, since they don't appear to show when used with buttons. We can't actually hide it, though, otherwise the messages will be suppressed by the browser. */ .hidden-input { all: unset; position: absolute; top: 0; left: 0; bottom: 0; right: 0; outline: dotted 1px red; opacity: 0; z-index: -1; } `,l2=class{constructor(e,...t){this.slotNames=[],this.handleSlotChange=r=>{const n=r.target;(this.slotNames.includes("[default]")&&!n.name||n.name&&this.slotNames.includes(n.name))&&this.host.requestUpdate()},(this.host=e).addController(this),this.slotNames=t}hasDefaultSlot(){return[...this.host.childNodes].some(e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent.trim()!=="")return!0;if(e.nodeType===e.ELEMENT_NODE){const t=e;if(t.tagName.toLowerCase()==="sl-visually-hidden")return!1;if(!t.hasAttribute("slot"))return!0}return!1})}hasNamedSlot(e){return this.host.querySelector(`:scope > [slot="${e}"]`)!==null}test(e){return e==="[default]"?this.hasDefaultSlot():this.hasNamedSlot(e)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}},H6=Object.defineProperty,yot=Object.defineProperties,bot=Object.getOwnPropertyDescriptor,vot=Object.getOwnPropertyDescriptors,GA=Object.getOwnPropertySymbols,wot=Object.prototype.hasOwnProperty,xot=Object.prototype.propertyIsEnumerable,G6=e=>{throw TypeError(e)},YA=(e,t,r)=>t in e?H6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Bl=(e,t)=>{for(var r in t||(t={}))wot.call(t,r)&&YA(e,r,t[r]);if(GA)for(var r of GA(t))xot.call(t,r)&&YA(e,r,t[r]);return e},z0=(e,t)=>yot(e,vot(t)),bt=(e,t,r,n)=>{for(var i=n>1?void 0:n?bot(t,r):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(i=(n?o(t,r,i):o(i))||i);return n&&i&&H6(t,r,i),i},Y6=(e,t,r)=>t.has(e)||G6("Cannot "+r),_ot=(e,t,r)=>(Y6(e,t,"read from private field"),t.get(e)),Sot=(e,t,r)=>t.has(e)?G6("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Eot=(e,t,r,n)=>(Y6(e,t,"write to private field"),t.set(e,r),r);function cs(e,t){const r=Bl({waitUntilFirstUpdate:!1},t);return(n,i)=>{const{update:s}=n,o=Array.isArray(e)?e:[e];n.update=function(a){o.forEach(l=>{const c=l;if(a.has(c)){const u=a.get(c),h=this[c];u!==h&&(!r.waitUntilFirstUpdate||this.hasUpdated)&&this[i](u,h)}}),s.call(this,a)}}}var Fo=ui` :host { box-sizing: border-box; } :host *, :host *::before, :host *::after { box-sizing: inherit; } [hidden] { display: none !important; } `;/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const Cot={attribute:!0,type:String,converter:ig,reflect:!1,hasChanged:i2},Aot=(e=Cot,t,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(s===void 0&&globalThis.litPropertyMetadata.set(i,s=new Map),s.set(r.name,e),n==="accessor"){const{name:o}=r;return{set(a){const l=t.get.call(this);t.set.call(this,a),this.requestUpdate(o,l,e)},init(a){return a!==void 0&&this.P(o,void 0,e),a}}}if(n==="setter"){const{name:o}=r;return function(a){const l=this[o];t.call(this,a),this.requestUpdate(o,l,e)}}throw Error("Unsupported decorator location: "+n)};function jt(e){return(t,r)=>typeof r=="object"?Aot(e,t,r):((n,i,s)=>{const o=i.hasOwnProperty(s);return i.constructor.createProperty(s,o?{...n,wrapped:!0}:n),o?Object.getOwnPropertyDescriptor(i,s):void 0})(e,t,r)}/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */function pn(e){return jt({...e,state:!0,attribute:!1})}/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const kot=(e,t,r)=>(r.configurable=!0,r.enumerable=!0,Reflect.decorate&&typeof t!="object"&&Object.defineProperty(e,t,r),r);/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */function Jn(e,t){return(r,n,i)=>{const s=o=>o.renderRoot?.querySelector(e)??null;return kot(r,n,{get(){return s(this)}})}}var Kp,hi=class extends Nc{constructor(){super(),Sot(this,Kp,!1),this.initialReflectedProperties=new Map,Object.entries(this.constructor.dependencies).forEach(([e,t])=>{this.constructor.define(e,t)})}emit(e,t){const r=new CustomEvent(e,Bl({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(r),r}static define(e,t=this,r={}){const n=customElements.get(e);if(!n){try{customElements.define(e,t,r)}catch{customElements.define(e,class extends t{},r)}return}let i=" (unknown version)",s=i;"version"in t&&t.version&&(i=" v"+t.version),"version"in n&&n.version&&(s=" v"+n.version),!(i&&s&&i===s)&&console.warn(`Attempted to register <${e}>${i}, but <${e}>${s} has already been registered.`)}attributeChangedCallback(e,t,r){_ot(this,Kp)||(this.constructor.elementProperties.forEach((n,i)=>{n.reflect&&this[i]!=null&&this.initialReflectedProperties.set(i,this[i])}),Eot(this,Kp,!0)),super.attributeChangedCallback(e,t,r)}willUpdate(e){super.willUpdate(e),this.initialReflectedProperties.forEach((t,r)=>{e.has(r)&&this[r]==null&&(this[r]=t)})}};Kp=new WeakMap;hi.version="2.20.0";hi.dependencies={};bt([jt()],hi.prototype,"dir",2);bt([jt()],hi.prototype,"lang",2);/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const K6={ATTRIBUTE:1,CHILD:2},X6=e=>(...t)=>({_$litDirective$:e,values:t});let J6=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,r,n){this._$Ct=t,this._$AM=r,this._$Ci=n}_$AS(t,r){return this.update(t,r)}update(t,r){return this.render(...r)}};/** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const wo=X6(class extends J6{constructor(e){if(super(e),e.type!==K6.ATTRIBUTE||e.name!=="class"||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){if(this.st===void 0){this.st=new Set,e.strings!==void 0&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter(n=>n!=="")));for(const n in t)t[n]&&!this.nt?.has(n)&&this.st.add(n);return this.render(t)}const r=e.element.classList;for(const n of this.st)n in t||(r.remove(n),this.st.delete(n));for(const n in t){const i=!!t[n];i===this.st.has(n)||this.nt?.has(n)||(i?(r.add(n),this.st.add(n)):(r.remove(n),this.st.delete(n)))}return ha}});/** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const Z6=Symbol.for(""),Dot=e=>{if(e?.r===Z6)return e?._$litStatic$},KA=(e,...t)=>({_$litStatic$:t.reduce((r,n,i)=>r+(s=>{if(s._$litStatic$!==void 0)return s._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${s}. Use 'unsafeStatic' to pass non-literal values, but take care to ensure page security.`)})(n)+e[i+1],e[0]),r:Z6}),XA=new Map,Tot=e=>(t,...r)=>{const n=r.length;let i,s;const o=[],a=[];let l,c=0,u=!1;for(;ce??Er;var us=class extends hi{constructor(){super(...arguments),this.hasSlotController=new l2(this,"[default]","prefix","suffix"),this.hasFocus=!1,this.checked=!1,this.disabled=!1,this.size="medium",this.pill=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","presentation")}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleClick(e){if(this.disabled){e.preventDefault(),e.stopPropagation();return}this.checked=!0}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}focus(e){this.input.focus(e)}blur(){this.input.blur()}render(){return Q6`
    `}};us.styles=[Fo,got];bt([Jn(".button")],us.prototype,"input",2);bt([Jn(".hidden-input")],us.prototype,"hiddenInput",2);bt([pn()],us.prototype,"hasFocus",2);bt([jt({type:Boolean,reflect:!0})],us.prototype,"checked",2);bt([jt()],us.prototype,"value",2);bt([jt({type:Boolean,reflect:!0})],us.prototype,"disabled",2);bt([jt({reflect:!0})],us.prototype,"size",2);bt([jt({type:Boolean,reflect:!0})],us.prototype,"pill",2);bt([cs("disabled",{waitUntilFirstUpdate:!0})],us.prototype,"handleDisabledChange",1);us.define("sl-radio-button");var Pot=ui` :host { display: block; } .form-control { position: relative; border: none; padding: 0; margin: 0; } .form-control__label { padding: 0; } .radio-group--required .radio-group__label::after { content: var(--sl-input-required-content); margin-inline-start: var(--sl-input-required-content-offset); } .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; } `,tB=ui` .form-control .form-control__label { display: none; } .form-control .form-control__help-text { display: none; } /* Label */ .form-control--has-label .form-control__label { display: inline-block; color: var(--sl-input-label-color); margin-bottom: var(--sl-spacing-3x-small); } .form-control--has-label.form-control--small .form-control__label { font-size: var(--sl-input-label-font-size-small); } .form-control--has-label.form-control--medium .form-control__label { font-size: var(--sl-input-label-font-size-medium); } .form-control--has-label.form-control--large .form-control__label { font-size: var(--sl-input-label-font-size-large); } :host([required]) .form-control--has-label .form-control__label::after { content: var(--sl-input-required-content); margin-inline-start: var(--sl-input-required-content-offset); color: var(--sl-input-required-content-color); } /* Help text */ .form-control--has-help-text .form-control__help-text { display: block; color: var(--sl-input-help-text-color); margin-top: var(--sl-spacing-3x-small); } .form-control--has-help-text.form-control--small .form-control__help-text { font-size: var(--sl-input-help-text-font-size-small); } .form-control--has-help-text.form-control--medium .form-control__help-text { font-size: var(--sl-input-help-text-font-size-medium); } .form-control--has-help-text.form-control--large .form-control__help-text { font-size: var(--sl-input-help-text-font-size-large); } .form-control--has-help-text.form-control--radio-group .form-control__help-text { margin-top: var(--sl-spacing-2x-small); } `,Fot=ui` :host { display: inline-block; } .button-group { display: flex; flex-wrap: nowrap; } `,id=class extends hi{constructor(){super(...arguments),this.disableRole=!1,this.label=""}handleFocus(e){const t=hh(e.target);t?.toggleAttribute("data-sl-button-group__button--focus",!0)}handleBlur(e){const t=hh(e.target);t?.toggleAttribute("data-sl-button-group__button--focus",!1)}handleMouseOver(e){const t=hh(e.target);t?.toggleAttribute("data-sl-button-group__button--hover",!0)}handleMouseOut(e){const t=hh(e.target);t?.toggleAttribute("data-sl-button-group__button--hover",!1)}handleSlotChange(){const e=[...this.defaultSlot.assignedElements({flatten:!0})];e.forEach(t=>{const r=e.indexOf(t),n=hh(t);n&&(n.toggleAttribute("data-sl-button-group__button",!0),n.toggleAttribute("data-sl-button-group__button--first",r===0),n.toggleAttribute("data-sl-button-group__button--inner",r>0&&r `}};id.styles=[Fo,Fot];bt([Jn("slot")],id.prototype,"defaultSlot",2);bt([pn()],id.prototype,"disableRole",2);bt([jt()],id.prototype,"label",2);function hh(e){var t;const r="sl-button, sl-radio-button";return(t=e.closest(r))!=null?t:e.querySelector(r)}var fh=new WeakMap,dh=new WeakMap,ph=new WeakMap,Pb=new WeakSet,Qd=new WeakMap,eB=class{constructor(e,t){this.handleFormData=r=>{const n=this.options.disabled(this.host),i=this.options.name(this.host),s=this.options.value(this.host),o=this.host.tagName.toLowerCase()==="sl-button";this.host.isConnected&&!n&&!o&&typeof i=="string"&&i.length>0&&typeof s<"u"&&(Array.isArray(s)?s.forEach(a=>{r.formData.append(i,a.toString())}):r.formData.append(i,s.toString()))},this.handleFormSubmit=r=>{var n;const i=this.options.disabled(this.host),s=this.options.reportValidity;this.form&&!this.form.noValidate&&((n=fh.get(this.form))==null||n.forEach(o=>{this.setUserInteracted(o,!0)})),this.form&&!this.form.noValidate&&!i&&!s(this.host)&&(r.preventDefault(),r.stopImmediatePropagation())},this.handleFormReset=()=>{this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1),Qd.set(this.host,[])},this.handleInteraction=r=>{const n=Qd.get(this.host);n.includes(r.type)||n.push(r.type),n.length===this.options.assumeInteractionOn.length&&this.setUserInteracted(this.host,!0)},this.checkFormValidity=()=>{if(this.form&&!this.form.noValidate){const r=this.form.querySelectorAll("*");for(const n of r)if(typeof n.checkValidity=="function"&&!n.checkValidity())return!1}return!0},this.reportFormValidity=()=>{if(this.form&&!this.form.noValidate){const r=this.form.querySelectorAll("*");for(const n of r)if(typeof n.reportValidity=="function"&&!n.reportValidity())return!1}return!0},(this.host=e).addController(this),this.options=Bl({form:r=>{const n=r.form;if(n){const s=r.getRootNode().querySelector(`#${n}`);if(s)return s}return r.closest("form")},name:r=>r.name,value:r=>r.value,defaultValue:r=>r.defaultValue,disabled:r=>{var n;return(n=r.disabled)!=null?n:!1},reportValidity:r=>typeof r.reportValidity=="function"?r.reportValidity():!0,checkValidity:r=>typeof r.checkValidity=="function"?r.checkValidity():!0,setValue:(r,n)=>r.value=n,assumeInteractionOn:["sl-input"]},t)}hostConnected(){const e=this.options.form(this.host);e&&this.attachForm(e),Qd.set(this.host,[]),this.options.assumeInteractionOn.forEach(t=>{this.host.addEventListener(t,this.handleInteraction)})}hostDisconnected(){this.detachForm(),Qd.delete(this.host),this.options.assumeInteractionOn.forEach(e=>{this.host.removeEventListener(e,this.handleInteraction)})}hostUpdated(){const e=this.options.form(this.host);e||this.detachForm(),e&&this.form!==e&&(this.detachForm(),this.attachForm(e)),this.host.hasUpdated&&this.setValidity(this.host.validity.valid)}attachForm(e){e?(this.form=e,fh.has(this.form)?fh.get(this.form).add(this.host):fh.set(this.form,new Set([this.host])),this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit),this.form.addEventListener("reset",this.handleFormReset),dh.has(this.form)||(dh.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity()),ph.has(this.form)||(ph.set(this.form,this.form.checkValidity),this.form.checkValidity=()=>this.checkFormValidity())):this.form=void 0}detachForm(){if(!this.form)return;const e=fh.get(this.form);e&&(e.delete(this.host),e.size<=0&&(this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form.removeEventListener("reset",this.handleFormReset),dh.has(this.form)&&(this.form.reportValidity=dh.get(this.form),dh.delete(this.form)),ph.has(this.form)&&(this.form.checkValidity=ph.get(this.form),ph.delete(this.form)),this.form=void 0))}setUserInteracted(e,t){t?Pb.add(e):Pb.delete(e),e.requestUpdate()}doAction(e,t){if(this.form){const r=document.createElement("button");r.type=e,r.style.position="absolute",r.style.width="0",r.style.height="0",r.style.clipPath="inset(50%)",r.style.overflow="hidden",r.style.whiteSpace="nowrap",t&&(r.name=t.name,r.value=t.value,["formaction","formenctype","formmethod","formnovalidate","formtarget"].forEach(n=>{t.hasAttribute(n)&&r.setAttribute(n,t.getAttribute(n))})),this.form.append(r),r.click(),r.remove()}}getForm(){var e;return(e=this.form)!=null?e:null}reset(e){this.doAction("reset",e)}submit(e){this.doAction("submit",e)}setValidity(e){const t=this.host,r=!!Pb.has(t),n=!!t.required;t.toggleAttribute("data-required",n),t.toggleAttribute("data-optional",!n),t.toggleAttribute("data-invalid",!e),t.toggleAttribute("data-valid",e),t.toggleAttribute("data-user-invalid",!e&&r),t.toggleAttribute("data-user-valid",e&&r)}updateValidity(){const e=this.host;this.setValidity(e.validity.valid)}emitInvalidEvent(e){const t=new CustomEvent("sl-invalid",{bubbles:!1,composed:!1,cancelable:!0,detail:{}});e||t.preventDefault(),this.host.dispatchEvent(t)||e?.preventDefault()}},c2=Object.freeze({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1}),Oot=Object.freeze(z0(Bl({},c2),{valid:!1,valueMissing:!0})),Iot=Object.freeze(z0(Bl({},c2),{valid:!1,customError:!0})),an=class extends hi{constructor(){super(...arguments),this.formControlController=new eB(this),this.hasSlotController=new l2(this,"help-text","label"),this.customValidityMessage="",this.hasButtonGroup=!1,this.errorMessage="",this.defaultValue="",this.label="",this.helpText="",this.name="option",this.value="",this.size="medium",this.form="",this.required=!1}get validity(){const e=this.required&&!this.value;return this.customValidityMessage!==""?Iot:e?Oot:c2}get validationMessage(){const e=this.required&&!this.value;return this.customValidityMessage!==""?this.customValidityMessage:e?this.validationInput.validationMessage:""}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value}firstUpdated(){this.formControlController.updateValidity()}getAllRadios(){return[...this.querySelectorAll("sl-radio, sl-radio-button")]}handleRadioClick(e){const t=e.target.closest("sl-radio, sl-radio-button"),r=this.getAllRadios(),n=this.value;!t||t.disabled||(this.value=t.value,r.forEach(i=>i.checked=i===t),this.value!==n&&(this.emit("sl-change"),this.emit("sl-input")))}handleKeyDown(e){var t;if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(e.key))return;const r=this.getAllRadios().filter(a=>!a.disabled),n=(t=r.find(a=>a.checked))!=null?t:r[0],i=e.key===" "?0:["ArrowUp","ArrowLeft"].includes(e.key)?-1:1,s=this.value;let o=r.indexOf(n)+i;o<0&&(o=r.length-1),o>r.length-1&&(o=0),this.getAllRadios().forEach(a=>{a.checked=!1,this.hasButtonGroup||a.setAttribute("tabindex","-1")}),this.value=r[o].value,r[o].checked=!0,this.hasButtonGroup?r[o].shadowRoot.querySelector("button").focus():(r[o].setAttribute("tabindex","0"),r[o].focus()),this.value!==s&&(this.emit("sl-change"),this.emit("sl-input")),e.preventDefault()}handleLabelClick(){this.focus()}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}async syncRadioElements(){var e,t;const r=this.getAllRadios();if(await Promise.all(r.map(async n=>{await n.updateComplete,n.checked=n.value===this.value,n.size=this.size})),this.hasButtonGroup=r.some(n=>n.tagName.toLowerCase()==="sl-radio-button"),r.length>0&&!r.some(n=>n.checked))if(this.hasButtonGroup){const n=(e=r[0].shadowRoot)==null?void 0:e.querySelector("button");n&&n.setAttribute("tabindex","0")}else r[0].setAttribute("tabindex","0");if(this.hasButtonGroup){const n=(t=this.shadowRoot)==null?void 0:t.querySelector("sl-button-group");n&&(n.disableRole=!0)}}syncRadios(){if(customElements.get("sl-radio")&&customElements.get("sl-radio-button")){this.syncRadioElements();return}customElements.get("sl-radio")?this.syncRadioElements():customElements.whenDefined("sl-radio").then(()=>this.syncRadios()),customElements.get("sl-radio-button")?this.syncRadioElements():customElements.whenDefined("sl-radio-button").then(()=>this.syncRadios())}updateCheckedRadio(){this.getAllRadios().forEach(t=>t.checked=t.value===this.value),this.formControlController.setValidity(this.validity.valid)}handleSizeChange(){this.syncRadios()}handleValueChange(){this.hasUpdated&&this.updateCheckedRadio()}checkValidity(){const e=this.required&&!this.value,t=this.customValidityMessage!=="";return e||t?(this.formControlController.emitInvalidEvent(),!1):!0}getForm(){return this.formControlController.getForm()}reportValidity(){const e=this.validity.valid;return this.errorMessage=this.customValidityMessage||e?"":this.validationInput.validationMessage,this.formControlController.setValidity(e),this.validationInput.hidden=!0,clearTimeout(this.validationTimeout),e||(this.validationInput.hidden=!1,this.validationInput.reportValidity(),this.validationTimeout=setTimeout(()=>this.validationInput.hidden=!0,1e4)),e}setCustomValidity(e=""){this.customValidityMessage=e,this.errorMessage=e,this.validationInput.setCustomValidity(e),this.formControlController.updateValidity()}focus(e){const t=this.getAllRadios(),r=t.find(s=>s.checked),n=t.find(s=>!s.disabled),i=r||n;i&&i.focus(e)}render(){const e=this.hasSlotController.test("label"),t=this.hasSlotController.test("help-text"),r=this.label?!0:!!e,n=this.helpText?!0:!!t,i=gr` `;return gr`
    ${this.errorMessage}
    ${this.hasButtonGroup?gr` ${i} `:i}
    ${this.helpText}
    `}};an.styles=[Fo,tB,Pot];an.dependencies={"sl-button-group":id};bt([Jn("slot:not([name])")],an.prototype,"defaultSlot",2);bt([Jn(".radio-group__validation-input")],an.prototype,"validationInput",2);bt([pn()],an.prototype,"hasButtonGroup",2);bt([pn()],an.prototype,"errorMessage",2);bt([pn()],an.prototype,"defaultValue",2);bt([jt()],an.prototype,"label",2);bt([jt({attribute:"help-text"})],an.prototype,"helpText",2);bt([jt()],an.prototype,"name",2);bt([jt({reflect:!0})],an.prototype,"value",2);bt([jt({reflect:!0})],an.prototype,"size",2);bt([jt({reflect:!0})],an.prototype,"form",2);bt([jt({type:Boolean,reflect:!0})],an.prototype,"required",2);bt([cs("size",{waitUntilFirstUpdate:!0})],an.prototype,"handleSizeChange",1);bt([cs("value")],an.prototype,"handleValueChange",1);an.define("sl-radio-group");var $ot=ui` :host { display: inline-block; } .tag { display: flex; align-items: center; border: solid 1px; line-height: 1; white-space: nowrap; user-select: none; -webkit-user-select: none; } .tag__remove::part(base) { color: inherit; padding: 0; } /* * Variant modifiers */ .tag--primary { background-color: var(--sl-color-primary-50); border-color: var(--sl-color-primary-200); color: var(--sl-color-primary-800); } .tag--primary:active > sl-icon-button { color: var(--sl-color-primary-600); } .tag--success { background-color: var(--sl-color-success-50); border-color: var(--sl-color-success-200); color: var(--sl-color-success-800); } .tag--success:active > sl-icon-button { color: var(--sl-color-success-600); } .tag--neutral { background-color: var(--sl-color-neutral-50); border-color: var(--sl-color-neutral-200); color: var(--sl-color-neutral-800); } .tag--neutral:active > sl-icon-button { color: var(--sl-color-neutral-600); } .tag--warning { background-color: var(--sl-color-warning-50); border-color: var(--sl-color-warning-200); color: var(--sl-color-warning-800); } .tag--warning:active > sl-icon-button { color: var(--sl-color-warning-600); } .tag--danger { background-color: var(--sl-color-danger-50); border-color: var(--sl-color-danger-200); color: var(--sl-color-danger-800); } .tag--danger:active > sl-icon-button { color: var(--sl-color-danger-600); } /* * Size modifiers */ .tag--small { font-size: var(--sl-button-font-size-small); height: calc(var(--sl-input-height-small) * 0.8); line-height: calc(var(--sl-input-height-small) - var(--sl-input-border-width) * 2); border-radius: var(--sl-input-border-radius-small); padding: 0 var(--sl-spacing-x-small); } .tag--medium { font-size: var(--sl-button-font-size-medium); height: calc(var(--sl-input-height-medium) * 0.8); line-height: calc(var(--sl-input-height-medium) - var(--sl-input-border-width) * 2); border-radius: var(--sl-input-border-radius-medium); padding: 0 var(--sl-spacing-small); } .tag--large { font-size: var(--sl-button-font-size-large); height: calc(var(--sl-input-height-large) * 0.8); line-height: calc(var(--sl-input-height-large) - var(--sl-input-border-width) * 2); border-radius: var(--sl-input-border-radius-large); padding: 0 var(--sl-spacing-medium); } .tag__remove { margin-inline-start: var(--sl-spacing-x-small); } /* * Pill modifier */ .tag--pill { border-radius: var(--sl-border-radius-pill); } `,Bot=ui` :host { display: inline-block; color: var(--sl-color-neutral-600); } .icon-button { flex: 0 0 auto; display: flex; align-items: center; background: none; border: none; border-radius: var(--sl-border-radius-medium); font-size: inherit; color: inherit; padding: var(--sl-spacing-x-small); cursor: pointer; transition: var(--sl-transition-x-fast) color; -webkit-appearance: none; } .icon-button:hover:not(.icon-button--disabled), .icon-button:focus-visible:not(.icon-button--disabled) { color: var(--sl-color-primary-600); } .icon-button:active:not(.icon-button--disabled) { color: var(--sl-color-primary-700); } .icon-button:focus { outline: none; } .icon-button--disabled { opacity: 0.5; cursor: not-allowed; } .icon-button:focus-visible { outline: var(--sl-focus-ring); outline-offset: var(--sl-focus-ring-offset); } .icon-button__icon { pointer-events: none; } `,Lv="";function JA(e){Lv=e}function Rot(e=""){if(!Lv){const t=[...document.getElementsByTagName("script")],r=t.find(n=>n.hasAttribute("data-shoelace"));if(r)JA(r.getAttribute("data-shoelace"));else{const n=t.find(s=>/shoelace(\.min)?\.js($|\?)/.test(s.src)||/shoelace-autoloader(\.min)?\.js($|\?)/.test(s.src));let i="";n&&(i=n.getAttribute("src")),JA(i.split("/").slice(0,-1).join("/"))}}return Lv.replace(/\/$/,"")+(e?`/${e.replace(/^\//,"")}`:"")}var Not={name:"default",resolver:e=>Rot(`assets/icons/${e}.svg`)},Lot=Not,ZA={caret:` `,check:` `,"chevron-down":` `,"chevron-left":` `,"chevron-right":` `,copy:` `,eye:` `,"eye-slash":` `,eyedropper:` `,"grip-vertical":` `,indeterminate:` `,"person-fill":` `,"play-fill":` `,"pause-fill":` `,radio:` `,"star-fill":` `,"x-lg":` `,"x-circle-fill":` `},Mot={name:"system",resolver:e=>e in ZA?`data:image/svg+xml,${encodeURIComponent(ZA[e])}`:""},jot=Mot,zot=[Lot,jot],Mv=[];function Uot(e){Mv.push(e)}function Vot(e){Mv=Mv.filter(t=>t!==e)}function QA(e){return zot.find(t=>t.name===e)}var Wot=ui` :host { display: inline-block; width: 1em; height: 1em; box-sizing: content-box !important; } svg { display: block; height: 100%; width: 100%; } `;/** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const qot=(e,t)=>e?._$litType$!==void 0,Yft=e=>e.strings===void 0;var mh=Symbol(),tp=Symbol(),Fb,Ob=new Map,hs=class extends hi{constructor(){super(...arguments),this.initialRender=!1,this.svg=null,this.label="",this.library="default"}async resolveIcon(e,t){var r;let n;if(t?.spriteSheet)return this.svg=gr` `,this.svg;try{if(n=await fetch(e,{mode:"cors"}),!n.ok)return n.status===410?mh:tp}catch{return tp}try{const i=document.createElement("div");i.innerHTML=await n.text();const s=i.firstElementChild;if(((r=s?.tagName)==null?void 0:r.toLowerCase())!=="svg")return mh;Fb||(Fb=new DOMParser);const a=Fb.parseFromString(s.outerHTML,"text/html").body.querySelector("svg");return a?(a.part.add("svg"),document.adoptNode(a)):mh}catch{return mh}}connectedCallback(){super.connectedCallback(),Uot(this)}firstUpdated(){this.initialRender=!0,this.setIcon()}disconnectedCallback(){super.disconnectedCallback(),Vot(this)}getIconSource(){const e=QA(this.library);return this.name&&e?{url:e.resolver(this.name),fromLibrary:!0}:{url:this.src,fromLibrary:!1}}handleLabelChange(){typeof this.label=="string"&&this.label.length>0?(this.setAttribute("role","img"),this.setAttribute("aria-label",this.label),this.removeAttribute("aria-hidden")):(this.removeAttribute("role"),this.removeAttribute("aria-label"),this.setAttribute("aria-hidden","true"))}async setIcon(){var e;const{url:t,fromLibrary:r}=this.getIconSource(),n=r?QA(this.library):void 0;if(!t){this.svg=null;return}let i=Ob.get(t);if(i||(i=this.resolveIcon(t,n),Ob.set(t,i)),!this.initialRender)return;const s=await i;if(s===tp&&Ob.delete(t),t===this.getIconSource().url){if(qot(s)){if(this.svg=s,n){await this.updateComplete;const o=this.shadowRoot.querySelector("[part='svg']");typeof n.mutator=="function"&&o&&n.mutator(o)}return}switch(s){case tp:case mh:this.svg=null,this.emit("sl-error");break;default:this.svg=s.cloneNode(!0),(e=n?.mutator)==null||e.call(n,this.svg),this.emit("sl-load")}}}render(){return this.svg}};hs.styles=[Fo,Wot];bt([pn()],hs.prototype,"svg",2);bt([jt({reflect:!0})],hs.prototype,"name",2);bt([jt()],hs.prototype,"src",2);bt([jt()],hs.prototype,"label",2);bt([jt({reflect:!0})],hs.prototype,"library",2);bt([cs("label")],hs.prototype,"handleLabelChange",1);bt([cs(["name","src","library"])],hs.prototype,"setIcon",1);var fi=class extends hi{constructor(){super(...arguments),this.hasFocus=!1,this.label="",this.disabled=!1}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleClick(e){this.disabled&&(e.preventDefault(),e.stopPropagation())}click(){this.button.click()}focus(e){this.button.focus(e)}blur(){this.button.blur()}render(){const e=!!this.href,t=e?KA`a`:KA`button`;return Q6` <${t} part="base" class=${wo({"icon-button":!0,"icon-button--disabled":!e&&this.disabled,"icon-button--focused":this.hasFocus})} ?disabled=${Wi(e?void 0:this.disabled)} type=${Wi(e?void 0:"button")} href=${Wi(e?this.href:void 0)} target=${Wi(e?this.target:void 0)} download=${Wi(e?this.download:void 0)} rel=${Wi(e&&this.target?"noreferrer noopener":void 0)} role=${Wi(e?void 0:"button")} aria-disabled=${this.disabled?"true":"false"} aria-label="${this.label}" tabindex=${this.disabled?"-1":"0"} @blur=${this.handleBlur} @focus=${this.handleFocus} @click=${this.handleClick} > `}};fi.styles=[Fo,Bot];fi.dependencies={"sl-icon":hs};bt([Jn(".icon-button")],fi.prototype,"button",2);bt([pn()],fi.prototype,"hasFocus",2);bt([jt()],fi.prototype,"name",2);bt([jt()],fi.prototype,"library",2);bt([jt()],fi.prototype,"src",2);bt([jt()],fi.prototype,"href",2);bt([jt()],fi.prototype,"target",2);bt([jt()],fi.prototype,"download",2);bt([jt()],fi.prototype,"label",2);bt([jt({type:Boolean,reflect:!0})],fi.prototype,"disabled",2);const jv=new Set,Ac=new Map;let Wa,u2="ltr",h2="en";const rB=typeof MutationObserver<"u"&&typeof document<"u"&&typeof document.documentElement<"u";if(rB){const e=new MutationObserver(iB);u2=document.documentElement.dir||"ltr",h2=document.documentElement.lang||navigator.language,e.observe(document.documentElement,{attributes:!0,attributeFilter:["dir","lang"]})}function nB(...e){e.map(t=>{const r=t.$code.toLowerCase();Ac.has(r)?Ac.set(r,Object.assign(Object.assign({},Ac.get(r)),t)):Ac.set(r,t),Wa||(Wa=t)}),iB()}function iB(){rB&&(u2=document.documentElement.dir||"ltr",h2=document.documentElement.lang||navigator.language),[...jv.keys()].map(e=>{typeof e.requestUpdate=="function"&&e.requestUpdate()})}let Hot=class{constructor(t){this.host=t,this.host.addController(this)}hostConnected(){jv.add(this.host)}hostDisconnected(){jv.delete(this.host)}dir(){return`${this.host.dir||u2}`.toLowerCase()}lang(){return`${this.host.lang||h2}`.toLowerCase()}getTranslationData(t){var r,n;const i=new Intl.Locale(t.replace(/_/g,"-")),s=i?.language.toLowerCase(),o=(n=(r=i?.region)===null||r===void 0?void 0:r.toLowerCase())!==null&&n!==void 0?n:"",a=Ac.get(`${s}-${o}`),l=Ac.get(s);return{locale:i,language:s,region:o,primary:a,secondary:l}}exists(t,r){var n;const{primary:i,secondary:s}=this.getTranslationData((n=r.lang)!==null&&n!==void 0?n:this.lang());return r=Object.assign({includeFallback:!1},r),!!(i&&i[t]||s&&s[t]||r.includeFallback&&Wa&&Wa[t])}term(t,...r){const{primary:n,secondary:i}=this.getTranslationData(this.lang());let s;if(n&&n[t])s=n[t];else if(i&&i[t])s=i[t];else if(Wa&&Wa[t])s=Wa[t];else return console.error(`No translation found for: ${String(t)}`),String(t);return typeof s=="function"?s(...r):s}date(t,r){return t=new Date(t),new Intl.DateTimeFormat(this.lang(),r).format(t)}number(t,r){return t=Number(t),isNaN(t)?"":new Intl.NumberFormat(this.lang(),r).format(t)}relativeTime(t,r,n){return new Intl.RelativeTimeFormat(this.lang(),n).format(t,r)}};var sB={$code:"en",$name:"English",$dir:"ltr",carousel:"Carousel",clearEntry:"Clear entry",close:"Close",copied:"Copied",copy:"Copy",currentValue:"Current value",error:"Error",goToSlide:(e,t)=>`Go to slide ${e} of ${t}`,hidePassword:"Hide password",loading:"Loading",nextSlide:"Next slide",numOptionsSelected:e=>e===0?"No options selected":e===1?"1 option selected":`${e} options selected`,previousSlide:"Previous slide",progress:"Progress",remove:"Remove",resize:"Resize",scrollToEnd:"Scroll to end",scrollToStart:"Scroll to start",selectAColorFromTheScreen:"Select a color from the screen",showPassword:"Show password",slideNum:e=>`Slide ${e}`,toggleColorFormat:"Toggle color format"};nB(sB);var Got=sB,U0=class extends Hot{};nB(Got);var Rl=class extends hi{constructor(){super(...arguments),this.localize=new U0(this),this.variant="neutral",this.size="medium",this.pill=!1,this.removable=!1}handleRemoveClick(){this.emit("sl-remove")}render(){return gr` ${this.removable?gr` `:""} `}};Rl.styles=[Fo,$ot];Rl.dependencies={"sl-icon-button":fi};bt([jt({reflect:!0})],Rl.prototype,"variant",2);bt([jt({reflect:!0})],Rl.prototype,"size",2);bt([jt({type:Boolean,reflect:!0})],Rl.prototype,"pill",2);bt([jt({type:Boolean})],Rl.prototype,"removable",2);var Yot=ui` :host { display: block; } /** The popup */ .select { flex: 1 1 auto; display: inline-flex; width: 100%; position: relative; vertical-align: middle; } .select::part(popup) { z-index: var(--sl-z-index-dropdown); } .select[data-current-placement^='top']::part(popup) { transform-origin: bottom; } .select[data-current-placement^='bottom']::part(popup) { transform-origin: top; } /* Combobox */ .select__combobox { flex: 1; display: flex; width: 100%; min-width: 0; position: relative; align-items: center; justify-content: start; font-family: var(--sl-input-font-family); font-weight: var(--sl-input-font-weight); letter-spacing: var(--sl-input-letter-spacing); vertical-align: middle; overflow: hidden; cursor: pointer; transition: var(--sl-transition-fast) color, var(--sl-transition-fast) border, var(--sl-transition-fast) box-shadow, var(--sl-transition-fast) background-color; } .select__display-input { position: relative; width: 100%; font: inherit; border: none; background: none; color: var(--sl-input-color); cursor: inherit; overflow: hidden; padding: 0; margin: 0; -webkit-appearance: none; } .select__display-input::placeholder { color: var(--sl-input-placeholder-color); } .select:not(.select--disabled):hover .select__display-input { color: var(--sl-input-color-hover); } .select__display-input:focus { outline: none; } /* Visually hide the display input when multiple is enabled */ .select--multiple:not(.select--placeholder-visible) .select__display-input { position: absolute; z-index: -1; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; } .select__value-input { position: absolute; top: 0; left: 0; width: 100%; height: 100%; padding: 0; margin: 0; opacity: 0; z-index: -1; } .select__tags { display: flex; flex: 1; align-items: center; flex-wrap: wrap; margin-inline-start: var(--sl-spacing-2x-small); } .select__tags::slotted(sl-tag) { cursor: pointer !important; } .select--disabled .select__tags, .select--disabled .select__tags::slotted(sl-tag) { cursor: not-allowed !important; } /* Standard selects */ .select--standard .select__combobox { background-color: var(--sl-input-background-color); border: solid var(--sl-input-border-width) var(--sl-input-border-color); } .select--standard.select--disabled .select__combobox { background-color: var(--sl-input-background-color-disabled); border-color: var(--sl-input-border-color-disabled); color: var(--sl-input-color-disabled); opacity: 0.5; cursor: not-allowed; outline: none; } .select--standard:not(.select--disabled).select--open .select__combobox, .select--standard:not(.select--disabled).select--focused .select__combobox { background-color: var(--sl-input-background-color-focus); border-color: var(--sl-input-border-color-focus); box-shadow: 0 0 0 var(--sl-focus-ring-width) var(--sl-input-focus-ring-color); } /* Filled selects */ .select--filled .select__combobox { border: none; background-color: var(--sl-input-filled-background-color); color: var(--sl-input-color); } .select--filled:hover:not(.select--disabled) .select__combobox { background-color: var(--sl-input-filled-background-color-hover); } .select--filled.select--disabled .select__combobox { background-color: var(--sl-input-filled-background-color-disabled); opacity: 0.5; cursor: not-allowed; } .select--filled:not(.select--disabled).select--open .select__combobox, .select--filled:not(.select--disabled).select--focused .select__combobox { background-color: var(--sl-input-filled-background-color-focus); outline: var(--sl-focus-ring); } /* Sizes */ .select--small .select__combobox { border-radius: var(--sl-input-border-radius-small); font-size: var(--sl-input-font-size-small); min-height: var(--sl-input-height-small); padding-block: 0; padding-inline: var(--sl-input-spacing-small); } .select--small .select__clear { margin-inline-start: var(--sl-input-spacing-small); } .select--small .select__prefix::slotted(*) { margin-inline-end: var(--sl-input-spacing-small); } .select--small.select--multiple:not(.select--placeholder-visible) .select__prefix::slotted(*) { margin-inline-start: var(--sl-input-spacing-small); } .select--small.select--multiple:not(.select--placeholder-visible) .select__combobox { padding-block: 2px; padding-inline-start: 0; } .select--small .select__tags { gap: 2px; } .select--medium .select__combobox { border-radius: var(--sl-input-border-radius-medium); font-size: var(--sl-input-font-size-medium); min-height: var(--sl-input-height-medium); padding-block: 0; padding-inline: var(--sl-input-spacing-medium); } .select--medium .select__clear { margin-inline-start: var(--sl-input-spacing-medium); } .select--medium .select__prefix::slotted(*) { margin-inline-end: var(--sl-input-spacing-medium); } .select--medium.select--multiple:not(.select--placeholder-visible) .select__prefix::slotted(*) { margin-inline-start: var(--sl-input-spacing-medium); } .select--medium.select--multiple:not(.select--placeholder-visible) .select__combobox { padding-inline-start: 0; padding-block: 3px; } .select--medium .select__tags { gap: 3px; } .select--large .select__combobox { border-radius: var(--sl-input-border-radius-large); font-size: var(--sl-input-font-size-large); min-height: var(--sl-input-height-large); padding-block: 0; padding-inline: var(--sl-input-spacing-large); } .select--large .select__clear { margin-inline-start: var(--sl-input-spacing-large); } .select--large .select__prefix::slotted(*) { margin-inline-end: var(--sl-input-spacing-large); } .select--large.select--multiple:not(.select--placeholder-visible) .select__prefix::slotted(*) { margin-inline-start: var(--sl-input-spacing-large); } .select--large.select--multiple:not(.select--placeholder-visible) .select__combobox { padding-inline-start: 0; padding-block: 4px; } .select--large .select__tags { gap: 4px; } /* Pills */ .select--pill.select--small .select__combobox { border-radius: var(--sl-input-height-small); } .select--pill.select--medium .select__combobox { border-radius: var(--sl-input-height-medium); } .select--pill.select--large .select__combobox { border-radius: var(--sl-input-height-large); } /* Prefix and Suffix */ .select__prefix, .select__suffix { flex: 0; display: inline-flex; align-items: center; color: var(--sl-input-placeholder-color); } .select__suffix::slotted(*) { margin-inline-start: var(--sl-spacing-small); } /* Clear button */ .select__clear { display: inline-flex; align-items: center; justify-content: center; font-size: inherit; color: var(--sl-input-icon-color); border: none; background: none; padding: 0; transition: var(--sl-transition-fast) color; cursor: pointer; } .select__clear:hover { color: var(--sl-input-icon-color-hover); } .select__clear:focus { outline: none; } /* Expand icon */ .select__expand-icon { flex: 0 0 auto; display: flex; align-items: center; transition: var(--sl-transition-medium) rotate ease; rotate: 0; margin-inline-start: var(--sl-spacing-small); } .select--open .select__expand-icon { rotate: -180deg; } /* Listbox */ .select__listbox { display: block; position: relative; font-family: var(--sl-font-sans); font-size: var(--sl-font-size-medium); font-weight: var(--sl-font-weight-normal); box-shadow: var(--sl-shadow-large); background: var(--sl-panel-background-color); border: solid var(--sl-panel-border-width) var(--sl-panel-border-color); border-radius: var(--sl-border-radius-medium); padding-block: var(--sl-spacing-x-small); padding-inline: 0; overflow: auto; overscroll-behavior: none; /* Make sure it adheres to the popup's auto size */ max-width: var(--auto-size-available-width); max-height: var(--auto-size-available-height); } .select__listbox ::slotted(sl-divider) { --spacing: var(--sl-spacing-x-small); } .select__listbox ::slotted(small) { display: block; font-size: var(--sl-font-size-small); font-weight: var(--sl-font-weight-semibold); color: var(--sl-color-neutral-500); padding-block: var(--sl-spacing-2x-small); padding-inline: var(--sl-spacing-x-large); } `;function Kot(e,t){return{top:Math.round(e.getBoundingClientRect().top-t.getBoundingClientRect().top),left:Math.round(e.getBoundingClientRect().left-t.getBoundingClientRect().left)}}function Xot(e,t,r="vertical",n="smooth"){const i=Kot(e,t),s=i.top+t.scrollTop,o=i.left+t.scrollLeft,a=t.scrollLeft,l=t.scrollLeft+t.offsetWidth,c=t.scrollTop,u=t.scrollTop+t.offsetHeight;(r==="horizontal"||r==="both")&&(ol&&t.scrollTo({left:o-t.offsetWidth+e.clientWidth,behavior:n})),(r==="vertical"||r==="both")&&(su&&t.scrollTo({top:s-t.offsetHeight+e.clientHeight,behavior:n}))}var Jot=ui` :host { --arrow-color: var(--sl-color-neutral-1000); --arrow-size: 6px; /* * These properties are computed to account for the arrow's dimensions after being rotated 45º. The constant * 0.7071 is derived from sin(45), which is the diagonal size of the arrow's container after rotating. */ --arrow-size-diagonal: calc(var(--arrow-size) * 0.7071); --arrow-padding-offset: calc(var(--arrow-size-diagonal) - var(--arrow-size)); display: contents; } .popup { position: absolute; isolation: isolate; max-width: var(--auto-size-available-width, none); max-height: var(--auto-size-available-height, none); } .popup--fixed { position: fixed; } .popup:not(.popup--active) { display: none; } .popup__arrow { position: absolute; width: calc(var(--arrow-size-diagonal) * 2); height: calc(var(--arrow-size-diagonal) * 2); rotate: 45deg; background: var(--arrow-color); z-index: -1; } /* Hover bridge */ .popup-hover-bridge:not(.popup-hover-bridge--visible) { display: none; } .popup-hover-bridge { position: fixed; z-index: calc(var(--sl-z-index-dropdown) - 1); top: 0; right: 0; bottom: 0; left: 0; clip-path: polygon( var(--hover-bridge-top-left-x, 0) var(--hover-bridge-top-left-y, 0), var(--hover-bridge-top-right-x, 0) var(--hover-bridge-top-right-y, 0), var(--hover-bridge-bottom-right-x, 0) var(--hover-bridge-bottom-right-y, 0), var(--hover-bridge-bottom-left-x, 0) var(--hover-bridge-bottom-left-y, 0) ); } `;const fa=Math.min,si=Math.max,og=Math.round,ep=Math.floor,Ps=e=>({x:e,y:e}),Zot={left:"right",right:"left",bottom:"top",top:"bottom"},Qot={start:"end",end:"start"};function zv(e,t,r){return si(e,fa(t,r))}function Au(e,t){return typeof e=="function"?e(t):e}function da(e){return e.split("-")[0]}function ku(e){return e.split("-")[1]}function oB(e){return e==="x"?"y":"x"}function f2(e){return e==="y"?"height":"width"}function bl(e){return["top","bottom"].includes(da(e))?"y":"x"}function d2(e){return oB(bl(e))}function tat(e,t,r){r===void 0&&(r=!1);const n=ku(e),i=d2(e),s=f2(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=ag(o)),[o,ag(o)]}function eat(e){const t=ag(e);return[Uv(e),t,Uv(t)]}function Uv(e){return e.replace(/start|end/g,t=>Qot[t])}function rat(e,t,r){const n=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return r?t?i:n:t?n:i;case"left":case"right":return t?s:o;default:return[]}}function nat(e,t,r,n){const i=ku(e);let s=rat(da(e),r==="start",n);return i&&(s=s.map(o=>o+"-"+i),t&&(s=s.concat(s.map(Uv)))),s}function ag(e){return e.replace(/left|right|bottom|top/g,t=>Zot[t])}function iat(e){return{top:0,right:0,bottom:0,left:0,...e}}function aB(e){return typeof e!="number"?iat(e):{top:e,right:e,bottom:e,left:e}}function lg(e){const{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function tk(e,t,r){let{reference:n,floating:i}=e;const s=bl(t),o=d2(t),a=f2(o),l=da(t),c=s==="y",u=n.x+n.width/2-i.width/2,h=n.y+n.height/2-i.height/2,d=n[a]/2-i[a]/2;let g;switch(l){case"top":g={x:u,y:n.y-i.height};break;case"bottom":g={x:u,y:n.y+n.height};break;case"right":g={x:n.x+n.width,y:h};break;case"left":g={x:n.x-i.width,y:h};break;default:g={x:n.x,y:n.y}}switch(ku(t)){case"start":g[o]-=d*(r&&c?-1:1);break;case"end":g[o]+=d*(r&&c?-1:1);break}return g}const sat=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:o}=r,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=tk(c,n,l),d=n,g={},y=0;for(let f=0;f({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=Au(e,t)||{};if(c==null)return{};const h=aB(u),d={x:r,y:n},g=d2(i),y=f2(g),f=await o.getDimensions(c),p=g==="y",m=p?"top":"left",b=p?"bottom":"right",w=p?"clientHeight":"clientWidth",x=s.reference[y]+s.reference[g]-d[g]-s.floating[y],E=d[g]-s.reference[g],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let C=S?S[w]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=a.floating[w]||s.floating[y]);const A=x/2-E/2,$=C/2-f[y]/2-1,O=fa(h[m],$),I=fa(h[b],$),M=O,q=C-f[y]-I,H=C/2-f[y]/2+A,G=zv(M,H,q),Y=!l.arrow&&ku(i)!=null&&H!==G&&s.reference[y]/2-(HH<=0)){var I,M;const H=(((I=s.flip)==null?void 0:I.index)||0)+1,G=C[H];if(G)return{data:{index:H,overflows:O},reset:{placement:G}};let Y=(M=O.filter(F=>F.overflows[0]<=0).sort((F,T)=>F.overflows[1]-T.overflows[1])[0])==null?void 0:M.placement;if(!Y)switch(g){case"bestFit":{var q;const F=(q=O.filter(T=>{if(S){const N=bl(T.placement);return N===b||N==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(N=>N>0).reduce((N,U)=>N+U,0)]).sort((T,N)=>T[1]-N[1])[0])==null?void 0:q[0];F&&(Y=F);break}case"initialPlacement":Y=a;break}if(i!==Y)return{reset:{placement:Y}}}return{}}}};async function lat(e,t){const{placement:r,platform:n,elements:i}=e,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),o=da(r),a=ku(r),l=bl(r)==="y",c=["left","top"].includes(o)?-1:1,u=s&&l?-1:1,h=Au(t,e);let{mainAxis:d,crossAxis:g,alignmentAxis:y}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof y=="number"&&(g=a==="end"?y*-1:y),l?{x:g*u,y:d*c}:{x:d*c,y:g*u}}const cat=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:s,placement:o,middlewareData:a}=t,l=await lat(t,e);return o===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}},uat=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i}=t,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:p=>{let{x:m,y:b}=p;return{x:m,y:b}}},...l}=Au(e,t),c={x:r,y:n},u=await p2(t,l),h=bl(da(i)),d=oB(h);let g=c[d],y=c[h];if(s){const p=d==="y"?"top":"left",m=d==="y"?"bottom":"right",b=g+u[p],w=g-u[m];g=zv(b,g,w)}if(o){const p=h==="y"?"top":"left",m=h==="y"?"bottom":"right",b=y+u[p],w=y-u[m];y=zv(b,y,w)}const f=a.fn({...t,[d]:g,[h]:y});return{...f,data:{x:f.x-r,y:f.y-n,enabled:{[d]:s,[h]:o}}}}}},hat=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:s,platform:o,elements:a}=t,{apply:l=()=>{},...c}=Au(e,t),u=await p2(t,c),h=da(i),d=ku(i),g=bl(i)==="y",{width:y,height:f}=s.floating;let p,m;h==="top"||h==="bottom"?(p=h,m=d===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(m=h,p=d==="end"?"top":"bottom");const b=f-u.top-u.bottom,w=y-u.left-u.right,x=fa(f-u[p],b),E=fa(y-u[m],w),S=!t.middlewareData.shift;let C=x,A=E;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(A=w),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(C=b),S&&!d){const O=si(u.left,0),I=si(u.right,0),M=si(u.top,0),q=si(u.bottom,0);g?A=y-2*(O!==0||I!==0?O+I:si(u.left,u.right)):C=f-2*(M!==0||q!==0?M+q:si(u.top,u.bottom))}await l({...t,availableWidth:A,availableHeight:C});const $=await o.getDimensions(a.floating);return y!==$.width||f!==$.height?{reset:{rects:!0}}:{}}}};function V0(){return typeof window<"u"}function Du(e){return lB(e)?(e.nodeName||"").toLowerCase():"#document"}function oi(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function js(e){var t;return(t=(lB(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function lB(e){return V0()?e instanceof Node||e instanceof oi(e).Node:!1}function is(e){return V0()?e instanceof Element||e instanceof oi(e).Element:!1}function Bs(e){return V0()?e instanceof HTMLElement||e instanceof oi(e).HTMLElement:!1}function ek(e){return!V0()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof oi(e).ShadowRoot}function sd(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=ss(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(i)}function fat(e){return["table","td","th"].includes(Du(e))}function W0(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function q0(e){const t=m2(),r=is(e)?ss(e):e;return["transform","translate","scale","rotate","perspective"].some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function dat(e){let t=pa(e);for(;Bs(t)&&!lu(t);){if(q0(t))return t;if(W0(t))return null;t=pa(t)}return null}function m2(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function lu(e){return["html","body","#document"].includes(Du(e))}function ss(e){return oi(e).getComputedStyle(e)}function H0(e){return is(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function pa(e){if(Du(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ek(e)&&e.host||js(e);return ek(t)?t.host:t}function cB(e){const t=pa(e);return lu(t)?e.ownerDocument?e.ownerDocument.body:e.body:Bs(t)&&sd(t)?t:cB(t)}function Af(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=cB(e),s=i===((n=e.ownerDocument)==null?void 0:n.body),o=oi(i);if(s){const a=Vv(o);return t.concat(o,o.visualViewport||[],sd(i)?i:[],a&&r?Af(a):[])}return t.concat(i,Af(i,[],r))}function Vv(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function uB(e){const t=ss(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=Bs(e),s=i?e.offsetWidth:r,o=i?e.offsetHeight:n,a=og(r)!==s||og(n)!==o;return a&&(r=s,n=o),{width:r,height:n,$:a}}function g2(e){return is(e)?e:e.contextElement}function Lc(e){const t=g2(e);if(!Bs(t))return Ps(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:s}=uB(t);let o=(s?og(r.width):r.width)/n,a=(s?og(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const pat=Ps(0);function hB(e){const t=oi(e);return!m2()||!t.visualViewport?pat:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function mat(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==oi(e)?!1:t}function vl(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),s=g2(e);let o=Ps(1);t&&(n?is(n)&&(o=Lc(n)):o=Lc(e));const a=mat(s,r,n)?hB(s):Ps(0);let l=(i.left+a.x)/o.x,c=(i.top+a.y)/o.y,u=i.width/o.x,h=i.height/o.y;if(s){const d=oi(s),g=n&&is(n)?oi(n):n;let y=d,f=Vv(y);for(;f&&n&&g!==y;){const p=Lc(f),m=f.getBoundingClientRect(),b=ss(f),w=m.left+(f.clientLeft+parseFloat(b.paddingLeft))*p.x,x=m.top+(f.clientTop+parseFloat(b.paddingTop))*p.y;l*=p.x,c*=p.y,u*=p.x,h*=p.y,l+=w,c+=x,y=oi(f),f=Vv(y)}}return lg({width:u,height:h,x:l,y:c})}function y2(e,t){const r=H0(e).scrollLeft;return t?t.left+r:vl(js(e)).left+r}function fB(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-(r?0:y2(e,n)),s=n.top+t.scrollTop;return{x:i,y:s}}function gat(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const s=i==="fixed",o=js(n),a=t?W0(t.floating):!1;if(n===o||a&&s)return r;let l={scrollLeft:0,scrollTop:0},c=Ps(1);const u=Ps(0),h=Bs(n);if((h||!h&&!s)&&((Du(n)!=="body"||sd(o))&&(l=H0(n)),Bs(n))){const g=vl(n);c=Lc(n),u.x=g.x+n.clientLeft,u.y=g.y+n.clientTop}const d=o&&!h&&!s?fB(o,l,!0):Ps(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+d.x,y:r.y*c.y-l.scrollTop*c.y+u.y+d.y}}function yat(e){return Array.from(e.getClientRects())}function bat(e){const t=js(e),r=H0(e),n=e.ownerDocument.body,i=si(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=si(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+y2(e);const a=-r.scrollTop;return ss(n).direction==="rtl"&&(o+=si(t.clientWidth,n.clientWidth)-i),{width:i,height:s,x:o,y:a}}function vat(e,t){const r=oi(e),n=js(e),i=r.visualViewport;let s=n.clientWidth,o=n.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const c=m2();(!c||c&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:a,y:l}}function wat(e,t){const r=vl(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,s=Bs(e)?Lc(e):Ps(1),o=e.clientWidth*s.x,a=e.clientHeight*s.y,l=i*s.x,c=n*s.y;return{width:o,height:a,x:l,y:c}}function rk(e,t,r){let n;if(t==="viewport")n=vat(e,r);else if(t==="document")n=bat(js(e));else if(is(t))n=wat(t,r);else{const i=hB(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return lg(n)}function dB(e,t){const r=pa(e);return r===t||!is(r)||lu(r)?!1:ss(r).position==="fixed"||dB(r,t)}function xat(e,t){const r=t.get(e);if(r)return r;let n=Af(e,[],!1).filter(a=>is(a)&&Du(a)!=="body"),i=null;const s=ss(e).position==="fixed";let o=s?pa(e):e;for(;is(o)&&!lu(o);){const a=ss(o),l=q0(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||sd(o)&&!l&&dB(e,o))?n=n.filter(u=>u!==o):i=a,o=pa(o)}return t.set(e,n),n}function _at(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const o=[...r==="clippingAncestors"?W0(t)?[]:xat(t,this._c):[].concat(r),n],a=o[0],l=o.reduce((c,u)=>{const h=rk(t,u,i);return c.top=si(h.top,c.top),c.right=fa(h.right,c.right),c.bottom=fa(h.bottom,c.bottom),c.left=si(h.left,c.left),c},rk(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Sat(e){const{width:t,height:r}=uB(e);return{width:t,height:r}}function Eat(e,t,r){const n=Bs(t),i=js(t),s=r==="fixed",o=vl(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Ps(0);if(n||!n&&!s)if((Du(t)!=="body"||sd(i))&&(a=H0(t)),n){const d=vl(t,!0,s,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else i&&(l.x=y2(i));const c=i&&!n&&!s?fB(i,a):Ps(0),u=o.left+a.scrollLeft-l.x-c.x,h=o.top+a.scrollTop-l.y-c.y;return{x:u,y:h,width:o.width,height:o.height}}function Ib(e){return ss(e).position==="static"}function nk(e,t){if(!Bs(e)||ss(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return js(e)===r&&(r=r.ownerDocument.body),r}function pB(e,t){const r=oi(e);if(W0(e))return r;if(!Bs(e)){let i=pa(e);for(;i&&!lu(i);){if(is(i)&&!Ib(i))return i;i=pa(i)}return r}let n=nk(e,t);for(;n&&fat(n)&&Ib(n);)n=nk(n,t);return n&&lu(n)&&Ib(n)&&!q0(n)?r:n||dat(e)||r}const Cat=async function(e){const t=this.getOffsetParent||pB,r=this.getDimensions,n=await r(e.floating);return{reference:Eat(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Aat(e){return ss(e).direction==="rtl"}const Xp={convertOffsetParentRelativeRectToViewportRelativeRect:gat,getDocumentElement:js,getClippingRect:_at,getOffsetParent:pB,getElementRects:Cat,getClientRects:yat,getDimensions:Sat,getScale:Lc,isElement:is,isRTL:Aat};function mB(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function kat(e,t){let r=null,n;const i=js(e);function s(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=e.getBoundingClientRect(),{left:u,top:h,width:d,height:g}=c;if(a||t(),!d||!g)return;const y=ep(h),f=ep(i.clientWidth-(u+d)),p=ep(i.clientHeight-(h+g)),m=ep(u),w={rootMargin:-y+"px "+-f+"px "+-p+"px "+-m+"px",threshold:si(0,fa(1,l))||1};let x=!0;function E(S){const C=S[0].intersectionRatio;if(C!==l){if(!x)return o();C?o(!1,C):n=setTimeout(()=>{o(!1,1e-7)},1e3)}C===1&&!mB(c,e.getBoundingClientRect())&&o(),x=!1}try{r=new IntersectionObserver(E,{...w,root:i.ownerDocument})}catch{r=new IntersectionObserver(E,w)}r.observe(e)}return o(!0),s}function Dat(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=g2(e),u=i||s?[...c?Af(c):[],...Af(t)]:[];u.forEach(m=>{i&&m.addEventListener("scroll",r,{passive:!0}),s&&m.addEventListener("resize",r)});const h=c&&a?kat(c,r):null;let d=-1,g=null;o&&(g=new ResizeObserver(m=>{let[b]=m;b&&b.target===c&&g&&(g.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var w;(w=g)==null||w.observe(t)})),r()}),c&&!l&&g.observe(c),g.observe(t));let y,f=l?vl(e):null;l&&p();function p(){const m=vl(e);f&&!mB(f,m)&&r(),f=m,y=requestAnimationFrame(p)}return r(),()=>{var m;u.forEach(b=>{i&&b.removeEventListener("scroll",r),s&&b.removeEventListener("resize",r)}),h?.(),(m=g)==null||m.disconnect(),g=null,l&&cancelAnimationFrame(y)}}const Tat=cat,Pat=uat,Fat=aat,ik=hat,Oat=oat,Iat=(e,t,r)=>{const n=new Map,i={platform:Xp,...r},s={...i.platform,_c:n};return sat(e,t,{...i,platform:s})};function $at(e){return Bat(e)}function $b(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function Bat(e){for(let t=e;t;t=$b(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=$b(e);t;t=$b(t)){if(!(t instanceof Element))continue;const r=getComputedStyle(t);if(r.display!=="contents"&&(r.position!=="static"||q0(r)||t.tagName==="BODY"))return t}return null}function Rat(e){return e!==null&&typeof e=="object"&&"getBoundingClientRect"in e&&("contextElement"in e?e instanceof Element:!0)}var rr=class extends hi{constructor(){super(...arguments),this.localize=new U0(this),this.active=!1,this.placement="top",this.strategy="absolute",this.distance=0,this.skidding=0,this.arrow=!1,this.arrowPlacement="anchor",this.arrowPadding=10,this.flip=!1,this.flipFallbackPlacements="",this.flipFallbackStrategy="best-fit",this.flipPadding=0,this.shift=!1,this.shiftPadding=0,this.autoSizePadding=0,this.hoverBridge=!1,this.updateHoverBridge=()=>{if(this.hoverBridge&&this.anchorEl){const e=this.anchorEl.getBoundingClientRect(),t=this.popup.getBoundingClientRect(),r=this.placement.includes("top")||this.placement.includes("bottom");let n=0,i=0,s=0,o=0,a=0,l=0,c=0,u=0;r?e.top{this.reposition()}))}async stop(){return new Promise(e=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame(()=>e())):e()})}reposition(){if(!this.active||!this.anchorEl)return;const e=[Tat({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?e.push(ik({apply:({rects:r})=>{const n=this.sync==="width"||this.sync==="both",i=this.sync==="height"||this.sync==="both";this.popup.style.width=n?`${r.reference.width}px`:"",this.popup.style.height=i?`${r.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&e.push(Fat({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&e.push(Pat({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?e.push(ik({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:r,availableHeight:n})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${n}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${r}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&e.push(Oat({element:this.arrowEl,padding:this.arrowPadding}));const t=this.strategy==="absolute"?r=>Xp.getOffsetParent(r,$at):Xp.getOffsetParent;Iat(this.anchorEl,this.popup,{placement:this.placement,middleware:e,strategy:this.strategy,platform:z0(Bl({},Xp),{getOffsetParent:t})}).then(({x:r,y:n,middlewareData:i,placement:s})=>{const o=this.localize.dir()==="rtl",a={top:"bottom",right:"left",bottom:"top",left:"right"}[s.split("-")[0]];if(this.setAttribute("data-current-placement",s),Object.assign(this.popup.style,{left:`${r}px`,top:`${n}px`}),this.arrow){const l=i.arrow.x,c=i.arrow.y;let u="",h="",d="",g="";if(this.arrowPlacement==="start"){const y=typeof l=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";u=typeof c=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",h=o?y:"",g=o?"":y}else if(this.arrowPlacement==="end"){const y=typeof l=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";h=o?"":y,g=o?y:"",d=typeof c=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else this.arrowPlacement==="center"?(g=typeof l=="number"?"calc(50% - var(--arrow-size-diagonal))":"",u=typeof c=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(g=typeof l=="number"?`${l}px`:"",u=typeof c=="number"?`${c}px`:"");Object.assign(this.arrowEl.style,{top:u,right:h,bottom:d,left:g,[a]:"calc(var(--arrow-size-diagonal) * -1)"})}}),requestAnimationFrame(()=>this.updateHoverBridge()),this.emit("sl-reposition")}render(){return gr`
    ${this.arrow?gr``:""}
    `}};rr.styles=[Fo,Jot];bt([Jn(".popup")],rr.prototype,"popup",2);bt([Jn(".popup__arrow")],rr.prototype,"arrowEl",2);bt([jt()],rr.prototype,"anchor",2);bt([jt({type:Boolean,reflect:!0})],rr.prototype,"active",2);bt([jt({reflect:!0})],rr.prototype,"placement",2);bt([jt({reflect:!0})],rr.prototype,"strategy",2);bt([jt({type:Number})],rr.prototype,"distance",2);bt([jt({type:Number})],rr.prototype,"skidding",2);bt([jt({type:Boolean})],rr.prototype,"arrow",2);bt([jt({attribute:"arrow-placement"})],rr.prototype,"arrowPlacement",2);bt([jt({attribute:"arrow-padding",type:Number})],rr.prototype,"arrowPadding",2);bt([jt({type:Boolean})],rr.prototype,"flip",2);bt([jt({attribute:"flip-fallback-placements",converter:{fromAttribute:e=>e.split(" ").map(t=>t.trim()).filter(t=>t!==""),toAttribute:e=>e.join(" ")}})],rr.prototype,"flipFallbackPlacements",2);bt([jt({attribute:"flip-fallback-strategy"})],rr.prototype,"flipFallbackStrategy",2);bt([jt({type:Object})],rr.prototype,"flipBoundary",2);bt([jt({attribute:"flip-padding",type:Number})],rr.prototype,"flipPadding",2);bt([jt({type:Boolean})],rr.prototype,"shift",2);bt([jt({type:Object})],rr.prototype,"shiftBoundary",2);bt([jt({attribute:"shift-padding",type:Number})],rr.prototype,"shiftPadding",2);bt([jt({attribute:"auto-size"})],rr.prototype,"autoSize",2);bt([jt()],rr.prototype,"sync",2);bt([jt({type:Object})],rr.prototype,"autoSizeBoundary",2);bt([jt({attribute:"auto-size-padding",type:Number})],rr.prototype,"autoSizePadding",2);bt([jt({attribute:"hover-bridge",type:Boolean})],rr.prototype,"hoverBridge",2);var gB=new Map,Nat=new WeakMap;function Lat(e){return e??{keyframes:[],options:{duration:0}}}function sk(e,t){return t.toLowerCase()==="rtl"?{keyframes:e.rtlKeyframes||e.keyframes,options:e.options}:e}function yB(e,t){gB.set(e,Lat(t))}function ok(e,t,r){const n=Nat.get(e);if(n?.[t])return sk(n[t],r.dir);const i=gB.get(t);return i?sk(i,r.dir):{keyframes:[],options:{duration:0}}}function ak(e,t){return new Promise(r=>{function n(i){i.target===e&&(e.removeEventListener(t,n),r())}e.addEventListener(t,n)})}function lk(e,t,r){return new Promise(n=>{if(r?.duration===1/0)throw new Error("Promise-based animations must be finite.");const i=e.animate(t,z0(Bl({},r),{duration:Mat()?0:r.duration}));i.addEventListener("cancel",n,{once:!0}),i.addEventListener("finish",n,{once:!0})})}function Mat(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function ck(e){return Promise.all(e.getAnimations().map(t=>new Promise(r=>{t.cancel(),requestAnimationFrame(r)})))}/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */let Wv=class extends J6{constructor(t){if(super(t),this.it=Er,t.type!==K6.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===Er||t==null)return this._t=void 0,this.it=t;if(t===ha)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const r=[t];return r.raw=r,this._t={_$litType$:this.constructor.resultType,strings:r,values:[]}}};Wv.directiveName="unsafeHTML",Wv.resultType=1;const jat=X6(Wv);var Be=class extends hi{constructor(){super(...arguments),this.formControlController=new eB(this,{assumeInteractionOn:["sl-blur","sl-input"]}),this.hasSlotController=new l2(this,"help-text","label"),this.localize=new U0(this),this.typeToSelectString="",this.hasFocus=!1,this.displayLabel="",this.selectedOptions=[],this.valueHasChanged=!1,this.name="",this._value="",this.defaultValue="",this.size="medium",this.placeholder="",this.multiple=!1,this.maxOptionsVisible=3,this.disabled=!1,this.clearable=!1,this.open=!1,this.hoist=!1,this.filled=!1,this.pill=!1,this.label="",this.placement="bottom",this.helpText="",this.form="",this.required=!1,this.getTag=e=>gr` this.handleTagRemove(t,e)} > ${e.getTextLabel()} `,this.handleDocumentFocusIn=e=>{const t=e.composedPath();this&&!t.includes(this)&&this.hide()},this.handleDocumentKeyDown=e=>{const t=e.target,r=t.closest(".select__clear")!==null,n=t.closest("sl-icon-button")!==null;if(!(r||n)){if(e.key==="Escape"&&this.open&&!this.closeWatcher&&(e.preventDefault(),e.stopPropagation(),this.hide(),this.displayInput.focus({preventScroll:!0})),e.key==="Enter"||e.key===" "&&this.typeToSelectString===""){if(e.preventDefault(),e.stopImmediatePropagation(),!this.open){this.show();return}this.currentOption&&!this.currentOption.disabled&&(this.valueHasChanged=!0,this.multiple?this.toggleOptionSelection(this.currentOption):this.setSelectedOptions(this.currentOption),this.updateComplete.then(()=>{this.emit("sl-input"),this.emit("sl-change")}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})));return}if(["ArrowUp","ArrowDown","Home","End"].includes(e.key)){const i=this.getAllOptions(),s=i.indexOf(this.currentOption);let o=Math.max(0,s);if(e.preventDefault(),!this.open&&(this.show(),this.currentOption))return;e.key==="ArrowDown"?(o=s+1,o>i.length-1&&(o=0)):e.key==="ArrowUp"?(o=s-1,o<0&&(o=i.length-1)):e.key==="Home"?o=0:e.key==="End"&&(o=i.length-1),this.setCurrentOption(i[o])}if(e.key&&e.key.length===1||e.key==="Backspace"){const i=this.getAllOptions();if(e.metaKey||e.ctrlKey||e.altKey)return;if(!this.open){if(e.key==="Backspace")return;this.show()}e.stopPropagation(),e.preventDefault(),clearTimeout(this.typeToSelectTimeout),this.typeToSelectTimeout=window.setTimeout(()=>this.typeToSelectString="",1e3),e.key==="Backspace"?this.typeToSelectString=this.typeToSelectString.slice(0,-1):this.typeToSelectString+=e.key.toLowerCase();for(const s of i)if(s.getTextLabel().toLowerCase().startsWith(this.typeToSelectString)){this.setCurrentOption(s);break}}}},this.handleDocumentMouseDown=e=>{const t=e.composedPath();this&&!t.includes(this)&&this.hide()}}get value(){return this._value}set value(e){this.multiple?e=Array.isArray(e)?e:e.split(" "):e=Array.isArray(e)?e.join(" "):e,this._value!==e&&(this.valueHasChanged=!0,this._value=e)}get validity(){return this.valueInput.validity}get validationMessage(){return this.valueInput.validationMessage}connectedCallback(){super.connectedCallback(),setTimeout(()=>{this.handleDefaultSlotChange()}),this.open=!1}addOpenListeners(){var e;document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().addEventListener("focusin",this.handleDocumentFocusIn),"CloseWatcher"in window&&((e=this.closeWatcher)==null||e.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>{this.open&&(this.hide(),this.displayInput.focus({preventScroll:!0}))})}removeOpenListeners(){var e;document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().removeEventListener("focusin",this.handleDocumentFocusIn),(e=this.closeWatcher)==null||e.destroy()}handleFocus(){this.hasFocus=!0,this.displayInput.setSelectionRange(0,0),this.emit("sl-focus")}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleLabelClick(){this.displayInput.focus()}handleComboboxMouseDown(e){const r=e.composedPath().some(n=>n instanceof Element&&n.tagName.toLowerCase()==="sl-icon-button");this.disabled||r||(e.preventDefault(),this.displayInput.focus({preventScroll:!0}),this.open=!this.open)}handleComboboxKeyDown(e){e.key!=="Tab"&&(e.stopPropagation(),this.handleDocumentKeyDown(e))}handleClearClick(e){e.stopPropagation(),this.valueHasChanged=!0,this.value!==""&&(this.setSelectedOptions([]),this.displayInput.focus({preventScroll:!0}),this.updateComplete.then(()=>{this.emit("sl-clear"),this.emit("sl-input"),this.emit("sl-change")}))}handleClearMouseDown(e){e.stopPropagation(),e.preventDefault()}handleOptionClick(e){const r=e.target.closest("sl-option"),n=this.value;r&&!r.disabled&&(this.valueHasChanged=!0,this.multiple?this.toggleOptionSelection(r):this.setSelectedOptions(r),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})),this.value!==n&&this.updateComplete.then(()=>{this.emit("sl-input"),this.emit("sl-change")}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))}handleDefaultSlotChange(){customElements.get("sl-option")||customElements.whenDefined("sl-option").then(()=>this.handleDefaultSlotChange());const e=this.getAllOptions(),t=this.valueHasChanged?this.value:this.defaultValue,r=Array.isArray(t)?t:[t],n=[];e.forEach(i=>n.push(i.value)),this.setSelectedOptions(e.filter(i=>r.includes(i.value)))}handleTagRemove(e,t){e.stopPropagation(),this.valueHasChanged=!0,this.disabled||(this.toggleOptionSelection(t,!1),this.updateComplete.then(()=>{this.emit("sl-input"),this.emit("sl-change")}))}getAllOptions(){return[...this.querySelectorAll("sl-option")]}getFirstOption(){return this.querySelector("sl-option")}setCurrentOption(e){this.getAllOptions().forEach(r=>{r.current=!1,r.tabIndex=-1}),e&&(this.currentOption=e,e.current=!0,e.tabIndex=0,e.focus())}setSelectedOptions(e){const t=this.getAllOptions(),r=Array.isArray(e)?e:[e];t.forEach(n=>n.selected=!1),r.length&&r.forEach(n=>n.selected=!0),this.selectionChanged()}toggleOptionSelection(e,t){t===!0||t===!1?e.selected=t:e.selected=!e.selected,this.selectionChanged()}selectionChanged(){var e,t,r;const n=this.getAllOptions();this.selectedOptions=n.filter(s=>s.selected);const i=this.valueHasChanged;if(this.multiple)this.value=this.selectedOptions.map(s=>s.value),this.placeholder&&this.value.length===0?this.displayLabel="":this.displayLabel=this.localize.term("numOptionsSelected",this.selectedOptions.length);else{const s=this.selectedOptions[0];this.value=(e=s?.value)!=null?e:"",this.displayLabel=(r=(t=s?.getTextLabel)==null?void 0:t.call(s))!=null?r:""}this.valueHasChanged=i,this.updateComplete.then(()=>{this.formControlController.updateValidity()})}get tags(){return this.selectedOptions.map((e,t)=>{if(tthis.handleTagRemove(n,e)}> ${typeof r=="string"?jat(r):r} `}else if(t===this.maxOptionsVisible)return gr`+${this.selectedOptions.length-t}`;return gr``})}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}handleDisabledChange(){this.disabled&&(this.open=!1,this.handleOpenChange())}attributeChangedCallback(e,t,r){if(super.attributeChangedCallback(e,t,r),e==="value"){const n=this.valueHasChanged;this.value=this.defaultValue,this.valueHasChanged=n}}handleValueChange(){if(!this.valueHasChanged){const r=this.valueHasChanged;this.value=this.defaultValue,this.valueHasChanged=r}const e=this.getAllOptions(),t=Array.isArray(this.value)?this.value:[this.value];this.setSelectedOptions(e.filter(r=>t.includes(r.value)))}async handleOpenChange(){if(this.open&&!this.disabled){this.setCurrentOption(this.selectedOptions[0]||this.getFirstOption()),this.emit("sl-show"),this.addOpenListeners(),await ck(this),this.listbox.hidden=!1,this.popup.active=!0,requestAnimationFrame(()=>{this.setCurrentOption(this.currentOption)});const{keyframes:e,options:t}=ok(this,"select.show",{dir:this.localize.dir()});await lk(this.popup.popup,e,t),this.currentOption&&Xot(this.currentOption,this.listbox,"vertical","auto"),this.emit("sl-after-show")}else{this.emit("sl-hide"),this.removeOpenListeners(),await ck(this);const{keyframes:e,options:t}=ok(this,"select.hide",{dir:this.localize.dir()});await lk(this.popup.popup,e,t),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sl-after-hide")}}async show(){if(this.open||this.disabled){this.open=!1;return}return this.open=!0,ak(this,"sl-after-show")}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.open=!1,ak(this,"sl-after-hide")}checkValidity(){return this.valueInput.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.valueInput.reportValidity()}setCustomValidity(e){this.valueInput.setCustomValidity(e),this.formControlController.updateValidity()}focus(e){this.displayInput.focus(e)}blur(){this.displayInput.blur()}render(){const e=this.hasSlotController.test("label"),t=this.hasSlotController.test("help-text"),r=this.label?!0:!!e,n=this.helpText?!0:!!t,i=this.clearable&&!this.disabled&&this.value.length>0,s=this.placeholder&&this.value&&this.value.length<=0;return gr`
    ${this.multiple?gr`
    ${this.tags}
    `:""} this.focus()} @invalid=${this.handleInvalid} /> ${i?gr` `:""}
    ${this.helpText}
    `}};Be.styles=[Fo,tB,Yot];Be.dependencies={"sl-icon":hs,"sl-popup":rr,"sl-tag":Rl};bt([Jn(".select")],Be.prototype,"popup",2);bt([Jn(".select__combobox")],Be.prototype,"combobox",2);bt([Jn(".select__display-input")],Be.prototype,"displayInput",2);bt([Jn(".select__value-input")],Be.prototype,"valueInput",2);bt([Jn(".select__listbox")],Be.prototype,"listbox",2);bt([pn()],Be.prototype,"hasFocus",2);bt([pn()],Be.prototype,"displayLabel",2);bt([pn()],Be.prototype,"currentOption",2);bt([pn()],Be.prototype,"selectedOptions",2);bt([pn()],Be.prototype,"valueHasChanged",2);bt([jt()],Be.prototype,"name",2);bt([pn()],Be.prototype,"value",1);bt([jt({attribute:"value"})],Be.prototype,"defaultValue",2);bt([jt({reflect:!0})],Be.prototype,"size",2);bt([jt()],Be.prototype,"placeholder",2);bt([jt({type:Boolean,reflect:!0})],Be.prototype,"multiple",2);bt([jt({attribute:"max-options-visible",type:Number})],Be.prototype,"maxOptionsVisible",2);bt([jt({type:Boolean,reflect:!0})],Be.prototype,"disabled",2);bt([jt({type:Boolean})],Be.prototype,"clearable",2);bt([jt({type:Boolean,reflect:!0})],Be.prototype,"open",2);bt([jt({type:Boolean})],Be.prototype,"hoist",2);bt([jt({type:Boolean,reflect:!0})],Be.prototype,"filled",2);bt([jt({type:Boolean,reflect:!0})],Be.prototype,"pill",2);bt([jt()],Be.prototype,"label",2);bt([jt({reflect:!0})],Be.prototype,"placement",2);bt([jt({attribute:"help-text"})],Be.prototype,"helpText",2);bt([jt({reflect:!0})],Be.prototype,"form",2);bt([jt({type:Boolean,reflect:!0})],Be.prototype,"required",2);bt([jt()],Be.prototype,"getTag",2);bt([cs("disabled",{waitUntilFirstUpdate:!0})],Be.prototype,"handleDisabledChange",1);bt([cs(["defaultValue","value"],{waitUntilFirstUpdate:!0})],Be.prototype,"handleValueChange",1);bt([cs("open",{waitUntilFirstUpdate:!0})],Be.prototype,"handleOpenChange",1);yB("select.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}});yB("select.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});Be.define("sl-select");var zat=ui` :host { display: block; user-select: none; -webkit-user-select: none; } :host(:focus) { outline: none; } .option { position: relative; display: flex; align-items: center; font-family: var(--sl-font-sans); font-size: var(--sl-font-size-medium); font-weight: var(--sl-font-weight-normal); line-height: var(--sl-line-height-normal); letter-spacing: var(--sl-letter-spacing-normal); color: var(--sl-color-neutral-700); padding: var(--sl-spacing-x-small) var(--sl-spacing-medium) var(--sl-spacing-x-small) var(--sl-spacing-x-small); transition: var(--sl-transition-fast) fill; cursor: pointer; } .option--hover:not(.option--current):not(.option--disabled) { background-color: var(--sl-color-neutral-100); color: var(--sl-color-neutral-1000); } .option--current, .option--current.option--disabled { background-color: var(--sl-color-primary-600); color: var(--sl-color-neutral-0); opacity: 1; } .option--disabled { outline: none; opacity: 0.5; cursor: not-allowed; } .option__label { flex: 1 1 auto; display: inline-block; line-height: var(--sl-line-height-dense); } .option .option__check { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; visibility: hidden; padding-inline-end: var(--sl-spacing-2x-small); } .option--selected .option__check { visibility: visible; } .option__prefix, .option__suffix { flex: 0 0 auto; display: flex; align-items: center; } .option__prefix::slotted(*) { margin-inline-end: var(--sl-spacing-x-small); } .option__suffix::slotted(*) { margin-inline-start: var(--sl-spacing-x-small); } @media (forced-colors: active) { :host(:hover:not([aria-disabled='true'])) .option { outline: dashed 1px SelectedItem; outline-offset: -1px; } } `,Oi=class extends hi{constructor(){super(...arguments),this.localize=new U0(this),this.isInitialized=!1,this.current=!1,this.selected=!1,this.hasHover=!1,this.value="",this.disabled=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","option"),this.setAttribute("aria-selected","false")}handleDefaultSlotChange(){this.isInitialized?customElements.whenDefined("sl-select").then(()=>{const e=this.closest("sl-select");e&&e.handleDefaultSlotChange()}):this.isInitialized=!0}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleSelectedChange(){this.setAttribute("aria-selected",this.selected?"true":"false")}handleValueChange(){typeof this.value!="string"&&(this.value=String(this.value)),this.value.includes(" ")&&(console.error("Option values cannot include a space. All spaces have been replaced with underscores.",this),this.value=this.value.replace(/ /g,"_"))}getTextLabel(){const e=this.childNodes;let t="";return[...e].forEach(r=>{r.nodeType===Node.ELEMENT_NODE&&(r.hasAttribute("slot")||(t+=r.textContent)),r.nodeType===Node.TEXT_NODE&&(t+=r.textContent)}),t.trim()}render(){return gr`
    `}};Oi.styles=[Fo,zat];Oi.dependencies={"sl-icon":hs};bt([Jn(".option__label")],Oi.prototype,"defaultSlot",2);bt([pn()],Oi.prototype,"current",2);bt([pn()],Oi.prototype,"selected",2);bt([pn()],Oi.prototype,"hasHover",2);bt([jt({reflect:!0})],Oi.prototype,"value",2);bt([jt({type:Boolean,reflect:!0})],Oi.prototype,"disabled",2);bt([cs("disabled")],Oi.prototype,"handleDisabledChange",1);bt([cs("selected")],Oi.prototype,"handleSelectedChange",1);bt([cs("value")],Oi.prototype,"handleValueChange",1);Oi.define("sl-option");/* @license Rollup.js v4.34.7 Fri, 14 Feb 2025 09:53:29 GMT - commit f9c52f80074e33f5b0799e8ca215e3bfac7d2755 https://github.com/rollup/rollup Released under the MIT License. */var uk,b2="4.34.7",hk={exports:{}};function Uat(){return uk||(uk=1,function(e){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=new Uint8Array(64),s=new Uint8Array(128);for(let $=0;$>>=1,H&&(I=-2147483648|-I),O+I}function a($,O,I){let M=O-I;M=M<0?-M<<1|1:M<<1;do{let q=31&M;M>>>=5,M>0&&(q|=32),$.write(i[q])}while(M>0);return O}function l($,O){return!($.pos>=O)&&$.peek()!==44}const c=16384,u=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode:$=>Buffer.from($.buffer,$.byteOffset,$.byteLength).toString()}:{decode($){let O="";for(let I=0;I<$.length;I++)O+=String.fromCharCode($[I]);return O}};class h{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(c)}write(O){const{buffer:I}=this;I[this.pos++]=O,this.pos===c&&(this.out+=u.decode(I),this.pos=0)}flush(){const{buffer:O,out:I,pos:M}=this;return M>0?I+u.decode(O.subarray(0,M)):I}}class d{constructor(O){this.pos=0,this.buffer=O}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(O){const{buffer:I,pos:M}=this,q=I.indexOf(O,M);return q===-1?I.length:q}}const g=[];function y($){const{length:O}=$,I=new d($),M=[],q=[];let H=0;for(;I.pos0&&I.write(44),M[0]=a(I,H,M[0]),a(I,G,0),a(I,T,0),a(I,q.length===6?1:0,0),q.length===6&&a(I,q[5],0);for(const U of N)a(I,U,0);for(O++;O<$.length;){const U=$[O],{0:J,1:W}=U;if(J>Y||J===Y&&W>=F)break;O=p($,O,I,M)}return I.write(44),M[0]=a(I,Y,M[0]),a(I,F,0),O}function m($){const{length:O}=$,I=new d($),M=[],q=[];let H=0,G=0,Y=0,F=0,T=0,N=0,U=0,J=0;do{const W=I.indexOf(";");let z=0;for(;I.posht;vt--){const Ct=U;U=o(I,U),J=o(I,U===Ct?J:0);const Dt=o(I,0);pt.push([Dt,U,J])}}else pt=[[ht]];lt.push(pt)}while(l(I,W))}et.bindings=lt,M.push(et),q.push(et)}H++,I.pos=W+1}while(I.pos0&&I.write(44),M[1]=a(I,q[1],M[1]),a(I,(q.length===6?1:0)|(N?2:0)|(T?4:0),0),q.length===6){const{4:J,5:W}=q;J!==M[2]&&(M[3]=0),M[2]=a(I,J,M[2]),M[3]=a(I,W,M[3])}if(N){const{0:J,1:W,2:z}=q.callsite;J!==M[4]?(M[5]=0,M[6]=0):W!==M[5]&&(M[6]=0),M[4]=a(I,J,M[4]),M[5]=a(I,W,M[5]),M[6]=a(I,z,M[6])}if(U)for(const J of U){J.length>1&&a(I,-J.length,0),a(I,J[0][0],0);let W=H,z=G;for(let V=1;VY||W===Y&&z>=F)break;O=w($,O,I,M)}return M[0]0&&O.write(59),Y.length===0)continue;let F=0;for(let T=0;T0&&O.write(44),F=a(O,N[0],F),N.length!==1&&(I=a(O,N[1],I),M=a(O,N[2],M),q=a(O,N[3],q),N.length!==4&&(H=a(O,N[4],H)))}}return O.flush()}e.decode=E,e.decodeGeneratedRanges=m,e.decodeOriginalScopes=y,e.encode=A,e.encodeGeneratedRanges=b,e.encodeOriginalScopes=f,Object.defineProperty(e,"__esModule",{value:!0})}(hk.exports)),hk.exports}var v2=Uat();class cg{constructor(t){this.bits=t instanceof cg?t.bits.slice():[]}add(t){this.bits[t>>5]|=1<<(31&t)}has(t){return!!(this.bits[t>>5]&1<<(31&t))}}let fk=class qv{constructor(t,r,n){this.start=t,this.end=r,this.original=n,this.intro="",this.outro="",this.content=n,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(t){this.outro+=t}appendRight(t){this.intro=this.intro+t}clone(){const t=new qv(this.start,this.end,this.original);return t.intro=this.intro,t.outro=this.outro,t.content=this.content,t.storeName=this.storeName,t.edited=this.edited,t}contains(t){return this.startglobalThis.btoa(unescape(encodeURIComponent(e))):typeof Buffer=="function"?e=>Buffer.from(e,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}const Wat=Vat();class G0{constructor(t){this.version=3,this.file=t.file,this.sources=t.sources,this.sourcesContent=t.sourcesContent,this.names=t.names,this.mappings=v2.encode(t.mappings),t.x_google_ignoreList!==void 0&&(this.x_google_ignoreList=t.x_google_ignoreList),t.debugId!==void 0&&(this.debugId=t.debugId)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+Wat(this.toString())}}function bB(e,t){const r=e.split(/[/\\]/),n=t.split(/[/\\]/);for(r.pop();r[0]===n[0];)r.shift(),n.shift();if(r.length){let i=r.length;for(;i--;)r[i]=".."}return r.concat(n).join("/")}const qat=Object.prototype.toString;function vB(e){return qat.call(e)==="[object Object]"}function Hv(e){const t=e.split(` `),r=[];for(let n=0,i=0;n>1;n=0&&s>o;){const c=[this.generatedCodeColumn,t,n.line,n.column];i>=0&&c.push(i),this.rawSegments.push(c),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,a=o,o=r.indexOf(` `,o+1)}const l=[this.generatedCodeColumn,t,n.line,n.column];i>=0&&l.push(i),this.rawSegments.push(l),this.advance(r.slice(a+1))}else this.pending&&(this.rawSegments.push(this.pending),this.advance(r));this.pending=null}addUneditedChunk(t,r,n,i,s){let o=r.start,a=!0,l=!1;for(;o1){for(let n=0;n{const o=i(s.start);s.intro.length&&n.advance(s.intro),s.edited?n.addEdit(0,s.content,o,s.storeName?r.indexOf(s.original):-1):n.addUneditedChunk(0,s,this.original,o,this.sourcemapLocations),s.outro.length&&n.advance(s.outro)}),{file:t.file?t.file.split(/[/\\]/).pop():void 0,sources:[t.source?bB(t.file||"",t.source):t.file||""],sourcesContent:t.includeContent?[this.original]:void 0,names:r,mappings:n.raw,x_google_ignoreList:this.ignoreList?[0]:void 0}}generateMap(t){return new G0(this.generateDecodedMap(t))}_ensureindentStr(){this.indentStr===void 0&&(this.indentStr=function(t){const r=t.split(` `),n=r.filter(o=>/^\t+/.test(o)),i=r.filter(o=>/^ {2,}/.test(o));if(n.length===0&&i.length===0)return null;if(n.length>=i.length)return" ";const s=i.reduce((o,a)=>{const l=/^ +/.exec(a)[0].length;return Math.min(l,o)},1/0);return new Array(s+1).join(" ")}(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),this.indentStr===null?" ":this.indentStr}indent(t,r){const n=/^[^\r\n]/gm;if(vB(t)&&(r=t,t=void 0),t===void 0&&(this._ensureindentStr(),t=this.indentStr||" "),t==="")return this;const i={};(r=r||{}).exclude&&(typeof r.exclude[0]=="number"?[r.exclude]:r.exclude).forEach(c=>{for(let u=c[0];us?`${t}${c}`:(s=!0,c);this.intro=this.intro.replace(n,o);let a=0,l=this.firstChunk;for(;l;){const c=l.end;if(l.edited)i[a]||(l.content=l.content.replace(n,o),l.content.length&&(s=l.content[l.content.length-1]===` `));else for(a=l.start;a=t&&n<=r)throw new Error("Cannot move a selection inside itself");this._split(t),this._split(r),this._split(n);const i=this.byStart[t],s=this.byEnd[r],o=i.previous,a=s.next,l=this.byStart[n];if(!l&&s===this.lastChunk)return this;const c=l?l.previous:this.lastChunk;return o&&(o.next=a),a&&(a.previous=o),c&&(c.next=i),l&&(l.previous=s),i.previous||(this.firstChunk=s.next),s.next||(this.lastChunk=i.previous,this.lastChunk.next=null),i.previous=c,s.next=l||null,c||(this.firstChunk=i),l||(this.lastChunk=s),this}overwrite(t,r,n,i){return i=i||{},this.update(t,r,n,{...i,overwrite:!i.contentOnly})}update(t,r,n,i){if(t+=this.offset,r+=this.offset,typeof n!="string")throw new TypeError("replacement content must be a string");if(this.original.length!==0){for(;t<0;)t+=this.original.length;for(;r<0;)r+=this.original.length}if(r>this.original.length)throw new Error("end is out of bounds");if(t===r)throw new Error("Cannot overwrite a zero-length range – use appendLeft or prependRight instead");this._split(t),this._split(r),i===!0&&(oc.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),oc.storeName=!0),i={storeName:!0});const s=i!==void 0&&i.storeName,o=i!==void 0&&i.overwrite;if(s){const c=this.original.slice(t,r);Object.defineProperty(this.storedNames,c,{writable:!0,value:!0,enumerable:!0})}const a=this.byStart[t],l=this.byEnd[r];if(a){let c=a;for(;c!==l;){if(c.next!==this.byStart[c.end])throw new Error("Cannot overwrite across a split point");c=c.next,c.edit("",!1)}a.edit(n,s,!o)}else{const c=new fk(t,r,"").edit(n,s);l.next=c,c.previous=l}return this}prepend(t){if(typeof t!="string")throw new TypeError("outro content must be a string");return this.intro=t+this.intro,this}prependLeft(t,r){if(t+=this.offset,typeof r!="string")throw new TypeError("inserted content must be a string");this._split(t);const n=this.byEnd[t];return n?n.prependLeft(r):this.intro=r+this.intro,this}prependRight(t,r){if(t+=this.offset,typeof r!="string")throw new TypeError("inserted content must be a string");this._split(t);const n=this.byStart[t];return n?n.prependRight(r):this.outro=r+this.outro,this}remove(t,r){if(t+=this.offset,r+=this.offset,this.original.length!==0){for(;t<0;)t+=this.original.length;for(;r<0;)r+=this.original.length}if(t===r)return this;if(t<0||r>this.original.length)throw new Error("Character is out of bounds");if(t>r)throw new Error("end must be greater than start");this._split(t),this._split(r);let n=this.byStart[t];for(;n;)n.intro="",n.outro="",n.edit(""),n=r>n.end?this.byStart[n.end]:null;return this}reset(t,r){if(t+=this.offset,r+=this.offset,this.original.length!==0){for(;t<0;)t+=this.original.length;for(;r<0;)r+=this.original.length}if(t===r)return this;if(t<0||r>this.original.length)throw new Error("Character is out of bounds");if(t>r)throw new Error("end must be greater than start");this._split(t),this._split(r);let n=this.byStart[t];for(;n;)n.reset(),n=r>n.end?this.byStart[n.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let t=this.lastChunk;do{if(t.outro.length)return t.outro[t.outro.length-1];if(t.content.length)return t.content[t.content.length-1];if(t.intro.length)return t.intro[t.intro.length-1]}while(t=t.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let t=this.outro.lastIndexOf(gh);if(t!==-1)return this.outro.substr(t+1);let r=this.outro,n=this.lastChunk;do{if(n.outro.length>0){if(t=n.outro.lastIndexOf(gh),t!==-1)return n.outro.substr(t+1)+r;r=n.outro+r}if(n.content.length>0){if(t=n.content.lastIndexOf(gh),t!==-1)return n.content.substr(t+1)+r;r=n.content+r}if(n.intro.length>0){if(t=n.intro.lastIndexOf(gh),t!==-1)return n.intro.substr(t+1)+r;r=n.intro+r}}while(n=n.previous);return t=this.intro.lastIndexOf(gh),t!==-1?this.intro.substr(t+1)+r:this.intro+r}slice(t=0,r=this.original.length-this.offset){if(t+=this.offset,r+=this.offset,this.original.length!==0){for(;t<0;)t+=this.original.length;for(;r<0;)r+=this.original.length}let n="",i=this.firstChunk;for(;i&&(i.start>t||i.end<=t);){if(i.start=r)return n;i=i.next}if(i&&i.edited&&i.start!==t)throw new Error(`Cannot use replaced character ${t} as slice start anchor.`);const s=i;for(;i;){!i.intro||s===i&&i.start!==t||(n+=i.intro);const o=i.start=r;if(o&&i.edited&&i.end!==r)throw new Error(`Cannot use replaced character ${r} as slice end anchor.`);const a=s===i?t-i.start:0,l=o?i.content.length+r-i.end:i.content.length;if(n+=i.content.slice(a,l),!i.outro||o&&i.end!==r||(n+=i.outro),o)break;i=i.next}return n}snip(t,r){const n=this.clone();return n.remove(0,t),n.remove(r,n.original.length),n}_split(t){if(this.byStart[t]||this.byEnd[t])return;let r=this.lastSearchedChunk;const n=t>r.end;for(;r;){if(r.contains(t))return this._splitChunk(r,t);r=n?this.byStart[r.end]:this.byEnd[r.start]}}_splitChunk(t,r){if(t.edited&&t.content.length){const i=Hv(this.original)(r);throw new Error(`Cannot split a chunk that has already been edited (${i.line}:${i.column} – "${t.original}")`)}const n=t.split(r);return this.byEnd[r]=t,this.byStart[r]=n,this.byEnd[n.end]=n,t===this.lastChunk&&(this.lastChunk=n),this.lastSearchedChunk=t,!0}toString(){let t=this.intro,r=this.firstChunk;for(;r;)t+=r.toString(),r=r.next;return t+this.outro}isEmpty(){let t=this.firstChunk;do if(t.intro.length&&t.intro.trim()||t.content.length&&t.content.trim()||t.outro.length&&t.outro.trim())return!1;while(t=t.next);return!0}length(){let t=this.firstChunk,r=0;do r+=t.intro.length+t.content.length+t.outro.length;while(t=t.next);return r}trimLines(){return this.trim("[\\r\\n]")}trim(t){return this.trimStart(t).trimEnd(t)}trimEndAborted(t){const r=new RegExp((t||"\\s")+"+$");if(this.outro=this.outro.replace(r,""),this.outro.length)return!0;let n=this.lastChunk;do{const i=n.end,s=n.trimEnd(r);if(n.end!==i&&(this.lastChunk===n&&(this.lastChunk=n.next),this.byEnd[n.end]=n,this.byStart[n.next.start]=n.next,this.byEnd[n.next.end]=n.next),s)return!0;n=n.previous}while(n);return!1}trimEnd(t){return this.trimEndAborted(t),this}trimStartAborted(t){const r=new RegExp("^"+(t||"\\s")+"+");if(this.intro=this.intro.replace(r,""),this.intro.length)return!0;let n=this.firstChunk;do{const i=n.end,s=n.trimStart(r);if(n.end!==i&&(n===this.lastChunk&&(this.lastChunk=n.next),this.byEnd[n.end]=n,this.byStart[n.next.start]=n.next,this.byEnd[n.next.end]=n.next),s)return!0;n=n.next}while(n);return!1}trimStart(t){return this.trimStartAborted(t),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(t,r){function n(i,s){return typeof r=="string"?r.replace(/\$(\$|&|\d+)/g,(o,a)=>a==="$"?"$":a==="&"?i[0]:+a{if(i.index!=null){const s=n(i,this.original);s!==i[0]&&this.overwrite(i.index,i.index+i[0].length,s)}});else{const i=this.original.match(t);if(i&&i.index!=null){const s=n(i,this.original);s!==i[0]&&this.overwrite(i.index,i.index+i[0].length,s)}}return this}_replaceString(t,r){const{original:n}=this,i=n.indexOf(t);return i!==-1&&this.overwrite(i,i+t.length,r),this}replace(t,r){return typeof t=="string"?this._replaceString(t,r):this._replaceRegexp(t,r)}_replaceAllString(t,r){const{original:n}=this,i=t.length;for(let s=n.indexOf(t);s!==-1;s=n.indexOf(t,s+i))n.slice(s,s+i)!==r&&this.overwrite(s,s+i,r);return this}replaceAll(t,r){if(typeof t=="string")return this._replaceAllString(t,r);if(!t.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(t,r)}}const dk=Object.prototype.hasOwnProperty;let Gat=class xB{constructor(t={}){this.intro=t.intro||"",this.separator=t.separator!==void 0?t.separator:` `,this.sources=[],this.uniqueSources=[],this.uniqueSourceIndexByFilename={}}addSource(t){if(t instanceof wl)return this.addSource({content:t,filename:t.filename,separator:this.separator});if(!vB(t)||!t.content)throw new Error("bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`");if(["filename","ignoreList","indentExclusionRanges","separator"].forEach(r=>{dk.call(t,r)||(t[r]=t.content[r])}),t.separator===void 0&&(t.separator=this.separator),t.filename)if(dk.call(this.uniqueSourceIndexByFilename,t.filename)){const r=this.uniqueSources[this.uniqueSourceIndexByFilename[t.filename]];if(t.content.original!==r.content)throw new Error(`Illegal source: same filename (${t.filename}), different contents`)}else this.uniqueSourceIndexByFilename[t.filename]=this.uniqueSources.length,this.uniqueSources.push({filename:t.filename,content:t.content.original});return this.sources.push(t),this}append(t,r){return this.addSource({content:new wl(t),separator:r&&r.separator||""}),this}clone(){const t=new xB({intro:this.intro,separator:this.separator});return this.sources.forEach(r=>{t.addSource({filename:r.filename,content:r.content.clone(),separator:r.separator})}),t}generateDecodedMap(t={}){const r=[];let n;this.sources.forEach(s=>{Object.keys(s.content.storedNames).forEach(o=>{~r.indexOf(o)||r.push(o)})});const i=new wB(t.hires);return this.intro&&i.advance(this.intro),this.sources.forEach((s,o)=>{o>0&&i.advance(this.separator);const a=s.filename?this.uniqueSourceIndexByFilename[s.filename]:-1,l=s.content,c=Hv(l.original);l.intro&&i.advance(l.intro),l.firstChunk.eachNext(u=>{const h=c(u.start);u.intro.length&&i.advance(u.intro),s.filename?u.edited?i.addEdit(a,u.content,h,u.storeName?r.indexOf(u.original):-1):i.addUneditedChunk(a,u,l.original,h,l.sourcemapLocations):i.advance(u.content),u.outro.length&&i.advance(u.outro)}),l.outro&&i.advance(l.outro),s.ignoreList&&a!==-1&&(n===void 0&&(n=[]),n.push(a))}),{file:t.file?t.file.split(/[/\\]/).pop():void 0,sources:this.uniqueSources.map(s=>t.file?bB(t.file,s.filename):s.filename),sourcesContent:this.uniqueSources.map(s=>t.includeContent?s.content:null),names:r,mappings:i.raw,x_google_ignoreList:n}}generateMap(t){return new G0(this.generateDecodedMap(t))}getIndentString(){const t={};return this.sources.forEach(r=>{const n=r.content._getRawIndentString();n!==null&&(t[n]||(t[n]=0),t[n]+=1)}),Object.keys(t).sort((r,n)=>t[r]-t[n])[0]||" "}indent(t){if(arguments.length||(t=this.getIndentString()),t==="")return this;let r=!this.intro||this.intro.slice(-1)===` `;return this.sources.forEach((n,i)=>{const s=n.separator!==void 0?n.separator:this.separator,o=r||i>0&&/\r?\n$/.test(s);n.content.indent(t,{exclude:n.indentExclusionRanges,indentStart:o}),r=n.content.lastChar()===` `}),this.intro&&(this.intro=t+this.intro.replace(/^[^\n]/gm,(n,i)=>i>0?t+n:n)),this}prepend(t){return this.intro=t+this.intro,this}toString(){const t=this.sources.map((r,n)=>{const i=r.separator!==void 0?r.separator:this.separator;return(n>0?i:"")+r.content.toString()}).join("");return this.intro+t}isEmpty(){return(!this.intro.length||!this.intro.trim())&&!this.sources.some(t=>!t.content.isEmpty())}length(){return this.sources.reduce((t,r)=>t+r.content.length(),this.intro.length)}trimLines(){return this.trim("[\\r\\n]")}trim(t){return this.trimStart(t).trimEnd(t)}trimStart(t){const r=new RegExp("^"+(t||"\\s")+"+");if(this.intro=this.intro.replace(r,""),!this.intro){let n,i=0;do if(n=this.sources[i++],!n)break;while(!n.content.trimStartAborted(t))}return this}trimEnd(t){const r=new RegExp((t||"\\s")+"+$");let n,i=this.sources.length-1;do if(n=this.sources[i--],!n){this.intro=this.intro.replace(r,"");break}while(!n.content.trimEndAborted(t));return this}};const Yat=/^(?:\/|(?:[A-Za-z]:)?[/\\|])/,Kat=/^\.?\.\//,Xat=/\\/g,Mc=/[/\\]/,Jat=/\.[^.]+$/;function ma(e){return Yat.test(e)}function w2(e){return Kat.test(e)}function od(e){return e.replace(Xat,"/")}function xo(e){return e.split(Mc).pop()||""}function xl(e){const t=/[/\\][^/\\]*$/.exec(e);return t?e.slice(0,-t[0].length)||"/":"."}function Qo(e){const t=Jat.exec(xo(e));return t?t[0]:""}function _l(e,t){const r=e.split(Mc).filter(Boolean),n=t.split(Mc).filter(Boolean);for(r[0]==="."&&r.shift(),n[0]==="."&&n.shift();r[0]&&n[0]&&r[0]===n[0];)r.shift(),n.shift();for(;n[0]===".."&&r.length>0;)n.shift(),r.pop();for(;r.pop();)n.unshift("..");return n.join("/")}function rs(...e){const t=e.shift();if(!t)return"/";let r=t.split(Mc);for(const n of e)if(ma(n))r=n.split(Mc);else{const i=n.split(Mc);for(;i[0]==="."||i[0]==="..";)i.shift()===".."&&r.pop();r.push(...i)}return r.join("/")}function Tu(e,t,r,n){t.remove(r,n),e.removeAnnotations(t)}const el={isNoStatement:!0};function Nr(e,t,r=0){let n,i;for(n=e.indexOf(t,r);;){if((r=e.indexOf("/",r))===-1||r>=n)return n;i=e.charCodeAt(++r),++r,(r=i===47?e.indexOf(` `,r)+1:e.indexOf("*/",r)+2)>n&&(n=e.indexOf(t,r))}}const pk=/\S/g;function ga(e,t){return pk.lastIndex=t,pk.exec(e).index}const Zat=/\s/;function kf(e){let t,r,n=0;for(t=e.indexOf(` `,n);;){if(n=e.indexOf("/",n),n===-1||n>t)return[t,t+1];if(r=e.charCodeAt(n+1),r===47)return[n,t+1];n=e.indexOf("*/",n+2)+2,n>t&&(t=e.indexOf(` `,n))}}function ad(e,t,r,n,i){let s,o,a,l,c=e[0],u=!c.included||c.needsBoundaries;u&&(l=r+kf(t.original.slice(r,c.start))[1]);for(let h=1;h<=e.length;h++)s=c,o=l,a=u,c=e[h],u=c!==void 0&&(!c.included||c.needsBoundaries),a||u?(l=s.end+kf(t.original.slice(s.end,c===void 0?n:c.start))[1],s.included?a?s.render(t,i,{end:l,start:o}):s.render(t,i):Tu(s,t,o,l)):s.render(t,i)}function Y0(e,t,r,n){const i=[];let s,o,a,l,c=r-1;for(const u of e){for(s!==void 0&&(c=s.end+Nr(t.original.slice(s.end,u.start),",")),o=a=c+1+kf(t.original.slice(c+1,u.start))[1];l=t.original.charCodeAt(o),l===32||l===9||l===10||l===13;)o++;s!==void 0&&i.push({contentEnd:a,end:o,node:s,separator:c,start:r}),s=u,r=o}return i.push({contentEnd:n,end:n,node:s,separator:null,start:r}),i}function K0(e,t,r){for(;;){const[n,i]=kf(e.original.slice(t,r));if(n===-1)break;e.remove(t+n,t+=i)}}function Nl(e,{exportNamesByVariable:t,snippets:{_:r,getObject:n,getPropertyAccess:i}},s=""){if(e.length===1&&t.get(e[0]).length===1){const o=e[0];return`exports(${JSON.stringify(t.get(o)[0])},${r}${o.getName(i)}${s})`}{const o=[];for(const a of e)for(const l of t.get(a))o.push([l,a.getName(i)+s]);return`exports(${n(o,{lineBreakIndent:null})})`}}function x2(e,t,r,n,{exportNamesByVariable:i,snippets:{_:s}}){n.prependRight(t,`exports(${JSON.stringify(i.get(e)[0])},${s}`),n.appendLeft(r,")")}function _B(e,t,r,n,i,s){const{_:o,getPropertyAccess:a}=s.snippets;i.appendLeft(r,`,${o}${Nl([e],s)},${o}${e.getName(a)}`),n&&(i.prependRight(t,"("),i.appendLeft(r,")"))}const Kr=Object.freeze(Object.create(null)),Yr=Object.freeze({}),lr=Object.freeze([]),SB=Object.freeze(new class extends Set{add(){throw new Error("Cannot add to empty set")}});function ai(e,t,r){const n=e.get(t);if(n!==void 0)return n;const i=r();return e.set(t,i),i}function Sl(){return new Set}function mk(){return[]}const pe=Symbol("Unknown Key"),ug=Symbol("Unknown Non-Accessor Key"),cu=Symbol("Unknown Integer"),_2=Symbol("Symbol.toStringTag"),Bt=[],It=[pe],Qat=[ug],Gv=[cu],jc=Symbol("Entities");class uu{constructor(){this.entityPaths=Object.create(null,{[jc]:{value:new Set}})}trackEntityAtPathAndGetIfTracked(t,r){const n=this.getEntities(t);return!!n.has(r)||(n.add(r),!1)}withTrackedEntityAtPath(t,r,n,i){const s=this.getEntities(t);if(s.has(r))return i;s.add(r);const o=n();return s.delete(r),o}getEntities(t){let r=this.entityPaths;for(const n of t)r=r[n]||=Object.create(null,{[jc]:{value:new Set}});return r[jc]}}const Qe=new uu;class gk{constructor(){this.entityPaths=Object.create(null,{[jc]:{value:new Map}})}trackEntityAtPathAndGetIfTracked(t,r,n){let i=this.entityPaths;for(const o of t)i=i[o]||=Object.create(null,{[jc]:{value:new Map}});const s=ai(i[jc],r,Sl);return!!s.has(n)||(s.add(n),!1)}}const tlt=Object.freeze({[pe]:Yr});class elt{constructor(){this.includedPaths=null}includePathAndGetIfIncluded(t){let r=!0,n=this,i="includedPaths",s=this.includedPaths||=(r=!1,Object.create(null));for(const o of t){if(s[pe])return!0;if(typeof o=="symbol")return n[i]=tlt,!1;n=s,i=o,s=s[o]||=(r=!1,Object.create(null))}return r}}const rlt=Object.freeze({[pe]:!0});class nlt{constructor(){this.includedPaths=null}includePathAndGetIfIncluded(t){let r=!0;const n=this.includedPaths||=(r=!1,Object.create(null));if(n[pe])return!0;const[i,s]=t;return i?typeof i=="symbol"?(this.includedPaths=rlt,!1):s?n[i]===pe||(n[i]=pe,!1):!!n[i]||(n[i]=!0,!1):r}includeAllPaths(t,r,n){const{includedPaths:i}=this;if(i)if(i[pe])t.includePath([...n,pe],r);else{const s=Object.entries(i);if(s.length===0)t.includePath(n,r);else for(const[o,a]of s)t.includePath(a===pe?[...n,o,pe]:[...n,o],r)}}}function EB(e,t){if(e.type==="MemberExpression")return!e.computed&&EB(e.object,e);if(e.type!=="Identifier")return!1;switch(t?.type){case"MemberExpression":return t.computed||e===t.object;case"MethodDefinition":return t.computed;case"MetaProperty":return t.meta===e;case"PropertyDefinition":case"Property":return t.computed||e===t.value;case"ExportSpecifier":case"ImportSpecifier":return e===t.local;case"LabeledStatement":case"BreakStatement":case"ContinueStatement":return!1;default:return!0}}function Xi(){return{brokenFlow:!1,hasBreak:!1,hasContinue:!1,includedCallArguments:new Set,includedLabels:new Set}}function Ll(){return{accessed:new uu,assigned:new uu,brokenFlow:!1,called:new gk,hasBreak:!1,hasContinue:!1,ignore:{breaks:!1,continues:!1,labels:new Set,returnYield:!1,this:!1},includedLabels:new Set,instantiated:new gk,replacedVariableInits:new Map}}function Ge(e,t){return!!(e&t)}function Ye(e,t,r){return e&~t|-r&t}const $e=Symbol("Unknown Value"),S2=Symbol("Unknown Truthy Value"),E2=Symbol("Unknown Falsy Value");class di{constructor(){this.flags=0}get included(){return Ge(this.flags,1)}set included(t){this.flags=Ye(this.flags,1,t)}deoptimizeArgumentsOnInteractionAtPath(t,r,n){ya(t)}deoptimizePath(t){}getLiteralValueAtPath(t,r,n){return $e}getReturnExpressionWhenCalledAtPath(t,r,n,i){return Tr}hasEffectsOnInteractionAtPath(t,r,n){return!0}include(t,r,n){this.included||this.includeNode(t)}includeNode(t){this.included=!0}includePath(t,r){this.included||this.includeNode(r)}includeCallArguments(t,r){C2(t,r)}shouldBeIncluded(t){return!0}}const me=new class extends di{},Tr=[me,!1],ya=e=>{for(const t of e.args)t?.deoptimizePath(It)},C2=({args:e},t)=>{e[0]?.includePath(It,t);for(let r=1;r{const d=a+u.length+1,g={start:a,end:d,line:h};return a=d,g});let c=0;return function(u,h){if(typeof u=="string"&&(u=n.indexOf(u,h??0)),u===-1)return;let d=l[c];const g=u>=d.end?1:-1;for(;d;){if(ilt(d,u))return{line:s+d.line,column:o+u-d.start,character:u};c+=g,d=l[c]}}}(e,r)(t,r&&r.startIndex)}function Bb(e){return e.replace(/^\t+/,t=>t.split(" ").join(" "))}const slt="...";function TB(e,t,r){let n=e.split(` `);if(t>n.length)return"";const i=Math.max(Bb(n[t-1].slice(0,r)).length+10+3,120),s=Math.max(0,t-3);let o=Math.min(t+2,n.length);for(n=n.slice(s,o);!/\S/.test(n[n.length-1]);)n.pop(),o-=1;const a=String(o).length;return n.map((l,c)=>{const u=s+c+1===t;let h=String(c+s+1);for(;h.lengthi&&(d=`${d.slice(0,i-3)}${slt}`),u){const g=function(y){let f="";for(;y--;)f+=" ";return f}(a+2+Bb(l.slice(0,r)).length)+"^";return`${h}: ${d} ${g}`}return`${h}: ${d}`}).join(` `)}const olt="silent",oe="warn",rl="info",cd="debug",nl={[cd]:0,[rl]:1,[olt]:3,[oe]:2};function _o(e,t){const r=e.length<=1,n=e.map(s=>`"${s}"`);let i=r?n[0]:`${n.slice(0,-1).join(", ")} and ${n.slice(-1)[0]}`;return t&&(i+=` ${r?t[0]:t[1]}`),i}function Yv(e){const t=xo(e);return t.slice(0,Math.max(0,t.length-Qo(e).length))}function le(e){return ma(e)?_l(rs(),e):e}function fg(e){return e[0]==="/"||e[0]==="."&&(e[1]==="/"||e[1]===".")||ma(e)}const alt=/^(\.\.\/)*\.\.$/;function PB(e,t,r,n){for(;t.startsWith("../");)t=t.slice(3),e="_/"+e;let i=od(_l(xl(e),t));if(r&&i.endsWith(".js")&&(i=i.slice(0,-3)),n){if(i==="")return"../"+xo(t);if(alt.test(i))return[...i.split("/"),"..",xo(t)].join("/")}return i?i.startsWith("..")?i:"./"+i:"."}function Dr(e){return`https://rollupjs.org/${e}`}const FB="troubleshooting/#error-name-is-not-exported-by-module",Jp="configuration-options/#jsx",OB="configuration-options/#output-amd-id",Df="configuration-options/#output-dir",D2="configuration-options/#output-exports",IB="configuration-options/#output-format",$B="configuration-options/#output-inlinedynamicimports",T2="configuration-options/#output-interop",yk="configuration-options/#output-manualchunks",bk="configuration-options/#output-name",llt="configuration-options/#output-sourcemapfile",kc="plugin-development/#generatebundle";function Pt(e){throw e instanceof Error?e:Tf(e)}function Tf(e){BB(e);const t=Object.assign(new Error(e.message),e);return Object.defineProperty(t,"name",{value:"RollupError",writable:!0}),t}function dg(e,t,r,n){if(typeof t=="object"){const{line:i,column:s}=t;e.loc={column:s,file:n,line:i}}else{e.pos=t;const i=k2(r,t,{offsetLine:1});if(!i)return;const{line:s,column:o}=i;e.loc={column:o,file:n,line:s}}if(e.frame===void 0){const{line:i,column:s}=e.loc;e.frame=TB(r,i,s)}}const vk=Symbol("augmented");function BB(e){if(!e.plugin&&!e.loc||e[vk])return;e[vk]=!0;let t="";e.plugin&&(t+=`[plugin ${e.plugin}] `);const r=e.id||e.loc?.file;if(r){const i=e.loc?` (${e.loc.line}:${e.loc.column})`:"";t+=`${le(r)}${i}: `}const n=e.message;e.message=t+e.message,qB(e,n)}const RB="INVALID_EXPORT_OPTION",NB="INVALID_IMPORT_ATTRIBUTE",LB="INVALID_PLUGIN_HOOK",MB="MISSING_EXPORT",Kv="MISSING_IMPLICIT_DEPENDANT",wk="MISSING_NAME_OPTION_FOR_IIFE_EXPORT",jB="PARSE_ERROR",zB="SOURCEMAP_BROKEN",UB="UNEXPECTED_NAMED_IMPORT",xk="UNRESOLVED_ENTRY",_k="UNRESOLVED_IMPORT";function VB(e){return{code:"CANNOT_CALL_NAMESPACE",message:`Cannot call a namespace ("${e}").`}}function clt({fileName:e,code:t},{pos:r,message:n}){const i={code:"CHUNK_INVALID",message:`Chunk "${e}" is not valid JavaScript: ${n}.`};return dg(i,r,t,e),i}function ult(e){return{code:"CIRCULAR_DEPENDENCY",ids:e,message:`Circular dependency: ${e.map(le).join(" -> ")}`}}function hlt(e,t,{line:r,column:n}){return{code:"FIRST_SIDE_EFFECT",message:`First side effect in ${le(t)} is at (${r}:${n}) ${TB(e,r,n)}`}}function WB(e,t){return{code:"ILLEGAL_REASSIGNMENT",message:`Illegal reassignment of import "${e}" in "${le(t)}".`}}function Zp(e,t,r,n){return{code:"INCONSISTENT_IMPORT_ATTRIBUTES",message:`Module "${le(n)}" tried to import "${le(r)}" with ${Sk(t)} attributes, but it was already imported elsewhere with ${Sk(e)} attributes. Please ensure that import attributes for the same module are always consistent.`}}const Sk=e=>{const t=Object.entries(e);return t.length===0?"no":t.map(([r,n])=>`"${r}": "${n}"`).join(", ")};function flt(e,t,r){return{code:"INVALID_ANNOTATION",id:t,message:`A comment "${e}" in "${le(t)}" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.`,url:Dr(r==="noSideEffects"?"configuration-options/#no-side-effects":"configuration-options/#pure")}}function qB(e,t){return e.stack&&(e.stack=e.stack.replace(t,e.message)),e}function Ek(e,t,r){return{code:RB,message:`"${e}" was specified for "output.exports", but entry module "${le(r)}" has the following exports: ${_o(t)}`,url:Dr(D2)}}function Ck(e){return{code:NB,message:`Rollup could not statically analyze an import attribute of a dynamic import in "${le(e)}". Import attributes need to have string keys and values. The attribute will be removed.`}}function vr(e,t,r,n){return{code:"INVALID_OPTION",message:`Invalid value ${n===void 0?"":`${JSON.stringify(n)} `}for option "${e}" - ${r}.`,url:Dr(t)}}function pg(e,t,r){const n=Qo(r)===".json";return{binding:e,code:MB,exporter:r,id:t,message:`"${e}" is not exported by "${le(r)}", imported by "${le(t)}".${n?" (Note that you need @rollup/plugin-json to import JSON files)":""}`,url:Dr(FB)}}function dlt(e){const t=[...e.implicitlyLoadedBefore].map(r=>le(r.id)).sort();return{code:Kv,message:`Module "${le(e.id)}" that should be implicitly loaded before ${_o(t)} is not included in the module graph. Either it was not imported by an included module or only via a tree-shaken dynamic import, or no imported bindings were used and it had otherwise no side-effects.`}}function Ak(e,t,r){return{code:"OPTIMIZE_CHUNK_STATUS",message:`${r}, there are ${e} chunks, of which ${t} are below minChunkSize.`}}function mg(e,t){return{code:jB,message:e,pos:t}}function Pu(e){return{code:"REDECLARATION_ERROR",message:`Identifier "${e}" has already been declared`}}function HB(e){return{code:"RESERVED_NAMESPACE",message:`You have overided reserved namespace "${e}"`}}function P2(e,t){let r=e.message.replace(/ \(\d+:\d+\)$/,"");return t.endsWith(".json")?r+=" (Note that you need @rollup/plugin-json to import JSON files)":t.endsWith(".js")||(r+=" (Note that you need plugins to import files that are not JavaScript)"),qB({cause:e,code:jB,id:t,message:r,stack:e.stack},e.message)}function Pf(e,t,{hook:r,id:n}={}){const i=e.code;return e.pluginCode||i==null||typeof i=="string"&&i.startsWith("PLUGIN_")||(e.pluginCode=i),e.code="PLUGIN_ERROR",e.plugin=t,r&&(e.hook=r),n&&(e.id=n),e}function plt(e){return{code:zB,message:`Multiple conflicting contents for sourcemap source ${e}`}}function kk(e,t,r){const n=r?"reexport":"import";return{code:UB,exporter:e,message:`The named export "${t}" was ${n}ed from the external module "${le(e)}" even though its interop type is "defaultOnly". Either remove or change this ${n} or change the value of the "output.interop" option.`,url:Dr(T2)}}function mlt(e){return{code:UB,exporter:e,message:`There was a namespace "*" reexport from the external module "${le(e)}" even though its interop type is "defaultOnly". This will be ignored as namespace reexports only reexport named exports. If this is not intended, either remove or change this reexport or change the value of the "output.interop" option.`,url:Dr(T2)}}function qn(e){return{code:"VALIDATION_ERROR",message:e}}function Qa(e,t,r,n,i){(function(s,o,a,l,c){if(a||c){const u=function(h,d){return{code:"DEPRECATED_FEATURE",message:h,url:Dr(d)}}(s,o);if(c)return Pt(u);l(oe,u)}})(e,t,r,n.onLog,n.strictDeprecations)}const Xv=Symbol("PureFunction");class Ml extends di{markReassigned(){this.isReassigned=!0}constructor(t){super(),this.name=t,this.alwaysRendered=!1,this.forbiddenNames=null,this.globalName=null,this.initReached=!1,this.isId=!1,this.kind=null,this.renderBaseName=null,this.renderName=null,this.isReassigned=!1,this.onlyFunctionCallUsed=!0}addReference(t){}getOnlyFunctionCallUsed(){return this.onlyFunctionCallUsed}addUsedPlace(t){t.parent.type===X0&&t.parent.callee===t||t.parent.type===AB||(this.onlyFunctionCallUsed=!1)}forbidName(t){(this.forbiddenNames||=new Set).add(t)}getBaseVariableName(){return this.renderedLikeHoisted?.getBaseVariableName()||this.renderBaseName||this.renderName||this.name}getName(t,r){if(this.globalName)return this.globalName;if(r?.(this))return this.name;if(this.renderedLikeHoisted)return this.renderedLikeHoisted.getName(t,r);const n=this.renderName||this.name;return this.renderBaseName?`${this.renderBaseName}${t(n)}`:n}hasEffectsOnInteractionAtPath(t,{type:r},n){return r!==0||t.length>0}includePath(t,r){this.included=!0,this.renderedLikeHoisted?.includePath(t,r)}renderLikeHoisted(t){this.renderedLikeHoisted=t}markCalledFromTryStatement(){}setRenderNames(t,r){this.renderBaseName=t,this.renderName=r}}class gg extends Ml{constructor(t,r){super(r),this.referenced=!1,this.module=t,this.isNamespace=r==="*"}addReference(t){this.referenced=!0,this.name!=="default"&&this.name!=="*"||this.module.suggestName(t.name)}hasEffectsOnInteractionAtPath(t,{type:r}){return r!==0||t.length>(this.isNamespace?1:0)}includePath(t,r){super.includePath(t,r),this.module.used=!0}}function GB(e,t){for(const r of t){const n=Object.getOwnPropertyDescriptor(e,r).get;Object.defineProperty(e,r,{get(){const i=n.call(e);return Object.defineProperty(e,r,{value:i}),i}})}}const J0=new Set(["await","break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","eval","export","extends","false","finally","for","function","if","implements","import","in","instanceof","interface","let","NaN","new","null","package","private","protected","public","return","static","super","switch","this","throw","true","try","typeof","undefined","var","void","while","with","yield"]),YB=/[^\w$]/g,KB=e=>(t=>/\d/.test(t[0]))(e)||J0.has(e)||e==="arguments";function Z0(e){return e=e.replace(/-(\w)/g,(t,r)=>r.toUpperCase()).replace(YB,"_"),KB(e)&&(e=`_${e}`),e||"_"}const yg=/^[$_\p{ID_Start}][$\u200C\u200D\p{ID_Continue}]*$/u,glt=/^(?:0|[1-9]\d*)$/;function Q0(e){return yg.test(e)?e==="__proto__"?'["__proto__"]':e:glt.test(e)&&+e<=Number.MAX_SAFE_INTEGER?e:JSON.stringify(e)}function ac(e){return yg.test(e)?e:JSON.stringify(e)}class cr{constructor(t,r,n,i,s,o){this.options=t,this.id=r,this.renormalizeRenderPath=s,this.dynamicImporters=[],this.execIndex=1/0,this.exportedVariables=new Map,this.importers=[],this.reexported=!1,this.used=!1,this.declarations=new Map,this.mostCommonSuggestion=0,this.nameSuggestions=new Map,this.suggestedVariableName=Z0(r.split(/[/\\]/).pop());const{importers:a,dynamicImporters:l}=this;this.info={ast:null,attributes:o,code:null,dynamicallyImportedIdResolutions:lr,dynamicallyImportedIds:lr,get dynamicImporters(){return l.sort()},exportedBindings:null,exports:null,hasDefaultExport:null,id:r,implicitlyLoadedAfterOneOf:lr,implicitlyLoadedBefore:lr,importedIdResolutions:lr,importedIds:lr,get importers(){return a.sort()},isEntry:!1,isExternal:!0,isIncluded:null,meta:i,moduleSideEffects:n,syntheticNamedExports:!1}}cacheInfoGetters(){GB(this.info,["dynamicImporters","importers"])}getVariableForExportName(t){const r=this.declarations.get(t);if(r)return[r];const n=new gg(this,t);return this.declarations.set(t,n),this.exportedVariables.set(n,t),[n]}suggestName(t){const r=(this.nameSuggestions.get(t)??0)+1;this.nameSuggestions.set(t,r),r>this.mostCommonSuggestion&&(this.mostCommonSuggestion=r,this.suggestedVariableName=t)}warnUnusedImports(){const t=[...this.declarations].filter(([a,l])=>a!=="*"&&!l.included&&!this.reexported&&!l.referenced).map(([a])=>a);if(t.length===0)return;const r=new Set;for(const a of t)for(const l of this.declarations.get(a).module.importers)r.add(l);const n=[...r];var i,s,o;this.options.onLog(oe,{code:"UNUSED_EXTERNAL_IMPORT",exporter:i=this.id,ids:o=n,message:`${_o(s=t,["is","are"])} imported from external module "${i}" but never used in ${_o(o.map(a=>le(a)))}.`,names:s})}}function Dc(e){e.isExecuted=!0;const t=[e],r=new Set;for(const n of t)for(const i of[...n.dependencies,...n.implicitlyLoadedBefore])i instanceof cr||i.isExecuted||!i.info.moduleSideEffects&&!n.implicitlyLoadedBefore.has(i)||r.has(i.id)||(i.isExecuted=!0,r.add(i.id),t.push(i))}const os=()=>{};var en=["var","let","const","init","get","set","constructor","method","-","+","!","~","typeof","void","delete","++","--","==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","|","^","&","||","&&","in","instanceof","**","??","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=","**=","&&=","||=","??=","pure","noSideEffects","sourcemap","using","await using"];const vc="_rollupAnnotations",XB="_rollupRemoved",Si=(e,t)=>{if(e===0)return lr;const r=t[e++],n=new Array(r);for(let i=0;i{const r=t[e++];return{end:t[e++],start:r,type:en[t[e]]}},Fa={ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],AwaitExpression:["argument"],BinaryExpression:["left","right"],BlockStatement:["body"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["decorators","id","superClass","body"],ClassExpression:["decorators","id","superClass","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],Decorator:["expression"],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["exported","source","attributes"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["specifiers","source","attributes","declaration"],ExportSpecifier:["local","exported"],ExpressionStatement:["expression"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportAttribute:["key","value"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportExpression:["source","options"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXClosingFragment:[],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXFragment:["openingFragment","children","closingFragment"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes"],JSXOpeningFragment:[],JSXSpreadAttribute:["argument"],JSXSpreadChild:["expression"],JSXText:[],LabeledStatement:["label","body"],Literal:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["decorators","key","value"],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PanicError:[],ParseError:[],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["decorators","key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],StaticBlock:["body"],Super:[],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],YieldExpression:["argument"]},JB="variables",Os=Symbol("IS_SKIPPED_CHAIN");class Ft extends di{get deoptimized(){return Ge(this.flags,2)}set deoptimized(t){this.flags=Ye(this.flags,2,t)}constructor(t,r){super(),this.parent=t,this.scope=r,this.createScope(r)}addExportedVariables(t,r){}bind(){for(const t of Fa[this.type]){const r=this[t];if(Array.isArray(r))for(const n of r)n?.bind();else r&&r.bind()}}createScope(t){this.scope=t}hasEffects(t){this.deoptimized||this.applyDeoptimizations();for(const r of Fa[this.type]){const n=this[r];if(n!==null){if(Array.isArray(n)){for(const i of n)if(i?.hasEffects(t))return!0}else if(n.hasEffects(t))return!0}}return!1}hasEffectsAsAssignmentTarget(t,r){return this.hasEffects(t)||this.hasEffectsOnInteractionAtPath(Bt,this.assignmentInteraction,t)}include(t,r,n){this.included||this.includeNode(t);for(const i of Fa[this.type]){const s=this[i];if(s!==null)if(Array.isArray(s))for(const o of s)o?.include(t,r);else s.include(t,r)}}includeNode(t){this.included=!0,this.deoptimized||this.applyDeoptimizations();for(const r of Fa[this.type]){const n=this[r];if(n!==null)if(Array.isArray(n))for(const i of n)i?.includePath(It,t);else n.includePath(It,t)}}includeAsAssignmentTarget(t,r,n){this.include(t,r)}initialise(){this.scope.context.magicString.addSourcemapLocation(this.start),this.scope.context.magicString.addSourcemapLocation(this.end)}parseNode(t){for(const[r,n]of Object.entries(t))if(!this.hasOwnProperty(r))if(r.charCodeAt(0)===95)r===vc?this.annotations=n:r===XB&&(this.invalidAnnotations=n);else if(typeof n!="object"||n===null)this[r]=n;else if(Array.isArray(n)){this[r]=new Array(n.length);let i=0;for(const s of n)this[r][i++]=s===null?null:new(this.scope.context.getNodeConstructor(s.type))(this,this.scope).parseNode(s)}else this[r]=new(this.scope.context.getNodeConstructor(n.type))(this,this.scope).parseNode(n);return Fa[t.type]||=function(r){return Object.keys(r).filter(n=>typeof r[n]=="object"&&n.charCodeAt(0)!==95)}(t),this.initialise(),this}removeAnnotations(t){if(this.annotations)for(const r of this.annotations)t.remove(r.start,r.end)}render(t,r){for(const n of Fa[this.type]){const i=this[n];if(i!==null)if(Array.isArray(i))for(const s of i)s?.render(t,r);else i.render(t,r)}}setAssignedValue(t){this.assignmentInteraction={args:[null,t],type:1}}shouldBeIncluded(t){return this.included||!t.brokenFlow&&this.hasEffects(Ll())}applyDeoptimizations(){this.deoptimized=!0;for(const t of Fa[this.type]){const r=this[t];if(r!==null)if(Array.isArray(r))for(const n of r)n?.deoptimizePath(It);else r.deoptimizePath(It)}this.scope.context.requestTreeshakingPass()}}function jr(){this.included=!0,this.deoptimized||this.applyDeoptimizations()}function Ke(){this.included=!0}function Se(){this.deoptimized=!0}function ud(e,t=null){return Object.create(t,e)}const fo=new class extends di{getLiteralValueAtPath(e){return e.length>0?$e:void 0}},qa={value:{hasEffectsWhenCalled:null,returns:me}},F2=new class extends di{getReturnExpressionWhenCalledAtPath(e){return e.length===1?fd(Jv,e[0]):Tr}hasEffectsOnInteractionAtPath(e,t,r){return t.type===0?e.length>1:t.type!==2||e.length!==1||hd(Jv,e[0],t,r)}},ta={value:{hasEffectsWhenCalled:null,returns:F2}},Fu=new class extends di{getReturnExpressionWhenCalledAtPath(e){return e.length===1?fd(Zv,e[0]):Tr}hasEffectsOnInteractionAtPath(e,t,r){return t.type===0?e.length>1:t.type!==2||e.length!==1||hd(Zv,e[0],t,r)}},wc={value:{hasEffectsWhenCalled:null,returns:Fu}},O2=new class extends di{getReturnExpressionWhenCalledAtPath(e){return e.length===1?fd(Ff,e[0]):Tr}hasEffectsOnInteractionAtPath(e,t,r){return t.type===0?e.length>1:t.type!==2||e.length!==1||hd(Ff,e[0],t,r)}},xe={value:{hasEffectsWhenCalled:null,returns:O2}},Dk={value:{hasEffectsWhenCalled({args:e},t){const r=e[2];return e.length<3||typeof r.getLiteralValueAtPath(Bt,Qe,{deoptimizeCache(){}})=="symbol"&&r.hasEffectsOnInteractionAtPath(Bt,ld,t)},returns:O2}},ty=ud({hasOwnProperty:ta,isPrototypeOf:ta,propertyIsEnumerable:ta,toLocaleString:xe,toString:xe,valueOf:qa}),Jv=ud({valueOf:ta},ty),Zv=ud({toExponential:xe,toFixed:xe,toLocaleString:xe,toPrecision:xe,valueOf:wc},ty),blt=ud({exec:qa,test:ta},ty),Ff=ud({anchor:xe,at:qa,big:xe,blink:xe,bold:xe,charAt:xe,charCodeAt:wc,codePointAt:qa,concat:xe,endsWith:ta,fixed:xe,fontcolor:xe,fontsize:xe,includes:ta,indexOf:wc,italics:xe,lastIndexOf:wc,link:xe,localeCompare:wc,match:qa,matchAll:qa,normalize:xe,padEnd:xe,padStart:xe,repeat:xe,replace:Dk,replaceAll:Dk,search:wc,slice:xe,small:xe,split:qa,startsWith:ta,strike:xe,sub:xe,substr:xe,substring:xe,sup:xe,toLocaleLowerCase:xe,toLocaleUpperCase:xe,toLowerCase:xe,toString:xe,toUpperCase:xe,trim:xe,trimEnd:xe,trimLeft:xe,trimRight:xe,trimStart:xe,valueOf:xe},ty);function hd(e,t,r,n){return typeof t!="string"||!e[t]||e[t].hasEffectsWhenCalled?.(r,n)||!1}function fd(e,t){return typeof t=="string"&&e[t]?[e[t].returns,!1]:Tr}class Pn extends di{constructor(t){super(),this.description=t}deoptimizeArgumentsOnInteractionAtPath({args:t,type:r},n){if(r===2&&n.length===0&&(this.description.mutatesSelfAsArray&&t[0]?.deoptimizePath(Gv),this.description.mutatesArgs))for(let i=1;i0?Tr:[this.description.returnsPrimitive||(this.description.returns==="self"?r[0]||me:this.description.returns()),!1]}hasEffectsOnInteractionAtPath(t,{args:r,type:n},i){if(t.length>(n===0?1:0))return!0;if(n===2){if(this.description.mutatesSelfAsArray===!0&&r[0]?.hasEffectsOnInteractionAtPath(Gv,A2,i))return!0;if(this.description.callsArgs){for(const s of this.description.callsArgs)if(r[s+1]?.hasEffectsOnInteractionAtPath(Bt,ld,i))return!0}}return!1}}const Qp=[new Pn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:F2})],Yh=[new Pn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:O2})],Tk=[new Pn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:Fu})],ZB=[new Pn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:me})],yh=/^\d+$/;class li extends di{get hasLostTrack(){return Ge(this.flags,2048)}set hasLostTrack(t){this.flags=Ye(this.flags,2048,t)}get hasUnknownDeoptimizedInteger(){return Ge(this.flags,4096)}set hasUnknownDeoptimizedInteger(t){this.flags=Ye(this.flags,4096,t)}get hasUnknownDeoptimizedProperty(){return Ge(this.flags,8192)}set hasUnknownDeoptimizedProperty(t){this.flags=Ye(this.flags,8192,t)}constructor(t,r,n=!1){if(super(),this.prototypeExpression=r,this.immutable=n,this.additionalExpressionsToBeDeoptimized=new Set,this.allProperties=[],this.deoptimizedPaths=Object.create(null),this.expressionsToBeDeoptimizedByKey=Object.create(null),this.gettersByKey=Object.create(null),this.propertiesAndGettersByKey=Object.create(null),this.propertiesAndSettersByKey=Object.create(null),this.settersByKey=Object.create(null),this.unknownIntegerProps=[],this.unmatchableGetters=[],this.unmatchablePropertiesAndGetters=[],this.unmatchablePropertiesAndSetters=[],this.unmatchableSetters=[],Array.isArray(t))this.buildPropertyMaps(t);else{this.propertiesAndGettersByKey=this.propertiesAndSettersByKey=t;for(const i of Object.values(t))this.allProperties.push(...i)}}deoptimizeAllProperties(t){const r=this.hasLostTrack||this.hasUnknownDeoptimizedProperty;if(t?this.hasUnknownDeoptimizedProperty=!0:this.hasLostTrack=!0,!r){for(const n of[...Object.values(this.propertiesAndGettersByKey),...Object.values(this.settersByKey)])for(const i of n)i.deoptimizePath(It);this.prototypeExpression?.deoptimizePath([pe,pe]),this.deoptimizeCachedEntities()}}deoptimizeArgumentsOnInteractionAtPath(t,r,n){const[i,...s]=r,{args:o,type:a}=t;if(this.hasLostTrack||(a===2||r.length>1)&&(this.hasUnknownDeoptimizedProperty||typeof i=="string"&&this.deoptimizedPaths[i]))return void ya(t);const[l,c,u]=a===2||r.length>1?[this.propertiesAndGettersByKey,this.propertiesAndGettersByKey,this.unmatchablePropertiesAndGetters]:a===0?[this.propertiesAndGettersByKey,this.gettersByKey,this.unmatchableGetters]:[this.propertiesAndSettersByKey,this.settersByKey,this.unmatchableSetters];if(typeof i=="string"){if(l[i]){const h=c[i];if(h)for(const d of h)d.deoptimizeArgumentsOnInteractionAtPath(t,s,n);if(!this.immutable)for(const d of o)d&&this.additionalExpressionsToBeDeoptimized.add(d);return}for(const h of u)h.deoptimizeArgumentsOnInteractionAtPath(t,s,n);if(yh.test(i))for(const h of this.unknownIntegerProps)h.deoptimizeArgumentsOnInteractionAtPath(t,s,n)}else{for(const h of[...Object.values(c),u])for(const d of h)d.deoptimizeArgumentsOnInteractionAtPath(t,s,n);for(const h of this.unknownIntegerProps)h.deoptimizeArgumentsOnInteractionAtPath(t,s,n)}if(!this.immutable)for(const h of o)h&&this.additionalExpressionsToBeDeoptimized.add(h);this.prototypeExpression?.deoptimizeArgumentsOnInteractionAtPath(t,r,n)}deoptimizeIntegerProperties(){if(!(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||this.hasUnknownDeoptimizedInteger)){this.hasUnknownDeoptimizedInteger=!0;for(const[t,r]of Object.entries(this.propertiesAndGettersByKey))if(yh.test(t))for(const n of r)n.deoptimizePath(It);this.deoptimizeCachedIntegerEntities()}}deoptimizePath(t){if(this.hasLostTrack||this.immutable)return;const r=t[0];if(t.length===1){if(r===cu)return this.deoptimizeIntegerProperties();if(typeof r!="string")return this.deoptimizeAllProperties(r===ug);if(!this.deoptimizedPaths[r]){this.deoptimizedPaths[r]=!0;const i=this.expressionsToBeDeoptimizedByKey[r];if(i)for(const s of i)s.deoptimizeCache()}}const n=t.length===1?It:t.slice(1);for(const i of typeof r=="string"?[...this.propertiesAndGettersByKey[r]||this.unmatchablePropertiesAndGetters,...this.settersByKey[r]||this.unmatchableSetters]:this.allProperties)i.deoptimizePath(n);this.prototypeExpression?.deoptimizePath(t.length===1?[t[0],pe]:t)}getLiteralValueAtPath(t,r,n){if(t.length===0)return $e;const i=t[0],s=this.getMemberExpressionAndTrackDeopt(i,n);return s?s.getLiteralValueAtPath(t.slice(1),r,n):this.prototypeExpression?this.prototypeExpression.getLiteralValueAtPath(t,r,n):t.length!==1?$e:void 0}getReturnExpressionWhenCalledAtPath(t,r,n,i){if(t.length===0)return Tr;const[s,...o]=t,a=this.getMemberExpressionAndTrackDeopt(s,i);return a?a.getReturnExpressionWhenCalledAtPath(o,r,n,i):this.prototypeExpression?this.prototypeExpression.getReturnExpressionWhenCalledAtPath(t,r,n,i):Tr}hasEffectsOnInteractionAtPath(t,r,n){const[i,...s]=t;if(s.length>0||r.type===2){const c=this.getMemberExpression(i);return c?c.hasEffectsOnInteractionAtPath(s,r,n):!this.prototypeExpression||this.prototypeExpression.hasEffectsOnInteractionAtPath(t,r,n)}if(i===ug)return!1;if(this.hasLostTrack)return!0;const[o,a,l]=r.type===0?[this.propertiesAndGettersByKey,this.gettersByKey,this.unmatchableGetters]:[this.propertiesAndSettersByKey,this.settersByKey,this.unmatchableSetters];if(typeof i=="string"){if(o[i]){const c=a[i];if(c){for(const u of c)if(u.hasEffectsOnInteractionAtPath(s,r,n))return!0}return!1}for(const c of l)if(c.hasEffectsOnInteractionAtPath(s,r,n))return!0}else for(const c of[...Object.values(a),l])for(const u of c)if(u.hasEffectsOnInteractionAtPath(s,r,n))return!0;return!!this.prototypeExpression&&this.prototypeExpression.hasEffectsOnInteractionAtPath(t,r,n)}include(t,r){this.included=!0;for(const n of this.allProperties)(r||n.shouldBeIncluded(t))&&n.include(t,r);this.prototypeExpression?.include(t,r)}includePath(t,r){if(this.included=!0,t.length===0)return;const[n,...i]=t,[s,o]=typeof n=="string"?[new Set([...this.propertiesAndGettersByKey[n]||this.unmatchablePropertiesAndGetters,...this.propertiesAndSettersByKey[n]||this.unmatchablePropertiesAndSetters]),i]:[this.allProperties,It];for(const a of s)a.includePath(o,r);this.prototypeExpression?.includePath(t,r)}buildPropertyMaps(t){const{allProperties:r,propertiesAndGettersByKey:n,propertiesAndSettersByKey:i,settersByKey:s,gettersByKey:o,unknownIntegerProps:a,unmatchablePropertiesAndGetters:l,unmatchablePropertiesAndSetters:c,unmatchableGetters:u,unmatchableSetters:h}=this;for(let d=t.length-1;d>=0;d--){const{key:g,kind:y,property:f}=t[d];if(r.push(f),typeof g=="string")y==="set"?i[g]||(i[g]=[f,...c],s[g]=[f,...h]):y==="get"?n[g]||(n[g]=[f,...l],o[g]=[f,...u]):(i[g]||(i[g]=[f,...c]),n[g]||(n[g]=[f,...l]));else{if(g===cu){a.push(f);continue}y==="set"&&h.push(f),y==="get"&&u.push(f),y!=="get"&&c.push(f),y!=="set"&&l.push(f)}}}deoptimizeCachedEntities(){for(const t of Object.values(this.expressionsToBeDeoptimizedByKey))for(const r of t)r.deoptimizeCache();for(const t of this.additionalExpressionsToBeDeoptimized)t.deoptimizePath(It)}deoptimizeCachedIntegerEntities(){for(const[t,r]of Object.entries(this.expressionsToBeDeoptimizedByKey))if(yh.test(t))for(const n of r)n.deoptimizeCache();for(const t of this.additionalExpressionsToBeDeoptimized)t.deoptimizePath(Gv)}getMemberExpression(t){if(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||typeof t!="string"||this.hasUnknownDeoptimizedInteger&&yh.test(t)||this.deoptimizedPaths[t])return me;const r=this.propertiesAndGettersByKey[t];return r?.length===1?r[0]:r||this.unmatchablePropertiesAndGetters.length>0||this.unknownIntegerProps.length>0&&yh.test(t)?me:null}getMemberExpressionAndTrackDeopt(t,r){if(typeof t!="string")return me;const n=this.getMemberExpression(t);return n!==me&&!this.immutable&&(this.expressionsToBeDeoptimizedByKey[t]=this.expressionsToBeDeoptimizedByKey[t]||[]).push(r),n}}const Pk=e=>typeof e=="string"&&/^\d+$/.test(e),vlt=new class extends di{deoptimizeArgumentsOnInteractionAtPath(e,t){e.type!==2||t.length!==1||Pk(t[0])||ya(e)}getLiteralValueAtPath(e){return e.length===1&&Pk(e[0])?void 0:$e}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||t===2}},ea=new li({__proto__:null,hasOwnProperty:Qp,isPrototypeOf:Qp,propertyIsEnumerable:Qp,toLocaleString:Yh,toString:Yh,valueOf:ZB},vlt,!0),I2=[{key:cu,kind:"init",property:me},{key:"length",kind:"init",property:Fu}],Fk=[new Pn({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:F2})],Ok=[new Pn({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:Fu})],wlt=[new Pn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:()=>new li(I2,ey),returnsPrimitive:null})],rp=[new Pn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:()=>new li(I2,ey),returnsPrimitive:null})],Rb=[new Pn({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:()=>new li(I2,ey),returnsPrimitive:null})],Ik=[new Pn({callsArgs:null,mutatesArgs:!0,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:Fu})],$k=[new Pn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:me})],Bk=[new Pn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:me})],bh=[new Pn({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:me})],Nb=[new Pn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],xlt=[new Pn({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],ey=new li({__proto__:null,at:Bk,concat:rp,copyWithin:Nb,entries:rp,every:Fk,fill:Nb,filter:Rb,find:bh,findIndex:Ok,findLast:bh,findLastIndex:Ok,flat:rp,flatMap:Rb,forEach:bh,includes:Qp,indexOf:Tk,join:Yh,keys:ZB,lastIndexOf:Tk,map:Rb,pop:$k,push:Ik,reduce:bh,reduceRight:bh,reverse:Nb,shift:$k,slice:rp,some:Fk,sort:xlt,splice:wlt,toLocaleString:Yh,toString:Yh,unshift:Ik,values:Bk},ea,!0);class El extends Ft{deoptimizeArgumentsOnInteractionAtPath(t,r,n){r.length>0&&this.argument.deoptimizeArgumentsOnInteractionAtPath(t,It,n)}hasEffects(t){this.deoptimized||this.applyDeoptimizations();const{propertyReadSideEffects:r}=this.scope.context.options.treeshake;return this.argument.hasEffects(t)||r&&(r==="always"||this.argument.hasEffectsOnInteractionAtPath(It,ba,t))}includeNode(t){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.argument.includePath(It,t)}applyDeoptimizations(){this.deoptimized=!0,this.argument.deoptimizePath([pe,pe]),this.scope.context.requestTreeshakingPass()}}class $2 extends Ft{constructor(){super(...arguments),this.objectEntity=null}deoptimizeArgumentsOnInteractionAtPath(t,r,n){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(t,r,n)}deoptimizePath(t){this.getObjectEntity().deoptimizePath(t)}getLiteralValueAtPath(t,r,n){return this.getObjectEntity().getLiteralValueAtPath(t,r,n)}getReturnExpressionWhenCalledAtPath(t,r,n,i){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(t,r,n,i)}hasEffectsOnInteractionAtPath(t,r,n){return this.getObjectEntity().hasEffectsOnInteractionAtPath(t,r,n)}includeNode(t){this.included=!0,this.deoptimized||this.applyDeoptimizations();for(const r of this.elements)r&&r?.includePath(It,t)}applyDeoptimizations(){this.deoptimized=!0;let t=!1;for(let r=0;r$e,QB=()=>!1,Qv=()=>!0,Ss={deoptimizeArgumentsOnCall:os,getLiteralValue:Cl,hasEffectsWhenCalled:QB},ro={deoptimizeArgumentsOnCall:os,getLiteralValue:Cl,hasEffectsWhenCalled:Qv},_lt={deoptimizeArgumentsOnCall:os,getLiteralValue:Cl,hasEffectsWhenCalled:({args:e})=>e.length>1&&!(e[1]instanceof $2)},Slt={deoptimizeArgumentsOnCall:os,getLiteralValue:Cl,hasEffectsWhenCalled({args:e},t){const[r,n]=e;return!(n instanceof di)||n.hasEffectsOnInteractionAtPath(It,ba,t)}},yt={__proto__:null,[tr]:ro},Nt={__proto__:null,[tr]:Ss},Rk={__proto__:null,[tr]:Slt},Lb={__proto__:null,[tr]:{deoptimizeArgumentsOnCall({args:[,e]}){e?.deoptimizePath(It)},getLiteralValue:Cl,hasEffectsWhenCalled:({args:e},t)=>e.length<=1||e[1].hasEffectsOnInteractionAtPath(Qat,A2,t)}},L={__proto__:null,[tr]:ro,prototype:yt},qi={__proto__:null,[tr]:Ss,prototype:yt},vh={__proto__:null,[tr]:_lt,prototype:yt},Xs={__proto__:null,[tr]:Ss,from:yt,of:Nt,prototype:yt},Js={__proto__:null,[tr]:Ss,supportedLocalesOf:qi},tw={global:yt,globalThis:yt,self:yt,window:yt,__proto__:null,[tr]:ro,Array:{__proto__:null,[tr]:ro,from:yt,isArray:Nt,of:Nt,prototype:yt},ArrayBuffer:{__proto__:null,[tr]:Ss,isView:Nt,prototype:yt},AggregateError:vh,Atomics:yt,BigInt:L,BigInt64Array:L,BigUint64Array:L,Boolean:qi,constructor:L,DataView:qi,Date:{__proto__:null,[tr]:Ss,now:Nt,parse:Nt,prototype:yt,UTC:Nt},decodeURI:Nt,decodeURIComponent:Nt,encodeURI:Nt,encodeURIComponent:Nt,Error:qi,escape:Nt,eval:yt,EvalError:qi,FinalizationRegistry:L,Float32Array:Xs,Float64Array:Xs,Function:L,hasOwnProperty:yt,Infinity:yt,Int16Array:Xs,Int32Array:Xs,Int8Array:Xs,isFinite:Nt,isNaN:Nt,isPrototypeOf:yt,JSON:yt,Map:vh,Math:{__proto__:null,[tr]:ro,abs:Nt,acos:Nt,acosh:Nt,asin:Nt,asinh:Nt,atan:Nt,atan2:Nt,atanh:Nt,cbrt:Nt,ceil:Nt,clz32:Nt,cos:Nt,cosh:Nt,exp:Nt,expm1:Nt,floor:Nt,fround:Nt,hypot:Nt,imul:Nt,log:Nt,log10:Nt,log1p:Nt,log2:Nt,max:Nt,min:Nt,pow:Nt,random:Nt,round:Nt,sign:Nt,sin:Nt,sinh:Nt,sqrt:Nt,tan:Nt,tanh:Nt,trunc:Nt},NaN:yt,Number:{__proto__:null,[tr]:Ss,isFinite:Nt,isInteger:Nt,isNaN:Nt,isSafeInteger:Nt,parseFloat:Nt,parseInt:Nt,prototype:yt},Object:{__proto__:null,[tr]:Ss,create:Nt,defineProperty:Lb,defineProperties:Lb,freeze:Lb,getOwnPropertyDescriptor:Nt,getOwnPropertyDescriptors:Nt,getOwnPropertyNames:Nt,getOwnPropertySymbols:Nt,getPrototypeOf:Nt,hasOwn:Nt,is:Nt,isExtensible:Nt,isFrozen:Nt,isSealed:Nt,keys:Nt,fromEntries:yt,entries:Rk,values:Rk,prototype:yt},parseFloat:Nt,parseInt:Nt,Promise:{__proto__:null,[tr]:ro,all:yt,allSettled:yt,any:yt,prototype:yt,race:yt,reject:yt,resolve:yt},propertyIsEnumerable:yt,Proxy:{__proto__:null,[tr]:{deoptimizeArgumentsOnCall:({args:[,e,t]})=>{if((r=t)instanceof Ft&&r.type==="ObjectExpression"&&!t.properties.some(i=>!function(s){return s.type===DB}(i))){for(const i of t.properties)i.deoptimizeArgumentsOnInteractionAtPath({args:[null,e],type:2,withNew:!1},Bt,Qe);return}var r;e.deoptimizePath(It)},getLiteralValue:Cl,hasEffectsWhenCalled:Qv}},RangeError:qi,ReferenceError:qi,Reflect:yt,RegExp:qi,Set:vh,SharedArrayBuffer:L,String:{__proto__:null,[tr]:Ss,fromCharCode:Nt,fromCodePoint:Nt,prototype:yt,raw:Nt},Symbol:{__proto__:null,[tr]:Ss,for:Nt,keyFor:Nt,prototype:yt,toStringTag:{__proto__:null,[tr]:{deoptimizeArgumentsOnCall:os,getLiteralValue:()=>_2,hasEffectsWhenCalled:Qv}}},SyntaxError:qi,toLocaleString:yt,toString:yt,TypeError:qi,Uint16Array:Xs,Uint32Array:Xs,Uint8Array:Xs,Uint8ClampedArray:Xs,unescape:Nt,URIError:qi,valueOf:yt,WeakMap:vh,WeakRef:L,WeakSet:vh,clearInterval:L,clearTimeout:L,console:{__proto__:null,[tr]:ro,assert:L,clear:L,count:L,countReset:L,debug:L,dir:L,dirxml:L,error:L,exception:L,group:L,groupCollapsed:L,groupEnd:L,info:L,log:L,table:L,time:L,timeEnd:L,timeLog:L,trace:L,warn:L},Intl:{__proto__:null,[tr]:ro,Collator:Js,DateTimeFormat:Js,DisplayNames:Js,ListFormat:Js,Locale:Js,NumberFormat:Js,PluralRules:Js,RelativeTimeFormat:Js,Segmenter:Js},setInterval:L,setTimeout:L,TextDecoder:L,TextEncoder:L,URL:{__proto__:null,[tr]:ro,prototype:yt,canParse:Nt},URLSearchParams:L,AbortController:L,AbortSignal:L,addEventListener:yt,alert:yt,AnalyserNode:L,Animation:L,AnimationEvent:L,applicationCache:yt,ApplicationCache:L,ApplicationCacheErrorEvent:L,atob:yt,Attr:L,Audio:L,AudioBuffer:L,AudioBufferSourceNode:L,AudioContext:L,AudioDestinationNode:L,AudioListener:L,AudioNode:L,AudioParam:L,AudioProcessingEvent:L,AudioScheduledSourceNode:L,AudioWorkletNode:L,BarProp:L,BaseAudioContext:L,BatteryManager:L,BeforeUnloadEvent:L,BiquadFilterNode:L,Blob:L,BlobEvent:L,blur:yt,BroadcastChannel:L,btoa:yt,ByteLengthQueuingStrategy:L,Cache:L,caches:yt,CacheStorage:L,cancelAnimationFrame:yt,cancelIdleCallback:yt,CanvasCaptureMediaStreamTrack:L,CanvasGradient:L,CanvasPattern:L,CanvasRenderingContext2D:L,ChannelMergerNode:L,ChannelSplitterNode:L,CharacterData:L,clientInformation:yt,ClipboardEvent:L,close:yt,closed:yt,CloseEvent:L,Comment:L,CompositionEvent:L,confirm:yt,ConstantSourceNode:L,ConvolverNode:L,CountQueuingStrategy:L,createImageBitmap:yt,Credential:L,CredentialsContainer:L,crypto:yt,Crypto:L,CryptoKey:L,CSS:L,CSSConditionRule:L,CSSFontFaceRule:L,CSSGroupingRule:L,CSSImportRule:L,CSSKeyframeRule:L,CSSKeyframesRule:L,CSSMediaRule:L,CSSNamespaceRule:L,CSSPageRule:L,CSSRule:L,CSSRuleList:L,CSSStyleDeclaration:L,CSSStyleRule:L,CSSStyleSheet:L,CSSSupportsRule:L,CustomElementRegistry:L,customElements:yt,CustomEvent:{__proto__:null,[tr]:{deoptimizeArgumentsOnCall({args:e}){e[2]?.deoptimizePath(["detail"])},getLiteralValue:Cl,hasEffectsWhenCalled:QB},prototype:yt},DataTransfer:L,DataTransferItem:L,DataTransferItemList:L,defaultstatus:yt,defaultStatus:yt,DelayNode:L,DeviceMotionEvent:L,DeviceOrientationEvent:L,devicePixelRatio:yt,dispatchEvent:yt,document:yt,Document:L,DocumentFragment:L,DocumentType:L,DOMError:L,DOMException:L,DOMImplementation:L,DOMMatrix:L,DOMMatrixReadOnly:L,DOMParser:L,DOMPoint:L,DOMPointReadOnly:L,DOMQuad:L,DOMRect:L,DOMRectReadOnly:L,DOMStringList:L,DOMStringMap:L,DOMTokenList:L,DragEvent:L,DynamicsCompressorNode:L,Element:L,ErrorEvent:L,Event:L,EventSource:L,EventTarget:L,external:yt,fetch:yt,File:L,FileList:L,FileReader:L,find:yt,focus:yt,FocusEvent:L,FontFace:L,FontFaceSetLoadEvent:L,FormData:L,frames:yt,GainNode:L,Gamepad:L,GamepadButton:L,GamepadEvent:L,getComputedStyle:yt,getSelection:yt,HashChangeEvent:L,Headers:L,history:yt,History:L,HTMLAllCollection:L,HTMLAnchorElement:L,HTMLAreaElement:L,HTMLAudioElement:L,HTMLBaseElement:L,HTMLBodyElement:L,HTMLBRElement:L,HTMLButtonElement:L,HTMLCanvasElement:L,HTMLCollection:L,HTMLContentElement:L,HTMLDataElement:L,HTMLDataListElement:L,HTMLDetailsElement:L,HTMLDialogElement:L,HTMLDirectoryElement:L,HTMLDivElement:L,HTMLDListElement:L,HTMLDocument:L,HTMLElement:L,HTMLEmbedElement:L,HTMLFieldSetElement:L,HTMLFontElement:L,HTMLFormControlsCollection:L,HTMLFormElement:L,HTMLFrameElement:L,HTMLFrameSetElement:L,HTMLHeadElement:L,HTMLHeadingElement:L,HTMLHRElement:L,HTMLHtmlElement:L,HTMLIFrameElement:L,HTMLImageElement:L,HTMLInputElement:L,HTMLLabelElement:L,HTMLLegendElement:L,HTMLLIElement:L,HTMLLinkElement:L,HTMLMapElement:L,HTMLMarqueeElement:L,HTMLMediaElement:L,HTMLMenuElement:L,HTMLMetaElement:L,HTMLMeterElement:L,HTMLModElement:L,HTMLObjectElement:L,HTMLOListElement:L,HTMLOptGroupElement:L,HTMLOptionElement:L,HTMLOptionsCollection:L,HTMLOutputElement:L,HTMLParagraphElement:L,HTMLParamElement:L,HTMLPictureElement:L,HTMLPreElement:L,HTMLProgressElement:L,HTMLQuoteElement:L,HTMLScriptElement:L,HTMLSelectElement:L,HTMLShadowElement:L,HTMLSlotElement:L,HTMLSourceElement:L,HTMLSpanElement:L,HTMLStyleElement:L,HTMLTableCaptionElement:L,HTMLTableCellElement:L,HTMLTableColElement:L,HTMLTableElement:L,HTMLTableRowElement:L,HTMLTableSectionElement:L,HTMLTemplateElement:L,HTMLTextAreaElement:L,HTMLTimeElement:L,HTMLTitleElement:L,HTMLTrackElement:L,HTMLUListElement:L,HTMLUnknownElement:L,HTMLVideoElement:L,IDBCursor:L,IDBCursorWithValue:L,IDBDatabase:L,IDBFactory:L,IDBIndex:L,IDBKeyRange:L,IDBObjectStore:L,IDBOpenDBRequest:L,IDBRequest:L,IDBTransaction:L,IDBVersionChangeEvent:L,IdleDeadline:L,IIRFilterNode:L,Image:L,ImageBitmap:L,ImageBitmapRenderingContext:L,ImageCapture:L,ImageData:L,indexedDB:yt,innerHeight:yt,innerWidth:yt,InputEvent:L,IntersectionObserver:L,IntersectionObserverEntry:L,isSecureContext:yt,KeyboardEvent:L,KeyframeEffect:L,length:yt,localStorage:yt,location:yt,Location:L,locationbar:yt,matchMedia:yt,MediaDeviceInfo:L,MediaDevices:L,MediaElementAudioSourceNode:L,MediaEncryptedEvent:L,MediaError:L,MediaKeyMessageEvent:L,MediaKeySession:L,MediaKeyStatusMap:L,MediaKeySystemAccess:L,MediaList:L,MediaQueryList:L,MediaQueryListEvent:L,MediaRecorder:L,MediaSettingsRange:L,MediaSource:L,MediaStream:L,MediaStreamAudioDestinationNode:L,MediaStreamAudioSourceNode:L,MediaStreamEvent:L,MediaStreamTrack:L,MediaStreamTrackEvent:L,menubar:yt,MessageChannel:L,MessageEvent:L,MessagePort:L,MIDIAccess:L,MIDIConnectionEvent:L,MIDIInput:L,MIDIInputMap:L,MIDIMessageEvent:L,MIDIOutput:L,MIDIOutputMap:L,MIDIPort:L,MimeType:L,MimeTypeArray:L,MouseEvent:L,moveBy:yt,moveTo:yt,MutationEvent:L,MutationObserver:L,MutationRecord:L,name:yt,NamedNodeMap:L,NavigationPreloadManager:L,navigator:yt,Navigator:L,NetworkInformation:L,Node:L,NodeFilter:yt,NodeIterator:L,NodeList:L,Notification:L,OfflineAudioCompletionEvent:L,OfflineAudioContext:L,offscreenBuffering:yt,OffscreenCanvas:L,open:yt,openDatabase:yt,Option:L,origin:yt,OscillatorNode:L,outerHeight:yt,outerWidth:yt,PageTransitionEvent:L,pageXOffset:yt,pageYOffset:yt,PannerNode:L,parent:yt,Path2D:L,PaymentAddress:L,PaymentRequest:L,PaymentRequestUpdateEvent:L,PaymentResponse:L,performance:yt,Performance:L,PerformanceEntry:L,PerformanceLongTaskTiming:L,PerformanceMark:L,PerformanceMeasure:L,PerformanceNavigation:L,PerformanceNavigationTiming:L,PerformanceObserver:L,PerformanceObserverEntryList:L,PerformancePaintTiming:L,PerformanceResourceTiming:L,PerformanceTiming:L,PeriodicWave:L,Permissions:L,PermissionStatus:L,personalbar:yt,PhotoCapabilities:L,Plugin:L,PluginArray:L,PointerEvent:L,PopStateEvent:L,postMessage:yt,Presentation:L,PresentationAvailability:L,PresentationConnection:L,PresentationConnectionAvailableEvent:L,PresentationConnectionCloseEvent:L,PresentationConnectionList:L,PresentationReceiver:L,PresentationRequest:L,print:yt,ProcessingInstruction:L,ProgressEvent:L,PromiseRejectionEvent:L,prompt:yt,PushManager:L,PushSubscription:L,PushSubscriptionOptions:L,queueMicrotask:yt,RadioNodeList:L,Range:L,ReadableStream:L,RemotePlayback:L,removeEventListener:yt,Request:L,requestAnimationFrame:yt,requestIdleCallback:yt,resizeBy:yt,ResizeObserver:L,ResizeObserverEntry:L,resizeTo:yt,Response:L,RTCCertificate:L,RTCDataChannel:L,RTCDataChannelEvent:L,RTCDtlsTransport:L,RTCIceCandidate:L,RTCIceTransport:L,RTCPeerConnection:L,RTCPeerConnectionIceEvent:L,RTCRtpReceiver:L,RTCRtpSender:L,RTCSctpTransport:L,RTCSessionDescription:L,RTCStatsReport:L,RTCTrackEvent:L,screen:yt,Screen:L,screenLeft:yt,ScreenOrientation:L,screenTop:yt,screenX:yt,screenY:yt,ScriptProcessorNode:L,scroll:yt,scrollbars:yt,scrollBy:yt,scrollTo:yt,scrollX:yt,scrollY:yt,SecurityPolicyViolationEvent:L,Selection:L,ServiceWorker:L,ServiceWorkerContainer:L,ServiceWorkerRegistration:L,sessionStorage:yt,ShadowRoot:L,SharedWorker:L,SourceBuffer:L,SourceBufferList:L,speechSynthesis:yt,SpeechSynthesisEvent:L,SpeechSynthesisUtterance:L,StaticRange:L,status:yt,statusbar:yt,StereoPannerNode:L,stop:yt,Storage:L,StorageEvent:L,StorageManager:L,styleMedia:yt,StyleSheet:L,StyleSheetList:L,SubtleCrypto:L,SVGAElement:L,SVGAngle:L,SVGAnimatedAngle:L,SVGAnimatedBoolean:L,SVGAnimatedEnumeration:L,SVGAnimatedInteger:L,SVGAnimatedLength:L,SVGAnimatedLengthList:L,SVGAnimatedNumber:L,SVGAnimatedNumberList:L,SVGAnimatedPreserveAspectRatio:L,SVGAnimatedRect:L,SVGAnimatedString:L,SVGAnimatedTransformList:L,SVGAnimateElement:L,SVGAnimateMotionElement:L,SVGAnimateTransformElement:L,SVGAnimationElement:L,SVGCircleElement:L,SVGClipPathElement:L,SVGComponentTransferFunctionElement:L,SVGDefsElement:L,SVGDescElement:L,SVGDiscardElement:L,SVGElement:L,SVGEllipseElement:L,SVGFEBlendElement:L,SVGFEColorMatrixElement:L,SVGFEComponentTransferElement:L,SVGFECompositeElement:L,SVGFEConvolveMatrixElement:L,SVGFEDiffuseLightingElement:L,SVGFEDisplacementMapElement:L,SVGFEDistantLightElement:L,SVGFEDropShadowElement:L,SVGFEFloodElement:L,SVGFEFuncAElement:L,SVGFEFuncBElement:L,SVGFEFuncGElement:L,SVGFEFuncRElement:L,SVGFEGaussianBlurElement:L,SVGFEImageElement:L,SVGFEMergeElement:L,SVGFEMergeNodeElement:L,SVGFEMorphologyElement:L,SVGFEOffsetElement:L,SVGFEPointLightElement:L,SVGFESpecularLightingElement:L,SVGFESpotLightElement:L,SVGFETileElement:L,SVGFETurbulenceElement:L,SVGFilterElement:L,SVGForeignObjectElement:L,SVGGElement:L,SVGGeometryElement:L,SVGGradientElement:L,SVGGraphicsElement:L,SVGImageElement:L,SVGLength:L,SVGLengthList:L,SVGLinearGradientElement:L,SVGLineElement:L,SVGMarkerElement:L,SVGMaskElement:L,SVGMatrix:L,SVGMetadataElement:L,SVGMPathElement:L,SVGNumber:L,SVGNumberList:L,SVGPathElement:L,SVGPatternElement:L,SVGPoint:L,SVGPointList:L,SVGPolygonElement:L,SVGPolylineElement:L,SVGPreserveAspectRatio:L,SVGRadialGradientElement:L,SVGRect:L,SVGRectElement:L,SVGScriptElement:L,SVGSetElement:L,SVGStopElement:L,SVGStringList:L,SVGStyleElement:L,SVGSVGElement:L,SVGSwitchElement:L,SVGSymbolElement:L,SVGTextContentElement:L,SVGTextElement:L,SVGTextPathElement:L,SVGTextPositioningElement:L,SVGTitleElement:L,SVGTransform:L,SVGTransformList:L,SVGTSpanElement:L,SVGUnitTypes:L,SVGUseElement:L,SVGViewElement:L,TaskAttributionTiming:L,Text:L,TextEvent:L,TextMetrics:L,TextTrack:L,TextTrackCue:L,TextTrackCueList:L,TextTrackList:L,TimeRanges:L,toolbar:yt,top:yt,Touch:L,TouchEvent:L,TouchList:L,TrackEvent:L,TransitionEvent:L,TreeWalker:L,UIEvent:L,ValidityState:L,visualViewport:yt,VisualViewport:L,VTTCue:L,WaveShaperNode:L,WebAssembly:yt,WebGL2RenderingContext:L,WebGLActiveInfo:L,WebGLBuffer:L,WebGLContextEvent:L,WebGLFramebuffer:L,WebGLProgram:L,WebGLQuery:L,WebGLRenderbuffer:L,WebGLRenderingContext:L,WebGLSampler:L,WebGLShader:L,WebGLShaderPrecisionFormat:L,WebGLSync:L,WebGLTexture:L,WebGLTransformFeedback:L,WebGLUniformLocation:L,WebGLVertexArrayObject:L,WebSocket:L,WheelEvent:L,Window:L,Worker:L,WritableStream:L,XMLDocument:L,XMLHttpRequest:L,XMLHttpRequestEventTarget:L,XMLHttpRequestUpload:L,XMLSerializer:L,XPathEvaluator:L,XPathExpression:L,XPathResult:L,XSLTProcessor:L};for(const e of["window","global","self","globalThis"])tw[e]=tw;function lc(e){let t=tw;for(const r of e)if(typeof r!="string"||(t=t[r],!t))return null;return t[tr]}class B2 extends Ml{constructor(t){super(t),this.markReassigned()}deoptimizeArgumentsOnInteractionAtPath(t,r,n){switch(t.type){case 0:case 1:return void(lc([this.name,...r].slice(0,-1))||super.deoptimizeArgumentsOnInteractionAtPath(t,r,n));case 2:{const i=lc([this.name,...r]);return void(i?i.deoptimizeArgumentsOnCall(t):super.deoptimizeArgumentsOnInteractionAtPath(t,r,n))}}}getLiteralValueAtPath(t,r,n){const i=lc([this.name,...t]);return i?i.getLiteralValue():$e}hasEffectsOnInteractionAtPath(t,r,n){switch(r.type){case 0:return t.length===0?this.name!=="undefined"&&!lc([this.name]):!lc([this.name,...t].slice(0,-1));case 1:return!0;case 2:{const i=lc([this.name,...t]);return!i||i.hasEffectsWhenCalled(r,n)}}}}const Nk=(e,t)=>{const{length:r}=e,{length:n}=t;return r===0?t:n===0?e:r+n>6?[...e,...t.slice(0,5-e.length),"UnknownKey"]:[...e,...t]};class as extends Ml{constructor(t,r,n,i,s,o){super(t),this.init=n,this.initPath=i,this.kind=o,this.calledFromTryStatement=!1,this.additionalInitializers=null,this.includedPathTracker=new elt,this.expressionsToBeDeoptimized=[],this.declarations=r?[r]:[],this.deoptimizationTracker=s.deoptimizationTracker,this.module=s.module}addDeclaration(t,r){this.declarations.push(t),this.markInitializersForDeoptimization().push(r)}consolidateInitializers(){if(this.additionalInitializers)for(const t of this.additionalInitializers)t.deoptimizePath(It)}deoptimizeArgumentsOnInteractionAtPath(t,r,n){this.isReassigned||r.length+this.initPath.length>6?ya(t):n.withTrackedEntityAtPath(r,this.init,()=>{this.init.deoptimizeArgumentsOnInteractionAtPath(t,[...this.initPath,...r],n)},void 0)}deoptimizePath(t){if(!this.isReassigned&&!this.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(t,this))if(t.length===0){this.markReassigned();const r=this.expressionsToBeDeoptimized;this.expressionsToBeDeoptimized=lr;for(const n of r)n.deoptimizeCache();this.init.deoptimizePath([...this.initPath,pe])}else this.init.deoptimizePath(Nk(this.initPath,t))}getLiteralValueAtPath(t,r,n){return this.isReassigned||t.length+this.initPath.length>6?$e:r.withTrackedEntityAtPath(t,this.init,()=>(this.expressionsToBeDeoptimized.push(n),this.init.getLiteralValueAtPath([...this.initPath,...t],r,n)),$e)}getReturnExpressionWhenCalledAtPath(t,r,n,i){return this.isReassigned||t.length+this.initPath.length>6?Tr:n.withTrackedEntityAtPath(t,this.init,()=>(this.expressionsToBeDeoptimized.push(i),this.init.getReturnExpressionWhenCalledAtPath([...this.initPath,...t],r,n,i)),Tr)}hasEffectsOnInteractionAtPath(t,r,n){if(t.length+this.initPath.length>6)return!0;switch(r.type){case 0:return!!this.isReassigned||!n.accessed.trackEntityAtPathAndGetIfTracked(t,this)&&this.init.hasEffectsOnInteractionAtPath([...this.initPath,...t],r,n);case 1:return!!this.included||t.length!==0&&(!!this.isReassigned||!n.assigned.trackEntityAtPathAndGetIfTracked(t,this)&&this.init.hasEffectsOnInteractionAtPath([...this.initPath,...t],r,n));case 2:return!!this.isReassigned||!(r.withNew?n.instantiated:n.called).trackEntityAtPathAndGetIfTracked(t,r.args,this)&&this.init.hasEffectsOnInteractionAtPath([...this.initPath,...t],r,n)}}includePath(t,r){if(!this.includedPathTracker.includePathAndGetIfIncluded(t)){this.module.scope.context.requestTreeshakingPass(),this.included||this.module.scope.context.newlyIncludedVariableInits.add(this.init),super.includePath(t,r);for(const n of this.declarations){n.included||n.include(r,!1);let i=n.parent;for(;!i.included&&(i.includeNode(r),i.type!==hg);)i=i.parent}t.length>0&&(this.init.includePath(Nk(this.initPath,t),r),this.additionalInitializers?.forEach(n=>n.includePath(It,r)))}}includeCallArguments(t,r){this.isReassigned||r.includedCallArguments.has(this.init)||this.initPath.length>0?C2(t,r):(r.includedCallArguments.add(this.init),this.init.includeCallArguments(t,r),r.includedCallArguments.delete(this.init))}markCalledFromTryStatement(){this.calledFromTryStatement=!0}markInitializersForDeoptimization(){return this.additionalInitializers===null&&(this.additionalInitializers=[this.init],this.init=me,this.markReassigned()),this.additionalInitializers}}const Elt=new Set(["class","const","let","var","using","await using"]);class tR extends Ft{constructor(){super(...arguments),this.variable=null,this.isVariableReference=!1}get isTDZAccess(){return Ge(this.flags,4)?Ge(this.flags,8):null}set isTDZAccess(t){this.flags=Ye(this.flags,4,!0),this.flags=Ye(this.flags,8,t)}deoptimizeArgumentsOnInteractionAtPath(t,r,n){this.variable.deoptimizeArgumentsOnInteractionAtPath(t,r,n)}deoptimizePath(t){t.length!==0||this.scope.contains(this.name)||this.disallowImportReassignment(),this.variable?.deoptimizePath(t)}getLiteralValueAtPath(t,r,n){return this.getVariableRespectingTDZ().getLiteralValueAtPath(t,r,n)}getReturnExpressionWhenCalledAtPath(t,r,n,i){const[s,o]=this.getVariableRespectingTDZ().getReturnExpressionWhenCalledAtPath(t,r,n,i);return[s,o||this.isPureFunction(t)]}hasEffects(t){return this.deoptimized||this.applyDeoptimizations(),!(!this.isPossibleTDZ()||this.variable.kind==="var")||this.scope.context.options.treeshake.unknownGlobalSideEffects&&this.variable instanceof B2&&!this.isPureFunction(Bt)&&this.variable.hasEffectsOnInteractionAtPath(Bt,ba,t)}hasEffectsOnInteractionAtPath(t,r,n){switch(r.type){case 0:return this.variable!==null&&!this.isPureFunction(t)&&this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(t,r,n);case 1:return(t.length>0?this.getVariableRespectingTDZ():this.variable).hasEffectsOnInteractionAtPath(t,r,n);case 2:return!this.isPureFunction(t)&&this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(t,r,n)}}include(t,r){this.included||this.includeNode(t),r&&this.variable?.includePath(It,t)}includeNode(t){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.variable!==null&&this.scope.context.includeVariableInModule(this.variable,Bt,t)}includePath(t,r){this.included?t.length>0&&this.variable?.includePath(t,r):(this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.variable!==null&&this.scope.context.includeVariableInModule(this.variable,t,r))}includeCallArguments(t,r){this.variable.includeCallArguments(t,r)}isPossibleTDZ(){const t=this.isTDZAccess;if(t!==null)return t;if(!(this.variable instanceof as&&this.variable.kind&&Elt.has(this.variable.kind)&&this.variable.module.hasTreeShakingPassStarted))return this.isTDZAccess=!1;let r;return this.variable.declarations&&this.variable.declarations.length===1&&(r=this.variable.declarations[0])&&this.start0&&n.hasEffectsOnInteractionAtPath(r,ba,t)}includeDestructuredIfNecessary(t,r,n){r.length>0&&!this.isDestructuringDeoptimized&&(this.isDestructuringDeoptimized=!0,n.deoptimizeArgumentsOnInteractionAtPath({args:[new eR(n,r.slice(0,-1))],type:0},r,Qe));const{propertyReadSideEffects:i}=this.scope.context.options.treeshake;return!!(this.included||=r.length>0&&!t.brokenFlow&&i&&(i==="always"||n.hasEffectsOnInteractionAtPath(r,ba,Ll())))&&(this.variable&&!this.variable.included&&this.scope.context.includeVariableInModule(this.variable,Bt,t),n.includePath(r,t),!0)}markDeclarationReached(){this.variable.initReached=!0}render(t,{snippets:{getPropertyAccess:r},useOriginalName:n},{renderedParentType:i,isCalleeOfRenderedParent:s,isShorthandProperty:o}=Kr){if(this.variable){const a=this.variable.getName(r,n);a!==this.name&&(t.overwrite(this.start,this.end,a,{contentOnly:!0,storeName:!0}),o&&t.prependRight(this.start,`${this.name}: `)),a==="eval"&&i===X0&&s&&t.appendRight(this.start,"0, ")}}}function bg(e){let t="";do{const r=e%64;e=e/64|0,t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$"[r]+t}while(e!==0);return t}function As(e,t,r){let n=e,i=1;for(;t.has(n)||J0.has(n)||r?.has(n);)n=`${e}$${bg(i++)}`;return t.add(n),n}class rR{constructor(){this.children=[],this.variables=new Map}addDeclaration(t,r,n,i,s){const o=t.name,a=this.hoistedVariables?.get(o)||this.variables.get(o);if(a){if(s==="var"&&a.kind==="var")return a.addDeclaration(t,n),a;r.error(Pu(o),t.start)}const l=new as(t.name,t,n,i,r,s);return this.variables.set(o,l),l}addHoistedVariable(t,r){(this.hoistedVariables||=new Map).set(t,r)}contains(t){return this.variables.has(t)}findVariable(t){throw new Error("Internal Error: findVariable needs to be implemented by a subclass")}}class Xn extends rR{constructor(t,r){super(),this.parent=t,this.context=r,this.accessedOutsideVariables=new Map,t.children.push(this)}addAccessedDynamicImport(t){(this.accessedDynamicImports||(this.accessedDynamicImports=new Set)).add(t),this.parent instanceof Xn&&this.parent.addAccessedDynamicImport(t)}addAccessedGlobals(t,r){const n=r.get(this)||new Set;for(const i of t)n.add(i);r.set(this,n),this.parent instanceof Xn&&this.parent.addAccessedGlobals(t,r)}addNamespaceMemberAccess(t,r){this.accessedOutsideVariables.set(t,r),this.parent.addNamespaceMemberAccess(t,r)}addReturnExpression(t){this.parent instanceof Xn&&this.parent.addReturnExpression(t)}addUsedOutsideNames(t,r,n,i){for(const o of this.accessedOutsideVariables.values())o.included&&(t.add(o.getBaseVariableName()),r==="system"&&n.has(o)&&t.add("exports"));const s=i.get(this);if(s)for(const o of s)t.add(o)}contains(t){return this.variables.has(t)||this.parent.contains(t)}deconflict(t,r,n){const i=new Set;if(this.addUsedOutsideNames(i,t,r,n),this.accessedDynamicImports)for(const s of this.accessedDynamicImports)s.inlineNamespace&&i.add(s.inlineNamespace.getBaseVariableName());for(const[s,o]of this.variables)(o.included||o.alwaysRendered)&&o.setRenderNames(null,As(s,i,o.forbiddenNames));for(const s of this.children)s.deconflict(t,r,n)}findLexicalBoundary(){return this.parent.findLexicalBoundary()}findGlobal(t){const r=this.parent.findVariable(t);return this.accessedOutsideVariables.set(t,r),r}findVariable(t){const r=this.variables.get(t)||this.accessedOutsideVariables.get(t);if(r)return r;const n=this.parent.findVariable(t);return this.accessedOutsideVariables.set(t,n),n}}function R2(e,t){for(const r of e)if(r.hasEffects(t))return!0;return!1}class vg extends Ft{constructor(){super(...arguments),this.accessedValue=null}get computed(){return Ge(this.flags,1024)}set computed(t){this.flags=Ye(this.flags,1024,t)}deoptimizeArgumentsOnInteractionAtPath(t,r,n){return t.type===0&&this.kind==="get"&&r.length===0||t.type===1&&this.kind==="set"&&r.length===0?this.value.deoptimizeArgumentsOnInteractionAtPath({args:t.args,type:2,withNew:!1},Bt,n):void this.getAccessedValue()[0].deoptimizeArgumentsOnInteractionAtPath(t,r,n)}deoptimizeCache(){}deoptimizePath(t){this.getAccessedValue()[0].deoptimizePath(t)}getLiteralValueAtPath(t,r,n){return this.getAccessedValue()[0].getLiteralValueAtPath(t,r,n)}getReturnExpressionWhenCalledAtPath(t,r,n,i){return this.getAccessedValue()[0].getReturnExpressionWhenCalledAtPath(t,r,n,i)}hasEffects(t){return this.key.hasEffects(t)}hasEffectsOnInteractionAtPath(t,r,n){return this.kind==="get"&&r.type===0&&t.length===0||this.kind==="set"&&r.type===1?this.value.hasEffectsOnInteractionAtPath(Bt,{args:r.args,type:2,withNew:!1},n):this.getAccessedValue()[0].hasEffectsOnInteractionAtPath(t,r,n)}getAccessedValue(){return this.accessedValue===null?this.kind==="get"?(this.accessedValue=Tr,this.accessedValue=this.value.getReturnExpressionWhenCalledAtPath(Bt,ld,Qe,this)):this.accessedValue=[this.value,!1]:this.accessedValue}}vg.prototype.includeNode=Ke,vg.prototype.applyDeoptimizations=Se;class wg extends vg{hasEffects(t){return super.hasEffects(t)||R2(this.decorators,t)}}class jl extends Xn{constructor(t){super(t,t.context)}addDeclaration(t,r,n,i,s){if(s==="var"){const o=t.name,a=this.hoistedVariables?.get(o)||this.variables.get(o);if(a)return a.kind==="var"||s==="var"&&a.kind==="parameter"?(a.addDeclaration(t,n),a):r.error(Pu(o),t.start);const l=this.parent.addDeclaration(t,r,n,i,s);return l.markInitializersForDeoptimization(),this.addHoistedVariable(o,l),l}return super.addDeclaration(t,r,n,i,s)}}class xg extends Ft{createScope(t){this.scope=new jl(t)}hasEffects(t){for(const r of this.body)if(r.hasEffects(t))return!0;return!1}include(t,r){this.included=!0;for(const n of this.body)(r||n.shouldBeIncluded(t))&&n.include(t,r)}render(t,r){if(this.body.length>0){const n=Nr(t.original.slice(this.start,this.end),"{")+1;ad(this.body,t,this.start+n,this.end-1,r)}else super.render(t,r)}}function Mk(e){return e.type==="StaticBlock"}xg.prototype.includeNode=Ke,xg.prototype.applyDeoptimizations=Se;class N2 extends Ft{constructor(){super(...arguments),this.objectEntity=null}createScope(t){this.scope=new Xn(t,t.context)}deoptimizeArgumentsOnInteractionAtPath(t,r,n){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(t,r,n)}deoptimizeCache(){this.getObjectEntity().deoptimizeAllProperties()}deoptimizePath(t){this.getObjectEntity().deoptimizePath(t)}getLiteralValueAtPath(t,r,n){return this.getObjectEntity().getLiteralValueAtPath(t,r,n)}getReturnExpressionWhenCalledAtPath(t,r,n,i){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(t,r,n,i)}hasEffects(t){this.deoptimized||this.applyDeoptimizations();const r=this.superClass?.hasEffects(t)||this.body.hasEffects(t);return this.id?.markDeclarationReached(),r||super.hasEffects(t)||R2(this.decorators,t)}hasEffectsOnInteractionAtPath(t,r,n){return r.type===2&&t.length===0?!r.withNew||(this.classConstructor===null?this.superClass?.hasEffectsOnInteractionAtPath(t,r,n):this.classConstructor.hasEffectsOnInteractionAtPath(t,r,n))||!1:this.getObjectEntity().hasEffectsOnInteractionAtPath(t,r,n)}include(t,r){this.included||this.includeNode(t),this.superClass?.include(t,r),this.body.include(t,r);for(const n of this.decorators)n.include(t,r);this.id&&(this.id.markDeclarationReached(),this.id.include(t,r))}initialise(){super.initialise(),this.id?.declare("class",Bt,this);for(const t of this.body.body)if(t instanceof wg&&t.kind==="constructor")return void(this.classConstructor=t);this.classConstructor=null}applyDeoptimizations(){this.deoptimized=!0;for(const t of this.body.body)Mk(t)||t.static||t instanceof wg&&t.kind==="constructor"||t.deoptimizePath(It);this.scope.context.requestTreeshakingPass()}getObjectEntity(){if(this.objectEntity!==null)return this.objectEntity;const t=[],r=[];for(const n of this.body.body){if(Mk(n))continue;const i=n.static?t:r,s=n.kind;if(i===r&&!s)continue;const o=s==="set"||s==="get"?s:"init";let a;if(n.computed){const l=n.key.getLiteralValueAtPath(Bt,Qe,this);if(typeof l=="symbol"){i.push({key:pe,kind:o,property:n});continue}a=String(l)}else a=n.key instanceof Ve?n.key.name:String(n.key.value);i.push({key:a,kind:o,property:n})}return t.unshift({key:"prototype",kind:"init",property:new li(r,this.superClass?new eR(this.superClass,["prototype"]):ea)}),this.objectEntity=new li(t,this.superClass||ea)}}N2.prototype.includeNode=jr;class Of extends N2{initialise(){super.initialise(),this.id!==null&&(this.id.variable.isId=!0)}parseNode(t){return t.id!==null&&(this.id=new Ve(this,this.scope.parent).parseNode(t.id)),super.parseNode(t)}render(t,r){const{exportNamesByVariable:n,format:i,snippets:{_:s,getPropertyAccess:o}}=r;if(this.id){const{variable:a,name:l}=this.id;i==="system"&&n.has(a)&&t.appendLeft(this.end,`${s}${Nl([a],r)};`);const c=a.getName(o);if(c!==l)return this.decorators.map(u=>u.render(t,r)),this.superClass?.render(t,r),this.body.render(t,{...r,useOriginalName:u=>u===a}),t.prependRight(this.start,`let ${c}${s}=${s}`),void t.prependLeft(this.end,";")}super.render(t,r)}applyDeoptimizations(){super.applyDeoptimizations();const{id:t,scope:r}=this;if(t){const{name:n,variable:i}=t;for(const s of r.accessedOutsideVariables.values())s!==i&&s.forbidName(n)}}}class Clt extends as{constructor(t){super("arguments",null,me,Bt,t,"other")}addArgumentToBeDeoptimized(t){}addReference(){this.deoptimizedArguments=[],this.addArgumentToBeDeoptimized=Alt}hasEffectsOnInteractionAtPath(t,{type:r}){return r!==0||t.length>1}includePath(t,r){super.includePath(t,r);for(const n of this.deoptimizedArguments)n.deoptimizePath(It);this.deoptimizedArguments.length=0}}function Alt(e){this.included?e.deoptimizePath(It):this.deoptimizedArguments?.push(e)}const jk=lr,klt=new Set([pe]),Dlt=new uu,Tlt=new Set([me]);class nR extends as{constructor(t,r,n,i){super(t,r,me,n,i,"parameter"),this.includedPathTracker=new nlt,this.argumentsToBeDeoptimized=new Set,this.deoptimizationInteractions=[],this.deoptimizations=new uu,this.deoptimizedFields=new Set,this.expressionsDependingOnKnownValue=[],this.knownValue=null,this.knownValueLiteral=$e}addArgumentForDeoptimization(t){if(this.updateKnownValue(t),t===me){if(!this.argumentsToBeDeoptimized.has(me)){this.argumentsToBeDeoptimized.add(me);for(const{interaction:r}of this.deoptimizationInteractions)ya(r);this.deoptimizationInteractions=jk}}else if(this.deoptimizedFields.has(pe))t.deoptimizePath([...this.initPath,pe]);else if(!this.argumentsToBeDeoptimized.has(t)){this.argumentsToBeDeoptimized.add(t);for(const r of this.deoptimizedFields)t.deoptimizePath([...this.initPath,r]);for(const{interaction:r,path:n}of this.deoptimizationInteractions)t.deoptimizeArgumentsOnInteractionAtPath(r,[...this.initPath,...n],Qe)}}markReassigned(){if(!this.isReassigned){super.markReassigned();for(const t of this.expressionsDependingOnKnownValue)t.deoptimizeCache();this.expressionsDependingOnKnownValue=lr}}deoptimizeCache(){this.markReassigned()}updateKnownValue(t){if(this.isReassigned)return;if(this.knownValue===null)return this.knownValue=t,void(this.knownValueLiteral=t.getLiteralValueAtPath(this.initPath,Qe,this));if(this.knownValue===t||this.knownValue instanceof Ve&&t instanceof Ve&&this.knownValue.variable===t.variable)return;const{knownValueLiteral:r}=this;typeof r!="symbol"&&t.getLiteralValueAtPath(this.initPath,Qe,this)===r||this.markReassigned()}getKnownValue(){return this.knownValue||me}getLiteralValueAtPath(t,r,n){if(this.isReassigned||t.length+this.initPath.length>6)return $e;const i=this.getKnownValue();return this.expressionsDependingOnKnownValue.push(n),r.withTrackedEntityAtPath(t,i,()=>i.getLiteralValueAtPath([...this.initPath,...t],r,n),$e)}hasEffectsOnInteractionAtPath(t,r,n){const{type:i}=r;return this.isReassigned||i===1||t.length+this.initPath.length>6?super.hasEffectsOnInteractionAtPath(t,r,n):!(i===2?(r.withNew?n.instantiated:n.called).trackEntityAtPathAndGetIfTracked(t,r.args,this):n.accessed.trackEntityAtPathAndGetIfTracked(t,this))&&this.getKnownValue().hasEffectsOnInteractionAtPath([...this.initPath,...t],r,n)}deoptimizeArgumentsOnInteractionAtPath(t,r){if(r.length>=2||this.argumentsToBeDeoptimized.has(me)||this.deoptimizationInteractions.length>=20||r.length===1&&(this.deoptimizedFields.has(pe)||t.type===2&&this.deoptimizedFields.has(r[0]))||this.initPath.length+r.length>6)ya(t);else if(!this.deoptimizations.trackEntityAtPathAndGetIfTracked(r,t.args)){for(const n of this.argumentsToBeDeoptimized)n.deoptimizeArgumentsOnInteractionAtPath(t,[...this.initPath,...r],Qe);this.argumentsToBeDeoptimized.has(me)||this.deoptimizationInteractions.push({interaction:t,path:r})}}deoptimizePath(t){if(t.length===0)return void this.markReassigned();if(this.deoptimizedFields.has(pe))return;const r=t[0];if(!this.deoptimizedFields.has(r)){this.deoptimizedFields.add(r);for(const n of this.argumentsToBeDeoptimized)n.deoptimizePath([...this.initPath,r]);r===pe&&(this.deoptimizationInteractions=jk,this.deoptimizations=Dlt,this.deoptimizedFields=klt,this.argumentsToBeDeoptimized=Tlt)}}getReturnExpressionWhenCalledAtPath(t){return t.length===0?this.deoptimizePath(It):this.deoptimizedFields.has(t[0])||this.deoptimizePath([t[0]]),Tr}includeArgumentPaths(t,r){this.includedPathTracker.includeAllPaths(t,r,this.initPath)}}class iR extends nR{constructor(t){super("this",null,Bt,t)}hasEffectsOnInteractionAtPath(t,r,n){return(n.replacedVariableInits.get(this)||me).hasEffectsOnInteractionAtPath(t,r,n)}}class Plt extends Xn{constructor(t){super(t,t.context),this.parent=t}addDeclaration(t,r,n,i,s){if(s==="var"){const o=t.name,a=this.hoistedVariables?.get(o)||this.variables.get(o);if(a){const c=a.kind;if(c==="parameter"&&a.declarations[0].parent.type==="CatchClause"){const u=this.parent.parent.addDeclaration(t,r,fo,i,s);return a.renderLikeHoisted(u),this.addHoistedVariable(o,u),u}return c==="var"?(a.addDeclaration(t,n),a):r.error(Pu(o),t.start)}const l=this.parent.parent.addDeclaration(t,r,n,i,s);return l.markInitializersForDeoptimization(),this.addHoistedVariable(o,l),l}return super.addDeclaration(t,r,n,i,s)}}class Flt extends Xn{constructor(t){super(t,t.context)}addDeclaration(t,r,n,i,s){const o=t.name,a=this.hoistedVariables?.get(o)||this.variables.get(o);if(a){const c=a.kind;if(!(s!=="var"&&s!=="function"||c!=="var"&&c!=="function"&&c!=="parameter"))return a.addDeclaration(t,n),a;r.error(Pu(o),t.start)}const l=new as(t.name,t,n,i,r,s);return this.variables.set(o,l),l}}class sR extends Xn{constructor(t,r){super(t,t.context),this.hasRest=!1,this.parameters=[],this.bodyScope=r?new Plt(this):new Flt(this)}addParameterDeclaration(t,r){const{name:n,start:i}=t;if(this.variables.get(n))return this.context.error(function(o){return{code:"DUPLICATE_ARGUMENT_NAME",message:`Duplicate argument name "${o}"`}}(n),i);const s=new nR(n,t,r,this.context);return this.variables.set(n,s),this.bodyScope.addHoistedVariable(n,s),s}addParameterVariables(t,r){this.parameters=t;for(const n of t)for(const i of n)i.alwaysRendered=!0;this.hasRest=r}includeCallArguments({args:t},r){let n=!1,i=!1;const s=this.hasRest&&this.parameters[this.parameters.length-1];let o=t.length-1;for(let a=1;a=1;a--){const l=this.parameters[a-1]||s,c=t[a];if(l)if(n=!1,l.length===0)i=!0;else for(const u of l)u.calledFromTryStatement&&(n=!0),u.included&&(i=!0,n?c.include(r,!0):(u.includeArgumentPaths(c,r),c.include(r,!1)));(i||c.shouldBeIncluded(r))&&(i=!0,c.include(r,n))}}}class oR extends sR{constructor(){super(...arguments),this.returnExpression=null,this.returnExpressions=[]}addReturnExpression(t){this.returnExpressions.push(t)}deoptimizeArgumentsOnCall({args:t}){const{parameters:r}=this;let n=0;for(;n=r.length-1)s.deoptimizePath(It);else{const o=r[n];if(o)for(const a of o)a.addArgumentForDeoptimization(s);this.addArgumentToBeDeoptimized(s)}}const i=this.hasRest?r.length-1:r.length;for(;n0?ad(this.body,t,this.start+1,this.end-1,r):super.render(t,r)}}Al.prototype.includeNode=Ke,Al.prototype.applyDeoptimizations=Se;class il extends Ft{constructor(){super(...arguments),this.declarationInit=null}addExportedVariables(t,r){this.argument.addExportedVariables(t,r)}declare(t,r,n){return this.declarationInit=n,this.argument.declare(t,np(r),n)}deoptimizeAssignment(t,r){this.argument.deoptimizeAssignment(np(t),r)}deoptimizePath(t){t.length===0&&this.argument.deoptimizePath(Bt)}hasEffectsOnInteractionAtPath(t,r,n){return t.length>0||this.argument.hasEffectsOnInteractionAtPath(Bt,r,n)}hasEffectsWhenDestructuring(t,r,n){return this.argument.hasEffectsWhenDestructuring(t,np(r),n)}includeDestructuredIfNecessary(t,r,n){return this.included=this.argument.includeDestructuredIfNecessary(t,np(r),n)||this.included}include(t,r){this.included||this.includeNode(t),this.argument.include(t,r)}markDeclarationReached(){this.argument.markDeclarationReached()}applyDeoptimizations(){this.deoptimized=!0,this.declarationInit!==null&&(this.declarationInit.deoptimizePath([pe,pe]),this.scope.context.requestTreeshakingPass())}}il.prototype.includeNode=jr;const np=e=>e.at(-1)===pe?e:[...e,pe];class Kh extends Ft{constructor(){super(...arguments),this.parameterVariableValuesDeoptimized=!1,this.includeCallArguments=this.scope.includeCallArguments.bind(this.scope)}get async(){return Ge(this.flags,256)}set async(t){this.flags=Ye(this.flags,256,t)}get deoptimizedReturn(){return Ge(this.flags,512)}set deoptimizedReturn(t){this.flags=Ye(this.flags,512,t)}get generator(){return Ge(this.flags,4194304)}set generator(t){this.flags=Ye(this.flags,4194304,t)}get hasCachedEffects(){return Ge(this.flags,67108864)}set hasCachedEffects(t){this.flags=Ye(this.flags,67108864,t)}deoptimizeArgumentsOnInteractionAtPath(t,r,n){t.type===2&&r.length===0?this.scope.deoptimizeArgumentsOnCall(t):this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(t,r,n)}deoptimizePath(t){this.getObjectEntity().deoptimizePath(t),t.length===1&&t[0]===pe&&(this.scope.getReturnExpression().deoptimizePath(It),this.scope.deoptimizeAllParameters())}getLiteralValueAtPath(t,r,n){return this.getObjectEntity().getLiteralValueAtPath(t,r,n)}getReturnExpressionWhenCalledAtPath(t,r,n,i){return t.length>0?this.getObjectEntity().getReturnExpressionWhenCalledAtPath(t,r,n,i):this.async?(this.deoptimizedReturn||(this.deoptimizedReturn=!0,this.scope.getReturnExpression().deoptimizePath(It),this.scope.context.requestTreeshakingPass()),Tr):[this.scope.getReturnExpression(),!1]}hasEffectsOnInteractionAtPath(t,r,n){if(t.length>0||r.type!==2)return this.getObjectEntity().hasEffectsOnInteractionAtPath(t,r,n);if(this.hasCachedEffects)return!0;if(this.async){const{propertyReadSideEffects:s}=this.scope.context.options.treeshake,o=this.scope.getReturnExpression();if(o.hasEffectsOnInteractionAtPath(["then"],ld,n)||s&&(s==="always"||o.hasEffectsOnInteractionAtPath(["then"],ba,n)))return this.hasCachedEffects=!0,!0}const{propertyReadSideEffects:i}=this.scope.context.options.treeshake;for(let s=0;st.type==="noSideEffects"))}parseNode(t){const{body:r,params:n}=t,{scope:i}=this,{bodyScope:s,context:o}=i,a=this.params=n.map(l=>new(o.getNodeConstructor(l.type))(this,i).parseNode(l));return i.addParameterVariables(a.map(l=>l.declare("parameter",Bt,me)),a[a.length-1]instanceof il),this.body=new(o.getNodeConstructor(r.type))(this,s).parseNode(r),super.parseNode(t)}}Kh.prototype.preventChildBlockScope=!0,Kh.prototype.includeNode=Ke,Kh.prototype.applyDeoptimizations=Se;class L2 extends Kh{constructor(){super(...arguments),this.objectEntity=null}createScope(t){this.scope=new aR(t,this),this.constructedEntity=new li(Object.create(null),ea),this.scope.thisVariable.addArgumentForDeoptimization(this.constructedEntity)}deoptimizeArgumentsOnInteractionAtPath(t,r,n){super.deoptimizeArgumentsOnInteractionAtPath(t,r,n),t.type===2&&r.length===0&&t.args[0]&&this.scope.thisVariable.addArgumentForDeoptimization(t.args[0])}hasEffects(t){return!this.annotationNoSideEffects&&!!this.id?.hasEffects(t)}hasEffectsOnInteractionAtPath(t,r,n){if(this.annotationNoSideEffects&&t.length===0&&r.type===2)return!1;if(super.hasEffectsOnInteractionAtPath(t,r,n))return!0;if(t.length===0&&r.type===2){const i=n.replacedVariableInits.get(this.scope.thisVariable);n.replacedVariableInits.set(this.scope.thisVariable,r.withNew?this.constructedEntity:me);const{brokenFlow:s,ignore:o,replacedVariableInits:a}=n;if(n.ignore={breaks:!1,continues:!1,labels:new Set,returnYield:!0,this:r.withNew},this.body.hasEffects(n))return this.hasCachedEffects=!0,!0;n.brokenFlow=s,i?a.set(this.scope.thisVariable,i):a.delete(this.scope.thisVariable),n.ignore=o}return!1}include(t,r){super.include(t,r),this.id?.include(t,r);const n=this.scope.argumentsVariable.included;for(const i of this.params)i instanceof Ve&&!n||i.include(t,r)}includeNode(t){this.included=!0;const r=this.scope.argumentsVariable.included;for(const n of this.params)n instanceof Ve&&!r||n.includePath(It,t)}initialise(){super.initialise(),this.id?.declare("function",Bt,this)}getObjectEntity(){return this.objectEntity!==null?this.objectEntity:this.objectEntity=new li([{key:"prototype",kind:"init",property:new li([],ea)}],ea)}}class hu extends L2{initialise(){super.initialise(),this.id!==null&&(this.id.variable.isId=!0)}onlyFunctionCallUsed(){return this.id?.variable.getOnlyFunctionCallUsed()??super.onlyFunctionCallUsed()}parseNode(t){return t.id!==null&&(this.id=new Ve(this,this.scope.parent).parseNode(t.id)),super.parseNode(t)}}class sl extends Ft{include(t,r){this.included=!0,this.declaration.include(t,r),r&&this.scope.context.includeVariableInModule(this.variable,It,t)}includePath(t,r){this.included=!0,this.declaration.includePath(t,r)}initialise(){super.initialise();const t=this.declaration;this.declarationName=t.id&&t.id.name||this.declaration.name,this.variable=this.scope.addExportDefaultDeclaration(this.declarationName||this.scope.context.getModuleName(),this,this.scope.context),this.scope.context.addExport(this)}removeAnnotations(t){this.declaration.removeAnnotations(t)}render(t,r,n){const{start:i,end:s}=n,o=function(a,l){return ga(a,Nr(a,"default",l)+7)}(t.original,this.start);if(this.declaration instanceof hu)this.renderNamedDeclaration(t,o,this.declaration.id===null?function(a,l){const c=Nr(a,"function",l)+8;a=a.slice(c,Nr(a,"(",c));const u=Nr(a,"*");return u===-1?c:c+u+1}(t.original,o):null,r);else if(this.declaration instanceof Of)this.renderNamedDeclaration(t,o,this.declaration.id===null?Nr(t.original,"class",i)+5:null,r);else{if(this.variable.getOriginalVariable()!==this.variable)return void Tu(this,t,i,s);if(!this.variable.included)return t.remove(this.start,o),this.declaration.render(t,r,{renderedSurroundingElement:Fs}),void(t.original[this.end-1]!==";"&&t.appendLeft(this.end,";"));this.renderVariableDeclaration(t,o,r)}this.declaration.render(t,r)}renderNamedDeclaration(t,r,n,i){const{exportNamesByVariable:s,format:o,snippets:{getPropertyAccess:a}}=i,l=this.variable.getName(a);t.remove(this.start,r),n!==null&&t.appendLeft(n,` ${l}`),o==="system"&&this.declaration instanceof Of&&s.has(this.variable)&&t.appendLeft(this.end,` ${Nl([this.variable],i)};`)}renderVariableDeclaration(t,r,{format:n,exportNamesByVariable:i,snippets:{cnst:s,getPropertyAccess:o}}){const a=t.original.charCodeAt(this.end-1)===59,l=n==="system"&&i.get(this.variable);l?(t.overwrite(this.start,r,`${s} ${this.variable.getName(o)} = exports(${JSON.stringify(l[0])}, `),t.appendRight(a?this.end-1:this.end,")"+(a?"":";"))):(t.overwrite(this.start,r,`${s} ${this.variable.getName(o)} = `),a||t.appendLeft(this.end,";"))}}sl.prototype.needsBoundaries=!0,sl.prototype.includeNode=Ke,sl.prototype.applyDeoptimizations=Se;const Olt=/[\n\r'\\\u2028\u2029]/,Ilt=/([\n\r'\u2028\u2029])/g,$lt=/\\/g;function ra(e){return Olt.test(e)?e.replace($lt,"\\\\").replace(Ilt,"\\$1"):e}const ew="_interopDefault",rw="_interopDefaultCompat",tm="_interopNamespace",em="_interopNamespaceCompat",La="_interopNamespaceDefault",If="_interopNamespaceDefaultOnly",_g="_mergeNamespaces",po="_documentCurrentScript",ry={auto:ew,compat:rw,default:null,defaultOnly:null,esModule:null},ny=(e,t)=>e==="esModule"||t&&(e==="auto"||e==="compat"),dd={auto:tm,compat:em,default:La,defaultOnly:If,esModule:null},Blt=(e,t)=>e!=="esModule"&&ny(e,t),nw=(e,t,r,n,i,s,o)=>{const a=new Set(e);for(const l of sw)t.has(l)&&a.add(l);return sw.map(l=>a.has(l)?lR[l](r,n,i,s,o,a):"").join("")},lR={[po]:(e,{_:t,n:r})=>`var ${po}${t}=${t}typeof document${t}!==${t}'undefined'${t}?${t}document.currentScript${t}:${t}null;${r}`,[rw](e,t,r){const{_:n,getDirectReturnFunction:i,n:s}=t,[o,a]=i(["e"],{functionReturn:!0,lineBreakIndent:null,name:rw});return`${o}${Mb(t)}${n}?${n}${r?zk(t):Uk(t)}${a}${s}${s}`},[ew](e,t,r){const{_:n,getDirectReturnFunction:i,n:s}=t,[o,a]=i(["e"],{functionReturn:!0,lineBreakIndent:null,name:ew});return`${o}e${n}&&${n}e.__esModule${n}?${n}${r?zk(t):Uk(t)}${a}${s}${s}`},[em](e,t,r,n,i,s){const{_:o,getDirectReturnFunction:a,n:l}=t;if(s.has(La)){const[c,u]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:em});return`${c}${Mb(t)}${o}?${o}e${o}:${o}${La}(e)${u}${l}${l}`}return`function ${em}(e)${o}{${l}${e}if${o}(${Mb(t)})${o}return e;${l}`+jb(e,e,t,r,n,i)+`}${l}${l}`},[If](e,t,r,n,i){const{getDirectReturnFunction:s,getObject:o,n:a,_:l}=t,[c,u]=s(["e"],{functionReturn:!0,lineBreakIndent:null,name:If});return`${c}${iw(n,Vk(i,o([[null,`__proto__:${l}null`],["default","e"]],{lineBreakIndent:null}),t))}${u}${a}${a}`},[La](e,t,r,n,i){const{_:s,n:o}=t;return`function ${La}(e)${s}{${o}`+jb(e,e,t,r,n,i)+`}${o}${o}`},[tm](e,t,r,n,i,s){const{_:o,getDirectReturnFunction:a,n:l}=t;if(s.has(La)){const[c,u]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:tm});return`${c}e${o}&&${o}e.__esModule${o}?${o}e${o}:${o}${La}(e)${u}${l}${l}`}return`function ${tm}(e)${o}{${l}${e}if${o}(e${o}&&${o}e.__esModule)${o}return e;${l}`+jb(e,e,t,r,n,i)+`}${l}${l}`},[_g](e,t,r,n,i){const{_:s,cnst:o,n:a}=t,l=o==="var"&&r;return`function ${_g}(n, m)${s}{${a}${e}${Nlt(`{${a}${e}${e}${e}if${s}(k${s}!==${s}'default'${s}&&${s}!(k in n))${s}{${a}`+(r?l?cR:Mlt:uR)(e,e+e+e+e,t)+`${e}${e}${e}}${a}${e}${e}}`,l,e,t)}${a}${e}return ${iw(n,Vk(i,"n",t))};${a}}${a}${a}`}},zk=({_:e,getObject:t})=>`e${e}:${e}${t([["default","e"]],{lineBreakIndent:null})}`,Uk=({_:e,getPropertyAccess:t})=>`e${t("default")}${e}:${e}e`,Mb=({_:e})=>`e${e}&&${e}typeof e${e}===${e}'object'${e}&&${e}'default'${e}in e`,jb=(e,t,r,n,i,s)=>{const{_:o,cnst:a,getObject:l,getPropertyAccess:c,n:u,s:h}=r,d=`{${u}`+(n?Llt:uR)(e,t+e+e,r)+`${t}${e}}`;return`${t}${a} n${o}=${o}Object.create(null${s?`,${o}{${o}[Symbol.toStringTag]:${o}${$f(l)}${o}}`:""});${u}${t}if${o}(e)${o}{${u}${t}${e}${Rlt(d,!n,r)}${u}${t}}${u}${t}n${c("default")}${o}=${o}e;${u}${t}return ${iw(i,"n")}${h}${u}`},Rlt=(e,t,{_:r,cnst:n,getFunctionIntro:i,s})=>n!=="var"||t?`for${r}(${n} k in e)${r}${e}`:`Object.keys(e).forEach(${i(["k"],{isAsync:!1,name:null})}${e})${s}`,Nlt=(e,t,r,{_:n,cnst:i,getDirectReturnFunction:s,getFunctionIntro:o,n:a})=>{if(t){const[l,c]=s(["e"],{functionReturn:!1,lineBreakIndent:{base:r,t:r},name:null});return`m.forEach(${l}e${n}&&${n}typeof e${n}!==${n}'string'${n}&&${n}!Array.isArray(e)${n}&&${n}Object.keys(e).forEach(${o(["k"],{isAsync:!1,name:null})}${e})${c});`}return`for${n}(var i${n}=${n}0;${n}i${n}<${n}m.length;${n}i++)${n}{${a}${r}${r}${i} e${n}=${n}m[i];${a}${r}${r}if${n}(typeof e${n}!==${n}'string'${n}&&${n}!Array.isArray(e))${n}{${n}for${n}(${i} k in e)${n}${e}${n}}${a}${r}}`},Llt=(e,t,r)=>{const{_:n,n:i}=r;return`${t}if${n}(k${n}!==${n}'default')${n}{${i}`+cR(e,t+e,r)+`${t}}${i}`},cR=(e,t,{_:r,cnst:n,getDirectReturnFunction:i,n:s})=>{const[o,a]=i([],{functionReturn:!0,lineBreakIndent:null,name:null});return`${t}${n} d${r}=${r}Object.getOwnPropertyDescriptor(e,${r}k);${s}${t}Object.defineProperty(n,${r}k,${r}d.get${r}?${r}d${r}:${r}{${s}${t}${e}enumerable:${r}true,${s}${t}${e}get:${r}${o}e[k]${a}${s}${t}});${s}`},Mlt=(e,t,{_:r,cnst:n,getDirectReturnFunction:i,n:s})=>{const[o,a]=i([],{functionReturn:!0,lineBreakIndent:null,name:null});return`${t}${n} d${r}=${r}Object.getOwnPropertyDescriptor(e,${r}k);${s}${t}if${r}(d)${r}{${s}${t}${e}Object.defineProperty(n,${r}k,${r}d.get${r}?${r}d${r}:${r}{${s}${t}${e}${e}enumerable:${r}true,${s}${t}${e}${e}get:${r}${o}e[k]${a}${s}${t}${e}});${s}${t}}${s}`},uR=(e,t,{_:r,n})=>`${t}n[k]${r}=${r}e[k];${n}`,iw=(e,t)=>e?`Object.freeze(${t})`:t,Vk=(e,t,{_:r,getObject:n})=>e?`Object.defineProperty(${t},${r}Symbol.toStringTag,${r}${$f(n)})`:t,sw=Object.keys(lR);function $f(e){return e([["value","'Module'"]],{lineBreakIndent:null})}class Hn extends Ft{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(t){return t.length>0||this.value===null&&this.scope.context.code.charCodeAt(this.start)!==110||typeof this.value=="bigint"||this.scope.context.code.charCodeAt(this.start)===47?$e:this.value}getReturnExpressionWhenCalledAtPath(t){return t.length!==1?Tr:fd(this.members,t[0])}hasEffectsOnInteractionAtPath(t,r,n){switch(r.type){case 0:return t.length>(this.value===null?0:1);case 1:return!0;case 2:return!!(this.included&&this.value instanceof RegExp&&(this.value.global||this.value.sticky))||t.length!==1||hd(this.members,t[0],r,n)}}initialise(){super.initialise(),this.members=function(t){if(t instanceof RegExp)return blt;switch(typeof t){case"boolean":return Jv;case"number":return Zv;case"string":return Ff}return Object.create(null)}(this.value)}parseNode(t){return this.value=t.value,this.regex=t.regex,super.parseNode(t)}render(t){typeof this.value=="string"&&t.indentExclusionRanges.push([this.start+1,this.end-1])}}function hR(e,t,r,n,i){if("getLiteralValueAtPathAsChainElement"in t){const s=t.getLiteralValueAtPathAsChainElement(Bt,Qe,i);if(s===Os||e.optional&&s==null)return Os}else if(e.optional&&t.getLiteralValueAtPath(Bt,Qe,i)==null)return Os;return e.getLiteralValueAtPath(r,n,i)}function jlt(e){return e.computed?function(t){return t instanceof Hn?String(t.value):null}(e.property):e.property.name}function fR(e){const t=e.propertyKey,r=e.object;if(typeof t=="string"){if(r instanceof Ve)return[{key:r.name,pos:r.start},{key:t,pos:e.property.start}];if(r instanceof So){const n=fR(r);return n&&[...n,{key:t,pos:e.property.start}]}}return null}Hn.prototype.includeNode=jr;class So extends Ft{constructor(){super(...arguments),this.variable=null,this.expressionsToBeDeoptimized=[]}get computed(){return Ge(this.flags,1024)}set computed(t){this.flags=Ye(this.flags,1024,t)}get optional(){return Ge(this.flags,128)}set optional(t){this.flags=Ye(this.flags,128,t)}get assignmentDeoptimized(){return Ge(this.flags,16)}set assignmentDeoptimized(t){this.flags=Ye(this.flags,16,t)}get bound(){return Ge(this.flags,32)}set bound(t){this.flags=Ye(this.flags,32,t)}get isUndefined(){return Ge(this.flags,64)}set isUndefined(t){this.flags=Ye(this.flags,64,t)}bind(){this.bound=!0;const t=fR(this),r=t&&this.scope.findVariable(t[0].key);if(r?.isNamespace){const n=dR(r,t.slice(1),this.scope.context);n?n==="undefined"?this.isUndefined=!0:(this.variable=n,this.scope.addNamespaceMemberAccess(function(i){let s=i[0].key;for(let o=1;o0&&n.hasEffectsOnInteractionAtPath(r,ba,t)}include(t,r){this.included||this.includeNode(t),this.object.include(t,r),this.property.include(t,r)}includeNode(t){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.variable?this.scope.context.includeVariableInModule(this.variable,Bt,t):this.isUndefined||this.object.includePath([this.propertyKey],t)}includeNodeAsAssignmentTarget(t){this.included=!0,this.assignmentDeoptimized||this.applyAssignmentDeoptimization(),this.variable?this.scope.context.includeVariableInModule(this.variable,Bt,t):this.isUndefined||this.object.includePath([this.propertyKey],t)}includePath(t,r){this.included||this.includeNode(r),this.variable?this.variable?.includePath(t,r):this.isUndefined||this.object.includePath([this.propertyKey,...t.length<6?t:[...t.slice(0,6),pe]],r)}includeAsAssignmentTarget(t,r,n){this.included||this.includeNodeAsAssignmentTarget(t),n&&!this.deoptimized&&this.applyDeoptimizations(),this.object.include(t,r),this.property.include(t,r)}includeCallArguments(t,r){this.variable?this.variable.includeCallArguments(t,r):C2(t,r)}includeDestructuredIfNecessary(t,r,n){return!!(this.included||=r.length>0&&!t.brokenFlow&&n.hasEffectsOnInteractionAtPath(r,ba,Ll()))&&(n.include(t,!1),!0)}initialise(){super.initialise(),this.dynamicPropertyKey=jlt(this),this.propertyKey=this.dynamicPropertyKey===null?pe:this.dynamicPropertyKey,this.accessInteraction={args:[this.object],type:0}}render(t,r,{renderedParentType:n,isCalleeOfRenderedParent:i,renderedSurroundingElement:s}=Kr){if(this.variable||this.isUndefined){const{snippets:{getPropertyAccess:o}}=r;let a=this.variable?this.variable.getName(o):"undefined";n&&i&&(a="0, "+a),t.overwrite(this.start,this.end,a,{contentOnly:!0,storeName:!0})}else n&&i&&t.appendRight(this.start,"0, "),this.object.render(t,r,{renderedSurroundingElement:s}),this.property.render(t,r)}setAssignedValue(t){this.assignmentInteraction={args:[this.object,t],type:1}}applyDeoptimizations(){this.deoptimized=!0;const{propertyReadSideEffects:t}=this.scope.context.options.treeshake;this.bound&&t&&!this.variable&&!this.isUndefined&&(this.object.deoptimizeArgumentsOnInteractionAtPath(this.accessInteraction,[this.propertyKey],Qe),this.scope.context.requestTreeshakingPass()),this.variable&&(this.variable.addUsedPlace(this),this.scope.context.requestTreeshakingPass())}applyAssignmentDeoptimization(){this.assignmentDeoptimized=!0;const{propertyReadSideEffects:t}=this.scope.context.options.treeshake;this.bound&&t&&!this.variable&&!this.isUndefined&&(this.object.deoptimizeArgumentsOnInteractionAtPath(this.assignmentInteraction,[this.propertyKey],Qe),this.scope.context.requestTreeshakingPass())}disallowNamespaceReassignment(){this.object instanceof Ve&&this.scope.findVariable(this.object.name).isNamespace&&(this.variable&&this.scope.context.includeVariableInModule(this.variable,It,Xi()),this.scope.context.log(oe,WB(this.object.name,this.scope.context.module.id),this.start))}getDynamicPropertyKey(){if(this.dynamicPropertyKey===null){this.dynamicPropertyKey=this.propertyKey;const t=this.property.getLiteralValueAtPath(Bt,Qe,this);return this.dynamicPropertyKey=t===_2?t:typeof t=="symbol"?pe:String(t)}return this.dynamicPropertyKey}hasAccessEffect(t){const{propertyReadSideEffects:r}=this.scope.context.options.treeshake;return!(this.variable||this.isUndefined)&&r&&(r==="always"||this.object.hasEffectsOnInteractionAtPath([this.getDynamicPropertyKey()],this.accessInteraction,t))}}function dR(e,t,r){if(t.length===0)return e;if(!e.isNamespace||e instanceof gg)return null;const n=t[0].key,i=e.context.traceExport(n);if(!i){if(t.length===1){const s=e.context.fileName;return r.log(oe,pg(n,r.module.id,s),t[0].pos),"undefined"}return null}return dR(i,t.slice(1),r)}const zb="ROLLUP_FILE_URL_",Ub="import";class pR extends Ft{constructor(){super(...arguments),this.metaProperty=null,this.preliminaryChunkId=null,this.referenceId=null}getReferencedFileName(t){const{meta:{name:r},metaProperty:n}=this;return r===Ub&&n?.startsWith(zb)?t.getFileName(n.slice(16)):null}hasEffects(){return!1}hasEffectsOnInteractionAtPath(t,{type:r}){return t.length>1||r!==0}include(){this.included||this.includeNode()}includeNode(){if(this.included=!0,this.meta.name===Ub){this.scope.context.addImportMeta(this);const t=this.parent,r=this.metaProperty=t instanceof So&&typeof t.propertyKey=="string"?t.propertyKey:null;r?.startsWith(zb)&&(this.referenceId=r.slice(16))}}render(t,r){const{format:n,pluginDriver:i,snippets:s}=r,{scope:{context:{module:o}},meta:{name:a},metaProperty:l,parent:c,preliminaryChunkId:u,referenceId:h,start:d,end:g}=this,{id:y}=o;if(a!==Ub)return;const f=u;if(h){const m=i.getFileName(h),b=od(_l(xl(f),m)),w=i.hookFirstSync("resolveFileUrl",[{chunkId:f,fileName:m,format:n,moduleId:y,referenceId:h,relativePath:b}])||Vlt[n](b);return void t.overwrite(c.start,c.end,w,{contentOnly:!0})}let p=i.hookFirstSync("resolveImportMeta",[l,{chunkId:f,format:n,moduleId:y}]);p||(p=Wlt[n]?.(l,{chunkId:f,snippets:s}),r.accessedDocumentCurrentScript||=mR.includes(n)&&p!=="undefined"),typeof p=="string"&&(c instanceof So?t.overwrite(c.start,c.end,p,{contentOnly:!0}):t.overwrite(d,g,p,{contentOnly:!0}))}setResolution(t,r,n){this.preliminaryChunkId=n;const i=(this.metaProperty?.startsWith(zb)?Ult:zlt)[t];i.length>0&&this.scope.addAccessedGlobals(i,r)}}const mR=["cjs","iife","umd"],zlt={amd:["document","module","URL"],cjs:["document","require","URL",po],es:[],iife:["document","URL",po],system:["module"],umd:["document","require","URL",po]},Ult={amd:["document","require","URL"],cjs:["document","require","URL"],es:[],iife:["document","URL"],system:["module","URL"],umd:["document","require","URL"]},Xh=(e,t="URL")=>`new ${t}(${e}).href`,Vb=(e,t=!1)=>Xh(`'${ra(e)}', ${t?"typeof document === 'undefined' ? location.href : ":""}document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || document.baseURI`),ip=e=>(t,{chunkId:r})=>{const n=e(r);return t===null?`({ url: ${n} })`:t==="url"?n:"undefined"},ow=e=>`require('u' + 'rl').pathToFileURL(${e}).href`,Wk=e=>ow(`__dirname + '/${ra(e)}'`),Wb=(e,t=!1)=>`${t?"typeof document === 'undefined' ? location.href : ":""}(${po} && ${po}.tagName.toUpperCase() === 'SCRIPT' && ${po}.src || new URL('${ra(e)}', document.baseURI).href)`,Vlt={amd:e=>(e[0]!=="."&&(e="./"+e),Xh(`require.toUrl('${ra(e)}'), document.baseURI`)),cjs:e=>`(typeof document === 'undefined' ? ${Wk(e)} : ${Vb(e)})`,es:e=>Xh(`'${ra(e)}', import.meta.url`),iife:e=>Vb(e),system:e=>Xh(`'${ra(e)}', module.meta.url`),umd:e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${Wk(e)} : ${Vb(e,!0)})`},Wlt={amd:ip(()=>Xh("module.uri, document.baseURI")),cjs:ip(e=>`(typeof document === 'undefined' ? ${ow("__filename")} : ${Wb(e)})`),iife:ip(e=>Wb(e)),system:(e,{snippets:{getPropertyAccess:t}})=>e===null?"module.meta":`module.meta${t(e)}`,umd:ip(e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${ow("__filename")} : ${Wb(e,!0)})`)};class gR extends Ml{constructor(){super("undefined")}getLiteralValueAtPath(){}}class Rs extends as{constructor(t,r,n){super(t,r,r.declaration,Bt,n,"other"),this.hasId=!1,this.originalId=null,this.originalVariable=null;const i=r.declaration;(i instanceof hu||i instanceof Of)&&i.id?(this.hasId=!0,this.originalId=i.id):i instanceof Ve&&(this.originalId=i)}addReference(t){this.hasId||(this.name=t.name)}addUsedPlace(t){const r=this.getOriginalVariable();r===this?super.addUsedPlace(t):r.addUsedPlace(t)}forbidName(t){const r=this.getOriginalVariable();r===this?super.forbidName(t):r.forbidName(t)}getAssignedVariableName(){return this.originalId&&this.originalId.name||null}getBaseVariableName(){const t=this.getOriginalVariable();return t===this?super.getBaseVariableName():t.getBaseVariableName()}getDirectOriginalVariable(){return!this.originalId||!this.hasId&&(this.originalId.isPossibleTDZ()||this.originalId.variable.isReassigned||this.originalId.variable instanceof gR||"syntheticNamespace"in this.originalId.variable)?null:this.originalId.variable}getName(t){const r=this.getOriginalVariable();return r===this?super.getName(t):r.getName(t)}getOriginalVariable(){if(this.originalVariable)return this.originalVariable;let t,r=this;const n=new Set;do n.add(r),t=r,r=t.getDirectOriginalVariable();while(r instanceof Rs&&!n.has(r));return this.originalVariable=r||t}}class Jh extends Ml{constructor(t){super(t.getModuleName()),this.memberVariables=null,this.mergedNamespaces=[],this.referencedEarly=!1,this.references=[],this.context=t,this.module=t.module}addReference(t){this.references.push(t),this.name=t.name}deoptimizeArgumentsOnInteractionAtPath(t,r,n){if(r.length>1||r.length===1&&t.type===2){const i=r[0];typeof i=="string"?this.getMemberVariables()[i]?.deoptimizeArgumentsOnInteractionAtPath(t,r.slice(1),n):ya(t)}}deoptimizePath(t){if(t.length>1){const r=t[0];typeof r=="string"&&this.getMemberVariables()[r]?.deoptimizePath(t.slice(1))}}getLiteralValueAtPath(t){return t[0]===_2?"Module":$e}getMemberVariables(){if(this.memberVariables)return this.memberVariables;const t=Object.create(null),r=[...this.context.getExports(),...this.context.getReexports()].sort();for(const n of r)if(n[0]!=="*"&&n!==this.module.info.syntheticNamedExports){const i=this.context.traceExport(n);i&&(t[n]=i)}return this.memberVariables=t}hasEffectsOnInteractionAtPath(t,r,n){const{type:i}=r;if(t.length===0)return!0;if(t.length===1&&i!==2)return i===1;const s=t[0];if(typeof s!="string")return!0;const o=this.getMemberVariables()[s];return!o||o.hasEffectsOnInteractionAtPath(t.slice(1),r,n)}includePath(t,r){super.includePath(t,r),this.context.includeAllExports()}prepare(t){this.mergedNamespaces.length>0&&this.module.scope.addAccessedGlobals([_g],t)}renderBlock(t){const{exportNamesByVariable:r,format:n,freeze:i,indent:s,symbols:o,snippets:{_:a,cnst:l,getObject:c,getPropertyAccess:u,n:h,s:d}}=t,g=this.getMemberVariables(),y=Object.entries(g).filter(([p,m])=>m.included).map(([p,m])=>this.referencedEarly||m.isReassigned||m===this?[null,`get ${Q0(p)}${a}()${a}{${a}return ${m.getName(u)}${d}${a}}`]:[p,m.getName(u)]);y.unshift([null,`__proto__:${a}null`]);let f=c(y,{lineBreakIndent:{base:"",t:s}});if(this.mergedNamespaces.length>0){const p=this.mergedNamespaces.map(m=>m.getName(u));f=`/*#__PURE__*/${_g}(${f},${a}[${p.join(`,${a}`)}])`}else o&&(f=`/*#__PURE__*/Object.defineProperty(${f},${a}Symbol.toStringTag,${a}${$f(c)})`),i&&(f=`/*#__PURE__*/Object.freeze(${f})`);return f=`${l} ${this.getName(u)}${a}=${a}${f};`,n==="system"&&r.has(this)&&(f+=`${h}${Nl([this],t)};`),f}renderFirst(){return this.referencedEarly}setMergedNamespaces(t){this.mergedNamespaces=t;const r=this.context.getModuleExecIndex();for(const n of this.references){const{context:i}=n.scope;if(i.getModuleExecIndex()<=r){this.referencedEarly=!0;break}}}}Jh.prototype.isNamespace=!0;class Un extends Ml{constructor(t,r,n){super(r),this.baseVariable=null,this.context=t,this.module=t.module,this.syntheticNamespace=n}getBaseVariable(){if(this.baseVariable)return this.baseVariable;let t=this.syntheticNamespace;for(;t instanceof Rs||t instanceof Un;){if(t instanceof Rs){const r=t.getOriginalVariable();if(r===t)break;t=r}t instanceof Un&&(t=t.syntheticNamespace)}return this.baseVariable=t}getBaseVariableName(){return this.syntheticNamespace.getBaseVariableName()}getName(t){return`${this.syntheticNamespace.getName(t)}${t(this.name)}`}includePath(t,r){super.includePath(t,r),this.context.includeVariableInModule(this.syntheticNamespace,t,r)}setRenderNames(t,r){super.setRenderNames(t,r)}}class Tc{constructor(t,r,n){this.options=r,this.inputBase=n,this.defaultVariableName="",this.namespaceVariableName="",this.variableName="",this.fileName=null,this.importAttributes=null,this.id=t.id,this.moduleInfo=t.info,this.renormalizeRenderPath=t.renormalizeRenderPath,this.suggestedVariableName=t.suggestedVariableName}getFileName(){if(this.fileName)return this.fileName;const{paths:t}=this.options;return this.fileName=(typeof t=="function"?t(this.id):t[this.id])||(this.renormalizeRenderPath?od(_l(this.inputBase,this.id)):this.id)}getImportAttributes(t){return this.importAttributes||=yR(["es","cjs"].includes(this.options.format)&&this.options.externalImportAttributes&&this.moduleInfo.attributes,t)}getImportPath(t){return ra(this.renormalizeRenderPath?PB(t,this.getFileName(),this.options.format==="amd",!1):this.getFileName())}}function yR(e,{getObject:t}){if(!e)return null;const r=Object.entries(e).map(([n,i])=>[n,`'${i}'`]);return r.length>0?t(r,{lineBreakIndent:null}):null}function bR(e){return e.endsWith(".js")?e.slice(0,-3):e}function qk(e,t){return e.autoId?`${e.basePath?e.basePath+"/":""}${bR(t)}`:e.id??""}function sp(e,t,r,n,i,s,o,a,l="return "){const{_:c,getDirectReturnFunction:u,getFunctionIntro:h,getPropertyAccess:d,n:g,s:y}=i;if(!r)return`${g}${g}${l}${function(p,m,b,w,x){if(p.length>0)return p[0].local;for(const{defaultVariableName:E,importPath:S,isChunk:C,name:A,namedExportsMode:$,namespaceVariableName:O,reexports:I}of m)if(I)return Hk(A,I[0].imported,$,C,E,O,b,S,w,x)}(e,t,n,o,d)};`;let f="";if(r){for(const{defaultVariableName:p,importPath:m,isChunk:b,name:w,namedExportsMode:x,namespaceVariableName:E,reexports:S}of t)if(S){for(const C of S)if(C.reexported!=="*"){const A=Hk(w,C.imported,x,b,p,E,n,m,o,d);if(f&&(f+=g),C.imported!=="*"&&C.needsLiveBinding){const[$,O]=u([],{functionReturn:!0,lineBreakIndent:null,name:null});f+=`Object.defineProperty(exports,${c}${JSON.stringify(C.reexported)},${c}{${g}${s}enumerable:${c}true,${g}${s}get:${c}${$}${A}${O}${g}});`}else C.reexported==="__proto__"?f+=`Object.defineProperty(exports,${c}"__proto__",${c}{${g}${s}enumerable:${c}true,${g}${s}value:${c}${A}${g}});`:f+=`exports${d(C.reexported)}${c}=${c}${A};`}}}for(const{exported:p,local:m}of e){const b=`exports${d(p)}`;b!==m&&(f&&(f+=g),f+=p==="__proto__"?`Object.defineProperty(exports,${c}"__proto__",${c}{${g}${s}enumerable:${c}true,${g}${s}value:${c}${m}${g}});`:`${b}${c}=${c}${m};`)}if(r){for(const{name:p,reexports:m}of t)if(m){for(const b of m)if(b.reexported==="*"){if(f&&(f+=g),!b.needsLiveBinding&&a){const x="'__proto__'";f+=`Object.prototype.hasOwnProperty.call(${p},${c}${x})${c}&&${g}${s}!Object.prototype.hasOwnProperty.call(exports,${c}${x})${c}&&${g}${s}Object.defineProperty(exports,${c}${x},${c}{${g}${s}${s}enumerable:${c}true,${g}${s}${s}value:${c}${p}[${x}]${g}${s}});${g}${g}`}const w=`{${g}${s}if${c}(k${c}!==${c}'default'${c}&&${c}!Object.prototype.hasOwnProperty.call(exports,${c}k))${c}${qlt(p,b.needsLiveBinding,s,i)}${y}${g}}`;f+=`Object.keys(${p}).forEach(${h(["k"],{isAsync:!1,name:null})}${w});`}}}return f?`${g}${g}${f}`:""}function Hk(e,t,r,n,i,s,o,a,l,c){if(t==="default"){if(!n){const u=o(a),h=ry[u]?i:e;return ny(u,l)?`${h}${c("default")}`:h}return r?`${e}${c("default")}`:e}return t==="*"?(n?!r:dd[o(a)])?s:e:`${e}${c(t)}`}function Gk(e){return e([["value","true"]],{lineBreakIndent:null})}function op(e,t,r,{_:n,getObject:i}){if(e){if(t)return r?`Object.defineProperties(exports,${n}${i([["__esModule",Gk(i)],[null,`[Symbol.toStringTag]:${n}${$f(i)}`]],{lineBreakIndent:null})});`:`Object.defineProperty(exports,${n}'__esModule',${n}${Gk(i)});`;if(r)return`Object.defineProperty(exports,${n}Symbol.toStringTag,${n}${$f(i)});`}return""}const qlt=(e,t,r,{_:n,getDirectReturnFunction:i,n:s})=>{if(t){const[o,a]=i([],{functionReturn:!0,lineBreakIndent:null,name:null});return`Object.defineProperty(exports,${n}k,${n}{${s}${r}${r}enumerable:${n}true,${s}${r}${r}get:${n}${o}${e}[k]${a}${s}${r}})`}return`exports[k]${n}=${n}${e}[k]`};function ap(e,t,r,n,i,s,o,a){const{_:l,cnst:c,n:u}=a,h=new Set,d=[],g=(y,f,p)=>{h.add(f),d.push(`${c} ${y}${l}=${l}/*#__PURE__*/${f}(${p});`)};for(const{defaultVariableName:y,imports:f,importPath:p,isChunk:m,name:b,namedExportsMode:w,namespaceVariableName:x,reexports:E}of e)if(m){for(const{imported:S,reexported:C}of[...f||[],...E||[]])if(S==="*"&&C!=="*"){w||g(x,If,b);break}}else{const S=t(p);let C=!1,A=!1;for(const{imported:$,reexported:O}of[...f||[],...E||[]]){let I,M;$==="default"?C||(C=!0,y!==x&&(M=y,I=ry[S])):$!=="*"||O==="*"||A||(A=!0,I=dd[S],M=x),I&&g(M,I,b)}}return`${nw(h,s,o,a,r,n,i)}${d.length>0?`${d.join(u)}${u}${u}`:""}`}function Yk(e,t){return e[0]!=="."?e:t?(r=e).endsWith(".js")?r:r+".js":bR(e);var r}const Hlt=new Set(["assert","assert/strict","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","diagnostics_channel","dns","dns/promises","domain","events","fs","fs/promises","http","http2","https","inspector","inspector/promises","module","net","os","path","path/posix","path/win32","perf_hooks","process","punycode","querystring","readline","readline/promises","repl","stream","stream/consumers","stream/promises","stream/web","string_decoder","timers","timers/promises","tls","trace_events","tty","url","util","util/types","v8","vm","wasi","worker_threads","zlib"]);function qb(e,t){const r=t.map(({importPath:n})=>n).filter(n=>Hlt.has(n)||n.startsWith("node:"));r.length!==0&&e(oe,function(n){return{code:"MISSING_NODE_BUILTINS",ids:n,message:`Creating a browser bundle that depends on Node.js built-in modules (${_o(n)}). You might need to include https://github.com/FredKSchott/rollup-plugin-polyfill-node`}}(r))}const rm=(e,t)=>e.split(".").map(t).join("");function Hb(e,t,r,n,{_:i,getPropertyAccess:s},o){const a=e.split("."),l=a[0]in Object.prototype;o&&l&&o(oe,HB(a[0])),a[0]=(typeof r=="function"?r(a[0]):l?a[0]:r[a[0]])||a[0];const c=a.pop();let u=t,h=[...a.map(d=>(u+=s(d),`${u}${i}=${i}${u}${i}||${i}{}`)),`${u}${s(c)}`].join(`,${i}`)+`${i}=${i}${n}`;return a.length>0&&(h=`(${h})`),h}function Kk(e){let t=e.length;for(;t--;){const{imports:r,reexports:n}=e[t];if(r||n)return e.slice(0,t+1)}return[]}const fu="_missingExportShim",Glt=({dependencies:e,exports:t})=>{const r=new Set(t.map(n=>n.exported));r.add("default");for(const{reexports:n}of e)if(n)for(const i of n)i.reexported!=="*"&&r.add(i.reexported);return r},Ylt=(e,t,{_:r,cnst:n,getObject:i,n:s})=>{if(e){const o=[...e].map(a=>[a,"1"]);return o.unshift([null,`__proto__:${r}null`]),`${s}${t}${n} _starExcludes${r}=${r}${i(o,{lineBreakIndent:{base:t,t}})};`}return""},Klt=(e,t,{_:r,n})=>e.length>0?`${n}${t}var ${e.join(`,${r}`)};`:"",Xlt=(e,t,r)=>M2(e.filter(n=>n.hoisted).map(n=>({name:n.exported,value:n.local})),t,r);function M2(e,t,{_:r,n}){return e.length===0?"":e.length===1?`exports(${JSON.stringify(e[0].name)},${r}${e[0].value});${n}${n}`:`exports({${n}`+e.map(({name:i,value:s})=>`${t}${Q0(i)}:${r}${s}`).join(`,${n}`)+`${n}});${n}${n}`}const Jlt=(e,t,r)=>M2(e.filter(n=>n.expression).map(n=>({name:n.exported,value:n.local})),t,r),Zlt=(e,t,r)=>M2(e.filter(n=>n.local===fu).map(n=>({name:n.exported,value:fu})),t,r);function Gb(e,t,r){return e?`${t}${rm(e,r)}`:"null"}var Qlt={amd:function(e,{accessedGlobals:t,dependencies:r,exports:n,hasDefaultExport:i,hasExports:s,id:o,indent:a,intro:l,isEntryFacade:c,isModuleFacade:u,namedExportsMode:h,log:d,outro:g,snippets:y},{amd:f,esModule:p,externalLiveBindings:m,freeze:b,generatedCode:{symbols:w},interop:x,reexportProtoFromExternal:E,strict:S}){qb(d,r);const C=r.map(F=>`'${Yk(F.importPath,f.forceJsExtensionForImports)}'`),A=r.map(F=>F.name),{n:$,getNonArrowFunctionIntro:O,_:I}=y;h&&s&&(A.unshift("exports"),C.unshift("'exports'")),t.has("require")&&(A.unshift("require"),C.unshift("'require'")),t.has("module")&&(A.unshift("module"),C.unshift("'module'"));const M=qk(f,o),q=(M?`'${M}',${I}`:"")+(C.length>0?`[${C.join(`,${I}`)}],${I}`:""),H=S?`${I}'use strict';`:"";e.prepend(`${l}${ap(r,x,m,b,w,t,a,y)}`);const G=sp(n,r,h,x,y,a,m,E);let Y=op(h&&s,c&&(p===!0||p==="if-default-prop"&&i),u&&w,y);Y&&(Y=$+$+Y),e.append(`${G}${Y}${g}`).indent(a).prepend(`${f.define}(${q}(${O(A,{isAsync:!1,name:null})}{${H}${$}${$}`).append(`${$}${$}}));`)},cjs:function(e,{accessedGlobals:t,dependencies:r,exports:n,hasDefaultExport:i,hasExports:s,indent:o,intro:a,isEntryFacade:l,isModuleFacade:c,namedExportsMode:u,outro:h,snippets:d},{compact:g,esModule:y,externalLiveBindings:f,freeze:p,interop:m,generatedCode:{symbols:b},reexportProtoFromExternal:w,strict:x}){const{_:E,n:S}=d,C=x?`'use strict';${S}${S}`:"";let A=op(u&&s,l&&(y===!0||y==="if-default-prop"&&i),c&&b,d);A&&(A+=S+S);const $=function(M,{_:q,cnst:H,n:G},Y){let F="",T=!1;for(const{importPath:N,name:U,reexports:J,imports:W}of M)J||W?(F+=Y&&T?",":`${F?`;${G}`:""}${H} `,T=!0,F+=`${U}${q}=${q}require('${N}')`):(F&&(F+=Y&&!T?",":`;${G}`),T=!1,F+=`require('${N}')`);return F?`${F};${G}${G}`:""}(r,d,g),O=ap(r,m,f,p,b,t,o,d);e.prepend(`${C}${a}${A}${$}${O}`);const I=sp(n,r,u,m,d,o,f,w,`module.exports${E}=${E}`);e.append(`${I}${h}`)},es:function(e,{accessedGlobals:t,indent:r,intro:n,outro:i,dependencies:s,exports:o,snippets:a},{externalLiveBindings:l,freeze:c,generatedCode:{symbols:u},importAttributesKey:h}){const{n:d}=a,g=function(f,p,{_:m}){const b=[];for(const{importPath:w,reexports:x,imports:E,name:S,attributes:C}of f){const A=`'${w}'${C?`${m}${p}${m}${C}`:""};`;if(x||E){if(E){let $=null,O=null;const I=[];for(const M of E)M.imported==="default"?$=M:M.imported==="*"?O=M:I.push(M);O&&b.push(`import${m}*${m}as ${O.local} from${m}${A}`),$&&I.length===0?b.push(`import ${$.local} from${m}${A}`):I.length>0&&b.push(`import ${$?`${$.local},${m}`:""}{${m}${I.map(M=>M.imported===M.local?M.imported:`${ac(M.imported)} as ${M.local}`).join(`,${m}`)}${m}}${m}from${m}${A}`)}if(x){let $=null;const O=[],I=[];for(const M of x)M.reexported==="*"?$=M:M.imported==="*"?O.push(M):I.push(M);if($&&b.push(`export${m}*${m}from${m}${A}`),O.length>0){E&&E.some(M=>M.imported==="*"&&M.local===S)||b.push(`import${m}*${m}as ${S} from${m}${A}`);for(const M of O)b.push(`export${m}{${m}${S===M.reexported?S:`${S} as ${ac(M.reexported)}`} };`)}I.length>0&&b.push(`export${m}{${m}${I.map(M=>M.imported===M.reexported?ac(M.imported):`${ac(M.imported)} as ${ac(M.reexported)}`).join(`,${m}`)}${m}}${m}from${m}${A}`)}}else b.push(`import${m}${A}`)}return b}(s,h,a);g.length>0&&(n+=g.join(d)+d+d),(n+=nw(null,t,r,a,l,c,u))&&e.prepend(n);const y=function(f,{_:p,cnst:m}){const b=[],w=new Array(f.length);let x=0;for(const E of f)E.expression&&b.push(`${m} ${E.local}${p}=${p}${E.expression};`),w[x++]=E.exported===E.local?E.local:`${E.local} as ${ac(E.exported)}`;return w.length>0&&b.push(`export${p}{${p}${w.join(`,${p}`)}${p}};`),b}(o,a);y.length>0&&e.append(d+d+y.join(d).trim()),i&&e.append(i),e.trim()},iife:function(e,{accessedGlobals:t,dependencies:r,exports:n,hasDefaultExport:i,hasExports:s,indent:o,intro:a,namedExportsMode:l,log:c,outro:u,snippets:h},{compact:d,esModule:g,extend:y,freeze:f,externalLiveBindings:p,reexportProtoFromExternal:m,globals:b,interop:w,name:x,generatedCode:{symbols:E},strict:S}){const{_:C,getNonArrowFunctionIntro:A,getPropertyAccess:$,n:O}=h,I=x&&x.includes("."),M=!y&&!I;if(x&&M&&(KB(q=x)||YB.test(q)))return Pt(function(z){return{code:"ILLEGAL_IDENTIFIER_AS_NAME",message:`Given name "${z}" is not a legal JS identifier. If you need this, you can try "output.extend: true".`,url:Dr("configuration-options/#output-extend")}}(x));var q;qb(c,r);const H=Kk(r),G=H.map(z=>z.globalName||"null"),Y=H.map(z=>z.name);s&&!x&&c(oe,{code:wk,message:'If you do not supply "output.name", you may not be able to access the exports of an IIFE bundle.',url:Dr(bk)}),l&&s&&(y?(G.unshift(`this${rm(x,$)}${C}=${C}this${rm(x,$)}${C}||${C}{}`),Y.unshift("exports")):(G.unshift("{}"),Y.unshift("exports")));const F=S?`${o}'use strict';${O}`:"",T=ap(r,w,p,f,E,t,o,h);e.prepend(`${a}${T}`);let N=`(${A(Y,{isAsync:!1,name:null})}{${O}${F}${O}`;s&&(!x||y&&l||(N=(M?`var ${x}`:`this${rm(x,$)}`)+`${C}=${C}${N}`),I&&(N=function(z,V,Z,{_:nt,getPropertyAccess:et,s:it},lt,ht){const pt=z.split("."),vt=pt[0]in Object.prototype;ht&&vt&&ht(oe,HB(pt[0])),pt[0]=(typeof Z=="function"?Z(pt[0]):vt?pt[0]:Z[pt[0]])||pt[0],pt.pop();let Ct=V;return pt.map(Dt=>(Ct+=et(Dt),`${Ct}${nt}=${nt}${Ct}${nt}||${nt}{}${it}`)).join(lt?",":` `)+(lt&&pt.length>0?";":` `)}(x,"this",b,h,d,c)+N));let U=`${O}${O}})(${G.join(`,${C}`)});`;s&&!y&&l&&(U=`${O}${O}${o}return exports;${U}`);const J=sp(n,r,l,w,h,o,p,m);let W=op(l&&s,g===!0||g==="if-default-prop"&&i,E,h);W&&(W=O+O+W),e.append(`${J}${W}${u}`).indent(o).prepend(N).append(U)},system:function(e,{accessedGlobals:t,dependencies:r,exports:n,hasExports:i,indent:s,intro:o,snippets:a,outro:l,usesTopLevelAwait:c},{externalLiveBindings:u,freeze:h,name:d,generatedCode:{symbols:g},strict:y,systemNullSetters:f}){const{_:p,getFunctionIntro:m,getNonArrowFunctionIntro:b,n:w,s:x}=a,{importBindings:E,setters:S,starExcludes:C}=function(M,q,H,{_:G,cnst:Y,getObject:F,getPropertyAccess:T,n:N}){const U=[],J=[];let W=null;for(const{imports:z,reexports:V}of M){const Z=[];if(z)for(const nt of z)U.push(nt.local),nt.imported==="*"?Z.push(`${nt.local}${G}=${G}module;`):Z.push(`${nt.local}${G}=${G}module${T(nt.imported)};`);if(V){const nt=[];let et=!1;for(const{imported:it,reexported:lt}of V)lt==="*"?et=!0:nt.push([lt,it==="*"?"module":`module${T(it)}`]);if(nt.length>1||et)if(et){W||(W=Glt({dependencies:M,exports:q})),nt.unshift([null,`__proto__:${G}null`]);const it=F(nt,{lineBreakIndent:null});Z.push(`${Y} setter${G}=${G}${it};`,`for${G}(${Y} name in module)${G}{`,`${H}if${G}(!_starExcludes[name])${G}setter[name]${G}=${G}module[name];`,"}","exports(setter);")}else{const it=F(nt,{lineBreakIndent:null});Z.push(`exports(${it});`)}else{const[it,lt]=nt[0];Z.push(`exports(${JSON.stringify(it)},${G}${lt});`)}}J.push(Z.join(`${N}${H}${H}${H}`))}return{importBindings:U,setters:J,starExcludes:W}}(r,n,s,a),A=d?`'${d}',${p}`:"",$=t.has("module")?["exports","module"]:i?["exports"]:[];let O=`System.register(${A}[`+r.map(({importPath:M})=>`'${M}'`).join(`,${p}`)+`],${p}(${b($,{isAsync:!1,name:null})}{${w}${s}${y?"'use strict';":""}`+Ylt(C,s,a)+Klt(E,s,a)+`${w}${s}return${p}{${S.length>0?`${w}${s}${s}setters:${p}[${S.map(M=>M?`${m(["module"],{isAsync:!1,name:null})}{${w}${s}${s}${s}${M}${w}${s}${s}}`:f?"null":`${m([],{isAsync:!1,name:null})}{}`).join(`,${p}`)}],`:""}${w}`;O+=`${s}${s}execute:${p}(${b([],{isAsync:c,name:null})}{${w}${w}`;const I=`${s}${s}})${w}${s}}${x}${w}}));`;e.prepend(o+nw(null,t,s,a,u,h,g)+Xlt(n,s,a)).append(`${l}${w}${w}`+Jlt(n,s,a)+Zlt(n,s,a)).indent(`${s}${s}${s}`).append(I).prepend(O)},umd:function(e,{accessedGlobals:t,dependencies:r,exports:n,hasDefaultExport:i,hasExports:s,id:o,indent:a,intro:l,namedExportsMode:c,log:u,outro:h,snippets:d},{amd:g,compact:y,esModule:f,extend:p,externalLiveBindings:m,freeze:b,interop:w,name:x,generatedCode:{symbols:E},globals:S,noConflict:C,reexportProtoFromExternal:A,strict:$}){const{_:O,cnst:I,getFunctionIntro:M,getNonArrowFunctionIntro:q,getPropertyAccess:H,n:G,s:Y}=d,F=y?"f":"factory",T=y?"g":"global";if(s&&!x)return Pt({code:wk,message:'You must supply "output.name" for UMD bundles that have exports so that the exports are accessible in environments without a module loader.',url:Dr(bk)});qb(u,r);const N=r.map(Kt=>`'${Yk(Kt.importPath,g.forceJsExtensionForImports)}'`),U=r.map(Kt=>`require('${Kt.importPath}')`),J=Kk(r),W=J.map(Kt=>Gb(Kt.globalName,T,H)),z=J.map(Kt=>Kt.name);c&&(s||C)&&(N.unshift("'exports'"),U.unshift("exports"),W.unshift(Hb(x,T,S,(p?`${Gb(x,T,H)}${O}||${O}`:"")+"{}",d,u)),z.unshift("exports"));const V=qk(g,o),Z=(V?`'${V}',${O}`:"")+(N.length>0?`[${N.join(`,${O}`)}],${O}`:""),nt=g.define,et=!c&&s?`module.exports${O}=${O}`:"",it=$?`${O}'use strict';${G}`:"";let lt;if(C){const Kt=y?"e":"exports";let Jt;!c&&s?Jt=`${I} ${Kt}${O}=${O}${Hb(x,T,S,`${F}(${W.join(`,${O}`)})`,d,u)};`:Jt=`${I} ${Kt}${O}=${O}${W.shift()};${G}${a}${a}${F}(${[Kt,...W].join(`,${O}`)});`,lt=`(${M([],{isAsync:!1,name:null})}{${G}${a}${a}${I} current${O}=${O}${function(re,Me,{_:ut,getPropertyAccess:dt}){let kt=Me;return re.split(".").map(k=>kt+=dt(k)).join(`${ut}&&${ut}`)}(x,T,d)};${G}${a}${a}${Jt}${G}${a}${a}${Kt}.noConflict${O}=${O}${M([],{isAsync:!1,name:null})}{${O}${Gb(x,T,H)}${O}=${O}current;${O}return ${Kt}${Y}${O}};${G}${a}})()`}else lt=`${F}(${W.join(`,${O}`)})`,!c&&s&&(lt=Hb(x,T,S,lt,d,u));const ht=s||C&&c||W.length>0,pt=[F];ht&&pt.unshift(T);const vt=ht?`this,${O}`:"",Ct=ht?`(${T}${O}=${O}typeof globalThis${O}!==${O}'undefined'${O}?${O}globalThis${O}:${O}${T}${O}||${O}self,${O}`:"",Dt=ht?")":"",Rt=ht?`${a}typeof exports${O}===${O}'object'${O}&&${O}typeof module${O}!==${O}'undefined'${O}?${O}${et}${F}(${U.join(`,${O}`)})${O}:${G}`:"",Ot=`(${q(pt,{isAsync:!1,name:null})}{${G}`+Rt+`${a}typeof ${nt}${O}===${O}'function'${O}&&${O}${nt}.amd${O}?${O}${nt}(${Z}${F})${O}:${G}${a}${Ct}${lt}${Dt};${G}})(${vt}(${q(z,{isAsync:!1,name:null})}{${it}${G}`,Tt=G+G+"}));";e.prepend(`${l}${ap(r,w,m,b,E,t,a,d)}`);const ve=sp(n,r,c,w,d,a,m,A);let mt=op(c&&s,f===!0||f==="if-default-prop"&&i,E,d);mt&&(mt=G+G+mt),e.append(`${ve}${mt}${h}`).trim().indent(a).append(Tt).prepend(Ot)}};const xc={ArrayPattern(e,t){for(const r of t.elements)r&&xc[r.type](e,r)},AssignmentPattern(e,t){xc[t.left.type](e,t.left)},Identifier(e,t){e.push(t.name)},MemberExpression(){},ObjectPattern(e,t){for(const r of t.properties)r.type==="RestElement"?xc.RestElement(e,r):xc[r.value.type](e,r.value)},RestElement(e,t){xc[t.argument.type](e,t.argument)}},tct=function(e){const t=[];return xc[e.type](t,e),t};let er;new Set("break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public arguments Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl".split(" ")).add("");const so=new Array(128).fill(void 0);function _c(e){return so[e]}so.push(void 0,null,!0,!1);let Zh=so.length;function zc(e){Zh===so.length&&so.push(so.length+1);const t=Zh;return Zh=so[t],so[t]=e,t}function ect(e){const t=_c(e);return function(r){r<132||(so[r]=Zh,Zh=r)}(e),t}const vR=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&vR.decode();let Ih=null;function $h(){return Ih!==null&&Ih.byteLength!==0||(Ih=new Uint8Array(er.memory.buffer)),Ih}function Sg(e,t){return e>>>=0,vR.decode($h().subarray(e,e+t))}let Yb=0;const nm=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},rct=typeof nm.encodeInto=="function"?function(e,t){return nm.encodeInto(e,t)}:function(e,t){const r=nm.encode(e);return t.set(r),{read:e.length,written:r.length}};let Ma=null;function Xo(){return(Ma===null||Ma.buffer.detached===!0||Ma.buffer.detached===void 0&&Ma.buffer!==er.memory.buffer)&&(Ma=new DataView(er.memory.buffer)),Ma}function wR(e,t,r){try{const l=er.__wbindgen_add_to_stack_pointer(-16),c=function(h,d,g){if(g===void 0){const b=nm.encode(h),w=d(b.length,1)>>>0;return $h().subarray(w,w+b.length).set(b),Yb=b.length,w}let y=h.length,f=d(y,1)>>>0;const p=$h();let m=0;for(;m127)break;p[f+m]=b}if(m!==y){m!==0&&(h=h.slice(m)),f=g(f,y,y=m+3*h.length,1)>>>0;const b=$h().subarray(f+m,f+y);m+=rct(h,b).written,f=g(f,y,m,1)>>>0}return Yb=m,f}(e,er.__wbindgen_export_0,er.__wbindgen_export_1),u=Yb;er.parse(l,c,u,t,r);var n=Xo().getInt32(l+0,!0),i=Xo().getInt32(l+4,!0),s=(o=n,a=i,o>>>=0,$h().subarray(o/1,o/1+a)).slice();return er.__wbindgen_export_2(n,1*i,1),s}finally{er.__wbindgen_add_to_stack_pointer(16)}var o,a}async function xR(e){if(er!==void 0)return er;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module_or_path:e}=e:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),e===void 0&&(e=new URL("/_astro/bindings_wasm_bg.CZPlnWm0.wasm",import.meta.url));const t=function(){const i={wbg:{}};return i.wbg.__wbg_buffer_609cc3eee51ed158=function(s){return zc(_c(s).buffer)},i.wbg.__wbg_length_a446193dc22c12f8=function(s){return _c(s).length},i.wbg.__wbg_new_a12002a7f91c75be=function(s){return zc(new Uint8Array(_c(s)))},i.wbg.__wbg_set_65595bdd868b3009=function(s,o,a){_c(s).set(_c(o),a>>>0)},i.wbg.__wbindgen_memory=function(){return zc(er.memory)},i.wbg.__wbindgen_object_drop_ref=function(s){ect(s)},i.wbg.__wbindgen_throw=function(s,o){throw new Error(Sg(s,o))},i}();(typeof e=="string"||typeof Request=="function"&&e instanceof Request||typeof URL=="function"&&e instanceof URL)&&(e=fetch(e));const{instance:r,module:n}=await async function(i,s){if(typeof Response=="function"&&i instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(i,s)}catch(a){if(i.headers.get("Content-Type")=="application/wasm")throw a;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",a)}const o=await i.arrayBuffer();return await WebAssembly.instantiate(o,s)}{const o=await WebAssembly.instantiate(i,s);return o instanceof WebAssembly.Instance?{instance:o,module:i}:o}}(await e,t);return function(i,s){return er=i.exports,xR.__wbindgen_wasm_module=s,Ma=null,Ih=null,er}(r,n)}const nct=[function(e,t){return{type:"PanicError",start:t[e],end:t[e+1],message:t.convertString(t[e+2])}},function(e,t){return{type:"ParseError",start:t[e],end:t[e+1],message:t.convertString(t[e+2])}},function(e,t){return{type:"ArrayExpression",start:t[e],end:t[e+1],elements:qe(t[e+2],t)}},function(e,t){return{type:"ArrayPattern",start:t[e],end:t[e+1],elements:qe(t[e+2],t)}},function(e,t){const r=t[e+2],n=Si(t[e+3],t);return{type:"ArrowFunctionExpression",start:t[e],end:t[e+1],async:!(1&~r),expression:!(2&~r),generator:!(4&~r),...n.length>0?{[vc]:n}:{},params:qe(t[e+4],t),body:xt(t[e+5],t),id:null}},function(e,t){return{type:"AssignmentExpression",start:t[e],end:t[e+1],operator:en[t[e+2]],left:xt(t[e+3],t),right:xt(t[e+4],t)}},function(e,t){return{type:"AssignmentPattern",start:t[e],end:t[e+1],left:xt(t[e+2],t),right:xt(t[e+3],t)}},function(e,t){return{type:"AwaitExpression",start:t[e],end:t[e+1],argument:xt(t[e+2],t)}},function(e,t){return{type:"BinaryExpression",start:t[e],end:t[e+1],operator:en[t[e+2]],left:xt(t[e+3],t),right:xt(t[e+4],t)}},function(e,t){return{type:"BlockStatement",start:t[e],end:t[e+1],body:qe(t[e+2],t)}},function(e,t){const r=t[e+2];return{type:"BreakStatement",start:t[e],end:t[e+1],label:r===0?null:xt(r,t)}},function(e,t){const r=t[e+2],n=Si(t[e+3],t);return{type:"CallExpression",start:t[e],end:t[e+1],optional:!(1&~r),...n.length>0?{[vc]:n}:{},callee:xt(t[e+4],t),arguments:qe(t[e+5],t)}},function(e,t){const r=t[e+2];return{type:"CatchClause",start:t[e],end:t[e+1],param:r===0?null:xt(r,t),body:xt(t[e+3],t)}},function(e,t){return{type:"ChainExpression",start:t[e],end:t[e+1],expression:xt(t[e+2],t)}},function(e,t){return{type:"ClassBody",start:t[e],end:t[e+1],body:qe(t[e+2],t)}},function(e,t){const r=t[e+3],n=t[e+4];return{type:"ClassDeclaration",start:t[e],end:t[e+1],decorators:qe(t[e+2],t),id:r===0?null:xt(r,t),superClass:n===0?null:xt(n,t),body:xt(t[e+5],t)}},function(e,t){const r=t[e+3],n=t[e+4];return{type:"ClassExpression",start:t[e],end:t[e+1],decorators:qe(t[e+2],t),id:r===0?null:xt(r,t),superClass:n===0?null:xt(n,t),body:xt(t[e+5],t)}},function(e,t){return{type:"ConditionalExpression",start:t[e],end:t[e+1],test:xt(t[e+2],t),consequent:xt(t[e+3],t),alternate:xt(t[e+4],t)}},function(e,t){const r=t[e+2];return{type:"ContinueStatement",start:t[e],end:t[e+1],label:r===0?null:xt(r,t)}},function(e,t){return{type:"DebuggerStatement",start:t[e],end:t[e+1]}},function(e,t){return{type:"Decorator",start:t[e],end:t[e+1],expression:xt(t[e+2],t)}},function(e,t){return{type:"ExpressionStatement",start:t[e],end:t[e+1],directive:t.convertString(t[e+2]),expression:xt(t[e+3],t)}},function(e,t){return{type:"DoWhileStatement",start:t[e],end:t[e+1],body:xt(t[e+2],t),test:xt(t[e+3],t)}},function(e,t){return{type:"EmptyStatement",start:t[e],end:t[e+1]}},function(e,t){const r=t[e+2];return{type:"ExportAllDeclaration",start:t[e],end:t[e+1],exported:r===0?null:xt(r,t),source:xt(t[e+3],t),attributes:qe(t[e+4],t)}},function(e,t){return{type:"ExportDefaultDeclaration",start:t[e],end:t[e+1],declaration:xt(t[e+2],t)}},function(e,t){const r=t[e+3],n=t[e+5];return{type:"ExportNamedDeclaration",start:t[e],end:t[e+1],specifiers:qe(t[e+2],t),source:r===0?null:xt(r,t),attributes:qe(t[e+4],t),declaration:n===0?null:xt(n,t)}},function(e,t){const r=xt(t[e+2],t),n=t[e+3];return{type:"ExportSpecifier",start:t[e],end:t[e+1],local:r,exported:n===0?{...r}:xt(n,t)}},function(e,t){return{type:"ExpressionStatement",start:t[e],end:t[e+1],expression:xt(t[e+2],t)}},function(e,t){return{type:"ForInStatement",start:t[e],end:t[e+1],left:xt(t[e+2],t),right:xt(t[e+3],t),body:xt(t[e+4],t)}},function(e,t){const r=t[e+2];return{type:"ForOfStatement",start:t[e],end:t[e+1],await:!(1&~r),left:xt(t[e+3],t),right:xt(t[e+4],t),body:xt(t[e+5],t)}},function(e,t){const r=t[e+2],n=t[e+3],i=t[e+4];return{type:"ForStatement",start:t[e],end:t[e+1],init:r===0?null:xt(r,t),test:n===0?null:xt(n,t),update:i===0?null:xt(i,t),body:xt(t[e+5],t)}},function(e,t){const r=t[e+2],n=Si(t[e+3],t),i=t[e+4];return{type:"FunctionDeclaration",start:t[e],end:t[e+1],async:!(1&~r),generator:!(2&~r),...n.length>0?{[vc]:n}:{},id:i===0?null:xt(i,t),params:qe(t[e+5],t),body:xt(t[e+6],t),expression:!1}},function(e,t){const r=t[e+2],n=Si(t[e+3],t),i=t[e+4];return{type:"FunctionExpression",start:t[e],end:t[e+1],async:!(1&~r),generator:!(2&~r),...n.length>0?{[vc]:n}:{},id:i===0?null:xt(i,t),params:qe(t[e+5],t),body:xt(t[e+6],t),expression:!1}},function(e,t){return{type:"Identifier",start:t[e],end:t[e+1],name:t.convertString(t[e+2])}},function(e,t){const r=t[e+4];return{type:"IfStatement",start:t[e],end:t[e+1],test:xt(t[e+2],t),consequent:xt(t[e+3],t),alternate:r===0?null:xt(r,t)}},function(e,t){return{type:"ImportAttribute",start:t[e],end:t[e+1],key:xt(t[e+2],t),value:xt(t[e+3],t)}},function(e,t){return{type:"ImportDeclaration",start:t[e],end:t[e+1],specifiers:qe(t[e+2],t),source:xt(t[e+3],t),attributes:qe(t[e+4],t)}},function(e,t){return{type:"ImportDefaultSpecifier",start:t[e],end:t[e+1],local:xt(t[e+2],t)}},function(e,t){const r=t[e+3];return{type:"ImportExpression",start:t[e],end:t[e+1],source:xt(t[e+2],t),options:r===0?null:xt(r,t)}},function(e,t){return{type:"ImportNamespaceSpecifier",start:t[e],end:t[e+1],local:xt(t[e+2],t)}},function(e,t){const r=t[e+2],n=xt(t[e+3],t);return{type:"ImportSpecifier",start:t[e],end:t[e+1],imported:r===0?{...n}:xt(r,t),local:n}},function(e,t){const r=t[e+3];return{type:"JSXAttribute",start:t[e],end:t[e+1],name:xt(t[e+2],t),value:r===0?null:xt(r,t)}},function(e,t){return{type:"JSXClosingElement",start:t[e],end:t[e+1],name:xt(t[e+2],t)}},function(e,t){return{type:"JSXClosingFragment",start:t[e],end:t[e+1]}},function(e,t){const r=t[e+4];return{type:"JSXElement",start:t[e],end:t[e+1],openingElement:xt(t[e+2],t),children:qe(t[e+3],t),closingElement:r===0?null:xt(r,t)}},function(e,t){return{type:"JSXEmptyExpression",start:t[e],end:t[e+1]}},function(e,t){return{type:"JSXExpressionContainer",start:t[e],end:t[e+1],expression:xt(t[e+2],t)}},function(e,t){return{type:"JSXFragment",start:t[e],end:t[e+1],openingFragment:xt(t[e+2],t),children:qe(t[e+3],t),closingFragment:xt(t[e+4],t)}},function(e,t){return{type:"JSXIdentifier",start:t[e],end:t[e+1],name:t.convertString(t[e+2])}},function(e,t){return{type:"JSXMemberExpression",start:t[e],end:t[e+1],object:xt(t[e+2],t),property:xt(t[e+3],t)}},function(e,t){return{type:"JSXNamespacedName",start:t[e],end:t[e+1],namespace:xt(t[e+2],t),name:xt(t[e+3],t)}},function(e,t){const r=t[e+2];return{type:"JSXOpeningElement",start:t[e],end:t[e+1],selfClosing:!(1&~r),name:xt(t[e+3],t),attributes:qe(t[e+4],t)}},function(e,t){return{type:"JSXOpeningFragment",start:t[e],end:t[e+1],attributes:[],selfClosing:!1}},function(e,t){return{type:"JSXSpreadAttribute",start:t[e],end:t[e+1],argument:xt(t[e+2],t)}},function(e,t){return{type:"JSXSpreadChild",start:t[e],end:t[e+1],expression:xt(t[e+2],t)}},function(e,t){return{type:"JSXText",start:t[e],end:t[e+1],value:t.convertString(t[e+2]),raw:t.convertString(t[e+3])}},function(e,t){return{type:"LabeledStatement",start:t[e],end:t[e+1],label:xt(t[e+2],t),body:xt(t[e+3],t)}},function(e,t){const r=t.convertString(t[e+2]);return{type:"Literal",start:t[e],end:t[e+1],bigint:r,raw:t.convertString(t[e+3]),value:BigInt(r)}},function(e,t){const r=!(1&~t[e+2]);return{type:"Literal",start:t[e],end:t[e+1],value:r,raw:r?"true":"false"}},function(e,t){return{type:"Literal",start:t[e],end:t[e+1],raw:"null",value:null}},function(e,t){const r=t[e+2];return{type:"Literal",start:t[e],end:t[e+1],raw:r===0?void 0:t.convertString(r),value:new DataView(t.buffer).getFloat64(e+3<<2,!0)}},function(e,t){const r=t.convertString(t[e+2]),n=t.convertString(t[e+3]);return{type:"Literal",start:t[e],end:t[e+1],raw:`/${n}/${r}`,regex:{flags:r,pattern:n},value:new RegExp(n,r)}},function(e,t){const r=t[e+3];return{type:"Literal",start:t[e],end:t[e+1],value:t.convertString(t[e+2]),raw:r===0?void 0:t.convertString(r)}},function(e,t){return{type:"LogicalExpression",start:t[e],end:t[e+1],operator:en[t[e+2]],left:xt(t[e+3],t),right:xt(t[e+4],t)}},function(e,t){const r=t[e+2];return{type:"MemberExpression",start:t[e],end:t[e+1],computed:!(1&~r),optional:!(2&~r),object:xt(t[e+3],t),property:xt(t[e+4],t)}},function(e,t){return{type:"MetaProperty",start:t[e],end:t[e+1],meta:xt(t[e+2],t),property:xt(t[e+3],t)}},function(e,t){const r=t[e+2];return{type:"MethodDefinition",start:t[e],end:t[e+1],static:!(1&~r),computed:!(2&~r),decorators:qe(t[e+3],t),key:xt(t[e+4],t),value:xt(t[e+5],t),kind:en[t[e+6]]}},function(e,t){const r=Si(t[e+2],t);return{type:"NewExpression",start:t[e],end:t[e+1],...r.length>0?{[vc]:r}:{},callee:xt(t[e+3],t),arguments:qe(t[e+4],t)}},function(e,t){return{type:"ObjectExpression",start:t[e],end:t[e+1],properties:qe(t[e+2],t)}},function(e,t){return{type:"ObjectPattern",start:t[e],end:t[e+1],properties:qe(t[e+2],t)}},function(e,t){return{type:"PrivateIdentifier",start:t[e],end:t[e+1],name:t.convertString(t[e+2])}},function(e,t){const r=Si(t[e+3],t);return{type:"Program",start:t[e],end:t[e+1],body:qe(t[e+2],t),...r.length>0?{[XB]:r}:{},sourceType:"module"}},function(e,t){const r=t[e+2],n=t[e+3],i=xt(t[e+4],t);return{type:"Property",start:t[e],end:t[e+1],method:!(1&~r),shorthand:!(2&~r),computed:!(4&~r),key:n===0?{...i}:xt(n,t),value:i,kind:en[t[e+5]]}},function(e,t){const r=t[e+2],n=t[e+5];return{type:"PropertyDefinition",start:t[e],end:t[e+1],static:!(1&~r),computed:!(2&~r),decorators:qe(t[e+3],t),key:xt(t[e+4],t),value:n===0?null:xt(n,t)}},function(e,t){return{type:"RestElement",start:t[e],end:t[e+1],argument:xt(t[e+2],t)}},function(e,t){const r=t[e+2];return{type:"ReturnStatement",start:t[e],end:t[e+1],argument:r===0?null:xt(r,t)}},function(e,t){return{type:"SequenceExpression",start:t[e],end:t[e+1],expressions:qe(t[e+2],t)}},function(e,t){return{type:"SpreadElement",start:t[e],end:t[e+1],argument:xt(t[e+2],t)}},function(e,t){return{type:"StaticBlock",start:t[e],end:t[e+1],body:qe(t[e+2],t)}},function(e,t){return{type:"Super",start:t[e],end:t[e+1]}},function(e,t){const r=t[e+2];return{type:"SwitchCase",start:t[e],end:t[e+1],test:r===0?null:xt(r,t),consequent:qe(t[e+3],t)}},function(e,t){return{type:"SwitchStatement",start:t[e],end:t[e+1],discriminant:xt(t[e+2],t),cases:qe(t[e+3],t)}},function(e,t){return{type:"TaggedTemplateExpression",start:t[e],end:t[e+1],tag:xt(t[e+2],t),quasi:xt(t[e+3],t)}},function(e,t){const r=t[e+2],n=t[e+3],i=n===0?void 0:t.convertString(n),s=t.convertString(t[e+4]);return{type:"TemplateElement",start:t[e],end:t[e+1],tail:!(1&~r),value:{cooked:i,raw:s}}},function(e,t){return{type:"TemplateLiteral",start:t[e],end:t[e+1],quasis:qe(t[e+2],t),expressions:qe(t[e+3],t)}},function(e,t){return{type:"ThisExpression",start:t[e],end:t[e+1]}},function(e,t){return{type:"ThrowStatement",start:t[e],end:t[e+1],argument:xt(t[e+2],t)}},function(e,t){const r=t[e+3],n=t[e+4];return{type:"TryStatement",start:t[e],end:t[e+1],block:xt(t[e+2],t),handler:r===0?null:xt(r,t),finalizer:n===0?null:xt(n,t)}},function(e,t){return{type:"UnaryExpression",start:t[e],end:t[e+1],operator:en[t[e+2]],argument:xt(t[e+3],t),prefix:!0}},function(e,t){const r=t[e+2];return{type:"UpdateExpression",start:t[e],end:t[e+1],prefix:!(1&~r),operator:en[t[e+3]],argument:xt(t[e+4],t)}},function(e,t){return{type:"VariableDeclaration",start:t[e],end:t[e+1],kind:en[t[e+2]],declarations:qe(t[e+3],t)}},function(e,t){const r=t[e+3];return{type:"VariableDeclarator",start:t[e],end:t[e+1],id:xt(t[e+2],t),init:r===0?null:xt(r,t)}},function(e,t){return{type:"WhileStatement",start:t[e],end:t[e+1],test:xt(t[e+2],t),body:xt(t[e+3],t)}},function(e,t){const r=t[e+2],n=t[e+3];return{type:"YieldExpression",start:t[e],end:t[e+1],delegate:!(1&~r),argument:n===0?null:xt(n,t)}}];function xt(e,t){const r=t[e],n=nct[r];if(!n)throw console.trace(),new Error(`Unknown node type: ${r}`);return n(e+1,t)}function qe(e,t){if(e===0)return lr;const r=t[e++],n=new Array(r);for(let i=0;i{const i=t[n++],s=n<<2;return e.toString("utf8",s,s+i)};else{const n=new TextDecoder;r=i=>{const s=t[i++],o=i<<2;return n.decode(e.subarray(o,o+s))}}return Object.assign(t,{convertString:r})}class iy extends Ft{addExportedVariables(t,r){for(const n of this.elements)n?.addExportedVariables(t,r)}declare(t,r,n){const i=[],s=lp(r);for(const o of this.elements)o!==null&&i.push(...o.declare(t,s,n));return i}deoptimizeAssignment(t,r){const n=lp(t);for(const i of this.elements)i?.deoptimizeAssignment(n,r)}deoptimizePath(){for(const t of this.elements)t?.deoptimizePath(Bt)}hasEffectsWhenDestructuring(t,r,n){const i=lp(r);for(const s of this.elements)if(s?.hasEffectsWhenDestructuring(t,i,n))return!0;return!1}hasEffectsOnInteractionAtPath(t,r,n){for(const i of this.elements)if(i?.hasEffectsOnInteractionAtPath(Bt,r,n))return!0;return!1}includeDestructuredIfNecessary(t,r,n){let i=!1;const s=lp(r);for(const o of this.elements)o&&(o.included||=i,i=o.includeDestructuredIfNecessary(t,s,n)||i);if(i)for(const o of this.elements)o&&!o.included&&(o.included=!0,o.includeDestructuredIfNecessary(t,s,n));return this.included||=i}markDeclarationReached(){for(const t of this.elements)t?.markDeclarationReached()}}iy.prototype.includeNode=jr;const lp=e=>e.at(-1)===pe?e:[...e,cu];class sy extends Kh{constructor(){super(...arguments),this.objectEntity=null}get expression(){return Ge(this.flags,8388608)}set expression(t){this.flags=Ye(this.flags,8388608,t)}createScope(t){this.scope=new oR(t,!1)}hasEffects(){return!1}hasEffectsOnInteractionAtPath(t,r,n){if(this.annotationNoSideEffects&&t.length===0&&r.type===2)return!1;if(super.hasEffectsOnInteractionAtPath(t,r,n))return!0;if(r.type===2){const{ignore:i,brokenFlow:s}=n;if(n.ignore={breaks:!1,continues:!1,labels:new Set,returnYield:!0,this:!1},this.body.hasEffects(n))return!0;n.ignore=i,n.brokenFlow=s}return!1}onlyFunctionCallUsed(){return this.parent.type===X0&&this.parent.callee===this||super.onlyFunctionCallUsed()}include(t,r){super.include(t,r);for(const n of this.params)n instanceof Ve||n.include(t,r)}includeNode(t){this.included=!0,this.body.includePath(It,t);for(const r of this.params)r instanceof Ve||r.includePath(It,t)}getObjectEntity(){return this.objectEntity!==null?this.objectEntity:this.objectEntity=new li([],ea)}}class va extends Ft{addExportedVariables(t,r){for(const n of this.properties)n.type===DB?n.value.addExportedVariables(t,r):n.argument.addExportedVariables(t,r)}declare(t,r,n){const i=[];for(const s of this.properties)i.push(...s.declare(t,r,n));return i}deoptimizeAssignment(t,r){for(const n of this.properties)n.deoptimizeAssignment(t,r)}deoptimizePath(t){if(t.length===0)for(const r of this.properties)r.deoptimizePath(t)}hasEffectsOnInteractionAtPath(t,r,n){for(const i of this.properties)if(i.hasEffectsOnInteractionAtPath(Bt,r,n))return!0;return!1}hasEffectsWhenDestructuring(t,r,n){for(const i of this.properties)if(i.hasEffectsWhenDestructuring(t,r,n))return!0;return!1}includeDestructuredIfNecessary(t,r,n){if(!this.properties.length)return!1;const i=this.properties.at(-1),s=i.includeDestructuredIfNecessary(t,r,n),o=i.type==="RestElement";let a=!!o&&s;for(const l of this.properties.slice(0,-1))o&&s&&l.includeNode(t),a=l.includeDestructuredIfNecessary(t,r,n)||a;return this.included||=a}markDeclarationReached(){for(const t of this.properties)t.markDeclarationReached()}render(t,r){if(this.properties.length>0){const n=Y0(this.properties,t,this.start+1,this.end-1);let i=null;for(const{node:s,separator:o,start:a,end:l}of n)s.included?(i=o,s.render(t,r)):Tu(s,t,a,l);i&&t.remove(i,this.end-1)}}}va.prototype.includeNode=Ke,va.prototype.applyDeoptimizations=Se;class SR extends Ft{hasEffects(t){const{deoptimized:r,left:n,operator:i,right:s}=this;return r||this.applyDeoptimizations(),s.hasEffects(t)||n.hasEffectsAsAssignmentTarget(t,i!=="=")||this.left.hasEffectsWhenDestructuring?.(t,Bt,s)}hasEffectsOnInteractionAtPath(t,r,n){return this.right.hasEffectsOnInteractionAtPath(t,r,n)}include(t,r){const{deoptimized:n,left:i,right:s,operator:o}=this;n||this.applyDeoptimizations(),this.included||this.includeNode(t);const a=Ll();(r||o!=="="||i.included||i.hasEffectsAsAssignmentTarget(a,!1)||i.hasEffectsWhenDestructuring?.(a,Bt,s))&&i.includeAsAssignmentTarget(t,r,o!=="="),s.include(t,r)}includeNode(t){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(It,t)}initialise(){super.initialise(),this.left instanceof Ve&&this.scope.variables.get(this.left.name)?.kind==="const"&&this.scope.context.error({code:"CONST_REASSIGN",message:"Cannot reassign a variable declared with `const`"},this.left.start),this.left.setAssignedValue(this.right)}render(t,r,{preventASI:n,renderedParentType:i,renderedSurroundingElement:s}=Kr){const{left:o,right:a,start:l,end:c,parent:u}=this;if(o.included)o.render(t,r),a.render(t,r);else{const h=ga(t.original,Nr(t.original,"=",o.end)+1);t.remove(l,h),n&&K0(t,h,a.start),a.render(t,r,{renderedParentType:i||u.type,renderedSurroundingElement:s||u.type})}if(r.format==="system")if(o instanceof Ve){const h=o.variable,d=r.exportNamesByVariable.get(h);if(d)return void(d.length===1?x2(h,l,c,t,r):_B(h,l,c,u.type!==Fs,t,r))}else{const h=[];if(o.addExportedVariables(h,r.exportNamesByVariable),h.length>0)return void function(d,g,y,f,p,m){const{_:b,getDirectReturnIifeLeft:w}=m.snippets;p.prependRight(g,w(["v"],`${Nl(d,m)},${b}v`,{needsArrowReturnParens:!0,needsWrappedFunction:f})),p.appendLeft(y,")")}(h,l,c,s===Fs,t,r)}o.included&&o instanceof va&&(s===Fs||s===CB)&&(t.appendRight(l,"("),t.prependLeft(c,")"))}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizeAssignment(Bt,this.right),this.scope.context.requestTreeshakingPass()}}class ER extends Ft{addExportedVariables(t,r){this.left.addExportedVariables(t,r)}declare(t,r,n){return this.left.declare(t,r,n)}deoptimizeAssignment(t,r){this.left.deoptimizeAssignment(t,r)}deoptimizePath(t){t.length===0&&this.left.deoptimizePath(t)}hasEffectsOnInteractionAtPath(t,r,n){return t.length>0||this.left.hasEffectsOnInteractionAtPath(Bt,r,n)}hasEffectsWhenDestructuring(t,r,n){return this.left.hasEffectsWhenDestructuring(t,r,n)}includeDestructuredIfNecessary(t,r,n){let i=this.left.includeDestructuredIfNecessary(t,r,n)||this.included;return(i||=this.right.shouldBeIncluded(t))&&(this.right.include(t,!1),this.left.included||(this.left.included=!0,this.left.includeDestructuredIfNecessary(t,r,n))),this.included=i}includeNode(t){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(It,t)}markDeclarationReached(){this.left.markDeclarationReached()}render(t,r,{isShorthandProperty:n}=Kr){this.left.render(t,r,{isShorthandProperty:n}),this.right.render(t,r)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(Bt),this.right.deoptimizePath(It),this.scope.context.requestTreeshakingPass()}}class j2 extends Ft{hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}include(t,r){this.included||this.includeNode(t),this.argument.include(t,r)}includeNode(t){this.included=!0,this.deoptimized||this.applyDeoptimizations();t:if(!this.scope.context.usesTopLevelAwait){let r=this.parent;do if(r instanceof L2||r instanceof sy)break t;while(r=r.parent);this.scope.context.usesTopLevelAwait=!0}this.argument.includePath(ict,t)}includePath(t,r){this.deoptimized||this.applyDeoptimizations(),this.included||this.includeNode(r),this.argument.includePath(t,r)}}const ict=["then"],sct={"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,"%":(e,t)=>e%t,"&":(e,t)=>e&t,"*":(e,t)=>e*t,"**":(e,t)=>e**t,"+":(e,t)=>e+t,"-":(e,t)=>e-t,"/":(e,t)=>e/t,"<":(e,t)=>ee<e<=t,"==":(e,t)=>e==t,"===":(e,t)=>e===t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,">>":(e,t)=>e>>t,">>>":(e,t)=>e>>>t,"^":(e,t)=>e^t,"|":(e,t)=>e|t};class z2 extends Ft{deoptimizeCache(){}getLiteralValueAtPath(t,r,n){if(t.length>0)return $e;const i=this.left.getLiteralValueAtPath(Bt,r,n);if(typeof i=="symbol")return $e;const s=this.right.getLiteralValueAtPath(Bt,r,n);if(typeof s=="symbol")return $e;const o=sct[this.operator];return o?o(i,s):$e}hasEffects(t){return this.operator==="+"&&this.parent instanceof ns&&this.left.getLiteralValueAtPath(Bt,Qe,this)===""||super.hasEffects(t)}hasEffectsOnInteractionAtPath(t,{type:r}){return r!==0||t.length>1}includeNode(t){this.included=!0,this.operator==="in"&&this.right.includePath(It,t)}removeAnnotations(t){this.left.removeAnnotations(t)}render(t,r,{renderedSurroundingElement:n}=Kr){this.left.render(t,r,{renderedSurroundingElement:n}),this.right.render(t,r)}}z2.prototype.applyDeoptimizations=Se;class Eg extends Ft{hasEffects(t){if(this.label){if(!t.ignore.labels.has(this.label.name))return!0;t.includedLabels.add(this.label.name)}else{if(!t.ignore.breaks)return!0;t.hasBreak=!0}return t.brokenFlow=!0,!1}include(t,r){this.included=!0,this.label?(this.label.include(t,r),t.includedLabels.add(this.label.name)):t.hasBreak=!0,t.brokenFlow=!0}}function CR(e,t,r){if(r.arguments.length>0)if(r.arguments[r.arguments.length-1].included)for(const n of r.arguments)n.render(e,t);else{let n=r.arguments.length-2;for(;n>=0&&!r.arguments[n].included;)n--;if(n>=0){for(let i=0;i<=n;i++)r.arguments[i].render(e,t);e.remove(Nr(e.original,",",r.arguments[n].end),r.end-1)}else e.remove(Nr(e.original,"(",r.callee.end)+1,r.end-1)}}Eg.prototype.includeNode=Ke,Eg.prototype.applyDeoptimizations=Se;class AR extends Ft{constructor(){super(...arguments),this.returnExpression=null,this.deoptimizableDependentExpressions=[],this.expressionsToBeDeoptimized=new Set}deoptimizeArgumentsOnInteractionAtPath(t,r,n){const{args:i}=t,[s,o]=this.getReturnExpression(n);if(o)return;const a=i.filter(l=>!!l&&l!==me);if(a.length!==0)if(s===me)for(const l of a)l.deoptimizePath(It);else n.withTrackedEntityAtPath(r,s,()=>{for(const l of a)this.expressionsToBeDeoptimized.add(l);s.deoptimizeArgumentsOnInteractionAtPath(t,r,n)},null)}deoptimizeCache(){if(this.returnExpression?.[0]!==me){this.returnExpression=Tr;const{deoptimizableDependentExpressions:t,expressionsToBeDeoptimized:r}=this;this.expressionsToBeDeoptimized=SB,this.deoptimizableDependentExpressions=lr;for(const n of t)n.deoptimizeCache();for(const n of r)n.deoptimizePath(It)}}deoptimizePath(t){if(t.length===0||this.scope.context.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(t,this))return;const[r]=this.getReturnExpression();r!==me&&r.deoptimizePath(t)}getLiteralValueAtPath(t,r,n){const[i]=this.getReturnExpression(r);return i===me?$e:r.withTrackedEntityAtPath(t,i,()=>(this.deoptimizableDependentExpressions.push(n),i.getLiteralValueAtPath(t,r,n)),$e)}getReturnExpressionWhenCalledAtPath(t,r,n,i){const s=this.getReturnExpression(n);return s[0]===me?s:n.withTrackedEntityAtPath(t,s,()=>{this.deoptimizableDependentExpressions.push(i);const[o,a]=s[0].getReturnExpressionWhenCalledAtPath(t,r,n,i);return[o,a||s[1]]},Tr)}hasEffectsOnInteractionAtPath(t,r,n){const{type:i}=r;if(i===2){const{args:a,withNew:l}=r;if((l?n.instantiated:n.called).trackEntityAtPathAndGetIfTracked(t,a,this))return!1}else if((i===1?n.assigned:n.accessed).trackEntityAtPathAndGetIfTracked(t,this))return!1;const[s,o]=this.getReturnExpression();return(i===1||!o)&&s.hasEffectsOnInteractionAtPath(t,r,n)}}class U2 extends AR{get optional(){return Ge(this.flags,128)}set optional(t){this.flags=Ye(this.flags,128,t)}bind(){super.bind(),this.callee instanceof Ve&&(this.scope.findVariable(this.callee.name).isNamespace&&this.scope.context.log(oe,VB(this.callee.name),this.start),this.callee.name==="eval"&&this.scope.context.log(oe,{code:"EVAL",id:t=this.scope.context.module.id,message:`Use of eval in "${le(t)}" is strongly discouraged as it poses security risks and may cause issues with minification.`,url:Dr("troubleshooting/#avoiding-eval")},this.start));var t;this.interaction={args:[this.callee instanceof So&&!this.callee.variable?this.callee.object:null,...this.arguments],type:2,withNew:!1}}getLiteralValueAtPathAsChainElement(t,r,n){return hR(this,this.callee,t,r,n)}hasEffects(t){this.deoptimized||this.applyDeoptimizations();for(const r of this.arguments)if(r.hasEffects(t))return!0;return!this.annotationPure&&(this.callee.hasEffects(t)||this.callee.hasEffectsOnInteractionAtPath(Bt,this.interaction,t))}hasEffectsAsChainElement(t){const r="hasEffectsAsChainElement"in this.callee?this.callee.hasEffectsAsChainElement(t):this.callee.hasEffects(t);if(r===Os)return Os;if(this.optional&&this.callee.getLiteralValueAtPath(Bt,Qe,this)==null)return!this.annotationPure&&r||Os;this.deoptimized||this.applyDeoptimizations();for(const n of this.arguments)if(n.hasEffects(t))return!0;return!this.annotationPure&&(r||this.callee.hasEffectsOnInteractionAtPath(Bt,this.interaction,t))}include(t,r){this.included||this.includeNode(t),r?(super.include(t,!0),r===JB&&this.callee instanceof Ve&&this.callee.variable&&this.callee.variable.markCalledFromTryStatement()):(this.callee.include(t,!1),this.callee.includeCallArguments(this.interaction,t))}includeNode(t){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.callee.includePath(It,t)}initialise(){super.initialise(),this.annotations&&this.scope.context.options.treeshake.annotations&&(this.annotationPure=this.annotations.some(t=>t.type==="pure"))}render(t,r,{renderedSurroundingElement:n}=Kr){this.callee.render(t,r,{isCalleeOfRenderedParent:!0,renderedSurroundingElement:n}),CR(t,r,this)}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,Bt,Qe),this.scope.context.requestTreeshakingPass()}getReturnExpression(t=Qe){return this.returnExpression===null?(this.returnExpression=Tr,this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(Bt,this.interaction,t,this)):this.returnExpression}}class Cg extends Ft{createScope(t){this.scope=new sR(t,!0)}parseNode(t){const{body:r,param:n,type:i}=t;return this.type=i,n&&(this.param=new(this.scope.context.getNodeConstructor(n.type))(this,this.scope).parseNode(n),this.param.declare("parameter",Bt,me)),this.body=new Al(this,this.scope.bodyScope).parseNode(r),super.parseNode(t)}}Cg.prototype.preventChildBlockScope=!0,Cg.prototype.includeNode=jr;class Ag extends Ft{deoptimizeCache(){}getLiteralValueAtPath(t,r,n){const i=this.expression.getLiteralValueAtPathAsChainElement(t,r,n);return i===Os?void 0:i}hasEffects(t){return this.expression.hasEffectsAsChainElement(t)===!0}includePath(t,r){this.included=!0,this.expression.includePath(t,r)}removeAnnotations(t){this.expression.removeAnnotations(t)}}Ag.prototype.includeNode=Ke,Ag.prototype.applyDeoptimizations=Se;class oct extends Xn{constructor(t,r){const{context:n}=t;super(t,n),this.variables.set("this",this.thisVariable=new as("this",null,r,Bt,n,"other")),this.instanceScope=new Xn(this,n),this.instanceScope.variables.set("this",new iR(n))}findLexicalBoundary(){return this}}class kg extends Ft{createScope(t){this.scope=new oct(t,this.parent)}include(t,r){this.included=!0,this.scope.context.includeVariableInModule(this.scope.thisVariable,It,t);for(const n of this.body)n.include(t,r)}parseNode(t){const r=this.body=new Array(t.body.length);let n=0;for(const i of t.body)r[n++]=new(this.scope.context.getNodeConstructor(i.type))(this,i.static?this.scope:this.scope.instanceScope).parseNode(i);return super.parseNode(t)}}kg.prototype.includeNode=Ke,kg.prototype.applyDeoptimizations=Se;class Dg extends N2{render(t,r,{renderedSurroundingElement:n}=Kr){super.render(t,r),n===Fs&&(t.appendRight(this.start,"("),t.prependLeft(this.end,")"))}}function Tg(e){return typeof e=="symbol"?e!==E2&&(e===S2||$e):!!e}class oy extends di{constructor(t){super(),this.expressions=t}deoptimizePath(t){for(const r of this.expressions)r.deoptimizePath(t)}getReturnExpressionWhenCalledAtPath(t,r,n,i){return[new oy(this.expressions.map(s=>s.getReturnExpressionWhenCalledAtPath(t,r,n,i)[0])),!1]}hasEffectsOnInteractionAtPath(t,r,n){for(const i of this.expressions)if(i.hasEffectsOnInteractionAtPath(t,r,n))return!0;return!1}}class Pg extends Ft{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.usedBranch=null}get isBranchResolutionAnalysed(){return Ge(this.flags,65536)}set isBranchResolutionAnalysed(t){this.flags=Ye(this.flags,65536,t)}deoptimizeArgumentsOnInteractionAtPath(t,r,n){this.consequent.deoptimizeArgumentsOnInteractionAtPath(t,r,n),this.alternate.deoptimizeArgumentsOnInteractionAtPath(t,r,n)}deoptimizeCache(){if(this.usedBranch!==null){const t=this.usedBranch===this.consequent?this.alternate:this.consequent;this.usedBranch=null,t.deoptimizePath(It),this.included&&t.includePath(It,Xi());const{expressionsToBeDeoptimized:r}=this;this.expressionsToBeDeoptimized=lr;for(const n of r)n.deoptimizeCache()}}deoptimizePath(t){const r=this.getUsedBranch();r?r.deoptimizePath(t):(this.consequent.deoptimizePath(t),this.alternate.deoptimizePath(t))}getLiteralValueAtPath(t,r,n){const i=this.getUsedBranch();return i?(this.expressionsToBeDeoptimized.push(n),i.getLiteralValueAtPath(t,r,n)):$e}getReturnExpressionWhenCalledAtPath(t,r,n,i){const s=this.getUsedBranch();return s?(this.expressionsToBeDeoptimized.push(i),s.getReturnExpressionWhenCalledAtPath(t,r,n,i)):[new oy([this.consequent.getReturnExpressionWhenCalledAtPath(t,r,n,i)[0],this.alternate.getReturnExpressionWhenCalledAtPath(t,r,n,i)[0]]),!1]}hasEffects(t){if(this.test.hasEffects(t))return!0;const r=this.getUsedBranch();return r?r.hasEffects(t):this.consequent.hasEffects(t)||this.alternate.hasEffects(t)}hasEffectsOnInteractionAtPath(t,r,n){const i=this.getUsedBranch();return i?i.hasEffectsOnInteractionAtPath(t,r,n):this.consequent.hasEffectsOnInteractionAtPath(t,r,n)||this.alternate.hasEffectsOnInteractionAtPath(t,r,n)}include(t,r){this.included=!0;const n=this.getUsedBranch();n===null||r||this.test.shouldBeIncluded(t)?(this.test.include(t,r),this.consequent.include(t,r),this.alternate.include(t,r)):n.include(t,r)}includePath(t,r){this.included=!0;const n=this.getUsedBranch();n===null||this.test.shouldBeIncluded(r)?(this.consequent.includePath(t,r),this.alternate.includePath(t,r)):n.includePath(t,r)}includeCallArguments(t,r){const n=this.getUsedBranch();n?n.includeCallArguments(t,r):(this.consequent.includeCallArguments(t,r),this.alternate.includeCallArguments(t,r))}removeAnnotations(t){this.test.removeAnnotations(t)}render(t,r,{isCalleeOfRenderedParent:n,preventASI:i,renderedParentType:s,renderedSurroundingElement:o}=Kr){if(this.test.included)this.test.render(t,r,{renderedSurroundingElement:o}),this.consequent.render(t,r),this.alternate.render(t,r);else{const a=this.getUsedBranch(),l=Nr(t.original,":",this.consequent.end),c=ga(t.original,(this.consequent.included?Nr(t.original,"?",this.test.end):l)+1);i&&K0(t,c,a.start),t.remove(this.start,c),this.consequent.included&&t.remove(l,this.end),this.test.removeAnnotations(t),a.render(t,r,{isCalleeOfRenderedParent:n,preventASI:!0,renderedParentType:s||this.parent.type,renderedSurroundingElement:o||this.parent.type})}}getUsedBranch(){if(this.isBranchResolutionAnalysed)return this.usedBranch;this.isBranchResolutionAnalysed=!0;const t=Tg(this.test.getLiteralValueAtPath(Bt,Qe,this));return typeof t=="symbol"?null:this.usedBranch=t?this.consequent:this.alternate}}Pg.prototype.includeNode=Ke,Pg.prototype.applyDeoptimizations=Se;class Fg extends Ft{hasEffects(t){if(this.label){if(!t.ignore.labels.has(this.label.name))return!0;t.includedLabels.add(this.label.name)}else{if(!t.ignore.continues)return!0;t.hasContinue=!0}return t.brokenFlow=!0,!1}include(t,r){this.included=!0,this.label?(this.label.include(t,r),t.includedLabels.add(this.label.name)):t.hasContinue=!0,t.brokenFlow=!0}}Fg.prototype.includeNode=Ke,Fg.prototype.applyDeoptimizations=Se;class V2 extends Ft{hasEffects(){return!0}}V2.prototype.includeNode=jr;class W2 extends Ft{hasEffects(t){return this.expression.hasEffects(t)||this.expression.hasEffectsOnInteractionAtPath(Bt,ld,t)}}function ay(e,t){const{brokenFlow:r,hasBreak:n,hasContinue:i,ignore:s}=e,{breaks:o,continues:a}=s;return s.breaks=!0,s.continues=!0,e.hasBreak=!1,e.hasContinue=!1,!!t.hasEffects(e)||(s.breaks=o,s.continues=a,e.hasBreak=n,e.hasContinue=i,e.brokenFlow=r,!1)}function pd(e,t,r){const{brokenFlow:n,hasBreak:i,hasContinue:s}=e;e.hasBreak=!1,e.hasContinue=!1,t.include(e,r,{asSingleStatement:!0}),e.hasBreak=i,e.hasContinue=s,e.brokenFlow=n}W2.prototype.includeNode=jr;class Og extends Ft{hasEffects(t){return!!this.test.hasEffects(t)||ay(t,this.body)}include(t,r){this.included=!0,this.test.include(t,r),pd(t,this.body,r)}}Og.prototype.includeNode=Ke,Og.prototype.applyDeoptimizations=Se;class q2 extends Ft{hasEffects(){return!1}}q2.prototype.includeNode=jr;class Uc extends Ft{hasEffects(){return!1}initialise(){super.initialise(),this.scope.context.addExport(this)}render(t,r,n){t.remove(n.start,n.end)}}Uc.prototype.needsBoundaries=!0,Uc.prototype.includeNode=Ke,Uc.prototype.applyDeoptimizations=Se;class Qh extends Ft{bind(){this.declaration?.bind()}hasEffects(t){return!!this.declaration?.hasEffects(t)}initialise(){super.initialise(),this.scope.context.addExport(this)}removeAnnotations(t){this.declaration?.removeAnnotations(t)}render(t,r,n){const{start:i,end:s}=n;this.declaration===null?t.remove(i,s):(t.remove(this.start,this.declaration.start),this.declaration.render(t,r,{end:s,start:i}))}}Qh.prototype.needsBoundaries=!0,Qh.prototype.includeNode=Ke,Qh.prototype.applyDeoptimizations=Se;class Ig extends Ft{}Ig.prototype.includeNode=Ke,Ig.prototype.applyDeoptimizations=Se;class kR extends Ft{createScope(t){this.scope=new jl(t)}hasEffects(t){const{body:r,deoptimized:n,left:i,right:s}=this;return n||this.applyDeoptimizations(),!(!i.hasEffectsAsAssignmentTarget(t,!1)&&!s.hasEffects(t))||ay(t,r)}include(t,r){const{body:n,deoptimized:i,left:s,right:o}=this;i||this.applyDeoptimizations(),this.included||this.includeNode(t),s.includeAsAssignmentTarget(t,r||!0,!1),o.include(t,r),pd(t,n,r)}includeNode(t){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(It,t)}initialise(){super.initialise(),this.left.setAssignedValue(me)}render(t,r){this.left.render(t,r,el),this.right.render(t,r,el),t.original.charCodeAt(this.right.start-1)===110&&t.prependLeft(this.right.start," "),this.body.render(t,r)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(Bt),this.scope.context.requestTreeshakingPass()}}class DR extends Ft{get await(){return Ge(this.flags,131072)}set await(t){this.flags=Ye(this.flags,131072,t)}createScope(t){this.scope=new jl(t)}hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}include(t,r){const{body:n,deoptimized:i,left:s,right:o}=this;i||this.applyDeoptimizations(),this.included||this.includeNode(t),s.includeAsAssignmentTarget(t,r||!0,!1),o.include(t,r),pd(t,n,r)}includeNode(t){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(It,t)}initialise(){super.initialise(),this.left.setAssignedValue(me)}render(t,r){this.left.render(t,r,el),this.right.render(t,r,el),t.original.charCodeAt(this.right.start-1)===102&&t.prependLeft(this.right.start," "),this.body.render(t,r)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(Bt),this.right.deoptimizePath(It),this.scope.context.requestTreeshakingPass()}}class $g extends Ft{createScope(t){this.scope=new jl(t)}hasEffects(t){return!!(this.init?.hasEffects(t)||this.test?.hasEffects(t)||this.update?.hasEffects(t))||ay(t,this.body)}include(t,r){this.included=!0,this.init?.include(t,r,{asSingleStatement:!0}),this.test?.include(t,r),this.update?.include(t,r),pd(t,this.body,r)}render(t,r){this.init?.render(t,r,el),this.test?.render(t,r,el),this.update?.render(t,r,el),this.body.render(t,r)}}$g.prototype.includeNode=Ke,$g.prototype.applyDeoptimizations=Se;class H2 extends L2{createScope(t){super.createScope(this.idScope=new Xn(t,t.context))}parseNode(t){return t.id!==null&&(this.id=new Ve(this,this.idScope).parseNode(t.id)),super.parseNode(t)}onlyFunctionCallUsed(){return this.parent.type===X0&&this.parent.callee===this&&(this.id===null||this.id.variable.getOnlyFunctionCallUsed())||super.onlyFunctionCallUsed()}render(t,r,{renderedSurroundingElement:n}=Kr){super.render(t,r),n===Fs&&(t.appendRight(this.start,"("),t.prependLeft(this.end,")"))}}class Bg extends jl{constructor(){super(...arguments),this.hoistedDeclarations=[]}addDeclaration(t,r,n,i,s){return this.hoistedDeclarations.push(t),super.addDeclaration(t,r,n,i,s)}}const Xk=Symbol("unset");class du extends Ft{constructor(){super(...arguments),this.testValue=Xk}deoptimizeCache(){this.testValue=$e}hasEffects(t){if(this.test.hasEffects(t))return!0;const r=this.getTestValue();if(typeof r=="symbol"){const{brokenFlow:n}=t;if(this.consequent.hasEffects(t))return!0;const i=t.brokenFlow;return t.brokenFlow=n,this.alternate===null?!1:!!this.alternate.hasEffects(t)||(t.brokenFlow=t.brokenFlow&&i,!1)}return r?this.consequent.hasEffects(t):!!this.alternate?.hasEffects(t)}include(t,r){if(this.included=!0,r)this.includeRecursively(r,t);else{const n=this.getTestValue();typeof n=="symbol"?this.includeUnknownTest(t):this.includeKnownTest(t,n)}}parseNode(t){return this.consequent=new(this.scope.context.getNodeConstructor(t.consequent.type))(this,this.consequentScope=new Bg(this.scope)).parseNode(t.consequent),t.alternate&&(this.alternate=new(this.scope.context.getNodeConstructor(t.alternate.type))(this,this.alternateScope=new Bg(this.scope)).parseNode(t.alternate)),super.parseNode(t)}render(t,r){const{snippets:{getPropertyAccess:n}}=r,i=this.getTestValue(),s=[],o=this.test.included,a=!this.scope.context.options.treeshake;o?this.test.render(t,r):t.remove(this.start,this.consequent.start),this.consequent.included&&(a||typeof i=="symbol"||i)?this.consequent.render(t,r):(t.overwrite(this.consequent.start,this.consequent.end,o?";":""),s.push(...this.consequentScope.hoistedDeclarations)),this.alternate&&(!this.alternate.included||!a&&typeof i!="symbol"&&i?(o&&this.shouldKeepAlternateBranch()?t.overwrite(this.alternate.start,this.end,";"):t.remove(this.consequent.end,this.end),s.push(...this.alternateScope.hoistedDeclarations)):(o?t.original.charCodeAt(this.alternate.start-1)===101&&t.prependLeft(this.alternate.start," "):t.remove(this.consequent.end,this.alternate.start),this.alternate.render(t,r))),this.renderHoistedDeclarations(s,t,n)}getTestValue(){return this.testValue===Xk?this.testValue=Tg(this.test.getLiteralValueAtPath(Bt,Qe,this)):this.testValue}includeKnownTest(t,r){this.test.shouldBeIncluded(t)&&this.test.include(t,!1),r&&this.consequent.shouldBeIncluded(t)&&this.consequent.include(t,!1,{asSingleStatement:!0}),!r&&this.alternate?.shouldBeIncluded(t)&&this.alternate.include(t,!1,{asSingleStatement:!0})}includeRecursively(t,r){this.test.include(r,t),this.consequent.include(r,t),this.alternate?.include(r,t)}includeUnknownTest(t){this.test.include(t,!1);const{brokenFlow:r}=t;let n=!1;this.consequent.shouldBeIncluded(t)&&(this.consequent.include(t,!1,{asSingleStatement:!0}),n=t.brokenFlow,t.brokenFlow=r),this.alternate?.shouldBeIncluded(t)&&(this.alternate.include(t,!1,{asSingleStatement:!0}),t.brokenFlow=t.brokenFlow&&n)}renderHoistedDeclarations(t,r,n){const i=[...new Set(t.map(s=>{const o=s.variable;return o.included?o.getName(n):""}))].filter(Boolean).join(", ");if(i){const s=this.parent.type,o=s!==hg&&s!=="BlockStatement";r.prependRight(this.start,`${o?"{ ":""}var ${i}; `),o&&r.appendLeft(this.end," }")}}shouldKeepAlternateBranch(){let t=this.parent;do{if(t instanceof du&&t.alternate)return!0;if(t instanceof Al)return!1;t=t.parent}while(t);return!1}}du.prototype.includeNode=Ke,du.prototype.applyDeoptimizations=Se;class TR extends Ft{}class tf extends Ft{bind(){}hasEffects(){return!1}initialise(){super.initialise(),this.scope.context.addImport(this)}render(t,r,n){t.remove(n.start,n.end)}}tf.prototype.needsBoundaries=!0,tf.prototype.includeNode=Ke,tf.prototype.applyDeoptimizations=Se;class Bf extends Ft{}function PR(e,t){return e.renderBaseName!==null&&t.has(e)&&e.isReassigned}Bf.prototype.includeNode=Ke,Bf.prototype.applyDeoptimizations=Se;class ly extends Ft{declareDeclarator(t,r){this.isUsingDeclaration=r,this.id.declare(t,Bt,this.init||fo)}deoptimizePath(t){this.id.deoptimizePath(t)}hasEffects(t){const r=this.init?.hasEffects(t);return this.id.markDeclarationReached(),r||this.isUsingDeclaration||this.id.hasEffects(t)||this.scope.context.options.treeshake.propertyReadSideEffects&&this.id.hasEffectsWhenDestructuring(t,Bt,this.init||fo)}include(t,r){const{id:n,init:i}=this;this.included||this.includeNode(),i?.include(t,r),n.markDeclarationReached(),r?n.include(t,r):n.includeDestructuredIfNecessary(t,Bt,i||fo)}removeAnnotations(t){this.init?.removeAnnotations(t)}render(t,r){const{exportNamesByVariable:n,snippets:{_:i,getPropertyAccess:s}}=r,{end:o,id:a,init:l,start:c}=this,u=a.included||this.isUsingDeclaration;if(u)a.render(t,r);else{const h=Nr(t.original,"=",a.end);t.remove(c,ga(t.original,h+1))}l?(a instanceof Ve&&l instanceof Dg&&!l.id&&a.variable.getName(s)!==a.name&&t.appendLeft(l.start+5,` ${a.name}`),l.render(t,r,u?Kr:{renderedSurroundingElement:Fs})):a instanceof Ve&&PR(a.variable,n)&&t.appendLeft(o,`${i}=${i}void 0`)}includeNode(){this.included=!0;const{id:t,init:r}=this;if(r&&t instanceof Ve&&r instanceof Dg&&!r.id){const{name:n,variable:i}=t;for(const s of r.scope.accessedOutsideVariables.values())s!==i&&s.forbidName(n)}}}ly.prototype.applyDeoptimizations=Se;class G2 extends Ft{constructor(){super(...arguments),this.inlineNamespace=null,this.hasUnknownAccessedKey=!1,this.accessedPropKey=new Set,this.attributes=null,this.mechanism=null,this.namespaceExportName=void 0,this.resolution=null,this.resolutionString=null}bind(){this.source.bind()}getDeterministicImportedNames(){const t=this.parent;if(t instanceof ns)return lr;if(t instanceof j2){const r=t.parent;if(r instanceof ns)return lr;if(r instanceof ly){const n=r.id;if(n instanceof Ve)return this.hasUnknownAccessedKey?void 0:[...this.accessedPropKey];if(n instanceof va)return Zk(n)}if(r instanceof So){const n=r.property;if(!r.computed&&n instanceof Ve)return[n.name]}}else if(t instanceof So){const r=t.parent,n=t.property;if(!(r instanceof U2&&n instanceof Ve))return;const i=n.name;if(r.parent instanceof ns&&["catch","finally"].includes(i))return lr;if(i!=="then")return;if(r.arguments.length===0)return lr;const s=r.arguments[0];if(r.arguments.length!==1||!(s instanceof sy||s instanceof H2))return;if(s.params.length===0)return lr;const o=s.params[0];return s.params.length===1&&o instanceof va?Zk(o):void 0}}hasEffects(){return!0}include(t,r){this.included||this.includeNode(),this.source.include(t,r)}includeNode(){this.included=!0,this.scope.context.includeDynamicImport(this),this.scope.addAccessedDynamicImport(this)}includePath(t){this.included||this.includeNode(),this.hasUnknownAccessedKey||(t[0]===pe?this.hasUnknownAccessedKey=!0:typeof t[0]=="string"&&this.accessedPropKey.add(t[0]),this.scope.context.includeDynamicImport(this))}initialise(){super.initialise(),this.scope.context.addDynamicImport(this)}parseNode(t){return this.sourceAstNode=t.source,super.parseNode(t)}render(t,r){const{snippets:{_:n,getDirectReturnFunction:i,getObject:s,getPropertyAccess:o},importAttributesKey:a}=r;if(this.inlineNamespace){const[l,c]=i([],{functionReturn:!0,lineBreakIndent:null,name:null});t.overwrite(this.start,this.end,`Promise.resolve().then(${l}${this.inlineNamespace.getName(o)}${c})`)}else{if(this.mechanism&&(t.overwrite(this.start,Nr(t.original,"(",this.start+6)+1,this.mechanism.left),t.overwrite(this.end-1,this.end,this.mechanism.right)),this.resolutionString){if(t.overwrite(this.source.start,this.source.end,this.resolutionString),this.namespaceExportName){const[l,c]=i(["n"],{functionReturn:!0,lineBreakIndent:null,name:null});t.prependLeft(this.end,`.then(${l}n.${this.namespaceExportName}${c})`)}}else this.source.render(t,r);this.attributes!==!0&&(this.options&&t.overwrite(this.source.end,this.end-1,"",{contentOnly:!0}),this.attributes&&t.appendLeft(this.end-1,`,${n}${s([[a,this.attributes]],{lineBreakIndent:null})}`))}}setExternalResolution(t,r,n,i,s,o,a,l,c){const{format:u}=n;this.inlineNamespace=null,this.resolution=r,this.resolutionString=a,this.namespaceExportName=l,this.attributes=c;const h=[...act[u]||[]];let d;({helper:d,mechanism:this.mechanism}=this.getDynamicImportMechanismAndHelper(r,t,n,i,s)),d&&h.push(d),h.length>0&&this.scope.addAccessedGlobals(h,o)}setInternalResolution(t){this.inlineNamespace=t}getDynamicImportMechanismAndHelper(t,r,{compact:n,dynamicImportInCjs:i,format:s,generatedCode:{arrowFunctions:o},interop:a},{_:l,getDirectReturnFunction:c,getDirectReturnIifeLeft:u},h){const d=h.hookFirstSync("renderDynamicImport",[{customResolution:typeof this.resolution=="string"?this.resolution:null,format:s,moduleId:this.scope.context.module.id,targetModuleId:this.resolution&&typeof this.resolution!="string"?this.resolution.id:null}]);if(d)return{helper:null,mechanism:d};const g=!this.resolution||typeof this.resolution=="string";switch(s){case"cjs":{if(i&&(!t||typeof t=="string"||t instanceof cr))return{helper:null,mechanism:null};const y=Jk(t,r,a);let f="require(",p=")";y&&(f=`/*#__PURE__*/${y}(${f}`,p+=")");const[m,b]=c([],{functionReturn:!0,lineBreakIndent:null,name:null});return f=`Promise.resolve().then(${m}${f}`,p+=`${b})`,!o&&g&&(f=u(["t"],`${f}t${p}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),p=")"),{helper:y,mechanism:{left:f,right:p}}}case"amd":{const y=n?"c":"resolve",f=n?"e":"reject",p=Jk(t,r,a),[m,b]=c(["m"],{functionReturn:!1,lineBreakIndent:null,name:null}),w=p?`${m}${y}(/*#__PURE__*/${p}(m))${b}`:y,[x,E]=c([y,f],{functionReturn:!1,lineBreakIndent:null,name:null});let S=`new Promise(${x}require([`,C=`],${l}${w},${l}${f})${E})`;return!o&&g&&(S=u(["t"],`${S}t${C}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),C=")"),{helper:p,mechanism:{left:S,right:C}}}case"system":return{helper:null,mechanism:{left:"module.import(",right:")"}}}return{helper:null,mechanism:null}}}function Jk(e,t,r){return t==="external"?dd[r(e instanceof cr?e.id:null)]:t==="default"?If:null}G2.prototype.applyDeoptimizations=Se;const act={amd:["require"],cjs:["require"],system:["module"]};function Zk(e){const t=[];for(const r of e.properties){if(r.type==="RestElement"||r.computed||r.key.type!=="Identifier")return;t.push(r.key.name)}return t}class Rf extends Ft{}Rf.prototype.includeNode=Ke,Rf.prototype.applyDeoptimizations=Se;class Rg extends Ft{}Rg.prototype.includeNode=Ke,Rg.prototype.applyDeoptimizations=Se;class Y2 extends tR{constructor(){super(...arguments),this.isNativeElement=!1}bind(){const t=this.getType();t===0?(this.variable=this.scope.findVariable(this.name),this.variable.addReference(this)):t===1&&(this.isNativeElement=!0)}include(t){this.included||this.includeNode(t)}includeNode(t){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.variable!==null&&this.scope.context.includeVariableInModule(this.variable,Bt,t)}includePath(t,r){this.included?t.length>0&&this.variable?.includePath(t,r):(this.included=!0,this.variable!==null&&this.scope.context.includeVariableInModule(this.variable,t,r))}render(t,{snippets:{getPropertyAccess:r},useOriginalName:n}){if(this.variable){const i=this.variable.getName(r,n);i!==this.name&&t.overwrite(this.start,this.end,i,{contentOnly:!0,storeName:!0})}else this.isNativeElement&&this.scope.context.options.jsx.mode!=="preserve"&&t.update(this.start,this.end,JSON.stringify(this.name))}getType(){switch(this.parent.type){case"JSXOpeningElement":case"JSXClosingElement":return this.name.startsWith(this.name.charAt(0).toUpperCase())?0:1;case"JSXMemberExpression":return this.parent.object===this?0:2;case"JSXAttribute":case"JSXNamespacedName":return 2;default:throw new Error(`Unexpected parent node type for JSXIdentifier: ${this.parent.type}`)}}}class cy extends Ft{render(t,r,{jsxMode:n}=Kr){if(super.render(t,r),["classic","automatic"].includes(n)){const{name:i,value:s}=this,o=i instanceof Y2?i.name:`${i.namespace.name}:${i.name.name}`;if(n!=="automatic"||o!=="key"){const a=Q0(o);o!==a&&t.overwrite(i.start,i.end,a,{contentOnly:!0}),s?t.overwrite(i.end,s.start,": ",{contentOnly:!0}):t.appendLeft(i.end,": true")}}}}cy.prototype.includeNode=jr;class K2 extends Ft{render(t,r){const{mode:n}=this.scope.context.options.jsx;n!=="preserve"?t.overwrite(this.start,this.end,")",{contentOnly:!0}):super.render(t,r)}}K2.prototype.includeNode=jr;class FR extends K2{}class OR extends K2{}class Ng extends Ft{render(t,r){this.argument.render(t,r);const{mode:n}=this.scope.context.options.jsx;n!=="preserve"&&(t.overwrite(this.start,this.argument.start,"",{contentOnly:!0}),t.overwrite(this.argument.end,this.end,"",{contentOnly:!0}))}}class md extends Ft{}md.prototype.includeNode=jr;class uy extends Ft{includeNode(t){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.expression.includePath(It,t)}render(t,r){const{mode:n}=this.scope.context.options.jsx;n!=="preserve"&&(t.remove(this.start,this.expression.start),t.remove(this.expression.end,this.end)),this.expression.render(t,r)}}function lct(e){let t=0;for(const r of e)r instanceof uy&&r.expression instanceof md||t++;return t}function aw(e,t,r,n,i){const[s,o]=e.split(".");let a;return r?(a=n.scope.context.getImportedJsxFactoryVariable(o?"default":s,n.start,r),t&&(n.scope.findGlobal(s).includePath(It,i),a.globalName=s)):a=n.scope.findGlobal(s),n.scope.context.includeVariableInModule(a,It,i),a instanceof as&&(a.consolidateInitializers(),a.addUsedPlace(n),n.scope.context.requestTreeshakingPass()),a}class X2 extends Ft{constructor(){super(...arguments),this.factoryVariable=null,this.factory=null}initialise(){super.initialise();const{importSource:t}=this.jsxMode=this.getRenderingMode();t&&this.scope.context.addImportSource(t)}include(t,r){this.included||this.includeNode(t);for(const n of this.children)n.include(t,r)}includeNode(t){this.included=!0;const{factory:r,importSource:n,mode:i}=this.jsxMode;r&&(this.factory=r,this.factoryVariable=aw(r,i==="preserve",n,this,t))}getRenderingMode(){const t=this.scope.context.options.jsx,{mode:r,factory:n,importSource:i}=t;return r==="automatic"?{factory:lct(this.children)>1?"jsxs":"jsx",importSource:t.jsxImportSource,mode:r}:{factory:n,importSource:i,mode:r}}renderChildren(t,r,n){const{children:i}=this;let s=!1,o=n,a=null;for(const l of i)l instanceof uy&&l.expression instanceof md?t.remove(o,l.end):(t.appendLeft(o,", "),l.render(t,r),a?s=!0:a=l),o=l.end;return{childrenEnd:o,firstChild:a,hasMultipleChildren:s}}}X2.prototype.applyDeoptimizations=Se;class IR extends X2{include(t,r){super.include(t,r),this.openingElement.include(t,r),this.closingElement?.include(t,r)}render(t,r){switch(this.jsxMode.mode){case"classic":this.renderClassicMode(t,r);break;case"automatic":this.renderAutomaticMode(t,r);break;default:super.render(t,r)}}getRenderingMode(){const t=this.scope.context.options.jsx,{mode:r,factory:n,importSource:i}=t;if(r==="automatic"){let s=!1;for(const o of this.openingElement.attributes)if(o instanceof Ng)s=!0;else if(s&&o.name.name==="key")return{factory:n,importSource:i,mode:"classic"}}return super.getRenderingMode()}renderClassicMode(t,r){const{snippets:{getPropertyAccess:n},useOriginalName:i}=r,{closingElement:s,end:o,factory:a,factoryVariable:l,openingElement:{end:c,selfClosing:u}}=this,[,...h]=a.split("."),{firstAttribute:d,hasAttributes:g,hasSpread:y,inObject:f,previousEnd:p}=this.renderAttributes(t,r,[l.getName(n,i),...h].join("."),!1);this.wrapAttributes(t,f,g,y,d,"null",p),this.renderChildren(t,r,c),u?t.appendLeft(o,")"):s.render(t,r)}renderAutomaticMode(t,r){const{snippets:{getPropertyAccess:n},useOriginalName:i}=r,{closingElement:s,end:o,factoryVariable:a,openingElement:{end:l,selfClosing:c}}=this;let{firstAttribute:u,hasAttributes:h,hasSpread:d,inObject:g,keyAttribute:y,previousEnd:f}=this.renderAttributes(t,r,a.getName(n,i),!0);const{firstChild:p,hasMultipleChildren:m,childrenEnd:b}=this.renderChildren(t,r,l);if(p&&(t.prependRight(p.start,"children: "+(m?"[":"")),g||(t.prependRight(p.start,"{ "),g=!0),f=s.start,m&&t.appendLeft(f,"]")),this.wrapAttributes(t,g,h||!!p,d,u||p,"{}",b),y){const{value:w}=y;t.appendLeft(b,", "),w?t.move(w.start,w.end,b):t.appendLeft(b,"true")}c?t.appendLeft(y?.value?.end||o,")"):s.render(t,r)}renderAttributes(t,r,n,i){const{jsxMode:{mode:s},openingElement:o}=this,{attributes:a,end:l,start:c,name:{start:u,end:h}}=o;t.update(c,u,`/*#__PURE__*/${n}(`),o.render(t,r,{jsxMode:s});let d=null,g=!1,y=!1,f=h,p=!1,m=null;for(const b of a){if(b instanceof cy){if(i&&b.name.name==="key"){d=b,t.remove(f,b.value?.start||b.end);continue}t.appendLeft(f,","),y||(t.prependRight(b.start,"{ "),y=!0),p=!0}else y?(p&&t.appendLeft(f," "),t.appendLeft(f,"},"),y=!1):t.appendLeft(f,","),g=!0;f=b.end,m||(m=b)}return t.remove(a.at(-1)?.end||f,l),{firstAttribute:m,hasAttributes:p,hasSpread:g,inObject:y,keyAttribute:d,previousEnd:f}}wrapAttributes(t,r,n,i,s,o,a){if(r&&t.appendLeft(a," }"),i){if(n){const{start:l}=s;s instanceof Ng&&t.prependRight(l,"{}, "),t.prependRight(l,"Object.assign("),t.appendLeft(a,")")}}else n||t.appendLeft(a,`, ${o}`)}}class $R extends X2{include(t,r){super.include(t,r),this.openingFragment.include(t,r),this.closingFragment.include(t,r)}render(t,r){switch(this.jsxMode.mode){case"classic":this.renderClassicMode(t,r);break;case"automatic":this.renderAutomaticMode(t,r);break;default:super.render(t,r)}}renderClassicMode(t,r){const{snippets:{getPropertyAccess:n},useOriginalName:i}=r,{closingFragment:s,factory:o,factoryVariable:a,openingFragment:l,start:c}=this,[,...u]=o.split(".");l.render(t,r),t.prependRight(c,`/*#__PURE__*/${[a.getName(n,i),...u].join(".")}(`),t.appendLeft(l.end,", null"),this.renderChildren(t,r,l.end),s.render(t,r)}renderAutomaticMode(t,r){const{snippets:{getPropertyAccess:n},useOriginalName:i}=r,{closingFragment:s,factoryVariable:o,openingFragment:a,start:l}=this;a.render(t,r),t.prependRight(l,`/*#__PURE__*/${o.getName(n,i)}(`);const{firstChild:c,hasMultipleChildren:u,childrenEnd:h}=this.renderChildren(t,r,a.end);c?(t.prependRight(c.start,"{ children: "+(u?"[":"")),u&&t.appendLeft(s.start,"]"),t.appendLeft(h," }")):t.appendLeft(a.end,", {}"),s.render(t,r)}}class BR extends Ft{includeNode(t){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.object.includePath([this.property.name],t)}includePath(t,r){this.included||this.includeNode(r),this.object.includePath([this.property.name,...t],r)}}class J2 extends Ft{}J2.prototype.includeNode=jr;class Z2 extends Ft{render(t,r,{jsxMode:n=this.scope.context.options.jsx.mode}={}){this.name.render(t,r);for(const i of this.attributes)i.render(t,r,{jsxMode:n})}}Z2.prototype.includeNode=jr;class RR extends Ft{constructor(){super(...arguments),this.fragment=null,this.fragmentVariable=null}includeNode(t){this.included=!0,this.deoptimized||this.applyDeoptimizations();const r=this.scope.context.options.jsx;if(r.mode==="automatic")this.fragment="Fragment",this.fragmentVariable=aw("Fragment",!1,r.jsxImportSource,this,t);else{const{fragment:n,importSource:i,mode:s}=r;n!=null&&(this.fragment=n,this.fragmentVariable=aw(n,s==="preserve",i,this,t))}}render(t,r){const{mode:n}=this.scope.context.options.jsx;if(n!=="preserve"){const{snippets:{getPropertyAccess:i},useOriginalName:s}=r,[,...o]=this.fragment.split("."),a=[this.fragmentVariable.getName(i,s),...o].join(".");t.update(this.start,this.end,a)}}}class NR extends Ft{render(t,r){super.render(t,r);const{mode:n}=this.scope.context.options.jsx;n!=="preserve"&&(t.overwrite(this.start,this.expression.start,"...",{contentOnly:!0}),t.overwrite(this.expression.end,this.end,"",{contentOnly:!0}))}}class Q2 extends Ft{render(t){const{mode:r}=this.scope.context.options.jsx;r!=="preserve"&&t.overwrite(this.start,this.end,JSON.stringify(this.value),{contentOnly:!0})}}Q2.prototype.includeNode=jr;class t_ extends Ft{hasEffects(t){const{brokenFlow:r,includedLabels:n}=t;t.ignore.labels.add(this.label.name),t.includedLabels=new Set;let i=!1;return this.body.hasEffects(t)?i=!0:(t.ignore.labels.delete(this.label.name),t.includedLabels.has(this.label.name)&&(t.includedLabels.delete(this.label.name),t.brokenFlow=r)),t.includedLabels=new Set([...n,...t.includedLabels]),i}include(t,r){this.included||this.includeNode(t);const{brokenFlow:n,includedLabels:i}=t;t.includedLabels=new Set,this.body.include(t,r),(r||t.includedLabels.has(this.label.name))&&(this.label.include(t,r),t.includedLabels.delete(this.label.name),t.brokenFlow=n),t.includedLabels=new Set([...i,...t.includedLabels])}includeNode(t){this.included=!0,this.body.includePath(It,t)}render(t,r){this.label.included?this.label.render(t,r):t.remove(this.start,ga(t.original,Nr(t.original,":",this.label.end)+1)),this.body.render(t,r)}}t_.prototype.applyDeoptimizations=Se;class Lg extends Ft{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.usedBranch=null}get isBranchResolutionAnalysed(){return Ge(this.flags,65536)}set isBranchResolutionAnalysed(t){this.flags=Ye(this.flags,65536,t)}get hasDeoptimizedCache(){return Ge(this.flags,33554432)}set hasDeoptimizedCache(t){this.flags=Ye(this.flags,33554432,t)}deoptimizeArgumentsOnInteractionAtPath(t,r,n){this.left.deoptimizeArgumentsOnInteractionAtPath(t,r,n),this.right.deoptimizeArgumentsOnInteractionAtPath(t,r,n)}deoptimizeCache(){if(this.hasDeoptimizedCache)return;if(this.hasDeoptimizedCache=!0,this.usedBranch){const n=this.usedBranch===this.left?this.right:this.left;this.usedBranch=null,n.deoptimizePath(It),this.included&&n.includePath(It,Xi())}const{scope:{context:t},expressionsToBeDeoptimized:r}=this;this.expressionsToBeDeoptimized=lr;for(const n of r)n.deoptimizeCache();t.requestTreeshakingPass()}deoptimizePath(t){const r=this.getUsedBranch();r?r.deoptimizePath(t):(this.left.deoptimizePath(t),this.right.deoptimizePath(t))}getLiteralValueAtPath(t,r,n){if(n===this)return $e;const i=this.getUsedBranch();if(i)return this.expressionsToBeDeoptimized.push(n),i.getLiteralValueAtPath(t,r,n);if(!this.hasDeoptimizedCache){const s=Tg(this.right.getLiteralValueAtPath(t,r,n));if(typeof s!="symbol"){if(!s&&this.operator==="&&")return this.expressionsToBeDeoptimized.push(n),E2;if(s&&this.operator==="||")return this.expressionsToBeDeoptimized.push(n),S2}}return $e}getReturnExpressionWhenCalledAtPath(t,r,n,i){const s=this.getUsedBranch();return s?(this.expressionsToBeDeoptimized.push(i),s.getReturnExpressionWhenCalledAtPath(t,r,n,i)):[new oy([this.left.getReturnExpressionWhenCalledAtPath(t,r,n,i)[0],this.right.getReturnExpressionWhenCalledAtPath(t,r,n,i)[0]]),!1]}hasEffects(t){return!!this.left.hasEffects(t)||this.getUsedBranch()!==this.left&&this.right.hasEffects(t)}hasEffectsOnInteractionAtPath(t,r,n){const i=this.getUsedBranch();return i?i.hasEffectsOnInteractionAtPath(t,r,n):this.left.hasEffectsOnInteractionAtPath(t,r,n)||this.right.hasEffectsOnInteractionAtPath(t,r,n)}include(t,r){this.included=!0;const n=this.getUsedBranch();r||!n||n===this.right&&this.left.shouldBeIncluded(t)?(this.left.include(t,r),this.right.include(t,r)):n.include(t,r)}includePath(t,r){this.included=!0;const n=this.getUsedBranch();!n||n===this.right&&this.left.shouldBeIncluded(r)?(this.left.includePath(t,r),this.right.includePath(t,r)):n.includePath(t,r)}removeAnnotations(t){this.left.removeAnnotations(t)}render(t,r,{isCalleeOfRenderedParent:n,preventASI:i,renderedParentType:s,renderedSurroundingElement:o}=Kr){if(this.left.included&&this.right.included)this.left.render(t,r,{preventASI:i,renderedSurroundingElement:o}),this.right.render(t,r);else{const a=Nr(t.original,this.operator,this.left.end);if(this.right.included){const l=ga(t.original,a+2);t.remove(this.start,l),i&&K0(t,l,this.right.start),this.left.removeAnnotations(t)}else t.remove(function(l,c,u){for(;;){if(c>=u||!Zat.test(l[u-1]))return u;u--}}(t.original,this.left.end,a),this.end);this.getUsedBranch().render(t,r,{isCalleeOfRenderedParent:n,preventASI:i,renderedParentType:s||this.parent.type,renderedSurroundingElement:o||this.parent.type})}}getUsedBranch(){if(!this.isBranchResolutionAnalysed){this.isBranchResolutionAnalysed=!0;const t=this.left.getLiteralValueAtPath(Bt,Qe,this),r=Tg(t);if(typeof r=="symbol")return null;this.usedBranch=this.operator==="||"&&r||this.operator==="&&"&&!r||this.operator==="??"&&t!=null?this.left:this.right}return this.usedBranch}}Lg.prototype.includeNode=Ke,Lg.prototype.applyDeoptimizations=Se;class LR extends Ft{hasEffects(t){this.deoptimized||this.applyDeoptimizations();for(const r of this.arguments)if(r.hasEffects(t))return!0;return!this.annotationPure&&(this.callee.hasEffects(t)||this.callee.hasEffectsOnInteractionAtPath(Bt,this.interaction,t))}hasEffectsOnInteractionAtPath(t,{type:r}){return t.length>0||r!==0}include(t,r){this.included||this.includeNode(t),r?super.include(t,!0):(this.callee.include(t,!1),this.callee.includeCallArguments(this.interaction,t))}includeNode(t){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.callee.includePath(It,t)}initialise(){super.initialise(),this.interaction={args:[null,...this.arguments],type:2,withNew:!0},this.annotations&&this.scope.context.options.treeshake.annotations&&(this.annotationPure=this.annotations.some(t=>t.type==="pure"))}render(t,r){this.callee.render(t,r),CR(t,r,this)}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,Bt,Qe),this.scope.context.requestTreeshakingPass()}}class pu extends Ft{constructor(){super(...arguments),this.objectEntity=null,this.protoProp=null}deoptimizeArgumentsOnInteractionAtPath(t,r,n){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(t,r,n)}deoptimizeCache(){this.getObjectEntity().deoptimizeAllProperties()}deoptimizePath(t){this.getObjectEntity().deoptimizePath(t)}getLiteralValueAtPath(t,r,n){return this.getObjectEntity().getLiteralValueAtPath(t,r,n)}getReturnExpressionWhenCalledAtPath(t,r,n,i){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(t,r,n,i)}hasEffectsOnInteractionAtPath(t,r,n){return this.getObjectEntity().hasEffectsOnInteractionAtPath(t,r,n)}include(t,r){this.included||this.includeNode(t),this.getObjectEntity().include(t,r),this.protoProp?.include(t,r)}includeNode(t){this.included=!0,this.protoProp?.includePath(It,t)}includePath(t,r){this.included||this.includeNode(r),this.getObjectEntity().includePath(t,r)}render(t,r,{renderedSurroundingElement:n}=Kr){if(n!==Fs&&n!==CB||(t.appendRight(this.start,"("),t.prependLeft(this.end,")")),this.properties.length>0){const i=Y0(this.properties,t,this.start+1,this.end-1);let s=null;for(const{node:o,separator:a,start:l,end:c}of i)o.included?(s=a,o.render(t,r)):Tu(o,t,l,c);s&&t.remove(s,this.end-1)}}getObjectEntity(){if(this.objectEntity!==null)return this.objectEntity;let t=ea;const r=[];for(const n of this.properties){if(n instanceof El){r.push({key:pe,kind:"init",property:n});continue}let i;if(n.computed){const s=n.key.getLiteralValueAtPath(Bt,Qe,this);if(typeof s=="symbol"){r.push({key:pe,kind:n.kind,property:n});continue}i=String(s)}else if(i=n.key instanceof Ve?n.key.name:String(n.key.value),i==="__proto__"&&n.kind==="init"){this.protoProp=n,t=n.value instanceof Hn&&n.value.value===null?null:n.value;continue}r.push({key:i,kind:n.kind,property:n})}return this.objectEntity=new li(r,t)}}pu.prototype.applyDeoptimizations=Se;class MR extends Ft{initialise(){const t=this.scope.context.module.id;return Pt(P2(Tf(mg(this.message)),t))}}class jR extends Ft{initialise(){const t=this.start,r=this.scope.context.module.id,n=P2(Tf(mg(this.message,t)),r);this.scope.context.error(n,t)}}class e_ extends Ft{}e_.prototype.includeNode=jr;class Mg extends Ft{constructor(){super(...arguments),this.hasCachedEffect=null,this.hasLoggedEffect=!1}hasCachedEffects(){return!!this.included&&(this.hasCachedEffect===null?this.hasCachedEffect=this.hasEffects(Ll()):this.hasCachedEffect)}hasEffects(t){for(const r of this.body)if(r.hasEffects(t)){if(this.scope.context.options.experimentalLogSideEffects&&!this.hasLoggedEffect){this.hasLoggedEffect=!0;const{code:n,log:i,module:s}=this.scope.context;i(rl,hlt(n,s.id,k2(n,r.start,{offsetLine:1})),r.start)}return this.hasCachedEffect=!0}return!1}include(t,r){this.included=!0;for(const n of this.body)(r||n.shouldBeIncluded(t))&&n.include(t,r)}initialise(){if(super.initialise(),this.invalidAnnotations)for(const{start:t,end:r,type:n}of this.invalidAnnotations)this.scope.context.magicString.remove(t,r),n!=="pure"&&n!=="noSideEffects"||this.scope.context.log(oe,flt(this.scope.context.code.slice(t,r),this.scope.context.module.id,n),t)}render(t,r){let n=this.start;if(t.original.startsWith("#!")&&(n=Math.min(t.original.indexOf(` `)+1,this.end),t.remove(0,n)),this.body.length>0){for(;t.original[n]==="/"&&/[*/]/.test(t.original[n+1]);){const i=kf(t.original.slice(n,this.body[0].start));if(i[0]===-1)break;n+=i[1]}ad(this.body,t,n,this.end,r)}else super.render(t,r)}}Mg.prototype.includeNode=Ke,Mg.prototype.applyDeoptimizations=Se;class Nf extends vg{get method(){return Ge(this.flags,262144)}set method(t){this.flags=Ye(this.flags,262144,t)}get shorthand(){return Ge(this.flags,524288)}set shorthand(t){this.flags=Ye(this.flags,524288,t)}declare(t,r,n){return this.value.declare(t,this.getPathInProperty(r),n)}deoptimizeAssignment(t,r){this.value.deoptimizeAssignment?.(this.getPathInProperty(t),r)}hasEffects(t){return this.key.hasEffects(t)||this.value.hasEffects(t)}hasEffectsWhenDestructuring(t,r,n){return this.value.hasEffectsWhenDestructuring?.(t,this.getPathInProperty(r),n)}includeDestructuredIfNecessary(t,r,n){const i=this.getPathInProperty(r);let s=this.value.includeDestructuredIfNecessary(t,i,n)||this.included;return(s||=this.key.hasEffects(Ll()))&&(this.key.include(t,!1),this.value.included||(this.value.included=!0,this.value.includeDestructuredIfNecessary(t,i,n))),this.included=s}include(t,r){this.included=!0,this.key.include(t,r),this.value.include(t,r)}includePath(t,r){this.included=!0,this.value.includePath(t,r)}markDeclarationReached(){this.value.markDeclarationReached()}render(t,r){this.shorthand||this.key.render(t,r),this.value.render(t,r,{isShorthandProperty:this.shorthand})}getPathInProperty(t){return t.at(-1)===pe?t:this.computed?[...t,pe]:this.key instanceof Ve?[...t,this.key.name]:[...t,String(this.key.value)]}}Nf.prototype.includeNode=Ke,Nf.prototype.applyDeoptimizations=Se;class r_ extends Ft{get computed(){return Ge(this.flags,1024)}set computed(t){this.flags=Ye(this.flags,1024,t)}deoptimizeArgumentsOnInteractionAtPath(t,r,n){this.value?.deoptimizeArgumentsOnInteractionAtPath(t,r,n)}deoptimizePath(t){this.value?.deoptimizePath(t)}getLiteralValueAtPath(t,r,n){return this.value?this.value.getLiteralValueAtPath(t,r,n):$e}getReturnExpressionWhenCalledAtPath(t,r,n,i){return this.value?this.value.getReturnExpressionWhenCalledAtPath(t,r,n,i):Tr}hasEffects(t){return this.key.hasEffects(t)||this.static&&!!this.value?.hasEffects(t)||R2(this.decorators,t)}hasEffectsOnInteractionAtPath(t,r,n){return!this.value||this.value.hasEffectsOnInteractionAtPath(t,r,n)}includeNode(t){this.included=!0,this.value?.includePath(It,t);for(const r of this.decorators)r.includePath(It,t)}}r_.prototype.applyDeoptimizations=Se;class n_ extends Ft{hasEffects(t){return!(t.ignore.returnYield&&!this.argument?.hasEffects(t))||(t.brokenFlow=!0,!1)}include(t,r){this.included||this.includeNode(t),this.argument?.include(t,r),t.brokenFlow=!0}includeNode(t){this.included=!0,this.argument?.includePath(It,t)}initialise(){super.initialise(),this.scope.addReturnExpression(this.argument||me)}render(t,r){this.argument&&(this.argument.render(t,r,{preventASI:!0}),this.argument.start===this.start+6&&t.prependLeft(this.start+6," "))}}n_.prototype.applyDeoptimizations=Se;class jg extends Ft{deoptimizeArgumentsOnInteractionAtPath(t,r,n){this.expressions[this.expressions.length-1].deoptimizeArgumentsOnInteractionAtPath(t,r,n)}deoptimizePath(t){this.expressions[this.expressions.length-1].deoptimizePath(t)}getLiteralValueAtPath(t,r,n){return this.expressions[this.expressions.length-1].getLiteralValueAtPath(t,r,n)}hasEffects(t){for(const r of this.expressions)if(r.hasEffects(t))return!0;return!1}hasEffectsOnInteractionAtPath(t,r,n){return this.expressions[this.expressions.length-1].hasEffectsOnInteractionAtPath(t,r,n)}include(t,r){this.included=!0;const n=this.expressions[this.expressions.length-1];for(const i of this.expressions)(r||i===n&&!(this.parent instanceof ns)||i.shouldBeIncluded(t))&&i.include(t,r)}includePath(t,r){this.included=!0,this.expressions[this.expressions.length-1].includePath(t,r)}removeAnnotations(t){this.expressions[0].removeAnnotations(t)}render(t,r,{renderedParentType:n,isCalleeOfRenderedParent:i,preventASI:s}=Kr){let o=0,a=null;const l=this.expressions[this.expressions.length-1];for(const{node:c,separator:u,start:h,end:d}of Y0(this.expressions,t,this.start,this.end))if(c.included)if(o++,a=u,o===1&&s&&K0(t,h,c.start),o===1){const g=n||this.parent.type;c.render(t,r,{isCalleeOfRenderedParent:i&&c===l,renderedParentType:g,renderedSurroundingElement:g})}else c.render(t,r);else Tu(c,t,h,d);a&&t.remove(a,this.end)}}jg.prototype.includeNode=Ke,jg.prototype.applyDeoptimizations=Se;class zR extends Ft{bind(){this.variable=this.scope.findVariable("this")}deoptimizeArgumentsOnInteractionAtPath(t,r,n){this.variable.deoptimizeArgumentsOnInteractionAtPath(t,r,n)}deoptimizePath(t){this.variable.deoptimizePath(t)}include(t){this.included||this.includeNode(t)}includeNode(t){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.scope.context.includeVariableInModule(this.variable,Bt,t)}}class ef extends Ft{hasEffects(t){if(this.test?.hasEffects(t))return!0;for(const r of this.consequent){if(t.brokenFlow)break;if(r.hasEffects(t))return!0}return!1}include(t,r){this.included=!0,this.test?.include(t,r);for(const n of this.consequent)(r||n.shouldBeIncluded(t))&&n.include(t,r)}render(t,r,n){if(this.test&&(this.test.render(t,r),this.test.start===this.start+4&&t.prependLeft(this.test.start," ")),this.consequent.length>0){const i=this.test?this.test.end:Nr(t.original,"default",this.start)+7,s=Nr(t.original,":",i)+1;ad(this.consequent,t,s,n.end,r)}}}ef.prototype.needsBoundaries=!0,ef.prototype.includeNode=Ke,ef.prototype.applyDeoptimizations=Se;class zg extends Ft{createScope(t){this.parentScope=t,this.scope=new jl(t)}hasEffects(t){if(this.discriminant.hasEffects(t))return!0;const{brokenFlow:r,hasBreak:n,ignore:i}=t,{breaks:s}=i;i.breaks=!0,t.hasBreak=!1;let o=!0;for(const a of this.cases){if(a.hasEffects(t))return!0;o&&=t.brokenFlow&&!t.hasBreak,t.hasBreak=!1,t.brokenFlow=r}return this.defaultCase!==null&&(t.brokenFlow=o),i.breaks=s,t.hasBreak=n,!1}include(t,r){this.included=!0,this.discriminant.include(t,r);const{brokenFlow:n,hasBreak:i}=t;t.hasBreak=!1;let s=!0,o=r||this.defaultCase!==null&&this.defaultCase=0;a--){const l=this.cases[a];if(l.included&&(o=!0),!o){const c=Ll();c.ignore.breaks=!0,o=l.hasEffects(c)}o?(l.include(t,r),s&&=t.brokenFlow&&!t.hasBreak,t.hasBreak=!1,t.brokenFlow=n):s=n}o&&this.defaultCase!==null&&(t.brokenFlow=s),t.hasBreak=i}initialise(){super.initialise();for(let t=0;t0&&ad(this.cases,t,this.cases[0].start,this.end-1,r)}}zg.prototype.includeNode=Ke,zg.prototype.applyDeoptimizations=Se;class i_ extends AR{bind(){if(super.bind(),this.tag.type===kB){const t=this.tag.name;this.scope.findVariable(t).isNamespace&&this.scope.context.log(oe,VB(t),this.start)}}hasEffects(t){this.deoptimized||this.applyDeoptimizations();for(const r of this.quasi.expressions)if(r.hasEffects(t))return!0;return this.tag.hasEffects(t)||this.tag.hasEffectsOnInteractionAtPath(Bt,this.interaction,t)}include(t,r){this.included||this.includeNode(t),r?super.include(t,!0):(this.quasi.include(t,!1),this.tag.include(t,!1),this.tag.includeCallArguments(this.interaction,t))}initialise(){super.initialise(),this.args=[me,...this.quasi.expressions],this.interaction={args:[this.tag instanceof So&&!this.tag.variable?this.tag.object:null,...this.args],type:2,withNew:!1}}render(t,r){this.tag.render(t,r,{isCalleeOfRenderedParent:!0}),this.quasi.render(t,r)}applyDeoptimizations(){this.deoptimized=!0,this.tag.deoptimizeArgumentsOnInteractionAtPath(this.interaction,Bt,Qe),this.scope.context.requestTreeshakingPass()}getReturnExpression(t=Qe){return this.returnExpression===null?(this.returnExpression=Tr,this.returnExpression=this.tag.getReturnExpressionWhenCalledAtPath(Bt,this.interaction,t,this)):this.returnExpression}}i_.prototype.includeNode=jr;class s_ extends Ft{get tail(){return Ge(this.flags,1048576)}set tail(t){this.flags=Ye(this.flags,1048576,t)}bind(){}hasEffects(){return!1}parseNode(t){return this.value=t.value,super.parseNode(t)}render(){}}s_.prototype.includeNode=jr;class UR extends Ft{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(t){return t.length>0||this.quasis.length!==1?$e:this.quasis[0].value.cooked}getReturnExpressionWhenCalledAtPath(t){return t.length!==1?Tr:fd(Ff,t[0])}hasEffectsOnInteractionAtPath(t,r,n){return r.type===0?t.length>1:r.type!==2||t.length!==1||hd(Ff,t[0],r,n)}includeNode(t){this.included=!0,this.deoptimized||this.applyDeoptimizations();for(const r of this.expressions)r.includePath(It,t)}render(t,r){t.indentExclusionRanges.push([this.start,this.end]),super.render(t,r)}}class VR extends Xn{constructor(t,r){super(t,r),this.variables.set("this",new as("this",null,fo,Bt,r,"other"))}addDeclaration(t,r,n,i,s){return this.context.module.importDescriptions.has(t.name)&&r.error(Pu(t.name),t.start),super.addDeclaration(t,r,n,i,s)}addExportDefaultDeclaration(t,r,n){const i=new Rs(t,r,n);return this.variables.set("default",i),i}addNamespaceMemberAccess(){}deconflict(t,r,n){for(const i of this.children)i.deconflict(t,r,n)}findLexicalBoundary(){return this}findVariable(t){const r=this.variables.get(t)||this.accessedOutsideVariables.get(t);if(r)return r;const n=this.context.traceVariable(t)||this.parent.findVariable(t);return n instanceof B2&&this.accessedOutsideVariables.set(t,n),n}}class WR extends Ft{bind(){this.variable=this.scope.findVariable("this")}deoptimizeArgumentsOnInteractionAtPath(t,r,n){this.variable.deoptimizeArgumentsOnInteractionAtPath(t,r,n)}deoptimizePath(t){this.variable.deoptimizePath(t)}hasEffectsOnInteractionAtPath(t,r,n){return t.length===0?r.type!==0:this.variable.hasEffectsOnInteractionAtPath(t,r,n)}include(t){this.included||this.includeNode(t)}includeNode(t){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.scope.context.includeVariableInModule(this.variable,Bt,t)}includePath(t,r){this.included?t.length>0&&this.variable.includePath(t,r):(this.included=!0,this.scope.context.includeVariableInModule(this.variable,t,r));const n=function(i,s){for(;!(i instanceof aR&&i.thisVariable===s);){if(!(i instanceof Xn))return null;i=i.parent}return i}(this.scope,this.variable);n&&n.functionNode.parent instanceof Nf&&n.functionNode.parent.parent instanceof pu&&n.functionNode.parent.parent.includePath(t,r)}initialise(){super.initialise(),this.alias=this.scope.findLexicalBoundary()instanceof VR?this.scope.context.moduleContext:null,this.alias==="undefined"&&this.scope.context.log(oe,{code:"THIS_IS_UNDEFINED",message:"The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten",url:Dr("troubleshooting/#error-this-is-undefined")},this.start)}render(t){this.alias!==null&&t.overwrite(this.start,this.end,this.alias,{contentOnly:!1,storeName:!0})}}class qR extends Ft{hasEffects(){return!0}include(t,r){this.included||this.includeNode(t),this.argument.include(t,r),t.brokenFlow=!0}includeNode(t){this.included||(this.included=!0,this.argument.includePath(It,t))}render(t,r){this.argument.render(t,r,{preventASI:!0}),this.argument.start===this.start+5&&t.prependLeft(this.start+5," ")}}class Ug extends Ft{constructor(){super(...arguments),this.directlyIncluded=!1,this.includedLabelsAfterBlock=null}hasEffects(t){return(this.scope.context.options.treeshake.tryCatchDeoptimization?this.block.body.length>0:this.block.hasEffects(t))||!!this.finalizer?.hasEffects(t)}include(t,r){const n=this.scope.context.options.treeshake?.tryCatchDeoptimization,{brokenFlow:i,includedLabels:s}=t;if(this.directlyIncluded&&n){if(this.includedLabelsAfterBlock)for(const o of this.includedLabelsAfterBlock)s.add(o)}else this.included=!0,this.directlyIncluded=!0,this.block.include(t,n?JB:r),s.size>0&&(this.includedLabelsAfterBlock=[...s]),t.brokenFlow=i;this.handler!==null&&(this.handler.include(t,r),t.brokenFlow=i),this.finalizer?.include(t,r)}}Ug.prototype.includeNode=Ke,Ug.prototype.applyDeoptimizations=Se;const cct={"!":e=>!e,"+":e=>+e,"-":e=>-e,delete:()=>$e,typeof:e=>typeof e,void:()=>{},"~":e=>~e},Qk=Symbol("Unassigned");class o_ extends Ft{constructor(){super(...arguments),this.renderedLiteralValue=Qk}get prefix(){return Ge(this.flags,2097152)}set prefix(t){this.flags=Ye(this.flags,2097152,t)}deoptimizeCache(){this.renderedLiteralValue=$e}getLiteralValueAtPath(t,r,n){if(t.length>0)return $e;const i=this.argument.getLiteralValueAtPath(Bt,r,n);if(typeof i=="symbol"){if(this.operator==="void")return;if(this.operator==="!"){if(i===E2)return!0;if(i===S2)return!1}return $e}return cct[this.operator](i)}hasEffects(t){return this.deoptimized||this.applyDeoptimizations(),!(this.operator==="typeof"&&this.argument instanceof Ve)&&(this.argument.hasEffects(t)||this.operator==="delete"&&this.argument.hasEffectsOnInteractionAtPath(Bt,A2,t))}hasEffectsOnInteractionAtPath(t,{type:r}){return r!==0||t.length>(this.operator==="void"?0:1)}applyDeoptimizations(){this.deoptimized=!0,this.operator==="delete"&&(this.argument.deoptimizePath(Bt),this.scope.context.requestTreeshakingPass())}getRenderedLiteralValue(t){return this.renderedLiteralValue!==Qk?this.renderedLiteralValue:this.renderedLiteralValue=t?$e:function(r){return r===void 0?"void 0":typeof r=="boolean"?String(r):typeof r=="string"?JSON.stringify(r):typeof r=="number"?function(n){if(Object.is(-0,n))return"-0";const i=n.toExponential(),[s,o]=i.split("e"),a=s.split(".")[1]?.length||0,l=`${s.replace(".","")}e${parseInt(o)-a}`,c=String(n).replace("+","");return l.length^|,?:;]/;o_.prototype.includeNode=jr;class a_ extends Ft{hasEffects(t){return this.deoptimized||this.applyDeoptimizations(),this.argument.hasEffectsAsAssignmentTarget(t,!0)}hasEffectsOnInteractionAtPath(t,{type:r}){return t.length>1||r!==0}include(t,r){this.included||this.includeNode(t),this.argument.includeAsAssignmentTarget(t,r,!0)}initialise(){super.initialise(),this.argument.setAssignedValue(me)}render(t,r){const{exportNamesByVariable:n,format:i,snippets:{_:s}}=r;if(this.argument.render(t,r),i==="system"){const o=this.argument.variable,a=n.get(o);if(a)if(this.prefix)a.length===1?x2(o,this.start,this.end,t,r):_B(o,this.start,this.end,this.parent.type!==Fs,t,r);else{const l=this.operator[0];(function(c,u,h,d,g,y,f){const{_:p}=y.snippets;g.prependRight(u,`${Nl([c],y,f)},${p}`),d&&(g.prependRight(u,"("),g.appendLeft(h,")"))})(o,this.start,this.end,this.parent.type!==Fs,t,r,`${s}${l}${s}1`)}}}applyDeoptimizations(){this.deoptimized=!0,this.argument.deoptimizePath(Bt),this.argument instanceof Ve&&this.scope.findVariable(this.argument.name).markReassigned(),this.scope.context.requestTreeshakingPass()}}a_.prototype.includeNode=jr;class Lf extends Ft{deoptimizePath(){for(const t of this.declarations)t.deoptimizePath(Bt)}hasEffectsOnInteractionAtPath(){return!1}include(t,r,{asSingleStatement:n}=Kr){this.included=!0;for(const i of this.declarations){(r||i.shouldBeIncluded(t))&&i.include(t,r);const{id:s,init:o}=i;n&&s.include(t,r),o&&s.included&&!o.included&&(s instanceof va||s instanceof iy)&&o.include(t,r)}}initialise(){super.initialise(),this.isUsingDeclaration=this.kind==="await using"||this.kind==="using";for(const t of this.declarations)t.declareDeclarator(this.kind,this.isUsingDeclaration)}removeAnnotations(t){this.declarations[0].removeAnnotations(t)}render(t,r,n=Kr){if(this.isUsingDeclaration||function(i,s){for(const o of i){if(!o.id.included)return!1;if(o.id.type===kB){if(s.has(o.id.variable))return!1}else{const a=[];if(o.id.addExportedVariables(a,s),a.length>0)return!1}}return!0}(this.declarations,r.exportNamesByVariable)){for(const i of this.declarations)i.render(t,r);n.isNoStatement||t.original.charCodeAt(this.end-1)===59||t.appendLeft(this.end,";")}else this.renderReplacedDeclarations(t,r)}renderDeclarationEnd(t,r,n,i,s,o,a){t.original.charCodeAt(this.end-1)===59&&t.remove(this.end-1,this.end),r+=";",n===null?t.appendLeft(s,r):(t.original.charCodeAt(i-1)!==10||t.original.charCodeAt(this.end)!==10&&t.original.charCodeAt(this.end)!==13||(i--,t.original.charCodeAt(i)===13&&i--),i===n+1?t.overwrite(n,s,r):(t.overwrite(n,n+1,r),t.remove(i,s))),o.length>0&&t.appendLeft(s,` ${Nl(o,a)};`)}renderReplacedDeclarations(t,r){const n=Y0(this.declarations,t,this.start+this.kind.length,this.end-(t.original.charCodeAt(this.end-1)===59?1:0));let i,s;s=ga(t.original,this.start+this.kind.length);let o=s-1;t.remove(this.start,o);let a,l=!1,c=!1,u="";const h=[],d=function(g,y,f){let p=null;if(y.format==="system"){for(const{node:m}of g)m.id instanceof Ve&&m.init&&f.length===0&&y.exportNamesByVariable.get(m.id.variable)?.length===1?(p=m.id.variable,f.push(p)):m.id.addExportedVariables(f,y.exportNamesByVariable);f.length>1?p=null:p&&(f.length=0)}return p}(n,r,h);for(const{node:g,start:y,separator:f,contentEnd:p,end:m}of n)if(g.included){if(g.render(t,r),a="",!g.id.included||g.id instanceof Ve&&PR(g.id.variable,r.exportNamesByVariable))c&&(u+=";"),l=!1;else{if(d&&d===g.id.variable){const b=Nr(t.original,"=",g.id.end);x2(d,ga(t.original,b+1),f===null?p:f,t,r)}l?u+=",":(c&&(u+=";"),a+=`${this.kind} `,l=!0)}s===o+1?t.overwrite(o,s,u+a):(t.overwrite(o,o+1,u),t.appendLeft(s,a)),i=p,s=m,c=!0,o=f,u=""}else Tu(g,t,y,m);this.renderDeclarationEnd(t,u,o,i,s,h,r)}}Lf.prototype.includeNode=Ke,Lf.prototype.applyDeoptimizations=Se;class Vg extends Ft{hasEffects(t){return!!this.test.hasEffects(t)||ay(t,this.body)}include(t,r){this.included=!0,this.test.include(t,r),pd(t,this.body,r)}}Vg.prototype.includeNode=Ke,Vg.prototype.applyDeoptimizations=Se;class HR extends Ft{applyDeoptimizations(){this.deoptimized=!0,this.argument?.deoptimizePath(It)}hasEffects(t){return this.deoptimized||this.applyDeoptimizations(),!(t.ignore.returnYield&&!this.argument?.hasEffects(t))}includeNode(t){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.argument?.includePath(It,t)}render(t,r){this.argument&&(this.argument.render(t,r,{preventASI:!0}),this.argument.start===this.start+5&&t.prependLeft(this.start+5," "))}}const hct=["PanicError","ParseError","ArrayExpression","ArrayPattern","ArrowFunctionExpression","AssignmentExpression","AssignmentPattern","AwaitExpression","BinaryExpression","BlockStatement","BreakStatement","CallExpression","CatchClause","ChainExpression","ClassBody","ClassDeclaration","ClassExpression","ConditionalExpression","ContinueStatement","DebuggerStatement","Decorator","ExpressionStatement","DoWhileStatement","EmptyStatement","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExportSpecifier","ExpressionStatement","ForInStatement","ForOfStatement","ForStatement","FunctionDeclaration","FunctionExpression","Identifier","IfStatement","ImportAttribute","ImportDeclaration","ImportDefaultSpecifier","ImportExpression","ImportNamespaceSpecifier","ImportSpecifier","JSXAttribute","JSXClosingElement","JSXClosingFragment","JSXElement","JSXEmptyExpression","JSXExpressionContainer","JSXFragment","JSXIdentifier","JSXMemberExpression","JSXNamespacedName","JSXOpeningElement","JSXOpeningFragment","JSXSpreadAttribute","JSXSpreadChild","JSXText","LabeledStatement","Literal","Literal","Literal","Literal","Literal","Literal","LogicalExpression","MemberExpression","MetaProperty","MethodDefinition","NewExpression","ObjectExpression","ObjectPattern","PrivateIdentifier","Program","Property","PropertyDefinition","RestElement","ReturnStatement","SequenceExpression","SpreadElement","StaticBlock","Super","SwitchCase","SwitchStatement","TaggedTemplateExpression","TemplateElement","TemplateLiteral","ThisExpression","ThrowStatement","TryStatement","UnaryExpression","UpdateExpression","VariableDeclaration","VariableDeclarator","WhileStatement","YieldExpression"],fct=[MR,jR,$2,iy,sy,SR,ER,j2,z2,Al,Eg,U2,Cg,Ag,kg,Of,Dg,Pg,Fg,V2,W2,ns,Og,q2,Uc,sl,Qh,Ig,ns,kR,DR,$g,hu,H2,Ve,du,TR,tf,Bf,G2,Rf,Rg,cy,FR,OR,IR,md,uy,$R,Y2,BR,J2,Z2,RR,Ng,NR,Q2,t_,Hn,Hn,Hn,Hn,Hn,Hn,Lg,So,pR,wg,LR,pu,va,e_,Mg,Nf,r_,il,n_,jg,El,xg,zR,ef,zg,i_,s_,UR,WR,qR,Ug,o_,a_,Lf,ly,Vg,HR],dct=[function(e,t,r){e.message=r.convertString(r[t])},function(e,t,r){e.message=r.convertString(r[t])},function(e,t,r){const{scope:n}=e;e.elements=Xe(e,n,r[t],r)},function(e,t,r){const{scope:n}=e;e.elements=Xe(e,n,r[t],r)},function(e,t,r){const{scope:n}=e,i=r[t];e.async=!(1&~i),e.expression=!(2&~i),e.generator=!(4&~i);const s=e.annotations=Si(r[t+1],r);e.annotationNoSideEffects=s.some(a=>a.type==="noSideEffects");const o=e.params=Xe(e,n,r[t+2],r);n.addParameterVariables(o.map(a=>a.declare("parameter",Bt,me)),o[o.length-1]instanceof il),e.body=wt(e,n.bodyScope,r[t+3],r)},function(e,t,r){const{scope:n}=e;e.operator=en[r[t]],e.left=wt(e,n,r[t+1],r),e.right=wt(e,n,r[t+2],r)},function(e,t,r){const{scope:n}=e;e.left=wt(e,n,r[t],r),e.right=wt(e,n,r[t+1],r)},function(e,t,r){const{scope:n}=e;e.argument=wt(e,n,r[t],r)},function(e,t,r){const{scope:n}=e;e.operator=en[r[t]],e.left=wt(e,n,r[t+1],r),e.right=wt(e,n,r[t+2],r)},function(e,t,r){const{scope:n}=e;e.body=Xe(e,n,r[t],r)},function(e,t,r){const{scope:n}=e,i=r[t];e.label=i===0?null:wt(e,n,i,r)},function(e,t,r){const{scope:n}=e,i=r[t];e.optional=!(1&~i),e.annotations=Si(r[t+1],r),e.callee=wt(e,n,r[t+2],r),e.arguments=Xe(e,n,r[t+3],r)},function(e,t,r){const{scope:n}=e,i=r[t];(e.param=i===0?null:wt(e,n,i,r))?.declare("parameter",Bt,me),e.body=wt(e,n.bodyScope,r[t+1],r)},function(e,t,r){const{scope:n}=e;e.expression=wt(e,n,r[t],r)},function(e,t,r){const{scope:n}=e,i=r[t];if(i){const s=r[i],o=e.body=new Array(s);for(let a=0;al.type==="noSideEffects");const o=r[t+2];e.id=o===0?null:wt(e,n.parent,o,r);const a=e.params=Xe(e,n,r[t+3],r);n.addParameterVariables(a.map(l=>l.declare("parameter",Bt,me)),a[a.length-1]instanceof il),e.body=wt(e,n.bodyScope,r[t+4],r)},function(e,t,r){const{scope:n}=e,i=r[t];e.async=!(1&~i),e.generator=!(2&~i);const s=e.annotations=Si(r[t+1],r);e.annotationNoSideEffects=s.some(l=>l.type==="noSideEffects");const o=r[t+2];e.id=o===0?null:wt(e,e.idScope,o,r);const a=e.params=Xe(e,n,r[t+3],r);n.addParameterVariables(a.map(l=>l.declare("parameter",Bt,me)),a[a.length-1]instanceof il),e.body=wt(e,n.bodyScope,r[t+4],r)},function(e,t,r){e.name=r.convertString(r[t])},function(e,t,r){const{scope:n}=e;e.test=wt(e,n,r[t],r),e.consequent=wt(e,e.consequentScope=new Bg(n),r[t+1],r);const i=r[t+2];e.alternate=i===0?null:wt(e,e.alternateScope=new Bg(n),i,r)},function(e,t,r){const{scope:n}=e;e.key=wt(e,n,r[t],r),e.value=wt(e,n,r[t+1],r)},function(e,t,r){const{scope:n}=e;e.specifiers=Xe(e,n,r[t],r),e.source=wt(e,n,r[t+1],r),e.attributes=Xe(e,n,r[t+2],r)},function(e,t,r){const{scope:n}=e;e.local=wt(e,n,r[t],r)},function(e,t,r){const{scope:n}=e;e.source=wt(e,n,r[t],r),e.sourceAstNode=xt(r[t],r);const i=r[t+1];e.options=i===0?null:wt(e,n,i,r)},function(e,t,r){const{scope:n}=e;e.local=wt(e,n,r[t],r)},function(e,t,r){const{scope:n}=e,i=r[t];e.local=wt(e,n,r[t+1],r),e.imported=i===0?e.local:wt(e,n,i,r)},function(e,t,r){const{scope:n}=e;e.name=wt(e,n,r[t],r);const i=r[t+1];e.value=i===0?null:wt(e,n,i,r)},function(e,t,r){const{scope:n}=e;e.name=wt(e,n,r[t],r)},function(){},function(e,t,r){const{scope:n}=e;e.openingElement=wt(e,n,r[t],r),e.children=Xe(e,n,r[t+1],r);const i=r[t+2];e.closingElement=i===0?null:wt(e,n,i,r)},function(){},function(e,t,r){const{scope:n}=e;e.expression=wt(e,n,r[t],r)},function(e,t,r){const{scope:n}=e;e.openingFragment=wt(e,n,r[t],r),e.children=Xe(e,n,r[t+1],r),e.closingFragment=wt(e,n,r[t+2],r)},function(e,t,r){e.name=r.convertString(r[t])},function(e,t,r){const{scope:n}=e;e.object=wt(e,n,r[t],r),e.property=wt(e,n,r[t+1],r)},function(e,t,r){const{scope:n}=e;e.namespace=wt(e,n,r[t],r),e.name=wt(e,n,r[t+1],r)},function(e,t,r){const{scope:n}=e,i=r[t];e.selfClosing=!(1&~i),e.name=wt(e,n,r[t+1],r),e.attributes=Xe(e,n,r[t+2],r)},function(e){e.attributes=[],e.selfClosing=!1},function(e,t,r){const{scope:n}=e;e.argument=wt(e,n,r[t],r)},function(e,t,r){const{scope:n}=e;e.expression=wt(e,n,r[t],r)},function(e,t,r){e.value=r.convertString(r[t]),e.raw=r.convertString(r[t+1])},function(e,t,r){const{scope:n}=e;e.label=wt(e,n,r[t],r),e.body=wt(e,n,r[t+1],r)},function(e,t,r){const n=e.bigint=r.convertString(r[t]);e.raw=r.convertString(r[t+1]),e.value=BigInt(n)},function(e,t,r){const n=r[t],i=e.value=!(1&~n);e.raw=i?"true":"false"},function(e){e.value=null},function(e,t,r){const n=r[t];e.raw=n===0?void 0:r.convertString(n),e.value=new DataView(r.buffer).getFloat64(t+1<<2,!0)},function(e,t,r){const n=r.convertString(r[t]),i=r.convertString(r[t+1]);e.raw=`/${i}/${n}`,e.regex={flags:n,pattern:i},e.value=new RegExp(i,n)},function(e,t,r){e.value=r.convertString(r[t]);const n=r[t+1];e.raw=n===0?void 0:r.convertString(n)},function(e,t,r){const{scope:n}=e;e.operator=en[r[t]],e.left=wt(e,n,r[t+1],r),e.right=wt(e,n,r[t+2],r)},function(e,t,r){const{scope:n}=e,i=r[t];e.computed=!(1&~i),e.optional=!(2&~i),e.object=wt(e,n,r[t+1],r),e.property=wt(e,n,r[t+2],r)},function(e,t,r){const{scope:n}=e;e.meta=wt(e,n,r[t],r),e.property=wt(e,n,r[t+1],r)},function(e,t,r){const{scope:n}=e,i=r[t];e.static=!(1&~i),e.computed=!(2&~i),e.decorators=Xe(e,n,r[t+1],r),e.key=wt(e,n,r[t+2],r),e.value=wt(e,n,r[t+3],r),e.kind=en[r[t+4]]},function(e,t,r){const{scope:n}=e;e.annotations=Si(r[t],r),e.callee=wt(e,n,r[t+1],r),e.arguments=Xe(e,n,r[t+2],r)},function(e,t,r){const{scope:n}=e;e.properties=Xe(e,n,r[t],r)},function(e,t,r){const{scope:n}=e;e.properties=Xe(e,n,r[t],r)},function(e,t,r){e.name=r.convertString(r[t])},function(e,t,r){const{scope:n}=e;e.body=Xe(e,n,r[t],r),e.invalidAnnotations=Si(r[t+1],r)},function(e,t,r){const{scope:n}=e,i=r[t];e.method=!(1&~i),e.shorthand=!(2&~i),e.computed=!(4&~i);const s=r[t+1];e.value=wt(e,n,r[t+2],r),e.kind=en[r[t+3]],e.key=s===0?e.value:wt(e,n,s,r)},function(e,t,r){const{scope:n}=e,i=r[t];e.static=!(1&~i),e.computed=!(2&~i),e.decorators=Xe(e,n,r[t+1],r),e.key=wt(e,n,r[t+2],r);const s=r[t+3];e.value=s===0?null:wt(e,n,s,r)},function(e,t,r){const{scope:n}=e;e.argument=wt(e,n,r[t],r)},function(e,t,r){const{scope:n}=e,i=r[t];e.argument=i===0?null:wt(e,n,i,r)},function(e,t,r){const{scope:n}=e;e.expressions=Xe(e,n,r[t],r)},function(e,t,r){const{scope:n}=e;e.argument=wt(e,n,r[t],r)},function(e,t,r){const{scope:n}=e;e.body=Xe(e,n,r[t],r)},function(){},function(e,t,r){const{scope:n}=e,i=r[t];e.test=i===0?null:wt(e,n,i,r),e.consequent=Xe(e,n,r[t+1],r)},function(e,t,r){const{scope:n}=e;e.discriminant=wt(e,e.parentScope,r[t],r),e.cases=Xe(e,n,r[t+1],r)},function(e,t,r){const{scope:n}=e;e.tag=wt(e,n,r[t],r),e.quasi=wt(e,n,r[t+1],r)},function(e,t,r){const n=r[t];e.tail=!(1&~n);const i=r[t+1],s=i===0?void 0:r.convertString(i),o=r.convertString(r[t+2]);e.value={cooked:s,raw:o}},function(e,t,r){const{scope:n}=e;e.quasis=Xe(e,n,r[t],r),e.expressions=Xe(e,n,r[t+1],r)},function(){},function(e,t,r){const{scope:n}=e;e.argument=wt(e,n,r[t],r)},function(e,t,r){const{scope:n}=e;e.block=wt(e,n,r[t],r);const i=r[t+1];e.handler=i===0?null:wt(e,n,i,r);const s=r[t+2];e.finalizer=s===0?null:wt(e,n,s,r)},function(e,t,r){const{scope:n}=e;e.operator=en[r[t]],e.argument=wt(e,n,r[t+1],r)},function(e,t,r){const{scope:n}=e,i=r[t];e.prefix=!(1&~i),e.operator=en[r[t+1]],e.argument=wt(e,n,r[t+2],r)},function(e,t,r){const{scope:n}=e;e.kind=en[r[t]],e.declarations=Xe(e,n,r[t+1],r)},function(e,t,r){const{scope:n}=e;e.id=wt(e,n,r[t],r);const i=r[t+1];e.init=i===0?null:wt(e,n,i,r)},function(e,t,r){const{scope:n}=e;e.test=wt(e,n,r[t],r),e.body=wt(e,n,r[t+1],r)},function(e,t,r){const{scope:n}=e,i=r[t];e.delegate=!(1&~i);const s=r[t+1];e.argument=s===0?null:wt(e,n,s,r)}];function wt(e,t,r,n){const i=n[r],s=fct[i];if(!s)throw console.trace(),new Error(`Unknown node type: ${i}`);const o=new s(e,t);return o.type=hct[i],o.start=n[r+1],o.end=n[r+2],dct[i](o,r+3,n),o.initialise(),o}function Xe(e,t,r,n){if(r===0)return lr;const i=n[r++],s=new Array(i);for(let o=0;ofunction(n){const i=xt(0,n);switch(i.type){case"PanicError":return Pt(Tf(mg(i.message)));case"ParseError":return Pt(Tf(mg(i.message,i.start)));default:return i}}(_R(wR(e,t,r))),mct=new Set(["assert","with"]);function YR(e){const{scope:{context:t},options:r,start:n}=e;if(!(r instanceof pu))return r&&t.module.log(oe,Ck(t.module.id),n),Yr;const i=r.properties.find(a=>mct.has(lw(a)))?.value;if(!i)return Yr;if(!(i instanceof pu))return t.module.log(oe,(s=t.module.id,{code:NB,message:`Rollup could not statically analyze the options argument of a dynamic import in "${le(s)}". Dynamic import options need to be an object with a nested attributes object.`}),n),Yr;var s;const o=i.properties.map(a=>{const l=lw(a);return typeof l=="string"&&typeof a.value.value=="string"?[l,a.value.value]:(t.module.log(oe,Ck(t.module.id),a.start),null)}).filter(a=>!!a);return o.length>0?Object.fromEntries(o):Yr}const lw=e=>{const t=e.key;return t&&!e.computed&&(t.name||t.value)};function im(e,t){const r=Object.keys(e);return r.length!==Object.keys(t).length||r.some(n=>e[n]!==t[n])}var KR="performance"in(typeof globalThis>"u"?typeof window>"u"?{}:window:globalThis)?performance:{now:()=>0},XR={memoryUsage:()=>({heapUsed:0})};let Mf=new Map;function JR(e,t){switch(t){case 1:return`# ${e}`;case 2:return`## ${e}`;case 3:return e;default:return`- ${e}`}}function gct(e,t=3){e=JR(e,t);const r=XR.memoryUsage().heapUsed,n=KR.now(),i=Mf.get(e);i===void 0?Mf.set(e,{memory:0,startMemory:r,startTime:n,time:0,totalMemory:0}):(i.startMemory=r,i.startTime=n)}function yct(e,t=3){e=JR(e,t);const r=Mf.get(e);if(r!==void 0){const n=XR.memoryUsage().heapUsed;r.memory+=n-r.startMemory,r.time+=KR.now()-r.startTime,r.totalMemory=Math.max(r.totalMemory,n)}}function bct(){const e={};for(const[t,{memory:r,time:n,totalMemory:i}]of Mf)e[t]=[n,r,i];return e}let Ir=os,kr=os;const vct=["augmentChunkHash","buildEnd","buildStart","generateBundle","load","moduleParsed","options","outputOptions","renderChunk","renderDynamicImport","renderStart","resolveDynamicImport","resolveFileUrl","resolveId","resolveImportMeta","shouldTransformCachedModule","transform","writeBundle"];function wct(e,t){if(e._hasTimer)return e;e._hasTimer=!0;for(const r of vct)if(r in e){let n=`plugin ${t}`;e.name&&(n+=` (${e.name})`),n+=` - ${r}`;const i=function(...o){Ir(n,4);const a=s.apply(this,o);return kr(n,4),a};let s;typeof e[r].handler=="function"?(s=e[r].handler,e[r].handler=i):(s=e[r],e[r]=i)}return e}const tD={identifier:null,localName:fu};function Jb(e,t,r,n,i=new Map){const s=i.get(t);if(s){if(s.has(e))return n?[null]:Pt((o=t,{code:"CIRCULAR_REEXPORT",exporter:a=e.id,message:`"${o}" cannot be exported from "${le(a)}" as it is a reexport that references itself.`}));s.add(e)}else i.set(t,new Set([e]));var o,a;return e.getVariableForExportName(t,{importerForSideEffects:r,isExportAllSearch:n,searchedNamesAndModules:i})}function eD(e,t){const r=ai(t.sideEffectDependenciesByVariable,e,Sl);let n=e;const i=new Set([n]);for(;;){const s=n.module;if(n=n instanceof Rs?n.getDirectOriginalVariable():n instanceof Un?n.syntheticNamespace:null,!n||i.has(n))break;i.add(n),r.add(s);const o=s.sideEffectDependenciesByVariable.get(n);if(o)for(const a of o)r.add(a)}return r}class br{constructor(t,r,n,i,s,o,a,l){this.graph=t,this.id=r,this.options=n,this.alternativeReexportModules=new Map,this.chunkFileNames=new Set,this.chunkNames=[],this.cycles=new Set,this.dependencies=new Set,this.dynamicDependencies=new Set,this.dynamicImporters=[],this.dynamicImports=[],this.execIndex=1/0,this.hasTreeShakingPassStarted=!1,this.implicitlyLoadedAfter=new Set,this.implicitlyLoadedBefore=new Set,this.importDescriptions=new Map,this.importMetas=[],this.importedFromNotTreeshaken=!1,this.importers=[],this.includedDynamicImporters=[],this.includedImports=new Set,this.isExecuted=!1,this.isUserDefinedEntryPoint=!1,this.needsExportShim=!1,this.sideEffectDependenciesByVariable=new Map,this.sourcesWithAttributes=new Map,this.allExportNames=null,this.allExportsIncluded=!1,this.ast=null,this.exportAllModules=[],this.exportAllSources=new Set,this.exportNamesByVariable=null,this.exportShimVariable=new pct(this),this.exports=new Map,this.namespaceReexportsByName=new Map,this.reexportDescriptions=new Map,this.relevantDependencies=null,this.syntheticExports=new Map,this.syntheticNamespace=null,this.transformDependencies=[],this.transitiveReexports=null,this.excludeFromSourcemap=/\0/.test(r),this.context=n.moduleContext(r),this.preserveSignature=this.options.preserveEntrySignatures;const c=this,{dynamicImports:u,dynamicImporters:h,exportAllSources:d,exports:g,implicitlyLoadedAfter:y,implicitlyLoadedBefore:f,importers:p,reexportDescriptions:m,sourcesWithAttributes:b}=this;this.info={ast:null,attributes:l,code:null,get dynamicallyImportedIdResolutions(){return u.map(({argument:w})=>typeof w=="string"&&c.resolvedIds[w]).filter(Boolean)},get dynamicallyImportedIds(){return u.map(({id:w})=>w).filter(w=>w!=null)},get dynamicImporters(){return h.sort()},get exportedBindings(){const w={".":[...g.keys()]};for(const[x,{source:E}]of m)(w[E]??=[]).push(x);for(const x of d)(w[x]??=[]).push("*");return w},get exports(){return[...g.keys(),...m.keys(),...[...d].map(()=>"*")]},get hasDefaultExport(){return c.ast?c.exports.has("default")||m.has("default"):null},id:r,get implicitlyLoadedAfterOneOf(){return Array.from(y,Xb).sort()},get implicitlyLoadedBefore(){return Array.from(f,Xb).sort()},get importedIdResolutions(){return Array.from(b.keys(),w=>c.resolvedIds[w]).filter(Boolean)},get importedIds(){return Array.from(b.keys(),w=>c.resolvedIds[w]?.id).filter(Boolean)},get importers(){return p.sort()},isEntry:i,isExternal:!1,get isIncluded(){return t.phase!==ol.GENERATE?null:c.isIncluded()},meta:{...a},moduleSideEffects:s,syntheticNamedExports:o}}basename(){const t=xo(this.id),r=Qo(this.id);return Z0(r?t.slice(0,-r.length):t)}bindReferences(){this.ast.bind()}cacheInfoGetters(){GB(this.info,["dynamicallyImportedIdResolutions","dynamicallyImportedIds","dynamicImporters","exportedBindings","exports","hasDefaultExport","implicitlyLoadedAfterOneOf","implicitlyLoadedBefore","importedIdResolutions","importedIds","importers"])}error(t,r){return r!==void 0&&this.addLocationToLogProps(t,r),Pt(t)}estimateSize(){let t=0;for(const r of this.ast.body)r.included&&(t+=r.end-r.start);return t}getAllExportNames(){if(this.allExportNames)return this.allExportNames;this.allExportNames=new Set([...this.exports.keys(),...this.reexportDescriptions.keys()]);for(const t of this.exportAllModules)if(t instanceof cr)this.allExportNames.add(`*${t.id}`);else for(const r of t.getAllExportNames())r!=="default"&&this.allExportNames.add(r);return typeof this.info.syntheticNamedExports=="string"&&this.allExportNames.delete(this.info.syntheticNamedExports),this.allExportNames}getDependenciesToBeIncluded(){if(this.relevantDependencies)return this.relevantDependencies;this.relevantDependencies=new Set;const t=new Set,r=new Set,n=new Set(this.includedImports);if(this.info.isEntry||this.includedDynamicImporters.length>0||this.namespace.included||this.implicitlyLoadedAfter.size>0)for(const i of[...this.getReexports(),...this.getExports()]){const[s]=this.getVariableForExportName(i);s?.included&&n.add(s)}for(let i of n){const s=this.sideEffectDependenciesByVariable.get(i);if(s)for(const o of s)r.add(o);i instanceof Un?i=i.getBaseVariable():i instanceof Rs&&(i=i.getOriginalVariable()),t.add(i.module)}if(this.options.treeshake&&this.info.moduleSideEffects!=="no-treeshake")this.addRelevantSideEffectDependencies(this.relevantDependencies,t,r);else for(const i of this.dependencies)this.relevantDependencies.add(i);for(const i of t)this.relevantDependencies.add(i);return this.relevantDependencies}getExportNamesByVariable(){if(this.exportNamesByVariable)return this.exportNamesByVariable;const t=new Map;for(const r of this.getAllExportNames()){let[n]=this.getVariableForExportName(r);if(n instanceof Rs&&(n=n.getOriginalVariable()),!n||!(n.included||n instanceof gg))continue;const i=t.get(n);i?i.push(r):t.set(n,[r])}return this.exportNamesByVariable=t}getExports(){return[...this.exports.keys()]}getReexports(){if(this.transitiveReexports)return this.transitiveReexports;this.transitiveReexports=[];const t=new Set(this.reexportDescriptions.keys());for(const r of this.exportAllModules)if(r instanceof cr)t.add(`*${r.id}`);else for(const n of[...r.getReexports(),...r.getExports()])n!=="default"&&t.add(n);return this.transitiveReexports=[...t]}getRenderedExports(){const t=[],r=[];for(const n of this.exports.keys()){const[i]=this.getVariableForExportName(n);(i?.included?t:r).push(n)}return{removedExports:r,renderedExports:t}}getSyntheticNamespace(){return this.syntheticNamespace===null&&(this.syntheticNamespace=void 0,[this.syntheticNamespace]=this.getVariableForExportName(typeof this.info.syntheticNamedExports=="string"?this.info.syntheticNamedExports:"default",{onlyExplicit:!0})),this.syntheticNamespace?this.syntheticNamespace:Pt((t=this.id,r=this.info.syntheticNamedExports,{code:"SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT",exporter:t,message:`Module "${le(t)}" that is marked with \`syntheticNamedExports: ${JSON.stringify(r)}\` needs ${typeof r=="string"&&r!=="default"?`an explicit export named "${r}"`:"a default export"} that does not reexport an unresolved named export of the same module.`}));var t,r}getVariableForExportName(t,{importerForSideEffects:r,isExportAllSearch:n,onlyExplicit:i,searchedNamesAndModules:s}=Yr){if(t[0]==="*")return t.length===1?[this.namespace]:this.graph.modulesById.get(t.slice(1)).getVariableForExportName("*");const o=this.reexportDescriptions.get(t);if(o){const[l]=Jb(o.module,o.localName,r,!1,s);return l?(r&&(rD(l,r,this),this.info.moduleSideEffects&&ai(r.sideEffectDependenciesByVariable,l,Sl).add(this)),[l]):this.error(pg(o.localName,this.id,o.module.id),o.start)}const a=this.exports.get(t);if(a){if(a===tD)return[this.exportShimVariable];const l=a.localName,c=this.traceVariable(l,{importerForSideEffects:r,searchedNamesAndModules:s});return r&&(rD(c,r,this),ai(r.sideEffectDependenciesByVariable,c,Sl).add(this)),[c]}if(i)return[null];if(t!=="default"){const l=this.namespaceReexportsByName.get(t)??this.getVariableFromNamespaceReexports(t,r,s);if(this.namespaceReexportsByName.set(t,l),l[0])return l}return this.info.syntheticNamedExports?[ai(this.syntheticExports,t,()=>new Un(this.astContext,t,this.getSyntheticNamespace()))]:!n&&this.options.shimMissingExports?(this.shimMissingExport(t),[this.exportShimVariable]):[null]}hasEffects(){return this.info.moduleSideEffects==="no-treeshake"||this.ast.hasCachedEffects()}include(){const t=Xi();this.ast.shouldBeIncluded(t)&&this.ast.include(t,!1)}includeAllExports(t){if(this.allExportsIncluded)return;this.allExportsIncluded=!0,this.isExecuted||(Dc(this),this.graph.needsTreeshakingPass=!0);const r=Xi();for(const s of this.exports.keys())if(t||s!==this.info.syntheticNamedExports){const o=this.getVariableForExportName(s)[0];if(!o)return Pt((n=s,i=this.id,{binding:n,code:MB,exporter:i,message:`Exported variable "${n}" is not defined in "${le(i)}".`,url:Dr(FB)}));this.includeVariable(o,It,r),o.deoptimizePath(It)}var n,i;for(const s of this.getReexports()){const[o]=this.getVariableForExportName(s);o&&(o.deoptimizePath(It),this.includeVariable(o,It,r),o instanceof gg&&(o.module.reexported=!0))}t&&this.namespace.setMergedNamespaces(this.includeAndGetAdditionalMergedNamespaces())}includeAllInBundle(){this.ast.include(Xi(),!0),this.includeAllExports(!1)}includeExportsByNames(t){this.isExecuted||(Dc(this),this.graph.needsTreeshakingPass=!0);let r=!1;const n=Xi();for(const i of t){const s=this.getVariableForExportName(i)[0];s&&(s.deoptimizePath(It),this.includeVariable(s,It,n)),this.exports.has(i)||this.reexportDescriptions.has(i)||(r=!0)}r&&this.namespace.setMergedNamespaces(this.includeAndGetAdditionalMergedNamespaces())}isIncluded(){return this.ast&&(this.ast.included||this.namespace.included||this.importedFromNotTreeshaken||this.exportShimVariable.included)}linkImports(){this.addModulesToImportDescriptions(this.importDescriptions),this.addModulesToImportDescriptions(this.reexportDescriptions);const t=[];for(const r of this.exportAllSources){const n=this.graph.modulesById.get(this.resolvedIds[r].id);n instanceof cr?t.push(n):this.exportAllModules.push(n)}this.exportAllModules.push(...t)}log(t,r,n){this.addLocationToLogProps(r,n),this.options.onLog(t,r)}render(t){const r=this.magicString.clone();this.ast.render(r,t),r.trim();const{usesTopLevelAwait:n}=this.astContext;return n&&t.format!=="es"&&t.format!=="system"?Pt((i=this.id,s=t.format,{code:"INVALID_TLA_FORMAT",id:i,message:`Module format "${s}" does not support top-level await. Use the "es" or "system" output formats rather.`})):{source:r,usesTopLevelAwait:n};var i,s}async setSource({ast:t,code:r,customTransformCache:n,originalCode:i,originalSourcemap:s,resolvedIds:o,sourcemapChain:a,transformDependencies:l,transformFiles:c,...u}){if(Ir("generate ast",3),r.startsWith("#!")){const p=r.indexOf(` `);this.shebang=r.slice(2,p)}this.info.code=r,this.originalCode=i,this.originalSourcemap=Vc(s),this.sourcemapChain=a.map(p=>p.missing?p:Vc(p)),l_(this.originalSourcemap,this.sourcemapChain),c&&(this.transformFiles=c),this.transformDependencies=l,this.customTransformCache=n,this.updateOptions(u),this.resolvedIds=o??Object.create(null);const h=this.id;this.magicString=new wl(r,{filename:this.excludeFromSourcemap?null:h,indentExclusionRanges:[]}),this.astContext={addDynamicImport:this.addDynamicImport.bind(this),addExport:this.addExport.bind(this),addImport:this.addImport.bind(this),addImportMeta:this.addImportMeta.bind(this),addImportSource:this.addImportSource.bind(this),code:r,deoptimizationTracker:this.graph.deoptimizationTracker,error:this.error.bind(this),fileName:h,getExports:this.getExports.bind(this),getImportedJsxFactoryVariable:this.getImportedJsxFactoryVariable.bind(this),getModuleExecIndex:()=>this.execIndex,getModuleName:this.basename.bind(this),getNodeConstructor:p=>Kb[p]||Kb.UnknownNode,getReexports:this.getReexports.bind(this),importDescriptions:this.importDescriptions,includeAllExports:()=>this.includeAllExports(!0),includeDynamicImport:this.includeDynamicImport.bind(this),includeVariableInModule:this.includeVariableInModule.bind(this),log:this.log.bind(this),magicString:this.magicString,manualPureFunctions:this.graph.pureFunctions,module:this,moduleContext:this.context,newlyIncludedVariableInits:this.graph.newlyIncludedVariableInits,options:this.options,requestTreeshakingPass:()=>this.graph.needsTreeshakingPass=!0,traceExport:p=>this.getVariableForExportName(p)[0],traceVariable:this.traceVariable.bind(this),usesTopLevelAwait:!1},this.scope=new VR(this.graph.scope,this.astContext),this.namespace=new Jh(this.astContext);const d={context:this.astContext,type:"Module"};if(t)this.ast=new Kb[t.type](d,this.scope).parseNode(t),this.info.ast=t;else{kr("generate ast",3);const p=await async function(m,b,w){return wR(m,b,w)}(r,!1,this.options.jsx!==!1);Ir("generate ast",3),this.ast=(g=p,y=d,f=this.scope,wt(y,f,0,_R(g))),Object.defineProperty(this.info,"ast",{get:()=>{if(this.graph.astLru.has(h))return this.graph.astLru.get(h);{const m=this.tryParse();return this.options.cache!==!1?(Object.defineProperty(this.info,"ast",{value:m}),m):(this.graph.astLru.set(h,m),m)}}})}var g,y,f;kr("generate ast",3)}toJSON(){return{ast:this.info.ast,attributes:this.info.attributes,code:this.info.code,customTransformCache:this.customTransformCache,dependencies:Array.from(this.dependencies,Xb),id:this.id,meta:this.info.meta,moduleSideEffects:this.info.moduleSideEffects,originalCode:this.originalCode,originalSourcemap:this.originalSourcemap,resolvedIds:this.resolvedIds,sourcemapChain:this.sourcemapChain,syntheticNamedExports:this.info.syntheticNamedExports,transformDependencies:this.transformDependencies,transformFiles:this.transformFiles}}traceVariable(t,{importerForSideEffects:r,isExportAllSearch:n,searchedNamesAndModules:i}=Yr){const s=this.scope.variables.get(t);if(s)return s;const o=this.importDescriptions.get(t);if(o){const a=o.module;if(a instanceof br&&o.name==="*")return a.namespace;const[l]=Jb(a,o.name,r||this,n,i);return l||this.error(pg(o.name,this.id,a.id),o.start)}return null}updateOptions({meta:t,moduleSideEffects:r,syntheticNamedExports:n}){r!=null&&(this.info.moduleSideEffects=r),n!=null&&(this.info.syntheticNamedExports=n),t!=null&&Object.assign(this.info.meta,t)}addDynamicImport(t){let r=t.sourceAstNode;r.type==="TemplateLiteral"?r.quasis.length===1&&typeof r.quasis[0].value.cooked=="string"&&(r=r.quasis[0].value.cooked):r.type==="Literal"&&typeof r.value=="string"&&(r=r.value),this.dynamicImports.push({argument:r,id:null,node:t,resolution:null})}assertUniqueExportName(t,r){(this.exports.has(t)||this.reexportDescriptions.has(t))&&this.error(function(n){return{code:"DUPLICATE_EXPORT",message:`Duplicate export "${n}"`}}(t),r)}addExport(t){if(t instanceof sl)this.assertUniqueExportName("default",t.start),this.exports.set("default",{identifier:t.variable.getAssignedVariableName(),localName:"default"});else if(t instanceof Uc){const r=t.source.value;if(this.addSource(r,t),t.exported){const n=t.exported instanceof Hn?t.exported.value:t.exported.name;this.assertUniqueExportName(n,t.exported.start),this.reexportDescriptions.set(n,{localName:"*",module:null,source:r,start:t.start})}else this.exportAllSources.add(r)}else if(t.source instanceof Hn){const r=t.source.value;this.addSource(r,t);for(const{exported:n,local:i,start:s}of t.specifiers){const o=n instanceof Hn?n.value:n.name;this.assertUniqueExportName(o,s),this.reexportDescriptions.set(o,{localName:i instanceof Hn?i.value:i.name,module:null,source:r,start:s})}}else if(t.declaration){const r=t.declaration;if(r instanceof Lf)for(const n of r.declarations)for(const i of tct(n.id))this.assertUniqueExportName(i,n.id.start),this.exports.set(i,{identifier:null,localName:i});else{const n=r.id.name;this.assertUniqueExportName(n,r.id.start),this.exports.set(n,{identifier:null,localName:n})}}else for(const{local:r,exported:n}of t.specifiers){const i=r.name,s=n instanceof Ve?n.name:n.value;this.assertUniqueExportName(s,n.start),this.exports.set(s,{identifier:null,localName:i})}}addImport(t){const r=t.source.value;this.addSource(r,t);for(const n of t.specifiers){const i=n.local.name;(this.scope.variables.has(i)||this.importDescriptions.has(i))&&this.error(Pu(i),n.local.start);const s=n instanceof Bf?"default":n instanceof Rf?"*":n.imported instanceof Ve?n.imported.name:n.imported.value;this.importDescriptions.set(i,{module:null,name:s,source:r,start:n.start})}}addImportSource(t){t&&!this.sourcesWithAttributes.has(t)&&this.sourcesWithAttributes.set(t,Yr)}addImportMeta(t){this.importMetas.push(t)}addLocationToLogProps(t,r){t.id=this.id,t.pos=r;let n=this.info.code;const i=k2(n,r,{offsetLine:1});if(i){let{column:s,line:o}=i;try{({column:s,line:o}=function(a,l){const c=a.filter(u=>!u.missing);t:for(;c.length>0;){const u=c.pop().mappings[l.line-1];if(u){const h=u.filter(g=>g.length>1),d=h[h.length-1];for(const g of h)if(g[0]>=l.column||g===d){l={column:g[3],line:g[2]+1};continue t}}throw new Error("Can't resolve original location of error.")}return l}(this.sourcemapChain,{column:s,line:o})),n=this.originalCode}catch(a){this.options.onLog(oe,function(l,c,u,h,d){return{cause:l,code:"SOURCEMAP_ERROR",id:c,loc:{column:u,file:c,line:h},message:`Error when using sourcemap for reporting an error: ${l.message}`,pos:d}}(a,this.id,s,o,r))}dg(t,{column:s,line:o},n,this.id)}}addModulesToImportDescriptions(t){for(const r of t.values()){const{id:n}=this.resolvedIds[r.source];r.module=this.graph.modulesById.get(n)}}addRelevantSideEffectDependencies(t,r,n){const i=new Set,s=o=>{for(const a of o)i.has(a)||(i.add(a),r.has(a)?t.add(a):(a.info.moduleSideEffects||n.has(a))&&(a instanceof cr||a.hasEffects()?t.add(a):s(a.dependencies)))};s(this.dependencies),s(n)}addSource(t,r){const n=(i=r.attributes,i?.length?Object.fromEntries(i.map(o=>[lw(o),o.value.value])):Yr);var i;const s=this.sourcesWithAttributes.get(t);s?im(s,n)&&this.log(oe,Zp(s,n,t,this.id),r.start):this.sourcesWithAttributes.set(t,n)}getImportedJsxFactoryVariable(t,r,n){const{id:i}=this.resolvedIds[n],s=this.graph.modulesById.get(i),[o]=s.getVariableForExportName(t);return o||this.error((a=t,l=i,c=this.id,{code:"MISSING_JSX_EXPORT",exporter:l,id:c,message:`Export "${a}" is not defined in module "${le(l)}" even though it is needed in "${le(c)}" to provide JSX syntax. Please check your "jsx" option.`,names:[a],url:Dr(Jp)}),r);var a,l,c}getVariableFromNamespaceReexports(t,r,n){let i=null;const s=new Map,o=new Set;for(const u of this.exportAllModules){if(u.info.syntheticNamedExports===t)continue;const[h,d]=Jb(u,t,r,!0,xct(n));u instanceof cr||d?o.add(h):h instanceof Un?i||(i=h):h&&s.set(h,u)}if(s.size>0){const u=[...s],h=u[0][0];return u.length===1?[h]:(this.options.onLog(oe,(a=t,l=this.id,c=u.map(([,d])=>d.id),{binding:a,code:"NAMESPACE_CONFLICT",ids:c,message:`Conflicting namespaces: "${le(l)}" re-exports "${a}" from one of the modules ${_o(c.map(d=>le(d)))} (will be ignored).`,reexporter:l})),[null])}var a,l,c;if(o.size>0){const u=[...o],h=u[0];return u.length>1&&this.options.onLog(oe,function(d,g,y,f){return{binding:d,code:"AMBIGUOUS_EXTERNAL_NAMESPACES",ids:f,message:`Ambiguous external namespace resolution: "${le(g)}" re-exports "${d}" from one of the external modules ${_o(f.map(p=>le(p)))}, guessing "${le(y)}".`,reexporter:g}}(t,this.id,h.module.id,u.map(d=>d.module.id))),[h,!0]}return i?[i]:[null]}includeAndGetAdditionalMergedNamespaces(){const t=new Set,r=new Set;for(const n of[this,...this.exportAllModules])if(n instanceof cr){const[i]=n.getVariableForExportName("*");i.includePath(It,Xi()),this.includedImports.add(i),t.add(i)}else if(n.info.syntheticNamedExports){const i=n.getSyntheticNamespace();i.includePath(It,Xi()),this.includedImports.add(i),r.add(i)}return[...r,...t]}includeDynamicImport(t){const r=this.dynamicImports.find(n=>n.node===t).resolution;if(r instanceof br){r.includedDynamicImporters.includes(this)||r.includedDynamicImporters.push(this);const n=this.options.treeshake?t.getDeterministicImportedNames():void 0;n?r.includeExportsByNames(n):r.includeAllExports(!0)}}includeVariable(t,r,n){const{included:i,module:s}=t;if(t.includePath(r,n),i)s instanceof br&&s!==this&&eD(t,this);else if(this.graph.needsTreeshakingPass=!0,s instanceof br&&(s.isExecuted||Dc(s),s!==this)){const o=eD(t,this);for(const a of o)a.isExecuted||Dc(a)}}includeVariableInModule(t,r,n){this.includeVariable(t,r,n);const i=t.module;i&&i!==this&&this.includedImports.add(t)}shimMissingExport(t){var r,n;this.options.onLog(oe,(r=this.id,{binding:n=t,code:"SHIMMED_EXPORT",exporter:r,message:`Missing export "${n}" has been shimmed in module "${le(r)}".`})),this.exports.set(t,tD)}tryParse(){try{return c_(this.info.code,{jsx:this.options.jsx!==!1})}catch(t){return this.error(P2(t,this.id),t.pos)}}}function rD(e,t,r){if(e.module instanceof br&&e.module!==r){const n=e.module.cycles;if(n.size>0){const i=r.cycles;for(const s of i)if(n.has(s)){t.alternativeReexportModules.set(e,r);break}}}}const xct=e=>e&&new Map(Array.from(e,([t,r])=>[t,new Set(r)])),nD=(e,t)=>t?`${e} ${t}`:e,iD=(e,t)=>t?`${e} ${t}`:e,_ct={amd:cp,cjs:cp,es:sD,iife:cp,system:sD,umd:cp};function Sct(e,t,r,n,i,s,o,a,l,c,u,h,d,g){const y=[...e].reverse();for(const f of y)f.scope.addUsedOutsideNames(n,i,h,d);(function(f,p,m){for(const b of p){for(const w of b.scope.variables.values())w.included&&!(w.renderBaseName||w instanceof Rs&&w.getOriginalVariable()!==w)&&w.setRenderNames(null,As(w.name,f,w.forbiddenNames));if(m.has(b)){const w=b.namespace;w.setRenderNames(null,As(w.name,f,w.forbiddenNames))}}})(n,y,g),_ct[i](n,r,t,s,o,a,l,c,u);for(const f of y)f.scope.deconflict(i,h,d)}function sD(e,t,r,n,i,s,o,a,l){for(const c of r.dependencies)(i||c instanceof Tc)&&(c.variableName=As(c.suggestedVariableName,e,null));for(const c of t){const u=c.module,h=c.name;c.isNamespace&&(i||u instanceof cr)?c.setRenderNames(null,(u instanceof cr?a.get(u):o.get(u)).variableName):u instanceof cr&&h==="default"?c.setRenderNames(null,As([...u.exportedVariables].some(([d,g])=>g==="*"&&d.included)?u.suggestedVariableName+"__default":u.suggestedVariableName,e,c.forbiddenNames)):c.setRenderNames(null,As(Z0(h),e,c.forbiddenNames))}for(const c of l)c.setRenderNames(null,As(c.name,e,c.forbiddenNames))}function cp(e,t,{deconflictedDefault:r,deconflictedNamespace:n,dependencies:i},s,o,a,l,c){for(const u of i)u.variableName=As(u.suggestedVariableName,e,null);for(const u of n)u.namespaceVariableName=As(`${u.suggestedVariableName}__namespace`,e,null);for(const u of r)u.defaultVariableName=n.has(u)&&Blt(s(u.id),a)?u.namespaceVariableName:As(`${u.suggestedVariableName}__default`,e,null);for(const u of t){const h=u.module;if(h instanceof cr){const d=c.get(h),g=u.name;if(g==="default"){const y=s(h.id),f=ry[y]?d.defaultVariableName:d.variableName;ny(y,a)?u.setRenderNames(f,"default"):u.setRenderNames(null,f)}else g==="*"?u.setRenderNames(null,dd[s(h.id)]?d.namespaceVariableName:d.variableName):u.setRenderNames(d.variableName,null)}else{const d=l.get(h);o&&u.isNamespace?u.setRenderNames(null,d.exportMode==="default"?d.namespaceVariableName:d.variableName):d.exportMode==="default"?u.setRenderNames(null,d.variableName):u.setRenderNames(d.variableName,d.getVariableExportName(u))}}}function Ect(e,{exports:t,name:r,format:n},i,s){const o=e.getExportNames();if(t==="default"){if(o.length!==1||o[0]!=="default")return Pt(Ek("default",o,i))}else if(t==="none"&&o.length>0)return Pt(Ek("none",o,i));return t==="auto"&&(o.length===0?t="none":o.length===1&&o[0]==="default"?t="default":(n!=="es"&&n!=="system"&&o.includes("default")&&s(oe,function(a,l){return{code:"MIXED_EXPORTS",id:a,message:`Entry module "${le(a)}" is using named and default exports together. Consumers of your bundle will have to use \`${l||"chunk"}.default\` to access the default export, which may not be what you want. Use \`output.exports: "named"\` to disable this warning.`,url:Dr(D2)}}(i,r)),t="named")),t}function Cct(e){const t=e.split(` `),r=t.filter(s=>/^\t+/.test(s)),n=t.filter(s=>/^ {2,}/.test(s));if(r.length===0&&n.length===0)return null;if(r.length>=n.length)return" ";const i=n.reduce((s,o)=>{const a=/^ +/.exec(o)[0].length;return Math.min(a,s)},1/0);return" ".repeat(i)}function ZR(e,t,r,n,i,s){const o=e.getDependenciesToBeIncluded();for(const a of o){if(a instanceof cr){t.push(s.get(a));continue}const l=i.get(a);l===n?r.has(a)||(r.add(a),ZR(a,t,r,n,i,s)):t.push(l)}}const u_="!~{",h_="}~",f_=new RegExp(`${u_}[0-9a-zA-Z_$]{1,16}${h_}`,"g"),ja=(e,t)=>e.replace(f_,r=>t.get(r)||r),Act=(e,t,r)=>e.replace(f_,n=>n===t?r:n),hy=Symbol("bundleKeys"),d_={type:"placeholder"};function cw(e,t,r){return fg(e)?Pt(qn(`Invalid pattern "${e}" for "${t}", patterns can be neither absolute nor relative paths. If you want your files to be stored in a subdirectory, write its name without a leading slash like this: subdirectory/pattern.`)):e.replace(/\[(\w+)(:\d+)?]/g,(n,i,s)=>{if(!r.hasOwnProperty(i)||s&&i!=="hash")return Pt(qn(`"[${i}${s||""}]" is not a valid placeholder in the "${t}" pattern.`));const o=r[i](s&&Number.parseInt(s.slice(1)));return fg(o)?Pt(qn(`Invalid substitution "${o}" for placeholder "[${i}]" in "${t}" pattern, can be neither absolute nor relative path.`)):o})}function uw(e,{[hy]:t}){if(!t.has(e.toLowerCase()))return e;const r=Qo(e);e=e.slice(0,Math.max(0,e.length-r.length));let n,i=1;for(;t.has((n=e+ ++i+r).toLowerCase()););return n}const kct=new Set([".js",".jsx",".ts",".tsx",".mjs",".mts",".cjs",".cts"]);function Dct(e,t,r,n){return(typeof t=="function"?t(e.id):t[e.id])||(r?(n(oe,(s=e.id,o=e.variableName,{code:"MISSING_GLOBAL_NAME",id:s,message:`No name was provided for external module "${s}" in "output.globals" – guessing "${o}".`,names:[o],url:Dr("configuration-options/#output-globals")})),e.variableName):void 0);var s,o}class Go{constructor(t,r,n,i,s,o,a,l,c,u,h,d,g,y,f){this.orderedModules=t,this.inputOptions=r,this.outputOptions=n,this.unsetOptions=i,this.pluginDriver=s,this.modulesById=o,this.chunkByModule=a,this.externalChunkByModule=l,this.facadeChunkByModule=c,this.includedNamespaces=u,this.manualChunkAlias=h,this.getPlaceholder=d,this.bundle=g,this.inputBase=y,this.snippets=f,this.entryModules=[],this.exportMode="named",this.facadeModule=null,this.namespaceVariableName="",this.variableName="",this.accessedGlobalsByScope=new Map,this.dependencies=new Set,this.dynamicEntryModules=[],this.dynamicName=null,this.exportNamesByVariable=new Map,this.exports=new Set,this.exportsByName=new Map,this.fileName=null,this.implicitEntryModules=[],this.implicitlyLoadedBefore=new Set,this.imports=new Set,this.includedDynamicImports=null,this.includedReexportsByModule=new Map,this.isEmpty=!0,this.name=null,this.needsExportsShim=!1,this.preRenderedChunkInfo=null,this.preliminaryFileName=null,this.preliminarySourcemapFileName=null,this.renderedChunkInfo=null,this.renderedDependencies=null,this.renderedModules=Object.create(null),this.sortedExportNames=null,this.strictFacade=!1,this.execIndex=t.length>0?t[0].execIndex:1/0;const p=new Set(t);for(const m of t){a.set(m,this),m.namespace.included&&!n.preserveModules&&u.add(m),this.isEmpty&&m.isIncluded()&&(this.isEmpty=!1),(m.info.isEntry||n.preserveModules)&&this.entryModules.push(m);for(const b of m.includedDynamicImporters)p.has(b)||(this.dynamicEntryModules.push(m),m.info.syntheticNamedExports&&(u.add(m),this.exports.add(m.namespace)));m.implicitlyLoadedAfter.size>0&&this.implicitEntryModules.push(m)}this.suggestedVariableName=Z0(this.generateVariableName())}static generateFacade(t,r,n,i,s,o,a,l,c,u,h,d,g,y,f){const p=new Go([],t,r,n,i,s,o,a,l,c,null,d,g,y,f);p.assignFacadeName(h,u),l.has(u)||l.set(u,p);for(const m of u.getDependenciesToBeIncluded())p.dependencies.add(m instanceof br?o.get(m):a.get(m));return!p.dependencies.has(o.get(u))&&u.info.moduleSideEffects&&u.hasEffects()&&p.dependencies.add(o.get(u)),p.ensureReexportsAreAvailableForModule(u),p.facadeModule=u,p.strictFacade=!0,p}canModuleBeFacade(t,r){const n=t.getExportNamesByVariable();for(const i of this.exports)if(!n.has(i))return!1;for(const i of r)if(!(i.module===t||n.has(i)||i instanceof Un&&n.has(i.getBaseVariable())))return!1;return!0}finalizeChunk(t,r,n,i){const s=this.getRenderedChunkInfo(),o=c=>ja(c,i),a=s.fileName,l=this.fileName=o(a);return{...s,code:t,dynamicImports:s.dynamicImports.map(o),fileName:l,implicitlyLoadedBefore:s.implicitlyLoadedBefore.map(o),importedBindings:Object.fromEntries(Object.entries(s.importedBindings).map(([c,u])=>[o(c),u])),imports:s.imports.map(o),map:r,preliminaryFileName:a,referencedFiles:s.referencedFiles.map(o),sourcemapFileName:n}}generateExports(){this.sortedExportNames=null;const t=new Set(this.exports);if(this.facadeModule!==null&&(this.facadeModule.preserveSignature!==!1||this.strictFacade)){const r=this.facadeModule.getExportNamesByVariable();for(const[n,i]of r){this.exportNamesByVariable.set(n,[...i]);for(const s of i)this.exportsByName.set(s,n);t.delete(n)}}this.outputOptions.minifyInternalExports?function(r,n,i){let s=0;for(const o of r){let[a]=o.name;if(n.has(a))do a=bg(++s),a.charCodeAt(0)===49&&(s+=9*64**(a.length-1),a=bg(s));while(J0.has(a)||n.has(a));n.set(a,o),i.set(o,[a])}}(t,this.exportsByName,this.exportNamesByVariable):function(r,n,i){for(const s of r){let o=0,a=s.name;for(;n.has(a);)a=s.name+"$"+ ++o;n.set(a,s),i.set(s,[a])}}(t,this.exportsByName,this.exportNamesByVariable),(this.outputOptions.preserveModules||this.facadeModule&&this.facadeModule.info.isEntry)&&(this.exportMode=Ect(this,this.outputOptions,this.facadeModule.id,this.inputOptions.onLog))}generateFacades(){const t=[],r=new Set([...this.entryModules,...this.implicitEntryModules]),n=new Set(this.dynamicEntryModules.map(({namespace:i})=>i));for(const i of r)if(i.preserveSignature)for(const s of i.getExportNamesByVariable().keys())this.chunkByModule.get(s.module)===this&&n.add(s);for(const i of r){const s=Array.from(new Set(i.chunkNames.filter(({isUserDefined:o})=>o).map(({name:o})=>o)),o=>({name:o}));if(s.length===0&&i.isUserDefinedEntryPoint&&s.push({}),s.push(...Array.from(i.chunkFileNames,o=>({fileName:o}))),s.length===0&&s.push({}),!this.facadeModule){const o=!this.outputOptions.preserveModules&&(i.preserveSignature==="strict"||i.preserveSignature==="exports-only"&&i.getExportNamesByVariable().size>0);o&&!this.canModuleBeFacade(i,n)||(this.facadeModule=i,this.facadeChunkByModule.set(i,this),i.preserveSignature&&(this.strictFacade=o),this.assignFacadeName(s.shift(),i,this.outputOptions.preserveModules))}for(const o of s)t.push(Go.generateFacade(this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.modulesById,this.chunkByModule,this.externalChunkByModule,this.facadeChunkByModule,this.includedNamespaces,i,o,this.getPlaceholder,this.bundle,this.inputBase,this.snippets))}for(const i of this.dynamicEntryModules)i.info.syntheticNamedExports||(!this.facadeModule&&this.canModuleBeFacade(i,n)?(this.facadeModule=i,this.facadeChunkByModule.set(i,this),this.strictFacade=!0,this.dynamicName=Zb(i)):this.facadeModule===i&&!this.strictFacade&&this.canModuleBeFacade(i,n)?this.strictFacade=!0:this.facadeChunkByModule.get(i)?.strictFacade||(this.includedNamespaces.add(i),this.exports.add(i.namespace)));return this.outputOptions.preserveModules||this.addNecessaryImportsForFacades(),t}getChunkName(){return this.name??=this.outputOptions.sanitizeFileName(this.getFallbackChunkName())}getExportNames(){return this.sortedExportNames??=[...this.exportsByName.keys()].sort()}getFileName(){return this.fileName||this.getPreliminaryFileName().fileName}getImportPath(t){return ra(PB(t,this.getFileName(),this.outputOptions.format==="amd"&&!this.outputOptions.amd.forceJsExtensionForImports,!0))}getPreliminaryFileName(){if(this.preliminaryFileName)return this.preliminaryFileName;let t,r=null;const{chunkFileNames:n,entryFileNames:i,file:s,format:o,preserveModules:a}=this.outputOptions;if(s)t=xo(s);else if(this.fileName===null){const[l,c]=a||this.facadeModule?.isUserDefinedEntryPoint?[i,"output.entryFileNames"]:[n,"output.chunkFileNames"];t=cw(typeof l=="function"?l(this.getPreRenderedChunkInfo()):l,c,{format:()=>o,hash:u=>r||(r=this.getPlaceholder(c,u||8)),name:()=>this.getChunkName()}),r||(t=uw(t,this.bundle))}else t=this.fileName;return r||(this.bundle[t]=d_),this.preliminaryFileName={fileName:t,hashPlaceholder:r}}getPreliminarySourcemapFileName(){if(this.preliminarySourcemapFileName)return this.preliminarySourcemapFileName;let t=null,r=null;const{sourcemapFileNames:n,format:i}=this.outputOptions;if(!n)return null;{const[s,o]=[n,"output.sourcemapFileNames"];t=cw(typeof s=="function"?s(this.getPreRenderedChunkInfo()):s,o,{chunkhash:()=>this.getPreliminaryFileName().hashPlaceholder||"",format:()=>i,hash:a=>r||(r=this.getPlaceholder(o,a||8)),name:()=>this.getChunkName()}),r||(t=uw(t,this.bundle))}return this.preliminarySourcemapFileName={fileName:t,hashPlaceholder:r}}getRenderedChunkInfo(){return this.renderedChunkInfo?this.renderedChunkInfo:this.renderedChunkInfo={...this.getPreRenderedChunkInfo(),dynamicImports:this.getDynamicDependencies().map(up),fileName:this.getFileName(),implicitlyLoadedBefore:Array.from(this.implicitlyLoadedBefore,up),importedBindings:Tct(this.getRenderedDependencies(),up),imports:Array.from(this.dependencies,up),modules:this.renderedModules,referencedFiles:this.getReferencedFiles()}}getVariableExportName(t){return this.outputOptions.preserveModules&&t instanceof Jh?"*":this.exportNamesByVariable.get(t)[0]}link(){this.dependencies=function(t,r,n,i){const s=[],o=new Set;for(let l=r.length-1;l>=0;l--){const c=r[l];if(!o.has(c)){const u=[];ZR(c,u,o,t,n,i),s.unshift(u)}}const a=new Set;for(const l of s)for(const c of l)a.add(c);return a}(this,this.orderedModules,this.chunkByModule,this.externalChunkByModule);for(const t of this.orderedModules)this.addImplicitlyLoadedBeforeFromModule(t),this.setUpChunkImportsAndExportsForModule(t)}async render(){const{dependencies:t,exportMode:r,facadeModule:n,inputOptions:{onLog:i},outputOptions:s,pluginDriver:o,snippets:a}=this,{format:l,hoistTransitiveImports:c,preserveModules:u}=s;if(c&&!u&&n!==null)for(const I of t)I instanceof Go&&this.inlineChunkDependencies(I);const h=this.getPreliminaryFileName(),d=this.getPreliminarySourcemapFileName(),{accessedGlobals:g,indent:y,magicString:f,renderedSource:p,usedModules:m,usesTopLevelAwait:b}=this.renderModules(h.fileName),w=[...this.getRenderedDependencies().values()],x=r==="none"?[]:this.getChunkExportDeclarations(l);let E=x.length>0,S=!1;for(const I of w){const{reexports:M}=I;M?.length&&(E=!0,!S&&M.some(q=>q.reexported==="default")&&(S=!0),l==="es"&&(I.reexports=M.filter(({reexported:q})=>!x.find(({exported:H})=>H===q))))}if(!S){for(const{exported:I}of x)if(I==="default"){S=!0;break}}const{intro:C,outro:A,banner:$,footer:O}=await async function(I,M,q){try{let[G,Y,F,T]=await Promise.all([M.hookReduceValue("banner",I.banner(q),[q],nD),M.hookReduceValue("footer",I.footer(q),[q],nD),M.hookReduceValue("intro",I.intro(q),[q],iD),M.hookReduceValue("outro",I.outro(q),[q],iD)]);return F&&(F+=` `),T&&(T=` ${T}`),G&&(G+=` `),Y&&(Y=` `+Y),{banner:G,footer:Y,intro:F,outro:T}}catch(G){return Pt((H=G.message,{code:"ADDON_ERROR",message:`Could not retrieve "${G.hook}". Check configuration of plugin "${G.plugin}". Error Message: ${H}`}))}var H}(s,o,this.getRenderedChunkInfo());if(Qlt[l](p,{accessedGlobals:g,dependencies:w,exports:x,hasDefaultExport:S,hasExports:E,id:h.fileName,indent:y,intro:C,isEntryFacade:u||n!==null&&n.info.isEntry,isModuleFacade:n!==null,log:i,namedExportsMode:r!=="default",outro:A,snippets:a,usesTopLevelAwait:b},s),$&&f.prepend($),l==="es"||l==="cjs"){const I=n!==null&&n.info.isEntry&&n.shebang;I&&f.prepend(`#!${I} `)}return O&&f.append(O),{chunk:this,magicString:f,preliminaryFileName:h,preliminarySourcemapFileName:d,usedModules:m}}addImplicitlyLoadedBeforeFromModule(t){const{chunkByModule:r,implicitlyLoadedBefore:n}=this;for(const i of t.implicitlyLoadedBefore){const s=r.get(i);s&&s!==this&&n.add(s)}}addNecessaryImportsForFacades(){for(const[t,r]of this.includedReexportsByModule)if(this.includedNamespaces.has(t))for(const n of r)this.imports.add(n)}assignFacadeName({fileName:t,name:r},n,i){t?this.fileName=t:this.name=this.outputOptions.sanitizeFileName(r||(i?this.getPreserveModulesChunkNameFromModule(n):Zb(n)))}checkCircularDependencyImport(t,r){const n=t.module;if(n instanceof br){const c=this.chunkByModule.get(n);let u;do u=r.alternativeReexportModules.get(t),u&&(this.chunkByModule.get(u)!==c&&this.inputOptions.onLog(oe,(i=n.getExportNamesByVariable().get(t)?.[0]||"*",s=n.id,o=u.id,a=r.id,l=this.outputOptions.preserveModules,{code:"CYCLIC_CROSS_CHUNK_REEXPORT",exporter:s,id:a,message:`Export "${i}" of module "${le(s)}" was reexported through module "${le(o)}" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order. Either change the import in "${le(a)}" to point directly to the exporting module or ${l?'do not use "output.preserveModules"':'reconfigure "output.manualChunks"'} to ensure these modules end up in the same chunk.`,reexporter:o})),r=u);while(u)}var i,s,o,a,l}ensureReexportsAreAvailableForModule(t){const r=[],n=t.getExportNamesByVariable();for(const i of n.keys()){const s=i instanceof Un,o=s?i.getBaseVariable():i;if(this.checkCircularDependencyImport(o,t),!(o instanceof Jh&&this.outputOptions.preserveModules)){const a=o.module;if(a instanceof br){const l=this.chunkByModule.get(a);l&&l!==this&&(l.exports.add(o),r.push(o),s&&this.imports.add(o))}}}r.length>0&&this.includedReexportsByModule.set(t,r)}generateVariableName(){if(this.manualChunkAlias)return this.manualChunkAlias;const t=this.entryModules[0]||this.implicitEntryModules[0]||this.dynamicEntryModules[0]||this.orderedModules[this.orderedModules.length-1];return t?Zb(t):"chunk"}getChunkExportDeclarations(t){const r=[];for(const n of this.getExportNames()){if(n[0]==="*")continue;const i=this.exportsByName.get(n);if(!(i instanceof Un)){const l=i.module;if(l){const c=this.chunkByModule.get(l);if(c!==this){if(!c||t!=="es")continue;const u=this.renderedDependencies.get(c);if(!u)continue;const{imports:h,reexports:d}=u,g=d?.find(({reexported:f})=>f===n);if(!h?.find(({imported:f})=>f===g?.imported))continue}}}let s=null,o=!1,a=i.getName(this.snippets.getPropertyAccess);if(i instanceof as){for(const l of i.declarations)if(l.parent instanceof hu||l instanceof sl&&l.declaration instanceof hu){o=!0;break}}else i instanceof Un&&(s=a,t==="es"&&(a=i.renderName));r.push({exported:n,expression:s,hoisted:o,local:a})}return r}getDependenciesToBeDeconflicted(t,r,n){const i=new Set,s=new Set,o=new Set;for(const a of[...this.exportNamesByVariable.keys(),...this.imports])if(t||a.isNamespace){const l=a.module;if(l instanceof cr){const c=this.externalChunkByModule.get(l);i.add(c),t&&(a.name==="default"?ry[n(l.id)]&&s.add(c):a.isNamespace&&dd[n(l.id)]&&(this.imports.has(a)||!this.exportNamesByVariable.get(a)?.every(u=>u.startsWith("*")))&&o.add(c))}else{const c=this.chunkByModule.get(l);c!==this&&(i.add(c),t&&c.exportMode==="default"&&a.isNamespace&&o.add(c))}}if(r)for(const a of this.dependencies)i.add(a);return{deconflictedDefault:s,deconflictedNamespace:o,dependencies:i}}getDynamicDependencies(){return this.getIncludedDynamicImports().map(t=>t.facadeChunk||t.chunk||t.externalChunk||t.resolution).filter(t=>t!==this&&(t instanceof Go||t instanceof Tc))}getDynamicImportStringAndAttributes(t,r,n){if(t instanceof cr){const s=this.externalChunkByModule.get(t);return[`'${s.getImportPath(r)}'`,s.getImportAttributes(this.snippets)]}let i=null;if(["es","cjs"].includes(this.outputOptions.format)&&this.outputOptions.externalImportAttributes){const s=YR(n);i=s===Yr||yR(s,this.snippets)}return[t||"",i]}getFallbackChunkName(){return this.manualChunkAlias?this.manualChunkAlias:this.dynamicName?this.dynamicName:this.fileName?Yv(this.fileName):Yv(this.orderedModules[this.orderedModules.length-1].id)}getImportSpecifiers(){const{interop:t}=this.outputOptions,r=new Map;for(const n of this.imports){const i=n.module;let s,o;if(i instanceof cr){if(s=this.externalChunkByModule.get(i),o=n.name,o!=="default"&&o!=="*"&&t(i.id)==="defaultOnly")return Pt(kk(i.id,o,!1))}else s=this.chunkByModule.get(i),o=s.getVariableExportName(n);ai(r,s,mk).push({imported:o,local:n.getName(this.snippets.getPropertyAccess)})}return r}getIncludedDynamicImports(){if(this.includedDynamicImports)return this.includedDynamicImports;const t=[];for(const r of this.orderedModules)for(const{node:n,resolution:i}of r.dynamicImports)n.included&&t.push(i instanceof br?{chunk:this.chunkByModule.get(i),externalChunk:null,facadeChunk:this.facadeChunkByModule.get(i),node:n,resolution:i}:i instanceof cr?{chunk:null,externalChunk:this.externalChunkByModule.get(i),facadeChunk:null,node:n,resolution:i}:{chunk:null,externalChunk:null,facadeChunk:null,node:n,resolution:i});return this.includedDynamicImports=t}getPreRenderedChunkInfo(){if(this.preRenderedChunkInfo)return this.preRenderedChunkInfo;const{dynamicEntryModules:t,facadeModule:r,implicitEntryModules:n,orderedModules:i}=this;return this.preRenderedChunkInfo={exports:this.getExportNames(),facadeModuleId:r&&r.id,isDynamicEntry:t.length>0,isEntry:!!r?.info.isEntry,isImplicitEntry:n.length>0,moduleIds:i.map(({id:s})=>s),name:this.getChunkName(),type:"chunk"}}getPreserveModulesChunkNameFromModule(t){const r=QR(t);if(r)return r;const{preserveModulesRoot:n,sanitizeFileName:i}=this.outputOptions,s=i(od(t.id.split(Pct,1)[0])),o=Qo(s),a=kct.has(o)?s.slice(0,-o.length):s;return ma(a)?n&&rs(a).startsWith(n)?a.slice(n.length).replace(/^[/\\]/,""):this.inputBase!=="/"||a.startsWith("/")?_l(this.inputBase,a):_l(this.inputBase,a.replace(/^[a-zA-Z]:[/\\]/,"/")):this.outputOptions.virtualDirname.replace(/\/$/,"")+"/"+xo(a)}getReexportSpecifiers(){const{externalLiveBindings:t,interop:r}=this.outputOptions,n=new Map;for(let i of this.getExportNames()){let s,o,a=!1;if(i[0]==="*"){const l=i.slice(1);r(l)==="defaultOnly"&&this.inputOptions.onLog(oe,mlt(l)),a=t,s=this.externalChunkByModule.get(this.modulesById.get(l)),o=i="*"}else{const l=this.exportsByName.get(i);if(l instanceof Un)continue;const c=l.module;if(c instanceof br){if(s=this.chunkByModule.get(c),s===this)continue;o=s.getVariableExportName(l),a=l.isReassigned}else{if(s=this.externalChunkByModule.get(c),o=l.name,o!=="default"&&o!=="*"&&r(c.id)==="defaultOnly")return Pt(kk(c.id,o,!0));a=t&&(o!=="default"||ny(r(c.id),!0))}}ai(n,s,mk).push({imported:o,needsLiveBinding:a,reexported:i})}return n}getReferencedFiles(){const t=new Set;for(const r of this.orderedModules)for(const n of r.importMetas){const i=n.getReferencedFileName(this.pluginDriver);i&&t.add(i)}return[...t]}getRenderedDependencies(){if(this.renderedDependencies)return this.renderedDependencies;const t=this.getImportSpecifiers(),r=this.getReexportSpecifiers(),n=new Map,i=this.getFileName();for(const s of this.dependencies){const o=t.get(s)||null,a=r.get(s)||null,l=s instanceof Tc||s.exportMode!=="default",c=s.getImportPath(i);n.set(s,{attributes:s instanceof Tc?s.getImportAttributes(this.snippets):null,defaultVariableName:s.defaultVariableName,globalName:s instanceof Tc&&(this.outputOptions.format==="umd"||this.outputOptions.format==="iife")&&Dct(s,this.outputOptions.globals,(o||a)!==null,this.inputOptions.onLog),importPath:c,imports:o,isChunk:s instanceof Go,name:s.variableName,namedExportsMode:l,namespaceVariableName:s.namespaceVariableName,reexports:a})}return this.renderedDependencies=n}inlineChunkDependencies(t){for(const r of t.dependencies)this.dependencies.has(r)||(this.dependencies.add(r),r instanceof Go&&this.inlineChunkDependencies(r))}renderModules(t){const{accessedGlobalsByScope:r,dependencies:n,exportNamesByVariable:i,includedNamespaces:s,inputOptions:{onLog:o},isEmpty:a,orderedModules:l,outputOptions:c,pluginDriver:u,renderedModules:h,snippets:d}=this,{compact:g,format:y,freeze:f,generatedCode:{symbols:p},importAttributesKey:m}=c,{_:b,cnst:w,n:x}=d;this.setDynamicImportResolutions(t),this.setImportMetaResolutions(t),this.setIdentifierRenderResolutions();const E=new Gat({separator:`${x}${x}`}),S=function(G,Y){if(Y.indent!==!0)return Y.indent;for(const F of G){const T=Cct(F.originalCode);if(T!==null)return T}return" "}(l,c),C=[];let A="";const $=new Set,O=new Map,I={accessedDocumentCurrentScript:!1,exportNamesByVariable:i,format:y,freeze:f,importAttributesKey:m,indent:S,pluginDriver:u,snippets:d,symbols:p,useOriginalName:null};let M=!1;for(const G of l){let Y,F=0;if(G.isIncluded()||s.has(G)){const U=G.render(I);!I.accessedDocumentCurrentScript&&mR.includes(y)&&this.accessedGlobalsByScope.get(G.scope)?.delete(po),I.accessedDocumentCurrentScript=!1,{source:Y}=U,M||=U.usesTopLevelAwait,F=Y.length(),F&&(g&&Y.lastLine().includes("//")&&Y.append(` `),O.set(G,Y),E.addSource(Y),C.push(G));const J=G.namespace;if(s.has(G)){const z=J.renderBlock(I);J.renderFirst()?A+=x+z:E.addSource(new wl(z))}const W=r.get(G.scope);if(W)for(const z of W)$.add(z)}const{renderedExports:T,removedExports:N}=G.getRenderedExports();h[G.id]={get code(){return Y?.toString()??null},originalLength:G.originalCode.length,removedExports:N,renderedExports:T,renderedLength:F}}A&&E.prepend(A+x+x),this.needsExportsShim&&E.prepend(`${x}${w} ${fu}${b}=${b}void 0;${x}${x}`);const q=g?E:E.trim();var H;return a&&this.getExportNames().length===0&&n.size===0&&o(oe,{code:"EMPTY_BUNDLE",message:`Generated an empty chunk: "${H=this.getChunkName()}".`,names:[H]}),{accessedGlobals:$,indent:S,magicString:E,renderedSource:q,usedModules:C,usesTopLevelAwait:M}}setDynamicImportResolutions(t){const{accessedGlobalsByScope:r,outputOptions:n,pluginDriver:i,snippets:s}=this;for(const o of this.getIncludedDynamicImports())if(o.chunk){const{chunk:a,facadeChunk:l,node:c,resolution:u}=o;a===this?c.setInternalResolution(u.namespace):c.setExternalResolution((l||a).exportMode,u,n,s,i,r,`'${(l||a).getImportPath(t)}'`,!l?.strictFacade&&a.exportNamesByVariable.get(u.namespace)[0],null)}else{const{node:a,resolution:l}=o,[c,u]=this.getDynamicImportStringAndAttributes(l,t,a);a.setExternalResolution("external",l,n,s,i,r,c,!1,u)}}setIdentifierRenderResolutions(){const{format:t,generatedCode:{symbols:r},interop:n,preserveModules:i,externalLiveBindings:s}=this.outputOptions,o=new Set;for(const l of this.getExportNames()){const c=this.exportsByName.get(l);t!=="es"&&t!=="system"&&c.isReassigned&&!c.isId?c.setRenderNames("exports",l):c instanceof Un?o.add(c):c.setRenderNames(null,null)}for(const l of this.orderedModules)if(l.needsExportShim){this.needsExportsShim=!0;break}const a=new Set(["Object","Promise"]);switch(this.needsExportsShim&&a.add(fu),r&&a.add("Symbol"),t){case"system":a.add("module").add("exports");break;case"es":break;case"cjs":a.add("module").add("require").add("__filename").add("__dirname");default:a.add("exports");for(const l of sw)a.add(l)}Sct(this.orderedModules,this.getDependenciesToBeDeconflicted(t!=="es"&&t!=="system",t==="amd"||t==="umd"||t==="iife",n),this.imports,a,t,n,i,s,this.chunkByModule,this.externalChunkByModule,o,this.exportNamesByVariable,this.accessedGlobalsByScope,this.includedNamespaces)}setImportMetaResolutions(t){const{accessedGlobalsByScope:r,includedNamespaces:n,orderedModules:i,outputOptions:{format:s}}=this;for(const o of i){for(const a of o.importMetas)a.setResolution(s,r,t);n.has(o)&&o.namespace.prepare(r)}}setUpChunkImportsAndExportsForModule(t){const r=new Set(t.includedImports);if(!this.outputOptions.preserveModules&&this.includedNamespaces.has(t)){const n=t.namespace.getMemberVariables();for(const i of Object.values(n))i.included&&r.add(i)}for(let n of r){n instanceof Rs&&(n=n.getOriginalVariable()),n instanceof Un&&(n=n.getBaseVariable());const i=this.chunkByModule.get(n.module);i!==this&&(this.imports.add(n),n.module instanceof br&&(this.checkCircularDependencyImport(n,t),n instanceof Jh&&this.outputOptions.preserveModules||i.exports.add(n)))}(this.includedNamespaces.has(t)||t.info.isEntry&&t.preserveSignature!==!1||t.includedDynamicImporters.some(n=>this.chunkByModule.get(n)!==this))&&this.ensureReexportsAreAvailableForModule(t);for(const{node:n,resolution:i}of t.dynamicImports)n.included&&i instanceof br&&this.chunkByModule.get(i)===this&&!this.includedNamespaces.has(i)&&(this.includedNamespaces.add(i),this.ensureReexportsAreAvailableForModule(i))}}function Zb(e){return QR(e)??Yv(e.id)}function QR(e){return e.chunkNames.find(({isUserDefined:t})=>t)?.name??e.chunkNames[0]?.name}function Tct(e,t){const r={};for(const[n,i]of e){const s=new Set;if(i.imports)for(const{imported:o}of i.imports)s.add(o);if(i.reexports)for(const{imported:o}of i.reexports)s.add(o);r[t(n)]=[...s]}return r}const Pct=/[#?]/,up=e=>e.getFileName();function*t4(e){for(const t of e)yield*t}function Fct(e,t,r,n){const{chunkDefinitions:i,modulesInManualChunks:s}=function(p){const m=new Set(p.keys()),b=Object.create(null);for(const[S,C]of p)Oct(S,b[C]||=[],m);const w=Object.entries(b),x=new Array(w.length);let E=0;for(const[S,C]of w)x[E++]={alias:S,modules:C};return{chunkDefinitions:x,modulesInManualChunks:m}}(t),{allEntries:o,dependentEntriesByModule:a,dynamicallyDependentEntriesByDynamicEntry:l,dynamicImportsByEntry:c}=function(p){const m=new Set,b=new Map,w=new Set(p),x=new Array(w.size);let E=0;for(const $ of w){const O=new Set;x[E]=O;const I=new Set([$]);for(const M of I){ai(b,M,Sl).add(E);for(const q of M.getDependenciesToBeIncluded())q instanceof cr||I.add(q);for(const{resolution:q}of M.dynamicImports)q instanceof br&&q.includedDynamicImporters.length>0&&!w.has(q)&&(m.add(q),w.add(q),O.add(q));for(const q of M.implicitlyLoadedBefore)w.has(q)||(m.add(q),w.add(q))}E++}const S=[...w],{dynamicEntries:C,dynamicImportsByEntry:A}=function($,O,I){const M=new Map,q=new Set;for(const[Y,F]of $.entries())M.set(F,Y),O.has(F)&&q.add(Y);const H=new Array(I.length);let G=0;for(const Y of I){const F=new Set;for(const T of Y)F.add(M.get(T));H[G++]=F}return{dynamicEntries:q,dynamicImportsByEntry:H}}(S,m,x);return{allEntries:S,dependentEntriesByModule:b,dynamicallyDependentEntriesByDynamicEntry:Ict(b,C,S),dynamicImportsByEntry:A}}(e),u=function(p){const m=Object.create(null);for(const{dependentEntries:b,modules:w}of p){let x=0n;for(const E of b)x|=1n<0n);let w=1n;for(const{dependentEntries:x}of m){for(const E of x)b[E]|=w;w<<=1n}return b}(o,u),d=function(p,m,b,w){const x=w.map((E,S)=>m.has(S)?-1n:0n);for(const[E,S]of m){m.delete(E);const C=x[E];let A=C;for(const $ of S)A&=p[$]|x[$];if(A!==C){x[E]=A;for(const $ of b[E])ai(m,$,Sl).add(E)}}return x}(h,l,c,o);(function(p,m){let b=1n;for(const{dependentEntries:w}of p){for(const x of w)(m[x]&b)===b&&w.delete(x);b<<=1n}})(u,d);const{chunks:g,sideEffectAtoms:y,sizeByAtom:f}=function(p,m,b,w){const x=Object.create(null),E=new Map,S=new Array(p.length);let C=0n,A=1n,$=0;for(const{dependentEntries:I,modules:M}of p){let q=0n,H=-1n;for(const T of I)q|=1n<1?T.estimateSize():1);F||(C|=A),S[$++]=Y,G.containedAtoms|=A,G.modules.push(...M),G.pure&&=F,G.size+=Y,A<<=1n}const O=Object.values(x);return C|=function(I,M,q){const H=new Map;let G=0n;for(const Y of I){const{dependencies:F,modules:T}=Y;for(const N of T)for(const U of N.getDependenciesToBeIncluded())if(U instanceof cr){if(U.info.moduleSideEffects){const J=ai(H,U,()=>{const W=q;return q<<=1n,G|=W,W});Y.containedAtoms|=J,Y.correlatedAtoms|=J}}else{const J=M.get(U);J&&J!==Y&&(F.add(J),J.dependentChunks.add(Y))}}return G}(O,E,A),{chunks:O,sideEffectAtoms:C,sizeByAtom:S}}(u,h,d,r);return i.push(...function(p,m,b,w,x){Ir("optimize chunks",3);const E=function(S,C){const A=[],$=[];for(const O of S)(O.size1&&x("info",Ak(p.length,E.small.size,"Initially")),function(S,C,A,$){const{small:O}=S;for(const I of O){const M=$ct(I,S,A,$,C<=1?1:1/0);if(M){const{containedAtoms:q,correlatedAtoms:H,modules:G,pure:Y,size:F}=I;O.delete(I),lD(M,C,S).delete(M),M.modules.push(...G),M.size+=F,M.pure&&=Y;const{dependencies:T,dependentChunks:N,dependentEntries:U}=M;M.correlatedAtoms&=H,M.containedAtoms|=q;for(const J of I.dependentEntries)U.add(J);for(const J of I.dependencies)T.add(J),J.dependentChunks.delete(I),J.dependentChunks.add(M);for(const J of I.dependentChunks)N.add(J),J.dependencies.delete(I),J.dependencies.add(M);T.delete(M),N.delete(M),lD(M,C,S).add(M)}}}(E,m,b,w),m>1&&x("info",Ak(E.small.size+E.big.size,E.small.size,"After merging chunks")),kr("optimize chunks",3),[...E.small,...E.big]):(kr("optimize chunks",3),p)}(g,r,y,f,n).map(({modules:p})=>({alias:null,modules:p}))),i}function Oct(e,t,r){const n=new Set([e]);for(const i of n){r.add(i),t.push(i);for(const s of i.dependencies)s instanceof cr||r.has(s)||n.add(s)}}function Ict(e,t,r){const n=new Map;for(const i of t){const s=ai(n,i,Sl),o=r[i];for(const a of t4([o.includedDynamicImporters,o.implicitlyLoadedAfter]))for(const l of e.get(a))s.add(l)}return n}function oD({size:e},{size:t}){return e-t}function $ct(e,{big:t,small:r},n,i,s){let o=null;for(const a of t4([r,t])){if(e===a)continue;const l=Bct(e,a,s,n,i);if(l=u)return 1/0;return d}(o&~s,r,i)}function lD(e,t,r){return e.sizee.execIndex>t.execIndex?1:-1;function Nct(e,t,r){const n=Symbol(e.id),i=[e.id];let s=t;for(e.cycles.add(n);s!==e;)s.cycles.add(n),i.push(s.id),s=r.get(s);return i.push(i[0]),i.reverse(),i}const cD=(e,t)=>t?`(${e})`:e;class uD{constructor(t,r){this.isOriginal=!0,this.filename=t,this.content=r}traceSegment(t,r,n){return{column:r,line:t,name:n,source:this}}}class Wg{constructor(t,r){this.sources=r,this.names=t.names,this.mappings=t.mappings}traceMappings(){const t=[],r=new Map,n=[],i=[],s=new Map,o=[];for(const a of this.mappings){const l=[];for(const c of a){if(c.length===1)continue;const u=this.sources[c[1]];if(!u)continue;const h=u.traceSegment(c[2],c[3],c.length===5?this.names[c[4]]:"");if(h){const{column:d,line:g,name:y,source:{content:f,filename:p}}=h;let m=r.get(p);if(m===void 0)m=t.length,t.push(p),r.set(p,m),n[m]=f;else if(n[m]==null)n[m]=f;else if(f!=null&&n[m]!==f)return Pt(plt(p));const b=[c[0],m,g,d];if(y){let w=s.get(y);w===void 0&&(w=i.length,i.push(y),s.set(y,w)),b[4]=w}l.push(b)}}o.push(l)}return{mappings:o,names:i,sources:t,sourcesContent:n}}traceSegment(t,r,n){const i=this.mappings[t];if(!i)return null;let s=0,o=i.length-1;for(;s<=o;){const a=s+o>>1,l=i[a];if(l[0]===r||s===o){if(l.length==1)return null;const c=this.sources[l[1]];return c?c.traceSegment(l[2],l[3],l.length===5?this.names[l[4]]:n):null}l[0]>r?o=a-1:s=a+1}return null}}function e4(e){return function(t,r){return r.missing?(e(oe,(n=r.plugin,{code:zB,message:`Sourcemap is likely to be incorrect: a plugin (${n}) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help`,plugin:n,url:Dr("troubleshooting/#warning-sourcemap-is-likely-to-be-incorrect")})),new Wg({mappings:[],names:[]},[t])):new Wg(r,[t]);var n}}function r4(e,t,r,n,i){let s;if(r){const o=r.sources,a=r.sourcesContent||[],l=xl(e)||".",c=r.sourceRoot||".",u=o.map((h,d)=>new uD(rs(l,c,h),a[d]));s=new Wg(r,u)}else s=new uD(e,t);return n.reduce(i,s)}let hD;const n4=e=>function(t){let r,n;try{const o=er.__wbindgen_add_to_stack_pointer(-16);er.xxhashBase64Url(o,zc(t));var i=Xo().getInt32(o+0,!0),s=Xo().getInt32(o+4,!0);return r=i,n=s,Sg(i,s)}finally{er.__wbindgen_add_to_stack_pointer(16),er.__wbindgen_export_2(r,n,1)}}(hw(e)),p_={base36:e=>function(t){let r,n;try{const o=er.__wbindgen_add_to_stack_pointer(-16);er.xxhashBase36(o,zc(t));var i=Xo().getInt32(o+0,!0),s=Xo().getInt32(o+4,!0);return r=i,n=s,Sg(i,s)}finally{er.__wbindgen_add_to_stack_pointer(16),er.__wbindgen_export_2(r,n,1)}}(hw(e)),base64:n4,hex:e=>function(t){let r,n;try{const o=er.__wbindgen_add_to_stack_pointer(-16);er.xxhashBase16(o,zc(t));var i=Xo().getInt32(o+0,!0),s=Xo().getInt32(o+4,!0);return r=i,n=s,Sg(i,s)}finally{er.__wbindgen_add_to_stack_pointer(16),er.__wbindgen_export_2(r,n,1)}}(hw(e))};function hw(e){return typeof e=="string"?typeof Buffer>"u"?(hD??=new TextEncoder,hD.encode(e)):Buffer.from(e):e}async function Lct(e,t,r,n,i){Ir("render chunks",2),function(y){for(const f of y)f.facadeModule&&f.facadeModule.isUserDefinedEntryPoint&&f.getPreliminaryFileName()}(e);const s=await Promise.all(e.map(y=>y.render()));kr("render chunks",2),Ir("transform chunks",2);const o=p_[n.hashCharacters],a=function(y){return Object.fromEntries(y.map(f=>{const p=f.getRenderedChunkInfo();return[p.fileName,p]}))}(e),{hashDependenciesByPlaceholder:l,initialHashesByPlaceholder:c,nonHashedChunksWithPlaceholders:u,placeholders:h,renderedChunksByPlaceholder:d}=await async function(y,f,p,m,b,w){const x=[],E=new Map,S=new Map,C=new Map,A=new Set;for(const{preliminaryFileName:{hashPlaceholder:$}}of y)$&&A.add($);return await Promise.all(y.map(async({chunk:$,preliminaryFileName:{fileName:O,hashPlaceholder:I},preliminarySourcemapFileName:M,magicString:q,usedModules:H})=>{const G={chunk:$,fileName:O,sourcemapFileName:M?.fileName??null,...await Mct(q,O,H,f,p,m,w)},{code:Y,map:F}=G;if(I){const{containedPlaceholders:N,transformedCode:U}=((z,V)=>{const Z=new Set,nt=z.replace(f_,et=>V.has(et)?(Z.add(et),`${u_}${"0".repeat(et.length-5)}${h_}`):et);return{containedPlaceholders:Z,transformedCode:nt}})(Y,A);let J=U;const W=m.hookReduceValueSync("augmentChunkHash","",[$.getRenderedChunkInfo()],(z,V)=>(V&&(z+=V),z));W&&(J+=W),E.set(I,G),S.set(I,{containedPlaceholders:N,contentHash:b(J)})}else x.push(G);const T=M?.hashPlaceholder;F&&T&&C.set(M.hashPlaceholder,b(F.toString()).slice(0,M.hashPlaceholder.length))})),{hashDependenciesByPlaceholder:S,initialHashesByPlaceholder:C,nonHashedChunksWithPlaceholders:x,placeholders:A,renderedChunksByPlaceholder:E}}(s,a,n,r,o,i),g=function(y,f,p,m,b,w){const x=new Map(p);for(const E of m){const{fileName:S}=y.get(E);let C="";const A=new Set([E]);for(const I of A){const{containedPlaceholders:M,contentHash:q}=f.get(I);C+=q;for(const H of M)A.add(H)}let $,O;do O&&(C=O),O=w(C).slice(0,E.length),$=Act(S,E,O);while(b[hy].has($.toLowerCase()));b[$]=d_,x.set(E,O)}return x}(d,l,c,h,t,o);(function(y,f,p,m,b,w){for(const{chunk:x,code:E,fileName:S,sourcemapFileName:C,map:A}of y.values()){let $=ja(E,f);const O=ja(S,f);let I=null;A&&(w.sourcemapDebugIds&&($+=dD($,A)),I=C?ja(C,f):`${O}.map`,A.file=ja(A.file,f),$+=fD(I,A,b,w)),p[O]=x.finalizeChunk($,A,I,f)}for(const{chunk:x,code:E,fileName:S,sourcemapFileName:C,map:A}of m){let $=f.size>0?ja(E,f):E,O=null;A&&(w.sourcemapDebugIds&&($+=dD($,A)),O=C?ja(C,f):`${S}.map`,$+=fD(O,A,b,w)),p[S]=x.finalizeChunk($,A,O,f)}})(d,g,t,u,r,n),kr("transform chunks",2)}async function Mct(e,t,r,n,i,s,o){let a=null;const l=[];let c=await s.hookReduceArg0("renderChunk",[e.toString(),n[t],i,{chunks:n}],(b,w,x)=>{if(w==null)return b;if(typeof w=="string"&&(w={code:w,map:void 0}),w.map!==null){const E=Vc(w.map);l.push(E||{missing:!0,plugin:x.name})}return w.code});const{compact:u,dir:h,file:d,sourcemap:g,sourcemapExcludeSources:y,sourcemapFile:f,sourcemapPathTransform:p,sourcemapIgnoreList:m}=i;if(u||c[c.length-1]===` `||(c+=` `),g){let b;Ir("sourcemaps",3),b=d?rs(f||d):h?rs(h,t):rs(t),a=function(w,x,E,S,C,A){const $=e4(A),O=E.filter(F=>!F.excludeFromSourcemap).map(F=>r4(F.id,F.originalCode,F.originalSourcemap,F.sourcemapChain,$)),I=new Wg(x,O),M=S.reduce($,I);let{sources:q,sourcesContent:H,names:G,mappings:Y}=M.traceMappings();if(w){const F=xl(w);q=q.map(T=>_l(F,T)),w=xo(w)}H=C?null:H;for(const F of E)l_(F.originalSourcemap,F.sourcemapChain);return new G0({file:w,mappings:Y,names:G,sources:q,sourcesContent:H})}(b,e.generateDecodedMap({}),r,l,y,o);for(let w=0;w{const s=new Set;return new Proxy(i,{deleteProperty:(o,a)=>(typeof a=="string"&&s.delete(a.toLowerCase()),Reflect.deleteProperty(o,a)),get:(o,a)=>a===hy?s:Reflect.get(o,a),set:(o,a,l)=>(typeof a=="string"&&s.add(a.toLowerCase()),Reflect.set(o,a,l))})})(r);this.pluginDriver.setOutputBundle(n,this.outputOptions);try{Ir("initialize render",2),await this.pluginDriver.hookParallel("renderStart",[this.outputOptions,this.inputOptions]),kr("initialize render",2),Ir("generate chunks",2);const i=(()=>{let o=0;return(a,l)=>{if(l>21)return Pt(qn(`Hashes cannot be longer than 21 characters, received ${l}. Check the "${a}" option.`));const c=`${u_}${bg(++o).padStart(l-5,"0")}${h_}`;return c.length>l?Pt(qn(`To generate hashes for this number of chunks (currently ${o}), you need a minimum hash size of ${c.length}, received ${l}. Check the "${a}" option.`)):c}})(),s=await this.generateChunks(n,i);s.length>1&&function(o,a){if(o.format==="umd"||o.format==="iife")return Pt(vr("output.format",IB,"UMD and IIFE output formats are not supported for code-splitting builds",o.format));if(typeof o.file=="string")return Pt(vr("output.file",Df,'when building multiple chunks, the "output.dir" option must be used, not "output.file". To inline dynamic imports, set the "inlineDynamicImports" option'));if(o.sourcemapFile)return Pt(vr("output.sourcemapFile",llt,'"output.sourcemapFile" is only supported for single-file builds'));!o.amd.autoId&&o.amd.id&&a(oe,vr("output.amd.id",OB,'this option is only properly supported for single-file builds. Use "output.amd.autoId" and "output.amd.basePath" instead'))}(this.outputOptions,this.inputOptions.onLog),this.pluginDriver.setChunkInformation(this.facadeChunkByModule);for(const o of s)o.generateExports();kr("generate chunks",2),await Lct(s,n,this.pluginDriver,this.outputOptions,this.inputOptions.onLog)}catch(i){throw await this.pluginDriver.hookParallel("renderError",[i]),i}return(i=>{const s=new Set,o=Object.values(i);for(const a of o)a.type==="asset"&&a.needsCodeReference&&s.add(a.fileName);for(const a of o)if(a.type==="chunk")for(const l of a.referencedFiles)s.has(l)&&s.delete(l);for(const a of s)delete i[a]})(n),Ir("generate bundle",2),await this.pluginDriver.hookSeq("generateBundle",[this.outputOptions,n,t]),this.finaliseAssets(n),kr("generate bundle",2),kr("GENERATE",1),r}async addManualChunks(t){const r=new Map,n=await Promise.all(Object.entries(t).map(async([i,s])=>({alias:i,entries:await this.graph.moduleLoader.addAdditionalModules(s,!0)})));for(const{alias:i,entries:s}of n)for(const o of s)pD(i,o,r);return r}assignManualChunks(t){const r=[],n={getModuleIds:()=>this.graph.modulesById.keys(),getModuleInfo:this.graph.getModuleInfo};for(const s of this.graph.modulesById.values())if(s instanceof br){const o=t(s.id,n);typeof o=="string"&&r.push([o,s])}r.sort(([s],[o])=>s>o?1:s`${G?"async ":""}function${Y?` ${Y}`:""}${S}(${H.join(`,${S}`)})${S}`,I=b?(H,{isAsync:G,name:Y})=>{const F=H.length===1;return`${Y?`${$} ${Y}${S}=${S}`:""}${G?`async${F?" ":S}`:""}${F?H[0]:`(${H.join(`,${S}`)})`}${S}=>${S}`}:O,M=(H,{functionReturn:G,lineBreakIndent:Y,name:F})=>[`${I(H,{isAsync:!1,name:F})}${b?Y?`${C}${Y.base}${Y.t}`:"":`{${Y?`${C}${Y.base}${Y.t}`:S}${G?"return ":""}`}`,b?`${F?";":""}${Y?`${C}${Y.base}`:""}`:`${A}${Y?`${C}${Y.base}`:S}}`],q=E?H=>yg.test(H):H=>!J0.has(H)&&yg.test(H);return{_:S,cnst:$,getDirectReturnFunction:M,getDirectReturnIifeLeft:(H,G,{needsArrowReturnParens:Y,needsWrappedFunction:F})=>{const[T,N]=M(H,{functionReturn:!0,lineBreakIndent:null,name:null});return`${cD(`${T}${cD(G,b&&Y)}${N}`,b||F)}(`},getFunctionIntro:I,getNonArrowFunctionIntro:O,getObject(H,{lineBreakIndent:G}){const Y=G?`${C}${G.base}${G.t}`:S;return`{${H.map(([F,T])=>{if(F===null)return`${Y}${T}`;const N=Q0(F);return F===T&&x&&F===N?Y+F:`${Y}${N}:${S}${T}`}).join(",")}${H.length===0?"":G?`${C}${G.base}`:S}}`},getPropertyAccess:H=>q(H)?`.${H}`:`[${JSON.stringify(H)}]`,n:C,s:A}}(this.outputOptions),c=function(m){const b=[];for(const w of m.values())w instanceof br&&(w.isIncluded()||w.info.isEntry||w.includedDynamicImporters.length>0)&&b.push(w);return b}(this.graph.modulesById),u=function(m){if(m.length===0)return"/";if(m.length===1)return xl(m[0]);const b=m.slice(1).reduce((w,x)=>{const E=x.split(/\/+|\\+/);let S;for(S=0;w[S]===E[S]&&S1?b.join("/"):"/"}(function(m,b){const w=[];for(const x of m)(x.info.isEntry||b)&&ma(x.id)&&w.push(x.id);return w}(c,o)),h=function(m,b,w){const x=new Map;for(const E of m.values())E instanceof cr&&x.set(E,new Tc(E,b,w));return x}(this.graph.modulesById,this.outputOptions,u),d=i?[{alias:null,modules:c}]:o?c.map(m=>({alias:null,modules:[m]})):Fct(this.graph.entryModules,a,n,this.inputOptions.onLog),g=new Array(d.length),y=new Map;let f=0;for(const{alias:m,modules:b}of d){b.sort(Rct);const w=new Go(b,this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.graph.modulesById,y,h,this.facadeChunkByModule,this.includedNamespaces,m,r,t,u,l);g[f++]=w}for(const m of g)m.link();const p=[];for(const m of g)p.push(...m.generateFacades());return[...g,...p]}}function pD(e,t,r){const n=r.get(t);if(typeof n=="string"&&n!==e)return Pt((i=t.id,s=e,o=n,{code:"INVALID_CHUNK",message:`Cannot assign "${le(i)}" to the "${s}" chunk as it is already in the "${o}" chunk.`}));var i,s,o;r.set(t,e)}class zct extends rR{constructor(){super(),this.parent=null,this.variables.set("undefined",new gR)}findVariable(t){let r=this.variables.get(t);return r||(r=new B2(t),this.variables.set(t,r)),r}}const fy=e=>()=>Pt(function(t){return{code:"NO_FS_IN_BROWSER",message:`Cannot access the file system (via "${t}") when using the browser build of Rollup. Make sure you supply a plugin with custom resolveId and load hooks to Rollup.`,url:Dr("plugin-development/#a-simple-example")}}(e)),Uct=fy("fs.mkdir"),Vct=fy("fs.readFile"),Wct=fy("fs.writeFile");async function mD(e,t,r,n,i,s,o,a,l){const c=await function(u,h,d,g,y,f,p,m){let b=null,w=null;if(y){b=new Set;for(const x of y)u===x.source&&h===x.importer&&b.add(x.plugin);w=(x,E)=>({...x,resolve:(S,C,{attributes:A,custom:$,isEntry:O,skipSelf:I}=Kr)=>(I??=!0,g(S,C,$,O,A||Yr,I?[...y,{importer:C,plugin:E,source:S}]:y))})}return d.hookFirstAndGetPlugin("resolveId",[u,h,{attributes:m,custom:f,isEntry:p}],w,b)}(e,t,n,i,s,o,a,l);return c==null?fy("path.resolve")():c[0]}function i4(e){return e.charCodeAt(0)===65279?i4(e.slice(1)):e}const m_="at position ",g_="at output position ",qct={delete:()=>!1,get(){},has:()=>!1,set(){}};function hp(e){return e.startsWith(m_)||e.startsWith(g_)?Pt({code:"ANONYMOUS_PLUGIN_CACHE",message:"A plugin is trying to use the Rollup cache but is not declaring a plugin name or cacheKey."}):Pt({code:"DUPLICATE_PLUGIN_NAME",message:`The plugin name ${e} is being used twice in the same build. Plugin names must be distinct or provide a cacheKey (please post an issue to the plugin if you are a plugin user).`})}const gD=(e,t,r=Gct)=>{const{onwarn:n,onLog:i}=e,s=Hct(r,n);if(i){const o=nl[t];return(a,l)=>i(a,s4(l),(c,u)=>{if(c==="error")return Pt(Ns(u));nl[c]>=o&&s(c,Ns(u))})}return s},Hct=(e,t)=>t?(r,n)=>{r===oe?t(s4(n),i=>e(oe,Ns(i))):e(r,n)}:e,s4=e=>(Object.defineProperty(e,"toString",{value:()=>e.message,writable:!0}),e),Ns=e=>typeof e=="string"?{message:e}:typeof e=="function"?Ns(e()):e,Gct=(e,{message:t})=>{switch(e){case oe:return console.warn(t);case cd:return console.debug(t);default:return console.info(t)}};function o4(e,t,r,n,i=/$./){const s=new Set(t),o=Object.keys(e).filter(a=>!(s.has(a)||i.test(a)));o.length>0&&n(oe,function(a,l,c){return{code:"UNKNOWN_OPTION",message:`Unknown ${a}: ${l.join(", ")}. Allowed options: ${c.join(", ")}`}}(r,o,[...s].sort()))}const Yct={recommended:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:lr,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!1},safest:{annotations:!0,correctVarValueBeforeDeclaration:!0,manualPureFunctions:lr,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!0},smallest:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:lr,moduleSideEffects:()=>!1,propertyReadSideEffects:!1,tryCatchDeoptimization:!1,unknownGlobalSideEffects:!1}},Kct={preserve:{factory:null,fragment:null,importSource:null,mode:"preserve"},"preserve-react":{factory:"React.createElement",fragment:"React.Fragment",importSource:"react",mode:"preserve"},react:{factory:"React.createElement",fragment:"React.Fragment",importSource:"react",mode:"classic"},"react-jsx":{factory:"React.createElement",importSource:"react",jsxImportSource:"react/jsx-runtime",mode:"automatic"}},Xct={es2015:{arrowFunctions:!0,constBindings:!0,objectShorthand:!0,reservedNamesAsProps:!0,symbols:!0},es5:{arrowFunctions:!1,constBindings:!1,objectShorthand:!1,reservedNamesAsProps:!0,symbols:!1}},y_=(e,t,r,n,i)=>{const s=e?.preset;if(s){const o=t[s];if(o)return{...o,...e};Pt(vr(`${r}.preset`,n,`valid values are ${_o(Object.keys(t))}`,s))}return((o,a,l,c)=>u=>{if(typeof u=="string"){const h=o[u];if(h)return h;Pt(vr(a,l,`valid values are ${c}${_o(Object.keys(o))}. You can also supply an object for more fine-grained control`,u))}return(h=>h&&typeof h=="object"?h:{})(u)})(t,r,n,i)(e)},qg=async e=>(await async function(t){do t=(await Promise.all(t)).flat(1/0);while(t.some(r=>r?.then));return t}([e])).filter(Boolean);async function Jct(e,t,r,n){const i=t.id,s=[];let o=e.map===null?null:Vc(e.map);const a=e.code;let l=e.ast;const c=[],u=[];let h=!1;const d=()=>h=!0;let g="",y=e.code;const f=m=>(b,w)=>{b=Ns(b),w&&dg(b,w,y,i),b.id=i,b.hook="transform",m(b)};let p;try{p=await r.hookReduceArg0("transform",[y,i],function(m,b,w){let x,E;if(typeof b=="string")x=b;else{if(!b||typeof b!="object")return m;if(t.updateOptions(b),b.code==null)return(b.map||b.ast)&&n(oe,function(S){return{code:"NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE",message:`The plugin "${S}" returned a "map" or "ast" without returning a "code". This will be ignored.`}}(w.name)),m;({code:x,map:E,ast:l}=b)}return E!==null&&s.push(Vc(typeof E=="string"?JSON.parse(E):E)||{missing:!0,plugin:w.name}),y=x,x},(m,b)=>{return g=b.name,{...m,addWatchFile(E){c.push(E),m.addWatchFile(E)},cache:h?m.cache:(w=m.cache,x=d,{delete:E=>(x(),w.delete(E)),get:E=>(x(),w.get(E)),has:E=>(x(),w.has(E)),set:(E,S)=>(x(),w.set(E,S))}),debug:f(m.debug),emitFile:E=>(u.push(E),r.emitFile(E)),error:(E,S)=>(typeof E=="string"&&(E={message:E}),S&&dg(E,S,y,i),E.id=i,E.hook="transform",m.error(E)),getCombinedSourcemap(){const E=function(S,C,A,$,O){return $.length===0?A:Vc({version:3,...r4(S,C,A,$,e4(O)).traceMappings()})}(i,a,o,s,n);return E?(o!==E&&(o=E,s.length=0),new G0({...E,file:null,sourcesContent:E.sourcesContent})):new wl(a).generateMap({hires:!0,includeContent:!0,source:i})},info:f(m.info),setAssetSource(){return this.error({code:"INVALID_SETASSETSOURCE",message:"setAssetSource cannot be called in transform for caching reasons. Use emitFile with a source, or call setAssetSource in another hook."})},warn:f(m.warn)};var w,x})}catch(m){return Pt(Pf(m,g,{hook:"transform",id:i}))}return!h&&u.length>0&&(t.transformFiles=u),{ast:l,code:p,customTransformCache:h,originalCode:a,originalSourcemap:o,sourcemapChain:s,transformDependencies:c}}const Qb="resolveDependencies";class Zct{constructor(t,r,n,i){this.graph=t,this.modulesById=r,this.options=n,this.pluginDriver=i,this.implicitEntryModules=new Set,this.indexedEntryModules=[],this.latestLoadModulesPromise=Promise.resolve(),this.moduleLoadPromises=new Map,this.modulesWithLoadedDependencies=new Set,this.nextChunkNamePriority=0,this.nextEntryModuleIndex=0,this.resolveId=async(s,o,a,l,c,u=null)=>this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(!this.options.external(s,o,!1)&&await mD(s,o,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,u,a,typeof l=="boolean"?l:!o,c),o,s),c),this.hasModuleSideEffects=n.treeshake?n.treeshake.moduleSideEffects:()=>!0}async addAdditionalModules(t,r){const n=this.extendLoadModulesPromise(Promise.all(t.map(i=>this.loadEntryModule(i,!1,void 0,null,r))));return await this.awaitLoadModulesPromise(),n}async addEntryModules(t,r){const n=this.nextEntryModuleIndex;this.nextEntryModuleIndex+=t.length;const i=this.nextChunkNamePriority;this.nextChunkNamePriority+=t.length;const s=await this.extendLoadModulesPromise(Promise.all(t.map(({id:o,importer:a})=>this.loadEntryModule(o,!0,a,null))).then(o=>{for(const[a,l]of o.entries()){l.isUserDefinedEntryPoint=l.isUserDefinedEntryPoint||r,bD(l,t[a],r,i+a);const c=this.indexedEntryModules.find(u=>u.module===l);c?c.index=Math.min(c.index,n+a):this.indexedEntryModules.push({index:n+a,module:l})}return this.indexedEntryModules.sort(({index:a},{index:l})=>a>l?1:-1),o}));return await this.awaitLoadModulesPromise(),{entryModules:this.indexedEntryModules.map(({module:o})=>o),implicitEntryModules:[...this.implicitEntryModules],newEntryModules:s}}async emitChunk({fileName:t,id:r,importer:n,name:i,implicitlyLoadedAfterOneOf:s,preserveSignature:o}){const a={fileName:t||null,id:r,importer:n,name:i||null},l=s?await this.addEntryWithImplicitDependants(a,s):(await this.addEntryModules([a],!1)).newEntryModules[0];return o!=null&&(l.preserveSignature=o),l}async preloadModule(t){return(await this.fetchModule(this.getResolvedIdWithDefaults(t,Yr),void 0,!1,!t.resolveDependencies||Qb)).info}addEntryWithImplicitDependants(t,r){const n=this.nextChunkNamePriority++;return this.extendLoadModulesPromise(this.loadEntryModule(t.id,!1,t.importer,null).then(async i=>{if(bD(i,t,!1,n),!i.info.isEntry){const s=await Promise.all(r.map(o=>this.loadEntryModule(o,!1,t.importer,i.id)));if(!i.info.isEntry){this.implicitEntryModules.add(i);for(const o of s)i.implicitlyLoadedAfter.add(o);for(const o of i.implicitlyLoadedAfter)o.implicitlyLoadedBefore.add(i)}}return i}))}async addModuleSource(t,r,n){let i;try{i=await this.graph.fileOperationQueue.run(async()=>{const a=await this.pluginDriver.hookFirst("load",[t]);return a!==null?a:(this.graph.watchFiles[t]=!0,await Vct(t,"utf8"))})}catch(a){let l=`Could not load ${t}`;throw r&&(l+=` (imported by ${le(r)})`),l+=`: ${a.message}`,a.message=l,a}const s=typeof i=="string"?{code:i}:i!=null&&typeof i=="object"&&typeof i.code=="string"?i:Pt(function(a){return{code:"BAD_LOADER",message:`Error loading "${le(a)}": plugin load hook should return a string, a { code, map } object, or nothing/null.`}}(t));s.code=i4(s.code);const o=this.graph.cachedModules.get(t);if(!o||o.customTransformCache||o.originalCode!==s.code||await this.pluginDriver.hookFirst("shouldTransformCachedModule",[{ast:o.ast,code:o.code,id:o.id,meta:o.meta,moduleSideEffects:o.moduleSideEffects,resolvedSources:o.resolvedIds,syntheticNamedExports:o.syntheticNamedExports}]))n.updateOptions(s),await n.setSource(await Jct(s,n,this.pluginDriver,this.options.onLog));else{if(o.transformFiles)for(const a of o.transformFiles)this.pluginDriver.emitFile(a);await n.setSource(o)}}async awaitLoadModulesPromise(){let t;do t=this.latestLoadModulesPromise,await t;while(t!==this.latestLoadModulesPromise)}extendLoadModulesPromise(t){return this.latestLoadModulesPromise=Promise.all([t,this.latestLoadModulesPromise]),this.latestLoadModulesPromise.catch(()=>{}),t}async fetchDynamicDependencies(t,r){const n=await Promise.all(r.map(i=>i.then(async([s,o])=>o===null?null:typeof o=="string"?(s.resolution=o,null):s.resolution=await this.fetchResolvedDependency(le(o.id),t.id,o))));for(const i of n)i&&(t.dynamicDependencies.add(i),i.dynamicImporters.push(t.id))}async fetchModule({attributes:t,id:r,meta:n,moduleSideEffects:i,syntheticNamedExports:s},o,a,l){const c=this.modulesById.get(r);if(c instanceof br)return o&&im(t,c.info.attributes)&&this.options.onLog(oe,Zp(c.info.attributes,t,r,o)),await this.handleExistingModule(c,a,l),c;if(c instanceof cr)return Pt({code:"EXTERNAL_MODULES_CANNOT_BE_TRANSFORMED_TO_MODULES",message:`${c.id} is resolved as a module now, but it was an external module before. Please check whether there are conflicts in your Rollup options "external" and "manualChunks", manualChunks cannot include external modules.`});const u=new br(this.graph,r,this.options,a,i,s,n,t);this.modulesById.set(r,u);const h=this.addModuleSource(r,o,u).then(()=>[this.getResolveStaticDependencyPromises(u),this.getResolveDynamicImportPromises(u),d]),d=vD(h).then(()=>this.pluginDriver.hookParallel("moduleParsed",[u.info]));d.catch(()=>{}),this.moduleLoadPromises.set(u,h);const g=await h;return l?l===Qb&&await d:await this.fetchModuleDependencies(u,...g),u}async fetchModuleDependencies(t,r,n,i){this.modulesWithLoadedDependencies.has(t)||(this.modulesWithLoadedDependencies.add(t),await Promise.all([this.fetchStaticDependencies(t,r),this.fetchDynamicDependencies(t,n)]),t.linkImports(),await i)}fetchResolvedDependency(t,r,n){if(n.external){const{attributes:i,external:s,id:o,moduleSideEffects:a,meta:l}=n;let c=this.modulesById.get(o);if(c){if(!(c instanceof cr))return Pt(function(u,h){return{code:"INVALID_EXTERNAL_ID",message:`"${u}" is imported as an external by "${le(h)}", but is already an existing non-external module id.`}}(t,r));im(c.info.attributes,i)&&this.options.onLog(oe,Zp(c.info.attributes,i,t,r))}else c=new cr(this.options,o,a,l,s!=="absolute"&&ma(o),i),this.modulesById.set(o,c);return Promise.resolve(c)}return this.fetchModule(n,r,!1,!1)}async fetchStaticDependencies(t,r){for(const n of await Promise.all(r.map(i=>i.then(([s,o])=>this.fetchResolvedDependency(s,t.id,o)))))t.dependencies.add(n),n.importers.push(t.id);if(!this.options.treeshake||t.info.moduleSideEffects==="no-treeshake")for(const n of t.dependencies)n instanceof br&&(n.importedFromNotTreeshaken=!0)}getNormalizedResolvedIdWithoutDefaults(t,r,n){const{makeAbsoluteExternalsRelative:i}=this.options;if(t){if(typeof t=="object"){const a=t.external||this.options.external(t.id,r,!0);return{...t,external:a&&(a==="relative"||!ma(t.id)||a===!0&&t1(t.id,n,i)||"absolute")}}const o=this.options.external(t,r,!0);return{external:o&&(t1(t,n,i)||"absolute"),id:o&&i?yD(t,r):t}}const s=i?yD(n,r):n;return t===!1||this.options.external(s,r,!0)?{external:t1(s,n,i)||"absolute",id:s}:null}getResolveDynamicImportPromises(t){return t.dynamicImports.map(async r=>{const n=await this.resolveDynamicImport(t,r.argument,t.id,YR(r.node));return n&&typeof n=="object"&&(r.id=n.id),[r,n]})}getResolveStaticDependencyPromises(t){return Array.from(t.sourcesWithAttributes,async([r,n])=>[r,t.resolvedIds[r]=t.resolvedIds[r]||this.handleInvalidResolvedId(await this.resolveId(r,t.id,Yr,!1,n),r,t.id,n)])}getResolvedIdWithDefaults(t,r){if(!t)return null;const n=t.external||!1;return{attributes:t.attributes||r,external:n,id:t.id,meta:t.meta||{},moduleSideEffects:t.moduleSideEffects??this.hasModuleSideEffects(t.id,!!n),resolvedBy:t.resolvedBy??"rollup",syntheticNamedExports:t.syntheticNamedExports??!1}}async handleExistingModule(t,r,n){const i=this.moduleLoadPromises.get(t);if(n)return n===Qb?vD(i):i;if(r){t.info.isEntry=!0,this.implicitEntryModules.delete(t);for(const s of t.implicitlyLoadedAfter)s.implicitlyLoadedBefore.delete(t);t.implicitlyLoadedAfter.clear()}return this.fetchModuleDependencies(t,...await i)}handleInvalidResolvedId(t,r,n,i){return t===null?w2(r)?Pt(function(s,o){return{code:_k,exporter:s,id:o,message:`Could not resolve "${s}" from "${le(o)}"`}}(r,n)):(this.options.onLog(oe,function(s,o){return{code:_k,exporter:s,id:o,message:`"${s}" is imported by "${le(o)}", but could not be resolved – treating it as an external dependency.`,url:Dr("troubleshooting/#warning-treating-module-as-external-dependency")}}(r,n)),{attributes:i,external:!0,id:r,meta:{},moduleSideEffects:this.hasModuleSideEffects(r,!0),resolvedBy:"rollup",syntheticNamedExports:!1}):(t.external&&t.syntheticNamedExports&&this.options.onLog(oe,function(s,o){return{code:"EXTERNAL_SYNTHETIC_EXPORTS",exporter:s,message:`External "${s}" cannot have "syntheticNamedExports" enabled (imported by "${le(o)}").`}}(r,n)),t)}async loadEntryModule(t,r,n,i,s=!1){const o=await mD(t,n,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,null,Yr,!0,Yr);if(o==null)return Pt(i===null?function(l){return{code:xk,message:`Could not resolve entry module "${le(l)}".`}}(t):function(l,c){return{code:Kv,message:`Module "${le(l)}" that should be implicitly loaded before "${le(c)}" could not be resolved.`}}(t,i));const a=typeof o=="object"&&o.external;return o===!1||a?Pt(i===null?a&&s?{code:"EXTERNAL_MODULES_CANNOT_BE_INCLUDED_IN_MANUAL_CHUNKS",message:`"${t}" cannot be included in manualChunks because it is resolved as an external module by the "external" option or plugins.`}:function(l){return{code:xk,message:`Entry module "${le(l)}" cannot be external.`}}(t):function(l,c){return{code:Kv,message:`Module "${le(l)}" that should be implicitly loaded before "${le(c)}" cannot be external.`}}(t,i)):this.fetchModule(this.getResolvedIdWithDefaults(typeof o=="object"?o:{id:o},Yr),void 0,r,!1)}async resolveDynamicImport(t,r,n,i){const s=await this.pluginDriver.hookFirst("resolveDynamicImport",[r,n,{attributes:i}]);if(typeof r!="string")return typeof s=="string"?s:s?this.getResolvedIdWithDefaults(s,i):null;if(s==null){const o=t.resolvedIds[r];return o?(im(o.attributes,i)&&this.options.onLog(oe,Zp(o.attributes,i,r,n)),o):t.resolvedIds[r]=this.handleInvalidResolvedId(await this.resolveId(r,t.id,Yr,!1,i),r,t.id,i)}return this.handleInvalidResolvedId(this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(s,n,r),i),r,n,i)}}function yD(e,t){return w2(e)?t?rs(t,"..",e):rs(e):e}function bD(e,{fileName:t,name:r},n,i){if(t!==null)e.chunkFileNames.add(t);else if(r!==null){let s=0;for(;e.chunkNames[s]?.priorityQo(c).slice(1),extname:()=>Qo(c),hash:u=>s.slice(0,Math.max(0,u||8)),name:()=>c.slice(0,Math.max(0,c.length-Qo(c).length))}),a)}function xD(e,{bundle:t},r){t[hy].has(e.toLowerCase())?r(oe,function(n){return{code:"FILE_NAME_CONFLICT",message:`The emitted file "${n}" overwrites a previously emitted file of the same name.`}}(e)):t[e]=d_}const Qct=new Set(["chunk","asset","prebuilt-chunk"]);function _D(e,t,r){if(!(typeof e=="string"||e instanceof Uint8Array)){const n=t.fileName||t.name||r;return Pt(qn(`Could not set source for ${typeof n=="string"?`asset "${n}"`:"unnamed asset"}, asset source needs to be a string, Uint8Array or Buffer.`))}return e}class tut{constructor(t,r,n){this.graph=t,this.options=r,this.facadeChunkByModule=null,this.nextIdBase=1,this.output=null,this.outputFileEmitters=[],this.emitFile=i=>function(s){return!!(s&&Qct.has(s.type))}(i)?i.type==="prebuilt-chunk"?this.emitPrebuiltChunk(i):function(s){const o=s.fileName||s.name;return!o||typeof o=="string"&&!fg(o)}(i)?i.type==="chunk"?this.emitChunk(i):this.emitAsset(i):Pt(qn(`The "fileName" or "name" properties of emitted chunks and assets must be strings that are neither absolute nor relative paths, received "${i.fileName||i.name}".`)):Pt(qn(`Emitted files must be of type "asset", "chunk" or "prebuilt-chunk", received "${i&&i.type}".`)),this.finaliseAssets=()=>{for(const[i,s]of this.filesByReferenceId)if(s.type==="asset"&&typeof s.fileName!="string")return Pt({code:"ASSET_SOURCE_MISSING",message:`Plugin error creating asset "${s.name||i}" - no asset source set.`})},this.getFileName=i=>{const s=this.filesByReferenceId.get(i);return s?s.type==="chunk"?(o=s,a=this.facadeChunkByModule,o.fileName?o.fileName:a?a.get(o.module).getFileName():Pt({code:"CHUNK_NOT_GENERATED",message:`Plugin error - Unable to get file name for emitted chunk "${o.fileName||o.name}". You can only get file names once chunks have been generated after the "renderStart" hook.`})):s.type==="prebuilt-chunk"?s.fileName:function(l,c){return typeof l.fileName!="string"?Pt({code:"ASSET_NOT_FINALISED",message:`Plugin error - Unable to get file name for asset "${l.name||c}". Ensure that the source is set and that generate is called first. If you reference assets via import.meta.ROLLUP_FILE_URL_, you need to either have set their source after "renderStart" or need to provide an explicit "fileName" when emitting them.`}):l.fileName}(s,i):Pt({code:"FILE_NOT_FOUND",message:`Plugin error - Unable to get file name for unknown file "${i}".`});var o,a},this.setAssetSource=(i,s)=>{const o=this.filesByReferenceId.get(i);if(!o)return Pt({code:"ASSET_NOT_FOUND",message:`Plugin error - Unable to set the source for unknown asset "${i}".`});if(o.type!=="asset")return Pt(qn(`Asset sources can only be set for emitted assets but "${i}" is an emitted chunk.`));if(o.source!==void 0)return Pt({code:"ASSET_SOURCE_ALREADY_SET",message:`Unable to set the source for asset "${o.name||i}", source already set.`});const a=_D(s,o,i);if(this.output)this.finalizeAdditionalAsset(o,a,this.output);else{o.source=a;for(const l of this.outputFileEmitters)l.finalizeAdditionalAsset(o,a,l.output)}},this.setChunkInformation=i=>{this.facadeChunkByModule=i},this.setOutputBundle=(i,s)=>{const o=p_[s.hashCharacters],a=this.output={bundle:i,fileNamesBySourceHash:new Map,getHash:o,outputOptions:s};for(const c of this.filesByReferenceId.values())c.fileName&&xD(c.fileName,a,this.options.onLog);const l=new Map;for(const c of this.filesByReferenceId.values())c.type==="asset"&&c.source!==void 0?c.fileName?this.finalizeAdditionalAsset(c,c.source,a):ai(l,o(c.source),()=>[]).push(c):c.type==="prebuilt-chunk"&&(this.output.bundle[c.fileName]=this.createPrebuiltChunk(c));for(const[c,u]of l)this.finalizeAssetsWithSameSource(u,c,a)},this.filesByReferenceId=n?new Map(n.filesByReferenceId):new Map,n?.addOutputFileEmitter(this)}addOutputFileEmitter(t){this.outputFileEmitters.push(t)}assignReferenceId(t,r){let n=r;do n=n4(n).slice(0,8).replaceAll("-","$");while(this.filesByReferenceId.has(n)||this.outputFileEmitters.some(({filesByReferenceId:i})=>i.has(n)));t.referenceId=n,this.filesByReferenceId.set(n,t);for(const{filesByReferenceId:i}of this.outputFileEmitters)i.set(n,t);return n}createPrebuiltChunk(t){return{code:t.code,dynamicImports:[],exports:t.exports||[],facadeModuleId:null,fileName:t.fileName,implicitlyLoadedBefore:[],importedBindings:{},imports:[],isDynamicEntry:!1,isEntry:!1,isImplicitEntry:!1,map:t.map||null,moduleIds:[],modules:{},name:t.fileName,preliminaryFileName:t.fileName,referencedFiles:[],sourcemapFileName:t.sourcemapFileName||null,type:"chunk"}}emitAsset(t){const r=t.source===void 0?void 0:_D(t.source,t,null),n=t.originalFileName||null;typeof n=="string"&&(this.graph.watchFiles[n]=!0);const i={fileName:t.fileName,name:t.name,needsCodeReference:!!t.needsCodeReference,originalFileName:n,referenceId:"",source:r,type:"asset"},s=this.assignReferenceId(i,t.fileName||t.name||String(this.nextIdBase++));if(this.output)this.emitAssetWithReferenceId(i,this.output);else for(const o of this.outputFileEmitters)o.emitAssetWithReferenceId(i,o.output);return s}emitAssetWithReferenceId(t,r){const{fileName:n,source:i}=t;n&&xD(n,r,this.options.onLog),i!==void 0&&this.finalizeAdditionalAsset(t,i,r)}emitChunk(t){if(this.graph.phase>ol.LOAD_AND_PARSE)return Pt({code:"INVALID_ROLLUP_PHASE",message:"Cannot emit chunks after module loading has finished."});if(typeof t.id!="string")return Pt(qn(`Emitted chunks need to have a valid string id, received "${t.id}"`));const r={fileName:t.fileName,module:null,name:t.name||t.id,referenceId:"",type:"chunk"};return this.graph.moduleLoader.emitChunk(t).then(n=>r.module=n).catch(()=>{}),this.assignReferenceId(r,t.id)}emitPrebuiltChunk(t){if(typeof t.code!="string")return Pt(qn(`Emitted prebuilt chunks need to have a valid string code, received "${t.code}".`));if(typeof t.fileName!="string"||fg(t.fileName))return Pt(qn(`The "fileName" property of emitted prebuilt chunks must be strings that are neither absolute nor relative paths, received "${t.fileName}".`));const r={code:t.code,exports:t.exports,fileName:t.fileName,map:t.map,referenceId:"",type:"prebuilt-chunk"},n=this.assignReferenceId(r,r.fileName);return this.output&&(this.output.bundle[r.fileName]=this.createPrebuiltChunk(r)),n}finalizeAdditionalAsset(t,r,{bundle:n,fileNamesBySourceHash:i,getHash:s,outputOptions:o}){let{fileName:a,name:l,needsCodeReference:c,originalFileName:u,referenceId:h}=t;if(!a){const y=s(r);a=i.get(y),a||(a=wD(l,l?[l]:[],r,u,u?[u]:[],y,o,n,this.options),i.set(y,a))}const d={...t,fileName:a,source:r};this.filesByReferenceId.set(h,d);const g=n[a];if(g?.type==="asset")g.needsCodeReference&&=c,l&&g.names.push(l),u&&g.originalFileNames.push(u);else{const{options:y}=this;n[a]={fileName:a,get name(){return Qa('Accessing the "name" property of emitted assets in the bundle is deprecated. Use the "names" property instead.',kc,!1,y),l},names:l?[l]:[],needsCodeReference:c,get originalFileName(){return Qa('Accessing the "originalFileName" property of emitted assets in the bundle is deprecated. Use the "originalFileNames" property instead.',kc,!1,y),u},originalFileNames:u?[u]:[],source:r,type:"asset"}}}finalizeAssetsWithSameSource(t,r,{bundle:n,fileNamesBySourceHash:i,outputOptions:s}){const{names:o,originalFileNames:a}=function(d){const g=[],y=[];for(const{name:f,originalFileName:p}of d)typeof f=="string"&&g.push(f),p&&y.push(p);return y.sort(),g.sort((f,p)=>f.length-p.length||(f>p?1:f===p?0:-1)),{names:g,originalFileNames:y}}(t);let l,c="",u=!0;for(const d of t){u&&=d.needsCodeReference;const g=wD(d.name,o,d.source,d.originalFileName,a,r,s,n,this.options);(!c||g.length{o!=null&&r(oe,{code:"INVALID_LOG_POSITION",message:`Plugin "${n}" tried to add a file position to a log or warning. This is only supported in the "transform" hook at the moment and will be ignored.`}),(s=Ns(s)).code&&!s.pluginCode&&(s.pluginCode=s.code),s.code=t,s.plugin=n,r(e,s)}}function eut(e,t,r,n,i,s){const{logLevel:o,onLog:a}=n;let l,c=!0;if(typeof e.cacheKey!="string"&&(e.name.startsWith(m_)||e.name.startsWith(g_)||s.has(e.name)?c=!1:s.add(e.name)),t)if(c){const d=e.cacheKey||e.name;h=t[d]||(t[d]=Object.create(null)),l={delete:g=>delete h[g],get(g){const y=h[g];if(y)return y[0]=0,y[1]},has(g){const y=h[g];return!!y&&(y[0]=0,!0)},set(g,y){h[g]=[0,y]}}}else u=e.name,l={delete:()=>hp(u),get:()=>hp(u),has:()=>hp(u),set:()=>hp(u)};else l=qct;var u,h;return{addWatchFile(d){r.watchFiles[d]=!0},cache:l,debug:Wc(cd,"PLUGIN_LOG",a,e.name,o),emitFile:i.emitFile.bind(i),error:d=>Pt(Pf(Ns(d),e.name)),getFileName:i.getFileName,getModuleIds:()=>r.modulesById.keys(),getModuleInfo:r.getModuleInfo,getWatchFiles:()=>Object.keys(r.watchFiles),info:Wc(rl,"PLUGIN_LOG",a,e.name,o),load:d=>r.moduleLoader.preloadModule(d),meta:{rollupVersion:b2,watchMode:r.watchMode},parse:c_,resolve:(d,g,{attributes:y,custom:f,isEntry:p,skipSelf:m}=Kr)=>(m??=!0,r.moduleLoader.resolveId(d,g,f,p,y||Yr,m?[{importer:g,plugin:e,source:d}]:null)),setAssetSource:i.setAssetSource,warn:Wc(oe,"PLUGIN_WARNING",a,e.name,o)}}const rut=Object.keys({buildEnd:1,buildStart:1,closeBundle:1,closeWatcher:1,load:1,moduleParsed:1,onLog:1,options:1,resolveDynamicImport:1,resolveId:1,shouldTransformCachedModule:1,transform:1,watchChange:1});class b_{constructor(t,r,n,i,s){this.graph=t,this.options=r,this.pluginCache=i,this.sortedPlugins=new Map,this.unfulfilledActions=new Set,this.fileEmitter=new tut(t,r,s&&s.fileEmitter),this.emitFile=this.fileEmitter.emitFile.bind(this.fileEmitter),this.getFileName=this.fileEmitter.getFileName.bind(this.fileEmitter),this.finaliseAssets=this.fileEmitter.finaliseAssets.bind(this.fileEmitter),this.setChunkInformation=this.fileEmitter.setChunkInformation.bind(this.fileEmitter),this.setOutputBundle=this.fileEmitter.setOutputBundle.bind(this.fileEmitter),this.plugins=[...s?s.plugins:[],...n];const o=new Set;if(this.pluginContexts=new Map(this.plugins.map(l=>[l,eut(l,i,t,r,this.fileEmitter,o)])),s)for(const l of n)for(const c of rut)c in l&&r.onLog(oe,(a=l.name,{code:"INPUT_HOOK_IN_OUTPUT_PLUGIN",message:`The "${c}" hook used by the output plugin ${a} is a build time hook and will not be run for that plugin. Either this plugin cannot be used as an output plugin, or it should have an option to configure it as an output plugin.`}));var a}createOutputPluginDriver(t){return new b_(this.graph,this.options,t,this.pluginCache,this)}getUnfulfilledHookActions(){return this.unfulfilledActions}hookFirst(t,r,n,i){return this.hookFirstAndGetPlugin(t,r,n,i).then(s=>s&&s[0])}async hookFirstAndGetPlugin(t,r,n,i){for(const s of this.getSortedPlugins(t)){if(i?.has(s))continue;const o=await this.runHook(t,r,s,n);if(o!=null)return[o,s]}return null}hookFirstSync(t,r,n){for(const i of this.getSortedPlugins(t)){const s=this.runHookSync(t,r,i,n);if(s!=null)return s}return null}async hookParallel(t,r,n){const i=[];for(const s of this.getSortedPlugins(t))s[t].sequential?(await Promise.all(i),i.length=0,await this.runHook(t,r,s,n)):i.push(this.runHook(t,r,s,n));await Promise.all(i)}hookReduceArg0(t,[r,...n],i,s){let o=Promise.resolve(r);for(const a of this.getSortedPlugins(t))o=o.then(l=>this.runHook(t,[l,...n],a,s).then(c=>i.call(this.pluginContexts.get(a),l,c,a)));return o}hookReduceArg0Sync(t,[r,...n],i,s){for(const o of this.getSortedPlugins(t)){const a=[r,...n],l=this.runHookSync(t,a,o,s);r=i.call(this.pluginContexts.get(o),r,l,o)}return r}async hookReduceValue(t,r,n,i){const s=[],o=[];for(const a of this.getSortedPlugins(t,iut))a[t].sequential?(s.push(...await Promise.all(o)),o.length=0,s.push(await this.runHook(t,n,a))):o.push(this.runHook(t,n,a));return s.push(...await Promise.all(o)),s.reduce(i,await r)}hookReduceValueSync(t,r,n,i,s){let o=r;for(const a of this.getSortedPlugins(t)){const l=this.runHookSync(t,n,a,s);o=i.call(this.pluginContexts.get(a),o,l,a)}return o}hookSeq(t,r,n){let i=Promise.resolve();for(const s of this.getSortedPlugins(t))i=i.then(()=>this.runHook(t,r,s,n));return i.then(sut)}getSortedPlugins(t,r){return ai(this.sortedPlugins,t,()=>v_(t,this.plugins,r))}runHook(t,r,n,i){const s=n[t],o=typeof s=="object"?s.handler:s;let a=this.pluginContexts.get(n);i&&(a=i(a,n));let l=null;return Promise.resolve().then(()=>{if(typeof o!="function")return o;const c=o.apply(a,r);return c?.then?(l=[n.name,t,r],this.unfulfilledActions.add(l),Promise.resolve(c).then(u=>(this.unfulfilledActions.delete(l),u))):c}).catch(c=>(l!==null&&this.unfulfilledActions.delete(l),Pt(Pf(c,n.name,{hook:t}))))}runHookSync(t,r,n,i){const s=n[t],o=typeof s=="object"?s.handler:s;let a=this.pluginContexts.get(n);i&&(a=i(a,n));try{return o.apply(a,r)}catch(l){return Pt(Pf(l,n.name,{hook:t}))}}}function v_(e,t,r=nut){const n=[],i=[],s=[];for(const o of t){const a=o[e];if(a){if(typeof a=="object"){if(r(a.handler,e,o),a.order==="pre"){n.push(o);continue}if(a.order==="post"){s.push(o);continue}}else r(a,e,o);i.push(o)}}return[...n,...i,...s]}function nut(e,t,r){typeof e!="function"&&Pt(function(n,i){return{code:LB,hook:n,message:`Error running plugin hook "${n}" for plugin "${i}", expected a function hook or an object with a "handler" function.`,plugin:i}}(t,r.name))}function iut(e,t,r){if(typeof e!="string"&&typeof e!="function")return Pt(function(n,i){return{code:LB,hook:n,message:`Error running plugin hook "${n}" for plugin "${i}", expected a string, a function hook or an object with a "handler" string or function.`,plugin:i}}(t,r.name))}function sut(){}class out{constructor(t){this.maxParallel=t,this.queue=[],this.workerCount=0}run(t){return new Promise((r,n)=>{this.queue.push({reject:n,resolve:r,task:t}),this.work()})}async work(){if(this.workerCount>=this.maxParallel)return;let t;for(this.workerCount++;t=this.queue.shift();){const{reject:r,resolve:n,task:i}=t;try{n(await i())}catch(s){r(s)}}this.workerCount--}}class aut{constructor(t,r){if(this.options=t,this.astLru=function(n){var i,s,o,a=n;function l(u,h){++i>a&&(o=s,c(1),++i),s[u]=h}function c(u){i=0,s=Object.create(null),u||(o=Object.create(null))}return c(),{clear:c,has:function(u){return s[u]!==void 0||o[u]!==void 0},get:function(u){var h=s[u];return h!==void 0?h:(h=o[u])!==void 0?(l(u,h),h):void 0},set:function(u,h){s[u]!==void 0?s[u]=h:l(u,h)}}}(5),this.cachedModules=new Map,this.deoptimizationTracker=new uu,this.entryModules=[],this.modulesById=new Map,this.needsTreeshakingPass=!1,this.newlyIncludedVariableInits=new Set,this.phase=ol.LOAD_AND_PARSE,this.scope=new zct,this.watchFiles=Object.create(null),this.watchMode=!1,this.externalModules=[],this.implicitEntryModules=[],this.modules=[],this.getModuleInfo=n=>{const i=this.modulesById.get(n);return i?i.info:null},t.cache!==!1){if(t.cache?.modules)for(const n of t.cache.modules)this.cachedModules.set(n.id,n);this.pluginCache=t.cache?.plugins||Object.create(null);for(const n in this.pluginCache){const i=this.pluginCache[n];for(const s of Object.values(i))s[0]++}}if(r){this.watchMode=!0;const n=(...s)=>this.pluginDriver.hookParallel("watchChange",s),i=()=>this.pluginDriver.hookParallel("closeWatcher",[]);r.onCurrentRun("change",n),r.onCurrentRun("close",i)}this.pluginDriver=new b_(this,t,t.plugins,this.pluginCache),this.moduleLoader=new Zct(this,this.modulesById,this.options,this.pluginDriver),this.fileOperationQueue=new out(t.maxParallelFileOps),this.pureFunctions=(({treeshake:n})=>{const i=Object.create(null);for(const s of n?n.manualPureFunctions:[]){let o=i;for(const a of s.split("."))o=o[a]||=Object.create(null);o[Xv]=!0}return i})(t)}async build(){Ir("generate module graph",2),await this.generateModuleGraph(),kr("generate module graph",2),Ir("sort and bind modules",2),this.phase=ol.ANALYSE,this.sortModules(),kr("sort and bind modules",2),Ir("mark included statements",2),this.includeStatements(),kr("mark included statements",2),this.phase=ol.GENERATE}getCache(){for(const t in this.pluginCache){const r=this.pluginCache[t];let n=!0;for(const[i,s]of Object.entries(r))s[0]>=this.options.experimentalCacheExpiry?delete r[i]:n=!1;n&&delete this.pluginCache[t]}return{modules:this.modules.map(t=>t.toJSON()),plugins:this.pluginCache}}async generateModuleGraph(){var t;if({entryModules:this.entryModules,implicitEntryModules:this.implicitEntryModules}=await this.moduleLoader.addEntryModules((t=this.options.input,Array.isArray(t)?t.map(r=>({fileName:null,id:r,implicitlyLoadedAfter:[],importer:void 0,name:null})):Object.entries(t).map(([r,n])=>({fileName:null,id:n,implicitlyLoadedAfter:[],importer:void 0,name:r}))),!0),this.entryModules.length===0)throw new Error("You must supply options.input to rollup");for(const r of this.modulesById.values())r.cacheInfoGetters(),r instanceof br?this.modules.push(r):this.externalModules.push(r)}includeStatements(){const t=[...this.entryModules,...this.implicitEntryModules];for(const r of t)Dc(r);if(this.options.treeshake){let r=1;this.newlyIncludedVariableInits.clear();do{Ir(`treeshaking pass ${r}`,3),this.needsTreeshakingPass=!1;for(const n of this.modules)if(n.isExecuted){n.hasTreeShakingPassStarted=!0,n.info.moduleSideEffects==="no-treeshake"?n.includeAllInBundle():n.include();for(const i of this.newlyIncludedVariableInits)this.newlyIncludedVariableInits.delete(i),i.include(Xi(),!1)}if(r===1)for(const n of t)n.preserveSignature!==!1&&(n.includeAllExports(!1),this.needsTreeshakingPass=!0);kr("treeshaking pass "+r++,3)}while(this.needsTreeshakingPass)}else for(const r of this.modules)r.includeAllInBundle();for(const r of this.externalModules)r.warnUnusedImports();for(const r of this.implicitEntryModules)for(const n of r.implicitlyLoadedAfter)n.info.isEntry||n.isIncluded()||Pt(dlt(n))}sortModules(){const{orderedModules:t,cyclePaths:r}=function(n){let i=0;const s=[],o=new Set,a=new Set,l=new Map,c=[],u=h=>{if(h instanceof br){for(const d of h.dependencies)l.has(d)?o.has(d)||s.push(Nct(d,h,l)):(l.set(d,h),u(d));for(const d of h.implicitlyLoadedBefore)a.add(d);for(const{resolution:d}of h.dynamicImports)d instanceof br&&a.add(d);c.push(h)}h.execIndex=i++,o.add(h)};for(const h of n)l.has(h)||(l.set(h,null),u(h));for(const h of a)l.has(h)||(l.set(h,null),u(h));return{cyclePaths:s,orderedModules:c}}(this.entryModules);for(const n of r)this.options.onLog(oe,ult(n));this.modules=t;for(const n of this.modules)n.bindReferences();this.warnForMissingExports()}warnForMissingExports(){for(const t of this.modules)for(const r of t.importDescriptions.values())r.name==="*"||r.module.getVariableForExportName(r.name)[0]||t.log(oe,pg(r.name,t.id,r.module.id),r.start)}}function a4(e,t){return t()}function SD(e,t,r,n){e=v_("onLog",e);const i=nl[n],s=(o,a,l=SB)=>{if(BB(a),!(nl[o]nl[d]s(d,Ns(g),new Set(l).add(c));if(("handler"in u?u.handler:u).call({debug:h(cd),error:d=>Pt(Ns(d)),info:h(rl),meta:{rollupVersion:b2,watchMode:r},warn:h(oe)},o,a)===!1)return}t(o,a)}};return s}const lut=e=>e.cache===!0?void 0:e.cache?.cache||e.cache,cut=e=>{if(e===!0)return()=>!0;if(typeof e=="function")return(r,...n)=>!r.startsWith("\0")&&e(r,...n)||!1;if(e){const r=new Set,n=[];for(const i of(t=e,Array.isArray(t)?t.filter(Boolean):t?[t]:[]))i instanceof RegExp?n.push(i):r.add(i);return(i,...s)=>r.has(i)||n.some(o=>o.test(i))}var t;return()=>!1},uut=e=>{const t=e.input;return t==null?[]:typeof t=="string"?[t]:t},hut=e=>{const t=e.jsx;if(!t)return!1;const r=y_(t,Kct,"jsx",Jp,"false, "),{factory:n,importSource:i,mode:s}=r;switch(s){case"automatic":return{factory:n||"React.createElement",importSource:i||"react",jsxImportSource:r.jsxImportSource||"react/jsx-runtime",mode:"automatic"};case"preserve":return!i||n||r.fragment||Pt(vr("jsx",Jp,"when preserving JSX and specifying an importSource, you also need to specify a factory or fragment")),{factory:n||null,fragment:r.fragment||null,importSource:i||null,mode:"preserve"};default:return s&&s!=="classic"&&Pt(vr("jsx.mode",Jp,'mode must be "automatic", "classic" or "preserve"',s)),{factory:n||"React.createElement",fragment:r.fragment||"React.Fragment",importSource:i||null,mode:"classic"}}},fut=e=>{const t=e.maxParallelFileOps;return typeof t=="number"?t<=0?1/0:t:20},dut=(e,t)=>{const r=e.moduleContext;if(typeof r=="function")return n=>r(n)??t;if(r){const n=Object.create(null);for(const[i,s]of Object.entries(r))n[rs(i)]=s;return i=>n[i]??t}return()=>t},put=e=>{if(e.treeshake===!1)return!1;const t=y_(e.treeshake,Yct,"treeshake","configuration-options/#treeshake","false, true, ");return{annotations:t.annotations!==!1,correctVarValueBeforeDeclaration:t.correctVarValueBeforeDeclaration===!0,manualPureFunctions:t.manualPureFunctions??lr,moduleSideEffects:mut(t.moduleSideEffects),propertyReadSideEffects:t.propertyReadSideEffects==="always"?"always":t.propertyReadSideEffects!==!1,tryCatchDeoptimization:t.tryCatchDeoptimization!==!1,unknownGlobalSideEffects:t.unknownGlobalSideEffects!==!1}},mut=e=>{if(typeof e=="boolean")return()=>e;if(e==="no-external")return(t,r)=>!r;if(typeof e=="function")return(t,r)=>!!t.startsWith("\0")||e(t,r)!==!1;if(Array.isArray(e)){const t=new Set(e);return r=>t.has(r)}return e&&Pt(vr("treeshake.moduleSideEffects","configuration-options/#treeshake-modulesideeffects",'please use one of false, "no-external", a function or an array')),()=>!0},gut=/[\u0000-\u001F"#$%&*+,:;<=>?[\]^`{|}\u007F]/g,yut=/^[a-z]:/i;function but(e){const t=yut.exec(e),r=t?t[0]:"";return r+e.slice(r.length).replace(gut,"_")}const vut=(e,t,r)=>{const{file:n}=e;if(typeof n=="string"){if(t)return Pt(vr("output.file",Df,'you must set "output.dir" instead of "output.file" when using the "output.preserveModules" option'));if(!Array.isArray(r.input))return Pt(vr("output.file",Df,'you must set "output.dir" instead of "output.file" when providing named inputs'))}return n},wut=e=>{const t=e.format;switch(t){case void 0:case"es":case"esm":case"module":return"es";case"cjs":case"commonjs":return"cjs";case"system":case"systemjs":return"system";case"amd":case"iife":case"umd":return t;default:return Pt(vr("output.format",IB,'Valid values are "amd", "cjs", "system", "es", "iife" or "umd"',t))}},xut=(e,t)=>{const r=e.inlineDynamicImports||!1,{input:n}=t;return r&&(Array.isArray(n)?n:Object.keys(n)).length>1?Pt(vr("output.inlineDynamicImports",$B,'multiple inputs are not supported when "output.inlineDynamicImports" is true')):r},_ut=(e,t,r)=>{const n=e.preserveModules||!1;if(n){if(t)return Pt(vr("output.inlineDynamicImports",$B,'this option is not supported for "output.preserveModules"'));if(r.preserveEntrySignatures===!1)return Pt(vr("preserveEntrySignatures","configuration-options/#preserveentrysignatures",'setting this option to false is not supported for "output.preserveModules"'))}return n},Sut=e=>{const{preserveModulesRoot:t}=e;if(t!=null)return rs(t)},Eut=e=>{const t={autoId:!1,basePath:"",define:"define",forceJsExtensionForImports:!1,...e.amd};return(t.autoId||t.basePath)&&t.id?Pt(vr("output.amd.id",OB,'this option cannot be used together with "output.amd.autoId"/"output.amd.basePath"')):t.basePath&&!t.autoId?Pt(vr("output.amd.basePath","configuration-options/#output-amd-basepath",'this option only works with "output.amd.autoId"')):t.autoId?{autoId:!0,basePath:t.basePath,define:t.define,forceJsExtensionForImports:t.forceJsExtensionForImports}:{autoId:!1,define:t.define,forceJsExtensionForImports:t.forceJsExtensionForImports,id:t.id}},fp=(e,t)=>{const r=e[t];return typeof r=="function"?r:()=>r||""},Cut=(e,t)=>{const{dir:r}=e;return typeof r=="string"&&typeof t=="string"?Pt(vr("output.dir",Df,'you must set either "output.file" for a single-file build or "output.dir" when generating multiple chunks')):r},Aut=(e,t)=>{const r=e.entryFileNames;return r==null&&t.add("entryFileNames"),r??"[name].js"};function kut(e,t){const r=e.exports;if(r==null)t.add("exports");else if(!["default","named","none","auto"].includes(r))return Pt({code:RB,message:`"output.exports" must be "default", "named", "none", "auto", or left unspecified (defaults to "auto"), received "${r}".`,url:Dr(D2)});return r||"auto"}const Dut=(e,t)=>(e.externalImportAssertions!=null&&Qa('The "output.externalImportAssertions" option is deprecated. Use the "output.externalImportAttributes" option instead.',"configuration-options/#output-externalimportattributes",!0,t),e.externalImportAttributes??e.externalImportAssertions??!0),Tut=e=>{const t=y_(e.generatedCode,Xct,"output.generatedCode","configuration-options/#output-generatedcode","");return{arrowFunctions:t.arrowFunctions===!0,constBindings:t.constBindings===!0,objectShorthand:t.objectShorthand===!0,reservedNamesAsProps:t.reservedNamesAsProps!==!1,symbols:t.symbols===!0}},Put=(e,t)=>{if(t)return"";const r=e.indent;return r===!1?"":r??!0},ED=new Set(["compat","auto","esModule","default","defaultOnly"]),Fut=e=>{const t=e.interop;if(typeof t=="function"){const r=Object.create(null);let n=null;return i=>i===null?n||e1(n=t(i)):i in r?r[i]:e1(r[i]=t(i))}return t===void 0?()=>"default":()=>e1(t)},e1=e=>ED.has(e)?e:Pt(vr("output.interop",T2,`use one of ${Array.from(ED,t=>JSON.stringify(t)).join(", ")}`,e)),Out=(e,t,r)=>{const n=e.manualChunks;if(n){if(t)return Pt(vr("output.manualChunks",yk,'this option is not supported for "output.inlineDynamicImports"'));if(r)return Pt(vr("output.manualChunks",yk,'this option is not supported for "output.preserveModules"'))}return n||{}},Iut=(e,t,r)=>e.minifyInternalExports??(r||t==="es"||t==="system"),$ut=(e,t)=>{const r=e.sourcemapFileNames;return r==null&&t.add("sourcemapFileNames"),r},But=e=>{const{sourcemapBaseUrl:t}=e;if(t)return function(n){try{new URL(n)}catch{return!1}return!0}(t)?(r=t).endsWith("/")?r:r+"/":Pt(vr("output.sourcemapBaseUrl","configuration-options/#output-sourcemapbaseurl",`must be a valid URL, received ${JSON.stringify(t)}`));var r};function Rut(e){return async function(t,r){const{options:n,unsetOptions:i}=await async function(l,c){if(!l)throw new Error("You must supply an options object to rollup");const u=await async function(g,y){const f=v_("options",await qg(g.plugins)),p=g.logLevel||rl,m=SD(f,gD(g,p),y,p);for(const b of f){const{name:w,options:x}=b,E="handler"in x?x.handler:x,S=await E.call({debug:Wc(cd,"PLUGIN_LOG",m,w,p),error:C=>Pt(Pf(Ns(C),w,{hook:"onLog"})),info:Wc(rl,"PLUGIN_LOG",m,w,p),meta:{rollupVersion:b2,watchMode:y},warn:Wc(oe,"PLUGIN_WARNING",m,w,p)},g);S&&(g=S)}return g}(l,c),{options:h,unsetOptions:d}=await async function(g,y){const f=new Set,p=g.context??"undefined",m=await qg(g.plugins),b=g.logLevel||rl,w=SD(m,gD(g,b),y,b),x=g.strictDeprecations||!1,E=fut(g),S={cache:lut(g),context:p,experimentalCacheExpiry:g.experimentalCacheExpiry??10,experimentalLogSideEffects:g.experimentalLogSideEffects||!1,external:cut(g.external),input:uut(g),jsx:hut(g),logLevel:b,makeAbsoluteExternalsRelative:g.makeAbsoluteExternalsRelative??"ifRelativeSource",maxParallelFileOps:E,moduleContext:dut(g,p),onLog:w,perf:g.perf||!1,plugins:m,preserveEntrySignatures:g.preserveEntrySignatures??"exports-only",preserveSymlinks:g.preserveSymlinks||!1,shimMissingExports:g.shimMissingExports||!1,strictDeprecations:x,treeshake:put(g)};return o4(g,[...Object.keys(S),"onwarn","watch"],"input options",w,/^(output)$/),{options:S,unsetOptions:f}}(u,c);return l4(h.plugins,m_),{options:h,unsetOptions:d}}(t,r!==null);(function(l){l.perf?(Mf=new Map,Ir=gct,kr=yct,l.plugins=l.plugins.map(wct)):(Ir=os,kr=os)})(n),await async function(){await xR()}();const s=new aut(n,r),o=t.cache!==!1;t.cache&&(n.cache=void 0,t.cache=void 0),Ir("BUILD",1),await a4(s.pluginDriver,async()=>{try{Ir("initialize",2),await s.pluginDriver.hookParallel("buildStart",[n]),kr("initialize",2),await s.build()}catch(l){const c=Object.keys(s.watchFiles);throw c.length>0&&(l.watchFiles=c),await s.pluginDriver.hookParallel("buildEnd",[l]),await s.pluginDriver.hookParallel("closeBundle",[]),l}await s.pluginDriver.hookParallel("buildEnd",[])}),kr("BUILD",1);const a={cache:o?s.getCache():void 0,async close(){a.closed||(a.closed=!0,await s.pluginDriver.hookParallel("closeBundle",[]))},closed:!1,async[Symbol.asyncDispose](){await this.close()},generate:async l=>a.closed?Pt({code:"ALREADY_CLOSED",message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}):CD(!1,n,i,l,s),get watchFiles(){return Object.keys(s.watchFiles)},write:async l=>a.closed?Pt({code:"ALREADY_CLOSED",message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}):CD(!0,n,i,l,s)};return n.perf&&(a.getTimings=bct),a}(e,null)}function l4(e,t){for(const[r,n]of e.entries())n.name||(n.name=`${t}${r+1}`)}async function CD(e,t,r,n,i){const{options:s,outputPluginDriver:o,unsetOptions:a}=await async function(l,c,u,h){if(!l)throw new Error("You must supply an options object");const d=await qg(l.plugins);l4(d,g_);const g=c.createOutputPluginDriver(d);return{...await Nut(u,h,l,g),outputPluginDriver:g}}(n,i.pluginDriver,t,r);return a4(0,async()=>{const l=new jct(s,a,t,o,i),c=await l.generate(e);if(e){if(Ir("WRITE",1),!s.dir&&!s.file)return Pt({code:"MISSING_OPTION",message:'You must specify "output.file" or "output.dir" for the build.',url:Dr(Df)});await Promise.all(Object.values(c).map(h=>i.fileOperationQueue.run(()=>async function(d,g){const y=rs(g.dir||xl(g.file),d.fileName);return await Uct(xl(y),{recursive:!0}),Wct(y,d.type==="asset"?d.source:d.code)}(h,s)))),await o.hookParallel("writeBundle",[s,c]),kr("WRITE",1)}return u=c,{output:Object.values(u).filter(h=>Object.keys(h).length>0).sort((h,d)=>AD(h)-AD(d))};var u})}function Nut(e,t,r,n){return async function(i,s,o){const a=new Set(o),l=i.compact||!1,c=wut(i),u=xut(i,s),h=_ut(i,u,s),d=vut(i,h,s),g=Tut(i),y=Dut(i,s),f={amd:Eut(i),assetFileNames:i.assetFileNames??"assets/[name]-[hash][extname]",banner:fp(i,"banner"),chunkFileNames:i.chunkFileNames??"[name]-[hash].js",compact:l,dir:Cut(i,d),dynamicImportInCjs:i.dynamicImportInCjs??!0,entryFileNames:Aut(i,a),esModule:i.esModule??"if-default-prop",experimentalMinChunkSize:i.experimentalMinChunkSize??1,exports:kut(i,a),extend:i.extend||!1,externalImportAssertions:y,externalImportAttributes:y,externalLiveBindings:i.externalLiveBindings??!0,file:d,footer:fp(i,"footer"),format:c,freeze:i.freeze??!0,generatedCode:g,globals:i.globals||{},hashCharacters:i.hashCharacters??"base64",hoistTransitiveImports:i.hoistTransitiveImports??!0,importAttributesKey:i.importAttributesKey??"assert",indent:Put(i,l),inlineDynamicImports:u,interop:Fut(i),intro:fp(i,"intro"),manualChunks:Out(i,u,h),minifyInternalExports:Iut(i,c,l),name:i.name,noConflict:i.noConflict||!1,outro:fp(i,"outro"),paths:i.paths||{},plugins:await qg(i.plugins),preserveModules:h,preserveModulesRoot:Sut(i),reexportProtoFromExternal:i.reexportProtoFromExternal??!0,sanitizeFileName:typeof i.sanitizeFileName=="function"?i.sanitizeFileName:i.sanitizeFileName===!1?p=>p:but,sourcemap:i.sourcemap||!1,sourcemapBaseUrl:But(i),sourcemapDebugIds:i.sourcemapDebugIds||!1,sourcemapExcludeSources:i.sourcemapExcludeSources||!1,sourcemapFile:i.sourcemapFile,sourcemapFileNames:$ut(i,a),sourcemapIgnoreList:typeof i.sourcemapIgnoreList=="function"?i.sourcemapIgnoreList:i.sourcemapIgnoreList===!1?()=>!1:p=>p.includes("node_modules"),sourcemapPathTransform:i.sourcemapPathTransform,strict:i.strict??!0,systemNullSetters:i.systemNullSetters??!0,validate:i.validate||!1,virtualDirname:i.virtualDirname||"_virtual"};return o4(i,Object.keys(f),"output options",s.onLog),{options:f,unsetOptions:a}}(n.hookReduceArg0Sync("outputOptions",[r],(i,s)=>s||i,i=>{const s=()=>i.error({code:"CANNOT_EMIT_FROM_OPTIONS_HOOK",message:'Cannot emit files or set asset sources in the "outputOptions" hook, use the "renderStart" hook instead.'});return{...i,emitFile:s,setAssetSource:s}}),e,t)}var rf;function AD(e){return e.type==="asset"?rf.ASSET:e.isEntry?rf.ENTRY_CHUNK:rf.SECONDARY_CHUNK}Symbol.asyncDispose??=Symbol("Symbol.asyncDispose"),function(e){e[e.ENTRY_CHUNK=0]="ENTRY_CHUNK",e[e.SECONDARY_CHUNK=1]="SECONDARY_CHUNK",e[e.ASSET=2]="ASSET"}(rf||(rf={}));let dp;const Lut=new Uint8Array(16);function Mut(){if(!dp&&(dp=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!dp))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return dp(Lut)}const Zr=[];for(let e=0;e<256;++e)Zr.push((e+256).toString(16).slice(1));function jut(e,t=0){return Zr[e[t+0]]+Zr[e[t+1]]+Zr[e[t+2]]+Zr[e[t+3]]+"-"+Zr[e[t+4]]+Zr[e[t+5]]+"-"+Zr[e[t+6]]+Zr[e[t+7]]+"-"+Zr[e[t+8]]+Zr[e[t+9]]+"-"+Zr[e[t+10]]+Zr[e[t+11]]+Zr[e[t+12]]+Zr[e[t+13]]+Zr[e[t+14]]+Zr[e[t+15]]}const zut=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),kD={randomUUID:zut};function pp(e,t,r){if(kD.randomUUID&&!e)return kD.randomUUID();e=e||{};const n=e.random||(e.rng||Mut)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,jut(n)}var cc={exports:{}},r1={},n1,DD;function Uut(){return DD||(DD=1,n1=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"}),n1}var mp={exports:{}},TD;function Vut(){return TD||(TD=1,typeof Object.create=="function"?mp.exports=function(t,r){t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:mp.exports=function(t,r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}),mp.exports}var PD;function Wut(){return PD||(PD=1,function(e){var t={},r=/%[sdj%]/g;e.format=function(T){if(!x(T)){for(var N=[],U=0;U=W)return Z;switch(Z){case"%s":return String(J[U++]);case"%d":return Number(J[U++]);case"%j":try{return JSON.stringify(J[U++])}catch{return"[Circular]"}default:return Z}}),V=J[U];U=3&&(U.depth=arguments[2]),arguments.length>=4&&(U.colors=arguments[3]),p(N)?U.showHidden=N:N&&e._extend(U,N),S(U.showHidden)&&(U.showHidden=!1),S(U.depth)&&(U.depth=2),S(U.colors)&&(U.colors=!1),S(U.customInspect)&&(U.customInspect=!0),U.colors&&(U.stylize=o),c(U,T,U.depth)}e.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function o(T,N){var U=s.styles[N];return U?"\x1B["+s.colors[U][0]+"m"+T+"\x1B["+s.colors[U][1]+"m":T}function a(T,N){return T}function l(T){var N={};return T.forEach(function(U,J){N[U]=!0}),N}function c(T,N,U){if(T.customInspect&&N&&I(N.inspect)&&N.inspect!==e.inspect&&!(N.constructor&&N.constructor.prototype===N)){var J=N.inspect(U,T);return x(J)||(J=c(T,J,U)),J}var W=u(T,N);if(W)return W;var z=Object.keys(N),V=l(z);if(T.showHidden&&(z=Object.getOwnPropertyNames(N)),O(N)&&(z.indexOf("message")>=0||z.indexOf("description")>=0))return h(N);if(z.length===0){if(I(N)){var Z=N.name?": "+N.name:"";return T.stylize("[Function"+Z+"]","special")}if(C(N))return T.stylize(RegExp.prototype.toString.call(N),"regexp");if($(N))return T.stylize(Date.prototype.toString.call(N),"date");if(O(N))return h(N)}var nt="",et=!1,it=["{","}"];if(f(N)&&(et=!0,it=["[","]"]),I(N)){var lt=N.name?": "+N.name:"";nt=" [Function"+lt+"]"}if(C(N)&&(nt=" "+RegExp.prototype.toString.call(N)),$(N)&&(nt=" "+Date.prototype.toUTCString.call(N)),O(N)&&(nt=" "+h(N)),z.length===0&&(!et||N.length==0))return it[0]+nt+it[1];if(U<0)return C(N)?T.stylize(RegExp.prototype.toString.call(N),"regexp"):T.stylize("[Object]","special");T.seen.push(N);var ht;return et?ht=d(T,N,U,V,z):ht=z.map(function(pt){return g(T,N,U,V,pt,et)}),T.seen.pop(),y(ht,nt,it)}function u(T,N){if(S(N))return T.stylize("undefined","undefined");if(x(N)){var U="'"+JSON.stringify(N).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return T.stylize(U,"string")}if(w(N))return T.stylize(""+N,"number");if(p(N))return T.stylize(""+N,"boolean");if(m(N))return T.stylize("null","null")}function h(T){return"["+Error.prototype.toString.call(T)+"]"}function d(T,N,U,J,W){for(var z=[],V=0,Z=N.length;V-1&&(z?Z=Z.split(` `).map(function(et){return" "+et}).join(` `).substr(2):Z=` `+Z.split(` `).map(function(et){return" "+et}).join(` `))):Z=T.stylize("[Circular]","special")),S(V)){if(z&&W.match(/^\d+$/))return Z;V=JSON.stringify(""+W),V.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(V=V.substr(1,V.length-2),V=T.stylize(V,"name")):(V=V.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),V=T.stylize(V,"string"))}return V+": "+Z}function y(T,N,U){var J=T.reduce(function(W,z){return z.indexOf(` `)>=0,W+z.replace(/\u001b\[\d\d?m/g,"").length+1},0);return J>60?U[0]+(N===""?"":N+` `)+" "+T.join(`, `)+" "+U[1]:U[0]+N+" "+T.join(", ")+" "+U[1]}function f(T){return Array.isArray(T)}e.isArray=f;function p(T){return typeof T=="boolean"}e.isBoolean=p;function m(T){return T===null}e.isNull=m;function b(T){return T==null}e.isNullOrUndefined=b;function w(T){return typeof T=="number"}e.isNumber=w;function x(T){return typeof T=="string"}e.isString=x;function E(T){return typeof T=="symbol"}e.isSymbol=E;function S(T){return T===void 0}e.isUndefined=S;function C(T){return A(T)&&q(T)==="[object RegExp]"}e.isRegExp=C;function A(T){return typeof T=="object"&&T!==null}e.isObject=A;function $(T){return A(T)&&q(T)==="[object Date]"}e.isDate=$;function O(T){return A(T)&&(q(T)==="[object Error]"||T instanceof Error)}e.isError=O;function I(T){return typeof T=="function"}e.isFunction=I;function M(T){return T===null||typeof T=="boolean"||typeof T=="number"||typeof T=="string"||typeof T=="symbol"||typeof T>"u"}e.isPrimitive=M,e.isBuffer=Uut();function q(T){return Object.prototype.toString.call(T)}function H(T){return T<10?"0"+T.toString(10):T.toString(10)}var G=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Y(){var T=new Date,N=[H(T.getHours()),H(T.getMinutes()),H(T.getSeconds())].join(":");return[T.getDate(),G[T.getMonth()],N].join(" ")}e.log=function(){console.log("%s - %s",Y(),e.format.apply(e,arguments))},e.inherits=Vut(),e._extend=function(T,N){if(!N||!A(N))return T;for(var U=Object.keys(N),J=U.length;J--;)T[U[J]]=N[U[J]];return T};function F(T,N){return Object.prototype.hasOwnProperty.call(T,N)}}(r1)),r1}var FD;function qut(){if(FD)return cc.exports;FD=1;var e={},t=process.platform==="win32",r=Wut();function n(y,f){for(var p=[],m=0;m=0&&!y[m];m--);return p===0&&m===f?y:p>m?[]:y.slice(p,m+1)}var s=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,o=/^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/,a={};function l(y){var f=s.exec(y),p=(f[1]||"")+(f[2]||""),m=f[3]||"",b=o.exec(m),w=b[1],x=b[2],E=b[3];return[p,w,x,E]}function c(y){var f=s.exec(y),p=f[1]||"",m=!!p&&p[1]!==":";return{device:p,isUnc:m,isAbsolute:m||!!f[2],tail:f[3]}}function u(y){return"\\\\"+y.replace(/^[\\\/]+/,"").replace(/[\\\/]+/g,"\\")}a.resolve=function(){for(var y="",f="",p=!1,m=arguments.length-1;m>=-1;m--){var b;if(m>=0?b=arguments[m]:y?(b=e["="+y],(!b||b.substr(0,3).toLowerCase()!==y.toLowerCase()+"\\")&&(b=y+"\\")):b=process.cwd(),r.isString(b)){if(!b)continue}else throw new TypeError("Arguments to path.resolve must be strings");var w=c(b),x=w.device,E=w.isUnc,S=w.isAbsolute,C=w.tail;if(!(x&&y&&x.toLowerCase()!==y.toLowerCase())&&(y||(y=x),p||(f=C+"\\"+f,p=S),y&&p))break}return E&&(y=u(y)),f=n(f.split(/[\\\/]+/),!p).join("\\"),y+(p?"\\":"")+f||"."},a.normalize=function(y){var f=c(y),p=f.device,m=f.isUnc,b=f.isAbsolute,w=f.tail,x=/[\\\/]$/.test(w);return w=n(w.split(/[\\\/]+/),!b).join("\\"),!w&&!b&&(w="."),w&&x&&(w+="\\"),m&&(p=u(p)),p+(b?"\\":"")+w},a.isAbsolute=function(y){return c(y).isAbsolute},a.join=function(){for(var y=[],f=0;f=-1&&!f;p--){var m=p>=0?arguments[p]:process.cwd();if(r.isString(m)){if(!m)continue}else throw new TypeError("Arguments to path.resolve must be strings");y=m+"/"+y,f=m[0]==="/"}return y=n(y.split("/"),!f).join("/"),(f?"/":"")+y||"."},d.normalize=function(y){var f=d.isAbsolute(y),p=y&&y[y.length-1]==="/";return y=n(y.split("/"),!f).join("/"),!y&&!f&&(y="."),y&&p&&(y+="/"),(f?"/":"")+y},d.isAbsolute=function(y){return y.charAt(0)==="/"},d.join=function(){for(var y="",f=0;f{t.set(i1.resolve(r),e[r])}),{name:"virtual",resolveId(r,n){if(r in e)return uc+r;if(n){const i=n.startsWith(uc)?n.slice(uc.length):n,s=i1.resolve(i1.dirname(i),r);if(t.has(s))return uc+s}return null},load(r){if(r.startsWith(uc)){const n=r.slice(uc.length);return n in e?e[n]:t.get(n)}return null}}}async function s1(e,t=on){const r=pp(),n={fs:pp(),utils:pp(),enums:pp()};return globalThis[r]=L0,globalThis[n.fs]=tJ,globalThis[n.utils]=uit,globalThis[n.enums]=Xtt,(await(await Rut({input:"mod",plugins:[Hut({mod:e}),{name:"resolve-bare-esm-run",async resolveId(o){return!o.match(/^(\/|\.).+$/g)&&o!=="style-dictionary"?{id:`https://esm.run/${o}`,external:!0}:null}},{name:"sd-external",transform(o){let a=o;const l=/import (?.+?) from [',"]style-dictionary(?\/.+?)?[',"];?/;let c;for(;(c=l.exec(a))!==null;)if(c.groups){let{ids:u,entrypoint:h}=c.groups,d=u,g=u,y="";const f=(p,m)=>p.replace(c[0],"").replace(new RegExp(d,"g"),m);if(u.startsWith("{")&&u.endsWith("}")&&h){u=u.replace("{","").replace("}","").trim();const p=h.replace(/^\//,"");for(let m of u.split(",")){m=m.trim();const b=/(.+?) as (.+)/.exec(m);b&&b[2]?[,g,d]=b:g=d=m,y=`globalThis['${n[p]}']['${g}']`,a=f(a,y)}}else y=`globalThis['${r}']`,a=f(a,y)}return a}}]})).generate({format:"es"})).output[0].code}const Gut={base:"vs-dark",inherit:!0,rules:[{background:"191919",token:""},{foreground:"3c403b",token:"comment"},{foreground:"5d90cd",token:"string"},{foreground:"46a609",token:"constant.numeric"},{foreground:"39946a",token:"constant.language"},{foreground:"927c5d",token:"keyword"},{foreground:"927c5d",token:"support.constant.property-value"},{foreground:"927c5d",token:"constant.other.color"},{foreground:"366f1a",token:"keyword.other.unit"},{foreground:"a46763",token:"entity.other.attribute-name.html"},{foreground:"4b4b4b",token:"keyword.operator"},{foreground:"e92e2e",token:"storage"},{foreground:"858585",token:"entity.other.inherited-class"},{foreground:"606060",token:"entity.name.tag"},{foreground:"a165ac",token:"constant.character.entity"},{foreground:"a165ac",token:"support.class.js"},{foreground:"606060",token:"entity.other.attribute-name"},{foreground:"e92e2e",token:"meta.selector.css"},{foreground:"e92e2e",token:"entity.name.tag.css"},{foreground:"e92e2e",token:"entity.other.attribute-name.id.css"},{foreground:"e92e2e",token:"entity.other.attribute-name.class.css"},{foreground:"616161",token:"meta.property-name.css"},{foreground:"e92e2e",token:"support.function"},{foreground:"ffffff",background:"e92e2e",token:"invalid"},{foreground:"e92e2e",token:"punctuation.section.embedded"},{foreground:"606060",token:"punctuation.definition.tag"},{foreground:"a165ac",token:"constant.other.color.rgb-value.css"},{foreground:"a165ac",token:"support.constant.property-value.css"}],colors:{"editor.foreground":"#fff","editor.background":"#050608","editor.selectionBackground":"#1C2633","editor.lineHighlightBackground":"#D7D7D708","editorCursor.foreground":"#008DCB","editorWhitespace.foreground":"#BFBFBF"}},Yut={base:"vs",inherit:!0,rules:[{background:"ffffff",token:""},{foreground:"6a737d",token:"comment"},{foreground:"6a737d",token:"punctuation.definition.comment"},{foreground:"6a737d",token:"string.comment"},{foreground:"005cc5",token:"constant"},{foreground:"005cc5",token:"entity.name.constant"},{foreground:"005cc5",token:"variable.other.constant"},{foreground:"005cc5",token:"variable.language"},{foreground:"6f42c1",token:"entity"},{foreground:"6f42c1",token:"entity.name"},{foreground:"24292e",token:"variable.parameter.function"},{foreground:"22863a",token:"entity.name.tag"},{foreground:"d73a49",token:"keyword"},{foreground:"d73a49",token:"storage"},{foreground:"d73a49",token:"storage.type"},{foreground:"24292e",token:"storage.modifier.package"},{foreground:"24292e",token:"storage.modifier.import"},{foreground:"24292e",token:"storage.type.java"},{foreground:"032f62",token:"string"},{foreground:"032f62",token:"punctuation.definition.string"},{foreground:"032f62",token:"string punctuation.section.embedded source"},{foreground:"005cc5",token:"support"},{foreground:"005cc5",token:"meta.property-name"},{foreground:"e36209",token:"variable"},{foreground:"24292e",token:"variable.other"},{foreground:"b31d28",fontStyle:"bold italic underline",token:"invalid.broken"},{foreground:"b31d28",fontStyle:"bold italic underline",token:"invalid.deprecated"},{foreground:"fafbfc",background:"b31d28",fontStyle:"italic underline",token:"invalid.illegal"},{foreground:"fafbfc",background:"d73a49",fontStyle:"italic underline",token:"carriage-return"},{foreground:"b31d28",fontStyle:"bold italic underline",token:"invalid.unimplemented"},{foreground:"b31d28",token:"message.error"},{foreground:"24292e",token:"string source"},{foreground:"005cc5",token:"string variable"},{foreground:"032f62",token:"source.regexp"},{foreground:"032f62",token:"string.regexp"},{foreground:"032f62",token:"string.regexp.character-class"},{foreground:"032f62",token:"string.regexp constant.character.escape"},{foreground:"032f62",token:"string.regexp source.ruby.embedded"},{foreground:"032f62",token:"string.regexp string.regexp.arbitrary-repitition"},{foreground:"22863a",fontStyle:"bold",token:"string.regexp constant.character.escape"},{foreground:"005cc5",token:"support.constant"},{foreground:"005cc5",token:"support.variable"},{foreground:"005cc5",token:"meta.module-reference"},{foreground:"735c0f",token:"markup.list"},{foreground:"005cc5",fontStyle:"bold",token:"markup.heading"},{foreground:"005cc5",fontStyle:"bold",token:"markup.heading entity.name"},{foreground:"22863a",token:"markup.quote"},{foreground:"24292e",fontStyle:"italic",token:"markup.italic"},{foreground:"24292e",fontStyle:"bold",token:"markup.bold"},{foreground:"005cc5",token:"markup.raw"},{foreground:"b31d28",background:"ffeef0",token:"markup.deleted"},{foreground:"b31d28",background:"ffeef0",token:"meta.diff.header.from-file"},{foreground:"b31d28",background:"ffeef0",token:"punctuation.definition.deleted"},{foreground:"22863a",background:"f0fff4",token:"markup.inserted"},{foreground:"22863a",background:"f0fff4",token:"meta.diff.header.to-file"},{foreground:"22863a",background:"f0fff4",token:"punctuation.definition.inserted"},{foreground:"e36209",background:"ffebda",token:"markup.changed"},{foreground:"e36209",background:"ffebda",token:"punctuation.definition.changed"},{foreground:"f6f8fa",background:"005cc5",token:"markup.ignored"},{foreground:"f6f8fa",background:"005cc5",token:"markup.untracked"},{foreground:"6f42c1",fontStyle:"bold",token:"meta.diff.range"},{foreground:"005cc5",token:"meta.diff.header"},{foreground:"005cc5",fontStyle:"bold",token:"meta.separator"},{foreground:"005cc5",token:"meta.output"},{foreground:"586069",token:"brackethighlighter.tag"},{foreground:"586069",token:"brackethighlighter.curly"},{foreground:"586069",token:"brackethighlighter.round"},{foreground:"586069",token:"brackethighlighter.square"},{foreground:"586069",token:"brackethighlighter.angle"},{foreground:"586069",token:"brackethighlighter.quote"},{foreground:"b31d28",token:"brackethighlighter.unmatched"},{foreground:"b31d28",token:"sublimelinter.mark.error"},{foreground:"e36209",token:"sublimelinter.mark.warning"},{foreground:"959da5",token:"sublimelinter.gutter-mark"},{foreground:"032f62",fontStyle:"underline",token:"constant.other.reference.link"},{foreground:"032f62",fontStyle:"underline",token:"string.other.link"}],colors:{"editor.foreground":"#24292e","editor.background":"#ffffff","editor.selectionBackground":"#c8c8fa","editor.inactiveSelectionBackground":"#fafbfc","editor.lineHighlightBackground":"#fafbfc","editorCursor.foreground":"#24292e","editorWhitespace.foreground":"#959da5","editorIndentGuide.background":"#959da5","editorIndentGuide.activeBackground":"#24292e","editor.selectionHighlightBorder":"#fafbfc"}};let al,gp=!1;const jf=[];function Kut(){let e=jf.shift();for(;e;)window.clearTimeout(e.timeout),e.resolve(),e=jf.shift()}function Xut(e){let t=jf.shift();for(;t;)window.clearTimeout(t.timeout),t.reject(e),t=jf.shift()}function c4(e="https://cdn.jsdelivr.net/npm/monaco-editor@0.29.1/min"){return new Promise((t,r)=>{if(al){t(null);return}const n={paths:{vs:e+"/vs",vs_dev:e.replace(/\/min$/,"/dev")+"/vs"}},i=`${n.paths.vs}/loader.js`,s=setTimeout(()=>{r(new Error("Couldn't load monaco editor after 60s"))},6e4);if(jf.push({resolve:()=>{gp&&(window.require.config(n),gp=!1),window.MonacoEnvironment={getWorkerUrl(){return`data:text/javascript;charset=utf-8,${encodeURIComponent(` self.MonacoEnvironment = { baseUrl: '${e}' }; importScripts('${e}/vs/base/worker/workerMain.js');`)}`}},window.require(["vs/editor/editor.main"],()=>{al=window.monaco,t(null)})},timeout:s,reject:r}),!gp){const o=window.document.createElement("script");o.type="text/javascript",o.src=i,o.addEventListener("load",Kut),o.addEventListener("error",Xut),window.document.body.appendChild(o),gp=!0}})}async function Jut(e){await c4(),al.editor.defineTheme("my-light-theme",Yut),al.editor.defineTheme("my-dark-theme",Gut);const t=al.editor.create(e,{theme:"my-dark-theme"}),r=()=>{t.layout({width:Math.min(800,e.getBoundingClientRect().width),height:400})};return r(),window.addEventListener("resize",r),t}async function Zut(e,t){await c4(),al.editor.setModelLanguage(t.getModel(),e)}var Qut=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239],u4=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],tht="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",h4="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟍꟐꟑꟓꟕ-Ƛꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",o1={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},a1="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",eht={5:a1,"5module":a1+" export import",6:a1+" const class extends export import super"},rht=/^in(stanceof)?$/,nht=new RegExp("["+h4+"]"),iht=new RegExp("["+h4+tht+"]");function fw(e,t){for(var r=65536,n=0;ne)return!1;if(r+=t[n+1],r>=e)return!0}return!1}function Eo(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&nht.test(String.fromCharCode(e)):t===!1?!1:fw(e,u4)}function mu(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&iht.test(String.fromCharCode(e)):t===!1?!1:fw(e,u4)||fw(e,Qut)}var je=function(t,r){r===void 0&&(r={}),this.label=t,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop||null,this.updateContext=null};function wi(e,t){return new je(e,{beforeExpr:!0,binop:t})}var xi={beforeExpr:!0},Ln={startsExpr:!0},w_={};function Pe(e,t){return t===void 0&&(t={}),t.keyword=e,w_[e]=new je(e,t)}var Q={num:new je("num",Ln),regexp:new je("regexp",Ln),string:new je("string",Ln),name:new je("name",Ln),privateId:new je("privateId",Ln),eof:new je("eof"),bracketL:new je("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new je("]"),braceL:new je("{",{beforeExpr:!0,startsExpr:!0}),braceR:new je("}"),parenL:new je("(",{beforeExpr:!0,startsExpr:!0}),parenR:new je(")"),comma:new je(",",xi),semi:new je(";",xi),colon:new je(":",xi),dot:new je("."),question:new je("?",xi),questionDot:new je("?."),arrow:new je("=>",xi),template:new je("template"),invalidTemplate:new je("invalidTemplate"),ellipsis:new je("...",xi),backQuote:new je("`",Ln),dollarBraceL:new je("${",{beforeExpr:!0,startsExpr:!0}),eq:new je("=",{beforeExpr:!0,isAssign:!0}),assign:new je("_=",{beforeExpr:!0,isAssign:!0}),incDec:new je("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new je("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:wi("||",1),logicalAND:wi("&&",2),bitwiseOR:wi("|",3),bitwiseXOR:wi("^",4),bitwiseAND:wi("&",5),equality:wi("==/!=/===/!==",6),relational:wi("/<=/>=",7),bitShift:wi("<>/>>>",8),plusMin:new je("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:wi("%",10),star:wi("*",10),slash:wi("/",10),starstar:new je("**",{beforeExpr:!0}),coalesce:wi("??",1),_break:Pe("break"),_case:Pe("case",xi),_catch:Pe("catch"),_continue:Pe("continue"),_debugger:Pe("debugger"),_default:Pe("default",xi),_do:Pe("do",{isLoop:!0,beforeExpr:!0}),_else:Pe("else",xi),_finally:Pe("finally"),_for:Pe("for",{isLoop:!0}),_function:Pe("function",Ln),_if:Pe("if"),_return:Pe("return",xi),_switch:Pe("switch"),_throw:Pe("throw",xi),_try:Pe("try"),_var:Pe("var"),_const:Pe("const"),_while:Pe("while",{isLoop:!0}),_with:Pe("with"),_new:Pe("new",{beforeExpr:!0,startsExpr:!0}),_this:Pe("this",Ln),_super:Pe("super",Ln),_class:Pe("class",Ln),_extends:Pe("extends",xi),_export:Pe("export"),_import:Pe("import",Ln),_null:Pe("null",Ln),_true:Pe("true",Ln),_false:Pe("false",Ln),_in:Pe("in",{beforeExpr:!0,binop:7}),_instanceof:Pe("instanceof",{beforeExpr:!0,binop:7}),_typeof:Pe("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:Pe("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:Pe("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},Ii=/\r\n?|\n|\u2028|\u2029/,sht=new RegExp(Ii.source,"g");function Ou(e){return e===10||e===13||e===8232||e===8233}function f4(e,t,r){r===void 0&&(r=e.length);for(var n=t;n>10)+55296,(e&1023)+56320))}var lht=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,zf=function(t,r){this.line=t,this.column=r};zf.prototype.offset=function(t){return new zf(this.line,this.column+t)};var dy=function(t,r,n){this.start=r,this.end=n,t.sourceFile!==null&&(this.source=t.sourceFile)};function m4(e,t){for(var r=1,n=0;;){var i=f4(e,n,t);if(i<0)return new zf(r,t-n);++r,n=i}}var dw={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},$D=!1;function cht(e){var t={};for(var r in dw)t[r]=e&&Iu(e,r)?e[r]:dw[r];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!$D&&typeof console=="object"&&console.warn&&($D=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required. Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),OD(t.onToken)){var n=t.onToken;t.onToken=function(i){return n.push(i)}}return OD(t.onComment)&&(t.onComment=uht(t,t.onComment)),t}function uht(e,t){return function(r,n,i,s,o,a){var l={type:r?"Block":"Line",value:n,start:i,end:s};e.locations&&(l.loc=new dy(this,o,a)),e.ranges&&(l.range=[i,s]),t.push(l)}}var Uf=1,$u=2,x_=4,g4=8,__=16,y4=32,py=64,b4=128,zl=256,gd=512,my=Uf|$u|zl;function S_(e,t){return $u|(e?x_:0)|(t?g4:0)}var Hg=0,E_=1,Oo=2,v4=3,w4=4,x4=5,Mr=function(t,r,n){this.options=t=cht(t),this.sourceFile=t.sourceFile,this.keywords=Jo(eht[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var i="";t.allowReserved!==!0&&(i=o1[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(i+=" await")),this.reservedWords=Jo(i);var s=(i?i+" ":"")+o1.strict;this.reservedWordsStrict=Jo(s),this.reservedWordsStrictBind=Jo(s+" "+o1.strictBind),this.input=String(r),this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf(` `,n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(Ii).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=Q.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(Uf),this.regexpState=null,this.privateNameStack=[]},zs={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};Mr.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)};zs.inFunction.get=function(){return(this.currentVarScope().flags&$u)>0};zs.inGenerator.get=function(){return(this.currentVarScope().flags&g4)>0};zs.inAsync.get=function(){return(this.currentVarScope().flags&x_)>0};zs.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],r=t.flags;if(r&(zl|gd))return!1;if(r&$u)return(r&x_)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};zs.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&py)>0||this.options.allowSuperOutsideMethod};zs.allowDirectSuper.get=function(){return(this.currentThisScope().flags&b4)>0};zs.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};zs.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],r=t.flags;if(r&(zl|gd)||r&$u&&!(r&__))return!0}return!1};zs.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&zl)>0};Mr.extend=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];for(var n=this,i=0;i=,?^&]/.test(i)||i==="!"&&this.input.charAt(n+1)==="=")}e+=t[0].length,Ei.lastIndex=e,e+=Ei.exec(this.input)[0].length,this.input[e]===";"&&e++}};Fn.eat=function(e){return this.type===e?(this.next(),!0):!1};Fn.isContextual=function(e){return this.type===Q.name&&this.value===e&&!this.containsEsc};Fn.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};Fn.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};Fn.canInsertSemicolon=function(){return this.type===Q.eof||this.type===Q.braceR||Ii.test(this.input.slice(this.lastTokEnd,this.start))};Fn.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};Fn.semicolon=function(){!this.eat(Q.semi)&&!this.insertSemicolon()&&this.unexpected()};Fn.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};Fn.expect=function(e){this.eat(e)||this.unexpected()};Fn.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var gy=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Fn.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var r=t?e.parenthesizedAssign:e.parenthesizedBind;r>-1&&this.raiseRecoverable(r,t?"Assigning to rvalue":"Parenthesized pattern")}};Fn.checkExpressionErrors=function(e,t){if(!e)return!1;var r=e.shorthandAssign,n=e.doubleProto;if(!t)return r>=0||n>=0;r>=0&&this.raise(r,"Shorthand property assignments are valid only in destructuring patterns"),n>=0&&this.raiseRecoverable(n,"Redefinition of __proto__ property")};Fn.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos55295&&n<56320)return!0;if(Eo(n,!0)){for(var i=r+1;mu(n=this.input.charCodeAt(i),!0);)++i;if(n===92||n>55295&&n<56320)return!0;var s=this.input.slice(r,i);if(!rht.test(s))return!0}return!1};Xt.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;Ei.lastIndex=this.pos;var e=Ei.exec(this.input),t=this.pos+e[0].length,r;return!Ii.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(mu(r=this.input.charCodeAt(t+8))||r>55295&&r<56320))};Xt.parseStatement=function(e,t,r){var n=this.type,i=this.startNode(),s;switch(this.isLet(e)&&(n=Q._var,s="let"),n){case Q._break:case Q._continue:return this.parseBreakContinueStatement(i,n.keyword);case Q._debugger:return this.parseDebuggerStatement(i);case Q._do:return this.parseDoStatement(i);case Q._for:return this.parseForStatement(i);case Q._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(i,!1,!e);case Q._class:return e&&this.unexpected(),this.parseClass(i,!0);case Q._if:return this.parseIfStatement(i);case Q._return:return this.parseReturnStatement(i);case Q._switch:return this.parseSwitchStatement(i);case Q._throw:return this.parseThrowStatement(i);case Q._try:return this.parseTryStatement(i);case Q._const:case Q._var:return s=s||this.value,e&&s!=="var"&&this.unexpected(),this.parseVarStatement(i,s);case Q._while:return this.parseWhileStatement(i);case Q._with:return this.parseWithStatement(i);case Q.braceL:return this.parseBlock(!0,i);case Q.semi:return this.parseEmptyStatement(i);case Q._export:case Q._import:if(this.options.ecmaVersion>10&&n===Q._import){Ei.lastIndex=this.pos;var o=Ei.exec(this.input),a=this.pos+o[0].length,l=this.input.charCodeAt(a);if(l===40||l===46)return this.parseExpressionStatement(i,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),n===Q._import?this.parseImport(i):this.parseExport(i,r);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(i,!0,!e);var c=this.value,u=this.parseExpression();return n===Q.name&&u.type==="Identifier"&&this.eat(Q.colon)?this.parseLabeledStatement(i,c,u,e):this.parseExpressionStatement(i,u)}};Xt.parseBreakContinueStatement=function(e,t){var r=t==="break";this.next(),this.eat(Q.semi)||this.insertSemicolon()?e.label=null:this.type!==Q.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var n=0;n=6?this.eat(Q.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")};Xt.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(C_),this.enterScope(0),this.expect(Q.parenL),this.type===Q.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var r=this.isLet();if(this.type===Q._var||this.type===Q._const||r){var n=this.startNode(),i=r?"let":this.value;return this.next(),this.parseVar(n,!0,i),this.finishNode(n,"VariableDeclaration"),(this.type===Q._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&n.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===Q._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,n)):(t>-1&&this.unexpected(t),this.parseFor(e,n))}var s=this.isContextual("let"),o=!1,a=this.containsEsc,l=new gy,c=this.start,u=t>-1?this.parseExprSubscripts(l,"await"):this.parseExpression(!0,l);return this.type===Q._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))?(t>-1?(this.type===Q._in&&this.unexpected(t),e.await=!0):o&&this.options.ecmaVersion>=8&&(u.start===c&&!a&&u.type==="Identifier"&&u.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(e.await=!1)),s&&o&&this.raise(u.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(u,!1,l),this.checkLValPattern(u),this.parseForIn(e,u)):(this.checkExpressionErrors(l,!0),t>-1&&this.unexpected(t),this.parseFor(e,u))};Xt.parseFunctionStatement=function(e,t,r){return this.next(),this.parseFunction(e,nf|(r?0:pw),!1,t)};Xt.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(Q._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};Xt.parseReturnStatement=function(e){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(Q.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")};Xt.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(Q.braceL),this.labels.push(fht),this.enterScope(0);for(var t,r=!1;this.type!==Q.braceR;)if(this.type===Q._case||this.type===Q._default){var n=this.type===Q._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),n?t.test=this.parseExpression():(r&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),r=!0,t.test=null),this.expect(Q.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};Xt.parseThrowStatement=function(e){return this.next(),Ii.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var dht=[];Xt.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?y4:0),this.checkLValPattern(e,t?w4:Oo),this.expect(Q.parenR),e};Xt.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===Q._catch){var t=this.startNode();this.next(),this.eat(Q.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(Q._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")};Xt.parseVarStatement=function(e,t,r){return this.next(),this.parseVar(e,!1,t,r),this.semicolon(),this.finishNode(e,"VariableDeclaration")};Xt.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(C_),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};Xt.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};Xt.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};Xt.parseLabeledStatement=function(e,t,r,n){for(var i=0,s=this.labels;i=0;l--){var c=this.labels[l];if(c.statementStart===e.start)c.statementStart=this.start,c.kind=a;else break}return this.labels.push({name:t,kind:a,statementStart:this.start}),e.body=this.parseStatement(n?n.indexOf("label")===-1?n+"label":n:"label"),this.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")};Xt.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};Xt.parseBlock=function(e,t,r){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(Q.braceL),e&&this.enterScope(0);this.type!==Q.braceR;){var n=this.parseStatement(null);t.body.push(n)}return r&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")};Xt.parseFor=function(e,t){return e.init=t,this.expect(Q.semi),e.test=this.type===Q.semi?null:this.parseExpression(),this.expect(Q.semi),e.update=this.type===Q.parenR?null:this.parseExpression(),this.expect(Q.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};Xt.parseForIn=function(e,t){var r=this.type===Q._in;return this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!r||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(t.start,(r?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=r?this.parseExpression():this.parseMaybeAssign(),this.expect(Q.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,r?"ForInStatement":"ForOfStatement")};Xt.parseVar=function(e,t,r,n){for(e.declarations=[],e.kind=r;;){var i=this.startNode();if(this.parseVarId(i,r),this.eat(Q.eq)?i.init=this.parseMaybeAssign(t):!n&&r==="const"&&!(this.type===Q._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!n&&i.id.type!=="Identifier"&&!(t&&(this.type===Q._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):i.init=null,e.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(Q.comma))break}return e};Xt.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?E_:Oo,!1)};var nf=1,pw=2,_4=4;Xt.parseFunction=function(e,t,r,n,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!n)&&(this.type===Q.star&&t&pw&&this.unexpected(),e.generator=this.eat(Q.star)),this.options.ecmaVersion>=8&&(e.async=!!n),t&nf&&(e.id=t&_4&&this.type!==Q.name?null:this.parseIdent(),e.id&&!(t&pw)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?E_:Oo:v4));var s=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(S_(e.async,e.generator)),t&nf||(e.id=this.type===Q.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,r,!1,i),this.yieldPos=s,this.awaitPos=o,this.awaitIdentPos=a,this.finishNode(e,t&nf?"FunctionDeclaration":"FunctionExpression")};Xt.parseFunctionParams=function(e){this.expect(Q.parenL),e.params=this.parseBindingList(Q.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};Xt.parseClass=function(e,t){this.next();var r=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var n=this.enterClassBody(),i=this.startNode(),s=!1;for(i.body=[],this.expect(Q.braceL);this.type!==Q.braceR;){var o=this.parseClassElement(e.superClass!==null);o&&(i.body.push(o),o.type==="MethodDefinition"&&o.kind==="constructor"?(s&&this.raiseRecoverable(o.start,"Duplicate constructor in the same class"),s=!0):o.key&&o.key.type==="PrivateIdentifier"&&pht(n,o)&&this.raiseRecoverable(o.key.start,"Identifier '#"+o.key.name+"' has already been declared"))}return this.strict=r,this.next(),e.body=this.finishNode(i,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};Xt.parseClassElement=function(e){if(this.eat(Q.semi))return null;var t=this.options.ecmaVersion,r=this.startNode(),n="",i=!1,s=!1,o="method",a=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(Q.braceL))return this.parseClassStaticBlock(r),r;this.isClassElementNameStart()||this.type===Q.star?a=!0:n="static"}if(r.static=a,!n&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===Q.star)&&!this.canInsertSemicolon()?s=!0:n="async"),!n&&(t>=9||!s)&&this.eat(Q.star)&&(i=!0),!n&&!s&&!i){var l=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?o=l:n=l)}if(n?(r.computed=!1,r.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),r.key.name=n,this.finishNode(r.key,"Identifier")):this.parseClassElementName(r),t<13||this.type===Q.parenL||o!=="method"||i||s){var c=!r.static&&Gg(r,"constructor"),u=c&&e;c&&o!=="method"&&this.raise(r.key.start,"Constructor can't have get/set modifier"),r.kind=c?"constructor":o,this.parseClassMethod(r,i,s,u)}else this.parseClassField(r);return r};Xt.isClassElementNameStart=function(){return this.type===Q.name||this.type===Q.privateId||this.type===Q.num||this.type===Q.string||this.type===Q.bracketL||this.type.keyword};Xt.parseClassElementName=function(e){this.type===Q.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)};Xt.parseClassMethod=function(e,t,r,n){var i=e.key;e.kind==="constructor"?(t&&this.raise(i.start,"Constructor can't be a generator"),r&&this.raise(i.start,"Constructor can't be an async method")):e.static&&Gg(e,"prototype")&&this.raise(i.start,"Classes may not have a static property named prototype");var s=e.value=this.parseMethod(t,r,n);return e.kind==="get"&&s.params.length!==0&&this.raiseRecoverable(s.start,"getter should have no params"),e.kind==="set"&&s.params.length!==1&&this.raiseRecoverable(s.start,"setter should have exactly one param"),e.kind==="set"&&s.params[0].type==="RestElement"&&this.raiseRecoverable(s.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")};Xt.parseClassField=function(e){return Gg(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&Gg(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(Q.eq)?(this.enterScope(gd|py),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,"PropertyDefinition")};Xt.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(zl|py);this.type!==Q.braceR;){var r=this.parseStatement(null);e.body.push(r)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};Xt.parseClassId=function(e,t){this.type===Q.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,Oo,!1)):(t===!0&&this.unexpected(),e.id=null)};Xt.parseClassSuper=function(e){e.superClass=this.eat(Q._extends)?this.parseExprSubscripts(null,!1):null};Xt.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};Xt.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,r=e.used;if(this.options.checkPrivateFields)for(var n=this.privateNameStack.length,i=n===0?null:this.privateNameStack[n-1],s=0;s=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==Q.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};Xt.parseExport=function(e,t){if(this.next(),this.eat(Q.star))return this.parseExportAllDeclaration(e,t);if(this.eat(Q._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[]);else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==Q.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var r=0,n=e.specifiers;r=16&&(e.attributes=[])}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")};Xt.parseExportDeclaration=function(e){return this.parseStatement(null)};Xt.parseExportDefaultDeclaration=function(){var e;if(this.type===Q._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,nf|_4,!1,e)}else if(this.type===Q._class){var r=this.startNode();return this.parseClass(r,"nullableID")}else{var n=this.parseMaybeAssign();return this.semicolon(),n}};Xt.checkExport=function(e,t,r){e&&(typeof t!="string"&&(t=t.type==="Identifier"?t.name:t.value),Iu(e,t)&&this.raiseRecoverable(r,"Duplicate export '"+t+"'"),e[t]=!0)};Xt.checkPatternExport=function(e,t){var r=t.type;if(r==="Identifier")this.checkExport(e,t,t.start);else if(r==="ObjectPattern")for(var n=0,i=t.properties;n=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ImportDeclaration")};Xt.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual("as")?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,Oo),this.finishNode(e,"ImportSpecifier")};Xt.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,Oo),this.finishNode(e,"ImportDefaultSpecifier")};Xt.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,Oo),this.finishNode(e,"ImportNamespaceSpecifier")};Xt.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===Q.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(Q.comma)))return e;if(this.type===Q.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(Q.braceL);!this.eat(Q.braceR);){if(t)t=!1;else if(this.expect(Q.comma),this.afterTrailingComma(Q.braceR))break;e.push(this.parseImportSpecifier())}return e};Xt.parseWithClause=function(){var e=[];if(!this.eat(Q._with))return e;this.expect(Q.braceL);for(var t={},r=!0;!this.eat(Q.braceR);){if(r)r=!1;else if(this.expect(Q.comma),this.afterTrailingComma(Q.braceR))break;var n=this.parseImportAttribute(),i=n.key.type==="Identifier"?n.key.name:n.key.value;Iu(t,i)&&this.raiseRecoverable(n.key.start,"Duplicate attribute key '"+i+"'"),t[i]=!0,e.push(n)}return e};Xt.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===Q.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(Q.colon),this.type!==Q.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")};Xt.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===Q.string){var e=this.parseLiteral(this.value);return lht.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)};Xt.adaptDirectivePrologue=function(e){for(var t=0;t=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var $i=Mr.prototype;$i.toAssignable=function(e,t,r){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",r&&this.checkPatternErrors(r,!0);for(var n=0,i=e.properties;n=8&&!a&&l.name==="async"&&!this.canInsertSemicolon()&&this.eat(Q._function))return this.overrideContext(mr.f_expr),this.parseFunction(this.startNodeAt(s,o),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(Q.arrow))return this.parseArrowExpression(this.startNodeAt(s,o),[l],!1,t);if(this.options.ecmaVersion>=8&&l.name==="async"&&this.type===Q.name&&!a&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return l=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(Q.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(s,o),[l],!0,t)}return l;case Q.regexp:var c=this.value;return n=this.parseLiteral(c.value),n.regex={pattern:c.pattern,flags:c.flags},n;case Q.num:case Q.string:return this.parseLiteral(this.value);case Q._null:case Q._true:case Q._false:return n=this.startNode(),n.value=this.type===Q._null?null:this.type===Q._true,n.raw=this.type.keyword,this.next(),this.finishNode(n,"Literal");case Q.parenL:var u=this.start,h=this.parseParenAndDistinguishExpression(i,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(h)&&(e.parenthesizedAssign=u),e.parenthesizedBind<0&&(e.parenthesizedBind=u)),h;case Q.bracketL:return n=this.startNode(),this.next(),n.elements=this.parseExprList(Q.bracketR,!0,!0,e),this.finishNode(n,"ArrayExpression");case Q.braceL:return this.overrideContext(mr.b_expr),this.parseObj(!1,e);case Q._function:return n=this.startNode(),this.next(),this.parseFunction(n,0);case Q._class:return this.parseClass(this.startNode(),!1);case Q._new:return this.parseNew();case Q.backQuote:return this.parseTemplate();case Q._import:return this.options.ecmaVersion>=11?this.parseExprImport(r):this.unexpected();default:return this.parseExprAtomDefault()}};de.parseExprAtomDefault=function(){this.unexpected()};de.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===Q.parenL&&!e)return this.parseDynamicImport(t);if(this.type===Q.dot){var r=this.startNodeAt(t.start,t.loc&&t.loc.start);return r.name="import",t.meta=this.finishNode(r,"Identifier"),this.parseImportMeta(t)}else this.unexpected()};de.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(Q.parenR)?e.options=null:(this.expect(Q.comma),this.afterTrailingComma(Q.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(Q.parenR)||(this.expect(Q.comma),this.afterTrailingComma(Q.parenR)||this.unexpected())));else if(!this.eat(Q.parenR)){var t=this.start;this.eat(Q.comma)&&this.eat(Q.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")};de.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")};de.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")};de.parseParenExpression=function(){this.expect(Q.parenL);var e=this.parseExpression();return this.expect(Q.parenR),e};de.shouldParseArrow=function(e){return!this.canInsertSemicolon()};de.parseParenAndDistinguishExpression=function(e,t){var r=this.start,n=this.startLoc,i,s=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o=this.start,a=this.startLoc,l=[],c=!0,u=!1,h=new gy,d=this.yieldPos,g=this.awaitPos,y;for(this.yieldPos=0,this.awaitPos=0;this.type!==Q.parenR;)if(c?c=!1:this.expect(Q.comma),s&&this.afterTrailingComma(Q.parenR,!0)){u=!0;break}else if(this.type===Q.ellipsis){y=this.start,l.push(this.parseParenItem(this.parseRestBinding())),this.type===Q.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else l.push(this.parseMaybeAssign(!1,h,this.parseParenItem));var f=this.lastTokEnd,p=this.lastTokEndLoc;if(this.expect(Q.parenR),e&&this.shouldParseArrow(l)&&this.eat(Q.arrow))return this.checkPatternErrors(h,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=d,this.awaitPos=g,this.parseParenArrowList(r,n,l,t);(!l.length||u)&&this.unexpected(this.lastTokStart),y&&this.unexpected(y),this.checkExpressionErrors(h,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=g||this.awaitPos,l.length>1?(i=this.startNodeAt(o,a),i.expressions=l,this.finishNodeAt(i,"SequenceExpression",f,p)):i=l[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var m=this.startNodeAt(r,n);return m.expression=i,this.finishNode(m,"ParenthesizedExpression")}else return i};de.parseParenItem=function(e){return e};de.parseParenArrowList=function(e,t,r,n){return this.parseArrowExpression(this.startNodeAt(e,t),r,!1,n)};var mht=[];de.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===Q.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var r=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),r&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var n=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),n,i,!0,!1),this.eat(Q.parenL)?e.arguments=this.parseExprList(Q.parenR,this.options.ecmaVersion>=8,!1):e.arguments=mht,this.finishNode(e,"NewExpression")};de.parseTemplateElement=function(e){var t=e.isTagged,r=this.startNode();return this.type===Q.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),r.value={raw:this.value.replace(/\r\n?/g,` `),cooked:null}):r.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,` `),cooked:this.value},this.next(),r.tail=this.type===Q.backQuote,this.finishNode(r,"TemplateElement")};de.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var r=this.startNode();this.next(),r.expressions=[];var n=this.parseTemplateElement({isTagged:t});for(r.quasis=[n];!n.tail;)this.type===Q.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(Q.dollarBraceL),r.expressions.push(this.parseExpression()),this.expect(Q.braceR),r.quasis.push(n=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(r,"TemplateLiteral")};de.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===Q.name||this.type===Q.num||this.type===Q.string||this.type===Q.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===Q.star)&&!Ii.test(this.input.slice(this.lastTokEnd,this.start))};de.parseObj=function(e,t){var r=this.startNode(),n=!0,i={};for(r.properties=[],this.next();!this.eat(Q.braceR);){if(n)n=!1;else if(this.expect(Q.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(Q.braceR))break;var s=this.parseProperty(e,t);e||this.checkPropClash(s,i,t),r.properties.push(s)}return this.finishNode(r,e?"ObjectPattern":"ObjectExpression")};de.parseProperty=function(e,t){var r=this.startNode(),n,i,s,o;if(this.options.ecmaVersion>=9&&this.eat(Q.ellipsis))return e?(r.argument=this.parseIdent(!1),this.type===Q.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(r,"RestElement")):(r.argument=this.parseMaybeAssign(!1,t),this.type===Q.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(r,"SpreadElement"));this.options.ecmaVersion>=6&&(r.method=!1,r.shorthand=!1,(e||t)&&(s=this.start,o=this.startLoc),e||(n=this.eat(Q.star)));var a=this.containsEsc;return this.parsePropertyName(r),!e&&!a&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(r)?(i=!0,n=this.options.ecmaVersion>=9&&this.eat(Q.star),this.parsePropertyName(r)):i=!1,this.parsePropertyValue(r,e,n,i,s,o,t,a),this.finishNode(r,"Property")};de.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var r=e.kind==="get"?0:1;if(e.value.params.length!==r){var n=e.value.start;e.kind==="get"?this.raiseRecoverable(n,"getter should have no params"):this.raiseRecoverable(n,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};de.parsePropertyValue=function(e,t,r,n,i,s,o,a){(r||n)&&this.type===Q.colon&&this.unexpected(),this.eat(Q.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init"):this.options.ecmaVersion>=6&&this.type===Q.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(r,n),e.kind="init"):!t&&!a&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==Q.comma&&this.type!==Q.braceR&&this.type!==Q.eq?((r||n)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((r||n)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=i),t?e.value=this.parseMaybeDefault(i,s,this.copyNode(e.key)):this.type===Q.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,s,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind="init",e.shorthand=!0):this.unexpected()};de.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(Q.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(Q.bracketR),e.key;e.computed=!1}return e.key=this.type===Q.num||this.type===Q.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};de.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};de.parseMethod=function(e,t,r){var n=this.startNode(),i=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(n),this.options.ecmaVersion>=6&&(n.generator=e),this.options.ecmaVersion>=8&&(n.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(S_(t,n.generator)|py|(r?b4:0)),this.expect(Q.parenL),n.params=this.parseBindingList(Q.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(n,!1,!0,!1),this.yieldPos=i,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(n,"FunctionExpression")};de.parseArrowExpression=function(e,t,r,n){var i=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(S_(r,!1)|__),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!r),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,n),this.yieldPos=i,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(e,"ArrowFunctionExpression")};de.parseFunctionBody=function(e,t,r,n){var i=t&&this.type!==Q.braceL,s=this.strict,o=!1;if(i)e.body=this.parseMaybeAssign(n),e.expression=!0,this.checkParams(e,!1);else{var a=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!s||a)&&(o=this.strictDirective(this.end),o&&a&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var l=this.labels;this.labels=[],o&&(this.strict=!0),this.checkParams(e,!s&&!o&&!t&&!r&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,x4),e.body=this.parseBlock(!1,void 0,o&&!s),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=l}this.exitScope()};de.isSimpleParamList=function(e){for(var t=0,r=e;t-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&i.flags&Uf&&delete this.undefinedExports[e]}else if(t===w4){var s=this.currentScope();s.lexical.push(e)}else if(t===v4){var o=this.currentScope();this.treatFunctionsAsVar?n=o.lexical.indexOf(e)>-1:n=o.lexical.indexOf(e)>-1||o.var.indexOf(e)>-1,o.functions.push(e)}else for(var a=this.scopeStack.length-1;a>=0;--a){var l=this.scopeStack[a];if(l.lexical.indexOf(e)>-1&&!(l.flags&y4&&l.lexical[0]===e)||!this.treatFunctionsAsVarInScope(l)&&l.functions.indexOf(e)>-1){n=!0;break}if(l.var.push(e),this.inModule&&l.flags&Uf&&delete this.undefinedExports[e],l.flags&my)break}n&&this.raiseRecoverable(r,"Identifier '"+e+"' has already been declared")};_a.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)};_a.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};_a.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(my|gd|zl))return t}};_a.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(my|gd|zl)&&!(t.flags&__))return t}};var yy=function(t,r,n){this.type="",this.start=r,this.end=0,t.options.locations&&(this.loc=new dy(t,n)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[r,0])},yd=Mr.prototype;yd.startNode=function(){return new yy(this,this.start,this.startLoc)};yd.startNodeAt=function(e,t){return new yy(this,e,t)};function E4(e,t,r,n){return e.type=t,e.end=r,this.options.locations&&(e.loc.end=n),this.options.ranges&&(e.range[1]=r),e}yd.finishNode=function(e,t){return E4.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};yd.finishNodeAt=function(e,t,r,n){return E4.call(this,e,t,r,n)};yd.copyNode=function(e){var t=new yy(this,e.start,this.startLoc);for(var r in e)t[r]=e[r];return t};var yht="Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz",C4="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",A4=C4+" Extended_Pictographic",k4=A4,D4=k4+" EBase EComp EMod EPres ExtPict",T4=D4,bht=T4,vht={9:C4,10:A4,11:k4,12:D4,13:T4,14:bht},wht="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",xht={9:"",10:"",11:"",12:"",13:"",14:wht},BD="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",P4="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",F4=P4+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",O4=F4+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",I4=O4+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",$4=I4+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",_ht=$4+" "+yht,Sht={9:P4,10:F4,11:O4,12:I4,13:$4,14:_ht},B4={};function Eht(e){var t=B4[e]={binary:Jo(vht[e]+" "+BD),binaryOfStrings:Jo(xht[e]),nonBinary:{General_Category:Jo(BD),Script:Jo(Sht[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(var l1=0,RD=[9,10,11,12,13,14];l1=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=B4[t.options.ecmaVersion>=14?14:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};Us.prototype.reset=function(t,r,n){var i=n.indexOf("v")!==-1,s=n.indexOf("u")!==-1;this.start=t|0,this.source=r+"",this.flags=n,i&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=s&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=s&&this.parser.options.ecmaVersion>=9)};Us.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)};Us.prototype.at=function(t,r){r===void 0&&(r=!1);var n=this.source,i=n.length;if(t>=i)return-1;var s=n.charCodeAt(t);if(!(r||this.switchU)||s<=55295||s>=57344||t+1>=i)return s;var o=n.charCodeAt(t+1);return o>=56320&&o<=57343?(s<<10)+o-56613888:s};Us.prototype.nextIndex=function(t,r){r===void 0&&(r=!1);var n=this.source,i=n.length;if(t>=i)return i;var s=n.charCodeAt(t),o;return!(r||this.switchU)||s<=55295||s>=57344||t+1>=i||(o=n.charCodeAt(t+1))<56320||o>57343?t+1:t+2};Us.prototype.current=function(t){return t===void 0&&(t=!1),this.at(this.pos,t)};Us.prototype.lookahead=function(t){return t===void 0&&(t=!1),this.at(this.nextIndex(this.pos,t),t)};Us.prototype.advance=function(t){t===void 0&&(t=!1),this.pos=this.nextIndex(this.pos,t)};Us.prototype.eat=function(t,r){return r===void 0&&(r=!1),this.current(r)===t?(this.advance(r),!0):!1};Us.prototype.eatChars=function(t,r){r===void 0&&(r=!1);for(var n=this.pos,i=0,s=t;i-1&&this.raise(e.start,"Duplicate regular expression flag"),o==="u"&&(n=!0),o==="v"&&(i=!0)}this.options.ecmaVersion>=15&&n&&i&&this.raise(e.start,"Invalid regular expression flag")};function Aht(e){for(var t in e)return!0;return!1}Vt.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&Aht(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))};Vt.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,r=e.backReferenceNames;t=16;for(t&&(e.branchID=new Kg(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")};Vt.regexp_alternative=function(e){for(;e.pos=9&&(r=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!r,!0}return e.pos=t,!1};Vt.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1};Vt.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};Vt.regexp_eatBracedQuantifier=function(e,t){var r=e.pos;if(e.eat(123)){var n=0,i=-1;if(this.regexp_eatDecimalDigits(e)&&(n=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue),e.eat(125)))return i!==-1&&i=16){var r=this.regexp_eatModifiers(e),n=e.eat(45);if(r||n){for(var i=0;i-1&&e.raise("Duplicate regular expression modifiers")}if(n){var o=this.regexp_eatModifiers(e);!r&&!o&&e.current()===58&&e.raise("Invalid regular expression modifiers");for(var a=0;a-1||r.indexOf(l)>-1)&&e.raise("Duplicate regular expression modifiers")}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}}e.pos=t}return!1};Vt.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1};Vt.regexp_eatModifiers=function(e){for(var t="",r=0;(r=e.current())!==-1&&kht(r);)t+=Co(r),e.advance();return t};function kht(e){return e===105||e===109||e===115}Vt.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};Vt.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1};Vt.regexp_eatSyntaxCharacter=function(e){var t=e.current();return R4(t)?(e.lastIntValue=t,e.advance(),!0):!1};function R4(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}Vt.regexp_eatPatternCharacters=function(e){for(var t=e.pos,r=0;(r=e.current())!==-1&&!R4(r);)e.advance();return e.pos!==t};Vt.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124?(e.advance(),!0):!1};Vt.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise("Invalid group");var t=this.options.ecmaVersion>=16,r=e.groupNames[e.lastStringValue];if(r)if(t)for(var n=0,i=r;n=11,n=e.current(r);return e.advance(r),n===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r)&&(n=e.lastIntValue),Dht(n)?(e.lastIntValue=n,!0):(e.pos=t,!1)};function Dht(e){return Eo(e,!0)||e===36||e===95}Vt.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,r=this.options.ecmaVersion>=11,n=e.current(r);return e.advance(r),n===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r)&&(n=e.lastIntValue),Tht(n)?(e.lastIntValue=n,!0):(e.pos=t,!1)};function Tht(e){return mu(e,!0)||e===36||e===95||e===8204||e===8205}Vt.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)};Vt.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var r=e.lastIntValue;if(e.switchU)return r>e.maxBackReference&&(e.maxBackReference=r),!0;if(r<=e.numCapturingParens)return!0;e.pos=t}return!1};Vt.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1};Vt.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};Vt.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1};Vt.regexp_eatZero=function(e){return e.current()===48&&!by(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1};Vt.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),!0):t===110?(e.lastIntValue=10,e.advance(),!0):t===118?(e.lastIntValue=11,e.advance(),!0):t===102?(e.lastIntValue=12,e.advance(),!0):t===114?(e.lastIntValue=13,e.advance(),!0):!1};Vt.regexp_eatControlLetter=function(e){var t=e.current();return N4(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function N4(e){return e>=65&&e<=90||e>=97&&e<=122}Vt.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var r=e.pos,n=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var i=e.lastIntValue;if(n&&i>=55296&&i<=56319){var s=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var o=e.lastIntValue;if(o>=56320&&o<=57343)return e.lastIntValue=(i-55296)*1024+(o-56320)+65536,!0}e.pos=s,e.lastIntValue=i}return!0}if(n&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&Pht(e.lastIntValue))return!0;n&&e.raise("Invalid unicode escape"),e.pos=r}return!1};function Pht(e){return e>=0&&e<=1114111}Vt.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var t=e.current();return t!==99&&(!e.switchN||t!==107)?(e.lastIntValue=t,e.advance(),!0):!1};Vt.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var L4=0,Ao=1,Ai=2;Vt.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(Fht(t))return e.lastIntValue=-1,e.advance(),Ao;var r=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((r=t===80)||t===112)){e.lastIntValue=-1,e.advance();var n;if(e.eat(123)&&(n=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return r&&n===Ai&&e.raise("Invalid property name"),n;e.raise("Invalid property name")}return L4};function Fht(e){return e===100||e===68||e===115||e===83||e===119||e===87}Vt.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var r=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var n=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,r,n),Ao}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return L4};Vt.regexp_validateUnicodePropertyNameAndValue=function(e,t,r){Iu(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(r)||e.raise("Invalid property value")};Vt.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return Ao;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return Ai;e.raise("Invalid property name")};Vt.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";M4(t=e.current());)e.lastStringValue+=Co(t),e.advance();return e.lastStringValue!==""};function M4(e){return N4(e)||e===95}Vt.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";Oht(t=e.current());)e.lastStringValue+=Co(t),e.advance();return e.lastStringValue!==""};function Oht(e){return M4(e)||by(e)}Vt.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};Vt.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),r=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&r===Ai&&e.raise("Negated character class may contain strings"),!0}return!1};Vt.regexp_classContents=function(e){return e.current()===93?Ao:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),Ao)};Vt.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var r=e.lastIntValue;e.switchU&&(t===-1||r===-1)&&e.raise("Invalid character class"),t!==-1&&r!==-1&&t>r&&e.raise("Range out of order in character class")}}};Vt.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var r=e.current();(r===99||U4(r))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var n=e.current();return n!==93?(e.lastIntValue=n,e.advance(),!0):!1};Vt.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};Vt.regexp_classSetExpression=function(e){var t=Ao,r;if(!this.regexp_eatClassSetRange(e))if(r=this.regexp_eatClassSetOperand(e)){r===Ai&&(t=Ai);for(var n=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(r=this.regexp_eatClassSetOperand(e))){r!==Ai&&(t=Ao);continue}e.raise("Invalid character in character class")}if(n!==e.pos)return t;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(n!==e.pos)return t}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(r=this.regexp_eatClassSetOperand(e),!r)return t;r===Ai&&(t=Ai)}};Vt.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var n=e.lastIntValue;return r!==-1&&n!==-1&&r>n&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1};Vt.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?Ao:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)};Vt.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var r=e.eat(94),n=this.regexp_classContents(e);if(e.eat(93))return r&&n===Ai&&e.raise("Negated character class may contain strings"),n;e.pos=t}if(e.eat(92)){var i=this.regexp_eatCharacterClassEscape(e);if(i)return i;e.pos=t}return null};Vt.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var r=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return r}else e.raise("Invalid escape");e.pos=t}return null};Vt.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===Ai&&(t=Ai);return t};Vt.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?Ao:Ai};Vt.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1);var r=e.current();return r<0||r===e.lookahead()&&Iht(r)||$ht(r)?!1:(e.advance(),e.lastIntValue=r,!0)};function Iht(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function $ht(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}Vt.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return Bht(t)?(e.lastIntValue=t,e.advance(),!0):!1};function Bht(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}Vt.regexp_eatClassControlLetter=function(e){var t=e.current();return by(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1};Vt.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1};Vt.regexp_eatDecimalDigits=function(e){var t=e.pos,r=0;for(e.lastIntValue=0;by(r=e.current());)e.lastIntValue=10*e.lastIntValue+(r-48),e.advance();return e.pos!==t};function by(e){return e>=48&&e<=57}Vt.regexp_eatHexDigits=function(e){var t=e.pos,r=0;for(e.lastIntValue=0;j4(r=e.current());)e.lastIntValue=16*e.lastIntValue+z4(r),e.advance();return e.pos!==t};function j4(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function z4(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}Vt.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var r=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=t*64+r*8+e.lastIntValue:e.lastIntValue=t*8+r}else e.lastIntValue=t;return!0}return!1};Vt.regexp_eatOctalDigit=function(e){var t=e.current();return U4(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function U4(e){return e>=48&&e<=55}Vt.regexp_eatFixedHexDigits=function(e,t){var r=e.pos;e.lastIntValue=0;for(var n=0;n=this.input.length)return this.finishToken(Q.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())};De.readToken=function(e){return Eo(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)};De.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888};De.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,r=this.input.indexOf("*/",this.pos+=2);if(r===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=r+2,this.options.locations)for(var n=void 0,i=t;(n=f4(this.input,i,this.pos))>-1;)++this.curLine,i=this.lineStart=n;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,r),t,this.pos,e,this.curPosition())};De.skipLineComment=function(e){for(var t=this.pos,r=this.options.onComment&&this.curPosition(),n=this.input.charCodeAt(this.pos+=e);this.pos8&&e<14||e>=5760&&d4.test(String.fromCharCode(e)))++this.pos;else break t}}};De.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var r=this.type;this.type=e,this.value=t,this.updateContext(r)};De.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(Q.ellipsis)):(++this.pos,this.finishToken(Q.dot))};De.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(Q.assign,2):this.finishOp(Q.slash,1)};De.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),r=1,n=e===42?Q.star:Q.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++r,n=Q.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(Q.assign,r+1):this.finishOp(n,r)};De.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var r=this.input.charCodeAt(this.pos+2);if(r===61)return this.finishOp(Q.assign,3)}return this.finishOp(e===124?Q.logicalOR:Q.logicalAND,2)}return t===61?this.finishOp(Q.assign,2):this.finishOp(e===124?Q.bitwiseOR:Q.bitwiseAND,1)};De.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(Q.assign,2):this.finishOp(Q.bitwiseXOR,1)};De.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||Ii.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(Q.incDec,2):t===61?this.finishOp(Q.assign,2):this.finishOp(Q.plusMin,1)};De.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),r=1;return t===e?(r=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+r)===61?this.finishOp(Q.assign,r+1):this.finishOp(Q.bitShift,r)):t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(t===61&&(r=2),this.finishOp(Q.relational,r))};De.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(Q.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(Q.arrow)):this.finishOp(e===61?Q.eq:Q.prefix,1)};De.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var r=this.input.charCodeAt(this.pos+2);if(r<48||r>57)return this.finishOp(Q.questionDot,2)}if(t===63){if(e>=12){var n=this.input.charCodeAt(this.pos+2);if(n===61)return this.finishOp(Q.assign,3)}return this.finishOp(Q.coalesce,2)}}return this.finishOp(Q.question,1)};De.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),Eo(t,!0)||t===92))return this.finishToken(Q.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+Co(t)+"'")};De.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(Q.parenL);case 41:return++this.pos,this.finishToken(Q.parenR);case 59:return++this.pos,this.finishToken(Q.semi);case 44:return++this.pos,this.finishToken(Q.comma);case 91:return++this.pos,this.finishToken(Q.bracketL);case 93:return++this.pos,this.finishToken(Q.bracketR);case 123:return++this.pos,this.finishToken(Q.braceL);case 125:return++this.pos,this.finishToken(Q.braceR);case 58:return++this.pos,this.finishToken(Q.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(Q.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(Q.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+Co(e)+"'")};De.finishOp=function(e,t){var r=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,r)};De.readRegexp=function(){for(var e,t,r=this.pos;;){this.pos>=this.input.length&&this.raise(r,"Unterminated regular expression");var n=this.input.charAt(this.pos);if(Ii.test(n)&&this.raise(r,"Unterminated regular expression"),e)e=!1;else{if(n==="[")t=!0;else if(n==="]"&&t)t=!1;else if(n==="/"&&!t)break;e=n==="\\"}++this.pos}var i=this.input.slice(r,this.pos);++this.pos;var s=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(s);var a=this.regexpState||(this.regexpState=new Us(this));a.reset(r,i,o),this.validateRegExpFlags(a),this.validateRegExpPattern(a);var l=null;try{l=new RegExp(i,o)}catch{}return this.finishToken(Q.regexp,{pattern:i,flags:o,value:l})};De.readInt=function(e,t,r){for(var n=this.options.ecmaVersion>=12&&t===void 0,i=r&&this.input.charCodeAt(this.pos)===48,s=this.pos,o=0,a=0,l=0,c=t??1/0;l=97?h=u-97+10:u>=65?h=u-65+10:u>=48&&u<=57?h=u-48:h=1/0,h>=e)break;a=u,o=o*e+h}return n&&a===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===s||t!=null&&this.pos-s!==t?null:o};function Rht(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function V4(e){return typeof BigInt!="function"?null:BigInt(e.replace(/_/g,""))}De.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var r=this.readInt(e);return r==null&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(r=V4(this.input.slice(t,this.pos)),++this.pos):Eo(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(Q.num,r)};De.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,"Invalid number");var r=this.pos-t>=2&&this.input.charCodeAt(t)===48;r&&this.strict&&this.raise(t,"Invalid number");var n=this.input.charCodeAt(this.pos);if(!r&&!e&&this.options.ecmaVersion>=11&&n===110){var i=V4(this.input.slice(t,this.pos));return++this.pos,Eo(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(Q.num,i)}r&&/[89]/.test(this.input.slice(t,this.pos))&&(r=!1),n===46&&!r&&(++this.pos,this.readInt(10),n=this.input.charCodeAt(this.pos)),(n===69||n===101)&&!r&&(n=this.input.charCodeAt(++this.pos),(n===43||n===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,"Invalid number")),Eo(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var s=Rht(this.input.slice(t,this.pos),r);return this.finishToken(Q.num,s)};De.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var r=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(r,"Code point out of bounds")}else t=this.readHexChar(4);return t};De.readString=function(e){for(var t="",r=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var n=this.input.charCodeAt(this.pos);if(n===e)break;n===92?(t+=this.input.slice(r,this.pos),t+=this.readEscapedChar(!1),r=this.pos):n===8232||n===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(Ou(n)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(r,this.pos++),this.finishToken(Q.string,t)};var W4={};De.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===W4)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};De.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw W4;this.raise(e,t)};De.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var r=this.input.charCodeAt(this.pos);if(r===96||r===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===Q.template||this.type===Q.invalidTemplate)?r===36?(this.pos+=2,this.finishToken(Q.dollarBraceL)):(++this.pos,this.finishToken(Q.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(Q.template,e));if(r===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(Ou(r)){switch(e+=this.input.slice(t,this.pos),++this.pos,r){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=` `;break;default:e+=String.fromCharCode(r);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};De.readInvalidTemplateToken=function(){for(;this.pos=48&&t<=55){var n=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(n,8);return i>255&&(n=n.slice(0,-1),i=parseInt(n,8)),this.pos+=n.length-1,t=this.input.charCodeAt(this.pos),(n!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-n.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(i)}return Ou(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}};De.readHexChar=function(e){var t=this.pos,r=this.readInt(16,e);return r===null&&this.invalidStringToken(t,"Bad character escape sequence"),r};De.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,r=this.pos,n=this.options.ecmaVersion>=6;this.posthis.should_skip=!0,remove:()=>this.should_remove=!0,replace:t=>this.replacement=t}}replace(t,r,n,i){t&&r&&(n!=null?t[r][n]=i:t[r]=i)}remove(t,r,n){t&&r&&(n!=null?t[r].splice(n,1):delete t[r])}}class jht extends Mht{constructor(t,r){super(),this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:()=>this.should_skip=!0,remove:()=>this.should_remove=!0,replace:n=>this.replacement=n},this.enter=t,this.leave=r}async visit(t,r,n,i){if(t){if(this.enter){const o=this.should_skip,a=this.should_remove,l=this.replacement;this.should_skip=!1,this.should_remove=!1,this.replacement=null,await this.enter.call(this.context,t,r,n,i),this.replacement&&(t=this.replacement,this.replace(r,n,i,t)),this.should_remove&&this.remove(r,n,i);const c=this.should_skip,u=this.should_remove;if(this.should_skip=o,this.should_remove=a,this.replacement=l,c)return t;if(u)return null}let s;for(s in t){const o=t[s];if(o&&typeof o=="object")if(Array.isArray(o)){const a=o;for(let l=0;l{if(n.type==="ImportDeclaration"){const i=`${n.source.value}`;t.push({source:i,specifiers:n.specifiers.map(s=>({name:s.local.name,default:s.type==="ImportDefaultSpecifier"})),package:i.split("/").slice(0,i.startsWith("@")?2:1).join("/")})}}}),t}function q4(e,t){const r=URL.createObjectURL(e),n=document.createElement("a");n.href=r,n.download=t,n.click(),URL.revokeObjectURL(r)}function Jft(e,t="output.json"){let r;e.constructor.name==="Blob"?r=e:r=new Blob([e],{type:"application/json"}),q4(r,t)}async function Vht(e,t="output.zip"){let r;if(e.constructor.name==="Blob")r=e;else{const n=new A6(new Kx("application/zip"));await Promise.all(Object.entries(e).map(([i,s])=>n.add(i,new r6(s)))),r=await n.close()}q4(r,t)}const c1={tokens:{colors:{red:{value:"#ff0000",type:"color"}}},config:{platforms:{css:{transformGroup:Qr.css,files:[{destination:"vars.css",format:Lx.cssVariables}]}}},script:"import StyleDictionary from 'style-dictionary';"},Wht=e=>{const t={h:"objective-c"};let r;const n=al?.languages?.getLanguages();return n&&(r=n.find(i=>i.extensions?.includes(`.${e}`))?.id),t[e]??r??e},qht=["tokens","config","script","output"],k_=[];class Hht extends Nc{static get styles(){return ui` sl-radio-group { margin-bottom: 4px; margin-top: 16px; } .output-select::part(combobox) { height: 28px; min-height: 28px; margin-left: 10px; } /** screen-reader only CSS */ sl-select::part(form-control-label) { border: 0 !important; clip: rect(1px, 1px, 1px, 1px) !important; -webkit-clip-path: inset(50%) !important; clip-path: inset(50%) !important; height: 1px !important; margin: -1px !important; overflow: hidden !important; padding: 0 !important; position: absolute !important; width: 1px !important; white-space: nowrap !important; } @media (max-width: 550px) { ::part(button-group) { display: block; } ::part(button-group__base) { flex-direction: column; } sl-radio-button[data-sl-button-group__button--first]::part(button) { border-top-left-radius: var(--sl-input-border-radius-medium); border-top-right-radius: var(--sl-input-border-radius-medium); border-bottom-left-radius: 0; border-bottom-right-radius: 0; } sl-radio-button[data-sl-button-group__button--last]::part(button) { border-top-left-radius: 0; border-top-right-radius: 0; border-bottom-left-radius: var(--sl-input-border-radius-medium); border-bottom-right-radius: var(--sl-input-border-radius-medium); } } sl-option::part(label) { flex-grow: 0; } sl-option::part(base) { min-width: 100%; } sl-option::part(base), sl-select::part(listbox) { width: max-content; } `}static get properties(){return{tokens:{reflect:!0,type:String},config:{reflect:!0,type:String},script:{reflect:!0,type:String},outputFiles:{state:!0},defaultSelected:{type:String,attribute:"default-selected",reflect:!0}}}get currentFile(){return this._currentFile}set currentFile(t){this._currentFile=t,this.fileSwitch(t),this.updateComplete.then(()=>{(this.shadowRoot?.querySelector(`sl-radio-button[value="${t}"]`)).click()})}constructor(){super(),this.tokens="{}",this.config="{}",this.script="{}",this.output="{}",this.defaultSelected="config",this.outputFiles=[],this.editor=void 0,this.hasInitialized=new Promise(t=>{this.hasInitializedResolve=t}),k_.push(this)}connectedCallback(){super.connectedCallback(),this.init()}render(){return gr` {t.target.value!=="eject"&&(this.currentFile=t.target.value)}} name="file-switch" > ${qht.map(t=>gr` ${t.slice(0,1).toUpperCase()}${t.slice(1)} ${t==="output"?gr` {r.stopPropagation(),this.changeOutputs(r.target.value,!0)}} > ${this.outputFiles.map(r=>gr` ${r} `)} `:gr``} `)} `}async init(){await this.initMonaco(),await this.initData(),this.hasInitializedResolve(),this.currentFile=this.defaultSelected}async initMonaco(){await this.updateComplete;const r=(this.shadowRoot?.querySelector('slot[name="monaco-editor"]')).assignedNodes()[0];r&&(this.editor=await Jut(r),this.editor._domElement.addEventListener("keydown",n=>{n.key==="s"&&(n.ctrlKey||n.metaKey)&&(n.preventDefault(),this.saveFile())}))}async initData(){const[,t]=await Promise.all([this.initScript(),this.initTokens()]),r=await this.initConfig(t);return this.runSD(r),r}async initScript(){const t=JSON.parse(this.script);if(t.value){const r=await s1(t.value);await import(URL.createObjectURL(new Blob([r],{type:"text/javascript"})))}}async initTokens(){let t=c1.tokens;const r=JSON.parse(this.tokens);if(r.value)if(r.lang==="js"){const n=await s1(r.value);t=(await import(URL.createObjectURL(new Blob([n],{type:"text/javascript"})))).default}else t=JSON.parse(r.value);return t}async initConfig(t){let r={...c1.config,tokens:t};if(this.config){const n=JSON.parse(this.config);if(n.lang==="js"){const i=await s1(n.value);r=(await import(URL.createObjectURL(new Blob([i],{type:"text/javascript"})))).default}else n.value&&(r=JSON.parse(n.value));r.tokens=r.tokens??t}return r}getFileData(t){const r=c1[t];return{lang:JSON.parse(this[t]).lang??(t==="script"?"js":"json"),value:JSON.parse(this[t]).value??(t==="script"?r:JSON.stringify(r,null,2))}}async fileSwitch(t){await this.hasInitialized;const r=this.getFileData(t);this.editor.setValue(r.value),await Zut(Wht(r.lang),this.editor)}async runSD(t){try{this.volume=new ZX,await new L0(t,{volume:this.volume}).buildAllPlatforms(),this.outputFiles=this.traverseDir();const n=this.outputFiles[0];this.changeOutputs(n)}catch(r){console.error(r)}}changeOutputs(t,r=!1){this.output=JSON.stringify({value:this.volume.readFileSync(t,"utf-8"),lang:Np(t).replace(/^\./g,"")}),(this.currentFile==="output"||r)&&(this.currentFile="output")}traverseDir(t="/",r=[]){let n=r;return this.volume.readdirSync(t).forEach(i=>{const s=vo(t,i);this.volume.lstatSync(s).isDirectory()?n=[...n,...this.traverseDir(s,n)]:n=[...n,s]}),[...new Set(n)]}async saveFile(){this[this.currentFile]=JSON.stringify({value:this.editor.getValue(),lang:this.getFileData(this.currentFile).lang}),await this.initData()}async ejectHandler(){const t=this.getFileData("tokens"),r=this.getFileData("script"),n=this.getFileData("config"),i=await Uht(r.value),s=i.find(h=>h.package==="style-dictionary");s&&(s.package="style-dictionary");const o={};o[`tokens.${t.lang}`]=t.value;const a=r.lang==="js"?"mjs":r.lang,l=n.lang==="js"?"mjs":n.lang;if(l==="json"){const h=JSON.parse(n.value);h.source=[`tokens.${t.lang}`],n.value=JSON.stringify(h,null,2)}else n.lang==="js"&&(n.value=n.value.replace(/export( *)default( *){/,`export default { source: ['tokens.${t.lang}'],`));o[`config.${l}`]=n.value,o[`build-tokens.${a}`]=`${r.value} const sd = new StyleDictionary('config.${l}'); await sd.cleanAllPlatforms(); await sd.buildAllPlatforms(); `,o["README.md"]=`# Style Dictionary Eject Install your dependencies with [NPM](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm): \`\`\`sh npm init -y && npm install ${i.map(h=>h.package).join(" ")} \`\`\` Then run \`\`\`sh node build-tokens.${a} \`\`\` `;const c=new Date(Date.now()),u=`sd-output_${c.getFullYear()}-${c.getMonth()}-${("0"+c.getDate()).slice(-2)}.zip`;await Vht(o,u)}}customElements.define("sd-playground",Hht);const Ght=Object.freeze(Object.defineProperty({__proto__:null,registeredComponents:k_},Symbol.toStringTag,{value:"Module"})),H4="data-theme";let G4;const bd={dark:new CSSStyleSheet,light:new CSSStyleSheet};bd.dark.replaceSync(J4);bd.light.replaceSync(Z4);bd.dark.theme=!0;bd.light.theme=!0;const Bh=1231,gw=()=>Math.max(document.documentElement.clientWidth||0,window.innerWidth||0);async function Y4(){const e=D_(),t=gw()>Bh?"LR":"TB";hE.initialize({startOnLoad:!1,theme:e==="light"?"base":"dark"});const r=[...document.querySelectorAll(".mermaid")];await Promise.all([...r].map(n=>{const i=n.getAttribute("data-mermaid-graph-definition")??n.innerText;return n.setAttribute("data-mermaid-graph-definition",i),hE.render("graphDiv",i.replace("flowchart LR",`flowchart ${t}`)).then(({svg:s})=>{n.innerHTML=s})})),[...r].forEach(n=>{n.classList.remove("hidden")})}function D_(){return document.documentElement.getAttribute(H4)}async function K4(e){G4=e,document.documentElement.classList.add(`sl-theme-${e}`),document.adoptedStyleSheets=[...document.adoptedStyleSheets.filter(t=>!t.theme),bd[e]],k_.forEach(t=>{t.hasInitialized.then(()=>{t.editor._themeService.setTheme(`my-${e}-theme`)})}),await Y4()}function Yht(){new MutationObserver(()=>{const t=D_();G4!==t&&(t==="dark"||t==="light")&&K4(t)}).observe(document.documentElement,{attributes:!0,attributeFilter:[H4]})}function Kht(e){e.forEach(t=>{const r=document.querySelector(t);r&&new IntersectionObserver(i=>{i.forEach(s=>{s.isIntersecting&&X4(Object.assign({"./components/sd-dtcg-convert.ts":()=>Ne(()=>import("./sd-dtcg-convert.ByTrpQOW.js"),__vite__mapDeps([44,6])),"./components/sd-playground.ts":()=>Ne(()=>Promise.resolve().then(()=>Ght),void 0)}),`./components/${t}.ts`,3)})}).observe(r)})}function Xht(){let e=gw();window.addEventListener("resize",()=>{const t=gw();(e>=Bh&&tBh)&&Y4(),e=t})}async function Jht(){Yht(),Kht(["sd-playground","sd-dtcg-convert"]),Xht(),await K4(D_())}Jht();export{Cz as $,Nh as A,IN as B,CL as C,tx as D,Kn as E,ZD as F,xW as G,IH as H,ZS as I,IM as J,zN as K,Kc as L,Qht as M,d0 as N,vw as O,V_ as P,Tz as Q,Ap as R,wW as S,Wf as T,dL as U,Vf as V,Ut as W,ne as X,lT as Y,fW as Z,R as _,vL as a,wo as a$,gS as a0,mS as a1,uft as a2,sft as a3,lft as a4,aft as a5,nft as a6,Gl as a7,jw as a8,cft as a9,Cft as aA,fH as aB,lH as aC,aH as aD,fq as aE,Az as aF,J6 as aG,Yft as aH,K6 as aI,X6 as aJ,Er as aK,ui as aL,Fo as aM,hi as aN,U0 as aO,gr as aP,mot as aQ,hs as aR,bt as aS,Jn as aT,pn as aU,jt as aV,cs as aW,eB as aX,l2 as aY,c2 as aZ,KA as a_,ift as aa,fft as ab,hft as ac,oft as ad,Mq as ae,rF as af,kft as ag,he as ah,Is as ai,BM as aj,Lr as ak,xa as al,Ow as am,P5 as an,Pl as ao,o5 as ap,lW as aq,tV as ar,eW as as,qw as at,oE as au,PH as av,Aft as aw,Dft as ax,Eft as ay,Zt as az,bL as b,h0 as b$,Wi as b0,Q6 as b1,Nc as b2,cit as b3,Vht as b4,lit as b5,Jft as b6,tN as b7,r0 as b8,n9 as b9,Hw as bA,BV as bB,hW as bC,Kf as bD,yu as bE,Am as bF,HV as bG,tG as bH,Yf as bI,Dm as bJ,jV as bK,q8 as bL,WU as bM,qU as bN,Ba as bO,FS as bP,HU as bQ,Gw as bR,VU as bS,KU as bT,bu as bU,wa as bV,AS as bW,Yw as bX,G8 as bY,tv as bZ,uW as b_,r9 as ba,kl as bb,cW as bc,Z8 as bd,l0 as be,f0 as bf,Tm as bg,t5 as bh,J8 as bi,MV as bj,Yn as bk,Z7 as bl,Bw as bm,s8 as bn,Gf as bo,l8 as bp,rft as bq,iN as br,Rw as bs,qo as bt,cS as bu,sj as bv,hf as bw,aW as bx,tW as by,zU as bz,He as c,Re as d,aT as e,sn as f,xL as g,go as h,ll as i,a9 as j,gu as k,St as l,l5 as m,tft as n,Pft as o,_L as p,SL as q,Tft as r,wL as s,$M as t,Es as u,iH as v,EW as w,dft as x,yL as y,eft as z};