vue-safe-force-graph 2.0.49 → 2.0.50

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.
@@ -98,7 +98,7 @@
98
98
  .popover-container .popover-block .row-item .level.${d} {
99
99
  color: var(${u});
100
100
  }
101
- `}),n=`:root {${n}}`,r=`[data-theme="dark"] { ${r}}`,n+r+t}function $Q(e){const t=document.createElement("style");t.innerHTML=e,document.head.appendChild(t),window.insertSafeForceGraphStyle=!0}function zQ(e){if(window.insertSafeForceGraphStyle){Gn("已存在样式");return}const t=FQ(e);$Q(t)}function of(e,t){var r;if(e==null||e==="")return rf+"unknown";const n=(r=t[e])==null?void 0:r.className;return n?rf+n:""}function as(e,t,n){if(e==null||e==="")return n?"#c6cdd5":"#666";const r=t==null?void 0:t.find(o=>o.level===e);return n?r==null?void 0:r.darkColor:r==null?void 0:r.normalColor}function UQ(e,t){var r;return((r=t.find(o=>o.level===e))==null?void 0:r.dangerNumber)>0}const m5={"./public/d3svg1/85.svg":"https://s6.qhres2.com/static/7ff9eb6a2d513c6b.svg","./public/d3svg1/address.svg":"https://s8.qhres2.com/static/ea7c70859496830d.svg","./public/d3svg1/aggregation.svg":"https://s8.qhres2.com/static/b543a400a1b63c2e.svg","./public/d3svg1/button/hm_icon_add.svg":"https://s8.qhres2.com/static/a9f47ab25e1ee91c.svg","./public/d3svg1/button/hm_icon_add_more.svg":"https://s8.qhres2.com/static/e8834bbcd939d3c9.svg","./public/d3svg1/button/hm_icon_intro.svg":"https://s6.qhres2.com/static/e3a9174af2a35626.svg","./public/d3svg1/button/hm_icon_search.svg":"https://s8.qhres2.com/static/fcb0142edf5b3800.svg","./public/d3svg1/button/hm_icon_snapshot.svg":"https://s8.qhres2.com/static/9b120f6abb5f9059.svg","./public/d3svg1/button18/button_all_fix_nodes.svg":"https://s6.qhres2.com/static/ce733e9adf80c365.svg","./public/d3svg1/button18/button_all_show_label.svg":"https://s8.qhres2.com/static/acf6443efcaeff69.svg","./public/d3svg1/button18/button_all_show_names.svg":"https://s9.qhres2.com/static/4640ec9275f0766b.svg","./public/d3svg1/button18/button_all_un_fix_nodes.svg":"https://s9.qhres2.com/static/8b912474be58398f.svg","./public/d3svg1/button18/button_all_un_show_label.svg":"https://s5.qhres2.com/static/554be4958236d4a9.svg","./public/d3svg1/button18/button_all_un_show_names.svg":"https://s9.qhres2.com/static/1ecc98860970db2e.svg","./public/d3svg1/button18/button_copy.svg":"https://s6.qhres2.com/static/d23330eea0fb51b0.svg","./public/d3svg1/button18/button_delete_node.svg":"https://s6.qhres2.com/static/6528369fc53e385d.svg","./public/d3svg1/button18/button_edit_label.svg":"https://s5.qhres2.com/static/f5237a8fd30e71b7.svg","./public/d3svg1/button18/button_fix_nodes.svg":"https://s8.qhres2.com/static/7e6659fbc9d1d35f.svg","./public/d3svg1/button18/button_go_result.svg":"https://s5.qhres2.com/static/81f6dc17130d1628.svg","./public/d3svg1/button18/button_hold_aggregation.svg":"https://s8.qhres2.com/static/a43155bd7c0bf00f.svg","./public/d3svg1/button18/button_node_star.svg":"https://s5.qhres2.com/static/7152908656a95dda.svg","./public/d3svg1/button18/button_redo.svg":"https://s7.qhres2.com/static/b853e4965232dcbf.svg","./public/d3svg1/button18/button_relation.svg":"https://s5.qhres2.com/static/3ed0bdb6624df19d.svg","./public/d3svg1/button18/button_release_aggregation.svg":"https://s6.qhres2.com/static/04f7943f4012cf95.svg","./public/d3svg1/button18/button_show_label.svg":"https://s9.qhres2.com/static/87b3bb1a3c13d87d.svg","./public/d3svg1/button18/button_show_names.svg":"https://s5.qhres2.com/static/d5ac061f5815637a.svg","./public/d3svg1/button18/button_single_edge_select.svg":"https://s9.qhres2.com/static/c6d8ee426c9cd094.svg","./public/d3svg1/button18/button_un_fix_nodes.svg":"https://s9.qhres2.com/static/7e5d2cca09402894.svg","./public/d3svg1/button18/button_un_node_star.svg":"https://s8.qhres2.com/static/fcddfcedc2de3d27.svg","./public/d3svg1/button18/button_un_show_label.svg":"https://s8.qhres2.com/static/56e39d8a06d80614.svg","./public/d3svg1/button18/button_un_show_names.svg":"https://s7.qhres2.com/static/4265fd47c0cf10f9.svg","./public/d3svg1/button18/button_undo.svg":"https://s6.qhres2.com/static/452f4ab949f5f717.svg","./public/d3svg1/button18/fit_button.svg":"https://s9.qhres2.com/static/a15306ba67fea8fb.svg","./public/d3svg1/button18/full_button.svg":"https://s5.qhres2.com/static/eb91a1d179f54955.svg","./public/d3svg1/button18/un_full_button.svg":"https://s9.qhres2.com/static/503bd1e414d48b2d.svg","./public/d3svg1/button18/zoom_in_button.svg":"https://s8.qhres2.com/static/dbae6920a1320a8b.svg","./public/d3svg1/button18/zoom_out_button.svg":"https://s6.qhres2.com/static/29d7c11733747121.svg","./public/d3svg1/button22/button_add_con_node.svg":"https://s9.qhres2.com/static/785e607c9ee23627.svg","./public/d3svg1/button22/button_center_view.svg":"https://s7.qhres2.com/static/3397bc7254b51beb.svg","./public/d3svg1/button22/button_copy.svg":"https://s9.qhres2.com/static/30069da7051b18b2.svg","./public/d3svg1/button22/button_delete_node.svg":"https://s5.qhres2.com/static/41b42c1b9338bf61.svg","./public/d3svg1/button22/button_edit_label.svg":"https://s7.qhres2.com/static/8bb743361fc4518f.svg","./public/d3svg1/button22/button_expand_node.svg":"https://s9.qhres2.com/static/dcf9d0dcaac367d6.svg","./public/d3svg1/button22/button_eye_close.svg":"https://s8.qhres2.com/static/7731d44fbbfff78e.svg","./public/d3svg1/button22/button_eye_open.svg":"https://s8.qhres2.com/static/162e23b0b3117ac4.svg","./public/d3svg1/button22/button_fix_nodes.svg":"https://s9.qhres2.com/static/5b0347e9e7a1aa2f.svg","./public/d3svg1/button22/button_highlight.svg":"https://s5.qhres2.com/static/db1ff7e5d0a0cd0b.svg","./public/d3svg1/button22/button_hold_aggregation.svg":"https://s7.qhres2.com/static/1817bc802f324600.svg","./public/d3svg1/button22/button_node_star.svg":"https://s6.qhres2.com/static/264ed2b7346ff068.svg","./public/d3svg1/button22/button_release_aggregation.svg":"https://s8.qhres2.com/static/de10800a291a15b6.svg","./public/d3svg1/button22/button_select_all.svg":"https://s8.qhres2.com/static/5ca6e0b182ec41a3.svg","./public/d3svg1/button22/button_select_children.svg":"https://s7.qhres2.com/static/170e510f30ae5d18.svg","./public/d3svg1/button22/button_select_parents.svg":"https://s7.qhres2.com/static/b9483ede8dbc0661.svg","./public/d3svg1/button22/button_show_label.svg":"https://s9.qhres2.com/static/fb21737c72ba913c.svg","./public/d3svg1/button22/button_show_names.svg":"https://s5.qhres2.com/static/3ed0aa41d0e30447.svg","./public/d3svg1/button22/button_un_fix_nodes.svg":"https://s9.qhres2.com/static/51f3358f9b3cd8bc.svg","./public/d3svg1/button22/button_un_node_star.svg":"https://s5.qhres2.com/static/30e825df892fe581.svg","./public/d3svg1/button22/button_un_show_label.svg":"https://s9.qhres2.com/static/51df11a35c1a4a26.svg","./public/d3svg1/button22/button_un_show_names.svg":"https://s9.qhres2.com/static/0a4f7cf839cf6b54.svg","./public/d3svg1/button22/hm_icon_add.svg":"https://s8.qhres2.com/static/071a505a3047a584.svg","./public/d3svg1/button22/hm_icon_alias.svg":"https://s9.qhres2.com/static/fa4fd9d6ed685dc5.svg","./public/d3svg1/button22/hm_icon_alias_colse.svg":"https://s9.qhres2.com/static/ed7024cacc25f774.svg","./public/d3svg1/button22/hm_icon_auto.svg":"https://s7.qhres2.com/static/f2734fb0ab8dddbd.svg","./public/d3svg1/button22/hm_icon_del.svg":"https://s5.qhres2.com/static/41b42c1b9338bf61.svg","./public/d3svg1/button22/hm_icon_export.svg":"https://s6.qhres2.com/static/2ab82f6fb7e8f268.svg","./public/d3svg1/button22/hm_icon_fix.svg":"https://s9.qhres2.com/static/5b0347e9e7a1aa2f.svg","./public/d3svg1/button22/hm_icon_force.svg":"https://s9.qhres2.com/static/1d3c0cf03175c58f.svg","./public/d3svg1/button22/hm_icon_help.svg":"https://s8.qhres2.com/static/7d85e897f48b0550.svg","./public/d3svg1/button22/hm_icon_hightLight.svg":"https://s7.qhres2.com/static/34a53459a3b42c2b.svg","./public/d3svg1/button22/hm_icon_img.svg":"https://s9.qhres2.com/static/ada6385603ef7a1c.svg","./public/d3svg1/button22/hm_icon_import.svg":"https://s7.qhres2.com/static/3d56c16bbe148dc8.svg","./public/d3svg1/button22/hm_icon_redo.svg":"https://s8.qhres2.com/static/22958d70b83edca4.svg","./public/d3svg1/button22/hm_icon_save.svg":"https://s7.qhres2.com/static/01420cbedc43540c.svg","./public/d3svg1/button22/hm_icon_snapshot.svg":"https://s9.qhres2.com/static/381cd1af3ceb899b.svg","./public/d3svg1/button22/hm_icon_tree.svg":"https://s9.qhres2.com/static/3079d9e443c777e9.svg","./public/d3svg1/button22/hm_icon_undo.svg":"https://s7.qhres2.com/static/41168fc9ee1d9424.svg","./public/d3svg1/button22/hm_icon_unfix.svg":"https://s9.qhres2.com/static/51f3358f9b3cd8bc.svg","./public/d3svg1/button_un_show_label.svg":"https://s9.qhres2.com/static/c999cf6b0e881956.svg","./public/d3svg1/cert.svg":"https://s8.qhres2.com/static/4e37fb7b84ba3a0c.svg","./public/d3svg1/cert_code.svg":"https://s8.qhres2.com/static/b034794ce279efc0.svg","./public/d3svg1/cert_https.svg":"https://s6.qhres2.com/static/824ca1af9e390888.svg","./public/d3svg1/cert_md5.svg":"https://s8.qhres2.com/static/9d1ad5b5d6331b09.svg","./public/d3svg1/cloud.svg":"https://s6.qhres2.com/static/eec147fd2767f2d8.svg","./public/d3svg1/company.svg":"https://s5.qhres2.com/static/537fd3851d386c9f.svg","./public/d3svg1/country.svg":"https://s5.qhres2.com/static/70d0bd85eae8e814.svg","./public/d3svg1/dns.svg":"https://s5.qhres2.com/static/246dd6938e162f9d.svg","./public/d3svg1/dns_domain.svg":"https://s6.qhres2.com/static/60fa3aa7f64ff352.svg","./public/d3svg1/dns_ip.svg":"https://s6.qhres2.com/static/9d7c9a72dc6e961c.svg","./public/d3svg1/domain.svg":"https://s8.qhres2.com/static/d15450a9035991ba.svg","./public/d3svg1/down.svg":"https://s9.qhres2.com/static/411860dd8a269c6d.svg","./public/d3svg1/download.svg":"https://s5.qhres2.com/static/0203e45aba9f3c2d.svg","./public/d3svg1/email.svg":"https://s6.qhres2.com/static/1feb3629d4b23c7d.svg","./public/d3svg1/event.svg":"https://s8.qhres2.com/static/97cf2362000c475c.svg","./public/d3svg1/family.svg":"https://s9.qhres2.com/static/4cd5109f631b74af.svg","./public/d3svg1/file.svg":"https://s5.qhres2.com/static/e0d8abf70103070d.svg","./public/d3svg1/file_md5.svg":"https://s7.qhres2.com/static/77080266b227f724.svg","./public/d3svg1/find_country.svg":"https://s8.qhres2.com/static/dcb27208f20d1cd5.svg","./public/d3svg1/find_group.svg":"https://s8.qhres2.com/static/10e371c9b6f06acb.svg","./public/d3svg1/find_ioc.svg":"https://s5.qhres2.com/static/271a18c9c1b428a8.svg","./public/d3svg1/find_report.svg":"https://s8.qhres2.com/static/3ce41493e00534d3.svg","./public/d3svg1/find_target_country.svg":"https://s9.qhres2.com/static/075c79b523bb39f2.svg","./public/d3svg1/find_target_industry.svg":"https://s6.qhres2.com/static/e52f3939d5ced34b.svg","./public/d3svg1/find_ttp.svg":"https://s5.qhres2.com/static/cd00bc7837834f3e.svg","./public/d3svg1/find_vendor.svg":"https://s8.qhres2.com/static/b3eab987c6fc66d4.svg","./public/d3svg1/flags/abu_dhabi.png":"https://p5.ssl.qhimg.com/t0100b7420ed9d3b0fc.png","./public/d3svg1/flags/afghanistan.png":"https://p3.ssl.qhimg.com/t016b73f84b7152db62.png","./public/d3svg1/flags/albania.png":"https://p0.ssl.qhimg.com/t01554ace32f912d567.png","./public/d3svg1/flags/algeria.png":"https://p5.ssl.qhimg.com/t0122422b6d071ccc22.png","./public/d3svg1/flags/american_samoa.png":"https://p5.ssl.qhimg.com/t01c595535d38c2c488.png","./public/d3svg1/flags/andorra.png":"https://p5.ssl.qhimg.com/t01805f7f0ae834fc32.png","./public/d3svg1/flags/angola.png":"https://p0.ssl.qhimg.com/t014152de70c5b45254.png","./public/d3svg1/flags/anguilla.png":"https://p1.ssl.qhimg.com/t0155dd08b9abd92436.png","./public/d3svg1/flags/antigua_and_barbuda.png":"https://p5.ssl.qhimg.com/t01c42483ae1c05b5ae.png","./public/d3svg1/flags/argentina.png":"https://p0.ssl.qhimg.com/t014d3f8c0d28624343.png","./public/d3svg1/flags/armenia.png":"https://p4.ssl.qhimg.com/t01ffddd18f6213fbe8.png","./public/d3svg1/flags/aruba.png":"https://p5.ssl.qhimg.com/t01a954f4ebda2b2aaf.png","./public/d3svg1/flags/australia.png":"https://p0.ssl.qhimg.com/t01c024c65ff1cc8a8d.png","./public/d3svg1/flags/austria.png":"https://p4.ssl.qhimg.com/t01e6a215b0a4a0077d.png","./public/d3svg1/flags/azerbaijan.png":"https://p3.ssl.qhimg.com/t01b2f598ca0633bab4.png","./public/d3svg1/flags/bahamas.png":"https://p5.ssl.qhimg.com/t014389c5b895aeb8cb.png","./public/d3svg1/flags/bahrain.png":"https://p4.ssl.qhimg.com/t01e9aea3791db558e2.png","./public/d3svg1/flags/bangladesh.png":"https://p1.ssl.qhimg.com/t0156bcda81bdeb333e.png","./public/d3svg1/flags/barbados.png":"https://p1.ssl.qhimg.com/t01e173975ff3435533.png","./public/d3svg1/flags/belarus.png":"https://p3.ssl.qhimg.com/t01c6bd61585df5dc66.png","./public/d3svg1/flags/belgium.png":"https://p0.ssl.qhimg.com/t01bc981724a92fd288.png","./public/d3svg1/flags/belize.png":"https://p2.ssl.qhimg.com/t0157e3a5a5e9e6d0dc.png","./public/d3svg1/flags/benin.png":"https://p0.ssl.qhimg.com/t010fe48ceb0d83f1db.png","./public/d3svg1/flags/bermuda.png":"https://p0.ssl.qhimg.com/t01991a5555e2951383.png","./public/d3svg1/flags/bhutan.png":"https://p5.ssl.qhimg.com/t01c1a09b104cbbf155.png","./public/d3svg1/flags/bolivia.png":"https://p5.ssl.qhimg.com/t01f14d83bf204a3484.png","./public/d3svg1/flags/bosnia_and_herzegovina.png":"https://p4.ssl.qhimg.com/t010c6298b82cba538c.png","./public/d3svg1/flags/botswana.png":"https://p2.ssl.qhimg.com/t01c857af3514756b8f.png","./public/d3svg1/flags/brazil.png":"https://p3.ssl.qhimg.com/t015ca6cd0fb5c7cc59.png","./public/d3svg1/flags/british_virgin_islands.png":"https://p4.ssl.qhimg.com/t0104bceae11fd2f580.png","./public/d3svg1/flags/brunei.png":"https://p3.ssl.qhimg.com/t01f920666ff379bb8a.png","./public/d3svg1/flags/bulgaria.png":"https://p0.ssl.qhimg.com/t01766409ab0d88cc13.png","./public/d3svg1/flags/burkina_faso.png":"https://p2.ssl.qhimg.com/t01366f1d500c9f0c26.png","./public/d3svg1/flags/burundi.png":"https://p0.ssl.qhimg.com/t01ef92224393d4789c.png","./public/d3svg1/flags/cambodia.png":"https://p3.ssl.qhimg.com/t0189fddeb63273c902.png","./public/d3svg1/flags/cameroon.png":"https://p5.ssl.qhimg.com/t011b97aca53d096ec7.png","./public/d3svg1/flags/canada.png":"https://p0.ssl.qhimg.com/t0107f2e3664cc586a9.png","./public/d3svg1/flags/cape_verde.png":"https://p4.ssl.qhimg.com/t01bcd5521b34abe933.png","./public/d3svg1/flags/cayman_islands.png":"https://p3.ssl.qhimg.com/t0159643bbfdae25503.png","./public/d3svg1/flags/central_african_republic.png":"https://p1.ssl.qhimg.com/t01689eb3ad435ebb68.png","./public/d3svg1/flags/chad.png":"https://p5.ssl.qhimg.com/t019e06a9ad5a86a48b.png","./public/d3svg1/flags/chile.png":"https://p3.ssl.qhimg.com/t01da100a223247567f.png","./public/d3svg1/flags/china.png":"https://p5.ssl.qhimg.com/t01304bcd201fd23df6.png","./public/d3svg1/flags/christmas_island.png":"https://p4.ssl.qhimg.com/t01e7874db308ac2252.png","./public/d3svg1/flags/cocos_islands.png":"https://p1.ssl.qhimg.com/t01c0b7f434b6919f3f.png","./public/d3svg1/flags/colombia.png":"https://p5.ssl.qhimg.com/t014067c703a78dce3b.png","./public/d3svg1/flags/comoros.png":"https://p1.ssl.qhimg.com/t0169a07d86c511072b.png","./public/d3svg1/flags/congo_democratic_republic.png":"https://p3.ssl.qhimg.com/t0183ac60001ce46f1f.png","./public/d3svg1/flags/congo_republic.png":"https://p2.ssl.qhimg.com/t013046ae1b2eaa2e03.png","./public/d3svg1/flags/costa_rica.png":"https://p5.ssl.qhimg.com/t0126df8804c76f2fd6.png","./public/d3svg1/flags/cote_d'ivoire.png":"https://p2.ssl.qhimg.com/t01bcd9188af99a7148.png","./public/d3svg1/flags/croatia.png":"https://p5.ssl.qhimg.com/t01d3566b33a31ee615.png","./public/d3svg1/flags/cuba.png":"https://p4.ssl.qhimg.com/t01dc80791b9bc8e11c.png","./public/d3svg1/flags/curacao.png":"https://p5.ssl.qhimg.com/t011f17f8ec93fecd34.png","./public/d3svg1/flags/cyprus.png":"https://p5.ssl.qhimg.com/t019a4c05b99a9c64be.png","./public/d3svg1/flags/czech_republic.png":"https://p5.ssl.qhimg.com/t013224c0c67639351f.png","./public/d3svg1/flags/denmark.png":"https://p1.ssl.qhimg.com/t01b0f04b65a97f8028.png","./public/d3svg1/flags/djibouti.png":"https://p0.ssl.qhimg.com/t01e4796ea6f99dd948.png","./public/d3svg1/flags/dominica.png":"https://p4.ssl.qhimg.com/t01b3867bd167f1d976.png","./public/d3svg1/flags/dominican_republic.png":"https://p5.ssl.qhimg.com/t014378d5ead5b5e6ec.png","./public/d3svg1/flags/east_timor.png":"https://p5.ssl.qhimg.com/t01e8e5fb8405dec7e3.png","./public/d3svg1/flags/ecuador.png":"https://p5.ssl.qhimg.com/t01395fb935fa0f0e3a.png","./public/d3svg1/flags/egypt.png":"https://p3.ssl.qhimg.com/t0101fe13f0f24008e9.png","./public/d3svg1/flags/el_salvador.png":"https://p3.ssl.qhimg.com/t010104541f9c7a0c99.png","./public/d3svg1/flags/england.png":"https://p5.ssl.qhimg.com/t0143b14e971b5b3cb6.png","./public/d3svg1/flags/equatorial_guinea.png":"https://p1.ssl.qhimg.com/t01a74942f5afd0b3a4.png","./public/d3svg1/flags/eritrea.png":"https://p3.ssl.qhimg.com/t01ce53472f50f44f5b.png","./public/d3svg1/flags/estonia.png":"https://p5.ssl.qhimg.com/t016d527c4a923153eb.png","./public/d3svg1/flags/ethiopia.png":"https://p2.ssl.qhimg.com/t0192b527f6a90ddbe0.png","./public/d3svg1/flags/europe.png":"https://p3.ssl.qhimg.com/t015bb42e201aa13efa.png","./public/d3svg1/flags/falkland_islands.png":"https://p0.ssl.qhimg.com/t010ae1bba78b7eb7a6.png","./public/d3svg1/flags/fiji.png":"https://p5.ssl.qhimg.com/t01ffb03de7e05ae7aa.png","./public/d3svg1/flags/finland.png":"https://p4.ssl.qhimg.com/t0195f5d1feacba8397.png","./public/d3svg1/flags/france.png":"https://p2.ssl.qhimg.com/t01f697a973b72a98e7.png","./public/d3svg1/flags/french_guiana.png":"https://p1.ssl.qhimg.com/t016346509b6df42a07.png","./public/d3svg1/flags/french_polynesia.png":"https://p4.ssl.qhimg.com/t01932beb0a7b52f3da.png","./public/d3svg1/flags/gabon.png":"https://p4.ssl.qhimg.com/t0132f298a0f193b661.png","./public/d3svg1/flags/gambia.png":"https://p3.ssl.qhimg.com/t011564ba1c6e0c96ed.png","./public/d3svg1/flags/georgia.png":"https://p1.ssl.qhimg.com/t01eea60bad5abefdba.png","./public/d3svg1/flags/germany.png":"https://p2.ssl.qhimg.com/t0184b3001d906d19c7.png","./public/d3svg1/flags/ghana.png":"https://p2.ssl.qhimg.com/t01f7dcd42afd3fc0ff.png","./public/d3svg1/flags/gibraltar.png":"https://p2.ssl.qhimg.com/t01ed767f13c90a732f.png","./public/d3svg1/flags/greece.png":"https://p5.ssl.qhimg.com/t01da5d5973a17cc048.png","./public/d3svg1/flags/greenland.png":"https://p4.ssl.qhimg.com/t01d3f1604dea436593.png","./public/d3svg1/flags/grenada.png":"https://p4.ssl.qhimg.com/t0170078c4c722961d5.png","./public/d3svg1/flags/guam.png":"https://p2.ssl.qhimg.com/t01fe323aa0e62d3c0c.png","./public/d3svg1/flags/guatemala.png":"https://p1.ssl.qhimg.com/t013743b6c563848d07.png","./public/d3svg1/flags/guernsey.png":"https://p5.ssl.qhimg.com/t01f86e78de635ff50c.png","./public/d3svg1/flags/guinea.png":"https://p3.ssl.qhimg.com/t01d4f635060a97fb49.png","./public/d3svg1/flags/guinea_bissau.png":"https://p4.ssl.qhimg.com/t014ee5f7086bb14c1e.png","./public/d3svg1/flags/guyana.png":"https://p2.ssl.qhimg.com/t01e7d086533c3f87f2.png","./public/d3svg1/flags/haiti.png":"https://p5.ssl.qhimg.com/t01159c94d32253d312.png","./public/d3svg1/flags/honduras.png":"https://p4.ssl.qhimg.com/t01796b21e7e87b5254.png","./public/d3svg1/flags/hongkong.png":"https://p1.ssl.qhimg.com/t0121cfe81da15a2878.png","./public/d3svg1/flags/hungary.png":"https://p4.ssl.qhimg.com/t01b5087e47ff53250a.png","./public/d3svg1/flags/iceland.png":"https://p3.ssl.qhimg.com/t010178e8a27cf4f660.png","./public/d3svg1/flags/india.png":"https://p4.ssl.qhimg.com/t018213e7e6dc2a3368.png","./public/d3svg1/flags/indonesia.png":"https://p5.ssl.qhimg.com/t01bcb4661812d6e2dd.png","./public/d3svg1/flags/ip.png":"https://p4.ssl.qhimg.com/t012e2c50a4c424fd37.png","./public/d3svg1/flags/iran.png":"https://p3.ssl.qhimg.com/t011a5bca45b65c6bda.png","./public/d3svg1/flags/iraq.png":"https://p0.ssl.qhimg.com/t01c351fb6799b43b8e.png","./public/d3svg1/flags/ireland.png":"https://p0.ssl.qhimg.com/t01c19ffc4e51b1b821.png","./public/d3svg1/flags/isle_of_man.png":"https://p4.ssl.qhimg.com/t017cc3b83618827640.png","./public/d3svg1/flags/israel.png":"https://p1.ssl.qhimg.com/t010f3fe6361aebe345.png","./public/d3svg1/flags/italy.png":"https://p3.ssl.qhimg.com/t01259e5daf0549a262.png","./public/d3svg1/flags/jamaica.png":"https://p4.ssl.qhimg.com/t01fe1c1722f1aadb19.png","./public/d3svg1/flags/japan.png":"https://p1.ssl.qhimg.com/t012be27ee2e0144814.png","./public/d3svg1/flags/jersey.png":"https://p5.ssl.qhimg.com/t01e6808ce8980d8153.png","./public/d3svg1/flags/jordan.png":"https://p3.ssl.qhimg.com/t013b03a35b35e93112.png","./public/d3svg1/flags/kazakhstan.png":"https://p3.ssl.qhimg.com/t015c547f69f6914068.png","./public/d3svg1/flags/kenya.png":"https://p4.ssl.qhimg.com/t01c139207c1af5796e.png","./public/d3svg1/flags/kiribati.png":"https://p3.ssl.qhimg.com/t01fa801f19411d0845.png","./public/d3svg1/flags/kosovo.png":"https://p5.ssl.qhimg.com/t017a2248e71b96fe50.png","./public/d3svg1/flags/kuwait.png":"https://p5.ssl.qhimg.com/t0144ba519b64e3b8d5.png","./public/d3svg1/flags/kyrgyzstan.png":"https://p3.ssl.qhimg.com/t01586d16c82fd0d335.png","./public/d3svg1/flags/laos.png":"https://p5.ssl.qhimg.com/t01c625355323458017.png","./public/d3svg1/flags/latvia.png":"https://p4.ssl.qhimg.com/t01ea8a114edbe5ec64.png","./public/d3svg1/flags/lebanon.png":"https://p3.ssl.qhimg.com/t01ffbeb21378af699a.png","./public/d3svg1/flags/lesotho.png":"https://p0.ssl.qhimg.com/t01d373c8167c1bbc61.png","./public/d3svg1/flags/liberia.png":"https://p5.ssl.qhimg.com/t01f36c69ecf34bcb61.png","./public/d3svg1/flags/libya.png":"https://p4.ssl.qhimg.com/t01d20838c79c8f3ba6.png","./public/d3svg1/flags/liechtenstein.png":"https://p5.ssl.qhimg.com/t0196b0707e4ac337b5.png","./public/d3svg1/flags/lithuania.png":"https://p2.ssl.qhimg.com/t01b414cecd90415a6a.png","./public/d3svg1/flags/luxembourg.png":"https://p3.ssl.qhimg.com/t013d9dda633fc50ffd.png","./public/d3svg1/flags/macau.png":"https://p4.ssl.qhimg.com/t01a892679802369212.png","./public/d3svg1/flags/macedonia.png":"https://p3.ssl.qhimg.com/t0123808f60cf668fc9.png","./public/d3svg1/flags/madagascar.png":"https://p5.ssl.qhimg.com/t014d15e974516d5cb3.png","./public/d3svg1/flags/malawi.png":"https://p2.ssl.qhimg.com/t012db076a05806722c.png","./public/d3svg1/flags/malaysia.png":"https://p1.ssl.qhimg.com/t01f9a3c22f13fd96c5.png","./public/d3svg1/flags/maldives.png":"https://p3.ssl.qhimg.com/t01fde5890555898b6f.png","./public/d3svg1/flags/mali.png":"https://p0.ssl.qhimg.com/t01422870677e8b5bce.png","./public/d3svg1/flags/malta.png":"https://p4.ssl.qhimg.com/t0172c88550dc2c333e.png","./public/d3svg1/flags/marshall_islands.png":"https://p2.ssl.qhimg.com/t01646846cbbf3a4735.png","./public/d3svg1/flags/mauritania.png":"https://p5.ssl.qhimg.com/t01c3ade924f1cef885.png","./public/d3svg1/flags/mauritius.png":"https://p1.ssl.qhimg.com/t0129026fcfcd64601f.png","./public/d3svg1/flags/mexico.png":"https://p4.ssl.qhimg.com/t01e06d39e098fc8ccb.png","./public/d3svg1/flags/micronesia.png":"https://p2.ssl.qhimg.com/t01c1b247a750439a7e.png","./public/d3svg1/flags/moldova.png":"https://p3.ssl.qhimg.com/t0150c6f75d4d3eee8b.png","./public/d3svg1/flags/monaco.png":"https://p5.ssl.qhimg.com/t01bcb4661812d6e2dd.png","./public/d3svg1/flags/mongolia.png":"https://p1.ssl.qhimg.com/t012cfc9fa747237289.png","./public/d3svg1/flags/montenegro.png":"https://p5.ssl.qhimg.com/t016462c01ca1bafac0.png","./public/d3svg1/flags/montserrat.png":"https://p0.ssl.qhimg.com/t010c8845d6d090c447.png","./public/d3svg1/flags/morocco.png":"https://p1.ssl.qhimg.com/t019897bbe03901a57a.png","./public/d3svg1/flags/mozambique.png":"https://p4.ssl.qhimg.com/t015f93036ad9aec89c.png","./public/d3svg1/flags/myanmar_burma.png":"https://p4.ssl.qhimg.com/t013ee76060475fe0b0.png","./public/d3svg1/flags/namibia.png":"https://p2.ssl.qhimg.com/t015e0bbc1fec4908a9.png","./public/d3svg1/flags/nauru.png":"https://p4.ssl.qhimg.com/t0174083d9b9b5e0069.png","./public/d3svg1/flags/nepal.png":"https://p5.ssl.qhimg.com/t017808e1379fc17470.png","./public/d3svg1/flags/netherlands.png":"https://p3.ssl.qhimg.com/t01d592b75467b0db7b.png","./public/d3svg1/flags/netherlands_antilles.png":"https://p4.ssl.qhimg.com/t013bbf175457b12c12.png","./public/d3svg1/flags/new_caledonia.png":"https://p5.ssl.qhimg.com/t012231079a91d351eb.png","./public/d3svg1/flags/new_zealand.png":"https://p4.ssl.qhimg.com/t0149ee6eb1c37a282a.png","./public/d3svg1/flags/nicaragua.png":"https://p2.ssl.qhimg.com/t013d155996d8c986c9.png","./public/d3svg1/flags/niger.png":"https://p4.ssl.qhimg.com/t014f4d87e9952a272b.png","./public/d3svg1/flags/nigeria.png":"https://p4.ssl.qhimg.com/t01964d810f5fe6b404.png","./public/d3svg1/flags/niue.png":"https://p2.ssl.qhimg.com/t01f23318f87536e3be.png","./public/d3svg1/flags/norfolk_island.png":"https://p2.ssl.qhimg.com/t016bb5e86248642b36.png","./public/d3svg1/flags/north_korea.png":"https://p2.ssl.qhimg.com/t017327fd94e8b6a5a3.png","./public/d3svg1/flags/northern_cyprus.png":"https://p1.ssl.qhimg.com/t011b7548ce349c2c59.png","./public/d3svg1/flags/northern_ireland.png":"https://p1.ssl.qhimg.com/t01ea43c093d6f4f449.png","./public/d3svg1/flags/norway.png":"https://p0.ssl.qhimg.com/t01c987d9dd507bfdd6.png","./public/d3svg1/flags/oman.png":"https://p5.ssl.qhimg.com/t01808d4462b6f3a218.png","./public/d3svg1/flags/pakistan.png":"https://p0.ssl.qhimg.com/t01cf5e993ade4f2964.png","./public/d3svg1/flags/palau.png":"https://p3.ssl.qhimg.com/t01c068865ac2e2b031.png","./public/d3svg1/flags/palestine.png":"https://p3.ssl.qhimg.com/t01eead994da457cb04.png","./public/d3svg1/flags/panama.png":"https://p1.ssl.qhimg.com/t01cc4745092f80ccfb.png","./public/d3svg1/flags/papua_new_guinea.png":"https://p3.ssl.qhimg.com/t0144673a8e2c3ef051.png","./public/d3svg1/flags/paraguay.png":"https://p3.ssl.qhimg.com/t01dda2a735d20519e7.png","./public/d3svg1/flags/peru.png":"https://p1.ssl.qhimg.com/t0133af174deb1560d5.png","./public/d3svg1/flags/philippines.png":"https://p1.ssl.qhimg.com/t01f5f86e3429cb4c81.png","./public/d3svg1/flags/pitcairn_islands.png":"https://p5.ssl.qhimg.com/t014517b95359047675.png","./public/d3svg1/flags/poland.png":"https://p1.ssl.qhimg.com/t01069ed918cdd98767.png","./public/d3svg1/flags/portugal.png":"https://p3.ssl.qhimg.com/t018cefa1ac33d50290.png","./public/d3svg1/flags/puerto_rico.png":"https://p5.ssl.qhimg.com/t01659a3560240c8a4e.png","./public/d3svg1/flags/qatar.png":"https://p4.ssl.qhimg.com/t0169854fcdd37ed962.png","./public/d3svg1/flags/romania.png":"https://p5.ssl.qhimg.com/t01208b9341dba47f11.png","./public/d3svg1/flags/russia.png":"https://p1.ssl.qhimg.com/t016b8ee4de7e5d9e69.png","./public/d3svg1/flags/rwanda.png":"https://p1.ssl.qhimg.com/t011c8a95a7340b4dae.png","./public/d3svg1/flags/sahrawi_arab.png":"https://p4.ssl.qhimg.com/t01833624156c42e3ab.png","./public/d3svg1/flags/saint_kitts_and_nevis.png":"https://p2.ssl.qhimg.com/t01bb701bf8e688e076.png","./public/d3svg1/flags/saint_lucia.png":"https://p0.ssl.qhimg.com/t01be47edaa16e3efdb.png","./public/d3svg1/flags/saint_vincent_and_grenadines.png":"https://p0.ssl.qhimg.com/t01356376d62ad2fb08.png","./public/d3svg1/flags/samoa.png":"https://p2.ssl.qhimg.com/t015099091e7ff643a2.png","./public/d3svg1/flags/san_marino.png":"https://p1.ssl.qhimg.com/t01c7d8eaf79bd11950.png","./public/d3svg1/flags/sao_tome_principe.png":"https://p4.ssl.qhimg.com/t015ed5322e52b33883.png","./public/d3svg1/flags/saudi_arabia.png":"https://p3.ssl.qhimg.com/t015ef983618f3dad1d.png","./public/d3svg1/flags/scotland.png":"https://p2.ssl.qhimg.com/t0132d8efbdc309befc.png","./public/d3svg1/flags/senegal.png":"https://p3.ssl.qhimg.com/t01ed2aa2fac6a327f1.png","./public/d3svg1/flags/serbia.png":"https://p0.ssl.qhimg.com/t01f87c8ab028617f5b.png","./public/d3svg1/flags/seychelles.png":"https://p1.ssl.qhimg.com/t0121e9aa4597a2c5d2.png","./public/d3svg1/flags/sierra_leone.png":"https://p4.ssl.qhimg.com/t010afc938f22552079.png","./public/d3svg1/flags/singapore.png":"https://p2.ssl.qhimg.com/t0140999577dd24227e.png","./public/d3svg1/flags/sint_maarten.png":"https://p0.ssl.qhimg.com/t0115986c65ec59b44c.png","./public/d3svg1/flags/slovakia.png":"https://p4.ssl.qhimg.com/t011e49878fdeda9e6c.png","./public/d3svg1/flags/slovenia.png":"https://p4.ssl.qhimg.com/t01ef90cb0d44c02757.png","./public/d3svg1/flags/solomon_islands.png":"https://p3.ssl.qhimg.com/t01066406f4b1266571.png","./public/d3svg1/flags/somalia.png":"https://p4.ssl.qhimg.com/t013c470e6e15a1a963.png","./public/d3svg1/flags/south_africa.png":"https://p4.ssl.qhimg.com/t01aaa44743ad66ca71.png","./public/d3svg1/flags/south_korea.png":"https://p2.ssl.qhimg.com/t01207c734bc93ffca7.png","./public/d3svg1/flags/south_sudan.png":"https://p5.ssl.qhimg.com/t011c283fad96263e62.png","./public/d3svg1/flags/spain.png":"https://p2.ssl.qhimg.com/t018316992b1c22281d.png","./public/d3svg1/flags/sri_lanka.png":"https://p0.ssl.qhimg.com/t01fb7bcacef951feed.png","./public/d3svg1/flags/sudan.png":"https://p3.ssl.qhimg.com/t01f129ac747600e082.png","./public/d3svg1/flags/suriname.png":"https://p0.ssl.qhimg.com/t017a12641513ab7d34.png","./public/d3svg1/flags/swaziland.png":"https://p5.ssl.qhimg.com/t01936216cc45eeff7b.png","./public/d3svg1/flags/sweden.png":"https://p0.ssl.qhimg.com/t0166958e31ac92957e.png","./public/d3svg1/flags/switzeland.png":"https://p2.ssl.qhimg.com/t01122ada53eb1b807e.png","./public/d3svg1/flags/syria.png":"https://p1.ssl.qhimg.com/t01953c86d18052c932.png","./public/d3svg1/flags/taiwan.png":"https://p5.ssl.qhimg.com/t01304bcd201fd23df6.png","./public/d3svg1/flags/tajikistan.png":"https://p2.ssl.qhimg.com/t0198c5c84a62b12388.png","./public/d3svg1/flags/tanzania.png":"https://p1.ssl.qhimg.com/t01d537b34d56658c98.png","./public/d3svg1/flags/thailand.png":"https://p5.ssl.qhimg.com/t010050f650fff9bd66.png","./public/d3svg1/flags/the_cook_islands.png":"https://p3.ssl.qhimg.com/t011292a8f19147f865.png","./public/d3svg1/flags/the_faroe_islands.png":"https://p0.ssl.qhimg.com/t01cda6e9ec5b5bc8f6.png","./public/d3svg1/flags/the_turks_and_caicos_islands.png":"https://p4.ssl.qhimg.com/t0114fca92287df5c95.png","./public/d3svg1/flags/togo.png":"https://p0.ssl.qhimg.com/t0182ba165ebbbca70a.png","./public/d3svg1/flags/tokelau.png":"https://p5.ssl.qhimg.com/t017e4bae219b59d6e6.png","./public/d3svg1/flags/tonga.png":"https://p1.ssl.qhimg.com/t01998933793d4d8fbc.png","./public/d3svg1/flags/transnistria.png":"https://p5.ssl.qhimg.com/t012dc7b17601baa895.png","./public/d3svg1/flags/trinidad_and_tobago.png":"https://p2.ssl.qhimg.com/t017371391609bf78d7.png","./public/d3svg1/flags/tunisia.png":"https://p3.ssl.qhimg.com/t0124cb2d7bf0797501.png","./public/d3svg1/flags/turkey.png":"https://p1.ssl.qhimg.com/t01b51b544b5e683846.png","./public/d3svg1/flags/turkmenistan.png":"https://p2.ssl.qhimg.com/t0180705dbb5d2590e1.png","./public/d3svg1/flags/tuvalu.png":"https://p0.ssl.qhimg.com/t01eb80c5b0e6b4cf9d.png","./public/d3svg1/flags/uganda.png":"https://p3.ssl.qhimg.com/t01a42822abbcef11ef.png","./public/d3svg1/flags/ukraine.png":"https://p0.ssl.qhimg.com/t01a18c73c5e309e867.png","./public/d3svg1/flags/united_arab_emirates_uae.png":"https://p4.ssl.qhimg.com/t01d6ac620490436646.png","./public/d3svg1/flags/united_kingdom.png":"https://p2.ssl.qhimg.com/t01b2dab8383fd03d16.png","./public/d3svg1/flags/united_states.png":"https://p2.ssl.qhimg.com/t01ac4aab9abb62470d.png","./public/d3svg1/flags/united_states_virgin_islands.png":"https://p4.ssl.qhimg.com/t010e706830471605ae.png","./public/d3svg1/flags/uruguay.png":"https://p2.ssl.qhimg.com/t0173c8556316268f27.png","./public/d3svg1/flags/uzbekistan.png":"https://p2.ssl.qhimg.com/t01692a87d0deaa0cd4.png","./public/d3svg1/flags/vanuatu.png":"https://p4.ssl.qhimg.com/t01dfe59d18beb502ed.png","./public/d3svg1/flags/vatican.png":"https://p4.ssl.qhimg.com/t015204ea5b7e60deae.png","./public/d3svg1/flags/venezuela.png":"https://p4.ssl.qhimg.com/t01d6d7092d46e0d7c3.png","./public/d3svg1/flags/vietnam.png":"https://p0.ssl.qhimg.com/t0168708c0e4043f8a0.png","./public/d3svg1/flags/wales.png":"https://p5.ssl.qhimg.com/t010c0cbfacd5576ddd.png","./public/d3svg1/flags/wallis_and_futuna.png":"https://p4.ssl.qhimg.com/t018351271fd687e442.png","./public/d3svg1/flags/yemen.png":"https://p5.ssl.qhimg.com/t01b506ff3ca76f158a.png","./public/d3svg1/flags/zambia.png":"https://p4.ssl.qhimg.com/t0114f327cbfbe2c728.png","./public/d3svg1/flags/zimbabwe.png":"https://p4.ssl.qhimg.com/t01704ad2c0a3c95fd1.png","./public/d3svg1/fold-left.svg":"https://s8.qhres2.com/static/c515b0328ee8a877.svg","./public/d3svg1/fold-right.svg":"https://s7.qhres2.com/static/504df9c78a8e3507.svg","./public/d3svg1/group.svg":"https://s9.qhres2.com/static/be31052989161b10.svg","./public/d3svg1/host.svg":"https://s8.qhres2.com/static/14adc2df5557447e.svg","./public/d3svg1/icon_ thumbprint.svg":"https://s9.qhres2.com/static/3b7801940436d878.svg","./public/d3svg1/icon_cert_md5.svg":"https://s5.qhres2.com/static/c7c9113c1add9bb6.svg","./public/d3svg1/icon_email.svg":"https://s9.qhres2.com/static/40461e9fdf73732d.svg","./public/d3svg1/icon_family.svg":"https://s5.qhres2.com/static/89fd30ea0238a2ed.svg","./public/d3svg1/icon_files.svg":"https://s7.qhres2.com/static/7fb96bbb0097561a.svg","./public/d3svg1/icon_host.svg":"https://s9.qhres2.com/static/accf9c9fb2b60213.svg","./public/d3svg1/icon_ip.svg":"https://s8.qhres2.com/static/86c2b4d0b762506e.svg","./public/d3svg1/icon_issuer.svg":"https://s6.qhres2.com/static/d14d393f1f11c200.svg","./public/d3svg1/icon_mac.svg":"https://s5.qhres2.com/static/c3fa50300c1d37c8.svg","./public/d3svg1/icon_mid.svg":"https://s8.qhres2.com/static/484c81933458f25a.svg","./public/d3svg1/icon_org.svg":"https://s8.qhres2.com/static/ec482f5493e22a64.svg","./public/d3svg1/icon_report.svg":"https://s8.qhres2.com/static/c493d2bcf07416f7.svg","./public/d3svg1/icon_search.svg":"https://s5.qhres2.com/static/1441aaeff1cae201.svg","./public/d3svg1/icon_subject.svg":"https://s7.qhres2.com/static/9e4ad22e6cfb0366.svg","./public/d3svg1/icon_vul.svg":"https://s6.qhres2.com/static/efa2c5ac7be3f1e4.svg","./public/d3svg1/internet.svg":"https://s7.qhres2.com/static/a07f5b1ffd26c4af.svg","./public/d3svg1/intranet.svg":"https://s5.qhres2.com/static/ab0e84c187e84758.svg","./public/d3svg1/ioc.svg":"https://s5.qhres2.com/static/4920f2fc81f4a8b5.svg","./public/d3svg1/ip copy.svg":"https://s5.qhres2.com/static/f30c7317dd483dbd.svg","./public/d3svg1/ip.svg":"https://s5.qhres2.com/static/52716362997c3c47.svg","./public/d3svg1/ips.svg":"https://s5.qhres2.com/static/37002885cb7b3504.svg","./public/d3svg1/jiantou.svg":"https://s9.qhres2.com/static/1c7e66fc3250cb03.svg","./public/d3svg1/jiantou_active.svg":"https://s7.qhres2.com/static/d42dd8727c2035f1.svg","./public/d3svg1/mac.svg":"https://s6.qhres2.com/static/2f4f2fb7dfd3794e.svg","./public/d3svg1/md5.svg":"https://s8.qhres2.com/static/6d9a30203c2e2f6c.svg","./public/d3svg1/md51.svg":"https://s5.qhres2.com/static/e5740a41cd1ee94b.svg","./public/d3svg1/md52.svg":"https://s5.qhres2.com/static/4bdced7a2e104377.svg","./public/d3svg1/md53.svg":"https://s7.qhres2.com/static/273f73f17afdcac5.svg","./public/d3svg1/md54.svg":"https://s6.qhres2.com/static/51c845288534d905.svg","./public/d3svg1/mid.svg":"https://s7.qhres2.com/static/25cd292ca0cc185c.svg","./public/d3svg1/name.svg":"https://s7.qhres2.com/static/b6d2889ff8072331.svg","./public/d3svg1/net.svg":"https://s8.qhres2.com/static/b0c58108f3cb904f.svg","./public/d3svg1/node.svg":"https://s5.qhres2.com/static/ea74a3b821146cd5.svg","./public/d3svg1/node_type.svg":"https://s5.qhres2.com/static/f2f83ae7d21f08e1.svg","./public/d3svg1/org.svg":"https://s6.qhres2.com/static/782980032391ba28.svg","./public/d3svg1/organization.svg":"https://s9.qhres2.com/static/d9d4c0b5baf068fd.svg","./public/d3svg1/proc.svg":"https://s7.qhres2.com/static/b76866d80c99489c.svg","./public/d3svg1/proc_md5.svg":"https://s6.qhres2.com/static/da0dfb9006a02582.svg","./public/d3svg1/relate_ip.svg":"https://s9.qhres2.com/static/75ed45280c79c92b.svg","./public/d3svg1/report.svg":"https://s7.qhres2.com/static/ecf1a790525d5848.svg","./public/d3svg1/router_mac.svg":"https://s6.qhres2.com/static/13de6c9d73d5275b.svg","./public/d3svg1/star.svg":"https://s7.qhres2.com/static/3eb49d1f9c377af8.svg","./public/d3svg1/sys_icon.svg":"https://s8.qhres2.com/static/1df923965bc3ddc4.svg","./public/d3svg1/target_country.svg":"https://s9.qhres2.com/static/be861df3682f42b9.svg","./public/d3svg1/target_industry.svg":"https://s8.qhres2.com/static/cd490ac4192f664e.svg","./public/d3svg1/thumbprint_md5.svg":"https://s8.qhres2.com/static/57e700699cfae3e2.svg","./public/d3svg1/ttp.svg":"https://s5.qhres2.com/static/5dca11713acd5c0b.svg","./public/d3svg1/url.svg":"https://s7.qhres2.com/static/a926d82581d0602e.svg","./public/d3svg1/user_name.svg":"https://s5.qhres2.com/static/e871b79b1bf55733.svg","./public/d3svg1/vendor.svg":"https://s6.qhres2.com/static/a047cc46ab1b941c.svg","./public/d3svg1/vul.svg":"https://s6.qhres2.com/static/d45444d8a175ead3.svg"};function yi(e){try{var t,n=new RegExp("(^| )"+e+"=([^;]*)(;|$)");return(t=document.cookie.match(n))?unescape(t[2]):""}catch(r){return""}}function z0(e,t,n){var r=(n=n||{}).expires;typeof r=="number"&&(r=new Date).setTime(r.getTime()+n.expires);try{document.cookie=e+"="+escape(t)+(r?";expires="+r.toGMTString():"")+(n.path?";path="+n.path:"")+(n.domain?"; domain="+n.domain:"")}catch(o){}}function v5(e){return e!=null&&e.constructor!=null?Object.prototype.toString.call(e).slice(8,-1):""}function y5(e){return v5(e)=="Array"}function Oc(e){return v5(e)=="Function"}function bi(e){return e!==null&&typeof e=="object"}function ho(e,t,n){for(var r in t)(n||!e[r]&&!(r in e))&&(e[r]=t[r]);return e}const jQ=["Baiduspider","Googlebot","360Spider","Sosospider","Yahoo! Slurp China","Yahoo!","YoudaoBot","YodaoBot","Sogou web spider","Sogou inst spider","Sogou spider2","Sogou blog","Sogou News Spider","Sogou Orion spider","msnbot","msnbot-media","bingbot","bingpreview","YisouSpider","ia_archiver","EasouSpider","JikeSpider","Bytespider"];var Me=new class{constructor(){this._activeTime="",this.appkey="",this.trackId="",this.mid="",this.m2="",this.asc="",this.asc2="",this.debug=!1,this.config={trackUrl:null,clickUrl:null,areaIds:null,hbLogTimer:0}}log(){if(this.debug&&typeof console=="object"&&console.log)try{return console.log.apply(console,arguments)}catch(e){console.log(arguments[0])}}userAgentIsExitsSpiders(){const e=this.getUserAgent().toLowerCase();let t=!1;return jQ.map(n=>{e.indexOf(n.toLowerCase())>=0&&(t=!0)}),t}setUtilActiveTime(e){this._activeTime=e}setUtilConf(e,t){var n={};bi(e)?n=e:n[e]=t,this.config=ho(this.config,n,!0)}getUtilConf(){return this.config}getColorDepth(){return window.screen.colorDepth+"-bit"}getLanguage(){return(navigator.language||navigator.browserLanguage).toLowerCase()}getUserAgent(){return navigator.userAgent}getScreenSize(){return window.screen.width+"x"+window.screen.height}getProject(e){return/QH_[0-9]+_[0-9]*\#?[0-9]{1,}$/.test(e)?this.appkey=e:e&&console.log("当前写入的appkey:",e,"格式异常,请前往雷达分析平台确认。"),this.appkey}getReferrer(){var e=document.referrer||"";return e.indexOf("pass")>-1||e.indexOf("pwd")>-1?"403":e}getBrowser(){var e={"360se-ua":"360se","360ee":"360ee",edge:"edg",edge:"edga",edge:"edgios",TT:"tencenttraveler",Maxthon:"maxthon",GreenBrowser:"greenbrowser",Sogou:"se 2.x",TheWorld:"theworld"},t=navigator.userAgent.toLowerCase();for(var n in e)if(t.indexOf(e[n])>-1)return n;var r=!1;try{+external.twGetVersion(external.twGetSecurityID(window)).replace(/\./g,"")>1013&&(r=!0)}catch(a){}if(r)return"360se-noua";var o=t.match(/(msie|chrome|safari|firefox|opera|trident)/);return(o=o?o[0]:"")=="msie"?o=t.match(/msie[^;]+/)+"":o=="trident"&&t.replace(/trident\/[0-9].*rv[ :]([0-9.]+)/gi,function(a,c){o="msie "+c}),o}getReferrerKeyWord(){const e=document.referrer;var t={q:"",eqid:""};if(!e)return t;for(var n=new URL(e).search.substring(1).split("&"),r={},o=0;o<n.length;o++){var a=n[o].split("=");r[a[0]]=a[1]}return e.indexOf("baidu.com")>-1?(t.q=r.wd,t.eqid=r.eqid):(e.indexOf("so.com")>-1||e.indexOf("sm.cn")>-1)&&(t.q=r.q),t.q||(t.q=""),t}getLocation(e){e||(e="");try{e=location.href}catch(t){(e=document.createElement("a")).href="",e=e.href}return e=/\.(s?htm|php)/.test(e)?e:e.replace(/\/$/,"")+"/"}hash(e){for(var t=0,n=0,r=e.length-1;r>=0;r--){var o=parseInt(e.charCodeAt(r),10);(n=266338304&(t=(t<<6&268435455)+o+(o<<14)))!=0&&(t^=n>>21)}return t}guid(){for(var e=[navigator.appName,navigator.version,navigator.language||navigator.browserLanguage,navigator.platform,navigator.userAgent,window.screen.width,"x",window.screen.height,window.screen.colorDepth,document.referrer].join(""),t=e.length,n=window.history.length;n;)e+=n--^t++;return 2147483647*(Math.round(2147483647*Math.random())^this.hash(e))}isLocal(){try{var e=location.protocol.toLowerCase();if(e=="http:"||e=="https:")return!1}catch(t){}return!0}getSid(){var e="__DC_sid",t=yi(e);return!t&&(t=yi("__sid"))&&t.split(".").length!==4&&(t=null),t||(t=[this.hash(this.isLocal()?"":document.domain),this.guid(),+new Date+Math.random()].join(".")),z0(e,t,{expires:60*(this._activeTime||30)*1e3,path:"/"}),t}setUtilTrackId(e){this.trackId=e}getGid(e=!1){var t="__DC_gid",n=yi(t);return!n&&(n=yi("__gid"))&&n.split(".").length!==5&&(n=null),n||(n=function(r){try{return JSON.parse(window.localStorage.getItem(r))}catch(o){return[]}}(t)),n?((n=n.split("."))[3]=new Date().getTime(),e&&(n[4]=(parseInt(n[4])||1)+1),n=n.join(".")):n=this.trackId?[this.trackId,1,1,new Date().getTime(),1].join("."):[this.hash(this.isLocal()?"":document.domain),Math.floor(1e9*Math.random()),new Date().getTime(),new Date().getTime(),1].join("."),function(r,o){try{window.localStorage.setItem(r,JSON.stringify(o))}catch(a){}}(t,n),z0(t,n,{expires:63072e6,path:"/"}),n}getMid(){try{this.mid=external.GetMID(external.GetSID(window))}catch(e){}try{this.mid.length!==32&&(this.mid=window.wdextcmd.GetMid())}catch(e){}return this.mid}getM2(){return Te(this,null,function*(){return new Promise((e,t)=>{try{this.m2.length===0&&external.AppCmd(external.GetSID(window),"","GetMID2","","",function(n,r){this.m2=r,e(this.m2)})}catch(n){}setTimeout(function(){try{this.m2===void 0&&(this.m2="",this.m2=window.wdextcmd.GetMidV2())}catch(n){}e(this.m2)},500)})})}getASC(){try{this.asc=external.GetASC(external.GetSID(window))}catch(e){}try{this.asc.length===0&&(this.asc=window.wdextcmd.GetASC())}catch(e){}return this.asc.length===0&&(this.asc=yi("__asc")),this.asc}getASC2(){return Te(this,null,function*(){return new Promise((e,t)=>{try{this.asc2.length===0&&external.AppCmd(external.GetSID(window),"","GetASC2","","",function(n,r){this.asc2=r,e(this.asc2)})}catch(n){}setTimeout(function(){try{this.asc2===void 0&&(this.asc2="",this.asc2=window.wdextcmd.GetASC2())}catch(n){}this.asc2.length===0&&(this.asc2=yi("__asc2")),e(this.asc2)},500)})})}getCount(){var e="__DC_monitor_count",t=yi(e);return t||(t=yi("monitor_count")),z0(e,t=(parseInt(t)||0)+1,{expires:864e5,path:"/"}),t}getFlashVer(){var e=-1;if(navigator.plugins&&navigator.mimeTypes.length){var t=navigator.plugins["Shockwave Flash"];t&&t.description&&(e=t.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s)+r/,".")+".0")}else if(window.ActiveXObject&&!window.opera)try{var n=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");n&&(e=n.GetVariable("$version").replace(/WIN/g,"").replace(/,/g,"."))}catch(r){}return e=parseInt(e,10)}getContainerId(e){var t,n;for(this.getUtilConf().areaIds&&(t=new RegExp("^("+this.getUtilConf().areaIds.join("|")+")$","ig"));e;){if(e.attributes&&("bk"in e.attributes||"data-bk"in e.attributes)){if(n=e.getAttribute("bk")||e.getAttribute("data-bk"))return(n="bk:"+n).substr(0,100);if(e.id)return(n=e.getAttribute("data-desc")||e.id).substr(0,100)}else if(t&&e.id&&t.test(e.id))return(n=e.getAttribute("data-desc")||e.id).substr(0,100);e=e.parentNode}return""}trim(e){return e.replace(/^[\s\xa0\u3000]+|[\u3000\xa0\s]+$/g,"")}getText(e){var t="";return t=e.tagName.toLowerCase()=="input"?e.getAttribute("text")||e.getAttribute("data-text")||e.value||e.title||"":e.getAttribute("text")||e.getAttribute("data-text")||e.innerText||e.textContent||e.title||"",this.trim(t).substr(0,100)}getHref(e){try{return e.getAttribute("data-href")||e.href||""}catch(t){return""}}};function sf(e,t,n){e.addEventListener?e&&e.addEventListener(t,n,!1):e&&e.attachEvent("on"+t,n)}function U0(e,t,n){for(n=n||5,t=t.toUpperCase();e&&n-- >0;){if(e.tagName===t)return e;e=e.parentNode}return null}var Ic=[];function b5(e){Oc(e)&&Ic.push(e)}function qQ(e){var t,n;if(y5(e))for(n=e.length,t=0;t<n;t++)b5(e[t]);else b5(e);(function(r){Ic.splice(Ic.indexOf(r),1)})(e),e=null}function w5(e){if(!("target"in e)){var t=e.srcElement||e.target;t&&t.nodeType==3&&(t=t.parentNode),e.target=t}return e}let HQ=class{constructor(){this.cache={},this.baseExtend={},this.title="",this.placeholder=[]}getBase(t=!1){var n={p:Me.getProject(),u:Me.getLocation(),gid:Me.getGid(t),sid:Me.getSid(),title:this.getTitle()},r=Me.getReferrerKeyWord();return r&&(n.q=r.q,n.eqid=r.eqid),n}getBaseTrack(t){var n=Me.getSid()==Me.getSid()?1:0,r={b:Me.getBrowser(),c:Me.getCount(),r:Me.getReferrer(),fl:Me.getFlashVer(),sd:Me.getColorDepth(),sr:Me.getScreenSize(),ul:Me.getLanguage(),ua:Me.getUserAgent(),ce:n};if(t){for(var o=[],a=0,c=(t=t.split(",")).length;a<c;a++){var l=yi(t[a]);o.push(t[a]+"="+encodeURIComponent(l))}r.uc=encodeURIComponent(o.join("&"))}return r}getClick(t){var n,r,o=(t=w5(t||event)).target,a=o.tagName,c=Me.getContainerId(o);if(c=="bk:noupload")return!1;if(!o.type||o.type!="submit"&&o.type!="button")return a=="AREA"?{f:Me.getHref(o),c:"area:"+o.parentNode.name,cId:c}:(a=="IMG"&&(n=o),!!(o=U0(o,"A"))&&(r=Me.getText(o),{f:Me.getHref(o),c:r||(n?n.src.match(/[^\/]+$/):""),cId:c}));var l=U0(o,"FORM"),d={};if(l){var u=l.id||"",f=o.id;if(d={f:l.action,c:"form:"+(l.name||u),cId:c},!(u!="search-form"&&u!="searchForm"||f!="searchBtn"&&f!="search-btn")){var p=$("kw")||$("search-kw")||$("kw1");d.w=p?p.value:""}}else d={f:Me.getHref(o),c:Me.getText(o),cId:c};return d}getKeydown(t){if((t=w5(t||event)).keyCode!=13)return!1;var n=t.target,r=n.tagName,o=Me.getContainerId(n);if(r=="INPUT"){var a=U0(n,"FORM");if(a){var c=a.id||"",l=n.id,d={f:a.action,c:"form:"+(a.name||c),cId:o};return l!="kw"&&l!="search-kw"&&l!="kw1"||(d.w=n.value),d}}return!1}getBaseExtend(t){return t&&(this.baseExtend=t),this.baseExtend}getCacheLog(){if(!this.cache)return null;var t=[];for(var n in this.cache)t.push(this.cache[n]);return t}getTitle(){return this.title||(this.title=document.title),this.title}setBaseTitle(t){this.title=t}},GQ=class{constructor(t){this.master=t,this.lastLocation=Me.getLocation(),this.isStarted=!1}start(){if(!this.isStarted){this.isStarted=!0,this.master.util.log("autoTrackPageChange");var t="pushState"in window.history?"popstate":"hashchange";this.master.util.log("hashEvent:",t);var n=this;sf(window,t,a=>{this.master.util.log(t+": "+document.location+", state: "+JSON.stringify(a.state)),n.lastLocation!==window.location.href&&(n.lastLocation=window.location.href,n.master.autoTrackEvent())});var r=window.history.pushState;Oc(history.pushState)&&r&&(history.pushState=function(a){r.apply(window.history,arguments),n.master.util.log("history.pushState",a),n.lastLocation=window.location.href,n.master.autoTrackEvent()});var o=window.history.replaceState;Oc(history.replaceState)&&o&&(history.replaceState=function(a){o.apply(window.history,arguments),n.master.util.log("history.replaceState",a),n.lastLocation=window.location.href,n.master.autoTrackEvent()})}}};var WQ="2.2.6";const wi=new class{constructor(){this.heatmapTimer=!1,this.version=WQ,this.data=new HQ,this.util=Me,this.disable_autoPV=!1,this.manualPV_enable=!1,this.autopv=new GQ(this)}setAscAndAsc2(e,t){if(!(this.data.placeholder.length>0)){var n={asc:""},r={asc2:""};e&&(n.asc=e),t&&(r.asc2=t),this.data.placeholder.push(n,r)}}setThirdProps(e,t){if(e&&t){var n={};n[e]=t,this.data.placeholder.length==2||this.setAscAndAsc2(),this.data.placeholder.push(n)}}setFourthProps(e,t){if(e&&t){var n={};n[e]=t,this.data.placeholder.length==3?this.data.placeholder.push(n):console.warn("确认必须先调用setAscAndAsc2和setThirdProps接口")}}getLibVersion(){return this.version}setTitle(e){return this.data.setBaseTitle(e),this}setTrackId(e){return Me.setUtilTrackId(e.replace(/\./g,"")),this}getBrowserID(e){return Te(this,null,function*(){return new Promise((t,n)=>Te(this,null,function*(){e===this.getConf().trackUrl?(this.data.placeholder.length===0&&(this.data.placeholder.push({mid:this.util.getMid()}),this.data.placeholder.push({m2:yield this.util.getM2()}),this.data.placeholder.push({asc:this.util.getASC()}),this.data.placeholder.push({asc2:yield this.util.getASC2()})),t(this.data.placeholder.length>0?function(r){for(var o=[],a=0;a<r.length;a++)o.push(encodeURIComponent(Object.keys(r[a]))+"="+encodeURIComponent(Object.values(r[a])));return o.join("&")}(this.data.placeholder)+"&":"")):t("")}))})}buildLog(e,t){return Te(this,null,function*(){var n="";if(e===!1)return;const r=t===this.getConf().trackUrl;e=e||{};var o=ho(this.data.getBase(r),this.data.getBaseExtend(),!0);e=ho(o,e,!0);var a=yield this.getBrowserID(t);a+=function(c){var l=[];for(var d in c)c[d]!=null&&l.push(encodeURIComponent(d)+"="+encodeURIComponent(c[d]));return l.join("&")}(e),a+="&t="+ +new Date,(t=t.indexOf("?")>-1?t+"&"+a:t+"?"+a)!=n&&(n=t,setTimeout(()=>{n=""},100),this.sendLog(t))})}sendLog(e){window.__radar_monitor_imgs={};var t="log_"+ +new Date,n=window.__radar_monitor_imgs[t]=new Image;n.onload=n.onerror=()=>{window.__radar_monitor_imgs&&window.__radar_monitor_imgs[t]&&(window.__radar_monitor_imgs[t]=null,delete window.__radar_monitor_imgs[t])},n.src=e}log(e,t){t=t||"click";var n=this.getConf()[t+"Url"];n||Me.log("Analytic Error : the "+t+"url does not exist!"),Me.userAgentIsExitsSpiders()||this.buildLog(function(r,o){var a,c=Ic.length,l=o;for(a=0;a<c;a++)try{l=ho(l,Ic[a].beforeLog(r,o))}catch(d){}return l}(t,e),n)}setConf(e,t){Me.setUtilConf(e,t)}getConf(){return Me.getUtilConf()}setUrl(e){if(e)return Me.getLocation(e)}extendBase(e){if(e&&bi(e)){var t=ho(this.data.getBaseExtend(),e,!0);this.data.getBaseExtend(t)}}setProject(e,t,n){return e&&Me.getProject(e),this.extendBase(t),this.init(n),this}setDebug(e=!0,t,n,r){return Me.debug=e,e&&(Me.log("当前已开启debug模式,可能会输出log。发布前请关闭!!!"),t&&(Me.log("当前配置测试appkey:",t),Me.getProject(t)),this.extendBase(n),this.init(r)),this}setTrackId(e){return Me.setUtilTrackId(e.replace(/\./g,"")),this}setId(e){for(var t=[];e=arguments[i++];)y5(e)?t=t.concat(e):t.push(e);return this.setConf("areaIds",t),this}init(e){var{trackForInit:t=!0}=e||{},n=location.protocol.toLowerCase()==="https:"?"https:":"http:";this.setConf({trackUrl:n+"//s.360.cn/qdas/s.htm",clickUrl:n+"//s.360.cn/qdas/c.htm",clickHeatMapUrl:n+"//s.360.cn/qdas/t.htm",wpoUrl:n+"//s.360.cn/qdas/p.htm",heartbeatUrl:n+"//s.360.cn/qdas/h.htm"}),t&&this.autoTrackEvent()}setDisableAutoPV(e=!0){return this.disable_autoPV=e,this}setManualPVEnable(e=!0){return this.manualPV_enable=e,this}autoTrackEvent(){var e=this.data.getBaseTrack();this.log(e,"track")}getAutoTrack(){return this.disable_autoPV||this.autopv.start(),this}getTrack(e,t,n){var{enableMenualOnce:r=!1}=e||{};if(!r&&!this.manualPV_enable)return this;var o=this.data.getBaseTrack(n);return bi(t)&&(o=ho(o,t,!0)),this.log(o,"track"),this}getClickHeatmap(e,t){if(!this.heatmapTimer){this.heatmapTimer=!0;var n=this,r=[];e=e||10,t=t||5;var o=0,a=c=>{if(clearTimeout(o),c||r.length>e)return r.length?(n.log({pos:r.join(","),sr:Me.getScreenSize()},"clickHeatMap"),void(r=[])):void 0;o=setTimeout(()=>{a(!0)},60*t*1e3)};return sf(document,"mousedown",c=>{var l=c.pageX+"."+c.pageY;r.push(l),a()}),this}}getClickAndKeydown(){return sf(document,"mousedown",e=>{var t=this.data.getClick(e);this.log(t,"click")}),sf(document,"keydown",e=>{var t=this.data.getKeydown(e);this.log(t,"click")}),this}beginHeartBeat(e,t,n){var r={};r.id=e,bi(t)&&(r=ho(r,t,!1)),(n=isNaN(n)?10:n)>60?n=60:n<5&&(n=5);var o=this;this.setConf("hbStarttime",Date.parse(new Date));var a=c=>{r.steptime=c,o.steptime=c,o.log(r,"heartbeat"),clearTimeout(o.getConf().hbLogTimer),o.getConf().hbLogTimer=setTimeout(()=>{var l=(Date.parse(new Date)-o.getConf().hbStarttime)/1e3;a(l)},1e3*n)};a(0)}endHeartBeat(e,t){if(this.getConf().hbStarttime!==void 0&&this.getConf().hbStarttime!==null){var n={};n.id=e,bi(t)&&(n=ho(n,t,!1)),clearTimeout(this.getConf().hbLogTimer);var r=(Date.parse(new Date)-this.getConf().hbStarttime)/1e3;n.steptime=r,this.log(n,"heartbeat"),this.setConf("hbStarttime",null)}}setActiveTime(e){return Me.setUtilActiveTime(e),this}addPlugin(e){return qQ(e)}use(e,t){return typeof(n=e)=="string"||n instanceof String?bi(window.RADAR_MONITOR_WEBJSSDKPLUGIN)&&bi(window.RADAR_MONITOR_WEBJSSDKPLUGIN[e])&&Oc(window.RADAR_MONITOR_WEBJSSDKPLUGIN[e].init)?(window.RADAR_MONITOR_WEBJSSDKPLUGIN[e].init(wi,t),window.RADAR_MONITOR_WEBJSSDKPLUGIN[e]):bi(wi.modules)&&bi(wi.modules[e])&&Oc(wi.modules[e].init)?(wi.modules[e].init(wi,t),wi.modules[e]):void Me.log(e+"没有获取到,请查阅文档,调整"+e+"的引入顺序!"):(Me.log("use插件名称必须是字符串!"),!1);var n}};function KQ(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.text()}function _5(e,t){return fetch(e,t).then(KQ)}const YQ=(e,t)=>{const n=document.createElement("a");n.download=t,n.style.display="none";const r=new window.Blob([e]);n.href=window.URL.createObjectURL(r),document.body.appendChild(n),n.click(),document.body.removeChild(n)},af=(e,t)=>Te(this,null,function*(){let n;return yield ga(e).then(r=>{const o=document.createElement("canvas");o.width=r.width,o.height=r.height,o.getContext("2d").drawImage(r,0,0,r.width,r.height),n=o.toDataURL("image/png")}),n});function ga(e){return Te(this,null,function*(){return new Promise((t,n)=>{const r=new Image;r.onload=()=>{t(r)},r.onerror=o=>{n(o)},r.src=e})})}function j0(e){if(typeof e=="number"||e===!0)return!0;var t=e===!1||e===null||e===void 0||Object.keys(e).length===0||/^\s*$/gim.test(e.toString());return!t}function ma(){var e=/macintosh|mac os x/i.test(navigator.userAgent);return e}function _i(e,t){var a;["label","textProp","detail","collect","fx","fy"].map(c=>{e[c]=e[c]?e[c]:null}),e.show=e.show?e.show:!0,e.type&&e.type!=="nodeType"&&(e.type=e.type.toLowerCase()),(["org","vul","email","family"].indexOf(e.type)>=0||e.startNode===!0)&&(e.textProp="name");const o={};if(e.type!=="nodeType"&&e.type!=="aggregation"&&((a=t[e.type])!=null&&a.length)){for(let c=0;c<t[e.type].length;c++){const l=t[e.type][c];o[l.name]=!1}e.getData=o}return e}function JQ(e){return e&&e.replace(/[^\x09\x0A\x0D\x20-\xFF\x85\xA0-\uD7FF\uE000-\uFDCF\uFDE0-\uFFFD]/gm,"")}function Gn(...e){localStorage.getItem("showSafeForceGraphLog")&&console.log(...e)}function en(e){wi.log(e,"click")}function q0(e,t,n,r,o){const a=n-e,c=r-t,l=Math.sqrt(a*a+c*c),d=e+a/l*(l-o),u=t+c/l*(l-o);return{x:d||0,y:u||0}}function C5(e,t="#666",n="#fff"){if(!e)return e;const o=new DOMParser().parseFromString(e,"image/svg+xml"),a=o.querySelector("g");return a?(a.setAttribute("color",n),o.querySelectorAll("[stroke]").forEach(f=>{f.getAttribute("stroke")!=="none"&&f.setAttribute("stroke",t)}),o.querySelectorAll("[class]").forEach(f=>{f.getAttribute("class").split(" ").includes("no-stroke")&&f.setAttribute("stroke","none")}),o.querySelectorAll(".text-bg").forEach(f=>{f.getAttribute("fill")!=="none"&&f.setAttribute("fill",t)}),new XMLSerializer().serializeToString(o)):void 0}function XQ(e){if(!e)return e;const r=new DOMParser().parseFromString(e,"image/svg+xml").querySelector("svg"),o=r.getAttribute("width"),a=r.getAttribute("height");return{width:parseInt(o),height:parseInt(a)}}function S5(e){return new Promise((t,n)=>{try{const r="data:image/svg+xml;base64,";e=e.replace(r,"");const o=atob(e);t(o)}catch(r){n(r)}})}function E5(e){const t="0123456789abcdefghijklmnopqrstuvwxyz",n=t.length;let r="";for(let o=0;o<e;o++)r+=t.charAt(Math.ceil(Math.random()*(n-1)));return r}function QQ(e){return{}.VITE_SVG_TYPE==="base64"?S5(e):_5(e)}function H0(e){let t={};return t=m5,t[e]}function va(e){return H0(`./public/d3svg1/${e}.svg`)}const G0={};function ZQ(r){return Te(this,arguments,function*({node:e,levelList:t,darkMode:n}){var l,d,u,f,p,h,m,b,w,_;let o=null;const a=(u=(d=(l=e.detail)==null?void 0:l.info)==null?void 0:d.basic)==null?void 0:u.flag,c=((h=(p=(f=e==null?void 0:e.detail)==null?void 0:f.info)==null?void 0:p.basic)==null?void 0:h.level)||"";if(e.detail&&((b=(m=e.detail)==null?void 0:m.info)!=null&&b.inner_img))try{o=e.detail.info.inner_img}catch(C){console.log("loadCompleted error",C)}else if(e.type==="nodeType"||e.type==="aggregation"){const C=e.icon||"node_type";o=va(C)?va(C):va("node_type")}else if(a&&(e.type==="ip"||e.type==="internet"))o=H0(`./public/d3svg1/flags/${a}.png`);else if((_=(w=e.detail)==null?void 0:w.info)!=null&&_.inner_country&&(e.type==="country"||e.type==="target_country")){const C=e.detail.info.inner_country;o=H0(`./public/d3svg1/flags/${C}.png`)}else{const C=`${e.type||"node"}${c}${n}`;if(G0[C])return o=G0[C],o;const k=va(e.type)?va(e.type):va("node"),S=yield QQ(k),E=as(c,t,n);o=C5(S,E,n?"#182628":"#fff"),o="data:image/svg+xml,"+encodeURIComponent(o),G0[C]=o}return o})}const W7e="",W0={inject:["levelList","getDarkMode"],props:{nodeInfo:{type:Object,default:()=>{}}},data(){return{imgUrl:"",strokeColor:""}},computed:{darkMode(){return this.getDarkMode()},isCountryFlag(){var r,o,a,c,l,d,u,f;const e=(a=(o=(r=this.nodeInfo)==null?void 0:r.detail)==null?void 0:o.info)==null?void 0:a.inner_country,t=(u=(d=(l=(c=this.nodeInfo)==null?void 0:c.detail)==null?void 0:l.info)==null?void 0:d.basic)==null?void 0:u.flag,n=(f=this.nodeInfo)==null?void 0:f.type;return t&&(n==="ip"||n==="internet")||e&&(n==="country"||n==="target_country")}},watch:{darkMode:{handler(){this.handleImgUrl()}},nodeInfo:{handler(){this.handleImgUrl()},deep:!0}},created(){this.handleImgUrl()},methods:{handleImgUrl(){var t,n,r,o;ZQ({node:this.nodeInfo,levelList:this.levelList,darkMode:this.darkMode}).then(a=>{this.imgUrl=a});const e=(o=(r=(n=(t=this.nodeInfo)==null?void 0:t.detail)==null?void 0:n.info)==null?void 0:r.basic)==null?void 0:o.level;this.strokeColor=as(e,this.levelList,this.darkMode)}}},x5=()=>{s.useCssVars(e=>({"20587f86":e.strokeColor}))},k5=W0.setup;W0.setup=k5?(e,t)=>(x5(),k5(e,t)):x5;const VQ=W0,eZ={key:0,class:"flag-border"},tZ=["src"],nZ=["src"];function rZ(e,t,n,r,o,a){return a.isCountryFlag?(s.openBlock(),s.createElementBlock("div",eZ,[s.createElementVNode("img",{class:"node-img",src:o.imgUrl},null,8,tZ)])):(s.openBlock(),s.createElementBlock("img",{key:1,class:"node-img",src:o.imgUrl},null,8,nZ))}const lf=Bt(VQ,[["render",rZ],["__scopeId","data-v-5fdfe48e"]]),jr={computed:{imgPath(){let e={};return e=m5,e}}},qe={},K0=xn.reactive({filterValues:""}),Y0={name:"fix_nodes",namec:"固定节点"},J0={name:"un_fix_nodes",namec:"解除固定"},iZ={name:"show_names",namec:"显示名称"},oZ={name:"un_show_names",namec:"隐藏名称"},sZ={name:"un_show_label",namec:"隐藏备注"},aZ={name:"show_label",namec:"显示备注"},N5={name:"hold_aggregation",namec:"单边子顶点聚合"},T5={name:"release_aggregation",namec:"聚合顶点释放"},lZ={name:"copy",namec:"复制"},A5={name:"node_star",namec:"收藏"},O5={name:"un_node_star",namec:"取消收藏"},I5={name:"edit_label",namec:"修改备注"},X0={name:"delete_node",namec:"删除"},R5={name:"select_children",namec:"子顶点选择"},P5={name:"select_parents",namec:"父顶点选择"},cZ={name:"add_con_node",namec:"添加关联节点"},dZ={name:"expand_node",namec:"展开全部关系"};function cf(e){var l;const t=[],n=[],r=[],o=["APT攻击","海莲花","Generic","Cometer","勒索软件","恶意下载链接","僵尸网络","后门软件","流氓推广","Ewind","alexa_top10k","Panda","Operation_2020_Model","Zenpak","Ewind","Boogr"],a=["APT-C-00","Trojan","木马"],c=e.length;for(let d=0;d<c;d++)o.includes((l=e[d])==null?void 0:l.name)?(e[d].typeLevel="danger",t.push(e[d])):e[d].name.toLowerCase().indexOf("cve")===0?(e[d].typeLevel="cve",n.push(e[d])):a.some(u=>e[d].name.indexOf(u)>=0)?(e[d].typeLevel="danger",t.push(e[d])):(e[d].typeLevel="other",r.push(e[d]));return[...t,...n,...r]}function df(e){if(!e)return[];const t=[void 0,"danger","warning","info","success",void 0],n=[],r=[];return e.forEach(o=>{let a,c,l,d,u,f;typeof o=="object"?(a=o.name||o.tag,c=o.desc,l=o.user||void 0,d=o.type>0?t[o.type]||t[o.type-10]:void 0,f=o.type>=10,u=o.source_name?o.source_name:""):(a=o,c=""),r.indexOf(a)<0&&(r.push(a),n.push({name:a,desc:c,user:l,type:d,disabled:f,source_name:u}))}),n}var Q0={},uZ={get exports(){return Q0},set exports(e){Q0=e}};/*!
101
+ `}),n=`:root {${n}}`,r=`[data-theme="dark"] { ${r}}`,n+r+t}function $Q(e){const t=document.createElement("style");t.innerHTML=e,document.head.appendChild(t),window.insertSafeForceGraphStyle=!0}function zQ(e){if(window.insertSafeForceGraphStyle){Gn("已存在样式");return}const t=FQ(e);$Q(t)}function of(e,t){var r;if(e==null||e==="")return rf+"unknown";const n=(r=t[e])==null?void 0:r.className;return n?rf+n:""}function as(e,t,n){if(e==null||e==="")return n?"#c6cdd5":"#666";const r=t==null?void 0:t.find(o=>o.level===e);return n?r==null?void 0:r.darkColor:r==null?void 0:r.normalColor}function UQ(e,t){var r;return((r=t.find(o=>o.level===e))==null?void 0:r.dangerNumber)>0}const m5={"./public/d3svg1/85.svg":"https://s6.qhres2.com/static/7ff9eb6a2d513c6b.svg","./public/d3svg1/address.svg":"https://s8.qhres2.com/static/ea7c70859496830d.svg","./public/d3svg1/aggregation.svg":"https://s8.qhres2.com/static/b543a400a1b63c2e.svg","./public/d3svg1/button/hm_icon_add.svg":"https://s8.qhres2.com/static/a9f47ab25e1ee91c.svg","./public/d3svg1/button/hm_icon_add_more.svg":"https://s8.qhres2.com/static/e8834bbcd939d3c9.svg","./public/d3svg1/button/hm_icon_intro.svg":"https://s6.qhres2.com/static/e3a9174af2a35626.svg","./public/d3svg1/button/hm_icon_search.svg":"https://s8.qhres2.com/static/fcb0142edf5b3800.svg","./public/d3svg1/button/hm_icon_snapshot.svg":"https://s8.qhres2.com/static/9b120f6abb5f9059.svg","./public/d3svg1/button18/button_all_fix_nodes.svg":"https://s6.qhres2.com/static/ce733e9adf80c365.svg","./public/d3svg1/button18/button_all_show_label.svg":"https://s8.qhres2.com/static/acf6443efcaeff69.svg","./public/d3svg1/button18/button_all_show_names.svg":"https://s9.qhres2.com/static/4640ec9275f0766b.svg","./public/d3svg1/button18/button_all_un_fix_nodes.svg":"https://s9.qhres2.com/static/8b912474be58398f.svg","./public/d3svg1/button18/button_all_un_show_label.svg":"https://s5.qhres2.com/static/554be4958236d4a9.svg","./public/d3svg1/button18/button_all_un_show_names.svg":"https://s9.qhres2.com/static/1ecc98860970db2e.svg","./public/d3svg1/button18/button_copy.svg":"https://s6.qhres2.com/static/d23330eea0fb51b0.svg","./public/d3svg1/button18/button_delete_node.svg":"https://s6.qhres2.com/static/6528369fc53e385d.svg","./public/d3svg1/button18/button_edit_label.svg":"https://s5.qhres2.com/static/f5237a8fd30e71b7.svg","./public/d3svg1/button18/button_fix_nodes.svg":"https://s8.qhres2.com/static/7e6659fbc9d1d35f.svg","./public/d3svg1/button18/button_go_result.svg":"https://s5.qhres2.com/static/81f6dc17130d1628.svg","./public/d3svg1/button18/button_hold_aggregation.svg":"https://s8.qhres2.com/static/a43155bd7c0bf00f.svg","./public/d3svg1/button18/button_node_star.svg":"https://s5.qhres2.com/static/7152908656a95dda.svg","./public/d3svg1/button18/button_redo.svg":"https://s7.qhres2.com/static/b853e4965232dcbf.svg","./public/d3svg1/button18/button_relation.svg":"https://s5.qhres2.com/static/3ed0bdb6624df19d.svg","./public/d3svg1/button18/button_release_aggregation.svg":"https://s6.qhres2.com/static/04f7943f4012cf95.svg","./public/d3svg1/button18/button_show_label.svg":"https://s9.qhres2.com/static/87b3bb1a3c13d87d.svg","./public/d3svg1/button18/button_show_names.svg":"https://s5.qhres2.com/static/d5ac061f5815637a.svg","./public/d3svg1/button18/button_single_edge_select.svg":"https://s9.qhres2.com/static/c6d8ee426c9cd094.svg","./public/d3svg1/button18/button_un_fix_nodes.svg":"https://s9.qhres2.com/static/7e5d2cca09402894.svg","./public/d3svg1/button18/button_un_node_star.svg":"https://s8.qhres2.com/static/fcddfcedc2de3d27.svg","./public/d3svg1/button18/button_un_show_label.svg":"https://s8.qhres2.com/static/56e39d8a06d80614.svg","./public/d3svg1/button18/button_un_show_names.svg":"https://s7.qhres2.com/static/4265fd47c0cf10f9.svg","./public/d3svg1/button18/button_undo.svg":"https://s6.qhres2.com/static/452f4ab949f5f717.svg","./public/d3svg1/button18/fit_button.svg":"https://s9.qhres2.com/static/a15306ba67fea8fb.svg","./public/d3svg1/button18/full_button.svg":"https://s5.qhres2.com/static/eb91a1d179f54955.svg","./public/d3svg1/button18/un_full_button.svg":"https://s9.qhres2.com/static/503bd1e414d48b2d.svg","./public/d3svg1/button18/zoom_in_button.svg":"https://s8.qhres2.com/static/dbae6920a1320a8b.svg","./public/d3svg1/button18/zoom_out_button.svg":"https://s6.qhres2.com/static/29d7c11733747121.svg","./public/d3svg1/button22/button_add_con_node.svg":"https://s9.qhres2.com/static/785e607c9ee23627.svg","./public/d3svg1/button22/button_center_view.svg":"https://s7.qhres2.com/static/3397bc7254b51beb.svg","./public/d3svg1/button22/button_copy.svg":"https://s9.qhres2.com/static/30069da7051b18b2.svg","./public/d3svg1/button22/button_delete_node.svg":"https://s5.qhres2.com/static/41b42c1b9338bf61.svg","./public/d3svg1/button22/button_edit_label.svg":"https://s7.qhres2.com/static/8bb743361fc4518f.svg","./public/d3svg1/button22/button_expand_node.svg":"https://s9.qhres2.com/static/dcf9d0dcaac367d6.svg","./public/d3svg1/button22/button_eye_close.svg":"https://s8.qhres2.com/static/7731d44fbbfff78e.svg","./public/d3svg1/button22/button_eye_open.svg":"https://s8.qhres2.com/static/162e23b0b3117ac4.svg","./public/d3svg1/button22/button_fix_nodes.svg":"https://s9.qhres2.com/static/5b0347e9e7a1aa2f.svg","./public/d3svg1/button22/button_highlight.svg":"https://s5.qhres2.com/static/db1ff7e5d0a0cd0b.svg","./public/d3svg1/button22/button_hold_aggregation.svg":"https://s7.qhres2.com/static/1817bc802f324600.svg","./public/d3svg1/button22/button_node_star.svg":"https://s6.qhres2.com/static/264ed2b7346ff068.svg","./public/d3svg1/button22/button_release_aggregation.svg":"https://s8.qhres2.com/static/de10800a291a15b6.svg","./public/d3svg1/button22/button_select_all.svg":"https://s8.qhres2.com/static/5ca6e0b182ec41a3.svg","./public/d3svg1/button22/button_select_children.svg":"https://s7.qhres2.com/static/170e510f30ae5d18.svg","./public/d3svg1/button22/button_select_parents.svg":"https://s7.qhres2.com/static/b9483ede8dbc0661.svg","./public/d3svg1/button22/button_show_label.svg":"https://s9.qhres2.com/static/fb21737c72ba913c.svg","./public/d3svg1/button22/button_show_names.svg":"https://s5.qhres2.com/static/3ed0aa41d0e30447.svg","./public/d3svg1/button22/button_un_fix_nodes.svg":"https://s9.qhres2.com/static/51f3358f9b3cd8bc.svg","./public/d3svg1/button22/button_un_node_star.svg":"https://s5.qhres2.com/static/30e825df892fe581.svg","./public/d3svg1/button22/button_un_show_label.svg":"https://s9.qhres2.com/static/51df11a35c1a4a26.svg","./public/d3svg1/button22/button_un_show_names.svg":"https://s9.qhres2.com/static/0a4f7cf839cf6b54.svg","./public/d3svg1/button22/hm_icon_add.svg":"https://s8.qhres2.com/static/071a505a3047a584.svg","./public/d3svg1/button22/hm_icon_alias.svg":"https://s9.qhres2.com/static/fa4fd9d6ed685dc5.svg","./public/d3svg1/button22/hm_icon_alias_colse.svg":"https://s9.qhres2.com/static/ed7024cacc25f774.svg","./public/d3svg1/button22/hm_icon_auto.svg":"https://s7.qhres2.com/static/f2734fb0ab8dddbd.svg","./public/d3svg1/button22/hm_icon_del.svg":"https://s5.qhres2.com/static/41b42c1b9338bf61.svg","./public/d3svg1/button22/hm_icon_export.svg":"https://s6.qhres2.com/static/2ab82f6fb7e8f268.svg","./public/d3svg1/button22/hm_icon_fix.svg":"https://s9.qhres2.com/static/5b0347e9e7a1aa2f.svg","./public/d3svg1/button22/hm_icon_force.svg":"https://s9.qhres2.com/static/1d3c0cf03175c58f.svg","./public/d3svg1/button22/hm_icon_help.svg":"https://s8.qhres2.com/static/7d85e897f48b0550.svg","./public/d3svg1/button22/hm_icon_hightLight.svg":"https://s7.qhres2.com/static/34a53459a3b42c2b.svg","./public/d3svg1/button22/hm_icon_img.svg":"https://s9.qhres2.com/static/ada6385603ef7a1c.svg","./public/d3svg1/button22/hm_icon_import.svg":"https://s7.qhres2.com/static/3d56c16bbe148dc8.svg","./public/d3svg1/button22/hm_icon_redo.svg":"https://s8.qhres2.com/static/22958d70b83edca4.svg","./public/d3svg1/button22/hm_icon_save.svg":"https://s7.qhres2.com/static/01420cbedc43540c.svg","./public/d3svg1/button22/hm_icon_snapshot.svg":"https://s9.qhres2.com/static/381cd1af3ceb899b.svg","./public/d3svg1/button22/hm_icon_tree.svg":"https://s9.qhres2.com/static/3079d9e443c777e9.svg","./public/d3svg1/button22/hm_icon_undo.svg":"https://s7.qhres2.com/static/41168fc9ee1d9424.svg","./public/d3svg1/button22/hm_icon_unfix.svg":"https://s9.qhres2.com/static/51f3358f9b3cd8bc.svg","./public/d3svg1/button_un_show_label.svg":"https://s9.qhres2.com/static/c999cf6b0e881956.svg","./public/d3svg1/cert.svg":"https://s8.qhres2.com/static/4e37fb7b84ba3a0c.svg","./public/d3svg1/cert_code.svg":"https://s8.qhres2.com/static/b034794ce279efc0.svg","./public/d3svg1/cert_https.svg":"https://s6.qhres2.com/static/824ca1af9e390888.svg","./public/d3svg1/cert_md5.svg":"https://s8.qhres2.com/static/9d1ad5b5d6331b09.svg","./public/d3svg1/cloud.svg":"https://s6.qhres2.com/static/eec147fd2767f2d8.svg","./public/d3svg1/company.svg":"https://s5.qhres2.com/static/537fd3851d386c9f.svg","./public/d3svg1/country.svg":"https://s5.qhres2.com/static/70d0bd85eae8e814.svg","./public/d3svg1/dns.svg":"https://s5.qhres2.com/static/246dd6938e162f9d.svg","./public/d3svg1/dns_domain.svg":"https://s6.qhres2.com/static/60fa3aa7f64ff352.svg","./public/d3svg1/dns_ip.svg":"https://s6.qhres2.com/static/9d7c9a72dc6e961c.svg","./public/d3svg1/domain.svg":"https://s8.qhres2.com/static/d15450a9035991ba.svg","./public/d3svg1/down.svg":"https://s9.qhres2.com/static/411860dd8a269c6d.svg","./public/d3svg1/download.svg":"https://s5.qhres2.com/static/0203e45aba9f3c2d.svg","./public/d3svg1/email.svg":"https://s6.qhres2.com/static/1feb3629d4b23c7d.svg","./public/d3svg1/event.svg":"https://s8.qhres2.com/static/97cf2362000c475c.svg","./public/d3svg1/family.svg":"https://s9.qhres2.com/static/4cd5109f631b74af.svg","./public/d3svg1/file.svg":"https://s5.qhres2.com/static/e0d8abf70103070d.svg","./public/d3svg1/file_md5.svg":"https://s7.qhres2.com/static/77080266b227f724.svg","./public/d3svg1/find_country.svg":"https://s8.qhres2.com/static/dcb27208f20d1cd5.svg","./public/d3svg1/find_group.svg":"https://s8.qhres2.com/static/10e371c9b6f06acb.svg","./public/d3svg1/find_ioc.svg":"https://s5.qhres2.com/static/271a18c9c1b428a8.svg","./public/d3svg1/find_report.svg":"https://s8.qhres2.com/static/3ce41493e00534d3.svg","./public/d3svg1/find_target_country.svg":"https://s9.qhres2.com/static/075c79b523bb39f2.svg","./public/d3svg1/find_target_industry.svg":"https://s6.qhres2.com/static/e52f3939d5ced34b.svg","./public/d3svg1/find_ttp.svg":"https://s5.qhres2.com/static/cd00bc7837834f3e.svg","./public/d3svg1/find_vendor.svg":"https://s8.qhres2.com/static/b3eab987c6fc66d4.svg","./public/d3svg1/flags/abu_dhabi.png":"https://p5.ssl.qhimg.com/t0100b7420ed9d3b0fc.png","./public/d3svg1/flags/afghanistan.png":"https://p3.ssl.qhimg.com/t016b73f84b7152db62.png","./public/d3svg1/flags/albania.png":"https://p0.ssl.qhimg.com/t01554ace32f912d567.png","./public/d3svg1/flags/algeria.png":"https://p5.ssl.qhimg.com/t0122422b6d071ccc22.png","./public/d3svg1/flags/american_samoa.png":"https://p5.ssl.qhimg.com/t01c595535d38c2c488.png","./public/d3svg1/flags/andorra.png":"https://p5.ssl.qhimg.com/t01805f7f0ae834fc32.png","./public/d3svg1/flags/angola.png":"https://p0.ssl.qhimg.com/t014152de70c5b45254.png","./public/d3svg1/flags/anguilla.png":"https://p1.ssl.qhimg.com/t0155dd08b9abd92436.png","./public/d3svg1/flags/antigua_and_barbuda.png":"https://p5.ssl.qhimg.com/t01c42483ae1c05b5ae.png","./public/d3svg1/flags/argentina.png":"https://p0.ssl.qhimg.com/t014d3f8c0d28624343.png","./public/d3svg1/flags/armenia.png":"https://p4.ssl.qhimg.com/t01ffddd18f6213fbe8.png","./public/d3svg1/flags/aruba.png":"https://p5.ssl.qhimg.com/t01a954f4ebda2b2aaf.png","./public/d3svg1/flags/australia.png":"https://p0.ssl.qhimg.com/t01c024c65ff1cc8a8d.png","./public/d3svg1/flags/austria.png":"https://p4.ssl.qhimg.com/t01e6a215b0a4a0077d.png","./public/d3svg1/flags/azerbaijan.png":"https://p3.ssl.qhimg.com/t01b2f598ca0633bab4.png","./public/d3svg1/flags/bahamas.png":"https://p5.ssl.qhimg.com/t014389c5b895aeb8cb.png","./public/d3svg1/flags/bahrain.png":"https://p4.ssl.qhimg.com/t01e9aea3791db558e2.png","./public/d3svg1/flags/bangladesh.png":"https://p1.ssl.qhimg.com/t0156bcda81bdeb333e.png","./public/d3svg1/flags/barbados.png":"https://p1.ssl.qhimg.com/t01e173975ff3435533.png","./public/d3svg1/flags/belarus.png":"https://p3.ssl.qhimg.com/t01c6bd61585df5dc66.png","./public/d3svg1/flags/belgium.png":"https://p0.ssl.qhimg.com/t01bc981724a92fd288.png","./public/d3svg1/flags/belize.png":"https://p2.ssl.qhimg.com/t0157e3a5a5e9e6d0dc.png","./public/d3svg1/flags/benin.png":"https://p0.ssl.qhimg.com/t010fe48ceb0d83f1db.png","./public/d3svg1/flags/bermuda.png":"https://p0.ssl.qhimg.com/t01991a5555e2951383.png","./public/d3svg1/flags/bhutan.png":"https://p5.ssl.qhimg.com/t01c1a09b104cbbf155.png","./public/d3svg1/flags/bolivia.png":"https://p5.ssl.qhimg.com/t01f14d83bf204a3484.png","./public/d3svg1/flags/bosnia_and_herzegovina.png":"https://p4.ssl.qhimg.com/t010c6298b82cba538c.png","./public/d3svg1/flags/botswana.png":"https://p2.ssl.qhimg.com/t01c857af3514756b8f.png","./public/d3svg1/flags/brazil.png":"https://p3.ssl.qhimg.com/t015ca6cd0fb5c7cc59.png","./public/d3svg1/flags/british_virgin_islands.png":"https://p4.ssl.qhimg.com/t0104bceae11fd2f580.png","./public/d3svg1/flags/brunei.png":"https://p3.ssl.qhimg.com/t01f920666ff379bb8a.png","./public/d3svg1/flags/bulgaria.png":"https://p0.ssl.qhimg.com/t01766409ab0d88cc13.png","./public/d3svg1/flags/burkina_faso.png":"https://p2.ssl.qhimg.com/t01366f1d500c9f0c26.png","./public/d3svg1/flags/burundi.png":"https://p0.ssl.qhimg.com/t01ef92224393d4789c.png","./public/d3svg1/flags/cambodia.png":"https://p3.ssl.qhimg.com/t0189fddeb63273c902.png","./public/d3svg1/flags/cameroon.png":"https://p5.ssl.qhimg.com/t011b97aca53d096ec7.png","./public/d3svg1/flags/canada.png":"https://p0.ssl.qhimg.com/t0107f2e3664cc586a9.png","./public/d3svg1/flags/cape_verde.png":"https://p4.ssl.qhimg.com/t01bcd5521b34abe933.png","./public/d3svg1/flags/cayman_islands.png":"https://p3.ssl.qhimg.com/t0159643bbfdae25503.png","./public/d3svg1/flags/central_african_republic.png":"https://p1.ssl.qhimg.com/t01689eb3ad435ebb68.png","./public/d3svg1/flags/chad.png":"https://p5.ssl.qhimg.com/t019e06a9ad5a86a48b.png","./public/d3svg1/flags/chile.png":"https://p3.ssl.qhimg.com/t01da100a223247567f.png","./public/d3svg1/flags/china.png":"https://p5.ssl.qhimg.com/t01304bcd201fd23df6.png","./public/d3svg1/flags/christmas_island.png":"https://p4.ssl.qhimg.com/t01e7874db308ac2252.png","./public/d3svg1/flags/cocos_islands.png":"https://p1.ssl.qhimg.com/t01c0b7f434b6919f3f.png","./public/d3svg1/flags/colombia.png":"https://p5.ssl.qhimg.com/t014067c703a78dce3b.png","./public/d3svg1/flags/comoros.png":"https://p1.ssl.qhimg.com/t0169a07d86c511072b.png","./public/d3svg1/flags/congo_democratic_republic.png":"https://p3.ssl.qhimg.com/t0183ac60001ce46f1f.png","./public/d3svg1/flags/congo_republic.png":"https://p2.ssl.qhimg.com/t013046ae1b2eaa2e03.png","./public/d3svg1/flags/costa_rica.png":"https://p5.ssl.qhimg.com/t0126df8804c76f2fd6.png","./public/d3svg1/flags/cote_d'ivoire.png":"https://p2.ssl.qhimg.com/t01bcd9188af99a7148.png","./public/d3svg1/flags/croatia.png":"https://p5.ssl.qhimg.com/t01d3566b33a31ee615.png","./public/d3svg1/flags/cuba.png":"https://p4.ssl.qhimg.com/t01dc80791b9bc8e11c.png","./public/d3svg1/flags/curacao.png":"https://p5.ssl.qhimg.com/t011f17f8ec93fecd34.png","./public/d3svg1/flags/cyprus.png":"https://p5.ssl.qhimg.com/t019a4c05b99a9c64be.png","./public/d3svg1/flags/czech_republic.png":"https://p5.ssl.qhimg.com/t013224c0c67639351f.png","./public/d3svg1/flags/denmark.png":"https://p1.ssl.qhimg.com/t01b0f04b65a97f8028.png","./public/d3svg1/flags/djibouti.png":"https://p0.ssl.qhimg.com/t01e4796ea6f99dd948.png","./public/d3svg1/flags/dominica.png":"https://p4.ssl.qhimg.com/t01b3867bd167f1d976.png","./public/d3svg1/flags/dominican_republic.png":"https://p5.ssl.qhimg.com/t014378d5ead5b5e6ec.png","./public/d3svg1/flags/east_timor.png":"https://p5.ssl.qhimg.com/t01e8e5fb8405dec7e3.png","./public/d3svg1/flags/ecuador.png":"https://p5.ssl.qhimg.com/t01395fb935fa0f0e3a.png","./public/d3svg1/flags/egypt.png":"https://p3.ssl.qhimg.com/t0101fe13f0f24008e9.png","./public/d3svg1/flags/el_salvador.png":"https://p3.ssl.qhimg.com/t010104541f9c7a0c99.png","./public/d3svg1/flags/england.png":"https://p5.ssl.qhimg.com/t0143b14e971b5b3cb6.png","./public/d3svg1/flags/equatorial_guinea.png":"https://p1.ssl.qhimg.com/t01a74942f5afd0b3a4.png","./public/d3svg1/flags/eritrea.png":"https://p3.ssl.qhimg.com/t01ce53472f50f44f5b.png","./public/d3svg1/flags/estonia.png":"https://p5.ssl.qhimg.com/t016d527c4a923153eb.png","./public/d3svg1/flags/ethiopia.png":"https://p2.ssl.qhimg.com/t0192b527f6a90ddbe0.png","./public/d3svg1/flags/europe.png":"https://p3.ssl.qhimg.com/t015bb42e201aa13efa.png","./public/d3svg1/flags/falkland_islands.png":"https://p0.ssl.qhimg.com/t010ae1bba78b7eb7a6.png","./public/d3svg1/flags/fiji.png":"https://p5.ssl.qhimg.com/t01ffb03de7e05ae7aa.png","./public/d3svg1/flags/finland.png":"https://p4.ssl.qhimg.com/t0195f5d1feacba8397.png","./public/d3svg1/flags/france.png":"https://p2.ssl.qhimg.com/t01f697a973b72a98e7.png","./public/d3svg1/flags/french_guiana.png":"https://p1.ssl.qhimg.com/t016346509b6df42a07.png","./public/d3svg1/flags/french_polynesia.png":"https://p4.ssl.qhimg.com/t01932beb0a7b52f3da.png","./public/d3svg1/flags/gabon.png":"https://p4.ssl.qhimg.com/t0132f298a0f193b661.png","./public/d3svg1/flags/gambia.png":"https://p3.ssl.qhimg.com/t011564ba1c6e0c96ed.png","./public/d3svg1/flags/georgia.png":"https://p1.ssl.qhimg.com/t01eea60bad5abefdba.png","./public/d3svg1/flags/germany.png":"https://p2.ssl.qhimg.com/t0184b3001d906d19c7.png","./public/d3svg1/flags/ghana.png":"https://p2.ssl.qhimg.com/t01f7dcd42afd3fc0ff.png","./public/d3svg1/flags/gibraltar.png":"https://p2.ssl.qhimg.com/t01ed767f13c90a732f.png","./public/d3svg1/flags/greece.png":"https://p5.ssl.qhimg.com/t01da5d5973a17cc048.png","./public/d3svg1/flags/greenland.png":"https://p4.ssl.qhimg.com/t01d3f1604dea436593.png","./public/d3svg1/flags/grenada.png":"https://p4.ssl.qhimg.com/t0170078c4c722961d5.png","./public/d3svg1/flags/guam.png":"https://p2.ssl.qhimg.com/t01fe323aa0e62d3c0c.png","./public/d3svg1/flags/guatemala.png":"https://p1.ssl.qhimg.com/t013743b6c563848d07.png","./public/d3svg1/flags/guernsey.png":"https://p5.ssl.qhimg.com/t01f86e78de635ff50c.png","./public/d3svg1/flags/guinea.png":"https://p3.ssl.qhimg.com/t01d4f635060a97fb49.png","./public/d3svg1/flags/guinea_bissau.png":"https://p4.ssl.qhimg.com/t014ee5f7086bb14c1e.png","./public/d3svg1/flags/guyana.png":"https://p2.ssl.qhimg.com/t01e7d086533c3f87f2.png","./public/d3svg1/flags/haiti.png":"https://p5.ssl.qhimg.com/t01159c94d32253d312.png","./public/d3svg1/flags/honduras.png":"https://p4.ssl.qhimg.com/t01796b21e7e87b5254.png","./public/d3svg1/flags/hongkong.png":"https://p1.ssl.qhimg.com/t0121cfe81da15a2878.png","./public/d3svg1/flags/hungary.png":"https://p4.ssl.qhimg.com/t01b5087e47ff53250a.png","./public/d3svg1/flags/iceland.png":"https://p3.ssl.qhimg.com/t010178e8a27cf4f660.png","./public/d3svg1/flags/india.png":"https://p4.ssl.qhimg.com/t018213e7e6dc2a3368.png","./public/d3svg1/flags/indonesia.png":"https://p5.ssl.qhimg.com/t01bcb4661812d6e2dd.png","./public/d3svg1/flags/ip.png":"https://p4.ssl.qhimg.com/t012e2c50a4c424fd37.png","./public/d3svg1/flags/iran.png":"https://p3.ssl.qhimg.com/t011a5bca45b65c6bda.png","./public/d3svg1/flags/iraq.png":"https://p0.ssl.qhimg.com/t01c351fb6799b43b8e.png","./public/d3svg1/flags/ireland.png":"https://p0.ssl.qhimg.com/t01c19ffc4e51b1b821.png","./public/d3svg1/flags/isle_of_man.png":"https://p4.ssl.qhimg.com/t017cc3b83618827640.png","./public/d3svg1/flags/israel.png":"https://p1.ssl.qhimg.com/t010f3fe6361aebe345.png","./public/d3svg1/flags/italy.png":"https://p3.ssl.qhimg.com/t01259e5daf0549a262.png","./public/d3svg1/flags/jamaica.png":"https://p4.ssl.qhimg.com/t01fe1c1722f1aadb19.png","./public/d3svg1/flags/japan.png":"https://p1.ssl.qhimg.com/t012be27ee2e0144814.png","./public/d3svg1/flags/jersey.png":"https://p5.ssl.qhimg.com/t01e6808ce8980d8153.png","./public/d3svg1/flags/jordan.png":"https://p3.ssl.qhimg.com/t013b03a35b35e93112.png","./public/d3svg1/flags/kazakhstan.png":"https://p3.ssl.qhimg.com/t015c547f69f6914068.png","./public/d3svg1/flags/kenya.png":"https://p4.ssl.qhimg.com/t01c139207c1af5796e.png","./public/d3svg1/flags/kiribati.png":"https://p3.ssl.qhimg.com/t01fa801f19411d0845.png","./public/d3svg1/flags/kosovo.png":"https://p5.ssl.qhimg.com/t017a2248e71b96fe50.png","./public/d3svg1/flags/kuwait.png":"https://p5.ssl.qhimg.com/t0144ba519b64e3b8d5.png","./public/d3svg1/flags/kyrgyzstan.png":"https://p3.ssl.qhimg.com/t01586d16c82fd0d335.png","./public/d3svg1/flags/laos.png":"https://p5.ssl.qhimg.com/t01c625355323458017.png","./public/d3svg1/flags/latvia.png":"https://p4.ssl.qhimg.com/t01ea8a114edbe5ec64.png","./public/d3svg1/flags/lebanon.png":"https://p3.ssl.qhimg.com/t01ffbeb21378af699a.png","./public/d3svg1/flags/lesotho.png":"https://p0.ssl.qhimg.com/t01d373c8167c1bbc61.png","./public/d3svg1/flags/liberia.png":"https://p5.ssl.qhimg.com/t01f36c69ecf34bcb61.png","./public/d3svg1/flags/libya.png":"https://p4.ssl.qhimg.com/t01d20838c79c8f3ba6.png","./public/d3svg1/flags/liechtenstein.png":"https://p5.ssl.qhimg.com/t0196b0707e4ac337b5.png","./public/d3svg1/flags/lithuania.png":"https://p2.ssl.qhimg.com/t01b414cecd90415a6a.png","./public/d3svg1/flags/luxembourg.png":"https://p3.ssl.qhimg.com/t013d9dda633fc50ffd.png","./public/d3svg1/flags/macau.png":"https://p4.ssl.qhimg.com/t01a892679802369212.png","./public/d3svg1/flags/macedonia.png":"https://p3.ssl.qhimg.com/t0123808f60cf668fc9.png","./public/d3svg1/flags/madagascar.png":"https://p5.ssl.qhimg.com/t014d15e974516d5cb3.png","./public/d3svg1/flags/malawi.png":"https://p2.ssl.qhimg.com/t012db076a05806722c.png","./public/d3svg1/flags/malaysia.png":"https://p1.ssl.qhimg.com/t01f9a3c22f13fd96c5.png","./public/d3svg1/flags/maldives.png":"https://p3.ssl.qhimg.com/t01fde5890555898b6f.png","./public/d3svg1/flags/mali.png":"https://p0.ssl.qhimg.com/t01422870677e8b5bce.png","./public/d3svg1/flags/malta.png":"https://p4.ssl.qhimg.com/t0172c88550dc2c333e.png","./public/d3svg1/flags/marshall_islands.png":"https://p2.ssl.qhimg.com/t01646846cbbf3a4735.png","./public/d3svg1/flags/mauritania.png":"https://p5.ssl.qhimg.com/t01c3ade924f1cef885.png","./public/d3svg1/flags/mauritius.png":"https://p1.ssl.qhimg.com/t0129026fcfcd64601f.png","./public/d3svg1/flags/mexico.png":"https://p4.ssl.qhimg.com/t01e06d39e098fc8ccb.png","./public/d3svg1/flags/micronesia.png":"https://p2.ssl.qhimg.com/t01c1b247a750439a7e.png","./public/d3svg1/flags/moldova.png":"https://p3.ssl.qhimg.com/t0150c6f75d4d3eee8b.png","./public/d3svg1/flags/monaco.png":"https://p5.ssl.qhimg.com/t01bcb4661812d6e2dd.png","./public/d3svg1/flags/mongolia.png":"https://p1.ssl.qhimg.com/t012cfc9fa747237289.png","./public/d3svg1/flags/montenegro.png":"https://p5.ssl.qhimg.com/t016462c01ca1bafac0.png","./public/d3svg1/flags/montserrat.png":"https://p0.ssl.qhimg.com/t010c8845d6d090c447.png","./public/d3svg1/flags/morocco.png":"https://p1.ssl.qhimg.com/t019897bbe03901a57a.png","./public/d3svg1/flags/mozambique.png":"https://p4.ssl.qhimg.com/t015f93036ad9aec89c.png","./public/d3svg1/flags/myanmar_burma.png":"https://p4.ssl.qhimg.com/t013ee76060475fe0b0.png","./public/d3svg1/flags/namibia.png":"https://p2.ssl.qhimg.com/t015e0bbc1fec4908a9.png","./public/d3svg1/flags/nauru.png":"https://p4.ssl.qhimg.com/t0174083d9b9b5e0069.png","./public/d3svg1/flags/nepal.png":"https://p5.ssl.qhimg.com/t017808e1379fc17470.png","./public/d3svg1/flags/netherlands.png":"https://p3.ssl.qhimg.com/t01d592b75467b0db7b.png","./public/d3svg1/flags/netherlands_antilles.png":"https://p4.ssl.qhimg.com/t013bbf175457b12c12.png","./public/d3svg1/flags/new_caledonia.png":"https://p5.ssl.qhimg.com/t012231079a91d351eb.png","./public/d3svg1/flags/new_zealand.png":"https://p4.ssl.qhimg.com/t0149ee6eb1c37a282a.png","./public/d3svg1/flags/nicaragua.png":"https://p2.ssl.qhimg.com/t013d155996d8c986c9.png","./public/d3svg1/flags/niger.png":"https://p4.ssl.qhimg.com/t014f4d87e9952a272b.png","./public/d3svg1/flags/nigeria.png":"https://p4.ssl.qhimg.com/t01964d810f5fe6b404.png","./public/d3svg1/flags/niue.png":"https://p2.ssl.qhimg.com/t01f23318f87536e3be.png","./public/d3svg1/flags/norfolk_island.png":"https://p2.ssl.qhimg.com/t016bb5e86248642b36.png","./public/d3svg1/flags/north_korea.png":"https://p2.ssl.qhimg.com/t017327fd94e8b6a5a3.png","./public/d3svg1/flags/northern_cyprus.png":"https://p1.ssl.qhimg.com/t011b7548ce349c2c59.png","./public/d3svg1/flags/northern_ireland.png":"https://p1.ssl.qhimg.com/t01ea43c093d6f4f449.png","./public/d3svg1/flags/norway.png":"https://p0.ssl.qhimg.com/t01c987d9dd507bfdd6.png","./public/d3svg1/flags/oman.png":"https://p5.ssl.qhimg.com/t01808d4462b6f3a218.png","./public/d3svg1/flags/pakistan.png":"https://p0.ssl.qhimg.com/t01cf5e993ade4f2964.png","./public/d3svg1/flags/palau.png":"https://p3.ssl.qhimg.com/t01c068865ac2e2b031.png","./public/d3svg1/flags/palestine.png":"https://p3.ssl.qhimg.com/t01eead994da457cb04.png","./public/d3svg1/flags/panama.png":"https://p1.ssl.qhimg.com/t01cc4745092f80ccfb.png","./public/d3svg1/flags/papua_new_guinea.png":"https://p3.ssl.qhimg.com/t0144673a8e2c3ef051.png","./public/d3svg1/flags/paraguay.png":"https://p3.ssl.qhimg.com/t01dda2a735d20519e7.png","./public/d3svg1/flags/peru.png":"https://p1.ssl.qhimg.com/t0133af174deb1560d5.png","./public/d3svg1/flags/philippines.png":"https://p1.ssl.qhimg.com/t01f5f86e3429cb4c81.png","./public/d3svg1/flags/pitcairn_islands.png":"https://p5.ssl.qhimg.com/t014517b95359047675.png","./public/d3svg1/flags/poland.png":"https://p1.ssl.qhimg.com/t01069ed918cdd98767.png","./public/d3svg1/flags/portugal.png":"https://p3.ssl.qhimg.com/t018cefa1ac33d50290.png","./public/d3svg1/flags/puerto_rico.png":"https://p5.ssl.qhimg.com/t01659a3560240c8a4e.png","./public/d3svg1/flags/qatar.png":"https://p4.ssl.qhimg.com/t0169854fcdd37ed962.png","./public/d3svg1/flags/romania.png":"https://p5.ssl.qhimg.com/t01208b9341dba47f11.png","./public/d3svg1/flags/russia.png":"https://p1.ssl.qhimg.com/t016b8ee4de7e5d9e69.png","./public/d3svg1/flags/rwanda.png":"https://p1.ssl.qhimg.com/t011c8a95a7340b4dae.png","./public/d3svg1/flags/sahrawi_arab.png":"https://p4.ssl.qhimg.com/t01833624156c42e3ab.png","./public/d3svg1/flags/saint_kitts_and_nevis.png":"https://p2.ssl.qhimg.com/t01bb701bf8e688e076.png","./public/d3svg1/flags/saint_lucia.png":"https://p0.ssl.qhimg.com/t01be47edaa16e3efdb.png","./public/d3svg1/flags/saint_vincent_and_grenadines.png":"https://p0.ssl.qhimg.com/t01356376d62ad2fb08.png","./public/d3svg1/flags/samoa.png":"https://p2.ssl.qhimg.com/t015099091e7ff643a2.png","./public/d3svg1/flags/san_marino.png":"https://p1.ssl.qhimg.com/t01c7d8eaf79bd11950.png","./public/d3svg1/flags/sao_tome_principe.png":"https://p4.ssl.qhimg.com/t015ed5322e52b33883.png","./public/d3svg1/flags/saudi_arabia.png":"https://p3.ssl.qhimg.com/t015ef983618f3dad1d.png","./public/d3svg1/flags/scotland.png":"https://p2.ssl.qhimg.com/t0132d8efbdc309befc.png","./public/d3svg1/flags/senegal.png":"https://p3.ssl.qhimg.com/t01ed2aa2fac6a327f1.png","./public/d3svg1/flags/serbia.png":"https://p0.ssl.qhimg.com/t01f87c8ab028617f5b.png","./public/d3svg1/flags/seychelles.png":"https://p1.ssl.qhimg.com/t0121e9aa4597a2c5d2.png","./public/d3svg1/flags/sierra_leone.png":"https://p4.ssl.qhimg.com/t010afc938f22552079.png","./public/d3svg1/flags/singapore.png":"https://p2.ssl.qhimg.com/t0140999577dd24227e.png","./public/d3svg1/flags/sint_maarten.png":"https://p0.ssl.qhimg.com/t0115986c65ec59b44c.png","./public/d3svg1/flags/slovakia.png":"https://p4.ssl.qhimg.com/t011e49878fdeda9e6c.png","./public/d3svg1/flags/slovenia.png":"https://p4.ssl.qhimg.com/t01ef90cb0d44c02757.png","./public/d3svg1/flags/solomon_islands.png":"https://p3.ssl.qhimg.com/t01066406f4b1266571.png","./public/d3svg1/flags/somalia.png":"https://p4.ssl.qhimg.com/t013c470e6e15a1a963.png","./public/d3svg1/flags/south_africa.png":"https://p4.ssl.qhimg.com/t01aaa44743ad66ca71.png","./public/d3svg1/flags/south_korea.png":"https://p2.ssl.qhimg.com/t01207c734bc93ffca7.png","./public/d3svg1/flags/south_sudan.png":"https://p5.ssl.qhimg.com/t011c283fad96263e62.png","./public/d3svg1/flags/spain.png":"https://p2.ssl.qhimg.com/t018316992b1c22281d.png","./public/d3svg1/flags/sri_lanka.png":"https://p0.ssl.qhimg.com/t01fb7bcacef951feed.png","./public/d3svg1/flags/sudan.png":"https://p3.ssl.qhimg.com/t01f129ac747600e082.png","./public/d3svg1/flags/suriname.png":"https://p0.ssl.qhimg.com/t017a12641513ab7d34.png","./public/d3svg1/flags/swaziland.png":"https://p5.ssl.qhimg.com/t01936216cc45eeff7b.png","./public/d3svg1/flags/sweden.png":"https://p0.ssl.qhimg.com/t0166958e31ac92957e.png","./public/d3svg1/flags/switzeland.png":"https://p2.ssl.qhimg.com/t01122ada53eb1b807e.png","./public/d3svg1/flags/syria.png":"https://p1.ssl.qhimg.com/t01953c86d18052c932.png","./public/d3svg1/flags/taiwan.png":"https://p5.ssl.qhimg.com/t01304bcd201fd23df6.png","./public/d3svg1/flags/tajikistan.png":"https://p2.ssl.qhimg.com/t0198c5c84a62b12388.png","./public/d3svg1/flags/tanzania.png":"https://p1.ssl.qhimg.com/t01d537b34d56658c98.png","./public/d3svg1/flags/thailand.png":"https://p5.ssl.qhimg.com/t010050f650fff9bd66.png","./public/d3svg1/flags/the_cook_islands.png":"https://p3.ssl.qhimg.com/t011292a8f19147f865.png","./public/d3svg1/flags/the_faroe_islands.png":"https://p0.ssl.qhimg.com/t01cda6e9ec5b5bc8f6.png","./public/d3svg1/flags/the_turks_and_caicos_islands.png":"https://p4.ssl.qhimg.com/t0114fca92287df5c95.png","./public/d3svg1/flags/togo.png":"https://p0.ssl.qhimg.com/t0182ba165ebbbca70a.png","./public/d3svg1/flags/tokelau.png":"https://p5.ssl.qhimg.com/t017e4bae219b59d6e6.png","./public/d3svg1/flags/tonga.png":"https://p1.ssl.qhimg.com/t01998933793d4d8fbc.png","./public/d3svg1/flags/transnistria.png":"https://p5.ssl.qhimg.com/t012dc7b17601baa895.png","./public/d3svg1/flags/trinidad_and_tobago.png":"https://p2.ssl.qhimg.com/t017371391609bf78d7.png","./public/d3svg1/flags/tunisia.png":"https://p3.ssl.qhimg.com/t0124cb2d7bf0797501.png","./public/d3svg1/flags/turkey.png":"https://p1.ssl.qhimg.com/t01b51b544b5e683846.png","./public/d3svg1/flags/turkmenistan.png":"https://p2.ssl.qhimg.com/t0180705dbb5d2590e1.png","./public/d3svg1/flags/tuvalu.png":"https://p0.ssl.qhimg.com/t01eb80c5b0e6b4cf9d.png","./public/d3svg1/flags/uganda.png":"https://p3.ssl.qhimg.com/t01a42822abbcef11ef.png","./public/d3svg1/flags/ukraine.png":"https://p0.ssl.qhimg.com/t01a18c73c5e309e867.png","./public/d3svg1/flags/united_arab_emirates_uae.png":"https://p4.ssl.qhimg.com/t01d6ac620490436646.png","./public/d3svg1/flags/united_kingdom.png":"https://p2.ssl.qhimg.com/t01b2dab8383fd03d16.png","./public/d3svg1/flags/united_states.png":"https://p2.ssl.qhimg.com/t01ac4aab9abb62470d.png","./public/d3svg1/flags/united_states_virgin_islands.png":"https://p4.ssl.qhimg.com/t010e706830471605ae.png","./public/d3svg1/flags/uruguay.png":"https://p2.ssl.qhimg.com/t0173c8556316268f27.png","./public/d3svg1/flags/uzbekistan.png":"https://p2.ssl.qhimg.com/t01692a87d0deaa0cd4.png","./public/d3svg1/flags/vanuatu.png":"https://p4.ssl.qhimg.com/t01dfe59d18beb502ed.png","./public/d3svg1/flags/vatican.png":"https://p4.ssl.qhimg.com/t015204ea5b7e60deae.png","./public/d3svg1/flags/venezuela.png":"https://p4.ssl.qhimg.com/t01d6d7092d46e0d7c3.png","./public/d3svg1/flags/vietnam.png":"https://p0.ssl.qhimg.com/t0168708c0e4043f8a0.png","./public/d3svg1/flags/wales.png":"https://p5.ssl.qhimg.com/t010c0cbfacd5576ddd.png","./public/d3svg1/flags/wallis_and_futuna.png":"https://p4.ssl.qhimg.com/t018351271fd687e442.png","./public/d3svg1/flags/yemen.png":"https://p5.ssl.qhimg.com/t01b506ff3ca76f158a.png","./public/d3svg1/flags/zambia.png":"https://p4.ssl.qhimg.com/t0114f327cbfbe2c728.png","./public/d3svg1/flags/zimbabwe.png":"https://p4.ssl.qhimg.com/t01704ad2c0a3c95fd1.png","./public/d3svg1/fold-left.svg":"https://s8.qhres2.com/static/c515b0328ee8a877.svg","./public/d3svg1/fold-right.svg":"https://s7.qhres2.com/static/504df9c78a8e3507.svg","./public/d3svg1/group.svg":"https://s9.qhres2.com/static/be31052989161b10.svg","./public/d3svg1/host.svg":"https://s8.qhres2.com/static/14adc2df5557447e.svg","./public/d3svg1/icon_ thumbprint.svg":"https://s9.qhres2.com/static/3b7801940436d878.svg","./public/d3svg1/icon_cert_md5.svg":"https://s5.qhres2.com/static/c7c9113c1add9bb6.svg","./public/d3svg1/icon_email.svg":"https://s9.qhres2.com/static/40461e9fdf73732d.svg","./public/d3svg1/icon_family.svg":"https://s5.qhres2.com/static/89fd30ea0238a2ed.svg","./public/d3svg1/icon_files.svg":"https://s7.qhres2.com/static/7fb96bbb0097561a.svg","./public/d3svg1/icon_host.svg":"https://s9.qhres2.com/static/accf9c9fb2b60213.svg","./public/d3svg1/icon_ip.svg":"https://s8.qhres2.com/static/86c2b4d0b762506e.svg","./public/d3svg1/icon_issuer.svg":"https://s6.qhres2.com/static/d14d393f1f11c200.svg","./public/d3svg1/icon_mac.svg":"https://s5.qhres2.com/static/c3fa50300c1d37c8.svg","./public/d3svg1/icon_mid.svg":"https://s8.qhres2.com/static/484c81933458f25a.svg","./public/d3svg1/icon_org.svg":"https://s8.qhres2.com/static/ec482f5493e22a64.svg","./public/d3svg1/icon_report.svg":"https://s8.qhres2.com/static/c493d2bcf07416f7.svg","./public/d3svg1/icon_search.svg":"https://s5.qhres2.com/static/1441aaeff1cae201.svg","./public/d3svg1/icon_subject.svg":"https://s7.qhres2.com/static/9e4ad22e6cfb0366.svg","./public/d3svg1/icon_vul.svg":"https://s6.qhres2.com/static/efa2c5ac7be3f1e4.svg","./public/d3svg1/internet.svg":"https://s7.qhres2.com/static/a07f5b1ffd26c4af.svg","./public/d3svg1/intranet.svg":"https://s5.qhres2.com/static/ab0e84c187e84758.svg","./public/d3svg1/ioc.svg":"https://s5.qhres2.com/static/4920f2fc81f4a8b5.svg","./public/d3svg1/ip copy.svg":"https://s5.qhres2.com/static/f30c7317dd483dbd.svg","./public/d3svg1/ip.svg":"https://s5.qhres2.com/static/52716362997c3c47.svg","./public/d3svg1/ips.svg":"https://s5.qhres2.com/static/37002885cb7b3504.svg","./public/d3svg1/jiantou.svg":"https://s9.qhres2.com/static/1c7e66fc3250cb03.svg","./public/d3svg1/jiantou_active.svg":"https://s7.qhres2.com/static/d42dd8727c2035f1.svg","./public/d3svg1/mac.svg":"https://s6.qhres2.com/static/2f4f2fb7dfd3794e.svg","./public/d3svg1/md5.svg":"https://s8.qhres2.com/static/6d9a30203c2e2f6c.svg","./public/d3svg1/md51.svg":"https://s5.qhres2.com/static/e5740a41cd1ee94b.svg","./public/d3svg1/md52.svg":"https://s5.qhres2.com/static/4bdced7a2e104377.svg","./public/d3svg1/md53.svg":"https://s7.qhres2.com/static/273f73f17afdcac5.svg","./public/d3svg1/md54.svg":"https://s6.qhres2.com/static/51c845288534d905.svg","./public/d3svg1/mid.svg":"https://s7.qhres2.com/static/25cd292ca0cc185c.svg","./public/d3svg1/name.svg":"https://s7.qhres2.com/static/b6d2889ff8072331.svg","./public/d3svg1/net.svg":"https://s8.qhres2.com/static/b0c58108f3cb904f.svg","./public/d3svg1/node.svg":"https://s5.qhres2.com/static/ea74a3b821146cd5.svg","./public/d3svg1/node_type.svg":"https://s5.qhres2.com/static/f2f83ae7d21f08e1.svg","./public/d3svg1/org.svg":"https://s6.qhres2.com/static/782980032391ba28.svg","./public/d3svg1/organization.svg":"https://s9.qhres2.com/static/d9d4c0b5baf068fd.svg","./public/d3svg1/proc.svg":"https://s7.qhres2.com/static/b76866d80c99489c.svg","./public/d3svg1/proc_md5.svg":"https://s6.qhres2.com/static/da0dfb9006a02582.svg","./public/d3svg1/relate_ip.svg":"https://s9.qhres2.com/static/75ed45280c79c92b.svg","./public/d3svg1/report.svg":"https://s7.qhres2.com/static/ecf1a790525d5848.svg","./public/d3svg1/router_mac.svg":"https://s6.qhres2.com/static/13de6c9d73d5275b.svg","./public/d3svg1/star.svg":"https://s7.qhres2.com/static/3eb49d1f9c377af8.svg","./public/d3svg1/sys_icon.svg":"https://s8.qhres2.com/static/1df923965bc3ddc4.svg","./public/d3svg1/target_country.svg":"https://s9.qhres2.com/static/be861df3682f42b9.svg","./public/d3svg1/target_industry.svg":"https://s8.qhres2.com/static/cd490ac4192f664e.svg","./public/d3svg1/thumbprint_md5.svg":"https://s8.qhres2.com/static/57e700699cfae3e2.svg","./public/d3svg1/ttp.svg":"https://s5.qhres2.com/static/5dca11713acd5c0b.svg","./public/d3svg1/url.svg":"https://s7.qhres2.com/static/a926d82581d0602e.svg","./public/d3svg1/user_name.svg":"https://s5.qhres2.com/static/e871b79b1bf55733.svg","./public/d3svg1/vendor.svg":"https://s6.qhres2.com/static/a047cc46ab1b941c.svg","./public/d3svg1/vul.svg":"https://s6.qhres2.com/static/d45444d8a175ead3.svg"};function yi(e){try{var t,n=new RegExp("(^| )"+e+"=([^;]*)(;|$)");return(t=document.cookie.match(n))?unescape(t[2]):""}catch(r){return""}}function z0(e,t,n){var r=(n=n||{}).expires;typeof r=="number"&&(r=new Date).setTime(r.getTime()+n.expires);try{document.cookie=e+"="+escape(t)+(r?";expires="+r.toGMTString():"")+(n.path?";path="+n.path:"")+(n.domain?"; domain="+n.domain:"")}catch(o){}}function v5(e){return e!=null&&e.constructor!=null?Object.prototype.toString.call(e).slice(8,-1):""}function y5(e){return v5(e)=="Array"}function Oc(e){return v5(e)=="Function"}function bi(e){return e!==null&&typeof e=="object"}function ho(e,t,n){for(var r in t)(n||!e[r]&&!(r in e))&&(e[r]=t[r]);return e}const jQ=["Baiduspider","Googlebot","360Spider","Sosospider","Yahoo! Slurp China","Yahoo!","YoudaoBot","YodaoBot","Sogou web spider","Sogou inst spider","Sogou spider2","Sogou blog","Sogou News Spider","Sogou Orion spider","msnbot","msnbot-media","bingbot","bingpreview","YisouSpider","ia_archiver","EasouSpider","JikeSpider","Bytespider"];var Me=new class{constructor(){this._activeTime="",this.appkey="",this.trackId="",this.mid="",this.m2="",this.asc="",this.asc2="",this.debug=!1,this.config={trackUrl:null,clickUrl:null,areaIds:null,hbLogTimer:0}}log(){if(this.debug&&typeof console=="object"&&console.log)try{return console.log.apply(console,arguments)}catch(e){console.log(arguments[0])}}userAgentIsExitsSpiders(){const e=this.getUserAgent().toLowerCase();let t=!1;return jQ.map(n=>{e.indexOf(n.toLowerCase())>=0&&(t=!0)}),t}setUtilActiveTime(e){this._activeTime=e}setUtilConf(e,t){var n={};bi(e)?n=e:n[e]=t,this.config=ho(this.config,n,!0)}getUtilConf(){return this.config}getColorDepth(){return window.screen.colorDepth+"-bit"}getLanguage(){return(navigator.language||navigator.browserLanguage).toLowerCase()}getUserAgent(){return navigator.userAgent}getScreenSize(){return window.screen.width+"x"+window.screen.height}getProject(e){return/QH_[0-9]+_[0-9]*\#?[0-9]{1,}$/.test(e)?this.appkey=e:e&&console.log("当前写入的appkey:",e,"格式异常,请前往雷达分析平台确认。"),this.appkey}getReferrer(){var e=document.referrer||"";return e.indexOf("pass")>-1||e.indexOf("pwd")>-1?"403":e}getBrowser(){var e={"360se-ua":"360se","360ee":"360ee",edge:"edg",edge:"edga",edge:"edgios",TT:"tencenttraveler",Maxthon:"maxthon",GreenBrowser:"greenbrowser",Sogou:"se 2.x",TheWorld:"theworld"},t=navigator.userAgent.toLowerCase();for(var n in e)if(t.indexOf(e[n])>-1)return n;var r=!1;try{+external.twGetVersion(external.twGetSecurityID(window)).replace(/\./g,"")>1013&&(r=!0)}catch(a){}if(r)return"360se-noua";var o=t.match(/(msie|chrome|safari|firefox|opera|trident)/);return(o=o?o[0]:"")=="msie"?o=t.match(/msie[^;]+/)+"":o=="trident"&&t.replace(/trident\/[0-9].*rv[ :]([0-9.]+)/gi,function(a,c){o="msie "+c}),o}getReferrerKeyWord(){const e=document.referrer;var t={q:"",eqid:""};if(!e)return t;for(var n=new URL(e).search.substring(1).split("&"),r={},o=0;o<n.length;o++){var a=n[o].split("=");r[a[0]]=a[1]}return e.indexOf("baidu.com")>-1?(t.q=r.wd,t.eqid=r.eqid):(e.indexOf("so.com")>-1||e.indexOf("sm.cn")>-1)&&(t.q=r.q),t.q||(t.q=""),t}getLocation(e){e||(e="");try{e=location.href}catch(t){(e=document.createElement("a")).href="",e=e.href}return e=/\.(s?htm|php)/.test(e)?e:e.replace(/\/$/,"")+"/"}hash(e){for(var t=0,n=0,r=e.length-1;r>=0;r--){var o=parseInt(e.charCodeAt(r),10);(n=266338304&(t=(t<<6&268435455)+o+(o<<14)))!=0&&(t^=n>>21)}return t}guid(){for(var e=[navigator.appName,navigator.version,navigator.language||navigator.browserLanguage,navigator.platform,navigator.userAgent,window.screen.width,"x",window.screen.height,window.screen.colorDepth,document.referrer].join(""),t=e.length,n=window.history.length;n;)e+=n--^t++;return 2147483647*(Math.round(2147483647*Math.random())^this.hash(e))}isLocal(){try{var e=location.protocol.toLowerCase();if(e=="http:"||e=="https:")return!1}catch(t){}return!0}getSid(){var e="__DC_sid",t=yi(e);return!t&&(t=yi("__sid"))&&t.split(".").length!==4&&(t=null),t||(t=[this.hash(this.isLocal()?"":document.domain),this.guid(),+new Date+Math.random()].join(".")),z0(e,t,{expires:60*(this._activeTime||30)*1e3,path:"/"}),t}setUtilTrackId(e){this.trackId=e}getGid(e=!1){var t="__DC_gid",n=yi(t);return!n&&(n=yi("__gid"))&&n.split(".").length!==5&&(n=null),n||(n=function(r){try{return JSON.parse(window.localStorage.getItem(r))}catch(o){return[]}}(t)),n?((n=n.split("."))[3]=new Date().getTime(),e&&(n[4]=(parseInt(n[4])||1)+1),n=n.join(".")):n=this.trackId?[this.trackId,1,1,new Date().getTime(),1].join("."):[this.hash(this.isLocal()?"":document.domain),Math.floor(1e9*Math.random()),new Date().getTime(),new Date().getTime(),1].join("."),function(r,o){try{window.localStorage.setItem(r,JSON.stringify(o))}catch(a){}}(t,n),z0(t,n,{expires:63072e6,path:"/"}),n}getMid(){try{this.mid=external.GetMID(external.GetSID(window))}catch(e){}try{this.mid.length!==32&&(this.mid=window.wdextcmd.GetMid())}catch(e){}return this.mid}getM2(){return Te(this,null,function*(){return new Promise((e,t)=>{try{this.m2.length===0&&external.AppCmd(external.GetSID(window),"","GetMID2","","",function(n,r){this.m2=r,e(this.m2)})}catch(n){}setTimeout(function(){try{this.m2===void 0&&(this.m2="",this.m2=window.wdextcmd.GetMidV2())}catch(n){}e(this.m2)},500)})})}getASC(){try{this.asc=external.GetASC(external.GetSID(window))}catch(e){}try{this.asc.length===0&&(this.asc=window.wdextcmd.GetASC())}catch(e){}return this.asc.length===0&&(this.asc=yi("__asc")),this.asc}getASC2(){return Te(this,null,function*(){return new Promise((e,t)=>{try{this.asc2.length===0&&external.AppCmd(external.GetSID(window),"","GetASC2","","",function(n,r){this.asc2=r,e(this.asc2)})}catch(n){}setTimeout(function(){try{this.asc2===void 0&&(this.asc2="",this.asc2=window.wdextcmd.GetASC2())}catch(n){}this.asc2.length===0&&(this.asc2=yi("__asc2")),e(this.asc2)},500)})})}getCount(){var e="__DC_monitor_count",t=yi(e);return t||(t=yi("monitor_count")),z0(e,t=(parseInt(t)||0)+1,{expires:864e5,path:"/"}),t}getFlashVer(){var e=-1;if(navigator.plugins&&navigator.mimeTypes.length){var t=navigator.plugins["Shockwave Flash"];t&&t.description&&(e=t.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s)+r/,".")+".0")}else if(window.ActiveXObject&&!window.opera)try{var n=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");n&&(e=n.GetVariable("$version").replace(/WIN/g,"").replace(/,/g,"."))}catch(r){}return e=parseInt(e,10)}getContainerId(e){var t,n;for(this.getUtilConf().areaIds&&(t=new RegExp("^("+this.getUtilConf().areaIds.join("|")+")$","ig"));e;){if(e.attributes&&("bk"in e.attributes||"data-bk"in e.attributes)){if(n=e.getAttribute("bk")||e.getAttribute("data-bk"))return(n="bk:"+n).substr(0,100);if(e.id)return(n=e.getAttribute("data-desc")||e.id).substr(0,100)}else if(t&&e.id&&t.test(e.id))return(n=e.getAttribute("data-desc")||e.id).substr(0,100);e=e.parentNode}return""}trim(e){return e.replace(/^[\s\xa0\u3000]+|[\u3000\xa0\s]+$/g,"")}getText(e){var t="";return t=e.tagName.toLowerCase()=="input"?e.getAttribute("text")||e.getAttribute("data-text")||e.value||e.title||"":e.getAttribute("text")||e.getAttribute("data-text")||e.innerText||e.textContent||e.title||"",this.trim(t).substr(0,100)}getHref(e){try{return e.getAttribute("data-href")||e.href||""}catch(t){return""}}};function sf(e,t,n){e.addEventListener?e&&e.addEventListener(t,n,!1):e&&e.attachEvent("on"+t,n)}function U0(e,t,n){for(n=n||5,t=t.toUpperCase();e&&n-- >0;){if(e.tagName===t)return e;e=e.parentNode}return null}var Ic=[];function b5(e){Oc(e)&&Ic.push(e)}function qQ(e){var t,n;if(y5(e))for(n=e.length,t=0;t<n;t++)b5(e[t]);else b5(e);(function(r){Ic.splice(Ic.indexOf(r),1)})(e),e=null}function w5(e){if(!("target"in e)){var t=e.srcElement||e.target;t&&t.nodeType==3&&(t=t.parentNode),e.target=t}return e}let HQ=class{constructor(){this.cache={},this.baseExtend={},this.title="",this.placeholder=[]}getBase(t=!1){var n={p:Me.getProject(),u:Me.getLocation(),gid:Me.getGid(t),sid:Me.getSid(),title:this.getTitle()},r=Me.getReferrerKeyWord();return r&&(n.q=r.q,n.eqid=r.eqid),n}getBaseTrack(t){var n=Me.getSid()==Me.getSid()?1:0,r={b:Me.getBrowser(),c:Me.getCount(),r:Me.getReferrer(),fl:Me.getFlashVer(),sd:Me.getColorDepth(),sr:Me.getScreenSize(),ul:Me.getLanguage(),ua:Me.getUserAgent(),ce:n};if(t){for(var o=[],a=0,c=(t=t.split(",")).length;a<c;a++){var l=yi(t[a]);o.push(t[a]+"="+encodeURIComponent(l))}r.uc=encodeURIComponent(o.join("&"))}return r}getClick(t){var n,r,o=(t=w5(t||event)).target,a=o.tagName,c=Me.getContainerId(o);if(c=="bk:noupload")return!1;if(!o.type||o.type!="submit"&&o.type!="button")return a=="AREA"?{f:Me.getHref(o),c:"area:"+o.parentNode.name,cId:c}:(a=="IMG"&&(n=o),!!(o=U0(o,"A"))&&(r=Me.getText(o),{f:Me.getHref(o),c:r||(n?n.src.match(/[^\/]+$/):""),cId:c}));var l=U0(o,"FORM"),d={};if(l){var u=l.id||"",f=o.id;if(d={f:l.action,c:"form:"+(l.name||u),cId:c},!(u!="search-form"&&u!="searchForm"||f!="searchBtn"&&f!="search-btn")){var p=$("kw")||$("search-kw")||$("kw1");d.w=p?p.value:""}}else d={f:Me.getHref(o),c:Me.getText(o),cId:c};return d}getKeydown(t){if((t=w5(t||event)).keyCode!=13)return!1;var n=t.target,r=n.tagName,o=Me.getContainerId(n);if(r=="INPUT"){var a=U0(n,"FORM");if(a){var c=a.id||"",l=n.id,d={f:a.action,c:"form:"+(a.name||c),cId:o};return l!="kw"&&l!="search-kw"&&l!="kw1"||(d.w=n.value),d}}return!1}getBaseExtend(t){return t&&(this.baseExtend=t),this.baseExtend}getCacheLog(){if(!this.cache)return null;var t=[];for(var n in this.cache)t.push(this.cache[n]);return t}getTitle(){return this.title||(this.title=document.title),this.title}setBaseTitle(t){this.title=t}},GQ=class{constructor(t){this.master=t,this.lastLocation=Me.getLocation(),this.isStarted=!1}start(){if(!this.isStarted){this.isStarted=!0,this.master.util.log("autoTrackPageChange");var t="pushState"in window.history?"popstate":"hashchange";this.master.util.log("hashEvent:",t);var n=this;sf(window,t,a=>{this.master.util.log(t+": "+document.location+", state: "+JSON.stringify(a.state)),n.lastLocation!==window.location.href&&(n.lastLocation=window.location.href,n.master.autoTrackEvent())});var r=window.history.pushState;Oc(history.pushState)&&r&&(history.pushState=function(a){r.apply(window.history,arguments),n.master.util.log("history.pushState",a),n.lastLocation=window.location.href,n.master.autoTrackEvent()});var o=window.history.replaceState;Oc(history.replaceState)&&o&&(history.replaceState=function(a){o.apply(window.history,arguments),n.master.util.log("history.replaceState",a),n.lastLocation=window.location.href,n.master.autoTrackEvent()})}}};var WQ="2.2.6";const wi=new class{constructor(){this.heatmapTimer=!1,this.version=WQ,this.data=new HQ,this.util=Me,this.disable_autoPV=!1,this.manualPV_enable=!1,this.autopv=new GQ(this)}setAscAndAsc2(e,t){if(!(this.data.placeholder.length>0)){var n={asc:""},r={asc2:""};e&&(n.asc=e),t&&(r.asc2=t),this.data.placeholder.push(n,r)}}setThirdProps(e,t){if(e&&t){var n={};n[e]=t,this.data.placeholder.length==2||this.setAscAndAsc2(),this.data.placeholder.push(n)}}setFourthProps(e,t){if(e&&t){var n={};n[e]=t,this.data.placeholder.length==3?this.data.placeholder.push(n):console.warn("确认必须先调用setAscAndAsc2和setThirdProps接口")}}getLibVersion(){return this.version}setTitle(e){return this.data.setBaseTitle(e),this}setTrackId(e){return Me.setUtilTrackId(e.replace(/\./g,"")),this}getBrowserID(e){return Te(this,null,function*(){return new Promise((t,n)=>Te(this,null,function*(){e===this.getConf().trackUrl?(this.data.placeholder.length===0&&(this.data.placeholder.push({mid:this.util.getMid()}),this.data.placeholder.push({m2:yield this.util.getM2()}),this.data.placeholder.push({asc:this.util.getASC()}),this.data.placeholder.push({asc2:yield this.util.getASC2()})),t(this.data.placeholder.length>0?function(r){for(var o=[],a=0;a<r.length;a++)o.push(encodeURIComponent(Object.keys(r[a]))+"="+encodeURIComponent(Object.values(r[a])));return o.join("&")}(this.data.placeholder)+"&":"")):t("")}))})}buildLog(e,t){return Te(this,null,function*(){var n="";if(e===!1)return;const r=t===this.getConf().trackUrl;e=e||{};var o=ho(this.data.getBase(r),this.data.getBaseExtend(),!0);e=ho(o,e,!0);var a=yield this.getBrowserID(t);a+=function(c){var l=[];for(var d in c)c[d]!=null&&l.push(encodeURIComponent(d)+"="+encodeURIComponent(c[d]));return l.join("&")}(e),a+="&t="+ +new Date,(t=t.indexOf("?")>-1?t+"&"+a:t+"?"+a)!=n&&(n=t,setTimeout(()=>{n=""},100),this.sendLog(t))})}sendLog(e){window.__radar_monitor_imgs={};var t="log_"+ +new Date,n=window.__radar_monitor_imgs[t]=new Image;n.onload=n.onerror=()=>{window.__radar_monitor_imgs&&window.__radar_monitor_imgs[t]&&(window.__radar_monitor_imgs[t]=null,delete window.__radar_monitor_imgs[t])},n.src=e}log(e,t){t=t||"click";var n=this.getConf()[t+"Url"];n||Me.log("Analytic Error : the "+t+"url does not exist!"),Me.userAgentIsExitsSpiders()||this.buildLog(function(r,o){var a,c=Ic.length,l=o;for(a=0;a<c;a++)try{l=ho(l,Ic[a].beforeLog(r,o))}catch(d){}return l}(t,e),n)}setConf(e,t){Me.setUtilConf(e,t)}getConf(){return Me.getUtilConf()}setUrl(e){if(e)return Me.getLocation(e)}extendBase(e){if(e&&bi(e)){var t=ho(this.data.getBaseExtend(),e,!0);this.data.getBaseExtend(t)}}setProject(e,t,n){return e&&Me.getProject(e),this.extendBase(t),this.init(n),this}setDebug(e=!0,t,n,r){return Me.debug=e,e&&(Me.log("当前已开启debug模式,可能会输出log。发布前请关闭!!!"),t&&(Me.log("当前配置测试appkey:",t),Me.getProject(t)),this.extendBase(n),this.init(r)),this}setTrackId(e){return Me.setUtilTrackId(e.replace(/\./g,"")),this}setId(e){for(var t=[];e=arguments[i++];)y5(e)?t=t.concat(e):t.push(e);return this.setConf("areaIds",t),this}init(e){var{trackForInit:t=!0}=e||{},n=location.protocol.toLowerCase()==="https:"?"https:":"http:";this.setConf({trackUrl:n+"//s.360.cn/qdas/s.htm",clickUrl:n+"//s.360.cn/qdas/c.htm",clickHeatMapUrl:n+"//s.360.cn/qdas/t.htm",wpoUrl:n+"//s.360.cn/qdas/p.htm",heartbeatUrl:n+"//s.360.cn/qdas/h.htm"}),t&&this.autoTrackEvent()}setDisableAutoPV(e=!0){return this.disable_autoPV=e,this}setManualPVEnable(e=!0){return this.manualPV_enable=e,this}autoTrackEvent(){var e=this.data.getBaseTrack();this.log(e,"track")}getAutoTrack(){return this.disable_autoPV||this.autopv.start(),this}getTrack(e,t,n){var{enableMenualOnce:r=!1}=e||{};if(!r&&!this.manualPV_enable)return this;var o=this.data.getBaseTrack(n);return bi(t)&&(o=ho(o,t,!0)),this.log(o,"track"),this}getClickHeatmap(e,t){if(!this.heatmapTimer){this.heatmapTimer=!0;var n=this,r=[];e=e||10,t=t||5;var o=0,a=c=>{if(clearTimeout(o),c||r.length>e)return r.length?(n.log({pos:r.join(","),sr:Me.getScreenSize()},"clickHeatMap"),void(r=[])):void 0;o=setTimeout(()=>{a(!0)},60*t*1e3)};return sf(document,"mousedown",c=>{var l=c.pageX+"."+c.pageY;r.push(l),a()}),this}}getClickAndKeydown(){return sf(document,"mousedown",e=>{var t=this.data.getClick(e);this.log(t,"click")}),sf(document,"keydown",e=>{var t=this.data.getKeydown(e);this.log(t,"click")}),this}beginHeartBeat(e,t,n){var r={};r.id=e,bi(t)&&(r=ho(r,t,!1)),(n=isNaN(n)?10:n)>60?n=60:n<5&&(n=5);var o=this;this.setConf("hbStarttime",Date.parse(new Date));var a=c=>{r.steptime=c,o.steptime=c,o.log(r,"heartbeat"),clearTimeout(o.getConf().hbLogTimer),o.getConf().hbLogTimer=setTimeout(()=>{var l=(Date.parse(new Date)-o.getConf().hbStarttime)/1e3;a(l)},1e3*n)};a(0)}endHeartBeat(e,t){if(this.getConf().hbStarttime!==void 0&&this.getConf().hbStarttime!==null){var n={};n.id=e,bi(t)&&(n=ho(n,t,!1)),clearTimeout(this.getConf().hbLogTimer);var r=(Date.parse(new Date)-this.getConf().hbStarttime)/1e3;n.steptime=r,this.log(n,"heartbeat"),this.setConf("hbStarttime",null)}}setActiveTime(e){return Me.setUtilActiveTime(e),this}addPlugin(e){return qQ(e)}use(e,t){return typeof(n=e)=="string"||n instanceof String?bi(window.RADAR_MONITOR_WEBJSSDKPLUGIN)&&bi(window.RADAR_MONITOR_WEBJSSDKPLUGIN[e])&&Oc(window.RADAR_MONITOR_WEBJSSDKPLUGIN[e].init)?(window.RADAR_MONITOR_WEBJSSDKPLUGIN[e].init(wi,t),window.RADAR_MONITOR_WEBJSSDKPLUGIN[e]):bi(wi.modules)&&bi(wi.modules[e])&&Oc(wi.modules[e].init)?(wi.modules[e].init(wi,t),wi.modules[e]):void Me.log(e+"没有获取到,请查阅文档,调整"+e+"的引入顺序!"):(Me.log("use插件名称必须是字符串!"),!1);var n}};function KQ(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.text()}function _5(e,t){return fetch(e,t).then(KQ)}const YQ=(e,t)=>{const n=document.createElement("a");n.download=t,n.style.display="none";const r=new window.Blob([e]);n.href=window.URL.createObjectURL(r),document.body.appendChild(n),n.click(),document.body.removeChild(n)},af=(e,t)=>Te(this,null,function*(){let n;return yield ga(e).then(r=>{const o=document.createElement("canvas");o.width=r.width,o.height=r.height,o.getContext("2d").drawImage(r,0,0,r.width,r.height),n=o.toDataURL("image/png")}),n});function ga(e){return Te(this,null,function*(){return new Promise((t,n)=>{const r=new Image;r.crossOrigin="anonymous",r.onload=()=>{t(r)},r.onerror=o=>{n(o)},r.src=e})})}function j0(e){if(typeof e=="number"||e===!0)return!0;var t=e===!1||e===null||e===void 0||Object.keys(e).length===0||/^\s*$/gim.test(e.toString());return!t}function ma(){var e=/macintosh|mac os x/i.test(navigator.userAgent);return e}function _i(e,t){var a;["label","textProp","detail","collect","fx","fy"].map(c=>{e[c]=e[c]?e[c]:null}),e.show=e.show?e.show:!0,e.type&&e.type!=="nodeType"&&(e.type=e.type.toLowerCase()),(["org","vul","email","family"].indexOf(e.type)>=0||e.startNode===!0)&&(e.textProp="name");const o={};if(e.type!=="nodeType"&&e.type!=="aggregation"&&((a=t[e.type])!=null&&a.length)){for(let c=0;c<t[e.type].length;c++){const l=t[e.type][c];o[l.name]=!1}e.getData=o}return e}function JQ(e){return e&&e.replace(/[^\x09\x0A\x0D\x20-\xFF\x85\xA0-\uD7FF\uE000-\uFDCF\uFDE0-\uFFFD]/gm,"")}function Gn(...e){localStorage.getItem("showSafeForceGraphLog")&&console.log(...e)}function en(e){wi.log(e,"click")}function q0(e,t,n,r,o){const a=n-e,c=r-t,l=Math.sqrt(a*a+c*c),d=e+a/l*(l-o),u=t+c/l*(l-o);return{x:d||0,y:u||0}}function C5(e,t="#666",n="#fff"){if(!e)return e;const o=new DOMParser().parseFromString(e,"image/svg+xml"),a=o.querySelector("g");return a?(a.setAttribute("color",n),o.querySelectorAll("[stroke]").forEach(f=>{f.getAttribute("stroke")!=="none"&&f.setAttribute("stroke",t)}),o.querySelectorAll("[class]").forEach(f=>{f.getAttribute("class").split(" ").includes("no-stroke")&&f.setAttribute("stroke","none")}),o.querySelectorAll(".text-bg").forEach(f=>{f.getAttribute("fill")!=="none"&&f.setAttribute("fill",t)}),new XMLSerializer().serializeToString(o)):void 0}function XQ(e){if(!e)return e;const r=new DOMParser().parseFromString(e,"image/svg+xml").querySelector("svg"),o=r.getAttribute("width"),a=r.getAttribute("height");return{width:parseInt(o),height:parseInt(a)}}function S5(e){return new Promise((t,n)=>{try{const r="data:image/svg+xml;base64,";e=e.replace(r,"");const o=atob(e);t(o)}catch(r){n(r)}})}function E5(e){const t="0123456789abcdefghijklmnopqrstuvwxyz",n=t.length;let r="";for(let o=0;o<e;o++)r+=t.charAt(Math.ceil(Math.random()*(n-1)));return r}function QQ(e){return{}.VITE_SVG_TYPE==="base64"?S5(e):_5(e)}function H0(e){let t={};return t=m5,t[e]}function va(e){return H0(`./public/d3svg1/${e}.svg`)}const G0={};function ZQ(r){return Te(this,arguments,function*({node:e,levelList:t,darkMode:n}){var l,d,u,f,p,h,m,b,w,_;let o=null;const a=(u=(d=(l=e.detail)==null?void 0:l.info)==null?void 0:d.basic)==null?void 0:u.flag,c=((h=(p=(f=e==null?void 0:e.detail)==null?void 0:f.info)==null?void 0:p.basic)==null?void 0:h.level)||"";if(e.detail&&((b=(m=e.detail)==null?void 0:m.info)!=null&&b.inner_img))try{o=e.detail.info.inner_img}catch(C){console.log("loadCompleted error",C)}else if(e.type==="nodeType"||e.type==="aggregation"){const C=e.icon||"node_type";o=va(C)?va(C):va("node_type")}else if(a&&(e.type==="ip"||e.type==="internet"))o=H0(`./public/d3svg1/flags/${a}.png`);else if((_=(w=e.detail)==null?void 0:w.info)!=null&&_.inner_country&&(e.type==="country"||e.type==="target_country")){const C=e.detail.info.inner_country;o=H0(`./public/d3svg1/flags/${C}.png`)}else{const C=`${e.type||"node"}${c}${n}`;if(G0[C])return o=G0[C],o;const k=va(e.type)?va(e.type):va("node"),S=yield QQ(k),E=as(c,t,n);o=C5(S,E,n?"#182628":"#fff"),o="data:image/svg+xml,"+encodeURIComponent(o),G0[C]=o}return o})}const W7e="",W0={inject:["levelList","getDarkMode"],props:{nodeInfo:{type:Object,default:()=>{}}},data(){return{imgUrl:"",strokeColor:""}},computed:{darkMode(){return this.getDarkMode()},isCountryFlag(){var r,o,a,c,l,d,u,f;const e=(a=(o=(r=this.nodeInfo)==null?void 0:r.detail)==null?void 0:o.info)==null?void 0:a.inner_country,t=(u=(d=(l=(c=this.nodeInfo)==null?void 0:c.detail)==null?void 0:l.info)==null?void 0:d.basic)==null?void 0:u.flag,n=(f=this.nodeInfo)==null?void 0:f.type;return t&&(n==="ip"||n==="internet")||e&&(n==="country"||n==="target_country")}},watch:{darkMode:{handler(){this.handleImgUrl()}},nodeInfo:{handler(){this.handleImgUrl()},deep:!0}},created(){this.handleImgUrl()},methods:{handleImgUrl(){var t,n,r,o;ZQ({node:this.nodeInfo,levelList:this.levelList,darkMode:this.darkMode}).then(a=>{this.imgUrl=a});const e=(o=(r=(n=(t=this.nodeInfo)==null?void 0:t.detail)==null?void 0:n.info)==null?void 0:r.basic)==null?void 0:o.level;this.strokeColor=as(e,this.levelList,this.darkMode)}}},x5=()=>{s.useCssVars(e=>({"20587f86":e.strokeColor}))},k5=W0.setup;W0.setup=k5?(e,t)=>(x5(),k5(e,t)):x5;const VQ=W0,eZ={key:0,class:"flag-border"},tZ=["src"],nZ=["src"];function rZ(e,t,n,r,o,a){return a.isCountryFlag?(s.openBlock(),s.createElementBlock("div",eZ,[s.createElementVNode("img",{class:"node-img",src:o.imgUrl},null,8,tZ)])):(s.openBlock(),s.createElementBlock("img",{key:1,class:"node-img",src:o.imgUrl},null,8,nZ))}const lf=Bt(VQ,[["render",rZ],["__scopeId","data-v-5fdfe48e"]]),jr={computed:{imgPath(){let e={};return e=m5,e}}},qe={},K0=xn.reactive({filterValues:""}),Y0={name:"fix_nodes",namec:"固定节点"},J0={name:"un_fix_nodes",namec:"解除固定"},iZ={name:"show_names",namec:"显示名称"},oZ={name:"un_show_names",namec:"隐藏名称"},sZ={name:"un_show_label",namec:"隐藏备注"},aZ={name:"show_label",namec:"显示备注"},N5={name:"hold_aggregation",namec:"单边子顶点聚合"},T5={name:"release_aggregation",namec:"聚合顶点释放"},lZ={name:"copy",namec:"复制"},A5={name:"node_star",namec:"收藏"},O5={name:"un_node_star",namec:"取消收藏"},I5={name:"edit_label",namec:"修改备注"},X0={name:"delete_node",namec:"删除"},R5={name:"select_children",namec:"子顶点选择"},P5={name:"select_parents",namec:"父顶点选择"},cZ={name:"add_con_node",namec:"添加关联节点"},dZ={name:"expand_node",namec:"展开全部关系"};function cf(e){var l;const t=[],n=[],r=[],o=["APT攻击","海莲花","Generic","Cometer","勒索软件","恶意下载链接","僵尸网络","后门软件","流氓推广","Ewind","alexa_top10k","Panda","Operation_2020_Model","Zenpak","Ewind","Boogr"],a=["APT-C-00","Trojan","木马"],c=e.length;for(let d=0;d<c;d++)o.includes((l=e[d])==null?void 0:l.name)?(e[d].typeLevel="danger",t.push(e[d])):e[d].name.toLowerCase().indexOf("cve")===0?(e[d].typeLevel="cve",n.push(e[d])):a.some(u=>e[d].name.indexOf(u)>=0)?(e[d].typeLevel="danger",t.push(e[d])):(e[d].typeLevel="other",r.push(e[d]));return[...t,...n,...r]}function df(e){if(!e)return[];const t=[void 0,"danger","warning","info","success",void 0],n=[],r=[];return e.forEach(o=>{let a,c,l,d,u,f;typeof o=="object"?(a=o.name||o.tag,c=o.desc,l=o.user||void 0,d=o.type>0?t[o.type]||t[o.type-10]:void 0,f=o.type>=10,u=o.source_name?o.source_name:""):(a=o,c=""),r.indexOf(a)<0&&(r.push(a),n.push({name:a,desc:c,user:l,type:d,disabled:f,source_name:u}))}),n}var Q0={},uZ={get exports(){return Q0},set exports(e){Q0=e}};/*!
102
102
  * clipboard.js v2.0.11
103
103
  * https://clipboardjs.com/
104
104
  *
@@ -131,7 +131,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
131
131
 
132
132
  `,n=this.file.split(t);let r=[];for(let o=0;o<n.length;o++){const a=o===n.length-1?n[o]:this.manageEntityFieldsSpace(n[o]),c=Ure.parse(a,{columns:!0,from:2});r=[...r,...c]}return r=this.reverseSpecialValue(r),r}manageEntityFieldsSpace(t){const n=t.split(`\r
133
133
  `),r=n[0].split(",").length;let o=0,a=[];return a=n.map(c=>(c=this.manageSpecialValue(c),o=r-c.split(",").length,o>0?c.split(",").concat(new Array(o)).join():c)),a.join(`\r
134
- `)}manageSpecialValue(t){t=t.replace(/"{2,}/g,"");const n=/"{1}[^"]*"{1}/g,r=t.match(n);return r!==null&&r.map(o=>(t=t.replace(o,o.replace(/,/g,Ev)),o.replace(/,/g,Ev))),t}reverseSpecialValue(t){const n=new RegExp(Ev,"g");return t.map(r=>{for(const o in r){const a=r[o].replace(n,",");r[o]=a}return r})}convertToGraphData(t){const n=[];let r=t.filter(a=>a.Label===void 0),o=t.filter(a=>a.Label!==void 0);return r=r.map(a=>this.getGraphNode(a)),o=o.map((a,c)=>{const l="Source Entity ID",d="Target Entity ID",u="Label",f=this.getNode(a[l],r)[0],p=this.getNode(a[d],r)[0];return a[u]!==""&&n.push({id:p.id,label:a[u]}),{source:f.id,target:p.id,type:f.type+"-"+p.type,uniqueIndex:c}}),r=r.map(a=>(delete a.entityId,n.map(c=>{c.id===a.id&&(a.name=c.label)}),a)),{nodes:r,links:o}}getGraphNode(t){const n=CC.nodeMapReverse,r=bv.entitys;let o="",a="",c="",l=null,d=null;return r.map(u=>{const f=u.type,p=u.columnsFields[1];t[f]!==void 0&&(a=n[f],o=t[p],c=t[f],l=this.manageNodeDetail(u.columnsFields,t,n[f]),d=this.manageNodeFieldMap(n[f]))}),{id:o,type:a,name:o,entityId:c,detail:l,fieldMap:d,show:!0}}manageNodeFieldMap(t){return this.fieldMap[t]}manageNodeDetail(t,n,r){let o=null,a=!1;if(r!=="nodeType"){o={info:{basic:{}},tags:[]};for(const c in n)if(t.indexOf(c)===-1){a=!0;const l=n[c];c==="tags"&&l!==""?o.tags=l.split(",").map(d=>({name:d,desc:d})):o.info.basic[c]=n[c]}a===!1&&(o=null)}return o}getNode(t,n){return n.filter(r=>r.entityId===t)}outputData(){return this.data}}const _Ne="",qre={name:"ButtonList",components:{"force-graph-svg-icon":ss,addNode:$ne,addLink:qne,intro:Qne,UploadFilled:sj},mixins:[jr],props:{hideButtonList:{type:Array,default:()=>[]},selection:{type:Array,default:()=>[]},history:{type:Object,default:()=>({dataNow:{}})},moduleDetail:{type:Object,default:()=>{}},requestGraphData:{type:Boolean,default:!0}},emits:["fixNodes","toggleLayout","addNodes","addLink","importCsvData","autoDisplay","toggleMove","deleteNodes","saveSnapshot"],data(){return{maxTrans:0,nowTrans:0,onceTrans:300,dialogVisible:!1,exportFormat:0,formatOptions:[{value:0,label:"JSON"},{value:2,label:"CSV"}],isAllFix:!1,dialogImportVisible:!1,importFileList:[],importFile:null,intro:!1,current:null,addType:"",flageAlias:!0}},computed:{buttonList(){var e,t;return[{hover:!1,icon:"hm_icon_add",disable:!this.requestGraphData,fun:this.addNode,name:"新增节点",params:"diy"},{hover:!1,icon:"hm_icon_del",disable:this.selection.length===0||!this.requestGraphData,fun:this.deleteNodes,name:"删除"},{hover:!1,icon:"hm_icon_snapshot",disable:!this.requestGraphData,fun:this.addSnapshot,name:"保存快照",hide:!((t=(e=this.moduleDetail)==null?void 0:e.config)!=null&&t.hasSnapshot)},{hover:!1,icon:"hm_icon_img",disable:!this.requestGraphData,fun:this.saveAsImg,name:"保存图片"},{hover:!1,icon:"hm_icon_export",disable:!this.requestGraphData,fun:this.exportData,name:"数据导出"},{hover:!1,icon:"hm_icon_import",disable:!this.requestGraphData,fun:this.importData,name:"数据导入"},{hover:!1,icon:"hm_icon_undo",disable:this.history.currentIndex<=0||!this.requestGraphData,fun:this.backHistory,name:"撤销"},{hover:!1,icon:"hm_icon_redo",disable:this.history.currentIndex>=this.history.length-1||!this.requestGraphData,fun:this.forwardHistory,name:"恢复"},{hover:!1,icon:"hm_icon_auto",fun:this.autoDisplay,name:"自动布局"},{hover:!1,icon:"hm_icon_fix",fun:this.fixNodes,name:"全局固定",params:!0,hide:this.isAllFix},{hover:!1,icon:"hm_icon_unfix",fun:this.fixNodes,name:"全局解除固定",params:!1,hide:!this.isAllFix},{hover:!1,icon:"hm_icon_tree",fun:this.toggleLayout,name:"树型布局",params:1,hide:this.history.layoutIndex===1},{hover:!1,icon:"hm_icon_force",fun:this.toggleLayout,name:"斥力布局",params:0,hide:this.history.layoutIndex===0}]},buttonListShow(){return this.buttonList.filter(e=>e.hide!==!0&&!this.hideButtonList.includes(e.name))}},mounted(){},methods:{hover(e){this.current=e},out(){this.current=null},autoDisplay(){ye(this,"autoDisplay")},fixNodes(e=!0){ye(this,"fixNodes",e),this.isAllFix=e},toggleMove(){ye(this,"toggleMove")},toggleLayout(e){ye(this,"toggleLayout",e)},addNode(e,t){this.addType=e,this.$refs.addNode.show(t)},addNodes({node:e,type:t,connectNode:n}){ye(this,"addNodes",{node:e,type:t,connectNode:n})},addLink({source:e,target:t}){ye(this,"addLink",{source:e,target:t})},backHistory(){this.$parent.historyBack()},forwardHistory(){this.history.forward()},dataURLToBlob(e){const t=e.split(","),n=t[0].match(/:(.*?);/)[1],r=atob(t[1]);let o=r.length;const a=new Uint8Array(o);for(;o--;)a[o]=r.charCodeAt(o);return new Blob([a],{type:n})},downloadURI(e,t){const n=document.createElement("a");n.download=t,n.href=e,document.body.appendChild(n),n.click(),document.body.removeChild(n)},saveAsImg(){return Te(this,null,function*(){var t,n;this.$parent.bigLoading=!0;const e=yield this.svgToUrl();this.downloadURI(e,`${((n=(t=this.history.dataNow)==null?void 0:t.nodes[0])==null?void 0:n.id)||"img"}_${new Date().getTime()}.png`),this.$parent.bigLoading=!1})},svgToUrl(){return Te(this,null,function*(){this.$parent.centerAndZoom(),this.$parent.addCanvasBg();const t=this.$parent.getCanvasStage().toDataURL({mimeType:"image/png"});return this.$parent.removeCanvasBg(),this.$parent.reset(),t})},svgToBlob(){return Te(this,null,function*(){this.$parent.centerAndZoom(),this.$parent.addCanvasBg();const t=yield this.$parent.getCanvasStage().toBlob();return this.$parent.removeCanvasBg(),this.$parent.reset(),t})},deleteNodes(){ye(this,"deleteNodes")},addSnapshot(){ye(this,"saveSnapshot")},exportData(){this.handleOpenModal()},handleOpenModal(){this.dialogVisible=!0},handleCloseModal(){this.dialogVisible=!1},handleExportData(){var c,l,d,u;let e=null,t=null,n=null,r=null;this.selection.length>0?(n=s.toRaw(this.selection),r=[]):(n=s.toRaw(this.history.dataNow.nodes),r=s.toRaw(this.history.dataNow.links));const o=n.map(f=>{const{id:p,type:h,detail:m}=f;return{id:p,type:h,detail:m}}),a=r.map(f=>{const{source:p,target:h}=f;return{source:p,target:h}});this.exportFormat===0?(e=JSON.stringify(o),t=`${((l=(c=this.history.dataNow)==null?void 0:c.nodes[0])==null?void 0:l.id)||"file"}_${new Date().getTime()}.json`):(e=this.setMalteGoCsv({nodes:o,links:a}),t=`${((u=(d=this.history.dataNow)==null?void 0:d.nodes[0])==null?void 0:u.id)||"file"}_${new Date().getTime()}.csv`),YQ(e,t),this.handleCloseModal()},importData(){this.handleOpenImportModal()},handleOpenImportModal(){this.dialogImportVisible=!0},handleCloseImportModal(){this.dialogImportVisible=!1,this.importFileList=[],this.importFile=null},handleImportData(){try{const e=this.getFieldMap(),n=new jre(this.importFile,e).outputData();ye(this,"importCsvData",{nodes:n.nodes,links:n.links})}catch(e){Lt({message:e,type:"error"})}this.handleCloseImportModal()},getFieldMap(){const e=this.moduleDetail.detail_field_map,t={};for(const n in e){const r=n.substring(0,n.indexOf("_detail_info"));t[r]=JSON.parse(JSON.stringify(e[n]))}return t},handleFileChange(e){this.importFile=e;const t=new FileReader;t.onload=()=>{t.result&&(this.importFile=t.result)},t.readAsText(e.raw)},handleFileRemove(){this.importFile=null,this.importFileList=[]},setMalteGoCsv(e){return new Vne(e).outputCsvFile()},showIntro(){this.intro=!0},hideIntro(){this.intro=!1},handleAlias(e){this.flageAlias=!e;const t=document.getElementsByClassName("right-menu-box")[0],n=document.getElementsByClassName("graph-box")[0];t&&(e?(t.style.display="none",n.style.width="100%"):(t.style.display="inline-block",n.style.width="1%"))},permissionitem(){return this.requestGraphData?!0:(Lt({message:"无可操作权限",type:"warning"}),!1)},handleIconClick(e){this.permissionitem()&&(en({cId:"buttonList-"+e.icon,c:"顶部按钮-"+e.name}),e.fun(e.params))}}},Hre={class:"button-container"},Gre={ref:"container",class:"button-box"},Wre={ref:"box",class:"all-button"},Kre=["onClick"],Yre={class:"float-right"},Jre={class:"button-one intro-button"},Xre={class:"dialog-footer"},Qre=s.createElementVNode("div",{class:"el-upload__text"},[s.createTextVNode("将文件拖到此处,或"),s.createElementVNode("em",null,"点击上传")],-1),Zre=s.createElementVNode("div",{class:"el-upload__tip"},"只能上传由 Maltego 软件导出的csv文件",-1),Vre={class:"dialog-footer"},eie={class:"intro"};function tie(e,t,n,r,o,a){const c=s.resolveComponent("force-graph-svg-icon"),l=Hn,d=s.resolveComponent("intro"),u=iJ,f=ef,p=Vu,h=ns,m=kc,b=s.resolveComponent("UploadFilled"),w=Qe,_=eQ,C=s.resolveComponent("addNode"),k=s.resolveComponent("addLink");return s.openBlock(),s.createElementBlock("div",Hre,[s.createElementVNode("div",Gre,[s.createElementVNode("div",Wre,[s.createElementVNode("div",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.buttonListShow,(S,E)=>(s.openBlock(),s.createBlock(l,{key:E,class:"item",effect:"dark",content:S.name,placement:"bottom","popper-class":"el-tooltip-gray"},{default:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass(["img-box","button-one "+(S.disable?"disabled":"")]),onClick:T=>a.handleIconClick(S)},[s.createVNode(c,{class:"button-img","icon-class":e.imgPath["./public/d3svg1/button22/"+S.icon+".svg"]},null,8,["icon-class"])],10,Kre)]),_:2},1032,["content"]))),128))]),s.createElementVNode("div",Yre,[n.hideButtonList.includes("功能介绍")?s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(u,{key:0,placement:"bottom-end",width:"auto",trigger:"hover"},{reference:s.withCtx(()=>[s.createElementVNode("div",Jre,[s.createVNode(l,{class:"item",effect:"dark",content:"功能介绍",placement:"bottom","popper-class":"el-tooltip-gray"},{default:s.withCtx(()=>[s.createVNode(c,{class:"button-img","icon-class":e.imgPath["./public/d3svg1/button22/hm_icon_help.svg"]},null,8,["icon-class"])]),_:1})])]),default:s.withCtx(()=>[s.createVNode(d,{config:n.moduleDetail.config||{}},null,8,["config"])]),_:1})),n.hideButtonList.includes("展开折叠")?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("div",{key:1,class:"button-one intro-button",onClick:t[0]||(t[0]=S=>a.handleAlias(o.flageAlias)),onMouseenter:t[1]||(t[1]=S=>a.hover(a.buttonList.length+1)),onMouseleave:t[2]||(t[2]=S=>a.out())},[s.createVNode(l,{class:"item",effect:"dark",content:o.flageAlias?"右侧折叠":"右侧展开",placement:"bottom","popper-class":"el-tooltip-gray"},{default:s.withCtx(()=>[s.createVNode(c,{class:"button-img","icon-class":e.imgPath[o.flageAlias?"./public/d3svg1/button22/hm_icon_alias_colse.svg":"./public/d3svg1/button22/hm_icon_alias.svg"]},null,8,["icon-class"])]),_:1},8,["content"])],32))])],512)],512),s.createVNode(m,{modelValue:o.dialogVisible,"onUpdate:modelValue":t[4]||(t[4]=S=>o.dialogVisible=S),title:"选择导出数据格式","append-to-body":"",width:"400px","before-close":a.handleCloseModal,class:"el-dialog-graph"},{footer:s.withCtx(()=>[s.createElementVNode("span",Xre,[s.createVNode(h,{onClick:a.handleCloseModal},{default:s.withCtx(()=>[s.createTextVNode("取 消")]),_:1},8,["onClick"]),s.createVNode(h,{type:"primary",onClick:a.handleExportData},{default:s.withCtx(()=>[s.createTextVNode("导 出")]),_:1},8,["onClick"])])]),default:s.withCtx(()=>[s.createVNode(p,{modelValue:o.exportFormat,"onUpdate:modelValue":t[3]||(t[3]=S=>o.exportFormat=S),placeholder:"请选择导出数据格式"},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(o.formatOptions,S=>(s.openBlock(),s.createBlock(f,{key:S.value,label:S.label,value:S.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["modelValue","before-close"]),s.createVNode(m,{modelValue:o.dialogImportVisible,"onUpdate:modelValue":t[5]||(t[5]=S=>o.dialogImportVisible=S),title:"导入数据","append-to-body":"",width:"400px","before-close":a.handleCloseImportModal,class:"el-dialog-graph"},{footer:s.withCtx(()=>[s.createElementVNode("span",Vre,[s.createVNode(h,{onClick:a.handleCloseImportModal},{default:s.withCtx(()=>[s.createTextVNode("取 消")]),_:1},8,["onClick"]),s.createVNode(h,{type:"primary",disabled:!o.importFile,onClick:a.handleImportData},{default:s.withCtx(()=>[s.createTextVNode("导 入")]),_:1},8,["disabled","onClick"])])]),default:s.withCtx(()=>[s.createVNode(_,{drag:"",action:"#","auto-upload":!1,accept:".csv","file-list":o.importFileList,"on-change":a.handleFileChange,"on-remove":a.handleFileRemove},{tip:s.withCtx(()=>[Zre]),default:s.withCtx(()=>[s.createVNode(w,{class:"el-icon-upload"},{default:s.withCtx(()=>[s.createVNode(b)]),_:1}),Qre]),_:1},8,["file-list","on-change","on-remove"])]),_:1},8,["modelValue","before-close"]),s.createVNode(C,{ref:"addNode","nodes-type":n.moduleDetail&&n.moduleDetail.nodes||[],"add-type":o.addType,onAddNodes:a.addNodes},null,8,["nodes-type","add-type","onAddNodes"]),s.createVNode(k,{ref:"addLink",onAddLink:a.addLink},null,8,["onAddLink"]),s.withDirectives(s.createElementVNode("div",eie,[s.createVNode(d,{config:n.moduleDetail.config||{},onMouseenter:a.showIntro,onMouseleave:a.hideIntro},null,8,["config","onMouseenter","onMouseleave"])],512),[[s.vShow,o.intro]])])}const nie=Bt(qre,[["render",tie]]);var Sf={},rie={get exports(){return Sf},set exports(e){Sf=e}},xv={},lt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._registerNode=e.Konva=e.glob=void 0;var t=Math.PI/180;function n(){return typeof window!="undefined"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}e.glob=typeof ao!="undefined"?ao:typeof window!="undefined"?window:typeof WorkerGlobalScope!="undefined"?self:{},e.Konva={_global:e.glob,version:"9.2.0",isBrowser:n(),isUnminified:/param/.test(function(o){}.toString()),dblClickWindow:400,getAngle(o){return e.Konva.angleDeg?o*t:o},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window!="undefined"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return e.Konva.DD.isDragging},isDragReady(){return!!e.Konva.DD.node},releaseCanvasOnDestroy:!0,document:e.glob.document,_injectGlobal(o){e.glob.Konva=o}};const r=o=>{e.Konva[o.prototype.getClassName()]=o};e._registerNode=r,e.Konva._injectGlobal(e.Konva)})(lt);var qt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Util=e.Transform=void 0;const t=lt;class n{constructor(E=[1,0,0,1,0,0]){this.dirty=!1,this.m=E&&E.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new n(this.m)}copyInto(E){E.m[0]=this.m[0],E.m[1]=this.m[1],E.m[2]=this.m[2],E.m[3]=this.m[3],E.m[4]=this.m[4],E.m[5]=this.m[5]}point(E){var T=this.m;return{x:T[0]*E.x+T[2]*E.y+T[4],y:T[1]*E.x+T[3]*E.y+T[5]}}translate(E,T){return this.m[4]+=this.m[0]*E+this.m[2]*T,this.m[5]+=this.m[1]*E+this.m[3]*T,this}scale(E,T){return this.m[0]*=E,this.m[1]*=E,this.m[2]*=T,this.m[3]*=T,this}rotate(E){var T=Math.cos(E),A=Math.sin(E),O=this.m[0]*T+this.m[2]*A,I=this.m[1]*T+this.m[3]*A,F=this.m[0]*-A+this.m[2]*T,R=this.m[1]*-A+this.m[3]*T;return this.m[0]=O,this.m[1]=I,this.m[2]=F,this.m[3]=R,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(E,T){var A=this.m[0]+this.m[2]*T,O=this.m[1]+this.m[3]*T,I=this.m[2]+this.m[0]*E,F=this.m[3]+this.m[1]*E;return this.m[0]=A,this.m[1]=O,this.m[2]=I,this.m[3]=F,this}multiply(E){var T=this.m[0]*E.m[0]+this.m[2]*E.m[1],A=this.m[1]*E.m[0]+this.m[3]*E.m[1],O=this.m[0]*E.m[2]+this.m[2]*E.m[3],I=this.m[1]*E.m[2]+this.m[3]*E.m[3],F=this.m[0]*E.m[4]+this.m[2]*E.m[5]+this.m[4],R=this.m[1]*E.m[4]+this.m[3]*E.m[5]+this.m[5];return this.m[0]=T,this.m[1]=A,this.m[2]=O,this.m[3]=I,this.m[4]=F,this.m[5]=R,this}invert(){var E=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),T=this.m[3]*E,A=-this.m[1]*E,O=-this.m[2]*E,I=this.m[0]*E,F=E*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),R=E*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=T,this.m[1]=A,this.m[2]=O,this.m[3]=I,this.m[4]=F,this.m[5]=R,this}getMatrix(){return this.m}decompose(){var E=this.m[0],T=this.m[1],A=this.m[2],O=this.m[3],I=this.m[4],F=this.m[5],R=E*O-T*A;let q={x:I,y:F,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(E!=0||T!=0){var z=Math.sqrt(E*E+T*T);q.rotation=T>0?Math.acos(E/z):-Math.acos(E/z),q.scaleX=z,q.scaleY=R/z,q.skewX=(E*A+T*O)/R,q.skewY=0}else if(A!=0||O!=0){var G=Math.sqrt(A*A+O*O);q.rotation=Math.PI/2-(O>0?Math.acos(-A/G):-Math.acos(A/G)),q.scaleX=R/G,q.scaleY=G,q.skewX=0,q.skewY=(E*A+T*O)/R}return q.rotation=e.Util._getRotation(q.rotation),q}}e.Transform=n;var r="[object Array]",o="[object Number]",a="[object String]",c="[object Boolean]",l=Math.PI/180,d=180/Math.PI,u="#",f="",p="0",h="Konva warning: ",m="Konva error: ",b="rgb(",w={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},_=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,C=[];const k=typeof requestAnimationFrame!="undefined"&&requestAnimationFrame||function(S){setTimeout(S,60)};e.Util={_isElement(S){return!!(S&&S.nodeType==1)},_isFunction(S){return!!(S&&S.constructor&&S.call&&S.apply)},_isPlainObject(S){return!!S&&S.constructor===Object},_isArray(S){return Object.prototype.toString.call(S)===r},_isNumber(S){return Object.prototype.toString.call(S)===o&&!isNaN(S)&&isFinite(S)},_isString(S){return Object.prototype.toString.call(S)===a},_isBoolean(S){return Object.prototype.toString.call(S)===c},isObject(S){return S instanceof Object},isValidSelector(S){if(typeof S!="string")return!1;var E=S[0];return E==="#"||E==="."||E===E.toUpperCase()},_sign(S){return S===0||S>0?1:-1},requestAnimFrame(S){C.push(S),C.length===1&&k(function(){const E=C;C=[],E.forEach(function(T){T()})})},createCanvasElement(){var S=document.createElement("canvas");try{S.style=S.style||{}}catch(E){}return S},createImageElement(){return document.createElement("img")},_isInDocument(S){for(;S=S.parentNode;)if(S==document)return!0;return!1},_urlToImage(S,E){var T=e.Util.createImageElement();T.onload=function(){E(T)},T.src=S},_rgbToHex(S,E,T){return((1<<24)+(S<<16)+(E<<8)+T).toString(16).slice(1)},_hexToRgb(S){S=S.replace(u,f);var E=parseInt(S,16);return{r:E>>16&255,g:E>>8&255,b:E&255}},getRandomColor(){for(var S=(Math.random()*16777215<<0).toString(16);S.length<6;)S=p+S;return u+S},getRGB(S){var E;return S in w?(E=w[S],{r:E[0],g:E[1],b:E[2]}):S[0]===u?this._hexToRgb(S.substring(1)):S.substr(0,4)===b?(E=_.exec(S.replace(/ /g,"")),{r:parseInt(E[1],10),g:parseInt(E[2],10),b:parseInt(E[3],10)}):{r:0,g:0,b:0}},colorToRGBA(S){return S=S||"black",e.Util._namedColorToRBA(S)||e.Util._hex3ColorToRGBA(S)||e.Util._hex4ColorToRGBA(S)||e.Util._hex6ColorToRGBA(S)||e.Util._hex8ColorToRGBA(S)||e.Util._rgbColorToRGBA(S)||e.Util._rgbaColorToRGBA(S)||e.Util._hslColorToRGBA(S)},_namedColorToRBA(S){var E=w[S.toLowerCase()];return E?{r:E[0],g:E[1],b:E[2],a:1}:null},_rgbColorToRGBA(S){if(S.indexOf("rgb(")===0){S=S.match(/rgb\(([^)]+)\)/)[1];var E=S.split(/ *, */).map(Number);return{r:E[0],g:E[1],b:E[2],a:1}}},_rgbaColorToRGBA(S){if(S.indexOf("rgba(")===0){S=S.match(/rgba\(([^)]+)\)/)[1];var E=S.split(/ *, */).map((T,A)=>T.slice(-1)==="%"?A===3?parseInt(T)/100:parseInt(T)/100*255:Number(T));return{r:E[0],g:E[1],b:E[2],a:E[3]}}},_hex8ColorToRGBA(S){if(S[0]==="#"&&S.length===9)return{r:parseInt(S.slice(1,3),16),g:parseInt(S.slice(3,5),16),b:parseInt(S.slice(5,7),16),a:parseInt(S.slice(7,9),16)/255}},_hex6ColorToRGBA(S){if(S[0]==="#"&&S.length===7)return{r:parseInt(S.slice(1,3),16),g:parseInt(S.slice(3,5),16),b:parseInt(S.slice(5,7),16),a:1}},_hex4ColorToRGBA(S){if(S[0]==="#"&&S.length===5)return{r:parseInt(S[1]+S[1],16),g:parseInt(S[2]+S[2],16),b:parseInt(S[3]+S[3],16),a:parseInt(S[4]+S[4],16)/255}},_hex3ColorToRGBA(S){if(S[0]==="#"&&S.length===4)return{r:parseInt(S[1]+S[1],16),g:parseInt(S[2]+S[2],16),b:parseInt(S[3]+S[3],16),a:1}},_hslColorToRGBA(S){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(S)){const[E,...T]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(S),A=Number(T[0])/360,O=Number(T[1])/100,I=Number(T[2])/100;let F,R,q;if(O===0)return q=I*255,{r:Math.round(q),g:Math.round(q),b:Math.round(q),a:1};I<.5?F=I*(1+O):F=I+O-I*O;const z=2*I-F,G=[0,0,0];for(let Y=0;Y<3;Y++)R=A+1/3*-(Y-1),R<0&&R++,R>1&&R--,6*R<1?q=z+(F-z)*6*R:2*R<1?q=F:3*R<2?q=z+(F-z)*(2/3-R)*6:q=z,G[Y]=q*255;return{r:Math.round(G[0]),g:Math.round(G[1]),b:Math.round(G[2]),a:1}}},haveIntersection(S,E){return!(E.x>S.x+S.width||E.x+E.width<S.x||E.y>S.y+S.height||E.y+E.height<S.y)},cloneObject(S){var E={};for(var T in S)this._isPlainObject(S[T])?E[T]=this.cloneObject(S[T]):this._isArray(S[T])?E[T]=this.cloneArray(S[T]):E[T]=S[T];return E},cloneArray(S){return S.slice(0)},degToRad(S){return S*l},radToDeg(S){return S*d},_degToRad(S){return e.Util.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),e.Util.degToRad(S)},_radToDeg(S){return e.Util.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),e.Util.radToDeg(S)},_getRotation(S){return t.Konva.angleDeg?e.Util.radToDeg(S):S},_capitalize(S){return S.charAt(0).toUpperCase()+S.slice(1)},throw(S){throw new Error(m+S)},error(S){console.error(m+S)},warn(S){t.Konva.showWarnings&&console.warn(h+S)},each(S,E){for(var T in S)E(T,S[T])},_inRange(S,E,T){return E<=S&&S<T},_getProjectionToSegment(S,E,T,A,O,I){var F,R,q,z=(S-T)*(S-T)+(E-A)*(E-A);if(z==0)F=S,R=E,q=(O-T)*(O-T)+(I-A)*(I-A);else{var G=((O-S)*(T-S)+(I-E)*(A-E))/z;G<0?(F=S,R=E,q=(S-O)*(S-O)+(E-I)*(E-I)):G>1?(F=T,R=A,q=(T-O)*(T-O)+(A-I)*(A-I)):(F=S+G*(T-S),R=E+G*(A-E),q=(F-O)*(F-O)+(R-I)*(R-I))}return[F,R,q]},_getProjectionToLine(S,E,T){var A=e.Util.cloneObject(S),O=Number.MAX_VALUE;return E.forEach(function(I,F){if(!(!T&&F===E.length-1)){var R=E[(F+1)%E.length],q=e.Util._getProjectionToSegment(I.x,I.y,R.x,R.y,S.x,S.y),z=q[0],G=q[1],Y=q[2];Y<O&&(A.x=z,A.y=G,O=Y)}}),A},_prepareArrayForTween(S,E,T){var A,O=[],I=[];if(S.length>E.length){var F=E;E=S,S=F}for(A=0;A<S.length;A+=2)O.push({x:S[A],y:S[A+1]});for(A=0;A<E.length;A+=2)I.push({x:E[A],y:E[A+1]});var R=[];return I.forEach(function(q){var z=e.Util._getProjectionToLine(q,O,T);R.push(z.x),R.push(z.y)}),R},_prepareToStringify(S){var E;S.visitedByCircularReferenceRemoval=!0;for(var T in S)if(S.hasOwnProperty(T)&&S[T]&&typeof S[T]=="object"){if(E=Object.getOwnPropertyDescriptor(S,T),S[T].visitedByCircularReferenceRemoval||e.Util._isElement(S[T]))if(E.configurable)delete S[T];else return null;else if(e.Util._prepareToStringify(S[T])===null)if(E.configurable)delete S[T];else return null}return delete S.visitedByCircularReferenceRemoval,S},_assign(S,E){for(var T in E)S[T]=E[T];return S},_getFirstPointerId(S){return S.touches?S.changedTouches[0].identifier:S.pointerId||999},releaseCanvas(...S){t.Konva.releaseCanvasOnDestroy&&S.forEach(E=>{E.width=0,E.height=0})},drawRoundedRectPath(S,E,T,A){let O=0,I=0,F=0,R=0;typeof A=="number"?O=I=F=R=Math.min(A,E/2,T/2):(O=Math.min(A[0]||0,E/2,T/2),I=Math.min(A[1]||0,E/2,T/2),R=Math.min(A[2]||0,E/2,T/2),F=Math.min(A[3]||0,E/2,T/2)),S.moveTo(O,0),S.lineTo(E-I,0),S.arc(E-I,I,I,Math.PI*3/2,0,!1),S.lineTo(E,T-R),S.arc(E-R,T-R,R,0,Math.PI/2,!1),S.lineTo(F,T),S.arc(F,T-F,F,Math.PI/2,Math.PI,!1),S.lineTo(0,O),S.arc(O,O,O,Math.PI,Math.PI*3/2,!1)}}})(qt);var po={},Sn={},We={};Object.defineProperty(We,"__esModule",{value:!0}),We.getComponentValidator=We.getBooleanValidator=We.getNumberArrayValidator=We.getFunctionValidator=We.getStringOrGradientValidator=We.getStringValidator=We.getNumberOrAutoValidator=We.getNumberOrArrayOfNumbersValidator=We.getNumberValidator=We.alphaComponent=We.RGBComponent=void 0;const Si=lt,bt=qt;function Ei(e){return bt.Util._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||bt.Util._isBoolean(e)?e:Object.prototype.toString.call(e)}function iie(e){return e>255?255:e<0?0:Math.round(e)}We.RGBComponent=iie;function oie(e){return e>1?1:e<1e-4?1e-4:e}We.alphaComponent=oie;function sie(){if(Si.Konva.isUnminified)return function(e,t){return bt.Util._isNumber(e)||bt.Util.warn(Ei(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}We.getNumberValidator=sie;function aie(e){if(Si.Konva.isUnminified)return function(t,n){let r=bt.Util._isNumber(t),o=bt.Util._isArray(t)&&t.length==e;return!r&&!o&&bt.Util.warn(Ei(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array<number>('+e+")"),t}}We.getNumberOrArrayOfNumbersValidator=aie;function lie(){if(Si.Konva.isUnminified)return function(e,t){var n=bt.Util._isNumber(e),r=e==="auto";return n||r||bt.Util.warn(Ei(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}We.getNumberOrAutoValidator=lie;function cie(){if(Si.Konva.isUnminified)return function(e,t){return bt.Util._isString(e)||bt.Util.warn(Ei(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}We.getStringValidator=cie;function die(){if(Si.Konva.isUnminified)return function(e,t){const n=bt.Util._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||bt.Util.warn(Ei(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}We.getStringOrGradientValidator=die;function uie(){if(Si.Konva.isUnminified)return function(e,t){return bt.Util._isFunction(e)||bt.Util.warn(Ei(e)+' is a not valid value for "'+t+'" attribute. The value should be a function.'),e}}We.getFunctionValidator=uie;function fie(){if(Si.Konva.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(bt.Util._isArray(e)?e.forEach(function(r){bt.Util._isNumber(r)||bt.Util.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):bt.Util.warn(Ei(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}We.getNumberArrayValidator=fie;function hie(){if(Si.Konva.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||bt.Util.warn(Ei(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}We.getBooleanValidator=hie;function pie(e){if(Si.Konva.isUnminified)return function(t,n){return t==null||bt.Util.isObject(t)||bt.Util.warn(Ei(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}We.getComponentValidator=pie,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Factory=void 0;const t=qt,n=We;var r="get",o="set";e.Factory={addGetterSetter(a,c,l,d,u){e.Factory.addGetter(a,c,l),e.Factory.addSetter(a,c,d,u),e.Factory.addOverloadedGetterSetter(a,c)},addGetter(a,c,l){var d=r+t.Util._capitalize(c);a.prototype[d]=a.prototype[d]||function(){var u=this.attrs[c];return u===void 0?l:u}},addSetter(a,c,l,d){var u=o+t.Util._capitalize(c);a.prototype[u]||e.Factory.overWriteSetter(a,c,l,d)},overWriteSetter(a,c,l,d){var u=o+t.Util._capitalize(c);a.prototype[u]=function(f){return l&&f!==void 0&&f!==null&&(f=l.call(this,f,c)),this._setAttr(c,f),d&&d.call(this),this}},addComponentsGetterSetter(a,c,l,d,u){var f=l.length,p=t.Util._capitalize,h=r+p(c),m=o+p(c),b,w;a.prototype[h]=function(){var C={};for(b=0;b<f;b++)w=l[b],C[w]=this.getAttr(c+p(w));return C};var _=(0,n.getComponentValidator)(l);a.prototype[m]=function(C){var k=this.attrs[c],S;d&&(C=d.call(this,C)),_&&_.call(this,C,c);for(S in C)C.hasOwnProperty(S)&&this._setAttr(c+p(S),C[S]);return C||l.forEach(E=>{this._setAttr(c+p(E),void 0)}),this._fireChangeEvent(c,k,C),u&&u.call(this),this},e.Factory.addOverloadedGetterSetter(a,c)},addOverloadedGetterSetter(a,c){var l=t.Util._capitalize(c),d=o+l,u=r+l;a.prototype[c]=function(){return arguments.length?(this[d](arguments[0]),this):this[u]()}},addDeprecatedGetterSetter(a,c,l,d){t.Util.error("Adding deprecated "+c);var u=r+t.Util._capitalize(c),f=c+" property is deprecated and will be removed soon. Look at Konva change log for more information.";a.prototype[u]=function(){t.Util.error(f);var p=this.attrs[c];return p===void 0?l:p},e.Factory.addSetter(a,c,d,function(){t.Util.error(f)}),e.Factory.addOverloadedGetterSetter(a,c)},backCompat(a,c){t.Util.each(c,function(l,d){var u=a.prototype[d],f=r+t.Util._capitalize(l),p=o+t.Util._capitalize(l);function h(){u.apply(this,arguments),t.Util.error('"'+l+'" method is deprecated and will be removed soon. Use ""'+d+'" instead.')}a.prototype[l]=h,a.prototype[f]=h,a.prototype[p]=h})},afterSetFilter(){this._filterUpToDate=!1}}}(Sn);var _r={},xi={};Object.defineProperty(xi,"__esModule",{value:!0}),xi.HitContext=xi.SceneContext=xi.Context=void 0;const GC=qt,gie=lt;function mie(e){var t=[],n=e.length,r=GC.Util,o,a;for(o=0;o<n;o++)a=e[o],r._isNumber(a)?a=Math.round(a*1e3)/1e3:r._isString(a)||(a=a+""),t.push(a);return t}var WC=",",vie="(",yie=")",bie="([",wie="])",_ie=";",Cie="()",Sie="=",KC=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"],Eie=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"];const xie=100;class Ef{constructor(t){this.canvas=t,gie.Konva.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(t){t.fillEnabled()&&this._fill(t)}_fill(t){}strokeShape(t){t.hasStroke()&&this._stroke(t)}_stroke(t){}fillStrokeShape(t){t.attrs.fillAfterStrokeEnabled?(this.strokeShape(t),this.fillShape(t)):(this.fillShape(t),this.strokeShape(t))}getTrace(t,n){var r=this.traceArr,o=r.length,a="",c,l,d,u;for(c=0;c<o;c++)l=r[c],d=l.method,d?(u=l.args,a+=d,t?a+=Cie:GC.Util._isArray(u[0])?a+=bie+u.join(WC)+wie:(n&&(u=u.map(f=>typeof f=="number"?Math.floor(f):f)),a+=vie+u.join(WC)+yie)):(a+=l.property,t||(a+=Sie+l.val)),a+=_ie;return a}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=xie&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){const n=t.attrs.lineCap;n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){const n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,o,a,c){this._context.arc(t,n,r,o,a,c)}arcTo(t,n,r,o,a){this._context.arcTo(t,n,r,o,a)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,o,a,c){this._context.bezierCurveTo(t,n,r,o,a,c)}clearRect(t,n,r,o){this._context.clearRect(t,n,r,o)}clip(...t){this._context.clip.apply(this._context,t)}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,o){return this._context.createLinearGradient(t,n,r,o)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,o,a,c){return this._context.createRadialGradient(t,n,r,o,a,c)}drawImage(t,n,r,o,a,c,l,d,u){var f=arguments,p=this._context;f.length===3?p.drawImage(t,n,r):f.length===5?p.drawImage(t,n,r,o,a):f.length===9&&p.drawImage(t,n,r,o,a,c,l,d,u)}ellipse(t,n,r,o,a,c,l,d){this._context.ellipse(t,n,r,o,a,c,l,d)}isPointInPath(t,n,r,o){return r?this._context.isPointInPath(r,t,n,o):this._context.isPointInPath(t,n,o)}fill(...t){this._context.fill.apply(this._context,t)}fillRect(t,n,r,o){this._context.fillRect(t,n,r,o)}strokeRect(t,n,r,o){this._context.strokeRect(t,n,r,o)}fillText(t,n,r,o){o?this._context.fillText(t,n,r,o):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,o){return this._context.getImageData(t,n,r,o)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,o){this._context.rect(t,n,r,o)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,o){this._context.quadraticCurveTo(t,n,r,o)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,o,a,c){this._context.setTransform(t,n,r,o,a,c)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,o){this._context.strokeText(t,n,r,o)}transform(t,n,r,o,a,c){this._context.transform(t,n,r,o,a,c)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=KC.length,r=this.setAttr,o,a,c=function(l){var d=t[l],u;t[l]=function(){return a=mie(Array.prototype.slice.call(arguments,0)),u=d.apply(t,arguments),t._trace({method:l,args:a}),u}};for(o=0;o<n;o++)c(KC[o]);t.setAttr=function(){r.apply(t,arguments);var l=arguments[0],d=arguments[1];(l==="shadowOffsetX"||l==="shadowOffsetY"||l==="shadowBlur")&&(d=d/this.canvas.getPixelRatio()),t._trace({property:l,val:d})}}_applyGlobalCompositeOperation(t){const n=t.attrs.globalCompositeOperation;var r=!n||n==="source-over";r||this.setAttr("globalCompositeOperation",n)}}xi.Context=Ef,Eie.forEach(function(e){Object.defineProperty(Ef.prototype,e,{get(){return this._context[e]},set(t){this._context[e]=t}})});class kie extends Ef{constructor(t,{willReadFrequently:n=!1}={}){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:n})}_fillColor(t){var n=t.fill();this.setAttr("fillStyle",n),t._fillFunc(this)}_fillPattern(t){this.setAttr("fillStyle",t._getFillPattern()),t._fillFunc(this)}_fillLinearGradient(t){var n=t._getLinearGradient();n&&(this.setAttr("fillStyle",n),t._fillFunc(this))}_fillRadialGradient(t){const n=t._getRadialGradient();n&&(this.setAttr("fillStyle",n),t._fillFunc(this))}_fill(t){const n=t.fill(),r=t.getFillPriority();if(n&&r==="color"){this._fillColor(t);return}const o=t.getFillPatternImage();if(o&&r==="pattern"){this._fillPattern(t);return}const a=t.getFillLinearGradientColorStops();if(a&&r==="linear-gradient"){this._fillLinearGradient(t);return}const c=t.getFillRadialGradientColorStops();if(c&&r==="radial-gradient"){this._fillRadialGradient(t);return}n?this._fillColor(t):o?this._fillPattern(t):a?this._fillLinearGradient(t):c&&this._fillRadialGradient(t)}_strokeLinearGradient(t){const n=t.getStrokeLinearGradientStartPoint(),r=t.getStrokeLinearGradientEndPoint(),o=t.getStrokeLinearGradientColorStops(),a=this.createLinearGradient(n.x,n.y,r.x,r.y);if(o){for(var c=0;c<o.length;c+=2)a.addColorStop(o[c],o[c+1]);this.setAttr("strokeStyle",a)}}_stroke(t){var n=t.dash(),r=t.getStrokeScaleEnabled();if(t.hasStroke()){if(!r){this.save();var o=this.getCanvas().getPixelRatio();this.setTransform(o,0,0,o,0,0)}this._applyLineCap(t),n&&t.dashEnabled()&&(this.setLineDash(n),this.setAttr("lineDashOffset",t.dashOffset())),this.setAttr("lineWidth",t.strokeWidth()),t.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)");var a=t.getStrokeLinearGradientColorStops();a?this._strokeLinearGradient(t):this.setAttr("strokeStyle",t.stroke()),t._strokeFunc(this),r||this.restore()}}_applyShadow(t){var n,r,o,a=(n=t.getShadowRGBA())!==null&&n!==void 0?n:"black",c=(r=t.getShadowBlur())!==null&&r!==void 0?r:5,l=(o=t.getShadowOffset())!==null&&o!==void 0?o:{x:0,y:0},d=t.getAbsoluteScale(),u=this.canvas.getPixelRatio(),f=d.x*u,p=d.y*u;this.setAttr("shadowColor",a),this.setAttr("shadowBlur",c*Math.min(Math.abs(f),Math.abs(p))),this.setAttr("shadowOffsetX",l.x*f),this.setAttr("shadowOffsetY",l.y*p)}}xi.SceneContext=kie;class Nie extends Ef{constructor(t){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:!0})}_fill(t){this.save(),this.setAttr("fillStyle",t.colorKey),t._fillFuncHit(this),this.restore()}strokeShape(t){t.hasHitStroke()&&this._stroke(t)}_stroke(t){if(t.hasHitStroke()){const a=t.getStrokeScaleEnabled();if(!a){this.save();var n=this.getCanvas().getPixelRatio();this.setTransform(n,0,0,n,0,0)}this._applyLineCap(t);var r=t.hitStrokeWidth(),o=r==="auto"?t.strokeWidth():r;this.setAttr("lineWidth",o),this.setAttr("strokeStyle",t.colorKey),t._strokeFuncHit(this),a||this.restore()}}}xi.HitContext=Nie,Object.defineProperty(_r,"__esModule",{value:!0}),_r.HitCanvas=_r.SceneCanvas=_r.Canvas=void 0;const xf=qt,YC=xi,JC=lt,Tie=Sn,Aie=We;var kf;function Oie(){if(kf)return kf;var e=xf.Util.createCanvasElement(),t=e.getContext("2d");return kf=function(){var n=JC.Konva._global.devicePixelRatio||1,r=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return n/r}(),xf.Util.releaseCanvas(e),kf}class Nf{constructor(t){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var n=t||{},r=n.pixelRatio||JC.Konva.pixelRatio||Oie();this.pixelRatio=r,this._canvas=xf.Util.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(t){var n=this.pixelRatio;this.pixelRatio=t,this.setSize(this.getWidth()/n,this.getHeight()/n)}setWidth(t){this.width=this._canvas.width=t*this.pixelRatio,this._canvas.style.width=t+"px";var n=this.pixelRatio,r=this.getContext()._context;r.scale(n,n)}setHeight(t){this.height=this._canvas.height=t*this.pixelRatio,this._canvas.style.height=t+"px";var n=this.pixelRatio,r=this.getContext()._context;r.scale(n,n)}getWidth(){return this.width}getHeight(){return this.height}setSize(t,n){this.setWidth(t||0),this.setHeight(n||0)}toDataURL(t,n){try{return this._canvas.toDataURL(t,n)}catch(r){try{return this._canvas.toDataURL()}catch(o){return xf.Util.error("Unable to get data URL. "+o.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}_r.Canvas=Nf,Tie.Factory.addGetterSetter(Nf,"pixelRatio",void 0,(0,Aie.getNumberValidator)());class Iie extends Nf{constructor(t={width:0,height:0,willReadFrequently:!1}){super(t),this.context=new YC.SceneContext(this,{willReadFrequently:t.willReadFrequently}),this.setSize(t.width,t.height)}}_r.SceneCanvas=Iie;class Rie extends Nf{constructor(t={width:0,height:0}){super(t),this.hitCanvas=!0,this.context=new YC.HitContext(this),this.setSize(t.width,t.height)}}_r.HitCanvas=Rie;var Tf={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DD=void 0;const t=lt,n=qt;e.DD={get isDragging(){var r=!1;return e.DD._dragElements.forEach(o=>{o.dragStatus==="dragging"&&(r=!0)}),r},justDragged:!1,get node(){var r;return e.DD._dragElements.forEach(o=>{r=o.node}),r},_dragElements:new Map,_drag(r){const o=[];e.DD._dragElements.forEach((a,c)=>{const{node:l}=a,d=l.getStage();d.setPointersPositions(r),a.pointerId===void 0&&(a.pointerId=n.Util._getFirstPointerId(r));const u=d._changedPointerPositions.find(h=>h.id===a.pointerId);if(u){if(a.dragStatus!=="dragging"){var f=l.dragDistance(),p=Math.max(Math.abs(u.x-a.startPointerPos.x),Math.abs(u.y-a.startPointerPos.y));if(p<f||(l.startDrag({evt:r}),!l.isDragging()))return}l._setDragPosition(r,a),o.push(l)}}),o.forEach(a=>{a.fire("dragmove",{type:"dragmove",target:a,evt:r},!0)})},_endDragBefore(r){const o=[];e.DD._dragElements.forEach(a=>{const{node:c}=a,l=c.getStage();if(r&&l.setPointersPositions(r),!l._changedPointerPositions.find(f=>f.id===a.pointerId))return;(a.dragStatus==="dragging"||a.dragStatus==="stopped")&&(e.DD.justDragged=!0,t.Konva._mouseListenClick=!1,t.Konva._touchListenClick=!1,t.Konva._pointerListenClick=!1,a.dragStatus="stopped");const u=a.node.getLayer()||a.node instanceof t.Konva.Stage&&a.node;u&&o.indexOf(u)===-1&&o.push(u)}),o.forEach(a=>{a.draw()})},_endDragAfter(r){e.DD._dragElements.forEach((o,a)=>{o.dragStatus==="stopped"&&o.node.fire("dragend",{type:"dragend",target:o.node,evt:r},!0),o.dragStatus!=="dragging"&&e.DD._dragElements.delete(a)})}},t.Konva.isBrowser&&(window.addEventListener("mouseup",e.DD._endDragBefore,!0),window.addEventListener("touchend",e.DD._endDragBefore,!0),window.addEventListener("mousemove",e.DD._drag),window.addEventListener("touchmove",e.DD._drag),window.addEventListener("mouseup",e.DD._endDragAfter,!1),window.addEventListener("touchend",e.DD._endDragAfter,!1))})(Tf),Object.defineProperty(po,"__esModule",{value:!0}),po.Node=void 0;const He=qt,Rc=Sn,Af=_r,cs=lt,Jn=Tf,Nt=We;var Of="absoluteOpacity",If="allEventListeners",ki="absoluteTransform",XC="absoluteScale",ds="canvas",Pie="Change",Lie="children",Bie="konva",kv="listening",QC="mouseenter",ZC="mouseleave",VC="set",eS="Shape",Rf=" ",tS="stage",go="transform",Die="Stage",Nv="visible",Mie=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(Rf);let Fie=1;class Ae{constructor(t){this._id=Fie++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===go||t===ki)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),o=t===go||t===ki,a=r===void 0||o&&r.dirty===!0;return a&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const o=n.map(a=>a+"Change.konva").join(Rf);this.on(o,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(ds)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===ki&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(ds)){const{scene:t,filter:n,hit:r}=this._cache.get(ds);He.Util.releaseCanvas(t,n,r),this._cache.delete(ds)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var o=Math.ceil(n.width||r.width),a=Math.ceil(n.height||r.height),c=n.pixelRatio,l=n.x===void 0?Math.floor(r.x):n.x,d=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,f=n.drawBorder||!1,p=n.hitCanvasPixelRatio||1;if(!o||!a){He.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}o+=u*2+1,a+=u*2+1,l-=u,d-=u;var h=new Af.SceneCanvas({pixelRatio:c,width:o,height:a}),m=new Af.SceneCanvas({pixelRatio:c,width:0,height:0,willReadFrequently:!0}),b=new Af.HitCanvas({pixelRatio:p,width:o,height:a}),w=h.getContext(),_=b.getContext();return b.isCache=!0,h.isCache=!0,this._cache.delete(ds),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(h.getContext()._context.imageSmoothingEnabled=!1,m.getContext()._context.imageSmoothingEnabled=!1),w.save(),_.save(),w.translate(-l,-d),_.translate(-l,-d),this._isUnderCache=!0,this._clearSelfAndDescendantCache(Of),this._clearSelfAndDescendantCache(XC),this.drawScene(h,this),this.drawHit(b,this),this._isUnderCache=!1,w.restore(),_.restore(),f&&(w.save(),w.beginPath(),w.rect(0,0,o,a),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(ds,{scene:h,filter:m,hit:b,x:l,y:d}),this._requestDraw(),this}isCached(){return this._cache.has(ds)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],o,a,c,l,d=this.getAbsoluteTransform(n);return r.forEach(function(u){var f=d.point(u);o===void 0&&(o=c=f.x,a=l=f.y),o=Math.min(o,f.x),a=Math.min(a,f.y),c=Math.max(c,f.x),l=Math.max(l,f.y)}),{x:o,y:a,width:c-o,height:l-a}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),o=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/o,r.height/o),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,o=n.filter,a=o.getContext(),c,l,d,u;if(t){if(!this._filterUpToDate){var f=r.pixelRatio;o.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(c=t.length,a.clear(),a.drawImage(r._canvas,0,0,r.getWidth()/f,r.getHeight()/f),l=a.getImageData(0,0,o.getWidth(),o.getHeight()),d=0;d<c;d++){if(u=t[d],typeof u!="function"){He.Util.error("Filter should be type of function, but got "+typeof u+" instead. Please check correct filters");continue}u.call(this,l),a.putImageData(l,0,0)}}catch(p){He.Util.error("Unable to apply filter. "+p.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}this._filterUpToDate=!0}return o}return r}on(t,n){if(this._cache&&this._cache.delete(If),arguments.length===3)return this._delegate.apply(this,arguments);var r=t.split(Rf),o=r.length,a,c,l,d,u;for(a=0;a<o;a++)c=r[a],l=c.split("."),d=l[0],u=l[1]||"",this.eventListeners[d]||(this.eventListeners[d]=[]),this.eventListeners[d].push({name:u,handler:n});return this}off(t,n){var r=(t||"").split(Rf),o=r.length,a,c,l,d,u,f;if(this._cache&&this._cache.delete(If),!t)for(c in this.eventListeners)this._off(c);for(a=0;a<o;a++)if(l=r[a],d=l.split("."),u=d[0],f=d[1],u)this.eventListeners[u]&&this._off(u,f,n);else for(c in this.eventListeners)this._off(c,f,n);return this}dispatchEvent(t){var n={target:this,type:t.type,evt:t};return this.fire(t.type,n),this}addEventListener(t,n){return this.on(t,function(r){n.call(this,r.evt)}),this}removeEventListener(t){return this.off(t),this}_delegate(t,n,r){var o=this;this.on(t,function(a){for(var c=a.target.findAncestors(n,!0,o),l=0;l<c.length;l++)a=He.Util.cloneObject(a),a.currentTarget=c[l],r.call(c[l],a)})}remove(){return this.isDragging()&&this.stopDrag(),Jn.DD._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(ki),this._clearSelfAndDescendantCache(Of),this._clearSelfAndDescendantCache(XC),this._clearSelfAndDescendantCache(tS),this._clearSelfAndDescendantCache(Nv),this._clearSelfAndDescendantCache(kv)}_remove(){this._clearCaches();var t=this.getParent();t&&t.children&&(t.children.splice(this.index,1),t._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this.clearCache(),this}getAttr(t){var n="get"+He.Util._capitalize(t);return He.Util._isFunction(this[n])?this[n]():this.attrs[t]}getAncestors(){for(var t=this.getParent(),n=[];t;)n.push(t),t=t.getParent();return n}getAttrs(){return this.attrs||{}}setAttrs(t){return this._batchTransformChanges(()=>{var n,r;if(!t)return this;for(n in t)n!==Lie&&(r=VC+He.Util._capitalize(n),He.Util._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(kv,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(Nv,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),o=!1;Jn.DD._dragElements.forEach(c=>{c.dragStatus==="dragging"&&(c.node.nodeType==="Stage"||c.node.getLayer()===r)&&(o=!0)});var a=!n&&!cs.Konva.hitOnDragEnabled&&o;return this.isListening()&&this.isVisible()&&!a}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,o,a,c,l;function d(u){for(o=[],a=u.length,c=0;c<a;c++)l=u[c],r++,l.nodeType!==eS&&(o=o.concat(l.getChildren().slice())),l._id===n._id&&(c=a);o.length>0&&o[0].getDepth()<=t&&d(o)}return n.nodeType!==Die&&d(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(go),this._clearSelfAndDescendantCache(ki)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var o=this.getAbsoluteTransform(t).getMatrix(),a=new He.Transform,c=this.offset();return a.m=o.slice(),a.translate(c.x,c.y),a.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(go);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(go),this._clearSelfAndDescendantCache(ki),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,o=this.x(),a=this.y();return n!==void 0&&(o+=n),r!==void 0&&(a+=r),this.setPosition({x:o,y:a}),this}_eachAncestorReverse(t,n){var r=[],o=this.getParent(),a,c;if(!(n&&n._id===this._id)){for(r.unshift(this);o&&(!n||o._id!==n._id);)r.unshift(o),o=o.parent;for(a=r.length,c=0;c<a;c++)t(r[c])}}rotate(t){return this.rotation(this.rotation()+t),this}moveToTop(){if(!this.parent)return He.Util.warn("Node has no parent. moveToTop function is ignored."),!1;var t=this.index,n=this.parent.getChildren().length;return t<n-1?(this.parent.children.splice(t,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0):!1}moveUp(){if(!this.parent)return He.Util.warn("Node has no parent. moveUp function is ignored."),!1;var t=this.index,n=this.parent.getChildren().length;return t<n-1?(this.parent.children.splice(t,1),this.parent.children.splice(t+1,0,this),this.parent._setChildrenIndices(),!0):!1}moveDown(){if(!this.parent)return He.Util.warn("Node has no parent. moveDown function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return He.Util.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return He.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&He.Util.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(Of,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,o,a,c,l;t.attrs={};for(r in n)o=n[r],l=He.Util.isObject(o)&&!He.Util._isPlainObject(o)&&!He.Util._isArray(o),!l&&(a=typeof this[r]=="function"&&this[r],delete n[r],c=a?a.call(this):null,n[r]=o,c!==o&&(t.attrs[r]=o));return t.className=this.getClassName(),He.Util._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var o=[];n&&this._isMatch(t)&&o.push(this);for(var a=this.parent;a;){if(a===r)return o;a._isMatch(t)&&o.push(a),a=a.parent}return o}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,o,a;for(o=0;o<r;o++)if(a=n[o],He.Util.isValidSelector(a)||(He.Util.warn('Selector "'+a+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),He.Util.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),He.Util.warn("Konva is awesome, right?")),a.charAt(0)==="#"){if(this.id()===a.slice(1))return!0}else if(a.charAt(0)==="."){if(this.hasName(a.slice(1)))return!0}else if(this.className===a||this.nodeType===a)return!0;return!1}getLayer(){var t=this.getParent();return t?t.getLayer():null}getStage(){return this._getCache(tS,this._getStage)}_getStage(){var t=this.getParent();if(t)return t.getStage()}fire(t,n={},r){return n.target=n.target||this,r?this._fireAndBubble(t,n):this._fire(t,n),this}getAbsoluteTransform(t){return t?this._getAbsoluteTransform(t):this._getCache(ki,this._getAbsoluteTransform)}_getAbsoluteTransform(t){var n;if(t)return n=new He.Transform,this._eachAncestorReverse(function(o){var a=o.transformsEnabled();a==="all"?n.multiply(o.getTransform()):a==="position"&&n.translate(o.x()-o.offsetX(),o.y()-o.offsetY())},t),n;n=this._cache.get(ki)||new He.Transform,this.parent?this.parent.getAbsoluteTransform().copyInto(n):n.reset();var r=this.transformsEnabled();if(r==="all")n.multiply(this.getTransform());else if(r==="position"){const o=this.attrs.x||0,a=this.attrs.y||0,c=this.attrs.offsetX||0,l=this.attrs.offsetY||0;n.translate(o-c,a-l)}return n.dirty=!1,n}getAbsoluteScale(t){for(var n=this;n;)n._isUnderCache&&(t=n),n=n.getParent();const o=this.getAbsoluteTransform(t).decompose();return{x:o.scaleX,y:o.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(go,this._getTransform)}_getTransform(){var t,n,r=this._cache.get(go)||new He.Transform;r.reset();var o=this.x(),a=this.y(),c=cs.Konva.getAngle(this.rotation()),l=(t=this.attrs.scaleX)!==null&&t!==void 0?t:1,d=(n=this.attrs.scaleY)!==null&&n!==void 0?n:1,u=this.attrs.skewX||0,f=this.attrs.skewY||0,p=this.attrs.offsetX||0,h=this.attrs.offsetY||0;return(o!==0||a!==0)&&r.translate(o,a),c!==0&&r.rotate(c),(u!==0||f!==0)&&r.skew(u,f),(l!==1||d!==1)&&r.scale(l,d),(p!==0||h!==0)&&r.translate(-1*p,-1*h),r.dirty=!1,r}clone(t){var n=He.Util.cloneObject(this.attrs),r,o,a,c,l;for(r in t)n[r]=t[r];var d=new this.constructor(n);for(r in this.eventListeners)for(o=this.eventListeners[r],a=o.length,c=0;c<a;c++)l=o[c],l.name.indexOf(Bie)<0&&(d.eventListeners[r]||(d.eventListeners[r]=[]),d.eventListeners[r].push(l));return d}_toKonvaCanvas(t){t=t||{};var n=this.getClientRect(),r=this.getStage(),o=t.x!==void 0?t.x:Math.floor(n.x),a=t.y!==void 0?t.y:Math.floor(n.y),c=t.pixelRatio||1,l=new Af.SceneCanvas({width:t.width||Math.ceil(n.width)||(r?r.width():0),height:t.height||Math.ceil(n.height)||(r?r.height():0),pixelRatio:c}),d=l.getContext();return t.imageSmoothingEnabled===!1&&(d._context.imageSmoothingEnabled=!1),d.save(),(o||a)&&d.translate(-1*o,-1*a),this.drawScene(l),d.restore(),l}toCanvas(t){return this._toKonvaCanvas(t)._canvas}toDataURL(t){t=t||{};var n=t.mimeType||null,r=t.quality||null,o=this._toKonvaCanvas(t).toDataURL(n,r);return t.callback&&t.callback(o),o}toImage(t){return new Promise((n,r)=>{try{const o=t==null?void 0:t.callback;o&&delete t.callback,He.Util._urlToImage(this.toDataURL(t),function(a){n(a),o==null||o(a)})}catch(o){r(o)}})}toBlob(t){return new Promise((n,r)=>{try{const o=t==null?void 0:t.callback;o&&delete t.callback,this.toCanvas(t).toBlob(a=>{n(a),o==null||o(a)})}catch(o){r(o)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():cs.Konva.dragDistance}_off(t,n,r){var o=this.eventListeners[t],a,c,l;for(a=0;a<o.length;a++)if(c=o[a].name,l=o[a].handler,(c!=="konva"||n==="konva")&&(!n||c===n)&&(!r||r===l)){if(o.splice(a,1),o.length===0){delete this.eventListeners[t];break}a--}}_fireChangeEvent(t,n,r){this._fire(t+Pie,{oldVal:n,newVal:r})}addName(t){if(!this.hasName(t)){var n=this.name(),r=n?n+" "+t:t;this.name(r)}return this}hasName(t){if(!t)return!1;const n=this.name();if(!n)return!1;var r=(n||"").split(/\s/g);return r.indexOf(t)!==-1}removeName(t){var n=(this.name()||"").split(/\s/g),r=n.indexOf(t);return r!==-1&&(n.splice(r,1),this.name(n.join(" "))),this}setAttr(t,n){var r=this[VC+He.Util._capitalize(t)];return He.Util._isFunction(r)?r.call(this,n):this._setAttr(t,n),this}_requestDraw(){if(cs.Konva.autoDrawEnabled){const t=this.getLayer()||this.getStage();t==null||t.batchDraw()}}_setAttr(t,n){var r=this.attrs[t];r===n&&!He.Util.isObject(n)||(n==null?delete this.attrs[t]:this.attrs[t]=n,this._shouldFireChangeEvents&&this._fireChangeEvent(t,r,n),this._requestDraw())}_setComponentAttr(t,n,r){var o;r!==void 0&&(o=this.attrs[t],o||(this.attrs[t]=this.getAttr(t)),this.attrs[t][n]=r,this._fireChangeEvent(t,o,r))}_fireAndBubble(t,n,r){n&&this.nodeType===eS&&(n.target=this);var o=(t===QC||t===ZC)&&(r&&(this===r||this.isAncestorOf&&this.isAncestorOf(r))||this.nodeType==="Stage"&&!r);if(!o){this._fire(t,n);var a=(t===QC||t===ZC)&&r&&r.isAncestorOf&&r.isAncestorOf(this)&&!r.isAncestorOf(this.parent);(n&&!n.cancelBubble||!n)&&this.parent&&this.parent.isListening()&&!a&&(r&&r.parent?this._fireAndBubble.call(this.parent,t,n,r):this._fireAndBubble.call(this.parent,t,n))}}_getProtoListeners(t){var n,r,o;const a=(n=this._cache.get(If))!==null&&n!==void 0?n:{};let c=a==null?void 0:a[t];if(c===void 0){c=[];let l=Object.getPrototypeOf(this);for(;l;){const d=(o=(r=l.eventListeners)===null||r===void 0?void 0:r[t])!==null&&o!==void 0?o:[];c.push(...d),l=Object.getPrototypeOf(l)}a[t]=c,this._cache.set(If,a)}return c}_fire(t,n){n=n||{},n.currentTarget=this,n.type=t;const r=this._getProtoListeners(t);if(r)for(var o=0;o<r.length;o++)r[o].handler.call(this,n);const a=this.eventListeners[t];if(a)for(var o=0;o<a.length;o++)a[o].handler.call(this,n)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(t){var n=t?t.pointerId:void 0,r=this.getStage(),o=this.getAbsolutePosition(),a=r._getPointerById(n)||r._changedPointerPositions[0]||o;Jn.DD._dragElements.set(this._id,{node:this,startPointerPos:a,offset:{x:a.x-o.x,y:a.y-o.y},dragStatus:"ready",pointerId:n})}startDrag(t,n=!0){Jn.DD._dragElements.has(this._id)||this._createDragElement(t);const r=Jn.DD._dragElements.get(this._id);r.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:t&&t.evt},n)}_setDragPosition(t,n){const r=this.getStage()._getPointerById(n.pointerId);if(r){var o={x:r.x-n.offset.x,y:r.y-n.offset.y},a=this.dragBoundFunc();if(a!==void 0){const c=a.call(this,o,t);c?o=c:He.Util.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}(!this._lastPos||this._lastPos.x!==o.x||this._lastPos.y!==o.y)&&(this.setAbsolutePosition(o),this._requestDraw()),this._lastPos=o}}stopDrag(t){const n=Jn.DD._dragElements.get(this._id);n&&(n.dragStatus="stopped"),Jn.DD._endDragBefore(t),Jn.DD._endDragAfter(t)}setDraggable(t){this._setAttr("draggable",t),this._dragChange()}isDragging(){const t=Jn.DD._dragElements.get(this._id);return t?t.dragStatus==="dragging":!1}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(t){var n=t.evt.button!==void 0,r=!n||cs.Konva.dragButtons.indexOf(t.evt.button)>=0;if(r&&!this.isDragging()){var o=!1;Jn.DD._dragElements.forEach(a=>{this.isAncestorOf(a.node)&&(o=!0)}),o||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=Jn.DD._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",o=n&&n.dragStatus==="ready";r?this.stopDrag():o&&Jn.DD._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return He.Util.haveIntersection(r,this.getClientRect())}static create(t,n){return He.Util._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=Ae.prototype.getClassName.call(t),o=t.children,a,c,l;n&&(t.attrs.container=n),cs.Konva[r]||(He.Util.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const d=cs.Konva[r];if(a=new d(t.attrs),o)for(c=o.length,l=0;l<c;l++)a.add(Ae._createNode(o[l]));return a}}po.Node=Ae,Ae.prototype.nodeType="Node",Ae.prototype._attrsAffectingSize=[],Ae.prototype.eventListeners={},Ae.prototype.on.call(Ae.prototype,Mie,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(go),this._clearSelfAndDescendantCache(ki)}),Ae.prototype.on.call(Ae.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(Nv)}),Ae.prototype.on.call(Ae.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(kv)}),Ae.prototype.on.call(Ae.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(Of)});const tt=Rc.Factory.addGetterSetter;tt(Ae,"zIndex"),tt(Ae,"absolutePosition"),tt(Ae,"position"),tt(Ae,"x",0,(0,Nt.getNumberValidator)()),tt(Ae,"y",0,(0,Nt.getNumberValidator)()),tt(Ae,"globalCompositeOperation","source-over",(0,Nt.getStringValidator)()),tt(Ae,"opacity",1,(0,Nt.getNumberValidator)()),tt(Ae,"name","",(0,Nt.getStringValidator)()),tt(Ae,"id","",(0,Nt.getStringValidator)()),tt(Ae,"rotation",0,(0,Nt.getNumberValidator)()),Rc.Factory.addComponentsGetterSetter(Ae,"scale",["x","y"]),tt(Ae,"scaleX",1,(0,Nt.getNumberValidator)()),tt(Ae,"scaleY",1,(0,Nt.getNumberValidator)()),Rc.Factory.addComponentsGetterSetter(Ae,"skew",["x","y"]),tt(Ae,"skewX",0,(0,Nt.getNumberValidator)()),tt(Ae,"skewY",0,(0,Nt.getNumberValidator)()),Rc.Factory.addComponentsGetterSetter(Ae,"offset",["x","y"]),tt(Ae,"offsetX",0,(0,Nt.getNumberValidator)()),tt(Ae,"offsetY",0,(0,Nt.getNumberValidator)()),tt(Ae,"dragDistance",null,(0,Nt.getNumberValidator)()),tt(Ae,"width",0,(0,Nt.getNumberValidator)()),tt(Ae,"height",0,(0,Nt.getNumberValidator)()),tt(Ae,"listening",!0,(0,Nt.getBooleanValidator)()),tt(Ae,"preventDefault",!0,(0,Nt.getBooleanValidator)()),tt(Ae,"filters",null,function(e){return this._filterUpToDate=!1,e}),tt(Ae,"visible",!0,(0,Nt.getBooleanValidator)()),tt(Ae,"transformsEnabled","all",(0,Nt.getStringValidator)()),tt(Ae,"size"),tt(Ae,"dragBoundFunc"),tt(Ae,"draggable",!1,(0,Nt.getBooleanValidator)()),Rc.Factory.backCompat(Ae,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});var us={};Object.defineProperty(us,"__esModule",{value:!0}),us.Container=void 0;const ba=Sn,Tv=po,Pf=We;class fs extends Tv.Node{constructor(){super(...arguments),this.children=[]}getChildren(t){if(!t)return this.children||[];const n=this.children||[];var r=[];return n.forEach(function(o){t(o)&&r.push(o)}),r}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(t.length===0)return this;if(t.length>1){for(var n=0;n<t.length;n++)this.add(t[n]);return this}const r=t[0];return r.getParent()?(r.moveTo(this),this):(this._validateAdd(r),r.index=this.getChildren().length,r.parent=this,r._clearCaches(),this.getChildren().push(r),this._fire("add",{child:r}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(t){return this._generalFind(t,!1)}findOne(t){var n=this._generalFind(t,!0);return n.length>0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(o=>{const a=o._isMatch(t);return a&&r.push(o),!!(a&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const o of r){if(n=t(o),n)return!0;if(o.hasChildren()&&(n=o._descendants(t),n))return!0}return!1}toObject(){var t=Tv.Node.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=Tv.Node.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),o=t||r&&r.getCanvas(),a=o&&o.getContext(),c=this._getCanvasCache(),l=c&&c.scene,d=o&&o.isCache;if(!this.isVisible()&&!d)return this;if(l){a.save();var u=this.getAbsoluteTransform(n).getMatrix();a.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(a),a.restore()}else this._drawChildren("drawScene",o,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),o=t||r&&r.hitCanvas,a=o&&o.getContext(),c=this._getCanvasCache(),l=c&&c.hit;if(l){a.save();var d=this.getAbsoluteTransform(n).getMatrix();a.transform(d[0],d[1],d[2],d[3],d[4],d[5]),this._drawCachedHitCanvas(a),a.restore()}else this._drawChildren("drawHit",o,n);return this}_drawChildren(t,n,r){var o,a=n&&n.getContext(),c=this.clipWidth(),l=this.clipHeight(),d=this.clipFunc(),u=c&&l||d;const f=r===this;if(u){a.save();var p=this.getAbsoluteTransform(r),h=p.getMatrix();a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),a.beginPath();let _;if(d)_=d.call(this,a,this);else{var m=this.clipX(),b=this.clipY();a.rect(m,b,c,l)}a.clip.apply(a,_),h=p.copy().invert().getMatrix(),a.transform(h[0],h[1],h[2],h[3],h[4],h[5])}var w=!f&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(a.save(),a._applyGlobalCompositeOperation(this)),(o=this.children)===null||o===void 0||o.forEach(function(_){_[t](n,r)}),w&&a.restore(),u&&a.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,o=t.relativeTo,a,c,l,d,u={x:1/0,y:1/0,width:0,height:0},f=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(w.visible()){var _=w.getClientRect({relativeTo:f,skipShadow:t.skipShadow,skipStroke:t.skipStroke});_.width===0&&_.height===0||(a===void 0?(a=_.x,c=_.y,l=_.x+_.width,d=_.y+_.height):(a=Math.min(a,_.x),c=Math.min(c,_.y),l=Math.max(l,_.x+_.width),d=Math.max(d,_.y+_.height)))}});for(var p=this.find("Shape"),h=!1,m=0;m<p.length;m++){var b=p[m];if(b._isVisible(this)){h=!0;break}}return h&&a!==void 0?u={x:a,y:c,width:l-a,height:d-c}:u={x:0,y:0,width:0,height:0},r?u:this._transformedRect(u,o)}}us.Container=fs,ba.Factory.addComponentsGetterSetter(fs,"clip",["x","y","width","height"]),ba.Factory.addGetterSetter(fs,"clipX",void 0,(0,Pf.getNumberValidator)()),ba.Factory.addGetterSetter(fs,"clipY",void 0,(0,Pf.getNumberValidator)()),ba.Factory.addGetterSetter(fs,"clipWidth",void 0,(0,Pf.getNumberValidator)()),ba.Factory.addGetterSetter(fs,"clipHeight",void 0,(0,Pf.getNumberValidator)()),ba.Factory.addGetterSetter(fs,"clipFunc");var nS={},An={};Object.defineProperty(An,"__esModule",{value:!0}),An.releaseCapture=An.setPointerCapture=An.hasPointerCapture=An.createEvent=An.getCapturedShape=void 0;const $ie=lt,Pc=new Map,rS=$ie.Konva._global.PointerEvent!==void 0;function zie(e){return Pc.get(e)}An.getCapturedShape=zie;function Av(e){return{evt:e,pointerId:e.pointerId}}An.createEvent=Av;function Uie(e,t){return Pc.get(e)===t}An.hasPointerCapture=Uie;function jie(e,t){iS(e),t.getStage()&&(Pc.set(e,t),rS&&t._fire("gotpointercapture",Av(new PointerEvent("gotpointercapture"))))}An.setPointerCapture=jie;function iS(e,t){const n=Pc.get(e);if(!n)return;const r=n.getStage();r&&r.content,Pc.delete(e),rS&&n._fire("lostpointercapture",Av(new PointerEvent("lostpointercapture")))}An.releaseCapture=iS,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Stage=e.stages=void 0;const t=qt,n=Sn,r=us,o=lt,a=_r,c=Tf,l=lt,d=An;var u="Stage",f="string",p="px",h="mouseout",m="mouseleave",b="mouseover",w="mouseenter",_="mousemove",C="mousedown",k="mouseup",S="pointermove",E="pointerdown",T="pointerup",A="pointercancel",O="lostpointercapture",I="pointerout",F="pointerleave",R="pointerover",q="pointerenter",z="contextmenu",G="touchstart",Y="touchend",Z="touchmove",U="touchcancel",j="wheel",H=5,M=[[w,"_pointerenter"],[C,"_pointerdown"],[_,"_pointermove"],[k,"_pointerup"],[m,"_pointerleave"],[G,"_pointerdown"],[Z,"_pointermove"],[Y,"_pointerup"],[U,"_pointercancel"],[b,"_pointerover"],[j,"_wheel"],[z,"_contextmenu"],[E,"_pointerdown"],[S,"_pointermove"],[T,"_pointerup"],[A,"_pointercancel"],[O,"_lostpointercapture"]];const D={mouse:{[I]:h,[F]:m,[R]:b,[q]:w,[S]:_,[E]:C,[T]:k,[A]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[I]:"touchout",[F]:"touchleave",[R]:"touchover",[q]:"touchenter",[S]:Z,[E]:G,[T]:Y,[A]:U,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[I]:I,[F]:F,[R]:R,[q]:q,[S]:S,[E]:E,[T]:T,[A]:A,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},te=se=>se.indexOf("pointer")>=0?"pointer":se.indexOf("touch")>=0?"touch":"mouse",V=se=>{const B=te(se);if(B==="pointer")return o.Konva.pointerEventsEnabled&&D.pointer;if(B==="touch")return D.touch;if(B==="mouse")return D.mouse};function ee(se={}){return(se.clipFunc||se.clipWidth||se.clipHeight)&&t.Util.warn("Stage does not support clipping. Please use clip for Layers or Groups."),se}const X="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);";e.stages=[];class oe extends r.Container{constructor(B){super(ee(B)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),e.stages.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{ee(this.attrs)}),this._checkVisibility()}_validateAdd(B){const W=B.getType()==="Layer",re=B.getType()==="FastLayer";W||re||t.Util.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const B=this.visible()?"":"none";this.content.style.display=B}setContainer(B){if(typeof B===f){if(B.charAt(0)==="."){var W=B.slice(1);B=document.getElementsByClassName(W)[0]}else{var re;B.charAt(0)!=="#"?re=B:re=B.slice(1),B=document.getElementById(re)}if(!B)throw"Can not find container in document with id "+re}return this._setAttr("container",B),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),B.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var B=this.children,W=B.length,re;for(re=0;re<W;re++)B[re].clear();return this}clone(B){return B||(B={}),B.container=typeof document!="undefined"&&document.createElement("div"),r.Container.prototype.clone.call(this,B)}destroy(){super.destroy();var B=this.content;B&&t.Util._isInDocument(B)&&this.container().removeChild(B);var W=e.stages.indexOf(this);return W>-1&&e.stages.splice(W,1),t.Util.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const B=this._pointerPositions[0]||this._changedPointerPositions[0];return B?{x:B.x,y:B.y}:(t.Util.warn(X),null)}_getPointerById(B){return this._pointerPositions.find(W=>W.id===B)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(B){B=B||{},B.x=B.x||0,B.y=B.y||0,B.width=B.width||this.width(),B.height=B.height||this.height();var W=new a.SceneCanvas({width:B.width,height:B.height,pixelRatio:B.pixelRatio||1}),re=W.getContext()._context,ce=this.children;return(B.x||B.y)&&re.translate(-1*B.x,-1*B.y),ce.forEach(function(ve){if(ve.isVisible()){var ke=ve._toKonvaCanvas(B);re.drawImage(ke._canvas,B.x,B.y,ke.getWidth()/ke.getPixelRatio(),ke.getHeight()/ke.getPixelRatio())}}),W}getIntersection(B){if(!B)return null;var W=this.children,re=W.length,ce=re-1,ve;for(ve=ce;ve>=0;ve--){const ke=W[ve].getIntersection(B);if(ke)return ke}return null}_resizeDOM(){var B=this.width(),W=this.height();this.content&&(this.content.style.width=B+p,this.content.style.height=W+p),this.bufferCanvas.setSize(B,W),this.bufferHitCanvas.setSize(B,W),this.children.forEach(re=>{re.setSize({width:B,height:W}),re.draw()})}add(B,...W){if(arguments.length>1){for(var re=0;re<arguments.length;re++)this.add(arguments[re]);return this}super.add(B);var ce=this.children.length;return ce>H&&t.Util.warn("The stage has "+ce+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),B.setSize({width:this.width(),height:this.height()}),B.draw(),o.Konva.isBrowser&&this.content.appendChild(B.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(B){return d.hasPointerCapture(B,this)}setPointerCapture(B){d.setPointerCapture(B,this)}releaseCapture(B){d.releaseCapture(B,this)}getLayers(){return this.children}_bindContentEvents(){o.Konva.isBrowser&&M.forEach(([B,W])=>{this.content.addEventListener(B,re=>{this[W](re)},{passive:!1})})}_pointerenter(B){this.setPointersPositions(B);const W=V(B.type);this._fire(W.pointerenter,{evt:B,target:this,currentTarget:this})}_pointerover(B){this.setPointersPositions(B);const W=V(B.type);this._fire(W.pointerover,{evt:B,target:this,currentTarget:this})}_getTargetShape(B){let W=this[B+"targetShape"];return W&&!W.getStage()&&(W=null),W}_pointerleave(B){const W=V(B.type),re=te(B.type);if(W){this.setPointersPositions(B);var ce=this._getTargetShape(re),ve=!c.DD.isDragging||o.Konva.hitOnDragEnabled;ce&&ve?(ce._fireAndBubble(W.pointerout,{evt:B}),ce._fireAndBubble(W.pointerleave,{evt:B}),this._fire(W.pointerleave,{evt:B,target:this,currentTarget:this}),this[re+"targetShape"]=null):ve&&(this._fire(W.pointerleave,{evt:B,target:this,currentTarget:this}),this._fire(W.pointerout,{evt:B,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(B){const W=V(B.type),re=te(B.type);if(W){this.setPointersPositions(B);var ce=!1;this._changedPointerPositions.forEach(ve=>{var ke=this.getIntersection(ve);if(c.DD.justDragged=!1,o.Konva["_"+re+"ListenClick"]=!0,!(ke&&ke.isListening()))return;o.Konva.capturePointerEventsEnabled&&ke.setPointerCapture(ve.id),this[re+"ClickStartShape"]=ke,ke._fireAndBubble(W.pointerdown,{evt:B,pointerId:ve.id}),ce=!0;const Ue=B.type.indexOf("touch")>=0;ke.preventDefault()&&B.cancelable&&Ue&&B.preventDefault()}),ce||this._fire(W.pointerdown,{evt:B,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(B){const W=V(B.type),re=te(B.type);if(!W)return;c.DD.isDragging&&c.DD.node.preventDefault()&&B.cancelable&&B.preventDefault(),this.setPointersPositions(B);var ce=!c.DD.isDragging||o.Konva.hitOnDragEnabled;if(!ce)return;var ve={};let ke=!1;var ze=this._getTargetShape(re);this._changedPointerPositions.forEach(Ue=>{const xe=d.getCapturedShape(Ue.id)||this.getIntersection(Ue),ut=Ue.id,Se={evt:B,pointerId:ut};var Ie=ze!==xe;if(Ie&&ze&&(ze._fireAndBubble(W.pointerout,Object.assign({},Se),xe),ze._fireAndBubble(W.pointerleave,Object.assign({},Se),xe)),xe){if(ve[xe._id])return;ve[xe._id]=!0}xe&&xe.isListening()?(ke=!0,Ie&&(xe._fireAndBubble(W.pointerover,Object.assign({},Se),ze),xe._fireAndBubble(W.pointerenter,Object.assign({},Se),ze),this[re+"targetShape"]=xe),xe._fireAndBubble(W.pointermove,Object.assign({},Se))):ze&&(this._fire(W.pointerover,{evt:B,target:this,currentTarget:this,pointerId:ut}),this[re+"targetShape"]=null)}),ke||this._fire(W.pointermove,{evt:B,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(B){const W=V(B.type),re=te(B.type);if(!W)return;this.setPointersPositions(B);const ce=this[re+"ClickStartShape"],ve=this[re+"ClickEndShape"];var ke={};let ze=!1;this._changedPointerPositions.forEach(Ue=>{const xe=d.getCapturedShape(Ue.id)||this.getIntersection(Ue);if(xe){if(xe.releaseCapture(Ue.id),ke[xe._id])return;ke[xe._id]=!0}const ut=Ue.id,Se={evt:B,pointerId:ut};let Ie=!1;o.Konva["_"+re+"InDblClickWindow"]?(Ie=!0,clearTimeout(this[re+"DblTimeout"])):c.DD.justDragged||(o.Konva["_"+re+"InDblClickWindow"]=!0,clearTimeout(this[re+"DblTimeout"])),this[re+"DblTimeout"]=setTimeout(function(){o.Konva["_"+re+"InDblClickWindow"]=!1},o.Konva.dblClickWindow),xe&&xe.isListening()?(ze=!0,this[re+"ClickEndShape"]=xe,xe._fireAndBubble(W.pointerup,Object.assign({},Se)),o.Konva["_"+re+"ListenClick"]&&ce&&ce===xe&&(xe._fireAndBubble(W.pointerclick,Object.assign({},Se)),Ie&&ve&&ve===xe&&xe._fireAndBubble(W.pointerdblclick,Object.assign({},Se)))):(this[re+"ClickEndShape"]=null,o.Konva["_"+re+"ListenClick"]&&this._fire(W.pointerclick,{evt:B,target:this,currentTarget:this,pointerId:ut}),Ie&&this._fire(W.pointerdblclick,{evt:B,target:this,currentTarget:this,pointerId:ut}))}),ze||this._fire(W.pointerup,{evt:B,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),o.Konva["_"+re+"ListenClick"]=!1,B.cancelable&&re!=="touch"&&B.preventDefault()}_contextmenu(B){this.setPointersPositions(B);var W=this.getIntersection(this.getPointerPosition());W&&W.isListening()?W._fireAndBubble(z,{evt:B}):this._fire(z,{evt:B,target:this,currentTarget:this})}_wheel(B){this.setPointersPositions(B);var W=this.getIntersection(this.getPointerPosition());W&&W.isListening()?W._fireAndBubble(j,{evt:B}):this._fire(j,{evt:B,target:this,currentTarget:this})}_pointercancel(B){this.setPointersPositions(B);const W=d.getCapturedShape(B.pointerId)||this.getIntersection(this.getPointerPosition());W&&W._fireAndBubble(T,d.createEvent(B)),d.releaseCapture(B.pointerId)}_lostpointercapture(B){d.releaseCapture(B.pointerId)}setPointersPositions(B){var W=this._getContentPosition(),re=null,ce=null;B=B||window.event,B.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(B.touches,ve=>{this._pointerPositions.push({id:ve.identifier,x:(ve.clientX-W.left)/W.scaleX,y:(ve.clientY-W.top)/W.scaleY})}),Array.prototype.forEach.call(B.changedTouches||B.touches,ve=>{this._changedPointerPositions.push({id:ve.identifier,x:(ve.clientX-W.left)/W.scaleX,y:(ve.clientY-W.top)/W.scaleY})})):(re=(B.clientX-W.left)/W.scaleX,ce=(B.clientY-W.top)/W.scaleY,this.pointerPos={x:re,y:ce},this._pointerPositions=[{x:re,y:ce,id:t.Util._getFirstPointerId(B)}],this._changedPointerPositions=[{x:re,y:ce,id:t.Util._getFirstPointerId(B)}])}_setPointerPosition(B){t.Util.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(B)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var B=this.content.getBoundingClientRect();return{top:B.top,left:B.left,scaleX:B.width/this.content.clientWidth||1,scaleY:B.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new a.SceneCanvas({width:this.width(),height:this.height()}),this.bufferHitCanvas=new a.HitCanvas({pixelRatio:1,width:this.width(),height:this.height()}),!!o.Konva.isBrowser){var B=this.container();if(!B)throw"Stage has no container. A container is required.";B.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),B.appendChild(this.content),this._resizeDOM()}}cache(){return t.Util.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(B){B.batchDraw()}),this}}e.Stage=oe,oe.prototype.nodeType=u,(0,l._registerNode)(oe),n.Factory.addGetterSetter(oe,"container")}(nS);var Lc={},Ni={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Shape=e.shapes=void 0;const t=lt,n=qt,r=Sn,o=po,a=We,c=lt,l=An;var d="hasShadow",u="shadowRGBA",f="patternImage",p="linearGradient",h="radialGradient";let m;function b(){return m||(m=n.Util.createCanvasElement().getContext("2d"),m)}e.shapes={};function w(F){const R=this.attrs.fillRule;R?F.fill(R):F.fill()}function _(F){F.stroke()}function C(F){F.fill()}function k(F){F.stroke()}function S(){this._clearCache(d)}function E(){this._clearCache(u)}function T(){this._clearCache(f)}function A(){this._clearCache(p)}function O(){this._clearCache(h)}class I extends o.Node{constructor(R){super(R);let q;for(;q=n.Util.getRandomColor(),!(q&&!(q in e.shapes)););this.colorKey=q,e.shapes[q]=this}getContext(){return n.Util.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return n.Util.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(d,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(f,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var R=b();const q=R.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(q&&q.setTransform){const z=new n.Transform;z.translate(this.fillPatternX(),this.fillPatternY()),z.rotate(t.Konva.getAngle(this.fillPatternRotation())),z.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),z.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const G=z.getMatrix(),Y=typeof DOMMatrix=="undefined"?{a:G[0],b:G[1],c:G[2],d:G[3],e:G[4],f:G[5]}:new DOMMatrix(G);q.setTransform(Y)}return q}}_getLinearGradient(){return this._getCache(p,this.__getLinearGradient)}__getLinearGradient(){var R=this.fillLinearGradientColorStops();if(R){for(var q=b(),z=this.fillLinearGradientStartPoint(),G=this.fillLinearGradientEndPoint(),Y=q.createLinearGradient(z.x,z.y,G.x,G.y),Z=0;Z<R.length;Z+=2)Y.addColorStop(R[Z],R[Z+1]);return Y}}_getRadialGradient(){return this._getCache(h,this.__getRadialGradient)}__getRadialGradient(){var R=this.fillRadialGradientColorStops();if(R){for(var q=b(),z=this.fillRadialGradientStartPoint(),G=this.fillRadialGradientEndPoint(),Y=q.createRadialGradient(z.x,z.y,this.fillRadialGradientStartRadius(),G.x,G.y,this.fillRadialGradientEndRadius()),Z=0;Z<R.length;Z+=2)Y.addColorStop(R[Z],R[Z+1]);return Y}}getShadowRGBA(){return this._getCache(u,this._getShadowRGBA)}_getShadowRGBA(){if(this.hasShadow()){var R=n.Util.colorToRGBA(this.shadowColor());if(R)return"rgba("+R.r+","+R.g+","+R.b+","+R.a*(this.shadowOpacity()||1)+")"}}hasFill(){return this._calculate("hasFill",["fillEnabled","fill","fillPatternImage","fillLinearGradientColorStops","fillRadialGradientColorStops"],()=>this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const R=this.hitStrokeWidth();return R==="auto"?this.hasStroke():this.strokeEnabled()&&!!R}intersects(R){var q=this.getStage(),z=q.bufferHitCanvas,G;return z.getContext().clear(),this.drawHit(z,null,!0),G=z.context.getImageData(Math.round(R.x),Math.round(R.y),1,1).data,G[3]>0}destroy(){return o.Node.prototype.destroy.call(this),delete e.shapes[this.colorKey],delete this.colorKey,this}_useBufferCanvas(R){var q;if(!this.getStage()||!((q=this.attrs.perfectDrawEnabled)!==null&&q!==void 0?q:!0))return!1;const G=R||this.hasFill(),Y=this.hasStroke(),Z=this.getAbsoluteOpacity()!==1;if(G&&Y&&Z)return!0;const U=this.hasShadow(),j=this.shadowForStrokeEnabled();return!!(G&&Y&&U&&j)}setStrokeHitEnabled(R){n.Util.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),R?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var R=this.size();return{x:this._centroid?-R.width/2:0,y:this._centroid?-R.height/2:0,width:R.width,height:R.height}}getClientRect(R={}){const q=R.skipTransform,z=R.relativeTo,G=this.getSelfRect(),Z=!R.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,U=G.width+Z,j=G.height+Z,H=!R.skipShadow&&this.hasShadow(),M=H?this.shadowOffsetX():0,D=H?this.shadowOffsetY():0,te=U+Math.abs(M),V=j+Math.abs(D),ee=H&&this.shadowBlur()||0,X=te+ee*2,oe=V+ee*2,se={width:X,height:oe,x:-(Z/2+ee)+Math.min(M,0)+G.x,y:-(Z/2+ee)+Math.min(D,0)+G.y};return q?se:this._transformedRect(se,z)}drawScene(R,q){var z=this.getLayer(),G=R||z.getCanvas(),Y=G.getContext(),Z=this._getCanvasCache(),U=this.getSceneFunc(),j=this.hasShadow(),H,M,D,te=G.isCache,V=q===this;if(!this.isVisible()&&!V)return this;if(Z){Y.save();var ee=this.getAbsoluteTransform(q).getMatrix();return Y.transform(ee[0],ee[1],ee[2],ee[3],ee[4],ee[5]),this._drawCachedSceneCanvas(Y),Y.restore(),this}if(!U)return this;if(Y.save(),this._useBufferCanvas()&&!te){H=this.getStage(),M=H.bufferCanvas,D=M.getContext(),D.clear(),D.save(),D._applyLineJoin(this);var X=this.getAbsoluteTransform(q).getMatrix();D.transform(X[0],X[1],X[2],X[3],X[4],X[5]),U.call(this,D,this),D.restore();var oe=M.pixelRatio;j&&Y._applyShadow(this),Y._applyOpacity(this),Y._applyGlobalCompositeOperation(this),Y.drawImage(M._canvas,0,0,M.width/oe,M.height/oe)}else{if(Y._applyLineJoin(this),!V){var X=this.getAbsoluteTransform(q).getMatrix();Y.transform(X[0],X[1],X[2],X[3],X[4],X[5]),Y._applyOpacity(this),Y._applyGlobalCompositeOperation(this)}j&&Y._applyShadow(this),U.call(this,Y,this)}return Y.restore(),this}drawHit(R,q,z=!1){if(!this.shouldDrawHit(q,z))return this;var G=this.getLayer(),Y=R||G.hitCanvas,Z=Y&&Y.getContext(),U=this.hitFunc()||this.sceneFunc(),j=this._getCanvasCache(),H=j&&j.hit;if(this.colorKey||n.Util.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),H){Z.save();var M=this.getAbsoluteTransform(q).getMatrix();return Z.transform(M[0],M[1],M[2],M[3],M[4],M[5]),this._drawCachedHitCanvas(Z),Z.restore(),this}if(!U)return this;if(Z.save(),Z._applyLineJoin(this),!(this===q)){var te=this.getAbsoluteTransform(q).getMatrix();Z.transform(te[0],te[1],te[2],te[3],te[4],te[5])}return U.call(this,Z,this),Z.restore(),this}drawHitFromCache(R=0){var q=this._getCanvasCache(),z=this._getCachedSceneCanvas(),G=q.hit,Y=G.getContext(),Z=G.getWidth(),U=G.getHeight(),j,H,M,D,te,V;Y.clear(),Y.drawImage(z._canvas,0,0,Z,U);try{for(j=Y.getImageData(0,0,Z,U),H=j.data,M=H.length,D=n.Util._hexToRgb(this.colorKey),te=0;te<M;te+=4)V=H[te+3],V>R?(H[te]=D.r,H[te+1]=D.g,H[te+2]=D.b,H[te+3]=255):H[te+3]=0;Y.putImageData(j,0,0)}catch(ee){n.Util.error("Unable to draw hit graph from cached scene canvas. "+ee.message)}return this}hasPointerCapture(R){return l.hasPointerCapture(R,this)}setPointerCapture(R){l.setPointerCapture(R,this)}releaseCapture(R){l.releaseCapture(R,this)}}e.Shape=I,I.prototype._fillFunc=w,I.prototype._strokeFunc=_,I.prototype._fillFuncHit=C,I.prototype._strokeFuncHit=k,I.prototype._centroid=!1,I.prototype.nodeType="Shape",(0,c._registerNode)(I),I.prototype.eventListeners={},I.prototype.on.call(I.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",S),I.prototype.on.call(I.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",E),I.prototype.on.call(I.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",T),I.prototype.on.call(I.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",A),I.prototype.on.call(I.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",O),r.Factory.addGetterSetter(I,"stroke",void 0,(0,a.getStringOrGradientValidator)()),r.Factory.addGetterSetter(I,"strokeWidth",2,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(I,"fillAfterStrokeEnabled",!1),r.Factory.addGetterSetter(I,"hitStrokeWidth","auto",(0,a.getNumberOrAutoValidator)()),r.Factory.addGetterSetter(I,"strokeHitEnabled",!0,(0,a.getBooleanValidator)()),r.Factory.addGetterSetter(I,"perfectDrawEnabled",!0,(0,a.getBooleanValidator)()),r.Factory.addGetterSetter(I,"shadowForStrokeEnabled",!0,(0,a.getBooleanValidator)()),r.Factory.addGetterSetter(I,"lineJoin"),r.Factory.addGetterSetter(I,"lineCap"),r.Factory.addGetterSetter(I,"sceneFunc"),r.Factory.addGetterSetter(I,"hitFunc"),r.Factory.addGetterSetter(I,"dash"),r.Factory.addGetterSetter(I,"dashOffset",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(I,"shadowColor",void 0,(0,a.getStringValidator)()),r.Factory.addGetterSetter(I,"shadowBlur",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(I,"shadowOpacity",1,(0,a.getNumberValidator)()),r.Factory.addComponentsGetterSetter(I,"shadowOffset",["x","y"]),r.Factory.addGetterSetter(I,"shadowOffsetX",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(I,"shadowOffsetY",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(I,"fillPatternImage"),r.Factory.addGetterSetter(I,"fill",void 0,(0,a.getStringOrGradientValidator)()),r.Factory.addGetterSetter(I,"fillPatternX",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(I,"fillPatternY",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(I,"fillLinearGradientColorStops"),r.Factory.addGetterSetter(I,"strokeLinearGradientColorStops"),r.Factory.addGetterSetter(I,"fillRadialGradientStartRadius",0),r.Factory.addGetterSetter(I,"fillRadialGradientEndRadius",0),r.Factory.addGetterSetter(I,"fillRadialGradientColorStops"),r.Factory.addGetterSetter(I,"fillPatternRepeat","repeat"),r.Factory.addGetterSetter(I,"fillEnabled",!0),r.Factory.addGetterSetter(I,"strokeEnabled",!0),r.Factory.addGetterSetter(I,"shadowEnabled",!0),r.Factory.addGetterSetter(I,"dashEnabled",!0),r.Factory.addGetterSetter(I,"strokeScaleEnabled",!0),r.Factory.addGetterSetter(I,"fillPriority","color"),r.Factory.addComponentsGetterSetter(I,"fillPatternOffset",["x","y"]),r.Factory.addGetterSetter(I,"fillPatternOffsetX",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(I,"fillPatternOffsetY",0,(0,a.getNumberValidator)()),r.Factory.addComponentsGetterSetter(I,"fillPatternScale",["x","y"]),r.Factory.addGetterSetter(I,"fillPatternScaleX",1,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(I,"fillPatternScaleY",1,(0,a.getNumberValidator)()),r.Factory.addComponentsGetterSetter(I,"fillLinearGradientStartPoint",["x","y"]),r.Factory.addComponentsGetterSetter(I,"strokeLinearGradientStartPoint",["x","y"]),r.Factory.addGetterSetter(I,"fillLinearGradientStartPointX",0),r.Factory.addGetterSetter(I,"strokeLinearGradientStartPointX",0),r.Factory.addGetterSetter(I,"fillLinearGradientStartPointY",0),r.Factory.addGetterSetter(I,"strokeLinearGradientStartPointY",0),r.Factory.addComponentsGetterSetter(I,"fillLinearGradientEndPoint",["x","y"]),r.Factory.addComponentsGetterSetter(I,"strokeLinearGradientEndPoint",["x","y"]),r.Factory.addGetterSetter(I,"fillLinearGradientEndPointX",0),r.Factory.addGetterSetter(I,"strokeLinearGradientEndPointX",0),r.Factory.addGetterSetter(I,"fillLinearGradientEndPointY",0),r.Factory.addGetterSetter(I,"strokeLinearGradientEndPointY",0),r.Factory.addComponentsGetterSetter(I,"fillRadialGradientStartPoint",["x","y"]),r.Factory.addGetterSetter(I,"fillRadialGradientStartPointX",0),r.Factory.addGetterSetter(I,"fillRadialGradientStartPointY",0),r.Factory.addComponentsGetterSetter(I,"fillRadialGradientEndPoint",["x","y"]),r.Factory.addGetterSetter(I,"fillRadialGradientEndPointX",0),r.Factory.addGetterSetter(I,"fillRadialGradientEndPointY",0),r.Factory.addGetterSetter(I,"fillPatternRotation",0),r.Factory.addGetterSetter(I,"fillRule",void 0,(0,a.getStringValidator)()),r.Factory.backCompat(I,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"})})(Ni),Object.defineProperty(Lc,"__esModule",{value:!0}),Lc.Layer=void 0;const Ti=qt,Ov=us,wa=po,Iv=Sn,oS=_r,qie=We,Hie=Ni,Gie=lt;var Wie="#",Kie="beforeDraw",Yie="draw",sS=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],Jie=sS.length;class _a extends Ov.Container{constructor(t){super(t),this.canvas=new oS.SceneCanvas,this.hitCanvas=new oS.HitCanvas({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t<n.children.length-1?n.content.insertBefore(this.getNativeCanvasElement(),n.children[t+1].getCanvas()._canvas):n.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){wa.Node.prototype.moveToTop.call(this);var t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){var t=wa.Node.prototype.moveUp.call(this);if(!t)return!1;var n=this.getStage();return!n||!n.content?!1:(n.content.removeChild(this.getNativeCanvasElement()),this.index<n.children.length-1?n.content.insertBefore(this.getNativeCanvasElement(),n.children[this.index+1].getCanvas()._canvas):n.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(wa.Node.prototype.moveDown.call(this)){var t=this.getStage();if(t){var n=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),n[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(wa.Node.prototype.moveToBottom.call(this)){var t=this.getStage();if(t){var n=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),n[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){var t=this.getNativeCanvasElement();return wa.Node.prototype.remove.call(this),t&&t.parentNode&&Ti.Util._isInDocument(t)&&t.parentNode.removeChild(t),this}getStage(){return this.parent}setSize({width:t,height:n}){return this.canvas.setSize(t,n),this.hitCanvas.setSize(t,n),this._setSmoothEnabled(),this}_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&Ti.Util.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(t){return t=t||{},t.width=t.width||this.getWidth(),t.height=t.height||this.getHeight(),t.x=t.x!==void 0?t.x:this.x(),t.y=t.y!==void 0?t.y:this.y(),wa.Node.prototype._toKonvaCanvas.call(this,t)}_checkVisibility(){this.visible()?this.canvas._canvas.style.display="block":this.canvas._canvas.style.display="none"}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){Ti.Util.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){Ti.Util.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,Ti.Util.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let o=0;o<Jie;o++){const a=sS[o],c=this._getIntersection({x:t.x+a.x*n,y:t.y+a.y*n}),l=c.shape;if(l)return l;if(r=!!c.antialiased,!c.antialiased)break}if(r)n+=1;else return null}}_getIntersection(t){const n=this.hitCanvas.pixelRatio,r=this.hitCanvas.context.getImageData(Math.round(t.x*n),Math.round(t.y*n),1,1).data,o=r[3];if(o===255){const a=Ti.Util._rgbToHex(r[0],r[1],r[2]),c=Hie.shapes[Wie+a];return c?{shape:c}:{antialiased:!0}}else if(o>0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),o=t||r&&r.getCanvas();return this._fire(Kie,{node:this}),this.clearBeforeDraw()&&o.getContext().clear(),Ov.Container.prototype.drawScene.call(this,o,n),this._fire(Yie,{node:this}),this}drawHit(t,n){var r=this.getLayer(),o=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),Ov.Container.prototype.drawHit.call(this,o,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){Ti.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return Ti.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}destroy(){return Ti.Util.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}Lc.Layer=_a,_a.prototype.nodeType="Layer",(0,Gie._registerNode)(_a),Iv.Factory.addGetterSetter(_a,"imageSmoothingEnabled",!0),Iv.Factory.addGetterSetter(_a,"clearBeforeDraw",!0),Iv.Factory.addGetterSetter(_a,"hitGraphEnabled",!0,(0,qie.getBooleanValidator)());var Lf={};Object.defineProperty(Lf,"__esModule",{value:!0}),Lf.FastLayer=void 0;const Xie=qt,Qie=Lc,Zie=lt;class Rv extends Qie.Layer{constructor(t){super(t),this.listening(!1),Xie.Util.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}Lf.FastLayer=Rv,Rv.prototype.nodeType="FastLayer",(0,Zie._registerNode)(Rv);var Bf={};Object.defineProperty(Bf,"__esModule",{value:!0}),Bf.Group=void 0;const Vie=qt,eoe=us,toe=lt;class Pv extends eoe.Container{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&Vie.Util.throw("You may only add groups and shapes to groups.")}}Bf.Group=Pv,Pv.prototype.nodeType="Group",(0,toe._registerNode)(Pv);var Bc={};Object.defineProperty(Bc,"__esModule",{value:!0}),Bc.Animation=void 0;const Lv=lt,aS=qt;var Bv=function(){return Lv.glob.performance&&Lv.glob.performance.now?function(){return Lv.glob.performance.now()}:function(){return new Date().getTime()}}();class Gr{constructor(t,n){this.id=Gr.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:Bv(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,o;for(o=0;o<r;o++)if(n[o]._id===t._id)return!1;return this.layers.push(t),!0}isRunning(){var t=Gr,n=t.animations,r=n.length,o;for(o=0;o<r;o++)if(n[o].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=Bv(),Gr._addAnimation(this),this}stop(){return Gr._removeAnimation(this),this}_updateFrameObject(t){this.frame.timeDiff=t-this.frame.lastTime,this.frame.lastTime=t,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(t){this.animations.push(t),this._handleAnimation()}static _removeAnimation(t){var n=t.id,r=this.animations,o=r.length,a;for(a=0;a<o;a++)if(r[a].id===n){this.animations.splice(a,1);break}}static _runFrames(){var t={},n=this.animations,r,o,a,c,l,d,u,f,p;for(c=0;c<n.length;c++)if(r=n[c],o=r.layers,a=r.func,r._updateFrameObject(Bv()),d=o.length,a?p=a.call(r,r.frame)!==!1:p=!0,!!p)for(l=0;l<d;l++)u=o[l],u._id!==void 0&&(t[u._id]=u);for(f in t)t.hasOwnProperty(f)&&t[f].batchDraw()}static _animationLoop(){var t=Gr;t.animations.length?(t._runFrames(),aS.Util.requestAnimFrame(t._animationLoop)):t.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,aS.Util.requestAnimFrame(this._animationLoop))}}Bc.Animation=Gr,Gr.animations=[],Gr.animIdCounter=0,Gr.animRunning=!1;var lS={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Easings=e.Tween=void 0;const t=qt,n=Bc,r=po,o=lt;var a={node:1,duration:1,easing:1,onFinish:1,yoyo:1},c=1,l=2,d=3,u=0,f=["fill","stroke","shadowColor"];class p{constructor(b,w,_,C,k,S,E){this.prop=b,this.propFunc=w,this.begin=C,this._pos=C,this.duration=S,this._change=0,this.prevPos=0,this.yoyo=E,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=_,this._change=k-this.begin,this.pause()}fire(b){var w=this[b];w&&w()}setTime(b){b>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():b<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=b,this.update())}getTime(){return this._time}setPosition(b){this.prevPos=this._pos,this.propFunc(b),this._pos=b}getPosition(b){return b===void 0&&(b=this._time),this.func(b,this.begin,this._change,this.duration)}play(){this.state=l,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=d,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(b){this.pause(),this._time=b,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var b=this.getTimer()-this._startTime;this.state===l?this.setTime(b):this.state===d&&this.setTime(this.duration-b)}pause(){this.state=c,this.fire("onPause")}getTimer(){return new Date().getTime()}}class h{constructor(b){var w=this,_=b.node,C=_._id,k,S=b.easing||e.Easings.Linear,E=!!b.yoyo,T;typeof b.duration=="undefined"?k=.3:b.duration===0?k=.001:k=b.duration,this.node=_,this._id=u++;var A=_.getLayer()||(_ instanceof o.Konva.Stage?_.getLayers():null);A||t.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new n.Animation(function(){w.tween.onEnterFrame()},A),this.tween=new p(T,function(O){w._tweenFunc(O)},S,0,1,k*1e3,E),this._addListeners(),h.attrs[C]||(h.attrs[C]={}),h.attrs[C][this._id]||(h.attrs[C][this._id]={}),h.tweens[C]||(h.tweens[C]={});for(T in b)a[T]===void 0&&this._addAttr(T,b[T]);this.reset(),this.onFinish=b.onFinish,this.onReset=b.onReset,this.onUpdate=b.onUpdate}_addAttr(b,w){var _=this.node,C=_._id,k,S,E,T,A,O,I,F;if(E=h.tweens[C][b],E&&delete h.attrs[C][E][b],k=_.getAttr(b),t.Util._isArray(w))if(S=[],A=Math.max(w.length,k.length),b==="points"&&w.length!==k.length&&(w.length>k.length?(I=k,k=t.Util._prepareArrayForTween(k,w,_.closed())):(O=w,w=t.Util._prepareArrayForTween(w,k,_.closed()))),b.indexOf("fill")===0)for(T=0;T<A;T++)if(T%2===0)S.push(w[T]-k[T]);else{var R=t.Util.colorToRGBA(k[T]);F=t.Util.colorToRGBA(w[T]),k[T]=R,S.push({r:F.r-R.r,g:F.g-R.g,b:F.b-R.b,a:F.a-R.a})}else for(T=0;T<A;T++)S.push(w[T]-k[T]);else f.indexOf(b)!==-1?(k=t.Util.colorToRGBA(k),F=t.Util.colorToRGBA(w),S={r:F.r-k.r,g:F.g-k.g,b:F.b-k.b,a:F.a-k.a}):S=w-k;h.attrs[C][this._id][b]={start:k,diff:S,end:w,trueEnd:O,trueStart:I},h.tweens[C][b]=this._id}_tweenFunc(b){var w=this.node,_=h.attrs[w._id][this._id],C,k,S,E,T,A,O,I;for(C in _){if(k=_[C],S=k.start,E=k.diff,I=k.end,t.Util._isArray(S))if(T=[],O=Math.max(S.length,I.length),C.indexOf("fill")===0)for(A=0;A<O;A++)A%2===0?T.push((S[A]||0)+E[A]*b):T.push("rgba("+Math.round(S[A].r+E[A].r*b)+","+Math.round(S[A].g+E[A].g*b)+","+Math.round(S[A].b+E[A].b*b)+","+(S[A].a+E[A].a*b)+")");else for(A=0;A<O;A++)T.push((S[A]||0)+E[A]*b);else f.indexOf(C)!==-1?T="rgba("+Math.round(S.r+E.r*b)+","+Math.round(S.g+E.g*b)+","+Math.round(S.b+E.b*b)+","+(S.a+E.a*b)+")":T=S+E*b;w.setAttr(C,T)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var b=this.node,w=h.attrs[b._id][this._id];w.points&&w.points.trueEnd&&b.setAttr("points",w.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var b=this.node,w=h.attrs[b._id][this._id];w.points&&w.points.trueStart&&b.points(w.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(b){return this.tween.seek(b*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var b=this.node._id,w=this._id,_=h.tweens[b],C;this.pause();for(C in _)delete h.tweens[b][C];delete h.attrs[b][w]}}e.Tween=h,h.attrs={},h.tweens={},r.Node.prototype.to=function(m){var b=m.onFinish;m.node=this,m.onFinish=function(){this.destroy(),b&&b()};var w=new h(m);w.play()},e.Easings={BackEaseIn(m,b,w,_){var C=1.70158;return w*(m/=_)*m*((C+1)*m-C)+b},BackEaseOut(m,b,w,_){var C=1.70158;return w*((m=m/_-1)*m*((C+1)*m+C)+1)+b},BackEaseInOut(m,b,w,_){var C=1.70158;return(m/=_/2)<1?w/2*(m*m*(((C*=1.525)+1)*m-C))+b:w/2*((m-=2)*m*(((C*=1.525)+1)*m+C)+2)+b},ElasticEaseIn(m,b,w,_,C,k){var S=0;return m===0?b:(m/=_)===1?b+w:(k||(k=_*.3),!C||C<Math.abs(w)?(C=w,S=k/4):S=k/(2*Math.PI)*Math.asin(w/C),-(C*Math.pow(2,10*(m-=1))*Math.sin((m*_-S)*(2*Math.PI)/k))+b)},ElasticEaseOut(m,b,w,_,C,k){var S=0;return m===0?b:(m/=_)===1?b+w:(k||(k=_*.3),!C||C<Math.abs(w)?(C=w,S=k/4):S=k/(2*Math.PI)*Math.asin(w/C),C*Math.pow(2,-10*m)*Math.sin((m*_-S)*(2*Math.PI)/k)+w+b)},ElasticEaseInOut(m,b,w,_,C,k){var S=0;return m===0?b:(m/=_/2)===2?b+w:(k||(k=_*(.3*1.5)),!C||C<Math.abs(w)?(C=w,S=k/4):S=k/(2*Math.PI)*Math.asin(w/C),m<1?-.5*(C*Math.pow(2,10*(m-=1))*Math.sin((m*_-S)*(2*Math.PI)/k))+b:C*Math.pow(2,-10*(m-=1))*Math.sin((m*_-S)*(2*Math.PI)/k)*.5+w+b)},BounceEaseOut(m,b,w,_){return(m/=_)<1/2.75?w*(7.5625*m*m)+b:m<2/2.75?w*(7.5625*(m-=1.5/2.75)*m+.75)+b:m<2.5/2.75?w*(7.5625*(m-=2.25/2.75)*m+.9375)+b:w*(7.5625*(m-=2.625/2.75)*m+.984375)+b},BounceEaseIn(m,b,w,_){return w-e.Easings.BounceEaseOut(_-m,0,w,_)+b},BounceEaseInOut(m,b,w,_){return m<_/2?e.Easings.BounceEaseIn(m*2,0,w,_)*.5+b:e.Easings.BounceEaseOut(m*2-_,0,w,_)*.5+w*.5+b},EaseIn(m,b,w,_){return w*(m/=_)*m+b},EaseOut(m,b,w,_){return-w*(m/=_)*(m-2)+b},EaseInOut(m,b,w,_){return(m/=_/2)<1?w/2*m*m+b:-w/2*(--m*(m-2)-1)+b},StrongEaseIn(m,b,w,_){return w*(m/=_)*m*m*m*m+b},StrongEaseOut(m,b,w,_){return w*((m=m/_-1)*m*m*m*m+1)+b},StrongEaseInOut(m,b,w,_){return(m/=_/2)<1?w/2*m*m*m*m*m+b:w/2*((m-=2)*m*m*m*m+2)+b},Linear(m,b,w,_){return w*m/_+b}}})(lS),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Konva=void 0;const t=lt,n=qt,r=po,o=us,a=nS,c=Lc,l=Lf,d=Bf,u=Tf,f=Ni,p=Bc,h=lS,m=xi,b=_r;e.Konva=n.Util._assign(t.Konva,{Util:n.Util,Transform:n.Transform,Node:r.Node,Container:o.Container,Stage:a.Stage,stages:a.stages,Layer:c.Layer,FastLayer:l.FastLayer,Group:d.Group,DD:u.DD,Shape:f.Shape,shapes:f.shapes,Animation:p.Animation,Tween:h.Tween,Easings:h.Easings,Context:m.Context,Canvas:b.Canvas}),e.default=e.Konva}(xv),function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Konva=void 0;var n=xv;Object.defineProperty(t,"Konva",{enumerable:!0,get:function(){return n.Konva}});const r=xv;e.exports=r.Konva}(rie,Sf);const ct=l6(Sf);var Dv={};Object.defineProperty(Dv,"__esModule",{value:!0}),Dv.Rect=void 0;const noe=Sn,roe=Ni,ioe=lt,ooe=qt,soe=We;class Df extends roe.Shape{_sceneFunc(t){var n=this.cornerRadius(),r=this.width(),o=this.height();t.beginPath(),n?ooe.Util.drawRoundedRectPath(t,r,o,n):t.rect(0,0,r,o),t.closePath(),t.fillStrokeShape(this)}}Dv.Rect=Df,Df.prototype.className="Rect",(0,ioe._registerNode)(Df),noe.Factory.addGetterSetter(Df,"cornerRadius",0,(0,soe.getNumberOrArrayOfNumbersValidator)(4));var Mv={};Object.defineProperty(Mv,"__esModule",{value:!0}),Mv.Circle=void 0;const aoe=Sn,loe=Ni,coe=We,doe=lt;class Ca extends loe.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}Mv.Circle=Ca,Ca.prototype._centroid=!0,Ca.prototype.className="Circle",Ca.prototype._attrsAffectingSize=["radius"],(0,doe._registerNode)(Ca),aoe.Factory.addGetterSetter(Ca,"radius",0,(0,coe.getNumberValidator)());var Fv={};Object.defineProperty(Fv,"__esModule",{value:!0}),Fv.Image=void 0;const $v=qt,hs=Sn,uoe=Ni,foe=lt,Dc=We;let Wr=class eL extends uoe.Shape{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),o=this.cornerRadius(),a=this.attrs.image;let c;if(a){const l=this.attrs.cropWidth,d=this.attrs.cropHeight;l&&d?c=[a,this.cropX(),this.cropY(),l,d,0,0,n,r]:c=[a,0,0,n,r]}(this.hasFill()||this.hasStroke()||o)&&(t.beginPath(),o?$v.Util.drawRoundedRectPath(t,n,r,o):t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),a&&(o&&t.clip(),t.drawImage.apply(t,c))}_hitFunc(t){var n=this.width(),r=this.height(),o=this.cornerRadius();t.beginPath(),o?$v.Util.drawRoundedRectPath(t,n,r,o):t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var o=$v.Util.createImageElement();o.onload=function(){var a=new eL({image:o});n(a)},o.onerror=r,o.crossOrigin="Anonymous",o.src=t}};Fv.Image=Wr,Wr.prototype.className="Image",(0,foe._registerNode)(Wr),hs.Factory.addGetterSetter(Wr,"cornerRadius",0,(0,Dc.getNumberOrArrayOfNumbersValidator)(4)),hs.Factory.addGetterSetter(Wr,"image"),hs.Factory.addComponentsGetterSetter(Wr,"crop",["x","y","width","height"]),hs.Factory.addGetterSetter(Wr,"cropX",0,(0,Dc.getNumberValidator)()),hs.Factory.addGetterSetter(Wr,"cropY",0,(0,Dc.getNumberValidator)()),hs.Factory.addGetterSetter(Wr,"cropWidth",0,(0,Dc.getNumberValidator)()),hs.Factory.addGetterSetter(Wr,"cropHeight",0,(0,Dc.getNumberValidator)());var Mc={};Object.defineProperty(Mc,"__esModule",{value:!0}),Mc.Text=Mc.stringToArray=void 0;const zv=qt,ln=Sn,hoe=Ni,mo=We,poe=lt;function cS(e){return Array.from(e)}Mc.stringToArray=cS;var Sa="auto",goe="center",Fc="justify",moe="Change.konva",voe="2d",dS="-",uS="left",yoe="text",boe="Text",woe="top",_oe="bottom",fS="middle",hS="normal",Coe="px ",Mf=" ",Soe="right",Eoe="word",xoe="char",pS="none",Uv="…",gS=["fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],koe=gS.length;function Noe(e){return e.split(",").map(t=>{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var Ff;function jv(){return Ff||(Ff=zv.Util.createCanvasElement().getContext(voe),Ff)}function Toe(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function Aoe(e){e.setAttr("miterLimit",2),e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function Ooe(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class Tt extends hoe.Shape{constructor(t){super(Ooe(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n<koe;n++)this.on(gS[n]+moe,this._setTextData);this._setTextData()}_sceneFunc(t){var n=this.textArr,r=n.length;if(this.text()){var o=this.padding(),a=this.fontSize(),c=this.lineHeight()*a,l=this.verticalAlign(),d=0,u=this.align(),f=this.getWidth(),p=this.letterSpacing(),h=this.fill(),m=this.textDecoration(),b=m.indexOf("underline")!==-1,w=m.indexOf("line-through")!==-1,_,C=0,C=c/2,k=0,S=0;for(t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",fS),t.setAttr("textAlign",uS),l===fS?d=(this.getHeight()-r*c-o*2)/2:l===_oe&&(d=this.getHeight()-r*c-o*2),t.translate(o,d+o),_=0;_<r;_++){var k=0,S=0,E=n[_],T=E.text,A=E.width,O=E.lastInParagraph,I,F,R;if(t.save(),u===Soe?k+=f-A-o*2:u===goe&&(k+=(f-A-o*2)/2),b){t.save(),t.beginPath(),t.moveTo(k,C+S+Math.round(a/2)),I=T.split(" ").length-1,F=I===0,R=u===Fc&&!O?f-o*2:A,t.lineTo(k+Math.round(R),C+S+Math.round(a/2)),t.lineWidth=a/15;const U=this._getLinearGradient();t.strokeStyle=U||h,t.stroke(),t.restore()}if(w){t.save(),t.beginPath(),t.moveTo(k,C+S),I=T.split(" ").length-1,F=I===0,R=u===Fc&&O&&!F?f-o*2:A,t.lineTo(k+Math.round(R),C+S),t.lineWidth=a/15;const U=this._getLinearGradient();t.strokeStyle=U||h,t.stroke(),t.restore()}if(p!==0||u===Fc){I=T.split(" ").length-1;for(var q=cS(T),z=0;z<q.length;z++){var G=q[z];G===" "&&!O&&u===Fc&&(k+=(f-o*2-A)/I),this._partialTextX=k,this._partialTextY=C+S,this._partialText=G,t.fillStrokeShape(this),k+=this.measureSize(G).width+p}}else this._partialTextX=k,this._partialTextY=C+S,this._partialText=T,t.fillStrokeShape(this);t.restore(),r>1&&(C+=c)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=zv.Util._isString(t)?t:t==null?"":t+"";return this._setAttr(yoe,n),this}getWidth(){var t=this.attrs.width===Sa||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Sa||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return zv.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=jv(),r=this.fontSize(),o;return n.save(),n.font=this._getContextFont(),o=n.measureText(t),n.restore(),{width:o.width,height:r}}_getContextFont(){return this.fontStyle()+Mf+this.fontVariant()+Mf+(this.fontSize()+Coe)+Noe(this.fontFamily())}_addTextLine(t){this.align()===Fc&&(t=t.trim());var r=this._getTextWidth(t);return this.textArr.push({text:t,width:r,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return jv().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(`
134
+ `)}manageSpecialValue(t){t=t.replace(/"{2,}/g,"");const n=/"{1}[^"]*"{1}/g,r=t.match(n);return r!==null&&r.map(o=>(t=t.replace(o,o.replace(/,/g,Ev)),o.replace(/,/g,Ev))),t}reverseSpecialValue(t){const n=new RegExp(Ev,"g");return t.map(r=>{for(const o in r){const a=r[o].replace(n,",");r[o]=a}return r})}convertToGraphData(t){const n=[];let r=t.filter(a=>a.Label===void 0),o=t.filter(a=>a.Label!==void 0);return r=r.map(a=>this.getGraphNode(a)),o=o.map((a,c)=>{const l="Source Entity ID",d="Target Entity ID",u="Label",f=this.getNode(a[l],r)[0],p=this.getNode(a[d],r)[0];return a[u]!==""&&n.push({id:p.id,label:a[u]}),{source:f.id,target:p.id,type:f.type+"-"+p.type,uniqueIndex:c}}),r=r.map(a=>(delete a.entityId,n.map(c=>{c.id===a.id&&(a.name=c.label)}),a)),{nodes:r,links:o}}getGraphNode(t){const n=CC.nodeMapReverse,r=bv.entitys;let o="",a="",c="",l=null,d=null;return r.map(u=>{const f=u.type,p=u.columnsFields[1];t[f]!==void 0&&(a=n[f],o=t[p],c=t[f],l=this.manageNodeDetail(u.columnsFields,t,n[f]),d=this.manageNodeFieldMap(n[f]))}),{id:o,type:a,name:o,entityId:c,detail:l,fieldMap:d,show:!0}}manageNodeFieldMap(t){return this.fieldMap[t]}manageNodeDetail(t,n,r){let o=null,a=!1;if(r!=="nodeType"){o={info:{basic:{}},tags:[]};for(const c in n)if(t.indexOf(c)===-1){a=!0;const l=n[c];c==="tags"&&l!==""?o.tags=l.split(",").map(d=>({name:d,desc:d})):o.info.basic[c]=n[c]}a===!1&&(o=null)}return o}getNode(t,n){return n.filter(r=>r.entityId===t)}outputData(){return this.data}}const _Ne="",qre={name:"ButtonList",components:{"force-graph-svg-icon":ss,addNode:$ne,addLink:qne,intro:Qne,UploadFilled:sj},mixins:[jr],props:{hideButtonList:{type:Array,default:()=>[]},selection:{type:Array,default:()=>[]},history:{type:Object,default:()=>({dataNow:{}})},moduleDetail:{type:Object,default:()=>{}},requestGraphData:{type:Boolean,default:!0}},emits:["fixNodes","toggleLayout","addNodes","addLink","importCsvData","autoDisplay","toggleMove","deleteNodes","saveSnapshot"],data(){return{maxTrans:0,nowTrans:0,onceTrans:300,dialogVisible:!1,exportFormat:0,formatOptions:[{value:0,label:"JSON"},{value:2,label:"CSV"}],isAllFix:!1,dialogImportVisible:!1,importFileList:[],importFile:null,intro:!1,current:null,addType:"",flageAlias:!0}},computed:{buttonList(){var e,t;return[{hover:!1,icon:"hm_icon_add",disable:!this.requestGraphData,fun:this.addNode,name:"新增节点",params:"diy"},{hover:!1,icon:"hm_icon_del",disable:this.selection.length===0||!this.requestGraphData,fun:this.deleteNodes,name:"删除"},{hover:!1,icon:"hm_icon_snapshot",disable:!this.requestGraphData,fun:this.addSnapshot,name:"保存快照",hide:!((t=(e=this.moduleDetail)==null?void 0:e.config)!=null&&t.hasSnapshot)},{hover:!1,icon:"hm_icon_img",disable:!this.requestGraphData,fun:this.saveAsImg,name:"保存图片"},{hover:!1,icon:"hm_icon_export",disable:!this.requestGraphData,fun:this.exportData,name:"数据导出"},{hover:!1,icon:"hm_icon_import",disable:!this.requestGraphData,fun:this.importData,name:"数据导入"},{hover:!1,icon:"hm_icon_undo",disable:this.history.currentIndex<=0||!this.requestGraphData,fun:this.backHistory,name:"撤销"},{hover:!1,icon:"hm_icon_redo",disable:this.history.currentIndex>=this.history.length-1||!this.requestGraphData,fun:this.forwardHistory,name:"恢复"},{hover:!1,icon:"hm_icon_auto",fun:this.autoDisplay,name:"自动布局"},{hover:!1,icon:"hm_icon_fix",fun:this.fixNodes,name:"全局固定",params:!0,hide:this.isAllFix},{hover:!1,icon:"hm_icon_unfix",fun:this.fixNodes,name:"全局解除固定",params:!1,hide:!this.isAllFix},{hover:!1,icon:"hm_icon_tree",fun:this.toggleLayout,name:"树型布局",params:1,hide:this.history.layoutIndex===1},{hover:!1,icon:"hm_icon_force",fun:this.toggleLayout,name:"斥力布局",params:0,hide:this.history.layoutIndex===0}]},buttonListShow(){return this.buttonList.filter(e=>e.hide!==!0&&!this.hideButtonList.includes(e.name))}},mounted(){},methods:{hover(e){this.current=e},out(){this.current=null},autoDisplay(){ye(this,"autoDisplay")},fixNodes(e=!0){ye(this,"fixNodes",e),this.isAllFix=e},toggleMove(){ye(this,"toggleMove")},toggleLayout(e){ye(this,"toggleLayout",e)},addNode(e,t){this.addType=e,this.$refs.addNode.show(t)},addNodes({node:e,type:t,connectNode:n}){ye(this,"addNodes",{node:e,type:t,connectNode:n})},addLink({source:e,target:t}){ye(this,"addLink",{source:e,target:t})},backHistory(){this.$parent.historyBack()},forwardHistory(){this.history.forward()},dataURLToBlob(e){const t=e.split(","),n=t[0].match(/:(.*?);/)[1],r=atob(t[1]);let o=r.length;const a=new Uint8Array(o);for(;o--;)a[o]=r.charCodeAt(o);return new Blob([a],{type:n})},downloadURI(e,t){const n=document.createElement("a");n.download=t,n.href=e,document.body.appendChild(n),n.click(),document.body.removeChild(n)},saveAsImg(){return Te(this,null,function*(){var t,n;this.$parent.bigLoading=!0;const e=yield this.svgToUrl();this.downloadURI(e,`${((n=(t=this.history.dataNow)==null?void 0:t.nodes[0])==null?void 0:n.id)||"img"}_${new Date().getTime()}.png`),this.$parent.bigLoading=!1})},svgToUrl(){return Te(this,null,function*(){this.$parent.centerAndZoom(),this.$parent.addCanvasBg();const t=this.$parent.getCanvasStage().toDataURL({mimeType:"image/png"});return this.$parent.removeCanvasBg(),this.$parent.reset(),t})},svgToBlob(){return Te(this,null,function*(){this.$parent.centerAndZoom(),this.$parent.addCanvasBg();const e=this.$parent.getCanvasStage();e.find("Image").forEach(n=>{const r=n.image();r&&(r.crossOrigin="Anonymous")});const t=yield e.toBlob();return this.$parent.removeCanvasBg(),this.$parent.reset(),t})},deleteNodes(){ye(this,"deleteNodes")},addSnapshot(){ye(this,"saveSnapshot")},exportData(){this.handleOpenModal()},handleOpenModal(){this.dialogVisible=!0},handleCloseModal(){this.dialogVisible=!1},handleExportData(){var c,l,d,u;let e=null,t=null,n=null,r=null;this.selection.length>0?(n=s.toRaw(this.selection),r=[]):(n=s.toRaw(this.history.dataNow.nodes),r=s.toRaw(this.history.dataNow.links));const o=n.map(f=>{const{id:p,type:h,detail:m}=f;return{id:p,type:h,detail:m}}),a=r.map(f=>{const{source:p,target:h}=f;return{source:p,target:h}});this.exportFormat===0?(e=JSON.stringify(o),t=`${((l=(c=this.history.dataNow)==null?void 0:c.nodes[0])==null?void 0:l.id)||"file"}_${new Date().getTime()}.json`):(e=this.setMalteGoCsv({nodes:o,links:a}),t=`${((u=(d=this.history.dataNow)==null?void 0:d.nodes[0])==null?void 0:u.id)||"file"}_${new Date().getTime()}.csv`),YQ(e,t),this.handleCloseModal()},importData(){this.handleOpenImportModal()},handleOpenImportModal(){this.dialogImportVisible=!0},handleCloseImportModal(){this.dialogImportVisible=!1,this.importFileList=[],this.importFile=null},handleImportData(){try{const e=this.getFieldMap(),n=new jre(this.importFile,e).outputData();ye(this,"importCsvData",{nodes:n.nodes,links:n.links})}catch(e){Lt({message:e,type:"error"})}this.handleCloseImportModal()},getFieldMap(){const e=this.moduleDetail.detail_field_map,t={};for(const n in e){const r=n.substring(0,n.indexOf("_detail_info"));t[r]=JSON.parse(JSON.stringify(e[n]))}return t},handleFileChange(e){this.importFile=e;const t=new FileReader;t.onload=()=>{t.result&&(this.importFile=t.result)},t.readAsText(e.raw)},handleFileRemove(){this.importFile=null,this.importFileList=[]},setMalteGoCsv(e){return new Vne(e).outputCsvFile()},showIntro(){this.intro=!0},hideIntro(){this.intro=!1},handleAlias(e){this.flageAlias=!e;const t=document.getElementsByClassName("right-menu-box")[0],n=document.getElementsByClassName("graph-box")[0];t&&(e?(t.style.display="none",n.style.width="100%"):(t.style.display="inline-block",n.style.width="1%"))},permissionitem(){return this.requestGraphData?!0:(Lt({message:"无可操作权限",type:"warning"}),!1)},handleIconClick(e){this.permissionitem()&&(en({cId:"buttonList-"+e.icon,c:"顶部按钮-"+e.name}),e.fun(e.params))}}},Hre={class:"button-container"},Gre={ref:"container",class:"button-box"},Wre={ref:"box",class:"all-button"},Kre=["onClick"],Yre={class:"float-right"},Jre={class:"button-one intro-button"},Xre={class:"dialog-footer"},Qre=s.createElementVNode("div",{class:"el-upload__text"},[s.createTextVNode("将文件拖到此处,或"),s.createElementVNode("em",null,"点击上传")],-1),Zre=s.createElementVNode("div",{class:"el-upload__tip"},"只能上传由 Maltego 软件导出的csv文件",-1),Vre={class:"dialog-footer"},eie={class:"intro"};function tie(e,t,n,r,o,a){const c=s.resolveComponent("force-graph-svg-icon"),l=Hn,d=s.resolveComponent("intro"),u=iJ,f=ef,p=Vu,h=ns,m=kc,b=s.resolveComponent("UploadFilled"),w=Qe,_=eQ,C=s.resolveComponent("addNode"),k=s.resolveComponent("addLink");return s.openBlock(),s.createElementBlock("div",Hre,[s.createElementVNode("div",Gre,[s.createElementVNode("div",Wre,[s.createElementVNode("div",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.buttonListShow,(S,E)=>(s.openBlock(),s.createBlock(l,{key:E,class:"item",effect:"dark",content:S.name,placement:"bottom","popper-class":"el-tooltip-gray"},{default:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass(["img-box","button-one "+(S.disable?"disabled":"")]),onClick:T=>a.handleIconClick(S)},[s.createVNode(c,{class:"button-img","icon-class":e.imgPath["./public/d3svg1/button22/"+S.icon+".svg"]},null,8,["icon-class"])],10,Kre)]),_:2},1032,["content"]))),128))]),s.createElementVNode("div",Yre,[n.hideButtonList.includes("功能介绍")?s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(u,{key:0,placement:"bottom-end",width:"auto",trigger:"hover"},{reference:s.withCtx(()=>[s.createElementVNode("div",Jre,[s.createVNode(l,{class:"item",effect:"dark",content:"功能介绍",placement:"bottom","popper-class":"el-tooltip-gray"},{default:s.withCtx(()=>[s.createVNode(c,{class:"button-img","icon-class":e.imgPath["./public/d3svg1/button22/hm_icon_help.svg"]},null,8,["icon-class"])]),_:1})])]),default:s.withCtx(()=>[s.createVNode(d,{config:n.moduleDetail.config||{}},null,8,["config"])]),_:1})),n.hideButtonList.includes("展开折叠")?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("div",{key:1,class:"button-one intro-button",onClick:t[0]||(t[0]=S=>a.handleAlias(o.flageAlias)),onMouseenter:t[1]||(t[1]=S=>a.hover(a.buttonList.length+1)),onMouseleave:t[2]||(t[2]=S=>a.out())},[s.createVNode(l,{class:"item",effect:"dark",content:o.flageAlias?"右侧折叠":"右侧展开",placement:"bottom","popper-class":"el-tooltip-gray"},{default:s.withCtx(()=>[s.createVNode(c,{class:"button-img","icon-class":e.imgPath[o.flageAlias?"./public/d3svg1/button22/hm_icon_alias_colse.svg":"./public/d3svg1/button22/hm_icon_alias.svg"]},null,8,["icon-class"])]),_:1},8,["content"])],32))])],512)],512),s.createVNode(m,{modelValue:o.dialogVisible,"onUpdate:modelValue":t[4]||(t[4]=S=>o.dialogVisible=S),title:"选择导出数据格式","append-to-body":"",width:"400px","before-close":a.handleCloseModal,class:"el-dialog-graph"},{footer:s.withCtx(()=>[s.createElementVNode("span",Xre,[s.createVNode(h,{onClick:a.handleCloseModal},{default:s.withCtx(()=>[s.createTextVNode("取 消")]),_:1},8,["onClick"]),s.createVNode(h,{type:"primary",onClick:a.handleExportData},{default:s.withCtx(()=>[s.createTextVNode("导 出")]),_:1},8,["onClick"])])]),default:s.withCtx(()=>[s.createVNode(p,{modelValue:o.exportFormat,"onUpdate:modelValue":t[3]||(t[3]=S=>o.exportFormat=S),placeholder:"请选择导出数据格式"},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(o.formatOptions,S=>(s.openBlock(),s.createBlock(f,{key:S.value,label:S.label,value:S.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["modelValue","before-close"]),s.createVNode(m,{modelValue:o.dialogImportVisible,"onUpdate:modelValue":t[5]||(t[5]=S=>o.dialogImportVisible=S),title:"导入数据","append-to-body":"",width:"400px","before-close":a.handleCloseImportModal,class:"el-dialog-graph"},{footer:s.withCtx(()=>[s.createElementVNode("span",Vre,[s.createVNode(h,{onClick:a.handleCloseImportModal},{default:s.withCtx(()=>[s.createTextVNode("取 消")]),_:1},8,["onClick"]),s.createVNode(h,{type:"primary",disabled:!o.importFile,onClick:a.handleImportData},{default:s.withCtx(()=>[s.createTextVNode("导 入")]),_:1},8,["disabled","onClick"])])]),default:s.withCtx(()=>[s.createVNode(_,{drag:"",action:"#","auto-upload":!1,accept:".csv","file-list":o.importFileList,"on-change":a.handleFileChange,"on-remove":a.handleFileRemove},{tip:s.withCtx(()=>[Zre]),default:s.withCtx(()=>[s.createVNode(w,{class:"el-icon-upload"},{default:s.withCtx(()=>[s.createVNode(b)]),_:1}),Qre]),_:1},8,["file-list","on-change","on-remove"])]),_:1},8,["modelValue","before-close"]),s.createVNode(C,{ref:"addNode","nodes-type":n.moduleDetail&&n.moduleDetail.nodes||[],"add-type":o.addType,onAddNodes:a.addNodes},null,8,["nodes-type","add-type","onAddNodes"]),s.createVNode(k,{ref:"addLink",onAddLink:a.addLink},null,8,["onAddLink"]),s.withDirectives(s.createElementVNode("div",eie,[s.createVNode(d,{config:n.moduleDetail.config||{},onMouseenter:a.showIntro,onMouseleave:a.hideIntro},null,8,["config","onMouseenter","onMouseleave"])],512),[[s.vShow,o.intro]])])}const nie=Bt(qre,[["render",tie]]);var Sf={},rie={get exports(){return Sf},set exports(e){Sf=e}},xv={},lt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._registerNode=e.Konva=e.glob=void 0;var t=Math.PI/180;function n(){return typeof window!="undefined"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}e.glob=typeof ao!="undefined"?ao:typeof window!="undefined"?window:typeof WorkerGlobalScope!="undefined"?self:{},e.Konva={_global:e.glob,version:"9.2.0",isBrowser:n(),isUnminified:/param/.test(function(o){}.toString()),dblClickWindow:400,getAngle(o){return e.Konva.angleDeg?o*t:o},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window!="undefined"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return e.Konva.DD.isDragging},isDragReady(){return!!e.Konva.DD.node},releaseCanvasOnDestroy:!0,document:e.glob.document,_injectGlobal(o){e.glob.Konva=o}};const r=o=>{e.Konva[o.prototype.getClassName()]=o};e._registerNode=r,e.Konva._injectGlobal(e.Konva)})(lt);var qt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Util=e.Transform=void 0;const t=lt;class n{constructor(E=[1,0,0,1,0,0]){this.dirty=!1,this.m=E&&E.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new n(this.m)}copyInto(E){E.m[0]=this.m[0],E.m[1]=this.m[1],E.m[2]=this.m[2],E.m[3]=this.m[3],E.m[4]=this.m[4],E.m[5]=this.m[5]}point(E){var T=this.m;return{x:T[0]*E.x+T[2]*E.y+T[4],y:T[1]*E.x+T[3]*E.y+T[5]}}translate(E,T){return this.m[4]+=this.m[0]*E+this.m[2]*T,this.m[5]+=this.m[1]*E+this.m[3]*T,this}scale(E,T){return this.m[0]*=E,this.m[1]*=E,this.m[2]*=T,this.m[3]*=T,this}rotate(E){var T=Math.cos(E),A=Math.sin(E),O=this.m[0]*T+this.m[2]*A,I=this.m[1]*T+this.m[3]*A,F=this.m[0]*-A+this.m[2]*T,R=this.m[1]*-A+this.m[3]*T;return this.m[0]=O,this.m[1]=I,this.m[2]=F,this.m[3]=R,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(E,T){var A=this.m[0]+this.m[2]*T,O=this.m[1]+this.m[3]*T,I=this.m[2]+this.m[0]*E,F=this.m[3]+this.m[1]*E;return this.m[0]=A,this.m[1]=O,this.m[2]=I,this.m[3]=F,this}multiply(E){var T=this.m[0]*E.m[0]+this.m[2]*E.m[1],A=this.m[1]*E.m[0]+this.m[3]*E.m[1],O=this.m[0]*E.m[2]+this.m[2]*E.m[3],I=this.m[1]*E.m[2]+this.m[3]*E.m[3],F=this.m[0]*E.m[4]+this.m[2]*E.m[5]+this.m[4],R=this.m[1]*E.m[4]+this.m[3]*E.m[5]+this.m[5];return this.m[0]=T,this.m[1]=A,this.m[2]=O,this.m[3]=I,this.m[4]=F,this.m[5]=R,this}invert(){var E=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),T=this.m[3]*E,A=-this.m[1]*E,O=-this.m[2]*E,I=this.m[0]*E,F=E*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),R=E*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=T,this.m[1]=A,this.m[2]=O,this.m[3]=I,this.m[4]=F,this.m[5]=R,this}getMatrix(){return this.m}decompose(){var E=this.m[0],T=this.m[1],A=this.m[2],O=this.m[3],I=this.m[4],F=this.m[5],R=E*O-T*A;let q={x:I,y:F,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(E!=0||T!=0){var z=Math.sqrt(E*E+T*T);q.rotation=T>0?Math.acos(E/z):-Math.acos(E/z),q.scaleX=z,q.scaleY=R/z,q.skewX=(E*A+T*O)/R,q.skewY=0}else if(A!=0||O!=0){var G=Math.sqrt(A*A+O*O);q.rotation=Math.PI/2-(O>0?Math.acos(-A/G):-Math.acos(A/G)),q.scaleX=R/G,q.scaleY=G,q.skewX=0,q.skewY=(E*A+T*O)/R}return q.rotation=e.Util._getRotation(q.rotation),q}}e.Transform=n;var r="[object Array]",o="[object Number]",a="[object String]",c="[object Boolean]",l=Math.PI/180,d=180/Math.PI,u="#",f="",p="0",h="Konva warning: ",m="Konva error: ",b="rgb(",w={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},_=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,C=[];const k=typeof requestAnimationFrame!="undefined"&&requestAnimationFrame||function(S){setTimeout(S,60)};e.Util={_isElement(S){return!!(S&&S.nodeType==1)},_isFunction(S){return!!(S&&S.constructor&&S.call&&S.apply)},_isPlainObject(S){return!!S&&S.constructor===Object},_isArray(S){return Object.prototype.toString.call(S)===r},_isNumber(S){return Object.prototype.toString.call(S)===o&&!isNaN(S)&&isFinite(S)},_isString(S){return Object.prototype.toString.call(S)===a},_isBoolean(S){return Object.prototype.toString.call(S)===c},isObject(S){return S instanceof Object},isValidSelector(S){if(typeof S!="string")return!1;var E=S[0];return E==="#"||E==="."||E===E.toUpperCase()},_sign(S){return S===0||S>0?1:-1},requestAnimFrame(S){C.push(S),C.length===1&&k(function(){const E=C;C=[],E.forEach(function(T){T()})})},createCanvasElement(){var S=document.createElement("canvas");try{S.style=S.style||{}}catch(E){}return S},createImageElement(){return document.createElement("img")},_isInDocument(S){for(;S=S.parentNode;)if(S==document)return!0;return!1},_urlToImage(S,E){var T=e.Util.createImageElement();T.onload=function(){E(T)},T.src=S},_rgbToHex(S,E,T){return((1<<24)+(S<<16)+(E<<8)+T).toString(16).slice(1)},_hexToRgb(S){S=S.replace(u,f);var E=parseInt(S,16);return{r:E>>16&255,g:E>>8&255,b:E&255}},getRandomColor(){for(var S=(Math.random()*16777215<<0).toString(16);S.length<6;)S=p+S;return u+S},getRGB(S){var E;return S in w?(E=w[S],{r:E[0],g:E[1],b:E[2]}):S[0]===u?this._hexToRgb(S.substring(1)):S.substr(0,4)===b?(E=_.exec(S.replace(/ /g,"")),{r:parseInt(E[1],10),g:parseInt(E[2],10),b:parseInt(E[3],10)}):{r:0,g:0,b:0}},colorToRGBA(S){return S=S||"black",e.Util._namedColorToRBA(S)||e.Util._hex3ColorToRGBA(S)||e.Util._hex4ColorToRGBA(S)||e.Util._hex6ColorToRGBA(S)||e.Util._hex8ColorToRGBA(S)||e.Util._rgbColorToRGBA(S)||e.Util._rgbaColorToRGBA(S)||e.Util._hslColorToRGBA(S)},_namedColorToRBA(S){var E=w[S.toLowerCase()];return E?{r:E[0],g:E[1],b:E[2],a:1}:null},_rgbColorToRGBA(S){if(S.indexOf("rgb(")===0){S=S.match(/rgb\(([^)]+)\)/)[1];var E=S.split(/ *, */).map(Number);return{r:E[0],g:E[1],b:E[2],a:1}}},_rgbaColorToRGBA(S){if(S.indexOf("rgba(")===0){S=S.match(/rgba\(([^)]+)\)/)[1];var E=S.split(/ *, */).map((T,A)=>T.slice(-1)==="%"?A===3?parseInt(T)/100:parseInt(T)/100*255:Number(T));return{r:E[0],g:E[1],b:E[2],a:E[3]}}},_hex8ColorToRGBA(S){if(S[0]==="#"&&S.length===9)return{r:parseInt(S.slice(1,3),16),g:parseInt(S.slice(3,5),16),b:parseInt(S.slice(5,7),16),a:parseInt(S.slice(7,9),16)/255}},_hex6ColorToRGBA(S){if(S[0]==="#"&&S.length===7)return{r:parseInt(S.slice(1,3),16),g:parseInt(S.slice(3,5),16),b:parseInt(S.slice(5,7),16),a:1}},_hex4ColorToRGBA(S){if(S[0]==="#"&&S.length===5)return{r:parseInt(S[1]+S[1],16),g:parseInt(S[2]+S[2],16),b:parseInt(S[3]+S[3],16),a:parseInt(S[4]+S[4],16)/255}},_hex3ColorToRGBA(S){if(S[0]==="#"&&S.length===4)return{r:parseInt(S[1]+S[1],16),g:parseInt(S[2]+S[2],16),b:parseInt(S[3]+S[3],16),a:1}},_hslColorToRGBA(S){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(S)){const[E,...T]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(S),A=Number(T[0])/360,O=Number(T[1])/100,I=Number(T[2])/100;let F,R,q;if(O===0)return q=I*255,{r:Math.round(q),g:Math.round(q),b:Math.round(q),a:1};I<.5?F=I*(1+O):F=I+O-I*O;const z=2*I-F,G=[0,0,0];for(let Y=0;Y<3;Y++)R=A+1/3*-(Y-1),R<0&&R++,R>1&&R--,6*R<1?q=z+(F-z)*6*R:2*R<1?q=F:3*R<2?q=z+(F-z)*(2/3-R)*6:q=z,G[Y]=q*255;return{r:Math.round(G[0]),g:Math.round(G[1]),b:Math.round(G[2]),a:1}}},haveIntersection(S,E){return!(E.x>S.x+S.width||E.x+E.width<S.x||E.y>S.y+S.height||E.y+E.height<S.y)},cloneObject(S){var E={};for(var T in S)this._isPlainObject(S[T])?E[T]=this.cloneObject(S[T]):this._isArray(S[T])?E[T]=this.cloneArray(S[T]):E[T]=S[T];return E},cloneArray(S){return S.slice(0)},degToRad(S){return S*l},radToDeg(S){return S*d},_degToRad(S){return e.Util.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),e.Util.degToRad(S)},_radToDeg(S){return e.Util.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),e.Util.radToDeg(S)},_getRotation(S){return t.Konva.angleDeg?e.Util.radToDeg(S):S},_capitalize(S){return S.charAt(0).toUpperCase()+S.slice(1)},throw(S){throw new Error(m+S)},error(S){console.error(m+S)},warn(S){t.Konva.showWarnings&&console.warn(h+S)},each(S,E){for(var T in S)E(T,S[T])},_inRange(S,E,T){return E<=S&&S<T},_getProjectionToSegment(S,E,T,A,O,I){var F,R,q,z=(S-T)*(S-T)+(E-A)*(E-A);if(z==0)F=S,R=E,q=(O-T)*(O-T)+(I-A)*(I-A);else{var G=((O-S)*(T-S)+(I-E)*(A-E))/z;G<0?(F=S,R=E,q=(S-O)*(S-O)+(E-I)*(E-I)):G>1?(F=T,R=A,q=(T-O)*(T-O)+(A-I)*(A-I)):(F=S+G*(T-S),R=E+G*(A-E),q=(F-O)*(F-O)+(R-I)*(R-I))}return[F,R,q]},_getProjectionToLine(S,E,T){var A=e.Util.cloneObject(S),O=Number.MAX_VALUE;return E.forEach(function(I,F){if(!(!T&&F===E.length-1)){var R=E[(F+1)%E.length],q=e.Util._getProjectionToSegment(I.x,I.y,R.x,R.y,S.x,S.y),z=q[0],G=q[1],Y=q[2];Y<O&&(A.x=z,A.y=G,O=Y)}}),A},_prepareArrayForTween(S,E,T){var A,O=[],I=[];if(S.length>E.length){var F=E;E=S,S=F}for(A=0;A<S.length;A+=2)O.push({x:S[A],y:S[A+1]});for(A=0;A<E.length;A+=2)I.push({x:E[A],y:E[A+1]});var R=[];return I.forEach(function(q){var z=e.Util._getProjectionToLine(q,O,T);R.push(z.x),R.push(z.y)}),R},_prepareToStringify(S){var E;S.visitedByCircularReferenceRemoval=!0;for(var T in S)if(S.hasOwnProperty(T)&&S[T]&&typeof S[T]=="object"){if(E=Object.getOwnPropertyDescriptor(S,T),S[T].visitedByCircularReferenceRemoval||e.Util._isElement(S[T]))if(E.configurable)delete S[T];else return null;else if(e.Util._prepareToStringify(S[T])===null)if(E.configurable)delete S[T];else return null}return delete S.visitedByCircularReferenceRemoval,S},_assign(S,E){for(var T in E)S[T]=E[T];return S},_getFirstPointerId(S){return S.touches?S.changedTouches[0].identifier:S.pointerId||999},releaseCanvas(...S){t.Konva.releaseCanvasOnDestroy&&S.forEach(E=>{E.width=0,E.height=0})},drawRoundedRectPath(S,E,T,A){let O=0,I=0,F=0,R=0;typeof A=="number"?O=I=F=R=Math.min(A,E/2,T/2):(O=Math.min(A[0]||0,E/2,T/2),I=Math.min(A[1]||0,E/2,T/2),R=Math.min(A[2]||0,E/2,T/2),F=Math.min(A[3]||0,E/2,T/2)),S.moveTo(O,0),S.lineTo(E-I,0),S.arc(E-I,I,I,Math.PI*3/2,0,!1),S.lineTo(E,T-R),S.arc(E-R,T-R,R,0,Math.PI/2,!1),S.lineTo(F,T),S.arc(F,T-F,F,Math.PI/2,Math.PI,!1),S.lineTo(0,O),S.arc(O,O,O,Math.PI,Math.PI*3/2,!1)}}})(qt);var po={},Sn={},We={};Object.defineProperty(We,"__esModule",{value:!0}),We.getComponentValidator=We.getBooleanValidator=We.getNumberArrayValidator=We.getFunctionValidator=We.getStringOrGradientValidator=We.getStringValidator=We.getNumberOrAutoValidator=We.getNumberOrArrayOfNumbersValidator=We.getNumberValidator=We.alphaComponent=We.RGBComponent=void 0;const Si=lt,bt=qt;function Ei(e){return bt.Util._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||bt.Util._isBoolean(e)?e:Object.prototype.toString.call(e)}function iie(e){return e>255?255:e<0?0:Math.round(e)}We.RGBComponent=iie;function oie(e){return e>1?1:e<1e-4?1e-4:e}We.alphaComponent=oie;function sie(){if(Si.Konva.isUnminified)return function(e,t){return bt.Util._isNumber(e)||bt.Util.warn(Ei(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}We.getNumberValidator=sie;function aie(e){if(Si.Konva.isUnminified)return function(t,n){let r=bt.Util._isNumber(t),o=bt.Util._isArray(t)&&t.length==e;return!r&&!o&&bt.Util.warn(Ei(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array<number>('+e+")"),t}}We.getNumberOrArrayOfNumbersValidator=aie;function lie(){if(Si.Konva.isUnminified)return function(e,t){var n=bt.Util._isNumber(e),r=e==="auto";return n||r||bt.Util.warn(Ei(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}We.getNumberOrAutoValidator=lie;function cie(){if(Si.Konva.isUnminified)return function(e,t){return bt.Util._isString(e)||bt.Util.warn(Ei(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}We.getStringValidator=cie;function die(){if(Si.Konva.isUnminified)return function(e,t){const n=bt.Util._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||bt.Util.warn(Ei(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}We.getStringOrGradientValidator=die;function uie(){if(Si.Konva.isUnminified)return function(e,t){return bt.Util._isFunction(e)||bt.Util.warn(Ei(e)+' is a not valid value for "'+t+'" attribute. The value should be a function.'),e}}We.getFunctionValidator=uie;function fie(){if(Si.Konva.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(bt.Util._isArray(e)?e.forEach(function(r){bt.Util._isNumber(r)||bt.Util.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):bt.Util.warn(Ei(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}We.getNumberArrayValidator=fie;function hie(){if(Si.Konva.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||bt.Util.warn(Ei(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}We.getBooleanValidator=hie;function pie(e){if(Si.Konva.isUnminified)return function(t,n){return t==null||bt.Util.isObject(t)||bt.Util.warn(Ei(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}We.getComponentValidator=pie,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Factory=void 0;const t=qt,n=We;var r="get",o="set";e.Factory={addGetterSetter(a,c,l,d,u){e.Factory.addGetter(a,c,l),e.Factory.addSetter(a,c,d,u),e.Factory.addOverloadedGetterSetter(a,c)},addGetter(a,c,l){var d=r+t.Util._capitalize(c);a.prototype[d]=a.prototype[d]||function(){var u=this.attrs[c];return u===void 0?l:u}},addSetter(a,c,l,d){var u=o+t.Util._capitalize(c);a.prototype[u]||e.Factory.overWriteSetter(a,c,l,d)},overWriteSetter(a,c,l,d){var u=o+t.Util._capitalize(c);a.prototype[u]=function(f){return l&&f!==void 0&&f!==null&&(f=l.call(this,f,c)),this._setAttr(c,f),d&&d.call(this),this}},addComponentsGetterSetter(a,c,l,d,u){var f=l.length,p=t.Util._capitalize,h=r+p(c),m=o+p(c),b,w;a.prototype[h]=function(){var C={};for(b=0;b<f;b++)w=l[b],C[w]=this.getAttr(c+p(w));return C};var _=(0,n.getComponentValidator)(l);a.prototype[m]=function(C){var k=this.attrs[c],S;d&&(C=d.call(this,C)),_&&_.call(this,C,c);for(S in C)C.hasOwnProperty(S)&&this._setAttr(c+p(S),C[S]);return C||l.forEach(E=>{this._setAttr(c+p(E),void 0)}),this._fireChangeEvent(c,k,C),u&&u.call(this),this},e.Factory.addOverloadedGetterSetter(a,c)},addOverloadedGetterSetter(a,c){var l=t.Util._capitalize(c),d=o+l,u=r+l;a.prototype[c]=function(){return arguments.length?(this[d](arguments[0]),this):this[u]()}},addDeprecatedGetterSetter(a,c,l,d){t.Util.error("Adding deprecated "+c);var u=r+t.Util._capitalize(c),f=c+" property is deprecated and will be removed soon. Look at Konva change log for more information.";a.prototype[u]=function(){t.Util.error(f);var p=this.attrs[c];return p===void 0?l:p},e.Factory.addSetter(a,c,d,function(){t.Util.error(f)}),e.Factory.addOverloadedGetterSetter(a,c)},backCompat(a,c){t.Util.each(c,function(l,d){var u=a.prototype[d],f=r+t.Util._capitalize(l),p=o+t.Util._capitalize(l);function h(){u.apply(this,arguments),t.Util.error('"'+l+'" method is deprecated and will be removed soon. Use ""'+d+'" instead.')}a.prototype[l]=h,a.prototype[f]=h,a.prototype[p]=h})},afterSetFilter(){this._filterUpToDate=!1}}}(Sn);var _r={},xi={};Object.defineProperty(xi,"__esModule",{value:!0}),xi.HitContext=xi.SceneContext=xi.Context=void 0;const GC=qt,gie=lt;function mie(e){var t=[],n=e.length,r=GC.Util,o,a;for(o=0;o<n;o++)a=e[o],r._isNumber(a)?a=Math.round(a*1e3)/1e3:r._isString(a)||(a=a+""),t.push(a);return t}var WC=",",vie="(",yie=")",bie="([",wie="])",_ie=";",Cie="()",Sie="=",KC=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"],Eie=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"];const xie=100;class Ef{constructor(t){this.canvas=t,gie.Konva.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(t){t.fillEnabled()&&this._fill(t)}_fill(t){}strokeShape(t){t.hasStroke()&&this._stroke(t)}_stroke(t){}fillStrokeShape(t){t.attrs.fillAfterStrokeEnabled?(this.strokeShape(t),this.fillShape(t)):(this.fillShape(t),this.strokeShape(t))}getTrace(t,n){var r=this.traceArr,o=r.length,a="",c,l,d,u;for(c=0;c<o;c++)l=r[c],d=l.method,d?(u=l.args,a+=d,t?a+=Cie:GC.Util._isArray(u[0])?a+=bie+u.join(WC)+wie:(n&&(u=u.map(f=>typeof f=="number"?Math.floor(f):f)),a+=vie+u.join(WC)+yie)):(a+=l.property,t||(a+=Sie+l.val)),a+=_ie;return a}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=xie&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){const n=t.attrs.lineCap;n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){const n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,o,a,c){this._context.arc(t,n,r,o,a,c)}arcTo(t,n,r,o,a){this._context.arcTo(t,n,r,o,a)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,o,a,c){this._context.bezierCurveTo(t,n,r,o,a,c)}clearRect(t,n,r,o){this._context.clearRect(t,n,r,o)}clip(...t){this._context.clip.apply(this._context,t)}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,o){return this._context.createLinearGradient(t,n,r,o)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,o,a,c){return this._context.createRadialGradient(t,n,r,o,a,c)}drawImage(t,n,r,o,a,c,l,d,u){var f=arguments,p=this._context;f.length===3?p.drawImage(t,n,r):f.length===5?p.drawImage(t,n,r,o,a):f.length===9&&p.drawImage(t,n,r,o,a,c,l,d,u)}ellipse(t,n,r,o,a,c,l,d){this._context.ellipse(t,n,r,o,a,c,l,d)}isPointInPath(t,n,r,o){return r?this._context.isPointInPath(r,t,n,o):this._context.isPointInPath(t,n,o)}fill(...t){this._context.fill.apply(this._context,t)}fillRect(t,n,r,o){this._context.fillRect(t,n,r,o)}strokeRect(t,n,r,o){this._context.strokeRect(t,n,r,o)}fillText(t,n,r,o){o?this._context.fillText(t,n,r,o):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,o){return this._context.getImageData(t,n,r,o)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,o){this._context.rect(t,n,r,o)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,o){this._context.quadraticCurveTo(t,n,r,o)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,o,a,c){this._context.setTransform(t,n,r,o,a,c)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,o){this._context.strokeText(t,n,r,o)}transform(t,n,r,o,a,c){this._context.transform(t,n,r,o,a,c)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=KC.length,r=this.setAttr,o,a,c=function(l){var d=t[l],u;t[l]=function(){return a=mie(Array.prototype.slice.call(arguments,0)),u=d.apply(t,arguments),t._trace({method:l,args:a}),u}};for(o=0;o<n;o++)c(KC[o]);t.setAttr=function(){r.apply(t,arguments);var l=arguments[0],d=arguments[1];(l==="shadowOffsetX"||l==="shadowOffsetY"||l==="shadowBlur")&&(d=d/this.canvas.getPixelRatio()),t._trace({property:l,val:d})}}_applyGlobalCompositeOperation(t){const n=t.attrs.globalCompositeOperation;var r=!n||n==="source-over";r||this.setAttr("globalCompositeOperation",n)}}xi.Context=Ef,Eie.forEach(function(e){Object.defineProperty(Ef.prototype,e,{get(){return this._context[e]},set(t){this._context[e]=t}})});class kie extends Ef{constructor(t,{willReadFrequently:n=!1}={}){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:n})}_fillColor(t){var n=t.fill();this.setAttr("fillStyle",n),t._fillFunc(this)}_fillPattern(t){this.setAttr("fillStyle",t._getFillPattern()),t._fillFunc(this)}_fillLinearGradient(t){var n=t._getLinearGradient();n&&(this.setAttr("fillStyle",n),t._fillFunc(this))}_fillRadialGradient(t){const n=t._getRadialGradient();n&&(this.setAttr("fillStyle",n),t._fillFunc(this))}_fill(t){const n=t.fill(),r=t.getFillPriority();if(n&&r==="color"){this._fillColor(t);return}const o=t.getFillPatternImage();if(o&&r==="pattern"){this._fillPattern(t);return}const a=t.getFillLinearGradientColorStops();if(a&&r==="linear-gradient"){this._fillLinearGradient(t);return}const c=t.getFillRadialGradientColorStops();if(c&&r==="radial-gradient"){this._fillRadialGradient(t);return}n?this._fillColor(t):o?this._fillPattern(t):a?this._fillLinearGradient(t):c&&this._fillRadialGradient(t)}_strokeLinearGradient(t){const n=t.getStrokeLinearGradientStartPoint(),r=t.getStrokeLinearGradientEndPoint(),o=t.getStrokeLinearGradientColorStops(),a=this.createLinearGradient(n.x,n.y,r.x,r.y);if(o){for(var c=0;c<o.length;c+=2)a.addColorStop(o[c],o[c+1]);this.setAttr("strokeStyle",a)}}_stroke(t){var n=t.dash(),r=t.getStrokeScaleEnabled();if(t.hasStroke()){if(!r){this.save();var o=this.getCanvas().getPixelRatio();this.setTransform(o,0,0,o,0,0)}this._applyLineCap(t),n&&t.dashEnabled()&&(this.setLineDash(n),this.setAttr("lineDashOffset",t.dashOffset())),this.setAttr("lineWidth",t.strokeWidth()),t.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)");var a=t.getStrokeLinearGradientColorStops();a?this._strokeLinearGradient(t):this.setAttr("strokeStyle",t.stroke()),t._strokeFunc(this),r||this.restore()}}_applyShadow(t){var n,r,o,a=(n=t.getShadowRGBA())!==null&&n!==void 0?n:"black",c=(r=t.getShadowBlur())!==null&&r!==void 0?r:5,l=(o=t.getShadowOffset())!==null&&o!==void 0?o:{x:0,y:0},d=t.getAbsoluteScale(),u=this.canvas.getPixelRatio(),f=d.x*u,p=d.y*u;this.setAttr("shadowColor",a),this.setAttr("shadowBlur",c*Math.min(Math.abs(f),Math.abs(p))),this.setAttr("shadowOffsetX",l.x*f),this.setAttr("shadowOffsetY",l.y*p)}}xi.SceneContext=kie;class Nie extends Ef{constructor(t){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:!0})}_fill(t){this.save(),this.setAttr("fillStyle",t.colorKey),t._fillFuncHit(this),this.restore()}strokeShape(t){t.hasHitStroke()&&this._stroke(t)}_stroke(t){if(t.hasHitStroke()){const a=t.getStrokeScaleEnabled();if(!a){this.save();var n=this.getCanvas().getPixelRatio();this.setTransform(n,0,0,n,0,0)}this._applyLineCap(t);var r=t.hitStrokeWidth(),o=r==="auto"?t.strokeWidth():r;this.setAttr("lineWidth",o),this.setAttr("strokeStyle",t.colorKey),t._strokeFuncHit(this),a||this.restore()}}}xi.HitContext=Nie,Object.defineProperty(_r,"__esModule",{value:!0}),_r.HitCanvas=_r.SceneCanvas=_r.Canvas=void 0;const xf=qt,YC=xi,JC=lt,Tie=Sn,Aie=We;var kf;function Oie(){if(kf)return kf;var e=xf.Util.createCanvasElement(),t=e.getContext("2d");return kf=function(){var n=JC.Konva._global.devicePixelRatio||1,r=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return n/r}(),xf.Util.releaseCanvas(e),kf}class Nf{constructor(t){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var n=t||{},r=n.pixelRatio||JC.Konva.pixelRatio||Oie();this.pixelRatio=r,this._canvas=xf.Util.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(t){var n=this.pixelRatio;this.pixelRatio=t,this.setSize(this.getWidth()/n,this.getHeight()/n)}setWidth(t){this.width=this._canvas.width=t*this.pixelRatio,this._canvas.style.width=t+"px";var n=this.pixelRatio,r=this.getContext()._context;r.scale(n,n)}setHeight(t){this.height=this._canvas.height=t*this.pixelRatio,this._canvas.style.height=t+"px";var n=this.pixelRatio,r=this.getContext()._context;r.scale(n,n)}getWidth(){return this.width}getHeight(){return this.height}setSize(t,n){this.setWidth(t||0),this.setHeight(n||0)}toDataURL(t,n){try{return this._canvas.toDataURL(t,n)}catch(r){try{return this._canvas.toDataURL()}catch(o){return xf.Util.error("Unable to get data URL. "+o.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}_r.Canvas=Nf,Tie.Factory.addGetterSetter(Nf,"pixelRatio",void 0,(0,Aie.getNumberValidator)());class Iie extends Nf{constructor(t={width:0,height:0,willReadFrequently:!1}){super(t),this.context=new YC.SceneContext(this,{willReadFrequently:t.willReadFrequently}),this.setSize(t.width,t.height)}}_r.SceneCanvas=Iie;class Rie extends Nf{constructor(t={width:0,height:0}){super(t),this.hitCanvas=!0,this.context=new YC.HitContext(this),this.setSize(t.width,t.height)}}_r.HitCanvas=Rie;var Tf={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DD=void 0;const t=lt,n=qt;e.DD={get isDragging(){var r=!1;return e.DD._dragElements.forEach(o=>{o.dragStatus==="dragging"&&(r=!0)}),r},justDragged:!1,get node(){var r;return e.DD._dragElements.forEach(o=>{r=o.node}),r},_dragElements:new Map,_drag(r){const o=[];e.DD._dragElements.forEach((a,c)=>{const{node:l}=a,d=l.getStage();d.setPointersPositions(r),a.pointerId===void 0&&(a.pointerId=n.Util._getFirstPointerId(r));const u=d._changedPointerPositions.find(h=>h.id===a.pointerId);if(u){if(a.dragStatus!=="dragging"){var f=l.dragDistance(),p=Math.max(Math.abs(u.x-a.startPointerPos.x),Math.abs(u.y-a.startPointerPos.y));if(p<f||(l.startDrag({evt:r}),!l.isDragging()))return}l._setDragPosition(r,a),o.push(l)}}),o.forEach(a=>{a.fire("dragmove",{type:"dragmove",target:a,evt:r},!0)})},_endDragBefore(r){const o=[];e.DD._dragElements.forEach(a=>{const{node:c}=a,l=c.getStage();if(r&&l.setPointersPositions(r),!l._changedPointerPositions.find(f=>f.id===a.pointerId))return;(a.dragStatus==="dragging"||a.dragStatus==="stopped")&&(e.DD.justDragged=!0,t.Konva._mouseListenClick=!1,t.Konva._touchListenClick=!1,t.Konva._pointerListenClick=!1,a.dragStatus="stopped");const u=a.node.getLayer()||a.node instanceof t.Konva.Stage&&a.node;u&&o.indexOf(u)===-1&&o.push(u)}),o.forEach(a=>{a.draw()})},_endDragAfter(r){e.DD._dragElements.forEach((o,a)=>{o.dragStatus==="stopped"&&o.node.fire("dragend",{type:"dragend",target:o.node,evt:r},!0),o.dragStatus!=="dragging"&&e.DD._dragElements.delete(a)})}},t.Konva.isBrowser&&(window.addEventListener("mouseup",e.DD._endDragBefore,!0),window.addEventListener("touchend",e.DD._endDragBefore,!0),window.addEventListener("mousemove",e.DD._drag),window.addEventListener("touchmove",e.DD._drag),window.addEventListener("mouseup",e.DD._endDragAfter,!1),window.addEventListener("touchend",e.DD._endDragAfter,!1))})(Tf),Object.defineProperty(po,"__esModule",{value:!0}),po.Node=void 0;const He=qt,Rc=Sn,Af=_r,cs=lt,Jn=Tf,Nt=We;var Of="absoluteOpacity",If="allEventListeners",ki="absoluteTransform",XC="absoluteScale",ds="canvas",Pie="Change",Lie="children",Bie="konva",kv="listening",QC="mouseenter",ZC="mouseleave",VC="set",eS="Shape",Rf=" ",tS="stage",go="transform",Die="Stage",Nv="visible",Mie=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(Rf);let Fie=1;class Ae{constructor(t){this._id=Fie++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===go||t===ki)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),o=t===go||t===ki,a=r===void 0||o&&r.dirty===!0;return a&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const o=n.map(a=>a+"Change.konva").join(Rf);this.on(o,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(ds)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===ki&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(ds)){const{scene:t,filter:n,hit:r}=this._cache.get(ds);He.Util.releaseCanvas(t,n,r),this._cache.delete(ds)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var o=Math.ceil(n.width||r.width),a=Math.ceil(n.height||r.height),c=n.pixelRatio,l=n.x===void 0?Math.floor(r.x):n.x,d=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,f=n.drawBorder||!1,p=n.hitCanvasPixelRatio||1;if(!o||!a){He.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}o+=u*2+1,a+=u*2+1,l-=u,d-=u;var h=new Af.SceneCanvas({pixelRatio:c,width:o,height:a}),m=new Af.SceneCanvas({pixelRatio:c,width:0,height:0,willReadFrequently:!0}),b=new Af.HitCanvas({pixelRatio:p,width:o,height:a}),w=h.getContext(),_=b.getContext();return b.isCache=!0,h.isCache=!0,this._cache.delete(ds),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(h.getContext()._context.imageSmoothingEnabled=!1,m.getContext()._context.imageSmoothingEnabled=!1),w.save(),_.save(),w.translate(-l,-d),_.translate(-l,-d),this._isUnderCache=!0,this._clearSelfAndDescendantCache(Of),this._clearSelfAndDescendantCache(XC),this.drawScene(h,this),this.drawHit(b,this),this._isUnderCache=!1,w.restore(),_.restore(),f&&(w.save(),w.beginPath(),w.rect(0,0,o,a),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(ds,{scene:h,filter:m,hit:b,x:l,y:d}),this._requestDraw(),this}isCached(){return this._cache.has(ds)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],o,a,c,l,d=this.getAbsoluteTransform(n);return r.forEach(function(u){var f=d.point(u);o===void 0&&(o=c=f.x,a=l=f.y),o=Math.min(o,f.x),a=Math.min(a,f.y),c=Math.max(c,f.x),l=Math.max(l,f.y)}),{x:o,y:a,width:c-o,height:l-a}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),o=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/o,r.height/o),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,o=n.filter,a=o.getContext(),c,l,d,u;if(t){if(!this._filterUpToDate){var f=r.pixelRatio;o.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(c=t.length,a.clear(),a.drawImage(r._canvas,0,0,r.getWidth()/f,r.getHeight()/f),l=a.getImageData(0,0,o.getWidth(),o.getHeight()),d=0;d<c;d++){if(u=t[d],typeof u!="function"){He.Util.error("Filter should be type of function, but got "+typeof u+" instead. Please check correct filters");continue}u.call(this,l),a.putImageData(l,0,0)}}catch(p){He.Util.error("Unable to apply filter. "+p.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}this._filterUpToDate=!0}return o}return r}on(t,n){if(this._cache&&this._cache.delete(If),arguments.length===3)return this._delegate.apply(this,arguments);var r=t.split(Rf),o=r.length,a,c,l,d,u;for(a=0;a<o;a++)c=r[a],l=c.split("."),d=l[0],u=l[1]||"",this.eventListeners[d]||(this.eventListeners[d]=[]),this.eventListeners[d].push({name:u,handler:n});return this}off(t,n){var r=(t||"").split(Rf),o=r.length,a,c,l,d,u,f;if(this._cache&&this._cache.delete(If),!t)for(c in this.eventListeners)this._off(c);for(a=0;a<o;a++)if(l=r[a],d=l.split("."),u=d[0],f=d[1],u)this.eventListeners[u]&&this._off(u,f,n);else for(c in this.eventListeners)this._off(c,f,n);return this}dispatchEvent(t){var n={target:this,type:t.type,evt:t};return this.fire(t.type,n),this}addEventListener(t,n){return this.on(t,function(r){n.call(this,r.evt)}),this}removeEventListener(t){return this.off(t),this}_delegate(t,n,r){var o=this;this.on(t,function(a){for(var c=a.target.findAncestors(n,!0,o),l=0;l<c.length;l++)a=He.Util.cloneObject(a),a.currentTarget=c[l],r.call(c[l],a)})}remove(){return this.isDragging()&&this.stopDrag(),Jn.DD._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(ki),this._clearSelfAndDescendantCache(Of),this._clearSelfAndDescendantCache(XC),this._clearSelfAndDescendantCache(tS),this._clearSelfAndDescendantCache(Nv),this._clearSelfAndDescendantCache(kv)}_remove(){this._clearCaches();var t=this.getParent();t&&t.children&&(t.children.splice(this.index,1),t._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this.clearCache(),this}getAttr(t){var n="get"+He.Util._capitalize(t);return He.Util._isFunction(this[n])?this[n]():this.attrs[t]}getAncestors(){for(var t=this.getParent(),n=[];t;)n.push(t),t=t.getParent();return n}getAttrs(){return this.attrs||{}}setAttrs(t){return this._batchTransformChanges(()=>{var n,r;if(!t)return this;for(n in t)n!==Lie&&(r=VC+He.Util._capitalize(n),He.Util._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(kv,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(Nv,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),o=!1;Jn.DD._dragElements.forEach(c=>{c.dragStatus==="dragging"&&(c.node.nodeType==="Stage"||c.node.getLayer()===r)&&(o=!0)});var a=!n&&!cs.Konva.hitOnDragEnabled&&o;return this.isListening()&&this.isVisible()&&!a}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,o,a,c,l;function d(u){for(o=[],a=u.length,c=0;c<a;c++)l=u[c],r++,l.nodeType!==eS&&(o=o.concat(l.getChildren().slice())),l._id===n._id&&(c=a);o.length>0&&o[0].getDepth()<=t&&d(o)}return n.nodeType!==Die&&d(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(go),this._clearSelfAndDescendantCache(ki)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var o=this.getAbsoluteTransform(t).getMatrix(),a=new He.Transform,c=this.offset();return a.m=o.slice(),a.translate(c.x,c.y),a.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(go);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(go),this._clearSelfAndDescendantCache(ki),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,o=this.x(),a=this.y();return n!==void 0&&(o+=n),r!==void 0&&(a+=r),this.setPosition({x:o,y:a}),this}_eachAncestorReverse(t,n){var r=[],o=this.getParent(),a,c;if(!(n&&n._id===this._id)){for(r.unshift(this);o&&(!n||o._id!==n._id);)r.unshift(o),o=o.parent;for(a=r.length,c=0;c<a;c++)t(r[c])}}rotate(t){return this.rotation(this.rotation()+t),this}moveToTop(){if(!this.parent)return He.Util.warn("Node has no parent. moveToTop function is ignored."),!1;var t=this.index,n=this.parent.getChildren().length;return t<n-1?(this.parent.children.splice(t,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0):!1}moveUp(){if(!this.parent)return He.Util.warn("Node has no parent. moveUp function is ignored."),!1;var t=this.index,n=this.parent.getChildren().length;return t<n-1?(this.parent.children.splice(t,1),this.parent.children.splice(t+1,0,this),this.parent._setChildrenIndices(),!0):!1}moveDown(){if(!this.parent)return He.Util.warn("Node has no parent. moveDown function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return He.Util.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return He.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&He.Util.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(Of,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,o,a,c,l;t.attrs={};for(r in n)o=n[r],l=He.Util.isObject(o)&&!He.Util._isPlainObject(o)&&!He.Util._isArray(o),!l&&(a=typeof this[r]=="function"&&this[r],delete n[r],c=a?a.call(this):null,n[r]=o,c!==o&&(t.attrs[r]=o));return t.className=this.getClassName(),He.Util._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var o=[];n&&this._isMatch(t)&&o.push(this);for(var a=this.parent;a;){if(a===r)return o;a._isMatch(t)&&o.push(a),a=a.parent}return o}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,o,a;for(o=0;o<r;o++)if(a=n[o],He.Util.isValidSelector(a)||(He.Util.warn('Selector "'+a+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),He.Util.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),He.Util.warn("Konva is awesome, right?")),a.charAt(0)==="#"){if(this.id()===a.slice(1))return!0}else if(a.charAt(0)==="."){if(this.hasName(a.slice(1)))return!0}else if(this.className===a||this.nodeType===a)return!0;return!1}getLayer(){var t=this.getParent();return t?t.getLayer():null}getStage(){return this._getCache(tS,this._getStage)}_getStage(){var t=this.getParent();if(t)return t.getStage()}fire(t,n={},r){return n.target=n.target||this,r?this._fireAndBubble(t,n):this._fire(t,n),this}getAbsoluteTransform(t){return t?this._getAbsoluteTransform(t):this._getCache(ki,this._getAbsoluteTransform)}_getAbsoluteTransform(t){var n;if(t)return n=new He.Transform,this._eachAncestorReverse(function(o){var a=o.transformsEnabled();a==="all"?n.multiply(o.getTransform()):a==="position"&&n.translate(o.x()-o.offsetX(),o.y()-o.offsetY())},t),n;n=this._cache.get(ki)||new He.Transform,this.parent?this.parent.getAbsoluteTransform().copyInto(n):n.reset();var r=this.transformsEnabled();if(r==="all")n.multiply(this.getTransform());else if(r==="position"){const o=this.attrs.x||0,a=this.attrs.y||0,c=this.attrs.offsetX||0,l=this.attrs.offsetY||0;n.translate(o-c,a-l)}return n.dirty=!1,n}getAbsoluteScale(t){for(var n=this;n;)n._isUnderCache&&(t=n),n=n.getParent();const o=this.getAbsoluteTransform(t).decompose();return{x:o.scaleX,y:o.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(go,this._getTransform)}_getTransform(){var t,n,r=this._cache.get(go)||new He.Transform;r.reset();var o=this.x(),a=this.y(),c=cs.Konva.getAngle(this.rotation()),l=(t=this.attrs.scaleX)!==null&&t!==void 0?t:1,d=(n=this.attrs.scaleY)!==null&&n!==void 0?n:1,u=this.attrs.skewX||0,f=this.attrs.skewY||0,p=this.attrs.offsetX||0,h=this.attrs.offsetY||0;return(o!==0||a!==0)&&r.translate(o,a),c!==0&&r.rotate(c),(u!==0||f!==0)&&r.skew(u,f),(l!==1||d!==1)&&r.scale(l,d),(p!==0||h!==0)&&r.translate(-1*p,-1*h),r.dirty=!1,r}clone(t){var n=He.Util.cloneObject(this.attrs),r,o,a,c,l;for(r in t)n[r]=t[r];var d=new this.constructor(n);for(r in this.eventListeners)for(o=this.eventListeners[r],a=o.length,c=0;c<a;c++)l=o[c],l.name.indexOf(Bie)<0&&(d.eventListeners[r]||(d.eventListeners[r]=[]),d.eventListeners[r].push(l));return d}_toKonvaCanvas(t){t=t||{};var n=this.getClientRect(),r=this.getStage(),o=t.x!==void 0?t.x:Math.floor(n.x),a=t.y!==void 0?t.y:Math.floor(n.y),c=t.pixelRatio||1,l=new Af.SceneCanvas({width:t.width||Math.ceil(n.width)||(r?r.width():0),height:t.height||Math.ceil(n.height)||(r?r.height():0),pixelRatio:c}),d=l.getContext();return t.imageSmoothingEnabled===!1&&(d._context.imageSmoothingEnabled=!1),d.save(),(o||a)&&d.translate(-1*o,-1*a),this.drawScene(l),d.restore(),l}toCanvas(t){return this._toKonvaCanvas(t)._canvas}toDataURL(t){t=t||{};var n=t.mimeType||null,r=t.quality||null,o=this._toKonvaCanvas(t).toDataURL(n,r);return t.callback&&t.callback(o),o}toImage(t){return new Promise((n,r)=>{try{const o=t==null?void 0:t.callback;o&&delete t.callback,He.Util._urlToImage(this.toDataURL(t),function(a){n(a),o==null||o(a)})}catch(o){r(o)}})}toBlob(t){return new Promise((n,r)=>{try{const o=t==null?void 0:t.callback;o&&delete t.callback,this.toCanvas(t).toBlob(a=>{n(a),o==null||o(a)})}catch(o){r(o)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():cs.Konva.dragDistance}_off(t,n,r){var o=this.eventListeners[t],a,c,l;for(a=0;a<o.length;a++)if(c=o[a].name,l=o[a].handler,(c!=="konva"||n==="konva")&&(!n||c===n)&&(!r||r===l)){if(o.splice(a,1),o.length===0){delete this.eventListeners[t];break}a--}}_fireChangeEvent(t,n,r){this._fire(t+Pie,{oldVal:n,newVal:r})}addName(t){if(!this.hasName(t)){var n=this.name(),r=n?n+" "+t:t;this.name(r)}return this}hasName(t){if(!t)return!1;const n=this.name();if(!n)return!1;var r=(n||"").split(/\s/g);return r.indexOf(t)!==-1}removeName(t){var n=(this.name()||"").split(/\s/g),r=n.indexOf(t);return r!==-1&&(n.splice(r,1),this.name(n.join(" "))),this}setAttr(t,n){var r=this[VC+He.Util._capitalize(t)];return He.Util._isFunction(r)?r.call(this,n):this._setAttr(t,n),this}_requestDraw(){if(cs.Konva.autoDrawEnabled){const t=this.getLayer()||this.getStage();t==null||t.batchDraw()}}_setAttr(t,n){var r=this.attrs[t];r===n&&!He.Util.isObject(n)||(n==null?delete this.attrs[t]:this.attrs[t]=n,this._shouldFireChangeEvents&&this._fireChangeEvent(t,r,n),this._requestDraw())}_setComponentAttr(t,n,r){var o;r!==void 0&&(o=this.attrs[t],o||(this.attrs[t]=this.getAttr(t)),this.attrs[t][n]=r,this._fireChangeEvent(t,o,r))}_fireAndBubble(t,n,r){n&&this.nodeType===eS&&(n.target=this);var o=(t===QC||t===ZC)&&(r&&(this===r||this.isAncestorOf&&this.isAncestorOf(r))||this.nodeType==="Stage"&&!r);if(!o){this._fire(t,n);var a=(t===QC||t===ZC)&&r&&r.isAncestorOf&&r.isAncestorOf(this)&&!r.isAncestorOf(this.parent);(n&&!n.cancelBubble||!n)&&this.parent&&this.parent.isListening()&&!a&&(r&&r.parent?this._fireAndBubble.call(this.parent,t,n,r):this._fireAndBubble.call(this.parent,t,n))}}_getProtoListeners(t){var n,r,o;const a=(n=this._cache.get(If))!==null&&n!==void 0?n:{};let c=a==null?void 0:a[t];if(c===void 0){c=[];let l=Object.getPrototypeOf(this);for(;l;){const d=(o=(r=l.eventListeners)===null||r===void 0?void 0:r[t])!==null&&o!==void 0?o:[];c.push(...d),l=Object.getPrototypeOf(l)}a[t]=c,this._cache.set(If,a)}return c}_fire(t,n){n=n||{},n.currentTarget=this,n.type=t;const r=this._getProtoListeners(t);if(r)for(var o=0;o<r.length;o++)r[o].handler.call(this,n);const a=this.eventListeners[t];if(a)for(var o=0;o<a.length;o++)a[o].handler.call(this,n)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(t){var n=t?t.pointerId:void 0,r=this.getStage(),o=this.getAbsolutePosition(),a=r._getPointerById(n)||r._changedPointerPositions[0]||o;Jn.DD._dragElements.set(this._id,{node:this,startPointerPos:a,offset:{x:a.x-o.x,y:a.y-o.y},dragStatus:"ready",pointerId:n})}startDrag(t,n=!0){Jn.DD._dragElements.has(this._id)||this._createDragElement(t);const r=Jn.DD._dragElements.get(this._id);r.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:t&&t.evt},n)}_setDragPosition(t,n){const r=this.getStage()._getPointerById(n.pointerId);if(r){var o={x:r.x-n.offset.x,y:r.y-n.offset.y},a=this.dragBoundFunc();if(a!==void 0){const c=a.call(this,o,t);c?o=c:He.Util.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}(!this._lastPos||this._lastPos.x!==o.x||this._lastPos.y!==o.y)&&(this.setAbsolutePosition(o),this._requestDraw()),this._lastPos=o}}stopDrag(t){const n=Jn.DD._dragElements.get(this._id);n&&(n.dragStatus="stopped"),Jn.DD._endDragBefore(t),Jn.DD._endDragAfter(t)}setDraggable(t){this._setAttr("draggable",t),this._dragChange()}isDragging(){const t=Jn.DD._dragElements.get(this._id);return t?t.dragStatus==="dragging":!1}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(t){var n=t.evt.button!==void 0,r=!n||cs.Konva.dragButtons.indexOf(t.evt.button)>=0;if(r&&!this.isDragging()){var o=!1;Jn.DD._dragElements.forEach(a=>{this.isAncestorOf(a.node)&&(o=!0)}),o||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=Jn.DD._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",o=n&&n.dragStatus==="ready";r?this.stopDrag():o&&Jn.DD._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return He.Util.haveIntersection(r,this.getClientRect())}static create(t,n){return He.Util._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=Ae.prototype.getClassName.call(t),o=t.children,a,c,l;n&&(t.attrs.container=n),cs.Konva[r]||(He.Util.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const d=cs.Konva[r];if(a=new d(t.attrs),o)for(c=o.length,l=0;l<c;l++)a.add(Ae._createNode(o[l]));return a}}po.Node=Ae,Ae.prototype.nodeType="Node",Ae.prototype._attrsAffectingSize=[],Ae.prototype.eventListeners={},Ae.prototype.on.call(Ae.prototype,Mie,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(go),this._clearSelfAndDescendantCache(ki)}),Ae.prototype.on.call(Ae.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(Nv)}),Ae.prototype.on.call(Ae.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(kv)}),Ae.prototype.on.call(Ae.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(Of)});const tt=Rc.Factory.addGetterSetter;tt(Ae,"zIndex"),tt(Ae,"absolutePosition"),tt(Ae,"position"),tt(Ae,"x",0,(0,Nt.getNumberValidator)()),tt(Ae,"y",0,(0,Nt.getNumberValidator)()),tt(Ae,"globalCompositeOperation","source-over",(0,Nt.getStringValidator)()),tt(Ae,"opacity",1,(0,Nt.getNumberValidator)()),tt(Ae,"name","",(0,Nt.getStringValidator)()),tt(Ae,"id","",(0,Nt.getStringValidator)()),tt(Ae,"rotation",0,(0,Nt.getNumberValidator)()),Rc.Factory.addComponentsGetterSetter(Ae,"scale",["x","y"]),tt(Ae,"scaleX",1,(0,Nt.getNumberValidator)()),tt(Ae,"scaleY",1,(0,Nt.getNumberValidator)()),Rc.Factory.addComponentsGetterSetter(Ae,"skew",["x","y"]),tt(Ae,"skewX",0,(0,Nt.getNumberValidator)()),tt(Ae,"skewY",0,(0,Nt.getNumberValidator)()),Rc.Factory.addComponentsGetterSetter(Ae,"offset",["x","y"]),tt(Ae,"offsetX",0,(0,Nt.getNumberValidator)()),tt(Ae,"offsetY",0,(0,Nt.getNumberValidator)()),tt(Ae,"dragDistance",null,(0,Nt.getNumberValidator)()),tt(Ae,"width",0,(0,Nt.getNumberValidator)()),tt(Ae,"height",0,(0,Nt.getNumberValidator)()),tt(Ae,"listening",!0,(0,Nt.getBooleanValidator)()),tt(Ae,"preventDefault",!0,(0,Nt.getBooleanValidator)()),tt(Ae,"filters",null,function(e){return this._filterUpToDate=!1,e}),tt(Ae,"visible",!0,(0,Nt.getBooleanValidator)()),tt(Ae,"transformsEnabled","all",(0,Nt.getStringValidator)()),tt(Ae,"size"),tt(Ae,"dragBoundFunc"),tt(Ae,"draggable",!1,(0,Nt.getBooleanValidator)()),Rc.Factory.backCompat(Ae,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});var us={};Object.defineProperty(us,"__esModule",{value:!0}),us.Container=void 0;const ba=Sn,Tv=po,Pf=We;class fs extends Tv.Node{constructor(){super(...arguments),this.children=[]}getChildren(t){if(!t)return this.children||[];const n=this.children||[];var r=[];return n.forEach(function(o){t(o)&&r.push(o)}),r}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(t.length===0)return this;if(t.length>1){for(var n=0;n<t.length;n++)this.add(t[n]);return this}const r=t[0];return r.getParent()?(r.moveTo(this),this):(this._validateAdd(r),r.index=this.getChildren().length,r.parent=this,r._clearCaches(),this.getChildren().push(r),this._fire("add",{child:r}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(t){return this._generalFind(t,!1)}findOne(t){var n=this._generalFind(t,!0);return n.length>0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(o=>{const a=o._isMatch(t);return a&&r.push(o),!!(a&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const o of r){if(n=t(o),n)return!0;if(o.hasChildren()&&(n=o._descendants(t),n))return!0}return!1}toObject(){var t=Tv.Node.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=Tv.Node.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),o=t||r&&r.getCanvas(),a=o&&o.getContext(),c=this._getCanvasCache(),l=c&&c.scene,d=o&&o.isCache;if(!this.isVisible()&&!d)return this;if(l){a.save();var u=this.getAbsoluteTransform(n).getMatrix();a.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(a),a.restore()}else this._drawChildren("drawScene",o,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),o=t||r&&r.hitCanvas,a=o&&o.getContext(),c=this._getCanvasCache(),l=c&&c.hit;if(l){a.save();var d=this.getAbsoluteTransform(n).getMatrix();a.transform(d[0],d[1],d[2],d[3],d[4],d[5]),this._drawCachedHitCanvas(a),a.restore()}else this._drawChildren("drawHit",o,n);return this}_drawChildren(t,n,r){var o,a=n&&n.getContext(),c=this.clipWidth(),l=this.clipHeight(),d=this.clipFunc(),u=c&&l||d;const f=r===this;if(u){a.save();var p=this.getAbsoluteTransform(r),h=p.getMatrix();a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),a.beginPath();let _;if(d)_=d.call(this,a,this);else{var m=this.clipX(),b=this.clipY();a.rect(m,b,c,l)}a.clip.apply(a,_),h=p.copy().invert().getMatrix(),a.transform(h[0],h[1],h[2],h[3],h[4],h[5])}var w=!f&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(a.save(),a._applyGlobalCompositeOperation(this)),(o=this.children)===null||o===void 0||o.forEach(function(_){_[t](n,r)}),w&&a.restore(),u&&a.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,o=t.relativeTo,a,c,l,d,u={x:1/0,y:1/0,width:0,height:0},f=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(w.visible()){var _=w.getClientRect({relativeTo:f,skipShadow:t.skipShadow,skipStroke:t.skipStroke});_.width===0&&_.height===0||(a===void 0?(a=_.x,c=_.y,l=_.x+_.width,d=_.y+_.height):(a=Math.min(a,_.x),c=Math.min(c,_.y),l=Math.max(l,_.x+_.width),d=Math.max(d,_.y+_.height)))}});for(var p=this.find("Shape"),h=!1,m=0;m<p.length;m++){var b=p[m];if(b._isVisible(this)){h=!0;break}}return h&&a!==void 0?u={x:a,y:c,width:l-a,height:d-c}:u={x:0,y:0,width:0,height:0},r?u:this._transformedRect(u,o)}}us.Container=fs,ba.Factory.addComponentsGetterSetter(fs,"clip",["x","y","width","height"]),ba.Factory.addGetterSetter(fs,"clipX",void 0,(0,Pf.getNumberValidator)()),ba.Factory.addGetterSetter(fs,"clipY",void 0,(0,Pf.getNumberValidator)()),ba.Factory.addGetterSetter(fs,"clipWidth",void 0,(0,Pf.getNumberValidator)()),ba.Factory.addGetterSetter(fs,"clipHeight",void 0,(0,Pf.getNumberValidator)()),ba.Factory.addGetterSetter(fs,"clipFunc");var nS={},An={};Object.defineProperty(An,"__esModule",{value:!0}),An.releaseCapture=An.setPointerCapture=An.hasPointerCapture=An.createEvent=An.getCapturedShape=void 0;const $ie=lt,Pc=new Map,rS=$ie.Konva._global.PointerEvent!==void 0;function zie(e){return Pc.get(e)}An.getCapturedShape=zie;function Av(e){return{evt:e,pointerId:e.pointerId}}An.createEvent=Av;function Uie(e,t){return Pc.get(e)===t}An.hasPointerCapture=Uie;function jie(e,t){iS(e),t.getStage()&&(Pc.set(e,t),rS&&t._fire("gotpointercapture",Av(new PointerEvent("gotpointercapture"))))}An.setPointerCapture=jie;function iS(e,t){const n=Pc.get(e);if(!n)return;const r=n.getStage();r&&r.content,Pc.delete(e),rS&&n._fire("lostpointercapture",Av(new PointerEvent("lostpointercapture")))}An.releaseCapture=iS,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Stage=e.stages=void 0;const t=qt,n=Sn,r=us,o=lt,a=_r,c=Tf,l=lt,d=An;var u="Stage",f="string",p="px",h="mouseout",m="mouseleave",b="mouseover",w="mouseenter",_="mousemove",C="mousedown",k="mouseup",S="pointermove",E="pointerdown",T="pointerup",A="pointercancel",O="lostpointercapture",I="pointerout",F="pointerleave",R="pointerover",q="pointerenter",z="contextmenu",G="touchstart",Y="touchend",Z="touchmove",U="touchcancel",j="wheel",H=5,M=[[w,"_pointerenter"],[C,"_pointerdown"],[_,"_pointermove"],[k,"_pointerup"],[m,"_pointerleave"],[G,"_pointerdown"],[Z,"_pointermove"],[Y,"_pointerup"],[U,"_pointercancel"],[b,"_pointerover"],[j,"_wheel"],[z,"_contextmenu"],[E,"_pointerdown"],[S,"_pointermove"],[T,"_pointerup"],[A,"_pointercancel"],[O,"_lostpointercapture"]];const D={mouse:{[I]:h,[F]:m,[R]:b,[q]:w,[S]:_,[E]:C,[T]:k,[A]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[I]:"touchout",[F]:"touchleave",[R]:"touchover",[q]:"touchenter",[S]:Z,[E]:G,[T]:Y,[A]:U,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[I]:I,[F]:F,[R]:R,[q]:q,[S]:S,[E]:E,[T]:T,[A]:A,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},te=se=>se.indexOf("pointer")>=0?"pointer":se.indexOf("touch")>=0?"touch":"mouse",V=se=>{const B=te(se);if(B==="pointer")return o.Konva.pointerEventsEnabled&&D.pointer;if(B==="touch")return D.touch;if(B==="mouse")return D.mouse};function ee(se={}){return(se.clipFunc||se.clipWidth||se.clipHeight)&&t.Util.warn("Stage does not support clipping. Please use clip for Layers or Groups."),se}const X="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);";e.stages=[];class oe extends r.Container{constructor(B){super(ee(B)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),e.stages.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{ee(this.attrs)}),this._checkVisibility()}_validateAdd(B){const W=B.getType()==="Layer",re=B.getType()==="FastLayer";W||re||t.Util.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const B=this.visible()?"":"none";this.content.style.display=B}setContainer(B){if(typeof B===f){if(B.charAt(0)==="."){var W=B.slice(1);B=document.getElementsByClassName(W)[0]}else{var re;B.charAt(0)!=="#"?re=B:re=B.slice(1),B=document.getElementById(re)}if(!B)throw"Can not find container in document with id "+re}return this._setAttr("container",B),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),B.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var B=this.children,W=B.length,re;for(re=0;re<W;re++)B[re].clear();return this}clone(B){return B||(B={}),B.container=typeof document!="undefined"&&document.createElement("div"),r.Container.prototype.clone.call(this,B)}destroy(){super.destroy();var B=this.content;B&&t.Util._isInDocument(B)&&this.container().removeChild(B);var W=e.stages.indexOf(this);return W>-1&&e.stages.splice(W,1),t.Util.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const B=this._pointerPositions[0]||this._changedPointerPositions[0];return B?{x:B.x,y:B.y}:(t.Util.warn(X),null)}_getPointerById(B){return this._pointerPositions.find(W=>W.id===B)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(B){B=B||{},B.x=B.x||0,B.y=B.y||0,B.width=B.width||this.width(),B.height=B.height||this.height();var W=new a.SceneCanvas({width:B.width,height:B.height,pixelRatio:B.pixelRatio||1}),re=W.getContext()._context,ce=this.children;return(B.x||B.y)&&re.translate(-1*B.x,-1*B.y),ce.forEach(function(ve){if(ve.isVisible()){var ke=ve._toKonvaCanvas(B);re.drawImage(ke._canvas,B.x,B.y,ke.getWidth()/ke.getPixelRatio(),ke.getHeight()/ke.getPixelRatio())}}),W}getIntersection(B){if(!B)return null;var W=this.children,re=W.length,ce=re-1,ve;for(ve=ce;ve>=0;ve--){const ke=W[ve].getIntersection(B);if(ke)return ke}return null}_resizeDOM(){var B=this.width(),W=this.height();this.content&&(this.content.style.width=B+p,this.content.style.height=W+p),this.bufferCanvas.setSize(B,W),this.bufferHitCanvas.setSize(B,W),this.children.forEach(re=>{re.setSize({width:B,height:W}),re.draw()})}add(B,...W){if(arguments.length>1){for(var re=0;re<arguments.length;re++)this.add(arguments[re]);return this}super.add(B);var ce=this.children.length;return ce>H&&t.Util.warn("The stage has "+ce+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),B.setSize({width:this.width(),height:this.height()}),B.draw(),o.Konva.isBrowser&&this.content.appendChild(B.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(B){return d.hasPointerCapture(B,this)}setPointerCapture(B){d.setPointerCapture(B,this)}releaseCapture(B){d.releaseCapture(B,this)}getLayers(){return this.children}_bindContentEvents(){o.Konva.isBrowser&&M.forEach(([B,W])=>{this.content.addEventListener(B,re=>{this[W](re)},{passive:!1})})}_pointerenter(B){this.setPointersPositions(B);const W=V(B.type);this._fire(W.pointerenter,{evt:B,target:this,currentTarget:this})}_pointerover(B){this.setPointersPositions(B);const W=V(B.type);this._fire(W.pointerover,{evt:B,target:this,currentTarget:this})}_getTargetShape(B){let W=this[B+"targetShape"];return W&&!W.getStage()&&(W=null),W}_pointerleave(B){const W=V(B.type),re=te(B.type);if(W){this.setPointersPositions(B);var ce=this._getTargetShape(re),ve=!c.DD.isDragging||o.Konva.hitOnDragEnabled;ce&&ve?(ce._fireAndBubble(W.pointerout,{evt:B}),ce._fireAndBubble(W.pointerleave,{evt:B}),this._fire(W.pointerleave,{evt:B,target:this,currentTarget:this}),this[re+"targetShape"]=null):ve&&(this._fire(W.pointerleave,{evt:B,target:this,currentTarget:this}),this._fire(W.pointerout,{evt:B,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(B){const W=V(B.type),re=te(B.type);if(W){this.setPointersPositions(B);var ce=!1;this._changedPointerPositions.forEach(ve=>{var ke=this.getIntersection(ve);if(c.DD.justDragged=!1,o.Konva["_"+re+"ListenClick"]=!0,!(ke&&ke.isListening()))return;o.Konva.capturePointerEventsEnabled&&ke.setPointerCapture(ve.id),this[re+"ClickStartShape"]=ke,ke._fireAndBubble(W.pointerdown,{evt:B,pointerId:ve.id}),ce=!0;const Ue=B.type.indexOf("touch")>=0;ke.preventDefault()&&B.cancelable&&Ue&&B.preventDefault()}),ce||this._fire(W.pointerdown,{evt:B,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(B){const W=V(B.type),re=te(B.type);if(!W)return;c.DD.isDragging&&c.DD.node.preventDefault()&&B.cancelable&&B.preventDefault(),this.setPointersPositions(B);var ce=!c.DD.isDragging||o.Konva.hitOnDragEnabled;if(!ce)return;var ve={};let ke=!1;var ze=this._getTargetShape(re);this._changedPointerPositions.forEach(Ue=>{const xe=d.getCapturedShape(Ue.id)||this.getIntersection(Ue),ut=Ue.id,Se={evt:B,pointerId:ut};var Ie=ze!==xe;if(Ie&&ze&&(ze._fireAndBubble(W.pointerout,Object.assign({},Se),xe),ze._fireAndBubble(W.pointerleave,Object.assign({},Se),xe)),xe){if(ve[xe._id])return;ve[xe._id]=!0}xe&&xe.isListening()?(ke=!0,Ie&&(xe._fireAndBubble(W.pointerover,Object.assign({},Se),ze),xe._fireAndBubble(W.pointerenter,Object.assign({},Se),ze),this[re+"targetShape"]=xe),xe._fireAndBubble(W.pointermove,Object.assign({},Se))):ze&&(this._fire(W.pointerover,{evt:B,target:this,currentTarget:this,pointerId:ut}),this[re+"targetShape"]=null)}),ke||this._fire(W.pointermove,{evt:B,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(B){const W=V(B.type),re=te(B.type);if(!W)return;this.setPointersPositions(B);const ce=this[re+"ClickStartShape"],ve=this[re+"ClickEndShape"];var ke={};let ze=!1;this._changedPointerPositions.forEach(Ue=>{const xe=d.getCapturedShape(Ue.id)||this.getIntersection(Ue);if(xe){if(xe.releaseCapture(Ue.id),ke[xe._id])return;ke[xe._id]=!0}const ut=Ue.id,Se={evt:B,pointerId:ut};let Ie=!1;o.Konva["_"+re+"InDblClickWindow"]?(Ie=!0,clearTimeout(this[re+"DblTimeout"])):c.DD.justDragged||(o.Konva["_"+re+"InDblClickWindow"]=!0,clearTimeout(this[re+"DblTimeout"])),this[re+"DblTimeout"]=setTimeout(function(){o.Konva["_"+re+"InDblClickWindow"]=!1},o.Konva.dblClickWindow),xe&&xe.isListening()?(ze=!0,this[re+"ClickEndShape"]=xe,xe._fireAndBubble(W.pointerup,Object.assign({},Se)),o.Konva["_"+re+"ListenClick"]&&ce&&ce===xe&&(xe._fireAndBubble(W.pointerclick,Object.assign({},Se)),Ie&&ve&&ve===xe&&xe._fireAndBubble(W.pointerdblclick,Object.assign({},Se)))):(this[re+"ClickEndShape"]=null,o.Konva["_"+re+"ListenClick"]&&this._fire(W.pointerclick,{evt:B,target:this,currentTarget:this,pointerId:ut}),Ie&&this._fire(W.pointerdblclick,{evt:B,target:this,currentTarget:this,pointerId:ut}))}),ze||this._fire(W.pointerup,{evt:B,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),o.Konva["_"+re+"ListenClick"]=!1,B.cancelable&&re!=="touch"&&B.preventDefault()}_contextmenu(B){this.setPointersPositions(B);var W=this.getIntersection(this.getPointerPosition());W&&W.isListening()?W._fireAndBubble(z,{evt:B}):this._fire(z,{evt:B,target:this,currentTarget:this})}_wheel(B){this.setPointersPositions(B);var W=this.getIntersection(this.getPointerPosition());W&&W.isListening()?W._fireAndBubble(j,{evt:B}):this._fire(j,{evt:B,target:this,currentTarget:this})}_pointercancel(B){this.setPointersPositions(B);const W=d.getCapturedShape(B.pointerId)||this.getIntersection(this.getPointerPosition());W&&W._fireAndBubble(T,d.createEvent(B)),d.releaseCapture(B.pointerId)}_lostpointercapture(B){d.releaseCapture(B.pointerId)}setPointersPositions(B){var W=this._getContentPosition(),re=null,ce=null;B=B||window.event,B.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(B.touches,ve=>{this._pointerPositions.push({id:ve.identifier,x:(ve.clientX-W.left)/W.scaleX,y:(ve.clientY-W.top)/W.scaleY})}),Array.prototype.forEach.call(B.changedTouches||B.touches,ve=>{this._changedPointerPositions.push({id:ve.identifier,x:(ve.clientX-W.left)/W.scaleX,y:(ve.clientY-W.top)/W.scaleY})})):(re=(B.clientX-W.left)/W.scaleX,ce=(B.clientY-W.top)/W.scaleY,this.pointerPos={x:re,y:ce},this._pointerPositions=[{x:re,y:ce,id:t.Util._getFirstPointerId(B)}],this._changedPointerPositions=[{x:re,y:ce,id:t.Util._getFirstPointerId(B)}])}_setPointerPosition(B){t.Util.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(B)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var B=this.content.getBoundingClientRect();return{top:B.top,left:B.left,scaleX:B.width/this.content.clientWidth||1,scaleY:B.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new a.SceneCanvas({width:this.width(),height:this.height()}),this.bufferHitCanvas=new a.HitCanvas({pixelRatio:1,width:this.width(),height:this.height()}),!!o.Konva.isBrowser){var B=this.container();if(!B)throw"Stage has no container. A container is required.";B.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),B.appendChild(this.content),this._resizeDOM()}}cache(){return t.Util.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(B){B.batchDraw()}),this}}e.Stage=oe,oe.prototype.nodeType=u,(0,l._registerNode)(oe),n.Factory.addGetterSetter(oe,"container")}(nS);var Lc={},Ni={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Shape=e.shapes=void 0;const t=lt,n=qt,r=Sn,o=po,a=We,c=lt,l=An;var d="hasShadow",u="shadowRGBA",f="patternImage",p="linearGradient",h="radialGradient";let m;function b(){return m||(m=n.Util.createCanvasElement().getContext("2d"),m)}e.shapes={};function w(F){const R=this.attrs.fillRule;R?F.fill(R):F.fill()}function _(F){F.stroke()}function C(F){F.fill()}function k(F){F.stroke()}function S(){this._clearCache(d)}function E(){this._clearCache(u)}function T(){this._clearCache(f)}function A(){this._clearCache(p)}function O(){this._clearCache(h)}class I extends o.Node{constructor(R){super(R);let q;for(;q=n.Util.getRandomColor(),!(q&&!(q in e.shapes)););this.colorKey=q,e.shapes[q]=this}getContext(){return n.Util.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return n.Util.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(d,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(f,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var R=b();const q=R.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(q&&q.setTransform){const z=new n.Transform;z.translate(this.fillPatternX(),this.fillPatternY()),z.rotate(t.Konva.getAngle(this.fillPatternRotation())),z.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),z.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const G=z.getMatrix(),Y=typeof DOMMatrix=="undefined"?{a:G[0],b:G[1],c:G[2],d:G[3],e:G[4],f:G[5]}:new DOMMatrix(G);q.setTransform(Y)}return q}}_getLinearGradient(){return this._getCache(p,this.__getLinearGradient)}__getLinearGradient(){var R=this.fillLinearGradientColorStops();if(R){for(var q=b(),z=this.fillLinearGradientStartPoint(),G=this.fillLinearGradientEndPoint(),Y=q.createLinearGradient(z.x,z.y,G.x,G.y),Z=0;Z<R.length;Z+=2)Y.addColorStop(R[Z],R[Z+1]);return Y}}_getRadialGradient(){return this._getCache(h,this.__getRadialGradient)}__getRadialGradient(){var R=this.fillRadialGradientColorStops();if(R){for(var q=b(),z=this.fillRadialGradientStartPoint(),G=this.fillRadialGradientEndPoint(),Y=q.createRadialGradient(z.x,z.y,this.fillRadialGradientStartRadius(),G.x,G.y,this.fillRadialGradientEndRadius()),Z=0;Z<R.length;Z+=2)Y.addColorStop(R[Z],R[Z+1]);return Y}}getShadowRGBA(){return this._getCache(u,this._getShadowRGBA)}_getShadowRGBA(){if(this.hasShadow()){var R=n.Util.colorToRGBA(this.shadowColor());if(R)return"rgba("+R.r+","+R.g+","+R.b+","+R.a*(this.shadowOpacity()||1)+")"}}hasFill(){return this._calculate("hasFill",["fillEnabled","fill","fillPatternImage","fillLinearGradientColorStops","fillRadialGradientColorStops"],()=>this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const R=this.hitStrokeWidth();return R==="auto"?this.hasStroke():this.strokeEnabled()&&!!R}intersects(R){var q=this.getStage(),z=q.bufferHitCanvas,G;return z.getContext().clear(),this.drawHit(z,null,!0),G=z.context.getImageData(Math.round(R.x),Math.round(R.y),1,1).data,G[3]>0}destroy(){return o.Node.prototype.destroy.call(this),delete e.shapes[this.colorKey],delete this.colorKey,this}_useBufferCanvas(R){var q;if(!this.getStage()||!((q=this.attrs.perfectDrawEnabled)!==null&&q!==void 0?q:!0))return!1;const G=R||this.hasFill(),Y=this.hasStroke(),Z=this.getAbsoluteOpacity()!==1;if(G&&Y&&Z)return!0;const U=this.hasShadow(),j=this.shadowForStrokeEnabled();return!!(G&&Y&&U&&j)}setStrokeHitEnabled(R){n.Util.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),R?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var R=this.size();return{x:this._centroid?-R.width/2:0,y:this._centroid?-R.height/2:0,width:R.width,height:R.height}}getClientRect(R={}){const q=R.skipTransform,z=R.relativeTo,G=this.getSelfRect(),Z=!R.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,U=G.width+Z,j=G.height+Z,H=!R.skipShadow&&this.hasShadow(),M=H?this.shadowOffsetX():0,D=H?this.shadowOffsetY():0,te=U+Math.abs(M),V=j+Math.abs(D),ee=H&&this.shadowBlur()||0,X=te+ee*2,oe=V+ee*2,se={width:X,height:oe,x:-(Z/2+ee)+Math.min(M,0)+G.x,y:-(Z/2+ee)+Math.min(D,0)+G.y};return q?se:this._transformedRect(se,z)}drawScene(R,q){var z=this.getLayer(),G=R||z.getCanvas(),Y=G.getContext(),Z=this._getCanvasCache(),U=this.getSceneFunc(),j=this.hasShadow(),H,M,D,te=G.isCache,V=q===this;if(!this.isVisible()&&!V)return this;if(Z){Y.save();var ee=this.getAbsoluteTransform(q).getMatrix();return Y.transform(ee[0],ee[1],ee[2],ee[3],ee[4],ee[5]),this._drawCachedSceneCanvas(Y),Y.restore(),this}if(!U)return this;if(Y.save(),this._useBufferCanvas()&&!te){H=this.getStage(),M=H.bufferCanvas,D=M.getContext(),D.clear(),D.save(),D._applyLineJoin(this);var X=this.getAbsoluteTransform(q).getMatrix();D.transform(X[0],X[1],X[2],X[3],X[4],X[5]),U.call(this,D,this),D.restore();var oe=M.pixelRatio;j&&Y._applyShadow(this),Y._applyOpacity(this),Y._applyGlobalCompositeOperation(this),Y.drawImage(M._canvas,0,0,M.width/oe,M.height/oe)}else{if(Y._applyLineJoin(this),!V){var X=this.getAbsoluteTransform(q).getMatrix();Y.transform(X[0],X[1],X[2],X[3],X[4],X[5]),Y._applyOpacity(this),Y._applyGlobalCompositeOperation(this)}j&&Y._applyShadow(this),U.call(this,Y,this)}return Y.restore(),this}drawHit(R,q,z=!1){if(!this.shouldDrawHit(q,z))return this;var G=this.getLayer(),Y=R||G.hitCanvas,Z=Y&&Y.getContext(),U=this.hitFunc()||this.sceneFunc(),j=this._getCanvasCache(),H=j&&j.hit;if(this.colorKey||n.Util.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),H){Z.save();var M=this.getAbsoluteTransform(q).getMatrix();return Z.transform(M[0],M[1],M[2],M[3],M[4],M[5]),this._drawCachedHitCanvas(Z),Z.restore(),this}if(!U)return this;if(Z.save(),Z._applyLineJoin(this),!(this===q)){var te=this.getAbsoluteTransform(q).getMatrix();Z.transform(te[0],te[1],te[2],te[3],te[4],te[5])}return U.call(this,Z,this),Z.restore(),this}drawHitFromCache(R=0){var q=this._getCanvasCache(),z=this._getCachedSceneCanvas(),G=q.hit,Y=G.getContext(),Z=G.getWidth(),U=G.getHeight(),j,H,M,D,te,V;Y.clear(),Y.drawImage(z._canvas,0,0,Z,U);try{for(j=Y.getImageData(0,0,Z,U),H=j.data,M=H.length,D=n.Util._hexToRgb(this.colorKey),te=0;te<M;te+=4)V=H[te+3],V>R?(H[te]=D.r,H[te+1]=D.g,H[te+2]=D.b,H[te+3]=255):H[te+3]=0;Y.putImageData(j,0,0)}catch(ee){n.Util.error("Unable to draw hit graph from cached scene canvas. "+ee.message)}return this}hasPointerCapture(R){return l.hasPointerCapture(R,this)}setPointerCapture(R){l.setPointerCapture(R,this)}releaseCapture(R){l.releaseCapture(R,this)}}e.Shape=I,I.prototype._fillFunc=w,I.prototype._strokeFunc=_,I.prototype._fillFuncHit=C,I.prototype._strokeFuncHit=k,I.prototype._centroid=!1,I.prototype.nodeType="Shape",(0,c._registerNode)(I),I.prototype.eventListeners={},I.prototype.on.call(I.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",S),I.prototype.on.call(I.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",E),I.prototype.on.call(I.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",T),I.prototype.on.call(I.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",A),I.prototype.on.call(I.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",O),r.Factory.addGetterSetter(I,"stroke",void 0,(0,a.getStringOrGradientValidator)()),r.Factory.addGetterSetter(I,"strokeWidth",2,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(I,"fillAfterStrokeEnabled",!1),r.Factory.addGetterSetter(I,"hitStrokeWidth","auto",(0,a.getNumberOrAutoValidator)()),r.Factory.addGetterSetter(I,"strokeHitEnabled",!0,(0,a.getBooleanValidator)()),r.Factory.addGetterSetter(I,"perfectDrawEnabled",!0,(0,a.getBooleanValidator)()),r.Factory.addGetterSetter(I,"shadowForStrokeEnabled",!0,(0,a.getBooleanValidator)()),r.Factory.addGetterSetter(I,"lineJoin"),r.Factory.addGetterSetter(I,"lineCap"),r.Factory.addGetterSetter(I,"sceneFunc"),r.Factory.addGetterSetter(I,"hitFunc"),r.Factory.addGetterSetter(I,"dash"),r.Factory.addGetterSetter(I,"dashOffset",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(I,"shadowColor",void 0,(0,a.getStringValidator)()),r.Factory.addGetterSetter(I,"shadowBlur",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(I,"shadowOpacity",1,(0,a.getNumberValidator)()),r.Factory.addComponentsGetterSetter(I,"shadowOffset",["x","y"]),r.Factory.addGetterSetter(I,"shadowOffsetX",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(I,"shadowOffsetY",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(I,"fillPatternImage"),r.Factory.addGetterSetter(I,"fill",void 0,(0,a.getStringOrGradientValidator)()),r.Factory.addGetterSetter(I,"fillPatternX",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(I,"fillPatternY",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(I,"fillLinearGradientColorStops"),r.Factory.addGetterSetter(I,"strokeLinearGradientColorStops"),r.Factory.addGetterSetter(I,"fillRadialGradientStartRadius",0),r.Factory.addGetterSetter(I,"fillRadialGradientEndRadius",0),r.Factory.addGetterSetter(I,"fillRadialGradientColorStops"),r.Factory.addGetterSetter(I,"fillPatternRepeat","repeat"),r.Factory.addGetterSetter(I,"fillEnabled",!0),r.Factory.addGetterSetter(I,"strokeEnabled",!0),r.Factory.addGetterSetter(I,"shadowEnabled",!0),r.Factory.addGetterSetter(I,"dashEnabled",!0),r.Factory.addGetterSetter(I,"strokeScaleEnabled",!0),r.Factory.addGetterSetter(I,"fillPriority","color"),r.Factory.addComponentsGetterSetter(I,"fillPatternOffset",["x","y"]),r.Factory.addGetterSetter(I,"fillPatternOffsetX",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(I,"fillPatternOffsetY",0,(0,a.getNumberValidator)()),r.Factory.addComponentsGetterSetter(I,"fillPatternScale",["x","y"]),r.Factory.addGetterSetter(I,"fillPatternScaleX",1,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(I,"fillPatternScaleY",1,(0,a.getNumberValidator)()),r.Factory.addComponentsGetterSetter(I,"fillLinearGradientStartPoint",["x","y"]),r.Factory.addComponentsGetterSetter(I,"strokeLinearGradientStartPoint",["x","y"]),r.Factory.addGetterSetter(I,"fillLinearGradientStartPointX",0),r.Factory.addGetterSetter(I,"strokeLinearGradientStartPointX",0),r.Factory.addGetterSetter(I,"fillLinearGradientStartPointY",0),r.Factory.addGetterSetter(I,"strokeLinearGradientStartPointY",0),r.Factory.addComponentsGetterSetter(I,"fillLinearGradientEndPoint",["x","y"]),r.Factory.addComponentsGetterSetter(I,"strokeLinearGradientEndPoint",["x","y"]),r.Factory.addGetterSetter(I,"fillLinearGradientEndPointX",0),r.Factory.addGetterSetter(I,"strokeLinearGradientEndPointX",0),r.Factory.addGetterSetter(I,"fillLinearGradientEndPointY",0),r.Factory.addGetterSetter(I,"strokeLinearGradientEndPointY",0),r.Factory.addComponentsGetterSetter(I,"fillRadialGradientStartPoint",["x","y"]),r.Factory.addGetterSetter(I,"fillRadialGradientStartPointX",0),r.Factory.addGetterSetter(I,"fillRadialGradientStartPointY",0),r.Factory.addComponentsGetterSetter(I,"fillRadialGradientEndPoint",["x","y"]),r.Factory.addGetterSetter(I,"fillRadialGradientEndPointX",0),r.Factory.addGetterSetter(I,"fillRadialGradientEndPointY",0),r.Factory.addGetterSetter(I,"fillPatternRotation",0),r.Factory.addGetterSetter(I,"fillRule",void 0,(0,a.getStringValidator)()),r.Factory.backCompat(I,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"})})(Ni),Object.defineProperty(Lc,"__esModule",{value:!0}),Lc.Layer=void 0;const Ti=qt,Ov=us,wa=po,Iv=Sn,oS=_r,qie=We,Hie=Ni,Gie=lt;var Wie="#",Kie="beforeDraw",Yie="draw",sS=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],Jie=sS.length;class _a extends Ov.Container{constructor(t){super(t),this.canvas=new oS.SceneCanvas,this.hitCanvas=new oS.HitCanvas({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t<n.children.length-1?n.content.insertBefore(this.getNativeCanvasElement(),n.children[t+1].getCanvas()._canvas):n.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){wa.Node.prototype.moveToTop.call(this);var t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){var t=wa.Node.prototype.moveUp.call(this);if(!t)return!1;var n=this.getStage();return!n||!n.content?!1:(n.content.removeChild(this.getNativeCanvasElement()),this.index<n.children.length-1?n.content.insertBefore(this.getNativeCanvasElement(),n.children[this.index+1].getCanvas()._canvas):n.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(wa.Node.prototype.moveDown.call(this)){var t=this.getStage();if(t){var n=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),n[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(wa.Node.prototype.moveToBottom.call(this)){var t=this.getStage();if(t){var n=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),n[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){var t=this.getNativeCanvasElement();return wa.Node.prototype.remove.call(this),t&&t.parentNode&&Ti.Util._isInDocument(t)&&t.parentNode.removeChild(t),this}getStage(){return this.parent}setSize({width:t,height:n}){return this.canvas.setSize(t,n),this.hitCanvas.setSize(t,n),this._setSmoothEnabled(),this}_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&Ti.Util.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(t){return t=t||{},t.width=t.width||this.getWidth(),t.height=t.height||this.getHeight(),t.x=t.x!==void 0?t.x:this.x(),t.y=t.y!==void 0?t.y:this.y(),wa.Node.prototype._toKonvaCanvas.call(this,t)}_checkVisibility(){this.visible()?this.canvas._canvas.style.display="block":this.canvas._canvas.style.display="none"}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){Ti.Util.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){Ti.Util.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,Ti.Util.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let o=0;o<Jie;o++){const a=sS[o],c=this._getIntersection({x:t.x+a.x*n,y:t.y+a.y*n}),l=c.shape;if(l)return l;if(r=!!c.antialiased,!c.antialiased)break}if(r)n+=1;else return null}}_getIntersection(t){const n=this.hitCanvas.pixelRatio,r=this.hitCanvas.context.getImageData(Math.round(t.x*n),Math.round(t.y*n),1,1).data,o=r[3];if(o===255){const a=Ti.Util._rgbToHex(r[0],r[1],r[2]),c=Hie.shapes[Wie+a];return c?{shape:c}:{antialiased:!0}}else if(o>0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),o=t||r&&r.getCanvas();return this._fire(Kie,{node:this}),this.clearBeforeDraw()&&o.getContext().clear(),Ov.Container.prototype.drawScene.call(this,o,n),this._fire(Yie,{node:this}),this}drawHit(t,n){var r=this.getLayer(),o=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),Ov.Container.prototype.drawHit.call(this,o,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){Ti.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return Ti.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}destroy(){return Ti.Util.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}Lc.Layer=_a,_a.prototype.nodeType="Layer",(0,Gie._registerNode)(_a),Iv.Factory.addGetterSetter(_a,"imageSmoothingEnabled",!0),Iv.Factory.addGetterSetter(_a,"clearBeforeDraw",!0),Iv.Factory.addGetterSetter(_a,"hitGraphEnabled",!0,(0,qie.getBooleanValidator)());var Lf={};Object.defineProperty(Lf,"__esModule",{value:!0}),Lf.FastLayer=void 0;const Xie=qt,Qie=Lc,Zie=lt;class Rv extends Qie.Layer{constructor(t){super(t),this.listening(!1),Xie.Util.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}Lf.FastLayer=Rv,Rv.prototype.nodeType="FastLayer",(0,Zie._registerNode)(Rv);var Bf={};Object.defineProperty(Bf,"__esModule",{value:!0}),Bf.Group=void 0;const Vie=qt,eoe=us,toe=lt;class Pv extends eoe.Container{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&Vie.Util.throw("You may only add groups and shapes to groups.")}}Bf.Group=Pv,Pv.prototype.nodeType="Group",(0,toe._registerNode)(Pv);var Bc={};Object.defineProperty(Bc,"__esModule",{value:!0}),Bc.Animation=void 0;const Lv=lt,aS=qt;var Bv=function(){return Lv.glob.performance&&Lv.glob.performance.now?function(){return Lv.glob.performance.now()}:function(){return new Date().getTime()}}();class Gr{constructor(t,n){this.id=Gr.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:Bv(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,o;for(o=0;o<r;o++)if(n[o]._id===t._id)return!1;return this.layers.push(t),!0}isRunning(){var t=Gr,n=t.animations,r=n.length,o;for(o=0;o<r;o++)if(n[o].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=Bv(),Gr._addAnimation(this),this}stop(){return Gr._removeAnimation(this),this}_updateFrameObject(t){this.frame.timeDiff=t-this.frame.lastTime,this.frame.lastTime=t,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(t){this.animations.push(t),this._handleAnimation()}static _removeAnimation(t){var n=t.id,r=this.animations,o=r.length,a;for(a=0;a<o;a++)if(r[a].id===n){this.animations.splice(a,1);break}}static _runFrames(){var t={},n=this.animations,r,o,a,c,l,d,u,f,p;for(c=0;c<n.length;c++)if(r=n[c],o=r.layers,a=r.func,r._updateFrameObject(Bv()),d=o.length,a?p=a.call(r,r.frame)!==!1:p=!0,!!p)for(l=0;l<d;l++)u=o[l],u._id!==void 0&&(t[u._id]=u);for(f in t)t.hasOwnProperty(f)&&t[f].batchDraw()}static _animationLoop(){var t=Gr;t.animations.length?(t._runFrames(),aS.Util.requestAnimFrame(t._animationLoop)):t.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,aS.Util.requestAnimFrame(this._animationLoop))}}Bc.Animation=Gr,Gr.animations=[],Gr.animIdCounter=0,Gr.animRunning=!1;var lS={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Easings=e.Tween=void 0;const t=qt,n=Bc,r=po,o=lt;var a={node:1,duration:1,easing:1,onFinish:1,yoyo:1},c=1,l=2,d=3,u=0,f=["fill","stroke","shadowColor"];class p{constructor(b,w,_,C,k,S,E){this.prop=b,this.propFunc=w,this.begin=C,this._pos=C,this.duration=S,this._change=0,this.prevPos=0,this.yoyo=E,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=_,this._change=k-this.begin,this.pause()}fire(b){var w=this[b];w&&w()}setTime(b){b>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():b<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=b,this.update())}getTime(){return this._time}setPosition(b){this.prevPos=this._pos,this.propFunc(b),this._pos=b}getPosition(b){return b===void 0&&(b=this._time),this.func(b,this.begin,this._change,this.duration)}play(){this.state=l,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=d,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(b){this.pause(),this._time=b,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var b=this.getTimer()-this._startTime;this.state===l?this.setTime(b):this.state===d&&this.setTime(this.duration-b)}pause(){this.state=c,this.fire("onPause")}getTimer(){return new Date().getTime()}}class h{constructor(b){var w=this,_=b.node,C=_._id,k,S=b.easing||e.Easings.Linear,E=!!b.yoyo,T;typeof b.duration=="undefined"?k=.3:b.duration===0?k=.001:k=b.duration,this.node=_,this._id=u++;var A=_.getLayer()||(_ instanceof o.Konva.Stage?_.getLayers():null);A||t.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new n.Animation(function(){w.tween.onEnterFrame()},A),this.tween=new p(T,function(O){w._tweenFunc(O)},S,0,1,k*1e3,E),this._addListeners(),h.attrs[C]||(h.attrs[C]={}),h.attrs[C][this._id]||(h.attrs[C][this._id]={}),h.tweens[C]||(h.tweens[C]={});for(T in b)a[T]===void 0&&this._addAttr(T,b[T]);this.reset(),this.onFinish=b.onFinish,this.onReset=b.onReset,this.onUpdate=b.onUpdate}_addAttr(b,w){var _=this.node,C=_._id,k,S,E,T,A,O,I,F;if(E=h.tweens[C][b],E&&delete h.attrs[C][E][b],k=_.getAttr(b),t.Util._isArray(w))if(S=[],A=Math.max(w.length,k.length),b==="points"&&w.length!==k.length&&(w.length>k.length?(I=k,k=t.Util._prepareArrayForTween(k,w,_.closed())):(O=w,w=t.Util._prepareArrayForTween(w,k,_.closed()))),b.indexOf("fill")===0)for(T=0;T<A;T++)if(T%2===0)S.push(w[T]-k[T]);else{var R=t.Util.colorToRGBA(k[T]);F=t.Util.colorToRGBA(w[T]),k[T]=R,S.push({r:F.r-R.r,g:F.g-R.g,b:F.b-R.b,a:F.a-R.a})}else for(T=0;T<A;T++)S.push(w[T]-k[T]);else f.indexOf(b)!==-1?(k=t.Util.colorToRGBA(k),F=t.Util.colorToRGBA(w),S={r:F.r-k.r,g:F.g-k.g,b:F.b-k.b,a:F.a-k.a}):S=w-k;h.attrs[C][this._id][b]={start:k,diff:S,end:w,trueEnd:O,trueStart:I},h.tweens[C][b]=this._id}_tweenFunc(b){var w=this.node,_=h.attrs[w._id][this._id],C,k,S,E,T,A,O,I;for(C in _){if(k=_[C],S=k.start,E=k.diff,I=k.end,t.Util._isArray(S))if(T=[],O=Math.max(S.length,I.length),C.indexOf("fill")===0)for(A=0;A<O;A++)A%2===0?T.push((S[A]||0)+E[A]*b):T.push("rgba("+Math.round(S[A].r+E[A].r*b)+","+Math.round(S[A].g+E[A].g*b)+","+Math.round(S[A].b+E[A].b*b)+","+(S[A].a+E[A].a*b)+")");else for(A=0;A<O;A++)T.push((S[A]||0)+E[A]*b);else f.indexOf(C)!==-1?T="rgba("+Math.round(S.r+E.r*b)+","+Math.round(S.g+E.g*b)+","+Math.round(S.b+E.b*b)+","+(S.a+E.a*b)+")":T=S+E*b;w.setAttr(C,T)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var b=this.node,w=h.attrs[b._id][this._id];w.points&&w.points.trueEnd&&b.setAttr("points",w.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var b=this.node,w=h.attrs[b._id][this._id];w.points&&w.points.trueStart&&b.points(w.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(b){return this.tween.seek(b*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var b=this.node._id,w=this._id,_=h.tweens[b],C;this.pause();for(C in _)delete h.tweens[b][C];delete h.attrs[b][w]}}e.Tween=h,h.attrs={},h.tweens={},r.Node.prototype.to=function(m){var b=m.onFinish;m.node=this,m.onFinish=function(){this.destroy(),b&&b()};var w=new h(m);w.play()},e.Easings={BackEaseIn(m,b,w,_){var C=1.70158;return w*(m/=_)*m*((C+1)*m-C)+b},BackEaseOut(m,b,w,_){var C=1.70158;return w*((m=m/_-1)*m*((C+1)*m+C)+1)+b},BackEaseInOut(m,b,w,_){var C=1.70158;return(m/=_/2)<1?w/2*(m*m*(((C*=1.525)+1)*m-C))+b:w/2*((m-=2)*m*(((C*=1.525)+1)*m+C)+2)+b},ElasticEaseIn(m,b,w,_,C,k){var S=0;return m===0?b:(m/=_)===1?b+w:(k||(k=_*.3),!C||C<Math.abs(w)?(C=w,S=k/4):S=k/(2*Math.PI)*Math.asin(w/C),-(C*Math.pow(2,10*(m-=1))*Math.sin((m*_-S)*(2*Math.PI)/k))+b)},ElasticEaseOut(m,b,w,_,C,k){var S=0;return m===0?b:(m/=_)===1?b+w:(k||(k=_*.3),!C||C<Math.abs(w)?(C=w,S=k/4):S=k/(2*Math.PI)*Math.asin(w/C),C*Math.pow(2,-10*m)*Math.sin((m*_-S)*(2*Math.PI)/k)+w+b)},ElasticEaseInOut(m,b,w,_,C,k){var S=0;return m===0?b:(m/=_/2)===2?b+w:(k||(k=_*(.3*1.5)),!C||C<Math.abs(w)?(C=w,S=k/4):S=k/(2*Math.PI)*Math.asin(w/C),m<1?-.5*(C*Math.pow(2,10*(m-=1))*Math.sin((m*_-S)*(2*Math.PI)/k))+b:C*Math.pow(2,-10*(m-=1))*Math.sin((m*_-S)*(2*Math.PI)/k)*.5+w+b)},BounceEaseOut(m,b,w,_){return(m/=_)<1/2.75?w*(7.5625*m*m)+b:m<2/2.75?w*(7.5625*(m-=1.5/2.75)*m+.75)+b:m<2.5/2.75?w*(7.5625*(m-=2.25/2.75)*m+.9375)+b:w*(7.5625*(m-=2.625/2.75)*m+.984375)+b},BounceEaseIn(m,b,w,_){return w-e.Easings.BounceEaseOut(_-m,0,w,_)+b},BounceEaseInOut(m,b,w,_){return m<_/2?e.Easings.BounceEaseIn(m*2,0,w,_)*.5+b:e.Easings.BounceEaseOut(m*2-_,0,w,_)*.5+w*.5+b},EaseIn(m,b,w,_){return w*(m/=_)*m+b},EaseOut(m,b,w,_){return-w*(m/=_)*(m-2)+b},EaseInOut(m,b,w,_){return(m/=_/2)<1?w/2*m*m+b:-w/2*(--m*(m-2)-1)+b},StrongEaseIn(m,b,w,_){return w*(m/=_)*m*m*m*m+b},StrongEaseOut(m,b,w,_){return w*((m=m/_-1)*m*m*m*m+1)+b},StrongEaseInOut(m,b,w,_){return(m/=_/2)<1?w/2*m*m*m*m*m+b:w/2*((m-=2)*m*m*m*m+2)+b},Linear(m,b,w,_){return w*m/_+b}}})(lS),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Konva=void 0;const t=lt,n=qt,r=po,o=us,a=nS,c=Lc,l=Lf,d=Bf,u=Tf,f=Ni,p=Bc,h=lS,m=xi,b=_r;e.Konva=n.Util._assign(t.Konva,{Util:n.Util,Transform:n.Transform,Node:r.Node,Container:o.Container,Stage:a.Stage,stages:a.stages,Layer:c.Layer,FastLayer:l.FastLayer,Group:d.Group,DD:u.DD,Shape:f.Shape,shapes:f.shapes,Animation:p.Animation,Tween:h.Tween,Easings:h.Easings,Context:m.Context,Canvas:b.Canvas}),e.default=e.Konva}(xv),function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Konva=void 0;var n=xv;Object.defineProperty(t,"Konva",{enumerable:!0,get:function(){return n.Konva}});const r=xv;e.exports=r.Konva}(rie,Sf);const ct=l6(Sf);var Dv={};Object.defineProperty(Dv,"__esModule",{value:!0}),Dv.Rect=void 0;const noe=Sn,roe=Ni,ioe=lt,ooe=qt,soe=We;class Df extends roe.Shape{_sceneFunc(t){var n=this.cornerRadius(),r=this.width(),o=this.height();t.beginPath(),n?ooe.Util.drawRoundedRectPath(t,r,o,n):t.rect(0,0,r,o),t.closePath(),t.fillStrokeShape(this)}}Dv.Rect=Df,Df.prototype.className="Rect",(0,ioe._registerNode)(Df),noe.Factory.addGetterSetter(Df,"cornerRadius",0,(0,soe.getNumberOrArrayOfNumbersValidator)(4));var Mv={};Object.defineProperty(Mv,"__esModule",{value:!0}),Mv.Circle=void 0;const aoe=Sn,loe=Ni,coe=We,doe=lt;class Ca extends loe.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}Mv.Circle=Ca,Ca.prototype._centroid=!0,Ca.prototype.className="Circle",Ca.prototype._attrsAffectingSize=["radius"],(0,doe._registerNode)(Ca),aoe.Factory.addGetterSetter(Ca,"radius",0,(0,coe.getNumberValidator)());var Fv={};Object.defineProperty(Fv,"__esModule",{value:!0}),Fv.Image=void 0;const $v=qt,hs=Sn,uoe=Ni,foe=lt,Dc=We;let Wr=class eL extends uoe.Shape{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),o=this.cornerRadius(),a=this.attrs.image;let c;if(a){const l=this.attrs.cropWidth,d=this.attrs.cropHeight;l&&d?c=[a,this.cropX(),this.cropY(),l,d,0,0,n,r]:c=[a,0,0,n,r]}(this.hasFill()||this.hasStroke()||o)&&(t.beginPath(),o?$v.Util.drawRoundedRectPath(t,n,r,o):t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),a&&(o&&t.clip(),t.drawImage.apply(t,c))}_hitFunc(t){var n=this.width(),r=this.height(),o=this.cornerRadius();t.beginPath(),o?$v.Util.drawRoundedRectPath(t,n,r,o):t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var o=$v.Util.createImageElement();o.onload=function(){var a=new eL({image:o});n(a)},o.onerror=r,o.crossOrigin="Anonymous",o.src=t}};Fv.Image=Wr,Wr.prototype.className="Image",(0,foe._registerNode)(Wr),hs.Factory.addGetterSetter(Wr,"cornerRadius",0,(0,Dc.getNumberOrArrayOfNumbersValidator)(4)),hs.Factory.addGetterSetter(Wr,"image"),hs.Factory.addComponentsGetterSetter(Wr,"crop",["x","y","width","height"]),hs.Factory.addGetterSetter(Wr,"cropX",0,(0,Dc.getNumberValidator)()),hs.Factory.addGetterSetter(Wr,"cropY",0,(0,Dc.getNumberValidator)()),hs.Factory.addGetterSetter(Wr,"cropWidth",0,(0,Dc.getNumberValidator)()),hs.Factory.addGetterSetter(Wr,"cropHeight",0,(0,Dc.getNumberValidator)());var Mc={};Object.defineProperty(Mc,"__esModule",{value:!0}),Mc.Text=Mc.stringToArray=void 0;const zv=qt,ln=Sn,hoe=Ni,mo=We,poe=lt;function cS(e){return Array.from(e)}Mc.stringToArray=cS;var Sa="auto",goe="center",Fc="justify",moe="Change.konva",voe="2d",dS="-",uS="left",yoe="text",boe="Text",woe="top",_oe="bottom",fS="middle",hS="normal",Coe="px ",Mf=" ",Soe="right",Eoe="word",xoe="char",pS="none",Uv="…",gS=["fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],koe=gS.length;function Noe(e){return e.split(",").map(t=>{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var Ff;function jv(){return Ff||(Ff=zv.Util.createCanvasElement().getContext(voe),Ff)}function Toe(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function Aoe(e){e.setAttr("miterLimit",2),e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function Ooe(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class Tt extends hoe.Shape{constructor(t){super(Ooe(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n<koe;n++)this.on(gS[n]+moe,this._setTextData);this._setTextData()}_sceneFunc(t){var n=this.textArr,r=n.length;if(this.text()){var o=this.padding(),a=this.fontSize(),c=this.lineHeight()*a,l=this.verticalAlign(),d=0,u=this.align(),f=this.getWidth(),p=this.letterSpacing(),h=this.fill(),m=this.textDecoration(),b=m.indexOf("underline")!==-1,w=m.indexOf("line-through")!==-1,_,C=0,C=c/2,k=0,S=0;for(t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",fS),t.setAttr("textAlign",uS),l===fS?d=(this.getHeight()-r*c-o*2)/2:l===_oe&&(d=this.getHeight()-r*c-o*2),t.translate(o,d+o),_=0;_<r;_++){var k=0,S=0,E=n[_],T=E.text,A=E.width,O=E.lastInParagraph,I,F,R;if(t.save(),u===Soe?k+=f-A-o*2:u===goe&&(k+=(f-A-o*2)/2),b){t.save(),t.beginPath(),t.moveTo(k,C+S+Math.round(a/2)),I=T.split(" ").length-1,F=I===0,R=u===Fc&&!O?f-o*2:A,t.lineTo(k+Math.round(R),C+S+Math.round(a/2)),t.lineWidth=a/15;const U=this._getLinearGradient();t.strokeStyle=U||h,t.stroke(),t.restore()}if(w){t.save(),t.beginPath(),t.moveTo(k,C+S),I=T.split(" ").length-1,F=I===0,R=u===Fc&&O&&!F?f-o*2:A,t.lineTo(k+Math.round(R),C+S),t.lineWidth=a/15;const U=this._getLinearGradient();t.strokeStyle=U||h,t.stroke(),t.restore()}if(p!==0||u===Fc){I=T.split(" ").length-1;for(var q=cS(T),z=0;z<q.length;z++){var G=q[z];G===" "&&!O&&u===Fc&&(k+=(f-o*2-A)/I),this._partialTextX=k,this._partialTextY=C+S,this._partialText=G,t.fillStrokeShape(this),k+=this.measureSize(G).width+p}}else this._partialTextX=k,this._partialTextY=C+S,this._partialText=T,t.fillStrokeShape(this);t.restore(),r>1&&(C+=c)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=zv.Util._isString(t)?t:t==null?"":t+"";return this._setAttr(yoe,n),this}getWidth(){var t=this.attrs.width===Sa||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Sa||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return zv.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=jv(),r=this.fontSize(),o;return n.save(),n.font=this._getContextFont(),o=n.measureText(t),n.restore(),{width:o.width,height:r}}_getContextFont(){return this.fontStyle()+Mf+this.fontVariant()+Mf+(this.fontSize()+Coe)+Noe(this.fontFamily())}_addTextLine(t){this.align()===Fc&&(t=t.trim());var r=this._getTextWidth(t);return this.textArr.push({text:t,width:r,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return jv().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(`
135
135
  `),n=+this.fontSize(),r=0,o=this.lineHeight()*n,a=this.attrs.width,c=this.attrs.height,l=a!==Sa&&a!==void 0,d=c!==Sa&&c!==void 0,u=this.padding(),f=a-u*2,p=c-u*2,h=0,m=this.wrap(),b=m!==pS,w=m!==xoe&&b,_=this.ellipsis();this.textArr=[],jv().font=this._getContextFont();for(var C=_?this._getTextWidth(Uv):0,k=0,S=t.length;k<S;++k){var E=t[k],T=this._getTextWidth(E);if(l&&T>f)for(;E.length>0;){for(var A=0,O=E.length,I="",F=0;A<O;){var R=A+O>>>1,q=E.slice(0,R+1),z=this._getTextWidth(q)+C;z<=f?(A=R+1,I=q,F=z):O=R}if(I){if(w){var G,Y=E[I.length],Z=Y===Mf||Y===dS;Z&&F<=f?G=I.length:G=Math.max(I.lastIndexOf(Mf),I.lastIndexOf(dS))+1,G>0&&(A=G,I=I.slice(0,A),F=this._getTextWidth(I))}I=I.trimRight(),this._addTextLine(I),r=Math.max(r,F),h+=o;var U=this._shouldHandleEllipsis(h);if(U){this._tryToAddEllipsisToLastLine();break}if(E=E.slice(A),E=E.trimLeft(),E.length>0&&(T=this._getTextWidth(E),T<=f)){this._addTextLine(E),h+=o,r=Math.max(r,T);break}}else break}else this._addTextLine(E),h+=o,r=Math.max(r,T),this._shouldHandleEllipsis(h)&&k<S-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),d&&h+o>p)break}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,o=this.attrs.height,a=o!==Sa&&o!==void 0,c=this.padding(),l=o-c*2,d=this.wrap(),u=d!==pS;return!u||a&&t+r>l}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Sa&&t!==void 0,r=this.padding(),o=t-r*2,a=this.ellipsis(),c=this.textArr[this.textArr.length-1];if(!(!c||!a)){if(n){var l=this._getTextWidth(c.text+Uv)<o;l||(c.text=c.text.slice(0,c.text.length-3))}this.textArr.splice(this.textArr.length-1,1),this._addTextLine(c.text+Uv)}}getStrokeScaleEnabled(){return!0}}Mc.Text=Tt,Tt.prototype._fillFunc=Toe,Tt.prototype._strokeFunc=Aoe,Tt.prototype.className=boe,Tt.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"],(0,poe._registerNode)(Tt),ln.Factory.overWriteSetter(Tt,"width",(0,mo.getNumberOrAutoValidator)()),ln.Factory.overWriteSetter(Tt,"height",(0,mo.getNumberOrAutoValidator)()),ln.Factory.addGetterSetter(Tt,"fontFamily","Arial"),ln.Factory.addGetterSetter(Tt,"fontSize",12,(0,mo.getNumberValidator)()),ln.Factory.addGetterSetter(Tt,"fontStyle",hS),ln.Factory.addGetterSetter(Tt,"fontVariant",hS),ln.Factory.addGetterSetter(Tt,"padding",0,(0,mo.getNumberValidator)()),ln.Factory.addGetterSetter(Tt,"align",uS),ln.Factory.addGetterSetter(Tt,"verticalAlign",woe),ln.Factory.addGetterSetter(Tt,"lineHeight",1,(0,mo.getNumberValidator)()),ln.Factory.addGetterSetter(Tt,"wrap",Eoe),ln.Factory.addGetterSetter(Tt,"ellipsis",!1,(0,mo.getBooleanValidator)()),ln.Factory.addGetterSetter(Tt,"letterSpacing",0,(0,mo.getNumberValidator)()),ln.Factory.addGetterSetter(Tt,"text","",(0,mo.getStringValidator)()),ln.Factory.addGetterSetter(Tt,"textDecoration","");var qv={},$f={};Object.defineProperty($f,"__esModule",{value:!0}),$f.Line=void 0;const zf=Sn,Ioe=Ni,mS=We,Roe=lt;function Hv(e,t,n,r,o,a,c){var l=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),d=Math.sqrt(Math.pow(o-n,2)+Math.pow(a-r,2)),u=c*l/(l+d),f=c*d/(l+d),p=n-u*(o-e),h=r-u*(a-t),m=n+f*(o-e),b=r+f*(a-t);return[p,h,m,b]}function vS(e,t){var n=e.length,r=[],o,a;for(o=2;o<n-2;o+=2)a=Hv(e[o-2],e[o-1],e[o],e[o+1],e[o+2],e[o+3],t),!isNaN(a[0])&&(r.push(a[0]),r.push(a[1]),r.push(e[o]),r.push(e[o+1]),r.push(a[2]),r.push(a[3]));return r}class vo extends Ioe.Shape{constructor(t){super(t),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(t){var n=this.points(),r=n.length,o=this.tension(),a=this.closed(),c=this.bezier(),l,d,u;if(r){if(t.beginPath(),t.moveTo(n[0],n[1]),o!==0&&r>4){for(l=this.getTensionPoints(),d=l.length,u=a?0:4,a||t.quadraticCurveTo(l[0],l[1],l[2],l[3]);u<d-2;)t.bezierCurveTo(l[u++],l[u++],l[u++],l[u++],l[u++],l[u++]);a||t.quadraticCurveTo(l[d-2],l[d-1],n[r-2],n[r-1])}else if(c)for(u=2;u<r;)t.bezierCurveTo(n[u++],n[u++],n[u++],n[u++],n[u++],n[u++]);else for(u=2;u<r;u+=2)t.lineTo(n[u],n[u+1]);a?(t.closePath(),t.fillStrokeShape(this)):t.strokeShape(this)}}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():vS(this.points(),this.tension())}_getTensionPointsClosed(){var t=this.points(),n=t.length,r=this.tension(),o=Hv(t[n-2],t[n-1],t[0],t[1],t[2],t[3],r),a=Hv(t[n-4],t[n-3],t[n-2],t[n-1],t[0],t[1],r),c=vS(t,r),l=[o[2],o[3]].concat(c).concat([a[0],a[1],t[n-2],t[n-1],a[2],a[3],o[0],o[1],t[0],t[1]]);return l}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){var t=this.points();if(t.length<4)return{x:t[0]||0,y:t[1]||0,width:0,height:0};this.tension()!==0?t=[t[0],t[1],...this._getTensionPoints(),t[t.length-2],t[t.length-1]]:t=this.points();for(var n=t[0],r=t[0],o=t[1],a=t[1],c,l,d=0;d<t.length/2;d++)c=t[d*2],l=t[d*2+1],n=Math.min(n,c),r=Math.max(r,c),o=Math.min(o,l),a=Math.max(a,l);return{x:n,y:o,width:r-n,height:a-o}}}$f.Line=vo,vo.prototype.className="Line",vo.prototype._attrsAffectingSize=["points","bezier","tension"],(0,Roe._registerNode)(vo),zf.Factory.addGetterSetter(vo,"closed",!1),zf.Factory.addGetterSetter(vo,"bezier",!1),zf.Factory.addGetterSetter(vo,"tension",0,(0,mS.getNumberValidator)()),zf.Factory.addGetterSetter(vo,"points",[],(0,mS.getNumberArrayValidator)());var Uf={},yS={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.t2length=e.getQuadraticArcLength=e.getCubicArcLength=e.binomialCoefficients=e.cValues=e.tValues=void 0,e.tValues=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],e.cValues=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],e.binomialCoefficients=[[1],[1,1],[1,2,1],[1,3,3,1]];const t=(c,l,d)=>{let u,f,p;u=d/2,f=0;for(let m=0;m<20;m++)p=u*e.tValues[20][m]+u,f+=e.cValues[20][m]*r(c,l,p);return u*f};e.getCubicArcLength=t;const n=(c,l,d)=>{d===void 0&&(d=1);const u=c[0]-2*c[1]+c[2],f=l[0]-2*l[1]+l[2],p=2*c[1]-2*c[0],h=2*l[1]-2*l[0],m=4*(u*u+f*f),b=4*(u*p+f*h),w=p*p+h*h;if(m===0)return d*Math.sqrt(Math.pow(c[2]-c[0],2)+Math.pow(l[2]-l[0],2));const _=b/(2*m),C=w/m,k=d+_,S=C-_*_,E=k*k+S>0?Math.sqrt(k*k+S):0,T=_*_+S>0?Math.sqrt(_*_+S):0,A=_+Math.sqrt(_*_+S)!==0?S*Math.log(Math.abs((k+E)/(_+T))):0;return Math.sqrt(m)/2*(k*E-_*T+A)};e.getQuadraticArcLength=n;function r(c,l,d){const u=o(1,d,c),f=o(1,d,l),p=u*u+f*f;return Math.sqrt(p)}const o=(c,l,d)=>{const u=d.length-1;let f,p;if(u===0)return 0;if(c===0){p=0;for(let h=0;h<=u;h++)p+=e.binomialCoefficients[u][h]*Math.pow(1-l,u-h)*Math.pow(l,h)*d[h];return p}else{f=new Array(u);for(let h=0;h<u;h++)f[h]=u*(d[h+1]-d[h]);return o(c-1,l,f)}},a=(c,l,d)=>{let u=1,f=c/l,p=(c-d(f))/l,h=0;for(;u>.001;){const m=d(f+p),b=Math.abs(c-m)/l;if(b<u)u=b,f+=p;else{const w=d(f-p),_=Math.abs(c-w)/l;_<u?(u=_,f-=p):p/=2}if(h++,h>500)break}return f};e.t2length=a})(yS),Object.defineProperty(Uf,"__esModule",{value:!0}),Uf.Path=void 0;const Poe=Sn,Loe=Ni,Boe=lt,Ea=yS;class $t extends Loe.Shape{constructor(t){super(t),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=$t.parsePathData(this.data()),this.pathLength=$t.getPathLength(this.dataArray)}_sceneFunc(t){var n=this.dataArray;t.beginPath();for(var r=!1,o=0;o<n.length;o++){var a=n[o].command,c=n[o].points;switch(a){case"L":t.lineTo(c[0],c[1]);break;case"M":t.moveTo(c[0],c[1]);break;case"C":t.bezierCurveTo(c[0],c[1],c[2],c[3],c[4],c[5]);break;case"Q":t.quadraticCurveTo(c[0],c[1],c[2],c[3]);break;case"A":var l=c[0],d=c[1],u=c[2],f=c[3],p=c[4],h=c[5],m=c[6],b=c[7],w=u>f?u:f,_=u>f?1:u/f,C=u>f?f/u:1;t.translate(l,d),t.rotate(m),t.scale(_,C),t.arc(0,0,w,p,p+h,1-b),t.scale(1/_,1/C),t.rotate(-m),t.translate(-l,-d);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var f=u.points[4],p=u.points[5],h=u.points[4]+p,m=Math.PI/180;if(Math.abs(f-h)<m&&(m=Math.abs(f-h)),p<0)for(let b=f-m;b>h;b-=m){const w=$t.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],b,0);t.push(w.x,w.y)}else for(let b=f+m;b<h;b+=m){const w=$t.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],b,0);t.push(w.x,w.y)}}else if(u.command==="C")for(let b=0;b<=1;b+=.01){const w=$t.getPointOnCubicBezier(b,u.start.x,u.start.y,u.points[0],u.points[1],u.points[2],u.points[3],u.points[4],u.points[5]);t.push(w.x,w.y)}else t=t.concat(u.points)});for(var n=t[0],r=t[0],o=t[1],a=t[1],c,l,d=0;d<t.length/2;d++)c=t[d*2],l=t[d*2+1],isNaN(c)||(n=Math.min(n,c),r=Math.max(r,c)),isNaN(l)||(o=Math.min(o,l),a=Math.max(a,l));return{x:n,y:o,width:r-n,height:a-o}}getLength(){return this.pathLength}getPointAtLength(t){return $t.getPointAtLengthOfDataArray(t,this.dataArray)}static getLineLength(t,n,r,o){return Math.sqrt((r-t)*(r-t)+(o-n)*(o-n))}static getPathLength(t){let n=0;for(var r=0;r<t.length;++r)n+=t[r].pathLength;return n}static getPointAtLengthOfDataArray(t,n){var r,o=0,a=n.length;if(!a)return null;for(;o<a&&t>n[o].pathLength;)t-=n[o].pathLength,++o;if(o===a)return r=n[o-1].points.slice(-2),{x:r[0],y:r[1]};if(t<.01)return r=n[o].points.slice(0,2),{x:r[0],y:r[1]};var c=n[o],l=c.points;switch(c.command){case"L":return $t.getPointOnLine(t,c.start.x,c.start.y,l[0],l[1]);case"C":return $t.getPointOnCubicBezier((0,Ea.t2length)(t,$t.getPathLength(n),w=>(0,Ea.getCubicArcLength)([c.start.x,l[0],l[2],l[4]],[c.start.y,l[1],l[3],l[5]],w)),c.start.x,c.start.y,l[0],l[1],l[2],l[3],l[4],l[5]);case"Q":return $t.getPointOnQuadraticBezier((0,Ea.t2length)(t,$t.getPathLength(n),w=>(0,Ea.getQuadraticArcLength)([c.start.x,l[0],l[2]],[c.start.y,l[1],l[3]],w)),c.start.x,c.start.y,l[0],l[1],l[2],l[3]);case"A":var d=l[0],u=l[1],f=l[2],p=l[3],h=l[4],m=l[5],b=l[6];return h+=m*t/c.pathLength,$t.getPointOnEllipticalArc(d,u,f,p,h,b)}return null}static getPointOnLine(t,n,r,o,a,c,l){c===void 0&&(c=n),l===void 0&&(l=r);var d=(a-r)/(o-n+1e-8),u=Math.sqrt(t*t/(1+d*d));o<n&&(u*=-1);var f=d*u,p;if(o===n)p={x:c,y:l+f};else if((l-r)/(c-n+1e-8)===d)p={x:c+u,y:l+f};else{var h,m,b=this.getLineLength(n,r,o,a),w=(c-n)*(o-n)+(l-r)*(a-r);w=w/(b*b),h=n+w*(o-n),m=r+w*(a-r);var _=this.getLineLength(c,l,h,m),C=Math.sqrt(t*t-_*_);u=Math.sqrt(C*C/(1+d*d)),o<n&&(u*=-1),f=d*u,p={x:h+u,y:m+f}}return p}static getPointOnCubicBezier(t,n,r,o,a,c,l,d,u){function f(_){return _*_*_}function p(_){return 3*_*_*(1-_)}function h(_){return 3*_*(1-_)*(1-_)}function m(_){return(1-_)*(1-_)*(1-_)}var b=d*f(t)+c*p(t)+o*h(t)+n*m(t),w=u*f(t)+l*p(t)+a*h(t)+r*m(t);return{x:b,y:w}}static getPointOnQuadraticBezier(t,n,r,o,a,c,l){function d(m){return m*m}function u(m){return 2*m*(1-m)}function f(m){return(1-m)*(1-m)}var p=c*d(t)+o*u(t)+n*f(t),h=l*d(t)+a*u(t)+r*f(t);return{x:p,y:h}}static getPointOnEllipticalArc(t,n,r,o,a,c){var l=Math.cos(c),d=Math.sin(c),u={x:r*Math.cos(a),y:o*Math.sin(a)};return{x:t+(u.x*l-u.y*d),y:n+(u.x*d+u.y*l)}}static parsePathData(t){if(!t)return[];var n=t,r=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];n=n.replace(new RegExp(" ","g"),",");for(var o=0;o<r.length;o++)n=n.replace(new RegExp(r[o],"g"),"|"+r[o]);var a=n.split("|"),c=[],l=[],d=0,u=0,f=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi,p;for(o=1;o<a.length;o++){var h=a[o],m=h.charAt(0);for(h=h.slice(1),l.length=0;p=f.exec(h);)l.push(p[0]);for(var b=[],w=0,_=l.length;w<_;w++){if(l[w]==="00"){b.push(0,0);continue}var C=parseFloat(l[w]);isNaN(C)?b.push(0):b.push(C)}for(;b.length>0&&!isNaN(b[0]);){var k=null,S=[],E=d,T=u,A,O,I,F,R,q,z,G,Y,Z;switch(m){case"l":d+=b.shift(),u+=b.shift(),k="L",S.push(d,u);break;case"L":d=b.shift(),u=b.shift(),S.push(d,u);break;case"m":var U=b.shift(),j=b.shift();if(d+=U,u+=j,k="M",c.length>2&&c[c.length-1].command==="z"){for(var H=c.length-2;H>=0;H--)if(c[H].command==="M"){d=c[H].points[0]+U,u=c[H].points[1]+j;break}}S.push(d,u),m="l";break;case"M":d=b.shift(),u=b.shift(),k="M",S.push(d,u),m="L";break;case"h":d+=b.shift(),k="L",S.push(d,u);break;case"H":d=b.shift(),k="L",S.push(d,u);break;case"v":u+=b.shift(),k="L",S.push(d,u);break;case"V":u=b.shift(),k="L",S.push(d,u);break;case"C":S.push(b.shift(),b.shift(),b.shift(),b.shift()),d=b.shift(),u=b.shift(),S.push(d,u);break;case"c":S.push(d+b.shift(),u+b.shift(),d+b.shift(),u+b.shift()),d+=b.shift(),u+=b.shift(),k="C",S.push(d,u);break;case"S":O=d,I=u,A=c[c.length-1],A.command==="C"&&(O=d+(d-A.points[2]),I=u+(u-A.points[3])),S.push(O,I,b.shift(),b.shift()),d=b.shift(),u=b.shift(),k="C",S.push(d,u);break;case"s":O=d,I=u,A=c[c.length-1],A.command==="C"&&(O=d+(d-A.points[2]),I=u+(u-A.points[3])),S.push(O,I,d+b.shift(),u+b.shift()),d+=b.shift(),u+=b.shift(),k="C",S.push(d,u);break;case"Q":S.push(b.shift(),b.shift()),d=b.shift(),u=b.shift(),S.push(d,u);break;case"q":S.push(d+b.shift(),u+b.shift()),d+=b.shift(),u+=b.shift(),k="Q",S.push(d,u);break;case"T":O=d,I=u,A=c[c.length-1],A.command==="Q"&&(O=d+(d-A.points[0]),I=u+(u-A.points[1])),d=b.shift(),u=b.shift(),k="Q",S.push(O,I,d,u);break;case"t":O=d,I=u,A=c[c.length-1],A.command==="Q"&&(O=d+(d-A.points[0]),I=u+(u-A.points[1])),d+=b.shift(),u+=b.shift(),k="Q",S.push(O,I,d,u);break;case"A":F=b.shift(),R=b.shift(),q=b.shift(),z=b.shift(),G=b.shift(),Y=d,Z=u,d=b.shift(),u=b.shift(),k="A",S=this.convertEndpointToCenterParameterization(Y,Z,d,u,z,G,F,R,q);break;case"a":F=b.shift(),R=b.shift(),q=b.shift(),z=b.shift(),G=b.shift(),Y=d,Z=u,d+=b.shift(),u+=b.shift(),k="A",S=this.convertEndpointToCenterParameterization(Y,Z,d,u,z,G,F,R,q);break}c.push({command:k||m,points:S,start:{x:E,y:T},pathLength:this.calcLength(E,T,k||m,S)})}(m==="z"||m==="Z")&&c.push({command:"z",points:[],start:void 0,pathLength:0})}return c}static calcLength(t,n,r,o){var a,c,l,d,u=$t;switch(r){case"L":return u.getLineLength(t,n,o[0],o[1]);case"C":return(0,Ea.getCubicArcLength)([t,o[0],o[2],o[4]],[n,o[1],o[3],o[5]],1);case"Q":return(0,Ea.getQuadraticArcLength)([t,o[0],o[2]],[n,o[1],o[3]],1);case"A":a=0;var f=o[4],p=o[5],h=o[4]+p,m=Math.PI/180;if(Math.abs(f-h)<m&&(m=Math.abs(f-h)),c=u.getPointOnEllipticalArc(o[0],o[1],o[2],o[3],f,0),p<0)for(d=f-m;d>h;d-=m)l=u.getPointOnEllipticalArc(o[0],o[1],o[2],o[3],d,0),a+=u.getLineLength(c.x,c.y,l.x,l.y),c=l;else for(d=f+m;d<h;d+=m)l=u.getPointOnEllipticalArc(o[0],o[1],o[2],o[3],d,0),a+=u.getLineLength(c.x,c.y,l.x,l.y),c=l;return l=u.getPointOnEllipticalArc(o[0],o[1],o[2],o[3],h,0),a+=u.getLineLength(c.x,c.y,l.x,l.y),a}return 0}static convertEndpointToCenterParameterization(t,n,r,o,a,c,l,d,u){var f=u*(Math.PI/180),p=Math.cos(f)*(t-r)/2+Math.sin(f)*(n-o)/2,h=-1*Math.sin(f)*(t-r)/2+Math.cos(f)*(n-o)/2,m=p*p/(l*l)+h*h/(d*d);m>1&&(l*=Math.sqrt(m),d*=Math.sqrt(m));var b=Math.sqrt((l*l*(d*d)-l*l*(h*h)-d*d*(p*p))/(l*l*(h*h)+d*d*(p*p)));a===c&&(b*=-1),isNaN(b)&&(b=0);var w=b*l*h/d,_=b*-d*p/l,C=(t+r)/2+Math.cos(f)*w-Math.sin(f)*_,k=(n+o)/2+Math.sin(f)*w+Math.cos(f)*_,S=function(R){return Math.sqrt(R[0]*R[0]+R[1]*R[1])},E=function(R,q){return(R[0]*q[0]+R[1]*q[1])/(S(R)*S(q))},T=function(R,q){return(R[0]*q[1]<R[1]*q[0]?-1:1)*Math.acos(E(R,q))},A=T([1,0],[(p-w)/l,(h-_)/d]),O=[(p-w)/l,(h-_)/d],I=[(-1*p-w)/l,(-1*h-_)/d],F=T(O,I);return E(O,I)<=-1&&(F=Math.PI),E(O,I)>=1&&(F=0),c===0&&F>0&&(F=F-2*Math.PI),c===1&&F<0&&(F=F+2*Math.PI),[C,k,l,d,A,F,f,c]}}Uf.Path=$t,$t.prototype.className="Path",$t.prototype._attrsAffectingSize=["data"],(0,Boe._registerNode)($t),Poe.Factory.addGetterSetter($t,"data"),Object.defineProperty(qv,"__esModule",{value:!0}),qv.Arrow=void 0;const jf=Sn,Doe=$f,bS=We,Moe=lt,wS=Uf;class ps extends Doe.Line{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),o=r,a=this.tension()!==0&&r.length>4;a&&(o=this.getTensionPoints());var c=this.pointerLength(),l=r.length,d,u;if(a){const h=[o[o.length-4],o[o.length-3],o[o.length-2],o[o.length-1],r[l-2],r[l-1]],m=wS.Path.calcLength(o[o.length-4],o[o.length-3],"C",h),b=wS.Path.getPointOnQuadraticBezier(Math.min(1,1-c/m),h[0],h[1],h[2],h[3],h[4],h[5]);d=r[l-2]-b.x,u=r[l-1]-b.y}else d=r[l-2]-r[l-4],u=r[l-1]-r[l-3];var f=(Math.atan2(u,d)+n)%n,p=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[l-2],r[l-1]),t.rotate(f),t.moveTo(0,0),t.lineTo(-c,p/2),t.lineTo(-c,-p/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),a?(d=(o[0]+o[2])/2-r[0],u=(o[1]+o[3])/2-r[1]):(d=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-d)+n)%n),t.moveTo(0,0),t.lineTo(-c,p/2),t.lineTo(-c,-p/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}qv.Arrow=ps,ps.prototype.className="Arrow",(0,Moe._registerNode)(ps),jf.Factory.addGetterSetter(ps,"pointerLength",10,(0,bS.getNumberValidator)()),jf.Factory.addGetterSetter(ps,"pointerWidth",10,(0,bS.getNumberValidator)()),jf.Factory.addGetterSetter(ps,"pointerAtBeginning",!1),jf.Factory.addGetterSetter(ps,"pointerAtEnding",!0);function _S(e,t){var n,r=1;e==null&&(e=0),t==null&&(t=0);function o(){var a,c=n.length,l,d=0,u=0;for(a=0;a<c;++a)l=n[a],d+=l.x,u+=l.y;for(d=(d/c-e)*r,u=(u/c-t)*r,a=0;a<c;++a)l=n[a],l.x-=d,l.y-=u}return o.initialize=function(a){n=a},o.x=function(a){return arguments.length?(e=+a,o):e},o.y=function(a){return arguments.length?(t=+a,o):t},o.strength=function(a){return arguments.length?(r=+a,o):r},o}function Foe(e){const t=+this._x.call(null,e),n=+this._y.call(null,e);return CS(this.cover(t,n),t,n,e)}function CS(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var o,a=e._root,c={data:r},l=e._x0,d=e._y0,u=e._x1,f=e._y1,p,h,m,b,w,_,C,k;if(!a)return e._root=c,e;for(;a.length;)if((w=t>=(p=(l+u)/2))?l=p:u=p,(_=n>=(h=(d+f)/2))?d=h:f=h,o=a,!(a=a[C=_<<1|w]))return o[C]=c,e;if(m=+e._x.call(null,a.data),b=+e._y.call(null,a.data),t===m&&n===b)return c.next=a,o?o[C]=c:e._root=c,e;do o=o?o[C]=new Array(4):e._root=new Array(4),(w=t>=(p=(l+u)/2))?l=p:u=p,(_=n>=(h=(d+f)/2))?d=h:f=h;while((C=_<<1|w)===(k=(b>=h)<<1|m>=p));return o[k]=a,o[C]=c,e}function $oe(e){var t,n,r=e.length,o,a,c=new Array(r),l=new Array(r),d=1/0,u=1/0,f=-1/0,p=-1/0;for(n=0;n<r;++n)isNaN(o=+this._x.call(null,t=e[n]))||isNaN(a=+this._y.call(null,t))||(c[n]=o,l[n]=a,o<d&&(d=o),o>f&&(f=o),a<u&&(u=a),a>p&&(p=a));if(d>f||u>p)return this;for(this.cover(d,u).cover(f,p),n=0;n<r;++n)CS(this,c[n],l[n],e[n]);return this}function zoe(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,o=this._x1,a=this._y1;if(isNaN(n))o=(n=Math.floor(e))+1,a=(r=Math.floor(t))+1;else{for(var c=o-n||1,l=this._root,d,u;n>e||e>=o||r>t||t>=a;)switch(u=(t<r)<<1|e<n,d=new Array(4),d[u]=l,l=d,c*=2,u){case 0:o=n+c,a=r+c;break;case 1:n=o-c,a=r+c;break;case 2:o=n+c,r=a-c;break;case 3:n=o-c,r=a-c;break}this._root&&this._root.length&&(this._root=l)}return this._x0=n,this._y0=r,this._x1=o,this._y1=a,this}function Uoe(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function joe(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function cn(e,t,n,r,o){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=o}function qoe(e,t,n){var r,o=this._x0,a=this._y0,c,l,d,u,f=this._x1,p=this._y1,h=[],m=this._root,b,w;for(m&&h.push(new cn(m,o,a,f,p)),n==null?n=1/0:(o=e-n,a=t-n,f=e+n,p=t+n,n*=n);b=h.pop();)if(!(!(m=b.node)||(c=b.x0)>f||(l=b.y0)>p||(d=b.x1)<o||(u=b.y1)<a))if(m.length){var _=(c+d)/2,C=(l+u)/2;h.push(new cn(m[3],_,C,d,u),new cn(m[2],c,C,_,u),new cn(m[1],_,l,d,C),new cn(m[0],c,l,_,C)),(w=(t>=C)<<1|e>=_)&&(b=h[h.length-1],h[h.length-1]=h[h.length-1-w],h[h.length-1-w]=b)}else{var k=e-+this._x.call(null,m.data),S=t-+this._y.call(null,m.data),E=k*k+S*S;if(E<n){var T=Math.sqrt(n=E);o=e-T,a=t-T,f=e+T,p=t+T,r=m.data}}return r}function Hoe(e){if(isNaN(f=+this._x.call(null,e))||isNaN(p=+this._y.call(null,e)))return this;var t,n=this._root,r,o,a,c=this._x0,l=this._y0,d=this._x1,u=this._y1,f,p,h,m,b,w,_,C;if(!n)return this;if(n.length)for(;;){if((b=f>=(h=(c+d)/2))?c=h:d=h,(w=p>=(m=(l+u)/2))?l=m:u=m,t=n,!(n=n[_=w<<1|b]))return this;if(!n.length)break;(t[_+1&3]||t[_+2&3]||t[_+3&3])&&(r=t,C=_)}for(;n.data!==e;)if(o=n,!(n=n.next))return this;return(a=n.next)&&delete n.next,o?(a?o.next=a:delete o.next,this):t?(a?t[_]=a:delete t[_],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(r?r[C]=n:this._root=n),this):(this._root=a,this)}function Goe(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function Woe(){return this._root}function Koe(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function Yoe(e){var t=[],n,r=this._root,o,a,c,l,d;for(r&&t.push(new cn(r,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(r=n.node,a=n.x0,c=n.y0,l=n.x1,d=n.y1)&&r.length){var u=(a+l)/2,f=(c+d)/2;(o=r[3])&&t.push(new cn(o,u,f,l,d)),(o=r[2])&&t.push(new cn(o,a,f,u,d)),(o=r[1])&&t.push(new cn(o,u,c,l,f)),(o=r[0])&&t.push(new cn(o,a,c,u,f))}return this}function Joe(e){var t=[],n=[],r;for(this._root&&t.push(new cn(this._root,this._x0,this._y0,this._x1,this._y1));r=t.pop();){var o=r.node;if(o.length){var a,c=r.x0,l=r.y0,d=r.x1,u=r.y1,f=(c+d)/2,p=(l+u)/2;(a=o[0])&&t.push(new cn(a,c,l,f,p)),(a=o[1])&&t.push(new cn(a,f,l,d,p)),(a=o[2])&&t.push(new cn(a,c,p,f,u)),(a=o[3])&&t.push(new cn(a,f,p,d,u))}n.push(r)}for(;r=n.pop();)e(r.node,r.x0,r.y0,r.x1,r.y1);return this}function Xoe(e){return e[0]}function Qoe(e){return arguments.length?(this._x=e,this):this._x}function Zoe(e){return e[1]}function Voe(e){return arguments.length?(this._y=e,this):this._y}function SS(e,t,n){var r=new Gv(t==null?Xoe:t,n==null?Zoe:n,NaN,NaN,NaN,NaN);return e==null?r:r.addAll(e)}function Gv(e,t,n,r,o,a){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=o,this._y1=a,this._root=void 0}function ES(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var dn=SS.prototype=Gv.prototype;dn.copy=function(){var e=new Gv(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,n,r;if(!t)return e;if(!t.length)return e._root=ES(t),e;for(n=[{source:t,target:e._root=new Array(4)}];t=n.pop();)for(var o=0;o<4;++o)(r=t.source[o])&&(r.length?n.push({source:r,target:t.target[o]=new Array(4)}):t.target[o]=ES(r));return e},dn.add=Foe,dn.addAll=$oe,dn.cover=zoe,dn.data=Uoe,dn.extent=joe,dn.find=qoe,dn.remove=Hoe,dn.removeAll=Goe,dn.root=Woe,dn.size=Koe,dn.visit=Yoe,dn.visitAfter=Joe,dn.x=Qoe,dn.y=Voe;function On(e){return function(){return e}}function xa(e){return(e()-.5)*1e-6}function ese(e){return e.index}function xS(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}function tse(e){var t=ese,n=p,r,o=On(30),a,c,l,d,u,f=1;e==null&&(e=[]);function p(_){return 1/Math.min(l[_.source.index],l[_.target.index])}function h(_){for(var C=0,k=e.length;C<f;++C)for(var S=0,E,T,A,O,I,F,R;S<k;++S)E=e[S],T=E.source,A=E.target,O=A.x+A.vx-T.x-T.vx||xa(u),I=A.y+A.vy-T.y-T.vy||xa(u),F=Math.sqrt(O*O+I*I),F=(F-a[S])/F*_*r[S],O*=F,I*=F,A.vx-=O*(R=d[S]),A.vy-=I*R,T.vx+=O*(R=1-R),T.vy+=I*R}function m(){if(c){var _,C=c.length,k=e.length,S=new Map(c.map((T,A)=>[t(T,A,c),T])),E;for(_=0,l=new Array(C);_<k;++_)E=e[_],E.index=_,typeof E.source!="object"&&(E.source=xS(S,E.source)),typeof E.target!="object"&&(E.target=xS(S,E.target)),l[E.source.index]=(l[E.source.index]||0)+1,l[E.target.index]=(l[E.target.index]||0)+1;for(_=0,d=new Array(k);_<k;++_)E=e[_],d[_]=l[E.source.index]/(l[E.source.index]+l[E.target.index]);r=new Array(k),b(),a=new Array(k),w()}}function b(){if(c)for(var _=0,C=e.length;_<C;++_)r[_]=+n(e[_],_,e)}function w(){if(c)for(var _=0,C=e.length;_<C;++_)a[_]=+o(e[_],_,e)}return h.initialize=function(_,C){c=_,u=C,m()},h.links=function(_){return arguments.length?(e=_,m(),h):e},h.id=function(_){return arguments.length?(t=_,h):t},h.iterations=function(_){return arguments.length?(f=+_,h):f},h.strength=function(_){return arguments.length?(n=typeof _=="function"?_:On(+_),b(),h):n},h.distance=function(_){return arguments.length?(o=typeof _=="function"?_:On(+_),w(),h):o},h}var nse={value:()=>{}};function kS(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new qf(n)}function qf(e){this._=e}function rse(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",o=n.indexOf(".");if(o>=0&&(r=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}qf.prototype=kS.prototype={constructor:qf,on:function(e,t){var n=this._,r=rse(e+"",n),o,a=-1,c=r.length;if(arguments.length<2){for(;++a<c;)if((o=(e=r[a]).type)&&(o=ise(n[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<c;)if(o=(e=r[a]).type)n[o]=NS(n[o],e.name,t);else if(t==null)for(o in n)n[o]=NS(n[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new qf(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var n=new Array(o),r=0,o,a;r<o;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],r=0,o=a.length;r<o;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],o=0,a=r.length;o<a;++o)r[o].value.apply(t,n)}};function ise(e,t){for(var n=0,r=e.length,o;n<r;++n)if((o=e[n]).name===t)return o.value}function NS(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=nse,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var ka=0,$c=0,zc=0,TS=1e3,Hf,Uc,Gf=0,gs=0,Wf=0,jc=typeof performance=="object"&&performance.now?performance:Date,AS=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function OS(){return gs||(AS(ose),gs=jc.now()+Wf)}function ose(){gs=0}function Wv(){this._call=this._time=this._next=null}Wv.prototype=IS.prototype={constructor:Wv,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?OS():+n)+(t==null?0:+t),!this._next&&Uc!==this&&(Uc?Uc._next=this:Hf=this,Uc=this),this._call=e,this._time=n,Kv()},stop:function(){this._call&&(this._call=null,this._time=1/0,Kv())}};function IS(e,t,n){var r=new Wv;return r.restart(e,t,n),r}function sse(){OS(),++ka;for(var e=Hf,t;e;)(t=gs-e._time)>=0&&e._call.call(void 0,t),e=e._next;--ka}function RS(){gs=(Gf=jc.now())+Wf,ka=$c=0;try{sse()}finally{ka=0,lse(),gs=0}}function ase(){var e=jc.now(),t=e-Gf;t>TS&&(Wf-=t,Gf=e)}function lse(){for(var e,t=Hf,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Hf=n);Uc=e,Kv(r)}function Kv(e){if(!ka){$c&&($c=clearTimeout($c));var t=e-gs;t>24?(e<1/0&&($c=setTimeout(RS,e-jc.now()-Wf)),zc&&(zc=clearInterval(zc))):(zc||(Gf=jc.now(),zc=setInterval(ase,TS)),ka=1,AS(RS))}}const cse=1664525,dse=1013904223,PS=4294967296;function use(){let e=1;return()=>(e=(cse*e+dse)%PS)/PS}function fse(e){return e.x}function hse(e){return e.y}var pse=10,gse=Math.PI*(3-Math.sqrt(5));function mse(e){var t,n=1,r=.001,o=1-Math.pow(r,1/300),a=0,c=.6,l=new Map,d=IS(p),u=kS("tick","end"),f=use();e==null&&(e=[]);function p(){h(),u.call("tick",t),n<r&&(d.stop(),u.call("end",t))}function h(w){var _,C=e.length,k;w===void 0&&(w=1);for(var S=0;S<w;++S)for(n+=(a-n)*o,l.forEach(function(E){E(n)}),_=0;_<C;++_)k=e[_],k.fx==null?(isNaN(k.vx)&&(k.vx=0),k.x+=k.vx*=c):(k.x=k.fx,k.vx=0),k.fy==null?(isNaN(k.vy)&&(k.vy=0),k.y+=k.vy*=c):(k.y=k.fy,k.vy=0);return t}function m(){for(var w=0,_=e.length,C;w<_;++w){if(C=e[w],C.index=w,C.fx!=null&&(C.x=C.fx),C.fy!=null&&(C.y=C.fy),isNaN(C.x)||isNaN(C.y)){var k=pse*Math.sqrt(.5+w),S=w*gse;C.x=k*Math.cos(S),C.y=k*Math.sin(S)}(isNaN(C.vx)||isNaN(C.vy))&&(C.vx=C.vy=0)}}function b(w){return w.initialize&&w.initialize(e,f),w}return m(),t={tick:h,restart:function(){return d.restart(p),t},stop:function(){return d.stop(),t},nodes:function(w){return arguments.length?(e=w,m(),l.forEach(b),t):e},alpha:function(w){return arguments.length?(n=+w,t):n},alphaMin:function(w){return arguments.length?(r=+w,t):r},alphaDecay:function(w){return arguments.length?(o=+w,t):+o},alphaTarget:function(w){return arguments.length?(a=+w,t):a},velocityDecay:function(w){return arguments.length?(c=1-w,t):1-c},randomSource:function(w){return arguments.length?(f=w,l.forEach(b),t):f},force:function(w,_){return arguments.length>1?(_==null?l.delete(w):l.set(w,b(_)),t):l.get(w)},find:function(w,_,C){var k=0,S=e.length,E,T,A,O,I;for(C==null?C=1/0:C*=C,k=0;k<S;++k)O=e[k],E=w-O.x,T=_-O.y,A=E*E+T*T,A<C&&(I=O,C=A);return I},on:function(w,_){return arguments.length>1?(u.on(w,_),t):u.on(w)}}}function vse(){var e,t,n,r,o=On(-30),a,c=1,l=1/0,d=.81;function u(m){var b,w=e.length,_=SS(e,fse,hse).visitAfter(p);for(r=m,b=0;b<w;++b)t=e[b],_.visit(h)}function f(){if(e){var m,b=e.length,w;for(a=new Array(b),m=0;m<b;++m)w=e[m],a[w.index]=+o(w,m,e)}}function p(m){var b=0,w,_,C=0,k,S,E;if(m.length){for(k=S=E=0;E<4;++E)(w=m[E])&&(_=Math.abs(w.value))&&(b+=w.value,C+=_,k+=_*w.x,S+=_*w.y);m.x=k/C,m.y=S/C}else{w=m,w.x=w.data.x,w.y=w.data.y;do b+=a[w.data.index];while(w=w.next)}m.value=b}function h(m,b,w,_){if(!m.value)return!0;var C=m.x-t.x,k=m.y-t.y,S=_-b,E=C*C+k*k;if(S*S/d<E)return E<l&&(C===0&&(C=xa(n),E+=C*C),k===0&&(k=xa(n),E+=k*k),E<c&&(E=Math.sqrt(c*E)),t.vx+=C*m.value*r/E,t.vy+=k*m.value*r/E),!0;if(m.length||E>=l)return;(m.data!==t||m.next)&&(C===0&&(C=xa(n),E+=C*C),k===0&&(k=xa(n),E+=k*k),E<c&&(E=Math.sqrt(c*E)));do m.data!==t&&(S=a[m.data.index]*r/E,t.vx+=C*S,t.vy+=k*S);while(m=m.next)}return u.initialize=function(m,b){e=m,n=b,f()},u.strength=function(m){return arguments.length?(o=typeof m=="function"?m:On(+m),f(),u):o},u.distanceMin=function(m){return arguments.length?(c=m*m,u):Math.sqrt(c)},u.distanceMax=function(m){return arguments.length?(l=m*m,u):Math.sqrt(l)},u.theta=function(m){return arguments.length?(d=m*m,u):Math.sqrt(d)},u}function yse(e){var t=On(.1),n,r,o;typeof e!="function"&&(e=On(e==null?0:+e));function a(l){n.length!==o.length&&c();for(var d=0,u=n.length,f;d<u;++d)f=n[d],f.vx,f.vx+=(o[d]-f.x)*r[d]*l}function c(){if(n){var l,d=n.length;for(r=new Array(d),o=new Array(d),l=0;l<d;++l)r[l]=isNaN(o[l]=+e(n[l],l,n))?0:+t(n[l],l,n)}}return a.initialize=function(l){n=l,c()},a.strength=function(l){return arguments.length?(t=typeof l=="function"?l:On(+l),c(),a):t},a.x=function(l){return arguments.length?(e=typeof l=="function"?l:On(+l),c(),a):e},a}function bse(e){var t=On(.1),n,r,o;typeof e!="function"&&(e=On(e==null?0:+e));function a(l){n.length!==o.length&&c();for(var d=0,u=n.length,f;d<u;++d)f=n[d],f.vy+=(o[d]-f.y)*r[d]*l}function c(){if(n){var l,d=n.length;for(r=new Array(d),o=new Array(d),l=0;l<d;++l)r[l]=isNaN(o[l]=+e(n[l],l,n))?0:+t(n[l],l,n)}}return a.initialize=function(l){n=l,c()},a.strength=function(l){return arguments.length?(t=typeof l=="function"?l:On(+l),c(),a):t},a.y=function(l){return arguments.length?(e=typeof l=="function"?l:On(+l),c(),a):e},a}function wse(e,t,n){return t=Jf(t),$S(e,LS()?Reflect.construct(t,n||[],Jf(e).constructor):t.apply(e,n))}function LS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(LS=function(){return!!e})()}function BS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function qc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?BS(Object(n),!0).forEach(function(r){Ai(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cr(){Cr=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(U,j,H){U[j]=H.value},a=typeof Symbol=="function"?Symbol:{},c=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",d=a.toStringTag||"@@toStringTag";function u(U,j,H){return Object.defineProperty(U,j,{value:H,enumerable:!0,configurable:!0,writable:!0}),U[j]}try{u({},"")}catch(U){u=function(j,H,M){return j[H]=M}}function f(U,j,H,M){var D=j&&j.prototype instanceof C?j:C,te=Object.create(D.prototype),V=new Y(M||[]);return o(te,"_invoke",{value:R(U,H,V)}),te}function p(U,j,H){try{return{type:"normal",arg:U.call(j,H)}}catch(M){return{type:"throw",arg:M}}}t.wrap=f;var h="suspendedStart",m="suspendedYield",b="executing",w="completed",_={};function C(){}function k(){}function S(){}var E={};u(E,c,function(){return this});var T=Object.getPrototypeOf,A=T&&T(T(Z([])));A&&A!==n&&r.call(A,c)&&(E=A);var O=S.prototype=C.prototype=Object.create(E);function I(U){["next","throw","return"].forEach(function(j){u(U,j,function(H){return this._invoke(j,H)})})}function F(U,j){function H(D,te,V,ee){var X=p(U[D],U,te);if(X.type!=="throw"){var oe=X.arg,se=oe.value;return se&&typeof se=="object"&&r.call(se,"__await")?j.resolve(se.__await).then(function(B){H("next",B,V,ee)},function(B){H("throw",B,V,ee)}):j.resolve(se).then(function(B){oe.value=B,V(oe)},function(B){return H("throw",B,V,ee)})}ee(X.arg)}var M;o(this,"_invoke",{value:function(D,te){function V(){return new j(function(ee,X){H(D,te,ee,X)})}return M=M?M.then(V,V):V()}})}function R(U,j,H){var M=h;return function(D,te){if(M===b)throw new Error("Generator is already running");if(M===w){if(D==="throw")throw te;return{value:e,done:!0}}for(H.method=D,H.arg=te;;){var V=H.delegate;if(V){var ee=q(V,H);if(ee){if(ee===_)continue;return ee}}if(H.method==="next")H.sent=H._sent=H.arg;else if(H.method==="throw"){if(M===h)throw M=w,H.arg;H.dispatchException(H.arg)}else H.method==="return"&&H.abrupt("return",H.arg);M=b;var X=p(U,j,H);if(X.type==="normal"){if(M=H.done?w:m,X.arg===_)continue;return{value:X.arg,done:H.done}}X.type==="throw"&&(M=w,H.method="throw",H.arg=X.arg)}}}function q(U,j){var H=j.method,M=U.iterator[H];if(M===e)return j.delegate=null,H==="throw"&&U.iterator.return&&(j.method="return",j.arg=e,q(U,j),j.method==="throw")||H!=="return"&&(j.method="throw",j.arg=new TypeError("The iterator does not provide a '"+H+"' method")),_;var D=p(M,U.iterator,j.arg);if(D.type==="throw")return j.method="throw",j.arg=D.arg,j.delegate=null,_;var te=D.arg;return te?te.done?(j[U.resultName]=te.value,j.next=U.nextLoc,j.method!=="return"&&(j.method="next",j.arg=e),j.delegate=null,_):te:(j.method="throw",j.arg=new TypeError("iterator result is not an object"),j.delegate=null,_)}function z(U){var j={tryLoc:U[0]};1 in U&&(j.catchLoc=U[1]),2 in U&&(j.finallyLoc=U[2],j.afterLoc=U[3]),this.tryEntries.push(j)}function G(U){var j=U.completion||{};j.type="normal",delete j.arg,U.completion=j}function Y(U){this.tryEntries=[{tryLoc:"root"}],U.forEach(z,this),this.reset(!0)}function Z(U){if(U||U===""){var j=U[c];if(j)return j.call(U);if(typeof U.next=="function")return U;if(!isNaN(U.length)){var H=-1,M=function D(){for(;++H<U.length;)if(r.call(U,H))return D.value=U[H],D.done=!1,D;return D.value=e,D.done=!0,D};return M.next=M}}throw new TypeError(typeof U+" is not iterable")}return k.prototype=S,o(O,"constructor",{value:S,configurable:!0}),o(S,"constructor",{value:k,configurable:!0}),k.displayName=u(S,d,"GeneratorFunction"),t.isGeneratorFunction=function(U){var j=typeof U=="function"&&U.constructor;return!!j&&(j===k||(j.displayName||j.name)==="GeneratorFunction")},t.mark=function(U){return Object.setPrototypeOf?Object.setPrototypeOf(U,S):(U.__proto__=S,u(U,d,"GeneratorFunction")),U.prototype=Object.create(O),U},t.awrap=function(U){return{__await:U}},I(F.prototype),u(F.prototype,l,function(){return this}),t.AsyncIterator=F,t.async=function(U,j,H,M,D){D===void 0&&(D=Promise);var te=new F(f(U,j,H,M),D);return t.isGeneratorFunction(j)?te:te.next().then(function(V){return V.done?V.value:te.next()})},I(O),u(O,d,"Generator"),u(O,c,function(){return this}),u(O,"toString",function(){return"[object Generator]"}),t.keys=function(U){var j=Object(U),H=[];for(var M in j)H.push(M);return H.reverse(),function D(){for(;H.length;){var te=H.pop();if(te in j)return D.value=te,D.done=!1,D}return D.done=!0,D}},t.values=Z,Y.prototype={constructor:Y,reset:function(U){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(G),!U)for(var j in this)j.charAt(0)==="t"&&r.call(this,j)&&!isNaN(+j.slice(1))&&(this[j]=e)},stop:function(){this.done=!0;var U=this.tryEntries[0].completion;if(U.type==="throw")throw U.arg;return this.rval},dispatchException:function(U){if(this.done)throw U;var j=this;function H(X,oe){return te.type="throw",te.arg=U,j.next=X,oe&&(j.method="next",j.arg=e),!!oe}for(var M=this.tryEntries.length-1;M>=0;--M){var D=this.tryEntries[M],te=D.completion;if(D.tryLoc==="root")return H("end");if(D.tryLoc<=this.prev){var V=r.call(D,"catchLoc"),ee=r.call(D,"finallyLoc");if(V&&ee){if(this.prev<D.catchLoc)return H(D.catchLoc,!0);if(this.prev<D.finallyLoc)return H(D.finallyLoc)}else if(V){if(this.prev<D.catchLoc)return H(D.catchLoc,!0)}else{if(!ee)throw new Error("try statement without catch or finally");if(this.prev<D.finallyLoc)return H(D.finallyLoc)}}}},abrupt:function(U,j){for(var H=this.tryEntries.length-1;H>=0;--H){var M=this.tryEntries[H];if(M.tryLoc<=this.prev&&r.call(M,"finallyLoc")&&this.prev<M.finallyLoc){var D=M;break}}D&&(U==="break"||U==="continue")&&D.tryLoc<=j&&j<=D.finallyLoc&&(D=null);var te=D?D.completion:{};return te.type=U,te.arg=j,D?(this.method="next",this.next=D.finallyLoc,_):this.complete(te)},complete:function(U,j){if(U.type==="throw")throw U.arg;return U.type==="break"||U.type==="continue"?this.next=U.arg:U.type==="return"?(this.rval=this.arg=U.arg,this.method="return",this.next="end"):U.type==="normal"&&j&&(this.next=j),_},finish:function(U){for(var j=this.tryEntries.length-1;j>=0;--j){var H=this.tryEntries[j];if(H.finallyLoc===U)return this.complete(H.completion,H.afterLoc),G(H),_}},catch:function(U){for(var j=this.tryEntries.length-1;j>=0;--j){var H=this.tryEntries[j];if(H.tryLoc===U){var M=H.completion;if(M.type==="throw"){var D=M.arg;G(H)}return D}}throw new Error("illegal catch attempt")},delegateYield:function(U,j,H){return this.delegate={iterator:Z(U),resultName:j,nextLoc:H},this.method==="next"&&(this.arg=e),_}},t}function DS(e){var t=function(n,r){if(typeof n!="object"||!n)return n;var o=n[Symbol.toPrimitive];if(o!==void 0){var a=o.call(n,r||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(n)}(e,"string");return typeof t=="symbol"?t:String(t)}function MS(e,t,n,r,o,a,c){try{var l=e[a](c),d=l.value}catch(u){return void n(u)}l.done?t(d):Promise.resolve(d).then(r,o)}function Hc(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function c(d){MS(a,r,o,c,l,"next",d)}function l(d){MS(a,r,o,c,l,"throw",d)}c(void 0)})}}function Kf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,DS(r.key),r)}}function Yf(e,t,n){return t&&FS(e.prototype,t),n&&FS(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ai(e,t,n){return(t=DS(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jf(e){return Jf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Jf(e)}function Yv(e,t){return Yv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Yv(e,t)}function Gc(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $S(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Gc(e)}function _se(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var o=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(o!=null){var a,c,l,d,u=[],f=!0,p=!1;try{if(l=(o=o.call(n)).next,r===0){if(Object(o)!==o)return;f=!1}else for(;!(f=(a=l.call(o)).done)&&(u.push(a.value),u.length!==r);f=!0);}catch(h){p=!0,c=h}finally{try{if(!f&&o.return!=null&&(d=o.return(),Object(d)!==d))return}finally{if(p)throw c}}return u}}(e,t)||zS(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
136
136
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function zS(e,t){if(e){if(typeof e=="string")return US(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?US(e,t):void 0}}function US(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Jv(e,t){var n=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=zS(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(d){throw d},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
137
137
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,c=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var d=n.next();return c=d.done,d},e:function(d){l=!0,a=d},f:function(){try{c||n.return==null||n.return()}finally{if(l)throw a}}}}function Xf(e,t,n){return qS(e,t),HS(n,"get"),function(r,o){return o.get?o.get.call(r):o.value}(e,n)}function jS(e,t,n,r){return qS(e,t),HS(n,"set"),function(o,a,c){if(a.set)a.set.call(o,c);else{if(!a.writable)throw new TypeError("attempted to set read only private field");a.value=c}}(e,n,r),r}function qS(e,t){if(e!==t)throw new TypeError("Private static access of wrong provenance")}function HS(e,t){if(e===void 0)throw new TypeError("attempted to "+t+" private static field before its declaration")}var Qf=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Cse(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Wc=function(e){return e&&e.Math===Math&&e},Ge=Wc(typeof globalThis=="object"&&globalThis)||Wc(typeof window=="object"&&window)||Wc(typeof self=="object"&&self)||Wc(typeof Qf=="object"&&Qf)||Wc(typeof Qf=="object"&&Qf)||function(){return this}()||Function("return this")(),GS={exports:{}},WS=Ge,Sse=Object.defineProperty,Xv=function(e,t){try{Sse(WS,e,{value:t,configurable:!0,writable:!0})}catch(n){WS[e]=t}return t},Ese=Xv,KS="__core-js_shared__",Qv=Ge[KS]||Ese(KS,{}),YS=Qv;(GS.exports=function(e,t){return YS[e]||(YS[e]=t!==void 0?t:{})})("versions",[]).push({version:"3.35.0",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.35.0/LICENSE",source:"https://github.com/zloirock/core-js"});var yo,Zf,Zv=GS.exports,Fe=function(e){try{return!!e()}catch(t){return!0}},Vf=!Fe(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),JS=Vf,XS=Function.prototype,Vv=XS.call,xse=JS&&XS.bind.bind(Vv,Vv),Ke=JS?xse:function(e){return function(){return Vv.apply(e,arguments)}},ms=function(e){return e==null},kse=ms,Nse=TypeError,bo=function(e){if(kse(e))throw new Nse("Can't call method on "+e);return e},Tse=bo,Ase=Object,Sr=function(e){return Ase(Tse(e))},Ose=Sr,Ise=Ke({}.hasOwnProperty),Yt=Object.hasOwn||function(e,t){return Ise(Ose(e),t)},Rse=Ke,Pse=0,Lse=Math.random(),Bse=Rse(1 .toString),eh=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Bse(++Pse+Lse,36)},vs=typeof navigator!="undefined"&&String(navigator.userAgent)||"",QS=Ge,e1=vs,ZS=QS.process,VS=QS.Deno,e9=ZS&&ZS.versions||VS&&VS.version,t9=e9&&e9.v8;t9&&(Zf=(yo=t9.split("."))[0]>0&&yo[0]<4?1:+(yo[0]+yo[1])),!Zf&&e1&&(!(yo=e1.match(/Edge\/(\d+)/))||yo[1]>=74)&&(yo=e1.match(/Chrome\/(\d+)/))&&(Zf=+yo[1]);var Kc=Zf,n9=Kc,Dse=Fe,Mse=Ge.String,r9=!!Object.getOwnPropertySymbols&&!Dse(function(){var e=Symbol("symbol detection");return!Mse(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n9&&n9<41}),i9=r9&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Fse=Zv,o9=Yt,$se=eh,zse=r9,Use=i9,Na=Ge.Symbol,t1=Fse("wks"),jse=Use?Na.for||Na:Na&&Na.withoutSetter||$se,dt=function(e){return o9(t1,e)||(t1[e]=zse&&o9(Na,e)?Na[e]:jse("Symbol."+e)),t1[e]},s9={};s9[dt("toStringTag")]="z";var n1=String(s9)==="[object z]",r1=typeof document=="object"&&document.all,ht=r1===void 0&&r1!==void 0?function(e){return typeof e=="function"||e===r1}:function(e){return typeof e=="function"},In={},wt=!Fe(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),qse=ht,At=function(e){return typeof e=="object"?e!==null:qse(e)},a9=At,i1=Ge.document,Hse=a9(i1)&&a9(i1.createElement),th=function(e){return Hse?i1.createElement(e):{}},Gse=th,l9=!wt&&!Fe(function(){return Object.defineProperty(Gse("div"),"a",{get:function(){return 7}}).a!==7}),c9=wt&&Fe(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Wse=At,Kse=String,Yse=TypeError,tn=function(e){if(Wse(e))return e;throw new Yse(Kse(e)+" is not an object")},Jse=Vf,nh=Function.prototype.call,Ot=Jse?nh.bind(nh):function(){return nh.apply(nh,arguments)},o1=Ge,Xse=ht,ys=function(e,t){return arguments.length<2?(n=o1[e],Xse(n)?n:void 0):o1[e]&&o1[e][t];var n},bs=Ke({}.isPrototypeOf),Qse=ys,Zse=ht,Vse=bs,eae=Object,rh=i9?function(e){return typeof e=="symbol"}:function(e){var t=Qse("Symbol");return Zse(t)&&Vse(t.prototype,eae(e))},tae=String,Ta=function(e){try{return tae(e)}catch(t){return"Object"}},nae=ht,rae=Ta,iae=TypeError,Kr=function(e){if(nae(e))return e;throw new iae(rae(e)+" is not a function")},oae=Kr,sae=ms,ih=function(e,t){var n=e[t];return sae(n)?void 0:oae(n)},s1=Ot,a1=ht,l1=At,aae=TypeError,lae=Ot,d9=At,u9=rh,cae=ih,dae=function(e,t){var n,r;if(t==="string"&&a1(n=e.toString)&&!l1(r=s1(n,e))||a1(n=e.valueOf)&&!l1(r=s1(n,e))||t!=="string"&&a1(n=e.toString)&&!l1(r=s1(n,e)))return r;throw new aae("Can't convert object to primitive value")},uae=TypeError,fae=dt("toPrimitive"),c1=function(e,t){if(!d9(e)||u9(e))return e;var n,r=cae(e,fae);if(r){if(t===void 0&&(t="default"),n=lae(r,e,t),!d9(n)||u9(n))return n;throw new uae("Can't convert object to primitive value")}return t===void 0&&(t="number"),dae(e,t)},hae=c1,pae=rh,oh=function(e){var t=hae(e,"string");return pae(t)?t:t+""},gae=wt,mae=l9,vae=c9,sh=tn,f9=oh,yae=TypeError,d1=Object.defineProperty,bae=Object.getOwnPropertyDescriptor,u1="enumerable",f1="configurable",h1="writable";In.f=gae?vae?function(e,t,n){if(sh(e),t=f9(t),sh(n),typeof e=="function"&&t==="prototype"&&"value"in n&&h1 in n&&!n[h1]){var r=bae(e,t);r&&r[h1]&&(e[t]=n.value,n={configurable:f1 in n?n[f1]:r[f1],enumerable:u1 in n?n[u1]:r[u1],writable:!1})}return d1(e,t,n)}:d1:function(e,t,n){if(sh(e),t=f9(t),sh(n),mae)try{return d1(e,t,n)}catch(r){}if("get"in n||"set"in n)throw new yae("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var h9={exports:{}},p1=wt,wae=Yt,p9=Function.prototype,_ae=p1&&Object.getOwnPropertyDescriptor,g1=wae(p9,"name"),ws={EXISTS:g1,PROPER:g1&&function(){}.name==="something",CONFIGURABLE:g1&&(!p1||p1&&_ae(p9,"name").configurable)},Cae=ht,m1=Qv,Sae=Ke(Function.toString);Cae(m1.inspectSource)||(m1.inspectSource=function(e){return Sae(e)});var ah,Yc,lh,v1=m1.inspectSource,Eae=ht,g9=Ge.WeakMap,xae=Eae(g9)&&/native code/.test(String(g9)),Aa=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},kae=In,Nae=Aa,Oi=wt?function(e,t,n){return kae.f(e,t,Nae(1,n))}:function(e,t,n){return e[t]=n,e},Tae=eh,m9=Zv("keys"),y1=function(e){return m9[e]||(m9[e]=Tae(e))},ch={},Aae=xae,v9=Ge,Oae=At,Iae=Oi,b1=Yt,w1=Qv,Rae=y1,Pae=ch,y9="Object already initialized",_1=v9.TypeError,Lae=v9.WeakMap;if(Aae||w1.state){var Yr=w1.state||(w1.state=new Lae);Yr.get=Yr.get,Yr.has=Yr.has,Yr.set=Yr.set,ah=function(e,t){if(Yr.has(e))throw new _1(y9);return t.facade=e,Yr.set(e,t),t},Yc=function(e){return Yr.get(e)||{}},lh=function(e){return Yr.has(e)}}else{var Oa=Rae("state");Pae[Oa]=!0,ah=function(e,t){if(b1(e,Oa))throw new _1(y9);return t.facade=e,Iae(e,Oa,t),t},Yc=function(e){return b1(e,Oa)?e[Oa]:{}},lh=function(e){return b1(e,Oa)}}var nn={set:ah,get:Yc,has:lh,enforce:function(e){return lh(e)?Yc(e):ah(e,{})},getterFor:function(e){return function(t){var n;if(!Oae(t)||(n=Yc(t)).type!==e)throw new _1("Incompatible receiver, "+e+" required");return n}}},C1=Ke,Bae=Fe,Dae=ht,dh=Yt,S1=wt,Mae=ws.CONFIGURABLE,Fae=v1,$ae=nn.enforce,zae=nn.get,b9=String,uh=Object.defineProperty,Uae=C1("".slice),jae=C1("".replace),qae=C1([].join),Hae=S1&&!Bae(function(){return uh(function(){},"length",{value:8}).length!==8}),Gae=String(String).split("String"),Wae=h9.exports=function(e,t,n){Uae(b9(t),0,7)==="Symbol("&&(t="["+jae(b9(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!dh(e,"name")||Mae&&e.name!==t)&&(S1?uh(e,"name",{value:t,configurable:!0}):e.name=t),Hae&&n&&dh(n,"arity")&&e.length!==n.arity&&uh(e,"length",{value:n.arity});try{n&&dh(n,"constructor")&&n.constructor?S1&&uh(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(o){}var r=$ae(e);return dh(r,"source")||(r.source=qae(Gae,typeof t=="string"?t:"")),e};Function.prototype.toString=Wae(function(){return Dae(this)&&zae(this).source||Fae(this)},"toString");var w9=h9.exports,Kae=ht,Yae=In,Jae=w9,Xae=Xv,Rn=function(e,t,n,r){r||(r={});var o=r.enumerable,a=r.name!==void 0?r.name:t;if(Kae(n)&&Jae(n,a,r),r.global)o?e[t]=n:Xae(t,n);else{try{r.unsafe?e[t]&&(o=!0):delete e[t]}catch(c){}o?e[t]=n:Yae.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},_9=Ke,Qae=_9({}.toString),Zae=_9("".slice),Ii=function(e){return Zae(Qae(e),8,-1)},Vae=n1,ele=ht,fh=Ii,tle=dt("toStringTag"),nle=Object,rle=fh(function(){return arguments}())==="Arguments",Ri=Vae?fh:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=function(o,a){try{return o[a]}catch(c){}}(t=nle(e),tle))=="string"?n:rle?fh(t):(r=fh(t))==="Object"&&ele(t.callee)?"Arguments":r},ile=Ri,ole=n1?{}.toString:function(){return"[object "+ile(this)+"]"};n1||Rn(Object.prototype,"toString",ole,{unsafe:!0});var C9={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},E1=th("span").classList,S9=E1&&E1.constructor&&E1.constructor.prototype,E9=S9===Object.prototype?void 0:S9,sle=Ii,ale=Ke,Jc=function(e){if(sle(e)==="Function")return ale(e)},lle=Kr,cle=Vf,dle=Jc(Jc.bind),Pi=function(e,t){return lle(e),t===void 0?e:cle?dle(e,t):function(){return e.apply(t,arguments)}},ule=Fe,fle=Ii,x1=Object,hle=Ke("".split),hh=ule(function(){return!x1("z").propertyIsEnumerable(0)})?function(e){return fle(e)==="String"?hle(e,""):x1(e)}:x1,ple=Math.ceil,gle=Math.floor,mle=Math.trunc||function(e){var t=+e;return(t>0?gle:ple)(t)},vle=mle,Li=function(e){var t=+e;return t!=t||t===0?0:vle(t)},yle=Li,ble=Math.min,_s=function(e){return e>0?ble(yle(e),9007199254740991):0},wle=_s,Pn=function(e){return wle(e.length)},_le=Ii,k1=Array.isArray||function(e){return _le(e)==="Array"},Cle=Ke,Sle=Fe,x9=ht,Ele=Ri,xle=v1,k9=function(){},kle=[],N9=ys("Reflect","construct"),N1=/^\s*(?:class|function)\b/,Nle=Cle(N1.exec),Tle=!N1.test(k9),Xc=function(e){if(!x9(e))return!1;try{return N9(k9,kle,e),!0}catch(t){return!1}},T9=function(e){if(!x9(e))return!1;switch(Ele(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Tle||!!Nle(N1,xle(e))}catch(t){return!0}};T9.sham=!0;var ph=!N9||Sle(function(){var e;return Xc(Xc.call)||!Xc(Object)||!Xc(function(){e=!0})||e})?T9:Xc,A9=k1,Ale=ph,Ole=At,Ile=dt("species"),O9=Array,Rle=function(e){var t;return A9(e)&&(t=e.constructor,(Ale(t)&&(t===O9||A9(t.prototype))||Ole(t)&&(t=t[Ile])===null)&&(t=void 0)),t===void 0?O9:t},I9=function(e,t){return new(Rle(e))(t===0?0:t)},Ple=Pi,Lle=hh,Ble=Sr,Dle=Pn,Mle=I9,R9=Ke([].push),wo=function(e){var t=e===1,n=e===2,r=e===3,o=e===4,a=e===6,c=e===7,l=e===5||a;return function(d,u,f,p){for(var h,m,b=Ble(d),w=Lle(b),_=Dle(w),C=Ple(u,f),k=0,S=p||Mle,E=t?S(d,_):n||c?S(d,0):void 0;_>k;k++)if((l||k in w)&&(m=C(h=w[k],k,b),e))if(t)E[k]=m;else if(m)switch(e){case 3:return!0;case 5:return h;case 6:return k;case 2:R9(E,h)}else switch(e){case 4:return!1;case 7:R9(E,h)}return a?-1:r||o?o:E}},Er={forEach:wo(0),map:wo(1),filter:wo(2),some:wo(3),every:wo(4),find:wo(5),findIndex:wo(6),filterReject:wo(7)},Fle=Fe,P9=function(e,t){var n=[][e];return!!n&&Fle(function(){n.call(null,t||function(){return 1},1)})},$le=Er.forEach,L9=Ge,B9=C9,zle=E9,T1=P9("forEach")?[].forEach:function(e){return $le(this,e,arguments.length>1?arguments[1]:void 0)},Ule=Oi,D9=function(e){if(e&&e.forEach!==T1)try{Ule(e,"forEach",T1)}catch(t){e.forEach=T1}};for(var A1 in B9)B9[A1]&&D9(L9[A1]&&L9[A1].prototype);D9(zle);var jle=hh,qle=bo,Bi=function(e){return jle(qle(e))},M9={},Hle=Li,Gle=Math.max,Wle=Math.min,Qc=function(e,t){var n=Hle(e);return n<0?Gle(n+t,0):Wle(n,t)},Kle=Bi,Yle=Qc,Jle=Pn,F9=function(e){return function(t,n,r){var o,a=Kle(t),c=Jle(a),l=Yle(r,c);if(e&&n!=n){for(;c>l;)if((o=a[l++])!=o)return!0}else for(;c>l;l++)if((e||l in a)&&a[l]===n)return e||l||0;return!e&&-1}},gh={includes:F9(!0),indexOf:F9(!1)},O1=Yt,Xle=Bi,Qle=gh.indexOf,Zle=ch,$9=Ke([].push),z9=function(e,t){var n,r=Xle(e),o=0,a=[];for(n in r)!O1(Zle,n)&&O1(r,n)&&$9(a,n);for(;t.length>o;)O1(r,n=t[o++])&&(~Qle(a,n)||$9(a,n));return a},I1=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Vle=z9,ece=I1,R1=Object.keys||function(e){return Vle(e,ece)},tce=wt,nce=c9,rce=In,ice=tn,oce=Bi,sce=R1;M9.f=tce&&!nce?Object.defineProperties:function(e,t){ice(e);for(var n,r=oce(t),o=sce(t),a=o.length,c=0;a>c;)rce.f(e,n=o[c++],r[n]);return e};var mh,U9=ys("document","documentElement"),ace=tn,lce=M9,j9=I1,cce=ch,dce=U9,uce=th,P1="prototype",L1="script",q9=y1("IE_PROTO"),B1=function(){},H9=function(e){return"<"+L1+">"+e+"</"+L1+">"},G9=function(e){e.write(H9("")),e.close();var t=e.parentWindow.Object;return e=null,t},vh=function(){try{mh=new ActiveXObject("htmlfile")}catch(o){}var e,t,n;vh=typeof document!="undefined"?document.domain&&mh?G9(mh):(t=uce("iframe"),n="java"+L1+":",t.style.display="none",dce.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(H9("document.F=Object")),e.close(),e.F):G9(mh);for(var r=j9.length;r--;)delete vh[P1][j9[r]];return vh()};cce[q9]=!0;var Ia=Object.create||function(e,t){var n;return e!==null?(B1[P1]=ace(e),n=new B1,B1[P1]=null,n[q9]=e):n=vh(),t===void 0?n:lce.f(n,t)},fce=dt,hce=Ia,pce=In.f,D1=fce("unscopables"),M1=Array.prototype;M1[D1]===void 0&&pce(M1,D1,{configurable:!0,value:hce(null)});var W9=function(e){M1[D1][e]=!0},Zc={},Ra={},yh={},K9={}.propertyIsEnumerable,Y9=Object.getOwnPropertyDescriptor,gce=Y9&&!K9.call({1:2},1);yh.f=gce?function(e){var t=Y9(this,e);return!!t&&t.enumerable}:K9;var mce=wt,vce=Ot,yce=yh,bce=Aa,wce=Bi,_ce=oh,Cce=Yt,Sce=l9,J9=Object.getOwnPropertyDescriptor;Ra.f=mce?J9:function(e,t){if(e=wce(e),t=_ce(t),Sce)try{return J9(e,t)}catch(n){}if(Cce(e,t))return bce(!vce(yce.f,e,t),e[t])};var Pa={},Ece=z9,xce=I1.concat("length","prototype");Pa.f=Object.getOwnPropertyNames||function(e){return Ece(e,xce)};var F1={};F1.f=Object.getOwnPropertySymbols;var Cs,X9,Q9,kce=ys,Nce=Pa,Tce=F1,Ace=tn,Oce=Ke([].concat),Ice=kce("Reflect","ownKeys")||function(e){var t=Nce.f(Ace(e)),n=Tce.f;return n?Oce(t,n(e)):t},Z9=Yt,Rce=Ice,Pce=Ra,Lce=In,V9=function(e,t,n){for(var r=Rce(t),o=Lce.f,a=Pce.f,c=0;c<r.length;c++){var l=r[c];Z9(e,l)||n&&Z9(n,l)||o(e,l,a(t,l))}},Bce=Fe,Dce=ht,Mce=/#|\.prototype\./,Vc=function(e,t){var n=$ce[Fce(e)];return n===Uce||n!==zce&&(Dce(t)?Bce(t):!!t)},Fce=Vc.normalize=function(e){return String(e).replace(Mce,".").toLowerCase()},$ce=Vc.data={},zce=Vc.NATIVE="N",Uce=Vc.POLYFILL="P",bh=Vc,$1=Ge,jce=Ra.f,qce=Oi,Hce=Rn,Gce=Xv,Wce=V9,Kce=bh,pt=function(e,t){var n,r,o,a,c,l=e.target,d=e.global,u=e.stat;if(n=d?$1:u?$1[l]||Gce(l,{}):($1[l]||{}).prototype)for(r in t){if(a=t[r],o=e.dontCallGetSet?(c=jce(n,r))&&c.value:n[r],!Kce(d?r:l+(u?".":"#")+r,e.forced)&&o!==void 0){if(typeof a==typeof o)continue;Wce(a,o)}(e.sham||o&&o.sham)&&qce(a,"sham",!0),Hce(n,r,a,e)}},Yce=!Fe(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Jce=Yt,Xce=ht,Qce=Sr,Zce=Yce,eE=y1("IE_PROTO"),z1=Object,Vce=z1.prototype,ed=Zce?z1.getPrototypeOf:function(e){var t=Qce(e);if(Jce(t,eE))return t[eE];var n=t.constructor;return Xce(n)&&t instanceof n?n.prototype:t instanceof z1?Vce:null},ede=Fe,tde=ht,nde=At,tE=ed,rde=Rn,U1=dt("iterator"),nE=!1;[].keys&&("next"in(Q9=[].keys())?(X9=tE(tE(Q9)))!==Object.prototype&&(Cs=X9):nE=!0);var ide=!nde(Cs)||ede(function(){var e={};return Cs[U1].call(e)!==e});ide&&(Cs={}),tde(Cs[U1])||rde(Cs,U1,function(){return this});var j1={IteratorPrototype:Cs,BUGGY_SAFARI_ITERATORS:nE},ode=In.f,sde=Yt,rE=dt("toStringTag"),_o=function(e,t,n){e&&!n&&(e=e.prototype),e&&!sde(e,rE)&&ode(e,rE,{configurable:!0,value:t})},ade=j1.IteratorPrototype,lde=Ia,cde=Aa,dde=_o,ude=Zc,fde=function(){return this},iE=function(e,t,n,r){var o=t+" Iterator";return e.prototype=lde(ade,{next:cde(+!r,n)}),dde(e,o,!1),ude[o]=fde,e},hde=Ke,pde=Kr,gde=At,mde=function(e){return gde(e)||e===null},vde=String,yde=TypeError,bde=function(e,t,n){try{return hde(pde(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(r){}},wde=tn,_de=function(e){if(mde(e))return e;throw new yde("Can't set "+vde(e)+" as a prototype")},La=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=bde(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(r){}return function(r,o){return wde(r),_de(o),t?e(r,o):r.__proto__=o,r}}():void 0),Cde=pt,Sde=Ot,Ede=ht,xde=iE,oE=ed,sE=La,kde=_o,Nde=Oi,q1=Rn,Tde=Zc,Ade=ws.PROPER,Ode=ws.CONFIGURABLE,aE=j1.IteratorPrototype,wh=j1.BUGGY_SAFARI_ITERATORS,td=dt("iterator"),lE="keys",nd="values",cE="entries",Ide=function(){return this},H1=function(e,t,n,r,o,a,c){xde(n,t,r);var l,d,u,f=function(C){if(C===o&&w)return w;if(!wh&&C&&C in m)return m[C];switch(C){case lE:case nd:case cE:return function(){return new n(this,C)}}return function(){return new n(this)}},p=t+" Iterator",h=!1,m=e.prototype,b=m[td]||m["@@iterator"]||o&&m[o],w=!wh&&b||f(o),_=t==="Array"&&m.entries||b;if(_&&(l=oE(_.call(new e)))!==Object.prototype&&l.next&&(oE(l)!==aE&&(sE?sE(l,aE):Ede(l[td])||q1(l,td,Ide)),kde(l,p,!0)),Ade&&o===nd&&b&&b.name!==nd&&(Ode?Nde(m,"name",nd):(h=!0,w=function(){return Sde(b,this)})),o)if(d={values:f(nd),keys:a?w:f(lE),entries:f(cE)},c)for(u in d)(wh||h||!(u in m))&&q1(m,u,d[u]);else Cde({target:t,proto:!0,forced:wh||h},d);return m[td]!==w&&q1(m,td,w,{name:o}),Tde[t]=w,d},_h=function(e,t){return{value:e,done:t}},Rde=Bi,G1=W9,dE=Zc,uE=nn,Pde=In.f,Lde=H1,Ch=_h,Bde=wt,fE="Array Iterator",Dde=uE.set,Mde=uE.getterFor(fE),hE=Lde(Array,"Array",function(e,t){Dde(this,{type:fE,target:Rde(e),index:0,kind:t})},function(){var e=Mde(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=void 0,Ch(void 0,!0);switch(e.kind){case"keys":return Ch(n,!1);case"values":return Ch(t[n],!1)}return Ch([n,t[n]],!1)},"values"),pE=dE.Arguments=dE.Array;if(G1("keys"),G1("values"),G1("entries"),Bde&&pE.name!=="values")try{Pde(pE,"name",{value:"values"})}catch(e){}var Fde=Ri,$de=String,xr=function(e){if(Fde(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return $de(e)},W1=Ke,zde=Li,Ude=xr,jde=bo,qde=W1("".charAt),gE=W1("".charCodeAt),Hde=W1("".slice),mE=function(e){return function(t,n){var r,o,a=Ude(jde(t)),c=zde(n),l=a.length;return c<0||c>=l?e?"":void 0:(r=gE(a,c))<55296||r>56319||c+1===l||(o=gE(a,c+1))<56320||o>57343?e?qde(a,c):r:e?Hde(a,c,c+2):o-56320+(r-55296<<10)+65536}},K1={codeAt:mE(!1),charAt:mE(!0)},Gde=K1.charAt,Wde=xr,vE=nn,Kde=H1,yE=_h,bE="String Iterator",Yde=vE.set,Jde=vE.getterFor(bE);Kde(String,"String",function(e){Yde(this,{type:bE,string:Wde(e),index:0})},function(){var e,t=Jde(this),n=t.string,r=t.index;return r>=n.length?yE(void 0,!0):(e=Gde(n,r),t.index+=e.length,yE(e,!1))});var wE=Ge,_E=C9,Xde=E9,rd=hE,CE=Oi,Qde=_o,Y1=dt("iterator"),J1=rd.values,SE=function(e,t){if(e){if(e[Y1]!==J1)try{CE(e,Y1,J1)}catch(r){e[Y1]=J1}if(Qde(e,t,!0),_E[t]){for(var n in rd)if(e[n]!==rd[n])try{CE(e,n,rd[n])}catch(r){e[n]=rd[n]}}}};for(var X1 in _E)SE(wE[X1]&&wE[X1].prototype,X1);SE(Xde,"DOMTokenList");var Zde=Fe,Vde=wt,eue=dt("iterator"),EE=!Zde(function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n=new URLSearchParams("a=1&a=2&b=3"),r="";return e.pathname="c%20d",t.forEach(function(o,a){t.delete("b"),r+=a+o}),n.delete("a",2),n.delete("b",void 0),!t.size&&!Vde||!t.sort||e.href!=="http://a/c%20d?a=1&c=3"||t.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!t[eue]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("http://тест").host!=="xn--e1aybc"||new URL("http://a#б").hash!=="#%D0%B1"||r!=="a1c3"||new URL("http://x",void 0).host!=="x"}),xE=w9,tue=In,Co=function(e,t,n){return n.get&&xE(n.get,t,{getter:!0}),n.set&&xE(n.set,t,{setter:!0}),tue.f(e,t,n)},nue=bs,rue=TypeError,Ss=function(e,t){if(nue(t,e))return e;throw new rue("Incorrect invocation")},kE=wt,iue=Ke,oue=Ot,sue=Fe,Q1=R1,aue=F1,lue=yh,cue=Sr,due=hh,Ba=Object.assign,NE=Object.defineProperty,uue=iue([].concat),fue=!Ba||sue(function(){if(kE&&Ba({b:1},Ba(NE({},"a",{enumerable:!0,get:function(){NE(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},n=Symbol("assign detection"),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(o){t[o]=o}),Ba({},e)[n]!==7||Q1(Ba({},t)).join("")!==r})?function(e,t){for(var n=cue(e),r=arguments.length,o=1,a=aue.f,c=lue.f;r>o;)for(var l,d=due(arguments[o++]),u=a?uue(Q1(d),a(d)):Q1(d),f=u.length,p=0;f>p;)l=u[p++],kE&&!oue(c,d,l)||(n[l]=d[l]);return n}:Ba,hue=Ot,TE=tn,pue=ih,AE=function(e,t,n){var r,o;TE(e);try{if(!(r=pue(e,"return"))){if(t==="throw")throw n;return n}r=hue(r,e)}catch(a){o=!0,r=a}if(t==="throw")throw n;if(o)throw r;return TE(r),n},gue=tn,mue=AE,vue=Zc,yue=dt("iterator"),bue=Array.prototype,Z1=function(e){return e!==void 0&&(vue.Array===e||bue[yue]===e)},wue=oh,_ue=In,Cue=Aa,V1=function(e,t,n){var r=wue(t);r in e?_ue.f(e,r,Cue(0,n)):e[r]=n},Sue=Ri,OE=ih,Eue=ms,xue=Zc,kue=dt("iterator"),id=function(e){if(!Eue(e))return OE(e,kue)||OE(e,"@@iterator")||xue[Sue(e)]},Nue=Ot,Tue=Kr,Aue=tn,Oue=Ta,Iue=id,Rue=TypeError,Sh=function(e,t){var n=arguments.length<2?Iue(e):t;if(Tue(n))return Aue(Nue(n,e));throw new Rue(Oue(e)+" is not iterable")},Pue=Pi,Lue=Ot,Bue=Sr,Due=function(e,t,n,r){try{return r?t(gue(n)[0],n[1]):t(n)}catch(o){mue(e,"throw",o)}},Mue=Z1,Fue=ph,$ue=Pn,IE=V1,zue=Sh,Uue=id,RE=Array,So=Ke([].slice),Es=Ke,ey=2147483647,jue=/[^\0-\u007E]/,PE=/[.\u3002\uFF0E\uFF61]/g,LE="Overflow: input needs wider integers to process",BE=RangeError,que=Es(PE.exec),Da=Math.floor,ty=String.fromCharCode,DE=Es("".charCodeAt),ME=Es([].join),Eo=Es([].push),Hue=Es("".replace),Gue=Es("".split),Wue=Es("".toLowerCase),FE=function(e){return e+22+75*(e<26)},Kue=function(e,t,n){var r=0;for(e=n?Da(e/700):e>>1,e+=Da(e/t);e>455;)e=Da(e/35),r+=36;return Da(r+36*e/(e+38))},Yue=function(e){var t=[];e=function(C){for(var k=[],S=0,E=C.length;S<E;){var T=DE(C,S++);if(T>=55296&&T<=56319&&S<E){var A=DE(C,S++);(64512&A)==56320?Eo(k,((1023&T)<<10)+(1023&A)+65536):(Eo(k,T),S--)}else Eo(k,T)}return k}(e);var n,r,o=e.length,a=128,c=0,l=72;for(n=0;n<e.length;n++)(r=e[n])<128&&Eo(t,ty(r));var d=t.length,u=d;for(d&&Eo(t,"-");u<o;){var f=ey;for(n=0;n<e.length;n++)(r=e[n])>=a&&r<f&&(f=r);var p=u+1;if(f-a>Da((ey-c)/p))throw new BE(LE);for(c+=(f-a)*p,a=f,n=0;n<e.length;n++){if((r=e[n])<a&&++c>ey)throw new BE(LE);if(r===a){for(var h=c,m=36;;){var b=m<=l?1:m>=l+26?26:m-l;if(h<b)break;var w=h-b,_=36-b;Eo(t,ty(FE(b+w%_))),h=Da(w/_),m+=36}Eo(t,ty(FE(h))),l=Kue(c,p,u===d),c=0,u++}}c++,a++}return ME(t,"")},Jue=TypeError,ny=function(e,t){if(e<t)throw new Jue("Not enough arguments");return e},$E=Ge,Xue=wt,Que=Object.getOwnPropertyDescriptor,zE=function(e){if(!Xue)return $E[e];var t=Que($E,e);return t&&t.value},Zue=Rn,ry=function(e,t,n){for(var r in t)Zue(e,r,t[r],n);return e},UE=So,Vue=Math.floor,iy=function(e,t){var n=e.length;if(n<8)for(var r,o,a=1;a<n;){for(o=a,r=e[a];o&&t(e[o-1],r)>0;)e[o]=e[--o];o!==a++&&(e[o]=r)}else for(var c=Vue(n/2),l=iy(UE(e,0,c),t),d=iy(UE(e,c),t),u=l.length,f=d.length,p=0,h=0;p<u||h<f;)e[p+h]=p<u&&h<f?t(l[p],d[h])<=0?l[p++]:d[h++]:p<u?l[p++]:d[h++];return e},jE=iy,oy=pt,Eh=Ge,sy=zE,xh=Ot,Jr=Ke,od=wt,qE=EE,HE=Rn,efe=Co,tfe=ry,nfe=_o,rfe=iE,ay=nn,GE=Ss,ly=ht,ife=Yt,ofe=Pi,sfe=Ri,afe=tn,WE=At,un=xr,lfe=Ia,KE=Aa,YE=Sh,cfe=id,kh=_h,Ma=ny,dfe=jE,ufe=dt("iterator"),Fa="URLSearchParams",JE=Fa+"Iterator",XE=ay.set,Xn=ay.getterFor(Fa),ffe=ay.getterFor(JE),QE=sy("fetch"),Nh=sy("Request"),sd=sy("Headers"),cy=Nh&&Nh.prototype,ZE=sd&&sd.prototype,hfe=Eh.RegExp,pfe=Eh.TypeError,VE=Eh.decodeURIComponent,gfe=Eh.encodeURIComponent,mfe=Jr("".charAt),ex=Jr([].join),xs=Jr([].push),dy=Jr("".replace),vfe=Jr([].shift),tx=Jr([].splice),nx=Jr("".split),yfe=Jr("".slice),bfe=/\+/g,rx=Array(4),wfe=function(e){return rx[e-1]||(rx[e-1]=hfe("((?:%[\\da-f]{2}){"+e+"})","gi"))},_fe=function(e){try{return VE(e)}catch(t){return e}},ix=function(e){var t=dy(e,bfe," "),n=4;try{return VE(t)}catch(r){for(;n;)t=dy(t,wfe(n--),_fe);return t}},Cfe=/[!'()~]|%20/g,Sfe={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Efe=function(e){return Sfe[e]},ox=function(e){return dy(gfe(e),Cfe,Efe)},uy=rfe(function(e,t){XE(this,{type:JE,target:Xn(e).entries,index:0,kind:t})},Fa,function(){var e=ffe(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=void 0,kh(void 0,!0);var r=t[n];switch(e.kind){case"keys":return kh(r.key,!1);case"values":return kh(r.value,!1)}return kh([r.key,r.value],!1)},!0),sx=function(e){this.entries=[],this.url=null,e!==void 0&&(WE(e)?this.parseObject(e):this.parseQuery(typeof e=="string"?mfe(e,0)==="?"?yfe(e,1):e:un(e)))};sx.prototype={type:Fa,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,o,a,c,l,d=this.entries,u=cfe(e);if(u)for(n=(t=YE(e,u)).next;!(r=xh(n,t)).done;){if(a=(o=YE(afe(r.value))).next,(c=xh(a,o)).done||(l=xh(a,o)).done||!xh(a,o).done)throw new pfe("Expected sequence with length 2");xs(d,{key:un(c.value),value:un(l.value)})}else for(var f in e)ife(e,f)&&xs(d,{key:f,value:un(e[f])})},parseQuery:function(e){if(e)for(var t,n,r=this.entries,o=nx(e,"&"),a=0;a<o.length;)(t=o[a++]).length&&(n=nx(t,"="),xs(r,{key:ix(vfe(n)),value:ix(ex(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],xs(n,ox(e.key)+"="+ox(e.value));return ex(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Th=function(){GE(this,$a);var e=XE(this,new sx(arguments.length>0?arguments[0]:void 0));od||(this.size=e.entries.length)},$a=Th.prototype;if(tfe($a,{append:function(e,t){var n=Xn(this);Ma(arguments.length,2),xs(n.entries,{key:un(e),value:un(t)}),od||this.length++,n.updateURL()},delete:function(e){for(var t=Xn(this),n=Ma(arguments.length,1),r=t.entries,o=un(e),a=n<2?void 0:arguments[1],c=a===void 0?a:un(a),l=0;l<r.length;){var d=r[l];if(d.key!==o||c!==void 0&&d.value!==c)l++;else if(tx(r,l,1),c!==void 0)break}od||(this.size=r.length),t.updateURL()},get:function(e){var t=Xn(this).entries;Ma(arguments.length,1);for(var n=un(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){var t=Xn(this).entries;Ma(arguments.length,1);for(var n=un(e),r=[],o=0;o<t.length;o++)t[o].key===n&&xs(r,t[o].value);return r},has:function(e){for(var t=Xn(this).entries,n=Ma(arguments.length,1),r=un(e),o=n<2?void 0:arguments[1],a=o===void 0?o:un(o),c=0;c<t.length;){var l=t[c++];if(l.key===r&&(a===void 0||l.value===a))return!0}return!1},set:function(e,t){var n=Xn(this);Ma(arguments.length,1);for(var r,o=n.entries,a=!1,c=un(e),l=un(t),d=0;d<o.length;d++)(r=o[d]).key===c&&(a?tx(o,d--,1):(a=!0,r.value=l));a||xs(o,{key:c,value:l}),od||(this.size=o.length),n.updateURL()},sort:function(){var e=Xn(this);dfe(e.entries,function(t,n){return t.key>n.key?1:-1}),e.updateURL()},forEach:function(e){for(var t,n=Xn(this).entries,r=ofe(e,arguments.length>1?arguments[1]:void 0),o=0;o<n.length;)r((t=n[o++]).value,t.key,this)},keys:function(){return new uy(this,"keys")},values:function(){return new uy(this,"values")},entries:function(){return new uy(this,"entries")}},{enumerable:!0}),HE($a,ufe,$a.entries,{name:"entries"}),HE($a,"toString",function(){return Xn(this).serialize()},{enumerable:!0}),od&&efe($a,"size",{get:function(){return Xn(this).entries.length},configurable:!0,enumerable:!0}),nfe(Th,Fa),oy({global:!0,constructor:!0,forced:!qE},{URLSearchParams:Th}),!qE&&ly(sd)){var xfe=Jr(ZE.has),kfe=Jr(ZE.set),ax=function(e){if(WE(e)){var t,n=e.body;if(sfe(n)===Fa)return t=e.headers?new sd(e.headers):new sd,xfe(t,"content-type")||kfe(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),lfe(e,{body:KE(0,un(n)),headers:KE(0,t)})}return e};if(ly(QE)&&oy({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return QE(e,arguments.length>1?ax(arguments[1]):{})}}),ly(Nh)){var fy=function(e){return GE(this,cy),new Nh(e,arguments.length>1?ax(arguments[1]):{})};cy.constructor=fy,fy.prototype=cy,oy({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:fy})}}var Qn,Nfe=pt,hy=wt,Tfe=EE,py=Ge,lx=Pi,Zn=Ke,Ah=Rn,Vn=Co,Afe=Ss,gy=Yt,my=fue,za=function(e){var t=Bue(e),n=Fue(this),r=arguments.length,o=r>1?arguments[1]:void 0,a=o!==void 0;a&&(o=Pue(o,r>2?arguments[2]:void 0));var c,l,d,u,f,p,h=Uue(t),m=0;if(!h||this===RE&&Mue(h))for(c=$ue(t),l=n?new this(c):RE(c);c>m;m++)p=a?o(t[m],m):t[m],IE(l,m,p);else for(f=(u=zue(t,h)).next,l=n?new this:[];!(d=Lue(f,u)).done;m++)p=a?Due(u,o,[d.value,m],!0):d.value,IE(l,m,p);return l.length=m,l},kr=So,Ofe=K1.codeAt,Ife=function(e){var t,n,r=[],o=Gue(Hue(Wue(e),PE,"."),".");for(t=0;t<o.length;t++)n=o[t],Eo(r,que(jue,n)?"xn--"+Yue(n):n);return ME(r,".")},Di=xr,Rfe=_o,Pfe=ny,cx={URLSearchParams:Th,getState:Xn},dx=nn,Lfe=dx.set,Oh=dx.getterFor("URL"),Bfe=cx.URLSearchParams,Dfe=cx.getState,ad=py.URL,vy=py.TypeError,Ih=py.parseInt,Mfe=Math.floor,ux=Math.pow,er=Zn("".charAt),Nr=Zn(/./.exec),ld=Zn([].join),Ffe=Zn(1 .toString),$fe=Zn([].pop),Ua=Zn([].push),yy=Zn("".replace),zfe=Zn([].shift),Ufe=Zn("".split),cd=Zn("".slice),Rh=Zn("".toLowerCase),jfe=Zn([].unshift),by="Invalid scheme",ks="Invalid host",fx="Invalid port",hx=/[a-z]/i,qfe=/[\d+-.a-z]/i,wy=/\d/,Hfe=/^0x/i,Gfe=/^[0-7]+$/,Wfe=/^\d+$/,px=/^[\da-f]+$/i,Kfe=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Yfe=/[\0\t\n\r #/:<>?@[\\\]^|]/,Jfe=/^[\u0000-\u0020]+/,Xfe=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Qfe=/[\t\n\r]/g,dd=function(e){var t,n,r,o;if(typeof e=="number"){for(t=[],n=0;n<4;n++)jfe(t,e%256),e=Mfe(e/256);return ld(t,".")}if(typeof e=="object"){for(t="",r=function(a){for(var c=null,l=1,d=null,u=0,f=0;f<8;f++)a[f]!==0?(u>l&&(c=d,l=u),d=null,u=0):(d===null&&(d=f),++u);return u>l&&(c=d,l=u),c}(e),n=0;n<8;n++)o&&e[n]===0||(o&&(o=!1),r===n?(t+=n?":":"::",o=!0):(t+=Ffe(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},Ph={},gx=my({},Ph,{" ":1,'"':1,"<":1,">":1,"`":1}),mx=my({},gx,{"#":1,"?":1,"{":1,"}":1}),_y=my({},mx,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),xo=function(e,t){var n=Ofe(e,0);return n>32&&n<127&&!gy(t,e)?e:encodeURIComponent(e)},Lh={ftp:21,file:null,http:80,https:443,ws:80,wss:443},ud=function(e,t){var n;return e.length===2&&Nr(hx,er(e,0))&&((n=er(e,1))===":"||!t&&n==="|")},vx=function(e){var t;return e.length>1&&ud(cd(e,0,2))&&(e.length===2||(t=er(e,2))==="/"||t==="\\"||t==="?"||t==="#")},Zfe=function(e){return e==="."||Rh(e)==="%2e"},Cy={},yx={},Sy={},bx={},wx={},Ey={},_x={},Cx={},Bh={},Dh={},xy={},ky={},Ny={},Ty={},Sx={},Ay={},ja={},Xr={},Ex={},Ns={},Mi={},Oy=function(e,t,n){var r,o,a,c=Di(e);if(t){if(o=this.parse(c))throw new vy(o);this.searchParams=null}else{if(n!==void 0&&(r=new Oy(n,!0)),o=this.parse(c,null,r))throw new vy(o);(a=Dfe(new Bfe)).bindURL(this),this.searchParams=a}};Oy.prototype={type:"URL",parse:function(e,t,n){var r,o,a,c,l,d=this,u=t||Cy,f=0,p="",h=!1,m=!1,b=!1;for(e=Di(e),t||(d.scheme="",d.username="",d.password="",d.host=null,d.port=null,d.path=[],d.query=null,d.fragment=null,d.cannotBeABaseURL=!1,e=yy(e,Jfe,""),e=yy(e,Xfe,"$1")),e=yy(e,Qfe,""),r=za(e);f<=r.length;){switch(o=r[f],u){case Cy:if(!o||!Nr(hx,o)){if(t)return by;u=Sy;continue}p+=Rh(o),u=yx;break;case yx:if(o&&(Nr(qfe,o)||o==="+"||o==="-"||o==="."))p+=Rh(o);else{if(o!==":"){if(t)return by;p="",u=Sy,f=0;continue}if(t&&(d.isSpecial()!==gy(Lh,p)||p==="file"&&(d.includesCredentials()||d.port!==null)||d.scheme==="file"&&!d.host))return;if(d.scheme=p,t)return void(d.isSpecial()&&Lh[d.scheme]===d.port&&(d.port=null));p="",d.scheme==="file"?u=Ty:d.isSpecial()&&n&&n.scheme===d.scheme?u=bx:d.isSpecial()?u=Cx:r[f+1]==="/"?(u=wx,f++):(d.cannotBeABaseURL=!0,Ua(d.path,""),u=Ex)}break;case Sy:if(!n||n.cannotBeABaseURL&&o!=="#")return by;if(n.cannotBeABaseURL&&o==="#"){d.scheme=n.scheme,d.path=kr(n.path),d.query=n.query,d.fragment="",d.cannotBeABaseURL=!0,u=Mi;break}u=n.scheme==="file"?Ty:Ey;continue;case bx:if(o!=="/"||r[f+1]!=="/"){u=Ey;continue}u=Bh,f++;break;case wx:if(o==="/"){u=Dh;break}u=Xr;continue;case Ey:if(d.scheme=n.scheme,o===Qn)d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=kr(n.path),d.query=n.query;else if(o==="/"||o==="\\"&&d.isSpecial())u=_x;else if(o==="?")d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=kr(n.path),d.query="",u=Ns;else{if(o!=="#"){d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=kr(n.path),d.path.length--,u=Xr;continue}d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=kr(n.path),d.query=n.query,d.fragment="",u=Mi}break;case _x:if(!d.isSpecial()||o!=="/"&&o!=="\\"){if(o!=="/"){d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,u=Xr;continue}u=Dh}else u=Bh;break;case Cx:if(u=Bh,o!=="/"||er(p,f+1)!=="/")continue;f++;break;case Bh:if(o!=="/"&&o!=="\\"){u=Dh;continue}break;case Dh:if(o==="@"){h&&(p="%40"+p),h=!0,a=za(p);for(var w=0;w<a.length;w++){var _=a[w];if(_!==":"||b){var C=xo(_,_y);b?d.password+=C:d.username+=C}else b=!0}p=""}else if(o===Qn||o==="/"||o==="?"||o==="#"||o==="\\"&&d.isSpecial()){if(h&&p==="")return"Invalid authority";f-=za(p).length+1,p="",u=xy}else p+=o;break;case xy:case ky:if(t&&d.scheme==="file"){u=Ay;continue}if(o!==":"||m){if(o===Qn||o==="/"||o==="?"||o==="#"||o==="\\"&&d.isSpecial()){if(d.isSpecial()&&p==="")return ks;if(t&&p===""&&(d.includesCredentials()||d.port!==null))return;if(c=d.parseHost(p))return c;if(p="",u=ja,t)return;continue}o==="["?m=!0:o==="]"&&(m=!1),p+=o}else{if(p==="")return ks;if(c=d.parseHost(p))return c;if(p="",u=Ny,t===ky)return}break;case Ny:if(!Nr(wy,o)){if(o===Qn||o==="/"||o==="?"||o==="#"||o==="\\"&&d.isSpecial()||t){if(p!==""){var k=Ih(p,10);if(k>65535)return fx;d.port=d.isSpecial()&&k===Lh[d.scheme]?null:k,p=""}if(t)return;u=ja;continue}return fx}p+=o;break;case Ty:if(d.scheme="file",o==="/"||o==="\\")u=Sx;else{if(!n||n.scheme!=="file"){u=Xr;continue}switch(o){case Qn:d.host=n.host,d.path=kr(n.path),d.query=n.query;break;case"?":d.host=n.host,d.path=kr(n.path),d.query="",u=Ns;break;case"#":d.host=n.host,d.path=kr(n.path),d.query=n.query,d.fragment="",u=Mi;break;default:vx(ld(kr(r,f),""))||(d.host=n.host,d.path=kr(n.path),d.shortenPath()),u=Xr;continue}}break;case Sx:if(o==="/"||o==="\\"){u=Ay;break}n&&n.scheme==="file"&&!vx(ld(kr(r,f),""))&&(ud(n.path[0],!0)?Ua(d.path,n.path[0]):d.host=n.host),u=Xr;continue;case Ay:if(o===Qn||o==="/"||o==="\\"||o==="?"||o==="#"){if(!t&&ud(p))u=Xr;else if(p===""){if(d.host="",t)return;u=ja}else{if(c=d.parseHost(p))return c;if(d.host==="localhost"&&(d.host=""),t)return;p="",u=ja}continue}p+=o;break;case ja:if(d.isSpecial()){if(u=Xr,o!=="/"&&o!=="\\")continue}else if(t||o!=="?")if(t||o!=="#"){if(o!==Qn&&(u=Xr,o!=="/"))continue}else d.fragment="",u=Mi;else d.query="",u=Ns;break;case Xr:if(o===Qn||o==="/"||o==="\\"&&d.isSpecial()||!t&&(o==="?"||o==="#")){if((l=Rh(l=p))===".."||l==="%2e."||l===".%2e"||l==="%2e%2e"?(d.shortenPath(),o==="/"||o==="\\"&&d.isSpecial()||Ua(d.path,"")):Zfe(p)?o==="/"||o==="\\"&&d.isSpecial()||Ua(d.path,""):(d.scheme==="file"&&!d.path.length&&ud(p)&&(d.host&&(d.host=""),p=er(p,0)+":"),Ua(d.path,p)),p="",d.scheme==="file"&&(o===Qn||o==="?"||o==="#"))for(;d.path.length>1&&d.path[0]==="";)zfe(d.path);o==="?"?(d.query="",u=Ns):o==="#"&&(d.fragment="",u=Mi)}else p+=xo(o,mx);break;case Ex:o==="?"?(d.query="",u=Ns):o==="#"?(d.fragment="",u=Mi):o!==Qn&&(d.path[0]+=xo(o,Ph));break;case Ns:t||o!=="#"?o!==Qn&&(o==="'"&&d.isSpecial()?d.query+="%27":d.query+=o==="#"?"%23":xo(o,Ph)):(d.fragment="",u=Mi);break;case Mi:o!==Qn&&(d.fragment+=xo(o,gx))}f++}},parseHost:function(e){var t,n,r;if(er(e,0)==="["){if(er(e,e.length-1)!=="]"||(t=function(o){var a,c,l,d,u,f,p,h=[0,0,0,0,0,0,0,0],m=0,b=null,w=0,_=function(){return er(o,w)};if(_()===":"){if(er(o,1)!==":")return;w+=2,b=++m}for(;_();){if(m===8)return;if(_()!==":"){for(a=c=0;c<4&&Nr(px,_());)a=16*a+Ih(_(),16),w++,c++;if(_()==="."){if(c===0||(w-=c,m>6))return;for(l=0;_();){if(d=null,l>0){if(!(_()==="."&&l<4))return;w++}if(!Nr(wy,_()))return;for(;Nr(wy,_());){if(u=Ih(_(),10),d===null)d=u;else{if(d===0)return;d=10*d+u}if(d>255)return;w++}h[m]=256*h[m]+d,++l!=2&&l!==4||m++}if(l!==4)return;break}if(_()===":"){if(w++,!_())return}else if(_())return;h[m++]=a}else{if(b!==null)return;w++,b=++m}}if(b!==null)for(f=m-b,m=7;m!==0&&f>0;)p=h[m],h[m--]=h[b+f-1],h[b+--f]=p;else if(m!==8)return;return h}(cd(e,1,-1)),!t))return ks;this.host=t}else if(this.isSpecial()){if(e=Ife(e),Nr(Kfe,e)||(t=function(o){var a,c,l,d,u,f,p,h=Ufe(o,".");if(h.length&&h[h.length-1]===""&&h.length--,(a=h.length)>4)return o;for(c=[],l=0;l<a;l++){if((d=h[l])==="")return o;if(u=10,d.length>1&&er(d,0)==="0"&&(u=Nr(Hfe,d)?16:8,d=cd(d,u===8?1:2)),d==="")f=0;else{if(!Nr(u===10?Wfe:u===8?Gfe:px,d))return o;f=Ih(d,u)}Ua(c,f)}for(l=0;l<a;l++)if(f=c[l],l===a-1){if(f>=ux(256,5-a))return null}else if(f>255)return null;for(p=$fe(c),l=0;l<c.length;l++)p+=c[l]*ux(256,3-l);return p}(e),t===null))return ks;this.host=t}else{if(Nr(Yfe,e))return ks;for(t="",n=za(e),r=0;r<n.length;r++)t+=xo(n[r],Ph);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return gy(Lh,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||this.scheme==="file"&&t===1&&ud(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,o=e.host,a=e.port,c=e.path,l=e.query,d=e.fragment,u=t+":";return o!==null?(u+="//",e.includesCredentials()&&(u+=n+(r?":"+r:"")+"@"),u+=dd(o),a!==null&&(u+=":"+a)):t==="file"&&(u+="//"),u+=e.cannotBeABaseURL?c[0]:c.length?"/"+ld(c,"/"):"",l!==null&&(u+="?"+l),d!==null&&(u+="#"+d),u},setHref:function(e){var t=this.parse(e);if(t)throw new vy(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if(e==="blob")try{return new qa(e.path[0]).origin}catch(n){return"null"}return e!=="file"&&this.isSpecial()?e+"://"+dd(this.host)+(t!==null?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Di(e)+":",Cy)},getUsername:function(){return this.username},setUsername:function(e){var t=za(Di(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=xo(t[n],_y)}},getPassword:function(){return this.password},setPassword:function(e){var t=za(Di(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=xo(t[n],_y)}},getHost:function(){var e=this.host,t=this.port;return e===null?"":t===null?dd(e):dd(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,xy)},getHostname:function(){var e=this.host;return e===null?"":dd(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,ky)},getPort:function(){var e=this.port;return e===null?"":Di(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||((e=Di(e))===""?this.port=null:this.parse(e,Ny))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+ld(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,ja))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){(e=Di(e))===""?this.query=null:(er(e,0)==="?"&&(e=cd(e,1)),this.query="",this.parse(e,Ns)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){(e=Di(e))!==""?(er(e,0)==="#"&&(e=cd(e,1)),this.fragment="",this.parse(e,Mi)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var qa=function(e){var t=Afe(this,fn),n=Pfe(arguments.length,1)>1?arguments[1]:void 0,r=Lfe(t,new Oy(e,!1,n));hy||(t.href=r.serialize(),t.origin=r.getOrigin(),t.protocol=r.getProtocol(),t.username=r.getUsername(),t.password=r.getPassword(),t.host=r.getHost(),t.hostname=r.getHostname(),t.port=r.getPort(),t.pathname=r.getPathname(),t.search=r.getSearch(),t.searchParams=r.getSearchParams(),t.hash=r.getHash())},fn=qa.prototype,tr=function(e,t){return{get:function(){return Oh(this)[e]()},set:t&&function(n){return Oh(this)[t](n)},configurable:!0,enumerable:!0}};if(hy&&(Vn(fn,"href",tr("serialize","setHref")),Vn(fn,"origin",tr("getOrigin")),Vn(fn,"protocol",tr("getProtocol","setProtocol")),Vn(fn,"username",tr("getUsername","setUsername")),Vn(fn,"password",tr("getPassword","setPassword")),Vn(fn,"host",tr("getHost","setHost")),Vn(fn,"hostname",tr("getHostname","setHostname")),Vn(fn,"port",tr("getPort","setPort")),Vn(fn,"pathname",tr("getPathname","setPathname")),Vn(fn,"search",tr("getSearch","setSearch")),Vn(fn,"searchParams",tr("getSearchParams")),Vn(fn,"hash",tr("getHash","setHash"))),Ah(fn,"toJSON",function(){return Oh(this).serialize()},{enumerable:!0}),Ah(fn,"toString",function(){return Oh(this).serialize()},{enumerable:!0}),ad){var xx=ad.createObjectURL,kx=ad.revokeObjectURL;xx&&Ah(qa,"createObjectURL",lx(xx,ad)),kx&&Ah(qa,"revokeObjectURL",lx(kx,ad))}Rfe(qa,"URL"),Nfe({global:!0,constructor:!0,forced:!Tfe,sham:!hy},{URL:qa});var Vfe=TypeError,ehe=Fe,the=Kc,nhe=dt("species"),Mh=function(e){return the>=51||!ehe(function(){var t=[];return(t.constructor={})[nhe]=function(){return{foo:1}},t[e](Boolean).foo!==1})},rhe=pt,ihe=Fe,ohe=k1,she=At,ahe=Sr,lhe=Pn,Nx=function(e){if(e>9007199254740991)throw Vfe("Maximum allowed index exceeded");return e},Tx=V1,che=I9,dhe=Mh,uhe=Kc,Ax=dt("isConcatSpreadable"),fhe=uhe>=51||!ihe(function(){var e=[];return e[Ax]=!1,e.concat()[0]!==e}),hhe=function(e){if(!she(e))return!1;var t=e[Ax];return t!==void 0?!!t:ohe(e)};rhe({target:"Array",proto:!0,arity:1,forced:!fhe||!dhe("concat")},{concat:function(e){var t,n,r,o,a,c=ahe(this),l=che(c,0),d=0;for(t=-1,r=arguments.length;t<r;t++)if(hhe(a=t===-1?c:arguments[t]))for(o=lhe(a),Nx(d+o),n=0;n<o;n++,d++)n in a&&Tx(l,d,a[n]);else Nx(d+1),Tx(l,d++,a);return l.length=d,l}});var phe=Er.map;pt({target:"Array",proto:!0,forced:!Mh("map")},{map:function(e){return phe(this,e,arguments.length>1?arguments[1]:void 0)}});var Ox=wt,ghe=Fe,Ix=Ke,mhe=ed,vhe=R1,yhe=Bi,Rx=Ix(yh.f),bhe=Ix([].push),whe=Ox&&ghe(function(){var e=Object.create(null);return e[2]=2,!Rx(e,2)}),Px=function(e){return function(t){for(var n,r=yhe(t),o=vhe(r),a=whe&&mhe(r)===null,c=o.length,l=0,d=[];c>l;)n=o[l++],Ox&&!(a?n in r:Rx(r,n))||bhe(d,e?[n,r[n]]:r[n]);return d}},_he={entries:Px(!0),values:Px(!1)}.entries;pt({target:"Object",stat:!0},{entries:function(e){return _he(e)}});var Che=tn,Lx=function(){var e=Che(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},She=Ot,Ehe=Yt,xhe=bs,khe=Lx,Bx=RegExp.prototype,Nhe=ws.PROPER,The=Rn,Ahe=tn,Dx=xr,Ohe=Fe,Ihe=function(e){var t=e.flags;return t!==void 0||"flags"in Bx||Ehe(e,"flags")||!xhe(Bx,e)?t:She(khe,e)},Iy="toString",Mx=RegExp.prototype,Fx=Mx[Iy],Rhe=Ohe(function(){return Fx.call({source:"a",flags:"b"})!=="/a/b"}),Phe=Nhe&&Fx.name!==Iy;function Lhe(e){var t=function(n,r){if(typeof n!="object"||!n)return n;var o=n[Symbol.toPrimitive];if(o!==void 0){var a=o.call(n,"string");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(e);return typeof t=="symbol"?t:String(t)}function Bhe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Lhe(r.key),r)}}function Dhe(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var o=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(o!=null){var a,c,l,d,u=[],f=!0,p=!1;try{if(l=(o=o.call(n)).next,r===0){if(Object(o)!==o)return;f=!1}else for(;!(f=(a=l.call(o)).done)&&(u.push(a.value),u.length!==r);f=!0);}catch(h){p=!0,c=h}finally{try{if(!f&&o.return!=null&&(d=o.return(),Object(d)!==d))return}finally{if(p)throw c}}return u}}(e,t)||function(n,r){if(n){if(typeof n=="string")return $x(n,r);var o=Object.prototype.toString.call(n).slice(8,-1);return o==="Object"&&n.constructor&&(o=n.constructor.name),o==="Map"||o==="Set"?Array.from(n):o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?$x(n,r):void 0}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
@@ -141,5 +141,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
141
141
  \v\f\r                 \u2028\u2029\uFEFF`,sO=Ke("".replace),x3e=RegExp("^["+Nw+"]+"),k3e=RegExp("(^|[^"+Nw+"])["+Nw+"]+$"),Tw=function(e){return function(t){var n=E3e(S3e(t));return 1&e&&(n=sO(n,x3e,"")),2&e&&(n=sO(n,k3e,"$1")),n}},N3e={start:Tw(1),end:Tw(2),trim:Tw(3)},T3e=pt,A3e=wt,aO=Ge,lO=w3e,cO=Ke,O3e=bh,dO=Yt,I3e=Qp,R3e=bs,P3e=rh,uO=c1,L3e=Fe,B3e=Pa.f,D3e=Ra.f,M3e=In.f,F3e=oO,$3e=N3e.trim,Zp="Number",El=aO[Zp];lO[Zp];var Aw=El.prototype,z3e=aO.TypeError,U3e=cO("".slice),Vp=cO("".charCodeAt),j3e=function(e){var t,n,r,o,a,c,l,d,u=uO(e,"number");if(P3e(u))throw new z3e("Cannot convert a Symbol value to a number");if(typeof u=="string"&&u.length>2){if(u=$3e(u),(t=Vp(u,0))===43||t===45){if((n=Vp(u,2))===88||n===120)return NaN}else if(t===48){switch(Vp(u,1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+u}for(c=(a=U3e(u,2)).length,l=0;l<c;l++)if((d=Vp(a,l))<48||d>o)return NaN;return parseInt(a,r)}}return+u},Ow=O3e(Zp,!El(" 0o1")||!El("0b1")||El("+0x1")),eg=function(e){var t,n=arguments.length<1?0:El(function(r){var o=uO(r,"number");return typeof o=="bigint"?o:j3e(o)}(e));return R3e(Aw,t=this)&&L3e(function(){F3e(t)})?I3e(Object(n),this,eg):n};eg.prototype=Aw,Ow&&(Aw.constructor=eg),T3e({global:!0,constructor:!0,wrap:!0,forced:Ow},{Number:eg}),Ow&&function(e,t){for(var n,r=A3e?B3e(t):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),o=0;r.length>o;o++)dO(t,n=r[o])&&!dO(e,n)&&M3e(e,n,D3e(t,n))}(lO[Zp],El);var q3e=Li,H3e=xr,G3e=bo,W3e=RangeError,K3e=pt,Iw=Ke,Y3e=Li,J3e=oO,X3e=function(e){var t=H3e(G3e(this)),n="",r=q3e(e);if(r<0||r===1/0)throw new W3e("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n},fO=Fe,Q3e=RangeError,hO=String,pO=Math.floor,Rw=Iw(X3e),gO=Iw("".slice),Ud=Iw(1 .toFixed),xl=function(e,t,n){return t===0?n:t%2==1?xl(e,t-1,n*e):xl(e*e,t/2,n)},kl=function(e,t,n){for(var r=-1,o=n;++r<6;)o+=t*e[r],e[r]=o%1e7,o=pO(o/1e7)},Pw=function(e,t){for(var n=6,r=0;--n>=0;)r+=e[n],e[n]=pO(r/t),r=r%t*1e7},mO=function(e){for(var t=6,n="";--t>=0;)if(n!==""||t===0||e[t]!==0){var r=hO(e[t]);n=n===""?r:n+Rw("0",7-r.length)+r}return n};K3e({target:"Number",proto:!0,forced:fO(function(){return Ud(8e-5,3)!=="0.000"||Ud(.9,0)!=="1"||Ud(1.255,2)!=="1.25"||Ud(0xde0b6b3a7640080,0)!=="1000000000000000128"})||!fO(function(){Ud({})})},{toFixed:function(e){var t,n,r,o,a=J3e(this),c=Y3e(e),l=[0,0,0,0,0,0],d="",u="0";if(c<0||c>20)throw new Q3e("Incorrect fraction digits");if(a!=a)return"NaN";if(a<=-1e21||a>=1e21)return hO(a);if(a<0&&(d="-",a=-a),a>1e-21)if(t=function(f){for(var p=0,h=f;h>=4096;)p+=12,h/=4096;for(;h>=2;)p+=1,h/=2;return p}(a*xl(2,69,1))-69,n=t<0?a*xl(2,-t,1):a/xl(2,t,1),n*=4503599627370496,(t=52-t)>0){for(kl(l,0,n),r=c;r>=7;)kl(l,1e7,0),r-=7;for(kl(l,xl(10,r,1),0),r=t-1;r>=23;)Pw(l,1<<23),r-=23;Pw(l,1<<r),kl(l,1,1),Pw(l,2),u=mO(l)}else kl(l,0,n),kl(l,1<<-t,0),u=mO(l)+Rw("0",c);return u=c>0?d+((o=u.length)<=c?"0."+Rw("0",c-o)+u:gO(u,0,o-c)+"."+gO(u,o-c)):d+u}});var vO=function(e,t){if(PerformanceObserver)if((PerformanceObserver.supportedEntryTypes||[]).includes(e))try{new PerformanceObserver(function(n){n&&t(n)}).observe({type:e,buffered:!0})}catch(n){t("err")}else t("err");else t("err")},Qt=function(e){var t=Math.min(Math.max(e,0),15e3);return Number.isNaN(t)?0:t%1!=0?Number(t.toFixed(2)):t},Z3e=Er.filter;pt({target:"Array",proto:!0,forced:!Mh("filter")},{filter:function(e){return Z3e(this,e,arguments.length>1?arguments[1]:void 0)}});var V3e=function(){function e(t){Kf(this,e),Ai(this,"performanceData",{fcp:0,fp:0,lcp:0}),Ai(this,"commit",function(){}),this.webCoreIns=t}return Yf(e,[{key:"init",value:function(){try{if(!((t=window.performance)&&t.getEntriesByType&&t.timing))return;this.calcPerformanceTime()}catch(n){}var t}},{key:"calcNavigation",value:function(t){}},{key:"calcPerformanceTime",value:function(){var t=this;Promise.all([new Promise(function(n,r){var o=window.performance.timing,a=null;window.addEventListener("load",function c(){if(o.loadEventEnd>0){clearTimeout(a);var l=Qt(o.unloadEnd-o.unloadStart),d=Qt(o.redirectStart-o.redirectEnd),u=Qt(o.domainLookupStart-o.fetchStart),f=Qt(o.domainLookupEnd-o.domainLookupStart),p=Qt(o.connectEnd-o.connectStart),h=Qt(o.secureConnectionStart==0?0:o.connectEnd-o.secureConnectionStart),m=Qt(o.responseStart-o.requestStart),b=Qt(o.domInteractive-o.fetchStart),w=Qt(o.responseEnd-o.responseStart),_=Qt(o.domContentLoadedEventEnd-o.fetchStart),C=Qt(o.domInteractive-o.responseEnd),k=Qt(o.loadEventStart-o.domContentLoadedEventEnd),S=Qt(o.loadEventEnd-o.loadEventStart),E=Qt(o.loadEventEnd-o.fetchStart);n({unloadTime:l,redirectTime:d,appCacheTime:u,dnsTime:f,tcpTime:p,sslTime:h,ttfb:m,contentTime:w,domParseTime:C,tti:b,domReadyTime:_,loadEventTime:S,loadFinishTime:E,loadResourceTime:k,resource:""})}else a=setTimeout(c,100)},!1)}),new Promise(function(n,r){vO("paint",function(o){var a=0,c=0;if(o!=="err"){var l,d=Jv(o.getEntries());try{for(d.s();!(l=d.n()).done;){var u=l.value,f=u.name,p=u.startTime;f==="first-paint"&&(a=Qt(p)),f==="first-contentful-paint"&&(c=Qt(p))}}catch(h){d.e(h)}finally{d.f()}}n({fp:a,fcp:c})})}).catch(function(n){return console.log(n)}),new Promise(function(n,r){vO("largest-contentful-paint",function(o){if(o=="err")n({lcp:0});else{var a,c=Jv(o.getEntries());try{for(c.s();!(a=c.n()).done;){var l=a.value;n({lcp:Qt(l.startTime)})}}catch(d){c.e(d)}finally{c.f()}}})}).catch(function(n){return console.log(n)})]).then(function(){var n=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).reduce(function(r,o){return qc(qc({},r),o)},t.performanceData);n.type="performance",t.webCoreIns.commit(n)}).catch(function(n){console.log(n)})}},{key:"calcResourceTime",value:function(){}}]),e}(),e4e=["SCRIPT","STYLE","META","HEAD"];function Lw(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document.body,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;if(!e||n>r||e4e.indexOf(e.tagName)>-1||o&&t>o)return n;var a=function(c,l){if(!l||!document.querySelector(c.tagName))return 0;var d=c.getBoundingClientRect(),u=d.top,f=d.height;return u>window.innerHeight||f<=0?0:1/Math.pow(2,l-1)}(e,t);return[].reduceRight.call(e.children,function(c,l){return Lw(l,t+1,c,r,o)},n+a)}var yO,Bw,Dw=Fe,Mw=Ge.RegExp,Fw=Dw(function(){var e=Mw("a","y");return e.lastIndex=2,e.exec("abcd")!==null}),t4e=Fw||Dw(function(){return!Mw("a","y").sticky}),n4e=Fw||Dw(function(){var e=Mw("^r","gy");return e.lastIndex=2,e.exec("str")!==null}),r4e={BROKEN_CARET:n4e,MISSED_STICKY:t4e,UNSUPPORTED_Y:Fw},i4e=Fe,o4e=Ge.RegExp,s4e=i4e(function(){var e=o4e(".","s");return!(e.dotAll&&e.test(`
142
142
  `)&&e.flags==="s")}),a4e=Fe,l4e=Ge.RegExp,c4e=a4e(function(){var e=l4e("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),Nl=Ot,tg=Ke,d4e=xr,u4e=Lx,f4e=r4e,h4e=Ia,p4e=nn.get,g4e=s4e,m4e=c4e,v4e=Zv("native-string-replace",String.prototype.replace),ng=RegExp.prototype.exec,$w=ng,y4e=tg("".charAt),b4e=tg("".indexOf),w4e=tg("".replace),zw=tg("".slice),Uw=(Bw=/b*/g,Nl(ng,yO=/a/,"a"),Nl(ng,Bw,"a"),yO.lastIndex!==0||Bw.lastIndex!==0),bO=f4e.BROKEN_CARET,jw=/()??/.exec("")[1]!==void 0;(Uw||jw||bO||g4e||m4e)&&($w=function(e){var t,n,r,o,a,c,l,d=this,u=p4e(d),f=d4e(e),p=u.raw;if(p)return p.lastIndex=d.lastIndex,t=Nl($w,p,f),d.lastIndex=p.lastIndex,t;var h=u.groups,m=bO&&d.sticky,b=Nl(u4e,d),w=d.source,_=0,C=f;if(m&&(b=w4e(b,"y",""),b4e(b,"g")===-1&&(b+="g"),C=zw(f,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&y4e(f,d.lastIndex-1)!==`
143
143
  `)&&(w="(?: "+w+")",C=" "+C,_++),n=new RegExp("^(?:"+w+")",b)),jw&&(n=new RegExp("^"+w+"$(?!\\s)",b)),Uw&&(r=d.lastIndex),o=Nl(ng,m?n:d,C),m?o?(o.input=zw(o.input,_),o[0]=zw(o[0],_),o.index=d.lastIndex,d.lastIndex+=o[0].length):d.lastIndex=0:Uw&&o&&(d.lastIndex=d.global?o.index+o[0].length:r),jw&&o&&o.length>1&&Nl(v4e,o[0],n,function(){for(a=1;a<arguments.length-2;a++)arguments[a]===void 0&&(o[a]=void 0)}),o&&h)for(o.groups=c=h4e(null),a=0;a<h.length;a++)c[(l=h[a])[0]]=o[l[1]];return o});var rg=$w;pt({target:"RegExp",proto:!0,forced:/./.exec!==rg},{exec:rg});var wO=Jc,_O=Rn,_4e=rg,CO=Fe,SO=dt,C4e=Oi,S4e=SO("species"),qw=RegExp.prototype,E4e=K1.charAt,EO=Ot,x4e=tn,k4e=ht,N4e=Ii,T4e=rg,A4e=TypeError,O4e=Ot,I4e=function(e,t,n,r){var o=SO(e),a=!CO(function(){var u={};return u[o]=function(){return 7},""[e](u)!==7}),c=a&&!CO(function(){var u=!1,f=/a/;return e==="split"&&((f={}).constructor={},f.constructor[S4e]=function(){return f},f.flags="",f[o]=/./[o]),f.exec=function(){return u=!0,null},f[o](""),!u});if(!a||!c||n){var l=wO(/./[o]),d=t(o,""[e],function(u,f,p,h,m){var b=wO(u),w=f.exec;return w===_4e||w===qw.exec?a&&!m?{done:!0,value:l(f,p,h)}:{done:!0,value:b(p,f,h)}:{done:!1}});_O(String.prototype,e,d[0]),_O(qw,o,d[1])}r&&C4e(qw[o],"sham",!0)},R4e=tn,P4e=ms,L4e=_s,Hw=xr,B4e=bo,D4e=ih,M4e=function(e,t,n){return t+(n?E4e(e,t).length:1)},xO=function(e,t){var n=e.exec;if(k4e(n)){var r=EO(n,e,t);return r!==null&&x4e(r),r}if(N4e(e)==="RegExp")return EO(T4e,e,t);throw new A4e("RegExp#exec called on incompatible receiver")};I4e("match",function(e,t,n){return[function(r){var o=B4e(this),a=P4e(r)?void 0:D4e(r,e);return a?O4e(a,r,o):new RegExp(r)[e](Hw(o))},function(r){var o=R4e(this),a=Hw(r),c=n(t,o,a);if(c.done)return c.value;if(!o.global)return xO(o,a);var l=o.unicode;o.lastIndex=0;for(var d,u=[],f=0;(d=xO(o,a))!==null;){var p=Hw(d[0]);u[f]=p,p===""&&(o.lastIndex=M4e(a,L4e(o.lastIndex),l)),f++}return f===0?null:u}]});var En,Tl,ig,Gw={exports:{}},kO=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined",F4e=kO,Ww=wt,gn=Ge,NO=ht,og=At,Lo=Yt,Kw=Ri,$4e=Ta,z4e=Oi,Yw=Rn,U4e=Co,j4e=bs,sg=ed,Al=La,q4e=dt,H4e=eh,TO=nn.enforce,G4e=nn.get,ag=gn.Int8Array,Jw=ag&&ag.prototype,AO=gn.Uint8ClampedArray,OO=AO&&AO.prototype,ti=ag&&sg(ag),Ir=Jw&&sg(Jw),W4e=Object.prototype,Xw=gn.TypeError,IO=q4e("toStringTag"),Qw=H4e("TYPED_ARRAY_TAG"),lg="TypedArrayConstructor",zi=F4e&&!!Al&&Kw(gn.opera)!=="Opera",RO=!1,Ui={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Zw={BigInt64Array:8,BigUint64Array:8},PO=function(e){var t=sg(e);if(og(t)){var n=G4e(t);return n&&Lo(n,lg)?n[lg]:PO(t)}},LO=function(e){if(!og(e))return!1;var t=Kw(e);return Lo(Ui,t)||Lo(Zw,t)};for(En in Ui)(ig=(Tl=gn[En])&&Tl.prototype)?TO(ig)[lg]=Tl:zi=!1;for(En in Zw)(ig=(Tl=gn[En])&&Tl.prototype)&&(TO(ig)[lg]=Tl);if((!zi||!NO(ti)||ti===Function.prototype)&&(ti=function(){throw new Xw("Incorrect invocation")},zi))for(En in Ui)gn[En]&&Al(gn[En],ti);if((!zi||!Ir||Ir===W4e)&&(Ir=ti.prototype,zi))for(En in Ui)gn[En]&&Al(gn[En].prototype,Ir);if(zi&&sg(OO)!==Ir&&Al(OO,Ir),Ww&&!Lo(Ir,IO))for(En in RO=!0,U4e(Ir,IO,{configurable:!0,get:function(){return og(this)?this[Qw]:void 0}}),Ui)gn[En]&&z4e(gn[En],Qw,En);var Oe={NATIVE_ARRAY_BUFFER_VIEWS:zi,TYPED_ARRAY_TAG:RO&&Qw,aTypedArray:function(e){if(LO(e))return e;throw new Xw("Target is not a typed array")},aTypedArrayConstructor:function(e){if(NO(e)&&(!Al||j4e(ti,e)))return e;throw new Xw($4e(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n,r){if(Ww){if(n)for(var o in Ui){var a=gn[o];if(a&&Lo(a.prototype,e))try{delete a.prototype[e]}catch(c){try{a.prototype[e]=t}catch(l){}}}Ir[e]&&!n||Yw(Ir,e,n?t:zi&&Jw[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,n){var r,o;if(Ww){if(Al){if(n){for(r in Ui)if((o=gn[r])&&Lo(o,e))try{delete o[e]}catch(a){}}if(ti[e]&&!n)return;try{return Yw(ti,e,n?t:zi&&ti[e]||t)}catch(a){}}for(r in Ui)!(o=gn[r])||o[e]&&!n||Yw(o,e,t)}},getTypedArrayConstructor:PO,isView:function(e){if(!og(e))return!1;var t=Kw(e);return t==="DataView"||Lo(Ui,t)||Lo(Zw,t)},isTypedArray:LO,TypedArray:ti,TypedArrayPrototype:Ir},BO=Ge,Vw=Fe,K4e=xw,Y4e=Oe.NATIVE_ARRAY_BUFFER_VIEWS,J4e=BO.ArrayBuffer,$s=BO.Int8Array,X4e=!Y4e||!Vw(function(){$s(1)})||!Vw(function(){new $s(-1)})||!K4e(function(e){new $s,new $s(null),new $s(1.5),new $s(e)},!0)||Vw(function(){return new $s(new J4e(2),1,void 0).length!==1}),Q4e=Li,Z4e=_s,V4e=RangeError,DO=function(e){if(e===void 0)return 0;var t=Q4e(e),n=Z4e(t);if(t!==n)throw new V4e("Wrong length or index");return n},e8e=Math.sign||function(e){var t=+e;return t===0||t!=t?t:t<0?-1:1},t8e=e8e,n8e=Math.abs,MO=2220446049250313e-31,FO=1/MO,r8e=function(e,t,n,r){var o=+e,a=n8e(o),c=t8e(o);if(a<r)return c*function(u){return u+FO-FO}(a/r/t)*r*t;var l=(1+t/MO)*a,d=l-(l-a);return d>n||d!=d?c*(1/0):c*d},i8e=Math.fround||function(e){return r8e(e,11920928955078125e-23,34028234663852886e22,11754943508222875e-54)},o8e=Array,s8e=Math.abs,ji=Math.pow,a8e=Math.floor,l8e=Math.log,c8e=Math.LN2,d8e={pack:function(e,t,n){var r,o,a,c=o8e(n),l=8*n-t-1,d=(1<<l)-1,u=d>>1,f=t===23?ji(2,-24)-ji(2,-77):0,p=e<0||e===0&&1/e<0?1:0,h=0;for((e=s8e(e))!=e||e===1/0?(o=e!=e?1:0,r=d):(r=a8e(l8e(e)/c8e),e*(a=ji(2,-r))<1&&(r--,a*=2),(e+=r+u>=1?f/a:f*ji(2,1-u))*a>=2&&(r++,a/=2),r+u>=d?(o=0,r=d):r+u>=1?(o=(e*a-1)*ji(2,t),r+=u):(o=e*ji(2,u-1)*ji(2,t),r=0));t>=8;)c[h++]=255&o,o/=256,t-=8;for(r=r<<t|o,l+=t;l>0;)c[h++]=255&r,r/=256,l-=8;return c[--h]|=128*p,c},unpack:function(e,t){var n,r=e.length,o=8*r-t-1,a=(1<<o)-1,c=a>>1,l=o-7,d=r-1,u=e[d--],f=127&u;for(u>>=7;l>0;)f=256*f+e[d--],l-=8;for(n=f&(1<<-l)-1,f>>=-l,l+=t;l>0;)n=256*n+e[d--],l-=8;if(f===0)f=1-c;else{if(f===a)return n?NaN:u?-1/0:1/0;n+=ji(2,t),f-=c}return(u?-1:1)*n*ji(2,f-t)}},u8e=Sr,$O=Qc,f8e=Pn,zO=function(e){for(var t=u8e(this),n=f8e(t),r=arguments.length,o=$O(r>1?arguments[1]:void 0,n),a=r>2?arguments[2]:void 0,c=a===void 0?n:$O(a,n);c>o;)t[o++]=e;return t},cg=Ge,e_=Ke,t_=wt,h8e=kO,p8e=Oi,g8e=Co,UO=ry,n_=Fe,dg=Ss,m8e=Li,v8e=_s,ug=DO,y8e=i8e,jO=d8e,b8e=ed,qO=La,w8e=zO,_8e=So,C8e=Qp,S8e=V9,HO=_o,r_=nn,E8e=ws.PROPER,GO=ws.CONFIGURABLE,Ol="ArrayBuffer",fg="DataView",Il="prototype",WO="Wrong index",KO=r_.getterFor(Ol),jd=r_.getterFor(fg),YO=r_.set,Rr=cg[Ol],Pr=Rr,Rl=Pr&&Pr[Il],qi=cg[fg],zs=qi&&qi[Il],JO=Object.prototype,x8e=cg.Array,hg=cg.RangeError,k8e=e_(w8e),N8e=e_([].reverse),XO=jO.pack,QO=jO.unpack,ZO=function(e){return[255&e]},VO=function(e){return[255&e,e>>8&255]},eI=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},tI=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},T8e=function(e){return XO(y8e(e),23,4)},A8e=function(e){return XO(e,52,8)},pg=function(e,t,n){g8e(e[Il],t,{configurable:!0,get:function(){return n(this)[t]}})},Bo=function(e,t,n,r){var o=jd(e),a=ug(n),c=!!r;if(a+t>o.byteLength)throw new hg(WO);var l=o.bytes,d=a+o.byteOffset,u=_8e(l,d,d+t);return c?u:N8e(u)},Do=function(e,t,n,r,o,a){var c=jd(e),l=ug(n),d=r(+o),u=!!a;if(l+t>c.byteLength)throw new hg(WO);for(var f=c.bytes,p=l+c.byteOffset,h=0;h<t;h++)f[p+h]=d[u?h:t-h-1]};if(h8e){var nI=E8e&&Rr.name!==Ol;n_(function(){Rr(1)})&&n_(function(){new Rr(-1)})&&!n_(function(){return new Rr,new Rr(1.5),new Rr(NaN),Rr.length!==1||nI&&!GO})?nI&&GO&&p8e(Rr,"name",Ol):((Pr=function(e){return dg(this,Rl),C8e(new Rr(ug(e)),this,Pr)})[Il]=Rl,Rl.constructor=Pr,S8e(Pr,Rr)),qO&&b8e(zs)!==JO&&qO(zs,JO);var gg=new qi(new Pr(2)),rI=e_(zs.setInt8);gg.setInt8(0,2147483648),gg.setInt8(1,2147483649),!gg.getInt8(0)&&gg.getInt8(1)||UO(zs,{setInt8:function(e,t){rI(this,e,t<<24>>24)},setUint8:function(e,t){rI(this,e,t<<24>>24)}},{unsafe:!0})}else Rl=(Pr=function(e){dg(this,Rl);var t=ug(e);YO(this,{type:Ol,bytes:k8e(x8e(t),0),byteLength:t}),t_||(this.byteLength=t,this.detached=!1)})[Il],zs=(qi=function(e,t,n){dg(this,zs),dg(e,Rl);var r=KO(e),o=r.byteLength,a=m8e(t);if(a<0||a>o)throw new hg("Wrong offset");if(a+(n=n===void 0?o-a:v8e(n))>o)throw new hg("Wrong length");YO(this,{type:fg,buffer:e,byteLength:n,byteOffset:a,bytes:r.bytes}),t_||(this.buffer=e,this.byteLength=n,this.byteOffset=a)})[Il],t_&&(pg(Pr,"byteLength",KO),pg(qi,"buffer",jd),pg(qi,"byteLength",jd),pg(qi,"byteOffset",jd)),UO(zs,{getInt8:function(e){return Bo(this,1,e)[0]<<24>>24},getUint8:function(e){return Bo(this,1,e)[0]},getInt16:function(e){var t=Bo(this,2,e,arguments.length>1&&arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=Bo(this,2,e,arguments.length>1&&arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return tI(Bo(this,4,e,arguments.length>1&&arguments[1]))},getUint32:function(e){return tI(Bo(this,4,e,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(e){return QO(Bo(this,4,e,arguments.length>1&&arguments[1]),23)},getFloat64:function(e){return QO(Bo(this,8,e,arguments.length>1&&arguments[1]),52)},setInt8:function(e,t){Do(this,1,e,ZO,t)},setUint8:function(e,t){Do(this,1,e,ZO,t)},setInt16:function(e,t){Do(this,2,e,VO,t,arguments.length>2&&arguments[2])},setUint16:function(e,t){Do(this,2,e,VO,t,arguments.length>2&&arguments[2])},setInt32:function(e,t){Do(this,4,e,eI,t,arguments.length>2&&arguments[2])},setUint32:function(e,t){Do(this,4,e,eI,t,arguments.length>2&&arguments[2])},setFloat32:function(e,t){Do(this,4,e,T8e,t,arguments.length>2&&arguments[2])},setFloat64:function(e,t){Do(this,8,e,A8e,t,arguments.length>2&&arguments[2])}});HO(Pr,Ol),HO(qi,fg);var O8e={ArrayBuffer:Pr,DataView:qi},I8e=At,R8e=Math.floor,P8e=Number.isInteger||function(e){return!I8e(e)&&isFinite(e)&&R8e(e)===e},L8e=Li,B8e=RangeError,D8e=function(e){var t=L8e(e);if(t<0)throw new B8e("The argument can't be less than 0");return t},M8e=RangeError,iI=function(e,t){var n=D8e(e);if(n%t)throw new M8e("Wrong offset");return n},F8e=Math.round,$8e=Ri,z8e=c1,U8e=TypeError,oI=function(e){var t=z8e(e,"number");if(typeof t=="number")throw new U8e("Can't convert number to bigint");return BigInt(t)},j8e=Pi,q8e=Ot,H8e=tA,G8e=Sr,W8e=Pn,K8e=Sh,Y8e=id,J8e=Z1,X8e=function(e){var t=$8e(e);return t==="BigInt64Array"||t==="BigUint64Array"},Q8e=Oe.aTypedArrayConstructor,Z8e=oI,V8e=Pn,sI=function(e,t,n){for(var r=0,o=arguments.length>2?n:V8e(t),a=new e(o);o>r;)a[r]=t[r++];return a},aI=pt,lI=Ge,cI=Ot,e6e=wt,t6e=X4e,qd=Oe,dI=O8e,uI=Ss,n6e=Aa,Hd=Oi,r6e=P8e,i6e=_s,fI=DO,i_=iI,o6e=function(e){var t=F8e(e);return t<0?0:t>255?255:255&t},hI=oh,Gd=Yt,s6e=Ri,o_=At,a6e=rh,l6e=Ia,c6e=bs,mg=La,d6e=Pa.f,pI=function(e){var t,n,r,o,a,c,l,d,u=H8e(this),f=G8e(e),p=arguments.length,h=p>1?arguments[1]:void 0,m=h!==void 0,b=Y8e(f);if(b&&!J8e(b))for(d=(l=K8e(f,b)).next,f=[];!(c=q8e(d,l)).done;)f.push(c.value);for(m&&p>2&&(h=j8e(h,arguments[2])),n=W8e(f),r=new(Q8e(u))(n),o=X8e(r),t=0;n>t;t++)a=m?h(f[t],t):f[t],r[t]=o?Z8e(a):+a;return r},u6e=Er.forEach,f6e=rw,h6e=Co,gI=In,mI=Ra,vI=sI,p6e=Qp,s_=nn.get,g6e=nn.set,m6e=nn.enforce,yI=gI.f,v6e=mI.f,a_=lI.RangeError,bI=dI.ArrayBuffer,y6e=bI.prototype,b6e=dI.DataView,vg=qd.NATIVE_ARRAY_BUFFER_VIEWS,wI=qd.TYPED_ARRAY_TAG,_I=qd.TypedArray,Wd=qd.TypedArrayPrototype,l_=qd.isTypedArray,yg="BYTES_PER_ELEMENT",c_="Wrong length",bg=function(e,t){h6e(e,t,{configurable:!0,get:function(){return s_(this)[t]}})},CI=function(e){var t;return c6e(y6e,e)||(t=s6e(e))==="ArrayBuffer"||t==="SharedArrayBuffer"},SI=function(e,t){return l_(e)&&!a6e(t)&&t in e&&r6e(+t)&&t>=0},EI=function(e,t){return t=hI(t),SI(e,t)?n6e(2,e[t]):v6e(e,t)},xI=function(e,t,n){return t=hI(t),!(SI(e,t)&&o_(n)&&Gd(n,"value"))||Gd(n,"get")||Gd(n,"set")||n.configurable||Gd(n,"writable")&&!n.writable||Gd(n,"enumerable")&&!n.enumerable?yI(e,t,n):(e[t]=n.value,e)};e6e?(vg||(mI.f=EI,gI.f=xI,bg(Wd,"buffer"),bg(Wd,"byteOffset"),bg(Wd,"byteLength"),bg(Wd,"length")),aI({target:"Object",stat:!0,forced:!vg},{getOwnPropertyDescriptor:EI,defineProperty:xI}),Gw.exports=function(e,t,n){var r=e.match(/\d+/)[0]/8,o=e+(n?"Clamped":"")+"Array",a="get"+e,c="set"+e,l=lI[o],d=l,u=d&&d.prototype,f={},p=function(m,b){yI(m,b,{get:function(){return function(w,_){var C=s_(w);return C.view[a](_*r+C.byteOffset,!0)}(this,b)},set:function(w){return function(_,C,k){var S=s_(_);S.view[c](C*r+S.byteOffset,n?o6e(k):k,!0)}(this,b,w)},enumerable:!0})};vg?t6e&&(d=t(function(m,b,w,_){return uI(m,u),p6e(o_(b)?CI(b)?_!==void 0?new l(b,i_(w,r),_):w!==void 0?new l(b,i_(w,r)):new l(b):l_(b)?vI(d,b):cI(pI,d,b):new l(fI(b)),m,d)}),mg&&mg(d,_I),u6e(d6e(l),function(m){m in d||Hd(d,m,l[m])}),d.prototype=u):(d=t(function(m,b,w,_){uI(m,u);var C,k,S,E=0,T=0;if(o_(b)){if(!CI(b))return l_(b)?vI(d,b):cI(pI,d,b);C=b,T=i_(w,r);var A=b.byteLength;if(_===void 0){if(A%r)throw new a_(c_);if((k=A-T)<0)throw new a_(c_)}else if((k=i6e(_)*r)+T>A)throw new a_(c_);S=k/r}else S=fI(b),C=new bI(k=S*r);for(g6e(m,{buffer:C,byteOffset:T,byteLength:k,length:S,view:new b6e(C)});E<S;)p(m,E++)}),mg&&mg(d,_I),u=d.prototype=l6e(Wd)),u.constructor!==d&&Hd(u,"constructor",d),m6e(u).TypedArrayConstructor=d,wI&&Hd(u,wI,o);var h=d!==l;f[o]=d,aI({global:!0,constructor:!0,forced:h,sham:!vg},f),yg in d||Hd(d,yg,r),yg in u||Hd(u,yg,r),f6e(o)}):Gw.exports=function(){},(0,Gw.exports)("Uint8",function(e){return function(t,n,r){return e(this,t,n,r)}});var kI=Ta,w6e=TypeError,_6e=Sr,d_=Qc,C6e=Pn,S6e=function(e,t){if(!delete e[t])throw new w6e("Cannot delete property "+kI(t)+" of "+kI(e))},E6e=Math.min,x6e=[].copyWithin||function(e,t){var n=_6e(this),r=C6e(n),o=d_(e,r),a=d_(t,r),c=arguments.length>2?arguments[2]:void 0,l=E6e((c===void 0?r:d_(c,r))-a,r-o),d=1;for(a<o&&o<a+l&&(d=-1,a+=l-1,o+=l-1);l-- >0;)a in n?n[o]=n[a]:S6e(n,o),o+=d,a+=d;return n},NI=Oe,k6e=Ke(x6e),N6e=NI.aTypedArray;(0,NI.exportTypedArrayMethod)("copyWithin",function(e,t){return k6e(N6e(this),e,t,arguments.length>2?arguments[2]:void 0)});var T6e=Er.every,A6e=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("every",function(e){return T6e(A6e(this),e,arguments.length>1?arguments[1]:void 0)});var O6e=zO,I6e=oI,R6e=Ri,P6e=Ot,L6e=Fe,B6e=Oe.aTypedArray,D6e=Oe.exportTypedArrayMethod,M6e=Ke("".slice);D6e("fill",function(e){var t=arguments.length;B6e(this);var n=M6e(R6e(this),0,3)==="Big"?I6e(e):+e;return P6e(O6e,this,n,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)},L6e(function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),e!==1}));var F6e=rA,$6e=Oe.aTypedArrayConstructor,z6e=Oe.getTypedArrayConstructor,wg=function(e){return $6e(F6e(e,z6e(e)))},U6e=sI,j6e=wg,q6e=Er.filter,H6e=function(e,t){return U6e(j6e(e),t)},G6e=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("filter",function(e){var t=q6e(G6e(this),e,arguments.length>1?arguments[1]:void 0);return H6e(this,t)});var W6e=Er.find,K6e=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("find",function(e){return W6e(K6e(this),e,arguments.length>1?arguments[1]:void 0)});var Y6e=Er.findIndex,J6e=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("findIndex",function(e){return Y6e(J6e(this),e,arguments.length>1?arguments[1]:void 0)});var X6e=Er.forEach,Q6e=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("forEach",function(e){X6e(Q6e(this),e,arguments.length>1?arguments[1]:void 0)});var Z6e=gh.includes,V6e=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("includes",function(e){return Z6e(V6e(this),e,arguments.length>1?arguments[1]:void 0)});var e5e=gh.indexOf,t5e=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("indexOf",function(e){return e5e(t5e(this),e,arguments.length>1?arguments[1]:void 0)});var n5e=Ge,r5e=Fe,u_=Ke,TI=Oe,f_=hE,h_=dt("iterator"),AI=n5e.Uint8Array,i5e=u_(f_.values),o5e=u_(f_.keys),s5e=u_(f_.entries),p_=TI.aTypedArray,_g=TI.exportTypedArrayMethod,Pl=AI&&AI.prototype,Cg=!r5e(function(){Pl[h_].call([1])}),OI=!!Pl&&Pl.values&&Pl[h_]===Pl.values&&Pl.values.name==="values",II=function(){return i5e(p_(this))};_g("entries",function(){return s5e(p_(this))},Cg),_g("keys",function(){return o5e(p_(this))},Cg),_g("values",II,Cg||!OI,{name:"values"}),_g(h_,II,Cg||!OI,{name:"values"});var a5e=Oe.aTypedArray,l5e=Oe.exportTypedArrayMethod,c5e=Ke([].join);l5e("join",function(e){return c5e(a5e(this),e)});var d5e=$p,u5e=Bi,f5e=Li,h5e=Pn,p5e=P9,g5e=Math.min,g_=[].lastIndexOf,RI=!!g_&&1/[1].lastIndexOf(1,-0)<0,m5e=p5e("lastIndexOf"),v5e=RI||!m5e?function(e){if(RI)return d5e(g_,this,arguments)||0;var t=u5e(this),n=h5e(t),r=n-1;for(arguments.length>1&&(r=g5e(r,f5e(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}:g_,y5e=$p,b5e=v5e,w5e=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("lastIndexOf",function(e){var t=arguments.length;return y5e(b5e,w5e(this),t>1?[e,arguments[1]]:[e])});var _5e=Er.map,C5e=wg,S5e=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("map",function(e){return _5e(S5e(this),e,arguments.length>1?arguments[1]:void 0,function(t,n){return new(C5e(t))(n)})});var E5e=Kr,x5e=Sr,k5e=hh,N5e=Pn,T5e=TypeError,PI=function(e){return function(t,n,r,o){var a=x5e(t),c=k5e(a),l=N5e(a);E5e(n);var d=e?l-1:0,u=e?-1:1;if(r<2)for(;;){if(d in c){o=c[d],d+=u;break}if(d+=u,e?d<0:l<=d)throw new T5e("Reduce of empty array with no initial value")}for(;e?d>=0:l>d;d+=u)d in c&&(o=n(o,c[d],d,a));return o}},LI={left:PI(!1),right:PI(!0)},A5e=LI.left,O5e=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("reduce",function(e){var t=arguments.length;return A5e(O5e(this),e,t,t>1?arguments[1]:void 0)});var I5e=LI.right,R5e=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("reduceRight",function(e){var t=arguments.length;return I5e(R5e(this),e,t,t>1?arguments[1]:void 0)});var P5e=Oe.aTypedArray,L5e=Oe.exportTypedArrayMethod,B5e=Math.floor;L5e("reverse",function(){for(var e,t=this,n=P5e(t).length,r=B5e(n/2),o=0;o<r;)e=t[o],t[o++]=t[--n],t[n]=e;return t});var BI=Ge,DI=Ot,m_=Oe,D5e=Pn,M5e=iI,F5e=Sr,MI=Fe,$5e=BI.RangeError,v_=BI.Int8Array,FI=v_&&v_.prototype,$I=FI&&FI.set,z5e=m_.aTypedArray,U5e=m_.exportTypedArrayMethod,y_=!MI(function(){var e=new Uint8ClampedArray(2);return DI($I,e,{length:1,0:3},1),e[1]!==3}),j5e=y_&&m_.NATIVE_ARRAY_BUFFER_VIEWS&&MI(function(){var e=new v_(2);return e.set(1),e.set("2",1),e[0]!==0||e[1]!==2});U5e("set",function(e){z5e(this);var t=M5e(arguments.length>1?arguments[1]:void 0,1),n=F5e(e);if(y_)return DI($I,this,n,t);var r=this.length,o=D5e(n),a=0;if(o+t>r)throw new $5e("Wrong length");for(;a<o;)this[t+a]=n[a++]},!y_||j5e);var q5e=wg,H5e=So,G5e=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("slice",function(e,t){for(var n=H5e(G5e(this),e,t),r=q5e(this),o=0,a=n.length,c=new r(a);a>o;)c[o]=n[o++];return c},Fe(function(){new Int8Array(1).slice()}));var W5e=Er.some,K5e=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("some",function(e){return W5e(K5e(this),e,arguments.length>1?arguments[1]:void 0)});var zI=vs.match(/firefox\/(\d+)/i),Y5e=!!zI&&+zI[1],J5e=/MSIE|Trident/.test(vs),UI=vs.match(/AppleWebKit\/(\d+)\./),X5e=!!UI&&+UI[1],Q5e=Jc,b_=Fe,Z5e=Kr,V5e=jE,jI=Y5e,eCe=J5e,qI=Kc,HI=X5e,tCe=Oe.aTypedArray,nCe=Oe.exportTypedArrayMethod,Kd=Ge.Uint16Array,Ll=Kd&&Q5e(Kd.prototype.sort),rCe=!(!Ll||b_(function(){Ll(new Kd(2),null)})&&b_(function(){Ll(new Kd(2),{})})),GI=!!Ll&&!b_(function(){if(qI)return qI<74;if(jI)return jI<67;if(eCe)return!0;if(HI)return HI<602;var e,t,n=new Kd(516),r=Array(516);for(e=0;e<516;e++)t=e%4,n[e]=515-e,r[e]=e-2*t+3;for(Ll(n,function(o,a){return(o/4|0)-(a/4|0)}),e=0;e<516;e++)if(n[e]!==r[e])return!0});nCe("sort",function(e){return e!==void 0&&Z5e(e),GI?Ll(this,e):V5e(tCe(this),function(t){return function(n,r){return t!==void 0?+t(n,r)||0:r!=r?-1:n!=n?1:n===0&&r===0?1/n>0&&1/r<0?1:-1:n>r}}(e))},!GI||rCe);var iCe=_s,WI=Qc,oCe=wg,sCe=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("subarray",function(e,t){var n=sCe(this),r=n.length,o=WI(e,r);return new(oCe(n))(n.buffer,n.byteOffset+o*n.BYTES_PER_ELEMENT,iCe((t===void 0?r:WI(t,r))-o))});var aCe=$p,KI=Oe,w_=Fe,YI=So,Sg=Ge.Int8Array,JI=KI.aTypedArray,lCe=KI.exportTypedArrayMethod,XI=[].toLocaleString,cCe=!!Sg&&w_(function(){XI.call(new Sg(1))});lCe("toLocaleString",function(){return aCe(XI,cCe?YI(JI(this)):JI(this),YI(arguments))},w_(function(){return[1,2].toLocaleString()!==new Sg([1,2]).toLocaleString()})||!w_(function(){Sg.prototype.toLocaleString.call([1,2])}));var dCe=Oe.exportTypedArrayMethod,uCe=Fe,fCe=Ke,QI=Ge.Uint8Array,hCe=QI&&QI.prototype||{},Eg=[].toString,pCe=fCe([].join);uCe(function(){Eg.call({})})&&(Eg=function(){return pCe(this)});var gCe=hCe.toString!==Eg;dCe("toString",Eg,gCe);var mCe=0,__={},vCe=function(e){if(!e)return Promise.reject("empty url");var t=__[e];return t?Promise.resolve(t):new Promise(function(n,r){var o=document.createElement("script");if(o.id="script".concat(mCe++),o.src=e,o.async="async",o.src.indexOf("http")!==0)throw Error("load-script只能加载http/https协议的url,当前协议是".concat(location.protocol));o.onerror=function(a){$("#".concat(o.id)).remove(),r(a)},o.readyState?o.onreadystatechange=function(a){o.readyState!="loaded"&&o.readyState!="complete"||(o.onreadystatechange=null,__[e]=a,n(a))}:o.onload=function(a){__[e]=a,n(a)},document.body.appendChild(o)})};function yCe(e,t){return ZI.apply(this,arguments)}function ZI(){return(ZI=Hc(Cr().mark(function e(t,n){var r,o,a;return Cr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,vCe("https://html2canvas.hertzen.com/dist/html2canvas.min.js");case 2:return c.next=4,html2canvas(document.body,{useCORS:!0});case 4:return r=c.sent,o=r.toDataURL("image/jpeg",.3),a=bCe(o),c.next=9,wCe(a,t,n);case 9:return c.abrupt("return",c.sent);case 10:case"end":return c.stop()}},e)}))).apply(this,arguments)}function bCe(e){for(var t=e.split(","),n=t[0].match(/:(.*?);/)[1],r=atob(t[1]),o=r.length,a=new Uint8Array(o);o--;)a[o]=r.charCodeAt(o);return new Blob([a],{type:n})}function wCe(e,t,n){return VI.apply(this,arguments)}function VI(){return(VI=Hc(Cr().mark(function e(t,n,r){var o,a;return Cr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return(o=new FormData).append("filename",t,"".concat(r,".png")),o.append("https",1),c.next=5,n("//qapm.360.cn/api/upload/uploadImg",{method:"POST",body:o,keepalive:!0}).then(function(l){return l.json()});case 5:return a=c.sent,c.abrupt("return",a);case 7:case"end":return c.stop()}},e)}))).apply(this,arguments)}var _Ce=function(){function e(n){Kf(this,e),Ai(this,"isLoaded",!1),Ai(this,"timer",null),Ai(this,"whiteCount",0),Ai(this,"maxLoopNumber",2),Ai(this,"isReport",!1),this.webCoreIns=n;var r=n.config.whiteScreenConfig||{},o=r.target,a=r.score,c=a===void 0?1.5:a;r.screenshot;var l=r.domDepth,d=l===void 0?6:l;this.target=o,this.score=c,this.screenshot=!1,this.domDepth=d,this.fetch=n.fetch}var t;return Yf(e,[{key:"init",value:function(){var n=this;window.addEventListener("load",function(){n.isLoaded=!0,n.handle()}),window.addEventListener("error",function(){n.isLoaded&&(n.whiteCount=n.maxLoopNumber,n.handle())})}},{key:"getTarget",value:function(){var n;try{n=this.target?document.querySelector(this.target):document.body}catch(r){console.log("sdk入参target有误:",this.target)}return n||console.log("sdk入参target有误:",this.target),n||document.body}},{key:"handle",value:function(){var n=Lw(this.getTarget(),0,0,this.score,this.domDepth);this.whiteCount+=1,n<=this.score?this.openLoopToJudge(n):this.whiteCount=0}},{key:"openLoopToJudge",value:function(n){var r=this;this.whiteCount>=this.maxLoopNumber?this.commit(n):this.timer=setTimeout(function(){var o=Lw(r.target,0,0,r.score,r.domDepth);r.whiteCount+=1,o<=r.score?(clearTimeout(r.timer),r.timer=null,r.openLoopToJudge(o)):(clearTimeout(r.timer),r.timer=null,r.whiteCount=0)},1e3)}},{key:"commit",value:(t=Hc(Cr().mark(function n(r){return Cr().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(!this.isReport){o.next=2;break}return o.abrupt("return");case 2:this.isReport=!0,this.screenshot&&yCe(this.fetch,this.webCoreIns.sid),this.webCoreIns.commit({type:"whiteScreen",score:r});case 5:case"end":return o.stop()}},n,this)})),function(n){return t.apply(this,arguments)})}]),e}(),eR={exports:{}},tR={},CCe=Ii,SCe=Bi,nR=Pa.f,ECe=So,rR=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];tR.f=function(e){return rR&&CCe(e)==="Window"?function(t){try{return nR(t)}catch(n){return ECe(rR)}}(e):nR(SCe(e))};var xCe=Fe(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),kCe=Fe,NCe=At,TCe=Ii,iR=xCe,xg=Object.isExtensible,ACe=kCe(function(){xg(1)})||iR?function(e){return!!NCe(e)&&(!iR||TCe(e)!=="ArrayBuffer")&&(!xg||xg(e))}:xg,OCe=!Fe(function(){return Object.isExtensible(Object.preventExtensions({}))}),ICe=pt,RCe=Ke,PCe=ch,LCe=At,C_=Yt,BCe=In.f,oR=Pa,DCe=tR,S_=ACe,MCe=OCe,sR=!1,Hi=eh("meta"),FCe=0,E_=function(e){BCe(e,Hi,{value:{objectID:"O"+FCe++,weakData:{}}})},$Ce=eR.exports={enable:function(){$Ce.enable=function(){},sR=!0;var e=oR.f,t=RCe([].splice),n={};n[Hi]=1,e(n).length&&(oR.f=function(r){for(var o=e(r),a=0,c=o.length;a<c;a++)if(o[a]===Hi){t(o,a,1);break}return o},ICe({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:DCe.f}))},fastKey:function(e,t){if(!LCe(e))return typeof e=="symbol"?e:(typeof e=="string"?"S":"P")+e;if(!C_(e,Hi)){if(!S_(e))return"F";if(!t)return"E";E_(e)}return e[Hi].objectID},getWeakData:function(e,t){if(!C_(e,Hi)){if(!S_(e))return!0;if(!t)return!1;E_(e)}return e[Hi].weakData},onFreeze:function(e){return MCe&&sR&&S_(e)&&!C_(e,Hi)&&E_(e),e}};PCe[Hi]=!0;var aR=eR.exports,zCe=pt,UCe=Ge,jCe=Ke,lR=bh,qCe=Rn,HCe=aR,GCe=Xp,WCe=Ss,KCe=ht,YCe=ms,x_=At,k_=Fe,JCe=xw,XCe=_o,QCe=Qp,cR=Ia,ZCe=Co,dR=ry,VCe=Pi,eSe=Ss,tSe=ms,nSe=Xp,rSe=H1,uR=_h,iSe=rw,Yd=wt,fR=aR.fastKey,hR=nn.set,N_=nn.getterFor,oSe={getConstructor:function(e,t,n,r){var o=e(function(u,f){eSe(u,a),hR(u,{type:t,index:cR(null),first:void 0,last:void 0,size:0}),Yd||(u.size=0),tSe(f)||nSe(f,u[r],{that:u,AS_ENTRIES:n})}),a=o.prototype,c=N_(t),l=function(u,f,p){var h,m,b=c(u),w=d(u,f);return w?w.value=p:(b.last=w={index:m=fR(f,!0),key:f,value:p,previous:h=b.last,next:void 0,removed:!1},b.first||(b.first=w),h&&(h.next=w),Yd?b.size++:u.size++,m!=="F"&&(b.index[m]=w)),u},d=function(u,f){var p,h=c(u),m=fR(f);if(m!=="F")return h.index[m];for(p=h.first;p;p=p.next)if(p.key===f)return p};return dR(a,{clear:function(){for(var u=c(this),f=u.first;f;)f.removed=!0,f.previous&&(f.previous=f.previous.next=void 0),f=f.next;u.first=u.last=void 0,u.index=cR(null),Yd?u.size=0:this.size=0},delete:function(u){var f=this,p=c(f),h=d(f,u);if(h){var m=h.next,b=h.previous;delete p.index[h.index],h.removed=!0,b&&(b.next=m),m&&(m.previous=b),p.first===h&&(p.first=m),p.last===h&&(p.last=b),Yd?p.size--:f.size--}return!!h},forEach:function(u){for(var f,p=c(this),h=VCe(u,arguments.length>1?arguments[1]:void 0);f=f?f.next:p.first;)for(h(f.value,f.key,this);f&&f.removed;)f=f.previous},has:function(u){return!!d(this,u)}}),dR(a,n?{get:function(u){var f=d(this,u);return f&&f.value},set:function(u,f){return l(this,u===0?0:u,f)}}:{add:function(u){return l(this,u=u===0?0:u,u)}}),Yd&&ZCe(a,"size",{configurable:!0,get:function(){return c(this).size}}),o},setStrong:function(e,t,n){var r=t+" Iterator",o=N_(t),a=N_(r);rSe(e,t,function(c,l){hR(this,{type:r,target:c,state:o(c),kind:l,last:void 0})},function(){for(var c=a(this),l=c.kind,d=c.last;d&&d.removed;)d=d.previous;return c.target&&(c.last=d=d?d.next:c.state.first)?uR(l==="keys"?d.key:l==="values"?d.value:[d.key,d.value],!1):(c.target=void 0,uR(void 0,!0))},n?"entries":"values",!n,!0),iSe(t)}},sSe=function(e,t,n){var r=e.indexOf("Map")!==-1,o=e.indexOf("Weak")!==-1,a=r?"set":"add",c=UCe[e],l=c&&c.prototype,d=c,u={},f=function(_){var C=jCe(l[_]);qCe(l,_,_==="add"?function(k){return C(this,k===0?0:k),this}:_==="delete"?function(k){return!(o&&!x_(k))&&C(this,k===0?0:k)}:_==="get"?function(k){return o&&!x_(k)?void 0:C(this,k===0?0:k)}:_==="has"?function(k){return!(o&&!x_(k))&&C(this,k===0?0:k)}:function(k,S){return C(this,k===0?0:k,S),this})};if(lR(e,!KCe(c)||!(o||l.forEach&&!k_(function(){new c().entries().next()}))))d=n.getConstructor(t,e,r,a),HCe.enable();else if(lR(e,!0)){var p=new d,h=p[a](o?{}:-0,1)!==p,m=k_(function(){p.has(1)}),b=JCe(function(_){new c(_)}),w=!o&&k_(function(){for(var _=new c,C=5;C--;)_[a](C,C);return!_.has(-0)});b||((d=t(function(_,C){WCe(_,l);var k=QCe(new c,_,d);return YCe(C)||GCe(C,k[a],{that:k,AS_ENTRIES:r}),k})).prototype=l,l.constructor=d),(m||w)&&(f("delete"),f("has"),r&&f("get")),(w||h)&&f(a),o&&l.clear&&delete l.clear}return u[e]=d,zCe({global:!0,constructor:!0,forced:d!==c},u),XCe(d,e),o||n.setStrong(d,e,r),d};sSe("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},oSe);var aSe=pt,pR=k1,lSe=ph,cSe=At,gR=Qc,dSe=Pn,uSe=Bi,fSe=V1,hSe=dt,pSe=So,gSe=Mh("slice"),mSe=hSe("species"),T_=Array,vSe=Math.max;aSe({target:"Array",proto:!0,forced:!gSe},{slice:function(e,t){var n,r,o,a=uSe(this),c=dSe(a),l=gR(e,c),d=gR(t===void 0?c:t,c);if(pR(a)&&(n=a.constructor,(lSe(n)&&(n===T_||pR(n.prototype))||cSe(n)&&(n=n[mSe])===null)&&(n=void 0),n===T_||n===void 0))return pSe(a,l,d);for(r=new(n===void 0?T_:n)(vSe(d-l,0)),o=0;l<d;l++,o++)l in a&&fSe(r,o,a[l]);return r.length=o,r}});var A_,ySe=pt,bSe=Jc,wSe=Ra.f,_Se=_s,mR=xr,CSe=tO,SSe=bo,ESe=nO,xSe=bSe("".slice),kSe=Math.min,vR=ESe("endsWith");ySe({target:"String",proto:!0,forced:!!(vR||(A_=wSe(String.prototype,"endsWith"),!A_||A_.writable))&&!vR},{endsWith:function(e){var t=mR(SSe(this));CSe(e);var n=arguments.length>1?arguments[1]:void 0,r=t.length,o=n===void 0?r:kSe(_Se(n),r),a=mR(e);return xSe(t,o-a.length,o)===a}});var kg,Jd,NSe=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Ng="js",Xd="resource",yR="unhandledrejection",Tg="cors",bR="vue",wR="react",_R={exports:{}},CR={exports:{}};kg="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Jd={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&Jd.rotl(e,8)|4278255360&Jd.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=Jd.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n<e.length;n++,r+=8)t[r>>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var t=[],n=0;n<e.length;n+=3)for(var r=e[n]<<16|e[n+1]<<8|e[n+2],o=0;o<4;o++)8*n+6*o<=8*e.length?t.push(kg.charAt(r>>>6*(3-o)&63)):t.push("=");return t.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],n=0,r=0;n<e.length;r=++n%4)r!=0&&t.push((kg.indexOf(e.charAt(n-1))&Math.pow(2,-2*r+8)-1)<<2*r|kg.indexOf(e.charAt(n))>>>6-2*r);return t}},CR.exports=Jd;var TSe=CR.exports,O_={utf8:{stringToBytes:function(e){return O_.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(O_.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}},SR=O_,ASe=function(e){return e!=null&&(ER(e)||function(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&ER(t.slice(0,0))}(e)||!!e._isBuffer)};function ER(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}(function(){var e=TSe,t=SR.utf8,n=ASe,r=SR.bin,o=function(a,c){a.constructor==String?a=c&&c.encoding==="binary"?r.stringToBytes(a):t.stringToBytes(a):n(a)?a=Array.prototype.slice.call(a,0):Array.isArray(a)||a.constructor===Uint8Array||(a=a.toString());for(var l=e.bytesToWords(a),d=8*a.length,u=1732584193,f=-271733879,p=-1732584194,h=271733878,m=0;m<l.length;m++)l[m]=16711935&(l[m]<<8|l[m]>>>24)|4278255360&(l[m]<<24|l[m]>>>8);l[d>>>5]|=128<<d%32,l[14+(d+64>>>9<<4)]=d;var b=o._ff,w=o._gg,_=o._hh,C=o._ii;for(m=0;m<l.length;m+=16){var k=u,S=f,E=p,T=h;u=b(u,f,p,h,l[m+0],7,-680876936),h=b(h,u,f,p,l[m+1],12,-389564586),p=b(p,h,u,f,l[m+2],17,606105819),f=b(f,p,h,u,l[m+3],22,-1044525330),u=b(u,f,p,h,l[m+4],7,-176418897),h=b(h,u,f,p,l[m+5],12,1200080426),p=b(p,h,u,f,l[m+6],17,-1473231341),f=b(f,p,h,u,l[m+7],22,-45705983),u=b(u,f,p,h,l[m+8],7,1770035416),h=b(h,u,f,p,l[m+9],12,-1958414417),p=b(p,h,u,f,l[m+10],17,-42063),f=b(f,p,h,u,l[m+11],22,-1990404162),u=b(u,f,p,h,l[m+12],7,1804603682),h=b(h,u,f,p,l[m+13],12,-40341101),p=b(p,h,u,f,l[m+14],17,-1502002290),u=w(u,f=b(f,p,h,u,l[m+15],22,1236535329),p,h,l[m+1],5,-165796510),h=w(h,u,f,p,l[m+6],9,-1069501632),p=w(p,h,u,f,l[m+11],14,643717713),f=w(f,p,h,u,l[m+0],20,-373897302),u=w(u,f,p,h,l[m+5],5,-701558691),h=w(h,u,f,p,l[m+10],9,38016083),p=w(p,h,u,f,l[m+15],14,-660478335),f=w(f,p,h,u,l[m+4],20,-405537848),u=w(u,f,p,h,l[m+9],5,568446438),h=w(h,u,f,p,l[m+14],9,-1019803690),p=w(p,h,u,f,l[m+3],14,-187363961),f=w(f,p,h,u,l[m+8],20,1163531501),u=w(u,f,p,h,l[m+13],5,-1444681467),h=w(h,u,f,p,l[m+2],9,-51403784),p=w(p,h,u,f,l[m+7],14,1735328473),u=_(u,f=w(f,p,h,u,l[m+12],20,-1926607734),p,h,l[m+5],4,-378558),h=_(h,u,f,p,l[m+8],11,-2022574463),p=_(p,h,u,f,l[m+11],16,1839030562),f=_(f,p,h,u,l[m+14],23,-35309556),u=_(u,f,p,h,l[m+1],4,-1530992060),h=_(h,u,f,p,l[m+4],11,1272893353),p=_(p,h,u,f,l[m+7],16,-155497632),f=_(f,p,h,u,l[m+10],23,-1094730640),u=_(u,f,p,h,l[m+13],4,681279174),h=_(h,u,f,p,l[m+0],11,-358537222),p=_(p,h,u,f,l[m+3],16,-722521979),f=_(f,p,h,u,l[m+6],23,76029189),u=_(u,f,p,h,l[m+9],4,-640364487),h=_(h,u,f,p,l[m+12],11,-421815835),p=_(p,h,u,f,l[m+15],16,530742520),u=C(u,f=_(f,p,h,u,l[m+2],23,-995338651),p,h,l[m+0],6,-198630844),h=C(h,u,f,p,l[m+7],10,1126891415),p=C(p,h,u,f,l[m+14],15,-1416354905),f=C(f,p,h,u,l[m+5],21,-57434055),u=C(u,f,p,h,l[m+12],6,1700485571),h=C(h,u,f,p,l[m+3],10,-1894986606),p=C(p,h,u,f,l[m+10],15,-1051523),f=C(f,p,h,u,l[m+1],21,-2054922799),u=C(u,f,p,h,l[m+8],6,1873313359),h=C(h,u,f,p,l[m+15],10,-30611744),p=C(p,h,u,f,l[m+6],15,-1560198380),f=C(f,p,h,u,l[m+13],21,1309151649),u=C(u,f,p,h,l[m+4],6,-145523070),h=C(h,u,f,p,l[m+11],10,-1120210379),p=C(p,h,u,f,l[m+2],15,718787259),f=C(f,p,h,u,l[m+9],21,-343485551),u=u+k>>>0,f=f+S>>>0,p=p+E>>>0,h=h+T>>>0}return e.endian([u,f,p,h])};o._ff=function(a,c,l,d,u,f,p){var h=a+(c&l|~c&d)+(u>>>0)+p;return(h<<f|h>>>32-f)+c},o._gg=function(a,c,l,d,u,f,p){var h=a+(c&d|l&~d)+(u>>>0)+p;return(h<<f|h>>>32-f)+c},o._hh=function(a,c,l,d,u,f,p){var h=a+(c^l^d)+(u>>>0)+p;return(h<<f|h>>>32-f)+c},o._ii=function(a,c,l,d,u,f,p){var h=a+(l^(c|~d))+(u>>>0)+p;return(h<<f|h>>>32-f)+c},o._blocksize=16,o._digestsize=16,_R.exports=function(a,c){if(a==null)throw new Error("Illegal argument "+a);var l=e.wordsToBytes(o(a,c));return c&&c.asBytes?l:c&&c.asString?r.bytesToString(l):e.bytesToHex(l)}})();var OSe=Cse(_R.exports);function ISe(e){var t=e.match(NSe);return t?{filename:t[2],functionName:t[1]||"",lineno:parseInt(t[3],10)||void 0,colno:parseInt(t[4],10)||void 0}:{}}function Ag(e){var t=(e||{stack:""}).stack;if(!t)return[];var n,r=[],o=Jv(t.split(`
144
- `).slice(1));try{for(o.s();!(n=o.n()).done;){var a=ISe(n.value);a&&r.push(a)}}catch(c){o.e(c)}finally{o.f()}return r.slice(0,10)}var Bl=function(e){return OSe(e).toString()},I_=function(e){return e instanceof ErrorEvent?e.message==="Script error."?Tg:Ng:Xd},RSe=function(){function e(t){Kf(this,e),Ai(this,"errorIdSet",new Set),this.webCoreIns=t,this.errorIdSet=new Set}return Yf(e,[{key:"init",value:function(){var t;if(this.initJsError(),this.initResourceError(),this.initPromiseError(),this.initCorsError(),(t=window.__QAPM__)!==null&&t!==void 0&&(t=t.q)!==null&&t!==void 0&&t.length){var n={error:this.onJSError.bind(this),reject:this.onPromiseError.bind(this)};window.__QAPM__.q.forEach(function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=r.type,a=r.event,c=n[o];c&&c(a)}),window.__QAPM__.q=[]}}},{key:"initJsError",value:function(){var t=this;window.addEventListener("error",function(n){return t.onJSError(n)},!0)}},{key:"initResourceError",value:function(){var t=this;window.addEventListener("error",function(n){return t.onResourceError(n)},!0)}},{key:"initPromiseError",value:function(){var t=this;window.addEventListener("unhandledrejection",function(n){return t.onPromiseError(n)},!0)}},{key:"initCorsError",value:function(){var t=this;window.addEventListener("error",function(n){return function(r){if(I_(r)===Tg){var o={errorType:Tg,errorMessage:r.message,errorSummary:"CorsError",errorId:Bl("".concat(Tg,"-").concat(r.message))};t.commit(o)}}(n)},!0)}},{key:"onResourceError",value:function(t){if(I_(t)===Xd){var n=t.target||t.srcElement,r=n.src||n.href,o=JSON.stringify(Xd+": "+r||"UnKnown Resource"),a={errorType:Xd,errorMessage:o,errorSummary:"ResourceError",errorId:Bl("".concat(Xd,"-").concat(o))};this.commit(a)}}},{key:"onJSError",value:function(t){var n,r;if(I_(t)===Ng){var o=JSON.stringify(t.message),a=function(l){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"unknown";if(!l)return d;try{var u=new URL(l);return u.pathname&&u.pathname.endsWith(".js")?l:d}catch(f){return l}}(t.filename,(n=this.webCoreIns.config)===null||n===void 0?void 0:n.appKey),c={errorType:Ng,errorMessage:o,errorSummary:t.error&&((r=t.error)===null||r===void 0?void 0:r.name)||"UnKnown",errorStack:JSON.stringify(Ag(t.error)),errorId:Bl("".concat(Ng,"-").concat(o,"-").concat(a))};this.commit(c)}}},{key:"onPromiseError",value:function(t){var n,r,o=JSON.stringify(((n=t.reason)===null||n===void 0?void 0:n.message)||t.reason||"UnKnown"),a=((r=t.reason)===null||r===void 0?void 0:r.name)||"UnKnown",c={errorType:yR,errorMessage:o,errorSummary:a,errorStack:JSON.stringify(Ag(t.reason)),errorId:Bl("".concat(yR,"-").concat(o,"-").concat(a))};this.commit(c)}},{key:"onVueError",value:function(t,n,r){var o=JSON.stringify(t.message),a={errorType:bR,errorMessage:o,errorSummary:t.name||"UnKnown",errorStack:JSON.stringify(Ag(t)),errorId:Bl("".concat(bR,"-").concat(o,"-").concat(t.name))};this.commit(a)}},{key:"onReactError",value:function(t,n){var r=JSON.stringify(t.message),o={errorType:wR,errorMessage:r,errorSummary:t.name||"UnKnown",errorStack:JSON.stringify(Ag(t)),errorId:Bl("".concat(wR,"-").concat(r,"-").concat(t.name))};console.log(o),this.commit(o)}},{key:"commit",value:function(t){var n=t.errorId;this.errorIdSet.has(n)||(this.errorIdSet.add(n),this.webCoreIns.commit(qc({type:"error"},t)))}}]),e}(),PSe=function(e){function t(){var o,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Kf(this,t),(o=wse(this,t,[a])).config=a,o.isReport()?(o.PerformancePluginInstance=new V3e(Gc(o)),o.WhiteScreenPluginInstance=new _Ce(Gc(o)),o.ErrorPluginInstance=new RSe(Gc(o)),o.plugins=[o.PerformancePluginInstance,o.WhiteScreenPluginInstance,o.ErrorPluginInstance],o.init(),jS(t,t,Dl,Gc(o)),o):$S(o)}var n,r;return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),a&&Yv(o,a)}(t,bwe),Yf(t,[{key:"isReport",value:function(){var o=this.isIE(),a=this.calcRatio();return this.config.appKey&&a&&!o}},{key:"init",value:(r=Hc(Cr().mark(function o(){return Cr().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:this.initTime(this.mixed()),this.plugins.forEach(function(c){c.init()});case 2:case"end":return a.stop()}},o,this)})),function(){return r.apply(this,arguments)})},{key:"mixed",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=this.uid(),c=this.getTime(),l=c.time,d=c.date,u=this.getUA(),f=window.location,p=f.host,h=f.origin,m=f.pathname;return qc(qc({uid:a,sid:this.sid,url:window.location.href,host:p,fullPath:h+m,sdkVersion:this.sdkVersion,createDate:d,appKey:this.config.appKey,createTime:l,appVersion:this.appVersion,env:this.env},u),o)}},{key:"commit",value:(n=Hc(Cr().mark(function o(a){var c,l;return Cr().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:c=this.mixed(a),l=new URL("".concat(window.location.protocol,"//").concat(this.host,"/log.gif")),Object.entries(c).map(function(u){var f=_se(u,2),p=f[0],h=f[1];l.searchParams.set(p,h)}),new Image().src=l.toString();case 5:case"end":return d.stop()}},o,this)})),function(o){return n.apply(this,arguments)})}],[{key:"install",value:function(o){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Xf(t,t,Dl)||(o.config.errorHandler=function(c,l,d){Xf(t,t,Dl).ErrorPluginInstance.onVueError(c,l,d),console.error(c)},jS(t,t,Dl,new t(a)))}},{key:"sendError",value:function(o){Xf(t,t,Dl)?Xf(t,t,Dl).ErrorPluginInstance.onReactError(o):console.error("QAPM: 请先初始化 QAPM!")}}]),t}(),Dl={writable:!0,value:null};const CNe="",SNe="",LSe={components:{InfoFilled:Pm,ArrowRight:Im},mixins:[jr],inject:["hasLevel"],props:{axis:{required:!0,type:Object,default:()=>({x:0,y:0})},show:{required:!0,type:Boolean,default:!1},nodeInfo:{required:!0,type:Array,default:()=>[]},menuOptions:{required:!0,type:Array,default:()=>[]},border:{type:Boolean,required:!1,default:!0},itemWidth:{type:Number,required:!1,default:206},itemHeight:{type:Number,required:!1,default:36},itemSize:{type:Number,required:!1,default:14},offset:{type:Object,required:!1,default:()=>({x:6,y:2})},borderWidth:{type:Number,required:!1,default:6},history:{type:Object,required:!0,default:()=>{}},moduleDetail:{type:Object,required:!0,default:()=>{}}},emits:["contextmenu-click"],data(){return{checkedItems:{},globalMenus:JZ,maxMulti:6}},computed:{checkboxMenu(){return this.nodeInfo.length>1?[]:this.menuOptions},canGoDetail(){var e,t,n,r;return((t=(e=this.moduleDetail)==null?void 0:e.config)==null?void 0:t.jumpDetail)&&((r=this.moduleDetail)==null?void 0:r.config.jumpRule[(n=this.nodeInfo[0])==null?void 0:n.type])},systemMenu(){var r,o,a,c,l,d,u;const e=[];if(this.nodeInfo.length===1){const f=this.nodeInfo[0];f.type!=="aggregation"&&f.type!=="nodeType"&&(e.push(iv),(r=this.history.keyNodeIds)!=null&&r.some(_=>_===f.id)||(e.push(av),(a=(o=this.moduleDetail)==null?void 0:o.config)!=null&&a.hideCollectMenu||e.push(f.collect?sv:ov),e.push(f.textProp==="name"?tv:ev),f.label&&e.push(f.textProp==="label"?nv:rv)),this.canGoDetail&&e.push(K5)),e.push(f.fx?V0:Z0);const p=this.history.dataNow.links.some(w=>w.source.id===f.id&&w.target.type==="aggregation"),b=this.history.dataNow.links.filter(w=>w.source.id===f.id).map(w=>w.target).some(w=>{let _=0;return this.history.dataNow.links.map(C=>{C.source.id===w.id&&_++}),_===0});p||f.type==="aggregation"?e.push(H5):b&&e.push(q5),b&&e.push(j5),e.push(lv)}else this.nodeInfo.length>1?(e.push(av,iv),e.push(this.nodeInfo.some(p=>!p.collect)?ov:sv),this.nodeInfo.some(p=>p.label)&&e.push(this.nodeInfo.some(p=>p.textProp!=="label")?rv:nv),e.push(this.nodeInfo.some(p=>p.textProp!=="name")?ev:tv),e.push(this.nodeInfo.some(p=>!p.fx)?Z0:V0),e.push(lv)):this.nodeInfo.length===0&&(this.history.dataNow.nodes.some(p=>p.label)&&e.push(this.history.dataNow.nodes.some(p=>p.textProp!=="label")?$5:F5),e.push(this.history.dataNow.nodes.some(p=>p.textProp!=="name")?D5:M5),e.push(this.history.dataNow.nodes.some(p=>!p.fx)?L5:B5),this.history.currentIndex>0&&e.push(z5),this.history.currentIndex<this.history.length-1&&e.push(U5));const t=(c=this.nodeInfo[0])==null?void 0:c.type,n=(u=(d=(l=this.nodeInfo[0])==null?void 0:l.detail)==null?void 0:d.info)==null?void 0:u.extraNodeContextMenus;return t!=="nodeType"&&(n!=null&&n.length)&&(n.forEach(f=>{f.icon||(f.icon="button_edit_label")}),e.push(...n)),e},totalHeight(){let e=this.menuOptions.length*(this.itemHeight+5)+10+44+48+5,t=this.systemMenu.length*(this.itemHeight+5)+10+44+5;return e=this.menuOptions.length===0?0:44,t=this.systemMenu.length===0?0:44,e+t},axisComputed(){const e=document.getElementsByClassName("d3-container")[0],t=this.axis.top-e.offsetTop;return{top:(t<e.offsetHeight/2?Math.min(t+this.offset.y,Math.max(e.offsetHeight-this.totalHeight,e.getBoundingClientRect().top)):Math.max(t+this.offset.y,this.totalHeight+e.getBoundingClientRect().top))+"px",left:this.axis.left+this.offset.x+"px",transform:`translate(${this.axis.left>e.offsetWidth/2?"-100%":"0%"}, ${t>e.offsetHeight/2?"-100%":"0%"})`}},liStyle(){return{width:this.itemWidth+"px",height:this.itemHeight+"px",lineHeight:this.itemHeight+"px",fontSize:this.itemSize+"px"}},firstLeft(){const e=document.body.offsetWidth;return this.axis.left+this.itemWidth*2>=e},secondLeft(){const e=document.body.offsetWidth;return this.axis.left+this.itemWidth*3>=e},checkedItemsFinal(){return Object.keys(this.checkedItems).filter(e=>this.checkedItems[e]).map(e=>this.checkedItems[e])},haveInterface(){let e=!1;return this.menuOptions.map(t=>{t.type===1&&(e=!0)}),e}},watch:{show(){this.checkedItems={}}},methods:{handleCollapse(){},isSystemItem(e){return e.type===2},isExternalItem(e){return e.type===3},hasChildren(e){var t;return((t=e==null?void 0:e.children)==null?void 0:t.length)>0},onCheck(e,t){this.checkedItems[t.name]=e.currentTarget.checked?t:!1},secondBorderCheck(e,t=0){const n=document.body.offsetWidth,r=document.body.offsetHeight,o=this.axis.top+(e+t)*this.itemHeight;return{width:this.itemWidth*2+60+"px",left:this.axis.left+this.itemWidth*2>=n?"-100%":"100%",top:r>=o?0:"auto",bottom:r<o?0:"auto"}},thirdBorderCheck(e,t,n,r){const o=document.body.offsetWidth,a=document.body.offsetHeight,c=this.secondBorderCheck(e,n).top;let l;const d=(t+r)*this.itemHeight,u=d>180?180:d;return c===0?l=this.axis.top+e*this.itemHeight+u:l=this.axis.top-e*this.itemHeight+u,{left:this.axis.left+this.itemWidth*3>=o?"-100%":"100%",bottom:a>=l?0:"auto",top:a<l?0:"auto"}},handleClick(e,t){if(!t){if(en({cId:"contextMenu-"+e.name,c:"右键菜单-"+e.namec}),e.has_child>0)return!1;ye(this,"contextmenu-click",{nodes:this.nodeInfo,api:e})}},handleDataClick(e,t){en({cId:"contextMenu-"+e.name,c:"右键菜单-"+e.namec}),ye(this,"contextmenu-click",{nodes:this.nodeInfo,api:t,dataApi:e}),this.checkedItems={}}}},Ml=e=>(s.pushScopeId("data-v-dd8dd8d0"),e=e(),s.popScopeId(),e),BSe={"aria-hidden":"true",style:{position:"absolute",width:"0",height:"0",overflow:"hidden",display:"none"}},DSe=[Ml(()=>s.createElementVNode("symbol",{id:"icon-arrow-right",viewBox:"0 0 1024 1024"},[s.createElementVNode("path",{d:"M288.791335 65.582671l446.41733 446.417329-446.41733 446.417329z"})],-1))],MSe={class:"cm-list"},FSe={class:"cm-ul"},$Se={class:"hd"},zSe=["src"],USe={class:"bd"},jSe={class:"cm-ul cm-ul-level1"},qSe=["title"],HSe=Ml(()=>s.createElementVNode("svg",{class:"icon","aria-hidden":"true"},[s.createElementVNode("use",{"xlink:href":"#icon-arrow-right"})],-1)),GSe=["title","onClick"],WSe=["title","onClick"],KSe={key:0,class:"icon","aria-hidden":"true"},YSe=[Ml(()=>s.createElementVNode("use",{"xlink:href":"#icon-arrow-right"},null,-1))],JSe=["title","onClick"],XSe=["src"],QSe=Ml(()=>s.createElementVNode("div",{class:"bd"},null,-1)),ZSe=["title","onClick"],VSe={key:0,class:"fas el-icon-fa-cog"},e9e={key:1,class:"fas el-icon-fa-external-link-alt"},t9e={class:"text-wrapper"},n9e=["src"],r9e=["src"],i9e={key:3,class:"shortcut"},o9e={key:2,class:"icon","aria-hidden":"true"},s9e=[Ml(()=>s.createElementVNode("use",{"xlink:href":"#icon-arrow-right"},null,-1))],a9e=["title","onClick"],l9e={key:1,class:"icon","aria-hidden":"true"},c9e=[Ml(()=>s.createElementVNode("use",{"xlink:href":"#icon-arrow-right"},null,-1))],d9e=["title","onClick"];function u9e(e,t,n,r,o,a){const c=s.resolveComponent("ArrowRight"),l=Qe,d=s.resolveComponent("InfoFilled"),u=Hn;return n.show?(s.openBlock(),s.createElementBlock("div",{key:0,class:"cm-container",style:s.normalizeStyle(a.axisComputed),onClick:t[1]||(t[1]=s.withModifiers((...f)=>a.handleCollapse&&a.handleCollapse(...f),["stop"]))},[(s.openBlock(),s.createElementBlock("svg",BSe,DSe)),s.createElementVNode("div",MSe,[s.createElementVNode("ul",FSe,[a.checkboxMenu.length>0?(s.openBlock(),s.createElementBlock("li",{key:0,class:"cm-li data-opt-wrapper",style:s.normalizeStyle(a.liStyle)},[s.createElementVNode("div",$Se,[s.createElementVNode("img",{src:e.imgPath["./public/d3svg1/button18/button_relation.svg"],style:{"margin-right":"10px"}},null,8,zSe),s.createTextVNode("按关系分类拓线"),s.createVNode(l,null,{default:s.withCtx(()=>[s.createVNode(c)]),_:1})]),s.createElementVNode("div",USe,[s.createElementVNode("ul",jSe,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.checkboxMenu,(f,p)=>(s.openBlock(),s.createElementBlock("li",{key:p,class:"cm-li context-one",style:s.normalizeStyle(a.liStyle)},[a.hasChildren(f)?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["cm-item",a.firstLeft?"cm-left":""]),title:f.namec},[s.createElementVNode("span",null,s.toDisplayString(f.namec),1),HSe],10,qSe)):(s.openBlock(),s.createElementBlock("div",{key:1,class:s.normalizeClass(["cm-item",a.firstLeft?"cm-left":""]),title:f.namec,onClick:s.withModifiers(h=>a.handleDataClick(f,o.globalMenus.expandPartNode),["stop"])},[s.createElementVNode("span",null,s.toDisplayString(f.namec),1)],10,GSe)),a.hasChildren(f)?(s.openBlock(),s.createElementBlock("ul",{key:2,class:"cm-ul cm-ul-level2",style:s.normalizeStyle(a.secondBorderCheck(p,f.children.length))},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(f.children,(h,m)=>(s.openBlock(),s.createElementBlock("li",{key:m,class:"cm-li",style:s.normalizeStyle(a.liStyle)},[s.createElementVNode("div",{class:s.normalizeClass(["cm-item",a.secondLeft?"cm-left":""]),title:h.namec,onClick:s.withModifiers(b=>a.handleDataClick(h,o.globalMenus.expandPartNode),["stop"])},[s.createElementVNode("span",null,s.toDisplayString(h.namec),1),a.hasChildren(h)?(s.openBlock(),s.createElementBlock("svg",KSe,YSe)):s.createCommentVNode("",!0)],10,WSe),a.hasChildren(h)?(s.openBlock(),s.createElementBlock("ul",{key:0,class:"cm-ul cm-ul-level3",style:s.normalizeStyle(a.thirdBorderCheck(p,m,f.children.length,h.children.length))},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(h.children,(b,w)=>(s.openBlock(),s.createElementBlock("li",{key:w,class:"cm-li",style:s.normalizeStyle(a.liStyle)},[s.createElementVNode("div",{class:"cm-item",title:b.namec,onClick:s.withModifiers(_=>a.handleDataClick(b,o.globalMenus.expandPartNode),["stop"])},[s.createElementVNode("span",null,s.toDisplayString(b.namec),1)],8,JSe)],4))),128))],4)):s.createCommentVNode("",!0)],4))),128))],4)):s.createCommentVNode("",!0)],4))),128))])])],4)):n.nodeInfo.length>1&&n.nodeInfo.length<o.maxMulti?(s.openBlock(),s.createElementBlock("li",{key:1,class:"cm-li data-opt-wrapper data-opt-all",style:s.normalizeStyle(a.liStyle)},[s.createElementVNode("div",{class:"hd",onClick:t[0]||(t[0]=s.withModifiers(f=>a.handleDataClick(null,o.globalMenus.expandNode),["stop"]))},[s.createElementVNode("img",{src:e.imgPath["./public/d3svg1/button18/button_relation.svg"],style:{"margin-right":"10px"}},null,8,XSe),s.createTextVNode("展开全部关系 ")]),QSe],4)):s.createCommentVNode("",!0),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.systemMenu,(f,p)=>(s.openBlock(),s.createElementBlock("li",{key:p,class:"cm-li",style:s.normalizeStyle(a.liStyle)},[s.createElementVNode("div",{class:s.normalizeClass(["cm-item",{"cm-left":a.firstLeft,disabled:f.disabled}]),title:f.namec,onClick:s.withModifiers(h=>a.handleClick(f,f.disabled),["stop"])},[a.isSystemItem(f)?(s.openBlock(),s.createElementBlock("i",VSe)):a.isExternalItem(f)?(s.openBlock(),s.createElementBlock("i",e9e)):s.createCommentVNode("",!0),s.createElementVNode("div",t9e,[f.icon?(s.openBlock(),s.createElementBlock("img",{key:0,src:e.imgPath["./public/d3svg1/button18/"+f.icon+".svg"],class:"t-icon"},null,8,n9e)):(s.openBlock(),s.createElementBlock("img",{key:1,src:e.imgPath["./public/d3svg1/button18/button_"+f.name+".svg"],class:"t-icon"},null,8,r9e)),f.tooltip?(s.openBlock(),s.createBlock(u,{key:2,class:"el-icon-info",effect:"dark",content:f.tooltip,placement:"top-start"},{default:s.withCtx(()=>[s.createVNode(l,null,{default:s.withCtx(()=>[s.createVNode(d)]),_:1})]),_:2},1032,["content"])):s.createCommentVNode("",!0),s.createElementVNode("span",null,s.toDisplayString(f.namec),1),f.shortcut?(s.openBlock(),s.createElementBlock("span",i9e,s.toDisplayString(f.shortcut),1)):s.createCommentVNode("",!0)]),a.hasChildren(f)?(s.openBlock(),s.createElementBlock("svg",o9e,s9e)):s.createCommentVNode("",!0)],10,ZSe),a.hasChildren(f)?(s.openBlock(),s.createElementBlock("ul",{key:0,class:"cm-ul cm-ul-level2",style:s.normalizeStyle(a.secondBorderCheck(p,f.children.length))},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(f.children,(h,m)=>(s.openBlock(),s.createElementBlock("li",{key:m,class:"cm-li",style:s.normalizeStyle(a.liStyle)},[s.createElementVNode("div",{class:s.normalizeClass(["cm-item",{"cm-left":a.secondLeft,disabled:f.disabled||h.disabled}]),title:h.namec,onClick:s.withModifiers(b=>a.handleClick(h,f.disabled||h.disabled),["stop"])},[h.tooltip?(s.openBlock(),s.createBlock(u,{key:0,class:"el-icon-info",effect:"dark",content:h.tooltip,placement:"top-start"},{default:s.withCtx(()=>[s.createVNode(l,null,{default:s.withCtx(()=>[s.createVNode(d)]),_:1})]),_:2},1032,["content"])):s.createCommentVNode("",!0),s.createElementVNode("span",null,s.toDisplayString(h.namec),1),a.hasChildren(h)?(s.openBlock(),s.createElementBlock("svg",l9e,c9e)):s.createCommentVNode("",!0)],10,a9e),a.hasChildren(h)?(s.openBlock(),s.createElementBlock("ul",{key:0,class:"cm-ul cm-ul-level3",style:s.normalizeStyle(a.thirdBorderCheck(p,m,f.children.length,h.children.length))},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(h.children,(b,w)=>(s.openBlock(),s.createElementBlock("li",{key:w,class:"cm-li",style:s.normalizeStyle(a.liStyle)},[s.createElementVNode("div",{class:s.normalizeClass(["cm-item",{disabled:f.disabled||h.disabled||b.disabled}]),title:b.namec,onClick:s.withModifiers(_=>a.handleClick(b,f.disabled||h.disabled||b.disabled),["stop"])},[b.tooltip?(s.openBlock(),s.createBlock(u,{key:0,class:"el-icon-info",effect:"dark",content:b.tooltip,placement:"top-start"},{default:s.withCtx(()=>[s.createVNode(l,null,{default:s.withCtx(()=>[s.createVNode(d)]),_:1})]),_:2},1032,["content"])):s.createCommentVNode("",!0),s.createElementVNode("span",null,s.toDisplayString(b.namec),1)],10,d9e)],4))),128))],4)):s.createCommentVNode("",!0)],4))),128))],4)):s.createCommentVNode("",!0)],4))),128))])])],4)):s.createCommentVNode("",!0)}const f9e=Bt(LSe,[["render",u9e],["__scopeId","data-v-dd8dd8d0"]]),TNe="",ANe="",ONe="",INe="",h9e={name:"Popover",components:{ForceGraphSvgIcon:ss},mixins:[jr],inject:["levelList","hasLevel"],props:{showPopover:{type:Boolean,default:!1},mousePosition:{type:Object,default:()=>({left:0,top:0})},nodeInfo:{type:Object,default:()=>{}},type:{type:String,default:"node"},moduleDetail:{type:Object,default:()=>{}},data:{type:Object,default:()=>{}},darkMode:{type:Boolean,default:!0},history:{type:Object,default:()=>({})}},data(){return{showSelf:!1,onPop:!1,position:null,aggregationList:[]}},computed:{show(){return this.showPopover||this.showSelf},name(){var e,t,n;return((n=(t=(e=this.nodeInfo)==null?void 0:e.detail)==null?void 0:t.info)==null?void 0:n.name)||this.nodeInfo.name},isNormalNode(){return this.nodeInfo.type!=="nodeType"&&this.nodeInfo.type!=="aggregation"},isNodeTypeNode(){return this.nodeInfo.type==="nodeType"},isAggregateNode(){return this.nodeInfo.type==="aggregation"},fieldMapThisType(){var e;return this.moduleDetail.detail_field_map&&this.moduleDetail.detail_field_map[`${(e=this.nodeInfo)==null?void 0:e.type}_detail_info`]},canGoDetail(){return["nodeType","aggregation","family","org","report","vul","thumbprint_md5","email","cert_https"].indexOf(this.nodeInfo.type)<0}},watch:{mousePosition(){setTimeout(()=>{var l,d,u;const e=this.mousePosition.left>document.body.offsetWidth/2,t=this.mousePosition.top>document.body.offsetHeight/2,n=(l=document.getElementsByClassName("popover-container")[0])==null?void 0:l.offsetHeight,r=(d=document.getElementsByClassName("d3-container")[0])==null?void 0:d.offsetHeight,o=(u=document.getElementsByClassName("d3-container")[0])==null?void 0:u.getBoundingClientRect().top;let a;t?a=Math.max(this.mousePosition.top,n+o)+5:a=Math.min(this.mousePosition.top,Math.max(r-n,o))-5;const c={left:(e?this.mousePosition.left+2:this.mousePosition.right-2)+"px",top:a+"px",transform:`translate(${e?"-100%":"0%"}, ${t?"-100%":"0%"})`};this.position=c},100)},nodeInfo:{handler:function(){var t;const e=(((t=this.nodeInfo)==null?void 0:t.list)||[]).map(n=>{var o,a,c;const r=n.detail;return ue(ae({},n),{name:((o=r==null?void 0:r.info)==null?void 0:o.name)||n.name,level:((c=(a=r==null?void 0:r.info)==null?void 0:a.basic)==null?void 0:c.level)||""})});e==null||e.sort((n,r)=>{var c,l;const o=(c=this.levelList.find(d=>d.level===n.level))==null?void 0:c.dangerNumber;return((l=this.levelList.find(d=>d.level===r.level))==null?void 0:l.dangerNumber)-o}),this.aggregationList=e},immediate:!0}},methods:{handleMouseEnter(){this.showSelf=!0},handleMouseLeave(){this.showSelf=!1},isSomething(e){return j0(e)},getTypeZh(e){var n,r,o;let t=e;if(e==="nodeType")t="关系节点";else for(const a in(n=this.moduleDetail)==null?void 0:n.nodes)if(e===((r=this.moduleDetail)==null?void 0:r.nodes[a].name)){t=(o=this.moduleDetail)==null?void 0:o.nodes[a].namec;break}return t},getLevelClass(e){return of(e,this.levelList)},getColorStyle(e){return as(e,this.levelList,this.darkMode)},getNodeTypeChildNum(e){var o;const t=(o=this.data)==null?void 0:o.links,n=[],r=[];return t==null||t.map(a=>{a.source.id===e&&(n.push(a.target.id),a.target.detail&&UQ(a.target.detail.info.basic.level,this.levelList)&&r.push(a.target.id))}),{allChildNum:n.length,dangerChildNum:r.length}},canShowField(e){const t=this.hasFieldValue(e);return!(t===void 0||e.hide_hover||e.hide_empty&&!t)},hasFieldValue(e){const t=this.nodeInfo.detail&&this.nodeInfo.detail.info&&this.nodeInfo.detail.info.basic[e.prop];if(t===null)return;const n=Array.isArray(t);return n&&t.length>0||!n&&t!==""&&t!=="无"},getFieldValue(e){const t=this.nodeInfo.detail.info.basic[e.prop],n=Array.isArray(t),r=this.isSomething(t);let o="-";return r&&(n?o=t.length?t.join("|"):"-":o=t||"-"),o},formatTags(e){return cf(df(e))},addToGraph(e){const t={type:"addFromAggregation",addOne:{nodes:[e],links:[{source:this.nodeInfo.relationId,target:e.id}]}};if(this.aggregationList=this.aggregationList.filter(n=>n.id!==e.id),this.history.updateAggregationNode(this.aggregationList,this.nodeInfo.id),this.history.pushState(t),this.aggregationList.length)ye(qe,"emitDataLoaded");else{const n=this.nodeInfo,r={deleteOne:{nodes:[n],links:[{source:n.relationId,target:n.id}]},type:"aggregation"};setTimeout(()=>{this.history.pushState(r),ye(qe,"emitDataLoaded")},0)}}}},Fl=e=>(s.pushScopeId("data-v-a8e278b3"),e=e(),s.popScopeId(),e),p9e={key:0,class:"node-info-container"},g9e={class:"popover-block popover-header"},m9e={key:0,class:"popover-collect"},v9e={key:1,class:"row-item"},y9e={class:"label"},b9e={key:2,class:"row-item"},w9e=Fl(()=>s.createElementVNode("div",{class:"label"},"关系节点:",-1)),_9e={class:"value"},C9e={class:"node-type-info"},S9e={class:"name"},E9e={key:3,class:"row-item"},x9e=Fl(()=>s.createElementVNode("div",{class:"label"},"备注:",-1)),k9e={class:"value"},N9e={class:"popover-block popover-fields"},T9e={key:0,class:"node-detail top-border"},A9e={key:0,class:"row-item"},O9e=Fl(()=>s.createElementVNode("div",{class:"label"},"危险级别:",-1)),I9e=["title"],R9e={key:1,class:"row-item row-item-tag"},P9e=Fl(()=>s.createElementVNode("div",{class:"label"},"标签:",-1)),L9e={class:"value"},B9e={class:"graph-tags-box"},D9e=Fl(()=>s.createElementVNode("br",null,null,-1)),M9e={key:0,class:"row-item"},F9e={class:"label"},$9e=["title"],z9e={key:1,class:"node-statistics top-border"},U9e={class:"row-item node-num"},j9e=Fl(()=>s.createElementVNode("div",{class:"label"},"拓展节点统计:",-1)),q9e={class:"value"},H9e={key:0},G9e={class:"danger"},W9e={key:2,class:"node-aggregation"},K9e={class:"aggregation-title"},Y9e={class:"aggregation-box"},J9e={key:1,class:"node-info-container"},X9e={class:"popover-fields"},Q9e={class:"top"};function Z9e(e,t,n,r,o,a){const c=s.resolveComponent("force-graph-svg-icon"),l=Hn,d=xc,u=CX,f=ns,p=_X;return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["popover-container",a.show?"show-popover":"hide-popover"]),style:s.normalizeStyle(o.position),onMouseenter:t[0]||(t[0]=(...h)=>a.handleMouseEnter&&a.handleMouseEnter(...h)),onMouseleave:t[1]||(t[1]=(...h)=>a.handleMouseLeave&&a.handleMouseLeave(...h))},[s.createElementVNode("div",null,[n.type==="node"?(s.openBlock(),s.createElementBlock("div",p9e,[s.createElementVNode("div",g9e,[n.nodeInfo.collect?(s.openBlock(),s.createElementBlock("div",m9e,[s.createVNode(l,{content:"已收藏","popper-class":"el-tooltip-gray",placement:"left"},{default:s.withCtx(()=>[s.createVNode(c,{class:"button-img","icon-class":e.imgPath["./public/d3svg1/star.svg"]},null,8,["icon-class"])]),_:1})])):s.createCommentVNode("",!0),a.isNormalNode?(s.openBlock(),s.createElementBlock("div",v9e,[s.createElementVNode("div",y9e,s.toDisplayString(a.getTypeZh(n.nodeInfo.type))+":",1),s.createElementVNode("div",{class:s.normalizeClass(["value",{"star-next":n.nodeInfo.collect}])},s.toDisplayString(a.name),3)])):s.createCommentVNode("",!0),a.isNodeTypeNode?(s.openBlock(),s.createElementBlock("div",b9e,[w9e,s.createElementVNode("div",_9e,[s.createElementVNode("div",C9e,[s.createElementVNode("div",S9e,s.toDisplayString(n.nodeInfo.name),1)])])])):s.createCommentVNode("",!0),n.nodeInfo.label?(s.openBlock(),s.createElementBlock("div",E9e,[x9e,s.createElementVNode("div",k9e,s.toDisplayString(n.nodeInfo.label),1)])):s.createCommentVNode("",!0)]),s.createElementVNode("div",N9e,[a.isNormalNode&&n.nodeInfo.detail?(s.openBlock(),s.createElementBlock("div",T9e,[a.canGoDetail&&a.hasLevel?(s.openBlock(),s.createElementBlock("div",A9e,[O9e,s.createElementVNode("div",{class:s.normalizeClass(["value level",a.getLevelClass(n.nodeInfo.detail&&n.nodeInfo.detail.info.basic.level)]),title:n.nodeInfo.detail&&n.nodeInfo.detail.info.basic.level||"--"},s.toDisplayString(n.nodeInfo.detail&&n.nodeInfo.detail.info.basic.level||"--"),11,I9e)])):s.createCommentVNode("",!0),n.nodeInfo.detail&&n.nodeInfo.detail.tags&&n.nodeInfo.detail.tags.length>0?(s.openBlock(),s.createElementBlock("div",R9e,[P9e,s.createElementVNode("div",L9e,[s.createElementVNode("div",B9e,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.formatTags(n.nodeInfo.detail.tags),(h,m)=>(s.openBlock(),s.createBlock(l,{key:m,"popper-class":"el-tooltip-gray"},{content:s.withCtx(()=>[s.createElementVNode("div",null,[s.createTextVNode(s.toDisplayString(h.name===h.desc?h.name:h.name+":"+h.desc)+" ",1),h.disabled?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[D9e,s.createTextVNode(" 标签状态:失效 ")],64)):s.createCommentVNode("",!0)])]),default:s.withCtx(()=>[s.createElementVNode("span",null,[s.createVNode(d,{class:s.normalizeClass(["graph-tag-one",`${h.type||"unknown"} ${h.disabled?"tag-disable":""}`]),type:h.type||"info"},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(h.name),1)]),_:2},1032,["class","type"])])]),_:2},1024))),128))])])])):s.createCommentVNode("",!0),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.fieldMapThisType,(h,m)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[a.canShowField(h)?(s.openBlock(),s.createElementBlock("div",M9e,[s.createElementVNode("div",F9e,s.toDisplayString(h.zh)+":",1),s.createElementVNode("div",{class:s.normalizeClass(["value",{red:h.prop==="virus_name"}]),title:n.nodeInfo.detail.info.basic[m]},s.toDisplayString(a.getFieldValue(h)),11,$9e)])):s.createCommentVNode("",!0)],64))),256))])):s.createCommentVNode("",!0),a.isNodeTypeNode?(s.openBlock(),s.createElementBlock("div",z9e,[s.createElementVNode("div",U9e,[j9e,s.createElementVNode("div",q9e,[a.getNodeTypeChildNum(n.nodeInfo.id).dangerChildNum>0?(s.openBlock(),s.createElementBlock("span",H9e,[s.createElementVNode("span",G9e,s.toDisplayString(a.getNodeTypeChildNum(n.nodeInfo.id).dangerChildNum),1),s.createTextVNode("/")])):s.createCommentVNode("",!0),s.createTextVNode(s.toDisplayString(a.getNodeTypeChildNum(n.nodeInfo.id).allChildNum),1)])])])):s.createCommentVNode("",!0),a.isAggregateNode?(s.openBlock(),s.createElementBlock("div",W9e,[s.createElementVNode("div",K9e,"聚合节点 ("+s.toDisplayString(o.aggregationList.length)+"个)",1),s.createElementVNode("div",Y9e,[s.createVNode(p,{data:o.aggregationList,style:{width:"100%"}},{default:s.withCtx(()=>[s.createVNode(u,{prop:"name","min-width":"200",label:"名称"}),s.createVNode(u,{sortable:"",prop:"type",label:"类型"}),s.createVNode(u,{sortable:"",prop:"level",width:"80",label:"级别"},{default:s.withCtx(h=>[s.createElementVNode("span",{style:s.normalizeStyle({color:a.getColorStyle(h.row.level)})},s.toDisplayString(h.row.level||"--"),5)]),_:1}),s.createVNode(u,{label:"操作"},{default:s.withCtx(h=>[s.createVNode(f,{class:"add-to-graph-btn",type:"primary",text:"",size:"small",onClick:m=>a.addToGraph(h.row)},{default:s.withCtx(()=>[s.createTextVNode(" 添加到图谱 ")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])])])):s.createCommentVNode("",!0)])])):(s.openBlock(),s.createElementBlock("div",J9e,[s.createElementVNode("div",X9e,[s.createElementVNode("div",Q9e,s.toDisplayString(n.nodeInfo.apiName),1)])]))])],38)}const V9e=Bt(h9e,[["render",Z9e],["__scopeId","data-v-a8e278b3"]]),eEe=[{id:52,product_id:0,name:"copy",namec:"复制",parent_id:0,has_child:0,status:0,type:2,path:"0-52",pos:65,ctime:"0000-00-00 00:00:00",utime:"2019-06-04 16:49:38",children:[]},{id:62,product_id:0,name:"release_aggregation",namec:"释放聚合顶点",parent_id:0,has_child:0,status:0,is_sys:0,is_detail:0,type:2,path:"0-62",pos:1,ctime:"0000-00-00 00:00:00",utime:"2019-05-06 15:08:10",children:[]}],tEe={name:"vue-safe-force-graph",version:"2.0.49",description:"force_graph in security area",author:"jason zhang",module:"./lib/vue-safe-force-graph.js",main:"./lib/vue-safe-force-graph.umd.cjs",type:"module",files:["/lib/"],exports:{".":{import:"./lib/vue-safe-force-graph.js",require:"./lib/vue-safe-force-graph.umd.cjs"},"./*":"./*"},scripts:{dev:"vite","dev:base64":"vite --mode development_base64",lib:"vite build","lib:base64":"vite build --mode production_base64",patch:'npm version patch -m "Upgrade to %s "',"patch:base64":'npm version patch -m "Upgrade to %s for base64"',p:"npm run patch && npm run lib && npm publish","p:base64":"npm run patch:base64 && npm run lib:base64 && npm publish",lint:"eslint --ext .js,.vue src",lintFix:"eslint --fix --ext .js,.vue src",imageToCdn:"node qcdn.cjs",imageToBase64:"node qcdn.cjs --buildtype=base64",changelog:"conventional-changelog -p angular -i CHANGELOG.md -s -r 0"},dependencies:{"@element-plus/icons-vue":"^2.1.0","@q/qapm":"^1.1.5","csv-parse":"^5.0.4",d3:"^7.8.5","d3-lasso":"0.0.5","element-plus":"^2.3.0",json2csv:"^5.0.7",konva:"^9.2.0","lodash-es":"^4.17.21","mime-types":"^2.1.35",minimist:"^1.2.6","radar-js-analytic-sdk":"^2.2.6",vue:"^3.2.47","vue-clipboard3":"^2.0.0","vue-router":"^4.1.6","vue-virtual-scroller":"^2.0.0-beta.8"},devDependencies:{"@babel/core":"^7.23.3","@babel/preset-env":"^7.23.3","@originjs/vite-plugin-commonjs":"^1.0.3","@q/qcdn":"^3.2.2","@vitejs/plugin-vue":"^4.1.0",axios:"^0.21.1","babel-eslint":"^10.1.0",eslint:"^7.32.0","eslint-plugin-vue":"^8.0.3",imageinfo:"^1.0.4",qs:"^6.10.1","rollup-plugin-visualizer":"^5.9.0",sass:"^1.62.0","unplugin-auto-import":"^0.15.2","unplugin-vue-components":"^0.24.1",vite:"^4.3.1"},browserslist:["> 1%","last 2 versions"],engines:{node:">=8.9",npm:">= 3.0.0"},license:"MIT"},KNe="",YNe="",JNe="",{toClipboard:nEe}=uf(),rEe="Arial,Helvetica Neue,Helvetica,PingFang SC,Hiragino Sans GB,Microsoft YaHei,sans-serif",ni=1,iEe=["ip","intranet","internet"],R_=20,cr={},oEe={name:"ForceGraphRenderByCanvas",components:{Popover:V9e,NodeContextmenu:f9e},mixins:[jr],provide:function(){return{levelList:this.levelList}},props:{data:{type:Object,default:()=>({nodes:[],links:[]})},history:{type:Object,default:()=>({})},strength:{type:Number,default:-600},isThreatPath:{type:Boolean,default:!1},requestGraphData:{type:Boolean,default:!1},moduleDetail:{type:Object,default:()=>{}},graphApi:{type:Object,default:()=>{}},alphaDecay:{type:Number,default:.0228},alphaMin:{type:Number,default:.001},darkMode:{type:Boolean,default:!0},levelList:{type:Array,default:()=>[{level:"未知",levelName:"未知",className:"unknown",normalColor:"#666",darkColor:"#c6cdd5",dangerNumber:0},{level:"危险",levelName:"危险",className:"warn",normalColor:"#CF1322",darkColor:"#fb2400",dangerNumber:1},{level:"普通",levelName:"普通",className:"normal",normalColor:"#007EE2",darkColor:"#0094ff",dangerNumber:-1},{level:"安全",levelName:"安全",className:"safe",normalColor:"#009A75",darkColor:"#00da90",dangerNumber:-2}]},nodeTypeScale:{type:Number,default:1},nodeTypeList:{type:Array,default:()=>[]},manualTickNumber:{type:Number,default:500},startNodeAnimation:{type:Boolean,default:!0}},emits:["handle-select-node","custom-contextmenu-click","flagFiles","updateSelection"],data(){return{prefix:"./public/",iconAllLoaded:!1,iconSize:{},iconFiles:{},flagFiles:{},highlightRule:{},nodesRange:null,mousePosition:{left:0,top:0},hoverNodePosition:{},uniqueClass:"",showPopover:!1,popoverTimer:null,popoverType:"",popoverContent:{},popoverNode:{},showContextMenu:!1,contextMenuNode:{},menuOptions:[],isDragging:!1,originTransform:null,dragNodeFix:!1,destroyed:!1,actKey:ma()?"metaKey":"ctrlKey",levelHeight:100,actNum:0,scriptNow:null,scriptInited:!1,canAct:!1,isKeyUp:!0,initTimes:0,resizeObserver:null,canvasElement:null,stage:s.shallowRef(null),layer:s.shallowRef(null),nodesGroup:s.shallowRef({}),linksGroup:s.shallowRef({}),grab:s.shallowRef(null),simulation:s.shallowRef(null),nodes:s.shallowRef(null),links:s.shallowRef(null),hoveredNode:s.shallowRef(null),mouseDownNode:s.shallowRef(null),selectionRect:null,selection:[],scale:ni,mousedownPos:null,mousedownNode:null,mouseupNode:null,dragLine:null,darkBgRect:null,inited:!1,hasSimulation:!1,nodesLength:0,ticking:!1,anim1:null,anim2:null,anim3:null}},computed:{isAutoTick(){var e;return((e=this.nodes)==null?void 0:e.length)<this.manualTickNumber},iconSizeComputed(){const e=a$(this.iconSize);return this.nodeTypeList.forEach(t=>{e[t]=this.iconSize[t]*this.nodeTypeScale}),e},contextMenuNodes(){return this.contextMenuNode.id?this.selection.some(e=>e.id===this.contextMenuNode.id)?[...this.selection]:[this.contextMenuNode]:[]},showContextMenuFlag(){return this.requestGraphData?this.showContextMenu:!1}},watch:{data:{handler:function(){const e=this.nodesLength!==this.data.nodes.length;this.nodes=this.data.nodes,this.links=this.data.links,this.nodesLength=this.data.nodes.length,this.update(e)},deep:!0},moduleDetail:{handler:function(e){return Te(this,null,function*(){e!=null&&e.nodes&&!this.iconAllLoaded&&(yield this.loadIcons(),this.initForceGraph(),setTimeout(()=>{this.update()},50))})},deep:!0,immediate:!0},darkMode:{handler:function(e){return Te(this,null,function*(){const t=e?"dark":"light";setTimeout(()=>{this.update(),this.isThreatPath?document.querySelectorAll(`.${this.uniqueClass}.render-container`)[0].setAttribute("data-theme",t):(document.querySelectorAll(`.${this.uniqueClass}.render-container`)[0].setAttribute("data-theme",t),document.getElementsByClassName(this.uniqueClass+" render-container")[0].parentElement.parentElement.setAttribute("data-theme",t))},200)})},immediate:!0}},created(){Gn("graph created time",Date.now()),wi.setProject("QH_10542_1724").getTrack(),localStorage.getItem("showSafeForceGraphLog")&&Gn("组件版本: "+tEe.version),this.isThreatPath||this.initKeyEvent(),this.uniqueClass="unique"+new Date().getTime()+Math.floor(Math.random()*1e5)},mounted(){return Te(this,null,function*(){new PSe({appKey:"fe-force-graph",ratio:50}),this.initForceGraph(),zQ(this.levelList),!this.isThreatPath&&(uo(qe,"buttonClick",e=>{this.handleContextMenuClick(e)}),uo(qe,"relationClick",e=>{this.handleContextMenuClick(e)}),uo(qe,"sendNodesRange",(e,t)=>{e!==void 0&&(this.nodesRange=e,this.updateNodeStyle())}))})},beforeUnmount(){fo(qe,"buttonClick"),fo(qe,"relationClick"),fo(qe,"sendNodesRange"),this.unbindKeyEvent(),this.resetAll(),Gn("destroy")},methods:{initForceGraph(){return Te(this,null,function*(){if(this.inited)return;const e=this.$refs.canvasContainer;let t=e.clientWidth,n=e.clientHeight;this.resizeObserver=new ResizeObserver(o=>{for(const a of o){if(t=a.contentRect.width,n=a.contentRect.height,Gn(`新宽度: ${t}px, 新高度: ${n}px`),t===0||n===0)return;this.stage.width(t),this.stage.height(n),this.layer&&this.layer.batchDraw(),this.hasSimulation&&this.updateSimulation()}}),this.resizeObserver.observe(e),document.addEventListener("click",this.hideContextMenu,!1),this.nodes=this.data.nodes,this.links=this.data.links,this.stage=new ct.Stage({container:e,width:t,height:n,scaleX:ni,scaleY:ni}),this.layer=new ct.Layer,this.grab=new ct.Group({id:"grab",x:0,y:0}),this.layer.add(this.grab);const r=this.layer.getCanvas()._canvas;this.canvasElement=r,this.stage.on("mousemove",o=>{if(!this.mousedownNode||!o.evt[this.actKey]){if(this.resetMouseVars(),this.selectionRect&&o.evt.altKey){const a=this.stage.getPointerPosition(),c=(a.x-this.stage.x())/this.scale,l=(a.y-this.stage.y())/this.scale,d=c-this.selectionRect.x(),u=l-this.selectionRect.y();this.selectionRect.width(d),this.selectionRect.height(u),this.stage.batchDraw()}}else{const a=this.stage.getPointerPosition(),c=this.stage.scaleX(),l=(a.x-this.stage.x())/c,d=(a.y-this.stage.y())/c;this.dragLine.points([this.mousedownPos.x,this.mousedownPos.y,l,d]),this.layer.batchDraw()}}),this.stage.on("wheel",o=>{o.evt.preventDefault();const a=1.1,c=this.scale,l=o.evt.deltaY<0?c*a:c/a;this.scale=l;const d=this.stage.getPointerPosition(),u=this.stage.position(),f=d.x-(d.x-u.x)*(l/c),p=d.y-(d.y-u.y)*(l/c);this.stage.setAttrs({scaleX:l,scaleY:l,x:f,y:p}),this.layer.batchDraw()}),this.stage.on("mousedown",o=>{const a=o.target;if(a&&a.nodeType==="Stage"?this.stage.setDraggable(!0):this.stage.setDraggable(!1),o.evt.altKey){this.stage.setDraggable(!1);const c=this.stage.scaleX(),l=this.stage.getPointerPosition(),d=(l.x-this.stage.x())/c,u=(l.y-this.stage.y())/c;this.selectionRect=new ct.Rect({x:d,y:u,width:0,height:0,stroke:"rgb(80, 80, 80)",strokeWidth:2}),this.layer.add(this.selectionRect),this.stage.batchDraw()}}),this.stage.on("mouseup",o=>{if(this.stage.setDraggable(!1),this.selectionRect&&o.evt.altKey){const a=this.selectionRect.x(),c=this.selectionRect.y(),l=this.selectionRect.width(),d=this.selectionRect.height();this.selection=this.nodes.filter(u=>{const f={x:u.x,y:u.y},p=Math.min(a,a+l),h=Math.max(a,a+l),m=Math.min(c,c+d),b=Math.max(c,c+d);return f.x>=p&&f.x<=h&&f.y>=m&&f.y<=b}),this.updateSelection(),this.selectionRect.destroy(),this.selectionRect=null}}),this.stage.on("contextmenu",this.handleGlobalContextMenu),this.stage.on("click",o=>{o.target&&o.target.nodeType==="Stage"&&this.handleDeselectNode(o)}),this.setSimulation(),this.stage.add(this.layer),this.stage.draw(),this.update(),this.inited=!0})},setSimulation(){var n;if(this.hasSimulation||!((n=this.nodes)!=null&&n.length))return;const e=this.stage.width()/(2*ni),t=this.stage.height()/(2*ni);this.hasSimulation=!0,this.simulation=mse(this.nodes).force("link",tse(this.links).id(r=>r.id).distance(120).strength(1)).force("charge",vse().strength(-600)).force("x",yse()).force("y",bse()).force("center",_S(e,t)).alphaDecay(this.alphaDecay).alphaMin(this.alphaMin).stop(),this.isAutoTick?(this.simulation.alpha(1).restart(),this.simulation.on("tick",this.ticked)):(this.simulation.on("tick",null),this.sendManualTick()),this.simulation.on("end",()=>{Gn("simulation end time",Date.now()),this.isThreatPath&&this.centerAndZoom(1)})},sendManualTick(){var e;Gn("sendManualTick",(e=this.nodes)==null?void 0:e.length),!this.ticking&&(this.ticking=!0,this.doClearCanvas(),this.simulation.alphaDecay(this.alphaDecay*2),this.simulation.alphaMin(this.alphaMin*5),this.simulation.alpha(1).restart(),setTimeout(()=>{console.time("tick");for(let t=0,n=Math.ceil(Math.log(this.simulation.alphaMin())/Math.log(1-this.simulation.alphaDecay()));t<n;++t)Gn("tick"),this.simulation.tick();console.timeEnd("tick"),this.ticking=!1,this.update(),this.centerAndZoom()},1e3))},update(e=!1){return Te(this,null,function*(){var t,n,r;!this.iconAllLoaded&&((n=(t=this.moduleDetail)==null?void 0:t.nodes)!=null&&n.length)&&(yield this.loadIcons()),!this.destroyed&&(r=this.nodes)!=null&&r.length&&(this.initScript(),Gn("update"),e&&this.updateSimulation(),this.doClearCanvas(),this.paintLinks(),this.paintNodes(),this.updateSelection(),this.ticked(),this.actNum===9&&setTimeout(()=>{this.centerAndZoom(.8)},200))})},doClearCanvas(){this.nodesGroup={},this.linksGroup={},this.layer.destroyChildren(),this.grab=new ct.Group({id:"grab",x:0,y:0}),this.layer.add(this.grab)},paintNodes(){const e=this.stage.width()/2,t=this.stage.height()/2,n=this.selection.map(r=>r.id);this.nodes.forEach(r=>Te(this,null,function*(){var w,_,C,k,S,E,T,A,O,I,F,R,q,z,G,Y,Z,U,j,H;let o;r.type==="nodeType"?o=this.iconSizeComputed[r.icon]||this.iconSizeComputed.node_type:o=this.iconSize[r.icon]||this.iconSize[r.type]||24;const a=((C=(_=(w=r==null?void 0:r.detail)==null?void 0:w.info)==null?void 0:_.basic)==null?void 0:C.level)||"",c=(E=(S=(k=r==null?void 0:r.detail)==null?void 0:k.info)==null?void 0:S.basic)==null?void 0:E.flag;let l;try{l=yield this.getNodeImage(r)}catch(M){console.log(M)}this.nodesGroup[r.id]&&((T=this.nodesGroup[r.id])==null||T.destroy());const d=new ct.Group({name:"nodeGroup",opacity:1,id:`${r.id}`,x:r.x?r.x:e,y:r.y?r.y:t,draggable:!0,visible:r.show});if(n.includes(r.id)&&d.addName("isSelected"),r.startNode&&this.startNodeAnimation){const M=as(a,this.levelList,this.darkMode),D=new ct.Circle({x:0,y:0,radius:20,fill:M,opacity:0}),te=new ct.Circle({x:0,y:0,radius:20,fill:M,opacity:0}),V=new ct.Circle({x:0,y:0,radius:20,fill:M,opacity:0});d.add(D),d.add(te),d.add(V);const ee=(X,oe)=>new ct.Animation(function(se){const B=se.time;if(B%oe/oe===0)return!1;const re=.5-.5*(B%oe)/oe,ce=40*(B%oe)/oe;X.radius(ce||0),X.opacity(re)},this.layer);(A=this.anim1)==null||A.stop(),(O=this.anim2)==null||O.stop(),(I=this.anim3)==null||I.stop(),this.anim1=ee(D,1500),this.anim2=ee(te,1500),this.anim3=ee(V,1500),(F=this.anim1)==null||F.start(),setTimeout(()=>{this.anim2.start()},500),setTimeout(()=>{this.anim3.start()},1e3)}else if(r.startNode&&!this.startNodeAnimation){const M=as(a,this.levelList,this.darkMode),D=new ct.Circle({x:0,y:0,radius:20,fill:M,opacity:this.startNodeAnimation?0:.3});d.add(D)}if(r.type==="ip"||r.type==="internet"||r.type==="country"||r.type==="target_country"){const M=as(a,this.levelList,this.darkMode),D=new ct.Circle({x:0,y:0,fill:this.darkMode?"#182628":"#fff",radius:o/2,stroke:M,strokeWidth:2});d.add(D)}if(l){const M=c||(q=(R=r==null?void 0:r.detail)==null?void 0:R.info)!=null&&q.inner_country?20:o,D=l&&new ct.Image({x:0,y:0,offsetX:M/2,offsetY:M/2,image:l,width:M,height:M,draggable:!1});d.add(D)}if(r.detail&&r.type==="md5"){const M=((Y=(G=(z=r.detail.info)==null?void 0:z.basic)==null?void 0:G.file_type)==null?void 0:Y.toUpperCase())||"MD5",D=new ct.Text({name:"md5Text",x:0,y:0,text:M,fontSize:4,fontWeight:700,fontFamily:rEe,fill:this.darkMode?"#182628":"#fff",align:"center",listening:!1});D.x(D.x()-D.width()/2),d.add(D)}const u=r.textProp||"name",f=u==="name"?((U=(Z=r==null?void 0:r.detail)==null?void 0:Z.info)==null?void 0:U.name)||r.name:r[u];let p=f.length>14&&!iEe.includes(r.type)?f.slice(0,7)+"..."+f.slice(-7):f;p=JQ(p);const h=new ct.Text({offsetY:o/2,name:"konvaText",x:0,y:o+8,text:p,fontSize:12,fontFamily:"Calibri",fill:this.darkMode?"#cdd9da":"#000",align:"center",listening:!1,visible:!!r.textProp});h.x(h.x()-h.width()/2),d.add(h);const m=new ct.Circle({name:"border",x:0,y:0,radius:o/2,fill:"#5c6271",opacity:.4,visible:!1});if(d.add(m),(H=(j=r.detail)==null?void 0:j.tags)!=null&&H.length){const M=new ct.Circle({x:((o/2||14)+5)*Math.sin(60*Math.PI/180),y:-((o/2||14)+5)*Math.cos(60*Math.PI/180),radius:3,fill:"#9300ff",listening:!1});d.add(M)}if(r.type!=="nodeType"&&r.type!=="aggregation"){var b=new ct.Circle({name:"collect",x:((o/2||14)+5)*Math.sin(0*Math.PI/180),y:-((o/2||14)+5)*Math.cos(0*Math.PI/180),radius:3,fill:"#ffad00",visible:!!r.collect});d.add(b)}if(r.label){const M=new ct.Circle({x:((o/2||14)+5)*Math.sin(30*Math.PI/180),y:-((o/2||14)+5)*Math.cos(30*Math.PI/180),radius:3,fill:"#0099ff",listening:!1});d.add(M)}d.on("dragstart",(M,D)=>{M.evt[this.actKey]||(this.isAutoTick&&this.simulation.alphaTarget(.3).restart(),this.isDragging=!0)}),d.on("dragmove",M=>{if(!M.evt[this.actKey]){var D=this.simulation.nodes().find(te=>te.id===r.id);D&&(D.x=d.x(),D.fx=d.x(),D.y=d.y(),D.fy=d.y(),this.links.forEach(te=>{const V=this.linksGroup[`${te.source.id}-${te.target.id}`],ee=V==null?void 0:V.findOne(".konvaLine"),X=V==null?void 0:V.findOne(".linkArrow"),oe=V==null?void 0:V.findOne(".edgeLabel");let se,B,W,re;if(te.source.id===D.id){if(!this.nodesGroup[te.target.id])return;se=D.x,B=this.nodesGroup[te.target.id].x(),W=D.y,re=this.nodesGroup[te.target.id].y(),ee.points([se,W,B,re]);const ce=q0(se,W,B,re,R_);X==null||X.x(ce==null?void 0:ce.x),X==null||X.y(ce==null?void 0:ce.y),X==null||X.rotation(Math.atan2(re-W,B-se)*(180/Math.PI))}else if(te.target.id===D.id){if(!this.nodesGroup[te.source.id])return;se=this.nodesGroup[te.source.id].x()||0,B=D.x||0,W=this.nodesGroup[te.source.id].y()||0,re=D.y||0,ee.points([se,W,B,re]);const ce=q0(se,W,B,re,R_);X==null||X.x(ce==null?void 0:ce.x),X==null||X.y(ce==null?void 0:ce.y),X==null||X.rotation(Math.atan2(re-W,B-se)*(180/Math.PI))}if(oe&&(te.source.id===D.id||te.target.id===D.id)){oe.x((se+B)/2),oe.y((W+re)/2),oe.offsetX(oe.getWidth()/2||0),oe.offsetY(oe.getHeight()/2+8||0);const ce=Math.atan2(re-W,B-se)*(180/Math.PI);B<se?oe.rotation(ce+180):oe.rotation(ce)}}),this.layer.batchDraw())}}),d.on("dragend",M=>{M.evt[this.actKey]||(this.isAutoTick&&this.simulation.alphaTarget(0),this.isDragging=!1)}),d.on("click",M=>{M.evt.detail===2?this.expandNodes(M,r):M.evt.detail===1&&M.evt.button===0&&this.handleNodeClick(M,r)}),d.on("contextmenu",M=>{M.cancelBubble=!0,M.evt.preventDefault(),M.evt.stopPropagation(),this.handleNodeContextMenu(M,r,d)}),d.on("mouseup",M=>this.handleNodeMouseUp(M,r)),d.on("mousedown",M=>this.handleNodeMouseDown(M,r)),d.on("mouseenter",M=>this.handleNodeMouseEnter(M,r)),d.on("mouseleave",M=>this.handleNodeMouseLeave(M,r)),this.grab.add(d),this.nodesGroup[r.id]=d})),this.stage.batchDraw()},paintLinks(){const e=this.stage.width()/2,t=this.stage.height()/2;this.links.forEach(n=>{this.linksGroup[`${n.source.id}-${n.target.id}`]&&this.linksGroup[`${n.source.id}-${n.target.id}`].destroy();const r=new ct.Group({opacity:1,id:`${n.source.id}-${n.target.id}`,visible:n.source.show&&n.target.show}),o=this.darkMode?"#445152":"#999",a=new ct.Arrow({name:"linkArrow",pointerLength:10,pointerWidth:10,x:e,y:t,fill:o});r.add(a);const c=n.source.x||0,l=n.source.y||0,d=n.target.x||0,u=n.target.y||0,f=new ct.Line({name:"konvaLine",id:`${n.source.id}-${n.target.id}`,points:[c,l,d,u],stroke:n.target.type==="org"?"#cf1322":o,strokeWidth:1,dash:n.diy===!0?[5,5]:null});if(n.target.type==="nodeType"){const p=new ct.Text({name:"edgeLabel",x:(c+d)/2,y:(l+u)/2,text:n.target.name,fontSize:12,fill:this.darkMode?"#cdd9da":"#000"});r.add(p)}r.add(f),this.grab.add(r),r.moveToBottom(),this.linksGroup[`${n.source.id}-${n.target.id}`]=r}),this.stage.batchDraw()},updateSimulation(){var e,t;try{if(!this.simulation&&!this.hasSimulation){this.setSimulation();return}this.simulation.nodes(this.nodes),this.simulation.force("link").links(this.links),this.simulation.alpha(.4).restart(),this.history.layoutIndex===0?((e=this.nodes)==null?void 0:e.length)<this.manualTickNumber?this.simulation.on("tick",this.ticked):(this.simulation.on("tick",null),this.sendManualTick()):this.simulation.on("tick",this.ticked)}catch(n){console.log(n,"simulation-e1"),(t=this.simulation)==null||t.stop()}},ticked(){switch(Gn("ticked"),this.history.layoutIndex){case 0:this.forceLayout();break;case 1:this.treeLayout();break;default:this.forceLayout();break}},forceLayout(){var t;if(!this.nodes.length||!this.links.length)return;let e=!0;for(let n=0;n<this.links.length;n++){const r=this.links[n],o=this.linksGroup[`${r.source.id}-${r.target.id}`],a=o==null?void 0:o.findOne(".konvaLine"),c=o==null?void 0:o.findOne(".linkArrow"),l=o==null?void 0:o.findOne(".edgeLabel");let d=r.source.x,u=r.source.y,f=r.target.x,p=r.target.y;const h=f-d||1,m=p-u||1,b=Math.sqrt(h*h+m*m),w=h/b||1,_=m/b||1,C=r.source.type==="nodeType"?(this.iconSizeComputed[r.source.icon]||14)/2-1:(this.iconSize[r.target.type]||14)/2-1,k=r.target.type==="nodeType"?(this.iconSizeComputed[r.target.icon]||14)/2-1:(this.iconSize[r.target.type]||14)/2-1;if(d=d+C*w,u=u+C*_,f=f-k*w,p=p-k*_,isNaN(d)||isNaN(u)||isNaN(f)||isNaN(p)){e=!1;break}if(a==null||a.points([d,u,f,p]),c){const S=q0(d,u,f,p,R_);c==null||c.x((S==null?void 0:S.x)||0),c==null||c.y((S==null?void 0:S.y)||0),c==null||c.rotation(Math.atan2(p-u,f-d)*(180/Math.PI))}if(l){l.x((d+f)/2),l.y((u+p)/2),l.offsetX(l.getWidth()/2||0),l.offsetY(l.getHeight()/2+8||0);const S=Math.atan2(p-u,f-d)*(180/Math.PI);f<d?l.rotation(S+180):l.rotation(S)}}if(!e){Gn("请点击自动布局按钮"),this.resetLayout();return}for(let n=0;n<this.nodes.length;n++){const r=this.nodes[n];(t=this.nodesGroup[r.id])==null||t.position({x:r.x||0,y:r.y||0})}},selectEdgesByNode(e){const t=e.map(n=>n.id);this.links.forEach(n=>{const r=this.linksGroup[`${n.source.id}-${n.target.id}`];t.includes(n==null?void 0:n.target.id)||t.includes(n==null?void 0:n.source.id)?r==null||r.addName("isSelected"):r==null||r.removeName("isSelected")})},showKeyWay(e){if(e.length!==1){this.links.forEach(r=>{const o=this.linksGroup[`${r.source.id}-${r.target.id}`];o==null||o.removeName("keyed")}),this.history.resetKeyLinksAndNodes();return}const{keyLinks:t,keyNodeIds:n}=this.history.findKeyLinksAndNodes(e[0].id,!0);this.links.forEach(r=>{const o=t.find(c=>c.source.id===r.source.id&&c.target.id===r.target.id),a=this.linksGroup[`${r.source.id}-${r.target.id}`];o?a==null||a.addName("keyed"):a==null||a.removeName("keyed")}),this.nodes.forEach(r=>{const o=this.nodesGroup[r.id];n.includes(r.id)?o==null||o.addName("keyed"):o==null||o.removeName("keyed")})},updateNodeStyle(){if(!this.iconAllLoaded)return;let e;this.nodesRange&&this.history.keyNodeIds?e=[...this.nodesRange.map(t=>t.id),...this.history.keyNodeIds]:this.nodesRange?e=this.nodesRange.map(t=>t.id):this.history.keyNodeIds&&(e=this.history.keyNodeIds),setTimeout(()=>{this.highlightByRule(this.highlightRule,e),this.updateNodesStyleByName(),this.updateLinksStyleByName()},0)},updateNodesStyleByName(){this.nodes.forEach(e=>{const t=this.nodesGroup[e.id];if(!t)return;const n=t==null?void 0:t.findOne(".border"),r=t==null?void 0:t.findOne(".konvaText"),o=this.darkMode?"#cdd9da":"#000";t!=null&&t.hasName("lowlight")?t==null||t.opacity(.4):t==null||t.opacity(1),t!=null&&t.hasName("isSelected")?(t.scale({x:8/7,y:8/7}),n==null||n.visible(!0)):(t.scale({x:1,y:1}),n==null||n.visible(!1)),e.type!=="nodeType"&&(t!=null&&t.hasName("isSelected")?(r==null||r.visible(!0),r==null||r.fill("#007ee2")):(r==null||r.visible(!!e.textProp),r==null||r.fill(o)))}),this.layer.batchDraw()},updateLinksStyleByName(){this.links.forEach(e=>{const t=this.linksGroup[`${e.source.id}-${e.target.id}`];if(!t)return;const n=t.findOne(".konvaLine"),r=t.findOne(".edgeLabel"),o=t.findOne(".linkArrow");t!=null&&t.hasName("lowlight")?t==null||t.opacity(.4):t==null||t.opacity(1);const a=this.darkMode?"#445152":"#999";if(t.hasName("isSelected")||t.hasName("keyed")){const c=e.target.type==="org"?"#cf1322":"#007ee2";n.stroke(c),o.fill(c),n.strokeWidth(1),t==null||t.opacity(1),r==null||r.fill("#007ee2"),t.hasName("keyed")?n.strokeWidth(3):n.strokeWidth(1)}else{const c=e.target.type==="org"?"#cf1322":a;this.linksGroup[`${e.source.id}-${e.target.id}`].removeName("isSelected"),n.strokeWidth(1),n.stroke(c),o.fill(c),r==null||r.fill(this.darkMode?"#cdd9da":"#000")}}),this.layer.batchDraw()},handleTableSelect(e=[]){this.selection=this.nodes.filter(t=>{let n;return e.length>1?n=e.indexOf(t.id)>=0&&t.type!=="nodeType"&&t.type!=="aggregation":n=e.indexOf(t.id)>=0,n}),this.updateSelection()},resetAll(){var e,t;document.removeEventListener("click",this.hideContextMenu),(e=this.simulation)==null||e.stop(),this.simulation=null,this.hasSimulation=!1,this.mousedownNode=null,this.mousedownPos=null,this.mouseupNode=null,this.$refs.canvasContainer&&((t=this.resizeObserver)==null||t.unobserve(this.$refs.canvasContainer)),this.nodes=[],this.links=[],this.resizeObserver=null,this.destroyed=!0,this.history.destroy&&this.history.destroy()},unbindKeyEvent(){this.initKeyEvent(1)},initKeyEvent(e=0){if(e){document.removeEventListener("keydown",this.keyDown),document.removeEventListener("keyup",this.keyUp);return}document.addEventListener("keydown",this.keyDown),document.addEventListener("keyup",this.keyUp),this.isKeyUp=!0},keyDown(e){const t=e.keyCode,n=e[this.actKey],r=e.shiftKey;if(this.isKeyUp)switch(t){case 17:break;case 16:this.toggleZoom(!1);break;case 38:break;case 40:this.goAction();break;case 67:if(window.getSelection().toString())return;n&&this.copyNodeText(this.selection);break;case 89:n&&!ma()&&this.$parent.historyForward();break;case 90:n&&r?this.$parent.historyForward():n&&this.$parent.historyBack();break;case 46:this.$parent.deleteNodes(this.selection);break}},keyUp(e){const t=e.keyCode,n=e.keyCode;if(ma())switch(n){case 17:break;case 16:this.toggleZoom(!0);break}else switch(t){case 17:break;case 16:this.toggleZoom(!0);break}this.isKeyUp=!0},initScript(){var r,o,a,c,l,d;if(this.scriptInited)return;((a=(o=(r=this.history)==null?void 0:r.dataNow)==null?void 0:o.nodes)==null?void 0:a.length)>0&&(this.scriptInited=!0);const e=["193.36.119.50","6cd7b91212983cc557c6e3e671734ff9"];let t=null;if((d=(l=(c=this.history)==null?void 0:c.dataNow)==null?void 0:l.nodes)==null||d.some(u=>{const f=e.indexOf(u.id);return f>=0&&u.startNode===!0&&(t=f),!0}),t===null)return;const n=[[{node:"193.36.119.50"},{node:"6cd7b91212983cc557c6e3e671734ff9"},{node:"http://9d1109ab.privatedns.org/download/FirefoxSetup.dll"},{node:"94.237.81.57"},{node:"chart.expocasheuro.com"}],[{node:"6cd7b91212983cc557c6e3e671734ff9"},{node:"http://9d1109ab.privatedns.org/download/FirefoxSetup.dll"},{node:"94.237.81.57"},{node:"chart.expocasheuro.com"},{node:"183.246.177.59"},{node:"e7db5b09a39e324d36e937d89f98fdb9122cd859"}]];this.scriptNow=n[t],this.canAct=!!this.scriptNow},goAction(){if(!this.scriptNow||this.actNum>(this.scriptNow.length-1)*2)return;if(this.actNum===(this.scriptNow.length-1)*2){this.centerAndZoom(),this.actNum++;return}const e=this.scriptNow[Math.floor(this.actNum/2)+1];if(this.actNum%2===0){if(!this.history.dataNow.nodes.some(t=>t.id===e.node))return;this.handleTableSelect(e.node),this.nodesMoveToCenterView([e.node]),this.actNum++}else this.$parent.expandNodes(this.selection[0]),setTimeout(()=>{this.nodesMoveToCenterView([this.selection[0].id])},100),this.actNum++},nodesMoveToCenterView(e,t=.9){if(e.length===0)return;const n=[],r=this.nodes.filter(k=>e.indexOf(k.id)>=0);r==null||r.forEach(function(k,S){const E=this.nodesGroup[k.id];n.push({bounds:(E==null?void 0:E.getClientRect())||{},fx:k.x||0,fy:k.y||0})});const o=this.getBounds(n);this.originTransform=this.originTransform={scaleX:this.stage.scaleX(),scaleY:this.stage.scaleY(),x:this.stage.x(),y:this.stage.y()};const a=this.stage.width(),c=this.stage.height()/1.5,l=o.width,d=o.height;if(l===0||d===0)return;let u=t/Math.max(l/a,d/c);u=Math.min(u,ni)||ni,this.scale=u;const f=this.stage.width()/(2*u),p=this.stage.height()/(2*u),h=this.nodesGroup[e[0]],m=h==null?void 0:h.getClientRect(),b=m.x*u,w=m.y*u,_=f-b,C=p-w;this.stage.setAttrs({scaleX:u,scaleY:u,x:_||0,y:C||0}),this.layer.batchDraw()},getBounds(e){let t,n,r,o;return e.map(a=>{const c=a.bounds,l=c.x+a.fx,d=c.y+a.fy;t=Math.min(l,t)||l,n=Math.min(d,n)||d,r=Math.max(l+c.width,r)||l+c.width,o=Math.max(d+c.height,o)||d+c.height}),{x:t,y:n,width:r-t,height:o-n}},resetMouseVars(){var e;this.mousedownNode=null,this.mousedownPos=null,this.mouseupNode=null,(e=this.dragLine)==null||e.destroy(),Object.keys(this.nodesGroup).forEach(t=>{this.nodesGroup[t].draggable(!0)})},loadIcons(){return new Promise((e,t)=>{const n=[],r=[];for(const d in this.moduleDetail.plugs){const u=this.moduleDetail.plugs[d];u==null||u.map(f=>{f.children?r.push(...f.children):r.push(f)})}n.push(...r.map(d=>d.icon)),n.push(...this.moduleDetail.nodes.map(d=>d.name)),n.push("node_type"),n.push("node"),n.push("aggregation");const o=this;let a=0;const c=n.filter(d=>this.imgPath[`${o.prefix}d3svg1/${d}.svg`]);function l(d){return{}.VITE_SVG_TYPE==="base64"?S5(d):_5(d)}c.map(d=>{l(this.imgPath[`${o.prefix}d3svg1/${d}.svg`]).then(u=>{o.iconFiles[d]=u;const f=XQ(u).width;this.iconSize[d]=f,a++,a===c.length&&(o.iconAllLoaded=!0,e())}).catch(u=>{console.log(u,"e"),t()})})})},toggleZoom(e){},handleNodeContextMenu(e,t){var n,r;e.evt[this.actKey]||(clearTimeout(this.popoverTimer),this.showPopover=!1,this.contextMenuId++,this.contextMenuNode=t,this.mousePosition.left=e.evt.clientX,this.mousePosition.top=e.evt.clientY,this.showContextMenu=!0,e.currentTarget.type==="aggregation"?this.menuOptions=eEe:this.menuOptions=(n=this.$parent.moduleDetail)!=null&&n.plugs[t.type]?Array.from((r=this.$parent.moduleDetail)==null?void 0:r.plugs[t.type]):[])},handleDeselectNode(e,t){ye(this,"handle-select-node",{isSelected:!1,_node:s.toRaw(t)}),this.selection.length&&(this.selection=[],this.updateSelection()),this.setHighlightRule({}),this.hideContextMenu()},setHighlightRule({prop:e,type:t,value:n}){this.highlightRule={prop:e,type:t,value:n},this.updateNodeStyle(),t||yC(".legend-filter .out-box").classed("active",!1)},updateSelection(){const e=this.selection.map(t=>t.id);this.nodes.forEach(t=>{var n,r;e.includes(t.id)?(n=this.nodesGroup[t.id])==null||n.addName("isSelected"):(r=this.nodesGroup[t.id])==null||r.removeName("isSelected")}),ye(this,"updateSelection")},toggleLayout(e){this.history.layoutIndex=e,this.nodes.map(t=>{t.fx=t.fy=null}),this.updateSimulation(),this.ticked(),setTimeout(()=>{this.centerAndZoom()},200)},handleNodeClick(e,t){en({cId:"handleNodeClick",c:"点击节点"}),this.canAct&&(t.type==="org"?window.open("http://bs.safe.360.net/starmap","__blank"):t.type==="nodeType"&&t.id.indexOf("org")>=0&&window.open("http://bs.safe.360.net/orglist?snapshot=true","__blank1")),this.hideContextMenu();const n=this.selection.some(o=>o.id===t.id);if(e.evt.shiftKey){if(t.type==="nodeType"||this.selection.some(o=>o.type==="nodeType"))return;n?this.selection=this.selection.filter(o=>o.id!==t.id):this.selection=[...this.selection,t]}else n?this.selection=[]:this.selection=[t];const r=this.selection.some(o=>o.id===t.id);ye(this,"handle-select-node",{isSelected:r,_node:t}),this.updateSelection(),this.setHighlightRule(this.highlightRule)},handleNodeMouseEnter(e,t){if(!this.showContextMenu&&!e.evt[this.actKey]){const n=e.target.width(),r=e.target.height(),o=e.target,a=o.getAbsolutePosition(),l=o.getStage().container().getBoundingClientRect(),d=a.x-n/2+l.left,u=a.y-r/2+l.top,f=d,p=u,h=f,m=f+n,b=p,w=p+r;this.hoverNodePosition={top:b,right:m,bottom:w,left:h,width:n,height:r},this.popoverType="node",this.popoverContent={[t.type]:t.id},this.popoverNode=t,this.popoverTimer&&clearTimeout(this.popoverTimer),this.popoverTimer=setTimeout(()=>{this.showPopover=!0},200)}},handleNodeMouseLeave(e,t){this.showContextMenu||(clearTimeout(this.popoverTimer),this.showPopover=!1)},handleNodeMouseUp(e,t){var n;e.evt[this.actKey]&&this.mousedownNode&&(this.dragLine&&((n=this.dragLine)==null||n.destroy()),this.mouseupNode=t,this.mouseupNode.id===this.mousedownNode.id||this.mouseupNode.type==="aggregation"||this.mousedownNode.type==="aggregation"||this.$parent.addLink(this.mousedownNode,this.mouseupNode)),this.resetMouseVars()},handleNodeMouseDown(e,t){if(e.evt[this.actKey]){this.mousedownNode=t,this.nodesGroup[t.id].draggable(!1);const n=this.stage.scaleX(),r=this.stage.getPointerPosition(),o=(r.x-this.stage.x())/n,a=(r.y-this.stage.y())/n;this.mousedownPos={x:o,y:a},this.dragLine=new ct.Line({points:[o,a,o,a],stroke:"black",strokeWidth:1,dash:[5,5],opacity:.7,visible:!0}),this.layer.add(this.dragLine),this.stage.draw()}},treeLayout(){this.nodes.map(e=>{e.fx=e.pos,e.fy=e.levelNum*this.levelHeight}),this.forceLayout()},resetLayout(){this.simulation.stop(),this.nodes.map(e=>{delete e.vx,delete e.vy,delete e.x,delete e.y,delete e.fx,delete e.fy}),this.updateSimulation()},selectSingleEdgeNode(e){const t=[];this.links.map(n=>{n.source.id===e.id&&t.push(n.target.id)});for(let n=t.length-1;n>=0;n--){let r=0,o=0;const a=t[n];this.links.map(c=>{c.source.id===a&&r++,c.target.id===a&&o++}),r>=1&&t.splice(n,1),o>=2&&t.splice(n,1)}return t},selectChildren(e){const t=[];this.links.map(n=>{n.source.id===e.id&&t.push(n.target.id)}),this.handleTableSelect(t)},selectParents(e){const t=[];this.links.map(n=>{n.target.id===e.id&&t.push(n.source.id)}),this.handleTableSelect(t)},handleGlobalContextMenu(e){this.mousePosition.left=e.evt.clientX,this.mousePosition.top=e.evt.clientY,this.menuOptions=[],this.showContextMenu=!0,this.showPopover=!1,this.contextMenuNode={},e.evt.preventDefault()},hideContextMenu(){this.showContextMenu=!1,this.contextMenuNode={}},centerAndZoom(e=.7,t=!1){var f,p,h;if(this.originTransform={scaleX:this.stage.scaleX(),scaleY:this.stage.scaleY(),x:this.stage.x(),y:this.stage.y()},!this.grab)return;const n=this.stage.width(),r=this.stage.height(),o=this.grab.getClientRect(),a=o.width/this.scale,c=o.height/this.scale;if(a===0||c===0)return;let l=e/Math.max(a/n,c/r);if(l=t?l:Math.min(l,ni)||ni,!t&&l>ni)return;this.scale=l;const d=this.stage.width()/(2*l),u=this.stage.height()/(2*l);if((f=this.simulation)!=null&&f.force&&((p=this.simulation)==null||p.force("center",_S(d,u))),this.ticked(),this.stage.setAttrs({scaleX:l,scaleY:l,x:0,y:0}),this.layer.batchDraw(),this.history.layoutIndex===1){const m=this.grab.getClientRect(),b=(n-m.width)/2-m.x,w=(r-m.height)/2-m.y;this.stage.setAttrs({x:b,y:w}),this.layer.batchDraw(),(h=this.simulation)==null||h.stop()}},reset(){this.stage.setAttrs(this.originTransform)},handleContextMenuClick({nodes:e,api:t,dataApi:n}){if(this.requestGraphData){let r,o;const a={show_label:"label",all_show_label:"label",all_show_names:"name",show_names:"name"};switch(t&&t.name){case"edit_label":this.editLabel(e);break;case"single_edge_select":r=this.selectSingleEdgeNode(e[0]),this.selection=this.nodes.filter(c=>r.includes(c.id));break;case"hold_aggregation":o=this.selectSingleEdgeNode(e[0]),this.$parent.aggregationNodes(o,e[0]);break;case"release_aggregation":this.$parent.releaseAggregation(e[0]);break;case"show_label":case"show_names":e.map(c=>{this.showLabel(c,a[t.name])});break;case"all_show_label":case"all_show_names":this.nodes.map(c=>{this.showLabel(c,a[t.name])});break;case"un_show_names":case"un_show_label":e.map(c=>{this.hideLabel(c)});break;case"all_un_show_names":case"all_un_show_label":this.nodes.map(c=>{this.hideLabel(c)});break;case"copy":this.copyNodeText(e);break;case"node_star":e.map(c=>{this.starNode(c)});break;case"un_node_star":e.map(c=>{this.starNode(c,!1)});break;case"fix_nodes":e.map(c=>{this.toggleMove(c,!0)});break;case"un_fix_nodes":e.map(c=>{this.toggleMove(c,!1)}),this.updateSimulation();break;case"all_fix_nodes":this.fixAllNodes(!0);break;case"all_un_fix_nodes":this.fixAllNodes(!1);break;case"expand_node":e.map(c=>{this.$parent.expandNodes(c)});break;case"expand_part_node":e.map(c=>{this.$parent.expandNodes(c,n)});break;case"go_result":this.handleGoDetail(e);break;case"delete_node":this.$parent.deleteNodes(e);break;case"select_children":this.selectChildren(e[0]);break;case"select_parents":this.selectParents(e[0]);break;case"undo":this.$parent.historyBack();break;case"redo":this.$parent.historyForward();break;case"add_con_node":this.$parent.$refs.buttonList.addNode("diy",e[0]);break;case"add_link":this.$parent.$refs.buttonList.addNode("diy",e[0]);break;case"show_node":this.toggleShowNode(e[0],e[1],!0);break;case"hide_node":this.toggleShowNode(e[0],e[1],!1);break;default:ye(this,"custom-contextmenu-click",{eventName:t.name,customConfig:t.customConfig,nodes:e,allNodes:s.toRaw(this.history.dataNow.nodes)})}this.hideContextMenu(),setTimeout(()=>{this.updateSelection()},400)}else Lt({message:"无可操作权限",type:"warning"})},expandNodes(e,t){en({cId:"dblclick",c:"双击节点"}),this.requestGraphData?this.$parent.expandNodes(t):Lt({message:"无可操作权限",type:"warning"})},toggleShowNode(e,t,n=!0){this.history.toggleShowNode(e,t,n),this.selection.filter(o=>o.show).length>0||this.handleTableSelect([]),setTimeout(this.updateNodeStyle,100)},copyNodeText(e){let t="";e.filter(n=>n.type!=="aggregation"&&n.type!=="nodeType").map(n=>{t=t+n.id+`
145
- `}),t&&nEe(t).then(()=>{Lt({message:"复制成功",type:"success"})},n=>{console.log("copy---e",n)})},toggleMove(e,t){e.fx=t?e.x:null,e.fy=t?e.y:null},autoDisplay(){this.nodes.map(e=>{e.fx=null,e.fy=null})},editLabel(e){var t;g5.prompt("修改备注",{confirmButtonText:"确定",cancelButtonText:"取消",inputValue:(t=e[0])==null?void 0:t.label,inputPlaceholder:"请输入备注,最多20字",inputValidator:n=>n.length>20?"已超过20字":!0}).then(({value:n})=>{e.map(r=>{r.label=n,this.showLabel(r,"label")}),this.updateNodeStyle()}).catch(n=>{console.log(n)})},showLabel(e,t){e.textProp=t,this.update()},hideLabel(e,t){e.textProp=null,this.update()},safeGet(e,t){return!e||!t?void 0:t.split(".").reduce((o,a)=>o&&o[a]?o[a]:void 0,e)},fixAllNodes(e=!0){this.nodes.map(t=>{this.toggleMove(t,e)}),!e&&this.isAutoTick&&this.updateSimulation()},highlightByRule(e,t){if(!e.prop&&!t){this.nodes.forEach(l=>{const d=this.nodesGroup[l.id];d==null||d.removeName("lowlight")}),this.links.forEach(l=>{const d=this.linksGroup[`${l.source.id}-${l.target.id}`];d==null||d.removeName("lowlight")});return}const{type:n,prop:r,value:o}=e,a=this,c=[];this.nodes.forEach(l=>{const d=this.nodesGroup[l.id];r?n==="include"?o.includes(a.safeGet(l,r))&&a.inNodesRange(t,l)?(d==null||d.removeName("lowlight"),c.push(l)):d==null||d.addName("lowlight"):n==="equal"?a.safeGet(l,r)===o&&a.inNodesRange(t,l)?(d==null||d.removeName("lowlight"),c.push(l)):d==null||d.addName("lowlight"):n==="boolean"&&(j0(a.safeGet(l,r))&&a.inNodesRange(t,l)?(d==null||d.removeName("lowlight"),c.push(l)):d==null||d.addName("lowlight")):a.inNodesRange(t,l)?(d==null||d.removeName("lowlight"),c.push(l)):d==null||d.addName("lowlight")}),this.links.forEach(l=>{const d=this.linksGroup[`${l.source.id}-${l.target.id}`];c.some(f=>f.id===l.target.id)?d==null||d.removeName("lowlight"):d==null||d.addName("lowlight")})},handleCustomSelect(e){if(this.handleDeselectNode(),!e.prop)return;const{type:t,prop:n,value:r}=e,o=this;this.nodes.forEach(a=>{if(n&&t==="include"){let c;if(a.type==="nodeType"){const l=o.safeGet(a,"parents"),d=o.safeGet(a,"children"),u=l==null?void 0:l.some(p=>r.includes(p)),f=d==null?void 0:d.some(p=>r.includes(p));c=u&&f}(r.includes(o.safeGet(a,n))||c)&&this.selection.push(a)}}),this.updateSelection()},inNodesRange(e,t){return e?e.some(n=>n===t.id):!0},loadFlagFiles(e){return Te(this,null,function*(){return new Promise(t=>{this.flagFiles[e]?t(this.flagFiles[e]):(this.flagFiles[e]=this.imgPath[`${this.prefix}d3svg1/flags/${e}.png`],t(this.flagFiles[e]))})})},getNodeImage(e){return Te(this,null,function*(){var o,a,c,l,d,u,f,p,h,m;let t=null;const n=(c=(a=(o=e.detail)==null?void 0:o.info)==null?void 0:a.basic)==null?void 0:c.flag,r=(u=(d=(l=e==null?void 0:e.detail)==null?void 0:l.info)==null?void 0:d.basic)==null?void 0:u.level;if(e.detail&&((p=(f=e.detail)==null?void 0:f.info)!=null&&p.inner_img))try{t=yield ga(e.detail.info.inner_img)}catch(b){console.log("loadCompleted error",b)}else if(e.type==="nodeType"||e.type==="aggregation"){const b=e.icon||"node_type";if(cr[b])return t=cr[b],t;t=this.iconFiles[b]?this.iconFiles[b]:this.iconFiles.node_type,t=yield ga("data:image/svg+xml,"+encodeURIComponent(t)),cr[b]=t}else if(n&&(e.type==="ip"||e.type==="internet")){if(cr[n])return t=cr[n],t;yield this.loadFlagFiles(n),t=yield ga(this.flagFiles[n]),cr[n]=t}else if((m=(h=e.detail)==null?void 0:h.info)!=null&&m.inner_country&&(e.type==="country"||e.type==="target_country")){const b=e.detail.info.inner_country;if(cr[b])return t=cr[b],t;yield this.loadFlagFiles(b),t=yield ga(this.flagFiles[b]),cr[b]=t}else{const b=`${e.type||"node"}${r}${this.darkMode}`;if(cr[b])return t=cr[b],t;t=this.iconFiles[e.type]?this.iconFiles[e.type]:this.iconFiles.node;const w=as(r,this.levelList,this.darkMode),_=this.darkMode?"#182628":"#fff";t=C5(t,w,_);try{t=yield ga("data:image/svg+xml,"+encodeURIComponent(t))}catch(C){console.log(C)}cr[b]=t}return t})},handleGoDetail(e){e.forEach(t=>{if(t.isCluster)return;const n=t.type,r=this.moduleDetail.config.jumpRule[n];if(r)if(n==="org"){const o=t.id.split("(")[0];o.indexOf("APT")>=0&&window.open(r.split("${id}").join(o),t.id)}else{let o=t.origin&&t.origin[0]||t.id;(n==="url"||n==="virus")&&(o=encodeURIComponent(o)),window.open(r.split("${id}").join(o),t.id)}})},starNode(e,t=!0){e.collect=t,this.update()},handleAddBlack(e){this.showBlackType=!0,this.node=e},changeVisible(e){this.showBlackType=e},zoomIn(){this.adjustZoom(1.1)},zoomOut(){this.adjustZoom(.909)},adjustZoom(e){const n=this.stage.scaleX()*e;this.scale=n;const r={x:this.stage.width()/2,y:this.stage.height()/2},o={x:this.stage.getPointerPosition().x-this.stage.x(),y:this.stage.getPointerPosition().y-this.stage.y()},a={x:-(o.x-r.x)*(e-1),y:-(o.y-r.y)*(e-1)};this.stage.setAttrs({x:this.stage.x()+a.x,y:this.stage.y()+a.y,scaleX:n,scaleY:n}),this.layer.batchDraw()},addNodesDetail(e){return Te(this,null,function*(){const t=e.filter(o=>!o.detail&&o.noDetail!==!0&&o.type!=="aggregation"&&o.type!=="nodeType"),n={};t.map(o=>{n[o.type]?n[o.type].push(o):n[o.type]=[o]});const r=[];for(const o in n){const a=n[o],c={};a.map(l=>{l.origin&&(c[l.id]=l.origin)}),r.push(this.graphApi.getNodesDetail({api:this.moduleDetail.node_info[n[o][0].type],node_id:n[o].map(l=>l.id),origin:c}).then(l=>(l.data.records.map(u=>{const f=e.find(p=>p.id===u.info.id);f.detail=u}),Promise.resolve({}))))}})},addCanvasBg(){this.darkMode&&(this.darkBgRect=new ct.Rect({x:0,y:0,width:this.stage.width()/this.scale,height:this.stage.height()/this.scale,fill:"#021212",stroke:"#021212",listening:!1,draggable:!1}),this.layer.add(this.darkBgRect),this.darkBgRect.moveToBottom(),this.stage.draw())},removeCanvasBg(){this.darkBgRect&&this.darkBgRect.destroy(),this.darkBgRect=null,this.stage.draw()}}},sEe={class:"main-svg-box","element-loading-text":"布局中...","element-loading-background":"rgba(122, 122, 122)"},aEe={ref:"canvasContainer",class:"canvas-container"};function lEe(e,t,n,r,o,a){const c=s.resolveComponent("popover"),l=s.resolveComponent("node-contextmenu"),d=f5;return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["render-container",n.darkMode?"dark-theme "+o.uniqueClass:" "+o.uniqueClass])},[s.withDirectives((s.openBlock(),s.createElementBlock("div",sEe,[s.createElementVNode("div",aEe,null,512)])),[[d,o.ticking]]),s.createVNode(c,{"dark-mode":n.darkMode,"show-popover":o.showPopover&&!o.isDragging,"mouse-position":o.hoverNodePosition,"node-info":o.popoverNode,"module-detail":n.moduleDetail,type:o.popoverType,history:n.history,data:n.history.dataNow},null,8,["dark-mode","show-popover","mouse-position","node-info","module-detail","type","history","data"]),n.isThreatPath?s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(l,{key:0,show:a.showContextMenuFlag,axis:o.mousePosition,"node-info":a.contextMenuNodes,history:n.history,"menu-options":o.menuOptions,"module-detail":n.moduleDetail,onContextmenuClick:a.handleContextMenuClick},null,8,["show","axis","node-info","history","menu-options","module-detail","onContextmenuClick"]))],2)}const $l=Bt(oEe,[["render",lEe]]),XNe="",QNe="",ZNe="",{toClipboard:xR}=uf(),cEe={name:"SnapShotDialog",components:{},mixins:[],props:{snapshot:{type:Object,default:()=>{}},graphApi:{type:Object,default:()=>{}}},data(){return{dialogVisible:!1,origin:window.location.origin,ruleForm:{radio:"0",event:"",group:"",graphDesc:""},rules:{event:[{required:!0,message:"请选择安全事件",trigger:"change"}],group:[{required:!1,message:"请选择团队",trigger:"change"}]},eventOptions:[{value:"",label:""}],groupOptions:[{value:"",label:""}],hostList:["https://sc.360.net","https://sc.b.qihoo.net","http://sec.test.safe.qihoo.net"],isInnerAccount:!1,visibleSuccess:!1,eventUrl:null}},computed:{},watch:{snapshot:{handler:function(e,t){e.name&&(this.ruleForm.graphDesc=e.name)},immediate:!0,deep:!0}},created(){this.graphApi.getReportList&&this.graphApi.getReportList().then(e=>{e.data!==null&&(this.eventOptions=[],e.data.map(t=>{this.eventOptions.push({label:t.title,value:t.report_id})}))}),this.graphApi.getGroupList&&this.graphApi.getGroupList().then(e=>{e.data!==null?(this.groupOptions=[],e.data.map(t=>{this.groupOptions.push({label:t.group_name,value:t.group_id})}),this.isInnerAccount=!0):this.isInnerAccount=!1})},mounted(){},updated(){},beforeUnmount(){},methods:{hanleClickCopy(e){xR(e).then(t=>Lt({message:"复制成功",type:"success"}),t=>Lt.error("复制失败"))},show(){this.dialogVisible=!0},hide(){this.dialogVisible=!1,this.resetForm("ruleForm")},submitForm(e){this.$refs[e].validate(t=>{if(t){const n=this.hostList.some(l=>l===this.origin);let r=null;n?this.origin===this.hostList[1]?r=`${this.hostList[0]}/graph?snapshot_id=${this.snapshot.snapshot_id}&vcode=${this.snapshot.vcode}`:r=`${this.origin}/graph?snapshot_id=${this.snapshot.snapshot_id}&vcode=${this.snapshot.vcode}`:r=`http://test.sec.360.net/graph?snapshot_id=${this.snapshot.snapshot_id}&vcode=${this.snapshot.vcode}`,this.eventUrl=window.location.origin+"/event/"+this.ruleForm.event;const o=this.snapshot.thumb;let a=null;this.groupOptions.map(l=>{l.value===this.ruleForm.group&&(a=l.label)});const c={report_id:this.ruleForm.event,group_id:this.ruleForm.group,content:o,graph_url:r,group_name:a,acl:parseInt(this.ruleForm.radio),head:this.ruleForm.graphDesc};this.graphApi.addGraph(c).then(l=>{l.code==="0"?(xR(this.eventUrl),Lt({message:"分享成功! 分享事件地址已经复制",type:"success",showClose:!0,duration:5e3})):Lt({message:"分享失败",type:"error"})}).catch(()=>{Lt({message:"分享失败",type:"error"})}),this.resetForm(e),this.dialogVisible=!1}else return!1})},resetForm(e){this.$refs[e].resetFields(),this.snapshot.name=""}}},dEe={class:"sharetoEvents"},uEe={class:"lable-header"},fEe={class:"desc"},hEe={key:0,class:"desc-font"},pEe={key:1,class:"desc-font"},gEe={class:"dialog-footer"};function mEe(e,t,n,r,o,a){const c=ZK,l=ef,d=Vu,u=r0,f=es,p=n0,h=ns,m=kc;return s.openBlock(),s.createElementBlock("div",dEe,[s.createVNode(m,{title:"分享到安全事件","append-to-body":"","close-on-click-modal":!1,width:"25%",modelValue:o.dialogVisible,"onUpdate:modelValue":t[6]||(t[6]=b=>o.dialogVisible=b),class:"el-dialog-graph"},{footer:s.withCtx(()=>[s.createElementVNode("span",gEe,[s.createVNode(h,{type:"primary",onClick:t[5]||(t[5]=b=>a.submitForm("ruleForm"))},{default:s.withCtx(()=>[s.createTextVNode("确认分享")]),_:1}),s.createVNode(h,{onClick:a.hide},{default:s.withCtx(()=>[s.createTextVNode("关闭")]),_:1},8,["onClick"])])]),default:s.withCtx(()=>[s.createVNode(p,{ref:"ruleForm",model:o.ruleForm,rules:o.rules,"label-width":"100px",class:"demo-ruleForm"},{default:s.withCtx(()=>[s.createElementVNode("div",uEe,[s.createVNode(c,{modelValue:o.ruleForm.radio,"onUpdate:modelValue":t[0]||(t[0]=b=>o.ruleForm.radio=b),class:"el-radio",label:"1",border:"",size:"medium"},{default:s.withCtx(()=>[s.createTextVNode("付费可见")]),_:1},8,["modelValue"]),s.createVNode(c,{modelValue:o.ruleForm.radio,"onUpdate:modelValue":t[1]||(t[1]=b=>o.ruleForm.radio=b),label:"0",border:"",size:"medium"},{default:s.withCtx(()=>[s.createTextVNode("开放")]),_:1},8,["modelValue"]),s.createElementVNode("div",fEe,[o.ruleForm.radio==="0"?(s.openBlock(),s.createElementBlock("span",hEe,"该Graph内容对所有用户可见。")):(s.openBlock(),s.createElementBlock("span",pEe,"该Graph内容对付费用户可见。"))])]),s.createVNode(u,{label:"安全事件",prop:"event"},{default:s.withCtx(()=>[s.createVNode(d,{modelValue:o.ruleForm.event,"onUpdate:modelValue":t[2]||(t[2]=b=>o.ruleForm.event=b),"popper-append-to-body":!1,filterable:"",placeholder:"请选择",class:"select-item"},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(o.eventOptions,b=>(s.openBlock(),s.createBlock(l,{key:b.value,label:b.label,value:b.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),o.isInnerAccount?(s.openBlock(),s.createBlock(u,{key:0,label:"选择团队",prop:"group"},{default:s.withCtx(()=>[s.createVNode(d,{modelValue:o.ruleForm.group,"onUpdate:modelValue":t[3]||(t[3]=b=>o.ruleForm.group=b),class:"select-item",filterable:"",placeholder:"请选择"},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(o.groupOptions,b=>(s.openBlock(),s.createBlock(l,{key:b.value,label:b.label,value:b.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})):s.createCommentVNode("",!0),s.createVNode(u,{label:"Graph介绍",prop:"graphDesc"},{default:s.withCtx(()=>[s.createVNode(f,{modelValue:o.ruleForm.graphDesc,"onUpdate:modelValue":t[4]||(t[4]=b=>o.ruleForm.graphDesc=b),type:"textarea",rows:2,placeholder:"请输入内容",maxlength:"50",clearable:""},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["modelValue"])])}const vEe=Bt(cEe,[["render",mEe]]),VNe="",{toClipboard:yEe}=uf(),bEe={name:"SnapShotDialog",components:{ShareToSecurityEvents:vEe},mixins:[],props:{graphUrlPath:{type:String,default:"/graph"},snapshot:{type:Object,default:()=>{}},graphApi:{type:Object,default:()=>{}}},data(){return{dialogVisible:!1,origin:window.location.origin,isInnerAccount:!1}},computed:{},watch:{},created(){},mounted(){uo(qe,"sharePermission",e=>{this.isInnerAccount=e})},updated(){},beforeUnmount(){fo(qe,"sharePermission")},methods:{hanleClickCopy(e){yEe(e).then(t=>Lt({message:"复制成功",type:"success"}),t=>Lt.error("复制失败"))},show(){this.dialogVisible=!0},hide(){this.dialogVisible=!1},shareToEvents(){this.dialogVisible=!1,this.$refs.sharetoevents.show()}}},wEe={class:"snapshotdialog-container"},_Ee={class:"dialog-footer"};function CEe(e,t,n,r,o,a){const c=es,l=EY,d=ns,u=kc,f=s.resolveComponent("ShareToSecurityEvents");return s.openBlock(),s.createElementBlock("div",wEe,[s.createVNode(u,{title:"复制链接及提取码","append-to-body":"",modelValue:o.dialogVisible,"onUpdate:modelValue":t[2]||(t[2]=p=>o.dialogVisible=p),"close-on-click-modal":!1,class:"el-dialog-graph"},{footer:s.withCtx(()=>[s.createElementVNode("span",_Ee,[o.isInnerAccount?(s.openBlock(),s.createBlock(d,{key:0,type:"primary",onClick:t[0]||(t[0]=p=>a.shareToEvents())},{default:s.withCtx(()=>[s.createTextVNode("分享到安全事件")]),_:1})):s.createCommentVNode("",!0),s.createVNode(d,{type:"primary",onClick:t[1]||(t[1]=p=>a.hanleClickCopy(`${o.origin}${n.graphUrlPath}?snapshot_id=${n.snapshot.snapshot_id}&vcode=${n.snapshot.vcode}`))},{default:s.withCtx(()=>[s.createTextVNode("复制链接及提取码")]),_:1}),s.createVNode(d,{onClick:a.hide},{default:s.withCtx(()=>[s.createTextVNode("关闭")]),_:1},8,["onClick"])])]),default:s.withCtx(()=>[s.createVNode(c,{value:`${o.origin}${n.graphUrlPath}?snapshot_id=${n.snapshot.snapshot_id}`},{prepend:s.withCtx(()=>[s.createTextVNode("链接地址:")]),_:1},8,["value"]),s.createVNode(l),s.createVNode(c,{value:n.snapshot.vcode},{prepend:s.withCtx(()=>[s.createTextVNode("提取码:")]),_:1},8,["value"])]),_:1},8,["modelValue"]),s.createVNode(f,{ref:"sharetoevents",snapshot:n.snapshot,"graph-api":n.graphApi},null,8,["snapshot","graph-api"])])}const SEe=Bt(bEe,[["render",CEe]]),eTe="",EEe={name:"ForceGraphByCanvas",components:{Loading:Su,ForceGraphSvgIcon:ss,RenderByCanvas:$l,ButtonList:nie,SnapShotDialog:SEe,RightMenu:Aee,Legend:Ine},mixins:[jr],provide:function(){return{history:this.history,hasLevel:this.hasLevel,levelList:this.levelList,levelMap:this.levelMap,getDarkMode:()=>this.darkMode,requestGraphData:this.requestGraphData,moduleDetail:()=>this.moduleDetail}},props:{showPoint:{type:Boolean,default:!0},isRenderStartNode:{type:Boolean,default:!0},isDefaultSelectStartNode:{type:Boolean,default:!0},isShowRightMenu:{type:Boolean,default:!0},hideButtonList:{type:Array,default:()=>[]},customContextMenuEvent:{type:Function},handleSelectNodeEvent:{type:Function},handleDataLoaded:{type:Function},graphApi:{type:Object,default:()=>{}},graphUrlPath:{type:String,default:"/graph"},snapshot_id:{type:String,default:""},vcode:{type:String,default:""},module:{type:String,default:""},startNode:{type:Array,default:()=>[]},enterStartNode:{type:Boolean,default:!1},hasLevel:{type:Boolean,default:!0},levelList:{type:Array,default:()=>[{level:"未知",levelName:"未知",className:"unknown",iconType:"",normalColor:"#666",darkColor:"#c6cdd5",dangerNumber:0},{level:"危险",levelName:"危险",className:"warn",iconType:"",normalColor:"#CF1322",darkColor:"#fb2400",dangerNumber:1},{level:"普通",levelName:"普通",className:"normal",iconType:"",normalColor:"#007EE2",darkColor:"#0094ff",dangerNumber:-1},{level:"安全",levelName:"安全",className:"safe",iconType:"",normalColor:"#009A75",darkColor:"#00da90",dangerNumber:-2}]},showLevelCount:{type:Boolean,default:!1},darkMode:{type:Boolean,default:!1},title:{type:String,default:""},isShowNodeMessage:{type:Boolean,default:!0},nodeTypeScale:{type:Number},singlesNodeMaxNum:{type:Number,default:100},startNodeAnimation:{type:Boolean,default:!0}},emits:["sharePermission","custom-contextmenu-click","handle-select-node","handle-data-loaded","outdate"],data(){return{history:new MQ({isShowNodeMessage:this.isShowNodeMessage}),isLoading:!1,bigLoading:!1,loadingInfo:"数据加载中",moduleDetail:{},contextMenuNode:{},contextMenuId:0,isDragging:!1,isCtrlDown:!1,selection:[],snapshot:{},inited:!1,outdateTime:0,fullScreen:!1,generateUniqueIndexNow:this.generateUniqueIndex(),screenHeight:0,margin:"0",requestGraphData:!0,nodeTypeList:[]}},computed:{topFrame(){return window.top.location===window.location},levelMap(){const e={};return this.levelList.forEach(t=>{e[t.level]=t}),e}},watch:{startNode:{handler:function(e,t){this.moduleDetail.module&&this.searchStartNode()},immediate:!0,deep:!0},screenHeight:{deep:!0,handler:function(){this.margin=this.changeMargin()}}},created(){return Te(this,null,function*(){if(this.snapshot_id)this.isLoading=!0,this.graphApi.getSnapshotDetail({snapshot_id:this.snapshot_id,vcode:this.vcode}).then(e=>{this.moduleDetail=e.data.config,this.history.initFromSnapshot(JSON.parse(e.data.data)),setTimeout(()=>{this.$refs.render.updateNodeStyle(),this.centerAndZoom(.8,!1)},1e3)}).catch(e=>{console.log(e,"e")}).finally(e=>{this.isLoading=!1});else if(this.module)this.initGraph();else{Lt.error("请传入模块名称");return}this.graphApi.userInfo&&this.graphApi.userInfo().then(e=>{e.data!==null&&(ye(qe,"sharePermission",e.data.access.graph_share),this.requestGraphData=e.data.access.request_graph_data)}).catch(e=>{this.onOutdate(e.res)})})},unmounted(){window.onresize=null},mounted(){return Te(this,null,function*(){window.onresize=()=>{this.fullScreen=!!document.fullscreenElement,this.screenHeight=document.body.clientHeight},this.margin=this.changeMargin(),uo(qe,"emitDataLoaded",()=>{this.emitDataLoaded()})})},methods:{handleCustomContextMenuClick(e){this.customContextMenuEvent&&typeof this.customContextMenuEvent=="function"?this.customContextMenuEvent(s.toRaw(e)):ye(this,"custom-contextmenu-click",s.toRaw(e))},handleSelectNode(e){this.handleSelectNodeEvent&&typeof this.handleSelectNodeEvent=="function"?this.handleSelectNodeEvent(s.toRaw(e),s.toRaw(this.history.dataNow)):ye(this,"handle-select-node",s.toRaw(e))},searchStartNode(){this.startNode.length>0&&!this.inited&&this.startNode.map(e=>{const t={type:e.type,id:e.id,startNode:!0};this.inited=!0,this.moduleDetail.nodes.findIndex(n=>e.type===n.name)>=0?this.addNewNodesAndExpand(t):(Lt({message:"无相关数据",type:"warning"}),this.emitDataLoaded())})},initGraph(){return Te(this,null,function*(){var e;(e=this.graphApi)==null||e.getGraphConfig({name:this.module}).then(t=>{this.moduleDetail=t.data,this.searchStartNode(),!this.inited&&this.enterStartNode&&this.$refs.buttonList.addNode("search")}).catch(t=>{this.onOutdate(t.res),this.emitDataLoaded(),console.log("e",t)})})},addNewNodesAndExpand(e){this.isLoading=!0,this.graphApi.getNodesDetail({api:this.moduleDetail.node_info[e.type],node_id:[e.id],nodeType:e.type,moduleDetail:this.moduleDetail}).then(t=>{var o,a,c;let n={id:(o=t.data.records[0])==null?void 0:o.info.id,type:(a=t.data.records[0])==null?void 0:a.info.type,startNode:!0,detail:t.data.records[0],group:e.id,name:((c=t.data.records[0])==null?void 0:c.info.name)||e.id};n=_i(n,this.moduleDetail.plugs);const r={addOne:{nodes:[n],links:[]}};this.isRenderStartNode&&(this.history.pushState(r),this.history.updateData(t.data.records,[e.id]),setTimeout(()=>{this.isDefaultSelectStartNode&&(this.handleTableSelect([e.id]),setTimeout(()=>{this.selection.length&&this.handleSelectNode({isSelected:!0,_node:this.selection[0]})},0))},500)),this.expandNodes(n)}).catch(t=>{console.log(t,"e"),this.emitDataLoaded(),this.onOutdate(t.res),Lt({message:"无该节点信息",type:"warning"})}).finally(()=>{this.isLoading=!1})},onAction(e){this.history.pushState(e)},onOutdate(e){(e==null?void 0:e.code)==="AC100001"&&this.outdateTime<1&&(this.outdateTime++,ye(this,"outdate"))},expandNodes(e,t){return Te(this,null,function*(){if(!(e!=null&&e.type))return;const n=this.moduleDetail.plugs[e==null?void 0:e.type];let r=[];t?(r=Array.isArray(t)?[...t]:[t],e.apis===void 0&&(e.apis=[]),e.apis.push(...r)):(e.expand=1,e.apis=[],e.apis.push({namec:"拓线全部",value:0,name:"",flagSelect:!0}),n==null||n.map(u=>{u.children?r.push(...u.children):r.push(u)}));const o=r.map(u=>this.graphApi.getGraphRequest({api:u.name,node_id:e.id,origin:e.origin,nodeType:e.type,moduleDetail:this.moduleDetail}).then(f=>Promise.resolve(ue(ae({},f),{api:u.name,apiC:u.relay_name,icon:u.icon,note_name:u.note_name,canLoop:u.canloop}))).catch(f=>Promise.resolve(f)));this.isLoading=!0;let a;yield Promise.all(o).then(u=>{if(u.some(p=>{var h;return((h=p.res)==null?void 0:h.code)==="AC100001"})){this.onOutdate({code:"AC100001"});return}a=u.filter(p=>p.code==="0"||p.code===0)}).catch(u=>{console.log(u,"e")}).finally(u=>{this.isLoading=!1});const c=[];let l=[];if(a&&a.forEach(u=>{if(e.getData[u.api]=!0,this.history.dataNow.nodes.find(w=>w.id===e.id)&&(this.history.dataNow.nodes.find(w=>w.id===e.id).getData[u.api]=!0),!u.data)return;let f;const p=u.data.nodes.map(w=>(w.group=e.id+"-"+u.api,w.groupC=u.apiC,w=_i(w,this.moduleDetail.plugs),w)),h=e.id+"-"+u.api;let m={id:h,name:u.apiC,note_name:u.note_name,type:"nodeType",icon:u.icon};const b={source:e.id,target:h};if(m=_i(m,this.moduleDetail.plugs),this.nodeTypeList.push(u.icon||"node_type"),p.length>0&&this.isRenderStartNode){if(f=u.data.links.map(w=>{let _;if(w.source===e.id){const C=this.history.dataNow.nodes.filter(k=>k.id===w.target);if(C.length>0&&(_=this.findGrandSonNodeIds(C[0]).indexOf(w.source)>=0),!u.api.canLoop&&_)return;w.source=h}else w.target===e.id&&(w.target=h);return w}).filter(w=>w),f.length===0)return;f.push(b)}else f=u.data.links;if(this.isRenderStartNode&&p.length>=this.singlesNodeMaxNum){let w=null,_=null;const C=String(Math.floor(new Date().getTime()));w={id:C,list:p,type:"aggregation",name:"聚合",relationId:m.id},w=_i(w,this.moduleDetail.plugs),_={source:m.id,target:C,uniqueIndex:this.generateUniqueIndexNow()};const k={addOne:{nodes:[m,w],links:[b,_]},type:"aggregation"};this.history.pushState(k),this.getNodeDetail(w.list,w.id)}else f.length&&this.isRenderStartNode&&p.push(m),c.push(...p||[]),l.push(...f||[])}),!this.isRenderStartNode){const u={},f={},p=[];this.nodeTypeList.push("node_type"),l.forEach(h=>{const m=h.source+"-"+h.name;if(!u[m]){let b={id:m,name:h.name,type:"nodeType",icon:h.feature.icon};b=_i(b,this.moduleDetail.plugs),u[m]=b}f[m]?f[m].push(h):f[m]=[h]});for(const h in u)c.push(u[h]);for(const h in f)f[h].forEach(b=>{const w=ue(ae({},b),{source:b.source,target:h}),_=ue(ae({},b),{source:h,target:b.target});p.push(w),p.push(_)});l=p}l.map(u=>{u.uniqueIndex=this.generateUniqueIndexNow()});const d={addOne:{nodes:c,links:l}};(c.length>0||l.length>0)&&this.history.pushState(d),this.history.length===2&&setTimeout(()=>{this.centerAndZoom(.8,!1)},1e3),this.getNodeDetail(c)})},findGrandSonNodeIds(e){return this.history.dataNow.nodes.filter(r=>{var o;return((o=e.children)==null?void 0:o.indexOf(r.id))>=0}).reduce((r,o)=>(r.push(...o.children||[]),r),[])||[]},centerAndZoom(e,t){var n;(n=this.$refs.render)==null||n.centerAndZoom(e,t)},generateUniqueIndex(){let e=0;return function(){return e++}},reset(){this.$refs.render.reset()},getNodeDetail(e,t){const r=this.history.dataNow.nodes.filter(c=>e.findIndex(l=>l.id===c.id)>=0).filter(c=>!c.detail&&c.noDetail!==!0&&c.type!=="aggregation"&&c.type!=="nodeType"),o={};r.map(c=>{o[c.type]?o[c.type].push(c):o[c.type]=[c]});let a=Object.keys(o).length;for(const c in o){const l=o[c],d={};l.map(u=>{u.origin&&(d[u.id]=u.origin)}),this.graphApi.getNodesDetail({api:this.moduleDetail.node_info[o[c][0].type],node_id:o[c].map(u=>u.id),origin:d,nodeType:o[c][0].type,moduleDetail:this.moduleDetail}).then(u=>{const f=u.data.records;t?this.history.updateAggregationDetail(f,o[c].map(p=>p.id),t):this.history.updateData(f,o[c].map(p=>p.id))}).catch(u=>{this.onOutdate(u.res)}).finally(()=>{a=a-1,a===0&&(Gn(" 数据加载完"),this.emitDataLoaded())})}Object.keys(o).length||this.emitDataLoaded()},emitDataLoaded(){this.handleDataLoaded&&typeof this.handleDataLoaded=="function"?this.handleDataLoaded({dataNow:s.toRaw(this.history.dataNow)}):ye(this,"handle-data-loaded",{dataNow:s.toRaw(this.history.dataNow)})},addNode({node:e,type:t,connectNode:n}){if(this.history.dataNow.nodes.findIndex(a=>a.id===e.id)>-1){Lt({type:"warning",message:"该节点已存在,添加失败"});return}let o;if(t==="diy"&&e.type==="nodeType"){let a=ue(ae({},e),{detail:null,diy:!0,group:e.id});a=_i(a,this.moduleDetail.plugs);const c=n?{source:n.id,target:e.id,uniqueIndex:this.generateUniqueIndexNow()}:null;o={addOne:{nodes:[a],links:c?[c]:[]}},this.history.pushState(o)}else t==="diy"?this.graphApi.getNodesDetail({api:this.moduleDetail.node_info[e.type],node_id:[e.id],nodeType:e.type,moduleDetail:this.moduleDetail}).then(a=>{var d,u,f;let c={id:(d=a.data.records[0])==null?void 0:d.info.id,type:(u=a.data.records[0])==null?void 0:u.info.type,detail:a.data.records[0],group:e.id,name:((f=a.data.records[0])==null?void 0:f.info.name)||e.id};c=_i(c,this.moduleDetail.plugs);const l=n?{source:n.id,target:e.id,uniqueIndex:this.generateUniqueIndexNow()}:null;o={addOne:{nodes:[c],links:l?[l]:[]}},this.history.pushState(o)}).catch(a=>{this.onOutdate(a.res);let c=ue(ae({},e),{detail:null,diy:!0,group:e.id});c=_i(c,this.moduleDetail.plugs);const l=n?{source:n.id,target:e.id,uniqueIndex:this.generateUniqueIndexNow()}:null;o={addOne:{nodes:[c],links:l?[l]:[]}},this.history.pushState(o)}).finally(a=>{setTimeout(()=>{},500)}):this.addNewNodesAndExpand(e)},addLink(e,t){if(!([e,t].filter(a=>a.type==="nodeType").length===1))return;const r={source:e.id,target:t.id,uniqueIndex:this.generateUniqueIndexNow(),diy:!0};let o=!1;if(this.history.dataNow.links.map(a=>{a.source.id===e.id&&a.target.id===t.id&&(o=!0)}),!o){const a={addOne:{links:[r]}};this.onAction(a)}},expandSelectedNodes(e){e.map(t=>{this.expandNodes(t)})},handleTableSelect(e=[]){this.$refs.render.handleTableSelect(e)},updateSelection(){this.selection=this.$refs.render.selection,this.$refs.render.selectEdgesByNode(this.selection),this.$refs.render.showKeyWay(this.selection),this.$refs.render.updateNodeStyle()},aggregationNodes(e,t){if(e.length===0)return;const n=[];for(const c in this.history.dataNow.nodes)e.findIndex((d,u,f)=>d===this.history.dataNow.nodes[c].id)>=0&&n.push(JSON.parse(JSON.stringify(this.history.dataNow.nodes[c])));const r=String(Math.floor(new Date().getTime()));let o={id:r,list:n,type:"aggregation",name:"聚合",relationId:t.id};o=_i(o,this.moduleDetail.plugs);const a={addOne:{nodes:[o],links:[{source:t.id,target:r,uniqueIndex:this.generateUniqueIndexNow()}]},deleteOne:{nodes:n,links:n.map(c=>({source:t.id,target:c.id}))},type:"aggregation"};this.history.pushState(a),this.emitDataLoaded()},releaseAggregation(e){let t;if(e.type==="aggregation"&&(t=e),this.history.dataNow.links.map(n=>{n.source.id===e.id&&n.target.type==="aggregation"&&(t=t||n.target,n.source)}),t){const n={deleteOne:{nodes:[t],links:[{source:t.relationId,target:t.id}]},addOne:{nodes:t.list,links:t.list.map(r=>({source:t.relationId,target:r.id}))},type:"aggregation"};for(const r in this.history.dataNow.nodes)t.list.findIndex((a,c,l)=>a===this.history.dataNow.nodes[r].id)>=0&&(this.history.dataNow.nodes[r].aggregation=!1);this.history.pushState(n),this.emitDataLoaded()}},saveSnapshot(){return Te(this,null,function*(){g5.prompt(null,"添加快照",{confirmButtonText:"确定",cancelButtonText:"取消",inputPattern:/^.{1,20}$/,inputPlaceholder:"请输入20字以内快照名称",inputErrorMessage:"请输入20字以内快照名称"}).then(t=>Te(this,[t],function*({value:e}){this.bigLoading=!0,setTimeout(()=>Te(this,null,function*(){const n=yield this.$refs.buttonList.svgToBlob(),r=new FormData;r.append("data",this.history.toString()),r.append("name",e),r.append("thumb",n),this.graphApi.addSnapshot1(r).then(o=>{this.snapshot=o.data,this.snapshot.name=e,this.$refs.snapshot.show()}).catch(o=>{this.onOutdate(o.res)}).finally(o=>{this.bigLoading=!1})}),100)})).catch(()=>{Lt({type:"info",message:"取消输入"})})})},autoDisplay(){this.$refs.render.autoDisplay()},deleteNodes(e=this.selection){const t={deleteOne:{nodes:e}};this.history.pushState(t),this.emitDataLoaded();const n=e.map(r=>r.id);this.$refs.render.selection=this.selection.filter(r=>!n.includes(r.id)),setTimeout(()=>{this.updateSelection()},300)},historyForward(){this.history.forward(),setTimeout(()=>{this.updateSelection()},100)},historyBack(){this.history.back(),setTimeout(()=>{this.updateSelection()},100)},toggleFullScreen(){en({cId:"toggleFullScreen",c:"切换全屏"}),document.fullscreenElement?document.exitFullscreen&&document.exitFullscreen():this.$refs["force-d3-container"].requestFullscreen()},zoomView(e="in"){e==="in"?(en({cId:"zoomIn",c:"zoomIn"}),this.$refs.render.zoomIn()):(en({cId:"zoomOut",c:"zoomOut"}),this.$refs.render.zoomOut())},fitScreen(){var e;en({cId:"centerAndZoom",c:"centerAndZoom"}),(e=this.$refs.render)==null||e.centerAndZoom()},changeMargin(){let e=0;const t=document.body.clientHeight;return e=Math.floor(((t-50)/20-22)/2),e>8?"8px 0":e+"px 0"},handleHighLight(e,t,n){this.$refs.render.setHighlightRule({type:e,prop:t,value:n})},handleCustomSelect(e,t,n){this.$refs.render.handleCustomSelect({type:e,prop:t,value:n})},fixAllNodes(e){this.$refs.render.fixAllNodes(e)},toggleLayout(e){this.$refs.render.toggleLayout(e)},importCsvData(e){for(const t in e.nodes)delete e.nodes[t].vx,delete e.nodes[t].vy,delete e.nodes[t].x,delete e.nodes[t].y;this.history.dataNow=Object.assign({},e)},getCanvasStage(){var e;return(e=this.$refs.render)==null?void 0:e.stage},addCanvasBg(){var e;(e=this.$refs.render)==null||e.addCanvasBg()},removeCanvasBg(){var e;(e=this.$refs.render)==null||e.removeCanvasBg()}}},xEe={ref:"force-d3-container",class:"d3-container"},kEe=["innerHTML"],NEe=s.createElementVNode("div",{class:"top-line-bg"},null,-1),TEe={class:"top-item"},AEe={class:"top-line"},OEe={key:1,class:"select-num"},IEe={class:"highlight"},REe={class:"loading-container"},PEe={class:"corner-button-box"};function LEe(e,t,n,r,o,a){const c=s.resolveComponent("ButtonList"),l=s.resolveComponent("RenderByCanvas"),d=s.resolveComponent("Loading"),u=Qe,f=s.resolveComponent("Legend"),p=s.resolveComponent("force-graph-svg-icon"),h=Hn,m=s.resolveComponent("RightMenu"),b=s.resolveComponent("SnapShotDialog"),w=f5;return s.withDirectives((s.openBlock(),s.createElementBlock("div",xEe,[s.createElementVNode("div",{class:s.normalizeClass(["graph-box",{"hide-right-menu":!n.isShowRightMenu}])},[n.title?(s.openBlock(),s.createElementBlock("div",{key:0,class:"safe-force-title",innerHTML:n.title},null,8,kEe)):s.createCommentVNode("",!0),NEe,s.createElementVNode("div",TEe,[s.createElementVNode("div",AEe,[s.createVNode(c,{ref:"buttonList","hide-button-list":n.hideButtonList,selection:o.selection,history:o.history,"module-detail":o.moduleDetail,"request-graph-data":o.requestGraphData,onSaveSnapshot:a.saveSnapshot,onAddNodes:a.addNode,onAutoDisplay:a.autoDisplay,onDeleteNodes:a.deleteNodes,onFixNodes:a.fixAllNodes,onToggleLayout:a.toggleLayout,onImportCsvData:a.importCsvData},null,8,["hide-button-list","selection","history","module-detail","request-graph-data","onSaveSnapshot","onAddNodes","onAutoDisplay","onDeleteNodes","onFixNodes","onToggleLayout","onImportCsvData"])])]),s.createVNode(l,{ref:"render","module-detail":o.moduleDetail,history:o.history,"level-list":n.levelList,selection:o.selection,data:o.history.dataNow,"request-graph-data":o.requestGraphData,"dark-mode":n.darkMode,"node-type-scale":n.nodeTypeScale,"node-type-list":o.nodeTypeList,startNodeAnimation:n.startNodeAnimation,onUpdateSelection:a.updateSelection,onOnaction:a.onAction,onHandleSelectNode:a.handleSelectNode,onCustomContextmenuClick:a.handleCustomContextMenuClick},null,8,["module-detail","history","level-list","selection","data","request-graph-data","dark-mode","node-type-scale","node-type-list","startNodeAnimation","onUpdateSelection","onOnaction","onHandleSelectNode","onCustomContextmenuClick"]),o.selection.length>0?(s.openBlock(),s.createElementBlock("p",OEe,[s.createTextVNode(" 已选择"),s.createElementVNode("span",IEe,s.toDisplayString(o.selection.length),1),s.createTextVNode("项 ")])):s.createCommentVNode("",!0),s.withDirectives(s.createElementVNode("div",REe,[s.createElementVNode("span",null,s.toDisplayString(o.loadingInfo),1),s.createVNode(u,{class:"is-loading"},{default:s.withCtx(()=>[s.createVNode(d)]),_:1})],512),[[s.vShow,o.isLoading]]),s.createVNode(f,{"show-point":n.showPoint,history:o.history,"module-detail":o.moduleDetail,"has-level":n.hasLevel,"show-level-count":n.showLevelCount,margin:o.margin,onHighLight:a.handleHighLight},null,8,["show-point","history","module-detail","has-level","show-level-count","margin","onHighLight"]),s.createElementVNode("div",PEe,[!o.fullScreen&&a.topFrame?(s.openBlock(),s.createBlock(h,{key:0,content:"进入全屏",placement:"left","popper-class":"el-tooltip-gray"},{default:s.withCtx(()=>[s.createVNode(p,{"icon-class":e.imgPath["./public/d3svg1/button18/full_button.svg"],alt:"",class:"corner-button",onClick:a.toggleFullScreen},null,8,["icon-class","onClick"])]),_:1})):s.createCommentVNode("",!0),o.fullScreen&&a.topFrame?(s.openBlock(),s.createBlock(h,{key:1,content:"退出全屏",placement:"left","popper-class":"el-tooltip-gray"},{default:s.withCtx(()=>[s.createVNode(p,{"icon-class":e.imgPath["./public/d3svg1/button18/un_full_button.svg"],alt:"",class:"corner-button",onClick:a.toggleFullScreen},null,8,["icon-class","onClick"])]),_:1})):s.createCommentVNode("",!0),s.createVNode(h,{content:"适应屏幕",placement:"left","popper-class":"el-tooltip-gray"},{default:s.withCtx(()=>[s.createVNode(p,{"icon-class":e.imgPath["./public/d3svg1/button18/fit_button.svg"],alt:"",class:"corner-button",onClick:a.fitScreen},null,8,["icon-class","onClick"])]),_:1}),s.createVNode(h,{content:"放大",placement:"left","popper-class":"el-tooltip-gray"},{default:s.withCtx(()=>[s.createVNode(p,{"icon-class":e.imgPath["./public/d3svg1/button18/zoom_in_button.svg"],alt:"",class:"corner-button",onClick:t[0]||(t[0]=_=>a.zoomView("in"))},null,8,["icon-class"])]),_:1}),s.createVNode(h,{content:"缩小",placement:"left","popper-class":"el-tooltip-gray"},{default:s.withCtx(()=>[s.createVNode(p,{"icon-class":e.imgPath["./public/d3svg1/button18/zoom_out_button.svg"],alt:"",class:"corner-button",onClick:t[1]||(t[1]=_=>a.zoomView("out"))},null,8,["icon-class"])]),_:1})])],2),n.isShowRightMenu?(s.openBlock(),s.createBlock(m,{key:0,"graph-data":o.history.dataNow,"selected-nodes":o.selection,"request-graph-data":o.requestGraphData,onChangeBox:a.handleTableSelect},null,8,["graph-data","selected-nodes","request-graph-data","onChangeBox"])):s.createCommentVNode("",!0),s.createVNode(b,{ref:"snapshot",snapshot:o.snapshot,"graph-api":n.graphApi,"graph-url-path":n.graphUrlPath},null,8,["snapshot","graph-api","graph-url-path"])])),[[w,o.bigLoading]])}const Qd=Bt(EEe,[["render",LEe]]);Qd.install=function(e){e.component(Qd.name,Qd)},$l.install=function(e){e.component($l.name,$l)};const tTe="",BEe=[Qd,$l],DEe={install:function(e,t={}){BEe.forEach(n=>{e.component(n.name,n)})}};Be.Graph=Qd,Be.Render=$l,Be.default=DEe,Object.defineProperties(Be,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
144
+ `).slice(1));try{for(o.s();!(n=o.n()).done;){var a=ISe(n.value);a&&r.push(a)}}catch(c){o.e(c)}finally{o.f()}return r.slice(0,10)}var Bl=function(e){return OSe(e).toString()},I_=function(e){return e instanceof ErrorEvent?e.message==="Script error."?Tg:Ng:Xd},RSe=function(){function e(t){Kf(this,e),Ai(this,"errorIdSet",new Set),this.webCoreIns=t,this.errorIdSet=new Set}return Yf(e,[{key:"init",value:function(){var t;if(this.initJsError(),this.initResourceError(),this.initPromiseError(),this.initCorsError(),(t=window.__QAPM__)!==null&&t!==void 0&&(t=t.q)!==null&&t!==void 0&&t.length){var n={error:this.onJSError.bind(this),reject:this.onPromiseError.bind(this)};window.__QAPM__.q.forEach(function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=r.type,a=r.event,c=n[o];c&&c(a)}),window.__QAPM__.q=[]}}},{key:"initJsError",value:function(){var t=this;window.addEventListener("error",function(n){return t.onJSError(n)},!0)}},{key:"initResourceError",value:function(){var t=this;window.addEventListener("error",function(n){return t.onResourceError(n)},!0)}},{key:"initPromiseError",value:function(){var t=this;window.addEventListener("unhandledrejection",function(n){return t.onPromiseError(n)},!0)}},{key:"initCorsError",value:function(){var t=this;window.addEventListener("error",function(n){return function(r){if(I_(r)===Tg){var o={errorType:Tg,errorMessage:r.message,errorSummary:"CorsError",errorId:Bl("".concat(Tg,"-").concat(r.message))};t.commit(o)}}(n)},!0)}},{key:"onResourceError",value:function(t){if(I_(t)===Xd){var n=t.target||t.srcElement,r=n.src||n.href,o=JSON.stringify(Xd+": "+r||"UnKnown Resource"),a={errorType:Xd,errorMessage:o,errorSummary:"ResourceError",errorId:Bl("".concat(Xd,"-").concat(o))};this.commit(a)}}},{key:"onJSError",value:function(t){var n,r;if(I_(t)===Ng){var o=JSON.stringify(t.message),a=function(l){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"unknown";if(!l)return d;try{var u=new URL(l);return u.pathname&&u.pathname.endsWith(".js")?l:d}catch(f){return l}}(t.filename,(n=this.webCoreIns.config)===null||n===void 0?void 0:n.appKey),c={errorType:Ng,errorMessage:o,errorSummary:t.error&&((r=t.error)===null||r===void 0?void 0:r.name)||"UnKnown",errorStack:JSON.stringify(Ag(t.error)),errorId:Bl("".concat(Ng,"-").concat(o,"-").concat(a))};this.commit(c)}}},{key:"onPromiseError",value:function(t){var n,r,o=JSON.stringify(((n=t.reason)===null||n===void 0?void 0:n.message)||t.reason||"UnKnown"),a=((r=t.reason)===null||r===void 0?void 0:r.name)||"UnKnown",c={errorType:yR,errorMessage:o,errorSummary:a,errorStack:JSON.stringify(Ag(t.reason)),errorId:Bl("".concat(yR,"-").concat(o,"-").concat(a))};this.commit(c)}},{key:"onVueError",value:function(t,n,r){var o=JSON.stringify(t.message),a={errorType:bR,errorMessage:o,errorSummary:t.name||"UnKnown",errorStack:JSON.stringify(Ag(t)),errorId:Bl("".concat(bR,"-").concat(o,"-").concat(t.name))};this.commit(a)}},{key:"onReactError",value:function(t,n){var r=JSON.stringify(t.message),o={errorType:wR,errorMessage:r,errorSummary:t.name||"UnKnown",errorStack:JSON.stringify(Ag(t)),errorId:Bl("".concat(wR,"-").concat(r,"-").concat(t.name))};console.log(o),this.commit(o)}},{key:"commit",value:function(t){var n=t.errorId;this.errorIdSet.has(n)||(this.errorIdSet.add(n),this.webCoreIns.commit(qc({type:"error"},t)))}}]),e}(),PSe=function(e){function t(){var o,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Kf(this,t),(o=wse(this,t,[a])).config=a,o.isReport()?(o.PerformancePluginInstance=new V3e(Gc(o)),o.WhiteScreenPluginInstance=new _Ce(Gc(o)),o.ErrorPluginInstance=new RSe(Gc(o)),o.plugins=[o.PerformancePluginInstance,o.WhiteScreenPluginInstance,o.ErrorPluginInstance],o.init(),jS(t,t,Dl,Gc(o)),o):$S(o)}var n,r;return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),a&&Yv(o,a)}(t,bwe),Yf(t,[{key:"isReport",value:function(){var o=this.isIE(),a=this.calcRatio();return this.config.appKey&&a&&!o}},{key:"init",value:(r=Hc(Cr().mark(function o(){return Cr().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:this.initTime(this.mixed()),this.plugins.forEach(function(c){c.init()});case 2:case"end":return a.stop()}},o,this)})),function(){return r.apply(this,arguments)})},{key:"mixed",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=this.uid(),c=this.getTime(),l=c.time,d=c.date,u=this.getUA(),f=window.location,p=f.host,h=f.origin,m=f.pathname;return qc(qc({uid:a,sid:this.sid,url:window.location.href,host:p,fullPath:h+m,sdkVersion:this.sdkVersion,createDate:d,appKey:this.config.appKey,createTime:l,appVersion:this.appVersion,env:this.env},u),o)}},{key:"commit",value:(n=Hc(Cr().mark(function o(a){var c,l;return Cr().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:c=this.mixed(a),l=new URL("".concat(window.location.protocol,"//").concat(this.host,"/log.gif")),Object.entries(c).map(function(u){var f=_se(u,2),p=f[0],h=f[1];l.searchParams.set(p,h)}),new Image().src=l.toString();case 5:case"end":return d.stop()}},o,this)})),function(o){return n.apply(this,arguments)})}],[{key:"install",value:function(o){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Xf(t,t,Dl)||(o.config.errorHandler=function(c,l,d){Xf(t,t,Dl).ErrorPluginInstance.onVueError(c,l,d),console.error(c)},jS(t,t,Dl,new t(a)))}},{key:"sendError",value:function(o){Xf(t,t,Dl)?Xf(t,t,Dl).ErrorPluginInstance.onReactError(o):console.error("QAPM: 请先初始化 QAPM!")}}]),t}(),Dl={writable:!0,value:null};const CNe="",SNe="",LSe={components:{InfoFilled:Pm,ArrowRight:Im},mixins:[jr],inject:["hasLevel"],props:{axis:{required:!0,type:Object,default:()=>({x:0,y:0})},show:{required:!0,type:Boolean,default:!1},nodeInfo:{required:!0,type:Array,default:()=>[]},menuOptions:{required:!0,type:Array,default:()=>[]},border:{type:Boolean,required:!1,default:!0},itemWidth:{type:Number,required:!1,default:206},itemHeight:{type:Number,required:!1,default:36},itemSize:{type:Number,required:!1,default:14},offset:{type:Object,required:!1,default:()=>({x:6,y:2})},borderWidth:{type:Number,required:!1,default:6},history:{type:Object,required:!0,default:()=>{}},moduleDetail:{type:Object,required:!0,default:()=>{}}},emits:["contextmenu-click"],data(){return{checkedItems:{},globalMenus:JZ,maxMulti:6}},computed:{checkboxMenu(){return this.nodeInfo.length>1?[]:this.menuOptions},canGoDetail(){var e,t,n,r;return((t=(e=this.moduleDetail)==null?void 0:e.config)==null?void 0:t.jumpDetail)&&((r=this.moduleDetail)==null?void 0:r.config.jumpRule[(n=this.nodeInfo[0])==null?void 0:n.type])},systemMenu(){var r,o,a,c,l,d,u;const e=[];if(this.nodeInfo.length===1){const f=this.nodeInfo[0];f.type!=="aggregation"&&f.type!=="nodeType"&&(e.push(iv),(r=this.history.keyNodeIds)!=null&&r.some(_=>_===f.id)||(e.push(av),(a=(o=this.moduleDetail)==null?void 0:o.config)!=null&&a.hideCollectMenu||e.push(f.collect?sv:ov),e.push(f.textProp==="name"?tv:ev),f.label&&e.push(f.textProp==="label"?nv:rv)),this.canGoDetail&&e.push(K5)),e.push(f.fx?V0:Z0);const p=this.history.dataNow.links.some(w=>w.source.id===f.id&&w.target.type==="aggregation"),b=this.history.dataNow.links.filter(w=>w.source.id===f.id).map(w=>w.target).some(w=>{let _=0;return this.history.dataNow.links.map(C=>{C.source.id===w.id&&_++}),_===0});p||f.type==="aggregation"?e.push(H5):b&&e.push(q5),b&&e.push(j5),e.push(lv)}else this.nodeInfo.length>1?(e.push(av,iv),e.push(this.nodeInfo.some(p=>!p.collect)?ov:sv),this.nodeInfo.some(p=>p.label)&&e.push(this.nodeInfo.some(p=>p.textProp!=="label")?rv:nv),e.push(this.nodeInfo.some(p=>p.textProp!=="name")?ev:tv),e.push(this.nodeInfo.some(p=>!p.fx)?Z0:V0),e.push(lv)):this.nodeInfo.length===0&&(this.history.dataNow.nodes.some(p=>p.label)&&e.push(this.history.dataNow.nodes.some(p=>p.textProp!=="label")?$5:F5),e.push(this.history.dataNow.nodes.some(p=>p.textProp!=="name")?D5:M5),e.push(this.history.dataNow.nodes.some(p=>!p.fx)?L5:B5),this.history.currentIndex>0&&e.push(z5),this.history.currentIndex<this.history.length-1&&e.push(U5));const t=(c=this.nodeInfo[0])==null?void 0:c.type,n=(u=(d=(l=this.nodeInfo[0])==null?void 0:l.detail)==null?void 0:d.info)==null?void 0:u.extraNodeContextMenus;return t!=="nodeType"&&(n!=null&&n.length)&&(n.forEach(f=>{f.icon||(f.icon="button_edit_label")}),e.push(...n)),e},totalHeight(){let e=this.menuOptions.length*(this.itemHeight+5)+10+44+48+5,t=this.systemMenu.length*(this.itemHeight+5)+10+44+5;return e=this.menuOptions.length===0?0:44,t=this.systemMenu.length===0?0:44,e+t},axisComputed(){const e=document.getElementsByClassName("d3-container")[0],t=this.axis.top-e.offsetTop;return{top:(t<e.offsetHeight/2?Math.min(t+this.offset.y,Math.max(e.offsetHeight-this.totalHeight,e.getBoundingClientRect().top)):Math.max(t+this.offset.y,this.totalHeight+e.getBoundingClientRect().top))+"px",left:this.axis.left+this.offset.x+"px",transform:`translate(${this.axis.left>e.offsetWidth/2?"-100%":"0%"}, ${t>e.offsetHeight/2?"-100%":"0%"})`}},liStyle(){return{width:this.itemWidth+"px",height:this.itemHeight+"px",lineHeight:this.itemHeight+"px",fontSize:this.itemSize+"px"}},firstLeft(){const e=document.body.offsetWidth;return this.axis.left+this.itemWidth*2>=e},secondLeft(){const e=document.body.offsetWidth;return this.axis.left+this.itemWidth*3>=e},checkedItemsFinal(){return Object.keys(this.checkedItems).filter(e=>this.checkedItems[e]).map(e=>this.checkedItems[e])},haveInterface(){let e=!1;return this.menuOptions.map(t=>{t.type===1&&(e=!0)}),e}},watch:{show(){this.checkedItems={}}},methods:{handleCollapse(){},isSystemItem(e){return e.type===2},isExternalItem(e){return e.type===3},hasChildren(e){var t;return((t=e==null?void 0:e.children)==null?void 0:t.length)>0},onCheck(e,t){this.checkedItems[t.name]=e.currentTarget.checked?t:!1},secondBorderCheck(e,t=0){const n=document.body.offsetWidth,r=document.body.offsetHeight,o=this.axis.top+(e+t)*this.itemHeight;return{width:this.itemWidth*2+60+"px",left:this.axis.left+this.itemWidth*2>=n?"-100%":"100%",top:r>=o?0:"auto",bottom:r<o?0:"auto"}},thirdBorderCheck(e,t,n,r){const o=document.body.offsetWidth,a=document.body.offsetHeight,c=this.secondBorderCheck(e,n).top;let l;const d=(t+r)*this.itemHeight,u=d>180?180:d;return c===0?l=this.axis.top+e*this.itemHeight+u:l=this.axis.top-e*this.itemHeight+u,{left:this.axis.left+this.itemWidth*3>=o?"-100%":"100%",bottom:a>=l?0:"auto",top:a<l?0:"auto"}},handleClick(e,t){if(!t){if(en({cId:"contextMenu-"+e.name,c:"右键菜单-"+e.namec}),e.has_child>0)return!1;ye(this,"contextmenu-click",{nodes:this.nodeInfo,api:e})}},handleDataClick(e,t){en({cId:"contextMenu-"+e.name,c:"右键菜单-"+e.namec}),ye(this,"contextmenu-click",{nodes:this.nodeInfo,api:t,dataApi:e}),this.checkedItems={}}}},Ml=e=>(s.pushScopeId("data-v-dd8dd8d0"),e=e(),s.popScopeId(),e),BSe={"aria-hidden":"true",style:{position:"absolute",width:"0",height:"0",overflow:"hidden",display:"none"}},DSe=[Ml(()=>s.createElementVNode("symbol",{id:"icon-arrow-right",viewBox:"0 0 1024 1024"},[s.createElementVNode("path",{d:"M288.791335 65.582671l446.41733 446.417329-446.41733 446.417329z"})],-1))],MSe={class:"cm-list"},FSe={class:"cm-ul"},$Se={class:"hd"},zSe=["src"],USe={class:"bd"},jSe={class:"cm-ul cm-ul-level1"},qSe=["title"],HSe=Ml(()=>s.createElementVNode("svg",{class:"icon","aria-hidden":"true"},[s.createElementVNode("use",{"xlink:href":"#icon-arrow-right"})],-1)),GSe=["title","onClick"],WSe=["title","onClick"],KSe={key:0,class:"icon","aria-hidden":"true"},YSe=[Ml(()=>s.createElementVNode("use",{"xlink:href":"#icon-arrow-right"},null,-1))],JSe=["title","onClick"],XSe=["src"],QSe=Ml(()=>s.createElementVNode("div",{class:"bd"},null,-1)),ZSe=["title","onClick"],VSe={key:0,class:"fas el-icon-fa-cog"},e9e={key:1,class:"fas el-icon-fa-external-link-alt"},t9e={class:"text-wrapper"},n9e=["src"],r9e=["src"],i9e={key:3,class:"shortcut"},o9e={key:2,class:"icon","aria-hidden":"true"},s9e=[Ml(()=>s.createElementVNode("use",{"xlink:href":"#icon-arrow-right"},null,-1))],a9e=["title","onClick"],l9e={key:1,class:"icon","aria-hidden":"true"},c9e=[Ml(()=>s.createElementVNode("use",{"xlink:href":"#icon-arrow-right"},null,-1))],d9e=["title","onClick"];function u9e(e,t,n,r,o,a){const c=s.resolveComponent("ArrowRight"),l=Qe,d=s.resolveComponent("InfoFilled"),u=Hn;return n.show?(s.openBlock(),s.createElementBlock("div",{key:0,class:"cm-container",style:s.normalizeStyle(a.axisComputed),onClick:t[1]||(t[1]=s.withModifiers((...f)=>a.handleCollapse&&a.handleCollapse(...f),["stop"]))},[(s.openBlock(),s.createElementBlock("svg",BSe,DSe)),s.createElementVNode("div",MSe,[s.createElementVNode("ul",FSe,[a.checkboxMenu.length>0?(s.openBlock(),s.createElementBlock("li",{key:0,class:"cm-li data-opt-wrapper",style:s.normalizeStyle(a.liStyle)},[s.createElementVNode("div",$Se,[s.createElementVNode("img",{src:e.imgPath["./public/d3svg1/button18/button_relation.svg"],style:{"margin-right":"10px"}},null,8,zSe),s.createTextVNode("按关系分类拓线"),s.createVNode(l,null,{default:s.withCtx(()=>[s.createVNode(c)]),_:1})]),s.createElementVNode("div",USe,[s.createElementVNode("ul",jSe,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.checkboxMenu,(f,p)=>(s.openBlock(),s.createElementBlock("li",{key:p,class:"cm-li context-one",style:s.normalizeStyle(a.liStyle)},[a.hasChildren(f)?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["cm-item",a.firstLeft?"cm-left":""]),title:f.namec},[s.createElementVNode("span",null,s.toDisplayString(f.namec),1),HSe],10,qSe)):(s.openBlock(),s.createElementBlock("div",{key:1,class:s.normalizeClass(["cm-item",a.firstLeft?"cm-left":""]),title:f.namec,onClick:s.withModifiers(h=>a.handleDataClick(f,o.globalMenus.expandPartNode),["stop"])},[s.createElementVNode("span",null,s.toDisplayString(f.namec),1)],10,GSe)),a.hasChildren(f)?(s.openBlock(),s.createElementBlock("ul",{key:2,class:"cm-ul cm-ul-level2",style:s.normalizeStyle(a.secondBorderCheck(p,f.children.length))},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(f.children,(h,m)=>(s.openBlock(),s.createElementBlock("li",{key:m,class:"cm-li",style:s.normalizeStyle(a.liStyle)},[s.createElementVNode("div",{class:s.normalizeClass(["cm-item",a.secondLeft?"cm-left":""]),title:h.namec,onClick:s.withModifiers(b=>a.handleDataClick(h,o.globalMenus.expandPartNode),["stop"])},[s.createElementVNode("span",null,s.toDisplayString(h.namec),1),a.hasChildren(h)?(s.openBlock(),s.createElementBlock("svg",KSe,YSe)):s.createCommentVNode("",!0)],10,WSe),a.hasChildren(h)?(s.openBlock(),s.createElementBlock("ul",{key:0,class:"cm-ul cm-ul-level3",style:s.normalizeStyle(a.thirdBorderCheck(p,m,f.children.length,h.children.length))},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(h.children,(b,w)=>(s.openBlock(),s.createElementBlock("li",{key:w,class:"cm-li",style:s.normalizeStyle(a.liStyle)},[s.createElementVNode("div",{class:"cm-item",title:b.namec,onClick:s.withModifiers(_=>a.handleDataClick(b,o.globalMenus.expandPartNode),["stop"])},[s.createElementVNode("span",null,s.toDisplayString(b.namec),1)],8,JSe)],4))),128))],4)):s.createCommentVNode("",!0)],4))),128))],4)):s.createCommentVNode("",!0)],4))),128))])])],4)):n.nodeInfo.length>1&&n.nodeInfo.length<o.maxMulti?(s.openBlock(),s.createElementBlock("li",{key:1,class:"cm-li data-opt-wrapper data-opt-all",style:s.normalizeStyle(a.liStyle)},[s.createElementVNode("div",{class:"hd",onClick:t[0]||(t[0]=s.withModifiers(f=>a.handleDataClick(null,o.globalMenus.expandNode),["stop"]))},[s.createElementVNode("img",{src:e.imgPath["./public/d3svg1/button18/button_relation.svg"],style:{"margin-right":"10px"}},null,8,XSe),s.createTextVNode("展开全部关系 ")]),QSe],4)):s.createCommentVNode("",!0),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.systemMenu,(f,p)=>(s.openBlock(),s.createElementBlock("li",{key:p,class:"cm-li",style:s.normalizeStyle(a.liStyle)},[s.createElementVNode("div",{class:s.normalizeClass(["cm-item",{"cm-left":a.firstLeft,disabled:f.disabled}]),title:f.namec,onClick:s.withModifiers(h=>a.handleClick(f,f.disabled),["stop"])},[a.isSystemItem(f)?(s.openBlock(),s.createElementBlock("i",VSe)):a.isExternalItem(f)?(s.openBlock(),s.createElementBlock("i",e9e)):s.createCommentVNode("",!0),s.createElementVNode("div",t9e,[f.icon?(s.openBlock(),s.createElementBlock("img",{key:0,src:e.imgPath["./public/d3svg1/button18/"+f.icon+".svg"],class:"t-icon"},null,8,n9e)):(s.openBlock(),s.createElementBlock("img",{key:1,src:e.imgPath["./public/d3svg1/button18/button_"+f.name+".svg"],class:"t-icon"},null,8,r9e)),f.tooltip?(s.openBlock(),s.createBlock(u,{key:2,class:"el-icon-info",effect:"dark",content:f.tooltip,placement:"top-start"},{default:s.withCtx(()=>[s.createVNode(l,null,{default:s.withCtx(()=>[s.createVNode(d)]),_:1})]),_:2},1032,["content"])):s.createCommentVNode("",!0),s.createElementVNode("span",null,s.toDisplayString(f.namec),1),f.shortcut?(s.openBlock(),s.createElementBlock("span",i9e,s.toDisplayString(f.shortcut),1)):s.createCommentVNode("",!0)]),a.hasChildren(f)?(s.openBlock(),s.createElementBlock("svg",o9e,s9e)):s.createCommentVNode("",!0)],10,ZSe),a.hasChildren(f)?(s.openBlock(),s.createElementBlock("ul",{key:0,class:"cm-ul cm-ul-level2",style:s.normalizeStyle(a.secondBorderCheck(p,f.children.length))},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(f.children,(h,m)=>(s.openBlock(),s.createElementBlock("li",{key:m,class:"cm-li",style:s.normalizeStyle(a.liStyle)},[s.createElementVNode("div",{class:s.normalizeClass(["cm-item",{"cm-left":a.secondLeft,disabled:f.disabled||h.disabled}]),title:h.namec,onClick:s.withModifiers(b=>a.handleClick(h,f.disabled||h.disabled),["stop"])},[h.tooltip?(s.openBlock(),s.createBlock(u,{key:0,class:"el-icon-info",effect:"dark",content:h.tooltip,placement:"top-start"},{default:s.withCtx(()=>[s.createVNode(l,null,{default:s.withCtx(()=>[s.createVNode(d)]),_:1})]),_:2},1032,["content"])):s.createCommentVNode("",!0),s.createElementVNode("span",null,s.toDisplayString(h.namec),1),a.hasChildren(h)?(s.openBlock(),s.createElementBlock("svg",l9e,c9e)):s.createCommentVNode("",!0)],10,a9e),a.hasChildren(h)?(s.openBlock(),s.createElementBlock("ul",{key:0,class:"cm-ul cm-ul-level3",style:s.normalizeStyle(a.thirdBorderCheck(p,m,f.children.length,h.children.length))},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(h.children,(b,w)=>(s.openBlock(),s.createElementBlock("li",{key:w,class:"cm-li",style:s.normalizeStyle(a.liStyle)},[s.createElementVNode("div",{class:s.normalizeClass(["cm-item",{disabled:f.disabled||h.disabled||b.disabled}]),title:b.namec,onClick:s.withModifiers(_=>a.handleClick(b,f.disabled||h.disabled||b.disabled),["stop"])},[b.tooltip?(s.openBlock(),s.createBlock(u,{key:0,class:"el-icon-info",effect:"dark",content:b.tooltip,placement:"top-start"},{default:s.withCtx(()=>[s.createVNode(l,null,{default:s.withCtx(()=>[s.createVNode(d)]),_:1})]),_:2},1032,["content"])):s.createCommentVNode("",!0),s.createElementVNode("span",null,s.toDisplayString(b.namec),1)],10,d9e)],4))),128))],4)):s.createCommentVNode("",!0)],4))),128))],4)):s.createCommentVNode("",!0)],4))),128))])])],4)):s.createCommentVNode("",!0)}const f9e=Bt(LSe,[["render",u9e],["__scopeId","data-v-dd8dd8d0"]]),TNe="",ANe="",ONe="",INe="",h9e={name:"Popover",components:{ForceGraphSvgIcon:ss},mixins:[jr],inject:["levelList","hasLevel"],props:{showPopover:{type:Boolean,default:!1},mousePosition:{type:Object,default:()=>({left:0,top:0})},nodeInfo:{type:Object,default:()=>{}},type:{type:String,default:"node"},moduleDetail:{type:Object,default:()=>{}},data:{type:Object,default:()=>{}},darkMode:{type:Boolean,default:!0},history:{type:Object,default:()=>({})}},data(){return{showSelf:!1,onPop:!1,position:null,aggregationList:[]}},computed:{show(){return this.showPopover||this.showSelf},name(){var e,t,n;return((n=(t=(e=this.nodeInfo)==null?void 0:e.detail)==null?void 0:t.info)==null?void 0:n.name)||this.nodeInfo.name},isNormalNode(){return this.nodeInfo.type!=="nodeType"&&this.nodeInfo.type!=="aggregation"},isNodeTypeNode(){return this.nodeInfo.type==="nodeType"},isAggregateNode(){return this.nodeInfo.type==="aggregation"},fieldMapThisType(){var e;return this.moduleDetail.detail_field_map&&this.moduleDetail.detail_field_map[`${(e=this.nodeInfo)==null?void 0:e.type}_detail_info`]},canGoDetail(){return["nodeType","aggregation","family","org","report","vul","thumbprint_md5","email","cert_https"].indexOf(this.nodeInfo.type)<0}},watch:{mousePosition(){setTimeout(()=>{var l,d,u;const e=this.mousePosition.left>document.body.offsetWidth/2,t=this.mousePosition.top>document.body.offsetHeight/2,n=(l=document.getElementsByClassName("popover-container")[0])==null?void 0:l.offsetHeight,r=(d=document.getElementsByClassName("d3-container")[0])==null?void 0:d.offsetHeight,o=(u=document.getElementsByClassName("d3-container")[0])==null?void 0:u.getBoundingClientRect().top;let a;t?a=Math.max(this.mousePosition.top,n+o)+5:a=Math.min(this.mousePosition.top,Math.max(r-n,o))-5;const c={left:(e?this.mousePosition.left+2:this.mousePosition.right-2)+"px",top:a+"px",transform:`translate(${e?"-100%":"0%"}, ${t?"-100%":"0%"})`};this.position=c},100)},nodeInfo:{handler:function(){var t;const e=(((t=this.nodeInfo)==null?void 0:t.list)||[]).map(n=>{var o,a,c;const r=n.detail;return ue(ae({},n),{name:((o=r==null?void 0:r.info)==null?void 0:o.name)||n.name,level:((c=(a=r==null?void 0:r.info)==null?void 0:a.basic)==null?void 0:c.level)||""})});e==null||e.sort((n,r)=>{var c,l;const o=(c=this.levelList.find(d=>d.level===n.level))==null?void 0:c.dangerNumber;return((l=this.levelList.find(d=>d.level===r.level))==null?void 0:l.dangerNumber)-o}),this.aggregationList=e},immediate:!0}},methods:{handleMouseEnter(){this.showSelf=!0},handleMouseLeave(){this.showSelf=!1},isSomething(e){return j0(e)},getTypeZh(e){var n,r,o;let t=e;if(e==="nodeType")t="关系节点";else for(const a in(n=this.moduleDetail)==null?void 0:n.nodes)if(e===((r=this.moduleDetail)==null?void 0:r.nodes[a].name)){t=(o=this.moduleDetail)==null?void 0:o.nodes[a].namec;break}return t},getLevelClass(e){return of(e,this.levelList)},getColorStyle(e){return as(e,this.levelList,this.darkMode)},getNodeTypeChildNum(e){var o;const t=(o=this.data)==null?void 0:o.links,n=[],r=[];return t==null||t.map(a=>{a.source.id===e&&(n.push(a.target.id),a.target.detail&&UQ(a.target.detail.info.basic.level,this.levelList)&&r.push(a.target.id))}),{allChildNum:n.length,dangerChildNum:r.length}},canShowField(e){const t=this.hasFieldValue(e);return!(t===void 0||e.hide_hover||e.hide_empty&&!t)},hasFieldValue(e){const t=this.nodeInfo.detail&&this.nodeInfo.detail.info&&this.nodeInfo.detail.info.basic[e.prop];if(t===null)return;const n=Array.isArray(t);return n&&t.length>0||!n&&t!==""&&t!=="无"},getFieldValue(e){const t=this.nodeInfo.detail.info.basic[e.prop],n=Array.isArray(t),r=this.isSomething(t);let o="-";return r&&(n?o=t.length?t.join("|"):"-":o=t||"-"),o},formatTags(e){return cf(df(e))},addToGraph(e){const t={type:"addFromAggregation",addOne:{nodes:[e],links:[{source:this.nodeInfo.relationId,target:e.id}]}};if(this.aggregationList=this.aggregationList.filter(n=>n.id!==e.id),this.history.updateAggregationNode(this.aggregationList,this.nodeInfo.id),this.history.pushState(t),this.aggregationList.length)ye(qe,"emitDataLoaded");else{const n=this.nodeInfo,r={deleteOne:{nodes:[n],links:[{source:n.relationId,target:n.id}]},type:"aggregation"};setTimeout(()=>{this.history.pushState(r),ye(qe,"emitDataLoaded")},0)}}}},Fl=e=>(s.pushScopeId("data-v-a8e278b3"),e=e(),s.popScopeId(),e),p9e={key:0,class:"node-info-container"},g9e={class:"popover-block popover-header"},m9e={key:0,class:"popover-collect"},v9e={key:1,class:"row-item"},y9e={class:"label"},b9e={key:2,class:"row-item"},w9e=Fl(()=>s.createElementVNode("div",{class:"label"},"关系节点:",-1)),_9e={class:"value"},C9e={class:"node-type-info"},S9e={class:"name"},E9e={key:3,class:"row-item"},x9e=Fl(()=>s.createElementVNode("div",{class:"label"},"备注:",-1)),k9e={class:"value"},N9e={class:"popover-block popover-fields"},T9e={key:0,class:"node-detail top-border"},A9e={key:0,class:"row-item"},O9e=Fl(()=>s.createElementVNode("div",{class:"label"},"危险级别:",-1)),I9e=["title"],R9e={key:1,class:"row-item row-item-tag"},P9e=Fl(()=>s.createElementVNode("div",{class:"label"},"标签:",-1)),L9e={class:"value"},B9e={class:"graph-tags-box"},D9e=Fl(()=>s.createElementVNode("br",null,null,-1)),M9e={key:0,class:"row-item"},F9e={class:"label"},$9e=["title"],z9e={key:1,class:"node-statistics top-border"},U9e={class:"row-item node-num"},j9e=Fl(()=>s.createElementVNode("div",{class:"label"},"拓展节点统计:",-1)),q9e={class:"value"},H9e={key:0},G9e={class:"danger"},W9e={key:2,class:"node-aggregation"},K9e={class:"aggregation-title"},Y9e={class:"aggregation-box"},J9e={key:1,class:"node-info-container"},X9e={class:"popover-fields"},Q9e={class:"top"};function Z9e(e,t,n,r,o,a){const c=s.resolveComponent("force-graph-svg-icon"),l=Hn,d=xc,u=CX,f=ns,p=_X;return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["popover-container",a.show?"show-popover":"hide-popover"]),style:s.normalizeStyle(o.position),onMouseenter:t[0]||(t[0]=(...h)=>a.handleMouseEnter&&a.handleMouseEnter(...h)),onMouseleave:t[1]||(t[1]=(...h)=>a.handleMouseLeave&&a.handleMouseLeave(...h))},[s.createElementVNode("div",null,[n.type==="node"?(s.openBlock(),s.createElementBlock("div",p9e,[s.createElementVNode("div",g9e,[n.nodeInfo.collect?(s.openBlock(),s.createElementBlock("div",m9e,[s.createVNode(l,{content:"已收藏","popper-class":"el-tooltip-gray",placement:"left"},{default:s.withCtx(()=>[s.createVNode(c,{class:"button-img","icon-class":e.imgPath["./public/d3svg1/star.svg"]},null,8,["icon-class"])]),_:1})])):s.createCommentVNode("",!0),a.isNormalNode?(s.openBlock(),s.createElementBlock("div",v9e,[s.createElementVNode("div",y9e,s.toDisplayString(a.getTypeZh(n.nodeInfo.type))+":",1),s.createElementVNode("div",{class:s.normalizeClass(["value",{"star-next":n.nodeInfo.collect}])},s.toDisplayString(a.name),3)])):s.createCommentVNode("",!0),a.isNodeTypeNode?(s.openBlock(),s.createElementBlock("div",b9e,[w9e,s.createElementVNode("div",_9e,[s.createElementVNode("div",C9e,[s.createElementVNode("div",S9e,s.toDisplayString(n.nodeInfo.name),1)])])])):s.createCommentVNode("",!0),n.nodeInfo.label?(s.openBlock(),s.createElementBlock("div",E9e,[x9e,s.createElementVNode("div",k9e,s.toDisplayString(n.nodeInfo.label),1)])):s.createCommentVNode("",!0)]),s.createElementVNode("div",N9e,[a.isNormalNode&&n.nodeInfo.detail?(s.openBlock(),s.createElementBlock("div",T9e,[a.canGoDetail&&a.hasLevel?(s.openBlock(),s.createElementBlock("div",A9e,[O9e,s.createElementVNode("div",{class:s.normalizeClass(["value level",a.getLevelClass(n.nodeInfo.detail&&n.nodeInfo.detail.info.basic.level)]),title:n.nodeInfo.detail&&n.nodeInfo.detail.info.basic.level||"--"},s.toDisplayString(n.nodeInfo.detail&&n.nodeInfo.detail.info.basic.level||"--"),11,I9e)])):s.createCommentVNode("",!0),n.nodeInfo.detail&&n.nodeInfo.detail.tags&&n.nodeInfo.detail.tags.length>0?(s.openBlock(),s.createElementBlock("div",R9e,[P9e,s.createElementVNode("div",L9e,[s.createElementVNode("div",B9e,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.formatTags(n.nodeInfo.detail.tags),(h,m)=>(s.openBlock(),s.createBlock(l,{key:m,"popper-class":"el-tooltip-gray"},{content:s.withCtx(()=>[s.createElementVNode("div",null,[s.createTextVNode(s.toDisplayString(h.name===h.desc?h.name:h.name+":"+h.desc)+" ",1),h.disabled?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[D9e,s.createTextVNode(" 标签状态:失效 ")],64)):s.createCommentVNode("",!0)])]),default:s.withCtx(()=>[s.createElementVNode("span",null,[s.createVNode(d,{class:s.normalizeClass(["graph-tag-one",`${h.type||"unknown"} ${h.disabled?"tag-disable":""}`]),type:h.type||"info"},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(h.name),1)]),_:2},1032,["class","type"])])]),_:2},1024))),128))])])])):s.createCommentVNode("",!0),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.fieldMapThisType,(h,m)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[a.canShowField(h)?(s.openBlock(),s.createElementBlock("div",M9e,[s.createElementVNode("div",F9e,s.toDisplayString(h.zh)+":",1),s.createElementVNode("div",{class:s.normalizeClass(["value",{red:h.prop==="virus_name"}]),title:n.nodeInfo.detail.info.basic[m]},s.toDisplayString(a.getFieldValue(h)),11,$9e)])):s.createCommentVNode("",!0)],64))),256))])):s.createCommentVNode("",!0),a.isNodeTypeNode?(s.openBlock(),s.createElementBlock("div",z9e,[s.createElementVNode("div",U9e,[j9e,s.createElementVNode("div",q9e,[a.getNodeTypeChildNum(n.nodeInfo.id).dangerChildNum>0?(s.openBlock(),s.createElementBlock("span",H9e,[s.createElementVNode("span",G9e,s.toDisplayString(a.getNodeTypeChildNum(n.nodeInfo.id).dangerChildNum),1),s.createTextVNode("/")])):s.createCommentVNode("",!0),s.createTextVNode(s.toDisplayString(a.getNodeTypeChildNum(n.nodeInfo.id).allChildNum),1)])])])):s.createCommentVNode("",!0),a.isAggregateNode?(s.openBlock(),s.createElementBlock("div",W9e,[s.createElementVNode("div",K9e,"聚合节点 ("+s.toDisplayString(o.aggregationList.length)+"个)",1),s.createElementVNode("div",Y9e,[s.createVNode(p,{data:o.aggregationList,style:{width:"100%"}},{default:s.withCtx(()=>[s.createVNode(u,{prop:"name","min-width":"200",label:"名称"}),s.createVNode(u,{sortable:"",prop:"type",label:"类型"}),s.createVNode(u,{sortable:"",prop:"level",width:"80",label:"级别"},{default:s.withCtx(h=>[s.createElementVNode("span",{style:s.normalizeStyle({color:a.getColorStyle(h.row.level)})},s.toDisplayString(h.row.level||"--"),5)]),_:1}),s.createVNode(u,{label:"操作"},{default:s.withCtx(h=>[s.createVNode(f,{class:"add-to-graph-btn",type:"primary",text:"",size:"small",onClick:m=>a.addToGraph(h.row)},{default:s.withCtx(()=>[s.createTextVNode(" 添加到图谱 ")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])])])):s.createCommentVNode("",!0)])])):(s.openBlock(),s.createElementBlock("div",J9e,[s.createElementVNode("div",X9e,[s.createElementVNode("div",Q9e,s.toDisplayString(n.nodeInfo.apiName),1)])]))])],38)}const V9e=Bt(h9e,[["render",Z9e],["__scopeId","data-v-a8e278b3"]]),eEe=[{id:52,product_id:0,name:"copy",namec:"复制",parent_id:0,has_child:0,status:0,type:2,path:"0-52",pos:65,ctime:"0000-00-00 00:00:00",utime:"2019-06-04 16:49:38",children:[]},{id:62,product_id:0,name:"release_aggregation",namec:"释放聚合顶点",parent_id:0,has_child:0,status:0,is_sys:0,is_detail:0,type:2,path:"0-62",pos:1,ctime:"0000-00-00 00:00:00",utime:"2019-05-06 15:08:10",children:[]}],tEe={name:"vue-safe-force-graph",version:"2.0.50",description:"force_graph in security area",author:"jason zhang",module:"./lib/vue-safe-force-graph.js",main:"./lib/vue-safe-force-graph.umd.cjs",type:"module",files:["/lib/"],exports:{".":{import:"./lib/vue-safe-force-graph.js",require:"./lib/vue-safe-force-graph.umd.cjs"},"./*":"./*"},scripts:{dev:"vite","dev:base64":"vite --mode development_base64",lib:"vite build","lib:base64":"vite build --mode production_base64",patch:'npm version patch -m "Upgrade to %s "',"patch:base64":'npm version patch -m "Upgrade to %s for base64"',p:"npm run patch && npm run lib && npm publish","p:base64":"npm run patch:base64 && npm run lib:base64 && npm publish",lint:"eslint --ext .js,.vue src",lintFix:"eslint --fix --ext .js,.vue src",imageToCdn:"node qcdn.cjs",imageToBase64:"node qcdn.cjs --buildtype=base64",changelog:"conventional-changelog -p angular -i CHANGELOG.md -s -r 0"},dependencies:{"@element-plus/icons-vue":"^2.1.0","@q/qapm":"^1.1.5","csv-parse":"^5.0.4",d3:"^7.8.5","d3-lasso":"0.0.5","element-plus":"^2.3.0",json2csv:"^5.0.7",konva:"^9.2.0","lodash-es":"^4.17.21","mime-types":"^2.1.35",minimist:"^1.2.6","radar-js-analytic-sdk":"^2.2.6",vue:"^3.2.47","vue-clipboard3":"^2.0.0","vue-router":"^4.1.6","vue-virtual-scroller":"^2.0.0-beta.8"},devDependencies:{"@babel/core":"^7.23.3","@babel/preset-env":"^7.23.3","@originjs/vite-plugin-commonjs":"^1.0.3","@q/qcdn":"^3.2.2","@vitejs/plugin-vue":"^4.1.0",axios:"^0.21.1","babel-eslint":"^10.1.0",eslint:"^7.32.0","eslint-plugin-vue":"^8.0.3",imageinfo:"^1.0.4",qs:"^6.10.1","rollup-plugin-visualizer":"^5.9.0",sass:"^1.62.0","unplugin-auto-import":"^0.15.2","unplugin-vue-components":"^0.24.1",vite:"^4.3.1"},browserslist:["> 1%","last 2 versions"],engines:{node:">=8.9",npm:">= 3.0.0"},license:"MIT"},KNe="",YNe="",JNe="",{toClipboard:nEe}=uf(),rEe="Arial,Helvetica Neue,Helvetica,PingFang SC,Hiragino Sans GB,Microsoft YaHei,sans-serif",ni=1,iEe=["ip","intranet","internet"],R_=20,cr={},oEe={name:"ForceGraphRenderByCanvas",components:{Popover:V9e,NodeContextmenu:f9e},mixins:[jr],provide:function(){return{levelList:this.levelList}},props:{data:{type:Object,default:()=>({nodes:[],links:[]})},history:{type:Object,default:()=>({})},strength:{type:Number,default:-600},isThreatPath:{type:Boolean,default:!1},requestGraphData:{type:Boolean,default:!1},moduleDetail:{type:Object,default:()=>{}},graphApi:{type:Object,default:()=>{}},alphaDecay:{type:Number,default:.0228},alphaMin:{type:Number,default:.001},darkMode:{type:Boolean,default:!0},levelList:{type:Array,default:()=>[{level:"未知",levelName:"未知",className:"unknown",normalColor:"#666",darkColor:"#c6cdd5",dangerNumber:0},{level:"危险",levelName:"危险",className:"warn",normalColor:"#CF1322",darkColor:"#fb2400",dangerNumber:1},{level:"普通",levelName:"普通",className:"normal",normalColor:"#007EE2",darkColor:"#0094ff",dangerNumber:-1},{level:"安全",levelName:"安全",className:"safe",normalColor:"#009A75",darkColor:"#00da90",dangerNumber:-2}]},nodeTypeScale:{type:Number,default:1},nodeTypeList:{type:Array,default:()=>[]},manualTickNumber:{type:Number,default:500},startNodeAnimation:{type:Boolean,default:!0}},emits:["handle-select-node","custom-contextmenu-click","flagFiles","updateSelection"],data(){return{prefix:"./public/",iconAllLoaded:!1,iconSize:{},iconFiles:{},flagFiles:{},highlightRule:{},nodesRange:null,mousePosition:{left:0,top:0},hoverNodePosition:{},uniqueClass:"",showPopover:!1,popoverTimer:null,popoverType:"",popoverContent:{},popoverNode:{},showContextMenu:!1,contextMenuNode:{},menuOptions:[],isDragging:!1,originTransform:null,dragNodeFix:!1,destroyed:!1,actKey:ma()?"metaKey":"ctrlKey",levelHeight:100,actNum:0,scriptNow:null,scriptInited:!1,canAct:!1,isKeyUp:!0,initTimes:0,resizeObserver:null,canvasElement:null,stage:s.shallowRef(null),layer:s.shallowRef(null),nodesGroup:s.shallowRef({}),linksGroup:s.shallowRef({}),grab:s.shallowRef(null),simulation:s.shallowRef(null),nodes:s.shallowRef(null),links:s.shallowRef(null),hoveredNode:s.shallowRef(null),mouseDownNode:s.shallowRef(null),selectionRect:null,selection:[],scale:ni,mousedownPos:null,mousedownNode:null,mouseupNode:null,dragLine:null,darkBgRect:null,inited:!1,hasSimulation:!1,nodesLength:0,ticking:!1,anim1:null,anim2:null,anim3:null}},computed:{isAutoTick(){var e;return((e=this.nodes)==null?void 0:e.length)<this.manualTickNumber},iconSizeComputed(){const e=a$(this.iconSize);return this.nodeTypeList.forEach(t=>{e[t]=this.iconSize[t]*this.nodeTypeScale}),e},contextMenuNodes(){return this.contextMenuNode.id?this.selection.some(e=>e.id===this.contextMenuNode.id)?[...this.selection]:[this.contextMenuNode]:[]},showContextMenuFlag(){return this.requestGraphData?this.showContextMenu:!1}},watch:{data:{handler:function(){const e=this.nodesLength!==this.data.nodes.length;this.nodes=this.data.nodes,this.links=this.data.links,this.nodesLength=this.data.nodes.length,this.update(e)},deep:!0},moduleDetail:{handler:function(e){return Te(this,null,function*(){e!=null&&e.nodes&&!this.iconAllLoaded&&(yield this.loadIcons(),this.initForceGraph(),setTimeout(()=>{this.update()},50))})},deep:!0,immediate:!0},darkMode:{handler:function(e){return Te(this,null,function*(){const t=e?"dark":"light";setTimeout(()=>{this.update(),this.isThreatPath?document.querySelectorAll(`.${this.uniqueClass}.render-container`)[0].setAttribute("data-theme",t):(document.querySelectorAll(`.${this.uniqueClass}.render-container`)[0].setAttribute("data-theme",t),document.getElementsByClassName(this.uniqueClass+" render-container")[0].parentElement.parentElement.setAttribute("data-theme",t))},200)})},immediate:!0}},created(){Gn("graph created time",Date.now()),wi.setProject("QH_10542_1724").getTrack(),localStorage.getItem("showSafeForceGraphLog")&&Gn("组件版本: "+tEe.version),this.isThreatPath||this.initKeyEvent(),this.uniqueClass="unique"+new Date().getTime()+Math.floor(Math.random()*1e5)},mounted(){return Te(this,null,function*(){new PSe({appKey:"fe-force-graph",ratio:50}),this.initForceGraph(),zQ(this.levelList),!this.isThreatPath&&(uo(qe,"buttonClick",e=>{this.handleContextMenuClick(e)}),uo(qe,"relationClick",e=>{this.handleContextMenuClick(e)}),uo(qe,"sendNodesRange",(e,t)=>{e!==void 0&&(this.nodesRange=e,this.updateNodeStyle())}))})},beforeUnmount(){fo(qe,"buttonClick"),fo(qe,"relationClick"),fo(qe,"sendNodesRange"),this.unbindKeyEvent(),this.resetAll(),Gn("destroy")},methods:{initForceGraph(){return Te(this,null,function*(){if(this.inited)return;const e=this.$refs.canvasContainer;let t=e.clientWidth,n=e.clientHeight;this.resizeObserver=new ResizeObserver(o=>{for(const a of o){if(t=a.contentRect.width,n=a.contentRect.height,Gn(`新宽度: ${t}px, 新高度: ${n}px`),t===0||n===0)return;this.stage.width(t),this.stage.height(n),this.layer&&this.layer.batchDraw(),this.hasSimulation&&this.updateSimulation()}}),this.resizeObserver.observe(e),document.addEventListener("click",this.hideContextMenu,!1),this.nodes=this.data.nodes,this.links=this.data.links,this.stage=new ct.Stage({container:e,width:t,height:n,scaleX:ni,scaleY:ni}),this.layer=new ct.Layer,this.grab=new ct.Group({id:"grab",x:0,y:0}),this.layer.add(this.grab);const r=this.layer.getCanvas()._canvas;this.canvasElement=r,this.stage.on("mousemove",o=>{if(!this.mousedownNode||!o.evt[this.actKey]){if(this.resetMouseVars(),this.selectionRect&&o.evt.altKey){const a=this.stage.getPointerPosition(),c=(a.x-this.stage.x())/this.scale,l=(a.y-this.stage.y())/this.scale,d=c-this.selectionRect.x(),u=l-this.selectionRect.y();this.selectionRect.width(d),this.selectionRect.height(u),this.stage.batchDraw()}}else{const a=this.stage.getPointerPosition(),c=this.stage.scaleX(),l=(a.x-this.stage.x())/c,d=(a.y-this.stage.y())/c;this.dragLine.points([this.mousedownPos.x,this.mousedownPos.y,l,d]),this.layer.batchDraw()}}),this.stage.on("wheel",o=>{o.evt.preventDefault();const a=1.1,c=this.scale,l=o.evt.deltaY<0?c*a:c/a;this.scale=l;const d=this.stage.getPointerPosition(),u=this.stage.position(),f=d.x-(d.x-u.x)*(l/c),p=d.y-(d.y-u.y)*(l/c);this.stage.setAttrs({scaleX:l,scaleY:l,x:f,y:p}),this.layer.batchDraw()}),this.stage.on("mousedown",o=>{const a=o.target;if(a&&a.nodeType==="Stage"?this.stage.setDraggable(!0):this.stage.setDraggable(!1),o.evt.altKey){this.stage.setDraggable(!1);const c=this.stage.scaleX(),l=this.stage.getPointerPosition(),d=(l.x-this.stage.x())/c,u=(l.y-this.stage.y())/c;this.selectionRect=new ct.Rect({x:d,y:u,width:0,height:0,stroke:"rgb(80, 80, 80)",strokeWidth:2}),this.layer.add(this.selectionRect),this.stage.batchDraw()}}),this.stage.on("mouseup",o=>{if(this.stage.setDraggable(!1),this.selectionRect&&o.evt.altKey){const a=this.selectionRect.x(),c=this.selectionRect.y(),l=this.selectionRect.width(),d=this.selectionRect.height();this.selection=this.nodes.filter(u=>{const f={x:u.x,y:u.y},p=Math.min(a,a+l),h=Math.max(a,a+l),m=Math.min(c,c+d),b=Math.max(c,c+d);return f.x>=p&&f.x<=h&&f.y>=m&&f.y<=b}),this.updateSelection(),this.selectionRect.destroy(),this.selectionRect=null}}),this.stage.on("contextmenu",this.handleGlobalContextMenu),this.stage.on("click",o=>{o.target&&o.target.nodeType==="Stage"&&this.handleDeselectNode(o)}),this.setSimulation(),this.stage.add(this.layer),this.stage.draw(),this.update(),this.inited=!0})},setSimulation(){var n;if(this.hasSimulation||!((n=this.nodes)!=null&&n.length))return;const e=this.stage.width()/(2*ni),t=this.stage.height()/(2*ni);this.hasSimulation=!0,this.simulation=mse(this.nodes).force("link",tse(this.links).id(r=>r.id).distance(120).strength(1)).force("charge",vse().strength(-600)).force("x",yse()).force("y",bse()).force("center",_S(e,t)).alphaDecay(this.alphaDecay).alphaMin(this.alphaMin).stop(),this.isAutoTick?(this.simulation.alpha(1).restart(),this.simulation.on("tick",this.ticked)):(this.simulation.on("tick",null),this.sendManualTick()),this.simulation.on("end",()=>{Gn("simulation end time",Date.now()),this.isThreatPath&&this.centerAndZoom(1)})},sendManualTick(){var e;Gn("sendManualTick",(e=this.nodes)==null?void 0:e.length),!this.ticking&&(this.ticking=!0,this.doClearCanvas(),this.simulation.alphaDecay(this.alphaDecay*2),this.simulation.alphaMin(this.alphaMin*5),this.simulation.alpha(1).restart(),setTimeout(()=>{console.time("tick");for(let t=0,n=Math.ceil(Math.log(this.simulation.alphaMin())/Math.log(1-this.simulation.alphaDecay()));t<n;++t)Gn("tick"),this.simulation.tick();console.timeEnd("tick"),this.ticking=!1,this.update(),this.centerAndZoom()},1e3))},update(e=!1){return Te(this,null,function*(){var t,n,r;!this.iconAllLoaded&&((n=(t=this.moduleDetail)==null?void 0:t.nodes)!=null&&n.length)&&(yield this.loadIcons()),!this.destroyed&&(r=this.nodes)!=null&&r.length&&(this.initScript(),Gn("update"),e&&this.updateSimulation(),this.doClearCanvas(),this.paintLinks(),this.paintNodes(),this.updateSelection(),this.ticked(),this.actNum===9&&setTimeout(()=>{this.centerAndZoom(.8)},200))})},doClearCanvas(){this.nodesGroup={},this.linksGroup={},this.layer.destroyChildren(),this.grab=new ct.Group({id:"grab",x:0,y:0}),this.layer.add(this.grab)},paintNodes(){const e=this.stage.width()/2,t=this.stage.height()/2,n=this.selection.map(r=>r.id);this.nodes.forEach(r=>Te(this,null,function*(){var w,_,C,k,S,E,T,A,O,I,F,R,q,z,G,Y,Z,U,j,H;let o;r.type==="nodeType"?o=this.iconSizeComputed[r.icon]||this.iconSizeComputed.node_type:o=this.iconSize[r.icon]||this.iconSize[r.type]||24;const a=((C=(_=(w=r==null?void 0:r.detail)==null?void 0:w.info)==null?void 0:_.basic)==null?void 0:C.level)||"",c=(E=(S=(k=r==null?void 0:r.detail)==null?void 0:k.info)==null?void 0:S.basic)==null?void 0:E.flag;let l;try{l=yield this.getNodeImage(r)}catch(M){console.log(M)}this.nodesGroup[r.id]&&((T=this.nodesGroup[r.id])==null||T.destroy());const d=new ct.Group({name:"nodeGroup",opacity:1,id:`${r.id}`,x:r.x?r.x:e,y:r.y?r.y:t,draggable:!0,visible:r.show});if(n.includes(r.id)&&d.addName("isSelected"),r.startNode&&this.startNodeAnimation){const M=as(a,this.levelList,this.darkMode),D=new ct.Circle({x:0,y:0,radius:20,fill:M,opacity:0}),te=new ct.Circle({x:0,y:0,radius:20,fill:M,opacity:0}),V=new ct.Circle({x:0,y:0,radius:20,fill:M,opacity:0});d.add(D),d.add(te),d.add(V);const ee=(X,oe)=>new ct.Animation(function(se){const B=se.time;if(B%oe/oe===0)return!1;const re=.5-.5*(B%oe)/oe,ce=40*(B%oe)/oe;X.radius(ce||0),X.opacity(re)},this.layer);(A=this.anim1)==null||A.stop(),(O=this.anim2)==null||O.stop(),(I=this.anim3)==null||I.stop(),this.anim1=ee(D,1500),this.anim2=ee(te,1500),this.anim3=ee(V,1500),(F=this.anim1)==null||F.start(),setTimeout(()=>{this.anim2.start()},500),setTimeout(()=>{this.anim3.start()},1e3)}else if(r.startNode&&!this.startNodeAnimation){const M=as(a,this.levelList,this.darkMode),D=new ct.Circle({x:0,y:0,radius:20,fill:M,opacity:this.startNodeAnimation?0:.3});d.add(D)}if(r.type==="ip"||r.type==="internet"||r.type==="country"||r.type==="target_country"){const M=as(a,this.levelList,this.darkMode),D=new ct.Circle({x:0,y:0,fill:this.darkMode?"#182628":"#fff",radius:o/2,stroke:M,strokeWidth:2});d.add(D)}if(l){const M=c||(q=(R=r==null?void 0:r.detail)==null?void 0:R.info)!=null&&q.inner_country?20:o,D=l&&new ct.Image({x:0,y:0,offsetX:M/2,offsetY:M/2,image:l,width:M,height:M,draggable:!1});d.add(D)}if(r.detail&&r.type==="md5"){const M=((Y=(G=(z=r.detail.info)==null?void 0:z.basic)==null?void 0:G.file_type)==null?void 0:Y.toUpperCase())||"MD5",D=new ct.Text({name:"md5Text",x:0,y:0,text:M,fontSize:4,fontWeight:700,fontFamily:rEe,fill:this.darkMode?"#182628":"#fff",align:"center",listening:!1});D.x(D.x()-D.width()/2),d.add(D)}const u=r.textProp||"name",f=u==="name"?((U=(Z=r==null?void 0:r.detail)==null?void 0:Z.info)==null?void 0:U.name)||r.name:r[u];let p=f.length>14&&!iEe.includes(r.type)?f.slice(0,7)+"..."+f.slice(-7):f;p=JQ(p);const h=new ct.Text({offsetY:o/2,name:"konvaText",x:0,y:o+8,text:p,fontSize:12,fontFamily:"Calibri",fill:this.darkMode?"#cdd9da":"#000",align:"center",listening:!1,visible:!!r.textProp});h.x(h.x()-h.width()/2),d.add(h);const m=new ct.Circle({name:"border",x:0,y:0,radius:o/2,fill:"#5c6271",opacity:.4,visible:!1});if(d.add(m),(H=(j=r.detail)==null?void 0:j.tags)!=null&&H.length){const M=new ct.Circle({x:((o/2||14)+5)*Math.sin(60*Math.PI/180),y:-((o/2||14)+5)*Math.cos(60*Math.PI/180),radius:3,fill:"#9300ff",listening:!1});d.add(M)}if(r.type!=="nodeType"&&r.type!=="aggregation"){var b=new ct.Circle({name:"collect",x:((o/2||14)+5)*Math.sin(0*Math.PI/180),y:-((o/2||14)+5)*Math.cos(0*Math.PI/180),radius:3,fill:"#ffad00",visible:!!r.collect});d.add(b)}if(r.label){const M=new ct.Circle({x:((o/2||14)+5)*Math.sin(30*Math.PI/180),y:-((o/2||14)+5)*Math.cos(30*Math.PI/180),radius:3,fill:"#0099ff",listening:!1});d.add(M)}d.on("dragstart",(M,D)=>{M.evt[this.actKey]||(this.isAutoTick&&this.simulation.alphaTarget(.3).restart(),this.isDragging=!0)}),d.on("dragmove",M=>{if(!M.evt[this.actKey]){var D=this.simulation.nodes().find(te=>te.id===r.id);D&&(D.x=d.x(),D.fx=d.x(),D.y=d.y(),D.fy=d.y(),this.links.forEach(te=>{const V=this.linksGroup[`${te.source.id}-${te.target.id}`],ee=V==null?void 0:V.findOne(".konvaLine"),X=V==null?void 0:V.findOne(".linkArrow"),oe=V==null?void 0:V.findOne(".edgeLabel");let se,B,W,re;if(te.source.id===D.id){if(!this.nodesGroup[te.target.id])return;se=D.x,B=this.nodesGroup[te.target.id].x(),W=D.y,re=this.nodesGroup[te.target.id].y(),ee.points([se,W,B,re]);const ce=q0(se,W,B,re,R_);X==null||X.x(ce==null?void 0:ce.x),X==null||X.y(ce==null?void 0:ce.y),X==null||X.rotation(Math.atan2(re-W,B-se)*(180/Math.PI))}else if(te.target.id===D.id){if(!this.nodesGroup[te.source.id])return;se=this.nodesGroup[te.source.id].x()||0,B=D.x||0,W=this.nodesGroup[te.source.id].y()||0,re=D.y||0,ee.points([se,W,B,re]);const ce=q0(se,W,B,re,R_);X==null||X.x(ce==null?void 0:ce.x),X==null||X.y(ce==null?void 0:ce.y),X==null||X.rotation(Math.atan2(re-W,B-se)*(180/Math.PI))}if(oe&&(te.source.id===D.id||te.target.id===D.id)){oe.x((se+B)/2),oe.y((W+re)/2),oe.offsetX(oe.getWidth()/2||0),oe.offsetY(oe.getHeight()/2+8||0);const ce=Math.atan2(re-W,B-se)*(180/Math.PI);B<se?oe.rotation(ce+180):oe.rotation(ce)}}),this.layer.batchDraw())}}),d.on("dragend",M=>{M.evt[this.actKey]||(this.isAutoTick&&this.simulation.alphaTarget(0),this.isDragging=!1)}),d.on("click",M=>{M.evt.detail===2?this.expandNodes(M,r):M.evt.detail===1&&M.evt.button===0&&this.handleNodeClick(M,r)}),d.on("contextmenu",M=>{M.cancelBubble=!0,M.evt.preventDefault(),M.evt.stopPropagation(),this.handleNodeContextMenu(M,r,d)}),d.on("mouseup",M=>this.handleNodeMouseUp(M,r)),d.on("mousedown",M=>this.handleNodeMouseDown(M,r)),d.on("mouseenter",M=>this.handleNodeMouseEnter(M,r)),d.on("mouseleave",M=>this.handleNodeMouseLeave(M,r)),this.grab.add(d),this.nodesGroup[r.id]=d})),this.stage.batchDraw()},paintLinks(){const e=this.stage.width()/2,t=this.stage.height()/2;this.links.forEach(n=>{this.linksGroup[`${n.source.id}-${n.target.id}`]&&this.linksGroup[`${n.source.id}-${n.target.id}`].destroy();const r=new ct.Group({opacity:1,id:`${n.source.id}-${n.target.id}`,visible:n.source.show&&n.target.show}),o=this.darkMode?"#445152":"#999",a=new ct.Arrow({name:"linkArrow",pointerLength:10,pointerWidth:10,x:e,y:t,fill:o});r.add(a);const c=n.source.x||0,l=n.source.y||0,d=n.target.x||0,u=n.target.y||0,f=new ct.Line({name:"konvaLine",id:`${n.source.id}-${n.target.id}`,points:[c,l,d,u],stroke:n.target.type==="org"?"#cf1322":o,strokeWidth:1,dash:n.diy===!0?[5,5]:null});if(n.target.type==="nodeType"){const p=new ct.Text({name:"edgeLabel",x:(c+d)/2,y:(l+u)/2,text:n.target.name,fontSize:12,fill:this.darkMode?"#cdd9da":"#000"});r.add(p)}r.add(f),this.grab.add(r),r.moveToBottom(),this.linksGroup[`${n.source.id}-${n.target.id}`]=r}),this.stage.batchDraw()},updateSimulation(){var e,t;try{if(!this.simulation&&!this.hasSimulation){this.setSimulation();return}this.simulation.nodes(this.nodes),this.simulation.force("link").links(this.links),this.simulation.alpha(.4).restart(),this.history.layoutIndex===0?((e=this.nodes)==null?void 0:e.length)<this.manualTickNumber?this.simulation.on("tick",this.ticked):(this.simulation.on("tick",null),this.sendManualTick()):this.simulation.on("tick",this.ticked)}catch(n){console.log(n,"simulation-e1"),(t=this.simulation)==null||t.stop()}},ticked(){switch(Gn("ticked"),this.history.layoutIndex){case 0:this.forceLayout();break;case 1:this.treeLayout();break;default:this.forceLayout();break}},forceLayout(){var t;if(!this.nodes.length||!this.links.length)return;let e=!0;for(let n=0;n<this.links.length;n++){const r=this.links[n],o=this.linksGroup[`${r.source.id}-${r.target.id}`],a=o==null?void 0:o.findOne(".konvaLine"),c=o==null?void 0:o.findOne(".linkArrow"),l=o==null?void 0:o.findOne(".edgeLabel");let d=r.source.x,u=r.source.y,f=r.target.x,p=r.target.y;const h=f-d||1,m=p-u||1,b=Math.sqrt(h*h+m*m),w=h/b||1,_=m/b||1,C=r.source.type==="nodeType"?(this.iconSizeComputed[r.source.icon]||14)/2-1:(this.iconSize[r.target.type]||14)/2-1,k=r.target.type==="nodeType"?(this.iconSizeComputed[r.target.icon]||14)/2-1:(this.iconSize[r.target.type]||14)/2-1;if(d=d+C*w,u=u+C*_,f=f-k*w,p=p-k*_,isNaN(d)||isNaN(u)||isNaN(f)||isNaN(p)){e=!1;break}if(a==null||a.points([d,u,f,p]),c){const S=q0(d,u,f,p,R_);c==null||c.x((S==null?void 0:S.x)||0),c==null||c.y((S==null?void 0:S.y)||0),c==null||c.rotation(Math.atan2(p-u,f-d)*(180/Math.PI))}if(l){l.x((d+f)/2),l.y((u+p)/2),l.offsetX(l.getWidth()/2||0),l.offsetY(l.getHeight()/2+8||0);const S=Math.atan2(p-u,f-d)*(180/Math.PI);f<d?l.rotation(S+180):l.rotation(S)}}if(!e){Gn("请点击自动布局按钮"),this.resetLayout();return}for(let n=0;n<this.nodes.length;n++){const r=this.nodes[n];(t=this.nodesGroup[r.id])==null||t.position({x:r.x||0,y:r.y||0})}},selectEdgesByNode(e){const t=e.map(n=>n.id);this.links.forEach(n=>{const r=this.linksGroup[`${n.source.id}-${n.target.id}`];t.includes(n==null?void 0:n.target.id)||t.includes(n==null?void 0:n.source.id)?r==null||r.addName("isSelected"):r==null||r.removeName("isSelected")})},showKeyWay(e){if(e.length!==1){this.links.forEach(r=>{const o=this.linksGroup[`${r.source.id}-${r.target.id}`];o==null||o.removeName("keyed")}),this.history.resetKeyLinksAndNodes();return}const{keyLinks:t,keyNodeIds:n}=this.history.findKeyLinksAndNodes(e[0].id,!0);this.links.forEach(r=>{const o=t.find(c=>c.source.id===r.source.id&&c.target.id===r.target.id),a=this.linksGroup[`${r.source.id}-${r.target.id}`];o?a==null||a.addName("keyed"):a==null||a.removeName("keyed")}),this.nodes.forEach(r=>{const o=this.nodesGroup[r.id];n.includes(r.id)?o==null||o.addName("keyed"):o==null||o.removeName("keyed")})},updateNodeStyle(){if(!this.iconAllLoaded)return;let e;this.nodesRange&&this.history.keyNodeIds?e=[...this.nodesRange.map(t=>t.id),...this.history.keyNodeIds]:this.nodesRange?e=this.nodesRange.map(t=>t.id):this.history.keyNodeIds&&(e=this.history.keyNodeIds),setTimeout(()=>{this.highlightByRule(this.highlightRule,e),this.updateNodesStyleByName(),this.updateLinksStyleByName()},0)},updateNodesStyleByName(){this.nodes.forEach(e=>{const t=this.nodesGroup[e.id];if(!t)return;const n=t==null?void 0:t.findOne(".border"),r=t==null?void 0:t.findOne(".konvaText"),o=this.darkMode?"#cdd9da":"#000";t!=null&&t.hasName("lowlight")?t==null||t.opacity(.4):t==null||t.opacity(1),t!=null&&t.hasName("isSelected")?(t.scale({x:8/7,y:8/7}),n==null||n.visible(!0)):(t.scale({x:1,y:1}),n==null||n.visible(!1)),e.type!=="nodeType"&&(t!=null&&t.hasName("isSelected")?(r==null||r.visible(!0),r==null||r.fill("#007ee2")):(r==null||r.visible(!!e.textProp),r==null||r.fill(o)))}),this.layer.batchDraw()},updateLinksStyleByName(){this.links.forEach(e=>{const t=this.linksGroup[`${e.source.id}-${e.target.id}`];if(!t)return;const n=t.findOne(".konvaLine"),r=t.findOne(".edgeLabel"),o=t.findOne(".linkArrow");t!=null&&t.hasName("lowlight")?t==null||t.opacity(.4):t==null||t.opacity(1);const a=this.darkMode?"#445152":"#999";if(t.hasName("isSelected")||t.hasName("keyed")){const c=e.target.type==="org"?"#cf1322":"#007ee2";n.stroke(c),o.fill(c),n.strokeWidth(1),t==null||t.opacity(1),r==null||r.fill("#007ee2"),t.hasName("keyed")?n.strokeWidth(3):n.strokeWidth(1)}else{const c=e.target.type==="org"?"#cf1322":a;this.linksGroup[`${e.source.id}-${e.target.id}`].removeName("isSelected"),n.strokeWidth(1),n.stroke(c),o.fill(c),r==null||r.fill(this.darkMode?"#cdd9da":"#000")}}),this.layer.batchDraw()},handleTableSelect(e=[]){this.selection=this.nodes.filter(t=>{let n;return e.length>1?n=e.indexOf(t.id)>=0&&t.type!=="nodeType"&&t.type!=="aggregation":n=e.indexOf(t.id)>=0,n}),this.updateSelection()},resetAll(){var e,t;document.removeEventListener("click",this.hideContextMenu),(e=this.simulation)==null||e.stop(),this.simulation=null,this.hasSimulation=!1,this.mousedownNode=null,this.mousedownPos=null,this.mouseupNode=null,this.$refs.canvasContainer&&((t=this.resizeObserver)==null||t.unobserve(this.$refs.canvasContainer)),this.nodes=[],this.links=[],this.resizeObserver=null,this.destroyed=!0,this.history.destroy&&this.history.destroy()},unbindKeyEvent(){this.initKeyEvent(1)},initKeyEvent(e=0){if(e){document.removeEventListener("keydown",this.keyDown),document.removeEventListener("keyup",this.keyUp);return}document.addEventListener("keydown",this.keyDown),document.addEventListener("keyup",this.keyUp),this.isKeyUp=!0},keyDown(e){const t=e.keyCode,n=e[this.actKey],r=e.shiftKey;if(this.isKeyUp)switch(t){case 17:break;case 16:this.toggleZoom(!1);break;case 38:break;case 40:this.goAction();break;case 67:if(window.getSelection().toString())return;n&&this.copyNodeText(this.selection);break;case 89:n&&!ma()&&this.$parent.historyForward();break;case 90:n&&r?this.$parent.historyForward():n&&this.$parent.historyBack();break;case 46:this.$parent.deleteNodes(this.selection);break}},keyUp(e){const t=e.keyCode,n=e.keyCode;if(ma())switch(n){case 17:break;case 16:this.toggleZoom(!0);break}else switch(t){case 17:break;case 16:this.toggleZoom(!0);break}this.isKeyUp=!0},initScript(){var r,o,a,c,l,d;if(this.scriptInited)return;((a=(o=(r=this.history)==null?void 0:r.dataNow)==null?void 0:o.nodes)==null?void 0:a.length)>0&&(this.scriptInited=!0);const e=["193.36.119.50","6cd7b91212983cc557c6e3e671734ff9"];let t=null;if((d=(l=(c=this.history)==null?void 0:c.dataNow)==null?void 0:l.nodes)==null||d.some(u=>{const f=e.indexOf(u.id);return f>=0&&u.startNode===!0&&(t=f),!0}),t===null)return;const n=[[{node:"193.36.119.50"},{node:"6cd7b91212983cc557c6e3e671734ff9"},{node:"http://9d1109ab.privatedns.org/download/FirefoxSetup.dll"},{node:"94.237.81.57"},{node:"chart.expocasheuro.com"}],[{node:"6cd7b91212983cc557c6e3e671734ff9"},{node:"http://9d1109ab.privatedns.org/download/FirefoxSetup.dll"},{node:"94.237.81.57"},{node:"chart.expocasheuro.com"},{node:"183.246.177.59"},{node:"e7db5b09a39e324d36e937d89f98fdb9122cd859"}]];this.scriptNow=n[t],this.canAct=!!this.scriptNow},goAction(){if(!this.scriptNow||this.actNum>(this.scriptNow.length-1)*2)return;if(this.actNum===(this.scriptNow.length-1)*2){this.centerAndZoom(),this.actNum++;return}const e=this.scriptNow[Math.floor(this.actNum/2)+1];if(this.actNum%2===0){if(!this.history.dataNow.nodes.some(t=>t.id===e.node))return;this.handleTableSelect(e.node),this.nodesMoveToCenterView([e.node]),this.actNum++}else this.$parent.expandNodes(this.selection[0]),setTimeout(()=>{this.nodesMoveToCenterView([this.selection[0].id])},100),this.actNum++},nodesMoveToCenterView(e,t=.9){if(e.length===0)return;const n=[],r=this.nodes.filter(k=>e.indexOf(k.id)>=0);r==null||r.forEach(function(k,S){const E=this.nodesGroup[k.id];n.push({bounds:(E==null?void 0:E.getClientRect())||{},fx:k.x||0,fy:k.y||0})});const o=this.getBounds(n);this.originTransform=this.originTransform={scaleX:this.stage.scaleX(),scaleY:this.stage.scaleY(),x:this.stage.x(),y:this.stage.y()};const a=this.stage.width(),c=this.stage.height()/1.5,l=o.width,d=o.height;if(l===0||d===0)return;let u=t/Math.max(l/a,d/c);u=Math.min(u,ni)||ni,this.scale=u;const f=this.stage.width()/(2*u),p=this.stage.height()/(2*u),h=this.nodesGroup[e[0]],m=h==null?void 0:h.getClientRect(),b=m.x*u,w=m.y*u,_=f-b,C=p-w;this.stage.setAttrs({scaleX:u,scaleY:u,x:_||0,y:C||0}),this.layer.batchDraw()},getBounds(e){let t,n,r,o;return e.map(a=>{const c=a.bounds,l=c.x+a.fx,d=c.y+a.fy;t=Math.min(l,t)||l,n=Math.min(d,n)||d,r=Math.max(l+c.width,r)||l+c.width,o=Math.max(d+c.height,o)||d+c.height}),{x:t,y:n,width:r-t,height:o-n}},resetMouseVars(){var e;this.mousedownNode=null,this.mousedownPos=null,this.mouseupNode=null,(e=this.dragLine)==null||e.destroy(),Object.keys(this.nodesGroup).forEach(t=>{this.nodesGroup[t].draggable(!0)})},loadIcons(){return new Promise((e,t)=>{const n=[],r=[];for(const d in this.moduleDetail.plugs){const u=this.moduleDetail.plugs[d];u==null||u.map(f=>{f.children?r.push(...f.children):r.push(f)})}n.push(...r.map(d=>d.icon)),n.push(...this.moduleDetail.nodes.map(d=>d.name)),n.push("node_type"),n.push("node"),n.push("aggregation");const o=this;let a=0;const c=n.filter(d=>this.imgPath[`${o.prefix}d3svg1/${d}.svg`]);function l(d){return{}.VITE_SVG_TYPE==="base64"?S5(d):_5(d)}c.map(d=>{l(this.imgPath[`${o.prefix}d3svg1/${d}.svg`]).then(u=>{o.iconFiles[d]=u;const f=XQ(u).width;this.iconSize[d]=f,a++,a===c.length&&(o.iconAllLoaded=!0,e())}).catch(u=>{console.log(u,"e"),t()})})})},toggleZoom(e){},handleNodeContextMenu(e,t){var n,r;e.evt[this.actKey]||(clearTimeout(this.popoverTimer),this.showPopover=!1,this.contextMenuId++,this.contextMenuNode=t,this.mousePosition.left=e.evt.clientX,this.mousePosition.top=e.evt.clientY,this.showContextMenu=!0,e.currentTarget.type==="aggregation"?this.menuOptions=eEe:this.menuOptions=(n=this.$parent.moduleDetail)!=null&&n.plugs[t.type]?Array.from((r=this.$parent.moduleDetail)==null?void 0:r.plugs[t.type]):[])},handleDeselectNode(e,t){ye(this,"handle-select-node",{isSelected:!1,_node:s.toRaw(t)}),this.selection.length&&(this.selection=[],this.updateSelection()),this.setHighlightRule({}),this.hideContextMenu()},setHighlightRule({prop:e,type:t,value:n}){this.highlightRule={prop:e,type:t,value:n},this.updateNodeStyle(),t||yC(".legend-filter .out-box").classed("active",!1)},updateSelection(){const e=this.selection.map(t=>t.id);this.nodes.forEach(t=>{var n,r;e.includes(t.id)?(n=this.nodesGroup[t.id])==null||n.addName("isSelected"):(r=this.nodesGroup[t.id])==null||r.removeName("isSelected")}),ye(this,"updateSelection")},toggleLayout(e){this.history.layoutIndex=e,this.nodes.map(t=>{t.fx=t.fy=null}),this.updateSimulation(),this.ticked(),setTimeout(()=>{this.centerAndZoom()},200)},handleNodeClick(e,t){en({cId:"handleNodeClick",c:"点击节点"}),this.canAct&&(t.type==="org"?window.open("http://bs.safe.360.net/starmap","__blank"):t.type==="nodeType"&&t.id.indexOf("org")>=0&&window.open("http://bs.safe.360.net/orglist?snapshot=true","__blank1")),this.hideContextMenu();const n=this.selection.some(o=>o.id===t.id);if(e.evt.shiftKey){if(t.type==="nodeType"||this.selection.some(o=>o.type==="nodeType"))return;n?this.selection=this.selection.filter(o=>o.id!==t.id):this.selection=[...this.selection,t]}else n?this.selection=[]:this.selection=[t];const r=this.selection.some(o=>o.id===t.id);ye(this,"handle-select-node",{isSelected:r,_node:t}),this.updateSelection(),this.setHighlightRule(this.highlightRule)},handleNodeMouseEnter(e,t){if(!this.showContextMenu&&!e.evt[this.actKey]){const n=e.target.width(),r=e.target.height(),o=e.target,a=o.getAbsolutePosition(),l=o.getStage().container().getBoundingClientRect(),d=a.x-n/2+l.left,u=a.y-r/2+l.top,f=d,p=u,h=f,m=f+n,b=p,w=p+r;this.hoverNodePosition={top:b,right:m,bottom:w,left:h,width:n,height:r},this.popoverType="node",this.popoverContent={[t.type]:t.id},this.popoverNode=t,this.popoverTimer&&clearTimeout(this.popoverTimer),this.popoverTimer=setTimeout(()=>{this.showPopover=!0},200)}},handleNodeMouseLeave(e,t){this.showContextMenu||(clearTimeout(this.popoverTimer),this.showPopover=!1)},handleNodeMouseUp(e,t){var n;e.evt[this.actKey]&&this.mousedownNode&&(this.dragLine&&((n=this.dragLine)==null||n.destroy()),this.mouseupNode=t,this.mouseupNode.id===this.mousedownNode.id||this.mouseupNode.type==="aggregation"||this.mousedownNode.type==="aggregation"||this.$parent.addLink(this.mousedownNode,this.mouseupNode)),this.resetMouseVars()},handleNodeMouseDown(e,t){if(e.evt[this.actKey]){this.mousedownNode=t,this.nodesGroup[t.id].draggable(!1);const n=this.stage.scaleX(),r=this.stage.getPointerPosition(),o=(r.x-this.stage.x())/n,a=(r.y-this.stage.y())/n;this.mousedownPos={x:o,y:a},this.dragLine=new ct.Line({points:[o,a,o,a],stroke:"black",strokeWidth:1,dash:[5,5],opacity:.7,visible:!0}),this.layer.add(this.dragLine),this.stage.draw()}},treeLayout(){this.nodes.map(e=>{e.fx=e.pos,e.fy=e.levelNum*this.levelHeight}),this.forceLayout()},resetLayout(){this.simulation.stop(),this.nodes.map(e=>{delete e.vx,delete e.vy,delete e.x,delete e.y,delete e.fx,delete e.fy}),this.updateSimulation()},selectSingleEdgeNode(e){const t=[];this.links.map(n=>{n.source.id===e.id&&t.push(n.target.id)});for(let n=t.length-1;n>=0;n--){let r=0,o=0;const a=t[n];this.links.map(c=>{c.source.id===a&&r++,c.target.id===a&&o++}),r>=1&&t.splice(n,1),o>=2&&t.splice(n,1)}return t},selectChildren(e){const t=[];this.links.map(n=>{n.source.id===e.id&&t.push(n.target.id)}),this.handleTableSelect(t)},selectParents(e){const t=[];this.links.map(n=>{n.target.id===e.id&&t.push(n.source.id)}),this.handleTableSelect(t)},handleGlobalContextMenu(e){this.mousePosition.left=e.evt.clientX,this.mousePosition.top=e.evt.clientY,this.menuOptions=[],this.showContextMenu=!0,this.showPopover=!1,this.contextMenuNode={},e.evt.preventDefault()},hideContextMenu(){this.showContextMenu=!1,this.contextMenuNode={}},centerAndZoom(e=.7,t=!1){var f,p,h;if(this.originTransform={scaleX:this.stage.scaleX(),scaleY:this.stage.scaleY(),x:this.stage.x(),y:this.stage.y()},!this.grab)return;const n=this.stage.width(),r=this.stage.height(),o=this.grab.getClientRect(),a=o.width/this.scale,c=o.height/this.scale;if(a===0||c===0)return;let l=e/Math.max(a/n,c/r);if(l=t?l:Math.min(l,ni)||ni,!t&&l>ni)return;this.scale=l;const d=this.stage.width()/(2*l),u=this.stage.height()/(2*l);if((f=this.simulation)!=null&&f.force&&((p=this.simulation)==null||p.force("center",_S(d,u))),this.ticked(),this.stage.setAttrs({scaleX:l,scaleY:l,x:0,y:0}),this.layer.batchDraw(),this.history.layoutIndex===1){const m=this.grab.getClientRect(),b=(n-m.width)/2-m.x,w=(r-m.height)/2-m.y;this.stage.setAttrs({x:b,y:w}),this.layer.batchDraw(),(h=this.simulation)==null||h.stop()}},reset(){this.stage.setAttrs(this.originTransform)},handleContextMenuClick({nodes:e,api:t,dataApi:n}){if(this.requestGraphData){let r,o;const a={show_label:"label",all_show_label:"label",all_show_names:"name",show_names:"name"};switch(t&&t.name){case"edit_label":this.editLabel(e);break;case"single_edge_select":r=this.selectSingleEdgeNode(e[0]),this.selection=this.nodes.filter(c=>r.includes(c.id));break;case"hold_aggregation":o=this.selectSingleEdgeNode(e[0]),this.$parent.aggregationNodes(o,e[0]);break;case"release_aggregation":this.$parent.releaseAggregation(e[0]);break;case"show_label":case"show_names":e.map(c=>{this.showLabel(c,a[t.name])});break;case"all_show_label":case"all_show_names":this.nodes.map(c=>{this.showLabel(c,a[t.name])});break;case"un_show_names":case"un_show_label":e.map(c=>{this.hideLabel(c)});break;case"all_un_show_names":case"all_un_show_label":this.nodes.map(c=>{this.hideLabel(c)});break;case"copy":this.copyNodeText(e);break;case"node_star":e.map(c=>{this.starNode(c)});break;case"un_node_star":e.map(c=>{this.starNode(c,!1)});break;case"fix_nodes":e.map(c=>{this.toggleMove(c,!0)});break;case"un_fix_nodes":e.map(c=>{this.toggleMove(c,!1)}),this.updateSimulation();break;case"all_fix_nodes":this.fixAllNodes(!0);break;case"all_un_fix_nodes":this.fixAllNodes(!1);break;case"expand_node":e.map(c=>{this.$parent.expandNodes(c)});break;case"expand_part_node":e.map(c=>{this.$parent.expandNodes(c,n)});break;case"go_result":this.handleGoDetail(e);break;case"delete_node":this.$parent.deleteNodes(e);break;case"select_children":this.selectChildren(e[0]);break;case"select_parents":this.selectParents(e[0]);break;case"undo":this.$parent.historyBack();break;case"redo":this.$parent.historyForward();break;case"add_con_node":this.$parent.$refs.buttonList.addNode("diy",e[0]);break;case"add_link":this.$parent.$refs.buttonList.addNode("diy",e[0]);break;case"show_node":this.toggleShowNode(e[0],e[1],!0);break;case"hide_node":this.toggleShowNode(e[0],e[1],!1);break;default:ye(this,"custom-contextmenu-click",{eventName:t.name,customConfig:t.customConfig,nodes:e,allNodes:s.toRaw(this.history.dataNow.nodes)})}this.hideContextMenu(),setTimeout(()=>{this.updateSelection()},400)}else Lt({message:"无可操作权限",type:"warning"})},expandNodes(e,t){en({cId:"dblclick",c:"双击节点"}),this.requestGraphData?this.$parent.expandNodes(t):Lt({message:"无可操作权限",type:"warning"})},toggleShowNode(e,t,n=!0){this.history.toggleShowNode(e,t,n),this.selection.filter(o=>o.show).length>0||this.handleTableSelect([]),setTimeout(this.updateNodeStyle,100)},copyNodeText(e){let t="";e.filter(n=>n.type!=="aggregation"&&n.type!=="nodeType").map(n=>{t=t+n.id+`
145
+ `}),t&&nEe(t).then(()=>{Lt({message:"复制成功",type:"success"})},n=>{console.log("copy---e",n)})},toggleMove(e,t){e.fx=t?e.x:null,e.fy=t?e.y:null},autoDisplay(){this.nodes.map(e=>{e.fx=null,e.fy=null})},editLabel(e){var t;g5.prompt("修改备注",{confirmButtonText:"确定",cancelButtonText:"取消",inputValue:(t=e[0])==null?void 0:t.label,inputPlaceholder:"请输入备注,最多20字",inputValidator:n=>n.length>20?"已超过20字":!0}).then(({value:n})=>{e.map(r=>{r.label=n,this.showLabel(r,"label")}),this.updateNodeStyle()}).catch(n=>{console.log(n)})},showLabel(e,t){e.textProp=t,this.update()},hideLabel(e,t){e.textProp=null,this.update()},safeGet(e,t){return!e||!t?void 0:t.split(".").reduce((o,a)=>o&&o[a]?o[a]:void 0,e)},fixAllNodes(e=!0){this.nodes.map(t=>{this.toggleMove(t,e)}),!e&&this.isAutoTick&&this.updateSimulation()},highlightByRule(e,t){if(!e.prop&&!t){this.nodes.forEach(l=>{const d=this.nodesGroup[l.id];d==null||d.removeName("lowlight")}),this.links.forEach(l=>{const d=this.linksGroup[`${l.source.id}-${l.target.id}`];d==null||d.removeName("lowlight")});return}const{type:n,prop:r,value:o}=e,a=this,c=[];this.nodes.forEach(l=>{const d=this.nodesGroup[l.id];r?n==="include"?o.includes(a.safeGet(l,r))&&a.inNodesRange(t,l)?(d==null||d.removeName("lowlight"),c.push(l)):d==null||d.addName("lowlight"):n==="equal"?a.safeGet(l,r)===o&&a.inNodesRange(t,l)?(d==null||d.removeName("lowlight"),c.push(l)):d==null||d.addName("lowlight"):n==="boolean"&&(j0(a.safeGet(l,r))&&a.inNodesRange(t,l)?(d==null||d.removeName("lowlight"),c.push(l)):d==null||d.addName("lowlight")):a.inNodesRange(t,l)?(d==null||d.removeName("lowlight"),c.push(l)):d==null||d.addName("lowlight")}),this.links.forEach(l=>{const d=this.linksGroup[`${l.source.id}-${l.target.id}`];c.some(f=>f.id===l.target.id)?d==null||d.removeName("lowlight"):d==null||d.addName("lowlight")})},handleCustomSelect(e){if(this.handleDeselectNode(),!e.prop)return;const{type:t,prop:n,value:r}=e,o=this;this.nodes.forEach(a=>{if(n&&t==="include"){let c;if(a.type==="nodeType"){const l=o.safeGet(a,"parents"),d=o.safeGet(a,"children"),u=l==null?void 0:l.some(p=>r.includes(p)),f=d==null?void 0:d.some(p=>r.includes(p));c=u&&f}(r.includes(o.safeGet(a,n))||c)&&this.selection.push(a)}}),this.updateSelection()},inNodesRange(e,t){return e?e.some(n=>n===t.id):!0},loadFlagFiles(e){return Te(this,null,function*(){return new Promise(t=>{this.flagFiles[e]?t(this.flagFiles[e]):(this.flagFiles[e]=this.imgPath[`${this.prefix}d3svg1/flags/${e}.png`],t(this.flagFiles[e]))})})},getNodeImage(e){return Te(this,null,function*(){var o,a,c,l,d,u,f,p,h,m;let t=null;const n=(c=(a=(o=e.detail)==null?void 0:o.info)==null?void 0:a.basic)==null?void 0:c.flag,r=(u=(d=(l=e==null?void 0:e.detail)==null?void 0:l.info)==null?void 0:d.basic)==null?void 0:u.level;if(e.detail&&((p=(f=e.detail)==null?void 0:f.info)!=null&&p.inner_img))try{t=yield ga(e.detail.info.inner_img)}catch(b){console.log("loadCompleted error",b)}else if(e.type==="nodeType"||e.type==="aggregation"){const b=e.icon||"node_type";if(cr[b])return t=cr[b],t;t=this.iconFiles[b]?this.iconFiles[b]:this.iconFiles.node_type,t=yield ga("data:image/svg+xml,"+encodeURIComponent(t)),cr[b]=t}else if(n&&(e.type==="ip"||e.type==="internet")){if(cr[n])return t=cr[n],t;yield this.loadFlagFiles(n),t=yield ga(this.flagFiles[n]),cr[n]=t}else if((m=(h=e.detail)==null?void 0:h.info)!=null&&m.inner_country&&(e.type==="country"||e.type==="target_country")){const b=e.detail.info.inner_country;if(cr[b])return t=cr[b],t;yield this.loadFlagFiles(b),t=yield ga(this.flagFiles[b]),cr[b]=t}else{const b=`${e.type||"node"}${r}${this.darkMode}`;if(cr[b])return t=cr[b],t;t=this.iconFiles[e.type]?this.iconFiles[e.type]:this.iconFiles.node;const w=as(r,this.levelList,this.darkMode),_=this.darkMode?"#182628":"#fff";t=C5(t,w,_);try{t=yield ga("data:image/svg+xml,"+encodeURIComponent(t))}catch(C){console.log(C)}cr[b]=t}return t})},handleGoDetail(e){e.forEach(t=>{if(t.isCluster)return;const n=t.type,r=this.moduleDetail.config.jumpRule[n];if(r)if(n==="org"){const o=t.id.split("(")[0];o.indexOf("APT")>=0&&window.open(r.split("${id}").join(o),t.id)}else{let o=t.origin&&t.origin[0]||t.id;(n==="url"||n==="virus")&&(o=encodeURIComponent(o)),window.open(r.split("${id}").join(o),t.id)}})},starNode(e,t=!0){e.collect=t,this.update()},handleAddBlack(e){this.showBlackType=!0,this.node=e},changeVisible(e){this.showBlackType=e},zoomIn(){this.adjustZoom(1.1)},zoomOut(){this.adjustZoom(.909)},adjustZoom(e){const n=this.stage.scaleX()*e;this.scale=n;const r={x:this.stage.width()/2,y:this.stage.height()/2},o={x:this.stage.getPointerPosition().x-this.stage.x(),y:this.stage.getPointerPosition().y-this.stage.y()},a={x:-(o.x-r.x)*(e-1),y:-(o.y-r.y)*(e-1)};this.stage.setAttrs({x:this.stage.x()+a.x,y:this.stage.y()+a.y,scaleX:n,scaleY:n}),this.layer.batchDraw()},addNodesDetail(e){return Te(this,null,function*(){const t=e.filter(o=>!o.detail&&o.noDetail!==!0&&o.type!=="aggregation"&&o.type!=="nodeType"),n={};t.map(o=>{n[o.type]?n[o.type].push(o):n[o.type]=[o]});const r=[];for(const o in n){const a=n[o],c={};a.map(l=>{l.origin&&(c[l.id]=l.origin)}),r.push(this.graphApi.getNodesDetail({api:this.moduleDetail.node_info[n[o][0].type],node_id:n[o].map(l=>l.id),origin:c}).then(l=>(l.data.records.map(u=>{const f=e.find(p=>p.id===u.info.id);f.detail=u}),Promise.resolve({}))))}})},addCanvasBg(){this.darkMode&&(this.darkBgRect=new ct.Rect({x:0,y:0,width:this.stage.width()/this.scale,height:this.stage.height()/this.scale,fill:"#021212",stroke:"#021212",listening:!1,draggable:!1}),this.layer.add(this.darkBgRect),this.darkBgRect.moveToBottom(),this.stage.draw())},removeCanvasBg(){this.darkBgRect&&this.darkBgRect.destroy(),this.darkBgRect=null,this.stage.draw()}}},sEe={class:"main-svg-box","element-loading-text":"布局中...","element-loading-background":"rgba(122, 122, 122)"},aEe={ref:"canvasContainer",class:"canvas-container"};function lEe(e,t,n,r,o,a){const c=s.resolveComponent("popover"),l=s.resolveComponent("node-contextmenu"),d=f5;return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["render-container",n.darkMode?"dark-theme "+o.uniqueClass:" "+o.uniqueClass])},[s.withDirectives((s.openBlock(),s.createElementBlock("div",sEe,[s.createElementVNode("div",aEe,null,512)])),[[d,o.ticking]]),s.createVNode(c,{"dark-mode":n.darkMode,"show-popover":o.showPopover&&!o.isDragging,"mouse-position":o.hoverNodePosition,"node-info":o.popoverNode,"module-detail":n.moduleDetail,type:o.popoverType,history:n.history,data:n.history.dataNow},null,8,["dark-mode","show-popover","mouse-position","node-info","module-detail","type","history","data"]),n.isThreatPath?s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(l,{key:0,show:a.showContextMenuFlag,axis:o.mousePosition,"node-info":a.contextMenuNodes,history:n.history,"menu-options":o.menuOptions,"module-detail":n.moduleDetail,onContextmenuClick:a.handleContextMenuClick},null,8,["show","axis","node-info","history","menu-options","module-detail","onContextmenuClick"]))],2)}const $l=Bt(oEe,[["render",lEe]]),XNe="",QNe="",ZNe="",{toClipboard:xR}=uf(),cEe={name:"SnapShotDialog",components:{},mixins:[],props:{snapshot:{type:Object,default:()=>{}},graphApi:{type:Object,default:()=>{}}},data(){return{dialogVisible:!1,origin:window.location.origin,ruleForm:{radio:"0",event:"",group:"",graphDesc:""},rules:{event:[{required:!0,message:"请选择安全事件",trigger:"change"}],group:[{required:!1,message:"请选择团队",trigger:"change"}]},eventOptions:[{value:"",label:""}],groupOptions:[{value:"",label:""}],hostList:["https://sc.360.net","https://sc.b.qihoo.net","http://sec.test.safe.qihoo.net"],isInnerAccount:!1,visibleSuccess:!1,eventUrl:null}},computed:{},watch:{snapshot:{handler:function(e,t){e.name&&(this.ruleForm.graphDesc=e.name)},immediate:!0,deep:!0}},created(){this.graphApi.getReportList&&this.graphApi.getReportList().then(e=>{e.data!==null&&(this.eventOptions=[],e.data.map(t=>{this.eventOptions.push({label:t.title,value:t.report_id})}))}),this.graphApi.getGroupList&&this.graphApi.getGroupList().then(e=>{e.data!==null?(this.groupOptions=[],e.data.map(t=>{this.groupOptions.push({label:t.group_name,value:t.group_id})}),this.isInnerAccount=!0):this.isInnerAccount=!1})},mounted(){},updated(){},beforeUnmount(){},methods:{hanleClickCopy(e){xR(e).then(t=>Lt({message:"复制成功",type:"success"}),t=>Lt.error("复制失败"))},show(){this.dialogVisible=!0},hide(){this.dialogVisible=!1,this.resetForm("ruleForm")},submitForm(e){this.$refs[e].validate(t=>{if(t){const n=this.hostList.some(l=>l===this.origin);let r=null;n?this.origin===this.hostList[1]?r=`${this.hostList[0]}/graph?snapshot_id=${this.snapshot.snapshot_id}&vcode=${this.snapshot.vcode}`:r=`${this.origin}/graph?snapshot_id=${this.snapshot.snapshot_id}&vcode=${this.snapshot.vcode}`:r=`http://test.sec.360.net/graph?snapshot_id=${this.snapshot.snapshot_id}&vcode=${this.snapshot.vcode}`,this.eventUrl=window.location.origin+"/event/"+this.ruleForm.event;const o=this.snapshot.thumb;let a=null;this.groupOptions.map(l=>{l.value===this.ruleForm.group&&(a=l.label)});const c={report_id:this.ruleForm.event,group_id:this.ruleForm.group,content:o,graph_url:r,group_name:a,acl:parseInt(this.ruleForm.radio),head:this.ruleForm.graphDesc};this.graphApi.addGraph(c).then(l=>{l.code==="0"?(xR(this.eventUrl),Lt({message:"分享成功! 分享事件地址已经复制",type:"success",showClose:!0,duration:5e3})):Lt({message:"分享失败",type:"error"})}).catch(()=>{Lt({message:"分享失败",type:"error"})}),this.resetForm(e),this.dialogVisible=!1}else return!1})},resetForm(e){this.$refs[e].resetFields(),this.snapshot.name=""}}},dEe={class:"sharetoEvents"},uEe={class:"lable-header"},fEe={class:"desc"},hEe={key:0,class:"desc-font"},pEe={key:1,class:"desc-font"},gEe={class:"dialog-footer"};function mEe(e,t,n,r,o,a){const c=ZK,l=ef,d=Vu,u=r0,f=es,p=n0,h=ns,m=kc;return s.openBlock(),s.createElementBlock("div",dEe,[s.createVNode(m,{title:"分享到安全事件","append-to-body":"","close-on-click-modal":!1,width:"25%",modelValue:o.dialogVisible,"onUpdate:modelValue":t[6]||(t[6]=b=>o.dialogVisible=b),class:"el-dialog-graph"},{footer:s.withCtx(()=>[s.createElementVNode("span",gEe,[s.createVNode(h,{type:"primary",onClick:t[5]||(t[5]=b=>a.submitForm("ruleForm"))},{default:s.withCtx(()=>[s.createTextVNode("确认分享")]),_:1}),s.createVNode(h,{onClick:a.hide},{default:s.withCtx(()=>[s.createTextVNode("关闭")]),_:1},8,["onClick"])])]),default:s.withCtx(()=>[s.createVNode(p,{ref:"ruleForm",model:o.ruleForm,rules:o.rules,"label-width":"100px",class:"demo-ruleForm"},{default:s.withCtx(()=>[s.createElementVNode("div",uEe,[s.createVNode(c,{modelValue:o.ruleForm.radio,"onUpdate:modelValue":t[0]||(t[0]=b=>o.ruleForm.radio=b),class:"el-radio",label:"1",border:"",size:"medium"},{default:s.withCtx(()=>[s.createTextVNode("付费可见")]),_:1},8,["modelValue"]),s.createVNode(c,{modelValue:o.ruleForm.radio,"onUpdate:modelValue":t[1]||(t[1]=b=>o.ruleForm.radio=b),label:"0",border:"",size:"medium"},{default:s.withCtx(()=>[s.createTextVNode("开放")]),_:1},8,["modelValue"]),s.createElementVNode("div",fEe,[o.ruleForm.radio==="0"?(s.openBlock(),s.createElementBlock("span",hEe,"该Graph内容对所有用户可见。")):(s.openBlock(),s.createElementBlock("span",pEe,"该Graph内容对付费用户可见。"))])]),s.createVNode(u,{label:"安全事件",prop:"event"},{default:s.withCtx(()=>[s.createVNode(d,{modelValue:o.ruleForm.event,"onUpdate:modelValue":t[2]||(t[2]=b=>o.ruleForm.event=b),"popper-append-to-body":!1,filterable:"",placeholder:"请选择",class:"select-item"},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(o.eventOptions,b=>(s.openBlock(),s.createBlock(l,{key:b.value,label:b.label,value:b.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),o.isInnerAccount?(s.openBlock(),s.createBlock(u,{key:0,label:"选择团队",prop:"group"},{default:s.withCtx(()=>[s.createVNode(d,{modelValue:o.ruleForm.group,"onUpdate:modelValue":t[3]||(t[3]=b=>o.ruleForm.group=b),class:"select-item",filterable:"",placeholder:"请选择"},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(o.groupOptions,b=>(s.openBlock(),s.createBlock(l,{key:b.value,label:b.label,value:b.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})):s.createCommentVNode("",!0),s.createVNode(u,{label:"Graph介绍",prop:"graphDesc"},{default:s.withCtx(()=>[s.createVNode(f,{modelValue:o.ruleForm.graphDesc,"onUpdate:modelValue":t[4]||(t[4]=b=>o.ruleForm.graphDesc=b),type:"textarea",rows:2,placeholder:"请输入内容",maxlength:"50",clearable:""},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["modelValue"])])}const vEe=Bt(cEe,[["render",mEe]]),VNe="",{toClipboard:yEe}=uf(),bEe={name:"SnapShotDialog",components:{ShareToSecurityEvents:vEe},mixins:[],props:{graphUrlPath:{type:String,default:"/graph"},snapshot:{type:Object,default:()=>{}},graphApi:{type:Object,default:()=>{}}},data(){return{dialogVisible:!1,origin:window.location.origin,isInnerAccount:!1}},computed:{},watch:{},created(){},mounted(){uo(qe,"sharePermission",e=>{this.isInnerAccount=e})},updated(){},beforeUnmount(){fo(qe,"sharePermission")},methods:{hanleClickCopy(e){yEe(e).then(t=>Lt({message:"复制成功",type:"success"}),t=>Lt.error("复制失败"))},show(){this.dialogVisible=!0},hide(){this.dialogVisible=!1},shareToEvents(){this.dialogVisible=!1,this.$refs.sharetoevents.show()}}},wEe={class:"snapshotdialog-container"},_Ee={class:"dialog-footer"};function CEe(e,t,n,r,o,a){const c=es,l=EY,d=ns,u=kc,f=s.resolveComponent("ShareToSecurityEvents");return s.openBlock(),s.createElementBlock("div",wEe,[s.createVNode(u,{title:"复制链接及提取码","append-to-body":"",modelValue:o.dialogVisible,"onUpdate:modelValue":t[2]||(t[2]=p=>o.dialogVisible=p),"close-on-click-modal":!1,class:"el-dialog-graph"},{footer:s.withCtx(()=>[s.createElementVNode("span",_Ee,[o.isInnerAccount?(s.openBlock(),s.createBlock(d,{key:0,type:"primary",onClick:t[0]||(t[0]=p=>a.shareToEvents())},{default:s.withCtx(()=>[s.createTextVNode("分享到安全事件")]),_:1})):s.createCommentVNode("",!0),s.createVNode(d,{type:"primary",onClick:t[1]||(t[1]=p=>a.hanleClickCopy(`${o.origin}${n.graphUrlPath}?snapshot_id=${n.snapshot.snapshot_id}&vcode=${n.snapshot.vcode}`))},{default:s.withCtx(()=>[s.createTextVNode("复制链接及提取码")]),_:1}),s.createVNode(d,{onClick:a.hide},{default:s.withCtx(()=>[s.createTextVNode("关闭")]),_:1},8,["onClick"])])]),default:s.withCtx(()=>[s.createVNode(c,{value:`${o.origin}${n.graphUrlPath}?snapshot_id=${n.snapshot.snapshot_id}`},{prepend:s.withCtx(()=>[s.createTextVNode("链接地址:")]),_:1},8,["value"]),s.createVNode(l),s.createVNode(c,{value:n.snapshot.vcode},{prepend:s.withCtx(()=>[s.createTextVNode("提取码:")]),_:1},8,["value"])]),_:1},8,["modelValue"]),s.createVNode(f,{ref:"sharetoevents",snapshot:n.snapshot,"graph-api":n.graphApi},null,8,["snapshot","graph-api"])])}const SEe=Bt(bEe,[["render",CEe]]),eTe="",EEe={name:"ForceGraphByCanvas",components:{Loading:Su,ForceGraphSvgIcon:ss,RenderByCanvas:$l,ButtonList:nie,SnapShotDialog:SEe,RightMenu:Aee,Legend:Ine},mixins:[jr],provide:function(){return{history:this.history,hasLevel:this.hasLevel,levelList:this.levelList,levelMap:this.levelMap,getDarkMode:()=>this.darkMode,requestGraphData:this.requestGraphData,moduleDetail:()=>this.moduleDetail}},props:{showPoint:{type:Boolean,default:!0},isRenderStartNode:{type:Boolean,default:!0},isDefaultSelectStartNode:{type:Boolean,default:!0},isShowRightMenu:{type:Boolean,default:!0},hideButtonList:{type:Array,default:()=>[]},customContextMenuEvent:{type:Function},handleSelectNodeEvent:{type:Function},handleDataLoaded:{type:Function},graphApi:{type:Object,default:()=>{}},graphUrlPath:{type:String,default:"/graph"},snapshot_id:{type:String,default:""},vcode:{type:String,default:""},module:{type:String,default:""},startNode:{type:Array,default:()=>[]},enterStartNode:{type:Boolean,default:!1},hasLevel:{type:Boolean,default:!0},levelList:{type:Array,default:()=>[{level:"未知",levelName:"未知",className:"unknown",iconType:"",normalColor:"#666",darkColor:"#c6cdd5",dangerNumber:0},{level:"危险",levelName:"危险",className:"warn",iconType:"",normalColor:"#CF1322",darkColor:"#fb2400",dangerNumber:1},{level:"普通",levelName:"普通",className:"normal",iconType:"",normalColor:"#007EE2",darkColor:"#0094ff",dangerNumber:-1},{level:"安全",levelName:"安全",className:"safe",iconType:"",normalColor:"#009A75",darkColor:"#00da90",dangerNumber:-2}]},showLevelCount:{type:Boolean,default:!1},darkMode:{type:Boolean,default:!1},title:{type:String,default:""},isShowNodeMessage:{type:Boolean,default:!0},nodeTypeScale:{type:Number},singlesNodeMaxNum:{type:Number,default:100},startNodeAnimation:{type:Boolean,default:!0}},emits:["sharePermission","custom-contextmenu-click","handle-select-node","handle-data-loaded","outdate"],data(){return{history:new MQ({isShowNodeMessage:this.isShowNodeMessage}),isLoading:!1,bigLoading:!1,loadingInfo:"数据加载中",moduleDetail:{},contextMenuNode:{},contextMenuId:0,isDragging:!1,isCtrlDown:!1,selection:[],snapshot:{},inited:!1,outdateTime:0,fullScreen:!1,generateUniqueIndexNow:this.generateUniqueIndex(),screenHeight:0,margin:"0",requestGraphData:!0,nodeTypeList:[]}},computed:{topFrame(){return window.top.location===window.location},levelMap(){const e={};return this.levelList.forEach(t=>{e[t.level]=t}),e}},watch:{startNode:{handler:function(e,t){this.moduleDetail.module&&this.searchStartNode()},immediate:!0,deep:!0},screenHeight:{deep:!0,handler:function(){this.margin=this.changeMargin()}}},created(){return Te(this,null,function*(){if(this.snapshot_id)this.isLoading=!0,this.graphApi.getSnapshotDetail({snapshot_id:this.snapshot_id,vcode:this.vcode}).then(e=>{this.moduleDetail=e.data.config,this.history.initFromSnapshot(JSON.parse(e.data.data)),setTimeout(()=>{this.$refs.render.updateNodeStyle(),this.centerAndZoom(.8,!1)},1e3)}).catch(e=>{console.log(e,"e")}).finally(e=>{this.isLoading=!1});else if(this.module)this.initGraph();else{Lt.error("请传入模块名称");return}this.graphApi.userInfo&&this.graphApi.userInfo().then(e=>{e.data!==null&&(ye(qe,"sharePermission",e.data.access.graph_share),this.requestGraphData=e.data.access.request_graph_data)}).catch(e=>{this.onOutdate(e.res)})})},unmounted(){window.onresize=null},mounted(){return Te(this,null,function*(){window.onresize=()=>{this.fullScreen=!!document.fullscreenElement,this.screenHeight=document.body.clientHeight},this.margin=this.changeMargin(),uo(qe,"emitDataLoaded",()=>{this.emitDataLoaded()})})},methods:{handleCustomContextMenuClick(e){this.customContextMenuEvent&&typeof this.customContextMenuEvent=="function"?this.customContextMenuEvent(s.toRaw(e)):ye(this,"custom-contextmenu-click",s.toRaw(e))},handleSelectNode(e){this.handleSelectNodeEvent&&typeof this.handleSelectNodeEvent=="function"?this.handleSelectNodeEvent(s.toRaw(e),s.toRaw(this.history.dataNow)):ye(this,"handle-select-node",s.toRaw(e))},searchStartNode(){this.startNode.length>0&&!this.inited&&this.startNode.map(e=>{const t={type:e.type,id:e.id,startNode:!0};this.inited=!0,this.moduleDetail.nodes.findIndex(n=>e.type===n.name)>=0?this.addNewNodesAndExpand(t):(Lt({message:"无相关数据",type:"warning"}),this.emitDataLoaded())})},initGraph(){return Te(this,null,function*(){var e;(e=this.graphApi)==null||e.getGraphConfig({name:this.module}).then(t=>{this.moduleDetail=t.data,this.searchStartNode(),!this.inited&&this.enterStartNode&&this.$refs.buttonList.addNode("search")}).catch(t=>{this.onOutdate(t.res),this.emitDataLoaded(),console.log("e",t)})})},addNewNodesAndExpand(e){this.isLoading=!0,this.graphApi.getNodesDetail({api:this.moduleDetail.node_info[e.type],node_id:[e.id],nodeType:e.type,moduleDetail:this.moduleDetail}).then(t=>{var o,a,c;let n={id:(o=t.data.records[0])==null?void 0:o.info.id,type:(a=t.data.records[0])==null?void 0:a.info.type,startNode:!0,detail:t.data.records[0],group:e.id,name:((c=t.data.records[0])==null?void 0:c.info.name)||e.id};n=_i(n,this.moduleDetail.plugs);const r={addOne:{nodes:[n],links:[]}};this.isRenderStartNode&&(this.history.pushState(r),this.history.updateData(t.data.records,[e.id]),setTimeout(()=>{this.isDefaultSelectStartNode&&(this.handleTableSelect([e.id]),setTimeout(()=>{this.selection.length&&this.handleSelectNode({isSelected:!0,_node:this.selection[0]})},0))},500)),this.expandNodes(n)}).catch(t=>{console.log(t,"e"),this.emitDataLoaded(),this.onOutdate(t.res),Lt({message:"无该节点信息",type:"warning"})}).finally(()=>{this.isLoading=!1})},onAction(e){this.history.pushState(e)},onOutdate(e){(e==null?void 0:e.code)==="AC100001"&&this.outdateTime<1&&(this.outdateTime++,ye(this,"outdate"))},expandNodes(e,t){return Te(this,null,function*(){if(!(e!=null&&e.type))return;const n=this.moduleDetail.plugs[e==null?void 0:e.type];let r=[];t?(r=Array.isArray(t)?[...t]:[t],e.apis===void 0&&(e.apis=[]),e.apis.push(...r)):(e.expand=1,e.apis=[],e.apis.push({namec:"拓线全部",value:0,name:"",flagSelect:!0}),n==null||n.map(u=>{u.children?r.push(...u.children):r.push(u)}));const o=r.map(u=>this.graphApi.getGraphRequest({api:u.name,node_id:e.id,origin:e.origin,nodeType:e.type,moduleDetail:this.moduleDetail}).then(f=>Promise.resolve(ue(ae({},f),{api:u.name,apiC:u.relay_name,icon:u.icon,note_name:u.note_name,canLoop:u.canloop}))).catch(f=>Promise.resolve(f)));this.isLoading=!0;let a;yield Promise.all(o).then(u=>{if(u.some(p=>{var h;return((h=p.res)==null?void 0:h.code)==="AC100001"})){this.onOutdate({code:"AC100001"});return}a=u.filter(p=>p.code==="0"||p.code===0)}).catch(u=>{console.log(u,"e")}).finally(u=>{this.isLoading=!1});const c=[];let l=[];if(a&&a.forEach(u=>{if(e.getData[u.api]=!0,this.history.dataNow.nodes.find(w=>w.id===e.id)&&(this.history.dataNow.nodes.find(w=>w.id===e.id).getData[u.api]=!0),!u.data)return;let f;const p=u.data.nodes.map(w=>(w.group=e.id+"-"+u.api,w.groupC=u.apiC,w=_i(w,this.moduleDetail.plugs),w)),h=e.id+"-"+u.api;let m={id:h,name:u.apiC,note_name:u.note_name,type:"nodeType",icon:u.icon};const b={source:e.id,target:h};if(m=_i(m,this.moduleDetail.plugs),this.nodeTypeList.push(u.icon||"node_type"),p.length>0&&this.isRenderStartNode){if(f=u.data.links.map(w=>{let _;if(w.source===e.id){const C=this.history.dataNow.nodes.filter(k=>k.id===w.target);if(C.length>0&&(_=this.findGrandSonNodeIds(C[0]).indexOf(w.source)>=0),!u.api.canLoop&&_)return;w.source=h}else w.target===e.id&&(w.target=h);return w}).filter(w=>w),f.length===0)return;f.push(b)}else f=u.data.links;if(this.isRenderStartNode&&p.length>=this.singlesNodeMaxNum){let w=null,_=null;const C=String(Math.floor(new Date().getTime()));w={id:C,list:p,type:"aggregation",name:"聚合",relationId:m.id},w=_i(w,this.moduleDetail.plugs),_={source:m.id,target:C,uniqueIndex:this.generateUniqueIndexNow()};const k={addOne:{nodes:[m,w],links:[b,_]},type:"aggregation"};this.history.pushState(k),this.getNodeDetail(w.list,w.id)}else f.length&&this.isRenderStartNode&&p.push(m),c.push(...p||[]),l.push(...f||[])}),!this.isRenderStartNode){const u={},f={},p=[];this.nodeTypeList.push("node_type"),l.forEach(h=>{const m=h.source+"-"+h.name;if(!u[m]){let b={id:m,name:h.name,type:"nodeType",icon:h.feature.icon};b=_i(b,this.moduleDetail.plugs),u[m]=b}f[m]?f[m].push(h):f[m]=[h]});for(const h in u)c.push(u[h]);for(const h in f)f[h].forEach(b=>{const w=ue(ae({},b),{source:b.source,target:h}),_=ue(ae({},b),{source:h,target:b.target});p.push(w),p.push(_)});l=p}l.map(u=>{u.uniqueIndex=this.generateUniqueIndexNow()});const d={addOne:{nodes:c,links:l}};(c.length>0||l.length>0)&&this.history.pushState(d),this.history.length===2&&setTimeout(()=>{this.centerAndZoom(.8,!1)},1e3),this.getNodeDetail(c)})},findGrandSonNodeIds(e){return this.history.dataNow.nodes.filter(r=>{var o;return((o=e.children)==null?void 0:o.indexOf(r.id))>=0}).reduce((r,o)=>(r.push(...o.children||[]),r),[])||[]},centerAndZoom(e,t){var n;(n=this.$refs.render)==null||n.centerAndZoom(e,t)},generateUniqueIndex(){let e=0;return function(){return e++}},reset(){this.$refs.render.reset()},getNodeDetail(e,t){const r=this.history.dataNow.nodes.filter(c=>e.findIndex(l=>l.id===c.id)>=0).filter(c=>!c.detail&&c.noDetail!==!0&&c.type!=="aggregation"&&c.type!=="nodeType"),o={};r.map(c=>{o[c.type]?o[c.type].push(c):o[c.type]=[c]});let a=Object.keys(o).length;for(const c in o){const l=o[c],d={};l.map(u=>{u.origin&&(d[u.id]=u.origin)}),this.graphApi.getNodesDetail({api:this.moduleDetail.node_info[o[c][0].type],node_id:o[c].map(u=>u.id),origin:d,nodeType:o[c][0].type,moduleDetail:this.moduleDetail}).then(u=>{const f=u.data.records;t?this.history.updateAggregationDetail(f,o[c].map(p=>p.id),t):this.history.updateData(f,o[c].map(p=>p.id))}).catch(u=>{this.onOutdate(u.res)}).finally(()=>{a=a-1,a===0&&(Gn(" 数据加载完"),this.emitDataLoaded())})}Object.keys(o).length||this.emitDataLoaded()},emitDataLoaded(){this.handleDataLoaded&&typeof this.handleDataLoaded=="function"?this.handleDataLoaded({dataNow:s.toRaw(this.history.dataNow)}):ye(this,"handle-data-loaded",{dataNow:s.toRaw(this.history.dataNow)})},addNode({node:e,type:t,connectNode:n}){if(this.history.dataNow.nodes.findIndex(a=>a.id===e.id)>-1){Lt({type:"warning",message:"该节点已存在,添加失败"});return}let o;if(t==="diy"&&e.type==="nodeType"){let a=ue(ae({},e),{detail:null,diy:!0,group:e.id});a=_i(a,this.moduleDetail.plugs);const c=n?{source:n.id,target:e.id,uniqueIndex:this.generateUniqueIndexNow()}:null;o={addOne:{nodes:[a],links:c?[c]:[]}},this.history.pushState(o)}else t==="diy"?this.graphApi.getNodesDetail({api:this.moduleDetail.node_info[e.type],node_id:[e.id],nodeType:e.type,moduleDetail:this.moduleDetail}).then(a=>{var d,u,f;let c={id:(d=a.data.records[0])==null?void 0:d.info.id,type:(u=a.data.records[0])==null?void 0:u.info.type,detail:a.data.records[0],group:e.id,name:((f=a.data.records[0])==null?void 0:f.info.name)||e.id};c=_i(c,this.moduleDetail.plugs);const l=n?{source:n.id,target:e.id,uniqueIndex:this.generateUniqueIndexNow()}:null;o={addOne:{nodes:[c],links:l?[l]:[]}},this.history.pushState(o)}).catch(a=>{this.onOutdate(a.res);let c=ue(ae({},e),{detail:null,diy:!0,group:e.id});c=_i(c,this.moduleDetail.plugs);const l=n?{source:n.id,target:e.id,uniqueIndex:this.generateUniqueIndexNow()}:null;o={addOne:{nodes:[c],links:l?[l]:[]}},this.history.pushState(o)}).finally(a=>{setTimeout(()=>{},500)}):this.addNewNodesAndExpand(e)},addLink(e,t){if(!([e,t].filter(a=>a.type==="nodeType").length===1))return;const r={source:e.id,target:t.id,uniqueIndex:this.generateUniqueIndexNow(),diy:!0};let o=!1;if(this.history.dataNow.links.map(a=>{a.source.id===e.id&&a.target.id===t.id&&(o=!0)}),!o){const a={addOne:{links:[r]}};this.onAction(a)}},expandSelectedNodes(e){e.map(t=>{this.expandNodes(t)})},handleTableSelect(e=[]){this.$refs.render.handleTableSelect(e)},updateSelection(){this.selection=this.$refs.render.selection,this.$refs.render.selectEdgesByNode(this.selection),this.$refs.render.showKeyWay(this.selection),this.$refs.render.updateNodeStyle()},aggregationNodes(e,t){if(e.length===0)return;const n=[];for(const c in this.history.dataNow.nodes)e.findIndex((d,u,f)=>d===this.history.dataNow.nodes[c].id)>=0&&n.push(JSON.parse(JSON.stringify(this.history.dataNow.nodes[c])));const r=String(Math.floor(new Date().getTime()));let o={id:r,list:n,type:"aggregation",name:"聚合",relationId:t.id};o=_i(o,this.moduleDetail.plugs);const a={addOne:{nodes:[o],links:[{source:t.id,target:r,uniqueIndex:this.generateUniqueIndexNow()}]},deleteOne:{nodes:n,links:n.map(c=>({source:t.id,target:c.id}))},type:"aggregation"};this.history.pushState(a),this.emitDataLoaded()},releaseAggregation(e){let t;if(e.type==="aggregation"&&(t=e),this.history.dataNow.links.map(n=>{n.source.id===e.id&&n.target.type==="aggregation"&&(t=t||n.target,n.source)}),t){const n={deleteOne:{nodes:[t],links:[{source:t.relationId,target:t.id}]},addOne:{nodes:t.list,links:t.list.map(r=>({source:t.relationId,target:r.id}))},type:"aggregation"};for(const r in this.history.dataNow.nodes)t.list.findIndex((a,c,l)=>a===this.history.dataNow.nodes[r].id)>=0&&(this.history.dataNow.nodes[r].aggregation=!1);this.history.pushState(n),this.emitDataLoaded()}},saveSnapshot(){return Te(this,null,function*(){g5.prompt(null,"添加快照",{confirmButtonText:"确定",cancelButtonText:"取消",inputPattern:/^.{1,20}$/,inputPlaceholder:"请输入20字以内快照名称",inputErrorMessage:"请输入20字以内快照名称"}).then(t=>Te(this,[t],function*({value:e}){this.bigLoading=!0,setTimeout(()=>Te(this,null,function*(){try{const n=yield this.$refs.buttonList.svgToBlob(),r=new FormData;r.append("data",this.history.toString()),r.append("name",e),r.append("thumb",n),this.graphApi.addSnapshot1(r).then(o=>{this.snapshot=o.data,this.snapshot.name=e,this.$refs.snapshot.show()}).catch(o=>{this.onOutdate(o.res)}).finally(o=>{this.bigLoading=!1})}catch(n){this.bigLoading=!1,console.log(n)}}),100)})).catch(()=>{Lt({type:"info",message:"取消输入"})})})},autoDisplay(){this.$refs.render.autoDisplay()},deleteNodes(e=this.selection){const t={deleteOne:{nodes:e}};this.history.pushState(t),this.emitDataLoaded();const n=e.map(r=>r.id);this.$refs.render.selection=this.selection.filter(r=>!n.includes(r.id)),setTimeout(()=>{this.updateSelection()},300)},historyForward(){this.history.forward(),setTimeout(()=>{this.updateSelection()},100)},historyBack(){this.history.back(),setTimeout(()=>{this.updateSelection()},100)},toggleFullScreen(){en({cId:"toggleFullScreen",c:"切换全屏"}),document.fullscreenElement?document.exitFullscreen&&document.exitFullscreen():this.$refs["force-d3-container"].requestFullscreen()},zoomView(e="in"){e==="in"?(en({cId:"zoomIn",c:"zoomIn"}),this.$refs.render.zoomIn()):(en({cId:"zoomOut",c:"zoomOut"}),this.$refs.render.zoomOut())},fitScreen(){var e;en({cId:"centerAndZoom",c:"centerAndZoom"}),(e=this.$refs.render)==null||e.centerAndZoom()},changeMargin(){let e=0;const t=document.body.clientHeight;return e=Math.floor(((t-50)/20-22)/2),e>8?"8px 0":e+"px 0"},handleHighLight(e,t,n){this.$refs.render.setHighlightRule({type:e,prop:t,value:n})},handleCustomSelect(e,t,n){this.$refs.render.handleCustomSelect({type:e,prop:t,value:n})},fixAllNodes(e){this.$refs.render.fixAllNodes(e)},toggleLayout(e){this.$refs.render.toggleLayout(e)},importCsvData(e){for(const t in e.nodes)delete e.nodes[t].vx,delete e.nodes[t].vy,delete e.nodes[t].x,delete e.nodes[t].y;this.history.dataNow=Object.assign({},e)},getCanvasStage(){var e;return(e=this.$refs.render)==null?void 0:e.stage},addCanvasBg(){var e;(e=this.$refs.render)==null||e.addCanvasBg()},removeCanvasBg(){var e;(e=this.$refs.render)==null||e.removeCanvasBg()}}},xEe={ref:"force-d3-container",class:"d3-container"},kEe=["innerHTML"],NEe=s.createElementVNode("div",{class:"top-line-bg"},null,-1),TEe={class:"top-item"},AEe={class:"top-line"},OEe={key:1,class:"select-num"},IEe={class:"highlight"},REe={class:"loading-container"},PEe={class:"corner-button-box"};function LEe(e,t,n,r,o,a){const c=s.resolveComponent("ButtonList"),l=s.resolveComponent("RenderByCanvas"),d=s.resolveComponent("Loading"),u=Qe,f=s.resolveComponent("Legend"),p=s.resolveComponent("force-graph-svg-icon"),h=Hn,m=s.resolveComponent("RightMenu"),b=s.resolveComponent("SnapShotDialog"),w=f5;return s.withDirectives((s.openBlock(),s.createElementBlock("div",xEe,[s.createElementVNode("div",{class:s.normalizeClass(["graph-box",{"hide-right-menu":!n.isShowRightMenu}])},[n.title?(s.openBlock(),s.createElementBlock("div",{key:0,class:"safe-force-title",innerHTML:n.title},null,8,kEe)):s.createCommentVNode("",!0),NEe,s.createElementVNode("div",TEe,[s.createElementVNode("div",AEe,[s.createVNode(c,{ref:"buttonList","hide-button-list":n.hideButtonList,selection:o.selection,history:o.history,"module-detail":o.moduleDetail,"request-graph-data":o.requestGraphData,onSaveSnapshot:a.saveSnapshot,onAddNodes:a.addNode,onAutoDisplay:a.autoDisplay,onDeleteNodes:a.deleteNodes,onFixNodes:a.fixAllNodes,onToggleLayout:a.toggleLayout,onImportCsvData:a.importCsvData},null,8,["hide-button-list","selection","history","module-detail","request-graph-data","onSaveSnapshot","onAddNodes","onAutoDisplay","onDeleteNodes","onFixNodes","onToggleLayout","onImportCsvData"])])]),s.createVNode(l,{ref:"render","module-detail":o.moduleDetail,history:o.history,"level-list":n.levelList,selection:o.selection,data:o.history.dataNow,"request-graph-data":o.requestGraphData,"dark-mode":n.darkMode,"node-type-scale":n.nodeTypeScale,"node-type-list":o.nodeTypeList,startNodeAnimation:n.startNodeAnimation,onUpdateSelection:a.updateSelection,onOnaction:a.onAction,onHandleSelectNode:a.handleSelectNode,onCustomContextmenuClick:a.handleCustomContextMenuClick},null,8,["module-detail","history","level-list","selection","data","request-graph-data","dark-mode","node-type-scale","node-type-list","startNodeAnimation","onUpdateSelection","onOnaction","onHandleSelectNode","onCustomContextmenuClick"]),o.selection.length>0?(s.openBlock(),s.createElementBlock("p",OEe,[s.createTextVNode(" 已选择"),s.createElementVNode("span",IEe,s.toDisplayString(o.selection.length),1),s.createTextVNode("项 ")])):s.createCommentVNode("",!0),s.withDirectives(s.createElementVNode("div",REe,[s.createElementVNode("span",null,s.toDisplayString(o.loadingInfo),1),s.createVNode(u,{class:"is-loading"},{default:s.withCtx(()=>[s.createVNode(d)]),_:1})],512),[[s.vShow,o.isLoading]]),s.createVNode(f,{"show-point":n.showPoint,history:o.history,"module-detail":o.moduleDetail,"has-level":n.hasLevel,"show-level-count":n.showLevelCount,margin:o.margin,onHighLight:a.handleHighLight},null,8,["show-point","history","module-detail","has-level","show-level-count","margin","onHighLight"]),s.createElementVNode("div",PEe,[!o.fullScreen&&a.topFrame?(s.openBlock(),s.createBlock(h,{key:0,content:"进入全屏",placement:"left","popper-class":"el-tooltip-gray"},{default:s.withCtx(()=>[s.createVNode(p,{"icon-class":e.imgPath["./public/d3svg1/button18/full_button.svg"],alt:"",class:"corner-button",onClick:a.toggleFullScreen},null,8,["icon-class","onClick"])]),_:1})):s.createCommentVNode("",!0),o.fullScreen&&a.topFrame?(s.openBlock(),s.createBlock(h,{key:1,content:"退出全屏",placement:"left","popper-class":"el-tooltip-gray"},{default:s.withCtx(()=>[s.createVNode(p,{"icon-class":e.imgPath["./public/d3svg1/button18/un_full_button.svg"],alt:"",class:"corner-button",onClick:a.toggleFullScreen},null,8,["icon-class","onClick"])]),_:1})):s.createCommentVNode("",!0),s.createVNode(h,{content:"适应屏幕",placement:"left","popper-class":"el-tooltip-gray"},{default:s.withCtx(()=>[s.createVNode(p,{"icon-class":e.imgPath["./public/d3svg1/button18/fit_button.svg"],alt:"",class:"corner-button",onClick:a.fitScreen},null,8,["icon-class","onClick"])]),_:1}),s.createVNode(h,{content:"放大",placement:"left","popper-class":"el-tooltip-gray"},{default:s.withCtx(()=>[s.createVNode(p,{"icon-class":e.imgPath["./public/d3svg1/button18/zoom_in_button.svg"],alt:"",class:"corner-button",onClick:t[0]||(t[0]=_=>a.zoomView("in"))},null,8,["icon-class"])]),_:1}),s.createVNode(h,{content:"缩小",placement:"left","popper-class":"el-tooltip-gray"},{default:s.withCtx(()=>[s.createVNode(p,{"icon-class":e.imgPath["./public/d3svg1/button18/zoom_out_button.svg"],alt:"",class:"corner-button",onClick:t[1]||(t[1]=_=>a.zoomView("out"))},null,8,["icon-class"])]),_:1})])],2),n.isShowRightMenu?(s.openBlock(),s.createBlock(m,{key:0,"graph-data":o.history.dataNow,"selected-nodes":o.selection,"request-graph-data":o.requestGraphData,onChangeBox:a.handleTableSelect},null,8,["graph-data","selected-nodes","request-graph-data","onChangeBox"])):s.createCommentVNode("",!0),s.createVNode(b,{ref:"snapshot",snapshot:o.snapshot,"graph-api":n.graphApi,"graph-url-path":n.graphUrlPath},null,8,["snapshot","graph-api","graph-url-path"])])),[[w,o.bigLoading]])}const Qd=Bt(EEe,[["render",LEe]]);Qd.install=function(e){e.component(Qd.name,Qd)},$l.install=function(e){e.component($l.name,$l)};const tTe="",BEe=[Qd,$l],DEe={install:function(e,t={}){BEe.forEach(n=>{e.component(n.name,n)})}};Be.Graph=Qd,Be.Render=$l,Be.default=DEe,Object.defineProperties(Be,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});