vislite 0.1.0 → 0.2.0-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/AUTHORS.txt +6 -6
  2. package/CHANGELOG +24 -1
  3. package/LICENSE +20 -20
  4. package/README.md +53 -38
  5. package/lib/Canvas/index.umd.js +135 -46
  6. package/lib/Canvas/index.umd.min.js +7 -3
  7. package/lib/Cardinal/index.umd.js +6 -2
  8. package/lib/Cardinal/index.umd.min.js +6 -2
  9. package/lib/Eoap/index.umd.js +9 -5
  10. package/lib/Eoap/index.umd.min.js +6 -2
  11. package/lib/Hermite/index.umd.js +6 -2
  12. package/lib/Hermite/index.umd.min.js +6 -2
  13. package/lib/Matrix4/index.umd.js +6 -2
  14. package/lib/Matrix4/index.umd.min.js +6 -2
  15. package/lib/Mercator/index.umd.js +42 -0
  16. package/lib/Mercator/index.umd.min.js +15 -0
  17. package/lib/OralCanvas/index.es.js +124 -44
  18. package/lib/OralCanvas/index.es.min.js +7 -3
  19. package/lib/OralWebGL/index.es.js +567 -0
  20. package/lib/OralWebGL/index.es.min.js +15 -0
  21. package/lib/SVG/index.umd.js +16 -5
  22. package/lib/SVG/index.umd.min.js +7 -3
  23. package/lib/WebGL/index.umd.js +626 -0
  24. package/lib/WebGL/index.umd.min.js +15 -0
  25. package/lib/animation/index.umd.js +6 -2
  26. package/lib/animation/index.umd.min.js +6 -2
  27. package/lib/getLoopColors/index.umd.js +6 -2
  28. package/lib/getLoopColors/index.umd.min.js +6 -2
  29. package/lib/index.umd.js +1514 -863
  30. package/lib/index.umd.min.js +7 -3
  31. package/lib/rotate/index.umd.js +6 -2
  32. package/lib/rotate/index.umd.min.js +6 -2
  33. package/lib/ruler/index.umd.js +6 -2
  34. package/lib/ruler/index.umd.min.js +6 -2
  35. package/lib/viewHandler/index.umd.js +129 -0
  36. package/lib/viewHandler/index.umd.min.js +15 -0
  37. package/miniprogram/ui-canvas/index.js +18 -3
  38. package/miniprogram/ui-canvas/index.json +4 -4
  39. package/miniprogram/ui-canvas/index.wxml +4 -4
  40. package/miniprogram/ui-canvas/index.wxss +5 -5
  41. package/package/Canvas/index.ts +1 -1
  42. package/package/Cardinal/index.ts +2 -2
  43. package/package/Eoap/index.ts +2 -2
  44. package/package/Hermite/index.ts +2 -2
  45. package/package/Matrix4/index.ts +2 -2
  46. package/package/Mercator/index.ts +3 -0
  47. package/package/OralCanvas/index.ts +1 -1
  48. package/package/OralWebGL/index.ts +2 -0
  49. package/package/SVG/index.ts +2 -2
  50. package/package/WebGL/index.ts +2 -0
  51. package/package/animation/index.ts +2 -2
  52. package/package/getLoopColors/index.ts +2 -2
  53. package/package/index.ts +32 -9
  54. package/package/rotate/index.ts +2 -2
  55. package/package/ruler/index.ts +2 -2
  56. package/package/viewHandler/index.ts +3 -0
  57. package/package.json +11 -2
  58. package/src/Canvas.ts +10 -1
  59. package/src/Eoap.ts +5 -5
  60. package/src/Matrix4/index.ts +76 -76
  61. package/src/Matrix4/move.ts +12 -12
  62. package/src/Matrix4/rotate.ts +15 -15
  63. package/src/Matrix4/scale.ts +11 -11
  64. package/src/Matrix4/transform.ts +64 -64
  65. package/src/Mercator.ts +27 -0
  66. package/src/SVG.ts +1 -1
  67. package/src/WebGL.ts +53 -0
  68. package/src/animation.ts +99 -99
  69. package/src/common/assemble.ts +23 -0
  70. package/src/common/canvas/arc.ts +50 -50
  71. package/src/common/canvas/config.ts +7 -6
  72. package/src/common/canvas/index.ts +29 -28
  73. package/src/common/canvas/painter.ts +51 -8
  74. package/src/common/canvas/texts.ts +19 -0
  75. package/src/common/setStyle.ts +5 -5
  76. package/src/common/svg/config.ts +127 -126
  77. package/src/common/svg/index.ts +13 -3
  78. package/src/common/svg/tool.ts +43 -42
  79. package/src/common/webgl/buffer.ts +80 -0
  80. package/src/common/webgl/doDraw.ts +97 -0
  81. package/src/common/webgl/getColorFactory.ts +27 -0
  82. package/src/common/webgl/getShader.ts +62 -0
  83. package/src/common/webgl/getTexture.ts +12 -0
  84. package/src/common/webgl/getWebGLContext.ts +28 -0
  85. package/src/common/webgl/index.ts +212 -0
  86. package/src/common/webgl/shader.ts +76 -0
  87. package/src/common/webgl/texture.ts +99 -0
  88. package/src/getLoopColors.ts +42 -42
  89. package/src/interpolation/Cardinal.ts +91 -91
  90. package/src/interpolation/Hermite.ts +65 -65
  91. package/src/rotate.ts +7 -7
  92. package/src/ruler.ts +99 -99
  93. package/src/viewHandler.ts +140 -0
  94. package/types/Canvas.d.ts +220 -283
  95. package/types/CanvasConfig.d.ts +81 -0
  96. package/types/Cardinal.d.ts +13 -13
  97. package/types/Hermite.d.ts +18 -18
  98. package/types/Map.d.ts +10 -0
  99. package/types/Matrix4.d.ts +42 -42
  100. package/types/Object3D.d.ts +106 -0
  101. package/types/SVG.d.ts +210 -264
  102. package/types/SVGConfig.d.ts +59 -0
  103. package/types/Scene3D.d.ts +7 -0
  104. package/types/WebGL.d.ts +29 -0
  105. package/types/animation.d.ts +6 -6
  106. package/types/getLoopColors.d.ts +2 -2
  107. package/types/index.d.ts +70 -26
  108. package/types/rotate.d.ts +2 -2
  109. package/types/ruler.d.ts +2 -2
  110. package/types/viewHandler.d.ts +13 -0
  111. package/uni-app/ui-canvas.vue +94 -20
  112. package/types/Eoap.d.ts +0 -10
@@ -1,11 +1,15 @@
1
1
  /*!
2
- * VISLite JavaScript Library v0.1.0
2
+ * VISLite JavaScript Library v0.2.0-alpha.7
3
3
  * git+https://github.com/oi-contrib/VISLite.git
4
4
  *
5
5
  * Copyright zxl20070701
6
6
  * Released under the MIT license
7
7
  * https://zxl20070701.github.io/notebook/home.html
8
8
  *
9
- * Publish Date: Sat Apr 29 2023 01:41:52 GMT+0800 (中国标准时间)
9
+ * 本版本系测试版本,请认真阅读下述说明再使用:
10
+ *
11
+ *【测试版本细则】
12
+ * alpha:内测版本,仅供开发人员提供测试环境而发布,后续的修改可能极具破坏性,非有明确了解前请勿直接用于项目中
13
+ * beta:外测版本,正式发布前的确认测试,或者新功能紧急发布,一般可以直接用于实际项目,因为即使后续发现了问题,直接使用正式版即可,不会有破坏性
10
14
  */
11
- var t,e;t=this,e=function(){"use strict";var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)},e=["href","title","show","type","role","actuate"],i=function(t,i,n){e.indexOf(i)>-1?t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:"+i,n+""):t.setAttribute(i,n+"")},n=i;function o(t,e){i(t,"stroke",e.strokeStyle),i(t,"fill",e.fillStyle),i(t,"stroke-dasharray",e.lineDash.join(","))}function r(t,e){i(t,"fill",e.fillStyle)}function s(t,e){i(t,"stroke",e.strokeStyle),i(t,"fill","none"),i(t,"stroke-dasharray",e.lineDash.join(","))}var h=function(t,e,i,n,o){var r=Math.cos(i),s=Math.sin(i);return[+((n-t)*r-(o-e)*s+t).toFixed(7),+((n-t)*s+(o-e)*r+e).toFixed(7)]},u=function(t,e,i,o,r){if("text"!==t.nodeName.toLowerCase())throw new Error("Need a <text> !");n(t,"dy",{top:.5*e["font-size"],middle:0,bottom:.5*-e["font-size"]}[e.textBaseline]),function(t,e){for(var i in e)t.style[i]=e[i]}(t,{"text-anchor":{left:"start",right:"end",center:"middle"}[e.textAlign],"dominant-baseline":"central","font-size":e["font-size"]+"px","font-family":e["font-family"]}),n(t,"x",i),n(t,"y",o),"number"==typeof r&&n(t,"transform","rotate("+(r%=360)+","+i+","+o+")")},_=function(t,e,i,o){if("circle"!==t.nodeName.toLowerCase())throw new Error("Need a <circle> !");n(t,"cx",e),n(t,"cy",i),n(t,"r",o)},c=function(t,e){if("path"!==t.nodeName.toLowerCase())throw new Error("Need a <path> !");n(t,"d",e)},f=function(t,e,i,o,r){if("rect"!==t.nodeName.toLowerCase())throw new Error("Need a <rect> !");r<0&&(i-=r*=-1),o<0&&(e-=o*=-1),n(t,"x",e),n(t,"y",i),n(t,"width",o),n(t,"height",r)},l=function(t,e,i,o,r,s,u,_){if("path"!==t.nodeName.toLowerCase())throw new Error("Need a <path> !");if(u%=2*Math.PI,r>s){var c=r;r=s,s=c}_>=1.999999*Math.PI||_<=1.999999*-Math.PI?_=1.999999*Math.PI:_%=2*Math.PI,function(t,e,i,n,o,r,s){e<0&&(t+=e,e*=-1);var u,_=[];u=h(0,0,t,o,0),_[0]=u[0],_[1]=u[1],u=h(0,0,e,u[0],u[1]),_[2]=u[0],_[3]=u[1],u=h(0,0,t,r,0),_[4]=u[0],_[5]=u[1],u=h(0,0,e,u[0],u[1]),_[6]=u[0],_[7]=u[1],s(t,t+e,_[0]+i,_[1]+n,_[4]+i,_[5]+n,_[2]+i,_[3]+n,_[6]+i,_[7]+n,.5*(r-o))}(u,_,i,o,r,s,(function(i,o,h,u,_,c,f,l,a,p,d){var y=o-i>Math.PI?1:0,E="M"+h+" "+u;d<0&&(d=-d),E+="A"+r+" "+r+" 0 "+y+" 1 "+f+" "+l,"round"==e["arc-end-cap"]?E+="A"+d+" "+d+" 0 1 0 "+a+" "+p:"-round"==e["arc-end-cap"]?E+="A"+d+" "+d+" 0 1 1 "+a+" "+p:E+="L"+a+" "+p,E+="A"+s+" "+s+" 0 "+y+" 0 "+_+" "+c,"round"==e["arc-start-cap"]?E+="A"+d+" "+d+" 0 1 0 "+h+" "+u:"-round"==e["arc-start-cap"]?E+="A"+d+" "+d+" 0 1 1 "+h+" "+u:E+="L"+h+" "+u,"butt"==e["arc-start-cap"]&&(E+="Z"),n(t,"d",E)}))};function a(t,e,i,n,o){var r=Math.cos(i),s=Math.sin(i);return[(n-t)*r-(o-e)*s+t,(n-t)*s+(o-e)*r+e]}var p=function(){function t(t){this.name="SVG",this.__config={fillStyle:"#000",strokeStyle:"#000",lineWidth:1,textAlign:"left",textBaseline:"middle","font-size":16,"font-family":"sans-serif","arc-start-cap":"butt","arc-end-cap":"butt",lineDash:[]},this.__path="",this.__currentPosition=[],this.__svg=t}return t.prototype.config=function(t){if("object"!=typeof t)return this.__config[t];for(var e in t)this.__config[e]=t[e];return this},t.prototype.useEl=function(t){return this.__useEl=t,this},t.prototype.getEl=function(){return this.__useEl},t.prototype.appendEl=function(t,e){var i;return e=e||this.__svg,"string"==typeof t&&(i=t,t=document.createElementNS("http://www.w3.org/2000/svg",i)),e.appendChild(t),this.__useEl=t,this},t.prototype.appendBoard=function(t,e){var i=t;if("string"==typeof t&&(i={text:"text",path:"path",arc:"path",circle:"circle",rect:"rect"}[t]||""),""==i)throw new Error("Unsupported drawing method:"+t);return this.appendEl(i,e)},t.prototype.remove=function(){if(!this.__useEl)throw new Error("Currently, no node can be deleted.");return this.__useEl.parentNode.removeChild(this.__useEl),this},t.prototype.attr=function(t){if(!this.__useEl)throw new Error("Currently, no node can be modified or viewed.");if("object"!=typeof t)return function(t,i){return e.indexOf(i)>-1&&(i="xlink:"+i),t.getAttribute(i)}(this.__useEl,t);for(var i in t)n(this.__useEl,i,t[i]);return this},t.prototype.fillText=function(t,e,i,n){return void 0===n&&(n=0),u(this.__useEl,this.__config,e,i,n),this.__useEl.textContent=t,r(this.__useEl,this.__config),this},t.prototype.strokeText=function(t,e,i,n){return void 0===n&&(n=0),u(this.__useEl,this.__config,e,i,n),this.__useEl.textContent=t,s(this.__useEl,this.__config),this},t.prototype.fullText=function(t,e,i,n){return void 0===n&&(n=0),u(this.__useEl,this.__config,e,i,n),this.__useEl.textContent=t,o(this.__useEl,this.__config),this},t.prototype.fillArc=function(t,e,i,n,o,s){return l(this.__useEl,this.__config,t,e,i,n,o,s),r(this.__useEl,this.__config),this},t.prototype.strokeArc=function(t,e,i,n,o,r){return l(this.__useEl,this.__config,t,e,i,n,o,r),s(this.__useEl,this.__config),this},t.prototype.fullArc=function(t,e,i,n,r,s){return l(this.__useEl,this.__config,t,e,i,n,r,s),o(this.__useEl,this.__config),this},t.prototype.fillCircle=function(t,e,i){return _(this.__useEl,t,e,i),r(this.__useEl,this.__config),this},t.prototype.strokeCircle=function(t,e,i){return _(this.__useEl,t,e,i),s(this.__useEl,this.__config),this},t.prototype.fullCircle=function(t,e,i){return _(this.__useEl,t,e,i),o(this.__useEl,this.__config),this},t.prototype.fillRect=function(t,e,i,n){return f(this.__useEl,t,e,i,n),r(this.__useEl,this.__config),this},t.prototype.strokeRect=function(t,e,i,n){return f(this.__useEl,t,e,i,n),s(this.__useEl,this.__config),this},t.prototype.fullRect=function(t,e,i,n){return f(this.__useEl,t,e,i,n),o(this.__useEl,this.__config),this},t.prototype.beginPath=function(){return this.__currentPosition=[],this.__path="",this},t.prototype.closePath=function(){return this.__path+="Z",this},t.prototype.moveTo=function(t,e){return this.__currentPosition=[t,e],this.__path+="M"+t+" "+e,this},t.prototype.lineTo=function(t,e){return this.__currentPosition=[t,e],this.__path+=(""==this.__path?"M":"L")+t+" "+e,this},t.prototype.fill=function(){return c(this.__useEl,this.__path),r(this.__useEl,this.__config),this},t.prototype.stroke=function(){return c(this.__useEl,this.__path),s(this.__useEl,this.__config),this},t.prototype.full=function(){return c(this.__useEl,this.__path),o(this.__useEl,this.__config),this},t.prototype.arc=function(t,e,i,n,o){var r=a(t,e,n,t+i,e),s=a(t,e,n+o,t+i,e);return n=n/Math.PI*180,o=o/Math.PI*180,""==this.__path?this.__path+="M"+r[0]+","+r[1]:r[0]==this.__currentPosition[0]&&r[1]==this.__currentPosition[1]||(this.__path+="L"+r[0]+","+r[1]),this.__path+="A"+i+","+i+" 0 "+(o>180||o<-180?1:0)+","+(o>0?1:0)+" "+s[0]+","+s[1],this},t.prototype.quadraticCurveTo=function(t,e,i,n){return this.__path+="Q"+t+" "+e+","+i+" "+n,this},t.prototype.bezierCurveTo=function(t,e,i,n,o,r){return this.__path+="C"+t+" "+e+","+i+" "+n+","+o+" "+r,this},t}();return function(e){function i(t){if(!t)throw new Error("VISLite SVG :The mount point requires an HTMLElement type but encountered null.");var i=t.clientWidth,n=t.clientHeight,o=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.appendChild(o),o.setAttribute("width",i+""),o.setAttribute("height",n+""),o.setAttribute("viewBox","0 0 "+i+" "+n),e.call(this,o)||this}return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}(i,e),i}(p)},"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).VISLite_SVG=e();
15
+ var t,e;t=this,e=function(){"use strict";var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)},e=["href","title","show","type","role","actuate"],i=function(t,i,n){e.indexOf(i)>-1?t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:"+i,n+""):t.setAttribute(i,n+"")},n=i;function o(t,e){i(t,"stroke",e.strokeStyle),i(t,"fill",e.fillStyle),i(t,"stroke-dasharray",e.lineDash.join(","))}function r(t,e){i(t,"fill",e.fillStyle)}function s(t,e){i(t,"stroke",e.strokeStyle),i(t,"fill","none"),i(t,"stroke-dasharray",e.lineDash.join(","))}var h=function(t,e,i,n,o){var r=Math.cos(i),s=Math.sin(i);return[+((n-t)*r-(o-e)*s+t).toFixed(7),+((n-t)*s+(o-e)*r+e).toFixed(7)]},u=function(t,e,i,o,r){if("text"!==t.nodeName.toLowerCase())throw new Error("Need a <text> !");n(t,"dy",{top:.5*e["font-size"],middle:0,bottom:.5*-e["font-size"]}[e.textBaseline]),function(t,e){for(var i in e)t.style[i]=e[i]}(t,{"text-anchor":{left:"start",right:"end",center:"middle"}[e.textAlign],"dominant-baseline":"central","font-size":e["font-size"]+"px","font-family":e["font-family"]}),n(t,"x",i),n(t,"y",o),"number"==typeof r&&n(t,"transform","rotate("+(r%=360)+","+i+","+o+")")},_=function(t,e,i,o){if("circle"!==t.nodeName.toLowerCase())throw new Error("Need a <circle> !");n(t,"cx",e),n(t,"cy",i),n(t,"r",o)},c=function(t,e){if("path"!==t.nodeName.toLowerCase())throw new Error("Need a <path> !");n(t,"d",e)},f=function(t,e,i,o,r){if("rect"!==t.nodeName.toLowerCase())throw new Error("Need a <rect> !");r<0&&(i-=r*=-1),o<0&&(e-=o*=-1),n(t,"x",e),n(t,"y",i),n(t,"width",o),n(t,"height",r)},a=function(t,e,i,o,r,s,u,_){if("path"!==t.nodeName.toLowerCase())throw new Error("Need a <path> !");if(u%=2*Math.PI,r>s){var c=r;r=s,s=c}_>=1.999999*Math.PI||_<=1.999999*-Math.PI?_=1.999999*Math.PI:_%=2*Math.PI,function(t,e,i,n,o,r,s){e<0&&(t+=e,e*=-1);var u,_=[];u=h(0,0,t,o,0),_[0]=u[0],_[1]=u[1],u=h(0,0,e,u[0],u[1]),_[2]=u[0],_[3]=u[1],u=h(0,0,t,r,0),_[4]=u[0],_[5]=u[1],u=h(0,0,e,u[0],u[1]),_[6]=u[0],_[7]=u[1],s(t,t+e,_[0]+i,_[1]+n,_[4]+i,_[5]+n,_[2]+i,_[3]+n,_[6]+i,_[7]+n,.5*(r-o))}(u,_,i,o,r,s,(function(i,o,h,u,_,c,f,a,l,p,d){var y=o-i>Math.PI?1:0,E="M"+h+" "+u;d<0&&(d=-d),E+="A"+r+" "+r+" 0 "+y+" 1 "+f+" "+a,"round"==e["arc-end-cap"]?E+="A"+d+" "+d+" 0 1 0 "+l+" "+p:"-round"==e["arc-end-cap"]?E+="A"+d+" "+d+" 0 1 1 "+l+" "+p:E+="L"+l+" "+p,E+="A"+s+" "+s+" 0 "+y+" 0 "+_+" "+c,"round"==e["arc-start-cap"]?E+="A"+d+" "+d+" 0 1 0 "+h+" "+u:"-round"==e["arc-start-cap"]?E+="A"+d+" "+d+" 0 1 1 "+h+" "+u:E+="L"+h+" "+u,"butt"==e["arc-start-cap"]&&(E+="Z"),n(t,"d",E)}))};function l(t,e,i,n,o){var r=Math.cos(i),s=Math.sin(i);return[(n-t)*r-(o-e)*s+t,(n-t)*s+(o-e)*r+e]}var p={"font-size":"fontSize","font-family":"fontFamily","arc-start-cap":"arcStartCap","arc-end-cap":"arcEndCap"},d=function(){function t(t){this.name="SVG",this.__config={fillStyle:"#000",strokeStyle:"#000",lineWidth:1,textAlign:"left",textBaseline:"middle","font-size":16,"font-family":"sans-serif","arc-start-cap":"butt","arc-end-cap":"butt",lineDash:[]},this.__path="",this.__currentPosition=[],this.__svg=t}return t.prototype.config=function(t){if("object"!=typeof t)return this.__config[p[t]||t];for(var e in t){var i=p[e]||e;this.__config[i]=t[e]}return this},t.prototype.useEl=function(t){return this.__useEl=t,this},t.prototype.getEl=function(){return this.__useEl},t.prototype.appendEl=function(t,e){var i;return e=e||this.__svg,"string"==typeof t&&(i=t,t=document.createElementNS("http://www.w3.org/2000/svg",i)),e.appendChild(t),this.__useEl=t,this},t.prototype.appendBoard=function(t,e){var i=t;if("string"==typeof t&&(i={text:"text",path:"path",arc:"path",circle:"circle",rect:"rect"}[t]||""),""==i)throw new Error("Unsupported drawing method:"+t);return this.appendEl(i,e)},t.prototype.remove=function(){if(!this.__useEl)throw new Error("Currently, no node can be deleted.");return this.__useEl.parentNode.removeChild(this.__useEl),this},t.prototype.attr=function(t){if(!this.__useEl)throw new Error("Currently, no node can be modified or viewed.");if("object"!=typeof t)return function(t,i){return e.indexOf(i)>-1&&(i="xlink:"+i),t.getAttribute(i)}(this.__useEl,t);for(var i in t)n(this.__useEl,i,t[i]);return this},t.prototype.fillText=function(t,e,i,n){return void 0===n&&(n=0),u(this.__useEl,this.__config,e,i,n),this.__useEl.textContent=t,r(this.__useEl,this.__config),this},t.prototype.strokeText=function(t,e,i,n){return void 0===n&&(n=0),u(this.__useEl,this.__config,e,i,n),this.__useEl.textContent=t,s(this.__useEl,this.__config),this},t.prototype.fullText=function(t,e,i,n){return void 0===n&&(n=0),u(this.__useEl,this.__config,e,i,n),this.__useEl.textContent=t,o(this.__useEl,this.__config),this},t.prototype.fillArc=function(t,e,i,n,o,s){return a(this.__useEl,this.__config,t,e,i,n,o,s),r(this.__useEl,this.__config),this},t.prototype.strokeArc=function(t,e,i,n,o,r){return a(this.__useEl,this.__config,t,e,i,n,o,r),s(this.__useEl,this.__config),this},t.prototype.fullArc=function(t,e,i,n,r,s){return a(this.__useEl,this.__config,t,e,i,n,r,s),o(this.__useEl,this.__config),this},t.prototype.fillCircle=function(t,e,i){return _(this.__useEl,t,e,i),r(this.__useEl,this.__config),this},t.prototype.strokeCircle=function(t,e,i){return _(this.__useEl,t,e,i),s(this.__useEl,this.__config),this},t.prototype.fullCircle=function(t,e,i){return _(this.__useEl,t,e,i),o(this.__useEl,this.__config),this},t.prototype.fillRect=function(t,e,i,n){return f(this.__useEl,t,e,i,n),r(this.__useEl,this.__config),this},t.prototype.strokeRect=function(t,e,i,n){return f(this.__useEl,t,e,i,n),s(this.__useEl,this.__config),this},t.prototype.fullRect=function(t,e,i,n){return f(this.__useEl,t,e,i,n),o(this.__useEl,this.__config),this},t.prototype.beginPath=function(){return this.__currentPosition=[],this.__path="",this},t.prototype.closePath=function(){return this.__path+="Z",this},t.prototype.moveTo=function(t,e){return this.__currentPosition=[t,e],this.__path+="M"+t+" "+e,this},t.prototype.lineTo=function(t,e){return this.__currentPosition=[t,e],this.__path+=(""==this.__path?"M":"L")+t+" "+e,this},t.prototype.fill=function(){return c(this.__useEl,this.__path),r(this.__useEl,this.__config),this},t.prototype.stroke=function(){return c(this.__useEl,this.__path),s(this.__useEl,this.__config),this},t.prototype.full=function(){return c(this.__useEl,this.__path),o(this.__useEl,this.__config),this},t.prototype.arc=function(t,e,i,n,o){var r=l(t,e,n,t+i,e),s=l(t,e,n+o,t+i,e);return n=n/Math.PI*180,o=o/Math.PI*180,""==this.__path?this.__path+="M"+r[0]+","+r[1]:r[0]==this.__currentPosition[0]&&r[1]==this.__currentPosition[1]||(this.__path+="L"+r[0]+","+r[1]),this.__path+="A"+i+","+i+" 0 "+(o>180||o<-180?1:0)+","+(o>0?1:0)+" "+s[0]+","+s[1],this},t.prototype.quadraticCurveTo=function(t,e,i,n){return this.__path+="Q"+t+" "+e+","+i+" "+n,this},t.prototype.bezierCurveTo=function(t,e,i,n,o,r){return this.__path+="C"+t+" "+e+","+i+" "+n+","+o+" "+r,this},t}();return function(e){function i(t){if(!t)throw new Error("VISLite SVG:The mount point requires an HTMLElement type but encountered null.");var i=t.clientWidth,n=t.clientHeight,o=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.appendChild(o),o.setAttribute("width",i+""),o.setAttribute("height",n+""),o.setAttribute("viewBox","0 0 "+i+" "+n),e.call(this,o)||this}return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}(i,e),i}(d)},"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).VISLite_SVG=e();