vue-data-ui 2.6.19 → 2.6.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/dist/{Arrow-QMACp9z-.cjs → Arrow-C1pcd-am.cjs} +1 -1
- package/dist/{Arrow-DTtLZwne.js → Arrow-DQaZQgi6.js} +1 -1
- package/dist/{BaseIcon-BpRuwiFD.cjs → BaseIcon-BQwivF_K.cjs} +1 -1
- package/dist/{BaseIcon-nz-vbP7I.js → BaseIcon-DH34CAFx.js} +1 -1
- package/dist/{DataTable-Dr-djTUz.cjs → DataTable-D5572vAU.cjs} +1 -1
- package/dist/{DataTable-pNLWbeCL.js → DataTable-DfMqgTjL.js} +2 -2
- package/dist/{Legend-BHbX2C8f.cjs → Legend-CoREnR30.cjs} +1 -1
- package/dist/{Legend-s9DRKvJo.js → Legend-PL8rU0J1.js} +2 -2
- package/dist/{PackageVersion-hltZM-fb.js → PackageVersion-1Y7SXTrk.js} +1 -1
- package/dist/{PackageVersion-DsoqDgVf.cjs → PackageVersion-JsuXjgR_.cjs} +1 -1
- package/dist/PenAndPaper-7lGhxIH8.cjs +1 -0
- package/dist/{PenAndPaper-qmkn1GhB.js → PenAndPaper-BYhUvcy4.js} +20 -16
- package/dist/{PenAndPaper.vue_vue_type_style_index_0_scoped_c968a401_lang-z17A_S1M.js → PenAndPaper.vue_vue_type_style_index_0_scoped_3cea7589_lang-AmNwJZI7.js} +3 -3
- package/dist/{PenAndPaper.vue_vue_type_style_index_0_scoped_c968a401_lang-lH7bkq1z.cjs → PenAndPaper.vue_vue_type_style_index_0_scoped_3cea7589_lang-NplvneD1.cjs} +1 -1
- package/dist/{Shape-YhMDtuHk.cjs → Shape-HtDeeGqp.cjs} +1 -1
- package/dist/{Shape-C3y6rj0O.js → Shape-Ov27sl2L.js} +1 -1
- package/dist/{Slicer-BIW17-XH.js → Slicer-6F4tHrZR.js} +3 -3
- package/dist/{Slicer-BA8XF-Ak.cjs → Slicer-COXIFuZ-.cjs} +1 -1
- package/dist/{Title-dsg3PqUg.js → Title-1PWD04Gh.js} +1 -1
- package/dist/{Title-DWqgN4Kv.cjs → Title-Pgt1Ixvo.cjs} +1 -1
- package/dist/{Tooltip-DRFQIslg.js → Tooltip-BTO5NGkn.js} +1 -1
- package/dist/{Tooltip-B6T_qzJD.cjs → Tooltip-te_h24w6.cjs} +1 -1
- package/dist/{index-3OrObUP-.cjs → index-DM-Bs-Ua.cjs} +1 -1
- package/dist/{index-DvAaY6OP.js → index-DUnEDLbc.js} +1 -1
- package/dist/index.es-DvaaoatM.cjs +18 -0
- package/dist/index.es-RWt7DWPC.js +6645 -0
- package/dist/{jspdf.es.min-C5v1xtPn.cjs → jspdf.es.min-Rw70uifz.cjs} +23 -23
- package/dist/{jspdf.es.min-DKXYalZb.js → jspdf.es.min-eTA26cmm.js} +476 -470
- package/dist/{pdf-CHXlEvWj.cjs → pdf-DSkQT5iH.cjs} +1 -1
- package/dist/{pdf-70oZh5Jp.js → pdf-DVWl3Adn.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-CGzX7c5Q.js → useNestedProp-CEMeoM-f.js} +1 -1
- package/dist/{useNestedProp-B53Yi1Rk.cjs → useNestedProp-CYy5g-mh.cjs} +1 -1
- package/dist/usePrinter-DbpIk44f.cjs +1 -0
- package/dist/{usePrinter-D_2jA4x8.js → usePrinter-Undaynpo.js} +73 -71
- package/dist/useResponsive-N8jl0-aC.cjs +1 -0
- package/dist/{useResponsive-BWapHhVH.js → useResponsive-vZgZwV-S.js} +65 -64
- package/dist/{vue-data-ui-CTjgYwlW.cjs → vue-data-ui-BapofDyJ.cjs} +1 -1
- package/dist/{vue-data-ui-DMl9rAwQ.js → vue-data-ui-DnaIYz0z.js} +61 -61
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-DBVRoMwv.js → vue-ui-3d-bar-DLYaW0-y.js} +105 -98
- package/dist/{vue-ui-3d-bar-OwVsZokU.cjs → vue-ui-3d-bar-DansBM76.cjs} +2 -2
- package/dist/{vue-ui-accordion-LbUarYuf.js → vue-ui-accordion-C8Couc_G.js} +3 -3
- package/dist/{vue-ui-accordion-BmScSwW2.cjs → vue-ui-accordion-ZIsT4At8.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-DQ5dL4yb.cjs → vue-ui-age-pyramid-BSXnW9GF.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-rmfEfmj7.js → vue-ui-age-pyramid-BdruKMmo.js} +76 -69
- package/dist/{vue-ui-annotator-nS_RSspz.cjs → vue-ui-annotator-B7Go0M7W.cjs} +1 -1
- package/dist/{vue-ui-annotator-FlMkU7Kj.js → vue-ui-annotator-DVfdPMa7.js} +2 -2
- package/dist/{vue-ui-bullet-esfPgi-9.js → vue-ui-bullet-CkCJgmoJ.js} +145 -138
- package/dist/{vue-ui-bullet-BGTTcXBJ.cjs → vue-ui-bullet-N9ud2cQ7.cjs} +4 -4
- package/dist/{vue-ui-candlestick-RHrlnUqs.js → vue-ui-candlestick-C9B13qeU.js} +116 -109
- package/dist/{vue-ui-candlestick-BUEGFHg_.cjs → vue-ui-candlestick-DPIs9tEW.cjs} +2 -2
- package/dist/{vue-ui-carousel-table-6uP-Kk9U.js → vue-ui-carousel-table-BLo52Rqu.js} +130 -123
- package/dist/{vue-ui-carousel-table-DCcPnWRU.cjs → vue-ui-carousel-table-DgcY4j9y.cjs} +1 -1
- package/dist/{vue-ui-chestnut-B7Ep4Lho.cjs → vue-ui-chestnut-C9Zw_bey.cjs} +2 -2
- package/dist/{vue-ui-chestnut-Dh4y5s_v.js → vue-ui-chestnut-D8oXG8Tf.js} +131 -124
- package/dist/vue-ui-circle-pack-CrEdkNM7.js +648 -0
- package/dist/vue-ui-circle-pack-DYW-e2E5.cjs +1 -0
- package/dist/{vue-ui-cursor-D-IzE_jd.cjs → vue-ui-cursor-CtSijliN.cjs} +1 -1
- package/dist/{vue-ui-cursor-C21WgpGu.js → vue-ui-cursor-DkW4pJcP.js} +2 -2
- package/dist/{vue-ui-dashboard-T0LqYCqM.js → vue-ui-dashboard-5_Du0Yr2.js} +3 -3
- package/dist/{vue-ui-dashboard-DQ_wht4B.cjs → vue-ui-dashboard-Dh5vRbdI.cjs} +1 -1
- package/dist/{vue-ui-digits-CwV6mhHZ.cjs → vue-ui-digits-DEmYk7sS.cjs} +1 -1
- package/dist/{vue-ui-digits-CLFrlUIW.js → vue-ui-digits-DhA1bHdz.js} +2 -2
- package/dist/{vue-ui-donut-dVplEheX.js → vue-ui-donut-B-G7gRdV.js} +118 -111
- package/dist/{vue-ui-donut-b_UXDeKJ.cjs → vue-ui-donut-BrZxaijU.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-Bl50EWBG.js → vue-ui-donut-evolution-B4almlBq.js} +164 -157
- package/dist/{vue-ui-donut-evolution-VxNtQWGH.cjs → vue-ui-donut-evolution-CTbXi7wk.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-B-7s7x7a.cjs → vue-ui-dumbbell-CAIlnhsM.cjs} +2 -2
- package/dist/{vue-ui-dumbbell-Bp685TTG.js → vue-ui-dumbbell-kZGa__IU.js} +75 -68
- package/dist/{vue-ui-flow-CHbfoU97.js → vue-ui-flow-Bc31ZN1W.js} +177 -170
- package/dist/{vue-ui-flow-DJqOVlD7.cjs → vue-ui-flow-D2UNbwlp.cjs} +1 -1
- package/dist/{vue-ui-funnel-B77giO54.cjs → vue-ui-funnel-DfCz1GNN.cjs} +1 -1
- package/dist/{vue-ui-funnel-Bhv0XRzJ.js → vue-ui-funnel-V7hu2Iib.js} +129 -122
- package/dist/{vue-ui-galaxy-Dt4dx9bS.cjs → vue-ui-galaxy-CNBC7IbU.cjs} +1 -1
- package/dist/{vue-ui-galaxy-DMA8AX8h.js → vue-ui-galaxy-DLCcy7Kq.js} +77 -70
- package/dist/{vue-ui-gauge-CBlurlZk.js → vue-ui-gauge-CZMHtEcr.js} +153 -146
- package/dist/{vue-ui-gauge-Bh3iSbSd.cjs → vue-ui-gauge-D8IglqIF.cjs} +1 -1
- package/dist/{vue-ui-gizmo-CHhJKge-.js → vue-ui-gizmo-BuAVBMBp.js} +3 -3
- package/dist/{vue-ui-gizmo-BMrnNfYR.cjs → vue-ui-gizmo-fyC414Iv.cjs} +1 -1
- package/dist/vue-ui-heatmap-CDOry_F1.cjs +1 -0
- package/dist/{vue-ui-heatmap-CB4852rp.js → vue-ui-heatmap-hUfFzGck.js} +139 -132
- package/dist/{vue-ui-history-plot-AwmdEhYL.js → vue-ui-history-plot-C79l8rPm.js} +122 -115
- package/dist/{vue-ui-history-plot-BG7r0ZF7.cjs → vue-ui-history-plot-CIXgvWpk.cjs} +1 -1
- package/dist/{vue-ui-kpi-DcxE4Vv7.js → vue-ui-kpi-C3tHthXH.js} +3 -3
- package/dist/{vue-ui-kpi-BYCMEzBt.cjs → vue-ui-kpi-yiWxNLJ-.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-CdDRH8Rb.js → vue-ui-mini-loader-1p1jAKx_.js} +2 -2
- package/dist/{vue-ui-mini-loader-DOqUfxRJ.cjs → vue-ui-mini-loader-26yCYjxn.cjs} +1 -1
- package/dist/{vue-ui-molecule-C-Z0Ywq1.cjs → vue-ui-molecule-Bw0dYLfu.cjs} +1 -1
- package/dist/{vue-ui-molecule-BskBKGbQ.js → vue-ui-molecule-COQ-yrBr.js} +249 -242
- package/dist/{vue-ui-mood-radar-BAPZ1LyF.js → vue-ui-mood-radar-CwfGiQ43.js} +111 -104
- package/dist/{vue-ui-mood-radar-BIrQKfVf.cjs → vue-ui-mood-radar-Cyde9hnR.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-BB2Kgb5F.js → vue-ui-nested-donuts-BVaW7w1U.js} +117 -110
- package/dist/{vue-ui-nested-donuts-7YjtP-jC.cjs → vue-ui-nested-donuts-Y07lLGRa.cjs} +2 -2
- package/dist/{vue-ui-onion-BWb18zcN.cjs → vue-ui-onion-DkXss-B_.cjs} +2 -2
- package/dist/{vue-ui-onion-BjMfXAZK.js → vue-ui-onion-h6DP9kOi.js} +143 -136
- package/dist/{vue-ui-parallel-coordinate-plot-D6Vs-5Vh.cjs → vue-ui-parallel-coordinate-plot-CkI21cq2.cjs} +2 -2
- package/dist/{vue-ui-parallel-coordinate-plot-ryqdfkHL.js → vue-ui-parallel-coordinate-plot-O5cwKbzH.js} +113 -106
- package/dist/{vue-ui-quadrant-Cr4ypLzT.js → vue-ui-quadrant-CfywvXnV.js} +112 -105
- package/dist/{vue-ui-quadrant-BmsHBpKo.cjs → vue-ui-quadrant-F6w-QJE_.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-45IEXHb0.cjs → vue-ui-quick-chart-BeMHD_Kz.cjs} +3 -3
- package/dist/{vue-ui-quick-chart-C9dIHRYi.js → vue-ui-quick-chart-C1AwFGSr.js} +195 -188
- package/dist/{vue-ui-radar-Nr5JmVlk.cjs → vue-ui-radar-BejYh3DW.cjs} +1 -1
- package/dist/{vue-ui-radar-T6xdl9ic.js → vue-ui-radar-DDKXLi5o.js} +101 -94
- package/dist/{vue-ui-rating-C5AaiBqZ.js → vue-ui-rating-BrGbM0Op.js} +2 -2
- package/dist/{vue-ui-rating-CFIhZlG-.cjs → vue-ui-rating-C40ktvn7.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-Cw-DcsRY.cjs → vue-ui-relation-circle-C4qT13SI.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-BktS594K.js → vue-ui-relation-circle-DrtdiTMX.js} +103 -96
- package/dist/{vue-ui-rings-_evAK3j7.js → vue-ui-rings-C4IdhEUE.js} +169 -162
- package/dist/{vue-ui-rings-2j5fsO_o.cjs → vue-ui-rings-Cd8WyeDZ.cjs} +2 -2
- package/dist/{vue-ui-scatter-C5ePnByD.js → vue-ui-scatter-BS8sgyMi.js} +85 -78
- package/dist/{vue-ui-scatter-W1_ChsfO.cjs → vue-ui-scatter-MmvIeu4D.cjs} +1 -1
- package/dist/{vue-ui-screenshot-B6ASKPJf.cjs → vue-ui-screenshot-BB51-eRL.cjs} +1 -1
- package/dist/{vue-ui-screenshot-DM-PQM2g.js → vue-ui-screenshot-tnFPT1vi.js} +1 -1
- package/dist/{vue-ui-skeleton-WoggMoff.js → vue-ui-skeleton-DieABKlo.js} +3 -3
- package/dist/{vue-ui-skeleton-DaowWOKJ.cjs → vue-ui-skeleton-DlC-U64G.cjs} +1 -1
- package/dist/{vue-ui-smiley-gulDZ8i7.js → vue-ui-smiley-C32wVXgu.js} +2 -2
- package/dist/{vue-ui-smiley-hlaNlq2y.cjs → vue-ui-smiley-DSxKw3ud.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-LbApLsdt.js → vue-ui-spark-trend-B_x1dX38.js} +5 -5
- package/dist/{vue-ui-spark-trend-BcrMflk6.cjs → vue-ui-spark-trend-vexkCCy9.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-BdfaDBkw.cjs → vue-ui-sparkbar-CsOEiHDQ.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-CnL6FbaE.js → vue-ui-sparkbar-ZSbB6Llo.js} +4 -4
- package/dist/{vue-ui-sparkgauge-CHv1q1cO.cjs → vue-ui-sparkgauge-Bdh7X--h.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-Du7PRJyB.js → vue-ui-sparkgauge-Cf3bDk98.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-CyEyZvbD.js → vue-ui-sparkhistogram-CrZy1xf0.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-CBqKXnvX.cjs → vue-ui-sparkhistogram-fALwb3uK.cjs} +1 -1
- package/dist/{vue-ui-sparkline-DRHE0kK8.cjs → vue-ui-sparkline-D4WDvcZR.cjs} +1 -1
- package/dist/{vue-ui-sparkline-BMNXPHhB.js → vue-ui-sparkline-DTW_lXgp.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-D6wuDd8h.cjs → vue-ui-sparkstackbar-DBPLhUoi.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-D33lwh8d.js → vue-ui-sparkstackbar-Db2Ndf0k.js} +5 -5
- package/dist/{vue-ui-stackbar-CnxGAca-.cjs → vue-ui-stackbar-B3eaSIoO.cjs} +3 -3
- package/dist/{vue-ui-stackbar-C5yoqQAY.js → vue-ui-stackbar-DbF3ZJTD.js} +211 -204
- package/dist/{vue-ui-strip-plot-Cg1B7i3X.js → vue-ui-strip-plot-CpkH2Gfd.js} +83 -76
- package/dist/{vue-ui-strip-plot-DDTTc2jA.cjs → vue-ui-strip-plot-DiCVf5u-.cjs} +1 -1
- package/dist/{vue-ui-table-BGfZl0wF.js → vue-ui-table-D6zWwikN.js} +1 -1
- package/dist/{vue-ui-table-TV5Coa0A.cjs → vue-ui-table-K13fqkDI.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-Jjx8L8St.cjs → vue-ui-table-heatmap-BgenCoVa.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-D0j2OFv0.js → vue-ui-table-heatmap-EAevgnzN.js} +63 -56
- package/dist/{vue-ui-table-sparkline-D0_FhhN5.cjs → vue-ui-table-sparkline-3JMqr89P.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-C2sUG_7S.js → vue-ui-table-sparkline-s_oWe6MG.js} +90 -83
- package/dist/{vue-ui-thermometer-Bw35Fw8v.cjs → vue-ui-thermometer--mYRly4x.cjs} +1 -1
- package/dist/{vue-ui-thermometer-CdLZ8te2.js → vue-ui-thermometer-Bo3l_0Kf.js} +113 -106
- package/dist/{vue-ui-timer-1-kXQ5_q.js → vue-ui-timer-C9EuUurN.js} +6 -6
- package/dist/{vue-ui-timer-Deg5YPx0.cjs → vue-ui-timer-Djh-ZDNe.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-uSgVLSbo.cjs → vue-ui-tiremarks-CKv_KApZ.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-BHTSw0fa.js → vue-ui-tiremarks-DgdpEDJ1.js} +76 -69
- package/dist/{vue-ui-treemap-7W_lvbV0.cjs → vue-ui-treemap-AkNJjd2c.cjs} +1 -1
- package/dist/{vue-ui-treemap-C2u5sEzh.js → vue-ui-treemap-D13sISL0.js} +144 -137
- package/dist/{vue-ui-vertical-bar-BlzOi8LC.cjs → vue-ui-vertical-bar-CQlvpdJl.cjs} +3 -3
- package/dist/{vue-ui-vertical-bar-U3LQF-NS.js → vue-ui-vertical-bar-DfegzHj4.js} +120 -113
- package/dist/{vue-ui-waffle-DUXvINoC.cjs → vue-ui-waffle-Dve1LWVt.cjs} +1 -1
- package/dist/{vue-ui-waffle-qAheWwiI.js → vue-ui-waffle-f72Lq8_D.js} +78 -71
- package/dist/{vue-ui-wheel-DIoKCgCS.cjs → vue-ui-wheel-BG1GcVvN.cjs} +1 -1
- package/dist/{vue-ui-wheel-CuLQchDK.js → vue-ui-wheel-BxefMdit.js} +105 -98
- package/dist/{vue-ui-word-cloud-B-nFH7hZ.js → vue-ui-word-cloud-BYY4K2G4.js} +123 -116
- package/dist/{vue-ui-word-cloud-BSvmRQ5n.cjs → vue-ui-word-cloud-CRRR7H7h.cjs} +1 -1
- package/dist/{vue-ui-xy-DXMoSF2C.js → vue-ui-xy-BS0_aTIH.js} +73 -66
- package/dist/{vue-ui-xy-BGsFH9wE.cjs → vue-ui-xy-DGYZFgdd.cjs} +2 -2
- package/dist/{vue-ui-xy-canvas-CTymfSH6.js → vue-ui-xy-canvas-Bl2v7Z3U.js} +200 -193
- package/dist/{vue-ui-xy-canvas-i13v43UX.cjs → vue-ui-xy-canvas-R_pPaj0X.cjs} +2 -2
- package/package.json +2 -7
- package/dist/PenAndPaper-Dbw8Fph9.cjs +0 -1
- package/dist/index-Dwoe0gcF.cjs +0 -15
- package/dist/index-Fl-W8YeZ.js +0 -3971
- package/dist/usePrinter-bPnqqKha.cjs +0 -1
- package/dist/useResponsive-YQYQrAZ_.cjs +0 -1
- package/dist/vue-ui-circle-pack-Ce1oEvgz.cjs +0 -1
- package/dist/vue-ui-circle-pack-CrgnQ_jY.js +0 -663
- package/dist/vue-ui-heatmap-DvItO4xs.cjs +0 -1
package/dist/index-Dwoe0gcF.cjs
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Ui=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qe(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var Tt={exports:{}},pt={exports:{}},Xi=pt.exports,De;function Hi(){return De||(De=1,(function(){var l,t,e,i,s,n;typeof performance<"u"&&performance!==null&&performance.now?pt.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(pt.exports=function(){return(l()-s)/1e6},t=process.hrtime,l=function(){var a;return a=t(),a[0]*1e9+a[1]},i=l(),n=process.uptime()*1e9,s=i-n):Date.now?(pt.exports=function(){return Date.now()-e},e=Date.now()):(pt.exports=function(){return new Date().getTime()-e},e=new Date().getTime())}).call(Xi)),pt.exports}var Be;function Yi(){if(Be)return Tt.exports;Be=1;for(var l=Hi(),t=typeof window>"u"?Ui:window,e=["moz","webkit"],i="AnimationFrame",s=t["request"+i],n=t["cancel"+i]||t["cancelRequest"+i],a=0;!s&&a<e.length;a++)s=t[e[a]+"Request"+i],n=t[e[a]+"Cancel"+i]||t[e[a]+"CancelRequest"+i];if(!s||!n){var r=0,o=0,h=[],u=1e3/60;s=function(f){if(h.length===0){var g=l(),c=Math.max(0,u-(g-r));r=c+g,setTimeout(function(){var d=h.slice(0);h.length=0;for(var p=0;p<d.length;p++)if(!d[p].cancelled)try{d[p].callback(r)}catch(m){setTimeout(function(){throw m},0)}},Math.round(c))}return h.push({handle:++o,callback:f,cancelled:!1}),o},n=function(f){for(var g=0;g<h.length;g++)h[g].handle===f&&(h[g].cancelled=!0)}}return Tt.exports=function(f){return s.call(t,f)},Tt.exports.cancel=function(){n.apply(t,arguments)},Tt.exports.polyfill=function(f){f||(f=t),f.requestAnimationFrame=s,f.cancelAnimationFrame=n},Tt.exports}var Wi=Yi();const ie=Qe(Wi);var se,_e;function qi(){return _e||(_e=1,se=function(l){this.ok=!1,this.alpha=1,l.charAt(0)=="#"&&(l=l.substr(1,6)),l=l.replace(/ /g,""),l=l.toLowerCase();var t={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",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",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",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",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:"d87093",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",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};l=t[l]||l;for(var e=[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:["rgba(123, 234, 45, 0.8)","rgba(255,234,245,1.0)"],process:function(o){return[parseInt(o[1]),parseInt(o[2]),parseInt(o[3]),parseFloat(o[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(o){return[parseInt(o[1]),parseInt(o[2]),parseInt(o[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(o){return[parseInt(o[1],16),parseInt(o[2],16),parseInt(o[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(o){return[parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16),parseInt(o[3]+o[3],16)]}}],i=0;i<e.length;i++){var s=e[i].re,n=e[i].process,a=s.exec(l);if(a){var r=n(a);this.r=r[0],this.g=r[1],this.b=r[2],r.length>3&&(this.alpha=r[3]),this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var o=this.r.toString(16),h=this.g.toString(16),u=this.b.toString(16);return o.length==1&&(o="0"+o),h.length==1&&(h="0"+h),u.length==1&&(u="0"+u),"#"+o+h+u},this.getHelpXML=function(){for(var o=new Array,h=0;h<e.length;h++)for(var u=e[h].example,f=0;f<u.length;f++)o[o.length]=u[f];for(var g in t)o[o.length]=g;var c=document.createElement("ul");c.setAttribute("id","rgbcolor-examples");for(var h=0;h<o.length;h++)try{var d=document.createElement("li"),p=new RGBColor(o[h]),m=document.createElement("div");m.style.cssText="margin: 3px; border: 1px solid black; background:"+p.toHex()+"; color:"+p.toHex(),m.appendChild(document.createTextNode("test"));var x=document.createTextNode(" "+o[h]+" -> "+p.toRGB()+" -> "+p.toHex());d.appendChild(m),d.appendChild(x),c.appendChild(d)}catch{}return c}}),se}var Gi=qi();const ae=Qe(Gi);/*! *****************************************************************************
|
|
2
|
-
Copyright (c) Microsoft Corporation.
|
|
3
|
-
|
|
4
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
5
|
-
purpose with or without fee is hereby granted.
|
|
6
|
-
|
|
7
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
8
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
9
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
10
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
11
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
-
***************************************************************************** */var $e=function(l,t){return($e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])})(l,t)};function Ze(l,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=l}$e(l,t),l.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function Qi(l){var t="";Array.isArray(l)||(l=[l]);for(var e=0;e<l.length;e++){var i=l[e];if(i.type===y.CLOSE_PATH)t+="z";else if(i.type===y.HORIZ_LINE_TO)t+=(i.relative?"h":"H")+i.x;else if(i.type===y.VERT_LINE_TO)t+=(i.relative?"v":"V")+i.y;else if(i.type===y.MOVE_TO)t+=(i.relative?"m":"M")+i.x+" "+i.y;else if(i.type===y.LINE_TO)t+=(i.relative?"l":"L")+i.x+" "+i.y;else if(i.type===y.CURVE_TO)t+=(i.relative?"c":"C")+i.x1+" "+i.y1+" "+i.x2+" "+i.y2+" "+i.x+" "+i.y;else if(i.type===y.SMOOTH_CURVE_TO)t+=(i.relative?"s":"S")+i.x2+" "+i.y2+" "+i.x+" "+i.y;else if(i.type===y.QUAD_TO)t+=(i.relative?"q":"Q")+i.x1+" "+i.y1+" "+i.x+" "+i.y;else if(i.type===y.SMOOTH_QUAD_TO)t+=(i.relative?"t":"T")+i.x+" "+i.y;else{if(i.type!==y.ARC)throw new Error('Unexpected command type "'+i.type+'" at index '+e+".");t+=(i.relative?"a":"A")+i.rX+" "+i.rY+" "+i.xRot+" "+ +i.lArcFlag+" "+ +i.sweepFlag+" "+i.x+" "+i.y}}return t}function oe(l,t){var e=l[0],i=l[1];return[e*Math.cos(t)-i*Math.sin(t),e*Math.sin(t)+i*Math.cos(t)]}function J(){for(var l=[],t=0;t<arguments.length;t++)l[t]=arguments[t];for(var e=0;e<l.length;e++)if(typeof l[e]!="number")throw new Error("assertNumbers arguments["+e+"] is not a number. "+typeof l[e]+" == typeof "+l[e]);return!0}var ot=Math.PI;function ne(l,t,e){l.lArcFlag=l.lArcFlag===0?0:1,l.sweepFlag=l.sweepFlag===0?0:1;var i=l.rX,s=l.rY,n=l.x,a=l.y;i=Math.abs(l.rX),s=Math.abs(l.rY);var r=oe([(t-n)/2,(e-a)/2],-l.xRot/180*ot),o=r[0],h=r[1],u=Math.pow(o,2)/Math.pow(i,2)+Math.pow(h,2)/Math.pow(s,2);1<u&&(i*=Math.sqrt(u),s*=Math.sqrt(u)),l.rX=i,l.rY=s;var f=Math.pow(i,2)*Math.pow(h,2)+Math.pow(s,2)*Math.pow(o,2),g=(l.lArcFlag!==l.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(i,2)*Math.pow(s,2)-f)/f)),c=i*h/s*g,d=-s*o/i*g,p=oe([c,d],l.xRot/180*ot);l.cX=p[0]+(t+n)/2,l.cY=p[1]+(e+a)/2,l.phi1=Math.atan2((h-d)/s,(o-c)/i),l.phi2=Math.atan2((-h-d)/s,(-o-c)/i),l.sweepFlag===0&&l.phi2>l.phi1&&(l.phi2-=2*ot),l.sweepFlag===1&&l.phi2<l.phi1&&(l.phi2+=2*ot),l.phi1*=180/ot,l.phi2*=180/ot}function Fe(l,t,e){J(l,t,e);var i=l*l+t*t-e*e;if(0>i)return[];if(i===0)return[[l*e/(l*l+t*t),t*e/(l*l+t*t)]];var s=Math.sqrt(i);return[[(l*e+t*s)/(l*l+t*t),(t*e-l*s)/(l*l+t*t)],[(l*e-t*s)/(l*l+t*t),(t*e+l*s)/(l*l+t*t)]]}var D,it=Math.PI/180;function ze(l,t,e){return(1-e)*l+e*t}function Ue(l,t,e,i){return l+Math.cos(i/180*ot)*t+Math.sin(i/180*ot)*e}function Xe(l,t,e,i){var s=1e-6,n=t-l,a=e-t,r=3*n+3*(i-e)-6*a,o=6*(a-n),h=3*n;return Math.abs(r)<s?[-h/o]:function(u,f,g){var c=u*u/4-f;if(c<-1e-6)return[];if(c<=g)return[-u/2];var d=Math.sqrt(c);return[-u/2-d,-u/2+d]}(o/r,h/r,s)}function He(l,t,e,i,s){var n=1-s;return l*(n*n*n)+t*(3*n*n*s)+e*(3*n*s*s)+i*(s*s*s)}(function(l){function t(){return s(function(r,o,h){return r.relative&&(r.x1!==void 0&&(r.x1+=o),r.y1!==void 0&&(r.y1+=h),r.x2!==void 0&&(r.x2+=o),r.y2!==void 0&&(r.y2+=h),r.x!==void 0&&(r.x+=o),r.y!==void 0&&(r.y+=h),r.relative=!1),r})}function e(){var r=NaN,o=NaN,h=NaN,u=NaN;return s(function(f,g,c){return f.type&y.SMOOTH_CURVE_TO&&(f.type=y.CURVE_TO,r=isNaN(r)?g:r,o=isNaN(o)?c:o,f.x1=f.relative?g-r:2*g-r,f.y1=f.relative?c-o:2*c-o),f.type&y.CURVE_TO?(r=f.relative?g+f.x2:f.x2,o=f.relative?c+f.y2:f.y2):(r=NaN,o=NaN),f.type&y.SMOOTH_QUAD_TO&&(f.type=y.QUAD_TO,h=isNaN(h)?g:h,u=isNaN(u)?c:u,f.x1=f.relative?g-h:2*g-h,f.y1=f.relative?c-u:2*c-u),f.type&y.QUAD_TO?(h=f.relative?g+f.x1:f.x1,u=f.relative?c+f.y1:f.y1):(h=NaN,u=NaN),f})}function i(){var r=NaN,o=NaN;return s(function(h,u,f){if(h.type&y.SMOOTH_QUAD_TO&&(h.type=y.QUAD_TO,r=isNaN(r)?u:r,o=isNaN(o)?f:o,h.x1=h.relative?u-r:2*u-r,h.y1=h.relative?f-o:2*f-o),h.type&y.QUAD_TO){r=h.relative?u+h.x1:h.x1,o=h.relative?f+h.y1:h.y1;var g=h.x1,c=h.y1;h.type=y.CURVE_TO,h.x1=((h.relative?0:u)+2*g)/3,h.y1=((h.relative?0:f)+2*c)/3,h.x2=(h.x+2*g)/3,h.y2=(h.y+2*c)/3}else r=NaN,o=NaN;return h})}function s(r){var o=0,h=0,u=NaN,f=NaN;return function(g){if(isNaN(u)&&!(g.type&y.MOVE_TO))throw new Error("path must start with moveto");var c=r(g,o,h,u,f);return g.type&y.CLOSE_PATH&&(o=u,h=f),g.x!==void 0&&(o=g.relative?o+g.x:g.x),g.y!==void 0&&(h=g.relative?h+g.y:g.y),g.type&y.MOVE_TO&&(u=o,f=h),c}}function n(r,o,h,u,f,g){return J(r,o,h,u,f,g),s(function(c,d,p,m){var x=c.x1,A=c.x2,b=c.relative&&!isNaN(m),v=c.x!==void 0?c.x:b?0:d,E=c.y!==void 0?c.y:b?0:p;function C(j){return j*j}c.type&y.HORIZ_LINE_TO&&o!==0&&(c.type=y.LINE_TO,c.y=c.relative?0:p),c.type&y.VERT_LINE_TO&&h!==0&&(c.type=y.LINE_TO,c.x=c.relative?0:d),c.x!==void 0&&(c.x=c.x*r+E*h+(b?0:f)),c.y!==void 0&&(c.y=v*o+c.y*u+(b?0:g)),c.x1!==void 0&&(c.x1=c.x1*r+c.y1*h+(b?0:f)),c.y1!==void 0&&(c.y1=x*o+c.y1*u+(b?0:g)),c.x2!==void 0&&(c.x2=c.x2*r+c.y2*h+(b?0:f)),c.y2!==void 0&&(c.y2=A*o+c.y2*u+(b?0:g));var T=r*u-o*h;if(c.xRot!==void 0&&(r!==1||o!==0||h!==0||u!==1))if(T===0)delete c.rX,delete c.rY,delete c.xRot,delete c.lArcFlag,delete c.sweepFlag,c.type=y.LINE_TO;else{var O=c.xRot*Math.PI/180,R=Math.sin(O),F=Math.cos(O),z=1/C(c.rX),_=1/C(c.rY),X=C(F)*z+C(R)*_,B=2*R*F*(z-_),L=C(R)*z+C(F)*_,H=X*u*u-B*o*u+L*o*o,U=B*(r*u+o*h)-2*(X*h*u+L*r*o),$=X*h*h-B*r*h+L*r*r,k=(Math.atan2(U,H-$)+Math.PI)%Math.PI/2,V=Math.sin(k),W=Math.cos(k);c.rX=Math.abs(T)/Math.sqrt(H*C(W)+U*V*W+$*C(V)),c.rY=Math.abs(T)/Math.sqrt(H*C(V)-U*V*W+$*C(W)),c.xRot=180*k/Math.PI}return c.sweepFlag!==void 0&&0>T&&(c.sweepFlag=+!c.sweepFlag),c})}function a(){return function(r){var o={};for(var h in r)o[h]=r[h];return o}}l.ROUND=function(r){function o(h){return Math.round(h*r)/r}return r===void 0&&(r=1e13),J(r),function(h){return h.x1!==void 0&&(h.x1=o(h.x1)),h.y1!==void 0&&(h.y1=o(h.y1)),h.x2!==void 0&&(h.x2=o(h.x2)),h.y2!==void 0&&(h.y2=o(h.y2)),h.x!==void 0&&(h.x=o(h.x)),h.y!==void 0&&(h.y=o(h.y)),h.rX!==void 0&&(h.rX=o(h.rX)),h.rY!==void 0&&(h.rY=o(h.rY)),h}},l.TO_ABS=t,l.TO_REL=function(){return s(function(r,o,h){return r.relative||(r.x1!==void 0&&(r.x1-=o),r.y1!==void 0&&(r.y1-=h),r.x2!==void 0&&(r.x2-=o),r.y2!==void 0&&(r.y2-=h),r.x!==void 0&&(r.x-=o),r.y!==void 0&&(r.y-=h),r.relative=!0),r})},l.NORMALIZE_HVZ=function(r,o,h){return r===void 0&&(r=!0),o===void 0&&(o=!0),h===void 0&&(h=!0),s(function(u,f,g,c,d){if(isNaN(c)&&!(u.type&y.MOVE_TO))throw new Error("path must start with moveto");return o&&u.type&y.HORIZ_LINE_TO&&(u.type=y.LINE_TO,u.y=u.relative?0:g),h&&u.type&y.VERT_LINE_TO&&(u.type=y.LINE_TO,u.x=u.relative?0:f),r&&u.type&y.CLOSE_PATH&&(u.type=y.LINE_TO,u.x=u.relative?c-f:c,u.y=u.relative?d-g:d),u.type&y.ARC&&(u.rX===0||u.rY===0)&&(u.type=y.LINE_TO,delete u.rX,delete u.rY,delete u.xRot,delete u.lArcFlag,delete u.sweepFlag),u})},l.NORMALIZE_ST=e,l.QT_TO_C=i,l.INFO=s,l.SANITIZE=function(r){r===void 0&&(r=0),J(r);var o=NaN,h=NaN,u=NaN,f=NaN;return s(function(g,c,d,p,m){var x=Math.abs,A=!1,b=0,v=0;if(g.type&y.SMOOTH_CURVE_TO&&(b=isNaN(o)?0:c-o,v=isNaN(h)?0:d-h),g.type&(y.CURVE_TO|y.SMOOTH_CURVE_TO)?(o=g.relative?c+g.x2:g.x2,h=g.relative?d+g.y2:g.y2):(o=NaN,h=NaN),g.type&y.SMOOTH_QUAD_TO?(u=isNaN(u)?c:2*c-u,f=isNaN(f)?d:2*d-f):g.type&y.QUAD_TO?(u=g.relative?c+g.x1:g.x1,f=g.relative?d+g.y1:g.y2):(u=NaN,f=NaN),g.type&y.LINE_COMMANDS||g.type&y.ARC&&(g.rX===0||g.rY===0||!g.lArcFlag)||g.type&y.CURVE_TO||g.type&y.SMOOTH_CURVE_TO||g.type&y.QUAD_TO||g.type&y.SMOOTH_QUAD_TO){var E=g.x===void 0?0:g.relative?g.x:g.x-c,C=g.y===void 0?0:g.relative?g.y:g.y-d;b=isNaN(u)?g.x1===void 0?b:g.relative?g.x:g.x1-c:u-c,v=isNaN(f)?g.y1===void 0?v:g.relative?g.y:g.y1-d:f-d;var T=g.x2===void 0?0:g.relative?g.x:g.x2-c,O=g.y2===void 0?0:g.relative?g.y:g.y2-d;x(E)<=r&&x(C)<=r&&x(b)<=r&&x(v)<=r&&x(T)<=r&&x(O)<=r&&(A=!0)}return g.type&y.CLOSE_PATH&&x(c-p)<=r&&x(d-m)<=r&&(A=!0),A?[]:g})},l.MATRIX=n,l.ROTATE=function(r,o,h){o===void 0&&(o=0),h===void 0&&(h=0),J(r,o,h);var u=Math.sin(r),f=Math.cos(r);return n(f,u,-u,f,o-o*f+h*u,h-o*u-h*f)},l.TRANSLATE=function(r,o){return o===void 0&&(o=0),J(r,o),n(1,0,0,1,r,o)},l.SCALE=function(r,o){return o===void 0&&(o=r),J(r,o),n(r,0,0,o,0,0)},l.SKEW_X=function(r){return J(r),n(1,0,Math.atan(r),1,0,0)},l.SKEW_Y=function(r){return J(r),n(1,Math.atan(r),0,1,0,0)},l.X_AXIS_SYMMETRY=function(r){return r===void 0&&(r=0),J(r),n(-1,0,0,1,r,0)},l.Y_AXIS_SYMMETRY=function(r){return r===void 0&&(r=0),J(r),n(1,0,0,-1,0,r)},l.A_TO_C=function(){return s(function(r,o,h){return y.ARC===r.type?function(u,f,g){var c,d,p,m;u.cX||ne(u,f,g);for(var x=Math.min(u.phi1,u.phi2),A=Math.max(u.phi1,u.phi2)-x,b=Math.ceil(A/90),v=new Array(b),E=f,C=g,T=0;T<b;T++){var O=ze(u.phi1,u.phi2,T/b),R=ze(u.phi1,u.phi2,(T+1)/b),F=R-O,z=4/3*Math.tan(F*it/4),_=[Math.cos(O*it)-z*Math.sin(O*it),Math.sin(O*it)+z*Math.cos(O*it)],X=_[0],B=_[1],L=[Math.cos(R*it),Math.sin(R*it)],H=L[0],U=L[1],$=[H+z*Math.sin(R*it),U-z*Math.cos(R*it)],k=$[0],V=$[1];v[T]={relative:u.relative,type:y.CURVE_TO};var W=function(j,tt){var at=oe([j*u.rX,tt*u.rY],u.xRot),xt=at[0],Pt=at[1];return[u.cX+xt,u.cY+Pt]};c=W(X,B),v[T].x1=c[0],v[T].y1=c[1],d=W(k,V),v[T].x2=d[0],v[T].y2=d[1],p=W(H,U),v[T].x=p[0],v[T].y=p[1],u.relative&&(v[T].x1-=E,v[T].y1-=C,v[T].x2-=E,v[T].y2-=C,v[T].x-=E,v[T].y-=C),E=(m=[v[T].x,v[T].y])[0],C=m[1]}return v}(r,r.relative?0:o,r.relative?0:h):r})},l.ANNOTATE_ARCS=function(){return s(function(r,o,h){return r.relative&&(o=0,h=0),y.ARC===r.type&&ne(r,o,h),r})},l.CLONE=a,l.CALCULATE_BOUNDS=function(){var r=function(g){var c={};for(var d in g)c[d]=g[d];return c},o=t(),h=i(),u=e(),f=s(function(g,c,d){var p=u(h(o(r(g))));function m(V){V>f.maxX&&(f.maxX=V),V<f.minX&&(f.minX=V)}function x(V){V>f.maxY&&(f.maxY=V),V<f.minY&&(f.minY=V)}if(p.type&y.DRAWING_COMMANDS&&(m(c),x(d)),p.type&y.HORIZ_LINE_TO&&m(p.x),p.type&y.VERT_LINE_TO&&x(p.y),p.type&y.LINE_TO&&(m(p.x),x(p.y)),p.type&y.CURVE_TO){m(p.x),x(p.y);for(var A=0,b=Xe(c,p.x1,p.x2,p.x);A<b.length;A++)0<(k=b[A])&&1>k&&m(He(c,p.x1,p.x2,p.x,k));for(var v=0,E=Xe(d,p.y1,p.y2,p.y);v<E.length;v++)0<(k=E[v])&&1>k&&x(He(d,p.y1,p.y2,p.y,k))}if(p.type&y.ARC){m(p.x),x(p.y),ne(p,c,d);for(var C=p.xRot/180*Math.PI,T=Math.cos(C)*p.rX,O=Math.sin(C)*p.rX,R=-Math.sin(C)*p.rY,F=Math.cos(C)*p.rY,z=p.phi1<p.phi2?[p.phi1,p.phi2]:-180>p.phi2?[p.phi2+360,p.phi1+360]:[p.phi2,p.phi1],_=z[0],X=z[1],B=function(V){var W=V[0],j=V[1],tt=180*Math.atan2(j,W)/Math.PI;return tt<_?tt+360:tt},L=0,H=Fe(R,-T,0).map(B);L<H.length;L++)(k=H[L])>_&&k<X&&m(Ue(p.cX,T,R,k));for(var U=0,$=Fe(F,-O,0).map(B);U<$.length;U++){var k;(k=$[U])>_&&k<X&&x(Ue(p.cY,O,F,k))}}return g});return f.minX=1/0,f.maxX=-1/0,f.minY=1/0,f.maxY=-1/0,f}})(D||(D={}));var K,je=function(){function l(){}return l.prototype.round=function(t){return this.transform(D.ROUND(t))},l.prototype.toAbs=function(){return this.transform(D.TO_ABS())},l.prototype.toRel=function(){return this.transform(D.TO_REL())},l.prototype.normalizeHVZ=function(t,e,i){return this.transform(D.NORMALIZE_HVZ(t,e,i))},l.prototype.normalizeST=function(){return this.transform(D.NORMALIZE_ST())},l.prototype.qtToC=function(){return this.transform(D.QT_TO_C())},l.prototype.aToC=function(){return this.transform(D.A_TO_C())},l.prototype.sanitize=function(t){return this.transform(D.SANITIZE(t))},l.prototype.translate=function(t,e){return this.transform(D.TRANSLATE(t,e))},l.prototype.scale=function(t,e){return this.transform(D.SCALE(t,e))},l.prototype.rotate=function(t,e,i){return this.transform(D.ROTATE(t,e,i))},l.prototype.matrix=function(t,e,i,s,n,a){return this.transform(D.MATRIX(t,e,i,s,n,a))},l.prototype.skewX=function(t){return this.transform(D.SKEW_X(t))},l.prototype.skewY=function(t){return this.transform(D.SKEW_Y(t))},l.prototype.xSymmetry=function(t){return this.transform(D.X_AXIS_SYMMETRY(t))},l.prototype.ySymmetry=function(t){return this.transform(D.Y_AXIS_SYMMETRY(t))},l.prototype.annotateArcs=function(){return this.transform(D.ANNOTATE_ARCS())},l}(),$i=function(l){return l===" "||l===" "||l==="\r"||l===`
|
|
15
|
-
`},Ye=function(l){return 48<=l.charCodeAt(0)&&l.charCodeAt(0)<=57},Zi=function(l){function t(){var e=l.call(this)||this;return e.curNumber="",e.curCommandType=-1,e.curCommandRelative=!1,e.canParseCommandOrComma=!0,e.curNumberHasExp=!1,e.curNumberHasExpDigits=!1,e.curNumberHasDecimal=!1,e.curArgs=[],e}return Ze(t,l),t.prototype.finish=function(e){if(e===void 0&&(e=[]),this.parse(" ",e),this.curArgs.length!==0||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return e},t.prototype.parse=function(e,i){var s=this;i===void 0&&(i=[]);for(var n=function(f){i.push(f),s.curArgs.length=0,s.canParseCommandOrComma=!0},a=0;a<e.length;a++){var r=e[a],o=!(this.curCommandType!==y.ARC||this.curArgs.length!==3&&this.curArgs.length!==4||this.curNumber.length!==1||this.curNumber!=="0"&&this.curNumber!=="1"),h=Ye(r)&&(this.curNumber==="0"&&r==="0"||o);if(!Ye(r)||h)if(r!=="e"&&r!=="E")if(r!=="-"&&r!=="+"||!this.curNumberHasExp||this.curNumberHasExpDigits)if(r!=="."||this.curNumberHasExp||this.curNumberHasDecimal||o){if(this.curNumber&&this.curCommandType!==-1){var u=Number(this.curNumber);if(isNaN(u))throw new SyntaxError("Invalid number ending at "+a);if(this.curCommandType===y.ARC){if(this.curArgs.length===0||this.curArgs.length===1){if(0>u)throw new SyntaxError('Expected positive number, got "'+u+'" at index "'+a+'"')}else if((this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber!=="0"&&this.curNumber!=="1")throw new SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+a+'"')}this.curArgs.push(u),this.curArgs.length===ji[this.curCommandType]&&(y.HORIZ_LINE_TO===this.curCommandType?n({type:y.HORIZ_LINE_TO,relative:this.curCommandRelative,x:u}):y.VERT_LINE_TO===this.curCommandType?n({type:y.VERT_LINE_TO,relative:this.curCommandRelative,y:u}):this.curCommandType===y.MOVE_TO||this.curCommandType===y.LINE_TO||this.curCommandType===y.SMOOTH_QUAD_TO?(n({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),y.MOVE_TO===this.curCommandType&&(this.curCommandType=y.LINE_TO)):this.curCommandType===y.CURVE_TO?n({type:y.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===y.SMOOTH_CURVE_TO?n({type:y.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===y.QUAD_TO?n({type:y.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===y.ARC&&n({type:y.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!$i(r))if(r===","&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if(r!=="+"&&r!=="-"&&r!==".")if(h)this.curNumber=r,this.curNumberHasDecimal=!1;else{if(this.curArgs.length!==0)throw new SyntaxError("Unterminated command at index "+a+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+r+'" at index '+a+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,r!=="z"&&r!=="Z")if(r==="h"||r==="H")this.curCommandType=y.HORIZ_LINE_TO,this.curCommandRelative=r==="h";else if(r==="v"||r==="V")this.curCommandType=y.VERT_LINE_TO,this.curCommandRelative=r==="v";else if(r==="m"||r==="M")this.curCommandType=y.MOVE_TO,this.curCommandRelative=r==="m";else if(r==="l"||r==="L")this.curCommandType=y.LINE_TO,this.curCommandRelative=r==="l";else if(r==="c"||r==="C")this.curCommandType=y.CURVE_TO,this.curCommandRelative=r==="c";else if(r==="s"||r==="S")this.curCommandType=y.SMOOTH_CURVE_TO,this.curCommandRelative=r==="s";else if(r==="q"||r==="Q")this.curCommandType=y.QUAD_TO,this.curCommandRelative=r==="q";else if(r==="t"||r==="T")this.curCommandType=y.SMOOTH_QUAD_TO,this.curCommandRelative=r==="t";else{if(r!=="a"&&r!=="A")throw new SyntaxError('Unexpected character "'+r+'" at index '+a+".");this.curCommandType=y.ARC,this.curCommandRelative=r==="a"}else i.push({type:y.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=r,this.curNumberHasDecimal=r==="."}else this.curNumber+=r,this.curNumberHasDecimal=!0;else this.curNumber+=r;else this.curNumber+=r,this.curNumberHasExp=!0;else this.curNumber+=r,this.curNumberHasExpDigits=this.curNumberHasExp}return i},t.prototype.transform=function(e){return Object.create(this,{parse:{value:function(i,s){s===void 0&&(s=[]);for(var n=0,a=Object.getPrototypeOf(this).parse.call(this,i);n<a.length;n++){var r=a[n],o=e(r);Array.isArray(o)?s.push.apply(s,o):s.push(o)}return s}}})},t}(je),y=function(l){function t(e){var i=l.call(this)||this;return i.commands=typeof e=="string"?t.parse(e):e,i}return Ze(t,l),t.prototype.encode=function(){return t.encode(this.commands)},t.prototype.getBounds=function(){var e=D.CALCULATE_BOUNDS();return this.transform(e),e},t.prototype.transform=function(e){for(var i=[],s=0,n=this.commands;s<n.length;s++){var a=e(n[s]);Array.isArray(a)?i.push.apply(i,a):i.push(a)}return this.commands=i,this},t.encode=function(e){return Qi(e)},t.parse=function(e){var i=new Zi,s=[];return i.parse(e,s),i.finish(s),s},t.CLOSE_PATH=1,t.MOVE_TO=2,t.HORIZ_LINE_TO=4,t.VERT_LINE_TO=8,t.LINE_TO=16,t.CURVE_TO=32,t.SMOOTH_CURVE_TO=64,t.QUAD_TO=128,t.SMOOTH_QUAD_TO=256,t.ARC=512,t.LINE_COMMANDS=t.LINE_TO|t.HORIZ_LINE_TO|t.VERT_LINE_TO,t.DRAWING_COMMANDS=t.HORIZ_LINE_TO|t.VERT_LINE_TO|t.LINE_TO|t.CURVE_TO|t.SMOOTH_CURVE_TO|t.QUAD_TO|t.SMOOTH_QUAD_TO|t.ARC,t}(je),ji=((K={})[y.MOVE_TO]=2,K[y.LINE_TO]=2,K[y.HORIZ_LINE_TO]=1,K[y.VERT_LINE_TO]=1,K[y.CLOSE_PATH]=0,K[y.QUAD_TO]=4,K[y.SMOOTH_QUAD_TO]=2,K[y.CURVE_TO]=6,K[y.SMOOTH_CURVE_TO]=4,K[y.ARC]=7,K);function _t(l){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_t=function(t){return typeof t}:_t=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_t(l)}function Ki(l,t){if(!(l instanceof t))throw new TypeError("Cannot call a class as a function")}var Ji=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],ts=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function es(l,t,e,i,s){if(typeof l=="string"&&(l=document.getElementById(l)),!l||_t(l)!=="object"||!("getContext"in l))throw new TypeError("Expecting canvas with `getContext` method in processCanvasRGB(A) calls!");var n=l.getContext("2d");try{return n.getImageData(t,e,i,s)}catch(a){throw new Error("unable to access image data: "+a)}}function is(l,t,e,i,s,n){if(!(isNaN(n)||n<1)){n|=0;var a=es(l,t,e,i,s);a=ss(a,t,e,i,s,n),l.getContext("2d").putImageData(a,t,e)}}function ss(l,t,e,i,s,n){for(var a=l.data,r=2*n+1,o=i-1,h=s-1,u=n+1,f=u*(u+1)/2,g=new We,c=g,d,p=1;p<r;p++)c=c.next=new We,p===u&&(d=c);c.next=g;for(var m=null,x=null,A=0,b=0,v=Ji[n],E=ts[n],C=0;C<s;C++){c=g;for(var T=a[b],O=a[b+1],R=a[b+2],F=a[b+3],z=0;z<u;z++)c.r=T,c.g=O,c.b=R,c.a=F,c=c.next;for(var _=0,X=0,B=0,L=0,H=u*T,U=u*O,$=u*R,k=u*F,V=f*T,W=f*O,j=f*R,tt=f*F,at=1;at<u;at++){var xt=b+((o<at?o:at)<<2),Pt=a[xt],Pe=a[xt+1],Me=a[xt+2],Ne=a[xt+3],Mt=u-at;V+=(c.r=Pt)*Mt,W+=(c.g=Pe)*Mt,j+=(c.b=Me)*Mt,tt+=(c.a=Ne)*Mt,_+=Pt,X+=Pe,B+=Me,L+=Ne,c=c.next}m=g,x=d;for(var Yt=0;Yt<i;Yt++){var Wt=tt*v>>>E;if(a[b+3]=Wt,Wt!==0){var qt=255/Wt;a[b]=(V*v>>>E)*qt,a[b+1]=(W*v>>>E)*qt,a[b+2]=(j*v>>>E)*qt}else a[b]=a[b+1]=a[b+2]=0;V-=H,W-=U,j-=$,tt-=k,H-=m.r,U-=m.g,$-=m.b,k-=m.a;var ut=Yt+n+1;ut=A+(ut<o?ut:o)<<2,_+=m.r=a[ut],X+=m.g=a[ut+1],B+=m.b=a[ut+2],L+=m.a=a[ut+3],V+=_,W+=X,j+=B,tt+=L,m=m.next;var Nt=x,Oe=Nt.r,Ve=Nt.g,ke=Nt.b,Re=Nt.a;H+=Oe,U+=Ve,$+=ke,k+=Re,_-=Oe,X-=Ve,B-=ke,L-=Re,x=x.next,b+=4}A+=i}for(var bt=0;bt<i;bt++){b=bt<<2;var ct=a[b],ft=a[b+1],gt=a[b+2],q=a[b+3],Gt=u*ct,Qt=u*ft,$t=u*gt,Zt=u*q,Ot=f*ct,Vt=f*ft,kt=f*gt,Rt=f*q;c=g;for(var Le=0;Le<u;Le++)c.r=ct,c.g=ft,c.b=gt,c.a=q,c=c.next;for(var Ie=i,jt=0,Kt=0,Jt=0,te=0,Lt=1;Lt<=n;Lt++){b=Ie+bt<<2;var It=u-Lt;Ot+=(c.r=ct=a[b])*It,Vt+=(c.g=ft=a[b+1])*It,kt+=(c.b=gt=a[b+2])*It,Rt+=(c.a=q=a[b+3])*It,te+=ct,jt+=ft,Kt+=gt,Jt+=q,c=c.next,Lt<h&&(Ie+=i)}b=bt,m=g,x=d;for(var ee=0;ee<s;ee++){var G=b<<2;a[G+3]=q=Rt*v>>>E,q>0?(q=255/q,a[G]=(Ot*v>>>E)*q,a[G+1]=(Vt*v>>>E)*q,a[G+2]=(kt*v>>>E)*q):a[G]=a[G+1]=a[G+2]=0,Ot-=Gt,Vt-=Qt,kt-=$t,Rt-=Zt,Gt-=m.r,Qt-=m.g,$t-=m.b,Zt-=m.a,G=bt+((G=ee+u)<h?G:h)*i<<2,Ot+=te+=m.r=a[G],Vt+=jt+=m.g=a[G+1],kt+=Kt+=m.b=a[G+2],Rt+=Jt+=m.a=a[G+3],m=m.next,Gt+=ct=x.r,Qt+=ft=x.g,$t+=gt=x.b,Zt+=q=x.a,te-=ct,jt-=ft,Kt-=gt,Jt-=q,x=x.next,b+=i}}return l}var We=function l(){Ki(this,l),this.r=0,this.g=0,this.b=0,this.a=0,this.next=null};function ns(){let{DOMParser:l}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:l,createCanvas(e,i){return new OffscreenCanvas(e,i)},async createImage(e){const s=await(await fetch(e)).blob();return await createImageBitmap(s)}};return(typeof globalThis.DOMParser<"u"||typeof l>"u")&&Reflect.deleteProperty(t,"DOMParser"),t}function rs(l){let{DOMParser:t,canvas:e,fetch:i}=l;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:t,fetch:i,createCanvas:e.createCanvas,createImage:e.loadImage}}var as=Object.freeze({__proto__:null,offscreen:ns,node:rs});function yt(l){return l.replace(/(?!\u3000)\s+/gm," ")}function Ke(l){return l.replace(/^[\n \t]+/,"")}function Je(l){return l.replace(/[\n \t]+$/,"")}function Q(l){const t=l.match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm);return t?t.map(parseFloat):[]}function ti(l){const t=Q(l);return[t[0]||0,t[1]||0,t[2]||0,t[3]||0,t[4]||0,t[5]||0]}const os=/^[A-Z-]+$/;function ei(l){return os.test(l)?l.toLowerCase():l}function ye(l){const t=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(l);return t&&(t[2]||t[3]||t[4])||""}function ii(l){if(!l.startsWith("rgb"))return l;let t=3;return l.replace(/\d+(\.\d+)?/g,(i,s)=>t--&&s?String(Math.round(parseFloat(i))):i)}const hs=/(\[[^\]]+\])/g,ls=/(#[^\s+>~.[:]+)/g,us=/(\.[^\s+>~.[:]+)/g,cs=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,fs=/(:[\w-]+\([^)]*\))/gi,gs=/(:[^\s+>~.[:]+)/g,ds=/([^\s+>~.[:]+)/g;function dt(l,t){const e=t.exec(l);return e?[l.replace(t," "),e.length]:[l,0]}function si(l){const t=[0,0,0];let e=l.replace(/:not\(([^)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),i=0;return[e,i]=dt(e,hs),t[1]+=i,[e,i]=dt(e,ls),t[0]+=i,[e,i]=dt(e,us),t[1]+=i,[e,i]=dt(e,cs),t[2]+=i,[e,i]=dt(e,fs),t[1]+=i,[e,i]=dt(e,gs),t[1]+=i,e=e.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),[e,i]=dt(e,ds),t[2]+=i,t.join("")}const mt=1e-8;function he(l){return Math.sqrt(Math.pow(l[0],2)+Math.pow(l[1],2))}function zt(l,t){return(l[0]*t[0]+l[1]*t[1])/(he(l)*he(t))}function le(l,t){return(l[0]*t[1]<l[1]*t[0]?-1:1)*Math.acos(zt(l,t))}function ue(l){return l*l*l}function ce(l){return 3*l*l*(1-l)}function fe(l){return 3*l*(1-l)*(1-l)}function ge(l){return(1-l)*(1-l)*(1-l)}function de(l){return l*l}function pe(l){return 2*l*(1-l)}function me(l){return(1-l)*(1-l)}class S{static empty(t){return new S(t,"EMPTY","")}split(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:" ";const{document:e,name:i}=this;return yt(this.getString()).trim().split(t).map(s=>new S(e,i,s))}hasValue(t){const e=this.value;return e!==null&&e!==""&&(t||e!==0)&&typeof e<"u"}isString(t){const{value:e}=this,i=typeof e=="string";return!i||!t?i:t.test(e)}isUrlDefinition(){return this.isString(/^url\(/)}isPixels(){if(!this.hasValue())return!1;const t=this.getString();switch(!0){case t.endsWith("px"):case/^[0-9]+$/.test(t):return!0;default:return!1}}setValue(t){return this.value=t,this}getValue(t){return typeof t>"u"||this.hasValue()?this.value:t}getNumber(t){if(!this.hasValue())return typeof t>"u"?0:parseFloat(t);const{value:e}=this;let i=parseFloat(e);return this.isString(/%$/)&&(i/=100),i}getString(t){return typeof t>"u"||this.hasValue()?typeof this.value>"u"?"":String(this.value):String(t)}getColor(t){let e=this.getString(t);return this.isNormalizedColor||(this.isNormalizedColor=!0,e=ii(e),this.value=e),e}getDpi(){return 96}getRem(){return this.document.rootEmSize}getEm(){return this.document.emSize}getUnits(){return this.getString().replace(/[0-9.-]/g,"")}getPixels(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!this.hasValue())return 0;const[i,s]=typeof t=="boolean"?[void 0,t]:[t],{viewPort:n}=this.document.screen;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(n.computeSize("x"),n.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(n.computeSize("x"),n.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*n.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*n.computeSize("y");case this.isString(/rem$/):return this.getNumber()*this.getRem();case this.isString(/em$/):return this.getNumber()*this.getEm();case this.isString(/ex$/):return this.getNumber()*this.getEm()/2;case this.isString(/px$/):return this.getNumber();case this.isString(/pt$/):return this.getNumber()*this.getDpi()*(1/72);case this.isString(/pc$/):return this.getNumber()*15;case this.isString(/cm$/):return this.getNumber()*this.getDpi()/2.54;case this.isString(/mm$/):return this.getNumber()*this.getDpi()/25.4;case this.isString(/in$/):return this.getNumber()*this.getDpi();case(this.isString(/%$/)&&s):return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*n.computeSize(i);default:{const a=this.getNumber();return e&&a<1?a*n.computeSize(i):a}}}getMilliseconds(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():this.getNumber()*1e3:0}getRadians(){if(!this.hasValue())return 0;switch(!0){case this.isString(/deg$/):return this.getNumber()*(Math.PI/180);case this.isString(/grad$/):return this.getNumber()*(Math.PI/200);case this.isString(/rad$/):return this.getNumber();default:return this.getNumber()*(Math.PI/180)}}getDefinition(){const t=this.getString(),e=/#([^)'"]+)/.exec(t),i=(e==null?void 0:e[1])||t;return this.document.definitions.get(i)}getFillStyleDefinition(t,e){let i=this.getDefinition();if(!i)return null;if(typeof i.createGradient=="function"&&"getBoundingBox"in t)return i.createGradient(this.document.ctx,t,e);if(typeof i.createPattern=="function"){if(i.getHrefAttribute().hasValue()){const s=i.getAttribute("patternTransform");i=i.getHrefAttribute().getDefinition(),i&&s.hasValue()&&i.getAttribute("patternTransform",!0).setValue(s.value)}if(i)return i.createPattern(this.document.ctx,t,e)}return null}getTextBaseline(){if(!this.hasValue())return null;const t=this.getString();return S.textBaselineMapping[t]||null}addOpacity(t){let e=this.getColor();const i=e.length;let s=0;for(let n=0;n<i&&(e[n]===","&&s++,s!==3);n++);if(t.hasValue()&&this.isString()&&s!==3){const n=new ae(e);n.ok&&(n.alpha=t.getNumber(),e=n.toRGBA())}return new S(this.document,this.name,e)}constructor(t,e,i){this.document=t,this.name=e,this.value=i,this.isNormalizedColor=!1}}S.textBaselineMapping={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};class St{clear(){this.viewPorts=[]}setCurrent(t,e){this.viewPorts.push({width:t,height:e})}removeCurrent(){this.viewPorts.pop()}getRoot(){const[t]=this.viewPorts;return t||qe()}getCurrent(){const{viewPorts:t}=this,e=t[t.length-1];return e||qe()}get width(){return this.getCurrent().width}get height(){return this.getCurrent().height}computeSize(t){return typeof t=="number"?t:t==="x"?this.width:t==="y"?this.height:Math.sqrt(Math.pow(this.width,2)+Math.pow(this.height,2))/Math.sqrt(2)}constructor(){this.viewPorts=[]}}St.DEFAULT_VIEWPORT_WIDTH=800;St.DEFAULT_VIEWPORT_HEIGHT=600;function qe(){return{width:St.DEFAULT_VIEWPORT_WIDTH,height:St.DEFAULT_VIEWPORT_HEIGHT}}class N{static parse(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const[i=e,s=e]=Q(t);return new N(i,s)}static parseScale(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;const[i=e,s=i]=Q(t);return new N(i,s)}static parsePath(t){const e=Q(t),i=e.length,s=[];for(let n=0;n<i;n+=2)s.push(new N(e[n],e[n+1]));return s}angleTo(t){return Math.atan2(t.y-this.y,t.x-this.x)}applyTransform(t){const{x:e,y:i}=this,s=e*t[0]+i*t[2]+t[4],n=e*t[1]+i*t[3]+t[5];this.x=s,this.y=n}constructor(t,e){this.x=t,this.y=e}}class ni{isWorking(){return this.working}start(){if(this.working)return;const{screen:t,onClick:e,onMouseMove:i}=this,s=t.ctx.canvas;s.onclick=e,s.onmousemove=i,this.working=!0}stop(){if(!this.working)return;const t=this.screen.ctx.canvas;this.working=!1,t.onclick=null,t.onmousemove=null}hasEvents(){return this.working&&this.events.length>0}runEvents(){if(!this.working)return;const{screen:t,events:e,eventElements:i}=this,{style:s}=t.ctx.canvas;let n;s&&(s.cursor=""),e.forEach((a,r)=>{let{run:o}=a;for(n=i[r];n;)o(n),n=n.parent}),this.events=[],this.eventElements=[]}checkPath(t,e){if(!this.working||!e)return;const{events:i,eventElements:s}=this;i.forEach((n,a)=>{let{x:r,y:o}=n;!s[a]&&e.isPointInPath&&e.isPointInPath(r,o)&&(s[a]=t)})}checkBoundingBox(t,e){if(!this.working||!e)return;const{events:i,eventElements:s}=this;i.forEach((n,a)=>{let{x:r,y:o}=n;!s[a]&&e.isPointInBox(r,o)&&(s[a]=t)})}mapXY(t,e){const{window:i,ctx:s}=this.screen,n=new N(t,e);let a=s.canvas;for(;a;)n.x-=a.offsetLeft,n.y-=a.offsetTop,a=a.offsetParent;return i!=null&&i.scrollX&&(n.x+=i.scrollX),i!=null&&i.scrollY&&(n.y+=i.scrollY),n}onClick(t){const{x:e,y:i}=this.mapXY(t.clientX,t.clientY);this.events.push({type:"onclick",x:e,y:i,run(s){s.onClick&&s.onClick()}})}onMouseMove(t){const{x:e,y:i}=this.mapXY(t.clientX,t.clientY);this.events.push({type:"onmousemove",x:e,y:i,run(s){s.onMouseMove&&s.onMouseMove()}})}constructor(t){this.screen=t,this.working=!1,this.events=[],this.eventElements=[],this.onClick=this.onClick.bind(this),this.onMouseMove=this.onMouseMove.bind(this)}}const ri=typeof window<"u"?window:null,ai=typeof fetch<"u"?fetch.bind(void 0):void 0;class et{wait(t){this.waits.push(t)}ready(){return this.readyPromise?this.readyPromise:Promise.resolve()}isReady(){if(this.isReadyLock)return!0;const t=this.waits.every(e=>e());return t&&(this.waits=[],this.resolveReady&&this.resolveReady()),this.isReadyLock=t,t}setDefaults(t){t.strokeStyle="rgba(0,0,0,0)",t.lineCap="butt",t.lineJoin="miter",t.miterLimit=4}setViewBox(t){let{document:e,ctx:i,aspectRatio:s,width:n,desiredWidth:a,height:r,desiredHeight:o,minX:h=0,minY:u=0,refX:f,refY:g,clip:c=!1,clipX:d=0,clipY:p=0}=t;const m=yt(s).replace(/^defer\s/,""),[x,A]=m.split(" "),b=x||"xMidYMid",v=A||"meet",E=n/a,C=r/o,T=Math.min(E,C),O=Math.max(E,C);let R=a,F=o;v==="meet"&&(R*=T,F*=T),v==="slice"&&(R*=O,F*=O);const z=new S(e,"refX",f),_=new S(e,"refY",g),X=z.hasValue()&&_.hasValue();if(X&&i.translate(-T*z.getPixels("x"),-T*_.getPixels("y")),c){const B=T*d,L=T*p;i.beginPath(),i.moveTo(B,L),i.lineTo(n,L),i.lineTo(n,r),i.lineTo(B,r),i.closePath(),i.clip()}if(!X){const B=v==="meet"&&T===C,L=v==="slice"&&O===C,H=v==="meet"&&T===E,U=v==="slice"&&O===E;b.startsWith("xMid")&&(B||L)&&i.translate(n/2-R/2,0),b.endsWith("YMid")&&(H||U)&&i.translate(0,r/2-F/2),b.startsWith("xMax")&&(B||L)&&i.translate(n-R,0),b.endsWith("YMax")&&(H||U)&&i.translate(0,r-F)}switch(!0){case b==="none":i.scale(E,C);break;case v==="meet":i.scale(T,T);break;case v==="slice":i.scale(O,O);break}i.translate(-h,-u)}start(t){let{enableRedraw:e=!1,ignoreMouse:i=!1,ignoreAnimation:s=!1,ignoreDimensions:n=!1,ignoreClear:a=!1,forceRedraw:r,scaleWidth:o,scaleHeight:h,offsetX:u,offsetY:f}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{mouse:g}=this,c=1e3/et.FRAMERATE;if(this.isReadyLock=!1,this.frameDuration=c,this.readyPromise=new Promise(A=>{this.resolveReady=A}),this.isReady()&&this.render(t,n,a,o,h,u,f),!e)return;let d=Date.now(),p=d,m=0;const x=()=>{d=Date.now(),m=d-p,m>=c&&(p=d-m%c,this.shouldUpdate(s,r)&&(this.render(t,n,a,o,h,u,f),g.runEvents())),this.intervalId=ie(x)};i||g.start(),this.intervalId=ie(x)}stop(){this.intervalId&&(ie.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}shouldUpdate(t,e){if(!t){const{frameDuration:i}=this;if(this.animations.reduce((n,a)=>a.update(i)||n,!1))return!0}return!!(typeof e=="function"&&e()||!this.isReadyLock&&this.isReady()||this.mouse.hasEvents())}render(t,e,i,s,n,a,r){const{viewPort:o,ctx:h,isFirstRender:u}=this,f=h.canvas;o.clear(),f.width&&f.height&&o.setCurrent(f.width,f.height);const g=t.getStyle("width"),c=t.getStyle("height");!e&&(u||typeof s!="number"&&typeof n!="number")&&(g.hasValue()&&(f.width=g.getPixels("x"),f.style&&(f.style.width="".concat(f.width,"px"))),c.hasValue()&&(f.height=c.getPixels("y"),f.style&&(f.style.height="".concat(f.height,"px"))));let d=f.clientWidth||f.width,p=f.clientHeight||f.height;if(e&&g.hasValue()&&c.hasValue()&&(d=g.getPixels("x"),p=c.getPixels("y")),o.setCurrent(d,p),typeof a=="number"&&t.getAttribute("x",!0).setValue(a),typeof r=="number"&&t.getAttribute("y",!0).setValue(r),typeof s=="number"||typeof n=="number"){const m=Q(t.getAttribute("viewBox").getString());let x=0,A=0;if(typeof s=="number"){const v=t.getStyle("width");v.hasValue()?x=v.getPixels("x")/s:m[2]&&!isNaN(m[2])&&(x=m[2]/s)}if(typeof n=="number"){const v=t.getStyle("height");v.hasValue()?A=v.getPixels("y")/n:m[3]&&!isNaN(m[3])&&(A=m[3]/n)}x||(x=A),A||(A=x),t.getAttribute("width",!0).setValue(s),t.getAttribute("height",!0).setValue(n);const b=t.getStyle("transform",!0,!0);b.setValue("".concat(b.getString()," scale(").concat(1/x,", ").concat(1/A,")"))}i||h.clearRect(0,0,d,p),t.render(h),u&&(this.isFirstRender=!1)}constructor(t,{fetch:e=ai,window:i=ri}={}){if(this.ctx=t,this.viewPort=new St,this.mouse=new ni(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=i,!e)throw new Error("Can't find 'fetch' in 'globalThis', please provide it via options");this.fetch=e}}et.defaultWindow=ri;et.defaultFetch=ai;et.FRAMERATE=30;et.MAX_VIRTUAL_PIXELS=3e4;const{defaultFetch:ps}=et,ms=typeof DOMParser<"u"?DOMParser:void 0;class Ft{async parse(t){return t.startsWith("<")?this.parseFromString(t):this.load(t)}parseFromString(t){const e=new this.DOMParser;try{return this.checkDocument(e.parseFromString(t,"image/svg+xml"))}catch{return this.checkDocument(e.parseFromString(t,"text/xml"))}}checkDocument(t){const e=t.getElementsByTagName("parsererror")[0];if(e)throw new Error(e.textContent||"Unknown parse error");return t}async load(t){const i=await(await this.fetch(t)).text();return this.parseFromString(i)}constructor({fetch:t=ps,DOMParser:e=ms}={}){if(!t)throw new Error("Can't find 'fetch' in 'globalThis', please provide it via options");if(!e)throw new Error("Can't find 'DOMParser' in 'globalThis', please provide it via options");this.fetch=t,this.DOMParser=e}}class oi{apply(t){const{x:e,y:i}=this.point;t.translate(e||0,i||0)}unapply(t){const{x:e,y:i}=this.point;t.translate(-1*e||0,-1*i||0)}applyToPoint(t){const{x:e,y:i}=this.point;t.applyTransform([1,0,0,1,e||0,i||0])}constructor(t,e){this.type="translate",this.point=N.parse(e)}}class hi{apply(t){const{cx:e,cy:i,originX:s,originY:n,angle:a}=this,r=e+s.getPixels("x"),o=i+n.getPixels("y");t.translate(r,o),t.rotate(a.getRadians()),t.translate(-r,-o)}unapply(t){const{cx:e,cy:i,originX:s,originY:n,angle:a}=this,r=e+s.getPixels("x"),o=i+n.getPixels("y");t.translate(r,o),t.rotate(-1*a.getRadians()),t.translate(-r,-o)}applyToPoint(t){const{cx:e,cy:i,angle:s}=this,n=s.getRadians();t.applyTransform([1,0,0,1,e||0,i||0]),t.applyTransform([Math.cos(n),Math.sin(n),-Math.sin(n),Math.cos(n),0,0]),t.applyTransform([1,0,0,1,-e||0,-i||0])}constructor(t,e,i){this.type="rotate";const s=Q(e);this.angle=new S(t,"angle",s[0]),this.originX=i[0],this.originY=i[1],this.cx=s[1]||0,this.cy=s[2]||0}}class li{apply(t){const{scale:{x:e,y:i},originX:s,originY:n}=this,a=s.getPixels("x"),r=n.getPixels("y");t.translate(a,r),t.scale(e,i||e),t.translate(-a,-r)}unapply(t){const{scale:{x:e,y:i},originX:s,originY:n}=this,a=s.getPixels("x"),r=n.getPixels("y");t.translate(a,r),t.scale(1/e,1/i||e),t.translate(-a,-r)}applyToPoint(t){const{x:e,y:i}=this.scale;t.applyTransform([e||0,0,0,i||0,0,0])}constructor(t,e,i){this.type="scale";const s=N.parseScale(e);(s.x===0||s.y===0)&&(s.x=mt,s.y=mt),this.scale=s,this.originX=i[0],this.originY=i[1]}}class xe{apply(t){const{originX:e,originY:i,matrix:s}=this,n=e.getPixels("x"),a=i.getPixels("y");t.translate(n,a),t.transform(s[0],s[1],s[2],s[3],s[4],s[5]),t.translate(-n,-a)}unapply(t){const{originX:e,originY:i,matrix:s}=this,n=s[0],a=s[2],r=s[4],o=s[1],h=s[3],u=s[5],f=0,g=0,c=1,d=1/(n*(h*c-u*g)-a*(o*c-u*f)+r*(o*g-h*f)),p=e.getPixels("x"),m=i.getPixels("y");t.translate(p,m),t.transform(d*(h*c-u*g),d*(u*f-o*c),d*(r*g-a*c),d*(n*c-r*f),d*(a*u-r*h),d*(r*o-n*u)),t.translate(-p,-m)}applyToPoint(t){t.applyTransform(this.matrix)}constructor(t,e,i){this.type="matrix",this.matrix=ti(e),this.originX=i[0],this.originY=i[1]}}class be extends xe{constructor(t,e,i){super(t,e,i),this.type="skew",this.angle=new S(t,"angle",e)}}class ui extends be{constructor(t,e,i){super(t,e,i),this.type="skewX",this.matrix=[1,0,Math.tan(this.angle.getRadians()),1,0,0]}}class ci extends be{constructor(t,e,i){super(t,e,i),this.type="skewY",this.matrix=[1,Math.tan(this.angle.getRadians()),0,1,0,0]}}function ys(l){return yt(l).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}function xs(l){const[t="",e=""]=l.split("(");return[t.trim(),e.trim().replace(")","")]}class ht{static fromElement(t,e){const i=e.getStyle("transform",!1,!0);if(i.hasValue()){const[s,n=s]=e.getStyle("transform-origin",!1,!0).split();if(s&&n){const a=[s,n];return new ht(t,i.getString(),a)}}return null}apply(t){this.transforms.forEach(e=>e.apply(t))}unapply(t){this.transforms.forEach(e=>e.unapply(t))}applyToPoint(t){this.transforms.forEach(e=>e.applyToPoint(t))}constructor(t,e,i){this.document=t,this.transforms=[],ys(e).forEach(n=>{if(n==="none")return;const[a,r]=xs(n),o=ht.transformTypes[a];o&&this.transforms.push(new o(this.document,r,i))})}}ht.transformTypes={translate:oi,rotate:hi,scale:li,matrix:xe,skewX:ui,skewY:ci};class M{getAttribute(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const i=this.attributes.get(t);if(!i&&e){const s=new S(this.document,t,"");return this.attributes.set(t,s),s}return i||S.empty(this.document)}getHrefAttribute(){let t;for(const[e,i]of this.attributes)if(e==="href"||e.endsWith(":href")){t=i;break}return t||S.empty(this.document)}getStyle(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const s=this.styles.get(t);if(s)return s;const n=this.getAttribute(t);if(n.hasValue())return this.styles.set(t,n),n;if(!i){const{parent:a}=this;if(a){const r=a.getStyle(t);if(r.hasValue())return r}}if(e){const a=new S(this.document,t,"");return this.styles.set(t,a),a}return S.empty(this.document)}render(t){if(!(this.getStyle("display").getString()==="none"||this.getStyle("visibility").getString()==="hidden")){if(t.save(),this.getStyle("mask").hasValue()){const e=this.getStyle("mask").getDefinition();e&&(this.applyEffects(t),e.apply(t,this))}else if(this.getStyle("filter").getValue("none")!=="none"){const e=this.getStyle("filter").getDefinition();e&&(this.applyEffects(t),e.apply(t,this))}else this.setContext(t),this.renderChildren(t),this.clearContext(t);t.restore()}}setContext(t){}applyEffects(t){const e=ht.fromElement(this.document,this);e&&e.apply(t);const i=this.getStyle("clip-path",!1,!0);if(i.hasValue()){const s=i.getDefinition();s&&s.apply(t)}}clearContext(t){}renderChildren(t){this.children.forEach(e=>{e.render(t)})}addChild(t){const e=t instanceof M?t:this.document.createElement(t);e.parent=this,M.ignoreChildTypes.includes(e.type)||this.children.push(e)}matchesSelector(t){var e;const{node:i}=this;if(typeof i.matches=="function")return i.matches(t);const s=(e=i.getAttribute)===null||e===void 0?void 0:e.call(i,"class");return!s||s===""?!1:s.split(" ").some(n=>".".concat(n)===t)}addStylesFromStyleDefinition(){const{styles:t,stylesSpecificity:e}=this.document;for(const[i,s]of t)if(!i.startsWith("@")&&this.matchesSelector(i)){const n=e.get(i);if(s)for(const[a,r]of s){let o=this.stylesSpecificity.get(a);typeof o>"u"&&(o="000"),n&&n>=o&&(r&&this.styles.set(a,r),this.stylesSpecificity.set(a,n))}}}removeStyles(t,e){return e.reduce((s,n)=>{const a=t.getStyle(n);if(!a.hasValue())return s;const r=a.getString();return a.setValue(""),[...s,[n,r]]},[])}restoreStyles(t,e){e.forEach(i=>{let[s,n]=i;t.getStyle(s,!0).setValue(n)})}isFirstChild(){var t;return((t=this.parent)===null||t===void 0?void 0:t.children.indexOf(this))===0}constructor(t,e,i=!1){if(this.document=t,this.node=e,this.captureTextNodes=i,this.type="",this.attributes=new Map,this.styles=new Map,this.stylesSpecificity=new Map,this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],!e||e.nodeType!==1)return;Array.from(e.attributes).forEach(a=>{const r=ei(a.nodeName);this.attributes.set(r,new S(t,r,a.value))}),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()&&this.getAttribute("style").getString().split(";").map(r=>r.trim()).forEach(r=>{if(!r)return;const[o,h]=r.split(":").map(u=>u.trim());o&&this.styles.set(o,new S(t,o,h))});const{definitions:s}=t,n=this.getAttribute("id");n.hasValue()&&(s.has(n.getString())||s.set(n.getString(),this)),Array.from(e.childNodes).forEach(a=>{if(a.nodeType===1)this.addChild(a);else if(i&&(a.nodeType===3||a.nodeType===4)){const r=t.createTextNode(a);r.getText().length>0&&this.addChild(r)}})}}M.ignoreChildTypes=["title"];class fi extends M{constructor(t,e,i){super(t,e,i)}}function bs(l){const t=l.trim();return/^('|")/.test(t)?t:'"'.concat(t,'"')}function vs(l){return typeof process>"u"?l:l.trim().split(",").map(bs).join(",")}function Ss(l){if(!l)return"";const t=l.trim().toLowerCase();switch(t){case"normal":case"italic":case"oblique":case"inherit":case"initial":case"unset":return t;default:return/^oblique\s+(-|)\d+deg$/.test(t)?t:""}}function As(l){if(!l)return"";const t=l.trim().toLowerCase();switch(t){case"normal":case"bold":case"lighter":case"bolder":case"inherit":case"initial":case"unset":return t;default:return/^[\d.]+$/.test(t)?t:""}}class Y{static parse(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0,i="",s="",n="",a="",r="";const o=yt(t).trim().split(" "),h={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return o.forEach(u=>{switch(!0){case(!h.fontStyle&&Y.styles.includes(u)):u!=="inherit"&&(i=u),h.fontStyle=!0;break;case(!h.fontVariant&&Y.variants.includes(u)):u!=="inherit"&&(s=u),h.fontStyle=!0,h.fontVariant=!0;break;case(!h.fontWeight&&Y.weights.includes(u)):u!=="inherit"&&(n=u),h.fontStyle=!0,h.fontVariant=!0,h.fontWeight=!0;break;case!h.fontSize:u!=="inherit"&&(a=u.split("/")[0]||""),h.fontStyle=!0,h.fontVariant=!0,h.fontWeight=!0,h.fontSize=!0;break;default:u!=="inherit"&&(r+=u)}}),new Y(i,s,n,a,r,e)}toString(){return[Ss(this.fontStyle),this.fontVariant,As(this.fontWeight),this.fontSize,vs(this.fontFamily)].join(" ").trim()}constructor(t,e,i,s,n,a){const r=a?typeof a=="string"?Y.parse(a):a:{};this.fontFamily=n||r.fontFamily,this.fontSize=s||r.fontSize,this.fontStyle=t||r.fontStyle,this.fontWeight=i||r.fontWeight,this.fontVariant=e||r.fontVariant}}Y.styles="normal|italic|oblique|inherit";Y.variants="normal|small-caps|inherit";Y.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";class Z{get x(){return this.x1}get y(){return this.y1}get width(){return this.x2-this.x1}get height(){return this.y2-this.y1}addPoint(t,e){typeof t<"u"&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=t,this.x2=t),t<this.x1&&(this.x1=t),t>this.x2&&(this.x2=t)),typeof e<"u"&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=e,this.y2=e),e<this.y1&&(this.y1=e),e>this.y2&&(this.y2=e))}addX(t){this.addPoint(t,0)}addY(t){this.addPoint(0,t)}addBoundingBox(t){if(!t)return;const{x1:e,y1:i,x2:s,y2:n}=t;this.addPoint(e,i),this.addPoint(s,n)}sumCubic(t,e,i,s,n){return Math.pow(1-t,3)*e+3*Math.pow(1-t,2)*t*i+3*(1-t)*Math.pow(t,2)*s+Math.pow(t,3)*n}bezierCurveAdd(t,e,i,s,n){const a=6*e-12*i+6*s,r=-3*e+9*i-9*s+3*n,o=3*i-3*e;if(r===0){if(a===0)return;const g=-o/a;0<g&&g<1&&(t?this.addX(this.sumCubic(g,e,i,s,n)):this.addY(this.sumCubic(g,e,i,s,n)));return}const h=Math.pow(a,2)-4*o*r;if(h<0)return;const u=(-a+Math.sqrt(h))/(2*r);0<u&&u<1&&(t?this.addX(this.sumCubic(u,e,i,s,n)):this.addY(this.sumCubic(u,e,i,s,n)));const f=(-a-Math.sqrt(h))/(2*r);0<f&&f<1&&(t?this.addX(this.sumCubic(f,e,i,s,n)):this.addY(this.sumCubic(f,e,i,s,n)))}addBezierCurve(t,e,i,s,n,a,r,o){this.addPoint(t,e),this.addPoint(r,o),this.bezierCurveAdd(!0,t,i,n,r),this.bezierCurveAdd(!1,e,s,a,o)}addQuadraticCurve(t,e,i,s,n,a){const r=t+.6666666666666666*(i-t),o=e+2/3*(s-e),h=r+1/3*(n-t),u=o+1/3*(a-e);this.addBezierCurve(t,e,r,h,o,u,n,a)}isPointInBox(t,e){const{x1:i,y1:s,x2:n,y2:a}=this;return i<=t&&t<=n&&s<=e&&e<=a}constructor(t=Number.NaN,e=Number.NaN,i=Number.NaN,s=Number.NaN){this.x1=t,this.y1=e,this.x2=i,this.y2=s,this.addPoint(t,e),this.addPoint(i,s)}}class lt extends M{calculateOpacity(){let t=1,e=this;for(;e;){const i=e.getStyle("opacity",!1,!0);i.hasValue(!0)&&(t*=i.getNumber()),e=e.parent}return t}setContext(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!e){const i=this.getStyle("fill"),s=this.getStyle("fill-opacity"),n=this.getStyle("stroke"),a=this.getStyle("stroke-opacity");if(i.isUrlDefinition()){const c=i.getFillStyleDefinition(this,s);c&&(t.fillStyle=c)}else if(i.hasValue()){i.getString()==="currentColor"&&i.setValue(this.getStyle("color").getColor());const c=i.getColor();c!=="inherit"&&(t.fillStyle=c==="none"?"rgba(0,0,0,0)":c)}if(s.hasValue()){const c=new S(this.document,"fill",t.fillStyle).addOpacity(s).getColor();t.fillStyle=c}if(n.isUrlDefinition()){const c=n.getFillStyleDefinition(this,a);c&&(t.strokeStyle=c)}else if(n.hasValue()){n.getString()==="currentColor"&&n.setValue(this.getStyle("color").getColor());const c=n.getString();c!=="inherit"&&(t.strokeStyle=c==="none"?"rgba(0,0,0,0)":c)}if(a.hasValue()){const c=new S(this.document,"stroke",t.strokeStyle).addOpacity(a).getString();t.strokeStyle=c}const r=this.getStyle("stroke-width");if(r.hasValue()){const c=r.getPixels();t.lineWidth=c||mt}const o=this.getStyle("stroke-linecap"),h=this.getStyle("stroke-linejoin"),u=this.getStyle("stroke-miterlimit"),f=this.getStyle("stroke-dasharray"),g=this.getStyle("stroke-dashoffset");if(o.hasValue()&&(t.lineCap=o.getString()),h.hasValue()&&(t.lineJoin=h.getString()),u.hasValue()&&(t.miterLimit=u.getNumber()),f.hasValue()&&f.getString()!=="none"){const c=Q(f.getString());typeof t.setLineDash<"u"?t.setLineDash(c):typeof t.webkitLineDash<"u"?t.webkitLineDash=c:typeof t.mozDash<"u"&&!(c.length===1&&c[0]===0)&&(t.mozDash=c);const d=g.getPixels();typeof t.lineDashOffset<"u"?t.lineDashOffset=d:typeof t.webkitLineDashOffset<"u"?t.webkitLineDashOffset=d:typeof t.mozDashOffset<"u"&&(t.mozDashOffset=d)}}if(this.modifiedEmSizeStack=!1,typeof t.font<"u"){const i=this.getStyle("font"),s=this.getStyle("font-style"),n=this.getStyle("font-variant"),a=this.getStyle("font-weight"),r=this.getStyle("font-size"),o=this.getStyle("font-family"),h=new Y(s.getString(),n.getString(),a.getString(),r.hasValue()?"".concat(r.getPixels(!0),"px"):"",o.getString(),Y.parse(i.getString(),t.font));s.setValue(h.fontStyle),n.setValue(h.fontVariant),a.setValue(h.fontWeight),r.setValue(h.fontSize),o.setValue(h.fontFamily),t.font=h.toString(),r.isPixels()&&(this.document.emSize=r.getPixels(),this.modifiedEmSizeStack=!0)}e||(this.applyEffects(t),t.globalAlpha=this.calculateOpacity())}clearContext(t){super.clearContext(t),this.modifiedEmSizeStack&&this.document.popEmSize()}constructor(...t){super(...t),this.modifiedEmSizeStack=!1}}class rt extends lt{setContext(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;super.setContext(t,e);const i=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();i&&(t.textBaseline=i)}initializeCoordinates(){this.x=0,this.y=0,this.leafTexts=[],this.textChunkStart=0,this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY}getBoundingBox(t){if(this.type!=="text")return this.getTElementBoundingBox(t);this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(t);let e=null;return this.children.forEach((i,s)=>{const n=this.getChildBoundingBox(t,this,this,s);e?e.addBoundingBox(n):e=n}),e}getFontSize(){const{document:t,parent:e}=this,i=Y.parse(t.ctx.font).fontSize;return e.getStyle("font-size").getNumber(i)}getTElementBoundingBox(t){const e=this.getFontSize();return new Z(this.x,this.y-e,this.x+this.measureText(t),this.y)}getGlyph(t,e,i){const s=e[i];let n;if(t.isArabic){var a;const r=e.length,o=e[i-1],h=e[i+1];let u="isolated";(i===0||o===" ")&&i<r-1&&h!==" "&&(u="terminal"),i>0&&o!==" "&&i<r-1&&h!==" "&&(u="medial"),i>0&&o!==" "&&(i===r-1||h===" ")&&(u="initial"),n=((a=t.arabicGlyphs.get(s))===null||a===void 0?void 0:a.get(u))||t.glyphs.get(s)}else n=t.glyphs.get(s);return n||(n=t.missingGlyph),n}getText(){return""}getTextFromNode(t){const e=t||this.node,i=Array.from(e.parentNode.childNodes),s=i.indexOf(e),n=i.length-1;let a=yt(e.textContent||"");return s===0&&(a=Ke(a)),s===n&&(a=Je(a)),a}renderChildren(t){if(this.type!=="text"){this.renderTElementChildren(t);return}this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(t),this.children.forEach((i,s)=>{this.renderChild(t,this,this,s)});const{mouse:e}=this.document.screen;e.isWorking()&&e.checkBoundingBox(this,this.getBoundingBox(t))}renderTElementChildren(t){const{document:e,parent:i}=this,s=this.getText(),n=i.getStyle("font-family").getDefinition();if(n){const{unitsPerEm:o}=n.fontFace,h=Y.parse(e.ctx.font),u=i.getStyle("font-size").getNumber(h.fontSize),f=i.getStyle("font-style").getString(h.fontStyle),g=u/o,c=n.isRTL?s.split("").reverse().join(""):s,d=Q(i.getAttribute("dx").getString()),p=c.length;for(let m=0;m<p;m++){const x=this.getGlyph(n,c,m);t.translate(this.x,this.y),t.scale(g,-g);const A=t.lineWidth;t.lineWidth=t.lineWidth*o/u,f==="italic"&&t.transform(1,0,.4,1,0,0),x.render(t),f==="italic"&&t.transform(1,0,-.4,1,0,0),t.lineWidth=A,t.scale(1/g,-1/g),t.translate(-this.x,-this.y),this.x+=u*(x.horizAdvX||n.horizAdvX)/o,typeof d[m]<"u"&&!isNaN(d[m])&&(this.x+=d[m])}return}const{x:a,y:r}=this;t.fillStyle&&t.fillText(s,a,r),t.strokeStyle&&t.strokeText(s,a,r)}applyAnchoring(){if(this.textChunkStart>=this.leafTexts.length)return;const t=this.leafTexts[this.textChunkStart],e=t.getStyle("text-anchor").getString("start"),i=!1;let s=0;e==="start"||e==="end"&&i?s=t.x-this.minX:e==="end"||e==="start"&&i?s=t.x-this.maxX:s=t.x-(this.minX+this.maxX)/2;for(let n=this.textChunkStart;n<this.leafTexts.length;n++)this.leafTexts[n].x+=s;this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.textChunkStart=this.leafTexts.length}adjustChildCoordinatesRecursive(t){this.children.forEach((e,i)=>{this.adjustChildCoordinatesRecursiveCore(t,this,this,i)}),this.applyAnchoring()}adjustChildCoordinatesRecursiveCore(t,e,i,s){const n=i.children[s];n.children.length>0?n.children.forEach((a,r)=>{e.adjustChildCoordinatesRecursiveCore(t,e,n,r)}):this.adjustChildCoordinates(t,e,i,s)}adjustChildCoordinates(t,e,i,s){const n=i.children[s];if(typeof n.measureText!="function")return n;t.save(),n.setContext(t,!0);const a=n.getAttribute("x"),r=n.getAttribute("y"),o=n.getAttribute("dx"),h=n.getAttribute("dy"),u=n.getStyle("font-family").getDefinition(),f=!!(u!=null&&u.isRTL);s===0&&(a.hasValue()||a.setValue(n.getInheritedAttribute("x")),r.hasValue()||r.setValue(n.getInheritedAttribute("y")),o.hasValue()||o.setValue(n.getInheritedAttribute("dx")),h.hasValue()||h.setValue(n.getInheritedAttribute("dy")));const g=n.measureText(t);return f&&(e.x-=g),a.hasValue()?(e.applyAnchoring(),n.x=a.getPixels("x"),o.hasValue()&&(n.x+=o.getPixels("x"))):(o.hasValue()&&(e.x+=o.getPixels("x")),n.x=e.x),e.x=n.x,f||(e.x+=g),r.hasValue()?(n.y=r.getPixels("y"),h.hasValue()&&(n.y+=h.getPixels("y"))):(h.hasValue()&&(e.y+=h.getPixels("y")),n.y=e.y),e.y=n.y,e.leafTexts.push(n),e.minX=Math.min(e.minX,n.x,n.x+g),e.maxX=Math.max(e.maxX,n.x,n.x+g),n.clearContext(t),t.restore(),n}getChildBoundingBox(t,e,i,s){const n=i.children[s];if(typeof n.getBoundingBox!="function")return null;const a=n.getBoundingBox(t);return a&&n.children.forEach((r,o)=>{const h=e.getChildBoundingBox(t,e,n,o);a.addBoundingBox(h)}),a}renderChild(t,e,i,s){const n=i.children[s];n.render(t),n.children.forEach((a,r)=>{e.renderChild(t,e,n,r)})}measureText(t){const{measureCache:e}=this;if(~e)return e;const i=this.getText(),s=this.measureTargetText(t,i);return this.measureCache=s,s}measureTargetText(t,e){if(!e.length)return 0;const{parent:i}=this,s=i.getStyle("font-family").getDefinition();if(s){const a=this.getFontSize(),r=s.isRTL?e.split("").reverse().join(""):e,o=Q(i.getAttribute("dx").getString()),h=r.length;let u=0;for(let f=0;f<h;f++){const g=this.getGlyph(s,r,f);u+=(g.horizAdvX||s.horizAdvX)*a/s.fontFace.unitsPerEm,typeof o[f]<"u"&&!isNaN(o[f])&&(u+=o[f])}return u}if(!t.measureText)return e.length*10;t.save(),this.setContext(t,!0);const{width:n}=t.measureText(e);return this.clearContext(t),t.restore(),n}getInheritedAttribute(t){let e=this;for(;e instanceof rt&&e.isFirstChild()&&e.parent;){const i=e.parent.getAttribute(t);if(i.hasValue(!0))return i.getString("0");e=e.parent}return null}constructor(t,e,i){super(t,e,new.target===rt?!0:i),this.type="text",this.x=0,this.y=0,this.leafTexts=[],this.textChunkStart=0,this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.measureCache=-1}}class wt extends rt{getText(){return this.text}constructor(t,e,i){super(t,e,new.target===wt?!0:i),this.type="tspan",this.text=this.children.length>0?"":this.getTextFromNode()}}class Ts extends wt{constructor(...t){super(...t),this.type="textNode"}}class w extends y{reset(){this.i=-1,this.command=null,this.previousCommand=null,this.start=new N(0,0),this.control=new N(0,0),this.current=new N(0,0),this.points=[],this.angles=[]}isEnd(){const{i:t,commands:e}=this;return t>=e.length-1}next(){const t=this.commands[++this.i];return this.previousCommand=this.command,this.command=t,t}getPoint(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"x",e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"y";const i=new N(this.command[t],this.command[e]);return this.makeAbsolute(i)}getAsControlPoint(t,e){const i=this.getPoint(t,e);return this.control=i,i}getAsCurrentPoint(t,e){const i=this.getPoint(t,e);return this.current=i,i}getReflectedControlPoint(){const t=this.previousCommand.type;if(t!==y.CURVE_TO&&t!==y.SMOOTH_CURVE_TO&&t!==y.QUAD_TO&&t!==y.SMOOTH_QUAD_TO)return this.current;const{current:{x:e,y:i},control:{x:s,y:n}}=this;return new N(2*e-s,2*i-n)}makeAbsolute(t){if(this.command.relative){const{x:e,y:i}=this.current;t.x+=e,t.y+=i}return t}addMarker(t,e,i){const{points:s,angles:n}=this;i&&n.length>0&&!n[n.length-1]&&(n[n.length-1]=s[s.length-1].angleTo(i)),this.addMarkerAngle(t,e?e.angleTo(t):null)}addMarkerAngle(t,e){this.points.push(t),this.angles.push(e)}getMarkerPoints(){return this.points}getMarkerAngles(){const{angles:t}=this,e=t.length;for(let i=0;i<e;i++)if(!t[i]){for(let s=i+1;s<e;s++)if(t[s]){t[i]=t[s];break}}return t}constructor(t){super(t.replace(/([+\-.])\s+/gm,"$1").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g,"")),this.control=new N(0,0),this.start=new N(0,0),this.current=new N(0,0),this.command=null,this.commands=this.commands,this.i=-1,this.previousCommand=null,this.points=[],this.angles=[]}}class P extends lt{path(t){const{pathParser:e}=this,i=new Z;for(e.reset(),t&&t.beginPath();!e.isEnd();)switch(e.next().type){case w.MOVE_TO:this.pathM(t,i);break;case w.LINE_TO:this.pathL(t,i);break;case w.HORIZ_LINE_TO:this.pathH(t,i);break;case w.VERT_LINE_TO:this.pathV(t,i);break;case w.CURVE_TO:this.pathC(t,i);break;case w.SMOOTH_CURVE_TO:this.pathS(t,i);break;case w.QUAD_TO:this.pathQ(t,i);break;case w.SMOOTH_QUAD_TO:this.pathT(t,i);break;case w.ARC:this.pathA(t,i);break;case w.CLOSE_PATH:this.pathZ(t,i);break}return i}getBoundingBox(t){return this.path()}getMarkers(){const{pathParser:t}=this,e=t.getMarkerPoints(),i=t.getMarkerAngles();return e.map((n,a)=>[n,i[a]])}renderChildren(t){this.path(t),this.document.screen.mouse.checkPath(this,t);const e=this.getStyle("fill-rule");t.fillStyle!==""&&(e.getString("inherit")!=="inherit"?t.fill(e.getString()):t.fill()),t.strokeStyle!==""&&(this.getAttribute("vector-effect").getString()==="non-scaling-stroke"?(t.save(),t.setTransform(1,0,0,1,0,0),t.stroke(),t.restore()):t.stroke());const i=this.getMarkers();if(i){const s=i.length-1,n=this.getStyle("marker-start"),a=this.getStyle("marker-mid"),r=this.getStyle("marker-end");if(n.isUrlDefinition()){const o=n.getDefinition(),[h,u]=i[0];o.render(t,h,u)}if(a.isUrlDefinition()){const o=a.getDefinition();for(let h=1;h<s;h++){const[u,f]=i[h];o.render(t,u,f)}}if(r.isUrlDefinition()){const o=r.getDefinition(),[h,u]=i[s];o.render(t,h,u)}}}static pathM(t){const e=t.getAsCurrentPoint();return t.start=t.current,{point:e}}pathM(t,e){const{pathParser:i}=this,{point:s}=P.pathM(i),{x:n,y:a}=s;i.addMarker(s),e.addPoint(n,a),t&&t.moveTo(n,a)}static pathL(t){const{current:e}=t,i=t.getAsCurrentPoint();return{current:e,point:i}}pathL(t,e){const{pathParser:i}=this,{current:s,point:n}=P.pathL(i),{x:a,y:r}=n;i.addMarker(n,s),e.addPoint(a,r),t&&t.lineTo(a,r)}static pathH(t){const{current:e,command:i}=t,s=new N((i.relative?e.x:0)+i.x,e.y);return t.current=s,{current:e,point:s}}pathH(t,e){const{pathParser:i}=this,{current:s,point:n}=P.pathH(i),{x:a,y:r}=n;i.addMarker(n,s),e.addPoint(a,r),t&&t.lineTo(a,r)}static pathV(t){const{current:e,command:i}=t,s=new N(e.x,(i.relative?e.y:0)+i.y);return t.current=s,{current:e,point:s}}pathV(t,e){const{pathParser:i}=this,{current:s,point:n}=P.pathV(i),{x:a,y:r}=n;i.addMarker(n,s),e.addPoint(a,r),t&&t.lineTo(a,r)}static pathC(t){const{current:e}=t,i=t.getPoint("x1","y1"),s=t.getAsControlPoint("x2","y2"),n=t.getAsCurrentPoint();return{current:e,point:i,controlPoint:s,currentPoint:n}}pathC(t,e){const{pathParser:i}=this,{current:s,point:n,controlPoint:a,currentPoint:r}=P.pathC(i);i.addMarker(r,a,n),e.addBezierCurve(s.x,s.y,n.x,n.y,a.x,a.y,r.x,r.y),t&&t.bezierCurveTo(n.x,n.y,a.x,a.y,r.x,r.y)}static pathS(t){const{current:e}=t,i=t.getReflectedControlPoint(),s=t.getAsControlPoint("x2","y2"),n=t.getAsCurrentPoint();return{current:e,point:i,controlPoint:s,currentPoint:n}}pathS(t,e){const{pathParser:i}=this,{current:s,point:n,controlPoint:a,currentPoint:r}=P.pathS(i);i.addMarker(r,a,n),e.addBezierCurve(s.x,s.y,n.x,n.y,a.x,a.y,r.x,r.y),t&&t.bezierCurveTo(n.x,n.y,a.x,a.y,r.x,r.y)}static pathQ(t){const{current:e}=t,i=t.getAsControlPoint("x1","y1"),s=t.getAsCurrentPoint();return{current:e,controlPoint:i,currentPoint:s}}pathQ(t,e){const{pathParser:i}=this,{current:s,controlPoint:n,currentPoint:a}=P.pathQ(i);i.addMarker(a,n,n),e.addQuadraticCurve(s.x,s.y,n.x,n.y,a.x,a.y),t&&t.quadraticCurveTo(n.x,n.y,a.x,a.y)}static pathT(t){const{current:e}=t,i=t.getReflectedControlPoint();t.control=i;const s=t.getAsCurrentPoint();return{current:e,controlPoint:i,currentPoint:s}}pathT(t,e){const{pathParser:i}=this,{current:s,controlPoint:n,currentPoint:a}=P.pathT(i);i.addMarker(a,n,n),e.addQuadraticCurve(s.x,s.y,n.x,n.y,a.x,a.y),t&&t.quadraticCurveTo(n.x,n.y,a.x,a.y)}static pathA(t){const{current:e,command:i}=t;let{rX:s,rY:n,xRot:a,lArcFlag:r,sweepFlag:o}=i;const h=a*(Math.PI/180),u=t.getAsCurrentPoint(),f=new N(Math.cos(h)*(e.x-u.x)/2+Math.sin(h)*(e.y-u.y)/2,-Math.sin(h)*(e.x-u.x)/2+Math.cos(h)*(e.y-u.y)/2),g=Math.pow(f.x,2)/Math.pow(s,2)+Math.pow(f.y,2)/Math.pow(n,2);g>1&&(s*=Math.sqrt(g),n*=Math.sqrt(g));let c=(r===o?-1:1)*Math.sqrt((Math.pow(s,2)*Math.pow(n,2)-Math.pow(s,2)*Math.pow(f.y,2)-Math.pow(n,2)*Math.pow(f.x,2))/(Math.pow(s,2)*Math.pow(f.y,2)+Math.pow(n,2)*Math.pow(f.x,2)));isNaN(c)&&(c=0);const d=new N(c*s*f.y/n,c*-n*f.x/s),p=new N((e.x+u.x)/2+Math.cos(h)*d.x-Math.sin(h)*d.y,(e.y+u.y)/2+Math.sin(h)*d.x+Math.cos(h)*d.y),m=le([1,0],[(f.x-d.x)/s,(f.y-d.y)/n]),x=[(f.x-d.x)/s,(f.y-d.y)/n],A=[(-f.x-d.x)/s,(-f.y-d.y)/n];let b=le(x,A);return zt(x,A)<=-1&&(b=Math.PI),zt(x,A)>=1&&(b=0),{currentPoint:u,rX:s,rY:n,sweepFlag:o,xAxisRotation:h,centp:p,a1:m,ad:b}}pathA(t,e){const{pathParser:i}=this,{currentPoint:s,rX:n,rY:a,sweepFlag:r,xAxisRotation:o,centp:h,a1:u,ad:f}=P.pathA(i),g=1-r?1:-1,c=u+g*(f/2),d=new N(h.x+n*Math.cos(c),h.y+a*Math.sin(c));if(i.addMarkerAngle(d,c-g*Math.PI/2),i.addMarkerAngle(s,c-g*Math.PI),e.addPoint(s.x,s.y),t&&!isNaN(u)&&!isNaN(f)){const p=n>a?n:a,m=n>a?1:n/a,x=n>a?a/n:1;t.translate(h.x,h.y),t.rotate(o),t.scale(m,x),t.arc(0,0,p,u,u+f,!!(1-r)),t.scale(1/m,1/x),t.rotate(-o),t.translate(-h.x,-h.y)}}static pathZ(t){t.current=t.start}pathZ(t,e){P.pathZ(this.pathParser),t&&e.x1!==e.x2&&e.y1!==e.y2&&t.closePath()}constructor(t,e,i){super(t,e,i),this.type="path",this.pathParser=new w(this.getAttribute("d").getString())}}class At extends lt{setContext(t){var e;const{document:i}=this,{screen:s,window:n}=i,a=t.canvas;if(s.setDefaults(t),"style"in a&&typeof t.font<"u"&&n&&typeof n.getComputedStyle<"u"){t.font=n.getComputedStyle(a).getPropertyValue("font");const A=new S(i,"fontSize",Y.parse(t.font).fontSize);A.hasValue()&&(i.rootEmSize=A.getPixels("y"),i.emSize=i.rootEmSize)}this.getAttribute("x").hasValue()||this.getAttribute("x",!0).setValue(0),this.getAttribute("y").hasValue()||this.getAttribute("y",!0).setValue(0);let{width:r,height:o}=s.viewPort;this.getStyle("width").hasValue()||this.getStyle("width",!0).setValue("100%"),this.getStyle("height").hasValue()||this.getStyle("height",!0).setValue("100%"),this.getStyle("color").hasValue()||this.getStyle("color",!0).setValue("black");const h=this.getAttribute("refX"),u=this.getAttribute("refY"),f=this.getAttribute("viewBox"),g=f.hasValue()?Q(f.getString()):null,c=!this.root&&this.getStyle("overflow").getValue("hidden")!=="visible";let d=0,p=0,m=0,x=0;g&&(d=g[0],p=g[1]),this.root||(r=this.getStyle("width").getPixels("x"),o=this.getStyle("height").getPixels("y"),this.type==="marker"&&(m=d,x=p,d=0,p=0)),s.viewPort.setCurrent(r,o),this.node&&(!this.parent||((e=this.node.parentNode)===null||e===void 0?void 0:e.nodeName)==="foreignObject")&&this.getStyle("transform",!1,!0).hasValue()&&!this.getStyle("transform-origin",!1,!0).hasValue()&&this.getStyle("transform-origin",!0,!0).setValue("50% 50%"),super.setContext(t),t.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y")),g&&(r=g[2],o=g[3]),i.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:s.viewPort.width,desiredWidth:r,height:s.viewPort.height,desiredHeight:o,minX:d,minY:p,refX:h.getValue(),refY:u.getValue(),clip:c,clipX:m,clipY:x}),g&&(s.viewPort.removeCurrent(),s.viewPort.setCurrent(r,o))}clearContext(t){super.clearContext(t),this.document.screen.viewPort.removeCurrent()}resize(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const s=this.getAttribute("width",!0),n=this.getAttribute("height",!0),a=this.getAttribute("viewBox"),r=this.getAttribute("style"),o=s.getNumber(0),h=n.getNumber(0);if(i)if(typeof i=="string")this.getAttribute("preserveAspectRatio",!0).setValue(i);else{const u=this.getAttribute("preserveAspectRatio");u.hasValue()&&u.setValue(u.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(s.setValue(t),n.setValue(e),a.hasValue()||a.setValue("0 0 ".concat(o||t," ").concat(h||e)),r.hasValue()){const u=this.getStyle("width"),f=this.getStyle("height");u.hasValue()&&u.setValue("".concat(t,"px")),f.hasValue()&&f.setValue("".concat(e,"px"))}}constructor(...t){super(...t),this.type="svg",this.root=!1}}class ve extends P{path(t){const e=this.getAttribute("x").getPixels("x"),i=this.getAttribute("y").getPixels("y"),s=this.getStyle("width",!1,!0).getPixels("x"),n=this.getStyle("height",!1,!0).getPixels("y"),a=this.getAttribute("rx"),r=this.getAttribute("ry");let o=a.getPixels("x"),h=r.getPixels("y");if(a.hasValue()&&!r.hasValue()&&(h=o),r.hasValue()&&!a.hasValue()&&(o=h),o=Math.min(o,s/2),h=Math.min(h,n/2),t){const u=4*((Math.sqrt(2)-1)/3);t.beginPath(),n>0&&s>0&&(t.moveTo(e+o,i),t.lineTo(e+s-o,i),t.bezierCurveTo(e+s-o+u*o,i,e+s,i+h-u*h,e+s,i+h),t.lineTo(e+s,i+n-h),t.bezierCurveTo(e+s,i+n-h+u*h,e+s-o+u*o,i+n,e+s-o,i+n),t.lineTo(e+o,i+n),t.bezierCurveTo(e+o-u*o,i+n,e,i+n-h+u*h,e,i+n-h),t.lineTo(e,i+h),t.bezierCurveTo(e,i+h-u*h,e+o-u*o,i,e+o,i),t.closePath())}return new Z(e,i,e+s,i+n)}getMarkers(){return null}constructor(...t){super(...t),this.type="rect"}}class gi extends P{path(t){const e=this.getAttribute("cx").getPixels("x"),i=this.getAttribute("cy").getPixels("y"),s=this.getAttribute("r").getPixels();return t&&s>0&&(t.beginPath(),t.arc(e,i,s,0,Math.PI*2,!1),t.closePath()),new Z(e-s,i-s,e+s,i+s)}getMarkers(){return null}constructor(...t){super(...t),this.type="circle"}}class di extends P{path(t){const e=4*((Math.sqrt(2)-1)/3),i=this.getAttribute("rx").getPixels("x"),s=this.getAttribute("ry").getPixels("y"),n=this.getAttribute("cx").getPixels("x"),a=this.getAttribute("cy").getPixels("y");return t&&i>0&&s>0&&(t.beginPath(),t.moveTo(n+i,a),t.bezierCurveTo(n+i,a+e*s,n+e*i,a+s,n,a+s),t.bezierCurveTo(n-e*i,a+s,n-i,a+e*s,n-i,a),t.bezierCurveTo(n-i,a-e*s,n-e*i,a-s,n,a-s),t.bezierCurveTo(n+e*i,a-s,n+i,a-e*s,n+i,a),t.closePath()),new Z(n-i,a-s,n+i,a+s)}getMarkers(){return null}constructor(...t){super(...t),this.type="ellipse"}}class pi extends P{getPoints(){return[new N(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new N(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}path(t){const[{x:e,y:i},{x:s,y:n}]=this.getPoints();return t&&(t.beginPath(),t.moveTo(e,i),t.lineTo(s,n)),new Z(e,i,s,n)}getMarkers(){const[t,e]=this.getPoints(),i=t.angleTo(e);return[[t,i],[e,i]]}constructor(...t){super(...t),this.type="line"}}class Se extends P{path(t){const{points:e}=this,[{x:i,y:s}]=e,n=new Z(i,s);return t&&(t.beginPath(),t.moveTo(i,s)),e.forEach(a=>{let{x:r,y:o}=a;n.addPoint(r,o),t&&t.lineTo(r,o)}),n}getMarkers(){const{points:t}=this,e=t.length-1,i=[];return t.forEach((s,n)=>{n!==e&&i.push([s,s.angleTo(t[n+1])])}),i.length>0&&i.push([t[t.length-1],i[i.length-1][1]]),i}constructor(t,e,i){super(t,e,i),this.type="polyline",this.points=[],this.points=N.parsePath(this.getAttribute("points").getString())}}class mi extends Se{path(t){const e=super.path(t),[{x:i,y:s}]=this.points;return t&&(t.lineTo(i,s),t.closePath()),e}constructor(...t){super(...t),this.type="polygon"}}class yi extends M{createPattern(t,e,i){const s=this.getStyle("width").getPixels("x",!0),n=this.getStyle("height").getPixels("y",!0),a=new At(this.document,null);a.attributes.set("viewBox",new S(this.document,"viewBox",this.getAttribute("viewBox").getValue())),a.attributes.set("width",new S(this.document,"width","".concat(s,"px"))),a.attributes.set("height",new S(this.document,"height","".concat(n,"px"))),a.attributes.set("transform",new S(this.document,"transform",this.getAttribute("patternTransform").getValue())),a.children=this.children;const r=this.document.createCanvas(s,n),o=r.getContext("2d"),h=this.getAttribute("x"),u=this.getAttribute("y");h.hasValue()&&u.hasValue()&&o.translate(h.getPixels("x",!0),u.getPixels("y",!0)),i.hasValue()?this.styles.set("fill-opacity",i):this.styles.delete("fill-opacity");for(let g=-1;g<=1;g++)for(let c=-1;c<=1;c++)o.save(),a.attributes.set("x",new S(this.document,"x",g*r.width)),a.attributes.set("y",new S(this.document,"y",c*r.height)),a.render(o),o.restore();return t.createPattern(r,"repeat")}constructor(...t){super(...t),this.type="pattern"}}class xi extends M{render(t,e,i){if(!e)return;const{x:s,y:n}=e,a=this.getAttribute("orient").getString("auto"),r=this.getAttribute("markerUnits").getString("strokeWidth");t.translate(s,n),a==="auto"&&t.rotate(i),r==="strokeWidth"&&t.scale(t.lineWidth,t.lineWidth),t.save();const o=new At(this.document);o.type=this.type,o.attributes.set("viewBox",new S(this.document,"viewBox",this.getAttribute("viewBox").getValue())),o.attributes.set("refX",new S(this.document,"refX",this.getAttribute("refX").getValue())),o.attributes.set("refY",new S(this.document,"refY",this.getAttribute("refY").getValue())),o.attributes.set("width",new S(this.document,"width",this.getAttribute("markerWidth").getValue())),o.attributes.set("height",new S(this.document,"height",this.getAttribute("markerHeight").getValue())),o.attributes.set("overflow",new S(this.document,"overflow",this.getAttribute("overflow").getValue())),o.attributes.set("fill",new S(this.document,"fill",this.getAttribute("fill").getColor("black"))),o.attributes.set("stroke",new S(this.document,"stroke",this.getAttribute("stroke").getValue("none"))),o.children=this.children,o.render(t),t.restore(),r==="strokeWidth"&&t.scale(1/t.lineWidth,1/t.lineWidth),a==="auto"&&t.rotate(-i),t.translate(-s,-n)}constructor(...t){super(...t),this.type="marker"}}class bi extends M{render(){}constructor(...t){super(...t),this.type="defs"}}class Ut extends lt{getBoundingBox(t){const e=new Z;return this.children.forEach(i=>{e.addBoundingBox(i.getBoundingBox(t))}),e}constructor(...t){super(...t),this.type="g"}}class Ae extends M{getGradientUnits(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}createGradient(t,e,i){let s=this;this.getHrefAttribute().hasValue()&&(s=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(s));const{stops:n}=s,a=this.getGradient(t,e);if(!a)return this.addParentOpacity(i,n[n.length-1].color);if(n.forEach(r=>{a.addColorStop(r.offset,this.addParentOpacity(i,r.color))}),this.getAttribute("gradientTransform").hasValue()){const{document:r}=this,{MAX_VIRTUAL_PIXELS:o}=et,{viewPort:h}=r.screen,u=h.getRoot(),f=new ve(r);f.attributes.set("x",new S(r,"x",-o/3)),f.attributes.set("y",new S(r,"y",-o/3)),f.attributes.set("width",new S(r,"width",o)),f.attributes.set("height",new S(r,"height",o));const g=new Ut(r);g.attributes.set("transform",new S(r,"transform",this.getAttribute("gradientTransform").getValue())),g.children=[f];const c=new At(r);c.attributes.set("x",new S(r,"x",0)),c.attributes.set("y",new S(r,"y",0)),c.attributes.set("width",new S(r,"width",u.width)),c.attributes.set("height",new S(r,"height",u.height)),c.children=[g];const d=r.createCanvas(u.width,u.height),p=d.getContext("2d");return p.fillStyle=a,c.render(p),p.createPattern(d,"no-repeat")}return a}inheritStopContainer(t){this.attributesToInherit.forEach(e=>{!this.getAttribute(e).hasValue()&&t.getAttribute(e).hasValue()&&this.getAttribute(e,!0).setValue(t.getAttribute(e).getValue())})}addParentOpacity(t,e){return t.hasValue()?new S(this.document,"color",e).addOpacity(t).getColor():e}constructor(t,e,i){super(t,e,i),this.attributesToInherit=["gradientUnits"],this.stops=[];const{stops:s,children:n}=this;n.forEach(a=>{a.type==="stop"&&s.push(a)})}}class vi extends Ae{getGradient(t,e){const i=this.getGradientUnits()==="objectBoundingBox",s=i?e.getBoundingBox(t):null;if(i&&!s)return null;!this.getAttribute("x1").hasValue()&&!this.getAttribute("y1").hasValue()&&!this.getAttribute("x2").hasValue()&&!this.getAttribute("y2").hasValue()&&(this.getAttribute("x1",!0).setValue(0),this.getAttribute("y1",!0).setValue(0),this.getAttribute("x2",!0).setValue(1),this.getAttribute("y2",!0).setValue(0));const n=i?s.x+s.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),a=i?s.y+s.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),r=i?s.x+s.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),o=i?s.y+s.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return n===r&&a===o?null:t.createLinearGradient(n,a,r,o)}constructor(t,e,i){super(t,e,i),this.type="linearGradient",this.attributesToInherit.push("x1","y1","x2","y2")}}class Si extends Ae{getGradient(t,e){const i=this.getGradientUnits()==="objectBoundingBox",s=e.getBoundingBox(t);if(i&&!s)return null;this.getAttribute("cx").hasValue()||this.getAttribute("cx",!0).setValue("50%"),this.getAttribute("cy").hasValue()||this.getAttribute("cy",!0).setValue("50%"),this.getAttribute("r").hasValue()||this.getAttribute("r",!0).setValue("50%");const n=i?s.x+s.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),a=i?s.y+s.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y");let r=n,o=a;this.getAttribute("fx").hasValue()&&(r=i?s.x+s.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(o=i?s.y+s.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));const h=i?(s.width+s.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),u=this.getAttribute("fr").getPixels();return t.createRadialGradient(r,o,u,n,a,h)}constructor(t,e,i){super(t,e,i),this.type="radialGradient",this.attributesToInherit.push("cx","cy","r","fx","fy","fr")}}class Ai extends M{constructor(t,e,i){super(t,e,i),this.type="stop";const s=Math.max(0,Math.min(1,this.getAttribute("offset").getNumber())),n=this.getStyle("stop-opacity");let a=this.getStyle("stop-color",!0);a.getString()===""&&a.setValue("#000"),n.hasValue()&&(a=a.addOpacity(n)),this.offset=s,this.color=a.getColor()}}class Xt extends M{getProperty(){const t=this.getAttribute("attributeType").getString(),e=this.getAttribute("attributeName").getString();return t==="CSS"?this.parent.getStyle(e,!0):this.parent.getAttribute(e,!0)}calcValue(){const{initialUnits:t}=this,{progress:e,from:i,to:s}=this.getProgress();let n=i.getNumber()+(s.getNumber()-i.getNumber())*e;return t==="%"&&(n*=100),"".concat(n).concat(t)}update(t){const{parent:e}=this,i=this.getProperty();if(this.initialValue||(this.initialValue=i.getString(),this.initialUnits=i.getUnits()),this.duration>this.maxDuration){const n=this.getAttribute("fill").getString("remove");if(this.getAttribute("repeatCount").getString()==="indefinite"||this.getAttribute("repeatDur").getString()==="indefinite")this.duration=0;else if(n==="freeze"&&!this.frozen)this.frozen=!0,e&&i&&(e.animationFrozen=!0,e.animationFrozenValue=i.getString());else if(n==="remove"&&!this.removed)return this.removed=!0,e&&i&&i.setValue(e.animationFrozen?e.animationFrozenValue:this.initialValue),!0;return!1}this.duration+=t;let s=!1;if(this.begin<this.duration){let n=this.calcValue();const a=this.getAttribute("type");if(a.hasValue()){const r=a.getString();n="".concat(r,"(").concat(n,")")}i.setValue(n),s=!0}return s}getProgress(){const{document:t,values:e}=this;let i=(this.duration-this.begin)/(this.maxDuration-this.begin),s,n;if(e.hasValue()){const a=i*(e.getValue().length-1),r=Math.floor(a),o=Math.ceil(a);let h;h=e.getValue()[r],s=new S(t,"from",h?parseFloat(h):0),h=e.getValue()[o],n=new S(t,"to",h?parseFloat(h):0),i=(a-r)/(o-r)}else s=this.from,n=this.to;return{progress:i,from:s,to:n}}constructor(t,e,i){super(t,e,i),this.type="animate",this.duration=0,this.initialUnits="",this.removed=!1,this.frozen=!1,t.screen.animations.push(this),this.begin=this.getAttribute("begin").getMilliseconds(),this.maxDuration=this.begin+this.getAttribute("dur").getMilliseconds(),this.from=this.getAttribute("from"),this.to=this.getAttribute("to"),this.values=new S(t,"values",null);const s=this.getAttribute("values");s.hasValue()&&this.values.setValue(s.getString().split(";"))}}class Ti extends Xt{calcValue(){const{progress:t,from:e,to:i}=this.getProgress(),s=new ae(e.getColor()),n=new ae(i.getColor());if(s.ok&&n.ok){const a=s.r+(n.r-s.r)*t,r=s.g+(n.g-s.g)*t,o=s.b+(n.b-s.b)*t;return"rgb(".concat(Math.floor(a),", ").concat(Math.floor(r),", ").concat(Math.floor(o),")")}return this.getAttribute("from").getColor()}constructor(...t){super(...t),this.type="animateColor"}}class wi extends Xt{calcValue(){const{progress:t,from:e,to:i}=this.getProgress(),s=Q(e.getString()),n=Q(i.getString());return s.map((r,o)=>{const h=n[o];return r+(h-r)*t}).join(" ")}constructor(...t){super(...t),this.type="animateTransform"}}class Te extends M{constructor(t,e,i){super(t,e,i),this.type="font-face",this.ascent=this.getAttribute("ascent").getNumber(),this.descent=this.getAttribute("descent").getNumber(),this.unitsPerEm=this.getAttribute("units-per-em").getNumber()}}class Ht extends P{constructor(t,e,i){super(t,e,i),this.type="glyph",this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber(),this.unicode=this.getAttribute("unicode").getString(),this.arabicForm=this.getAttribute("arabic-form").getString()}}class we extends Ht{constructor(...t){super(...t),this.type="missing-glyph",this.horizAdvX=0}}class Ci extends M{render(){}constructor(t,e,i){super(t,e,i),this.type="font",this.isArabic=!1,this.glyphs=new Map,this.arabicGlyphs=new Map,this.isRTL=!1,this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber();const{definitions:s}=t,{children:n}=this;for(const a of n)if(a instanceof Te){this.fontFace=a;const r=a.getStyle("font-family");r.hasValue()&&s.set(r.getString(),this)}else if(a instanceof we)this.missingGlyph=a;else if(a instanceof Ht)if(a.arabicForm){this.isRTL=!0,this.isArabic=!0;let r=this.arabicGlyphs.get(a.unicode);typeof r>"u"&&(r=new Map,this.arabicGlyphs.set(a.unicode,r)),r.set(a.arabicForm,a)}else this.glyphs.set(a.unicode,a)}}class Ei extends rt{getText(){const t=this.getHrefAttribute().getDefinition();if(t){const e=t.children[0];if(e)return e.getText()}return""}constructor(...t){super(...t),this.type="tref"}}class Pi extends rt{getText(){return this.text}renderChildren(t){if(this.hasText){super.renderChildren(t);const{document:e,x:i,y:s}=this,{mouse:n}=e.screen,a=new S(e,"fontSize",Y.parse(e.ctx.font).fontSize);n.isWorking()&&n.checkBoundingBox(this,new Z(i,s-a.getPixels("y"),i+this.measureText(t),s))}else if(this.children.length>0){const e=new Ut(this.document);e.children=this.children,e.parent=this,e.render(t)}}onClick(){const{window:t}=this.document;t&&t.open(this.getHrefAttribute().getString())}onMouseMove(){const t=this.document.ctx;t.canvas.style.cursor="pointer"}constructor(t,e,i){super(t,e,i),this.type="a";const{childNodes:s}=e,n=s[0],a=s.length>0&&Array.from(s).every(r=>r.nodeType===3);this.hasText=a,this.text=a?this.getTextFromNode(n):""}}class Mi extends rt{getText(){return this.text}path(t){const{dataArray:e}=this;t&&t.beginPath(),e.forEach(i=>{let{type:s,points:n}=i;switch(s){case w.LINE_TO:t&&t.lineTo(n[0],n[1]);break;case w.MOVE_TO:t&&t.moveTo(n[0],n[1]);break;case w.CURVE_TO:t&&t.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5]);break;case w.QUAD_TO:t&&t.quadraticCurveTo(n[0],n[1],n[2],n[3]);break;case w.ARC:{const[a,r,o,h,u,f,g,c]=n,d=o>h?o:h,p=o>h?1:o/h,m=o>h?h/o:1;t&&(t.translate(a,r),t.rotate(g),t.scale(p,m),t.arc(0,0,d,u,u+f,!!(1-c)),t.scale(1/p,1/m),t.rotate(-g),t.translate(-a,-r));break}case w.CLOSE_PATH:t&&t.closePath();break}})}renderChildren(t){this.setTextData(t),t.save();const e=this.parent.getStyle("text-decoration").getString(),i=this.getFontSize(),{glyphInfo:s}=this,n=t.fillStyle;e==="underline"&&t.beginPath(),s.forEach((a,r)=>{const{p0:o,p1:h,rotation:u,text:f}=a;t.save(),t.translate(o.x,o.y),t.rotate(u),t.fillStyle&&t.fillText(f,0,0),t.strokeStyle&&t.strokeText(f,0,0),t.restore(),e==="underline"&&(r===0&&t.moveTo(o.x,o.y+i/8),t.lineTo(h.x,h.y+i/5))}),e==="underline"&&(t.lineWidth=i/20,t.strokeStyle=n,t.stroke(),t.closePath()),t.restore()}getLetterSpacingAt(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return this.letterSpacingCache[t]||0}findSegmentToFitChar(t,e,i,s,n,a,r,o,h){let u=a,f=this.measureText(t,o);o===" "&&e==="justify"&&i<s&&(f+=(s-i)/n),h>-1&&(u+=this.getLetterSpacingAt(h));const g=this.textHeight/20,c=this.getEquidistantPointOnPath(u,g,0),d=this.getEquidistantPointOnPath(u+f,g,0),p={p0:c,p1:d},m=c&&d?Math.atan2(d.y-c.y,d.x-c.x):0;if(r){const x=Math.cos(Math.PI/2+m)*r,A=Math.cos(-m)*r;p.p0={...c,x:c.x+x,y:c.y+A},p.p1={...d,x:d.x+x,y:d.y+A}}return u+=f,{offset:u,segment:p,rotation:m}}measureText(t,e){const{measuresCache:i}=this,s=e||this.getText();if(i.has(s))return i.get(s);const n=this.measureTargetText(t,s);return i.set(s,n),n}setTextData(t){if(this.glyphInfo)return;const e=this.getText(),i=e.split(""),s=e.split(" ").length-1,n=this.parent.getAttribute("dx").split().map(b=>b.getPixels("x")),a=this.parent.getAttribute("dy").getPixels("y"),r=this.parent.getStyle("text-anchor").getString("start"),o=this.getStyle("letter-spacing"),h=this.parent.getStyle("letter-spacing");let u=0;!o.hasValue()||o.getValue()==="inherit"?u=h.getPixels():o.hasValue()&&o.getValue()!=="initial"&&o.getValue()!=="unset"&&(u=o.getPixels());const f=[],g=e.length;this.letterSpacingCache=f;for(let b=0;b<g;b++)f.push(typeof n[b]<"u"?n[b]:u);const c=f.reduce((b,v,E)=>E===0?0:b+v||0,0),d=this.measureText(t),p=Math.max(d+c,0);this.textWidth=d,this.textHeight=this.getFontSize(),this.glyphInfo=[];const m=this.getPathLength(),x=this.getStyle("startOffset").getNumber(0)*m;let A=0;(r==="middle"||r==="center")&&(A=-p/2),(r==="end"||r==="right")&&(A=-p),A+=x,i.forEach((b,v)=>{const{offset:E,segment:C,rotation:T}=this.findSegmentToFitChar(t,r,p,m,s,A,a,b,v);A=E,!(!C.p0||!C.p1)&&this.glyphInfo.push({text:i[v],p0:C.p0,p1:C.p1,rotation:T})})}parsePathData(t){if(this.pathLength=-1,!t)return[];const e=[],{pathParser:i}=t;for(i.reset();!i.isEnd();){const{current:s}=i,n=s?s.x:0,a=s?s.y:0,r=i.next();let o=r.type,h=[];switch(r.type){case w.MOVE_TO:this.pathM(i,h);break;case w.LINE_TO:o=this.pathL(i,h);break;case w.HORIZ_LINE_TO:o=this.pathH(i,h);break;case w.VERT_LINE_TO:o=this.pathV(i,h);break;case w.CURVE_TO:this.pathC(i,h);break;case w.SMOOTH_CURVE_TO:o=this.pathS(i,h);break;case w.QUAD_TO:this.pathQ(i,h);break;case w.SMOOTH_QUAD_TO:o=this.pathT(i,h);break;case w.ARC:h=this.pathA(i);break;case w.CLOSE_PATH:P.pathZ(i);break}r.type!==w.CLOSE_PATH?e.push({type:o,points:h,start:{x:n,y:a},pathLength:this.calcLength(n,a,o,h)}):e.push({type:w.CLOSE_PATH,points:[],pathLength:0})}return e}pathM(t,e){const{x:i,y:s}=P.pathM(t).point;e.push(i,s)}pathL(t,e){const{x:i,y:s}=P.pathL(t).point;return e.push(i,s),w.LINE_TO}pathH(t,e){const{x:i,y:s}=P.pathH(t).point;return e.push(i,s),w.LINE_TO}pathV(t,e){const{x:i,y:s}=P.pathV(t).point;return e.push(i,s),w.LINE_TO}pathC(t,e){const{point:i,controlPoint:s,currentPoint:n}=P.pathC(t);e.push(i.x,i.y,s.x,s.y,n.x,n.y)}pathS(t,e){const{point:i,controlPoint:s,currentPoint:n}=P.pathS(t);return e.push(i.x,i.y,s.x,s.y,n.x,n.y),w.CURVE_TO}pathQ(t,e){const{controlPoint:i,currentPoint:s}=P.pathQ(t);e.push(i.x,i.y,s.x,s.y)}pathT(t,e){const{controlPoint:i,currentPoint:s}=P.pathT(t);return e.push(i.x,i.y,s.x,s.y),w.QUAD_TO}pathA(t){let{rX:e,rY:i,sweepFlag:s,xAxisRotation:n,centp:a,a1:r,ad:o}=P.pathA(t);return s===0&&o>0&&(o-=2*Math.PI),s===1&&o<0&&(o+=2*Math.PI),[a.x,a.y,e,i,r,o,n,s]}calcLength(t,e,i,s){let n=0,a=null,r=null,o=0;switch(i){case w.LINE_TO:return this.getLineLength(t,e,s[0],s[1]);case w.CURVE_TO:for(n=0,a=this.getPointOnCubicBezier(0,t,e,s[0],s[1],s[2],s[3],s[4],s[5]),o=.01;o<=1;o+=.01)r=this.getPointOnCubicBezier(o,t,e,s[0],s[1],s[2],s[3],s[4],s[5]),n+=this.getLineLength(a.x,a.y,r.x,r.y),a=r;return n;case w.QUAD_TO:for(n=0,a=this.getPointOnQuadraticBezier(0,t,e,s[0],s[1],s[2],s[3]),o=.01;o<=1;o+=.01)r=this.getPointOnQuadraticBezier(o,t,e,s[0],s[1],s[2],s[3]),n+=this.getLineLength(a.x,a.y,r.x,r.y),a=r;return n;case w.ARC:{n=0;const h=s[4],u=s[5],f=s[4]+u;let g=Math.PI/180;if(Math.abs(h-f)<g&&(g=Math.abs(h-f)),a=this.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],h,0),u<0)for(o=h-g;o>f;o-=g)r=this.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],o,0),n+=this.getLineLength(a.x,a.y,r.x,r.y),a=r;else for(o=h+g;o<f;o+=g)r=this.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],o,0),n+=this.getLineLength(a.x,a.y,r.x,r.y),a=r;return r=this.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],f,0),n+=this.getLineLength(a.x,a.y,r.x,r.y),n}}return 0}getPointOnLine(t,e,i,s,n){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:e,r=arguments.length>6&&arguments[6]!==void 0?arguments[6]:i;const o=(n-i)/(s-e+mt);let h=Math.sqrt(t*t/(1+o*o));s<e&&(h*=-1);let u=o*h,f=null;if(s===e)f={x:a,y:r+u};else if((r-i)/(a-e+mt)===o)f={x:a+h,y:r+u};else{let g=0,c=0;const d=this.getLineLength(e,i,s,n);if(d<mt)return null;let p=(a-e)*(s-e)+(r-i)*(n-i);p/=d*d,g=e+p*(s-e),c=i+p*(n-i);const m=this.getLineLength(a,r,g,c),x=Math.sqrt(t*t-m*m);h=Math.sqrt(x*x/(1+o*o)),s<e&&(h*=-1),u=o*h,f={x:g+h,y:c+u}}return f}getPointOnPath(t){const e=this.getPathLength();let i=0,s=null;if(t<-5e-5||t-5e-5>e)return null;const{dataArray:n}=this;for(const a of n){if(a&&(a.pathLength<5e-5||i+a.pathLength+5e-5<t)){i+=a.pathLength;continue}const r=t-i;let o=0;switch(a.type){case w.LINE_TO:s=this.getPointOnLine(r,a.start.x,a.start.y,a.points[0],a.points[1],a.start.x,a.start.y);break;case w.ARC:{const h=a.points[4],u=a.points[5],f=a.points[4]+u;if(o=h+r/a.pathLength*u,u<0&&o<f||u>=0&&o>f)break;s=this.getPointOnEllipticalArc(a.points[0],a.points[1],a.points[2],a.points[3],o,a.points[6]);break}case w.CURVE_TO:o=r/a.pathLength,o>1&&(o=1),s=this.getPointOnCubicBezier(o,a.start.x,a.start.y,a.points[0],a.points[1],a.points[2],a.points[3],a.points[4],a.points[5]);break;case w.QUAD_TO:o=r/a.pathLength,o>1&&(o=1),s=this.getPointOnQuadraticBezier(o,a.start.x,a.start.y,a.points[0],a.points[1],a.points[2],a.points[3]);break}if(s)return s;break}return null}getLineLength(t,e,i,s){return Math.sqrt((i-t)*(i-t)+(s-e)*(s-e))}getPathLength(){return this.pathLength===-1&&(this.pathLength=this.dataArray.reduce((t,e)=>e.pathLength>0?t+e.pathLength:t,0)),this.pathLength}getPointOnCubicBezier(t,e,i,s,n,a,r,o,h){const u=o*ue(t)+a*ce(t)+s*fe(t)+e*ge(t),f=h*ue(t)+r*ce(t)+n*fe(t)+i*ge(t);return{x:u,y:f}}getPointOnQuadraticBezier(t,e,i,s,n,a,r){const o=a*de(t)+s*pe(t)+e*me(t),h=r*de(t)+n*pe(t)+i*me(t);return{x:o,y:h}}getPointOnEllipticalArc(t,e,i,s,n,a){const r=Math.cos(a),o=Math.sin(a),h={x:i*Math.cos(n),y:s*Math.sin(n)};return{x:t+(h.x*r-h.y*o),y:e+(h.x*o+h.y*r)}}buildEquidistantCache(t,e){const i=this.getPathLength(),s=e||.25,n=t||i/100;if(!this.equidistantCache||this.equidistantCache.step!==n||this.equidistantCache.precision!==s){this.equidistantCache={step:n,precision:s,points:[]};let a=0;for(let r=0;r<=i;r+=s){const o=this.getPointOnPath(r),h=this.getPointOnPath(r+s);!o||!h||(a+=this.getLineLength(o.x,o.y,h.x,h.y),a>=n&&(this.equidistantCache.points.push({x:o.x,y:o.y,distance:r}),a-=n))}}}getEquidistantPointOnPath(t,e,i){if(this.buildEquidistantCache(e,i),t<0||t-this.getPathLength()>5e-5)return null;const s=Math.round(t/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[s]||null}constructor(t,e,i){super(t,e,i),this.type="textPath",this.textWidth=0,this.textHeight=0,this.pathLength=-1,this.glyphInfo=null,this.letterSpacingCache=[],this.measuresCache=new Map([["",0]]);const s=this.getHrefAttribute().getDefinition();this.text=this.getTextFromNode(),this.dataArray=this.parsePathData(s)}}const ws=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;class Ni extends lt{async loadImage(t){try{const e=await this.document.createImage(t);this.image=e}catch(e){console.error('Error while loading image "'.concat(t,'":'),e)}this.loaded=!0}async loadSvg(t){const e=ws.exec(t);if(e){const i=e[5];i&&(e[4]==="base64"?this.image=atob(i):this.image=decodeURIComponent(i))}else try{const s=await(await this.document.fetch(t)).text();this.image=s}catch(i){console.error('Error while loading image "'.concat(t,'":'),i)}this.loaded=!0}renderChildren(t){const{document:e,image:i,loaded:s}=this,n=this.getAttribute("x").getPixels("x"),a=this.getAttribute("y").getPixels("y"),r=this.getStyle("width").getPixels("x"),o=this.getStyle("height").getPixels("y");if(!(!s||!i||!r||!o)){if(t.save(),t.translate(n,a),typeof i=="string"){const h=e.canvg.forkString(t,i,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:0,offsetY:0,scaleWidth:r,scaleHeight:o}),{documentElement:u}=h.document;u&&(u.parent=this),h.render()}else e.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:r,desiredWidth:i.width,height:o,desiredHeight:i.height}),this.loaded&&(!("complete"in i)||i.complete)&&t.drawImage(i,0,0);t.restore()}}getBoundingBox(){const t=this.getAttribute("x").getPixels("x"),e=this.getAttribute("y").getPixels("y"),i=this.getStyle("width").getPixels("x"),s=this.getStyle("height").getPixels("y");return new Z(t,e,t+i,e+s)}constructor(t,e,i){super(t,e,i),this.type="image",this.loaded=!1;const s=this.getHrefAttribute().getString();if(!s)return;const n=s.endsWith(".svg")||/^\s*data:image\/svg\+xml/i.test(s);t.images.push(this),n?this.loadSvg(s):this.loadImage(s)}}class Oi extends lt{render(t){}constructor(...t){super(...t),this.type="symbol"}}class Vi{async load(t,e){try{const{document:i}=this,n=(await i.canvg.parser.load(e)).getElementsByTagName("font");Array.from(n).forEach(a=>{const r=i.createElement(a);i.definitions.set(t,r)})}catch(i){console.error('Error while loading font "'.concat(e,'":'),i)}this.loaded=!0}constructor(t){this.document=t,this.loaded=!1,t.fonts.push(this)}}class Ce extends M{constructor(t,e,i){super(t,e,i),this.type="style",yt(Array.from(e.childNodes).map(a=>a.textContent).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,"")).split("}").forEach(a=>{const r=a.trim();if(!r)return;const o=r.split("{"),h=o[0].split(","),u=o[1].split(";");h.forEach(f=>{const g=f.trim();if(!g)return;const c=t.styles.get(g)||new Map;if(u.forEach(d=>{const p=d.indexOf(":"),m=d.substr(0,p).trim(),x=d.substr(p+1,d.length-p).trim();m&&x&&c.set(m,new S(t,m,x))}),t.styles.set(g,c),t.stylesSpecificity.set(g,si(g)),g==="@font-face"){const d=c.get("font-family").getString().replace(/"|'/g,"");c.get("src").getString().split(",").forEach(m=>{if(m.indexOf('format("svg")')>0){const x=ye(m);x&&new Vi(t).load(d,x)}})}})})}}Ce.parseExternalUrl=ye;class ki extends lt{setContext(t){super.setContext(t);const e=this.getAttribute("x"),i=this.getAttribute("y");e.hasValue()&&t.translate(e.getPixels("x"),0),i.hasValue()&&t.translate(0,i.getPixels("y"))}path(t){const{element:e}=this;e&&e.path(t)}renderChildren(t){const{document:e,element:i}=this;if(i){let s=i;if(i.type==="symbol"&&(s=new At(e),s.attributes.set("viewBox",new S(e,"viewBox",i.getAttribute("viewBox").getString())),s.attributes.set("preserveAspectRatio",new S(e,"preserveAspectRatio",i.getAttribute("preserveAspectRatio").getString())),s.attributes.set("overflow",new S(e,"overflow",i.getAttribute("overflow").getString())),s.children=i.children,i.styles.set("opacity",new S(e,"opacity",this.calculateOpacity()))),s.type==="svg"){const a=this.getStyle("width",!1,!0),r=this.getStyle("height",!1,!0);a.hasValue()&&s.attributes.set("width",new S(e,"width",a.getString())),r.hasValue()&&s.attributes.set("height",new S(e,"height",r.getString()))}const n=s.parent;s.parent=this,s.render(t),s.parent=n}}getBoundingBox(t){const{element:e}=this;return e?e.getBoundingBox(t):null}elementTransform(){const{document:t,element:e}=this;return e?ht.fromElement(t,e):null}get element(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement}constructor(...t){super(...t),this.type="use"}}function Dt(l,t,e,i,s,n){return l[e*i*4+t*4+n]}function Bt(l,t,e,i,s,n,a){l[e*i*4+t*4+n]=a}function I(l,t,e){return l[t]*e}function st(l,t,e,i){return t+Math.cos(l)*e+Math.sin(l)*i}class Ee extends M{apply(t,e,i,s,n){const{includeOpacity:a,matrix:r}=this,o=t.getImageData(0,0,s,n);for(let h=0;h<n;h++)for(let u=0;u<s;u++){const f=Dt(o.data,u,h,s,n,0),g=Dt(o.data,u,h,s,n,1),c=Dt(o.data,u,h,s,n,2),d=Dt(o.data,u,h,s,n,3);let p=I(r,0,f)+I(r,1,g)+I(r,2,c)+I(r,3,d)+I(r,4,1),m=I(r,5,f)+I(r,6,g)+I(r,7,c)+I(r,8,d)+I(r,9,1),x=I(r,10,f)+I(r,11,g)+I(r,12,c)+I(r,13,d)+I(r,14,1),A=I(r,15,f)+I(r,16,g)+I(r,17,c)+I(r,18,d)+I(r,19,1);a&&(p=0,m=0,x=0,A*=d/255),Bt(o.data,u,h,s,n,0,p),Bt(o.data,u,h,s,n,1,m),Bt(o.data,u,h,s,n,2,x),Bt(o.data,u,h,s,n,3,A)}t.clearRect(0,0,s,n),t.putImageData(o,0,0)}constructor(t,e,i){super(t,e,i),this.type="feColorMatrix";let s=Q(this.getAttribute("values").getString());switch(this.getAttribute("type").getString("matrix")){case"saturate":{const n=s[0];s=[.213+.787*n,.715-.715*n,.072-.072*n,0,0,.213-.213*n,.715+.285*n,.072-.072*n,0,0,.213-.213*n,.715-.715*n,.072+.928*n,0,0,0,0,0,1,0,0,0,0,0,1];break}case"hueRotate":{const n=s[0]*Math.PI/180;s=[st(n,.213,.787,-.213),st(n,.715,-.715,-.715),st(n,.072,-.072,.928),0,0,st(n,.213,-.213,.143),st(n,.715,.285,.14),st(n,.072,-.072,-.283),0,0,st(n,.213,-.213,-.787),st(n,.715,-.715,.715),st(n,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break}case"luminanceToAlpha":s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1];break}this.matrix=s,this.includeOpacity=this.getAttribute("includeOpacity").hasValue()}}class Ct extends M{apply(t,e){const{document:i}=this;let s=this.getAttribute("x").getPixels("x"),n=this.getAttribute("y").getPixels("y"),a=this.getStyle("width").getPixels("x"),r=this.getStyle("height").getPixels("y");if(!a&&!r){const c=new Z;this.children.forEach(d=>{c.addBoundingBox(d.getBoundingBox(t))}),s=Math.floor(c.x1),n=Math.floor(c.y1),a=Math.floor(c.width),r=Math.floor(c.height)}const o=this.removeStyles(e,Ct.ignoreStyles),h=i.createCanvas(s+a,n+r),u=h.getContext("2d");i.screen.setDefaults(u),this.renderChildren(u),new Ee(i,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(u,0,0,s+a,n+r);const f=i.createCanvas(s+a,n+r),g=f.getContext("2d");i.screen.setDefaults(g),e.render(g),g.globalCompositeOperation="destination-in",g.fillStyle=u.createPattern(h,"no-repeat"),g.fillRect(0,0,s+a,n+r),t.fillStyle=g.createPattern(f,"no-repeat"),t.fillRect(0,0,s+a,n+r),this.restoreStyles(e,o)}render(t){}constructor(...t){super(...t),this.type="mask"}}Ct.ignoreStyles=["mask","transform","clip-path"];const Ge=()=>{};class Ri extends M{apply(t){const{document:e}=this,i=Reflect.getPrototypeOf(t),{beginPath:s,closePath:n}=t;i&&(i.beginPath=Ge,i.closePath=Ge),Reflect.apply(s,t,[]),this.children.forEach(a=>{if(!("path"in a))return;let r="elementTransform"in a?a.elementTransform():null;r||(r=ht.fromElement(e,a)),r&&r.apply(t),a.path(t),i&&(i.closePath=n),r&&r.unapply(t)}),Reflect.apply(n,t,[]),t.clip(),i&&(i.beginPath=s,i.closePath=n)}render(t){}constructor(...t){super(...t),this.type="clipPath"}}class Et extends M{apply(t,e){const{document:i,children:s}=this,n="getBoundingBox"in e?e.getBoundingBox(t):null;if(!n)return;let a=0,r=0;s.forEach(x=>{const A=x.extraFilterDistance||0;a=Math.max(a,A),r=Math.max(r,A)});const o=Math.floor(n.width),h=Math.floor(n.height),u=o+2*a,f=h+2*r;if(u<1||f<1)return;const g=Math.floor(n.x),c=Math.floor(n.y),d=this.removeStyles(e,Et.ignoreStyles),p=i.createCanvas(u,f),m=p.getContext("2d");i.screen.setDefaults(m),m.translate(-g+a,-c+r),e.render(m),s.forEach(x=>{typeof x.apply=="function"&&x.apply(m,0,0,u,f)}),t.drawImage(p,0,0,u,f,g-a,c-r,u,f),this.restoreStyles(e,d)}render(t){}constructor(...t){super(...t),this.type="filter"}}Et.ignoreStyles=["filter","transform","clip-path"];class Li extends M{apply(t,e,i,s,n){}constructor(t,e,i){super(t,e,i),this.type="feDropShadow",this.addStylesFromStyleDefinition()}}class Ii extends M{apply(t,e,i,s,n){}constructor(...t){super(...t),this.type="feMorphology"}}class Di extends M{apply(t,e,i,s,n){}constructor(...t){super(...t),this.type="feComposite"}}class Bi extends M{apply(t,e,i,s,n){const{document:a,blurRadius:r}=this,o=a.window?a.window.document.body:null,h=t.canvas;h.id=a.getUniqueId(),o&&(h.style.display="none",o.appendChild(h)),is(h,e,i,s,n,r),o&&o.removeChild(h)}constructor(t,e,i){super(t,e,i),this.type="feGaussianBlur",this.blurRadius=Math.floor(this.getAttribute("stdDeviation").getNumber()),this.extraFilterDistance=this.blurRadius}}class _i extends M{constructor(...t){super(...t),this.type="title"}}class Fi extends M{constructor(...t){super(...t),this.type="desc"}}const zi={svg:At,rect:ve,circle:gi,ellipse:di,line:pi,polyline:Se,polygon:mi,path:P,pattern:yi,marker:xi,defs:bi,linearGradient:vi,radialGradient:Si,stop:Ai,animate:Xt,animateColor:Ti,animateTransform:wi,font:Ci,"font-face":Te,"missing-glyph":we,glyph:Ht,text:rt,tspan:wt,tref:Ei,a:Pi,textPath:Mi,image:Ni,g:Ut,symbol:Oi,style:Ce,use:ki,mask:Ct,clipPath:Ri,filter:Et,feDropShadow:Li,feMorphology:Ii,feComposite:Di,feColorMatrix:Ee,feGaussianBlur:Bi,title:_i,desc:Fi};function Cs(l,t){const e=document.createElement("canvas");return e.width=l,e.height=t,e}async function Es(l){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const e=document.createElement("img");return t&&(e.crossOrigin="Anonymous"),new Promise((i,s)=>{e.onload=()=>{i(e)},e.onerror=(n,a,r,o,h)=>{s(h)},e.src=l})}const re=12;class nt{bindCreateImage(t,e){return typeof e=="boolean"?(i,s)=>t(i,typeof s=="boolean"?s:e):t}get window(){return this.screen.window}get fetch(){return this.screen.fetch}get ctx(){return this.screen.ctx}get emSize(){const{emSizeStack:t}=this;return t[t.length-1]||re}set emSize(t){const{emSizeStack:e}=this;e.push(t)}popEmSize(){const{emSizeStack:t}=this;t.pop()}getUniqueId(){return"canvg".concat(++this.uniqueId)}isImagesLoaded(){return this.images.every(t=>t.loaded)}isFontsLoaded(){return this.fonts.every(t=>t.loaded)}createDocumentElement(t){const e=this.createElement(t.documentElement);return e.root=!0,e.addStylesFromStyleDefinition(),this.documentElement=e,e}createElement(t){const e=t.nodeName.replace(/^[^:]+:/,""),i=nt.elementTypes[e];return i?new i(this,t):new fi(this,t)}createTextNode(t){return new Ts(this,t)}setViewBox(t){this.screen.setViewBox({document:this,...t})}constructor(t,{rootEmSize:e=re,emSize:i=re,createCanvas:s=nt.createCanvas,createImage:n=nt.createImage,anonymousCrossOrigin:a}={}){this.canvg=t,this.definitions=new Map,this.styles=new Map,this.stylesSpecificity=new Map,this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=t.screen,this.rootEmSize=e,this.emSize=i,this.createCanvas=s,this.createImage=this.bindCreateImage(n,a),this.screen.wait(()=>this.isImagesLoaded()),this.screen.wait(()=>this.isFontsLoaded())}}nt.createCanvas=Cs;nt.createImage=Es;nt.elementTypes=zi;class vt{static async from(t,e){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=await new Ft(i).parse(e);return new vt(t,n,i)}static fromString(t,e){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=new Ft(i).parseFromString(e);return new vt(t,n,i)}fork(t,e){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return vt.from(t,e,{...this.options,...i})}forkString(t,e){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return vt.fromString(t,e,{...this.options,...i})}ready(){return this.screen.ready()}isReady(){return this.screen.isReady()}async render(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.start({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0,...t}),await this.ready(),this.stop()}start(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{documentElement:e,screen:i,options:s}=this;i.start(e,{enableRedraw:!0,...s,...t})}stop(){this.screen.stop()}resize(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.documentElement.resize(t,e,i)}constructor(t,e,i={}){this.parser=new Ft(i),this.screen=new et(t,i),this.options=i;const s=new nt(this,i),n=s.createDocumentElement(e);this.document=s,this.documentElement=n}}exports.AElement=Pi;exports.AnimateColorElement=Ti;exports.AnimateElement=Xt;exports.AnimateTransformElement=wi;exports.BoundingBox=Z;exports.CB1=ue;exports.CB2=ce;exports.CB3=fe;exports.CB4=ge;exports.Canvg=vt;exports.CircleElement=gi;exports.ClipPathElement=Ri;exports.DefsElement=bi;exports.DescElement=Fi;exports.Document=nt;exports.Element=M;exports.EllipseElement=di;exports.FeColorMatrixElement=Ee;exports.FeCompositeElement=Di;exports.FeDropShadowElement=Li;exports.FeGaussianBlurElement=Bi;exports.FeMorphologyElement=Ii;exports.FilterElement=Et;exports.Font=Y;exports.FontElement=Ci;exports.FontFaceElement=Te;exports.GElement=Ut;exports.GlyphElement=Ht;exports.GradientElement=Ae;exports.ImageElement=Ni;exports.LineElement=pi;exports.LinearGradientElement=vi;exports.MarkerElement=xi;exports.MaskElement=Ct;exports.Matrix=xe;exports.MissingGlyphElement=we;exports.Mouse=ni;exports.PSEUDO_ZERO=mt;exports.Parser=Ft;exports.PathElement=P;exports.PathParser=w;exports.PatternElement=yi;exports.Point=N;exports.PolygonElement=mi;exports.PolylineElement=Se;exports.Property=S;exports.QB1=de;exports.QB2=pe;exports.QB3=me;exports.RadialGradientElement=Si;exports.RectElement=ve;exports.RenderedElement=lt;exports.Rotate=hi;exports.SVGElement=At;exports.SVGFontLoader=Vi;exports.Scale=li;exports.Screen=et;exports.Skew=be;exports.SkewX=ui;exports.SkewY=ci;exports.StopElement=Ai;exports.StyleElement=Ce;exports.SymbolElement=Oi;exports.TRefElement=Ei;exports.TSpanElement=wt;exports.TextElement=rt;exports.TextPathElement=Mi;exports.TitleElement=_i;exports.Transform=ht;exports.Translate=oi;exports.UnknownElement=fi;exports.UseElement=ki;exports.ViewPort=St;exports.compressSpaces=yt;exports.elements=zi;exports.getSelectorSpecificity=si;exports.normalizeAttributeName=ei;exports.normalizeColor=ii;exports.parseExternalUrl=ye;exports.presets=as;exports.toMatrixValue=ti;exports.toNumbers=Q;exports.trimLeft=Ke;exports.trimRight=Je;exports.vectorMagnitude=he;exports.vectorsAngle=le;exports.vectorsRatio=zt;
|