From cf4ffb75031e8cbc28b6f2721d9939d5d69c9732 Mon Sep 17 00:00:00 2001 From: zhangpeihang <948869991@qq.com> Date: Thu, 12 May 2022 17:02:04 +0800 Subject: [PATCH 01/45] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E5=9B=BE=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BootstrapBlazor.FlowChart.csproj | 17 ++++ .../Components/FlowChart/FlowChart.css | 1 + .../Components/FlowChart/FlowChart.razor | 43 +++++++++ .../Components/FlowChart/FlowChart.razor.cs | 33 +++++++ .../wwwroot/js/flowchart.js | 90 +++++++++++++++++++ .../wwwroot/js/topology.js | 1 + 6 files changed, 185 insertions(+) create mode 100644 src/Extensions/Components/BootstrapBlazor.FlowChart/BootstrapBlazor.FlowChart.csproj create mode 100644 src/Extensions/Components/BootstrapBlazor.FlowChart/Components/FlowChart/FlowChart.css create mode 100644 src/Extensions/Components/BootstrapBlazor.FlowChart/Components/FlowChart/FlowChart.razor create mode 100644 src/Extensions/Components/BootstrapBlazor.FlowChart/Components/FlowChart/FlowChart.razor.cs create mode 100644 src/Extensions/Components/BootstrapBlazor.FlowChart/wwwroot/js/flowchart.js create mode 100644 src/Extensions/Components/BootstrapBlazor.FlowChart/wwwroot/js/topology.js diff --git a/src/Extensions/Components/BootstrapBlazor.FlowChart/BootstrapBlazor.FlowChart.csproj b/src/Extensions/Components/BootstrapBlazor.FlowChart/BootstrapBlazor.FlowChart.csproj new file mode 100644 index 000000000..72c7506e1 --- /dev/null +++ b/src/Extensions/Components/BootstrapBlazor.FlowChart/BootstrapBlazor.FlowChart.csproj @@ -0,0 +1,17 @@ + + + + net6.0 + enable + enable + + + + + + + + + + + diff --git a/src/Extensions/Components/BootstrapBlazor.FlowChart/Components/FlowChart/FlowChart.css b/src/Extensions/Components/BootstrapBlazor.FlowChart/Components/FlowChart/FlowChart.css new file mode 100644 index 000000000..fa19fee83 --- /dev/null +++ b/src/Extensions/Components/BootstrapBlazor.FlowChart/Components/FlowChart/FlowChart.css @@ -0,0 +1 @@ +#flowchart { height: 100vh; } diff --git a/src/Extensions/Components/BootstrapBlazor.FlowChart/Components/FlowChart/FlowChart.razor b/src/Extensions/Components/BootstrapBlazor.FlowChart/Components/FlowChart/FlowChart.razor new file mode 100644 index 000000000..25b831366 --- /dev/null +++ b/src/Extensions/Components/BootstrapBlazor.FlowChart/Components/FlowChart/FlowChart.razor @@ -0,0 +1,43 @@ +@namespace BootstrapBlazor.Components +@inherits BootstrapComponentBase + + + + +
+
+
+
+
+
+ diff --git a/src/Extensions/Components/BootstrapBlazor.FlowChart/Components/FlowChart/FlowChart.razor.cs b/src/Extensions/Components/BootstrapBlazor.FlowChart/Components/FlowChart/FlowChart.razor.cs new file mode 100644 index 000000000..7f6a66735 --- /dev/null +++ b/src/Extensions/Components/BootstrapBlazor.FlowChart/Components/FlowChart/FlowChart.razor.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BootstrapBlazor.Components +{ + /// + /// + /// + public partial class FlowChart + { + [NotNull] + private JSModule? Module { get; set; } + + /// + /// + /// + /// + /// + protected override async Task OnAfterRenderAsync(bool firstRender) + { + await base.OnAfterRenderAsync(firstRender); + + if (firstRender) + { + Module = await JSRuntime.LoadModule("./_content/BootstrapBlazor.FlowChart/js/flowchart.js", this, false); + await Module.InvokeVoidAsync("bb_flowchart_init", "flowchart"); + } + } + } +} diff --git a/src/Extensions/Components/BootstrapBlazor.FlowChart/wwwroot/js/flowchart.js b/src/Extensions/Components/BootstrapBlazor.FlowChart/wwwroot/js/flowchart.js new file mode 100644 index 000000000..b12afe21d --- /dev/null +++ b/src/Extensions/Components/BootstrapBlazor.FlowChart/wwwroot/js/flowchart.js @@ -0,0 +1,90 @@ + +export function bb_flowchart_init(id) { + BootstrapBlazorModules.addScript('_content/BootstrapBlazor.FlowChart/js/topology.js'); + BootstrapBlazorModules.addLink("http://at.alicdn.com/t/font_1517548_fgj6ei5bn1.css") + var handle = setInterval(function () { + clearInterval(handle); + var topology = new Topology(id); + const iconListDOM = document.querySelector('.icon-list'); + getIconList().forEach((icon) => { + const { key, title, data } = icon; + const div = document.createElement('div'); + const i = document.createElement('i'); + i.className = `iconfont icon-${key}`; + i.draggable = true; + i.title = title; + i.ondragstart = (e) => { + e.dataTransfer.setData('Topology', JSON.stringify(data)); + }; + div.appendChild(i); + iconListDOM.appendChild(div); + }); + }, 1000) + function getIconList() { + return [ + { + key: 'rect', + title: '矩形', + data: { + name: 'rectangle', + text: '矩形', + width: 100, + height: 100, + }, + }, + { + key: 'circle', + title: '圆形', + data: { + name: 'circle', + text: '圆形', + width: 100, + height: 100, + }, + }, + { + key: 'flowData', + title: '数据', + data: { + name: 'flowData', + text: '数据', + width: 100, + height: 100, + }, + }, + { + key: 'img', + title: '图片', + data: { + name: 'image', + width: 100, + height: 100, + image: + 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.zcool.cn%2Fcommunity%2F016ba9554b952b000001bf72fa6574.jpg%402o.jpg&refer=http%3A%2F%2Fimg.zcool.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1636344024&t=f977b8ad47acf62ee3579d594f32489a', + }, + }, + { + key: 'video', + title: '视频', + data: { + name: 'video', + width: 100, + height: 100, + video: 'http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4', + autoPlay: true, + }, + }, + { + key: 'audio', + title: '音频', + data: { + name: 'video', + width: 100, + height: 100, + audio: 'https://down.ear0.com:3321/preview?soundid=37418&type=mp3', + autoPlay: true, + }, + }, + ]; + } +} diff --git a/src/Extensions/Components/BootstrapBlazor.FlowChart/wwwroot/js/topology.js b/src/Extensions/Components/BootstrapBlazor.FlowChart/wwwroot/js/topology.js new file mode 100644 index 000000000..cc19a4c21 --- /dev/null +++ b/src/Extensions/Components/BootstrapBlazor.FlowChart/wwwroot/js/topology.js @@ -0,0 +1 @@ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Le5le=e():t.Le5le=e()}(self,(function(){return(()=>{var t={131:(t,e,i)=>{"use strict";function r(t,e){e||(e=new Path2D);let i=t.calculative.borderRadius||0,r=t.calculative.borderRadius||0;i<1&&(i=t.calculative.worldRect.width*i,r=t.calculative.worldRect.height*r);let n=ioi,activityDiagram:()=>wi,classPens:()=>di,flowPens:()=>Pi,sequencePens:()=>fi});const n=r;var o,s,a,c,l;!function(t){t[t.Node=0]="Node",t[t.Line=1]="Line"}(o||(o={})),function(t){t[t.None=0]="None",t[t.DisableEdit=1]="DisableEdit",t[t.DisableMove=2]="DisableMove",t[t.Disable=10]="Disable"}(s||(s={})),function(t){t[t.Default=0]="Default",t[t.In=1]="In",t[t.Out=2]="Out"}(a||(a={})),function(t){t[t.None=0]="None",t[t.Linear=1]="Linear",t[t.Radial=2]="Radial"}(c||(c={})),function(t){t[t.None=0]="None",t[t.Horizontal=1]="Horizontal",t[t.Vertical=2]="Vertical"}(l||(l={}));const h=["text","textWidth","textHeight","textLeft","textTop","fontFamily","fontSize","lineHeight","fontStyle","fontWeight","textAlign","textBaseline","whiteSpace","ellipsis"],u=["x","y","width","height","rotate","paddingTop","paddingRight","paddingBottom","paddingLeft"],d=["iconLeft","iconTop","iconRotate"],p=["gif","div","iframe","video","echarts","highcharts","lightningCharts"],f=new Set(["borderRadius","rotate","paddingLeft","paddingRight","paddingTop","paddingBottom","progress","progressColor","verticalProgress","flip","input","lineDash","lineCap","lineJoin","strokeType","lineGradientFromColor","lineGradientToColor","lineGradientAngle","color","hoverColor","activeColor","lineWidth","bkType","gradientFromColor","gradientToColor","gradientAngle","gradientRadius","hoverBackground","activeBackground","globalAlpha","anchorColor","anchorRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textHasShadow","fontFamily","fontSize","textColor","hoverTextColor","activeTextColor","textBackground","fontStyle","fontWeight","textAlign","textBaseline","lineHeight","whiteSpace","textWidth","textHeight","textLeft","textTop","ellipsis","hiddenText","keepDecimal"]);var v,y,g,w;!function(t){t[t.None=0]="None",t[t.LineAnchor=1]="LineAnchor",t[t.NodeAnchor=2]="NodeAnchor",t[t.Line=3]="Line",t[t.Node=4]="Node",t[t.Resize=5]="Resize",t[t.Rotate=6]="Rotate",t[t.LineAnchorPrev=7]="LineAnchorPrev",t[t.LineAnchorNext=8]="LineAnchorNext"}(v||(v={})),function(t){t[t.None=0]="None",t[t.Translate=1]="Translate",t[t.Select=2]="Select",t[t.Resize=3]="Resize",t[t.AddAnchor=4]="AddAnchor"}(y||(y={})),function(t){t[t.None=0]="None",t[t.Down=1]="Down",t[t.Translate=2]="Translate"}(g||(g={})),function(t){t[t.None=-1]="None",t[t.Up=0]="Up",t[t.Right=1]="Right",t[t.Bottom=2]="Bottom",t[t.Left=3]="Left"}(w||(w={}));const m=["nw-resize","ne-resize","se-resize","sw-resize"],x=["n-resize","e-resize","s-resize","w-resize"],b=["curve","polyline","line"];var R,_;function k(t,e,i){if(!e||e%360==0)return;const r=e*Math.PI/180,n=(t.x-i.x)*Math.cos(r)-(t.y-i.y)*Math.sin(r)+i.x,o=(t.x-i.x)*Math.sin(r)+(t.y-i.y)*Math.cos(r)+i.y;t.x=n,t.y=o,t.prev&&k(t.prev,e,i),t.next&&k(t.next,e,i)}function A(t,e,i=5){return t.x>e.x-i&&t.xe.y-i&&t.y0&&r>0?n=180-n:i<0&&r>0?n+=180:i<0&&r<0&&(n=360-n),n}function T(t,e){const i=t.x-e.x,r=t.y-e.y;return Math.sqrt(i*i+r*r)}function I(t,e,i){t&&(t.x+=e,t.y+=i,t.next&&(t.next.x+=e,t.next.y+=i),t.prev&&(t.prev.x+=e,t.prev.y+=i))}function P(t,e){return t.anchorId===e.anchorId&&t.connectTo===e.connectTo}!function(t){t[t.Mirror=0]="Mirror",t[t.Bilateral=1]="Bilateral",t[t.Free=2]="Free"}(R||(R={})),function(t){t[t.Default=0]="Default",t[t.In=1]="In",t[t.Out=2]="Out"}(_||(_={}));const C="1.0.5",L={version:C,path2dDraws:{},canvasDraws:{},anchors:{},htmlElements:{},paths:{}};var M;!function(t){t[t.None=-1]="None",t[t.Document=0]="Document",t[t.Canvas=1]="Canvas"}(M||(M={}));const D={textColor:"#222222",fontFamily:'"Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial',fontSize:12,lineHeight:1.5,textAlign:"center",textBaseline:"middle",color:"#222222",activeColor:"#278df8",hoverColor:"rgba(39,141,248,0.50)",anchorColor:"#278DF8",hoverAnchorColor:"#FF4101",anchorRadius:4,anchorBackground:"#fff",dockColor:"rgba(39,141,248,0.50)",dockPenColor:"#1890FF",dragColor:"#1890ff",rotateCursor:"rotate.cur",hoverCursor:"pointer",minScale:.1,maxScale:10,keydown:M.Document,gridSize:20,gridColor:"#e2e2e2",ruleColor:"#888888",drawingLineName:"curve",interval:30,animateInterval:30,autoPolyline:!0,autoAnchor:!0,animateColor:"#ff4d4f"};var N;!function(t){t[t.Add=0]="Add",t[t.Update=1]="Update",t[t.Delete=2]="Delete"}(N||(N={}));const O=t=>{t.data={x:0,y:0,scale:1,pens:[],origin:{x:0,y:0},center:{x:0,y:0}},t.pens={},t.histories=[],t.historyIndex=null,t.path2dMap=new WeakMap,t.active=[],t.hover=void 0,t.lastHover=void 0,t.animates.clear()};function B(t){const{paddingTop:e,paddingBottom:i,paddingLeft:r,paddingRight:n}=t.calculative;let o=r,s=e,a=t.calculative.textWidth||t.calculative.worldRect.width;a<1&&(a*=t.calculative.worldRect.width);let c=t.calculative.textHeight||t.calculative.worldRect.height;c<1&&(c*=t.calculative.worldRect.height);let l=a-r-n,h=c-e-i,u=t.calculative.textLeft,d=t.calculative.textTop;u&&Math.abs(u)<1&&(u=t.calculative.worldRect.width*u),d&&Math.abs(d)<1&&(d=t.calculative.worldRect.height*d),o+=u||0,s+=d||0,l-=u||0,h-=d||0,o=t.calculative.worldRect.x+o,s=t.calculative.worldRect.y+s;const p={x:o,y:s,width:l,height:h,ex:o+l,ey:s+h};t.calculative.worldTextRect=p,j(t),t.calculative.textDrawRect=void 0}function U(t,e){const i=e.calculative.fontSize*e.calculative.lineHeight,r=e.calculative.textLines.length*i,n=function(t,e){let i=0;return e.calculative.textLineWidths=[],e.calculative.textLines.forEach((r=>{const n=t.measureText(r).width;e.calculative.textLineWidths.push(n),i{if(n<0)return;const r=function(t,e){const i=[];let r=t[0]||"";for(let n=1;n1?r.forEach((e=>{if(n<0)return;n+=t.calculative.fontSize*t.calculative.lineHeight;const r=t.calculative.worldTextRect.height;n>r&&(e.slice(0,-3),e+="...",n=-1),i.push(e)})):i.push(...r)}))}return(t.calculative.keepDecimal||0===t.calculative.keepDecimal)&&i.forEach(((e,r)=>{const n=Number(e);isNaN(n)||(i[r]=n.toFixed(t.calculative.keepDecimal))})),t.calculative.textLines=i,i}function F(t){const e=[];let i="";t||(t="");for(let r=0;r126?(i&&(e.push(i),i=""),e.push(t[r])):i+=t[r]}return i&&e.push(i),e}function H(t,e=!1){if(Array.isArray(t)){const i=[];return t.forEach((t=>{i.push(H(t,e))})),i}if("object"==typeof t){if(null===t)return null;if(t.constructor===RegExp)return t;const i={};for(let r in t)["canvas","lastFrame"].includes(r)||t[r]instanceof HTMLImageElement||t[r]instanceof HTMLMediaElement||("calculative"!==r||e)&&(i[r]=H(t[r],e));return i}return t}const z={};function W(t,e){const i=function(t){const e=parseInt,i=Math.round;let r=t.length,n={};if(r>9){const[i,o,s,a]=t=t.split(",");if(r=t.length,r<3||r>4)return null;n.r=e("a"==i[3]?i.slice(5):i.slice(4)),n.g=e(o),n.b=e(s),n.a=a?parseFloat(a):-1}else{if(8==r||6==r||r<4)return null;r<6&&(t="#"+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+(r>4?t[4]+t[4]:"")),t=e(t.slice(1),16),9==r||5==r?(n.r=t>>24&255,n.g=t>>16&255,n.b=t>>8&255,n.a=i((255&t)/.255)/1e3):(n.r=t>>16,n.g=t>>8&255,n.b=255&t,n.a=-1)}return n}(t)||{r:0,g:0,b:0};return i.a<0?`rgba(${i.r},${i.g},${i.b},${e})`:`rgba(${i.r},${i.g},${i.b},${e+i.a})`}function q(t,e){if(!t||!t.parentId||!t.calculative)return;const i=t.calculative.canvas.store;return e&&q(i.pens[t.parentId],e)||i.pens[t.parentId]}function V(t,e,i,r,n){if(!i||!r)return;const o={x:e.x,y:e.center.y},s={x:e.ex,y:e.center.y};n%90==0&&n%180?n%270?(o.x=e.center.x,o.y=e.y,s.x=e.center.x,s.y=e.ey):(o.x=e.center.x,o.y=e.ey,s.x=e.center.x,s.y=e.y):n&&(k(o,n,e.center),k(s,n,e.center));const a=t.createLinearGradient(o.x,o.y,s.x,s.y);return a.addColorStop(0,i),a.addColorStop(1,r),a}function K(t,e){if(t.save(),t.translate(.5,.5),t.beginPath(),e.calculative.flip===l.Horizontal?(t.translate(e.calculative.worldRect.x+e.calculative.worldRect.ex+.5,.5),t.scale(-1,1)):e.calculative.flip===l.Vertical&&(t.translate(.5,e.calculative.worldRect.y+e.calculative.worldRect.ey+.5),t.scale(1,-1)),e.calculative.rotate&&"line"!==e.name){t.translate(e.calculative.worldRect.center.x,e.calculative.worldRect.center.y);let i=e.calculative.rotate*Math.PI/180;e.calculative.flip&&(i*=-1),t.rotate(i),t.translate(-e.calculative.worldRect.center.x,-e.calculative.worldRect.center.y)}e.calculative.lineWidth>1&&(t.lineWidth=e.calculative.lineWidth);const i=e.calculative.canvas.store;let r,n=!0;if(e.calculative.hover)t.strokeStyle=e.hoverColor||i.options.hoverColor,r=e.hoverBackground||i.options.hoverBackground,t.fillStyle=r,r&&(n=!1);else if(e.calculative.active)t.strokeStyle=e.activeColor||i.options.activeColor,r=e.activeBackground||i.options.activeBackground,t.fillStyle=r,r&&(n=!1);else if(e.calculative.isDock)e.type===o.Line?t.strokeStyle=i.options.dockPenColor:(r=W(i.options.dockPenColor,.2),t.fillStyle=r,r&&(n=!1));else if(e.calculative.strokeImage)e.calculative.strokeImg&&(t.strokeStyle=t.createPattern(e.calculative.strokeImg,"repeat"),r=!0);else{let i;i=e.calculative.strokeType===c.Linear?function(t,e){return V(t,e.calculative.worldRect,e.calculative.lineGradientFromColor,e.calculative.lineGradientToColor,e.calculative.lineGradientAngle)}(t,e):e.calculative.color,t.strokeStyle=i}if(n)if(e.calculative.backgroundImage)e.calculative.backgroundImg&&(t.fillStyle=t.createPattern(e.calculative.backgroundImg,"repeat"),r=!0);else{let n;n=e.calculative.bkType===c.Linear?function(t,e){return V(t,e.calculative.worldRect,e.calculative.gradientFromColor,e.calculative.gradientToColor,e.calculative.gradientAngle)}(t,e):e.calculative.bkType===c.Radial?function(t,e){if(!e.calculative.gradientFromColor||!e.calculative.gradientToColor)return;const{worldRect:i}=e.calculative;let r=i.width;r{!i.hidden&&!i.isTemp&&function(t,e,i){if(!e)return;const r=i.calculative.activeAnchor===e;let n=3;i.calculative.lineWidth>3&&(n=i.calculative.lineWidth),r?(e.prev&&(t.save(),t.strokeStyle="#4dffff",t.beginPath(),t.moveTo(e.prev.x,e.prev.y),t.lineTo(e.x,e.y),t.stroke(),t.restore(),t.save(),t.fillStyle="#ffffff",t.beginPath(),t.arc(e.prev.x,e.prev.y,n,0,2*Math.PI),t.fill(),t.stroke(),t.restore()),e.next&&(t.save(),t.strokeStyle="#4dffff",t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(e.next.x,e.next.y),t.stroke(),t.restore(),t.save(),t.fillStyle="#ffffff",t.beginPath(),t.arc(e.next.x,e.next.y,n,0,2*Math.PI),t.fill(),t.stroke(),t.restore(),t.beginPath(),t.arc(e.x,e.y,n,0,2*Math.PI),t.fill(),t.stroke()),t.beginPath(),t.arc(e.x,e.y,n,0,2*Math.PI),t.fill(),t.stroke()):(t.save(),t.fillStyle="#ffffff",t.beginPath(),t.arc(e.x,e.y,n,0,2*Math.PI),t.fill(),t.stroke(),t.restore())}(t,i,e)})),t.restore()}(t,e)}}if(L.canvasDraws[e.name]&&(t.save(),L.canvasDraws[e.name](t,e,i),t.restore()),"gif"!==e.name&&e.image&&e.calculative.img){t.save(),t.shadowColor="",t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0;const i=e.calculative.worldIconRect;let r=i.x,n=i.y,o=i.width,s=i.height;if(e.calculative.iconWidth&&(o=e.calculative.iconWidth),e.calculative.iconHeight&&(s=e.calculative.iconHeight),e.calculative.imgNaturalWidth&&e.calculative.imgNaturalHeight&&e.imageRatio){let t=i.width/e.calculative.imgNaturalWidth,r=i.height/e.calculative.imgNaturalHeight,n=t>r?r:t;const a=e.calculative.imgNaturalWidth/e.calculative.imgNaturalHeight;e.calculative.iconWidth?s=e.calculative.iconWidth/a:e.calculative.iconHeight?o=e.calculative.iconHeight*a:(o=n*e.calculative.imgNaturalWidth,s=n*e.calculative.imgNaturalHeight)}switch(r+=(i.width-o)/2,n+=(i.height-s)/2,e.iconAlign){case"top":n=i.y;break;case"bottom":n=i.ey-s;break;case"left":r=i.x;break;case"right":r=i.ex-o;break;case"left-top":r=i.x,n=i.y;break;case"right-top":r=i.ex-o,n=i.y;break;case"left-bottom":r=i.x,n=i.ey-s;break;case"right-bottom":r=i.ex-o,n=i.ey-s}e.calculative.iconRotate&&(t.translate(i.center.x,i.center.y),t.rotate(e.calculative.iconRotate*Math.PI/180),t.translate(-i.center.x,-i.center.y)),t.drawImage(e.calculative.img,r,n,o,s),t.restore()}else if(e.calculative.icon){t.save(),t.shadowColor="",t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0,t.textAlign="center",t.textBaseline="middle";const r=e.calculative.worldIconRect;let n=r.x+r.width/2,o=r.y+r.height/2;switch(e.iconAlign){case"top":o=r.y,t.textBaseline="top";break;case"bottom":o=r.ey,t.textBaseline="bottom";break;case"left":n=r.x,t.textAlign="left";break;case"right":n=r.ex,t.textAlign="right";break;case"left-top":n=r.x,o=r.y,t.textAlign="left",t.textBaseline="top";break;case"right-top":n=r.ex,o=r.y,t.textAlign="right",t.textBaseline="top";break;case"left-bottom":n=r.x,o=r.ey,t.textAlign="left",t.textBaseline="bottom";break;case"right-bottom":n=r.ex,o=r.ey,t.textAlign="right",t.textBaseline="bottom"}e.calculative.iconSize>0?t.font=`${e.calculative.iconWeight||"normal"} ${e.calculative.iconSize}px '${e.calculative.iconFamily}'`:r.width>r.height?t.font=`${e.calculative.iconWeight||"normal"} ${r.height}px '${e.calculative.iconFamily}'`:t.font=`${e.calculative.iconWeight||"normal"} ${r.width}px '${e.calculative.iconFamily}'`,t.fillStyle=e.calculative.iconColor||e.calculative.textColor||i.options.textColor,e.calculative.iconRotate&&(t.translate(r.center.x,r.center.y),t.rotate(e.calculative.iconRotate*Math.PI/180),t.translate(-r.center.x,-r.center.y)),t.beginPath(),t.fillText(e.calculative.icon,n,o),t.restore()}if(e.calculative.text&&!e.calculative.hiddenText){t.save(),e.calculative.textHasShadow||(t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0),r=e.calculative.hover?e.hoverTextColor||e.hoverColor||i.options.hoverColor:e.calculative.active?e.activeTextColor||e.activeColor||i.options.activeColor:void 0,t.fillStyle=r||e.calculative.textColor||e.calculative.color||i.data.color||i.options.color,t.font=`${e.calculative.fontStyle||"normal"} normal ${e.calculative.fontWeight||"normal"} ${e.calculative.fontSize}px/${e.calculative.lineHeight} ${e.calculative.fontFamily||i.options.fontFamily}`,!e.calculative.textDrawRect&&U(t,e),e.calculative.textBackground&&(t.save(),t.fillStyle=e.calculative.textBackground,t.fillRect(e.calculative.textDrawRect.x,e.calculative.textDrawRect.y,e.calculative.textDrawRect.width,e.calculative.textDrawRect.height),t.restore());const n=.55,{width:o}=e.calculative.textDrawRect,s=e.textAlign||i.options.textAlign;e.calculative.textLines.forEach(((i,r)=>{let a=0;"center"===s?a=(o-e.calculative.textLineWidths[r])/2:"right"===s&&(a=o-e.calculative.textLineWidths[r]),t.fillText(i,e.calculative.textDrawRect.x+a,e.calculative.textDrawRect.y+(r+n)*e.calculative.fontSize*e.calculative.lineHeight)})),t.restore()}t.restore()}function $(t){const e=t.calculative.canvas.store;let i={x:t.x,y:t.y};if(t.parentId){let r=e.pens[t.parentId].calculative.worldRect;r||(r=$(e.pens[t.parentId])),i.x=r.x+r.width*t.x,i.y=r.y+r.height*t.y,i.width=r.width*t.width,i.height=r.height*t.height,Math.abs(t.x)>1&&(i.x=r.x+t.x),Math.abs(t.y)>1&&(i.y=r.y+t.y),t.width>1&&!wt(t.height,1)&&(i.width=t.width),t.height>1&&!wt(t.height,1)&&(i.height=t.height),i.ex=i.x+i.width,i.ey=i.y+i.height,i.rotate=r.rotate+t.rotate,i.center={x:i.x+i.width/2,y:i.y+i.height/2}}else i.ex=t.x+t.width,i.ey=t.y+t.height,i.width=t.width,i.height=t.height,i.rotate=t.rotate,i.center={x:i.x+i.width/2,y:i.y+i.height/2};return t.calculative.worldRect=i,Y(t,i),i}function Y(t,e){!t.paddingTop&&(t.calculative.paddingTop=0),!t.paddingBottom&&(t.calculative.paddingBottom=0),!t.paddingLeft&&(t.calculative.paddingLeft=0),!t.paddingRight&&(t.calculative.paddingRight=0),t.calculative.paddingTop<1&&(t.calculative.paddingTop*=e.height),t.calculative.paddingBottom<1&&(t.calculative.paddingBottom*=e.height),t.calculative.paddingLeft<1&&(t.calculative.paddingLeft*=e.width),t.calculative.paddingRight<1&&(t.calculative.paddingRight*=e.width)}function X(t){if(!t.parentId)return t.x=t.calculative.worldRect.x,t.y=t.calculative.worldRect.y,t.width=t.calculative.worldRect.width,void(t.height=t.calculative.worldRect.height);const e=t.calculative.canvas.store.pens[t.parentId].calculative.worldRect;t.x=(t.calculative.worldRect.x-e.x)/e.width,t.y=(t.calculative.worldRect.y-e.y)/e.height,t.width=t.calculative.worldRect.width/e.width,t.height=t.calculative.worldRect.height/e.height}function Q(t){const e=t.calculative.canvas.store;if((t.disableAnchor||e.options.disableAnchor)&&!t.type)return void(t.calculative.worldAnchors=[]);const i=[];t.anchors&&t.anchors.forEach((e=>{i.push(function(t,e){const i={...e};return i.x=t.calculative.worldRect.x+t.calculative.worldRect.width*e.x,i.y=t.calculative.worldRect.y+t.calculative.worldRect.height*e.y,e.prev&&(i.prev={penId:t.id,connectTo:e.prev.connectTo,x:t.calculative.worldRect.x+t.calculative.worldRect.width*e.prev.x,y:t.calculative.worldRect.y+t.calculative.worldRect.height*e.prev.y}),e.next&&(i.next={penId:t.id,connectTo:e.next.connectTo,x:t.calculative.worldRect.x+t.calculative.worldRect.width*e.next.x,y:t.calculative.worldRect.y+t.calculative.worldRect.height*e.next.y}),i}(t,e))})),i.length||t.type||"combine"===t.name||(i.push({id:"0",penId:t.id,x:t.calculative.worldRect.x+.5*t.calculative.worldRect.width,y:t.calculative.worldRect.y}),i.push({id:"1",penId:t.id,x:t.calculative.worldRect.x+t.calculative.worldRect.width,y:t.calculative.worldRect.y+.5*t.calculative.worldRect.height}),i.push({id:"2",penId:t.id,x:t.calculative.worldRect.x+.5*t.calculative.worldRect.width,y:t.calculative.worldRect.y+t.calculative.worldRect.height}),i.push({id:"3",penId:t.id,x:t.calculative.worldRect.x,y:t.calculative.worldRect.y+.5*t.calculative.worldRect.height})),t.calculative.rotate&&i.forEach((e=>{k(e,t.calculative.rotate,t.calculative.worldRect.center)})),t.type&&!t.anchors||(t.calculative.worldAnchors=i),t.calculative.activeAnchor&&i.length&&(t.calculative.activeAnchor=i.find((e=>{e.id,t.calculative.activeAnchor.id})))}function G(t,e){const{paddingTop:i,paddingBottom:r,paddingLeft:n,paddingRight:o}=e.calculative;let s=n,a=i,c=e.calculative.worldRect.width-n-o,l=e.calculative.worldRect.height-i-r,h=e.calculative.iconLeft,u=e.calculative.iconTop;h&&Math.abs(h)<1&&(h=e.calculative.worldRect.width*h),u&&Math.abs(u)<1&&(u=e.calculative.worldRect.height*u),s+=h||0,a+=u||0,c-=h||0,l-=u||0;let d=e.calculative.iconRotate||0;if(e.parentId){const i=t[e.parentId].calculative;i&&(d+=i.rotate,d%=360)}s=e.calculative.worldRect.x+s,a=e.calculative.worldRect.y+a,e.calculative.worldIconRect={x:s,y:a,width:c,height:l,ex:s+c,ey:a+l,rotate:d},Rt(e.calculative.worldIconRect)}function J(t,e){return e&&e.calculative&&e.calculative.worldRect.center?function(t,e){let i=w.None;if(!e)return i;const r=t.x-e.x,n=t.y-e.y;return i=Math.abs(r)>Math.abs(n)?r>0?w.Right:w.Left:n>0?w.Bottom:w.Up,i}(t,e.calculative.worldRect.center):w.None}function Z(t,e){let i,r=1/0;return t.calculative.worldAnchors.forEach((t=>{const n=T(e,t);r>n&&(r=n,i=t)})),i}function tt(t){if(t&&t.calculative&&t.calculative.worldAnchors.length){let e=t.calculative.worldAnchors[t.calculative.worldAnchors.length-1];for(;t.calculative.worldAnchors.length&&e!==t.calculative.activeAnchor;)t.calculative.worldAnchors.pop(),e=t.calculative.worldAnchors[t.calculative.worldAnchors.length-1]}}function et(t,e,i,r){t&&e&&i&&r&&(t.connectedLines||(t.connectedLines=[]),t.connectedLines.findIndex((t=>t.lineId===e&&t.lineAnchor===i&&t.anchor===r))<0&&t.connectedLines.push({lineId:e,lineAnchor:i,anchor:r}))}function it(t,e,i,r){if(!(t&&e&&i&&r))return;t.connectedLines||(t.connectedLines=[]);const n=t.connectedLines.findIndex((t=>t.lineId===e&&t.lineAnchor===i&&t.anchor===r));n>-1&&t.connectedLines.splice(n,1)}function rt(t,e){if(t&&e&&t.calculative.worldAnchors)for(const i of t.calculative.worldAnchors)if(i.id===e)return i}function nt(t){if(t&&t.calculative.worldAnchors)return t.calculative.worldAnchors[0]}function ot(t){if(t&&t.calculative.worldAnchors)return t.calculative.worldAnchors[t.calculative.worldAnchors.length-1]}function st(t,e){if(0===t.calculative.start||!t.frames||!t.frames.length)return t.calculative.start=void 0,0;if(!t.calculative.duration){t.calculative.duration=0;for(const e of t.frames){t.calculative.duration+=e.duration;for(const i in e)"duration"===i||t[i]||(t[i]="scale"===i?1:void 0)}}if(t.animateCycle||(t.animateCycle=1/0),t.calculative.start){if(e>t.calculative.frameEnd){if(t.lastFrame={rotate:t.frames[t.calculative.frameIndex].rotate||0,x:t.frames[t.calculative.frameIndex].x||0,y:t.frames[t.calculative.frameIndex].y||0,width:(t.frames[t.calculative.frameIndex].scale||1)*t.calculative.initRect.width},t.calculative.x=t.calculative.worldRect.x,t.calculative.y=t.calculative.worldRect.y,t.calculative._rotate=t.calculative.rotate||0,++t.calculative.frameIndex>=t.frames.length){++t.calculative.cycleIndex,t.calculative.frameIndex=0;for(const e in t)"rotate"!==e&&"x"!==e&&"y"!==e&&"scale"!==e||(t.lastFrame[e]=0);t.calculative.x=t.calculative.initRect.x,t.calculative.y=t.calculative.initRect.y}if(t.calculative.cycleIndex>t.animateCycle)return t.calculative.start=void 0,0;t.calculative.frameStart=t.calculative.frameEnd,t.calculative.frameDuration=t.frames[t.calculative.frameIndex].duration,t.calculative.frameEnd=t.calculative.frameStart+t.calculative.frameDuration;for(const e in t)"rotate"===e||"x"===e||"y"===e||"width"===e||"initRect"===e||"object"==typeof t[e]&&"lineDash"!==e||(t.lastFrame[e]=t.calculative[e])}}else{t.calculative.start=Date.now(),t.calculative.frameIndex=0,t.calculative.frameStart=t.calculative.start,t.calculative.frameDuration=t.frames[0].duration,t.calculative.frameEnd=t.calculative.frameStart+t.calculative.frameDuration,t.calculative.cycleIndex=1,t.lastFrame={};for(const e in t)"object"==typeof t[e]&&"lineDash"!==e||(t.lastFrame[e]=t[e]);t.lastFrame.rotate=0,t.lastFrame.x=0,t.lastFrame.y=0,t.lastFrame.width=t.calculative.worldRect.width,t.calculative.x=t.calculative.worldRect.x,t.calculative.y=t.calculative.worldRect.y,t.calculative.initRect=H(t.calculative.worldRect)}const i=t.frames[t.calculative.frameIndex];let r=(e-t.calculative.frameStart)/t.calculative.frameDuration%1;if(r>0){let e,n;for(const o in i)if("duration"!==o){if("scale"===o){const o=t.lastFrame.width+(i.scale*t.calculative.initRect.width-t.lastFrame.width)*r;e=t.calculative.worldRect,n=o/e.width,e.width*=n,e.height*=n,t.calculative.dirty=!0}else if("x"===o)Et(t.calculative.worldRect,t.calculative.x+(i[o]-t.lastFrame[o])*r-t.calculative.worldRect.x,0),t.calculative.dirty=!0;else if("y"===o)Et(t.calculative.worldRect,0,t.calculative.y+(i[o]-t.lastFrame[o])*r-t.calculative.worldRect.y),t.calculative.dirty=!0;else if("rotate"===o)t.calculative._rotate||(t.calculative._rotate=t.rotate||0),t.lastFrame[o]>=360&&(t.lastFrame[o]%=360),t.calculative.rotate=(t.calculative._rotate+(i[o]-t.lastFrame[o])*r)%360,t.calculative.dirty=!0;else if(at(i[o],o,t)){t.lastFrame[o]||(t.lastFrame[o]=0);const e=t.lastFrame[o]+(i[o]-t.lastFrame[o])*r;t.calculative[o]=Math.round(100*e)/100}else t.calculative[o]=i[o];"text"===o&&j(t)}e&&(S(e,n,e.center),e.ex=e.x+e.width,e.ey=e.y+e.height,e.center={x:e.x+e.width/2,y:e.y+e.height/2})}return!0}function at(t,e,i){return"number"==typeof t&&!1!==i.linear&&!["strokeType","bkType"].includes(e)}function ct(t,e){if(0===t.calculative.start)return t.calculative.start=void 0,t.calculative.frameStart=void 0,0;if(t.animateCycle||(t.animateCycle=1/0),t.animateSpan||(t.animateSpan=1),!t.calculative.duration&&t.frames){t.calculative.duration=0;for(const e of t.frames){t.calculative.duration+=e.duration;for(const i in e)"duration"===i||t[i]||(t[i]=void 0)}}if(t.calculative.animatePos+=t.animateSpan,t.calculative.start){if(e>t.calculative.frameEnd||t.calculative.animatePos>t.length){if(t.calculative.animatePos>t.length&&(t.calculative.frameIndex=0,++t.calculative.cycleIndex),t.calculative.cycleIndex>t.animateCycle)return t.calculative.start=void 0,0;if(t.calculative.animatePos=t.animateSpan,t.frames&&t.frames.length){t.calculative.frameStart=t.calculative.frameEnd,t.calculative.frameDuration=t.frames[t.calculative.frameIndex].duration,t.calculative.frameEnd=t.calculative.frameStart+t.calculative.frameDuration,t.lastFrame={};for(const e in t)"object"==typeof t[e]&&"lineDash"!==e||(t.lastFrame[e]=t.calculative[e])}}}else{t.calculative.start=Date.now(),t.calculative.animatePos=t.animateSpan,t.calculative.frameIndex=0,t.calculative.frameStart=t.calculative.start,t.frames&&t.frames.length&&(t.calculative.frameDuration=t.frames[0].duration,t.calculative.frameEnd=t.calculative.frameStart+t.calculative.frameDuration),t.calculative.cycleIndex=1,t.lastFrame={};for(const e in t)"object"==typeof t[e]&&"lineDash"!==e||(t.lastFrame[e]=t[e])}if(!t.calculative.inView||!t.frames||!t.frames.length)return!0;const i=t.frames[t.calculative.frameIndex];let r=(e-t.calculative.frameStart)/t.calculative.frameDuration;if(r>0)for(const e in i)if("duration"!==e){if("number"==typeof i[e]&&!1!==t.linear)if(t[e]||(t[e]=0),t.calculative[e]||(t.calculative[e]=0),t.calculative.frameIndex||t.calculative.cycleIndex){const n=t.lastFrame[e]+(i[e]-t.lastFrame[e])*r;t.calculative[e]=Math.round(100*n)/100}else t.calculative[e]=Math.round(t[e]+i[e]*r*100)/100;else t.calculative[e]=i[e];"text"===e&&j(t)}return!0}function lt(t,e=!0){if(!t.children)return;const i=t.calculative.canvas.store;t.children.forEach((t=>{const r=i.pens[t];r&&(r.calculative.active=e,lt(r,e))}))}function ht(t,e=!0){if(!t)return;const i=t.calculative.canvas.store;t.calculative.hover=e,t.children&&t.children.forEach((t=>{null==i.pens[t]?.hoverColor&&null==i.pens[t]?.hoverBackground&&ht(i.pens[t],e)}))}function ut(t,e){if(!e)return;const i=t.calculative.canvas.store,r=t.calculative.worldRect;e.style.position="absolute",e.style.outline="none",e.style.left=r.x+i.data.x+"px",e.style.top=r.y+i.data.y+"px",e.style.width=r.width+"px",e.style.height=r.height+"px",e.style.display=0!=t.calculative.visible?"inline":"none",!t.calculative.rotate&&(t.calculative.rotate=0),e.style.transform=`rotate(${t.calculative.rotate}deg)`,t.locked||i.data.locked?(e.style.userSelect="initial",e.style.pointerEvents="initial"):(e.style.userSelect="none",e.style.pointerEvents="none")}function dt(t){for(const e of t)if(!e.locked)return!1;return!0}function pt(t){for(const e of t)if(!e.disableRotate)return!1;return!0}function ft(t){for(const e of t)if(!e.disableSize)return!1;return!0}function vt(t){if(!t.type){const e=kt(t.calculative.worldRect);return Rt(t.calculative.worldRect),[...e,...t.calculative.worldAnchors,t.calculative.worldRect.center]}if(t.type===o.Line)return t.calculative.worldAnchors}function yt(t,e){let i,r,n=1/0,o=1/0;for(const s of t.data.pens){if(!1===s.calculative.inView)continue;if(gt(t,t.active,s.id))continue;const a=vt(s);for(const t of a)for(const a of e){const e=t.x-a.x,c=t.y-a.y,l=Math.abs(e),h=Math.abs(c);l<8&&lt.parentId===r.id));if(gt(t,e,i))return!0}return!1}function wt(t,e){return t.toFixed(12)==e}function mt(t){if(t.id=Ht(),Array.isArray(t.anchors))for(const e of t.anchors)t.type&&(e.id=Ht()),e.penId=t.id,e.prev&&(t.type&&(e.prev.id=Ht()),e.prev.penId=t.id),e.next&&(t.type&&(e.next.id=Ht()),e.next.penId=t.id)}function xt(t,e){if(!e)return;if(null==e.ex&&(e.ex=e.x+e.width,e.ey=e.y+e.height),!e.rotate||e.width<20||e.height<20||e.rotate%360==0)return t.x>e.x&&t.xe.y&&t.y{k(t,e.rotate,e.center)})),function(t,e){if(e.length<3)return!1;let i=!1,r=e[e.length-1];for(const n of e)r.y>t.y!=n.y>t.y&&n.x+(t.y-n.y)*(r.x-n.x)/(r.y-n.y)>t.x&&(i=!i),r=n;return i}(t,i)}function bt(t,e,i=0){const{x:r,y:n,ex:o,ey:s}=e;return t.x>=r-i&&t.x<=o+i&&t.y>=n-i&&t.y<=s+i}function Rt(t){t.center||(t.center={}),t.center.x=t.x+t.width/2,t.center.y=t.y+t.height/2}function _t(t){const e=[];t.forEach((t=>{const i=t.calculative.worldRect;if(i){const t=kt(i);e.push(...t)}}));const i=At(e);return Rt(i),i}function kt(t){const e=[{x:t.x,y:t.y},{x:t.ex,y:t.y},{x:t.ex,y:t.ey},{x:t.x,y:t.ey}];return t.rotate&&(t.center||Rt(t),e.forEach((e=>{k(e,t.rotate,t.center)}))),e}function At(t){let e=1/0,i=1/0,r=-1/0,n=-1/0;return t.forEach((t=>{isFinite(t.x)&&isFinite(t.y)&&(e=Math.min(e,t.x),i=Math.min(i,t.y),r=Math.max(r,t.x),n=Math.max(n,t.y))})),{x:e,y:i,ex:r,ey:n,width:r-e,height:n-i}}function St(t,e,i){return t.rotate&&(t=At(kt(t))),i?t.x>e.x&&t.exe.y&&t.eye.ex||t.exe.ey)}function Et(t,e,i){t.x+=e,t.y+=i,t.ex+=e,t.ey+=i,t.center&&(t.center.x+=e,t.center.y+=i)}function Tt(t,e){if(wt(t.k,0))return{x:e.point.x,y:t.point.y};if(wt(e.k,0))return{x:t.point.x,y:e.point.y};const i=t.point.y-t.k*t.point.x,r=(e.point.y-e.k*e.point.x-i)/(t.k-e.k);return{x:r,y:t.k*r+i}}function It(t,e,i,r){if(t.rotate&&t.rotate%360){const n=kt(t),o=(n[0].y-n[1].y)/(n[0].x-n[1].x),s=(n[1].y-n[2].y)/(n[1].x-n[2].x);if(r<4){n[r].x+=e,n[r].y+=i;const t=n[(r+2)%4];n[(r+1)%4]=Tt({k:r%2?s:o,point:n[r]},{k:r%2?o:s,point:t}),n[(r+4-1)%4]=Tt({k:r%2?o:s,point:n[r]},{k:r%2?s:o,point:t})}else{const t=[4,6].includes(r)?s:o;wt(t,0)?(n[r%4].x+=e,n[(r+1)%4].x+=e):(n[r%4].y+=i,n[r%4].x+=i/t,n[(r+1)%4].y+=i,n[(r+1)%4].x+=i/t)}if((n[0].x-n[1].x)**2+(n[0].y-n[1].y)**2<25||(n[1].x-n[2].x)**2+(n[1].y-n[2].y)**2<25)return;const a=function(t,e){const i=function(t,e){const i=(t.to.y-t.from.y)/(t.to.x-t.from.x),r=(e.to.y-e.from.y)/(e.to.x-e.from.x);return Tt({k:i,point:t.from},{k:r,point:e.from})}({from:t[0],to:t[2]},{from:t[1],to:t[3]});for(const r of t)k(r,-e,i);return At(t)}(n,t.rotate);return Rt(a),void Object.assign(t,a)}switch(r){case 0:if(t.width-e<5||t.height-i<5)break;t.x+=e,t.y+=i,t.width-=e,t.height-=i;break;case 1:if(t.width+e<5||t.height-i<5)break;t.ex+=e,t.y+=i,t.width+=e,t.height-=i;break;case 2:if(t.width+e<5||t.height+i<5)break;t.ex+=e,t.ey+=i,t.width+=e,t.height+=i;break;case 3:if(t.width-e<5||t.height+i<5)break;t.x+=e,t.ey+=i,t.width-=e,t.height+=i;break;case 4:if(t.height-i<5)break;t.y+=i,t.height-=i;break;case 5:if(t.width+e<5)break;t.ex+=e,t.width+=e;break;case 6:if(t.height+i<5)break;t.ey+=i,t.height+=i;break;case 7:if(t.width-e<5)break;t.x+=e,t.width-=e}}function Pt(t,e,i){t&&(t.width*=e,t.height*=e,S(t,e,i),t.ex=t.x+t.width,t.ey=t.y+t.height,t.center={x:t.x+t.width/2,y:t.y+t.height/2})}function Ct(t,e){const i={x:(t.x-e.x)/e.width,y:(t.y-e.y)/e.height,width:t.width/e.width,height:t.height/e.height};return i.ex=i.x+i.width,i.ey=i.y+i.height,i}function Lt(t,e){const i={id:t.id,penId:t.penId,connectTo:t.connectTo,x:e.width?(t.x-e.x)/e.width:0,y:e.height?(t.y-e.y)/e.height:0,anchorId:t.anchorId,prevNextType:t.prevNextType,hidden:t.hidden};return t.prev&&(i.prev={penId:t.penId,connectTo:t.connectTo,x:e.width?(t.prev.x-e.x)/e.width:0,y:e.height?(t.prev.y-e.y)/e.height:0}),t.next&&(i.next={penId:t.penId,connectTo:t.connectTo,x:e.width?(t.next.x-e.x)/e.width:0,y:e.height?(t.next.y-e.y)/e.height:0}),i}z.triangleSolid=(t,e,i,r)=>{t.save(),t.translate(r.x,r.y),t.rotate(r.rotate*Math.PI/180),t.translate(-r.x,-r.y);const n=r.x-r.step;t.moveTo(n,r.y-r.step/4),t.lineTo(r.x,r.y),t.lineTo(n,r.y+r.step/4),t.closePath(),t.stroke(),t.fillStyle=t.strokeStyle,t.fill(),t.restore()},z.triangle=(t,e,i,r)=>{t.save(),t.lineWidth<2&&(t.lineWidth=2),t.translate(r.x,r.y),t.rotate(r.rotate*Math.PI/180),t.translate(-r.x,-r.y);const n=r.x-r.step;t.moveTo(n,r.y-r.step/4),t.lineTo(r.x,r.y),t.lineTo(n,r.y+r.step/4),t.closePath(),t.stroke(),t.fillStyle=i.data.background||"#ffffff",t.fill(),t.restore()},z.circleSolid=(t,e,i,r)=>{t.save(),t.translate(r.x,r.y),t.rotate(r.rotate*Math.PI/180),t.translate(-r.x,-r.y);const n=r.step/2;t.arc(r.x-n,r.y,n,0,2*Math.PI),t.stroke(),t.fillStyle=t.strokeStyle,t.fill(),t.restore()},z.circle=(t,e,i,r)=>{t.save(),t.translate(r.x,r.y),t.rotate(r.rotate*Math.PI/180),t.translate(-r.x,-r.y);const n=r.step/2;t.arc(r.x-n,r.y,n,0,2*Math.PI),t.stroke(),t.fillStyle=i.data.background||"#ffffff",t.fill(),t.restore()},z.diamondSolid=(t,e,i,r)=>{t.save(),t.translate(r.x,r.y),t.rotate(r.rotate*Math.PI/180),t.translate(-r.x,-r.y);const n=r.x-r.step,o=r.step/2;t.moveTo(n,r.y),t.lineTo(n+o,r.y-o/2),t.lineTo(r.x,r.y),t.lineTo(n+o,r.y+o/2),t.closePath(),t.stroke(),t.fillStyle=t.strokeStyle,t.fill(),t.restore()},z.diamond=(t,e,i,r)=>{t.save(),t.translate(r.x,r.y),t.rotate(r.rotate*Math.PI/180),t.translate(-r.x,-r.y);const n=r.x-r.step,o=r.step/2;t.moveTo(n,r.y),t.lineTo(n+o,r.y-o/2),t.lineTo(r.x,r.y),t.lineTo(n+o,r.y+o/2),t.closePath(),t.stroke(),t.fillStyle=i.data.background||"#ffffff",t.fill(),t.restore()},z.line=(t,e,i,r)=>{t.save(),t.translate(r.x,r.y),t.rotate(r.rotate*Math.PI/180),t.translate(-r.x,-r.y);const n=r.x-r.step;t.moveTo(n,r.y-r.step/3),t.lineTo(r.x,r.y),t.lineTo(n,r.y+r.step/3),t.stroke(),t.restore()},z.lineUp=(t,e,i,r)=>{t.save(),t.translate(r.x,r.y),t.rotate(r.rotate*Math.PI/180),t.translate(-r.x,-r.y);const n=r.x-r.step;t.moveTo(n,r.y-r.step/3),t.lineTo(r.x,r.y),t.stroke(),t.restore()},z.lineDown=(t,e,i,r)=>{t.save(),t.translate(r.x,r.y),t.rotate(r.rotate*Math.PI/180),t.translate(-r.x,-r.y);const n=r.x-r.step;t.moveTo(n,r.y+r.step/3),t.lineTo(r.x,r.y),t.stroke(),t.restore()};const Mt=/^[\t\n\f\r ]*([MLHVZCSQTAmlhvzcsqta])[\t\n\f\r ]*/,Dt=/^[01]/,Nt=/^[+-]?(([0-9]*\.[0-9]+)|([0-9]+\.)|([0-9]+))([eE][+-]?[0-9]+)?/,Ot=/^(([\t\n\f\r ]+,?[\t\n\f\r ]*)|(,[\t\n\f\r ]*))/,Bt={M:[Nt,Nt],L:[Nt,Nt],H:[Nt],V:[Nt],Z:[],C:[Nt,Nt,Nt,Nt,Nt,Nt],S:[Nt,Nt,Nt,Nt],Q:[Nt,Nt,Nt,Nt],T:[Nt,Nt],A:[Nt,Nt,Nt,Dt,Dt,Nt,Nt]};function Ut(t){let e=1/0,i=1/0,r=-1/0,n=-1/0;return function(t){let e,i=0,r=0;t.commands.forEach((t=>{switch(t.key){case"Z":case"z":t.worldPoints=[i,r];break;case"H":t.worldPoints=[t.values[0],e.worldPoints[e.worldPoints.length-1]];break;case"h":t.worldPoints=[t.values[0]+e.worldPoints[e.worldPoints.length-2],e.worldPoints[e.worldPoints.length-1]];break;case"V":t.worldPoints=[e.worldPoints[e.worldPoints.length-2],t.values[0]];break;case"v":t.worldPoints=[e.worldPoints[e.worldPoints.length-2],t.values[0]+e.worldPoints[e.worldPoints.length-1]];break;default:!function(t,e){const i=[];let r=t.relative&&e?{x:e.worldPoints[e.worldPoints.length-2],y:e.worldPoints[e.worldPoints.length-1]}:{x:0,y:0};for(let e=0;e{t.worldPoints.forEach(((t,o)=>{o%2==0?(tr&&(r=t)):(tn&&(n=t))}))})),--e,--i,{x:e,y:i,ex:r,ey:n,width:r-e+1,height:n-i+1}}function jt(t,e,i){const r=Bt[t.toUpperCase()],n=[];for(;i<=e.length;){const o={key:t,values:[]};for(const t of r){const r=e.slice(i).match(t);if(null===r){if(0===o.values.length)return{cursor:i,commands:n};throw new Error("malformed path (first error at "+i+")")}{o.values.push(+r[0]),i+=r[0].length;const t=e.slice(i).match(Ot);null!==t&&(i+=t[0].length)}}if(o.relative=o.key.toUpperCase()!==o.key,n.push(o),0===r.length)return{cursor:i,commands:n};"m"===t&&(t="l"),"M"===t&&(t="L")}throw new Error("malformed path (first error at "+i+")")}function Ft(t,e){const i=L.paths[t.pathId];if(!i)return new Path2D;const r=function(t){let e=0,i=[];for(;e{switch(t.key){case"A":case"a":const r=t.values[0],n=t.values[1],o=Math.PI*t.values[2]/180,s=Math.cos(o),a=Math.sin(o),c=n*n*i*i*s*s+r*r*i*i*a*a,l=2*e*i*s*a*(n*n-r*r),h=r*r*e*e*s*s+n*n*e*e*a*a,u=-r*r*n*n*e*e*i*i,d=l*l-4*c*h,p=Math.sqrt((c-h)*(c-h)+l*l);t.values[2]=0!==l?180*Math.atan((h-c-p)/l)/Math.PI:c=0?t.values[4]:1-t.values[4];break;case"V":case"v":t.values[0]*=i;break;default:t.values.forEach(((r,n)=>{t.values[n]=r*(n%2==0?e:i)}))}}))}(r,t.calculative.worldRect.width/t.calculative.svgRect.width,t.calculative.worldRect.height/t.calculative.svgRect.height);const n=Ut(r);Rt(n),function(t,e,i){null==i&&(i=e),t.commands.forEach(((t,r)=>{if(!t.relative||!r)switch(t.key){case"A":case"a":t.values[5]+=e,t.values[6]+=i;break;case"V":case"v":t.values[0]+=i;break;default:t.values.forEach(((r,n)=>{t.values[n]=r+(n%2==0?e:i)}))}}))}(r,t.calculative.worldRect.x-n.x,t.calculative.worldRect.y-n.y);const o=function(t){let e="";return t.commands.forEach((t=>{e+=t.key+" ",t.values.forEach((t=>{e+=t+" "}))})),e}(r);return e?(e.svgPath&&e.svgPath(o),e):new Path2D(o)}function Ht(){return(4294967296*(1+Math.random())|0).toString(16).substring(1)}function zt(t,e,i){if(e.calculative.worldAnchors||(e.calculative.worldAnchors=[]),i)e.calculative.activeAnchor&&(e.calculative.activeAnchor.next={penId:e.id,x:i.x,y:i.y},T(e.calculative.activeAnchor.next,e.calculative.activeAnchor)<5?e.calculative.activeAnchor.next=void 0:(e.calculative.activeAnchor.prev={...e.calculative.activeAnchor.next},k(e.calculative.activeAnchor.prev,180,e.calculative.activeAnchor)));else{const i=e.calculative.worldAnchors[0];i.next||(Wt(i,J(i,t.pens[i.connectTo]),50),i.prev=void 0);const r=e.calculative.worldAnchors[e.calculative.worldAnchors.length-1];r&&r!==i&&!r.prev&&(Wt(r,J(r,t.pens[r.connectTo]),-50),r.next=void 0)}}function Wt(t,e,i){switch(e){case w.Up:t.prev={penId:t.penId,x:t.x,y:t.y+i},t.next={penId:t.penId,x:t.x,y:t.y-i};break;case w.Right:t.prev={penId:t.penId,x:t.x-i,y:t.y},t.next={penId:t.penId,x:t.x+i,y:t.y};break;case w.Bottom:t.prev={penId:t.penId,x:t.x,y:t.y-i},t.next={penId:t.penId,x:t.x,y:t.y+i};break;case w.Left:t.prev={penId:t.penId,x:t.x+i,y:t.y},t.next={penId:t.penId,x:t.x-i,y:t.y}}}function qt(t,e,i,r){const n=1-t;return{x:n*n*e.x+2*n*t*i.x+t*t*r.x,y:n*n*e.y+2*n*t*i.y+t*t*r.y,step:t}}function Vt(t,e,i,r,n){const{x:o,y:s}=e,{x:a,y:c}=n,{x:l,y:h}=i,{x:u,y:d}=r,p=1-t;return{x:o*p*p*p+3*l*t*p*p+3*u*t*t*p+a*t*t*t,y:s*p*p*p+3*h*t*p*p+3*d*t*t*p+c*t*t*t,step:t}}function Kt(t,e,i){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function $t(t,e,i){if(e.calculative.worldAnchors||(e.calculative.worldAnchors=[]),e.calculative.worldAnchors.length<2)return;let r=e.calculative.activeAnchor,n=i||e.calculative.worldAnchors[e.calculative.worldAnchors.length-1];if(!r||!n)return;let o=J(r,t.pens[r.connectTo]);switch(o===w.None&&(o=n.x>r.x?w.Right:w.Left),r.next={id:Ht(),penId:e.id,x:r.x,y:r.y,prevNextType:2},n.prev={id:Ht(),penId:e.id,x:n.x,y:n.y,prevNextType:2},o){case w.Up:r.next.y-=20,n.prev.y=r.y;break;case w.Bottom:r.next.y+=20,n.prev.y=r.y;break;case w.Left:r.next.x-=20,n.prev.x=r.x;break;default:r.next.x+=20,n.prev.x=r.x}}function Yt(t,e){if(e||(e=new Path2D),t.calculative.worldAnchors.length>1){let i;t.calculative.worldAnchors.forEach((t=>{i?Qt(e,i,t):t.start=!0,i=t})),t.close&&Qt(e,i,t.calculative.worldAnchors[0])}return e}function Xt(t,e,i){if(e.calculative.worldAnchors||(e.calculative.worldAnchors=[]),e.calculative.worldAnchors.length<2)return;let r=e.calculative.activeAnchor,n=e.calculative.worldAnchors[e.calculative.worldAnchors.length-1];r&&n&&n.id&&r!==n&&(r.next=void 0,tt(e),n.prev=void 0,e.calculative.worldAnchors.push(n))}function Qt(t,e,i){i&&!i.isTemp&&(e.next?i.prev?(e.start&&t.moveTo(e.x,e.y),t.bezierCurveTo(e.next.x,e.next.y,i.prev.x,i.prev.y,i.x,i.y)):(e.start&&t.moveTo(e.x,e.y),t.quadraticCurveTo(e.next.x,e.next.y,i.x,i.y)):i.prev?(e.start&&t.moveTo(e.x,e.y),t.quadraticCurveTo(i.prev.x,i.prev.y,i.x,i.y)):(e.start&&t.moveTo(e.x,e.y),t.lineTo(i.x,i.y)))}function Gt(t){return ie(t),At(function(t){const e=[];let i;return t.calculative.worldAnchors.forEach((r=>{e.push(r),i&&e.push(...Jt(i,r,t)),i=r})),t.close&&t.calculative.worldAnchors.length>1&&e.push(...Jt(i,t.calculative.worldAnchors[0],t)),e}(t))}function Jt(t,e,i){const r=[];if(!e)return r;let n=.02;if(t.lineLength){let e=4;i&&i.lineWidth&&(e+=i.lineWidth/2),n=e/t.lineLength}if(t.next)if(e.prev)for(let i=n;i<1;i+=n)r.push(Vt(i,t,t.next,e.prev,e));else for(let i=n;i<1;i+=n)r.push(qt(i,t,t.next,e));else if(e.prev)for(let i=n;i<1;i+=n)r.push(qt(i,t,e.prev,e));else r.push({x:e.x,y:e.y});return r.length>1&&(t.curvePoints=r),r}function Zt(t,e){let i=4;e.lineWidth&&(i+=e.lineWidth/2);let r,n,o=0;for(const s of e.calculative.worldAnchors){if(r){if(n=te(t,r,s,i),n)return{i:o,point:n};++o}r=s}if(e.close&&e.calculative.worldAnchors.length>1&&(n=te(t,r,e.calculative.worldAnchors[0],i)))return{i:o,point:n}}function te(t,e,i,r=4){if(!e.next&&!i.prev){const{x:n,y:o}=e,{x:s,y:a}=i,c=Math.min(n,s),l=Math.max(n,s),h=Math.min(o,a),u=Math.max(o,a);if(!(t.x>=c-r&&t.x<=l+r&&t.y>=h-r&&t.y<=u+r))return;return function(t,e,i,r=4){if(e.x===i.x){if(Math.abs(t.x-e.x)<=r)return{x:e.x,y:t.y}}else{const n=(e.y-i.y)/(e.x-i.x),o=e.y-n*e.x;if(Math.abs((n*t.x+o-t.y)/Math.sqrt(n*n+1))<=r){const e=(t.x+n*t.y-n*o)/(n*n+1);return{x:e,y:n*e+o}}}}(t,e,i,r)}if(e.curvePoints)for(const i of e.curvePoints)if(A(t,i,r))return i}function ee(t,e,i,r){if(!e&&!i)return Math.sqrt(Math.pow(Math.abs(t.x-r.x),2)+Math.pow(Math.abs(t.y-r.y),2))||0;const n=document.createElementNS("http://www.w3.org/2000/svg","path");return e&&i?n.setAttribute("d",`M${t.x} ${t.y} C${e.x} ${e.y} ${i.x} ${i.y} ${r.x} ${r.y}`):e?n.setAttribute("d",`M${t.x} ${t.y} Q${e.x} ${e.y} ${r.x} ${r.y}`):n.setAttribute("d",`M${t.x} ${t.y} Q${i.x} ${i.y} ${r.x} ${r.y}`),n.getTotalLength()||0}function ie(t){if(t.calculative.worldAnchors.length<2)return 0;let e,i=0;if(t.calculative.worldAnchors.forEach((t=>{e&&(e.lineLength=ee(e,e.next,t.prev,t),i+=e.lineLength),e=t})),t.close){let r=t.calculative.worldAnchors[0];e.lineLength=ee(e,e.next,r.prev,r),i+=e.lineLength}return t.length=i,i}const re=30;function ne(t,e,i){if(e.calculative.worldAnchors||(e.calculative.worldAnchors=[]),e.calculative.worldAnchors.length<2)return;let r=e.calculative.activeAnchor,n=e.calculative.worldAnchors[e.calculative.worldAnchors.length-1];if(!r||!n||!n.id||r===n)return;if(r.next=void 0,tt(e),r.x===n.x||r.y===n.y)return void e.calculative.worldAnchors.push(n);const o=[],s=t.pens[r.connectTo],a=t.pens[n.connectTo],c=J(r,s),l=J(n,a);let h,u=oe(r,c,re);switch(u&&(r=u,o.push(u)),u=oe(n,l,re),u&&(n.connectTo&&(h=n),n=u),c){case w.Up:o.push(...function(t,e,i){if(t.x===e.x||t.y===e.y)return[];const r=[];let n,o;switch(i){case w.Bottom:if(n=e.x,o=t.y,e.y>t.y)n=t.x+(e.x-t.x)/2,r.push({x:n,y:t.y},{x:n,y:e.y});else{const i=(t.y+e.y)/2;r.push({x:t.x,y:i},{x:e.x,y:i})}break;case w.Right:n=e.x,o=t.y,e.xt.x&&e.yt.y-re)n=t.x+(e.x-t.x)/2,r.push({x:n,y:t.y},{x:n,y:e.y});else{const i=(t.y+e.y+re)/2;r.push({x:t.x,y:i},{x:e.x,y:i})}}return r}(r,n,l));break;case w.Right:o.push(...function(t,e,i){if(t.x===e.x||t.y===e.y)return[];const r=[];let n,o;switch(i){case w.Up:n=t.x,o=e.y,e.x>t.x&&e.y>t.y&&(n=e.x,o=t.y),r.push({x:n,y:o});break;case w.Bottom:n=t.x,o=e.y,e.x>t.x&&e.yt.y&&(n=t.x,o=e.y),r.push({x:n,y:o});break;case w.Left:n=e.x,o=t.y,e.x>t.x&&e.y>t.y&&(n=t.x,o=e.y),r.push({x:n,y:o});break;default:if(n=t.x,e.yt.y&&(n=e.x,o=t.y),r.push({x:n,y:o});break;case w.Bottom:n=t.x,o=e.y,e.xt.x)n=e.x,o=t.y+(e.y-t.y)/2,r.push({x:t.x,y:o},{x:e.x,y:o});else{const i=(t.x+e.x)/2;r.push({x:i,y:t.y},{x:i,y:e.y})}break;default:if(n=t.x,o=e.y,e.xMath.abs(i.y-e.y)),t.calculative.worldAnchors.length&&(i.isTemp=void 0,t.calculative.drawlineH?(r.push({x:i.x,y:e.y}),Math.abs(i.y-e.y){t.id=Ht(),t.penId=e.id,e.calculative.worldAnchors.push(t)})),e.calculative.worldAnchors.push(n),h&&e.calculative.worldAnchors.push(h)}function oe(t,e,i){const r={x:t.x,y:t.y,id:Ht()};switch(e){case w.Up:r.y-=i;break;case w.Right:r.x+=i;break;case w.Bottom:r.y+=i;break;case w.Left:r.x-=i;break;default:return}return r}function se(t,e,i,r){const n=[];let o,s,a,c,l,h,u,d,p,f,v,y,g,w;p=t[i],f=t[r],a=p.x,c=p.y,u=f.x-a,d=f.y-c,w=u*u+d*d,o=e;for(let e=i+1;e1?(l=v.x-f.x,h=v.y-f.y):y>0?(l=v.x-(a+u*y),h=v.y-(c+d*y)):(l=v.x-a,h=v.y-c)):(l=v.x-a,h=v.y-c),g=l*l+h*h,g>o&&(s=e,o=g);return o>e&&(s-i>1&&n.push(...se(t,e,i,s)),n.push({id:t[s].id,penId:t[s].penId,x:t[s].x,y:t[s].y}),r-s>1&&n.push(...se(t,e,s,r))),n}const ae={};function ce(t){if(t.onDestroy||(t.onDestroy=le,t.onMove=he,t.onResize=he,t.onRotate=he,t.onValue=he),ae[t.id])t.iframe!==t.calculative.iframe&&(ae[t.id].src=t.iframe,t.calculative.iframe=t.iframe);else{const e=document.createElement("iframe");e.scrolling="no",e.frameBorder="0",e.src=t.iframe,ae[t.id]=e,t.calculative.iframe=t.iframe,t.calculative.canvas.externalElements&&t.calculative.canvas.externalElements.appendChild(e),ut(t,e)}return t.calculative.dirty&&ut(t,ae[t.id]),new Path2D}function le(t){ae[t.id].remove(),ae[t.id]=void 0}function he(t){ut(t,ae[t.id])}const ue={};function de(t){if(t.onDestroy=pe,t.onMove=fe,t.onResize=fe,t.onRotate=fe,t.onClick=ve,t.onValue=fe,ue[t.id])t.video&&t.calculative.media&&t.video!==t.calculative.video?(t.calculative.media.src=t.video,t.autoPlay&&(t.calculative.media.muted=!0,t.calculative.media.autoplay=!0),t.calculative.media.loop=t.playLoop,t.calculative.video=t.video):t.audio&&t.calculative.media&&t.audio!==t.calculative.audio&&(t.calculative.media.src=t.audio,t.autoPlay&&(t.calculative.media.muted=!0,t.calculative.media.autoplay=!0),t.calculative.media.loop=t.playLoop,t.calculative.audio=t.audio);else{const e=document.createElement("div"),i=document.createElement("div");let r;i.style.position="absolute",i.style.outline="none",i.style.left="0",i.style.bottom="0",i.style.width="0",i.style.height="2px",i.style.background="#52c41a",i.style.zIndex="1",e.appendChild(i),t.video?(r=document.createElement("video"),r.src=t.video):t.audio&&(r=document.createElement("audio"),r.src=t.audio),r.loop=t.playLoop,r.ontimeupdate=()=>{ye(i,r,t.calculative.worldRect.width)},r.onended=()=>{t.calculative.onended&&t.calculative.onended(t)},t.calculative.media=r,r.style.position="absolute",r.style.outline="none",r.style.left="0",r.style.top="0",r.style.width="100%",r.style.height="100%",e.appendChild(r),ue[t.id]=e,t.calculative.canvas.externalElements&&t.calculative.canvas.externalElements.appendChild(e),ut(t,e),t.autoPlay&&(r.autoplay=!0,r.muted=!0)}return t.calculative.dirty&&ut(t,ue[t.id]),new Path2D}function pe(t){ue[t.id].remove(),ue[t.id]=void 0}function fe(t){ut(t,ue[t.id]),ye(ue[t.id].children[0],ue[t.id].children[1],t.calculative.worldRect.width)}function ve(t){t.calculative.media&&(t.calculative.media.muted=!1,t.calculative.media.paused?t.calculative.media.play():t.calculative.media.pause())}function ye(t,e,i){t.style.width=e.currentTime/e.duration*i+"px"}function ge(t,e){return e||(e=new Path2D),e.ellipse(t.calculative.worldRect.x+t.calculative.worldRect.width/2,t.calculative.worldRect.y+t.calculative.worldRect.height/2,t.calculative.worldRect.width/2,t.calculative.worldRect.height/2,0,0,2*Math.PI),e}function we(t,e){return e||(e=new Path2D),e.moveTo(t.calculative.worldRect.x+t.calculative.worldRect.width/2,t.calculative.worldRect.y),e.lineTo(t.calculative.worldRect.x+t.calculative.worldRect.width,t.calculative.worldRect.y+t.calculative.worldRect.height/2),e.lineTo(t.calculative.worldRect.x+t.calculative.worldRect.width/2,t.calculative.worldRect.y+t.calculative.worldRect.height),e.lineTo(t.calculative.worldRect.x,t.calculative.worldRect.y+t.calculative.worldRect.height/2),e.lineTo(t.calculative.worldRect.x+t.calculative.worldRect.width/2,t.calculative.worldRect.y),e.closePath(),e}function me(t,e){return e||(e=new Path2D),e.moveTo(t.calculative.worldRect.x+t.calculative.worldRect.width/2,t.calculative.worldRect.y),e.lineTo(t.calculative.worldRect.x+t.calculative.worldRect.width,t.calculative.worldRect.y+t.calculative.worldRect.height),e.lineTo(t.calculative.worldRect.x,t.calculative.worldRect.y+t.calculative.worldRect.height),e.lineTo(t.calculative.worldRect.x+t.calculative.worldRect.width/2,t.calculative.worldRect.y),e.closePath(),e}function xe(t){const e=[];e.push({id:"0",penId:t.id,x:.5,y:0}),e.push({id:"1",penId:t.id,x:.75,y:.5}),e.push({id:"2",penId:t.id,x:.5,y:1}),e.push({id:"3",penId:t.id,x:.25,y:.5}),t.anchors=e}function be(t,e){return e||(e=new Path2D),e.moveTo(t.calculative.worldRect.x+t.calculative.worldRect.width/2,t.calculative.worldRect.y),e.lineTo(t.calculative.worldRect.x+t.calculative.worldRect.width,t.calculative.worldRect.y+2*t.calculative.worldRect.height/5),e.lineTo(t.calculative.worldRect.x+4*t.calculative.worldRect.width/5,t.calculative.worldRect.y+t.calculative.worldRect.height),e.lineTo(t.calculative.worldRect.x+t.calculative.worldRect.width/5,t.calculative.worldRect.y+t.calculative.worldRect.height),e.lineTo(t.calculative.worldRect.x,t.calculative.worldRect.y+2*t.calculative.worldRect.height/5),e.closePath(),e}function Re(t){const e=[];e.push({id:"0",penId:t.id,x:.5,y:0}),e.push({id:"1",penId:t.id,x:1,y:.4}),e.push({id:"2",penId:t.id,x:.8,y:1}),e.push({id:"3",penId:t.id,x:.2,y:1}),e.push({id:"4",penId:t.id,x:0,y:.4}),t.anchors=e}function _e(t,e){t.onDestroy||(t.onResize=Ae),e||(e=new Path2D);const i=t.calculative.worldRect.width>t.calculative.worldRect.height?t.calculative.worldRect.height:t.calculative.worldRect.width,r=t.calculative.worldRect.x+t.calculative.worldRect.width/2,n=t.calculative.worldRect.y+t.calculative.worldRect.height/2,o=n-i/2,s=n-i/4,a=-(s-n)*Math.sin(Math.PI/180*324)+r,c=(s-n)*Math.cos(Math.PI/180*324)+n;e.moveTo(a,c);for(let t=0;t<5;++t)e.lineTo(-(o-n)*Math.sin(Math.PI/180*72*t)+r,(o-n)*Math.cos(Math.PI/180*72*t)+n),e.lineTo((a-r)*Math.cos(Math.PI/180*72*(t+1))-(c-n)*Math.sin(Math.PI/180*72*(t+1))+r,(a-r)*Math.sin(Math.PI/180*72*(t+1))+(c-n)*Math.cos(Math.PI/180*72*(t+1))+n);return e.closePath(),e}function ke(t){const{width:e,height:i}=t,r=e>i?i:e,n=[];for(let o=0;o<5;++o)n.push({flag:1,id:String(o),penId:t.id,x:.5+r/2*Math.sin(Math.PI/180*72*o)/e,y:-r/2*Math.cos(Math.PI/180*72*o)/i+.5});t.anchors=n}function Ae(t){const e=t.anchors.filter((t=>1!==t.flag));ke(t),t.anchors=t.anchors.concat(...e)}function Se(t,e){return e||(e=new Path2D),e.moveTo(t.calculative.worldRect.x+t.calculative.worldRect.width/4,t.calculative.worldRect.y),e.lineTo(t.calculative.worldRect.x+3*t.calculative.worldRect.width/4,t.calculative.worldRect.y),e.lineTo(t.calculative.worldRect.x+t.calculative.worldRect.width,t.calculative.worldRect.y+t.calculative.worldRect.height/2),e.lineTo(t.calculative.worldRect.x+3*t.calculative.worldRect.width/4,t.calculative.worldRect.y+t.calculative.worldRect.height),e.lineTo(t.calculative.worldRect.x+1*t.calculative.worldRect.width/4,t.calculative.worldRect.y+t.calculative.worldRect.height),e.lineTo(t.calculative.worldRect.x,t.calculative.worldRect.y+t.calculative.worldRect.height/2),e.lineTo(t.calculative.worldRect.x+t.calculative.worldRect.width/4,t.calculative.worldRect.y),e.closePath(),e}function Ee(t,e){return e||(e=new Path2D),e.moveTo(t.calculative.worldRect.x,t.calculative.worldRect.y+t.calculative.worldRect.height/2),e.lineTo(t.calculative.worldRect.x+t.calculative.worldRect.height/2,t.calculative.worldRect.y),e.lineTo(t.calculative.worldRect.x+t.calculative.worldRect.height/2,t.calculative.worldRect.y+t.calculative.worldRect.height/3),e.lineTo(t.calculative.worldRect.x+t.calculative.worldRect.width,t.calculative.worldRect.y+t.calculative.worldRect.height/3),e.lineTo(t.calculative.worldRect.x+t.calculative.worldRect.width,t.calculative.worldRect.y+2*t.calculative.worldRect.height/3),e.lineTo(t.calculative.worldRect.x+t.calculative.worldRect.height/2,t.calculative.worldRect.y+2*t.calculative.worldRect.height/3),e.lineTo(t.calculative.worldRect.x+t.calculative.worldRect.height/2,t.calculative.worldRect.y+2*t.calculative.worldRect.height/3),e.lineTo(t.calculative.worldRect.x+t.calculative.worldRect.height/2,t.calculative.worldRect.y+t.calculative.worldRect.height),e.closePath(),e}function Te(t,e){return e||(e=new Path2D),e.moveTo(t.calculative.worldRect.x,t.calculative.worldRect.y+t.calculative.worldRect.height/3),e.lineTo(t.calculative.worldRect.x+(t.calculative.worldRect.width-t.calculative.worldRect.height/2),t.calculative.worldRect.y+t.calculative.worldRect.height/3),e.lineTo(t.calculative.worldRect.x+(t.calculative.worldRect.width-t.calculative.worldRect.height/2),t.calculative.worldRect.y),e.lineTo(t.calculative.worldRect.x+t.calculative.worldRect.width,t.calculative.worldRect.y+t.calculative.worldRect.height/2),e.lineTo(t.calculative.worldRect.x+(t.calculative.worldRect.width-t.calculative.worldRect.height/2),t.calculative.worldRect.y+t.calculative.worldRect.height),e.lineTo(t.calculative.worldRect.x+(t.calculative.worldRect.width-t.calculative.worldRect.height/2),t.calculative.worldRect.y+2*t.calculative.worldRect.height/3),e.lineTo(t.calculative.worldRect.x,t.calculative.worldRect.y+2*t.calculative.worldRect.height/3),e.closePath(),e}function Ie(t,e){return e||(e=new Path2D),e.moveTo(t.calculative.worldRect.x,t.calculative.worldRect.y+t.calculative.worldRect.height/2),e.lineTo(t.calculative.worldRect.x+t.calculative.worldRect.height/2,t.calculative.worldRect.y),e.lineTo(t.calculative.worldRect.x+t.calculative.worldRect.height/2,t.calculative.worldRect.y+t.calculative.worldRect.height/3),e.lineTo(t.calculative.worldRect.x+(t.calculative.worldRect.width-t.calculative.worldRect.height/2),t.calculative.worldRect.y+t.calculative.worldRect.height/3),e.lineTo(t.calculative.worldRect.x+(t.calculative.worldRect.width-t.calculative.worldRect.height/2),t.calculative.worldRect.y),e.lineTo(t.calculative.worldRect.x+t.calculative.worldRect.width,t.calculative.worldRect.y+t.calculative.worldRect.height/2),e.lineTo(t.calculative.worldRect.x+(t.calculative.worldRect.width-t.calculative.worldRect.height/2),t.calculative.worldRect.y+t.calculative.worldRect.height),e.lineTo(t.calculative.worldRect.x+(t.calculative.worldRect.width-t.calculative.worldRect.height/2),t.calculative.worldRect.y+2*t.calculative.worldRect.height/3),e.lineTo(t.calculative.worldRect.x+t.calculative.worldRect.height/2,t.calculative.worldRect.y+2*t.calculative.worldRect.height/3),e.lineTo(t.calculative.worldRect.x+t.calculative.worldRect.height/2,t.calculative.worldRect.y+t.calculative.worldRect.height),e.closePath(),e}function Pe(t,e){return e||(e=new Path2D),e.moveTo(t.calculative.worldRect.x,t.calculative.worldRect.y),e.lineTo(t.calculative.worldRect.x+t.calculative.worldRect.width,t.calculative.worldRect.y),e.lineTo(t.calculative.worldRect.x+t.calculative.worldRect.width,t.calculative.worldRect.y+3*t.calculative.worldRect.height/4),e.lineTo(t.calculative.worldRect.x+8*t.calculative.worldRect.width/16,t.calculative.worldRect.y+3*t.calculative.worldRect.height/4),e.lineTo(t.calculative.worldRect.x+t.calculative.worldRect.width/4,t.calculative.worldRect.ey),e.lineTo(t.calculative.worldRect.x+5*t.calculative.worldRect.width/16,t.calculative.worldRect.y+3*t.calculative.worldRect.height/4),e.lineTo(t.calculative.worldRect.x,t.calculative.worldRect.y+3*t.calculative.worldRect.height/4),e.closePath(),e}function Ce(t,e){return e||(e=new Path2D),e.moveTo(t.calculative.worldRect.x+t.calculative.worldRect.width/5,t.calculative.worldRect.y+13*t.calculative.worldRect.height/16),e.bezierCurveTo(t.calculative.worldRect.x-t.calculative.worldRect.width/15,t.calculative.worldRect.y+13*t.calculative.worldRect.height/16,t.calculative.worldRect.x-t.calculative.worldRect.width/15,t.calculative.worldRect.y+7*t.calculative.worldRect.height/16,t.calculative.worldRect.x+t.calculative.worldRect.width/5,t.calculative.worldRect.y+7*t.calculative.worldRect.height/16),e.bezierCurveTo(t.calculative.worldRect.x+t.calculative.worldRect.width/5,t.calculative.worldRect.y,t.calculative.worldRect.x+4*t.calculative.worldRect.width/5,t.calculative.worldRect.y,t.calculative.worldRect.x+4*t.calculative.worldRect.width/5,t.calculative.worldRect.y+7*t.calculative.worldRect.height/16),e.bezierCurveTo(t.calculative.worldRect.x+16*t.calculative.worldRect.width/15,t.calculative.worldRect.y+7*t.calculative.worldRect.height/16,t.calculative.worldRect.x+16*t.calculative.worldRect.width/15,t.calculative.worldRect.y+13*t.calculative.worldRect.height/16,t.calculative.worldRect.x+4*t.calculative.worldRect.width/5,t.calculative.worldRect.y+13*t.calculative.worldRect.height/16),e.closePath(),e}function Le(t,e){e||(e=new Path2D);const i=t.calculative.worldRect.width/6;return e.moveTo(t.calculative.worldRect.x,t.calculative.worldRect.y),e.lineTo(t.calculative.worldRect.ex-i,t.calculative.worldRect.y),e.lineTo(t.calculative.worldRect.ex,t.calculative.worldRect.y+i),e.lineTo(t.calculative.worldRect.ex,t.calculative.worldRect.ey),e.lineTo(t.calculative.worldRect.x,t.calculative.worldRect.ey),e.closePath(),e.moveTo(t.calculative.worldRect.ex-i,t.calculative.worldRect.y),e.lineTo(t.calculative.worldRect.ex-i,t.calculative.worldRect.y+i),e.lineTo(t.calculative.worldRect.ex,t.calculative.worldRect.y+i),e.closePath(),e}function Me(t,e){e||(e=new Path2D);const i=t.calculative.worldRect.width/4;return e.moveTo(t.calculative.worldRect.x+i,t.calculative.worldRect.y),e.rect(t.calculative.worldRect.x+i,t.calculative.worldRect.y,t.calculative.worldRect.width-i,t.calculative.worldRect.height-i),e.moveTo(t.calculative.worldRect.x+i,t.calculative.worldRect.y),e.lineTo(t.calculative.worldRect.x,t.calculative.worldRect.y+i),e.moveTo(t.calculative.worldRect.x+t.calculative.worldRect.width,t.calculative.worldRect.y),e.lineTo(t.calculative.worldRect.x+t.calculative.worldRect.width-i,t.calculative.worldRect.y+i),e.moveTo(t.calculative.worldRect.x+t.calculative.worldRect.width,t.calculative.worldRect.y+t.calculative.worldRect.height-i),e.lineTo(t.calculative.worldRect.x+t.calculative.worldRect.width-i,t.calculative.worldRect.y+t.calculative.worldRect.height),e.moveTo(t.calculative.worldRect.x+i,t.calculative.worldRect.y+t.calculative.worldRect.height-i),e.lineTo(t.calculative.worldRect.x,t.calculative.worldRect.y+t.calculative.worldRect.height),e.moveTo(t.calculative.worldRect.x,t.calculative.worldRect.y+i),e.rect(t.calculative.worldRect.x,t.calculative.worldRect.y+i,t.calculative.worldRect.width-i,t.calculative.worldRect.height-i),e.closePath(),e}function De(t,e){e||(e=new Path2D);const i=t.calculative.worldRect.width/4,r=t.calculative.worldRect.x+t.calculative.worldRect.width/2;return e.arc(r,t.calculative.worldRect.y+i,i,0,2*Math.PI),e.moveTo(t.calculative.worldRect.x,t.calculative.worldRect.y+3*i),e.lineTo(t.calculative.worldRect.ex,t.calculative.worldRect.y+3*i),e.moveTo(r,t.calculative.worldRect.y+2*i),e.lineTo(r,t.calculative.worldRect.y+4*i),e.moveTo(r,t.calculative.worldRect.y+4*i),e.lineTo(t.calculative.worldRect.x,t.calculative.worldRect.ey),e.moveTo(r,t.calculative.worldRect.y+4*i),e.lineTo(t.calculative.worldRect.ex,t.calculative.worldRect.ey),e.closePath(),e}const Ne={};function Oe(t){t.onDestroy||(t.onDestroy=Be,t.onMove=Ue,t.onResize=je,t.onRotate=Ue,t.onValue=Fe);const e=new Path2D;if(t.image){if(!Ne[t.id]){const e=new Image;e.crossOrigin="anonymous",e.src=t.image,Ne[t.id]=e,e.onload=()=>{t.calculative.img=e,t.calculative.imgNaturalWidth=e.naturalWidth||t.iconWidth,t.calculative.imgNaturalHeight=e.naturalHeight||t.iconHeight,t.calculative.canvas.externalElements&&t.calculative.canvas.externalElements.appendChild(e),ut(t,e)}}return t.calculative.dirty&&Ne[t.id]&&ut(t,Ne[t.id]),e}}function Be(t){Ne[t.id].remove(),Ne[t.id]=void 0}function Ue(t){Ne[t.id]&&ut(t,Ne[t.id])}function je(t){Ne[t.id]&&ut(t,Ne[t.id].div)}function Fe(t){Ne[t.id]&&Ne[t.id].src!==t.image&&(ut(t,Ne[t.id].div),Ne[t.id].src=t.image)}function He(t,e){return t.onDestroy||(t.onResize=ze,t.onValue=We),r(t,e)}function ze(t){const e=t.anchors.filter((t=>1!==t.flag));qe(t),t.anchors=t.anchors.concat(...e)}function We(t){ze(t),Q(t)}function qe(t){const e=[],{x:i,y:r,width:n,height:o}=t,s=function(t){let e=t.calculative.borderRadius||0,i=t.calculative.borderRadius||0;const{width:r,height:n}=t;t.calculative.borderRadius<1&&(e=r*t.calculative.borderRadius,i=n*t.calculative.borderRadius);let o=ei+n-s&&(l=Ke(i+n-s,l+s,c,s,-1)),e.push({id:String(e.length),flag:1,penId:t.id,x:(c-i)/n,y:(l-r)/o})}for(let a=0;a<3;a++){let c=r+o*(a+1)/4,l=i+n;cr+o-s&&(l=Ve(l-s,r+o-s,c,s)),e.push({id:String(e.length),flag:1,penId:t.id,x:(l-i)/n,y:(c-r)/o})}for(let a=0;a<5;a++){if(2===a)continue;let c=i+n*(a+1)/6,l=r+o;ci+n-s&&(l=Ke(i+n-s,l-s,c,s)),e.push({id:String(e.length),flag:1,penId:t.id,x:(c-i)/n,y:(l-r)/o})}for(let a=0;a<3;a++){let c=r+o*(a+1)/4,l=i;cr+o-s&&(l=Ve(l+s,r+o-s,c,s,-1)),e.push({id:String(e.length),flag:1,penId:t.id,x:(l-i)/n,y:(c-r)/o})}t.anchors=e}function Ve(t,e,i,r,n=1){return n*Math.sqrt(r**2-(i-e)**2)+t}function Ke(t,e,i,r,n=1){return n*Math.sqrt(r**2-(i-t)**2)+e}function $e(t,e){e||(e=new Path2D);const{x:i,y:r,width:n,height:o}=t.calculative.worldRect;return e.moveTo(i,r+o),e.lineTo(i+n,r+o),e.closePath(),e}function Ye(t){const e=[];e.push({id:"0",x:0,y:1}),e.push({id:"0",x:1,y:1}),t.anchors=e}function Xe(){return/Android|webOS|iPad|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)}const Qe=t=>{let e=0,i=0,r=0,n=0;return"number"==typeof t?e=i=r=n=t:"string"==typeof t?e=i=r=n=parseInt(t,10):Array.isArray(t)&&(e=t[0],r=Ge(t[1])?t[0]:t[1],n=Ge(t[2])?t[0]:t[2],i=Ge(t[3])?r:t[3]),[e,r,n,i]};function Ge(t){return null==t}function Je(){try{const t=new OffscreenCanvas(0,0),e=t.getContext("2d");return e&&e.arc?t:document.createElement("canvas")}catch(t){return document.createElement("canvas")}}class Ze{constructor(t){let e;this.parentElement=t,this.box=document.createElement("div"),this.text=document.createElement("div"),this.arrowUp=document.createElement("div"),this.arrowDown=document.createElement("div"),this.box.className="topology-tooltip",this.text.className="text",this.arrowUp.className="arrow",this.arrowDown.className="arrow down",this.box.appendChild(this.text),this.box.appendChild(this.arrowUp),this.box.appendChild(this.arrowDown),t.appendChild(this.box);for(let t=0;t0?(this.arrowUp.style.borderBottomColor="transparent",this.arrowDown.style.borderTopColor="#777777"):(a+=n.height+o.height+5,this.arrowUp.style.borderBottomColor="#777777",this.arrowDown.style.borderTopColor="transparent"),this.x=s,this.y=a,this.box.style.left=this.x+"px",this.box.style.top=this.y+"px"}hide(){this.x=-9999,this.box.style.left="-9999px"}translate(t,e){this.x<-1e3||(this.x+=t,this.y+=e,this.box.style.left=this.x+"px",this.box.style.top=this.y+"px")}}class ti{constructor(t){let e;this.parent=t,this.onMouseDownH=t=>{t.preventDefault(),t.stopPropagation(),this.isDownH=t.x,this.x=this.parent.store.data.x||0,this.lastScrollX=this.scrollX},this.onMouseDownV=t=>{t.preventDefault(),t.stopPropagation(),this.isDownV=t.y,this.y=this.parent.store.data.y||0,this.lastScrollY=this.scrollY},this.onMouseMove=t=>{if(this.isDownH){const e=t.x-this.isDownH;this.scrollX=this.lastScrollX+e,this.h.style.left=`${this.scrollX}px`,this.parent.store.data.x=this.x-e*this.rect.width/this.parent.parentElement.clientWidth,this.parent.dirty=!0}if(this.isDownV){const e=t.y-this.isDownV;this.scrollY=this.lastScrollY+e,this.v.style.top=`${this.scrollY}px`,this.parent.store.data.y=this.y-e*this.rect.height/this.parent.parentElement.clientHeight,this.parent.dirty=!0}(this.isDownH||this.isDownV)&&(this.parent.render(),this.parent.onMovePens())},this.onMouseUp=t=>{(this.isDownH||this.isDownV)&&(this.isDownH=void 0,this.isDownV=void 0,this.scrollX<20?(this.scrollX=20,this.h.style.left=`${this.scrollX}px`):this.scrollX>this.parent.parentElement.clientWidth-this.hSize-20&&(this.scrollX=this.parent.parentElement.clientWidth-this.hSize-20,this.h.style.left=`${this.scrollX}px`),this.scrollY<20?(this.scrollY=20,this.v.style.top=`${this.scrollY}px`):this.scrollY>this.parent.parentElement.clientHeight-this.vSize-20&&(this.scrollY=this.parent.parentElement.clientHeight-this.vSize-20,this.v.style.top=`${this.scrollY}px`),this.resize())},this.h=document.createElement("div"),this.v=document.createElement("div"),this.parent.externalElements.appendChild(this.h),this.parent.externalElements.appendChild(this.v),this.h.className="topology-scroll h",this.h.onmousedown=this.onMouseDownH,this.v.className="topology-scroll v",this.v.onmousedown=this.onMouseDownV,document.addEventListener("mousemove",this.onMouseMove),document.addEventListener("mouseup",this.onMouseUp);for(let t=0;t0?this.rect.width+=this.parent.store.data.x+(this.rect.x>0?0:this.rect.x):this.rect.width-=this.parent.store.data.x+(this.rect.x>0?0:this.rect.x),this.parent.store.data.y>0?this.rect.height+=this.parent.store.data.y+(this.rect.y>0?0:this.rect.y):this.rect.height-=this.parent.store.data.y+(this.rect.y>0?0:this.rect.y),this.rect.width<1400&&(this.rect.width=1400),this.rect.height<900&&(this.rect.height=900),this.hSize=1e3*this.parent.parentElement.clientWidth/this.rect.width/3,this.vSize=1e3*this.parent.parentElement.clientHeight/this.rect.height/3,this.h.style.width=this.hSize+"px",this.v.style.height=this.vSize+"px"}show(){this.isShow=!0,this.h.style.display="block",this.v.style.display="block",document.addEventListener("mousemove",this.onMouseMove),document.addEventListener("mouseup",this.onMouseUp)}hide(){this.isShow=!1,this.h.style.display="none",this.v.style.display="none",this.destroy()}translate(t,e){t&&(this.scrollX-=t*this.parent.parentElement.clientWidth/this.rect.width,this.h.style.left=`${this.scrollX}px`),e&&(this.scrollY-=e*this.parent.parentElement.clientHeight/this.rect.height,this.v.style.top=`${this.scrollY}px`)}wheel(t){let e=10;t&&(e=-10),this.scrollY+=e,this.v.style.top=`${this.scrollY}px`,this.parent.store.data.y-=e*this.rect.height/this.parent.parentElement.clientHeight,this.parent.dirty=!0,this.parent.render(),this.parent.onMovePens()}destroy(){document.removeEventListener("mousemove",this.onMouseMove),document.removeEventListener("mouseup",this.onMouseUp)}}class ei{constructor(t,e,i){this.parent=t,this.parentElement=e,this.store=i,this.canvas=document.createElement("canvas"),this.offscreen=Je(),this.magnifierScreen=Je(),this.externalElements=document.createElement("div"),this.lastRotate=0,this.hoverType=v.None,this.resizeIndex=0,this.lastOffsetX=0,this.lastOffsetY=0,this.drawLineFns=[...b],this.dirtyLines=new Set,this.lastMouseTime=0,this.dirty=!1,this.lastRender=0,this.touchStart=0,this.lastAnimateRender=0,this.animateRendering=!1,this.pointSize=8,this.pasteOffset=10,this.inputParent=document.createElement("div"),this.input=document.createElement("textarea"),this.inputRight=document.createElement("div"),this.dropdown=document.createElement("ul"),this.mousePos={x:0,y:0},this.magnifierSize=300,this.alreadyCopy=!1,this.onwheel=t=>{if(t.target!==this.externalElements)return;if(t.preventDefault(),t.stopPropagation(),this.store.options.scroll&&!t.ctrlKey&&this.scroll)return void this.scroll.wheel(t.deltaY<0);if(this.store.options.disableScale)return;if(this.store.data.locked===s.Disable)return;const e=t.wheelDeltaY?t.wheelDeltaY===-3*t.deltaY:0===t.deltaMode,i=performance.now();if(i-this.touchStart<50)return;this.touchStart=i;let r=t.x-(this.bounding.left||this.bounding.x),n=t.y-(this.bounding.top||this.bounding.y);e?this.translate(t.wheelDeltaX,t.wheelDeltaY):t.deltaY<0?this.scale(this.store.data.scale+.1,{x:r,y:n}):this.scale(this.store.data.scale-.1,{x:r,y:n}),this.externalElements.focus()},this.onkeydown=t=>{if(this.store.data.locked>=s.DisableMove||"INPUT"===t.target.tagName||"TEXTAREA"===t.target.tagName)return;let e=10,i=10;switch(t.key){case" ":this.hotkeyType=y.Translate;break;case"Control":this.drawingLine?this.drawingLine.calculative.drawlineH=!this.drawingLine.calculative.drawlineH:this.hotkeyType||(this.dirty=!0,this.hotkeyType=y.Select);break;case"Meta":case"Alt":break;case"Shift":if(this.drawingLine){const t=this.drawingLine.calculative.worldAnchors[this.drawingLine.calculative.worldAnchors.length-1];t!==this.drawingLine.calculative.activeAnchor?(tt(this.drawingLine),this.drawingLine.calculative.worldAnchors.push(t)):this.drawingLine.calculative.worldAnchors.push({x:t.x,y:t.y});const e=this.drawLineFns.indexOf(this.drawingLineName);this.drawingLineName=this.drawLineFns[(e+1)%this.drawLineFns.length],this.drawline(),this.dirty=!0}else 1===this.store.active.length&&this.store.active[0].type&&this.store.activeAnchor?this.toggleAnchorHand():this.hotkeyType||(this.dirty=!0,this.hotkeyType=y.Resize);break;case"a":case"A":t.ctrlKey||t.metaKey?(this.active(this.store.data.pens.filter((t=>!t.parentId))),t.preventDefault()):this.toggleAnchorMode();break;case"Delete":case"Backspace":!this.store.data.locked&&this.delete();break;case"ArrowLeft":if(this.movingAnchor){this.translateMovingAnchor(-1,0);break}e=-10,t.shiftKey&&(e=-5),t.ctrlKey&&(e=-1),this.translatePens(this.store.active,e,0);break;case"ArrowUp":if(this.movingAnchor){this.translateMovingAnchor(0,-1);break}i=-10,t.shiftKey&&(i=-5),t.ctrlKey&&(i=-1),this.translatePens(this.store.active,0,i);break;case"ArrowRight":if(this.movingAnchor){this.translateMovingAnchor(1,0);break}t.shiftKey&&(e=5),t.ctrlKey&&(e=1),this.translatePens(this.store.active,e,0);break;case"ArrowDown":if(this.movingAnchor){this.translateMovingAnchor(0,1);break}t.shiftKey&&(i=5),t.ctrlKey&&(i=1),this.translatePens(this.store.active,0,i);break;case"x":case"X":(t.ctrlKey||t.metaKey)&&this.cut();break;case"c":case"C":(t.ctrlKey||t.metaKey)&&this.copy();break;case"d":case"D":this.store.active[0]?.locked||this.removeAnchorHand();break;case"h":case"H":this.store.active[0]?.locked||this.addAnchorHand();break;case"m":case"M":this.toggleMagnifier();break;case"g":case"G":this.hoverType===v.NodeAnchor&&(this.movingAnchor=this.store.hoverAnchor,this.externalElements.style.cursor="move");break;case"v":case"V":t.ctrlKey||t.metaKey?this.paste():this.drawingLineName=this.drawingLineName?"":this.store.options.drawingLineName;break;case"b":case"B":this.drawingPencil();break;case"y":case"Y":(t.ctrlKey||t.metaKey)&&this.redo();break;case"z":case"Z":t.ctrlKey||t.metaKey?this.undo():t.shiftKey&&this.redo();break;case"Enter":this.drawingLineName?(this.finishDrawline(),this.drawingLineName=this.store.options.drawingLineName):this.store.active&&(this.store.active.forEach((t=>{"line"===t.name&&(t.type&&!t.close?t.type=o.Node:!t.type&&t.close&&(t.type=o.Line),t.close=!t.close,this.store.path2dMap.set(t,L.path2dDraws[t.name](t)),this.dirty=!0)})),this.render());break;case"Escape":this.drawingLineName&&this.finishDrawline(),this.drawingLineName=void 0,this.stopPencil(),this.movingPens&&(this.movingPens=void 0,this.mouseDown=void 0,this.clearDock(),this.store.active?.forEach((t=>{this.updateLines(t)})),this.calcActiveRect(),this.render(1/0)),this.hotkeyType=y.None,this.movingAnchor=void 0,this.magnifier&&(this.magnifier=!1,this.render(1/0))}this.render()},this.onkeyup=t=>{"Alt"===t.key&&this.drawingLine&&(this.store.options.autoAnchor=!this.store.options.autoAnchor),this.hotkeyType&&this.render(1/0),this.hotkeyType{if(!this.store.data.locked)try{t.preventDefault(),t.stopPropagation();const e=t.dataTransfer.getData("Topology")||t.dataTransfer.getData("Text");let i=null;if(!e){const e=t.dataTransfer.files;e.length&&(i=await this.fileToPen(e[0]))}!i&&(i=JSON.parse(e)),i=Array.isArray(i)?i:[i];const r={x:t.offsetX,y:t.offsetY};this.calibrateMouse(r),this.dropPens(i,r)}catch{}},this.ontouchstart=t=>{this.touchStart=performance.now();const e=t.changedTouches[0].pageX,i=t.changedTouches[0].pageY;t.touches.length>1?this.touches=t.touches:!t.target.dataset.l&&this.onMouseDown({x:e,y:i,ctrlKey:t.ctrlKey||t.metaKey,shiftKey:t.shiftKey,altKey:t.altKey,buttons:1})},this.ontouchmove=t=>{t.stopPropagation();const e=t.touches,i=e.length;!this.touchCenter&&i>1&&(this.touchCenter={x:e[0].pageX+(e[1].pageX-e[0].pageX)/2,y:e[0].pageY+(e[1].pageY-e[0].pageY)/2});const r=performance.now();if(r-this.touchStart<50)return;this.touchStart=r;const n=t.touches[0].pageX,o=t.touches[0].pageY;if(i>1)if(2===i){if(r-this.touchStart<200)return;const i=t.scale||Math.hypot(e[0].pageX-e[1].pageX,e[0].pageY-e[1].pageY)/Math.hypot(this.touches[0].pageX-this.touches[1].pageX,this.touches[0].pageY-this.touches[1].pageY);t.preventDefault(),i<0?this.scale(this.store.data.scale+.1,this.touchCenter):this.scale(this.store.data.scale-.1,this.touchCenter)}else 3===i&&this.translate(n,o);else t.preventDefault(),this.onMouseMove({x:n,y:o,ctrlKey:t.ctrlKey||t.metaKey,shiftKey:t.shiftKey,altKey:t.altKey,buttons:1})},this.ontouchend=t=>{this.touches=void 0,this.touchCenter=void 0;const e=t.changedTouches[0].pageX,i=t.changedTouches[0].pageY;this.onMouseUp({x:e,y:i,ctrlKey:t.ctrlKey||t.metaKey,shiftKey:t.shiftKey,altKey:t.altKey,buttons:1})},this.onGesturestart=t=>{t.preventDefault()},this.onMouseDown=t=>{if(this.hideInput(),this.store.data.locked===s.Disable||1!==t.buttons&&2!==t.buttons)this.hoverType=v.None;else if(!this.magnifier)if(2!==t.buttons||this.drawingLine||(this.mouseRight=g.Down),t.x-=this.bounding.left||this.bounding.x,t.y-=this.bounding.top||this.bounding.y,this.calibrateMouse(t),this.mousePos.x=t.x,this.mousePos.y=t.y,this.mouseDown=t,this.lastMouseTime=performance.now(),this.hotkeyType!==y.AddAnchor){if(this.translateX=t.x,this.translateY=t.y,(!t.ctrlKey||this.hoverType)&&this.hotkeyType!==y.Translate&&this.mouseRight!==g.Down){if(this.hoverType!==v.NodeAnchor||this.drawingLineName||this.movingAnchor||(this.drawingLineName=this.store.options.drawingLineName),this.drawingLineName){this.inactive(!0);const e={x:t.x,y:t.y,id:Ht()};if(this.hoverType&&this.hoverType1){const t=this.drawingLine.calculative.worldAnchors[this.drawingLine.calculative.worldAnchors.length-1];return t.connectTo=this.store.hover.id,t.anchorId=this.store.hoverAnchor.id,et(this.store.pens[this.store.hover.id],this.drawingLine.id,t.id,t.anchorId),void this.finishDrawline(!0)}if(2===t.buttons||"mind"===this.drawingLineName&&this.drawingLine?.calculative.worldAnchors.length>1)return this.finishDrawline(!0),void(this.drawingLineName=this.store.options.drawingLineName);if(this.hoverType===v.Node){let t=!1;if(this.store.options.autoAnchor&&(this.drawingLine||(this.drawingLine={id:Ht(),name:"line",lineName:this.drawingLineName,x:e.x,y:e.y,type:o.Line,calculative:{canvas:this,active:!0,worldAnchors:[e],lineWidth:this.store.data.lineWidth||1},fromArrow:this.store.data.fromArrow||this.store.options.fromArrow,toArrow:this.store.data.toArrow||this.store.options.toArrow,lineWidth:this.store.data.lineWidth||1},t=!0),this.store.hoverAnchor=Z(this.store.hover,this.drawingLine.calculative.worldAnchors[0]),this.drawingLine.autoTo=!0,e.connectTo=this.store.hover.id,e.anchorId=this.store.hoverAnchor.id,t&&et(this.store.pens[this.store.hover.id],this.drawingLine.id,e.id,this.store.hoverAnchor.id)),!t&&this.store.hoverAnchor&&this.drawingLine){const t=this.drawingLine.calculative.worldAnchors[this.drawingLine.calculative.worldAnchors.length-1];return t.x=this.store.hoverAnchor.x,t.y=this.store.hoverAnchor.y,t.connectTo=this.store.hover.id,t.anchorId=this.store.hoverAnchor.id,et(this.store.pens[this.store.hover.id],this.drawingLine.id,t.id,this.store.hoverAnchor.id),this.drawline(),void this.finishDrawline(!0)}}if(this.hoverType&&this.hoverType{this.activeInitPos.push({x:(t.calculative.worldRect.x-this.activeRect.x)/this.activeRect.width,y:(t.calculative.worldRect.y-this.activeRect.y)/this.activeRect.height})}))}this.store.emitter.emit("mousedown",{x:t.x,y:t.y,pen:this.store.hover}),this.render()}}else this.setAnchor(t)},this.onMouseMove=t=>{if(this.store.data.locked!==s.Disable)if(!this.mouseDown||this.mouseDown.restore||1===t.buttons||2===t.buttons){if(this.lastMouseTime){if(performance.now()-this.lastMouseTime<50)return void(this.lastMouseTime=0);this.lastMouseTime=0}if(t.x-=this.bounding.left||this.bounding.x,t.y-=this.bounding.top||this.bounding.y,this.calibrateMouse(t),this.mousePos.x=t.x,this.mousePos.y=t.y,this.magnifier)this.render(1/0);else{if(this.mouseDown&&(this.mouseRight===g.Down&&(this.mouseRight=g.Translate),(this.store.data.locked===s.DisableEdit||t.ctrlKey&&!this.hoverType||this.hotkeyType===y.Translate||this.mouseRight===g.Translate)&&this.translateX&&this.translateY&&!this.store.options.disableTranslate&&(!this.store.data.locked||this.mouseRight===g.Translate||this.store.data.locked1&&(t=this.drawingLine.calculative.worldAnchors[this.drawingLine.calculative.worldAnchors.length-1],it(this.store.pens[t.connectTo],this.drawingLine.id,t.id,t.anchorId)),t?(t.prev=void 0,t.next=void 0,t.id||(t.id=Ht()),t.x=e.x,t.y=e.y,t.connectTo=void 0):(t={...e},this.drawingLine.calculative.worldAnchors.push(t)),this.hoverType&&this.hoverType=r||Math.abs(i)>=r)||(this.alreadyCopy=!0,this.willInactivePen=void 0),1===this.store.active.length&&(this.store.data.locked!==s.DisableMove&&this.store.active[0].locked!==s.DisableMove||this.store.active[0]?.onMouseMove&&this.store.active[0].onMouseMove(this.store.active[0],this.mousePos)),void this.movePens(t)}if(!this.store.active[0]?.locked){if(this.hoverType===v.LineAnchor)return this.getAnchorDock(t),void this.moveLineAnchor(t);if(this.hoverType===v.LineAnchorPrev)return void this.moveLineAnchorPrev(t);if(this.hoverType===v.LineAnchorNext)return void this.moveLineAnchorNext(t)}if(!this.dragRect)return}window&&window.debug&&console.time("hover"),this.willGetHover(t),window&&window.debug&&console.timeEnd("hover"),this.hotkeyType===y.AddAnchor&&(this.dirty=!0),this.render()}}else this.onMouseUp(t);else this.hoverType=v.None},this.hoverTimer=0,this.onMouseUp=t=>{if(this.store.data.locked!==s.Disable){if(t.x-=this.bounding.left||this.bounding.x,t.y-=this.bounding.top||this.bounding.y,this.mouseRight===g.Down&&(console.log("contextmenu on core"),this.store.emitter.emit("contextmenu",{e:t,bounding:this.bounding})),this.mouseRight=g.None,this.calibrateMouse(t),this.mousePos.x=t.x,this.mousePos.y=t.y,this.pencil&&this.finishPencil(),this.hoverType&&this.hoverType1){const t=this.drawingLine.calculative.worldAnchors[this.drawingLine.calculative.worldAnchors.length-1];return t.connectTo=this.store.hover.id,t.anchorId=this.store.hoverAnchor.id,et(this.store.pens[this.store.hover.id],this.drawingLine.id,t.id,t.anchorId),void this.finishDrawline(!0)}if(this.mouseDown&&this.hoverType===v.LineAnchor&&this.store.hover&&this.store.active[0]&&this.store.active[0]!==this.store.hover){const t=this.store.active[0],e=nt(t),i=ot(t);this.store.hoverAnchor?(e===this.store.activeAnchor?t.autoFrom=void 0:t.autoTo=void 0,this.store.activeAnchor.x=this.store.hoverAnchor.x,this.store.activeAnchor.y=this.store.hoverAnchor.y,this.store.activeAnchor.prev=void 0,this.store.activeAnchor.next=void 0,this.store.activeAnchor.connectTo=this.store.hover.id,et(this.store.pens[this.store.activeAnchor.connectTo],this.store.activeAnchor.penId,this.store.activeAnchor.id,this.store.activeAnchor.anchorId),this[t.lineName]&&this[t.lineName](this.store,t),this.store.path2dMap.set(t,L.path2dDraws.line(t)),this.initLineRect(t)):e===this.store.activeAnchor&&t.autoFrom?this.calcAutoAnchor(t,e,this.store.hover):i===this.store.activeAnchor&&t.autoTo&&this.calcAutoAnchor(t,i,this.store.hover)}if(this.addCaches&&(this.store.data.locked||this.dropPens(this.addCaches,t),this.addCaches=void 0),this.hoverType===v.Rotate&&(this.getSizeCPs(),this.store.active.forEach((t=>{t.rotate=t.calculative.rotate}))),this.dirtyLines.forEach((t=>{t.type&&this.initLineRect(t)})),this.dirtyLines.clear(),this.dragRect){const t=this.store.data.pens.filter((t=>0!=t.visible&&t.locked!==s.Disable&&!t.parentId&&St(t.calculative.worldRect,this.dragRect,this.store.options.dragAllIn)));this.active(t)}if(2!==t.button&&this.mouseDown&&(T(this.mouseDown,t)<2&&(this.store.hover&&this.store.hover.input&&this.showInput(this.store.hover),this.store.emitter.emit("click",{x:t.x,y:t.y,pen:this.store.hover})),this.store.hover&&this.store.emitter.emit("mouseup",{x:t.x,y:t.y,pen:this.store.hover})),this.willInactivePen&&(this.willInactivePen.calculative.active=void 0,lt(this.willInactivePen,!1),this.store.active.splice(this.store.active.findIndex((t=>t===this.willInactivePen)),1),this.calcActiveRect(),this.willInactivePen=void 0,this.store.emitter.emit("inactive",[this.willInactivePen]),this.render(1/0)),this.mouseDown=void 0,this.lastOffsetX=0,this.lastOffsetY=0,this.clearDock(),this.dragRect=void 0,this.initActiveRect=void 0,this.movingPens){if(this.alreadyCopy)this.copy(this.store.active.map(((t,e)=>{const{x:i,y:r}=this.movingPens[e];return{...t,x:i,y:r}}))),this.pasteOffset=0,this.paste(),this.alreadyCopy=!1;else{const t=H(this.store.active);this.store.active.forEach(((t,e)=>{const{x:i,y:r}=this.movingPens[e];Object.assign(t,{x:i,y:r}),t.onMove&&t.onMove(t),this.dirtyPenRect(t),this.updateLines(t)})),this.pushHistory({type:N.Update,pens:H(this.store.active),initPens:t})}this.movingPens=void 0}}else this.hoverType=v.None},this.clearDock=()=>{const t=this.dock?.xDock?.penId,e=this.dock?.yDock?.penId,i=this.store.pens[t];i&&(i.calculative.isDock=!1);const r=this.store.pens[e];r&&(r.calculative.isDock=!1),this.dock=void 0},this.onResize=()=>{this.timer&&clearTimeout(this.timer),this.timer=setTimeout((()=>{this.resize(),this.timer=void 0}),100)},this.onScroll=()=>{this.timer&&clearTimeout(this.timer),this.timer=setTimeout((()=>{this.bounding=this.canvas.getBoundingClientRect(),this.timer=void 0}),100)},this.calibrateMouse=t=>(t.x-=this.store.data.x,t.y-=this.store.data.y,t),this.getHover=t=>{if(this.dragRect)return;let e=v.None;this.store.hover=void 0,this.store.hoverAnchor=void 0,this.store.pointAt=void 0,this.store.pointAtIndex=void 0;const i=1===this.store.active.length&&this.store.active[0].type;if(!this.drawingLineName&&this.activeRect&&!i&&!this.store.data.locked){const i=dt(this.store.active),r=pt(this.store.active)||this.store.options.disableRotate,n=ft(this.store.active)||this.store.options.disableSize;if(!i&&!r){const i={x:this.activeRect.center.x,y:this.activeRect.y-30};this.activeRect.rotate&&k(i,this.activeRect.rotate,this.activeRect.center),!this.hotkeyType&&A(t,i,this.pointSize)&&(e=v.Rotate,this.externalElements.style.cursor=`url("${this.store.options.rotateCursor}"), auto`)}if(!(this.hotkeyType&&this.hotkeyType!==y.Resize||i||n))for(let i=0;i<4;i++)if(A(t,this.sizeCPs[i],this.pointSize)){let t=m,r=0;Math.abs(this.activeRect.rotate%90-45)<25?(t=x,r=Math.round((this.activeRect.rotate-45)/90)):r=Math.round(this.activeRect.rotate/90),e=v.Resize,this.resizeIndex=i,this.externalElements.style.cursor=t[(i+r)%4];break}if(this.hotkeyType===y.Resize&&!i&&!n)for(let i=4;i<8;i++)if(A(t,this.sizeCPs[i],this.pointSize)){let t=x,r=0;Math.abs(this.activeRect.rotate%90-45)<25?(t=m,r=Math.round((this.activeRect.rotate-45)/90)+1):r=Math.round(this.activeRect.rotate/90),e=v.Resize,this.resizeIndex=i,this.externalElements.style.cursor=t[(i+r)%4];break}}e===v.None&&(e=this.inPens(t,this.store.active),e===v.None&&(e=this.inPens(t,this.store.data.pens))),e||i||!xt(t,this.activeRect)||(e=v.Node,this.externalElements.style.cursor="move"),this.hoverType=e,e===v.None&&(this.drawingLineName||this.pencil?this.externalElements.style.cursor="crosshair":this.mouseDown||(this.externalElements.style.cursor="default"),this.store.hover=void 0),this.store.lastHover!==this.store.hover&&(this.dirty=!0,this.store.lastHover&&(this.store.lastHover.calculative.hover=!1,ht(q(this.store.lastHover,!0)||this.store.lastHover,!1),this.store.emitter.emit("leave",this.store.lastHover),this.tooltip.hide()),this.store.hover&&(this.store.hover.calculative.hover=!0,ht(q(this.store.hover,!0)||this.store.hover),this.store.emitter.emit("enter",this.store.hover),this.tooltip.show(this.store.hover,t)),this.store.lastHover=this.store.hover),this.store.hover?.onMouseMove&&this.store.hover.onMouseMove(this.store.hover,this.mousePos)},this.inPens=(t,e)=>{let i=v.None;for(let r=e.length-1;r>=0;--r){const n=e[r];if(0==n.visible||0==n.calculative.inView||n.locked===s.Disable)continue;let o=4;if(n.lineWidth&&(o+=n.lineWidth/2),n.calculative.active||bt(t,n.calculative.worldRect,o)||xt(t,n.calculative.worldRect)){if(!this.store.data.locked&&this.hotkeyType!==y.Resize){if(n.calculative.worldAnchors)for(const e of n.calculative.worldAnchors)if(i=this.inAnchor(t,n,e),i)break;if(i)break}if(n.type){const e=Zt(t,n);if(e){this.store.data.locked||n.locked?this.externalElements.style.cursor=this.store.options.hoverCursor:this.hotkeyType===y.AddAnchor?this.externalElements.style.cursor="pointer":this.externalElements.style.cursor="move",this.store.hover=n,this.store.pointAt=e.point,this.store.pointAtIndex=e.i,i=v.Line;break}}else{if(n.children){const e=[];if(n.children.forEach((t=>{e.push(this.store.pens[t])})),i=this.inPens(t,e),i)break}if(xt(t,n.calculative.worldRect)){this.store.data.locked||n.locked?this.externalElements.style.cursor=this.store.options.hoverCursor:this.hotkeyType===y.AddAnchor?this.externalElements.style.cursor="pointer":this.externalElements.style.cursor="move",this.store.hover=n,i=v.Node,this.store.pointAt=t;break}}}}return i},this.getAnchorDock=t=>{this.store.hover=void 0;let e=v.None;for(let i=this.store.data.pens.length-1;i>=0;--i){const r=this.store.data.pens[i];if(0==r.visible||r.locked===s.Disable||r===this.store.active[0])continue;let n=4;if(r.lineWidth&&(n+=r.lineWidth/2),bt(t,r.calculative.worldRect,n)&&(this.store.hover=r,this.hotkeyType!==y.Resize)){if(r.calculative.worldAnchors)for(const i of r.calculative.worldAnchors)if(e=this.inAnchor(t,r,i),e)break;if(e)break}}},this.render=t=>{if(t===1/0&&(this.dirty=!0,t=performance.now()),!this.dirty)return;if(null==t&&(t=performance.now()),t-this.lastRender{const t=this.offscreen.getContext("2d");t.save(),t.strokeStyle=this.store.data.color||this.store.options.color;const e={x:0,y:0,ex:this.width,ey:this.height,width:this.width,height:this.height};for(const i of this.store.data.pens){if(isFinite(i.x)||console.warn(i,"画笔的 x 不合法"),i.parentId){const t=this.store.pens[i.parentId],e=t?.calculative?.showChild;if(null!=e&&t.children[e]!==i.id){i.calculative.inView=!1;continue}}if(0==i.visible||0==i.calculative.visible){i.calculative.inView=!1;continue}const r=i.calculative.worldRect.x+this.store.data.x,n=i.calculative.worldRect.y+this.store.data.y;St({x:r,y:n,width:i.calculative.worldRect.width,height:i.calculative.worldRect.height,ex:r+i.calculative.worldRect.width,ey:n+i.calculative.worldRect.height,rotate:i.calculative.worldRect.rotate},e)?(i.calculative.inView=!0,K(t,i)):i.calculative.inView=!1}this.drawingLine&&K(t,this.drawingLine),this.pencilLine&&K(t,this.pencilLine),this.movingPens&&this.movingPens.forEach((e=>{K(t,e)})),t.restore()},this.renderBorder=()=>{if(!this.store.data.locked&&this.activeRect&&(1!==this.store.active.length||!this.store.active[0].type)&&!this.movingPens){const t=this.offscreen.getContext("2d");if(t.save(),t.translate(.5,.5),this.activeRect.rotate&&(t.translate(this.activeRect.center.x,this.activeRect.center.y),t.rotate(this.activeRect.rotate*Math.PI/180),t.translate(-this.activeRect.center.x,-this.activeRect.center.y)),t.strokeStyle=this.store.options.activeColor,t.globalAlpha=.3,t.beginPath(),t.strokeRect(this.activeRect.x,this.activeRect.y,this.activeRect.width,this.activeRect.height),t.globalAlpha=1,dt(this.store.active)||pt(this.store.active)||this.store.options.disableRotate)return void t.restore();t.beginPath(),t.moveTo(this.activeRect.center.x,this.activeRect.y),t.lineTo(this.activeRect.center.x,this.activeRect.y-30),t.stroke(),t.beginPath(),t.strokeStyle=this.store.options.activeColor,t.fillStyle="#ffffff",t.arc(this.activeRect.center.x,this.activeRect.y-30,5,0,2*Math.PI),t.fill(),t.stroke(),t.restore()}},this.renderHoverPoint=()=>{if(this.store.data.locked)return;const t=this.offscreen.getContext("2d");if(t.save(),t.translate(.5,.5),this.store.hover&&(this.hotkeyType!==y.Resize||1!==this.store.active.length||this.store.active[0]!==this.store.hover)){const e=[...this.store.hover.calculative.worldAnchors];this.store.pointAt&&this.hotkeyType===y.AddAnchor&&e.push(this.store.pointAt),e&&(t.strokeStyle=this.store.hover.anchorColor||this.store.options.anchorColor,t.fillStyle=this.store.hover.anchorBackground||this.store.options.anchorBackground,e.forEach((e=>{if(e===this.store.hoverAnchor){t.save();const e=this.store.hover.hoverAnchorColor||this.store.options.hoverAnchorColor;t.strokeStyle=e,t.fillStyle=e}t.beginPath();let i=e.radius||this.store.hover.anchorRadius||this.store.options.anchorRadius;this.store.hover.type&&(i=3,this.store.hover.calculative.lineWidth>3&&(i=this.store.hover.calculative.lineWidth)),t.arc(e.x,e.y,i,0,2*Math.PI),this.store.hover.type&&this.store.hoverAnchor===e?(t.save(),t.strokeStyle=this.store.hover.activeColor||this.store.options.activeColor,t.fillStyle=t.strokeStyle):(e.color||e.background)&&(t.save(),t.strokeStyle=e.color,t.fillStyle=e.background),t.fill(),t.stroke(),e===this.store.hoverAnchor&&t.restore(),(this.store.hover.type&&this.store.hoverAnchor===e||e.color||e.background)&&t.restore()})))}this.hotkeyType===y.AddAnchor||this.movingPens||!this.activeRect||1===this.store.active.length&&this.store.active[0].type||dt(this.store.active)||ft(this.store.active)||this.store.options.disableSize||(t.strokeStyle=this.store.options.activeColor,t.fillStyle="#ffffff",this.sizeCPs.forEach(((e,i)=>{this.activeRect.rotate&&(t.save(),t.translate(e.x,e.y),t.rotate(this.activeRect.rotate*Math.PI/180),t.translate(-e.x,-e.y)),(i<4||this.hotkeyType===y.Resize)&&(t.beginPath(),t.fillRect(e.x-4.5,e.y-4.5,8,8),t.strokeRect(e.x-5.5,e.y-5.5,10,10)),this.activeRect.rotate&&t.restore()}))),!this.store.data.locked&&this.dragRect&&(t.save(),t.fillStyle=W(this.store.options.dragColor,.2),t.strokeStyle=this.store.options.dragColor,t.beginPath(),t.strokeRect(this.dragRect.x,this.dragRect.y,this.dragRect.width,this.dragRect.height),t.fillRect(this.dragRect.x,this.dragRect.y,this.dragRect.width,this.dragRect.height),t.restore()),this.dock&&(t.strokeStyle=this.store.options.dockColor,this.dock.xDock&&(t.beginPath(),t.moveTo(this.dock.xDock.x,this.dock.xDock.y),t.lineTo(this.dock.xDock.x,this.dock.xDock.prev.y),t.stroke()),this.dock.yDock&&(t.beginPath(),t.moveTo(this.dock.yDock.x,this.dock.yDock.y),t.lineTo(this.dock.yDock.prev.x,this.dock.yDock.y),t.stroke())),t.restore()},this.ondblclick=t=>{!this.store.hover||this.store.data.locked||this.store.options.disableInput||(this.store.hover.onShowInput?this.store.hover.onShowInput(this.store.hover,t):this.showInput(this.store.hover)),this.store.emitter.emit("dblclick",{x:t.x,y:t.y,pen:this.store.hover})},this.showInput=(t,e,i="transparent")=>{if(!this.store.hover||this.store.hover.locked||this.store.hover.externElement||this.store.hover.disableInput)return;if(this.input.dataset.penId===t.id)return void this.input.focus();const r=e||t.calculative.worldTextRect;this.input.value=t.calculative.tempText||t.text||"",this.inputParent.style.left=r.x+this.store.data.x+5+"px",this.inputParent.style.top=r.y+this.store.data.y+5+"px",this.inputParent.style.width=r.width-10+"px",this.inputParent.style.height=r.height-10+"px",this.inputParent.style.zIndex="1000",this.inputParent.style.background=i,t.rotate%360?this.inputParent.style.transform=`rotate(${t.rotate}deg)`:this.inputParent.style.transform=null,this.inputParent.style.display="flex",this.input.dataset.penId=t.id,this.input.readOnly=t.disableInput,t.dropdownList&&"block"!==this.dropdown.style.display?this.setDropdownList():this.inputRight.style.display="none",this.input.focus(),t.calculative.text="",this.render(1/0)},this.hideInput=()=>{if("flex"===this.inputParent.style.display){this.inputParent.style.display="none";const t=this.store.pens[this.input.dataset.penId];if(!t)return;t.calculative.text=t.text,t.onInput?t.onInput(t,this.input.value):t.text!==this.input.value&&(this.initPens=[H(t)],t.text=this.input.value,t.calculative.text=t.text,this.input.dataset.penId=void 0,B(t),this.dirty=!0,this.pushHistory({type:N.Update,pens:[H(t)],initPens:this.initPens}),this.store.emitter.emit("valueUpdate",t))}this.input.dataset.penId=void 0,this.dropdown.style.display="none"},this.setDropdownList=t=>{this.clearDropdownList(),this.dropdown.style.display="block",this.inputRight.style.display="block",setTimeout((()=>{this.inputRight.style.transform="rotate(315deg)"}));const e=this.store.pens[this.input.dataset.penId];if(!e||!e.dropdownList)return this.dropdown.style.display="none",this.inputRight.style.display="none",void(this.inputRight.style.transform="rotate(135deg)");if(!e.dropdownList.length){const t=document.createElement("div");return t.innerText="None",t.style.padding="5px 12px",t.style.color="#ddd",void this.dropdown.appendChild(t)}const i=this.input.value;let r=0;for(const n of e.dropdownList){if(t&&i){if((n.text||n+"").indexOf(i)>-1){const t=document.createElement("li");t.innerText=n.text||n,t.dataset.l="1",t.dataset.i=r+"",t.onclick=this.selectDropdown,this.dropdown.appendChild(t)}}else{const t=document.createElement("li");t.innerText=n.text||n,t.dataset.l="1",t.dataset.i=r+"",t.onclick=this.selectDropdown,this.dropdown.appendChild(t)}++r}if(!this.dropdown.hasChildNodes()){const t=document.createElement("div");t.innerText="None",t.style.padding="5px 12px",t.style.color="#ddd",this.dropdown.appendChild(t)}},this.selectDropdown=t=>{const e=t.target,i=this.store.pens[this.input.dataset.penId];if(!e||!i||!i.dropdownList)return;const r=+e.dataset.i;if(i.dropdownList[r]){if(this.initPens=[H(i)],"object"==typeof i.dropdownList[r]){const t=this.getPenRect(i);this.updateValue(i,{...t,...i.dropdownList[r]}),i.calculative.text="",this.calcActiveRect()}else i.text=i.dropdownList[r]+"";this.input.value=i.text,this.dropdown.style.display="none",this.inputRight.style.transform="rotate(135deg)",this.pushHistory({type:N.Update,pens:[H(i)],initPens:this.initPens}),this.render(1/0),this.store.emitter.emit("valueUpdate",i)}},e.appendChild(this.canvas),this.canvas.style.backgroundRepeat="no-repeat",this.canvas.style.backgroundSize="100% 100%",this.externalElements.style.position="absolute",this.externalElements.style.left="0",this.externalElements.style.top="0",this.externalElements.style.outline="none",this.externalElements.style.background="transparent",e.style.position="relative",e.appendChild(this.externalElements),this.createInput(),this.magnifierScreen.width=this.magnifierSize+5,this.magnifierScreen.height=this.magnifierSize+5,this.tooltip=new Ze(e),this.store.options.scroll&&(this.scroll=new ti(this)),this.store.dpiRatio=window?window.devicePixelRatio:1,this.store.dpiRatio<1?this.store.dpiRatio=1:this.store.dpiRatio>1&&this.store.dpiRatio<1.5&&(this.store.dpiRatio=1.5),this.bounding=this.externalElements.getBoundingClientRect(),this.listen(),this.curve=zt,this.polyline=ne,this.mind=$t,this.line=Xt,window&&window.addEventListener("resize",this.onResize),window&&window.addEventListener("scroll",this.onScroll)}listen(){switch(this.externalElements.addEventListener("gesturestart",this.onGesturestart),this.externalElements.ondragover=t=>t.preventDefault(),this.externalElements.ondrop=this.ondrop,this.externalElements.oncontextmenu=t=>t.preventDefault(),Xe()?(this.store.options.interval=50,this.externalElements.ontouchstart=this.ontouchstart,this.externalElements.ontouchmove=this.ontouchmove,this.externalElements.ontouchend=this.ontouchend):(this.externalElements.onmousedown=t=>{!t.target.dataset.l&&this.onMouseDown({x:t.x,y:t.y,ctrlKey:t.ctrlKey||t.metaKey,shiftKey:t.shiftKey,altKey:t.altKey,buttons:t.buttons})},this.externalElements.onmousemove=t=>{this.onMouseMove({x:t.x,y:t.y,ctrlKey:t.ctrlKey||t.metaKey,shiftKey:t.shiftKey,altKey:t.altKey,buttons:t.buttons})},this.externalElements.onmouseup=t=>{this.onMouseUp({x:t.x,y:t.y,ctrlKey:t.ctrlKey||t.metaKey,shiftKey:t.shiftKey,altKey:t.altKey,buttons:t.buttons,button:t.button})}),this.externalElements.ondblclick=this.ondblclick,this.externalElements.tabIndex=0,this.externalElements.onblur=()=>{this.mouseDown=void 0},this.externalElements.onwheel=this.onwheel,this.store.options.keydown){case M.Document:document.addEventListener("keydown",this.onkeydown),document.addEventListener("keyup",this.onkeyup);break;case M.Canvas:this.externalElements.addEventListener("keydown",this.onkeydown),this.externalElements.addEventListener("keyup",this.onkeyup)}}translateMovingAnchor(t,e){this.movingAnchor.x+=t,this.movingAnchor.y+=e;const i=this.movingAnchor.penId;if(i){const t=this.store.pens[i],e=t.calculative.worldRect;this.movingAnchor.xe.ex&&(this.movingAnchor.x=e.ex),this.movingAnchor.ye.ey&&(this.movingAnchor.y=e.ey);const r=Lt(this.movingAnchor,e),n=t.anchors.findIndex((t=>t.id===this.movingAnchor.id));t.anchors[n]=r,this.dirty=!0}}async fileToPen(t){let e="";return e=this.store.options.uploadFn?await this.store.options.uploadFn(t):this.store.options.uploadUrl?await async function(t,e,i,r){const n=new FormData;if(n.append("file",t),i)for(const t in i)n.append(t,i[t]);const o=await fetch(e,{method:"POST",headers:r,body:n});return(await o.json()).url}(t,this.store.options.uploadUrl,this.store.options.uploadParams,this.store.options.uploadHeaders):await async function(t){return new Promise(((e,i)=>{const r=new FileReader;r.onload=t=>{e(t.target.result)},r.onerror=t=>{i(t)},r.readAsDataURL(t)}))}(t),new Promise(((t,i)=>{const r=new Image;r.onload=()=>{L.htmlElements[e]=r,t({width:r.width,height:r.height,name:"image",image:e})},r.onerror=t=>{i(t)},r.src=e}))}dropPens(t,e){for(const e of t)!e.parentId&&Array.isArray(e.children)&&e.children.length>0&&this.randomCombineId(e,t);for(const e of t)e.id||(e.id=Ht()),!e.calculative&&(e.calculative={canvas:this}),this.store.pens[e.id]=e;for(const i of t)i.parentId||(i.width*=this.store.data.scale,i.height*=this.store.data.scale,i.x=e.x-i.width/2,i.y=e.y-i.height/2);this.addPens(t,!0),this.active(t.filter((t=>!t.parentId))),this.render(),this.externalElements.focus()}randomCombineId(t,e,i){mt(t),t.parentId=i;const r=[];if(Array.isArray(t.children))for(const i of t.children){const n=e.find((t=>t.id===i));n&&r.push(this.randomCombineId(n,e,t.id).id)}return t.children=r,t}addPens(t,e){const i=[];for(let e of t)this.beforeAddPen&&1!=this.beforeAddPen(e)||(this.makePen(e),i.push(e));return this.render(1/0),this.store.emitter.emit("add",i),e&&this.pushHistory({type:N.Add,pens:H(i,!0)}),i}willGetHover(t){const e=performance.now();e-this.hoverTimer>40&&(this.hoverTimer=e,this.getHover(t))}inactive(t){this.store.active.length&&(this.store.active.forEach((t=>{t.calculative.active=void 0,t.calculative.activeAnchor=void 0,lt(t,!1)})),!t&&this.store.emitter.emit("inactive",this.store.active),this.store.active=[],this.activeRect=void 0,this.sizeCPs=void 0,this.store.activeAnchor=void 0,this.dirty=!0)}active(t,e=!0){if(this.store.active)for(const t of this.store.active)t.calculative.active=void 0,lt(t,!1);this.store.active=[],t.forEach((t=>{t.calculative.active=!0,lt(t)})),this.store.active.push(...t),this.calcActiveRect(),this.dirty=!0,e&&this.store.emitter.emit("active",this.store.active)}getSizeCPs(){this.sizeCPs=kt(this.activeRect);let t={x:this.activeRect.x+.5*this.activeRect.width,y:this.activeRect.y};k(t,this.activeRect.rotate,this.activeRect.center),this.sizeCPs.push(t),t={x:this.activeRect.ex,y:this.activeRect.y+.5*this.activeRect.height},k(t,this.activeRect.rotate,this.activeRect.center),this.sizeCPs.push(t),t={x:this.activeRect.x+.5*this.activeRect.width,y:this.activeRect.ey},k(t,this.activeRect.rotate,this.activeRect.center),this.sizeCPs.push(t),t={x:this.activeRect.x,y:this.activeRect.y+.5*this.activeRect.height},k(t,this.activeRect.rotate,this.activeRect.center),this.sizeCPs.push(t)}inAnchor(t,e,i){if(this.store.hoverAnchor=void 0,this.movingAnchor=void 0,!i)return v.None;if(A(t,i,this.pointSize))return i!==this.store.hoverAnchor&&(this.dirty=!0),this.store.hoverAnchor=i,this.store.hover=e,e.type?i.connectTo&&!e.calculative.active?(this.store.hover=this.store.pens[i.connectTo],this.store.hoverAnchor=this.store.hover.calculative.worldAnchors.find((t=>t.id===i.anchorId)),this.externalElements.style.cursor="crosshair",v.NodeAnchor):(this.hotkeyType===y.AddAnchor?this.externalElements.style.cursor="vertical-text":this.externalElements.style.cursor="pointer",v.LineAnchor):(this.hotkeyType===y.AddAnchor?this.externalElements.style.cursor="vertical-text":this.externalElements.style.cursor="crosshair",v.NodeAnchor);if(!this.mouseDown&&e.type){if(e.calculative.active&&i.prev&&A(t,i.prev,this.pointSize))return this.store.hoverAnchor=i,this.store.hover=e,this.externalElements.style.cursor="pointer",v.LineAnchorPrev;if(e.calculative.active&&i.next&&A(t,i.next,this.pointSize))return this.store.hoverAnchor=i,this.store.hover=e,this.externalElements.style.cursor="pointer",v.LineAnchorNext}return v.None}resize(t,e){t=t||this.parentElement.clientWidth,e=e||this.parentElement.clientHeight,this.width=t,this.height=e,this.canvas.style.width=t+"px",this.canvas.style.height=e+"px",this.externalElements.style.width=t+"px",this.externalElements.style.height=e+"px",t=t*this.store.dpiRatio|0,e=e*this.store.dpiRatio|0,this.canvas.width=t,this.canvas.height=e,this.offscreen.width=t,this.offscreen.height=e,this.bounding=this.externalElements.getBoundingClientRect(),this.canvas.getContext("2d").scale(this.store.dpiRatio,this.store.dpiRatio),this.offscreen.getContext("2d").scale(this.store.dpiRatio,this.store.dpiRatio),this.offscreen.getContext("2d").textBaseline="middle",this.render(1/0)}clearCanvas(){this.activeRect=void 0,this.sizeCPs=void 0,this.canvas.getContext("2d").clearRect(0,0,this.canvas.width,this.canvas.height),this.offscreen.getContext("2d").clearRect(0,0,this.offscreen.width,this.offscreen.height)}addPen(t,e){if(!this.beforeAddPen||1==this.beforeAddPen(t))return this.makePen(t),this.active([t]),this.render(),this.store.emitter.emit("add",[t]),e&&this.pushHistory({type:N.Add,pens:[t]}),t}pushHistory(t){this.store.data.locked||(t.type!==N.Update&&t.pens&&t.pens.forEach((t=>{t.calculative.layer=this.store.data.pens.findIndex((e=>e.id===t.id))})),this.store.historyIndex1;){const t=this.store.histories[this.store.historyIndex--];this.doEditAction(t,!0),e--}}redo(){if(this.store.data.locked||null==this.store.historyIndex||this.store.historyIndex>this.store.histories.length-2)return;const t=this.store.histories[++this.store.historyIndex];this.doEditAction(t,!1);let e=t.step;for(;e>1;){const t=this.store.histories[++this.store.historyIndex];this.doEditAction(t,!1),e--}}doEditAction(t,e){switch(this.inactive(),this.store.hoverAnchor=void 0,this.store.hover=void 0,t.type){case N.Add:t.pens.forEach((t=>{const e=this.store.data.pens.findIndex((e=>e.id===t.id));e>-1&&(this.store.data.pens.splice(e,1),this.store.pens[t.id]=void 0)})),t.type=N.Delete;break;case N.Update:(e?t.initPens:t.pens).forEach((t=>{const e=this.store.data.pens.findIndex((e=>e.id===t.id));if(e>-1){t.calculative=this.store.data.pens[e].calculative,this.store.data.pens[e]=t,this.store.pens[t.id]=t;for(const e in t)"object"==typeof t[e]&&"lineDash"!==e||(t.calculative[e]=t[e]);t.calculative.image=void 0,this.dirtyPenRect(t),this.updateLines(t,!0)}}));break;case N.Delete:t.pens.forEach((t=>{this.store.data.pens.splice(t.calculative.layer,0,t),this.store.pens[t.id]=t,t.calculative.canvas||(t.calculative.canvas=this,L.path2dDraws[t.name]&&this.store.path2dMap.set(t,L.path2dDraws[t.name](t)))})),t.type=N.Add}this.render(1/0),this.store.emitter.emit(e?"undo":"redo",t)}makePen(t){t.id||(t.id=Ht()),this.store.data.pens.push(t),this.store.pens[t.id]=t,t.path&&(t.pathId||(t.pathId=Ht()),L.paths[t.pathId]||(L.paths[t.pathId]=t.path),t.path=void 0),t.lineWidth||0===t.lineWidth||(t.lineWidth=1);const{fontSize:e,lineHeight:i}=this.store.options;t.fontSize||(t.fontSize=e),t.lineHeight||(t.lineHeight=i),t.calculative={canvas:this},(t.video||t.audio)&&(t.calculative.onended=t=>{this.nextAnimate(t)});for(const e in t)"object"==typeof t[e]&&"lineDash"!==e||(t.calculative[e]=t[e]);t.calculative.image=void 0,t.calculative.backgroundImage=void 0,t.calculative.strokeImage=void 0,!t.anchors&&L.anchors[t.name]&&(t.anchors||(t.anchors=[]),L.anchors[t.name](t)),this.dirtyPenRect(t),t.type?this.initLineRect(t):t.anchors||(t.anchors=[],t.calculative.worldAnchors.forEach((e=>{const i={id:e.id,penId:t.id,x:(e.x-t.calculative.worldRect.x)/t.calculative.worldRect.width,y:(e.y-t.calculative.worldRect.y)/t.calculative.worldRect.height};t.anchors.push(i)}))),!t.rotate&&(t.rotate=0),this.loadImage(t)}drawline(t){this.drawingLine&&(this[this.drawingLineName]&&this[this.drawingLineName](this.store,this.drawingLine,t),this.store.path2dMap.set(this.drawingLine,L.path2dDraws.line(this.drawingLine)),this.dirty=!0)}initLineRect(t){const e=Gt(t);t.parentId||(t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height);const{fontSize:i,lineHeight:r}=this.store.options;t.fontSize||(t.fontSize=i,t.calculative.fontSize=t.fontSize*this.store.data.scale),t.lineHeight||(t.lineHeight=r,t.calculative.lineHeight=t.lineHeight),Rt(e),t.calculative.worldRect=e,Y(t,e),B(t),this.store.path2dMap.set(t,L.path2dDraws[t.name](t)),t.calculative.worldAnchors&&(t.anchors=[],t.calculative.worldAnchors.forEach((e=>{t.anchors.push(Lt(e,t.calculative.worldRect))})))}drawingPencil(){this.pencil=!0,this.externalElements.style.cursor="crosshair"}stopPencil(){this.pencil=!1,this.pencilLine=void 0,this.externalElements.style.cursor="default"}finishDrawline(t){if(!this.drawingLine)return;const e=this.drawingLine.calculative.worldAnchors[0];let i=this.drawingLine.calculative.worldAnchors[this.drawingLine.calculative.worldAnchors.length-1];if(i.isTemp&&(this.drawingLine.calculative.worldAnchors.pop(),i=this.drawingLine.calculative.worldAnchors[this.drawingLine.calculative.worldAnchors.length-1]),!t&&!i.connectTo&&this.drawingLine.calculative.worldAnchors.pop(),!t&&this.drawingLine.calculative.worldAnchors[0]===this.drawingLine.calculative.activeAnchor)return this.drawingLine=void 0,void this.render(1/0);if(e.connectTo&&i.connectTo){if(this.store.options.disableRepeatLine&&this.store.data.pens.find((t=>{if(t.type){const r=t.calculative.worldAnchors[0],n=t.calculative.worldAnchors[t.calculative.worldAnchors.length-1];return P(r,e)&&P(n,i)}})))return this.drawingLine=void 0,void this.render(1/0)}else if(this.store.options.disableEmptyLine)return this.drawingLine=void 0,void this.render(1/0);const r=Gt(this.drawingLine);this.drawingLine.x=r.x,this.drawingLine.y=r.y,this.drawingLine.width=r.width,this.drawingLine.height=r.height,this.drawingLine.calculative.worldRect=r,this.drawingLine.calculative.activeAnchor=this.drawingLine.calculative.worldAnchors[this.drawingLine.calculative.worldAnchors.length-1],this.store.activeAnchor=this.drawingLine.calculative.activeAnchor,this.beforeAddPen&&!this.beforeAddPen(this.drawingLine)||(this.initLineRect(this.drawingLine),this.store.data.pens.push(this.drawingLine),this.store.pens[this.drawingLine.id]=this.drawingLine,this.store.emitter.emit("add",[this.drawingLine]),this.active([this.drawingLine]),this.pushHistory({type:N.Add,pens:[this.drawingLine]})),this.store.path2dMap.set(this.drawingLine,L.path2dDraws[this.drawingLine.name](this.drawingLine)),this.render(1/0),this.drawingLine=void 0,this.drawingLineName=void 0}finishPencil(){if(this.pencilLine){let t=se(this.pencilLine.calculative.worldAnchors,10,0,this.pencilLine.calculative.worldAnchors.length-1),e=this.pencilLine.calculative.worldAnchors[0];t.unshift({id:e.id,penId:e.penId,x:e.x,y:e.y}),e=this.pencilLine.calculative.worldAnchors[this.pencilLine.calculative.worldAnchors.length-1],t.push({id:e.id,penId:e.penId,x:e.x,y:e.y}),this.pencilLine.calculative.worldAnchors=function(t,e=.8,i=!1){if(t.length<3)return t;let r,n,o,s,a,c,l,h,u,d,p,f,v,y,g,w;const m=(t,e,i,r)=>(s=Math.sqrt(t*t+e*e),s>0?(v=t/s,g=e/s):(v=1,g=0),a=Math.sqrt(i*i+r*r),a>0?(y=i/a,w=r/a):(y=1,w=0),Math.acos(v*y+g*w));p=[],f=t.length,r=t[0],h=t[f-1],p.push({...t[0]});for(let h=0;h1&&(this.pencilLine.calculative.pencil=void 0,this.store.path2dMap.set(this.pencilLine,L.path2dDraws[this.pencilLine.name](this.pencilLine)),this.beforeAddPen&&!this.beforeAddPen(this.pencilLine)||(this.initLineRect(this.pencilLine),this.store.data.pens.push(this.pencilLine),this.store.pens[this.pencilLine.id]=this.pencilLine,this.store.emitter.emit("add",[this.pencilLine]),this.active([this.pencilLine]),this.pushHistory({type:N.Add,pens:[this.pencilLine]})),this.render(1/0)),this.pencilLine=void 0}}firefoxLoadSvg(t){const e=new Image,i=new XMLHttpRequest;i.open("GET",t.image,!0),i.onload=()=>{const r=(new DOMParser).parseFromString(i.responseText,"text/xml").getElementsByTagName("svg")[0],{width:n,height:o}=t.calculative.worldRect;r.setAttribute("width",`${n}px`),r.setAttribute("height",`${o}px`);const s="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent((new XMLSerializer).serializeToString(r))));e.src=s,e.onload=()=>{t.calculative.img=e,t.calculative.imgNaturalWidth=e.naturalWidth||t.iconWidth,t.calculative.imgNaturalHeight=e.naturalHeight||t.iconHeight,L.htmlElements[t.image]=e,this.dirty=!0,this.imageLoaded()}},i.send()}loadImage(t){if(t.image!==t.calculative.image){if(t.calculative.img=void 0,t.image)if(L.htmlElements[t.image]){const e=L.htmlElements[t.image];t.calculative.img=e,t.calculative.imgNaturalWidth=e.naturalWidth||t.iconWidth,t.calculative.imgNaturalHeight=e.naturalHeight||t.iconHeight}else if(navigator.userAgent.includes("Firefox")&&t.image.endsWith(".svg"))this.firefoxLoadSvg(t);else{const e=new Image;e.crossOrigin="anonymous",e.src=t.image,e.onload=()=>{t.calculative.img=e,t.calculative.imgNaturalWidth=e.naturalWidth||t.iconWidth,t.calculative.imgNaturalHeight=e.naturalHeight||t.iconHeight,L.htmlElements[t.image]=e,this.dirty=!0,this.imageLoaded()}}t.calculative.image=t.image}if(t.backgroundImage!==t.calculative.backgroundImage){if(t.calculative.backgroundImg=void 0,t.backgroundImage)if(L.htmlElements[t.backgroundImage]){const e=L.htmlElements[t.backgroundImage];t.calculative.backgroundImg=e}else{const e=new Image;e.crossOrigin="anonymous",e.src=t.backgroundImage,e.onload=()=>{t.calculative.backgroundImg=e,L.htmlElements[t.backgroundImage]=e,this.dirty=!0,this.imageLoaded()}}t.calculative.backgroundImage=t.backgroundImage}if(t.strokeImage!==t.calculative.strokeImage){if(t.calculative.strokeImg=void 0,t.strokeImage)if(L.htmlElements[t.strokeImage]){const e=L.htmlElements[t.strokeImage];t.calculative.strokeImg=e}else{const e=new Image;e.crossOrigin="anonymous",e.src=t.strokeImage,e.onload=()=>{t.calculative.strokeImg=e,L.htmlElements[t.strokeImage]=e,this.dirty=!0,this.imageLoaded()}}t.calculative.strokeImage=t.strokeImage}}imageLoaded(){this.imageTimer&&clearTimeout(this.imageTimer),this.imageTimer=setTimeout((()=>{this.render()}),100)}setCalculativeByScale(t){const e=this.store.data.scale;t.calculative.lineWidth=t.lineWidth*e,t.calculative.fontSize=t.fontSize*e,t.fontSize<1&&(t.calculative.fontSize=t.fontSize*t.calculative.worldRect.height),t.calculative.iconSize=t.iconSize*e,t.calculative.iconWidth=t.iconWidth*e,t.calculative.iconHeight=t.iconHeight*e,t.calculative.iconLeft=t.iconLeft*e,t.calculative.iconTop=t.iconTop*e,t.calculative.textWidth=t.textWidth*e,t.calculative.textHeight=t.textHeight*e,t.calculative.textLeft=t.textLeft*e,t.calculative.textTop=t.textTop*e,t.type===o.Line&&t.borderWidth&&(t.calculative.borderWidth=t.borderWidth*e)}dirtyPenRect(t,e,i){e?X(t):$(t),i||this.setCalculativeByScale(t),Q(t),G(this.store.pens,t),B(t),L.path2dDraws[t.name]&&this.store.path2dMap.set(t,L.path2dDraws[t.name](t)),t.calculative.dirty=!0,this.dirty=!0,t.children&&t.children.forEach((t=>{const e=this.store.pens[t];e&&this.dirtyPenRect(e)})),t.type&&this.initLineRect(t)}translate(t,e){this.store.data.x+=t*this.store.data.scale,this.store.data.y+=e*this.store.data.scale,this.store.data.x=Math.round(this.store.data.x),this.store.data.y=Math.round(this.store.data.y),this.render(1/0),this.store.emitter.emit("translate",{x:this.store.data.x,y:this.store.data.y}),this.tooltip.translate(t,e),this.scroll&&this.scroll.isShow&&this.scroll.translate(t,e),this.onMovePens()}onMovePens(){for(const t of this.store.data.pens)t.onMove&&t.onMove(t)}scale(t,e={x:0,y:0}){const{minScale:i,maxScale:r}=this.store.options;if(tr)return;this.calibrateMouse(e),this.dirty=!0;const n=t/this.store.data.scale;this.store.data.scale=t,this.store.data.center=e,S(this.store.data.origin,n,e),this.store.data.pens.forEach((t=>{t.parentId||(function(t,e,i){Pt(t.calculative.worldRect,e,i),t.calculative.initRect&&Pt(t.calculative.initRect,e,i),t.lastFrame&&t.lastFrame.width&&(t.lastFrame.width*=e),t.calculative.x&&S(t.calculative,e,i),t.type&&Q(t)}(t,n,e),this.dirtyPenRect(t,!0),t.onResize&&t.onResize(t))})),this.calcActiveRect(),this.render(1/0),this.store.emitter.emit("scale",this.store.data.scale)}rotatePens(t){this.initPens||(this.initPens=H(this.store.active)),this.activeRect.rotate=E(t,this.activeRect.center),1===this.store.active.length&&(this.lastRotate=this.store.active[0].rotate||0);const e=this.activeRect.rotate-this.lastRotate;for(let t of this.store.active){if(t.parentId)return;this.rotatePen(t,e,this.activeRect),t.onRotate&&t.onRotate(t)}this.lastRotate=this.activeRect.rotate,this.getSizeCPs(),this.render(1/0),this.store.emitter.emit("rotatePens",this.store.active),this.timer&&clearTimeout(this.timer),this.timer=setTimeout((()=>{this.timer=void 0;const t=this.store.active,e=[];for(let i of t)e.push(H(i));this.pushHistory({type:N.Update,pens:e,initPens:this.initPens}),this.initPens=void 0}),200)}resizePens(t){if(this.initPens||(this.initPens=H(this.store.active)),!this.initActiveRect)return void(this.initActiveRect=H(this.activeRect));const e=this.mouseDown.x,i=this.mouseDown.y;let r=t.x-e,n=t.y-i;const o=H(this.initActiveRect);It(o,r,n,this.resizeIndex),Rt(o),this.store.options.disableDockLine||(this.clearDock(),this.customeResizeDock?this.dock=this.customeResizeDock(this.store,o,this.store.active,this.resizeIndex):this.dock=function(t,e,i,r){return yt(t,kt(e))}(this.store,o,this.store.active,this.resizeIndex),this.dock.xDock&&(r+=this.dock.xDock.step,this.store.pens[this.dock.xDock.penId].calculative.isDock=!0),this.dock.yDock&&(n+=this.dock.yDock.step,this.store.pens[this.dock.yDock.penId].calculative.isDock=!0));const s=this.activeRect.width,a=this.activeRect.height;let c=r-this.lastOffsetX,l=n-this.lastOffsetY;this.lastOffsetX=r,this.lastOffsetY=n,t.ctrlKey&&(l=([1,3].includes(this.resizeIndex)?-1:1)*(c*a)/s),It(this.activeRect,c,l,this.resizeIndex),Rt(this.activeRect);const h=this.activeRect.width/s,u=this.activeRect.height/a;this.store.active.forEach(((t,e)=>{t.calculative.worldRect.x=this.activeInitPos[e].x*this.activeRect.width+this.activeRect.x,t.calculative.worldRect.y=this.activeInitPos[e].y*this.activeRect.height+this.activeRect.y,t.calculative.worldRect.width*=h,t.calculative.iconWidth&&(t.calculative.iconWidth*=h),t.calculative.worldRect.height*=u,t.calculative.iconHeight&&(t.calculative.iconHeight*=u),t.calculative.worldRect.ex=t.calculative.worldRect.x+t.calculative.worldRect.width,t.calculative.worldRect.ey=t.calculative.worldRect.y+t.calculative.worldRect.height,t.calculative.worldRect.center={x:t.calculative.worldRect.x+t.calculative.worldRect.width/2,y:t.calculative.worldRect.y+t.calculative.worldRect.height/2},t.onResize&&t.onResize(t),this.dirtyPenRect(t,!0),this.updateLines(t)})),this.getSizeCPs(),this.render(1/0),this.store.emitter.emit("resizePens",this.store.active),this.timer&&clearTimeout(this.timer),this.timer=setTimeout((()=>{this.timer=void 0;const t=this.store.active,e=[];for(let i of t)e.push(H(i));this.pushHistory({type:N.Update,pens:e,initPens:this.initPens}),this.initPens=void 0}),200)}movePens(t){if(!this.activeRect||this.store.data.locked)return;if(!this.initActiveRect)return void(this.initActiveRect=H(this.activeRect));this.movingPens||(this.movingPens=H(this.store.active,!0),this.movingPens.forEach((t=>{t.calculative.canvas=this;const e={globalAlpha:.5};[...p,"image","combine"].includes(t.name)&&(e.name="rectangle",e.onMove=void 0),this.updateValue(t,e),t.calculative.image=void 0,t.calculative.icon=void 0})),this.store.active.forEach((t=>{ht(t,!1)})),this.store.hover=void 0);let e=t.x-this.mouseDown.x,i=t.y-this.mouseDown.y;t.shiftKey&&!t.ctrlKey&&(e=0),t.altKey&&(i=0);const r=H(this.initActiveRect);Et(r,e,i);const n={x:r.x-this.activeRect.x,y:r.y-this.activeRect.y};this.store.options.disableDockLine||(this.clearDock(),this.customeMoveDock?this.dock=this.customeMoveDock(this.store,r,this.movingPens,n):this.dock=function(t,e,i,r){const n=H(function(t){if(1===t.length)return vt(t[0]);const e=_t(t);return vt({type:o.Node,calculative:{worldRect:e,worldAnchors:[]}})}(i));return n.forEach((t=>{t.x+=r.x,t.y+=r.y})),yt(t,n)}(this.store,0,this.movingPens,n),this.dock.xDock&&(n.x+=this.dock.xDock.step,this.store.pens[this.dock.xDock.penId].calculative.isDock=!0),this.dock.yDock&&(n.y+=this.dock.yDock.step,this.store.pens[this.dock.yDock.penId].calculative.isDock=!0)),this.translatePens(this.movingPens,n.x,n.y,!0)}moveLineAnchor(t){if(!this.activeRect||this.store.data.locked)return;this.initPens||(this.initPens=H(this.store.active)),this.store.activeAnchor&&(this.store.activeAnchor.connectTo&&it(this.store.pens[this.store.activeAnchor.connectTo],this.store.activeAnchor.penId,this.store.activeAnchor.id,this.store.activeAnchor.anchorId),this.store.activeAnchor.connectTo=void 0);let e=t.x-this.mouseDown.x,i=t.y-this.mouseDown.y,r=e-this.lastOffsetX,n=i-this.lastOffsetY;this.lastOffsetX=e,this.lastOffsetY=i,I(this.store.activeAnchor,r,n),this.store.hover&&this.store.hoverAnchor&&this.store.hoverAnchor.penId!==this.store.activeAnchor.penId?(this.store.activeAnchor.connectTo=this.store.hover.id,this.store.activeAnchor.anchorId=this.store.hoverAnchor.id,r=this.store.hoverAnchor.x-this.store.activeAnchor.x,n=this.store.hoverAnchor.y-this.store.activeAnchor.y,I(this.store.activeAnchor,r,n)):this.store.options.disableDockLine||(this.dock=function(t,e,i){let r,n,o=1/0,s=1/0;for(const a of i.data.pens)!1!==a.calculative.inView&&vt(a).forEach((i=>{if(i===e)return;const a=Math.abs(i.x-t.x);a<8&&a{this.timer=void 0;const t=this.store.active;this.store.emitter.emit("update",t);const e=[];for(let i of t)e.push(H(i));this.pushHistory({type:N.Update,pens:e,initPens:this.initPens}),this.initPens=void 0}),200)}moveLineAnchorPrev(t){if(!this.activeRect||this.store.data.locked)return;if(this.initPens||(this.initPens=H(this.store.active)),this.store.activeAnchor.prev.x=t.x,this.store.activeAnchor.prev.y=t.y,this.store.activeAnchor.next)if(this.store.activeAnchor.prevNextType){if(this.store.activeAnchor.prevNextType===R.Bilateral){const e=E(t,this.store.activeAnchor),i=E(this.prevAnchor,this.store.activeAnchor);this.store.activeAnchor.next.x=this.nextAnchor.x,this.store.activeAnchor.next.y=this.nextAnchor.y,k(this.store.activeAnchor.next,e-i,this.store.activeAnchor)}}else this.store.activeAnchor.next.x=t.x,this.store.activeAnchor.next.y=t.y,k(this.store.activeAnchor.next,180,this.store.activeAnchor);const e=this.store.active[0];this.dirtyLines.add(e),this.store.path2dMap.set(e,L.path2dDraws[e.name](e)),this.render(1/0),this.timer&&clearTimeout(this.timer),this.timer=setTimeout((()=>{this.timer=void 0;const t=this.store.active;this.store.emitter.emit("update",t);const e=[];for(let i of t)e.push(H(i));this.pushHistory({type:N.Update,pens:e,initPens:this.initPens}),this.initPens=void 0}),200)}moveLineAnchorNext(t){if(!this.activeRect||this.store.data.locked)return;if(this.initPens||(this.initPens=H(this.store.active)),this.store.activeAnchor.next.x=t.x,this.store.activeAnchor.next.y=t.y,this.store.activeAnchor.prev)if(this.store.activeAnchor.prevNextType){if(this.store.activeAnchor.prevNextType===R.Bilateral){const e=E(t,this.store.activeAnchor),i=E(this.nextAnchor,this.store.activeAnchor);this.store.activeAnchor.prev.x=this.prevAnchor.x,this.store.activeAnchor.prev.y=this.prevAnchor.y,k(this.store.activeAnchor.prev,e-i,this.store.activeAnchor)}}else this.store.activeAnchor.prev.x=t.x,this.store.activeAnchor.prev.y=t.y,k(this.store.activeAnchor.prev,180,this.store.activeAnchor);const e=this.store.active[0];this.dirtyLines.add(e),this.store.path2dMap.set(e,L.path2dDraws[e.name](e)),this.render(1/0),this.timer&&clearTimeout(this.timer),this.timer=setTimeout((()=>{this.timer=void 0;const t=this.store.active;this.store.emitter.emit("update",t);const e=[];for(let i of t)e.push(H(i));this.pushHistory({type:N.Update,pens:e,initPens:this.initPens}),this.initPens=void 0}),200)}setAnchor(t){if(this.initPens=[H(this.store.hover)],this.store.hoverAnchor)!function(t,e){if(!t||!t.calculative.worldAnchors)return;let i=t.calculative.worldAnchors.findIndex((t=>t.id===e.id));i>-1&&t.calculative.worldAnchors.splice(i,1),i=t.anchors.findIndex((t=>t.id===e.id)),i>-1&&t.anchors.splice(i,1)}(this.store.hover,this.store.hoverAnchor),this.store.hover.type&&this.initLineRect(this.store.hover),this.store.hoverAnchor=void 0,this.store.activeAnchor=void 0,this.externalElements.style.cursor="default";else if(this.store.hover)if(this.store.hover.type){this.store.activeAnchor=function(t,e,i){t.anchors||(t.anchors=[]),t.calculative.worldAnchors||(t.calculative.worldAnchors=[]);const r=function(t,e,i){let r=t.calculative.worldAnchors[i],n=t.calculative.worldAnchors[i+1];const o=e.step;let s;if(r.next&&n.prev){const e=r,i=r.next,a=n.prev,c=n,l=Kt(e,i,o),h=Kt(i,a,o),u=Kt(a,c,o),d=Kt(l,h,o),p=Kt(h,u,o);s=Kt(d,p,o),d.penId=t.id,s.prev=d,p.penId=t.id,s.next=p,r.next.x=l.x,r.next.y=l.y,n.prev.x=u.x,n.prev.y=u.y}else if(r.next||n.prev){const i=r,a=r.next||n.prev,c=n,l=Kt(i,a,o),h=Kt(a,c,o);s=e,l.penId=t.id,h.penId=t.id,s.prev=l,s.next=h,r.next=void 0,n.prev=void 0}else s=e;return s.penId=t.id,s.id=Ht(),s.prevNextType=R.Bilateral,s}(t,e,i);return t.calculative.worldAnchors.splice(i+1,0,r),t.anchors.splice(i+1,0,Lt(r,t.calculative.worldRect)),t.calculative.activeAnchor=r,r}(this.store.hover,this.store.pointAt,this.store.pointAtIndex),this.initLineRect(this.store.hover);const e={x:t.x,y:t.y};this.getHover(e)}else{const e={id:Ht(),x:t.x,y:t.y};this.store.activeAnchor=function(t,e){t.anchors||(t.anchors=[]),t.calculative.worldAnchors||(t.calculative.worldAnchors=[]);const i={id:e.id,penId:t.id,x:e.x,y:e.y};if(t.calculative.worldAnchors.push(i),t.calculative.worldRect){t.rotate%360&&k(e,-t.rotate,t.calculative.worldRect.center);const i={id:e.id,penId:t.id,x:(e.x-t.calculative.worldRect.x)/t.calculative.worldRect.width,y:(e.y-t.calculative.worldRect.y)/t.calculative.worldRect.height};t.anchors.push(i)}return i}(this.store.hover,e)}this.hotkeyType=y.None,this.render(1/0),this.store.emitter.emit("update",[this.store.hover]),this.pushHistory({type:N.Update,pens:[H(this.store.hover)],initPens:this.initPens}),this.initPens=void 0}translatePens(t,e,i,r){if(!t||t.length<1||1===t.length&&t[0].type&&t[0].anchors.findIndex((t=>t.connectTo))>-1)return!1;r||(this.initPens=H(t)),Et(this.activeRect,e,i),t.forEach((t=>{t.locked>=s.DisableMove||(t.type?(function(t,e,i){t.x+=e,t.y+=i,t.anchors&&t.anchors.forEach((t=>{I(t,e,i)})),t.calculative.worldAnchors&&t.calculative.worldAnchors.forEach((t=>{I(t,e,i)}))}(t,e,i),this.dirtyLines.add(t),this.store.path2dMap.set(t,L.path2dDraws[t.name](t))):(Et(t.calculative.worldRect,e,i),this.dirtyPenRect(t,!0),t.calculative.x=t.x,t.calculative.y=t.y,this.updateLines(t)),t.onMove&&t.onMove(t))})),this.getSizeCPs(),this.dirtyLines.forEach((t=>{r&&!t.text||t.type&&this.initLineRect(t)})),this.render(1/0),this.tooltip.translate(e,i),this.store.emitter.emit("translatePens",t),r||(this.pushHistory({type:N.Update,pens:H(t),initPens:this.initPens}),this.initPens=void 0)}calcAutoAnchor(t,e,i,r){const n=nt(t),o=ot(t),s=Z(i,e===n?o:n);e.x=s.x,e.y=s.y,e.prev=void 0,e.next=void 0,e.connectTo=i.id,r?r.anchor=s.id:i.connectedLines.push({lineId:t.id,lineAnchor:e.id,anchor:s.id}),this[t.lineName]&&this[t.lineName](this.store,t),this.store.path2dMap.set(t,L.path2dDraws.line(t)),this.initLineRect(t)}restoreNodeAnimate(t){if(t.calculative.initRect){if(t.keepAnimateState)for(const e in t)void 0!==t.calculative[e]&&("x"===e||"y"===e||"width"===e||"height"===e||"initRect"===e||"object"==typeof t[e]&&"lineDash"!==e||(t[e]=t.calculative[e]));else{for(const e in t)"x"===e||"y"===e||"width"===e||"height"===e||"initRect"===e||"object"==typeof t[e]&&"lineDash"!==e||(t.calculative[e]=t[e]);t.calculative.worldRect=t.calculative.initRect}this.dirtyPenRect(t,!t.keepAnimateState),t.calculative.text!==t.text&&(t.calculative.text=t.text,j(t)),t.calculative.initRect=void 0}}updateLines(t,e){t.children?.forEach((t=>{const i=this.store.pens[t];i&&this.updateLines(i,e)})),t.connectedLines&&t.connectedLines.forEach((i=>{const r=this.store.pens[i.lineId];if(!r)return;const n=rt(r,i.lineAnchor);if(!n)return;if(r.autoFrom){const e=nt(r);e.id===n.id&&this.calcAutoAnchor(r,e,t,i)}if(r.autoTo){const e=ot(r);e.id===n.id&&this.calcAutoAnchor(r,e,t,i)}const o=rt(t,i.anchor);if(o){if(I(n,o.x-n.x,o.y-n.y),!1!==r.autoPolyline&&(this.store.options.autoPolyline||r.autoPolyline)&&"polyline"===r.lineName){let t=r.calculative.worldAnchors[0],e=r.calculative.worldAnchors[r.calculative.worldAnchors.length-1],i=!1;t.id===n.id?(t=n,i=!0):e.id===n.id&&(e=n,i=!0),i&&(r.calculative.worldAnchors=[t,e],r.calculative.activeAnchor=t,this.polyline(this.store,r,e),this.initLineRect(r))}this.store.path2dMap.set(r,L.path2dDraws[r.name](r)),this.dirtyLines.add(r),e&&ie(r)}}))}calcActiveRect(){const t=this.store.active.filter((t=>!t.locked||t.locked{k(t,e,i.center)})),this.initLineRect(t)):(t.calculative.rotate?t.calculative.rotate+=e:t.calculative.rotate=e,k(t.calculative.worldRect.center,e,i.center),t.parentId?(t.calculative.worldRect.x=t.calculative.worldRect.center.x-t.calculative.worldRect.width/2,t.calculative.worldRect.y=t.calculative.worldRect.center.y-t.calculative.worldRect.height/2,t.x=(t.calculative.worldRect.x-i.x)/i.width,t.y=(t.calculative.worldRect.y-i.y)/i.height):(t.x=t.calculative.worldRect.center.x-t.width/2,t.y=t.calculative.worldRect.center.y-t.height/2),t.rotate=t.calculative.rotate,this.dirtyPenRect(t),t.children&&t.children.forEach((i=>{const r=this.store.pens[i];this.rotatePen(r,e,t.calculative.worldRect)})))}nextAnimate(t){if(!t)return;let e;this.store.emitter.emit("animateEnd",t),t.nextAnimate&&(e=this.store.data.pens.filter((e=>e.id===t.nextAnimate||e.tags&&e.tags.indexOf(t.nextAnimate)>-1))),e&&(e.forEach((t=>{if(t.calculative.pause){const e=Date.now()-t.calculative.pause;t.calculative.pause=void 0,t.calculative.frameStart+=e,t.calculative.frameEnd+=e}else this.store.animates.add(t)})),this.animate())}animate(){this.animateRendering||requestAnimationFrame((()=>{const t=Date.now();if(t-this.lastAnimateRender0&&this.animate());this.lastAnimateRender=t,this.animateRendering=!0;const e=[];let i=!1;for(let r of this.store.animates)if(!r.calculative.pause){if(r.calculative.active&&!r.type&&(i=!0),r.type){if(!ct(r,t)){if(r.keepAnimateState){for(const t in r)void 0!==r.calculative[t]&&("object"==typeof r[t]&&"lineDash"!==t||(r[t]=r.calculative[t]));X(r)}else for(const t in r)"object"==typeof r[t]&&"lineDash"!==t||(r.calculative[t]=r[t]);e.push(r),this.nextAnimate(r)}}else st(r,t)?r.calculative.dirty&&this.dirtyPenRect(r,!0,!0):(this.restoreNodeAnimate(r),e.push(r),this.nextAnimate(r)),this.updateLines(r,!0);this.dirty=!0}i&&this.calcActiveRect(),e.forEach((t=>{this.store.animates.delete(t)})),this.render(),this.animateRendering=!1,this.animate()}))}get clipboardName(){return"topology-clipboard"}copy(t){this.store.clipboard=t||this.store.active,this.pasteOffset=10;const e=H(this.store.clipboard);localStorage.setItem(this.clipboardName,JSON.stringify({topology:!0,data:e})),navigator.clipboard?.writeText(JSON.stringify({topology:!0,data:e}))}cut(t){this.copy(t),this.delete(this.store.clipboard)}async paste(){let t=await(navigator.clipboard?.readText());if(navigator.clipboard?.writeText(""),t||(t=localStorage.getItem(this.clipboardName)),t){let e;try{e=JSON.parse(t)}catch(t){return void console.warn("剪切板数据不是 json",t.message)}if(!e||!e.topology||!e.data)return;this.store.clipboard=e.data}this.store.clipboard=H(this.store.clipboard);const e=this.getAddPens(this.store.clipboard);for(const t of this.store.clipboard)this.pastePen(t,void 0,e);this.active(this.store.clipboard),this.pushHistory({type:N.Add,pens:e}),this.render(),this.store.emitter.emit("add",e),localStorage.removeItem(this.clipboardName)}getAddPens(t){const e=[];for(const i of t)i.children?.forEach((t=>{e.find((e=>e.id===t))||e.push(H(this.store.pens[t]))}));return e.concat(t)}pastePen(t,e,i=[]){const r=t.id;if(mt(t),t.parentId=e,!e&&Et(t,this.pasteOffset,this.pasteOffset),t.type===o.Line?this.changeNodeConnectedLine(r,t,i):this.changeLineAnchors(r,t,i),!this.beforeAddPen||1==this.beforeAddPen(t)){this.makePen(t);const e=[];if(Array.isArray(t.children))for(const r of t.children){const n=i.find((t=>t.id===r));n&&e.push(this.pastePen(n,t.id,i).id)}return t.children=e,t}}changeLineAnchors(t,e,i){if(Array.isArray(e.connectedLines))for(let r=0;rt.id===n));if(o){const i=o.anchors[0],r=o.anchors[o.anchors.length-1];i.connectTo===t&&(i.connectTo=e.id),r.connectTo===t&&(r.connectTo=e.id)}else e.connectedLines.splice(r,1),r--}}changeNodeConnectedLine(t,e,i){const r=[e.anchors[0],e.anchors[e.anchors.length-1]];for(const n of r){const r=n.connectTo;if(r){const o=i.find((t=>t.id===r));o?o.connectedLines?.forEach((i=>{i.lineId===t&&(i.lineId=e.id,i.lineAnchor=n.id)})):(n.connectTo=void 0,n.prev&&(n.prev.connectTo=void 0),n.next&&(n.next.connectTo=void 0))}}}delete(t,e=!1,i=!1){t||(t=this.store.active),t&&t.length&&(t.forEach((t=>{if(!i&&t.locked&&!e)return;const r=this.store.data.pens.findIndex((e=>e.id===t.id));if(r>-1&&(this.delLineConnectTo(this.store.data.pens[r]),this.store.data.pens.splice(r,1),this.store.pens[t.id]=void 0),t.onDestroy&&t.onDestroy(t),Array.isArray(t.children)){const e=this.store.data.pens.filter((e=>t.children.includes(e.id)));this.delete(e,!0,i)}})),this.inactive(),this.store.hoverAnchor=void 0,this.store.hover=void 0,this.render(1/0),this.pushHistory({type:N.Delete,pens:t}),this.store.emitter.emit("delete",t))}delLineConnectTo(t){t.connectedLines?.forEach((e=>{const i=this.store.pens[e.lineId];if(i){const e=i.anchors[0],r=i.anchors[i.anchors.length-1];e.connectTo===t.id&&(e.connectTo=void 0,e.anchorId=void 0,e.prev&&(e.prev.connectTo=void 0),e.next&&(e.next.connectTo=void 0)),r.connectTo===t.id&&(r.connectTo=void 0,r.anchorId=void 0,r.prev&&(r.prev.connectTo=void 0),r.next&&(r.next.connectTo=void 0)),Q(i),Gt(i)}}))}createInput(){let t;this.inputParent.classList.add("topology-input"),this.inputRight.classList.add("right"),this.inputParent.appendChild(this.input),this.inputParent.appendChild(this.inputRight),this.inputParent.appendChild(this.dropdown),this.externalElements.appendChild(this.inputParent),this.inputParent.dataset.l="1",this.input.dataset.l="1",this.inputRight.dataset.l="1",this.dropdown.dataset.l="1",this.inputRight.style.transform="rotate(135deg)";for(let e=0;e{const t=this.store.pens[this.input.dataset.penId];"block"===this.dropdown.style.display?(this.dropdown.style.display="none",this.inputRight.style.transform="rotate(135deg)"):t?.dropdownList&&(this.dropdown.style.display="block",this.inputRight.style.transform="rotate(315deg)"),this.store.emitter.emit("clickInput",t)},this.input.onkeyup=t=>{this.setDropdownList(!0);const e=this.store.pens[this.input.dataset.penId];this.store.emitter.emit("input",{pen:e,text:t.key})}}clearDropdownList(){if(this.dropdown.hasChildNodes())for(let t=0;tt.preventDefault(),this.externalElements.ondrop=void 0,Xe()?(this.externalElements.ontouchstart=void 0,this.externalElements.ontouchmove=void 0,this.externalElements.ontouchend=void 0):(this.externalElements.onmousedown=void 0,this.externalElements.onmousemove=void 0,this.externalElements.onmouseup=void 0),this.externalElements.ondblclick=void 0,this.store.options.keydown){case M.Document:document.removeEventListener("keydown",this.onkeydown),document.removeEventListener("keyup",this.onkeyup);break;case M.Canvas:this.externalElements.removeEventListener("keydown",this.onkeydown),this.externalElements.removeEventListener("keyup",this.onkeyup)}window&&window.removeEventListener("resize",this.onResize),window&&window.removeEventListener("scroll",this.onScroll)}}var ii;!function(t){t[t.Link=0]="Link",t[t.SetProps=1]="SetProps",t[t.StartAnimate=2]="StartAnimate",t[t.PauseAnimate=3]="PauseAnimate",t[t.StopAnimate=4]="StopAnimate",t[t.Function=5]="Function",t[t.WindowFn=6]="WindowFn",t[t.Emit=7]="Emit"}(ii||(ii={}));class ri{constructor(t){let e;this.parent=t,this.onMouseDown=t=>{t.preventDefault(),t.stopPropagation(),this.isDown=!0},this.onMouseMove=t=>{t.preventDefault(),t.stopPropagation(),this.isDown&&this.parent.gotoView(t.offsetX/this.box.clientWidth,t.offsetY/this.box.clientHeight)},this.onMouseUp=t=>{t.preventDefault(),t.stopPropagation(),this.parent.gotoView(t.offsetX/this.box.clientWidth,t.offsetY/this.box.clientHeight),this.isDown=!1},this.box=document.createElement("div"),this.img=new Image,this.box.appendChild(this.img),this.parent.externalElements.appendChild(this.box),this.box.className="topology-map",this.box.onmousedown=this.onMouseDown,this.box.onmousemove=this.onMouseMove,this.box.onmouseup=this.onMouseUp;for(let t=0;t{switch(t){case"add":e.forEach((t=>{t.onAdd&&t.onAdd(t)})),this.onSizeUpdate();break;case"enter":e&&e.onMouseEnter&&e.onMouseEnter(e,this.canvas.mousePos),this.store.data.locked&&this.doEvent(e,t);break;case"leave":e&&e.onMouseLeave&&e.onMouseLeave(e,this.canvas.mousePos),this.store.data.locked&&this.doEvent(e,t);break;case"active":case"inactive":this.store.data.locked&&e.forEach((e=>{this.doEvent(e,t)}));break;case"click":e.pen&&e.pen.onClick&&e.pen.onClick(e.pen,this.canvas.mousePos),this.store.data.locked&&e.pen&&this.doEvent(e.pen,t);break;case"mousedown":e.pen&&e.pen.onMouseDown&&e.pen.onMouseDown(e.pen,this.canvas.mousePos),this.store.data.locked&&e.pen&&this.doEvent(e.pen,t);break;case"mouseup":e.pen&&e.pen.onMouseUp&&e.pen.onMouseUp(e.pen,this.canvas.mousePos),this.store.data.locked&&e.pen&&this.doEvent(e.pen,t);break;case"dblclick":this.store.data.locked&&e.pen&&this.doEvent(e.pen,t);break;case"valueUpdate":e.onValue&&e.onValue(e),this.store.data.locked&&this.doEvent(e,t);break;case"update":case"delete":case"translatePens":case"rotatePens":case"resizePens":this.onSizeUpdate()}},this.doEvent=(t,e)=>{t&&(t.events?.forEach((i=>{if(this.events[i.action]&&i.name===e){let e=!i.where;if(i.where)if(i.where.fn)e=i.where.fn(t);else if(i.where.fnJs){try{i.where.fn=new Function("pen","params",i.where.fnJs)}catch(t){console.error("Error: make function:",t)}i.where.fn&&(e=i.where.fn(t))}else switch(i.where.comparison){case">":e=t[i.where.key]>+i.where.value;break;case">=":e=t[i.where.key]>=+i.where.value;break;case"<":e=t[i.where.key]<+i.where.value;break;case"<=":e=t[i.where.key]<=+i.where.value;break;case"=":case"==":e=t[i.where.key]==i.where.value;break;case"!=":e=t[i.where.key]!=i.where.value}e&&this.events[i.action](t,i)}})),this.doEvent(this.store.pens[t.parentId],e))},this.store=((t="default")=>{var e;return L[t]||(L[t]={data:{x:0,y:0,scale:1,pens:[],origin:{x:0,y:0},center:{x:0,y:0}},histories:[],pens:{},path2dMap:new WeakMap,active:[],animates:new Set,options:{...D},emitter:{all:e=e||new Map,on:function(t,i){var r=e.get(t);r&&r.push(i)||e.set(t,[i])},off:function(t,i){var r=e.get(t);r&&r.splice(r.indexOf(i)>>>0,1)},emit:function(t,i){(e.get(t)||[]).slice().map((function(t){t(i)})),(e.get("*")||[]).slice().map((function(e){e(t,i)}))}}},L[t].id=t),L[t]})(Ht()),this.setOptions(e),this.init(t),this.register({rectangle:r,square:n,circle:ge,svgPath:Ft,diamond:we,triangle:me,pentagon:be,pentagram:_e,hexagon:Se,leftArrow:Ee,rightArrow:Te,twowayArrow:Ie,message:Pe,cloud:Ce,file:Le,cube:Me,people:De,line:Yt,iframe:ce,video:de,gif:Oe,mindNode:He,mindLine:$e}),this.registerAnchors({triangle:xe,pentagon:Re,pentagram:ke,mindNode:qe,mindLine:Ye}),window&&(window.topology=this),this.facePen=J,this.initEventFns(),this.store.emitter.on("*",this.onEvent),this.getWords=F,this.calcTextLines=j,this.calcTextRect=B,this.calcTextDrawRect=U}get beforeAddPen(){return this.canvas.beforeAddPen}set beforeAddPen(t){this.canvas.beforeAddPen=t}get beforeAddAnchor(){return this.canvas.beforeAddAnchor}set beforeAddAnchor(t){this.canvas.beforeAddAnchor=t}get beforeRemovePen(){return this.canvas.beforeRemovePen}set beforeRemovePen(t){this.canvas.beforeRemovePen=t}get beforeRemoveAnchor(){return this.canvas.beforeAddAnchor}set beforeRemoveAnchor(t){this.canvas.beforeAddAnchor=t}setOptions(t={}){this.store.options=Object.assign(this.store.options,t)}getOptions(){return this.store.options}init(t){this.canvas=new ei(this,"string"==typeof t?document.getElementById(t):t,this.store),this.resize(),this.canvas.listen()}initEventFns(){this.events[ii.Link]=(t,e)=>{window.open(e.value,void 0===e.params?"_blank":e.params)},this.events[ii.SetProps]=(t,e)=>{const i=this.getPenRect(t);this.setValue({id:t.id,...i,...e.value})},this.events[ii.StartAnimate]=(t,e)=>{e.value?this.startAnimate(e.value):this.startAnimate([t])},this.events[ii.PauseAnimate]=(t,e)=>{e.value?this.pauseAnimate(e.value):this.pauseAnimate([t])},this.events[ii.StopAnimate]=(t,e)=>{e.value?this.stopAnimate(e.value):this.stopAnimate([t])},this.events[ii.Function]=(t,e)=>{if(!e.fn)try{e.fn=new Function("pen","params",e.value)}catch(t){console.error("Error: make function:",t)}e.fn&&e.fn(t,e.params)},this.events[ii.WindowFn]=(t,e)=>{window&&window[e.value]&&window[e.value](t,e.params)},this.events[ii.Emit]=(t,e)=>{this.store.emitter.emit(e.value,{pen:t,params:e.params})}}resize(t,e){this.canvas.resize(t,e),this.canvas.render(),this.store.emitter.emit("resize",{width:t,height:e}),this.canvas.scroll&&this.canvas.scroll.isShow&&this.canvas.scroll.init()}addPen(t,e){return this.canvas.addPen(t,e)}addPens(t,e){return this.canvas.addPens(t,e)}render(t){this.canvas.render(t)}setBackgroundImage(t){this.store.data.bkImage=t,this.canvas.canvas.style.backgroundImage=`url(${t})`}open(t){for(const t of this.store.data.pens)t.onDestroy&&t.onDestroy(t);if(O(this.store),this.hideInput(),this.canvas.tooltip.hide(),this.canvas.activeRect=void 0,this.canvas.sizeCPs=void 0,t){t.paths&&Object.assign(L.paths,t.paths),this.setBackgroundImage(t.bkImage),Object.assign(this.store.data,t),this.store.data.pens=[];for(const e of t.pens)e.id||(e.id=Ht()),!e.calculative&&(e.calculative={canvas:this.canvas}),this.store.pens[e.id]=e;for(const e of t.pens)this.canvas.makePen(e)}this.canvas.render(1/0),this.listenSocket(),this.connectSocket(),this.startAnimate(),this.doInitJS(),this.store.emitter.emit("opened"),this.canvas.scroll&&this.canvas.scroll.isShow&&this.canvas.scroll.init()}connectSocket(){this.connectWebsocket(),this.connectMqtt()}doInitJS(){this.store.data.initJs&&this.store.data.initJs.trim()&&new Function(this.store.data.initJs)()}drawLine(t){this.canvas.drawingLineName=t}drawingPencil(){this.canvas.drawingPencil()}stopPencil(){this.canvas.stopPencil()}finishDrawLine(t){this.canvas.finishDrawline(t)}finishPencil(){this.canvas.finishPencil()}updateLineType(t,e){if(!t||"line"!=t.name||!e||!this.canvas[e])return;t.lineName=e;const i=t.calculative.worldAnchors[0],r=t.calculative.worldAnchors[t.calculative.worldAnchors.length-1];i.prev=void 0,i.next=void 0,r.prev=void 0,r.next=void 0,t.calculative.worldAnchors=[i,r],t.calculative.activeAnchor=i,this.canvas[e](this.store,t,r),"curve"===t.lineName&&(i.prev={penId:i.penId,x:i.x-50,y:i.y},i.next={penId:i.penId,x:i.x+50,y:i.y},r.prev={penId:r.penId,x:r.x-50,y:r.y},r.next={penId:r.penId,x:r.x+50,y:r.y}),t.calculative.activeAnchor=void 0,this.canvas.initLineRect(t),this.render(1/0)}addDrawLineFn(t,e){this.canvas[t]=e,this.canvas.drawLineFns.push(t)}removeDrawLineFn(t){const e=this.canvas.drawLineFns.indexOf(t);e>-1&&this.canvas.drawLineFns.splice(e,1)}showMagnifier(){this.canvas.showMagnifier()}hideMagnifier(){this.canvas.hideMagnifier()}toggleMagnifier(){this.canvas.toggleMagnifier()}clear(){O(this.store),this.canvas.clearCanvas(),this.canvas.render()}emit(t,e){this.store.emitter.emit(t,e)}on(t,e){return this.store.emitter.on(t,e),this}off(t,e){return this.store.emitter.off(t,e),this}register(t){!function(t){Object.assign(L.path2dDraws,t)}(t)}registerCanvasDraw(t){!function(t){Object.assign(L.canvasDraws,t)}(t)}registerAnchors(t){var e;e=t,Object.assign(L.anchors,e)}registerMoveDock(t){this.canvas.customeMoveDock=t}registerResizeDock(t){this.canvas.customeResizeDock=t}find(t){return this.store.data.pens.filter((e=>e.id==t||e.tags&&e.tags.indexOf(t)>-1))}getPenRect(t){return this.canvas.getPenRect(t)}setPenRect(t,e,i=!0){this.canvas.setPenRect(t,e,i)}startAnimate(t){let e;e=t?"string"==typeof t?this.find(t):t:this.store.data.pens.filter((t=>(t.type||t.frames)&&t.autoPlay)),e.forEach((t=>{if(t.calculative.pause){const e=Date.now()-t.calculative.pause;t.calculative.pause=void 0,t.calculative.frameStart+=e,t.calculative.frameEnd+=e}else this.store.animates.add(t)})),this.canvas.animate()}pauseAnimate(t){let e=[];t?e="string"==typeof t?this.find(t):t:this.store.animates.forEach((t=>{e.push(t)})),e.forEach((t=>{t.calculative.pause||(t.calculative.pause=Date.now())}))}stopAnimate(t){let e=[];t?e="string"==typeof t?this.find(t):t:this.store.animates.forEach((t=>{e.push(t)})),e.forEach((t=>{t.calculative.pause=void 0,t.calculative.start=void 0,t.calculative.animatePos=0,this.store.animates.delete(t),this.canvas.restoreNodeAnimate(t)})),this.canvas.calcActiveRect(),this.render(1/0)}calcAnimateDuration(t){return t.frames.reduce(((t,e)=>t+e.duration),0)}combine(t,e){if(t||(t=this.store.active),!t||!t.length)return;const i=H(t);if(1===t.length&&t[0].type)return t[0].type=o.Node,this.canvas.active(t),this.pushHistory({type:N.Update,initPens:i,pens:H(t,!0)}),void this.render();const r=_t(t);let n={id:Ht(),name:"combine",x:r.x,y:r.y,width:r.width,height:r.height,children:[],showChild:e};const a=t.find((t=>t.width===r.width&&t.height===r.height));a&&null==e?(a.children||(a.children=[]),n=a):this.canvas.makePen(n),t.forEach((t=>{if(t===n||t.parentId===n.id)return;n.children.push(t.id),t.parentId=n.id;const e=Ct(t.calculative.worldRect,r);t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t.locked=s.DisableMove})),this.canvas.active([n]),this.pushHistory({type:N.Add,pens:[n],step:2}),this.pushHistory({type:N.Update,initPens:i,pens:t,step:2}),this.render(),this.store.emitter.emit("add",[n])}uncombine(t){if(!t&&this.store.active&&(t=this.store.active[0]),!t||!t.children)return;const e=this.store.data.pens.filter((e=>t.children.includes(e.id)));let i=H(e);e.forEach((t=>{t.parentId=void 0,t.x=t.calculative.worldRect.x,t.y=t.calculative.worldRect.y,t.width=t.calculative.worldRect.width,t.height=t.calculative.worldRect.height,t.locked=s.None,t.calculative.active=void 0,t.calculative.hover=!1}));const r="combine"===t.name?3:2;this.pushHistory({type:N.Update,initPens:i,pens:e,step:r}),i=[H(t)],t.children=void 0,this.pushHistory({type:N.Update,initPens:i,pens:[t],step:r}),"combine"===t.name&&(this.delete([t]),this.store.histories[this.store.histories.length-1].step=r),this.inactive()}active(t,e=!0){this.canvas.active(t,e)}inactive(){this.canvas.inactive()}delete(t,e=!1){this.canvas.delete(t,void 0,e)}scale(t,e={x:0,y:0}){this.canvas.scale(t,e)}translate(t,e){this.canvas.translate(t,e)}translatePens(t,e,i){this.canvas.translatePens(t,e,i)}getParent(t,e){return q(t,e)}data(){const t=H(this.store.data);return t.version=C,t.paths=L.paths,t}copy(t){this.canvas.copy(t)}cut(t){this.canvas.cut(t)}paste(){this.canvas.paste()}undo(){this.canvas.undo()}redo(){this.canvas.redo()}listenSocket(){try{let t;if(this.store.data.socketCbJs&&(t=new Function("e",this.store.data.socketCbJs)),!t)return!1;this.socketFn=t}catch(t){return console.error("Create the function for socket:",t),!1}return!0}connectWebsocket(t){this.closeWebsocket(),t&&(this.store.data.websocket=t),this.store.data.websocket&&(this.websocket=new WebSocket(this.store.data.websocket),this.websocket.onmessage=t=>{this.doSocket(t.data)},this.websocket.onclose=()=>{console.info("Canvas websocket closed and reconneting..."),this.connectWebsocket()})}closeWebsocket(){this.websocket&&(this.websocket.onclose=void 0,this.websocket.close(),this.websocket=void 0)}connectMqtt(t){this.closeMqtt(),t&&(this.store.data.mqtt=t.mqtt,this.store.data.mqttTopics=t.mqttTopics,this.store.data.mqttOptions=t.mqttOptions),this.store.data.mqtt&&(this.store.data.mqttOptions.clientId&&!this.store.data.mqttOptions.customClientId&&(this.store.data.mqttOptions.clientId=Ht()),this.mqttClient=ni.connect(this.store.data.mqtt,this.store.data.mqttOptions),this.mqttClient.on("message",((t,e)=>{this.doSocket(e.toString())})),this.store.data.mqttTopics&&this.mqttClient.subscribe(this.store.data.mqttTopics.split(",")))}closeMqtt(){this.mqttClient?.end()}doSocket(t){if(this.socketFn)this.socketFn(t);else try{t=JSON.parse(t),Array.isArray(t)||(t=[t]),t.forEach((t=>{this.setValue(t,!0,!1)})),this.render(1/0)}catch(t){console.warn("Invalid socket data:",t)}}setValue(t,e=!1,i=!0){(this.find(t.id||t.tag)||[]).forEach((i=>{let r=t;i.onBeforeValue&&(r=i.onBeforeValue(i,t)),this.updateValue(i,r),i.onValue&&i.onValue(i),e&&this.store.data.locked&&this.doEvent(i,"valueUpdate")})),!this.store.data.locked&&this.store.active.length&&this.canvas.calcActiveRect(),i&&this.render(1/0)}updateValue(t,e){this.canvas.updateValue(t,e)}pushHistory(t){this.canvas.pushHistory(t)}showInput(t,e){this.canvas.showInput(t,e)}hideInput(){this.canvas.hideInput()}clearDropdownList(){this.canvas.clearDropdownList()}pushChildren(t,e){t.children||(t.children=[]),e.forEach((e=>{if(e.calculative||this.canvas.makePen(e),e.parentId){const t=this.store.pens[e.parentId],i=t.children.findIndex((t=>t===e.id));t.children.splice(i,1)}t.children.push(e.id),e.parentId=t.id;const i=Ct(e.calculative.worldRect,t.calculative.worldRect);e.x=i.x,e.y=i.y,e.width=i.width,e.height=i.height,e.locked=s.DisableMove,this.store.pens[e.id]=e}))}renderPenRaw(t,e,i){!function(t,e,i){if(t.save(),i&&t.translate(-i.x,-i.y),t.beginPath(),t.setAttrs&&t.setAttrs(e),e.calculative.flip&&(e.calculative.flip===l.Horizontal?(i?t.translate(e.calculative.worldRect.x+e.calculative.worldRect.ex-i.x,-i.y):t.translate(e.calculative.worldRect.x+e.calculative.worldRect.ex,0),t.scale(-1,1)):e.calculative.flip===l.Vertical&&(i?t.translate(-i.x,e.calculative.worldRect.y+e.calculative.worldRect.ey-i.x):t.translate(0,e.calculative.worldRect.y+e.calculative.worldRect.ey),t.scale(1,-1))),e.calculative.rotate&&"line"!==e.name){t.translate(e.calculative.worldRect.center.x,e.calculative.worldRect.center.y);let i=e.calculative.rotate*Math.PI/180;e.calculative.flip&&(i*=-1),t.rotate(i),t.translate(-e.calculative.worldRect.center.x,-e.calculative.worldRect.center.y)}e.calculative.lineWidth>1&&(t.lineWidth=e.calculative.lineWidth);const r=e.calculative.canvas.store;let n;if(e.calculative.hover?(t.strokeStyle=e.hoverColor||r.options.hoverColor,t.fillStyle=e.hoverBackground||r.options.hoverBackground,n=e.hoverBackground||r.options.hoverBackground):e.calculative.active?(t.strokeStyle=e.activeColor||r.options.activeColor,t.fillStyle=e.activeBackground||r.options.activeBackground,n=e.activeBackground||r.options.activeBackground):(e.strokeImage?e.calculative.strokeImg&&(t.strokeStyle=t.createPattern(e.calculative.strokeImg,"repeat"),n=!0):t.strokeStyle=e.calculative.color||"#000000",e.backgroundImage?e.calculative.backgroundImg&&(t.fillStyle=t.createPattern(e.calculative.backgroundImg,"repeat"),n=!0):(t.fillStyle=e.background,n=!!e.background)),e.calculative.lineCap?t.lineCap=e.calculative.lineCap:e.type&&(t.lineCap="round"),e.calculative.lineJoin?t.lineJoin=e.calculative.lineJoin:e.type&&(t.lineJoin="round"),e.calculative.globalAlpha<1&&(t.globalAlpha=e.calculative.globalAlpha),e.calculative.lineDash&&t.setLineDash(e.calculative.lineDash),e.calculative.lineDashOffset&&(t.lineDashOffset=e.calculative.lineDashOffset),e.calculative.shadowColor&&(t.shadowColor=e.calculative.shadowColor,t.shadowOffsetX=e.calculative.shadowOffsetX,t.shadowOffsetY=e.calculative.shadowOffsetY,t.shadowBlur=e.calculative.shadowBlur),L.path2dDraws[e.name]){if(e.type===o.Line&&e.borderWidth){t.save(),t.beginPath();const i=e.calculative.lineWidth+e.calculative.borderWidth;t.lineWidth=i,t.strokeStyle=e.borderColor,L.path2dDraws[e.name](e,t),n&&t.fill(),i&&t.stroke(),t.restore()}t.save(),t.beginPath(),L.path2dDraws[e.name](e,t),n&&t.fill(),e.calculative.lineWidth&&t.stroke(),t.restore();const i=e.calculative.progress||e.progress;if(null!=i){t.save();let n=t.createLinearGradient(e.calculative.worldRect.x,e.calculative.worldRect.y,e.calculative.worldRect.x+e.calculative.worldRect.width*i,e.calculative.worldRect.y);e.verticalProgress&&(n=t.createLinearGradient(e.calculative.worldRect.x,e.calculative.worldRect.ey,e.calculative.worldRect.x,e.calculative.worldRect.y+e.calculative.worldRect.height*(1-i)));const o=e.progressColor||e.color||r.options.activeColor;n.addColorStop(0,o),n.addColorStop(1,o),n.addColorStop(1,"transparent"),t.fillStyle=n,t.beginPath(),L.path2dDraws[e.name](e,t),t.fill(),t.restore()}}if(L.canvasDraws[e.name]){t.save();const i=L.canvasDraws[e.name](t,e,r);if(t.restore(),i)return}if(e.image&&e.calculative.img){t.save(),t.shadowColor="",t.shadowBlur=0;const i=e.calculative.worldIconRect;let r=i.x,n=i.y,o=i.width,s=i.height;if(e.calculative.iconWidth&&(o=e.calculative.iconWidth),e.calculative.iconHeight&&(s=e.calculative.iconHeight),e.calculative.imgNaturalWidth&&e.calculative.imgNaturalHeight){let t=i.width/e.calculative.imgNaturalWidth,r=i.height/e.calculative.imgNaturalHeight,n=t>r?r:t;e.iconWidth?s=n*e.iconWidth:o=n*e.calculative.imgNaturalWidth,s=e.iconHeight?n*e.iconHeight:n*e.calculative.imgNaturalHeight}r+=(i.width-o)/2,n+=(i.height-s)/2,e.iconRotate&&(t.translate(i.center.x,i.center.y),t.rotate(e.iconRotate*Math.PI/180),t.translate(-i.center.x,-i.center.y)),t.drawImage(e.calculative.img,r,n,o,s),t.restore()}else if(e.icon){t.save(),t.shadowColor="",t.shadowBlur=0,t.textAlign="center",t.textBaseline="middle";const i=e.calculative.worldIconRect;let n=i.x+i.width/2,o=i.y+i.height/2;switch(e.iconAlign){case"top":o=i.y,t.textBaseline="top";break;case"bottom":o=i.ey,t.textBaseline="bottom";break;case"left":n=i.x,t.textAlign="left";break;case"right":n=i.ex,t.textAlign="right";break;case"left-top":n=i.x,o=i.y,t.textAlign="left",t.textBaseline="top";break;case"right-top":n=i.ex,o=i.y,t.textAlign="right",t.textBaseline="top";break;case"left-bottom":n=i.x,o=i.ey,t.textAlign="left",t.textBaseline="bottom";break;case"right-bottom":n=i.ex,o=i.ey,t.textAlign="right",t.textBaseline="bottom"}e.calculative.iconSize>0?t.font=`${e.calculative.iconWeight||"normal"} ${e.calculative.iconSize}px '${e.calculative.iconFamily}'`:i.width>i.height?t.font=`${e.calculative.iconWeight||"normal"} ${i.height}px '${e.calculative.iconFamily}'`:t.font=`${e.calculative.iconWeight||"normal"} ${i.width}px '${e.calculative.iconFamily}'`,t.fillStyle=e.iconColor||e.textColor||r.options.textColor,e.calculative.worldRect.rotate&&(t.translate(i.center.x,i.center.y),t.rotate(e.calculative.worldRect.rotate*Math.PI/180),t.translate(-i.center.x,-i.center.y)),t.beginPath(),t.fillText(e.icon,n,o),t.restore()}if(e.calculative.text&&!e.calculative.hiddenText){t.save(),e.calculative.textHasShadow||(t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0),t.fillStyle=e.calculative.textColor||e.calculative.color,t.font=`${e.calculative.fontStyle||"normal"} normal ${e.calculative.fontWeight||"normal"} ${e.calculative.fontSize}px/${e.calculative.lineHeight} ${e.calculative.fontFamily||r.options.fontFamily}`,!e.calculative.textDrawRect&&U(t,e),e.calculative.textBackground&&(t.save(),t.fillStyle=e.calculative.textBackground,t.fillRect(e.calculative.textDrawRect.x,e.calculative.textDrawRect.y,e.calculative.textDrawRect.width,e.calculative.textDrawRect.height),t.restore());const i=.55,{width:n}=e.calculative.textDrawRect,o=e.textAlign||r.options.textAlign;e.calculative.textLines.forEach(((r,s)=>{let a=0;"center"===o?a=(n-e.calculative.textLineWidths[s])/2:"right"===o&&(a=n-e.calculative.textLineWidths[s]),t.fillText(r,e.calculative.textDrawRect.x+a,e.calculative.textDrawRect.y+(s+i)*e.calculative.fontSize*e.calculative.lineHeight)})),t.restore()}t.restore()}(t,e,i)}toPng(t=0,e){return this.canvas.toPng(t,e)}downloadPng(t,e=0){const i=document.createElement("a");i.setAttribute("download",t||"le5le.topology.png"),i.setAttribute("href",this.toPng(e));const r=document.createEvent("MouseEvents");r.initEvent("click",!0,!0),i.dispatchEvent(r)}getRect(t){return t||(t=this.store.data.pens),_t(t)}fitView(t=!0,e=10){if(!this.hasView())return;const{canvas:i}=this.canvas,{offsetWidth:r,offsetHeight:n}=i;this.resize(r,n);const o=Qe(e),s=this.getRect(),a=(r-o[1]-o[3])/s.width,c=(n-o[0]-o[2])/s.height;let l=a;l=t?a>c?c:a:a>c?a:c,this.scale(l*this.store.data.scale),this.centerView()}centerView(){if(!this.hasView())return;const t=this.getRect(),e=this.getViewCenter(),i=this.getPenRect(t);Rt(i);const{center:r}=i,{scale:n,origin:o,x:s,y:a}=this.store.data;this.translate((e.x-o.x)/n-r.x-s/n,(e.y-o.y)/n-r.y-a/n);const{canvas:c}=this.canvas,l=(c.scrollWidth-c.offsetWidth)/2,h=(c.scrollHeight-c.offsetHeight)/2;c.scrollTo(l,h)}hasView(){return!!this.store.data.pens.length}getViewCenter(){const{width:t,height:e}=this.canvas;return{x:t/2,y:e/2}}beSameByFirst(t=this.store.data.pens,e=!1){const i=H(t),r=t[0],{width:n,height:o}=this.getPenRect(r),s={};f.forEach((t=>{s[t]=r[t]}));for(let i=1;i!t.parentId))).length<=2)return;const n=H(e),o=e.reduce(((e,i)=>e+this.getPenRect(i)[t]),0),s=(i-o)/(e.length-1);e=e.sort(((e,i)=>"width"===t?e.x-i.x:e.y-i.y));const a=this.getPenRect(e[0]);let c="width"===t?a.x:a.y;for(const i of e){const e=this.getPenRect(i);"width"===t?e.x=c:e.y=c,c+=e[t]+s,this.setValue({id:i.id,...e},r,!1)}this.render(1/0),this.pushHistory({type:N.Update,initPens:n,pens:e})}spaceBetween(t,e,i=!1){this.spaceBetweenByDirection("width",t,e,i)}spaceBetweenColumn(t,e,i=!1){this.spaceBetweenByDirection("height",t,e,i)}layout(t=this.store.data.pens,e,i=30,r=!1){const n=this.getPenRect(_t(t));!e&&(e=n.width);const o=H(t=t.filter((t=>!t.type&&!t.parentId)));let s=0;t.forEach((t=>{const e=this.getPenRect(t);e.height>s&&(s=e.height)}));let a=n.x,c=n.y;t.forEach(((o,l)=>{const h=this.getPenRect(o);if(h.x=a,h.y=c+s/2-h.height/2,this.setValue({id:o.id,...h},r,!1),l===t.length-1)return;const u=a+h.width-n.x,d=this.getPenRect(t[l+1]);Math.round(e-u)>=Math.round(d.width+i)?a+=h.width+i:(a=n.x,c+=s+i)})),this.render(1/0),this.pushHistory({type:N.Update,initPens:o,pens:t})}gotoView(t){const e=this.getViewCenter(),i=e.x-t.calculative.worldRect.x-t.calculative.worldRect.width/2,r=e.y-t.calculative.worldRect.y-t.calculative.worldRect.height/2;this.canvas.scroll&&this.canvas.scroll.isShow&&this.canvas.scroll.translate(i-this.store.data.x,r-this.store.data.y),this.store.data.x=i,this.store.data.y=r,this.canvas.render(1/0)}showMap(){this.map||(this.map=new ri(this.canvas)),this.map.show()}hideMap(){this.map.hide()}onSizeUpdate(){this.mapTimer&&(clearTimeout(this.mapTimer),this.mapTimer=void 0),this.mapTimer=setTimeout((()=>{this.map&&this.map.isShow&&this.map.show(),this.canvas.scroll&&this.canvas.scroll.isShow&&this.canvas.scroll.resize()}),500)}toggleAnchorMode(){this.canvas.toggleAnchorMode()}addAnchorHand(){this.canvas.addAnchorHand()}removeAnchorHand(){this.canvas.removeAnchorHand()}toggleAnchorHand(){this.canvas.toggleAnchorHand()}top(t,e){e||(e=this.store.data.pens);const i=e.findIndex((e=>e.id===t.id));i>-1&&(e.push(e[i]),e.splice(i,1))}bottom(t,e){e||(e=this.store.data.pens);const i=e.findIndex((e=>e.id===t.id));i>-1&&(e.unshift(e[i]),e.splice(i+1,1))}up(t,e){e||(e=this.store.data.pens);const i=e.findIndex((e=>e.id===t.id));i>-1&&i!==e.length-1&&(e.splice(i+2,0,e[i]),e.splice(i,1))}down(t,e){e||(e=this.store.data.pens);const i=e.findIndex((e=>e.id===t.id));i>-1&&0!==i&&(e.splice(i-1,0,e[i]),e.splice(i+1,1))}setLayer(t,e,i){i||(i=this.store.data.pens);const r=i.findIndex((e=>e.id===t.id));r>-1&&(r>e?(i.splice(e,0,i[r]),i.splice(r+1,1)):r{const n=this.find(r.lineId);if(1===n.length)switch(e){case"all":i.push(n[0]);break;case"in":n[0].anchors[n[0].anchors.length-1].connectTo===t.id&&i.push(n[0]);break;case"out":n[0].anchors[0].connectTo===t.id&&i.push(n[0])}})),i}nextNode(t){if(t.type){const e=t.anchors[t.anchors.length-1].connectTo;return this.find(e)}{const e=this.getLines(t,"out"),i=[];return e.forEach((t=>{const e=this.nextNode(t);for(const t of e)!i.find((e=>e.id===t.id))&&i.push(t)})),i}}previousNode(t){if(t.type){const e=t.anchors[0].connectTo;return this.find(e)}{const e=this.getLines(t,"in"),i=[];return e.forEach((t=>{const e=this.previousNode(t);for(const t of e)!i.find((e=>e.id===t.id))&&i.push(t)})),i}}toComponent(t,e){if(t||(t=this.store.data.pens),1===t.length)return t[0].type=o.Node,H(t);const i=_t(t);let r={id:Ht(),name:"combine",x:i.x,y:i.y,width:i.width,height:i.height,children:[],showChild:e};const n=t.find((t=>t.width===i.width&&t.height===i.height));return n&&void 0===e?(n.children||(n.children=[]),r=n):this.canvas.makePen(r),t.forEach((t=>{if(t===r||t.parentId===r.id)return;if(t.parentId)return;r.children.push(t.id),t.parentId=r.id;const e=Ct(t.calculative.worldRect,i);t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t.locked=s.DisableMove})),H(t)}setVisible(t,e,i=!1){if(this.setValue({id:t.id,visible:e},i,!1),t.children)for(const r of t.children){const t=this.find(r)[0];t&&this.setVisible(t,e,i)}}destroy(t){for(const t of this.store.data.pens)t.onDestroy&&t.onDestroy(t);this.closeWebsocket(),this.closeMqtt(),O(this.store),this.store.emitter.all.clear(),this.canvas.destroy(),L[this.store.id]=void 0,L.path2dDraws={},this.canvas=void 0,t&&(L.htmlElements={})}}function si(t){t.onDestroy||(t.onDestroy=ci,t.onAdd=ai);const e=new Path2D;t.calculative.borderRadius||(t.calculative.borderRadius=0);let i=t.calculative.borderRadius,r=t.calculative.borderRadius;t.calculative.borderRadius<1&&(i=t.calculative.worldRect.width*t.calculative.borderRadius,r=t.calculative.worldRect.height*t.calculative.borderRadius);let n=i{const i=t.calculative.canvas.parent.store.data.pens.findIndex((t=>t.id===e));i>-1&&(t.calculative.canvas.parent.store.data.pens.splice(i,1),t.calculative.canvas.parent.store.pens[e]=void 0)})),t.children=void 0}function li(t){t.onDestroy||(t.onDestroy=ui,t.onAdd=hi);const e=new Path2D;t.calculative.borderRadius||(t.calculative.borderRadius=0);let i=t.calculative.borderRadius,r=t.calculative.borderRadius;t.calculative.borderRadius<1&&(i=t.calculative.worldRect.width*t.calculative.borderRadius,r=t.calculative.worldRect.height*t.calculative.borderRadius);let n=i{const i=t.calculative.canvas.parent.store.data.pens.findIndex((t=>t.id===e));i>-1&&(t.calculative.canvas.parent.store.data.pens.splice(i,1),t.calculative.canvas.parent.store.pens[e]=void 0)})),t.children=void 0}function di(){return{interfaceClass:si,simpleClass:li}}function pi(t,e){return e||(e=new Path2D),e.rect(t.calculative.worldRect.x,t.calculative.worldRect.y,t.calculative.worldRect.width,t.calculative.worldRect.height),e.closePath(),e}function fi(){return{sequenceFocus:pi}}function vi(t){const e=new Path2D;t.calculative.borderRadius||(t.calculative.borderRadius=0);const i=t.calculative.worldRect;let r=t.calculative.borderRadius,n=t.calculative.borderRadius;t.calculative.borderRadius<1&&(r=i.width*t.calculative.borderRadius,n=i.height*t.calculative.borderRadius);let o=r{t.exports=function t(e,i,r){function n(s,a){if(!i[s]){if(!e[s]){if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=i[s]={exports:{}};e[s][0].call(l.exports,(function(t){return n(e[s][1][t]||t)}),l,l.exports,t,e,i,r)}return i[s].exports}for(var o=void 0,s=0;sthis.emit("error",new Error("Packet has no Authentication Method")))),this;this.options.properties.authenticationMethod&&this.options.authPacket&&"object"==typeof this.options.authPacket&&w(this,u({cmd:"auth",reasonCode:0},this.options.authPacket))}this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout((function(){d("!!connectTimeout hit!! Calling _cleanUp with force `true`"),e._cleanUp(!0)}),this.options.connectTimeout)},b.prototype._handlePacket=function(t,e){var i=this.options;if(5===i.protocolVersion&&i.properties&&i.properties.maximumPacketSize&&i.properties.maximumPacketSizeo.properties.topicAliasMaximum||!o.properties.topicAliasMaximum&&i.properties.topicAlias))&&delete n.properties.topicAlias),d("publish :: qos",i.qos),i.qos){case 1:case 2:this.outgoing[n.messageId]={volatile:!1,cb:r||x},this._storeProcessing?(d("_storeProcessing enabled"),this._packetIdsDuringStoreProcessing[n.messageId]=!1,this._storePacket(n,void 0,i.cbStorePut)):(d("MqttClient:publish: packet cmd: %s",n.cmd),this._sendPacket(n,void 0,i.cbStorePut));break;default:this._storeProcessing?(d("_storeProcessing enabled"),this._storePacket(n,r,i.cbStorePut)):(d("MqttClient:publish: packet cmd: %s",n.cmd),this._sendPacket(n,r,i.cbStorePut))}return this},b.prototype.subscribe=function(){for(var t,e=new Array(arguments.length),i=0;i0){var e={qos:t.qos};5===p&&(e.nl=t.nl||!1,e.rap=t.rap||!1,e.rh=t.rh||0,e.properties=t.properties),l._resubscribeTopics[t.topic]=e,y.push(t.topic)}})),l.messageIdToTopic[t.messageId]=y}return this.outgoing[t.messageId]={volatile:!0,cb:function(t,e){if(!t)for(var i=e.granted,r=0;r{d("end :: finish :: calling process.nextTick on closeStores"),p(function(){d("end :: closeStores: closing incoming and outgoing stores"),r.disconnected=!0,r.incomingStore.close((function(t){r.outgoingStore.close((function(e){if(d("end :: closeStores: emitting end"),r.emit("end"),i){let r=t||e;d("end :: closeStores: invoking callback with args"),i(r)}}))})),r._deferredReconnect&&r._deferredReconnect()}.bind(r))}),e)}return d("end :: (%s)",this.options.clientId),null!=t&&"boolean"==typeof t||(i=e||x,e=t,t=!1,"object"!=typeof e&&(i=e,e=null,"function"!=typeof i&&(i=x))),"object"!=typeof e&&(i=e,e=null),d("end :: cb? %s",!!i),i=i||x,this.disconnecting?(i(),this):(this._clearReconnect(),this.disconnecting=!0,!t&&Object.keys(this.outgoing).length>0?(d("end :: (%s) :: calling finish in 10ms once outgoing is empty",r.options.clientId),this.once("outgoingEmpty",setTimeout.bind(null,n,10))):(d("end :: (%s) :: immediately calling finish",r.options.clientId),n()),this)},b.prototype.removeOutgoingMessage=function(t){var e=this.outgoing[t]?this.outgoing[t].cb:null;return delete this.outgoing[t],this.outgoingStore.del({messageId:t},(function(){e(new Error("Message removed"))})),this},b.prototype.reconnect=function(t){d("client reconnect");var e=this,i=function(){t?(e.options.incomingStore=t.incomingStore,e.options.outgoingStore=t.outgoingStore):(e.options.incomingStore=null,e.options.outgoingStore=null),e.incomingStore=e.options.incomingStore||new o,e.outgoingStore=e.options.outgoingStore||new o,e.disconnecting=!1,e.disconnected=!1,e._deferredReconnect=null,e._reconnect()};return this.disconnecting&&!this.disconnected?this._deferredReconnect=i:i(),this},b.prototype._reconnect=function(){d("_reconnect: emitting reconnect to client"),this.emit("reconnect"),this.connected?(this.end((()=>{this._setupStream()})),d("client already connected. disconnecting first.")):(d("_reconnect: calling _setupStream"),this._setupStream())},b.prototype._setupReconnect=function(){var t=this;!t.disconnecting&&!t.reconnectTimer&&t.options.reconnectPeriod>0?(this.reconnecting||(d("_setupReconnect :: emit `offline` state"),this.emit("offline"),d("_setupReconnect :: set `reconnecting` to `true`"),this.reconnecting=!0),d("_setupReconnect :: setting reconnectTimer for %d ms",t.options.reconnectPeriod),t.reconnectTimer=setInterval((function(){d("reconnectTimer :: reconnect triggered!"),t._reconnect()}),t.options.reconnectPeriod)):d("_setupReconnect :: doing nothing...")},b.prototype._clearReconnect=function(){d("_clearReconnect : clearing reconnect timer"),this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null)},b.prototype._cleanUp=function(t,e){var i,r=arguments[2];if(e&&(d("_cleanUp :: done callback provided for on stream close"),this.stream.on("close",e)),d("_cleanUp :: forced? %s",t),t)0===this.options.reconnectPeriod&&this.options.clean&&(i=this.outgoing)&&(d("flush: queue exists? %b",!!i),Object.keys(i).forEach((function(t){"function"==typeof i[t].cb&&(i[t].cb(new Error("Connection closed")),delete i[t])}))),d("_cleanUp :: (%s) :: destroying stream",this.options.clientId),this.stream.destroy();else{var n=u({cmd:"disconnect"},r);d("_cleanUp :: (%s) :: call _sendPacket with disconnect packet",this.options.clientId),this._sendPacket(n,f.bind(null,this.stream.end.bind(this.stream)))}this.disconnecting||(d("_cleanUp :: client not disconnecting. Clearing and resetting reconnect."),this._clearReconnect(),this._setupReconnect()),null!==this.pingTimer&&(d("_cleanUp :: clearing pingTimer"),this.pingTimer.clear(),this.pingTimer=null),e&&!this.connected&&(d("_cleanUp :: (%s) :: removing stream `done` callback `close` listener",this.options.clientId),this.stream.removeListener("close",e),e())},b.prototype._sendPacket=function(t,e,i){if(d("_sendPacket :: (%s) :: start",this.options.clientId),i=i||x,!this.connected)return d("_sendPacket :: client not connected. Storing packet offline."),void this._storePacket(t,e,i);switch(this._shiftPingInterval(),t.cmd){case"publish":break;case"pubrel":return void m(this,t,e,i);default:return void w(this,t,e)}switch(t.qos){case 2:case 1:m(this,t,e,i);break;default:w(this,t,e)}d("_sendPacket :: (%s) :: end",this.options.clientId)},b.prototype._storePacket=function(t,e,i){d("_storePacket :: packet: %o",t),d("_storePacket :: cb? %s",!!e),i=i||x,0===(t.qos||0)&&this.queueQoSZero||"publish"!==t.cmd?this.queue.push({packet:t,cb:e}):t.qos>0?(e=this.outgoing[t.messageId]?this.outgoing[t.messageId].cb:null,this.outgoingStore.put(t,(function(t){if(t)return e&&e(t);i()}))):e&&e(new Error("No connection to broker"))},b.prototype._setupPingTimer=function(){d("_setupPingTimer :: keepalive %d (seconds)",this.options.keepalive);var t=this;!this.pingTimer&&this.options.keepalive&&(this.pingResp=!0,this.pingTimer=l((function(){t._checkPing()}),1e3*this.options.keepalive))},b.prototype._shiftPingInterval=function(){this.pingTimer&&this.options.keepalive&&this.options.reschedulePings&&this.pingTimer.reschedule(1e3*this.options.keepalive)},b.prototype._checkPing=function(){d("_checkPing :: checking ping..."),this.pingResp?(d("_checkPing :: ping response received. Clearing flag and sending `pingreq`"),this.pingResp=!1,this._sendPacket({cmd:"pingreq"})):(d("_checkPing :: calling _cleanUp with force true"),this._cleanUp(!0))},b.prototype._handlePingresp=function(){this.pingResp=!0},b.prototype._handleConnack=function(t){d("_handleConnack");var e=this.options,i=5===e.protocolVersion?t.reasonCode:t.returnCode;if(clearTimeout(this.connackTimer),t.properties&&(t.properties.topicAliasMaximum&&(e.properties||(e.properties={}),e.properties.topicAliasMaximum=t.properties.topicAliasMaximum),t.properties.serverKeepAlive&&e.keepalive&&(e.keepalive=t.properties.serverKeepAlive,this._shiftPingInterval()),t.properties.maximumPacketSize&&(e.properties||(e.properties={}),e.properties.maximumPacketSize=t.properties.maximumPacketSize)),0===i)this.reconnecting=!1,this._onConnect(t);else if(i>0){var r=new Error("Connection refused: "+g[i]);r.code=i,this.emit("error",r)}},b.prototype._handlePublish=function(t,e){d("_handlePublish: packet %o",t),e=void 0!==e?e:x;var i=t.topic.toString(),r=t.payload,n=t.qos,o=t.messageId,s=this,a=this.options,c=[0,16,128,131,135,144,145,151,153];switch(d("_handlePublish: qos %d",n),n){case 2:a.customHandleAcks(i,r,t,(function(i,r){return i instanceof Error||(r=i,i=null),i?s.emit("error",i):-1===c.indexOf(r)?s.emit("error",new Error("Wrong reason code for pubrec")):void(r?s._sendPacket({cmd:"pubrec",messageId:o,reasonCode:r},e):s.incomingStore.put(t,(function(){s._sendPacket({cmd:"pubrec",messageId:o},e)})))}));break;case 1:a.customHandleAcks(i,r,t,(function(n,a){return n instanceof Error||(a=n,n=null),n?s.emit("error",n):-1===c.indexOf(a)?s.emit("error",new Error("Wrong reason code for puback")):(a||s.emit("message",i,r,t),void s.handleMessage(t,(function(t){if(t)return e&&e(t);s._sendPacket({cmd:"puback",messageId:o,reasonCode:a},e)})))}));break;case 0:this.emit("message",i,r,t),this.handleMessage(t,e);break;default:d("_handlePublish: unknown QoS. Doing nothing.")}},b.prototype.handleMessage=function(t,e){e()},b.prototype._handleAck=function(t){var e,i=t.messageId,r=t.cmd,n=null,o=this.outgoing[i]?this.outgoing[i].cb:null,s=this;if(o){switch(d("_handleAck :: packet type",r),r){case"pubcomp":case"puback":var a=t.reasonCode;a&&a>0&&16!==a&&((e=new Error("Publish error: "+g[a])).code=a,o(e,t)),delete this.outgoing[i],this.outgoingStore.del(t,o);break;case"pubrec":n={cmd:"pubrel",qos:2,messageId:i};var c=t.reasonCode;c&&c>0&&16!==c?((e=new Error("Publish error: "+g[c])).code=c,o(e,t)):this._sendPacket(n);break;case"suback":delete this.outgoing[i];for(var l=0;l0)if(this.options.resubscribe)if(5===this.options.protocolVersion){d("_resubscribe: protocolVersion 5");for(var i=0;ir&&setTimeout(t,o,e,i,s),l&&"string"==typeof e&&(e=n.from(e,"utf8"));try{h.send(e)}catch(t){return s(t)}s()}));e.objectMode||(p._writev=m),p.on("close",(()=>{h.close()}));const f=void 0!==h.addEventListener;function v(){i.setReadable(p),i.setWritable(p),i.emit("connect")}function y(){i.end(),i.destroy()}function g(t){i.destroy(t)}function w(t){let e=t.data;e=e instanceof ArrayBuffer?n.from(e):n.from(e,"utf8"),p.push(e)}function m(t,e){const i=new Array(t.length);for(let e=0;e{a.destroy()})),a}}).call(this)}).call(this,t("_process"),t("buffer").Buffer)},{_process:32,buffer:14,debug:15,duplexify:17,"readable-stream":51,ws:60}],6:[function(t,e,i){(function(i){(function(){"use strict";var r,n,o,s=t("readable-stream").Transform,a=t("duplexify");e.exports=function(t,e){if(e.hostname=e.hostname||e.host,!e.hostname)throw new Error("Could not determine host. Specify host manually.");var c="MQIsdp"===e.protocolId&&3===e.protocolVersion?"mqttv3.1":"mqtt";!function(t){t.hostname||(t.hostname="localhost"),t.path||(t.path="/"),t.wsOptions||(t.wsOptions={})}(e);var l=function(t,e){var i="wxs"===t.protocol?"wss":"ws",r=i+"://"+t.hostname+t.path;return t.port&&80!==t.port&&443!==t.port&&(r=i+"://"+t.hostname+":"+t.port+t.path),"function"==typeof t.transformWsUrl&&(r=t.transformWsUrl(r,t,e)),r}(e,t);r=wx.connectSocket({url:l,protocols:[c]}),n=function(){var t=new s;return t._write=function(t,e,i){r.send({data:t.buffer,success:function(){i()},fail:function(t){i(new Error(t))}})},t._flush=function(t){r.close({success:function(){t()}})},t}(),(o=a.obj())._destroy=function(t,e){r.close({success:function(){e&&e(t)}})};var h=o.destroy;return o.destroy=function(){o.destroy=h;var t=this;setTimeout((function(){r.close({fail:function(){t._destroy(new Error)}})}),0)}.bind(o),r.onOpen((function(){o.setReadable(n),o.setWritable(n),o.emit("connect")})),r.onMessage((function(t){var e=t.data;e=e instanceof ArrayBuffer?i.from(e):i.from(e,"utf8"),n.push(e)})),r.onClose((function(){o.end(),o.destroy()})),r.onError((function(t){o.destroy(new Error(t.errMsg))})),o}}).call(this)}).call(this,t("buffer").Buffer)},{buffer:14,duplexify:17,"readable-stream":51}],7:[function(t,e,i){"use strict";var r=t("xtend"),n=t("readable-stream").Readable,o={objectMode:!0},s={clean:!0};function a(t){if(!(this instanceof a))return new a(t);this.options=t||{},this.options=r(s,t),this._inflights=new Map}a.prototype.put=function(t,e){return this._inflights.set(t.messageId,t),e&&e(),this},a.prototype.createStream=function(){var t=new n(o),e=!1,i=[],r=0;return this._inflights.forEach((function(t,e){i.push(t)})),t._read=function(){!e&&r0?s-4:s;for(i=0;i>16&255,c[h++]=e>>8&255,c[h++]=255&e;return 2===a&&(e=n[t.charCodeAt(i)]<<2|n[t.charCodeAt(i+1)]>>4,c[h++]=255&e),1===a&&(e=n[t.charCodeAt(i)]<<10|n[t.charCodeAt(i+1)]<<4|n[t.charCodeAt(i+2)]>>2,c[h++]=e>>8&255,c[h++]=255&e),c},i.fromByteArray=function(t){for(var e,i=t.length,n=i%3,o=[],s=0,a=i-n;sa?a:s+16383));return 1===n?(e=t[i-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===n&&(e=(t[i-2]<<8)+t[i-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,c=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var i=t.indexOf("=");return-1===i&&(i=e),[i,i===e?0:4-i%4]}function h(t,e,i){for(var n,o,s=[],a=e;a>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},{}],11:[function(t,e,i){"use strict";const{Buffer:r}=t("buffer"),n=Symbol.for("BufferList");function o(t){if(!(this instanceof o))return new o(t);o._init.call(this,t)}o._init=function(t){Object.defineProperty(this,n,{value:!0}),this._bufs=[],this.length=0,t&&this.append(t)},o.prototype._new=function(t){return new o(t)},o.prototype._offset=function(t){if(0===t)return[0,0];let e=0;for(let i=0;ithis.length||t<0)return;const e=this._offset(t);return this._bufs[e[0]][e[1]]},o.prototype.slice=function(t,e){return"number"==typeof t&&t<0&&(t+=this.length),"number"==typeof e&&e<0&&(e+=this.length),this.copy(null,0,t,e)},o.prototype.copy=function(t,e,i,n){if(("number"!=typeof i||i<0)&&(i=0),("number"!=typeof n||n>this.length)&&(n=this.length),i>=this.length)return t||r.alloc(0);if(n<=0)return t||r.alloc(0);const o=!!t,s=this._offset(i),a=n-i;let c=a,l=o&&e||0,h=s[1];if(0===i&&n===this.length){if(!o)return 1===this._bufs.length?this._bufs[0]:r.concat(this._bufs,this.length);for(let e=0;ei)){this._bufs[e].copy(t,l,h,h+c),l+=i;break}this._bufs[e].copy(t,l,h),l+=i,c-=i,h&&(h=0)}return t.length>l?t.slice(0,l):t},o.prototype.shallowSlice=function(t,e){if(t=t||0,e="number"!=typeof e?this.length:e,t<0&&(t+=this.length),e<0&&(e+=this.length),t===e)return this._new();const i=this._offset(t),r=this._offset(e),n=this._bufs.slice(i[0],r[0]+1);return 0===r[1]?n.pop():n[n.length-1]=n[n.length-1].slice(0,r[1]),0!==i[1]&&(n[0]=n[0].slice(i[1])),this._new(n)},o.prototype.toString=function(t,e,i){return this.slice(e,i).toString(t)},o.prototype.consume=function(t){if(t=Math.trunc(t),Number.isNaN(t)||t<=0)return this;for(;this._bufs.length;){if(!(t>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},o.prototype.duplicate=function(){const t=this._new();for(let e=0;ethis.length?this.length:e;const n=this._offset(e);let o=n[0],s=n[1];for(;o=t.length){const i=e.indexOf(t,s);if(-1!==i)return this._reverseOffset([o,i]);s=e.length-t.length+1}else{const e=this._reverseOffset([o,s]);if(this._match(e,t))return e;s++}s=0}return-1},o.prototype._match=function(t,e){if(this.length-tn)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return e.__proto__=s.prototype,e}function s(t,e,i){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return l(t)}return a(t,e,i)}function a(t,e,i){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!s.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var i=0|d(t,e),r=o(i),n=r.write(t,e);return n!==i&&(r=r.slice(0,n)),r}(t,e);if(ArrayBuffer.isView(t))return h(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(j(t,ArrayBuffer)||t&&j(t.buffer,ArrayBuffer))return function(t,e,i){if(e<0||t.byteLength=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return 0|t}function d(t,e){if(s.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||j(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var i=t.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===i)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return O(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return B(t).length;default:if(n)return r?-1:O(t).length;e=(""+e).toLowerCase(),n=!0}}function p(t,e,i){var r=t[e];t[e]=t[i],t[i]=r}function f(t,e,i,r,n){if(0===t.length)return-1;if("string"==typeof i?(r=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),F(i=+i)&&(i=n?0:t.length-1),i<0&&(i=t.length+i),i>=t.length){if(n)return-1;i=t.length-1}else if(i<0){if(!n)return-1;i=0}if("string"==typeof e&&(e=s.from(e,r)),s.isBuffer(e))return 0===e.length?-1:v(t,e,i,r,n);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(t,e,i):Uint8Array.prototype.lastIndexOf.call(t,e,i):v(t,[e],i,r,n);throw new TypeError("val must be string, number or Buffer")}function v(t,e,i,r,n){var o,s=1,a=t.length,c=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,a/=2,c/=2,i/=2}function l(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(n){var h=-1;for(o=i;oa&&(i=a-c),o=i;o>=0;o--){for(var u=!0,d=0;dn&&(r=n):r=n;var o=e.length;r>o/2&&(r=o/2);for(var s=0;s>8,n=i%256,o.push(n),o.push(r);return o}(e,t.length-i),t,i,r)}function R(t,i,r){return 0===i&&r===t.length?e.fromByteArray(t):e.fromByteArray(t.slice(i,r))}function _(t,e,i){i=Math.min(t.length,i);for(var r=[],n=e;n239?4:l>223?3:l>191?2:1;if(n+u<=i)switch(u){case 1:l<128&&(h=l);break;case 2:128==(192&(o=t[n+1]))&&(c=(31&l)<<6|63&o)>127&&(h=c);break;case 3:o=t[n+1],s=t[n+2],128==(192&o)&&128==(192&s)&&(c=(15&l)<<12|(63&o)<<6|63&s)>2047&&(c<55296||c>57343)&&(h=c);break;case 4:o=t[n+1],s=t[n+2],a=t[n+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(c=(15&l)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&c<1114112&&(h=c)}null===h?(h=65533,u=1):h>65535&&(h-=65536,r.push(h>>>10&1023|55296),h=56320|1023&h),r.push(h),n+=u}return function(t){var e=t.length;if(e<=k)return String.fromCharCode.apply(String,t);for(var i="",r=0;rthis.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return E(this,e,i);case"utf8":case"utf-8":return _(this,e,i);case"ascii":return A(this,e,i);case"latin1":case"binary":return S(this,e,i);case"base64":return R(this,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,i);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var t="",e=i.INSPECT_MAX_BYTES;return t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(t+=" ... "),""},s.prototype.compare=function(t,e,i,r,n){if(j(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===i&&(i=t?t.length:0),void 0===r&&(r=0),void 0===n&&(n=this.length),e<0||i>t.length||r<0||n>this.length)throw new RangeError("out of range index");if(r>=n&&e>=i)return 0;if(r>=n)return-1;if(e>=i)return 1;if(this===t)return 0;for(var o=(n>>>=0)-(r>>>=0),a=(i>>>=0)-(e>>>=0),c=Math.min(o,a),l=this.slice(r,n),h=t.slice(e,i),u=0;u>>=0,isFinite(i)?(i>>>=0,void 0===r&&(r="utf8")):(r=i,i=void 0)}var n=this.length-e;if((void 0===i||i>n)&&(i=n),t.length>0&&(i<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return y(this,t,e,i);case"utf8":case"utf-8":return g(this,t,e,i);case"ascii":return w(this,t,e,i);case"latin1":case"binary":return m(this,t,e,i);case"base64":return x(this,t,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return b(this,t,e,i);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var k=4096;function A(t,e,i){var r="";i=Math.min(t.length,i);for(var n=e;nr)&&(i=r);for(var n="",o=e;oi)throw new RangeError("Trying to access beyond buffer length")}function P(t,e,i,r,n,o){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>n||et.length)throw new RangeError("Index out of range")}function C(t,e,i,r,n,o){if(i+r>t.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function L(t,e,i,n,o){return e=+e,i>>>=0,o||C(t,0,i,4),r.write(t,e,i,n,23,4),i+4}function M(t,e,i,n,o){return e=+e,i>>>=0,o||C(t,0,i,8),r.write(t,e,i,n,52,8),i+8}s.prototype.slice=function(t,e){var i=this.length;(t=~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),(e=void 0===e?i:~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),e>>=0,e>>>=0,i||I(t,e,this.length);for(var r=this[t],n=1,o=0;++o>>=0,e>>>=0,i||I(t,e,this.length);for(var r=this[t+--e],n=1;e>0&&(n*=256);)r+=this[t+--e]*n;return r},s.prototype.readUInt8=function(t,e){return t>>>=0,e||I(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,e){return t>>>=0,e||I(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,e){return t>>>=0,e||I(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,e){return t>>>=0,e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,e){return t>>>=0,e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,e,i){t>>>=0,e>>>=0,i||I(t,e,this.length);for(var r=this[t],n=1,o=0;++o=(n*=128)&&(r-=Math.pow(2,8*e)),r},s.prototype.readIntBE=function(t,e,i){t>>>=0,e>>>=0,i||I(t,e,this.length);for(var r=e,n=1,o=this[t+--r];r>0&&(n*=256);)o+=this[t+--r]*n;return o>=(n*=128)&&(o-=Math.pow(2,8*e)),o},s.prototype.readInt8=function(t,e){return t>>>=0,e||I(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){t>>>=0,e||I(t,2,this.length);var i=this[t]|this[t+1]<<8;return 32768&i?4294901760|i:i},s.prototype.readInt16BE=function(t,e){t>>>=0,e||I(t,2,this.length);var i=this[t+1]|this[t]<<8;return 32768&i?4294901760|i:i},s.prototype.readInt32LE=function(t,e){return t>>>=0,e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return t>>>=0,e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,e){return t>>>=0,e||I(t,4,this.length),r.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return t>>>=0,e||I(t,4,this.length),r.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return t>>>=0,e||I(t,8,this.length),r.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return t>>>=0,e||I(t,8,this.length),r.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,e,i,r){t=+t,e>>>=0,i>>>=0,r||P(this,t,e,i,Math.pow(2,8*i)-1,0);var n=1,o=0;for(this[e]=255&t;++o>>=0,i>>>=0,r||P(this,t,e,i,Math.pow(2,8*i)-1,0);var n=i-1,o=1;for(this[e+n]=255&t;--n>=0&&(o*=256);)this[e+n]=t/o&255;return e+i},s.prototype.writeUInt8=function(t,e,i){return t=+t,e>>>=0,i||P(this,t,e,1,255,0),this[e]=255&t,e+1},s.prototype.writeUInt16LE=function(t,e,i){return t=+t,e>>>=0,i||P(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeUInt16BE=function(t,e,i){return t=+t,e>>>=0,i||P(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeUInt32LE=function(t,e,i){return t=+t,e>>>=0,i||P(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},s.prototype.writeUInt32BE=function(t,e,i){return t=+t,e>>>=0,i||P(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeIntLE=function(t,e,i,r){if(t=+t,e>>>=0,!r){var n=Math.pow(2,8*i-1);P(this,t,e,i,n-1,-n)}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+i},s.prototype.writeIntBE=function(t,e,i,r){if(t=+t,e>>>=0,!r){var n=Math.pow(2,8*i-1);P(this,t,e,i,n-1,-n)}var o=i-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+i},s.prototype.writeInt8=function(t,e,i){return t=+t,e>>>=0,i||P(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,i){return t=+t,e>>>=0,i||P(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeInt16BE=function(t,e,i){return t=+t,e>>>=0,i||P(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeInt32LE=function(t,e,i){return t=+t,e>>>=0,i||P(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},s.prototype.writeInt32BE=function(t,e,i){return t=+t,e>>>=0,i||P(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeFloatLE=function(t,e,i){return L(this,t,e,!0,i)},s.prototype.writeFloatBE=function(t,e,i){return L(this,t,e,!1,i)},s.prototype.writeDoubleLE=function(t,e,i){return M(this,t,e,!0,i)},s.prototype.writeDoubleBE=function(t,e,i){return M(this,t,e,!1,i)},s.prototype.copy=function(t,e,i,r){if(!s.isBuffer(t))throw new TypeError("argument should be a Buffer");if(i||(i=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e=0;--o)t[o+e]=this[o+i];else Uint8Array.prototype.set.call(t,this.subarray(i,r),e);return n},s.prototype.fill=function(t,e,i,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,i=this.length):"string"==typeof i&&(r=i,i=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!s.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===t.length){var n=t.charCodeAt(0);("utf8"===r&&n<128||"latin1"===r)&&(t=n)}}else"number"==typeof t&&(t&=255);if(e<0||this.length>>=0,i=void 0===i?this.length:i>>>0,t||(t=0),"number"==typeof t)for(o=e;o55295&&i<57344){if(!n){if(i>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&o.push(239,191,189);continue}n=i;continue}if(i<56320){(e-=3)>-1&&o.push(239,191,189),n=i;continue}i=65536+(n-55296<<10|i-56320)}else n&&(e-=3)>-1&&o.push(239,191,189);if(n=null,i<128){if((e-=1)<0)break;o.push(i)}else if(i<2048){if((e-=2)<0)break;o.push(i>>6|192,63&i|128)}else if(i<65536){if((e-=3)<0)break;o.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return o}function B(t){return e.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(D,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function U(t,e,i,r){for(var n=0;n=e.length||n>=t.length);++n)e[n+i]=t[n];return n}function j(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function F(t){return t!=t}}).call(this)}).call(this,t("buffer").Buffer)},{"base64-js":10,buffer:14,ieee754:20}],15:[function(t,e,i){(function(r){(function(){i.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const i="color: "+this.color;t.splice(1,0,i,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&"%c"===t&&(n=++r)})),t.splice(n,0,i)},i.save=function(t){try{t?i.storage.setItem("debug",t):i.storage.removeItem("debug")}catch(t){}},i.load=function(){let t;try{t=i.storage.getItem("debug")}catch(t){}return!t&&void 0!==r&&"env"in r&&(t=r.env.DEBUG),t},i.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},i.storage=function(){try{return localStorage}catch(t){}}(),i.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),i.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],i.log=console.debug||console.log||(()=>{}),e.exports=t("./common")(i);const{formatters:n}=e.exports;n.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}).call(this)}).call(this,t("_process"))},{"./common":16,_process:32}],16:[function(t,e,i){e.exports=function(e){function i(t){let e,n=null;function o(...t){if(!o.enabled)return;const r=o,n=Number(new Date),s=n-(e||n);r.diff=s,r.prev=e,r.curr=n,e=n,t[0]=i.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let a=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((e,n)=>{if("%%"===e)return"%";a++;const o=i.formatters[n];if("function"==typeof o){const i=t[a];e=o.call(r,i),t.splice(a,1),a--}return e})),i.formatArgs.call(r,t),(r.log||i.log).apply(r,t)}return o.namespace=t,o.useColors=i.useColors(),o.color=i.selectColor(t),o.extend=r,o.destroy=i.destroy,Object.defineProperty(o,"enabled",{enumerable:!0,configurable:!1,get:()=>null===n?i.enabled(t):n,set:t=>{n=t}}),"function"==typeof i.init&&i.init(o),o}function r(t,e){const r=i(this.namespace+(void 0===e?":":e)+t);return r.log=this.log,r}function n(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return i.debug=i,i.default=i,i.coerce=function(t){return t instanceof Error?t.stack||t.message:t},i.disable=function(){const t=[...i.names.map(n),...i.skips.map(n).map((t=>"-"+t))].join(",");return i.enable(""),t},i.enable=function(t){let e;i.save(t),i.names=[],i.skips=[];const r=("string"==typeof t?t:"").split(/[\s,]+/),n=r.length;for(e=0;e{i[t]=e[t]})),i.names=[],i.skips=[],i.formatters={},i.selectColor=function(t){let e=0;for(let i=0;i0&&a.length>o){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+' "'+String(e)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=a.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",c.name,c.message)}}else a=s[e]=i,++t._eventsCount;return t}function d(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var t=new Array(arguments.length),e=0;e1&&(e=arguments[1]),e instanceof Error)throw e;var c=new Error('Unhandled "error" event. ('+e+")");throw c.context=e,c}if(!(i=s[t]))return!1;var l="function"==typeof i;switch(r=arguments.length){case 1:!function(t,e,i){if(e)t.call(i);else for(var r=t.length,n=y(t,r),o=0;o=0;s--)if(i[s]===e||i[s].listener===e){a=i[s].listener,o=s;break}if(o<0)return this;0===o?i.shift():function(t,e){for(var i=e,r=i+1,n=t.length;r=0;o--)this.removeListener(t,e[o]);return this},s.prototype.listeners=function(t){return f(this,t,!0)},s.prototype.rawListeners=function(t){return f(this,t,!1)},s.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):v.call(t,e)},s.prototype.listenerCount=v,s.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],20:[function(t,e,i){i.read=function(t,e,i,r,n){var o,s,a=8*n-r-1,c=(1<>1,h=-7,u=i?n-1:0,d=i?-1:1,p=t[e+u];for(u+=d,o=p&(1<<-h)-1,p>>=-h,h+=a;h>0;o=256*o+t[e+u],u+=d,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=r;h>0;s=256*s+t[e+u],u+=d,h-=8);if(0===o)o=1-l;else{if(o===c)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),o-=l}return(p?-1:1)*s*Math.pow(2,o-r)},i.write=function(t,e,i,r,n,o){var s,a,c,l=8*o-n-1,h=(1<>1,d=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,f=r?1:-1,v=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),(e+=s+u>=1?d/c:d*Math.pow(2,1-u))*c>=2&&(s++,c/=2),s+u>=h?(a=0,s=h):s+u>=1?(a=(e*c-1)*Math.pow(2,n),s+=u):(a=e*Math.pow(2,u-1)*Math.pow(2,n),s=0));n>=8;t[i+p]=255&a,p+=f,a/=256,n-=8);for(s=s<0;t[i+p]=255&s,p+=f,s/=256,l-=8);t[i+p-f]|=128*v}},{}],21:[function(t,e,i){"function"==typeof Object.create?e.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(t,e){if(e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}}},{}],22:[function(t,e,i){(function(t){(function(){const i=e.exports;i.types={0:"reserved",1:"connect",2:"connack",3:"publish",4:"puback",5:"pubrec",6:"pubrel",7:"pubcomp",8:"subscribe",9:"suback",10:"unsubscribe",11:"unsuback",12:"pingreq",13:"pingresp",14:"disconnect",15:"auth"},i.codes={};for(const t in i.types){const e=i.types[t];i.codes[e]=t}i.CMD_SHIFT=4,i.CMD_MASK=240,i.DUP_MASK=8,i.QOS_MASK=3,i.QOS_SHIFT=1,i.RETAIN_MASK=1,i.VARBYTEINT_MASK=127,i.VARBYTEINT_FIN_MASK=128,i.VARBYTEINT_MAX=268435455,i.SESSIONPRESENT_MASK=1,i.SESSIONPRESENT_HEADER=t.from([i.SESSIONPRESENT_MASK]),i.CONNACK_HEADER=t.from([i.codes.connack<[0,1].map((n=>[0,1].map((o=>{const s=t.alloc(1);return s.writeUInt8(i.codes[e]<t.from([e]))),i.EMPTY={pingreq:t.from([i.codes.pingreq<<4,0]),pingresp:t.from([i.codes.pingresp<<4,0]),disconnect:t.from([i.codes.disconnect<<4,0])}}).call(this)}).call(this,t("buffer").Buffer)},{buffer:14}],23:[function(t,e,i){(function(i){(function(){const r=t("./writeToStream"),n=t("events");class o extends n{constructor(){super(),this._array=new Array(20),this._i=0}write(t){return this._array[this._i++]=t,!0}concat(){let t=0;const e=new Array(this._array.length),r=this._array;let n,o=0;for(n=0;n>8,0),i.writeUInt8(255&e,1),i}e.exports={cache:i,generateCache:function(){for(let t=0;t<65536;t++)i[t]=n(t)},generateNumber:n,genBufVariableByteInt:function(e){let i=0,n=0;const o=t.allocUnsafe(4);do{i=e%128|0,(e=e/128|0)>0&&(i|=128),o.writeUInt8(i,n++)}while(e>0&&n<4);return e>0&&(n=0),r?o.subarray(0,n):o.slice(0,n)},generate4ByteBuffer:function(e){const i=t.allocUnsafe(4);return i.writeUInt32BE(e,0),i}}}).call(this)}).call(this,t("buffer").Buffer)},{buffer:14}],26:[function(t,e,i){e.exports=class{constructor(){this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null}}},{}],27:[function(t,e,i){const r=t("bl"),n=t("events"),o=t("./packet"),s=t("./constants"),a=t("debug")("mqtt-packet:parser");class c extends n{constructor(){super(),this.parser=this.constructor.parser}static parser(t){return this instanceof c?(this.settings=t||{},this._states=["_parseHeader","_parseLength","_parsePayload","_newPacket"],this._resetState(),this):(new c).parser(t)}_resetState(){a("_resetState: resetting packet, error, _list, and _stateCounter"),this.packet=new o,this.error=null,this._list=r(),this._stateCounter=0}parse(t){for(this.error&&this._resetState(),this._list.append(t),a("parse: current state: %s",this._states[this._stateCounter]);(-1!==this.packet.length||this._list.length>0)&&this[this._states[this._stateCounter]]()&&!this.error;)this._stateCounter++,a("parse: state complete. _stateCounter is now: %d",this._stateCounter),a("parse: packet.length: %d, buffer list length: %d",this.packet.length,this._list.length),this._stateCounter>=this._states.length&&(this._stateCounter=0);return a("parse: exited while loop. packet: %d, buffer list length: %d",this.packet.length,this._list.length),this._list.length}_parseHeader(){const t=this._list.readUInt8(0);return this.packet.cmd=s.types[t>>s.CMD_SHIFT],this.packet.retain=0!=(t&s.RETAIN_MASK),this.packet.qos=t>>s.QOS_SHIFT&s.QOS_MASK,this.packet.dup=0!=(t&s.DUP_MASK),a("_parseHeader: packet: %o",this.packet),this._list.consume(1),!0}_parseLength(){const t=this._parseVarByteNum(!0);return t&&(this.packet.length=t.value,this._list.consume(t.bytes)),a("_parseLength %d",t.value),!!t}_parsePayload(){a("_parsePayload: payload %O",this._list);let t=!1;if(0===this.packet.length||this._list.length>=this.packet.length){switch(this._pos=0,this.packet.cmd){case"connect":this._parseConnect();break;case"connack":this._parseConnack();break;case"publish":this._parsePublish();break;case"puback":case"pubrec":case"pubrel":case"pubcomp":this._parseConfirmation();break;case"subscribe":this._parseSubscribe();break;case"suback":this._parseSuback();break;case"unsubscribe":this._parseUnsubscribe();break;case"unsuback":this._parseUnsuback();break;case"pingreq":case"pingresp":break;case"disconnect":this._parseDisconnect();break;case"auth":this._parseAuth();break;default:this._emitError(new Error("Not supported"))}t=!0}return a("_parsePayload complete result: %s",t),t}_parseConnect(){let t,e,i,r;a("_parseConnect");const n={},o=this.packet,c=this._parseString();if(null===c)return this._emitError(new Error("Cannot parse protocolId"));if("MQTT"!==c&&"MQIsdp"!==c)return this._emitError(new Error("Invalid protocolId"));if(o.protocolId=c,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(o.protocolVersion=this._list.readUInt8(this._pos),o.protocolVersion>=128&&(o.bridgeMode=!0,o.protocolVersion=o.protocolVersion-128),3!==o.protocolVersion&&4!==o.protocolVersion&&5!==o.protocolVersion)return this._emitError(new Error("Invalid protocol version"));if(this._pos++,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(n.username=this._list.readUInt8(this._pos)&s.USERNAME_MASK,n.password=this._list.readUInt8(this._pos)&s.PASSWORD_MASK,n.will=this._list.readUInt8(this._pos)&s.WILL_FLAG_MASK,n.will&&(o.will={},o.will.retain=0!=(this._list.readUInt8(this._pos)&s.WILL_RETAIN_MASK),o.will.qos=(this._list.readUInt8(this._pos)&s.WILL_QOS_MASK)>>s.WILL_QOS_SHIFT),o.clean=0!=(this._list.readUInt8(this._pos)&s.CLEAN_SESSION_MASK),this._pos++,o.keepalive=this._parseNum(),-1===o.keepalive)return this._emitError(new Error("Packet too short"));if(5===o.protocolVersion){const t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(o.properties=t)}const l=this._parseString();if(null===l)return this._emitError(new Error("Packet too short"));if(o.clientId=l,a("_parseConnect: packet.clientId: %s",o.clientId),n.will){if(5===o.protocolVersion){const t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(o.will.properties=t)}if(null===(t=this._parseString()))return this._emitError(new Error("Cannot parse will topic"));if(o.will.topic=t,a("_parseConnect: packet.will.topic: %s",o.will.topic),null===(e=this._parseBuffer()))return this._emitError(new Error("Cannot parse will payload"));o.will.payload=e,a("_parseConnect: packet.will.paylaod: %s",o.will.payload)}if(n.username){if(null===(r=this._parseString()))return this._emitError(new Error("Cannot parse username"));o.username=r,a("_parseConnect: packet.username: %s",o.username)}if(n.password){if(null===(i=this._parseBuffer()))return this._emitError(new Error("Cannot parse password"));o.password=i}return this.settings=o,a("_parseConnect: complete"),o}_parseConnack(){a("_parseConnack");const t=this.packet;if(this._list.length<1)return null;if(t.sessionPresent=!!(this._list.readUInt8(this._pos++)&s.SESSIONPRESENT_MASK),5===this.settings.protocolVersion)this._list.length>=2?t.reasonCode=this._list.readUInt8(this._pos++):t.reasonCode=0;else{if(this._list.length<2)return null;t.returnCode=this._list.readUInt8(this._pos++)}if(-1===t.returnCode||-1===t.reasonCode)return this._emitError(new Error("Cannot parse return code"));if(5===this.settings.protocolVersion){const e=this._parseProperties();Object.getOwnPropertyNames(e).length&&(t.properties=e)}a("_parseConnack: complete")}_parsePublish(){a("_parsePublish");const t=this.packet;if(t.topic=this._parseString(),null===t.topic)return this._emitError(new Error("Cannot parse topic"));if(!(t.qos>0)||this._parseMessageId()){if(5===this.settings.protocolVersion){const e=this._parseProperties();Object.getOwnPropertyNames(e).length&&(t.properties=e)}t.payload=this._list.slice(this._pos,t.length),a("_parsePublish: payload from buffer list: %o",t.payload)}}_parseSubscribe(){a("_parseSubscribe");const t=this.packet;let e,i,r,n,o,c,l;if(1!==t.qos)return this._emitError(new Error("Wrong subscribe header"));if(t.subscriptions=[],this._parseMessageId()){if(5===this.settings.protocolVersion){const e=this._parseProperties();Object.getOwnPropertyNames(e).length&&(t.properties=e)}for(;this._pos=t.length)return this._emitError(new Error("Malformed Subscribe Payload"));r=(i=this._parseByte())&s.SUBSCRIBE_OPTIONS_QOS_MASK,c=0!=(i>>s.SUBSCRIBE_OPTIONS_NL_SHIFT&s.SUBSCRIBE_OPTIONS_NL_MASK),o=0!=(i>>s.SUBSCRIBE_OPTIONS_RAP_SHIFT&s.SUBSCRIBE_OPTIONS_RAP_MASK),n=i>>s.SUBSCRIBE_OPTIONS_RH_SHIFT&s.SUBSCRIBE_OPTIONS_RH_MASK,l={topic:e,qos:r},5===this.settings.protocolVersion?(l.nl=c,l.rap=o,l.rh=n):this.settings.bridgeMode&&(l.rh=0,l.rap=!0,l.nl=!0),a("_parseSubscribe: push subscription `%s` to subscription",l),t.subscriptions.push(l)}}}_parseSuback(){a("_parseSuback");const t=this.packet;if(this.packet.granted=[],this._parseMessageId()){if(5===this.settings.protocolVersion){const e=this._parseProperties();Object.getOwnPropertyNames(e).length&&(t.properties=e)}for(;this._pos2?(t.reasonCode=this._parseByte(),a("_parseConfirmation: packet.reasonCode `%d`",t.reasonCode)):t.reasonCode=0,t.length>3)){const e=this._parseProperties();Object.getOwnPropertyNames(e).length&&(t.properties=e)}return!0}_parseDisconnect(){const t=this.packet;if(a("_parseDisconnect"),5===this.settings.protocolVersion){this._list.length>0?t.reasonCode=this._parseByte():t.reasonCode=0;const e=this._parseProperties();Object.getOwnPropertyNames(e).length&&(t.properties=e)}return a("_parseDisconnect result: true"),!0}_parseAuth(){a("_parseAuth");const t=this.packet;if(5!==this.settings.protocolVersion)return this._emitError(new Error("Not supported auth packet for this version MQTT"));t.reasonCode=this._parseByte();const e=this._parseProperties();return Object.getOwnPropertyNames(e).length&&(t.properties=e),a("_parseAuth: result: true"),!0}_parseMessageId(){const t=this.packet;return t.messageId=this._parseNum(),null===t.messageId?(this._emitError(new Error("Cannot parse messageId")),!1):(a("_parseMessageId: packet.messageId %d",t.messageId),!0)}_parseString(t){const e=this._parseNum(),i=e+this._pos;if(-1===e||i>this._list.length||i>this.packet.length)return null;const r=this._list.toString("utf8",this._pos,i);return this._pos+=e,a("_parseString: result: %s",r),r}_parseStringPair(){return a("_parseStringPair"),{name:this._parseString(),value:this._parseString()}}_parseBuffer(){const t=this._parseNum(),e=t+this._pos;if(-1===t||e>this._list.length||e>this.packet.length)return null;const i=this._list.slice(this._pos,e);return this._pos+=t,a("_parseBuffer: result: %o",i),i}_parseNum(){if(this._list.length-this._pos<2)return-1;const t=this._list.readUInt16BE(this._pos);return this._pos+=2,a("_parseNum: result: %s",t),t}_parse4ByteNum(){if(this._list.length-this._pos<4)return-1;const t=this._list.readUInt32BE(this._pos);return this._pos+=4,a("_parse4ByteNum: result: %s",t),t}_parseVarByteNum(t){a("_parseVarByteNum");let e,i=0,r=1,n=0,o=!1;const c=this._pos?this._pos:0;for(;i<4&&c+i=i&&this._emitError(new Error("Invalid variable byte integer")),c&&(this._pos+=i),a("_parseVarByteNum: result: %o",o=!!o&&(t?{bytes:i,value:n}:n)),o}_parseByte(){let t;return this._pos=4)&&(u||l))y+=i.byteLength(u)+2;else{if(a<4)return e.emit("error",new Error("clientId must be supplied before 3.1.1")),!1;if(1*l==0)return e.emit("error",new Error("clientId must be given if cleanSession set to 0")),!1}if("number"!=typeof h||h<0||h>65535||h%1!=0)return e.emit("error",new Error("Invalid keepalive")),!1;if(y+=2,y+=1,5===a){var g=A(e,v);if(!g)return!1;y+=g.length}if(c){if("object"!=typeof c)return e.emit("error",new Error("Invalid will")),!1;if(!c.topic||"string"!=typeof c.topic)return e.emit("error",new Error("Invalid will topic")),!1;if(y+=i.byteLength(c.topic)+2,y+=2,c.payload){if(!(c.payload.length>=0))return e.emit("error",new Error("Invalid will payload")),!1;"string"==typeof c.payload?y+=i.byteLength(c.payload):y+=c.payload.length}var w={};if(5===a){if(!(w=A(e,c.properties)))return!1;y+=w.length}}let b=!1;if(null!=d){if(!P(d))return e.emit("error",new Error("Invalid username")),!1;b=!0,y+=i.byteLength(d)+2}if(null!=p){if(!b)return e.emit("error",new Error("Username is required to use password")),!1;if(!P(p))return e.emit("error",new Error("Invalid password")),!1;y+=I(p)+2}e.write(r.CONNECT_HEADER),m(e,y),k(e,s),o.bridgeMode&&(a+=128),e.write(131===a?r.VERSION131:132===a?r.VERSION132:4===a?r.VERSION4:5===a?r.VERSION5:r.VERSION3);let R=0;return R|=null!=d?r.USERNAME_MASK:0,R|=null!=p?r.PASSWORD_MASK:0,R|=c&&c.retain?r.WILL_RETAIN_MASK:0,R|=c&&c.qos?c.qos<0&&f(e,p),null!=g&&g.write(),c("publish: payload: %o",d),e.write(d)}(t,e,s);case"puback":case"pubrec":case"pubrel":case"pubcomp":return function(t,e,n){const o=n?n.protocolVersion:4,s=t||{},a=s.cmd||"puback",c=s.messageId,l=s.dup&&"pubrel"===a?r.DUP_MASK:0;let h=0;const u=s.reasonCode,d=s.properties;let p=5===o?3:2;if("pubrel"===a&&(h=1),"number"!=typeof c)return e.emit("error",new Error("Invalid messageId")),!1;let v=null;if(5===o&&"object"==typeof d){if(!(v=S(e,d,n,p)))return!1;p+=v.length}return e.write(r.ACKS[a][h][l][0]),m(e,p),f(e,c),5===o&&e.write(i.from([u])),null!==v&&v.write(),!0}(t,e,s);case"subscribe":return function(t,e,n){c("subscribe: packet: ");const o=n?n.protocolVersion:4,s=t||{},a=s.dup?r.DUP_MASK:0,l=s.messageId,h=s.subscriptions,u=s.properties;let d=0;if("number"!=typeof l)return e.emit("error",new Error("Invalid messageId")),!1;d+=2;let p=null;if(5===o){if(!(p=A(e,u)))return!1;d+=p.length}if("object"!=typeof h||!h.length)return e.emit("error",new Error("Invalid subscriptions")),!1;for(let t=0;t2)return e.emit("error",new Error("Invalid subscriptions - invalid Retain Handling")),!1}d+=i.byteLength(r)+2+1}c("subscribe: writing to stream: %o",r.SUBSCRIBE_HEADER),e.write(r.SUBSCRIBE_HEADER[1][a?1:0][0]),m(e,d),f(e,l),null!==p&&p.write();let v=!0;for(const t of h){const n=t.topic,s=t.qos,a=+t.nl,c=+t.rap,l=t.rh;let h;x(e,n),h=r.SUBSCRIBE_OPTIONS_QOS[s],5===o&&(h|=a?r.SUBSCRIBE_OPTIONS_NL:0,h|=c?r.SUBSCRIBE_OPTIONS_RAP:0,h|=l?r.SUBSCRIBE_OPTIONS_RH[l]:0),v=e.write(i.from([h]))}return v}(t,e,s);case"suback":return function(t,e,n){const o=n?n.protocolVersion:4,s=t||{},a=s.messageId,c=s.granted,l=s.properties;let h=0;if("number"!=typeof a)return e.emit("error",new Error("Invalid messageId")),!1;if(h+=2,"object"!=typeof c||!c.length)return e.emit("error",new Error("Invalid qos vector")),!1;for(let t=0;tf===R,set(t){t?(l&&0!==Object.keys(l).length||(v=!0),f=R):(v=!1,f=_)}});const w={};function m(t,e){if(e>r.VARBYTEINT_MAX)return t.emit("error",new Error(`Invalid variable byte integer: ${e}`)),!1;let i=w[e];return i||(i=d(e),e<16384&&(w[e]=i)),c("writeVarByteInt: writing to stream: %o",i),t.write(i)}function x(t,e){const r=i.byteLength(e);return f(t,r),c("writeString: %s",e),t.write(e,"utf8")}function b(t,e,i){x(t,e),x(t,i)}function R(t,e){return c("writeNumberCached: number: %d",e),c("writeNumberCached: %o",l[e]),t.write(l[e])}function _(t,e){const i=h(e);return c("writeNumberGenerated: %o",i),t.write(i)}function k(t,e){"string"==typeof e?x(t,e):e?(f(t,e.length),t.write(e)):f(t,0)}function A(t,e){if("object"!=typeof e||null!=e.length)return{length:1,write(){T(t,{},0)}};let n=0;function o(e,n){let o=0;switch(r.propertiesTypes[e]){case"byte":if("boolean"!=typeof n)return t.emit("error",new Error(`Invalid ${e}: ${n}`)),!1;o+=2;break;case"int8":if("number"!=typeof n||n<0||n>255)return t.emit("error",new Error(`Invalid ${e}: ${n}`)),!1;o+=2;break;case"binary":if(n&&null===n)return t.emit("error",new Error(`Invalid ${e}: ${n}`)),!1;o+=1+i.byteLength(n)+2;break;case"int16":if("number"!=typeof n||n<0||n>65535)return t.emit("error",new Error(`Invalid ${e}: ${n}`)),!1;o+=3;break;case"int32":if("number"!=typeof n||n<0||n>4294967295)return t.emit("error",new Error(`Invalid ${e}: ${n}`)),!1;o+=5;break;case"var":if("number"!=typeof n||n<0||n>268435455)return t.emit("error",new Error(`Invalid ${e}: ${n}`)),!1;o+=1+i.byteLength(d(n));break;case"string":if("string"!=typeof n)return t.emit("error",new Error(`Invalid ${e}: ${n}`)),!1;o+=3+i.byteLength(n.toString());break;case"pair":if("object"!=typeof n)return t.emit("error",new Error(`Invalid ${e}: ${n}`)),!1;o+=Object.getOwnPropertyNames(n).reduce(((t,e)=>{const r=n[e];return Array.isArray(r)?t+=r.reduce(((t,r)=>t+(3+i.byteLength(e.toString())+2+i.byteLength(r.toString()))),0):t+=3+i.byteLength(e.toString())+2+i.byteLength(n[e].toString()),t}),0);break;default:return t.emit("error",new Error(`Invalid property ${e}: ${n}`)),!1}return o}if(e)for(const t in e){let i=0,r=0;const s=e[t];if(Array.isArray(s))for(let e=0;eo;){const i=n.shift();if(!i||!e[i])return!1;delete e[i],s=A(t,e)}return s}function E(t,e,n){switch(r.propertiesTypes[e]){case"byte":t.write(i.from([r.properties[e]])),t.write(i.from([+n]));break;case"int8":t.write(i.from([r.properties[e]])),t.write(i.from([n]));break;case"binary":t.write(i.from([r.properties[e]])),k(t,n);break;case"int16":t.write(i.from([r.properties[e]])),f(t,n);break;case"int32":t.write(i.from([r.properties[e]])),function(t,e){const i=p(e);c("write4ByteNumber: %o",i),t.write(i)}(t,n);break;case"var":t.write(i.from([r.properties[e]])),m(t,n);break;case"string":t.write(i.from([r.properties[e]])),x(t,n);break;case"pair":Object.getOwnPropertyNames(n).forEach((o=>{const s=n[o];Array.isArray(s)?s.forEach((n=>{t.write(i.from([r.properties[e]])),b(t,o.toString(),n.toString())})):(t.write(i.from([r.properties[e]])),b(t,o.toString(),s.toString()))}));break;default:return t.emit("error",new Error(`Invalid property ${e} value: ${n}`)),!1}}function T(t,e,i){m(t,i);for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&null!==e[i]){const r=e[i];if(Array.isArray(r))for(let e=0;e=1.5*i;return Math.round(t/i)+" "+r+(n?"s":"")}e.exports=function(t,e){e=e||{};var i=typeof t;if("string"===i&&t.length>0)return function(t){if(!((t=String(t)).length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var i=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*i;case"weeks":case"week":case"w":return 6048e5*i;case"days":case"day":case"d":return i*s;case"hours":case"hour":case"hrs":case"hr":case"h":return i*o;case"minutes":case"minute":case"mins":case"min":case"m":return i*n;case"seconds":case"second":case"secs":case"sec":case"s":return i*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}}}(t);if("number"===i&&isFinite(t))return e.long?function(t){var e=Math.abs(t);return e>=s?a(t,e,s,"day"):e>=o?a(t,e,o,"hour"):e>=n?a(t,e,n,"minute"):e>=r?a(t,e,r,"second"):t+" ms"}(t):function(t){var e=Math.abs(t);return e>=s?Math.round(t/s)+"d":e>=o?Math.round(t/o)+"h":e>=n?Math.round(t/n)+"m":e>=r?Math.round(t/r)+"s":t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},{}],30:[function(t,e,i){var r=t("wrappy");function n(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function o(t){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)},i=t.name||"Function wrapped with `once`";return e.onceError=i+" shouldn't be called more than once",e.called=!1,e}e.exports=r(n),e.exports.strict=r(o),n.proto=n((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return n(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return o(this)},configurable:!0})}))},{wrappy:59}],31:[function(t,e,i){(function(t){(function(){"use strict";void 0===t||!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,i,r,n){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick((function(){e.call(null,i)}));case 3:return t.nextTick((function(){e.call(null,i,r)}));case 4:return t.nextTick((function(){e.call(null,i,r,n)}));default:for(o=new Array(a-1),s=0;s1)for(var i=1;i= 0x80 (not a basic code point)","invalid-input":"Invalid input"},v=Math.floor,y=String.fromCharCode;function g(t){throw new RangeError(f[t])}function w(t,e){for(var i=t.length,r=[];i--;)r[i]=e(t[i]);return r}function m(t,e){var i=t.split("@"),r="";return i.length>1&&(r=i[0]+"@",t=i[1]),r+w((t=t.replace(p,".")).split("."),e).join(".")}function x(t){for(var e,i,r=[],n=0,o=t.length;n=55296&&e<=56319&&n65535&&(e+=y((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+y(t)})).join("")}function R(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function _(t,e,i){var r=0;for(t=i?v(t/700):t>>1,t+=v(t/e);t>455;r+=h)t=v(t/35);return v(r+36*t/(t+38))}function k(t){var e,i,r,n,o,s,a,c,u,d,p,f=[],y=t.length,w=0,m=128,x=72;for((i=t.lastIndexOf("-"))<0&&(i=0),r=0;r=128&&g("not-basic"),f.push(t.charCodeAt(r));for(n=i>0?i+1:0;n=y&&g("invalid-input"),((c=(p=t.charCodeAt(n++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:h)>=h||c>v((l-w)/s))&&g("overflow"),w+=c*s,!(c<(u=a<=x?1:a>=x+26?26:a-x));a+=h)s>v(l/(d=h-u))&&g("overflow"),s*=d;x=_(w-o,e=f.length+1,0==o),v(w/e)>l-m&&g("overflow"),m+=v(w/e),w%=e,f.splice(w++,0,m)}return b(f)}function A(t){var e,i,r,n,o,s,a,c,u,d,p,f,w,m,b,k=[];for(f=(t=x(t)).length,e=128,i=0,o=72,s=0;s=e&&pv((l-i)/(w=r+1))&&g("overflow"),i+=(a-e)*w,e=a,s=0;sl&&g("overflow"),p==e){for(c=i,u=h;!(c<(d=u<=o?1:u>=o+26?26:u-o));u+=h)b=c-d,m=h-d,k.push(y(R(d+b%m,0))),c=v(b/m);k.push(y(R(c,0))),o=_(i,w,r==n),i=0,++r}++i,++e}return k.join("")}if(a={version:"1.4.1",ucs2:{decode:x,encode:b},decode:k,encode:A,toASCII:function(t){return m(t,(function(t){return d.test(t)?"xn--"+A(t):t}))},toUnicode:function(t){return m(t,(function(t){return u.test(t)?k(t.slice(4).toLowerCase()):t}))}},n&&o)if(e.exports==n)o.exports=a;else for(c in a)a.hasOwnProperty(c)&&(n[c]=a[c]);else i.punycode=a}(this)}).call(this)}).call(this,void 0!==i.g?i.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],34:[function(t,e,i){"use strict";function r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.exports=function(t,e,i,o){e=e||"&",i=i||"=";var s={};if("string"!=typeof t||0===t.length)return s;var a=/\+/g;t=t.split(e);var c=1e3;o&&"number"==typeof o.maxKeys&&(c=o.maxKeys);var l=t.length;c>0&&l>c&&(l=c);for(var h=0;h=0?(u=v.substr(0,y),d=v.substr(y+1)):(u=v,d=""),p=decodeURIComponent(u),f=decodeURIComponent(d),r(s,p)?n(s[p])?s[p].push(f):s[p]=[s[p],f]:s[p]=f}return s};var n=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],35:[function(t,e,i){"use strict";var r=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};e.exports=function(t,e,i,a){return e=e||"&",i=i||"=",null===t&&(t=void 0),"object"==typeof t?o(s(t),(function(s){var a=encodeURIComponent(r(s))+i;return n(t[s])?o(t[s],(function(t){return a+encodeURIComponent(r(t))})).join(e):a+encodeURIComponent(r(t[s]))})).join(e):a?encodeURIComponent(r(a))+i+encodeURIComponent(r(t)):""};var n=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function o(t,e){if(t.map)return t.map(e);for(var i=[],r=0;r2?"one of ".concat(e," ").concat(t.slice(0,i-1).join(", "),", or ")+t[i-1]:2===i?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}n("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(t,e,i){var r,n,s;if("string"==typeof e&&(n="not ",e.substr(0,n.length)===n)?(r="must not be",e=e.replace(/^not /,"")):r="must be",function(t,e,i){return(void 0===i||i>t.length)&&(i=t.length),t.substring(i-e.length,i)===e}(t," argument"))s="The ".concat(t," ").concat(r," ").concat(o(e,"type"));else{var a=function(t,e,i){return"number"!=typeof i&&(i=0),!(i+".".length>t.length)&&-1!==t.indexOf(".",i)}(t)?"property":"argument";s='The "'.concat(t,'" ').concat(a," ").concat(r," ").concat(o(e,"type"))}return s+". Received type ".concat(typeof i)}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=r},{}],38:[function(t,e,i){(function(i){(function(){"use strict";var r=Object.keys||function(t){var e=[];for(var i in t)e.push(i);return e};e.exports=l;var n=t("./_stream_readable"),o=t("./_stream_writable");t("inherits")(l,n);for(var s=r(o.prototype),a=0;a0)if("string"==typeof e||a.objectMode||Object.getPrototypeOf(e)===c.prototype||(e=function(t){return c.from(t)}(e)),r)a.endEmitted?R(t,new b):E(t,a,e,!0);else if(a.ended)R(t,new m);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!i?(e=a.decoder.write(e),a.objectMode||0!==e.length?E(t,a,e,!1):L(t,a)):E(t,a,e,!1)}else r||(a.reading=!1,L(t,a));return!a.ended&&(a.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=T?t=T:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function P(t){var e=t._readableState;o("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(o("emitReadable",e.flowing),e.emittedReadable=!0,i.nextTick(C,t))}function C(t){var e=t._readableState;o("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,B(t)}function L(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(M,t,e))}function M(t,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function N(t){o("readable nexttick read 0"),t.read(0)}function O(t,e){o("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),B(t),e.flowing&&!e.reading&&t.read(0)}function B(t){var e=t._readableState;for(o("flow",e.flowing);e.flowing&&null!==t.read(););}function U(t,e){return 0===e.length?null:(e.objectMode?i=e.buffer.shift():!t||t>=e.length?(i=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):i=e.buffer.consume(t,e.decoder),i);var i}function j(t){var e=t._readableState;o("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,i.nextTick(F,e,t))}function F(t,e){if(o("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var i=e._writableState;(!i||i.autoDestroy&&i.finished)&&e.destroy()}}function H(t,e){for(var i=0,r=t.length;i=e.highWaterMark:e.length>0)||e.ended))return o("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?j(this):P(this),null;if(0===(t=I(t,e))&&e.ended)return 0===e.length&&j(this),null;var r,n=e.needReadable;return o("need readable",n),(0===e.length||e.length-t0?U(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),i!==t&&e.ended&&j(this)),null!==r&&this.emit("data",r),r},A.prototype._read=function(t){R(this,new x("_read()"))},A.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t)}n.pipesCount+=1,o("pipe count=%d opts=%j",n.pipesCount,e);var a=e&&!1===e.end||t===i.stdout||t===i.stderr?v:c;function c(){o("onend"),t.end()}n.endEmitted?i.nextTick(a):r.once("end",a),t.on("unpipe",(function e(i,s){o("onunpipe"),i===r&&s&&!1===s.hasUnpiped&&(s.hasUnpiped=!0,o("cleanup"),t.removeListener("close",p),t.removeListener("finish",f),t.removeListener("drain",l),t.removeListener("error",d),t.removeListener("unpipe",e),r.removeListener("end",c),r.removeListener("end",v),r.removeListener("data",u),h=!0,!n.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}));var l=function(t){return function(){var e=t._readableState;o("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(t,"data")&&(e.flowing=!0,B(t))}}(r);t.on("drain",l);var h=!1;function u(e){o("ondata");var i=t.write(e);o("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===t||n.pipesCount>1&&-1!==H(n.pipes,t))&&!h&&(o("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function d(e){o("onerror",e),v(),t.removeListener("error",d),0===s(t,"error")&&R(t,e)}function p(){t.removeListener("finish",f),v()}function f(){o("onfinish"),t.removeListener("close",p),v()}function v(){o("unpipe"),r.unpipe(t)}return r.on("data",u),function(t,e,i){if("function"==typeof t.prependListener)return t.prependListener(e,i);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(i):t._events[e]=[i,t._events[e]]:t.on(e,i)}(t,"error",d),t.once("close",p),t.once("finish",f),t.emit("pipe",r),n.flowing||(o("pipe resume"),r.resume()),t},A.prototype.unpipe=function(t){var e=this._readableState,i={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,i)),this;if(!t){var r=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o0,!1!==n.flowing&&this.resume()):"readable"===t&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,o("on readable",n.length,n.reading),n.length?P(this):n.reading||i.nextTick(N,this))),r},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(t,e){var r=a.prototype.removeListener.call(this,t,e);return"readable"===t&&i.nextTick(D,this),r},A.prototype.removeAllListeners=function(t){var e=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||i.nextTick(D,this),e},A.prototype.resume=function(){var t=this._readableState;return t.flowing||(o("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(O,t,e))}(this,t)),t.paused=!1,this},A.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},A.prototype.wrap=function(t){var e=this,i=this._readableState,r=!1;for(var n in t.on("end",(function(){if(o("wrapped end"),i.decoder&&!i.ended){var t=i.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(n){o("wrapped data"),i.decoder&&(n=i.decoder.write(n)),(!i.objectMode||null!=n)&&(i.objectMode||n&&n.length)&&(e.push(n)||(r=!0,t.pause()))})),t)void 0===this[n]&&"function"==typeof t[n]&&(this[n]=function(e){return function(){return t[e].apply(t,arguments)}}(n));for(var s=0;s<_.length;s++)t.on(_[s],this.emit.bind(this,_[s]));return this._read=function(e){o("wrapped _read",e),r&&(r=!1,t.resume())},this},"function"==typeof Symbol&&(A.prototype[Symbol.asyncIterator]=function(){return void 0===d&&(d=t("./internal/streams/async_iterator")),d(this)}),Object.defineProperty(A.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(A.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(A.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),A._fromList=U,Object.defineProperty(A.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(A.from=function(e,i){return void 0===p&&(p=t("./internal/streams/from")),p(A,e,i)})}).call(this)}).call(this,t("_process"),void 0!==i.g?i.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":37,"./_stream_duplex":38,"./internal/streams/async_iterator":43,"./internal/streams/buffer_list":44,"./internal/streams/destroy":45,"./internal/streams/from":47,"./internal/streams/state":49,"./internal/streams/stream":50,_process:32,buffer:14,events:19,inherits:21,"string_decoder/":55,util:13}],41:[function(t,e,i){"use strict";e.exports=l;var r=t("../errors").codes,n=r.ERR_METHOD_NOT_IMPLEMENTED,o=r.ERR_MULTIPLE_CALLBACK,s=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=r.ERR_TRANSFORM_WITH_LENGTH_0,c=t("./_stream_duplex");function l(t){if(!(this instanceof l))return new l(t);c.call(this,t),this._transformState={afterTransform:function(t,e){var i=this._transformState;i.transforming=!1;var r=i.writecb;if(null===r)return this.emit("error",new o);i.writechunk=null,i.writecb=null,null!=e&&this.push(e),r(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length-1))throw new b(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(t,e,i){i(new v("_write()"))},A.prototype._writev=null,A.prototype.end=function(t,e,r){var n=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,e,r){e.ending=!0,C(t,e),r&&(e.finished?i.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}(this,n,r),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),A.prototype.destroy=u.destroy,A.prototype._undestroy=u.undestroy,A.prototype._destroy=function(t,e){e(t)}}).call(this)}).call(this,t("_process"),void 0!==i.g?i.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":37,"./_stream_duplex":38,"./internal/streams/destroy":45,"./internal/streams/state":49,"./internal/streams/stream":50,_process:32,buffer:14,inherits:21,"util-deprecate":58}],43:[function(t,e,i){(function(i){(function(){"use strict";var r;function n(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var o=t("./end-of-stream"),s=Symbol("lastResolve"),a=Symbol("lastReject"),c=Symbol("error"),l=Symbol("ended"),h=Symbol("lastPromise"),u=Symbol("handlePromise"),d=Symbol("stream");function p(t,e){return{value:t,done:e}}function f(t){var e=t[s];if(null!==e){var i=t[d].read();null!==i&&(t[h]=null,t[s]=null,t[a]=null,e(p(i,!1)))}}var v=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((n(r={get stream(){return this[d]},next:function(){var t=this,e=this[c];if(null!==e)return Promise.reject(e);if(this[l])return Promise.resolve(p(void 0,!0));if(this[d].destroyed)return new Promise((function(e,r){i.nextTick((function(){t[c]?r(t[c]):e(p(void 0,!0))}))}));var r,n=this[h];if(n)r=new Promise(function(t,e){return function(i,r){t.then((function(){e[l]?i(p(void 0,!0)):e[u](i,r)}),r)}}(n,this));else{var o=this[d].read();if(null!==o)return Promise.resolve(p(o,!1));r=new Promise(this[u])}return this[h]=r,r}},Symbol.asyncIterator,(function(){return this})),n(r,"return",(function(){var t=this;return new Promise((function(e,i){t[d].destroy(null,(function(t){t?i(t):e(p(void 0,!0))}))}))})),r),v);e.exports=function(t){var e,r=Object.create(y,(n(e={},d,{value:t,writable:!0}),n(e,s,{value:null,writable:!0}),n(e,a,{value:null,writable:!0}),n(e,c,{value:null,writable:!0}),n(e,l,{value:t._readableState.endEmitted,writable:!0}),n(e,u,{value:function(t,e){var i=r[d].read();i?(r[h]=null,r[s]=null,r[a]=null,t(p(i,!1))):(r[s]=t,r[a]=e)},writable:!0}),e));return r[h]=null,o(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[a];return null!==e&&(r[h]=null,r[s]=null,r[a]=null,e(t)),void(r[c]=t)}var i=r[s];null!==i&&(r[h]=null,r[s]=null,r[a]=null,i(p(void 0,!0))),r[l]=!0})),t.on("readable",function(t){i.nextTick(f,t)}.bind(null,r)),r}}).call(this)}).call(this,t("_process"))},{"./end-of-stream":46,_process:32}],44:[function(t,e,i){"use strict";function r(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,r)}return i}function n(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function o(t,e){for(var i=0;i0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,i=""+e.data;e=e.next;)i+=t+e.data;return i}},{key:"concat",value:function(t){if(0===this.length)return s.alloc(0);for(var e,i,r,n=s.allocUnsafe(t>>>0),o=this.head,a=0;o;)e=o.data,i=n,r=a,s.prototype.copy.call(e,i,r),a+=o.data.length,o=o.next;return n}},{key:"consume",value:function(t,e){var i;return tn.length?n.length:t;if(o===n.length?r+=n:r+=n.slice(0,t),0==(t-=o)){o===n.length?(++i,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=n.slice(o));break}++i}return this.length-=i,r}},{key:"_getBuffer",value:function(t){var e=s.allocUnsafe(t),i=this.head,r=1;for(i.data.copy(e),t-=i.data.length;i=i.next;){var n=i.data,o=t>n.length?n.length:t;if(n.copy(e,e.length-t,0,o),0==(t-=o)){o===n.length?(++r,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=n.slice(o));break}++r}return this.length-=r,e}},{key:c,value:function(t,e){return a(this,function(t){for(var e=1;e0,(function(t){h||(h=t),t&&d.forEach(c),o||(d.forEach(c),u(h))}))}));return i.reduce(l)}},{"../../../errors":37,"./end-of-stream":46}],49:[function(t,e,i){"use strict";var r=t("../../../errors").codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(t,e,i,n){var o=function(t,e,i){return null!=t.highWaterMark?t.highWaterMark:e?t[i]:null}(e,n,i);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new r(n?i:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},{"../../../errors":37}],50:[function(t,e,i){e.exports=t("events").EventEmitter},{events:19}],51:[function(t,e,i){(i=e.exports=t("./lib/_stream_readable.js")).Stream=i,i.Readable=i,i.Writable=t("./lib/_stream_writable.js"),i.Duplex=t("./lib/_stream_duplex.js"),i.Transform=t("./lib/_stream_transform.js"),i.PassThrough=t("./lib/_stream_passthrough.js"),i.finished=t("./lib/internal/streams/end-of-stream.js"),i.pipeline=t("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":38,"./lib/_stream_passthrough.js":39,"./lib/_stream_readable.js":40,"./lib/_stream_transform.js":41,"./lib/_stream_writable.js":42,"./lib/internal/streams/end-of-stream.js":46,"./lib/internal/streams/pipeline.js":48}],52:[function(t,e,i){"use strict";e.exports=function(){if("function"!=typeof arguments[0])throw new Error("callback needed");if("number"!=typeof arguments[1])throw new Error("interval needed");var t;if(arguments.length>0){t=new Array(arguments.length-2);for(var e=0;e>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,i=function(t,e,i){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==i?i:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function c(t,e){if((t.length-e)%2==0){var i=t.toString("utf16le",e);if(i){var r=i.charCodeAt(i.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],i.slice(0,-1)}return i}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function l(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var i=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,i)}return e}function h(t,e){var i=(t.length-e)%3;return 0===i?t.toString("base64",e):(this.lastNeed=3-i,this.lastTotal=3,1===i?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-i))}function u(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function d(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):""}i.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,i;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";i=this.lastNeed,this.lastNeed=0}else i=0;return i=0?(n>0&&(t.lastNeed=n-1),n):--r=0?(n>0&&(t.lastNeed=n-2),n):--r=0?(n>0&&(2===n?n=0:t.lastNeed=n-3),n):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=i;var r=t.length-(i-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},{"safe-buffer":53}],56:[function(t,e,i){"use strict";var r=t("punycode"),n=t("./util");function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}i.parse=m,i.resolve=function(t,e){return m(t,!1,!0).resolve(e)},i.resolveObject=function(t,e){return t?m(t,!1,!0).resolveObject(e):e},i.format=function(t){return n.isString(t)&&(t=m(t)),t instanceof o?t.format():o.prototype.format.call(t)},i.Url=o;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,c=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,l=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),h=["'"].concat(l),u=["%","/","?",";","#"].concat(h),d=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},w=t("querystring");function m(t,e,i){if(t&&n.isObject(t)&&t instanceof o)return t;var r=new o;return r.parse(t,e,i),r}o.prototype.parse=function(t,e,i){if(!n.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),a=-1!==o&&o127?M+="x":M+=L[D];if(!M.match(p)){var O=P.slice(0,E),B=P.slice(E+1),U=L.match(f);U&&(O.push(U[1]),B.unshift(U[2])),B.length&&(m="/"+B.join(".")+m),this.hostname=O.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),I||(this.hostname=r.toASCII(this.hostname));var j=this.port?":"+this.port:"",F=this.hostname||"";this.host=F+j,this.href+=this.host,I&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==m[0]&&(m="/"+m))}if(!v[R])for(E=0,C=h.length;E0)&&i.host.split("@"))&&(i.auth=I.shift(),i.host=i.hostname=I.shift())),i.search=t.search,i.query=t.query,n.isNull(i.pathname)&&n.isNull(i.search)||(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.href=i.format(),i;if(!_.length)return i.pathname=null,i.search?i.path="/"+i.search:i.path=null,i.href=i.format(),i;for(var A=_.slice(-1)[0],S=(i.host||t.host||_.length>1)&&("."===A||".."===A)||""===A,E=0,T=_.length;T>=0;T--)"."===(A=_[T])?_.splice(T,1):".."===A?(_.splice(T,1),E++):E&&(_.splice(T,1),E--);if(!b&&!R)for(;E--;E)_.unshift("..");!b||""===_[0]||_[0]&&"/"===_[0].charAt(0)||_.unshift(""),S&&"/"!==_.join("/").substr(-1)&&_.push("");var I,P=""===_[0]||_[0]&&"/"===_[0].charAt(0);return k&&(i.hostname=i.host=P?"":_.length?_.shift():"",(I=!!(i.host&&i.host.indexOf("@")>0)&&i.host.split("@"))&&(i.auth=I.shift(),i.host=i.hostname=I.shift())),(b=b||i.host&&_.length)&&!P&&_.unshift(""),_.length?i.pathname=_.join("/"):(i.pathname=null,i.path=null),n.isNull(i.pathname)&&n.isNull(i.search)||(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.auth=t.auth||i.auth,i.slashes=i.slashes||t.slashes,i.href=i.format(),i},o.prototype.parseHost=function(){var t=this.host,e=a.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},{"./util":57,punycode:33,querystring:36}],57:[function(t,e,i){"use strict";e.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},{}],58:[function(t,e,r){(function(t){(function(){function i(e){try{if(!t.localStorage)return!1}catch(t){return!1}var i=t.localStorage[e];return null!=i&&"true"===String(i).toLowerCase()}e.exports=function(t,e){if(i("noDeprecation"))return t;var r=!1;return function(){if(!r){if(i("throwDeprecation"))throw new Error(e);i("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}}).call(this)}).call(this,void 0!==i.g?i.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],59:[function(t,e,i){e.exports=function t(e,i){if(e&&i)return t(e)(i);if("function"!=typeof e)throw new TypeError("need wrapper function");return Object.keys(e).forEach((function(t){r[t]=e[t]})),r;function r(){for(var t=new Array(arguments.length),i=0;i{for(var r in e)i.o(e,r)&&!i.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(131)})()})); \ No newline at end of file -- Gitee From 3a235a261e93601f0e1fa770d4b0fc6c2b7d50d4 Mon Sep 17 00:00:00 2001 From: zhangpeihang <948869991@qq.com> Date: Thu, 12 May 2022 17:02:26 +0800 Subject: [PATCH 02/45] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E5=9B=BE=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BootstrapBlazor.sln | 6 ++++++ src/BootstrapBlazor.Shared/BootstrapBlazor.Shared.csproj | 1 + src/BootstrapBlazor.Shared/Samples/FlowCharts.razor | 3 +++ 3 files changed, 10 insertions(+) create mode 100644 src/BootstrapBlazor.Shared/Samples/FlowCharts.razor diff --git a/BootstrapBlazor.sln b/BootstrapBlazor.sln index 9417a8144..edc07b8fa 100644 --- a/BootstrapBlazor.sln +++ b/BootstrapBlazor.sln @@ -120,6 +120,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BootstrapBlazor.AzureSpeech EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BootstrapBlazor.BaiduSpeech", "src\Extensions\Components\BootstrapBlazor.BaiduSpeech\BootstrapBlazor.BaiduSpeech.csproj", "{4ED606D8-D252-4573-8F0F-B69502ADB7ED}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BootstrapBlazor.FlowChart", "src\Extensions\Components\BootstrapBlazor.FlowChart\BootstrapBlazor.FlowChart.csproj", "{8AB0A2EA-D9F9-4AB5-8EAF-110734026C29}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BootstrapBlazor.SummerNote", "src\Extensions\Components\BootstrapBlazor.SummerNote\BootstrapBlazor.SummerNote.csproj", "{2FFC1564-EF75-454B-9D8E-A437A1737CEC}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTestEditor", "test\UnitTestEditor\UnitTestEditor.csproj", "{9552B649-17E2-4BCA-8774-664C83A960CB}" @@ -198,6 +199,10 @@ Global {4ED606D8-D252-4573-8F0F-B69502ADB7ED}.Debug|Any CPU.Build.0 = Debug|Any CPU {4ED606D8-D252-4573-8F0F-B69502ADB7ED}.Release|Any CPU.ActiveCfg = Release|Any CPU {4ED606D8-D252-4573-8F0F-B69502ADB7ED}.Release|Any CPU.Build.0 = Release|Any CPU + {8AB0A2EA-D9F9-4AB5-8EAF-110734026C29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8AB0A2EA-D9F9-4AB5-8EAF-110734026C29}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8AB0A2EA-D9F9-4AB5-8EAF-110734026C29}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8AB0A2EA-D9F9-4AB5-8EAF-110734026C29}.Release|Any CPU.Build.0 = Release|Any CPU {2FFC1564-EF75-454B-9D8E-A437A1737CEC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2FFC1564-EF75-454B-9D8E-A437A1737CEC}.Debug|Any CPU.Build.0 = Debug|Any CPU {2FFC1564-EF75-454B-9D8E-A437A1737CEC}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -238,6 +243,7 @@ Global {C28717F8-9D2B-4296-9CC4-94882338F370} = {CD062AB6-244D-402A-8F33-C37DAC5856CC} {42108A8A-C773-4F35-A870-3673BDD383E4} = {CD062AB6-244D-402A-8F33-C37DAC5856CC} {4ED606D8-D252-4573-8F0F-B69502ADB7ED} = {CD062AB6-244D-402A-8F33-C37DAC5856CC} + {8AB0A2EA-D9F9-4AB5-8EAF-110734026C29} = {CD062AB6-244D-402A-8F33-C37DAC5856CC} {2FFC1564-EF75-454B-9D8E-A437A1737CEC} = {CD062AB6-244D-402A-8F33-C37DAC5856CC} {9552B649-17E2-4BCA-8774-664C83A960CB} = {7C1D79F1-87BC-42C1-BD5A-CDE4044AC1BD} EndGlobalSection diff --git a/src/BootstrapBlazor.Shared/BootstrapBlazor.Shared.csproj b/src/BootstrapBlazor.Shared/BootstrapBlazor.Shared.csproj index 8997d09f3..7748cadd0 100644 --- a/src/BootstrapBlazor.Shared/BootstrapBlazor.Shared.csproj +++ b/src/BootstrapBlazor.Shared/BootstrapBlazor.Shared.csproj @@ -25,6 +25,7 @@ + diff --git a/src/BootstrapBlazor.Shared/Samples/FlowCharts.razor b/src/BootstrapBlazor.Shared/Samples/FlowCharts.razor new file mode 100644 index 000000000..d3136b129 --- /dev/null +++ b/src/BootstrapBlazor.Shared/Samples/FlowCharts.razor @@ -0,0 +1,3 @@ +@page "/flowcharts" + + -- Gitee From a66705927f66708ad717e2d69544b2c87041807a Mon Sep 17 00:00:00 2001 From: Nine <948825551@qq.com> Date: Thu, 12 May 2022 08:51:33 +0000 Subject: [PATCH 03/45] =?UTF-8?q?!2774=20doc(#I575AJ):=20Supplement=20mark?= =?UTF-8?q?down=20translation=20documentation=20*=20doc:=20=E8=A1=A5?= =?UTF-8?q?=E5=85=85=20Markdown=20=E7=BF=BB=E8=AF=91=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BootstrapBlazor.Shared/Locales/en.json | 14 +++++++++++++- src/BootstrapBlazor.Shared/Locales/zh.json | 14 +++++++++++++- src/BootstrapBlazor.Shared/Samples/Markdowns.razor | 12 ++++++------ .../Samples/Markdowns.razor.cs | 4 ++-- 4 files changed, 34 insertions(+), 10 deletions(-) diff --git a/src/BootstrapBlazor.Shared/Locales/en.json b/src/BootstrapBlazor.Shared/Locales/en.json index c90a7af49..66c23ec59 100644 --- a/src/BootstrapBlazor.Shared/Locales/en.json +++ b/src/BootstrapBlazor.Shared/Locales/en.json @@ -1349,6 +1349,16 @@ "PlaceHolder": "This is Markdown", "Block4Title": "Browser mode", "Block4Intro": "Simple browsing mode, not editable", + "IsDarkBlockTitle": "Dark mode", + "IsDarkBlockIntro": "Enable dark mode", + "EnableHighlightBlcokTitle": "Enable the code highlighting plugin", + "EnableHighlightBlcokIntro": "Enable plugins with EnableHighlight=true, highlighting using ``` followed by code formatting, and js highlight syntax for example ```js", + "BrowserBlcokTitle": "External operation Markdown", + "BrowserBlcokIntro": "Using APIs to manipulate the Editor from the outside, the specific API reference tui.editor api", + "BrowserButtonText1": "Insert a line of text", + "BrowserButtonText2": "Insert a picture", + "BrowserButtonText3": "The cursor moves to the end", + "BrowserText": "coconut palm", "P7": "Set the markdown editor to browse-only mode, IsViewer='true'", "Att1": "Control height", "Att2": "The minimum height of the control", @@ -1356,7 +1366,9 @@ "Att4": "Preview mode", "Att5": "UI language", "Att6": "Prompt information", - "Att7": "Whether it is pure browsing mode" + "Att7": "Whether it is pure browsing mode", + "Att8": "Whether it is dark mode", + "Att9": "Whether code highlighting is enabled" }, "BootstrapBlazor.Shared.Samples.MultiSelects": { "Title": "MultiSelect", diff --git a/src/BootstrapBlazor.Shared/Locales/zh.json b/src/BootstrapBlazor.Shared/Locales/zh.json index 93ebc782a..8e859d926 100644 --- a/src/BootstrapBlazor.Shared/Locales/zh.json +++ b/src/BootstrapBlazor.Shared/Locales/zh.json @@ -1350,6 +1350,16 @@ "PlaceHolder": "这是 Markdown", "Block4Title": "浏览器模式", "Block4Intro": "单纯浏览模式,不可编辑", + "IsDarkBlockTitle": "暗黑模式", + "IsDarkBlockIntro": "启用暗黑模式", + "EnableHighlightBlcokTitle": "启用代码高亮插件", + "EnableHighlightBlcokIntro": "使用 EnableHighlight=true 启用插件,使用```后加代码格式的方式使用高亮,如```js 则使用 js 高亮语法", + "BrowserBlcokTitle": "外部操作 Markdown", + "BrowserBlcokIntro": "使用 Api 从外部操作 Editor,具体的Api参照 tui.editor api", + "BrowserButtonText1": "插入一行文字", + "BrowserButtonText2": "插入一张图片", + "BrowserButtonText3": "光标移动到最后", + "BrowserText": "椰子树", "P7": "设置Markdown 编辑器为纯浏览模式,IsViewer='true'", "MarkdownString": "测试", "Att1": "控件高度", @@ -1358,7 +1368,9 @@ "Att4": "预览模式", "Att5": "UI 语言", "Att6": "提示信息", - "Att7": "是否为纯浏览模式" + "Att7": "是否为纯浏览模式", + "Att8": "是否为暗黑模式", + "Att9": "是否启用代码高亮" }, "BootstrapBlazor.Shared.Samples.MultiSelects": { "Title": "MultiSelect 多项选择器", diff --git a/src/BootstrapBlazor.Shared/Samples/Markdowns.razor b/src/BootstrapBlazor.Shared/Samples/Markdowns.razor index d14a094a7..77c953483 100644 --- a/src/BootstrapBlazor.Shared/Samples/Markdowns.razor +++ b/src/BootstrapBlazor.Shared/Samples/Markdowns.razor @@ -68,20 +68,20 @@ - + - + - +
- - - + + +
diff --git a/src/BootstrapBlazor.Shared/Samples/Markdowns.razor.cs b/src/BootstrapBlazor.Shared/Samples/Markdowns.razor.cs index bc07753a2..f89298ef7 100644 --- a/src/BootstrapBlazor.Shared/Samples/Markdowns.razor.cs +++ b/src/BootstrapBlazor.Shared/Samples/Markdowns.razor.cs @@ -117,14 +117,14 @@ console.log('test'); }, new AttributeItem(){ Name = "IsDark", - Description = "是否为暗黑模式", + Description = Localizer["Att8"], Type = "bool", ValueList = " true/false ", DefaultValue = " false " }, new AttributeItem(){ Name = "EnableHighlight", - Description = "是否启用代码高亮", + Description = Localizer["Att9"], Type = "bool", ValueList = " true/false ", DefaultValue = " false " -- Gitee From c13fee50ff91bd59e0a7915e4ee1919097bcd11c Mon Sep 17 00:00:00 2001 From: Argo Date: Thu, 12 May 2022 09:22:05 +0000 Subject: [PATCH 04/45] =?UTF-8?q?!2775=20feat(#I575PZ):=20add=20ItemTempla?= =?UTF-8?q?te=20on=20MultiSelect=20component=20*=20test:=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=20ItemTemplate=20=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=20*=20doc:=20=E5=A2=9E=E5=8A=A0=E8=A7=86=E9=A2=91=E9=93=BE?= =?UTF-8?q?=E6=8E=A5=20*=20doc:=20=E6=9B=B4=E6=96=B0=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E6=96=87=E4=BB=B6=20*=20doc:=20=E6=9B=B4=E6=96=B0=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E6=A8=A1=E6=9D=BF=E7=A4=BA=E4=BE=8B=20*=20feat:=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20ItemTemlate=20=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BootstrapBlazor.Shared/Locales/en.json | 5 +++- src/BootstrapBlazor.Shared/Locales/zh.json | 3 +++ .../Samples/MultiSelects.razor | 16 +++++++++++++ .../Samples/MultiSelects.razor.cs | 8 +++++++ .../Samples/MultiSelects.razor.css | 11 +++++++++ src/BootstrapBlazor.Shared/docs.json | 5 ++-- .../Components/Select/MultiSelect.razor | 9 +++++++- .../Components/Select/MultiSelect.razor.cs | 6 +++++ test/UnitTest/Components/MultiSelectTest.cs | 23 +++++++++++++++++++ 9 files changed, 82 insertions(+), 4 deletions(-) create mode 100644 src/BootstrapBlazor.Shared/Samples/MultiSelects.razor.css diff --git a/src/BootstrapBlazor.Shared/Locales/en.json b/src/BootstrapBlazor.Shared/Locales/en.json index 66c23ec59..19b839193 100644 --- a/src/BootstrapBlazor.Shared/Locales/en.json +++ b/src/BootstrapBlazor.Shared/Locales/en.json @@ -1424,8 +1424,10 @@ "Block15Title": "Cascading bindings", "Block15Intro": "The second drop-down box dynamically populates the content by selecting the different options for the first drop-down box.", "P10": "In this example, clicking on the first drop-down box allows you to get the data source for the second multi-box by asynchronous means, and after assigning, call StateHasChanged to re-render the multi-box ", + "ItemTemplateTitle": "Item Template", + "ItemTemplateIntro": "customer item template by set ItemTemplate", "Att1": "Whether to display the front label", - "Att2": "是否显示前置标签关闭按钮", + "Att2": "Whether to display the close button from label", "Att3": "Whether to display the function button", "Att4": "Whether to display the default feature button", "Att5": "The front label displays text", @@ -1436,6 +1438,7 @@ "Att9": "Whether to disable it", "Att10": "The data collection", "Att11": "Extend the button template", + "ItemTemplate": "The template of selected item", "Event1": "This event is triggered when the drop-down option changes", "Event2": "Call back this method when the search text changes", "Log1": "Search for text", diff --git a/src/BootstrapBlazor.Shared/Locales/zh.json b/src/BootstrapBlazor.Shared/Locales/zh.json index 8e859d926..d1115782e 100644 --- a/src/BootstrapBlazor.Shared/Locales/zh.json +++ b/src/BootstrapBlazor.Shared/Locales/zh.json @@ -1426,6 +1426,8 @@ "Block15Title": "级联绑定", "Block15Intro": "通过选择第一个下拉框不同选项,第二个下拉框动态填充内容。", "P10": "本例中点击第一个下拉框,可以通过异步方法获取第二个多选框的数据源,进行赋值后,调用 StateHasChanged 进行对 多选框 重新渲染", + "ItemTemplateTitle": "选项模板", + "ItemTemplateIntro": "通过设置 ItemTemplate 设置下拉框中选项模板,可以自定义样式", "Att1": "是否显示前置标签", "Att2": "是否显示前置标签关闭按钮", "Att3": "是否显示功能按钮", @@ -1438,6 +1440,7 @@ "Att9": "是否禁用", "Att10": "数据集合", "Att11": "扩展按钮模板", + "ItemTemplate": "选项模板", "Event1": "下拉框选项改变时触发此事件", "Event2": "搜索文本发生变化时回调此方法", "Log1": "搜索文字", diff --git a/src/BootstrapBlazor.Shared/Samples/MultiSelects.razor b/src/BootstrapBlazor.Shared/Samples/MultiSelects.razor index 7cfd6e5be..e7c2bf144 100644 --- a/src/BootstrapBlazor.Shared/Samples/MultiSelects.razor +++ b/src/BootstrapBlazor.Shared/Samples/MultiSelects.razor @@ -180,6 +180,22 @@
+ +
+
+ + +
+ + @context.Text + +
+
+
+
+
+
+ diff --git a/src/BootstrapBlazor.Shared/Samples/MultiSelects.razor.cs b/src/BootstrapBlazor.Shared/Samples/MultiSelects.razor.cs index 874056355..76bead400 100644 --- a/src/BootstrapBlazor.Shared/Samples/MultiSelects.razor.cs +++ b/src/BootstrapBlazor.Shared/Samples/MultiSelects.razor.cs @@ -370,6 +370,14 @@ public partial class MultiSelects Type = "RenderFragment>", ValueList = " — ", DefaultValue = " — " + }, + new AttributeItem() + { + Name = "ItemTemplate", + Description = Localizer["ItemTemplate"], + Type = "RenderFragment", + ValueList = " — ", + DefaultValue = " — " } }; } diff --git a/src/BootstrapBlazor.Shared/Samples/MultiSelects.razor.css b/src/BootstrapBlazor.Shared/Samples/MultiSelects.razor.css new file mode 100644 index 000000000..268fd53ba --- /dev/null +++ b/src/BootstrapBlazor.Shared/Samples/MultiSelects.razor.css @@ -0,0 +1,11 @@ +.mul-select-item { + display: flex; + flex: 1; + align-items: center; + margin: 0.25rem 0.5rem; +} + + .mul-select-item span { + flex: 1; + margin-left: 0.5rem; + } diff --git a/src/BootstrapBlazor.Shared/docs.json b/src/BootstrapBlazor.Shared/docs.json index ce9ae556d..8bb1b5331 100644 --- a/src/BootstrapBlazor.Shared/docs.json +++ b/src/BootstrapBlazor.Shared/docs.json @@ -70,12 +70,13 @@ "autorefresh": "BV1ap4y1x7Qn?p=8", "column": "BV1ap4y1x7Qn?p=2", "edit": "BV1ap4y1x7Qn?p=9;BV1ap4y1x7Qn?p=10;BV1ap4y1x7Qn?p=11;BV1ap4y1x7Qn?p=12;BV12P4y137Ar", + "editors": "BV13B4y1y7cS", "editdialogs": "BV1bT4y1N78e?p=10", "export": "BV1ap4y1x7Qn?p=6", "drawers": "BV1bT4y1N78e?p=7", "detail": "BV1ap4y1x7Qn?p=3", "dialog": "BV1bT4y1N78e?p=1", - "dialogs": "BV1bT4y1N78e?p=1", + "dialogs": "BV1bT4y1N78e?p=1;BV17v4y1K7Ho", "header": "BV15o4y1f7eN", "localizer": "BV1Kz4y1U7FR?p=1", "filter": "BV1ap4y1x7Qn?p=4", @@ -105,7 +106,7 @@ "globalexception": "BV1xq4y1z7K2", "recognizers": "BV1aR4y1N7UP", "synthesizers": "BV1aR4y1N7UP", - "reconnectors": "BV1Dr4y1J7Z5", + "reconnectors": "BV1Dr4y1J7Z5;BV193411P7Dz", "speechwaves": "BV1Dr4y1J7Z5" } } diff --git a/src/BootstrapBlazor/Components/Select/MultiSelect.razor b/src/BootstrapBlazor/Components/Select/MultiSelect.razor index 0b431012e..1f5eef5e7 100644 --- a/src/BootstrapBlazor/Components/Select/MultiSelect.razor +++ b/src/BootstrapBlazor/Components/Select/MultiSelect.razor @@ -52,7 +52,14 @@ { - @item.Text + @if (ItemTemplate == null) + { + @item.Text + } + else + { + @ItemTemplate(item) + } } diff --git a/src/BootstrapBlazor/Components/Select/MultiSelect.razor.cs b/src/BootstrapBlazor/Components/Select/MultiSelect.razor.cs index fe24bb173..3e12247e2 100644 --- a/src/BootstrapBlazor/Components/Select/MultiSelect.razor.cs +++ b/src/BootstrapBlazor/Components/Select/MultiSelect.razor.cs @@ -92,6 +92,12 @@ public partial class MultiSelect [NotNull] public IEnumerable? Items { get; set; } + /// + /// 获得/设置 选项模板 + /// + [Parameter] + public RenderFragment? ItemTemplate { get; set; } + /// /// 获得/设置 搜索文本发生变化时回调此方法 /// diff --git a/test/UnitTest/Components/MultiSelectTest.cs b/test/UnitTest/Components/MultiSelectTest.cs index 7d541811f..c644144d6 100644 --- a/test/UnitTest/Components/MultiSelectTest.cs +++ b/test/UnitTest/Components/MultiSelectTest.cs @@ -313,4 +313,27 @@ public class MultiSelectTest : BootstrapBlazorTestBase form.Submit(); Assert.True(valid); } + + [Fact] + public void ItemTemplate_Ok() + { + var cut = Context.RenderComponent>(pb => + { + pb.Add(a => a.Value, "1"); + pb.Add(a => a.ShowCloseButton, false); + pb.Add(a => a.Items, new List + { + new("1", "Test1"), + new("2", "Test2") + }); + pb.Add(a => a.ItemTemplate, item => builder => + { + builder.OpenElement(0, "div"); + builder.AddContent(1, $"test-{item.Value}-test"); + builder.CloseElement(); + }); + }); + Assert.Contains("test-Test1-test", cut.Markup); + Assert.Contains("test-Test2-test", cut.Markup); + } } -- Gitee From 8466c9760b326299ee96b3105394a393a0cf89d0 Mon Sep 17 00:00:00 2001 From: Argo Date: Thu, 12 May 2022 10:22:13 +0000 Subject: [PATCH 05/45] =?UTF-8?q?!2776=20fix(#I576DA):=20update=20js=20for?= =?UTF-8?q?=20Editor=20*=20test:=20=E4=BF=AE=E5=A4=8D=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E9=94=99=E8=AF=AF=20*=20fix:=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E8=84=9A=E6=9C=AC=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BootstrapBlazor.SummerNote.csproj | 2 +- .../Components/Editor/Editor.js | 44 +++++++++---------- .../Components/Editor/Editor.razor.cs | 2 +- .../wwwroot/js/bootstrap.blazor.editor.min.js | 2 +- test/UnitTest/Components/MultiSelectTest.cs | 2 +- 5 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/Extensions/Components/BootstrapBlazor.SummerNote/BootstrapBlazor.SummerNote.csproj b/src/Extensions/Components/BootstrapBlazor.SummerNote/BootstrapBlazor.SummerNote.csproj index 4d722ab9a..ec9b2c404 100644 --- a/src/Extensions/Components/BootstrapBlazor.SummerNote/BootstrapBlazor.SummerNote.csproj +++ b/src/Extensions/Components/BootstrapBlazor.SummerNote/BootstrapBlazor.SummerNote.csproj @@ -3,7 +3,7 @@ - 6.0.0 + 6.0.1 diff --git a/src/Extensions/Components/BootstrapBlazor.SummerNote/Components/Editor/Editor.js b/src/Extensions/Components/BootstrapBlazor.SummerNote/Components/Editor/Editor.js index fc4228fe9..d0f04cd62 100644 --- a/src/Extensions/Components/BootstrapBlazor.SummerNote/Components/Editor/Editor.js +++ b/src/Extensions/Components/BootstrapBlazor.SummerNote/Components/Editor/Editor.js @@ -15,27 +15,28 @@ }; }; +export function bb_editor_code(el, obj, value) { + $.bb_editor_code(el, obj, value); +}; + export function bb_editor_method(el, method, parameter) { $.bb_editor_method(el, method, parameter); }; (function ($) { $.extend({ - bb_html5edit: function (el, options) { + bb_html5edit: function ($el, options) { if (!$.isFunction($.fn.summernote)) { return; } - var $this = $(el); + var $this = $el; var op = typeof options == 'object' && options; $.bb_lang(); op = $.extend({ focus: true, height: 80, dialogsInBody: true }, op); - console.log(op); - console.log($.fn.summernote.lang); - if (/destroy|hide/.test(options)) { return $this.toggleClass('open').summernote(op); } @@ -82,24 +83,23 @@ export function bb_editor_method(el, method, parameter) { } return this; }, + bb_editor_code: function (el, obj, value) { + var $editor = $(el).find(".editor-body"); + if ($editor.hasClass('open')) { + $editor.summernote('code', value); + } + else { + $editor.html(value); + } + }, bb_editor: function (el, obj, attrMethod, callback, method, height, value, lang) { var invoker = function () { - var editor = el.getElementsByClassName("editor-body"); - - if (obj === 'code') { - if ($(editor).hasClass('open')) { - $(editor).summernote('code', value); - } - else { - $(editor).html(value); - } - } - else { - var option = { obj: obj, method: method, height: height, lang }; - if (value) option.value = value; - - $.bb_html5edit(editor, option); + var $editor = $(el).find(".editor-body"); + var option = { obj: obj, method: method, height: height, lang }; + if (value) { + option.value = value; } + $.bb_html5edit($editor, option); } if (attrMethod !== "") { @@ -138,8 +138,8 @@ export function bb_editor_method(el, method, parameter) { } }, bb_editor_method: function (el, method, parameter) { - var editor = el.getElementsByClassName("editor-body"); - $(editor).toggleClass('open').summernote(method, ...parameter); + var $editor = $(el).find(".editor-body"); + $editor.toggleClass('open').summernote(method, ...parameter); }, bb_lang: function () { $.extend($.summernote.lang, { diff --git a/src/Extensions/Components/BootstrapBlazor.SummerNote/Components/Editor/Editor.razor.cs b/src/Extensions/Components/BootstrapBlazor.SummerNote/Components/Editor/Editor.razor.cs index 8a2a01360..db3321412 100644 --- a/src/Extensions/Components/BootstrapBlazor.SummerNote/Components/Editor/Editor.razor.cs +++ b/src/Extensions/Components/BootstrapBlazor.SummerNote/Components/Editor/Editor.razor.cs @@ -175,7 +175,7 @@ public partial class Editor : IAsyncDisposable else if (_renderValue) { _renderValue = false; - await Module.InvokeVoidAsync("bb_editor", EditorElement, "code", "", "", Height, Value ?? "", Language); + await Module.InvokeVoidAsync("bb_editor_code", EditorElement, Value ?? ""); } } diff --git a/src/Extensions/Components/BootstrapBlazor.SummerNote/wwwroot/js/bootstrap.blazor.editor.min.js b/src/Extensions/Components/BootstrapBlazor.SummerNote/wwwroot/js/bootstrap.blazor.editor.min.js index 5bbda8fcf..e0acf6116 100644 --- a/src/Extensions/Components/BootstrapBlazor.SummerNote/wwwroot/js/bootstrap.blazor.editor.min.js +++ b/src/Extensions/Components/BootstrapBlazor.SummerNote/wwwroot/js/bootstrap.blazor.editor.min.js @@ -1 +1 @@ -export function bb_editor(n,t,i,r,u,f,e,o){BootstrapBlazorModules.addLink("_content/BootstrapBlazor.SummerNote/css/bootstrap.blazor.editor.min.css");BootstrapBlazorModules.addScript("_content/BootstrapBlazor.SummerNote/js/summernote-bs5.min.js");var s=window.setInterval(function(){$.isFunction($.fn.summernote)&&(window.clearInterval(s),h())},100),h=function(){$.bb_editor(n,o,t,i,r,u,f,e)}}export function bb_editor_method(n,t,i){$.bb_editor_method(n,t,i)}(function(n){n.extend({bb_html5edit:function(t,i){if(n.isFunction(n.fn.summernote)){var r=n(t),u=typeof i=="object"&&i;return(n.bb_lang(),u=n.extend({focus:!0,height:80,dialogsInBody:!0},u),console.log(u),console.log(n.fn.summernote.lang),/destroy|hide/.test(i))?r.toggleClass("open").summernote(u):typeof i=="string"?r.hasClass("open")?r.summernote(u):r.html():(r.on("click",u,function(t,i){var u=n(this).tooltip("hide"),r=n.extend({placeholder:u.attr("placeholder")},t.data,i||{});r.obj.invokeMethodAsync("GetToolBar").then(t=>{var i=u.toggleClass("open").summernote(n.extend({callbacks:{onChange:function(n){r.obj.invokeMethodAsync(r.method,n)}},toolbar:t},r)).next().find(".note-toolbar").on("click","button[data-method]",{note:u,op:r},function(t){var r=n(this),i,u;switch(r.attr("data-method")){case"submit":r.tooltip("dispose");i=t.data.note.toggleClass("open");u=i.summernote("code");i.summernote("destroy");t.data.op.obj.invokeMethodAsync(t.data.op.method,u)}}),f=n('
- + + - - - + + + -- Gitee From b3e590b40241188529b72ef48e142ca880565c00 Mon Sep 17 00:00:00 2001 From: Nine <948825551@qq.com> Date: Fri, 13 May 2022 05:47:19 +0000 Subject: [PATCH 07/45] =?UTF-8?q?!2779=20doc(#I579YF):=20add=20english=20t?= =?UTF-8?q?ranslation=20of=20speechwave=20page=20*=20doc:=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=20SpeechWaves=20=E7=BB=84=E4=BB=B6=E7=BF=BB=E8=AF=91?= =?UTF-8?q?=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BootstrapBlazor.Shared/Locales/en.json | 16 ++++++++++++++++ src/BootstrapBlazor.Shared/Locales/zh.json | 16 ++++++++++++++++ .../Samples/Speechs/SpeechWaves.razor | 11 ++++++----- .../Samples/Speechs/SpeechWaves.razor.cs | 12 ++++++------ 4 files changed, 44 insertions(+), 11 deletions(-) diff --git a/src/BootstrapBlazor.Shared/Locales/en.json b/src/BootstrapBlazor.Shared/Locales/en.json index b2b09428f..e9a6b526b 100644 --- a/src/BootstrapBlazor.Shared/Locales/en.json +++ b/src/BootstrapBlazor.Shared/Locales/en.json @@ -2954,6 +2954,22 @@ "P3": "Nuget package installation", "P4": "Install the components of BootstrapBlazor.SignaturePad using nuget.org" }, + "BootstrapBlazor.Shared.Samples.SpeechWaves": { + "SpeechWaveTitle": "SpeechWave", + "H4": "The dynamic plot of the waveform that is displayed when you start acquiring speech", + "NormalTitle": "Basic usage", + "NormalIntro": "Displays the waveform plot", + "ShowUsedTimeTitle": "The length of the display", + "ShowUsedTimeIntro": "Via ShowUsedTime", + "ValueTitle": "Parameters control whether it is displayed", + "ValueIntro": "Use the Show value to control whether the waveform plot is displayed", + "ValueButtonText1": "Hide", + "ValueButtonText2": "Display", + "ShowAttr": "Whether to start", + "ShowUsedTimeAttr": "Whether to display the duration", + "OnTimeoutAttr": "Identify the end-of-timeout callback method", + "TotalTimeSecondAttr": "Speech recognition is set for a total time longer than calling the OnTimeout callback" + }, "BootstrapBlazor.Shared.Samples.Reconnectors": { "Title": "Reconnector", "SubTitle": "Reflect the connection state in the UI (Blazor Server)", diff --git a/src/BootstrapBlazor.Shared/Locales/zh.json b/src/BootstrapBlazor.Shared/Locales/zh.json index 2913d0c56..b689ec5f0 100644 --- a/src/BootstrapBlazor.Shared/Locales/zh.json +++ b/src/BootstrapBlazor.Shared/Locales/zh.json @@ -2967,6 +2967,22 @@ "P3": "Nuget 包安装", "P4": "使用 nuget.org 进行 BootstrapBlazor.SignaturePad 组件的安装" }, + "BootstrapBlazor.Shared.Samples.SpeechWaves": { + "SpeechWaveTitle": "SpeechWave 语音波形图", + "H4": "开始采集语音时显示的波形动态图", + "NormalTitle": "基础用法", + "NormalIntro": "显示波形图", + "ShowUsedTimeTitle": "显示时长", + "ShowUsedTimeIntro": "通过 ShowUsedTime", + "ValueTitle": "参数控制是否显示", + "ValueIntro": "通过 Show 值控制是否显示波形图", + "ValueButtonText1": "隐藏", + "ValueButtonText2": "显示", + "ShowAttr": "是否开始", + "ShowUsedTimeAttr": "是否显示时长", + "OnTimeoutAttr": "识别结束后超时回调方法", + "TotalTimeSecondAttr": "语音识别设置总时长超出过调用 OnTimeout 回调" + }, "BootstrapBlazor.Shared.Samples.Reconnectors": { "Title": "Reconnector 重连组件", "SubTitle": "用于自定义连接失败时各种状态信息", diff --git a/src/BootstrapBlazor.Shared/Samples/Speechs/SpeechWaves.razor b/src/BootstrapBlazor.Shared/Samples/Speechs/SpeechWaves.razor index 14e95504b..cc5b091b1 100644 --- a/src/BootstrapBlazor.Shared/Samples/Speechs/SpeechWaves.razor +++ b/src/BootstrapBlazor.Shared/Samples/Speechs/SpeechWaves.razor @@ -1,19 +1,20 @@ @page "/speechwaves" @namespace BootstrapBlazor.Shared.Samples +@inject IStringLocalizer Localizer -

SpeechWave 语音波形图

+

@Localizer["SpeechWaveTitle"]

-

开始采集语音时显示的波形动态图

+

@Localizer["H4"]

- + - + - +
diff --git a/src/BootstrapBlazor.Shared/Samples/Speechs/SpeechWaves.razor.cs b/src/BootstrapBlazor.Shared/Samples/Speechs/SpeechWaves.razor.cs index fc44a02b5..f4ea840c9 100644 --- a/src/BootstrapBlazor.Shared/Samples/Speechs/SpeechWaves.razor.cs +++ b/src/BootstrapBlazor.Shared/Samples/Speechs/SpeechWaves.razor.cs @@ -14,7 +14,7 @@ public partial class SpeechWaves { private bool IsShow { get; set; } - private string ButtonText => IsShow ? "隐藏" : "显示"; + private string ButtonText => IsShow ? Localizer["ValueButtonText1"] : Localizer["ValueButtonText2"]; private void OnClickShow() { @@ -25,33 +25,33 @@ public partial class SpeechWaves /// 获得属性方法 /// /// - private static IEnumerable GetAttributes() => new AttributeItem[] + private IEnumerable GetAttributes() => new AttributeItem[] { // TODO: 移动到数据库中 new AttributeItem() { Name = nameof(SpeechWave.Show), - Description = "是否开始", + Description = Localizer["ShowAttr"], Type = "bool", ValueList = "true/false", DefaultValue = "false" }, new AttributeItem() { Name = nameof(SpeechWave.ShowUsedTime), - Description = "是否显示时长", + Description = Localizer["ShowUsedTimeAttr"], Type = "bool", ValueList = "true/false", DefaultValue = "true" }, new AttributeItem() { Name = nameof(SpeechWave.OnTimeout), - Description = "识别结束后超时回调方法", + Description = Localizer["OnTimeoutAttr"], Type = "Func", ValueList = " — ", DefaultValue = " — " }, new AttributeItem() { Name = nameof(SpeechWave.TotalTimeSecond), - Description = "语音识别设置总时长超出过调用 OnTimeout 回调", + Description = Localizer["TotalTimeSecondAttr"], Type = "int", ValueList = " — ", DefaultValue = "60" -- Gitee From 9d0eeec9553fce8468afa31c6d7cffe9dcb5aa64 Mon Sep 17 00:00:00 2001 From: Argo Date: Fri, 13 May 2022 08:12:36 +0000 Subject: [PATCH 08/45] =?UTF-8?q?!2780=20feat(#I57AGS):=20improve=20speech?= =?UTF-8?q?=20component=20*=20chore:=20bump=20version=206.0.8=20*=20feat:?= =?UTF-8?q?=20=E8=B6=85=E6=97=B6=E5=9B=9E=E8=B0=83=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E5=BC=82=E6=AD=A5=20*=20refactor:=20=E8=B0=83=E7=94=A8=20Baidu?= =?UTF-8?q?=20Api=20=E6=94=B9=E4=B8=BA=E5=BC=82=E6=AD=A5=E8=B0=83=E7=94=A8?= =?UTF-8?q?=20*=20refactor:=20=E7=A7=BB=E9=99=A4=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E8=B0=83=E7=94=A8=E6=96=B9=E6=B3=95=E6=97=A5=E5=BF=97=20*=20ch?= =?UTF-8?q?ore:=20bump=20verson=206.0.3=20*=20doc:=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E5=90=8D=E7=A7=B0=20*=20Merge=20branch=20'ma?= =?UTF-8?q?in'=20into=20feat-azure=20*=20doc:=20=E8=AF=AD=E9=9F=B3?= =?UTF-8?q?=E5=AE=9E=E6=88=98=E5=A2=9E=E5=8A=A0=E6=97=B6=E9=95=BF=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=20*=20doc:=20=E8=AF=AD=E9=9F=B3=E8=AF=86=E5=88=AB?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=97=B6=E9=95=BF=E6=98=BE=E7=A4=BA=20*=20do?= =?UTF-8?q?c:=20=E6=9B=B4=E6=96=B0=E5=8F=82=E6=95=B0=E6=B3=A8=E9=87=8A=20*?= =?UTF-8?q?=20refactor:=20=E6=9B=B4=E6=94=B9=E6=96=B9=E6=B3=95=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=20*=20feat:=20=E4=BF=AE=E5=A4=8D=20Token=20=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E9=80=BB=E8=BE=91=20*=20feat:=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E9=98=B2=E6=AD=A2=E6=8A=A5=E9=94=99=20*=20fe?= =?UTF-8?q?at:=20=E5=A2=9E=E5=8A=A0=E6=97=A5=E5=BF=97=20*=20feat:=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=87=AA=E5=8A=A8=E5=85=B3=E9=97=AD=E5=8F=82?= =?UTF-8?q?=E6=95=B0=20*=20feat:=20=E5=A2=9E=E5=8A=A0=E8=B6=85=E6=97=B6?= =?UTF-8?q?=E5=88=A4=E5=AE=9A=E9=80=BB=E8=BE=91=20*=20refactor:=20?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=E6=B3=A8=E5=85=A5=E6=8E=A7=E5=88=B6=E5=99=A8?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=20*=20refactor:=20=E6=9B=B4=E6=96=B0=20Speec?= =?UTF-8?q?hWave=20=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BootstrapBlazor.Server/Program.cs | 1 - .../Samples/Speechs/Recognizers.razor | 2 +- .../Samples/Speechs/Recognizers.razor.cs | 10 +++-- .../Samples/Speechs/SpeechWaves.razor.cs | 4 +- .../Samples/Speechs/Speechs.razor | 9 ++--- .../Samples/Speechs/Speechs.razor.cs | 23 ++++++----- .../Samples/Speechs/Synthesizers.razor.cs | 9 +++-- .../Components/Speech/SpeechWave.razor.cs | 15 +++---- .../BootstrapBlazor.AzureSpeech.csproj | 2 +- .../Extensions/RecognizerServiceExtensions.cs | 20 ++++++++-- .../SynthesizerServiceExtensions.cs | 8 ++-- .../Services/AzureRecognizerProvider.cs | 40 ++++++++++--------- .../Services/AzureSynthesizerProvider.cs | 19 ++++++--- .../wwwroot/js/speech.js | 16 +++++++- .../BootstrapBlazor.BaiduSpeech.csproj | 2 +- .../Services/BaiduRecognizerProvider.cs | 35 ++++++++-------- 16 files changed, 127 insertions(+), 88 deletions(-) diff --git a/src/BootstrapBlazor.Server/Program.cs b/src/BootstrapBlazor.Server/Program.cs index 7b95b867e..03b739373 100644 --- a/src/BootstrapBlazor.Server/Program.cs +++ b/src/BootstrapBlazor.Server/Program.cs @@ -15,7 +15,6 @@ Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); builder.Services.AddCors(); builder.Services.AddResponseCompression(); -builder.Services.AddControllers(); builder.Services.AddRazorPages(); builder.Services.AddServerSideBlazor(); diff --git a/src/BootstrapBlazor.Shared/Samples/Speechs/Recognizers.razor b/src/BootstrapBlazor.Shared/Samples/Speechs/Recognizers.razor index d94c05fb3..b38f76efa 100644 --- a/src/BootstrapBlazor.Shared/Samples/Speechs/Recognizers.razor +++ b/src/BootstrapBlazor.Shared/Samples/Speechs/Recognizers.razor @@ -11,7 +11,7 @@

点击 开始识别 后,脚本运行可能会提示要求录音权限,授权后开始讲话,5秒后(可配置)右侧文本框显示语音识别结果,请勿讲完话后直接点击 结束识别

- +
diff --git a/src/BootstrapBlazor.Shared/Samples/Speechs/Recognizers.razor.cs b/src/BootstrapBlazor.Shared/Samples/Speechs/Recognizers.razor.cs index 7078f3ed1..7f1513afc 100644 --- a/src/BootstrapBlazor.Shared/Samples/Speechs/Recognizers.razor.cs +++ b/src/BootstrapBlazor.Shared/Samples/Speechs/Recognizers.razor.cs @@ -26,7 +26,7 @@ public partial class Recognizers { if (ButtonText == "开始识别") { - await RecognizerService.RecognizeOnceAsync(Recognize); + await RecognizerService.RecognizeOnceAsync(Recognize, 5000); } else { @@ -55,11 +55,13 @@ public partial class Recognizers Start = false; ButtonText = "开始识别"; } - - if (status != RecognizerStatus.Close) + else { - StateHasChanged(); + Result = ""; + Start = false; + ButtonText = "开始识别"; } + StateHasChanged(); return Task.CompletedTask; } } diff --git a/src/BootstrapBlazor.Shared/Samples/Speechs/SpeechWaves.razor.cs b/src/BootstrapBlazor.Shared/Samples/Speechs/SpeechWaves.razor.cs index f4ea840c9..a99f62dd8 100644 --- a/src/BootstrapBlazor.Shared/Samples/Speechs/SpeechWaves.razor.cs +++ b/src/BootstrapBlazor.Shared/Samples/Speechs/SpeechWaves.razor.cs @@ -50,11 +50,11 @@ public partial class SpeechWaves DefaultValue = " — " }, new AttributeItem() { - Name = nameof(SpeechWave.TotalTimeSecond), + Name = nameof(SpeechWave.TotalTime), Description = Localizer["TotalTimeSecondAttr"], Type = "int", ValueList = " — ", - DefaultValue = "60" + DefaultValue = "60000" } }; } diff --git a/src/BootstrapBlazor.Shared/Samples/Speechs/Speechs.razor b/src/BootstrapBlazor.Shared/Samples/Speechs/Speechs.razor index 4a22a3edc..cf4ad7952 100644 --- a/src/BootstrapBlazor.Shared/Samples/Speechs/Speechs.razor +++ b/src/BootstrapBlazor.Shared/Samples/Speechs/Speechs.razor @@ -7,7 +7,7 @@

通过麦克风语音采集转换为文字(STT),或者通过文字通过语音朗读出来(TTS)

-

本组件依赖于 @NugetPackageName,使用本组件时需要引用其组件包

+

本套组件内置 AzureBaidu 语音服务,本示例依赖于 @NugetPackageName,使用本组件时需要引用其组件包

Nuget 包安装

@@ -36,7 +36,7 @@
- +
@@ -48,10 +48,7 @@
Program.cs
-
// 增加 Azure 语音服务
-builder.Services.AddBootstrapBlazorAzureSpeech();
-
-// 增加 Baidu 语音服务
+
// 增加 Baidu 语音服务
 builder.Services.AddBootstrapBlazorBaiduSpeech();
2. 使用服务
diff --git a/src/BootstrapBlazor.Shared/Samples/Speechs/Speechs.razor.cs b/src/BootstrapBlazor.Shared/Samples/Speechs/Speechs.razor.cs index 608efacd5..a25a798de 100644 --- a/src/BootstrapBlazor.Shared/Samples/Speechs/Speechs.razor.cs +++ b/src/BootstrapBlazor.Shared/Samples/Speechs/Speechs.razor.cs @@ -34,6 +34,8 @@ public partial class Speechs [NotNull] private static string NugetPackageName => "BootstrapBlazor.BaiduSpeech"; + private int TotalTime { get; set; } = 5000; + /// /// OnInitializedAsync 方法 /// @@ -45,7 +47,8 @@ public partial class Speechs private async Task OnStart() { - await RecognizerService.RecognizeOnceAsync(Recognizer); + TotalTime = 5000; + await RecognizerService.RecognizeOnceAsync(Recognizer, TotalTime); } private Task Recognizer(RecognizerStatus status, string? result) @@ -84,7 +87,7 @@ public partial class Speechs Message = text, Color = Color.Warning }); - await InvokeAsync(StateHasChanged); + StateHasChanged(); } if (status == SynthesizerStatus.Finished) { @@ -92,14 +95,15 @@ public partial class Speechs } }); } - }).ConfigureAwait(false); + }); private async Task RecognizerConfirm() { Show = true; - await InvokeAsync(StateHasChanged); + TotalTime = 3000; + StateHasChanged(); await Task.Delay(300); - await RecognizerService.RecognizeOnceAsync(Confirm); + await RecognizerService.RecognizeOnceAsync(Confirm, TotalTime); } private async Task Confirm(RecognizerStatus status, string? result) @@ -112,7 +116,7 @@ public partial class Speechs else { Show = false; - await InvokeAsync(StateHasChanged); + StateHasChanged(); } result ??= ""; @@ -129,12 +133,12 @@ public partial class Speechs Message = "指令发送中...", Color = Color.Warning }); - await InvokeAsync(StateHasChanged); + StateHasChanged(); //模拟后台执行任务 await Task.Delay(2000); - await SynthesizerService.SynthesizerOnceAsync("已经为您打开", async status => + await SynthesizerService.SynthesizerOnceAsync("已经为您打开", status => { if (status == SynthesizerStatus.Synthesizer) { @@ -143,8 +147,9 @@ public partial class Speechs Message = "已经为您打开", Color = Color.Danger }); - await InvokeAsync(StateHasChanged); + StateHasChanged(); } + return Task.CompletedTask; }); } } diff --git a/src/BootstrapBlazor.Shared/Samples/Speechs/Synthesizers.razor.cs b/src/BootstrapBlazor.Shared/Samples/Speechs/Synthesizers.razor.cs index b22d2bd44..8b12df801 100644 --- a/src/BootstrapBlazor.Shared/Samples/Speechs/Synthesizers.razor.cs +++ b/src/BootstrapBlazor.Shared/Samples/Speechs/Synthesizers.razor.cs @@ -26,15 +26,18 @@ public partial class Synthesizers { if (ButtonText == "开始合成") { - await SynthesizerService.SynthesizerOnceAsync(InputText, Recognize); + if (!string.IsNullOrEmpty(InputText)) + { + await SynthesizerService.SynthesizerOnceAsync(InputText, Synthesizer); + } } else { - await SynthesizerService.CloseAsync(Recognize); + await SynthesizerService.CloseAsync(Synthesizer); } } - private Task Recognize(SynthesizerStatus status) + private Task Synthesizer(SynthesizerStatus status) { if (status == SynthesizerStatus.Synthesizer) { diff --git a/src/BootstrapBlazor/Components/Speech/SpeechWave.razor.cs b/src/BootstrapBlazor/Components/Speech/SpeechWave.razor.cs index 34c8de94b..310d4e8f4 100644 --- a/src/BootstrapBlazor/Components/Speech/SpeechWave.razor.cs +++ b/src/BootstrapBlazor/Components/Speech/SpeechWave.razor.cs @@ -30,10 +30,10 @@ public partial class SpeechWave : IDisposable public Func? OnTimeout { get; set; } /// - /// 获得/设置 总时长 默认 60 秒 + /// 获得/设置 总时长 默认 60000 毫秒 /// [Parameter] - public int TotalTimeSecond { get; set; } = 60; + public int TotalTime { get; set; } = 60000; private TimeSpan UsedTimeSpan { get; set; } @@ -48,7 +48,7 @@ public partial class SpeechWave : IDisposable .AddClass("line", Show) .Build(); - private string? TotalTimeSpanString => $"{TimeSpan.FromSeconds(TotalTimeSecond):mm\\:ss}"; + private string? TotalTimeSpanString => $"{TimeSpan.FromMilliseconds(TotalTime):mm\\:ss}"; private string? UsedTimeSpanString => $"{UsedTimeSpan:mm\\:ss}"; @@ -90,18 +90,15 @@ public partial class SpeechWave : IDisposable { await Task.Delay(1000, Token.Token); UsedTimeSpan = UsedTimeSpan.Add(TimeSpan.FromSeconds(1)); - if (UsedTimeSpan.TotalSeconds >= TotalTimeSecond) + if (UsedTimeSpan.TotalMilliseconds >= TotalTime) { Show = false; if (OnTimeout != null) { - await OnTimeout(); + _ = OnTimeout(); } } - if (Show) - { - await InvokeAsync(StateHasChanged); - } + StateHasChanged(); } catch { diff --git a/src/Extensions/Components/BootstrapBlazor.AzureSpeech/BootstrapBlazor.AzureSpeech.csproj b/src/Extensions/Components/BootstrapBlazor.AzureSpeech/BootstrapBlazor.AzureSpeech.csproj index febf4a49b..c3254f472 100644 --- a/src/Extensions/Components/BootstrapBlazor.AzureSpeech/BootstrapBlazor.AzureSpeech.csproj +++ b/src/Extensions/Components/BootstrapBlazor.AzureSpeech/BootstrapBlazor.AzureSpeech.csproj @@ -1,7 +1,7 @@ - 6.0.2 + 6.0.3 diff --git a/src/Extensions/Components/BootstrapBlazor.AzureSpeech/Extensions/RecognizerServiceExtensions.cs b/src/Extensions/Components/BootstrapBlazor.AzureSpeech/Extensions/RecognizerServiceExtensions.cs index ba080845a..7e8aa11d1 100644 --- a/src/Extensions/Components/BootstrapBlazor.AzureSpeech/Extensions/RecognizerServiceExtensions.cs +++ b/src/Extensions/Components/BootstrapBlazor.AzureSpeech/Extensions/RecognizerServiceExtensions.cs @@ -14,14 +14,20 @@ public static class RecognizerServiceExtensions /// /// /// - /// - public static async Task RecognizeOnceAsync(this RecognizerService service, Func callback) + /// 默认 5000 毫秒后自动识别,设置 0 时禁用 + public static async Task RecognizeOnceAsync(this RecognizerService service, Func callback, int? autoRecoginzerElapsedMilliseconds = null) { var option = new RecognizerOption() { MethodName = "bb_azure_speech_recognizeOnce", Callback = callback }; + + // 设置自动识别时间 + if (autoRecoginzerElapsedMilliseconds.HasValue) + { + option.AutoRecoginzerElapsedMilliseconds = autoRecoginzerElapsedMilliseconds.Value; + } await service.InvokeAsync(option); } @@ -30,14 +36,20 @@ public static class RecognizerServiceExtensions /// /// /// - /// - public static async Task RecognizeOnceAsync(this IRecognizerProvider provider, Func callback) + /// 默认 5000 毫秒后自动识别,设置 0 时禁用 + public static async Task RecognizeOnceAsync(this IRecognizerProvider provider, Func callback, int? autoRecoginzerElapsedMilliseconds = null) { var option = new RecognizerOption() { MethodName = "bb_azure_speech_recognizeOnce", Callback = callback }; + + // 设置自动识别时间 + if (autoRecoginzerElapsedMilliseconds.HasValue) + { + option.AutoRecoginzerElapsedMilliseconds = autoRecoginzerElapsedMilliseconds.Value; + } await provider.InvokeAsync(option); } diff --git a/src/Extensions/Components/BootstrapBlazor.AzureSpeech/Extensions/SynthesizerServiceExtensions.cs b/src/Extensions/Components/BootstrapBlazor.AzureSpeech/Extensions/SynthesizerServiceExtensions.cs index e29a5687d..81c6ccdbc 100644 --- a/src/Extensions/Components/BootstrapBlazor.AzureSpeech/Extensions/SynthesizerServiceExtensions.cs +++ b/src/Extensions/Components/BootstrapBlazor.AzureSpeech/Extensions/SynthesizerServiceExtensions.cs @@ -16,7 +16,7 @@ public static class SynthesizerServiceExtensions /// /// /// - public static async Task AzureSynthesizerOnceAsync(this SynthesizerService service, string? text, Func callback) + public static async Task SynthesizerOnceAsync(this SynthesizerService service, string? text, Func callback) { var option = new SynthesizerOption() { @@ -34,7 +34,7 @@ public static class SynthesizerServiceExtensions /// /// /// - public static async Task AzureSynthesizerOnceAsync(this ISynthesizerProvider provider, string? text, Func callback) + public static async Task SynthesizerOnceAsync(this ISynthesizerProvider provider, string? text, Func callback) { var option = new SynthesizerOption() { @@ -51,7 +51,7 @@ public static class SynthesizerServiceExtensions /// /// /// - public static async Task AzureCloseAsync(this SynthesizerService service, Func callback) + public static async Task CloseAsync(this SynthesizerService service, Func callback) { var option = new SynthesizerOption() { @@ -67,7 +67,7 @@ public static class SynthesizerServiceExtensions /// /// /// - public static async Task AzureCloseAsync(this ISynthesizerProvider provider, Func callback) + public static async Task CloseAsync(this ISynthesizerProvider provider, Func callback) { var option = new SynthesizerOption() { diff --git a/src/Extensions/Components/BootstrapBlazor.AzureSpeech/Services/AzureRecognizerProvider.cs b/src/Extensions/Components/BootstrapBlazor.AzureSpeech/Services/AzureRecognizerProvider.cs index 0b833e872..8f0b7ad60 100644 --- a/src/Extensions/Components/BootstrapBlazor.AzureSpeech/Services/AzureRecognizerProvider.cs +++ b/src/Extensions/Components/BootstrapBlazor.AzureSpeech/Services/AzureRecognizerProvider.cs @@ -3,6 +3,7 @@ // Website: https://www.blazor.zone or https://argozhang.github.io/ using Microsoft.Extensions.Caching.Memory; +using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Microsoft.JSInterop; using System.Net.Http.Json; @@ -29,6 +30,8 @@ public class AzureRecognizerProvider : IRecognizerProvider, IAsyncDisposable private IMemoryCache Cache { get; } + private ILogger Logger { get; } + /// /// 构造函数 /// @@ -36,11 +39,13 @@ public class AzureRecognizerProvider : IRecognizerProvider, IAsyncDisposable /// /// /// - public AzureRecognizerProvider(IOptionsMonitor options, IJSRuntime runtime, IHttpClientFactory factory, IMemoryCache cache) + /// + public AzureRecognizerProvider(IOptionsMonitor options, IJSRuntime runtime, IHttpClientFactory factory, IMemoryCache cache, ILogger logger) { Cache = cache; JSRuntime = runtime; SpeechOption = options.CurrentValue; + Logger = logger; Client = factory.CreateClient(); Client.BaseAddress = new Uri(string.Format(SpeechOption.AuthorizationTokenUrl, SpeechOption.Region)); if (SpeechOption.Timeout > 0) @@ -57,21 +62,19 @@ public class AzureRecognizerProvider : IRecognizerProvider, IAsyncDisposable /// public async Task InvokeAsync(RecognizerOption option) { - if (string.IsNullOrEmpty(option.MethodName)) + if (!string.IsNullOrEmpty(option.MethodName)) { - throw new InvalidOperationException(); - } - - // 通过 SubscriptionKey 交换 Token - var token = await ExchangeToken(); + // 通过 SubscriptionKey 交换 Token + var token = await ExchangeToken(); - Option = option; - if (Module == null) - { - Module = await JSRuntime.InvokeAsync("import", "./_content/BootstrapBlazor.AzureSpeech/js/speech.js"); + Option = option; + if (Module == null) + { + Module = await JSRuntime.InvokeAsync("import", "./_content/BootstrapBlazor.AzureSpeech/js/speech.js"); + } + Interop ??= DotNetObjectReference.Create(this); + await Module.InvokeVoidAsync(Option.MethodName, Interop, nameof(Callback), token, SpeechOption.Region, option.SpeechRecognitionLanguage, option.TargetLanguage, option.AutoRecoginzerElapsedMilliseconds); } - Interop ??= DotNetObjectReference.Create(this); - await Module.InvokeVoidAsync(Option.MethodName, Interop, nameof(Callback), token, SpeechOption.Region, option.SpeechRecognitionLanguage, option.TargetLanguage); } private Task ExchangeToken() => Cache.GetOrCreateAsync(SpeechOption.SubscriptionKey, async entry => @@ -80,6 +83,8 @@ public class AzureRecognizerProvider : IRecognizerProvider, IAsyncDisposable var ret = ""; try { + entry.AbsoluteExpirationRelativeToNow = TimeSpan.FromMilliseconds(50); + Logger.LogInformation($"request url: {url}"); var result = await Client.PostAsJsonAsync(url, ""); if (result.IsSuccessStatusCode) { @@ -89,14 +94,10 @@ public class AzureRecognizerProvider : IRecognizerProvider, IAsyncDisposable entry.AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(9); } } - else - { - entry.AbsoluteExpirationRelativeToNow = TimeSpan.FromMilliseconds(50); - } } - catch + catch (Exception ex) { - + Logger.LogError(ex, "ExchangeToken"); } return ret; }); @@ -110,6 +111,7 @@ public class AzureRecognizerProvider : IRecognizerProvider, IAsyncDisposable [JSInvokable] public async Task Callback(RecognizerStatus status, string result) { + Logger.LogInformation($"RecognizerStatus: {status} Result: {result}"); if (Option.Callback != null) { await Option.Callback(status, result); diff --git a/src/Extensions/Components/BootstrapBlazor.AzureSpeech/Services/AzureSynthesizerProvider.cs b/src/Extensions/Components/BootstrapBlazor.AzureSpeech/Services/AzureSynthesizerProvider.cs index 7b18c8254..c5a62209f 100644 --- a/src/Extensions/Components/BootstrapBlazor.AzureSpeech/Services/AzureSynthesizerProvider.cs +++ b/src/Extensions/Components/BootstrapBlazor.AzureSpeech/Services/AzureSynthesizerProvider.cs @@ -3,6 +3,7 @@ // Website: https://www.blazor.zone or https://argozhang.github.io/ using Microsoft.Extensions.Caching.Memory; +using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Microsoft.JSInterop; using System.Net.Http.Json; @@ -29,6 +30,8 @@ public class AzureSynthesizerProvider : ISynthesizerProvider, IAsyncDisposable private IMemoryCache Cache { get; } + private ILogger Logger { get; } + /// /// 构造函数 /// @@ -36,11 +39,13 @@ public class AzureSynthesizerProvider : ISynthesizerProvider, IAsyncDisposable /// /// /// - public AzureSynthesizerProvider(IOptionsMonitor options, IJSRuntime runtime, IHttpClientFactory factory, IMemoryCache cache) + /// + public AzureSynthesizerProvider(IOptionsMonitor options, IJSRuntime runtime, IHttpClientFactory factory, IMemoryCache cache, ILogger logger) { Cache = cache; JSRuntime = runtime; SpeechOption = options.CurrentValue; + Logger = logger; Client = factory.CreateClient(); Client.BaseAddress = new Uri(string.Format(SpeechOption.AuthorizationTokenUrl, SpeechOption.Region)); if (SpeechOption.Timeout > 0) @@ -51,7 +56,7 @@ public class AzureSynthesizerProvider : ISynthesizerProvider, IAsyncDisposable } /// - /// + /// InvokeAsync 方法 /// /// /// @@ -83,6 +88,7 @@ public class AzureSynthesizerProvider : ISynthesizerProvider, IAsyncDisposable var ret = ""; try { + Logger.LogInformation($"request url: {url}"); var result = await Client.PostAsJsonAsync(url, ""); if (result.IsSuccessStatusCode) { @@ -93,21 +99,22 @@ public class AzureSynthesizerProvider : ISynthesizerProvider, IAsyncDisposable } } } - catch + catch (Exception ex) { - + Logger.LogError(ex, "ExchangeToken"); } return ret; }); /// - /// + /// Callback 回调方法 由 Javascript 调用 /// /// /// [JSInvokable] public async Task Callback(SynthesizerStatus status) { + Logger.LogInformation($"SynthesizerStatus: {status}"); if (Option.Callback != null) { await Option.Callback(status); @@ -134,7 +141,7 @@ public class AzureSynthesizerProvider : ISynthesizerProvider, IAsyncDisposable } /// - /// + /// DisposeAsync 方法 /// /// public async ValueTask DisposeAsync() diff --git a/src/Extensions/Components/BootstrapBlazor.AzureSpeech/wwwroot/js/speech.js b/src/Extensions/Components/BootstrapBlazor.AzureSpeech/wwwroot/js/speech.js index a5a12cbf1..4d52b73f3 100644 --- a/src/Extensions/Components/BootstrapBlazor.AzureSpeech/wwwroot/js/speech.js +++ b/src/Extensions/Components/BootstrapBlazor.AzureSpeech/wwwroot/js/speech.js @@ -2,7 +2,7 @@ var synthesizer = undefined; var player = undefined; -export function bb_azure_speech_recognizeOnce(obj, method, token, region, recognitionLanguage, targetLanguage) { +export function bb_azure_speech_recognizeOnce(obj, method, token, region, recognitionLanguage, targetLanguage, interval) { var azure_recognizer = function () { var speechConfig = SpeechSDK.SpeechTranslationConfig.fromAuthorizationToken(token, region); speechConfig.speechRecognitionLanguage = recognitionLanguage; @@ -18,9 +18,19 @@ export function bb_azure_speech_recognizeOnce(obj, method, token, region, recogn obj.invokeMethodAsync(method, "Finished", successfulResult.privText); }, function (err) { console.log(err); + recognizer = undefined; obj.invokeMethodAsync(method, "Error", err); }); + if (interval) { + var handler = window.setTimeout(function () { + window.clearTimeout(handler); + if (recognizer != undefined) { + recognizer.close(); + recognizer = undefined; + } + }, interval); + } }; BootstrapBlazorModules.addScript('_content/BootstrapBlazor.AzureSpeech/js/microsoft.cognitiveservices.speech.sdk.bundle.js'); @@ -58,7 +68,9 @@ export function bb_azure_speech_synthesizerOnce(obj, method, token, region, synt function (err) { console.log(err); - synthesizer.close(); + if (synthesizer != undefined) { + synthesizer.close(); + } synthesizer = undefined; obj.invokeMethodAsync(method, "Error"); }); diff --git a/src/Extensions/Components/BootstrapBlazor.BaiduSpeech/BootstrapBlazor.BaiduSpeech.csproj b/src/Extensions/Components/BootstrapBlazor.BaiduSpeech/BootstrapBlazor.BaiduSpeech.csproj index 97840aac6..f70b7bcd6 100644 --- a/src/Extensions/Components/BootstrapBlazor.BaiduSpeech/BootstrapBlazor.BaiduSpeech.csproj +++ b/src/Extensions/Components/BootstrapBlazor.BaiduSpeech/BootstrapBlazor.BaiduSpeech.csproj @@ -1,7 +1,7 @@ - 6.0.7 + 6.0.8 diff --git a/src/Extensions/Components/BootstrapBlazor.BaiduSpeech/Services/BaiduRecognizerProvider.cs b/src/Extensions/Components/BootstrapBlazor.BaiduSpeech/Services/BaiduRecognizerProvider.cs index 4345e142b..9b78f6e4a 100644 --- a/src/Extensions/Components/BootstrapBlazor.BaiduSpeech/Services/BaiduRecognizerProvider.cs +++ b/src/Extensions/Components/BootstrapBlazor.BaiduSpeech/Services/BaiduRecognizerProvider.cs @@ -62,7 +62,6 @@ public class BaiduRecognizerProvider : IRecognizerProvider, IAsyncDisposable } Interop ??= DotNetObjectReference.Create(this); await Module.InvokeVoidAsync(Option.MethodName, Interop, nameof(RecognizeCallback), Option.AutoRecoginzerElapsedMilliseconds); - Logger.LogInformation($"{Option.MethodName}"); } } @@ -73,26 +72,30 @@ public class BaiduRecognizerProvider : IRecognizerProvider, IAsyncDisposable public async Task RecognizeCallback(RecognizerStatus status, byte[]? bytes) { Logger.LogInformation($"RecognizerStatus: {status}"); - string data = "Error"; + string data = ""; if (status == RecognizerStatus.Finished) { - var result = Client.Recognize(bytes, "wav", 16000); - var err_no = result.Value("err_no"); - if (err_no == 0) + // 此处同步调用卡 UI 改为异步 + await Task.Run(() => { - var sb = new StringBuilder(); - var text = result["result"].ToArray(); - foreach (var item in text) + var result = Client.Recognize(bytes, "wav", 16000); + var err_no = result.Value("err_no"); + if (err_no == 0) { - sb.Append(item.ToString()); + var sb = new StringBuilder(); + var text = result["result"].ToArray(); + foreach (var item in text) + { + sb.Append(item.ToString()); + } + data = sb.ToString(); + Logger.LogInformation($"recognizer: {data}"); } - data = sb.ToString(); - Logger.LogInformation($"recognizer: {data}"); - } - else - { - Logger.LogError($"err_no: {err_no}"); - } + else + { + Logger.LogError($"err_no: {err_no}"); + } + }); } if (Option.Callback != null) -- Gitee From 30af17b3598dd4b003da37ce5c77cea789619ad6 Mon Sep 17 00:00:00 2001 From: Argo Date: Fri, 13 May 2022 09:01:19 +0000 Subject: [PATCH 09/45] =?UTF-8?q?!2777=20feat(#I578CU):=20MultiSelect=20su?= =?UTF-8?q?pport=20group=20feature=20*=20doc:=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E7=A4=BA=E4=BE=8B=E4=BF=AE=E5=A4=8D=E6=97=A0=E6=B3=95=E9=80=89?= =?UTF-8?q?=E4=B8=AD=E9=97=AE=E9=A2=98=20*=20style:=20=E5=BE=AE=E8=B0=83?= =?UTF-8?q?=E5=A4=9A=E9=80=89=E6=A1=86=E9=80=89=E4=B8=AD=E9=A1=B9=E8=83=8C?= =?UTF-8?q?=E6=99=AF=E8=89=B2=20*=20doc:=20=E7=B2=BE=E7=AE=80=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=20*=20Merge=20branch=20'main'=20into=20docs-dialog=20?= =?UTF-8?q?*=20chore:=20bump=20version=20to=206.6.7=20*=20doc:=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=88=86=E7=BB=84=E7=A4=BA=E4=BE=8B=20*=20doc:=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=B5=84=E6=BA=90=E6=96=87=E4=BB=B6=20*=20do?= =?UTF-8?q?c:=20=E5=A2=9E=E5=8A=A0=E7=A4=BA=E4=BE=8B=20*=20chore:=20bump?= =?UTF-8?q?=20version=206.6.7-beta02=20*=20refactor:=20=E9=87=8D=E6=9E=84?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=20*=20feat:=20=E5=A2=9E=E5=8A=A0=E5=88=86?= =?UTF-8?q?=E7=BB=84=E5=8A=9F=E8=83=BD=20*=20doc:=20=E6=9B=B4=E6=AD=A3=20f?= =?UTF-8?q?ooter=20=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/DataDialogComponent.razor | 2 +- src/BootstrapBlazor.Shared/Locales/en.json | 2 + src/BootstrapBlazor.Shared/Locales/zh.json | 2 + .../Samples/MultiSelects.razor | 26 ++++++++----- .../Samples/MultiSelects.razor.cs | 23 +++++++++++ src/BootstrapBlazor/BootstrapBlazor.csproj | 2 +- .../Components/Select/MultiSelect.css | 2 +- .../Components/Select/MultiSelect.razor | 31 +++++++++------ .../Components/Select/Select.razor | 38 +++++++------------ .../css/bootstrap.blazor.bundle.min.css | 2 +- 10 files changed, 81 insertions(+), 49 deletions(-) diff --git a/src/BootstrapBlazor.Shared/Components/DataDialogComponent.razor b/src/BootstrapBlazor.Shared/Components/DataDialogComponent.razor index dd2cadbb9..a944e790e 100644 --- a/src/BootstrapBlazor.Shared/Components/DataDialogComponent.razor +++ b/src/BootstrapBlazor.Shared/Components/DataDialogComponent.razor @@ -15,7 +15,7 @@ -
; diff --git a/src/BootstrapBlazor.Shared/Shared/BaseLayout.razor b/src/BootstrapBlazor.Shared/Shared/BaseLayout.razor index 6ea23a45b..09b53e355 100644 --- a/src/BootstrapBlazor.Shared/Shared/BaseLayout.razor +++ b/src/BootstrapBlazor.Shared/Shared/BaseLayout.razor @@ -44,7 +44,9 @@ @DownloadText -@Body + + @Body +
diff --git a/src/BootstrapBlazor.Shared/Shared/BaseLayout.razor.cs b/src/BootstrapBlazor.Shared/Shared/BaseLayout.razor.cs index 4393c3275..972a1461d 100644 --- a/src/BootstrapBlazor.Shared/Shared/BaseLayout.razor.cs +++ b/src/BootstrapBlazor.Shared/Shared/BaseLayout.razor.cs @@ -52,6 +52,8 @@ public partial class BaseLayout [NotNull] private static Action? OnInstallable { get; set; } + private string? BBVersion { get; set; } + /// /// OnInitialized 方法 /// @@ -60,6 +62,15 @@ public partial class BaseLayout { base.OnInitialized(); + if (OperatingSystem.IsBrowser()) + { + BBVersion = typeof(BootstrapComponentBase).Assembly.GetName().Version?.ToString(); + } + else + { + BBVersion = System.Diagnostics.FileVersionInfo.GetVersionInfo(typeof(BootstrapComponentBase).Assembly.Location).ProductVersion; + } + DownloadText ??= Localizer[nameof(DownloadText)]; HomeText ??= Localizer[nameof(HomeText)]; IntroductionText ??= Localizer[nameof(IntroductionText)]; @@ -83,7 +94,7 @@ public partial class BaseLayout if (firstRender) { - await JSRuntime.InvokeVoidAsync("$.bb_site_load", MsLearnElement); + await JSRuntime.InvokeVoidAsync("$.bb_site_load", MsLearnElement, BBVersion); } } diff --git a/src/BootstrapBlazor.Shared/Shared/HomeLayout.razor b/src/BootstrapBlazor.Shared/Shared/HomeLayout.razor index ee2456316..0cba1d920 100644 --- a/src/BootstrapBlazor.Shared/Shared/HomeLayout.razor +++ b/src/BootstrapBlazor.Shared/Shared/HomeLayout.razor @@ -111,7 +111,7 @@ [NotNull] private string? OS { get; set; } - [NotNull] + [CascadingParameter(Name = "BBVersion")] private string? BBVersion { get; set; } [Inject] @@ -126,15 +126,6 @@ protected override void OnInitialized() { - if (OperatingSystem.IsBrowser()) - { - BBVersion = typeof(BootstrapComponentBase).Assembly.GetName().Version?.ToString() ?? ""; - } - else - { - BBVersion = System.Diagnostics.FileVersionInfo.GetVersionInfo(typeof(BootstrapComponentBase).Assembly.Location).ProductVersion ?? ""; - } - if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.Windows)) { OS = "Windows"; diff --git a/src/BootstrapBlazor.Shared/wwwroot/css/site.css b/src/BootstrapBlazor.Shared/wwwroot/css/site.css index 075bcec10..657d2048a 100644 --- a/src/BootstrapBlazor.Shared/wwwroot/css/site.css +++ b/src/BootstrapBlazor.Shared/wwwroot/css/site.css @@ -1902,7 +1902,7 @@ header .bb-fs { } .connection-body img { - height: 114px; + height: 110px; margin-left: 1rem; } @@ -1912,7 +1912,7 @@ header .bb-fs { left: 0; right: 0; bottom: 0; - z-index: 2000; + z-index: 1900; color: #ffffff; background: linear-gradient(54.4deg,#771f89 -28.5%,#834cef 30.36%,#636cea 99.19%); padding: 1rem; @@ -1934,31 +1934,31 @@ header .bb-fs { .blazor-intro .blazor-intro-barcode { text-align: center; + margin: 1rem 1rem 0 2rem; } .blazor-intro .blazor-intro-barcode img { - margin: 0 1rem 0 2rem; - width: 120px; - border-radius: var(--bs-border-radius); + width: 110px; } - .blazor-intro .blazor-intro-close { - position: absolute; - top: -26px; - padding: 1rem; - left: calc(50% + 26px); - background-color: #7239ea; - transition: background-color .3s linear; - border-radius: 50%; - cursor: pointer; - } +.blazor-intro-button { + position: absolute; + top: 12px; + right: 12px; + color: #fff; + background-color: #4b4df6; + cursor: pointer; + border-radius: 50%; + padding: 6px; + transition: background-color .3s linear; +} - .blazor-intro .blazor-intro-close:hover { - background-color: #5c2bc4; - } + .blazor-intro-button:hover { + background-color: #3c3de2; + } - .blazor-intro .blazor-intro-btn { - width: 20px; - height: 20px; - background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat; + .blazor-intro-button svg { + width: 24px; + height: 24px; + fill: currentcolor; } diff --git a/src/BootstrapBlazor.Shared/wwwroot/images/QQ-BA1.png b/src/BootstrapBlazor.Shared/wwwroot/images/QQ-BA1.png deleted file mode 100644 index 364d6ed58861e0cd80463da6475b4e57c58182b1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 56016 zcmb4rV{|6Z6K=F|Hk)j0+jcg#ZQHhOTN}Qy^~Sbs+u7JRzyCS+e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ko()?z?mqR$Pu)Fi{KK%5KeBsH z%NK;E6#m@CVpIlUly?Yl3VY*MJB z)^FUsW6#e2x_I>F3y**AtFAnlavoHNlMn=MIOX{d$jZ^{Glf2EcXZy%Csu(XHm)D8 z&nExRN2vT@{%u{ixbx$SKXA-9cYky9o;}AcF5dHQdltVkd}X-zH;)q&-EiHOd!Mp?{q8qzv?zDGf+g@M zC9;ecjr*oy{cLlXwxg3p=`{A6NcQGUkCEn{JD3;W6$6Khj(h*{pIkTGy1{+zb+{D@ zxtCqM^iwCF`|f+*>%^0fU0iog76H#aYW=$V%7Wm=@V@&@6Go2}GWa%~ zBpE7Ro8{3XOBLTH4ewOZ&P{!OYv<;yCf{S%Y|nSLPS@avHiTu%`6aPB-1GN2`Q@#% z4M)H0Ztwfb7uOAM+h@LWD+qV1J6xxI@~7UmefZSy!TkT=e?R%$-`{xreNLKfTzu%p z4a3hZ&elIXW)=@fCzu)$bkrm7BNVt(Qy}x-O`CG=Zq9N3zlYhLzu&%R(}%ZxZQV8Z z|NLv0_7B|#?7!^}H_h`zoo^UE>j~feCovb_cA0roZ}YP z&yHQ(J%ml3WwX<|C^*+%m6+ynpl`!Xq{^L}7We$~fx;f~|1O}w$tTbD{I_dAxp8s! z+!(muZVe>{8w{wkY!-Gbr)SJIt>3wB_w2^Sjk6nv-5a(Ywc(a;9(~M7-x?kqOT&v^ z9AmouRTbX_)H{OW5egikz!3@@p}-Le9HGDw3LK%p_bvtge*)J*PyBM;TmS$707*qo IM6N<$g81x$rT_o{ literal 0 HcmV?d00001 diff --git a/src/BootstrapBlazor.Shared/wwwroot/js/common.js b/src/BootstrapBlazor.Shared/wwwroot/js/common.js index 4b87264a7..fec38703e 100644 --- a/src/BootstrapBlazor.Shared/wwwroot/js/common.js +++ b/src/BootstrapBlazor.Shared/wwwroot/js/common.js @@ -195,27 +195,32 @@ }).trigger('click'); } }, - bb_site_load: function (el) { + bb_site_load: function (el, version) { $(el).tooltip(); var width = $(window).width(); if (width >= 768) { // Intro 弹窗 - var $intro = $('.blazor-intro'); - $('.blazor-intro-close').on('click', function () { - if (handler != null) { - window.clearInterval(handler); - $intro.slideToggle('fade'); - } - }); - var count = 0; - var handler = window.setInterval(function () { - count++; + var key = 'bb_intro_popup:' + version; + var isShown = localStorage.getItem(key); + if (!isShown) { + var $intro = $('.blazor-intro'); + $intro.find('.version').text(version); + $('.blazor-intro-button').on('click', function () { + $intro.slideToggle('fade', function () { + localStorage.setItem(key, false); + }); + }); $intro.slideToggle('fade'); - if (count >= 2) { - window.clearInterval(handler); + + // clean + for (var index = localStorage.length; index > 0; index--) { + var k = localStorage.key(index - 1); + if (k.indexOf('bb_intro_popup:') > -1) { + localStorage.removeItem(k); + } } - }, 15000); + } } }, bb_block: function (el) { -- Gitee From 013890eeb3caf70cc328d298e82c2ce925539b02 Mon Sep 17 00:00:00 2001 From: Argo Date: Sun, 15 May 2022 14:01:42 +0000 Subject: [PATCH 14/45] =?UTF-8?q?!2785=20test(#I57IBT):=20add=20unit=20tes?= =?UTF-8?q?t=20for=20edit=20feature=20of=20Table=20*=20chore:=20=E9=9A=90?= =?UTF-8?q?=E8=97=8F=E5=A4=9A=E8=AF=AD=E8=A8=80=E5=8D=95=E5=85=83=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=20*=20chore:=20=E5=A2=9E=E5=8A=A0=20Edtior=20?= =?UTF-8?q?=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95=E5=B7=A5=E7=A8=8B=20*=20te?= =?UTF-8?q?st:=20=E5=A2=9E=E5=8A=A0=E5=88=A0=E9=99=A4=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=20*=20refactor:=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=E5=8F=AF=E4=B8=BA=E7=A9=BA=E5=88=A4=E6=96=AD?= =?UTF-8?q?=20*=20refactor:=20=E9=87=8D=E6=9E=84=E9=80=BB=E8=BE=91=20*=20r?= =?UTF-8?q?efactor:=20=E7=B2=BE=E7=AE=80=E4=BB=A3=E7=A0=81=20*=20revert:?= =?UTF-8?q?=20=E7=A7=BB=E9=99=A4=E6=95=B0=E6=8D=AE=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95=20*=20test:=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95=20*=20test:=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95=20*=20te?= =?UTF-8?q?st:=20=E5=A2=9E=E5=8A=A0=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95=20?= =?UTF-8?q?*=20refactor:=20=E7=A7=BB=E9=99=A4=E4=B8=8D=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E7=9A=84=E4=BB=A3=E7=A0=81=20*=20test:=20=E5=A2=9E=E5=8A=A0=20?= =?UTF-8?q?SelectedRows=20=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95=20*=20chore?= =?UTF-8?q?:=20=E5=A2=9E=E5=8A=A0=E5=BF=BD=E7=95=A5=E7=AD=96=E7=95=A5=20*?= =?UTF-8?q?=20fix:=20=E4=BF=AE=E5=A4=8D=E8=BF=90=E8=A1=8C=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E7=9A=84=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + BootstrapBlazor.slnf | 1 - .../Components/Table/Table.razor.Edit.cs | 78 +++----- test/UnitTest/Components/TableTest.cs | 188 ++++++++++++++++++ test/UnitTest/Components/ValidateTest.cs | 4 +- 5 files changed, 215 insertions(+), 57 deletions(-) diff --git a/.gitignore b/.gitignore index efd5970be..06e869a6b 100644 --- a/.gitignore +++ b/.gitignore @@ -354,6 +354,7 @@ src/**/*.xml # Coverage coverage*.xml tools/ +*.lutconfig # Upload Folder src/**/wwwroot/**/uploader diff --git a/BootstrapBlazor.slnf b/BootstrapBlazor.slnf index f0cf3e4cb..7b27a3bda 100644 --- a/BootstrapBlazor.slnf +++ b/BootstrapBlazor.slnf @@ -5,7 +5,6 @@ "src\\BootstrapBlazor.Server\\BootstrapBlazor.Server.csproj", "src\\BootstrapBlazor.Shared\\BootstrapBlazor.Shared.csproj", "src\\BootstrapBlazor\\BootstrapBlazor.csproj", - "test\\UnitTest.Localization\\UnitTest.Localization.csproj", "test\\UnitTest\\UnitTest.csproj" ] } diff --git a/src/BootstrapBlazor/Components/Table/Table.razor.Edit.cs b/src/BootstrapBlazor/Components/Table/Table.razor.Edit.cs index d08168377..a4041cf24 100644 --- a/src/BootstrapBlazor/Components/Table/Table.razor.Edit.cs +++ b/src/BootstrapBlazor/Components/Table/Table.razor.Edit.cs @@ -180,16 +180,6 @@ public partial class Table [NotNull] private IDataService? InjectDataService { get; set; } - private IDataService GetDataService() - { - var ds = DataService ?? InjectDataService; - if (ds == null) - { - throw new InvalidOperationException(DataServiceInvalidOperationText); - } - return ds; - } - private async Task> InternalOnQueryAsync(QueryPageOptions options) { QueryData? ret = null; @@ -200,20 +190,9 @@ public partial class Table else { var d = DataService ?? InjectDataService; - if (d != null) - { - ret = await d.QueryAsync(options); - } + ret = await d.QueryAsync(options); } - return ret ?? new QueryData - { - Items = Enumerable.Empty(), - TotalCount = 0, - IsAdvanceSearch = false, - IsFiltered = false, - IsSearch = false, - IsSorted = false - }; + return ret; } private async Task InternalOnDeleteAsync() @@ -226,10 +205,7 @@ public partial class Table else { var d = DataService ?? InjectDataService; - if (d != null) - { - ret = await d.DeleteAsync(SelectedRows); - } + ret = await d.DeleteAsync(SelectedRows); } return ret; } @@ -244,10 +220,7 @@ public partial class Table else { var d = DataService ?? InjectDataService; - if (d != null) - { - ret = await d.SaveAsync(item, changedType); - } + ret = await d.SaveAsync(item, changedType); } return ret; } @@ -262,10 +235,7 @@ public partial class Table { EditModel = new TItem(); var d = DataService ?? InjectDataService; - if (d != null) - { - await d.AddAsync(EditModel); - } + await d.AddAsync(EditModel); } } @@ -430,6 +400,10 @@ public partial class Table await OnQuery(); } } + else + { + RowItemsCache = null; + } async Task OnQuery() { @@ -457,28 +431,24 @@ public partial class Table } queryData = await InternalOnQueryAsync(queryOption); + RowItemsCache = null; + Items = null; + QueryItems = queryData.Items; + TotalCount = queryData.TotalCount; + IsAdvanceSearch = queryData.IsAdvanceSearch; - if (queryData != null) - { - RowItemsCache = null; - Items = null; - QueryItems = queryData.Items; - TotalCount = queryData.TotalCount; - IsAdvanceSearch = queryData.IsAdvanceSearch; - - // 处理选中行逻辑 - ProcessSelectedRows(); + // 处理选中行逻辑 + ProcessSelectedRows(); - // 分页情况下内部不做处理防止页码错乱 - if (!queryOption.IsPage) - { - ProcessPageData(queryData, queryOption); - } + // 分页情况下内部不做处理防止页码错乱 + if (!queryOption.IsPage) + { + ProcessPageData(queryData, queryOption); + } - if (IsTree) - { - await ProcessTreeData(); - } + if (IsTree) + { + await ProcessTreeData(); } void ProcessSelectedRows() diff --git a/test/UnitTest/Components/TableTest.cs b/test/UnitTest/Components/TableTest.cs index 2f1e13dd7..8a63076f1 100644 --- a/test/UnitTest/Components/TableTest.cs +++ b/test/UnitTest/Components/TableTest.cs @@ -2760,6 +2760,167 @@ public class TableTest : TableTestBase Assert.Equal("Name", v); } + [Fact] + public async Task SelectedRowsChanged_Ok() + { + var localizer = Context.Services.GetRequiredService>(); + var items = Foo.GenerateFoo(localizer, 2); + var selectedRows = new List(); + var cut = Context.RenderComponent(pb => + { + pb.AddChildContent>(pb => + { + pb.Add(a => a.RenderMode, TableRenderMode.Table); + pb.Add(a => a.Items, items); + pb.Add(a => a.SelectedRows, selectedRows); + pb.Add(a => a.IsMultipleSelect, true); + pb.Add(a => a.SelectedRowsChanged, EventCallback.Factory.Create>(this, foos => + { + selectedRows = foos; + })); + pb.Add(a => a.TableColumns, foo => builder => + { + builder.OpenComponent>(0); + builder.AddAttribute(1, "Field", "Name"); + builder.AddAttribute(2, "FieldExpression", Utility.GenerateValueExpression(foo, "Name", typeof(string))); + builder.CloseComponent(); + }); + }); + }); + Assert.Empty(selectedRows); + + var check = cut.Find("thead input"); + await cut.InvokeAsync(() => check.Click()); + Assert.Equal(2, selectedRows.Count); + + await cut.InvokeAsync(() => check.Click()); + Assert.Empty(selectedRows); + } + + [Fact] + public void SetRowClassFormatter_Ok() + { + var localizer = Context.Services.GetRequiredService>(); + var items = Foo.GenerateFoo(localizer, 2); + var selectedRows = new List(); + var cut = Context.RenderComponent(pb => + { + pb.AddChildContent>(pb => + { + pb.Add(a => a.RenderMode, TableRenderMode.Table); + pb.Add(a => a.Items, items); + pb.Add(a => a.IsKeyboard, true); + pb.Add(a => a.AutoGenerateColumns, false); + pb.Add(a => a.ShowLoading, false); + pb.Add(a => a.UseComponentWidth, true); + pb.Add(a => a.RenderModeResponsiveWidth, 768); + pb.Add(a => a.SetRowClassFormatter, foo => "test_row_class"); + pb.Add(a => a.TableColumns, foo => builder => + { + builder.OpenComponent>(0); + builder.AddAttribute(1, "Field", "Name"); + builder.AddAttribute(2, "FieldExpression", Utility.GenerateValueExpression(foo, "Name", typeof(string))); + builder.CloseComponent(); + }); + }); + }); + cut.Contains("test_row_class"); + } + + [Fact] + public void OnQueryAsync_DataService() + { + var localizer = Context.Services.GetRequiredService>(); + var cut = Context.RenderComponent(pb => + { + pb.AddChildContent>(pb => + { + pb.Add(a => a.RenderMode, TableRenderMode.Table); + pb.Add(a => a.DataService, new MockNullDataService(localizer)); + pb.Add(a => a.TableColumns, foo => builder => + { + builder.OpenComponent>(0); + builder.AddAttribute(1, "Field", "Name"); + builder.AddAttribute(2, "FieldExpression", Utility.GenerateValueExpression(foo, "Name", typeof(string))); + builder.CloseComponent(); + }); + }); + }); + Assert.Equal(2, cut.FindAll("tbody tr").Count); + } + + [Fact] + public async Task Delete_Ok() + { + var localizer = Context.Services.GetRequiredService>(); + var items = Foo.GenerateFoo(localizer, 2); + var cut = Context.RenderComponent(pb => + { + pb.AddChildContent>(pb => + { + pb.Add(a => a.RenderMode, TableRenderMode.Table); + pb.Add(a => a.Items, items); + pb.Add(a => a.IsMultipleSelect, true); + pb.Add(a => a.ShowToolbar, true); + pb.Add(a => a.TableColumns, foo => builder => + { + builder.OpenComponent>(0); + builder.AddAttribute(1, "Field", "Name"); + builder.AddAttribute(2, "FieldExpression", Utility.GenerateValueExpression(foo, "Name", typeof(string))); + builder.CloseComponent(); + }); + }); + }); + var input = cut.Find("tbody tr input"); + await cut.InvokeAsync(() => input.Click()); + + var button = cut.FindComponent>(); + await cut.InvokeAsync(() => button.Instance.OnConfirm.Invoke()); + + var row = cut.FindAll("tbody tr"); + Assert.Equal(2, row.Count); + } + + [Fact] + public async Task OnDeleteAsync_Ok() + { + var localizer = Context.Services.GetRequiredService>(); + var items = Foo.GenerateFoo(localizer, 2); + var cut = Context.RenderComponent(pb => + { + pb.AddChildContent>(pb => + { + pb.Add(a => a.RenderMode, TableRenderMode.Table); + pb.Add(a => a.Items, items); + pb.Add(a => a.IsMultipleSelect, true); + pb.Add(a => a.ShowToolbar, true); + pb.Add(a => a.OnDeleteAsync, foos => + { + foreach (var foo in foos) + { + items.Remove(foo); + } + return Task.FromResult(true); + }); + pb.Add(a => a.TableColumns, foo => builder => + { + builder.OpenComponent>(0); + builder.AddAttribute(1, "Field", "Name"); + builder.AddAttribute(2, "FieldExpression", Utility.GenerateValueExpression(foo, "Name", typeof(string))); + builder.CloseComponent(); + }); + }); + }); + var input = cut.Find("tbody tr input"); + await cut.InvokeAsync(() => input.Click()); + + var button = cut.FindComponent>(); + await cut.InvokeAsync(() => button.Instance.OnConfirm.Invoke()); + + var row = cut.FindAll("tbody tr"); + Assert.Equal(1, row.Count); + } + private static Func>> OnQueryAsync(IStringLocalizer localizer) => new(op => { var items = Foo.GenerateFoo(localizer, 5); @@ -2774,6 +2935,33 @@ public class TableTest : TableTestBase }); }); + private class MockNullDataService : IDataService + { + IStringLocalizer Localizer { get; set; } + + public MockNullDataService(IStringLocalizer localizer) => Localizer = localizer; + + public Task AddAsync(Foo model) => Task.FromResult(true); + + public Task DeleteAsync(IEnumerable models) => Task.FromResult(true); + + public Task> QueryAsync(QueryPageOptions option) + { + var foos = Foo.GenerateFoo(Localizer, 2); + return Task.FromResult(new QueryData() + { + Items = foos, + TotalCount = 2, + IsAdvanceSearch = true, + IsFiltered = true, + IsSearch = true, + IsSorted = true + }); + } + + public Task SaveAsync(Foo model, ItemChangedType changedType) => Task.FromResult(true); + } + private class MockButton : ButtonBase { [CascadingParameter] diff --git a/test/UnitTest/Components/ValidateTest.cs b/test/UnitTest/Components/ValidateTest.cs index 7fd06a213..934425fec 100644 --- a/test/UnitTest/Components/ValidateTest.cs +++ b/test/UnitTest/Components/ValidateTest.cs @@ -254,7 +254,7 @@ public class ValidateTest : BootstrapBlazorTestBase } [Fact] - public void SetLabel_Ok() + public async Task SetLabel_Ok() { var cut = Context.RenderComponent>(builder => { @@ -262,7 +262,7 @@ public class ValidateTest : BootstrapBlazorTestBase builder.Add(a => a.ShowLabel, true); }); Assert.Equal("test", cut.Instance.DisplayText); - cut.InvokeAsync(() => cut.Instance.SetLabel("test1")); + await cut.InvokeAsync(() => cut.Instance.SetLabel("test1")); Assert.Equal("test1", cut.Instance.DisplayText); } -- Gitee From 630998cb76af94d561e7e07badd6c1854d8aead2 Mon Sep 17 00:00:00 2001 From: Argo Date: Mon, 16 May 2022 07:52:16 +0000 Subject: [PATCH 15/45] =?UTF-8?q?!2786=20test(#I57N4E):=20add=20edit=20fea?= =?UTF-8?q?ture=20unit=20test=20for=20Table=20*=20test:=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=88=97=E6=8E=92=E5=BA=8F=E5=8D=95=E5=85=83=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=20*=20test:=20=E5=A2=9E=E5=8A=A0=E5=A4=9A=E5=88=97?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95=20*=20te?= =?UTF-8?q?st:=20=E5=A2=9E=E5=8A=A0=E8=87=AA=E5=AE=9A=E4=B9=89=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95=20*=20test:=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20SearchText=20=E5=8D=95=E5=85=83=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=20*=20fix:=20=E4=BF=AE=E5=A4=8D=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E7=9A=84=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95=20*=20test:=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8A=A8=E6=80=81=E7=B1=BB=E5=9E=8B=E5=8D=95?= =?UTF-8?q?=E5=85=83=E6=B5=8B=E8=AF=95=20*=20test:=20=E5=A2=9E=E5=8A=A0=20?= =?UTF-8?q?SortString=20=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95=20*=20test:?= =?UTF-8?q?=20=E5=A2=9E=E5=8A=A0=20OnBeforeDelete=20=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=20*=20test:=20=E5=A2=9E=E5=8A=A0=20CardView?= =?UTF-8?q?=20=E6=8C=89=E9=92=AE=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95=20*?= =?UTF-8?q?=20test:=20=E5=A2=9E=E5=8A=A0=E5=88=B7=E6=96=B0=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95=20*=20test:=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20ToggleLoading=20=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=20*=20test:=20=E5=A2=9E=E5=8A=A0=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95=20*=20test:=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20ShowLoading=20=E5=8D=95=E5=85=83=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=20*=20refactor:=20=E7=A7=BB=E9=99=A4=20CanSave=20CanD?= =?UTF-8?q?elete=20=E9=80=BB=E8=BE=91=20*=20test:=20=E5=A2=9E=E5=8A=A0=20A?= =?UTF-8?q?dd=20=E6=8C=89=E9=92=AE=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95=20*?= =?UTF-8?q?=20test:=20=E5=A2=9E=E5=8A=A0=E6=9B=B4=E6=96=B0=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/Table/Table.razor.Edit.cs | 4 - .../Components/Table/Table.razor.Toolbar.cs | 146 +++---- .../Components/Table/Table.razor.cs | 11 +- test/UnitTest/Components/TableTest.cs | 394 +++++++++++++++++- 4 files changed, 442 insertions(+), 113 deletions(-) diff --git a/src/BootstrapBlazor/Components/Table/Table.razor.Edit.cs b/src/BootstrapBlazor/Components/Table/Table.razor.Edit.cs index a4041cf24..61ea63920 100644 --- a/src/BootstrapBlazor/Components/Table/Table.razor.Edit.cs +++ b/src/BootstrapBlazor/Components/Table/Table.razor.Edit.cs @@ -261,10 +261,6 @@ public partial class Table } } - private bool CanDelete => OnDeleteAsync != null || DataService != null || InjectDataService != null; - - private bool CanSave => OnSaveAsync != null || DataService != null || InjectDataService != null; - /// /// 单选模式下选择行时调用此方法 /// diff --git a/src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs b/src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs index f5459cc0b..9ae160597 100644 --- a/src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs +++ b/src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs @@ -233,24 +233,9 @@ public partial class Table { await AddDynamicOjbectExcelModelAsync(); } - else if (IsTracking || CanSave) - { - await AddItemAsync(); - } else { - await ShowAddToastAsync(SaveButtonToastContent); - } - - async Task ShowAddToastAsync(string content) - { - var option = new ToastOption - { - Category = ToastCategory.Error, - Title = AddButtonToastTitle, - Content = content - }; - await Toast.Show(option); + await AddItemAsync(); } async Task AddItemAsync() @@ -316,60 +301,53 @@ public partial class Table /// public async Task EditAsync() { - if (IsTracking || CanSave || DynamicContext != null) + if (SelectedRows.Count == 1) { - if (SelectedRows.Count == 1) + // 检查是否选中了不可编辑行(行内无编辑按钮) + if (ShowEditButtonCallback != null && !ShowEditButtonCallback(SelectedRows[0])) + { + // 提示不可编辑 + await ShowToastAsync(EditButtonToastReadonlyContent); + } + else { - // 检查是否选中了不可编辑行(行内无编辑按钮) - if (ShowEditButtonCallback != null && !ShowEditButtonCallback(SelectedRows[0])) + await ToggleLoading(true); + await InternalOnEditAsync(); + EditModalTitleString = EditModalTitle; + + // 显示编辑框 + if (EditMode == EditMode.Popup) { - // 提示不可编辑 - await ShowToastAsync(ToastCategory.Information, EditButtonToastReadonlyContent); + await ShowEditDialog(ItemChangedType.Update); } - else + else if (EditMode == EditMode.EditForm) { - await ToggleLoading(true); - await InternalOnEditAsync(); - EditModalTitleString = EditModalTitle; - - // 显示编辑框 - if (EditMode == EditMode.Popup) - { - await ShowEditDialog(ItemChangedType.Update); - } - else if (EditMode == EditMode.EditForm) - { - ShowEditForm = true; - ShowAddForm = false; - await UpdateAsync(); - - } - else if (EditMode == EditMode.InCell) - { - AddInCell = false; - EditInCell = true; - await UpdateAsync(); - - } - await ToggleLoading(false); + ShowEditForm = true; + ShowAddForm = false; + await UpdateAsync(); + } - } - else - { - var content = SelectedRows.Count == 0 ? EditButtonToastNotSelectContent : EditButtonToastMoreSelectContent; - await ShowToastAsync(ToastCategory.Information, content); + else if (EditMode == EditMode.InCell) + { + AddInCell = false; + EditInCell = true; + await UpdateAsync(); + + } + await ToggleLoading(false); } } else { - await ShowToastAsync(ToastCategory.Error, EditButtonToastNoSaveMethodContent); + var content = SelectedRows.Count == 0 ? EditButtonToastNotSelectContent : EditButtonToastMoreSelectContent; + await ShowToastAsync(content); } - async Task ShowToastAsync(ToastCategory category, string content) + async Task ShowToastAsync(string content) { var option = new ToastOption { - Category = category, + Category = ToastCategory.Information, Title = EditButtonToastTitle, Content = content }; @@ -449,45 +427,32 @@ public partial class Table /// protected async Task SaveAsync(EditContext context, ItemChangedType changedType) { - if (DynamicContext != null || CanSave) + await ToggleLoading(true); + if (await SaveModelAsync(context, changedType)) { - await ToggleLoading(true); - if (await SaveModelAsync(context, changedType)) + if (EditMode == EditMode.Popup) { - if (EditMode == EditMode.Popup) - { - await QueryAsync(); - } - else if (EditMode == EditMode.EditForm) - { - if (ShowAddForm) - { - await QueryData(); - ShowAddForm = false; - } - ShowEditForm = false; - StateHasChanged(); - } - else if (EditMode == EditMode.InCell) + await QueryAsync(); + } + else if (EditMode == EditMode.EditForm) + { + if (ShowAddForm) { - SelectedRows.Clear(); - EditInCell = false; - AddInCell = false; - await QueryAsync(); + await QueryData(); + ShowAddForm = false; } + ShowEditForm = false; + StateHasChanged(); } - await ToggleLoading(false); - } - else - { - var option = new ToastOption + else if (EditMode == EditMode.InCell) { - Category = ToastCategory.Error, - Title = SaveButtonToastTitle, - Content = SaveButtonToastContent - }; - await Toast.Show(option); + SelectedRows.Clear(); + EditInCell = false; + AddInCell = false; + await QueryAsync(); + } } + await ToggleLoading(false); } /// @@ -676,11 +641,8 @@ public partial class Table } else { - if (CanDelete) - { - await InternalOnDeleteAsync(); - await QueryAsync(); - } + await InternalOnDeleteAsync(); + await QueryAsync(); } } } diff --git a/src/BootstrapBlazor/Components/Table/Table.razor.cs b/src/BootstrapBlazor/Components/Table/Table.razor.cs index b74258b36..cbea40b6d 100644 --- a/src/BootstrapBlazor/Components/Table/Table.razor.cs +++ b/src/BootstrapBlazor/Components/Table/Table.razor.cs @@ -1082,13 +1082,10 @@ public partial class Table : BootstrapComponentBase, IDisposable, ITable void SetEditTemplate() { - if (CanSave) - { - var onValueChanged = Utility.CreateOnValueChanged(col.PropertyType).Compile(); - var parameters = col.ComponentParameters?.ToList() ?? new List>(); - parameters.Add(new(nameof(ValidateBase.OnValueChanged), onValueChanged.Invoke(item, col, (model, column, val) => InternalOnSaveAsync(model, ItemChangedType.Update)))); - col.ComponentParameters = parameters; - } + var onValueChanged = Utility.CreateOnValueChanged(col.PropertyType).Compile(); + var parameters = col.ComponentParameters?.ToList() ?? new List>(); + parameters.Add(new(nameof(ValidateBase.OnValueChanged), onValueChanged.Invoke(item, col, (model, column, val) => InternalOnSaveAsync(model, ItemChangedType.Update)))); + col.ComponentParameters = parameters; } } diff --git a/test/UnitTest/Components/TableTest.cs b/test/UnitTest/Components/TableTest.cs index 8a63076f1..8196c8175 100644 --- a/test/UnitTest/Components/TableTest.cs +++ b/test/UnitTest/Components/TableTest.cs @@ -6,6 +6,7 @@ using BootstrapBlazor.Shared; using Microsoft.AspNetCore.Components.Web; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Localization; +using System.Data; namespace UnitTest.Components; @@ -1963,7 +1964,10 @@ public class TableTest : TableTestBase pb.Add(a => a.RenderMode, TableRenderMode.Table); pb.Add(a => a.SearchMode, SearchMode.Top); pb.Add(a => a.SearchText, "test_search_text"); - pb.Add(a => a.OnQueryAsync, OnQueryAsync(localizer)); + pb.Add(a => a.OnQueryAsync, op => + { + return OnQueryAsync(localizer, isSearch: false)(op); + }); pb.Add(a => a.TableColumns, foo => builder => { builder.OpenComponent>(0); @@ -2002,6 +2006,7 @@ public class TableTest : TableTestBase pb.Add(a => a.SearchMode, SearchMode.Top); pb.Add(a => a.RenderMode, TableRenderMode.Table); pb.Add(a => a.OnQueryAsync, OnQueryAsync(localizer)); + pb.Add(a => a.ShowLoading, true); pb.Add(a => a.OnResetSearchAsync, foo => { reset = true; @@ -2514,28 +2519,35 @@ public class TableTest : TableTestBase } [Fact] - public void TableColumn_DefaultSortOrder() + public async Task TableColumn_DefaultSortOrder() { var localizer = Context.Services.GetRequiredService>(); - var items = Foo.GenerateFoo(localizer, 2); var cut = Context.RenderComponent(pb => { pb.AddChildContent>(pb => { pb.Add(a => a.RenderMode, TableRenderMode.Table); - pb.Add(a => a.Items, items); + pb.Add(a => a.OnQueryAsync, op => + { + return OnQueryAsync(localizer, isSorted: false)(op); + }); pb.Add(a => a.TableColumns, foo => builder => { builder.OpenComponent>(0); builder.AddAttribute(1, "Field", "Name"); builder.AddAttribute(2, "FieldExpression", Utility.GenerateValueExpression(foo, "Name", typeof(string))); - builder.AddAttribute(3, "DefaultSortOrder", SortOrder.Asc); + builder.AddAttribute(3, "Sortable", true); + builder.AddAttribute(4, "DefaultSortOrder", SortOrder.Asc); builder.CloseComponent(); }); }); }); var column = cut.FindComponent>(); Assert.Equal(SortOrder.Asc, column.Instance.DefaultSortOrder); + + // query + var th = cut.Find("table thead th"); + await cut.InvokeAsync(() => th.Click()); } [Fact] @@ -2921,17 +2933,360 @@ public class TableTest : TableTestBase Assert.Equal(1, row.Count); } - private static Func>> OnQueryAsync(IStringLocalizer localizer) => new(op => + [Fact] + public async Task OnBeforeDelete_Ok() + { + var localizer = Context.Services.GetRequiredService>(); + var items = Foo.GenerateFoo(localizer, 2); + var cut = Context.RenderComponent(pb => + { + pb.AddChildContent>(pb => + { + pb.Add(a => a.RenderMode, TableRenderMode.Table); + pb.Add(a => a.Items, items); + pb.Add(a => a.ShowToolbar, true); + pb.Add(a => a.ShowExtendButtons, true); + pb.Add(a => a.TableColumns, foo => builder => + { + builder.OpenComponent>(0); + builder.AddAttribute(1, "Field", "Name"); + builder.AddAttribute(2, "FieldExpression", Utility.GenerateValueExpression(foo, "Name", typeof(string))); + builder.CloseComponent(); + }); + }); + }); + + var buttons = cut.FindComponents(); + await cut.InvokeAsync(() => buttons[1].Instance.OnBeforeClick()); + + var table = cut.FindComponent>(); + Assert.Single(table.Instance.SelectedRows); + } + + [Fact] + public async Task OnSaveAsync_Ok() + { + var localizer = Context.Services.GetRequiredService>(); + var items = Foo.GenerateFoo(localizer, 2); + var itemChagned = ItemChangedType.Add; + var cut = Context.RenderComponent(pb => + { + pb.AddChildContent>(pb => + { + pb.Add(a => a.RenderMode, TableRenderMode.Table); + pb.Add(a => a.Items, items); + pb.Add(a => a.IsMultipleSelect, true); + pb.Add(a => a.ShowToolbar, true); + pb.Add(a => a.ShowExtendButtons, true); + pb.Add(a => a.EditMode, EditMode.InCell); + pb.Add(a => a.OnSaveAsync, (foo, changedType) => + { + itemChagned = changedType; + return Task.FromResult(true); + }); + pb.Add(a => a.TableColumns, foo => builder => + { + builder.OpenComponent>(0); + builder.AddAttribute(1, "Field", "Name"); + builder.AddAttribute(2, "FieldExpression", Utility.GenerateValueExpression(foo, "Name", typeof(string))); + builder.CloseComponent(); + }); + }); + }); + + // test edit button + var button = cut.FindAll("tbody tr button"); + await cut.InvokeAsync(() => button[0].Click()); + + var update = cut.Find("tbody tr button"); + await cut.InvokeAsync(() => update.Click()); + Assert.Equal(ItemChangedType.Update, itemChagned); + } + + [Fact] + public async Task OnAddAsync_Ok() + { + var localizer = Context.Services.GetRequiredService>(); + var items = Foo.GenerateFoo(localizer, 2); + var added = false; + var itemChagned = ItemChangedType.Update; + var cut = Context.RenderComponent(pb => + { + pb.AddChildContent>(pb => + { + pb.Add(a => a.RenderMode, TableRenderMode.Table); + pb.Add(a => a.Items, items); + pb.Add(a => a.IsMultipleSelect, true); + pb.Add(a => a.ShowToolbar, true); + pb.Add(a => a.ShowExtendButtons, true); + pb.Add(a => a.EditMode, EditMode.InCell); + pb.Add(a => a.OnAddAsync, () => + { + added = true; + return Task.FromResult(new Foo() { Name = "test" }); + }); + pb.Add(a => a.OnSaveAsync, (foo, changedType) => + { + itemChagned = changedType; + return Task.FromResult(true); + }); + pb.Add(a => a.TableColumns, foo => builder => + { + builder.OpenComponent>(0); + builder.AddAttribute(1, "Field", "Name"); + builder.AddAttribute(2, "FieldExpression", Utility.GenerateValueExpression(foo, "Name", typeof(string))); + builder.CloseComponent(); + }); + }); + }); + + // test add button + var button = cut.FindComponent>(); + await cut.InvokeAsync(() => button.Instance.OnClick.InvokeAsync()); + Assert.True(added); + + // test update button + var update = cut.Find("tbody tr button"); + await cut.InvokeAsync(() => update.Click()); + Assert.Equal(ItemChangedType.Add, itemChagned); + } + + [Theory] + [InlineData(true)] + [InlineData(false)] + public async Task OnEditAsync_Ok(bool tracking) + { + var localizer = Context.Services.GetRequiredService>(); + var items = Foo.GenerateFoo(localizer, 2); + var edited = false; + var cut = Context.RenderComponent(pb => + { + pb.AddChildContent>(pb => + { + pb.Add(a => a.RenderMode, TableRenderMode.Table); + pb.Add(a => a.Items, items); + pb.Add(a => a.IsMultipleSelect, true); + pb.Add(a => a.ShowToolbar, true); + pb.Add(a => a.IsTracking, tracking); + pb.Add(a => a.ShowExtendButtons, true); + pb.Add(a => a.EditMode, EditMode.InCell); + pb.Add(a => a.OnEditAsync, foo => + { + edited = true; + return Task.CompletedTask; + }); + pb.Add(a => a.TableColumns, foo => builder => + { + builder.OpenComponent>(0); + builder.AddAttribute(1, "Field", "Name"); + builder.AddAttribute(2, "FieldExpression", Utility.GenerateValueExpression(foo, "Name", typeof(string))); + builder.CloseComponent(); + }); + }); + }); + + // test edit button + var button = cut.FindAll("tbody tr button"); + await cut.InvokeAsync(() => button[0].Click()); + Assert.True(edited); + } + + [Fact] + public async Task ToggleLoading_Ok() + { + var localizer = Context.Services.GetRequiredService>(); + var items = Foo.GenerateFoo(localizer, 2); + var cut = Context.RenderComponent(pb => + { + pb.AddChildContent>(pb => + { + pb.Add(a => a.RenderMode, TableRenderMode.Table); + pb.Add(a => a.Items, items); + pb.Add(a => a.ShowLoading, true); + pb.Add(a => a.TableColumns, foo => builder => + { + builder.OpenComponent>(0); + builder.AddAttribute(1, "Field", "Name"); + builder.AddAttribute(2, "FieldExpression", Utility.GenerateValueExpression(foo, "Name", typeof(string))); + builder.CloseComponent(); + }); + }); + }); + + var table = cut.FindComponent>(); + await cut.InvokeAsync(() => table.Instance.QueryAsync()); + } + + [Fact] + public async Task Refresh_Ok() + { + var localizer = Context.Services.GetRequiredService>(); + var items = Foo.GenerateFoo(localizer, 2); + var cut = Context.RenderComponent(pb => + { + pb.AddChildContent>(pb => + { + pb.Add(a => a.RenderMode, TableRenderMode.Table); + pb.Add(a => a.ShowToolbar, true); + pb.Add(a => a.Items, items); + pb.Add(a => a.TableColumns, foo => builder => + { + builder.OpenComponent>(0); + builder.AddAttribute(1, "Field", "Name"); + builder.AddAttribute(2, "FieldExpression", Utility.GenerateValueExpression(foo, "Name", typeof(string))); + builder.CloseComponent(); + }); + }); + }); + + var button = cut.FindComponents