agentworkshop 0.7.40 → 0.7.41

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.
Files changed (116) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/{CzOCSGLe.js → BN16aRdQ.js} +1 -1
  3. package/.output/public/_nuxt/BWVhZntO.js +1 -0
  4. package/.output/public/_nuxt/{Dihnimlk.js → C0ZrS1KL.js} +1 -1
  5. package/.output/public/_nuxt/{Dr9v6C0f.js → C4s_niy-.js} +2 -2
  6. package/.output/public/_nuxt/D6mbFA-a.js +1 -0
  7. package/.output/public/_nuxt/{DcsCcxp4.js → D98NH8kG.js} +1 -1
  8. package/.output/public/_nuxt/{C_iYD-EB.js → DGbd-UiG.js} +1 -1
  9. package/.output/public/_nuxt/{DCn7QZ5N.js → Dap5PmTL.js} +1 -1
  10. package/.output/public/_nuxt/DvLxILQP.js +1 -0
  11. package/.output/public/_nuxt/{DZshyNLa.js → IREZ1eC2.js} +1 -1
  12. package/.output/public/_nuxt/_id_.D9ymtHB5.css +1 -0
  13. package/.output/public/_nuxt/_id_.jf-_8E_c.css +1 -0
  14. package/.output/public/_nuxt/builds/latest.json +1 -1
  15. package/.output/public/_nuxt/builds/meta/78a295bb-2072-48a4-8b46-6d545fdae743.json +1 -0
  16. package/.output/public/_nuxt/ca4TJ3Op.js +1 -0
  17. package/.output/public/_nuxt/daq.DjSgY94l.css +1 -0
  18. package/.output/public/_nuxt/{BP-NyKVG.js → eqq3wWQF.js} +1 -1
  19. package/.output/server/chunks/_/nitro.mjs +886 -673
  20. package/.output/server/chunks/_/nitro.mjs.map +1 -1
  21. package/.output/server/chunks/build/{TownView-BuLAsmpR.mjs → TownView--otsnr_7.mjs} +4 -4
  22. package/.output/server/chunks/build/{TownView-BuLAsmpR.mjs.map → TownView--otsnr_7.mjs.map} +1 -1
  23. package/.output/server/chunks/build/{_id_-BU1wfOID.mjs → _id_-Brv-JSvr.mjs} +141 -140
  24. package/.output/server/chunks/build/_id_-Brv-JSvr.mjs.map +1 -0
  25. package/.output/server/chunks/build/{_id_-BYsEua57.mjs → _id_-D9pl1OZy.mjs} +37 -36
  26. package/.output/server/chunks/build/_id_-D9pl1OZy.mjs.map +1 -0
  27. package/.output/server/chunks/build/{_wsId_-BxlDcJHg.mjs → _wsId_-BASfDf0s.mjs} +4 -4
  28. package/.output/server/chunks/build/{_wsId_-BxlDcJHg.mjs.map → _wsId_-BASfDf0s.mjs.map} +1 -1
  29. package/.output/server/chunks/build/{daq-cgyjKmJu.mjs → daq-DkMvD8sg.mjs} +93 -92
  30. package/.output/server/chunks/build/daq-DkMvD8sg.mjs.map +1 -0
  31. package/.output/server/chunks/build/{dcw-CoTxBlAZ.mjs → dcw-C1jgVJkO.mjs} +3 -3
  32. package/.output/server/chunks/build/{dcw-CoTxBlAZ.mjs.map → dcw-C1jgVJkO.mjs.map} +1 -1
  33. package/.output/server/chunks/build/{logs-BSOeZwwI.mjs → logs--dByNyhw.mjs} +2 -2
  34. package/.output/server/chunks/build/{logs-BSOeZwwI.mjs.map → logs--dByNyhw.mjs.map} +1 -1
  35. package/.output/server/chunks/build/{pages-DFxjn9Xa.mjs → pages-B0bUWnC6.mjs} +3 -3
  36. package/.output/server/chunks/build/{pages-DFxjn9Xa.mjs.map → pages-B0bUWnC6.mjs.map} +1 -1
  37. package/.output/server/chunks/build/{town-qMPql9Se.mjs → town-CoQdblbZ.mjs} +4 -4
  38. package/.output/server/chunks/build/{town-qMPql9Se.mjs.map → town-CoQdblbZ.mjs.map} +1 -1
  39. package/.output/server/chunks/build/{useDaqStream-CIBaiGAl.mjs → useDaqStream-DfCFpb3p.mjs} +9 -3
  40. package/.output/server/chunks/build/useDaqStream-DfCFpb3p.mjs.map +1 -0
  41. package/.output/server/chunks/build/{useDcwStream-CBbiYnWe.mjs → useDcwStream-UPiX-3iO.mjs} +11 -2
  42. package/.output/server/chunks/build/useDcwStream-UPiX-3iO.mjs.map +1 -0
  43. package/.output/server/chunks/routes/api/workshop/channel-templates/_id/instantiate.post.mjs +1 -1
  44. package/.output/server/chunks/routes/api/workshop/channels.post.mjs +3 -3
  45. package/.output/server/chunks/routes/api/workshop/dcw/index5.post.mjs +1 -1
  46. package/.output/server/chunks/routes/api/workshop/dcw/lines/_id/start.post.mjs +1 -1
  47. package/.output/server/chunks/routes/api/workshop/dcw/lines/_id/stop.post.mjs +1 -1
  48. package/.output/server/chunks/routes/api/workshop/dcw/params/_id_.delete.mjs +1 -1
  49. package/.output/server/chunks/routes/api/workshop/dcw/params/_id_.patch.mjs +1 -1
  50. package/.output/server/chunks/routes/api/workshop/dcw/templates/_key_.delete.mjs +1 -1
  51. package/.output/server/chunks/routes/api/workshop/dcw/templates/_key_.patch.mjs +1 -1
  52. package/.output/server/chunks/routes/api/workshop/harnesses/_id/providers.get.mjs +1 -1
  53. package/.output/server/chunks/routes/api/workshop/harnesses.get.mjs +1 -1
  54. package/.output/server/chunks/routes/api/workshop/hitl/pending.get.mjs +1 -1
  55. package/.output/server/chunks/routes/api/workshop/hitl/respond.post.mjs +1 -1
  56. package/.output/server/chunks/routes/api/workshop/index.put.mjs +1 -1
  57. package/.output/server/chunks/routes/api/workshop/index5.get.mjs +3 -1
  58. package/.output/server/chunks/routes/api/workshop/index5.get.mjs.map +1 -1
  59. package/.output/server/chunks/routes/api/workshop/index6.get.mjs +3 -1
  60. package/.output/server/chunks/routes/api/workshop/index6.get.mjs.map +1 -1
  61. package/.output/server/chunks/routes/api/workshop/plugins/_name/disable.post.mjs +1 -1
  62. package/.output/server/chunks/routes/api/workshop/plugins/_name/enable.post.mjs +1 -1
  63. package/.output/server/chunks/routes/api/workshop/scene/layouts/_channelId_.delete.mjs +1 -1
  64. package/.output/server/chunks/routes/api/workshop/scene/layouts/_channelId_.put.mjs +1 -1
  65. package/.output/server/chunks/routes/api/workshop/workspaces/_id/channel-templates/_tplId_.post.mjs +1 -1
  66. package/.output/server/chunks/routes/renderer.mjs +2 -2
  67. package/.output/server/chunks/virtual/entry.mjs +9 -9
  68. package/.output/server/chunks/virtual/precomputed.mjs +1 -1
  69. package/.output/server/package.json +1 -1
  70. package/README-zh.md +5 -5
  71. package/README.md +6 -6
  72. package/app/composables/workshop/useDaqStream.ts +7 -4
  73. package/app/composables/workshop/useDcwStream.ts +8 -2
  74. package/app/pages/daq/[id].vue +9 -5
  75. package/app/pages/daq/index.vue +13 -10
  76. package/app/pages/dcw/[id].vue +8 -4
  77. package/docs/cli.en.md +2 -2
  78. package/docs/cli.md +2 -2
  79. package/docs/plugins.en.md +33 -1
  80. package/docs/plugins.md +29 -1
  81. package/docs/sdk.en.md +1 -1
  82. package/docs/sdk.md +1 -1
  83. package/package.json +3 -2
  84. package/scripts/_loop-biax-campaign.mjs +124 -0
  85. package/scripts/test-serial-bridge.mjs +418 -0
  86. package/scripts/ui/e2e-interactive.mjs +328 -0
  87. package/scripts/ui/seed-industrial-demo.mjs +171 -0
  88. package/server/api/workshop/daq/index.get.ts +3 -1
  89. package/server/api/workshop/dcw/index.get.ts +3 -0
  90. package/server/plugins/aw-plugins.ts +9 -7
  91. package/server/plugins-builtin/serial-bridge/client.mjs +210 -0
  92. package/server/plugins-builtin/serial-bridge/drivers.mjs +409 -0
  93. package/server/plugins-builtin/serial-bridge/i18n.json +62 -0
  94. package/server/plugins-builtin/serial-bridge/index.mjs +247 -0
  95. package/server/plugins-builtin/serial-bridge/lib.mjs +208 -0
  96. package/server/plugins-builtin/serial-bridge/rtu.mjs +168 -0
  97. package/server/services/workshop/daq/daq-controller.ts +7 -2
  98. package/server/services/workshop/daq/drivers.ts +78 -3
  99. package/server/services/workshop/dcw/dcw-controller.ts +5 -1
  100. package/server/services/workshop/dcw/drivers.ts +85 -2
  101. package/server/services/workshop/dcw/plugin-bridge.ts +45 -0
  102. package/server/services/workshop/plugins/host.mjs +30 -0
  103. package/shared/daq-protocol.ts +15 -0
  104. package/.output/public/_nuxt/BOt2SP4z.js +0 -1
  105. package/.output/public/_nuxt/ClILjvWH.js +0 -1
  106. package/.output/public/_nuxt/D8qvkfyY.js +0 -1
  107. package/.output/public/_nuxt/Du9ZJtnj.js +0 -1
  108. package/.output/public/_nuxt/_id_.CM4bIgKY.css +0 -1
  109. package/.output/public/_nuxt/_id_.bNV69Dtf.css +0 -1
  110. package/.output/public/_nuxt/builds/meta/f4707884-7cf4-4a31-80d2-e3d72b73745f.json +0 -1
  111. package/.output/public/_nuxt/daq.B0D3dPAc.css +0 -1
  112. package/.output/server/chunks/build/_id_-BU1wfOID.mjs.map +0 -1
  113. package/.output/server/chunks/build/_id_-BYsEua57.mjs.map +0 -1
  114. package/.output/server/chunks/build/daq-cgyjKmJu.mjs.map +0 -1
  115. package/.output/server/chunks/build/useDaqStream-CIBaiGAl.mjs.map +0 -1
  116. package/.output/server/chunks/build/useDcwStream-CBbiYnWe.mjs.map +0 -1
@@ -1,5 +1,5 @@
1
1
  {
2
- "date": "2026-09-18T14:34:37.969Z",
2
+ "date": "2026-09-19T04:48:47.133Z",
3
3
  "preset": "node-server",
4
4
  "framework": {
5
5
  "name": "nuxt",
@@ -1 +1 @@
1
- import{Ht as e,S as t,Ut as n,V as r,Vt as i,W as a,b as o,d as s,dt as c,f as l,h as u,i as d,m as f,nt as p,pt as m,tt as h,xt as g,y as _}from"./CSkxz2NX.js";import{c as v,f as y,l as b,o as ee,t as x}from"./D6uzXueg.js";import{t as te}from"./BHA40aHa.js";import{n as ne}from"./KZQX7xoM.js";import{t as S}from"./BDNMzG2s2.js";import{t as C}from"./D0ZBQrN_2.js";import{r as w,t as re}from"./D8qvkfyY.js";var ie={class:`page`},ae={class:`aw-page-head`},oe={class:`sub`},se={class:`badges mono`},ce=[`title`],le={class:`badge`},ue={key:0,class:`banner bad`},de={class:`fleet-filter`},fe={class:`aw-seg`},pe=[`placeholder`],me={class:`line-grid aw-stagger`},he={class:`lc-head`},ge={class:`lc-name`},_e=[`title`,`onClick`],ve=[`title`,`onClick`],ye={key:0,class:`lc-run mono`},be={class:`lc-stats mono`},xe={class:`lc-ctl`},Se=[`onUpdate:modelValue`,`disabled`,`title`],Ce={value:``},we=[`value`,`disabled`],Te=[`disabled`,`onClick`],Ee=[`disabled`,`onClick`],De={key:1,class:`banner`},Oe={key:2,class:`banner`},ke={class:`modal`},Ae={class:`m-title`},je={class:`f`},Me=[`placeholder`],Ne={class:`f`},Pe=[`placeholder`],Fe={class:`f`},Ie={class:`color-row`},Le=[`onClick`],Re={class:`dim`},ze={key:0,class:`m-err`},Be={class:`m-actions`},Ve=[`disabled`],He={class:`modal`},Ue={class:`m-title`},We={class:`f`},Ge=[`placeholder`],Ke={class:`f`},qe=[`placeholder`],Je={class:`f`},Ye={class:`color-row`},Xe=[`onClick`],Ze={class:`dim`},Qe={key:0,class:`m-err`},$e={class:`m-actions`},et=[`disabled`],tt={class:`modal`},nt={class:`m-title danger-title`},rt={class:`del-summary`},it={class:`del-purge`},at={key:0,class:`m-err`},ot={class:`m-actions`},st=[`disabled`],ct={class:`modal wide`},lt={class:`m-title`},ut={class:`dim mono`},dt={class:`dim tpl-hint`},ft={class:`tpl-list`},pt=[`title`],mt={class:`mono dim`},ht={key:0,class:`tpl-sem`},gt=[`onClick`],_t={class:`sec-label`},vt={class:`tpl-form`},yt={class:`f`},bt=[`placeholder`],xt={class:`f`},St=[`placeholder`],Ct={class:`f`},wt={class:`f`},Tt={class:`f`},Et={class:`f`},Dt={class:`f`},Ot={class:`f`},kt=[`value`],At={class:`f`},jt=[`placeholder`],Mt={key:0,class:`m-err`},Nt={class:`m-actions`},Pt=[`disabled`],Ft={key:3,class:`banner bad`},T=S(t({__name:`index`,setup(t){let{t:S}=ne(),T=re();T.load();let E=s(()=>T.lines.map(e=>({line:e,nodes:T.nodes.filter(t=>t.lineId===e.id).length,products:T.products.filter(t=>t.lineId===e.id).length,recipes:T.recipes.filter(t=>t.lineId===e.id).length}))),D=s(()=>T.nodes.filter(e=>!e.lineId).length+T.products.filter(e=>!e.lineId).length),O=m(`all`),k=m(``),A=s(()=>E.value.filter(e=>T.lineStateOf(e.line.id).active).length),j=s(()=>E.value.filter(e=>{let t=T.lineStateOf(e.line.id).active;if(O.value===`running`&&!t||O.value===`idle`&&t)return!1;let n=k.value.trim().toLowerCase();return!(n&&!e.line.name.toLowerCase().includes(n)&&!(e.line.description??``).toLowerCase().includes(n))})),M=m(!1),N=m(!1),P=m(``),F=c({name:``,description:``,color:``}),I=s(()=>w[T.lines.length%w.length]??`#3aa0ff`);function It(){F.name=``,F.description=``,F.color=``,P.value=``,M.value=!0}async function Lt(){N.value=!0,P.value=``;try{await T.createLine({name:F.name.trim(),description:F.description.trim(),color:F.color||void 0}),M.value=!1}catch(e){P.value=C(e)}finally{N.value=!1}}let L=m(``),R=m(``),z=c({});async function Rt(e){L.value=e.line.id,R.value=``;try{let t=z[e.line.id]??``;if(!t)throw Error(S(`dcw.k188cswn039`));await T.startLine(e.line.id,t)}catch(e){R.value=C(e)}finally{L.value=``}}async function zt(e){L.value=e.line.id,R.value=``;try{await T.stopLine(e.line.id)}catch(e){R.value=C(e)}finally{L.value=``}}function B(e){return T.recipes.filter(t=>t.lineId===e)}let V=m(!1),H=m(!1),U=m(``),W=m(!0),G=m(null);function Bt(e){G.value=e,W.value=!0,U.value=``,V.value=!0}async function Vt(){if(G.value){H.value=!0,U.value=``;try{await T.removeLine(G.value.line.id,W.value),V.value=!1}catch(e){U.value=C(e)}finally{H.value=!1}}}let K=m(!1),q=m(!1),J=m(``),Y=c({id:``,name:``,description:``,color:``});function Ht(e){Y.id=e.line.id,Y.name=e.line.name,Y.description=e.line.description,Y.color=e.line.color,J.value=``,K.value=!0}async function Ut(){q.value=!0,J.value=``;try{await T.updateLine(Y.id,{name:Y.name.trim(),description:Y.description.trim(),color:Y.color||void 0}),K.value=!1}catch(e){J.value=C(e)}finally{q.value=!1}}let X=m(!1),Z=m(``),Q=c({name:``,ch:``,code:``,unit:``,min:``,max:``,decimals:1,icon:`gateway`,semantics:``}),Wt=[{key:`thermo`,label:S(`dcw.k422b8040`)},{key:`pressure`,label:S(`dcw.k3x6ff041`)},{key:`tension`,label:S(`dcw.k3z9xc042`)},{key:`encoder`,label:S(`dcw.kjb3vhs043`)},{key:`camera`,label:S(`dcw.k47atw044`)},{key:`gateway`,label:S(`dcw.k48c07045`)}];async function Gt(){Z.value=``;try{if(!Q.name.trim())throw Error(S(`dcw.k6ugbw2046`));if(Q.min===``||Q.max===``)throw Error(S(`dcw.k13awowo047`));await T.createTemplate({name:Q.name.trim(),ch:Q.ch.trim()||Q.name.trim(),code:Q.code.trim()||`CUSTOM`,unit:Q.unit.trim()||`-`,min:Number(Q.min),max:Number(Q.max),decimals:Number(Q.decimals)||0,icon:Q.icon,semantics:Q.semantics.trim()||void 0}),Q.name=``,Q.ch=``,Q.code=``,Q.unit=``,Q.min=``,Q.max=``}catch(e){Z.value=C(e)}}async function Kt(e){Z.value=``;try{await fetch(`/api/workshop/dcw/templates/${e}`,{method:`DELETE`,headers:{authorization:`Bearer ${document.cookie.match(/(?:^|;\s*)token=([^;]+)/)?.[1]??``}`}}).then(async e=>{let t=await e.json().catch(()=>({}));if(t?.code!==0)throw Error(t?.message??S(`dcw.k1bphrb3048`))});let t=T.templates.findIndex(t=>t.key===e);t>=0&&T.templates.splice(t,1)}catch(e){Z.value=C(e)}}let $=s(()=>T.templates.filter(e=>e.builtin).length);return(t,s)=>{let c=te;return r(),u(`div`,ie,[l(`div`,ae,[l(`div`,null,[s[27]||=l(`p`,{class:`aw-kicker`},` AGENTWORKSHOP / LINE OPERATIONS `,-1),l(`h1`,null,n(t.$t(`dcw.k1b2tk5c009`)),1),l(`p`,oe,n(t.$t(`dcw.k5q0aqi010`)),1)]),l(`div`,se,[D.value?(r(),u(`span`,{key:0,class:`badge warn-badge`,title:t.$t(`dcw.k1i5a9vw001`)},n(t.$t(`dcw.k3ootr6049`))+` `+n(D.value),9,ce)):f(``,!0),l(`span`,le,n(t.$t(`dcw.k3wj9n050`))+` `+n(g(T).lines.length),1),l(`button`,{class:`badge tpl-btn`,onClick:s[0]||=e=>X.value=!0},n(t.$t(`dcw.k11nndsp051`))+` `+n(g(T).templates.length),1)])]),R.value?(r(),u(`p`,ue,n(R.value),1)):f(``,!0),l(`div`,de,[l(`div`,fe,[l(`button`,{class:i({on:O.value===`all`}),onClick:s[1]||=e=>O.value=`all`},n(t.$t(`common.all`))+` `+n(E.value.length),3),l(`button`,{class:i({on:O.value===`running`}),onClick:s[2]||=e=>O.value=`running`},n(t.$t(`dcw.k1eox1el055`))+` `+n(A.value),3),l(`button`,{class:i({on:O.value===`idle`}),onClick:s[3]||=e=>O.value=`idle`},n(t.$t(`dcw.k149r6y7059`))+` `+n(E.value.length-A.value),3)]),p(l(`input`,{"onUpdate:modelValue":s[4]||=e=>k.value=e,class:`inp fleet-search`,type:`search`,placeholder:t.$t(`dcw.filterSearchPh`)},null,8,pe),[[b,k.value]])]),l(`div`,me,[(r(!0),u(d,null,a(j.value,f=>(r(),u(`div`,{key:f.line.id,class:i([`line-card aw-liftable`,{idle:!g(T).lineStateOf(f.line.id).active}]),style:e({"--lc":f.line.color})},[l(`div`,he,[s[30]||=l(`span`,{class:`lc-dot`},null,-1),l(`b`,ge,n(f.line.name),1),l(`span`,{class:i([`lc-state`,{on:g(T).lineStateOf(f.line.id).active}])},n(g(T).lineStateOf(f.line.id).active?t.$t(`dcw.k1eox1el055`):t.$t(`dcw.k149r6y7059`)),3),l(`button`,{class:`lc-act`,title:t.$t(`common.edit`),onClick:e=>Ht(f)},[...s[28]||=[l(`span`,{class:`i-tabler-pencil`},null,-1)]],8,_e),l(`button`,{class:`lc-act danger`,title:t.$t(`dcw.k3xakp026`),onClick:e=>Bt(f)},[...s[29]||=[l(`span`,{class:`i-tabler-trash`},null,-1)]],8,ve)]),g(T).lineStateOf(f.line.id).active?(r(),u(`small`,ye,n(g(T).lineStateOf(f.line.id).productName)+` · `+n(g(T).lineStateOf(f.line.id).recipeName)+` · `+n(t.$t(`dcw.k3zz0f052`))+` `+n(g(T).lineStateOf(f.line.id).taggedSamples),1)):(r(),u(`small`,{key:1,class:i([`lc-run dim`,{ph:!f.line.description}])},n(f.line.description||t.$t(`dcw.k18moyq1056`)),3)),l(`div`,be,[l(`span`,null,[_(n(t.$t(`dcw.k45uio011`))+` `,1),l(`b`,null,n(f.nodes),1)]),l(`span`,null,[_(n(t.$t(`dcw.k3waz1012`))+` `,1),l(`b`,null,n(f.products),1)]),l(`span`,null,[_(n(t.$t(`dcw.k48grv013`))+` `,1),l(`b`,null,n(f.recipes),1)])]),l(`div`,xe,[g(T).lineStateOf(f.line.id).active?(r(),u(`button`,{key:1,class:`pill-btn stop`,disabled:L.value===f.line.id,onClick:e=>zt(f)},n(t.$t(`dcw.k148rclf015`)),9,Ee)):(r(),u(d,{key:0},[p(l(`select`,{"onUpdate:modelValue":e=>z[f.line.id]=e,class:`inp`,disabled:B(f.line.id).length===0,title:t.$t(`dcw.k1dhaby4003`)},[l(`option`,Ce,n(B(f.line.id).length?t.$t(`dcw.kutxzsz057`):t.$t(`dcw.k1elczt9060`)),1),(r(!0),u(d,null,a(B(f.line.id),e=>(r(),u(`option`,{key:e.id,value:e.id,disabled:e.params.length===0},n(e.name)+`(`+n(e.params.length)+`) `,9,we))),128))],8,Se),[[v,z[f.line.id]]]),l(`button`,{class:`pill-btn`,disabled:L.value===f.line.id||!z[f.line.id],onClick:e=>Rt(f)},n(t.$t(`dcw.k149b4vg014`)),9,Te)],64))]),o(c,{class:`lc-manage`,to:`/dcw/${f.line.id}`},{default:h(()=>[_(n(t.$t(`dcw.k1fwqw5g016`)),1)]),_:1},8,[`to`])],6))),128)),l(`button`,{class:`line-card new-card`,onClick:It},[s[31]||=l(`span`,{class:`i-tabler-plus`},null,-1),_(` `+n(t.$t(`dcw.k1efe391017`))+` `,1),l(`small`,null,n(t.$t(`dcw.k19dlbli053`)),1)])]),g(T).loaded&&g(T).lines.length===0?(r(),u(`p`,De,n(t.$t(`dcw.k1sk85vs018`)),1)):g(T).loaded&&j.value.length===0?(r(),u(`p`,Oe,n(t.$t(`dcw.filterEmpty`)),1)):f(``,!0),o(x,{name:`modal`},{default:h(()=>[M.value?(r(),u(`div`,{key:0,class:`modal-mask`,onClick:s[8]||=y(e=>M.value=!1,[`self`])},[l(`div`,ke,[l(`h3`,Ae,n(t.$t(`dcw.k1efe391017`)),1),l(`label`,je,[l(`span`,null,[_(n(t.$t(`dcw.k1b2ioko019`)),1),s[32]||=l(`em`,null,`*`,-1)]),p(l(`input`,{"onUpdate:modelValue":s[5]||=e=>F.name=e,class:`inp`,placeholder:t.$t(`dcw.kru37i3004`)},null,8,Me),[[b,F.name]])]),l(`label`,Ne,[l(`span`,null,n(t.$t(`dcw.k24dxcd020`)),1),p(l(`input`,{"onUpdate:modelValue":s[6]||=e=>F.description=e,class:`inp`,placeholder:t.$t(`dcw.k1f2nwsp005`)},null,8,Pe),[[b,F.description]])]),l(`div`,Fe,[l(`span`,null,n(t.$t(`dcw.k1x7nubr021`)),1),l(`div`,Ie,[(r(!0),u(d,null,a(g(w),t=>(r(),u(`button`,{key:t,class:i([`color-dot`,{on:F.color===t}]),style:e({background:t}),onClick:e=>F.color=F.color===t?``:t},null,14,Le))),128)),l(`small`,Re,n(F.color||t.$t(`dcw.k1qidbpy061`,{p0:I.value})),1)])]),P.value?(r(),u(`p`,ze,n(P.value),1)):f(``,!0),l(`div`,Be,[l(`button`,{class:`mini-btn`,onClick:s[7]||=e=>M.value=!1},n(t.$t(`dcw.k3xdnn022`)),1),l(`button`,{class:`pill-btn`,disabled:N.value||!F.name.trim(),onClick:Lt},n(t.$t(`dcw.k3wzi2023`)),9,Ve)])])])):f(``,!0)]),_:1}),o(x,{name:`modal`},{default:h(()=>[K.value?(r(),u(`div`,{key:0,class:`modal-mask`,onClick:s[12]||=y(e=>K.value=!1,[`self`])},[l(`div`,He,[l(`h3`,Ue,n(t.$t(`dcw.k5tq8wc071`)),1),l(`label`,We,[l(`span`,null,[_(n(t.$t(`dcw.k1b2ioko019`)),1),s[33]||=l(`em`,null,`*`,-1)]),p(l(`input`,{"onUpdate:modelValue":s[9]||=e=>Y.name=e,class:`inp`,placeholder:t.$t(`dcw.kru37i3004`)},null,8,Ge),[[b,Y.name]])]),l(`label`,Ke,[l(`span`,null,n(t.$t(`dcw.k24dxcd020`)),1),p(l(`input`,{"onUpdate:modelValue":s[10]||=e=>Y.description=e,class:`inp`,placeholder:t.$t(`dcw.k1f2nwsp005`)},null,8,qe),[[b,Y.description]])]),l(`div`,Je,[l(`span`,null,n(t.$t(`dcw.k1x7nubr021`)),1),l(`div`,Ye,[(r(!0),u(d,null,a(g(w),t=>(r(),u(`button`,{key:t,class:i([`color-dot`,{on:Y.color===t}]),style:e({background:t}),onClick:e=>Y.color=Y.color===t?``:t},null,14,Xe))),128)),l(`small`,Ze,n(Y.color||t.$t(`dcw.k1qidbpy061`,{p0:I.value})),1)])]),J.value?(r(),u(`p`,Qe,n(J.value),1)):f(``,!0),l(`div`,$e,[l(`button`,{class:`mini-btn`,onClick:s[11]||=e=>K.value=!1},n(t.$t(`dcw.k3xdnn022`)),1),l(`button`,{class:`pill-btn`,disabled:q.value||!Y.name.trim(),onClick:Ut},n(t.$t(`common.save`)),9,et)])])])):f(``,!0)]),_:1}),o(x,{name:`modal`},{default:h(()=>[V.value&&G.value?(r(),u(`div`,{key:0,class:`modal-mask`,onClick:s[15]||=y(e=>V.value=!1,[`self`])},[l(`div`,tt,[l(`h3`,nt,[s[34]||=l(`span`,{class:`i-tabler-alert-triangle`},null,-1),_(` `+n(t.$t(`dcw.k7xq2mfd063`,{p0:G.value.line.name})),1)]),l(`p`,rt,n(W.value?t.$t(`dcw.k4r7nbd073`,{p0:G.value.line.name,p1:G.value.nodes,p2:G.value.products,p3:G.value.recipes}):t.$t(`dcw.k1gp649b062`,{p0:G.value.line.name,p1:G.value.nodes,p2:G.value.products,p3:G.value.recipes})),1),l(`label`,it,[p(l(`input`,{"onUpdate:modelValue":s[13]||=e=>W.value=e,type:`checkbox`},null,512),[[ee,W.value]]),l(`span`,null,n(t.$t(`dcw.k9m2vxa072`)),1)]),U.value?(r(),u(`p`,at,n(U.value),1)):f(``,!0),l(`div`,ot,[l(`button`,{class:`mini-btn`,onClick:s[14]||=e=>V.value=!1},n(t.$t(`dcw.k3xdnn022`)),1),l(`button`,{class:`pill-btn danger`,disabled:H.value,onClick:Vt},n(t.$t(`dcw.k3xakp026`)),9,st)])])])):f(``,!0)]),_:1}),o(x,{name:`modal`},{default:h(()=>[X.value?(r(),u(`div`,{key:0,class:`modal-mask`,onClick:s[26]||=y(e=>X.value=!1,[`self`])},[l(`div`,ct,[l(`h3`,lt,[_(n(t.$t(`dcw.k11oadmx024`))+` `,1),l(`small`,ut,n(t.$t(`dcw.k3x23c054`))+` `+n($.value)+` · `+n(t.$t(`dcw.k3t616a058`))+` `+n(g(T).templates.length-$.value),1)]),l(`p`,dt,n(t.$t(`dcw.k2hlav5025`)),1),l(`div`,ft,[(r(!0),u(d,null,a(g(T).templates,e=>(r(),u(`div`,{key:e.key,class:`tpl-row`,title:e.semantics??``},[l(`b`,null,n(e.name),1),l(`small`,mt,n(e.code)+` · `+n(e.min)+`~`+n(e.max)+` `+n(e.unit),1),e.semantics?(r(),u(`small`,ht,n(e.semantics.slice(0,40))+n(e.semantics.length>40?`…`:``),1)):f(``,!0),l(`span`,{class:i([`tpl-tag`,{builtin:e.builtin}])},n(e.builtin?t.$t(`dcw.k3x23c054`):t.$t(`dcw.k3t616a058`)),3),e.builtin?f(``,!0):(r(),u(`button`,{key:1,class:`mini-btn danger`,onClick:t=>Kt(e.key)},n(t.$t(`dcw.k3xakp026`)),9,gt))],8,pt))),128))]),l(`p`,_t,n(t.$t(`dcw.k169eb4s027`)),1),l(`div`,vt,[l(`label`,yt,[l(`span`,null,[_(n(t.$t(`dcw.k3xhia028`)),1),s[35]||=l(`em`,null,`*`,-1)]),p(l(`input`,{"onUpdate:modelValue":s[16]||=e=>Q.name=e,class:`inp`,placeholder:t.$t(`dcw.k1tooi3o006`)},null,8,bt),[[b,Q.name]])]),l(`label`,xt,[l(`span`,null,n(t.$t(`dcw.k1bqk219029`)),1),p(l(`input`,{"onUpdate:modelValue":s[17]||=e=>Q.ch=e,class:`inp`,placeholder:t.$t(`dcw.k698qz0007`)},null,8,St),[[b,Q.ch]])]),l(`label`,Ct,[l(`span`,null,n(t.$t(`dcw.k1ayxrqb030`)),1),p(l(`input`,{"onUpdate:modelValue":s[18]||=e=>Q.code=e,class:`inp`,placeholder:`如 MOTOR · I`},null,512),[[b,Q.code]])]),l(`label`,wt,[l(`span`,null,n(t.$t(`dcw.k3x4ef031`)),1),p(l(`input`,{"onUpdate:modelValue":s[19]||=e=>Q.unit=e,class:`inp`,placeholder:`如 A`},null,512),[[b,Q.unit]])]),l(`label`,Tt,[l(`span`,null,[_(n(t.$t(`dcw.k1l9jv5m032`)),1),s[36]||=l(`em`,null,`*`,-1)]),p(l(`input`,{"onUpdate:modelValue":s[20]||=e=>Q.min=e,type:`number`,class:`inp`},null,512),[[b,Q.min,void 0,{number:!0}]])]),l(`label`,Et,[l(`span`,null,[_(n(t.$t(`dcw.k1l9jv4p033`)),1),s[37]||=l(`em`,null,`*`,-1)]),p(l(`input`,{"onUpdate:modelValue":s[21]||=e=>Q.max=e,type:`number`,class:`inp`},null,512),[[b,Q.max,void 0,{number:!0}]])]),l(`label`,Dt,[l(`span`,null,n(t.$t(`dcw.k3mxmcx034`)),1),p(l(`input`,{"onUpdate:modelValue":s[22]||=e=>Q.decimals=e,type:`number`,class:`inp`},null,512),[[b,Q.decimals,void 0,{number:!0}]])]),l(`label`,Ot,[l(`span`,null,n(t.$t(`dcw.k3xx56035`)),1),p(l(`select`,{"onUpdate:modelValue":s[23]||=e=>Q.icon=e,class:`inp`},[(r(),u(d,null,a(Wt,e=>l(`option`,{key:e.key,value:e.key},n(e.label),9,kt)),64))],512),[[v,Q.icon]])])]),l(`label`,At,[l(`span`,null,n(t.$t(`dcw.k1b6qorg036`)),1),p(l(`textarea`,{"onUpdate:modelValue":s[24]||=e=>Q.semantics=e,class:`inp`,rows:`3`,placeholder:t.$t(`dcw.k1qdnfzc008`)},null,8,jt),[[b,Q.semantics]])]),Z.value?(r(),u(`p`,Mt,n(Z.value),1)):f(``,!0),l(`div`,Nt,[l(`button`,{class:`mini-btn`,onClick:s[25]||=e=>X.value=!1},n(t.$t(`dcw.k3x62t037`)),1),l(`button`,{class:`pill-btn`,disabled:!Q.name.trim()||Q.min===``||Q.max===``,onClick:Gt},n(t.$t(`dcw.k1bg9nga038`)),9,Pt)])])])):f(``,!0)]),_:1}),g(T).error?(r(),u(`p`,Ft,n(g(T).error),1)):f(``,!0)])}}}),[[`__scopeId`,`data-v-7ef81432`]]);export{T as default};
1
+ import{Ht as e,S as t,Ut as n,V as r,Vt as i,W as a,b as o,d as s,dt as c,f as l,h as u,i as d,m as f,nt as p,pt as m,tt as h,xt as g,y as _}from"./CSkxz2NX.js";import{c as v,f as y,l as b,o as ee,t as x}from"./D6uzXueg.js";import{t as te}from"./BHA40aHa.js";import{n as ne}from"./KZQX7xoM.js";import{t as S}from"./BDNMzG2s2.js";import{t as C}from"./D0ZBQrN_2.js";import{r as w,t as re}from"./ca4TJ3Op.js";var ie={class:`page`},ae={class:`aw-page-head`},oe={class:`sub`},se={class:`badges mono`},ce=[`title`],le={class:`badge`},ue={key:0,class:`banner bad`},de={class:`fleet-filter`},fe={class:`aw-seg`},pe=[`placeholder`],me={class:`line-grid aw-stagger`},he={class:`lc-head`},ge={class:`lc-name`},_e=[`title`,`onClick`],ve=[`title`,`onClick`],ye={key:0,class:`lc-run mono`},be={class:`lc-stats mono`},xe={class:`lc-ctl`},Se=[`onUpdate:modelValue`,`disabled`,`title`],Ce={value:``},we=[`value`,`disabled`],Te=[`disabled`,`onClick`],Ee=[`disabled`,`onClick`],De={key:1,class:`banner`},Oe={key:2,class:`banner`},ke={class:`modal`},Ae={class:`m-title`},je={class:`f`},Me=[`placeholder`],Ne={class:`f`},Pe=[`placeholder`],Fe={class:`f`},Ie={class:`color-row`},Le=[`onClick`],Re={class:`dim`},ze={key:0,class:`m-err`},Be={class:`m-actions`},Ve=[`disabled`],He={class:`modal`},Ue={class:`m-title`},We={class:`f`},Ge=[`placeholder`],Ke={class:`f`},qe=[`placeholder`],Je={class:`f`},Ye={class:`color-row`},Xe=[`onClick`],Ze={class:`dim`},Qe={key:0,class:`m-err`},$e={class:`m-actions`},et=[`disabled`],tt={class:`modal`},nt={class:`m-title danger-title`},rt={class:`del-summary`},it={class:`del-purge`},at={key:0,class:`m-err`},ot={class:`m-actions`},st=[`disabled`],ct={class:`modal wide`},lt={class:`m-title`},ut={class:`dim mono`},dt={class:`dim tpl-hint`},ft={class:`tpl-list`},pt=[`title`],mt={class:`mono dim`},ht={key:0,class:`tpl-sem`},gt=[`onClick`],_t={class:`sec-label`},vt={class:`tpl-form`},yt={class:`f`},bt=[`placeholder`],xt={class:`f`},St=[`placeholder`],Ct={class:`f`},wt={class:`f`},Tt={class:`f`},Et={class:`f`},Dt={class:`f`},Ot={class:`f`},kt=[`value`],At={class:`f`},jt=[`placeholder`],Mt={key:0,class:`m-err`},Nt={class:`m-actions`},Pt=[`disabled`],Ft={key:3,class:`banner bad`},T=S(t({__name:`index`,setup(t){let{t:S}=ne(),T=re();T.load();let E=s(()=>T.lines.map(e=>({line:e,nodes:T.nodes.filter(t=>t.lineId===e.id).length,products:T.products.filter(t=>t.lineId===e.id).length,recipes:T.recipes.filter(t=>t.lineId===e.id).length}))),D=s(()=>T.nodes.filter(e=>!e.lineId).length+T.products.filter(e=>!e.lineId).length),O=m(`all`),k=m(``),A=s(()=>E.value.filter(e=>T.lineStateOf(e.line.id).active).length),j=s(()=>E.value.filter(e=>{let t=T.lineStateOf(e.line.id).active;if(O.value===`running`&&!t||O.value===`idle`&&t)return!1;let n=k.value.trim().toLowerCase();return!(n&&!e.line.name.toLowerCase().includes(n)&&!(e.line.description??``).toLowerCase().includes(n))})),M=m(!1),N=m(!1),P=m(``),F=c({name:``,description:``,color:``}),I=s(()=>w[T.lines.length%w.length]??`#3aa0ff`);function It(){F.name=``,F.description=``,F.color=``,P.value=``,M.value=!0}async function Lt(){N.value=!0,P.value=``;try{await T.createLine({name:F.name.trim(),description:F.description.trim(),color:F.color||void 0}),M.value=!1}catch(e){P.value=C(e)}finally{N.value=!1}}let L=m(``),R=m(``),z=c({});async function Rt(e){L.value=e.line.id,R.value=``;try{let t=z[e.line.id]??``;if(!t)throw Error(S(`dcw.k188cswn039`));await T.startLine(e.line.id,t)}catch(e){R.value=C(e)}finally{L.value=``}}async function zt(e){L.value=e.line.id,R.value=``;try{await T.stopLine(e.line.id)}catch(e){R.value=C(e)}finally{L.value=``}}function B(e){return T.recipes.filter(t=>t.lineId===e)}let V=m(!1),H=m(!1),U=m(``),W=m(!0),G=m(null);function Bt(e){G.value=e,W.value=!0,U.value=``,V.value=!0}async function Vt(){if(G.value){H.value=!0,U.value=``;try{await T.removeLine(G.value.line.id,W.value),V.value=!1}catch(e){U.value=C(e)}finally{H.value=!1}}}let K=m(!1),q=m(!1),J=m(``),Y=c({id:``,name:``,description:``,color:``});function Ht(e){Y.id=e.line.id,Y.name=e.line.name,Y.description=e.line.description,Y.color=e.line.color,J.value=``,K.value=!0}async function Ut(){q.value=!0,J.value=``;try{await T.updateLine(Y.id,{name:Y.name.trim(),description:Y.description.trim(),color:Y.color||void 0}),K.value=!1}catch(e){J.value=C(e)}finally{q.value=!1}}let X=m(!1),Z=m(``),Q=c({name:``,ch:``,code:``,unit:``,min:``,max:``,decimals:1,icon:`gateway`,semantics:``}),Wt=[{key:`thermo`,label:S(`dcw.k422b8040`)},{key:`pressure`,label:S(`dcw.k3x6ff041`)},{key:`tension`,label:S(`dcw.k3z9xc042`)},{key:`encoder`,label:S(`dcw.kjb3vhs043`)},{key:`camera`,label:S(`dcw.k47atw044`)},{key:`gateway`,label:S(`dcw.k48c07045`)}];async function Gt(){Z.value=``;try{if(!Q.name.trim())throw Error(S(`dcw.k6ugbw2046`));if(Q.min===``||Q.max===``)throw Error(S(`dcw.k13awowo047`));await T.createTemplate({name:Q.name.trim(),ch:Q.ch.trim()||Q.name.trim(),code:Q.code.trim()||`CUSTOM`,unit:Q.unit.trim()||`-`,min:Number(Q.min),max:Number(Q.max),decimals:Number(Q.decimals)||0,icon:Q.icon,semantics:Q.semantics.trim()||void 0}),Q.name=``,Q.ch=``,Q.code=``,Q.unit=``,Q.min=``,Q.max=``}catch(e){Z.value=C(e)}}async function Kt(e){Z.value=``;try{await fetch(`/api/workshop/dcw/templates/${e}`,{method:`DELETE`,headers:{authorization:`Bearer ${document.cookie.match(/(?:^|;\s*)token=([^;]+)/)?.[1]??``}`}}).then(async e=>{let t=await e.json().catch(()=>({}));if(t?.code!==0)throw Error(t?.message??S(`dcw.k1bphrb3048`))});let t=T.templates.findIndex(t=>t.key===e);t>=0&&T.templates.splice(t,1)}catch(e){Z.value=C(e)}}let $=s(()=>T.templates.filter(e=>e.builtin).length);return(t,s)=>{let c=te;return r(),u(`div`,ie,[l(`div`,ae,[l(`div`,null,[s[27]||=l(`p`,{class:`aw-kicker`},` AGENTWORKSHOP / LINE OPERATIONS `,-1),l(`h1`,null,n(t.$t(`dcw.k1b2tk5c009`)),1),l(`p`,oe,n(t.$t(`dcw.k5q0aqi010`)),1)]),l(`div`,se,[D.value?(r(),u(`span`,{key:0,class:`badge warn-badge`,title:t.$t(`dcw.k1i5a9vw001`)},n(t.$t(`dcw.k3ootr6049`))+` `+n(D.value),9,ce)):f(``,!0),l(`span`,le,n(t.$t(`dcw.k3wj9n050`))+` `+n(g(T).lines.length),1),l(`button`,{class:`badge tpl-btn`,onClick:s[0]||=e=>X.value=!0},n(t.$t(`dcw.k11nndsp051`))+` `+n(g(T).templates.length),1)])]),R.value?(r(),u(`p`,ue,n(R.value),1)):f(``,!0),l(`div`,de,[l(`div`,fe,[l(`button`,{class:i({on:O.value===`all`}),onClick:s[1]||=e=>O.value=`all`},n(t.$t(`common.all`))+` `+n(E.value.length),3),l(`button`,{class:i({on:O.value===`running`}),onClick:s[2]||=e=>O.value=`running`},n(t.$t(`dcw.k1eox1el055`))+` `+n(A.value),3),l(`button`,{class:i({on:O.value===`idle`}),onClick:s[3]||=e=>O.value=`idle`},n(t.$t(`dcw.k149r6y7059`))+` `+n(E.value.length-A.value),3)]),p(l(`input`,{"onUpdate:modelValue":s[4]||=e=>k.value=e,class:`inp fleet-search`,type:`search`,placeholder:t.$t(`dcw.filterSearchPh`)},null,8,pe),[[b,k.value]])]),l(`div`,me,[(r(!0),u(d,null,a(j.value,f=>(r(),u(`div`,{key:f.line.id,class:i([`line-card aw-liftable`,{idle:!g(T).lineStateOf(f.line.id).active}]),style:e({"--lc":f.line.color})},[l(`div`,he,[s[30]||=l(`span`,{class:`lc-dot`},null,-1),l(`b`,ge,n(f.line.name),1),l(`span`,{class:i([`lc-state`,{on:g(T).lineStateOf(f.line.id).active}])},n(g(T).lineStateOf(f.line.id).active?t.$t(`dcw.k1eox1el055`):t.$t(`dcw.k149r6y7059`)),3),l(`button`,{class:`lc-act`,title:t.$t(`common.edit`),onClick:e=>Ht(f)},[...s[28]||=[l(`span`,{class:`i-tabler-pencil`},null,-1)]],8,_e),l(`button`,{class:`lc-act danger`,title:t.$t(`dcw.k3xakp026`),onClick:e=>Bt(f)},[...s[29]||=[l(`span`,{class:`i-tabler-trash`},null,-1)]],8,ve)]),g(T).lineStateOf(f.line.id).active?(r(),u(`small`,ye,n(g(T).lineStateOf(f.line.id).productName)+` · `+n(g(T).lineStateOf(f.line.id).recipeName)+` · `+n(t.$t(`dcw.k3zz0f052`))+` `+n(g(T).lineStateOf(f.line.id).taggedSamples),1)):(r(),u(`small`,{key:1,class:i([`lc-run dim`,{ph:!f.line.description}])},n(f.line.description||t.$t(`dcw.k18moyq1056`)),3)),l(`div`,be,[l(`span`,null,[_(n(t.$t(`dcw.k45uio011`))+` `,1),l(`b`,null,n(f.nodes),1)]),l(`span`,null,[_(n(t.$t(`dcw.k3waz1012`))+` `,1),l(`b`,null,n(f.products),1)]),l(`span`,null,[_(n(t.$t(`dcw.k48grv013`))+` `,1),l(`b`,null,n(f.recipes),1)])]),l(`div`,xe,[g(T).lineStateOf(f.line.id).active?(r(),u(`button`,{key:1,class:`pill-btn stop`,disabled:L.value===f.line.id,onClick:e=>zt(f)},n(t.$t(`dcw.k148rclf015`)),9,Ee)):(r(),u(d,{key:0},[p(l(`select`,{"onUpdate:modelValue":e=>z[f.line.id]=e,class:`inp`,disabled:B(f.line.id).length===0,title:t.$t(`dcw.k1dhaby4003`)},[l(`option`,Ce,n(B(f.line.id).length?t.$t(`dcw.kutxzsz057`):t.$t(`dcw.k1elczt9060`)),1),(r(!0),u(d,null,a(B(f.line.id),e=>(r(),u(`option`,{key:e.id,value:e.id,disabled:e.params.length===0},n(e.name)+`(`+n(e.params.length)+`) `,9,we))),128))],8,Se),[[v,z[f.line.id]]]),l(`button`,{class:`pill-btn`,disabled:L.value===f.line.id||!z[f.line.id],onClick:e=>Rt(f)},n(t.$t(`dcw.k149b4vg014`)),9,Te)],64))]),o(c,{class:`lc-manage`,to:`/dcw/${f.line.id}`},{default:h(()=>[_(n(t.$t(`dcw.k1fwqw5g016`)),1)]),_:1},8,[`to`])],6))),128)),l(`button`,{class:`line-card new-card`,onClick:It},[s[31]||=l(`span`,{class:`i-tabler-plus`},null,-1),_(` `+n(t.$t(`dcw.k1efe391017`))+` `,1),l(`small`,null,n(t.$t(`dcw.k19dlbli053`)),1)])]),g(T).loaded&&g(T).lines.length===0?(r(),u(`p`,De,n(t.$t(`dcw.k1sk85vs018`)),1)):g(T).loaded&&j.value.length===0?(r(),u(`p`,Oe,n(t.$t(`dcw.filterEmpty`)),1)):f(``,!0),o(x,{name:`modal`},{default:h(()=>[M.value?(r(),u(`div`,{key:0,class:`modal-mask`,onClick:s[8]||=y(e=>M.value=!1,[`self`])},[l(`div`,ke,[l(`h3`,Ae,n(t.$t(`dcw.k1efe391017`)),1),l(`label`,je,[l(`span`,null,[_(n(t.$t(`dcw.k1b2ioko019`)),1),s[32]||=l(`em`,null,`*`,-1)]),p(l(`input`,{"onUpdate:modelValue":s[5]||=e=>F.name=e,class:`inp`,placeholder:t.$t(`dcw.kru37i3004`)},null,8,Me),[[b,F.name]])]),l(`label`,Ne,[l(`span`,null,n(t.$t(`dcw.k24dxcd020`)),1),p(l(`input`,{"onUpdate:modelValue":s[6]||=e=>F.description=e,class:`inp`,placeholder:t.$t(`dcw.k1f2nwsp005`)},null,8,Pe),[[b,F.description]])]),l(`div`,Fe,[l(`span`,null,n(t.$t(`dcw.k1x7nubr021`)),1),l(`div`,Ie,[(r(!0),u(d,null,a(g(w),t=>(r(),u(`button`,{key:t,class:i([`color-dot`,{on:F.color===t}]),style:e({background:t}),onClick:e=>F.color=F.color===t?``:t},null,14,Le))),128)),l(`small`,Re,n(F.color||t.$t(`dcw.k1qidbpy061`,{p0:I.value})),1)])]),P.value?(r(),u(`p`,ze,n(P.value),1)):f(``,!0),l(`div`,Be,[l(`button`,{class:`mini-btn`,onClick:s[7]||=e=>M.value=!1},n(t.$t(`dcw.k3xdnn022`)),1),l(`button`,{class:`pill-btn`,disabled:N.value||!F.name.trim(),onClick:Lt},n(t.$t(`dcw.k3wzi2023`)),9,Ve)])])])):f(``,!0)]),_:1}),o(x,{name:`modal`},{default:h(()=>[K.value?(r(),u(`div`,{key:0,class:`modal-mask`,onClick:s[12]||=y(e=>K.value=!1,[`self`])},[l(`div`,He,[l(`h3`,Ue,n(t.$t(`dcw.k5tq8wc071`)),1),l(`label`,We,[l(`span`,null,[_(n(t.$t(`dcw.k1b2ioko019`)),1),s[33]||=l(`em`,null,`*`,-1)]),p(l(`input`,{"onUpdate:modelValue":s[9]||=e=>Y.name=e,class:`inp`,placeholder:t.$t(`dcw.kru37i3004`)},null,8,Ge),[[b,Y.name]])]),l(`label`,Ke,[l(`span`,null,n(t.$t(`dcw.k24dxcd020`)),1),p(l(`input`,{"onUpdate:modelValue":s[10]||=e=>Y.description=e,class:`inp`,placeholder:t.$t(`dcw.k1f2nwsp005`)},null,8,qe),[[b,Y.description]])]),l(`div`,Je,[l(`span`,null,n(t.$t(`dcw.k1x7nubr021`)),1),l(`div`,Ye,[(r(!0),u(d,null,a(g(w),t=>(r(),u(`button`,{key:t,class:i([`color-dot`,{on:Y.color===t}]),style:e({background:t}),onClick:e=>Y.color=Y.color===t?``:t},null,14,Xe))),128)),l(`small`,Ze,n(Y.color||t.$t(`dcw.k1qidbpy061`,{p0:I.value})),1)])]),J.value?(r(),u(`p`,Qe,n(J.value),1)):f(``,!0),l(`div`,$e,[l(`button`,{class:`mini-btn`,onClick:s[11]||=e=>K.value=!1},n(t.$t(`dcw.k3xdnn022`)),1),l(`button`,{class:`pill-btn`,disabled:q.value||!Y.name.trim(),onClick:Ut},n(t.$t(`common.save`)),9,et)])])])):f(``,!0)]),_:1}),o(x,{name:`modal`},{default:h(()=>[V.value&&G.value?(r(),u(`div`,{key:0,class:`modal-mask`,onClick:s[15]||=y(e=>V.value=!1,[`self`])},[l(`div`,tt,[l(`h3`,nt,[s[34]||=l(`span`,{class:`i-tabler-alert-triangle`},null,-1),_(` `+n(t.$t(`dcw.k7xq2mfd063`,{p0:G.value.line.name})),1)]),l(`p`,rt,n(W.value?t.$t(`dcw.k4r7nbd073`,{p0:G.value.line.name,p1:G.value.nodes,p2:G.value.products,p3:G.value.recipes}):t.$t(`dcw.k1gp649b062`,{p0:G.value.line.name,p1:G.value.nodes,p2:G.value.products,p3:G.value.recipes})),1),l(`label`,it,[p(l(`input`,{"onUpdate:modelValue":s[13]||=e=>W.value=e,type:`checkbox`},null,512),[[ee,W.value]]),l(`span`,null,n(t.$t(`dcw.k9m2vxa072`)),1)]),U.value?(r(),u(`p`,at,n(U.value),1)):f(``,!0),l(`div`,ot,[l(`button`,{class:`mini-btn`,onClick:s[14]||=e=>V.value=!1},n(t.$t(`dcw.k3xdnn022`)),1),l(`button`,{class:`pill-btn danger`,disabled:H.value,onClick:Vt},n(t.$t(`dcw.k3xakp026`)),9,st)])])])):f(``,!0)]),_:1}),o(x,{name:`modal`},{default:h(()=>[X.value?(r(),u(`div`,{key:0,class:`modal-mask`,onClick:s[26]||=y(e=>X.value=!1,[`self`])},[l(`div`,ct,[l(`h3`,lt,[_(n(t.$t(`dcw.k11oadmx024`))+` `,1),l(`small`,ut,n(t.$t(`dcw.k3x23c054`))+` `+n($.value)+` · `+n(t.$t(`dcw.k3t616a058`))+` `+n(g(T).templates.length-$.value),1)]),l(`p`,dt,n(t.$t(`dcw.k2hlav5025`)),1),l(`div`,ft,[(r(!0),u(d,null,a(g(T).templates,e=>(r(),u(`div`,{key:e.key,class:`tpl-row`,title:e.semantics??``},[l(`b`,null,n(e.name),1),l(`small`,mt,n(e.code)+` · `+n(e.min)+`~`+n(e.max)+` `+n(e.unit),1),e.semantics?(r(),u(`small`,ht,n(e.semantics.slice(0,40))+n(e.semantics.length>40?`…`:``),1)):f(``,!0),l(`span`,{class:i([`tpl-tag`,{builtin:e.builtin}])},n(e.builtin?t.$t(`dcw.k3x23c054`):t.$t(`dcw.k3t616a058`)),3),e.builtin?f(``,!0):(r(),u(`button`,{key:1,class:`mini-btn danger`,onClick:t=>Kt(e.key)},n(t.$t(`dcw.k3xakp026`)),9,gt))],8,pt))),128))]),l(`p`,_t,n(t.$t(`dcw.k169eb4s027`)),1),l(`div`,vt,[l(`label`,yt,[l(`span`,null,[_(n(t.$t(`dcw.k3xhia028`)),1),s[35]||=l(`em`,null,`*`,-1)]),p(l(`input`,{"onUpdate:modelValue":s[16]||=e=>Q.name=e,class:`inp`,placeholder:t.$t(`dcw.k1tooi3o006`)},null,8,bt),[[b,Q.name]])]),l(`label`,xt,[l(`span`,null,n(t.$t(`dcw.k1bqk219029`)),1),p(l(`input`,{"onUpdate:modelValue":s[17]||=e=>Q.ch=e,class:`inp`,placeholder:t.$t(`dcw.k698qz0007`)},null,8,St),[[b,Q.ch]])]),l(`label`,Ct,[l(`span`,null,n(t.$t(`dcw.k1ayxrqb030`)),1),p(l(`input`,{"onUpdate:modelValue":s[18]||=e=>Q.code=e,class:`inp`,placeholder:`如 MOTOR · I`},null,512),[[b,Q.code]])]),l(`label`,wt,[l(`span`,null,n(t.$t(`dcw.k3x4ef031`)),1),p(l(`input`,{"onUpdate:modelValue":s[19]||=e=>Q.unit=e,class:`inp`,placeholder:`如 A`},null,512),[[b,Q.unit]])]),l(`label`,Tt,[l(`span`,null,[_(n(t.$t(`dcw.k1l9jv5m032`)),1),s[36]||=l(`em`,null,`*`,-1)]),p(l(`input`,{"onUpdate:modelValue":s[20]||=e=>Q.min=e,type:`number`,class:`inp`},null,512),[[b,Q.min,void 0,{number:!0}]])]),l(`label`,Et,[l(`span`,null,[_(n(t.$t(`dcw.k1l9jv4p033`)),1),s[37]||=l(`em`,null,`*`,-1)]),p(l(`input`,{"onUpdate:modelValue":s[21]||=e=>Q.max=e,type:`number`,class:`inp`},null,512),[[b,Q.max,void 0,{number:!0}]])]),l(`label`,Dt,[l(`span`,null,n(t.$t(`dcw.k3mxmcx034`)),1),p(l(`input`,{"onUpdate:modelValue":s[22]||=e=>Q.decimals=e,type:`number`,class:`inp`},null,512),[[b,Q.decimals,void 0,{number:!0}]])]),l(`label`,Ot,[l(`span`,null,n(t.$t(`dcw.k3xx56035`)),1),p(l(`select`,{"onUpdate:modelValue":s[23]||=e=>Q.icon=e,class:`inp`},[(r(),u(d,null,a(Wt,e=>l(`option`,{key:e.key,value:e.key},n(e.label),9,kt)),64))],512),[[v,Q.icon]])])]),l(`label`,At,[l(`span`,null,n(t.$t(`dcw.k1b6qorg036`)),1),p(l(`textarea`,{"onUpdate:modelValue":s[24]||=e=>Q.semantics=e,class:`inp`,rows:`3`,placeholder:t.$t(`dcw.k1qdnfzc008`)},null,8,jt),[[b,Q.semantics]])]),Z.value?(r(),u(`p`,Mt,n(Z.value),1)):f(``,!0),l(`div`,Nt,[l(`button`,{class:`mini-btn`,onClick:s[25]||=e=>X.value=!1},n(t.$t(`dcw.k3x62t037`)),1),l(`button`,{class:`pill-btn`,disabled:!Q.name.trim()||Q.min===``||Q.max===``,onClick:Gt},n(t.$t(`dcw.k1bg9nga038`)),9,Pt)])])])):f(``,!0)]),_:1}),g(T).error?(r(),u(`p`,Ft,n(g(T).error),1)):f(``,!0)])}}}),[[`__scopeId`,`data-v-7ef81432`]]);export{T as default};
@@ -0,0 +1 @@
1
+ import{$ as e,P as t,R as n,S as r,Ut as i,V as a,Vt as o,W as s,b as c,d as l,dt as ee,f as u,h as d,i as f,m as p,nt as m,pt as h,tt as te,xt as g,y as _}from"./CSkxz2NX.js";import{c as v,f as ne,l as y,s as re}from"./D6uzXueg.js";import{a as ie}from"./C__m4EhR.js";import{t as ae}from"./BHA40aHa.js";import{n as oe}from"./KZQX7xoM.js";import{t as se}from"./CWoJjWmZ.js";import{t as b}from"./BDNMzG2s2.js";import{t as ce}from"./D0ZBQrN_2.js";import{t as le}from"./CNs_Ozdc2.js";import{a as ue,n as de,t as fe}from"./D98NH8kG.js";import{t as pe}from"./ca4TJ3Op.js";import{t as me}from"./C3J6FYKa.js";var he={class:`page`},ge={class:`aw-kicker`},_e={class:`aw-page-head`},ve={key:0,class:`err`},ye={key:1,class:`grid`},be={class:`col-live`},xe={class:`aw-tile value-card`},Se={class:`aw-kicker`},Ce={class:`big-val mono`},we={class:`facts mono`},Te={class:`col-form aw-tile pad`},Ee={class:`sec`},De={class:`field`},Oe={class:`field`},ke={value:``},Ae=[`value`],je={class:`field`},Me=[`value`,`disabled`],Ne={class:`field row`},Pe=[`disabled`],Fe={class:`field row`},Ie=[`disabled`],Le=[`disabled`],Re={class:`field row`},ze=[`disabled`],Be={class:`field`},Ve={class:`field`},He={class:`field-row`},Ue={class:`field`},We={class:`field`},Ge={class:`field`},Ke={class:`field`},qe=[`disabled`],Je={class:`sec mt`},Ye={class:`driver-grid`},Xe={key:0},Ze=[`onUpdate:modelValue`],Qe=[`value`],$e=[`onUpdate:modelValue`,`type`,`placeholder`],et={class:`test-row`},tt=[`disabled`],nt={class:`sec mt`},rt={class:`bind-row`},it={value:``},at=[`value`],ot={class:`col-hist aw-tile pad`},st={class:`hist-hd`},ct={class:`sec`},lt={class:`hist-ctl mono`},ut=[`value`],dt=[`title`],ft=[`placeholder`],pt={class:`raw-table mono`},mt={key:2,class:`aw-tile pad frames-tile`},ht={class:`hist-hd`},gt={class:`sec`},_t={class:`mono frames-n`},vt=[`viewBox`],yt=[`points`],bt={class:`raw-table mono`},xt={key:0,class:`gal`},St=[`title`,`onClick`],Ct=[`src`],wt={class:`mono`},Tt={key:1,class:`frames-empty`},Et=[`src`],x=320,Dt=84,Ot=`#35e0a0`,kt=`rgba(120,135,160,0.18)`,At=`rgba(140,155,175,0.8)`,jt=b(r({__name:`[id]`,setup(r){let{t:b}=oe();le({layout:`default`});let jt=ie(),S=l(()=>String(jt.params.id??``)),C=fe(),Mt=pe();Mt.load();let w=me(),T=l(()=>C.nodeById(S.value)??null),Nt=l(()=>{let e=T.value?ue(T.value.templateRef):``;return C.templates.find(t=>t.key===e)??null}),Pt={ok:b(`daqDetail.k41k5c026`),warn:b(`daqDetail.k49z8v027`),alarm:b(`daqDetail.k3xmid028`),offline:b(`daqDetail.k44c2n029`)},Ft=()=>{let e=T.value;return!e||!C.controller.running||!e.enabled?`offline`:e.state},It=null;n(()=>{It=C.ensureWsFeed(),C.load(),w.load(),D.value&&k()}),t(()=>It?.());let E=l(()=>Nt.value?.signalKind??`scalar`),D=l(()=>E.value!==`scalar`),O=l(()=>C.framesOf(S.value));async function k(){S.value&&await C.fetchFrames(S.value,{limit:24}).catch(()=>{})}e(S,()=>{D.value&&k()});let Lt=e=>new Date(e).toLocaleTimeString(`zh-CN`,{hour12:!1}),Rt=e=>Object.entries(e.metrics??{}).slice(0,3).map(([e,t])=>`${e}=${t}`).join(` `),zt=l(()=>O.value.find(e=>e.kind===`vector`&&e.points?.length)),Bt=l(()=>{let e=zt.value?.points??[];if(e.length<2)return``;let t=Math.min(...e),n=Math.max(...e)-t||1;return e.map((r,i)=>`${(i/(e.length-1)*x).toFixed(1)},${(78-(r-t)/n*72).toFixed(1)}`).join(` `)}),A=h(null);function Vt(e){return e==null?b(`daqDetail.k9vnp9h053`,{p0:C.controller.defaultPublishIntervalMs}):e===0?b(`daqDetail.k1m1zwux030`):`${e}ms`}let j=ee({enabled:!0,driver:`mock`,lineId:``,followGlobal:!0,intervalMs:5e3,calKind:`none`,calScale:1,calOffset:0,publishFollow:!0,publishEveryFrame:!1,publishMs:1e3,unit:``,decimals:1,min:0,max:100,warnLow:null,warnHigh:null});e(T,e=>{e&&(j.enabled=e.enabled,j.lineId=e.lineId??``,j.driver=e.driver,j.followGlobal=e.intervalMs==null,j.intervalMs=e.intervalMs??C.controller.defaultIntervalMs,j.publishFollow=e.publishIntervalMs==null,j.publishEveryFrame=e.publishIntervalMs===0,j.publishMs=e.publishIntervalMs==null?C.controller.defaultPublishIntervalMs:e.publishIntervalMs,j.unit=e.unit,j.decimals=e.decimals,j.min=e.min,j.max=e.max,j.warnLow=e.warnLow,j.warnHigh=e.warnHigh)},{immediate:!0});let M=l(()=>C.meta.drivers.length?C.meta.drivers:de.map(e=>({...e}))),N=h({}),P=l(()=>M.value.find(e=>e.kind===j.driver)?.configFields??[]);e(T,e=>{e&&(N.value={...e.driverConfig})},{immediate:!0}),e(()=>j.driver,()=>{if(P.value.length&&Object.keys(N.value).length===0){let e={};for(let t of P.value)t.default!==void 0&&(e[t.key]=t.default);N.value=e}},{immediate:!0});let F=h(!1),I=h(null);async function Ht(){F.value=!0,I.value=null;try{await C.patchNode(S.value,{driver:j.driver,driverConfig:{...N.value}}),I.value=await C.testNode(S.value)}catch(e){I.value={ok:!1,message:ce(e)}}finally{F.value=!1}}let L=h(!1);async function Ut(){let e=T.value;if(!(!e||L.value)){L.value=!0;try{await C.patchNode(e.id,{enabled:j.enabled,driver:j.driver,lineId:j.lineId,driverConfig:{...N.value},intervalMs:j.followGlobal?null:Math.max(1e3,Math.min(6e4,Math.round(j.intervalMs))),publishIntervalMs:j.publishFollow?null:j.publishEveryFrame?0:Math.max(0,Math.min(6e4,Math.round(j.publishMs))),unit:j.unit,decimals:Math.max(0,Math.min(6,Math.round(j.decimals))),min:j.min,max:j.max,warnLow:j.warnLow,warnHigh:j.warnHigh})}finally{L.value=!1}}}function Wt(e){return C.meta.drivers.find(t=>t.kind===e)?.status===`planned`}let R=h(``),Gt=l(()=>(T.value?.deviceIds??(T.value?.deviceBindingId?[T.value.deviceBindingId]:[])).map(e=>w.twins.find(t=>t.id===e)?.name??`${e.slice(0,8)}…`).join(` / `));function Kt(){C.bindNode(S.value,T.value?.deviceBindingId?null:R.value||null)}let qt=l(()=>w.twins.filter(e=>e.kind!==`daq`&&e.id!==T.value?.id)),z=h([]),B=h(15e3),V=h(!1),Jt=[{label:`1s 桶`,ms:1e3},{label:`5s 桶`,ms:5e3},{label:`15s 桶(默认)`,ms:15e3},{label:`30s 桶`,ms:3e4},{label:`1min 桶`,ms:6e4}];async function H(){if(S.value){V.value=!0;try{let e=await C.samplesOf(S.value,{toMs:Date.now(),bucketMs:B.value||void 0,limit:400});z.value=[...e].reverse()}finally{V.value=!1,U()}}}let Yt=h(null);function U(){let e=Yt.value;if(!e)return;let t=Math.min(window.devicePixelRatio||1,2),n=e.clientWidth,r=e.clientHeight;(e.width!==n*t||e.height!==r*t)&&(e.width=n*t,e.height=r*t);let i=e.getContext(`2d`);if(!i)return;i.setTransform(t,0,0,t,0,0),i.clearRect(0,0,n,r);for(let e=1;e<4;e++)i.strokeStyle=kt,i.beginPath(),i.moveTo(0,r/4*e),i.lineTo(n,r/4*e),i.stroke();let a=z.value;if(a.length<2)return;let o=1/0,s=-1/0;for(let e of a){let t=e.value??e.avg??e.min??0;o=Math.min(o,t),s=Math.max(s,t)}let c=Math.max(s-o,1e-9);i.strokeStyle=At,i.font=`10px monospace`,i.fillStyle=At,i.fillText(s.toFixed(2),4,11),i.fillText(o.toFixed(2),4,r-4),i.strokeStyle=Ot,i.lineWidth=1.6,i.beginPath(),a.forEach((e,t)=>{let s=t/(a.length-1)*n,l=r-((e.value??e.avg??0)-o)/c*(r-16)-8;t===0?i.moveTo(s,l):i.lineTo(s,l)}),i.stroke()}let W=h(null),G=null,K=``;function q(){let e=W.value,t=T.value;if(!e||!t||t.hist.length<2)return;let n=`${t.hist.length}:${t.hist[t.hist.length-1]}:${t.hist[0]}`;if(n===K)return;K=n;let r=Math.min(window.devicePixelRatio||1,2),i=e.clientWidth,a=e.clientHeight;(e.width!==i*r||e.height!==a*r)&&(e.width=i*r,e.height=a*r);let o=e.getContext(`2d`);if(!o)return;o.setTransform(r,0,0,r,0,0),o.clearRect(0,0,i,a);let s=Math.max(...t.hist),c=Math.min(...t.hist),l=Math.max(s-c,1e-9);o.strokeStyle=`rgba(65,200,244,0.9)`,o.lineWidth=1.5,o.beginPath(),t.hist.forEach((e,n)=>{let r=n/(t.hist.length-1)*i,s=a-(e-c)/l*(a-6)-3;n===0?o.moveTo(r,s):o.lineTo(r,s)}),o.stroke()}let J=null,Y=!1;function Xt(){Y=document.hidden,Y||(q(),Z.value&&H())}let X=h(0),Z=l(()=>{let e=C.controller.minQueryDisplayIntervalMs??500,t=X.value>0?X.value:C.controller.queryDisplayIntervalMs??0;return t>0?Math.max(e,t):0}),Q=null;function $(){Q&&=(clearInterval(Q),null);let e=Z.value;e&&(Q=se(()=>{document.hidden||V.value||H()},e))}return n(()=>{H(),G=se(()=>{Y||q()},800),document.addEventListener(`visibilitychange`,Xt),typeof ResizeObserver<`u`&&(J=new ResizeObserver(()=>{K=``,q(),U()}),W.value&&J.observe(W.value)),$()}),t(()=>{G&&clearInterval(G),Q&&clearInterval(Q),document.removeEventListener(`visibilitychange`,Xt),J?.disconnect(),J=null}),e(B,()=>void H()),e(Z,()=>$()),(e,t)=>{let n=ae;return a(),d(`div`,he,[u(`p`,ge,[c(n,{to:`/daq`,class:`back`},{default:te(()=>[_(i(e.$t(`daqDetail.k1emg364001`)),1)]),_:1}),_(` / NODE `+i(S.value.slice(0,8).toUpperCase()),1)]),u(`div`,_e,[u(`h1`,null,i(T.value?.name??S.value),1),u(`span`,{class:o([`st-pill`,[Ft()]])},i(Pt[Ft()]),3)]),!T.value&&g(C).error?(a(),d(`p`,ve,[_(i(g(C).error)+`(`,1),c(n,{to:`/workshop`},{default:te(()=>[_(i(e.$t(`daqDetail.k1bhhheq002`)),1)]),_:1}),t[21]||=_(`) `,-1)])):p(``,!0),T.value?(a(),d(`div`,ye,[u(`section`,be,[u(`div`,xe,[u(`p`,Se,i(e.$t(`daqDetail.k1fx2vik032`))+` `+i(Nt.value?.ch??`-`),1),u(`div`,Ce,[_(i(T.value.value==null?`--`:T.value.value.toFixed(T.value.decimals)),1),u(`small`,null,i(T.value.unit),1)]),u(`canvas`,{ref_key:`liveCanvas`,ref:W,class:`live-canvas`},null,512),u(`dl`,we,[u(`div`,null,[u(`dt`,null,i(e.$t(`daqDetail.k4a0la003`)),1),u(`dd`,null,i(T.value.driver)+i(Wt(T.value.driver)?e.$t(`daqDetail.kz8zr9v035`):``),1)]),u(`div`,null,[u(`dt`,null,i(e.$t(`daqDetail.k3xg3w004`)),1),u(`dd`,null,i(T.value.intervalMs??e.$t(`daqDetail.k9vnp9h053`,{p0:g(C).controller.defaultIntervalMs})),1)]),u(`div`,null,[u(`dt`,null,i(e.$t(`daqDetail.k3w6td005`)),1),u(`dd`,null,i(Vt(T.value.publishIntervalMs)),1)]),u(`div`,null,[u(`dt`,null,i(e.$t(`daqDetail.k3x5tpx006`)),1),u(`dd`,null,i(T.value.warnLow??`-∞`)+` ~ `+i(T.value.warnHigh??`+∞`),1)]),u(`div`,null,[u(`dt`,null,i(e.$t(`daqDetail.k1hjj0jf007`)),1),u(`dd`,null,i(T.value.min)+` ~ `+i(T.value.max),1)]),u(`div`,null,[u(`dt`,null,i(e.$t(`daqDetail.k1i8rtqt008`)),1),u(`dd`,null,i(Gt.value||e.$t(`daqDetail.k3own4q036`)),1)])])])]),u(`section`,Te,[u(`h3`,Ee,i(e.$t(`daqDetail.kd9d69j009`)),1),u(`form`,{class:`form-grid`,onSubmit:ne(Ut,[`prevent`])},[u(`label`,De,[u(`span`,null,i(e.$t(`daqDetail.k1iw7tbf010`)),1),u(`button`,{type:`button`,class:o([`toggle`,{on:j.enabled}]),onClick:t[0]||=e=>j.enabled=!j.enabled},i(j.enabled?e.$t(`daqDetail.k3w3j8f037`):e.$t(`daqDetail.k3n5aaj045`)),3)]),u(`label`,Oe,[u(`span`,null,i(e.$t(`daqDetail.k12k23od011`)),1),m(u(`select`,{"onUpdate:modelValue":t[1]||=e=>j.lineId=e,class:`input`},[u(`option`,ke,i(e.$t(`daqDetail.k3ootr6012`)),1),(a(!0),d(f,null,s(g(Mt).lines,e=>(a(),d(`option`,{key:e.id,value:e.id},i(e.name),9,Ae))),128))],512),[[v,j.lineId]])]),u(`label`,je,[u(`span`,null,i(e.$t(`daqDetail.k1l6smxo013`)),1),m(u(`select`,{"onUpdate:modelValue":t[2]||=e=>j.driver=e,class:`input`},[(a(!0),d(f,null,s(M.value,t=>(a(),d(`option`,{key:t.kind,value:t.kind,disabled:t.status===`planned`},i(t.label)+i(t.plugin?` ⌁`:``)+i(t.status===`planned`?e.$t(`daqDetail.kz8zr9v035`):``),9,Me))),128))],512),[[v,j.driver]])]),u(`label`,Ne,[u(`button`,{type:`button`,class:o([`toggle slim`,{on:j.followGlobal}]),onClick:t[3]||=e=>j.followGlobal=!j.followGlobal},i(j.followGlobal?e.$t(`daqDetail.k1k2ueyq038`):e.$t(`daqDetail.k1cgi8fy046`)),3),m(u(`input`,{"onUpdate:modelValue":t[4]||=e=>j.intervalMs=e,type:`number`,min:`1000`,max:`60000`,step:`500`,class:`input`,disabled:j.followGlobal},null,8,Pe),[[y,j.intervalMs,void 0,{number:!0}]]),t[22]||=u(`small`,null,`ms`,-1)]),u(`label`,Fe,[u(`button`,{type:`button`,class:o([`toggle slim`,{on:j.calKind===`linear`}]),title:`采集标定 decoder:物理值 = scale × PLC采集值 + offset`,onClick:t[5]||=e=>j.calKind=j.calKind===`linear`?`none`:`linear`},i(j.calKind===`linear`?e.$t(`daqDetail.k1eru4r1039`):e.$t(`daqDetail.k3oktae047`)),3),m(u(`input`,{"onUpdate:modelValue":t[6]||=e=>j.calScale=e,type:`number`,step:`0.1`,class:`input`,disabled:j.calKind!==`linear`,title:`decode 斜率(≠0)`},null,8,Ie),[[y,j.calScale,void 0,{number:!0}]]),m(u(`input`,{"onUpdate:modelValue":t[7]||=e=>j.calOffset=e,type:`number`,step:`0.1`,class:`input`,disabled:j.calKind!==`linear`,title:`decode 截距`},null,8,Le),[[y,j.calOffset,void 0,{number:!0}]]),t[23]||=u(`small`,null,`decoder`,-1)]),u(`label`,Re,[u(`button`,{type:`button`,class:o([`toggle slim`,{on:j.publishFollow}]),onClick:t[8]||=e=>j.publishFollow=!j.publishFollow},i(j.publishFollow?e.$t(`daqDetail.k1k2t5o7040`):e.$t(`daqDetail.k1cggz5f048`)),3),u(`span`,{class:o([`toggle slim`,{on:j.publishEveryFrame}]),style:{cursor:`pointer`},onClick:t[9]||=e=>j.publishEveryFrame=!j.publishEveryFrame},i(j.publishEveryFrame?e.$t(`daqDetail.k41mvv041`):e.$t(`daqDetail.k3n42dj049`)),3),m(u(`input`,{"onUpdate:modelValue":t[10]||=e=>j.publishMs=e,type:`number`,min:`0`,max:`60000`,step:`100`,class:`input`,disabled:j.publishFollow||j.publishEveryFrame},null,8,ze),[[y,j.publishMs,void 0,{number:!0}]]),t[24]||=u(`small`,null,`ms`,-1)]),u(`label`,Be,[u(`span`,null,i(e.$t(`daqDetail.k3x4ef014`)),1),m(u(`input`,{"onUpdate:modelValue":t[11]||=e=>j.unit=e,class:`input`},null,512),[[y,j.unit]])]),u(`label`,Ve,[u(`span`,null,i(e.$t(`daqDetail.k3mxmcx015`)),1),m(u(`input`,{"onUpdate:modelValue":t[12]||=e=>j.decimals=e,type:`number`,min:`0`,max:`6`,class:`input`},null,512),[[y,j.decimals,void 0,{number:!0}]])]),u(`div`,He,[u(`label`,Ue,[u(`span`,null,i(e.$t(`daqDetail.k1l9jv5m016`)),1),m(u(`input`,{"onUpdate:modelValue":t[13]||=e=>j.min=e,type:`number`,step:`any`,class:`input`},null,512),[[y,j.min,void 0,{number:!0}]])]),u(`label`,We,[u(`span`,null,i(e.$t(`daqDetail.k1md63hm017`)),1),m(u(`input`,{"onUpdate:modelValue":t[14]||=e=>j.warnLow=e,type:`number`,step:`any`,class:`input`},null,512),[[y,j.warnLow,void 0,{number:!0}]])]),u(`label`,Ge,[u(`span`,null,i(e.$t(`daqDetail.k1md63gp018`)),1),m(u(`input`,{"onUpdate:modelValue":t[15]||=e=>j.warnHigh=e,type:`number`,step:`any`,class:`input`},null,512),[[y,j.warnHigh,void 0,{number:!0}]])]),u(`label`,Ke,[u(`span`,null,i(e.$t(`daqDetail.k1l9jv4p019`)),1),m(u(`input`,{"onUpdate:modelValue":t[16]||=e=>j.max=e,type:`number`,step:`any`,class:`input`},null,512),[[y,j.max,void 0,{number:!0}]])])]),u(`button`,{class:`aw-pill`,type:`submit`,disabled:L.value},i(L.value?e.$t(`daqDetail.k1as0g50042`):e.$t(`daqDetail.ksn9cgo050`)),9,qe)],32),P.value.length?(a(),d(f,{key:0},[u(`h3`,Je,i(e.$t(`daqDetail.k1p9gioa033`))+` `+i(M.value.find(e=>e.kind===j.driver)?.label),1),u(`div`,Ye,[(a(!0),d(f,null,s(P.value,e=>(a(),d(`label`,{key:e.key,class:`field`},[u(`span`,null,[_(i(e.label),1),e.required?(a(),d(`em`,Xe,`*`)):p(``,!0)]),e.type===`select`?m((a(),d(`select`,{key:0,"onUpdate:modelValue":t=>N.value[e.key]=t,class:`input`},[(a(!0),d(f,null,s(e.options,e=>(a(),d(`option`,{key:e.value,value:e.value},i(e.label),9,Qe))),128))],8,Ze)),[[v,N.value[e.key]]]):m((a(),d(`input`,{key:1,"onUpdate:modelValue":t=>N.value[e.key]=t,type:e.type===`number`?`number`:`text`,placeholder:e.placeholder,class:`input`},null,8,$e)),[[re,N.value[e.key]]])]))),128))]),u(`div`,et,[u(`button`,{class:`pill-btn`,disabled:F.value,onClick:Ht},i(F.value?e.$t(`daqDetail.k1fsh720043`):e.$t(`daqDetail.k1fstglk051`)),9,tt),I.value?(a(),d(`span`,{key:0,class:o([`test-out mono`,I.value.ok?`ok`:`bad`])},i(I.value.ok?`✓`:`✗`)+` `+i(I.value.message),3)):p(``,!0)])],64)):p(``,!0),u(`h3`,nt,i(e.$t(`daqDetail.k1ie6qju020`)),1),u(`div`,rt,[m(u(`select`,{"onUpdate:modelValue":t[17]||=e=>R.value=e,class:`input grow`},[u(`option`,it,i(e.$t(`daqDetail.kjobzu3021`)),1),(a(!0),d(f,null,s(qt.value,e=>(a(),d(`option`,{key:e.id,value:e.id},i(e.name),9,at))),128))],512),[[v,R.value]]),u(`button`,{class:`pill-btn`,onClick:Kt},i(Gt.value?e.$t(`daqDetail.k479eh044`):e.$t(`daqDetail.k452a8052`)),1)])]),u(`section`,ot,[u(`div`,st,[u(`h3`,ct,i(e.$t(`daqDetail.k1i535i5034`))+i(g(C).meta.tsdb)+`) `,1),u(`div`,lt,[m(u(`select`,{"onUpdate:modelValue":t[18]||=e=>B.value=e,class:`input`},[(a(),d(f,null,s(Jt,e=>u(`option`,{key:e.ms,value:e.ms},i(e.label),9,ut)),64))],512),[[v,B.value,void 0,{number:!0}]]),u(`label`,{class:`refresh-ctl`,title:e.$t(`daqDetail.k1rfrshint001`,{p0:g(C).controller.minQueryDisplayIntervalMs??500})},[t[25]||=u(`span`,{class:`i-tabler-refresh`},null,-1),m(u(`input`,{"onUpdate:modelValue":t[19]||=e=>X.value=e,type:`number`,min:0,max:`600000`,step:`500`,placeholder:String(g(C).controller.queryDisplayIntervalMs??5e3)},null,8,ft),[[y,X.value,void 0,{number:!0}]]),t[26]||=_(`ms `,-1)],8,dt),u(`button`,{class:`pill-btn`,onClick:H},i(e.$t(`daqDetail.k3x1jg022`)),1)])]),u(`canvas`,{ref_key:`chartCanvas`,ref:Yt,class:`hist-canvas`},null,512),u(`table`,pt,[u(`thead`,null,[u(`tr`,null,[u(`th`,null,i(e.$t(`daqDetail.k40vsf023`)),1),u(`th`,null,i(e.$t(`daqDetail.k48v5024`)),1),u(`th`,null,i(e.$t(`daqDetail.k4bza025`)),1)])]),u(`tbody`,null,[(a(!0),d(f,null,s(z.value.filter(e=>e.value!=null).slice(-12).reverse(),(e,t)=>(a(),d(`tr`,{key:t},[u(`td`,null,i(new Date(e.at).toLocaleTimeString(`zh-CN`,{hour12:!1})),1),u(`td`,null,i(e.value.toFixed(T.value?.decimals??2)),1),u(`td`,null,i(e.state),1)]))),128))])])])])):p(``,!0),D.value?(a(),d(`section`,mt,[u(`div`,ht,[u(`h3`,gt,[_(i(E.value===`image`?e.$t(`daqDetail.kfrm0001`):e.$t(`daqDetail.kfrm0002`))+` `,1),u(`span`,_t,i(O.value.length),1)]),u(`button`,{class:`pill-btn`,onClick:k},i(e.$t(`daqDetail.k3x1jg022`)),1)]),E.value===`vector`?(a(),d(f,{key:0},[(a(),d(`svg`,{class:`vec-svg`,viewBox:`0 0 ${x} ${Dt}`,preserveAspectRatio:`none`},[u(`polyline`,{points:Bt.value,fill:`none`,stroke:`var(--accent)`,"stroke-width":`1.5`},null,8,yt)],8,vt)),u(`table`,bt,[u(`thead`,null,[u(`tr`,null,[u(`th`,null,i(e.$t(`daqDetail.k40vsf023`)),1),u(`th`,null,i(e.$t(`daqDetail.kfrm0004`)),1),u(`th`,null,i(e.$t(`daqDetail.kfrm0005`)),1)])]),u(`tbody`,null,[(a(!0),d(f,null,s(O.value.filter(e=>e.kind===`vector`).slice(0,12),e=>(a(),d(`tr`,{key:e.at},[u(`td`,null,i(Lt(e.at)),1),u(`td`,null,i(e.points?.length??0),1),u(`td`,null,i(Rt(e)),1)]))),128))])])],64)):(a(),d(f,{key:1},[O.value.length?(a(),d(`div`,xt,[(a(!0),d(f,null,s(O.value,t=>(a(),d(`figure`,{key:t.at,class:`gal-item`,title:e.$t(`daqDetail.kfrm0006`),onClick:e=>A.value=t},[u(`img`,{src:t.thumbUrl,loading:`lazy`,alt:`daq frame`},null,8,Ct),u(`figcaption`,wt,i(Lt(t.at))+` · `+i(Rt(t)),1)],8,St))),128))])):(a(),d(`p`,Tt,i(e.$t(`daqDetail.kfrm0003`)),1)),A.value?(a(),d(`div`,{key:2,class:`gal-full`,onClick:t[20]||=e=>A.value=null},[u(`img`,{src:A.value.contentUrl??A.value.thumbUrl,alt:`daq frame full`},null,8,Et)])):p(``,!0)],64))])):p(``,!0)])}}}),[[`__scopeId`,`data-v-6e40dda6`]]);export{jt as default};
@@ -1,4 +1,4 @@
1
- import{St as e}from"./BU83-NnX.js";import{$ as t,A as n,C as r,D as i,Ht as a,P as o,R as s,S as c,T as l,Ut as u,V as d,Vt as f,W as p,b as m,ct as h,d as g,et as _,f as v,h as y,ht as b,i as x,j as S,m as C,p as w,pt as T,tt as E,vt as D,xt as O,y as k}from"./CSkxz2NX.js";import{d as A}from"./BJHKLJJU.js";import{n as j}from"./DtYHUi5Z.js";import{n as ee,t as M}from"./xh3_vYcu.js";import{t as te}from"./BHA40aHa.js";import{n as ne}from"./KZQX7xoM.js";import{t as re}from"./D9Oidm5I.js";import{t as ie}from"./BDNMzG2s2.js";import{t as ae}from"./BN6iuJEg2.js";import{t as oe}from"./DTFCy6h-.js";import{t as se}from"./DcsCcxp4.js";import{t as ce}from"./D8qvkfyY.js";import{t as le}from"./zq5t1vyX.js";var ue=function(e,t){return ue=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},ue(e,t)};function N(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);ue(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var de=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),P=new(function(){function e(){this.browser=new de,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<`u`}return e}());typeof wx==`object`&&typeof wx.getSystemInfoSync==`function`?(P.wxa=!0,P.touchEventsSupported=!0):typeof document>`u`&&typeof self<`u`?P.worker=!0:!P.hasGlobalWindow||`Deno`in window?(P.node=!0,P.svgSupported=!0):F(navigator.userAgent,P);function F(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);r&&(n.firefox=!0,n.version=r[1]),i&&(n.ie=!0,n.version=i[1]),a&&(n.edge=!0,n.version=a[1],n.newEdge=+a[1].split(`.`)[0]>18),o&&(n.weChat=!0),t.svgSupported=typeof SVGRect<`u`,t.touchEventsSupported=`ontouchstart`in window&&!n.ie&&!n.edge,t.pointerEventsSupported=`onpointerdown`in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported=typeof document<`u`;var s=document.documentElement.style;t.transform3dSupported=(n.ie&&`transition`in s||n.edge||`WebKitCSSMatrix`in window&&`m11`in new WebKitCSSMatrix||`MozPerspective`in s)&&!(`OTransition`in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}var fe=`12px sans-serif`,pe=20,me=100,he=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function ge(e){var t={};if(typeof JSON>`u`)return t;for(var n=0;n<e.length;n++){var r=String.fromCharCode(n+32);t[r]=(e.charCodeAt(n)-pe)/me}return t}var _e=ge(he),ve={createCanvas:function(){return typeof document<`u`&&document.createElement(`canvas`)},measureText:(function(){var e,t;return function(n,r){if(!e){var i=ve.createCanvas();e=i&&i.getContext(`2d`)}if(e)return t!==r&&(t=e.font=r||`12px sans-serif`),e.measureText(n);n||=``,r||=`12px sans-serif`;var a=/((?:\d+)?\.?\d*)px/.exec(r),o=a&&+a[1]||12,s=0;if(r.indexOf(`mono`)>=0)s=o*n.length;else for(var c=0;c<n.length;c++){var l=_e[n[c]];s+=l==null?o:l*o}return{width:s}}})(),loadImage:function(e,t,n){var r=new Image;return r.onload=t,r.onerror=n,r.src=e,r}},ye=Ie([`Function`,`RegExp`,`Date`,`Error`,`CanvasGradient`,`CanvasPattern`,`Image`,`Canvas`],function(e,t){return e[`[object `+t+`]`]=!0,e},{}),be=Ie([`Int8`,`Uint8`,`Uint8Clamped`,`Int16`,`Uint16`,`Int32`,`Uint32`,`Float32`,`Float64`],function(e,t){return e[`[object `+t+`Array]`]=!0,e},{}),xe=Object.prototype.toString,Se=Array.prototype,Ce=Se.forEach,we=Se.filter,Te=Se.slice,Ee=Se.map,De=function(){}.constructor,Oe=De?De.prototype:null,ke=`__proto__`,Ae=2311;function je(){return Ae++}function Me(){var e=[...arguments];typeof console<`u`&&console.error.apply(console,e)}function I(e){if(typeof e!=`object`||!e)return e;var t=e,n=xe.call(e);if(n===`[object Array]`){if(!rt(e)){t=[];for(var r=0,i=e.length;r<i;r++)t[r]=I(e[r])}}else if(be[n]){if(!rt(e)){var a=e.constructor;if(a.from)t=a.from(e);else{t=new a(e.length);for(var r=0,i=e.length;r<i;r++)t[r]=e[r]}}}else if(!ye[n]&&!rt(e)&&!Ge(e))for(var o in t={},e)e.hasOwnProperty(o)&&o!==ke&&(t[o]=I(e[o]));return t}function L(e,t,n){if(!q(t)||!q(e))return n?I(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==ke){var i=e[r],a=t[r];q(a)&&q(i)&&!W(a)&&!W(i)&&!Ge(a)&&!Ge(i)&&!Ue(a)&&!Ue(i)&&!rt(a)&&!rt(i)?L(i,a,n):(n||!(r in e))&&(e[r]=I(t[r]))}return e}function R(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==ke&&(e[n]=t[n]);return e}function z(e,t,n){for(var r=Re(t),i=0,a=r.length;i<a;i++){var o=r[i];(n?t[o]!=null:e[o]==null)&&(e[o]=t[o])}return e}ve.createCanvas;function B(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n}return-1}function Ne(e,t){var n=e.prototype;function r(){}for(var i in r.prototype=t.prototype,e.prototype=new r,n)n.hasOwnProperty(i)&&(e.prototype[i]=n[i]);e.prototype.constructor=e,e.superClass=t}function Pe(e,t,n){if(e=`prototype`in e?e.prototype:e,t=`prototype`in t?t.prototype:t,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(t),i=0;i<r.length;i++){var a=r[i];a!==`constructor`&&(n?t[a]!=null:e[a]==null)&&(e[a]=t[a])}else z(e,t,n)}function Fe(e){return!e||typeof e==`string`?!1:typeof e.length==`number`}function V(e,t,n){if(e&&t){if(e.forEach&&e.forEach===Ce)e.forEach(t,n);else if(e.length===+e.length)for(var r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e);else for(var a in e)e.hasOwnProperty(a)&&t.call(n,e[a],a,e)}}function H(e,t,n){if(!e)return[];if(!t)return Ze(e);if(e.map&&e.map===Ee)return e.map(t,n);for(var r=[],i=0,a=e.length;i<a;i++)r.push(t.call(n,e[i],i,e));return r}function Ie(e,t,n,r){if(e&&t){for(var i=0,a=e.length;i<a;i++)n=t.call(r,n,e[i],i,e);return n}}function Le(e,t,n){if(!e)return[];if(!t)return Ze(e);if(e.filter&&e.filter===we)return e.filter(t,n);for(var r=[],i=0,a=e.length;i<a;i++)t.call(n,e[i],i,e)&&r.push(e[i]);return r}function Re(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}function ze(e,t){var n=[...arguments].slice(2);return function(){return e.apply(t,n.concat(Te.call(arguments)))}}var U=Oe&&G(Oe.bind)?Oe.call.bind(Oe.bind):ze;function Be(e){var t=[...arguments].slice(1);return function(){return e.apply(this,t.concat(Te.call(arguments)))}}function W(e){return Array.isArray?Array.isArray(e):xe.call(e)===`[object Array]`}function G(e){return typeof e==`function`}function K(e){return typeof e==`string`}function Ve(e){return xe.call(e)===`[object String]`}function He(e){return typeof e==`number`}function q(e){var t=typeof e;return t===`function`||!!e&&t===`object`}function Ue(e){return!!ye[xe.call(e)]}function We(e){return!!be[xe.call(e)]}function Ge(e){return typeof e==`object`&&typeof e.nodeType==`number`&&typeof e.ownerDocument==`object`}function Ke(e){return e.colorStops!=null}function qe(e){return e.image!=null}function Je(e){return e!==e}function Ye(){for(var e=[...arguments],t=0,n=e.length;t<n;t++)if(e[t]!=null)return e[t]}function J(e,t){return e??t}function Xe(e,t,n){return e??t??n}function Ze(e){var t=[...arguments].slice(1);return Te.apply(e,t)}function Qe(e){if(typeof e==`number`)return[e,e,e,e];var t=e.length;return t===2?[e[0],e[1],e[0],e[1]]:t===3?[e[0],e[1],e[2],e[1]]:e}function $e(e,t){if(!e)throw Error(t)}function et(e){return e==null?null:typeof e.trim==`function`?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``)}var tt=`__ec_primitive__`;function nt(e){e[tt]=!0}function rt(e){return e[tt]}var it=function(){function e(){this.data={}}return e.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},e.prototype.has=function(e){return this.data.hasOwnProperty(e)},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){return this.data[e]=t,this},e.prototype.keys=function(){return Re(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),at=typeof Map==`function`;function ot(){return at?new Map:new it}var st=function(){function e(t){var n=W(t);this.data=ot();var r=this;t instanceof e?t.each(i):t&&V(t,i);function i(e,t){n?r.set(e,t):r.set(t,e)}}return e.prototype.hasKey=function(e){return this.data.has(e)},e.prototype.get=function(e){return this.data.get(e)},e.prototype.set=function(e,t){return this.data.set(e,t),t},e.prototype.each=function(e,t){this.data.forEach(function(n,r){e.call(t,n,r)})},e.prototype.keys=function(){var e=this.data.keys();return at?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function Y(e){return new st(e)}function ct(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r<e.length;r++)n[r]=e[r];for(var i=e.length,r=0;r<t.length;r++)n[r+i]=t[r];return n}function lt(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&R(n,t),n}function ut(e){var t=e.style;t.webkitUserSelect=`none`,t.userSelect=`none`,t.webkitTapHighlightColor=`rgba(0,0,0,0)`,t[`-webkit-touch-callout`]=`none`}function X(e,t){return e.hasOwnProperty(t)}function dt(){}var ft=180/Math.PI;function pt(e,t){return e??=0,t??=0,[e,t]}function mt(e){return[e[0],e[1]]}function ht(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function gt(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function _t(e){return Math.sqrt(vt(e))}function vt(e){return e[0]*e[0]+e[1]*e[1]}function yt(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function bt(e,t){var n=_t(t);return n===0?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function xt(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var St=xt;function Ct(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var wt=Ct;function Tt(e,t,n,r){return e[0]=t[0]+r*(n[0]-t[0]),e[1]=t[1]+r*(n[1]-t[1]),e}function Et(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function Dt(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function Ot(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var kt=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),At=function(){function e(e){this.handler=e,e.on(`mousedown`,this._dragStart,this),e.on(`mousemove`,this._drag,this),e.on(`mouseup`,this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new kt(t,e),`dragstart`,e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,a=r-this._y;this._x=n,this._y=r,t.drift(i,a,e),this.handler.dispatchToElement(new kt(t,e),`drag`,e.event);var o=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.handler.dispatchToElement(new kt(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new kt(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new kt(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new kt(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),jt=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||={};var i=this._$handlers;if(typeof t==`function`&&(r=n,n=t,t=null),!n||!e)return this;var a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),i[e]||(i[e]=[]);for(var o=0;o<i[e].length;o++)if(i[e][o].h===n)return this;var s={h:n,query:t,ctx:r||this,callAtLast:n.zrEventfulCallAtLast},c=i[e].length-1,l=i[e][c];return l&&l.callAtLast?i[e].splice(c,0,s):i[e].push(s),this},e.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},e.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var r=[],i=0,a=n[e].length;i<a;i++)n[e][i].h!==t&&r.push(n[e][i]);n[e]=r}n[e]&&n[e].length===0&&delete n[e]}else delete n[e];return this},e.prototype.trigger=function(e){var t=[...arguments].slice(1);if(!this._$handlers)return this;var n=this._$handlers[e],r=this._$eventProcessor;if(n)for(var i=t.length,a=n.length,o=0;o<a;o++){var s=n[o];if(!(r&&r.filter&&s.query!=null&&!r.filter(e,s.query)))switch(i){case 0:s.h.call(s.ctx);break;case 1:s.h.call(s.ctx,t[0]);break;case 2:s.h.call(s.ctx,t[0],t[1]);break;default:s.h.apply(s.ctx,t)}}return r&&r.afterTrigger&&r.afterTrigger(e),this},e.prototype.triggerWithContext=function(e){var t=[...arguments].slice(1);if(!this._$handlers)return this;var n=this._$handlers[e],r=this._$eventProcessor;if(n)for(var i=t.length,a=t[i-1],o=n.length,s=0;s<o;s++){var c=n[s];if(!(r&&r.filter&&c.query!=null&&!r.filter(e,c.query)))switch(i){case 0:c.h.call(a);break;case 1:c.h.call(a,t[0]);break;case 2:c.h.call(a,t[0],t[1]);break;default:c.h.apply(a,t.slice(1,i-1))}}return r&&r.afterTrigger&&r.afterTrigger(e),this},e}(),Mt=Math.log(2);function Nt(e,t,n,r,i,a){var o=r+`-`+i,s=e.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var c=Math.round(Math.log((1<<s)-1&~i)/Mt);return e[n][c]}for(var l=r|1<<n,u=n+1;r&1<<u;)u++;for(var d=0,f=0,p=0;f<s;f++){var m=1<<f;m&i||(d+=(p%2?-1:1)*e[n][f]*Nt(e,t-1,u,l,i|m,a),p++)}return a[o]=d,d}function Pt(e,t){var n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],r={},i=Nt(n,8,0,0,0,r);if(i!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]??(a[s]=0),a[s]+=((o+s)%2?-1:1)*Nt(n,7,+(o===0),1<<o,1<<s,r)/i*t[o];return function(e,t,n){var r=t*a[6]+n*a[7]+1;e[0]=(t*a[0]+n*a[1]+a[2])/r,e[1]=(t*a[3]+n*a[4]+a[5])/r}}}var Ft=`___zrEVENTSAVED`,It=[];function Lt(e,t,n,r,i){return Rt(It,t,r,i,!0)&&Rt(e,n,It[0],It[1])}function Rt(e,t,n,r,i){if(t.getBoundingClientRect&&P.domSupported&&!Vt(t)){var a=t[Ft]||(t[Ft]={}),o=Bt(zt(t,a),a,i);if(o)return o(e,n,r),!0}return!1}function zt(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var r=[`left`,`right`],i=[`top`,`bottom`],a=0;a<4;a++){var o=document.createElement(`div`),s=o.style,c=a%2,l=(a>>1)%2;s.cssText=[`position: absolute`,`visibility: hidden`,`padding: 0`,`margin: 0`,`border-width: 0`,`user-select: none`,`width:0`,`height:0`,r[c]+`:0`,i[l]+`:0`,r[1-c]+`:auto`,i[1-l]+`:auto`,``].join(`!important;`),e.appendChild(o),n.push(o)}return n}function Bt(e,t,n){for(var r=n?`invTrans`:`trans`,i=t[r],a=t.srcCoords,o=[],s=[],c=!0,l=0;l<4;l++){var u=e[l].getBoundingClientRect(),d=2*l,f=u.left,p=u.top;o.push(f,p),c=c&&a&&f===a[d]&&p===a[d+1],s.push(e[l].offsetLeft,e[l].offsetTop)}return c&&i?i:(t.srcCoords=o,t[r]=n?Pt(s,o):Pt(o,s))}function Vt(e){return e.nodeName.toUpperCase()===`CANVAS`}var Ht=/([&<>"'])/g,Ut={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`};function Wt(e){return e==null?``:(e+``).replace(Ht,function(e,t){return Ut[t]})}var Gt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Kt=[],qt=P.browser.firefox&&+P.browser.version.split(`.`)[0]<39;function Jt(e,t,n,r){return n||={},r?Yt(e,t,n):qt&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?Yt(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function Yt(e,t,n){if(P.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(Vt(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}if(Rt(Kt,e,r,i)){n.zrX=Kt[0],n.zrY=Kt[1];return}}n.zrX=n.zrY=0}function Xt(e){return e||window.event}function Zt(e,t,n){if(t=Xt(t),t.zrX!=null)return t;var r=t.type;if(r&&r.indexOf(`touch`)>=0){var i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&Jt(e,i,t,n)}else{Jt(e,t,t,n);var a=Qt(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&Gt.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function Qt(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function $t(e,t,n,r){e.addEventListener(t,n,r)}function en(e,t,n,r){e.removeEventListener(t,n,r)}var tn=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function nn(e){return e.which===2||e.which===3}var rn=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a<o;a++){var s=r[a],c=Jt(n,s,{});i.points.push([c.zrX,c.zrY]),i.touches.push(s)}this._track.push(i)}},e.prototype._recognize=function(e){for(var t in sn)if(sn.hasOwnProperty(t)){var n=sn[t](this._track,e);if(n)return n}},e}();function an(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}function on(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}var sn={pinch:function(e,t){var n=e.length;if(n){var r=(e[n-1]||{}).points,i=(e[n-2]||{}).points||r;if(i&&i.length>1&&r&&r.length>1){var a=an(r)/an(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=on(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}};function cn(){return[1,0,0,1,0,0]}function ln(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function un(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function dn(e,t,n){var r=t[0]*n[0]+t[2]*n[1],i=t[1]*n[0]+t[3]*n[1],a=t[0]*n[2]+t[2]*n[3],o=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],c=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=c,e}function fn(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function pn(e,t,n,r){r===void 0&&(r=[0,0]);var i=t[0],a=t[2],o=t[4],s=t[1],c=t[3],l=t[5],u=Math.sin(n),d=Math.cos(n);return e[0]=i*d+s*u,e[1]=-i*u+s*d,e[2]=a*d+c*u,e[3]=-a*u+d*c,e[4]=d*(o-r[0])+u*(l-r[1])+r[0],e[5]=d*(l-r[1])-u*(o-r[0])+r[1],e}function mn(e,t,n){var r=n[0],i=n[1];return e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i,e}function hn(e,t){var n=t[0],r=t[2],i=t[4],a=t[1],o=t[3],s=t[5],c=n*o-a*r;return c?(c=1/c,e[0]=o*c,e[1]=-a*c,e[2]=-r*c,e[3]=n*c,e[4]=(r*s-o*i)*c,e[5]=(a*i-n*s)*c,e):null}var Z=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var i=1-r;e.x=i*t.x+r*n.x,e.y=i*t.y+r*n.y},e}(),gn=Math.min,_n=Math.max,vn=new Z,yn=new Z,bn=new Z,xn=new Z,Sn=new Z,Cn=new Z,wn=function(){function e(e,t,n,r){n<0&&(e+=n,n=-n),r<0&&(t+=r,r=-r),this.x=e,this.y=t,this.width=n,this.height=r}return e.prototype.union=function(e){var t=gn(e.x,this.x),n=gn(e.y,this.y);this.width=isFinite(this.x)&&isFinite(this.width)?_n(e.x+e.width,this.x+this.width)-t:e.width,this.height=isFinite(this.y)&&isFinite(this.height)?_n(e.y+e.height,this.y+this.height)-n:e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){var t=this,n=e.width/t.width,r=e.height/t.height,i=cn();return fn(i,i,[-t.x,-t.y]),mn(i,i,[n,r]),fn(i,i,[e.x,e.y]),i},e.prototype.intersect=function(t,n){if(!t)return!1;t instanceof e||(t=e.create(t));var r=this,i=r.x,a=r.x+r.width,o=r.y,s=r.y+r.height,c=t.x,l=t.x+t.width,u=t.y,d=t.y+t.height,f=!(a<c||l<i||s<u||d<o);if(n){var p=1/0,m=0,h=Math.abs(a-c),g=Math.abs(l-i),_=Math.abs(s-u),v=Math.abs(d-o),y=Math.min(h,g),b=Math.min(_,v);a<c||l<i?y>m&&(m=y,h<g?Z.set(Cn,-h,0):Z.set(Cn,g,0)):y<p&&(p=y,h<g?Z.set(Sn,h,0):Z.set(Sn,-g,0)),s<u||d<o?b>m&&(m=b,_<v?Z.set(Cn,0,-_):Z.set(Cn,0,v)):y<p&&(p=y,_<v?Z.set(Sn,0,_):Z.set(Sn,0,-v))}return n&&Z.copy(n,f?Sn:Cn),f},e.prototype.contain=function(e,t){var n=this;return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},e.applyTransform=function(t,n,r){if(!r){t!==n&&e.copy(t,n);return}if(r[1]<1e-5&&r[1]>-1e-5&&r[2]<1e-5&&r[2]>-1e-5){var i=r[0],a=r[3],o=r[4],s=r[5];t.x=n.x*i+o,t.y=n.y*a+s,t.width=n.width*i,t.height=n.height*a,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}vn.x=bn.x=n.x,vn.y=xn.y=n.y,yn.x=xn.x=n.x+n.width,yn.y=bn.y=n.y+n.height,vn.transform(r),xn.transform(r),yn.transform(r),bn.transform(r),t.x=gn(vn.x,yn.x,bn.x,xn.x),t.y=gn(vn.y,yn.y,bn.y,xn.y);var c=_n(vn.x,yn.x,bn.x,xn.x),l=_n(vn.y,yn.y,bn.y,xn.y);t.width=c-t.x,t.height=l-t.y},e}(),Tn=`silent`;function En(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:Dn}}function Dn(){tn(this.event)}var On=function(e){N(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.handler=null,t}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(jt),kn=function(){function e(e,t){this.x=e,this.y=t}return e}(),An=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],jn=new wn(0,0,0,0),Mn=function(e){N(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new kn(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new On,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new At(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(V(An,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=Fn(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(i=this.findHover(i.x,i.y),a=i.target);var o=this._hovered=r?new kn(t,n):this.findHover(t,n),s=o.target,c=this.proxy;c.setCursor&&c.setCursor(s?s.cursor:`default`),a&&s!==a&&this.dispatchToElement(i,`mouseout`,e),this.dispatchToElement(o,`mousemove`,e),s&&s!==a&&this.dispatchToElement(o,`mouseover`,e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;t!==`only_globalout`&&this.dispatchToElement(this._hovered,`mouseout`,e),t!==`no_globalout`&&this.trigger(`globalout`,{type:`globalout`,event:e})},t.prototype.resize=function(){this._hovered=new kn(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){e||={};var r=e.target;if(!(r&&r.silent)){for(var i=`on`+t,a=En(t,e,n);r&&(r[i]&&(a.cancelBubble=!!r[i].call(r,a)),r.trigger(t,a),r=r.__hostTarget?r.__hostTarget:r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){typeof e[i]==`function`&&e[i].call(e,a),e.trigger&&e.trigger(t,a)}))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new kn(e,t);if(Pn(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new wn(e-s,t-s,o,o),l=r.length-1;l>=0;l--){var u=r[l];u!==n&&!u.ignore&&!u.ignoreCoarsePointer&&(!u.parent||!u.parent.ignoreCoarsePointer)&&(jn.copy(u.getBoundingRect()),u.transform&&jn.applyTransform(u.transform),jn.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m<s;m+=d)for(var h=0;h<p;h+=f)if(Pn(a,i,e+m*Math.cos(h),t+m*Math.sin(h),n),i.target)return i}}return i},t.prototype.processGesture=function(e,t){this._gestureMgr||=new rn;var n=this._gestureMgr;t===`start`&&n.clear();var r=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if(t===`end`&&n.clear(),r){var i=r.type;e.gestureEvent=i;var a=new kn;a.target=r.target,this.dispatchToElement(a,i,r.event)}},t}(jt);V([`click`,`mousedown`,`mouseup`,`mousewheel`,`dblclick`,`contextmenu`],function(e){Mn.prototype[e]=function(t){var n=t.zrX,r=t.zrY,i=Fn(this,n,r),a,o;if((e!==`mouseup`||!i)&&(a=this.findHover(n,r),o=a.target),e===`mousedown`)this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if(e===`mouseup`)this._upEl=o;else if(e===`click`){if(this._downEl!==this._upEl||!this._downPoint||St(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function Nn(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0),r=r.__hostTarget||r.parent}return!i||Tn}return!1}function Pn(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=Nn(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==Tn)){t.target=o;break}}}function Fn(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var In=32,Ln=7;function Rn(e){for(var t=0;e>=In;)t|=e&1,e>>=1;return e+t}function zn(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i<n&&r(e[i],e[i-1])<0;)i++;Bn(e,t,i)}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function Bn(e,t,n){for(n--;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}function Vn(e,t,n,r,i){for(r===t&&r++;r<n;r++){for(var a=e[r],o=t,s=r,c;o<s;)c=o+s>>>1,i(a,e[c])<0?s=c:o=c+1;var l=r-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=a}}function Hn(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c<s&&a(e,t[n+i+c])>0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;c<s&&a(e,t[n+i-c])<=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function Un(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;c<s&&a(e,t[n+i-c])<0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c<s&&a(e,t[n+i+c])>=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function Wn(e,t){var n=Ln,r,i,a=0,o=[];r=[],i=[];function s(e,t){r[a]=e,i[a]=t,a+=1}function c(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]<i[e+1]&&e--;else if(i[e]>i[e+1])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]<i[e+1]&&e--,u(e)}}function u(n){var o=r[n],s=i[n],c=r[n+1],l=i[n+1];i[n]=s+l,n===a-3&&(r[n+1]=r[n+2],i[n+1]=i[n+2]),a--;var u=Un(e[c],e,o,s,0,t);o+=u,s-=u,s!==0&&(l=Hn(e[o+s-1],e,c,l,l-1,t),l!==0&&(s<=l?d(o,s,c,l):f(o,s,c,l)))}function d(r,i,a,s){var c=0;for(c=0;c<i;c++)o[c]=e[r+c];var l=0,u=a,d=r;if(e[d++]=e[u++],--s===0){for(c=0;c<i;c++)e[d+c]=o[l+c];return}if(i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l];return}for(var f=n,p,m,h;;){p=0,m=0,h=!1;do if(t(e[u],o[l])<0){if(e[d++]=e[u++],m++,p=0,--s===0){h=!0;break}}else if(e[d++]=o[l++],p++,m=0,--i===1){h=!0;break}while((p|m)<f);if(h)break;do{if(p=Un(e[u],o,l,i,0,t),p!==0){for(c=0;c<p;c++)e[d+c]=o[l+c];if(d+=p,l+=p,i-=p,i<=1){h=!0;break}}if(e[d++]=e[u++],--s===0){h=!0;break}if(m=Hn(o[l],e,u,s,0,t),m!==0){for(c=0;c<m;c++)e[d+c]=e[u+c];if(d+=m,u+=m,s-=m,s===0){h=!0;break}}if(e[d++]=o[l++],--i===1){h=!0;break}f--}while(p>=Ln||m>=Ln);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l]}else if(i===0)throw Error();else for(c=0;c<i;c++)e[d+c]=o[l+c]}function f(r,i,a,s){var c=0;for(c=0;c<s;c++)o[c]=e[a+c];var l=r+i-1,u=s-1,d=a+s-1,f=0,p=0;if(e[d--]=e[l--],--i===0){for(f=d-(s-1),c=0;c<s;c++)e[f+c]=o[c];return}if(s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u];return}for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)<m);if(_)break;do{if(h=i-Un(o[u],e,r,i,i-1,t),h!==0){for(d-=h,l-=h,i-=h,p=d+1,f=l+1,c=h-1;c>=0;c--)e[p+c]=e[f+c];if(i===0){_=!0;break}}if(e[d--]=o[u--],--s===1){_=!0;break}if(g=s-Hn(e[l],o,0,s,s-1,t),g!==0){for(d-=g,u-=g,s-=g,p=d+1,f=u+1,c=0;c<g;c++)e[p+c]=o[f+c];if(s<=1){_=!0;break}}if(e[d--]=e[l--],--i===0){_=!0;break}m--}while(h>=Ln||g>=Ln);if(_)break;m<0&&(m=0),m+=2}if(n=m,n<1&&(n=1),s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else if(s===0)throw Error();else for(f=d-(s-1),c=0;c<s;c++)e[f+c]=o[c]}return{mergeRuns:c,forceMergeRuns:l,pushRun:s}}function Gn(e,t,n,r){n||=0,r||=e.length;var i=r-n;if(!(i<2)){var a=0;if(i<In){a=zn(e,n,r,t),Vn(e,n,r,n+a,t);return}var o=Wn(e,t),s=Rn(i);do{if(a=zn(e,n,r,t),a<s){var c=i;c>s&&(c=s),Vn(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}var Kn=!1;function qn(){Kn||(Kn=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function Jn(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Yn=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Jn}return e.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},e.prototype.getDisplayList=function(e,t){t||=!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(t),n},e.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,r=0,i=t.length;r<i;r++)this._updateAndAddDisplayable(t[r],null,e);n.length=this._displayListLen,Gn(n,Jn)},e.prototype._updateAndAddDisplayable=function(e,t,n){if(!(e.ignore&&!n)){e.beforeUpdate(),e.update(),e.afterUpdate();var r=e.getClipPath();if(e.ignoreClip)t=null;else if(r){t=t?t.slice():[];for(var i=r,a=e;i;)i.parent=a,i.updateTransform(),t.push(i),a=i,i=i.getClipPath()}if(e.childrenRef){for(var o=e.childrenRef(),s=0;s<o.length;s++){var c=o[s];e.__dirty&&(c.__dirty|=1),this._updateAndAddDisplayable(c,t,n)}e.__dirty=0}else{var l=e;t&&t.length?l.__clipPaths=t:l.__clipPaths&&l.__clipPaths.length>0&&(l.__clipPaths=[]),isNaN(l.z)&&(qn(),l.z=0),isNaN(l.z2)&&(qn(),l.z2=0),isNaN(l.zlevel)&&(qn(),l.zlevel=0),this._displayList[this._displayListLen++]=l}var u=e.getDecalElement&&e.getDecalElement();u&&this._updateAndAddDisplayable(u,t,n);var d=e.getTextGuideLine();d&&this._updateAndAddDisplayable(d,t,n);var f=e.getTextContent();f&&this._updateAndAddDisplayable(f,t,n)}},e.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},e.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);return}var r=B(this._roots,e);r>=0&&this._roots.splice(r,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),Xn=P.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)},Zn={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:1024**(e-1)},exponentialOut:function(e){return e===1?1:1-2**(-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*2**(-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)):n*2**(-10*--e)*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-Zn.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?Zn.bounceIn(e*2)*.5:Zn.bounceOut(e*2-1)*.5+.5}},Qn=Math.pow,$n=Math.sqrt,er=1e-8,tr=1e-4,nr=$n(3),rr=1/3,ir=pt(),ar=pt(),or=pt();function sr(e){return e>-er&&e<er}function cr(e){return e>er||e<-er}function lr(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function ur(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function dr(e,t,n,r,i,a){var o=r+3*(t-n)-e,s=3*(n-t*2+e),c=3*(t-e),l=e-i,u=s*s-3*o*c,d=s*c-9*o*l,f=c*c-3*s*l,p=0;if(sr(u)&&sr(d)){if(sr(s))a[0]=0;else{var m=-c/s;m>=0&&m<=1&&(a[p++]=m)}}else{var h=d*d-4*u*f;if(sr(h)){var g=d/u,m=-s/o+g,_=-g/2;m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_)}else if(h>0){var v=$n(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-Qn(-y,rr):Qn(y,rr),b=b<0?-Qn(-b,rr):Qn(b,rr);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*$n(u*u*u)),S=Math.acos(x)/3,C=$n(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+nr*Math.sin(S)))/(3*o),T=(-s+C*(w-nr*Math.sin(S)))/(3*o);m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_),T>=0&&T<=1&&(a[p++]=T)}}return p}function fr(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,c=0;if(sr(o)){if(cr(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(sr(u))i[0]=-a/(2*o);else if(u>0){var d=$n(u),l=(-a+d)/(2*o),f=(-a-d)/(2*o);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function pr(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,c=(r-n)*i+n,l=(s-o)*i+o,u=(c-s)*i+s,d=(u-l)*i+l;a[0]=e,a[1]=o,a[2]=l,a[3]=d,a[4]=d,a[5]=u,a[6]=c,a[7]=r}function mr(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;ir[0]=c,ir[1]=l;for(var v=0;v<1;v+=.05)ar[0]=lr(e,n,i,o,v),ar[1]=lr(t,r,a,s,v),g=wt(ir,ar),g<p&&(d=v,p=g);p=1/0;for(var y=0;y<32&&!(f<tr);y++)m=d-f,h=d+f,ar[0]=lr(e,n,i,o,m),ar[1]=lr(t,r,a,s,m),g=wt(ar,ir),m>=0&&g<p?(d=m,p=g):(or[0]=lr(e,n,i,o,h),or[1]=lr(t,r,a,s,h),_=wt(or,ir),h<=1&&_<p?(d=h,p=_):f*=.5);return u&&(u[0]=lr(e,n,i,o,d),u[1]=lr(t,r,a,s,d)),$n(p)}function hr(e,t,n,r,i,a,o,s,c){for(var l=e,u=t,d=0,f=1/c,p=1;p<=c;p++){var m=p*f,h=lr(e,n,i,o,m),g=lr(t,r,a,s,m),_=h-l,v=g-u;d+=Math.sqrt(_*_+v*v),l=h,u=g}return d}function gr(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}function _r(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function vr(e,t,n,r,i){var a=e-2*t+n,o=2*(t-e),s=e-r,c=0;if(sr(a)){if(cr(o)){var l=-s/o;l>=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(sr(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=$n(u),l=(-o+d)/(2*a),f=(-o-d)/(2*a);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function yr(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function br(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n}function xr(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;ir[0]=o,ir[1]=s;for(var f=0;f<1;f+=.05){ar[0]=gr(e,n,i,f),ar[1]=gr(t,r,a,f);var p=wt(ir,ar);p<d&&(l=f,d=p)}d=1/0;for(var m=0;m<32&&!(u<tr);m++){var h=l-u,g=l+u;ar[0]=gr(e,n,i,h),ar[1]=gr(t,r,a,h);var p=wt(ar,ir);if(h>=0&&p<d)l=h,d=p;else{or[0]=gr(e,n,i,g),or[1]=gr(t,r,a,g);var _=wt(or,ir);g<=1&&_<d?(l=g,d=_):u*=.5}}return c&&(c[0]=gr(e,n,i,l),c[1]=gr(t,r,a,l)),$n(d)}function Sr(e,t,n,r,i,a,o){for(var s=e,c=t,l=0,u=1/o,d=1;d<=o;d++){var f=d*u,p=gr(e,n,i,f),m=gr(t,r,a,f),h=p-s,g=m-c;l+=Math.sqrt(h*h+g*g),s=p,c=m}return l}var Cr=/cubic-bezier\(([0-9,\.e ]+)\)/;function wr(e){var t=e&&Cr.exec(e);if(t){var n=t[1].split(`,`),r=+et(n[0]),i=+et(n[1]),a=+et(n[2]),o=+et(n[3]);if(isNaN(r+i+a+o))return;var s=[];return function(e){return e<=0?0:e>=1?1:dr(0,r,a,1,e,s)&&lr(0,i,o,1,s[0])}}}var Tr=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||dt,this.ondestroy=e.ondestroy||dt,this.onrestart=e.onrestart||dt,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||=(this._startTime=e+this._delay,!0),this._paused){this._pausedTime+=t;return}var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),i===1){if(this.loop){var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}else return!0}return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=G(e)?e:Zn[e]||wr(e)},e}(),Er=function(){function e(e){this.value=e}return e}(),Dr=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new Er(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),Or=function(){function e(e){this._list=new Dr,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(r[e]==null){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new Er(t),o.key=e,n.insertEntry(o),r[e]=o}return i},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),kr={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Ar(e){return e=Math.round(e),e<0?0:e>255?255:e}function jr(e){return e<0?0:e>1?1:e}function Mr(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Ar(parseFloat(t)/100*255):Ar(parseInt(t,10))}function Nr(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?jr(parseFloat(t)/100):jr(parseFloat(t))}function Pr(e,t,n){return n<0?n+=1:n>1&&--n,n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function Fr(e,t,n){return e+(t-e)*n}function Ir(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function Lr(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Rr=new Or(20),zr=null;function Br(e,t){zr&&Lr(zr,t),zr=Rr.put(e,zr||t.slice())}function Vr(e,t){if(e){t||=[];var n=Rr.get(e);if(n)return Lr(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in kr)return Lr(t,kr[r]),Br(e,t),t;var i=r.length;if(r.charAt(0)===`#`){if(i===4||i===5){var a=parseInt(r.slice(1,4),16);if(!(a>=0&&a<=4095)){Ir(t,0,0,0,1);return}return Ir(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),Br(e,t),t}if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){Ir(t,0,0,0,1);return}return Ir(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),Br(e,t),t}return}var o=r.indexOf(`(`),s=r.indexOf(`)`);if(o!==-1&&s+1===i){var c=r.substr(0,o),l=r.substr(o+1,s-(o+1)).split(`,`),u=1;switch(c){case`rgba`:if(l.length!==4)return l.length===3?Ir(t,+l[0],+l[1],+l[2],1):Ir(t,0,0,0,1);u=Nr(l.pop());case`rgb`:if(l.length>=3)return Ir(t,Mr(l[0]),Mr(l[1]),Mr(l[2]),l.length===3?u:Nr(l[3])),Br(e,t),t;Ir(t,0,0,0,1);return;case`hsla`:if(l.length!==4){Ir(t,0,0,0,1);return}return l[3]=Nr(l[3]),Hr(l,t),Br(e,t),t;case`hsl`:if(l.length!==3){Ir(t,0,0,0,1);return}return Hr(l,t),Br(e,t),t;default:return}}Ir(t,0,0,0,1)}}function Hr(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=Nr(e[1]),i=Nr(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],Ir(t,Ar(Pr(o,a,n+1/3)*255),Ar(Pr(o,a,n)*255),Ar(Pr(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function Ur(e,t){var n=Vr(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return Gr(n,n.length===4?`rgba`:`rgb`)}}function Wr(e,t,n){if(!(!(t&&t.length)||!(e>=0&&e<=1))){var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=Vr(t[i]),s=Vr(t[a]),c=r-i,l=Gr([Ar(Fr(o[0],s[0],c)),Ar(Fr(o[1],s[1],c)),Ar(Fr(o[2],s[2],c)),jr(Fr(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}function Gr(e,t){if(!(!e||!e.length)){var n=e[0]+`,`+e[1]+`,`+e[2];return(t===`rgba`||t===`hsva`||t===`hsla`)&&(n+=`,`+e[3]),t+`(`+n+`)`}}function Kr(e,t){var n=Vr(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var qr=new Or(100);function Jr(e){if(K(e)){var t=qr.get(e);return t||(t=Ur(e,-.1),qr.put(e,t)),t}if(Ke(e)){var n=R({},e);return n.colorStops=H(e.colorStops,function(e){return{offset:e.offset,color:Ur(e.color,-.1)}}),n}return e}function Yr(e){return e.type===`linear`}function Xr(e){return e.type===`radial`}(function(){return P.hasGlobalWindow&&G(window.btoa)?function(e){return window.btoa(unescape(encodeURIComponent(e)))}:typeof Buffer<`u`?function(e){return Buffer.from(e).toString(`base64`)}:function(e){return null}})();var Zr=Array.prototype.slice;function Qr(e,t,n){return(t-e)*n+e}function $r(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=Qr(t[a],n[a],r);return e}function ei(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=Qr(t[o][s],n[o][s],r)}return e}function ti(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=t[a]+n[a]*r;return e}function ni(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=t[o][s]+n[o][s]*r}return e}function ri(e,t){for(var n=e.length,r=t.length,i=n>r?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(n,r);s++)i.push({offset:o.offset,color:o.color.slice()})}function ii(e,t,n){var r=e,i=t;if(!(!r.push||!i.push)){var a=r.length,o=i.length;if(a!==o){if(a>o)r.length=o;else for(var s=a;s<o;s++)r.push(n===1?i[s]:Zr.call(i[s]))}for(var c=r[0]&&r[0].length,s=0;s<r.length;s++)if(n===1)isNaN(r[s])&&(r[s]=i[s]);else for(var l=0;l<c;l++)isNaN(r[s][l])&&(r[s][l]=i[s][l])}}function ai(e){if(Fe(e)){var t=e.length;if(Fe(e[0])){for(var n=[],r=0;r<t;r++)n.push(Zr.call(e[r]));return n}return Zr.call(e)}return e}function oi(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=e[3]==null?1:e[3],`rgba(`+e.join(`,`)+`)`}function si(e){return Fe(e&&e[0])?2:1}var ci=0,li=1,ui=2,di=3,fi=4,pi=5,mi=6;function hi(e){return e===fi||e===pi}function gi(e){return e===li||e===ui}var _i=[0,0,0,0],vi=function(){function e(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,a=!1,o=mi,s=t;if(Fe(t)){var c=si(t);o=c,(c===1&&!He(t[0])||c===2&&!He(t[0][0]))&&(a=!0)}else if(He(t)&&!Je(t))o=ci;else if(K(t)){if(!isNaN(+t))o=ci;else{var l=Vr(t);l&&(s=l,o=di)}}else if(Ke(t)){var u=R({},s);u.colorStops=H(t.colorStops,function(e){return{offset:e.offset,color:Vr(e.color)}}),Yr(t)?o=fi:Xr(t)&&(o=pi),s=u}i===0?this.valType=o:(o!==this.valType||o===mi)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=G(n)?n:Zn[n]||wr(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,i=n.length,a=n[i-1],o=this.discrete,s=gi(r),c=hi(r),l=0;l<i;l++){var u=n[l],d=u.value,f=a.value;u.percent=u.time/e,o||(s&&l!==i-1?ii(d,f,r):c&&ri(d.colorStops,f.colorStops))}if(!o&&r!==pi&&t&&this.needsAnimate()&&t.needsAnimate()&&r===t.valType&&!t._finished){this._additiveTrack=t;for(var p=n[0].value,l=0;l<i;l++)r===ci?n[l].additiveValue=n[l].value-p:r===di?n[l].additiveValue=ti([],n[l].value,p,-1):gi(r)&&(n[l].additiveValue=r===li?ti([],n[l].value,p,-1):ni([],n[l].value,p,-1))}},e.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,r=n?`additiveValue`:`value`,i=this.valType,a=this.keyframes,o=a.length,s=this.propName,c=i===di,l,u=this._lastFr,d=Math.min,f,p;if(o===1)f=p=a[0];else{if(t<0)l=0;else if(t<this._lastFrP){for(l=d(u+1,o-1);l>=0&&!(a[l].percent<=t);l--);l=d(l,o-2)}else{for(l=u;l<o&&!(a[l].percent>t);l++);l=d(l-1,o-2)}p=a[l+1],f=a[l]}if(f&&p){this._lastFr=l,this._lastFrP=t;var m=p.percent-f.percent,h=m===0?1:d((t-f.percent)/m,1);p.easingFunc&&(h=p.easingFunc(h));var g=n?this._additiveValue:c?_i:e[s];if((gi(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(gi(i))i===li?$r(g,f[r],p[r],h):ei(g,f[r],p[r],h);else if(hi(i)){var _=f[r],v=p[r],y=i===fi;e[s]={type:y?`linear`:`radial`,x:Qr(_.x,v.x,h),y:Qr(_.y,v.y,h),colorStops:H(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:Qr(e.offset,n.offset,h),color:oi($r([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=Qr(_.x2,v.x2,h),e[s].y2=Qr(_.y2,v.y2,h)):e[s].r=Qr(_.r,v.r,h)}else if(c)$r(g,f[r],p[r],h),n||(e[s]=oi(g));else{var b=Qr(f[r],p[r],h);n?this._additiveValue=b:e[s]=b}n&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;t===ci?e[n]=e[n]+r:t===di?(Vr(e[n],_i),ti(_i,_i,r,1),e[n]=oi(_i)):t===li?ti(e[n],e[n],r,1):t===ui&&ni(e[n],e[n],r,1)},e}(),yi=function(){function e(e,t,n,r){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r){Me(`Can' use additive animation on looped animation.`);return}this._additiveAnimators=r,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,Re(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,a=0;a<n.length;a++){var o=n[a],s=i[o];if(!s){s=i[o]=new vi(o);var c=void 0,l=this._getAdditiveTrack(o);if(l){var u=l.keyframes,d=u[u.length-1];c=d&&d.value,l.valType===di&&c&&(c=oi(c))}else c=this._target[o];if(c==null)continue;e>0&&s.addKeyframe(0,ai(c),r),this._trackKeys.push(o)}s.addKeyframe(e,ai(t[o]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},e.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var n=0;n<t.length;n++)t[n].call(this)},e.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},e.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var r=0;r<n.length;r++){var i=n[r].getTrack(e);i&&(t=i)}return t},e.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var a=this._trackKeys[i],o=this._tracks[a],s=this._getAdditiveTrack(a),c=o.keyframes,l=c.length;if(o.prepare(r,s),o.needsAnimate()){if(!this._allowDiscrete&&o.discrete){var u=c[l-1];u&&(t._target[o.propName]=u.rawValue),o.setFinished()}else n.push(o)}}if(n.length||this._force){var d=new Tr({life:r,loop:this._loop,delay:this._delay||0,onframe:function(e){t._started=2;var r=t._additiveAnimators;if(r){for(var i=!1,a=0;a<r.length;a++)if(r[a]._clip){i=!0;break}i||(t._additiveAnimators=null)}for(var a=0;a<n.length;a++)n[a].step(t._target,e);var o=t._onframeCbs;if(o)for(var a=0;a<o.length;a++)o[a](t._target,e)},ondestroy:function(){t._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},e.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},e.prototype.delay=function(e){return this._delay=e,this},e.prototype.during=function(e){return e&&(this._onframeCbs||=[],this._onframeCbs.push(e)),this},e.prototype.done=function(e){return e&&(this._doneCbs||=[],this._doneCbs.push(e)),this},e.prototype.aborted=function(e){return e&&(this._abortedCbs||=[],this._abortedCbs.push(e)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(e){return this._tracks[e]},e.prototype.getTracks=function(){var e=this;return H(this._trackKeys,function(t){return e._tracks[t]})},e.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,r=this._trackKeys,i=0;i<e.length;i++){var a=n[e[i]];a&&!a.isFinished()&&(t?a.step(this._target,1):this._started===1&&a.step(this._target,0),a.setFinished())}for(var o=!0,i=0;i<r.length;i++)if(!n[r[i]].isFinished()){o=!1;break}return o&&this._abortedCallback(),o},e.prototype.saveTo=function(e,t,n){if(e){t||=this._trackKeys;for(var r=0;r<t.length;r++){var i=t[r],a=this._tracks[i];if(!(!a||a.isFinished())){var o=a.keyframes,s=o[n?0:o.length-1];s&&(e[i]=ai(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t||=Re(e);for(var n=0;n<t.length;n++){var r=t[n],i=this._tracks[r];if(i){var a=i.keyframes;if(a.length>1){var o=a.pop();i.addKeyframe(o.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}();function bi(){return new Date().getTime()}var xi=function(e){N(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=bi()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&(Xn(t),!e._paused&&e.update())}Xn(t)},t.prototype.start=function(){this._running||(this._time=bi(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=bi(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=bi()-this._pauseStart,!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new yi(e,t.loop);return this.addAnimator(n),n},t}(jt),Si=300,Ci=P.domSupported,wi=(function(){var e=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],t=[`touchstart`,`touchend`,`touchmove`],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:t,pointer:H(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),Ti={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},Ei=!1;function Di(e){var t=e.pointerType;return t===`pen`||t===`touch`}function Oi(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function ki(e){e&&(e.zrByTouch=!0)}function Ai(e,t){return Zt(e.dom,new Mi(e,t),!0)}function ji(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var Mi=function(){function e(e,t){this.stopPropagation=dt,this.stopImmediatePropagation=dt,this.preventDefault=dt,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),Ni={mousedown:function(e){e=Zt(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=Zt(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup:function(e){e=Zt(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=Zt(this.dom,e);var t=e.toElement||e.relatedTarget;ji(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){Ei=!0,e=Zt(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){Ei||(e=Zt(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=Zt(this.dom,e),ki(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),Ni.mousemove.call(this,e),Ni.mousedown.call(this,e)},touchmove:function(e){e=Zt(this.dom,e),ki(e),this.handler.processGesture(e,`change`),Ni.mousemove.call(this,e)},touchend:function(e){e=Zt(this.dom,e),ki(e),this.handler.processGesture(e,`end`),Ni.mouseup.call(this,e),new Date-+this.__lastTouchMoment<Si&&Ni.click.call(this,e)},pointerdown:function(e){Ni.mousedown.call(this,e)},pointermove:function(e){Di(e)||Ni.mousemove.call(this,e)},pointerup:function(e){Ni.mouseup.call(this,e)},pointerout:function(e){Di(e)||Ni.mouseout.call(this,e)}};V([`click`,`dblclick`,`contextmenu`],function(e){Ni[e]=function(t){t=Zt(this.dom,t),this.trigger(e,t)}});var Pi={pointermove:function(e){Di(e)||Pi.mousemove.call(this,e)},pointerup:function(e){Pi.mouseup.call(this,e)},mousemove:function(e){this.trigger(`mousemove`,e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger(`mouseup`,e),t&&(e.zrEventControl=`only_globalout`,this.trigger(`mouseout`,e))}};function Fi(e,t){var n=t.domHandlers;P.pointerEventsSupported?V(wi.pointer,function(r){Li(t,r,function(t){n[r].call(e,t)})}):(P.touchEventsSupported&&V(wi.touch,function(r){Li(t,r,function(i){n[r].call(e,i),Oi(t)})}),V(wi.mouse,function(r){Li(t,r,function(i){i=Xt(i),t.touching||n[r].call(e,i)})}))}function Ii(e,t){P.pointerEventsSupported?V(Ti.pointer,n):P.touchEventsSupported||V(Ti.mouse,n);function n(n){function r(r){r=Xt(r),ji(e,r.target)||(r=Ai(e,r),t.domHandlers[n].call(e,r))}Li(t,n,r,{capture:!0})}}function Li(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,$t(e.domTarget,t,n,r)}function Ri(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&en(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var zi=function(){function e(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return e}(),Bi=function(e){N(t,e);function t(t,n){var r=e.call(this)||this;return r.__pointerCapturing=!1,r.dom=t,r.painterRoot=n,r._localHandlerScope=new zi(t,Ni),Ci&&(r._globalHandlerScope=new zi(document,Pi)),Fi(r,r._localHandlerScope),r}return t.prototype.dispose=function(){Ri(this._localHandlerScope),Ci&&Ri(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||`default`)},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,Ci&&this.__pointerCapturing^+e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?Ii(this,t):Ri(t)}},t}(jt),Vi=1;P.hasGlobalWindow&&(Vi=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Hi=Vi,Ui=.4,Wi=`#333`,Gi=`#ccc`,Ki=`#eee`,qi=ln,Ji=5e-5;function Yi(e){return e>Ji||e<-Ji}var Xi=[],Zi=[],Qi=cn(),$i=Math.abs,ea=function(){function e(){}return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(this,t)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return Yi(this.rotation)||Yi(this.x)||Yi(this.y)||Yi(this.scaleX-1)||Yi(this.scaleY-1)||Yi(this.skewX)||Yi(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(qi(n),this.invTransform=null);return}n||=cn(),t?this.getLocalTransform(n):qi(n),e&&(t?dn(n,e,n):un(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Xi);var n=Xi[0]<0?-1:1,r=Xi[1]<0?-1:1,i=((Xi[0]-n)*t+n)/Xi[0]||0,a=((Xi[1]-r)*t+r)/Xi[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}this.invTransform=this.invTransform||cn(),hn(this.invTransform,e)},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||cn(),dn(Zi,e.invTransform,t),t=Zi);var n=this.originX,r=this.originY;(n||r)&&(Qi[4]=n,Qi[5]=r,dn(Zi,t,Qi),Zi[4]-=n,Zi[5]-=r,t=Zi),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e||=[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&Et(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&Et(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&$i(e[0]-1)>1e-10&&$i(e[3]-1)>1e-10?Math.sqrt($i(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){na(this,e)},e.getLocalTransform=function(e,t){t||=[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,a=e.scaleY,o=e.anchorX,s=e.anchorY,c=e.rotation||0,l=e.x,u=e.y,d=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(n||r||o||s){var p=n+o,m=r+s;t[4]=-p*i-d*m*a,t[5]=-m*a-f*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=a,t[1]=f*i,t[2]=d*a,c&&pn(t,t,c),t[4]+=n+l,t[5]+=r+u,t},e.initDefaultProps=(function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),e}(),ta=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function na(e,t){for(var n=0;n<ta.length;n++){var r=ta[n];e[r]=t[r]}}var ra={};function ia(e,t){t||=`12px sans-serif`;var n=ra[t];n||=ra[t]=new Or(500);var r=n.get(e);return r??(r=ve.measureText(e,t).width,n.put(e,r)),r}function aa(e,t,n,r){var i=ia(e,t),a=la(t);return new wn(sa(0,i,n),ca(0,a,r),i,a)}function oa(e,t,n,r){var i=((e||``)+``).split(`
1
+ import{St as e}from"./BU83-NnX.js";import{$ as t,A as n,C as r,D as i,Ht as a,P as o,R as s,S as c,T as l,Ut as u,V as d,Vt as f,W as p,b as m,ct as h,d as g,et as _,f as v,h as y,ht as b,i as x,j as S,m as C,p as w,pt as T,tt as E,vt as D,xt as O,y as k}from"./CSkxz2NX.js";import{d as A}from"./BJHKLJJU.js";import{n as j}from"./DtYHUi5Z.js";import{n as ee,t as M}from"./xh3_vYcu.js";import{t as te}from"./BHA40aHa.js";import{n as ne}from"./KZQX7xoM.js";import{t as re}from"./D9Oidm5I.js";import{t as ie}from"./BDNMzG2s2.js";import{t as ae}from"./BN6iuJEg2.js";import{t as oe}from"./DTFCy6h-.js";import{t as se}from"./D98NH8kG.js";import{t as ce}from"./ca4TJ3Op.js";import{t as le}from"./zq5t1vyX.js";var ue=function(e,t){return ue=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},ue(e,t)};function N(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);ue(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var de=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),P=new(function(){function e(){this.browser=new de,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<`u`}return e}());typeof wx==`object`&&typeof wx.getSystemInfoSync==`function`?(P.wxa=!0,P.touchEventsSupported=!0):typeof document>`u`&&typeof self<`u`?P.worker=!0:!P.hasGlobalWindow||`Deno`in window?(P.node=!0,P.svgSupported=!0):F(navigator.userAgent,P);function F(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);r&&(n.firefox=!0,n.version=r[1]),i&&(n.ie=!0,n.version=i[1]),a&&(n.edge=!0,n.version=a[1],n.newEdge=+a[1].split(`.`)[0]>18),o&&(n.weChat=!0),t.svgSupported=typeof SVGRect<`u`,t.touchEventsSupported=`ontouchstart`in window&&!n.ie&&!n.edge,t.pointerEventsSupported=`onpointerdown`in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported=typeof document<`u`;var s=document.documentElement.style;t.transform3dSupported=(n.ie&&`transition`in s||n.edge||`WebKitCSSMatrix`in window&&`m11`in new WebKitCSSMatrix||`MozPerspective`in s)&&!(`OTransition`in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}var fe=`12px sans-serif`,pe=20,me=100,he=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function ge(e){var t={};if(typeof JSON>`u`)return t;for(var n=0;n<e.length;n++){var r=String.fromCharCode(n+32);t[r]=(e.charCodeAt(n)-pe)/me}return t}var _e=ge(he),ve={createCanvas:function(){return typeof document<`u`&&document.createElement(`canvas`)},measureText:(function(){var e,t;return function(n,r){if(!e){var i=ve.createCanvas();e=i&&i.getContext(`2d`)}if(e)return t!==r&&(t=e.font=r||`12px sans-serif`),e.measureText(n);n||=``,r||=`12px sans-serif`;var a=/((?:\d+)?\.?\d*)px/.exec(r),o=a&&+a[1]||12,s=0;if(r.indexOf(`mono`)>=0)s=o*n.length;else for(var c=0;c<n.length;c++){var l=_e[n[c]];s+=l==null?o:l*o}return{width:s}}})(),loadImage:function(e,t,n){var r=new Image;return r.onload=t,r.onerror=n,r.src=e,r}},ye=Ie([`Function`,`RegExp`,`Date`,`Error`,`CanvasGradient`,`CanvasPattern`,`Image`,`Canvas`],function(e,t){return e[`[object `+t+`]`]=!0,e},{}),be=Ie([`Int8`,`Uint8`,`Uint8Clamped`,`Int16`,`Uint16`,`Int32`,`Uint32`,`Float32`,`Float64`],function(e,t){return e[`[object `+t+`Array]`]=!0,e},{}),xe=Object.prototype.toString,Se=Array.prototype,Ce=Se.forEach,we=Se.filter,Te=Se.slice,Ee=Se.map,De=function(){}.constructor,Oe=De?De.prototype:null,ke=`__proto__`,Ae=2311;function je(){return Ae++}function Me(){var e=[...arguments];typeof console<`u`&&console.error.apply(console,e)}function I(e){if(typeof e!=`object`||!e)return e;var t=e,n=xe.call(e);if(n===`[object Array]`){if(!rt(e)){t=[];for(var r=0,i=e.length;r<i;r++)t[r]=I(e[r])}}else if(be[n]){if(!rt(e)){var a=e.constructor;if(a.from)t=a.from(e);else{t=new a(e.length);for(var r=0,i=e.length;r<i;r++)t[r]=e[r]}}}else if(!ye[n]&&!rt(e)&&!Ge(e))for(var o in t={},e)e.hasOwnProperty(o)&&o!==ke&&(t[o]=I(e[o]));return t}function L(e,t,n){if(!q(t)||!q(e))return n?I(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==ke){var i=e[r],a=t[r];q(a)&&q(i)&&!W(a)&&!W(i)&&!Ge(a)&&!Ge(i)&&!Ue(a)&&!Ue(i)&&!rt(a)&&!rt(i)?L(i,a,n):(n||!(r in e))&&(e[r]=I(t[r]))}return e}function R(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==ke&&(e[n]=t[n]);return e}function z(e,t,n){for(var r=Re(t),i=0,a=r.length;i<a;i++){var o=r[i];(n?t[o]!=null:e[o]==null)&&(e[o]=t[o])}return e}ve.createCanvas;function B(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n}return-1}function Ne(e,t){var n=e.prototype;function r(){}for(var i in r.prototype=t.prototype,e.prototype=new r,n)n.hasOwnProperty(i)&&(e.prototype[i]=n[i]);e.prototype.constructor=e,e.superClass=t}function Pe(e,t,n){if(e=`prototype`in e?e.prototype:e,t=`prototype`in t?t.prototype:t,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(t),i=0;i<r.length;i++){var a=r[i];a!==`constructor`&&(n?t[a]!=null:e[a]==null)&&(e[a]=t[a])}else z(e,t,n)}function Fe(e){return!e||typeof e==`string`?!1:typeof e.length==`number`}function V(e,t,n){if(e&&t){if(e.forEach&&e.forEach===Ce)e.forEach(t,n);else if(e.length===+e.length)for(var r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e);else for(var a in e)e.hasOwnProperty(a)&&t.call(n,e[a],a,e)}}function H(e,t,n){if(!e)return[];if(!t)return Ze(e);if(e.map&&e.map===Ee)return e.map(t,n);for(var r=[],i=0,a=e.length;i<a;i++)r.push(t.call(n,e[i],i,e));return r}function Ie(e,t,n,r){if(e&&t){for(var i=0,a=e.length;i<a;i++)n=t.call(r,n,e[i],i,e);return n}}function Le(e,t,n){if(!e)return[];if(!t)return Ze(e);if(e.filter&&e.filter===we)return e.filter(t,n);for(var r=[],i=0,a=e.length;i<a;i++)t.call(n,e[i],i,e)&&r.push(e[i]);return r}function Re(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}function ze(e,t){var n=[...arguments].slice(2);return function(){return e.apply(t,n.concat(Te.call(arguments)))}}var U=Oe&&G(Oe.bind)?Oe.call.bind(Oe.bind):ze;function Be(e){var t=[...arguments].slice(1);return function(){return e.apply(this,t.concat(Te.call(arguments)))}}function W(e){return Array.isArray?Array.isArray(e):xe.call(e)===`[object Array]`}function G(e){return typeof e==`function`}function K(e){return typeof e==`string`}function Ve(e){return xe.call(e)===`[object String]`}function He(e){return typeof e==`number`}function q(e){var t=typeof e;return t===`function`||!!e&&t===`object`}function Ue(e){return!!ye[xe.call(e)]}function We(e){return!!be[xe.call(e)]}function Ge(e){return typeof e==`object`&&typeof e.nodeType==`number`&&typeof e.ownerDocument==`object`}function Ke(e){return e.colorStops!=null}function qe(e){return e.image!=null}function Je(e){return e!==e}function Ye(){for(var e=[...arguments],t=0,n=e.length;t<n;t++)if(e[t]!=null)return e[t]}function J(e,t){return e??t}function Xe(e,t,n){return e??t??n}function Ze(e){var t=[...arguments].slice(1);return Te.apply(e,t)}function Qe(e){if(typeof e==`number`)return[e,e,e,e];var t=e.length;return t===2?[e[0],e[1],e[0],e[1]]:t===3?[e[0],e[1],e[2],e[1]]:e}function $e(e,t){if(!e)throw Error(t)}function et(e){return e==null?null:typeof e.trim==`function`?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``)}var tt=`__ec_primitive__`;function nt(e){e[tt]=!0}function rt(e){return e[tt]}var it=function(){function e(){this.data={}}return e.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},e.prototype.has=function(e){return this.data.hasOwnProperty(e)},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){return this.data[e]=t,this},e.prototype.keys=function(){return Re(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),at=typeof Map==`function`;function ot(){return at?new Map:new it}var st=function(){function e(t){var n=W(t);this.data=ot();var r=this;t instanceof e?t.each(i):t&&V(t,i);function i(e,t){n?r.set(e,t):r.set(t,e)}}return e.prototype.hasKey=function(e){return this.data.has(e)},e.prototype.get=function(e){return this.data.get(e)},e.prototype.set=function(e,t){return this.data.set(e,t),t},e.prototype.each=function(e,t){this.data.forEach(function(n,r){e.call(t,n,r)})},e.prototype.keys=function(){var e=this.data.keys();return at?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function Y(e){return new st(e)}function ct(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r<e.length;r++)n[r]=e[r];for(var i=e.length,r=0;r<t.length;r++)n[r+i]=t[r];return n}function lt(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&R(n,t),n}function ut(e){var t=e.style;t.webkitUserSelect=`none`,t.userSelect=`none`,t.webkitTapHighlightColor=`rgba(0,0,0,0)`,t[`-webkit-touch-callout`]=`none`}function X(e,t){return e.hasOwnProperty(t)}function dt(){}var ft=180/Math.PI;function pt(e,t){return e??=0,t??=0,[e,t]}function mt(e){return[e[0],e[1]]}function ht(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function gt(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function _t(e){return Math.sqrt(vt(e))}function vt(e){return e[0]*e[0]+e[1]*e[1]}function yt(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function bt(e,t){var n=_t(t);return n===0?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function xt(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var St=xt;function Ct(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var wt=Ct;function Tt(e,t,n,r){return e[0]=t[0]+r*(n[0]-t[0]),e[1]=t[1]+r*(n[1]-t[1]),e}function Et(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function Dt(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function Ot(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var kt=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),At=function(){function e(e){this.handler=e,e.on(`mousedown`,this._dragStart,this),e.on(`mousemove`,this._drag,this),e.on(`mouseup`,this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new kt(t,e),`dragstart`,e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,a=r-this._y;this._x=n,this._y=r,t.drift(i,a,e),this.handler.dispatchToElement(new kt(t,e),`drag`,e.event);var o=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.handler.dispatchToElement(new kt(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new kt(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new kt(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new kt(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),jt=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||={};var i=this._$handlers;if(typeof t==`function`&&(r=n,n=t,t=null),!n||!e)return this;var a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),i[e]||(i[e]=[]);for(var o=0;o<i[e].length;o++)if(i[e][o].h===n)return this;var s={h:n,query:t,ctx:r||this,callAtLast:n.zrEventfulCallAtLast},c=i[e].length-1,l=i[e][c];return l&&l.callAtLast?i[e].splice(c,0,s):i[e].push(s),this},e.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},e.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var r=[],i=0,a=n[e].length;i<a;i++)n[e][i].h!==t&&r.push(n[e][i]);n[e]=r}n[e]&&n[e].length===0&&delete n[e]}else delete n[e];return this},e.prototype.trigger=function(e){var t=[...arguments].slice(1);if(!this._$handlers)return this;var n=this._$handlers[e],r=this._$eventProcessor;if(n)for(var i=t.length,a=n.length,o=0;o<a;o++){var s=n[o];if(!(r&&r.filter&&s.query!=null&&!r.filter(e,s.query)))switch(i){case 0:s.h.call(s.ctx);break;case 1:s.h.call(s.ctx,t[0]);break;case 2:s.h.call(s.ctx,t[0],t[1]);break;default:s.h.apply(s.ctx,t)}}return r&&r.afterTrigger&&r.afterTrigger(e),this},e.prototype.triggerWithContext=function(e){var t=[...arguments].slice(1);if(!this._$handlers)return this;var n=this._$handlers[e],r=this._$eventProcessor;if(n)for(var i=t.length,a=t[i-1],o=n.length,s=0;s<o;s++){var c=n[s];if(!(r&&r.filter&&c.query!=null&&!r.filter(e,c.query)))switch(i){case 0:c.h.call(a);break;case 1:c.h.call(a,t[0]);break;case 2:c.h.call(a,t[0],t[1]);break;default:c.h.apply(a,t.slice(1,i-1))}}return r&&r.afterTrigger&&r.afterTrigger(e),this},e}(),Mt=Math.log(2);function Nt(e,t,n,r,i,a){var o=r+`-`+i,s=e.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var c=Math.round(Math.log((1<<s)-1&~i)/Mt);return e[n][c]}for(var l=r|1<<n,u=n+1;r&1<<u;)u++;for(var d=0,f=0,p=0;f<s;f++){var m=1<<f;m&i||(d+=(p%2?-1:1)*e[n][f]*Nt(e,t-1,u,l,i|m,a),p++)}return a[o]=d,d}function Pt(e,t){var n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],r={},i=Nt(n,8,0,0,0,r);if(i!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]??(a[s]=0),a[s]+=((o+s)%2?-1:1)*Nt(n,7,+(o===0),1<<o,1<<s,r)/i*t[o];return function(e,t,n){var r=t*a[6]+n*a[7]+1;e[0]=(t*a[0]+n*a[1]+a[2])/r,e[1]=(t*a[3]+n*a[4]+a[5])/r}}}var Ft=`___zrEVENTSAVED`,It=[];function Lt(e,t,n,r,i){return Rt(It,t,r,i,!0)&&Rt(e,n,It[0],It[1])}function Rt(e,t,n,r,i){if(t.getBoundingClientRect&&P.domSupported&&!Vt(t)){var a=t[Ft]||(t[Ft]={}),o=Bt(zt(t,a),a,i);if(o)return o(e,n,r),!0}return!1}function zt(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var r=[`left`,`right`],i=[`top`,`bottom`],a=0;a<4;a++){var o=document.createElement(`div`),s=o.style,c=a%2,l=(a>>1)%2;s.cssText=[`position: absolute`,`visibility: hidden`,`padding: 0`,`margin: 0`,`border-width: 0`,`user-select: none`,`width:0`,`height:0`,r[c]+`:0`,i[l]+`:0`,r[1-c]+`:auto`,i[1-l]+`:auto`,``].join(`!important;`),e.appendChild(o),n.push(o)}return n}function Bt(e,t,n){for(var r=n?`invTrans`:`trans`,i=t[r],a=t.srcCoords,o=[],s=[],c=!0,l=0;l<4;l++){var u=e[l].getBoundingClientRect(),d=2*l,f=u.left,p=u.top;o.push(f,p),c=c&&a&&f===a[d]&&p===a[d+1],s.push(e[l].offsetLeft,e[l].offsetTop)}return c&&i?i:(t.srcCoords=o,t[r]=n?Pt(s,o):Pt(o,s))}function Vt(e){return e.nodeName.toUpperCase()===`CANVAS`}var Ht=/([&<>"'])/g,Ut={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`};function Wt(e){return e==null?``:(e+``).replace(Ht,function(e,t){return Ut[t]})}var Gt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Kt=[],qt=P.browser.firefox&&+P.browser.version.split(`.`)[0]<39;function Jt(e,t,n,r){return n||={},r?Yt(e,t,n):qt&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?Yt(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function Yt(e,t,n){if(P.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(Vt(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}if(Rt(Kt,e,r,i)){n.zrX=Kt[0],n.zrY=Kt[1];return}}n.zrX=n.zrY=0}function Xt(e){return e||window.event}function Zt(e,t,n){if(t=Xt(t),t.zrX!=null)return t;var r=t.type;if(r&&r.indexOf(`touch`)>=0){var i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&Jt(e,i,t,n)}else{Jt(e,t,t,n);var a=Qt(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&Gt.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function Qt(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function $t(e,t,n,r){e.addEventListener(t,n,r)}function en(e,t,n,r){e.removeEventListener(t,n,r)}var tn=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function nn(e){return e.which===2||e.which===3}var rn=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a<o;a++){var s=r[a],c=Jt(n,s,{});i.points.push([c.zrX,c.zrY]),i.touches.push(s)}this._track.push(i)}},e.prototype._recognize=function(e){for(var t in sn)if(sn.hasOwnProperty(t)){var n=sn[t](this._track,e);if(n)return n}},e}();function an(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}function on(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}var sn={pinch:function(e,t){var n=e.length;if(n){var r=(e[n-1]||{}).points,i=(e[n-2]||{}).points||r;if(i&&i.length>1&&r&&r.length>1){var a=an(r)/an(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=on(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}};function cn(){return[1,0,0,1,0,0]}function ln(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function un(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function dn(e,t,n){var r=t[0]*n[0]+t[2]*n[1],i=t[1]*n[0]+t[3]*n[1],a=t[0]*n[2]+t[2]*n[3],o=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],c=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=c,e}function fn(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function pn(e,t,n,r){r===void 0&&(r=[0,0]);var i=t[0],a=t[2],o=t[4],s=t[1],c=t[3],l=t[5],u=Math.sin(n),d=Math.cos(n);return e[0]=i*d+s*u,e[1]=-i*u+s*d,e[2]=a*d+c*u,e[3]=-a*u+d*c,e[4]=d*(o-r[0])+u*(l-r[1])+r[0],e[5]=d*(l-r[1])-u*(o-r[0])+r[1],e}function mn(e,t,n){var r=n[0],i=n[1];return e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i,e}function hn(e,t){var n=t[0],r=t[2],i=t[4],a=t[1],o=t[3],s=t[5],c=n*o-a*r;return c?(c=1/c,e[0]=o*c,e[1]=-a*c,e[2]=-r*c,e[3]=n*c,e[4]=(r*s-o*i)*c,e[5]=(a*i-n*s)*c,e):null}var Z=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var i=1-r;e.x=i*t.x+r*n.x,e.y=i*t.y+r*n.y},e}(),gn=Math.min,_n=Math.max,vn=new Z,yn=new Z,bn=new Z,xn=new Z,Sn=new Z,Cn=new Z,wn=function(){function e(e,t,n,r){n<0&&(e+=n,n=-n),r<0&&(t+=r,r=-r),this.x=e,this.y=t,this.width=n,this.height=r}return e.prototype.union=function(e){var t=gn(e.x,this.x),n=gn(e.y,this.y);this.width=isFinite(this.x)&&isFinite(this.width)?_n(e.x+e.width,this.x+this.width)-t:e.width,this.height=isFinite(this.y)&&isFinite(this.height)?_n(e.y+e.height,this.y+this.height)-n:e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){var t=this,n=e.width/t.width,r=e.height/t.height,i=cn();return fn(i,i,[-t.x,-t.y]),mn(i,i,[n,r]),fn(i,i,[e.x,e.y]),i},e.prototype.intersect=function(t,n){if(!t)return!1;t instanceof e||(t=e.create(t));var r=this,i=r.x,a=r.x+r.width,o=r.y,s=r.y+r.height,c=t.x,l=t.x+t.width,u=t.y,d=t.y+t.height,f=!(a<c||l<i||s<u||d<o);if(n){var p=1/0,m=0,h=Math.abs(a-c),g=Math.abs(l-i),_=Math.abs(s-u),v=Math.abs(d-o),y=Math.min(h,g),b=Math.min(_,v);a<c||l<i?y>m&&(m=y,h<g?Z.set(Cn,-h,0):Z.set(Cn,g,0)):y<p&&(p=y,h<g?Z.set(Sn,h,0):Z.set(Sn,-g,0)),s<u||d<o?b>m&&(m=b,_<v?Z.set(Cn,0,-_):Z.set(Cn,0,v)):y<p&&(p=y,_<v?Z.set(Sn,0,_):Z.set(Sn,0,-v))}return n&&Z.copy(n,f?Sn:Cn),f},e.prototype.contain=function(e,t){var n=this;return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},e.applyTransform=function(t,n,r){if(!r){t!==n&&e.copy(t,n);return}if(r[1]<1e-5&&r[1]>-1e-5&&r[2]<1e-5&&r[2]>-1e-5){var i=r[0],a=r[3],o=r[4],s=r[5];t.x=n.x*i+o,t.y=n.y*a+s,t.width=n.width*i,t.height=n.height*a,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}vn.x=bn.x=n.x,vn.y=xn.y=n.y,yn.x=xn.x=n.x+n.width,yn.y=bn.y=n.y+n.height,vn.transform(r),xn.transform(r),yn.transform(r),bn.transform(r),t.x=gn(vn.x,yn.x,bn.x,xn.x),t.y=gn(vn.y,yn.y,bn.y,xn.y);var c=_n(vn.x,yn.x,bn.x,xn.x),l=_n(vn.y,yn.y,bn.y,xn.y);t.width=c-t.x,t.height=l-t.y},e}(),Tn=`silent`;function En(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:Dn}}function Dn(){tn(this.event)}var On=function(e){N(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.handler=null,t}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(jt),kn=function(){function e(e,t){this.x=e,this.y=t}return e}(),An=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],jn=new wn(0,0,0,0),Mn=function(e){N(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new kn(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new On,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new At(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(V(An,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=Fn(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(i=this.findHover(i.x,i.y),a=i.target);var o=this._hovered=r?new kn(t,n):this.findHover(t,n),s=o.target,c=this.proxy;c.setCursor&&c.setCursor(s?s.cursor:`default`),a&&s!==a&&this.dispatchToElement(i,`mouseout`,e),this.dispatchToElement(o,`mousemove`,e),s&&s!==a&&this.dispatchToElement(o,`mouseover`,e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;t!==`only_globalout`&&this.dispatchToElement(this._hovered,`mouseout`,e),t!==`no_globalout`&&this.trigger(`globalout`,{type:`globalout`,event:e})},t.prototype.resize=function(){this._hovered=new kn(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){e||={};var r=e.target;if(!(r&&r.silent)){for(var i=`on`+t,a=En(t,e,n);r&&(r[i]&&(a.cancelBubble=!!r[i].call(r,a)),r.trigger(t,a),r=r.__hostTarget?r.__hostTarget:r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){typeof e[i]==`function`&&e[i].call(e,a),e.trigger&&e.trigger(t,a)}))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new kn(e,t);if(Pn(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new wn(e-s,t-s,o,o),l=r.length-1;l>=0;l--){var u=r[l];u!==n&&!u.ignore&&!u.ignoreCoarsePointer&&(!u.parent||!u.parent.ignoreCoarsePointer)&&(jn.copy(u.getBoundingRect()),u.transform&&jn.applyTransform(u.transform),jn.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m<s;m+=d)for(var h=0;h<p;h+=f)if(Pn(a,i,e+m*Math.cos(h),t+m*Math.sin(h),n),i.target)return i}}return i},t.prototype.processGesture=function(e,t){this._gestureMgr||=new rn;var n=this._gestureMgr;t===`start`&&n.clear();var r=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if(t===`end`&&n.clear(),r){var i=r.type;e.gestureEvent=i;var a=new kn;a.target=r.target,this.dispatchToElement(a,i,r.event)}},t}(jt);V([`click`,`mousedown`,`mouseup`,`mousewheel`,`dblclick`,`contextmenu`],function(e){Mn.prototype[e]=function(t){var n=t.zrX,r=t.zrY,i=Fn(this,n,r),a,o;if((e!==`mouseup`||!i)&&(a=this.findHover(n,r),o=a.target),e===`mousedown`)this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if(e===`mouseup`)this._upEl=o;else if(e===`click`){if(this._downEl!==this._upEl||!this._downPoint||St(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function Nn(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0),r=r.__hostTarget||r.parent}return!i||Tn}return!1}function Pn(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=Nn(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==Tn)){t.target=o;break}}}function Fn(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var In=32,Ln=7;function Rn(e){for(var t=0;e>=In;)t|=e&1,e>>=1;return e+t}function zn(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i<n&&r(e[i],e[i-1])<0;)i++;Bn(e,t,i)}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function Bn(e,t,n){for(n--;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}function Vn(e,t,n,r,i){for(r===t&&r++;r<n;r++){for(var a=e[r],o=t,s=r,c;o<s;)c=o+s>>>1,i(a,e[c])<0?s=c:o=c+1;var l=r-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=a}}function Hn(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c<s&&a(e,t[n+i+c])>0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;c<s&&a(e,t[n+i-c])<=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function Un(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;c<s&&a(e,t[n+i-c])<0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c<s&&a(e,t[n+i+c])>=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function Wn(e,t){var n=Ln,r,i,a=0,o=[];r=[],i=[];function s(e,t){r[a]=e,i[a]=t,a+=1}function c(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]<i[e+1]&&e--;else if(i[e]>i[e+1])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]<i[e+1]&&e--,u(e)}}function u(n){var o=r[n],s=i[n],c=r[n+1],l=i[n+1];i[n]=s+l,n===a-3&&(r[n+1]=r[n+2],i[n+1]=i[n+2]),a--;var u=Un(e[c],e,o,s,0,t);o+=u,s-=u,s!==0&&(l=Hn(e[o+s-1],e,c,l,l-1,t),l!==0&&(s<=l?d(o,s,c,l):f(o,s,c,l)))}function d(r,i,a,s){var c=0;for(c=0;c<i;c++)o[c]=e[r+c];var l=0,u=a,d=r;if(e[d++]=e[u++],--s===0){for(c=0;c<i;c++)e[d+c]=o[l+c];return}if(i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l];return}for(var f=n,p,m,h;;){p=0,m=0,h=!1;do if(t(e[u],o[l])<0){if(e[d++]=e[u++],m++,p=0,--s===0){h=!0;break}}else if(e[d++]=o[l++],p++,m=0,--i===1){h=!0;break}while((p|m)<f);if(h)break;do{if(p=Un(e[u],o,l,i,0,t),p!==0){for(c=0;c<p;c++)e[d+c]=o[l+c];if(d+=p,l+=p,i-=p,i<=1){h=!0;break}}if(e[d++]=e[u++],--s===0){h=!0;break}if(m=Hn(o[l],e,u,s,0,t),m!==0){for(c=0;c<m;c++)e[d+c]=e[u+c];if(d+=m,u+=m,s-=m,s===0){h=!0;break}}if(e[d++]=o[l++],--i===1){h=!0;break}f--}while(p>=Ln||m>=Ln);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l]}else if(i===0)throw Error();else for(c=0;c<i;c++)e[d+c]=o[l+c]}function f(r,i,a,s){var c=0;for(c=0;c<s;c++)o[c]=e[a+c];var l=r+i-1,u=s-1,d=a+s-1,f=0,p=0;if(e[d--]=e[l--],--i===0){for(f=d-(s-1),c=0;c<s;c++)e[f+c]=o[c];return}if(s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u];return}for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)<m);if(_)break;do{if(h=i-Un(o[u],e,r,i,i-1,t),h!==0){for(d-=h,l-=h,i-=h,p=d+1,f=l+1,c=h-1;c>=0;c--)e[p+c]=e[f+c];if(i===0){_=!0;break}}if(e[d--]=o[u--],--s===1){_=!0;break}if(g=s-Hn(e[l],o,0,s,s-1,t),g!==0){for(d-=g,u-=g,s-=g,p=d+1,f=u+1,c=0;c<g;c++)e[p+c]=o[f+c];if(s<=1){_=!0;break}}if(e[d--]=e[l--],--i===0){_=!0;break}m--}while(h>=Ln||g>=Ln);if(_)break;m<0&&(m=0),m+=2}if(n=m,n<1&&(n=1),s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else if(s===0)throw Error();else for(f=d-(s-1),c=0;c<s;c++)e[f+c]=o[c]}return{mergeRuns:c,forceMergeRuns:l,pushRun:s}}function Gn(e,t,n,r){n||=0,r||=e.length;var i=r-n;if(!(i<2)){var a=0;if(i<In){a=zn(e,n,r,t),Vn(e,n,r,n+a,t);return}var o=Wn(e,t),s=Rn(i);do{if(a=zn(e,n,r,t),a<s){var c=i;c>s&&(c=s),Vn(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}var Kn=!1;function qn(){Kn||(Kn=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function Jn(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Yn=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Jn}return e.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},e.prototype.getDisplayList=function(e,t){t||=!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(t),n},e.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,r=0,i=t.length;r<i;r++)this._updateAndAddDisplayable(t[r],null,e);n.length=this._displayListLen,Gn(n,Jn)},e.prototype._updateAndAddDisplayable=function(e,t,n){if(!(e.ignore&&!n)){e.beforeUpdate(),e.update(),e.afterUpdate();var r=e.getClipPath();if(e.ignoreClip)t=null;else if(r){t=t?t.slice():[];for(var i=r,a=e;i;)i.parent=a,i.updateTransform(),t.push(i),a=i,i=i.getClipPath()}if(e.childrenRef){for(var o=e.childrenRef(),s=0;s<o.length;s++){var c=o[s];e.__dirty&&(c.__dirty|=1),this._updateAndAddDisplayable(c,t,n)}e.__dirty=0}else{var l=e;t&&t.length?l.__clipPaths=t:l.__clipPaths&&l.__clipPaths.length>0&&(l.__clipPaths=[]),isNaN(l.z)&&(qn(),l.z=0),isNaN(l.z2)&&(qn(),l.z2=0),isNaN(l.zlevel)&&(qn(),l.zlevel=0),this._displayList[this._displayListLen++]=l}var u=e.getDecalElement&&e.getDecalElement();u&&this._updateAndAddDisplayable(u,t,n);var d=e.getTextGuideLine();d&&this._updateAndAddDisplayable(d,t,n);var f=e.getTextContent();f&&this._updateAndAddDisplayable(f,t,n)}},e.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},e.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);return}var r=B(this._roots,e);r>=0&&this._roots.splice(r,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),Xn=P.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)},Zn={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:1024**(e-1)},exponentialOut:function(e){return e===1?1:1-2**(-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*2**(-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)):n*2**(-10*--e)*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-Zn.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?Zn.bounceIn(e*2)*.5:Zn.bounceOut(e*2-1)*.5+.5}},Qn=Math.pow,$n=Math.sqrt,er=1e-8,tr=1e-4,nr=$n(3),rr=1/3,ir=pt(),ar=pt(),or=pt();function sr(e){return e>-er&&e<er}function cr(e){return e>er||e<-er}function lr(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function ur(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function dr(e,t,n,r,i,a){var o=r+3*(t-n)-e,s=3*(n-t*2+e),c=3*(t-e),l=e-i,u=s*s-3*o*c,d=s*c-9*o*l,f=c*c-3*s*l,p=0;if(sr(u)&&sr(d)){if(sr(s))a[0]=0;else{var m=-c/s;m>=0&&m<=1&&(a[p++]=m)}}else{var h=d*d-4*u*f;if(sr(h)){var g=d/u,m=-s/o+g,_=-g/2;m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_)}else if(h>0){var v=$n(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-Qn(-y,rr):Qn(y,rr),b=b<0?-Qn(-b,rr):Qn(b,rr);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*$n(u*u*u)),S=Math.acos(x)/3,C=$n(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+nr*Math.sin(S)))/(3*o),T=(-s+C*(w-nr*Math.sin(S)))/(3*o);m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_),T>=0&&T<=1&&(a[p++]=T)}}return p}function fr(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,c=0;if(sr(o)){if(cr(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(sr(u))i[0]=-a/(2*o);else if(u>0){var d=$n(u),l=(-a+d)/(2*o),f=(-a-d)/(2*o);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function pr(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,c=(r-n)*i+n,l=(s-o)*i+o,u=(c-s)*i+s,d=(u-l)*i+l;a[0]=e,a[1]=o,a[2]=l,a[3]=d,a[4]=d,a[5]=u,a[6]=c,a[7]=r}function mr(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;ir[0]=c,ir[1]=l;for(var v=0;v<1;v+=.05)ar[0]=lr(e,n,i,o,v),ar[1]=lr(t,r,a,s,v),g=wt(ir,ar),g<p&&(d=v,p=g);p=1/0;for(var y=0;y<32&&!(f<tr);y++)m=d-f,h=d+f,ar[0]=lr(e,n,i,o,m),ar[1]=lr(t,r,a,s,m),g=wt(ar,ir),m>=0&&g<p?(d=m,p=g):(or[0]=lr(e,n,i,o,h),or[1]=lr(t,r,a,s,h),_=wt(or,ir),h<=1&&_<p?(d=h,p=_):f*=.5);return u&&(u[0]=lr(e,n,i,o,d),u[1]=lr(t,r,a,s,d)),$n(p)}function hr(e,t,n,r,i,a,o,s,c){for(var l=e,u=t,d=0,f=1/c,p=1;p<=c;p++){var m=p*f,h=lr(e,n,i,o,m),g=lr(t,r,a,s,m),_=h-l,v=g-u;d+=Math.sqrt(_*_+v*v),l=h,u=g}return d}function gr(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}function _r(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function vr(e,t,n,r,i){var a=e-2*t+n,o=2*(t-e),s=e-r,c=0;if(sr(a)){if(cr(o)){var l=-s/o;l>=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(sr(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=$n(u),l=(-o+d)/(2*a),f=(-o-d)/(2*a);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function yr(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function br(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n}function xr(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;ir[0]=o,ir[1]=s;for(var f=0;f<1;f+=.05){ar[0]=gr(e,n,i,f),ar[1]=gr(t,r,a,f);var p=wt(ir,ar);p<d&&(l=f,d=p)}d=1/0;for(var m=0;m<32&&!(u<tr);m++){var h=l-u,g=l+u;ar[0]=gr(e,n,i,h),ar[1]=gr(t,r,a,h);var p=wt(ar,ir);if(h>=0&&p<d)l=h,d=p;else{or[0]=gr(e,n,i,g),or[1]=gr(t,r,a,g);var _=wt(or,ir);g<=1&&_<d?(l=g,d=_):u*=.5}}return c&&(c[0]=gr(e,n,i,l),c[1]=gr(t,r,a,l)),$n(d)}function Sr(e,t,n,r,i,a,o){for(var s=e,c=t,l=0,u=1/o,d=1;d<=o;d++){var f=d*u,p=gr(e,n,i,f),m=gr(t,r,a,f),h=p-s,g=m-c;l+=Math.sqrt(h*h+g*g),s=p,c=m}return l}var Cr=/cubic-bezier\(([0-9,\.e ]+)\)/;function wr(e){var t=e&&Cr.exec(e);if(t){var n=t[1].split(`,`),r=+et(n[0]),i=+et(n[1]),a=+et(n[2]),o=+et(n[3]);if(isNaN(r+i+a+o))return;var s=[];return function(e){return e<=0?0:e>=1?1:dr(0,r,a,1,e,s)&&lr(0,i,o,1,s[0])}}}var Tr=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||dt,this.ondestroy=e.ondestroy||dt,this.onrestart=e.onrestart||dt,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||=(this._startTime=e+this._delay,!0),this._paused){this._pausedTime+=t;return}var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),i===1){if(this.loop){var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}else return!0}return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=G(e)?e:Zn[e]||wr(e)},e}(),Er=function(){function e(e){this.value=e}return e}(),Dr=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new Er(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),Or=function(){function e(e){this._list=new Dr,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(r[e]==null){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new Er(t),o.key=e,n.insertEntry(o),r[e]=o}return i},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),kr={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Ar(e){return e=Math.round(e),e<0?0:e>255?255:e}function jr(e){return e<0?0:e>1?1:e}function Mr(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Ar(parseFloat(t)/100*255):Ar(parseInt(t,10))}function Nr(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?jr(parseFloat(t)/100):jr(parseFloat(t))}function Pr(e,t,n){return n<0?n+=1:n>1&&--n,n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function Fr(e,t,n){return e+(t-e)*n}function Ir(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function Lr(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Rr=new Or(20),zr=null;function Br(e,t){zr&&Lr(zr,t),zr=Rr.put(e,zr||t.slice())}function Vr(e,t){if(e){t||=[];var n=Rr.get(e);if(n)return Lr(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in kr)return Lr(t,kr[r]),Br(e,t),t;var i=r.length;if(r.charAt(0)===`#`){if(i===4||i===5){var a=parseInt(r.slice(1,4),16);if(!(a>=0&&a<=4095)){Ir(t,0,0,0,1);return}return Ir(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),Br(e,t),t}if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){Ir(t,0,0,0,1);return}return Ir(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),Br(e,t),t}return}var o=r.indexOf(`(`),s=r.indexOf(`)`);if(o!==-1&&s+1===i){var c=r.substr(0,o),l=r.substr(o+1,s-(o+1)).split(`,`),u=1;switch(c){case`rgba`:if(l.length!==4)return l.length===3?Ir(t,+l[0],+l[1],+l[2],1):Ir(t,0,0,0,1);u=Nr(l.pop());case`rgb`:if(l.length>=3)return Ir(t,Mr(l[0]),Mr(l[1]),Mr(l[2]),l.length===3?u:Nr(l[3])),Br(e,t),t;Ir(t,0,0,0,1);return;case`hsla`:if(l.length!==4){Ir(t,0,0,0,1);return}return l[3]=Nr(l[3]),Hr(l,t),Br(e,t),t;case`hsl`:if(l.length!==3){Ir(t,0,0,0,1);return}return Hr(l,t),Br(e,t),t;default:return}}Ir(t,0,0,0,1)}}function Hr(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=Nr(e[1]),i=Nr(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],Ir(t,Ar(Pr(o,a,n+1/3)*255),Ar(Pr(o,a,n)*255),Ar(Pr(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function Ur(e,t){var n=Vr(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return Gr(n,n.length===4?`rgba`:`rgb`)}}function Wr(e,t,n){if(!(!(t&&t.length)||!(e>=0&&e<=1))){var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=Vr(t[i]),s=Vr(t[a]),c=r-i,l=Gr([Ar(Fr(o[0],s[0],c)),Ar(Fr(o[1],s[1],c)),Ar(Fr(o[2],s[2],c)),jr(Fr(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}function Gr(e,t){if(!(!e||!e.length)){var n=e[0]+`,`+e[1]+`,`+e[2];return(t===`rgba`||t===`hsva`||t===`hsla`)&&(n+=`,`+e[3]),t+`(`+n+`)`}}function Kr(e,t){var n=Vr(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var qr=new Or(100);function Jr(e){if(K(e)){var t=qr.get(e);return t||(t=Ur(e,-.1),qr.put(e,t)),t}if(Ke(e)){var n=R({},e);return n.colorStops=H(e.colorStops,function(e){return{offset:e.offset,color:Ur(e.color,-.1)}}),n}return e}function Yr(e){return e.type===`linear`}function Xr(e){return e.type===`radial`}(function(){return P.hasGlobalWindow&&G(window.btoa)?function(e){return window.btoa(unescape(encodeURIComponent(e)))}:typeof Buffer<`u`?function(e){return Buffer.from(e).toString(`base64`)}:function(e){return null}})();var Zr=Array.prototype.slice;function Qr(e,t,n){return(t-e)*n+e}function $r(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=Qr(t[a],n[a],r);return e}function ei(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=Qr(t[o][s],n[o][s],r)}return e}function ti(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=t[a]+n[a]*r;return e}function ni(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=t[o][s]+n[o][s]*r}return e}function ri(e,t){for(var n=e.length,r=t.length,i=n>r?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(n,r);s++)i.push({offset:o.offset,color:o.color.slice()})}function ii(e,t,n){var r=e,i=t;if(!(!r.push||!i.push)){var a=r.length,o=i.length;if(a!==o){if(a>o)r.length=o;else for(var s=a;s<o;s++)r.push(n===1?i[s]:Zr.call(i[s]))}for(var c=r[0]&&r[0].length,s=0;s<r.length;s++)if(n===1)isNaN(r[s])&&(r[s]=i[s]);else for(var l=0;l<c;l++)isNaN(r[s][l])&&(r[s][l]=i[s][l])}}function ai(e){if(Fe(e)){var t=e.length;if(Fe(e[0])){for(var n=[],r=0;r<t;r++)n.push(Zr.call(e[r]));return n}return Zr.call(e)}return e}function oi(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=e[3]==null?1:e[3],`rgba(`+e.join(`,`)+`)`}function si(e){return Fe(e&&e[0])?2:1}var ci=0,li=1,ui=2,di=3,fi=4,pi=5,mi=6;function hi(e){return e===fi||e===pi}function gi(e){return e===li||e===ui}var _i=[0,0,0,0],vi=function(){function e(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,a=!1,o=mi,s=t;if(Fe(t)){var c=si(t);o=c,(c===1&&!He(t[0])||c===2&&!He(t[0][0]))&&(a=!0)}else if(He(t)&&!Je(t))o=ci;else if(K(t)){if(!isNaN(+t))o=ci;else{var l=Vr(t);l&&(s=l,o=di)}}else if(Ke(t)){var u=R({},s);u.colorStops=H(t.colorStops,function(e){return{offset:e.offset,color:Vr(e.color)}}),Yr(t)?o=fi:Xr(t)&&(o=pi),s=u}i===0?this.valType=o:(o!==this.valType||o===mi)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=G(n)?n:Zn[n]||wr(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,i=n.length,a=n[i-1],o=this.discrete,s=gi(r),c=hi(r),l=0;l<i;l++){var u=n[l],d=u.value,f=a.value;u.percent=u.time/e,o||(s&&l!==i-1?ii(d,f,r):c&&ri(d.colorStops,f.colorStops))}if(!o&&r!==pi&&t&&this.needsAnimate()&&t.needsAnimate()&&r===t.valType&&!t._finished){this._additiveTrack=t;for(var p=n[0].value,l=0;l<i;l++)r===ci?n[l].additiveValue=n[l].value-p:r===di?n[l].additiveValue=ti([],n[l].value,p,-1):gi(r)&&(n[l].additiveValue=r===li?ti([],n[l].value,p,-1):ni([],n[l].value,p,-1))}},e.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,r=n?`additiveValue`:`value`,i=this.valType,a=this.keyframes,o=a.length,s=this.propName,c=i===di,l,u=this._lastFr,d=Math.min,f,p;if(o===1)f=p=a[0];else{if(t<0)l=0;else if(t<this._lastFrP){for(l=d(u+1,o-1);l>=0&&!(a[l].percent<=t);l--);l=d(l,o-2)}else{for(l=u;l<o&&!(a[l].percent>t);l++);l=d(l-1,o-2)}p=a[l+1],f=a[l]}if(f&&p){this._lastFr=l,this._lastFrP=t;var m=p.percent-f.percent,h=m===0?1:d((t-f.percent)/m,1);p.easingFunc&&(h=p.easingFunc(h));var g=n?this._additiveValue:c?_i:e[s];if((gi(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(gi(i))i===li?$r(g,f[r],p[r],h):ei(g,f[r],p[r],h);else if(hi(i)){var _=f[r],v=p[r],y=i===fi;e[s]={type:y?`linear`:`radial`,x:Qr(_.x,v.x,h),y:Qr(_.y,v.y,h),colorStops:H(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:Qr(e.offset,n.offset,h),color:oi($r([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=Qr(_.x2,v.x2,h),e[s].y2=Qr(_.y2,v.y2,h)):e[s].r=Qr(_.r,v.r,h)}else if(c)$r(g,f[r],p[r],h),n||(e[s]=oi(g));else{var b=Qr(f[r],p[r],h);n?this._additiveValue=b:e[s]=b}n&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;t===ci?e[n]=e[n]+r:t===di?(Vr(e[n],_i),ti(_i,_i,r,1),e[n]=oi(_i)):t===li?ti(e[n],e[n],r,1):t===ui&&ni(e[n],e[n],r,1)},e}(),yi=function(){function e(e,t,n,r){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r){Me(`Can' use additive animation on looped animation.`);return}this._additiveAnimators=r,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,Re(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,a=0;a<n.length;a++){var o=n[a],s=i[o];if(!s){s=i[o]=new vi(o);var c=void 0,l=this._getAdditiveTrack(o);if(l){var u=l.keyframes,d=u[u.length-1];c=d&&d.value,l.valType===di&&c&&(c=oi(c))}else c=this._target[o];if(c==null)continue;e>0&&s.addKeyframe(0,ai(c),r),this._trackKeys.push(o)}s.addKeyframe(e,ai(t[o]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},e.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var n=0;n<t.length;n++)t[n].call(this)},e.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},e.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var r=0;r<n.length;r++){var i=n[r].getTrack(e);i&&(t=i)}return t},e.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var a=this._trackKeys[i],o=this._tracks[a],s=this._getAdditiveTrack(a),c=o.keyframes,l=c.length;if(o.prepare(r,s),o.needsAnimate()){if(!this._allowDiscrete&&o.discrete){var u=c[l-1];u&&(t._target[o.propName]=u.rawValue),o.setFinished()}else n.push(o)}}if(n.length||this._force){var d=new Tr({life:r,loop:this._loop,delay:this._delay||0,onframe:function(e){t._started=2;var r=t._additiveAnimators;if(r){for(var i=!1,a=0;a<r.length;a++)if(r[a]._clip){i=!0;break}i||(t._additiveAnimators=null)}for(var a=0;a<n.length;a++)n[a].step(t._target,e);var o=t._onframeCbs;if(o)for(var a=0;a<o.length;a++)o[a](t._target,e)},ondestroy:function(){t._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},e.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},e.prototype.delay=function(e){return this._delay=e,this},e.prototype.during=function(e){return e&&(this._onframeCbs||=[],this._onframeCbs.push(e)),this},e.prototype.done=function(e){return e&&(this._doneCbs||=[],this._doneCbs.push(e)),this},e.prototype.aborted=function(e){return e&&(this._abortedCbs||=[],this._abortedCbs.push(e)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(e){return this._tracks[e]},e.prototype.getTracks=function(){var e=this;return H(this._trackKeys,function(t){return e._tracks[t]})},e.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,r=this._trackKeys,i=0;i<e.length;i++){var a=n[e[i]];a&&!a.isFinished()&&(t?a.step(this._target,1):this._started===1&&a.step(this._target,0),a.setFinished())}for(var o=!0,i=0;i<r.length;i++)if(!n[r[i]].isFinished()){o=!1;break}return o&&this._abortedCallback(),o},e.prototype.saveTo=function(e,t,n){if(e){t||=this._trackKeys;for(var r=0;r<t.length;r++){var i=t[r],a=this._tracks[i];if(!(!a||a.isFinished())){var o=a.keyframes,s=o[n?0:o.length-1];s&&(e[i]=ai(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t||=Re(e);for(var n=0;n<t.length;n++){var r=t[n],i=this._tracks[r];if(i){var a=i.keyframes;if(a.length>1){var o=a.pop();i.addKeyframe(o.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}();function bi(){return new Date().getTime()}var xi=function(e){N(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=bi()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&(Xn(t),!e._paused&&e.update())}Xn(t)},t.prototype.start=function(){this._running||(this._time=bi(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=bi(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=bi()-this._pauseStart,!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new yi(e,t.loop);return this.addAnimator(n),n},t}(jt),Si=300,Ci=P.domSupported,wi=(function(){var e=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],t=[`touchstart`,`touchend`,`touchmove`],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:t,pointer:H(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),Ti={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},Ei=!1;function Di(e){var t=e.pointerType;return t===`pen`||t===`touch`}function Oi(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function ki(e){e&&(e.zrByTouch=!0)}function Ai(e,t){return Zt(e.dom,new Mi(e,t),!0)}function ji(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var Mi=function(){function e(e,t){this.stopPropagation=dt,this.stopImmediatePropagation=dt,this.preventDefault=dt,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),Ni={mousedown:function(e){e=Zt(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=Zt(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup:function(e){e=Zt(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=Zt(this.dom,e);var t=e.toElement||e.relatedTarget;ji(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){Ei=!0,e=Zt(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){Ei||(e=Zt(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=Zt(this.dom,e),ki(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),Ni.mousemove.call(this,e),Ni.mousedown.call(this,e)},touchmove:function(e){e=Zt(this.dom,e),ki(e),this.handler.processGesture(e,`change`),Ni.mousemove.call(this,e)},touchend:function(e){e=Zt(this.dom,e),ki(e),this.handler.processGesture(e,`end`),Ni.mouseup.call(this,e),new Date-+this.__lastTouchMoment<Si&&Ni.click.call(this,e)},pointerdown:function(e){Ni.mousedown.call(this,e)},pointermove:function(e){Di(e)||Ni.mousemove.call(this,e)},pointerup:function(e){Ni.mouseup.call(this,e)},pointerout:function(e){Di(e)||Ni.mouseout.call(this,e)}};V([`click`,`dblclick`,`contextmenu`],function(e){Ni[e]=function(t){t=Zt(this.dom,t),this.trigger(e,t)}});var Pi={pointermove:function(e){Di(e)||Pi.mousemove.call(this,e)},pointerup:function(e){Pi.mouseup.call(this,e)},mousemove:function(e){this.trigger(`mousemove`,e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger(`mouseup`,e),t&&(e.zrEventControl=`only_globalout`,this.trigger(`mouseout`,e))}};function Fi(e,t){var n=t.domHandlers;P.pointerEventsSupported?V(wi.pointer,function(r){Li(t,r,function(t){n[r].call(e,t)})}):(P.touchEventsSupported&&V(wi.touch,function(r){Li(t,r,function(i){n[r].call(e,i),Oi(t)})}),V(wi.mouse,function(r){Li(t,r,function(i){i=Xt(i),t.touching||n[r].call(e,i)})}))}function Ii(e,t){P.pointerEventsSupported?V(Ti.pointer,n):P.touchEventsSupported||V(Ti.mouse,n);function n(n){function r(r){r=Xt(r),ji(e,r.target)||(r=Ai(e,r),t.domHandlers[n].call(e,r))}Li(t,n,r,{capture:!0})}}function Li(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,$t(e.domTarget,t,n,r)}function Ri(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&en(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var zi=function(){function e(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return e}(),Bi=function(e){N(t,e);function t(t,n){var r=e.call(this)||this;return r.__pointerCapturing=!1,r.dom=t,r.painterRoot=n,r._localHandlerScope=new zi(t,Ni),Ci&&(r._globalHandlerScope=new zi(document,Pi)),Fi(r,r._localHandlerScope),r}return t.prototype.dispose=function(){Ri(this._localHandlerScope),Ci&&Ri(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||`default`)},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,Ci&&this.__pointerCapturing^+e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?Ii(this,t):Ri(t)}},t}(jt),Vi=1;P.hasGlobalWindow&&(Vi=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Hi=Vi,Ui=.4,Wi=`#333`,Gi=`#ccc`,Ki=`#eee`,qi=ln,Ji=5e-5;function Yi(e){return e>Ji||e<-Ji}var Xi=[],Zi=[],Qi=cn(),$i=Math.abs,ea=function(){function e(){}return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(this,t)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return Yi(this.rotation)||Yi(this.x)||Yi(this.y)||Yi(this.scaleX-1)||Yi(this.scaleY-1)||Yi(this.skewX)||Yi(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(qi(n),this.invTransform=null);return}n||=cn(),t?this.getLocalTransform(n):qi(n),e&&(t?dn(n,e,n):un(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Xi);var n=Xi[0]<0?-1:1,r=Xi[1]<0?-1:1,i=((Xi[0]-n)*t+n)/Xi[0]||0,a=((Xi[1]-r)*t+r)/Xi[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}this.invTransform=this.invTransform||cn(),hn(this.invTransform,e)},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||cn(),dn(Zi,e.invTransform,t),t=Zi);var n=this.originX,r=this.originY;(n||r)&&(Qi[4]=n,Qi[5]=r,dn(Zi,t,Qi),Zi[4]-=n,Zi[5]-=r,t=Zi),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e||=[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&Et(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&Et(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&$i(e[0]-1)>1e-10&&$i(e[3]-1)>1e-10?Math.sqrt($i(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){na(this,e)},e.getLocalTransform=function(e,t){t||=[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,a=e.scaleY,o=e.anchorX,s=e.anchorY,c=e.rotation||0,l=e.x,u=e.y,d=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(n||r||o||s){var p=n+o,m=r+s;t[4]=-p*i-d*m*a,t[5]=-m*a-f*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=a,t[1]=f*i,t[2]=d*a,c&&pn(t,t,c),t[4]+=n+l,t[5]+=r+u,t},e.initDefaultProps=(function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),e}(),ta=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function na(e,t){for(var n=0;n<ta.length;n++){var r=ta[n];e[r]=t[r]}}var ra={};function ia(e,t){t||=`12px sans-serif`;var n=ra[t];n||=ra[t]=new Or(500);var r=n.get(e);return r??(r=ve.measureText(e,t).width,n.put(e,r)),r}function aa(e,t,n,r){var i=ia(e,t),a=la(t);return new wn(sa(0,i,n),ca(0,a,r),i,a)}function oa(e,t,n,r){var i=((e||``)+``).split(`
2
2
  `);if(i.length===1)return aa(i[0],t,n,r);for(var a=new wn(0,0,0,0),o=0;o<i.length;o++){var s=aa(i[o],t,n,r);o===0?a.copy(s):a.union(s)}return a}function sa(e,t,n){return n===`right`?e-=t:n===`center`&&(e-=t/2),e}function ca(e,t,n){return n===`middle`?e-=t/2:n===`bottom`&&(e-=t),e}function la(e){return ia(`国`,e)}function ua(e,t){return typeof e==`string`?e.lastIndexOf(`%`)>=0?parseFloat(e)/100*t:parseFloat(e):e}function da(e,t,n){var r=t.position||`inside`,i=t.distance==null?5:t.distance,a=n.height,o=n.width,s=a/2,c=n.x,l=n.y,u=`left`,d=`top`;if(r instanceof Array)c+=ua(r[0],n.width),l+=ua(r[1],n.height),u=null,d=null;else switch(r){case`left`:c-=i,l+=s,u=`right`,d=`middle`;break;case`right`:c+=i+o,l+=s,d=`middle`;break;case`top`:c+=o/2,l-=i,u=`center`,d=`bottom`;break;case`bottom`:c+=o/2,l+=a+i,u=`center`;break;case`inside`:c+=o/2,l+=s,u=`center`,d=`middle`;break;case`insideLeft`:c+=i,l+=s,d=`middle`;break;case`insideRight`:c+=o-i,l+=s,u=`right`,d=`middle`;break;case`insideTop`:c+=o/2,l+=i,u=`center`;break;case`insideBottom`:c+=o/2,l+=a-i,u=`center`,d=`bottom`;break;case`insideTopLeft`:c+=i,l+=i;break;case`insideTopRight`:c+=o-i,l+=i,u=`right`;break;case`insideBottomLeft`:c+=i,l+=a-i,d=`bottom`;break;case`insideBottomRight`:c+=o-i,l+=a-i,u=`right`,d=`bottom`}return e||={},e.x=c,e.y=l,e.align=u,e.verticalAlign=d,e}var fa=`__zr_normal__`,pa=ta.concat([`ignore`]),ma=Ie(ta,function(e,t){return e[t]=!0,e},{ignore:!1}),ha={},ga=new wn(0,0,0,0),_a=function(){function e(e){this.id=je(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,n){switch(this.draggable){case`horizontal`:t=0;break;case`vertical`:e=0}var r=this.transform;r||=this.transform=[1,0,0,1,0,0],r[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||={};var n=this.textConfig,r=n.local,i=t.innerTransformable,a=void 0,o=void 0,s=!1;i.parent=r?this:null;var c=!1;if(i.copyTransform(t),n.position!=null){var l=ga;n.layoutRect?l.copy(n.layoutRect):l.copy(this.getBoundingRect()),r||l.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(ha,n,l):da(ha,n,l),i.x=ha.x,i.y=ha.y,a=ha.align,o=ha.verticalAlign;var u=n.origin;if(u&&n.rotation!=null){var d=void 0,f=void 0;u===`center`?(d=l.width*.5,f=l.height*.5):(d=ua(u[0],l.width),f=ua(u[1],l.height)),c=!0,i.originX=-i.x+d+(r?0:l.x),i.originY=-i.y+f+(r?0:l.y)}}n.rotation!=null&&(i.rotation=n.rotation);var p=n.offset;p&&(i.x+=p[0],i.y+=p[1],c||(i.originX=-p[0],i.originY=-p[1]));var m=n.inside==null?typeof n.position==`string`&&n.position.indexOf(`inside`)>=0:n.inside,h=this._innerTextDefaultStyle||={},g=void 0,_=void 0,v=void 0;m&&this.canBeInsideText()?(g=n.insideFill,_=n.insideStroke,(g==null||g===`auto`)&&(g=this.getInsideTextFill()),(_==null||_===`auto`)&&(_=this.getInsideTextStroke(g),v=!0)):(g=n.outsideFill,_=n.outsideStroke,(g==null||g===`auto`)&&(g=this.getOutsideFill()),(_==null||_===`auto`)&&(_=this.getOutsideStroke(g),v=!0)),g||=`#000`,(g!==h.fill||_!==h.stroke||v!==h.autoStroke||a!==h.align||o!==h.verticalAlign)&&(s=!0,h.fill=g,h.stroke=_,h.autoStroke=v,h.align=a,h.verticalAlign=o,t.setDefaultTextStyle(h)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return`#fff`},e.prototype.getInsideTextStroke=function(e){return`#000`},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Gi:Wi},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&Vr(t);n||=[255,255,255,1];for(var r=n[3],i=this.__zr.isDarkMode(),a=0;a<3;a++)n[a]=n[a]*r+(i?0:255)*(1-r);return n[3]=1,Gr(n,`rgba`)},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){e===`textConfig`?this.setTextConfig(t):e===`textContent`?this.setTextContent(t):e===`clipPath`?this.setClipPath(t):e===`extra`?(this.extra=this.extra||{},R(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if(typeof e==`string`)this.attrKV(e,t);else if(q(e))for(var n=Re(e),r=0;r<n.length;r++){var i=n[r];this.attrKV(i,e[i])}return this.markRedraw(),this},e.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,n=0;n<this.animators.length;n++){var r=this.animators[n],i=r.__fromStateTransition;if(!(r.getLoop()||i&&i!==`__zr_normal__`)){var a=r.targetName,o=a?t[a]:t;r.saveTo(o)}}},e.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||=this._normalState={},e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,pa)},e.prototype._savePrimaryToNormal=function(e,t,n){for(var r=0;r<n.length;r++){var i=n[r];e[i]!=null&&!(i in t)&&(t[i]=this[i])}},e.prototype.hasState=function(){return this.currentStates.length>0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(fa,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===fa;if(!(!this.hasState()&&i)){var a=this.currentStates,o=this.stateTransition;if(!(B(a,e)>=0&&(t||a.length===1))){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||=this.states&&this.states[e],!s&&!i){Me(`State `+e+` not exists.`);return}i||this.saveCurrentToNormalState(s);var c=!!(s&&s.hoverLayer||r);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,s,this._normalState,t,!n&&!this.__inHover&&o&&o.duration>0,o);var l=this._textContent,u=this._textGuide;return l&&l.useState(e,t,n,c),u&&u.useState(e,t,n,c),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),s}}},e.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var r=[],i=this.currentStates,a=e.length,o=a===i.length;if(o){for(var s=0;s<a;s++)if(e[s]!==i[s]){o=!1;break}}if(o)return;for(var s=0;s<a;s++){var c=e[s],l=void 0;this.stateProxy&&(l=this.stateProxy(c,e)),l||=this.states[c],l&&r.push(l)}var u=r[a-1],d=!!(u&&u.hoverLayer||n);d&&this._toggleHoverLayerFlag(!0);var f=this._mergeStates(r),p=this.stateTransition;this.saveCurrentToNormalState(f),this._applyStateObj(e.join(`,`),f,this._normalState,!1,!t&&!this.__inHover&&p&&p.duration>0,p);var m=this._textContent,h=this._textGuide;m&&m.useStates(e,t,d),h&&h.useStates(e,t,d),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}},e.prototype.isSilent=function(){for(var e=this.silent,t=this.parent;!e&&t;){if(t.silent){e=!0;break}t=t.parent}return e},e.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},e.prototype.removeState=function(e){var t=B(this.currentStates,e);if(t>=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=B(r,e),a=B(r,t)>=0;i>=0?a?r.splice(i,1):r[i]=t:n&&!a&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t={},n,r=0;r<e.length;r++){var i=e[r];R(t,i),i.textConfig&&(n||={},R(n,i.textConfig))}return n&&(t.textConfig=n),t},e.prototype._applyStateObj=function(e,t,n,r,i,a){var o=!(t&&r);t&&t.textConfig?(this.textConfig=R({},r?this.textConfig:n.textConfig),R(this.textConfig,t.textConfig)):o&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},c=!1,l=0;l<pa.length;l++){var u=pa[l],d=i&&ma[u];t&&t[u]!=null?d?(c=!0,s[u]=t[u]):this[u]=t[u]:o&&n[u]!=null&&(d?(c=!0,s[u]=n[u]):this[u]=n[u])}if(!i)for(var l=0;l<this.animators.length;l++){var f=this.animators[l],p=f.targetName;f.getLoop()||f.__changeFinalValue(p?(t||n)[p]:t||n)}c&&this._transitionState(e,s,a)},e.prototype._attachComponent=function(e){if(!(e.__zr&&!e.__hostTarget)&&e!==this){var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this}},e.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},e.prototype.getClipPath=function(){return this._clipPath},e.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},e.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},e.prototype.getTextContent=function(){return this._textContent},e.prototype.setTextContent=function(e){var t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new ea,this._attachComponent(e),this._textContent=e,this.markRedraw())},e.prototype.setTextConfig=function(e){this.textConfig||={},R(this.textConfig,e),this.markRedraw()},e.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},e.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},e.prototype.getTextGuideLine=function(){return this._textGuide},e.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},e.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},e.prototype.markRedraw=function(){this.__dirty|=1;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},e.prototype.dirty=function(){this.markRedraw()},e.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var t=this._textContent,n=this._textGuide;t&&(t.__inHover=e),n&&(n.__inHover=e)},e.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},e.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},e.prototype.animate=function(e,t,n){var r=new yi(e?this[e]:this,t,n);return e&&(r.targetName=e),this.addAnimator(r,e),r},e.prototype.addAnimator=function(e,t){var n=this.__zr,r=this;e.during(function(){r.updateDuringAnimation(t)}).done(function(){var t=r.animators,n=B(t,e);n>=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],a=0;a<r;a++){var o=n[a];!e||e===o.scope?o.stop(t):i.push(o)}return this.animators=i,this},e.prototype.animateTo=function(e,t,n){va(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){va(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,r){for(var i=va(this,t,n,r),a=0;a<i.length;a++)i[a].__fromStateTransition=e},e.prototype.getBoundingRect=function(){return null},e.prototype.getPaintRect=function(){return null},e.initDefaultProps=(function(){var t=e.prototype;t.type=`element`,t.name=``,t.ignore=t.silent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=t.__inHover=!1,t.__dirty=1;function n(e,n,r,i){Object.defineProperty(t,e,{get:function(){if(!this[n]){var e=this[n]=[];a(this,e)}return this[n]},set:function(e){this[r]=e[0],this[i]=e[1],this[n]=e,a(this,e)}});function a(e,t){Object.defineProperty(t,0,{get:function(){return e[r]},set:function(t){e[r]=t}}),Object.defineProperty(t,1,{get:function(){return e[i]},set:function(t){e[i]=t}})}}Object.defineProperty&&(n(`position`,`_legacyPos`,`x`,`y`),n(`scale`,`_legacyScale`,`scaleX`,`scaleY`),n(`origin`,`_legacyOrigin`,`originX`,`originY`))})(),e}();Pe(_a,jt),Pe(_a,ea);function va(e,t,n,r,i){n||={};var a=[];wa(e,``,e,t,n,r,a,i);var o=a.length,s=!1,c=n.done,l=n.aborted,u=function(){s=!0,o--,o<=0&&(s?c&&c():l&&l())},d=function(){o--,o<=0&&(s?c&&c():l&&l())};o||c&&c(),a.length>0&&n.during&&a[0].during(function(e,t){n.during(t)});for(var f=0;f<a.length;f++){var p=a[f];u&&p.done(u),d&&p.aborted(d),n.force&&p.duration(n.duration),p.start(n.easing)}return a}function ya(e,t,n){for(var r=0;r<n;r++)e[r]=t[r]}function ba(e){return Fe(e[0])}function xa(e,t,n){if(Fe(t[n])){if(Fe(e[n])||(e[n]=[]),We(t[n])){var r=t[n].length;e[n].length!==r&&(e[n]=new t[n].constructor(r),ya(e[n],t[n],r))}else{var i=t[n],a=e[n],o=i.length;if(ba(i))for(var s=i[0].length,c=0;c<o;c++)a[c]?ya(a[c],i[c],s):a[c]=Array.prototype.slice.call(i[c]);else ya(a,i,o);a.length=i.length}}else e[n]=t[n]}function Sa(e,t){return e===t||Fe(e)&&Fe(t)&&Ca(e,t)}function Ca(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function wa(e,t,n,r,i,a,o,s){for(var c=Re(r),l=i.duration,u=i.delay,d=i.additive,f=i.setToFinal,p=!q(a),m=e.animators,h=[],g=0;g<c.length;g++){var _=c[g],v=r[_];if(v!=null&&n[_]!=null&&(p||a[_])){if(q(v)&&!Fe(v)&&!Ke(v)){if(t){s||(n[_]=v,e.updateDuringAnimation(t));continue}wa(e,_,n[_],v,i,a&&a[_],o,s)}else h.push(_)}else s||(n[_]=v,e.updateDuringAnimation(t),h.push(_))}var y=h.length;if(!d&&y)for(var b=0;b<m.length;b++){var x=m[b];if(x.targetName===t&&x.stopTracks(h)){var S=B(m,x);m.splice(S,1)}}if(i.force||(h=Le(h,function(e){return!Sa(r[e],n[e])}),y=h.length),y>0||i.force&&!o.length){var C=void 0,w=void 0,T=void 0;if(s){w={},f&&(C={});for(var b=0;b<y;b++){var _=h[b];w[_]=n[_],f?C[_]=r[_]:n[_]=r[_]}}else if(f){T={};for(var b=0;b<y;b++){var _=h[b];T[_]=ai(n[_]),xa(n,r,_)}}var x=new yi(n,!1,!1,d?Le(m,function(e){return e.targetName===t}):null);x.targetName=t,i.scope&&(x.scope=i.scope),f&&C&&x.whenWithKeys(0,C,h),T&&x.whenWithKeys(0,T,h),x.whenWithKeys(l??500,s?w:r,h).delay(u||0),e.addAnimator(x,t),o.push(x)}}var Ta=function(e){N(t,e);function t(t){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var t=this._children,n=0;n<t.length;n++)if(t[n].name===e)return t[n]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this},t.prototype.addBefore=function(e,t){if(e&&e!==this&&e.parent!==this&&t&&t.parent===this){var n=this._children,r=n.indexOf(t);r>=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=B(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=B(n,e);return r<0?this:(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;n<e.length;n++){var r=e[n];t&&r.removeSelfFromZr(t),r.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,t){for(var n=this._children,r=0;r<n.length;r++){var i=n[r];e.call(t,i,r)}return this},t.prototype.traverse=function(e,t){for(var n=0;n<this._children.length;n++){var r=this._children[n],i=e.call(t,r);r.isGroup&&!i&&r.traverse(e,t)}return this},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].addSelfToZr(t)},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].removeSelfFromZr(t)},t.prototype.getBoundingRect=function(e){for(var t=new wn(0,0,0,0),n=e||this._children,r=[],i=null,a=0;a<n.length;a++){var o=n[a];if(!(o.ignore||o.invisible)){var s=o.getBoundingRect(),c=o.getLocalTransform(r);c?(wn.applyTransform(t,s,c),i||=t.clone(),i.union(t)):(i||=s.clone(),i.union(s))}}return i||t},t}(_a);Ta.prototype.type=`group`;var Ea={},Da={};function Oa(e){delete Da[e]}function ka(e){if(!e)return!1;if(typeof e==`string`)return Kr(e,1)<Ui;if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,i=0;i<r;i++)n+=Kr(t[i].color,1);return n/=r,n<Ui}return!1}var Aa=function(){function e(e,t,n){var r=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n||={},this.dom=t,this.id=e;var i=new Yn,a=n.renderer||`canvas`;Ea[a]||(a=Re(Ea)[0]),n.useDirtyRect=n.useDirtyRect!=null&&n.useDirtyRect;var o=new Ea[a](t,i,n,e),s=n.ssr||o.ssrOnly;this.storage=i,this.painter=o;var c=!P.node&&!P.worker&&!s?new Bi(o.getViewportRoot(),o.root):null,l=n.useCoarsePointer,u=l==null||l===`auto`?P.touchEventsSupported:!!l,d=44,f;u&&(f=J(n.pointerSize,d)),this.handler=new Mn(i,o,c,o.root,f),this.animation=new xi({stage:{update:s?null:function(){return r._flush(!0)}}}),s||this.animation.start()}return e.prototype.add=function(e){this._disposed||!e||(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},e.prototype.remove=function(e){this._disposed||!e||(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},e.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=ka(e))},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(e){this._darkMode=e},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(e){this._disposed||(e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},e.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},e.prototype.flush=function(){this._disposed||this._flush(!1)},e.prototype._flush=function(e){var t,n=bi();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var r=bi();t?(this._stillFrameAccum=0,this.trigger(`rendered`,{elapsedTime:r-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()===`canvas`&&this.painter.refreshHover())},e.prototype.resize=function(e){this._disposed||(e||={},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof Ta&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},e.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,Oa(this.id))},e}();function ja(e,t){var n=new Aa(je(),e,t);return Da[n.id]=n,n}function Ma(e,t){Ea[e]=t}var Na=1e-4,Pa=20;function Fa(e){return e.replace(/^\s+|\s+$/g,``)}function Ia(e,t,n,r){var i=t[0],a=t[1],o=n[0],s=n[1],c=a-i,l=s-o;if(c===0)return l===0?o:(o+s)/2;if(r){if(c>0){if(e<=i)return o;if(e>=a)return s}else if(e>=i)return o;else if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/c*l+o}function Q(e,t){switch(e){case`center`:case`middle`:e=`50%`;break;case`left`:case`top`:e=`0%`;break;case`right`:case`bottom`:e=`100%`}return K(e)?Fa(e).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):e==null?NaN:+e}function La(e,t,n){return t??=10,t=Math.min(Math.max(0,t),Pa),e=(+e).toFixed(t),n?e:+e}function Ra(e){return e.sort(function(e,t){return e-t}),e}function za(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(Math.round(e*t)/t===e)return n}return Ba(e)}function Ba(e){var t=e.toString().toLowerCase(),n=t.indexOf(`e`),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,a=t.indexOf(`.`),o=a<0?0:i-1-a;return Math.max(0,o-r)}function Va(e,t){var n=Math.log,r=Math.LN10,i=Math.floor(n(e[1]-e[0])/r),a=Math.round(n(Math.abs(t[1]-t[0]))/r),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function Ha(e,t){var n=Ie(e,function(e,t){return e+(isNaN(t)?0:t)},0);if(n===0)return[];for(var r=10**t,i=H(e,function(e){return(isNaN(e)?0:e)/n*r*100}),a=r*100,o=H(i,function(e){return Math.floor(e)}),s=Ie(o,function(e,t){return e+t},0),c=H(i,function(e,t){return e-o[t]});s<a;){for(var l=-1/0,u=null,d=0,f=c.length;d<f;++d)c[d]>l&&(l=c[d],u=d);++o[u],c[u]=0,++s}return H(o,function(e){return e/r})}function Ua(e,t){var n=Math.max(za(e),za(t)),r=e+t;return n>Pa?r:La(r,n)}function Wa(e){var t=Math.PI*2;return(e%t+t)%t}function Ga(e){return e>-Na&&e<Na}var Ka=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function qa(e){if(e instanceof Date)return e;if(K(e)){var t=Ka.exec(e);if(!t)return new Date(NaN);if(t[8]){var n=+t[4]||0;return t[8].toUpperCase()!==`Z`&&(n-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}return new Date(+t[1],(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}return e==null?new Date(NaN):new Date(Math.round(e))}function Ja(e){return 10**Ya(e)}function Ya(e){if(e===0)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return e/10**t>=10&&t++,t}function Xa(e,t){var n=Ya(e),r=10**n,i=e/r;return e=(t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,n>=-20?+e.toFixed(n<0?-n:0):e}function Za(e){var t=parseFloat(e);return t==e&&(t!==0||!K(e)||e.indexOf(`x`)<=0)?t:NaN}function Qa(e){return!isNaN(Za(e))}function $a(){return Math.round(Math.random()*9)}function eo(e,t){return t===0?e:eo(t,e%t)}function to(e,t){return e==null?t:t==null?e:e*t/eo(e,t)}function no(e){throw Error(e)}function ro(e,t,n){return(t-e)*n+e}var io=`series\0`,ao=`\0_ec_\0`;function oo(e){return e instanceof Array?e:e==null?[]:[e]}function so(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var r=0,i=n.length;r<i;r++){var a=n[r];!e.emphasis[t].hasOwnProperty(a)&&e[t].hasOwnProperty(a)&&(e.emphasis[t][a]=e[t][a])}}}var co=`fontStyle.fontWeight.fontSize.fontFamily.rich.tag.color.textBorderColor.textBorderWidth.width.height.lineHeight.align.verticalAlign.baseline.shadowColor.shadowBlur.shadowOffsetX.shadowOffsetY.textShadowColor.textShadowBlur.textShadowOffsetX.textShadowOffsetY.backgroundColor.borderColor.borderWidth.borderRadius.padding`.split(`.`);function lo(e){return q(e)&&!W(e)&&!(e instanceof Date)?e.value:e}function uo(e){return q(e)&&!(e instanceof Array)}function fo(e,t,n){var r=n===`normalMerge`,i=n===`replaceMerge`,a=n===`replaceAll`;e||=[],t=(t||[]).slice();var o=Y();V(t,function(e,n){if(!q(e)){t[n]=null;return}});var s=po(e,o,n);return(r||i)&&mo(s,e,o,t),r&&ho(s,t),r||i?go(s,t,i):a&&_o(s,t),vo(s),s}function po(e,t,n){var r=[];if(n===`replaceAll`)return r;for(var i=0;i<e.length;i++){var a=e[i];a&&a.id!=null&&t.set(a.id,i),r.push({existing:n===`replaceMerge`||Co(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return r}function mo(e,t,n,r){V(r,function(i,a){if(!(!i||i.id==null)){var o=bo(i.id),s=n.get(o);if(s!=null){var c=e[s];$e(!c.newOption,`Duplicated option on id "`+o+`".`),c.newOption=i,c.existing=t[s],r[a]=null}}})}function ho(e,t){V(t,function(n,r){if(!(!n||n.name==null))for(var i=0;i<e.length;i++){var a=e[i].existing;if(!e[i].newOption&&a&&(a.id==null||n.id==null)&&!Co(n)&&!Co(a)&&yo(`name`,a,n)){e[i].newOption=n,t[r]=null;return}}})}function go(e,t,n){V(t,function(t){if(t){for(var r,i=0;(r=e[i])&&(r.newOption||Co(r.existing)||r.existing&&t.id!=null&&!yo(`id`,t,r.existing));)i++;r?(r.newOption=t,r.brandNew=n):e.push({newOption:t,brandNew:n,existing:null,keyInfo:null}),i++}})}function _o(e,t){V(t,function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function vo(e){var t=Y();V(e,function(e){var n=e.existing;n&&t.set(n.id,e)}),V(e,function(e){var n=e.newOption;$e(!n||n.id==null||!t.get(n.id)||t.get(n.id)===e,`id duplicates: `+(n&&n.id)),n&&n.id!=null&&t.set(n.id,e),!e.keyInfo&&(e.keyInfo={})}),V(e,function(e,n){var r=e.existing,i=e.newOption,a=e.keyInfo;if(q(i)){if(a.name=i.name==null?r?r.name:io+n:bo(i.name),r)a.id=bo(r.id);else if(i.id!=null)a.id=bo(i.id);else{var o=0;do a.id=`\0`+a.name+`\0`+o++;while(t.get(a.id))}t.set(a.id,e)}})}function yo(e,t,n){var r=xo(t[e],null),i=xo(n[e],null);return r!=null&&i!=null&&r===i}function bo(e){return xo(e,``)}function xo(e,t){return e==null?t:K(e)?e:He(e)||Ve(e)?e+``:t}function So(e){var t=e.name;return!!(t&&t.indexOf(io))}function Co(e){return e&&e.id!=null&&bo(e.id).indexOf(ao)===0}function wo(e,t,n){V(e,function(e){var r=e.newOption;q(r)&&(e.keyInfo.mainType=t,e.keyInfo.subType=To(t,r,e.existing,n))})}function To(e,t,n,r){return t.type?t.type:n?n.subType:r.determineSubType(e,t)}function Eo(e,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return W(t.dataIndex)?H(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex);if(t.name!=null)return W(t.name)?H(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name)}function Do(){var e=`__ec_inner_`+Oo++;return function(t){return t[e]||(t[e]={})}}var Oo=$a();function ko(e,t,n){var r=Ao(t,n),i=r.mainTypeSpecified,a=r.queryOptionMap,o=r.others,s=n?n.defaultMainType:null;return!i&&s&&a.set(s,{}),a.each(function(t,r){var i=No(e,r,t,{useDefault:s===r,enableAll:n&&n.enableAll!=null?n.enableAll:!0,enableNone:n&&n.enableNone!=null?n.enableNone:!0});o[r+`Models`]=i.models,o[r+`Model`]=i.models[0]}),o}function Ao(e,t){var n;if(K(e)){var r={};r[e+`Index`]=0,n=r}else n=e;var i=Y(),a={},o=!1;return V(n,function(e,n){if(n===`dataIndex`||n===`dataIndexInside`){a[n]=e;return}var r=n.match(/^(\w+)(Index|Id|Name)$/)||[],s=r[1],c=(r[2]||``).toLowerCase();if(!(!s||!c||t&&t.includeMainTypes&&B(t.includeMainTypes,s)<0)){o||=!!s;var l=i.get(s)||i.set(s,{});l[c]=e}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var jo={useDefault:!0,enableAll:!1,enableNone:!1},Mo={useDefault:!1,enableAll:!0,enableNone:!0};function No(e,t,n,r){r||=jo;var i=n.index,a=n.id,o=n.name,s={models:null,specified:i!=null||a!=null||o!=null};if(!s.specified){var c=void 0;return s.models=r.useDefault&&(c=e.getComponent(t))?[c]:[],s}return i===`none`||i===!1?($e(r.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):(i===`all`&&($e(r.enableAll,'`"all"` is not a valid value on index option.'),i=a=o=null),s.models=e.queryComponents({mainType:t,index:i,id:a,name:o}),s)}function Po(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}function Fo(e,t){return e.getAttribute?e.getAttribute(t):e[t]}function Io(e){return e===`auto`?P.domSupported?`html`:`richText`:e||`html`}function Lo(e,t,n,r,i){var a=t==null||t===`auto`;if(r==null)return r;if(He(r)){var o=ro(n||0,r,i);return La(o,a?Math.max(za(n||0),za(r)):t)}if(K(r))return i<1?n:r;for(var s=[],c=n,l=r,u=Math.max(c?c.length:0,l.length),d=0;d<u;++d){var f=e.getDimensionInfo(d);if(f&&f.type===`ordinal`)s[d]=(i<1&&c?c:l)[d];else{var p=c&&c[d]?c[d]:0,m=l[d],o=ro(p,m,i);s[d]=La(o,a?Math.max(za(p),za(m)):t)}}return s}var Ro=`.`,zo=`___EC__COMPONENT__CONTAINER___`,Bo=`___EC__EXTENDED_CLASS___`;function Vo(e){var t={main:``,sub:``};if(e){var n=e.split(Ro);t.main=n[0]||``,t.sub=n[1]||``}return t}function Ho(e){$e(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),`componentType "`+e+`" illegal`)}function Uo(e){return!!(e&&e[Bo])}function Wo(e,t){e.$constructor=e,e.extend=function(e){var t=this,n;return Go(t)?n=function(e){N(t,e);function t(){return e.apply(this,arguments)||this}return t}(t):(n=function(){(e.$constructor||t).apply(this,arguments)},Ne(n,this)),R(n.prototype,e),n[Bo]=!0,n.extend=this.extend,n.superCall=Yo,n.superApply=Xo,n.superClass=t,n}}function Go(e){return G(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function Ko(e,t){e.extend=t.extend}var qo=Math.round(Math.random()*10);function Jo(e){var t=[`__\0is_clz`,qo++].join(`_`);e.prototype[t]=!0,e.isInstance=function(e){return!!(e&&e[t])}}function Yo(e,t){var n=[...arguments].slice(2);return this.superClass.prototype[t].apply(e,n)}function Xo(e,t,n){return this.superClass.prototype[t].apply(e,n)}function Zo(e){var t={};e.registerClass=function(e){var r=e.type||e.prototype.type;if(r){Ho(r),e.prototype.type=r;var i=Vo(r);if(!i.sub)t[i.main]=e;else if(i.sub!==zo){var a=n(i);a[i.sub]=e}}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[zo]&&(i=n?i[n]:null),r&&!i)throw Error(n?`Component `+e+`.`+(n||``)+` is used but not imported.`:e+`.type should be specified.`);return i},e.getClassesByMainType=function(e){var n=Vo(e),r=[],i=t[n.main];return i&&i[zo]?V(i,function(e,t){t!==zo&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[Vo(e).main]},e.getAllClassMainTypes=function(){var e=[];return V(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[Vo(e).main];return n&&n[zo]};function n(e){var n=t[e.main];return(!n||!n[zo])&&(n=t[e.main]={},n[zo]=!0),n}}function Qo(e,t){for(var n=0;n<e.length;n++)e[n][1]||(e[n][1]=e[n][0]);return t||=!1,function(n,r,i){for(var a={},o=0;o<e.length;o++){var s=e[o][1];if(!(r&&B(r,s)>=0||i&&B(i,s)<0)){var c=n.getShallow(s,t);c!=null&&(a[e[o][0]]=c)}}return a}}var $o=Qo([[`fill`,`color`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`opacity`],[`shadowColor`]]),es=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return $o(this,e,t)},e}(),ts=new Or(50);function ns(e){if(typeof e==`string`){var t=ts.get(e);return t&&t.image}return e}function rs(e,t,n,r,i){if(!e)return t;if(typeof e==`string`){if(t&&t.__zrImageSrc===e||!n)return t;var a=ts.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?(t=a.image,!as(t)&&a.pending.push(o)):(t=ve.loadImage(e,is,is),t.__zrImageSrc=e,ts.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}return e}function is(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],r=n.cb;r&&r(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function as(e){return e&&e.width&&e.height}var os=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function ss(e,t,n,r,i,a){if(!n){e.text=``,e.isTruncated=!1;return}var o=(t+``).split(`
3
3
  `);a=cs(n,r,i,a);for(var s=!1,c={},l=0,u=o.length;l<u;l++)ls(c,o[l],a),o[l]=c.textLine,s||=c.isTruncated;e.text=o.join(`
4
4
  `),e.isTruncated=s}function cs(e,t,n,r){r||={};var i=R({},r);i.font=t,n=J(n,`...`),i.maxIterations=J(r.maxIterations,2);var a=i.minChar=J(r.minChar,0);i.cnCharWidth=ia(`国`,t);var o=i.ascCharWidth=ia(`a`,t);i.placeholder=J(r.placeholder,``);for(var s=e=Math.max(0,e-1),c=0;c<a&&s>=o;c++)s-=o;var l=ia(n,t);return l>s&&(n=``,l=0),s=e-l,i.ellipsis=n,i.ellipsisWidth=l,i.contentWidth=s,i.containerWidth=e,i}function ls(e,t,n){var r=n.containerWidth,i=n.font,a=n.contentWidth;if(!r){e.textLine=``,e.isTruncated=!1;return}var o=ia(t,i);if(o<=r){e.textLine=t,e.isTruncated=!1;return}for(var s=0;;s++){if(o<=a||s>=n.maxIterations){t+=n.ellipsis;break}var c=s===0?us(t,a,n.ascCharWidth,n.cnCharWidth):o>0?Math.floor(t.length*a/o):0;t=t.substr(0,c),o=ia(t,i)}t===``&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}function us(e,t,n,r){for(var i=0,a=0,o=e.length;a<o&&i<t;a++){var s=e.charCodeAt(a);i+=0<=s&&s<=127?n:r}return a}function ds(e,t){e!=null&&(e+=``);var n=t.overflow,r=t.padding,i=t.font,a=n===`truncate`,o=la(i),s=J(t.lineHeight,o),c=!!t.backgroundColor,l=t.lineOverflow===`truncate`,u=!1,d=t.width,f=d!=null&&(n===`break`||n===`breakAll`)?e?bs(e,t.font,d,n===`breakAll`,0).lines:[]:e?e.split(`