st-comp 0.0.126 → 0.0.128
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/ChartLayout.js +2 -2
- package/es/Dialog.cjs +1 -1
- package/es/Dialog.js +13 -14
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +74 -74
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +14 -14
- package/es/KlineBasic.cjs +1 -6
- package/es/KlineBasic.js +863 -2449
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +12 -12
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +17 -18
- package/es/Pie.cjs +1 -1
- package/es/Pie.js +1 -1
- package/es/Table.cjs +1 -1
- package/es/Table.js +17 -18
- package/es/User.cjs +1 -1
- package/es/User.js +74 -75
- package/es/VarietySearch.cjs +1 -1
- package/es/VarietySearch.js +34 -34
- package/es/VirtualTable.cjs +1 -1
- package/es/VirtualTable.js +12 -13
- package/es/{base-a8f938bd.js → base-3ecbc734.js} +2 -2
- package/es/{castArray-5c01dae1.js → castArray-7d3fc921.js} +1 -1
- package/es/config-provider-7cdfca4d.cjs +1 -0
- package/es/{config-provider-d3edea8a.js → config-provider-83904b4d.js} +3 -3
- package/es/{debounce-edbff018.js → debounce-7344b088.js} +1 -1
- package/es/{dropdown-7e381525.js → dropdown-7da44c8f.js} +4 -4
- package/es/el-button-196807af.cjs +1 -0
- package/es/{el-button-ce99c64e.js → el-button-24f79286.js} +5 -6
- package/es/{el-empty-ed6c115b.js → el-empty-79c5f7a8.js} +1 -1
- package/es/el-form-item-7d32befa.cjs +12 -0
- package/es/el-form-item-afc3dcf2.js +1324 -0
- package/es/{el-input-21e079e4.js → el-input-ee7db655.js} +5 -5
- package/es/el-input-number-0524d787.cjs +1 -0
- package/es/el-input-number-63c21037.js +282 -0
- package/es/{el-menu-item-9369a2ad.js → el-menu-item-0d92e7dc.js} +7 -7
- package/es/el-message-562e923d.cjs +1 -0
- package/es/{el-message-fd827012.js → el-message-71aa42ca.js} +16 -16
- package/es/{el-overlay-9245ec1e.js → el-overlay-6056c89a.js} +76 -77
- package/es/el-overlay-891dcc40.cjs +1 -0
- package/es/{el-popover-6f48d00b.cjs → el-popover-8735b1fa.cjs} +1 -1
- package/es/{el-popover-6f075cee.js → el-popover-c8b2456c.js} +4 -4
- package/es/{el-popper-8dca8dd4.js → el-popper-d3eef7ed.js} +4 -4
- package/es/{el-scrollbar-906103f8.js → el-scrollbar-66f3bb72.js} +1 -1
- package/es/{el-select-6d6093eb.js → el-select-5fb7d469.js} +10 -10
- package/es/{el-table-column-3f388c44.js → el-table-column-560db3aa.js} +14 -15
- package/es/el-table-column-dd8b62aa.cjs +14 -0
- package/es/{el-tag-cdf0019e.js → el-tag-6a31c968.js} +3 -3
- package/es/index-68ee64fa.js +81 -0
- package/es/{index-f8e448bc.js → index-8542fe24.js} +3924 -3873
- package/es/{use-global-config-ac2dad80.cjs → index-8a0b1c53.cjs} +3 -1
- package/es/{index-53bce290.js → index-a1ecf26c.js} +3 -3
- package/es/{index-d1b7c61e.cjs → index-a96158ae.cjs} +41 -36
- package/es/{index-6ced00c4.js → index-fa07a823.js} +1 -1
- package/es/{raf-b584bce8.js → raf-377cf8f5.js} +1 -1
- package/es/{refs-e1675167.js → refs-46cf8186.js} +1 -1
- package/es/{scroll-25ec9230.js → scroll-1efa8148.js} +1 -1
- package/es/style.css +1 -1
- package/es/{use-form-common-props-f7d2e83c.js → use-form-common-props-9c0363ac.js} +1 -1
- package/es/{vnode-699e61cb.js → vnode-cfcdab70.js} +1 -1
- package/es/{zh-cn-61ca7f91.js → zh-cn-4a476dc8.js} +2 -2
- package/es/{zh-cn-a20960b5.cjs → zh-cn-ab9a583d.cjs} +1 -1
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +202 -202
- package/lib/{index-0207fed8.js → index-c2cabc8b.js} +32548 -34091
- package/lib/{python-cac37206.js → python-d3e3fec3.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/KlineBasic/api.js +39 -41
- package/packages/KlineBasic/index.vue +207 -159
- package/packages/KlineBasic/utils.js +173 -72
- package/src/pages/KlineBasic/index.vue +1 -0
- package/es/config-provider-4954003d.cjs +0 -1
- package/es/el-button-c7b375c4.cjs +0 -1
- package/es/el-form-item-b686a8bb.js +0 -1599
- package/es/el-form-item-ff0d8d07.cjs +0 -12
- package/es/el-message-e97bdea1.cjs +0 -1
- package/es/el-overlay-7b90d61c.cjs +0 -1
- package/es/el-table-column-26e7f13f.cjs +0 -14
- package/es/index-669a0983.js +0 -14
- package/es/index-c4649a37.cjs +0 -3
- package/es/use-global-config-8429db7d.js +0 -72
package/es/Kline.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("./base-ec05f348.cjs");const ae=require("./el-menu-item-dc904a35.cjs");require("./el-tooltip-0ea8fbf8.cjs");require("./el-popper-f62316cd.cjs");const n=require("vue"),je=require("echarts"),P=require("./_plugin-vue_export-helper-f246444f.cjs"),J=require("./index-d1b7c61e.cjs"),ue=require("./index.esm-94a95a2a.cjs");require("./el-tag-3b03d13e.cjs");const Me=require("./el-select-928f8c19.cjs");require("./el-scrollbar-d1c3e7f7.cjs");require("./use-form-common-props-1b84d8f4.cjs");require("./index-e1e83173.cjs");require("./index-eea0bcb3.cjs");require("./typescript-b63f8e83.cjs");require("./vnode-7fbc61e1.cjs");require("./index-80a2b137.cjs");require("./castArray-a45823fe.cjs");require("./event-61f49698.cjs");require("./scroll-41224831.cjs");require("./debounce-b2ff12bd.cjs");function de(M){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(M){for(const i in M)if(i!=="default"){const e=Object.getOwnPropertyDescriptor(M,i);Object.defineProperty(t,i,e.get?e:{enumerable:!0,get:()=>M[i]})}}return t.default=M,Object.freeze(t)}const H=de(je),ye={class:"st-kline-tips"},ge={class:"st-kline-tips-row"},Te=n.defineComponent({__name:"index",props:{data:{type:Array,default:()=>[]}},setup(M){return(t,i)=>(n.openBlock(),n.createElementBlock("div",ye,[n.createElementVNode("div",ge,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(M.data,e=>(n.openBlock(),n.createElementBlock("div",{class:"st-kline-tips-row-item",style:n.normalizeStyle({color:e.color})},n.toDisplayString(e.label)+" "+n.toDisplayString(e.value),5))),256))])]))}});const X=P._export_sfc(Te,[["__scopeId","data-v-78aed210"]]),De=n.defineComponent({__name:"index",emits:["closeContextMenuCallBack"],setup(M,{emit:t}){const i=t,e=n.ref(),o=n.ref(),a=n.ref({display:"none",top:"0px",left:"0px"}),j=()=>{a.value.display="none",i("closeContextMenuCallBack"),document.removeEventListener("click",j)},s=r=>{if(r.preventDefault(),r.stopPropagation(),a.value.display==="block"){const{offsetX:c,offsetY:d}=r,{offsetWidth:I,offsetHeight:u}=o.value;if(c<=I&&d<=u)return}e.value.click(),a.value={display:"block",top:`${r.offsetY}px`,left:`${r.offsetX}px`},n.nextTick(()=>{const{bottom:c,height:d,right:I,width:u}=o.value.getBoundingClientRect();c>window.innerHeight?a.value={display:"block",top:`${r.offsetY-d}px`,left:`${r.offsetX}px`}:I>window.innerWidth&&(a.value={display:"block",top:`${r.offsetY}px`,left:`${r.offsetX-u}px`})}),document.addEventListener("click",j)};return(r,c)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"contextmenuRef",ref:e,class:"contextmenu",onContextmenu:s,onMouseleave:j},[n.renderSlot(r.$slots,"default",{},void 0,!0),a.value.display!=="none"?(n.openBlock(),n.createElementBlock("div",{key:0,ref_key:"contextmenuContentRef",ref:o,class:"contextmenu-popover",style:n.normalizeStyle(a.value)},[n.renderSlot(r.$slots,"popover",{},void 0,!0)],4)):n.createCommentVNode("",!0)],544))}});const Ie=P._export_sfc(De,[["__scopeId","data-v-249fd104"]]);let le=!1,re=!0,ce=[];const se=M=>{const t=[],i=[],e=[],o=[],a=[],j=[];return M.forEach((s,r)=>{t.push(s[0]),i.push(s[1]),e.push(s[4]),o.push(s[2]),a.push(s[3]),j.push([s[1],s[4],s[3],s[2],Number(s[6]),r===0?s[4]:M[r-1][4]])}),{time:t,open:i,close:e,high:o,low:a,kLineData:j}},Le=async()=>{if(!le)le=!0,await ue.init("./talib.wasm"),re=!1,ce.forEach(M=>{M()});else if(re)return new Promise(M=>{ce.push(M)})},$=(M,t)=>M.length>t?M.slice(M.length-t):M,pe=(M,t,i)=>M.calculationFn?M.calculationFn(ue.talib,t,i):new Array(t.time.length).fill(null),fe=async(M,t,i)=>{const e=se(M);let o=[];return o=se(o),await Le(),{originData:$(M,i),kLine:$(e.kLineData,i),time:$(e.time,i),indicator:t.config.reduce((a,j)=>(a.push({key:j.key,color:j.color,data:$(pe(j,e,o),i)}),a),[])}},K="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjgzNzAzMjM4NzI1IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjI2MjUiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTE5OC4wMTYgMTA5LjczODY2N0E3Ny44NjY2NjcgNzcuODY2NjY3IDAgMCAwIDE3MC42NjY2NjcgMTY3LjY4bDAuNTEyIDQxOC45NDRjMCAyMi44NjkzMzMgNi40IDQ4IDE5LjAyOTMzMyA3NS4zMDY2NjcgMTIuNjcyIDI3LjIyMTMzMyAyNy45ODkzMzMgNDguOTM4NjY3I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xMy4zNTQ2NjctMTEuOTQ2NjY3IDI1LjMwMTMzMy0yOC44NDI2NjcgMzUuNjI2NjY2LTUxLjA3MiAxMC4xMTItMjEuNzYgMTQuNzYyNjY3LTQwLjUzMzMzMyAxNC41MDY2NjctNTcuMDAyNjY3TDgxMC42NjY2NjcgMTY3LjIxMDY2N2MwLTkuODk4NjY3LTMuNTg0LTE3LjYyMTMzMy0xMi41MDEzMzQtMjUuNkE1NC42OTg2NjcgNTQuNjk4NjY3IDAgMCAwIDc2MS42IDEyOGwtNDk5LjYyNjY2NyAwLjQ2OTMzM2E1MS4zMjggNTEuMzI4IDAgMCAwLTM1Ljc1NDY2NiAxMy4yNjkzMzQgMzYuNTY1MzMzIDM2LjU2NTMzMyAwIDAgMC0xMi41MDEzMzQgMjEuNTA0bC0wLjQyNjY2NiA0LjY5MzMzM3oiIGZpbGw9IiNBRTQ0RkYiIHAtaWQ9IjMwODAiPjwvcGF0aD48cGF0aCBkPSJNNDc1LjMwNjY2NyA2NTguMjE4NjY3aDczLjQ3MlYzMDYuMzg5MzMzaDExNi40OFYyNDguNDQ4aC0zMDcuNjI2NjY3djU3Ljk0MTMzM2gxMTcuNjc0NjY3eiIgZmlsbD0iI0ZGRkZGRiIgcC1pZD0iMzA4MSI+PC9wYXRoPjwvc3ZnPg==",W=(M,t)=>{const{type:i="log",color:e="black"}=t??{};localStorage.getItem("st-kline-console-show")==="true"&&console[i](`%c${M}`,`color:${e}`)},C=M=>M||M===0?Math.round(M*1e3)/1e3:null,xe=M=>M>=1e12?`${(M/1e12).toFixed(2)}万亿`:M>=1e8?`${(M/1e8).toFixed(2)}亿`:M>=1e4?`${(M/1e4).toFixed(2)}万`:M.toFixed(2),Ye=M=>{const{y:t,text:i,info:e,gridLeft:o,gridRight:a,echartsWidth:j,echartsInstance:s}=M,{config:r,event:c}=e;let d=0;return{type:"group",draggable:r.draggable?"vertical":!1,children:[{type:"line",info:e,shape:{x1:o,y1:t,x2:j-a,y2:t},style:{stroke:r.lineColor,lineWidth:1,lineDash:[8,4]},z:10},{type:"group",x:j,y:t-5,children:[{type:"text",left:-1*a,info:e,style:{fill:r.textColor,text:i,stroke:"#000",lineWidth:1,opacity:1},z:10}]}],onmouseover:I=>{c.onmouseover instanceof Function&&c.onmouseover(I,e)},onmouseout:I=>{c.onmouseout instanceof Function&&c.onmouseout(I,e)},ondragstart:I=>{c.ondragstart instanceof Function&&r.draggable&&(d=I.offsetY,c.ondragstart(I,e))},ondragend:I=>{if(c.ondragend instanceof Function&&r.draggable){const N=I.offsetY-d;if(N===0)return;const L=s.convertFromPixel({yAxisIndex:0},t+N);c.ondragend(I,e,L)}}}},Ae=M=>{const{y:t,text:i,info:e,gridLeft:o,gridRight:a,echartsWidth:j,echartsInstance:s}=M,{config:r,event:c}=e;let d=0;const I=N=>{let L=null;N.target.type==="line"?L=N.target.parent:N.target.type==="tspan"&&(L=N.target.parent.parent.parent),L.children()[1].children()[0].animate("style",!1).when(200,{opacity:1}).start()},u=N=>{let L=null;N.target.type==="line"?L=N.target.parent:N.target.type==="tspan"&&(L=N.target.parent.parent.parent),L.children()[1].children()[0].animate("style",!1).when(200,{opacity:0}).start()};return{type:"group",draggable:r.draggable?"vertical":!1,children:[{type:"line",info:e,shape:{x1:o,y1:t,x2:j-a,y2:t},style:{stroke:r.lineColor,lineWidth:1},z:10},{type:"group",x:j/2,y:t-5,children:[{type:"text",left:"center",info:e,style:{fill:r.textColor,text:i,stroke:"#000",lineWidth:1,opacity:0},z:10}]}],onmouseover:N=>{c.onmouseover instanceof Function?c.onmouseover(N,e):I(N)},onmouseout:N=>{c.onmouseout instanceof Function?c.onmouseout(N,e):u(N)},ondragstart:N=>{c.ondragstart instanceof Function&&r.draggable&&(d=N.offsetY,c.ondragstart(N,e))},ondragend:N=>{if(c.ondragend instanceof Function&&r.draggable){const l=N.offsetY-d;if(l===0)return;const f=s.convertFromPixel({yAxisIndex:0},t+l);c.ondragend(N,e,f)}}}},me=M=>{const{y:t,text:i,profitY:e,profitText:o,lossY:a,lossText:j,info:s,gridLeft:r,gridRight:c,echartsWidth:d,echartsInstance:I}=M,{config:u,event:N}=s;let L=0,l=null,f=null;const w=(z,g)=>{var D,Y,m,k;(D=z.children()[2])==null||D.animate("style",!1).when(200,{opacity:~~g}).start(),(Y=z.children()[3].children()[0])==null||Y.animate("style",!1).when(200,{opacity:~~g}).start(),(m=z.children()[4])==null||m.animate("style",!1).when(200,{opacity:~~g}).start(),(k=z.children()[5].children()[0])==null||k.animate("style",!1).when(200,{opacity:~~g}).start()},h=z=>{let g=null;z.target.type==="line"?g=z.target.parent:z.target.type==="tspan"&&(g=z.target.parent.parent.parent),l=D=>{D.preventDefault(),(D.code==="AltLeft"||D.code==="AltRight")&&w(g,!0)},f=D=>{(D.code==="AltLeft"||D.code==="AltRight")&&w(g,!1)},window.addEventListener("keydown",l),window.addEventListener("keyup",f)},v=z=>{let g=null;z.target.type==="line"?g=z.target.parent:z.target.type==="tspan"&&(g=z.target.parent.parent.parent),w(g,!1),window.removeEventListener("keydown",l),window.removeEventListener("keyup",f)};return{type:"group",draggable:u.draggable?"vertical":!1,children:[{type:"line",info:s,shape:{x1:r,y1:t,x2:d-c,y2:t},style:{stroke:u.lineColor,lineWidth:1},z:10},{type:"group",x:d/2,y:t-5,children:[{type:"text",left:"center",info:s,style:{fill:u.textColor,text:i,stroke:"#000",lineWidth:1,opacity:1},z:10}]},{type:"line",info:s,shape:{x1:r,y1:e,x2:d-c,y2:e},style:{stroke:u.profitLineColor,lineWidth:1,lineDash:[8,4],opacity:0},z:10},{type:"group",x:d/2,y:e-5,children:[{type:"text",left:"center",info:s,style:{fill:u.profitTextColor,text:o,stroke:"#000",lineWidth:1,opacity:0},z:10}]},{type:"line",info:s,shape:{x1:r,y1:a,x2:d-c,y2:a},style:{stroke:u.lossLineColor,lineWidth:1,lineDash:[8,4],opacity:0},z:10},{type:"group",x:d/2,y:a-5,children:[{type:"text",left:"center",info:s,style:{fill:u.lossTextColor,text:j,stroke:"#000",lineWidth:1,opacity:0},z:10}]}],onmouseover:z=>{N.onmouseover instanceof Function?N.onmouseover(z,s):h(z)},onmouseout:z=>{N.onmouseout instanceof Function?N.onmouseout(z,s):v(z)},ondragstart:z=>{N.ondragstart instanceof Function&&u.draggable&&(L=z.offsetY,N.ondragstart(z,s))},ondragend:z=>{if(N.ondragend instanceof Function&&u.draggable){const D=z.offsetY-L;if(D===0)return;const Y=I.convertFromPixel({yAxisIndex:0},t+D);N.ondragend(z,s,Y)}}}},q=(M,t)=>{const{direction:i="",tradeAction:e="",tradeType:o=""}=M;if(t==="sellBuy"){const a=o??i+e;return new Map([["开多","买"],["平多","卖"],["开空","卖"],["平空","买"]]).get(a)}else if(t==="openClose")return o??i+e},we=(M,t)=>M.reduce((i,e)=>{var d;const o=q(e,"sellBuy"),a=M.filter(I=>I.time===e.time);let j="image://"+new URL(Object.assign({"./images/buy.svg":K,"./images/sell.svg":ee,"./images/t.svg":te})[`./images/${o==="买"?"buy":"sell"}.svg`],self.location).href;a.length>1?[...new Set(a.map(u=>q(u,"sellBuy")))].length>1?j="image://"+new URL("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjgzNzAzMjI4MjAyIiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjMwNzgiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTE5OC4wMTYgMTA5LjczODY2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AyNjY3TDgxMC42NjY2NjcgMTY3LjIxMDY2N2MwLTkuODk4NjY3LTMuNTg0LTE3LjYyMTMzMy0xMi41MDEzMzQtMjUuNkE1NC42OTg2NjcgNTQuNjk4NjY3IDAgMCAwIDc2MS42IDEyOGwtNDk5LjYyNjY2NyAwLjQ2OTMzM2E1MS4zMjggNTEuMzI4IDAgMCAwLTM1Ljc1NDY2NiAxMy4yNjkzMzQgMzYuNTY1MzMzIDM2LjU2NTMzMyAwIDAgMC0xMi41MDEzMzQgMjEuNTA0bC0wLjQyNjY2NiA0LjY5MzMzM3oiIGZpbGw9IiNBRTQ0RkYiIHAtaWQ9IjMwODAiPjwvcGF0aD48cGF0aCBkPSJNNDc1LjMwNjY2NyA2NTguMjE4NjY3aDczLjQ3MlYzMDYuMzg5MzMzaDExNi40OFYyNDguNDQ4aC0zMDcuNjI2NjY3djU3Ljk0MTMzM2gxMTcuNjc0NjY3eiIgZmlsbD0iI0ZGRkZGRiIgcC1pZD0iMzA4MSI+PC9wYXRoPjwvc3ZnPg==",self.location).href:j="image://"+new URL(Object.assign({"./images/buy.svg":K,"./images/sell.svg":ee,"./images/t.svg":te})[`./images/${o==="买"?"buy":"sell"}.svg`],self.location).href:j="image://"+new URL(Object.assign({"./images/buy.svg":K,"./images/sell.svg":ee,"./images/t.svg":te})[`./images/${o==="买"?"buy":"sell"}.svg`],self.location).href;const r=(t.find(I=>I[0]===e.time)??[])[2],c=((d=e==null?void 0:e.markLineTarget)==null?void 0:d.map(I=>{const u=e.time,N=r+"",L=I.time,l=t.find(w=>w[0]===I.time),f=l?l[3]:null;return[{coord:[u,N],lineStyle:I.lineStyle},{coord:[L,f]}]}))??null;return i.push({symbol:j,symbolSize:25,animation:!1,coord:[e.time+"",r],symbolRotate:0,symbolOffset:[0,"-7"],markLineTarget:c}),i},[]),he=(M,t)=>M.reduce((i,e,o)=>{var I;const a=q(e,"openClose"),j=a==="开多"||a==="开空"?"top":"bottom",s=t.find(u=>u[0]===e.time)??[],r=j==="top"?s[2]:s[3];let c=7;c+=M.slice(0,o).filter(u=>{const N=q(u,"openClose");return(N==="开多"||N==="开空"?"top":"bottom")===j&&u.time===e.time}).length*7;const d=((I=e==null?void 0:e.markLineTarget)==null?void 0:I.map(u=>{const N=e.time,L=r+"",l=u.time,f=t.find(w=>w[0]===u.time)[3];return[{coord:[N,L],lineStyle:u.lineStyle},{coord:[l,f]}]}))??null;return i.push({symbol:"triangle",symbolSize:[10,12],animation:!1,coord:[e.time+"",r],symbolRotate:j==="top"?180:0,symbolOffset:[0,`${j==="top"?c*-1:c}`],itemStyle:{color:j==="top"?"#FF0000":"#389e0d"},label:{show:!0,position:j,color:"#fff",formatter:`${a} ${j==="top"?"+":"-"} ${e.amount}手 ${e.part?`(${e.part}份)`:""}`},markLineTarget:d}),i},[]),Ce=(M,t)=>M.reduce((i,e)=>{const{key:o,data:a}=e;if(a===null||a.length===0)return i;const s=new Map([["sellBuy",()=>we(a,t)],["openClose",()=>he(a,t)],["signal",()=>{}]]).get(o);return s instanceof Function&&i.push(...s()),i},[]),ne=async(M,t,i,e,o,a)=>{const{totalBarCount:j,defaultShowBarCount:s,maxValueSpan:r,gridLeft:c,gridTop:d,gridRight:I,gridBottom:u,zoomLock:N}=e,{time:L,kLine:l,originData:f,indicator:w}=await fe(M,i,j),h=w.map(g=>{const{key:D,data:Y,color:m}=g;return{name:D,type:"line",silent:!0,symbol:"none",data:Y,lineStyle:{width:1},itemStyle:{color:m}}}),v=Ce(t,f);let z=[];return v.forEach(g=>{g.markLineTarget&&(z=[...z,...g.markLineTarget])}),{animation:!1,dataset:{id:"data",source:{klineData:l,indicatorData:w}},grid:{left:`${c}px`,top:`${d}px`,right:`${I}px`,bottom:`${u}px`},tooltip:{trigger:"axis",axisPointer:{type:"cross",label:{formatter:g=>{const{axisDimension:D,value:Y}=g;return D==="x"?Y:String(C(Y))}}},formatter:g=>{let D=null,Y="";return g.forEach(m=>{m.seriesName==="资产持仓净值"&&m.data!==null&&(Y+=`<div>资产持仓净值: ${m.data}</div>`),m.componentSubType==="candlestick"&&t.forEach(k=>{const{key:E,data:F}=k;if(E==="sellBuy"){const b=F.filter(x=>x.time===m.axisValue);let B=0,T=0;b.forEach(x=>{x.tradeType==="开多"||x.tradeType==="平空"?B+=x.amount:T+=x.amount}),B&&(Y+=`<div>买: ${B}</div>`),T&&(Y+=`<div>卖: ${T}</div>`)}E==="openClose"&&F.forEach(b=>{b.time===m.axisValue&&(Y+=b.tooltip)})}),Y&&(D=`<div><span style="font-weight: bold;">${m.axisValue}</span>${Y}</div>`)}),D}},xAxis:{type:"category",data:L,axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}},axisLabel:{show:!0,formatter:g=>g}},yAxis:[{index:0,splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}},min:g=>{const{min:D,max:Y}=g,m=Math.abs((Y-D)/10);return D-m},max:g=>{const{min:D,max:Y}=g,m=Math.abs((Y-D)/10);return Y+m},axisLine:{show:!0},axisLabel:{formatter:g=>C(g),showMaxLabel:!1}},{show:!1,min:"dataMin"}],dataZoom:[{type:"inside",xAxisIndex:[0,0],zoomLock:N,maxValueSpan:r,start:l.length>=s?(l.length-s)/l.length*100:0,end:99.99}],series:[{name:"k线",type:"candlestick",data:l,markPoint:{data:v},markLine:{position:"middle",textStyle:{color:"blue",fontSize:15},animation:!1,data:z,lineStyle:{width:3,type:"solid"},symbol:["none","none"]},itemStyle:{color:"transparent",color0:"#00FFFF",borderColor:"#FF0000",borderColor0:"#00FFFF",borderWidth:1},z:1},...h,{name:"资产持仓净值",type:"line",data:o??[],symbol:"none",yAxisIndex:1,connectNulls:!0,itemStyle:{color:"#666"}},{name:"二腿相关度",type:"line",data:a??[],symbol:"none",yAxisIndex:1,connectNulls:!0,itemStyle:{color:"#FFF"},lineStyle:{width:2},label:{show:!0,position:"top",formatter:g=>`相关度: ${g.data[1]}`,textStyle:{color:"#FFF",fontSize:14}}}],toolbox:{show:!1},brush:{xAxisIndex:"all",brushLink:"all",transformable:!1,outOfBrush:{colorAlpha:1},brushStyle:{color:"rgba(120,140,180,0)",borderColor:"rgba(255,255,255,0.4)"}}}},Oe=(M,t,i)=>{var I;const{gridLeft:e,gridRight:o,gridBottom:a,warningConfig:j,positionConfig:s,conditionConfig:r,isOpenDS:c}=t;let d=[];if((I=i==null?void 0:i.getModel())!=null&&I.getComponent){const[u,N]=i.getModel().getComponent("yAxis").axis.scale._extent;let L=[],l={},f=[],w={},h=[],v={};if(M.forEach(({key:z,data:g,...D})=>{z==="warning"?(L=g,l=D):z==="position"?(f=g,w=D):z==="condition"&&(h=g,v=D)}),L.length>0&&(d=L.reduce((z,g)=>{const{value:D,text:Y,info:m,config:k}=g;if(D>N||D<u)return z;const E={y:i.convertToPixel({yAxisIndex:0},D),text:Y,info:{info:m,config:{...j,...k},event:{...l}},gridLeft:e,gridRight:o,echartsWidth:i.getWidth(),echartsInstance:i};return[...z,Ye(E)]},d)),f.length>0&&(d=f.reduce((z,g)=>{const{value:D,text:Y,info:m,config:k}=g;if(D>N||D<u)return z;const E={y:i.convertToPixel({yAxisIndex:0},D),text:Y,info:{info:m,config:{...s,...k},event:{...w}},gridLeft:e,gridRight:o,echartsWidth:i.getWidth(),echartsInstance:i};return[...z,Ae(E)]},d)),h.length>0&&(d=h.reduce((z,g)=>{const{value:D,text:Y,profitValue:m,profitText:k,lossValue:E,lossText:F,info:b,config:B}=g;if(D>N||D<u)return z;const T={y:i.convertToPixel({yAxisIndex:0},D),text:Y,profitY:i.convertToPixel({yAxisIndex:0},m),profitText:k,lossY:i.convertToPixel({yAxisIndex:0},E),lossText:F,info:{info:b,config:{...r,...B},event:{...v}},gridLeft:e,gridRight:o,echartsWidth:i.getWidth(),echartsInstance:i};return[...z,me(T)]},d)),c){const z=i.getOption(),g=z.dataset[0].source.klineData.slice(z.dataZoom[0].startValue,z.dataZoom[0].endValue+1),D={};g.forEach(T=>{D[T[1]]?D[T[1]]+=1:D[T[1]]=1});const Y=g[g.length-1][1],m=g.reduce((T,x)=>T+x[1],0)/g.length,k=Y-m,E=ve(g,1,50),F=Ee(g),b=F?k/F:0,B=ke(g,1,Y);d=[...d,{type:"group",draggable:!1,children:Object.keys(D).map(T=>({type:"line",shape:{x1:i.getWidth()-o-100*D[T],y1:i.convertToPixel({yAxisIndex:0},T),x2:i.getWidth()-o,y2:i.convertToPixel({yAxisIndex:0},T)},style:{stroke:"rgb(124,124,124)",lineWidth:1},z:10}))},{type:"text",x:e+6,y:i.getHeight()-a-20,style:{fill:"#FFF",text:`均值: ${C(m)} 距均值: ${C(k)} 中值: ${C(E)} 标准差: ${C(F)} 距均值/标准差: ${C(b)} 百分位: ${C(B)}%`,lineWidth:1,opacity:1},z:10}]}}return{elements:d}},ke=(M,t,i)=>{const{round:e,add:o,subtract:a,multiply:j,divide:s}=J.x,r=M.map(d=>d[t]).sort((d,I)=>d-I);let c=0;for(let d=0;d<r.length;d++)if(r[d]===i){c=d;break}else if(r[d]>=i){c=o(d,s(a(r[d+1],r[d]),r[d]));break}return e(s(j(c,100),M.length+1))},ve=(M,t,i)=>{const{round:e,add:o,subtract:a,multiply:j,divide:s}=J.x,r=M.map(u=>u[t]).sort((u,N)=>u-N),c=j(M.length+1,s(i,100)),d=Math.floor(c),I=a(c,d);return e(I===0?r[c]:o(r[d],j(a(r[d>=M.length-1?d:d+1],r[d]),I)))};function Ee(M){const t=M.map(j=>j[1]),i=t.length;let e=0,o=0;for(const j of t)e+=j;const a=e/i;for(const j of t)o+=Math.pow(j-a,2);return Math.sqrt(o/i)}const be={class:"st-kline"},Se={class:"st-kline-header"},_e=300,Fe=n.defineComponent({__name:"index",props:{indicator:{type:Object,default:()=>({})},klineData:{type:Array,default:()=>[]},markData:{type:Array,default:()=>[]},lineData:{type:Array,default:()=>[]},netPositionData:{type:Array,default:()=>[]},relevanceData:{type:Array,default:()=>[]},priceTrendData:{type:Array,default:()=>[]},priceTrendPercentData:{type:Array,default:()=>[]},brushRange:{type:Array,default:()=>[]},defaultMenuData:{type:Array,default:()=>[]},isSelect:{type:Boolean,default:()=>!1},config:{type:Object,default:()=>({})}},setup(M){const t=M,i={totalBarCount:2e3,defaultShowBarCount:200,preBarCount:800,maxValueSpan:1e4,gridLeft:60,gridTop:0,gridRight:60,gridBottom:30,warningConfig:{draggable:!1,lineColor:"#fff",textColor:"#fff"},positionConfig:{draggable:!1,lineColor:"#e45d07",textColor:"#fff"},conditionConfig:{draggable:!1,lineColor:"#fff",textColor:"#fff",profitLineColor:"#b71e44",profitTextColor:"#fff",lossLineColor:"#749b66",lossTextColor:"#fff"},tipsConfig:{open:!0,heigh:!0,low:!0,close:!0,business:!0,riseAndFall:!0},dynamicLoadConfig:{historyVisible:!1,historyLoadCallBack:()=>{},futureVisible:!1,futureLoadCallBack:()=>{}},zoomLock:!1,isOpenDS:!1},e=n.computed(()=>({...i,...t.config})),o=n.ref(null),a=n.ref(-1),j=n.computed(()=>{var T,x;if(o.value&&((x=(T=o.value.dataset[0])==null?void 0:T.source)!=null&&x.klineData[a.value])){const p=o.value.dataset[0].source.klineData[a.value],y=[],{open:A,heigh:O,low:S,close:Q,business:V,riseAndFall:R}=e.value.tipsConfig;if(A&&y.push({label:"开",value:C(p[0]),color:"rgb(153, 153, 153)"}),O&&y.push({label:"高",value:C(p[3]),color:"rgb(153, 153, 153)"}),S&&y.push({label:"低",value:C(p[2]),color:"rgb(153, 153, 153)"}),Q&&y.push({label:"收",value:C(p[1]),color:"rgb(153, 153, 153)"}),V&&y.push({label:"额",value:xe(p[4]),color:"rgb(153, 153, 153)"}),R){let U=((p[1]-p[5])/p[1]*100).toFixed(2),_=+U==0?"white":+U>0?"red":"#00ff00";y.push({label:"涨跌",value:`${U}%`,color:_})}return y}return[]}),s=n.computed(()=>{var T,x;return o.value&&((x=(T=o.value.dataset[0])==null?void 0:T.source)!=null&&x.indicatorData)?o.value.dataset[0].source.indicatorData.reduce((p,y)=>(y.data[a.value]&&p.push({label:y.key,value:C(y.data[a.value]),color:y.color}),p),[]):[]}),r=n.computed(()=>{const T=["#FFFFFF","#FFDD00","#FF00FF","#00FF00","#FF6000","#1677FF","#7C3CC9","#FF0000","#FB9A0E","#00B7FF"];if(t.priceTrendData.length>0){const x=[];return t.priceTrendData.forEach((p,y)=>{var O;(p.data[a.value]?C(p.data[a.value][1]):null)!==null&&x.push({label:p.name,value:C((O=p.data[a.value])==null?void 0:O[1]),color:T[y]})}),x}if(t.priceTrendPercentData.length>0){const x=[];return l.getOption().series.filter(y=>y.name.includes("二腿价格走势百分比图")).forEach((y,A)=>{var S;(y.data[a.value]?C(y.data[a.value][1]):null)!==null&&x.push({label:y.name.split("-")[1],value:`${C((S=y.data[a.value])==null?void 0:S[1])}%`,color:T[A]})}),x}return[]});n.watch(()=>[t.klineData,t.indicator,t.markData,t.netPositionData,t.relevanceData],()=>{c()},{deep:!0}),n.watch(()=>t.lineData,async()=>{W("st-kline组件消息:props.lineData监控,额外画线数据发生改变,重绘->line",{color:"red"}),c("line")},{deep:!0}),n.watch(()=>t.brushRange,async()=>{W("st-kline组件消息:props.brushRange监控,区域刷选数据发生改变,重绘->brush",{color:"red"}),c("brush")},{deep:!0}),n.watch(()=>t.priceTrendData,async()=>{c("priceTrend")},{deep:!0}),n.watch(()=>t.priceTrendPercentData,async()=>{c("priceTrendPercent")},{deep:!0});const c=async T=>{const p=new Map([["kline",async()=>{const y=await ne(t.klineData,t.markData,t.indicator,e.value,t.netPositionData,t.relevanceData),{graphic:A}=l.getOption()??{graphic:[]};o.value={...y,graphic:A},l.setOption(o.value,!0),W("st-kline组件消息:K线绘制完毕-draw",{color:"green"})}],["line",()=>{const y=l.getOption(),A=Oe(t.lineData,e.value,l);o.value={...y,graphic:A},l.setOption(o.value,{replaceMerge:["graphic"]}),W("st-kline组件消息:额外画线绘制完毕-draw",{color:"green"})}],["brush",()=>{const{brushRange:y}=t;y instanceof Array&&y.length>0&&(l.dispatchAction({type:"brush",areas:[{brushType:"lineX",coordRange:[y[0]+"",y[1]+""],xAxisIndex:0}]}),W("st-kline组件消息:区域刷选绘制完毕-draw",{color:"green"}))}],[void 0,async()=>{await c("kline"),await c("line"),await c("priceTrend"),await c("priceTrendPercent"),await c("brush")}],["history",async()=>{const y=l.getOption(),A=await ne(t.klineData,t.markData,t.indicator,e.value,t.netPositionData,t.relevanceData),O=A.dataset.source.klineData.length-y.dataset[0].source.klineData.length;l.setOption({...A,dataZoom:[{type:"inside",xAxisIndex:[0,0],zoomLock:e.value.zoomLock,maxValueSpan:e.value.maxValueSpan,startValue:y.dataZoom[0].startValue+O,endValue:y.dataZoom[0].endValue+O}]},!0),await c("priceTrend")}],["future",async()=>{const y=l.getOption(),A=await ne(t.klineData,t.markData,t.indicator,e.value,t.netPositionData,t.relevanceData);A.dataZoom[0].start=(t.klineData.length-y.dataZoom[0].endValue+y.dataZoom[0].startValue)/t.klineData.length*100,l.setOption(A,!0),await c("priceTrend")}],["priceTrend",()=>{if(t.priceTrendData.length===0)return;const y=l.getOption(),A=["#FFFFFF","#FFDD00","#FF00FF","#00FF00","#FF6000","#1677FF","#7C3CC9","#FF0000","#FB9A0E","#00B7FF"],O=t.priceTrendData.reduce((S,Q,V)=>{const{name:R,data:U}=Q,_={name:`二腿价格走势图-${R}`,type:"line",data:U,symbol:"none",yAxisIndex:1,connectNulls:!0,itemStyle:{color:A[V]},lineStyle:{type:"dashed",width:1}};return S.push(_),S},[]);o.value={...y,series:[...y.series,...O]},l.setOption(o.value,{replaceMerge:["series"]})}],["priceTrendPercent",async()=>{if(t.priceTrendPercentData.length===0)return;const y=l.getOption(),A=["#FFFFFF","#FFDD00","#FF00FF","#00FF00","#FF6000","#1677FF","#7C3CC9","#FF0000","#FB9A0E","#00B7FF"],O=y.dataZoom[0].startValue,S=t.priceTrendPercentData.reduce((Q,V,R)=>{const{name:U,data:_}=V,Z=_.length>e.value.totalBarCount?_.slice(_.length-e.value.totalBarCount):_,G=Z[O][1],Ne=Z.map(ie=>[ie[0],(ie[1]-G)/G*100]),ze={name:`二腿价格走势百分比图-${U}`,type:"line",data:Ne,symbol:"none",yAxisIndex:1,connectNulls:!0,itemStyle:{color:A[R]},lineStyle:{type:"dashed",width:1}};return Q.push(ze),Q},[]);y.series=[...y.series.filter(Q=>!Q.name.includes("二腿价格走势百分比图")),...S],l.setOption(y,!0)}]]).get(T);p instanceof Function&&await p()},d=n.ref(!1),I=n.ref([]),u=T=>{const{callBack:x}=T;x instanceof Function&&x(l,d)},N=()=>{I.value=t.defaultMenuData},L=n.ref();let l,f;const w=(T,x)=>{var p,y;if(T)a.value=typeof((p=T==null?void 0:T.batch[0])==null?void 0:p.dataIndex)=="number"?(y=T==null?void 0:T.batch[0])==null?void 0:y.dataIndex:-1;else{const A=x.getOption();A.dataZoom instanceof Array&&(a.value=A.dataZoom[0].endValue)}};let h=null,v=!1,z=n.ref(!1),g=!1,D=n.ref(!1);const Y=async T=>{const x=T.batch?T.batch[0].start*e.value.totalBarCount:T.startValue;e.value.dynamicLoadConfig.historyVisible&&x<=100&&!v&&!z.value&&(v=!0,await e.value.dynamicLoadConfig.historyLoadCallBack(z),await c("history"),v=!1);const p=T.batch?T.batch[0].end===100:T.endValue>=t.klineData.length-e.value.preBarCount-1,y=T.actionIsWheel;e.value.dynamicLoadConfig.futureVisible&&p&&!g&&!D.value&&!y&&(g=!0,await e.value.dynamicLoadConfig.futureLoadCallBack(D),await c("future"),g=!1),clearTimeout(h),h=setTimeout(()=>{c("line"),c("priceTrendPercent"),clearTimeout(h),h=null},_e)};let m=null;const k=T=>{m=setTimeout(()=>{var x;if(T.componentType==="graphic"){const{oncontextmenu:p}=((x=T.info)==null?void 0:x.event)??{};p instanceof Function&&p(T,T.info,I)}clearTimeout(m),m=null})},E=()=>{l.on("highlight",T=>{w(T,l)}),l.on("globalout",()=>{w(null,l)}),l.on("contextmenu",T=>{k(T)}),l.on("datazoom",T=>{Y(T)})},F=()=>{l.off("highlight"),l.off("globalout"),l.off("contextmenu"),l.off("datazoom")},b=T=>{if(!l||!(T.ctrlKey||t.isSelect))return;const x=l.getOption();let{startValue:p,endValue:y,start:A,end:O}=x.dataZoom[0];const S=()=>{p!==0&&(p=p-1,y=y-1,l.dispatchAction({type:"dataZoom",startValue:p,endValue:y,maxValueSpan:e.value.maxValueSpan}))},Q=()=>{if(e.value.dynamicLoadConfig.futureVisible&&!g&&!D.value)p=p+1,y=y+1,l.dispatchAction({type:"dataZoom",startValue:p,endValue:y,maxValueSpan:e.value.maxValueSpan});else{if(y===x.xAxis[0].data.length-1)return;p=p+1,y=y+1,l.dispatchAction({type:"dataZoom",startValue:p,endValue:y,maxValueSpan:e.value.maxValueSpan})}},V=()=>{if(y-p<5)return;const Z=Math.floor((a.value-p)/2)+1,G=Math.floor((y-a.value)/2)+1;p=p+Z,y=y-G,l.dispatchAction({type:"dataZoom",startValue:p,endValue:y,actionIsWheel:!0,maxValueSpan:e.value.maxValueSpan})},R=()=>{A=A-(O-A)/4,l.dispatchAction({type:"dataZoom",start:A,end:O,actionIsWheel:!0,maxValueSpan:e.value.maxValueSpan})},_=new Map([["ArrowLeft",S],["ArrowRight",Q],["ArrowUp",V],["ArrowDown",R]]).get(T.code);_ instanceof Function&&_()},B=async()=>{let T=!0;l=H.init(L.value),await c(),I.value=t.defaultMenuData,a.value=l.getOption().dataZoom[0].endValue??-1,E(),f=new ResizeObserver(()=>{if(T){T=null;return}l.resize(),c("line")}),f.observe(L.value),window.addEventListener("keydown",b)};return n.onMounted(()=>{B()}),n.onUnmounted(()=>{F(),window.removeEventListener("keydown",b),l.dispose(),f.disconnect(),f=null}),(T,x)=>{const p=ae.ElMenuItem,y=ae.ElMenu;return n.openBlock(),n.createElementBlock("div",be,[n.createElementVNode("div",Se,[n.createVNode(X,{data:j.value},null,8,["data"]),n.createVNode(X,{data:s.value},null,8,["data"]),n.createVNode(X,{data:r.value},null,8,["data"])]),n.createVNode(Ie,{class:"st-kline-body",onCloseContextMenuCallBack:N},{popover:n.withCtx(()=>[n.createVNode(y,{class:"menu"},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(I.value,A=>(n.openBlock(),n.createBlock(p,{key:A.label,index:A.label,class:"menuItem",onClick:O=>u(A)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(A.label),1)]),_:2},1032,["index","onClick"]))),128))]),_:1})]),default:n.withCtx(()=>[n.createElementVNode("div",{ref_key:"echartsRef",ref:L,class:n.normalizeClass(d.value?"st-kline-chart cursorPen":"st-kline-chart")},null,2)]),_:1})])}}});const Qe=P._export_sfc(Fe,[["__scopeId","data-v-7f014d0e"]]),Be={class:"kline-tips"},Ue=n.defineComponent({__name:"index",props:{data:{type:Array,require:!0}},setup(M){return(t,i)=>(n.openBlock(),n.createElementBlock("div",Be,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(M.data,(e,o)=>(n.openBlock(),n.createElementBlock("div",{key:o,class:"kline-tips-item",style:n.normalizeStyle({color:e.color})},n.toDisplayString(e.label)+" "+n.toDisplayString(e.value),5))),128))]))}});const oe=P._export_sfc(Ue,[["__scopeId","data-v-dc7d381b"]]);const Ve={class:"klineSub"},Re={class:"klineSub-tips"},Pe={key:0,class:"klineSub-tips-select"},We={__name:"index",props:{data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0},modelValue:{type:String,required:!0},subIndicatorList:{type:Array,required:!0}},emits:["update:modelValue"],setup(M,{expose:t,emit:i}){const{round:e}=J.x;let o,a;const j=i,s=M,r=n.ref(),c=n.computed({get(){return s.modelValue},set(u){j("update:modelValue",u)}}),d=n.computed(()=>{var L;const{data:u,activeIndex:N}=s;return((L=u==null?void 0:u.subIndicator)==null?void 0:L.map(l=>({label:l.key,color:l.color,value:l.data[N]||"-"})))||[]});n.onMounted(()=>{o=H.init(r.value);let u=!0;a=new ResizeObserver(()=>{if(u){u=null;return}o.resize()}),a.observe(r.value)}),n.onUnmounted(()=>{o.dispose(),a.disconnect(),a=null});const I=(u,N)=>{const L=u[N],l=N===0?u[N]:u[N-1];return L[0]===L[1]?L[0]>=l[1]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}:L[1]>L[0]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}};return t({connect:u=>{H.connect([u,o])},draw:(u,N)=>{n.nextTick(()=>{const{startValue:L,endValue:l,maxValueSpan:f}=u,{leftYAxisRange:w,rightYAxisRange:h}=s.data.subIndicator[0],v=s.data.subIndicator.map(z=>{if(z.series==="bar")return{name:"subMain",xAxisIndex:0,yAxisIndex:1,type:"bar",silent:!0,symbol:"none",data:z.data.map((g,D)=>z.seriesColor==="kline"?{value:g,itemStyle:I(s.data.data,D)}:z.seriesColor==="value"?{value:g,itemStyle:{color:g>=0?"#FF0000":"#00FFFF"}}:{value:g,itemStyle:{color:z.seriesColor}})};if(z.series==="line")return{xAxisIndex:0,yAxisIndex:z.yAxis==="right"?2:1,name:z.key,type:"line",silent:!0,symbol:"none",data:z.data,lineStyle:{width:1},itemStyle:{color:z.color}}});o.setOption({animation:!1,grid:{left:`${N.gridLeft}px`,top:"10px",right:`${N.gridRight}px`,bottom:"20px"},dataZoom:[{type:"inside",startValue:L,endValue:l,maxValueSpan:f}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:z=>{const{axisDimension:g,value:D}=z;if(g==="x")return D;if(z.axisIndex===1)return String(e(D))}}},formatter:()=>""},xAxis:{type:"category",data:s.data.time,axisLine:{show:!0},splitLine:{show:!1},axisLabel:{show:!0,formatter:z=>z}},yAxis:[{position:"right"},{position:"left",min:w==="cover"?z=>z.min:null,max:w==="cover"?z=>z.max:null,splitNumber:1,axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}}},{position:"right",min:h==="cover"?z=>z.min:null,max:h==="cover"?z=>z.max:null,splitNumber:1,axisLine:{show:!1},splitLine:{show:!1},axisLabel:{show:!1}}],series:v},!0)})}}),(u,N)=>{const L=Me.ElOption,l=Me.ElSelect;return n.openBlock(),n.createElementBlock("div",Ve,[n.createElementVNode("div",Re,[d.value.length?(n.openBlock(),n.createElementBlock("div",Pe,[n.createVNode(l,{modelValue:c.value,"onUpdate:modelValue":N[0]||(N[0]=f=>c.value=f),size:"small","popper-class":"element-dark",class:"element-dark subIndicator"},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(M.subIndicatorList,f=>(n.openBlock(),n.createBlock(L,{key:f.value,label:f.label,value:f.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):n.createCommentVNode("",!0),n.createVNode(oe,{data:d.value},null,8,["data"])]),n.createElementVNode("div",{class:"klineSub-chart",ref_key:"subChartRef",ref:r},null,512)])}}},Ze=P._export_sfc(We,[["__scopeId","data-v-aba58678"]]);const Ge={class:"kline-tips"},$e={__name:"index",props:{data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0}},setup(M){const{round:t,formatValue:i}=J.x,e=M,o=n.computed(()=>{const{data:j,activeIndex:s}=e;if(j.data&&j.data[s]){const r=j.data[s],c=[{label:"开",value:t(r[0])},{label:"高",value:t(r[3])},{label:"低",value:t(r[2])},{label:"收",value:t(r[1])}];r[4]!==null&&c.push({label:"额",value:i(r[4])});let d;return r[6]>0?d="red":r[6]<0&&(d="green"),c.push({label:"涨跌",value:`${t(r[6])}%`,color:d}),c}return[]}),a=n.computed(()=>{var r;const{data:j,activeIndex:s}=e;return((r=j==null?void 0:j.mainIndicator)==null?void 0:r.map(c=>({label:c.key,value:t(c.data[s]),color:c.color})))||[]});return(j,s)=>(n.openBlock(),n.createElementBlock("div",Ge,[n.createVNode(oe,{data:o.value},null,8,["data"]),n.createVNode(oe,{data:a.value},null,8,["data"])]))}},He=P._export_sfc($e,[["__scopeId","data-v-a12855fe"]]),qe={__name:"index",setup(M,{expose:t}){return t({handleKeyDown:(i,e)=>{let{startValue:o,endValue:a,maxIndex:j}=e;if(i.code==="ArrowLeft"){if(o===0)return;o=o-1,a=a-1}else if(i.code==="ArrowRight"){if(a===j)return;o=o+1,a=a+1}else if(i.code==="ArrowUp"){if(a-o<5)return;const s=Math.floor((a-o)/2)+1;o=o+s,a-o<5&&(o=a-4)}else if(i.code==="ArrowDown"){const s=Math.min(500,a-o);o=o-s-1}return{startValue:o,endValue:a}},mergeData:(i,e)=>({time:[...i.time,...e.time.slice(1)],data:[...i.data,...e.data.slice(1)],mainIndicator:i.mainIndicator.map((o,a)=>({...o,data:[...o.data,...e.mainIndicator[a].data.slice(1)]})),subIndicator:i.subIndicator.map((o,a)=>({...o,data:[...o.data,...e.subIndicator[a].data.slice(1)]}))}),getDataZoomInfoByTime:i=>{const{showStartTime:e,showEndTime:o,maxShowDays:a}=i;let j=-1,s=-1,r={};return i.time.forEach((c,d)=>{const I=c.split(" ")[0];r[I]=r[I]||0,r[I]+=1,j===-1&&new Date(c)>=new Date(e)&&(j=d),s===-1&&new Date(c)>=new Date(o)&&(s=d)}),s=s===-1?i.time.length-1:s,{startValue:j,endValue:s,maxValueSpan:Math.max(...Object.values(r))*a}}}),(i,e)=>null}};const Je={__name:"index",props:{data:{type:Array,default:()=>[]}},emits:["change"],setup(M,{expose:t,emit:i}){let e,o,a=null;const j=i,s=M,r=n.ref();n.watch(()=>s.data,()=>{I()},{deep:!0}),n.onMounted(()=>{e=H.init(r.value),c(),I();let u=!0;o=new ResizeObserver(()=>{if(u){u=null;return}e.resize()}),o.observe(r.value)}),n.onUnmounted(()=>{e.off("datazoom"),e.dispose(),o.disconnect(),o=null});const c=()=>{e.on("datazoom",u=>{u.dataZoomId&&(clearTimeout(a),a=setTimeout(()=>{const{data:N}=s,{start:L,end:l}=u,f=Math.floor(L*N.length/100),w=l===100?N.length-1:Math.floor(l*N.length/100);d(f,w),clearTimeout(a)},100))})},d=(u,N)=>{const L=s.data;if(L.length===0)return;const l=L[u][0].split(" ")[0],f=L[N][0].split(" ")[0];j("change",{startTime:`${l} 00:00:00`,endTime:`${f} 24:00:00`})},I=()=>{const{data:u}=s;if(u.length===0)return;const N=u.map(l=>l[0].split(" ")[0]),L=u.map(l=>l[1]);e.setOption({grid:{height:0,left:"80px",right:"80px"},xAxis:{type:"category",data:N,show:!1},yAxis:{type:"value"},series:[{data:L,type:"line"}]},!0)};return t({resetSlide:(u,N,L)=>{let l=-1,f=-1;s.data.forEach((w,h)=>{l===-1&&w[0]===u?l=h:l===-1&&new Date(w[0])>new Date(u)&&(l=h-1),(f===-1&&w[0]===N||f===-1&&new Date(w[0])>new Date(N))&&(f=h)}),f=f===-1?s.data.length-1:f,e.setOption({dataZoom:[{show:!0,startValue:l,endValue:f,maxValueSpan:L,textStyle:{color:"#ccc"}},{type:"inside",startValue:l,endValue:f,maxValueSpan:L}]})},resize:()=>{e==null||e.resize()}}),(u,N)=>(n.openBlock(),n.createElementBlock("div",{class:"klineSlide",ref_key:"slideChartRef",ref:r},null,512))}},Xe=P._export_sfc(Je,[["__scopeId","data-v-7a2f3dd0"]]),Ke={install(M){M.component("st-kline",Qe),M.component("st-kline-sub-new",Ze),M.component("st-kline-tips-new",He),M.component("st-kline-slide-new",Xe),M.component("st-kline-utils-new",qe)}};module.exports=Ke;
|
|
1
|
+
"use strict";require("./base-ec05f348.cjs");const ae=require("./el-menu-item-dc904a35.cjs");require("./el-tooltip-0ea8fbf8.cjs");require("./el-popper-f62316cd.cjs");const n=require("vue"),je=require("echarts"),P=require("./_plugin-vue_export-helper-f246444f.cjs"),J=require("./index-a96158ae.cjs"),ue=require("./index.esm-94a95a2a.cjs");require("./el-tag-3b03d13e.cjs");const Me=require("./el-select-928f8c19.cjs");require("./el-scrollbar-d1c3e7f7.cjs");require("./use-form-common-props-1b84d8f4.cjs");require("./index-e1e83173.cjs");require("./index-eea0bcb3.cjs");require("./typescript-b63f8e83.cjs");require("./vnode-7fbc61e1.cjs");require("./index-80a2b137.cjs");require("./castArray-a45823fe.cjs");require("./event-61f49698.cjs");require("./scroll-41224831.cjs");require("./debounce-b2ff12bd.cjs");function de(M){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(M){for(const i in M)if(i!=="default"){const e=Object.getOwnPropertyDescriptor(M,i);Object.defineProperty(t,i,e.get?e:{enumerable:!0,get:()=>M[i]})}}return t.default=M,Object.freeze(t)}const H=de(je),ye={class:"st-kline-tips"},ge={class:"st-kline-tips-row"},Te=n.defineComponent({__name:"index",props:{data:{type:Array,default:()=>[]}},setup(M){return(t,i)=>(n.openBlock(),n.createElementBlock("div",ye,[n.createElementVNode("div",ge,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(M.data,e=>(n.openBlock(),n.createElementBlock("div",{class:"st-kline-tips-row-item",style:n.normalizeStyle({color:e.color})},n.toDisplayString(e.label)+" "+n.toDisplayString(e.value),5))),256))])]))}});const X=P._export_sfc(Te,[["__scopeId","data-v-78aed210"]]),De=n.defineComponent({__name:"index",emits:["closeContextMenuCallBack"],setup(M,{emit:t}){const i=t,e=n.ref(),o=n.ref(),a=n.ref({display:"none",top:"0px",left:"0px"}),j=()=>{a.value.display="none",i("closeContextMenuCallBack"),document.removeEventListener("click",j)},s=r=>{if(r.preventDefault(),r.stopPropagation(),a.value.display==="block"){const{offsetX:c,offsetY:d}=r,{offsetWidth:I,offsetHeight:u}=o.value;if(c<=I&&d<=u)return}e.value.click(),a.value={display:"block",top:`${r.offsetY}px`,left:`${r.offsetX}px`},n.nextTick(()=>{const{bottom:c,height:d,right:I,width:u}=o.value.getBoundingClientRect();c>window.innerHeight?a.value={display:"block",top:`${r.offsetY-d}px`,left:`${r.offsetX}px`}:I>window.innerWidth&&(a.value={display:"block",top:`${r.offsetY}px`,left:`${r.offsetX-u}px`})}),document.addEventListener("click",j)};return(r,c)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"contextmenuRef",ref:e,class:"contextmenu",onContextmenu:s,onMouseleave:j},[n.renderSlot(r.$slots,"default",{},void 0,!0),a.value.display!=="none"?(n.openBlock(),n.createElementBlock("div",{key:0,ref_key:"contextmenuContentRef",ref:o,class:"contextmenu-popover",style:n.normalizeStyle(a.value)},[n.renderSlot(r.$slots,"popover",{},void 0,!0)],4)):n.createCommentVNode("",!0)],544))}});const Ie=P._export_sfc(De,[["__scopeId","data-v-249fd104"]]);let le=!1,re=!0,ce=[];const se=M=>{const t=[],i=[],e=[],o=[],a=[],j=[];return M.forEach((s,r)=>{t.push(s[0]),i.push(s[1]),e.push(s[4]),o.push(s[2]),a.push(s[3]),j.push([s[1],s[4],s[3],s[2],Number(s[6]),r===0?s[4]:M[r-1][4]])}),{time:t,open:i,close:e,high:o,low:a,kLineData:j}},Le=async()=>{if(!le)le=!0,await ue.init("./talib.wasm"),re=!1,ce.forEach(M=>{M()});else if(re)return new Promise(M=>{ce.push(M)})},$=(M,t)=>M.length>t?M.slice(M.length-t):M,pe=(M,t,i)=>M.calculationFn?M.calculationFn(ue.talib,t,i):new Array(t.time.length).fill(null),fe=async(M,t,i)=>{const e=se(M);let o=[];return o=se(o),await Le(),{originData:$(M,i),kLine:$(e.kLineData,i),time:$(e.time,i),indicator:t.config.reduce((a,j)=>(a.push({key:j.key,color:j.color,data:$(pe(j,e,o),i)}),a),[])}},K="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjgzNzAzMjM4NzI1IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjI2MjUiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTE5OC4wMTYgMTA5LjczODY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MzbDIxMS40MTMzMzQgMTg4LjQxNmM4Ljk2IDguMTA2NjY3IDIxLjg4OCAxMi44IDM2LjIyNCAxMi41ODY2NjcgMTUuNTMwNjY3LTAuMDQyNjY3IDI3LjA5MzMzMy00LjI2NjY2NyAzNi42OTMzMzMtMTIuOGwyMTEuMTE0NjY3LTE4OC4xNmMxMy4zNTQ2NjctMTEuOTQ2NjY3IDI1LjMwMTMzMy0yOC44NDI2NjcgMzUuNjI2NjY2LTUxLjA3MiAxMC4xMTItMjEuNzYgMTQuNzYyNjY3LTQwLjUzMzMzMyAxNC41MDY2NjctNTcuMDAyNjY3TDgxMC42NjY2NjcgMTY3LjIxMDY2N2MwLTkuODk4NjY3LTMuNTg0LTE3LjYyMTMzMy0xMi41MDEzMzQtMjUuNkE1NC42OTg2NjcgNTQuNjk4NjY3IDAgMCAwIDc2MS42IDEyOGwtNDk5LjYyNjY2NyAwLjQ2OTMzM2E1MS4zMjggNTEuMzI4IDAgMCAwLTM1Ljc1NDY2NiAxMy4yNjkzMzQgMzYuNTY1MzMzIDM2LjU2NTMzMyAwIDAgMC0xMi41MDEzMzQgMjEuNTA0bC0wLjQyNjY2NiA0LjY5MzMzM3oiIGZpbGw9IiNBRTQ0RkYiIHAtaWQ9IjMwODAiPjwvcGF0aD48cGF0aCBkPSJNNDc1LjMwNjY2NyA2NTguMjE4NjY3aDczLjQ3MlYzMDYuMzg5MzMzaDExNi40OFYyNDguNDQ4aC0zMDcuNjI2NjY3djU3Ljk0MTMzM2gxMTcuNjc0NjY3eiIgZmlsbD0iI0ZGRkZGRiIgcC1pZD0iMzA4MSI+PC9wYXRoPjwvc3ZnPg==",W=(M,t)=>{const{type:i="log",color:e="black"}=t??{};localStorage.getItem("st-kline-console-show")==="true"&&console[i](`%c${M}`,`color:${e}`)},C=M=>M||M===0?Math.round(M*1e3)/1e3:null,xe=M=>M>=1e12?`${(M/1e12).toFixed(2)}万亿`:M>=1e8?`${(M/1e8).toFixed(2)}亿`:M>=1e4?`${(M/1e4).toFixed(2)}万`:M.toFixed(2),Ye=M=>{const{y:t,text:i,info:e,gridLeft:o,gridRight:a,echartsWidth:j,echartsInstance:s}=M,{config:r,event:c}=e;let d=0;return{type:"group",draggable:r.draggable?"vertical":!1,children:[{type:"line",info:e,shape:{x1:o,y1:t,x2:j-a,y2:t},style:{stroke:r.lineColor,lineWidth:1,lineDash:[8,4]},z:10},{type:"group",x:j,y:t-5,children:[{type:"text",left:-1*a,info:e,style:{fill:r.textColor,text:i,stroke:"#000",lineWidth:1,opacity:1},z:10}]}],onmouseover:I=>{c.onmouseover instanceof Function&&c.onmouseover(I,e)},onmouseout:I=>{c.onmouseout instanceof Function&&c.onmouseout(I,e)},ondragstart:I=>{c.ondragstart instanceof Function&&r.draggable&&(d=I.offsetY,c.ondragstart(I,e))},ondragend:I=>{if(c.ondragend instanceof Function&&r.draggable){const N=I.offsetY-d;if(N===0)return;const L=s.convertFromPixel({yAxisIndex:0},t+N);c.ondragend(I,e,L)}}}},Ae=M=>{const{y:t,text:i,info:e,gridLeft:o,gridRight:a,echartsWidth:j,echartsInstance:s}=M,{config:r,event:c}=e;let d=0;const I=N=>{let L=null;N.target.type==="line"?L=N.target.parent:N.target.type==="tspan"&&(L=N.target.parent.parent.parent),L.children()[1].children()[0].animate("style",!1).when(200,{opacity:1}).start()},u=N=>{let L=null;N.target.type==="line"?L=N.target.parent:N.target.type==="tspan"&&(L=N.target.parent.parent.parent),L.children()[1].children()[0].animate("style",!1).when(200,{opacity:0}).start()};return{type:"group",draggable:r.draggable?"vertical":!1,children:[{type:"line",info:e,shape:{x1:o,y1:t,x2:j-a,y2:t},style:{stroke:r.lineColor,lineWidth:1},z:10},{type:"group",x:j/2,y:t-5,children:[{type:"text",left:"center",info:e,style:{fill:r.textColor,text:i,stroke:"#000",lineWidth:1,opacity:0},z:10}]}],onmouseover:N=>{c.onmouseover instanceof Function?c.onmouseover(N,e):I(N)},onmouseout:N=>{c.onmouseout instanceof Function?c.onmouseout(N,e):u(N)},ondragstart:N=>{c.ondragstart instanceof Function&&r.draggable&&(d=N.offsetY,c.ondragstart(N,e))},ondragend:N=>{if(c.ondragend instanceof Function&&r.draggable){const l=N.offsetY-d;if(l===0)return;const f=s.convertFromPixel({yAxisIndex:0},t+l);c.ondragend(N,e,f)}}}},me=M=>{const{y:t,text:i,profitY:e,profitText:o,lossY:a,lossText:j,info:s,gridLeft:r,gridRight:c,echartsWidth:d,echartsInstance:I}=M,{config:u,event:N}=s;let L=0,l=null,f=null;const w=(z,g)=>{var D,Y,m,k;(D=z.children()[2])==null||D.animate("style",!1).when(200,{opacity:~~g}).start(),(Y=z.children()[3].children()[0])==null||Y.animate("style",!1).when(200,{opacity:~~g}).start(),(m=z.children()[4])==null||m.animate("style",!1).when(200,{opacity:~~g}).start(),(k=z.children()[5].children()[0])==null||k.animate("style",!1).when(200,{opacity:~~g}).start()},h=z=>{let g=null;z.target.type==="line"?g=z.target.parent:z.target.type==="tspan"&&(g=z.target.parent.parent.parent),l=D=>{D.preventDefault(),(D.code==="AltLeft"||D.code==="AltRight")&&w(g,!0)},f=D=>{(D.code==="AltLeft"||D.code==="AltRight")&&w(g,!1)},window.addEventListener("keydown",l),window.addEventListener("keyup",f)},v=z=>{let g=null;z.target.type==="line"?g=z.target.parent:z.target.type==="tspan"&&(g=z.target.parent.parent.parent),w(g,!1),window.removeEventListener("keydown",l),window.removeEventListener("keyup",f)};return{type:"group",draggable:u.draggable?"vertical":!1,children:[{type:"line",info:s,shape:{x1:r,y1:t,x2:d-c,y2:t},style:{stroke:u.lineColor,lineWidth:1},z:10},{type:"group",x:d/2,y:t-5,children:[{type:"text",left:"center",info:s,style:{fill:u.textColor,text:i,stroke:"#000",lineWidth:1,opacity:1},z:10}]},{type:"line",info:s,shape:{x1:r,y1:e,x2:d-c,y2:e},style:{stroke:u.profitLineColor,lineWidth:1,lineDash:[8,4],opacity:0},z:10},{type:"group",x:d/2,y:e-5,children:[{type:"text",left:"center",info:s,style:{fill:u.profitTextColor,text:o,stroke:"#000",lineWidth:1,opacity:0},z:10}]},{type:"line",info:s,shape:{x1:r,y1:a,x2:d-c,y2:a},style:{stroke:u.lossLineColor,lineWidth:1,lineDash:[8,4],opacity:0},z:10},{type:"group",x:d/2,y:a-5,children:[{type:"text",left:"center",info:s,style:{fill:u.lossTextColor,text:j,stroke:"#000",lineWidth:1,opacity:0},z:10}]}],onmouseover:z=>{N.onmouseover instanceof Function?N.onmouseover(z,s):h(z)},onmouseout:z=>{N.onmouseout instanceof Function?N.onmouseout(z,s):v(z)},ondragstart:z=>{N.ondragstart instanceof Function&&u.draggable&&(L=z.offsetY,N.ondragstart(z,s))},ondragend:z=>{if(N.ondragend instanceof Function&&u.draggable){const D=z.offsetY-L;if(D===0)return;const Y=I.convertFromPixel({yAxisIndex:0},t+D);N.ondragend(z,s,Y)}}}},q=(M,t)=>{const{direction:i="",tradeAction:e="",tradeType:o=""}=M;if(t==="sellBuy"){const a=o??i+e;return new Map([["开多","买"],["平多","卖"],["开空","卖"],["平空","买"]]).get(a)}else if(t==="openClose")return o??i+e},we=(M,t)=>M.reduce((i,e)=>{var d;const o=q(e,"sellBuy"),a=M.filter(I=>I.time===e.time);let j="image://"+new URL(Object.assign({"./images/buy.svg":K,"./images/sell.svg":ee,"./images/t.svg":te})[`./images/${o==="买"?"buy":"sell"}.svg`],self.location).href;a.length>1?[...new Set(a.map(u=>q(u,"sellBuy")))].length>1?j="image://"+new URL("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjgzNzAzMjI4MjAyIiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxuc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42OTMzMzMtMTIuOGwyMTEuMTE0NjY3LTE4OC4xNmMxMy4zNTQ2NjctMTEuOTQ2NjY3IDI1LjMwMTMzMy0yOC44NDI2NjcgMzUuNjI2NjY2LTUxLjA3MiAxMC4xMTItMjEuNzYgMTQuNzYyNjY3LTQwLjUzMzMzMyAxNC41MDY2NjctNTcuMDAyNjY3TDgxMC42NjY2NjcgMTY3LjIxMDY2N2MwLTkuODk4NjY3LTMuNTg0LTE3LjYyMTMzMy0xMi41MDEzMzQtMjUuNkE1NC42OTg2NjcgNTQuNjk4NjY3IDAgMCAwIDc2MS42IDEyOGwtNDk5LjYyNjY2NyAwLjQ2OTMzM2E1MS4zMjggNTEuMzI4IDAgMCAwLTM1Ljc1NDY2NiAxMy4yNjkzMzQgMzYuNTY1MzMzIDM2LjU2NTMzMyAwIDAgMC0xMi41MDEzMzQgMjEuNTA0bC0wLjQyNjY2NiA0LjY5MzMzM3oiIGZpbGw9IiNBRTQ0RkYiIHAtaWQ9IjMwODAiPjwvcGF0aD48cGF0aCBkPSJNNDc1LjMwNjY2NyA2NTguMjE4NjY3aDczLjQ3MlYzMDYuMzg5MzMzaDExNi40OFYyNDguNDQ4aC0zMDcuNjI2NjY3djU3Ljk0MTMzM2gxMTcuNjc0NjY3eiIgZmlsbD0iI0ZGRkZGRiIgcC1pZD0iMzA4MSI+PC9wYXRoPjwvc3ZnPg==",self.location).href:j="image://"+new URL(Object.assign({"./images/buy.svg":K,"./images/sell.svg":ee,"./images/t.svg":te})[`./images/${o==="买"?"buy":"sell"}.svg`],self.location).href:j="image://"+new URL(Object.assign({"./images/buy.svg":K,"./images/sell.svg":ee,"./images/t.svg":te})[`./images/${o==="买"?"buy":"sell"}.svg`],self.location).href;const r=(t.find(I=>I[0]===e.time)??[])[2],c=((d=e==null?void 0:e.markLineTarget)==null?void 0:d.map(I=>{const u=e.time,N=r+"",L=I.time,l=t.find(w=>w[0]===I.time),f=l?l[3]:null;return[{coord:[u,N],lineStyle:I.lineStyle},{coord:[L,f]}]}))??null;return i.push({symbol:j,symbolSize:25,animation:!1,coord:[e.time+"",r],symbolRotate:0,symbolOffset:[0,"-7"],markLineTarget:c}),i},[]),he=(M,t)=>M.reduce((i,e,o)=>{var I;const a=q(e,"openClose"),j=a==="开多"||a==="开空"?"top":"bottom",s=t.find(u=>u[0]===e.time)??[],r=j==="top"?s[2]:s[3];let c=7;c+=M.slice(0,o).filter(u=>{const N=q(u,"openClose");return(N==="开多"||N==="开空"?"top":"bottom")===j&&u.time===e.time}).length*7;const d=((I=e==null?void 0:e.markLineTarget)==null?void 0:I.map(u=>{const N=e.time,L=r+"",l=u.time,f=t.find(w=>w[0]===u.time)[3];return[{coord:[N,L],lineStyle:u.lineStyle},{coord:[l,f]}]}))??null;return i.push({symbol:"triangle",symbolSize:[10,12],animation:!1,coord:[e.time+"",r],symbolRotate:j==="top"?180:0,symbolOffset:[0,`${j==="top"?c*-1:c}`],itemStyle:{color:j==="top"?"#FF0000":"#389e0d"},label:{show:!0,position:j,color:"#fff",formatter:`${a} ${j==="top"?"+":"-"} ${e.amount}手 ${e.part?`(${e.part}份)`:""}`},markLineTarget:d}),i},[]),Ce=(M,t)=>M.reduce((i,e)=>{const{key:o,data:a}=e;if(a===null||a.length===0)return i;const s=new Map([["sellBuy",()=>we(a,t)],["openClose",()=>he(a,t)],["signal",()=>{}]]).get(o);return s instanceof Function&&i.push(...s()),i},[]),ne=async(M,t,i,e,o,a)=>{const{totalBarCount:j,defaultShowBarCount:s,maxValueSpan:r,gridLeft:c,gridTop:d,gridRight:I,gridBottom:u,zoomLock:N}=e,{time:L,kLine:l,originData:f,indicator:w}=await fe(M,i,j),h=w.map(g=>{const{key:D,data:Y,color:m}=g;return{name:D,type:"line",silent:!0,symbol:"none",data:Y,lineStyle:{width:1},itemStyle:{color:m}}}),v=Ce(t,f);let z=[];return v.forEach(g=>{g.markLineTarget&&(z=[...z,...g.markLineTarget])}),{animation:!1,dataset:{id:"data",source:{klineData:l,indicatorData:w}},grid:{left:`${c}px`,top:`${d}px`,right:`${I}px`,bottom:`${u}px`},tooltip:{trigger:"axis",axisPointer:{type:"cross",label:{formatter:g=>{const{axisDimension:D,value:Y}=g;return D==="x"?Y:String(C(Y))}}},formatter:g=>{let D=null,Y="";return g.forEach(m=>{m.seriesName==="资产持仓净值"&&m.data!==null&&(Y+=`<div>资产持仓净值: ${m.data}</div>`),m.componentSubType==="candlestick"&&t.forEach(k=>{const{key:E,data:F}=k;if(E==="sellBuy"){const b=F.filter(x=>x.time===m.axisValue);let B=0,T=0;b.forEach(x=>{x.tradeType==="开多"||x.tradeType==="平空"?B+=x.amount:T+=x.amount}),B&&(Y+=`<div>买: ${B}</div>`),T&&(Y+=`<div>卖: ${T}</div>`)}E==="openClose"&&F.forEach(b=>{b.time===m.axisValue&&(Y+=b.tooltip)})}),Y&&(D=`<div><span style="font-weight: bold;">${m.axisValue}</span>${Y}</div>`)}),D}},xAxis:{type:"category",data:L,axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}},axisLabel:{show:!0,formatter:g=>g}},yAxis:[{index:0,splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}},min:g=>{const{min:D,max:Y}=g,m=Math.abs((Y-D)/10);return D-m},max:g=>{const{min:D,max:Y}=g,m=Math.abs((Y-D)/10);return Y+m},axisLine:{show:!0},axisLabel:{formatter:g=>C(g),showMaxLabel:!1}},{show:!1,min:"dataMin"}],dataZoom:[{type:"inside",xAxisIndex:[0,0],zoomLock:N,maxValueSpan:r,start:l.length>=s?(l.length-s)/l.length*100:0,end:99.99}],series:[{name:"k线",type:"candlestick",data:l,markPoint:{data:v},markLine:{position:"middle",textStyle:{color:"blue",fontSize:15},animation:!1,data:z,lineStyle:{width:3,type:"solid"},symbol:["none","none"]},itemStyle:{color:"transparent",color0:"#00FFFF",borderColor:"#FF0000",borderColor0:"#00FFFF",borderWidth:1},z:1},...h,{name:"资产持仓净值",type:"line",data:o??[],symbol:"none",yAxisIndex:1,connectNulls:!0,itemStyle:{color:"#666"}},{name:"二腿相关度",type:"line",data:a??[],symbol:"none",yAxisIndex:1,connectNulls:!0,itemStyle:{color:"#FFF"},lineStyle:{width:2},label:{show:!0,position:"top",formatter:g=>`相关度: ${g.data[1]}`,textStyle:{color:"#FFF",fontSize:14}}}],toolbox:{show:!1},brush:{xAxisIndex:"all",brushLink:"all",transformable:!1,outOfBrush:{colorAlpha:1},brushStyle:{color:"rgba(120,140,180,0)",borderColor:"rgba(255,255,255,0.4)"}}}},Oe=(M,t,i)=>{var I;const{gridLeft:e,gridRight:o,gridBottom:a,warningConfig:j,positionConfig:s,conditionConfig:r,isOpenDS:c}=t;let d=[];if((I=i==null?void 0:i.getModel())!=null&&I.getComponent){const[u,N]=i.getModel().getComponent("yAxis").axis.scale._extent;let L=[],l={},f=[],w={},h=[],v={};if(M.forEach(({key:z,data:g,...D})=>{z==="warning"?(L=g,l=D):z==="position"?(f=g,w=D):z==="condition"&&(h=g,v=D)}),L.length>0&&(d=L.reduce((z,g)=>{const{value:D,text:Y,info:m,config:k}=g;if(D>N||D<u)return z;const E={y:i.convertToPixel({yAxisIndex:0},D),text:Y,info:{info:m,config:{...j,...k},event:{...l}},gridLeft:e,gridRight:o,echartsWidth:i.getWidth(),echartsInstance:i};return[...z,Ye(E)]},d)),f.length>0&&(d=f.reduce((z,g)=>{const{value:D,text:Y,info:m,config:k}=g;if(D>N||D<u)return z;const E={y:i.convertToPixel({yAxisIndex:0},D),text:Y,info:{info:m,config:{...s,...k},event:{...w}},gridLeft:e,gridRight:o,echartsWidth:i.getWidth(),echartsInstance:i};return[...z,Ae(E)]},d)),h.length>0&&(d=h.reduce((z,g)=>{const{value:D,text:Y,profitValue:m,profitText:k,lossValue:E,lossText:F,info:b,config:B}=g;if(D>N||D<u)return z;const T={y:i.convertToPixel({yAxisIndex:0},D),text:Y,profitY:i.convertToPixel({yAxisIndex:0},m),profitText:k,lossY:i.convertToPixel({yAxisIndex:0},E),lossText:F,info:{info:b,config:{...r,...B},event:{...v}},gridLeft:e,gridRight:o,echartsWidth:i.getWidth(),echartsInstance:i};return[...z,me(T)]},d)),c){const z=i.getOption(),g=z.dataset[0].source.klineData.slice(z.dataZoom[0].startValue,z.dataZoom[0].endValue+1),D={};g.forEach(T=>{D[T[1]]?D[T[1]]+=1:D[T[1]]=1});const Y=g[g.length-1][1],m=g.reduce((T,x)=>T+x[1],0)/g.length,k=Y-m,E=ve(g,1,50),F=Ee(g),b=F?k/F:0,B=ke(g,1,Y);d=[...d,{type:"group",draggable:!1,children:Object.keys(D).map(T=>({type:"line",shape:{x1:i.getWidth()-o-100*D[T],y1:i.convertToPixel({yAxisIndex:0},T),x2:i.getWidth()-o,y2:i.convertToPixel({yAxisIndex:0},T)},style:{stroke:"rgb(124,124,124)",lineWidth:1},z:10}))},{type:"text",x:e+6,y:i.getHeight()-a-20,style:{fill:"#FFF",text:`均值: ${C(m)} 距均值: ${C(k)} 中值: ${C(E)} 标准差: ${C(F)} 距均值/标准差: ${C(b)} 百分位: ${C(B)}%`,lineWidth:1,opacity:1},z:10}]}}return{elements:d}},ke=(M,t,i)=>{const{round:e,add:o,subtract:a,multiply:j,divide:s}=J.x,r=M.map(d=>d[t]).sort((d,I)=>d-I);let c=0;for(let d=0;d<r.length;d++)if(r[d]===i){c=d;break}else if(r[d]>=i){c=o(d,s(a(r[d+1],r[d]),r[d]));break}return e(s(j(c,100),M.length+1))},ve=(M,t,i)=>{const{round:e,add:o,subtract:a,multiply:j,divide:s}=J.x,r=M.map(u=>u[t]).sort((u,N)=>u-N),c=j(M.length+1,s(i,100)),d=Math.floor(c),I=a(c,d);return e(I===0?r[c]:o(r[d],j(a(r[d>=M.length-1?d:d+1],r[d]),I)))};function Ee(M){const t=M.map(j=>j[1]),i=t.length;let e=0,o=0;for(const j of t)e+=j;const a=e/i;for(const j of t)o+=Math.pow(j-a,2);return Math.sqrt(o/i)}const be={class:"st-kline"},Se={class:"st-kline-header"},_e=300,Fe=n.defineComponent({__name:"index",props:{indicator:{type:Object,default:()=>({})},klineData:{type:Array,default:()=>[]},markData:{type:Array,default:()=>[]},lineData:{type:Array,default:()=>[]},netPositionData:{type:Array,default:()=>[]},relevanceData:{type:Array,default:()=>[]},priceTrendData:{type:Array,default:()=>[]},priceTrendPercentData:{type:Array,default:()=>[]},brushRange:{type:Array,default:()=>[]},defaultMenuData:{type:Array,default:()=>[]},isSelect:{type:Boolean,default:()=>!1},config:{type:Object,default:()=>({})}},setup(M){const t=M,i={totalBarCount:2e3,defaultShowBarCount:200,preBarCount:800,maxValueSpan:1e4,gridLeft:60,gridTop:0,gridRight:60,gridBottom:30,warningConfig:{draggable:!1,lineColor:"#fff",textColor:"#fff"},positionConfig:{draggable:!1,lineColor:"#e45d07",textColor:"#fff"},conditionConfig:{draggable:!1,lineColor:"#fff",textColor:"#fff",profitLineColor:"#b71e44",profitTextColor:"#fff",lossLineColor:"#749b66",lossTextColor:"#fff"},tipsConfig:{open:!0,heigh:!0,low:!0,close:!0,business:!0,riseAndFall:!0},dynamicLoadConfig:{historyVisible:!1,historyLoadCallBack:()=>{},futureVisible:!1,futureLoadCallBack:()=>{}},zoomLock:!1,isOpenDS:!1},e=n.computed(()=>({...i,...t.config})),o=n.ref(null),a=n.ref(-1),j=n.computed(()=>{var T,x;if(o.value&&((x=(T=o.value.dataset[0])==null?void 0:T.source)!=null&&x.klineData[a.value])){const p=o.value.dataset[0].source.klineData[a.value],y=[],{open:A,heigh:O,low:S,close:Q,business:V,riseAndFall:R}=e.value.tipsConfig;if(A&&y.push({label:"开",value:C(p[0]),color:"rgb(153, 153, 153)"}),O&&y.push({label:"高",value:C(p[3]),color:"rgb(153, 153, 153)"}),S&&y.push({label:"低",value:C(p[2]),color:"rgb(153, 153, 153)"}),Q&&y.push({label:"收",value:C(p[1]),color:"rgb(153, 153, 153)"}),V&&y.push({label:"额",value:xe(p[4]),color:"rgb(153, 153, 153)"}),R){let U=((p[1]-p[5])/p[1]*100).toFixed(2),_=+U==0?"white":+U>0?"red":"#00ff00";y.push({label:"涨跌",value:`${U}%`,color:_})}return y}return[]}),s=n.computed(()=>{var T,x;return o.value&&((x=(T=o.value.dataset[0])==null?void 0:T.source)!=null&&x.indicatorData)?o.value.dataset[0].source.indicatorData.reduce((p,y)=>(y.data[a.value]&&p.push({label:y.key,value:C(y.data[a.value]),color:y.color}),p),[]):[]}),r=n.computed(()=>{const T=["#FFFFFF","#FFDD00","#FF00FF","#00FF00","#FF6000","#1677FF","#7C3CC9","#FF0000","#FB9A0E","#00B7FF"];if(t.priceTrendData.length>0){const x=[];return t.priceTrendData.forEach((p,y)=>{var O;(p.data[a.value]?C(p.data[a.value][1]):null)!==null&&x.push({label:p.name,value:C((O=p.data[a.value])==null?void 0:O[1]),color:T[y]})}),x}if(t.priceTrendPercentData.length>0){const x=[];return l.getOption().series.filter(y=>y.name.includes("二腿价格走势百分比图")).forEach((y,A)=>{var S;(y.data[a.value]?C(y.data[a.value][1]):null)!==null&&x.push({label:y.name.split("-")[1],value:`${C((S=y.data[a.value])==null?void 0:S[1])}%`,color:T[A]})}),x}return[]});n.watch(()=>[t.klineData,t.indicator,t.markData,t.netPositionData,t.relevanceData],()=>{c()},{deep:!0}),n.watch(()=>t.lineData,async()=>{W("st-kline组件消息:props.lineData监控,额外画线数据发生改变,重绘->line",{color:"red"}),c("line")},{deep:!0}),n.watch(()=>t.brushRange,async()=>{W("st-kline组件消息:props.brushRange监控,区域刷选数据发生改变,重绘->brush",{color:"red"}),c("brush")},{deep:!0}),n.watch(()=>t.priceTrendData,async()=>{c("priceTrend")},{deep:!0}),n.watch(()=>t.priceTrendPercentData,async()=>{c("priceTrendPercent")},{deep:!0});const c=async T=>{const p=new Map([["kline",async()=>{const y=await ne(t.klineData,t.markData,t.indicator,e.value,t.netPositionData,t.relevanceData),{graphic:A}=l.getOption()??{graphic:[]};o.value={...y,graphic:A},l.setOption(o.value,!0),W("st-kline组件消息:K线绘制完毕-draw",{color:"green"})}],["line",()=>{const y=l.getOption(),A=Oe(t.lineData,e.value,l);o.value={...y,graphic:A},l.setOption(o.value,{replaceMerge:["graphic"]}),W("st-kline组件消息:额外画线绘制完毕-draw",{color:"green"})}],["brush",()=>{const{brushRange:y}=t;y instanceof Array&&y.length>0&&(l.dispatchAction({type:"brush",areas:[{brushType:"lineX",coordRange:[y[0]+"",y[1]+""],xAxisIndex:0}]}),W("st-kline组件消息:区域刷选绘制完毕-draw",{color:"green"}))}],[void 0,async()=>{await c("kline"),await c("line"),await c("priceTrend"),await c("priceTrendPercent"),await c("brush")}],["history",async()=>{const y=l.getOption(),A=await ne(t.klineData,t.markData,t.indicator,e.value,t.netPositionData,t.relevanceData),O=A.dataset.source.klineData.length-y.dataset[0].source.klineData.length;l.setOption({...A,dataZoom:[{type:"inside",xAxisIndex:[0,0],zoomLock:e.value.zoomLock,maxValueSpan:e.value.maxValueSpan,startValue:y.dataZoom[0].startValue+O,endValue:y.dataZoom[0].endValue+O}]},!0),await c("priceTrend")}],["future",async()=>{const y=l.getOption(),A=await ne(t.klineData,t.markData,t.indicator,e.value,t.netPositionData,t.relevanceData);A.dataZoom[0].start=(t.klineData.length-y.dataZoom[0].endValue+y.dataZoom[0].startValue)/t.klineData.length*100,l.setOption(A,!0),await c("priceTrend")}],["priceTrend",()=>{if(t.priceTrendData.length===0)return;const y=l.getOption(),A=["#FFFFFF","#FFDD00","#FF00FF","#00FF00","#FF6000","#1677FF","#7C3CC9","#FF0000","#FB9A0E","#00B7FF"],O=t.priceTrendData.reduce((S,Q,V)=>{const{name:R,data:U}=Q,_={name:`二腿价格走势图-${R}`,type:"line",data:U,symbol:"none",yAxisIndex:1,connectNulls:!0,itemStyle:{color:A[V]},lineStyle:{type:"dashed",width:1}};return S.push(_),S},[]);o.value={...y,series:[...y.series,...O]},l.setOption(o.value,{replaceMerge:["series"]})}],["priceTrendPercent",async()=>{if(t.priceTrendPercentData.length===0)return;const y=l.getOption(),A=["#FFFFFF","#FFDD00","#FF00FF","#00FF00","#FF6000","#1677FF","#7C3CC9","#FF0000","#FB9A0E","#00B7FF"],O=y.dataZoom[0].startValue,S=t.priceTrendPercentData.reduce((Q,V,R)=>{const{name:U,data:_}=V,Z=_.length>e.value.totalBarCount?_.slice(_.length-e.value.totalBarCount):_,G=Z[O][1],Ne=Z.map(ie=>[ie[0],(ie[1]-G)/G*100]),ze={name:`二腿价格走势百分比图-${U}`,type:"line",data:Ne,symbol:"none",yAxisIndex:1,connectNulls:!0,itemStyle:{color:A[R]},lineStyle:{type:"dashed",width:1}};return Q.push(ze),Q},[]);y.series=[...y.series.filter(Q=>!Q.name.includes("二腿价格走势百分比图")),...S],l.setOption(y,!0)}]]).get(T);p instanceof Function&&await p()},d=n.ref(!1),I=n.ref([]),u=T=>{const{callBack:x}=T;x instanceof Function&&x(l,d)},N=()=>{I.value=t.defaultMenuData},L=n.ref();let l,f;const w=(T,x)=>{var p,y;if(T)a.value=typeof((p=T==null?void 0:T.batch[0])==null?void 0:p.dataIndex)=="number"?(y=T==null?void 0:T.batch[0])==null?void 0:y.dataIndex:-1;else{const A=x.getOption();A.dataZoom instanceof Array&&(a.value=A.dataZoom[0].endValue)}};let h=null,v=!1,z=n.ref(!1),g=!1,D=n.ref(!1);const Y=async T=>{const x=T.batch?T.batch[0].start*e.value.totalBarCount:T.startValue;e.value.dynamicLoadConfig.historyVisible&&x<=100&&!v&&!z.value&&(v=!0,await e.value.dynamicLoadConfig.historyLoadCallBack(z),await c("history"),v=!1);const p=T.batch?T.batch[0].end===100:T.endValue>=t.klineData.length-e.value.preBarCount-1,y=T.actionIsWheel;e.value.dynamicLoadConfig.futureVisible&&p&&!g&&!D.value&&!y&&(g=!0,await e.value.dynamicLoadConfig.futureLoadCallBack(D),await c("future"),g=!1),clearTimeout(h),h=setTimeout(()=>{c("line"),c("priceTrendPercent"),clearTimeout(h),h=null},_e)};let m=null;const k=T=>{m=setTimeout(()=>{var x;if(T.componentType==="graphic"){const{oncontextmenu:p}=((x=T.info)==null?void 0:x.event)??{};p instanceof Function&&p(T,T.info,I)}clearTimeout(m),m=null})},E=()=>{l.on("highlight",T=>{w(T,l)}),l.on("globalout",()=>{w(null,l)}),l.on("contextmenu",T=>{k(T)}),l.on("datazoom",T=>{Y(T)})},F=()=>{l.off("highlight"),l.off("globalout"),l.off("contextmenu"),l.off("datazoom")},b=T=>{if(!l||!(T.ctrlKey||t.isSelect))return;const x=l.getOption();let{startValue:p,endValue:y,start:A,end:O}=x.dataZoom[0];const S=()=>{p!==0&&(p=p-1,y=y-1,l.dispatchAction({type:"dataZoom",startValue:p,endValue:y,maxValueSpan:e.value.maxValueSpan}))},Q=()=>{if(e.value.dynamicLoadConfig.futureVisible&&!g&&!D.value)p=p+1,y=y+1,l.dispatchAction({type:"dataZoom",startValue:p,endValue:y,maxValueSpan:e.value.maxValueSpan});else{if(y===x.xAxis[0].data.length-1)return;p=p+1,y=y+1,l.dispatchAction({type:"dataZoom",startValue:p,endValue:y,maxValueSpan:e.value.maxValueSpan})}},V=()=>{if(y-p<5)return;const Z=Math.floor((a.value-p)/2)+1,G=Math.floor((y-a.value)/2)+1;p=p+Z,y=y-G,l.dispatchAction({type:"dataZoom",startValue:p,endValue:y,actionIsWheel:!0,maxValueSpan:e.value.maxValueSpan})},R=()=>{A=A-(O-A)/4,l.dispatchAction({type:"dataZoom",start:A,end:O,actionIsWheel:!0,maxValueSpan:e.value.maxValueSpan})},_=new Map([["ArrowLeft",S],["ArrowRight",Q],["ArrowUp",V],["ArrowDown",R]]).get(T.code);_ instanceof Function&&_()},B=async()=>{let T=!0;l=H.init(L.value),await c(),I.value=t.defaultMenuData,a.value=l.getOption().dataZoom[0].endValue??-1,E(),f=new ResizeObserver(()=>{if(T){T=null;return}l.resize(),c("line")}),f.observe(L.value),window.addEventListener("keydown",b)};return n.onMounted(()=>{B()}),n.onUnmounted(()=>{F(),window.removeEventListener("keydown",b),l.dispose(),f.disconnect(),f=null}),(T,x)=>{const p=ae.ElMenuItem,y=ae.ElMenu;return n.openBlock(),n.createElementBlock("div",be,[n.createElementVNode("div",Se,[n.createVNode(X,{data:j.value},null,8,["data"]),n.createVNode(X,{data:s.value},null,8,["data"]),n.createVNode(X,{data:r.value},null,8,["data"])]),n.createVNode(Ie,{class:"st-kline-body",onCloseContextMenuCallBack:N},{popover:n.withCtx(()=>[n.createVNode(y,{class:"menu"},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(I.value,A=>(n.openBlock(),n.createBlock(p,{key:A.label,index:A.label,class:"menuItem",onClick:O=>u(A)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(A.label),1)]),_:2},1032,["index","onClick"]))),128))]),_:1})]),default:n.withCtx(()=>[n.createElementVNode("div",{ref_key:"echartsRef",ref:L,class:n.normalizeClass(d.value?"st-kline-chart cursorPen":"st-kline-chart")},null,2)]),_:1})])}}});const Qe=P._export_sfc(Fe,[["__scopeId","data-v-7f014d0e"]]),Be={class:"kline-tips"},Ue=n.defineComponent({__name:"index",props:{data:{type:Array,require:!0}},setup(M){return(t,i)=>(n.openBlock(),n.createElementBlock("div",Be,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(M.data,(e,o)=>(n.openBlock(),n.createElementBlock("div",{key:o,class:"kline-tips-item",style:n.normalizeStyle({color:e.color})},n.toDisplayString(e.label)+" "+n.toDisplayString(e.value),5))),128))]))}});const oe=P._export_sfc(Ue,[["__scopeId","data-v-dc7d381b"]]);const Ve={class:"klineSub"},Re={class:"klineSub-tips"},Pe={key:0,class:"klineSub-tips-select"},We={__name:"index",props:{data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0},modelValue:{type:String,required:!0},subIndicatorList:{type:Array,required:!0}},emits:["update:modelValue"],setup(M,{expose:t,emit:i}){const{round:e}=J.x;let o,a;const j=i,s=M,r=n.ref(),c=n.computed({get(){return s.modelValue},set(u){j("update:modelValue",u)}}),d=n.computed(()=>{var L;const{data:u,activeIndex:N}=s;return((L=u==null?void 0:u.subIndicator)==null?void 0:L.map(l=>({label:l.key,color:l.color,value:l.data[N]||"-"})))||[]});n.onMounted(()=>{o=H.init(r.value);let u=!0;a=new ResizeObserver(()=>{if(u){u=null;return}o.resize()}),a.observe(r.value)}),n.onUnmounted(()=>{o.dispose(),a.disconnect(),a=null});const I=(u,N)=>{const L=u[N],l=N===0?u[N]:u[N-1];return L[0]===L[1]?L[0]>=l[1]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}:L[1]>L[0]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}};return t({connect:u=>{H.connect([u,o])},draw:(u,N)=>{n.nextTick(()=>{const{startValue:L,endValue:l,maxValueSpan:f}=u,{leftYAxisRange:w,rightYAxisRange:h}=s.data.subIndicator[0],v=s.data.subIndicator.map(z=>{if(z.series==="bar")return{name:"subMain",xAxisIndex:0,yAxisIndex:1,type:"bar",silent:!0,symbol:"none",data:z.data.map((g,D)=>z.seriesColor==="kline"?{value:g,itemStyle:I(s.data.data,D)}:z.seriesColor==="value"?{value:g,itemStyle:{color:g>=0?"#FF0000":"#00FFFF"}}:{value:g,itemStyle:{color:z.seriesColor}})};if(z.series==="line")return{xAxisIndex:0,yAxisIndex:z.yAxis==="right"?2:1,name:z.key,type:"line",silent:!0,symbol:"none",data:z.data,lineStyle:{width:1},itemStyle:{color:z.color}}});o.setOption({animation:!1,grid:{left:`${N.gridLeft}px`,top:"10px",right:`${N.gridRight}px`,bottom:"20px"},dataZoom:[{type:"inside",startValue:L,endValue:l,maxValueSpan:f}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:z=>{const{axisDimension:g,value:D}=z;if(g==="x")return D;if(z.axisIndex===1)return String(e(D))}}},formatter:()=>""},xAxis:{type:"category",data:s.data.time,axisLine:{show:!0},splitLine:{show:!1},axisLabel:{show:!0,formatter:z=>z}},yAxis:[{position:"right"},{position:"left",min:w==="cover"?z=>z.min:null,max:w==="cover"?z=>z.max:null,splitNumber:1,axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}}},{position:"right",min:h==="cover"?z=>z.min:null,max:h==="cover"?z=>z.max:null,splitNumber:1,axisLine:{show:!1},splitLine:{show:!1},axisLabel:{show:!1}}],series:v},!0)})}}),(u,N)=>{const L=Me.ElOption,l=Me.ElSelect;return n.openBlock(),n.createElementBlock("div",Ve,[n.createElementVNode("div",Re,[d.value.length?(n.openBlock(),n.createElementBlock("div",Pe,[n.createVNode(l,{modelValue:c.value,"onUpdate:modelValue":N[0]||(N[0]=f=>c.value=f),size:"small","popper-class":"element-dark",class:"element-dark subIndicator"},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(M.subIndicatorList,f=>(n.openBlock(),n.createBlock(L,{key:f.value,label:f.label,value:f.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):n.createCommentVNode("",!0),n.createVNode(oe,{data:d.value},null,8,["data"])]),n.createElementVNode("div",{class:"klineSub-chart",ref_key:"subChartRef",ref:r},null,512)])}}},Ze=P._export_sfc(We,[["__scopeId","data-v-aba58678"]]);const Ge={class:"kline-tips"},$e={__name:"index",props:{data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0}},setup(M){const{round:t,formatValue:i}=J.x,e=M,o=n.computed(()=>{const{data:j,activeIndex:s}=e;if(j.data&&j.data[s]){const r=j.data[s],c=[{label:"开",value:t(r[0])},{label:"高",value:t(r[3])},{label:"低",value:t(r[2])},{label:"收",value:t(r[1])}];r[4]!==null&&c.push({label:"额",value:i(r[4])});let d;return r[6]>0?d="red":r[6]<0&&(d="green"),c.push({label:"涨跌",value:`${t(r[6])}%`,color:d}),c}return[]}),a=n.computed(()=>{var r;const{data:j,activeIndex:s}=e;return((r=j==null?void 0:j.mainIndicator)==null?void 0:r.map(c=>({label:c.key,value:t(c.data[s]),color:c.color})))||[]});return(j,s)=>(n.openBlock(),n.createElementBlock("div",Ge,[n.createVNode(oe,{data:o.value},null,8,["data"]),n.createVNode(oe,{data:a.value},null,8,["data"])]))}},He=P._export_sfc($e,[["__scopeId","data-v-a12855fe"]]),qe={__name:"index",setup(M,{expose:t}){return t({handleKeyDown:(i,e)=>{let{startValue:o,endValue:a,maxIndex:j}=e;if(i.code==="ArrowLeft"){if(o===0)return;o=o-1,a=a-1}else if(i.code==="ArrowRight"){if(a===j)return;o=o+1,a=a+1}else if(i.code==="ArrowUp"){if(a-o<5)return;const s=Math.floor((a-o)/2)+1;o=o+s,a-o<5&&(o=a-4)}else if(i.code==="ArrowDown"){const s=Math.min(500,a-o);o=o-s-1}return{startValue:o,endValue:a}},mergeData:(i,e)=>({time:[...i.time,...e.time.slice(1)],data:[...i.data,...e.data.slice(1)],mainIndicator:i.mainIndicator.map((o,a)=>({...o,data:[...o.data,...e.mainIndicator[a].data.slice(1)]})),subIndicator:i.subIndicator.map((o,a)=>({...o,data:[...o.data,...e.subIndicator[a].data.slice(1)]}))}),getDataZoomInfoByTime:i=>{const{showStartTime:e,showEndTime:o,maxShowDays:a}=i;let j=-1,s=-1,r={};return i.time.forEach((c,d)=>{const I=c.split(" ")[0];r[I]=r[I]||0,r[I]+=1,j===-1&&new Date(c)>=new Date(e)&&(j=d),s===-1&&new Date(c)>=new Date(o)&&(s=d)}),s=s===-1?i.time.length-1:s,{startValue:j,endValue:s,maxValueSpan:Math.max(...Object.values(r))*a}}}),(i,e)=>null}};const Je={__name:"index",props:{data:{type:Array,default:()=>[]}},emits:["change"],setup(M,{expose:t,emit:i}){let e,o,a=null;const j=i,s=M,r=n.ref();n.watch(()=>s.data,()=>{I()},{deep:!0}),n.onMounted(()=>{e=H.init(r.value),c(),I();let u=!0;o=new ResizeObserver(()=>{if(u){u=null;return}e.resize()}),o.observe(r.value)}),n.onUnmounted(()=>{e.off("datazoom"),e.dispose(),o.disconnect(),o=null});const c=()=>{e.on("datazoom",u=>{u.dataZoomId&&(clearTimeout(a),a=setTimeout(()=>{const{data:N}=s,{start:L,end:l}=u,f=Math.floor(L*N.length/100),w=l===100?N.length-1:Math.floor(l*N.length/100);d(f,w),clearTimeout(a)},100))})},d=(u,N)=>{const L=s.data;if(L.length===0)return;const l=L[u][0].split(" ")[0],f=L[N][0].split(" ")[0];j("change",{startTime:`${l} 00:00:00`,endTime:`${f} 24:00:00`})},I=()=>{const{data:u}=s;if(u.length===0)return;const N=u.map(l=>l[0].split(" ")[0]),L=u.map(l=>l[1]);e.setOption({grid:{height:0,left:"80px",right:"80px"},xAxis:{type:"category",data:N,show:!1},yAxis:{type:"value"},series:[{data:L,type:"line"}]},!0)};return t({resetSlide:(u,N,L)=>{let l=-1,f=-1;s.data.forEach((w,h)=>{l===-1&&w[0]===u?l=h:l===-1&&new Date(w[0])>new Date(u)&&(l=h-1),(f===-1&&w[0]===N||f===-1&&new Date(w[0])>new Date(N))&&(f=h)}),f=f===-1?s.data.length-1:f,e.setOption({dataZoom:[{show:!0,startValue:l,endValue:f,maxValueSpan:L,textStyle:{color:"#ccc"}},{type:"inside",startValue:l,endValue:f,maxValueSpan:L}]})},resize:()=>{e==null||e.resize()}}),(u,N)=>(n.openBlock(),n.createElementBlock("div",{class:"klineSlide",ref_key:"slideChartRef",ref:r},null,512))}},Xe=P._export_sfc(Je,[["__scopeId","data-v-7a2f3dd0"]]),Ke={install(M){M.component("st-kline",Qe),M.component("st-kline-sub-new",Ze),M.component("st-kline-tips-new",He),M.component("st-kline-slide-new",Xe),M.component("st-kline-utils-new",qe)}};module.exports=Ke;
|
package/es/Kline.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import "./base-
|
|
2
|
-
import { E as he, a as Ce } from "./el-menu-item-
|
|
1
|
+
import "./base-3ecbc734.js";
|
|
2
|
+
import { E as he, a as Ce } from "./el-menu-item-0d92e7dc.js";
|
|
3
3
|
import "./el-tooltip-4ed993c7.js";
|
|
4
|
-
import "./el-popper-
|
|
4
|
+
import "./el-popper-d3eef7ed.js";
|
|
5
5
|
import { defineComponent as Me, openBlock as C, createElementBlock as v, createElementVNode as K, Fragment as ae, renderList as le, normalizeStyle as ye, toDisplayString as q, ref as S, renderSlot as De, createCommentVNode as xe, nextTick as Ye, computed as W, watch as H, onMounted as de, onUnmounted as ge, createVNode as V, withCtx as X, createBlock as Ae, createTextVNode as Oe, normalizeClass as ke } from "vue";
|
|
6
6
|
import * as oe from "echarts";
|
|
7
7
|
import { _ as $ } from "./_plugin-vue_export-helper-dad06003.js";
|
|
8
|
-
import { x as re } from "./index-
|
|
8
|
+
import { x as re } from "./index-8542fe24.js";
|
|
9
9
|
import { i as ve, t as be } from "./index.esm-8d9a2abe.js";
|
|
10
|
-
import "./el-tag-
|
|
11
|
-
import { E as Ee, a as Se } from "./el-select-
|
|
12
|
-
import "./el-scrollbar-
|
|
13
|
-
import "./use-form-common-props-
|
|
14
|
-
import "./index-
|
|
10
|
+
import "./el-tag-6a31c968.js";
|
|
11
|
+
import { E as Ee, a as Se } from "./el-select-5fb7d469.js";
|
|
12
|
+
import "./el-scrollbar-66f3bb72.js";
|
|
13
|
+
import "./use-form-common-props-9c0363ac.js";
|
|
14
|
+
import "./index-fa07a823.js";
|
|
15
15
|
import "./index-657047bb.js";
|
|
16
16
|
import "./typescript-7ae59c4c.js";
|
|
17
|
-
import "./vnode-
|
|
18
|
-
import "./index-
|
|
19
|
-
import "./castArray-
|
|
17
|
+
import "./vnode-cfcdab70.js";
|
|
18
|
+
import "./index-a1ecf26c.js";
|
|
19
|
+
import "./castArray-7d3fc921.js";
|
|
20
20
|
import "./event-09e37cc8.js";
|
|
21
|
-
import "./scroll-
|
|
22
|
-
import "./debounce-
|
|
21
|
+
import "./scroll-1efa8148.js";
|
|
22
|
+
import "./debounce-7344b088.js";
|
|
23
23
|
const Fe = { class: "st-kline-tips" }, Qe = { class: "st-kline-tips-row" }, _e = /* @__PURE__ */ Me({
|
|
24
24
|
__name: "index",
|
|
25
25
|
props: {
|
package/es/KlineBasic.cjs
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
"use strict";require("./base-ec05f348.cjs");const Ke=require("./el-menu-item-dc904a35.cjs");require("./el-tooltip-0ea8fbf8.cjs");require("./el-popper-f62316cd.cjs");const p=require("vue"),Mt=require("echarts"),te=require("./index-d1b7c61e.cjs"),ft=require("./el-message-e97bdea1.cjs"),de=require("./_plugin-vue_export-helper-f246444f.cjs");require("./el-tag-3b03d13e.cjs");const Xe=require("./el-select-928f8c19.cjs");require("./el-scrollbar-d1c3e7f7.cjs");require("./use-form-common-props-1b84d8f4.cjs");require("./index-e1e83173.cjs");require("./index-eea0bcb3.cjs");require("./typescript-b63f8e83.cjs");require("./vnode-7fbc61e1.cjs");require("./use-global-config-ac2dad80.cjs");require("./config-provider-4954003d.cjs");require("./index-80a2b137.cjs");require("./castArray-a45823fe.cjs");require("./event-61f49698.cjs");require("./scroll-41224831.cjs");require("./debounce-b2ff12bd.cjs");function qt(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Be=qt(Mt);var Ut=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function jt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var pt={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(Ut,function(){var r=1e3,n=6e4,s=36e5,o="millisecond",i="second",c="minute",d="hour",l="day",u="week",m="month",_="quarter",O="year",h="date",S="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,D=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,P={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(x){var b=["th","st","nd","rd"],f=x%100;return"["+x+(b[(f-20)%10]||b[f]||b[0])+"]"}},A=function(x,b,f){var w=String(x);return!w||w.length>=b?x:""+Array(b+1-w.length).join(f)+x},$={s:A,z:function(x){var b=-x.utcOffset(),f=Math.abs(b),w=Math.floor(f/60),y=f%60;return(b<=0?"+":"-")+A(w,2,"0")+":"+A(y,2,"0")},m:function x(b,f){if(b.date()<f.date())return-x(f,b);var w=12*(f.year()-b.year())+(f.month()-b.month()),y=b.clone().add(w,m),E=f-y<0,v=b.clone().add(w+(E?-1:1),m);return+(-(w+(f-y)/(E?y-v:v-y))||0)},a:function(x){return x<0?Math.ceil(x)||0:Math.floor(x)},p:function(x){return{M:m,y:O,w:u,d:l,D:h,h:d,m:c,s:i,ms:o,Q:_}[x]||String(x||"").toLowerCase().replace(/s$/,"")},u:function(x){return x===void 0}},B="en",M={};M[B]=P;var J="$isDayjsObject",X=function(x){return x instanceof F||!(!x||!x[J])},Y=function x(b,f,w){var y;if(!b)return B;if(typeof b=="string"){var E=b.toLowerCase();M[E]&&(y=E),f&&(M[E]=f,y=E);var v=b.split("-");if(!y&&v.length>1)return x(v[0])}else{var L=b.name;M[L]=b,y=L}return!w&&y&&(B=y),y||!w&&B},U=function(x,b){if(X(x))return x.clone();var f=typeof b=="object"?b:{};return f.date=x,f.args=arguments,new F(f)},R=$;R.l=Y,R.i=X,R.w=function(x,b){return U(x,{locale:b.$L,utc:b.$u,x:b.$x,$offset:b.$offset})};var F=function(){function x(f){this.$L=Y(f.locale,null,!0),this.parse(f),this.$x=this.$x||f.x||{},this[J]=!0}var b=x.prototype;return b.parse=function(f){this.$d=function(w){var y=w.date,E=w.utc;if(y===null)return new Date(NaN);if(R.u(y))return new Date;if(y instanceof Date)return new Date(y);if(typeof y=="string"&&!/Z$/i.test(y)){var v=y.match(g);if(v){var L=v[2]-1||0,C=(v[7]||"0").substring(0,3);return E?new Date(Date.UTC(v[1],L,v[3]||1,v[4]||0,v[5]||0,v[6]||0,C)):new Date(v[1],L,v[3]||1,v[4]||0,v[5]||0,v[6]||0,C)}}return new Date(y)}(f),this.init()},b.init=function(){var f=this.$d;this.$y=f.getFullYear(),this.$M=f.getMonth(),this.$D=f.getDate(),this.$W=f.getDay(),this.$H=f.getHours(),this.$m=f.getMinutes(),this.$s=f.getSeconds(),this.$ms=f.getMilliseconds()},b.$utils=function(){return R},b.isValid=function(){return this.$d.toString()!==S},b.isSame=function(f,w){var y=U(f);return this.startOf(w)<=y&&y<=this.endOf(w)},b.isAfter=function(f,w){return U(f)<this.startOf(w)},b.isBefore=function(f,w){return this.endOf(w)<U(f)},b.$g=function(f,w,y){return R.u(f)?this[w]:this.set(y,f)},b.unix=function(){return Math.floor(this.valueOf()/1e3)},b.valueOf=function(){return this.$d.getTime()},b.startOf=function(f,w){var y=this,E=!!R.u(w)||w,v=R.p(f),L=function(Z,z){var ne=R.w(y.$u?Date.UTC(y.$y,z,Z):new Date(y.$y,z,Z),y);return E?ne:ne.endOf(l)},C=function(Z,z){return R.w(y.toDate()[Z].apply(y.toDate("s"),(E?[0,0,0,0]:[23,59,59,999]).slice(z)),y)},N=this.$W,T=this.$M,j=this.$D,V="set"+(this.$u?"UTC":"");switch(v){case O:return E?L(1,0):L(31,11);case m:return E?L(1,T):L(0,T+1);case u:var K=this.$locale().weekStart||0,re=(N<K?N+7:N)-K;return L(E?j-re:j+(6-re),T);case l:case h:return C(V+"Hours",0);case d:return C(V+"Minutes",1);case c:return C(V+"Seconds",2);case i:return C(V+"Milliseconds",3);default:return this.clone()}},b.endOf=function(f){return this.startOf(f,!1)},b.$set=function(f,w){var y,E=R.p(f),v="set"+(this.$u?"UTC":""),L=(y={},y[l]=v+"Date",y[h]=v+"Date",y[m]=v+"Month",y[O]=v+"FullYear",y[d]=v+"Hours",y[c]=v+"Minutes",y[i]=v+"Seconds",y[o]=v+"Milliseconds",y)[E],C=E===l?this.$D+(w-this.$W):w;if(E===m||E===O){var N=this.clone().set(h,1);N.$d[L](C),N.init(),this.$d=N.set(h,Math.min(this.$D,N.daysInMonth())).$d}else L&&this.$d[L](C);return this.init(),this},b.set=function(f,w){return this.clone().$set(f,w)},b.get=function(f){return this[R.p(f)]()},b.add=function(f,w){var y,E=this;f=Number(f);var v=R.p(w),L=function(T){var j=U(E);return R.w(j.date(j.date()+Math.round(T*f)),E)};if(v===m)return this.set(m,this.$M+f);if(v===O)return this.set(O,this.$y+f);if(v===l)return L(1);if(v===u)return L(7);var C=(y={},y[c]=n,y[d]=s,y[i]=r,y)[v]||1,N=this.$d.getTime()+f*C;return R.w(N,this)},b.subtract=function(f,w){return this.add(-1*f,w)},b.format=function(f){var w=this,y=this.$locale();if(!this.isValid())return y.invalidDate||S;var E=f||"YYYY-MM-DDTHH:mm:ssZ",v=R.z(this),L=this.$H,C=this.$m,N=this.$M,T=y.weekdays,j=y.months,V=y.meridiem,K=function(z,ne,ce,ye){return z&&(z[ne]||z(w,E))||ce[ne].slice(0,ye)},re=function(z){return R.s(L%12||12,z,"0")},Z=V||function(z,ne,ce){var ye=z<12?"AM":"PM";return ce?ye.toLowerCase():ye};return E.replace(D,function(z,ne){return ne||function(ce){switch(ce){case"YY":return String(w.$y).slice(-2);case"YYYY":return R.s(w.$y,4,"0");case"M":return N+1;case"MM":return R.s(N+1,2,"0");case"MMM":return K(y.monthsShort,N,j,3);case"MMMM":return K(j,N);case"D":return w.$D;case"DD":return R.s(w.$D,2,"0");case"d":return String(w.$W);case"dd":return K(y.weekdaysMin,w.$W,T,2);case"ddd":return K(y.weekdaysShort,w.$W,T,3);case"dddd":return T[w.$W];case"H":return String(L);case"HH":return R.s(L,2,"0");case"h":return re(1);case"hh":return re(2);case"a":return Z(L,C,!0);case"A":return Z(L,C,!1);case"m":return String(C);case"mm":return R.s(C,2,"0");case"s":return String(w.$s);case"ss":return R.s(w.$s,2,"0");case"SSS":return R.s(w.$ms,3,"0");case"Z":return v}return null}(z)||v.replace(":","")})},b.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},b.diff=function(f,w,y){var E,v=this,L=R.p(w),C=U(f),N=(C.utcOffset()-this.utcOffset())*n,T=this-C,j=function(){return R.m(v,C)};switch(L){case O:E=j()/12;break;case m:E=j();break;case _:E=j()/3;break;case u:E=(T-N)/6048e5;break;case l:E=(T-N)/864e5;break;case d:E=T/s;break;case c:E=T/n;break;case i:E=T/r;break;default:E=T}return y?E:R.a(E)},b.daysInMonth=function(){return this.endOf(m).$D},b.$locale=function(){return M[this.$L]},b.locale=function(f,w){if(!f)return this.$L;var y=this.clone(),E=Y(f,w,!0);return E&&(y.$L=E),y},b.clone=function(){return R.w(this.$d,this)},b.toDate=function(){return new Date(this.valueOf())},b.toJSON=function(){return this.isValid()?this.toISOString():null},b.toISOString=function(){return this.$d.toISOString()},b.toString=function(){return this.$d.toUTCString()},x}(),q=F.prototype;return U.prototype=q,[["$ms",o],["$s",i],["$m",c],["$H",d],["$W",l],["$M",m],["$y",O],["$D",h]].forEach(function(x){q[x[1]]=function(b){return this.$g(b,x[0],x[1])}}),U.extend=function(x,b){return x.$i||(x(b,F,U),x.$i=!0),U},U.locale=Y,U.isDayjs=X,U.unix=function(x){return U(1e3*x)},U.en=M[B],U.Ls=M,U.p={},U})})(pt);var It=pt.exports;const Vt=jt(It);function ht(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ht}=Object.prototype,{getPrototypeOf:Ve}=Object,ve=(e=>t=>{const r=Ht.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Q=e=>(e=e.toLowerCase(),t=>ve(t)===e),Re=e=>t=>typeof t===e,{isArray:ie}=Array,ue=Re("undefined");function zt(e){return e!==null&&!ue(e)&&e.constructor!==null&&!ue(e.constructor)&&W(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const mt=Q("ArrayBuffer");function Wt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&mt(e.buffer),t}const Jt=Re("string"),W=Re("function"),yt=Re("number"),Oe=e=>e!==null&&typeof e=="object",Yt=e=>e===!0||e===!1,ge=e=>{if(ve(e)!=="object")return!1;const t=Ve(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Kt=Q("Date"),Xt=Q("File"),Zt=Q("Blob"),Gt=Q("FileList"),Qt=e=>Oe(e)&&W(e.pipe),en=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||W(e.append)&&((t=ve(e))==="formdata"||t==="object"&&W(e.toString)&&e.toString()==="[object FormData]"))},tn=Q("URLSearchParams"),[nn,rn,on,sn]=["ReadableStream","Request","Response","Headers"].map(Q),an=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function fe(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,s;if(typeof e!="object"&&(e=[e]),ie(e))for(n=0,s=e.length;n<s;n++)t.call(null,e[n],n,e);else{const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let c;for(n=0;n<i;n++)c=o[n],t.call(null,e[c],c,e)}}function gt(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length,s;for(;n-- >0;)if(s=r[n],t===s.toLowerCase())return s;return null}const oe=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),bt=e=>!ue(e)&&e!==oe;function Pe(){const{caseless:e}=bt(this)&&this||{},t={},r=(n,s)=>{const o=e&>(t,s)||s;ge(t[o])&&ge(n)?t[o]=Pe(t[o],n):ge(n)?t[o]=Pe({},n):ie(n)?t[o]=n.slice():t[o]=n};for(let n=0,s=arguments.length;n<s;n++)arguments[n]&&fe(arguments[n],r);return t}const cn=(e,t,r,{allOwnKeys:n}={})=>(fe(t,(s,o)=>{r&&W(s)?e[o]=ht(s,r):e[o]=s},{allOwnKeys:n}),e),ln=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),un=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},dn=(e,t,r,n)=>{let s,o,i;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!n||n(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=r!==!1&&Ve(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},fn=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},pn=e=>{if(!e)return null;if(ie(e))return e;let t=e.length;if(!yt(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},hn=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ve(Uint8Array)),mn=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=n.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},yn=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},gn=Q("HTMLFormElement"),bn=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,s){return n.toUpperCase()+s}),Ze=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),wn=Q("RegExp"),wt=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};fe(r,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(n[o]=i||s)}),Object.defineProperties(e,n)},xn=e=>{wt(e,(t,r)=>{if(W(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(W(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Sn=(e,t)=>{const r={},n=s=>{s.forEach(o=>{r[o]=!0})};return ie(e)?n(e):n(String(e).split(t)),r},_n=()=>{},En=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Le="abcdefghijklmnopqrstuvwxyz",Ge="0123456789",xt={DIGIT:Ge,ALPHA:Le,ALPHA_DIGIT:Le+Le.toUpperCase()+Ge},vn=(e=16,t=xt.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r};function Rn(e){return!!(e&&W(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const On=e=>{const t=new Array(10),r=(n,s)=>{if(Oe(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[s]=n;const o=ie(n)?[]:{};return fe(n,(i,c)=>{const d=r(i,s+1);!ue(d)&&(o[c]=d)}),t[s]=void 0,o}}return n};return r(e,0)},Tn=Q("AsyncFunction"),kn=e=>e&&(Oe(e)||W(e))&&W(e.then)&&W(e.catch),St=((e,t)=>e?setImmediate:t?((r,n)=>(oe.addEventListener("message",({source:s,data:o})=>{s===oe&&o===r&&n.length&&n.shift()()},!1),s=>{n.push(s),oe.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",W(oe.postMessage)),An=typeof queueMicrotask<"u"?queueMicrotask.bind(oe):typeof process<"u"&&process.nextTick||St,a={isArray:ie,isArrayBuffer:mt,isBuffer:zt,isFormData:en,isArrayBufferView:Wt,isString:Jt,isNumber:yt,isBoolean:Yt,isObject:Oe,isPlainObject:ge,isReadableStream:nn,isRequest:rn,isResponse:on,isHeaders:sn,isUndefined:ue,isDate:Kt,isFile:Xt,isBlob:Zt,isRegExp:wn,isFunction:W,isStream:Qt,isURLSearchParams:tn,isTypedArray:hn,isFileList:Gt,forEach:fe,merge:Pe,extend:cn,trim:an,stripBOM:ln,inherits:un,toFlatObject:dn,kindOf:ve,kindOfTest:Q,endsWith:fn,toArray:pn,forEachEntry:mn,matchAll:yn,isHTMLForm:gn,hasOwnProperty:Ze,hasOwnProp:Ze,reduceDescriptors:wt,freezeMethods:xn,toObjectSet:Sn,toCamelCase:bn,noop:_n,toFiniteNumber:En,findKey:gt,global:oe,isContextDefined:bt,ALPHABET:xt,generateString:vn,isSpecCompliantForm:Rn,toJSONObject:On,isAsyncFn:Tn,isThenable:kn,setImmediate:St,asap:An};function k(e,t,r,n,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),s&&(this.response=s,this.status=s.status?s.status:null)}a.inherits(k,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.status}}});const _t=k.prototype,Et={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Et[e]={value:e}});Object.defineProperties(k,Et);Object.defineProperty(_t,"isAxiosError",{value:!0});k.from=(e,t,r,n,s,o)=>{const i=Object.create(_t);return a.toFlatObject(e,i,function(d){return d!==Error.prototype},c=>c!=="isAxiosError"),k.call(i,e.message,t,r,n,s),i.cause=e,i.name=e.name,o&&Object.assign(i,o),i};const $n=null;function Ce(e){return a.isPlainObject(e)||a.isArray(e)}function vt(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function Qe(e,t,r){return e?e.concat(t).map(function(s,o){return s=vt(s),!r&&o?"["+s+"]":s}).join(r?".":""):t}function Ln(e){return a.isArray(e)&&!e.some(Ce)}const Dn=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function Te(e,t,r){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=a.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(S,g){return!a.isUndefined(g[S])});const n=r.metaTokens,s=r.visitor||u,o=r.dots,i=r.indexes,d=(r.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function l(h){if(h===null)return"";if(a.isDate(h))return h.toISOString();if(!d&&a.isBlob(h))throw new k("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(h)||a.isTypedArray(h)?d&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function u(h,S,g){let D=h;if(h&&!g&&typeof h=="object"){if(a.endsWith(S,"{}"))S=n?S:S.slice(0,-2),h=JSON.stringify(h);else if(a.isArray(h)&&Ln(h)||(a.isFileList(h)||a.endsWith(S,"[]"))&&(D=a.toArray(h)))return S=vt(S),D.forEach(function(A,$){!(a.isUndefined(A)||A===null)&&t.append(i===!0?Qe([S],$,o):i===null?S:S+"[]",l(A))}),!1}return Ce(h)?!0:(t.append(Qe(g,S,o),l(h)),!1)}const m=[],_=Object.assign(Dn,{defaultVisitor:u,convertValue:l,isVisitable:Ce});function O(h,S){if(!a.isUndefined(h)){if(m.indexOf(h)!==-1)throw Error("Circular reference detected in "+S.join("."));m.push(h),a.forEach(h,function(D,P){(!(a.isUndefined(D)||D===null)&&s.call(t,D,a.isString(P)?P.trim():P,S,_))===!0&&O(D,S?S.concat(P):[P])}),m.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return O(e),t}function et(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function He(e,t){this._pairs=[],e&&Te(e,this,t)}const Rt=He.prototype;Rt.append=function(t,r){this._pairs.push([t,r])};Rt.toString=function(t){const r=t?function(n){return t.call(this,n,et)}:et;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};function Fn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ot(e,t,r){if(!t)return e;const n=r&&r.encode||Fn;a.isFunction(r)&&(r={serialize:r});const s=r&&r.serialize;let o;if(s?o=s(t,r):o=a.isURLSearchParams(t)?t.toString():new He(t,r).toString(n),o){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Nn{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(n){n!==null&&t(n)})}}const tt=Nn,Tt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Bn=typeof URLSearchParams<"u"?URLSearchParams:He,Pn=typeof FormData<"u"?FormData:null,Cn=typeof Blob<"u"?Blob:null,Mn={isBrowser:!0,classes:{URLSearchParams:Bn,FormData:Pn,Blob:Cn},protocols:["http","https","file","blob","url","data"]},ze=typeof window<"u"&&typeof document<"u",Me=typeof navigator=="object"&&navigator||void 0,qn=ze&&(!Me||["ReactNative","NativeScript","NS"].indexOf(Me.product)<0),Un=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),jn=ze&&window.location.href||"http://localhost",In=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ze,hasStandardBrowserEnv:qn,hasStandardBrowserWebWorkerEnv:Un,navigator:Me,origin:jn},Symbol.toStringTag,{value:"Module"})),H={...In,...Mn};function Vn(e,t){return Te(e,new H.classes.URLSearchParams,Object.assign({visitor:function(r,n,s,o){return H.isNode&&a.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function Hn(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function zn(e){const t={},r=Object.keys(e);let n;const s=r.length;let o;for(n=0;n<s;n++)o=r[n],t[o]=e[o];return t}function kt(e){function t(r,n,s,o){let i=r[o++];if(i==="__proto__")return!0;const c=Number.isFinite(+i),d=o>=r.length;return i=!i&&a.isArray(s)?s.length:i,d?(a.hasOwnProp(s,i)?s[i]=[s[i],n]:s[i]=n,!c):((!s[i]||!a.isObject(s[i]))&&(s[i]=[]),t(r,n,s[i],o)&&a.isArray(s[i])&&(s[i]=zn(s[i])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const r={};return a.forEachEntry(e,(n,s)=>{t(Hn(n),s,r,0)}),r}return null}function Wn(e,t,r){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const We={transitional:Tt,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",s=n.indexOf("application/json")>-1,o=a.isObject(t);if(o&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s?JSON.stringify(kt(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t)||a.isReadableStream(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Vn(t,this.formSerializer).toString();if((c=a.isFileList(t))||n.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return Te(c?{"files[]":t}:t,d&&new d,this.formSerializer)}}return o||s?(r.setContentType("application/json",!1),Wn(t)):t}],transformResponse:[function(t){const r=this.transitional||We.transitional,n=r&&r.forcedJSONParsing,s=this.responseType==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(n&&!this.responseType||s)){const i=!(r&&r.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(c){if(i)throw c.name==="SyntaxError"?k.from(c,k.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:H.classes.FormData,Blob:H.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{We.headers[e]={}});const Je=We,Jn=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Yn=e=>{const t={};let r,n,s;return e&&e.split(`
|
|
2
|
-
`).forEach(function(i){s=i.indexOf(":"),r=i.substring(0,s).trim().toLowerCase(),n=i.substring(s+1).trim(),!(!r||t[r]&&Jn[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},nt=Symbol("internals");function le(e){return e&&String(e).trim().toLowerCase()}function be(e){return e===!1||e==null?e:a.isArray(e)?e.map(be):String(e)}function Kn(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const Xn=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function De(e,t,r,n,s){if(a.isFunction(n))return n.call(this,t,r);if(s&&(t=r),!!a.isString(t)){if(a.isString(n))return t.indexOf(n)!==-1;if(a.isRegExp(n))return n.test(t)}}function Zn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function Gn(e,t){const r=a.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(s,o,i){return this[n].call(this,t,s,o,i)},configurable:!0})})}class ke{constructor(t){t&&this.set(t)}set(t,r,n){const s=this;function o(c,d,l){const u=le(d);if(!u)throw new Error("header name must be a non-empty string");const m=a.findKey(s,u);(!m||s[m]===void 0||l===!0||l===void 0&&s[m]!==!1)&&(s[m||d]=be(c))}const i=(c,d)=>a.forEach(c,(l,u)=>o(l,u,d));if(a.isPlainObject(t)||t instanceof this.constructor)i(t,r);else if(a.isString(t)&&(t=t.trim())&&!Xn(t))i(Yn(t),r);else if(a.isHeaders(t))for(const[c,d]of t.entries())o(d,c,n);else t!=null&&o(r,t,n);return this}get(t,r){if(t=le(t),t){const n=a.findKey(this,t);if(n){const s=this[n];if(!r)return s;if(r===!0)return Kn(s);if(a.isFunction(r))return r.call(this,s,n);if(a.isRegExp(r))return r.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=le(t),t){const n=a.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||De(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let s=!1;function o(i){if(i=le(i),i){const c=a.findKey(n,i);c&&(!r||De(n,n[c],c,r))&&(delete n[c],s=!0)}}return a.isArray(t)?t.forEach(o):o(t),s}clear(t){const r=Object.keys(this);let n=r.length,s=!1;for(;n--;){const o=r[n];(!t||De(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const r=this,n={};return a.forEach(this,(s,o)=>{const i=a.findKey(n,o);if(i){r[i]=be(s),delete r[o];return}const c=t?Zn(o):String(o).trim();c!==o&&delete r[o],r[c]=be(s),n[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return a.forEach(this,(n,s)=>{n!=null&&n!==!1&&(r[s]=t&&a.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
|
3
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(s=>n.set(s)),n}static accessor(t){const n=(this[nt]=this[nt]={accessors:{}}).accessors,s=this.prototype;function o(i){const c=le(i);n[c]||(Gn(s,i),n[c]=!0)}return a.isArray(t)?t.forEach(o):o(t),this}}ke.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(ke.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});a.freezeMethods(ke);const G=ke;function Fe(e,t){const r=this||Je,n=t||r,s=G.from(n.headers);let o=n.data;return a.forEach(e,function(c){o=c.call(r,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function At(e){return!!(e&&e.__CANCEL__)}function ae(e,t,r){k.call(this,e??"canceled",k.ERR_CANCELED,t,r),this.name="CanceledError"}a.inherits(ae,k,{__CANCEL__:!0});function $t(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new k("Request failed with status code "+r.status,[k.ERR_BAD_REQUEST,k.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Qn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function er(e,t){e=e||10;const r=new Array(e),n=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(d){const l=Date.now(),u=n[o];i||(i=l),r[s]=d,n[s]=l;let m=o,_=0;for(;m!==s;)_+=r[m++],m=m%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),l-i<t)return;const O=u&&l-u;return O?Math.round(_*1e3/O):void 0}}function tr(e,t){let r=0,n=1e3/t,s,o;const i=(l,u=Date.now())=>{r=u,s=null,o&&(clearTimeout(o),o=null),e.apply(null,l)};return[(...l)=>{const u=Date.now(),m=u-r;m>=n?i(l,u):(s=l,o||(o=setTimeout(()=>{o=null,i(s)},n-m)))},()=>s&&i(s)]}const Se=(e,t,r=3)=>{let n=0;const s=er(50,250);return tr(o=>{const i=o.loaded,c=o.lengthComputable?o.total:void 0,d=i-n,l=s(d),u=i<=c;n=i;const m={loaded:i,total:c,progress:c?i/c:void 0,bytes:d,rate:l||void 0,estimated:l&&c&&u?(c-i)/l:void 0,event:o,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(m)},r)},rt=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},ot=e=>(...t)=>a.asap(()=>e(...t)),nr=H.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,H.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(H.origin),H.navigator&&/(msie|trident)/i.test(H.navigator.userAgent)):()=>!0,rr=H.hasStandardBrowserEnv?{write(e,t,r,n,s,o){const i=[e+"="+encodeURIComponent(t)];a.isNumber(r)&&i.push("expires="+new Date(r).toGMTString()),a.isString(n)&&i.push("path="+n),a.isString(s)&&i.push("domain="+s),o===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function or(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function sr(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Lt(e,t){return e&&!or(t)?sr(e,t):t}const st=e=>e instanceof G?{...e}:e;function se(e,t){t=t||{};const r={};function n(l,u,m,_){return a.isPlainObject(l)&&a.isPlainObject(u)?a.merge.call({caseless:_},l,u):a.isPlainObject(u)?a.merge({},u):a.isArray(u)?u.slice():u}function s(l,u,m,_){if(a.isUndefined(u)){if(!a.isUndefined(l))return n(void 0,l,m,_)}else return n(l,u,m,_)}function o(l,u){if(!a.isUndefined(u))return n(void 0,u)}function i(l,u){if(a.isUndefined(u)){if(!a.isUndefined(l))return n(void 0,l)}else return n(void 0,u)}function c(l,u,m){if(m in t)return n(l,u);if(m in e)return n(void 0,l)}const d={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(l,u,m)=>s(st(l),st(u),m,!0)};return a.forEach(Object.keys(Object.assign({},e,t)),function(u){const m=d[u]||s,_=m(e[u],t[u],u);a.isUndefined(_)&&m!==c||(r[u]=_)}),r}const Dt=e=>{const t=se({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:c}=t;t.headers=i=G.from(i),t.url=Ot(Lt(t.baseURL,t.url),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let d;if(a.isFormData(r)){if(H.hasStandardBrowserEnv||H.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((d=i.getContentType())!==!1){const[l,...u]=d?d.split(";").map(m=>m.trim()).filter(Boolean):[];i.setContentType([l||"multipart/form-data",...u].join("; "))}}if(H.hasStandardBrowserEnv&&(n&&a.isFunction(n)&&(n=n(t)),n||n!==!1&&nr(t.url))){const l=s&&o&&rr.read(o);l&&i.set(s,l)}return t},ir=typeof XMLHttpRequest<"u",ar=ir&&function(e){return new Promise(function(r,n){const s=Dt(e);let o=s.data;const i=G.from(s.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:l}=s,u,m,_,O,h;function S(){O&&O(),h&&h(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let g=new XMLHttpRequest;g.open(s.method.toUpperCase(),s.url,!0),g.timeout=s.timeout;function D(){if(!g)return;const A=G.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),B={data:!c||c==="text"||c==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:A,config:e,request:g};$t(function(J){r(J),S()},function(J){n(J),S()},B),g=null}"onloadend"in g?g.onloadend=D:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(D)},g.onabort=function(){g&&(n(new k("Request aborted",k.ECONNABORTED,e,g)),g=null)},g.onerror=function(){n(new k("Network Error",k.ERR_NETWORK,e,g)),g=null},g.ontimeout=function(){let $=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const B=s.transitional||Tt;s.timeoutErrorMessage&&($=s.timeoutErrorMessage),n(new k($,B.clarifyTimeoutError?k.ETIMEDOUT:k.ECONNABORTED,e,g)),g=null},o===void 0&&i.setContentType(null),"setRequestHeader"in g&&a.forEach(i.toJSON(),function($,B){g.setRequestHeader(B,$)}),a.isUndefined(s.withCredentials)||(g.withCredentials=!!s.withCredentials),c&&c!=="json"&&(g.responseType=s.responseType),l&&([_,h]=Se(l,!0),g.addEventListener("progress",_)),d&&g.upload&&([m,O]=Se(d),g.upload.addEventListener("progress",m),g.upload.addEventListener("loadend",O)),(s.cancelToken||s.signal)&&(u=A=>{g&&(n(!A||A.type?new ae(null,e,g):A),g.abort(),g=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const P=Qn(s.url);if(P&&H.protocols.indexOf(P)===-1){n(new k("Unsupported protocol "+P+":",k.ERR_BAD_REQUEST,e));return}g.send(o||null)})},cr=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,s;const o=function(l){if(!s){s=!0,c();const u=l instanceof Error?l:this.reason;n.abort(u instanceof k?u:new ae(u instanceof Error?u.message:u))}};let i=t&&setTimeout(()=>{i=null,o(new k(`timeout ${t} of ms exceeded`,k.ETIMEDOUT))},t);const c=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(o):l.removeEventListener("abort",o)}),e=null)};e.forEach(l=>l.addEventListener("abort",o));const{signal:d}=n;return d.unsubscribe=()=>a.asap(c),d}},lr=cr,ur=function*(e,t){let r=e.byteLength;if(!t||r<t){yield e;return}let n=0,s;for(;n<r;)s=n+t,yield e.slice(n,s),n=s},dr=async function*(e,t){for await(const r of fr(e))yield*ur(r,t)},fr=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},it=(e,t,r,n)=>{const s=dr(e,t);let o=0,i,c=d=>{i||(i=!0,n&&n(d))};return new ReadableStream({async pull(d){try{const{done:l,value:u}=await s.next();if(l){c(),d.close();return}let m=u.byteLength;if(r){let _=o+=m;r(_)}d.enqueue(new Uint8Array(u))}catch(l){throw c(l),l}},cancel(d){return c(d),s.return()}},{highWaterMark:2})},Ae=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Ft=Ae&&typeof ReadableStream=="function",pr=Ae&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Nt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},hr=Ft&&Nt(()=>{let e=!1;const t=new Request(H.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),at=64*1024,qe=Ft&&Nt(()=>a.isReadableStream(new Response("").body)),_e={stream:qe&&(e=>e.body)};Ae&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!_e[t]&&(_e[t]=a.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new k(`Response type '${t}' is not supported`,k.ERR_NOT_SUPPORT,n)})})})(new Response);const mr=async e=>{if(e==null)return 0;if(a.isBlob(e))return e.size;if(a.isSpecCompliantForm(e))return(await new Request(H.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(a.isArrayBufferView(e)||a.isArrayBuffer(e))return e.byteLength;if(a.isURLSearchParams(e)&&(e=e+""),a.isString(e))return(await pr(e)).byteLength},yr=async(e,t)=>{const r=a.toFiniteNumber(e.getContentLength());return r??mr(t)},gr=Ae&&(async e=>{let{url:t,method:r,data:n,signal:s,cancelToken:o,timeout:i,onDownloadProgress:c,onUploadProgress:d,responseType:l,headers:u,withCredentials:m="same-origin",fetchOptions:_}=Dt(e);l=l?(l+"").toLowerCase():"text";let O=lr([s,o&&o.toAbortSignal()],i),h;const S=O&&O.unsubscribe&&(()=>{O.unsubscribe()});let g;try{if(d&&hr&&r!=="get"&&r!=="head"&&(g=await yr(u,n))!==0){let B=new Request(t,{method:"POST",body:n,duplex:"half"}),M;if(a.isFormData(n)&&(M=B.headers.get("content-type"))&&u.setContentType(M),B.body){const[J,X]=rt(g,Se(ot(d)));n=it(B.body,at,J,X)}}a.isString(m)||(m=m?"include":"omit");const D="credentials"in Request.prototype;h=new Request(t,{..._,signal:O,method:r.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:D?m:void 0});let P=await fetch(h);const A=qe&&(l==="stream"||l==="response");if(qe&&(c||A&&S)){const B={};["status","statusText","headers"].forEach(Y=>{B[Y]=P[Y]});const M=a.toFiniteNumber(P.headers.get("content-length")),[J,X]=c&&rt(M,Se(ot(c),!0))||[];P=new Response(it(P.body,at,J,()=>{X&&X(),S&&S()}),B)}l=l||"text";let $=await _e[a.findKey(_e,l)||"text"](P,e);return!A&&S&&S(),await new Promise((B,M)=>{$t(B,M,{data:$,headers:G.from(P.headers),status:P.status,statusText:P.statusText,config:e,request:h})})}catch(D){throw S&&S(),D&&D.name==="TypeError"&&/fetch/i.test(D.message)?Object.assign(new k("Network Error",k.ERR_NETWORK,e,h),{cause:D.cause||D}):k.from(D,D&&D.code,e,h)}}),Ue={http:$n,xhr:ar,fetch:gr};a.forEach(Ue,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const ct=e=>`- ${e}`,br=e=>a.isFunction(e)||e===null||e===!1,Bt={getAdapter:e=>{e=a.isArray(e)?e:[e];const{length:t}=e;let r,n;const s={};for(let o=0;o<t;o++){r=e[o];let i;if(n=r,!br(r)&&(n=Ue[(i=String(r)).toLowerCase()],n===void 0))throw new k(`Unknown adapter '${i}'`);if(n)break;s[i||"#"+o]=n}if(!n){const o=Object.entries(s).map(([c,d])=>`adapter ${c} `+(d===!1?"is not supported by the environment":"is not available in the build"));let i=t?o.length>1?`since :
|
|
4
|
-
`+o.map(ct).join(`
|
|
5
|
-
`):" "+ct(o[0]):"as no adapter specified";throw new k("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return n},adapters:Ue};function Ne(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ae(null,e)}function lt(e){return Ne(e),e.headers=G.from(e.headers),e.data=Fe.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Bt.getAdapter(e.adapter||Je.adapter)(e).then(function(n){return Ne(e),n.data=Fe.call(e,e.transformResponse,n),n.headers=G.from(n.headers),n},function(n){return At(n)||(Ne(e),n&&n.response&&(n.response.data=Fe.call(e,e.transformResponse,n.response),n.response.headers=G.from(n.response.headers))),Promise.reject(n)})}const Pt="1.7.9",$e={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{$e[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const ut={};$e.transitional=function(t,r,n){function s(o,i){return"[Axios v"+Pt+"] Transitional option '"+o+"'"+i+(n?". "+n:"")}return(o,i,c)=>{if(t===!1)throw new k(s(i," has been removed"+(r?" in "+r:"")),k.ERR_DEPRECATED);return r&&!ut[i]&&(ut[i]=!0,console.warn(s(i," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(o,i,c):!0}};$e.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function wr(e,t,r){if(typeof e!="object")throw new k("options must be an object",k.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let s=n.length;for(;s-- >0;){const o=n[s],i=t[o];if(i){const c=e[o],d=c===void 0||i(c,o,e);if(d!==!0)throw new k("option "+o+" must be "+d,k.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new k("Unknown option "+o,k.ERR_BAD_OPTION)}}const we={assertOptions:wr,validators:$e},ee=we.validators;class Ee{constructor(t){this.defaults=t,this.interceptors={request:new tt,response:new tt}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";try{n.stack?o&&!String(n.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
|
6
|
-
`+o):n.stack=o}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=se(this.defaults,r);const{transitional:n,paramsSerializer:s,headers:o}=r;n!==void 0&&we.assertOptions(n,{silentJSONParsing:ee.transitional(ee.boolean),forcedJSONParsing:ee.transitional(ee.boolean),clarifyTimeoutError:ee.transitional(ee.boolean)},!1),s!=null&&(a.isFunction(s)?r.paramsSerializer={serialize:s}:we.assertOptions(s,{encode:ee.function,serialize:ee.function},!0)),we.assertOptions(r,{baseUrl:ee.spelling("baseURL"),withXsrfToken:ee.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let i=o&&a.merge(o.common,o[r.method]);o&&a.forEach(["delete","get","head","post","put","patch","common"],h=>{delete o[h]}),r.headers=G.concat(i,o);const c=[];let d=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(r)===!1||(d=d&&S.synchronous,c.unshift(S.fulfilled,S.rejected))});const l=[];this.interceptors.response.forEach(function(S){l.push(S.fulfilled,S.rejected)});let u,m=0,_;if(!d){const h=[lt.bind(this),void 0];for(h.unshift.apply(h,c),h.push.apply(h,l),_=h.length,u=Promise.resolve(r);m<_;)u=u.then(h[m++],h[m++]);return u}_=c.length;let O=r;for(m=0;m<_;){const h=c[m++],S=c[m++];try{O=h(O)}catch(g){S.call(this,g);break}}try{u=lt.call(this,O)}catch(h){return Promise.reject(h)}for(m=0,_=l.length;m<_;)u=u.then(l[m++],l[m++]);return u}getUri(t){t=se(this.defaults,t);const r=Lt(t.baseURL,t.url);return Ot(r,t.params,t.paramsSerializer)}}a.forEach(["delete","get","head","options"],function(t){Ee.prototype[t]=function(r,n){return this.request(se(n||{},{method:t,url:r,data:(n||{}).data}))}});a.forEach(["post","put","patch"],function(t){function r(n){return function(o,i,c){return this.request(se(c||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}Ee.prototype[t]=r(),Ee.prototype[t+"Form"]=r(!0)});const xe=Ee;class Ye{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(o){r=o});const n=this;this.promise.then(s=>{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](s);n._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(c=>{n.subscribe(c),o=c}).then(s);return i.cancel=function(){n.unsubscribe(o)},i},t(function(o,i,c){n.reason||(n.reason=new ae(o,i,c),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Ye(function(s){t=s}),cancel:t}}}const xr=Ye;function Sr(e){return function(r){return e.apply(null,r)}}function _r(e){return a.isObject(e)&&e.isAxiosError===!0}const je={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(je).forEach(([e,t])=>{je[t]=e});const Er=je;function Ct(e){const t=new xe(e),r=ht(xe.prototype.request,t);return a.extend(r,xe.prototype,t,{allOwnKeys:!0}),a.extend(r,t,null,{allOwnKeys:!0}),r.create=function(s){return Ct(se(e,s))},r}const I=Ct(Je);I.Axios=xe;I.CanceledError=ae;I.CancelToken=xr;I.isCancel=At;I.VERSION=Pt;I.toFormData=Te;I.AxiosError=k;I.Cancel=I.CanceledError;I.all=function(t){return Promise.all(t)};I.spread=Sr;I.isAxiosError=_r;I.mergeConfig=se;I.AxiosHeaders=G;I.formToJSON=e=>kt(a.isHTMLForm(e)?new FormData(e):e);I.getAdapter=Bt.getAdapter;I.HttpStatusCode=Er;I.default=I;const pe=I,he=te.U(),me="http://127.0.0.1:7001",vr=async e=>(await pe({method:"post",headers:{token:he},url:`${me}/middleLayer/kline/getKlineBasic`,data:{...e,userId:te.V("id")}})).data,Rr=async e=>(await pe({method:"post",headers:{token:he},url:`${me}/middleLayer/kline/getKline`,data:e})).data,Or=async e=>(await pe({method:"post",headers:{token:he},url:`${me}/middleLayer/post/alarm/deliversign/addAlarmPrice`,data:{...e,userId:te.V("id")}})).data,Tr=async e=>(await pe({method:"post",headers:{token:he},url:`${me}/middleLayer/post/alarm/deliversign/findAlarmPriceByUserId`,data:{...e,userId:te.V("id")}})).data,kr=async e=>(await pe({method:"post",headers:{token:he},url:`${me}/middleLayer/post/alarm/deliversign/updateAlarmPrice`,data:{...e,userId:te.V("id")}})).data,{round:dt}=te.x,Ar=(e,t,r,n,s)=>{const{variety:o,featureId:i,featureType:c}=r,{gridLeft:d,gridRight:l}=n;return t.map(u=>{const{warnPrice:m}=u,_=e==null?void 0:e.convertToPixel({yAxisIndex:0},m);let O=0;return{type:"group",name:"warningLine",info:u,draggable:"vertical",children:[{type:"line",info:u,shape:{x1:d,y1:_,x2:(e==null?void 0:e.getWidth())-l,y2:_},style:{stroke:"#FFF",lineWidth:1,lineDash:[8,4]},z:10},{type:"text",info:u,x:(e==null?void 0:e.getWidth())-l,y:_-5,style:{fill:"#FFF",text:m,stroke:"#000",lineWidth:1,opacity:1},z:10}],ondragstart:h=>{O=h.offsetY},ondrag:h=>{var S;if(h.target&&h.target.childAt(1)){const g=e.convertFromPixel({yAxisIndex:0},_+(h.offsetY-O));(S=h.target.childAt(1))==null||S.animate("style",!1).when(1,{text:dt(g,3)}).start()}},ondragend:async h=>{const g=h.offsetY-O;if(g!==0){const D=e==null?void 0:e.convertFromPixel({yAxisIndex:0},g+_),P={id:u.id,warnPrice:dt(D,3),featureId:i,featureCode:o,featureType:c};await kr(P),ft.ElMessage.success("画线预警修改成功");const A=await Tr({featureId:i});s&&s((A==null?void 0:A.body)||[])}}}})},$r={class:"kline-tips"},Lr=p.defineComponent({__name:"index",props:{data:{type:Array,require:!0}},setup(e){return(t,r)=>(p.openBlock(),p.createElementBlock("div",$r,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(e.data,(n,s)=>(p.openBlock(),p.createElementBlock("div",{key:s,class:"kline-tips-item",style:p.normalizeStyle({color:n.color})},p.toDisplayString(n.label)+" "+p.toDisplayString(n.value),5))),128))]))}});const Ie=de._export_sfc(Lr,[["__scopeId","data-v-f83b6b36"]]);const Dr={class:"kline-tips"},Fr={__name:"index",props:{data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0}},setup(e){const{round:t,formatValue:r}=te.x,n=e,s=p.computed(()=>{const{data:i,activeIndex:c}=n;if(i.data&&i.data[c]){const d=i.data[c],l=[{label:"开",value:t(d[0])},{label:"高",value:t(d[3])},{label:"低",value:t(d[2])},{label:"收",value:t(d[1])}];d[4]!==null&&l.push({label:"额",value:r(d[4])});let u;return d[6]>0?u="red":d[6]<0&&(u="green"),l.push({label:"涨跌",value:`${t(d[6])}%`,color:u}),l}return[]}),o=p.computed(()=>{var d;const{data:i,activeIndex:c}=n;return((d=i==null?void 0:i.mainIndicator)==null?void 0:d.map(l=>({label:l.key,value:t(l.data[c]),color:l.color})))||[]});return(i,c)=>(p.openBlock(),p.createElementBlock("div",Dr,[p.createVNode(Ie,{data:s.value},null,8,["data"]),p.createVNode(Ie,{data:o.value},null,8,["data"])]))}},Nr=de._export_sfc(Fr,[["__scopeId","data-v-64b5c2a3"]]);const Br={class:"klineSub"},Pr={class:"klineSub-tips"},Cr={key:0,class:"klineSub-tips-select"},Mr={__name:"index",props:{data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0},modelValue:{type:String,required:!0},subIndicatorList:{type:Array,required:!0}},emits:["update:modelValue"],setup(e,{expose:t,emit:r}){const{round:n}=te.x;let s,o;const i=r,c=e,d=p.ref(),l=p.computed({get(){return c.modelValue},set(_){i("update:modelValue",_)}}),u=p.computed(()=>{var h;const{data:_,activeIndex:O}=c;return((h=_==null?void 0:_.subIndicator)==null?void 0:h.map(S=>({label:S.key,color:S.color,value:S.data[O]||"-"})))||[]});p.onMounted(()=>{s=Be.init(d.value);let _=!0;o=new ResizeObserver(()=>{if(_){_=null;return}s.resize()}),o.observe(d.value)}),p.onUnmounted(()=>{s.dispose(),o.disconnect(),o=null});const m=(_,O)=>{const h=_[O],S=O===0?_[O]:_[O-1];return h[0]===h[1]?h[0]>=S[1]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}:h[1]>h[0]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}};return t({connect:_=>{Be.connect([_,s])},draw:(_,O)=>{p.nextTick(()=>{const{startValue:h,endValue:S,maxValueSpan:g}=_,{leftYAxisRange:D,rightYAxisRange:P}=c.data.subIndicator[0],A=c.data.subIndicator.map($=>{if($.series==="bar")return{name:"subMain",xAxisIndex:0,yAxisIndex:1,type:"bar",silent:!0,symbol:"none",data:$.data.map((B,M)=>$.seriesColor==="kline"?{value:B,itemStyle:m(c.data.data,M)}:$.seriesColor==="value"?{value:B,itemStyle:{color:B>=0?"#FF0000":"#00FFFF"}}:{value:B,itemStyle:{color:$.seriesColor}})};if($.series==="line")return{xAxisIndex:0,yAxisIndex:$.yAxis==="right"?2:1,name:$.key,type:"line",silent:!0,symbol:"none",data:$.data,lineStyle:{width:1},itemStyle:{color:$.color}}});s.setOption({animation:!1,grid:{left:`${O.gridLeft}px`,top:"10px",right:`${O.gridRight}px`,bottom:"20px"},dataZoom:[{type:"inside",startValue:h,endValue:S,maxValueSpan:g}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:$=>{const{axisDimension:B,value:M}=$;if(B==="x")return M;if($.axisIndex===1)return String(n(M))}}},formatter:()=>""},xAxis:{type:"category",data:c.data.time,axisLine:{show:!0},splitLine:{show:!1},axisLabel:{show:!0,formatter:$=>$}},yAxis:[{position:"right"},{position:"left",min:D==="cover"?$=>$.min:null,max:D==="cover"?$=>$.max:null,splitNumber:1,axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}}},{position:"right",min:P==="cover"?$=>$.min:null,max:P==="cover"?$=>$.max:null,splitNumber:1,axisLine:{show:!1},splitLine:{show:!1},axisLabel:{show:!1}}],series:A},!0)})}}),(_,O)=>{const h=Xe.ElOption,S=Xe.ElSelect;return p.openBlock(),p.createElementBlock("div",Br,[p.createElementVNode("div",Pr,[u.value.length?(p.openBlock(),p.createElementBlock("div",Cr,[p.createVNode(S,{modelValue:l.value,"onUpdate:modelValue":O[0]||(O[0]=g=>l.value=g),size:"small","popper-class":"element-dark",class:"element-dark subIndicator"},{default:p.withCtx(()=>[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(e.subIndicatorList,g=>(p.openBlock(),p.createBlock(h,{key:g.value,label:g.label,value:g.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):p.createCommentVNode("",!0),p.createVNode(Ie,{data:u.value},null,8,["data"])]),p.createElementVNode("div",{class:"klineSub-chart",ref_key:"subChartRef",ref:d},null,512)])}}},qr=de._export_sfc(Mr,[["__scopeId","data-v-c06321cd"]]),Ur=p.defineComponent({__name:"index",emits:["closeContextMenuCallBack"],setup(e,{emit:t}){const r=t,n=p.ref(),s=p.ref(),o=p.ref({display:"none",top:"0px",left:"0px"}),i=()=>{o.value.display="none",r("closeContextMenuCallBack"),document.removeEventListener("click",i)},c=d=>{if(d.preventDefault(),o.value.display==="block"){const{offsetX:l,offsetY:u}=d,{offsetWidth:m,offsetHeight:_}=s.value;if(l<=m&&u<=_)return}n.value.click(),o.value={display:"block",top:`${d.offsetY}px`,left:`${d.offsetX}px`},p.nextTick(()=>{const l=n.value.getBoundingClientRect(),u=s.value.getBoundingClientRect();u.left+u.width>=l.right&&(o.value.left=`${d.offsetX-u.width}px`),u.top+u.height>=l.bottom&&(console.log("高度超出"),o.value.top=`${d.offsetY-u.height}px`)}),document.addEventListener("click",i)};return(d,l)=>(p.openBlock(),p.createElementBlock("div",{ref_key:"contextmenuRef",ref:n,class:"contextmenu",onContextmenu:c,onMouseleave:i},[p.renderSlot(d.$slots,"default",{},void 0,!0),o.value.display!=="none"?(p.openBlock(),p.createElementBlock("div",{key:0,ref_key:"contextmenuContentRef",ref:s,class:"contextmenu-popover",style:p.normalizeStyle(o.value)},[p.renderSlot(d.$slots,"popover",{},void 0,!0)],4)):p.createCommentVNode("",!0)],544))}});const jr=de._export_sfc(Ur,[["__scopeId","data-v-811db6b4"]]);const Ir={class:"klineBasic"},Vr={class:"klineBasic-tips"},Hr={key:0,class:"klineBasic-sub"},zr={__name:"index",props:{variety:{type:[String,Number],default:()=>null},varietyName:{type:[String,Number],default:()=>null},featureId:{type:[String,Number],default:()=>null},featureType:{type:[String,Number],default:()=>null},cycle:{type:String,default:()=>null},mainIndicator:{type:Object,default:()=>""},indicatorStore:{type:Object,default:()=>null},startTime:{type:String,default:()=>null},endTime:{type:String,default:()=>null},right:{type:Number,default:1},config:{type:Object,default:()=>({})}},emits:["change","getFactorData"],setup(e,{expose:t,emit:r}){const{round:n}=te.x;let s=null,o=null,i,c,d=!1,l=!1;const u=r,m=e,_=p.ref(null),O=p.ref(null),h=p.ref("VOL"),S=p.ref(0),g=p.ref({}),D=p.ref([]),P=p.ref([{label:"画线预警",key:"drawWarningLine"}]),A=p.computed(()=>({defaultShowCounts:500,addCounts:2e3,maxShowCounts:5e3,loadCheckCounts:500,showSubChart:!0,gridLeft:80,gridRight:50,showWarningLine:!0,getFactorData:!0,...m.config}));p.watch(()=>{var R,F;return[m.variety,m.cycle,m.mainIndicator,h.value,(R=m.indicatorStore)==null?void 0:R.filterIndicator,(F=m.indicatorStore)==null?void 0:F.customIndicator]},()=>{M()},{deep:!0}),p.onMounted(()=>{M()}),p.onUnmounted(()=>{o==null||o.off("datazoom"),o==null||o.off("highlight"),o==null||o.off("globalout"),o==null||o.dispose(),s==null||s.dispose()});const $=()=>{o||(o=Be.init(_.value),B(),A.value.showSubChart&&O.value.connect(o),s=te.D(_.value),s.listen(()=>{requestAnimationFrame(()=>{o.resize()})}))},B=()=>{o==null||o.on("datazoom",R=>{clearTimeout(c),c=setTimeout(()=>{var q,x,b,f;const{loadCheckCounts:F}=A.value;if((x=(q=o==null?void 0:o.getOption())==null?void 0:q.dataZoom)!=null&&x[0]){const{startValue:w}=(f=(b=o==null?void 0:o.getOption())==null?void 0:b.dataZoom)==null?void 0:f[0];w<F&&d===!1&&l===!1&&(d=!0,J("history")),Y()}clearTimeout(c)},100)}),o==null||o.on("highlight",R=>{var q,x;let F=R.dataIndex||-1;R.batch&&(F=typeof((q=R==null?void 0:R.batch[0])==null?void 0:q.dataIndex)=="number"?(x=R==null?void 0:R.batch[0])==null?void 0:x.dataIndex:-1),clearTimeout(i),i=setTimeout(()=>{S.value=F,clearTimeout(i)},20)}),o==null||o.on("globalout",()=>{var F,q,x;const R=(x=(q=(F=o==null?void 0:o.getOption())==null?void 0:F.dataZoom)==null?void 0:q[0])==null?void 0:x.endValue;S.value=R})},M=async()=>{var j,V,K;if(!m.variety||!m.cycle)return;const{variety:R,featureId:F,cycle:q,indicatorStore:x,mainIndicator:b,right:f,startTime:w,endTime:y}=m,{defaultShowCounts:E,addCounts:v,showWarningLine:L,getFactorData:C}=A.value,N={variety:R,featureId:F,cycle:q,mainIndicatorList:x.getIndicatorParams(b),subIndicator:h.value,right:f,showWarningLine:L,getFactorData:C};w&&y?(N.startTime=w,N.endTime=y):w?(N.startTime=w,N.limit=E+v):y?(N.endTime=y,N.limit=E+v):(N.endTime=Vt().format("YYYY-MM-DD HH:mm:ss"),N.limit=E+v);const T=await vr(N);g.value=(j=T==null?void 0:T.body)==null?void 0:j.kline,D.value=((V=T==null?void 0:T.body)==null?void 0:V.warningLine)||[],X(),Y(),C&&u("getFactorData",(K=T==null?void 0:T.body)==null?void 0:K.factor)},J=async R=>{const{variety:F,cycle:q,indicatorStore:x,mainIndicator:b,right:f}=m,{addCounts:w}=A.value,{time:y}=g.value;if(R==="history"){const E=await Rr({variety:F,cycle:q,endTime:y[0],limit:w,mainIndicatorList:x.getIndicatorParams(b),subIndicator:h.value,right:f});g.value={time:[...E.body.time,...g.value.time.slice(1)],data:[...E.body.data,...g.value.data.slice(1)],mainIndicator:g.value.mainIndicator.map((v,L)=>({...v,data:[...E.body.mainIndicator[L].data,...v.data.slice(1)]})),subIndicator:g.value.subIndicator.map((v,L)=>({...v,data:[...E.body.subIndicator[L].data,...v.data.slice(1)]}))},X(!0),E.body.data.length<w&&(l=!0),d=!1}},X=(R=!1)=>{var L,C,N;$();const{data:F,time:q}=g.value,{gridRight:x,gridLeft:b,defaultShowCounts:f,maxShowCounts:w,showSubChart:y}=A.value;let E=F.length-1-f,v=F.length-1;if(R){const T=o.getOption(),j=(C=(L=T==null?void 0:T.xAxis)==null?void 0:L[0])==null?void 0:C.data,V=(N=T==null?void 0:T.dataZoom)==null?void 0:N[0],K=j[V==null?void 0:V.startValue],re=j[V==null?void 0:V.endValue];E=q.findIndex(Z=>Z===K),v=q.findIndex(Z=>Z===re)}o.setOption({animation:!1,grid:{top:"48px",right:`${x}px`,bottom:y?"6px":"24px",left:`${b}px`},dataZoom:[{type:"inside",startValue:E,endValue:v,maxValueSpan:w}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:T=>{const{axisDimension:j,value:V}=T;return j==="x"?y?"":V:String(n(V))}}},formatter:()=>""},xAxis:{show:!y,type:"category",data:q,splitLine:{show:!1}},yAxis:{type:"value",axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}},min:T=>n(T.min),max:T=>n(T.max)},series:[{type:"candlestick",data:F,itemStyle:{color:"transparent",color0:"#00FFFF",borderColor:"#FF0000",borderColor0:"#00FFFF",borderWidth:1}},...g.value.mainIndicator.map(T=>({name:T.key,type:"line",silent:!0,symbol:"none",data:T.data,lineStyle:{width:T.width||1},itemStyle:{color:T.color}}))]},!0),S.value=v,y&&O.value.draw({startValue:E,endValue:v,maxValueSpan:w},{gridLeft:b,gridRight:x})},Y=()=>{if(!o)return;const R=o==null?void 0:o.getOption();R&&(o==null||o.setOption({...R,graphic:[...Ar(o,D.value,m,A.value,F=>{D.value=F,Y(),u("change","warningLine",F)})]},!0))},U=R=>{const{variety:F,varietyName:q,featureId:x,featureType:b}=m;if(R.key==="drawWarningLine"){const f=o==null?void 0:o.getOption(),w=f.tooltip[0];o==null||o.setOption({...f,tooltip:{...w,axisPointer:{...w.axisPointer,lineStyle:{width:0},crossStyle:{width:2},label:{...w.axisPointer.label,backgroundColor:"transparent",formatter:E=>""}}}});const y=async E=>{o==null||o.getZr().off("mousedown",y);const v=o==null?void 0:o.convertFromPixel({yAxisIndex:0},E.offsetY),L=Math.round(v*1e3)/1e3;o==null||o.setOption({...f,tooltip:{...w,axisPointer:{...w.axisPointer,lineStyle:{width:1},crossStyle:{width:1},label:{...w.axisPointer.label,backgroundColor:null}}}}),await Or({featureCode:F,featureName:q,featureId:x,featureType:b,warnPrice:L}),ft.ElMessage.success("画线预警成功!")};o==null||o.getZr().on("mousedown",y)}};return t({draw(R,F){R==="warningLine"&&(D.value=F,Y())}}),(R,F)=>{var b;const q=Ke.ElMenuItem,x=Ke.ElMenu;return p.openBlock(),p.createElementBlock("div",Ir,[p.createElementVNode("div",Vr,[p.createVNode(Nr,{data:g.value,activeIndex:S.value},null,8,["data","activeIndex"])]),p.createElementVNode("div",{class:"klineBasic-main",style:p.normalizeStyle({height:A.value.showSubChart?"70%":"100%"})},[p.createVNode(jr,null,{popover:p.withCtx(()=>[p.createVNode(x,{style:{borderRadius:"4px",overflow:"hidden",background:"#fff",borderRight:0}},{default:p.withCtx(()=>[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(P.value,f=>(p.openBlock(),p.createBlock(q,{style:{height:"36px"},key:f.key,index:f.key,onClick:w=>U(f)},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(f.label),1)]),_:2},1032,["index","onClick"]))),128))]),_:1})]),default:p.withCtx(()=>[p.createElementVNode("div",{ref_key:"klineBasicMainRef",ref:_,style:{height:"100%"}},null,512)]),_:1})],4),A.value.showSubChart?(p.openBlock(),p.createElementBlock("div",Hr,[p.createVNode(qr,{ref_key:"klineSubRef",ref:O,modelValue:h.value,"onUpdate:modelValue":F[0]||(F[0]=f=>h.value=f),data:g.value,activeIndex:S.value,subIndicatorList:(b=e.indicatorStore)==null?void 0:b.subIndicatorList},null,8,["modelValue","data","activeIndex","subIndicatorList"])])):p.createCommentVNode("",!0)])}}},Wr=de._export_sfc(zr,[["__scopeId","data-v-30f35824"]]),Jr={install(e){e.component("st-klineBasic",Wr)}};module.exports=Jr;
|
|
1
|
+
"use strict";require("./base-ec05f348.cjs");const me=require("./el-overlay-891dcc40.cjs");require("./el-input-6c6f5bda.cjs");const ye=require("./el-input-number-0524d787.cjs"),ve=require("./el-button-196807af.cjs"),ge=require("./el-empty-19ea04f4.cjs"),ue=require("./el-menu-item-dc904a35.cjs");require("./el-tooltip-0ea8fbf8.cjs");require("./el-popper-f62316cd.cjs");const e=require("vue"),he=require("echarts"),U=require("./index-a96158ae.cjs"),ie=require("./el-message-562e923d.cjs"),re=require("./_plugin-vue_export-helper-f246444f.cjs");require("./el-tag-3b03d13e.cjs");const ce=require("./el-select-928f8c19.cjs");require("./el-scrollbar-d1c3e7f7.cjs");require("./vnode-7fbc61e1.cjs");require("./index-e1e83173.cjs");require("./use-form-common-props-1b84d8f4.cjs");require("./refs-d00b710b.cjs");require("./event-61f49698.cjs");require("./scroll-41224831.cjs");require("./index-8a0b1c53.cjs");require("./typescript-b63f8e83.cjs");require("./index-80a2b137.cjs");require("./index-eea0bcb3.cjs");require("./config-provider-7cdfca4d.cjs");require("./castArray-a45823fe.cjs");require("./debounce-b2ff12bd.cjs");function xe(l){const T=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const B in l)if(B!=="default"){const w=Object.getOwnPropertyDescriptor(l,B);Object.defineProperty(T,B,w.get?w:{enumerable:!0,get:()=>l[B]})}}return T.default=l,Object.freeze(T)}const le=xe(he);var _e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function be(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var de={exports:{}};(function(l,T){(function(B,w){l.exports=w()})(_e,function(){var B=1e3,w=6e4,D=36e5,t="millisecond",S="second",M="minute",p="hour",h="day",$="week",d="month",y="quarter",x="year",k="date",E="Invalid Date",N=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,R=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,F={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(u){var i=["th","st","nd","rd"],r=u%100;return"["+u+(i[(r-20)%10]||i[r]||i[0])+"]"}},j=function(u,i,r){var s=String(u);return!s||s.length>=i?u:""+Array(i+1-s.length).join(r)+u},_={s:j,z:function(u){var i=-u.utcOffset(),r=Math.abs(i),s=Math.floor(r/60),a=r%60;return(i<=0?"+":"-")+j(s,2,"0")+":"+j(a,2,"0")},m:function u(i,r){if(i.date()<r.date())return-u(r,i);var s=12*(r.year()-i.year())+(r.month()-i.month()),a=i.clone().add(s,d),o=r-a<0,n=i.clone().add(s+(o?-1:1),d);return+(-(s+(r-a)/(o?a-n:n-a))||0)},a:function(u){return u<0?Math.ceil(u)||0:Math.floor(u)},p:function(u){return{M:d,y:x,w:$,d:h,D:k,h:p,m:M,s:S,ms:t,Q:y}[u]||String(u||"").toLowerCase().replace(/s$/,"")},u:function(u){return u===void 0}},I="en",W={};W[I]=F;var G="$isDayjsObject",H=function(u){return u instanceof ee||!(!u||!u[G])},Q=function u(i,r,s){var a;if(!i)return I;if(typeof i=="string"){var o=i.toLowerCase();W[o]&&(a=o),r&&(W[o]=r,a=o);var n=i.split("-");if(!a&&n.length>1)return u(n[0])}else{var c=i.name;W[c]=i,a=c}return!s&&a&&(I=a),a||!s&&I},q=function(u,i){if(H(u))return u.clone();var r=typeof i=="object"?i:{};return r.date=u,r.args=arguments,new ee(r)},b=_;b.l=Q,b.i=H,b.w=function(u,i){return q(u,{locale:i.$L,utc:i.$u,x:i.$x,$offset:i.$offset})};var ee=function(){function u(r){this.$L=Q(r.locale,null,!0),this.parse(r),this.$x=this.$x||r.x||{},this[G]=!0}var i=u.prototype;return i.parse=function(r){this.$d=function(s){var a=s.date,o=s.utc;if(a===null)return new Date(NaN);if(b.u(a))return new Date;if(a instanceof Date)return new Date(a);if(typeof a=="string"&&!/Z$/i.test(a)){var n=a.match(N);if(n){var c=n[2]-1||0,f=(n[7]||"0").substring(0,3);return o?new Date(Date.UTC(n[1],c,n[3]||1,n[4]||0,n[5]||0,n[6]||0,f)):new Date(n[1],c,n[3]||1,n[4]||0,n[5]||0,n[6]||0,f)}}return new Date(a)}(r),this.init()},i.init=function(){var r=this.$d;this.$y=r.getFullYear(),this.$M=r.getMonth(),this.$D=r.getDate(),this.$W=r.getDay(),this.$H=r.getHours(),this.$m=r.getMinutes(),this.$s=r.getSeconds(),this.$ms=r.getMilliseconds()},i.$utils=function(){return b},i.isValid=function(){return this.$d.toString()!==E},i.isSame=function(r,s){var a=q(r);return this.startOf(s)<=a&&a<=this.endOf(s)},i.isAfter=function(r,s){return q(r)<this.startOf(s)},i.isBefore=function(r,s){return this.endOf(s)<q(r)},i.$g=function(r,s,a){return b.u(r)?this[s]:this.set(a,r)},i.unix=function(){return Math.floor(this.valueOf()/1e3)},i.valueOf=function(){return this.$d.getTime()},i.startOf=function(r,s){var a=this,o=!!b.u(s)||s,n=b.p(r),c=function(A,C){var Y=b.w(a.$u?Date.UTC(a.$y,C,A):new Date(a.$y,C,A),a);return o?Y:Y.endOf(h)},f=function(A,C){return b.w(a.toDate()[A].apply(a.toDate("s"),(o?[0,0,0,0]:[23,59,59,999]).slice(C)),a)},m=this.$W,v=this.$M,g=this.$D,O="set"+(this.$u?"UTC":"");switch(n){case x:return o?c(1,0):c(31,11);case d:return o?c(1,v):c(0,v+1);case $:var L=this.$locale().weekStart||0,V=(m<L?m+7:m)-L;return c(o?g-V:g+(6-V),v);case h:case k:return f(O+"Hours",0);case p:return f(O+"Minutes",1);case M:return f(O+"Seconds",2);case S:return f(O+"Milliseconds",3);default:return this.clone()}},i.endOf=function(r){return this.startOf(r,!1)},i.$set=function(r,s){var a,o=b.p(r),n="set"+(this.$u?"UTC":""),c=(a={},a[h]=n+"Date",a[k]=n+"Date",a[d]=n+"Month",a[x]=n+"FullYear",a[p]=n+"Hours",a[M]=n+"Minutes",a[S]=n+"Seconds",a[t]=n+"Milliseconds",a)[o],f=o===h?this.$D+(s-this.$W):s;if(o===d||o===x){var m=this.clone().set(k,1);m.$d[c](f),m.init(),this.$d=m.set(k,Math.min(this.$D,m.daysInMonth())).$d}else c&&this.$d[c](f);return this.init(),this},i.set=function(r,s){return this.clone().$set(r,s)},i.get=function(r){return this[b.p(r)]()},i.add=function(r,s){var a,o=this;r=Number(r);var n=b.p(s),c=function(v){var g=q(o);return b.w(g.date(g.date()+Math.round(v*r)),o)};if(n===d)return this.set(d,this.$M+r);if(n===x)return this.set(x,this.$y+r);if(n===h)return c(1);if(n===$)return c(7);var f=(a={},a[M]=w,a[p]=D,a[S]=B,a)[n]||1,m=this.$d.getTime()+r*f;return b.w(m,this)},i.subtract=function(r,s){return this.add(-1*r,s)},i.format=function(r){var s=this,a=this.$locale();if(!this.isValid())return a.invalidDate||E;var o=r||"YYYY-MM-DDTHH:mm:ssZ",n=b.z(this),c=this.$H,f=this.$m,m=this.$M,v=a.weekdays,g=a.months,O=a.meridiem,L=function(C,Y,P,K){return C&&(C[Y]||C(s,o))||P[Y].slice(0,K)},V=function(C){return b.s(c%12||12,C,"0")},A=O||function(C,Y,P){var K=C<12?"AM":"PM";return P?K.toLowerCase():K};return o.replace(R,function(C,Y){return Y||function(P){switch(P){case"YY":return String(s.$y).slice(-2);case"YYYY":return b.s(s.$y,4,"0");case"M":return m+1;case"MM":return b.s(m+1,2,"0");case"MMM":return L(a.monthsShort,m,g,3);case"MMMM":return L(g,m);case"D":return s.$D;case"DD":return b.s(s.$D,2,"0");case"d":return String(s.$W);case"dd":return L(a.weekdaysMin,s.$W,v,2);case"ddd":return L(a.weekdaysShort,s.$W,v,3);case"dddd":return v[s.$W];case"H":return String(c);case"HH":return b.s(c,2,"0");case"h":return V(1);case"hh":return V(2);case"a":return A(c,f,!0);case"A":return A(c,f,!1);case"m":return String(f);case"mm":return b.s(f,2,"0");case"s":return String(s.$s);case"ss":return b.s(s.$s,2,"0");case"SSS":return b.s(s.$ms,3,"0");case"Z":return n}return null}(C)||n.replace(":","")})},i.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},i.diff=function(r,s,a){var o,n=this,c=b.p(s),f=q(r),m=(f.utcOffset()-this.utcOffset())*w,v=this-f,g=function(){return b.m(n,f)};switch(c){case x:o=g()/12;break;case d:o=g();break;case y:o=g()/3;break;case $:o=(v-m)/6048e5;break;case h:o=(v-m)/864e5;break;case p:o=v/D;break;case M:o=v/w;break;case S:o=v/B;break;default:o=v}return a?o:b.a(o)},i.daysInMonth=function(){return this.endOf(d).$D},i.$locale=function(){return W[this.$L]},i.locale=function(r,s){if(!r)return this.$L;var a=this.clone(),o=Q(r,s,!0);return o&&(a.$L=o),a},i.clone=function(){return b.w(this.$d,this)},i.toDate=function(){return new Date(this.valueOf())},i.toJSON=function(){return this.isValid()?this.toISOString():null},i.toISOString=function(){return this.$d.toISOString()},i.toString=function(){return this.$d.toUTCString()},u}(),te=ee.prototype;return q.prototype=te,[["$ms",t],["$s",S],["$m",M],["$H",p],["$W",h],["$M",d],["$y",x],["$D",k]].forEach(function(u){te[u[1]]=function(i){return this.$g(i,u[0],u[1])}}),q.extend=function(u,i){return u.$i||(u(i,ee,q),u.$i=!0),q},q.locale=Q,q.isDayjs=H,q.unix=function(u){return q(1e3*u)},q.en=W[I],q.Ls=W,q.p={},q})})(de);var ke=de.exports;const we=be(ke);let X=null;const $e=l=>{const T=U.y(l,{handleReq:B=>{U.v()&&(B.headers.token=U.U())},handleRes:B=>{const{data:w}=B;if(w.code===401)return location.origin.includes("localhost")?location.href=`${location.origin}/#/404`:U.K(),!0}});T.get,X=T.post},Se=l=>X("/middleLayer/kline/getKlineBasic",{...l,userId:U.V("id")}),Me=l=>X("/middleLayer/kline/getKline",l),Ve=async l=>X("/alarm/deliversign/addAlarmPrice",{...l,userId:U.V("id")}),De=async l=>X("/alarm/deliversign/findAlarmPriceByUserId",{...l,userId:U.V("id")}),fe=async l=>X("/alarm/deliversign/updateAlarmPrice",{...l,userId:U.V("id")}),Le=async l=>X("/alarm/deliversign/deleteAlarmPrice",{...l,userId:U.V("id")}),{round:ne}=U.x,Te=(l,T,B,w)=>{const{data:D,time:t}=l,{gridTop:S,gridRight:M,gridLeft:p,maxShowCounts:h,showSubChart:$}=T;return{animation:!1,grid:{top:`${S}px`,right:`${M}px`,bottom:$?"6px":"24px",left:`${p}px`},dataZoom:[{type:"inside",startValue:B,endValue:w,maxValueSpan:h}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:d=>{const{axisDimension:y,value:x}=d;return y==="x"?$?"":x:String(ne(x))}}},formatter:()=>""},xAxis:{show:!$,type:"category",data:t,splitLine:{show:!1}},yAxis:{type:"value",axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}},min:d=>ne(d.min),max:d=>ne(d.max)},series:[{type:"candlestick",data:D,itemStyle:{color:"transparent",color0:"#00FFFF",borderColor:"#FF0000",borderColor0:"#00FFFF",borderWidth:1}},...l.mainIndicator.map(d=>({name:d.key,type:"line",silent:!0,symbol:"none",data:d.data,lineStyle:{width:d.width||1},itemStyle:{color:d.color}}))]}},Be=(l,T,B,w,D)=>{const{variety:t,featureId:S,featureType:M}=B,{gridTop:p,gridLeft:h,gridRight:$}=w;return T.reduce((d,y)=>{const{warnPrice:x}=y,k=l==null?void 0:l.convertToPixel({yAxisIndex:0},x);if(k<=p||k>=(l==null?void 0:l.getHeight()))return d;let E=0;return[...d,{type:"group",name:"warningLine",info:y,draggable:"vertical",children:[{type:"line",info:y,shape:{x1:h,y1:k,x2:(l==null?void 0:l.getWidth())-$,y2:k},style:{stroke:"#FFF",lineWidth:1,lineDash:[8,4]},z:10},{type:"text",info:y,x:(l==null?void 0:l.getWidth())-$,y:k-5,style:{fill:"#FFF",text:x,stroke:"#000",lineWidth:1,opacity:1},z:10}],ondragstart:N=>{E=N.offsetY},ondrag:N=>{var R;if(N.target&&N.target.childAt(1)){const F=l.convertFromPixel({yAxisIndex:0},k+(N.offsetY-E));(R=N.target.childAt(1))==null||R.animate("style",!1).when(1,{text:ne(F,3)}).start()}},ondragend:async N=>{const F=N.offsetY-E;if(F!==0){const j=l==null?void 0:l.convertFromPixel({yAxisIndex:0},F+k),_={id:y.id,warnPrice:ne(j,3),featureId:S,featureCode:t,featureType:M};await fe(_),ie.ElMessage.success("画线预警修改成功"),D&&D()}}}]},[])},Ne={class:"kline-tips"},Fe=e.defineComponent({__name:"index",props:{data:{type:Array,require:!0}},setup(l){return(T,B)=>(e.openBlock(),e.createElementBlock("div",Ne,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.data,(w,D)=>(e.openBlock(),e.createElementBlock("div",{key:D,class:"kline-tips-item",style:e.normalizeStyle({color:w.color})},e.toDisplayString(w.label)+" "+e.toDisplayString(w.value),5))),128))]))}});const se=re._export_sfc(Fe,[["__scopeId","data-v-f83b6b36"]]);const Oe={class:"kline-tips"},Ee={__name:"index",props:{data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0}},setup(l){const{round:T,formatValue:B}=U.x,w=l,D=e.computed(()=>{const{data:S,activeIndex:M}=w;if(S.data&&S.data[M]){const p=S.data[M],h=[{label:"开",value:T(p[0])},{label:"高",value:T(p[3])},{label:"低",value:T(p[2])},{label:"收",value:T(p[1])}];p[4]!==null&&h.push({label:"额",value:B(p[4])});let $;return p[6]>0?$="red":p[6]<0&&($="green"),h.push({label:"涨跌",value:`${T(p[6])}%`,color:$}),h}return[]}),t=e.computed(()=>{var p;const{data:S,activeIndex:M}=w;return((p=S==null?void 0:S.mainIndicator)==null?void 0:p.map(h=>({label:h.key,value:T(h.data[M]),color:h.color})))||[]});return(S,M)=>(e.openBlock(),e.createElementBlock("div",Oe,[e.createVNode(se,{data:D.value},null,8,["data"]),e.createVNode(se,{data:t.value},null,8,["data"])]))}},qe=re._export_sfc(Ee,[["__scopeId","data-v-64b5c2a3"]]);const Ae={class:"klineSub"},Ce={class:"klineSub-tips"},Ie={key:0,class:"klineSub-tips-select"},We={__name:"index",props:{data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0},modelValue:{type:String,required:!0},subIndicatorList:{type:Array,required:!0}},emits:["update:modelValue"],setup(l,{expose:T,emit:B}){const{round:w}=U.x;let D,t;const S=B,M=l,p=e.ref(),h=e.computed({get(){return M.modelValue},set(y){S("update:modelValue",y)}}),$=e.computed(()=>{var k;const{data:y,activeIndex:x}=M;return((k=y==null?void 0:y.subIndicator)==null?void 0:k.map(E=>({label:E.key,color:E.color,value:E.data[x]||"-"})))||[]});e.onMounted(()=>{D=le.init(p.value);let y=!0;t=new ResizeObserver(()=>{if(y){y=null;return}D.resize()}),t.observe(p.value)}),e.onUnmounted(()=>{D.dispose(),t.disconnect(),t=null});const d=(y,x)=>{const k=y[x],E=x===0?y[x]:y[x-1];return k[0]===k[1]?k[0]>=E[1]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}:k[1]>k[0]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}};return T({connect:y=>{le.connect([y,D])},draw:(y,x)=>{e.nextTick(()=>{const{startValue:k,endValue:E,maxValueSpan:N}=y,{leftYAxisRange:R,rightYAxisRange:F}=M.data.subIndicator[0],j=M.data.subIndicator.map(_=>{if(_.series==="bar")return{name:"subMain",xAxisIndex:0,yAxisIndex:1,type:"bar",silent:!0,symbol:"none",data:_.data.map((I,W)=>_.seriesColor==="kline"?{value:I,itemStyle:d(M.data.data,W)}:_.seriesColor==="value"?{value:I,itemStyle:{color:I>=0?"#FF0000":"#00FFFF"}}:{value:I,itemStyle:{color:_.seriesColor}})};if(_.series==="line")return{xAxisIndex:0,yAxisIndex:_.yAxis==="right"?2:1,name:_.key,type:"line",silent:!0,symbol:"none",data:_.data,lineStyle:{width:1},itemStyle:{color:_.color}}});D.setOption({animation:!1,grid:{left:`${x.gridLeft}px`,top:"10px",right:`${x.gridRight}px`,bottom:"20px"},dataZoom:[{type:"inside",startValue:k,endValue:E,maxValueSpan:N}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:_=>{const{axisDimension:I,value:W}=_;if(I==="x")return W;if(_.axisIndex===1)return String(w(W))}}},formatter:()=>""},xAxis:{type:"category",data:M.data.time,axisLine:{show:!0},splitLine:{show:!1},axisLabel:{show:!0,formatter:_=>_}},yAxis:[{position:"right"},{position:"left",min:R==="cover"?_=>_.min:null,max:R==="cover"?_=>_.max:null,splitNumber:1,axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}}},{position:"right",min:F==="cover"?_=>_.min:null,max:F==="cover"?_=>_.max:null,splitNumber:1,axisLine:{show:!1},splitLine:{show:!1},axisLabel:{show:!1}}],series:j},!0)})}}),(y,x)=>{const k=ce.ElOption,E=ce.ElSelect;return e.openBlock(),e.createElementBlock("div",Ae,[e.createElementVNode("div",Ce,[$.value.length?(e.openBlock(),e.createElementBlock("div",Ie,[e.createVNode(E,{modelValue:h.value,"onUpdate:modelValue":x[0]||(x[0]=N=>h.value=N),size:"small","popper-class":"element-dark",class:"element-dark subIndicator"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.subIndicatorList,N=>(e.openBlock(),e.createBlock(k,{key:N.value,label:N.label,value:N.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):e.createCommentVNode("",!0),e.createVNode(se,{data:$.value},null,8,["data"])]),e.createElementVNode("div",{class:"klineSub-chart",ref_key:"subChartRef",ref:p},null,512)])}}},Pe=re._export_sfc(We,[["__scopeId","data-v-c06321cd"]]),Ye=e.defineComponent({__name:"index",emits:["closeContextMenuCallBack"],setup(l,{emit:T}){const B=T,w=e.ref(),D=e.ref(),t=e.ref({display:"none",top:"0px",left:"0px"}),S=()=>{t.value.display="none",B("closeContextMenuCallBack"),document.removeEventListener("click",S)},M=p=>{if(p.preventDefault(),t.value.display==="block"){const{offsetX:h,offsetY:$}=p,{offsetWidth:d,offsetHeight:y}=D.value;if(h<=d&&$<=y)return}w.value.click(),t.value={display:"block",top:`${p.offsetY}px`,left:`${p.offsetX}px`},e.nextTick(()=>{const h=w.value.getBoundingClientRect(),$=D.value.getBoundingClientRect();$.left+$.width>=h.right&&(t.value.left=`${p.offsetX-$.width}px`),$.top+$.height>=h.bottom&&(console.log("高度超出"),t.value.top=`${p.offsetY-$.height}px`)}),document.addEventListener("click",S)};return(p,h)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"contextmenuRef",ref:w,class:"contextmenu",onContextmenu:M,onMouseleave:S},[e.renderSlot(p.$slots,"default",{},void 0,!0),t.value.display!=="none"?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"contextmenuContentRef",ref:D,class:"contextmenu-popover",style:e.normalizeStyle(t.value)},[e.renderSlot(p.$slots,"popover",{},void 0,!0)],4)):e.createCommentVNode("",!0)],544))}});const Re=re._export_sfc(Ye,[["__scopeId","data-v-811db6b4"]]);const pe=l=>(e.pushScopeId("data-v-70c4625e"),l=l(),e.popScopeId(),l),je={class:"klineBasic"},He={class:"klineBasic-tips"},ze={key:0,class:"klineBasic-sub"},Ue={key:1,class:"klineBasic-empty"},Ze={key:2,class:"klineBasic-error"},Ke=pe(()=>e.createElementVNode("div",{class:"klineBasic-error-content"}," 加载失败,请刷新重试 ",-1)),Je={style:{"text-align":"center"}},Xe=pe(()=>e.createElementVNode("span",{style:{"margin-right":"10px"}},"预警价格:",-1)),Ge={class:"dialog-footer"},Qe={__name:"index",props:{variety:{type:[String,Number],default:()=>null},varietyName:{type:[String,Number],default:()=>null},featureId:{type:[String,Number],default:()=>null},featureType:{type:[String,Number],default:()=>null},cycle:{type:[String,Number],default:()=>null},mainIndicator:{type:String,default:()=>""},indicatorStore:{type:Object,default:()=>null},startTime:{type:String,default:()=>null},endTime:{type:String,default:()=>null},right:{type:[String,Number],default:1},config:{type:Object,default:()=>({})},env:{type:Object,default:()=>({})}},emits:["change","getFactorData"],setup(l,{expose:T,emit:B}){const w=[{label:"画线预警",key:"drawWarningLine"}];let D=null,t=null,S,M,p=!1,h=!1;const $=B,d=l,y=e.ref(!1),x=e.ref(!1),k=e.ref(null),E=e.ref(null),N=e.ref("VOL"),R=e.ref(0),F=e.ref({}),j=e.ref([]),_=e.ref({}),I=e.ref(!1),W=e.ref(""),G=e.ref([...w]),H=e.computed(()=>({defaultShowCounts:500,addCounts:2e3,maxShowCounts:5e3,loadCheckCounts:500,showSubChart:!0,gridTop:48,gridLeft:80,gridRight:50,showWarningLine:!0,getFactorData:!0,...d.config}));e.watch(()=>{var o,n;return[d.variety,d.cycle,d.mainIndicator,N.value,(o=d.indicatorStore)==null?void 0:o.filterIndicator,(n=d.indicatorStore)==null?void 0:n.customIndicator]},()=>{b()},{deep:!0}),e.onMounted(()=>{$e(d.env),b()}),e.onUnmounted(()=>{t==null||t.off("datazoom"),t==null||t.off("highlight"),t==null||t.off("globalout"),t==null||t.dispose(),D==null||D.dispose()});const Q=()=>{t||(t=le.init(k.value),q(),H.value.showSubChart&&E.value.connect(t),D=U.D(k.value),D.listen(()=>{requestAnimationFrame(()=>{t.resize()})}))},q=()=>{t==null||t.on("datazoom",n=>{clearTimeout(M),M=setTimeout(()=>{var f,m,v,g;const{loadCheckCounts:c}=H.value;if((m=(f=t==null?void 0:t.getOption())==null?void 0:f.dataZoom)!=null&&m[0]){const{startValue:O}=(g=(v=t==null?void 0:t.getOption())==null?void 0:v.dataZoom)==null?void 0:g[0];O<c&&p===!1&&h===!1&&(p=!0,ee("history")),u()}clearTimeout(M)},100)}),t==null||t.on("highlight",n=>{var f,m;let c=n.dataIndex||-1;n.batch&&(c=typeof((f=n==null?void 0:n.batch[0])==null?void 0:f.dataIndex)=="number"?(m=n==null?void 0:n.batch[0])==null?void 0:m.dataIndex:-1),clearTimeout(S),S=setTimeout(()=>{R.value=c,clearTimeout(S)},20)}),t==null||t.on("globalout",()=>{var c,f,m;const n=(m=(f=(c=t==null?void 0:t.getOption())==null?void 0:c.dataZoom)==null?void 0:f[0])==null?void 0:m.endValue;R.value=n});let o=null;t==null||t.on("contextmenu",n=>{o=setTimeout(()=>{n.componentType==="graphic"&&(_.value=n.info,G.value=[{label:"删除画线",key:"deleteWarningLine"},{label:"修改画线",key:"changeWarningLine"}]),clearTimeout(o),o=null})})},b=async()=>{var o,n,c,f,m,v;try{if(!d.variety||!d.cycle)return;const{variety:g,featureId:O,cycle:L,indicatorStore:V,mainIndicator:A,right:C,startTime:Y,endTime:P}=d,{defaultShowCounts:K,addCounts:J,showWarningLine:ae,getFactorData:oe}=H.value,z={variety:g,featureId:O,cycle:L,mainIndicatorList:V.getIndicatorParams(A),subIndicator:N.value,right:C,showWarningLine:ae,getFactorData:oe};Y&&P?(z.startTime=Y,z.endTime=P):Y?(z.startTime=Y,z.limit=K+J):P?(z.endTime=P,z.limit=K+J):(z.endTime=we().format("YYYY-MM-DD HH:mm:ss"),z.limit=K+J);const Z=await Se(z);if((c=(n=(o=Z==null?void 0:Z.body)==null?void 0:o.kline)==null?void 0:n.time)!=null&&c.length)y.value=!1,x.value=!1;else{y.value=!0,x.value=!1;return}F.value=(f=Z==null?void 0:Z.body)==null?void 0:f.kline,j.value=((m=Z==null?void 0:Z.body)==null?void 0:m.warningLine)||[],te(),u(),oe&&$("getFactorData",(v=Z==null?void 0:Z.body)==null?void 0:v.factor)}catch(g){throw x.value=!0,y.value=!1,new Error(g)}},ee=async o=>{const{variety:n,cycle:c,indicatorStore:f,mainIndicator:m,right:v}=d,{addCounts:g}=H.value,{time:O}=F.value;if(o==="history"){const L=await Me({variety:n,cycle:c,endTime:O[0],limit:g,mainIndicatorList:f.getIndicatorParams(m),subIndicator:N.value,right:v});F.value={time:[...L.body.time,...F.value.time.slice(1)],data:[...L.body.data,...F.value.data.slice(1)],mainIndicator:F.value.mainIndicator.map((V,A)=>({...V,data:[...L.body.mainIndicator[A].data,...V.data.slice(1)]})),subIndicator:F.value.subIndicator.map((V,A)=>({...V,data:[...L.body.subIndicator[A].data,...V.data.slice(1)]}))},te(!0),L.body.data.length<g&&(h=!0),p=!1}},te=(o=!1)=>{var A,C,Y;Q();const{time:n}=F.value,{gridRight:c,gridLeft:f,defaultShowCounts:m,maxShowCounts:v,showSubChart:g}=H.value;let O=n.length-1-m,L=n.length-1;if(o){const P=t.getOption(),K=(C=(A=P==null?void 0:P.xAxis)==null?void 0:A[0])==null?void 0:C.data,J=(Y=P==null?void 0:P.dataZoom)==null?void 0:Y[0],ae=K[J==null?void 0:J.startValue],oe=K[J==null?void 0:J.endValue];O=n.findIndex(z=>z===ae),L=n.findIndex(z=>z===oe)}const V=Te(F.value,H.value,O,L);t.setOption(V,!0),R.value=L,g&&E.value.draw({startValue:O,endValue:L,maxValueSpan:v},{gridLeft:f,gridRight:c})},u=()=>{if(!t)return;const o=t==null?void 0:t.getOption();o&&(t==null||t.setOption({...o,graphic:[...Be(t,j.value,d,H.value,()=>{i()})]},!0))},i=async()=>{const o=await De({featureId:d.featureId});j.value=(o==null?void 0:o.body)||[],u(),$("change","warningLine",j.value)},r=async o=>{const{variety:n,varietyName:c,featureId:f,featureType:m}=d;if(o.key==="drawWarningLine"){const v=t==null?void 0:t.getOption(),g=v.tooltip[0];t==null||t.setOption({...v,tooltip:{...g,axisPointer:{...g.axisPointer,lineStyle:{width:0},crossStyle:{width:2},label:{...g.axisPointer.label,backgroundColor:"transparent",formatter:L=>""}}}});const O=async L=>{t==null||t.getZr().off("mousedown",O);const V=t==null?void 0:t.convertFromPixel({yAxisIndex:0},L.offsetY),A=Math.round(V*1e3)/1e3;t==null||t.setOption({...v,tooltip:{...g,axisPointer:{...g.axisPointer,lineStyle:{width:1},crossStyle:{width:1},label:{...g.axisPointer.label,backgroundColor:null}}}}),await Ve({featureCode:n,featureName:c,featureId:f,featureType:m,warnPrice:A}),ie.ElMessage.success("画线预警成功!"),i()};t==null||t.getZr().on("mousedown",O)}else o.key==="deleteWarningLine"?(await Le({id:_.value.id}),ie.ElMessage.success("画线预警删除成功"),i()):o.key==="changeWarningLine"&&(I.value=!0,W.value=_.value.warnPrice)},s=async()=>{const{variety:o,varietyName:n,featureId:c,featureType:f}=d;await fe({id:_.value.id,featureCode:o,featureName:n,featureId:c,featureType:f,warnPrice:W.value}),ie.ElMessage.success("画线预警修改成功"),i()},a=()=>{G.value=[...w]};return T({draw:(o,n)=>{o==="warningLine"&&(j.value=n,u())}}),(o,n)=>{var L;const c=ue.ElMenuItem,f=ue.ElMenu,m=ge.ElEmpty,v=ve.ElButton,g=ye.ElInputNumber,O=me.ElDialog;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",je,[e.createElementVNode("div",He,[e.createVNode(qe,{data:F.value,activeIndex:R.value},null,8,["data","activeIndex"])]),e.createElementVNode("div",{class:"klineBasic-main",style:e.normalizeStyle({height:H.value.showSubChart?"70%":"100%"})},[e.createVNode(Re,{onCloseContextMenuCallBack:a},{popover:e.withCtx(()=>[e.createVNode(f,{style:{borderRadius:"4px",overflow:"hidden",background:"#fff",borderRight:0}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(G.value,V=>(e.openBlock(),e.createBlock(c,{style:{height:"36px"},key:V.key,index:V.key,onClick:A=>r(V)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V.label),1)]),_:2},1032,["index","onClick"]))),128))]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"klineBasicMainRef",ref:k,style:{height:"100%"}},null,512)]),_:1})],4),H.value.showSubChart?(e.openBlock(),e.createElementBlock("div",ze,[e.createVNode(Pe,{ref_key:"klineSubRef",ref:E,modelValue:N.value,"onUpdate:modelValue":n[0]||(n[0]=V=>N.value=V),data:F.value,activeIndex:R.value,subIndicatorList:(L=l.indicatorStore)==null?void 0:L.subIndicatorList},null,8,["modelValue","data","activeIndex","subIndicatorList"])])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("div",Ue,[e.createVNode(m,{class:"klineBasic-empty-content",description:"暂无数据"})])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("div",Ze,[Ke,e.createElementVNode("div",Je,[e.createVNode(v,{onClick:b},{default:e.withCtx(()=>[e.createTextVNode("刷新")]),_:1})])])):e.createCommentVNode("",!0)]),e.createVNode(O,{modelValue:I.value,"onUpdate:modelValue":n[3]||(n[3]=V=>I.value=V),title:"画线预警-修改价格",width:"30%","align-center":""},{footer:e.withCtx(()=>[e.createElementVNode("span",Ge,[e.createVNode(v,{onClick:n[2]||(n[2]=V=>I.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(v,{type:"primary",onClick:s},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:1})])]),default:e.withCtx(()=>[Xe,e.createVNode(g,{modelValue:W.value,"onUpdate:modelValue":n[1]||(n[1]=V=>W.value=V),placeholder:"输入预警价格"},null,8,["modelValue"])]),_:1},8,["modelValue"])],64)}}},et=re._export_sfc(Qe,[["__scopeId","data-v-70c4625e"]]),tt={install(l){l.component("st-klineBasic",et)}};module.exports=tt;
|